From e32eea0d937d141b7c2881bb953a6bc9aac92e7f Mon Sep 17 00:00:00 2001 From: Chanho Park Date: Fri, 28 Nov 2014 20:41:07 +0900 Subject: [PATCH] Imported Upstream version 4.5.14 --- AUTHORS | 1 + ChangeLog | 1782 +- GNUmakefile | 28 +- INSTALL | 9 +- Makefile.am | 21 +- Makefile.in | 919 +- NEWS | 172 +- README | 8 +- README-hacking | 44 +- THANKS | 2 + aclocal.m4 | 787 +- build-aux/Makefile.in | 814 +- build-aux/arg-nonnull.h | 26 - build-aux/c++defs.h | 271 - build-aux/check-testfiles.sh | 2 +- build-aux/compile | 21 +- build-aux/config.guess | 369 +- build-aux/config.sub | 164 +- build-aux/depcomp | 508 +- build-aux/install-sh | 374 +- build-aux/mdate-sh | 12 +- build-aux/mkinstalldirs | 4 +- build-aux/snippet/_Noreturn.h | 10 + build-aux/snippet/arg-nonnull.h | 26 + build-aux/snippet/c++defs.h | 271 + build-aux/snippet/unused-parameter.h | 36 + build-aux/snippet/warn-on-use.h | 109 + build-aux/texinfo.tex | 913 +- build-aux/unused-parameter.h | 36 - build-aux/update-copyright | 17 +- build-aux/useless-if-before-free | 14 +- build-aux/vc-list-files | 91 +- build-aux/warn-on-use.h | 109 - build-aux/ylwrap | 11 +- config.h.in | 1165 +- configure | 45587 ++++++++++++------- configure.ac | 64 +- doc/Makefile.in | 863 +- doc/fdl.texi | 3 +- doc/find-maint.info | 68 +- doc/find-maint.texi | 13 +- doc/find.info | 309 +- doc/find.info-1 | 1191 +- doc/find.info-2 | Bin 11489 -> 36605 bytes doc/find.texi | 448 +- doc/mdate-sh | 15 +- doc/parse-datetime.texi | 99 +- doc/regexprops.texi | 8 +- doc/stamp-1 | 8 +- doc/stamp-vti | 8 +- doc/texinfo.tex | 10174 +++++ doc/version.texi | 8 +- doc/versionmaint.texi | 8 +- find/Makefile.am | 28 +- find/Makefile.in | 949 +- find/defs.h | 23 +- find/exec.c | 388 + find/find.1 | 146 +- find/find.c | 223 +- find/finddata.c | 10 +- find/fstype.c | 99 +- find/ftsfind.1 | 31 + find/ftsfind.c | 63 +- find/oldfind.1 | 31 + find/parser.c | 614 +- find/pred.c | 1373 +- find/print.c | 1322 + find/print.h | 16 + find/sharefile.c | 18 +- find/sharefile.h | 2 +- find/testsuite/Makefile.am | 60 +- find/testsuite/Makefile.in | 1172 +- find/testsuite/binary_locations.sh | 18 + find/testsuite/checklists.py | 91 + find/testsuite/config/unix.exp | 4 +- find/testsuite/find.gnu/access.exp | 2 +- find/testsuite/find.gnu/deletedir.exp | 2 +- find/testsuite/find.gnu/deletefile.exp | 2 +- find/testsuite/find.gnu/exec-one-rtn-fail.exp | 4 +- find/testsuite/find.gnu/execdir-hier.exp | 2 +- find/testsuite/find.gnu/execdir-pwd.exp | 2 +- find/testsuite/find.gnu/execdir-root-only.exp | 10 +- .../find.gnu/follow-arg-parent-symlink.exp | 2 +- find/testsuite/find.gnu/ilname.exp | 2 +- find/testsuite/find.gnu/lname.exp | 2 +- find/testsuite/find.gnu/perm-slash.exp | 8 +- find/testsuite/find.gnu/posix-h.exp | 4 +- find/testsuite/find.gnu/printf-reserved.exp | 3 + find/testsuite/find.gnu/printf.exp | 2 +- find/testsuite/find.gnu/printf.xo | 8 + find/testsuite/find.gnu/sv-bug-17782.exp | 6 +- find/testsuite/find.gnu/sv-bug-24169.exp | 14 +- find/testsuite/find.gnu/used-invarg.exp | 2 +- find/testsuite/find.gnu/used-missing.exp | 2 +- find/testsuite/find.posix/bracket-depth.exp | 2 +- .../find.posix/files-not-expressions1.exp | 2 +- .../find.posix/files-not-expressions2.exp | 2 +- .../find.posix/files-not-expressions3.exp | 2 +- find/testsuite/find.posix/nameslash.exp | 2 +- find/testsuite/find.posix/perm-vanilla.exp | 8 +- find/testsuite/find.posix/sizes.exp | 12 +- find/testsuite/find.posix/sv-bug-25359.exp | 2 +- find/testsuite/find.posix/typesize.exp | 2 +- find/testsuite/sv-34079.sh | 79 + find/testsuite/sv-34976-execdir-fd-leak.sh | 80 + find/testsuite/sv-bug-32043.sh | 33 + find/testsuite/test_escape_c.sh | 27 + find/testsuite/test_escapechars.golden | 13 + find/testsuite/test_escapechars.sh | 44 + find/testsuite/test_inode.sh | 51 + find/tree.c | 60 +- find/util.c | 42 +- {gnulib => gl}/Makefile.am | 0 gl/Makefile.in | 1888 + gl/lib/Makefile.am | 3838 ++ gl/lib/Makefile.in | 4132 ++ gl/lib/alloca.c | 478 + gl/lib/alloca.in.h | 63 + gl/lib/allocator.c | 5 + gl/lib/allocator.h | 58 + gl/lib/areadlink-with-size.c | 104 + gl/lib/areadlink.c | 56 + gl/lib/areadlink.h | 33 + gl/lib/areadlinkat.c | 65 + gl/lib/argmatch.c | 277 + gl/lib/argmatch.h | 111 + gl/lib/asnprintf.c | 34 + gl/lib/at-func.c | 146 + gl/lib/basename-lgpl.c | 75 + gl/lib/basename.c | 58 + gl/lib/bitrotate.c | 3 + gl/lib/bitrotate.h | 136 + gl/lib/btowc.c | 39 + gl/lib/byteswap.in.h | 44 + gl/lib/c-ctype.c | 395 + gl/lib/c-ctype.h | 295 + gl/lib/c-strcase.h | 56 + gl/lib/c-strcasecmp.c | 56 + gl/lib/c-strcaseeq.h | 184 + gl/lib/c-strcasestr.c | 77 + gl/lib/c-strcasestr.h | 36 + gl/lib/c-strncasecmp.c | 56 + gl/lib/c-strstr.c | 32 + gl/lib/c-strstr.h | 44 + gl/lib/canonicalize.c | 354 + gl/lib/canonicalize.h | 48 + gl/lib/careadlinkat.c | 160 + gl/lib/careadlinkat.h | 67 + gl/lib/chdir-long.c | 266 + gl/lib/chdir-long.h | 30 + gl/lib/cloexec.c | 83 + gl/lib/cloexec.h | 38 + gl/lib/close-stream.c | 78 + {gnulib => gl}/lib/close-stream.h | 0 gl/lib/close.c | 69 + gl/lib/closedir.c | 67 + gl/lib/closein.c | 112 + gl/lib/closein.h | 32 + gl/lib/closeout.c | 124 + gl/lib/closeout.h | 36 + gl/lib/config.charset | 684 + gl/lib/creat-safer.c | 31 + gl/lib/ctype.in.h | 57 + gl/lib/cycle-check.c | 85 + gl/lib/cycle-check.h | 52 + {gnulib => gl}/lib/dev-ino.h | 0 gl/lib/dirent--.h | 23 + gl/lib/dirent-private.h | 40 + gl/lib/dirent-safer.h | 22 + gl/lib/dirent.in.h | 258 + gl/lib/dirfd.c | 32 + gl/lib/dirname-lgpl.c | 86 + gl/lib/dirname.c | 38 + gl/lib/dirname.h | 46 + gl/lib/dosname.h | 53 + gl/lib/dup-safer.c | 34 + gl/lib/dup.c | 61 + gl/lib/dup2.c | 164 + gl/lib/errno.in.h | 279 + gl/lib/error.c | 401 + gl/lib/error.h | 65 + gl/lib/euidaccess.c | 221 + gl/lib/exitfail.c | 24 + gl/lib/exitfail.h | 18 + gl/lib/faccessat.c | 45 + gl/lib/fchdir.c | 208 + gl/lib/fcntl--.h | 32 + gl/lib/fcntl-safer.h | 27 + gl/lib/fcntl.c | 311 + gl/lib/fcntl.in.h | 347 + gl/lib/fd-hook.c | 116 + gl/lib/fd-hook.h | 119 + gl/lib/fd-safer.c | 49 + gl/lib/fdopendir.c | 204 + gl/lib/fflush.c | 225 + gl/lib/file-set.c | 74 + gl/lib/file-set.h | 15 + gl/lib/fileblocks.c | 74 + gl/lib/filemode.c | 180 + gl/lib/filemode.h | 44 + gl/lib/filename.h | 54 + gl/lib/filenamecat-lgpl.c | 88 + gl/lib/filenamecat.h | 27 + gl/lib/float+.h | 147 + gl/lib/float.c | 33 + gl/lib/float.in.h | 188 + gl/lib/fnmatch.c | 350 + gl/lib/fnmatch.in.h | 67 + gl/lib/fnmatch_loop.c | 1219 + gl/lib/fopen-safer.c | 63 + gl/lib/fopen.c | 110 + gl/lib/fpending.c | 30 + gl/lib/fpending.h | 29 + gl/lib/fpurge.c | 145 + gl/lib/freadahead.c | 93 + gl/lib/freadahead.h | 47 + gl/lib/freading.c | 74 + gl/lib/freading.h | 53 + gl/lib/fseek.c | 30 + gl/lib/fseeko.c | 159 + gl/lib/fstat.c | 88 + gl/lib/fstatat.c | 135 + gl/lib/ftell.c | 37 + gl/lib/ftello.c | 85 + gl/lib/fts-cycle.c | 160 + gl/lib/fts.c | 2108 + gl/lib/fts_.h | 276 + gl/lib/getcwd-lgpl.c | 126 + gl/lib/getcwd.c | 442 + gl/lib/getdelim.c | 135 + gl/lib/getdtablesize.c | 107 + gl/lib/getfilecon.c | 86 + gl/lib/getgroups.c | 131 + gl/lib/gethostname.c | 104 + gl/lib/getline.c | 27 + gl/lib/getopt.c | 1245 + gl/lib/getopt.in.h | 255 + gl/lib/getopt1.c | 170 + gl/lib/getopt_int.h | 135 + gl/lib/gettext.h | 288 + gl/lib/gettime.c | 48 + gl/lib/gettimeofday.c | 154 + gl/lib/glthread/lock.c | 1057 + gl/lib/glthread/lock.h | 927 + gl/lib/glthread/threadlib.c | 73 + gl/lib/group-member.c | 119 + gl/lib/hash-pjw.c | 40 + gl/lib/hash-pjw.h | 23 + gl/lib/hash-triple.c | 77 + gl/lib/hash-triple.h | 24 + gl/lib/hash.c | 1233 + gl/lib/hash.h | 107 + gl/lib/human.c | 470 + gl/lib/human.h | 83 + gl/lib/i-ring.c | 68 + gl/lib/i-ring.h | 44 + gl/lib/idcache.c | 227 + {gnulib => gl}/lib/idcache.h | 0 gl/lib/intprops.h | 320 + gl/lib/inttypes.in.h | 1140 + gl/lib/isblank.c | 33 + gl/lib/isfinite.c | 51 + gl/lib/isinf.c | 39 + gl/lib/isnan.c | 189 + gl/lib/isnand-nolibm.h | 33 + gl/lib/isnand.c | 19 + gl/lib/isnanf-nolibm.h | 40 + gl/lib/isnanf.c | 20 + gl/lib/isnanl-nolibm.h | 33 + gl/lib/isnanl.c | 20 + gl/lib/iswblank.c | 26 + gl/lib/itold.c | 28 + gl/lib/langinfo.in.h | 176 + gl/lib/localcharset.c | 558 + gl/lib/localcharset.h | 40 + gl/lib/locale.in.h | 216 + gl/lib/localeconv.c | 103 + gl/lib/lseek.c | 67 + gl/lib/lstat.c | 97 + gl/lib/malloc.c | 56 + gl/lib/malloca.c | 149 + gl/lib/malloca.h | 133 + {gnulib => gl}/lib/malloca.valgrind | 0 gl/lib/math.c | 3 + gl/lib/math.in.h | 2278 + gl/lib/mbchar.c | 37 + gl/lib/mbchar.h | 360 + gl/lib/mbrtowc.c | 402 + gl/lib/mbscasestr.c | 412 + gl/lib/mbsinit.c | 61 + gl/lib/mbslen.c | 44 + gl/lib/mbsrtowcs-impl.h | 122 + gl/lib/mbsrtowcs-state.c | 37 + gl/lib/mbsrtowcs.c | 32 + gl/lib/mbsstr.c | 384 + gl/lib/mbtowc-impl.h | 44 + gl/lib/mbtowc.c | 26 + gl/lib/mbuiter.c | 3 + gl/lib/mbuiter.h | 232 + gl/lib/memchr.c | 172 + {gnulib => gl}/lib/memchr.valgrind | 0 gl/lib/mempcpy.c | 28 + gl/lib/memrchr.c | 161 + {gnulib => gl}/lib/mktime-internal.h | 0 gl/lib/mktime.c | 741 + gl/lib/modechange.c | 414 + gl/lib/modechange.h | 30 + gl/lib/modf.c | 44 + gl/lib/mountlist.c | 983 + gl/lib/mountlist.h | 41 + gl/lib/msvc-inval.c | 129 + gl/lib/msvc-inval.h | 222 + gl/lib/msvc-nothrow.c | 49 + gl/lib/msvc-nothrow.h | 43 + gl/lib/nl_langinfo.c | 271 + gl/lib/open-safer.c | 46 + gl/lib/open.c | 181 + gl/lib/openat-die.c | 62 + gl/lib/openat-priv.h | 64 + gl/lib/openat-proc.c | 110 + gl/lib/openat-safer.c | 46 + gl/lib/openat.c | 286 + gl/lib/openat.h | 123 + gl/lib/opendir-safer.c | 76 + gl/lib/opendir.c | 148 + gl/lib/parse-datetime.c | 3608 ++ gl/lib/parse-datetime.h | 22 + gl/lib/parse-datetime.y | 1626 + gl/lib/pathmax.h | 83 + gl/lib/perror.c | 49 + gl/lib/pipe-safer.c | 56 + gl/lib/printf-args.c | 187 + gl/lib/printf-args.h | 158 + gl/lib/printf-parse.c | 638 + gl/lib/printf-parse.h | 193 + gl/lib/progname.c | 92 + gl/lib/progname.h | 62 + gl/lib/quote.h | 46 + gl/lib/quotearg.c | 968 + gl/lib/quotearg.h | 391 + gl/lib/read.c | 85 + gl/lib/readdir.c | 98 + gl/lib/readlink.c | 74 + gl/lib/readlinkat.c | 47 + gl/lib/realloc.c | 79 + gl/lib/ref-add.sin | 29 + gl/lib/ref-del.sin | 24 + gl/lib/regcomp.c | 3922 ++ gl/lib/regex.c | 81 + gl/lib/regex.h | 667 + gl/lib/regex_internal.c | 1736 + gl/lib/regex_internal.h | 909 + gl/lib/regexec.c | 4410 ++ gl/lib/rewinddir.c | 49 + gl/lib/rmdir.c | 53 + gl/lib/root-uid.h | 30 + gl/lib/rpmatch.c | 176 + gl/lib/safe-read.c | 77 + gl/lib/safe-read.h | 47 + gl/lib/same-inode.h | 33 + gl/lib/same.c | 123 + gl/lib/same.h | 25 + gl/lib/save-cwd.c | 99 + gl/lib/save-cwd.h | 34 + gl/lib/savedir.c | 205 + gl/lib/savedir.h | 41 + gl/lib/se-context.c | 3 + gl/lib/se-context.in.h | 46 + gl/lib/se-selinux.c | 3 + gl/lib/se-selinux.in.h | 123 + gl/lib/selinux-at.c | 71 + gl/lib/selinux-at.h | 52 + gl/lib/setenv.c | 390 + gl/lib/size_max.h | 30 + gl/lib/snprintf.c | 71 + gl/lib/sockets.c | 154 + gl/lib/sockets.h | 62 + {gnulib => gl}/lib/stat-macros.h | 0 gl/lib/stat-size.h | 107 + gl/lib/stat-time.c | 3 + gl/lib/stat-time.h | 199 + gl/lib/stat.c | 138 + gl/lib/statat.c | 3 + gl/lib/stdalign.in.h | 110 + gl/lib/stdarg.in.h | 35 + gl/lib/stdbool.in.h | 132 + gl/lib/stddef.in.h | 86 + gl/lib/stdint.in.h | 635 + gl/lib/stdio--.h | 41 + gl/lib/stdio-impl.h | 112 + gl/lib/stdio-safer.h | 36 + gl/lib/stdio.in.h | 1353 + gl/lib/stdlib.in.h | 954 + gl/lib/stpcpy.c | 49 + gl/lib/str-kmp.h | 153 + gl/lib/str-two-way.h | 452 + gl/lib/strcasecmp.c | 62 + gl/lib/strcasestr.c | 82 + gl/lib/strdup.c | 54 + gl/lib/streq.h | 176 + gl/lib/strerror-override.c | 302 + gl/lib/strerror-override.h | 56 + gl/lib/strerror.c | 70 + gl/lib/strerror_r.c | 326 + gl/lib/strftime.c | 1487 + gl/lib/strftime.h | 34 + gl/lib/string.in.h | 1029 + gl/lib/strings.in.h | 122 + gl/lib/stripslash.c | 45 + gl/lib/strncasecmp.c | 62 + gl/lib/strndup.c | 36 + gl/lib/strnlen.c | 30 + gl/lib/strnlen1.c | 35 + gl/lib/strnlen1.h | 40 + gl/lib/strstr.c | 82 + gl/lib/strtoimax.c | 82 + gl/lib/strtol.c | 433 + gl/lib/strtoul.c | 19 + gl/lib/strtoull.c | 26 + {gnulib => gl}/lib/strtoumax.c | 0 gl/lib/sys_socket.c | 3 + gl/lib/sys_socket.in.h | 692 + gl/lib/sys_stat.in.h | 732 + gl/lib/sys_time.in.h | 213 + gl/lib/sys_types.in.h | 53 + gl/lib/sys_uio.in.h | 63 + gl/lib/sys_utsname.in.h | 108 + gl/lib/sys_wait.in.h | 129 + gl/lib/time.in.h | 274 + gl/lib/time_r.c | 44 + gl/lib/timespec.c | 3 + gl/lib/timespec.h | 112 + gl/lib/trunc.c | 121 + gl/lib/uname.c | 268 + gl/lib/unistd--.h | 32 + gl/lib/unistd-safer.h | 31 + gl/lib/unistd.c | 3 + gl/lib/unistd.in.h | 1557 + gl/lib/unitypes.in.h | 46 + gl/lib/uniwidth.in.h | 72 + gl/lib/uniwidth/cjk.h | 37 + gl/lib/uniwidth/width.c | 368 + gl/lib/unlink.c | 97 + gl/lib/unlinkat.c | 109 + gl/lib/unsetenv.c | 127 + gl/lib/vasnprintf.c | 5607 +++ gl/lib/vasnprintf.h | 79 + gl/lib/verify.h | 279 + gl/lib/version-etc-fsf.c | 30 + gl/lib/version-etc.c | 258 + gl/lib/version-etc.h | 78 + gl/lib/w32sock.h | 136 + gl/lib/wchar.in.h | 1028 + gl/lib/wcrtomb.c | 53 + gl/lib/wctype-h.c | 4 + gl/lib/wctype.in.h | 514 + gl/lib/wcwidth.c | 50 + gl/lib/xalloc-die.c | 41 + gl/lib/xalloc-oversized.h | 38 + gl/lib/xalloc.h | 262 + gl/lib/xgetcwd.c | 41 + gl/lib/xgetcwd.h | 17 + gl/lib/xmalloc.c | 122 + gl/lib/xsize.c | 3 + gl/lib/xsize.h | 117 + gl/lib/xstrndup.c | 36 + gl/lib/xstrndup.h | 23 + gl/lib/xstrtod.c | 71 + gl/lib/xstrtod.h | 31 + gl/lib/xstrtol-error.c | 98 + gl/lib/xstrtol.c | 241 + gl/lib/xstrtol.h | 73 + {gnulib => gl}/lib/xstrtoul.c | 0 {gnulib => gl}/lib/xstrtoumax.c | 0 gl/lib/yesno.c | 60 + gl/lib/yesno.h | 24 + gl/m4/00gnulib.m4 | 46 + gl/m4/absolute-header.m4 | 102 + gl/m4/alloca.m4 | 121 + gl/m4/arpa_inet_h.m4 | 57 + gl/m4/assert.m4 | 24 + gl/m4/bison.m4 | 24 + gl/m4/btowc.m4 | 116 + gl/m4/byteswap.m4 | 19 + gl/m4/canonicalize.m4 | 124 + gl/m4/chdir-long.m4 | 30 + gl/m4/check-math-lib.m4 | 32 + gl/m4/clock_time.m4 | 31 + gl/m4/close-stream.m4 | 11 + gl/m4/close.m4 | 33 + gl/m4/closedir.m4 | 25 + gl/m4/closein.m4 | 11 + gl/m4/closeout.m4 | 12 + gl/m4/codeset.m4 | 23 + gl/m4/configmake.m4 | 55 + gl/m4/ctype.m4 | 32 + gl/m4/cycle-check.m4 | 7 + gl/m4/d-ino.m4 | 55 + gl/m4/d-type.m4 | 32 + gl/m4/dirent-safer.m4 | 10 + gl/m4/dirent_h.m4 | 64 + gl/m4/dirfd.m4 | 83 + gl/m4/dirname.m4 | 19 + gl/m4/double-slash-root.m4 | 38 + gl/m4/dup.m4 | 25 + gl/m4/dup2.m4 | 87 + gl/m4/eealloc.m4 | 31 + gl/m4/environ.m4 | 47 + gl/m4/errno_h.m4 | 137 + gl/m4/error.m4 | 27 + gl/m4/euidaccess.m4 | 52 + gl/m4/exponentd.m4 | 116 + gl/m4/exponentf.m4 | 92 + gl/m4/exponentl.m4 | 98 + gl/m4/extensions.m4 | 138 + gl/m4/extern-inline.m4 | 84 + gl/m4/faccessat.m4 | 28 + gl/m4/fchdir.m4 | 61 + gl/m4/fcntl-o.m4 | 134 + gl/m4/fcntl-safer.m4 | 16 + gl/m4/fcntl.m4 | 95 + gl/m4/fcntl_h.m4 | 50 + gl/m4/fdopen.m4 | 47 + gl/m4/fdopendir.m4 | 61 + gl/m4/fflush.m4 | 89 + gl/m4/fileblocks.m4 | 23 + gl/m4/filemode.m4 | 11 + gl/m4/filenamecat.m4 | 16 + gl/m4/flexmember.m4 | 41 + gl/m4/float_h.m4 | 98 + gl/m4/fnmatch.m4 | 156 + gl/m4/fopen.m4 | 58 + gl/m4/fpending.m4 | 99 + gl/m4/fpieee.m4 | 54 + gl/m4/fpurge.m4 | 45 + gl/m4/freadahead.m4 | 10 + gl/m4/freading.m4 | 10 + gl/m4/fseek.m4 | 15 + gl/m4/fseeko.m4 | 73 + gl/m4/fstat.m4 | 36 + gl/m4/fstatat.m4 | 60 + gl/m4/fstypename.m4 | 23 + gl/m4/ftell.m4 | 15 + gl/m4/ftello.m4 | 140 + gl/m4/ftruncate.m4 | 40 + gl/m4/fts.m4 | 22 + gl/m4/getcwd-abort-bug.m4 | 140 + gl/m4/getcwd-path-max.m4 | 204 + gl/m4/getcwd.m4 | 155 + gl/m4/getdelim.m4 | 88 + gl/m4/getdtablesize.m4 | 44 + gl/m4/getgroups.m4 | 107 + gl/m4/gethostname.m4 | 107 + gl/m4/getline.m4 | 96 + gl/m4/getopt.m4 | 368 + gl/m4/getpagesize.m4 | 32 + gl/m4/gettext.m4 | 401 + gl/m4/gettime.m4 | 13 + gl/m4/gettimeofday.m4 | 138 + gl/m4/glibc21.m4 | 34 + gl/m4/gnulib-cache.m4 | 156 + gl/m4/gnulib-common.m4 | 437 + gl/m4/gnulib-comp.m4 | 2702 ++ gl/m4/group-member.m4 | 29 + gl/m4/human.m4 | 11 + gl/m4/i-ring.m4 | 10 + gl/m4/iconv.m4 | 268 + gl/m4/idcache.m4 | 11 + gl/m4/include_next.m4 | 223 + gl/m4/inet_pton.m4 | 68 + gl/m4/inline.m4 | 40 + gl/m4/intlmacosx.m4 | 56 + gl/m4/intmax_t.m4 | 67 + gl/m4/inttostr.m4 | 32 + gl/m4/inttypes-pri.m4 | 42 + gl/m4/inttypes.m4 | 158 + gl/m4/inttypes_h.m4 | 29 + gl/m4/ioctl.m4 | 41 + gl/m4/isblank.m4 | 17 + gl/m4/isfinite.m4 | 165 + gl/m4/isinf.m4 | 175 + gl/m4/isnand.m4 | 96 + gl/m4/isnanf.m4 | 188 + gl/m4/isnanl.m4 | 255 + gl/m4/iswblank.m4 | 41 + gl/m4/langinfo_h.m4 | 105 + gl/m4/largefile.m4 | 146 + gl/m4/lcmessage.m4 | 35 + gl/m4/lib-ld.m4 | 119 + gl/m4/lib-link.m4 | 777 + gl/m4/lib-prefix.m4 | 224 + gl/m4/libunistring-base.m4 | 141 + gl/m4/localcharset.m4 | 17 + gl/m4/locale-fr.m4 | 250 + gl/m4/locale-ja.m4 | 136 + gl/m4/locale-tr.m4 | 127 + gl/m4/locale-zh.m4 | 130 + gl/m4/locale_h.m4 | 122 + gl/m4/localeconv.m4 | 22 + gl/m4/localename.m4 | 12 + gl/m4/lock.m4 | 42 + gl/m4/longlong.m4 | 113 + gl/m4/ls-mntd-fs.m4 | 357 + gl/m4/lseek.m4 | 71 + gl/m4/lstat.m4 | 73 + gl/m4/malloc.m4 | 98 + gl/m4/malloca.m4 | 15 + gl/m4/manywarnings.m4 | 223 + gl/m4/math_h.m4 | 353 + gl/m4/mathfunc.m4 | 163 + gl/m4/mbchar.m4 | 13 + gl/m4/mbiter.m4 | 14 + gl/m4/mbrtowc.m4 | 572 + gl/m4/mbsinit.m4 | 51 + gl/m4/mbslen.m4 | 16 + gl/m4/mbsrtowcs.m4 | 155 + gl/m4/mbstate_t.m4 | 41 + gl/m4/mbtowc.m4 | 19 + gl/m4/memchr.m4 | 88 + gl/m4/mempcpy.m4 | 26 + gl/m4/memrchr.m4 | 23 + gl/m4/mktime.m4 | 253 + gl/m4/mmap-anon.m4 | 55 + gl/m4/mode_t.m4 | 26 + gl/m4/modechange.m4 | 11 + gl/m4/modf.m4 | 83 + gl/m4/mountlist.m4 | 19 + gl/m4/msvc-inval.m4 | 19 + gl/m4/msvc-nothrow.m4 | 10 + gl/m4/multiarch.m4 | 62 + gl/m4/nanosleep.m4 | 148 + gl/m4/netinet_in_h.m4 | 31 + gl/m4/nl_langinfo.m4 | 50 + gl/m4/nls.m4 | 32 + gl/m4/nocrash.m4 | 130 + gl/m4/off_t.m4 | 18 + gl/m4/onceonly.m4 | 104 + gl/m4/open.m4 | 91 + gl/m4/openat.m4 | 36 + gl/m4/opendir.m4 | 25 + gl/m4/parse-datetime.m4 | 55 + gl/m4/pathmax.m4 | 42 + gl/m4/perror.m4 | 63 + gl/m4/pipe.m4 | 15 + gl/m4/po.m4 | 453 + gl/m4/printf.m4 | 1570 + gl/m4/priv-set.m4 | 15 + gl/m4/progtest.m4 | 91 + gl/m4/putenv.m4 | 56 + gl/m4/quote.m4 | 13 + gl/m4/quotearg.m4 | 10 + gl/m4/raise.m4 | 34 + gl/m4/read.m4 | 26 + gl/m4/readdir.m4 | 15 + gl/m4/readlink.m4 | 71 + gl/m4/readlinkat.m4 | 19 + gl/m4/realloc.m4 | 76 + gl/m4/regex.m4 | 291 + gl/m4/rewinddir.m4 | 15 + gl/m4/rmdir.m4 | 49 + gl/m4/rpmatch.m4 | 31 + gl/m4/safe-read.m4 | 12 + gl/m4/same.m4 | 13 + gl/m4/save-cwd.m4 | 11 + gl/m4/savedir.m4 | 11 + gl/m4/select.m4 | 113 + gl/m4/selinux-context-h.m4 | 22 + gl/m4/selinux-selinux-h.m4 | 71 + gl/m4/setenv.m4 | 160 + gl/m4/setlocale.m4 | 29 + gl/m4/sigaction.m4 | 40 + gl/m4/signal_h.m4 | 83 + gl/m4/signalblocking.m4 | 25 + gl/m4/size_max.m4 | 79 + gl/m4/sleep.m4 | 62 + gl/m4/snprintf.m4 | 54 + gl/m4/socketlib.m4 | 86 + gl/m4/sockets.m4 | 17 + gl/m4/socklen.m4 | 77 + gl/m4/sockpfaf.m4 | 87 + gl/m4/ssize_t.m4 | 23 + gl/m4/st_dm_mode.m4 | 23 + gl/m4/stat-size.m4 | 14 + gl/m4/stat-time.m4 | 83 + gl/m4/stat.m4 | 71 + gl/m4/stdalign.m4 | 53 + gl/m4/stdarg.m4 | 78 + gl/m4/stdbool.m4 | 100 + gl/m4/stddef_h.m4 | 47 + gl/m4/stdint.m4 | 484 + gl/m4/stdint_h.m4 | 27 + gl/m4/stdio_h.m4 | 194 + gl/m4/stdlib_h.m4 | 117 + gl/m4/stpcpy.m4 | 25 + gl/m4/strcase.m4 | 45 + gl/m4/strcasestr.m4 | 142 + gl/m4/strdup.m4 | 36 + gl/m4/strerror.m4 | 96 + gl/m4/strerror_r.m4 | 173 + gl/m4/strftime.m4 | 28 + gl/m4/string_h.m4 | 120 + gl/m4/strings_h.m4 | 52 + gl/m4/strndup.m4 | 55 + gl/m4/strnlen.m4 | 30 + gl/m4/strstr.m4 | 130 + gl/m4/strtol.m4 | 10 + gl/m4/strtoul.m4 | 10 + gl/m4/strtoull.m4 | 24 + gl/m4/strtoumax.m4 | 28 + gl/m4/symlink.m4 | 53 + gl/m4/symlinkat.m4 | 20 + gl/m4/sys_ioctl_h.m4 | 64 + gl/m4/sys_select_h.m4 | 95 + gl/m4/sys_socket_h.m4 | 176 + gl/m4/sys_stat_h.m4 | 96 + gl/m4/sys_time_h.m4 | 110 + gl/m4/sys_types_h.m4 | 24 + gl/m4/sys_uio_h.m4 | 31 + gl/m4/sys_utsname_h.m4 | 54 + gl/m4/sys_wait_h.m4 | 36 + gl/m4/thread.m4 | 17 + gl/m4/threadlib.m4 | 371 + gl/m4/time_h.m4 | 118 + gl/m4/time_r.m4 | 58 + gl/m4/timespec.m4 | 11 + gl/m4/tm_gmtoff.m4 | 14 + gl/m4/trunc.m4 | 95 + gl/m4/uname.m4 | 19 + gl/m4/ungetc.m4 | 46 + gl/m4/unistd-safer.m4 | 10 + gl/m4/unistd_h.m4 | 187 + gl/m4/unlink.m4 | 130 + gl/m4/unlinkat.m4 | 33 + gl/m4/unlinkdir.m4 | 32 + gl/m4/vasnprintf.m4 | 291 + gl/m4/version-etc.m4 | 33 + gl/m4/warn-on-use.m4 | 47 + gl/m4/warnings.m4 | 79 + gl/m4/wchar_h.m4 | 225 + gl/m4/wchar_t.m4 | 24 + gl/m4/wcrtomb.m4 | 112 + gl/m4/wctob.m4 | 127 + gl/m4/wctomb.m4 | 19 + gl/m4/wctype_h.m4 | 209 + gl/m4/wcwidth.m4 | 101 + gl/m4/wint_t.m4 | 32 + gl/m4/xalloc.m4 | 7 + gl/m4/xgetcwd.m4 | 10 + gl/m4/xsize.m4 | 12 + gl/m4/xstrndup.m4 | 15 + gl/m4/xstrtod.m4 | 18 + gl/m4/xstrtol.m4 | 10 + gl/m4/yesno.m4 | 12 + gl/m4/yield.m4 | 19 + gnulib/Makefile.in | 1551 - gnulib/lib/Makefile.am | 3038 -- gnulib/lib/Makefile.in | 3265 -- gnulib/lib/alloca.c | 491 - gnulib/lib/alloca.in.h | 56 - gnulib/lib/areadlink-with-size.c | 104 - gnulib/lib/areadlink.c | 131 - gnulib/lib/areadlink.h | 33 - gnulib/lib/areadlinkat.c | 145 - gnulib/lib/argmatch.c | 277 - gnulib/lib/argmatch.h | 102 - gnulib/lib/asnprintf.c | 35 - gnulib/lib/at-func.c | 131 - gnulib/lib/basename-lgpl.c | 75 - gnulib/lib/basename.c | 58 - gnulib/lib/bitrotate.h | 126 - gnulib/lib/btowc.c | 39 - gnulib/lib/c-ctype.c | 396 - gnulib/lib/c-ctype.h | 295 - gnulib/lib/c-strcase.h | 56 - gnulib/lib/c-strcasecmp.c | 57 - gnulib/lib/c-strcasestr.c | 77 - gnulib/lib/c-strcasestr.h | 36 - gnulib/lib/c-strncasecmp.c | 57 - gnulib/lib/c-strstr.c | 32 - gnulib/lib/c-strstr.h | 44 - gnulib/lib/canonicalize.c | 290 - gnulib/lib/canonicalize.h | 41 - gnulib/lib/chdir-long.c | 266 - gnulib/lib/chdir-long.h | 34 - gnulib/lib/chown.c | 156 - gnulib/lib/cloexec.c | 83 - gnulib/lib/cloexec.h | 38 - gnulib/lib/close-hook.c | 91 - gnulib/lib/close-hook.h | 72 - gnulib/lib/close-stream.c | 78 - gnulib/lib/close.c | 42 - gnulib/lib/closein.c | 111 - gnulib/lib/closein.h | 32 - gnulib/lib/closeout.c | 124 - gnulib/lib/closeout.h | 36 - gnulib/lib/config.charset | 683 - gnulib/lib/creat-safer.c | 31 - gnulib/lib/ctype.in.h | 58 - gnulib/lib/cycle-check.c | 85 - gnulib/lib/cycle-check.h | 52 - gnulib/lib/dirent--.h | 23 - gnulib/lib/dirent-safer.h | 22 - gnulib/lib/dirent.in.h | 172 - gnulib/lib/dirfd.c | 32 - gnulib/lib/dirname-lgpl.c | 86 - gnulib/lib/dirname.c | 38 - gnulib/lib/dirname.h | 46 - gnulib/lib/dosname.h | 53 - gnulib/lib/dup-safer.c | 34 - gnulib/lib/dup2.c | 132 - gnulib/lib/errno.in.h | 167 - gnulib/lib/error.c | 394 - gnulib/lib/error.h | 65 - gnulib/lib/euidaccess.c | 222 - gnulib/lib/exitfail.c | 24 - gnulib/lib/exitfail.h | 18 - gnulib/lib/faccessat.c | 44 - gnulib/lib/fchdir.c | 287 - gnulib/lib/fchmodat.c | 53 - gnulib/lib/fchown-stub.c | 16 - gnulib/lib/fchownat.c | 114 - gnulib/lib/fclose.c | 47 - gnulib/lib/fcntl--.h | 32 - gnulib/lib/fcntl-safer.h | 27 - gnulib/lib/fcntl.c | 308 - gnulib/lib/fcntl.in.h | 308 - gnulib/lib/fd-safer.c | 49 - gnulib/lib/fdopendir.c | 204 - gnulib/lib/fflush.c | 218 - gnulib/lib/file-set.c | 74 - gnulib/lib/file-set.h | 12 - gnulib/lib/fileblocks.c | 74 - gnulib/lib/filemode.c | 180 - gnulib/lib/filemode.h | 44 - gnulib/lib/float+.h | 148 - gnulib/lib/float.in.h | 63 - gnulib/lib/fnmatch.c | 353 - gnulib/lib/fnmatch.in.h | 68 - gnulib/lib/fnmatch_loop.c | 1214 - gnulib/lib/fopen-safer.c | 63 - gnulib/lib/fopen.c | 105 - gnulib/lib/fpending.c | 30 - gnulib/lib/fpending.h | 34 - gnulib/lib/fpurge.c | 137 - gnulib/lib/freadahead.c | 85 - gnulib/lib/freadahead.h | 38 - gnulib/lib/freading.c | 68 - gnulib/lib/freading.h | 53 - gnulib/lib/fseeko.c | 146 - gnulib/lib/fstatat.c | 110 - gnulib/lib/ftello.c | 77 - gnulib/lib/fts-cycle.c | 160 - gnulib/lib/fts.c | 2013 - gnulib/lib/fts_.h | 266 - gnulib/lib/getcwd.c | 438 - gnulib/lib/getdelim.c | 137 - gnulib/lib/getdtablesize.c | 63 - gnulib/lib/getfilecon.c | 87 - gnulib/lib/getgroups.c | 116 - gnulib/lib/getline.c | 29 - gnulib/lib/getopt.c | 1192 - gnulib/lib/getopt.in.h | 253 - gnulib/lib/getopt1.c | 170 - gnulib/lib/getopt_int.h | 135 - gnulib/lib/gettext.h | 286 - gnulib/lib/gettime.c | 48 - gnulib/lib/gettimeofday.c | 144 - gnulib/lib/group-member.c | 125 - gnulib/lib/group-member.h | 25 - gnulib/lib/hash-pjw.c | 40 - gnulib/lib/hash-pjw.h | 23 - gnulib/lib/hash-triple.c | 77 - gnulib/lib/hash-triple.h | 22 - gnulib/lib/hash.c | 1222 - gnulib/lib/hash.h | 92 - gnulib/lib/human.c | 470 - gnulib/lib/human.h | 83 - gnulib/lib/i-ring.c | 68 - gnulib/lib/i-ring.h | 44 - gnulib/lib/idcache.c | 227 - gnulib/lib/intprops.h | 86 - gnulib/lib/inttypes.in.h | 1108 - gnulib/lib/isblank.c | 33 - gnulib/lib/iswblank.c | 27 - gnulib/lib/langinfo.in.h | 177 - gnulib/lib/lchown.c | 117 - gnulib/lib/localcharset.c | 547 - gnulib/lib/localcharset.h | 41 - gnulib/lib/locale.in.h | 96 - gnulib/lib/lseek.c | 62 - gnulib/lib/lstat.c | 91 - gnulib/lib/malloc.c | 60 - gnulib/lib/malloca.c | 141 - gnulib/lib/malloca.h | 134 - gnulib/lib/math.in.h | 810 - gnulib/lib/mbchar.c | 35 - gnulib/lib/mbchar.h | 350 - gnulib/lib/mbrtowc.c | 396 - gnulib/lib/mbscasestr.c | 412 - gnulib/lib/mbsinit.c | 61 - gnulib/lib/mbslen.c | 44 - gnulib/lib/mbsrtowcs-impl.h | 122 - gnulib/lib/mbsrtowcs-state.c | 37 - gnulib/lib/mbsrtowcs.c | 32 - gnulib/lib/mbsstr.c | 382 - gnulib/lib/mbtowc-impl.h | 44 - gnulib/lib/mbtowc.c | 26 - gnulib/lib/mbuiter.h | 222 - gnulib/lib/memchr.c | 172 - gnulib/lib/mempcpy.c | 29 - gnulib/lib/memrchr.c | 161 - gnulib/lib/mkdir.c | 93 - gnulib/lib/mkdirat.c | 34 - gnulib/lib/mktime.c | 737 - gnulib/lib/modechange.c | 385 - gnulib/lib/modechange.h | 30 - gnulib/lib/mountlist.c | 951 - gnulib/lib/mountlist.h | 40 - gnulib/lib/nl_langinfo.c | 270 - gnulib/lib/open-safer.c | 46 - gnulib/lib/open.c | 167 - gnulib/lib/openat-die.c | 62 - gnulib/lib/openat-priv.h | 64 - gnulib/lib/openat-proc.c | 111 - gnulib/lib/openat-safer.c | 46 - gnulib/lib/openat.c | 265 - gnulib/lib/openat.h | 98 - gnulib/lib/opendir-safer.c | 68 - gnulib/lib/parse-datetime.c | 3505 -- gnulib/lib/parse-datetime.h | 22 - gnulib/lib/parse-datetime.y | 1580 - gnulib/lib/pathmax.h | 48 - gnulib/lib/perror.c | 35 - gnulib/lib/pipe-safer.c | 56 - gnulib/lib/printf-args.c | 188 - gnulib/lib/printf-args.h | 159 - gnulib/lib/printf-parse.c | 639 - gnulib/lib/printf-parse.h | 194 - gnulib/lib/progname.c | 92 - gnulib/lib/progname.h | 62 - gnulib/lib/quote.c | 40 - gnulib/lib/quote.h | 20 - gnulib/lib/quotearg.c | 888 - gnulib/lib/quotearg.h | 389 - gnulib/lib/readlink.c | 74 - gnulib/lib/readlinkat.c | 47 - gnulib/lib/realloc.c | 91 - gnulib/lib/ref-add.sin | 30 - gnulib/lib/ref-del.sin | 25 - gnulib/lib/regcomp.c | 3876 -- gnulib/lib/regex.c | 71 - gnulib/lib/regex.h | 675 - gnulib/lib/regex_internal.c | 1741 - gnulib/lib/regex_internal.h | 870 - gnulib/lib/regexec.c | 4417 -- gnulib/lib/rmdir.c | 53 - gnulib/lib/rpmatch.c | 173 - gnulib/lib/same-inode.h | 25 - gnulib/lib/same.c | 123 - gnulib/lib/same.h | 25 - gnulib/lib/save-cwd.c | 98 - gnulib/lib/save-cwd.h | 34 - gnulib/lib/savedir.c | 145 - gnulib/lib/savedir.h | 29 - gnulib/lib/se-context.in.h | 28 - gnulib/lib/se-selinux.in.h | 97 - gnulib/lib/selinux-at.c | 72 - gnulib/lib/selinux-at.h | 52 - gnulib/lib/setenv.c | 390 - gnulib/lib/size_max.h | 31 - gnulib/lib/snprintf.c | 72 - gnulib/lib/stat-time.h | 187 - gnulib/lib/stat.c | 105 - gnulib/lib/stdarg.in.h | 36 - gnulib/lib/stdbool.in.h | 122 - gnulib/lib/stddef.in.h | 87 - gnulib/lib/stdint.in.h | 592 - gnulib/lib/stdio--.h | 41 - gnulib/lib/stdio-impl.h | 110 - gnulib/lib/stdio-safer.h | 36 - gnulib/lib/stdio.in.h | 1163 - gnulib/lib/stdlib.in.h | 759 - gnulib/lib/stpcpy.c | 49 - gnulib/lib/str-kmp.h | 154 - gnulib/lib/str-two-way.h | 453 - gnulib/lib/strcasecmp.c | 63 - gnulib/lib/strcasestr.c | 83 - gnulib/lib/strdup.c | 55 - gnulib/lib/streq.h | 176 - gnulib/lib/strerror.c | 356 - gnulib/lib/strftime.c | 1469 - gnulib/lib/strftime.h | 34 - gnulib/lib/string.in.h | 970 - gnulib/lib/strings.in.h | 94 - gnulib/lib/stripslash.c | 45 - gnulib/lib/strncasecmp.c | 63 - gnulib/lib/strndup.c | 37 - gnulib/lib/strnlen.c | 31 - gnulib/lib/strnlen1.c | 35 - gnulib/lib/strnlen1.h | 39 - gnulib/lib/strstr.c | 83 - gnulib/lib/strtoimax.c | 75 - gnulib/lib/strtol.c | 434 - gnulib/lib/strtoll.c | 33 - gnulib/lib/strtoul.c | 19 - gnulib/lib/strtoull.c | 26 - gnulib/lib/sys_stat.in.h | 658 - gnulib/lib/sys_time.in.h | 101 - gnulib/lib/sys_wait.in.h | 130 - gnulib/lib/time.in.h | 249 - gnulib/lib/time_r.c | 45 - gnulib/lib/timespec.h | 63 - gnulib/lib/unistd--.h | 32 - gnulib/lib/unistd-safer.h | 31 - gnulib/lib/unistd.in.h | 1381 - gnulib/lib/unitypes.in.h | 26 - gnulib/lib/uniwidth.in.h | 65 - gnulib/lib/uniwidth/cjk.h | 37 - gnulib/lib/uniwidth/width.c | 368 - gnulib/lib/unlink.c | 97 - gnulib/lib/unlinkat.c | 106 - gnulib/lib/unsetenv.c | 120 - gnulib/lib/vasnprintf.c | 5578 --- gnulib/lib/vasnprintf.h | 80 - gnulib/lib/verify.h | 163 - gnulib/lib/version-etc-fsf.c | 30 - gnulib/lib/version-etc.c | 258 - gnulib/lib/version-etc.h | 78 - gnulib/lib/wchar.in.h | 990 - gnulib/lib/wcrtomb.c | 53 - gnulib/lib/wctype.in.h | 470 - gnulib/lib/wcwidth.c | 50 - gnulib/lib/xalloc-die.c | 41 - gnulib/lib/xalloc.h | 292 - gnulib/lib/xgetcwd.c | 41 - gnulib/lib/xgetcwd.h | 17 - gnulib/lib/xmalloc.c | 124 - gnulib/lib/xsize.h | 108 - gnulib/lib/xstrndup.c | 36 - gnulib/lib/xstrndup.h | 23 - gnulib/lib/xstrtod.c | 71 - gnulib/lib/xstrtod.h | 31 - gnulib/lib/xstrtol-error.c | 98 - gnulib/lib/xstrtol.c | 228 - gnulib/lib/xstrtol.h | 79 - gnulib/lib/yesno.c | 60 - gnulib/lib/yesno.h | 24 - gnulib/m4/00gnulib.m4 | 30 - gnulib/m4/alloca.m4 | 43 - gnulib/m4/argmatch.m4 | 10 - gnulib/m4/assert.m4 | 24 - gnulib/m4/bison.m4 | 24 - gnulib/m4/btowc.m4 | 121 - gnulib/m4/canonicalize.m4 | 94 - gnulib/m4/chdir-long.m4 | 39 - gnulib/m4/chown.m4 | 144 - gnulib/m4/clock_time.m4 | 31 - gnulib/m4/cloexec.m4 | 10 - gnulib/m4/close-stream.m4 | 13 - gnulib/m4/close.m4 | 26 - gnulib/m4/closein.m4 | 13 - gnulib/m4/closeout.m4 | 14 - gnulib/m4/codeset.m4 | 23 - gnulib/m4/configmake.m4 | 50 - gnulib/m4/ctype.m4 | 32 - gnulib/m4/cycle-check.m4 | 11 - gnulib/m4/d-ino.m4 | 46 - gnulib/m4/d-type.m4 | 32 - gnulib/m4/dirent-safer.m4 | 11 - gnulib/m4/dirent_h.m4 | 57 - gnulib/m4/dirfd.m4 | 81 - gnulib/m4/dirname.m4 | 25 - gnulib/m4/double-slash-root.m4 | 38 - gnulib/m4/dup2.m4 | 70 - gnulib/m4/eealloc.m4 | 32 - gnulib/m4/environ.m4 | 38 - gnulib/m4/errno_h.m4 | 118 - gnulib/m4/error.m4 | 39 - gnulib/m4/euidaccess.m4 | 53 - gnulib/m4/extensions.m4 | 118 - gnulib/m4/faccessat.m4 | 23 - gnulib/m4/fchdir.m4 | 53 - gnulib/m4/fclose.m4 | 16 - gnulib/m4/fcntl-o.m4 | 112 - gnulib/m4/fcntl-safer.m4 | 19 - gnulib/m4/fcntl.m4 | 88 - gnulib/m4/fcntl_h.m4 | 43 - gnulib/m4/fdopendir.m4 | 49 - gnulib/m4/fflush.m4 | 81 - gnulib/m4/fileblocks.m4 | 20 - gnulib/m4/filemode.m4 | 12 - gnulib/m4/flexmember.m4 | 41 - gnulib/m4/float_h.m4 | 19 - gnulib/m4/fnmatch.m4 | 150 - gnulib/m4/fopen.m4 | 65 - gnulib/m4/fpending.m4 | 83 - gnulib/m4/fpurge.m4 | 45 - gnulib/m4/freading.m4 | 10 - gnulib/m4/fseeko.m4 | 75 - gnulib/m4/fstypename.m4 | 23 - gnulib/m4/ftell.m4 | 16 - gnulib/m4/ftello.m4 | 135 - gnulib/m4/fts.m4 | 27 - gnulib/m4/getcwd-abort-bug.m4 | 106 - gnulib/m4/getcwd-path-max.m4 | 188 - gnulib/m4/getcwd.m4 | 85 - gnulib/m4/getdelim.m4 | 90 - gnulib/m4/getdtablesize.m4 | 15 - gnulib/m4/getgroups.m4 | 43 - gnulib/m4/getline.m4 | 97 - gnulib/m4/getopt.m4 | 321 - gnulib/m4/getpagesize.m4 | 33 - gnulib/m4/gettext.m4 | 401 - gnulib/m4/gettime.m4 | 15 - gnulib/m4/gettimeofday.m4 | 120 - gnulib/m4/getugroups.m4 | 12 - gnulib/m4/glibc21.m4 | 34 - gnulib/m4/gnulib-cache.m4 | 135 - gnulib/m4/gnulib-common.m4 | 235 - gnulib/m4/gnulib-comp.m4 | 1978 - gnulib/m4/group-member.m4 | 28 - gnulib/m4/hash.m4 | 14 - gnulib/m4/human.m4 | 13 - gnulib/m4/i-ring.m4 | 10 - gnulib/m4/iconv.m4 | 214 - gnulib/m4/idcache.m4 | 11 - gnulib/m4/include_next.m4 | 244 - gnulib/m4/inline.m4 | 40 - gnulib/m4/intlmacosx.m4 | 56 - gnulib/m4/intmax_t.m4 | 67 - gnulib/m4/inttostr.m4 | 32 - gnulib/m4/inttypes-pri.m4 | 42 - gnulib/m4/inttypes.m4 | 302 - gnulib/m4/inttypes_h.m4 | 29 - gnulib/m4/isblank.m4 | 18 - gnulib/m4/iswblank.m4 | 31 - gnulib/m4/langinfo_h.m4 | 105 - gnulib/m4/lchown.m4 | 29 - gnulib/m4/lcmessage.m4 | 35 - gnulib/m4/lib-ld.m4 | 109 - gnulib/m4/lib-link.m4 | 777 - gnulib/m4/lib-prefix.m4 | 224 - gnulib/m4/libunistring-base.m4 | 141 - gnulib/m4/localcharset.m4 | 17 - gnulib/m4/locale-fr.m4 | 246 - gnulib/m4/locale-ja.m4 | 135 - gnulib/m4/locale-tr.m4 | 127 - gnulib/m4/locale-zh.m4 | 124 - gnulib/m4/locale_h.m4 | 101 - gnulib/m4/localename.m4 | 12 - gnulib/m4/lock.m4 | 41 - gnulib/m4/longlong.m4 | 113 - gnulib/m4/ls-mntd-fs.m4 | 353 - gnulib/m4/lseek.m4 | 49 - gnulib/m4/lstat.m4 | 69 - gnulib/m4/malloc.m4 | 66 - gnulib/m4/malloca.m4 | 15 - gnulib/m4/math_h.m4 | 146 - gnulib/m4/mathfunc.m4 | 122 - gnulib/m4/mbchar.m4 | 14 - gnulib/m4/mbiter.m4 | 15 - gnulib/m4/mbrtowc.m4 | 564 - gnulib/m4/mbsinit.m4 | 40 - gnulib/m4/mbslen.m4 | 16 - gnulib/m4/mbsrtowcs.m4 | 145 - gnulib/m4/mbstate_t.m4 | 41 - gnulib/m4/mbtowc.m4 | 23 - gnulib/m4/memchr.m4 | 88 - gnulib/m4/mempcpy.m4 | 27 - gnulib/m4/memrchr.m4 | 26 - gnulib/m4/mgetgroups.m4 | 11 - gnulib/m4/mkdir.m4 | 52 - gnulib/m4/mktime.m4 | 241 - gnulib/m4/mmap-anon.m4 | 55 - gnulib/m4/mode_t.m4 | 26 - gnulib/m4/modechange.m4 | 11 - gnulib/m4/mountlist.m4 | 23 - gnulib/m4/multiarch.m4 | 62 - gnulib/m4/nl_langinfo.m4 | 52 - gnulib/m4/nls.m4 | 32 - gnulib/m4/onceonly.m4 | 91 - gnulib/m4/open.m4 | 81 - gnulib/m4/openat.m4 | 171 - gnulib/m4/parse-datetime.m4 | 55 - gnulib/m4/pathmax.m4 | 13 - gnulib/m4/perror.m4 | 17 - gnulib/m4/po.m4 | 449 - gnulib/m4/printf.m4 | 1481 - gnulib/m4/priv-set.m4 | 16 - gnulib/m4/progtest.m4 | 91 - gnulib/m4/putenv.m4 | 41 - gnulib/m4/quote.m4 | 14 - gnulib/m4/quotearg.m4 | 10 - gnulib/m4/readlink.m4 | 62 - gnulib/m4/readlinkat.m4 | 21 - gnulib/m4/realloc.m4 | 44 - gnulib/m4/regex.m4 | 225 - gnulib/m4/rmdir.m4 | 35 - gnulib/m4/rpmatch.m4 | 32 - gnulib/m4/same.m4 | 15 - gnulib/m4/save-cwd.m4 | 12 - gnulib/m4/savedir.m4 | 11 - gnulib/m4/selinux-context-h.m4 | 21 - gnulib/m4/selinux-selinux-h.m4 | 70 - gnulib/m4/setenv.m4 | 149 - gnulib/m4/setlocale.m4 | 27 - gnulib/m4/size_max.m4 | 79 - gnulib/m4/sleep.m4 | 54 - gnulib/m4/snprintf.m4 | 45 - gnulib/m4/ssize_t.m4 | 23 - gnulib/m4/st_dm_mode.m4 | 23 - gnulib/m4/stat-time.m4 | 85 - gnulib/m4/stat.m4 | 66 - gnulib/m4/stdarg.m4 | 75 - gnulib/m4/stdbool.m4 | 99 - gnulib/m4/stddef_h.m4 | 45 - gnulib/m4/stdint.m4 | 479 - gnulib/m4/stdint_h.m4 | 27 - gnulib/m4/stdio-safer.m4 | 25 - gnulib/m4/stdio_h.m4 | 140 - gnulib/m4/stdlib_h.m4 | 105 - gnulib/m4/stpcpy.m4 | 26 - gnulib/m4/strcase.m4 | 44 - gnulib/m4/strcasestr.m4 | 143 - gnulib/m4/strdup.m4 | 45 - gnulib/m4/strerror.m4 | 68 - gnulib/m4/strftime.m4 | 30 - gnulib/m4/string_h.m4 | 115 - gnulib/m4/strings_h.m4 | 39 - gnulib/m4/strndup.m4 | 53 - gnulib/m4/strnlen.m4 | 32 - gnulib/m4/strstr.m4 | 127 - gnulib/m4/strtoimax.m4 | 30 - gnulib/m4/strtol.m4 | 10 - gnulib/m4/strtoll.m4 | 25 - gnulib/m4/strtoul.m4 | 10 - gnulib/m4/strtoull.m4 | 25 - gnulib/m4/strtoumax.m4 | 30 - gnulib/m4/symlink.m4 | 45 - gnulib/m4/symlinkat.m4 | 21 - gnulib/m4/sys_stat_h.m4 | 82 - gnulib/m4/sys_time_h.m4 | 72 - gnulib/m4/sys_wait_h.m4 | 33 - gnulib/m4/thread.m4 | 18 - gnulib/m4/threadlib.m4 | 369 - gnulib/m4/time_h.m4 | 109 - gnulib/m4/time_r.m4 | 62 - gnulib/m4/timespec.m4 | 15 - gnulib/m4/tm_gmtoff.m4 | 14 - gnulib/m4/ungetc.m4 | 36 - gnulib/m4/unistd-safer.m4 | 13 - gnulib/m4/unistd_h.m4 | 162 - gnulib/m4/unlink.m4 | 113 - gnulib/m4/unlinkdir.m4 | 34 - gnulib/m4/usleep.m4 | 37 - gnulib/m4/vasnprintf.m4 | 289 - gnulib/m4/version-etc.m4 | 33 - gnulib/m4/warn-on-use.m4 | 45 - gnulib/m4/warnings.m4 | 36 - gnulib/m4/wchar_h.m4 | 232 - gnulib/m4/wchar_t.m4 | 24 - gnulib/m4/wcrtomb.m4 | 101 - gnulib/m4/wctob.m4 | 133 - gnulib/m4/wctomb.m4 | 23 - gnulib/m4/wctype_h.m4 | 174 - gnulib/m4/wcwidth.m4 | 102 - gnulib/m4/wint_t.m4 | 32 - gnulib/m4/xalloc.m4 | 24 - gnulib/m4/xgetcwd.m4 | 12 - gnulib/m4/xsize.m4 | 13 - gnulib/m4/xstrndup.m4 | 15 - gnulib/m4/xstrtod.m4 | 18 - gnulib/m4/xstrtol.m4 | 12 - gnulib/m4/yesno.m4 | 14 - gnulib/m4/yield.m4 | 19 - import-gnulib.config | 17 +- import-gnulib.sh | 244 +- lib/Makefile.am | 43 +- lib/Makefile.in | 948 +- lib/arg-max.h | 49 - lib/buildcmd.c | 76 +- lib/buildcmd.h | 22 +- lib/dircallback.c | 17 +- lib/dircallback.h | 4 +- lib/extendbuf.c | 13 +- lib/extendbuf.h | 2 +- lib/fdleak.c | 50 +- lib/fdleak.h | 2 +- lib/findutils-version.c | 26 +- lib/findutils-version.h | 2 +- lib/forcefindlib.c | 2 +- lib/gnulib-version.c | 2 - lib/gnulib-version.h | 18 - lib/listfile.c | 455 +- lib/listfile.h | 8 +- lib/nextelem.c | 85 - lib/nextelem.h | 26 - lib/printquoted.c | 14 +- lib/printquoted.h | 9 +- lib/qmark.c | 28 +- lib/regexprops.c | 15 +- lib/regextype.c | 21 +- lib/regextype.h | 2 +- lib/safe-atoi.c | 15 +- lib/safe-atoi.h | 2 +- lib/savedirinfo.c | 281 - lib/savedirinfo.h | 73 - lib/splitstring.c | 65 + lib/splitstring.h | 40 + lib/test_splitstring.c | 208 + lib/unused-result.h | 6 +- lib/waitpid.c | 11 +- locate/Makefile.am | 23 +- locate/Makefile.in | 972 +- locate/bigram.c | 48 +- locate/code.c | 37 +- locate/frcode.c | 40 +- locate/locate.1 | 40 +- locate/locate.c | 1447 +- locate/locatedb.5 | 2 +- locate/locatedb.h | 8 +- locate/testsuite/Makefile.am | 6 +- locate/testsuite/Makefile.in | 839 +- locate/testsuite/config/unix.exp | 18 +- locate/testsuite/locate.gnu/bigendian.exp | 2 +- locate/testsuite/locate.gnu/bigprefix1.exp | 2 +- locate/testsuite/locate.gnu/exists2.exp | 2 +- locate/testsuite/locate.gnu/exists3.exp | 2 +- locate/testsuite/locate.gnu/littleendian.exp | 2 +- locate/testsuite/locate.gnu/notexists2.exp | 2 +- locate/testsuite/locate.gnu/notexists3.exp | 2 +- locate/testsuite/locate.gnu/oldformat.exp | 12 + locate/testsuite/locate.gnu/oldformat.xo | 1 + locate/testsuite/locate.gnu/slocate.exp | 9 + locate/testsuite/locate.gnu/slocate.xo | 3 + locate/testsuite/locate.gnu/sv-bug-14535.exp | 6 +- locate/updatedb.1 | 14 +- locate/updatedb.sh | 79 +- locate/word_io.c | 20 +- m4/Makefile.in | 814 +- m4/noreturn.m4 | 2 +- m4/nullsort.m4 | 2 +- maint.mk | 742 +- po/Makevars | 2 +- po/POTFILES.in | 38 +- po/be.gmo | Bin 2466 -> 2742 bytes po/be.po | 1112 +- po/bg.gmo | Bin 28084 -> 26452 bytes po/bg.po | 1130 +- po/ca.gmo | Bin 10785 -> 10798 bytes po/ca.po | 1124 +- po/cs.gmo | Bin 33041 -> 40790 bytes po/cs.po | 1327 +- po/da.gmo | Bin 31629 -> 29228 bytes po/da.po | 1137 +- po/de.gmo | Bin 25362 -> 41158 bytes po/de.po | 1588 +- po/el.gmo | Bin 6357 -> 49327 bytes po/el.po | 1776 +- po/eo.gmo | Bin 2384 -> 38647 bytes po/eo.po | 1680 +- po/es.gmo | Bin 5074 -> 5505 bytes po/es.po | 1198 +- po/et.gmo | Bin 30559 -> 37384 bytes po/et.po | 1444 +- po/fi.gmo | Bin 33350 -> 40917 bytes po/fi.po | 1346 +- po/findutils.pot | 1003 +- po/fr.gmo | Bin 32973 -> 41657 bytes po/fr.po | 1829 +- po/ga.gmo | Bin 26380 -> 25110 bytes po/ga.po | 1136 +- po/gl.gmo | Bin 2425 -> 27751 bytes po/gl.po | 1622 +- po/hr.gmo | Bin 2388 -> 29150 bytes po/hr.po | 1607 +- po/hu.gmo | Bin 26427 -> 25236 bytes po/hu.po | 1132 +- po/id.gmo | Bin 25269 -> 23992 bytes po/id.po | 1127 +- po/it.gmo | Bin 32431 -> 39537 bytes po/it.po | 1181 +- po/ja.gmo | Bin 35559 -> 32775 bytes po/ja.po | 1120 +- po/ko.gmo | Bin 1983 -> 1983 bytes po/ko.po | 1084 +- po/lg.gmo | Bin 2735 -> 3234 bytes po/lg.po | 1105 +- po/lt.gmo | Bin 7573 -> 8104 bytes po/lt.po | 1062 +- po/ms.gmo | Bin 1491 -> 1744 bytes po/ms.po | 1064 +- po/nl.gmo | Bin 32462 -> 39370 bytes po/nl.po | 1200 +- po/pl.gmo | Bin 31963 -> 39882 bytes po/pl.po | 1587 +- po/pt.gmo | Bin 19683 -> 18449 bytes po/pt.po | 1130 +- po/pt_BR.gmo | Bin 2468 -> 40188 bytes po/pt_BR.po | 1765 +- po/ro.gmo | Bin 9343 -> 9270 bytes po/ro.po | 1112 +- po/ru.gmo | Bin 41764 -> 51053 bytes po/ru.po | 1393 +- po/rw.gmo | Bin 518 -> 538 bytes po/rw.po | 1105 +- po/sk.gmo | Bin 9441 -> 9335 bytes po/sk.po | 1104 +- po/sl.gmo | Bin 31967 -> 39433 bytes po/sl.po | 1230 +- po/sr.gmo | Bin 5939 -> 51385 bytes po/sr.po | 1804 +- po/sv.gmo | Bin 24974 -> 23605 bytes po/sv.po | 1132 +- po/tr.gmo | Bin 21329 -> 39565 bytes po/tr.po | 1456 +- po/uk.gmo | Bin 26465 -> 51233 bytes po/uk.po | 1515 +- po/vi.gmo | Bin 37299 -> 42296 bytes po/vi.po | 1754 +- po/zh_CN.gmo | Bin 29911 -> 30489 bytes po/zh_CN.po | 1251 +- po/zh_TW.gmo | Bin 7884 -> 7832 bytes po/zh_TW.po | 1106 +- tests/Makefile.am | 1197 +- tests/Makefile.in | 2927 +- tests/accept.c | 52 + tests/anytostr.c | 4 +- tests/arpa_inet.in.h | 140 + tests/at-func.c | 146 + tests/binary-io.c | 3 + tests/binary-io.h | 53 +- tests/bind.c | 49 + tests/connect.c | 56 + tests/dup-safer-flag.c | 4 +- tests/fd-safer-flag.c | 2 +- tests/fdopen.c | 69 + tests/fpucw.h | 108 + tests/ftell.c | 38 - tests/ftruncate.c | 188 + tests/getpagesize.c | 4 +- tests/getugroups.c | 125 - tests/getugroups.h | 19 - tests/glthread/lock.c | 1058 - tests/glthread/lock.h | 927 - tests/glthread/thread.c | 24 +- tests/glthread/thread.h | 64 +- tests/glthread/threadlib.c | 74 - tests/glthread/yield.h | 10 +- tests/ignore-value.h | 40 +- tests/inet_pton.c | 268 + tests/infinity.h | 60 + tests/init.sh | 149 +- tests/inttostr.h | 2 +- tests/ioctl.c | 88 + tests/listen.c | 49 + tests/localename.c | 229 +- tests/localename.h | 20 +- tests/macros.h | 15 +- tests/mgetgroups.c | 206 - tests/mgetgroups.h | 20 - tests/minus-zero.h | 74 + tests/nan.h | 70 + tests/nanosleep.c | 274 + tests/nap.h | 137 +- tests/netinet_in.in.h | 47 + tests/pipe.c | 50 + tests/priv-set.c | 5 +- tests/priv-set.h | 24 +- tests/putenv.c | 110 +- tests/raise.c | 79 + tests/randomd.c | 1028 + tests/select.c | 547 + tests/setlocale.c | 4 +- tests/setsockopt.c | 65 + tests/sig-handler.c | 3 + tests/sig-handler.h | 54 + tests/sigaction.c | 204 + tests/signal.in.h | 461 + tests/signature.h | 2 +- tests/sigprocmask.c | 349 + tests/sleep.c | 4 +- tests/socket.c | 49 + tests/symlink.c | 2 +- tests/symlinkat.c | 2 +- tests/sys_ioctl.in.h | 78 + tests/sys_select.in.h | 313 + tests/test-accept.c | 56 + tests/test-alloca-opt.c | 4 +- tests/test-areadlink-with-size.c | 2 +- tests/test-areadlink.c | 2 +- tests/test-areadlink.h | 2 +- tests/test-areadlinkat.c | 2 +- tests/test-argmatch.c | 10 +- tests/test-arpa_inet.c | 27 + tests/test-binary-io.c | 37 +- tests/test-binary-io.sh | 7 +- tests/test-bind.c | 58 + tests/test-bitrotate.c | 2 +- tests/test-btowc.c | 2 +- tests/test-byteswap.c | 32 + tests/test-c-ctype.c | 2 +- tests/test-c-strcasecmp.c | 2 +- tests/test-c-strcasestr.c | 2 +- tests/test-c-strncasecmp.c | 2 +- tests/test-c-strstr.c | 2 +- tests/test-canonicalize.c | 14 +- tests/test-chdir.c | 33 + tests/test-chown.c | 49 - tests/test-chown.h | 209 - tests/test-cloexec.c | 13 +- tests/test-close.c | 45 + tests/test-closein.c | 5 +- tests/test-closein.sh | 40 +- tests/test-connect.c | 60 + tests/test-ctype.c | 2 +- tests/test-dirent-safer.c | 2 +- tests/test-dirent.c | 2 +- tests/test-dirname.c | 14 +- tests/test-dup-safer.c | 14 +- tests/test-dup.c | 45 + tests/test-dup2.c | 30 +- tests/test-environ.c | 2 +- tests/test-errno.c | 4 +- tests/test-faccessat.c | 46 + tests/test-fchdir.c | 29 +- tests/test-fchownat.c | 82 - tests/test-fcntl-h.c | 104 +- tests/test-fcntl-safer.c | 2 +- tests/test-fcntl.c | 92 +- tests/test-fdopen.c | 49 + tests/test-fdopendir.c | 21 +- tests/test-fflush.c | 50 +- tests/test-fflush2.c | 2 +- tests/test-fgetc.c | 97 + tests/test-float.c | 384 + tests/test-fnmatch.c | 8 +- tests/test-fopen-safer.c | 2 +- tests/test-fopen.c | 2 +- tests/test-fopen.h | 2 +- tests/test-fpending.c | 2 +- tests/test-fpurge.c | 2 +- tests/test-fputc.c | 91 + tests/test-fread.c | 100 + tests/test-freadahead.c | 2 +- tests/test-freading.c | 2 +- tests/test-fseek.c | 70 + tests/test-fseek.sh | 5 + tests/test-fseek2.sh | 3 + tests/test-fseeko.c | 2 +- tests/test-fseeko3.c | 51 + tests/test-fseeko3.sh | 7 + tests/test-fseeko4.c | 73 + tests/test-fseeko4.sh | 5 + tests/test-fstat.c | 50 + tests/test-fstatat.c | 37 +- tests/test-ftell.c | 2 +- tests/test-ftell3.c | 2 +- tests/test-ftello.c | 2 +- tests/test-ftello3.c | 2 +- tests/test-ftello4.c | 70 + tests/test-ftello4.sh | 5 + tests/test-ftruncate.c | 60 + tests/test-ftruncate.sh | 3 + tests/test-fwrite.c | 94 + tests/test-getcwd-lgpl.c | 102 + tests/test-getcwd.c | 250 +- tests/test-getcwd.sh | 7 + tests/test-getdelim.c | 5 +- tests/test-getdtablesize.c | 4 +- tests/test-getgroups.c | 2 +- tests/test-gethostname.c | 67 + tests/test-getline.c | 5 +- tests/test-getopt.c | 2 +- tests/test-getopt.h | 24 +- tests/test-getopt_long.h | 21 +- tests/test-gettimeofday.c | 2 +- tests/test-hash.c | 16 +- tests/test-i-ring.c | 2 +- tests/test-ignore-value.c | 2 +- tests/test-inet_pton.c | 58 + tests/test-init.sh | 73 + tests/test-intprops.c | 275 + tests/test-inttostr.c | 4 +- tests/test-inttypes.c | 5 +- tests/test-ioctl.c | 51 + tests/test-isblank.c | 2 +- tests/test-isfinite.c | 237 + tests/test-isinf.c | 243 + tests/test-isnand-nolibm.c | 21 + tests/test-isnand.h | 63 + tests/test-isnanf-nolibm.c | 21 + tests/test-isnanf.h | 65 + tests/test-isnanl-nolibm.c | 23 + tests/test-isnanl.h | 127 + tests/test-iswblank.c | 2 +- tests/test-langinfo.c | 2 +- tests/test-lchown.c | 49 - tests/test-lchown.h | 260 - tests/test-listen.c | 49 + tests/test-locale.c | 32 +- tests/test-localeconv.c | 72 + tests/test-localename.c | 4 +- tests/test-lock.c | 78 +- tests/test-lseek.c | 15 +- tests/test-lstat.c | 2 +- tests/test-lstat.h | 2 +- tests/test-malloc-gnu.c | 2 +- tests/test-malloca.c | 4 +- tests/test-math.c | 63 +- tests/test-mbrtowc-w32.c | 2 +- tests/test-mbrtowc.c | 2 +- tests/test-mbscasestr1.c | 2 +- tests/test-mbscasestr2.c | 2 +- tests/test-mbscasestr3.c | 2 +- tests/test-mbscasestr4.c | 2 +- tests/test-mbsinit.c | 2 +- tests/test-mbsrtowcs.c | 2 +- tests/test-mbsstr1.c | 2 +- tests/test-mbsstr2.c | 2 +- tests/test-mbsstr3.c | 2 +- tests/test-memchr.c | 2 +- tests/test-memrchr.c | 2 +- tests/test-mkdir.c | 47 - tests/test-mkdir.h | 98 - tests/test-mkdirat.c | 85 - tests/test-modf.c | 17 +- tests/test-modf.h | 62 + tests/test-nanosleep.c | 83 + tests/test-netinet_in.c | 27 + tests/test-nl_langinfo.c | 2 +- tests/test-open.c | 2 +- tests/test-open.h | 19 +- tests/test-openat-safer.c | 2 +- tests/test-openat.c | 20 +- tests/test-parse-datetime.c | 194 +- tests/test-pathmax.c | 32 + tests/test-perror.c | 5 +- tests/test-perror.sh | 33 +- tests/test-perror2.c | 136 + tests/test-pipe.c | 104 + tests/test-priv-set.c | 2 +- tests/test-quotearg-simple.c | 73 +- tests/test-quotearg.h | 5 +- tests/test-raise.c | 50 + tests/test-read.c | 73 + tests/test-readlink.c | 2 +- tests/test-readlink.h | 2 +- tests/test-readlinkat.c | 15 +- tests/test-realloc-gnu.c | 2 +- tests/test-regex.c | 203 + tests/test-rmdir.c | 2 +- tests/test-rmdir.h | 5 +- tests/test-select-fd.c | 72 + tests/test-select-in.sh | 38 + tests/test-select-out.sh | 35 + tests/test-select-stdin.c | 83 + tests/test-select.c | 34 + tests/test-select.h | 462 + tests/test-setenv.c | 2 +- tests/test-setlocale1.c | 2 +- tests/test-setlocale2.c | 2 +- tests/test-setlocale2.sh | 6 +- tests/test-setsockopt.c | 55 + tests/test-sigaction.c | 122 + tests/test-signal-h.c | 129 + tests/test-sigprocmask.c | 102 + tests/test-sleep.c | 2 +- tests/test-snprintf.c | 12 +- tests/test-sockets.c | 46 + tests/test-stat-time.c | 47 +- tests/test-stat.c | 3 +- tests/test-stat.h | 6 +- tests/test-statat.c | 27 + tests/test-stdalign.c | 116 + tests/test-stdbool.c | 2 +- tests/test-stddef.c | 2 +- tests/test-stdint.c | 4 +- tests/test-stdio.c | 2 +- tests/test-stdlib.c | 2 +- tests/test-strcasestr.c | 5 +- tests/test-strerror.c | 26 +- tests/test-strerror_r.c | 181 + tests/test-strftime.c | 3 +- tests/test-string.c | 2 +- tests/test-strings.c | 2 +- tests/test-strnlen.c | 2 +- tests/test-strstr.c | 5 +- tests/test-strtol.c | 181 + tests/test-strtoul.c | 180 + tests/test-strtoull.c | 180 + tests/test-strtoumax.c | 180 + tests/test-symlink.c | 2 +- tests/test-symlink.h | 2 +- tests/test-symlinkat.c | 19 +- tests/test-sys_ioctl.c | 27 + tests/test-sys_select.c | 59 + tests/test-sys_socket.c | 68 + tests/test-sys_stat.c | 62 +- tests/test-sys_time.c | 7 +- tests/test-sys_types.c | 34 + tests/test-sys_uio.c | 32 + tests/test-sys_utsname.c | 37 + tests/test-sys_wait.c | 8 +- tests/test-sys_wait.h | 2 +- tests/test-thread_create.c | 78 + tests/test-thread_self.c | 34 + tests/test-time.c | 10 +- tests/test-trunc1.c | 65 + tests/test-trunc2.c | 178 + tests/test-uname.c | 64 + tests/test-unistd.c | 2 +- tests/test-unlink.c | 2 +- tests/test-unlink.h | 2 +- tests/test-unlinkat.c | 20 +- tests/test-unsetenv.c | 2 +- tests/test-update-copyright.sh | 24 +- tests/test-usleep.c | 40 - tests/test-vasnprintf.c | 4 +- tests/test-vc-list-files-cvs.sh | 3 +- tests/test-vc-list-files-git.sh | 2 +- tests/test-verify.c | 6 +- tests/test-version-etc.c | 2 +- tests/test-version-etc.sh | 2 +- tests/test-wchar.c | 2 +- tests/test-wcrtomb-w32.c | 2 +- tests/test-wcrtomb.c | 2 +- tests/test-wctype-h.c | 2 +- tests/test-wcwidth.c | 2 +- tests/test-xalloc-die.c | 2 +- tests/test-xalloc-die.sh | 2 +- tests/test-xstrtol.c | 2 +- tests/test-xstrtol.sh | 18 +- tests/test-xstrtoumax.sh | 10 +- tests/test-yesno.c | 2 +- tests/test-yesno.sh | 58 +- tests/uniwidth/test-uc_width.c | 2 +- tests/uniwidth/test-uc_width2.c | 2 +- tests/unlinkdir.c | 5 +- tests/unlinkdir.h | 2 +- tests/usleep.c | 58 - tests/w32sock.h | 136 + tests/wctob.c | 2 +- tests/wctomb-impl.h | 2 +- tests/wctomb.c | 2 +- tests/zerosize-ptr.h | 2 +- tool-versions.txt | 20 +- xargs/Makefile.am | 13 +- xargs/Makefile.in | 889 +- xargs/testsuite/Makefile.am | 62 +- xargs/testsuite/Makefile.in | 895 +- xargs/testsuite/config/unix.exp | 9 +- xargs/testsuite/xargs.gnu/E_-0.exp | 2 +- xargs/testsuite/xargs.gnu/n2-s21-0.exp | 1 + .../n2-s26.xo => xargs.gnu/n2-s21-0.xo} | 0 xargs/testsuite/xargs.gnu/n2-s21-x-0.exp | 1 + .../n2-s26-x.xo => xargs.gnu/n2-s21-x-0.xo} | 0 xargs/testsuite/xargs.gnu/n2-s26-0.exp | 1 - xargs/testsuite/xargs.gnu/n2-s26-x-0.exp | 1 - xargs/testsuite/xargs.gnu/n3-s31-0.exp | 1 + .../n3-s36.xo => xargs.gnu/n3-s31-0.xo} | 0 xargs/testsuite/xargs.gnu/n3-s36-0.exp | 1 - xargs/testsuite/xargs.gnu/s14-0.exp | 1 + .../{xargs.posix/s19.xo => xargs.gnu/s14-0.xo} | 0 xargs/testsuite/xargs.gnu/s14_2-0.exp | 1 + xargs/testsuite/xargs.gnu/s15-0.exp | 1 + .../{xargs.posix/s20.xo => xargs.gnu/s15-0.xo} | 0 xargs/testsuite/xargs.gnu/s19-0.exp | 1 - xargs/testsuite/xargs.gnu/s19_2-0.exp | 1 - xargs/testsuite/xargs.gnu/s20-0.exp | 1 - xargs/testsuite/xargs.gnu/s25-0.exp | 1 + .../{xargs.sysv/s30-t.xo => xargs.gnu/s25-0.xo} | 0 xargs/testsuite/xargs.gnu/s30-0.exp | 1 - .../xargs.posix/arg_max_32bit_linux_bug.exp | 4 +- .../xargs.posix/arg_max_64bit_linux_bug.exp | 4 +- xargs/testsuite/xargs.posix/n2-s21-x.exp | 1 + .../n2-s26-x-0.xo => xargs.posix/n2-s21-x.xo} | 0 xargs/testsuite/xargs.posix/n2-s21.exp | 1 + .../n2-s26-0.xo => xargs.posix/n2-s21.xo} | 0 xargs/testsuite/xargs.posix/n2-s26-x.exp | 1 - xargs/testsuite/xargs.posix/n2-s26.exp | 1 - xargs/testsuite/xargs.posix/n3-s31.exp | 1 + .../n3-s36-0.xo => xargs.posix/n3-s31.xo} | 0 xargs/testsuite/xargs.posix/n3-s36.exp | 1 - xargs/testsuite/xargs.posix/rc-125.exp | 4 +- xargs/testsuite/xargs.posix/s14.exp | 1 + .../{xargs.gnu/s19-0.xo => xargs.posix/s14.xo} | 0 xargs/testsuite/xargs.posix/s14_2.exp | 1 + xargs/testsuite/xargs.posix/s15.exp | 1 + .../{xargs.gnu/s20-0.xo => xargs.posix/s15.xo} | 0 xargs/testsuite/xargs.posix/s19.exp | 1 - xargs/testsuite/xargs.posix/s19_2.exp | 1 - xargs/testsuite/xargs.posix/s20.exp | 1 - xargs/testsuite/xargs.posix/s25.exp | 1 + xargs/testsuite/xargs.posix/{s30.xo => s25.xo} | 0 xargs/testsuite/xargs.posix/s30.exp | 1 - xargs/testsuite/xargs.posix/s42.exp | 1 + xargs/testsuite/xargs.posix/{s47.xo => s42.xo} | 0 xargs/testsuite/xargs.posix/s47.exp | 1 - xargs/testsuite/xargs.posix/sv-bug-18714.exp | 6 +- xargs/testsuite/xargs.posix/sv-bug-18714b.exp | 6 +- xargs/testsuite/xargs.sysv/empty_def-t.xe | 2 +- xargs/testsuite/xargs.sysv/s25-t.exp | 1 + xargs/testsuite/xargs.sysv/s25-t.xe | 6 + .../{xargs.gnu/s30-0.xo => xargs.sysv/s25-t.xo} | 0 xargs/testsuite/xargs.sysv/s30-t.exp | 1 - xargs/testsuite/xargs.sysv/s30-t.xe | 6 - xargs/xargs.1 | 201 +- xargs/xargs.c | 342 +- 1809 files changed, 230790 insertions(+), 148629 deletions(-) delete mode 100644 build-aux/arg-nonnull.h delete mode 100644 build-aux/c++defs.h create mode 100644 build-aux/snippet/_Noreturn.h create mode 100644 build-aux/snippet/arg-nonnull.h create mode 100644 build-aux/snippet/c++defs.h create mode 100644 build-aux/snippet/unused-parameter.h create mode 100644 build-aux/snippet/warn-on-use.h delete mode 100644 build-aux/unused-parameter.h delete mode 100644 build-aux/warn-on-use.h create mode 100644 doc/texinfo.tex create mode 100644 find/exec.c create mode 100644 find/ftsfind.1 create mode 100644 find/oldfind.1 create mode 100644 find/print.c create mode 100644 find/print.h create mode 100644 find/testsuite/binary_locations.sh create mode 100644 find/testsuite/checklists.py create mode 100644 find/testsuite/find.gnu/printf-reserved.exp create mode 100755 find/testsuite/sv-34079.sh create mode 100755 find/testsuite/sv-34976-execdir-fd-leak.sh create mode 100755 find/testsuite/sv-bug-32043.sh create mode 100755 find/testsuite/test_escape_c.sh create mode 100644 find/testsuite/test_escapechars.golden create mode 100755 find/testsuite/test_escapechars.sh create mode 100755 find/testsuite/test_inode.sh rename {gnulib => gl}/Makefile.am (100%) create mode 100644 gl/Makefile.in create mode 100644 gl/lib/Makefile.am create mode 100644 gl/lib/Makefile.in create mode 100644 gl/lib/alloca.c create mode 100644 gl/lib/alloca.in.h create mode 100644 gl/lib/allocator.c create mode 100644 gl/lib/allocator.h create mode 100644 gl/lib/areadlink-with-size.c create mode 100644 gl/lib/areadlink.c create mode 100644 gl/lib/areadlink.h create mode 100644 gl/lib/areadlinkat.c create mode 100644 gl/lib/argmatch.c create mode 100644 gl/lib/argmatch.h create mode 100644 gl/lib/asnprintf.c create mode 100644 gl/lib/at-func.c create mode 100644 gl/lib/basename-lgpl.c create mode 100644 gl/lib/basename.c create mode 100644 gl/lib/bitrotate.c create mode 100644 gl/lib/bitrotate.h create mode 100644 gl/lib/btowc.c create mode 100644 gl/lib/byteswap.in.h create mode 100644 gl/lib/c-ctype.c create mode 100644 gl/lib/c-ctype.h create mode 100644 gl/lib/c-strcase.h create mode 100644 gl/lib/c-strcasecmp.c create mode 100644 gl/lib/c-strcaseeq.h create mode 100644 gl/lib/c-strcasestr.c create mode 100644 gl/lib/c-strcasestr.h create mode 100644 gl/lib/c-strncasecmp.c create mode 100644 gl/lib/c-strstr.c create mode 100644 gl/lib/c-strstr.h create mode 100644 gl/lib/canonicalize.c create mode 100644 gl/lib/canonicalize.h create mode 100644 gl/lib/careadlinkat.c create mode 100644 gl/lib/careadlinkat.h create mode 100644 gl/lib/chdir-long.c create mode 100644 gl/lib/chdir-long.h create mode 100644 gl/lib/cloexec.c create mode 100644 gl/lib/cloexec.h create mode 100644 gl/lib/close-stream.c rename {gnulib => gl}/lib/close-stream.h (100%) create mode 100644 gl/lib/close.c create mode 100644 gl/lib/closedir.c create mode 100644 gl/lib/closein.c create mode 100644 gl/lib/closein.h create mode 100644 gl/lib/closeout.c create mode 100644 gl/lib/closeout.h create mode 100644 gl/lib/config.charset create mode 100644 gl/lib/creat-safer.c create mode 100644 gl/lib/ctype.in.h create mode 100644 gl/lib/cycle-check.c create mode 100644 gl/lib/cycle-check.h rename {gnulib => gl}/lib/dev-ino.h (100%) create mode 100644 gl/lib/dirent--.h create mode 100644 gl/lib/dirent-private.h create mode 100644 gl/lib/dirent-safer.h create mode 100644 gl/lib/dirent.in.h create mode 100644 gl/lib/dirfd.c create mode 100644 gl/lib/dirname-lgpl.c create mode 100644 gl/lib/dirname.c create mode 100644 gl/lib/dirname.h create mode 100644 gl/lib/dosname.h create mode 100644 gl/lib/dup-safer.c create mode 100644 gl/lib/dup.c create mode 100644 gl/lib/dup2.c create mode 100644 gl/lib/errno.in.h create mode 100644 gl/lib/error.c create mode 100644 gl/lib/error.h create mode 100644 gl/lib/euidaccess.c create mode 100644 gl/lib/exitfail.c create mode 100644 gl/lib/exitfail.h create mode 100644 gl/lib/faccessat.c create mode 100644 gl/lib/fchdir.c create mode 100644 gl/lib/fcntl--.h create mode 100644 gl/lib/fcntl-safer.h create mode 100644 gl/lib/fcntl.c create mode 100644 gl/lib/fcntl.in.h create mode 100644 gl/lib/fd-hook.c create mode 100644 gl/lib/fd-hook.h create mode 100644 gl/lib/fd-safer.c create mode 100644 gl/lib/fdopendir.c create mode 100644 gl/lib/fflush.c create mode 100644 gl/lib/file-set.c create mode 100644 gl/lib/file-set.h create mode 100644 gl/lib/fileblocks.c create mode 100644 gl/lib/filemode.c create mode 100644 gl/lib/filemode.h create mode 100644 gl/lib/filename.h create mode 100644 gl/lib/filenamecat-lgpl.c create mode 100644 gl/lib/filenamecat.h create mode 100644 gl/lib/float+.h create mode 100644 gl/lib/float.c create mode 100644 gl/lib/float.in.h create mode 100644 gl/lib/fnmatch.c create mode 100644 gl/lib/fnmatch.in.h create mode 100644 gl/lib/fnmatch_loop.c create mode 100644 gl/lib/fopen-safer.c create mode 100644 gl/lib/fopen.c create mode 100644 gl/lib/fpending.c create mode 100644 gl/lib/fpending.h create mode 100644 gl/lib/fpurge.c create mode 100644 gl/lib/freadahead.c create mode 100644 gl/lib/freadahead.h create mode 100644 gl/lib/freading.c create mode 100644 gl/lib/freading.h create mode 100644 gl/lib/fseek.c create mode 100644 gl/lib/fseeko.c create mode 100644 gl/lib/fstat.c create mode 100644 gl/lib/fstatat.c create mode 100644 gl/lib/ftell.c create mode 100644 gl/lib/ftello.c create mode 100644 gl/lib/fts-cycle.c create mode 100644 gl/lib/fts.c create mode 100644 gl/lib/fts_.h create mode 100644 gl/lib/getcwd-lgpl.c create mode 100644 gl/lib/getcwd.c create mode 100644 gl/lib/getdelim.c create mode 100644 gl/lib/getdtablesize.c create mode 100644 gl/lib/getfilecon.c create mode 100644 gl/lib/getgroups.c create mode 100644 gl/lib/gethostname.c create mode 100644 gl/lib/getline.c create mode 100644 gl/lib/getopt.c create mode 100644 gl/lib/getopt.in.h create mode 100644 gl/lib/getopt1.c create mode 100644 gl/lib/getopt_int.h create mode 100644 gl/lib/gettext.h create mode 100644 gl/lib/gettime.c create mode 100644 gl/lib/gettimeofday.c create mode 100644 gl/lib/glthread/lock.c create mode 100644 gl/lib/glthread/lock.h create mode 100644 gl/lib/glthread/threadlib.c create mode 100644 gl/lib/group-member.c create mode 100644 gl/lib/hash-pjw.c create mode 100644 gl/lib/hash-pjw.h create mode 100644 gl/lib/hash-triple.c create mode 100644 gl/lib/hash-triple.h create mode 100644 gl/lib/hash.c create mode 100644 gl/lib/hash.h create mode 100644 gl/lib/human.c create mode 100644 gl/lib/human.h create mode 100644 gl/lib/i-ring.c create mode 100644 gl/lib/i-ring.h create mode 100644 gl/lib/idcache.c rename {gnulib => gl}/lib/idcache.h (100%) create mode 100644 gl/lib/intprops.h create mode 100644 gl/lib/inttypes.in.h create mode 100644 gl/lib/isblank.c create mode 100644 gl/lib/isfinite.c create mode 100644 gl/lib/isinf.c create mode 100644 gl/lib/isnan.c create mode 100644 gl/lib/isnand-nolibm.h create mode 100644 gl/lib/isnand.c create mode 100644 gl/lib/isnanf-nolibm.h create mode 100644 gl/lib/isnanf.c create mode 100644 gl/lib/isnanl-nolibm.h create mode 100644 gl/lib/isnanl.c create mode 100644 gl/lib/iswblank.c create mode 100644 gl/lib/itold.c create mode 100644 gl/lib/langinfo.in.h create mode 100644 gl/lib/localcharset.c create mode 100644 gl/lib/localcharset.h create mode 100644 gl/lib/locale.in.h create mode 100644 gl/lib/localeconv.c create mode 100644 gl/lib/lseek.c create mode 100644 gl/lib/lstat.c create mode 100644 gl/lib/malloc.c create mode 100644 gl/lib/malloca.c create mode 100644 gl/lib/malloca.h rename {gnulib => gl}/lib/malloca.valgrind (100%) create mode 100644 gl/lib/math.c create mode 100644 gl/lib/math.in.h create mode 100644 gl/lib/mbchar.c create mode 100644 gl/lib/mbchar.h create mode 100644 gl/lib/mbrtowc.c create mode 100644 gl/lib/mbscasestr.c create mode 100644 gl/lib/mbsinit.c create mode 100644 gl/lib/mbslen.c create mode 100644 gl/lib/mbsrtowcs-impl.h create mode 100644 gl/lib/mbsrtowcs-state.c create mode 100644 gl/lib/mbsrtowcs.c create mode 100644 gl/lib/mbsstr.c create mode 100644 gl/lib/mbtowc-impl.h create mode 100644 gl/lib/mbtowc.c create mode 100644 gl/lib/mbuiter.c create mode 100644 gl/lib/mbuiter.h create mode 100644 gl/lib/memchr.c rename {gnulib => gl}/lib/memchr.valgrind (100%) create mode 100644 gl/lib/mempcpy.c create mode 100644 gl/lib/memrchr.c rename {gnulib => gl}/lib/mktime-internal.h (100%) create mode 100644 gl/lib/mktime.c create mode 100644 gl/lib/modechange.c create mode 100644 gl/lib/modechange.h create mode 100644 gl/lib/modf.c create mode 100644 gl/lib/mountlist.c create mode 100644 gl/lib/mountlist.h create mode 100644 gl/lib/msvc-inval.c create mode 100644 gl/lib/msvc-inval.h create mode 100644 gl/lib/msvc-nothrow.c create mode 100644 gl/lib/msvc-nothrow.h create mode 100644 gl/lib/nl_langinfo.c create mode 100644 gl/lib/open-safer.c create mode 100644 gl/lib/open.c create mode 100644 gl/lib/openat-die.c create mode 100644 gl/lib/openat-priv.h create mode 100644 gl/lib/openat-proc.c create mode 100644 gl/lib/openat-safer.c create mode 100644 gl/lib/openat.c create mode 100644 gl/lib/openat.h create mode 100644 gl/lib/opendir-safer.c create mode 100644 gl/lib/opendir.c create mode 100644 gl/lib/parse-datetime.c create mode 100644 gl/lib/parse-datetime.h create mode 100644 gl/lib/parse-datetime.y create mode 100644 gl/lib/pathmax.h create mode 100644 gl/lib/perror.c create mode 100644 gl/lib/pipe-safer.c create mode 100644 gl/lib/printf-args.c create mode 100644 gl/lib/printf-args.h create mode 100644 gl/lib/printf-parse.c create mode 100644 gl/lib/printf-parse.h create mode 100644 gl/lib/progname.c create mode 100644 gl/lib/progname.h create mode 100644 gl/lib/quote.h create mode 100644 gl/lib/quotearg.c create mode 100644 gl/lib/quotearg.h create mode 100644 gl/lib/read.c create mode 100644 gl/lib/readdir.c create mode 100644 gl/lib/readlink.c create mode 100644 gl/lib/readlinkat.c create mode 100644 gl/lib/realloc.c create mode 100644 gl/lib/ref-add.sin create mode 100644 gl/lib/ref-del.sin create mode 100644 gl/lib/regcomp.c create mode 100644 gl/lib/regex.c create mode 100644 gl/lib/regex.h create mode 100644 gl/lib/regex_internal.c create mode 100644 gl/lib/regex_internal.h create mode 100644 gl/lib/regexec.c create mode 100644 gl/lib/rewinddir.c create mode 100644 gl/lib/rmdir.c create mode 100644 gl/lib/root-uid.h create mode 100644 gl/lib/rpmatch.c create mode 100644 gl/lib/safe-read.c create mode 100644 gl/lib/safe-read.h create mode 100644 gl/lib/same-inode.h create mode 100644 gl/lib/same.c create mode 100644 gl/lib/same.h create mode 100644 gl/lib/save-cwd.c create mode 100644 gl/lib/save-cwd.h create mode 100644 gl/lib/savedir.c create mode 100644 gl/lib/savedir.h create mode 100644 gl/lib/se-context.c create mode 100644 gl/lib/se-context.in.h create mode 100644 gl/lib/se-selinux.c create mode 100644 gl/lib/se-selinux.in.h create mode 100644 gl/lib/selinux-at.c create mode 100644 gl/lib/selinux-at.h create mode 100644 gl/lib/setenv.c create mode 100644 gl/lib/size_max.h create mode 100644 gl/lib/snprintf.c create mode 100644 gl/lib/sockets.c create mode 100644 gl/lib/sockets.h rename {gnulib => gl}/lib/stat-macros.h (100%) create mode 100644 gl/lib/stat-size.h create mode 100644 gl/lib/stat-time.c create mode 100644 gl/lib/stat-time.h create mode 100644 gl/lib/stat.c create mode 100644 gl/lib/statat.c create mode 100644 gl/lib/stdalign.in.h create mode 100644 gl/lib/stdarg.in.h create mode 100644 gl/lib/stdbool.in.h create mode 100644 gl/lib/stddef.in.h create mode 100644 gl/lib/stdint.in.h create mode 100644 gl/lib/stdio--.h create mode 100644 gl/lib/stdio-impl.h create mode 100644 gl/lib/stdio-safer.h create mode 100644 gl/lib/stdio.in.h create mode 100644 gl/lib/stdlib.in.h create mode 100644 gl/lib/stpcpy.c create mode 100644 gl/lib/str-kmp.h create mode 100644 gl/lib/str-two-way.h create mode 100644 gl/lib/strcasecmp.c create mode 100644 gl/lib/strcasestr.c create mode 100644 gl/lib/strdup.c create mode 100644 gl/lib/streq.h create mode 100644 gl/lib/strerror-override.c create mode 100644 gl/lib/strerror-override.h create mode 100644 gl/lib/strerror.c create mode 100644 gl/lib/strerror_r.c create mode 100644 gl/lib/strftime.c create mode 100644 gl/lib/strftime.h create mode 100644 gl/lib/string.in.h create mode 100644 gl/lib/strings.in.h create mode 100644 gl/lib/stripslash.c create mode 100644 gl/lib/strncasecmp.c create mode 100644 gl/lib/strndup.c create mode 100644 gl/lib/strnlen.c create mode 100644 gl/lib/strnlen1.c create mode 100644 gl/lib/strnlen1.h create mode 100644 gl/lib/strstr.c create mode 100644 gl/lib/strtoimax.c create mode 100644 gl/lib/strtol.c create mode 100644 gl/lib/strtoul.c create mode 100644 gl/lib/strtoull.c rename {gnulib => gl}/lib/strtoumax.c (100%) create mode 100644 gl/lib/sys_socket.c create mode 100644 gl/lib/sys_socket.in.h create mode 100644 gl/lib/sys_stat.in.h create mode 100644 gl/lib/sys_time.in.h create mode 100644 gl/lib/sys_types.in.h create mode 100644 gl/lib/sys_uio.in.h create mode 100644 gl/lib/sys_utsname.in.h create mode 100644 gl/lib/sys_wait.in.h create mode 100644 gl/lib/time.in.h create mode 100644 gl/lib/time_r.c create mode 100644 gl/lib/timespec.c create mode 100644 gl/lib/timespec.h create mode 100644 gl/lib/trunc.c create mode 100644 gl/lib/uname.c create mode 100644 gl/lib/unistd--.h create mode 100644 gl/lib/unistd-safer.h create mode 100644 gl/lib/unistd.c create mode 100644 gl/lib/unistd.in.h create mode 100644 gl/lib/unitypes.in.h create mode 100644 gl/lib/uniwidth.in.h create mode 100644 gl/lib/uniwidth/cjk.h create mode 100644 gl/lib/uniwidth/width.c create mode 100644 gl/lib/unlink.c create mode 100644 gl/lib/unlinkat.c create mode 100644 gl/lib/unsetenv.c create mode 100644 gl/lib/vasnprintf.c create mode 100644 gl/lib/vasnprintf.h create mode 100644 gl/lib/verify.h create mode 100644 gl/lib/version-etc-fsf.c create mode 100644 gl/lib/version-etc.c create mode 100644 gl/lib/version-etc.h create mode 100644 gl/lib/w32sock.h create mode 100644 gl/lib/wchar.in.h create mode 100644 gl/lib/wcrtomb.c create mode 100644 gl/lib/wctype-h.c create mode 100644 gl/lib/wctype.in.h create mode 100644 gl/lib/wcwidth.c create mode 100644 gl/lib/xalloc-die.c create mode 100644 gl/lib/xalloc-oversized.h create mode 100644 gl/lib/xalloc.h create mode 100644 gl/lib/xgetcwd.c create mode 100644 gl/lib/xgetcwd.h create mode 100644 gl/lib/xmalloc.c create mode 100644 gl/lib/xsize.c create mode 100644 gl/lib/xsize.h create mode 100644 gl/lib/xstrndup.c create mode 100644 gl/lib/xstrndup.h create mode 100644 gl/lib/xstrtod.c create mode 100644 gl/lib/xstrtod.h create mode 100644 gl/lib/xstrtol-error.c create mode 100644 gl/lib/xstrtol.c create mode 100644 gl/lib/xstrtol.h rename {gnulib => gl}/lib/xstrtoul.c (100%) rename {gnulib => gl}/lib/xstrtoumax.c (100%) create mode 100644 gl/lib/yesno.c create mode 100644 gl/lib/yesno.h create mode 100644 gl/m4/00gnulib.m4 create mode 100644 gl/m4/absolute-header.m4 create mode 100644 gl/m4/alloca.m4 create mode 100644 gl/m4/arpa_inet_h.m4 create mode 100644 gl/m4/assert.m4 create mode 100644 gl/m4/bison.m4 create mode 100644 gl/m4/btowc.m4 create mode 100644 gl/m4/byteswap.m4 create mode 100644 gl/m4/canonicalize.m4 create mode 100644 gl/m4/chdir-long.m4 create mode 100644 gl/m4/check-math-lib.m4 create mode 100644 gl/m4/clock_time.m4 create mode 100644 gl/m4/close-stream.m4 create mode 100644 gl/m4/close.m4 create mode 100644 gl/m4/closedir.m4 create mode 100644 gl/m4/closein.m4 create mode 100644 gl/m4/closeout.m4 create mode 100644 gl/m4/codeset.m4 create mode 100644 gl/m4/configmake.m4 create mode 100644 gl/m4/ctype.m4 create mode 100644 gl/m4/cycle-check.m4 create mode 100644 gl/m4/d-ino.m4 create mode 100644 gl/m4/d-type.m4 create mode 100644 gl/m4/dirent-safer.m4 create mode 100644 gl/m4/dirent_h.m4 create mode 100644 gl/m4/dirfd.m4 create mode 100644 gl/m4/dirname.m4 create mode 100644 gl/m4/double-slash-root.m4 create mode 100644 gl/m4/dup.m4 create mode 100644 gl/m4/dup2.m4 create mode 100644 gl/m4/eealloc.m4 create mode 100644 gl/m4/environ.m4 create mode 100644 gl/m4/errno_h.m4 create mode 100644 gl/m4/error.m4 create mode 100644 gl/m4/euidaccess.m4 create mode 100644 gl/m4/exponentd.m4 create mode 100644 gl/m4/exponentf.m4 create mode 100644 gl/m4/exponentl.m4 create mode 100644 gl/m4/extensions.m4 create mode 100644 gl/m4/extern-inline.m4 create mode 100644 gl/m4/faccessat.m4 create mode 100644 gl/m4/fchdir.m4 create mode 100644 gl/m4/fcntl-o.m4 create mode 100644 gl/m4/fcntl-safer.m4 create mode 100644 gl/m4/fcntl.m4 create mode 100644 gl/m4/fcntl_h.m4 create mode 100644 gl/m4/fdopen.m4 create mode 100644 gl/m4/fdopendir.m4 create mode 100644 gl/m4/fflush.m4 create mode 100644 gl/m4/fileblocks.m4 create mode 100644 gl/m4/filemode.m4 create mode 100644 gl/m4/filenamecat.m4 create mode 100644 gl/m4/flexmember.m4 create mode 100644 gl/m4/float_h.m4 create mode 100644 gl/m4/fnmatch.m4 create mode 100644 gl/m4/fopen.m4 create mode 100644 gl/m4/fpending.m4 create mode 100644 gl/m4/fpieee.m4 create mode 100644 gl/m4/fpurge.m4 create mode 100644 gl/m4/freadahead.m4 create mode 100644 gl/m4/freading.m4 create mode 100644 gl/m4/fseek.m4 create mode 100644 gl/m4/fseeko.m4 create mode 100644 gl/m4/fstat.m4 create mode 100644 gl/m4/fstatat.m4 create mode 100644 gl/m4/fstypename.m4 create mode 100644 gl/m4/ftell.m4 create mode 100644 gl/m4/ftello.m4 create mode 100644 gl/m4/ftruncate.m4 create mode 100644 gl/m4/fts.m4 create mode 100644 gl/m4/getcwd-abort-bug.m4 create mode 100644 gl/m4/getcwd-path-max.m4 create mode 100644 gl/m4/getcwd.m4 create mode 100644 gl/m4/getdelim.m4 create mode 100644 gl/m4/getdtablesize.m4 create mode 100644 gl/m4/getgroups.m4 create mode 100644 gl/m4/gethostname.m4 create mode 100644 gl/m4/getline.m4 create mode 100644 gl/m4/getopt.m4 create mode 100644 gl/m4/getpagesize.m4 create mode 100644 gl/m4/gettext.m4 create mode 100644 gl/m4/gettime.m4 create mode 100644 gl/m4/gettimeofday.m4 create mode 100644 gl/m4/glibc21.m4 create mode 100644 gl/m4/gnulib-cache.m4 create mode 100644 gl/m4/gnulib-common.m4 create mode 100644 gl/m4/gnulib-comp.m4 create mode 100644 gl/m4/group-member.m4 create mode 100644 gl/m4/human.m4 create mode 100644 gl/m4/i-ring.m4 create mode 100644 gl/m4/iconv.m4 create mode 100644 gl/m4/idcache.m4 create mode 100644 gl/m4/include_next.m4 create mode 100644 gl/m4/inet_pton.m4 create mode 100644 gl/m4/inline.m4 create mode 100644 gl/m4/intlmacosx.m4 create mode 100644 gl/m4/intmax_t.m4 create mode 100644 gl/m4/inttostr.m4 create mode 100644 gl/m4/inttypes-pri.m4 create mode 100644 gl/m4/inttypes.m4 create mode 100644 gl/m4/inttypes_h.m4 create mode 100644 gl/m4/ioctl.m4 create mode 100644 gl/m4/isblank.m4 create mode 100644 gl/m4/isfinite.m4 create mode 100644 gl/m4/isinf.m4 create mode 100644 gl/m4/isnand.m4 create mode 100644 gl/m4/isnanf.m4 create mode 100644 gl/m4/isnanl.m4 create mode 100644 gl/m4/iswblank.m4 create mode 100644 gl/m4/langinfo_h.m4 create mode 100644 gl/m4/largefile.m4 create mode 100644 gl/m4/lcmessage.m4 create mode 100644 gl/m4/lib-ld.m4 create mode 100644 gl/m4/lib-link.m4 create mode 100644 gl/m4/lib-prefix.m4 create mode 100644 gl/m4/libunistring-base.m4 create mode 100644 gl/m4/localcharset.m4 create mode 100644 gl/m4/locale-fr.m4 create mode 100644 gl/m4/locale-ja.m4 create mode 100644 gl/m4/locale-tr.m4 create mode 100644 gl/m4/locale-zh.m4 create mode 100644 gl/m4/locale_h.m4 create mode 100644 gl/m4/localeconv.m4 create mode 100644 gl/m4/localename.m4 create mode 100644 gl/m4/lock.m4 create mode 100644 gl/m4/longlong.m4 create mode 100644 gl/m4/ls-mntd-fs.m4 create mode 100644 gl/m4/lseek.m4 create mode 100644 gl/m4/lstat.m4 create mode 100644 gl/m4/malloc.m4 create mode 100644 gl/m4/malloca.m4 create mode 100644 gl/m4/manywarnings.m4 create mode 100644 gl/m4/math_h.m4 create mode 100644 gl/m4/mathfunc.m4 create mode 100644 gl/m4/mbchar.m4 create mode 100644 gl/m4/mbiter.m4 create mode 100644 gl/m4/mbrtowc.m4 create mode 100644 gl/m4/mbsinit.m4 create mode 100644 gl/m4/mbslen.m4 create mode 100644 gl/m4/mbsrtowcs.m4 create mode 100644 gl/m4/mbstate_t.m4 create mode 100644 gl/m4/mbtowc.m4 create mode 100644 gl/m4/memchr.m4 create mode 100644 gl/m4/mempcpy.m4 create mode 100644 gl/m4/memrchr.m4 create mode 100644 gl/m4/mktime.m4 create mode 100644 gl/m4/mmap-anon.m4 create mode 100644 gl/m4/mode_t.m4 create mode 100644 gl/m4/modechange.m4 create mode 100644 gl/m4/modf.m4 create mode 100644 gl/m4/mountlist.m4 create mode 100644 gl/m4/msvc-inval.m4 create mode 100644 gl/m4/msvc-nothrow.m4 create mode 100644 gl/m4/multiarch.m4 create mode 100644 gl/m4/nanosleep.m4 create mode 100644 gl/m4/netinet_in_h.m4 create mode 100644 gl/m4/nl_langinfo.m4 create mode 100644 gl/m4/nls.m4 create mode 100644 gl/m4/nocrash.m4 create mode 100644 gl/m4/off_t.m4 create mode 100644 gl/m4/onceonly.m4 create mode 100644 gl/m4/open.m4 create mode 100644 gl/m4/openat.m4 create mode 100644 gl/m4/opendir.m4 create mode 100644 gl/m4/parse-datetime.m4 create mode 100644 gl/m4/pathmax.m4 create mode 100644 gl/m4/perror.m4 create mode 100644 gl/m4/pipe.m4 create mode 100644 gl/m4/po.m4 create mode 100644 gl/m4/printf.m4 create mode 100644 gl/m4/priv-set.m4 create mode 100644 gl/m4/progtest.m4 create mode 100644 gl/m4/putenv.m4 create mode 100644 gl/m4/quote.m4 create mode 100644 gl/m4/quotearg.m4 create mode 100644 gl/m4/raise.m4 create mode 100644 gl/m4/read.m4 create mode 100644 gl/m4/readdir.m4 create mode 100644 gl/m4/readlink.m4 create mode 100644 gl/m4/readlinkat.m4 create mode 100644 gl/m4/realloc.m4 create mode 100644 gl/m4/regex.m4 create mode 100644 gl/m4/rewinddir.m4 create mode 100644 gl/m4/rmdir.m4 create mode 100644 gl/m4/rpmatch.m4 create mode 100644 gl/m4/safe-read.m4 create mode 100644 gl/m4/same.m4 create mode 100644 gl/m4/save-cwd.m4 create mode 100644 gl/m4/savedir.m4 create mode 100644 gl/m4/select.m4 create mode 100644 gl/m4/selinux-context-h.m4 create mode 100644 gl/m4/selinux-selinux-h.m4 create mode 100644 gl/m4/setenv.m4 create mode 100644 gl/m4/setlocale.m4 create mode 100644 gl/m4/sigaction.m4 create mode 100644 gl/m4/signal_h.m4 create mode 100644 gl/m4/signalblocking.m4 create mode 100644 gl/m4/size_max.m4 create mode 100644 gl/m4/sleep.m4 create mode 100644 gl/m4/snprintf.m4 create mode 100644 gl/m4/socketlib.m4 create mode 100644 gl/m4/sockets.m4 create mode 100644 gl/m4/socklen.m4 create mode 100644 gl/m4/sockpfaf.m4 create mode 100644 gl/m4/ssize_t.m4 create mode 100644 gl/m4/st_dm_mode.m4 create mode 100644 gl/m4/stat-size.m4 create mode 100644 gl/m4/stat-time.m4 create mode 100644 gl/m4/stat.m4 create mode 100644 gl/m4/stdalign.m4 create mode 100644 gl/m4/stdarg.m4 create mode 100644 gl/m4/stdbool.m4 create mode 100644 gl/m4/stddef_h.m4 create mode 100644 gl/m4/stdint.m4 create mode 100644 gl/m4/stdint_h.m4 create mode 100644 gl/m4/stdio_h.m4 create mode 100644 gl/m4/stdlib_h.m4 create mode 100644 gl/m4/stpcpy.m4 create mode 100644 gl/m4/strcase.m4 create mode 100644 gl/m4/strcasestr.m4 create mode 100644 gl/m4/strdup.m4 create mode 100644 gl/m4/strerror.m4 create mode 100644 gl/m4/strerror_r.m4 create mode 100644 gl/m4/strftime.m4 create mode 100644 gl/m4/string_h.m4 create mode 100644 gl/m4/strings_h.m4 create mode 100644 gl/m4/strndup.m4 create mode 100644 gl/m4/strnlen.m4 create mode 100644 gl/m4/strstr.m4 create mode 100644 gl/m4/strtol.m4 create mode 100644 gl/m4/strtoul.m4 create mode 100644 gl/m4/strtoull.m4 create mode 100644 gl/m4/strtoumax.m4 create mode 100644 gl/m4/symlink.m4 create mode 100644 gl/m4/symlinkat.m4 create mode 100644 gl/m4/sys_ioctl_h.m4 create mode 100644 gl/m4/sys_select_h.m4 create mode 100644 gl/m4/sys_socket_h.m4 create mode 100644 gl/m4/sys_stat_h.m4 create mode 100644 gl/m4/sys_time_h.m4 create mode 100644 gl/m4/sys_types_h.m4 create mode 100644 gl/m4/sys_uio_h.m4 create mode 100644 gl/m4/sys_utsname_h.m4 create mode 100644 gl/m4/sys_wait_h.m4 create mode 100644 gl/m4/thread.m4 create mode 100644 gl/m4/threadlib.m4 create mode 100644 gl/m4/time_h.m4 create mode 100644 gl/m4/time_r.m4 create mode 100644 gl/m4/timespec.m4 create mode 100644 gl/m4/tm_gmtoff.m4 create mode 100644 gl/m4/trunc.m4 create mode 100644 gl/m4/uname.m4 create mode 100644 gl/m4/ungetc.m4 create mode 100644 gl/m4/unistd-safer.m4 create mode 100644 gl/m4/unistd_h.m4 create mode 100644 gl/m4/unlink.m4 create mode 100644 gl/m4/unlinkat.m4 create mode 100644 gl/m4/unlinkdir.m4 create mode 100644 gl/m4/vasnprintf.m4 create mode 100644 gl/m4/version-etc.m4 create mode 100644 gl/m4/warn-on-use.m4 create mode 100644 gl/m4/warnings.m4 create mode 100644 gl/m4/wchar_h.m4 create mode 100644 gl/m4/wchar_t.m4 create mode 100644 gl/m4/wcrtomb.m4 create mode 100644 gl/m4/wctob.m4 create mode 100644 gl/m4/wctomb.m4 create mode 100644 gl/m4/wctype_h.m4 create mode 100644 gl/m4/wcwidth.m4 create mode 100644 gl/m4/wint_t.m4 create mode 100644 gl/m4/xalloc.m4 create mode 100644 gl/m4/xgetcwd.m4 create mode 100644 gl/m4/xsize.m4 create mode 100644 gl/m4/xstrndup.m4 create mode 100644 gl/m4/xstrtod.m4 create mode 100644 gl/m4/xstrtol.m4 create mode 100644 gl/m4/yesno.m4 create mode 100644 gl/m4/yield.m4 delete mode 100644 gnulib/Makefile.in delete mode 100644 gnulib/lib/Makefile.am delete mode 100644 gnulib/lib/Makefile.in delete mode 100644 gnulib/lib/alloca.c delete mode 100644 gnulib/lib/alloca.in.h delete mode 100644 gnulib/lib/areadlink-with-size.c delete mode 100644 gnulib/lib/areadlink.c delete mode 100644 gnulib/lib/areadlink.h delete mode 100644 gnulib/lib/areadlinkat.c delete mode 100644 gnulib/lib/argmatch.c delete mode 100644 gnulib/lib/argmatch.h delete mode 100644 gnulib/lib/asnprintf.c delete mode 100644 gnulib/lib/at-func.c delete mode 100644 gnulib/lib/basename-lgpl.c delete mode 100644 gnulib/lib/basename.c delete mode 100644 gnulib/lib/bitrotate.h delete mode 100644 gnulib/lib/btowc.c delete mode 100644 gnulib/lib/c-ctype.c delete mode 100644 gnulib/lib/c-ctype.h delete mode 100644 gnulib/lib/c-strcase.h delete mode 100644 gnulib/lib/c-strcasecmp.c delete mode 100644 gnulib/lib/c-strcasestr.c delete mode 100644 gnulib/lib/c-strcasestr.h delete mode 100644 gnulib/lib/c-strncasecmp.c delete mode 100644 gnulib/lib/c-strstr.c delete mode 100644 gnulib/lib/c-strstr.h delete mode 100644 gnulib/lib/canonicalize.c delete mode 100644 gnulib/lib/canonicalize.h delete mode 100644 gnulib/lib/chdir-long.c delete mode 100644 gnulib/lib/chdir-long.h delete mode 100644 gnulib/lib/chown.c delete mode 100644 gnulib/lib/cloexec.c delete mode 100644 gnulib/lib/cloexec.h delete mode 100644 gnulib/lib/close-hook.c delete mode 100644 gnulib/lib/close-hook.h delete mode 100644 gnulib/lib/close-stream.c delete mode 100644 gnulib/lib/close.c delete mode 100644 gnulib/lib/closein.c delete mode 100644 gnulib/lib/closein.h delete mode 100644 gnulib/lib/closeout.c delete mode 100644 gnulib/lib/closeout.h delete mode 100644 gnulib/lib/config.charset delete mode 100644 gnulib/lib/creat-safer.c delete mode 100644 gnulib/lib/ctype.in.h delete mode 100644 gnulib/lib/cycle-check.c delete mode 100644 gnulib/lib/cycle-check.h delete mode 100644 gnulib/lib/dirent--.h delete mode 100644 gnulib/lib/dirent-safer.h delete mode 100644 gnulib/lib/dirent.in.h delete mode 100644 gnulib/lib/dirfd.c delete mode 100644 gnulib/lib/dirname-lgpl.c delete mode 100644 gnulib/lib/dirname.c delete mode 100644 gnulib/lib/dirname.h delete mode 100644 gnulib/lib/dosname.h delete mode 100644 gnulib/lib/dup-safer.c delete mode 100644 gnulib/lib/dup2.c delete mode 100644 gnulib/lib/errno.in.h delete mode 100644 gnulib/lib/error.c delete mode 100644 gnulib/lib/error.h delete mode 100644 gnulib/lib/euidaccess.c delete mode 100644 gnulib/lib/exitfail.c delete mode 100644 gnulib/lib/exitfail.h delete mode 100644 gnulib/lib/faccessat.c delete mode 100644 gnulib/lib/fchdir.c delete mode 100644 gnulib/lib/fchmodat.c delete mode 100644 gnulib/lib/fchown-stub.c delete mode 100644 gnulib/lib/fchownat.c delete mode 100644 gnulib/lib/fclose.c delete mode 100644 gnulib/lib/fcntl--.h delete mode 100644 gnulib/lib/fcntl-safer.h delete mode 100644 gnulib/lib/fcntl.c delete mode 100644 gnulib/lib/fcntl.in.h delete mode 100644 gnulib/lib/fd-safer.c delete mode 100644 gnulib/lib/fdopendir.c delete mode 100644 gnulib/lib/fflush.c delete mode 100644 gnulib/lib/file-set.c delete mode 100644 gnulib/lib/file-set.h delete mode 100644 gnulib/lib/fileblocks.c delete mode 100644 gnulib/lib/filemode.c delete mode 100644 gnulib/lib/filemode.h delete mode 100644 gnulib/lib/float+.h delete mode 100644 gnulib/lib/float.in.h delete mode 100644 gnulib/lib/fnmatch.c delete mode 100644 gnulib/lib/fnmatch.in.h delete mode 100644 gnulib/lib/fnmatch_loop.c delete mode 100644 gnulib/lib/fopen-safer.c delete mode 100644 gnulib/lib/fopen.c delete mode 100644 gnulib/lib/fpending.c delete mode 100644 gnulib/lib/fpending.h delete mode 100644 gnulib/lib/fpurge.c delete mode 100644 gnulib/lib/freadahead.c delete mode 100644 gnulib/lib/freadahead.h delete mode 100644 gnulib/lib/freading.c delete mode 100644 gnulib/lib/freading.h delete mode 100644 gnulib/lib/fseeko.c delete mode 100644 gnulib/lib/fstatat.c delete mode 100644 gnulib/lib/ftello.c delete mode 100644 gnulib/lib/fts-cycle.c delete mode 100644 gnulib/lib/fts.c delete mode 100644 gnulib/lib/fts_.h delete mode 100644 gnulib/lib/getcwd.c delete mode 100644 gnulib/lib/getdelim.c delete mode 100644 gnulib/lib/getdtablesize.c delete mode 100644 gnulib/lib/getfilecon.c delete mode 100644 gnulib/lib/getgroups.c delete mode 100644 gnulib/lib/getline.c delete mode 100644 gnulib/lib/getopt.c delete mode 100644 gnulib/lib/getopt.in.h delete mode 100644 gnulib/lib/getopt1.c delete mode 100644 gnulib/lib/getopt_int.h delete mode 100644 gnulib/lib/gettext.h delete mode 100644 gnulib/lib/gettime.c delete mode 100644 gnulib/lib/gettimeofday.c delete mode 100644 gnulib/lib/group-member.c delete mode 100644 gnulib/lib/group-member.h delete mode 100644 gnulib/lib/hash-pjw.c delete mode 100644 gnulib/lib/hash-pjw.h delete mode 100644 gnulib/lib/hash-triple.c delete mode 100644 gnulib/lib/hash-triple.h delete mode 100644 gnulib/lib/hash.c delete mode 100644 gnulib/lib/hash.h delete mode 100644 gnulib/lib/human.c delete mode 100644 gnulib/lib/human.h delete mode 100644 gnulib/lib/i-ring.c delete mode 100644 gnulib/lib/i-ring.h delete mode 100644 gnulib/lib/idcache.c delete mode 100644 gnulib/lib/intprops.h delete mode 100644 gnulib/lib/inttypes.in.h delete mode 100644 gnulib/lib/isblank.c delete mode 100644 gnulib/lib/iswblank.c delete mode 100644 gnulib/lib/langinfo.in.h delete mode 100644 gnulib/lib/lchown.c delete mode 100644 gnulib/lib/localcharset.c delete mode 100644 gnulib/lib/localcharset.h delete mode 100644 gnulib/lib/locale.in.h delete mode 100644 gnulib/lib/lseek.c delete mode 100644 gnulib/lib/lstat.c delete mode 100644 gnulib/lib/malloc.c delete mode 100644 gnulib/lib/malloca.c delete mode 100644 gnulib/lib/malloca.h delete mode 100644 gnulib/lib/math.in.h delete mode 100644 gnulib/lib/mbchar.c delete mode 100644 gnulib/lib/mbchar.h delete mode 100644 gnulib/lib/mbrtowc.c delete mode 100644 gnulib/lib/mbscasestr.c delete mode 100644 gnulib/lib/mbsinit.c delete mode 100644 gnulib/lib/mbslen.c delete mode 100644 gnulib/lib/mbsrtowcs-impl.h delete mode 100644 gnulib/lib/mbsrtowcs-state.c delete mode 100644 gnulib/lib/mbsrtowcs.c delete mode 100644 gnulib/lib/mbsstr.c delete mode 100644 gnulib/lib/mbtowc-impl.h delete mode 100644 gnulib/lib/mbtowc.c delete mode 100644 gnulib/lib/mbuiter.h delete mode 100644 gnulib/lib/memchr.c delete mode 100644 gnulib/lib/mempcpy.c delete mode 100644 gnulib/lib/memrchr.c delete mode 100644 gnulib/lib/mkdir.c delete mode 100644 gnulib/lib/mkdirat.c delete mode 100644 gnulib/lib/mktime.c delete mode 100644 gnulib/lib/modechange.c delete mode 100644 gnulib/lib/modechange.h delete mode 100644 gnulib/lib/mountlist.c delete mode 100644 gnulib/lib/mountlist.h delete mode 100644 gnulib/lib/nl_langinfo.c delete mode 100644 gnulib/lib/open-safer.c delete mode 100644 gnulib/lib/open.c delete mode 100644 gnulib/lib/openat-die.c delete mode 100644 gnulib/lib/openat-priv.h delete mode 100644 gnulib/lib/openat-proc.c delete mode 100644 gnulib/lib/openat-safer.c delete mode 100644 gnulib/lib/openat.c delete mode 100644 gnulib/lib/openat.h delete mode 100644 gnulib/lib/opendir-safer.c delete mode 100644 gnulib/lib/parse-datetime.c delete mode 100644 gnulib/lib/parse-datetime.h delete mode 100644 gnulib/lib/parse-datetime.y delete mode 100644 gnulib/lib/pathmax.h delete mode 100644 gnulib/lib/perror.c delete mode 100644 gnulib/lib/pipe-safer.c delete mode 100644 gnulib/lib/printf-args.c delete mode 100644 gnulib/lib/printf-args.h delete mode 100644 gnulib/lib/printf-parse.c delete mode 100644 gnulib/lib/printf-parse.h delete mode 100644 gnulib/lib/progname.c delete mode 100644 gnulib/lib/progname.h delete mode 100644 gnulib/lib/quote.c delete mode 100644 gnulib/lib/quote.h delete mode 100644 gnulib/lib/quotearg.c delete mode 100644 gnulib/lib/quotearg.h delete mode 100644 gnulib/lib/readlink.c delete mode 100644 gnulib/lib/readlinkat.c delete mode 100644 gnulib/lib/realloc.c delete mode 100644 gnulib/lib/ref-add.sin delete mode 100644 gnulib/lib/ref-del.sin delete mode 100644 gnulib/lib/regcomp.c delete mode 100644 gnulib/lib/regex.c delete mode 100644 gnulib/lib/regex.h delete mode 100644 gnulib/lib/regex_internal.c delete mode 100644 gnulib/lib/regex_internal.h delete mode 100644 gnulib/lib/regexec.c delete mode 100644 gnulib/lib/rmdir.c delete mode 100644 gnulib/lib/rpmatch.c delete mode 100644 gnulib/lib/same-inode.h delete mode 100644 gnulib/lib/same.c delete mode 100644 gnulib/lib/same.h delete mode 100644 gnulib/lib/save-cwd.c delete mode 100644 gnulib/lib/save-cwd.h delete mode 100644 gnulib/lib/savedir.c delete mode 100644 gnulib/lib/savedir.h delete mode 100644 gnulib/lib/se-context.in.h delete mode 100644 gnulib/lib/se-selinux.in.h delete mode 100644 gnulib/lib/selinux-at.c delete mode 100644 gnulib/lib/selinux-at.h delete mode 100644 gnulib/lib/setenv.c delete mode 100644 gnulib/lib/size_max.h delete mode 100644 gnulib/lib/snprintf.c delete mode 100644 gnulib/lib/stat-time.h delete mode 100644 gnulib/lib/stat.c delete mode 100644 gnulib/lib/stdarg.in.h delete mode 100644 gnulib/lib/stdbool.in.h delete mode 100644 gnulib/lib/stddef.in.h delete mode 100644 gnulib/lib/stdint.in.h delete mode 100644 gnulib/lib/stdio--.h delete mode 100644 gnulib/lib/stdio-impl.h delete mode 100644 gnulib/lib/stdio-safer.h delete mode 100644 gnulib/lib/stdio.in.h delete mode 100644 gnulib/lib/stdlib.in.h delete mode 100644 gnulib/lib/stpcpy.c delete mode 100644 gnulib/lib/str-kmp.h delete mode 100644 gnulib/lib/str-two-way.h delete mode 100644 gnulib/lib/strcasecmp.c delete mode 100644 gnulib/lib/strcasestr.c delete mode 100644 gnulib/lib/strdup.c delete mode 100644 gnulib/lib/streq.h delete mode 100644 gnulib/lib/strerror.c delete mode 100644 gnulib/lib/strftime.c delete mode 100644 gnulib/lib/strftime.h delete mode 100644 gnulib/lib/string.in.h delete mode 100644 gnulib/lib/strings.in.h delete mode 100644 gnulib/lib/stripslash.c delete mode 100644 gnulib/lib/strncasecmp.c delete mode 100644 gnulib/lib/strndup.c delete mode 100644 gnulib/lib/strnlen.c delete mode 100644 gnulib/lib/strnlen1.c delete mode 100644 gnulib/lib/strnlen1.h delete mode 100644 gnulib/lib/strstr.c delete mode 100644 gnulib/lib/strtoimax.c delete mode 100644 gnulib/lib/strtol.c delete mode 100644 gnulib/lib/strtoll.c delete mode 100644 gnulib/lib/strtoul.c delete mode 100644 gnulib/lib/strtoull.c delete mode 100644 gnulib/lib/sys_stat.in.h delete mode 100644 gnulib/lib/sys_time.in.h delete mode 100644 gnulib/lib/sys_wait.in.h delete mode 100644 gnulib/lib/time.in.h delete mode 100644 gnulib/lib/time_r.c delete mode 100644 gnulib/lib/timespec.h delete mode 100644 gnulib/lib/unistd--.h delete mode 100644 gnulib/lib/unistd-safer.h delete mode 100644 gnulib/lib/unistd.in.h delete mode 100644 gnulib/lib/unitypes.in.h delete mode 100644 gnulib/lib/uniwidth.in.h delete mode 100644 gnulib/lib/uniwidth/cjk.h delete mode 100644 gnulib/lib/uniwidth/width.c delete mode 100644 gnulib/lib/unlink.c delete mode 100644 gnulib/lib/unlinkat.c delete mode 100644 gnulib/lib/unsetenv.c delete mode 100644 gnulib/lib/vasnprintf.c delete mode 100644 gnulib/lib/vasnprintf.h delete mode 100644 gnulib/lib/verify.h delete mode 100644 gnulib/lib/version-etc-fsf.c delete mode 100644 gnulib/lib/version-etc.c delete mode 100644 gnulib/lib/version-etc.h delete mode 100644 gnulib/lib/wchar.in.h delete mode 100644 gnulib/lib/wcrtomb.c delete mode 100644 gnulib/lib/wctype.in.h delete mode 100644 gnulib/lib/wcwidth.c delete mode 100644 gnulib/lib/xalloc-die.c delete mode 100644 gnulib/lib/xalloc.h delete mode 100644 gnulib/lib/xgetcwd.c delete mode 100644 gnulib/lib/xgetcwd.h delete mode 100644 gnulib/lib/xmalloc.c delete mode 100644 gnulib/lib/xsize.h delete mode 100644 gnulib/lib/xstrndup.c delete mode 100644 gnulib/lib/xstrndup.h delete mode 100644 gnulib/lib/xstrtod.c delete mode 100644 gnulib/lib/xstrtod.h delete mode 100644 gnulib/lib/xstrtol-error.c delete mode 100644 gnulib/lib/xstrtol.c delete mode 100644 gnulib/lib/xstrtol.h delete mode 100644 gnulib/lib/yesno.c delete mode 100644 gnulib/lib/yesno.h delete mode 100644 gnulib/m4/00gnulib.m4 delete mode 100644 gnulib/m4/alloca.m4 delete mode 100644 gnulib/m4/argmatch.m4 delete mode 100644 gnulib/m4/assert.m4 delete mode 100644 gnulib/m4/bison.m4 delete mode 100644 gnulib/m4/btowc.m4 delete mode 100644 gnulib/m4/canonicalize.m4 delete mode 100644 gnulib/m4/chdir-long.m4 delete mode 100644 gnulib/m4/chown.m4 delete mode 100644 gnulib/m4/clock_time.m4 delete mode 100644 gnulib/m4/cloexec.m4 delete mode 100644 gnulib/m4/close-stream.m4 delete mode 100644 gnulib/m4/close.m4 delete mode 100644 gnulib/m4/closein.m4 delete mode 100644 gnulib/m4/closeout.m4 delete mode 100644 gnulib/m4/codeset.m4 delete mode 100644 gnulib/m4/configmake.m4 delete mode 100644 gnulib/m4/ctype.m4 delete mode 100644 gnulib/m4/cycle-check.m4 delete mode 100644 gnulib/m4/d-ino.m4 delete mode 100644 gnulib/m4/d-type.m4 delete mode 100644 gnulib/m4/dirent-safer.m4 delete mode 100644 gnulib/m4/dirent_h.m4 delete mode 100644 gnulib/m4/dirfd.m4 delete mode 100644 gnulib/m4/dirname.m4 delete mode 100644 gnulib/m4/double-slash-root.m4 delete mode 100644 gnulib/m4/dup2.m4 delete mode 100644 gnulib/m4/eealloc.m4 delete mode 100644 gnulib/m4/environ.m4 delete mode 100644 gnulib/m4/errno_h.m4 delete mode 100644 gnulib/m4/error.m4 delete mode 100644 gnulib/m4/euidaccess.m4 delete mode 100644 gnulib/m4/extensions.m4 delete mode 100644 gnulib/m4/faccessat.m4 delete mode 100644 gnulib/m4/fchdir.m4 delete mode 100644 gnulib/m4/fclose.m4 delete mode 100644 gnulib/m4/fcntl-o.m4 delete mode 100644 gnulib/m4/fcntl-safer.m4 delete mode 100644 gnulib/m4/fcntl.m4 delete mode 100644 gnulib/m4/fcntl_h.m4 delete mode 100644 gnulib/m4/fdopendir.m4 delete mode 100644 gnulib/m4/fflush.m4 delete mode 100644 gnulib/m4/fileblocks.m4 delete mode 100644 gnulib/m4/filemode.m4 delete mode 100644 gnulib/m4/flexmember.m4 delete mode 100644 gnulib/m4/float_h.m4 delete mode 100644 gnulib/m4/fnmatch.m4 delete mode 100644 gnulib/m4/fopen.m4 delete mode 100644 gnulib/m4/fpending.m4 delete mode 100644 gnulib/m4/fpurge.m4 delete mode 100644 gnulib/m4/freading.m4 delete mode 100644 gnulib/m4/fseeko.m4 delete mode 100644 gnulib/m4/fstypename.m4 delete mode 100644 gnulib/m4/ftell.m4 delete mode 100644 gnulib/m4/ftello.m4 delete mode 100644 gnulib/m4/fts.m4 delete mode 100644 gnulib/m4/getcwd-abort-bug.m4 delete mode 100644 gnulib/m4/getcwd-path-max.m4 delete mode 100644 gnulib/m4/getcwd.m4 delete mode 100644 gnulib/m4/getdelim.m4 delete mode 100644 gnulib/m4/getdtablesize.m4 delete mode 100644 gnulib/m4/getgroups.m4 delete mode 100644 gnulib/m4/getline.m4 delete mode 100644 gnulib/m4/getopt.m4 delete mode 100644 gnulib/m4/getpagesize.m4 delete mode 100644 gnulib/m4/gettext.m4 delete mode 100644 gnulib/m4/gettime.m4 delete mode 100644 gnulib/m4/gettimeofday.m4 delete mode 100644 gnulib/m4/getugroups.m4 delete mode 100644 gnulib/m4/glibc21.m4 delete mode 100644 gnulib/m4/gnulib-cache.m4 delete mode 100644 gnulib/m4/gnulib-common.m4 delete mode 100644 gnulib/m4/gnulib-comp.m4 delete mode 100644 gnulib/m4/group-member.m4 delete mode 100644 gnulib/m4/hash.m4 delete mode 100644 gnulib/m4/human.m4 delete mode 100644 gnulib/m4/i-ring.m4 delete mode 100644 gnulib/m4/iconv.m4 delete mode 100644 gnulib/m4/idcache.m4 delete mode 100644 gnulib/m4/include_next.m4 delete mode 100644 gnulib/m4/inline.m4 delete mode 100644 gnulib/m4/intlmacosx.m4 delete mode 100644 gnulib/m4/intmax_t.m4 delete mode 100644 gnulib/m4/inttostr.m4 delete mode 100644 gnulib/m4/inttypes-pri.m4 delete mode 100644 gnulib/m4/inttypes.m4 delete mode 100644 gnulib/m4/inttypes_h.m4 delete mode 100644 gnulib/m4/isblank.m4 delete mode 100644 gnulib/m4/iswblank.m4 delete mode 100644 gnulib/m4/langinfo_h.m4 delete mode 100644 gnulib/m4/lchown.m4 delete mode 100644 gnulib/m4/lcmessage.m4 delete mode 100644 gnulib/m4/lib-ld.m4 delete mode 100644 gnulib/m4/lib-link.m4 delete mode 100644 gnulib/m4/lib-prefix.m4 delete mode 100644 gnulib/m4/libunistring-base.m4 delete mode 100644 gnulib/m4/localcharset.m4 delete mode 100644 gnulib/m4/locale-fr.m4 delete mode 100644 gnulib/m4/locale-ja.m4 delete mode 100644 gnulib/m4/locale-tr.m4 delete mode 100644 gnulib/m4/locale-zh.m4 delete mode 100644 gnulib/m4/locale_h.m4 delete mode 100644 gnulib/m4/localename.m4 delete mode 100644 gnulib/m4/lock.m4 delete mode 100644 gnulib/m4/longlong.m4 delete mode 100644 gnulib/m4/ls-mntd-fs.m4 delete mode 100644 gnulib/m4/lseek.m4 delete mode 100644 gnulib/m4/lstat.m4 delete mode 100644 gnulib/m4/malloc.m4 delete mode 100644 gnulib/m4/malloca.m4 delete mode 100644 gnulib/m4/math_h.m4 delete mode 100644 gnulib/m4/mathfunc.m4 delete mode 100644 gnulib/m4/mbchar.m4 delete mode 100644 gnulib/m4/mbiter.m4 delete mode 100644 gnulib/m4/mbrtowc.m4 delete mode 100644 gnulib/m4/mbsinit.m4 delete mode 100644 gnulib/m4/mbslen.m4 delete mode 100644 gnulib/m4/mbsrtowcs.m4 delete mode 100644 gnulib/m4/mbstate_t.m4 delete mode 100644 gnulib/m4/mbtowc.m4 delete mode 100644 gnulib/m4/memchr.m4 delete mode 100644 gnulib/m4/mempcpy.m4 delete mode 100644 gnulib/m4/memrchr.m4 delete mode 100644 gnulib/m4/mgetgroups.m4 delete mode 100644 gnulib/m4/mkdir.m4 delete mode 100644 gnulib/m4/mktime.m4 delete mode 100644 gnulib/m4/mmap-anon.m4 delete mode 100644 gnulib/m4/mode_t.m4 delete mode 100644 gnulib/m4/modechange.m4 delete mode 100644 gnulib/m4/mountlist.m4 delete mode 100644 gnulib/m4/multiarch.m4 delete mode 100644 gnulib/m4/nl_langinfo.m4 delete mode 100644 gnulib/m4/nls.m4 delete mode 100644 gnulib/m4/onceonly.m4 delete mode 100644 gnulib/m4/open.m4 delete mode 100644 gnulib/m4/openat.m4 delete mode 100644 gnulib/m4/parse-datetime.m4 delete mode 100644 gnulib/m4/pathmax.m4 delete mode 100644 gnulib/m4/perror.m4 delete mode 100644 gnulib/m4/po.m4 delete mode 100644 gnulib/m4/printf.m4 delete mode 100644 gnulib/m4/priv-set.m4 delete mode 100644 gnulib/m4/progtest.m4 delete mode 100644 gnulib/m4/putenv.m4 delete mode 100644 gnulib/m4/quote.m4 delete mode 100644 gnulib/m4/quotearg.m4 delete mode 100644 gnulib/m4/readlink.m4 delete mode 100644 gnulib/m4/readlinkat.m4 delete mode 100644 gnulib/m4/realloc.m4 delete mode 100644 gnulib/m4/regex.m4 delete mode 100644 gnulib/m4/rmdir.m4 delete mode 100644 gnulib/m4/rpmatch.m4 delete mode 100644 gnulib/m4/same.m4 delete mode 100644 gnulib/m4/save-cwd.m4 delete mode 100644 gnulib/m4/savedir.m4 delete mode 100644 gnulib/m4/selinux-context-h.m4 delete mode 100644 gnulib/m4/selinux-selinux-h.m4 delete mode 100644 gnulib/m4/setenv.m4 delete mode 100644 gnulib/m4/setlocale.m4 delete mode 100644 gnulib/m4/size_max.m4 delete mode 100644 gnulib/m4/sleep.m4 delete mode 100644 gnulib/m4/snprintf.m4 delete mode 100644 gnulib/m4/ssize_t.m4 delete mode 100644 gnulib/m4/st_dm_mode.m4 delete mode 100644 gnulib/m4/stat-time.m4 delete mode 100644 gnulib/m4/stat.m4 delete mode 100644 gnulib/m4/stdarg.m4 delete mode 100644 gnulib/m4/stdbool.m4 delete mode 100644 gnulib/m4/stddef_h.m4 delete mode 100644 gnulib/m4/stdint.m4 delete mode 100644 gnulib/m4/stdint_h.m4 delete mode 100644 gnulib/m4/stdio-safer.m4 delete mode 100644 gnulib/m4/stdio_h.m4 delete mode 100644 gnulib/m4/stdlib_h.m4 delete mode 100644 gnulib/m4/stpcpy.m4 delete mode 100644 gnulib/m4/strcase.m4 delete mode 100644 gnulib/m4/strcasestr.m4 delete mode 100644 gnulib/m4/strdup.m4 delete mode 100644 gnulib/m4/strerror.m4 delete mode 100644 gnulib/m4/strftime.m4 delete mode 100644 gnulib/m4/string_h.m4 delete mode 100644 gnulib/m4/strings_h.m4 delete mode 100644 gnulib/m4/strndup.m4 delete mode 100644 gnulib/m4/strnlen.m4 delete mode 100644 gnulib/m4/strstr.m4 delete mode 100644 gnulib/m4/strtoimax.m4 delete mode 100644 gnulib/m4/strtol.m4 delete mode 100644 gnulib/m4/strtoll.m4 delete mode 100644 gnulib/m4/strtoul.m4 delete mode 100644 gnulib/m4/strtoull.m4 delete mode 100644 gnulib/m4/strtoumax.m4 delete mode 100644 gnulib/m4/symlink.m4 delete mode 100644 gnulib/m4/symlinkat.m4 delete mode 100644 gnulib/m4/sys_stat_h.m4 delete mode 100644 gnulib/m4/sys_time_h.m4 delete mode 100644 gnulib/m4/sys_wait_h.m4 delete mode 100644 gnulib/m4/thread.m4 delete mode 100644 gnulib/m4/threadlib.m4 delete mode 100644 gnulib/m4/time_h.m4 delete mode 100644 gnulib/m4/time_r.m4 delete mode 100644 gnulib/m4/timespec.m4 delete mode 100644 gnulib/m4/tm_gmtoff.m4 delete mode 100644 gnulib/m4/ungetc.m4 delete mode 100644 gnulib/m4/unistd-safer.m4 delete mode 100644 gnulib/m4/unistd_h.m4 delete mode 100644 gnulib/m4/unlink.m4 delete mode 100644 gnulib/m4/unlinkdir.m4 delete mode 100644 gnulib/m4/usleep.m4 delete mode 100644 gnulib/m4/vasnprintf.m4 delete mode 100644 gnulib/m4/version-etc.m4 delete mode 100644 gnulib/m4/warn-on-use.m4 delete mode 100644 gnulib/m4/warnings.m4 delete mode 100644 gnulib/m4/wchar_h.m4 delete mode 100644 gnulib/m4/wchar_t.m4 delete mode 100644 gnulib/m4/wcrtomb.m4 delete mode 100644 gnulib/m4/wctob.m4 delete mode 100644 gnulib/m4/wctomb.m4 delete mode 100644 gnulib/m4/wctype_h.m4 delete mode 100644 gnulib/m4/wcwidth.m4 delete mode 100644 gnulib/m4/wint_t.m4 delete mode 100644 gnulib/m4/xalloc.m4 delete mode 100644 gnulib/m4/xgetcwd.m4 delete mode 100644 gnulib/m4/xsize.m4 delete mode 100644 gnulib/m4/xstrndup.m4 delete mode 100644 gnulib/m4/xstrtod.m4 delete mode 100644 gnulib/m4/xstrtol.m4 delete mode 100644 gnulib/m4/yesno.m4 delete mode 100644 gnulib/m4/yield.m4 delete mode 100644 lib/arg-max.h delete mode 100644 lib/gnulib-version.c delete mode 100644 lib/gnulib-version.h delete mode 100644 lib/nextelem.c delete mode 100644 lib/nextelem.h delete mode 100644 lib/savedirinfo.c delete mode 100644 lib/savedirinfo.h create mode 100644 lib/splitstring.c create mode 100644 lib/splitstring.h create mode 100644 lib/test_splitstring.c create mode 100644 locate/testsuite/locate.gnu/oldformat.exp create mode 100644 locate/testsuite/locate.gnu/oldformat.xo create mode 100644 locate/testsuite/locate.gnu/slocate.exp create mode 100644 locate/testsuite/locate.gnu/slocate.xo create mode 100644 tests/accept.c create mode 100644 tests/arpa_inet.in.h create mode 100644 tests/at-func.c create mode 100644 tests/binary-io.c create mode 100644 tests/bind.c create mode 100644 tests/connect.c create mode 100644 tests/fdopen.c create mode 100644 tests/fpucw.h delete mode 100644 tests/ftell.c create mode 100644 tests/ftruncate.c delete mode 100644 tests/getugroups.c delete mode 100644 tests/getugroups.h delete mode 100644 tests/glthread/lock.c delete mode 100644 tests/glthread/lock.h delete mode 100644 tests/glthread/threadlib.c create mode 100644 tests/inet_pton.c create mode 100644 tests/infinity.h create mode 100644 tests/ioctl.c create mode 100644 tests/listen.c delete mode 100644 tests/mgetgroups.c delete mode 100644 tests/mgetgroups.h create mode 100644 tests/minus-zero.h create mode 100644 tests/nan.h create mode 100644 tests/nanosleep.c create mode 100644 tests/netinet_in.in.h create mode 100644 tests/pipe.c create mode 100644 tests/raise.c create mode 100644 tests/randomd.c create mode 100644 tests/select.c create mode 100644 tests/setsockopt.c create mode 100644 tests/sig-handler.c create mode 100644 tests/sig-handler.h create mode 100644 tests/sigaction.c create mode 100644 tests/signal.in.h create mode 100644 tests/sigprocmask.c create mode 100644 tests/socket.c create mode 100644 tests/sys_ioctl.in.h create mode 100644 tests/sys_select.in.h create mode 100644 tests/test-accept.c create mode 100644 tests/test-arpa_inet.c create mode 100644 tests/test-bind.c create mode 100644 tests/test-byteswap.c create mode 100644 tests/test-chdir.c delete mode 100644 tests/test-chown.c delete mode 100644 tests/test-chown.h create mode 100644 tests/test-close.c create mode 100644 tests/test-connect.c create mode 100644 tests/test-dup.c create mode 100644 tests/test-faccessat.c delete mode 100644 tests/test-fchownat.c create mode 100644 tests/test-fdopen.c create mode 100644 tests/test-fgetc.c create mode 100644 tests/test-float.c create mode 100644 tests/test-fputc.c create mode 100644 tests/test-fread.c create mode 100644 tests/test-fseek.c create mode 100755 tests/test-fseek.sh create mode 100755 tests/test-fseek2.sh create mode 100644 tests/test-fseeko3.c create mode 100755 tests/test-fseeko3.sh create mode 100644 tests/test-fseeko4.c create mode 100755 tests/test-fseeko4.sh create mode 100644 tests/test-fstat.c create mode 100644 tests/test-ftello4.c create mode 100755 tests/test-ftello4.sh create mode 100644 tests/test-ftruncate.c create mode 100755 tests/test-ftruncate.sh create mode 100644 tests/test-fwrite.c create mode 100644 tests/test-getcwd-lgpl.c create mode 100755 tests/test-getcwd.sh create mode 100644 tests/test-gethostname.c create mode 100644 tests/test-inet_pton.c create mode 100755 tests/test-init.sh create mode 100644 tests/test-intprops.c create mode 100644 tests/test-ioctl.c create mode 100644 tests/test-isfinite.c create mode 100644 tests/test-isinf.c create mode 100644 tests/test-isnand-nolibm.c create mode 100644 tests/test-isnand.h create mode 100644 tests/test-isnanf-nolibm.c create mode 100644 tests/test-isnanf.h create mode 100644 tests/test-isnanl-nolibm.c create mode 100644 tests/test-isnanl.h delete mode 100644 tests/test-lchown.c delete mode 100644 tests/test-lchown.h create mode 100644 tests/test-listen.c create mode 100644 tests/test-localeconv.c delete mode 100644 tests/test-mkdir.c delete mode 100644 tests/test-mkdir.h delete mode 100644 tests/test-mkdirat.c create mode 100644 tests/test-modf.h create mode 100644 tests/test-nanosleep.c create mode 100644 tests/test-netinet_in.c create mode 100644 tests/test-pathmax.c create mode 100644 tests/test-perror2.c create mode 100644 tests/test-pipe.c create mode 100644 tests/test-raise.c create mode 100644 tests/test-read.c create mode 100644 tests/test-regex.c create mode 100644 tests/test-select-fd.c create mode 100755 tests/test-select-in.sh create mode 100755 tests/test-select-out.sh create mode 100644 tests/test-select-stdin.c create mode 100644 tests/test-select.c create mode 100644 tests/test-select.h create mode 100644 tests/test-setsockopt.c create mode 100644 tests/test-sigaction.c create mode 100644 tests/test-signal-h.c create mode 100644 tests/test-sigprocmask.c create mode 100644 tests/test-sockets.c create mode 100644 tests/test-statat.c create mode 100644 tests/test-stdalign.c create mode 100644 tests/test-strerror_r.c create mode 100644 tests/test-strtol.c create mode 100644 tests/test-strtoul.c create mode 100644 tests/test-strtoull.c create mode 100644 tests/test-strtoumax.c create mode 100644 tests/test-sys_ioctl.c create mode 100644 tests/test-sys_select.c create mode 100644 tests/test-sys_socket.c create mode 100644 tests/test-sys_types.c create mode 100644 tests/test-sys_uio.c create mode 100644 tests/test-sys_utsname.c create mode 100644 tests/test-thread_create.c create mode 100644 tests/test-thread_self.c create mode 100644 tests/test-trunc1.c create mode 100644 tests/test-trunc2.c create mode 100644 tests/test-uname.c delete mode 100644 tests/test-usleep.c delete mode 100644 tests/usleep.c create mode 100644 tests/w32sock.h create mode 100644 xargs/testsuite/xargs.gnu/n2-s21-0.exp rename xargs/testsuite/{xargs.posix/n2-s26.xo => xargs.gnu/n2-s21-0.xo} (100%) create mode 100644 xargs/testsuite/xargs.gnu/n2-s21-x-0.exp rename xargs/testsuite/{xargs.posix/n2-s26-x.xo => xargs.gnu/n2-s21-x-0.xo} (100%) delete mode 100644 xargs/testsuite/xargs.gnu/n2-s26-0.exp delete mode 100644 xargs/testsuite/xargs.gnu/n2-s26-x-0.exp create mode 100644 xargs/testsuite/xargs.gnu/n3-s31-0.exp rename xargs/testsuite/{xargs.posix/n3-s36.xo => xargs.gnu/n3-s31-0.xo} (100%) delete mode 100644 xargs/testsuite/xargs.gnu/n3-s36-0.exp create mode 100644 xargs/testsuite/xargs.gnu/s14-0.exp rename xargs/testsuite/{xargs.posix/s19.xo => xargs.gnu/s14-0.xo} (100%) create mode 100644 xargs/testsuite/xargs.gnu/s14_2-0.exp create mode 100644 xargs/testsuite/xargs.gnu/s15-0.exp rename xargs/testsuite/{xargs.posix/s20.xo => xargs.gnu/s15-0.xo} (100%) delete mode 100644 xargs/testsuite/xargs.gnu/s19-0.exp delete mode 100644 xargs/testsuite/xargs.gnu/s19_2-0.exp delete mode 100644 xargs/testsuite/xargs.gnu/s20-0.exp create mode 100644 xargs/testsuite/xargs.gnu/s25-0.exp rename xargs/testsuite/{xargs.sysv/s30-t.xo => xargs.gnu/s25-0.xo} (100%) delete mode 100644 xargs/testsuite/xargs.gnu/s30-0.exp create mode 100644 xargs/testsuite/xargs.posix/n2-s21-x.exp rename xargs/testsuite/{xargs.gnu/n2-s26-x-0.xo => xargs.posix/n2-s21-x.xo} (100%) create mode 100644 xargs/testsuite/xargs.posix/n2-s21.exp rename xargs/testsuite/{xargs.gnu/n2-s26-0.xo => xargs.posix/n2-s21.xo} (100%) delete mode 100644 xargs/testsuite/xargs.posix/n2-s26-x.exp delete mode 100644 xargs/testsuite/xargs.posix/n2-s26.exp create mode 100644 xargs/testsuite/xargs.posix/n3-s31.exp rename xargs/testsuite/{xargs.gnu/n3-s36-0.xo => xargs.posix/n3-s31.xo} (100%) delete mode 100644 xargs/testsuite/xargs.posix/n3-s36.exp create mode 100644 xargs/testsuite/xargs.posix/s14.exp rename xargs/testsuite/{xargs.gnu/s19-0.xo => xargs.posix/s14.xo} (100%) create mode 100644 xargs/testsuite/xargs.posix/s14_2.exp create mode 100644 xargs/testsuite/xargs.posix/s15.exp rename xargs/testsuite/{xargs.gnu/s20-0.xo => xargs.posix/s15.xo} (100%) delete mode 100644 xargs/testsuite/xargs.posix/s19.exp delete mode 100644 xargs/testsuite/xargs.posix/s19_2.exp delete mode 100644 xargs/testsuite/xargs.posix/s20.exp create mode 100644 xargs/testsuite/xargs.posix/s25.exp rename xargs/testsuite/xargs.posix/{s30.xo => s25.xo} (100%) delete mode 100644 xargs/testsuite/xargs.posix/s30.exp create mode 100644 xargs/testsuite/xargs.posix/s42.exp rename xargs/testsuite/xargs.posix/{s47.xo => s42.xo} (100%) delete mode 100644 xargs/testsuite/xargs.posix/s47.exp create mode 100644 xargs/testsuite/xargs.sysv/s25-t.exp create mode 100644 xargs/testsuite/xargs.sysv/s25-t.xe rename xargs/testsuite/{xargs.gnu/s30-0.xo => xargs.sysv/s25-t.xo} (100%) delete mode 100644 xargs/testsuite/xargs.sysv/s30-t.exp delete mode 100644 xargs/testsuite/xargs.sysv/s30-t.xe diff --git a/AUTHORS b/AUTHORS index 5038582..5a959ed 100644 --- a/AUTHORS +++ b/AUTHORS @@ -30,6 +30,7 @@ Bas van Gompel Eric Blake Andreas Metzler Kamil Dudka +Bernhard Voelker The current maintainer of the findutils package is James Youngman. Questions about findutils should be addressed to the mailing list, diff --git a/ChangeLog b/ChangeLog index 9aaef49..cbce88e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,1764 @@ +2014-07-19 James Youngman + + Release findutils-4.5.14. + * configure.ac: Update version number to 4.5.14. + * NEWS: Likewise, and add today's date. + * po/*: Update with 'make dist'. + + Standardize on "initialize". + * find/exec.c (initialise_wd_for_exec): rename to + initialize_wd_for_exec, since "initialize" is the preferred form + even in UK spelling (the OED says "initialise" is a variant). + Update callers (it's a static function). Update spelling in + comments. + * find/find.c (main): Fix missing "to" in error message and update + "initialise" to "initialize". Update comment too. + * find/ftsfind.c (main): Update spelling in error message. + * lib/listfile.c (print_name_with_quoting): spelling change in + comment. + * find/tree.c (init_pred_perf): Likewise. + * lib/extendbuf.c (extendbuf): Likewise. + * lib/splitstring.h: Likewise. + * find/print.c (format_date): Likewise. + * doc/find-maint.texi (Tools): Update spelling. + + Bug #42793: mention the bugfix in NEWS. + * NEWS: mention the bugfix. + + Fix bug #42793: "Failed to write output" with -ls. + * lib/listfile.c (print_name_with_quoting): Avoid using the + variable fprintf_result before it is initialised. I hope this + fixes Savannah bug #42793. + + Update the version number following the recent release. + * configure.ac: Move on from 4.5.13. + * NEWS: Move on from 4.5.13. + +2014-07-16 James Youngman + + Prepare for release of 4.5.13. + * configure.ac: Change the version number to 4.5.13. + * NEWS: Mention some documentation bug fixes which have been + applied (ChangeLog entries already exist for these). Change the + version number of the top section of the NEWS file. + +2014-05-31 James Youngman + + Enable parallel tests. + * find/testsuite/Makefile.am (AUTOMAKE_OPTIONS): Enable + parallel-tests. This will only include tests known directly via + $(TESTS), not DejaGnu tests. + + Check there are no duplicate configuration entries for test files. + * find/testsuite/Makefile.am (EXTRA_DIST_XO): Remove duplicate items. + (EXTRA_DIST_EXP): Likewise. + (checklists): Run with the other checks, using check-local. Don't + echo the full command, because it will make the summary of the + Automake-driven tests scroll offscreen. + (TEST_EXTENSIONS): Add .sh and .py. + + Routinely check .xo and .exp test file lists in a clearer way. + * find/testsuite/checklists.py: Tiny program for checking that the + correct lists of .xo and .exp files exist in the Makefile.am file. + * Makefile.am (checklists): Update target to use the new program. + Make this target phony. + +2014-05-25 Eric S. Raymond + + Fix errant backslash in find manpage. + * find/find.1 (UNUSUAL FILENAMES): Fix errant backslash. + +2014-05-12 James Youngman + + Update German translation. + * po/de.po: Update German translation from the Translation + Project. + + Several updates and clarifications to README-hacking. + * README-hacking: Explain that tool-versions.txt is not checked + into git. The repository has grown from 14MB to 16MB. Gnulib is + now a submodule and the directory we keep it in has changed. + Remove the suggestion to rsync the translations from the + translation project, since the files that fetches seem to be out + of date. Move the instruction to update ChangeLog to a more + prominent place. Mention that there is an electronic process for + assignments in some locations. Update the copyright year. + +2014-05-11 James Youngman + + * gnulib: Update submodule to current version at origin/master. + + Fix inadequte quoting in AC_ARG_ENABLE usage. + * configure.ac: Quote second argument of AC_ARG_ENABLE. + +2014-01-14 James Youngman + + Fix typo "ouptut". + * locate/locate.1 (OPTIONS): fix typo "ouptut" (from an anonymous + Savannah bug report #40804). + +2014-01-12 James Youngman + + Add source files to po/POTFILES.in. + * po/POTFILES.in: Add some source file names which were missing. + +2014-01-12 Nguyễn Thái Ngọc Duy (tiny change) + + * po/POTFILES.in: mark strings from gnulib for translation. + +2014-01-05 James Youngman + + Updated various translations from the Translation Project. + * po/ru.po: Updated Russian translation from the Translation + Project. + * po/fr.po: Updated French translation. + * po/pt_BR.po: Updated Brazilian Portuguese translation. + * po/it.po: Updated Italian translation. + * po/sr.po: Updated Serbian translation. + * po/eo.po: Updated Esperanto translation. + * po/tr.po: Updated Turkish translation. + * po/fi.po: Updated Finnish translation. + * po/el.po: Updated Greek translation. + + Updated Slovenian translation. + * po/sl.po: Updated Slovenian translation from the Translation + Project. + +2013-12-08 James Youngman + + Bug #35753: check the success/failure of material I/O operations. + * lib/listfile.c (list_file): Check the result of fprintf to + determine if there was an I/O error on output. Return false (bool + instead of void) if so. + (print_name_without_quoting): Likewise. + (print_name_with_quoting): Likewise. + (print_name): Propagate the result of print_name_without_quoting + or print_name_with_quoting (and make all three functions return bool). + * find/pred.c (is_ok): Check the result of fprintf to + determine if there was an I/O error on output. Exit fatally if + there was a problem (since we cannot expect the user to say "yes" + or "no" to a prompt they will not have seen). + * xargs/xargs.c (print_args): Check the result of fprintf and + fflush to determine if there was an I/O error on output. Exit + fatally for the same reason as above if there is a problem. + * NEWS: Mention this bugfix (now that it is fully fixed). + + Fix some signed/unsigned problems. + * find/util.c (show_valid_debug_options): change type of array + subscript to size_t to avoid signed/unsigned problems. + (set_stat_placeholders): Silence unuseful compiler warning about + unused parameter. + * find/ftsfind.c (show_outstanding_execdirs): change type of array + subscript to size_t to avoid signed/unsizned problems. + + Fix format specifier in safe_read error message. + * xargs/xargs.c (xargs_do_exec): print size_t values with %zu, not + %d (since size_t is not and never can be the same type as int). + + Bug #35753: detect failure of the atexit library function. + * find/find.c (main): Issue a fatal error message if atexit fails. + * xargs/xargs.c (main): Likewise. + * find/ftsfind.c (main): Likewise. + * locate/code.c (main): Likewise. + * locate/frcode.c (main): Likewise. + * locate/locate.c (dolocate): Likewise. + * locate/bigram.c (main): Likewise; also include . + +2013-10-27 James Youngman + + * THANKS: Add Eric S. Raymond. + +2013-10-27 Eric S. Raymond + + Add bracket missing from synopsis in locate manpage. + * locate/locate.1 (SYNOPSIS): Add missing bracket. + +2013-10-26 James Youngman + + Clearly explain the result of -exec/-execdir ... + + * doc/find.texi (Single File): Explain that "-exec command ;" + returns true of the command exited with a status of 0. + (Multiple Files): Explain that "-execdir command +" always returns + true. Likewise for "-exec command +". + * find/find.1: similar changes. + +2013-09-24 James Youngman + + Fix bug #40094: minor inconsistencies in xargs option descriptions. + * xargs/xargs.1: Update the description of -e option to emphasize + that the argument must follow the option letter immediately (in + other words, that it may not appear in the next program argument). + Likewise for the the -i and -l (lower-case L) options. + * xargs/xargs.c (usage): Minor consistency improvements to help + text. + + Update Vietnamese, Czech and Dutch translations. + * po/nl.po: Update Dutch translation. + * po/cs.po: Update Czech translation. + * po/vi.po: Update Vietnamese translation. + +2013-09-23 James Youngman + + Fix bug #39162: -printf reads beyond arguments terminated by \ + * find/print.c (insert_fprintf): If a \ is found at the end of a + format string, issue a warning (and render it as-is). + * NEWS: Mention this bugfix. + + Update version number to 4.5.13-git. + * configure.ac: Update version number to 4.5.13-git. + * NEWS: Likewise. + + Updated Estonian, Polish, Ukrainian translations. + * po/et.po: Updated the Estonian translation from the Translation + Project. + * po/pl.po: Updated the Polish translation. + * po/uk.po: Updated the Ukrainian translation. + * NEWS: Mention these updates. + +2013-09-22 James Youngman + + Release findutils-4.5.12. + * configure.ac (AC_INIT): Change version number to 4.5.12. + * NEWS: Change version number of most recent release to 4.5.12. + + Issue an error message when fts_read fails. Fixes bug #39324. + * find/ftsfind.c (find): when fts_read fails, issue an error + message, set the exit status to zero and stop. Previously the + program would just stop (i.e. it failed to distinguish "done" from + "failed"). + * find/find.1 (-exec): explain that on failure, some pending + command launches may not happen. The Texinfo documentation + already pointed this out, so that didn't need to be changed. + * NEWS: Mention this bugfix. + + Add a bug number for bug #40088. + * NEWS: Add a bug number for bug #40088: potential buffer overflow + in -execdir and -okdir. Re-order the bugs listed to be + decreasing numerically by ID. + +2013-09-21 James Youngman + + find: state that -execdir command is run locally to the matched file. + * doc/find.texi (Single File): Correct the description of what the + current directory will be when the command specified by -execdir + gets run. This fixes a documentation but reported by Eric + Hanchrow. + * NEWS: Mention this fix. + +2013-09-21 Bernhard Voelker + + xargs: wait for process before prompting in interactive mode (-p) + * xargs/xargs.c (xargs_do_exec): Move the code for waiting for + forked processes up, so that the child process terminates before + we prompt for the next command. + * NEWS: Mention the fix. + +2013-09-21 Dmitry V. Levin + + find: fix potential buffer overflow in -execdir and -okdir. + * lib/buildcmd.c (bc_push_arg): Take prefix length into account + to avoid state->argbuf overflow. + * NEWS: Mention this fix. + +2013-09-21 James Youngman + + Make sv-34976-execdir-fd-leak.sh test more POSIX-compliant. + * find/testsuite/sv-34976-execdir-fd-leak.sh: Avoid using seq; + instead, use pre-generated lists of test file names. Also avoid + using file descriptors 0, 1, 2 in the test. + + Fix typo "sturct". + * find/exec.c (impl_pred_exec): Typo fix: struct/struct. + * ChangeLog (2007-03-28): Likewise. + +2013-09-20 Bernhard Voelker + + find: fix fd leak with --execdir option (bug#34976) + * find/exec.c (impl_pred_exec): Free the working directory if find + executes the command in the local dir, i.e. if it has been saved + by record_exec_dir(). Re-indent code. + * find/testsuite/sv-34976-execdir-fd-leak.sh: Add test. + * find/testsuite/Makefile.am (test_shell_progs): Mention the test. + * NEWS: Mention the fix. + +2013-09-20 James Youngman + + Updated Greek translation. + * po/el.po: Updated Greek translation from the Translation + Project. + +2013-09-20 Bernhard Voelker + + xargs: Fix integer overflow in implicit conversion in do_exec. + * xargs/xargs.c (xargs_do_exec): Change type of r from int to + size_t, since that is the type that safe_read actually returns. + +2013-09-20 James Youngman + + Add Bernhard Voelker to AUTHORS. + * AUTHORS: Add Bernhard Voelker. + + * configure.ac: Check for prefixed versions of ranlib, too. + +2013-09-20 Benedikt Morbach (tiny change) + + Check for both prefixed and unprefixed versions of "ar". + * configure.ac: Look for '${host}-ar' as set by AC_CANONICAL_HOST + before looking for the unprefixed 'ar'. This is useful when + cross-compiling when all your binutils are prefixed. + +2013-09-20 James Youngman + + Fix compilation error where struct dirent lacks a d_ino member. + * find/find.c (NOT_AN_INODE_NUMBER): Add missing identifier which + (when missing) caused a compilation error on system where struct + dirent lacks a d_ino member. + + Be consistent about what we call the places the search starts. + * find/find.1: Consistently describe the paths at which the search + begins as "satrting points". + + Refer to the info manual in a clearer and more explicit way. + * find/find.1 (SEE ALSO): Explain how to invoke info to read the + Texinfo manual. + * locate/locate.1 (SEE ALSO): Likewise. + * locate/updatedb.1 (SEE ALSO): Likewise. + * xargs/xargs.1 (SEE ALSO): Likewise. + +2013-06-02 James Youngman + + Add unlinkat moduile. + * import-gnulib.config (modules): Add unlinkat module, following + bug report from Martin von Gagern. + +2013-04-22 Paul Eggert + + More removal of support for -perm +MODE. + * find/parser.c (parse_perm): Remove no-longer-needed local var + and associated code. Reported by Eric Blake in + . + +2013-04-21 Paul Eggert + + Remove support for obsolete -perm +MODE syntax. + Also, do not reject -perm /MODE merely because of POSIXLY_CORRECT. + Problem reported in . + * NEWS: + * doc/find.texi (Mode Bits): Document this. + (Environment Variables): POSIXLY_CORRECT does not affect -perm. + * find/parser.c (parse_help): Mention /MODE, not +MODE. + (non_posix_mode): Remove. + (parse_perm): Remove support for -perm +MODE. + Do not reject -perm /MODE merely because POSIXLY_CORRECT is set; + POSIXLY_CORRECT is not supposed to be for pedantic checking. + * find/find.1 (-perm): describe this change. + (HISTORY): update the existing statement about the deprecation of + +MODE to explain that support has now been removed. + +2013-04-22 James Youngman + + Fix documentation typo. + * doc/find.texi (Mode Bits): Fix typo "it set" -> "is set". + +2013-04-20 Paul Eggert + + doc: fix typos uncovered by texinfo 5.0 + * doc/find-maint.texi: Fix typos that cause 'make' to fail + if texinfo 5.0 is installed. + +2013-04-22 James Youngman + + Enable assertions in locate. + * locate/locate.c: Don't #define NDEBUG. + +2013-04-21 James Youngman + + * find/find.1 (-size): explain the rounding-up semantics more + clearly. + + Add example for find -printf. + * doc/find.texi (Print File Information): Add an example for "find + -printf" suggested by Karl Berry. + +2011-12-31 Karl Berry + + Further documentation improvements. + * doc/find.texi: use @code for environment variable names, and + other improvements. + +2009-08-03 Peter Breitenlohner + + * locate/locate.c: Simplify handling of slocate databases. + Fix the bug assuming second path extends the first one. + * locate/testsuite/locate.gnu/slocate.{exp,xo}: New testcase + for slocate databse, exposing this bug. + * locate/testsuite/Makefile.am: Add new test case. + +2009-08-03 Peter Breitenlohner + + * locate/locate.c: Enable assertions and fix the off-by-one + bugs that prevented this. + +2009-08-03 Peter Breitenlohner + + * doc/find.texi: Remove duplicate paragraph and fix a typo. + +2013-03-31 James Youngman + + Don't use reserved identifiers in macro names; fix other code smells. + * build-aux/src-sniff.py (checkers): Check for #define directives + which use a macro name which is reserved. + (MakefileRegexChecker): New class which performs regex checks on + makefiles; this ensures that we don't check Makefile.in if we're + going to check Makefile.am anyway. + * lib/unused-result.h: Don't use a reserved identifier in the + macro name defined as the #include guard. + * locate/locatedb.h: Likewise. + * Makefile.am (findutils-check-smells): Don't check gnulib code. + * import-gnulib.sh (hack_gnulib_tool_output): Move the 'do' of a + for loop onto the line following the 'for' (instead of the same + line). + +2013-03-29 James Youngman + + Document that -0/-d turns off logical end-of-file processing. + * doc/find.texi (xargs options): Explain that the logical end of + file marker string set with -E is not special if -d or -0 was + specified. + * xargs/xargs.c (usage): Mention this in the --help output. + (read_string): Correct the function header comment to point out + that there is no logical end-of-file processing for this case. + Also point out that the delimiter may not always be NUL. + This documentation update fixes Savannah bug #36652. + (main): Emit a warning message if -0/-d is specified and -E was + also used. + * xargs/testsuite/xargs.gnu/E_-0.exp: Don't compare stderr output, + since for this case xargs now emits a warning message. + * NEWS: Mention this change. + +2013-03-29 James Youngman + + Updated the Galician translation. + * gl.po: Updated Galician translation. + +2013-03-26 James Youngman + + Updated a number of translations. + * cs.po: Updated Czech translation. + * et.po: Updated Estonian translation. + * fi.po: Updated Finnish translation. + * fr.po: Updated French translation. + * nl.po: Updated Dutch translation. + * pl.po: Updated Polish translation. + * ru.po: Updated Russian translation. + * uk.po: Updated Ukrainian translation. + * vi.po: Updated Vietnamese translation. + * zh_CN.po: Updated Chinese (simplified) translation. + +2013-03-26 Kamil Dudka + + Fix compile-time warnings. + * find/defs.h (struct predicate): Add a missing const modifier. + * find/find.c (wd_sanity_check): Suppress a warning in #else branch. + (process_dir): Remove an unused variables and statements. + * find/pred.c (pred_context): Use const modifier in the prototype. + * lib/buildcmd.{c,h} (bc_args_exceed_testing_limit): Remove a const + modifier causing unnecessary warnings. + * xargs/xargs.c (main): Add explicit type-casts. + +2013-03-24 James Youngman + + Expand on warning about xargs -P and stdout, including in Info. + * xargs/xargs.1: Expand on the warning about sharing stdout for + "xargs -P". + * doc/find.texi (Controlling Parallelism): Add a suitable warning + about sharing resources here, too. + * NEWS: Mention that all relevant documentation was updated with + this warning. + +2013-03-24 Bernhard Voelker + + Improve error message for find -type X (X = an unknown file type). + * find/parser.c (insert_type): Give a more comprehensible error + message when the type letter following -type or -xtype corresponds + to a type of file which was unknown on the system which compiled + the find binary. + * NEWS: Mention this improvement. + + xargs: split usage text to help translators, and clarify it. + * xargs/xargs.c (usage): Define HTL macro to print one help text + line (or entry). Split the option descriptions up by using the + above macro. Refine the messages to adapt to the common way: + change the start of each option's description to lower case, do + not use periods at the end, use semicolons where needed, indent + secondary lines, several other minor improvements. + * NEWS: Mention this improvement. + + * xargs/xargs.1: Add note for -P suggesting the use of a locking + system to avoid corrupted stdout. + +2013-03-24 James Youngman + + Fix Savannah bug #38583: errno-buffer read failed in xargs_do_exec + * import-gnulib.config (modules): Import the safe-read module. + * xargs/xargs.c (xargs_do_exec): Use safe_read so that the read + system-call is retried if we handle a signal (for example + SIGUSR[12]) while we are trying to read the errno vlaue from the + child process. + + Fix misleading message from import-gnulib.sh; allow .git symlink. + * import-gnulib.sh (check_old_gnulib_dir_layout): Really apply the + bugfix by Kamil Dudka which eliminates a misleading message of + import-gnulib.sh on a fresh repository obtained by 'git clone + --recursive', by requiring gnulib/.git to exist but not requiring + it to be a directory. + + Bugfix to "make clean": do not delete header files. + * lib/Makefile.am (coverage-clean): Remove output files left + behind by gcc -fprofile-arcs -ftest-coverage by using $(RM) with a + glob pattern rather than a $(libfindtools_a_SOURCES.c=.gcno) + Makefile substitution, because the latter caused us to delete + header files entirely (their names do not end in .c). This had + meant that it was impossible to compile findutils after "make + clean". Bug report by David Gilbert. + * find/Makefile.am (coverage-clean): Likewise. + * xargs/Makefile.am (coverage-clean): Likewise. + * locate/Makefile.am (coverage-clean): Likewise. + * Makefile.am (coverage-clean): Likewise, but also do this in the + subdirectories whose Makefile.am files are generated by + gnulib-tool. + + Move on from 4.5.11, to 4.5.12-git + * NEWS: Add a new section for 4.5.12-git. Mention the bugfix to + find/testsuite/sv-bug-32043.sh. + * configure.ac: Update the version number. + + Fix Bash-ism [[ ... ]]. + * find/testsuite/sv-bug-32043.sh: Change [[ ... ]] to [ ... ] + because the first pattern is a Bash-ism. Bug reported by David + Gilbert. + +2013-02-03 Kamil Dudka + + Avoid using 'INCLUDES =' in automake templates. + * find/Makefile.am: Use AM_CPPFLAGS instead of deprecated INCLUDES. + * lib/Makefile.am: Likewise. + * locate/Makefile.am: Likewise. + * xargs/Makefile.am: Likewise. + + Eliminate a misleading message of import-gnulib.sh on a fresh + repository obtained by 'git clone --recursive'. + * import-gnulib.sh (check_old_gnulib_dir_layout): Do not require + ./gnulib/.git to be a directory. + +2013-02-03 James Youngman + + Fix Savannah bug #38239, missing variable initialisation in locate + * locate/locate.c (cleanup_quote_opts): New atexit function, frees + quote_opts which otherwise would leak. + (dolocate): Eliminate the redundant boolean variable + they_chose_db, whose true/false-ness followed the not-NULL-ness of + locate_path. Rename locate_path to user_selected_locate_path to + make this explicit. + (dolocate): When we get to the bottom of the loop, don't try to + check for a further element in user_selected_locate_path if it is + NULL (that is, $LOCATE_PATH was unset and the -d option was not + used). + + * po/findutils.pot: Updated template file from the Translation + Project + +2013-02-02 James Youngman + + Release findutils-4.5.11. + * NEWS: update version number from 4.5.11-git to 4.5.11. + * configure.ac (AC_INIT): Likewise. + + Reduce needless calls to complete_pending_execdirs. + * find/exec.c (impl_pred_exec): Once pushing an argument for + -exec{,dir} ... +, Only set state.execdirs_outstanding if + there were previously no todo items on ths command line. + This avoids spurious calls to complete_pending_execdirs(). + +2012-12-19 James Youngman + + Make the manual section ordering and menu item ordering consistent. + * doc/find.texi (Top): Re-order menu items to be consistent with + ordering of sections ('Reference' is moved). + (Print File Information): Add missing menu item 'Formatting Flags' + and remove that menu item from inside 'Format Directives'. + (Formatting Flags): Hence this is a subsection, not a + subsubsection. + +2012-12-15 Stefano Lattarini (trivial change) + + build: remove redundant AC_SUBST of var INCLUDES + * configure.ac: don't call AC_SUBST(INCLUDES). + +2012-12-15 Bernhard Voelker (trivial change) + + * locate/updatedb.sh (PRUNEFS): Avoid 9P, cifs and nfs4 + filesystems by default. + +2012-12-15 James Youngman + + Tweak updatedb.sh to make diffs easier to read. + * locate/updatedb.sh (PRUNEFS): List the default items in + alphabetical order to make diffs easier to read. + (PRUNEPATHS): likewise. + + Re-generate doc/regexprops.texi. + * doc/regexprops.texi: re-generate to describe the changes to + gnulib for the regular expression types "awk" (to add character + class support), "gnu-awk" (to add range support) and "posix-awk" + (also to add range suport). + * NEWS: Describe this change. + +2012-11-17 Dmitry V. Levin + + find: use FTS_VERBATIM + * gnulib: update to latest, to get FTS_VERBATIM support. + * find/ftsfind.c (ftsoptions): Set the FTS_VERBATIM bit. This + Patch was contributed on 2012-11-18, but was applied with the + above regexprops change) + +2012-12-14 James Youngman + + Fix bug #37926 (wrong result for oldfind -inum) + * find/find.c (D_INO): Define D_INO as a convenience accessor for + the inode number in struct dirent; use 0 if there is no d_ino + member in struct dirent. + (main): Pass the inode number of the top-level directory to + process_top_path. + (at_top): Add argument inum, the inode number of the file we are + looking at. Pass this to the action function. + (do_process_top_dir): Pass the inode number to process_path. + (do_process_predicate): Take (but ignore) the inode number + argument. + (process_path): Add argument inum, the inode number of the file we are + looking at. Populate statbuf.st_ino with this value. This avoids + a stat call in pred_inum if the stat information would not + otherwise be used. + (process_dir): Pass the inode number to process_path. + * import-gnulib.config (modules): Add d-ino. + * NEWS: Mention this bugfix. + +2012-11-17 James Youngman + + Update the Vietnamese, Ukranian and Croatian translations. + * po/vi.po, po/uk.po, po/hr.po: Update the translation files from + the translation project. + +2012-09-18 Jim Meyering + + find: fix two time-formatting leaks (bug #37356) + * find/print.c (do_time_format): Call xmalloc for static "buf" only + the first time. + When reallocating buf, be sure to update its buf_size. + Also free "altbuf". + Reported by Nemo Maelstrom Thorx in http://bugs.debian.org/687358 + via Andreas Metzler in http://savannah.gnu.org/bugs/?37356 + + find: minor tweaks + * find/print.c (do_time_format): Use memcpy in place of sprintf. + When calling x2nrealloc, use "sizeof *buf" as the element size, + rather than "2u". + + build: avoid import-gnulib.sh failure + * import-gnulib.config (extra_files): Remove build-aux/missing, + since that file has been removed from gnulib. + + build: stop using now-obsolete macro, AM_C_PROTOTYPES + * configure.ac: Don't use obsolete AM_C_PROTOTYPES. + +2011-12-30 Karl Berry + + Documentation improvements (UK spelling, use of @code). + * find.texi (@copying): add 2011, period outside quotes. + (thoughout): use UK spelling and " -- " convention. + (section names): use @code where needed. + +2011-09-11 Jim Meyering + + Fix a typo in find.texi. + * doc/find.texi (Error Messages From find): Fix typo s/an/a/. + +2011-08-20 James Youngman + + Describe recent memory savings on very large directories. + * NEWS: Describe the recent changes which reduce the amount of + heap memory used in processing directories containing very many + entries. + + Remove no-longer-used files savedir.[ch]. + * lib/savedirinfo.c: delete unused file. + * lib/savedirinfo.h: delete unused file. + * lib/Makefile.am (libfind_a_SOURCES): Remove savedirinfo.c. + (EXTRA_DIST): Remove savedirinfo.h. + + Reduce memory consumption of oldfind on large directories. + * find/find.c (process_dir): Reduce memory consumption for large + directories. Don't save the whole directory content with + xsavedir, instead just loop over the results of readdir. This + means that oldfind will consume one file descriptor per directory + level. + * find/testsuite/sv-34079.sh: verify that the memory consumption + of oldfind is reasonable on large directories. + + Reduce memory consumption of fts. + * gnulib: update to latest, mainly to include a bugfix (gnulib + commit 47cb657eca1abf2c26c32c8ce03def994a3ee37c) which limits the + memory consumed by fts. + * find/testsuite/sv-34079.sh: New test, verifying that memory + consumption in ftsfind does not grow indefinitely as the size of + directories increases. + * find/testsuite/Makefile.am (test_shell_progs): Added sv-34079.sh. + +2011-06-29 James Youngman + + Fix some constness warnings when dealing with -printf formats. + * find/parser.c (collect_arg_nonconst): Rename collect_arg to + collect_arg_nonconst and change the collected argument from const + char* to char*. + (collect_arg): Call collect_arg_nonconst to do the real work. + (parse_printf): Call collect_arg_nonconst instead of collect_arg. + Change `format' from const char* to char*. + (parse_fprintf): Likewise. + * find/print.h: Change 'format' from const char* to char*, since + actually we edit it in place. + * find/print.c (parse_octal_escape): Instead of updating a const + char* pointer to indicate how many characters from the input we + consumed, update a size_t value. + (insert_fprintf): Change function definition to match updated + prototype. Eliminate fmt_inpos. Introduce a `readpos' offset + variable which takes the previous role of fmt_inpos. + +2011-06-28 James Youngman + + Refactor insert_fprintf to minimise calls to make_segment. + * find/print.c (get_format_flags_length): Factor out of + insert_fprintf; computes the length of the format flags for a + format specifier (that is everything after the % but before the + format control character). + (get_format_specifer_length): Also factored out of insert_fprintf; + returns the number of format control characters (e.g. 2 for %A@) + or 0 for error. + (insert_fprintf): Keep fmt_editpos and fmt_inpos more closely in + step, instead of initialising fmt_inpos only when we need it (the + idea eventually will be to make fmt_inpos the loop control + variable). Call get_format_specifer_length and + get_format_flags_length when needed. Reduce the number of + different calls to make_segment. We now have one for each KIND_ + value plus one for the error case. + +2011-06-27 James Youngman + + Factor some of the code out of insert_fprintf. + * find/print.c (insert_fprintf): Factor out the handling of + eascape codes into new functions parse_escape_char, + parse_octal_escape. + +2011-06-25 James Youngman + + Separate out the handling of \c. + * find/print.c (insert_fprintf): Deal with \c as a special case. + + Remove some redundant continue statements. + * find/print.c (insert_fprintf): Remove a pair of redundant + 'continue' statements. + + Simplify -fprintf %%; handle %% like a regular format specifier. + * find/print.c (make_segment): Handle foo%% by simply generating a + format string of foo%% (that is, let vfprintf handle the escaped + %). + (insert_fprintf): Handle %% as KIND_FORMAT instead of KIND_PLAIN. + (do_fprintf): Handle %%. + + Clarify variable naming in insert_fprintf. + * find/print.c (insert_fprintf): Rename some variables for greater + clarity: + format is now segstart, since it points to the start of the part + of the format string we're next going to pass to make_segment. + scan2 is now fmt_inpos (which is a const char*) and is the + scanning position beyond segstart which we're reading to locate + the end of this segment. + scan is now fmt_editpos and is the scanning position at which we + are modifying the format string (for example to change \n in the + format to the value of the '\n' character). + +2011-06-19 James Youngman + + Test find -printf %i. + * find/testsuite/test_inode.sh: New test, for find -printf %i. + * find/testsuite/Makefile.am (test_shell_progs): Add test_inode.sh. + + Extract common test code into a sourced file. + * find/testsuite/binary_locations.sh: New file, extracting common + code from the test scripts. + * find/testsuite/test_escape_c.sh: Source binary_locations.sh. + * find/testsuite/test_escapechars.sh: Source binary_locations.sh. + * find/testsuite/Makefile.am (EXTRA_DIST): Distribute + binary_locations.sh. + +2011-06-18 James Youngman + + Fix some compiler warnings in xargs. + * xargs/xargs.c: Remove definition of the unused macro VOID. + Include error.h instead of declaring error (incorrectly). + Change the type of lineno from int to size_t. + (get_char_oct_or_hex_escape): Don't point endp unnecessarily at p, + because they have different constness. There's no need for this, + just initialise it to NULL. + (main): Make input_file const. Make the default arglist + non-const, to avoid a constness warning. + (main): Pass the option name as the argument to error's %s format, + as opposed to the whole struct (this was a bug, but since the name + member was the first in the struct, there were probably no + symptoms). + (main): read_args returns an int, but the only negative value it + can return is -1. Once we know that didn't happen, assign the + value to a size_t variable to avoid signed/unsigned warnings + elsewhere. + (xargs_do_exec): Manually inhibit some unused-parameters warnings. + (print_args): Use size_t as the type of a loop variable. + (wait_for_proc): Since procs_executing is an unsigned long, use a + %lu format specifier to print it. + (increment_proc_max): Inhibit an unused-parameter warning (the + signal number). + (decrement_proc_max): Likewise. + * lib/buildcmd.h (struct buildcmd_control): Make member + replace_pat const. Change the type of lines_per_exec to unsigned + long. + +2011-06-20 James Youngman + + Use a consistent include order in header files too. + * lib/printquoted.h: Use the preferred header-file inclusion order + here too. + + Use a consistent order for header-file inclusion. + * find/exec.c: Include config.h, then system headers followed by + gnulib headers and last, find-specific headers. + * find/find.c: Likewise. + * find/finddata.c: Likewise. + * find/fstype.c: Likewise. + * find/ftsfind.c: Likewise. + * find/parser.c: Likewise. + * find/pred.c: Likewise. + * find/tree.c: Likewise. + * find/util.c: Likewise. + * lib/buildcmd.c: Likewise. + * lib/dircallback.c: Likewise. + * lib/extendbuf.c: Likewise. + * lib/fdleak.c: Likewise. + * lib/findutils-version.c: Likewise. + * lib/listfile.c: Likewise. + * lib/printquoted.c: Likewise. + * lib/qmark.c: Likewise. + * lib/regexprops.c: Likewise. + * lib/regextype.c: Likewise. + * lib/safe-atoi.c: Likewise. + * lib/savedirinfo.c: Likewise. + * lib/splitstring.c: Likewise. + * lib/test_splitstring.c: Likewise. + * lib/waitpid.c: Likewise. + * locate/bigram.c: Likewise. + * locate/code.c: Likewise. + * locate/frcode.c: Likewise. + * locate/locate.c: Likewise. + * locate/word_io.c: Likewise. + * xargs/xargs.c: Likewise. + + Take gnulib-tool's advice about which header files to include. + * locate/locate.c: Include instead of "regex.h". + Include "fnmatch.h" instead of (because we use + fnmatch-gnu). Include "gettext.h". + * lib/regexprops.c: Include instead of "regex.h". + * find/tree.c: Include "gettext.h". Include "fnmatch.h" instead + of (because we use fnmatch-gnu). + * find/parser.c: Include "gettext.h" and . Include + "fnmatch.h" instead of (because we use fnmatch-gnu). + * find/pred.c: Likewise. + * find/exec.c: Include "gettext.h". + * find/find.c: Likewise. + * find/fstype.c: Likewise. + * find/ftsfind.c: Likewise. + * find/print.c: Likewise. + * lib/buildcmd.c: Likewise. + * lib/fdleak.c: Likewise. + * lib/findutils-version.c: Likewise. + * lib/regextype.c: Likewise. + * lib/safe-atoi.c: Likewise. + * find/util.c: Likewise. + * locate/bigram.c: Likewise. + * locate/code.c: Likewise. + * locate/frcode.c: Likewise. + * locate/word_io.c: Likewise. + * xargs/xargs.c: Likewise. + * find/Makefile.am: Add a comment explaining why gnulib-tool + advised us to use each library. + +2011-06-19 James Youngman + + Update gnulib. + * gnulib: update to latest version. + +2011-06-18 James Youngman + + Remove test-coverage output files for "make clean". + * find/Makefile.am (CLEANFILES): Clean the .gcda and .gcdo files + which are produced by running programs that were compile with gcc + -fprofile-arcs -ftest-coverage. + * lib/Makefile.am (CLEANFILES): Likewise. + * locate/Makefile.am (CLEANFILES): Likewise. + * xargs/Makefile.am (CLEANFILES): Likewise. + + Move the printing code into print.c. + * find/print.c (scan_for_digit_differences): Move to this file + from pred.c. + (do_time_format): Move to this file from pred.c. + (format_date): Likewise. + (weekdays): Likewise. + (months): Likewise. + (ctime_format): Likewise. + (file_sparseness): Likewise. + (checked_fprintf): Likewise. + (checked_print_quoted): Likewise. + (checked_fwrite): Likewise. + (checked_fflush): Likewise. + (HANDLE_TYPE): Likewise. + (do_fprintf): Likewise. + (pred_fprintf): Likewise. + * find/pred.c: Don't include human.h, filemode.h, verify.h or + xalloc.h, we don't need them. Don't define MAX. Don't declare + ctime_format or format_date. Each of the functions moved into + print.c were moved out of this file. + + Reserve format specifiers %(, %{ and %[ for future use. + * find/print.c (insert_fprintf): Reject %(, %{ and %[. + (make_segment): Remove code which previously supposedly rejected + these format specifiers, but in fact did nothing. Replace with + an assertion to document the fact that we do not expect to see + these format characters in make_segment. + * find/testsuite/find.gnu/printf-reserved.exp: New test case, for + %(, %{ and %[, which are all rejected. + * find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add + find.gnu/printf-reserved.exp. + * doc/find.texi (Reserved and Unknown Directives): Document this. + * find/find.1: Document this. + * NEWS: Mention this change. + + Additional test cases for printf field width, precision and sign. + * find/testsuite/find.gnu/printf.exp: Add test cases for left and + right string alignment (%-10p), string truncation (%10.6p), + explicit signs (%+d), left and right alignment (%10p, %-10p), + zero-filling on decimal fields. + * find/testsuite/find.gnu/printf.xo: Add expected outputs for the + new tests. + + Add a test for find -printf ... %%. + * find/testsuite/find.gnu/printf.exp: Also test %%. + * find/testsuite/find.gnu/printf.xo: Add expected output for the + %% test case. + + Add a test for "find -printf \c". + * find/testsuite/Makefile.am (test_shell_progs): Add + test_escape_c.sh. + * find/testsuite/test_escape_c.sh: New test for "find -printf + \c". + + Remove an unnecessary argument from insert_fprintf. + * find/print.c (insert_fprintf): Eliminate the 'func' argument, + since it is always pref_fprintf. + * find/print.h: Adjust the prototype accordingly. + * find/parser.c (parse_fprintf): Don't pass the func argument to + insert_fprintf. + (parse_printf): Likewise. + + Add new test for octal and letter escapes in -printf format. + * find/testsuite/test_escapechars.golden: Expected output file. + * find/testsuite/Makefile.am (EXTRA_DIST_GOLDEN): New variable; + distribute test_escapechars.golden. + * find/testsuite/test_escapechars.sh: New test. + * find/testsuite/Makefile.am (test_shell_progs): New variable, + where we keep the list of shell script tests. Move existing + examples from TESTS and add test_escapechars.sh. + * find/testsuite/Makefile.am (TESTS): Refer to test_shell_progs. + * cfg.mk: allow trailing blanks and space-tab sequences in + find/testsuite/test_escapechars.golden. + +2011-06-17 James Youngman + + Split find's printf-related code into a new file. + * find/print.h: New file. Declare insert_fprintf and + make_segment. + * find/print.c: New file. Move definitions of insert_fprintf and + make_segment to here. + * find/parser.c: Include "parser.h". Move declarations of + insert_fprintf and make_segment into that file; move the + definitions into parser.c. + * find/Makefile.am (libfindtools_a_SOURCES): Add print.c. + (EXTRA_DIST): Add print.h. + * po/POTFILES.in: Add find/print.c. + +2011-06-15 James Youngman + + Fix compiler warnings in lib/regextype.c and find/parser.c. + * lib/regextype.c (tagRegexTypeMap): make the name field const. + * find/parser.c (parse_version): instead of counting features, use + a boolean variable, nofeatures. This avoids compiler warnings + about overflow. + + Adopt the use of the manywarnings module. + * import-gnulib.config (modules): Add manywarnings. + * configure.ac: Invoke gl_MANYWARN_ALL_GCC and + gl_MANYWARN_COMPLEMENT. + * configure.ac: Turn on the compiler warnings only if + --enable-compiler-warnings was specified to configure. + +2011-06-14 James Youngman + + Avoid pointer/integer comparison on value returned by strchr. + * find/parser.c (parse_newerXY): Compare the result of strchr + against NULL rather than 0. + + Fix further compiler warnings. + * find/ftsfind.c (show_outstanding_execdirs): Now that + execp->state.cmd_argc is a size_t, we can't print it with %d. So + print it with PRIuMAX (and include to define that). + * find/tree.c (prec_name): change return type to const char*. + (type_name): Likewise. + * find/exec.c (impl_pred_exec): use a separate variable (buf) to + point the memory allocated/freed with malloc/free, so that the + existing variable target can then be const (and so we can assign + pathname to it without a compiler warning). + + Eliminate some compiler warnings. + * find/find.c: Remove definition of SAFE_CHDIR, which we don't + use. + * find/defs.h: Remove redundant declaration of launch. + * find/parser.c (parse_false): Cast unused arguments to void. + (parse_print0): Likewise. + (pred_context): Likewise. + (parse_newerXY): Add some parens for slightly greater clarity. + (make_segment): Avoid switch-missing-default-case warning by + turning it into an if statement. + (check_path_safety): Remove unused argument. + (insert_exec_ok): Don't pass the unwanted argument to + check_path_safety. + (get_relative_timestamp): silence compiler warning by adding a + case for the remaining enumeration value rather than using + default. + * find/pred.c (months): the strings can be const char*, rather + than just char*. + (ctime_format): change TIME_BUF_LEN to an integer constant to + avoid signed/unsigned comparison. + (blank_rtrim): Change to new-style function definition(!) and + remove unnecessary parentheses around a return value. + * lib/buildcmd.c: Omit redundant declaration of environ. + * find/tree.c (get_expr): Make static. + (cost_assoc): make the name field const. + (prec_assoc): make the prec_name field const. + (op_assoc): make the type_name field const. + (type_name): turn into an ANSI function definition(!). + (prec_name): Likewise! Also remove spurious parentheses around + return value. + (prec_name): Remove spurious parentheses around return value. + * lib/buildcmd.h (buildcmd_state): change types of several fields + to size_t: cmd_argc, cmd_argv_alloc, largest_successful_arg_count, + smallest_failed_arg_count. + (buildcmd_control): change types of several fields + to size_t: max_arg_count, initial_argc, lines_per_exec, + args_per_exec. + + Assume SIGCHLD and O_NOFOLLOW are defined by gnulib. + * find/find.c: Since gnulib defines O_NOFOLLOW, don't check to see + if the macro is defined. Check instead to see if it is 0. + (safely_chdir_nofollow): Point this out. + (safely_chdir): Check O_NOFOLLOW for zeroness. + * find/exec.c: Don't #define SIGCHLD. + * xargs/xargs.c: Likewise. + +2011-06-14 James Youngman + + Fix coredump bug introduced in the previous change. + * locate/locate.c (dolocate): Remove declaration of e, which was + replaced by the variable db_name. Change the last two uses of 'e' + to use 'db_name'. This bugfix prevents possible coredumps when + issuing error messages about reads from the locate database (or + warnings about byte order for old databases). This bug had been + introduced in the previous change. + +2011-06-13 James Youngman + + Split strings into fields nondestructively. + * lib/splitstring.c: New file; defines splitstring(), which will + non-destructively locate character-separated fields in a string. + * lib/splitstring.h: New file; declares splitstring. + * lib/test_splitstring.c: New file; unit test for splitstring.c. + * lib/nextelem.c: Delete (obsoleted by splitstring.c). + * lib/nextelem.h: Delete (obsoleted by splitstring.h). + * lib/Makefile.am (libfind_a_SOURCES): Add splitstring.c, + splitstring.c. Remove nextelem.c, nextelem.h. + (check_PROGRAMS): Add test_splitstring. + (TESTS): Add test_splitstring. + (test_splitstring_SOURCES): Sources for the + test_splitstring unit test. + * locate/locate.c: Include splitstring.h rather than nextelem.h. + (dolocate): Use splitstring rather than next_element. In places + where we need a nul-terminated string, use strndup() to create it. + Convert some space-tab sequences to regular spacing. + * find/parser.c: Include splitstring.h rather than nextelem.h. + (check_path_safety): Use splitstring rather than next_element. + * import-gnulib.config (modules): Depend on the module strndup. + * cfg.mk: Exempt lib/test_splitstring.c from calling + bindtextdomain or set_program_name. + +2011-06-13 James Youngman + + Fix compilation failure in bigram.c by including . + * locate/bigram.c: Include . + +2011-06-12 James Youngman + + Split exec-related code into a new file, exec.c + * find/exec.c: New file. + (initialise_wd_for_exec): Move out of pred.c + (record_exec_dir): Likewise. + (impl_pred_exec): Likewise. + (prep_child_for_exec): Likewise. + (launch): Likewise. + * find/pred.c: These functions are moved out of this file. + * find/defs.h: impl_pred_exec is no longer static in pred.c, so + add an external declaration for it. Move the declaration of + launch to here also. + * find/Makefile.am (libfindtools_a_SOURCES): Add exec.c. + * po/POTFILES.in: Add find/exec.c. + + Eliminate .x-sc_prohibit_empty_lines_at_EOF and .x-sc_bindtextdomain + * cfg.mk: Move definition of which files we should not check to + exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF, instead + of .x-sc_prohibit_empty_lines_at_EOF. + Move contents of .x-sc_bindtextdomain into + exclude_file_name_regexp--sc_bindtextdomain. + .x-sc_prohibit_empty_lines_at_EOF: Delete. + .x-sc_bindtextdomain: Delete. + + Enable sc_makefile_at_at_check; fix problems it identifies. + * lib/Makefile.am: Use $(FINDLIBOBJS) instead of @FINDLIBOBJS@. + * find/Makefile.am (LDADD): Use $(FINDLIBS) instead of @FINDLIBS@. + * locate/Makefile.am (updatedb): Use $(VERSION) and + $(PACKAGE_NAME) instead of @VERSION@ and @PACKAGE_NAME@. + * cfg.mk: remove sc_makefile_at_at_check from local-checks-to-skip + +2011-06-12 James Youngman + + Improve src-sniff.py. + + * build-aux/src-sniff.py: Mention that many of these checks would + be better as gnulib syntax checks (since there are more flexible + ways to disable these). + (RegexChecker.__init__): Don't pass a spurious second "self" + argument. + (RegexChecker.Check): Provide a more intelligible message when + complaining about use atof/scanf. + (RegexChecker.Check): Enable the check for HAVE_FCNTL_H. + (RegexChecker.Check): When checking for trailing whitespace, don't + complain about trailing newlines(!) + (RegexChecker.Check): Indicate what the out-of-date address is + when we find one. + +2011-06-11 James Youngman + + Enable the sc_trailing_blank check. + * cfg.mk: Enable sc_trailing_blank check. + (exclude_file_name_regexp--sc_trailing_blank): Exclude + xargs test inputs and outputs. Exclude the COPYING file. Exclude + a find test output. Exclude the .po files. + * xargs/xargs.c: Remove trailing blanks. + * xargs/testsuite/config/unix.exp: Likewise. + * find/testsuite/find.posix/bracket-depth.exp: Likewise. + * find/testsuite/find.posix/files-not-expressions1.exp: Likewise. + * find/testsuite/find.posix/files-not-expressions2.exp: Likewise. + * find/testsuite/find.posix/files-not-expressions3.exp: Likewise. + * find/testsuite/find.posix/nameslash.exp: Likewise. + * find/testsuite/find.posix/perm-vanilla.exp: Likewise. + * find/testsuite/find.posix/sizes.exp: Likewise. + * find/testsuite/find.posix/sv-bug-25359.exp: Likewise. + * find/testsuite/find.posix/typesize.exp: Likewise. + * find/testsuite/find.gnu/access.exp: Likewise. + * find/testsuite/find.gnu/deletedir.exp: Likewise. + * find/testsuite/find.gnu/deletefile.exp: Likewise. + * find/testsuite/find.gnu/exec-one-rtn-fail.exp: Likewise. + * find/testsuite/find.gnu/execdir-hier.exp: Likewise. + * find/testsuite/find.gnu/execdir-pwd.exp: Likewise. + * find/testsuite/find.gnu/execdir-root-only.exp: Likewise. + * find/testsuite/find.gnu/follow-arg-parent-symlink.exp: Likewise. + * find/testsuite/find.gnu/ilname.exp: Likewise. + * find/testsuite/find.gnu/lname.exp: Likewise. + * find/testsuite/find.gnu/perm-slash.exp: Likewise. + * find/testsuite/find.gnu/posix-h.exp: Likewise. + * find/testsuite/find.gnu/sv-bug-17782.exp: Likewise. + * find/testsuite/find.gnu/sv-bug-24169.exp: Likewise. + * find/testsuite/find.gnu/used-invarg.exp: Likewise. + * find/testsuite/find.gnu/used-missing.exp: Likewise. + * find/testsuite/excuses.txt: Likewise. + * locate/testsuite/config/unix.exp: Likewise. + * locate/testsuite/locate.gnu/bigendian.exp: Likewise. + * locate/testsuite/locate.gnu/bigprefix1.exp: Likewise. + * locate/testsuite/locate.gnu/exists2.exp: Likewise. + * locate/testsuite/locate.gnu/exists3.exp: Likewise. + * locate/testsuite/locate.gnu/littleendian.exp: Likewise. + * locate/testsuite/locate.gnu/notexists2.exp: Likewise. + * locate/testsuite/locate.gnu/notexists3.exp: Likewise. + * locate/testsuite/locate.gnu/sv-bug-14535.exp: Likewise. + * xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp: Likewise. + * xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp: Likewise. + * xargs/testsuite/xargs.posix/rc-125.exp: Likewise. + * xargs/testsuite/xargs.posix/sv-bug-18714.exp: Likewise. + * xargs/testsuite/xargs.posix/sv-bug-18714b.exp: Likewise. + * po/Makevars (EXTRA_LOCALE_CATEGORIES): Likewise. + * xargs/xargs.1 (SEE ALSO): Likewise. + + Enable the sc_space_tab check + * cfg.mk: Enable the sc_space_tab check. Exclude various xargs + test inputs and outputs from the check. Remove some obsolete + comments. + * locate/Makefile.am (dblocation.texi): Remove space-tab sequences. + + Enable the sc_texinfo_acronym check + * cfg.mk: Enable the sc_texinfo_acronym check. Exempt + doc/perm.text, which isn't ours anyway. + * doc/find.texi (Deleting Files): Say just POSIX rather than + @acronym{POSIX}, simply because this is the convention in GNU + documentation. The motivation is that it's hard to do so + consistently (because, for example, you can't use @acronym in a + node name). + + Enable syntax check sc_obsolete_symbols. + (exclude_file_name_regexp--sc_obsolete_symbols): Don't check + build-aux/src-sniff.py. + + Enable more syntax checks, eliminate useless C preprocessor parentheses + * find/defs.h: Eliminate useless parentheses in #if. + * find/find.c (safely_chdir): Likewise. + * find/pred.c: Likewise. + * lib/buildcmd.c: Likewise. + * lib/fdleak.c: Likewise + * xargs/xargs.c: Likewise. + * find/parser.c: Likewise. + (ISDIGIT): Simplify, and avoid undefining isascii. + * cfg.mk (local-checks-to-skip): Remove sc_prohibit_cvs_keyword, + since the test produces no hits anyway. Explain why we avoid + sc_two_space_separator_in_usage. Enable the sc_useless_cpp_parens + check. + + Use stat-size macros in pred.c also. + * find/pred.c: Include stat-size. Eliminate definitions of + DEV_BSIZE, ST_BLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE macros which are + now in stat-size.h (yes, this is the second set of these macros + we've removed). + (file_sparseness): Use ST_NBLOCKS and ST_NBLOCKSIZE. + * cfg.mk (local-checks-to-skip): Don't skip + sc_prohibit_stat_st_blocks, because now we no loner access the + st_blocks field of struct stat, directly. + * lib/listfile.c (file_blocksize): Eliminate this function, it's + no longer needed. + * lib/listfile.h: Don't declare file_blocksize. + + Adopt the new gnulib module stat-size. + * lib/listfile.c: Include "stat-size.h". Delete the DEV_BSIZE, + ST_BLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE macros which are now in + stat-size.h. + * gnulib: Update to latest. + * import-gnulib.config (modules): Add stat-size. + +2011-06-05 James Youngman + + Don't include sys/param.h where we don't need it. + * xargs/xargs.c: Don't include sys/param.h, we don't use it. + + Don't include "stdio-safer.h" where it is not used. + * find/parser.c: Don't include stdio-safer.h, it's not used. + * lib/findutils-version.c: Likewise. + + Don't include where it is not used. + * lib/dircallback.c: Don't include , it's not used. + * lib/extendbuf.c: Likewise. + * lib/qmark.c: Likewise. + * lib/savedirinfo.c: Likewise. + + Fixes for empty-lines-at-EOF syntax check. + * .x-sc_bindtextdomain: Add newline at EOF. + * locate/Makefile.am: Remove empty trailing line at EOF. + * find/testsuite/sv-bug-32043.sh: Likewise. + * .x-sc_prohibit_empty_lines_at_EOF: Don't apply this check to + m4/order-good.bin m4/order-bad.bin + locate/testsuite/locate.gnu/locateddb.old.x86.xi + locate/testsuite/locate.gnu/locateddb.old.powerpc.xi. + + Avoid some false positives for the sc_prohibit_doubled_word check. + * .x-sc_prohibit_doubled_word: don't perform this check on + xargs/testsuite/xargs.sysv/iquotes.xo or ChangeLog. + Don't check .po files for doubled English words (because they're + not in English). + * find/tree.c: Modify some text to avoid saying "AND and", + which one of the syntax checks doesn't like. + (opt_expr): Likewise. + (consider_arm_swap): Likewise. + * README: Likewise. + + Include dirent.h uncontintionally (since gnulib provides it). + * find/pred.c: Include unconditionally; gnulib provides + it. + * lib/savedirinfo.c: Likewise. + + Silence some false positives for sc_prohibit_always_true_header_tests. + * .x-sc_prohibit_always_true_header_tests: New file; exclude + build-aux/src-sniff.py from C inclusion tests, because it itself + contains examples of string the syntac checkers don't like + (because it's also a syntax checker). + ChangeLog: also exclude this because it frequently contains the + specifics of items added/removed, including examples of text which + are this syntax check looks for. + + Prefer "cannot" to "can not". + * locate/locatedb.5: Change "can not" to "cannot". + * locate/updatedb.1: Likewise. + + Update xargs error message. + * doc/find.texi (Error Messages From xargs): the message "can not + fit single argument within argument list size limit" is now + "argument list too long". + +2011-06-04 James Youngman + + Use the gnulib byteswap and uname modules. + * import-gnulib.config (modules): Add byteswap and uname. + * locate/word_io.c: Include byteswap.h. Don't #define bswap_32. + * find/util.c: sys/utsname.h no longer needs include guards since + gnulib always provides it. + * configure.ac: Don't check for sys/utsname. + + gnulib already defines O_CLOEXEC. + * lib/fdleak.c: gnulib's fcntl.h always defines O_CLOEXEC, so + don't define it here. + + Add internationalisation support to bigram but not regexprops. + * locate/bigram.c: Use libintl.h. + (main): Call bindtextdomain. + * .x-sc_bindtextdomain: Exempt lib/regexprops.c from needing to + use bindtextdomain. The output of regexprops is intended to be + determined entirely by the properties of the GNU regex + implementation. + + Update gnulib. + * gnulib: update to current head. + + Update the copyright year in C source files. + * find/defs.h: Update copyright year. + * find/find.c: Update copyright year. + * find/finddata.c: Update copyright year. + * find/ftsfind.c: Update copyright year. + * find/parser.c: Update copyright year. + * find/pred.c: Update copyright year. + * find/sharefile.c: Update copyright year. + * find/sharefile.h: Update copyright year. + * find/tree.c: Update copyright year. + * find/util.c: Update copyright year. + * lib/buildcmd.c: Update copyright year. + * lib/buildcmd.h: Update copyright year. + * lib/dircallback.c: Update copyright year. + * lib/dircallback.h: Update copyright year. + * lib/extendbuf.c: Update copyright year. + * lib/extendbuf.h: Update copyright year. + * lib/fdleak.c: Update copyright year. + * lib/fdleak.h: Update copyright year. + * lib/findutils-version.c: Update copyright year. + * lib/findutils-version.h: Update copyright year. + * lib/forcefindlib.c: Update copyright year. + * lib/listfile.c: Update copyright year. + * lib/listfile.h: Update copyright year. + * lib/nextelem.c: Update copyright year. + * lib/nextelem.h: Update copyright year. + * lib/printquoted.c: Update copyright year. + * lib/printquoted.h: Update copyright year. + * lib/qmark.c: Update copyright year. + * lib/regexprops.c: Update copyright year. + (copying): Update copyright year in the output file, too. + * lib/regextype.c: Update copyright year. + * lib/regextype.h: Update copyright year. + * lib/safe-atoi.c: Update copyright year. + * lib/safe-atoi.h: Update copyright year. + * lib/savedirinfo.c: Update copyright year. + * lib/savedirinfo.h: Update copyright year. + * lib/unused-result.h: Update copyright year. + * lib/waitpid.c: Update copyright year. + * locate/bigram.c: Update copyright year. + * locate/code.c: Update copyright year. + * locate/frcode.c: Update copyright year. + * locate/locate.c: Update copyright year. + * locate/locatedb.h: Update copyright year. + * locate/word_io.c: Update copyright year. + * xargs/xargs.c: Update copyright year. + + More copyright year updates. + * build-aux/check-testfiles.sh: Update copyright year. + * m4/noreturn.m4: Update copyright year. + * po/POTFILES.in: Update copyright year. + + Update the copyright year in test/documentation files, updatedb. + * build-aux/src-sniff.py: Update copyright year. + * doc/find-maint.texi: Update copyright year. + * doc/regexprops.texi: Update copyright year. + * find/testsuite/config/unix.exp: Update copyright year. + * locate/testsuite/config/unix.exp: Update copyright year. + * xargs/testsuite/config/unix.exp: Update copyright year. + * locate/updatedb.sh: Update copyright year. + +2011-06-03 James Youngman + + Warn about lack of birth time information only when it's true. + * find/pred.c (pred_newerXY): Issue a warning about the inability + to get the birth time of a file, only if we actually failed to + obtain the birth time of the file. This is a bugfix; there was a + misplaced semicolon after an if condition, so the immediately + succeeding block qould be executed unconditionally. + + Compiler warning fixes in find/pred.c. + * find/pred.c (mode_to_filetype): return const char*. + (impl_pred_exec): Make target and prefix variables const. + (impl_pred_exec): Separate 'target' variable (which sometimes + points to a string literal) from a separate 'buf' variable (which, + if set, is always the value returned by base_name, which needs to + be freed. + (checked_fwrite): Store the result of fwrite in a size_t (i.e. the + same type the function returns). + + Eliminate some compiler warnings in parser.c + * find/parser.c: Don't define the macros STRINGIFY and + PARSE_ACTION_NP. + (optionh_getfilecon): Make this function static + since it is not used elsewhere. + (optionl_getfilecon): Likewise. + (optionp_getfilecon): Likewise. + (found_parser): Likewise. + + Avoid code redundancy in lib/buildcmd.c. + * lib/buildcmd.c (bc_get_arg_max): Recheck val only if we might + have changed it (i.e. when ARG_MAX is defined). + + Eliminate some compiler warnings in find/parser.c. + * find/defs.h (struct parser_table): Make parser_name field const. + * find/parser.c: Remove redundant declaration of parse_print. + (insert_path_check): Change name of parameter pred_name to avoid + shadowing the function of that name. + (find_parser): Make search_name parameter const. + + Fix a compiler warning in lib/buildcmd.c + * lib/buildcmd.c: special_terminating_arg should be const. + + Fix compiler warnings in lib/fdleak.c + * lib/fdleak.c (visit_open_fds): Rename loop variable from i to j + to avoid shadowing. + (get_proc_max_fd): Fix definition (it's a void function, not a + traditional pre-ANSI function definition). + + Fix several small compiler warnings. + * lib/dircallback.c: Include dircallback.h. + * lib/dircallback.h: Correct declaration of run_in_dir. + * lib/listfile.c (file_blocksize): Use the otherwise-unused parameter. + * find/defs.h: Remove redundant declaration of variable options. + + Fix some compiler warnings in findutils-version.c. + * lib/findutils-version.c: include findutils-version.h. Make + version_string const. Don't #define N_, since we don't use it. + + Don't display a separate gnulib version. + * lib/findutils-version.c (display_findutils_version): Don't + display gnulib_version because it's no longer defined (because + there is no gnulib version separate from the findutils version, + now that gnulib is a submodule). + * import-gnulib.config: remove gnulib_version and destdir, they + are not needed any more. + * lib/Makefile.am (EXTRA_DIST): Don't distribute gnulib-version.h + or gnulib-version.c. + (BUILT_SOURCES): delete, there are no longer any built sources. + * lib/gnulib-version.h: Remove. + * locate/code.c: Don't include gnulib-version.h + * xargs/xargs.c: Don't include gnulib-version.h + +2011-06-01 James Youngman + + Take the last matching entry in /etc/mtab, not the first. + * find/fstype.c (file_system_type_uncached): Instead of taking the + first match, take the last match. This deals better with mtab + implementations in which there can be duplicate entries, for + example Linux-based systems in which /etc/mtab is a symlink to + /proc/mounts) can have duplicate entries in the file system list. + This happens most frequently for /. + * NEWS: Mention this change. + +2011-06-02 James Youngman + + Remove unnecessary header checks and include guards. + * configure.ac (AC_CHECK_HEADERS): Remove checks for header files + that gnulib either assumes are always present, or provides + itself. These include errno.h fcntl.h inttypes.h limits.h + locale.h stddef.h stdint.h stdlib.h string.h sys/types.h + unistd.h. + * lib/buildcmd.c: Remove include guard for limits.h. + * find/fstype.c: Remove include guard for sys/types.h. + * lib/savedirinfo.c: Likewise. + * find/find.c: Remove include guard for locale.h. + * find/ftsfind.c: Likewise. + +2011-06-01 James Youngman + + Better error handling for the result of set_fstype_devno. + * find/fstype.c (file_system_type_uncached): If set_fstype_devno + fails for an entry (that is, the device number stays at -1) don't + consider it a match. + (get_mounted_filesystems): Don't call set_fstype_devno since we + don't need to check the device number. + (get_mounted_devices): If set_fstype_devno fails for a file + system, don't return it. + +2011-05-31 James Youngman + + import-gnulib.sh now stops if it sees the old directory layout. + * import-gnulib.sh (check_old_gnulib_dir_layout): Check the + ./gnulib-git, ./gnulib/ and ./gl/ subdirectories to figure out if + we are using a current version of import-gnulib.sh with an old + directory layout. If so, print an explanation of the problem and + return false. + (main): stop if check_old_gnulib_dir_layout didn't like the + directory layout. + + Minor fixes in import-gnulib.sh. + * import-gnulib.sh (fixmsg): Fix punctuation in the commands given + for installing the changelog driver. + (usage): Explain what the -a option does. + (run_gnulib_tool): delete broken symlinks in the output directory, + not the gnulib source. + (check_merge_driver): fix the path to the ChangeLog merge driver + source. + +2011-05-30 James Youngman + + Manage gnulib as a git submodule. + * .gitmodules: New file; manage gnulib as a submodule. For future + compatibility with the "bootstrap" script, keep the gnulib + submodule in the gnulib directory (instead of the gnulib-git + directory as before). This means we need to find a new directory + for the output of gnulib-tool; we will use "gl" for that. + * import-gnulib.sh (do_checkout): Replace with do_submodule. + (do_submodule): initialise and configure the gnulib module. + (main): call do_submodule instead of do_checkout. Don't call + move_cvsdir, it's obsolete. + (move_cvsdir): delete + (run_gnulib_tool): change gnulib to ${gldest} (and set that variable). + (hack_gnulib_tool_output): generate gl/Makefile.am, not + gnulib/Makefile.am. + (refresh_output_files): Rename gnulib to gl. + (update_version_file): Check the state of the submodule. + * Makefile.am (SUBDIRS): Rename gnulib to gl. + (ACLOCAL_AMFLAGS): Likewise. + * lib/Makefile.am (INCLUDES): Likewise. + (LDADD): Likewise. + (findutils-check-smells): Rename gnulib-git to gnulib. + * find/Makefile.am (INCLUDES): Change gnulib to gl. + (LDADD): Likewise. + * xargs/Makefile.am (INCLUDES): Change gnulib to gl. + (LDADD): Likewise. + * locate/Makefile.am (INCLUDES): Rename gnulib to gl. + (LDADD): Likewise. + * .gitignore: Rename gnulib to gl. + * configure.ac (AC_CONFIG_MACRO_DIR): Change to gl/m4. + (AC_CONFIG_FILES): use gl/Makefile and gl/lib/Makefile instead of + gnulib/Makefile and gnulib/lib/Makefile. + * find/fstype.c: Include gnulib include files as "foo.h", not + "../gnulib/lib/foo.h", because the relative path is not needed and + in any case has changed. + +2011-05-29 James Youngman + + Savannah bug #31424: Revert Interix-specific change. + Gnulib will use suacomp for solving this problem, so findutils + will not need a workaround here. + * lib/arg-max.h: Delete this file. + * lib/Makefile.am (libfind_a_SOURCES): Remove arg-max.h. + * lib/buildcmd.c: Don't include arg-max.h. + * xargs/xargs.c: Likewise. + +2011-05-24 James Youngman + + Fix Savannah bug #33384. + * locate/updatedb.sh: Don't reset $PATH, because the hard-coded + value we were using isn't guaranteed to contain all the utilities + (for example rm, chmod and so on) we would like to use. + * NEWS: Mention this bugfix. + +2011-05-22 James Youngman + + Don't assume that "echo" lives in /bin. + * xargs/xargs.c (main): Change default_cmd from "/bin/echo" (which + may not be present on some POSIX systems) to "echo" (which must + exist somewhere on $PATH on any POSIX system). + * doc/find.texi (Multiple Files): document this. + * NEWS: Describe this change. + * xargs/testsuite/xargs.sysv/empty_def-t.xe: Change /bin/echo to + echo. + * xargs/testsuite/xargs.gnu/n2-s26-x-0.exp: Change -s26 to -s21 to + keep the expected test result the same. Rename the test to + reflect the updated arguments. + * xargs/testsuite/xargs.gnu/n2-s26-x-0.xo: Rename to + n2-s21-x-0.xo. + * xargs/testsuite/xargs.gnu/n2-s26-0.exp: Rename to n2-s21-0.exp, + update -s argument. + * xargs/testsuite/xargs.posix/s30.exp: Rename to s25.exp, update -s. + * xargs/testsuite/xargs.posix/s30.xo: Rename to s25.xo. + * xargs/testsuite/xargs.gnu/s30-0.exp: Rename to s25-0.exp, update + -s argument. + * xargs/testsuite/xargs.gnu/s30-0.xo: Rename to s25-0.xo. + * xargs/testsuite/xargs.sysv/s30-t.exp: Rename to s25-t.exp, + update -s. + * xargs/testsuite/xargs.sysv/s30-t.xo: Rename to s25-t.xo. + * xargs/testsuite/xargs.sysv/s30-t.xe: Rename to s25-t.xe, change + /bin/echo to just echo. + * xargs/testsuite/xargs.posix/s47.exp: Rename to s42.exp, update -s. + * xargs/testsuite/xargs.posix/s47.xo: Rename to s42.xo. + * xargs/testsuite/xargs.gnu/n3-s36-0.exp: Rename to n3-s31-0.exp, + update -s. + * xargs/testsuite/xargs.gnu/n3-s36-0.xo: Rename to n3-s31-0.xo. + * xargs/testsuite/xargs.gnu/s20-0.exp: Rename to s15-0.exp, update + -s. + * xargs/testsuite/xargs.gnu/s20-0.xo: Rename to s15-0.xo. + * xargs/testsuite/xargs.posix/n2-s26.exp: Rename to n2-s21.exp, + update -s. + * xargs/testsuite/xargs.posix/n2-s26.xo: Rename to n2-s21.xo. + * xargs/testsuite/xargs.gnu/s19-0.exp: Rename to s14-0.exp, update + -s. + * xargs/testsuite/xargs.gnu/s19-0.xo: Rename to s14-0.xo. + * xargs/testsuite/xargs.gnu/s19_2-0.exp: Rename to s14_2-0.exp, + update -s. + * xargs/testsuite/xargs.gnu/s19_2-0.xo: Rename to s14_2-0.xo. + * xargs/testsuite/xargs.posix/n3-s36.exp: Rename to n3-s31.exp, + update -s. + * xargs/testsuite/xargs.posix/n3-s36.xo: Rename to n3-s31.xo. + * xargs/testsuite/xargs.posix/s19.exp: Rename to s14.exp, update + -s. + * xargs/testsuite/xargs.posix/s19.xo: Rename to s14.xo. + * xargs/testsuite/xargs.posix/s19_2.exp: Rename to s14_2.exp, + update -s. + * xargs/testsuite/xargs.posix/s19_2.xo: Rename to s14_2.xo. + * xargs/testsuite/xargs.posix/s20.exp: Rename to s15.exp, + update -s. + * xargs/testsuite/xargs.posix/s20.xo: Rename to s15.xo. + * xargs/testsuite/Makefile.am (EXTRA_DIST_XO): Update names. + (EXTRA_DIST_EXP): Likewise. + +2011-05-17 James Youngman + + Document ftsfind/oldfind and configure options. + * doc/find.texi (Configuration): New section documenting the + important configuration options that can be passed to configure, + including --without-fts. + * find/find.1 (BINARIES): New section explaining why two binaries + are installed. + * find/oldfind.1: New manual page explaining how 'oldfind' is + different to 'find'. + * find/ftsfind.1: New manual page explaining how 'ftsfind' is + different to 'find'. + * find/Makefile.am (man_MANS): As well as find.1, install one of + ftsfind.1 or oldfind.1, depending on whether --without-fts was + specified to configure. + * NEWS: Mention this change. + +2011-05-15 James Youngman + + Add lib/fdleak.c to translatable files. + * po/POTFILES.in: Add lib/fdleak.c. + + Fix Savannah bug #18227 (-ls doesn't print device major/minor). + * lib/listfile.c (list_file): check HAVE_STRUCT_STAT_ST_RDEV + instead of HAVE_ST_RDEV, fixing this bug. HAVE_ST_RDEV was + defined by the obsolete Autoconf macro AC_STRUCT_ST_RDEV, but + findutils hasn't actually called AC_STRUCT_ST_RDEV since Apr 5 + 2000. + * NEWS: Mention this bugfix. + + #29698: Correct and clarify documentation of xargs -d option + * xargs/xargs.1: Update documentation for -d option to more + clearly distinguish the treatment of backslashes in the input and + the treatment of backslashes in the argument to -d. + * NEWS: Mention this bugfix. + + Implement xargs --process-slot-var. + * xargs/xargs.c (set_slot_var): New function; sets an environment + variable to the index of the entry in pids[] that represents the + relevant child process. This can be used in rudimentary load + distribution systems. + (slot_var_name): the name of the variable to use (selected by + --process-slot-var). + (enum LongOptionIdentifier): Unique identifiers for long options + with no short option equivalent (--process-slot-var is the first). + (longopts): Add --process-slot-var. + (add_proc): return the index within pids[] that we selected. + (main): Pass &option_index to getopt_long (option_index is a new + variable) in order to identify which long option was passed. + Handle --process-slot-var. + (prep_child_for_exec): Call set_slot_var. + (usage): Mention --process-slot-var. + * doc/find.texi (xargs options): Document --process-slot-var. + * xargs/xargs.1: Likewise. + * NEWS: Mention this change and that it was Savannah bug #29512. + + Describe xargs options in alphabetical order. + * xargs/xargs.1: Re-order the options to place them in + alphabetical order. Put --help and --version at the end. + * xargs/xargs.c (usage): Describe the options in alphabeitcal + order. + * NEWS: Mention this change. + + Fix bug #14386: updatedb relies on mktemp, which is not portable. + * locate/updatedb.sh (make_tempdir): new function, works around + the possible absence of mktemp. We now create the file list and + the bigrams file in a temporary directory. Also add some quoting + for a few shell variables. Update the copyright years. + * locate/testsuite/locate.gnu/oldformat.exp: Add a test case which + uses the old database format, in order to exercise our mktemp + replacement. + * locate/testsuite/Makefile.am (EXTRA_DIST_EXP): Ship this new + file. + * locate/testsuite/locate.gnu/oldformat.xo: The expected output + for the new test. + * locate/testsuite/Makefile.am (EXTRA_DIST_XO): Ship this new + file. + * NEWS: Mention this bugfix. + +2011-05-14 James Youngman + + Fix bug #32043 (fnmatch should treat unquoted [ literally). + * import-gnulib.config (gnulib_version): Update gnulib to the + version which includes the fnmatch fix (a backport of glibc bug + #12378). This fixes our bug too. + * find/testsuite/sv-bug-32043.sh: New (non-DejaGnu) test script. + Tests Savannah bug #32043 (POSIX requires that an unquoted [ + should be matched literally). + * find/testsuite/Makefile.am (TESTS): Add sv-bug-32043.sh. + (EXTRA_DIST): Distribute sv-bug-32043.sh. + * NEWS: Mention this bugfix. + 2011-05-11 James Youngman + Move on from 4.5.10, to 4.5.11-git. + * NEWS, configure.ac: update version number. + Prepare for release of findutils-4.5.10. * NEWS: Update version number to 4.5.10 to prepare for that release. Add a release date (2011-05-11). + * configure.ac: Also update version number. * po/*.po, po/findutils.pot: make dist changes these. @@ -1809,7 +3565,7 @@ 2009-04-13 Andreas Metzler - Fix Savannah bug# 26092: find.1 still marks -iwholename as prefered + Fix Savannah bug# 26092: find.1 still marks -iwholename as preferred * find/find.1 (-iwholename): Indicate that this option is no longer preferred over -ipath. @@ -1976,7 +3732,7 @@ * po/sl.po: Updated Slovenian translation. * po/sv.po: Updated Swedish translation. * po/tr.po: Updated Turkish translation. - * po/uk.po: Updated Ukranian translation. + * po/uk.po: Updated Ukrainian translation. * po/vi.po: Updated Vietnamese translation. * NEWS: Mention these updates. @@ -2311,7 +4067,7 @@ (UNUSUAL FILENAMES): Describe how LC_CTYPE affects -printf %p, -print, -fprint. (STANDARDS CONFORMANCE): -ok and -okdir now obey the system's - defintion of yes/no if POSIXLY_CORRECT is set. In any case, + definition of yes/no if POSIXLY_CORRECT is set. In any case, LC_CTYPE and LC_COLLATE may have some effect. Point out that the setting of LC_MESSAGES deternmines what pattern is used to interpret the user's response to -ok/-okdir. @@ -2854,7 +4610,7 @@ 2007-08-18 Eric Blake Fix Savannah bug #20751. - * lib/listfile.c (list_file): Accomodate gnulib change of 3 Jul + * lib/listfile.c (list_file): Accommodate gnulib change of 3 Jul 2006. * NEWS: Document this. Reported by Nigel Stepp. @@ -3802,7 +5558,7 @@ * find/defs.h (pred_open) Rename to pred_openparen to avoid problems with the macrtos which build the parser tabnles on - platforms where 'open' is in fact a macro whcih expands to + platforms where 'open' is in fact a macro which expands to open64. The problem was that token pasting put pred_open64 into the parser table, but the function was still defined as parse_open. This fixes Savannah bug #19371. @@ -3952,7 +5708,7 @@ 2007-04-20 Maxim V. Dziumanenko - * po/uk.po: New Ukranian translation. + * po/uk.po: New Ukrainian translation. * configure.in: Added "uk" for Ukranian. 2007-04-19 Peter Breitenlohner (tiny change) @@ -4142,7 +5898,7 @@ 2007-04-09 James Youngman * doc/find.texi: Change fully-specified @node directives to - single-argument @node directives in order to accomodate the + single-argument @node directives in order to accommodate the inclusion of getdate.texi. * doc/find.texi: Document -newerXY. @@ -4184,7 +5940,7 @@ 2007-03-28 James Youngman * find/defs.h (set_stat_placeholders): utility function for - initialising the sturct stat fields that NetBSD doesn't always set + initialising the struct stat fields that NetBSD doesn't always set (like st_birthtime where the file is on a filesystem not supporting birthtime). * find/util.c: set_stat_placeholders(): new function @@ -4506,7 +6262,7 @@ find/testsuite/find.gnu/perm000.xo: -perm /000 is now quivalent to -perm -000, as dscussed in Savannah bug #14748. The warning message we issue when the user does this now explains that the - defintion changed as we promised it would in 2005. + definition changed as we promised it would in 2005. * xargs/xargs.c (read_line): Correctly handle quoted empty arguments occurring first or last on a line (by adding an empty @@ -5039,7 +6795,7 @@ * find/fstype.c: Savannah bug #14921: when a Linux bind filesystem is in use, find - would expand '-printf %F' to 'none' if a bind mount targetted the same + would expand '-printf %F' to 'none' if a bind mount targeted the same filesystem as the one containing the file to be described. * NEWS: Updated to describe recent changes @@ -5521,7 +7277,7 @@ from Andreas Metzler) * INSTALL, depcomp, doc/texinfo.tex, install-sh, missing, mkinstalldirs: - Updated auxilliary files from the automake-1.9 distribution + Updated auxiliary files from the automake-1.9 distribution * configure.in: Introduce new Automake conditional, CROSS_COMPILING, true when we are corss compiling @@ -7680,7 +9436,7 @@ Debian bug #176201. * xargs/xargs.c: - Fixed Debian bug #176201, "xargs enviroment size limited to 20k", by + Fixed Debian bug #176201, "xargs environment size limited to 20k", by reading a patch offered by Bob Proulx and implementing something substantially similar myself. @@ -9321,7 +11077,7 @@ * wait.h: New file taken from xargs.c. * xargs.c: Make limits.h vs. sys/param.h conditional on - LIMITS_MISSING instead of USG, to accomodate SVR2. + LIMITS_MISSING instead of USG, to accommodate SVR2. 1990-11-08 David J. MacKenzie diff --git a/GNUmakefile b/GNUmakefile index 6e00ec8..4ab6429 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,11 +1,11 @@ -# Having a separate GNUmakefile lets me `include' the dynamically +# Having a separate GNUmakefile lets me 'include' the dynamically # generated rules created via cfg.mk (package-local configuration) # as well as maint.mk (generic maintainer rules). # This makefile is used only if you run GNU Make. # It is necessary if you want to build targets usually of interest # only to the maintainer. -# Copyright (C) 2001, 2003, 2006-2011 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2006-2014 Free Software Foundation, Inc. # This 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,20 +20,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Systems where /bin/sh is not the default shell need this. The $(shell) -# command below won't work with e.g. stock DOS/Windows shells. -ifeq ($(wildcard /bin/s[h]),/bin/sh) -SHELL = /bin/sh -else -# will be used only with the next shell-test line, then overwritten -# by a configured-in value -SHELL = sh -endif - # If the user runs GNU make but has not yet run ./configure, # give them a diagnostic. -_have-Makefile := $(shell test -f Makefile && echo yes) -ifeq ($(_have-Makefile),yes) +_gl-Makefile := $(wildcard [M]akefile) +ifneq ($(_gl-Makefile),) # Make tar archive easier to reproduce. export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner @@ -45,12 +35,13 @@ include Makefile # Some projects override e.g., _autoreconf here. -include $(srcdir)/cfg.mk -include $(srcdir)/maint.mk # Allow cfg.mk to override these. _build-aux ?= build-aux _autoreconf ?= autoreconf -v +include $(srcdir)/maint.mk + # Ensure that $(VERSION) is up to date for dist-related targets, but not # for others: rerunning autoreconf and recompiling everything isn't cheap. _have-git-version-gen := \ @@ -100,6 +91,11 @@ srcdir = . # The package can override .DEFAULT_GOAL to run actions like autoreconf. -include ./cfg.mk + +# Allow cfg.mk to override these. +_build-aux ?= build-aux +_autoreconf ?= autoreconf -v + include ./maint.mk ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile) @@ -108,7 +104,7 @@ endif abort-due-to-no-makefile: @echo There seems to be no Makefile in this directory. 1>&2 - @echo "You must run ./configure before running \`make'." 1>&2 + @echo "You must run ./configure before running 'make'." 1>&2 @exit 1 endif diff --git a/INSTALL b/INSTALL index 7d1c323..a1e89e1 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -226,6 +226,11 @@ order to use an ANSI C compiler: and if that doesn't work, install pre-built binaries of GCC for HP-UX. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended diff --git a/Makefile.am b/Makefile.am index c7f8f39..fa54bac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,14 +9,12 @@ DISTCLEANFILES = tool-versions.txt # "tests" is the gnulib unit test dir. -SUBDIRS = gnulib tests build-aux lib find xargs locate doc po m4 +SUBDIRS = gl tests build-aux lib find xargs locate doc po m4 -ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4 +ACLOCAL_AMFLAGS = -I gl/m4 -I m4 TESTFILE_SUFFIXES = .exp .xo .xe .xi -# CONFIG_CLEAN_FILES = gnulib/lib/regex.c - tool-versions.txt: Makefile ( automake --version ; echo ; \ autoconf --version ; echo ; \ @@ -49,7 +47,9 @@ findutils-check-testfiles: findutils-check-smells: find $(srcdir) \( -path $(srcdir)/autom4te.cache -o \ - -path $(srcdir)/gnulib-git -o \ + -path $(srcdir)/gnulib -o \ + -path $(srcdir)/gl -o \ + -path $(srcdir)/tests -o \ -name .git -o \ \( -type d -name CVS \) \ \) -prune -o \ @@ -57,3 +57,14 @@ findutils-check-smells: \! \( -name '*~' -o -name '*.xo' -o -name '*.xi' \) \ -print0 | \ xargs -0 python $(AUXDIR)/src-sniff.py + +# Clean coverage files generated by running binaries built with gcc +# -fprofile-arcs -ftest-coverage. We touch subdirectories here +# because the relecvant Makefile.am files (which we would otherwise +# edit to add an $(RM) command in their own coverage-clean rule) are +# generated by gnulib-tool and therefore we cannot add the rule to +# those files. +coverage-clean: + for dir in . gl/lib gl/lib/glthread gl/lib/uniwidth tests tests/uniwidth; do $(RM) $${dir}/*.gcno $${dir}/*.gcda $${dir}/*.gcov $${dir}/*.lcov; done + +clean-local: coverage-clean diff --git a/Makefile.in b/Makefile.in index a6b129f..768e9fe 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -41,233 +58,198 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -285,6 +267,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -297,9 +284,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -328,6 +317,8 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ @@ -335,6 +326,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -345,6 +338,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -367,59 +361,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -427,6 +468,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -438,12 +481,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -455,10 +513,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -498,49 +572,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -567,6 +681,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -576,7 +692,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -588,8 +705,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -632,26 +751,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -668,17 +809,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -700,19 +851,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -728,6 +895,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -742,8 +915,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -765,30 +947,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -796,6 +1010,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -803,18 +1018,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -854,18 +1082,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -875,6 +1105,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -885,12 +1117,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -911,6 +1146,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -921,7 +1159,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -929,8 +1169,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -946,7 +1192,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -954,8 +1202,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -977,10 +1231,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -992,19 +1253,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -1012,26 +1286,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -1049,6 +1353,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1061,11 +1368,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1073,6 +1390,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1080,10 +1398,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1093,10 +1414,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1120,6 +1446,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1127,14 +1454,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1144,6 +1474,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1156,7 +1488,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1197,9 +1531,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1218,14 +1557,14 @@ EXTRA_DIST = COPYING ChangeLog TODO config.h.in stamp-h.in \ DISTCLEANFILES = tool-versions.txt # "tests" is the gnulib unit test dir. -SUBDIRS = gnulib tests build-aux lib find xargs locate doc po m4 -ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4 +SUBDIRS = gl tests build-aux lib find xargs locate doc po m4 +ACLOCAL_AMFLAGS = -I gl/m4 -I m4 TESTFILE_SUFFIXES = .exp .xo .xe .xi all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -1261,10 +1600,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -1452,13 +1789,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -1493,7 +1827,11 @@ dist-gzip: distdir $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir @@ -1501,7 +1839,7 @@ dist-lzma: distdir $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -1532,6 +1870,8 @@ distcheck: dist bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -1541,7 +1881,7 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -1551,6 +1891,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -1579,8 +1920,16 @@ distcheck: dist list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -1611,10 +1960,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -1629,7 +1983,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-generic mostlyclean-am +clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -1701,22 +2055,20 @@ uninstall-am: .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am - - -# CONFIG_CLEAN_FILES = gnulib/lib/regex.c + clean-local ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am + tool-versions.txt: Makefile ( automake --version ; echo ; \ @@ -1740,7 +2092,9 @@ findutils-check-testfiles: findutils-check-smells: find $(srcdir) \( -path $(srcdir)/autom4te.cache -o \ - -path $(srcdir)/gnulib-git -o \ + -path $(srcdir)/gnulib -o \ + -path $(srcdir)/gl -o \ + -path $(srcdir)/tests -o \ -name .git -o \ \( -type d -name CVS \) \ \) -prune -o \ @@ -1749,6 +2103,17 @@ findutils-check-smells: -print0 | \ xargs -0 python $(AUXDIR)/src-sniff.py +# Clean coverage files generated by running binaries built with gcc +# -fprofile-arcs -ftest-coverage. We touch subdirectories here +# because the relecvant Makefile.am files (which we would otherwise +# edit to add an $(RM) command in their own coverage-clean rule) are +# generated by gnulib-tool and therefore we cannot add the rule to +# those files. +coverage-clean: + for dir in . gl/lib gl/lib/glthread gl/lib/uniwidth tests tests/uniwidth; do $(RM) $${dir}/*.gcno $${dir}/*.gcda $${dir}/*.gcov $${dir}/*.lcov; done + +clean-local: coverage-clean + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/NEWS b/NEWS index 700ccdf..36b20d5 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,175 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout) +* Major changes in release 4.5.14, 2014-07-19 + +** Bug Fixes + +#42793: "Failed to write output" with -ls (this bug affected only + release 4.5.13). + +* Major changes in release 4.5.13, 2014-07-16 + +** Documentation Changes + +Some minor documentation improvements are listed in "Bug Fixes" below. + +** Bug Fixes + +#40339: Fix leaked directory handle when listing mounted file + systems. + +#40094: The xargs --help output has a small number of cosmetic + improvements. + +#39197: Small fix to find's manual page to remove an unwanted + backslash, which made the troff incompatible with Eric + Raymond's doclifter software. + +#39162: -printf reads beyond arguments terminated by \ + +#35753: Check the success/failure of material I/O operations where + these are important to the use of the output (i.e. check the + output for "find -ok" but not debugging output). + +#31005: The find manual page and Texinfo manual now more clearly state + that -exec ... + always returns true. + + +** Translations + +Updated translations: Estonian, Polish, Ukranian. + + +* Major changes in release 4.5.12, 2013-09-22 + +** Functional Changes to find + +The GNU extension "find ... -perm /MODE" is no longer disabled when +the POSIXLY_CORRECT environment variable is set. + +The obsolete GNU extension "find ... -perm +MODE", which was withdrawn +in release 4.2.21 in 2005 due to compatibility problems, has been +completely removed. Use "find ... -perm /MODE" instead. + +** Documentation Changes + +If you use -type or -xtype with a type letter corresponding to a file +type which is not supported by the system on which find was compiled, +find will now give a clearer error message (though the functionality +is unchanged). Type letters are affected are D, l and p (for Solaris +Doors, symbolic links and named pipes respectively). + +The output of xargs --help has been slightly changed for greater +clarity. + +The documentation for xargs now warns about parallel processes (xargs +-P) sharing stdout. + +The documentation for find -execdir now describes correctly that the +command will be executed in the same directory as the file we were +considering at the time. The documentation previously (and +incorrectly) stated that the original working directory of find would +be used. + +** Bug Fixes + +Some bugs in 4.5.11 were fixed without adding them to the bug +database, though they are in the ChangeLog: + +*** Use of [[ ... ]] in find/testsuite/sv-bug-32043.sh + +*** Don't delete header files in "lib/" for "make clean". + +*** xargs: wait for process before prompting in interactive mode (-p) + +These following fixed bugs are recorded at +https://savannah.gnu.org/bugs/?group=findutils: + +#40088: potential buffer overflow in -execdir and -okdir + +#39324: exits without error on OOM + +#38583: errno-buffer read failed in xargs_do_exec + +#38474: Unintended (?) behaviour change of -perm +mode predicate + +#36652: Better document that -0/-d turns off the effect of -E. + +#34976: find -execdir leaks file descriptors for the working directory + + +* Major changes in release 4.5.11, 2013-02-02 + +** Documentation Changes + +The Texinfo manual and the find manual pafe now explain why two find +binaries (either 'find' and 'oldfind', or 'find' and 'ftsfind') are +installed. A manual page for either ftsfind or oldfind is also +installed, whichever is appropriate. + +** Bug Fixes + +#34079: Apply gnulib ftw memory fix + +#33384: If rm/chmod etc. are not in /bin or /usr/bin, updatedb fails + +#18227: find -ls does not display device major/minor numbers. + +#29698: Correct and clarify documentation of xargs -d option + +#32887: Present xargs options alphabetically like in GNU cp(1) etc + +#14386: updatedb relies on mktemp, which is not portable. + +#32043: find -name [ doesn't obey posix + +#37926: The -inum predicate previously gave wrong results in oldfind + (ftsfind, the default find binary, was unaffected). + +** Functional Changes to xargs + +If no utility is specified, xargs now calls "echo" (and searches on +$PATH to find it) rather than "/bin/echo". This may give rise to +subtle behaviour differences for some users. To avoid unexpected +surprises, just explicitly specify the utility you would like to run. +For example use "xargs /bin/echo < foo" rather than "xargs < foo". + +A new option is provided, --process-slot-var. If you set this, xargs +will set the indicated environment variable in each child. The values +are re-used, but no executing child process will have the same value +as another executing child process. This wishlist item was Savannah +bug #29512. + +** Functional Changes to find + +For find -printf, the format specifiers %{, %[ and %( are all now +reserved for future use. Previously these would print {, [ and ( +respectively, but in any case those characters can just be printed +literally like this: find -printf "{[(". Code changes intended to +explain that these are reserved went into findutils-4.5.5, but this +code had, before now, had no effect. + +When expanding "-printf '%F'", find reads /etc/mtab. We now take the +last match found in this file, rather than the first, to better deal +with implementations which have duplicate entries (for example +/proc/mounts on systems running the Linux kernel). + +Both oldfind and ftsfind now use less heap memory when processing +directories containing very many files. However, oldfind now uses one +file descriptor per recursive subdirectory level, which will further +limit the depth of directory trees it can search. If you need find to +be able to search deep directory trees, use ftsfind (this is, by +default the binary built and installed as 'find'). + +The behaviour of the "awk", "posix-awk" and "gnu-awk" regular +expression types selected by the -regextype option have slightly +changed, to bring them into line with the behaviour of the GNU C +library. For "awk", character classes (such as [[:digit:]]) are now +supported. For "gnu-awk" and "posix-awk", intervals are supported and +invalid interval specifcations are treated as literals (for example +'a{1' is treated as 'a\{1'). + + * Major changes in release 4.5.10, 2011-05-11 ** Documentation Changes @@ -729,7 +899,7 @@ with a space ** Translations -Findutils 4.3.4 includes a translation for the Ukranian language. +Findutils 4.3.4 includes a translation for the Ukrainian language. * Major changes in release 4.3.3, 2007-04-15 diff --git a/README b/README index ec5d312..4671dcc 100644 --- a/README +++ b/README @@ -49,10 +49,10 @@ It does this by: 1. Checking the number of links to directories and not statting files that it knows aren't directories until it encounters a test or action that needs the stat info. -2. Rearranging the command line, where possible, so that it can do tests -that don't require a stat before tests that do, in hopes that the -latter will be skipped because of an OR or AND. (But it only does -this where it will leave the output unchanged.) +2. Rearranging the command line, where possible, so that it can do +tests that don't require a stat before tests that do, in hopes that +the latter will be skipped because of a -o/-a conjunction. (But it +only does this where it will leave the output unchanged.) The locate program and its helper programs are derived (heavily modified) from James Woods' public domain fast-find code, which is diff --git a/README-hacking b/README-hacking index 5ce65b8..7d38f76 100644 --- a/README-hacking +++ b/README-hacking @@ -18,10 +18,15 @@ Prerequisites * GNU gettext * GNU Dejagnu +Dejagnu is in fact optional, but it's strongly recommened, since it is +needed to run findutils' test suite (which is how you know that find +works once it is built on your system). + The configure program should tell you if you try to use a version of -one of these tools which is not oif a recent enough version. The file +one of these tools which is not of a recent enough version. The file tool-versions.txt indicates which version of each tool the current -release was built and tested with. +release was built and tested with. This is included in the tar-file +releases, but it's not checked in to git. Use the latest upstream sources @@ -31,8 +36,8 @@ Use the latest upstream sources git clone git://git.sv.gnu.org/findutils -This will download the whole repository, it's about 14MB. If you -already have a copy you can refresh it with +This will download the whole repository, it's about 16MB once fetched. +If you already have a copy you can refresh it with: git checkout master (to switch to your copy of the master branch) git pull (to collect and merge changes) @@ -46,17 +51,10 @@ already have a copy you can refresh it with sh import-gnulib.sh This command will use git to check out the version of gnulib which is - intended to work with the findutils source you already have, as - configured by the file import-gnulib.config. The gnulib code itself - is left in the directory "gnulib-git". The "gnulib" directory - contains just the gnulib files that findutils needs during the build - process. - - If you want to build findutils with a different version of gnulib, - just edit import-gnulib.config to change the version and then re-run - import-gnulib.sh. When specifying the version, you can specify - either the date or a tag. If making any kind of release, please - use a fully identifying version (rather than just, say, "HEAD"). + intended to work with the findutils source you already have (gnulib + is used as a git submodule). The gnulib code itself is left in the + directory "gnulib". The "gl" directory contains just the gnulib + files that findutils needs during the build process. The import-gnulib.sh script will also run Autoconf and Automake to generate the "configure" script and "Makefile.in" files. Should you @@ -67,10 +65,6 @@ already have a copy you can refresh it with autoconf && \ automake --add-missing --copy -3. (Optional) Update the translations - - rsync -Lrtvz translationproject.org::tp/latest/findutils/ po - 3. Run "configure" and "make" in the normal way. If you have GNU libintl installed, you can just run "configure". @@ -143,9 +137,9 @@ If you plan to submit changes to findutils, please make sure you have read the GNU coding standard (http://www.gnu.org/prep/standards/). Some common things you might have forgotten to do are: + - add a ChangeLog entry (for now we still do that manually) - document your change in both the manual pages and the Texinfo file - re-run the test suite (with Dejagnu installed!) - - add a ChangeLog entry (for now we still do that manually) - add a test case for the bug you're fixing or feature you're adding - mention your fix or change (if it's significant) in the NEWS file @@ -189,9 +183,11 @@ Copyright assignment If your change is significant (i.e., if it adds more than ~10 lines), then you'll have to have a copyright assignment on file with the FSF. Since that involves first an email exchange between you and the FSF, -and then the exchange (FSF to you, then back) of an actual sheet of paper -with your signature on it, and finally, some administrative processing -in Boston, the process can take a few weeks. +and then the exchange (FSF to you, then back) of an actual sheet of +paper with your signature on it, and finally, some administrative +processing in Boston, the process can take a few weeks (for +contributors in some geographies, this can all be done electronically, +saving a lot of time). The forms to choose from are in gnulib's doc/Copyright/ directory. If you want to assign a single change, you should use the file, @@ -212,7 +208,7 @@ In case you're wondering why we bother with all of this, read this: ======================================================================== -Copyright (C) 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 2009, 2010, 2014 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or diff --git a/THANKS b/THANKS index ecba376..a3f83e2 100644 --- a/THANKS +++ b/THANKS @@ -5,6 +5,7 @@ Aaron S. Hawley Andreas Metzler Andreas Schwab Bas van Gompel +Benedikt Morbach Benno Schulenberg Bob Proulx Bruno Haible @@ -14,6 +15,7 @@ Dean Gaudet Dmitry V. Levin Ed Avis Eric Blake +Eric S. Raymond Geoff Clare Gerrit P. Haase Greg Wooledge diff --git a/aclocal.m4 b/aclocal.m4 index acb89f5..8313663 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,18 +14,21 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -34,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -50,19 +54,21 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -144,14 +150,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 +# serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -191,6 +197,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -255,7 +262,7 @@ AC_CACHE_CHECK([dependency style of $depcc], break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -320,10 +327,13 @@ AC_DEFUN([AM_DEP_TRACK], if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -545,12 +555,15 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -717,12 +730,15 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. @@ -745,13 +761,14 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 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. -# serial 4 +# serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -759,13 +776,13 @@ AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -776,31 +793,208 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, +# 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 +# serial 2 + +# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# --------------------------------------------------------------------------- +# Adds support for distributing Python modules and packages. To +# install modules, copy them to $(pythondir), using the python_PYTHON +# automake variable. To install a package with the same name as the +# automake package, install to $(pkgpythondir), or use the +# pkgpython_PYTHON automake variable. +# +# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as +# locations to install python extension modules (shared libraries). +# Another macro is required to find the appropriate flags to compile +# extension modules. +# +# If your package is configured with a different prefix to python, +# users will have to add the install directory to the PYTHONPATH +# environment variable, or create a .pth file (see the python +# documentation for details). +# +# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will +# cause an error if the version of python installed on the system +# doesn't meet the requirement. MINIMUM-VERSION should consist of +# numbers and dots only. +AC_DEFUN([AM_PATH_PYTHON], + [ + dnl Find a Python interpreter. Python versions prior to 2.0 are not + dnl supported. (2.0 was released on October 16, 2000). + m4_define_default([_AM_PYTHON_INTERPRETER_LIST], +[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl + python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) + + AC_ARG_VAR([PYTHON], [the Python interpreter]) + + m4_if([$1],[],[ + dnl No version check is needed. + # Find any Python interpreter. + if test -z "$PYTHON"; then + AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) + fi + am_display_PYTHON=python + ], [ + dnl A version check is needed. + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + AC_MSG_CHECKING([whether $PYTHON version >= $1]) + AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], + [AC_MSG_RESULT(yes)], + [AC_MSG_ERROR(too old)]) + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + AC_CACHE_CHECK([for a Python interpreter with version >= $1], + [am_cv_pathless_PYTHON],[ + for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + test "$am_cv_pathless_PYTHON" = none && break + AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) + done]) + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + ]) + + if test "$PYTHON" = :; then + dnl Run any user-specified action, or abort. + m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) + else + + dnl Query Python for its version number. Getting [:3] seems to be + dnl the best way to do this; it's what "site.py" does in the standard + dnl library. + + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], + [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) + AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) + + dnl Use the values of $prefix and $exec_prefix for the corresponding + dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made + dnl distinct variables so they can be overridden if need be. However, + dnl general consensus is that you shouldn't need this ability. + + AC_SUBST([PYTHON_PREFIX], ['${prefix}']) + AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) + + dnl At times (like when building shared libraries) you may want + dnl to know which OS platform Python thinks this is. + + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], + [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) + AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + + + dnl Set up 4 directories: + + dnl pythondir -- where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON script directory], + [am_cv_python_pythondir], + [if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pythondir], [$am_cv_python_pythondir]) + + dnl pkgpythondir -- $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + + AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) + + dnl pyexecdir -- directory for installing python extension modules + dnl (shared libraries) + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], + [am_cv_python_pyexecdir], + [if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) + + dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) + + AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) + + dnl Run any user-specified action. + $2 + fi -AC_DEFUN([AM_C_PROTOTYPES], -[AC_REQUIRE([AC_C_PROTOTYPES]) -if test "$ac_cv_prog_cc_stdc" != no; then - U= ANSI2KNR= -else - U=_ ANSI2KNR=./ansi2knr -fi -# Ensure some checks needed by ansi2knr itself. -AC_REQUIRE([AC_HEADER_STDC]) -AC_CHECK_HEADERS([string.h]) -AC_SUBST([U])dnl -AC_SUBST([ANSI2KNR])dnl -_AM_SUBST_NOTMAKE([ANSI2KNR])dnl ]) -AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) + +# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# --------------------------------------------------------------------------- +# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. +# Run ACTION-IF-FALSE otherwise. +# This test uses sys.hexversion instead of the string equivalent (first +# word of sys.version), in order to cope with versions such as 2.2c1. +# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). +AC_DEFUN([AM_PYTHON_CHECK_VERSION], + [prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] +sys.exit(sys.hexversion < minverhex)" + AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- @@ -867,12 +1061,14 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't @@ -895,13 +1091,13 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008, 2010 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. -# serial 2 +# serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- @@ -910,13 +1106,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -938,10 +1134,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) @@ -1015,230 +1212,280 @@ m4_include([m4/mkinstalldirs.m4]) m4_include([m4/noreturn.m4]) m4_include([m4/nullsort.m4]) m4_include([m4/withfts.m4]) -m4_include([gnulib/m4/00gnulib.m4]) -m4_include([gnulib/m4/alloca.m4]) -m4_include([gnulib/m4/argmatch.m4]) -m4_include([gnulib/m4/assert.m4]) -m4_include([gnulib/m4/bison.m4]) -m4_include([gnulib/m4/btowc.m4]) -m4_include([gnulib/m4/canonicalize.m4]) -m4_include([gnulib/m4/chdir-long.m4]) -m4_include([gnulib/m4/chown.m4]) -m4_include([gnulib/m4/clock_time.m4]) -m4_include([gnulib/m4/cloexec.m4]) -m4_include([gnulib/m4/close-stream.m4]) -m4_include([gnulib/m4/close.m4]) -m4_include([gnulib/m4/closein.m4]) -m4_include([gnulib/m4/closeout.m4]) -m4_include([gnulib/m4/codeset.m4]) -m4_include([gnulib/m4/configmake.m4]) -m4_include([gnulib/m4/ctype.m4]) -m4_include([gnulib/m4/cycle-check.m4]) -m4_include([gnulib/m4/d-ino.m4]) -m4_include([gnulib/m4/d-type.m4]) -m4_include([gnulib/m4/dirent-safer.m4]) -m4_include([gnulib/m4/dirent_h.m4]) -m4_include([gnulib/m4/dirfd.m4]) -m4_include([gnulib/m4/dirname.m4]) -m4_include([gnulib/m4/double-slash-root.m4]) -m4_include([gnulib/m4/dup2.m4]) -m4_include([gnulib/m4/eealloc.m4]) -m4_include([gnulib/m4/environ.m4]) -m4_include([gnulib/m4/errno_h.m4]) -m4_include([gnulib/m4/error.m4]) -m4_include([gnulib/m4/euidaccess.m4]) -m4_include([gnulib/m4/extensions.m4]) -m4_include([gnulib/m4/faccessat.m4]) -m4_include([gnulib/m4/fchdir.m4]) -m4_include([gnulib/m4/fclose.m4]) -m4_include([gnulib/m4/fcntl-o.m4]) -m4_include([gnulib/m4/fcntl-safer.m4]) -m4_include([gnulib/m4/fcntl.m4]) -m4_include([gnulib/m4/fcntl_h.m4]) -m4_include([gnulib/m4/fdopendir.m4]) -m4_include([gnulib/m4/fflush.m4]) -m4_include([gnulib/m4/fileblocks.m4]) -m4_include([gnulib/m4/filemode.m4]) -m4_include([gnulib/m4/flexmember.m4]) -m4_include([gnulib/m4/float_h.m4]) -m4_include([gnulib/m4/fnmatch.m4]) -m4_include([gnulib/m4/fopen.m4]) -m4_include([gnulib/m4/fpending.m4]) -m4_include([gnulib/m4/fpurge.m4]) -m4_include([gnulib/m4/freading.m4]) -m4_include([gnulib/m4/fseeko.m4]) -m4_include([gnulib/m4/fstypename.m4]) -m4_include([gnulib/m4/ftell.m4]) -m4_include([gnulib/m4/ftello.m4]) -m4_include([gnulib/m4/fts.m4]) -m4_include([gnulib/m4/getcwd-abort-bug.m4]) -m4_include([gnulib/m4/getcwd-path-max.m4]) -m4_include([gnulib/m4/getcwd.m4]) -m4_include([gnulib/m4/getdelim.m4]) -m4_include([gnulib/m4/getdtablesize.m4]) -m4_include([gnulib/m4/getgroups.m4]) -m4_include([gnulib/m4/getline.m4]) -m4_include([gnulib/m4/getopt.m4]) -m4_include([gnulib/m4/getpagesize.m4]) -m4_include([gnulib/m4/gettext.m4]) -m4_include([gnulib/m4/gettime.m4]) -m4_include([gnulib/m4/gettimeofday.m4]) -m4_include([gnulib/m4/getugroups.m4]) -m4_include([gnulib/m4/glibc21.m4]) -m4_include([gnulib/m4/gnulib-common.m4]) -m4_include([gnulib/m4/gnulib-comp.m4]) -m4_include([gnulib/m4/group-member.m4]) -m4_include([gnulib/m4/hash.m4]) -m4_include([gnulib/m4/human.m4]) -m4_include([gnulib/m4/i-ring.m4]) -m4_include([gnulib/m4/iconv.m4]) -m4_include([gnulib/m4/idcache.m4]) -m4_include([gnulib/m4/include_next.m4]) -m4_include([gnulib/m4/inline.m4]) -m4_include([gnulib/m4/intlmacosx.m4]) -m4_include([gnulib/m4/intmax_t.m4]) -m4_include([gnulib/m4/inttostr.m4]) -m4_include([gnulib/m4/inttypes-pri.m4]) -m4_include([gnulib/m4/inttypes.m4]) -m4_include([gnulib/m4/inttypes_h.m4]) -m4_include([gnulib/m4/isblank.m4]) -m4_include([gnulib/m4/iswblank.m4]) -m4_include([gnulib/m4/langinfo_h.m4]) -m4_include([gnulib/m4/lchown.m4]) -m4_include([gnulib/m4/lcmessage.m4]) -m4_include([gnulib/m4/lib-ld.m4]) -m4_include([gnulib/m4/lib-link.m4]) -m4_include([gnulib/m4/lib-prefix.m4]) -m4_include([gnulib/m4/libunistring-base.m4]) -m4_include([gnulib/m4/localcharset.m4]) -m4_include([gnulib/m4/locale-fr.m4]) -m4_include([gnulib/m4/locale-ja.m4]) -m4_include([gnulib/m4/locale-tr.m4]) -m4_include([gnulib/m4/locale-zh.m4]) -m4_include([gnulib/m4/locale_h.m4]) -m4_include([gnulib/m4/localename.m4]) -m4_include([gnulib/m4/lock.m4]) -m4_include([gnulib/m4/longlong.m4]) -m4_include([gnulib/m4/ls-mntd-fs.m4]) -m4_include([gnulib/m4/lseek.m4]) -m4_include([gnulib/m4/lstat.m4]) -m4_include([gnulib/m4/malloc.m4]) -m4_include([gnulib/m4/malloca.m4]) -m4_include([gnulib/m4/math_h.m4]) -m4_include([gnulib/m4/mathfunc.m4]) -m4_include([gnulib/m4/mbchar.m4]) -m4_include([gnulib/m4/mbiter.m4]) -m4_include([gnulib/m4/mbrtowc.m4]) -m4_include([gnulib/m4/mbsinit.m4]) -m4_include([gnulib/m4/mbslen.m4]) -m4_include([gnulib/m4/mbsrtowcs.m4]) -m4_include([gnulib/m4/mbstate_t.m4]) -m4_include([gnulib/m4/mbtowc.m4]) -m4_include([gnulib/m4/memchr.m4]) -m4_include([gnulib/m4/mempcpy.m4]) -m4_include([gnulib/m4/memrchr.m4]) -m4_include([gnulib/m4/mgetgroups.m4]) -m4_include([gnulib/m4/mkdir.m4]) -m4_include([gnulib/m4/mktime.m4]) -m4_include([gnulib/m4/mmap-anon.m4]) -m4_include([gnulib/m4/mode_t.m4]) -m4_include([gnulib/m4/modechange.m4]) -m4_include([gnulib/m4/mountlist.m4]) -m4_include([gnulib/m4/multiarch.m4]) -m4_include([gnulib/m4/nl_langinfo.m4]) -m4_include([gnulib/m4/nls.m4]) -m4_include([gnulib/m4/onceonly.m4]) -m4_include([gnulib/m4/open.m4]) -m4_include([gnulib/m4/openat.m4]) -m4_include([gnulib/m4/parse-datetime.m4]) -m4_include([gnulib/m4/pathmax.m4]) -m4_include([gnulib/m4/perror.m4]) -m4_include([gnulib/m4/po.m4]) -m4_include([gnulib/m4/printf.m4]) -m4_include([gnulib/m4/priv-set.m4]) -m4_include([gnulib/m4/progtest.m4]) -m4_include([gnulib/m4/putenv.m4]) -m4_include([gnulib/m4/quote.m4]) -m4_include([gnulib/m4/quotearg.m4]) -m4_include([gnulib/m4/readlink.m4]) -m4_include([gnulib/m4/readlinkat.m4]) -m4_include([gnulib/m4/realloc.m4]) -m4_include([gnulib/m4/regex.m4]) -m4_include([gnulib/m4/rmdir.m4]) -m4_include([gnulib/m4/rpmatch.m4]) -m4_include([gnulib/m4/same.m4]) -m4_include([gnulib/m4/save-cwd.m4]) -m4_include([gnulib/m4/savedir.m4]) -m4_include([gnulib/m4/selinux-context-h.m4]) -m4_include([gnulib/m4/selinux-selinux-h.m4]) -m4_include([gnulib/m4/setenv.m4]) -m4_include([gnulib/m4/setlocale.m4]) -m4_include([gnulib/m4/size_max.m4]) -m4_include([gnulib/m4/sleep.m4]) -m4_include([gnulib/m4/snprintf.m4]) -m4_include([gnulib/m4/ssize_t.m4]) -m4_include([gnulib/m4/st_dm_mode.m4]) -m4_include([gnulib/m4/stat-time.m4]) -m4_include([gnulib/m4/stat.m4]) -m4_include([gnulib/m4/stdarg.m4]) -m4_include([gnulib/m4/stdbool.m4]) -m4_include([gnulib/m4/stddef_h.m4]) -m4_include([gnulib/m4/stdint.m4]) -m4_include([gnulib/m4/stdint_h.m4]) -m4_include([gnulib/m4/stdio-safer.m4]) -m4_include([gnulib/m4/stdio_h.m4]) -m4_include([gnulib/m4/stdlib_h.m4]) -m4_include([gnulib/m4/stpcpy.m4]) -m4_include([gnulib/m4/strcase.m4]) -m4_include([gnulib/m4/strcasestr.m4]) -m4_include([gnulib/m4/strdup.m4]) -m4_include([gnulib/m4/strerror.m4]) -m4_include([gnulib/m4/strftime.m4]) -m4_include([gnulib/m4/string_h.m4]) -m4_include([gnulib/m4/strings_h.m4]) -m4_include([gnulib/m4/strndup.m4]) -m4_include([gnulib/m4/strnlen.m4]) -m4_include([gnulib/m4/strstr.m4]) -m4_include([gnulib/m4/strtoimax.m4]) -m4_include([gnulib/m4/strtol.m4]) -m4_include([gnulib/m4/strtoll.m4]) -m4_include([gnulib/m4/strtoul.m4]) -m4_include([gnulib/m4/strtoull.m4]) -m4_include([gnulib/m4/strtoumax.m4]) -m4_include([gnulib/m4/symlink.m4]) -m4_include([gnulib/m4/symlinkat.m4]) -m4_include([gnulib/m4/sys_stat_h.m4]) -m4_include([gnulib/m4/sys_time_h.m4]) -m4_include([gnulib/m4/sys_wait_h.m4]) -m4_include([gnulib/m4/thread.m4]) -m4_include([gnulib/m4/threadlib.m4]) -m4_include([gnulib/m4/time_h.m4]) -m4_include([gnulib/m4/time_r.m4]) -m4_include([gnulib/m4/timespec.m4]) -m4_include([gnulib/m4/tm_gmtoff.m4]) -m4_include([gnulib/m4/ungetc.m4]) -m4_include([gnulib/m4/unistd-safer.m4]) -m4_include([gnulib/m4/unistd_h.m4]) -m4_include([gnulib/m4/unlink.m4]) -m4_include([gnulib/m4/unlinkdir.m4]) -m4_include([gnulib/m4/usleep.m4]) -m4_include([gnulib/m4/vasnprintf.m4]) -m4_include([gnulib/m4/version-etc.m4]) -m4_include([gnulib/m4/warn-on-use.m4]) -m4_include([gnulib/m4/warnings.m4]) -m4_include([gnulib/m4/wchar_h.m4]) -m4_include([gnulib/m4/wchar_t.m4]) -m4_include([gnulib/m4/wcrtomb.m4]) -m4_include([gnulib/m4/wctob.m4]) -m4_include([gnulib/m4/wctomb.m4]) -m4_include([gnulib/m4/wctype_h.m4]) -m4_include([gnulib/m4/wcwidth.m4]) -m4_include([gnulib/m4/wint_t.m4]) -m4_include([gnulib/m4/xalloc.m4]) -m4_include([gnulib/m4/xgetcwd.m4]) -m4_include([gnulib/m4/xsize.m4]) -m4_include([gnulib/m4/xstrndup.m4]) -m4_include([gnulib/m4/xstrtod.m4]) -m4_include([gnulib/m4/xstrtol.m4]) -m4_include([gnulib/m4/yesno.m4]) -m4_include([gnulib/m4/yield.m4]) +m4_include([gl/m4/00gnulib.m4]) +m4_include([gl/m4/absolute-header.m4]) +m4_include([gl/m4/alloca.m4]) +m4_include([gl/m4/arpa_inet_h.m4]) +m4_include([gl/m4/assert.m4]) +m4_include([gl/m4/bison.m4]) +m4_include([gl/m4/btowc.m4]) +m4_include([gl/m4/byteswap.m4]) +m4_include([gl/m4/canonicalize.m4]) +m4_include([gl/m4/chdir-long.m4]) +m4_include([gl/m4/check-math-lib.m4]) +m4_include([gl/m4/clock_time.m4]) +m4_include([gl/m4/close-stream.m4]) +m4_include([gl/m4/close.m4]) +m4_include([gl/m4/closedir.m4]) +m4_include([gl/m4/closein.m4]) +m4_include([gl/m4/closeout.m4]) +m4_include([gl/m4/codeset.m4]) +m4_include([gl/m4/configmake.m4]) +m4_include([gl/m4/ctype.m4]) +m4_include([gl/m4/cycle-check.m4]) +m4_include([gl/m4/d-ino.m4]) +m4_include([gl/m4/d-type.m4]) +m4_include([gl/m4/dirent-safer.m4]) +m4_include([gl/m4/dirent_h.m4]) +m4_include([gl/m4/dirfd.m4]) +m4_include([gl/m4/dirname.m4]) +m4_include([gl/m4/double-slash-root.m4]) +m4_include([gl/m4/dup.m4]) +m4_include([gl/m4/dup2.m4]) +m4_include([gl/m4/eealloc.m4]) +m4_include([gl/m4/environ.m4]) +m4_include([gl/m4/errno_h.m4]) +m4_include([gl/m4/error.m4]) +m4_include([gl/m4/euidaccess.m4]) +m4_include([gl/m4/exponentd.m4]) +m4_include([gl/m4/exponentf.m4]) +m4_include([gl/m4/exponentl.m4]) +m4_include([gl/m4/extensions.m4]) +m4_include([gl/m4/extern-inline.m4]) +m4_include([gl/m4/faccessat.m4]) +m4_include([gl/m4/fchdir.m4]) +m4_include([gl/m4/fcntl-o.m4]) +m4_include([gl/m4/fcntl-safer.m4]) +m4_include([gl/m4/fcntl.m4]) +m4_include([gl/m4/fcntl_h.m4]) +m4_include([gl/m4/fdopen.m4]) +m4_include([gl/m4/fdopendir.m4]) +m4_include([gl/m4/fflush.m4]) +m4_include([gl/m4/fileblocks.m4]) +m4_include([gl/m4/filemode.m4]) +m4_include([gl/m4/filenamecat.m4]) +m4_include([gl/m4/flexmember.m4]) +m4_include([gl/m4/float_h.m4]) +m4_include([gl/m4/fnmatch.m4]) +m4_include([gl/m4/fopen.m4]) +m4_include([gl/m4/fpending.m4]) +m4_include([gl/m4/fpieee.m4]) +m4_include([gl/m4/fpurge.m4]) +m4_include([gl/m4/freadahead.m4]) +m4_include([gl/m4/freading.m4]) +m4_include([gl/m4/fseek.m4]) +m4_include([gl/m4/fseeko.m4]) +m4_include([gl/m4/fstat.m4]) +m4_include([gl/m4/fstatat.m4]) +m4_include([gl/m4/fstypename.m4]) +m4_include([gl/m4/ftell.m4]) +m4_include([gl/m4/ftello.m4]) +m4_include([gl/m4/ftruncate.m4]) +m4_include([gl/m4/fts.m4]) +m4_include([gl/m4/getcwd-abort-bug.m4]) +m4_include([gl/m4/getcwd-path-max.m4]) +m4_include([gl/m4/getcwd.m4]) +m4_include([gl/m4/getdelim.m4]) +m4_include([gl/m4/getdtablesize.m4]) +m4_include([gl/m4/getgroups.m4]) +m4_include([gl/m4/gethostname.m4]) +m4_include([gl/m4/getline.m4]) +m4_include([gl/m4/getopt.m4]) +m4_include([gl/m4/getpagesize.m4]) +m4_include([gl/m4/gettext.m4]) +m4_include([gl/m4/gettime.m4]) +m4_include([gl/m4/gettimeofday.m4]) +m4_include([gl/m4/glibc21.m4]) +m4_include([gl/m4/gnulib-common.m4]) +m4_include([gl/m4/gnulib-comp.m4]) +m4_include([gl/m4/group-member.m4]) +m4_include([gl/m4/human.m4]) +m4_include([gl/m4/i-ring.m4]) +m4_include([gl/m4/iconv.m4]) +m4_include([gl/m4/idcache.m4]) +m4_include([gl/m4/include_next.m4]) +m4_include([gl/m4/inet_pton.m4]) +m4_include([gl/m4/inline.m4]) +m4_include([gl/m4/intlmacosx.m4]) +m4_include([gl/m4/intmax_t.m4]) +m4_include([gl/m4/inttostr.m4]) +m4_include([gl/m4/inttypes-pri.m4]) +m4_include([gl/m4/inttypes.m4]) +m4_include([gl/m4/inttypes_h.m4]) +m4_include([gl/m4/ioctl.m4]) +m4_include([gl/m4/isblank.m4]) +m4_include([gl/m4/isfinite.m4]) +m4_include([gl/m4/isinf.m4]) +m4_include([gl/m4/isnand.m4]) +m4_include([gl/m4/isnanf.m4]) +m4_include([gl/m4/isnanl.m4]) +m4_include([gl/m4/iswblank.m4]) +m4_include([gl/m4/langinfo_h.m4]) +m4_include([gl/m4/largefile.m4]) +m4_include([gl/m4/lcmessage.m4]) +m4_include([gl/m4/lib-ld.m4]) +m4_include([gl/m4/lib-link.m4]) +m4_include([gl/m4/lib-prefix.m4]) +m4_include([gl/m4/libunistring-base.m4]) +m4_include([gl/m4/localcharset.m4]) +m4_include([gl/m4/locale-fr.m4]) +m4_include([gl/m4/locale-ja.m4]) +m4_include([gl/m4/locale-tr.m4]) +m4_include([gl/m4/locale-zh.m4]) +m4_include([gl/m4/locale_h.m4]) +m4_include([gl/m4/localeconv.m4]) +m4_include([gl/m4/localename.m4]) +m4_include([gl/m4/lock.m4]) +m4_include([gl/m4/longlong.m4]) +m4_include([gl/m4/ls-mntd-fs.m4]) +m4_include([gl/m4/lseek.m4]) +m4_include([gl/m4/lstat.m4]) +m4_include([gl/m4/malloc.m4]) +m4_include([gl/m4/malloca.m4]) +m4_include([gl/m4/manywarnings.m4]) +m4_include([gl/m4/math_h.m4]) +m4_include([gl/m4/mathfunc.m4]) +m4_include([gl/m4/mbchar.m4]) +m4_include([gl/m4/mbiter.m4]) +m4_include([gl/m4/mbrtowc.m4]) +m4_include([gl/m4/mbsinit.m4]) +m4_include([gl/m4/mbslen.m4]) +m4_include([gl/m4/mbsrtowcs.m4]) +m4_include([gl/m4/mbstate_t.m4]) +m4_include([gl/m4/mbtowc.m4]) +m4_include([gl/m4/memchr.m4]) +m4_include([gl/m4/mempcpy.m4]) +m4_include([gl/m4/memrchr.m4]) +m4_include([gl/m4/mktime.m4]) +m4_include([gl/m4/mmap-anon.m4]) +m4_include([gl/m4/mode_t.m4]) +m4_include([gl/m4/modechange.m4]) +m4_include([gl/m4/modf.m4]) +m4_include([gl/m4/mountlist.m4]) +m4_include([gl/m4/msvc-inval.m4]) +m4_include([gl/m4/msvc-nothrow.m4]) +m4_include([gl/m4/multiarch.m4]) +m4_include([gl/m4/nanosleep.m4]) +m4_include([gl/m4/netinet_in_h.m4]) +m4_include([gl/m4/nl_langinfo.m4]) +m4_include([gl/m4/nls.m4]) +m4_include([gl/m4/nocrash.m4]) +m4_include([gl/m4/off_t.m4]) +m4_include([gl/m4/onceonly.m4]) +m4_include([gl/m4/open.m4]) +m4_include([gl/m4/openat.m4]) +m4_include([gl/m4/opendir.m4]) +m4_include([gl/m4/parse-datetime.m4]) +m4_include([gl/m4/pathmax.m4]) +m4_include([gl/m4/perror.m4]) +m4_include([gl/m4/pipe.m4]) +m4_include([gl/m4/po.m4]) +m4_include([gl/m4/printf.m4]) +m4_include([gl/m4/priv-set.m4]) +m4_include([gl/m4/progtest.m4]) +m4_include([gl/m4/putenv.m4]) +m4_include([gl/m4/quote.m4]) +m4_include([gl/m4/quotearg.m4]) +m4_include([gl/m4/raise.m4]) +m4_include([gl/m4/read.m4]) +m4_include([gl/m4/readdir.m4]) +m4_include([gl/m4/readlink.m4]) +m4_include([gl/m4/readlinkat.m4]) +m4_include([gl/m4/realloc.m4]) +m4_include([gl/m4/regex.m4]) +m4_include([gl/m4/rewinddir.m4]) +m4_include([gl/m4/rmdir.m4]) +m4_include([gl/m4/rpmatch.m4]) +m4_include([gl/m4/safe-read.m4]) +m4_include([gl/m4/same.m4]) +m4_include([gl/m4/save-cwd.m4]) +m4_include([gl/m4/savedir.m4]) +m4_include([gl/m4/select.m4]) +m4_include([gl/m4/selinux-context-h.m4]) +m4_include([gl/m4/selinux-selinux-h.m4]) +m4_include([gl/m4/setenv.m4]) +m4_include([gl/m4/setlocale.m4]) +m4_include([gl/m4/sigaction.m4]) +m4_include([gl/m4/signal_h.m4]) +m4_include([gl/m4/signalblocking.m4]) +m4_include([gl/m4/size_max.m4]) +m4_include([gl/m4/sleep.m4]) +m4_include([gl/m4/snprintf.m4]) +m4_include([gl/m4/socketlib.m4]) +m4_include([gl/m4/sockets.m4]) +m4_include([gl/m4/socklen.m4]) +m4_include([gl/m4/sockpfaf.m4]) +m4_include([gl/m4/ssize_t.m4]) +m4_include([gl/m4/st_dm_mode.m4]) +m4_include([gl/m4/stat-size.m4]) +m4_include([gl/m4/stat-time.m4]) +m4_include([gl/m4/stat.m4]) +m4_include([gl/m4/stdalign.m4]) +m4_include([gl/m4/stdarg.m4]) +m4_include([gl/m4/stdbool.m4]) +m4_include([gl/m4/stddef_h.m4]) +m4_include([gl/m4/stdint.m4]) +m4_include([gl/m4/stdint_h.m4]) +m4_include([gl/m4/stdio_h.m4]) +m4_include([gl/m4/stdlib_h.m4]) +m4_include([gl/m4/stpcpy.m4]) +m4_include([gl/m4/strcase.m4]) +m4_include([gl/m4/strcasestr.m4]) +m4_include([gl/m4/strdup.m4]) +m4_include([gl/m4/strerror.m4]) +m4_include([gl/m4/strerror_r.m4]) +m4_include([gl/m4/strftime.m4]) +m4_include([gl/m4/string_h.m4]) +m4_include([gl/m4/strings_h.m4]) +m4_include([gl/m4/strndup.m4]) +m4_include([gl/m4/strnlen.m4]) +m4_include([gl/m4/strstr.m4]) +m4_include([gl/m4/strtol.m4]) +m4_include([gl/m4/strtoul.m4]) +m4_include([gl/m4/strtoull.m4]) +m4_include([gl/m4/strtoumax.m4]) +m4_include([gl/m4/symlink.m4]) +m4_include([gl/m4/symlinkat.m4]) +m4_include([gl/m4/sys_ioctl_h.m4]) +m4_include([gl/m4/sys_select_h.m4]) +m4_include([gl/m4/sys_socket_h.m4]) +m4_include([gl/m4/sys_stat_h.m4]) +m4_include([gl/m4/sys_time_h.m4]) +m4_include([gl/m4/sys_types_h.m4]) +m4_include([gl/m4/sys_uio_h.m4]) +m4_include([gl/m4/sys_utsname_h.m4]) +m4_include([gl/m4/sys_wait_h.m4]) +m4_include([gl/m4/thread.m4]) +m4_include([gl/m4/threadlib.m4]) +m4_include([gl/m4/time_h.m4]) +m4_include([gl/m4/time_r.m4]) +m4_include([gl/m4/timespec.m4]) +m4_include([gl/m4/tm_gmtoff.m4]) +m4_include([gl/m4/trunc.m4]) +m4_include([gl/m4/uname.m4]) +m4_include([gl/m4/ungetc.m4]) +m4_include([gl/m4/unistd-safer.m4]) +m4_include([gl/m4/unistd_h.m4]) +m4_include([gl/m4/unlink.m4]) +m4_include([gl/m4/unlinkat.m4]) +m4_include([gl/m4/unlinkdir.m4]) +m4_include([gl/m4/vasnprintf.m4]) +m4_include([gl/m4/version-etc.m4]) +m4_include([gl/m4/warn-on-use.m4]) +m4_include([gl/m4/warnings.m4]) +m4_include([gl/m4/wchar_h.m4]) +m4_include([gl/m4/wchar_t.m4]) +m4_include([gl/m4/wcrtomb.m4]) +m4_include([gl/m4/wctob.m4]) +m4_include([gl/m4/wctomb.m4]) +m4_include([gl/m4/wctype_h.m4]) +m4_include([gl/m4/wcwidth.m4]) +m4_include([gl/m4/wint_t.m4]) +m4_include([gl/m4/xalloc.m4]) +m4_include([gl/m4/xgetcwd.m4]) +m4_include([gl/m4/xsize.m4]) +m4_include([gl/m4/xstrndup.m4]) +m4_include([gl/m4/xstrtod.m4]) +m4_include([gl/m4/xstrtol.m4]) +m4_include([gl/m4/yesno.m4]) +m4_include([gl/m4/yield.m4]) diff --git a/build-aux/Makefile.in b/build-aux/Makefile.in index b5cd857..3d5e162 100644 --- a/build-aux/Makefile.in +++ b/build-aux/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -40,233 +57,198 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -275,6 +257,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ @@ -282,6 +269,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -292,6 +281,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -314,59 +304,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -374,6 +411,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -385,12 +424,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -402,10 +456,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -445,49 +515,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -514,6 +624,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -523,7 +635,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -535,8 +648,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -579,26 +694,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -615,17 +752,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -647,19 +794,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -675,6 +838,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -689,8 +858,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -712,30 +890,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -743,6 +953,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -750,18 +961,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -801,18 +1025,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -822,6 +1048,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -832,12 +1060,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -858,6 +1089,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -868,7 +1102,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -876,8 +1112,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -893,7 +1135,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -901,8 +1145,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -924,10 +1174,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -939,19 +1196,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -959,26 +1229,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -996,6 +1296,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1008,11 +1311,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1020,6 +1333,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1027,10 +1341,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1040,10 +1357,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1067,6 +1389,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1074,14 +1397,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1091,6 +1417,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1103,7 +1431,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1144,9 +1474,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1240,10 +1575,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/build-aux/arg-nonnull.h b/build-aux/arg-nonnull.h deleted file mode 100644 index 6c2f1e8..0000000 --- a/build-aux/arg-nonnull.h +++ /dev/null @@ -1,26 +0,0 @@ -/* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif diff --git a/build-aux/c++defs.h b/build-aux/c++defs.h deleted file mode 100644 index b6821a6..0000000 --- a/build-aux/c++defs.h +++ /dev/null @@ -1,271 +0,0 @@ -/* C++ compatible function declaration macros. - Copyright (C) 2010-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - rettype (*const func) parameters = ::rpl_func; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - rettype (*const func) parameters = \ - reinterpret_cast(::rpl_func); \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* If we were to write - rettype (*const func) parameters = ::func; - like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls - better (remove an indirection through a 'static' pointer variable), - but then the _GL_CXXALIASWARN macro below would cause a warning not only - for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static rettype (*func) parameters = ::func; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static rettype (*func) parameters = \ - reinterpret_cast(::func); \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static rettype (*func) parameters = \ - reinterpret_cast( \ - (rettype2(*)parameters2)(::func)); \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ diff --git a/build-aux/check-testfiles.sh b/build-aux/check-testfiles.sh index 2294700..fecae40 100755 --- a/build-aux/check-testfiles.sh +++ b/build-aux/check-testfiles.sh @@ -1,6 +1,6 @@ #! /bin/sh # check-testfiles.sh -- Check we distributed all the test files we need -# Copyright (C) 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/build-aux/compile b/build-aux/compile index 1b1d232..c0096a7 100755 --- a/build-aux/compile +++ b/build-aux/compile @@ -1,9 +1,10 @@ #! /bin/sh # Wrapper for compilers which do not understand `-c -o'. -scriptversion=2005-05-14.22 +scriptversion=2009-10-06.20; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software +# Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -17,8 +18,7 @@ scriptversion=2005-05-14.22 # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -103,13 +103,13 @@ if test -z "$ofile" || test -z "$cfile"; then fi # Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. -# Note: use `[/.-]' here to ensure that we don't use the same name +# Note: use `[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break @@ -124,9 +124,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15 ret=$? if test -f "$cofile"; then - mv "$cofile" "$ofile" + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then - mv "${cofile}bj" "$ofile" + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" @@ -138,5 +138,6 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/build-aux/config.guess b/build-aux/config.guess index 7866080..1f5c50c 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,10 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2011-02-02' +timestamp='2014-03-23' # 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 @@ -17,26 +15,22 @@ timestamp='2011-02-02' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -140,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -202,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -304,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -792,21 +809,26 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -852,15 +874,22 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -872,50 +901,54 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -934,54 +967,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1185,6 +1227,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1211,19 +1256,31 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1240,7 +1297,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1309,158 +1366,10 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi +esac cat >&2 <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -75,9 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -125,13 +116,17 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -154,7 +149,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -223,6 +218,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -247,20 +248,28 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -274,23 +283,26 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -299,7 +311,7 @@ case $basic_machine in | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -314,8 +326,7 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -328,7 +339,10 @@ case $basic_machine in strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -351,25 +365,31 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -383,22 +403,27 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -406,10 +431,11 @@ case $basic_machine in | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -709,7 +735,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -767,11 +792,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -806,10 +835,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i686-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -990,7 +1027,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1118,13 +1159,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1322,21 +1358,21 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1344,7 +1380,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1468,9 +1504,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1519,6 +1552,12 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1546,9 +1585,6 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout diff --git a/build-aux/depcomp b/build-aux/depcomp index 5137dac..adaf430 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2010-10-07.20; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010 -# 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 @@ -28,9 +27,9 @@ scriptversion=2010-10-07.20; # UTC case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -40,11 +39,11 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -57,6 +56,66 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -80,26 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -122,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -131,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -145,31 +216,31 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -180,59 +251,21 @@ hp) exit 1 ;; -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -245,9 +278,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -256,44 +287,100 @@ aix) do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -305,8 +392,8 @@ icc) sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -317,9 +404,8 @@ hp2) # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -330,8 +416,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -341,77 +426,61 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -422,8 +491,7 @@ msvc7) "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -441,14 +509,15 @@ msvc7) p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g -s/\(.*\)/ \1 \\/p +s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { - s/.*/ / + s/.*/'"$tab"'/ G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -476,7 +545,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -496,18 +565,18 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -557,12 +626,15 @@ makedepend) touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -579,7 +651,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -598,10 +670,10 @@ cpp) esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -633,23 +705,23 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/build-aux/install-sh b/build-aux/install-sh index a9244eb..0b0fdcb 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,25 +35,21 @@ scriptversion=2011-01-19.21; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dir_arg= dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ while test $# -ne 0; do -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -190,7 +186,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -202,12 +198,21 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ if test -z "$dir_arg"; then *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -240,7 +245,7 @@ fi for src do - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac @@ -269,41 +274,15 @@ do # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,74 @@ do if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +370,51 @@ do # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +449,12 @@ do # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +467,24 @@ do # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh index 22f2f8b..4ecfe2d 100755 --- a/build-aux/mdate-sh +++ b/build-aux/mdate-sh @@ -1,10 +1,10 @@ #!/bin/sh # Get modification time of a file or directory and pretty-print it. -scriptversion=2007-03-30.02 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software -# Foundation, Inc. +# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009 Free +# Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify @@ -18,8 +18,7 @@ scriptversion=2007-03-30.02 # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -201,5 +200,6 @@ echo $day $month $year # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/build-aux/mkinstalldirs b/build-aux/mkinstalldirs index 4191a45..55d537f 100755 --- a/build-aux/mkinstalldirs +++ b/build-aux/mkinstalldirs @@ -81,9 +81,9 @@ case $dirmode in echo "mkdir -p -- $*" exec mkdir -p -- "$@" else - # On NextStep and OpenStep, the `mkdir' command does not + # On NextStep and OpenStep, the 'mkdir' command does not # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already + # directories to create, and then abort because '.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version diff --git a/build-aux/snippet/_Noreturn.h b/build-aux/snippet/_Noreturn.h new file mode 100644 index 0000000..c44ad89 --- /dev/null +++ b/build-aux/snippet/_Noreturn.h @@ -0,0 +1,10 @@ +#if !defined _Noreturn && __STDC_VERSION__ < 201112 +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif diff --git a/build-aux/snippet/arg-nonnull.h b/build-aux/snippet/arg-nonnull.h new file mode 100644 index 0000000..9ee8b15 --- /dev/null +++ b/build-aux/snippet/arg-nonnull.h @@ -0,0 +1,26 @@ +/* A C macro for declaring that specific arguments must not be NULL. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif diff --git a/build-aux/snippet/c++defs.h b/build-aux/snippet/c++defs.h new file mode 100644 index 0000000..67b1233 --- /dev/null +++ b/build-aux/snippet/c++defs.h @@ -0,0 +1,271 @@ +/* C++ compatible function declaration macros. + Copyright (C) 2010-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + rettype (*const func) parameters = ::rpl_func; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + rettype (*const func) parameters = \ + reinterpret_cast(::rpl_func); \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* If we were to write + rettype (*const func) parameters = ::func; + like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls + better (remove an indirection through a 'static' pointer variable), + but then the _GL_CXXALIASWARN macro below would cause a warning not only + for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static rettype (*func) parameters = ::func; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static rettype (*func) parameters = \ + reinterpret_cast(::func); \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static rettype (*func) parameters = \ + reinterpret_cast( \ + (rettype2(*)parameters2)(::func)); \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !__OPTIMIZE__ +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !__OPTIMIZE__ +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ diff --git a/build-aux/snippet/unused-parameter.h b/build-aux/snippet/unused-parameter.h new file mode 100644 index 0000000..41d9510 --- /dev/null +++ b/build-aux/snippet/unused-parameter.h @@ -0,0 +1,36 @@ +/* A C macro for declaring that specific function parameters are not used. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter + declarations for parameters that are not used. This helps to reduce + warnings, such as from GCC -Wunused-parameter. The syntax is as follows: + type param _GL_UNUSED_PARAMETER + or more generally + param_decl _GL_UNUSED_PARAMETER + For example: + int param _GL_UNUSED_PARAMETER + int *(*param)(void) _GL_UNUSED_PARAMETER + Other possible, but obscure and discouraged syntaxes: + int _GL_UNUSED_PARAMETER *(*param)(void) + _GL_UNUSED_PARAMETER int *(*param)(void) + */ +#ifndef _GL_UNUSED_PARAMETER +# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) +# else +# define _GL_UNUSED_PARAMETER +# endif +#endif diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h new file mode 100644 index 0000000..1c4d7bd --- /dev/null +++ b/build-aux/snippet/warn-on-use.h @@ -0,0 +1,109 @@ +/* A C macro for emitting warnings if a function is used. + Copyright (C) 2010-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* _GL_WARN_ON_USE (function, "literal string") issues a declaration + for FUNCTION which will then trigger a compiler warning containing + the text of "literal string" anywhere that function is called, if + supported by the compiler. If the compiler does not support this + feature, the macro expands to an unused extern declaration. + + This macro is useful for marking a function as a potential + portability trap, with the intent that "literal string" include + instructions on the replacement function that should be used + instead. However, one of the reasons that a function is a + portability trap is if it has the wrong signature. Declaring + FUNCTION with a different signature in C is a compilation error, so + this macro must use the same type as any existing declaration so + that programs that avoid the problematic FUNCTION do not fail to + compile merely because they included a header that poisoned the + function. But this implies that _GL_WARN_ON_USE is only safe to + use if FUNCTION is known to already have a declaration. Use of + this macro implies that there must not be any other macro hiding + the declaration of FUNCTION; but undefining FUNCTION first is part + of the poisoning process anyway (although for symbols that are + provided only via a macro, the result is a compilation error rather + than a warning containing "literal string"). Also note that in + C++, it is only safe to use if FUNCTION has no overloads. + + For an example, it is possible to poison 'getline' by: + - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], + [getline]) in configure.ac, which potentially defines + HAVE_RAW_DECL_GETLINE + - adding this code to a header that wraps the system : + #undef getline + #if HAVE_RAW_DECL_GETLINE + _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" + "not universally present; use the gnulib module getline"); + #endif + + It is not possible to directly poison global variables. But it is + possible to write a wrapper accessor function, and poison that + (less common usage, like &environ, will cause a compilation error + 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 char ***rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif + */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") + is like _GL_WARN_ON_USE (function, "string"), except that the function is + declared with the given prototype, consisting of return type, parameters, + and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex index d2b264d..9140826 100644 --- a/build-aux/texinfo.tex +++ b/build-aux/texinfo.tex @@ -1,13 +1,13 @@ % texinfo.tex -- TeX macros to handle Texinfo files. -% +% % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2007-12-02.17} +\def\texinfoversion{2009-08-14.15} % -% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 2007, +% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007 Free Software Foundation, Inc. +% 2007, 2008, 2009 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -97,6 +97,10 @@ \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t +\let\ptextop=\top +{\catcode`\'=\active +\global\let\ptexquoteright'}% Math-mode def from plain.tex. +\let\ptexraggedright=\raggedright % If this character appears in an error message or help string, it % starts a new line in the output. @@ -354,7 +358,7 @@ % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; - % it needs to be + % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. @@ -460,7 +464,7 @@ \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} -% Each occurence of `\^^M' or `\^^M' is replaced by a single space. +% Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo @@ -485,7 +489,7 @@ % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. -% (Similarily, we have to think about #3 of \argcheckspacesY above: it is +% (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % @@ -542,12 +546,12 @@ % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they -% are not treated as enviroments; they don't open a group. (The +% are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) -% At runtime, environments start with this: +% At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty @@ -565,7 +569,7 @@ \fi } -% Evironment mismatch, #1 expected: +% Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, @@ -649,8 +653,8 @@ \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% - \ifx\temp\imacro \ptexi - \else\ifx\temp\jmacro \j + \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi + \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } @@ -705,7 +709,7 @@ \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. -% +% \def\onword{on} \def\offword{off} % @@ -916,15 +920,20 @@ where each line of input produces a line of output.} \temp } -% @include file insert text of that file as input. +% @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% - \makevalueexpandable - \def\temp{\input #1 }% + \makevalueexpandable % we want to expand any @value in FILE. + \turnoffactive % and allow special characters in the expansion + \indexnofonts % Allow `@@' and other weird things in file names. + \edef\temp{\noexpand\input #1 }% + % + % This trickery is to read FILE outside of a group, in case it makes + % definitions, etc. \expandafter }\temp \popthisfilestack @@ -939,6 +948,8 @@ where each line of input produces a line of output.} \catcode`>=\other \catcode`+=\other \catcode`-=\other + \catcode`\`=\other + \catcode`\'=\other } \def\pushthisfilestack{% @@ -1114,6 +1125,16 @@ where each line of input produces a line of output.} \mathunderscore \let\\ = \mathbackslash \mathactive + % make the texinfo accent commands work in math mode + \let\"=\ddot + \let\'=\acute + \let\==\bar + \let\^=\hat + \let\`=\grave + \let\u=\breve + \let\v=\check + \let\~=\tilde + \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. @@ -1127,17 +1148,21 @@ where each line of input produces a line of output.} \catcode`< = \active \catcode`> = \active \catcode`+ = \active + \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus + \let' = \ptexquoteright } } -% @bullet and @minus need the same treatment as @math, just above. +% Some math mode symbols. \def\bullet{$\ptexbullet$} -\def\minus{$-$} +\def\geq{\ifmmode \ge\else $\ge$\fi} +\def\leq{\ifmmode \le\else $\le$\fi} +\def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm @@ -1260,7 +1285,7 @@ where each line of input produces a line of output.} % that's what we do). % double active backslashes. -% +% {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslashdouble{% @catcode`@\=@active @@ -1272,11 +1297,11 @@ where each line of input produces a line of output.} % us) handles it with this amazing macro to replace tokens, with minor % changes for Texinfo. It is included here under the GPL by permission % from the author, Heiko Oberdiek. -% +% % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. -% +% \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% @@ -1307,11 +1332,17 @@ output) for that.)} \ifpdf % - % Color manipulation macros based on pdfcolor.tex. - \def\cmykDarkRed{0.28 1 1 0.35} - \def\cmykBlack{0 0 0 1} + % Color manipulation macros based on pdfcolor.tex, + % except using rgb instead of cmyk; the latter is said to render as a + % very dark gray on-screen and a very dark halftone in print, instead + % of actual black. + \def\rgbDarkRed{0.50 0.09 0.12} + \def\rgbBlack{0 0 0} + % + % k sets the color for filling (usual text, etc.); + % K sets the color for stroking (thin rules, e.g., normal _'s). + \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % - \def\pdfsetcolor#1{\pdfliteral{#1 k}} % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% @@ -1320,7 +1351,7 @@ output) for that.)} \pdfsetcolor{#1}% } % - \def\maincolor{\cmykBlack} + \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} @@ -1362,8 +1393,11 @@ output) for that.)} \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \openin 1 #1.pdf \ifeof 1 - \errhelp = \nopdfimagehelp - \errmessage{Could not find image file #1 for pdf}% + \openin 1 #1.PDF \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{PDF}% + \fi \else \gdef\pdfimgext{pdf}% \fi \else \gdef\pdfimgext{JPG}% @@ -1377,7 +1411,7 @@ output) for that.)} \closein 1 \endgroup % - % without \immediate, pdftex seg faults when the same image is + % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage @@ -1412,8 +1446,8 @@ output) for that.)} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. - \def\urlcolor{\cmykDarkRed} - \def\linkcolor{\cmykDarkRed} + \def\urlcolor{\rgbDarkRed} + \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines @@ -1542,11 +1576,15 @@ output) for that.)} % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. - % + % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable + % do we want to go so far as to use \indexnofonts instead of just + % special-casing \var here? + \def\var##1{##1}% + % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% @@ -1577,6 +1615,7 @@ output) for that.)} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else + % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax @@ -1607,6 +1646,10 @@ output) for that.)} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} +% Unfortunately, we have to override this for titles and the like, since +% in those cases "rm" is bold. Sigh. +\def\rmisbold{\rm\def\curfontstyle{bf}} + % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam @@ -1941,7 +1984,7 @@ end % Definitions for a main text size of 11pt. This is the default in % Texinfo. -% +% \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} @@ -2004,8 +2047,6 @@ end \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 -\def\authorrm{\secrm} -\def\authortt{\sectt} \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). @@ -2074,7 +2115,7 @@ end % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. -% +% \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} @@ -2137,8 +2178,6 @@ end \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 -\def\authorrm{\secrm} -\def\authortt{\sectt} \def\titleecsize{2074} % Chapter fonts (14.4pt). @@ -2165,7 +2204,7 @@ end \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} -\font\seci=cmmi12 +\font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} @@ -2209,7 +2248,7 @@ end % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. -% +% \def\xword{10} \def\xiword{11} % @@ -2219,7 +2258,7 @@ end % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. - % + % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi @@ -2270,7 +2309,7 @@ end \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} -\def\titlefont#1{{\titlefonts\rm #1}} +\def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc @@ -2321,6 +2360,16 @@ end \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} +% Fonts for short table of contents. +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +% Define these just so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts @@ -2334,28 +2383,128 @@ end % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 -% -% I wish the USA used A4 paper. % --karl, 24jan03. - % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi -% Define these so they can be easily changed for other fonts. -\def\angleleft{$\langle$} -\def\angleright{$\rangle$} + +\message{markup,} + +% Check if we are currently using a typewriter font. Since all the +% Computer Modern typewriter fonts have zero interword stretch (and +% shrink), and it is reasonable to expect all typewriter fonts to have +% this property, we can check that font parameter. +% +\def\ifmonospace{\ifdim\fontdimen3\font=0pt } + +% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will +% define and register \INITMACRO to be called on markup style changes. +% \INITMACRO can check \currentmarkupstyle for the innermost +% style and the set of \ifmarkupSTYLE switches for all styles +% currently in effect. +\newif\ifmarkupvar +\newif\ifmarkupsamp +\newif\ifmarkupkey +%\newif\ifmarkupfile % @file == @samp. +%\newif\ifmarkupoption % @option == @samp. +\newif\ifmarkupcode +\newif\ifmarkupkbd +%\newif\ifmarkupenv % @env == @code. +%\newif\ifmarkupcommand % @command == @code. +\newif\ifmarkuptex % @tex (and part of @math, for now). +\newif\ifmarkupexample +\newif\ifmarkupverb +\newif\ifmarkupverbatim + +\let\currentmarkupstyle\empty + +\def\setupmarkupstyle#1{% + \csname markup#1true\endcsname + \def\currentmarkupstyle{#1}% + \markupstylesetup +} + +\let\markupstylesetup\empty + +\def\defmarkupstylesetup#1{% + \expandafter\def\expandafter\markupstylesetup + \expandafter{\markupstylesetup #1}% + \def#1% +} + +% Markup style setup for left and right quotes. +\defmarkupstylesetup\markupsetuplq{% + \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuplqdefault \else \temp \fi +} + +\defmarkupstylesetup\markupsetuprq{% + \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuprqdefault \else \temp \fi +} + +{ +\catcode`\'=\active +\catcode`\`=\active + +\gdef\markupsetuplqdefault{\let`\lq} +\gdef\markupsetuprqdefault{\let'\rq} + +\gdef\markupsetcodequoteleft{\let`\codequoteleft} +\gdef\markupsetcodequoteright{\let'\codequoteright} + +\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} +} + +\let\markupsetuplqcode \markupsetcodequoteleft +\let\markupsetuprqcode \markupsetcodequoteright +\let\markupsetuplqexample \markupsetcodequoteleft +\let\markupsetuprqexample \markupsetcodequoteright +\let\markupsetuplqverb \markupsetcodequoteleft +\let\markupsetuprqverb \markupsetcodequoteright +\let\markupsetuplqverbatim \markupsetcodequoteleft +\let\markupsetuprqverbatim \markupsetcodequoteright + +\let\markupsetuplqsamp \markupsetnoligaturesquoteleft +\let\markupsetuplqkbd \markupsetnoligaturesquoteleft + +% Allow an option to not replace quotes with a regular directed right +% quote/apostrophe (char 0x27), but instead use the undirected quote +% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it +% the default, but it works for pasting with more pdf viewers (at least +% evince), the lilypond developers report. xpdf does work with the +% regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + % [Knuth] pp. 380,381,391 + % \relax disables Spanish ligatures ?` and !` of \tt font. + \relax`% + \else \char'22 \fi + \else \char'22 \fi +} + +% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. +\def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 -% Fonts for short table of contents. -\setfont\shortcontrm\rmshape{12}{1000}{OT1} -\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 -\setfont\shortcontsl\slshape{12}{1000}{OT1} -\setfont\shortconttt\ttshape{12}{1000}{OT1TT} - %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic @@ -2370,17 +2519,22 @@ end % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} -% like \smartslanted except unconditionally use \sl. We never want +% @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\slanted=\smartslanted -\let\var=\smartslanted +\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic -% @b, explicit bold. +% Explicit font changes: @r, @sc, undocumented @ii. +\def\r#1{{\rm #1}} % roman font +\def\sc#1{{\smallcaps#1}} % smallcaps font +\def\ii#1{{\it #1}} % italic font + +% @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b @@ -2412,22 +2566,35 @@ end \catcode`@=\other \def\endofsentencespacefactor{3000}% default +% @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } -\def\samp#1{`\tclose{#1}'\null} -\setfont\keyrm\rmshape{8}{1000}{OT1} -\font\keysy=cmsy9 -\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% - \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% - \vbox{\hrule\kern-0.4pt - \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% - \kern-0.4pt\hrule}% - \kern-.06em\raise0.4pt\hbox{\angleright}}}} -\def\key #1{{\nohyphenation \uppercase{#1}}\null} -% The old definition, with no lozenge: -%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} + +% @samp. +\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} + +% definition of @key that produces a lozenge. Doesn't adjust to text size. +%\setfont\keyrm\rmshape{8}{1000}{OT1} +%\font\keysy=cmsy9 +%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% +% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% +% \vbox{\hrule\kern-0.4pt +% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% +% \kern-0.4pt\hrule}% +% \kern-.06em\raise0.4pt\hbox{\angleright}}}} + +% definition of @key with no lozenge. If the current font is already +% monospace, don't change it; that way, we respect @kbdinputstyle. But +% if it isn't monospace, then use \tt. +% +\def\key#1{{\setupmarkupstyle{key}% + \nohyphenation + \ifmonospace\else\tt\fi + #1}\null} + +% ctrl is no longer a Texinfo command. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. @@ -2469,11 +2636,11 @@ end { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active + \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup - \catcode\rquoteChar=\active \catcode\lquoteChar=\active - \let'\codequoteright \let`\codequoteleft - % + \setupmarkupstyle{code}% + % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash @@ -2505,7 +2672,7 @@ end % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. -% +% \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} @@ -2525,6 +2692,7 @@ end % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. +\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), @@ -2546,20 +2714,27 @@ end \def\wordexample{example} \def\wordcode{code} -% Default is `distinct.' +% Default is `distinct'. \kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% -\else{\tclose{\kbdfont\look}}\fi -\else{\tclose{\kbdfont\look}}\fi} +\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi +\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code +% @clicksequence{File @click{} Open ...} +\def\clicksequence#1{\begingroup #1\endgroup} + +% @clickstyle @arrow (by default) +\parseargdef\clickstyle{\def\click{#1}} +\def\click{\arrow} + % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url @@ -2609,34 +2784,20 @@ end \let\email=\uref \fi -% Check if we are currently using a typewriter font. Since all the -% Computer Modern typewriter fonts have zero interword stretch (and -% shrink), and it is reasonable to expect all typewriter fonts to have -% this property, we can check that font parameter. -% -\def\ifmonospace{\ifdim\fontdimen3\font=0pt } - % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} -\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} - % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} -% Explicit font changes: @r, @sc, undocumented @ii. -\def\r#1{{\rm #1}} % roman font -\def\sc#1{{\smallcaps#1}} % smallcaps font -\def\ii#1{{\it #1}} % italic font - % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. -% +% \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% @@ -2648,7 +2809,7 @@ end % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. -% +% \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% @@ -2658,6 +2819,44 @@ end \fi } + +\message{glyphs,} + +% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. +% +% Since these characters are used in examples, they should be an even number of +% \tt widths. Each \tt character is 1en, so two makes it 1em. +% +\def\point{$\star$} +\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} +\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} +\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} + +% The @error{} command. +% Adapted from the TeXbook's \boxit. +% +\newbox\errorbox +% +{\tentt \global\dimen0 = 3em}% Width of the box. +\dimen2 = .55pt % Thickness of rules +% The text. (`r' is open on the right, `e' somewhat less so on the left.) +\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} +% +\setbox\errorbox=\hbox to \dimen0{\hfil + \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. + \advance\hsize by -2\dimen2 % Rules. + \vbox{% + \hrule height\dimen2 + \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. + \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. + \kern3pt\vrule width\dimen2}% Space to right. + \hrule height\dimen2} + \hfil} +% +\def\error{\leavevmode\lower.7ex\copy\errorbox} + % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} @@ -2667,52 +2866,59 @@ end % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. -% +% % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. -% +% % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted -% +% % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. -% +% % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. -% -% +% +% \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. - % + % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. - % + % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. - % + % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % - \ifx\curfontstyle\bfstylename + \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize - \else + \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } -% Hacks for glyphs from the EC fonts similar to \euro. We don't -% use \let for the aliases, because sometimes we redefine the original -% macro, and the alias should reflect the redefinition. +% Glyphs from the EC fonts. We don't use \let for the aliases, because +% sometimes we redefine the original macro, and the alias should reflect +% the redefinition. +% +% Use LaTeX names for the Icelandic letters. +\def\DH{{\ecfont \char"D0}} % Eth +\def\dh{{\ecfont \char"F0}} % eth +\def\TH{{\ecfont \char"DE}} % Thorn +\def\th{{\ecfont \char"FE}} % thorn +% \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} @@ -2722,8 +2928,36 @@ end \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % +% This positioning is not perfect (see the ogonek LaTeX package), but +% we have the precomposed glyphs for the most common cases. We put the +% tests to use those glyphs in the single \ogonek macro so we have fewer +% dummy definitions to worry about for index entries, etc. +% +% ogonek is also used with other letters in Lithuanian (IOU), but using +% the precomposed glyphs for those is not so easy since they aren't in +% the same EC font. +\def\ogonek#1{{% + \def\temp{#1}% + \ifx\temp\macrocharA\Aogonek + \else\ifx\temp\macrochara\aogonek + \else\ifx\temp\macrocharE\Eogonek + \else\ifx\temp\macrochare\eogonek + \else + \ecfont \setbox0=\hbox{#1}% + \ifdim\ht0=1ex\accent"0C #1% + \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% + \fi + \fi\fi\fi\fi + }% +} +\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} +\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} +\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} +\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} +% +% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% - % We can't distinguish serif/sanserif and italic/slanted, but this + % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. @@ -2756,7 +2990,7 @@ end % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. -% +% \ifx\Orb\undefined \def\Orb{\mathhexbox20D} \fi @@ -2851,12 +3085,9 @@ end \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} -\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines - \let\tt=\authortt} - \parseargdef\title{% \checkenv\titlepage - \leftline{\titlefonts\rm #1} + \leftline{\titlefonts\rmisbold #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt @@ -2877,7 +3108,7 @@ end \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi - {\authorfont \leftline{#1}}% + {\secfonts\rmisbold \leftline{#1}}% \fi } @@ -3105,7 +3336,7 @@ end % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. - % + % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse @@ -3199,9 +3430,18 @@ end \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi + % + % Try typesetting the item mark that if the document erroneously says + % something like @itemize @samp (intending @table), there's an error + % right away at the @itemize. It's not the best error message in the + % world, but it's better than leaving it to the @item. This means if + % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% + \setbox0 = \hbox{\itemcontents}% + % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi + % \let\item=\itemizeitem } @@ -3222,6 +3462,7 @@ end \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% + % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } @@ -3443,12 +3684,19 @@ end % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group -% of an alignment entry. Note that \everycr resets \everytab. -\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% +% of an alignment entry. \everycr resets \everytab so we don't have to +% undo it ourselves. +\def\headitemfont{\b}% for people to use in the template row; not changeable +\def\headitem{% + \checkenv\multitable + \crcr + \global\everytab={\bf}% can't use \headitemfont since the parsing differs + \the\everytab % for the first item +}% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until -% we encounter the problem it was intended to solve again. +% we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% @@ -3847,11 +4095,11 @@ end \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. - \expandafter \ifx\csname donesynindex#2\endcsname \undefined + \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname - \expandafter\let\csname\donesynindex#2\endcsname = 1 + \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname @@ -3901,7 +4149,7 @@ end % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. - % + % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} @@ -3909,12 +4157,12 @@ end % @end macro % ... % @funindex commtest - % + % % The above is not enough to reproduce the bug, but it gives the flavor. - % + % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} - % + % % So: \let\endinput = \empty % @@ -3966,19 +4214,23 @@ end % Non-English letters. \definedummyword\AA \definedummyword\AE + \definedummyword\DH \definedummyword\L - \definedummyword\OE \definedummyword\O + \definedummyword\OE + \definedummyword\TH \definedummyword\aa \definedummyword\ae + \definedummyword\dh + \definedummyword\exclamdown \definedummyword\l - \definedummyword\oe \definedummyword\o - \definedummyword\ss - \definedummyword\exclamdown - \definedummyword\questiondown + \definedummyword\oe \definedummyword\ordf \definedummyword\ordm + \definedummyword\questiondown + \definedummyword\ss + \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf @@ -4009,6 +4261,7 @@ end \definedummyword\guilsinglright \definedummyword\expansion \definedummyword\minus + \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print @@ -4052,6 +4305,7 @@ end \definedummyword\v \definedummyword\H \definedummyword\dotaccent + \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent @@ -4071,6 +4325,7 @@ end \definedummyword\code \definedummyword\command \definedummyword\dfn + \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file @@ -4119,19 +4374,23 @@ end % Non-English letters. \def\AA{AA}% \def\AE{AE}% + \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% + \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% + \def\dh{dzz}% + \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% - \def\o{o}% - \def\ss{ss}% - \def\exclamdown{!}% - \def\questiondown{?}% \def\ordf{a}% \def\ordm{o}% + \def\o{o}% + \def\questiondown{?}% + \def\ss{ss}% + \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% @@ -4141,20 +4400,19 @@ end \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% - \def\registeredsymbol{R}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% + \def\expansion{==>}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% - \def\expansion{==>}% \def\minus{-}% - \def\pounds{pounds}% \def\point{.}% + \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% @@ -4162,19 +4420,20 @@ end \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% + \def\registeredsymbol{R}% \def\result{=>}% - \def\textdegree{degrees}% + \def\textdegree{o}% % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. - % + % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. - % + % \macrolist } @@ -4302,7 +4561,7 @@ end % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: - % + % % @deffn deffn-whatever % @vindex index-whatever % Description. @@ -4432,7 +4691,7 @@ end % % A straightforward implementation would start like this: % \def\entry#1#2{... -% But this frozes the catcodes in the argument, and can cause problems to +% But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % @@ -4883,7 +5142,9 @@ end \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % - \message{\putwordChapter\space \the\chapno}% + % \putwordChapter can contain complex things in translations. + \toks0=\expandafter{\putwordChapter}% + \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% @@ -4894,15 +5155,17 @@ end \global\let\subsubsection = \numberedsubsubsec } -\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz +\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz +% \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % - \def\appendixnum{\putwordAppendix\space \appendixletter}% - \message{\appendixnum}% + % \putwordAppendix can contain complex things in translations. + \toks0=\expandafter{\putwordAppendix}% + \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % @@ -5034,7 +5297,6 @@ end % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. - \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz @@ -5043,8 +5305,8 @@ end \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}% + \parindent=0pt\ptexraggedright + \rmisbold #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } @@ -5136,7 +5398,10 @@ end \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% - \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum: + % \noexpand\putwordAppendix avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} + \noexpand\thischapternum: \noexpand\thischaptername}% }% \else @@ -5144,7 +5409,10 @@ end \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% - \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum: + % \noexpand\putwordChapter avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordChapter{} + \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi @@ -5163,7 +5431,7 @@ end \domark % {% - \chapfonts \rm + \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called @@ -5200,7 +5468,7 @@ end % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% @@ -5224,8 +5492,8 @@ end % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\nobreak + \parindent=0pt\ptexraggedright + \rmisbold #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% @@ -5234,7 +5502,7 @@ end \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt - \hfill {\rm #1}\hfill}}\bigskip \par\nobreak + \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen @@ -5267,7 +5535,7 @@ end \def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. - \csname #2fonts\endcsname \rm + \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% @@ -5287,7 +5555,10 @@ end \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% - \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi @@ -5297,12 +5568,20 @@ end \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% - \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % + % Go into vertical mode. Usually we'll already be there, but we + % don't want the following whatsit to end up in a preceding paragraph + % if the document didn't happen to have a blank line. + \par + % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark @@ -5352,7 +5631,7 @@ end \nobreak % % Output the actual section heading. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% @@ -5368,11 +5647,11 @@ end % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip - % + % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: - % + % % @section sec-whatever % @deffn def-whatever \penalty 10001 @@ -5430,7 +5709,7 @@ end % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. -% +% \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active @@ -5480,7 +5759,7 @@ end % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. -% +% \def\tocreadfilename{\jobname.toc} % Normal (long) toc. @@ -5650,45 +5929,12 @@ end \message{environments,} % @foo ... @end foo. -% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. -% -% Since these characters are used in examples, it should be an even number of -% \tt widths. Each \tt character is 1en, so two makes it 1em. -% -\def\point{$\star$} -\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} -\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} -\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} -\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} - -% The @error{} command. -% Adapted from the TeXbook's \boxit. -% -\newbox\errorbox -% -{\tentt \global\dimen0 = 3em}% Width of the box. -\dimen2 = .55pt % Thickness of rules -% The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} -% -\setbox\errorbox=\hbox to \dimen0{\hfil - \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. - \advance\hsize by -2\dimen2 % Rules. - \vbox{% - \hrule height\dimen2 - \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. - \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. - \kern3pt\vrule width\dimen2}% Space to right. - \hrule height\dimen2} - \hfil} -% -\def\error{\leavevmode\lower.7ex\copy\errorbox} - % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \envdef\tex{% + \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie @@ -5698,6 +5944,8 @@ end \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other + \catcode`\`=\other + \catcode`\'=\other \escapechar=`\\ % \let\b=\ptexb @@ -5717,6 +5965,7 @@ end \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext + \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% @@ -5832,6 +6081,7 @@ end % This macro is called at the beginning of all the @example variants, % inside a group. +\newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy @@ -5839,7 +6089,12 @@ end \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt + % Turn off paragraph indentation but redefine \indent to emulate + % the normal \indent. + \nonfillparindent=\parindent \parindent = 0pt + \let\indent\nonfillindent + % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing @@ -5850,6 +6105,24 @@ end \let\exdent=\nofillexdent } +\begingroup +\obeyspaces +% We want to swallow spaces (but not other tokens) after the fake +% @indent in our nonfill-environments, where spaces are normally +% active and set to @tie, resulting in them not being ignored after +% @indent. +\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% +\gdef\nonfillindentcheck{% +\ifx\temp % +\expandafter\nonfillindentgobble% +\else% +\leavevmode\nonfillindentbox% +\fi% +}% +\endgroup +\def\nonfillindentgobble#1{\nonfillindent} +\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} + % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: @@ -5898,7 +6171,7 @@ end % \maketwodispenvs {lisp}{example}{% \nonfillstart - \tt\quoteexpand + \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } @@ -5936,12 +6209,36 @@ end \let\Eflushright = \afterenvbreak +% @raggedright does more-or-less normal line breaking but no right +% justification. From plain.tex. +\envdef\raggedright{% + \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax +} +\let\Eraggedright\par + +\envdef\raggedleft{% + \parindent=0pt \leftskip0pt plus2em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedleft\par + +\envdef\raggedcenter{% + \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedcenter\par + + % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % -\envdef\quotation{% +\def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % @@ -5956,6 +6253,17 @@ end \parsearg\quotationlabel } +\envdef\quotation{% + \setnormaldispenv + \quotationstart +} + +\envdef\smallquotation{% + \setsmalldispenv + \quotationstart +} +\let\Esmallquotation = \Equotation + % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % @@ -5991,18 +6299,16 @@ end \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% + % Don't do the quotes -- if we do, @set txicodequoteundirected and + % @set txicodequotebacktick will not have effect on @verb and + % @verbatim, and ?` and !` ligatures won't get disabled. + %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % -% [Knuth] pp. 380,381,391 -% Disable Spanish ligatures ?` and !` of \tt font -\begingroup - \catcode`\`=\active\gdef`{\relax\lq} -\endgroup -% % Setup for the @verb command. % % Eight spaces for a tab @@ -6014,7 +6320,7 @@ end \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% - \catcode`\`=\active + \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and @@ -6029,33 +6335,6 @@ end \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} - -% Allow an option to not replace quotes with a regular directed right -% quote/apostrophe (char 0x27), but instead use the undirected quote -% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it -% the default, but it works for pasting with more pdf viewers (at least -% evince), the lilypond developers report. xpdf does work with the -% regular 0x27. -% -\def\codequoteright{% - \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax - \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax - '% - \else \char'15 \fi - \else \char'15 \fi -} -% -% and a similar option for the left quote char vs. a grave accent. -% Modern fonts display ASCII 0x60 as a grave accent, so some people like -% the code environments to do likewise. -% -\def\codequoteleft{% - \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax - \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax - `% - \else \char'22 \fi - \else \char'22 \fi -} % \begingroup \catcode`\^^I=\active @@ -6069,13 +6348,6 @@ end \wd0=\dimen0 \box0 \starttabbox }% } - \catcode`\'=\active - \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}% - % - \catcode`\`=\active - \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}% - % - \gdef\quoteexpand{\rquoteexpand \lquoteexpand}% \endgroup % start the verbatim environment. @@ -6085,9 +6357,8 @@ end % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% - \catcode`\`=\active \tabexpand - \quoteexpand + \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count @@ -6147,6 +6418,7 @@ end {% \makevalueexpandable \setupverbatim + \indexnofonts % Allow `@@' and other weird things in file names. \input #1 \afterenvbreak }% @@ -6246,7 +6518,7 @@ end \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; -% the only thing remainnig is to define \deffnheader. +% the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun @@ -6425,7 +6697,7 @@ end % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. - \let\var=\ttslanted + \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } @@ -6579,7 +6851,7 @@ end % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). -% +% \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname @@ -6953,20 +7225,22 @@ end % % Make link in pdf output. \ifpdf - \leavevmode - \getfilename{#4}% {\indexnofonts \turnoffactive + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. + \getfilename{#4}% + % % See comments at \activebackslashdouble. {\activebackslashdouble \xdef\pdfxrefdest{#1}% \backslashparens\pdfxrefdest}% % + \leavevmode + \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 - \startlink attr{/Border [0 0 0]}% - goto file{\the\filename.pdf} name{\pdfxrefdest}% + goto file{\the\filename.pdf} name{\pdfxrefdest}% \else - \startlink attr{/Border [0 0 0]}% - goto name{\pdfmkpgn{\pdfxrefdest}}% + goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% @@ -7317,7 +7591,7 @@ end % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. -% Similarily, if a @footnote appears inside an alignment, save the footnote +% Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. @@ -7421,15 +7695,19 @@ end % If the image is by itself, center it. \ifvmode \imagevmodetrue - \nobreak\bigskip + \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak - \line\bgroup \fi % + % Leave vertical mode so that indentation from an enclosing + % environment such as @quotation is respected. On the other hand, if + % it's at the top level, we don't want the normal paragraph indentation. + \noindent + % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% @@ -7440,7 +7718,7 @@ end \epsfbox{#1.eps}% \fi % - \ifimagevmode \egroup \bigbreak \fi % space after the image + \ifimagevmode \medskip \fi % space after the standalone image \endgroup} @@ -7712,10 +7990,9 @@ end \message{localization,} -% @documentlanguage is usually given very early, just after -% @setfilename. If done too late, it may not override everything -% properly. Single argument is the language (de) or locale (de_DE) -% abbreviation. It would be nice if we could set up a hyphenation file. +% For single-language documents, @documentlanguage is usually given very +% early, just after @documentencoding. Single argument is the language +% (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active @@ -7728,31 +8005,60 @@ end \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else + \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 - \endgroup + \endgroup % end raw TeX \endgroup} -} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. -% -\def\documentlanguagetrywithoutunderscore#1_#2\finish{% +% +\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else + \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } +}% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or -is empty. Maybe you need to install it? In the current directory -should work if nowhere else does.} +is empty. Maybe you need to install it? Putting it in the current +directory should work if nowhere else does.} +% This macro is called from txi-??.tex files; the first argument is the +% \language name to set (without the "\lang@" prefix), the second and +% third args are \{left,right}hyphenmin. +% +% The language names to pass are determined when the format is built. +% See the etex.log file created at that time, e.g., +% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. +% +% With TeX Live 2008, etex now includes hyphenation patterns for all +% available languages. This means we can support hyphenation in +% Texinfo, at least to some extent. (This still doesn't solve the +% accented characters problem.) +% +\catcode`@=11 +\def\txisetlanguage#1#2#3{% + % do not set the language if the name is undefined in the current TeX. + \expandafter\ifx\csname lang@#1\endcsname \relax + \message{no patterns for #1}% + \else + \global\language = \csname lang@#1\endcsname + \fi + % but there is no harm in adjusting the hyphenmin values regardless. + \global\lefthyphenmin = #2\relax + \global\righthyphenmin = #3\relax +} + +% Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% @@ -7793,7 +8099,7 @@ should work if nowhere else does.} \setnonasciicharscatcode\active \lattwochardefs % - \else \ifx \declaredencoding \latone + \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % @@ -7805,7 +8111,7 @@ should work if nowhere else does.} \setnonasciicharscatcode\active \utfeightchardefs % - \else + \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight @@ -7817,7 +8123,7 @@ should work if nowhere else does.} % A message to be logged when using a character that isn't available % the default font encoding (OT1). -% +% \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. @@ -7830,21 +8136,21 @@ should work if nowhere else does.} % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% - \gdef^^a0{~} + \gdef^^a0{~} \gdef^^a1{\exclamdown} - \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} - \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} - \gdef^^a8{\"{}} - \gdef^^a9{\copyright} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} \gdef^^aa{\ordf} - \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} - \gdef^^ad{\-} - \gdef^^ae{\registeredsymbol} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} @@ -7860,7 +8166,7 @@ should work if nowhere else does.} \gdef^^b9{$^1$} \gdef^^ba{\ordm} % - \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^bb{\guilletright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} @@ -7871,7 +8177,7 @@ should work if nowhere else does.} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} - \gdef^^c5{\ringaccent A} + \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} @@ -7883,7 +8189,7 @@ should work if nowhere else does.} \gdef^^ce{\^I} \gdef^^cf{\"I} % - \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} + \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} @@ -7897,7 +8203,7 @@ should work if nowhere else does.} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} - \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} + \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} @@ -7917,7 +8223,7 @@ should work if nowhere else does.} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % - \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} + \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} @@ -7931,7 +8237,7 @@ should work if nowhere else does.} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} - \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} + \gdef^^fe{\th} \gdef^^ff{\"y} } @@ -7953,7 +8259,7 @@ should work if nowhere else does.} % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{~} - \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}} + \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} @@ -7970,8 +8276,8 @@ should work if nowhere else does.} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} - \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}} - \gdef^^b2{\missingcharmsg{OGONEK}} + \gdef^^b1{\ogonek{a}} + \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} @@ -7996,14 +8302,14 @@ should work if nowhere else does.} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} - \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}} + \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % - \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} + \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} @@ -8012,7 +8318,7 @@ should work if nowhere else does.} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} - \gdef^^d9{\ringaccent U} + \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} @@ -8030,14 +8336,14 @@ should work if nowhere else does.} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} - \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}} + \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'\i} \gdef^^ee{\^\i} \gdef^^ef{\v d} % - \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} + \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} @@ -8056,11 +8362,11 @@ should work if nowhere else does.} } % UTF-8 character definitions. -% +% % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. -% +% \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz @@ -8210,6 +8516,7 @@ should work if nowhere else does.} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} + \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} @@ -8222,6 +8529,7 @@ should work if nowhere else does.} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} @@ -8241,6 +8549,7 @@ should work if nowhere else does.} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} @@ -8253,16 +8562,21 @@ should work if nowhere else does.} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0104}{\ogonek{A}} + \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{0118}{\ogonek{E}} + \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} @@ -8410,6 +8724,8 @@ should work if nowhere else does.} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} + \DeclareUnicodeCharacter{02DB}{\ogonek{ }} + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} @@ -8791,6 +9107,9 @@ should work if nowhere else does.} \message{and turning on texinfo input format.} +% DEL is a comment character, in case @c does not suffice. +\catcode`\^^? = 14 + % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other @@ -8900,7 +9219,7 @@ should work if nowhere else does.} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. -% +% @def@normalturnoffactive{% @let\=@normalbackslash @let"=@normaldoublequote @@ -8912,6 +9231,8 @@ should work if nowhere else does.} @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix + @markupsetuplqdefault + @markupsetuprqdefault @unsepspaces } @@ -8946,6 +9267,14 @@ should work if nowhere else does.} @catcode`@# = @other @catcode`@% = @other +@c Finally, make ` and ' active, so that txicodequoteundirected and +@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we +@c don't make ` and ' active, @code will not get them as active chars. +@c Do this last of all since we use ` in the previous @catcode assignments. +@catcode`@'=@active +@catcode`@`=@active +@markupsetuplqdefault +@markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/build-aux/unused-parameter.h b/build-aux/unused-parameter.h deleted file mode 100644 index c8d2071..0000000 --- a/build-aux/unused-parameter.h +++ /dev/null @@ -1,36 +0,0 @@ -/* A C macro for declaring that specific function parameters are not used. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter - declarations for parameters that are not used. This helps to reduce - warnings, such as from GCC -Wunused-parameter. The syntax is as follows: - type param _GL_UNUSED_PARAMETER - or more generally - param_decl _GL_UNUSED_PARAMETER - For example: - int param _GL_UNUSED_PARAMETER - int *(*param)(void) _GL_UNUSED_PARAMETER - Other possible, but obscure and discouraged syntaxes: - int _GL_UNUSED_PARAMETER *(*param)(void) - _GL_UNUSED_PARAMETER int *(*param)(void) - */ -#ifndef _GL_UNUSED_PARAMETER -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) -# else -# define _GL_UNUSED_PARAMETER -# endif -#endif diff --git a/build-aux/update-copyright b/build-aux/update-copyright index ef0b1ce..90624e9 100755 --- a/build-aux/update-copyright +++ b/build-aux/update-copyright @@ -3,9 +3,9 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}' if 0; # Update an FSF copyright year list to include the current year. -my $VERSION = '2011-01-02.20:59'; # UTC +my $VERSION = '2013-01-03.09:41'; # UTC -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This 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 @@ my $VERSION = '2011-01-02.20:59'; # UTC # The arguments to this script should be names of files that contain # copyright statements to be updated. The copyright holder's name -# defaults to "Free Softward Foundation, Inc." but may be changed to +# defaults to "Free Software Foundation, Inc." but may be changed to # any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment # variable. # @@ -43,7 +43,7 @@ my $VERSION = '2011-01-02.20:59'; # UTC # A warning is printed for every file for which no copyright # statement is recognized. # -# Each file's copyright statement must be formated correctly in +# Each file's copyright statement must be formatted correctly in # order to be recognized. For example, each of these is fine: # # Copyright @copyright{} 1990-2005, 2007-2009 Free Software @@ -110,6 +110,9 @@ my $VERSION = '2011-01-02.20:59'; # UTC # interval (such as 1990-2008). If unset or set to 0, all existing # copyright year intervals in a reformatted FSF copyright statement # are expanded instead. +# If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps +# to the minimal containing range. For example, convert +# 2000, 2004-2007, 2009 to 2000-2009. # 3. For testing purposes, you can set the assumed current year in # UPDATE_COPYRIGHT_YEAR. # 4. The default maximum line length for a copyright line is 72. @@ -189,7 +192,7 @@ if (defined $stmt_re) if ($final_year != $this_year) { # Update the year. - $stmt =~ s/$final_year_orig/$final_year, $this_year/; + $stmt =~ s/\b$final_year_orig\b/$final_year, $this_year/; } if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'}) { @@ -221,6 +224,10 @@ if (defined $stmt_re) })) )+ /$1-$3/gx; + + # When it's 2, emit a single range encompassing all year numbers. + $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2 + and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/; } # Format within margin. diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free index a6c228b..4c76c75 100755 --- a/build-aux/useless-if-before-free +++ b/build-aux/useless-if-before-free @@ -4,13 +4,13 @@ eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}' # Detect instances of "if (p) free (p);". # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces. -my $VERSION = '2011-01-09 01:39'; # UTC +my $VERSION = '2012-01-06 07:23'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2008-2011 Free Software Foundation, Inc. +# Copyright (C) 2008-2014 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,7 +47,7 @@ sub usage ($) my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); if ($exit_code != 0) { - print $STREAM "Try `$ME --help' for more information.\n"; + print $STREAM "Try '$ME --help' for more information.\n"; } else { @@ -62,7 +62,7 @@ detect free-like functions named FOO and BAR. OPTIONS: --list print only the name of each matching FILE (\\0-terminated) - --name=N add name N to the list of \`free\'-like functions to detect; + --name=N add name N to the list of \'free\'-like functions to detect; may be repeated --help display this help and exit @@ -125,14 +125,14 @@ sub is_NULL ($) foreach my $file (@ARGV) { open FH, '<', $file - or (warn "$ME: can't open `$file' for reading: $!\n"), + or (warn "$ME: can't open '$file' for reading: $!\n"), $err = EXIT_ERROR, next; while (defined (my $line = )) { while ($line =~ /\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\) # 1 2 3 - (?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)| + (?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;| \s*\{\s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;\s*\}))/sxg) { my $all = $1; @@ -179,7 +179,7 @@ free=xfree git grep -l -z "$free *(" \ | xargs -0 useless-if-before-free -l --name="$free" \ | xargs -0 perl -0x3b -pi -e \ - 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\))/$2/s' + 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\)\s*;)/$2/s' # Use the following to remove redundant uses of kfree inside braces. # Note that -0777 puts perl in slurp-whole-file mode; diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files index 9bb6fe6..b2bca54 100755 --- a/build-aux/vc-list-files +++ b/build-aux/vc-list-files @@ -2,9 +2,9 @@ # List version-controlled file names. # Print a version string. -scriptversion=2010-04-23.22; # UTC +scriptversion=2011-05-16.22; # UTC -# Copyright (C) 2006-2011 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # This 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,7 +30,7 @@ scriptversion=2010-04-23.22; # UTC postprocess= case $1 in --help) cat <&2 - echo "Usage: $0 [-C srcdir] [DIR]" 1>&2; exit 1;; -esac - -test "x$dir" = x && dir=. - -if test -d .git; then - test "x$dir" = x. \ - && dir= sed_esc= \ - || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; } - # Ignore git symlinks - either they point into the tree, in which case - # we don't need to visit the target twice, or they point somewhere - # else (often into a submodule), in which case the content does not - # belong to this package. - eval exec git ls-tree -r 'HEAD:"$dir"' \ - \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess -elif test -d .hg; then - eval exec hg locate '"$dir/*"' $postprocess -elif test -d .bzr; then - test "$postprocess" = '' && postprocess="| sed 's|^\./||'" - eval exec bzr ls -R --versioned '"$dir"' $postprocess -elif test -d CVS; then - test "$postprocess" = '' && postprocess="| sed 's|^\./||'" - if test -x build-aux/cvsu; then - eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess - elif (cvsu --help) >/dev/null 2>&1; then - eval cvsu --find --types=AFGM '"$dir"' $postprocess +test $# = 0 && set . + +for dir +do + if test -d .git; then + test "x$dir" = x. \ + && dir= sed_esc= \ + || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; } + # Ignore git symlinks - either they point into the tree, in which case + # we don't need to visit the target twice, or they point somewhere + # else (often into a submodule), in which case the content does not + # belong to this package. + eval exec git ls-tree -r 'HEAD:"$dir"' \ + \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess + elif test -d .hg; then + eval exec hg locate '"$dir/*"' $postprocess + elif test -d .bzr; then + test "$postprocess" = '' && postprocess="| sed 's|^\./||'" + eval exec bzr ls -R --versioned '"$dir"' $postprocess + elif test -d CVS; then + test "$postprocess" = '' && postprocess="| sed 's|^\./||'" + if test -x build-aux/cvsu; then + eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess + elif (cvsu --help) >/dev/null 2>&1; then + eval cvsu --find --types=AFGM '"$dir"' $postprocess + else + eval awk -F/ \''{ \ + if (!$1 && $3 !~ /^-/) { \ + f=FILENAME; \ + if (f ~ /CVS\/Entries$/) \ + f = substr(f, 1, length(f)-11); \ + print f $2; \ + }}'\'' \ + `find "$dir" -name Entries -print` /dev/null' $postprocess + fi + elif test -d .svn; then + eval exec svn list -R '"$dir"' $postprocess else - eval awk -F/ \''{ \ - if (!$1 && $3 !~ /^-/) { \ - f=FILENAME; \ - if (f ~ /CVS\/Entries$/) \ - f = substr(f, 1, length(f)-11); \ - print f $2; \ - }}'\'' \ - `find "$dir" -name Entries -print` /dev/null' $postprocess + echo "$0: Failed to determine type of version control used in `pwd`" 1>&2 + exit 1 fi -elif test -d .svn; then - eval exec svn list -R '"$dir"' $postprocess -else - echo "$0: Failed to determine type of version control used in `pwd`" 1>&2 - exit 1 -fi +done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/build-aux/warn-on-use.h b/build-aux/warn-on-use.h deleted file mode 100644 index 2cdeec3..0000000 --- a/build-aux/warn-on-use.h +++ /dev/null @@ -1,109 +0,0 @@ -/* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - This macro is useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. However, one of the reasons that a function is a - portability trap is if it has the wrong signature. Declaring - FUNCTION with a different signature in C is a compilation error, so - this macro must use the same type as any existing declaration so - that programs that avoid the problematic FUNCTION do not fail to - compile merely because they included a header that poisoned the - function. But this implies that _GL_WARN_ON_USE is only safe to - use if FUNCTION is known to already have a declaration. Use of - this macro implies that there must not be any other macro hiding - the declaration of FUNCTION; but undefining FUNCTION first is part - of the poisoning process anyway (although for symbols that are - provided only via a macro, the result is a compilation error rather - than a warning containing "literal string"). Also note that in - C++, it is only safe to use if FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - 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; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that the function is - declared with the given prototype, consisting of return type, parameters, - and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif diff --git a/build-aux/ylwrap b/build-aux/ylwrap index 7fe7c3f..6fff7b5 100755 --- a/build-aux/ylwrap +++ b/build-aux/ylwrap @@ -1,10 +1,10 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2007-11-22.22 +scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, -# 2007 Free Software Foundation, Inc. +# 2007, 2009 Free Software Foundation, Inc. # # Written by Tom Tromey . # @@ -19,9 +19,7 @@ scriptversion=2007-11-22.22 # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -219,5 +217,6 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/config.h.in b/config.h.in index 73ee1be..9218be4 100644 --- a/config.h.in +++ b/config.h.in @@ -1,5 +1,8 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + /* Define so that source code can verify that config.h was already included */ #undef ALREADY_INCLUDED_CONFIG_H @@ -24,19 +27,6 @@ make password and group calls very expensive. */ #undef CACHE_IDS -/* Define to 1 if chown fails to change ctime when at least one argument was - not -1. */ -#undef CHOWN_CHANGE_TIME_BUG - -/* Define if chown is not POSIX compliant regarding IDs of -1. */ -#undef CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE - -/* Define if chown modifies symlinks. */ -#undef CHOWN_MODIFIES_SYMLINK - -/* Define to 1 if chown mishandles trailing slash. */ -#undef CHOWN_TRAILING_SLASH_BUG - /* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID @@ -48,6 +38,13 @@ /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'double'. */ +#undef DBL_EXPBIT0_BIT + +/* Define as the word index where to find the exponent of 'double'. */ +#undef DBL_EXPBIT0_WORD + /* Define if you want to see find's innards */ #undef DEBUG @@ -78,14 +75,6 @@ language is requested. */ #undef ENABLE_NLS -/* Define to 1 if your platform has fchownat, but it does not reject an empty - file name. */ -#undef FCHOWNAT_EMPTY_FILENAME_BUG - -/* Define to 1 if your platform has fchownat, but it cannot perform lchown - tasks. */ -#undef FCHOWNAT_NOFOLLOW_BUG - /* Define this to 1 if F_DUPFD behavior does not match POSIX */ #undef FCNTL_DUPFD_BUGGY @@ -93,7 +82,7 @@ #undef FINDUTILS /* Define to nothing if C supports flexible array members, and to 1 if it does - not. That way, with a declaration like `struct s { int n; double + not. That way, with a declaration like 'struct s { int n; double d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 compilers. When computing the size of such an object, don't use 'sizeof (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' @@ -101,15 +90,22 @@ MSVC and with C++ compilers. */ #undef FLEXIBLE_ARRAY_MEMBER +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'float'. */ +#undef FLT_EXPBIT0_BIT + +/* Define as the word index where to find the exponent of 'float'. */ +#undef FLT_EXPBIT0_WORD + /* Define to 1 if fopen() fails to recognize a trailing slash. */ #undef FOPEN_TRAILING_SLASH_BUG /* Define to 1 if the system's ftello function has the Solaris bug. */ #undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE -/* Define to 1 if mkdir mistakenly creates a directory given with a trailing - dot component. */ -#undef FUNC_MKDIR_DOT_BUG +/* Define to 1 if fflush is known to work on stdin as per POSIX.1-2008, 0 if + fflush is known to not work, -1 if unknown. */ +#undef FUNC_FFLUSH_STDIN /* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ #undef FUNC_NL_LANGINFO_YESEXPR_WORKS @@ -136,9 +132,6 @@ declaration of the second argument to gettimeofday. */ #undef GETTIMEOFDAY_TIMEZONE -/* Define to make the limit macros in visible. */ -#undef GL_TRIGGER_STDC_LIMIT_MACROS - /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module areadlinkat shall be considered present. */ #undef GNULIB_AREADLINKAT @@ -176,14 +169,34 @@ #undef GNULIB_FD_SAFER_FLAG /* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fflush shall be considered present. */ +#undef GNULIB_FFLUSH + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module fopen-safer shall be considered present. */ #undef GNULIB_FOPEN_SAFER /* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ +#undef GNULIB_FSCANF + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module getcwd shall be considered present. */ +#undef GNULIB_GETCWD + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module lock shall be considered present. */ +#undef GNULIB_LOCK + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module malloc-gnu shall be considered present. */ #undef GNULIB_MALLOC_GNU /* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module openat shall be considered present. */ +#undef GNULIB_OPENAT + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module openat-safer shall be considered present. */ #undef GNULIB_OPENAT_SAFER @@ -192,9 +205,27 @@ #undef GNULIB_REALLOC_GNU /* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#undef GNULIB_SCANF + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module snprintf shall be considered present. */ #undef GNULIB_SNPRINTF +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module statat shall be considered present. */ +#undef GNULIB_STATAT + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module strerror shall be considered present. */ +#undef GNULIB_STRERROR + +/* Define to 1 when the gnulib module accept should be tested. */ +#undef GNULIB_TEST_ACCEPT + +/* Define to 1 when the gnulib module bind should be tested. */ +#undef GNULIB_TEST_BIND + /* Define to 1 when the gnulib module btowc should be tested. */ #undef GNULIB_TEST_BTOWC @@ -205,8 +236,8 @@ */ #undef GNULIB_TEST_CANONICALIZE_FILE_NAME -/* Define to 1 when the gnulib module chown should be tested. */ -#undef GNULIB_TEST_CHOWN +/* Define to 1 when the gnulib module chdir should be tested. */ +#undef GNULIB_TEST_CHDIR /* Define to 1 when the gnulib module cloexec should be tested. */ #undef GNULIB_TEST_CLOEXEC @@ -214,9 +245,18 @@ /* Define to 1 when the gnulib module close should be tested. */ #undef GNULIB_TEST_CLOSE +/* Define to 1 when the gnulib module closedir should be tested. */ +#undef GNULIB_TEST_CLOSEDIR + +/* Define to 1 when the gnulib module connect should be tested. */ +#undef GNULIB_TEST_CONNECT + /* Define to 1 when the gnulib module dirfd should be tested. */ #undef GNULIB_TEST_DIRFD +/* Define to 1 when the gnulib module dup should be tested. */ +#undef GNULIB_TEST_DUP + /* Define to 1 when the gnulib module dup2 should be tested. */ #undef GNULIB_TEST_DUP2 @@ -232,12 +272,12 @@ /* Define to 1 when the gnulib module fchdir should be tested. */ #undef GNULIB_TEST_FCHDIR -/* Define to 1 when the gnulib module fclose should be tested. */ -#undef GNULIB_TEST_FCLOSE - /* Define to 1 when the gnulib module fcntl should be tested. */ #undef GNULIB_TEST_FCNTL +/* Define to 1 when the gnulib module fdopen should be tested. */ +#undef GNULIB_TEST_FDOPEN + /* Define to 1 when the gnulib module fdopendir should be tested. */ #undef GNULIB_TEST_FDOPENDIR @@ -250,15 +290,27 @@ /* Define to 1 when the gnulib module fpurge should be tested. */ #undef GNULIB_TEST_FPURGE +/* Define to 1 when the gnulib module fseek should be tested. */ +#undef GNULIB_TEST_FSEEK + /* Define to 1 when the gnulib module fseeko should be tested. */ #undef GNULIB_TEST_FSEEKO +/* Define to 1 when the gnulib module fstat should be tested. */ +#undef GNULIB_TEST_FSTAT + +/* Define to 1 when the gnulib module fstatat should be tested. */ +#undef GNULIB_TEST_FSTATAT + /* Define to 1 when the gnulib module ftell should be tested. */ #undef GNULIB_TEST_FTELL /* Define to 1 when the gnulib module ftello should be tested. */ #undef GNULIB_TEST_FTELLO +/* Define to 1 when the gnulib module ftruncate should be tested. */ +#undef GNULIB_TEST_FTRUNCATE + /* Define to 1 when the gnulib module getcwd should be tested. */ #undef GNULIB_TEST_GETCWD @@ -271,6 +323,9 @@ /* Define to 1 when the gnulib module getgroups should be tested. */ #undef GNULIB_TEST_GETGROUPS +/* Define to 1 when the gnulib module gethostname should be tested. */ +#undef GNULIB_TEST_GETHOSTNAME + /* Define to 1 when the gnulib module getline should be tested. */ #undef GNULIB_TEST_GETLINE @@ -283,11 +338,26 @@ /* Define to 1 when the gnulib module gettimeofday should be tested. */ #undef GNULIB_TEST_GETTIMEOFDAY +/* Define to 1 when the gnulib module group-member should be tested. */ +#undef GNULIB_TEST_GROUP_MEMBER + +/* Define to 1 when the gnulib module ioctl should be tested. */ +#undef GNULIB_TEST_IOCTL + +/* Define to 1 when the gnulib module isfinite should be tested. */ +#undef GNULIB_TEST_ISFINITE + +/* Define to 1 when the gnulib module isinf should be tested. */ +#undef GNULIB_TEST_ISINF + /* Define to 1 when the gnulib module iswblank should be tested. */ #undef GNULIB_TEST_ISWBLANK -/* Define to 1 when the gnulib module lchown should be tested. */ -#undef GNULIB_TEST_LCHOWN +/* Define to 1 when the gnulib module listen should be tested. */ +#undef GNULIB_TEST_LISTEN + +/* Define to 1 when the gnulib module localeconv should be tested. */ +#undef GNULIB_TEST_LOCALECONV /* Define to 1 when the gnulib module lseek should be tested. */ #undef GNULIB_TEST_LSEEK @@ -331,18 +401,42 @@ /* Define to 1 when the gnulib module mktime should be tested. */ #undef GNULIB_TEST_MKTIME +/* Define to 1 when the gnulib module modf should be tested. */ +#undef GNULIB_TEST_MODF + +/* Define to 1 when the gnulib module nanosleep should be tested. */ +#undef GNULIB_TEST_NANOSLEEP + /* Define to 1 when the gnulib module nl_langinfo should be tested. */ #undef GNULIB_TEST_NL_LANGINFO /* Define to 1 when the gnulib module open should be tested. */ #undef GNULIB_TEST_OPEN +/* Define to 1 when the gnulib module openat should be tested. */ +#undef GNULIB_TEST_OPENAT + +/* Define to 1 when the gnulib module opendir should be tested. */ +#undef GNULIB_TEST_OPENDIR + /* Define to 1 when the gnulib module perror should be tested. */ #undef GNULIB_TEST_PERROR +/* Define to 1 when the gnulib module pipe should be tested. */ +#undef GNULIB_TEST_PIPE + /* Define to 1 when the gnulib module putenv should be tested. */ #undef GNULIB_TEST_PUTENV +/* Define to 1 when the gnulib module raise should be tested. */ +#undef GNULIB_TEST_RAISE + +/* Define to 1 when the gnulib module read should be tested. */ +#undef GNULIB_TEST_READ + +/* Define to 1 when the gnulib module readdir should be tested. */ +#undef GNULIB_TEST_READDIR + /* Define to 1 when the gnulib module readlink should be tested. */ #undef GNULIB_TEST_READLINK @@ -352,24 +446,42 @@ /* Define to 1 when the gnulib module realloc-posix should be tested. */ #undef GNULIB_TEST_REALLOC_POSIX +/* Define to 1 when the gnulib module rewinddir should be tested. */ +#undef GNULIB_TEST_REWINDDIR + /* Define to 1 when the gnulib module rmdir should be tested. */ #undef GNULIB_TEST_RMDIR /* Define to 1 when the gnulib module rpmatch should be tested. */ #undef GNULIB_TEST_RPMATCH +/* Define to 1 when the gnulib module select should be tested. */ +#undef GNULIB_TEST_SELECT + /* Define to 1 when the gnulib module setenv should be tested. */ #undef GNULIB_TEST_SETENV /* Define to 1 when the gnulib module setlocale should be tested. */ #undef GNULIB_TEST_SETLOCALE +/* Define to 1 when the gnulib module setsockopt should be tested. */ +#undef GNULIB_TEST_SETSOCKOPT + +/* Define to 1 when the gnulib module sigaction should be tested. */ +#undef GNULIB_TEST_SIGACTION + +/* Define to 1 when the gnulib module sigprocmask should be tested. */ +#undef GNULIB_TEST_SIGPROCMASK + /* Define to 1 when the gnulib module sleep should be tested. */ #undef GNULIB_TEST_SLEEP /* Define to 1 when the gnulib module snprintf should be tested. */ #undef GNULIB_TEST_SNPRINTF +/* Define to 1 when the gnulib module socket should be tested. */ +#undef GNULIB_TEST_SOCKET + /* Define to 1 when the gnulib module stat should be tested. */ #undef GNULIB_TEST_STAT @@ -385,6 +497,9 @@ /* Define to 1 when the gnulib module strerror should be tested. */ #undef GNULIB_TEST_STRERROR +/* Define to 1 when the gnulib module strerror_r should be tested. */ +#undef GNULIB_TEST_STRERROR_R + /* Define to 1 when the gnulib module strndup should be tested. */ #undef GNULIB_TEST_STRNDUP @@ -394,9 +509,6 @@ /* Define to 1 when the gnulib module strstr should be tested. */ #undef GNULIB_TEST_STRSTR -/* Define to 1 when the gnulib module strtoll should be tested. */ -#undef GNULIB_TEST_STRTOLL - /* Define to 1 when the gnulib module strtoull should be tested. */ #undef GNULIB_TEST_STRTOULL @@ -409,15 +521,18 @@ /* Define to 1 when the gnulib module time_r should be tested. */ #undef GNULIB_TEST_TIME_R +/* Define to 1 when the gnulib module trunc should be tested. */ +#undef GNULIB_TEST_TRUNC + /* Define to 1 when the gnulib module unlink should be tested. */ #undef GNULIB_TEST_UNLINK +/* Define to 1 when the gnulib module unlinkat should be tested. */ +#undef GNULIB_TEST_UNLINKAT + /* Define to 1 when the gnulib module unsetenv should be tested. */ #undef GNULIB_TEST_UNSETENV -/* Define to 1 when the gnulib module usleep should be tested. */ -#undef GNULIB_TEST_USLEEP - /* Define to 1 when the gnulib module wcrtomb should be tested. */ #undef GNULIB_TEST_WCRTOMB @@ -433,9 +548,6 @@ /* Define to 1 if you have the `access' function. */ #undef HAVE_ACCESS -/* Define to 1 if you have the `alarm' function. */ -#undef HAVE_ALARM - /* Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution. */ #undef HAVE_ALLOCA @@ -444,28 +556,40 @@ */ #undef HAVE_ALLOCA_H +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + /* Define to 1 if the compiler supports __attribute__ ((__noreturn__)) */ #undef HAVE_ATTRIBUTE_NORETURN /* Define to 1 if you have the header file. */ #undef HAVE_BP_SYM_H -/* Define to 1 if you have the `btowc' function. */ +/* Define to 1 if you have the 'btowc' function. */ #undef HAVE_BTOWC -/* Define to 1 if you have the `canonicalize_file_name' function. */ +/* Define to 1 if nanosleep mishandles large arguments. */ +#undef HAVE_BUG_BIG_NANOSLEEP + +/* Define to 1 if you have the header file. */ +#undef HAVE_BYTESWAP_H + +/* Define to 1 if you have the 'canonicalize_file_name' function. */ #undef HAVE_CANONICALIZE_FILE_NAME -/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the +/* Define to 1 if you have the 'catgets' function. */ +#undef HAVE_CATGETS + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT -/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE -/* Define to 1 if you have the `chown' function. */ -#undef HAVE_CHOWN +/* Define to 1 if you have the `chsize' function. */ +#undef HAVE_CHSIZE /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME @@ -473,6 +597,9 @@ /* Define to 1 if you have the `clock_settime' function. */ #undef HAVE_CLOCK_SETTIME +/* Define to 1 if you have the `closedir' function. */ +#undef HAVE_CLOSEDIR + /* Define if you have compound literals. */ #undef HAVE_COMPOUND_LITERALS @@ -528,18 +655,22 @@ don't. */ #undef HAVE_DECL_GETLINE -/* Define to 1 if you have the declaration of `imaxabs', and to 0 if you - don't. */ -#undef HAVE_DECL_IMAXABS - -/* Define to 1 if you have the declaration of `imaxdiv', and to 0 if you +/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you don't. */ -#undef HAVE_DECL_IMAXDIV +#undef HAVE_DECL_INET_PTON /* Define to 1 if you have the declaration of `isblank', and to 0 if you don't. */ #undef HAVE_DECL_ISBLANK +/* Define to 1 if you have the declaration of `isfinite', and to 0 if you + don't. */ +#undef HAVE_DECL_ISFINITE + +/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. + */ +#undef HAVE_DECL_ISINF + /* Define to 1 if you have the declaration of `iswblank', and to 0 if you don't. */ #undef HAVE_DECL_ISWBLANK @@ -548,6 +679,18 @@ don't. */ #undef HAVE_DECL_LOCALTIME_R +/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you + don't. */ +#undef HAVE_DECL_MBRTOWC + +/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you + don't. */ +#undef HAVE_DECL_MBSINIT + +/* Define to 1 if you have the declaration of `mbsrtowcs', and to 0 if you + don't. */ +#undef HAVE_DECL_MBSRTOWCS + /* Define to 1 if you have the declaration of `memrchr', and to 0 if you don't. */ #undef HAVE_DECL_MEMRCHR @@ -564,10 +707,6 @@ */ #undef HAVE_DECL_SETENV -/* Define to 1 if you have the declaration of `setregid', and to 0 if you - don't. */ -#undef HAVE_DECL_SETREGID - /* Define to 1 if you have the declaration of `sleep', and to 0 if you don't. */ #undef HAVE_DECL_SLEEP @@ -580,10 +719,6 @@ */ #undef HAVE_DECL_STRDUP -/* Define to 1 if you have the declaration of `strerror', and to 0 if you - don't. */ -#undef HAVE_DECL_STRERROR - /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R @@ -604,14 +739,6 @@ don't. */ #undef HAVE_DECL_STRNLEN -/* Define to 1 if you have the declaration of `strtoimax', and to 0 if you - don't. */ -#undef HAVE_DECL_STRTOIMAX - -/* Define to 1 if you have the declaration of `strtoll', and to 0 if you - don't. */ -#undef HAVE_DECL_STRTOLL - /* Define to 1 if you have the declaration of `strtoull', and to 0 if you don't. */ #undef HAVE_DECL_STRTOULL @@ -620,6 +747,14 @@ don't. */ #undef HAVE_DECL_STRTOUMAX +/* Define to 1 if you have the declaration of `towlower', and to 0 if you + don't. */ +#undef HAVE_DECL_TOWLOWER + +/* Define to 1 if you have the declaration of `trunc', and to 0 if you don't. + */ +#undef HAVE_DECL_TRUNC + /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. */ #undef HAVE_DECL_TZNAME @@ -628,6 +763,10 @@ don't. */ #undef HAVE_DECL_UNSETENV +/* Define to 1 if you have the declaration of `wcrtomb', and to 0 if you + don't. */ +#undef HAVE_DECL_WCRTOMB + /* Define to 1 if you have the declaration of `wctob', and to 0 if you don't. */ #undef HAVE_DECL_WCTOB @@ -636,6 +775,10 @@ don't. */ #undef HAVE_DECL_WCWIDTH +/* Define to 1 if you have the declaration of `_putenv', and to 0 if you + don't. */ +#undef HAVE_DECL__PUTENV + /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. */ #undef HAVE_DECL__SNPRINTF @@ -654,7 +797,7 @@ /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT -/* Define to 1 if you have the `dup2' function. */ +/* Define to 1 if you have the 'dup2' function. */ #undef HAVE_DUP2 /* Define to 1 if you have the `eaccess' function. */ @@ -672,34 +815,22 @@ /* Define if you have the declaration of environ. */ #undef HAVE_ENVIRON_DECL -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the `euidaccess' function. */ #undef HAVE_EUIDACCESS /* fabs is defined in -lm */ #undef HAVE_FABS_IN_LIBM -/* Define to 1 if you have the `faccessat' function. */ +/* Define to 1 if you have the 'faccessat' function. */ #undef HAVE_FACCESSAT /* Define to 1 if you have the `fchdir' function. */ #undef HAVE_FCHDIR -/* Define to 1 if you have the `fchmodat' function. */ -#undef HAVE_FCHMODAT - -/* Define to 1 if you have the `fchown' function. */ -#undef HAVE_FCHOWN - -/* Define to 1 if you have the `fcntl' function. */ +/* Define to 1 if you have the 'fcntl' function. */ #undef HAVE_FCNTL -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `fdopendir' function. */ +/* Define to 1 if you have the 'fdopendir' function. */ #undef HAVE_FDOPENDIR /* Define to 1 if you have the header file. */ @@ -711,16 +842,16 @@ /* Define to 1 if you have the `forcefindlib' function. */ #undef HAVE_FORCEFINDLIB -/* Define to 1 if you have the `fpurge' function. */ +/* Define to 1 if you have the 'fpurge' function. */ #undef HAVE_FPURGE /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO -/* Define to 1 if you have the `fstatat' function. */ +/* Define to 1 if you have the 'fstatat' function. */ #undef HAVE_FSTATAT -/* Define to 1 if you have the `fstatfs' function. */ +/* Define to 1 if you have the 'fstatfs' function. */ #undef HAVE_FSTATFS /* Define to 1 if you have the header file. */ @@ -729,27 +860,27 @@ /* Define to 1 if you have the `fs_stat_dev' function. */ #undef HAVE_FS_STAT_DEV +/* Define to 1 if you have the 'ftruncate' function. */ +#undef HAVE_FTRUNCATE + /* Define to 1 if you have the `funlockfile' function. */ #undef HAVE_FUNLOCKFILE /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD -/* Define to 1 if you have the `getdelim' function. */ +/* Define to 1 if you have the 'getdelim' function. */ #undef HAVE_GETDELIM -/* Define to 1 if you have the `getdtablesize' function. */ +/* Define to 1 if you have the 'getdtablesize' function. */ #undef HAVE_GETDTABLESIZE -/* Define to 1 if you have the `getegid' function. */ -#undef HAVE_GETEGID - -/* Define to 1 if you have the `getgrouplist' function. */ -#undef HAVE_GETGROUPLIST - /* Define to 1 if your system has a working `getgroups' function. */ #undef HAVE_GETGROUPS +/* Define to 1 if you have the `gethostname' function. */ +#undef HAVE_GETHOSTNAME + /* Define to 1 if you have the `getmntent' function. */ #undef HAVE_GETMNTENT @@ -774,18 +905,18 @@ /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT -/* Define to 1 if you have the `gettimeofday' function. */ +/* Define to 1 if you have the 'gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY -/* Define to 1 if you have the header file. */ -#undef HAVE_GRP_H - /* Define to 1 if you have the `hasmntopt' function. */ #undef HAVE_HASMNTOPT /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV +/* Define to 1 if you have the `inet_pton' function. */ +#undef HAVE_INET_PTON + /* Define to 1 if the compiler supports one of the keywords 'inline', '__inline__', '__inline' and effectively inlines functions marked as such. */ @@ -801,16 +932,34 @@ declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX -/* Define to 1 if you have the `isblank' function. */ +/* Define to 1 if you have the `ioctl' function. */ +#undef HAVE_IOCTL + +/* Define to 1 if defines AF_INET. */ +#undef HAVE_IPV4 + +/* Define to 1 if defines AF_INET6. */ +#undef HAVE_IPV6 + +/* Define to 1 if you have the 'isblank' function. */ #undef HAVE_ISBLANK -/* Define to 1 if you have the `iswblank' function. */ +/* Define if the isnan(double) function is available in libc. */ +#undef HAVE_ISNAND_IN_LIBC + +/* Define if the isnan(float) function is available in libc. */ +#undef HAVE_ISNANF_IN_LIBC + +/* Define if the isnan(long double) function is available in libc. */ +#undef HAVE_ISNANL_IN_LIBC + +/* Define to 1 if you have the 'iswblank' function. */ #undef HAVE_ISWBLANK -/* Define to 1 if you have the `iswcntrl' function. */ +/* Define to 1 if you have the 'iswcntrl' function. */ #undef HAVE_ISWCNTRL -/* Define to 1 if you have the `iswctype' function. */ +/* Define to 1 if you have the 'iswctype' function. */ #undef HAVE_ISWCTYPE /* Define if you have and nl_langinfo(CODESET). */ @@ -822,12 +971,6 @@ /* Define if you have and nl_langinfo(YESEXPR). */ #undef HAVE_LANGINFO_YESEXPR -/* Define to 1 if you have the `lchmod' function. */ -#undef HAVE_LCHMOD - -/* Define to 1 if you have the `lchown' function. */ -#undef HAVE_LCHOWN - /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES @@ -840,31 +983,28 @@ /* Define to 1 if you have the `sun' library (-lsun). */ #undef HAVE_LIBSUN -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - /* Define to 1 if you have the `listmntent' function. */ #undef HAVE_LISTMNTENT -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define to 1 if you have the `localtime_r' function. */ +/* Define to 1 if you have the 'localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if you support file names longer than 14 characters. */ #undef HAVE_LONG_FILE_NAMES -/* Define to 1 if the system has the type `long long int'. */ +/* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT -/* Define to 1 if you have the `lstat' function. */ +/* Define to 1 if you have the 'lstat' function. */ #undef HAVE_LSTAT /* Define to 1 if your system has a GNU libc compatible 'malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC_GNU +/* Define to 1 if you have the header file. */ +#undef HAVE_MALLOC_H + /* Define if the 'malloc' function is POSIX compliant. */ #undef HAVE_MALLOC_POSIX @@ -878,21 +1018,18 @@ /* Define to 1 if you have the `mbrtowc' function. */ #undef HAVE_MBRTOWC -/* Define to 1 if you have the `mbsinit' function. */ +/* Define to 1 if you have the 'mbsinit' function. */ #undef HAVE_MBSINIT -/* Define to 1 if you have the `mbslen' function. */ +/* Define to 1 if you have the 'mbslen' function. */ #undef HAVE_MBSLEN -/* Define to 1 if you have the `mbsrtowcs' function. */ +/* Define to 1 if you have the 'mbsrtowcs' function. */ #undef HAVE_MBSRTOWCS /* Define to 1 if declares mbstate_t. */ #undef HAVE_MBSTATE_T -/* Define to 1 if you have the `memchr' function. */ -#undef HAVE_MEMCHR - /* Define to 1 if you have the `memcmp' function. */ #undef HAVE_MEMCMP @@ -908,8 +1045,9 @@ /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET -/* Define to 1 if you have the `mkdirat' function. */ -#undef HAVE_MKDIRAT +/* Define to 1 if getcwd minimally works, that is, its result can be trusted + when it succeeds. */ +#undef HAVE_MINIMALLY_WORKING_GETCWD /* Define to 1 if you have the header file. */ #undef HAVE_MNTENT_H @@ -917,27 +1055,40 @@ /* modf is defined in -lm */ #undef HAVE_MODF_IN_LIBM -/* Define to 1 if you have the `mprotect' function. */ +/* Define to 1 if you have the 'mprotect' function. */ #undef HAVE_MPROTECT -/* Define to 1 if you have the `nanotime' function. */ +/* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +#undef HAVE_MSVC_INVALID_PARAMETER_HANDLER + +/* Define to 1 if you have the 'nanotime' function. */ #undef HAVE_NANOTIME /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H -/* Define to 1 if you have the `newlocale' function. */ +/* Define to 1 if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define to 1 if you have the 'newlocale' function. */ #undef HAVE_NEWLOCALE /* Define to 1 if you have the `next_dev' function. */ #undef HAVE_NEXT_DEV -/* Define to 1 if you have the `nl_langinfo' function. */ +/* Define to 1 if you have the 'nl_langinfo' function. */ #undef HAVE_NL_LANGINFO -/* Define to 1 if you have the `openat' function. */ +/* Define to 1 if you have the 'openat' function. */ #undef HAVE_OPENAT +/* Define to 1 if you have the `opendir' function. */ +#undef HAVE_OPENDIR + /* Define to 1 if you have the header file. */ #undef HAVE_OS_H @@ -945,10 +1096,10 @@ setting errno to ERANGE, ENAMETOOLONG, or ENOENT. */ #undef HAVE_PARTLY_WORKING_GETCWD -/* Define to 1 if you have the `pathconf' function. */ +/* Define to 1 if you have the 'pathconf' function. */ #undef HAVE_PATHCONF -/* Define to 1 if you have the `pipe' function. */ +/* Define to 1 if you have the 'pipe' function. */ #undef HAVE_PIPE /* Define to 1 if you have the header file. */ @@ -963,21 +1114,42 @@ /* Define if the POSIX multithreading library has read/write locks. */ #undef HAVE_PTHREAD_RWLOCK +/* Define to 1 if you have the `raise' function. */ +#undef HAVE_RAISE + +/* Define to 1 if accept is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ACCEPT + +/* Define to 1 if accept4 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ACCEPT4 + +/* Define to 1 if acosf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ACOSF + /* Define to 1 if acosl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ACOSL /* Define to 1 if alphasort is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ALPHASORT +/* Define to 1 if asinf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ASINF + /* Define to 1 if asinl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ASINL +/* Define to 1 if atanf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ATANF + /* Define to 1 if atanl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATANL /* Define to 1 if atoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATOLL +/* Define to 1 if bind is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_BIND + /* Define to 1 if btowc is declared even after undefining macros. */ #undef HAVE_RAW_DECL_BTOWC @@ -985,15 +1157,48 @@ macros. */ #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +/* Define to 1 if cbrt is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CBRT + +/* Define to 1 if cbrtf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CBRTF + +/* Define to 1 if cbrtl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CBRTL + /* Define to 1 if ceilf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CEILF /* Define to 1 if ceill is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CEILL +/* Define to 1 if chdir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CHDIR + /* Define to 1 if chown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_CHOWN +/* Define to 1 if closedir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CLOSEDIR + +/* Define to 1 if connect is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CONNECT + +/* Define to 1 if copysign is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COPYSIGN + +/* Define to 1 if copysignf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COPYSIGNF + +/* Define to 1 if copysignl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COPYSIGNL + +/* Define to 1 if cosf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COSF + +/* Define to 1 if coshf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COSHF + /* Define to 1 if cosl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_COSL @@ -1003,6 +1208,9 @@ /* Define to 1 if dprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DPRINTF +/* Define to 1 if dup is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_DUP + /* Define to 1 if dup2 is declared even after undefining macros. */ #undef HAVE_RAW_DECL_DUP2 @@ -1021,9 +1229,36 @@ /* Define to 1 if euidaccess is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EUIDACCESS +/* Define to 1 if exp2 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXP2 + +/* Define to 1 if exp2f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXP2F + +/* Define to 1 if exp2l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXP2L + +/* Define to 1 if expf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPF + /* Define to 1 if expl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_EXPL +/* Define to 1 if expm1 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPM1 + +/* Define to 1 if expm1f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPM1F + +/* Define to 1 if expm1l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPM1L + +/* Define to 1 if fabsf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FABSF + +/* Define to 1 if fabsl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FABSL + /* Define to 1 if faccessat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FACCESSAT @@ -1039,24 +1274,60 @@ /* Define to 1 if fcntl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FCNTL +/* Define to 1 if fdatasync is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FDATASYNC + /* Define to 1 if fdopendir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FDOPENDIR +/* Define to 1 if ffs is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FFS + +/* Define to 1 if ffsl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FFSL + +/* Define to 1 if ffsll is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FFSLL + /* Define to 1 if floorf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FLOORF /* Define to 1 if floorl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FLOORL +/* Define to 1 if fma is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMA + +/* Define to 1 if fmaf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMAF + +/* Define to 1 if fmal is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMAL + +/* Define to 1 if fmod is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMOD + +/* Define to 1 if fmodf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMODF + +/* Define to 1 if fmodl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMODL + /* Define to 1 if fpurge is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FPURGE +/* Define to 1 if frexpf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FREXPF + /* Define to 1 if frexpl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FREXPL /* Define to 1 if fseeko is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSEEKO +/* Define to 1 if fstat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FSTAT + /* Define to 1 if fstatat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FSTATAT @@ -1105,6 +1376,18 @@ /* Define to 1 if getpagesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETPAGESIZE +/* Define to 1 if getpeername is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETPEERNAME + +/* Define to 1 if gets is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETS + +/* Define to 1 if getsockname is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETSOCKNAME + +/* Define to 1 if getsockopt is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETSOCKOPT + /* Define to 1 if getsubopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSUBOPT @@ -1117,14 +1400,47 @@ /* Define to 1 if grantpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GRANTPT +/* Define to 1 if group_member is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GROUP_MEMBER + +/* Define to 1 if hypotf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_HYPOTF + +/* Define to 1 if hypotl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_HYPOTL + +/* Define to 1 if ilogb is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ILOGB + +/* Define to 1 if ilogbf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ILOGBF + +/* Define to 1 if ilogbl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ILOGBL + /* Define to 1 if imaxabs is declared even after undefining macros. */ #undef HAVE_RAW_DECL_IMAXABS /* Define to 1 if imaxdiv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_IMAXDIV -/* Define to 1 if initstat_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_INITSTAT_R +/* Define to 1 if inet_ntop is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_INET_NTOP + +/* Define to 1 if inet_pton is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_INET_PTON + +/* Define to 1 if initstate is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_INITSTATE + +/* Define to 1 if initstate_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_INITSTATE_R + +/* Define to 1 if ioctl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_IOCTL + +/* Define to 1 if isatty is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ISATTY /* Define to 1 if isblank is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ISBLANK @@ -1138,6 +1454,9 @@ /* Define to 1 if lchown is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LCHOWN +/* Define to 1 if ldexpf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LDEXPF + /* Define to 1 if ldexpl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LDEXPL @@ -1147,9 +1466,51 @@ /* Define to 1 if linkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LINKAT +/* Define to 1 if listen is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LISTEN + +/* Define to 1 if log is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG + +/* Define to 1 if log10 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG10 + +/* Define to 1 if log10f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG10F + +/* Define to 1 if log10l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG10L + +/* Define to 1 if log1p is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG1P + +/* Define to 1 if log1pf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG1PF + +/* Define to 1 if log1pl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG1PL + +/* Define to 1 if log2 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG2 + +/* Define to 1 if log2f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG2F + +/* Define to 1 if log2l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG2L + /* Define to 1 if logb is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LOGB +/* Define to 1 if logbf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGBF + +/* Define to 1 if logbl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGBL + +/* Define to 1 if logf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGF + /* Define to 1 if logl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_LOGL @@ -1213,12 +1574,27 @@ /* Define to 1 if mkstemps is declared even after undefining macros. */ #undef HAVE_RAW_DECL_MKSTEMPS +/* Define to 1 if modf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MODF + +/* Define to 1 if modff is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MODFF + +/* Define to 1 if modfl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MODFL + /* Define to 1 if nl_langinfo is declared even after undefining macros. */ #undef HAVE_RAW_DECL_NL_LANGINFO /* Define to 1 if openat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_OPENAT +/* Define to 1 if opendir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_OPENDIR + +/* Define to 1 if pclose is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PCLOSE + /* Define to 1 if pipe is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PIPE @@ -1228,21 +1604,42 @@ /* Define to 1 if popen is declared even after undefining macros. */ #undef HAVE_RAW_DECL_POPEN +/* Define to 1 if posix_openpt is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_POSIX_OPENPT + +/* Define to 1 if powf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_POWF + /* Define to 1 if pread is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PREAD +/* Define to 1 if pselect is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PSELECT + +/* Define to 1 if pthread_sigmask is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PTHREAD_SIGMASK + /* Define to 1 if ptsname is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PTSNAME +/* Define to 1 if ptsname_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PTSNAME_R + /* Define to 1 if pwrite is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PWRITE +/* Define to 1 if random is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RANDOM + /* Define to 1 if random_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RANDOM_R /* Define to 1 if rawmemchr is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RAWMEMCHR +/* Define to 1 if readdir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_READDIR + /* Define to 1 if readlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_READLINK @@ -1252,9 +1649,36 @@ /* Define to 1 if realpath is declared even after undefining macros. */ #undef HAVE_RAW_DECL_REALPATH +/* Define to 1 if recv is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RECV + +/* Define to 1 if recvfrom is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RECVFROM + +/* Define to 1 if remainder is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REMAINDER + +/* Define to 1 if remainderf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REMAINDERF + +/* Define to 1 if remainderl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REMAINDERL + /* Define to 1 if renameat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RENAMEAT +/* Define to 1 if rewinddir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REWINDDIR + +/* Define to 1 if rint is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RINT + +/* Define to 1 if rintf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RINTF + +/* Define to 1 if rintl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RINTL + /* Define to 1 if rmdir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_RMDIR @@ -1273,18 +1697,72 @@ /* Define to 1 if scandir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SCANDIR +/* Define to 1 if secure_getenv is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SECURE_GETENV + +/* Define to 1 if select is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SELECT + +/* Define to 1 if send is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SEND + +/* Define to 1 if sendto is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SENDTO + /* Define to 1 if setenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETENV +/* Define to 1 if sethostname is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETHOSTNAME + /* Define to 1 if setlocale is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETLOCALE +/* Define to 1 if setsockopt is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETSOCKOPT + +/* Define to 1 if setstate is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETSTATE + /* Define to 1 if setstate_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETSTATE_R /* Define to 1 if setusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETUSERSHELL +/* Define to 1 if shutdown is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SHUTDOWN + +/* Define to 1 if sigaction is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGACTION + +/* Define to 1 if sigaddset is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGADDSET + +/* Define to 1 if sigdelset is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGDELSET + +/* Define to 1 if sigemptyset is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGEMPTYSET + +/* Define to 1 if sigfillset is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGFILLSET + +/* Define to 1 if sigismember is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGISMEMBER + +/* Define to 1 if sigpending is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGPENDING + +/* Define to 1 if sigprocmask is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGPROCMASK + +/* Define to 1 if sinf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SINF + +/* Define to 1 if sinhf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SINHF + /* Define to 1 if sinl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SINL @@ -1294,9 +1772,18 @@ /* Define to 1 if snprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SNPRINTF +/* Define to 1 if socket is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SOCKET + +/* Define to 1 if sqrtf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SQRTF + /* Define to 1 if sqrtl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SQRTL +/* Define to 1 if srandom is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SRANDOM + /* Define to 1 if srandom_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SRANDOM_R @@ -1372,6 +1859,12 @@ /* Define to 1 if symlinkat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SYMLINKAT +/* Define to 1 if tanf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TANF + +/* Define to 1 if tanhf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TANHF + /* Define to 1 if tanl is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TANL @@ -1393,6 +1886,9 @@ /* Define to 1 if ttyname_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_TTYNAME_R +/* Define to 1 if uname is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_UNAME + /* Define to 1 if unlink is declared even after undefining macros. */ #undef HAVE_RAW_DECL_UNLINK @@ -1528,10 +2024,13 @@ /* Define to 1 if _Exit is declared even after undefining macros. */ #undef HAVE_RAW_DECL__EXIT -/* Define to 1 if you have the `readlink' function. */ +/* Define to 1 if you have the `readdir' function. */ +#undef HAVE_READDIR + +/* Define to 1 if you have the 'readlink' function. */ #undef HAVE_READLINK -/* Define to 1 if you have the `readlinkat' function. */ +/* Define to 1 if you have the 'readlinkat' function. */ #undef HAVE_READLINKAT /* Define to 1 if your system has a GNU libc compatible 'realloc' function, @@ -1541,12 +2040,21 @@ /* Define if the 'realloc' function is POSIX compliant. */ #undef HAVE_REALLOC_POSIX -/* Define to 1 if you have the `realpath' function. */ +/* Define to 1 if you have the 'realpath' function. */ #undef HAVE_REALPATH +/* Define to 1 if you have the `rewinddir' function. */ +#undef HAVE_REWINDDIR + /* Define to 1 if you have the `rpmatch' function. */ #undef HAVE_RPMATCH +/* Define to 1 if 'long double' and 'double' have the same representation. */ +#undef HAVE_SAME_LONG_DOUBLE_AS_DOUBLE + +/* Define to 1 if the system has the type `sa_family_t'. */ +#undef HAVE_SA_FAMILY_T + /* Define to 1 if you have the header file. */ #undef HAVE_SEARCH_H @@ -1559,7 +2067,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SELINUX_SELINUX_H -/* Define to 1 if you have the `setenv' function. */ +/* Define to 1 if you have the `setdtablesize' function. */ +#undef HAVE_SETDTABLESIZE + +/* Define to 1 if you have the 'setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setgroups' function. */ @@ -1571,6 +2082,21 @@ /* Define to 1 if you have the `setmntent' function. */ #undef HAVE_SETMNTENT +/* Define to 1 if you have the 'shutdown' function. */ +#undef HAVE_SHUTDOWN + +/* Define to 1 if you have the 'sigaction' function. */ +#undef HAVE_SIGACTION + +/* Define to 1 if you have the 'sigaltstack' function. */ +#undef HAVE_SIGALTSTACK + +/* Define to 1 if the system has the type `siginfo_t'. */ +#undef HAVE_SIGINFO_T + +/* Define to 1 if you have the 'siginterrupt' function. */ +#undef HAVE_SIGINTERRUPT + /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ #undef HAVE_SIGNED_SIG_ATOMIC_T @@ -1580,7 +2106,10 @@ /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T -/* Define to 1 if you have the `sleep' function. */ +/* Define to 1 if the system has the type `sigset_t'. */ +#undef HAVE_SIGSET_T + +/* Define to 1 if you have the 'sleep' function. */ #undef HAVE_SLEEP /* Define to 1 if you have the `snprintf' function. */ @@ -1594,9 +2123,6 @@ /* Define to 1 if you have the `statvfs' function. */ #undef HAVE_STATVFS -/* Define to 1 if you have the header file. */ -#undef HAVE_STDDEF_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -1625,7 +2151,7 @@ /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR -/* Define to 1 if you have the `strerror_r' function. */ +/* Define to 1 if you have the 'strerror_r' function. */ #undef HAVE_STRERROR_R /* Define to 1 if you have the `strftime' function. */ @@ -1640,7 +2166,7 @@ /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP -/* Define to 1 if you have the `strndup' function. */ +/* Define to 1 if you have the 'strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the `strnlen' function. */ @@ -1652,22 +2178,16 @@ /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR -/* Define to 1 if you have the `strtoimax' function. */ -#undef HAVE_STRTOIMAX - /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL -/* Define to 1 if you have the `strtoll' function. */ -#undef HAVE_STRTOLL - /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the `strtoull' function. */ #undef HAVE_STRTOULL -/* Define to 1 if you have the `strtoumax' function. */ +/* Define to 1 if you have the 'strtoumax' function. */ #undef HAVE_STRTOUMAX /* Define if there is a member named d_type in the struct describing directory @@ -1677,6 +2197,18 @@ /* Define to 1 if `f_fstypename' is a member of `struct fsstat'. */ #undef HAVE_STRUCT_FSSTAT_F_FSTYPENAME +/* Define to 1 if `decimal_point' is a member of `struct lconv'. */ +#undef HAVE_STRUCT_LCONV_DECIMAL_POINT + +/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */ +#undef HAVE_STRUCT_SIGACTION_SA_SIGACTION + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ +#undef HAVE_STRUCT_SOCKADDR_STORAGE + +/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ +#undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY + /* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_FSTYPENAME @@ -1713,6 +2245,9 @@ /* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE +/* Define to 1 if the system has the type `struct utsname'. */ +#undef HAVE_STRUCT_UTSNAME + /* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */ #undef HAVE_ST_BLOCKS @@ -1720,10 +2255,10 @@ /* Define if struct stat has an st_dm_mode member. */ #undef HAVE_ST_DM_MODE -/* Define to 1 if you have the `symlink' function. */ +/* Define to 1 if you have the 'symlink' function. */ #undef HAVE_SYMLINK -/* Define to 1 if you have the `symlinkat' function. */ +/* Define to 1 if you have the 'symlinkat' function. */ #undef HAVE_SYMLINKAT /* Define to 1 if you have the header file. */ @@ -1739,6 +2274,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MKDEV_H @@ -1767,6 +2305,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H @@ -1788,6 +2329,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UCRED_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UTSNAME_H @@ -1804,6 +2348,9 @@ `HAVE_STRUCT_TM_TM_ZONE' instead. */ #undef HAVE_TM_ZONE +/* Define to 1 if you have the `towlower' function. */ +#undef HAVE_TOWLOWER + /* Define to 1 if you have the `tsearch' function. */ #undef HAVE_TSEARCH @@ -1811,28 +2358,28 @@ `tzname'. */ #undef HAVE_TZNAME -/* Define to 1 if you have the `tzset' function. */ +/* Define to 1 if you have the 'tzset' function. */ #undef HAVE_TZSET +/* Define to 1 if you have the `uname' function. */ +#undef HAVE_UNAME + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the `unlinkat' function. */ +/* Define to 1 if you have the 'unlinkat' function. */ #undef HAVE_UNLINKAT /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV -/* Define to 1 if the system has the type `unsigned long long int'. */ +/* Define to 1 if the system has the type 'unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the `uselocale' function. */ #undef HAVE_USELOCALE -/* Define to 1 if you have the `usleep' function. */ -#undef HAVE_USLEEP - -/* Define to 1 if you have the `vasnprintf' function. */ +/* Define to 1 if you have the 'vasnprintf' function. */ #undef HAVE_VASNPRINTF /* Define to 1 if you have the `vprintf' function. */ @@ -1847,25 +2394,22 @@ /* Define if you have the 'wchar_t' type. */ #undef HAVE_WCHAR_T -/* Define to 1 if you have the `wcrtomb' function. */ +/* Define to 1 if you have the 'wcrtomb' function. */ #undef HAVE_WCRTOMB -/* Define to 1 if you have the `wcscoll' function. */ -#undef HAVE_WCSCOLL - /* Define to 1 if you have the `wcslen' function. */ #undef HAVE_WCSLEN /* Define to 1 if you have the `wcsnlen' function. */ #undef HAVE_WCSNLEN -/* Define to 1 if you have the `wctob' function. */ +/* Define to 1 if you have the 'wctob' function. */ #undef HAVE_WCTOB /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H -/* Define to 1 if you have the `wcwidth' function. */ +/* Define to 1 if you have the 'wcwidth' function. */ #undef HAVE_WCWIDTH /* Define to 1 if you have the header file. */ @@ -1874,39 +2418,68 @@ /* Define if you have the 'wint_t' type. */ #undef HAVE_WINT_T -/* Define to 1 if you have the `wmemchr' function. */ +/* Define to 1 if you have the 'wmemchr' function. */ #undef HAVE_WMEMCHR -/* Define to 1 if you have the `wmemcpy' function. */ +/* Define to 1 if you have the 'wmemcpy' function. */ #undef HAVE_WMEMCPY -/* Define to 1 if you have the `wmempcpy' function. */ +/* Define to 1 if you have the 'wmempcpy' function. */ #undef HAVE_WMEMPCPY +/* Define to 1 if fstatat (..., 0) works. For example, it does not work in AIX + 7.1. */ +#undef HAVE_WORKING_FSTATAT_ZERO_FLAG + /* Define to 1 if O_NOATIME works. */ #undef HAVE_WORKING_O_NOATIME /* Define to 1 if O_NOFOLLOW works. */ #undef HAVE_WORKING_O_NOFOLLOW +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H + /* Define to 1 if you have the header file. */ #undef HAVE_XLOCALE_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL +/* Define to 1 if you have the `_fseeki64' function. */ +#undef HAVE__FSEEKI64 + +/* Define to 1 if you have the `_ftelli64' function. */ +#undef HAVE__FTELLI64 + /* Define to 1 if you have the `_ftime' function. */ #undef HAVE__FTIME -/* Define to 1 if you have the `__fpending' function. */ -#undef HAVE___FPENDING +/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */ +#undef HAVE__SET_INVALID_PARAMETER_HANDLER -/* Define to 1 if you have the `__fpurge' function. */ +/* Define to 1 if you have the '__fpurge' function. */ #undef HAVE___FPURGE -/* Define to 1 if you have the `__freading' function. */ +/* Define to 1 if you have the '__freadahead' function. */ +#undef HAVE___FREADAHEAD + +/* Define to 1 if you have the '__freading' function. */ #undef HAVE___FREADING +/* Define to 1 if you have the '__xpg_strerror_r' function. */ +#undef HAVE___XPG_STRERROR_R + +/* Define HOST_NAME_MAX when does not define it. */ +#undef HOST_NAME_MAX + +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'long double'. */ +#undef LDBL_EXPBIT0_BIT + +/* Define as the word index where to find the exponent of 'long double'. */ +#undef LDBL_EXPBIT0_WORD + /* Define if you want to use the leaf optimisation (this can still be turned off with -noleaf) */ #undef LEAF_OPTIMISATION @@ -1914,7 +2487,7 @@ /* Define to 1 if lseek does not detect pipes. */ #undef LSEEK_PIPE_BROKEN -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing +/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK @@ -1985,7 +2558,7 @@ #undef MOUNTED_GETMNTINFO2 /* Define if we are on interix, and ought to use statvfs plus some special - knowledge on where mounted filesystems can be found. (Interix) */ + knowledge on where mounted file systems can be found. (Interix) */ #undef MOUNTED_INTERIX_STATVFS /* Define if there is a function named listmntent that can be used to list all @@ -1994,7 +2567,7 @@ /* Define if there is a function named mntctl that can be used to read the list of mounted file systems, and there is a system header file that - declares `struct vmount.' (AIX) */ + declares 'struct vmount'. (AIX) */ #undef MOUNTED_VMOUNT /* Define to 1 if assertions should be disabled. */ @@ -2036,7 +2609,7 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* the number of pending output bytes on stream `fp' */ +/* the number of pending output bytes on stream 'fp' */ #undef PENDING_OUTPUT_N_BYTES /* Define if exists and defines unusable PRI* macros. */ @@ -2046,9 +2619,6 @@ type mode_t. */ #undef PROMOTED_MODE_T -/* Define to 1 if the C compiler supports function prototypes. */ -#undef PROTOTYPES - /* Define if the pthread_in_use() detection is hard. */ #undef PTHREAD_IN_USE_DETECTION_HARD @@ -2077,8 +2647,8 @@ */ #undef REPLACE_OPEN_DIRECTORY -/* Define this to 1 if strerror is broken. */ -#undef REPLACE_STRERROR +/* Define to 1 if strerror(0) does not return a message implying success. */ +#undef REPLACE_STRERROR_0 /* Define if vasnprintf exists but is overridden by gnulib. */ #undef REPLACE_VASNPRINTF @@ -2151,8 +2721,40 @@ made weak. */ #undef USE_SOLARIS_THREADS_WEAK -/* Define if the Win32 multithreading API can be used. */ -#undef USE_WIN32_THREADS +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable general extensions on OS X. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#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__ +#endif + + +/* Define if the native Windows multithreading API can be used. */ +#undef USE_WINDOWS_THREADS /* Version number of package */ #undef VERSION @@ -2164,6 +2766,9 @@ 'wchar_t'. */ #undef WCHAR_T_SUFFIX +/* Define if WSAStartup is needed. */ +#undef WINDOWS_SOCKETS + /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wint_t'. */ #undef WINT_T_SUFFIX @@ -2171,69 +2776,155 @@ /* Define if you want to use fts() to do the filesystem search. */ #undef WITH_FTS +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#undef _DARWIN_USE_64_BIT_INODE + /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS +/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct + stat.st_size becomes 64-bit. */ +#undef _GL_WINDOWS_64_BIT_ST_SIZE + /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES +/* Define to 1 on Solaris. */ +#undef _LCONV_C99 + /* Define to 1 if on MINIX. */ #undef _MINIX +/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ +#undef _NETBSD_SOURCE + +/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE -/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* Define to 1 in order to get the POSIX compatible declarations of socket + functions. */ +#undef _POSIX_PII_SOCKET + +/* Define to 1 if you need to in order for 'stat' and other things to work. */ #undef _POSIX_SOURCE +/* Define if you want to include , so that it consistently + overrides 's RE_DUP_MAX. */ +#undef _REGEX_INCLUDE_LIMITS_H + /* Define if you want regoff_t to be at least as wide POSIX requires. */ #undef _REGEX_LARGE_OFFSETS -/* Define to 500 only on HP-UX. */ -#undef _XOPEN_SOURCE - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX -/* Define like PROTOTYPES; this can be used by system headers. */ -#undef __PROTOTYPES +/* Define to `unsigned long' if does not define. */ +#undef dev_t -/* Ensure that defines the limit macros, since gnulib's - relies on them. */ -#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress the use of extern inline on problematic Apple configurations. + OS X 10.8 and earlier mishandle it; see, e.g., + . + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Perhaps Apple will fix this some day. */ +#if (defined __APPLE__ \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_APPLE_BUG +#endif +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_APPLE_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_APPLE_BUG) +# if defined __GNUC_GNU_INLINE__ && __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 +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED #endif - -/* Define to `unsigned long' if does not define. */ -#undef dev_t +#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 + /* Suppress GCC's bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + . */ +# 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 /* Always use our fgetfilecon wrapper. */ #undef fgetfilecon @@ -2250,9 +2941,6 @@ /* A replacement for va_copy, if needed. */ #define gl_va_copy(a,b) ((a) = (b)) -/* Define to rpl_gmtime if the replacement function should be used. */ -#undef gmtime - /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus @@ -2268,7 +2956,7 @@ /* 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__ @@ -2278,9 +2966,6 @@ /* Always use our lgetfilecon wrapper. */ #undef lgetfilecon -/* Define to rpl_localtime if the replacement function should be used. */ -#undef localtime - /* Define to a type if does not define. */ #undef mbstate_t @@ -2365,6 +3050,9 @@ /* Define to `unsigned int' if does not define. */ #undef size_t +/* type to use in place of socklen_t if not defined */ +#undef socklen_t + /* Define to `int' if does not define. */ #undef ssize_t @@ -2383,9 +3071,20 @@ is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The __const__ attribute was added in gcc 2.95. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +#else +# define _GL_ATTRIBUTE_CONST /* empty */ +#endif -/* Define to an unsigned 32-bit type if lacks this type. */ -#undef useconds_t /* Define as a macro for copying va_list variables. */ #undef va_copy diff --git a/configure b/configure index a059523..9566c58 100755 --- a/configure +++ b/configure @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for GNU findutils 4.5.10. +# Generated by GNU Autoconf 2.69 for GNU findutils 4.5.14. # # Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -91,6 +89,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -135,6 +134,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -168,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -213,14 +238,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -323,6 +359,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -444,6 +488,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -478,16 +526,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -499,28 +547,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -552,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GNU findutils' PACKAGE_TARNAME='findutils' -PACKAGE_VERSION='4.5.10' -PACKAGE_STRING='GNU findutils 4.5.10' +PACKAGE_VERSION='4.5.14' +PACKAGE_STRING='GNU findutils 4.5.14' PACKAGE_BUGREPORT='bug-findutils@gnu.org' PACKAGE_URL='http://www.gnu.org/software/findutils/' @@ -600,6 +628,9 @@ gl_header_list= gl_fnmatch_required=POSIX gl_getopt_required=POSIX gl_getopt_required=POSIX +gl_modf_required=plain +gl_trunc_required=plain +gl_trunc_required=plain gt_needs= ac_subst_vars='gltests_LTLIBOBJS gltests_LIBOBJS @@ -609,6 +640,20 @@ CONFIG_INCLUDE am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +HAVE_FAKETIME_FALSE +HAVE_FAKETIME_TRUE +FAKETIME +HAVE_PYTHON_FALSE +HAVE_PYTHON_TRUE +pkgpyexecdir +pyexecdir +pkgpythondir +pythondir +PYTHON_PLATFORM +PYTHON_EXEC_PREFIX +PYTHON_PREFIX +PYTHON_VERSION +PYTHON POSUB INTLLIBS LTLIBICONV @@ -632,24 +677,64 @@ FINDLIBS CROSS_COMPILING_FALSE CROSS_COMPILING_TRUE MKINSTALLDIRS +WARN_CFLAGS LIBTESTS_LIBDEPS LIBGNULIB_LTLIBDEPS LIBGNULIB_LIBDEPS YIELD_LIB abs_aux_dir -LTLIBMULTITHREAD -LIBMULTITHREAD -LTLIBTHREAD -LIBTHREAD -LIBPTH_PREFIX -LTLIBPTH -LIBPTH +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H +NEXT_SYS_IOCTL_H +HAVE_SYS_IOCTL_H +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H +NEXT_SIGNAL_H +REPLACE_RAISE +REPLACE_PTHREAD_SIGMASK +HAVE_SIGHANDLER_T +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T +HAVE_STRUCT_SIGACTION_SA_SIGACTION +HAVE_SIGACTION +HAVE_SIGINFO_T +HAVE_SIGSET_T +HAVE_RAISE +HAVE_PTHREAD_SIGMASK +HAVE_POSIX_SIGNALBLOCKING +GNULIB_SIGACTION +GNULIB_SIGPROCMASK +GNULIB_SIGNAL_H_SIGPIPE +GNULIB_RAISE +GNULIB_PTHREAD_SIGMASK +GL_GENERATE_NETINET_IN_H_FALSE +GL_GENERATE_NETINET_IN_H_TRUE +NETINET_IN_H +HAVE_NETINET_IN_H +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H +NEXT_NETINET_IN_H +LIB_NANOSLEEP +LIB_SELECT +HAVE_SYS_SELECT_H +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H +NEXT_SYS_SELECT_H +REPLACE_SELECT +REPLACE_PSELECT +HAVE_PSELECT +GNULIB_SELECT +GNULIB_PSELECT INTL_MACOSX_LIBS +INET_PTON_LIB LOCALE_TR_UTF8 +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H +NEXT_ARPA_INET_H +HAVE_ARPA_INET_H +REPLACE_INET_PTON +REPLACE_INET_NTOP +HAVE_DECL_INET_PTON +HAVE_DECL_INET_NTOP +GNULIB_INET_PTON +GNULIB_INET_NTOP gltests_WITNESS NEXT_AS_FIRST_DIRECTIVE_WCHAR_H NEXT_WCHAR_H -WARN_CFLAGS HAVE_FEATURES_H LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE @@ -666,28 +751,76 @@ NEXT_TIME_H NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H NEXT_SYS_WAIT_H GNULIB_WAITPID -NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H -NEXT_SYS_STAT_H +HAVE_SYS_UTSNAME_H +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H +NEXT_SYS_UTSNAME_H +HAVE_STRUCT_UTSNAME +HAVE_UNAME +GNULIB_UNAME +HAVE_SYS_UIO_H +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H +NEXT_SYS_UIO_H +HAVE_WS2TCPIP_H +HAVE_SYS_SOCKET_H +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H +NEXT_SYS_SOCKET_H +HAVE_ACCEPT4 +HAVE_SA_FAMILY_T +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY +HAVE_STRUCT_SOCKADDR_STORAGE +GNULIB_ACCEPT4 +GNULIB_SHUTDOWN +GNULIB_SETSOCKOPT +GNULIB_SENDTO +GNULIB_RECVFROM +GNULIB_SEND +GNULIB_RECV +GNULIB_LISTEN +GNULIB_GETSOCKOPT +GNULIB_GETSOCKNAME +GNULIB_GETPEERNAME +GNULIB_BIND +GNULIB_ACCEPT +GNULIB_CONNECT +GNULIB_SOCKET +HAVE_STRINGS_H NEXT_AS_FIRST_DIRECTIVE_STRINGS_H NEXT_STRINGS_H NEXT_AS_FIRST_DIRECTIVE_STRING_H NEXT_STRING_H HAVE_DECL_STRNCASECMP HAVE_STRCASECMP +HAVE_FFS +GNULIB_FFS NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H NEXT_AS_FIRST_DIRECTIVE_STDIO_H NEXT_STDIO_H +GL_GENERATE_STDARG_H_FALSE +GL_GENERATE_STDARG_H_TRUE +STDARG_H NEXT_AS_FIRST_DIRECTIVE_STDARG_H NEXT_STDARG_H -STDARG_H +GL_GENERATE_STDALIGN_H_FALSE +GL_GENERATE_STDALIGN_H_TRUE +STDALIGN_H +LIBSOCKET +GL_GENERATE_SELINUX_CONTEXT_H_FALSE +GL_GENERATE_SELINUX_CONTEXT_H_TRUE SELINUX_CONTEXT_H NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H NEXT_SELINUX_SELINUX_H LIB_SELINUX YFLAGS YACC +HAVE__BOOL +GL_GENERATE_STDBOOL_H_FALSE +GL_GENERATE_STDBOOL_H_TRUE +STDBOOL_H +TRUNC_LIBM MODF_LIBM +REPLACE_LOCALTIME +REPLACE_GMTIME REPLACE_TIMEGM REPLACE_NANOSLEEP REPLACE_MKTIME @@ -709,6 +842,7 @@ REPLACE_STRNDUP REPLACE_STRNCAT REPLACE_STRERROR_R REPLACE_STRERROR +REPLACE_STRCHRNUL REPLACE_STRCASESTR REPLACE_STRSTR REPLACE_STRDUP @@ -733,6 +867,8 @@ HAVE_DECL_MEMRCHR HAVE_MEMPCPY HAVE_DECL_MEMMEM HAVE_MEMCHR +HAVE_FFSLL +HAVE_FFSL HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL @@ -769,33 +905,133 @@ GNULIB_MEMRCHR GNULIB_MEMPCPY GNULIB_MEMMEM GNULIB_MEMCHR +GNULIB_FFSLL +GNULIB_FFSL LOCALE_FR_UTF8 LOCALE_ZH_CN LOCALE_JA NEXT_AS_FIRST_DIRECTIVE_MATH_H NEXT_MATH_H +SED +LTLIBMULTITHREAD +LIBMULTITHREAD +LTLIBTHREAD +LIBTHREAD +LIBPTH_PREFIX +LTLIBPTH +LIBPTH +NEXT_AS_FIRST_DIRECTIVE_LOCALE_H +NEXT_LOCALE_H +HAVE_XLOCALE_H +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H +NEXT_STDDEF_H +GL_GENERATE_STDDEF_H_FALSE +GL_GENERATE_STDDEF_H_TRUE +STDDEF_H +HAVE_WCHAR_T +REPLACE_NULL +REPLACE_STRUCT_LCONV +REPLACE_DUPLOCALE +REPLACE_SETLOCALE +REPLACE_LOCALECONV +HAVE_DUPLOCALE +GNULIB_DUPLOCALE +GNULIB_SETLOCALE +GNULIB_LOCALECONV +LOCALCHARSET_TESTS_ENVIRONMENT +GLIBC21 +HAVE_LANGINFO_YESEXPR +HAVE_LANGINFO_ERA +HAVE_LANGINFO_T_FMT_AMPM +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_H +NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H +NEXT_LANGINFO_H +REPLACE_NL_LANGINFO +HAVE_NL_LANGINFO +GNULIB_NL_LANGINFO +REPLACE_TOWLOWER +REPLACE_ISWCNTRL +HAVE_WCTYPE_H +NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H +NEXT_WCTYPE_H +HAVE_WINT_T +HAVE_ISWCNTRL +REPLACE_ISWBLANK +HAVE_WCTRANS_T +HAVE_WCTYPE_T +HAVE_ISWBLANK +GNULIB_TOWCTRANS +GNULIB_WCTRANS +GNULIB_ISWCTYPE +GNULIB_WCTYPE +GNULIB_ISWBLANK +ISINF_LIBM +ISFINITE_LIBM +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE REPLACE_TRUNCL REPLACE_TRUNCF REPLACE_TRUNC +REPLACE_SQRTL REPLACE_SIGNBIT_USING_GCC REPLACE_SIGNBIT REPLACE_ROUNDL REPLACE_ROUNDF REPLACE_ROUND +REPLACE_REMAINDERL +REPLACE_REMAINDERF +REPLACE_REMAINDER REPLACE_NAN +REPLACE_MODFL +REPLACE_MODFF +REPLACE_MODF +REPLACE_LOGBL +REPLACE_LOGBF +REPLACE_LOGB +REPLACE_LOG2L +REPLACE_LOG2F +REPLACE_LOG2 +REPLACE_LOG1PL +REPLACE_LOG1PF +REPLACE_LOG1P +REPLACE_LOG10L +REPLACE_LOG10F +REPLACE_LOG10 +REPLACE_LOGL +REPLACE_LOGF +REPLACE_LOG REPLACE_LDEXPL REPLACE_ISNAN REPLACE_ISINF REPLACE_ISFINITE +REPLACE_ILOGBF +REPLACE_ILOGB +REPLACE_HYPOTL +REPLACE_HYPOTF +REPLACE_HYPOT REPLACE_HUGE_VAL REPLACE_FREXPL REPLACE_FREXP +REPLACE_FREXPF +REPLACE_FMODL +REPLACE_FMODF +REPLACE_FMOD +REPLACE_FMAL +REPLACE_FMAF +REPLACE_FMA REPLACE_FLOORL REPLACE_FLOORF REPLACE_FLOOR +REPLACE_FABSL +REPLACE_EXP2L +REPLACE_EXP2 +REPLACE_EXPM1F +REPLACE_EXPM1 REPLACE_CEILL REPLACE_CEILF REPLACE_CEIL +REPLACE_CBRTL +REPLACE_CBRTF HAVE_DECL_TRUNCL HAVE_DECL_TRUNCF HAVE_DECL_TRUNC @@ -805,110 +1041,198 @@ HAVE_DECL_SINL HAVE_DECL_ROUNDL HAVE_DECL_ROUNDF HAVE_DECL_ROUND -HAVE_DECL_LOGL +HAVE_DECL_RINTF +HAVE_DECL_REMAINDERL +HAVE_DECL_REMAINDER HAVE_DECL_LOGB +HAVE_DECL_LOG2L +HAVE_DECL_LOG2F +HAVE_DECL_LOG2 +HAVE_DECL_LOG10L +HAVE_DECL_LOGL HAVE_DECL_LDEXPL HAVE_DECL_FREXPL HAVE_DECL_FLOORL HAVE_DECL_FLOORF +HAVE_DECL_EXPM1L +HAVE_DECL_EXP2L +HAVE_DECL_EXP2F +HAVE_DECL_EXP2 HAVE_DECL_EXPL HAVE_DECL_COSL +HAVE_DECL_COPYSIGNF HAVE_DECL_CEILL HAVE_DECL_CEILF +HAVE_DECL_CBRTL +HAVE_DECL_CBRTF HAVE_DECL_ATANL HAVE_DECL_ASINL HAVE_DECL_ACOSL +HAVE_TANHF HAVE_TANL +HAVE_TANF HAVE_SQRTL +HAVE_SQRTF +HAVE_SINHF HAVE_SINL +HAVE_SINF +HAVE_RINTL +HAVE_RINT +HAVE_REMAINDERF +HAVE_REMAINDER +HAVE_POWF +HAVE_MODFL +HAVE_MODFF +HAVE_LOGBL +HAVE_LOGBF +HAVE_LOG1PL +HAVE_LOG1PF +HAVE_LOG1P +HAVE_LOG10L +HAVE_LOG10F HAVE_LOGL +HAVE_LOGF +HAVE_LDEXPF HAVE_ISNANL HAVE_ISNAND HAVE_ISNANF +HAVE_ILOGBL +HAVE_ILOGBF +HAVE_ILOGB +HAVE_HYPOTL +HAVE_HYPOTF +HAVE_FREXPF +HAVE_FMODL +HAVE_FMODF +HAVE_FMAL +HAVE_FMAF +HAVE_FMA +HAVE_FABSL +HAVE_FABSF +HAVE_EXPM1F +HAVE_EXPM1 HAVE_EXPL +HAVE_EXPF +HAVE_COSHF HAVE_COSL +HAVE_COSF +HAVE_COPYSIGNL +HAVE_COPYSIGN +HAVE_CBRTL +HAVE_CBRTF +HAVE_CBRT +HAVE_ATAN2F HAVE_ATANL +HAVE_ATANF HAVE_ASINL +HAVE_ASINF HAVE_ACOSL +HAVE_ACOSF GNULIB_TRUNCL GNULIB_TRUNCF GNULIB_TRUNC +GNULIB_TANHF GNULIB_TANL +GNULIB_TANF GNULIB_SQRTL +GNULIB_SQRTF +GNULIB_SINHF GNULIB_SINL +GNULIB_SINF GNULIB_SIGNBIT GNULIB_ROUNDL GNULIB_ROUNDF GNULIB_ROUND -GNULIB_LOGL +GNULIB_RINTL +GNULIB_RINTF +GNULIB_RINT +GNULIB_REMAINDERL +GNULIB_REMAINDERF +GNULIB_REMAINDER +GNULIB_POWF +GNULIB_MODFL +GNULIB_MODFF +GNULIB_MODF +GNULIB_LOGBL +GNULIB_LOGBF GNULIB_LOGB +GNULIB_LOG2L +GNULIB_LOG2F +GNULIB_LOG2 +GNULIB_LOG1PL +GNULIB_LOG1PF +GNULIB_LOG1P +GNULIB_LOG10L +GNULIB_LOG10F +GNULIB_LOG10 +GNULIB_LOGL +GNULIB_LOGF +GNULIB_LOG GNULIB_LDEXPL +GNULIB_LDEXPF GNULIB_ISNANL GNULIB_ISNAND GNULIB_ISNANF GNULIB_ISNAN GNULIB_ISINF GNULIB_ISFINITE +GNULIB_ILOGBL +GNULIB_ILOGBF +GNULIB_ILOGB +GNULIB_HYPOTL +GNULIB_HYPOTF +GNULIB_HYPOT GNULIB_FREXPL GNULIB_FREXP +GNULIB_FREXPF +GNULIB_FMODL +GNULIB_FMODF +GNULIB_FMOD +GNULIB_FMAL +GNULIB_FMAF +GNULIB_FMA GNULIB_FLOORL GNULIB_FLOORF GNULIB_FLOOR +GNULIB_FABSL +GNULIB_FABSF +GNULIB_EXPM1L +GNULIB_EXPM1F +GNULIB_EXPM1 +GNULIB_EXP2L +GNULIB_EXP2F +GNULIB_EXP2 GNULIB_EXPL +GNULIB_EXPF +GNULIB_COSHF GNULIB_COSL +GNULIB_COSF +GNULIB_COPYSIGNL +GNULIB_COPYSIGNF +GNULIB_COPYSIGN GNULIB_CEILL GNULIB_CEILF GNULIB_CEIL +GNULIB_CBRTL +GNULIB_CBRTF +GNULIB_CBRT +GNULIB_ATAN2F GNULIB_ATANL +GNULIB_ATANF GNULIB_ASINL +GNULIB_ASINF GNULIB_ACOSL -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H -NEXT_LOCALE_H -HAVE_XLOCALE_H -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H -NEXT_STDDEF_H -STDDEF_H -HAVE_WCHAR_T -REPLACE_NULL -REPLACE_DUPLOCALE -REPLACE_SETLOCALE -HAVE_DUPLOCALE -GNULIB_DUPLOCALE -GNULIB_SETLOCALE -LOCALCHARSET_TESTS_ENVIRONMENT -GLIBC21 -HAVE_LANGINFO_YESEXPR -HAVE_LANGINFO_ERA -HAVE_LANGINFO_T_FMT_AMPM -HAVE_LANGINFO_CODESET -HAVE_LANGINFO_H -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H -NEXT_LANGINFO_H -REPLACE_NL_LANGINFO -HAVE_NL_LANGINFO -GNULIB_NL_LANGINFO -REPLACE_ISWCNTRL -HAVE_WCTYPE_H -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H -NEXT_WCTYPE_H -HAVE_WINT_T -HAVE_ISWCNTRL -REPLACE_ISWBLANK -HAVE_WCTRANS_T -HAVE_WCTYPE_T -HAVE_ISWBLANK -GNULIB_TOWCTRANS -GNULIB_WCTRANS -GNULIB_ISWCTYPE -GNULIB_WCTYPE -GNULIB_ISWBLANK +GNULIB_ACOSF +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H +NEXT_INTTYPES_H UINT64_MAX_EQ_ULONG_MAX UINT32_MAX_LT_UINTMAX_MAX +PRIPTR_PREFIX +PRI_MACROS_BROKEN INT64_MAX_EQ_LONG_MAX INT32_MAX_LT_INTMAX_MAX -PRIPTR_PREFIX -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H -NEXT_INTTYPES_H +REPLACE_STRTOUMAX +REPLACE_STRTOIMAX HAVE_DECL_STRTOUMAX HAVE_DECL_STRTOIMAX HAVE_DECL_IMAXDIV @@ -917,7 +1241,8 @@ GNULIB_STRTOUMAX GNULIB_STRTOIMAX GNULIB_IMAXDIV GNULIB_IMAXABS -PRI_MACROS_BROKEN +GL_GENERATE_STDINT_H_FALSE +GL_GENERATE_STDINT_H_TRUE STDINT_H WINT_T_SUFFIX WCHAR_T_SUFFIX @@ -943,10 +1268,9 @@ HAVE_INTTYPES_H HAVE_WCHAR_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT -HAVE__BOOL -STDBOOL_H NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H NEXT_SYS_TIME_H +REPLACE_STRUCT_TIMEVAL REPLACE_GETTIMEOFDAY HAVE_SYS_TIME_H HAVE_STRUCT_TIMEVAL @@ -954,16 +1278,60 @@ HAVE_GETTIMEOFDAY GNULIB_GETTIMEOFDAY LTLIBINTL LIBINTL +GNULIB_GL_UNISTD_H_GETOPT GETOPT_H HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H NEXT_GETOPT_H +GETHOSTNAME_LIB +WINDOWS_64_BIT_ST_SIZE +NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H +NEXT_SYS_STAT_H +REPLACE_UTIMENSAT +REPLACE_STAT +REPLACE_MKNOD +REPLACE_MKFIFO +REPLACE_MKDIR +REPLACE_LSTAT +REPLACE_FUTIMENS +REPLACE_FSTATAT +REPLACE_FSTAT +HAVE_UTIMENSAT +HAVE_MKNODAT +HAVE_MKNOD +HAVE_MKFIFOAT +HAVE_MKFIFO +HAVE_MKDIRAT +HAVE_LSTAT +HAVE_LCHMOD +HAVE_FUTIMENS +HAVE_FSTATAT +HAVE_FCHMODAT +GNULIB_UTIMENSAT +GNULIB_STAT +GNULIB_MKNODAT +GNULIB_MKNOD +GNULIB_MKFIFOAT +GNULIB_MKFIFO +GNULIB_MKDIRAT +GNULIB_LSTAT +GNULIB_LCHMOD +GNULIB_FUTIMENS +GNULIB_FSTATAT +GNULIB_FSTAT +GNULIB_FCHMODAT +WINDOWS_64_BIT_OFF_T +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H +NEXT_SYS_TYPES_H +GL_GENERATE_FNMATCH_H_FALSE +GL_GENERATE_FNMATCH_H_TRUE FNMATCH_H +REPLACE_ITOLD +GL_GENERATE_FLOAT_H_FALSE +GL_GENERATE_FLOAT_H_TRUE FLOAT_H NEXT_AS_FIRST_DIRECTIVE_FLOAT_H NEXT_FLOAT_H -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H -NEXT_FCNTL_H REPLACE_VSPRINTF REPLACE_VSNPRINTF REPLACE_VPRINTF @@ -972,6 +1340,7 @@ REPLACE_VDPRINTF REPLACE_VASPRINTF REPLACE_TMPFILE REPLACE_STDIO_WRITE_FUNCS +REPLACE_STDIO_READ_FUNCS REPLACE_SPRINTF REPLACE_SNPRINTF REPLACE_RENAMEAT @@ -992,11 +1361,14 @@ REPLACE_FPURGE REPLACE_FPRINTF REPLACE_FOPEN REPLACE_FFLUSH +REPLACE_FDOPEN REPLACE_FCLOSE REPLACE_DPRINTF HAVE_VDPRINTF HAVE_VASPRINTF HAVE_RENAMEAT +HAVE_POPEN +HAVE_PCLOSE HAVE_FTELLO HAVE_FSEEKO HAVE_DPRINTF @@ -1015,11 +1387,15 @@ GNULIB_VPRINTF GNULIB_VFPRINTF_POSIX GNULIB_VFPRINTF GNULIB_VDPRINTF +GNULIB_VSCANF +GNULIB_VFSCANF GNULIB_VASPRINTF GNULIB_TMPFILE GNULIB_STDIO_H_SIGPIPE +GNULIB_STDIO_H_NONBLOCKING GNULIB_SPRINTF_POSIX GNULIB_SNPRINTF +GNULIB_SCANF GNULIB_RENAMEAT GNULIB_RENAME GNULIB_REMOVE @@ -1030,57 +1406,35 @@ GNULIB_PRINTF_POSIX GNULIB_PRINTF GNULIB_POPEN GNULIB_PERROR +GNULIB_PCLOSE GNULIB_OBSTACK_PRINTF_POSIX GNULIB_OBSTACK_PRINTF GNULIB_GETLINE GNULIB_GETDELIM +GNULIB_GETCHAR +GNULIB_GETC GNULIB_FWRITE GNULIB_FTELLO GNULIB_FTELL GNULIB_FSEEKO GNULIB_FSEEK +GNULIB_FSCANF GNULIB_FREOPEN +GNULIB_FREAD GNULIB_FPUTS GNULIB_FPUTC GNULIB_FPURGE GNULIB_FPRINTF_POSIX GNULIB_FPRINTF GNULIB_FOPEN +GNULIB_FGETS +GNULIB_FGETC GNULIB_FFLUSH +GNULIB_FDOPEN GNULIB_FCLOSE GNULIB_DPRINTF -REPLACE_UTIMENSAT -REPLACE_STAT -REPLACE_MKNOD -REPLACE_MKFIFO -REPLACE_MKDIR -REPLACE_LSTAT -REPLACE_FUTIMENS -REPLACE_FSTATAT -REPLACE_FSTAT -HAVE_UTIMENSAT -HAVE_MKNODAT -HAVE_MKNOD -HAVE_MKFIFOAT -HAVE_MKFIFO -HAVE_MKDIRAT -HAVE_LSTAT -HAVE_LCHMOD -HAVE_FUTIMENS -HAVE_FSTATAT -HAVE_FCHMODAT -GNULIB_UTIMENSAT -GNULIB_STAT -GNULIB_MKNODAT -GNULIB_MKNOD -GNULIB_MKFIFOAT -GNULIB_MKFIFO -GNULIB_MKDIRAT -GNULIB_LSTAT -GNULIB_LCHMOD -GNULIB_FUTIMENS -GNULIB_FSTATAT -GNULIB_FCHMODAT +NEXT_AS_FIRST_DIRECTIVE_FCNTL_H +NEXT_FCNTL_H REPLACE_OPENAT REPLACE_OPEN REPLACE_FCNTL @@ -1088,6 +1442,7 @@ HAVE_OPENAT HAVE_FCNTL GNULIB_OPENAT GNULIB_OPEN +GNULIB_NONBLOCKING GNULIB_FCNTL LIB_EACCESS EOVERFLOW_VALUE @@ -1096,34 +1451,52 @@ ENOLINK_VALUE ENOLINK_HIDDEN EMULTIHOP_VALUE EMULTIHOP_HIDDEN +GL_GENERATE_ERRNO_H_FALSE +GL_GENERATE_ERRNO_H_TRUE ERRNO_H NEXT_AS_FIRST_DIRECTIVE_ERRNO_H NEXT_ERRNO_H +HAVE_DIRENT_H NEXT_AS_FIRST_DIRECTIVE_DIRENT_H NEXT_DIRENT_H -REPLACE_OPENDIR +NEXT_AS_FIRST_DIRECTIVE_CTYPE_H +NEXT_CTYPE_H +PRAGMA_COLUMNS +PRAGMA_SYSTEM_HEADER +INCLUDE_NEXT_AS_FIRST_DIRECTIVE +INCLUDE_NEXT +HAVE_ISBLANK +GNULIB_ISBLANK +pkglibexecdir +runstatedir +lispdir REPLACE_FDOPENDIR REPLACE_DIRFD REPLACE_CLOSEDIR +REPLACE_OPENDIR HAVE_ALPHASORT HAVE_SCANDIR HAVE_FDOPENDIR HAVE_DECL_FDOPENDIR HAVE_DECL_DIRFD +HAVE_CLOSEDIR +HAVE_REWINDDIR +HAVE_READDIR +HAVE_OPENDIR GNULIB_ALPHASORT GNULIB_SCANDIR GNULIB_FDOPENDIR GNULIB_DIRFD -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H -NEXT_CTYPE_H -PRAGMA_COLUMNS -PRAGMA_SYSTEM_HEADER -INCLUDE_NEXT_AS_FIRST_DIRECTIVE -INCLUDE_NEXT -HAVE_ISBLANK -GNULIB_ISBLANK -pkglibexecdir -lispdir +GNULIB_CLOSEDIR +GNULIB_REWINDDIR +GNULIB_READDIR +GNULIB_OPENDIR +HAVE_WINSOCK2_H +REPLACE_IOCTL +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS +SYS_IOCTL_H_HAVE_WINSOCK2_H +GNULIB_IOCTL +HAVE_MSVC_INVALID_PARAMETER_HANDLER LIB_CLOCK_GETTIME UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H @@ -1136,17 +1509,21 @@ REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR REPLACE_READLINK +REPLACE_READ REPLACE_PWRITE REPLACE_PREAD REPLACE_LSEEK REPLACE_LINKAT REPLACE_LINK REPLACE_LCHOWN +REPLACE_ISATTY REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETLOGIN_R +REPLACE_GETDTABLESIZE REPLACE_GETDOMAINNAME REPLACE_GETCWD +REPLACE_FTRUNCATE REPLACE_FCHOWNAT REPLACE_DUP2 REPLACE_DUP @@ -1155,10 +1532,12 @@ REPLACE_CHOWN HAVE_SYS_PARAM_H HAVE_OS_H HAVE_DECL_TTYNAME_R +HAVE_DECL_SETHOSTNAME HAVE_DECL_GETUSERSHELL HAVE_DECL_GETPAGESIZE HAVE_DECL_GETLOGIN_R HAVE_DECL_GETDOMAINNAME +HAVE_DECL_FDATASYNC HAVE_DECL_FCHDIR HAVE_DECL_ENVIRON HAVE_USLEEP @@ -1166,6 +1545,7 @@ HAVE_UNLINKAT HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP +HAVE_SETHOSTNAME HAVE_READLINKAT HAVE_READLINK HAVE_PWRITE @@ -1175,6 +1555,7 @@ HAVE_PIPE HAVE_LINKAT HAVE_LINK HAVE_LCHOWN +HAVE_GROUP_MEMBER HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME @@ -1182,6 +1563,7 @@ HAVE_GETGROUPS HAVE_GETDTABLESIZE HAVE_FTRUNCATE HAVE_FSYNC +HAVE_FDATASYNC HAVE_FCHOWNAT HAVE_FCHDIR HAVE_FACCESSAT @@ -1194,14 +1576,16 @@ GNULIB_USLEEP GNULIB_UNLINKAT GNULIB_UNLINK GNULIB_UNISTD_H_SIGPIPE -GNULIB_UNISTD_H_GETOPT +GNULIB_UNISTD_H_NONBLOCKING GNULIB_TTYNAME_R GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP +GNULIB_SETHOSTNAME GNULIB_RMDIR GNULIB_READLINKAT GNULIB_READLINK +GNULIB_READ GNULIB_PWRITE GNULIB_PREAD GNULIB_PIPE2 @@ -1210,6 +1594,8 @@ GNULIB_LSEEK GNULIB_LINKAT GNULIB_LINK GNULIB_LCHOWN +GNULIB_ISATTY +GNULIB_GROUP_MEMBER GNULIB_GETUSERSHELL GNULIB_GETPAGESIZE GNULIB_GETLOGIN_R @@ -1221,6 +1607,7 @@ GNULIB_GETDOMAINNAME GNULIB_GETCWD GNULIB_FTRUNCATE GNULIB_FSYNC +GNULIB_FDATASYNC GNULIB_FCHOWNAT GNULIB_FCHDIR GNULIB_FACCESSAT @@ -1228,15 +1615,20 @@ GNULIB_EUIDACCESS GNULIB_ENVIRON GNULIB_DUP3 GNULIB_DUP2 +GNULIB_DUP GNULIB_CLOSE GNULIB_CHOWN +GNULIB_CHDIR REPLACE_WCTOMB REPLACE_UNSETENV REPLACE_STRTOD REPLACE_SETENV REPLACE_REALPATH REPLACE_REALLOC +REPLACE_RANDOM_R REPLACE_PUTENV +REPLACE_PTSNAME_R +REPLACE_PTSNAME REPLACE_MKSTEMP REPLACE_MBTOWC REPLACE_MALLOC @@ -1251,11 +1643,15 @@ HAVE_STRTOLL HAVE_STRTOD HAVE_DECL_SETENV HAVE_SETENV +HAVE_SECURE_GETENV HAVE_RPMATCH HAVE_REALPATH HAVE_RANDOM_R HAVE_RANDOM_H +HAVE_RANDOM +HAVE_PTSNAME_R HAVE_PTSNAME +HAVE_POSIX_OPENPT HAVE_MKSTEMPS HAVE_MKSTEMP HAVE_MKOSTEMPS @@ -1275,12 +1671,16 @@ GNULIB_STRTOULL GNULIB_STRTOLL GNULIB_STRTOD GNULIB_SETENV +GNULIB_SECURE_GETENV GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R +GNULIB_RANDOM GNULIB_PUTENV +GNULIB_PTSNAME_R GNULIB_PTSNAME +GNULIB_POSIX_OPENPT GNULIB_MKSTEMPS GNULIB_MKSTEMP GNULIB_MKOSTEMPS @@ -1295,6 +1695,9 @@ GNULIB_CANONICALIZE_FILE_NAME GNULIB_CALLOC_POSIX GNULIB_ATOLL GNULIB__EXIT +GL_GENERATE_BYTESWAP_H_FALSE +GL_GENERATE_BYTESWAP_H_TRUE +BYTESWAP_H LOCALE_FR REPLACE_WCSWIDTH REPLACE_WCWIDTH @@ -1387,19 +1790,24 @@ GNULIB_MBRTOWC GNULIB_MBSINIT GNULIB_WCTOB GNULIB_BTOWC +GL_GENERATE_ALLOCA_H_FALSE +GL_GENERATE_ALLOCA_H_TRUE ALLOCA_H ALLOCA GL_COND_LIBTOOL_FALSE GL_COND_LIBTOOL_TRUE -ANSI2KNR -U +ac_ct_RANLIB +ac_ct_AR +RANLIB +ARFLAGS +AR EGREP GREP -RANLIB CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -1417,7 +1825,6 @@ DEFAULT_ARG_SIZE WITH_FTS_FALSE WITH_FTS_TRUE AUXDIR -INCLUDES host_os host_vendor host_cpu @@ -1497,17 +1904,18 @@ enable_leaf_optimisation enable_d_type_optimization enable_d_type_optimisation enable_dependency_tracking -enable_threads enable_largefile +enable_threads enable_assert +with_gnu_ld +enable_rpath +with_libpth_prefix with_included_regex with_selinux with_packager with_packager_version with_packager_bug_reports -with_gnu_ld -enable_rpath -with_libpth_prefix +enable_compiler_warnings enable_nls with_libiconv_prefix with_libintl_prefix @@ -1523,7 +1931,8 @@ LIBS CPPFLAGS CPP YACC -YFLAGS' +YFLAGS +PYTHON' # Initialize some variables set by options. @@ -1928,7 +2337,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1979,8 +2388,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -2066,7 +2473,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU findutils 4.5.10 to adapt to many kinds of systems. +\`configure' configures GNU findutils 4.5.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2136,7 +2543,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU findutils 4.5.10:";; + short | recursive ) echo "Configuration of GNU findutils 4.5.14:";; esac cat <<\_ACEOF @@ -2158,18 +2565,23 @@ Optional Features: Synonym for --enable-d_type-optimization --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors - --enable-threads={posix|solaris|pth|win32} + --disable-largefile omit support for large files + --enable-threads={posix|solaris|pth|windows} specify multithreading API --disable-threads build without multithread safety - --disable-largefile omit support for large files --disable-assert turn off assertions --disable-rpath do not hardcode runtime library paths + --enable-compiler-warnings + Enable many compiler warnings --disable-nls do not use Native Language Support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-fts Use an older mechanism for searching the filesystem, instead of using fts() + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib + --without-libpth-prefix don't search for libpth in includedir and libdir --without-included-regex don't compile regex; this is the default on systems with recent-enough versions of the GNU C Library @@ -2179,9 +2591,6 @@ Optional Packages: --with-packager-version Packager-specific version information --with-packager-bug-reports Packager info for bug reports (URL/e-mail/...) - --with-gnu-ld assume the C compiler uses GNU ld default=no - --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib - --without-libpth-prefix don't search for libpth in includedir and libdir --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib @@ -2199,13 +2608,14 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor - YACC The `Yet Another C Compiler' implementation to use. Defaults to - `bison -y'. Values other than `bison -y' will most likely break + YACC The "Yet Another C Compiler" implementation to use. Defaults to + 'bison -y'. Values other than 'bison -y' will most likely break on most systems. YFLAGS YFLAGS contains the list arguments that will be passed by default to Bison. This script will default YFLAGS to the empty - string to avoid a default value of `-d' given by some make + string to avoid a default value of '-d' given by some make applications. + PYTHON the Python interpreter Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -2275,10 +2685,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU findutils configure 4.5.10 -generated by GNU Autoconf 2.67 +GNU findutils configure 4.5.14 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2322,7 +2732,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -2359,7 +2769,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -2372,10 +2782,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2442,7 +2852,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2451,7 +2861,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -2492,7 +2902,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2506,7 +2916,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2524,7 +2934,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2555,7 +2965,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2569,11 +2979,65 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -2582,7 +3046,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2637,7 +3101,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2652,7 +3116,7 @@ ac_fn_c_check_decl () as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2683,7 +3147,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl @@ -2704,7 +3168,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2720,7 +3185,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2746,7 +3212,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2762,7 +3229,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2796,7 +3264,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2860,65 +3329,11 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including @@ -2928,7 +3343,7 @@ ac_fn_c_check_member () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if eval "test \"\${$4+set}\"" = set; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2972,15 +3387,15 @@ fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU findutils $as_me 4.5.10, which was -generated by GNU Autoconf 2.67. Invocation command line was +It was created by GNU findutils $as_me 4.5.14, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3238,7 +3653,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -3262,36 +3677,39 @@ fi gl_func_list="$gl_func_list btowc" gl_func_list="$gl_func_list canonicalize_file_name" gl_func_list="$gl_func_list realpath" -gl_func_list="$gl_func_list chown" -gl_func_list="$gl_func_list fchown" +gl_func_list="$gl_func_list readlinkat" +gl_header_list="$gl_header_list unistd.h" +gl_header_list="$gl_header_list sys/param.h" +gl_func_list="$gl_func_list _set_invalid_parameter_handler" +gl_header_list="$gl_header_list sys/socket.h" +gl_func_list="$gl_func_list fchdir" gl_header_list="$gl_header_list dirent.h" gl_func_list="$gl_func_list fdopendir" -gl_func_list="$gl_func_list dup2" -gl_func_list="$gl_func_list fcntl" gl_func_list="$gl_func_list faccessat" -gl_header_list="$gl_header_list libgen.h" -gl_func_list="$gl_func_list lchmod" -gl_func_list="$gl_func_list access" -gl_func_list="$gl_func_list fchdir" -gl_header_list="$gl_header_list sys/param.h" +gl_func_list="$gl_func_list fcntl" +gl_func_list="$gl_func_list symlink" +gl_func_list="$gl_func_list mempcpy" gl_func_list="$gl_func_list isblank" gl_func_list="$gl_func_list iswctype" gl_func_list="$gl_func_list mbsrtowcs" -gl_func_list="$gl_func_list mempcpy" gl_func_list="$gl_func_list wmemchr" gl_func_list="$gl_func_list wmemcpy" gl_func_list="$gl_func_list wmempcpy" gl_header_list="$gl_header_list wctype.h" gl_fnmatch_required=GNU gl_header_list="$gl_header_list stdio_ext.h" -gl_func_list="$gl_func_list __fpending" gl_func_list="$gl_func_list fpurge" gl_func_list="$gl_func_list __fpurge" +gl_func_list="$gl_func_list __freadahead" gl_func_list="$gl_func_list __freading" +gl_header_list="$gl_header_list sys/stat.h" +gl_func_list="$gl_func_list fstatat" +gl_func_list="$gl_func_list openat" gl_func_list="$gl_func_list fstatfs" gl_header_list="$gl_header_list sys/vfs.h" gl_func_list="$gl_func_list getdelim" gl_func_list="$gl_func_list getdtablesize" +gl_header_list="$gl_header_list netdb.h" gl_getopt_required=GNU gl_header_list="$gl_header_list getopt.h" gl_func_list="$gl_func_list gettimeofday" @@ -3311,39 +3729,45 @@ gl_func_list="$gl_func_list mbrtowc" gl_func_list="$gl_func_list mbslen" gl_header_list="$gl_header_list sys/mman.h" gl_func_list="$gl_func_list mprotect" -gl_func_list="$gl_func_list memchr" -gl_header_list="$gl_header_list unistd.h" -gl_func_list="$gl_func_list alarm" gl_header_list="$gl_header_list sys/statvfs.h" gl_func_list="$gl_func_list nl_langinfo" -gl_func_list="$gl_func_list pathconf" +gl_func_list="$gl_func_list strerror_r" +gl_func_list="$gl_func_list __xpg_strerror_r" gl_func_list="$gl_func_list readlink" -gl_func_list="$gl_func_list readlinkat" -gl_func_list="$gl_func_list wcscoll" +gl_header_list="$gl_header_list malloc.h" +gl_func_list="$gl_func_list pathconf" gl_header_list="$gl_header_list selinux/selinux.h" gl_func_list="$gl_func_list setenv" +gl_func_list="$gl_func_list snprintf" gl_func_list="$gl_func_list strdup" -gl_header_list="$gl_header_list sys/socket.h" +gl_func_list="$gl_func_list catgets" gl_func_list="$gl_func_list tzset" gl_header_list="$gl_header_list strings.h" gl_func_list="$gl_func_list strndup" -gl_header_list="$gl_header_list sys/stat.h" +gl_func_list="$gl_func_list strtoumax" +gl_header_list="$gl_header_list sys/uio.h" +gl_header_list="$gl_header_list sys/utsname.h" gl_header_list="$gl_header_list sys/wait.h" gl_func_list="$gl_func_list localtime_r" gl_func_list="$gl_func_list pipe" +gl_func_list="$gl_func_list unlinkat" gl_func_list="$gl_func_list vasnprintf" gl_header_list="$gl_header_list features.h" gl_func_list="$gl_func_list wcrtomb" gl_func_list="$gl_func_list wcwidth" -gl_func_list="$gl_func_list getegid" -gl_header_list="$gl_header_list grp.h" +gl_header_list="$gl_header_list arpa/inet.h" +gl_func_list="$gl_func_list ftruncate" +gl_header_list="$gl_header_list netinet/in.h" gl_func_list="$gl_func_list newlocale" -gl_func_list="$gl_func_list getgrouplist" +gl_header_list="$gl_header_list sys/select.h" gl_header_list="$gl_header_list priv.h" +gl_func_list="$gl_func_list sigaction" +gl_func_list="$gl_func_list sigaltstack" +gl_func_list="$gl_func_list siginterrupt" gl_func_list="$gl_func_list sleep" -gl_func_list="$gl_func_list symlink" gl_func_list="$gl_func_list symlinkat" -gl_func_list="$gl_func_list usleep" +gl_header_list="$gl_header_list sys/ioctl.h" +gl_func_list="$gl_func_list shutdown" gl_func_list="$gl_func_list wctob" gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same @@ -3462,7 +3886,7 @@ am__api_version='1.11' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3482,7 +3906,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3549,11 +3973,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3639,7 +4063,7 @@ if test "$cross_compiling" != no; then set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -3651,7 +4075,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3679,7 +4103,7 @@ if test -z "$ac_cv_prog_STRIP"; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3691,7 +4115,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3732,7 +4156,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3742,7 +4166,7 @@ do test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -3771,7 +4195,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } - mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; @@ -3784,7 +4207,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3796,7 +4219,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3824,7 +4247,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3882,7 +4305,7 @@ fi # Define the identity of the package. PACKAGE='findutils' - VERSION='4.5.10' + VERSION='4.5.14' cat >>confdefs.h <<_ACEOF @@ -3912,11 +4335,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -3932,7 +4355,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -3948,7 +4371,7 @@ fi $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3966,7 +4389,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -3981,7 +4404,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4118,7 +4541,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4130,7 +4553,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4158,7 +4581,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4170,7 +4593,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4211,7 +4634,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4223,7 +4646,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4251,7 +4674,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4264,7 +4687,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -4310,7 +4733,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4322,7 +4745,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4354,7 +4777,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4366,7 +4789,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4409,7 +4832,7 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4524,7 +4947,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -4567,7 +4990,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -4626,7 +5049,7 @@ $as_echo "$ac_try_echo"; } >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -4637,7 +5060,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4678,7 +5101,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -4688,7 +5111,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4725,7 +5148,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -4803,7 +5226,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -4812,8 +5235,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4949,6 +5371,7 @@ fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -4964,7 +5387,7 @@ depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -4973,6 +5396,7 @@ else # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -5032,7 +5456,7 @@ else break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -5099,7 +5523,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -5215,7 +5639,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -5225,229 +5649,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -5461,7 +5667,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -5510,7 +5716,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -5527,7 +5733,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -5575,9 +5781,373 @@ $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 +$as_echo_n "checking for Minix Amsterdam compiler... " >&6; } +if ${gl_cv_c_amsterdam_compiler+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __ACK__ +Amsterdam +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Amsterdam" >/dev/null 2>&1; then : + gl_cv_c_amsterdam_compiler=yes +else + gl_cv_c_amsterdam_compiler=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 +$as_echo "$gl_cv_c_amsterdam_compiler" >&6; } + if test -z "$AR"; then + if test $gl_cv_c_amsterdam_compiler = yes; then + AR='cc -c.a' + if test -z "$ARFLAGS"; then + ARFLAGS='-o' + fi + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="ar" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + + if test -z "$ARFLAGS"; then + ARFLAGS='cru' + fi + fi + else + if test -z "$ARFLAGS"; then + ARFLAGS='cru' + fi + fi + + + if test -z "$RANLIB"; then + if test $gl_cv_c_amsterdam_compiler = yes; then + RANLIB=':' + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + fi + fi + + +if test "x$CC" != xcc; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 +$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 +$as_echo_n "checking whether cc understands -c and -o together... " >&6; } +fi +set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +# Make sure it works both with $CC and with simple cc. +# We do the test twice because some compilers refuse to overwrite an +# existing .o file with -o, though they will create one. +ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' +rm -f conftest2.* +if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; +then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* + if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; + then + # cc works too. + : + else + # cc exists but doesn't like -o. + eval ac_cv_prog_cc_${ac_cc}_c_o=no + fi + fi + fi +else + eval ac_cv_prog_cc_${ac_cc}_c_o=no +fi +rm -f core conftest* + +fi +if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h + +fi + +# FIXME: we rely on the cache variable name because +# there is no other way. +set dummy $CC +am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o +if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5705,10 +6275,8 @@ done - - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = x""yes; then : +if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= @@ -5725,20 +6293,15 @@ $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h - fi - - case "$host_os" in - hpux*) -$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h +$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h - ;; - esac + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : +if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5768,12 +6331,62 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if ${ac_cv_should_define__xopen_source+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_should_define__xopen_source=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + mbstate_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define _XOPEN_SOURCE 500 + #include + mbstate_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_should_define__xopen_source=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +$as_echo "$ac_cv_should_define__xopen_source" >&6; } + test $ac_cv_should_define__xopen_source = yes && + $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h + @@ -5783,7 +6396,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then : +if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -5849,120 +6462,351 @@ $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h fi - case $ac_cv_prog_cc_stdc in #( - no) : - ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( - *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 -$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if test "${ac_cv_prog_cc_c99+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -#include - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -#define debug(...) fprintf (stderr, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - your preprocessor is broken; -#endif -#if BIG_OK -#else - your preprocessor is broken; -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; -struct incomplete_array -{ - int datasize; - double data[]; -}; -struct named_init { - int number; - const wchar_t *name; - double average; -}; + # IEEE behaviour is the default on all CPUs except Alpha and SH + # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 + # and the GCC 4.1.2 manual). + case "$host_cpu" in + alpha*) + # On Alpha systems, a compiler option provides the behaviour. + # See the ieee(3) manual page, also available at + # + if test -n "$GCC"; then + # GCC has the option -mieee. + # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. + CPPFLAGS="$CPPFLAGS -mieee" + else + # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact. + # For full IEEE compliance (rarely needed), use option -ieee_with_inexact. + CPPFLAGS="$CPPFLAGS -ieee" + fi + ;; + sh*) + if test -n "$GCC"; then + # GCC has the option -mieee. + CPPFLAGS="$CPPFLAGS -mieee" + fi + ;; + esac -typedef const char *ccp; +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; -} +if test "$enable_largefile" != no; then -// Check varargs and va_copy. -static void -test_varargs (const char *format, ...) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () { - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str; - int number; - float fnumber; - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg (args_copy, const char *); - break; - case 'd': // int - number = va_arg (args_copy, int); - break; - case 'f': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); + ; + return 0; } +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { - // Check bool. - _Bool success = false; - + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h + +fi + + case $ac_cv_prog_cc_stdc in #( + no) : + ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( + *) : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 +$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +if ${ac_cv_prog_cc_c99+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#include + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static void +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str; + int number; + float fnumber; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); +} + +int +main () +{ + + // Check bool. + _Bool success = false; + // Check restrict. if (test_restrict ("String literal") == 0) success = true; @@ -5999,7 +6843,7 @@ main () return 0; } _ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : @@ -6030,7 +6874,7 @@ if test "x$ac_cv_prog_cc_c99" != xno; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -6039,8 +6883,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -6126,7 +6969,7 @@ fi esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } - if test "${ac_cv_prog_cc_stdc+set}" = set; then : + if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi @@ -6193,49 +7036,63 @@ fi + # Code from module absolute-header: + # Code from module accept: + # Code from module accept-tests: # Code from module alloca: # Code from module alloca-opt: # Code from module alloca-opt-tests: + # Code from module allocator: # Code from module areadlink: # Code from module areadlink-tests: # Code from module areadlink-with-size: # Code from module areadlink-with-size-tests: # Code from module areadlinkat: # Code from module areadlinkat-tests: - # Code from module arg-nonnull: # Code from module argmatch: # Code from module argmatch-tests: + # Code from module arpa_inet: + # Code from module arpa_inet-tests: # Code from module assert: + # Code from module at-internal: # Code from module binary-io: # Code from module binary-io-tests: + # Code from module bind: + # Code from module bind-tests: # Code from module bitrotate: # Code from module bitrotate-tests: # Code from module btowc: # Code from module btowc-tests: - # Code from module c++defs: + # Code from module byteswap: + # Code from module byteswap-tests: # Code from module c-ctype: # Code from module c-ctype-tests: # Code from module c-strcase: # Code from module c-strcase-tests: + # Code from module c-strcaseeq: # Code from module c-strcasestr: # Code from module c-strcasestr-tests: # Code from module c-strstr: # Code from module c-strstr-tests: # Code from module canonicalize: # Code from module canonicalize-tests: + # Code from module careadlinkat: + # Code from module chdir: # Code from module chdir-long: - # Code from module chown: - # Code from module chown-tests: + # Code from module chdir-tests: # Code from module clock-time: # Code from module cloexec: # Code from module cloexec-tests: # Code from module close: - # Code from module close-hook: # Code from module close-stream: + # Code from module close-tests: + # Code from module closedir: # Code from module closein: # Code from module closein-tests: # Code from module closeout: # Code from module configmake: + # Code from module connect: + # Code from module connect-tests: # Code from module ctype: # Code from module ctype-tests: # Code from module cycle-check: @@ -6252,6 +7109,8 @@ fi # Code from module dirname-tests: # Code from module dosname: # Code from module double-slash-root: + # Code from module dup: + # Code from module dup-tests: # Code from module dup2: # Code from module dup2-tests: # Code from module environ: @@ -6263,28 +7122,36 @@ fi # Code from module exitfail: # Code from module extensions: + # Code from module extern-inline: # Code from module faccessat: + # Code from module faccessat-tests: # Code from module fchdir: # Code from module fchdir-tests: - # Code from module fclose: # Code from module fcntl: # Code from module fcntl-h: # Code from module fcntl-h-tests: # Code from module fcntl-safer: # Code from module fcntl-safer-tests: # Code from module fcntl-tests: + # Code from module fd-hook: # Code from module fd-safer-flag: # Code from module fdl: + # Code from module fdopen: + # Code from module fdopen-tests: # Code from module fdopendir: # Code from module fdopendir-tests: # Code from module fflush: # Code from module fflush-tests: + # Code from module fgetc-tests: # Code from module file-set: # Code from module fileblocks: # Code from module filemode: + # Code from module filename: + # Code from module filenamecat-lgpl: # Code from module flexmember: # Code from module float: + # Code from module float-tests: # Code from module fnmatch: # Code from module fnmatch-gnu: # Code from module fnmatch-tests: @@ -6294,22 +7161,38 @@ fi # Code from module fopen-tests: # Code from module fpending: # Code from module fpending-tests: + # Code from module fpieee: + + # Code from module fpucw: # Code from module fpurge: # Code from module fpurge-tests: + # Code from module fputc-tests: + # Code from module fread-tests: # Code from module freadahead: # Code from module freadahead-tests: # Code from module freading: # Code from module freading-tests: + # Code from module fseek: + # Code from module fseek-tests: # Code from module fseeko: # Code from module fseeko-tests: + # Code from module fstat: + # Code from module fstat-tests: + # Code from module fstatat: + # Code from module fstatat-tests: # Code from module ftell: # Code from module ftell-tests: # Code from module ftello: # Code from module ftello-tests: + # Code from module ftruncate: + # Code from module ftruncate-tests: # Code from module fts: + # Code from module fwrite-tests: # Code from module getcwd: + # Code from module getcwd-lgpl: + # Code from module getcwd-lgpl-tests: # Code from module getcwd-tests: # Code from module getdelim: # Code from module getdelim-tests: @@ -6317,6 +7200,8 @@ fi # Code from module getdtablesize-tests: # Code from module getgroups: # Code from module getgroups-tests: + # Code from module gethostname: + # Code from module gethostname-tests: # Code from module getline: # Code from module getline-tests: # Code from module getopt-gnu: @@ -6328,7 +7213,6 @@ fi # Code from module gettime: # Code from module gettimeofday: # Code from module gettimeofday-tests: - # Code from module getugroups: # Code from module gnumakefile: # Code from module gpl-3.0: # Code from module group-member: @@ -6344,23 +7228,43 @@ fi # Code from module ignore-value: # Code from module ignore-value-tests: # Code from module include_next: + # Code from module inet_pton: + # Code from module inet_pton-tests: # Code from module inline: # Code from module intprops: + # Code from module intprops-tests: # Code from module inttostr: # Code from module inttostr-tests: # Code from module inttypes: + # Code from module inttypes-incomplete: # Code from module inttypes-tests: + # Code from module ioctl: + # Code from module ioctl-tests: # Code from module isblank: # Code from module isblank-tests: + # Code from module isfinite: + # Code from module isfinite-tests: + # Code from module isinf: + # Code from module isinf-tests: + # Code from module isnand-nolibm: + # Code from module isnand-nolibm-tests: + # Code from module isnanf-nolibm: + # Code from module isnanf-nolibm-tests: + # Code from module isnanl-nolibm: + # Code from module isnanl-nolibm-tests: # Code from module iswblank: # Code from module iswblank-tests: # Code from module langinfo: # Code from module langinfo-tests: - # Code from module lchown: - # Code from module lchown-tests: + # Code from module largefile: + + # Code from module listen: + # Code from module listen-tests: # Code from module localcharset: # Code from module locale: # Code from module locale-tests: + # Code from module localeconv: + # Code from module localeconv-tests: # Code from module localename: # Code from module localename-tests: # Code from module lock: @@ -6376,6 +7280,7 @@ fi # Code from module malloc-posix: # Code from module malloca: # Code from module malloca-tests: + # Code from module manywarnings: # Code from module math: # Code from module math-tests: # Code from module mbchar: @@ -6397,29 +7302,38 @@ fi # Code from module mempcpy: # Code from module memrchr: # Code from module memrchr-tests: - # Code from module mgetgroups: - # Code from module mkdir: - # Code from module mkdir-tests: # Code from module mktime: # Code from module modechange: # Code from module modf: # Code from module modf-tests: # Code from module mountlist: + # Code from module msvc-inval: + # Code from module msvc-nothrow: # Code from module multiarch: + # Code from module nanosleep: + # Code from module nanosleep-tests: + # Code from module netinet_in: + # Code from module netinet_in-tests: # Code from module nl_langinfo: # Code from module nl_langinfo-tests: + # Code from module nocrash: # Code from module open: # Code from module open-tests: # Code from module openat: # Code from module openat-die: + # Code from module openat-h: # Code from module openat-safer: # Code from module openat-safer-tests: # Code from module openat-tests: + # Code from module opendir: # Code from module parse-datetime: # Code from module parse-datetime-tests: # Code from module pathmax: + # Code from module pathmax-tests: # Code from module perror: # Code from module perror-tests: + # Code from module pipe-posix: + # Code from module pipe-posix-tests: # Code from module priv-set: # Code from module priv-set-tests: # Code from module progname: @@ -6428,6 +7342,11 @@ fi # Code from module quotearg: # Code from module quotearg-simple: # Code from module quotearg-simple-tests: + # Code from module raise: + # Code from module raise-tests: + # Code from module read: + # Code from module read-tests: + # Code from module readdir: # Code from module readlink: # Code from module readlink-tests: # Code from module readlinkat: @@ -6437,32 +7356,63 @@ fi # Code from module realloc-gnu-tests: # Code from module realloc-posix: # Code from module regex: + # Code from module regex-tests: + # Code from module rewinddir: # Code from module rmdir: # Code from module rmdir-tests: + # Code from module root-uid: # Code from module rpmatch: + # Code from module safe-read: # Code from module same: # Code from module same-inode: # Code from module save-cwd: # Code from module savedir: + # Code from module select: + # Code from module select-tests: # Code from module selinux-at: # Code from module selinux-h: # Code from module setenv: # Code from module setenv-tests: # Code from module setlocale: # Code from module setlocale-tests: + # Code from module setsockopt: + # Code from module setsockopt-tests: + # Code from module sigaction: + # Code from module sigaction-tests: + # Code from module signal-h: + # Code from module signal-h-tests: + # Code from module sigprocmask: + # Code from module sigprocmask-tests: # Code from module size_max: # Code from module sleep: # Code from module sleep-tests: + # Code from module snippet/_Noreturn: + # Code from module snippet/arg-nonnull: + # Code from module snippet/c++defs: + # Code from module snippet/unused-parameter: + # Code from module snippet/warn-on-use: # Code from module snprintf: # Code from module snprintf-tests: + # Code from module socket: + # Code from module socketlib: + # Code from module sockets: + # Code from module sockets-tests: + # Code from module socklen: # Code from module ssize_t: # Code from module stat: # Code from module stat-macros: + # Code from module stat-size: # Code from module stat-tests: # Code from module stat-time: # Code from module stat-time-tests: + # Code from module statat: + # Code from module statat-tests: + # Code from module stdalign: + # Code from module stdalign-tests: # Code from module stdarg: + + # Code from module stdbool: # Code from module stdbool-tests: # Code from module stddef: @@ -6481,7 +7431,10 @@ fi # Code from module strdup-posix: # Code from module streq: # Code from module strerror: + # Code from module strerror-override: # Code from module strerror-tests: + # Code from module strerror_r-posix: + # Code from module strerror_r-posix-tests: # Code from module strftime: # Code from module strftime-tests: # Code from module string: @@ -6495,23 +7448,40 @@ fi # Code from module strstr: # Code from module strstr-simple: # Code from module strstr-tests: - # Code from module strtoimax: # Code from module strtol: - # Code from module strtoll: + # Code from module strtol-tests: # Code from module strtoul: + # Code from module strtoul-tests: # Code from module strtoull: + # Code from module strtoull-tests: # Code from module strtoumax: + # Code from module strtoumax-tests: # Code from module symlink: # Code from module symlink-tests: # Code from module symlinkat: # Code from module symlinkat-tests: + # Code from module sys_ioctl: + # Code from module sys_ioctl-tests: + # Code from module sys_select: + # Code from module sys_select-tests: + # Code from module sys_socket: + # Code from module sys_socket-tests: # Code from module sys_stat: # Code from module sys_stat-tests: # Code from module sys_time: # Code from module sys_time-tests: + # Code from module sys_types: + # Code from module sys_types-tests: + # Code from module sys_uio: + # Code from module sys_uio-tests: + # Code from module sys_utsname: + # Code from module sys_utsname-tests: # Code from module sys_wait: # Code from module sys_wait-tests: + # Code from module test-framework-sh: + # Code from module test-framework-sh-tests: # Code from module thread: + # Code from module thread-tests: # Code from module threadlib: @@ -6520,6 +7490,10 @@ fi # Code from module time-tests: # Code from module time_r: # Code from module timespec: + # Code from module trunc: + # Code from module trunc-tests: + # Code from module uname: + # Code from module uname-tests: # Code from module unistd: # Code from module unistd-safer: # Code from module unistd-safer-tests: @@ -6530,15 +7504,14 @@ fi # Code from module uniwidth/width-tests: # Code from module unlink: # Code from module unlink-tests: + # Code from module unlinkat: + # Code from module unlinkat-tests: # Code from module unlinkdir: # Code from module unsetenv: # Code from module unsetenv-tests: - # Code from module unused-parameter: # Code from module update-copyright: # Code from module update-copyright-tests: # Code from module useless-if-before-free: - # Code from module usleep: - # Code from module usleep-tests: # Code from module vasnprintf: # Code from module vasnprintf-tests: # Code from module vc-list-files: @@ -6548,7 +7521,6 @@ fi # Code from module version-etc: # Code from module version-etc-fsf: # Code from module version-etc-tests: - # Code from module warn-on-use: # Code from module warnings: # Code from module wchar: # Code from module wchar-tests: @@ -6563,6 +7535,7 @@ fi # Code from module xalloc: # Code from module xalloc-die: # Code from module xalloc-die-tests: + # Code from module xalloc-oversized: # Code from module xgetcwd: # Code from module xsize: # Code from module xstrndup: @@ -6576,51 +7549,115 @@ fi # Code from module yield: -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 -$as_echo_n "checking for function prototypes... " >&6; } -if test "$ac_cv_prog_cc_c89" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define PROTOTYPES 1" >>confdefs.h - -$as_echo "#define __PROTOTYPES 1" >>confdefs.h +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -if test "$ac_cv_prog_cc_stdc" != no; then - U= ANSI2KNR= -else - U=_ ANSI2KNR=./ansi2knr + test -n "$AR" && break + done fi -# Ensure some checks needed by ansi2knr itself. - -for ac_header in string.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRING_H 1 -_ACEOF +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi - -done +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 + for ac_prog in ranlib + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -6632,8 +7669,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6653,14 +7690,18 @@ $as_echo "no" >&6; } fi + test -n "$RANLIB" && break + done fi -if test -z "$ac_cv_prog_RANLIB"; then +if test -z "$RANLIB"; then ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 + for ac_prog in ranlib +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -6672,8 +7713,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6692,6 +7733,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_RANLIB" && break +done + if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else @@ -6703,15 +7748,13 @@ ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi -else - RANLIB="$ac_cv_prog_RANLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -6747,16 +7790,16 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -6765,8 +7808,8 @@ else incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -6775,16 +7818,16 @@ main () return 0; } _ACEOF - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext - break + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -6798,7 +7841,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -6811,8 +7854,8 @@ else incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -6835,8 +7878,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -6867,7 +7910,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -6880,8 +7923,8 @@ else incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -6904,8 +7947,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -6934,6 +7977,10 @@ _ACEOF esac rm -rf conftest* fi + + +$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h + fi @@ -6942,14 +7989,26 @@ fi + LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6982,7 +8041,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7001,7 +8060,7 @@ else #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -7049,7 +8108,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7090,7 +8149,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -7100,23 +8159,20 @@ else /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -7138,48 +8194,6 @@ _ACEOF fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - GNULIB_BTOWC=0; GNULIB_WCTOB=0; @@ -7276,7 +8290,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uses 'inline' correctly" >&5 $as_echo_n "checking whether uses 'inline' correctly... " >&6; } -if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then : +if ${gl_cv_header_wchar_h_correct_inline+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_header_wchar_h_correct_inline=yes @@ -7370,7 +8384,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${am_cv_langinfo_codeset+set}" = set; then : +if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7406,7 +8420,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } -if test "${gt_cv_locale_fr+set}" = set; then : +if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else @@ -7425,9 +8439,9 @@ char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -7436,7 +8450,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -7462,10 +8476,12 @@ int main () { one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -7483,7 +8499,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the native Win32 locale name. + # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else @@ -7493,7 +8509,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -7543,7 +8559,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 $as_echo_n "checking whether // is distinct from /... " >&6; } -if test "${gl_cv_double_slash_root+set}" = set; then : +if ${gl_cv_double_slash_root+:} false; then : $as_echo_n "(cached) " >&6 else if test x"$cross_compiling" = xyes ; then @@ -7591,21 +8607,142 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5 $as_echo_n "checking whether realpath works... " >&6; } -if test "${gl_cv_func_realpath_works+set}" = set; then : +if ${gl_cv_func_realpath_works+:} false; then : $as_echo_n "(cached) " >&6 else touch conftest.a + mkdir conftest.d if test "$cross_compiling" = yes; then : - gl_cv_func_realpath_works="guessing no" + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_realpath_works="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + +#include +#if defined __MACH__ && defined __APPLE__ +/* Avoid a crash on Mac OS X. */ +#include +#include +#include +#include +#include +#include +/* The exception port on which our thread listens. */ +static mach_port_t our_exception_port; +/* The main function of the thread listening for exceptions of type + EXC_BAD_ACCESS. */ +static void * +mach_exception_thread (void *arg) +{ + /* Buffer for a message to be received. */ + struct { + mach_msg_header_t head; + mach_msg_body_t msgh_body; + char data[1024]; + } msg; + mach_msg_return_t retval; + /* Wait for a message on the exception port. */ + retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), + our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + if (retval != MACH_MSG_SUCCESS) + abort (); + exit (1); +} +static void +nocrash_init (void) +{ + mach_port_t self = mach_task_self (); + /* Allocate a port on which the thread shall listen for exceptions. */ + if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) + == KERN_SUCCESS) { + /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + if (mach_port_insert_right (self, our_exception_port, our_exception_port, + MACH_MSG_TYPE_MAKE_SEND) + == KERN_SUCCESS) { + /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting + for us. */ + exception_mask_t mask = EXC_MASK_BAD_ACCESS; + /* Create the thread listening on the exception port. */ + pthread_attr_t attr; + pthread_t thread; + if (pthread_attr_init (&attr) == 0 + && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 + && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { + pthread_attr_destroy (&attr); + /* Replace the exception port info for these exceptions with our own. + Note that we replace the exception port for the entire task, not only + for a particular thread. This has the effect that when our exception + port gets the message, the thread specific exception port has already + been asked, and we don't need to bother about it. + See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + task_set_exception_ports (self, mask, our_exception_port, + EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); + } + } + } +} +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Avoid a crash on native Windows. */ +#define WIN32_LEAN_AND_MEAN +#include +#include +static LONG WINAPI +exception_filter (EXCEPTION_POINTERS *ExceptionInfo) +{ + switch (ExceptionInfo->ExceptionRecord->ExceptionCode) + { + case EXCEPTION_ACCESS_VIOLATION: + case EXCEPTION_IN_PAGE_ERROR: + case EXCEPTION_STACK_OVERFLOW: + case EXCEPTION_GUARD_PAGE: + case EXCEPTION_PRIV_INSTRUCTION: + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_NONCONTINUABLE_EXCEPTION: + exit (1); + } + return EXCEPTION_CONTINUE_SEARCH; +} +static void +nocrash_init (void) +{ + SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); +} +#else +/* Avoid a crash on POSIX systems. */ +#include +/* A POSIX signal handler. */ +static void +exception_handler (int sig) +{ + exit (1); +} +static void +nocrash_init (void) +{ +#ifdef SIGSEGV + signal (SIGSEGV, exception_handler); +#endif +#ifdef SIGBUS + signal (SIGBUS, exception_handler); +#endif +} +#endif + #include + #include int main () @@ -7627,6 +8764,12 @@ main () if (name != NULL) result |= 4; } + { + char *name1 = realpath (".", NULL); + char *name2 = realpath ("conftest.d//./..", NULL); + if (strcmp (name1, name2) != 0) + result |= 8; + } return result; ; @@ -7643,15 +8786,18 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + rm -rf conftest.a conftest.d fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5 $as_echo "$gl_cv_func_realpath_works" >&6; } - if test "$gl_cv_func_realpath_works" = yes; then + case "$gl_cv_func_realpath_works" in + *yes) $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h - fi + ;; + esac GNULIB__EXIT=0; @@ -7668,12 +8814,16 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h GNULIB_MKOSTEMPS=0; GNULIB_MKSTEMP=0; GNULIB_MKSTEMPS=0; + GNULIB_POSIX_OPENPT=0; GNULIB_PTSNAME=0; + GNULIB_PTSNAME_R=0; GNULIB_PUTENV=0; + GNULIB_RANDOM=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; GNULIB_REALPATH=0; GNULIB_RPMATCH=0; + GNULIB_SECURE_GETENV=0; GNULIB_SETENV=0; GNULIB_STRTOD=0; GNULIB_STRTOLL=0; @@ -7693,11 +8843,15 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h HAVE_MKOSTEMPS=1; HAVE_MKSTEMP=1; HAVE_MKSTEMPS=1; + HAVE_POSIX_OPENPT=1; HAVE_PTSNAME=1; + HAVE_PTSNAME_R=1; + HAVE_RANDOM=1; HAVE_RANDOM_H=1; HAVE_RANDOM_R=1; HAVE_REALPATH=1; HAVE_RPMATCH=1; + HAVE_SECURE_GETENV=1; HAVE_SETENV=1; HAVE_DECL_SETENV=1; HAVE_STRTOD=1; @@ -7712,7 +8866,10 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h REPLACE_MALLOC=0; REPLACE_MBTOWC=0; REPLACE_MKSTEMP=0; + REPLACE_PTSNAME=0; + REPLACE_PTSNAME_R=0; REPLACE_PUTENV=0; + REPLACE_RANDOM_R=0; REPLACE_REALLOC=0; REPLACE_REALPATH=0; REPLACE_SETENV=0; @@ -7721,8 +8878,15 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h REPLACE_WCTOMB=0; + + + + + + GNULIB_CHDIR=0; GNULIB_CHOWN=0; GNULIB_CLOSE=0; + GNULIB_DUP=0; GNULIB_DUP2=0; GNULIB_DUP3=0; GNULIB_ENVIRON=0; @@ -7730,6 +8894,7 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h GNULIB_FACCESSAT=0; GNULIB_FCHDIR=0; GNULIB_FCHOWNAT=0; + GNULIB_FDATASYNC=0; GNULIB_FSYNC=0; GNULIB_FTRUNCATE=0; GNULIB_GETCWD=0; @@ -7741,6 +8906,8 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h GNULIB_GETLOGIN_R=0; GNULIB_GETPAGESIZE=0; GNULIB_GETUSERSHELL=0; + GNULIB_GROUP_MEMBER=0; + GNULIB_ISATTY=0; GNULIB_LCHOWN=0; GNULIB_LINK=0; GNULIB_LINKAT=0; @@ -7749,14 +8916,16 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h GNULIB_PIPE2=0; GNULIB_PREAD=0; GNULIB_PWRITE=0; + GNULIB_READ=0; GNULIB_READLINK=0; GNULIB_READLINKAT=0; GNULIB_RMDIR=0; + GNULIB_SETHOSTNAME=0; GNULIB_SLEEP=0; GNULIB_SYMLINK=0; GNULIB_SYMLINKAT=0; GNULIB_TTYNAME_R=0; - GNULIB_UNISTD_H_GETOPT=0; + GNULIB_UNISTD_H_NONBLOCKING=0; GNULIB_UNISTD_H_SIGPIPE=0; GNULIB_UNLINK=0; GNULIB_UNLINKAT=0; @@ -7769,6 +8938,7 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h HAVE_FACCESSAT=1; HAVE_FCHDIR=1; HAVE_FCHOWNAT=1; + HAVE_FDATASYNC=1; HAVE_FSYNC=1; HAVE_FTRUNCATE=1; HAVE_GETDTABLESIZE=1; @@ -7776,6 +8946,7 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h HAVE_GETHOSTNAME=1; HAVE_GETLOGIN=1; HAVE_GETPAGESIZE=1; + HAVE_GROUP_MEMBER=1; HAVE_LCHOWN=1; HAVE_LINK=1; HAVE_LINKAT=1; @@ -7785,6 +8956,7 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h HAVE_PWRITE=1; HAVE_READLINK=1; HAVE_READLINKAT=1; + HAVE_SETHOSTNAME=1; HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; @@ -7792,10 +8964,12 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h HAVE_USLEEP=1; HAVE_DECL_ENVIRON=1; HAVE_DECL_FCHDIR=1; + HAVE_DECL_FDATASYNC=1; HAVE_DECL_GETDOMAINNAME=1; HAVE_DECL_GETLOGIN_R=1; HAVE_DECL_GETPAGESIZE=1; HAVE_DECL_GETUSERSHELL=1; + HAVE_DECL_SETHOSTNAME=1; HAVE_DECL_TTYNAME_R=1; HAVE_OS_H=0; HAVE_SYS_PARAM_H=0; @@ -7804,17 +8978,21 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h REPLACE_DUP=0; REPLACE_DUP2=0; REPLACE_FCHOWNAT=0; + REPLACE_FTRUNCATE=0; REPLACE_GETCWD=0; REPLACE_GETDOMAINNAME=0; + REPLACE_GETDTABLESIZE=0; REPLACE_GETLOGIN_R=0; REPLACE_GETGROUPS=0; REPLACE_GETPAGESIZE=0; + REPLACE_ISATTY=0; REPLACE_LCHOWN=0; REPLACE_LINK=0; REPLACE_LINKAT=0; REPLACE_LSEEK=0; REPLACE_PREAD=0; REPLACE_PWRITE=0; + REPLACE_READ=0; REPLACE_READLINK=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; @@ -7828,160 +9006,35 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then : - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then - -$as_echo "#define uid_t int" >>confdefs.h -$as_echo "#define gid_t int" >>confdefs.h -fi -for ac_header in unistd.h + for ac_header in $gl_header_list do : - ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" -if test "x$ac_cv_header_unistd_h" = x""yes; then : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_UNISTD_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5 -$as_echo_n "checking for working chown... " >&6; } -if test "${ac_cv_func_chown_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_chown_works=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -#include -int -main () -{ - char *f = "conftest.chown"; - struct stat before, after; - if (creat (f, 0600) < 0) - return 1; - if (stat (f, &before) < 0) - return 1; - if (chown (f, (uid_t) -1, (gid_t) -1) == -1) - return 1; - if (stat (f, &after) < 0) - return 1; - return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_chown_works=yes -else - ac_cv_func_chown_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f conftest.chown -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5 -$as_echo "$ac_cv_func_chown_works" >&6; } -if test $ac_cv_func_chown_works = yes; then -$as_echo "#define HAVE_CHOWN 1" >>confdefs.h -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5 -$as_echo_n "checking whether chown dereferences symlinks... " >&6; } -if test "${gl_cv_func_chown_follows_symlink+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - if test "$cross_compiling" = yes; then : - gl_cv_func_chown_follows_symlink=yes - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include - - int - main () - { - int result = 0; - char const *dangling_symlink = "conftest.dangle"; - - unlink (dangling_symlink); - if (symlink ("conftest.no-such", dangling_symlink)) - abort (); - - /* Exit successfully on a conforming system, - i.e., where chown must fail with ENOENT. */ - if (chown (dangling_symlink, getuid (), getgid ()) == 0) - result |= 1; - if (errno != ENOENT) - result |= 2; - return result; - } - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_chown_follows_symlink=yes -else - gl_cv_func_chown_follows_symlink=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5 -$as_echo "$gl_cv_func_chown_follows_symlink" >&6; } - - if test $gl_cv_func_chown_follows_symlink = no; then - -$as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h - - fi + : @@ -8004,173 +9057,25 @@ $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h + if test $ac_cv_func__set_invalid_parameter_handler = yes; then + HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 - - - - if test $ac_cv_func_chown = no; then - HAVE_CHOWN=0 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" +$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h else - if test $gl_cv_func_chown_follows_symlink = no; then - REPLACE_CHOWN=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" - - fi - - if test $ac_cv_func_chown_works = no; then - -$as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h - - REPLACE_CHOWN=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" - - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5 -$as_echo_n "checking whether chown honors trailing slash... " >&6; } -if test "${gl_cv_func_chown_slash_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - touch conftest.file && rm -f conftest.link - if test "$cross_compiling" = yes; then : - gl_cv_func_chown_slash_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include - -int -main () -{ - if (symlink ("conftest.file", "conftest.link")) return 1; - if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_chown_slash_works=yes -else - gl_cv_func_chown_slash_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -f conftest.link conftest.file -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5 -$as_echo "$gl_cv_func_chown_slash_works" >&6; } - if test "$gl_cv_func_chown_slash_works" != yes; then - -$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h - - REPLACE_CHOWN=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" - - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5 -$as_echo_n "checking whether chown always updates ctime... " >&6; } -if test "${gl_cv_func_chown_ctime_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_chown_ctime_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#include -#include - -int -main () -{ - struct stat st1, st2; - if (close (creat ("conftest.file", 0600))) return 1; - if (stat ("conftest.file", &st1)) return 2; - sleep (1); - if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3; - if (stat ("conftest.file", &st2)) return 4; - if (st2.st_ctime <= st1.st_ctime) return 5; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_chown_ctime_works=yes -else - gl_cv_func_chown_ctime_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -f conftest.file -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5 -$as_echo "$gl_cv_func_chown_ctime_works" >&6; } - if test "$gl_cv_func_chown_ctime_works" != yes; then - -$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h - - REPLACE_CHOWN=1 - - - + HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 + fi + GNULIB_IOCTL=0; + SYS_IOCTL_H_HAVE_WINSOCK2_H=0; + SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + REPLACE_IOCTL=0; - gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" - fi - if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then @@ -8179,10 +9084,28 @@ $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext" - fi - fi + GNULIB_OPENDIR=0; + GNULIB_READDIR=0; + GNULIB_REWINDDIR=0; + GNULIB_CLOSEDIR=0; + GNULIB_DIRFD=0; + GNULIB_FDOPENDIR=0; + GNULIB_SCANDIR=0; + GNULIB_ALPHASORT=0; + HAVE_OPENDIR=1; + HAVE_READDIR=1; + HAVE_REWINDDIR=1; + HAVE_CLOSEDIR=1; + HAVE_DECL_DIRFD=1; + HAVE_DECL_FDOPENDIR=1; + HAVE_FDOPENDIR=1; + HAVE_SCANDIR=1; + HAVE_ALPHASORT=1; + REPLACE_OPENDIR=0; + REPLACE_CLOSEDIR=0; + REPLACE_DIRFD=0; + REPLACE_FDOPENDIR=0; GNULIB_ISBLANK=0; @@ -8192,7 +9115,7 @@ $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } -if test "${gl_cv_have_include_next+set}" = set; then : +if ${gl_cv_have_include_next+:} false; then : $as_echo_n "(cached) " >&6 else rm -rf conftestd1a conftestd1b conftestd2 @@ -8272,7 +9195,7 @@ $as_echo "$gl_cv_have_include_next" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 $as_echo_n "checking whether system header files limit the line length... " >&6; } -if test "${gl_cv_pragma_columns+set}" = set; then : +if ${gl_cv_pragma_columns+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8303,40 +9226,6 @@ $as_echo "$gl_cv_pragma_columns" >&6; } - GNULIB_DIRFD=0; - GNULIB_FDOPENDIR=0; - GNULIB_SCANDIR=0; - GNULIB_ALPHASORT=0; - HAVE_DECL_DIRFD=1; - HAVE_DECL_FDOPENDIR=1; - HAVE_FDOPENDIR=1; - HAVE_SCANDIR=1; - HAVE_ALPHASORT=1; - REPLACE_CLOSEDIR=0; - REPLACE_DIRFD=0; - REPLACE_FDOPENDIR=0; - REPLACE_OPENDIR=0; - - - - - - for ac_header in $gl_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - @@ -8352,40 +9241,10 @@ done - gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext" - - - - - - - - - - + : @@ -8395,13 +9254,18 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 $as_echo_n "checking if environ is properly declared... " >&6; } - if test "${gt_cv_var_environ_declaration+set}" = set; then : + if ${gt_cv_var_environ_declaration+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if HAVE_UNISTD_H + #include + #endif + /* mingw, BeOS, Haiku declare environ in , not in . */ + #include + extern struct { int foo; } environ; int main () @@ -8436,7 +9300,7 @@ $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 $as_echo_n "checking for complete errno.h... " >&6; } -if test "${gl_cv_header_errno_h_complete+set}" = set; then : +if ${gl_cv_header_errno_h_complete+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8444,6 +9308,9 @@ else /* end confdefs.h. */ #include +#if !defined ETXTBSY +booboo +#endif #if !defined ENOMSG booboo #endif @@ -8468,6 +9335,12 @@ booboo #if !defined ENOTSUP booboo #endif +#if !defined ENETRESET +booboo +#endif +#if !defined ECONNABORTED +booboo +#endif #if !defined ESTALE booboo #endif @@ -8477,6 +9350,15 @@ booboo #if !defined ECANCELED booboo #endif +#if !defined EOWNERDEAD +booboo +#endif +#if !defined ENOTRECOVERABLE +booboo +#endif +#if !defined EILSEQ +booboo +#endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -8507,26 +9389,44 @@ $as_echo "$gl_cv_header_errno_h_complete" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_errno_h+set}" = set; then : +if ${gl_cv_next_errno_h+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/errno.h#{ - s#.*"\(.*/errno.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'errno.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_errno_h + gl_cv_next_errno_h='"'$gl_header'"' fi @@ -8550,11 +9450,19 @@ $as_echo "$gl_cv_next_errno_h" >&6; } ERRNO_H='errno.h' fi + if test -n "$ERRNO_H"; then + GL_GENERATE_ERRNO_H_TRUE= + GL_GENERATE_ERRNO_H_FALSE='#' +else + GL_GENERATE_ERRNO_H_TRUE='#' + GL_GENERATE_ERRNO_H_FALSE= +fi + if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 $as_echo_n "checking for EMULTIHOP value... " >&6; } -if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then : +if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8625,7 +9533,7 @@ $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 $as_echo_n "checking for ENOLINK value... " >&6; } -if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then : +if ${gl_cv_header_errno_h_ENOLINK+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8696,7 +9604,7 @@ $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } if test -n "$ERRNO_H"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 $as_echo_n "checking for EOVERFLOW value... " >&6; } -if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then : +if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8765,7 +9673,7 @@ $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_strerror_r" = x""yes; then : +if test "x$ac_cv_have_decl_strerror_r" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -8778,7 +9686,7 @@ _ACEOF for ac_func in strerror_r do : ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" -if test "x$ac_cv_func_strerror_r" = x""yes; then : +if test "x$ac_cv_func_strerror_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRERROR_R 1 _ACEOF @@ -8788,7 +9696,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 $as_echo_n "checking whether strerror_r returns char *... " >&6; } -if test "${ac_cv_func_strerror_r_char_p+set}" = set; then : +if ${ac_cv_func_strerror_r_char_p+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8864,27 +9772,39 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then +$as_echo "#define uid_t int" >>confdefs.h +$as_echo "#define gid_t int" >>confdefs.h - ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default" -if test "x$ac_cv_have_decl_setregid" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SETREGID $ac_have_decl -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 $as_echo_n "checking type of array argument to getgroups... " >&6; } -if test "${ac_cv_type_getgroups+set}" = set; then : +if ${ac_cv_type_getgroups+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -8949,117 +9869,25 @@ cat >>confdefs.h <<_ACEOF _ACEOF -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" -if test "x$ac_cv_func_getgroups" = x""yes; then : -fi -# If we don't yet have getgroups, see if it's in -lbsd. -# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. -ac_save_LIBS=$LIBS -if test $ac_cv_func_getgroups = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 -$as_echo_n "checking for getgroups in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_getgroups+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getgroups (); -int -main () -{ -return getgroups (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_bsd_getgroups=yes + ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" +if test "x$ac_cv_have_decl_fchdir" = xyes; then : + ac_have_decl=1 else - ac_cv_lib_bsd_getgroups=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5 -$as_echo "$ac_cv_lib_bsd_getgroups" >&6; } -if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then : - GETGROUPS_LIB=-lbsd -fi - + ac_have_decl=0 fi -# Run the program to test the functionality of the system-supplied -# getgroups function only if there is such a function. -if test $ac_cv_func_getgroups = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 -$as_echo_n "checking for working getgroups... " >&6; } -if test "${ac_cv_func_getgroups_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_getgroups_works=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -/* On Ultrix 4.3, getgroups (0, 0) always fails. */ - return getgroups (0, 0) == -1; - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FCHDIR $ac_have_decl _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_getgroups_works=yes -else - ac_cv_func_getgroups_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 -$as_echo "$ac_cv_func_getgroups_works" >&6; } -else - ac_cv_func_getgroups_works=no -fi -if test $ac_cv_func_getgroups_works = yes; then - -$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h -fi -LIBS=$ac_save_LIBS GNULIB_FCNTL=0; + GNULIB_NONBLOCKING=0; GNULIB_OPEN=0; GNULIB_OPENAT=0; HAVE_FCNTL=1; @@ -9069,263 +9897,186 @@ LIBS=$ac_save_LIBS REPLACE_OPENAT=0; - GNULIB_FCHMODAT=0; - GNULIB_FSTATAT=0; - GNULIB_FUTIMENS=0; - GNULIB_LCHMOD=0; - GNULIB_LSTAT=0; - GNULIB_MKDIRAT=0; - GNULIB_MKFIFO=0; - GNULIB_MKFIFOAT=0; - GNULIB_MKNOD=0; - GNULIB_MKNODAT=0; - GNULIB_STAT=0; - GNULIB_UTIMENSAT=0; - HAVE_FCHMODAT=1; - HAVE_FSTATAT=1; - HAVE_FUTIMENS=1; - HAVE_LCHMOD=1; - HAVE_LSTAT=1; - HAVE_MKDIRAT=1; - HAVE_MKFIFO=1; - HAVE_MKFIFOAT=1; - HAVE_MKNOD=1; - HAVE_MKNODAT=1; - HAVE_UTIMENSAT=1; - REPLACE_FSTAT=0; - REPLACE_FSTATAT=0; - REPLACE_FUTIMENS=0; - REPLACE_LSTAT=0; - REPLACE_MKDIR=0; - REPLACE_MKFIFO=0; - REPLACE_MKNOD=0; - REPLACE_STAT=0; - REPLACE_UTIMENSAT=0; - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f conftest.sym conftest.file - echo >conftest.file - if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : - # When cross-compiling, be pessimistic so we will end up using the - # replacement version of lstat that checks for trailing slashes and - # calls lstat a second time when necessary. - ac_cv_func_lstat_dereferences_slashed_symlink=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_lstat_dereferences_slashed_symlink=yes -else - ac_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - else - # If the 'ln -s' command failed, then we probably don't even - # have an lstat function. - ac_cv_func_lstat_dereferences_slashed_symlink=no - fi - rm -f conftest.sym conftest.file -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } - test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 -_ACEOF - if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then + : - gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" + : - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5 -$as_echo_n "checking whether unlink honors trailing slashes... " >&6; } -if test "${gl_cv_func_unlink_honors_slashes+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 +$as_echo_n "checking for working fcntl.h... " >&6; } +if ${gl_cv_header_working_fcntl_h+:} false; then : $as_echo_n "(cached) " >&6 else - touch conftest.file - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.file conftest.lnk - fi - if test "$cross_compiling" = yes; then : - gl_cv_func_unlink_honors_slashes="guessing no" + if test "$cross_compiling" = yes; then : + gl_cv_header_working_fcntl_h=cross-compiling else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include +#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + # defined sleep(n) _sleep ((n) * 1000) + #endif + #include + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; int main () { -int result = 0; - if (!unlink ("conftest.file/")) - result |= 1; - else if (errno != ENOTDIR) - result |= 2; -#if HAVE_LSTAT - if (!unlink ("conftest.lnk/")) - result |= 4; - else if (errno != ENOTDIR) - result |= 8; -#endif - return result; + int result = !constants; + #if HAVE_SYMLINK + { + static char const sym[] = "conftest.sym"; + 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 + { + int fd = open (sym, O_RDONLY | O_NOFOLLOW); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + unlink (sym); + } + #endif + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + if (fd < 0) + result |= 8; + else + { + struct stat st0; + if (fstat (fd, &st0) != 0) + result |= 16; + else + { + char c; + sleep (1); + if (read (fd, &c, 1) != 1) + result |= 24; + else + { + if (close (fd) != 0) + result |= 32; + else + { + struct stat st1; + if (stat (file, &st1) != 0) + result |= 40; + else + if (st0.st_atime != st1.st_atime) + result |= 64; + } + } + } + } + } + return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_unlink_honors_slashes=yes + gl_cv_header_working_fcntl_h=yes else - gl_cv_func_unlink_honors_slashes=no + case $? in #( + 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -f conftest.file conftest.lnk fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5 -$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5 -$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; } -if test "${gl_cv_func_unlink_parent_fails+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case "$host_os" in - darwin*) - if { - # Use the mktemp program if available. If not available, hide the error - # message. - tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" - } || - { - # Use a simple mkdir command. It is guaranteed to fail if the directory - # already exists. $RANDOM is bash specific and expands to empty in shells - # other than bash, ksh and zsh. Its use does not increase security; - # rather, it minimizes the probability of failure in a very cluttered /tmp - # directory. - tmp=/tmp/gt$$-$RANDOM - (umask 077 && mkdir "$tmp") - }; then - mkdir "$tmp/subdir" - GL_SUBDIR_FOR_UNLINK="$tmp/subdir" - export GL_SUBDIR_FOR_UNLINK - if test "$cross_compiling" = yes; then : - gl_cv_func_unlink_parent_fails="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 +$as_echo "$gl_cv_header_working_fcntl_h" >&6; } - #include - #include - int main () - { - int result = 0; - if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0) - result |= 1; - else if (unlink ("..") == 0) - result |= 2; - return result; - } + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac +cat >>confdefs.h <<_ACEOF +#define HAVE_WORKING_O_NOATIME $ac_val _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_unlink_parent_fails=yes -else - gl_cv_func_unlink_parent_fails=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - unset GL_SUBDIR_FOR_UNLINK - rm -rf "$tmp" - else - gl_cv_func_unlink_parent_fails="guessing no" - fi - ;; - *) - gl_cv_func_unlink_parent_fails="guessing yes" - ;; - esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5 -$as_echo "$gl_cv_func_unlink_parent_fails" >&6; } - case "$gl_cv_func_unlink_parent_fails" in - *no) -$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h - ;; + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; esac - if test "$gl_cv_func_unlink_honors_slashes" != yes \ - || { case "$gl_cv_func_unlink_parent_fails" in - *yes) false;; - *no) true;; - esac - }; then - REPLACE_UNLINK=1 - - - +cat >>confdefs.h <<_ACEOF +#define HAVE_WORKING_O_NOFOLLOW $ac_val +_ACEOF +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : +else - gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext" +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF - fi +fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = x""yes; then : +if test "x$ac_cv_type_mode_t" = xyes; then : else @@ -9339,7 +10090,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 $as_echo_n "checking for promoted mode_t type... " >&6; } -if test "${gl_cv_promoted_mode_t+set}" = set; then : +if ${gl_cv_promoted_mode_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -9371,341 +10122,33 @@ _ACEOF - - GNULIB_OPENAT=1 - - - GNULIB_FCHMODAT=1 - GNULIB_FSTATAT=1 - GNULIB_MKDIRAT=1 - - - GNULIB_FCHOWNAT=1 - GNULIB_UNLINKAT=1 - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" - - - - : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - for ac_func in fchmodat fstatat mkdirat openat unlinkat -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - -fi -done - - - - - case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in - yes+yes) - # GNU/Hurd has unlinkat, but it has the same bug as unlink. - if test $REPLACE_UNLINK = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" - - REPLACE_UNLINKAT=1 - fi ;; - yes+*) - # Solaris 9 has *at functions, but uniformly mishandles trailing - # slash in all of them. - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" - - REPLACE_OPENAT=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" - - REPLACE_FSTATAT=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" - - REPLACE_UNLINKAT=1 - ;; - *) - HAVE_OPENAT=0 - HAVE_UNLINKAT=0 # No known system with unlinkat but not openat - HAVE_FSTATAT=0 # No known system with fstatat but not openat - - - - : -;; - esac - if test $ac_cv_func_fchmodat != yes; then - HAVE_FCHMODAT=0 - fi - if test $ac_cv_func_mkdirat != yes; then - HAVE_MKDIRAT=0 - fi - - - - ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat" -if test "x$ac_cv_func_fchownat" = x""yes; then : - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 -$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; } -if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - gl_dangle=conftest.dangle - # Remove any remnants of a previous test. - rm -f $gl_dangle - # Arrange for deletion of the temporary file this test creates. - ac_clean_files="$ac_clean_files $gl_dangle" - ln -s conftest.no-such $gl_dangle - if test "$cross_compiling" = yes; then : - gl_cv_func_fchownat_nofollow_works=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#include -#include -int -main () -{ - return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), - AT_SYMLINK_NOFOLLOW) != 0 - && errno == ENOENT); -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fchownat_nofollow_works=yes -else - gl_cv_func_fchownat_nofollow_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5 -$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; } - if test $gl_cv_func_fchownat_nofollow_works = no; then : - REPLACE_FCHOWNAT=1 - -$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h - - -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5 -$as_echo_n "checking whether fchownat works with an empty file name... " >&6; } -if test "${gl_cv_func_fchownat_empty_filename_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_fchownat_empty_filename_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - -int -main () -{ -int fd; - int ret; - if (mkdir ("conftestdir", 0700) < 0) - return 2; - fd = open ("conftestdir", O_RDONLY); - if (fd < 0) - return 3; - ret = fchownat (fd, "", -1, -1, 0); - close (fd); - rmdir ("conftestdir"); - return ret == 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fchownat_empty_filename_works=yes -else - gl_cv_func_fchownat_empty_filename_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5 -$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; } - if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then : - REPLACE_FCHOWNAT=1 - -$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h - - -fi - - if test $REPLACE_CHOWN = 1; then - REPLACE_FCHOWNAT=1 - fi -else - HAVE_FCHOWNAT=0 -fi - - if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" - - fi - - - - - - - - - ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" -if test "x$ac_cv_have_decl_fchdir" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FCHDIR $ac_have_decl -_ACEOF - - - - - - - - GNULIB_DPRINTF=0; GNULIB_FCLOSE=0; + GNULIB_FDOPEN=0; GNULIB_FFLUSH=0; + GNULIB_FGETC=0; + GNULIB_FGETS=0; GNULIB_FOPEN=0; GNULIB_FPRINTF=0; GNULIB_FPRINTF_POSIX=0; GNULIB_FPURGE=0; GNULIB_FPUTC=0; GNULIB_FPUTS=0; + GNULIB_FREAD=0; GNULIB_FREOPEN=0; + GNULIB_FSCANF=0; GNULIB_FSEEK=0; GNULIB_FSEEKO=0; GNULIB_FTELL=0; GNULIB_FTELLO=0; GNULIB_FWRITE=0; + GNULIB_GETC=0; + GNULIB_GETCHAR=0; GNULIB_GETDELIM=0; GNULIB_GETLINE=0; GNULIB_OBSTACK_PRINTF=0; GNULIB_OBSTACK_PRINTF_POSIX=0; + GNULIB_PCLOSE=0; GNULIB_PERROR=0; GNULIB_POPEN=0; GNULIB_PRINTF=0; @@ -9716,11 +10159,15 @@ _ACEOF GNULIB_REMOVE=0; GNULIB_RENAME=0; GNULIB_RENAMEAT=0; + GNULIB_SCANF=0; GNULIB_SNPRINTF=0; GNULIB_SPRINTF_POSIX=0; + GNULIB_STDIO_H_NONBLOCKING=0; GNULIB_STDIO_H_SIGPIPE=0; GNULIB_TMPFILE=0; GNULIB_VASPRINTF=0; + GNULIB_VFSCANF=0; + GNULIB_VSCANF=0; GNULIB_VDPRINTF=0; GNULIB_VFPRINTF=0; GNULIB_VFPRINTF_POSIX=0; @@ -9739,11 +10186,14 @@ _ACEOF HAVE_DPRINTF=1; HAVE_FSEEKO=1; HAVE_FTELLO=1; + HAVE_PCLOSE=1; + HAVE_POPEN=1; HAVE_RENAMEAT=1; HAVE_VASPRINTF=1; HAVE_VDPRINTF=1; REPLACE_DPRINTF=0; REPLACE_FCLOSE=0; + REPLACE_FDOPEN=0; REPLACE_FFLUSH=0; REPLACE_FOPEN=0; REPLACE_FPRINTF=0; @@ -9764,6 +10214,7 @@ _ACEOF REPLACE_RENAMEAT=0; REPLACE_SNPRINTF=0; REPLACE_SPRINTF=0; + REPLACE_STDIO_READ_FUNCS=0; REPLACE_STDIO_WRITE_FUNCS=0; REPLACE_TMPFILE=0; REPLACE_VASPRINTF=0; @@ -9773,173 +10224,9 @@ _ACEOF REPLACE_VSNPRINTF=0; REPLACE_VSPRINTF=0; - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 -$as_echo_n "checking for working fcntl.h... " >&6; } -if test "${gl_cv_header_working_fcntl_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_header_working_fcntl_h=cross-compiling -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include - #include - #ifndef O_NOATIME - #define O_NOATIME 0 - #endif - #ifndef O_NOFOLLOW - #define O_NOFOLLOW 0 - #endif - static int const constants[] = - { - O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, - O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY - }; - -int -main () -{ - - int result = !constants; - { - static char const sym[] = "conftest.sym"; - if (symlink (".", sym) != 0) - result |= 2; - else - { - int fd = open (sym, O_RDONLY | O_NOFOLLOW); - if (fd >= 0) - { - close (fd); - result |= 4; - } - } - unlink (sym); - } - { - static char const file[] = "confdefs.h"; - int fd = open (file, O_RDONLY | O_NOATIME); - if (fd < 0) - result |= 8; - else - { - struct stat st0; - if (fstat (fd, &st0) != 0) - result |= 16; - else - { - char c; - sleep (1); - if (read (fd, &c, 1) != 1) - result |= 24; - else - { - if (close (fd) != 0) - result |= 32; - else - { - struct stat st1; - if (stat (file, &st1) != 0) - result |= 40; - else - if (st0.st_atime != st1.st_atime) - result |= 64; - } - } - } - } - } - return result; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_header_working_fcntl_h=yes -else - case $? in #( - 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( - 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( - 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( - *) gl_cv_header_working_fcntl_h='no';; - esac -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 -$as_echo "$gl_cv_header_working_fcntl_h" >&6; } - - case $gl_cv_header_working_fcntl_h in #( - *O_NOATIME* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - -cat >>confdefs.h <<_ACEOF -#define HAVE_WORKING_O_NOATIME $ac_val -_ACEOF - - - case $gl_cv_header_working_fcntl_h in #( - *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - -cat >>confdefs.h <<_ACEOF -#define HAVE_WORKING_O_NOFOLLOW $ac_val -_ACEOF - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5 -$as_echo_n "checking for fseeko... " >&6; } -if test "${gl_cv_func_fseeko+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -fseeko (stdin, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_fseeko=yes -else - gl_cv_func_fseeko=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5 -$as_echo "$gl_cv_func_fseeko" >&6; } - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } -if test "${ac_cv_struct_st_dm_mode+set}" = set; then : +if ${ac_cv_struct_st_dm_mode+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9974,7 +10261,7 @@ $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" -if test "x$ac_cv_have_decl_strmode" = x""yes; then : +if test "x$ac_cv_have_decl_strmode" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -9987,9 +10274,14 @@ _ACEOF + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } -if test "${ac_cv_type_mbstate_t+set}" = set; then : +if ${ac_cv_type_mbstate_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10091,14 +10383,9 @@ $as_echo "#define mbstate_t int" >>confdefs.h - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; } -if test "${gl_cv_var_stdin_large_offset+set}" = set; then : +if ${gl_cv_var_stdin_large_offset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10132,29 +10419,51 @@ fi $as_echo "$gl_cv_var_stdin_large_offset" >&6; } - ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" -if test "x$ac_cv_have_decl_fseeko" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FSEEKO $ac_have_decl -_ACEOF + case "$host_os" in + mingw*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 +$as_echo_n "checking for 64-bit off_t... " >&6; } +if ${gl_cv_type_off_t_64+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; + +int +main () +{ - ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" -if test "x$ac_cv_have_decl_ftello" = x""yes; then : - ac_have_decl=1 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_off_t_64=yes else - ac_have_decl=0 + gl_cv_type_off_t_64=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FTELLO $ac_have_decl -_ACEOF +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 +$as_echo "$gl_cv_type_off_t_64" >&6; } + if test $gl_cv_type_off_t_64 = no; then + WINDOWS_64_BIT_OFF_T=1 + else + WINDOWS_64_BIT_OFF_T=0 + fi + WINDOWS_64_BIT_ST_SIZE=1 + ;; + *) + WINDOWS_64_BIT_OFF_T=0 + WINDOWS_64_BIT_ST_SIZE=0 + ;; + esac @@ -10168,95 +10477,90 @@ _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5 -$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; } -if test "${gl_cv_func_getcwd_null+set}" = set; then : + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_types_h='<'sys/types.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_types_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_getcwd_null="guessing yes";; - # Guess yes on Cygwin. - cygwin*) gl_cv_func_getcwd_null="guessing yes";; - # Guess yes on mingw. - mingw*) gl_cv_func_getcwd_null="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_getcwd_null="guessing no";; - esac -else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac -# include -# ifndef getcwd - char *getcwd (); -# endif + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/types.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' -int -main () -{ + gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* mingw cwd does not start with '/', but getcwd does allocate. */ -#else - if (chdir ("/") != 0) - return 1; - else - { - char *f = getcwd (NULL, 0); - if (! f) - return 2; - if (f[0] != '/') - return 3; - if (f[1] != '\0') - return 4; - return 0; - } -#endif + gl_header=$gl_cv_absolute_sys_types_h + gl_cv_next_sys_types_h='"'$gl_header'"' - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getcwd_null=yes -else - gl_cv_func_getcwd_null=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5 -$as_echo "$gl_cv_func_getcwd_null" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 +$as_echo "$gl_cv_next_sys_types_h" >&6; } + fi + NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/types.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_types_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive - ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" -if test "x$ac_cv_have_decl_getcwd" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETCWD $ac_have_decl -_ACEOF - ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" -if test "x$ac_cv_have_decl_getdelim" = x""yes; then : + + + + + + + + ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" +if test "x$ac_cv_have_decl_fseeko" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETDELIM $ac_have_decl +#define HAVE_DECL_FSEEKO $ac_have_decl _ACEOF @@ -10268,19 +10572,234 @@ _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5 +$as_echo_n "checking for fseeko... " >&6; } +if ${gl_cv_func_fseeko+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +fseeko (stdin, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_fseeko=yes +else + gl_cv_func_fseeko=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5 +$as_echo "$gl_cv_func_fseeko" >&6; } - ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" -if test "x$ac_cv_have_decl_getline" = x""yes; then : - ac_have_decl=1 + : + + + + + + if test $ac_cv_have_decl_fseeko = no; then + HAVE_DECL_FSEEKO=0 + fi + + if test $gl_cv_func_fseeko = no; then + HAVE_FSEEKO=0 + else + if test $WINDOWS_64_BIT_OFF_T = 1; then + REPLACE_FSEEKO=1 + fi + if test $gl_cv_var_stdin_large_offset = no; then + REPLACE_FSEEKO=1 + fi + + + + : + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5 +$as_echo_n "checking whether fflush works on input streams... " >&6; } +if ${gl_cv_func_fflush_stdin+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_have_decl=0 + echo hello world > conftest.txt + if test "$cross_compiling" = yes; then : + gl_cv_func_fflush_stdin=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#if HAVE_UNISTD_H +# include +#else /* on Windows with MSVC */ +# include +#endif + +int +main () +{ +FILE *f = fopen ("conftest.txt", "r"); + char buffer[10]; + int fd; + int c; + if (f == NULL) + return 1; + fd = fileno (f); + if (fd < 0 || fread (buffer, 1, 5, f) != 5) + return 2; + /* For deterministic results, ensure f read a bigger buffer. */ + if (lseek (fd, 0, SEEK_CUR) == 5) + return 3; + /* POSIX requires fflush-fseek to set file offset of fd. This fails + on BSD systems and on mingw. */ + if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) + return 4; + if (lseek (fd, 0, SEEK_CUR) != 5) + return 5; + /* Verify behaviour of fflush after ungetc. See + */ + /* Verify behaviour of fflush after a backup ungetc. This fails on + mingw. */ + c = fgetc (f); + ungetc (c, f); + fflush (f); + if (fgetc (f) != c) + return 6; + /* Verify behaviour of fflush after a non-backup ungetc. This fails + on glibc 2.8 and on BSD systems. */ + c = fgetc (f); + ungetc ('@', f); + fflush (f); + if (fgetc (f) != c) + return 7; + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_fflush_stdin=yes +else + gl_cv_func_fflush_stdin=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + rm conftest.txt + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5 +$as_echo "$gl_cv_func_fflush_stdin" >&6; } + case $gl_cv_func_fflush_stdin in + yes) gl_func_fflush_stdin=1 ;; + no) gl_func_fflush_stdin=0 ;; + *) gl_func_fflush_stdin='(-1)' ;; + esac cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETLINE $ac_have_decl +#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin +_ACEOF + + + if test $gl_cv_func_fflush_stdin != yes; then + REPLACE_FSEEKO=1 + fi + + fi + + + GNULIB_FCHMODAT=0; + GNULIB_FSTAT=0; + GNULIB_FSTATAT=0; + GNULIB_FUTIMENS=0; + GNULIB_LCHMOD=0; + GNULIB_LSTAT=0; + GNULIB_MKDIRAT=0; + GNULIB_MKFIFO=0; + GNULIB_MKFIFOAT=0; + GNULIB_MKNOD=0; + GNULIB_MKNODAT=0; + GNULIB_STAT=0; + GNULIB_UTIMENSAT=0; + HAVE_FCHMODAT=1; + HAVE_FSTATAT=1; + HAVE_FUTIMENS=1; + HAVE_LCHMOD=1; + HAVE_LSTAT=1; + HAVE_MKDIRAT=1; + HAVE_MKFIFO=1; + HAVE_MKFIFOAT=1; + HAVE_MKNOD=1; + HAVE_MKNODAT=1; + HAVE_UTIMENSAT=1; + REPLACE_FSTAT=0; + REPLACE_FSTATAT=0; + REPLACE_FUTIMENS=0; + REPLACE_LSTAT=0; + REPLACE_MKDIR=0; + REPLACE_MKFIFO=0; + REPLACE_MKNOD=0; + REPLACE_STAT=0; + REPLACE_UTIMENSAT=0; + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 +$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } +if ${ac_cv_header_stat_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include + +#if defined S_ISBLK && defined S_IFDIR +extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; +#endif + +#if defined S_ISBLK && defined S_IFCHR +extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; +#endif + +#if defined S_ISLNK && defined S_IFREG +extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; +#endif + +#if defined S_ISSOCK && defined S_IFREG +extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; +#endif + _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stat_broken=no +else + ac_cv_header_stat_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 +$as_echo "$ac_cv_header_stat_broken" >&6; } +if test $ac_cv_header_stat_broken = yes; then + +$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h + +fi @@ -10308,400 +10827,202 @@ _ACEOF if test $gl_cv_have_include_next = yes; then - gl_cv_next_getopt_h='<'getopt.h'>' + gl_cv_next_sys_stat_h='<'sys/stat.h'>' else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_getopt_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_stat_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_getopt_h = yes; then + if test $ac_cv_header_sys_stat_h = yes; then + - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/getopt.h#{ - s#.*"\(.*/getopt.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/stat.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_stat_h + gl_cv_next_sys_stat_h='"'$gl_header'"' else - gl_cv_next_getopt_h='<'getopt.h'>' + gl_cv_next_sys_stat_h='<'sys/stat.h'>' fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 -$as_echo "$gl_cv_next_getopt_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 +$as_echo "$gl_cv_next_sys_stat_h" >&6; } fi - NEXT_GETOPT_H=$gl_cv_next_getopt_h + NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'getopt.h'>' + gl_next_as_first_directive='<'sys/stat.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_getopt_h + gl_next_as_first_directive=$gl_cv_next_sys_stat_h fi - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive - if test $ac_cv_header_getopt_h = yes; then - HAVE_GETOPT_H=1 - else - HAVE_GETOPT_H=0 - fi - gl_replace_getopt= - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - for ac_header in getopt.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_H 1 -_ACEOF -else - gl_replace_getopt=yes -fi -done + + + if test $WINDOWS_64_BIT_ST_SIZE = 1; then + +$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h fi - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - for ac_func in getopt_long_only -do : - ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" -if test "x$ac_cv_func_getopt_long_only" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_LONG_ONLY 1 -_ACEOF + ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include + #include +" +if test "x$ac_cv_type_nlink_t" = xyes; then : else - gl_replace_getopt=yes + +$as_echo "#define nlink_t int" >>confdefs.h + fi -done - fi - if test -z "$gl_replace_getopt"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 -$as_echo_n "checking whether getopt is POSIX compatible... " >&6; } -if test "${gl_cv_func_getopt_posix+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int *p = &optreset; return optreset; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_optind_min=1 + for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + int main () { -return !getopt_clip; +#undef $gl_func + (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_optind_min=1 + eval "$as_gl_Symbol=yes" else - gl_optind_min=0 + eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - gl_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" - if test "$cross_compiling" = yes; then : - 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 - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include - -int -main () -{ - { - int argc = 0; - char *argv[10]; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = OPTIND_MIN; - opterr = 0; - - c = getopt (argc, argv, "ab"); - if (!(c == 'a')) - return 1; - c = getopt (argc, argv, "ab"); - if (!(c == -1)) - return 2; - if (!(optind == 2)) - return 3; - } - /* Some internal state exists at this point. */ - { - int argc = 0; - char *argv[10]; - int c; - - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = OPTIND_MIN; - opterr = 0; - - c = getopt (argc, 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. */ - { - 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; - } - - return 0; -} - +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getopt_posix=yes -else - gl_cv_func_getopt_posix=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + + eval ac_cv_have_decl_$gl_func=yes fi + done - CPPFLAGS=$gl_save_CPPFLAGS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 -$as_echo "$gl_cv_func_getopt_posix" >&6; } - case "$gl_cv_func_getopt_posix" in - *no) gl_replace_getopt=yes ;; - esac - fi - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 -$as_echo_n "checking for working GNU getopt function... " >&6; } -if test "${gl_cv_func_getopt_gnu+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } +if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else - # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the - # optstring is necessary for programs like m4 that have POSIX-mandated - # semantics for supporting options interspersed with files. - # Also, since getopt_long is a GNU extension, we require optind=0. - # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; - # so take care to revert to the correct (non-)export state. - gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' - case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.file + if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : - 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 + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include - +$ac_includes_default int main () { - - int result = 0; - /* 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, - OSF/1 5.1, Solaris 10. */ - { - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; - opterr = 0; - if (getopt (2, myargv, "+a") != '?') - 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, - IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ - { - char *argv[] = { "program", "-p", "foo", "bar", NULL }; - - optind = 1; - if (getopt (4, argv, "p::") != 'p') - result |= 2; - else if (optarg != NULL) - result |= 4; - else if (getopt (4, argv, "p::") != -1) - result |= 6; - else if (optind != 2) - result |= 8; - } - /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ - { - char *argv[] = { "program", "foo", "-p", NULL }; - optind = 0; - if (getopt (3, argv, "-p") != 1) - result |= 16; - else if (getopt (3, argv, "-p") != 'p') - result |= 32; - } - /* This code fails on glibc 2.11. */ - { - char *argv[] = { "program", "-b", "-a", NULL }; - optind = opterr = 0; - if (getopt (3, argv, "+:a:b") != 'b') - result |= 64; - else if (getopt (3, argv, "+:a:b") != ':') - result |= 64; - } - return result; +struct stat sbuf; + /* Linux will dereference the symlink and fail, as required by + POSIX. That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getopt_gnu=yes + gl_cv_func_lstat_dereferences_slashed_symlink=yes else - gl_cv_func_getopt_gnu=no + gl_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - case $gl_had_POSIXLY_CORRECT in - exported) ;; - yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; - *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; - esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 -$as_echo "$gl_cv_func_getopt_gnu" >&6; } - if test "$gl_cv_func_getopt_gnu" = "no"; then - gl_replace_getopt=yes - fi - fi - + else + # If the 'ln -s' command failed, then we probably don't even + # have an lstat function. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" + fi + rm -f conftest.sym conftest.file - ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_getenv" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 +$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *yes) cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETENV $ac_have_decl +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF - - - - - - - if test -n "$gl_replace_getopt"; then : - - - - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - - GNULIB_UNISTD_H_GETOPT=1 - + ;; + esac @@ -10709,8 +11030,16 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" +if test "x$ac_cv_have_decl_ftello" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FTELLO $ac_have_decl +_ACEOF @@ -10719,7 +11048,6 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" @@ -10729,14 +11057,149 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + if test $ac_cv_have_decl_ftello = no; then + HAVE_DECL_FTELLO=0 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5 +$as_echo_n "checking for ftello... " >&6; } +if ${gl_cv_func_ftello+:} false; then : + $as_echo_n "(cached) " >&6 +else - + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +ftello (stdin); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_ftello=yes +else + gl_cv_func_ftello=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5 +$as_echo "$gl_cv_func_ftello" >&6; } + if test $gl_cv_func_ftello = no; then + HAVE_FTELLO=0 + else + if test $WINDOWS_64_BIT_OFF_T = 1; then + REPLACE_FTELLO=1 + fi + if test $gl_cv_var_stdin_large_offset = no; then + REPLACE_FTELLO=1 + fi + if test $REPLACE_FTELLO = 0; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5 +$as_echo_n "checking whether ftello works... " >&6; } +if ${gl_cv_func_ftello_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on Solaris. + solaris*) gl_cv_func_ftello_works="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_ftello_works="guessing yes" ;; + esac + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#define TESTFILE "conftest.tmp" +int +main (void) +{ + FILE *fp; + + /* Create a file with some contents. */ + fp = fopen (TESTFILE, "w"); + if (fp == NULL) + return 70; + if (fwrite ("foogarsh", 1, 8, fp) < 8) + return 71; + if (fclose (fp)) + return 72; + + /* The file's contents is now "foogarsh". */ + + /* Try writing after reading to EOF. */ + fp = fopen (TESTFILE, "r+"); + if (fp == NULL) + return 73; + if (fseek (fp, -1, SEEK_END)) + return 74; + if (!(getc (fp) == 'h')) + return 1; + if (!(getc (fp) == EOF)) + return 2; + if (!(ftell (fp) == 8)) + return 3; + if (!(ftell (fp) == 8)) + return 4; + if (!(putc ('!', fp) == '!')) + return 5; + if (!(ftell (fp) == 9)) + return 6; + if (!(fclose (fp) == 0)) + return 7; + fp = fopen (TESTFILE, "r"); + if (fp == NULL) + return 75; + { + char buf[10]; + if (!(fread (buf, 1, 10, fp) == 9)) + return 10; + if (!(memcmp (buf, "foogarsh!", 9) == 0)) + return 11; + } + if (!(fclose (fp) == 0)) + return 12; + + /* The file's contents is now "foogarsh!". */ + + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_ftello_works=yes +else + gl_cv_func_ftello_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5 +$as_echo "$gl_cv_func_ftello_works" >&6; } + case "$gl_cv_func_ftello_works" in + *yes) ;; + *) + REPLACE_FTELLO=1 +$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h + ;; + esac + fi + fi @@ -10747,59 +11210,146 @@ fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if test "${ac_cv_c_restrict+set}" = set; then : + + + + + + + + + : + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5 +$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; } +if ${gl_cv_func_getcwd_null+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_getcwd_null="guessing yes";; + # Guess yes on Cygwin. + cygwin*) gl_cv_func_getcwd_null="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_getcwd_null="guessing no";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } + +# if HAVE_UNISTD_H +# include +# else /* on Windows with MSVC */ +# include +# endif +# ifndef getcwd + char *getcwd (); +# endif + int main () { -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* mingw cwd does not start with '/', but getcwd does allocate. + However, mingw fails to honor non-zero size. */ +#else + if (chdir ("/") != 0) + return 1; + else + { + char *f = getcwd (NULL, 0); + if (! f) + return 2; + if (f[0] != '/') + return 3; + if (f[1] != '\0') + return 4; + return 0; + } +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getcwd_null=yes +else + gl_cv_func_getcwd_null=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5 +$as_echo "$gl_cv_func_getcwd_null" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5 +$as_echo_n "checking for getcwd with POSIX signature... " >&6; } +if ${gl_cv_func_getcwd_posix_signature+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +extern + #ifdef __cplusplus + "C" + #endif + char *getcwd (char *, size_t); + ; return 0; } + _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw + gl_cv_func_getcwd_posix_signature=yes +else + gl_cv_func_getcwd_posix_signature=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5 +$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; } - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "#define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict + + ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" +if test "x$ac_cv_have_decl_getcwd" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETCWD $ac_have_decl _ACEOF - ;; - esac - GNULIB_GETTIMEOFDAY=0; - HAVE_GETTIMEOFDAY=1; - HAVE_STRUCT_TIMEVAL=1; - HAVE_SYS_TIME_H=1; - REPLACE_GETTIMEOFDAY=0; + + ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" +if test "x$ac_cv_have_decl_getdelim" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETDELIM $ac_have_decl +_ACEOF @@ -10810,7 +11360,30 @@ _ACEOF - : + + + + + + + + + ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" +if test "x$ac_cv_have_decl_getline" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETLINE $ac_have_decl +_ACEOF + + + + + + @@ -10832,252 +11405,1000 @@ _ACEOF if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_time_h='<'sys/time.h'>' + gl_cv_next_getopt_h='<'getopt.h'>' else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_sys_time_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_getopt_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_sys_time_h = yes; then + if test $ac_cv_header_getopt_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/sys/time.h#{ - s#.*"\(.*/sys/time.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'getopt.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_getopt_h + gl_cv_next_getopt_h='"'$gl_header'"' else - gl_cv_next_sys_time_h='<'sys/time.h'>' + gl_cv_next_getopt_h='<'getopt.h'>' fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 -$as_echo "$gl_cv_next_sys_time_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 +$as_echo "$gl_cv_next_getopt_h" >&6; } fi - NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h + NEXT_GETOPT_H=$gl_cv_next_getopt_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'sys/time.h'>' + gl_next_as_first_directive='<'getopt.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_time_h + gl_next_as_first_directive=$gl_cv_next_getopt_h fi - NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive + + if test $ac_cv_header_getopt_h = yes; then + HAVE_GETOPT_H=1 + else + HAVE_GETOPT_H=0 + fi + + + gl_replace_getopt= + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + for ac_header in getopt.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" +if test "x$ac_cv_header_getopt_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_H 1 +_ACEOF + +else + gl_replace_getopt=yes +fi + +done - if test $ac_cv_header_sys_time_h != yes; then - HAVE_SYS_TIME_H=0 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 -$as_echo_n "checking for struct timeval... " >&6; } -if test "${gl_cv_sys_struct_timeval+set}" = set; then : + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + for ac_func in getopt_long_only +do : + ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" +if test "x$ac_cv_func_getopt_long_only" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_LONG_ONLY 1 +_ACEOF + +else + gl_replace_getopt=yes +fi +done + + fi + + if test -z "$gl_replace_getopt"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 +$as_echo_n "checking whether getopt is POSIX compatible... " >&6; } +if ${gl_cv_func_getopt_posix+:} false; then : $as_echo_n "(cached) " >&6 else + + if test $cross_compiling = no; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if HAVE_SYS_TIME_H - #include - #endif - #include + +#include +#include +#include int main () { -static struct timeval x; x.tv_sec = x.tv_usec; - ; + 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; + + 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; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timeval=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=maybe else - gl_cv_sys_struct_timeval=no + gl_cv_func_getopt_posix=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 -$as_echo "$gl_cv_sys_struct_timeval" >&6; } - if test $gl_cv_sys_struct_timeval != yes; then - HAVE_STRUCT_TIMEVAL=0 - fi - - for gl_func in gettimeofday; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 + if test $gl_cv_func_getopt_posix = maybe; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if HAVE_SYS_TIME_H -# include -#endif -#include +#include +#include +#include int main () { -#undef $gl_func - (void) $gl_func; - ; + 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; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=maybe else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + gl_cv_func_getopt_posix=no fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - done - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if test "${ac_cv_header_stdbool_h+set}" = set; then : - $as_echo_n "(cached) " >&6 + fi + if test $gl_cv_func_getopt_posix = maybe; then + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; +#include +#include +#include int main () { - - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - - ; + 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; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdbool_h=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=yes else - ac_cv_header_stdbool_h=no + gl_cv_func_getopt_posix=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 -$as_echo "$ac_cv_header_stdbool_h" >&6; } - ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 -_ACEOF + 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 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 +$as_echo "$gl_cv_func_getopt_posix" >&6; } + case "$gl_cv_func_getopt_posix" in + *no) gl_replace_getopt=yes ;; + esac + fi + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 +$as_echo_n "checking for working GNU getopt function... " >&6; } +if ${gl_cv_func_getopt_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the + # optstring is necessary for programs like m4 that have POSIX-mandated + # semantics for supporting options interspersed with files. + # Also, since getopt_long is a GNU extension, we require optind=0. + # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; + # so take care to revert to the correct (non-)export state. + gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' + case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + +#include +#if defined __MACH__ && defined __APPLE__ +/* Avoid a crash on Mac OS X. */ +#include +#include +#include +#include +#include +#include +/* The exception port on which our thread listens. */ +static mach_port_t our_exception_port; +/* The main function of the thread listening for exceptions of type + EXC_BAD_ACCESS. */ +static void * +mach_exception_thread (void *arg) +{ + /* Buffer for a message to be received. */ + struct { + mach_msg_header_t head; + mach_msg_body_t msgh_body; + char data[1024]; + } msg; + mach_msg_return_t retval; + /* Wait for a message on the exception port. */ + retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), + our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + if (retval != MACH_MSG_SUCCESS) + abort (); + exit (1); +} +static void +nocrash_init (void) +{ + mach_port_t self = mach_task_self (); + /* Allocate a port on which the thread shall listen for exceptions. */ + if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) + == KERN_SUCCESS) { + /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + if (mach_port_insert_right (self, our_exception_port, our_exception_port, + MACH_MSG_TYPE_MAKE_SEND) + == KERN_SUCCESS) { + /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting + for us. */ + exception_mask_t mask = EXC_MASK_BAD_ACCESS; + /* Create the thread listening on the exception port. */ + pthread_attr_t attr; + pthread_t thread; + if (pthread_attr_init (&attr) == 0 + && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 + && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { + pthread_attr_destroy (&attr); + /* Replace the exception port info for these exceptions with our own. + Note that we replace the exception port for the entire task, not only + for a particular thread. This has the effect that when our exception + port gets the message, the thread specific exception port has already + been asked, and we don't need to bother about it. + See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + task_set_exception_ports (self, mask, our_exception_port, + EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); + } + } + } +} +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Avoid a crash on native Windows. */ +#define WIN32_LEAN_AND_MEAN +#include +#include +static LONG WINAPI +exception_filter (EXCEPTION_POINTERS *ExceptionInfo) +{ + switch (ExceptionInfo->ExceptionRecord->ExceptionCode) + { + case EXCEPTION_ACCESS_VIOLATION: + case EXCEPTION_IN_PAGE_ERROR: + case EXCEPTION_STACK_OVERFLOW: + case EXCEPTION_GUARD_PAGE: + case EXCEPTION_PRIV_INSTRUCTION: + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_NONCONTINUABLE_EXCEPTION: + exit (1); + } + return EXCEPTION_CONTINUE_SEARCH; +} +static void +nocrash_init (void) +{ + SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); +} +#else +/* Avoid a crash on POSIX systems. */ +#include +/* A POSIX signal handler. */ +static void +exception_handler (int sig) +{ + exit (1); +} +static void +nocrash_init (void) +{ +#ifdef SIGSEGV + signal (SIGSEGV, exception_handler); +#endif +#ifdef SIGBUS + signal (SIGBUS, exception_handler); +#endif +} +#endif + + +int +main () +{ + + int result = 0; + + nocrash_init(); + + /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, + 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"; + static char plus[] = "-+"; + char *argv[3] = { conftest, plus, NULL }; + opterr = 0; + if (getopt (2, argv, "+a") != '?') + result |= 1; + } + /* This code succeeds on glibc 2.8, mingw, + 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"; + static char p[] = "-p"; + static char foo[] = "foo"; + static char bar[] = "bar"; + char *argv[] = { program, p, foo, bar, NULL }; + + optind = 1; + if (getopt (4, argv, "p::") != 'p') + result |= 2; + else if (optarg != NULL) + result |= 4; + else if (getopt (4, argv, "p::") != -1) + result |= 6; + else if (optind != 2) + result |= 8; + } + /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ + { + static char program[] = "program"; + static char foo[] = "foo"; + static char p[] = "-p"; + char *argv[] = { program, foo, p, NULL }; + optind = 0; + if (getopt (3, argv, "-p") != 1) + result |= 16; + else if (getopt (3, argv, "-p") != 'p') + result |= 16; + } + /* This code fails on glibc 2.11. */ + { + static char program[] = "program"; + static char b[] = "-b"; + static char a[] = "-a"; + char *argv[] = { program, b, a, NULL }; + optind = opterr = 0; + if (getopt (3, argv, "+:a:b") != 'b') + result |= 32; + else if (getopt (3, argv, "+:a:b") != ':') + result |= 32; + } + /* This code dumps core on glibc 2.14. */ + { + static char program[] = "program"; + static char w[] = "-W"; + static char dummy[] = "dummy"; + char *argv[] = { program, w, dummy, NULL }; + optind = opterr = 1; + if (getopt (3, argv, "W;") != 'W') + result |= 64; + } + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_gnu=yes +else + gl_cv_func_getopt_gnu=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + case $gl_had_POSIXLY_CORRECT in + exported) ;; + yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; + *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 +$as_echo "$gl_cv_func_getopt_gnu" >&6; } + if test "$gl_cv_func_getopt_gnu" != yes; then + gl_replace_getopt=yes + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 +$as_echo_n "checking for working GNU getopt_long function... " >&6; } +if ${gl_cv_func_getopt_long_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; + *) gl_cv_func_getopt_long_gnu="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + +int +main () +{ +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; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_long_gnu=yes +else + gl_cv_func_getopt_long_gnu=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 +$as_echo "$gl_cv_func_getopt_long_gnu" >&6; } + case "$gl_cv_func_getopt_long_gnu" in + *yes) ;; + *) gl_replace_getopt=yes ;; + esac + fi + fi + + + + + + + REPLACE_GETOPT=0 + if test -n "$gl_replace_getopt"; then + REPLACE_GETOPT=1 + fi + + if test $REPLACE_GETOPT = 1; then + + GETOPT_H=getopt.h + +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + + fi + + + ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" +if test "x$ac_cv_have_decl_getenv" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETENV $ac_have_decl +_ACEOF + + +: + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if ${ac_cv_c_restrict+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } +int +main () +{ +int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_restrict=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } + + case $ac_cv_c_restrict in + restrict) ;; + no) $as_echo "#define restrict /**/" >>confdefs.h + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + + + GNULIB_GETTIMEOFDAY=0; + HAVE_GETTIMEOFDAY=1; + HAVE_STRUCT_TIMEVAL=1; + HAVE_SYS_TIME_H=1; + REPLACE_GETTIMEOFDAY=0; + REPLACE_STRUCT_TIMEVAL=0; + + + + + + + + + + + : + + + + + + + + + + + + : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_time_h='<'sys/time.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_time_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_sys_time_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/time.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_time_h + gl_cv_next_sys_time_h='"'$gl_header'"' + else + gl_cv_next_sys_time_h='<'sys/time.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 +$as_echo "$gl_cv_next_sys_time_h" >&6; } + fi + NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/time.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_time_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive + + + + + + if test $ac_cv_header_sys_time_h != yes; then + HAVE_SYS_TIME_H=0 + fi + + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else - STDBOOL_H='stdbool.h' + HAVE_WINSOCK2_H=0 fi - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 +$as_echo_n "checking for struct timeval... " >&6; } +if ${gl_cv_sys_struct_timeval+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + +int +main () +{ +static struct timeval x; x.tv_sec = x.tv_usec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timeval=yes +else + gl_cv_sys_struct_timeval=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 +$as_echo "$gl_cv_sys_struct_timeval" >&6; } + if test $gl_cv_sys_struct_timeval != yes; then + HAVE_STRUCT_TIMEVAL=0 else - HAVE__BOOL=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 +$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; } +if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + +int +main () +{ +static struct timeval x; + typedef int verify_tv_sec_type[ + sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 + ]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timeval_tv_sec=yes +else + gl_cv_sys_struct_timeval_tv_sec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5 +$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } + if test $gl_cv_sys_struct_timeval_tv_sec != yes; then + REPLACE_STRUCT_TIMEVAL=1 + fi fi + for gl_func in gettimeofday; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if HAVE_SYS_TIME_H +# include +#endif +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } -if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : +if ${ac_cv_type_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_type_unsigned_long_long_int=yes @@ -11135,7 +12456,7 @@ $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } -if test "${ac_cv_type_long_long_int+set}" = set; then : +if ${ac_cv_type_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_type_long_long_int=yes @@ -11308,32 +12629,50 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdint_h+set}" = set; then : +if ${gl_cv_next_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_header_stdint_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdint.h#{ - s#.*"\(.*/stdint.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stdint_h='<'stdint.h'>' - fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'stdint.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_stdint_h + gl_cv_next_stdint_h='"'$gl_header'"' + else + gl_cv_next_stdint_h='<'stdint.h'>' + fi fi @@ -11364,7 +12703,7 @@ $as_echo "$gl_cv_next_stdint_h" >&6; } if test $ac_cv_header_stdint_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } -if test "${gl_cv_header_working_stdint_h+set}" = set; then : +if ${gl_cv_header_working_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_header_working_stdint_h=no @@ -11372,8 +12711,6 @@ else /* end confdefs.h. */ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ @@ -11542,8 +12879,6 @@ else /* end confdefs.h. */ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include @@ -11667,7 +13002,7 @@ done for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } -if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then : +if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " @@ -11712,7 +13047,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } -if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then : +if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " @@ -11756,7 +13091,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then : +if eval \${gl_cv_type_${gltype}_signed+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11815,7 +13150,7 @@ _ACEOF for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then : +if eval \${gl_cv_type_${gltype}_suffix+:} false; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no @@ -11887,7 +13222,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then : +if eval \${gl_cv_type_${gltype}_suffix+:} false; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no @@ -11954,67 +13289,49 @@ _ACEOF + if test $BITSIZEOF_WINT_T -lt 32; then + BITSIZEOF_WINT_T=32 + fi + STDINT_H=stdint.h fi + if test -n "$STDINT_H"; then + GL_GENERATE_STDINT_H_TRUE= + GL_GENERATE_STDINT_H_FALSE='#' +else + GL_GENERATE_STDINT_H_TRUE='#' + GL_GENERATE_STDINT_H_FALSE= +fi - for ac_header in inttypes.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" -if test "x$ac_cv_header_inttypes_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_INTTYPES_H 1 -_ACEOF -fi -done - if test $ac_cv_header_inttypes_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 -$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } -if test "${gt_cv_inttypes_pri_broken+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef PRId32 -char *p = PRId32; -#endif -int -main () -{ + GNULIB_IMAXABS=0; + GNULIB_IMAXDIV=0; + GNULIB_STRTOIMAX=0; + GNULIB_STRTOUMAX=0; + HAVE_DECL_IMAXABS=1; + HAVE_DECL_IMAXDIV=1; + HAVE_DECL_STRTOIMAX=1; + HAVE_DECL_STRTOUMAX=1; + REPLACE_STRTOIMAX=0; + REPLACE_STRTOUMAX=0; + INT32_MAX_LT_INTMAX_MAX=1; + INT64_MAX_EQ_LONG_MAX='defined _LP64'; + PRI_MACROS_BROKEN=0; + PRIPTR_PREFIX=__PRIPTR_PREFIX; + UINT32_MAX_LT_UINTMAX_MAX=1; + UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_inttypes_pri_broken=no -else - gt_cv_inttypes_pri_broken=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 -$as_echo "$gt_cv_inttypes_pri_broken" >&6; } - fi - if test "$gt_cv_inttypes_pri_broken" = yes; then -cat >>confdefs.h <<_ACEOF -#define PRI_MACROS_BROKEN 1 -_ACEOF - PRI_MACROS_BROKEN=1 - else - PRI_MACROS_BROKEN=0 - fi + : @@ -12023,77 +13340,86 @@ _ACEOF - ac_fn_c_check_decl "$LINENO" "imaxabs" "ac_cv_have_decl_imaxabs" "$ac_includes_default" -if test "x$ac_cv_have_decl_imaxabs" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_IMAXABS $ac_have_decl -_ACEOF - ac_fn_c_check_decl "$LINENO" "imaxdiv" "ac_cv_have_decl_imaxdiv" "$ac_includes_default" -if test "x$ac_cv_have_decl_imaxdiv" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_IMAXDIV $ac_have_decl -_ACEOF + : - ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoimax" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRTOIMAX $ac_have_decl -_ACEOF - ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoumax" = x""yes; then : - ac_have_decl=1 + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_inttypes_h='<'inttypes.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_inttypes_h+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRTOUMAX $ac_have_decl + if test $ac_cv_header_inttypes_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'inttypes.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_inttypes_h + gl_cv_next_inttypes_h='"'$gl_header'"' + else + gl_cv_next_inttypes_h='<'inttypes.h'>' + fi - GNULIB_IMAXABS=0; - GNULIB_IMAXDIV=0; - GNULIB_STRTOIMAX=0; - GNULIB_STRTOUMAX=0; - HAVE_DECL_IMAXABS=1; - HAVE_DECL_IMAXDIV=1; - HAVE_DECL_STRTOIMAX=1; - HAVE_DECL_STRTOUMAX=1; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 +$as_echo "$gl_cv_next_inttypes_h" >&6; } + fi + NEXT_INTTYPES_H=$gl_cv_next_inttypes_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'inttypes.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_inttypes_h + fi + NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive - GNULIB_ISWBLANK=0; - GNULIB_WCTYPE=0; - GNULIB_ISWCTYPE=0; - GNULIB_WCTRANS=0; - GNULIB_TOWCTRANS=0; - HAVE_ISWBLANK=1; - HAVE_WCTYPE_T=1; - HAVE_WCTRANS_T=1; - REPLACE_ISWBLANK=0; @@ -12101,451 +13427,1118 @@ _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 -$as_echo_n "checking for wint_t... " >&6; } -if test "${gt_cv_c_wint_t+set}" = set; then : + for gl_func in imaxabs imaxdiv strtoimax strtoumax; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0'; int main () { - +#undef $gl_func + (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wint_t=yes + eval "$as_gl_Symbol=yes" else - gt_cv_c_wint_t=no + eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 -$as_echo "$gt_cv_c_wint_t" >&6; } - if test $gt_cv_c_wint_t = yes; then - -$as_echo "#define HAVE_WINT_T 1" >>confdefs.h +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF - fi + eval ac_cv_have_decl_$gl_func=yes +fi + done + for ac_header in inttypes.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" +if test "x$ac_cv_header_inttypes_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H 1 +_ACEOF +fi +done - : + if test $ac_cv_header_inttypes_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 +$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } +if ${gt_cv_inttypes_pri_broken+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef PRId32 +char *p = PRId32; +#endif +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_inttypes_pri_broken=no +else + gt_cv_inttypes_pri_broken=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_func_iswcntrl = yes; then - HAVE_ISWCNTRL=1 - else - HAVE_ISWCNTRL=0 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 +$as_echo "$gt_cv_inttypes_pri_broken" >&6; } fi + if test "$gt_cv_inttypes_pri_broken" = yes; then +cat >>confdefs.h <<_ACEOF +#define PRI_MACROS_BROKEN 1 +_ACEOF - - - - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 + PRI_MACROS_BROKEN=1 else - HAVE_WINT_T=0 + PRI_MACROS_BROKEN=0 fi + GNULIB_ACOSF=0; + GNULIB_ACOSL=0; + GNULIB_ASINF=0; + GNULIB_ASINL=0; + GNULIB_ATANF=0; + GNULIB_ATANL=0; + GNULIB_ATAN2F=0; + GNULIB_CBRT=0; + GNULIB_CBRTF=0; + GNULIB_CBRTL=0; + GNULIB_CEIL=0; + GNULIB_CEILF=0; + GNULIB_CEILL=0; + GNULIB_COPYSIGN=0; + GNULIB_COPYSIGNF=0; + GNULIB_COPYSIGNL=0; + GNULIB_COSF=0; + GNULIB_COSL=0; + GNULIB_COSHF=0; + GNULIB_EXPF=0; + GNULIB_EXPL=0; + GNULIB_EXP2=0; + GNULIB_EXP2F=0; + GNULIB_EXP2L=0; + GNULIB_EXPM1=0; + GNULIB_EXPM1F=0; + GNULIB_EXPM1L=0; + GNULIB_FABSF=0; + GNULIB_FABSL=0; + GNULIB_FLOOR=0; + GNULIB_FLOORF=0; + GNULIB_FLOORL=0; + GNULIB_FMA=0; + GNULIB_FMAF=0; + GNULIB_FMAL=0; + GNULIB_FMOD=0; + GNULIB_FMODF=0; + GNULIB_FMODL=0; + GNULIB_FREXPF=0; + GNULIB_FREXP=0; + GNULIB_FREXPL=0; + GNULIB_HYPOT=0; + GNULIB_HYPOTF=0; + GNULIB_HYPOTL=0; + GNULIB_ILOGB=0; + GNULIB_ILOGBF=0; + GNULIB_ILOGBL=0; + GNULIB_ISFINITE=0; + GNULIB_ISINF=0; + GNULIB_ISNAN=0; + GNULIB_ISNANF=0; + GNULIB_ISNAND=0; + GNULIB_ISNANL=0; + GNULIB_LDEXPF=0; + GNULIB_LDEXPL=0; + GNULIB_LOG=0; + GNULIB_LOGF=0; + GNULIB_LOGL=0; + GNULIB_LOG10=0; + GNULIB_LOG10F=0; + GNULIB_LOG10L=0; + GNULIB_LOG1P=0; + GNULIB_LOG1PF=0; + GNULIB_LOG1PL=0; + GNULIB_LOG2=0; + GNULIB_LOG2F=0; + GNULIB_LOG2L=0; + GNULIB_LOGB=0; + GNULIB_LOGBF=0; + GNULIB_LOGBL=0; + GNULIB_MODF=0; + GNULIB_MODFF=0; + GNULIB_MODFL=0; + GNULIB_POWF=0; + GNULIB_REMAINDER=0; + GNULIB_REMAINDERF=0; + GNULIB_REMAINDERL=0; + GNULIB_RINT=0; + GNULIB_RINTF=0; + GNULIB_RINTL=0; + GNULIB_ROUND=0; + GNULIB_ROUNDF=0; + GNULIB_ROUNDL=0; + GNULIB_SIGNBIT=0; + GNULIB_SINF=0; + GNULIB_SINL=0; + GNULIB_SINHF=0; + GNULIB_SQRTF=0; + GNULIB_SQRTL=0; + GNULIB_TANF=0; + GNULIB_TANL=0; + GNULIB_TANHF=0; + GNULIB_TRUNC=0; + GNULIB_TRUNCF=0; + GNULIB_TRUNCL=0; + HAVE_ACOSF=1; + HAVE_ACOSL=1; + HAVE_ASINF=1; + HAVE_ASINL=1; + HAVE_ATANF=1; + HAVE_ATANL=1; + HAVE_ATAN2F=1; + HAVE_CBRT=1; + HAVE_CBRTF=1; + HAVE_CBRTL=1; + HAVE_COPYSIGN=1; + HAVE_COPYSIGNL=1; + HAVE_COSF=1; + HAVE_COSL=1; + HAVE_COSHF=1; + HAVE_EXPF=1; + HAVE_EXPL=1; + HAVE_EXPM1=1; + HAVE_EXPM1F=1; + HAVE_FABSF=1; + HAVE_FABSL=1; + HAVE_FMA=1; + HAVE_FMAF=1; + HAVE_FMAL=1; + HAVE_FMODF=1; + HAVE_FMODL=1; + HAVE_FREXPF=1; + HAVE_HYPOTF=1; + HAVE_HYPOTL=1; + HAVE_ILOGB=1; + HAVE_ILOGBF=1; + HAVE_ILOGBL=1; + HAVE_ISNANF=1; + HAVE_ISNAND=1; + HAVE_ISNANL=1; + HAVE_LDEXPF=1; + HAVE_LOGF=1; + HAVE_LOGL=1; + HAVE_LOG10F=1; + HAVE_LOG10L=1; + HAVE_LOG1P=1; + HAVE_LOG1PF=1; + HAVE_LOG1PL=1; + HAVE_LOGBF=1; + HAVE_LOGBL=1; + HAVE_MODFF=1; + HAVE_MODFL=1; + HAVE_POWF=1; + HAVE_REMAINDER=1; + HAVE_REMAINDERF=1; + HAVE_RINT=1; + HAVE_RINTL=1; + HAVE_SINF=1; + HAVE_SINL=1; + HAVE_SINHF=1; + HAVE_SQRTF=1; + HAVE_SQRTL=1; + HAVE_TANF=1; + HAVE_TANL=1; + HAVE_TANHF=1; + HAVE_DECL_ACOSL=1; + HAVE_DECL_ASINL=1; + HAVE_DECL_ATANL=1; + HAVE_DECL_CBRTF=1; + HAVE_DECL_CBRTL=1; + HAVE_DECL_CEILF=1; + HAVE_DECL_CEILL=1; + HAVE_DECL_COPYSIGNF=1; + HAVE_DECL_COSL=1; + HAVE_DECL_EXPL=1; + HAVE_DECL_EXP2=1; + HAVE_DECL_EXP2F=1; + HAVE_DECL_EXP2L=1; + HAVE_DECL_EXPM1L=1; + HAVE_DECL_FLOORF=1; + HAVE_DECL_FLOORL=1; + HAVE_DECL_FREXPL=1; + HAVE_DECL_LDEXPL=1; + HAVE_DECL_LOGL=1; + HAVE_DECL_LOG10L=1; + HAVE_DECL_LOG2=1; + HAVE_DECL_LOG2F=1; + HAVE_DECL_LOG2L=1; + HAVE_DECL_LOGB=1; + HAVE_DECL_REMAINDER=1; + HAVE_DECL_REMAINDERL=1; + HAVE_DECL_RINTF=1; + HAVE_DECL_ROUND=1; + HAVE_DECL_ROUNDF=1; + HAVE_DECL_ROUNDL=1; + HAVE_DECL_SINL=1; + HAVE_DECL_SQRTL=1; + HAVE_DECL_TANL=1; + HAVE_DECL_TRUNC=1; + HAVE_DECL_TRUNCF=1; + HAVE_DECL_TRUNCL=1; + REPLACE_CBRTF=0; + REPLACE_CBRTL=0; + REPLACE_CEIL=0; + REPLACE_CEILF=0; + REPLACE_CEILL=0; + REPLACE_EXPM1=0; + REPLACE_EXPM1F=0; + REPLACE_EXP2=0; + REPLACE_EXP2L=0; + REPLACE_FABSL=0; + REPLACE_FLOOR=0; + REPLACE_FLOORF=0; + REPLACE_FLOORL=0; + REPLACE_FMA=0; + REPLACE_FMAF=0; + REPLACE_FMAL=0; + REPLACE_FMOD=0; + REPLACE_FMODF=0; + REPLACE_FMODL=0; + REPLACE_FREXPF=0; + REPLACE_FREXP=0; + REPLACE_FREXPL=0; + REPLACE_HUGE_VAL=0; + REPLACE_HYPOT=0; + REPLACE_HYPOTF=0; + REPLACE_HYPOTL=0; + REPLACE_ILOGB=0; + REPLACE_ILOGBF=0; + REPLACE_ISFINITE=0; + REPLACE_ISINF=0; + REPLACE_ISNAN=0; + REPLACE_LDEXPL=0; + REPLACE_LOG=0; + REPLACE_LOGF=0; + REPLACE_LOGL=0; + REPLACE_LOG10=0; + REPLACE_LOG10F=0; + REPLACE_LOG10L=0; + REPLACE_LOG1P=0; + REPLACE_LOG1PF=0; + REPLACE_LOG1PL=0; + REPLACE_LOG2=0; + REPLACE_LOG2F=0; + REPLACE_LOG2L=0; + REPLACE_LOGB=0; + REPLACE_LOGBF=0; + REPLACE_LOGBL=0; + REPLACE_MODF=0; + REPLACE_MODFF=0; + REPLACE_MODFL=0; + REPLACE_NAN=0; + REPLACE_REMAINDER=0; + REPLACE_REMAINDERF=0; + REPLACE_REMAINDERL=0; + REPLACE_ROUND=0; + REPLACE_ROUNDF=0; + REPLACE_ROUNDL=0; + REPLACE_SIGNBIT=0; + REPLACE_SIGNBIT_USING_GCC=0; + REPLACE_SQRTL=0; + REPLACE_TRUNC=0; + REPLACE_TRUNCF=0; + REPLACE_TRUNCL=0; - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_wctype_h='<'wctype.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_wctype_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else - - if test $ac_cv_header_wctype_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/wctype.h#{ - s#.*"\(.*/wctype.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_wctype_h='<'wctype.h'>' - fi - +if ac_fn_c_try_compile "$LINENO"; then : + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 -$as_echo "$gl_cv_next_wctype_h" >&6; } - fi - NEXT_WCTYPE_H=$gl_cv_next_wctype_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'wctype.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_wctype_h - fi - NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif - if test $ac_cv_header_wctype_h = yes; then - if test $ac_cv_func_iswcntrl = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 -$as_echo_n "checking whether iswcntrl works... " >&6; } -if test "${gl_cv_func_iswcntrl_works+set}" = set; then : - $as_echo_n "(cached) " >&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #if __GNU_LIBRARY__ == 1 - Linux libc5 i18n is broken. - #endif +#include + int main () { +#ifndef _BIG_ENDIAN + not big endian + #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_iswcntrl_works=yes + ac_cv_c_bigendian=yes else - gl_cv_func_iswcntrl_works=no + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +$ac_includes_default +int +main () +{ - /* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #include - int main () { return iswprint ('x') == 0; } + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + ; + return 0; +} _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_iswcntrl_works=yes + ac_cv_c_bigendian=no else - gl_cv_func_iswcntrl_works=no + ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 -$as_echo "$gl_cv_func_iswcntrl_works" >&6; } fi - HAVE_WCTYPE_H=1 - else - HAVE_WCTYPE_H=0 - fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - if test "$gl_cv_func_iswcntrl_works" = no; then - REPLACE_ISWCNTRL=1 - else - REPLACE_ISWCNTRL=0 - fi + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac - if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then - : - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 -$as_echo_n "checking for wctype_t... " >&6; } -if test "${gl_cv_type_wctype_t+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5 +$as_echo_n "checking whether long double and double are the same... " >&6; } +if ${gl_cv_long_double_equals_double+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #if HAVE_WCTYPE_H - # include - #endif - wctype_t a; - +#include int main () { +typedef int check[sizeof (long double) == sizeof (double) + && LDBL_MANT_DIG == DBL_MANT_DIG + && LDBL_MAX_EXP == DBL_MAX_EXP + && LDBL_MIN_EXP == DBL_MIN_EXP + ? 1 : -1]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_type_wctype_t=yes + gl_cv_long_double_equals_double=yes else - gl_cv_type_wctype_t=no + gl_cv_long_double_equals_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 -$as_echo "$gl_cv_type_wctype_t" >&6; } - if test $gl_cv_type_wctype_t = no; then - HAVE_WCTYPE_T=0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5 +$as_echo "$gl_cv_long_double_equals_double" >&6; } + if test $gl_cv_long_double_equals_double = yes; then + +$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h + + HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 + else + HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 -$as_echo_n "checking for wctrans_t... " >&6; } -if test "${gl_cv_type_wctrans_t+set}" = set; then : + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 +$as_echo_n "checking where to find the exponent in a 'double'... " >&6; } +if ${gl_cv_cc_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + if test "$cross_compiling" = yes; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #include - wctrans_t a; + +#if defined arm || defined __arm || defined __arm__ + mixed_endianness +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "mixed_endianness" >/dev/null 2>&1; then : + gl_cv_cc_double_expbit0="unknown" +else + + : +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include int main () { +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_type_wctrans_t=yes + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else - gl_cv_type_wctrans_t=no + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 -$as_echo "$gl_cv_type_wctrans_t" >&6; } - if test $gl_cv_type_wctrans_t = no; then - HAVE_WCTRANS_T=0 - fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif - for gl_func in wctype iswctype wctrans towctrans ; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# include -#endif -#include +#include int main () { -#undef $gl_func - (void) $gl_func; +#ifndef _BIG_ENDIAN + not big endian + #endif + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" + ac_cv_c_bigendian=yes else - eval "$as_gl_Symbol=no" + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; - eval ac_cv_have_decl_$gl_func=yes +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi fi - done - - - - - - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; - ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "$ac_includes_default" -if test "x$ac_cv_have_decl_iswblank" = x""yes; then : - ac_have_decl=1 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no else - ac_have_decl=0 + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ISWBLANK $ac_have_decl -_ACEOF + fi +fi +: + case $ac_cv_c_bigendian in #( + yes) + gl_cv_cc_double_expbit0="word 0 bit 20";; #( + no) + gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( + universal) +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + ;; #( + *) + gl_cv_cc_double_expbit0="unknown" ;; + esac - GNULIB_NL_LANGINFO=0; - HAVE_NL_LANGINFO=1; - REPLACE_NL_LANGINFO=0; +fi +rm -f conftest* +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { double value; unsigned int word[NWORDS]; } memory_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (double x) +{ + memory_double m; + size_t i; + /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ + memset (&m, 0, sizeof (memory_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25); + add_to_ored_words (0.5); + add_to_ored_words (1.0); + add_to_ored_words (2.0); + add_to_ored_words (4.0); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_double_expbit0=`cat conftest.out` +else + gl_cv_cc_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.out - ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 +$as_echo "$gl_cv_cc_double_expbit0" >&6; } + case "$gl_cv_cc_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl +#define DBL_EXPBIT0_WORD $word +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_BIT $bit _ACEOF + ;; + esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 -$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } -if test "${ac_cv_gnu_library_2_1+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 +$as_echo_n "checking where to find the exponent in a 'float'... " >&6; } +if ${gl_cv_cc_float_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else + + if test "$cross_compiling" = yes; then : + gl_cv_cc_float_expbit0="word 0 bit 23" +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif -#ifdef __UCLIBC__ - Lucky user -#endif +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { float value; unsigned int word[NWORDS]; } memory_float; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (float x) +{ + memory_float m; + size_t i; + /* Clear it first, in case + sizeof (float) < sizeof (memory_float). */ + memset (&m, 0, sizeof (memory_float)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25f); + add_to_ored_words (0.5f); + add_to_ored_words (1.0f); + add_to_ored_words (2.0f); + add_to_ored_words (4.0f); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky" >/dev/null 2>&1; then : - ac_cv_gnu_library_2_1=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_float_expbit0=`cat conftest.out` else - ac_cv_gnu_library_2_1=no + gl_cv_cc_float_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f conftest* - + rm -f conftest.out fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 -$as_echo "$ac_cv_gnu_library_2_1" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 +$as_echo "$gl_cv_cc_float_expbit0" >&6; } + case "$gl_cv_cc_float_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` - GLIBC21="$ac_cv_gnu_library_2_1" +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_WORD $word +_ACEOF +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_BIT $bit +_ACEOF - GNULIB_SETLOCALE=0; - GNULIB_DUPLOCALE=0; - HAVE_DUPLOCALE=1; - REPLACE_SETLOCALE=0; - REPLACE_DUPLOCALE=0; + ;; + esac - REPLACE_NULL=0; - HAVE_WCHAR_T=1; - STDDEF_H=''; + GNULIB_ISWBLANK=0; + GNULIB_WCTYPE=0; + GNULIB_ISWCTYPE=0; + GNULIB_WCTRANS=0; + GNULIB_TOWCTRANS=0; + HAVE_ISWBLANK=1; + HAVE_WCTYPE_T=1; + HAVE_WCTRANS_T=1; + REPLACE_ISWBLANK=0; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 -$as_echo_n "checking for wchar_t... " >&6; } -if test "${gt_cv_c_wchar_t+set}" = set; then : + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 +$as_echo_n "checking for wint_t... " >&6; } +if ${gt_cv_c_wint_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ #include - wchar_t foo = (wchar_t)'\0'; +#include +#include +#include + wint_t foo = (wchar_t)'\0'; int main () { @@ -12555,59 +14548,44 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wchar_t=yes + gt_cv_c_wint_t=yes else - gt_cv_c_wchar_t=no + gt_cv_c_wint_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 -$as_echo "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 +$as_echo "$gt_cv_c_wint_t" >&6; } + if test $gt_cv_c_wint_t = yes; then -$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h +$as_echo "#define HAVE_WINT_T 1" >>confdefs.h fi - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h + + + : + + + + + + if test $ac_cv_func_iswcntrl = yes; then + HAVE_ISWCNTRL=1 + else + HAVE_ISWCNTRL=0 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 -$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if test "${gl_cv_decl_null_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_null_works=yes -else - gl_cv_decl_null_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 -$as_echo "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h + + if test $gt_cv_c_wint_t = yes; then + HAVE_WINT_T=1 + else + HAVE_WINT_T=0 fi - if test -n "$STDDEF_H"; then @@ -12616,248 +14594,345 @@ $as_echo "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stddef_h='<'stddef.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stddef_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stddef.h#{ - s#.*"\(.*/stddef.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 -$as_echo "$gl_cv_next_stddef_h" >&6; } - fi - NEXT_STDDEF_H=$gl_cv_next_stddef_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stddef.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stddef_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive + if test $gl_cv_have_include_next = yes; then + gl_cv_next_wctype_h='<'wctype.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_wctype_h+:} false; then : + $as_echo_n "(cached) " >&6 +else - fi + if test $ac_cv_header_wctype_h = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'wctype.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_wctype_h + gl_cv_next_wctype_h='"'$gl_header'"' + else + gl_cv_next_wctype_h='<'wctype.h'>' + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 +$as_echo "$gl_cv_next_wctype_h" >&6; } + fi + NEXT_WCTYPE_H=$gl_cv_next_wctype_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'wctype.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_wctype_h + fi + NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 -$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } -if test "${gl_cv_func_malloc_posix+set}" = set; then : + if test $ac_cv_header_wctype_h = yes; then + if test $ac_cv_func_iswcntrl = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 +$as_echo_n "checking whether iswcntrl works... " >&6; } +if ${gl_cv_func_iswcntrl_works+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include + #if __GNU_LIBRARY__ == 1 + Linux libc5 i18n is broken. + #endif int main () { -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - choke me - #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_malloc_posix=yes + gl_cv_func_iswcntrl_works="guessing yes" else - gl_cv_func_malloc_posix=no + gl_cv_func_iswcntrl_works="guessing no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #include + int main () { return iswprint ('x') == 0; } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_iswcntrl_works=yes +else + gl_cv_func_iswcntrl_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 -$as_echo "$gl_cv_func_malloc_posix" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 +$as_echo "$gl_cv_func_iswcntrl_works" >&6; } + fi + HAVE_WCTYPE_H=1 + else + HAVE_WCTYPE_H=0 + fi + + + case "$gl_cv_func_iswcntrl_works" in + *yes) REPLACE_ISWCNTRL=0 ;; + *) REPLACE_ISWCNTRL=1 ;; + esac + + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then + : + fi - for ac_header in stdlib.h + if test $REPLACE_ISWCNTRL = 1; then + REPLACE_TOWLOWER=1 + else + for ac_func in towlower do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = x""yes; then : + ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" +if test "x$ac_cv_func_towlower" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 +#define HAVE_TOWLOWER 1 _ACEOF fi - done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : - $as_echo_n "(cached) " >&6 + if test $ac_cv_func_towlower = yes; then + REPLACE_TOWLOWER=0 + else + ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #if HAVE_WCTYPE_H + # include + #endif + +" +if test "x$ac_cv_have_decl_towlower" = xyes; then : + ac_have_decl=1 else - if test "$cross_compiling" = yes; then : - ac_cv_func_malloc_0_nonnull=no + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TOWLOWER $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_towlower = yes; then + REPLACE_TOWLOWER=1 + else + REPLACE_TOWLOWER=0 + fi + fi + fi + + + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then + : + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 +$as_echo_n "checking for wctype_t... " >&6; } +if ${gl_cv_type_wctype_t+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif +/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #if HAVE_WCTYPE_H + # include + #endif + wctype_t a; int main () { -return ! malloc (0); + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_malloc_0_nonnull=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_wctype_t=yes else - ac_cv_func_malloc_0_nonnull=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gl_cv_type_wctype_t=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then : - gl_cv_func_malloc_0_nonnull=1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 +$as_echo "$gl_cv_type_wctype_t" >&6; } + if test $gl_cv_type_wctype_t = no; then + HAVE_WCTYPE_T=0 + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 +$as_echo_n "checking for wctrans_t... " >&6; } +if ${gl_cv_type_wctrans_t+:} false; then : + $as_echo_n "(cached) " >&6 else - gl_cv_func_malloc_0_nonnull=0 -fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #include + wctrans_t a; +int +main () +{ -cat >>confdefs.h <<_ACEOF -#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_wctrans_t=yes +else + gl_cv_type_wctrans_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 +$as_echo "$gl_cv_type_wctrans_t" >&6; } + if test $gl_cv_type_wctrans_t = no; then + HAVE_WCTRANS_T=0 + fi - GNULIB_ACOSL=0; - GNULIB_ASINL=0; - GNULIB_ATANL=0; - GNULIB_CEIL=0; - GNULIB_CEILF=0; - GNULIB_CEILL=0; - GNULIB_COSL=0; - GNULIB_EXPL=0; - GNULIB_FLOOR=0; - GNULIB_FLOORF=0; - GNULIB_FLOORL=0; - GNULIB_FREXP=0; - GNULIB_FREXPL=0; - GNULIB_ISFINITE=0; - GNULIB_ISINF=0; - GNULIB_ISNAN=0; - GNULIB_ISNANF=0; - GNULIB_ISNAND=0; - GNULIB_ISNANL=0; - GNULIB_LDEXPL=0; - GNULIB_LOGB=0; - GNULIB_LOGL=0; - GNULIB_ROUND=0; - GNULIB_ROUNDF=0; - GNULIB_ROUNDL=0; - GNULIB_SIGNBIT=0; - GNULIB_SINL=0; - GNULIB_SQRTL=0; - GNULIB_TANL=0; - GNULIB_TRUNC=0; - GNULIB_TRUNCF=0; - GNULIB_TRUNCL=0; - HAVE_ACOSL=1; - HAVE_ASINL=1; - HAVE_ATANL=1; - HAVE_COSL=1; - HAVE_EXPL=1; - HAVE_ISNANF=1; - HAVE_ISNAND=1; - HAVE_ISNANL=1; - HAVE_LOGL=1; - HAVE_SINL=1; - HAVE_SQRTL=1; - HAVE_TANL=1; - HAVE_DECL_ACOSL=1; - HAVE_DECL_ASINL=1; - HAVE_DECL_ATANL=1; - HAVE_DECL_CEILF=1; - HAVE_DECL_CEILL=1; - HAVE_DECL_COSL=1; - HAVE_DECL_EXPL=1; - HAVE_DECL_FLOORF=1; - HAVE_DECL_FLOORL=1; - HAVE_DECL_FREXPL=1; - HAVE_DECL_LDEXPL=1; - HAVE_DECL_LOGB=1; - HAVE_DECL_LOGL=1; - HAVE_DECL_ROUND=1; - HAVE_DECL_ROUNDF=1; - HAVE_DECL_ROUNDL=1; - HAVE_DECL_SINL=1; - HAVE_DECL_SQRTL=1; - HAVE_DECL_TANL=1; - HAVE_DECL_TRUNC=1; - HAVE_DECL_TRUNCF=1; - HAVE_DECL_TRUNCL=1; - REPLACE_CEIL=0; - REPLACE_CEILF=0; - REPLACE_CEILL=0; - REPLACE_FLOOR=0; - REPLACE_FLOORF=0; - REPLACE_FLOORL=0; - REPLACE_FREXP=0; - REPLACE_FREXPL=0; - REPLACE_HUGE_VAL=0; - REPLACE_ISFINITE=0; - REPLACE_ISINF=0; - REPLACE_ISNAN=0; - REPLACE_LDEXPL=0; - REPLACE_NAN=0; - REPLACE_ROUND=0; - REPLACE_ROUNDF=0; - REPLACE_ROUNDL=0; - REPLACE_SIGNBIT=0; - REPLACE_SIGNBIT_USING_GCC=0; - REPLACE_TRUNC=0; - REPLACE_TRUNCF=0; - REPLACE_TRUNCL=0; + for gl_func in wctype iswctype wctrans towctrans ; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +# include +#endif +#include +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + eval ac_cv_have_decl_$gl_func=yes +fi + done @@ -12866,6 +14941,9 @@ _ACEOF + GNULIB_NL_LANGINFO=0; + HAVE_NL_LANGINFO=1; + REPLACE_NL_LANGINFO=0; @@ -12873,900 +14951,680 @@ _ACEOF + ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" +if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 -$as_echo_n "checking for a traditional japanese locale... " >&6; } -if test "${gt_cv_locale_ja+set}" = set; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 +$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } +if ${ac_cv_gnu_library_2_1+:} false; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif #endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#ifdef __UCLIBC__ + Lucky user #endif - /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales - on Cygwin 1.5.x. */ - if (MB_CUR_MAX == 1) - return 1; - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - return 0; -} _ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Note that on native Win32, the Japanese locale is Japanese_Japan.932, - # and CP932 is very different from EUC-JP, so we cannot use it here. - gt_cv_locale_ja=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP - else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC - else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja - else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP - else - # None found. - gt_cv_locale_ja=none - fi - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky" >/dev/null 2>&1; then : + ac_cv_gnu_library_2_1=yes +else + ac_cv_gnu_library_2_1=no +fi +rm -f conftest* + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 -$as_echo "$gt_cv_locale_ja" >&6; } - LOCALE_JA=$gt_cv_locale_ja +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 +$as_echo "$ac_cv_gnu_library_2_1" >&6; } + + GLIBC21="$ac_cv_gnu_library_2_1" + + + GNULIB_LOCALECONV=0; + GNULIB_SETLOCALE=0; + GNULIB_DUPLOCALE=0; + HAVE_DUPLOCALE=1; + REPLACE_LOCALECONV=0; + REPLACE_SETLOCALE=0; + REPLACE_DUPLOCALE=0; + REPLACE_STRUCT_LCONV=0; + REPLACE_NULL=0; + HAVE_WCHAR_T=1; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 -$as_echo_n "checking for a transitional chinese locale... " >&6; } -if test "${gt_cv_locale_zh_CN+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 +$as_echo_n "checking for wchar_t... " >&6; } +if ${gt_cv_c_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () +#include + wchar_t foo = (wchar_t)'\0'; +int +main () { - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - /* Check whether a typical GB18030 multibyte sequence is recognized as a - single wide character. This excludes the GB2312 and GBK encodings. */ - if (mblen ("\203\062\332\066", 5) != 4) - return 1; + + ; return 0; } - _ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Win32 locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac - else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none - fi - rm -fr conftest* - +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_wchar_t=yes +else + gt_cv_c_wchar_t=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 -$as_echo "$gt_cv_locale_zh_CN" >&6; } - LOCALE_ZH_CN=$gt_cv_locale_zh_CN +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 +$as_echo "$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then +$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 -$as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : + + + STDDEF_H= + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 +$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } +if ${gl_cv_decl_null_works+:} false; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + int test[2 * (sizeof NULL == sizeof (void *)) -1]; -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if !(defined __BEOS__ || defined __HAIKU__) - /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -# else - if (setlocale (LC_ALL, "") == NULL) return 1; -# endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -# if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -# endif -# ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') - return 1; -#endif - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; +int +main () +{ + + ; return 0; } - _ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Win32 locale name. - if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=French_France.65001 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr.UTF-8 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - fi - fi - ;; - esac - fi - rm -fr conftest* +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_decl_null_works=yes +else + gl_cv_decl_null_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 +$as_echo "$gl_cv_decl_null_works" >&6; } + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + STDDEF_H=stddef.h + fi + if test -n "$STDDEF_H"; then + GL_GENERATE_STDDEF_H_TRUE= + GL_GENERATE_STDDEF_H_FALSE='#' +else + GL_GENERATE_STDDEF_H_TRUE='#' + GL_GENERATE_STDDEF_H_FALSE= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 -$as_echo "$gt_cv_locale_fr_utf8" >&6; } - LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 + if test -n "$STDDEF_H"; then - GNULIB_MEMCHR=0; - GNULIB_MEMMEM=0; - GNULIB_MEMPCPY=0; - GNULIB_MEMRCHR=0; - GNULIB_RAWMEMCHR=0; - GNULIB_STPCPY=0; - GNULIB_STPNCPY=0; - GNULIB_STRCHRNUL=0; - GNULIB_STRDUP=0; - GNULIB_STRNCAT=0; - GNULIB_STRNDUP=0; - GNULIB_STRNLEN=0; - GNULIB_STRPBRK=0; - GNULIB_STRSEP=0; - GNULIB_STRSTR=0; - GNULIB_STRCASESTR=0; - GNULIB_STRTOK_R=0; - GNULIB_MBSLEN=0; - GNULIB_MBSNLEN=0; - GNULIB_MBSCHR=0; - GNULIB_MBSRCHR=0; - GNULIB_MBSSTR=0; - GNULIB_MBSCASECMP=0; - GNULIB_MBSNCASECMP=0; - GNULIB_MBSPCASECMP=0; - GNULIB_MBSCASESTR=0; - GNULIB_MBSCSPN=0; - GNULIB_MBSPBRK=0; - GNULIB_MBSSPN=0; - GNULIB_MBSSEP=0; - GNULIB_MBSTOK_R=0; - GNULIB_STRERROR=0; - GNULIB_STRERROR_R=0; - GNULIB_STRSIGNAL=0; - GNULIB_STRVERSCMP=0; - HAVE_MBSLEN=0; - HAVE_MEMCHR=1; - HAVE_DECL_MEMMEM=1; - HAVE_MEMPCPY=1; - HAVE_DECL_MEMRCHR=1; - HAVE_RAWMEMCHR=1; - HAVE_STPCPY=1; - HAVE_STPNCPY=1; - HAVE_STRCHRNUL=1; - HAVE_DECL_STRDUP=1; - HAVE_DECL_STRNDUP=1; - HAVE_DECL_STRNLEN=1; - HAVE_STRPBRK=1; - HAVE_STRSEP=1; - HAVE_STRCASESTR=1; - HAVE_DECL_STRTOK_R=1; - HAVE_DECL_STRERROR_R=1; - HAVE_DECL_STRSIGNAL=1; - HAVE_STRVERSCMP=1; - REPLACE_MEMCHR=0; - REPLACE_MEMMEM=0; - REPLACE_STPNCPY=0; - REPLACE_STRDUP=0; - REPLACE_STRSTR=0; - REPLACE_STRCASESTR=0; - REPLACE_STRERROR=0; - REPLACE_STRERROR_R=0; - REPLACE_STRNCAT=0; - REPLACE_STRNDUP=0; - REPLACE_STRNLEN=0; - REPLACE_STRSIGNAL=0; - REPLACE_STRTOK_R=0; - UNDEFINE_STRTOK_R=0; + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stddef_h='<'stddef.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_stddef_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'stddef.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + gl_header=$gl_cv_absolute_stddef_h + gl_cv_next_stddef_h='"'$gl_header'"' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 +$as_echo "$gl_cv_next_stddef_h" >&6; } + fi + NEXT_STDDEF_H=$gl_cv_next_stddef_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stddef.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stddef_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive + fi - # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it - # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is - # irrelevant for anonymous mappings. - ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = x""yes; then : - gl_have_mmap=yes -else - gl_have_mmap=no -fi + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" - # Try to allow MAP_ANONYMOUS. - gl_have_mmap_anonymous=no - if test $gl_have_mmap = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 -$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef MAP_ANONYMOUS - I cant identify this map. -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : - gl_have_mmap_anonymous=yes +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no fi -rm -f conftest* - - if test $gl_have_mmap_anonymous != yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef MAP_ANON - I cant identify this map. -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : -$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h - - gl_have_mmap_anonymous=yes +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } fi -rm -f conftest* - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 -$as_echo "$gl_have_mmap_anonymous" >&6; } - if test $gl_have_mmap_anonymous = yes; then - -$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + 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" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } +fi +if ${acl_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$LD"; then + 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 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 &5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if ${acl_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 &5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld - : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +$as_echo_n "checking for shared library run path origin... " >&6; } +if ${acl_cv_rpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +$as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; : +else + enable_rpath=yes +fi + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +$as_echo_n "checking for 64-bit host... " >&6; } +if ${gl_cv_solaris_64bit+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _LP64 +sixtyfour bits +#endif - : +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "sixtyfour bits" >/dev/null 2>&1; then : + gl_cv_solaris_64bit=yes +else + gl_cv_solaris_64bit=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 +$as_echo "$gl_cv_solaris_64bit" >&6; } + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" - if test $ac_cv_func_memchr = yes; then - # Detect platform-specific bugs in some versions of glibc: - # memchr should not dereference anything with length 0 - # http://bugzilla.redhat.com/499689 - # memchr should not dereference overestimated length after a match - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 - # Assume that memchr works on platforms that lack mprotect. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 -$as_echo_n "checking whether memchr works... " >&6; } -if test "${gl_cv_func_memchr_works+set}" = set; then : + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 +$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } +if ${gl_cv_have_weak+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - gl_cv_func_memchr_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gl_cv_have_weak=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#if HAVE_SYS_MMAN_H -# include -# include -# include -# include -# ifndef MAP_FILE -# define MAP_FILE 0 -# endif -#endif - +extern void xyzzy (); +#pragma weak xyzzy int main () { - - int result = 0; - char *fence = NULL; -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# if HAVE_MAP_ANONYMOUS - const int flags = MAP_ANONYMOUS | MAP_PRIVATE; - const int fd = -1; -# else /* !HAVE_MAP_ANONYMOUS */ - const int flags = MAP_FILE | MAP_PRIVATE; - int fd = open ("/dev/zero", O_RDONLY, 0666); - if (fd >= 0) -# endif - { - int pagesize = getpagesize (); - char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - fence = two_pages + pagesize; - } -#endif - if (fence) - { - if (memchr (fence, 0, 0)) - result |= 1; - strcpy (fence - 9, "12345678"); - if (memchr (fence - 9, 0, 79) != fence - 1) - result |= 2; - if (memchr (fence - 1, 0, 3) != fence - 1) - result |= 4; - } - return result; - +xyzzy(); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_memchr_works=yes -else - gl_cv_func_memchr_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_have_weak=maybe fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $gl_cv_have_weak = maybe; then + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __ELF__ + Extensible Linking Format + #endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : + gl_cv_have_weak="guessing yes" +else + gl_cv_have_weak="guessing no" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 -$as_echo "$gl_cv_func_memchr_works" >&6; } - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_MEMCHR=1 - fi - else - HAVE_MEMCHR=0 - fi - if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then - - - - - - - +rm -f conftest* - gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - for ac_header in bp-sym.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" -if test "x$ac_cv_header_bp_sym_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BP_SYM_H 1 +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +} _ACEOF - +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_have_weak=yes +else + gl_cv_have_weak=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -done - - - fi - + fi - ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" -if test "x$ac_cv_have_decl_memrchr" = x""yes; then : - ac_have_decl=1 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 +$as_echo "$gl_cv_have_weak" >&6; } + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. + ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" +if test "x$ac_cv_header_pthread_h" = xyes; then : + gl_have_pthread_h=yes else - ac_have_decl=0 + gl_have_pthread_h=no fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MEMRCHR $ac_have_decl -_ACEOF - - - - - - - - - GNULIB_MKTIME=0; - GNULIB_NANOSLEEP=0; - GNULIB_STRPTIME=0; - GNULIB_TIMEGM=0; - GNULIB_TIME_R=0; - HAVE_DECL_LOCALTIME_R=1; - HAVE_NANOSLEEP=1; - HAVE_STRPTIME=1; - HAVE_TIMEGM=1; - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; - REPLACE_MKTIME=GNULIB_PORTCHECK; - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; - REPLACE_TIMEGM=GNULIB_PORTCHECK; - - - - - - - - - - - - - - - - - # parse-datetime.y works with bison only. - : ${YACC='bison -y'} - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5 -$as_echo_n "checking for compound literals... " >&6; } -if test "${gl_cv_compound_literals+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + gl_have_pthread= + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -struct s { int i, j; }; +#include int main () { -struct s t = (struct s) { 3, 4 }; - if (t.i != 0) return 0; +pthread_mutex_lock((pthread_mutex_t*)0); + pthread_mutexattr_init((pthread_mutexattr_t*)0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_compound_literals=yes -else - gl_cv_compound_literals=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if ac_fn_c_try_link "$LINENO"; then : + gl_have_pthread=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5 -$as_echo "$gl_cv_compound_literals" >&6; } - if test $gl_cv_compound_literals = yes; then - -$as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h - - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test -n "$gl_have_pthread"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_kill+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); int main () { -struct tm tm; - int *p = &tm.tm_sec; - return !p; +return pthread_kill (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_tm=time.h +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_kill=yes else - ac_cv_struct_tm=sys/time.h -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_lib_pthread_pthread_kill=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + case "$host_os" in + solaris* | hpux*) +$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h - ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include -" -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : - -$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h + esac fi - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 -$as_echo_n "checking for long file names... " >&6; } -if test "${ac_cv_sys_long_file_names+set}" = set; then : + else + # Some library is needed. Try libpthread and libc_r. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 +$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_kill+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_sys_long_file_names=yes -# Test for long file names in all the places we know might matter: -# . the current directory, where building will happen -# $prefix/lib where we will be installing things -# $exec_prefix/lib likewise -# $TMPDIR if set, where it might want to write temporary files -# /tmp where it might want to write temporary files -# /var/tmp likewise -# /usr/tmp likewise -for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do - # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib - # in the usual case where exec_prefix is '${prefix}'. - case $ac_dir in #( - . | /* | ?:[\\/]*) ;; #( - *) continue;; - esac - test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. - ac_xdir=$ac_dir/cf$$ - (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue - ac_tf1=$ac_xdir/conftest9012345 - ac_tf2=$ac_xdir/conftest9012346 - touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || - ac_cv_sys_long_file_names=no - rm -f -r "$ac_xdir" 2>/dev/null - test $ac_cv_sys_long_file_names = no && break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 -$as_echo "$ac_cv_sys_long_file_names" >&6; } -if test $ac_cv_sys_long_file_names = yes; then - -$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h - -fi - - - - - + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -# Check whether --with-selinux was given. -if test "${with_selinux+set}" = set; then : - withval=$with_selinux; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_kill (); +int +main () +{ +return pthread_kill (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_kill=yes else - with_selinux=maybe + ac_cv_lib_pthread_pthread_kill=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } +if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : + gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread fi - - LIB_SELINUX= - if test "$with_selinux" != no; then - gl_save_LIBS=$LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5 -$as_echo_n "checking for library containing setfilecon... " >&6; } -if test "${ac_cv_search_setfilecon+set}" = set; then : + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 +$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } +if ${ac_cv_lib_c_r_pthread_kill+:} false; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc_r $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13776,293 +15634,676 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char setfilecon (); +char pthread_kill (); int main () { -return setfilecon (); +return pthread_kill (); ; return 0; } _ACEOF -for ac_lib in '' selinux; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_setfilecon=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_setfilecon+set}" = set; then : - break -fi -done -if test "${ac_cv_search_setfilecon+set}" = set; then : - +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_c_r_pthread_kill=yes else - ac_cv_search_setfilecon=no + ac_cv_lib_c_r_pthread_kill=no fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5 -$as_echo "$ac_cv_search_setfilecon" >&6; } -ac_res=$ac_cv_search_setfilecon -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - test "$ac_cv_search_setfilecon" = "none required" || - LIB_SELINUX=$ac_cv_search_setfilecon +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 +$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } +if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : + gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r fi - LIBS=$gl_save_LIBS - fi + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix +$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h - # Warn if SELinux is found but libselinux is absent; - if test "$ac_cv_search_setfilecon" = no && - test "$host" = "$build" && test -d /selinux; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5 -$as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU findutils will be compiled without SELinux support." >&5 -$as_echo "$as_me: WARNING: GNU findutils will be compiled without SELinux support." >&2;} - fi + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then +$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then + gl_have_solaristhread= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +int +main () +{ +thr_self(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_have_solaristhread=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" +$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_setenv" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi +$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SETENV $ac_have_decl -_ACEOF + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 +$as_echo_n "checking how to link with libpth... " >&6; } +if ${ac_cv_libpth_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else - : + use_additional=yes + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" - if test $ac_cv_have_decl_setenv = no; then - HAVE_DECL_SETENV=0 - fi + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" - : + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +# Check whether --with-libpth-prefix was given. +if test "${with_libpth_prefix+set}" = set; then : + withval=$with_libpth_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" - if test $ac_cv_func_setenv = no; then - HAVE_SETENV=0 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5 -$as_echo_n "checking whether setenv validates arguments... " >&6; } -if test "${gl_cv_func_setenv_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_setenv_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" - #include - #include - #include + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi -int -main () -{ +fi - int result = 0; - { - if (setenv ("", "", 0) != -1) - result |= 1; - else if (errno != EINVAL) - result |= 2; - } - { - if (setenv ("a", "=", 1) != 0) - result |= 4; - else if (strcmp (getenv ("a"), "=") != 0) - result |= 8; - } - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_setenv_works=yes -else - gl_cv_func_setenv_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + LIBPTH= + LTLIBPTH= + INCPTH= + LIBPTH_PREFIX= + HAVE_LIBPTH= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='pth ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBPTH; do -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5 -$as_echo "$gl_cv_func_setenv_works" >&6; } - if test "$gl_cv_func_setenv_works" != yes; then - REPLACE_SETENV=1 + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBPTH; do + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'pth'; then + LIBPTH_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCPTH; do + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBPTH; do + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBPTH; do - gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" + ;; + esac + done + fi + else + LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + done fi fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" + done + fi - : - - - - for ac_header in search.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default" -if test "x$ac_cv_header_search_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SEARCH_H 1 -_ACEOF + ac_cv_libpth_libs="$LIBPTH" + ac_cv_libpth_ltlibs="$LTLIBPTH" + ac_cv_libpth_cppflags="$INCPTH" + ac_cv_libpth_prefix="$LIBPTH_PREFIX" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 +$as_echo "$ac_cv_libpth_libs" >&6; } + LIBPTH="$ac_cv_libpth_libs" + LTLIBPTH="$ac_cv_libpth_ltlibs" + INCPTH="$ac_cv_libpth_cppflags" + LIBPTH_PREFIX="$ac_cv_libpth_prefix" -done - - for ac_func in tsearch -do : - ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" -if test "x$ac_cv_func_tsearch" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TSEARCH 1 -_ACEOF + for element in $INCPTH; do + haveit= + for x in $CPPFLAGS; do -fi -done + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5 -$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } -if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + HAVE_LIBPTH=yes - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # 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. - 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. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_snprintf_retval_c99="guessing no";; - openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on Solaris >= 2.10. - solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; - solaris*) gl_cv_func_printf_sizes_c99="guessing no";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; - aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_retval_c99="guessing no";; - netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_retval_c99="guessing no";; - esac -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBPTH" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -static char buf[100]; -int main () +#include +int +main () { - strcpy (buf, "ABCDEF"); - if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) - return 1; - if (snprintf (buf, 0, "%d %d", 4567, 89) != 7) - return 2; - if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7) - return 3; +pth_self(); + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_snprintf_retval_c99=yes -else - gl_cv_func_snprintf_retval_c99=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if ac_fn_c_try_link "$LINENO"; then : + gl_have_pth=yes fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" +$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5 -$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then +$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h - ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_snprintf" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + LIBTHREAD= + LTLIBTHREAD= + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi + fi + if test -z "$gl_have_pthread"; then + case "$gl_use_threads" in + yes | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SNPRINTF $ac_have_decl -_ACEOF +$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h + fi + ;; + esac + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 +$as_echo_n "checking for multithread API to use... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 +$as_echo "$gl_threads_api" >&6; } - HAVE_STRCASECMP=1; - HAVE_DECL_STRNCASECMP=1; @@ -14070,188 +16311,163 @@ _ACEOF - for ac_func in strcasestr -do : - ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" -if test "x$ac_cv_func_strcasestr" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRCASESTR 1 -_ACEOF -fi -done - if test $ac_cv_func_strcasestr = no; then - HAVE_STRCASESTR=0 - else - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRCASESTR=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5 -$as_echo_n "checking whether strcasestr works... " >&6; } -if test "${gl_cv_func_strcasestr_works_always+set}" = set; then : + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __GNU_LIBRARY__ - #include - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - || defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user -#endif + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_strcasestr_works_always=yes + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi else - gl_cv_func_strcasestr_works_always="guessing no" + ac_cv_path_SED=$SED fi -rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 +$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } +if ${gl_cv_func_malloc_posix+:} false; then : + $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include /* for strcasestr */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int main () { -return !!strcasestr (HAYSTACK, NEEDLE); +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + choke me + #endif ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strcasestr_works_always=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_malloc_posix=yes else - gl_cv_func_strcasestr_works_always=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gl_cv_func_malloc_posix=no fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5 -$as_echo "$gl_cv_func_strcasestr_works_always" >&6; } - if test "$gl_cv_func_strcasestr_works_always" != yes; then - REPLACE_STRCASESTR=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" - - fi - fi - fi - if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" - - - : - - fi - - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 +$as_echo "$gl_cv_func_malloc_posix" >&6; } - ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" -if test "x$ac_cv_have_decl_strdup" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRDUP $ac_have_decl + for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 _ACEOF +fi +done - - - - - - - - if test -z "$ERRNO_H"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 -$as_echo_n "checking for working strerror function... " >&6; } -if test "${gl_cv_func_working_strerror+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -return !*strerror (-2); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_working_strerror=yes -else - gl_cv_func_working_strerror=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ + | hpux* | solaris* | cygwin* | mingw*) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include + #else + char *malloc (); + #endif int main () { -return !*strerror (-2); +return ! malloc (0); ; return 0; } + _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_working_strerror=yes + ac_cv_func_malloc_0_nonnull=yes else - gl_cv_func_working_strerror=no + ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -14259,50 +16475,21 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5 -$as_echo "$gl_cv_func_working_strerror" >&6; } - if test $gl_cv_func_working_strerror = no; then - REPLACE_STRERROR=1 - fi - else - REPLACE_STRERROR=1 - fi - if test $REPLACE_STRERROR = 1; then - - ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" -if test "x$ac_cv_have_decl_strerror" = x""yes; then : - ac_have_decl=1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } + if test $ac_cv_func_malloc_0_nonnull = yes; then : + gl_cv_func_malloc_0_nonnull=1 else - ac_have_decl=0 + gl_cv_func_malloc_0_nonnull=0 fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRERROR $ac_have_decl -_ACEOF - - - : - - - - - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WINSOCK2_H 1 +cat >>confdefs.h <<_ACEOF +#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull _ACEOF -fi - -done - fi - fi @@ -14320,244 +16507,486 @@ done - if test $gl_cv_have_include_next = yes; then - gl_cv_next_string_h='<'string.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_string_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 +$as_echo_n "checking for a traditional japanese locale... " >&6; } +if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/string.h#{ - s#.*"\(.*/string.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 -$as_echo "$gl_cv_next_string_h" >&6; } - fi - NEXT_STRING_H=$gl_cv_next_string_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'string.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_string_h - fi - NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive - - - - - - - for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include #include - -int -main () +struct tm t; +char buf[16]; +int main () { -#undef $gl_func - (void) $gl_func; - ; + const char *p; + /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else + if (setlocale (LC_ALL, "") == NULL) return 1; +#endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +#if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +#endif +#ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#endif + /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales + on Cygwin 1.5.x. */ + if (MB_CUR_MAX == 1) + return 1; + /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. + This excludes the UTF-8 encoding (except on MirBSD). */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Note that on native Windows, the Japanese locale is + # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we + # cannot use it here. + gt_cv_locale_ja=none + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the AIX locale name. + if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.EUC-JP + else + # Test for the HP-UX, OSF/1, NetBSD locale name. + if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.eucJP + else + # Test for the IRIX, FreeBSD locale name. + if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.EUC + else + # Test for the Solaris 7 locale name. + if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja + else + # Special test for NetBSD 1.6. + if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then + gt_cv_locale_ja=ja_JP.eucJP + else + # None found. + gt_cv_locale_ja=none + fi + fi + fi + fi + fi + fi + ;; + esac + fi + rm -fr conftest* - eval ac_cv_have_decl_$gl_func=yes fi - done - - - - - - - - - - - - - - - - : - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 +$as_echo "$gt_cv_locale_ja" >&6; } + LOCALE_JA=$gt_cv_locale_ja - if test $gl_cv_have_include_next = yes; then - gl_cv_next_strings_h='<'strings.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_strings_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 +$as_echo_n "checking for a transitional chinese locale... " >&6; } +if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_strings_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/strings.h#{ - s#.*"\(.*/strings.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_strings_h='<'strings.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5 -$as_echo "$gl_cv_next_strings_h" >&6; } - fi - NEXT_STRINGS_H=$gl_cv_next_strings_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'strings.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_strings_h - fi - NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive - - - - - - for gl_func in strcasecmp strncasecmp; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () +#include +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { -#undef $gl_func - (void) $gl_func; - ; + const char *p; + /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else + if (setlocale (LC_ALL, "") == NULL) return 1; +#endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +#if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +#endif +#ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#endif + /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. + This excludes the UTF-8 encoding (except on MirBSD). */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + /* Check whether a typical GB18030 multibyte sequence is recognized as a + single wide character. This excludes the GB2312 and GBK encodings. */ + if (mblen ("\203\062\332\066", 5) != 4) + return 1; return 0; } + _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=Chinese_China.54936 + else + # None found. + gt_cv_locale_zh_CN=none + fi + ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. + gt_cv_locale_zh_CN=none + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the locale name without encoding suffix. + if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN.GB18030 + else + # None found. + gt_cv_locale_zh_CN=none + fi + fi + ;; + esac + else + # If there was a link error, due to mblen(), the system is so old that + # it certainly doesn't have a chinese locale. + gt_cv_locale_zh_CN=none + fi + rm -fr conftest* - eval ac_cv_have_decl_$gl_func=yes fi - done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 +$as_echo "$gt_cv_locale_zh_CN" >&6; } + LOCALE_ZH_CN=$gt_cv_locale_zh_CN - ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" -if test "x$ac_cv_have_decl_strndup" = x""yes; then : - ac_have_decl=1 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 +$as_echo_n "checking for a french Unicode locale... " >&6; } +if ${gt_cv_locale_fr_utf8+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRNDUP $ac_have_decl -_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if !(defined __BEOS__ || defined __HAIKU__) + /* Check whether the given locale name is recognized by the system. */ +# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +# else + if (setlocale (LC_ALL, "") == NULL) return 1; +# endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. */ +# if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + return 1; + } +# endif +# ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +# endif + /* Check whether in the abbreviation of the second month, the second + character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is + two bytes long, with UTF-8 encoding. */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%b", &t) < 4 + || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') + return 1; +#endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ + /* Check whether the decimal separator is a comma. + On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point + are nl_langinfo(RADIXCHAR) are both ".". */ + if (localeconv () ->decimal_point[0] != ',') return 1; +#endif + return 0; +} +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=French_France.65001 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR.UTF-8 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr.UTF-8 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + fi + fi + ;; + esac + fi + rm -fr conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 +$as_echo "$gt_cv_locale_fr_utf8" >&6; } + LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 + GNULIB_FFSL=0; + GNULIB_FFSLL=0; + GNULIB_MEMCHR=0; + GNULIB_MEMMEM=0; + GNULIB_MEMPCPY=0; + GNULIB_MEMRCHR=0; + GNULIB_RAWMEMCHR=0; + GNULIB_STPCPY=0; + GNULIB_STPNCPY=0; + GNULIB_STRCHRNUL=0; + GNULIB_STRDUP=0; + GNULIB_STRNCAT=0; + GNULIB_STRNDUP=0; + GNULIB_STRNLEN=0; + GNULIB_STRPBRK=0; + GNULIB_STRSEP=0; + GNULIB_STRSTR=0; + GNULIB_STRCASESTR=0; + GNULIB_STRTOK_R=0; + GNULIB_MBSLEN=0; + GNULIB_MBSNLEN=0; + GNULIB_MBSCHR=0; + GNULIB_MBSRCHR=0; + GNULIB_MBSSTR=0; + GNULIB_MBSCASECMP=0; + GNULIB_MBSNCASECMP=0; + GNULIB_MBSPCASECMP=0; + GNULIB_MBSCASESTR=0; + GNULIB_MBSCSPN=0; + GNULIB_MBSPBRK=0; + GNULIB_MBSSPN=0; + GNULIB_MBSSEP=0; + GNULIB_MBSTOK_R=0; + GNULIB_STRERROR=0; + GNULIB_STRERROR_R=0; + GNULIB_STRSIGNAL=0; + GNULIB_STRVERSCMP=0; + HAVE_MBSLEN=0; + HAVE_FFSL=1; + HAVE_FFSLL=1; + HAVE_MEMCHR=1; + HAVE_DECL_MEMMEM=1; + HAVE_MEMPCPY=1; + HAVE_DECL_MEMRCHR=1; + HAVE_RAWMEMCHR=1; + HAVE_STPCPY=1; + HAVE_STPNCPY=1; + HAVE_STRCHRNUL=1; + HAVE_DECL_STRDUP=1; + HAVE_DECL_STRNDUP=1; + HAVE_DECL_STRNLEN=1; + HAVE_STRPBRK=1; + HAVE_STRSEP=1; + HAVE_STRCASESTR=1; + HAVE_DECL_STRTOK_R=1; + HAVE_DECL_STRERROR_R=1; + HAVE_DECL_STRSIGNAL=1; + HAVE_STRVERSCMP=1; + REPLACE_MEMCHR=0; + REPLACE_MEMMEM=0; + REPLACE_STPNCPY=0; + REPLACE_STRDUP=0; + REPLACE_STRSTR=0; + REPLACE_STRCASESTR=0; + REPLACE_STRCHRNUL=0; + REPLACE_STRERROR=0; + REPLACE_STRERROR_R=0; + REPLACE_STRNCAT=0; + REPLACE_STRNDUP=0; + REPLACE_STRNLEN=0; + REPLACE_STRSIGNAL=0; + REPLACE_STRTOK_R=0; + UNDEFINE_STRTOK_R=0; - ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" -if test "x$ac_cv_have_decl_strnlen" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRNLEN $ac_have_decl -_ACEOF - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRSTR=1 @@ -14566,320 +16995,292 @@ _ACEOF - gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 -$as_echo_n "checking whether strstr works... " >&6; } -if test "${gl_cv_func_strstr_works_always+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNU_LIBRARY__ - #include - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - || defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_strstr_works_always=yes + # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it + # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is + # irrelevant for anonymous mappings. + ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" +if test "x$ac_cv_func_mmap" = xyes; then : + gl_have_mmap=yes else - gl_cv_func_strstr_works_always="guessing no" + gl_have_mmap=no fi -rm -f conftest* -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Try to allow MAP_ANONYMOUS. + gl_have_mmap_anonymous=no + if test $gl_have_mmap = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 +$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include /* for strstr */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P - -int -main () -{ -return !!strstr (HAYSTACK, NEEDLE); +#include +#ifdef MAP_ANONYMOUS + I cannot identify this map +#endif - ; - return 0; -} _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strstr_works_always=yes -else - gl_cv_func_strstr_works_always=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : + gl_have_mmap_anonymous=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 -$as_echo "$gl_cv_func_strstr_works_always" >&6; } - if test "$gl_cv_func_strstr_works_always" != yes; then - REPLACE_STRSTR=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - - fi - fi +rm -f conftest* -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 -$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if test "${ac_cv_header_stat_broken+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $gl_have_mmap_anonymous != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include - -#if defined S_ISBLK && defined S_IFDIR -extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; -#endif - -#if defined S_ISBLK && defined S_IFCHR -extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; -#endif - -#if defined S_ISLNK && defined S_IFREG -extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; -#endif -#if defined S_ISSOCK && defined S_IFREG -extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; +#include +#ifdef MAP_ANON + I cannot identify this map #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stat_broken=no -else - ac_cv_header_stat_broken=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 -$as_echo "$ac_cv_header_stat_broken" >&6; } -if test $ac_cv_header_stat_broken = yes; then +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : -$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h +$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h + gl_have_mmap_anonymous=yes fi +rm -f conftest* + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 +$as_echo "$gl_have_mmap_anonymous" >&6; } + if test $gl_have_mmap_anonymous = yes; then +$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h + fi + fi + : - GNULIB_WAITPID=0; - + : - : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : + if test $HAVE_MEMCHR = 1; then + # Detect platform-specific bugs in some versions of glibc: + # memchr should not dereference anything with length 0 + # http://bugzilla.redhat.com/499689 + # memchr should not dereference overestimated length after a match + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 + # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 + # Assume that memchr works on platforms that lack mprotect. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 +$as_echo_n "checking whether memchr works... " >&6; } +if ${gl_cv_func_memchr_works+:} false; then : $as_echo_n "(cached) " >&6 else + if test "$cross_compiling" = yes; then : + gl_cv_func_memchr_works="guessing no" +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#include +#if HAVE_SYS_MMAN_H +# include +# include +# include +# include +# ifndef MAP_FILE +# define MAP_FILE 0 +# endif +#endif int main () { -static struct timespec x; x.tv_sec = x.tv_nsec; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_time_h=yes -else - gl_cv_sys_struct_timespec_in_time_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } - TIME_H_DEFINES_STRUCT_TIMESPEC=0 - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 - if test $gl_cv_sys_struct_timespec_in_time_h = yes; then - TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + int result = 0; + char *fence = NULL; +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT +# if HAVE_MAP_ANONYMOUS + const int flags = MAP_ANONYMOUS | MAP_PRIVATE; + const int fd = -1; +# else /* !HAVE_MAP_ANONYMOUS */ + const int flags = MAP_FILE | MAP_PRIVATE; + int fd = open ("/dev/zero", O_RDONLY, 0666); + if (fd >= 0) +# endif + { + int pagesize = getpagesize (); + char *two_pages = + (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, + flags, fd, 0); + if (two_pages != (char *)(-1) + && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) + fence = two_pages + pagesize; + } +#endif + if (fence) + { + if (memchr (fence, 0, 0)) + result |= 1; + strcpy (fence - 9, "12345678"); + if (memchr (fence - 9, 0, 79) != fence - 1) + result |= 2; + if (memchr (fence - 1, 0, 3) != fence - 1) + result |= 4; + } + return result; -int -main () -{ -static struct timespec x; x.tv_sec = x.tv_nsec; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_sys_time_h=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_memchr_works=yes else - gl_cv_sys_struct_timespec_in_sys_time_h=no + gl_cv_func_memchr_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -static struct timespec x; x.tv_sec = x.tv_nsec; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_pthread_h=yes -else - gl_cv_sys_struct_timespec_in_pthread_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 +$as_echo "$gl_cv_func_memchr_works" >&6; } + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_MEMCHR=1 fi fi + ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" +if test "x$ac_cv_have_decl_memrchr" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MEMRCHR $ac_have_decl +_ACEOF + GNULIB_MKTIME=0; + GNULIB_NANOSLEEP=0; + GNULIB_STRPTIME=0; + GNULIB_TIMEGM=0; + GNULIB_TIME_R=0; + HAVE_DECL_LOCALTIME_R=1; + HAVE_NANOSLEEP=1; + HAVE_STRPTIME=1; + HAVE_TIMEGM=1; + REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; + REPLACE_MKTIME=GNULIB_PORTCHECK; + REPLACE_NANOSLEEP=GNULIB_PORTCHECK; + REPLACE_TIMEGM=GNULIB_PORTCHECK; + : ${GNULIB_GETTIMEOFDAY=0}; + REPLACE_GMTIME=0; + REPLACE_LOCALTIME=0; - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_time_h='<'time.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_time_h+set}" = set; then : - $as_echo_n "(cached) " >&6 + ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" +if test "x$ac_cv_have_decl_alarm" = xyes; then : + ac_have_decl=1 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/time.h#{ - s#.*"\(.*/time.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - - + ac_have_decl=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 -$as_echo "$gl_cv_next_time_h" >&6; } - fi - NEXT_TIME_H=$gl_cv_next_time_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'time.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_time_h - fi - NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ALARM $ac_have_decl +_ACEOF - ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : + ac_fn_c_check_decl "$LINENO" "trunc" "ac_cv_have_decl_trunc" "#include +" +if test "x$ac_cv_have_decl_trunc" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_LOCALTIME_R $ac_have_decl +#define HAVE_DECL_TRUNC $ac_have_decl _ACEOF + if test "$ac_cv_have_decl_trunc" = yes; then + TRUNC_LIBM=? + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + double x; +int +main () +{ +x = trunc(x); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + TRUNC_LIBM= +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$TRUNC_LIBM" = "?"; then + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + double x; +int +main () +{ +x = trunc(x); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + TRUNC_LIBM="-lm" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$save_LIBS" + fi + if test "$TRUNC_LIBM" = "?"; then + TRUNC_LIBM= + fi + else + HAVE_DECL_TRUNC=0 + fi + if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then + TRUNC_LIBM= + fi @@ -14892,195 +17293,262 @@ _ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if ${ac_cv_header_stdbool_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + struct s { _Bool s: 1; _Bool t; } s; + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; -gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} -i\ -0 -q -' -gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} -i\ -0 -q -' -gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} -i\ -0 -q -' - - - if test "$HAVE_LIBUNISTRING" = yes; then - LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` - LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` - LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` - fi +int +main () +{ + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); - ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_unsetenv" = x""yes; then : - ac_have_decl=1 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdbool_h=yes else - ac_have_decl=0 + ac_cv_header_stdbool_h=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_UNSETENV $ac_have_decl +#define HAVE__BOOL 1 _ACEOF +fi + # Define two additional variables used in the Makefile substitution. + if test "$ac_cv_header_stdbool_h" = yes; then + STDBOOL_H='' + else + STDBOOL_H='stdbool.h' + fi + if test -n "$STDBOOL_H"; then + GL_GENERATE_STDBOOL_H_TRUE= + GL_GENERATE_STDBOOL_H_FALSE='#' +else + GL_GENERATE_STDBOOL_H_TRUE='#' + GL_GENERATE_STDBOOL_H_FALSE= +fi - - - - : - - - - - - if test $ac_cv_header_features_h = yes; then - HAVE_FEATURES_H=1 + if test "$ac_cv_type__Bool" = yes; then + HAVE__BOOL=1 else - HAVE_FEATURES_H=0 + HAVE__BOOL=0 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 -$as_echo_n "checking for inttypes.h... " >&6; } -if test "${gl_cv_header_inttypes_h+set}" = set; then : + # parse-datetime.y works with bison only. + : ${YACC='bison -y'} + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5 +$as_echo_n "checking for compound literals... " >&6; } +if ${gl_cv_compound_literals+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include - +struct s { int i, j; }; int main () { -uintmax_t i = (uintmax_t) -1; return !i; +struct s t = (struct s) { 3, 4 }; + if (t.i != 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_inttypes_h=yes + gl_cv_compound_literals=yes else - gl_cv_header_inttypes_h=no + gl_cv_compound_literals=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5 -$as_echo "$gl_cv_header_inttypes_h" >&6; } - if test $gl_cv_header_inttypes_h = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5 +$as_echo "$gl_cv_compound_literals" >&6; } + if test $gl_cv_compound_literals = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 -_ACEOF +$as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 -$as_echo_n "checking for stdint.h... " >&6; } -if test "${gl_cv_header_stdint_h+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #include +#include + int main () { -uintmax_t i = (uintmax_t) -1; return !i; +struct tm tm; + int *p = &tm.tm_sec; + return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_stdint_h=yes + ac_cv_struct_tm=time.h else - gl_cv_header_stdint_h=no + ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 -$as_echo "$gl_cv_header_stdint_h" >&6; } - if test $gl_cv_header_stdint_h = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then -cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H_WITH_UINTMAX 1 -_ACEOF +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h + +fi - fi + ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include +" +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : +$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 -$as_echo_n "checking for intmax_t... " >&6; } -if test "${gt_cv_c_intmax_t+set}" = set; then : + + + REPLACE_STRERROR_0=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 +$as_echo_n "checking whether strerror(0) succeeds... " >&6; } +if ${gl_cv_func_strerror_0_works+:} false; then : $as_echo_n "(cached) " >&6 else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_strerror_0_works="guessing no" ;; + esac + +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -#if HAVE_STDINT_H_WITH_UINTMAX -#include -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include -#endif +#include + #include int main () { -intmax_t x = -1; return !x; +int result = 0; + char *str; + errno = 0; + str = strerror (0); + if (!*str) result |= 1; + if (errno) result |= 2; + if (strstr (str, "nknown") || strstr (str, "ndefined")) + result |= 4; + return result; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_intmax_t=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strerror_0_works=yes else - gt_cv_c_intmax_t=no + gl_cv_func_strerror_0_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 -$as_echo "$gt_cv_c_intmax_t" >&6; } - if test $gt_cv_c_intmax_t = yes; then -$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h - else +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 +$as_echo "$gl_cv_func_strerror_0_works" >&6; } + case "$gl_cv_func_strerror_0_works" in + *yes) ;; + *) + REPLACE_STRERROR_0=1 - test $ac_cv_type_long_long_int = yes \ - && ac_type='long long' \ - || ac_type='long' +$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define intmax_t $ac_type -_ACEOF + ;; + esac - fi @@ -15088,95 +17556,172 @@ _ACEOF - for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -fi -done - ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include -" -if test "x$ac_cv_have_decl__snprintf" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SNPRINTF $ac_have_decl -_ACEOF - case "$gl_cv_func_snprintf_retval_c99" in - *yes) -$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h - ;; - esac + + : + + if test $ac_cv_func_strerror_r = yes; then + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5 +$as_echo_n "checking for strerror_r with POSIX signature... " >&6; } +if ${gl_cv_func_strerror_r_posix_signature+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int strerror_r (int, char *, size_t); +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_strerror_r_posix_signature=yes +else + gl_cv_func_strerror_r_posix_signature=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5 +$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; } + if test $gl_cv_func_strerror_r_posix_signature = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5 +$as_echo_n "checking whether strerror_r works... " >&6; } +if ${gl_cv_func_strerror_r_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess no on AIX. + aix*) gl_cv_func_strerror_r_works="guessing no";; + # Guess no on HP-UX. + hpux*) gl_cv_func_strerror_r_works="guessing no";; + # Guess no on BSD variants. + *bsd*) gl_cv_func_strerror_r_works="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_strerror_r_works="guessing yes";; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ +int result = 0; + char buf[79]; + if (strerror_r (EACCES, buf, 0) < 0) + result |= 1; + errno = 0; + if (strerror_r (EACCES, buf, sizeof buf) != 0) + result |= 2; + strcpy (buf, "Unknown"); + if (strerror_r (0, buf, sizeof buf) != 0) + result |= 4; + if (errno) + result |= 8; + if (strstr (buf, "nknown") || strstr (buf, "ndefined")) + result |= 0x10; + errno = 0; + *buf = 0; + if (strerror_r (-3, buf, sizeof buf) < 0) + result |= 0x20; + if (errno) + result |= 0x40; + if (!*buf) + result |= 0x80; + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strerror_r_works=yes +else + gl_cv_func_strerror_r_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 +$as_echo "$gl_cv_func_strerror_r_works" >&6; } + else + : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5 -$as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; } -if test "${gl_cv_func_ungetc_works+set}" = set; then : + if test $ac_cv_func___xpg_strerror_r = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5 +$as_echo_n "checking whether __xpg_strerror_r works... " >&6; } +if ${gl_cv_func_strerror_r_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - gl_cv_func_ungetc_works='guessing no' + gl_cv_func_strerror_r_works="guessing no" + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include +#include + #include + extern + #ifdef __cplusplus + "C" + #endif + int __xpg_strerror_r(int, char *, size_t); int main () { -FILE *f; - if (!(f = fopen ("conftest.tmp", "w+"))) return 1; - if (fputs ("abc", f) < 0) return 2; - rewind (f); - if (fgetc (f) != 'a') return 3; - if (fgetc (f) != 'b') return 4; - if (ungetc ('d', f) != 'd') return 5; - if (ftell (f) != 1) return 6; - if (fgetc (f) != 'd') return 7; - if (ftell (f) != 2) return 8; - if (fseek (f, 0, SEEK_CUR) != 0) return 9; - if (ftell (f) != 2) return 10; - if (fgetc (f) != 'c') return 11; - fclose (f); remove ("conftest.tmp"); +int result = 0; + char buf[256] = "^"; + char copy[256]; + char *str = strerror (-1); + strcpy (copy, str); + if (__xpg_strerror_r (-2, buf, 1) == 0) + result |= 1; + if (*buf) + result |= 2; + __xpg_strerror_r (-2, buf, 256); + if (strcmp (str, copy)) + result |= 4; + return result; + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_ungetc_works=yes + gl_cv_func_strerror_r_works=yes else - gl_cv_func_ungetc_works=no + gl_cv_func_strerror_r_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -15184,697 +17729,699 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5 -$as_echo "$gl_cv_func_ungetc_works" >&6; } - if test "$gl_cv_func_ungetc_works" != yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 +$as_echo "$gl_cv_func_strerror_r_works" >&6; } + fi + fi + fi + fi -$as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h - fi + ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" +if test "x$ac_cv_have_decl_strerror_r" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRERROR_R $ac_have_decl +_ACEOF -ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = x""yes; then : -else -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF -fi + : + if test $ac_cv_have_decl_strerror_r = no; then + HAVE_DECL_STRERROR_R=0 + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 -$as_echo_n "checking for LC_MESSAGES... " >&6; } -if test "${gt_cv_val_LC_MESSAGES+set}" = set; then : + if test $ac_cv_func_strerror_r = yes; then + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test $gl_cv_func_strerror_r_posix_signature = yes; then + case "$gl_cv_func_strerror_r_works" in + *no) REPLACE_STRERROR_R=1 ;; + esac + else + REPLACE_STRERROR_R=1 + fi + else + REPLACE_STRERROR_R=1 + fi + fi + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 +$as_echo_n "checking for ssize_t... " >&6; } +if ${gt_cv_ssize_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { -return LC_MESSAGES +int x = sizeof (ssize_t *) + sizeof (ssize_t); + return !x; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gt_cv_val_LC_MESSAGES=yes +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_ssize_t=yes else - gt_cv_val_LC_MESSAGES=no + gt_cv_ssize_t=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5 -$as_echo "$gt_cv_val_LC_MESSAGES" >&6; } - if test $gt_cv_val_LC_MESSAGES = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 +$as_echo "$gt_cv_ssize_t" >&6; } + if test $gt_cv_ssize_t = no; then -$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h +$as_echo "#define ssize_t int" >>confdefs.h fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 -$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 +$as_echo_n "checking for long file names... " >&6; } +if ${ac_cv_sys_long_file_names+:} false; then : $as_echo_n "(cached) " >&6 else - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -CFPreferencesCopyAppValue(NULL, NULL) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gt_cv_func_CFPreferencesCopyAppValue=yes -else - gt_cv_func_CFPreferencesCopyAppValue=no + ac_cv_sys_long_file_names=yes +# Test for long file names in all the places we know might matter: +# . the current directory, where building will happen +# $prefix/lib where we will be installing things +# $exec_prefix/lib likewise +# $TMPDIR if set, where it might want to write temporary files +# /tmp where it might want to write temporary files +# /var/tmp likewise +# /usr/tmp likewise +for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do + # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib + # in the usual case where exec_prefix is '${prefix}'. + case $ac_dir in #( + . | /* | ?:[\\/]*) ;; #( + *) continue;; + esac + test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. + ac_xdir=$ac_dir/cf$$ + (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue + ac_tf1=$ac_xdir/conftest9012345 + ac_tf2=$ac_xdir/conftest9012346 + touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || + ac_cv_sys_long_file_names=no + rm -f -r "$ac_xdir" 2>/dev/null + test $ac_cv_sys_long_file_names = no && break +done fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 +$as_echo "$ac_cv_sys_long_file_names" >&6; } +if test $ac_cv_sys_long_file_names = yes; then + +$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 -$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 -$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then : + + + + + + + + + +# Check whether --with-selinux was given. +if test "${with_selinux+set}" = set; then : + withval=$with_selinux; +else + with_selinux=maybe +fi + + + LIB_SELINUX= + if test "$with_selinux" != no; then + gl_save_LIBS=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5 +$as_echo_n "checking for library containing setfilecon... " >&6; } +if ${ac_cv_search_setfilecon+:} false; then : $as_echo_n "(cached) " >&6 else - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char setfilecon (); int main () { -CFLocaleCopyCurrent(); +return setfilecon (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gt_cv_func_CFLocaleCopyCurrent=yes -else - gt_cv_func_CFLocaleCopyCurrent=no +for ac_lib in '' selinux; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_setfilecon=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" + conftest$ac_exeext + if ${ac_cv_search_setfilecon+:} false; then : + break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 -$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then +done +if ${ac_cv_search_setfilecon+:} false; then : -$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h +else + ac_cv_search_setfilecon=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5 +$as_echo "$ac_cv_search_setfilecon" >&6; } +ac_res=$ac_cv_search_setfilecon +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_cv_search_setfilecon" = "none required" || + LIB_SELINUX=$ac_cv_search_setfilecon +fi + LIBS=$gl_save_LIBS fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + + + # Warn if SELinux is found but libselinux is absent; + if test "$ac_cv_search_setfilecon" = no; then + if test "$host" = "$build" && test -d /selinux; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5 +$as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU findutils will be compiled without SELinux support." >&5 +$as_echo "$as_me: WARNING: GNU findutils will be compiled without SELinux support." >&2;} + fi + with_selinux=no fi - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which - # contains only /bin. Note that ksh looks also at the FPATH variable, - # so we have to set that as well for the test. - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - || PATH_SEPARATOR=';' - } -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 -$as_echo_n "checking for ld used by GCC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - 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 - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${acl_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - 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. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; - esac - fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi -LD="$acl_cv_path_LD" -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${acl_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 + ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" +if test "x$ac_cv_have_decl_setenv" = xyes; then : + ac_have_decl=1 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$acl_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$acl_cv_prog_gnu_ld +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SETENV $ac_have_decl +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 -$as_echo_n "checking for shared library run path origin... " >&6; } -if test "${acl_cv_rpath+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 -$as_echo "$acl_cv_rpath" >&6; } - wl="$acl_cv_wl" - acl_libext="$acl_cv_libext" - acl_shlibext="$acl_cv_shlibext" - acl_libname_spec="$acl_cv_libname_spec" - acl_library_names_spec="$acl_cv_library_names_spec" - acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - acl_hardcode_direct="$acl_cv_hardcode_direct" - acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" - # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : - enableval=$enable_rpath; : -else - enable_rpath=yes -fi - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 -$as_echo_n "checking for 64-bit host... " >&6; } -if test "${gl_cv_solaris_64bit+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef _LP64 -sixtyfour bits -#endif + : -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sixtyfour bits" >/dev/null 2>&1; then : - gl_cv_solaris_64bit=yes -else - gl_cv_solaris_64bit=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 -$as_echo "$gl_cv_solaris_64bit" >&6; } - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + if test $ac_cv_have_decl_setenv = no; then + HAVE_DECL_SETENV=0 + fi - gl_threads_api=none - LIBTHREAD= - LTLIBTHREAD= - LIBMULTITHREAD= - LTLIBMULTITHREAD= - if test "$gl_use_threads" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 -$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } -if test "${gl_cv_have_weak+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - gl_cv_have_weak=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern void xyzzy (); -#pragma weak xyzzy -int -main () -{ -xyzzy(); - ; - return 0; -} + : + + + + + + + + + + : + + + + + + for ac_header in search.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default" +if test "x$ac_cv_header_search_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SEARCH_H 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_have_weak=maybe + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test $gl_cv_have_weak = maybe; then - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __ELF__ - Extensible Linking Format - #endif +done + + for ac_func in tsearch +do : + ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" +if test "x$ac_cv_func_tsearch" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_TSEARCH 1 _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : - gl_cv_have_weak="guessing yes" -else - gl_cv_have_weak="guessing no" + fi -rm -f conftest* +done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#pragma weak fputs -int main () -{ - return (fputs == NULL); -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_have_weak=yes -else - gl_cv_have_weak=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 -$as_echo "$gl_cv_have_weak" >&6; } - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = x""yes; then : - gl_have_pthread_h=yes -else - gl_have_pthread_h=no -fi - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -pthread_mutex_lock((pthread_mutex_t*)0); - pthread_mutexattr_init((pthread_mutexattr_t*)0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_have_pthread=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 -$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then : + + + + : + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5 +$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } +if ${gl_cv_func_snprintf_retval_c99+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + if test "$cross_compiling" = yes; then : + + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # 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 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. + openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) + gl_cv_func_snprintf_retval_c99="guessing no";; + openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on Solaris >= 2.10. + solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; + solaris*) gl_cv_func_printf_sizes_c99="guessing no";; + # Guess yes on AIX >= 4. + aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; + aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_snprintf_retval_c99="guessing no";; + netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_snprintf_retval_c99="guessing no";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +#include +#include +#if HAVE_SNPRINTF +# define my_snprintf snprintf +#else +# include +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} #endif -char pthread_kill (); -int -main () +static char buf[100]; +int main () { -return pthread_kill (); - ; + strcpy (buf, "ABCDEF"); + if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7) + return 1; + if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7) + return 2; + if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7) + return 3; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_kill=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_snprintf_retval_c99=yes else - ac_cv_lib_pthread_pthread_kill=no + gl_cv_func_snprintf_retval_c99=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } -if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then : - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. - case "$host_os" in - solaris* | hpux*) -$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h - esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5 +$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } + + ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" +if test "x$ac_cv_have_decl_snprintf" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi - else - # Some library is needed. Try libpthread and libc_r. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 -$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SNPRINTF $ac_have_decl +_ACEOF + + + + : + + + + + + if test $ac_cv_header_sys_socket_h = no; then + for ac_header in ws2tcpip.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" +if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WS2TCPIP_H 1 +_ACEOF + +fi + +done + + fi + + + GNULIB_FFS=0; + HAVE_FFS=1; + HAVE_STRCASECMP=1; + HAVE_DECL_STRNCASECMP=1; + + + + + + + + for ac_func in strcasestr +do : + ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" +if test "x$ac_cv_func_strcasestr" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRCASESTR 1 +_ACEOF + +fi +done + + if test $ac_cv_func_strcasestr = no; then + HAVE_STRCASESTR=0 + else + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_STRCASESTR=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5 +$as_echo_n "checking whether strcasestr works... " >&6; } +if ${gl_cv_func_strcasestr_works_always+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +#ifdef __GNU_LIBRARY__ + #include + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + || defined __UCLIBC__ + Lucky user + #endif +#elif defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#else + Lucky user #endif -char pthread_kill (); -int -main () -{ -return pthread_kill (); - ; - return 0; -} + _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_kill=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky user" >/dev/null 2>&1; then : + gl_cv_func_strcasestr_works_always="guessing yes" else - ac_cv_lib_pthread_pthread_kill=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } -if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then : - gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + gl_cv_func_strcasestr_works_always="guessing no" fi +rm -f conftest* + - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 -$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } -if test "${ac_cv_lib_c_r_pthread_kill+set}" = set; then : - $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc_r $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); +#include /* for strcasestr */ +#define P "_EF_BF_BD" +#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P +#define NEEDLE P P P P P + int main () { -return pthread_kill (); +return !!strcasestr (HAYSTACK, NEEDLE); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_c_r_pthread_kill=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strcasestr_works_always=yes else - ac_cv_lib_c_r_pthread_kill=no + gl_cv_func_strcasestr_works_always=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 -$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } -if test "x$ac_cv_lib_c_r_pthread_kill" = x""yes; then : - gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r + + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5 +$as_echo "$gl_cv_func_strcasestr_works_always" >&6; } + case "$gl_cv_func_strcasestr_works_always" in + *yes) ;; + *) + REPLACE_STRCASESTR=1 + ;; + esac + fi + fi - fi - fi - if test -n "$gl_have_pthread"; then - gl_threads_api=posix -$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then -$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then - gl_have_solaristhread= - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lthread" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" +if test "x$ac_cv_have_decl_strdup" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRDUP $ac_have_decl +_ACEOF + + + + + + + + + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_string_h='<'string.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_string_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'string.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_string_h + gl_cv_next_string_h='"'$gl_header'"' + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 +$as_echo "$gl_cv_next_string_h" >&6; } + fi + NEXT_STRING_H=$gl_cv_next_string_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'string.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_string_h + fi + NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive + + + -#include -#include + + + for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main () { -thr_self(); +#undef $gl_func + (void) $gl_func; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_have_solaristhread=yes +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gl_save_LIBS" - if test -n "$gl_have_solaristhread"; then - gl_threads_api=solaris - LIBTHREAD=-lthread - LTLIBTHREAD=-lthread - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF -$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h + eval ac_cv_have_decl_$gl_func=yes +fi + done - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then -$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - if test "$gl_use_threads" = pth; then - gl_save_CPPFLAGS="$CPPFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 -$as_echo_n "checking how to link with libpth... " >&6; } -if test "${ac_cv_libpth_libs+set}" = set; then : - $as_echo_n "(cached) " >&6 -else @@ -15883,563 +18430,4378 @@ else - use_additional=yes + : - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" -# Check whether --with-libpth-prefix was given. -if test "${with_libpth_prefix+set}" = set; then : - withval=$with_libpth_prefix; - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + if test $gl_cv_have_include_next = yes; then + gl_cv_next_strings_h='<'strings.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_strings_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_strings_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'strings.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_strings_h + gl_cv_next_strings_h='"'$gl_header'"' + else + gl_cv_next_strings_h='<'strings.h'>' + fi - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi - fi - fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5 +$as_echo "$gl_cv_next_strings_h" >&6; } + fi + NEXT_STRINGS_H=$gl_cv_next_strings_h - LIBPTH= - LTLIBPTH= - INCPTH= - LIBPTH_PREFIX= - HAVE_LIBPTH= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='pth ' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" - else - : - fi - else - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBPTH; do + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'strings.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_strings_h + fi + NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - if test "$enable_rpath" = no \ - || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - if test "$acl_hardcode_direct" = yes; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - haveit= - for x in $LDFLAGS $LIBPTH; do - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" - fi - fi - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - if test "$name" = 'pth'; then - LIBPTH_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - */$acl_libdirstem2 | */$acl_libdirstem2/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - if test "$name" = 'pth'; then - LIBPTH_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCPTH; do + if test $ac_cv_header_strings_h = yes; then + HAVE_STRINGS_H=1 + else + HAVE_STRINGS_H=0 + fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - if test -n "$found_la"; then - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIBPTH; do - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + for gl_func in ffs strcasecmp strncasecmp; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIBPTH; do + /* Minix 3.1.8 has a bug: must be included before + . */ + #include + #include - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" - ;; - esac - done - fi - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" - else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" + eval ac_cv_have_decl_$gl_func=yes +fi done - fi + + + + ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" +if test "x$ac_cv_have_decl_strndup" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNDUP $ac_have_decl +_ACEOF + + + + + + + + + ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" +if test "x$ac_cv_have_decl_strnlen" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNLEN $ac_have_decl +_ACEOF + + + + + + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_STRSTR=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 +$as_echo_n "checking whether strstr works... " >&6; } +if ${gl_cv_func_strstr_works_always+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __GNU_LIBRARY__ + #include + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + || defined __UCLIBC__ + Lucky user + #endif +#elif defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#else + Lucky user +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky user" >/dev/null 2>&1; then : + gl_cv_func_strstr_works_always="guessing yes" +else + gl_cv_func_strstr_works_always="guessing no" +fi +rm -f conftest* + + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include /* for strstr */ +#define P "_EF_BF_BD" +#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P +#define NEEDLE P P P P P + +int +main () +{ +return !!strstr (HAYSTACK, NEEDLE); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strstr_works_always=yes +else + gl_cv_func_strstr_works_always=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 +$as_echo "$gl_cv_func_strstr_works_always" >&6; } + case "$gl_cv_func_strstr_works_always" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac + fi + + + + + + + + ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtoumax" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRTOUMAX $ac_have_decl +_ACEOF + + + + GNULIB_SOCKET=0; + GNULIB_CONNECT=0; + GNULIB_ACCEPT=0; + GNULIB_BIND=0; + GNULIB_GETPEERNAME=0; + GNULIB_GETSOCKNAME=0; + GNULIB_GETSOCKOPT=0; + GNULIB_LISTEN=0; + GNULIB_RECV=0; + GNULIB_SEND=0; + GNULIB_RECVFROM=0; + GNULIB_SENDTO=0; + GNULIB_SETSOCKOPT=0; + GNULIB_SHUTDOWN=0; + GNULIB_ACCEPT4=0; + HAVE_STRUCT_SOCKADDR_STORAGE=1; + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; + + HAVE_SA_FAMILY_T=1; + HAVE_ACCEPT4=1; + + + + + + + + + + GNULIB_UNAME=0; + HAVE_UNAME=1; + HAVE_STRUCT_UTSNAME=1; + + + + + + + + GNULIB_WAITPID=0; + + + + + + + + + : + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timespec_in_time_h=yes +else + gl_cv_sys_struct_timespec_in_time_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } + + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $gl_cv_sys_struct_timespec_in_time_h = yes; then + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timespec_in_sys_time_h=yes +else + gl_cv_sys_struct_timespec_in_sys_time_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timespec_in_pthread_h=yes +else + gl_cv_sys_struct_timespec_in_pthread_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + fi + fi + fi + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_time_h='<'time.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_time_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'time.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_time_h + gl_cv_next_time_h='"'$gl_header'"' + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 +$as_echo "$gl_cv_next_time_h" >&6; } + fi + NEXT_TIME_H=$gl_cv_next_time_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'time.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_time_h + fi + NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive + + + + + + + + + + + + + + + + + + + + + + +gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' +gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' +gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' + + + if test "$HAVE_LIBUNISTRING" = yes; then + LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` + LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` + LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` + fi + + + + + + + + ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" +if test "x$ac_cv_have_decl_unsetenv" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_UNSETENV $ac_have_decl +_ACEOF + + + + + + + + + + + + + + + : + + + + + + if test $ac_cv_header_features_h = yes; then + HAVE_FEATURES_H=1 + else + HAVE_FEATURES_H=0 + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 +$as_echo_n "checking for inttypes.h... " >&6; } +if ${gl_cv_header_inttypes_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_inttypes_h=yes +else + gl_cv_header_inttypes_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5 +$as_echo "$gl_cv_header_inttypes_h" >&6; } + if test $gl_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 +$as_echo_n "checking for stdint.h... " >&6; } +if ${gl_cv_header_stdint_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_stdint_h=yes +else + gl_cv_header_stdint_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 +$as_echo "$gl_cv_header_stdint_h" >&6; } + if test $gl_cv_header_stdint_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 +$as_echo_n "checking for intmax_t... " >&6; } +if ${gt_cv_c_intmax_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif + +int +main () +{ +intmax_t x = -1; return !x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_intmax_t=yes +else + gt_cv_c_intmax_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 +$as_echo "$gt_cv_c_intmax_t" >&6; } + if test $gt_cv_c_intmax_t = yes; then + +$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h + + else + + test $ac_cv_type_long_long_int = yes \ + && ac_type='long long' \ + || ac_type='long' + +cat >>confdefs.h <<_ACEOF +#define intmax_t $ac_type +_ACEOF + + fi + + + + + + + for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include +" +if test "x$ac_cv_have_decl__snprintf" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SNPRINTF $ac_have_decl +_ACEOF + + + + case "$gl_cv_func_snprintf_retval_c99" in + *yes) + +$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h + + ;; + esac + + + + + + + + + + + + + GNULIB_INET_NTOP=0; + GNULIB_INET_PTON=0; + HAVE_DECL_INET_NTOP=1; + HAVE_DECL_INET_PTON=1; + REPLACE_INET_NTOP=0; + REPLACE_INET_PTON=0; + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5 +$as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; } +if ${gl_cv_func_ungetc_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_ungetc_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +int +main () +{ +FILE *f; + if (!(f = fopen ("conftest.tmp", "w+"))) return 1; + if (fputs ("abc", f) < 0) return 2; + rewind (f); + if (fgetc (f) != 'a') return 3; + if (fgetc (f) != 'b') return 4; + if (ungetc ('d', f) != 'd') return 5; + if (ftell (f) != 1) return 6; + if (fgetc (f) != 'd') return 7; + if (ftell (f) != 2) return 8; + if (fseek (f, 0, SEEK_CUR) != 0) return 9; + if (ftell (f) != 2) return 10; + if (fgetc (f) != 'c') return 11; + fclose (f); remove ("conftest.tmp"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_ungetc_works=yes +else + gl_cv_func_ungetc_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5 +$as_echo "$gl_cv_func_ungetc_works" >&6; } + case "$gl_cv_func_ungetc_works" in + *yes) ;; + *) + +$as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h + + ;; + esac + + + + + + + + + + + case "$host_os" in + osf*) + +$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h + + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 +$as_echo_n "checking whether is self-contained... " >&6; } +if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_sys_socket_h_selfcontained=yes +else + gl_cv_header_sys_socket_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 +$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } + if test $gl_cv_header_sys_socket_h_selfcontained = yes; then + for ac_func in shutdown +do : + ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" +if test "x$ac_cv_func_shutdown" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SHUTDOWN 1 +_ACEOF + +fi +done + + if test $ac_cv_func_shutdown = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines the SHUT_* macros" >&5 +$as_echo_n "checking whether defines the SHUT_* macros... " >&6; } +if ${gl_cv_header_sys_socket_h_shut+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_sys_socket_h_shut=yes +else + gl_cv_header_sys_socket_h_shut=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5 +$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } + if test $gl_cv_header_sys_socket_h_shut = no; then + SYS_SOCKET_H='sys/socket.h' + fi + fi + fi + # We need to check for ws2tcpip.h now. + + + + + + + + + : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_socket_h='<'sys/socket.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_socket_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_sys_socket_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/socket.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_socket_h + gl_cv_next_sys_socket_h='"'$gl_header'"' + else + gl_cv_next_sys_socket_h='<'sys/socket.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 +$as_echo "$gl_cv_next_sys_socket_h" >&6; } + fi + NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/socket.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_socket_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_sys_socket_h = yes; then + HAVE_SYS_SOCKET_H=1 + HAVE_WS2TCPIP_H=0 + else + HAVE_SYS_SOCKET_H=0 + if test $ac_cv_header_ws2tcpip_h = yes; then + HAVE_WS2TCPIP_H=1 + else + HAVE_WS2TCPIP_H=0 + fi + fi + + + + ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_type_sa_family_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SA_FAMILY_T 1 +_ACEOF + + +fi + + if test $ac_cv_type_struct_sockaddr_storage = no; then + HAVE_STRUCT_SOCKADDR_STORAGE=0 + fi + if test $ac_cv_type_sa_family_t = no; then + HAVE_SA_FAMILY_T=0 + fi + if test $ac_cv_type_struct_sockaddr_storage != no; then + ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_WS2TCPIP_H + #include + #endif + +" +if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +_ACEOF + + +else + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 +fi + + fi + if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ + || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then + SYS_SOCKET_H='sys/socket.h' + fi + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + + + for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Some systems require prerequisite headers. */ +#include +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + + + + + + + + + : + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5 +$as_echo_n "checking for IPv4 sockets... " >&6; } + if ${gl_cv_socket_ipv4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif +int +main () +{ +int x = AF_INET; struct in_addr y; struct sockaddr_in z; + if (&x && &y && &z) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_socket_ipv4=yes +else + gl_cv_socket_ipv4=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5 +$as_echo "$gl_cv_socket_ipv4" >&6; } + if test $gl_cv_socket_ipv4 = yes; then + +$as_echo "#define HAVE_IPV4 1" >>confdefs.h + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5 +$as_echo_n "checking for IPv6 sockets... " >&6; } + if ${gl_cv_socket_ipv6+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif +int +main () +{ +int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; + if (&x && &y && &z) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_socket_ipv6=yes +else + gl_cv_socket_ipv6=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5 +$as_echo "$gl_cv_socket_ipv6" >&6; } + if test $gl_cv_socket_ipv6 = yes; then + +$as_echo "#define HAVE_IPV6 1" >>confdefs.h + + fi + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF + +fi + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 +$as_echo_n "checking for LC_MESSAGES... " >&6; } +if ${gt_cv_val_LC_MESSAGES+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +return LC_MESSAGES + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_val_LC_MESSAGES=yes +else + gt_cv_val_LC_MESSAGES=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5 +$as_echo "$gt_cv_val_LC_MESSAGES" >&6; } + if test $gt_cv_val_LC_MESSAGES = yes; then + +$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFPreferencesCopyAppValue=yes +else + gt_cv_func_CFPreferencesCopyAppValue=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : + $as_echo_n "(cached) " >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +CFLocaleCopyCurrent(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFLocaleCopyCurrent=yes +else + gt_cv_func_CFLocaleCopyCurrent=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + GNULIB_PSELECT=0; + GNULIB_SELECT=0; + HAVE_PSELECT=1; + REPLACE_PSELECT=0; + REPLACE_SELECT=0; + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 +$as_echo_n "checking whether is self-contained... " >&6; } +if ${gl_cv_header_sys_select_h_selfcontained+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +struct timeval b; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_sys_select_h_selfcontained=yes +else + gl_cv_header_sys_select_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $gl_cv_header_sys_select_h_selfcontained = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int memset; int bzero; + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + #undef memset + #define memset nonexistent_memset + extern + #ifdef __cplusplus + "C" + #endif + void *memset (void *, int, unsigned long); + #undef bzero + #define bzero nonexistent_bzero + extern + #ifdef __cplusplus + "C" + #endif + void bzero (void *, unsigned long); + fd_set fds; + FD_ZERO (&fds); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + gl_cv_header_sys_select_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 +$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; } + + + + + + + : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_select_h='<'sys/select.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_select_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_sys_select_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/select.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_select_h + gl_cv_next_sys_select_h='"'$gl_header'"' + else + gl_cv_next_sys_select_h='<'sys/select.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5 +$as_echo "$gl_cv_next_sys_select_h" >&6; } + fi + NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/select.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_select_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_sys_select_h = yes; then + HAVE_SYS_SELECT_H=1 + else + HAVE_SYS_SELECT_H=0 + fi + + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + + + for gl_func in pselect select; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Some systems require prerequisite headers. */ +#include +#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H +# include +#endif +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + LIBSOCKET= + if test $HAVE_WINSOCK2_H = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5 +$as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; } +if ${gl_cv_func_wsastartup+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_WINSOCK2_H +# include +#endif +int +main () +{ + + WORD wVersionRequested = MAKEWORD(1, 1); + WSADATA wsaData; + int err = WSAStartup(wVersionRequested, &wsaData); + WSACleanup (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_wsastartup=yes +else + gl_cv_func_wsastartup=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5 +$as_echo "$gl_cv_func_wsastartup" >&6; } + if test "$gl_cv_func_wsastartup" = "yes"; then + +$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h + + LIBSOCKET='-lws2_32' + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 +$as_echo_n "checking for library containing setsockopt... " >&6; } +if ${gl_cv_lib_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_cv_lib_socket= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + gl_save_LIBS="$LIBS" + LIBS="$gl_save_LIBS -lsocket" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_lib_socket="-lsocket" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnetwork" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_lib_socket="-lnetwork" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnet" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_lib_socket="-lnet" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + fi + LIBS="$gl_save_LIBS" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + gl_cv_lib_socket="none needed" + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5 +$as_echo "$gl_cv_lib_socket" >&6; } + if test "$gl_cv_lib_socket" != "none needed"; then + LIBSOCKET="$gl_cv_lib_socket" + fi + fi + + + + + + + : + + + + + + if test "$ac_cv_header_winsock2_h" = yes; then + REPLACE_SELECT=1 + else + + : + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5 +$as_echo_n "checking whether select supports a 0 argument... " >&6; } +if ${gl_cv_func_select_supports0+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + + case "$host_os" in + # Guess no on Interix. + interix*) gl_cv_func_select_supports0="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_select_supports0="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_SYS_SELECT_H +#include +#endif +int main () +{ + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 5; + return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_select_supports0=yes +else + gl_cv_func_select_supports0=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5 +$as_echo "$gl_cv_func_select_supports0" >&6; } + case "$gl_cv_func_select_supports0" in + *yes) ;; + *) REPLACE_SELECT=1 ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5 +$as_echo_n "checking whether select detects invalid fds... " >&6; } +if ${gl_cv_func_select_detects_ebadf+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + + 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 + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_SYS_SELECT_H +# include +#endif +#include +#include + +int +main () +{ + + 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; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_select_detects_ebadf=yes +else + gl_cv_func_select_detects_ebadf=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5 +$as_echo "$gl_cv_func_select_detects_ebadf" >&6; } + case $gl_cv_func_select_detects_ebadf in + *yes) ;; + *) REPLACE_SELECT=1 ;; + esac + fi + + LIB_SELECT="$LIBSOCKET" + if test $REPLACE_SELECT = 1; then + case "$host_os" in + mingw*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define WIN32_LEAN_AND_MEAN +#include +int +main () +{ + MsgWaitForMultipleObjects (0, NULL, 0, 0, 0); + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + LIB_SELECT="$LIB_SELECT -luser32" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; + esac + fi + + + + + + + + + GNULIB_PTHREAD_SIGMASK=0; + GNULIB_RAISE=0; + GNULIB_SIGNAL_H_SIGPIPE=0; + GNULIB_SIGPROCMASK=0; + GNULIB_SIGACTION=0; + HAVE_POSIX_SIGNALBLOCKING=1; + HAVE_PTHREAD_SIGMASK=1; + HAVE_RAISE=1; + HAVE_SIGSET_T=1; + HAVE_SIGINFO_T=1; + HAVE_SIGACTION=1; + HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; + + HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; + + HAVE_SIGHANDLER_T=1; + REPLACE_PTHREAD_SIGMASK=0; + REPLACE_RAISE=0; + + + ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " + #include + /* Mingw defines sigset_t not in , but in . */ + #include + +" +if test "x$ac_cv_type_sigset_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGSET_T 1 +_ACEOF + +gl_cv_type_sigset_t=yes +else + gl_cv_type_sigset_t=no +fi + + if test $gl_cv_type_sigset_t != yes; then + HAVE_SIGSET_T=0 + fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if false; then + GL_COND_LIBTOOL_TRUE= + GL_COND_LIBTOOL_FALSE='#' +else + GL_COND_LIBTOOL_TRUE='#' + GL_COND_LIBTOOL_FALSE= +fi + + gl_cond_libtool=false + gl_libdeps= + gl_ltlibdeps= + gl_m4_base='gl/m4' + + + + + + + + + + gl_source_base='gl/lib' + + + if test $ac_cv_func_alloca_works = no; then + : + fi + + # Define an additional variable used in the Makefile substitution. + if test $ac_cv_working_alloca_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 +$as_echo_n "checking for alloca as a compiler built-in... " >&6; } +if ${gl_cv_rpl_alloca+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if defined __GNUC__ || defined _AIX || defined _MSC_VER + Need own alloca +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Need own alloca" >/dev/null 2>&1; then : + gl_cv_rpl_alloca=yes +else + gl_cv_rpl_alloca=no +fi +rm -f conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 +$as_echo "$gl_cv_rpl_alloca" >&6; } + if test $gl_cv_rpl_alloca = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + + ALLOCA_H=alloca.h + else + ALLOCA_H= + fi + else + ALLOCA_H=alloca.h + fi + + if test -n "$ALLOCA_H"; then + GL_GENERATE_ALLOCA_H_TRUE= + GL_GENERATE_ALLOCA_H_FALSE='#' +else + GL_GENERATE_ALLOCA_H_TRUE='#' + GL_GENERATE_ALLOCA_H_FALSE= +fi + + + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_AREADLINKAT 1 +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5 +$as_echo_n "checking whether to enable assertions... " >&6; } + # Check whether --enable-assert was given. +if test "${enable_assert+set}" = set; then : + enableval=$enable_assert; if test "x$enableval" = xno; then : + +$as_echo "#define NDEBUG 1" >>confdefs.h + +elif test "x$enableval" != xyes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5 +$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;} + enable_assert=yes +fi +else + enable_assert=yes +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5 +$as_echo "$enable_assert" >&6; } + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + + + + + + + + : + + + + + + if test $ac_cv_func_btowc = no; then + HAVE_BTOWC=0 + else + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5 +$as_echo_n "checking whether btowc(0) is correct... " >&6; } +if ${gl_cv_func_btowc_nul+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + + case "$host_os" in + # Guess no on Cygwin. + cygwin*) gl_cv_func_btowc_nul="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_btowc_nul="guessing yes" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (btowc ('\0') != 0) + return 1; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_btowc_nul=yes +else + gl_cv_func_btowc_nul=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5 +$as_echo "$gl_cv_func_btowc_nul" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5 +$as_echo_n "checking whether btowc(EOF) is correct... " >&6; } +if ${gl_cv_func_btowc_eof+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on IRIX. + irix*) gl_cv_func_btowc_eof="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_btowc_eof="guessing yes" ;; + esac + if test $LOCALE_FR != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) + { + if (btowc (EOF) != WEOF) + return 1; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_btowc_eof=yes +else + gl_cv_func_btowc_eof=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5 +$as_echo "$gl_cv_func_btowc_eof" >&6; } + + case "$gl_cv_func_btowc_nul" in + *yes) ;; + *) REPLACE_BTOWC=1 ;; + esac + case "$gl_cv_func_btowc_eof" in + *yes) ;; + *) REPLACE_BTOWC=1 ;; + esac + fi + + if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" + + + : + + fi + + + + + + GNULIB_BTOWC=1 + + + + + +$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h + + + + + for ac_header in byteswap.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" +if test "x$ac_cv_header_byteswap_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BYTESWAP_H 1 +_ACEOF + + BYTESWAP_H='' + +else + + BYTESWAP_H='byteswap.h' + +fi + +done + + + if test -n "$BYTESWAP_H"; then + GL_GENERATE_BYTESWAP_H_TRUE= + GL_GENERATE_BYTESWAP_H_FALSE='#' +else + GL_GENERATE_BYTESWAP_H_TRUE='#' + GL_GENERATE_BYTESWAP_H_FALSE= +fi + + + + + + : + + + + + + + + if test $ac_cv_func_canonicalize_file_name = no; then + HAVE_CANONICALIZE_FILE_NAME=0 + else + case "$gl_cv_func_realpath_works" in + *yes) ;; + *) REPLACE_CANONICALIZE_FILE_NAME=1 ;; + esac + fi + + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_CANONICALIZE 1 +_ACEOF + + + + +$as_echo "#define GNULIB_TEST_CANONICALIZE 1" >>confdefs.h + + + + + + + + GNULIB_CANONICALIZE_FILE_NAME=1 + + + + + +$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h + + + + + : + + + + + + + + + + + GNULIB_CHDIR=1 + + + + + +$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5 +$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; } +if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Arrange to define PATH_MAX, like "pathmax.h" does. */ +#if HAVE_UNISTD_H +# include +#endif +#include +#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN +# include +#endif +#if !defined PATH_MAX && defined MAXPATHLEN +# define PATH_MAX MAXPATHLEN +#endif +#ifdef __hpux +# undef PATH_MAX +# define PATH_MAX 1024 +#endif +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# undef PATH_MAX +# define PATH_MAX 260 +#endif + +#ifdef PATH_MAX +have_arbitrary_file_name_length_limit +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then : + gl_cv_have_arbitrary_file_name_length_limit=yes +else + gl_cv_have_arbitrary_file_name_length_limit=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5 +$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; } + + if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext" + + : + fi + + + + # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. + # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. + + # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* + # programs in the package would end up linked with that potentially-shared + # library, inducing unnecessary run-time overhead. + LIB_CLOCK_GETTIME= + + gl_saved_libs=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 +$as_echo_n "checking for library containing clock_gettime... " >&6; } +if ${ac_cv_search_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt posix4; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_clock_gettime=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_clock_gettime+:} false; then : + break +fi +done +if ${ac_cv_search_clock_gettime+:} false; then : + +else + ac_cv_search_clock_gettime=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 +$as_echo "$ac_cv_search_clock_gettime" >&6; } +ac_res=$ac_cv_search_clock_gettime +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_cv_search_clock_gettime" = "none required" || + LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime +fi + + for ac_func in clock_gettime clock_settime +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + LIBS=$gl_saved_libs + + + +$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h + + + + + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_CLOSE=1 + fi + + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then + REPLACE_CLOSE=1 + fi + + + if test $REPLACE_CLOSE = 0; then + + + + : + + + + + + if test $ac_cv_func_fchdir = no; then + HAVE_FCHDIR=0 + fi + + if test $HAVE_FCHDIR = 0; then + REPLACE_CLOSE=1 + fi + fi + + + if test $REPLACE_CLOSE = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" + + fi + + + + + + GNULIB_CLOSE=1 + + + + + +$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h + + + + + : + + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_CLOSE_STREAM 1 +_ACEOF + + + + + + for ac_func in closedir +do : + ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir" +if test "x$ac_cv_func_closedir" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CLOSEDIR 1 +_ACEOF + +fi +done + + if test $ac_cv_func_closedir = no; then + HAVE_CLOSEDIR=0 + fi + + + + + : + + + + + + if test $ac_cv_func_fchdir = no; then + HAVE_FCHDIR=0 + fi + + if test $HAVE_FCHDIR = 0; then + if test $HAVE_CLOSEDIR = 1; then + REPLACE_CLOSEDIR=1 + fi + fi + + + if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext" + + fi + + + + + + GNULIB_CLOSEDIR=1 + + + + + +$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h + + + + + : + + + : + + + if test "x$datarootdir" = x; then + datarootdir='${datadir}' + + fi + if test "x$docdir" = x; then + docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' + + fi + if test "x$htmldir" = x; then + htmldir='${docdir}' + + fi + if test "x$dvidir" = x; then + dvidir='${docdir}' + + fi + if test "x$pdfdir" = x; then + pdfdir='${docdir}' + + fi + if test "x$psdir" = x; then + psdir='${docdir}' + + fi + if test "x$lispdir" = x; then + lispdir='${datarootdir}/emacs/site-lisp' + + fi + if test "x$localedir" = x; then + localedir='${datarootdir}/locale' + + fi + if test "x$runstatedir" = x; then + runstatedir='${localstatedir}/run' + + fi + + pkglibexecdir='${libexecdir}/${PACKAGE}' + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_ctype_h='<'ctype.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_ctype_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'ctype.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_ctype_h + gl_cv_next_ctype_h='"'$gl_header'"' + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5 +$as_echo "$gl_cv_next_ctype_h" >&6; } + fi + NEXT_CTYPE_H=$gl_cv_next_ctype_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'ctype.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_ctype_h + fi + NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive + + + + + + + for gl_func in isblank; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5 +$as_echo_n "checking for d_ino member in directory struct... " >&6; } +if ${gl_cv_struct_dirent_d_ino+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems with Linux kernel. + linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_struct_dirent_d_ino="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + +int +main () +{ +DIR *dp = opendir ("."); + struct dirent *e; + struct stat st; + if (! dp) + return 1; + e = readdir (dp); + if (! e) + return 2; + if (lstat (e->d_name, &st) != 0) + return 3; + if (e->d_ino != st.st_ino) + return 4; + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_struct_dirent_d_ino=yes +else + gl_cv_struct_dirent_d_ino=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5 +$as_echo "$gl_cv_struct_dirent_d_ino" >&6; } + case "$gl_cv_struct_dirent_d_ino" in + *yes) + +$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h + + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5 +$as_echo_n "checking for d_type member in directory struct... " >&6; } +if ${gl_cv_struct_dirent_d_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +struct dirent dp; dp.d_type = 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_struct_dirent_d_type=yes +else + gl_cv_struct_dirent_d_type=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5 +$as_echo "$gl_cv_struct_dirent_d_type" >&6; } + if test $gl_cv_struct_dirent_d_type = yes; then + +$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h + + fi + + + + + + + + + + + + : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_dirent_h='<'dirent.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_dirent_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_dirent_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'dirent.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_dirent_h + gl_cv_next_dirent_h='"'$gl_header'"' + else + gl_cv_next_dirent_h='<'dirent.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 +$as_echo "$gl_cv_next_dirent_h" >&6; } + fi + NEXT_DIRENT_H=$gl_cv_next_dirent_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'dirent.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_dirent_h + fi + NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_dirent_h = yes; then + HAVE_DIRENT_H=1 + else + HAVE_DIRENT_H=0 + fi + + + + for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + + + : + + + + + + + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_DIRENT_SAFER 1 +_ACEOF + + + + + + + + for ac_func in dirfd +do : + ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd" +if test "x$ac_cv_func_dirfd" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DIRFD 1 +_ACEOF + +fi +done + + ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include + #include +" +if test "x$ac_cv_have_decl_dirfd" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_DIRFD $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_dirfd = no; then + HAVE_DECL_DIRFD=0 + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5 +$as_echo_n "checking whether dirfd is a macro... " >&6; } +if ${gl_cv_func_dirfd_macro+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#ifdef dirfd + dirent_header_defines_dirfd +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then : + gl_cv_func_dirfd_macro=yes +else + gl_cv_func_dirfd_macro=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5 +$as_echo "$gl_cv_func_dirfd_macro" >&6; } + + # Use the replacement only if we have no function or macro with that name. + if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then + if test $ac_cv_have_decl_dirfd = yes; then + # If the system declares dirfd already, let's declare rpl_dirfd instead. + REPLACE_DIRFD=1 + fi + fi + + if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5 +$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; } +if ${gl_cv_sys_dir_fd_member_name+:} false; then : + $as_echo_n "(cached) " >&6 +else + + dirfd_save_CFLAGS=$CFLAGS + for ac_expr in d_fd dd_fd; do + + CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include +int +main () +{ +DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + dir_fd_found=yes + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$dirfd_save_CFLAGS + test "$dir_fd_found" = yes && break + done + test "$dir_fd_found" = yes || ac_expr=no_such_member + + gl_cv_sys_dir_fd_member_name=$ac_expr + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5 +$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; } + if test $gl_cv_sys_dir_fd_member_name != no_such_member; then + +cat >>confdefs.h <<_ACEOF +#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name +_ACEOF + + fi + + + fi + + + + + + GNULIB_DIRFD=1 + + + + + +$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h + + + + + + + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_DIRNAME 1 +_ACEOF + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 +$as_echo_n "checking whether // is distinct from /... " >&6; } +if ${gl_cv_double_slash_root+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test x"$cross_compiling" = xyes ; then + # When cross-compiling, there is no way to tell whether // is special + # short of a list of hosts. However, the only known hosts to date + # that have a distinct // are Apollo DomainOS (too old to port to), + # Cygwin, and z/OS. If anyone knows of another system for which // has + # special semantics and is distinct from /, please report it to + # . + case $host in + *-cygwin | i370-ibm-openedition) + gl_cv_double_slash_root=yes ;; + *) + # Be optimistic and assume that / and // are the same when we + # don't know. + gl_cv_double_slash_root='unknown, assuming no' ;; + esac + else + set x `ls -di / // 2>/dev/null` + if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then + gl_cv_double_slash_root=no + else + gl_cv_double_slash_root=yes + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 +$as_echo "$gl_cv_double_slash_root" >&6; } + if test "$gl_cv_double_slash_root" = yes; then + +$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h + + fi + + + + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_DUP=1 + fi + + + + + : + + + + + + if test $ac_cv_func_fchdir = no; then + HAVE_FCHDIR=0 + fi + + if test $HAVE_FCHDIR = 0; then + REPLACE_DUP=1 + fi + + + if test $REPLACE_DUP = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext" + + : + fi + + + + + + GNULIB_DUP=1 + + + + + +$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h + + + + + + + + +$as_echo "#define HAVE_DUP2 1" >>confdefs.h + + + if test $HAVE_DUP2 = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 +$as_echo_n "checking whether dup2 works... " >&6; } +if ${gl_cv_func_dup2_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) # on this platform, dup2 always returns 0 for success + gl_cv_func_dup2_works="guessing no" ;; + cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 + gl_cv_func_dup2_works="guessing no" ;; + linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a + # closed fd may yield -EBADF instead of -1 / errno=EBADF. + gl_cv_func_dup2_works="guessing no" ;; + freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. + gl_cv_func_dup2_works="guessing no" ;; + haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. + gl_cv_func_dup2_works="guessing no" ;; + *) gl_cv_func_dup2_works="guessing yes" ;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +#include +#include +int +main () +{ +int result = 0; +#ifdef FD_CLOEXEC + if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) + result |= 1; +#endif + if (dup2 (1, 1) == 0) + result |= 2; +#ifdef FD_CLOEXEC + if (fcntl (1, F_GETFD) != FD_CLOEXEC) + result |= 4; +#endif + close (0); + if (dup2 (0, 0) != -1) + result |= 8; + /* Many gnulib modules require POSIX conformance of EBADF. */ + if (dup2 (2, 1000000) == -1 && errno != EBADF) + result |= 16; + /* Flush out some cygwin core dumps. */ + if (dup2 (2, -1) != -1 || errno != EBADF) + result |= 32; + dup2 (2, 255); + dup2 (2, 256); + return result; + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_dup2_works=yes +else + gl_cv_func_dup2_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 +$as_echo "$gl_cv_func_dup2_works" >&6; } + case "$gl_cv_func_dup2_works" in + *yes) ;; + *) + REPLACE_DUP2=1 + for ac_func in setdtablesize +do : + ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize" +if test "x$ac_cv_func_setdtablesize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SETDTABLESIZE 1 +_ACEOF + +fi +done + + ;; + esac + fi + + + + + : + + + + + + if test $ac_cv_func_fchdir = no; then + HAVE_FCHDIR=0 + fi + + if test $HAVE_FCHDIR = 0; then + if test $HAVE_DUP2 = 1; then + REPLACE_DUP2=1 + fi + fi + + + if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" + + + fi + + + + + + GNULIB_DUP2=1 + + + + + +$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h + + + + + + + + + + GNULIB_ENVIRON=1 + + + + + +$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 +$as_echo_n "checking for error_at_line... " >&6; } +if ${ac_cv_lib_error_at_line+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +error_at_line (0, 0, "", 0, "an error occurred"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_error_at_line=yes +else + ac_cv_lib_error_at_line=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 +$as_echo "$ac_cv_lib_error_at_line" >&6; } + + if test $ac_cv_lib_error_at_line = no; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" + + + + : + + fi + + + XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" + + + + XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" + + + + + + + for ac_func in euidaccess +do : + ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess" +if test "x$ac_cv_func_euidaccess" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_EUIDACCESS 1 +_ACEOF + +fi +done + + if test $ac_cv_func_euidaccess = no; then + HAVE_EUIDACCESS=0 + fi + + if test $HAVE_EUIDACCESS = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext" + + + + : + + + + + + for ac_header in libgen.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default" +if test "x$ac_cv_header_libgen_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGEN_H 1 +_ACEOF + +fi + +done + + + ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" +if test "x$ac_cv_func_getgroups" = xyes; then : + +fi + + + # If we don't yet have getgroups, see if it's in -lbsd. + # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. + ac_save_LIBS=$LIBS + if test $ac_cv_func_getgroups = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 +$as_echo_n "checking for getgroups in -lbsd... " >&6; } +if ${ac_cv_lib_bsd_getgroups+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getgroups (); +int +main () +{ +return getgroups (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bsd_getgroups=yes +else + ac_cv_lib_bsd_getgroups=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5 +$as_echo "$ac_cv_lib_bsd_getgroups" >&6; } +if test "x$ac_cv_lib_bsd_getgroups" = xyes; then : + GETGROUPS_LIB=-lbsd +fi + + fi + + # Run the program to test the functionality of the system-supplied + # getgroups function only if there is such a function. + if test $ac_cv_func_getgroups = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 +$as_echo_n "checking for working getgroups... " >&6; } +if ${ac_cv_func_getgroups_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, assume the worst. + *) ac_cv_func_getgroups_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +/* On Ultrix 4.3, getgroups (0, 0) always fails. */ + return getgroups (0, 0) == -1; + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_getgroups_works=yes +else + ac_cv_func_getgroups_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 +$as_echo "$ac_cv_func_getgroups_works" >&6; } + else + ac_cv_func_getgroups_works=no + fi + case "$ac_cv_func_getgroups_works" in + *yes) + +$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h + + ;; + esac + LIBS=$ac_save_LIBS + + + # Solaris 9 and 10 need -lgen to get the eaccess function. + # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all* + # programs in the package would end up linked with that potentially-shared + # library, inducing unnecessary run-time overhead. + LIB_EACCESS= + + gl_saved_libs=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5 +$as_echo_n "checking for library containing eaccess... " >&6; } +if ${ac_cv_search_eaccess+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char eaccess (); +int +main () +{ +return eaccess (); + ; + return 0; +} +_ACEOF +for ac_lib in '' gen; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_eaccess=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_eaccess+:} false; then : + break +fi +done +if ${ac_cv_search_eaccess+:} false; then : + +else + ac_cv_search_eaccess=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5 +$as_echo "$ac_cv_search_eaccess" >&6; } +ac_res=$ac_cv_search_eaccess +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_cv_search_eaccess" = "none required" || + LIB_EACCESS=$ac_cv_search_eaccess +fi + + for ac_func in eaccess +do : + ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess" +if test "x$ac_cv_func_eaccess" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_EACCESS 1 +_ACEOF + +fi +done + + LIBS=$gl_saved_libs + + fi + + + + + + GNULIB_EUIDACCESS=1 + + + + + +$as_echo "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h + + + + + + + + + + + : + + + + + + if test $ac_cv_func_faccessat = no; then + HAVE_FACCESSAT=0 + fi + + if test $HAVE_FACCESSAT = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext" + + + for ac_func in access +do : + ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access" +if test "x$ac_cv_func_access" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ACCESS 1 +_ACEOF + +fi +done + + + fi + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_FACCESSAT 1 +_ACEOF + + + + + + + + GNULIB_FACCESSAT=1 + + + + + +$as_echo "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h + + + + + + + + + : + + + + + + if test $ac_cv_have_decl_fchdir = no; then + HAVE_DECL_FCHDIR=0 + fi + + + if test $HAVE_FCHDIR = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext" + + : + +$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5 +$as_echo_n "checking whether open can visit directories... " >&6; } +if ${gl_cv_func_open_directory_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_open_directory_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +return open(".", O_RDONLY) < 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_open_directory_works=yes +else + gl_cv_func_open_directory_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5 +$as_echo "$gl_cv_func_open_directory_works" >&6; } + case "$gl_cv_func_open_directory_works" in + *yes) ;; + *) + +$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h + + ;; + esac + fi + + + + + + + GNULIB_FCHDIR=1 + + + + + +$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h + + + + + + + + + : + + + + + + if test $ac_cv_func_fcntl = no; then + + + + : + + + + + + if test $ac_cv_func_fcntl = no; then + HAVE_FCNTL=0 + else + REPLACE_FCNTL=1 + fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 +$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } +if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + # Guess that it works on glibc systems + case $host_os in #(( + *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; + *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +int result = 0; + if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; + if (errno != EINVAL) result |= 2; + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_fcntl_f_dupfd_works=yes +else + gl_cv_func_fcntl_f_dupfd_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 +$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } + case $gl_cv_func_fcntl_f_dupfd_works in + *yes) ;; + *) + + + : + + + + + + if test $ac_cv_func_fcntl = no; then + HAVE_FCNTL=0 + else + REPLACE_FCNTL=1 + fi + + +$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 +$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } +if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifndef F_DUPFD_CLOEXEC +choke me +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __linux__ +/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace + it to support the semantics on older kernels that failed with EINVAL. */ +choke me +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_fcntl_f_dupfd_cloexec=yes +else + gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + gl_cv_func_fcntl_f_dupfd_cloexec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 +$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } + if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then + + + + : + + + + + + if test $ac_cv_func_fcntl = no; then + HAVE_FCNTL=0 + else + REPLACE_FCNTL=1 fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" - done + + fi fi + : - ac_cv_libpth_libs="$LIBPTH" - ac_cv_libpth_ltlibs="$LTLIBPTH" - ac_cv_libpth_cppflags="$INCPTH" - ac_cv_libpth_prefix="$LIBPTH_PREFIX" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 -$as_echo "$ac_cv_libpth_libs" >&6; } - LIBPTH="$ac_cv_libpth_libs" - LTLIBPTH="$ac_cv_libpth_ltlibs" - INCPTH="$ac_cv_libpth_cppflags" - LIBPTH_PREFIX="$ac_cv_libpth_prefix" - for element in $INCPTH; do - haveit= - for x in $CPPFLAGS; do - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" + if test $ac_cv_func_fchdir = no; then + HAVE_FCHDIR=0 + fi + + if test $HAVE_FCHDIR = 0; then + + + + : + + + + + + if test $ac_cv_func_fcntl = no; then + HAVE_FCNTL=0 + else + REPLACE_FCNTL=1 + fi - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi - done + if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then - HAVE_LIBPTH=yes - gl_have_pth= - gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIBPTH" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + + gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" + + fi + + + + + + GNULIB_FCNTL=1 + + + + + +$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_fcntl_h='<'fcntl.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_fcntl_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -int -main () -{ -pth_self(); - ; - return 0; -} +#include _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_have_pth=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gl_save_LIBS" - if test -n "$gl_have_pth"; then - gl_threads_api=pth - LIBTHREAD="$LIBPTH" - LTLIBTHREAD="$LTLIBPTH" - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac -$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'fcntl.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` -$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h + gl_header=$gl_cv_absolute_fcntl_h + gl_cv_next_fcntl_h='"'$gl_header'"' - LIBTHREAD= - LTLIBTHREAD= - fi - fi - else - CPPFLAGS="$gl_save_CPPFLAGS" - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=win32 -$as_echo "#define USE_WIN32_THREADS 1" >>confdefs.h +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 +$as_echo "$gl_cv_next_fcntl_h" >&6; } + fi + NEXT_FCNTL_H=$gl_cv_next_fcntl_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'fcntl.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_fcntl_h + fi + NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive + - fi - fi - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 -$as_echo_n "checking for multithread API to use... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 -$as_echo "$gl_threads_api" >&6; } @@ -16448,8 +22810,44 @@ $as_echo "$gl_threads_api" >&6; } + for gl_func in fcntl openat; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + eval ac_cv_have_decl_$gl_func=yes +fi + done @@ -16457,6 +22855,9 @@ $as_echo "$gl_threads_api" >&6; } +cat >>confdefs.h <<_ACEOF +#define GNULIB_FCNTL_SAFER 1 +_ACEOF @@ -16464,18 +22865,97 @@ $as_echo "$gl_threads_api" >&6; } + ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" " +#include - ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" -if test "x$ac_cv_have_decl_alarm" = x""yes; then : +" +if test "x$ac_cv_have_decl_fdopendir" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ALARM $ac_have_decl +#define HAVE_DECL_FDOPENDIR $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + +else + HAVE_DECL_FDOPENDIR=0 +fi + + + : + + + + + + if test $ac_cv_func_fdopendir = no; then + HAVE_FDOPENDIR=0 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5 +$as_echo_n "checking whether fdopendir works... " >&6; } +if ${gl_cv_func_fdopendir_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_fdopendir_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#if !HAVE_DECL_FDOPENDIR +extern +# ifdef __cplusplus +"C" +# endif +DIR *fdopendir (int); +#endif + +int +main () +{ +int result = 0; + int fd = open ("conftest.c", O_RDONLY); + if (fd < 0) result |= 1; + if (fdopendir (fd)) result |= 2; + if (close (fd)) result |= 4; + return result; + ; + return 0; +} _ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_fdopendir_works=yes +else + gl_cv_func_fdopendir_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5 +$as_echo "$gl_cv_func_fdopendir_works" >&6; } + case "$gl_cv_func_fdopendir_works" in + *yes) ;; + *) + REPLACE_FDOPENDIR=1 + ;; + esac + fi + if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then @@ -16484,140 +22964,214 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" + fi + GNULIB_FDOPENDIR=1 +$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h - if false; then - GL_COND_LIBTOOL_TRUE= - GL_COND_LIBTOOL_FALSE='#' -else - GL_COND_LIBTOOL_TRUE='#' - GL_COND_LIBTOOL_FALSE= -fi - gl_cond_libtool=false - gl_libdeps= - gl_ltlibdeps= - gl_m4_base='gnulib/m4' +cat >>confdefs.h <<_ACEOF +#define GNULIB_FDOPENDIR 1 +_ACEOF + : - gl_source_base='gnulib/lib' - # Code from module alloca: - # Code from module alloca-opt: - if test $ac_cv_func_alloca_works = no; then - : - fi - # Define an additional variable used in the Makefile substitution. - if test $ac_cv_working_alloca_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 -$as_echo_n "checking for alloca as a compiler built-in... " >&6; } -if test "${gl_cv_rpl_alloca+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5 +$as_echo_n "checking whether fflush works on input streams... " >&6; } +if ${gl_cv_func_fflush_stdin+:} false; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + echo hello world > conftest.txt + if test "$cross_compiling" = yes; then : + gl_cv_func_fflush_stdin=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined __GNUC__ || defined _AIX || defined _MSC_VER - Need own alloca +#include +#if HAVE_UNISTD_H +# include +#else /* on Windows with MSVC */ +# include #endif +int +main () +{ +FILE *f = fopen ("conftest.txt", "r"); + char buffer[10]; + int fd; + int c; + if (f == NULL) + return 1; + fd = fileno (f); + if (fd < 0 || fread (buffer, 1, 5, f) != 5) + return 2; + /* For deterministic results, ensure f read a bigger buffer. */ + if (lseek (fd, 0, SEEK_CUR) == 5) + return 3; + /* POSIX requires fflush-fseek to set file offset of fd. This fails + on BSD systems and on mingw. */ + if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) + return 4; + if (lseek (fd, 0, SEEK_CUR) != 5) + return 5; + /* Verify behaviour of fflush after ungetc. See + */ + /* Verify behaviour of fflush after a backup ungetc. This fails on + mingw. */ + c = fgetc (f); + ungetc (c, f); + fflush (f); + if (fgetc (f) != c) + return 6; + /* Verify behaviour of fflush after a non-backup ungetc. This fails + on glibc 2.8 and on BSD systems. */ + c = fgetc (f); + ungetc ('@', f); + fflush (f); + if (fgetc (f) != c) + return 7; + return 0; + + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Need own alloca" >/dev/null 2>&1; then : - gl_cv_rpl_alloca=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_fflush_stdin=yes else - gl_cv_rpl_alloca=no + gl_cv_func_fflush_stdin=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f conftest* + rm conftest.txt fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 -$as_echo "$gl_cv_rpl_alloca" >&6; } - if test $gl_cv_rpl_alloca = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5 +$as_echo "$gl_cv_func_fflush_stdin" >&6; } + case $gl_cv_func_fflush_stdin in + yes) gl_func_fflush_stdin=1 ;; + no) gl_func_fflush_stdin=0 ;; + *) gl_func_fflush_stdin='(-1)' ;; + esac -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin +_ACEOF - ALLOCA_H=alloca.h - else - ALLOCA_H= - fi - else - ALLOCA_H=alloca.h + + if test $gl_cv_func_fflush_stdin != yes; then + REPLACE_FFLUSH=1 fi + if test $REPLACE_FFLUSH = 1; then - # Code from module areadlink: - # Code from module areadlink-with-size: - # Code from module areadlinkat: + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext" + + : + fi cat >>confdefs.h <<_ACEOF -#define GNULIB_AREADLINKAT 1 +#define GNULIB_FFLUSH 1 _ACEOF - # Code from module arg-nonnull: - # Code from module argmatch: + GNULIB_FFLUSH=1 - gl_LIBOBJS="$gl_LIBOBJS argmatch.$ac_objext" +$as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h - # Code from module assert: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5 -$as_echo_n "checking whether to enable assertions... " >&6; } - # Check whether --enable-assert was given. -if test "${enable_assert+set}" = set; then : - enableval=$enable_assert; if test "x$enableval" = xno; then : -$as_echo "#define NDEBUG 1" >>confdefs.h -elif test "x$enableval" != xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5 -$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;} - enable_assert=yes -fi + + ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF + + +$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h + else - enable_assert=yes + : fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5 -$as_echo "$enable_assert" >&6; } - # Code from module bitrotate: - # Code from module btowc: + + if test $ac_cv_member_struct_stat_st_blocks = no; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext" + + + + : + + + + + + : + + fi + + + + : + + @@ -16630,128 +23184,163 @@ $as_echo "$enable_assert" >&6; } - if test $ac_cv_func_btowc = no; then - HAVE_BTOWC=0 - else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5 +$as_echo_n "checking for flexible array member... " >&6; } +if ${ac_cv_c_flexmember+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + struct s { int n; double d[]; }; +int +main () +{ +int m = getchar (); + struct s *p = malloc (offsetof (struct s, d) + + m * sizeof (double)); + p->d[0] = 0.0; + return p->d != (double *) NULL; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_flexmember=yes +else + ac_cv_c_flexmember=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 +$as_echo "$ac_cv_c_flexmember" >&6; } + if test $ac_cv_c_flexmember = yes; then + +$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h + + else + $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h + + fi + + + + + FLOAT_H= + REPLACE_FLOAT_LDBL=0 + case "$host_os" in + aix* | beos* | openbsd* | mirbsd* | irix*) + FLOAT_H=float.h + ;; + freebsd*) + case "$host_cpu" in + i[34567]86 ) + FLOAT_H=float.h + ;; + x86_64 ) + # On x86_64 systems, the C compiler may still be generating + # 32-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __x86_64__ || defined __amd64__ + yes + #endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + +else + FLOAT_H=float.h +fi +rm -f conftest* + ;; + esac + ;; + linux*) + case "$host_cpu" in + powerpc*) + FLOAT_H=float.h + ;; + esac + ;; + esac + case "$host_os" in + aix* | freebsd* | linux*) + if test -n "$FLOAT_H"; then + REPLACE_FLOAT_LDBL=1 + fi + ;; + esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5 -$as_echo_n "checking whether btowc(0) is correct... " >&6; } -if test "${gl_cv_func_btowc_nul+set}" = set; then : + REPLACE_ITOLD=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5 +$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; } +if ${gl_cv_func_itold_works+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - - case "$host_os" in - # Guess no on Cygwin. - cygwin*) gl_cv_func_btowc_nul="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_nul="guessing yes" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then : + case "$host" in + sparc*-*-linux*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (btowc ('\0') != 0) - return 1; - return 0; -} +#if defined __LP64__ || defined __arch64__ + yes + #endif _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_btowc_nul=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_func_itold_works="guessing no" else - gl_cv_func_btowc_nul=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - + gl_cv_func_itold_works="guessing yes" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5 -$as_echo "$gl_cv_func_btowc_nul" >&6; } +rm -f conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5 -$as_echo_n "checking whether btowc(EOF) is correct... " >&6; } -if test "${gl_cv_func_btowc_eof+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + ;; + *) gl_cv_func_itold_works="guessing yes" ;; + esac - case "$host_os" in - # Guess no on IRIX. - irix*) gl_cv_func_btowc_eof="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_eof="guessing yes" ;; - esac - if test $LOCALE_FR != none; then - if test "$cross_compiling" = yes; then : - : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include +int i = -1; +volatile long double ld; int main () { - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - if (btowc (EOF) != WEOF) - return 1; - } + ld += i * 1.0L; + if (ld > 0) + return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_btowc_eof=yes + gl_cv_func_itold_works=yes else - gl_cv_func_btowc_eof=no + gl_cv_func_itold_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5 -$as_echo "$gl_cv_func_btowc_eof" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5 +$as_echo "$gl_cv_func_itold_works" >&6; } + case "$gl_cv_func_itold_works" in + *no) + REPLACE_ITOLD=1 + FLOAT_H=float.h + ;; + esac - case "$gl_cv_func_btowc_nul" in - *yes) ;; - *) REPLACE_BTOWC=1 ;; - esac - case "$gl_cv_func_btowc_eof" in - *yes) ;; - *) REPLACE_BTOWC=1 ;; - esac - fi - if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then + if test -n "$FLOAT_H"; then - : @@ -16759,34 +23348,82 @@ $as_echo "$gl_cv_func_btowc_eof" >&6; } + if test $gl_cv_have_include_next = yes; then + gl_cv_next_float_h='<'float.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_float_h+:} false; then : + $as_echo_n "(cached) " >&6 +else - gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac - : + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'float.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' - fi + gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + gl_header=$gl_cv_absolute_float_h + gl_cv_next_float_h='"'$gl_header'"' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 +$as_echo "$gl_cv_next_float_h" >&6; } + fi + NEXT_FLOAT_H=$gl_cv_next_float_h - GNULIB_BTOWC=1 + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'float.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_float_h + fi + NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive -$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h + fi + if test -n "$FLOAT_H"; then + GL_GENERATE_FLOAT_H_TRUE= + GL_GENERATE_FLOAT_H_FALSE='#' +else + GL_GENERATE_FLOAT_H_TRUE='#' + GL_GENERATE_FLOAT_H_FALSE= +fi - # Code from module c++defs: - # Code from module c-ctype: - # Code from module c-strcase: - # Code from module c-strcasestr: - # Code from module c-strstr: - # Code from module canonicalize: + if test $REPLACE_FLOAT_LDBL = 1; then @@ -16794,224 +23431,270 @@ $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS canonicalize.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext" + fi + if test $REPLACE_ITOLD = 1; then - : + gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext" - if test $ac_cv_func_canonicalize_file_name = no; then - HAVE_CANONICALIZE_FILE_NAME=0 - elif test "$gl_cv_func_realpath_works" != yes; then - REPLACE_CANONICALIZE_FILE_NAME=1 fi -cat >>confdefs.h <<_ACEOF -#define GNULIB_CANONICALIZE 1 + + + FNMATCH_H= + gl_fnmatch_required_lowercase=` + echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]' + ` + gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 +$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } +if eval \${$gl_fnmatch_cache_var+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test $gl_fnmatch_required = GNU; then + gl_fnmatch_gnu_start= + gl_fnmatch_gnu_end= + else + gl_fnmatch_gnu_start='#if 0' + gl_fnmatch_gnu_end='#endif' + fi + if test "$cross_compiling" = yes; then : + eval "$gl_fnmatch_cache_var=\"guessing no\"" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + static int + y (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == 0; + } + static int + n (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == FNM_NOMATCH; + } + +int +main () +{ +char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; + char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; + static char const A_1[] = { 'A' - 1, 0 }; + static char const A01[] = { 'A' + 1, 0 }; + static char const a_1[] = { 'a' - 1, 0 }; + static char const a01[] = { 'a' + 1, 0 }; + static char const bs_1[] = { '\\\\' - 1, 0 }; + static char const bs01[] = { '\\\\' + 1, 0 }; + int result = 0; + if (!n ("a*", "", 0)) + return 1; + if (!y ("a*", "abc", 0)) + return 1; + if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ + return 1; + if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) + return 2; + if (!y ("a\\\\bc", "abc", 0)) + return 3; + if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) + return 3; + if (!y ("*x", ".x", 0)) + return 4; + if (!n ("*x", ".x", FNM_PERIOD)) + return 4; + if (!y (Apat, "\\\\", 0)) + return 5; + if (!y (Apat, "A", 0)) + return 5; + if (!y (apat, "\\\\", 0)) + return 5; + if (!y (apat, "a", 0)) + return 5; + if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, a01, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) + return 5; + $gl_fnmatch_gnu_start + if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) + result |= 8; + if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) + result |= 16; + if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) + result |= 32; + if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + $gl_fnmatch_gnu_end + return result; + + ; + return 0; +} _ACEOF +if ac_fn_c_try_run "$LINENO"; then : + eval "$gl_fnmatch_cache_var=yes" +else + eval "$gl_fnmatch_cache_var=no" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +eval ac_res=\$$gl_fnmatch_cache_var + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" + if test "$gl_fnmatch_result" = yes; then + rm -f "$gl_source_base/fnmatch.h" + else + FNMATCH_H=fnmatch.h + fi + if test -n "$FNMATCH_H"; then + GL_GENERATE_FNMATCH_H_TRUE= + GL_GENERATE_FNMATCH_H_FALSE='#' +else + GL_GENERATE_FNMATCH_H_TRUE='#' + GL_GENERATE_FNMATCH_H_FALSE= +fi -$as_echo "#define GNULIB_TEST_CANONICALIZE 1" >>confdefs.h + if test -n "$FNMATCH_H"; then - GNULIB_CANONICALIZE_FILE_NAME=1 -$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" - # Code from module chdir-long: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5 -$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; } -if test "${gl_cv_have_arbitrary_file_name_length_limit+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if defined PATH_MAX || defined MAXPATHLEN -have_arbitrary_file_name_length_limit -#endif +cat >>confdefs.h <<_ACEOF +#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then : - gl_cv_have_arbitrary_file_name_length_limit=yes -else - gl_cv_have_arbitrary_file_name_length_limit=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5 -$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; } - if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then + ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include +" +if test "x$ac_cv_have_decl_isblank" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISBLANK $ac_have_decl +_ACEOF + : - gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext" - : - fi - # Code from module chown: - GNULIB_CHOWN=1 -$as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h - # Code from module clock-time: - # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. - # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - LIB_CLOCK_GETTIME= - gl_saved_libs=$LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 -$as_echo_n "checking for library containing clock_gettime... " >&6; } -if test "${ac_cv_search_clock_gettime+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char clock_gettime (); -int -main () -{ -return clock_gettime (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt posix4; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_clock_gettime=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_clock_gettime+set}" = set; then : - break -fi -done -if test "${ac_cv_search_clock_gettime+set}" = set; then : -else - ac_cv_search_clock_gettime=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 -$as_echo "$ac_cv_search_clock_gettime" >&6; } -ac_res=$ac_cv_search_clock_gettime -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - test "$ac_cv_search_clock_gettime" = "none required" || - LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime -fi - for ac_func in clock_gettime clock_settime -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + : -fi -done - LIBS=$gl_saved_libs - # Code from module cloexec: + fi + if test -n "$FNMATCH_H"; then - gl_LIBOBJS="$gl_LIBOBJS cloexec.$ac_objext" -$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h - # Code from module close: + gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" +cat >>confdefs.h <<_ACEOF +#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch +_ACEOF - GNULIB_CLOSE=1 + ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include +" +if test "x$ac_cv_have_decl_isblank" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISBLANK $ac_have_decl +_ACEOF -$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h + : - # Code from module close-hook: - # Code from module close-stream: @@ -17021,19 +23704,13 @@ $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS close-stream.$ac_objext" - : -cat >>confdefs.h <<_ACEOF -#define GNULIB_CLOSE_STREAM 1 -_ACEOF - # Code from module closein: @@ -17042,166 +23719,167 @@ _ACEOF + : - gl_LIBOBJS="$gl_LIBOBJS closein.$ac_objext" - : - # Code from module closeout: + fi + case "$host_os" in + mingw* | pw*) + REPLACE_FOPEN=1 + gl_cv_func_fopen_slash="guessing no" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5 +$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; } +if ${gl_cv_func_fopen_slash+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) + gl_cv_func_fopen_slash="guessing no" ;; + *) + gl_cv_func_fopen_slash="guessing yes" ;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - gl_LIBOBJS="$gl_LIBOBJS closeout.$ac_objext" +#include +#include +int main () +{ + return fopen ("conftest.sl/", "w") != NULL; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_fopen_slash=yes +else + gl_cv_func_fopen_slash=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.sl - : +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5 +$as_echo "$gl_cv_func_fopen_slash" >&6; } + ;; + esac + case "$gl_cv_func_fopen_slash" in + *no) - # Code from module configmake: +$as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h - if test "x$datarootdir" = x; then - datarootdir='${datadir}' + REPLACE_FOPEN=1 + ;; + esac - fi - if test "x$docdir" = x; then - docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' + if test $REPLACE_FOPEN = 1; then - fi - if test "x$htmldir" = x; then - htmldir='${docdir}' - fi - if test "x$dvidir" = x; then - dvidir='${docdir}' - fi - if test "x$pdfdir" = x; then - pdfdir='${docdir}' - fi - if test "x$psdir" = x; then - psdir='${docdir}' - fi - if test "x$lispdir" = x; then - lispdir='${datarootdir}/emacs/site-lisp' - fi - if test "x$localedir" = x; then - localedir='${datarootdir}/locale' - fi - pkglibexecdir='${libexecdir}/${PACKAGE}' + gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext" + : + fi - # Code from module ctype: + GNULIB_FOPEN=1 +$as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h - if test $gl_cv_have_include_next = yes; then - gl_cv_next_ctype_h='<'ctype.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_ctype_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + +cat >>confdefs.h <<_ACEOF +#define GNULIB_FOPEN_SAFER 1 _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_ctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/ctype.h#{ - s#.*"\(.*/ctype.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5 -$as_echo "$gl_cv_next_ctype_h" >&6; } - fi - NEXT_CTYPE_H=$gl_cv_next_ctype_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'ctype.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_ctype_h - fi - NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive + : - for gl_func in isblank; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : + fp_headers=' + #include + #if HAVE_STDIO_EXT_H + # include + #endif + ' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5 +$as_echo_n "checking for __fpending... " >&6; } +if ${gl_cv_func___fpending+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$fp_headers int main () { -#undef $gl_func - (void) $gl_func; +return ! __fpending (stdin); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func___fpending=yes else - eval "$as_gl_Symbol=no" + gl_cv_func___fpending=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext - eval ac_cv_have_decl_$gl_func=yes fi - done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5 +$as_echo "$gl_cv_func___fpending" >&6; } + if test $gl_cv_func___fpending = yes; then + ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers +" +if test "x$ac_cv_have_decl___fpending" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___FPENDING $ac_have_decl +_ACEOF - # Code from module cycle-check: + fi + if test $gl_cv_func___fpending = no; then @@ -17210,224 +23888,228 @@ fi + gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext" - gl_LIBOBJS="$gl_LIBOBJS cycle-check.$ac_objext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5 +$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; } +if ${ac_cv_sys_pending_output_n_bytes+:} false; then : + $as_echo_n "(cached) " >&6 +else + + for ac_expr in \ + \ + '# glibc2' \ + 'fp->_IO_write_ptr - fp->_IO_write_base' \ + \ + '# traditional Unix' \ + 'fp->_ptr - fp->_base' \ + \ + '# BSD' \ + 'fp->_p - fp->_bf._base' \ + \ + '# SCO, Unixware' \ + '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ + \ + '# QNX' \ + '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ + \ + '# old glibc?' \ + 'fp->__bufp - fp->__buffer' \ + \ + '# old glibc iostream?' \ + 'fp->_pptr - fp->_pbase' \ + \ + '# emx+gcc' \ + 'fp->_ptr - fp->_buffer' \ + \ + '# Minix' \ + 'fp->_ptr - fp->_buf' \ + \ + '# Plan9' \ + 'fp->wp - fp->buf' \ + \ + '# VMS' \ + '(*fp)->_ptr - (*fp)->_base' \ + \ + '# e.g., DGUX R4.11; the info is not available' \ + 1 \ + ; do + + # Skip each embedded comment. + case "$ac_expr" in '#'*) continue;; esac - # Code from module d-ino: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5 -$as_echo_n "checking for d_ino member in directory struct... " >&6; } -if test "${gl_cv_struct_dirent_d_ino+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_struct_dirent_d_ino=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include - +#include int main () { -DIR *dp = opendir ("."); - struct dirent *e; - struct stat st; - if (! dp) - return 1; - e = readdir (dp); - if (! e) - return 2; - if (stat (e->d_name, &st) != 0) - return 3; - if (e->d_ino != st.st_ino) - return 4; - return 0; - +FILE *fp = stdin; (void) ($ac_expr); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_struct_dirent_d_ino=yes -else - gl_cv_struct_dirent_d_ino=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO"; then : + fp_done=yes + fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$fp_done" = yes && break + done + + ac_cv_sys_pending_output_n_bytes=$ac_expr + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5 -$as_echo "$gl_cv_struct_dirent_d_ino" >&6; } - if test $gl_cv_struct_dirent_d_ino = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5 +$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; } -$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes +_ACEOF - fi + + fi - # Code from module d-type: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5 -$as_echo_n "checking for d_type member in directory struct... " >&6; } -if test "${gl_cv_struct_dirent_d_type+set}" = set; then : + + : + + + + + + + : + + + + + + ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include +" +if test "x$ac_cv_have_decl_fpurge" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FPURGE $ac_have_decl +_ACEOF + + if test "x$ac_cv_func_fpurge" = xyes; then + HAVE_FPURGE=1 + # Detect BSD bug. Only cygwin 1.7 is known to be immune. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5 +$as_echo_n "checking whether fpurge works... " >&6; } +if ${gl_cv_func_fpurge_works+:} false; then : $as_echo_n "(cached) " >&6 else + if test "$cross_compiling" = yes; then : + gl_cv_func_fpurge_works='guessing no' +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include +#include int main () { -struct dirent dp; dp.d_type = 0; +FILE *f = fopen ("conftest.txt", "w+"); + if (!f) return 1; + if (fputc ('a', f) != 'a') return 2; + rewind (f); + if (fgetc (f) != 'a') return 3; + if (fgetc (f) != EOF) return 4; + if (fpurge (f) != 0) return 5; + if (putc ('b', f) != 'b') return 6; + if (fclose (f) != 0) return 7; + if ((f = fopen ("conftest.txt", "r")) == NULL) return 8; + if (fgetc (f) != 'a') return 9; + if (fgetc (f) != 'b') return 10; + if (fgetc (f) != EOF) return 11; + if (fclose (f) != 0) return 12; + if (remove ("conftest.txt") != 0) return 13; + return 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_struct_dirent_d_type=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_fpurge_works=yes else - gl_cv_struct_dirent_d_type=no + gl_cv_func_fpurge_works=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5 -$as_echo "$gl_cv_struct_dirent_d_type" >&6; } - if test $gl_cv_struct_dirent_d_type = yes; then -$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5 +$as_echo "$gl_cv_func_fpurge_works" >&6; } + if test "x$gl_cv_func_fpurge_works" != xyes; then + REPLACE_FPURGE=1 + fi + else + HAVE_FPURGE=0 + fi + if test "x$ac_cv_have_decl_fpurge" = xno; then + HAVE_DECL_FPURGE=0 + fi - fi + if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then - # Code from module dev-ino: - # Code from module dirent: + gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext" + fi - : + GNULIB_FPURGE=1 - if test $gl_cv_have_include_next = yes; then - gl_cv_next_dirent_h='<'dirent.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_dirent_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +$as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h - if test $ac_cv_header_dirent_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/dirent.h#{ - s#.*"\(.*/dirent.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_dirent_h='<'dirent.h'>' - fi + : -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 -$as_echo "$gl_cv_next_dirent_h" >&6; } - fi - NEXT_DIRENT_H=$gl_cv_next_dirent_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'dirent.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_dirent_h - fi - NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive + if test $ac_cv_func___freadahead = no; then - for gl_func in alphasort dirfd fdopendir scandir; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - eval ac_cv_have_decl_$gl_func=yes -fi - done - # Code from module dirent-safer: - : + gl_LIBOBJS="$gl_LIBOBJS freadahead.$ac_objext" + fi + : @@ -17437,86 +24119,36 @@ fi + if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then + REPLACE_FSEEK=1 + fi - gl_LIBOBJS="$gl_LIBOBJS opendir-safer.$ac_objext" + if test $REPLACE_FSEEK = 1; then -cat >>confdefs.h <<_ACEOF -#define GNULIB_DIRENT_SAFER 1 -_ACEOF - # Code from module dirfd: + gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext" - : + fi - for ac_func in dirfd -do : - ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd" -if test "x$ac_cv_func_dirfd" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DIRFD 1 -_ACEOF -fi -done + GNULIB_FSEEK=1 - ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include - #include -" -if test "x$ac_cv_have_decl_dirfd" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_DIRFD $ac_have_decl -_ACEOF - if test $ac_cv_have_decl_dirfd = no; then - HAVE_DECL_DIRFD=0 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5 -$as_echo_n "checking whether dirfd is a macro... " >&6; } -if test "${gl_cv_func_dirfd_macro+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifdef dirfd - dirent_header_defines_dirfd -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then : - gl_cv_func_dirfd_macro=yes -else - gl_cv_func_dirfd_macro=no -fi -rm -f conftest* +$as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5 -$as_echo "$gl_cv_func_dirfd_macro" >&6; } - # Use the replacement only if we have no function or macro with that name. - if test $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro = no,no; then - if test $ac_cv_have_decl_dirfd = yes; then - # If the system declares dirfd already, let's declare rpl_dirfd instead. - REPLACE_DIRFD=1 - fi @@ -17525,261 +24157,308 @@ $as_echo "$gl_cv_func_dirfd_macro" >&6; } - gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5 -$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; } -if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5 +$as_echo_n "checking for fseeko... " >&6; } +if ${gl_cv_func_fseeko+:} false; then : $as_echo_n "(cached) " >&6 else - dirfd_save_CFLAGS=$CFLAGS - for ac_expr in d_fd dd_fd; do - - CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include - #include - #include int main () { -DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME; +fseeko (stdin, 0, 0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - dir_fd_found=yes +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_fseeko=yes +else + gl_cv_func_fseeko=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$dirfd_save_CFLAGS - test "$dir_fd_found" = yes && break - done - test "$dir_fd_found" = yes || ac_expr=no_such_member +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5 +$as_echo "$gl_cv_func_fseeko" >&6; } - gl_cv_sys_dir_fd_member_name=$ac_expr + + : -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5 -$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; } - if test $gl_cv_sys_dir_fd_member_name != no_such_member; then -cat >>confdefs.h <<_ACEOF -#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name -_ACEOF - fi + if test $ac_cv_have_decl_fseeko = no; then + HAVE_DECL_FSEEKO=0 fi + if test $gl_cv_func_fseeko = no; then + HAVE_FSEEKO=0 + else + if test $WINDOWS_64_BIT_OFF_T = 1; then + REPLACE_FSEEKO=1 + fi + if test $gl_cv_var_stdin_large_offset = no; then + REPLACE_FSEEKO=1 + fi + + : - GNULIB_DIRFD=1 -$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5 +$as_echo_n "checking whether fflush works on input streams... " >&6; } +if ${gl_cv_func_fflush_stdin+:} false; then : + $as_echo_n "(cached) " >&6 +else + echo hello world > conftest.txt + if test "$cross_compiling" = yes; then : + gl_cv_func_fflush_stdin=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_UNISTD_H +# include +#else /* on Windows with MSVC */ +# include +#endif - # Code from module dirname: +int +main () +{ +FILE *f = fopen ("conftest.txt", "r"); + char buffer[10]; + int fd; + int c; + if (f == NULL) + return 1; + fd = fileno (f); + if (fd < 0 || fread (buffer, 1, 5, f) != 5) + return 2; + /* For deterministic results, ensure f read a bigger buffer. */ + if (lseek (fd, 0, SEEK_CUR) == 5) + return 3; + /* POSIX requires fflush-fseek to set file offset of fd. This fails + on BSD systems and on mingw. */ + if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) + return 4; + if (lseek (fd, 0, SEEK_CUR) != 5) + return 5; + /* Verify behaviour of fflush after ungetc. See + */ + /* Verify behaviour of fflush after a backup ungetc. This fails on + mingw. */ + c = fgetc (f); + ungetc (c, f); + fflush (f); + if (fgetc (f) != c) + return 6; + /* Verify behaviour of fflush after a non-backup ungetc. This fails + on glibc 2.8 and on BSD systems. */ + c = fgetc (f); + ungetc ('@', f); + fflush (f); + if (fgetc (f) != c) + return 7; + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_fflush_stdin=yes +else + gl_cv_func_fflush_stdin=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm conftest.txt +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5 +$as_echo "$gl_cv_func_fflush_stdin" >&6; } + case $gl_cv_func_fflush_stdin in + yes) gl_func_fflush_stdin=1 ;; + no) gl_func_fflush_stdin=0 ;; + *) gl_func_fflush_stdin='(-1)' ;; + esac +cat >>confdefs.h <<_ACEOF +#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin +_ACEOF + if test $gl_cv_func_fflush_stdin != yes; then + REPLACE_FSEEKO=1 + fi + fi + if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then - gl_LIBOBJS="$gl_LIBOBJS basename.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" + for ac_func in _fseeki64 +do : + ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64" +if test "x$ac_cv_func__fseeki64" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FSEEKI64 1 +_ACEOF - gl_LIBOBJS="$gl_LIBOBJS dirname.$ac_objext" +fi +done + fi -cat >>confdefs.h <<_ACEOF -#define GNULIB_DIRNAME 1 -_ACEOF - # Code from module dirname-lgpl: + GNULIB_FSEEKO=1 +$as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext" + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_FSTAT=1 + fi + if test $WINDOWS_64_BIT_ST_SIZE = 1; then + REPLACE_FSTAT=1 + fi - gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext" + : + if test $ac_cv_func_fchdir = no; then + HAVE_FCHDIR=0 + fi + if test $HAVE_FCHDIR = 0; then + case "$gl_cv_func_open_directory_works" in + *yes) ;; + *) + REPLACE_FSTAT=1 + ;; + esac + fi - gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext" + if test $REPLACE_FSTAT = 1; then - # Code from module dosname: - # Code from module double-slash-root: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 -$as_echo_n "checking whether // is distinct from /... " >&6; } -if test "${gl_cv_double_slash_root+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test x"$cross_compiling" = xyes ; then - # When cross-compiling, there is no way to tell whether // is special - # short of a list of hosts. However, the only known hosts to date - # that have a distinct // are Apollo DomainOS (too old to port to), - # Cygwin, and z/OS. If anyone knows of another system for which // has - # special semantics and is distinct from /, please report it to - # . - case $host in - *-cygwin | i370-ibm-openedition) - gl_cv_double_slash_root=yes ;; - *) - # Be optimistic and assume that / and // are the same when we - # don't know. - gl_cv_double_slash_root='unknown, assuming no' ;; - esac - else - set x `ls -di / // 2>/dev/null` - if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then - gl_cv_double_slash_root=no - else - gl_cv_double_slash_root=yes - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 -$as_echo "$gl_cv_double_slash_root" >&6; } - if test "$gl_cv_double_slash_root" = yes; then -$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext" + + : fi - # Code from module dup2: - : + GNULIB_FSTAT=1 + +$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h - if test $ac_cv_func_dup2 = no; then - HAVE_DUP2=0 + : - gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" + + if test $ac_cv_func_fstatat = no; then + HAVE_FSTATAT=0 else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 -$as_echo_n "checking whether dup2 works... " >&6; } -if test "${gl_cv_func_dup2_works+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5 +$as_echo_n "checking whether fstatat (..., 0) works... " >&6; } +if ${gl_cv_func_fstatat_zero_flag+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case "$host_os" in - mingw*) # on this platform, dup2 always returns 0 for success - gl_cv_func_dup2_works=no;; - cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works=no;; - linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a - # closed fd may yield -EBADF instead of -1 / errno=EBADF. - gl_cv_func_dup2_works=no;; - freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. - gl_cv_func_dup2_works=no;; - haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. - gl_cv_func_dup2_works=no;; - *) gl_cv_func_dup2_works=yes;; - esac + aix*) gl_cv_func_fstatat_zero_flag="guessing no";; + *) gl_cv_func_fstatat_zero_flag="guessing yes";; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include -#include -#include -int -main () -{ -int result = 0; -#if HAVE_FCNTL - if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) - result |= 1; -#endif HAVE_FCNTL - if (dup2 (1, 1) == 0) - result |= 2; -#if HAVE_FCNTL - if (fcntl (1, F_GETFD) != FD_CLOEXEC) - result |= 4; -#endif - close (0); - if (dup2 (0, 0) != -1) - result |= 8; - /* Many gnulib modules require POSIX conformance of EBADF. */ - if (dup2 (2, 1000000) == -1 && errno != EBADF) - result |= 16; - return result; - - ; - return 0; -} + #include + #include + int + main (void) + { + struct stat a; + return fstatat (AT_FDCWD, ".", &a, 0) != 0; + } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_dup2_works=yes + gl_cv_func_fstatat_zero_flag=yes else - gl_cv_func_dup2_works=no + gl_cv_func_fstatat_zero_flag=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -17787,15 +24466,24 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 -$as_echo "$gl_cv_func_dup2_works" >&6; } - if test "$gl_cv_func_dup2_works" = no; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5 +$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; } + case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in + *yes+*yes) ;; + *) REPLACE_FSTATAT=1 + case $gl_cv_func_fstatat_zero_flag in + *yes) - if test $ac_cv_func_dup2 = yes; then - REPLACE_DUP2=1 +$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h + + ;; + esac + ;; + esac fi + if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then @@ -17803,151 +24491,283 @@ $as_echo "$gl_cv_func_dup2_works" >&6; } - gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" - fi fi - GNULIB_DUP2=1 + GNULIB_FSTATAT=1 -$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h - # Code from module environ: +$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h - GNULIB_ENVIRON=1 + if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then + REPLACE_FTELL=1 + fi -$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h + if test $REPLACE_FTELL = 1; then - # Code from module errno: - # Code from module error: + gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext" + fi + GNULIB_FTELL=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 -$as_echo_n "checking for error_at_line... " >&6; } -if test "${ac_cv_lib_error_at_line+set}" = set; then : + +$as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h + + + + + + + + + + + + + : + + + + + + if test $ac_cv_have_decl_ftello = no; then + HAVE_DECL_FTELLO=0 + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5 +$as_echo_n "checking for ftello... " >&6; } +if ${gl_cv_func_ftello+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { -error_at_line (0, 0, "", 0, "an error occurred"); +ftello (stdin); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_error_at_line=yes + gl_cv_func_ftello=yes else - ac_cv_lib_error_at_line=no + gl_cv_func_ftello=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 -$as_echo "$ac_cv_lib_error_at_line" >&6; } - if test $ac_cv_lib_error_at_line = no; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5 +$as_echo "$gl_cv_func_ftello" >&6; } + if test $gl_cv_func_ftello = no; then + HAVE_FTELLO=0 + else + if test $WINDOWS_64_BIT_OFF_T = 1; then + REPLACE_FTELLO=1 + fi + if test $gl_cv_var_stdin_large_offset = no; then + REPLACE_FTELLO=1 + fi + if test $REPLACE_FTELLO = 0; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5 +$as_echo_n "checking whether ftello works... " >&6; } +if ${gl_cv_func_ftello_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + # Guess no on Solaris. + solaris*) gl_cv_func_ftello_works="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_ftello_works="guessing yes" ;; + esac + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#define TESTFILE "conftest.tmp" +int +main (void) +{ + FILE *fp; + /* Create a file with some contents. */ + fp = fopen (TESTFILE, "w"); + if (fp == NULL) + return 70; + if (fwrite ("foogarsh", 1, 8, fp) < 8) + return 71; + if (fclose (fp)) + return 72; + /* The file's contents is now "foogarsh". */ + /* Try writing after reading to EOF. */ + fp = fopen (TESTFILE, "r+"); + if (fp == NULL) + return 73; + if (fseek (fp, -1, SEEK_END)) + return 74; + if (!(getc (fp) == 'h')) + return 1; + if (!(getc (fp) == EOF)) + return 2; + if (!(ftell (fp) == 8)) + return 3; + if (!(ftell (fp) == 8)) + return 4; + if (!(putc ('!', fp) == '!')) + return 5; + if (!(ftell (fp) == 9)) + return 6; + if (!(fclose (fp) == 0)) + return 7; + fp = fopen (TESTFILE, "r"); + if (fp == NULL) + return 75; + { + char buf[10]; + if (!(fread (buf, 1, 10, fp) == 9)) + return 10; + if (!(memcmp (buf, "foogarsh!", 9) == 0)) + return 11; + } + if (!(fclose (fp) == 0)) + return 12; + /* The file's contents is now "foogarsh!". */ + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_ftello_works=yes +else + gl_cv_func_ftello_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" - fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5 +$as_echo "$gl_cv_func_ftello_works" >&6; } + case "$gl_cv_func_ftello_works" in + *yes) ;; + *) + REPLACE_FTELLO=1 +$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h + ;; + esac + fi + fi + if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then - : - XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" - XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" + gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext" - # Code from module euidaccess: + for ac_func in _ftelli64 +do : + ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64" +if test "x$ac_cv_func__ftelli64" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FTELLI64 1 +_ACEOF +fi +done + fi + GNULIB_FTELLO=1 - for ac_func in euidaccess -do : - ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess" -if test "x$ac_cv_func_euidaccess" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EUIDACCESS 1 -_ACEOF -else +$as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" -fi -done - if test $ac_cv_func_euidaccess = no; then - HAVE_EUIDACCESS=0 - : + : - : + case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in + yes+*yes) + ;; + yes+*) + # Solaris 9 has *at functions, but uniformly mishandles trailing + # slash in all of them. + REPLACE_OPENAT=1 + ;; + *) + HAVE_OPENAT=0 + ;; + esac @@ -17958,111 +24778,49 @@ done + : - # Solaris 9 needs -lgen to get the eaccess function. - # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all* - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - LIB_EACCESS= - - gl_saved_libs=$LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5 -$as_echo_n "checking for library containing eaccess... " >&6; } -if test "${ac_cv_search_eaccess+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char eaccess (); -int -main () -{ -return eaccess (); - ; - return 0; -} -_ACEOF -for ac_lib in '' gen; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_eaccess=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_eaccess+set}" = set; then : - break -fi -done -if test "${ac_cv_search_eaccess+set}" = set; then : -else - ac_cv_search_eaccess=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5 -$as_echo "$ac_cv_search_eaccess" >&6; } -ac_res=$ac_cv_search_eaccess -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - test "$ac_cv_search_eaccess" = "none required" || - LIB_EACCESS=$ac_cv_search_eaccess -fi - for ac_func in eaccess -do : - ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess" -if test "x$ac_cv_func_eaccess" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EACCESS 1 -_ACEOF -fi -done - LIBS=$gl_saved_libs - fi + ac_fn_c_check_member "$LINENO" "struct statfs" "f_type" "ac_cv_member_struct_statfs_f_type" "$ac_includes_default + #include +" +if test "x$ac_cv_member_struct_statfs_f_type" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS_F_TYPE 1 +_ACEOF +fi - GNULIB_EUIDACCESS=1 -$as_echo "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h - # Code from module exitfail: - # Code from module extensions: - # Code from module faccessat: + gl_LIBOBJS="$gl_LIBOBJS fts.$ac_objext" - : + gl_abort_bug=no + case "$host_os" in + mingw*) + gl_cv_func_getcwd_path_max=yes + ;; + *) : @@ -18071,54 +24829,234 @@ $as_echo "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h - if test $ac_cv_func_faccessat = no; then - HAVE_FACCESSAT=0 + : - gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5 +$as_echo_n "checking whether getcwd handles long file names properly... " >&6; } +if ${gl_cv_func_getcwd_path_max+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Arrange for deletion of the temporary directory this test creates. + ac_clean_files="$ac_clean_files confdir3" + if test "$cross_compiling" = yes; then : + case "$host_os" in + aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; + *) gl_cv_func_getcwd_path_max=no;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - fi +#include +#include +#if HAVE_UNISTD_H +# include +#else +# include +#endif +#include +#include +#include +#include +#include +/* Arrange to define PATH_MAX, like "pathmax.h" does. */ +#if HAVE_UNISTD_H +# include +#endif +#include +#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN +# include +#endif +#if !defined PATH_MAX && defined MAXPATHLEN +# define PATH_MAX MAXPATHLEN +#endif +#ifdef __hpux +# undef PATH_MAX +# define PATH_MAX 1024 +#endif +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# undef PATH_MAX +# define PATH_MAX 260 +#endif -cat >>confdefs.h <<_ACEOF -#define GNULIB_FACCESSAT 1 -_ACEOF +#ifndef AT_FDCWD +# define AT_FDCWD 0 +#endif +#ifdef ENAMETOOLONG +# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) +#else +# define is_ENAMETOOLONG(x) 0 +#endif +/* Use the getcwd function, not any macro. */ +#undef getcwd +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir +#ifndef S_IRWXU +# define S_IRWXU 0700 +#endif - GNULIB_FACCESSAT=1 +/* The length of this name must be 8. */ +#define DIR_NAME "confdir3" +#define DIR_NAME_LEN 8 +#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) +/* The length of "../". */ +#define DOTDOTSLASH_LEN 3 +/* Leftover bytes in the buffer, to work around library or OS bugs. */ +#define BUF_SLOP 20 -$as_echo "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h +int +main () +{ +#ifndef PATH_MAX + /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- + at least not on a local file system. And if we were to start worrying + about remote file systems, we'd have to enable the wrapper function + all of the time, just to be safe. That's not worth the cost. */ + exit (0); +#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ + - DIR_NAME_SIZE - BUF_SLOP) \ + <= PATH_MAX) + /* FIXME: Assuming there's a system for which this is true, + this should be done in a compile test. */ + exit (0); +#else + char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) + + DIR_NAME_SIZE + BUF_SLOP]; + char *cwd = getcwd (buf, PATH_MAX); + size_t initial_cwd_len; + size_t cwd_len; + int fail = 0; + size_t n_chdirs = 0; + if (cwd == NULL) + exit (10); + cwd_len = initial_cwd_len = strlen (cwd); - # Code from module fchdir: + while (1) + { + size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); + char *c = NULL; + cwd_len += DIR_NAME_SIZE; + /* If mkdir or chdir fails, it could be that this system cannot create + any file with an absolute name longer than PATH_MAX, such as cygwin. + If so, leave fail as 0, because the current working directory can't + be too long for getcwd if it can't even be created. For other + errors, be pessimistic and consider that as a failure, too. */ + if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) + { + if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) + fail = 20; + break; + } + if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) + { + c = getcwd (buf, PATH_MAX); + if (!c && errno == ENOENT) + { + fail = 11; + break; + } + if (c) + { + fail = 31; + break; + } + if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) + { + fail = 21; + break; + } + } + if (dotdot_max <= cwd_len - initial_cwd_len) + { + if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) + break; + c = getcwd (buf, cwd_len + 1); + if (!c) + { + if (! (errno == ERANGE || errno == ENOENT + || is_ENAMETOOLONG (errno))) + { + fail = 22; + break; + } + if (AT_FDCWD || errno == ERANGE || errno == ENOENT) + { + fail = 12; + break; + } + } + } + if (c && strlen (c) != cwd_len) + { + fail = 23; + break; + } + ++n_chdirs; + } + /* Leaving behind such a deep directory is not polite. + So clean up here, right away, even though the driving + shell script would also clean up. */ + { + size_t i; - : + /* Try rmdir first, in case the chdir failed. */ + rmdir (DIR_NAME); + for (i = 0; i <= n_chdirs; i++) + { + if (chdir ("..") < 0) + break; + if (rmdir (DIR_NAME) != 0) + break; + } + } + exit (fail); +#endif +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getcwd_path_max=yes +else + case $? in + 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; + 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; + *) gl_cv_func_getcwd_path_max=no;; + esac +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5 +$as_echo "$gl_cv_func_getcwd_path_max" >&6; } - if test $ac_cv_have_decl_fchdir = no; then - HAVE_DECL_FCHDIR=0 - fi + case "$gl_cv_func_getcwd_null" in + *yes) : @@ -18127,60 +25065,205 @@ $as_echo "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h - if test $ac_cv_func_fchdir = no; then - HAVE_FCHDIR=0 - - - - - + : - gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext" - : -$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h - REPLACE_OPENDIR=1 - REPLACE_CLOSEDIR=1 - REPLACE_DUP=1 + for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF - REPLACE_OPEN=1 +fi +done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5 +$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; } +if ${gl_cv_func_getcwd_abort_bug+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Remove any remnants of a previous test. + rm -rf confdir-14B--- + # Arrange for deletion of the temporary directory this test creates. + ac_clean_files="$ac_clean_files confdir-14B---" + if test "$cross_compiling" = yes; then : + gl_cv_func_getcwd_abort_bug=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if HAVE_UNISTD_H +# include +#else /* on Windows with MSVC */ +# include +#endif +#include +#include +/* Arrange to define PATH_MAX, like "pathmax.h" does. */ +#if HAVE_UNISTD_H +# include +#endif +#include +#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN +# include +#endif +#if !defined PATH_MAX && defined MAXPATHLEN +# define PATH_MAX MAXPATHLEN +#endif +#ifdef __hpux +# undef PATH_MAX +# define PATH_MAX 1024 +#endif +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# undef PATH_MAX +# define PATH_MAX 260 +#endif +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir +#ifndef S_IRWXU +# define S_IRWXU 0700 +#endif - gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" +/* FIXME: skip the run-test altogether on systems without getpagesize. */ +#if ! HAVE_GETPAGESIZE +# define getpagesize() 0 +#endif +/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than + the 16kB pagesize on ia64 linux. Those conditions make the code below + trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ +#define TARGET_LEN (5 * 1024) +int +main () +{ + char *cwd; + size_t initial_cwd_len; + int fail = 0; + /* The bug is triggered when PATH_MAX < getpagesize (), so skip + this relatively expensive and invasive test if that's not true. */ +#ifdef PATH_MAX + int bug_possible = PATH_MAX < getpagesize (); +#else + int bug_possible = 0; +#endif + if (! bug_possible) + return 0; - : + cwd = getcwd (NULL, 0); + if (cwd == NULL) + return 2; + initial_cwd_len = strlen (cwd); + free (cwd); + if (1) + { + static char const dir_name[] = "confdir-14B---"; + size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) + / sizeof dir_name); + size_t d; + for (d = 0; d < desired_depth; d++) + { + if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) + { + if (! (errno == ERANGE || errno == ENAMETOOLONG + || errno == ENOENT)) + fail = 3; /* Unable to construct deep hierarchy. */ + break; + } + } + /* If libc has the bug in question, this invocation of getcwd + results in a failed assertion. */ + cwd = getcwd (NULL, 0); + if (cwd == NULL) + fail = 4; /* getcwd didn't assert, but it failed for a long name + where the answer could have been learned. */ + free (cwd); - REPLACE_CLOSE=1 + /* Call rmdir first, in case the above chdir failed. */ + rmdir (dir_name); + while (0 < d--) + { + if (chdir ("..") < 0) + { + fail = 5; + break; + } + rmdir (dir_name); + } + } + return fail; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getcwd_abort_bug=no +else + ret=$? + if test $ret -ge 128 || test $ret = 4; then + gl_cv_func_getcwd_abort_bug=yes + else + gl_cv_func_getcwd_abort_bug=no + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5 +$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; } + if test $gl_cv_func_getcwd_abort_bug = yes; then : + gl_abort_bug=yes +fi + ;; + esac + ;; + esac + case "$gl_cv_func_getcwd_path_max" in + "no"|"no, it has the AIX bug") ;; + *) +$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h + ;; + esac + case "$gl_cv_func_getcwd_path_max" in + "no, but it is partly working") - gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" +$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h + ;; + esac + if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \ + || test $gl_cv_func_getcwd_posix_signature != yes \ + || test "$gl_cv_func_getcwd_path_max" != yes \ + || test $gl_abort_bug = yes; then + REPLACE_GETCWD=1 + fi - REPLACE_FCLOSE=1 + if test $REPLACE_GETCWD = 1; then @@ -18189,120 +25272,76 @@ $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" + : - if test $ac_cv_func_dup2 = yes; then - REPLACE_DUP2=1 fi +cat >>confdefs.h <<_ACEOF +#define GNULIB_GETCWD 1 +_ACEOF - gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" - - + GNULIB_GETCWD=1 - : +$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else - REPLACE_FCNTL=1 - fi + case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in + *yes,yes) ;; + *) + REPLACE_GETCWD=1 + ;; + esac + if test $REPLACE_GETCWD = 1; then - gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" - : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5 -$as_echo_n "checking whether open can visit directories... " >&6; } -if test "${gl_cv_func_open_directory_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_open_directory_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -return open(".", O_RDONLY) < 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_open_directory_works=yes -else - gl_cv_func_open_directory_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5 -$as_echo "$gl_cv_func_open_directory_works" >&6; } - if test "$gl_cv_func_open_directory_works" != yes; then -$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext" - REPLACE_FSTAT=1 - fi fi - GNULIB_FCHDIR=1 - - - -$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h - - - - # Code from module fclose: + GNULIB_GETCWD=1 - GNULIB_FCLOSE=1 - +$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h -$as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h - # Code from module fcntl: @@ -18314,8 +25353,6 @@ $as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h - if test $ac_cv_func_fcntl = no; then - : @@ -18324,532 +25361,411 @@ $as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else - REPLACE_FCNTL=1 - fi - - - - - - + if test $ac_cv_func_getdelim = yes; then + HAVE_GETDELIM=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5 +$as_echo_n "checking for working getdelim function... " >&6; } +if ${gl_cv_func_working_getdelim+:} false; then : + $as_echo_n "(cached) " >&6 +else + echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + Lucky GNU user + #endif +#endif - gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky GNU user" >/dev/null 2>&1; then : + gl_cv_func_working_getdelim="guessing yes" +else + gl_cv_func_working_getdelim="guessing no" +fi +rm -f conftest* - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 -$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } -if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - # Guess that it works on glibc systems - case $host_os in #(( - *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; - *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; - esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include - -int -main () -{ -int result = 0; - if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; - if (errno != EINVAL) result |= 2; - return result; +# include +# include +# include + int main () + { + FILE *in = fopen ("./conftest.data", "r"); + if (!in) + return 1; + { + /* Test result for a NULL buffer and a zero size. + Based on a test program from Karl Heuer. */ + char *line = NULL; + size_t siz = 0; + int len = getdelim (&line, &siz, '\n', in); + if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) + return 2; + } + { + /* Test result for a NULL buffer and a non-zero size. + This crashes on FreeBSD 8.0. */ + char *line = NULL; + size_t siz = (size_t)(~0) / 4; + if (getdelim (&line, &siz, '\n', in) == -1) + return 3; + } + return 0; + } - ; - return 0; -} _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fcntl_f_dupfd_works=yes + gl_cv_func_working_getdelim=yes else - gl_cv_func_fcntl_f_dupfd_works=no + gl_cv_func_working_getdelim=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 -$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } - case $gl_cv_func_fcntl_f_dupfd_works in - *yes) ;; - *) - - - : - - - - - - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5 +$as_echo "$gl_cv_func_working_getdelim" >&6; } + case "$gl_cv_func_working_getdelim" in + *no) + REPLACE_GETDELIM=1 + ;; + esac else - REPLACE_FCNTL=1 + HAVE_GETDELIM=0 fi + if test $ac_cv_have_decl_getdelim = no; then + HAVE_DECL_GETDELIM=0 + fi + if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then - gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" - - - -$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 -$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } -if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifndef F_DUPFD_CLOEXEC -choke me -#endif + gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" -int -main () -{ - ; - return 0; -} + for ac_func in flockfile funlockfile +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __linux__ -/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace - it to support the semantics on older kernels that failed with EINVAL. */ -choke me -#endif - -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_fcntl_f_dupfd_cloexec=yes -else - gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done + + ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" +if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : + ac_have_decl=1 else - gl_cv_func_fcntl_f_dupfd_cloexec=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_have_decl=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 -$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } - if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then - - - - : - - +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl +_ACEOF - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else - REPLACE_FCNTL=1 fi + GNULIB_GETDELIM=1 - gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" - - - fi - fi - - - - - GNULIB_FCNTL=1 - - - -$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h +$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h - # Code from module fcntl-h: + : - if test $gl_cv_have_include_next = yes; then - gl_cv_next_fcntl_h='<'fcntl.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_fcntl_h+set}" = set; then : + if test $ac_cv_func_getdtablesize = yes; then + # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit + # up to an unchangeable hard limit; all other platforms correctly + # require setrlimit before getdtablesize() can report a larger value. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5 +$as_echo_n "checking whether getdtablesize works... " >&6; } +if ${gl_cv_func_getdtablesize_works+:} false; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/fcntl.h#{ - s#.*"\(.*/fcntl.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 -$as_echo "$gl_cv_next_fcntl_h" >&6; } - fi - NEXT_FCNTL_H=$gl_cv_next_fcntl_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'fcntl.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_fcntl_h - fi - NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive - - - - - - - for gl_func in fcntl openat; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 + if test "$cross_compiling" = yes; then : + case "$host_os" in + cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows + gl_cv_func_getdtablesize_works="guessing no" ;; + *) gl_cv_func_getdtablesize_works="guessing yes" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + #include int main () { -#undef $gl_func - (void) $gl_func; +int size = getdtablesize(); + if (dup2 (0, getdtablesize()) != -1) + return 1; + if (size != getdtablesize()) + return 2; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getdtablesize_works=yes else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + gl_cv_func_getdtablesize_works=no fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - done - - - # Code from module fcntl-safer: - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS open-safer.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS creat-safer.$ac_objext" - # Prerequisites of lib/open-safer.c. +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5 +$as_echo "$gl_cv_func_getdtablesize_works" >&6; } + case "$gl_cv_func_getdtablesize_works" in + *yes) ;; + *) REPLACE_GETDTABLESIZE=1 ;; + esac + else + HAVE_GETDTABLESIZE=0 + fi + if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then -cat >>confdefs.h <<_ACEOF -#define GNULIB_FCNTL_SAFER 1 -_ACEOF - - - # Code from module fdl: - # Code from module fdopendir: - - ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" " -#include -" -if test "x$ac_cv_have_decl_fdopendir" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FDOPENDIR $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : -else - HAVE_DECL_FDOPENDIR=0 -fi - : + gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" + : + fi - if test $ac_cv_func_fdopendir = no; then + GNULIB_GETDTABLESIZE=1 +$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" +if test "x$ac_cv_func_getgroups" = xyes; then : +fi - gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" + # If we don't yet have getgroups, see if it's in -lbsd. + # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. + ac_save_LIBS=$LIBS + if test $ac_cv_func_getgroups = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 +$as_echo_n "checking for getgroups in -lbsd... " >&6; } +if ${ac_cv_lib_bsd_getgroups+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getgroups (); +int +main () +{ +return getgroups (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_bsd_getgroups=yes +else + ac_cv_lib_bsd_getgroups=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5 +$as_echo "$ac_cv_lib_bsd_getgroups" >&6; } +if test "x$ac_cv_lib_bsd_getgroups" = xyes; then : + GETGROUPS_LIB=-lbsd +fi - : + fi - HAVE_FDOPENDIR=0 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5 -$as_echo_n "checking whether fdopendir works... " >&6; } -if test "${gl_cv_func_fdopendir_works+set}" = set; then : + # Run the program to test the functionality of the system-supplied + # getgroups function only if there is such a function. + if test $ac_cv_func_getgroups = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 +$as_echo_n "checking for working getgroups... " >&6; } +if ${ac_cv_func_getgroups_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - gl_cv_func_fdopendir_works="guessing no" + case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, assume the worst. + *) ac_cv_func_getgroups_works="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -#include -#if !HAVE_DECL_FDOPENDIR -extern DIR *fdopendir (int); -#endif - +$ac_includes_default int main () { -int result = 0; - int fd = open ("conftest.c", O_RDONLY); - if (fd < 0) result |= 1; - if (fdopendir (fd)) result |= 2; - if (close (fd)) result |= 4; - return result; +/* On Ultrix 4.3, getgroups (0, 0) always fails. */ + return getgroups (0, 0) == -1; ; return 0; } + _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fdopendir_works=yes + ac_cv_func_getgroups_works=yes else - gl_cv_func_fdopendir_works=no + ac_cv_func_getgroups_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5 -$as_echo "$gl_cv_func_fdopendir_works" >&6; } - if test "$gl_cv_func_fdopendir_works" != yes; then - REPLACE_FDOPENDIR=1 - - : - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" - - fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 +$as_echo "$ac_cv_func_getgroups_works" >&6; } + else + ac_cv_func_getgroups_works=no fi + case "$ac_cv_func_getgroups_works" in + *yes) +$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h + ;; + esac + LIBS=$ac_save_LIBS + if test $ac_cv_func_getgroups != yes; then + HAVE_GETGROUPS=0 + else + if test "$ac_cv_type_getgroups" != gid_t \ + || { case "$ac_cv_func_getgroups_works" in + *yes) false;; + *) true;; + esac + }; then + REPLACE_GETGROUPS=1 - GNULIB_FDOPENDIR=1 - - - -$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h - - - - - -cat >>confdefs.h <<_ACEOF -#define GNULIB_FDOPENDIR 1 -_ACEOF - - - # Code from module fflush: +$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5 -$as_echo_n "checking whether fflush works on input streams... " >&6; } -if test "${gl_cv_func_fflush_stdin+set}" = set; then : + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5 +$as_echo_n "checking whether getgroups handles negative values... " >&6; } +if ${gl_cv_func_getgroups_works+:} false; then : $as_echo_n "(cached) " >&6 else - echo hello world > conftest.txt - if test "$cross_compiling" = yes; then : - gl_cv_func_fflush_stdin=no + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_getgroups_works="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include - +$ac_includes_default int main () { -FILE *f = fopen ("conftest.txt", "r"); - char buffer[10]; - int fd; - int c; - if (f == NULL) - return 1; - fd = fileno (f); - if (fd < 0 || fread (buffer, 1, 5, f) != 5) - return 2; - /* For deterministic results, ensure f read a bigger buffer. */ - if (lseek (fd, 0, SEEK_CUR) == 5) - return 3; - /* POSIX requires fflush-fseek to set file offset of fd. This fails - on BSD systems and on mingw. */ - if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) - return 4; - if (lseek (fd, 0, SEEK_CUR) != 5) - return 5; - /* Verify behaviour of fflush after ungetc. See - */ - /* Verify behaviour of fflush after a backup ungetc. This fails on - mingw. */ - c = fgetc (f); - ungetc (c, f); - fflush (f); - if (fgetc (f) != c) - return 6; - /* Verify behaviour of fflush after a non-backup ungetc. This fails - on glibc 2.8 and on BSD systems. */ - c = fgetc (f); - ungetc ('@', f); - fflush (f); - if (fgetc (f) != c) - return 7; - return 0; - +int size = getgroups (0, 0); + gid_t *list = malloc (size * sizeof *list); + return getgroups (-1, list) != -1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fflush_stdin=yes + gl_cv_func_getgroups_works=yes else - gl_cv_func_fflush_stdin=no + gl_cv_func_getgroups_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm conftest.txt - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5 -$as_echo "$gl_cv_func_fflush_stdin" >&6; } - if test $gl_cv_func_fflush_stdin = no; then - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5 +$as_echo "$gl_cv_func_getgroups_works" >&6; } + case "$gl_cv_func_getgroups_works" in + *yes) ;; + *) REPLACE_GETGROUPS=1 ;; + esac + fi + fi + test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS" + if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then @@ -18857,74 +25773,126 @@ $as_echo "$gl_cv_func_fflush_stdin" >&6; } - gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext" - REPLACE_FFLUSH=1 + fi - : + GNULIB_GETGROUPS=1 - if test $gl_cv_func_fseeko = yes; then - REPLACE_FSEEKO=1 - fi +$as_echo "#define GNULIB_TEST_GETGROUPS 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" - fi + : - GNULIB_FFLUSH=1 + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF -$as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h +fi +done + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi - # Code from module file-set: - # Code from module fileblocks: - ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 + GETHOSTNAME_LIB= + for ac_func in gethostname +do : + ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" +if test "x$ac_cv_func_gethostname" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETHOSTNAME 1 _ACEOF +else -$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h - + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname in winsock2.h and -lws2_32" >&5 +$as_echo_n "checking for gethostname in winsock2.h and -lws2_32... " >&6; } +if ${gl_cv_w32_gethostname+:} false; then : + $as_echo_n "(cached) " >&6 else + gl_cv_w32_gethostname=no + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef HAVE_WINSOCK2_H +#include +#endif +#include + +int +main () +{ +gethostname(NULL, 0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_w32_gethostname=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostname" >&5 +$as_echo "$gl_cv_w32_gethostname" >&6; } + if test "$gl_cv_w32_gethostname" = "yes"; then + GETHOSTNAME_LIB="-lws2_32" + fi +fi +done + if test "$ac_cv_func_gethostname" = no; then + HAVE_GETHOSTNAME=0 + fi + : - gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext" -fi - if test $ac_cv_member_struct_stat_st_blocks = no; then : @@ -18933,268 +25901,223 @@ fi + : - fi - # Code from module filemode: + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HOST_NAME_MAX" >&5 +$as_echo_n "checking for HOST_NAME_MAX... " >&6; } +if ${gl_cv_decl_HOST_NAME_MAX+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_cv_decl_HOST_NAME_MAX= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef HOST_NAME_MAX +lucky +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "lucky" >/dev/null 2>&1; then : + gl_cv_decl_HOST_NAME_MAX=yes +fi +rm -f conftest* + + if test -z "$gl_cv_decl_HOST_NAME_MAX"; then + if test "$gl_cv_w32_gethostname" = yes; then + gl_cv_decl_HOST_NAME_MAX=256 + else + if ac_fn_c_compute_int "$LINENO" "MAXHOSTNAMELEN" "gl_cv_decl_HOST_NAME_MAX" " +#include +#if HAVE_SYS_PARAM_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_NETDB_H +# include +#endif +"; then : + +else + gl_cv_decl_HOST_NAME_MAX=256 + +fi + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_HOST_NAME_MAX" >&5 +$as_echo "$gl_cv_decl_HOST_NAME_MAX" >&6; } + if test "$gl_cv_decl_HOST_NAME_MAX" != yes; then +cat >>confdefs.h <<_ACEOF +#define HOST_NAME_MAX $gl_cv_decl_HOST_NAME_MAX +_ACEOF + fi - gl_LIBOBJS="$gl_LIBOBJS filemode.$ac_objext" + if test $HAVE_GETHOSTNAME = 0; then - : - # Code from module flexmember: + gl_LIBOBJS="$gl_LIBOBJS gethostname.$ac_objext" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5 -$as_echo_n "checking for flexible array member... " >&6; } -if test "${ac_cv_c_flexmember+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include - struct s { int n; double d[]; }; -int -main () -{ -int m = getchar (); - struct s *p = malloc (offsetof (struct s, d) - + m * sizeof (double)); - p->d[0] = 0.0; - return p->d != (double *) NULL; - ; - return 0; -} + + if test "$gl_cv_w32_gethostname" != "yes"; then + for ac_func in uname +do : + ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" +if test "x$ac_cv_func_uname" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNAME 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_flexmember=yes -else - ac_cv_c_flexmember=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 -$as_echo "$ac_cv_c_flexmember" >&6; } - if test $ac_cv_c_flexmember = yes; then -$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h +fi +done - else - $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h + fi fi - # Code from module float: - FLOAT_H= - case "$host_os" in - beos* | openbsd* | mirbsd*) - FLOAT_H=float.h + GNULIB_GETHOSTNAME=1 +$as_echo "#define GNULIB_TEST_GETHOSTNAME 1" >>confdefs.h - if test $gl_cv_have_include_next = yes; then - gl_cv_next_float_h='<'float.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_float_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/float.h#{ - s#.*"\(.*/float.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 -$as_echo "$gl_cv_next_float_h" >&6; } - fi - NEXT_FLOAT_H=$gl_cv_next_float_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'float.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_float_h - fi - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive + : - ;; - esac - # Code from module fnmatch: + gl_getline_needs_run_time_check=no + ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline" +if test "x$ac_cv_func_getline" = xyes; then : + gl_getline_needs_run_time_check=yes +else + am_cv_func_working_getline=no +fi + if test $gl_getline_needs_run_time_check = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5 +$as_echo_n "checking for working getline function... " >&6; } +if ${am_cv_func_working_getline+:} false; then : + $as_echo_n "(cached) " >&6 +else + echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + Lucky GNU user + #endif +#endif - FNMATCH_H= - gl_fnmatch_required_lowercase=` - echo $gl_fnmatch_required | tr '[A-Z]' '[a-z]' - ` - gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 -$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } -if eval "test \"\${$gl_fnmatch_cache_var+set}\"" = set; then : - $as_echo_n "(cached) " >&6 +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky GNU user" >/dev/null 2>&1; then : + am_cv_func_working_getline="guessing yes" else - if test $gl_fnmatch_required = GNU; then - gl_fnmatch_gnu_start= - gl_fnmatch_gnu_end= - else - gl_fnmatch_gnu_start='#if 0' - gl_fnmatch_gnu_end='#endif' - fi - if test "$cross_compiling" = yes; then : - eval "$gl_fnmatch_cache_var=\"guessing no\"" + am_cv_func_working_getline="guessing no" +fi +rm -f conftest* + + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - static int - y (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == 0; - } - static int - n (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == FNM_NOMATCH; - } -int -main () -{ -char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; - char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; - static char const A_1[] = { 'A' - 1, 0 }; - static char const A01[] = { 'A' + 1, 0 }; - static char const a_1[] = { 'a' - 1, 0 }; - static char const a01[] = { 'a' + 1, 0 }; - static char const bs_1[] = { '\\\\' - 1, 0 }; - static char const bs01[] = { '\\\\' + 1, 0 }; - int result = 0; - if (!n ("a*", "", 0)) - return 1; - if (!y ("a*", "abc", 0)) - return 1; - if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) - return 2; - if (!y ("a\\\\bc", "abc", 0)) - return 3; - if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) - return 3; - if (!y ("*x", ".x", 0)) - return 4; - if (!n ("*x", ".x", FNM_PERIOD)) - return 4; - if (!y (Apat, "\\\\", 0)) - return 5; - if (!y (Apat, "A", 0)) - return 5; - if (!y (apat, "\\\\", 0)) - return 5; - if (!y (apat, "a", 0)) - return 5; - if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, a01, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) - return 5; - $gl_fnmatch_gnu_start - if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) - result |= 8; - if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) - result |= 16; - if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) - result |= 32; - if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - $gl_fnmatch_gnu_end - return result; +# include +# include +# include + int main () + { + FILE *in = fopen ("./conftest.data", "r"); + if (!in) + return 1; + { + /* Test result for a NULL buffer and a zero size. + Based on a test program from Karl Heuer. */ + char *line = NULL; + size_t siz = 0; + int len = getline (&line, &siz, in); + if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) + return 2; + } + { + /* Test result for a NULL buffer and a non-zero size. + This crashes on FreeBSD 8.0. */ + char *line = NULL; + size_t siz = (size_t)(~0) / 4; + if (getline (&line, &siz, in) == -1) + return 3; + } + return 0; + } - ; - return 0; -} _ACEOF if ac_fn_c_try_run "$LINENO"; then : - eval "$gl_fnmatch_cache_var=yes" + am_cv_func_working_getline=yes else - eval "$gl_fnmatch_cache_var=no" + am_cv_func_working_getline=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5 +$as_echo "$am_cv_func_working_getline" >&6; } + fi + + if test $ac_cv_have_decl_getline = no; then + HAVE_DECL_GETLINE=0 + fi + + case "$am_cv_func_working_getline" in + *no) + REPLACE_GETLINE=1 + ;; + esac + + if test $REPLACE_GETLINE = 1; then -fi -eval ac_res=\$$gl_fnmatch_cache_var - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" - if test "$gl_fnmatch_result" = yes; then - rm -f "$gl_source_base/fnmatch.h" - else - FNMATCH_H=fnmatch.h @@ -19202,29 +26125,24 @@ $as_echo "$ac_res" >&6; } + gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" - gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" + : -cat >>confdefs.h <<_ACEOF -#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch -_ACEOF + fi - ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include -" -if test "x$ac_cv_have_decl_isblank" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ISBLANK $ac_have_decl -_ACEOF - : + GNULIB_GETLINE=1 + + + + + +$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h @@ -19233,6 +26151,7 @@ _ACEOF + if test $REPLACE_GETOPT = 1; then @@ -19241,6 +26160,8 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + @@ -19249,6 +26170,7 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" @@ -19258,76 +26180,37 @@ _ACEOF + + GNULIB_GL_UNISTD_H_GETOPT=1 fi - # Code from module fnmatch-gnu: +$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h - # Code from module fopen: - case "$host_os" in - mingw* | pw*) - REPLACE_FOPEN=1 - gl_cv_func_fopen_slash="guessing no" - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5 -$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; } -if test "${gl_cv_func_fopen_slash+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + REPLACE_GETOPT=0 + if test -n "$gl_replace_getopt"; then + REPLACE_GETOPT=1 + fi - if test "$cross_compiling" = yes; then : + if test $REPLACE_GETOPT = 1; then - case "$host_os" in - aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) - gl_cv_func_fopen_slash="guessing no" ;; - *) - gl_cv_func_fopen_slash="guessing yes" ;; - esac + GETOPT_H=getopt.h -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h -#include -#include -int main () -{ - return fopen ("conftest.sl/", "w") != NULL; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fopen_slash=yes -else - gl_cv_func_fopen_slash=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - rm -f conftest.sl -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5 -$as_echo "$gl_cv_func_fopen_slash" >&6; } - ;; - esac - case "$gl_cv_func_fopen_slash" in - *no) + fi -$as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h + if test $REPLACE_GETOPT = 1; then - REPLACE_FOPEN=1 - ;; - esac - if test $REPLACE_FOPEN = 1; then @@ -19335,49 +26218,46 @@ $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" - gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext" - fi - GNULIB_FOPEN=1 + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" -$as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h + : - # Code from module fopen-safer: + GNULIB_GL_UNISTD_H_GETOPT=1 + fi - gl_LIBOBJS="$gl_LIBOBJS fopen-safer.$ac_objext" + + + : -cat >>confdefs.h <<_ACEOF -#define GNULIB_FOPEN_SAFER 1 -_ACEOF - # Code from module fpending: - : @@ -19390,98 +26270,151 @@ _ACEOF - fp_headers=' -# include -# if HAVE_STDIO_EXT_H -# include -# endif -' - ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers -" -if test "x$ac_cv_have_decl___fpending" = x""yes; then : - ac_have_decl=1 + + gl_gettimeofday_timezone=void + if test $ac_cv_func_gettimeofday != yes; then + HAVE_GETTIMEOFDAY=0 + else + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 +$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } +if ${gl_cv_func_gettimeofday_clobber+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_have_decl=0 -fi + if test "$cross_compiling" = yes; then : + # When cross-compiling: + case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + esac -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL___FPENDING $ac_have_decl +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + #include + +int +main () +{ + + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; + + ; + return 0; +} _ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_gettimeofday_clobber=no +else + gl_cv_func_gettimeofday_clobber=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - if test $ac_cv_func___fpending = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5 -$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; } -if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - for ac_expr in \ - \ - '# glibc2' \ - 'fp->_IO_write_ptr - fp->_IO_write_base' \ - \ - '# traditional Unix' \ - 'fp->_ptr - fp->_base' \ - \ - '# BSD' \ - 'fp->_p - fp->_bf._base' \ - \ - '# SCO, Unixware' \ - '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ - \ - '# QNX' \ - '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ - \ - '# old glibc?' \ - 'fp->__bufp - fp->__buffer' \ - \ - '# old glibc iostream?' \ - 'fp->_pptr - fp->_pbase' \ - \ - '# emx+gcc' \ - 'fp->_ptr - fp->_buffer' \ - \ - '# VMS' \ - '(*fp)->_ptr - (*fp)->_base' \ - \ - '# e.g., DGUX R4.11; the info is not available' \ - 1 \ - ; do - - # Skip each embedded comment. - case "$ac_expr" in '#'*) continue;; esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 +$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + case "$gl_cv_func_gettimeofday_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + + REPLACE_GMTIME=1 + REPLACE_LOCALTIME=1 + + +$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h + + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 +$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } +if ${gl_cv_func_gettimeofday_posix_signature+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + struct timeval c; + int gettimeofday (struct timeval *restrict, void *restrict); + int main () { -FILE *fp = stdin; (void) ($ac_expr); +/* glibc uses struct timezone * rather than the POSIX void * + if _GNU_SOURCE is defined. However, since the only portable + use of gettimeofday uses NULL as the second parameter, and + since the glibc definition is actually more typesafe, it is + not worth wrapping this to get a compliant signature. */ + int (*f) (struct timeval *restrict, void *restrict) + = gettimeofday; + int x = f (&c, 0); + return !(x | c.tv_sec | c.tv_usec); + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - fp_done=yes + gl_cv_func_gettimeofday_posix_signature=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int gettimeofday (struct timeval *restrict, struct timezone *restrict); + +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_gettimeofday_posix_signature=almost +else + gl_cv_func_gettimeofday_posix_signature=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$fp_done" = yes && break - done - - ac_cv_sys_pending_output_n_bytes=$ac_expr - - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5 -$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 +$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } + if test $gl_cv_func_gettimeofday_posix_signature = almost; then + gl_gettimeofday_timezone='struct timezone' + elif test $gl_cv_func_gettimeofday_posix_signature != yes; then + REPLACE_GETTIMEOFDAY=1 + fi + if test $REPLACE_STRUCT_TIMEVAL = 1; then + REPLACE_GETTIMEOFDAY=1 + fi + + fi cat >>confdefs.h <<_ACEOF -#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes +#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone _ACEOF + if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then @@ -19489,183 +26422,401 @@ _ACEOF - gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext" + + gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" + + + for ac_header in sys/timeb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_timeb_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_TIMEB_H 1 +_ACEOF + +fi + +done + + for ac_func in _ftime +do : + ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" +if test "x$ac_cv_func__ftime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FTIME 1 +_ACEOF + +fi +done + fi - # Code from module fpurge: - : + GNULIB_GETTIMEOFDAY=1 - : +$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h + # 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 + ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile" - ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include -" -if test "x$ac_cv_have_decl_fpurge" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FPURGE $ac_have_decl -_ACEOF - if test "x$ac_cv_func_fpurge" = xyes; then - # Detect BSD bug. Only cygwin 1.7 is known to be immune. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5 -$as_echo_n "checking whether fpurge works... " >&6; } -if test "${gl_cv_func_fpurge_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_fpurge_works='guessing no' -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.txt", "w+"); - if (!f) return 1; - if (fputc ('a', f) != 'a') return 2; - rewind (f); - if (fgetc (f) != 'a') return 3; - if (fgetc (f) != EOF) return 4; - if (fpurge (f) != 0) return 5; - if (putc ('b', f) != 'b') return 6; - if (fclose (f) != 0) return 7; - if ((f = fopen ("conftest.txt", "r")) == NULL) return 8; - if (fgetc (f) != 'a') return 9; - if (fgetc (f) != 'b') return 10; - if (fgetc (f) != EOF) return 11; - if (fclose (f) != 0) return 12; - if (remove ("conftest.txt") != 0) return 13; - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fpurge_works=yes + + ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member" +if test "x$ac_cv_func_group_member" = xyes; then : + else - gl_cv_func_fpurge_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + + HAVE_GROUP_MEMBER=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5 -$as_echo "$gl_cv_func_fpurge_works" >&6; } - if test "x$gl_cv_func_fpurge_works" != xyes; then - REPLACE_FPURGE=1 + if test $HAVE_GROUP_MEMBER = 0; then - gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext" - fi - else + gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext" + fi - gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext" - fi - if test "x$ac_cv_have_decl_fpurge" = xno; then - HAVE_DECL_FPURGE=0 - fi + GNULIB_GROUP_MEMBER=1 - GNULIB_FPURGE=1 +$as_echo "#define GNULIB_TEST_GROUP_MEMBER 1" >>confdefs.h -$as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h - # Code from module freadahead: - # Code from module freading: + : + + + : : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5 +$as_echo_n "checking whether the compiler generally respects inline... " >&6; } +if ${gl_cv_c_inline_effective+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test $ac_cv_c_inline = no; then + gl_cv_c_inline_effective=no + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ +#ifdef __NO_INLINE__ + #error "inline is not effective" + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_c_inline_effective=yes +else + gl_cv_c_inline_effective=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5 +$as_echo "$gl_cv_c_inline_effective" >&6; } + if test $gl_cv_c_inline_effective = yes; then - # Code from module fseeko: +$as_echo "#define HAVE_INLINE 1" >>confdefs.h + fi - : + PRIPTR_PREFIX= + if test -n "$STDINT_H"; then + PRIPTR_PREFIX='"l"' + else + for glpfx in '' l ll I64; do + case $glpfx in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + I64) gltype1='__int64';; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern intptr_t foo; + extern $gltype1 foo; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + PRIPTR_PREFIX='"'$glpfx'"' +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -n "$PRIPTR_PREFIX" && break + done + fi - if test $ac_cv_have_decl_fseeko = no; then - HAVE_DECL_FSEEKO=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 +$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } +if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include + #if HAVE_STDINT_H + #include + #endif + + #if defined INT32_MAX && defined INTMAX_MAX + #define CONDITION (INT32_MAX < INTMAX_MAX) + #elif HAVE_LONG_LONG_INT + #define CONDITION (sizeof (int) < sizeof (long long int)) + #else + #define CONDITION 0 + #endif + int test[CONDITION ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes +else + gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 +$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } + if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then + INT32_MAX_LT_INTMAX_MAX=1; + else + INT32_MAX_LT_INTMAX_MAX=0; fi - if test $gl_cv_func_fseeko = no; then - HAVE_FSEEKO=0 + if test $APPLE_UNIVERSAL_BUILD = 0; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 +$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } +if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include + #if HAVE_STDINT_H + #include + #endif + + #if defined INT64_MAX + #define CONDITION (INT64_MAX == LONG_MAX) + #elif HAVE_LONG_LONG_INT + #define CONDITION (sizeof (long long int) == sizeof (long int)) + #else + #define CONDITION 0 + #endif + int test[CONDITION ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes +else + gl_cv_test_INT64_MAX_EQ_LONG_MAX=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 +$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } + if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then + INT64_MAX_EQ_LONG_MAX=1; + else + INT64_MAX_EQ_LONG_MAX=0; + fi - if test $gl_cv_func_fseeko = yes; then - REPLACE_FSEEKO=1 + else + INT64_MAX_EQ_LONG_MAX=-1 fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 +$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } +if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + #include + #if HAVE_STDINT_H + #include + #endif + #if defined UINT32_MAX && defined UINTMAX_MAX + #define CONDITION (UINT32_MAX < UINTMAX_MAX) + #elif HAVE_LONG_LONG_INT + #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) + #else + #define CONDITION 0 + #endif + int test[CONDITION ? 1 : -1]; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes +else + gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 +$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } + if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then + UINT32_MAX_LT_UINTMAX_MAX=1; + else + UINT32_MAX_LT_UINTMAX_MAX=0; + fi + if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 +$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } +if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + #include + #if HAVE_STDINT_H + #include + #endif - else - if test $gl_cv_var_stdin_large_offset = no; then + #if defined UINT64_MAX + #define CONDITION (UINT64_MAX == ULONG_MAX) + #elif HAVE_LONG_LONG_INT + #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) + #else + #define CONDITION 0 + #endif + int test[CONDITION ? 1 : -1]; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes +else + gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 +$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } + if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then + UINT64_MAX_EQ_ULONG_MAX=1; + else + UINT64_MAX_EQ_ULONG_MAX=0; + fi - if test $gl_cv_func_fseeko = yes; then - REPLACE_FSEEKO=1 + else + UINT64_MAX_EQ_ULONG_MAX=-1 fi @@ -19675,158 +26826,217 @@ $as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" + : - fi - fi + if test $ac_cv_func_isblank = no; then + HAVE_ISBLANK=0 + fi + if test $HAVE_ISBLANK = 0; then - GNULIB_FSEEKO=1 -$as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h - # Code from module ftello: + gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext" + fi + GNULIB_ISBLANK=1 - : - if test $ac_cv_have_decl_ftello = no; then - HAVE_DECL_FTELLO=0 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5 -$as_echo_n "checking for ftello... " >&6; } -if test "${gl_cv_func_ftello+set}" = set; then : - $as_echo_n "(cached) " >&6 + ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include +" +if test "x$ac_cv_have_decl_isfinite" = xyes; then : + ac_have_decl=1 else + ac_have_decl=0 +fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISFINITE $ac_have_decl +_ACEOF + + if test "$ac_cv_have_decl_isfinite" = yes; then + + save_LIBS=$LIBS + ISFINITE_LIBM=missing + for libm in "" "-lm"; do + LIBS="$save_LIBS $libm" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + + #ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + + double x; int main () { -ftello (stdin); +x = isfinite (x) + isfinite ((float) x); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_ftello=yes -else - gl_cv_func_ftello=no + ISFINITE_LIBM=$libm +break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + done + LIBS=$save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5 -$as_echo "$gl_cv_func_ftello" >&6; } - if test $gl_cv_func_ftello = no; then - HAVE_FTELLO=0 - else - if test $gl_cv_var_stdin_large_offset = no; then - REPLACE_FTELLO=1 - else + if test "$ISFINITE_LIBM" != missing; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5 -$as_echo_n "checking whether ftello works... " >&6; } -if test "${gl_cv_func_ftello_works+set}" = set; then : + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isfinite(long double) works" >&5 +$as_echo_n "checking whether isfinite(long double) works... " >&6; } +if ${gl_cv_func_isfinitel_works+:} false; then : $as_echo_n "(cached) " >&6 else - case "$host_os" in - # Guess no on Solaris. - solaris*) gl_cv_func_ftello_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_ftello_works="guessing yes" ;; - esac - if test "$cross_compiling" = yes; then : - : + if test "$cross_compiling" = yes; then : + case "$host_cpu" in + # Guess no on ia64, x86_64, i386. + ia64 | x86_64 | i*86) gl_cv_func_isfinitel_works="guessing no";; + *) gl_cv_func_isfinitel_works="guessing yes";; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#define TESTFILE "conftest.tmp" -int -main (void) +#include +#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { unsigned int word[NWORDS]; long double value; } + memory_long_double; +/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the + runtime type conversion. */ +#ifdef __sgi +static long double NaNl () +{ + double zero = 0.0; + return zero / zero; +} +#else +# define NaNl() (0.0L / 0.0L) +#endif +int main () { - FILE *fp; - - /* Create a file with some contents. */ - fp = fopen (TESTFILE, "w"); - if (fp == NULL) - return 70; - if (fwrite ("foogarsh", 1, 8, fp) < 8) - return 71; - if (fclose (fp)) - return 72; - - /* The file's contents is now "foogarsh". */ + int result = 0; - /* Try writing after reading to EOF. */ - fp = fopen (TESTFILE, "r+"); - if (fp == NULL) - return 73; - if (fseek (fp, -1, SEEK_END)) - return 74; - if (!(getc (fp) == 'h')) - return 1; - if (!(getc (fp) == EOF)) - return 2; - if (!(ftell (fp) == 8)) - return 3; - if (!(ftell (fp) == 8)) - return 4; - if (!(putc ('!', fp) == '!')) - return 5; - if (!(ftell (fp) == 9)) - return 6; - if (!(fclose (fp) == 0)) - return 7; - fp = fopen (TESTFILE, "r"); - if (fp == NULL) - return 75; { - char buf[10]; - if (!(fread (buf, 1, 10, fp) == 9)) - return 10; - if (!(memcmp (buf, "foogarsh!", 9) == 0)) - return 11; + memory_long_double m; + unsigned int i; + + /* The isfinite macro should be immune against changes in the sign bit and + in the mantissa bits. The xor operation twiddles a bit that can only be + a sign bit or a mantissa bit (since the exponent never extends to + bit 31). */ + m.value = NaNl (); + m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); + for (i = 0; i < NWORDS; i++) + m.word[i] |= 1; + if (isfinite (m.value)) + result |= 1; } - if (!(fclose (fp) == 0)) - return 12; - /* The file's contents is now "foogarsh!". */ +#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + if (isfinite (x.value)) + result |= 2; + } + { + /* Signalling NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + if (isfinite (x.value)) + result |= 2; + } + /* The isfinite macro should recognize Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in + Intel IA-64 Architecture Software Developer's Manual, Volume 1: + Application Architecture. + Table 5-2 "Floating-Point Register Encodings" + Figure 5-6 "Memory to Floating-Point Register Data Translation" + */ + { /* Pseudo-NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + if (isfinite (x.value)) + result |= 4; + } + { /* Pseudo-Infinity. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + if (isfinite (x.value)) + result |= 8; + } + { /* Pseudo-Zero. */ + static memory_long_double x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + if (isfinite (x.value)) + result |= 16; + } + { /* Unnormalized number. */ + static memory_long_double x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + if (isfinite (x.value)) + result |= 32; + } + { /* Pseudo-Denormal. */ + static memory_long_double x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + if (isfinite (x.value)) + result |= 64; + } +#endif - return 0; + return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_ftello_works=yes + gl_cv_func_isfinitel_works=yes else - gl_cv_func_ftello_works=no + gl_cv_func_isfinitel_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -19834,22 +27044,23 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5 -$as_echo "$gl_cv_func_ftello_works" >&6; } - case "$gl_cv_func_ftello_works" in - *yes) ;; - *) - REPLACE_FTELLO=1 - -$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isfinitel_works" >&5 +$as_echo "$gl_cv_func_isfinitel_works" >&6; } - ;; + case "$gl_cv_func_isfinitel_works" in + *yes) ;; + *) ISFINITE_LIBM=missing;; esac - fi + fi + fi + if test "$ac_cv_have_decl_isfinite" != yes || + test "$ISFINITE_LIBM" = missing; then + REPLACE_ISFINITE=1 + ISFINITE_LIBM= fi - if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then + if test $REPLACE_ISFINITE = 1; then @@ -19857,91 +27068,311 @@ $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs - gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS isfinite.$ac_objext" fi - GNULIB_FTELLO=1 + GNULIB_ISFINITE=1 -$as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h - # Code from module fts: +$as_echo "#define GNULIB_TEST_ISFINITE 1" >>confdefs.h + ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include + #ifndef isinf + #error \"isinf must be a macro, not a function\" + #endif +" +if test "x$ac_cv_have_decl_isinf" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISINF $ac_have_decl +_ACEOF + if test "$ac_cv_have_decl_isinf" = yes; then - gl_LIBOBJS="$gl_LIBOBJS fts.$ac_objext" + save_LIBS=$LIBS + ISINF_LIBM=missing + for libm in "" "-lm"; do + LIBS="$save_LIBS $libm" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + double x; +int +main () +{ +x = isinf (x) + isinf ((float) x); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ISINF_LIBM=$libm +break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + LIBS=$save_LIBS + + if test "$ISINF_LIBM" != missing; then - GNULIB_OPENAT=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isinf(long double) works" >&5 +$as_echo_n "checking whether isinf(long double) works... " >&6; } +if ${gl_cv_func_isinfl_works+:} false; then : + $as_echo_n "(cached) " >&6 +else - GNULIB_FCHMODAT=1 - GNULIB_FSTATAT=1 - GNULIB_MKDIRAT=1 + if test "$cross_compiling" = yes; then : + case "$host" in + # Guess no on OpenBSD ia64, x86_64, i386. + ia64-*-openbsd* | x86_64-*-openbsd* | i*86-*-openbsd*) + gl_cv_func_isinfl_works="guessing no";; + *) + gl_cv_func_isinfl_works="guessing yes";; + esac - GNULIB_FCHOWNAT=1 - GNULIB_UNLINKAT=1 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { unsigned int word[NWORDS]; long double value; } + memory_long_double; +/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the + runtime type conversion. */ +#ifdef __sgi +static long double NaNl () +{ + double zero = 0.0; + return zero / zero; +} +#else +# define NaNl() (0.0L / 0.0L) +#endif +int main () +{ + int result = 0; + if (isinf (LDBL_MAX)) + result |= 1; + { + memory_long_double m; + unsigned int i; + + /* The isinf macro should be immune against changes in the sign bit and + in the mantissa bits. The xor operation twiddles a bit that can only be + a sign bit or a mantissa bit (since the exponent never extends to + bit 31). */ + m.value = NaNl (); + m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); + for (i = 0; i < NWORDS; i++) + m.word[i] |= 1; + if (isinf (m.value)) + result |= 2; + } +#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + if (isinf (x.value)) + result |= 2; + } + { + /* Signalling NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + if (isinf (x.value)) + result |= 2; + } + /* The isinf macro should recognize Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in + Intel IA-64 Architecture Software Developer's Manual, Volume 1: + Application Architecture. + Table 5-2 "Floating-Point Register Encodings" + Figure 5-6 "Memory to Floating-Point Register Data Translation" + */ + { /* Pseudo-NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + if (isinf (x.value)) + result |= 4; + } + { /* Pseudo-Infinity. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + if (isinf (x.value)) + result |= 8; + } + { /* Pseudo-Zero. */ + static memory_long_double x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + if (isinf (x.value)) + result |= 16; + } + { /* Unnormalized number. */ + static memory_long_double x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + if (isinf (x.value)) + result |= 32; + } + { /* Pseudo-Denormal. */ + static memory_long_double x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + if (isinf (x.value)) + result |= 64; + } +#endif + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_isinfl_works=yes +else + gl_cv_func_isinfl_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isinfl_works" >&5 +$as_echo "$gl_cv_func_isinfl_works" >&6; } + case "$gl_cv_func_isinfl_works" in + *yes) ;; + *) ISINF_LIBM=missing;; + esac + fi + fi + if test "$ac_cv_have_decl_isinf" != yes || + test "$ISINF_LIBM" = missing; then + REPLACE_ISINF=1 + ISINF_LIBM= + fi - gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + if test $REPLACE_ISINF = 1; then - : + gl_LIBOBJS="$gl_LIBOBJS isinf.$ac_objext" + fi + GNULIB_ISINF=1 +$as_echo "#define GNULIB_TEST_ISINF 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5 +$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; } +if ${gl_cv_func_isnand_no_libm+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #if __GNUC__ >= 4 + # undef isnand + # define isnand(x) __builtin_isnan ((double)(x)) + #else + # undef isnand + # define isnand(x) isnan ((double)(x)) + #endif + double x; +int +main () +{ +return isnand (x); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_isnand_no_libm=yes +else + gl_cv_func_isnand_no_libm=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5 +$as_echo "$gl_cv_func_isnand_no_libm" >&6; } + gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm + if test $gl_cv_func_isnand_no_libm = yes; then +$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h + fi + if test $gl_func_isnand_no_libm != yes; then @@ -19950,143 +27381,462 @@ $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext" + fi - for ac_func in fchmodat fstatat mkdirat openat unlinkat -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5 +$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; } +if ${gl_cv_func_isnanf_no_libm+:} false; then : + $as_echo_n "(cached) " >&6 else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #if __GNUC__ >= 4 + # undef isnanf + # define isnanf(x) __builtin_isnanf ((float)(x)) + #elif defined isnan + # undef isnanf + # define isnanf(x) isnan ((float)(x)) + #endif + float x; +int +main () +{ +return isnanf (x); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_isnanf_no_libm=yes +else + gl_cv_func_isnanf_no_libm=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5 +$as_echo "$gl_cv_func_isnanf_no_libm" >&6; } + if test $gl_cv_func_isnanf_no_libm = yes; then - case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in - yes+yes) - # GNU/Hurd has unlinkat, but it has the same bug as unlink. - if test $REPLACE_UNLINK = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5 +$as_echo_n "checking whether isnan(float) works... " >&6; } +if ${gl_cv_func_isnanf_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; + *) gl_cv_func_isnanf_works="guessing yes";; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if __GNUC__ >= 4 +# undef isnanf +# define isnanf(x) __builtin_isnanf ((float)(x)) +#elif defined isnan +# undef isnanf +# define isnanf(x) isnan ((float)(x)) +#endif +/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ +#ifdef __DECC +static float +NaN () +{ + static float zero = 0.0f; + return zero / zero; +} +#else +# define NaN() (0.0f / 0.0f) +#endif +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { unsigned int word[NWORDS]; float value; } memory_float; +int main() +{ + int result = 0; + if (isnanf (1.0f / 0.0f)) + result |= 1; + if (!isnanf (NaN ())) + result |= 2; +#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT + /* The isnanf function should be immune against changes in the sign bit and + in the mantissa bits. The xor operation twiddles a bit that can only be + a sign bit or a mantissa bit. */ + if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0) + { + memory_float m; + m.value = NaN (); + /* Set the bits below the exponent to 01111...111. */ + m.word[0] &= -1U << FLT_EXPBIT0_BIT; + m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; + if (!isnanf (m.value)) + result |= 4; + } +#endif - gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_isnanf_works=yes +else + gl_cv_func_isnanf_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - REPLACE_UNLINKAT=1 - fi ;; - yes+*) - # Solaris 9 has *at functions, but uniformly mishandles trailing - # slash in all of them. +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5 +$as_echo "$gl_cv_func_isnanf_works" >&6; } + fi + if test $gl_cv_func_isnanf_no_libm = yes \ + && { case "$gl_cv_func_isnanf_works" in + *yes) true;; + *) false;; + esac + }; then + gl_func_isnanf_no_libm=yes +$as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h + else + gl_func_isnanf_no_libm=no + fi + if test $gl_func_isnanf_no_libm != yes; then - gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" - REPLACE_OPENAT=1 + gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 +$as_echo_n "checking where to find the exponent in a 'float'... " >&6; } +if ${gl_cv_cc_float_expbit0+:} false; then : + $as_echo_n "(cached) " >&6 +else - gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" + if test "$cross_compiling" = yes; then : + gl_cv_cc_float_expbit0="word 0 bit 23" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - REPLACE_FSTATAT=1 +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { float value; unsigned int word[NWORDS]; } memory_float; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (float x) +{ + memory_float m; + size_t i; + /* Clear it first, in case + sizeof (float) < sizeof (memory_float). */ + memset (&m, 0, sizeof (memory_float)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25f); + add_to_ored_words (0.5f); + add_to_ored_words (1.0f); + add_to_ored_words (2.0f); + add_to_ored_words (4.0f); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_float_expbit0=`cat conftest.out` +else + gl_cv_cc_float_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 +$as_echo "$gl_cv_cc_float_expbit0" >&6; } + case "$gl_cv_cc_float_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_WORD $word +_ACEOF +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_BIT $bit +_ACEOF + ;; + esac - gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" - REPLACE_UNLINKAT=1 - ;; - *) - HAVE_OPENAT=0 - HAVE_UNLINKAT=0 # No known system with unlinkat but not openat - HAVE_FSTATAT=0 # No known system with fstatat but not openat + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5 +$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; } +if ${gl_cv_func_isnanl_no_libm+:} false; then : + $as_echo_n "(cached) " >&6 +else - : -;; - esac - if test $ac_cv_func_fchmodat != yes; then - HAVE_FCHMODAT=0 - fi - if test $ac_cv_func_mkdirat != yes; then - HAVE_MKDIRAT=0 - fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #if __GNUC__ >= 4 + # undef isnanl + # define isnanl(x) __builtin_isnanl ((long double)(x)) + #elif defined isnan + # undef isnanl + # define isnanl(x) isnan ((long double)(x)) + #endif + long double x; +int +main () +{ +return isnanl (x); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_isnanl_no_libm=yes +else + gl_cv_func_isnanl_no_libm=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5 +$as_echo "$gl_cv_func_isnanl_no_libm" >&6; } + gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm + if test $gl_func_isnanl_no_libm = yes; then - ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat" -if test "x$ac_cv_func_fchownat" = x""yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 -$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; } -if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5 +$as_echo_n "checking whether isnanl works... " >&6; } +if ${gl_cv_func_isnanl_works+:} false; then : $as_echo_n "(cached) " >&6 else - gl_dangle=conftest.dangle - # Remove any remnants of a previous test. - rm -f $gl_dangle - # Arrange for deletion of the temporary file this test creates. - ac_clean_files="$ac_clean_files $gl_dangle" - ln -s conftest.no-such $gl_dangle - if test "$cross_compiling" = yes; then : - gl_cv_func_fchownat_nofollow_works=no + if test "$cross_compiling" = yes; then : + case "$host_cpu" in + # Guess no on ia64, x86_64, i386. + ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; + *) + case "$host_os" in + netbsd*) gl_cv_func_isnanl_works="guessing no";; + *) gl_cv_func_isnanl_works="guessing yes";; + esac + ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include -#include -int -main () -{ - return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), - AT_SYMLINK_NOFOLLOW) != 0 - && errno == ENOENT); +#include +#include +#include +#if __GNUC__ >= 4 +# undef isnanl +# define isnanl(x) __builtin_isnanl ((long double)(x)) +#elif defined isnan +# undef isnanl +# define isnanl(x) isnan ((long double)(x)) +#endif +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { unsigned int word[NWORDS]; long double value; } + memory_long_double; +/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the + runtime type conversion. */ +#ifdef __sgi +static long double NaNl () +{ + double zero = 0.0; + return zero / zero; } +#else +# define NaNl() (0.0L / 0.0L) +#endif +int main () +{ + int result = 0; + + if (!isnanl (NaNl ())) + result |= 1; + + { + memory_long_double m; + unsigned int i; + + /* The isnanl function should be immune against changes in the sign bit and + in the mantissa bits. The xor operation twiddles a bit that can only be + a sign bit or a mantissa bit (since the exponent never extends to + bit 31). */ + m.value = NaNl (); + m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); + for (i = 0; i < NWORDS; i++) + m.word[i] |= 1; + if (!isnanl (m.value)) + result |= 1; + } + +#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + if (!isnanl (x.value)) + result |= 2; + } + { + /* Signalling NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + if (!isnanl (x.value)) + result |= 2; + } + /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in + Intel IA-64 Architecture Software Developer's Manual, Volume 1: + Application Architecture. + Table 5-2 "Floating-Point Register Encodings" + Figure 5-6 "Memory to Floating-Point Register Data Translation" + */ + { /* Pseudo-NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + if (!isnanl (x.value)) + result |= 4; + } + { /* Pseudo-Infinity. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + if (!isnanl (x.value)) + result |= 8; + } + { /* Pseudo-Zero. */ + static memory_long_double x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + if (!isnanl (x.value)) + result |= 16; + } + { /* Unnormalized number. */ + static memory_long_double x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + if (!isnanl (x.value)) + result |= 32; + } + { /* Pseudo-Denormal. */ + static memory_long_double x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + if (!isnanl (x.value)) + result |= 64; + } +#endif + return result; +} _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fchownat_nofollow_works=yes + gl_cv_func_isnanl_works=yes else - gl_cv_func_fchownat_nofollow_works=no + gl_cv_func_isnanl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -20094,501 +27844,564 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5 -$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; } - if test $gl_cv_func_fchownat_nofollow_works = no; then : - REPLACE_FCHOWNAT=1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5 +$as_echo "$gl_cv_func_isnanl_works" >&6; } + + case "$gl_cv_func_isnanl_works" in + *yes) ;; + *) gl_func_isnanl_no_libm=no ;; + esac + fi + if test $gl_func_isnanl_no_libm = yes; then + +$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h + + fi + + if test $gl_func_isnanl_no_libm != yes; then + -$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5 -$as_echo_n "checking whether fchownat works with an empty file name... " >&6; } -if test "${gl_cv_func_fchownat_empty_filename_works+set}" = set; then : + gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext" + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 +$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } +if ${gl_cv_cc_long_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - gl_cv_func_fchownat_empty_filename_works="guessing no" + + if test "$cross_compiling" = yes; then : + + gl_cv_cc_long_double_expbit0="unknown" + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include -int -main () +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { long double value; unsigned int word[NWORDS]; } + memory_long_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (long double x) +{ + memory_long_double m; + size_t i; + /* Clear it first, in case + sizeof (long double) < sizeof (memory_long_double). */ + memset (&m, 0, sizeof (memory_long_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () { -int fd; - int ret; - if (mkdir ("conftestdir", 0700) < 0) - return 2; - fd = open ("conftestdir", O_RDONLY); - if (fd < 0) - return 3; - ret = fchownat (fd, "", -1, -1, 0); - close (fd); - rmdir ("conftestdir"); - return ret == 0; - - ; - return 0; + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25L); + add_to_ored_words (0.5L); + add_to_ored_words (1.0L); + add_to_ored_words (2.0L); + add_to_ored_words (4.0L); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); } + _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fchownat_empty_filename_works=yes + gl_cv_cc_long_double_expbit0=`cat conftest.out` else - gl_cv_func_fchownat_empty_filename_works=no + gl_cv_cc_long_double_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + rm -f conftest.out fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5 -$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; } - if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then : - REPLACE_FCHOWNAT=1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 +$as_echo "$gl_cv_cc_long_double_expbit0" >&6; } + case "$gl_cv_cc_long_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` -$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_WORD $word +_ACEOF -fi +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_BIT $bit +_ACEOF - if test $REPLACE_CHOWN = 1; then - REPLACE_FCHOWNAT=1 - fi -else - HAVE_FCHOWNAT=0 -fi + ;; + esac - if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then + fi + : - gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" - fi + ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" " +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include +#include - : +" +if test "x$ac_cv_have_decl_iswblank" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISWBLANK $ac_have_decl +_ACEOF + if test $ac_cv_func_iswblank = no; then + HAVE_ISWBLANK=0 + if test $ac_cv_have_decl_iswblank = yes; then + REPLACE_ISWBLANK=1 + fi + fi + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then + : + else + if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then + : + fi + fi + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then + : + else + if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then - : + gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext" - ac_fn_c_check_member "$LINENO" "struct statfs" "f_type" "ac_cv_member_struct_statfs_f_type" "$ac_includes_default - #include -" -if test "x$ac_cv_member_struct_statfs_f_type" = x""yes; then : + fi + fi -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATFS_F_TYPE 1 -_ACEOF -fi + GNULIB_ISWBLANK=1 - # Code from module getcwd: - gl_abort_bug=no - case $gl_cv_func_getcwd_null,$host_os in - *,mingw*) - gl_cv_func_getcwd_path_max=yes;; - yes,*) +$as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h - : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5 -$as_echo_n "checking whether getcwd handles long file names properly... " >&6; } -if test "${gl_cv_func_getcwd_path_max+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Arrange for deletion of the temporary directory this test creates. - ac_clean_files="$ac_clean_files confdir3" - if test "$cross_compiling" = yes; then : - gl_cv_func_getcwd_path_max=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef AT_FDCWD -# define AT_FDCWD 0 -#endif -#ifdef ENAMETOOLONG -# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) -#else -# define is_ENAMETOOLONG(x) 0 -#endif -/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ -#undef mkdir -#ifndef S_IRWXU -# define S_IRWXU 0700 -#endif -/* The length of this name must be 8. */ -#define DIR_NAME "confdir3" -#define DIR_NAME_LEN 8 -#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) -/* The length of "../". */ -#define DOTDOTSLASH_LEN 3 + : -/* Leftover bytes in the buffer, to work around library or OS bugs. */ -#define BUF_SLOP 20 -int -main () -{ -#ifndef PATH_MAX - /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- - at least not on a local file system. And if we were to start worrying - about remote file systems, we'd have to enable the wrapper function - all of the time, just to be safe. That's not worth the cost. */ - exit (0); -#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ - - DIR_NAME_SIZE - BUF_SLOP) \ - <= PATH_MAX) - /* FIXME: Assuming there's a system for which this is true, - this should be done in a compile test. */ - exit (0); -#else - char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) - + DIR_NAME_SIZE + BUF_SLOP]; - char *cwd = getcwd (buf, PATH_MAX); - size_t initial_cwd_len; - size_t cwd_len; - int fail = 0; - size_t n_chdirs = 0; - if (cwd == NULL) - exit (10); - cwd_len = initial_cwd_len = strlen (cwd); - while (1) - { - size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); - char *c = NULL; - cwd_len += DIR_NAME_SIZE; - /* If mkdir or chdir fails, it could be that this system cannot create - any file with an absolute name longer than PATH_MAX, such as cygwin. - If so, leave fail as 0, because the current working directory can't - be too long for getcwd if it can't even be created. For other - errors, be pessimistic and consider that as a failure, too. */ - if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) - { - if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) - fail = 20; - break; - } - if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) - { - c = getcwd (buf, PATH_MAX); - if (!c && errno == ENOENT) - { - fail = 11; - break; - } - if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno))) - { - fail = 21; - break; - } - } - if (dotdot_max <= cwd_len - initial_cwd_len) - { - if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) - break; - c = getcwd (buf, cwd_len + 1); - if (!c) - { - if (! (errno == ERANGE || errno == ENOENT - || is_ENAMETOOLONG (errno))) - { - fail = 22; - break; - } - if (AT_FDCWD || errno == ERANGE || errno == ENOENT) - { - fail = 12; - break; - } - } - } + if test $gl_cv_have_include_next = yes; then + gl_cv_next_langinfo_h='<'langinfo.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_langinfo_h+:} false; then : + $as_echo_n "(cached) " >&6 +else - if (c && strlen (c) != cwd_len) - { - fail = 23; - break; - } - ++n_chdirs; - } + if test $ac_cv_header_langinfo_h = yes; then - /* Leaving behind such a deep directory is not polite. - So clean up here, right away, even though the driving - shell script would also clean up. */ - { - size_t i; - /* Try rmdir first, in case the chdir failed. */ - rmdir (DIR_NAME); - for (i = 0; i <= n_chdirs; i++) - { - if (chdir ("..") < 0) - break; - if (rmdir (DIR_NAME) != 0) - break; - } - } - exit (fail); -#endif -} + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getcwd_path_max=yes -else - case $? in - 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; - *) gl_cv_func_getcwd_path_max=no;; - esac -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'langinfo.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_langinfo_h + gl_cv_next_langinfo_h='"'$gl_header'"' + else + gl_cv_next_langinfo_h='<'langinfo.h'>' + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5 -$as_echo "$gl_cv_func_getcwd_path_max" >&6; } - case $gl_cv_func_getcwd_path_max in - no,*) +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5 +$as_echo "$gl_cv_next_langinfo_h" >&6; } + fi + NEXT_LANGINFO_H=$gl_cv_next_langinfo_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'langinfo.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_langinfo_h + fi + NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive -$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h -;; - esac - : + HAVE_LANGINFO_CODESET=0 + HAVE_LANGINFO_T_FMT_AMPM=0 + HAVE_LANGINFO_ERA=0 + HAVE_LANGINFO_YESEXPR=0 + : - for ac_func in getpagesize -do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPAGESIZE 1 -_ACEOF -fi -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5 -$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; } -if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then : + if test $ac_cv_header_langinfo_h = yes; then + HAVE_LANGINFO_H=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5 +$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } +if ${gl_cv_header_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else - # Remove any remnants of a previous test. - rm -rf confdir-14B--- - # Arrange for deletion of the temporary directory this test creates. - ac_clean_files="$ac_clean_files confdir-14B---" - if test "$cross_compiling" = yes; then : - gl_cv_func_getcwd_abort_bug=yes -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +int a = CODESET; -#include -#include -#include -#include -#include - -/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ -#undef mkdir - -#ifndef S_IRWXU -# define S_IRWXU 0700 -#endif +int +main () +{ -/* FIXME: skip the run-test altogether on systems without getpagesize. */ -#if ! HAVE_GETPAGESIZE -# define getpagesize() 0 -#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_langinfo_codeset=yes +else + gl_cv_header_langinfo_codeset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than - the 16kB pagesize on ia64 linux. Those conditions make the code below - trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ -#define TARGET_LEN (5 * 1024) +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5 +$as_echo "$gl_cv_header_langinfo_codeset" >&6; } + if test $gl_cv_header_langinfo_codeset = yes; then + HAVE_LANGINFO_CODESET=1 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5 +$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } +if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int a = T_FMT_AMPM; int main () { - char const *dir_name = "confdir-14B---"; - char *cwd; - size_t initial_cwd_len; - int fail = 0; - size_t desired_depth; - size_t d; - - /* The bug is triggered when PATH_MAX < getpagesize (), so skip - this relative expensive and invasive test if that's not true. */ - if (getpagesize () <= PATH_MAX) - return 0; - - cwd = getcwd (NULL, 0); - if (cwd == NULL) - return 0; - initial_cwd_len = strlen (cwd); - free (cwd); - desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) - / (1 + strlen (dir_name))); - for (d = 0; d < desired_depth; d++) - { - if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) - { - fail = 3; /* Unable to construct deep hierarchy. */ - break; - } - } + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_langinfo_t_fmt_ampm=yes +else + gl_cv_header_langinfo_t_fmt_ampm=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - /* If libc has the bug in question, this invocation of getcwd - results in a failed assertion. */ - cwd = getcwd (NULL, 0); - if (cwd == NULL) - fail = 4; /* getcwd failed. This is ok, and expected. */ - free (cwd); +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5 +$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } + if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then + HAVE_LANGINFO_T_FMT_AMPM=1 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5 +$as_echo_n "checking whether langinfo.h defines ERA... " >&6; } +if ${gl_cv_header_langinfo_era+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int a = ERA; - /* Call rmdir first, in case the above chdir failed. */ - rmdir (dir_name); - while (0 < d--) - { - if (chdir ("..") < 0) - break; - rmdir (dir_name); - } +int +main () +{ + ; return 0; } - _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getcwd_abort_bug=no +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_langinfo_era=yes else - gl_cv_func_getcwd_abort_bug=yes + gl_cv_header_langinfo_era=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5 +$as_echo "$gl_cv_header_langinfo_era" >&6; } + if test $gl_cv_header_langinfo_era = yes; then + HAVE_LANGINFO_ERA=1 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5 +$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; } +if ${gl_cv_header_langinfo_yesexpr+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int a = YESEXPR; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_langinfo_yesexpr=yes +else + gl_cv_header_langinfo_yesexpr=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5 -$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; } - if test $gl_cv_func_getcwd_abort_bug = yes; then : - gl_abort_bug=yes +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -;; - esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5 +$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; } + if test $gl_cv_header_langinfo_yesexpr = yes; then + HAVE_LANGINFO_YESEXPR=1 + fi + else + HAVE_LANGINFO_H=0 + fi + - case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in - *yes,yes,no) ;; - *) - REPLACE_GETCWD=1 + for gl_func in nl_langinfo; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done - gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" : -;; - esac - GNULIB_GETCWD=1 -$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h + LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" - # Code from module getdelim: - : + case "$host_os" in + solaris*) + +$as_echo "#define _LCONV_C99 1" >>confdefs.h + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5 +$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; } +if ${gl_cv_header_locale_h_posix2001+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + int x = LC_MESSAGES; + int y = sizeof (((struct lconv *) 0)->decimal_point); +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_locale_h_posix2001=yes +else + gl_cv_header_locale_h_posix2001=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5 +$as_echo "$gl_cv_header_locale_h_posix2001" >&6; } : @@ -20597,91 +28410,80 @@ $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h - if test $ac_cv_func_getdelim = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5 -$as_echo_n "checking for working getdelim function... " >&6; } -if test "${gl_cv_func_working_getdelim+set}" = set; then : + if test $ac_cv_header_xlocale_h = yes; then + HAVE_XLOCALE_H=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 +$as_echo_n "checking whether locale.h defines locale_t... " >&6; } +if ${gl_cv_header_locale_has_locale_t+:} false; then : $as_echo_n "(cached) " >&6 else - echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + locale_t x; +int +main () +{ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif -#endif - + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then : - gl_cv_func_working_getdelim=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_locale_has_locale_t=yes else - gl_cv_func_working_getdelim=no + gl_cv_header_locale_has_locale_t=no fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5 +$as_echo "$gl_cv_header_locale_has_locale_t" >&6; } + if test $gl_cv_header_locale_has_locale_t = yes; then + gl_cv_header_locale_h_needs_xlocale_h=no + else + gl_cv_header_locale_h_needs_xlocale_h=yes + fi + else + HAVE_XLOCALE_H=0 + gl_cv_header_locale_h_needs_xlocale_h=no + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5 +$as_echo_n "checking whether struct lconv is properly defined... " >&6; } +if ${gl_cv_sys_struct_lconv_ok+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + struct lconv l; + int x = sizeof (l.decimal_point); + int y = sizeof (l.int_p_cs_precedes); +int +main () +{ -# include -# include -# include - int main () - { - FILE *in = fopen ("./conftest.data", "r"); - if (!in) - return 1; - { - /* Test result for a NULL buffer and a zero size. - Based on a test program from Karl Heuer. */ - char *line = NULL; - size_t siz = 0; - int len = getdelim (&line, &siz, '\n', in); - if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) - return 2; - } - { - /* Test result for a NULL buffer and a non-zero size. - This crashes on FreeBSD 8.0. */ - char *line = NULL; - size_t siz = (size_t)(~0) / 4; - if (getdelim (&line, &siz, '\n', in) == -1) - return 3; - } - return 0; - } - + ; + return 0; +} _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_working_getdelim=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_lconv_ok=yes else - gl_cv_func_working_getdelim=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gl_cv_sys_struct_lconv_ok=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5 -$as_echo "$gl_cv_func_working_getdelim" >&6; } - else - gl_cv_func_working_getdelim=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5 +$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; } + if test $gl_cv_sys_struct_lconv_ok = no; then + REPLACE_STRUCT_LCONV=1 fi - if test $ac_cv_have_decl_getdelim = no; then - HAVE_DECL_GETDELIM=0 - fi - if test $gl_cv_func_working_getdelim = no; then - if test $ac_cv_func_getdelim = yes; then - REPLACE_GETDELIM=1 - fi @@ -20689,288 +28491,358 @@ $as_echo "$gl_cv_func_working_getdelim" >&6; } + if test $gl_cv_have_include_next = yes; then + gl_cv_next_locale_h='<'locale.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_locale_h+:} false; then : + $as_echo_n "(cached) " >&6 +else - gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" - for ac_func in flockfile funlockfile -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'locale.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_locale_h + gl_cv_next_locale_h='"'$gl_header'"' -fi -done - ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5 +$as_echo "$gl_cv_next_locale_h" >&6; } + fi + NEXT_LOCALE_H=$gl_cv_next_locale_h -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl -_ACEOF + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'locale.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_locale_h + fi + NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive - fi - GNULIB_GETDELIM=1 + for gl_func in setlocale duplocale; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +/* Some systems provide declarations in a non-standard header. */ +#if HAVE_XLOCALE_H +# include +#endif + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + eval ac_cv_have_decl_$gl_func=yes +fi + done -$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h - # Code from module getdtablesize: + if test $REPLACE_STRUCT_LCONV = 1; then + REPLACE_LOCALECONV=1 + fi + if test $REPLACE_LOCALECONV = 1; then - : - if test $ac_cv_func_getdtablesize != yes; then - HAVE_GETDTABLESIZE=0 + gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext" + ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include +" +if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1 +_ACEOF +fi - gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" fi - GNULIB_GETDTABLESIZE=1 + GNULIB_LOCALECONV=1 -$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h - # Code from module getgroups: +$as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h + + + + + + if test "$gl_threads_api" = posix; then + # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the + # pthread_rwlock_* functions. + ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include +" +if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : +$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h +fi + # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test "$ac_cv_func_getgroups" != yes; then + #include +int +main () +{ +#if __FreeBSD__ == 4 +error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) +error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." +#else +int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !x; +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + : +cat >>confdefs.h <<_ACEOF +#define GNULIB_LOCK 1 +_ACEOF - gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext" - HAVE_GETGROUPS=0 - elif test "$ac_cv_func_getgroups_works.$ac_cv_type_getgroups" != yes.gid_t - then + : - gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext" - REPLACE_GETGROUPS=1 -$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5 -$as_echo_n "checking whether getgroups handles negative values... " >&6; } -if test "${gl_cv_func_getgroups_works+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5 +$as_echo_n "checking whether lseek detects pipes... " >&6; } +if ${gl_cv_func_lseek_pipe+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - gl_cv_func_getgroups_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + case "$host_os" in + mingw*) + gl_cv_func_lseek_pipe=no + ;; + *) + if test $cross_compiling = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +#include /* for off_t */ +#include /* for SEEK_CUR */ +#if HAVE_UNISTD_H +# include +#else /* on Windows with MSVC */ +# include +#endif + int main () { -int size = getgroups (0, 0); - gid_t *list = malloc (size * sizeof *list); - return getgroups (-1, list) != -1; + + /* Exit with success only if stdin is seekable. */ + return lseek (0, (off_t)0, SEEK_CUR) < 0; + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getgroups_works=yes +if ac_fn_c_try_link "$LINENO"; then : + if test -s conftest$ac_exeext \ + && ./conftest$ac_exeext < conftest.$ac_ext \ + && test 1 = "`echo hi \ + | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then + gl_cv_func_lseek_pipe=yes + else + gl_cv_func_lseek_pipe=no + fi + else - gl_cv_func_getgroups_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gl_cv_func_lseek_pipe=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __BEOS__ +/* BeOS mistakenly return 0 when trying to seek on pipes. */ + Choke me. +#endif +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_lseek_pipe=yes +else + gl_cv_func_lseek_pipe=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5 -$as_echo "$gl_cv_func_getgroups_works" >&6; } - if test "$gl_cv_func_getgroups_works" != yes; then - - - - - - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5 +$as_echo "$gl_cv_func_lseek_pipe" >&6; } + if test $gl_cv_func_lseek_pipe = no; then + REPLACE_LSEEK=1 - gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext" +$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h - REPLACE_GETGROUPS=1 - fi fi - test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS" - - - - - GNULIB_GETGROUPS=1 + if test $WINDOWS_64_BIT_OFF_T = 1; then + REPLACE_LSEEK=1 + fi -$as_echo "#define GNULIB_TEST_GETGROUPS 1" >>confdefs.h + if test $REPLACE_LSEEK = 1; then - # Code from module getline: + gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext" - : + fi + GNULIB_LSEEK=1 - gl_getline_needs_run_time_check=no - ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline" -if test "x$ac_cv_func_getline" = x""yes; then : - gl_getline_needs_run_time_check=yes -else - am_cv_func_working_getline=no -fi - if test $gl_getline_needs_run_time_check = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5 -$as_echo_n "checking for working getline function... " >&6; } -if test "${am_cv_func_working_getline+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then : - am_cv_func_working_getline=yes -else - am_cv_func_working_getline=no -fi -rm -f conftest* +$as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -# include -# include -# include - int main () - { - FILE *in = fopen ("./conftest.data", "r"); - if (!in) - return 1; - { - /* Test result for a NULL buffer and a zero size. - Based on a test program from Karl Heuer. */ - char *line = NULL; - size_t siz = 0; - int len = getline (&line, &siz, in); - if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) - return 2; - } - { - /* Test result for a NULL buffer and a non-zero size. - This crashes on FreeBSD 8.0. */ - char *line = NULL; - size_t siz = (size_t)(~0) / 4; - if (getline (&line, &siz, in) == -1) - return 3; - } - return 0; - } -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - am_cv_func_working_getline=yes -else - am_cv_func_working_getline=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5 -$as_echo "$am_cv_func_working_getline" >&6; } - fi - if test $ac_cv_have_decl_getline = no; then - HAVE_DECL_GETLINE=0 - fi - if test $am_cv_func_working_getline = no; then - REPLACE_GETLINE=1 + : + if test $ac_cv_func_lstat = yes; then + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *no) + REPLACE_LSTAT=1 + ;; + esac + else + HAVE_LSTAT=0 + fi + if test $REPLACE_LSTAT = 1; then - gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" @@ -20978,226 +28850,356 @@ $as_echo "$am_cv_func_working_getline" >&6; } + gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" + : + fi - : + GNULIB_LSTAT=1 - : +$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h - if test $ac_cv_func_getdelim = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5 -$as_echo_n "checking for working getdelim function... " >&6; } -if test "${gl_cv_func_working_getdelim+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then : - gl_cv_func_working_getdelim=yes -else - gl_cv_func_working_getdelim=no -fi -rm -f conftest* -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -# include -# include -# include - int main () - { - FILE *in = fopen ("./conftest.data", "r"); - if (!in) - return 1; - { - /* Test result for a NULL buffer and a zero size. - Based on a test program from Karl Heuer. */ - char *line = NULL; - size_t siz = 0; - int len = getdelim (&line, &siz, '\n', in); - if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) - return 2; - } - { - /* Test result for a NULL buffer and a non-zero size. - This crashes on FreeBSD 8.0. */ - char *line = NULL; - size_t siz = (size_t)(~0) / 4; - if (getdelim (&line, &siz, '\n', in) == -1) - return 3; - } - return 0; - } + for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + +fi + +done + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if ${ac_cv_func_malloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ + | hpux* | solaris* | cygwin* | mingw*) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include + #else + char *malloc (); + #endif + +int +main () +{ +return ! malloc (0); + ; + return 0; +} _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_working_getdelim=yes + ac_cv_func_malloc_0_nonnull=yes else - gl_cv_func_working_getdelim=no + ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5 -$as_echo "$gl_cv_func_working_getdelim" >&6; } - else - gl_cv_func_working_getdelim=no - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } + if test $ac_cv_func_malloc_0_nonnull = yes; then : - if test $ac_cv_have_decl_getdelim = no; then - HAVE_DECL_GETDELIM=0 - fi +$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h - if test $gl_cv_func_working_getdelim = no; then - if test $ac_cv_func_getdelim = yes; then - REPLACE_GETDELIM=1 - fi +else + $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h + REPLACE_MALLOC=1 +fi + if test $REPLACE_MALLOC = 1; then - gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" - for ac_func in flockfile funlockfile -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -fi -done - ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" + + fi + cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl +#define GNULIB_MALLOC_GNU 1 _ACEOF - fi + + if test $gl_cv_func_malloc_posix = yes; then + +$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h + + else + REPLACE_MALLOC=1 fi + if test $REPLACE_MALLOC = 1; then - GNULIB_GETLINE=1 -$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" - # Code from module getopt-gnu: + fi + GNULIB_MALLOC_POSIX=1 -$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h - # Code from module getopt-posix: +$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h - if test -n "$gl_replace_getopt"; then : - GETOPT_H=getopt.h -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - GNULIB_UNISTD_H_GETOPT=1 + : - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + if test $gl_cv_have_include_next = yes; then + gl_cv_next_math_h='<'math.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_math_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test $ac_cv_header_math_h = yes; then - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'math.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_math_h + gl_cv_next_math_h='"'$gl_header'"' + else + gl_cv_next_math_h='<'math.h'>' + fi - : +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5 +$as_echo "$gl_cv_next_math_h" >&6; } + fi + NEXT_MATH_H=$gl_cv_next_math_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'math.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_math_h + fi + NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 +$as_echo_n "checking whether NAN macro works... " >&6; } +if ${gl_cv_header_math_nan_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +/* Solaris 10 has a broken definition of NAN. Other platforms + fail to provide NAN, or provide it only in C99 mode; this + test only needs to fail when NAN is provided but wrong. */ + float f = 1.0f; +#ifdef NAN + f = NAN; +#endif + return f == 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_math_nan_works=yes +else + gl_cv_header_math_nan_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5 +$as_echo "$gl_cv_header_math_nan_works" >&6; } + if test $gl_cv_header_math_nan_works = no; then + REPLACE_NAN=1 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5 +$as_echo_n "checking whether HUGE_VAL works... " >&6; } +if ${gl_cv_header_math_huge_val_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +/* Solaris 10 has a broken definition of HUGE_VAL. */ + double d = HUGE_VAL; + return d == 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_math_huge_val_works=yes +else + gl_cv_header_math_huge_val_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5 +$as_echo "$gl_cv_header_math_huge_val_works" >&6; } + if test $gl_cv_header_math_huge_val_works = no; then + REPLACE_HUGE_VAL=1 + fi + for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + eval ac_cv_have_decl_$gl_func=yes +fi + done - # Code from module gettext: - # Code from module gettext-h: - # Code from module gettime: @@ -21207,324 +29209,621 @@ fi - gl_LIBOBJS="$gl_LIBOBJS gettime.$ac_objext" + : - : + : + if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - # Code from module gettimeofday: + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 +$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } +if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + esac + if test $LOCALE_JA != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 1; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_incomplete_state=yes +else + gl_cv_func_mbrtowc_incomplete_state=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - : + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 +$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 +$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } +if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : + $as_echo_n "(cached) " >&6 +else - gl_gettimeofday_timezone=void - if test $ac_cv_func_gettimeofday != yes; then - HAVE_GETTIMEOFDAY=0 + case "$host_os" in + # Guess no on Solaris 8. + solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; + esac + if test $LOCALE_ZH_CN != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + /* This fails on Solaris 8: + mbrtowc returns 2, and sets wc to 0x00F0. + mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 6, &state) != 4 + && mbtowc (&wc, input + 3, 6) == 4) + return 1; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_sanitycheck=yes +else + gl_cv_func_mbrtowc_sanitycheck=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 +$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + REPLACE_MBSTATE_T=0 + case "$gl_cv_func_mbrtowc_incomplete_state" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + case "$gl_cv_func_mbrtowc_sanitycheck" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + else + REPLACE_MBSTATE_T=1 + fi - gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" + : - for ac_header in sys/timeb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_TIMEB_H 1 -_ACEOF -fi -done - for ac_func in _ftime -do : - ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" -if test "x$ac_cv_func__ftime" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE__FTIME 1 -_ACEOF + if test $ac_cv_func_mbrtowc = no; then + HAVE_MBRTOWC=0 + ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_mbrtowc" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -done +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MBRTOWC $ac_have_decl +_ACEOF + if test $ac_cv_have_decl_mbrtowc = yes; then + REPLACE_MBRTOWC=1 + fi else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBRTOWC=1 + else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 -$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } -if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 +$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } +if ${gl_cv_func_mbrtowc_null_arg1+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - gl_cv_func_gettimeofday_clobber=yes + + case "$host_os" in + # Guess no on Solaris. + solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; + esac + if test $LOCALE_FR_UTF8 != none; then + if test "$cross_compiling" = yes; then : + : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include - #include -int -main () +#include +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () { + int result = 0; - time_t t = 0; - struct tm *lt; - struct tm saved_lt; - struct timeval tv; - lt = localtime (&t); - saved_lt = *lt; - gettimeofday (&tv, NULL); - return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + char input[] = "\303\237er"; + mbstate_t state; + wchar_t wc; + size_t ret; - ; + memset (&state, '\0', sizeof (mbstate_t)); + wc = (wchar_t) 0xBADFACE; + ret = mbrtowc (&wc, input, 5, &state); + if (ret != 2) + result |= 1; + if (!mbsinit (&state)) + result |= 2; + + memset (&state, '\0', sizeof (mbstate_t)); + ret = mbrtowc (NULL, input, 5, &state); + if (ret != 2) /* Solaris 7 fails here: ret is -1. */ + result |= 4; + if (!mbsinit (&state)) + result |= 8; + } + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_null_arg1=yes +else + gl_cv_func_mbrtowc_null_arg1=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 +$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 +$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } +if ${gl_cv_func_mbrtowc_null_arg2+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on OSF/1. + osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; + esac + if test $LOCALE_FR_UTF8 != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + mbstate_t state; + wchar_t wc; + int ret; + + memset (&state, '\0', sizeof (mbstate_t)); + wc = (wchar_t) 0xBADFACE; + mbrtowc (&wc, NULL, 5, &state); + /* Check that wc was not modified. */ + if (wc != (wchar_t) 0xBADFACE) + return 1; + } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_gettimeofday_clobber=no + gl_cv_func_mbrtowc_null_arg2=yes else - gl_cv_func_gettimeofday_clobber=yes + gl_cv_func_mbrtowc_null_arg2=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 -$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } - - if test $gl_cv_func_gettimeofday_clobber = yes; then - REPLACE_GETTIMEOFDAY=1 + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 +$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 +$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } +if ${gl_cv_func_mbrtowc_retval+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + # Guess no on HP-UX, Solaris, native Windows. + hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_retval="guessing yes" ;; + esac + if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ + || { case "$host_os" in mingw*) true;; *) false;; esac; }; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + int result = 0; + int found_some_locale = 0; + /* This fails on Solaris. */ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + char input[] = "B\303\274\303\237er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + { + input[1] = '\0'; + if (mbrtowc (&wc, input + 2, 5, &state) != 1) + result |= 1; + } + found_some_locale = 1; + } + /* This fails on HP-UX 11.11. */ + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; - for ac_header in sys/timeb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_TIMEB_H 1 -_ACEOF + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + { + input[1] = '\0'; + if (mbrtowc (&wc, input + 2, 5, &state) != 2) + result |= 2; + } + found_some_locale = 1; + } + /* This fails on native Windows. */ + if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) + { + char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; -fi + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 4; + } + found_some_locale = 1; + } + if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) + { + char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; -done + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 8; + } + found_some_locale = 1; + } + if (setlocale (LC_ALL, "Chinese_China.936") != NULL) + { + char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; - for ac_func in _ftime -do : - ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" -if test "x$ac_cv_func__ftime" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE__FTIME 1 + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 16; + } + found_some_locale = 1; + } + return (found_some_locale ? result : 77); +} _ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_retval=yes +else + if test $? != 77; then + gl_cv_func_mbrtowc_retval=no + fi fi -done - - - -$as_echo "#define gmtime rpl_gmtime" >>confdefs.h - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -$as_echo "#define localtime rpl_localtime" >>confdefs.h + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 +$as_echo "$gl_cv_func_mbrtowc_retval" >&6; } -$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 -$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } -if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 +$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } +if ${gl_cv_func_mbrtowc_nul_retval+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - struct timeval c; - int gettimeofday (struct timeval *restrict, void *restrict); - -int -main () -{ -/* glibc uses struct timezone * rather than the POSIX void * - if _GNU_SOURCE is defined. However, since the only portable - use of gettimeofday uses NULL as the second parameter, and - since the glibc definition is actually more typesafe, it is - not worth wrapping this to get a compliant signature. */ - int (*f) (struct timeval *restrict, void *restrict) - = gettimeofday; - int x = f (&c, 0); - return !(x | c.tv_sec | c.tv_usec); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_gettimeofday_posix_signature=yes + case "$host_os" in + # Guess no on Solaris 8 and 9. + solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; + esac + if test $LOCALE_ZH_CN != none; then + if test "$cross_compiling" = yes; then : + : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -int gettimeofday (struct timeval *restrict, struct timezone *restrict); -int -main () +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () { + /* This fails on Solaris 8 and 9. */ + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + mbstate_t state; + wchar_t wc; - ; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "", 1, &state) != 0) + return 1; + } return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_gettimeofday_posix_signature=almost +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_nul_retval=yes else - gl_cv_func_gettimeofday_posix_signature=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + gl_cv_func_mbrtowc_nul_retval=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 -$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } - if test $gl_cv_func_gettimeofday_posix_signature = almost; then - gl_gettimeofday_timezone='struct timezone' - elif test $gl_cv_func_gettimeofday_posix_signature != yes; then - REPLACE_GETTIMEOFDAY=1 - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" - - - for ac_header in sys/timeb.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_TIMEB_H 1 -_ACEOF + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 +$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } -done + case "$gl_cv_func_mbrtowc_null_arg1" in + *yes) ;; + *) +$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h - for ac_func in _ftime -do : - ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" -if test "x$ac_cv_func__ftime" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE__FTIME 1 -_ACEOF + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_null_arg2" in + *yes) ;; + *) +$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h -fi -done + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_retval" in + *yes) ;; + *) +$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_nul_retval" in + *yes) ;; + *) +$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h + REPLACE_MBRTOWC=1 + ;; + esac fi fi -cat >>confdefs.h <<_ACEOF -#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone -_ACEOF + if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then - GNULIB_GETTIMEOFDAY=1 -$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" + : - # Code from module gnumakefile: - # 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 - ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile" + fi - # Code from module gpl-3.0: - # Code from module group-member: - ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member" -if test "x$ac_cv_func_group_member" = x""yes; then : -else + GNULIB_MBRTOWC=1 +$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext" + GNULIB_MBSCASESTR=1 -fi - # Code from module hash: +$as_echo "#define GNULIB_TEST_MBSCASESTR 1" >>confdefs.h @@ -21532,125 +29831,240 @@ fi - gl_LIBOBJS="$gl_LIBOBJS hash.$ac_objext" - # Code from module hash-pjw: - # Code from module hash-triple: - # Code from module havelib: - # Code from module human: + : + : - gl_LIBOBJS="$gl_LIBOBJS human.$ac_objext" - : - # Code from module i-ring: + + if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 +$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } +if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + esac + if test $LOCALE_JA != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 1; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_incomplete_state=yes +else + gl_cv_func_mbrtowc_incomplete_state=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 +$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } - gl_LIBOBJS="$gl_LIBOBJS i-ring.$ac_objext" - # Code from module idcache: + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 +$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } +if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on Solaris 8. + solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; + esac + if test $LOCALE_ZH_CN != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + /* This fails on Solaris 8: + mbrtowc returns 2, and sets wc to 0x00F0. + mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 6, &state) != 4 + && mbtowc (&wc, input + 3, 6) == 4) + return 1; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_sanitycheck=yes +else + gl_cv_func_mbrtowc_sanitycheck=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 +$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + REPLACE_MBSTATE_T=0 + case "$gl_cv_func_mbrtowc_incomplete_state" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + case "$gl_cv_func_mbrtowc_sanitycheck" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + else + REPLACE_MBSTATE_T=1 + fi + : - gl_LIBOBJS="$gl_LIBOBJS idcache.$ac_objext" - # Code from module include_next: - # Code from module inline: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5 -$as_echo_n "checking whether the compiler generally respects inline... " >&6; } -if test "${gl_cv_c_inline_effective+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test $ac_cv_c_inline = no; then - gl_cv_c_inline_effective=no - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + if test $ac_cv_func_mbsinit = no; then + HAVE_MBSINIT=0 + ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" " +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include -int -main () -{ -#ifdef __NO_INLINE__ - #error "inline is not effective" - #endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_c_inline_effective=yes +" +if test "x$ac_cv_have_decl_mbsinit" = xyes; then : + ac_have_decl=1 else - gl_cv_c_inline_effective=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - + ac_have_decl=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5 -$as_echo "$gl_cv_c_inline_effective" >&6; } - if test $gl_cv_c_inline_effective = yes; then -$as_echo "#define HAVE_INLINE 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MBSINIT $ac_have_decl +_ACEOF + if test $ac_cv_have_decl_mbsinit = yes; then + REPLACE_MBSINIT=1 + fi + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBSINIT=1 + else + case "$host_os" in + mingw*) REPLACE_MBSINIT=1 ;; + esac + fi fi - # Code from module intprops: - # Code from module inttypes: + if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then - : + gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" : + fi - : - + GNULIB_MBSINIT=1 - : +$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h @@ -21663,147 +30077,25 @@ $as_echo "#define HAVE_INLINE 1" >>confdefs.h + if test $ac_cv_func_mbslen = yes; then + HAVE_MBSLEN=1 + else + HAVE_MBSLEN=0 + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h conforms to C99" >&5 -$as_echo_n "checking whether inttypes.h conforms to C99... " >&6; } -if test "${gl_cv_header_working_inttypes_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - gl_cv_header_working_inttypes_h=no - if test "$gl_cv_header_working_stdint_h" = yes \ - && test $ac_cv_header_inttypes_h = yes \ - && test "$ac_cv_have_decl_imaxabs" = yes \ - && test "$ac_cv_have_decl_imaxdiv" = yes \ - && test "$ac_cv_have_decl_strtoimax" = yes \ - && test "$ac_cv_have_decl_strtoumax" = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#include -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */ -#include - -/* No need to duplicate the tests of stdint.m4; they are subsumed by - $gl_cv_header_working_stdint_h = yes. */ - -/* Tests for macros supposed to be defined in inttypes.h. */ -const char *k = /* implicit string concatenation */ -#ifdef INT8_MAX - PRId8 PRIi8 -#endif -#ifdef UINT8_MAX - PRIo8 PRIu8 PRIx8 PRIX8 -#endif -#ifdef INT16_MAX - PRId16 PRIi16 -#endif -#ifdef UINT16_MAX - PRIo16 PRIu16 PRIx16 PRIX16 -#endif -#ifdef INT32_MAX - PRId32 PRIi32 -#endif -#ifdef UINT32_MAX - PRIo32 PRIu32 PRIx32 PRIX32 -#endif -#ifdef INT64_MAX - PRId64 PRIi64 -#endif -#ifdef UINT64_MAX - PRIo64 PRIu64 PRIx64 PRIX64 -#endif - PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8 - PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16 - PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32 - PRIdLEAST64 PRIiLEAST64 - PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64 - PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8 - PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16 - PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32 - PRIdFAST64 PRIiFAST64 - PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64 - PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX -#ifdef INTPTR_MAX - PRIdPTR PRIiPTR -#endif -#ifdef UINTPTR_MAX - PRIoPTR PRIuPTR PRIxPTR PRIXPTR -#endif - ; -const char *l = /* implicit string concatenation */ -#ifdef INT8_MAX - SCNd8 SCNi8 -#endif -#ifdef UINT8_MAX - SCNo8 SCNu8 SCNx8 -#endif -#ifdef INT16_MAX - SCNd16 SCNi16 -#endif -#ifdef UINT16_MAX - SCNo16 SCNu16 SCNx16 -#endif -#ifdef INT32_MAX - SCNd32 SCNi32 -#endif -#ifdef UINT32_MAX - SCNo32 SCNu32 SCNx32 -#endif -#ifdef INT64_MAX - SCNd64 SCNi64 -#endif -#ifdef UINT64_MAX - SCNo64 SCNu64 SCNx64 -#endif - SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8 - SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16 - SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32 - SCNdLEAST64 SCNiLEAST64 - SCNoLEAST64 SCNuLEAST64 SCNxLEAST64 - SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8 - SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16 - SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32 - SCNdFAST64 SCNiFAST64 - SCNoFAST64 SCNuFAST64 SCNxFAST64 - SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX -#ifdef INTPTR_MAX - SCNdPTR SCNiPTR -#endif -#ifdef UINTPTR_MAX - SCNoPTR SCNuPTR SCNxPTR -#endif - ; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_working_inttypes_h=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_inttypes_h" >&5 -$as_echo "$gl_cv_header_working_inttypes_h" >&6; } + GNULIB_MBSLEN=1 +$as_echo "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h - : @@ -21812,470 +30104,414 @@ $as_echo "$gl_cv_header_working_inttypes_h" >&6; } - if test $gl_cv_have_include_next = yes; then - gl_cv_next_inttypes_h='<'inttypes.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_inttypes_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test $ac_cv_header_inttypes_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + : -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/inttypes.h#{ - s#.*"\(.*/inttypes.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_inttypes_h='<'inttypes.h'>' - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 -$as_echo "$gl_cv_next_inttypes_h" >&6; } - fi - NEXT_INTTYPES_H=$gl_cv_next_inttypes_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'inttypes.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_inttypes_h - fi - NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive + : + if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then -$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 +$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } +if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : + $as_echo_n "(cached) " >&6 +else - PRIPTR_PREFIX= - if test -n "$STDINT_H"; then - PRIPTR_PREFIX='"l"' - else - for glpfx in '' l ll I64; do - case $glpfx in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - I64) gltype1='__int64';; + case "$host_os" in + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test $LOCALE_JA != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - extern intptr_t foo; - extern $gltype1 foo; -int -main () + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () { + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; - ; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 1; + } return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - PRIPTR_PREFIX='"'$glpfx'"' +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_incomplete_state=yes +else + gl_cv_func_mbrtowc_incomplete_state=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test -n "$PRIPTR_PREFIX" && break - done - fi - - if test "$ac_cv_have_decl_imaxabs" = yes; then - HAVE_DECL_IMAXABS=1 - else - HAVE_DECL_IMAXABS=0 - fi + fi - if test "$ac_cv_have_decl_imaxdiv" = yes; then - HAVE_DECL_IMAXDIV=1 - else - HAVE_DECL_IMAXDIV=0 - fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 +$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } - if test "$ac_cv_have_decl_strtoimax" = yes; then - HAVE_DECL_STRTOIMAX=1 - else - HAVE_DECL_STRTOIMAX=0 - fi - if test "$ac_cv_have_decl_strtoumax" = yes; then - HAVE_DECL_STRTOUMAX=1 - else - HAVE_DECL_STRTOUMAX=0 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 -$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } -if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 +$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } +if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : $as_echo_n "(cached) " >&6 else + + case "$host_os" in + # Guess no on Solaris 8. + solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; + esac + if test $LOCALE_ZH_CN != none; then + if test "$cross_compiling" = yes; then : + : +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Work also in C++ mode. */ - #define __STDC_LIMIT_MACROS 1 - - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H - #include - #if HAVE_STDINT_H - #include - #endif - - #if defined INT32_MAX && defined INTMAX_MAX - #define CONDITION (INT32_MAX < INTMAX_MAX) - #elif HAVE_LONG_LONG_INT - #define CONDITION (sizeof (int) < sizeof (long long int)) - #else - #define CONDITION 0 - #endif - int test[CONDITION ? 1 : -1]; -int -main () +#include +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () { + /* This fails on Solaris 8: + mbrtowc returns 2, and sets wc to 0x00F0. + mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; - ; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 6, &state) != 4 + && mbtowc (&wc, input + 3, 6) == 4) + return 1; + } return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_sanitycheck=yes else - gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no + gl_cv_func_mbrtowc_sanitycheck=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 -$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } - if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then - INT32_MAX_LT_INTMAX_MAX=1; + + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 +$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + + REPLACE_MBSTATE_T=0 + case "$gl_cv_func_mbrtowc_incomplete_state" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + case "$gl_cv_func_mbrtowc_sanitycheck" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac else - INT32_MAX_LT_INTMAX_MAX=0; + REPLACE_MBSTATE_T=1 fi - if test $APPLE_UNIVERSAL_BUILD = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 -$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } -if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Work also in C++ mode. */ - #define __STDC_LIMIT_MACROS 1 + : - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H - #include - #if HAVE_STDINT_H - #include - #endif - #if defined INT64_MAX - #define CONDITION (INT64_MAX == LONG_MAX) - #elif HAVE_LONG_LONG_INT - #define CONDITION (sizeof (long long int) == sizeof (long int)) - #else - #define CONDITION 0 - #endif - int test[CONDITION ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes + + if test $ac_cv_func_mbsrtowcs = no; then + HAVE_MBSRTOWCS=0 + ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" " +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include + +" +if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then : + ac_have_decl=1 else - gl_cv_test_INT64_MAX_EQ_LONG_MAX=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_have_decl=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 -$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } - if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then - INT64_MAX_EQ_LONG_MAX=1; - else - INT64_MAX_EQ_LONG_MAX=0; - fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MBSRTOWCS $ac_have_decl +_ACEOF + if test $ac_cv_have_decl_mbsrtowcs = yes; then + REPLACE_MBSRTOWCS=1 + fi else - INT64_MAX_EQ_LONG_MAX=-1 - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 -$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } -if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Work also in C++ mode. */ - #define __STDC_LIMIT_MACROS 1 - - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBSRTOWCS=1 + else - #include - #if HAVE_STDINT_H - #include - #endif - #if defined UINT32_MAX && defined UINTMAX_MAX - #define CONDITION (UINT32_MAX < UINTMAX_MAX) - #elif HAVE_LONG_LONG_INT - #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) - #else - #define CONDITION 0 - #endif - int test[CONDITION ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes -else - gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 -$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } - if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then - UINT32_MAX_LT_UINTMAX_MAX=1; - else - UINT32_MAX_LT_UINTMAX_MAX=0; - fi - if test $APPLE_UNIVERSAL_BUILD = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 -$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } -if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5 +$as_echo_n "checking whether mbsrtowcs works... " >&6; } +if ${gl_cv_func_mbsrtowcs_works+:} false; then : $as_echo_n "(cached) " >&6 else + + case "$host_os" in + # Guess no on HP-UX, Solaris, mingw. + hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; + esac + if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then + if test "$cross_compiling" = yes; then : + : +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Work also in C++ mode. */ - #define __STDC_LIMIT_MACROS 1 - - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H - - #include - #if HAVE_STDINT_H - #include - #endif - #if defined UINT64_MAX - #define CONDITION (UINT64_MAX == ULONG_MAX) - #elif HAVE_LONG_LONG_INT - #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) - #else - #define CONDITION 0 - #endif - int test[CONDITION ? 1 : -1]; -int -main () +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () { + int result = 0; + /* Test whether the function supports a NULL destination argument. + This fails on native Windows. */ + if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) + { + const char input[] = "\337er"; + const char *src = input; + mbstate_t state; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes -else - gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 -$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } - if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then - UINT64_MAX_EQ_ULONG_MAX=1; - else - UINT64_MAX_EQ_ULONG_MAX=0; - fi - - - else - UINT64_MAX_EQ_ULONG_MAX=-1 - fi + memset (&state, '\0', sizeof (mbstate_t)); + if (mbsrtowcs (NULL, &src, 1, &state) != 3 + || src != input) + result |= 1; + } + /* Test whether the function works when started with a conversion state + in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + const char input[] = "B\303\274\303\237er"; + mbstate_t state; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) + if (!mbsinit (&state)) + { + const char *src = input + 2; + if (mbsrtowcs (NULL, &src, 10, &state) != 4) + result |= 2; + } + } + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + const char input[] = "<\306\374\313\334\270\354>"; + mbstate_t state; - for gl_func in imaxabs imaxdiv strtoimax strtoumax; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) + if (!mbsinit (&state)) + { + const char *src = input + 4; + if (mbsrtowcs (NULL, &src, 10, &state) != 3) + result |= 4; + } + } + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + const char input[] = "B\250\271\201\060\211\070er"; + mbstate_t state; -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) + if (!mbsinit (&state)) + { + const char *src = input + 2; + if (mbsrtowcs (NULL, &src, 10, &state) != 4) + result |= 8; + } + } + return result; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbsrtowcs_works=yes else - eval "$as_gl_Symbol=no" + gl_cv_func_mbsrtowcs_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - eval ac_cv_have_decl_$gl_func=yes + fi + fi - done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5 +$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } + case "$gl_cv_func_mbsrtowcs_works" in + *yes) ;; + *) REPLACE_MBSRTOWCS=1 ;; + esac + fi + fi - # Code from module isblank: + if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then - : + gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext" + - if test $ac_cv_func_isblank = no; then - HAVE_ISBLANK=0 + gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext" - gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext" + : fi - GNULIB_ISBLANK=1 + GNULIB_MBSRTOWCS=1 - # Code from module iswblank: +$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h - : - : + GNULIB_MBSSTR=1 - if test $ac_cv_func_iswblank = no; then - HAVE_ISWBLANK=0 - if test $ac_cv_have_decl_iswblank = yes; then - REPLACE_ISWBLANK=1 - fi - fi - if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then - : - else - if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then + +$as_echo "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h + if false; then + REPLACE_MBTOWC=1 + fi + if test $REPLACE_MBTOWC = 1; then - gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext" - fi - fi - GNULIB_ISWBLANK=1 + gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" -$as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h + : + + fi - # Code from module langinfo: + GNULIB_MBTOWC=1 +$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h + @@ -22283,257 +30519,96 @@ $as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h : + if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then - if test $gl_cv_have_include_next = yes; then - gl_cv_next_langinfo_h='<'langinfo.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_langinfo_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test $ac_cv_header_langinfo_h = yes; then + gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + for ac_header in bp-sym.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" +if test "x$ac_cv_header_bp_sym_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BP_SYM_H 1 _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/langinfo.h#{ - s#.*"\(.*/langinfo.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_langinfo_h='<'langinfo.h'>' - fi - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5 -$as_echo "$gl_cv_next_langinfo_h" >&6; } - fi - NEXT_LANGINFO_H=$gl_cv_next_langinfo_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'langinfo.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_langinfo_h - fi - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive +done + fi - HAVE_LANGINFO_CODESET=0 - HAVE_LANGINFO_T_FMT_AMPM=0 - HAVE_LANGINFO_ERA=0 - HAVE_LANGINFO_YESEXPR=0 - : + GNULIB_MEMCHR=1 - if test $ac_cv_header_langinfo_h = yes; then - HAVE_LANGINFO_H=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5 -$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } -if test "${gl_cv_header_langinfo_codeset+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = CODESET; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_langinfo_codeset=yes -else - gl_cv_header_langinfo_codeset=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5 -$as_echo "$gl_cv_header_langinfo_codeset" >&6; } - if test $gl_cv_header_langinfo_codeset = yes; then - HAVE_LANGINFO_CODESET=1 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5 -$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } -if test "${gl_cv_header_langinfo_t_fmt_ampm+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = T_FMT_AMPM; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_langinfo_t_fmt_ampm=yes -else - gl_cv_header_langinfo_t_fmt_ampm=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5 -$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } - if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then - HAVE_LANGINFO_T_FMT_AMPM=1 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5 -$as_echo_n "checking whether langinfo.h defines ERA... " >&6; } -if test "${gl_cv_header_langinfo_era+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = ERA; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_langinfo_era=yes -else - gl_cv_header_langinfo_era=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5 -$as_echo "$gl_cv_header_langinfo_era" >&6; } - if test $gl_cv_header_langinfo_era = yes; then - HAVE_LANGINFO_ERA=1 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5 -$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; } -if test "${gl_cv_header_langinfo_yesexpr+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = YESEXPR; -int -main () -{ - ; - return 0; -} + for ac_func in mempcpy +do : + ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" +if test "x$ac_cv_func_mempcpy" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MEMPCPY 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_langinfo_yesexpr=yes -else - gl_cv_header_langinfo_yesexpr=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5 -$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; } - if test $gl_cv_header_langinfo_yesexpr = yes; then - HAVE_LANGINFO_YESEXPR=1 - fi - else - HAVE_LANGINFO_H=0 +done + + if test $ac_cv_func_mempcpy = no; then + HAVE_MEMPCPY=0 fi + if test $HAVE_MEMPCPY = 0; then - for gl_func in nl_langinfo; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - eval ac_cv_have_decl_$gl_func=yes -fi - done + gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext" - # Code from module lchown: + : + + fi - : + + GNULIB_MEMPCPY=1 + + + + + +$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h + @@ -22541,32 +30616,29 @@ fi + : + if test $ac_cv_have_decl_memrchr = no; then + HAVE_DECL_MEMRCHR=0 + fi - for ac_func in lchown + for ac_func in memrchr do : - ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown" -if test "x$ac_cv_func_lchown" = x""yes; then : + ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" +if test "x$ac_cv_func_memrchr" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LCHOWN 1 +#define HAVE_MEMRCHR 1 _ACEOF -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - fi done - if test $ac_cv_func_lchown = no; then - HAVE_LCHOWN=0 - elif test "$gl_cv_func_chown_slash_works" != yes \ - || test "$gl_cv_func_chown_ctime_works" != yes; then + if test $ac_cv_func_memrchr = no; then @@ -22575,291 +30647,405 @@ done - gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext" - REPLACE_LCHOWN=1 + : fi - GNULIB_LCHOWN=1 + GNULIB_MEMRCHR=1 -$as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h - # Code from module localcharset: - - +$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h - : + : - LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" - # Code from module locale: + : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5 -$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; } -if test "${gl_cv_header_locale_h_posix2001+set}" = set; then : + if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple Mac OS X platforms. + # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. + # But we need a configuration result that is valid in both modes. + gl_cv_func_working_mktime=no + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 +$as_echo_n "checking for working mktime... " >&6; } +if ${gl_cv_func_working_mktime+:} false; then : $as_echo_n "(cached) " >&6 else + if test "$cross_compiling" = yes; then : + gl_cv_func_working_mktime=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - int x = LC_MESSAGES; +/* Test program from Paul Eggert and Tony Leneis. */ +#include +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#if HAVE_DECL_ALARM +# include +#endif + +/* Work around redefinition to rpl_putenv by other config tests. */ +#undef putenv + +static time_t time_t_max; +static time_t time_t_min; + +/* Values we'll use to set the TZ environment variable. */ +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" +}; +#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +static int +spring_forward_gap () +{ + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; + tm.tm_mday = 5; + tm.tm_hour = 2; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + return mktime (&tm) != (time_t) -1; +} + +static int +mktime_test1 (time_t now) +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (time_t now) +{ + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) + && mktime_test1 ((time_t) (time_t_min + now))); +} + +static int +irix_6_4_bug () +{ + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + return tm.tm_mon == 2 && tm.tm_mday == 31; +} + +static int +bigtime_test (int j) +{ + struct tm tm; + time_t now; + tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + now = mktime (&tm); + if (now != (time_t) -1) + { + struct tm *lt = localtime (&now); + if (! (lt + && lt->tm_year == tm.tm_year + && lt->tm_mon == tm.tm_mon + && lt->tm_mday == tm.tm_mday + && lt->tm_hour == tm.tm_hour + && lt->tm_min == tm.tm_min + && lt->tm_sec == tm.tm_sec + && lt->tm_yday == tm.tm_yday + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) + return 0; + } + return 1; +} + +static int +year_2050_test () +{ + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ + unsigned long int answer = 2527315200UL; + + struct tm tm; + time_t t; + tm.tm_year = 2050 - 1900; + tm.tm_mon = 2 - 1; + tm.tm_mday = 1; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = -1; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + t = mktime (&tm); + + /* Check that the result is either a failure, or close enough + to the correct answer that we can assume the discrepancy is + due to leap seconds. */ + return (t == (time_t) -1 + || (0 < t && answer - 120 <= t && t <= answer + 120)); +} + int main () { + int result = 0; + time_t t, delta; + int i, j; + int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; + int time_t_signed = ! ((time_t) 0 < (time_t) -1); - ; - return 0; +#if HAVE_DECL_ALARM + /* This test makes some buggy mktime implementations loop. + Give up after 60 seconds; a mktime slower than that + isn't worth using anyway. */ + signal (SIGALRM, SIG_DFL); + alarm (60); +#endif + + time_t_max = (! time_t_signed + ? (time_t) -1 + : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) + * 2 + 1)); + time_t_min = (! time_t_signed + ? (time_t) 0 + : time_t_signed_magnitude + ? ~ (time_t) 0 + : ~ time_t_max); + + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) + putenv (tz_strings[i]); + + for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta) + if (! mktime_test (t)) + result |= 1; + if ((result & 2) == 0 + && ! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) + result |= 2; + + for (j = 1; (result & 4) == 0; j <<= 1) + { + if (! bigtime_test (j)) + result |= 4; + if (INT_MAX / 2 < j) + break; + } + if ((result & 8) == 0 && ! bigtime_test (INT_MAX)) + result |= 8; + } + if (! irix_6_4_bug ()) + result |= 16; + if (! spring_forward_gap ()) + result |= 32; + if (! year_2050_test ()) + result |= 64; + return result; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_locale_h_posix2001=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_working_mktime=yes else - gl_cv_header_locale_h_posix2001=no + gl_cv_func_working_mktime=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5 -$as_echo "$gl_cv_header_locale_h_posix2001" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5 +$as_echo "$gl_cv_func_working_mktime" >&6; } + if test $gl_cv_func_working_mktime = no; then + REPLACE_MKTIME=1 + else + REPLACE_MKTIME=0 + fi - : + if test $REPLACE_MKTIME = 1; then - if test $ac_cv_header_xlocale_h = yes; then - HAVE_XLOCALE_H=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 -$as_echo_n "checking whether locale.h defines locale_t... " >&6; } -if test "${gl_cv_header_locale_has_locale_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - locale_t x; -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_locale_has_locale_t=yes -else - gl_cv_header_locale_has_locale_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5 -$as_echo "$gl_cv_header_locale_has_locale_t" >&6; } - if test $gl_cv_header_locale_has_locale_t = yes; then - gl_cv_header_locale_h_needs_xlocale_h=no - else - gl_cv_header_locale_h_needs_xlocale_h=yes - fi - else - HAVE_XLOCALE_H=0 - gl_cv_header_locale_h_needs_xlocale_h=no - fi + gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" + : + fi + GNULIB_MKTIME=1 - if test $gl_cv_have_include_next = yes; then - gl_cv_next_locale_h='<'locale.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_locale_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/locale.h#{ - s#.*"\(.*/locale.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' +$as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5 -$as_echo "$gl_cv_next_locale_h" >&6; } - fi - NEXT_LOCALE_H=$gl_cv_next_locale_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'locale.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_locale_h - fi - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive + : - if test -n "$STDDEF_H" \ - || test $gl_cv_header_locale_h_posix2001 = no \ - || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then - : - fi - for gl_func in setlocale duplocale; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : + + MODF_LIBM= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modf can be used without linking with libm" >&5 +$as_echo_n "checking whether modf can be used without linking with libm... " >&6; } +if ${gl_cv_func_modf_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -/* Some systems provide declarations in a non-standard header. */ -#if HAVE_XLOCALE_H -# include -#endif +#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + double (*funcptr) (double, double *) = modf; + int i_ret; + float f_ret; + double d_ret; + long double l_ret; int main () { -#undef $gl_func - (void) $gl_func; +double y = funcptr (1.6180339887, &d_ret) + modf (1.6180339887, &d_ret); + + return y < 0.3 || y > 1.7; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_modf_no_libm=yes else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + gl_cv_func_modf_no_libm=no fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext - eval ac_cv_have_decl_$gl_func=yes fi - done - - - # Code from module lseek: - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5 -$as_echo_n "checking whether lseek detects pipes... " >&6; } -if test "${gl_cv_func_lseek_pipe+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_modf_no_libm" >&5 +$as_echo "$gl_cv_func_modf_no_libm" >&6; } + if test $gl_cv_func_modf_no_libm = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modf can be used with libm" >&5 +$as_echo_n "checking whether modf can be used with libm... " >&6; } +if ${gl_cv_func_modf_in_libm+:} false; then : $as_echo_n "(cached) " >&6 else - if test $cross_compiling = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include -#include /* for off_t */ -#include /* for SEEK_CUR */ -#include + double (*funcptr) (double, double *) = modf; + int i_ret; + float f_ret; + double d_ret; + long double l_ret; int main () { +double y = funcptr (1.6180339887, &d_ret) + modf (1.6180339887, &d_ret); - /* Exit with success only if stdin is seekable. */ - return lseek (0, (off_t)0, SEEK_CUR) < 0; + return y < 0.3 || y > 1.7; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - if test -s conftest$ac_exeext \ - && ./conftest$ac_exeext < conftest.$ac_ext \ - && test 1 = "`echo hi \ - | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then - gl_cv_func_lseek_pipe=yes - else - gl_cv_func_lseek_pipe=no - fi + gl_cv_func_modf_in_libm=yes else - gl_cv_func_lseek_pipe=no + gl_cv_func_modf_in_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + LIBS="$save_LIBS" -#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ -/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ - Choke me. -#endif -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_lseek_pipe=yes -else - gl_cv_func_lseek_pipe=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5 -$as_echo "$gl_cv_func_lseek_pipe" >&6; } - if test $gl_cv_func_lseek_pipe = no; then - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_modf_in_libm" >&5 +$as_echo "$gl_cv_func_modf_in_libm" >&6; } + if test $gl_cv_func_modf_in_libm = yes; then + MODF_LIBM=-lm + fi + fi @@ -22867,932 +31053,857 @@ $as_echo "$gl_cv_func_lseek_pipe" >&6; } - gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext" + if test $REPLACE_MODF = 1; then + MODF_LIBM="$TRUNC_LIBM" + fi - REPLACE_LSEEK=1 + if test $REPLACE_MODF = 1; then -$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h - fi - GNULIB_LSEEK=1 + gl_LIBOBJS="$gl_LIBOBJS modf.$ac_objext" + fi -$as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h - # Code from module lstat: + GNULIB_MODF=1 - : +$as_echo "#define GNULIB_TEST_MODF 1" >>confdefs.h - if test $ac_cv_func_lstat = yes; then - if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then - REPLACE_LSTAT=1 - fi - # Prerequisites of lib/lstat.c. - else - HAVE_LSTAT=0 - fi +for ac_func in listmntent getmntinfo +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +fi +done - GNULIB_LSTAT=1 + : -$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h - # Code from module maintainer-makefile: - # Code from module malloc: - # Code from module malloc-gnu: - for ac_header in stdlib.h +# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses +# NGROUPS (as the array dimension for a struct member) without a definition. +for ac_header in sys/ucred.h do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = x""yes; then : + ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "#include +" +if test "x$ac_cv_header_sys_ucred_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 +#define HAVE_SYS_UCRED_H 1 _ACEOF fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_malloc_0_nonnull=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif -int -main () -{ -return ! malloc (0); - ; - return 0; -} +for ac_header in sys/mount.h +do : + ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default + #if HAVE_SYS_PARAM_H + #include + #endif +" +if test "x$ac_cv_header_sys_mount_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_MOUNT_H 1 _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_malloc_0_nonnull=yes -else - ac_cv_func_malloc_0_nonnull=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then : -$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h - -else - $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h - - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" +done - REPLACE_MALLOC=1 +for ac_header in mntent.h sys/fs_types.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi +done - + getfsstat_includes="\ +$ac_includes_default +#if HAVE_SYS_PARAM_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +#if HAVE_SYS_UCRED_H +# include /* needed for definition of NGROUPS */ +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_FS_TYPES_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +" +ac_fn_c_check_member "$LINENO" "struct fsstat" "f_fstypename" "ac_cv_member_struct_fsstat_f_fstypename" "$getfsstat_includes +" +if test "x$ac_cv_member_struct_fsstat_f_fstypename" = xyes; then : cat >>confdefs.h <<_ACEOF -#define GNULIB_MALLOC_GNU 1 +#define HAVE_STRUCT_FSSTAT_F_FSTYPENAME 1 _ACEOF - # Code from module malloc-posix: - +fi - if test $gl_cv_func_malloc_posix = yes; then +# Determine how to get the list of mounted file systems. +ac_list_mounted_fs= -$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h +# If the getmntent function is available but not in the standard library, +# make sure LIBS contains the appropriate -l option. +# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, +# -lseq on Dynix/PTX, -lgen on Unixware. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 +$as_echo_n "checking for library containing getmntent... " >&6; } +if ${ac_cv_search_getmntent+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getmntent (); +int +main () +{ +return getmntent (); + ; + return 0; +} +_ACEOF +for ac_lib in '' sun seq gen; do + if test -z "$ac_lib"; then + ac_res="none required" else - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" - - REPLACE_MALLOC=1 - + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_getmntent=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_getmntent+:} false; then : + break +fi +done +if ${ac_cv_search_getmntent+:} false; then : +else + ac_cv_search_getmntent=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5 +$as_echo "$ac_cv_search_getmntent" >&6; } +ac_res=$ac_cv_search_getmntent +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +fi +for ac_func in getmntent +do : + ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent" +if test "x$ac_cv_func_getmntent" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETMNTENT 1 +_ACEOF - GNULIB_MALLOC_POSIX=1 - - - -$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h - - - - # Code from module malloca: - - - - - # Code from module math: - - - - - - - - - : - - - +fi +done +# This test must precede the ones for getmntent because Unicos-9 is +# reported to have the getmntent function, but its support is incompatible +# with other getmntent implementations. +# NOTE: Normally, I wouldn't use a check for system type as I've done for +# 'CRAY' below since that goes against the whole autoconf philosophy. But +# I think there is too great a chance that some non-Cray system has a +# function named listmntent to risk the false positive. - if test $gl_cv_have_include_next = yes; then - gl_cv_next_math_h='<'math.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_math_h+set}" = set; then : +if test -z "$ac_list_mounted_fs"; then + # Cray UNICOS 9 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for listmntent of Cray/Unicos-9" >&5 +$as_echo_n "checking for listmntent of Cray/Unicos-9... " >&6; } + if ${fu_cv_sys_mounted_cray_listmntent+:} false; then : $as_echo_n "(cached) " >&6 else - - if test $ac_cv_header_math_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fu_cv_sys_mounted_cray_listmntent=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef _CRAY +yes +#endif _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/math.h#{ - s#.*"\(.*/math.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_math_h='<'math.h'>' - fi - +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + test $ac_cv_func_listmntent = yes \ + && fu_cv_sys_mounted_cray_listmntent=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5 -$as_echo "$gl_cv_next_math_h" >&6; } - fi - NEXT_MATH_H=$gl_cv_next_math_h +rm -f conftest* - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'math.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_math_h - fi - NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_cray_listmntent" >&5 +$as_echo "$fu_cv_sys_mounted_cray_listmntent" >&6; } + if test $fu_cv_sys_mounted_cray_listmntent = yes; then + ac_list_mounted_fs=found +$as_echo "#define MOUNTED_LISTMNTENT 1" >>confdefs.h + fi +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 -$as_echo_n "checking whether NAN macro works... " >&6; } -if test "${gl_cv_header_math_nan_works+set}" = set; then : +if test -z "$ac_list_mounted_fs"; then + # AIX. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mntctl function and struct vmount" >&5 +$as_echo_n "checking for mntctl function and struct vmount... " >&6; } + if ${fu_cv_sys_mounted_vmount+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -int -main () -{ -/* Solaris 10 has a broken definition of NAN. Other platforms - fail to provide NAN, or provide it only in C99 mode; this - test only needs to fail when NAN is provided but wrong. */ - float f = 1.0f; -#ifdef NAN - f = NAN; -#endif - return f == 0; - ; - return 0; -} +#include _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_math_nan_works=yes +if ac_fn_c_try_cpp "$LINENO"; then : + fu_cv_sys_mounted_vmount=yes else - gl_cv_header_math_nan_works=no + fu_cv_sys_mounted_vmount=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5 -$as_echo "$gl_cv_header_math_nan_works" >&6; } - if test $gl_cv_header_math_nan_works = no; then - REPLACE_NAN=1 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_vmount" >&5 +$as_echo "$fu_cv_sys_mounted_vmount" >&6; } + if test $fu_cv_sys_mounted_vmount = yes; then + ac_list_mounted_fs=found + +$as_echo "#define MOUNTED_VMOUNT 1" >>confdefs.h + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5 -$as_echo_n "checking whether HUGE_VAL works... " >&6; } -if test "${gl_cv_header_math_huge_val_works+set}" = set; then : +fi + +if test $ac_cv_func_getmntent = yes; then + + # This system has the getmntent function. + # Determine whether it's the one-argument variant or the two-argument one. + + if test -z "$ac_list_mounted_fs"; then + # 4.3BSD, SunOS, HP-UX, Dynix, Irix + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for one-argument getmntent function" >&5 +$as_echo_n "checking for one-argument getmntent function... " >&6; } + if ${fu_cv_sys_mounted_getmntent1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ +#include + +#include +#if !defined MOUNTED +# if defined _PATH_MOUNTED /* GNU libc */ +# define MOUNTED _PATH_MOUNTED +# endif +# if defined MNT_MNTTAB /* HP-UX. */ +# define MOUNTED MNT_MNTTAB +# endif +# if defined MNTTABNAME /* Dynix. */ +# define MOUNTED MNTTABNAME +# endif +#endif + int main () { -/* Solaris 10 has a broken definition of HUGE_VAL. */ - double d = HUGE_VAL; - return d == 0; + struct mntent *mnt = 0; char *table = MOUNTED; + if (sizeof mnt && sizeof table) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_math_huge_val_works=yes + fu_cv_sys_mounted_getmntent1=yes else - gl_cv_header_math_huge_val_works=no + fu_cv_sys_mounted_getmntent1=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5 -$as_echo "$gl_cv_header_math_huge_val_works" >&6; } - if test $gl_cv_header_math_huge_val_works = no; then - REPLACE_HUGE_VAL=1 - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent1" >&5 +$as_echo "$fu_cv_sys_mounted_getmntent1" >&6; } + if test $fu_cv_sys_mounted_getmntent1 = yes; then + ac_list_mounted_fs=found - for gl_func in acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl ldexpl logb logl round roundf roundl sinl sqrtl tanl trunc truncf truncl; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +$as_echo "#define MOUNTED_GETMNTENT1 1" >>confdefs.h + + fi + fi + + if test -z "$ac_list_mounted_fs"; then + # SVR4 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument getmntent function" >&5 +$as_echo_n "checking for two-argument getmntent function... " >&6; } + if ${fu_cv_sys_mounted_getmntent2+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getmntent" >/dev/null 2>&1; then : + fu_cv_sys_mounted_getmntent2=yes else - eval "$as_gl_Symbol=no" + fu_cv_sys_mounted_getmntent2=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest* + fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent2" >&5 +$as_echo "$fu_cv_sys_mounted_getmntent2" >&6; } + if test $fu_cv_sys_mounted_getmntent2 = yes; then + ac_list_mounted_fs=found + +$as_echo "#define MOUNTED_GETMNTENT2 1" >>confdefs.h + + for ac_func in hasmntopt +do : + ac_fn_c_check_func "$LINENO" "hasmntopt" "ac_cv_func_hasmntopt" +if test "x$ac_cv_func_hasmntopt" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +#define HAVE_HASMNTOPT 1 _ACEOF - eval ac_cv_have_decl_$gl_func=yes fi - done +done + fi + fi - # Code from module mbchar: +fi +if test -z "$ac_list_mounted_fs"; then + # DEC Alpha running OSF/1, and Apple Darwin 1.3. + # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getfsstat function" >&5 +$as_echo_n "checking for getfsstat function... " >&6; } + if ${fu_cv_sys_mounted_getfsstat+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME +# define FS_TYPE(Ent) ((Ent).f_fstypename) +#else +# define FS_TYPE(Ent) mnt_names[(Ent).f_type] +#endif +$getfsstat_includes - # Code from module mbrtowc: +int +main () +{ +struct statfs *stats; + int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); + char *t = FS_TYPE (*stats); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + fu_cv_sys_mounted_getfsstat=yes +else + fu_cv_sys_mounted_getfsstat=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getfsstat" >&5 +$as_echo "$fu_cv_sys_mounted_getfsstat" >&6; } + if test $fu_cv_sys_mounted_getfsstat = yes; then + ac_list_mounted_fs=found +$as_echo "#define MOUNTED_GETFSSTAT 1" >>confdefs.h + fi +fi +if test -z "$ac_list_mounted_fs"; then + # SVR3 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIXME existence of three headers" >&5 +$as_echo_n "checking for FIXME existence of three headers... " >&6; } + if ${fu_cv_sys_mounted_fread_fstyp+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + fu_cv_sys_mounted_fread_fstyp=yes +else + fu_cv_sys_mounted_fread_fstyp=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread_fstyp" >&5 +$as_echo "$fu_cv_sys_mounted_fread_fstyp" >&6; } + if test $fu_cv_sys_mounted_fread_fstyp = yes; then + ac_list_mounted_fs=found +$as_echo "#define MOUNTED_FREAD_FSTYP 1" >>confdefs.h + fi +fi - : +if test -z "$ac_list_mounted_fs"; then + # 4.4BSD and DEC OSF/1. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmntinfo function" >&5 +$as_echo_n "checking for getmntinfo function... " >&6; } + if ${fu_cv_sys_mounted_getmntinfo+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$ac_cv_func_getmntinfo" = yes \ + && fu_cv_sys_mounted_getmntinfo=yes \ + || fu_cv_sys_mounted_getmntinfo=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo" >&5 +$as_echo "$fu_cv_sys_mounted_getmntinfo" >&6; } + if test $fu_cv_sys_mounted_getmntinfo = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getmntinfo returns statvfs structures" >&5 +$as_echo_n "checking whether getmntinfo returns statvfs structures... " >&6; } + if ${fu_cv_sys_mounted_getmntinfo2+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_PARAM_H +# include +#endif +#include +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_STATVFS_H +# include +#endif +extern +#ifdef __cplusplus +"C" +#endif +int getmntinfo (struct statfs **, int); - : +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + fu_cv_sys_mounted_getmntinfo2=no +else + fu_cv_sys_mounted_getmntinfo2=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo2" >&5 +$as_echo "$fu_cv_sys_mounted_getmntinfo2" >&6; } + if test $fu_cv_sys_mounted_getmntinfo2 = no; then + ac_list_mounted_fs=found +$as_echo "#define MOUNTED_GETMNTINFO 1" >>confdefs.h - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + else + ac_list_mounted_fs=found +$as_echo "#define MOUNTED_GETMNTINFO2 1" >>confdefs.h + fi + fi +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 -$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then : +if test -z "$ac_list_mounted_fs"; then + # Ultrix + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmnt function" >&5 +$as_echo_n "checking for getmnt function... " >&6; } + if ${fu_cv_sys_mounted_getmnt+:} false; then : $as_echo_n "(cached) " >&6 else - - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac - if test $LOCALE_JA != none; then - if test "$cross_compiling" = yes; then : - : -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 1; - } - return 0; -} +#include +#include _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_incomplete_state=yes +if ac_fn_c_try_cpp "$LINENO"; then : + fu_cv_sys_mounted_getmnt=yes else - gl_cv_func_mbrtowc_incomplete_state=no + fu_cv_sys_mounted_getmnt=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmnt" >&5 +$as_echo "$fu_cv_sys_mounted_getmnt" >&6; } + if test $fu_cv_sys_mounted_getmnt = yes; then + ac_list_mounted_fs=found + +$as_echo "#define MOUNTED_GETMNT 1" >>confdefs.h + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 -$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } +if test -z "$ac_list_mounted_fs"; then + # BeOS + for ac_func in next_dev fs_stat_dev +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + for ac_header in fs_info.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "fs_info.h" "ac_cv_header_fs_info_h" "$ac_includes_default" +if test "x$ac_cv_header_fs_info_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FS_INFO_H 1 +_ACEOF +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 -$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +done - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BEOS mounted file system support functions" >&5 +$as_echo_n "checking for BEOS mounted file system support functions... " >&6; } + if test $ac_cv_header_fs_info_h = yes \ + && test $ac_cv_func_next_dev = yes \ + && test $ac_cv_func_fs_stat_dev = yes; then + fu_result=yes + else + fu_result=no + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_result" >&5 +$as_echo "$fu_result" >&6; } + if test $fu_result = yes; then + ac_list_mounted_fs=found + +$as_echo "#define MOUNTED_FS_STAT_DEV 1" >>confdefs.h + + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # SVR2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to resort to fread on /etc/mnttab" >&5 +$as_echo_n "checking whether it is possible to resort to fread on /etc/mnttab... " >&6; } + if ${fu_cv_sys_mounted_fread+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 1; - } - return 0; -} +#include _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_sanitycheck=yes +if ac_fn_c_try_cpp "$LINENO"; then : + fu_cv_sys_mounted_fread=yes else - gl_cv_func_mbrtowc_sanitycheck=no + fu_cv_sys_mounted_fread=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread" >&5 +$as_echo "$fu_cv_sys_mounted_fread" >&6; } + if test $fu_cv_sys_mounted_fread = yes; then + ac_list_mounted_fs=found -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 -$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } +$as_echo "#define MOUNTED_FREAD 1" >>confdefs.h - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 fi - if test $REPLACE_MBSTATE_T = 1; then +fi - : +if test -z "$ac_list_mounted_fs"; then + # Interix / BSD alike statvfs + # the code is really interix specific, so make sure, we're on it. + case "$host" in + *-interix*) + for ac_func in statvfs +do : + ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs" +if test "x$ac_cv_func_statvfs" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STATVFS 1 +_ACEOF - fi +fi +done + if test $ac_cv_func_statvfs = yes; then + ac_list_mounted_fs=found +$as_echo "#define MOUNTED_INTERIX_STATVFS 1" >>confdefs.h - : + fi + ;; + esac +fi +if test -z "$ac_list_mounted_fs"; then + as_fn_error $? "could not determine how to read list of mounted file systems" "$LINENO" 5 + # FIXME -- no need to abort building the whole package + # Can't build mountlist.c or anything that needs its functions +fi +if test $ac_list_mounted_fs = found; then : + gl_cv_list_mounted_fs=yes +else + gl_cv_list_mounted_fs=no +fi - if test $ac_cv_func_mbrtowc = no; then - HAVE_MBRTOWC=0 - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBRTOWC=1 - else + if test $gl_cv_list_mounted_fs = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 -$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } -if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case "$host_os" in - # Guess no on Solaris. - solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; - esac - if test $LOCALE_FR_UTF8 != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - char input[] = "\303\237er"; - mbstate_t state; - wchar_t wc; - size_t ret; - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 5, &state); - if (ret != 2) - result |= 1; - if (!mbsinit (&state)) - result |= 2; - memset (&state, '\0', sizeof (mbstate_t)); - ret = mbrtowc (NULL, input, 5, &state); - if (ret != 2) /* Solaris 7 fails here: ret is -1. */ - result |= 4; - if (!mbsinit (&state)) - result |= 8; - } - return result; -} + gl_LIBOBJS="$gl_LIBOBJS mountlist.$ac_objext" + + + for ac_header in sys/mntent.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/mntent.h" "ac_cv_header_sys_mntent_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mntent_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_MNTENT_H 1 _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_null_arg1=yes -else - gl_cv_func_mbrtowc_null_arg1=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + fi - fi +done + + + ac_fn_c_check_member "$LINENO" "struct statfs" "f_fstypename" "ac_cv_member_struct_statfs_f_fstypename" " + #include + #include + #include + +" +if test "x$ac_cv_member_struct_statfs_f_fstypename" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1 +_ACEOF + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 -$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 -$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } -if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case "$host_os" in - # Guess no on OSF/1. - osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; - esac - if test $LOCALE_FR_UTF8 != none; then - if test "$cross_compiling" = yes; then : : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - mbstate_t state; - wchar_t wc; - int ret; - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - mbrtowc (&wc, NULL, 5, &state); - /* Check that wc was not modified. */ - if (wc != (wchar_t) 0xBADFACE) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_null_arg2=yes -else - gl_cv_func_mbrtowc_null_arg2=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 -$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } + if test $ac_cv_func__set_invalid_parameter_handler = yes; then + HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 +$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h + else + HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 + fi + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 -$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } -if test "${gl_cv_func_mbrtowc_retval+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case "$host_os" in - # Guess no on HP-UX, Solaris, native Windows. - hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_retval="guessing yes" ;; - esac - if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ - || { case "$host_os" in mingw*) true;; *) false;; esac; }; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - int found_some_locale = 0; - /* This fails on Solaris. */ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - char input[] = "B\303\274\303\237er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - { - input[1] = '\0'; - if (mbrtowc (&wc, input + 2, 5, &state) != 1) - result |= 1; - } - found_some_locale = 1; - } - /* This fails on HP-UX 11.11. */ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - { - input[1] = '\0'; - if (mbrtowc (&wc, input + 2, 5, &state) != 2) - result |= 2; - } - found_some_locale = 1; - } - /* This fails on native Windows. */ - if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) - { - char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 4; - } - found_some_locale = 1; - } - if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) - { - char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 8; - } - found_some_locale = 1; - } - if (setlocale (LC_ALL, "Chinese_China.936") != NULL) - { - char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 16; - } - found_some_locale = 1; - } - return (found_some_locale ? result : 77); -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_retval=yes -else - if test $? != 77; then - gl_cv_func_mbrtowc_retval=no - fi + gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 -$as_echo "$gl_cv_func_mbrtowc_retval" >&6; } + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 -$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } -if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then : + + + + + + gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext" + + fi + + + + + + : + + + + + + if test $ac_cv_func_nl_langinfo = yes; then + # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5 +$as_echo_n "checking whether YESEXPR works... " >&6; } +if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then : $as_echo_n "(cached) " >&6 else + if test "$cross_compiling" = yes; then : + + case "$host_os" in + # Guess no on irix systems. + irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; + # Guess yes elsewhere. + *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; + esac - case "$host_os" in - # Guess no on Solaris 8 and 9. - solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () +int +main () { - /* This fails on Solaris 8 and 9. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - mbstate_t state; - wchar_t wc; +return !*nl_langinfo(YESEXPR); - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, "", 1, &state) != 0) - return 1; - } + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_nul_retval=yes + gl_cv_func_nl_langinfo_yesexpr_works=yes else - gl_cv_func_mbrtowc_nul_retval=no + gl_cv_func_nl_langinfo_yesexpr_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 -$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } - - case "$gl_cv_func_mbrtowc_null_arg1" in - *yes) ;; - *) -$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5 +$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; } + case $gl_cv_func_nl_langinfo_yesexpr_works in + *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; + *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; + esac - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_null_arg2" in - *yes) ;; - *) -$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS +_ACEOF - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_retval" in - *yes) ;; - *) -$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h + if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ + && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then + : + else + REPLACE_NL_LANGINFO=1 - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_nul_retval" in - *yes) ;; - *) -$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h +$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h - REPLACE_MBRTOWC=1 - ;; - esac fi + else + HAVE_NL_LANGINFO=0 fi - if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then - : + if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then @@ -23801,45 +31912,103 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" - gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" + fi - : - fi + GNULIB_NL_LANGINFO=1 - GNULIB_MBRTOWC=1 -$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h +$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h - # Code from module mbscasestr: + case "$host_os" in + mingw* | pw*) + REPLACE_OPEN=1 + ;; + *) - GNULIB_MBSCASESTR=1 + : -$as_echo "#define GNULIB_TEST_MBSCASESTR 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 +$as_echo_n "checking whether open recognizes a trailing slash... " >&6; } +if ${gl_cv_func_open_slash+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + touch conftest.tmp + ln -s conftest.tmp conftest.lnk + fi + if test "$cross_compiling" = yes; then : - # Code from module mbsinit: + case "$host_os" in + freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) + gl_cv_func_open_slash="guessing no" ;; + *) + gl_cv_func_open_slash="guessing yes" ;; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_UNISTD_H +# include +#endif +int main () +{ + int result = 0; +#if HAVE_LSTAT + if (open ("conftest.lnk/", O_RDONLY) != -1) + result |= 1; +#endif + if (open ("conftest.sl/", O_CREAT, 0600) >= 0) + result |= 2; + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_open_slash=yes +else + gl_cv_func_open_slash=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.sl conftest.tmp conftest.lnk +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 +$as_echo "$gl_cv_func_open_slash" >&6; } + case "$gl_cv_func_open_slash" in + *no) +$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h + REPLACE_OPEN=1 + ;; + esac + ;; + esac + if test $REPLACE_OPEN = 0; then @@ -23849,212 +32018,137 @@ $as_echo "#define GNULIB_TEST_MBSCASESTR 1" >>confdefs.h + if test $ac_cv_func_fchdir = no; then + HAVE_FCHDIR=0 + fi - : + if test $HAVE_FCHDIR = 0; then + REPLACE_OPEN=1 + fi + fi + if test $REPLACE_OPEN = 1; then - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 -$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac - if test $LOCALE_JA != none; then - if test "$cross_compiling" = yes; then : + + + gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" + + + : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; + fi - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_incomplete_state=yes -else - gl_cv_func_mbrtowc_incomplete_state=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 -$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } + + + GNULIB_OPEN=1 + + + + + +$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h + + - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 -$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_sanitycheck=yes -else - gl_cv_func_mbrtowc_sanitycheck=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 -$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 - fi - if test $REPLACE_MBSTATE_T = 1; then - : + case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in + yes+*yes) + ;; + yes+*) + # Solaris 9 has *at functions, but uniformly mishandles trailing + # slash in all of them. + REPLACE_OPENAT=1 + ;; + *) + HAVE_OPENAT=0 + ;; + esac + + if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then + + + + - fi + + + + gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" : + fi +cat >>confdefs.h <<_ACEOF +#define GNULIB_OPENAT 1 +_ACEOF - if test $ac_cv_func_mbsinit = no; then - HAVE_MBSINIT=0 - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBSINIT=1 - else - case "$host_os" in - mingw*) REPLACE_MBSINIT=1 ;; - esac - fi - fi - if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then - : + GNULIB_OPENAT=1 +$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h + - gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" - : - fi +cat >>confdefs.h <<_ACEOF +#define GNULIB_OPENAT_SAFER 1 +_ACEOF - GNULIB_MBSINIT=1 -$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h + for ac_func in opendir +do : + ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir" +if test "x$ac_cv_func_opendir" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENDIR 1 +_ACEOF + +fi +done + if test $ac_cv_func_opendir = no; then + HAVE_OPENDIR=0 + fi - # Code from module mbslen: @@ -24064,332 +32158,286 @@ $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h - if test $ac_cv_func_mbslen = yes; then - HAVE_MBSLEN=1 - else - HAVE_MBSLEN=0 + if test $ac_cv_func_fchdir = no; then + HAVE_FCHDIR=0 fi + if test $HAVE_FCHDIR = 0; then + if test $HAVE_OPENDIR = 1; then + REPLACE_OPENDIR=1 + fi + fi + + if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then - GNULIB_MBSLEN=1 -$as_echo "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h - # Code from module mbsrtowcs: + gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext" + fi + GNULIB_OPENDIR=1 - : +$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h - : - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include +#include <$ac_cv_struct_tm> +" +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_ZONE 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 -$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then : - $as_echo_n "(cached) " >&6 + +fi + +if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + +$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h + +else + ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include +" +if test "x$ac_cv_have_decl_tzname" = xyes; then : + ac_have_decl=1 else + ac_have_decl=0 +fi - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac - if test $LOCALE_JA != none; then - if test "$cross_compiling" = yes; then : - : +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME $ac_have_decl +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 +$as_echo_n "checking for tzname... " >&6; } +if ${ac_cv_var_tzname+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include #include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; +#if !HAVE_DECL_TZNAME +extern char *tzname[]; +#endif - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 1; - } +int +main () +{ +return tzname[0][0]; + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_incomplete_state=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_var_tzname=yes else - gl_cv_func_mbrtowc_incomplete_state=no + ac_cv_var_tzname=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 +$as_echo "$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then - fi +$as_echo "#define HAVE_TZNAME 1" >>confdefs.h + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 -$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 -$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then : +#include /* for time_t */ +#include /* for CHAR_BIT, LONG_MIN, LONG_MAX */ +#define TYPE_MINIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) ((t) 0 < (t) -1 \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) +typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1]; +typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1]; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + + : + + + + + + + + + + + + if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then + REPLACE_PERROR=1 + fi + case ${gl_cv_func_strerror_r_works-unset} in + unset|*yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5 +$as_echo_n "checking whether perror matches strerror... " >&6; } +if ${gl_cv_func_perror_works+:} false; then : $as_echo_n "(cached) " >&6 else + if test "$cross_compiling" = yes; then : + gl_cv_func_perror_works="guessing no" - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + #include + #include + #include -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () +int +main () { - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; +char *str = strerror (-1); + if (!getenv("CONFTEST_OUTPUT")) return 0; + if (!str) str = ""; + puts (str); + errno = -1; + perror (""); + return 0; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 1; - } + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_sanitycheck=yes + if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \ + && cmp conftest.txt1 conftest.txt2 >/dev/null; then + gl_cv_func_perror_works=yes + else + gl_cv_func_perror_works=no + fi + rm -rf conftest.txt1 conftest.txt2 else - gl_cv_func_mbrtowc_sanitycheck=no + gl_cv_func_perror_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 -$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5 +$as_echo "$gl_cv_func_perror_works" >&6; } + if test "$gl_cv_func_perror_works" != yes; then + REPLACE_PERROR=1 + fi + ;; + *) + REPLACE_PERROR=1 + ;; + esac - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 - fi - if test $REPLACE_MBSTATE_T = 1; then + if test $REPLACE_PERROR = 1; then - : - fi - : + gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext" + fi - if test $ac_cv_func_mbsrtowcs = no; then - HAVE_MBSRTOWCS=0 - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBSRTOWCS=1 - else + GNULIB_PERROR=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5 -$as_echo_n "checking whether mbsrtowcs works... " >&6; } -if test "${gl_cv_func_mbsrtowcs_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case "$host_os" in - # Guess no on HP-UX, Solaris, mingw. - hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; - esac - if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - /* Test whether the function supports a NULL destination argument. - This fails on native Windows. */ - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - const char input[] = "\337er"; - const char *src = input; - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbsrtowcs (NULL, &src, 1, &state) != 3 - || src != input) - result |= 1; - } - /* Test whether the function works when started with a conversion state - in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - const char input[] = "B\303\274\303\237er"; - mbstate_t state; +$as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 2; - if (mbsrtowcs (NULL, &src, 10, &state) != 4) - result |= 2; - } - } - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "<\306\374\313\334\270\354>"; - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 4; - if (mbsrtowcs (NULL, &src, 10, &state) != 3) - result |= 4; - } - } - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - const char input[] = "B\250\271\201\060\211\070er"; - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 2; - if (mbsrtowcs (NULL, &src, 10, &state) != 4) - result |= 8; - } - } - return result; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbsrtowcs_works=yes + ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include +" +if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : + ac_have_decl=1 else - gl_cv_func_mbsrtowcs_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_have_decl=0 fi - fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl +_ACEOF + ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include +" +if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5 -$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } - case "$gl_cv_func_mbsrtowcs_works" in - *yes) ;; - *) REPLACE_MBSRTOWCS=1 ;; - esac - fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl +_ACEOF + + + : + + + : + + + + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_READ=1 fi - if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then - : + if test $REPLACE_READ = 1; then @@ -24398,1342 +32446,955 @@ $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } - gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext" + : + fi + GNULIB_READ=1 - gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext" - : +$as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h + + + + + + + for ac_func in readdir +do : + ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir" +if test "x$ac_cv_func_readdir" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_READDIR 1 +_ACEOF + +fi +done + if test $ac_cv_func_readdir = no; then + HAVE_READDIR=0 fi + if test $HAVE_READDIR = 0; then - GNULIB_MBSRTOWCS=1 -$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext" - # Code from module mbsstr: + fi - GNULIB_MBSSTR=1 + GNULIB_READDIR=1 -$as_echo "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h - # Code from module mbtowc: + +$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h - if false; then - REPLACE_MBTOWC=1 - fi - if test $REPLACE_MBTOWC = 1; then + : - gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" + if test $ac_cv_func_readlink = no; then + HAVE_READLINK=0 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 +$as_echo_n "checking whether readlink signature is correct... " >&6; } +if ${gl_cv_decl_readlink_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Cause compilation failure if original declaration has wrong type. */ + ssize_t readlink (const char *, char *, size_t); +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_decl_readlink_works=yes +else + gl_cv_decl_readlink_works=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 +$as_echo "$gl_cv_decl_readlink_works" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 +$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } +if ${gl_cv_func_readlink_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + # We have readlink, so assume ln -s works. + ln -s conftest.no-such conftest.link + ln -s conftest.link conftest.lnk2 + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_readlink_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +char buf[20]; + return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_readlink_works=yes +else + gl_cv_func_readlink_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.link conftest.lnk2 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 +$as_echo "$gl_cv_func_readlink_works" >&6; } + case "$gl_cv_func_readlink_works" in + *yes) + if test "$gl_cv_decl_readlink_works" != yes; then + REPLACE_READLINK=1 + fi + ;; + *) - : +$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h + REPLACE_READLINK=1 + ;; + esac fi + if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then - GNULIB_MBTOWC=1 - - -$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h - # Code from module mbuiter: + gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" : - # Code from module memchr: - - - - - GNULIB_MEMCHR=1 - - - -$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h - - + fi - # Code from module mempcpy: + GNULIB_READLINK=1 +$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h - for ac_func in mempcpy -do : - ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" -if test "x$ac_cv_func_mempcpy" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MEMPCPY 1 -_ACEOF -else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + : -fi -done - if test $ac_cv_func_mempcpy = no; then - HAVE_MEMPCPY=0 - : + if test $ac_cv_func_readlinkat = no; then + HAVE_READLINKAT=0 fi + if test $HAVE_READLINKAT = 0; then - GNULIB_MEMPCPY=1 -$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h - - - - # Code from module memrchr: + gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext" + fi - : + GNULIB_READLINKAT=1 - if test $ac_cv_have_decl_memrchr = no; then - HAVE_DECL_MEMRCHR=0 - fi +$as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h - for ac_func in memrchr + for ac_header in stdlib.h do : - ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" -if test "x$ac_cv_func_memrchr" = x""yes; then : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_MEMRCHR 1 +#define HAVE_STDLIB_H 1 _ACEOF -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - fi -done - - - if test $ac_cv_func_memrchr = no; then - : - fi - - - - - GNULIB_MEMRCHR=1 - - - -$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h - - - - # Code from module mkdir: - - - : - - - +done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5 -$as_echo_n "checking whether mkdir handles trailing slash... " >&6; } -if test "${gl_cv_func_mkdir_trailing_slash_works+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +$as_echo_n "checking for GNU libc compatible realloc... " >&6; } +if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else - rm -rf conftest.dir - if test "$cross_compiling" = yes; then : - gl_cv_func_mkdir_trailing_slash_works="guessing no" + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ + | hpux* | solaris* | cygwin* | mingw*) + ac_cv_func_realloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_realloc_0_nonnull=no ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -# include -# include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include + #else + char *realloc (); + #endif int main () { -return mkdir ("conftest.dir/", 0700); +return ! realloc (0, 0); ; return 0; } + _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mkdir_trailing_slash_works=yes + ac_cv_func_realloc_0_nonnull=yes else - gl_cv_func_mkdir_trailing_slash_works=no + ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -rf conftest.dir - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5 -$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; } - if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then - REPLACE_MKDIR=1 - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } + if test $ac_cv_func_realloc_0_nonnull = yes; then : +$as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h +else + $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h + REPLACE_REALLOC=1 +fi - gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" + if test $REPLACE_REALLOC = 1; then - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5 -$as_echo_n "checking whether mkdir handles trailing dot... " >&6; } -if test "${gl_cv_func_mkdir_trailing_dot_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -rf conftest.dir - if test "$cross_compiling" = yes; then : - gl_cv_func_mkdir_trailing_dot_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -# include -# include -int -main () -{ -return !mkdir ("conftest.dir/./", 0700); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mkdir_trailing_dot_works=yes -else - gl_cv_func_mkdir_trailing_dot_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - rm -rf conftest.dir -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5 -$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; } - if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then - REPLACE_MKDIR=1 + gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" + fi +cat >>confdefs.h <<_ACEOF +#define GNULIB_REALLOC_GNU 1 +_ACEOF - gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" + if test $gl_cv_func_malloc_posix = yes; then -$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h +$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h + else + REPLACE_REALLOC=1 fi - # Code from module mktime: + if test $REPLACE_REALLOC = 1; then - : + gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" - : + fi + GNULIB_REALLOC_POSIX=1 -if test $APPLE_UNIVERSAL_BUILD = 1; then - # A universal build on Apple MacOS X platforms. - # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. - # But we need a configuration result that is valid in both modes. - ac_cv_func_working_mktime=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 -$as_echo_n "checking for working mktime... " >&6; } -if test "${ac_cv_func_working_mktime+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_working_mktime=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Test program from Paul Eggert and Tony Leneis. */ -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#ifndef HAVE_ALARM -# define alarm(X) /* empty */ -#endif -/* Work around redefinition to rpl_putenv by other config tests. */ -#undef putenv -static time_t time_t_max; -static time_t time_t_min; +$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h -/* Values we'll use to set the TZ environment variable. */ -static char *tz_strings[] = { - (char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" -}; -#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) -/* Return 0 if mktime fails to convert a date in the spring-forward gap. - Based on a problem report from Andreas Jaeger. */ -static int -spring_forward_gap () -{ - /* glibc (up to about 1998-10-07) failed this test. */ - struct tm tm; - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - return mktime (&tm) != (time_t) -1; -} -static int -mktime_test1 (time_t now) -{ - struct tm *lt; - return ! (lt = localtime (&now)) || mktime (lt) == now; -} +# Check whether --with-included-regex was given. +if test "${with_included_regex+set}" = set; then : + withval=$with_included_regex; +fi -static int -mktime_test (time_t now) -{ - return (mktime_test1 (now) - && mktime_test1 ((time_t) (time_t_max - now)) - && mktime_test1 ((time_t) (time_t_min + now))); -} -static int -irix_6_4_bug () -{ - /* Based on code from Ariel Faigon. */ - struct tm tm; - tm.tm_year = 96; - tm.tm_mon = 3; - tm.tm_mday = 0; - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - mktime (&tm); - return tm.tm_mon == 2 && tm.tm_mday == 31; -} + case $with_included_regex in #( + yes|no) ac_use_included_regex=$with_included_regex + ;; + '') + # If the system regex support is good enough that it passes the + # following run test, then default to *not* using the included regex.c. + # If cross compiling, assume the test would fail and use the included + # regex.c. -static int -bigtime_test (int j) -{ - struct tm tm; - time_t now; - tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; - now = mktime (&tm); - if (now != (time_t) -1) - { - struct tm *lt = localtime (&now); - if (! (lt - && lt->tm_year == tm.tm_year - && lt->tm_mon == tm.tm_mon - && lt->tm_mday == tm.tm_mday - && lt->tm_hour == tm.tm_hour - && lt->tm_min == tm.tm_min - && lt->tm_sec == tm.tm_sec - && lt->tm_yday == tm.tm_yday - && lt->tm_wday == tm.tm_wday - && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) - == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) - return 0; - } - return 1; -} + : -static int -year_2050_test () -{ - /* The correct answer for 2050-02-01 00:00:00 in Pacific time, - ignoring leap seconds. */ - unsigned long int answer = 2527315200UL; - struct tm tm; - time_t t; - tm.tm_year = 2050 - 1900; - tm.tm_mon = 2 - 1; - tm.tm_mday = 1; - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - tm.tm_isdst = -1; - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - t = mktime (&tm); - /* Check that the result is either a failure, or close enough - to the correct answer that we can assume the discrepancy is - due to leap seconds. */ - return (t == (time_t) -1 - || (0 < t && answer - 120 <= t && t <= answer + 120)); -} -int -main () -{ - int result = 0; - time_t t, delta; - int i, j; - int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; - int time_t_signed = ! ((time_t) 0 < (time_t) -1); + : - /* This test makes some buggy mktime implementations loop. - Give up after 60 seconds; a mktime slower than that - isn't worth using anyway. */ - alarm (60); - time_t_max = (! time_t_signed - ? (time_t) -1 - : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) - * 2 + 1)); - time_t_min = (! time_t_signed - ? (time_t) 0 - : time_t_signed_magnitude - ? ~ (time_t) 0 - : ~ time_t_max); - delta = time_t_max / 997; /* a suitable prime number */ - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) - putenv (tz_strings[i]); - for (t = 0; t <= time_t_max - delta; t += delta) - if (! mktime_test (t)) - result |= 1; - if (! (mktime_test ((time_t) 1) - && mktime_test ((time_t) (60 * 60)) - && mktime_test ((time_t) (60 * 60 * 24)))) - result |= 2; - for (j = 1; ; j <<= 1) - if (! bigtime_test (j)) - result |= 4; - else if (INT_MAX / 2 < j) - break; - if (! bigtime_test (INT_MAX)) - result |= 8; - } - if (! irix_6_4_bug ()) - result |= 16; - if (! spring_forward_gap ()) - result |= 32; - if (! year_2050_test ()) - result |= 64; - return result; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_working_mktime=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5 +$as_echo_n "checking for working re_compile_pattern... " >&6; } +if ${gl_cv_func_re_compile_pattern_working+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_func_working_mktime=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + if test "$cross_compiling" = yes; then : + gl_cv_func_re_compile_pattern_working=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 -$as_echo "$ac_cv_func_working_mktime" >&6; } -if test $ac_cv_func_working_mktime = no; then + #include + #include + #include + #if defined M_CHECK_ACTION || HAVE_DECL_ALARM + # include + # include + #endif + #if HAVE_MALLOC_H + # include + #endif + #ifdef M_CHECK_ACTION + /* Exit with distinguishable exit code. */ + static void sigabrt_no_core (int sig) { raise (SIGTERM); } + #endif +int +main () +{ +int result = 0; + static struct re_pattern_buffer regex; + unsigned char folded_chars[UCHAR_MAX + 1]; + int i; + const char *s; + struct re_registers regs; + /* Some builds of glibc go into an infinite loop on this + test. Use alarm to force death, and mallopt to avoid + malloc recursion in diagnosing the corrupted heap. */ +#if HAVE_DECL_ALARM + signal (SIGALRM, SIG_DFL); + alarm (2); +#endif +#ifdef M_CHECK_ACTION + signal (SIGABRT, sigabrt_no_core); + mallopt (M_CHECK_ACTION, 2); +#endif + if (setlocale (LC_ALL, "en_US.UTF-8")) + { + { + /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + This test needs valgrind to catch the bug on Debian + GNU/Linux 3.1 x86, but it might catch the bug better + on other platforms and it shouldn't hurt to try the + test here. */ + static char const pat[] = "insert into"; + static char const data[] = + "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE + | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + result |= 1; + else if (re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, ®s) + != -1) + result |= 1; + } + { + /* This test is from glibc bug 15078. + The test case is from Andreas Schwab in + . + */ + static char const pat[] = "[^x]x"; + static char const data[] = + /* */ + "\xe1\x80\x80" + "\xe1\x80\xbb" + "\xe1\x80\xbd" + "\xe1\x80\x94" + "\xe1\x80\xba" + "\xe1\x80\xaf" + "\xe1\x80\x95" + "\xe1\x80\xba" + "x"; + re_set_syntax (0); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + result |= 1; + else + { + i = re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, 0); + if (i != 0 && i != 21) + result |= 1; + } + } - gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" + if (! setlocale (LC_ALL, "C")) + return 1; + } -fi + /* This test is from glibc bug 3957, reported by Andrew Mackey. */ + re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("a[^x]b", 6, ®ex); + if (s) + result |= 2; + /* This should fail, but succeeds for glibc-2.5. */ + else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) + result |= 2; - if test $ac_cv_func_working_mktime = no; then - REPLACE_MKTIME=1 + /* This regular expression is from Spencer ere test number 75 + in grep-2.3. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + for (i = 0; i <= UCHAR_MAX; i++) + folded_chars[i] = i; + regex.translate = folded_chars; + s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); + /* This should fail with _Invalid character class name_ error. */ + if (!s) + result |= 4; + /* Ensure that [b-a] is diagnosed as invalid, when + using RE_NO_EMPTY_RANGES. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("a[b-a]", 6, ®ex); + if (s == 0) + result |= 8; + /* This should succeed, but does not for glibc-2.1.3. */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("{1", 2, ®ex); + if (s) + result |= 8; - else - REPLACE_MKTIME=0 - fi + /* The following example is derived from a problem report + against gawk from Jorge Stolfi . */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[an\371]*n", 7, ®ex); + if (s) + result |= 8; + /* This should match, but does not for glibc-2.2.1. */ + else if (re_match (®ex, "an", 2, 0, ®s) != 2) + result |= 8; + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + result |= 8; + /* glibc-2.2.93 does not work with a negative RANGE argument. */ + else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) + result |= 8; + + /* The version of regex.c in older versions of gnulib + ignored RE_ICASE. Detect that problem too. */ + re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + result |= 16; + else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) + result |= 16; + + /* Catch a bug reported by Vin Shelton in + http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html + */ + re_set_syntax (RE_SYNTAX_POSIX_BASIC + & ~RE_CONTEXT_INVALID_DUP + & ~RE_NO_EMPTY_RANGES); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); + if (s) + result |= 32; + /* REG_STARTEND was added to glibc on 2004-01-15. + Reject older versions. */ + if (! REG_STARTEND) + result |= 64; +#if 0 + /* It would be nice to reject hosts whose regoff_t values are too + narrow (including glibc on hosts with 64-bit ptrdiff_t and + 32-bit int), but we should wait until glibc implements this + feature. Otherwise, support for equivalence classes and + multibyte collation symbols would always be broken except + when compiling --without-included-regex. */ + if (sizeof (regoff_t) < sizeof (ptrdiff_t) + || sizeof (regoff_t) < sizeof (ssize_t)) + result |= 64; +#endif - GNULIB_MKTIME=1 + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_re_compile_pattern_working=yes +else + gl_cv_func_re_compile_pattern_working=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5 +$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; } + case $gl_cv_func_re_compile_pattern_working in #( + yes) ac_use_included_regex=no;; #( + no) ac_use_included_regex=yes;; + esac + ;; + *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5 + ;; + esac -$as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h + if test $ac_use_included_regex = yes; then +$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h - # Code from module modechange: +$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h +$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h +$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h +$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h +$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS modechange.$ac_objext" +$as_echo "#define re_search rpl_re_search" >>confdefs.h - # Code from module modf: +$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h - MODF_LIBM= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modf can be used without linking with libm" >&5 -$as_echo_n "checking whether modf can be used without linking with libm... " >&6; } -if test "${gl_cv_func_modf_no_libm+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +$as_echo "#define re_match rpl_re_match" >>confdefs.h - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __NO_MATH_INLINES - # define __NO_MATH_INLINES 1 /* for glibc */ - #endif - #include - double (*funcptr) (double, double *) = modf; - double d_ret; -int -main () -{ -double y = funcptr (1.6180339887, &d_ret); - return y < 0.3 || y > 1.7; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_modf_no_libm=yes -else - gl_cv_func_modf_no_libm=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_modf_no_libm" >&5 -$as_echo "$gl_cv_func_modf_no_libm" >&6; } - if test $gl_cv_func_modf_no_libm = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modf can be used with libm" >&5 -$as_echo_n "checking whether modf can be used with libm... " >&6; } -if test "${gl_cv_func_modf_in_libm+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - save_LIBS="$LIBS" - LIBS="$LIBS -lm" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __NO_MATH_INLINES - # define __NO_MATH_INLINES 1 /* for glibc */ - #endif - #include - double (*funcptr) (double, double *) = modf; - double d_ret; -int -main () -{ -double y = funcptr (1.6180339887, &d_ret); - return y < 0.3 || y > 1.7; +$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_modf_in_libm=yes -else - gl_cv_func_modf_in_libm=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$save_LIBS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_modf_in_libm" >&5 -$as_echo "$gl_cv_func_modf_in_libm" >&6; } - if test $gl_cv_func_modf_in_libm = yes; then - MODF_LIBM=-lm - fi - fi +$as_echo "#define re_comp rpl_re_comp" >>confdefs.h +$as_echo "#define re_exec rpl_re_exec" >>confdefs.h - # Code from module mountlist: +$as_echo "#define regcomp rpl_regcomp" >>confdefs.h -for ac_func in listmntent getmntinfo -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +$as_echo "#define regexec rpl_regexec" >>confdefs.h -fi -done +$as_echo "#define regerror rpl_regerror" >>confdefs.h - : +$as_echo "#define regfree rpl_regfree" >>confdefs.h + fi + if test $ac_use_included_regex = yes; then -# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses -# NGROUPS (as the array dimension for a struct member) without a definition. -for ac_header in sys/ucred.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "#include -" -if test "x$ac_cv_header_sys_ucred_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_UCRED_H 1 -_ACEOF -fi -done + gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext" -for ac_header in sys/mount.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default - #if HAVE_SYS_PARAM_H - #include - #endif -" -if test "x$ac_cv_header_sys_mount_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_MOUNT_H 1 -_ACEOF -fi -done -for ac_header in mntent.h sys/fs_types.h + + + for ac_header in libintl.h do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" +if test "x$ac_cv_header_libintl_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_LIBINTL_H 1 _ACEOF fi done - getfsstat_includes="\ -$ac_includes_default -#if HAVE_SYS_PARAM_H -# include /* needed by powerpc-apple-darwin1.3.7 */ -#endif -#if HAVE_SYS_UCRED_H -# include /* needed for definition of NGROUPS */ -# include /* needed by powerpc-apple-darwin1.3.7 */ -#endif -#if HAVE_SYS_MOUNT_H -# include -#endif -#if HAVE_SYS_FS_TYPES_H -# include /* needed by powerpc-apple-darwin1.3.7 */ -#endif -" -ac_fn_c_check_member "$LINENO" "struct fsstat" "f_fstypename" "ac_cv_member_struct_fsstat_f_fstypename" "$getfsstat_includes -" -if test "x$ac_cv_member_struct_fsstat_f_fstypename" = x""yes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_FSSTAT_F_FSTYPENAME 1 -_ACEOF + : -fi -# Determine how to get the list of mounted file systems. -ac_list_mounted_fs= -# If the getmntent function is available but not in the standard library, -# make sure LIBS contains the appropriate -l option. -# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, -# -lseq on Dynix/PTX, -lgen on Unixware. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 -$as_echo_n "checking for library containing getmntent... " >&6; } -if test "${ac_cv_search_getmntent+set}" = set; then : - $as_echo_n "(cached) " >&6 + + + + ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include +" +if test "x$ac_cv_have_decl_isblank" = xyes; then : + ac_have_decl=1 else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + ac_have_decl=0 +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char getmntent (); -int -main () -{ -return getmntent (); - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISBLANK $ac_have_decl _ACEOF -for ac_lib in '' sun seq gen; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" + + fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_getmntent=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_getmntent+set}" = set; then : - break -fi -done -if test "${ac_cv_search_getmntent+set}" = set; then : -else - ac_cv_search_getmntent=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5 -$as_echo "$ac_cv_search_getmntent" >&6; } -ac_res=$ac_cv_search_getmntent -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -fi -for ac_func in getmntent + for ac_func in rewinddir do : - ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent" -if test "x$ac_cv_func_getmntent" = x""yes; then : + ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir" +if test "x$ac_cv_func_rewinddir" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_GETMNTENT 1 +#define HAVE_REWINDDIR 1 _ACEOF fi done + if test $ac_cv_func_rewinddir = no; then + HAVE_REWINDDIR=0 + fi + if test $HAVE_REWINDDIR = 0; then -# This test must precede the ones for getmntent because Unicos-9 is -# reported to have the getmntent function, but its support is incompatible -# with other getmntent implementations. - -# NOTE: Normally, I wouldn't use a check for system type as I've done for -# `CRAY' below since that goes against the whole autoconf philosophy. But -# I think there is too great a chance that some non-Cray system has a -# function named listmntent to risk the false positive. - -if test -z "$ac_list_mounted_fs"; then - # Cray UNICOS 9 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for listmntent of Cray/Unicos-9" >&5 -$as_echo_n "checking for listmntent of Cray/Unicos-9... " >&6; } - if test "${fu_cv_sys_mounted_cray_listmntent+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - fu_cv_sys_mounted_cray_listmntent=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef _CRAY -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - test $ac_cv_func_listmntent = yes \ - && fu_cv_sys_mounted_cray_listmntent=yes -fi -rm -f conftest* -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_cray_listmntent" >&5 -$as_echo "$fu_cv_sys_mounted_cray_listmntent" >&6; } - if test $fu_cv_sys_mounted_cray_listmntent = yes; then - ac_list_mounted_fs=found -$as_echo "#define MOUNTED_LISTMNTENT 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext" fi -fi - -if test -z "$ac_list_mounted_fs"; then - # AIX. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mntctl function and struct vmount" >&5 -$as_echo_n "checking for mntctl function and struct vmount... " >&6; } - if test "${fu_cv_sys_mounted_vmount+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - fu_cv_sys_mounted_vmount=yes -else - fu_cv_sys_mounted_vmount=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_vmount" >&5 -$as_echo "$fu_cv_sys_mounted_vmount" >&6; } - if test $fu_cv_sys_mounted_vmount = yes; then - ac_list_mounted_fs=found -$as_echo "#define MOUNTED_VMOUNT 1" >>confdefs.h - - fi -fi -if test $ac_cv_func_getmntent = yes; then - # This system has the getmntent function. - # Determine whether it's the one-argument variant or the two-argument one. - if test -z "$ac_list_mounted_fs"; then - # 4.3BSD, SunOS, HP-UX, Dynix, Irix - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for one-argument getmntent function" >&5 -$as_echo_n "checking for one-argument getmntent function... " >&6; } - if test "${fu_cv_sys_mounted_getmntent1+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ -#include + GNULIB_REWINDDIR=1 -#include -#if !defined MOUNTED -# if defined _PATH_MOUNTED /* GNU libc */ -# define MOUNTED _PATH_MOUNTED -# endif -# if defined MNT_MNTTAB /* HP-UX. */ -# define MOUNTED MNT_MNTTAB -# endif -# if defined MNTTABNAME /* Dynix. */ -# define MOUNTED MNTTABNAME -# endif -#endif -int -main () -{ - struct mntent *mnt = 0; char *table = MOUNTED; - if (sizeof mnt && sizeof table) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - fu_cv_sys_mounted_getmntent1=yes -else - fu_cv_sys_mounted_getmntent1=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent1" >&5 -$as_echo "$fu_cv_sys_mounted_getmntent1" >&6; } - if test $fu_cv_sys_mounted_getmntent1 = yes; then - ac_list_mounted_fs=found -$as_echo "#define MOUNTED_GETMNTENT1 1" >>confdefs.h - fi - fi +$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h - if test -z "$ac_list_mounted_fs"; then - # SVR4 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument getmntent function" >&5 -$as_echo_n "checking for two-argument getmntent function... " >&6; } - if test "${fu_cv_sys_mounted_getmntent2+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "getmntent" >/dev/null 2>&1; then : - fu_cv_sys_mounted_getmntent2=yes -else - fu_cv_sys_mounted_getmntent2=no -fi -rm -f conftest* -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent2" >&5 -$as_echo "$fu_cv_sys_mounted_getmntent2" >&6; } - if test $fu_cv_sys_mounted_getmntent2 = yes; then - ac_list_mounted_fs=found -$as_echo "#define MOUNTED_GETMNTENT2 1" >>confdefs.h - for ac_func in hasmntopt -do : - ac_fn_c_check_func "$LINENO" "hasmntopt" "ac_cv_func_hasmntopt" -if test "x$ac_cv_func_hasmntopt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_HASMNTOPT 1 -_ACEOF + : -fi -done - fi - fi -fi -if test -z "$ac_list_mounted_fs"; then - # DEC Alpha running OSF/1, and Apple Darwin 1.3. - # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getfsstat function" >&5 -$as_echo_n "checking for getfsstat function... " >&6; } - if test "${fu_cv_sys_mounted_getfsstat+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5 +$as_echo_n "checking whether rmdir works... " >&6; } +if ${gl_cv_func_rmdir_works+:} false; then : $as_echo_n "(cached) " >&6 else + mkdir conftest.dir + touch conftest.file + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rmdir_works="guessing no" ;; + esac + +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME -# define FS_TYPE(Ent) ((Ent).f_fstypename) -#else -# define FS_TYPE(Ent) mnt_names[(Ent).f_type] -#endif -$getfsstat_includes +#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + #endif int main () { -struct statfs *stats; - int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); - char *t = FS_TYPE (*stats); +int result = 0; + if (!rmdir ("conftest.file/")) + result |= 1; + else if (errno != ENOTDIR) + result |= 2; + if (!rmdir ("conftest.dir/./")) + result |= 4; + return result; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - fu_cv_sys_mounted_getfsstat=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_rmdir_works=yes else - fu_cv_sys_mounted_getfsstat=no + gl_cv_func_rmdir_works=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getfsstat" >&5 -$as_echo "$fu_cv_sys_mounted_getfsstat" >&6; } - if test $fu_cv_sys_mounted_getfsstat = yes; then - ac_list_mounted_fs=found - -$as_echo "#define MOUNTED_GETFSSTAT 1" >>confdefs.h - - fi + rm -rf conftest.dir conftest.file fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5 +$as_echo "$gl_cv_func_rmdir_works" >&6; } + case "$gl_cv_func_rmdir_works" in + *yes) ;; + *) + REPLACE_RMDIR=1 + ;; + esac -if test -z "$ac_list_mounted_fs"; then - # SVR3 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIXME existence of three headers" >&5 -$as_echo_n "checking for FIXME existence of three headers... " >&6; } - if test "${fu_cv_sys_mounted_fread_fstyp+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + if test $REPLACE_RMDIR = 1; then -#include -#include -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - fu_cv_sys_mounted_fread_fstyp=yes -else - fu_cv_sys_mounted_fread_fstyp=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread_fstyp" >&5 -$as_echo "$fu_cv_sys_mounted_fread_fstyp" >&6; } - if test $fu_cv_sys_mounted_fread_fstyp = yes; then - ac_list_mounted_fs=found -$as_echo "#define MOUNTED_FREAD_FSTYP 1" >>confdefs.h - fi -fi -if test -z "$ac_list_mounted_fs"; then - # 4.4BSD and DEC OSF/1. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmntinfo function" >&5 -$as_echo_n "checking for getmntinfo function... " >&6; } - if test "${fu_cv_sys_mounted_getmntinfo+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - test "$ac_cv_func_getmntinfo" = yes \ - && fu_cv_sys_mounted_getmntinfo=yes \ - || fu_cv_sys_mounted_getmntinfo=no -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo" >&5 -$as_echo "$fu_cv_sys_mounted_getmntinfo" >&6; } - if test $fu_cv_sys_mounted_getmntinfo = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getmntinfo returns statvfs structures" >&5 -$as_echo_n "checking whether getmntinfo returns statvfs structures... " >&6; } - if test "${fu_cv_sys_mounted_getmntinfo2+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + fi -#if HAVE_SYS_PARAM_H -# include -#endif -#include -#if HAVE_SYS_MOUNT_H -# include -#endif -#if HAVE_SYS_STATVFS_H -# include -#endif -extern int getmntinfo (struct statfs **, int); -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - fu_cv_sys_mounted_getmntinfo2=no -else - fu_cv_sys_mounted_getmntinfo2=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo2" >&5 -$as_echo "$fu_cv_sys_mounted_getmntinfo2" >&6; } - if test $fu_cv_sys_mounted_getmntinfo2 = no; then - ac_list_mounted_fs=found + GNULIB_RMDIR=1 -$as_echo "#define MOUNTED_GETMNTINFO 1" >>confdefs.h - else - ac_list_mounted_fs=found -$as_echo "#define MOUNTED_GETMNTINFO2 1" >>confdefs.h - fi - fi -fi -if test -z "$ac_list_mounted_fs"; then - # Ultrix - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmnt function" >&5 -$as_echo_n "checking for getmnt function... " >&6; } - if test "${fu_cv_sys_mounted_getmnt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h + -#include -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - fu_cv_sys_mounted_getmnt=yes -else - fu_cv_sys_mounted_getmnt=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmnt" >&5 -$as_echo "$fu_cv_sys_mounted_getmnt" >&6; } - if test $fu_cv_sys_mounted_getmnt = yes; then - ac_list_mounted_fs=found -$as_echo "#define MOUNTED_GETMNT 1" >>confdefs.h - fi -fi -if test -z "$ac_list_mounted_fs"; then - # BeOS - for ac_func in next_dev fs_stat_dev + + for ac_func in rpmatch do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch" +if test "x$ac_cv_func_rpmatch" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_RPMATCH 1 _ACEOF fi done - for ac_header in fs_info.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "fs_info.h" "ac_cv_header_fs_info_h" "$ac_includes_default" -if test "x$ac_cv_header_fs_info_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FS_INFO_H 1 -_ACEOF + if test $ac_cv_func_rpmatch = no; then + HAVE_RPMATCH=0 + fi -fi + if test $HAVE_RPMATCH = 0; then -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BEOS mounted file system support functions" >&5 -$as_echo_n "checking for BEOS mounted file system support functions... " >&6; } - if test $ac_cv_header_fs_info_h = yes \ - && test $ac_cv_func_next_dev = yes \ - && test $ac_cv_func_fs_stat_dev = yes; then - fu_result=yes - else - fu_result=no - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_result" >&5 -$as_echo "$fu_result" >&6; } - if test $fu_result = yes; then - ac_list_mounted_fs=found -$as_echo "#define MOUNTED_FS_STAT_DEV 1" >>confdefs.h - fi -fi -if test -z "$ac_list_mounted_fs"; then - # SVR2 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to resort to fread on /etc/mnttab" >&5 -$as_echo_n "checking whether it is possible to resort to fread on /etc/mnttab... " >&6; } - if test "${fu_cv_sys_mounted_fread+set}" = set; then : + + + + gl_LIBOBJS="$gl_LIBOBJS rpmatch.$ac_objext" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5 +$as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; } +if ${gl_cv_langinfo_yesexpr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include +int +main () +{ +char* cs = nl_langinfo(YESEXPR); return !cs; + ; + return 0; +} _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - fu_cv_sys_mounted_fread=yes +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_langinfo_yesexpr=yes else - fu_cv_sys_mounted_fread=no + gl_cv_langinfo_yesexpr=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5 +$as_echo "$gl_cv_langinfo_yesexpr" >&6; } + if test $gl_cv_langinfo_yesexpr = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread" >&5 -$as_echo "$fu_cv_sys_mounted_fread" >&6; } - if test $fu_cv_sys_mounted_fread = yes; then - ac_list_mounted_fs=found +$as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h -$as_echo "#define MOUNTED_FREAD 1" >>confdefs.h + fi fi -fi -if test -z "$ac_list_mounted_fs"; then - # Interix / BSD alike statvfs - # the code is really interix specific, so make sure, we're on it. - case "$host" in - *-interix*) - for ac_func in statvfs -do : - ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs" -if test "x$ac_cv_func_statvfs" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STATVFS 1 -_ACEOF -fi -done - if test $ac_cv_func_statvfs = yes; then - ac_list_mounted_fs=found -$as_echo "#define MOUNTED_INTERIX_STATVFS 1" >>confdefs.h - fi - ;; - esac -fi + GNULIB_RPMATCH=1 -if test -z "$ac_list_mounted_fs"; then - as_fn_error $? "could not determine how to read list of mounted file systems" "$LINENO" 5 - # FIXME -- no need to abort building the whole package - # Can't build mountlist.c or anything that needs its functions -fi -if test $ac_list_mounted_fs = found; then : - gl_cv_list_mounted_fs=yes -else - gl_cv_list_mounted_fs=no -fi - if test $gl_cv_list_mounted_fs = yes; then +$as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h @@ -25741,15 +33402,33 @@ fi - gl_LIBOBJS="$gl_LIBOBJS mountlist.$ac_objext" - for ac_header in sys/mntent.h + : + + + + + + + + + : + + + + + + + + : + + for ac_header in selinux/flask.h do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/mntent.h" "ac_cv_header_sys_mntent_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mntent_h" = x""yes; then : + ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default" +if test "x$ac_cv_header_selinux_flask_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_MNTENT_H 1 +#define HAVE_SELINUX_FLASK_H 1 _ACEOF fi @@ -25757,28 +33436,36 @@ fi done - ac_fn_c_check_member "$LINENO" "struct statfs" "f_fstypename" "ac_cv_member_struct_statfs_f_fstypename" " - #include - #include - #include -" -if test "x$ac_cv_member_struct_statfs_f_fstypename" = x""yes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1 -_ACEOF + + + + gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext" + + + + if test "$with_selinux" != no; then + for ac_header in selinux/selinux.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" +if test "x$ac_cv_header_selinux_selinux_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SELINUX_SELINUX_H 1 +_ACEOF + fi +done - fi + if test "$ac_cv_header_selinux_selinux_h" = yes; then + # We do have , so do compile getfilecon.c + # and arrange to use its wrappers. - # Code from module multiarch: - # Code from module nl_langinfo: @@ -25789,242 +33476,468 @@ fi - if test $ac_cv_func_nl_langinfo = yes; then - # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5 -$as_echo_n "checking whether YESEXPR works... " >&6; } -if test "${gl_cv_func_nl_langinfo_yesexpr_works+set}" = set; then : + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_selinux_selinux_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess no on irix systems. - irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; - # Guess yes elsewhere. - *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; - esac + if test $ac_cv_header_selinux_selinux_h = yes; then + + + -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'selinux/selinux.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_selinux_selinux_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_selinux_selinux_h + gl_cv_next_selinux_selinux_h='"'$gl_header'"' + else + gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>' + fi -int -main () -{ -return !*nl_langinfo(YESEXPR); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_nl_langinfo_yesexpr_works=yes -else - gl_cv_func_nl_langinfo_yesexpr_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5 +$as_echo "$gl_cv_next_selinux_selinux_h" >&6; } + fi + NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'selinux/selinux.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h + fi + NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5 -$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; } - case $gl_cv_func_nl_langinfo_yesexpr_works in - *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; - *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; - esac -cat >>confdefs.h <<_ACEOF -#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS -_ACEOF - if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ - && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then - : - else - REPLACE_NL_LANGINFO=1 -$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h +$as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h + + +$as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h +$as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h + + fi + case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in + no:*) # already warned + ;; + *:no) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5 +$as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU findutils will be compiled without SELinux support." >&5 +$as_echo "$as_me: WARNING: GNU findutils will be compiled without SELinux support." >&2;} + esac + else + # Do as if does not exist, even if + # AC_CHECK_HEADERS_ONCE has already determined that it exists. + $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h + fi + if test "$with_selinux" != no; then + for ac_header in selinux/context.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default" +if test "x$ac_cv_header_selinux_context_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SELINUX_CONTEXT_H 1 +_ACEOF + SELINUX_CONTEXT_H= +else + SELINUX_CONTEXT_H=selinux/context.h +fi - gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" +done - fi else - HAVE_NL_LANGINFO=0 + SELINUX_CONTEXT_H=selinux/context.h + fi + + if test -n "$SELINUX_CONTEXT_H"; then + GL_GENERATE_SELINUX_CONTEXT_H_TRUE= + GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#' +else + GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#' + GL_GENERATE_SELINUX_CONTEXT_H_FALSE= +fi + if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then - gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" + + + gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext" fi + if test $ac_cv_func_setenv = no; then + HAVE_SETENV=0 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5 +$as_echo_n "checking whether setenv validates arguments... " >&6; } +if ${gl_cv_func_setenv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_setenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_setenv_works="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + #include + #include - GNULIB_NL_LANGINFO=1 +int +main () +{ + int result = 0; + { + if (setenv ("", "", 0) != -1) + result |= 1; + else if (errno != EINVAL) + result |= 2; + } + { + if (setenv ("a", "=", 1) != 0) + result |= 4; + else if (strcmp (getenv ("a"), "=") != 0) + result |= 8; + } + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_setenv_works=yes +else + gl_cv_func_setenv_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5 +$as_echo "$gl_cv_func_setenv_works" >&6; } + case "$gl_cv_func_setenv_works" in + *yes) ;; + *) + REPLACE_SETENV=1 + ;; + esac + fi + if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then - # Code from module open: - case "$host_os" in - mingw* | pw*) - REPLACE_OPEN=1 + gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" + fi - gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" + GNULIB_SETENV=1 - : +$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h - ;; - *) - : + for ac_header in stdint.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H 1 +_ACEOF +fi +done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 -$as_echo_n "checking whether open recognizes a trailing slash... " >&6; } -if test "${gl_cv_func_open_slash+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 +$as_echo_n "checking for SIZE_MAX... " >&6; } +if ${gl_cv_size_max+:} false; then : $as_echo_n "(cached) " >&6 else - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - touch conftest.tmp - ln -s conftest.tmp conftest.lnk - fi - if test "$cross_compiling" = yes; then : - case "$host_os" in - freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) - gl_cv_func_open_slash="guessing no" ;; - *) - gl_cv_func_open_slash="guessing yes" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gl_cv_size_max= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#if HAVE_UNISTD_H -# include +#include +#if HAVE_STDINT_H +#include #endif -int main () -{ - int result = 0; -#if HAVE_LSTAT - if (open ("conftest.lnk/", O_RDONLY) != -1) - result |= 1; +#ifdef SIZE_MAX +Found it #endif - if (open ("conftest.sl/", O_CREAT, 0600) >= 0) - result |= 2; - return result; -} + _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_open_slash=yes -else - gl_cv_func_open_slash=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Found it" >/dev/null 2>&1; then : + gl_cv_size_max=yes fi +rm -f conftest* - rm -f conftest.sl conftest.tmp conftest.lnk + if test -z "$gl_cv_size_max"; then + if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include +#include "; then : +else + size_t_bits_minus_1= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 -$as_echo "$gl_cv_func_open_slash" >&6; } - case "$gl_cv_func_open_slash" in - *no) - -$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h - + if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include "; then : - REPLACE_OPEN=1 - +else + fits_in_uint= +fi + if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then + if test $fits_in_uint = 1; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + extern size_t foo; + extern unsigned long foo; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + fits_in_uint=0 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $fits_in_uint = 1; then + gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" + else + gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" + fi + else + gl_cv_size_max='((size_t)~(size_t)0)' + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 +$as_echo "$gl_cv_size_max" >&6; } + if test "$gl_cv_size_max" != yes; then +cat >>confdefs.h <<_ACEOF +#define SIZE_MAX $gl_cv_size_max +_ACEOF + fi - gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" + gl_cv_func_snprintf_usable=no + for ac_func in snprintf +do : + ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" +if test "x$ac_cv_func_snprintf" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SNPRINTF 1 +_ACEOF - : +fi +done + if test $ac_cv_func_snprintf = yes; then - ;; - esac - ;; - esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 +$as_echo_n "checking whether snprintf respects a size of 1... " >&6; } +if ${gl_cv_func_snprintf_size1+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gl_cv_func_snprintf_size1="guessing yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - GNULIB_OPEN=1 +#include +#if HAVE_SNPRINTF +# define my_snprintf snprintf +#else +# include +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} +#endif +int main() +{ + static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; + my_snprintf (buf, 1, "%d", 12345); + return buf[1] != 'E'; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_snprintf_size1=yes +else + gl_cv_func_snprintf_size1=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5 +$as_echo "$gl_cv_func_snprintf_size1" >&6; } -$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h + case "$gl_cv_func_snprintf_size1" in + *yes) + case "$gl_cv_func_snprintf_retval_c99" in + *yes) - # Code from module openat: + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5 +$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } +if ${gl_cv_func_printf_positions+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : - GNULIB_OPENAT=1 + case "$host_os" in + netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) + gl_cv_func_printf_positions="guessing no";; + beos*) gl_cv_func_printf_positions="guessing no";; + mingw* | pw*) gl_cv_func_printf_positions="guessing no";; + *) gl_cv_func_printf_positions="guessing yes";; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - GNULIB_FCHMODAT=1 - GNULIB_FSTATAT=1 - GNULIB_MKDIRAT=1 +#include +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_printf_positions=yes +else + gl_cv_func_printf_positions=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - GNULIB_FCHOWNAT=1 - GNULIB_UNLINKAT=1 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5 +$as_echo "$gl_cv_func_printf_positions" >&6; } + case "$gl_cv_func_printf_positions" in + *yes) + gl_cv_func_snprintf_usable=yes + ;; + esac + ;; + esac + ;; + esac + fi + if test $gl_cv_func_snprintf_usable = no; then @@ -26033,34 +33946,47 @@ $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext" + if test $ac_cv_func_snprintf = yes; then + REPLACE_SNPRINTF=1 + fi : + fi + : + if test $ac_cv_have_decl_snprintf = no; then + HAVE_DECL_SNPRINTF=0 + fi + GNULIB_SNPRINTF=1 +$as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define GNULIB_SNPRINTF 1 +_ACEOF @@ -26068,230 +33994,406 @@ $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h + : - - - - - - - for ac_func in fchmodat fstatat mkdirat openat unlinkat + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_WINSOCK2_H 1 _ACEOF -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - fi -done - - - - - case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in - yes+yes) - # GNU/Hurd has unlinkat, but it has the same bug as unlink. - if test $REPLACE_UNLINK = 1; then - - - +done + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + LIBSOCKET= + if test $HAVE_WINSOCK2_H = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5 +$as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; } +if ${gl_cv_func_wsastartup+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" +#ifdef HAVE_WINSOCK2_H +# include +#endif +int +main () +{ - REPLACE_UNLINKAT=1 - fi ;; - yes+*) - # Solaris 9 has *at functions, but uniformly mishandles trailing - # slash in all of them. + WORD wVersionRequested = MAKEWORD(1, 1); + WSADATA wsaData; + int err = WSAStartup(wVersionRequested, &wsaData); + WSACleanup (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_wsastartup=yes +else + gl_cv_func_wsastartup=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gl_save_LIBS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5 +$as_echo "$gl_cv_func_wsastartup" >&6; } + if test "$gl_cv_func_wsastartup" = "yes"; then +$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h + LIBSOCKET='-lws2_32' + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 +$as_echo_n "checking for library containing setsockopt... " >&6; } +if ${gl_cv_lib_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + gl_cv_lib_socket= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : +else + gl_save_LIBS="$LIBS" + LIBS="$gl_save_LIBS -lsocket" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_lib_socket="-lsocket" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnetwork" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_lib_socket="-lnetwork" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnet" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern +#ifdef __cplusplus +"C" +#endif +char setsockopt(); +int +main () +{ +setsockopt(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_lib_socket="-lnet" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + fi + LIBS="$gl_save_LIBS" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test -z "$gl_cv_lib_socket"; then + gl_cv_lib_socket="none needed" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5 +$as_echo "$gl_cv_lib_socket" >&6; } + if test "$gl_cv_lib_socket" != "none needed"; then + LIBSOCKET="$gl_cv_lib_socket" + fi + fi - gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" - REPLACE_OPENAT=1 + : + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " +/* is not needed according to POSIX, but the + in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#if HAVE_SYS_SOCKET_H +# include +#elif HAVE_WS2TCPIP_H +# include +#endif +" +if test "x$ac_cv_type_socklen_t" = xyes; then : - gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 +$as_echo_n "checking for socklen_t equivalent... " >&6; } + if ${gl_cv_socklen_t_equiv+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + gl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t "unsigned int" "long int" "unsigned long int"; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include - REPLACE_FSTATAT=1 + int getpeername (int, $arg2 *, $t *); +int +main () +{ +$t len; + getpeername (0, 0, &len); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_socklen_t_equiv="$t" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done +fi + if test "$gl_cv_socklen_t_equiv" = ""; then + as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 +$as_echo "$gl_cv_socklen_t_equiv" >&6; } +cat >>confdefs.h <<_ACEOF +#define socklen_t $gl_cv_socklen_t_equiv +_ACEOF +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 +$as_echo_n "checking for ssize_t... " >&6; } +if ${gt_cv_ssize_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int x = sizeof (ssize_t *) + sizeof (ssize_t); + return !x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_ssize_t=yes +else + gt_cv_ssize_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 +$as_echo "$gt_cv_ssize_t" >&6; } + if test $gt_cv_ssize_t = no; then +$as_echo "#define ssize_t int" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + fi - REPLACE_UNLINKAT=1 - ;; - *) - HAVE_OPENAT=0 - HAVE_UNLINKAT=0 # No known system with unlinkat but not openat - HAVE_FSTATAT=0 # No known system with fstatat but not openat : -;; - esac - if test $ac_cv_func_fchmodat != yes; then - HAVE_FCHMODAT=0 - fi - if test $ac_cv_func_mkdirat != yes; then - HAVE_MKDIRAT=0 - fi - ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat" -if test "x$ac_cv_func_fchownat" = x""yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 -$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; } -if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 +$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } +if ${gl_cv_func_stat_dir_slash+:} false; then : $as_echo_n "(cached) " >&6 else - - gl_dangle=conftest.dangle - # Remove any remnants of a previous test. - rm -f $gl_dangle - # Arrange for deletion of the temporary file this test creates. - ac_clean_files="$ac_clean_files $gl_dangle" - ln -s conftest.no-such $gl_dangle - if test "$cross_compiling" = yes; then : - gl_cv_func_fchownat_nofollow_works=no + if test "$cross_compiling" = yes; then : + case $host_os in + mingw*) gl_cv_func_stat_dir_slash="guessing no";; + *) gl_cv_func_stat_dir_slash="guessing yes";; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -#include -#include -#include -#include -#include int main () { - return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), - AT_SYMLINK_NOFOLLOW) != 0 - && errno == ENOENT); +struct stat st; return stat (".", &st) != stat ("./", &st); + ; + return 0; } - _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fchownat_nofollow_works=yes + gl_cv_func_stat_dir_slash=yes else - gl_cv_func_fchownat_nofollow_works=no + gl_cv_func_stat_dir_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5 -$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; } - if test $gl_cv_func_fchownat_nofollow_works = no; then : - REPLACE_FCHOWNAT=1 - -$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h - - fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5 -$as_echo_n "checking whether fchownat works with an empty file name... " >&6; } -if test "${gl_cv_func_fchownat_empty_filename_works+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 +$as_echo "$gl_cv_func_stat_dir_slash" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 +$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } +if ${gl_cv_func_stat_file_slash+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - gl_cv_func_fchownat_empty_filename_works="guessing no" + touch conftest.tmp + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.tmp conftest.lnk + fi + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_stat_file_slash="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include +#include int main () { -int fd; - int ret; - if (mkdir ("conftestdir", 0700) < 0) - return 2; - fd = open ("conftestdir", O_RDONLY); - if (fd < 0) - return 3; - ret = fchownat (fd, "", -1, -1, 0); - close (fd); - rmdir ("conftestdir"); - return ret == 0; +int result = 0; + struct stat st; + if (!stat ("conftest.tmp/", &st)) + result |= 1; +#if HAVE_LSTAT + if (!stat ("conftest.lnk/", &st)) + result |= 2; +#endif + return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_fchownat_empty_filename_works=yes + gl_cv_func_stat_file_slash=yes else - gl_cv_func_fchownat_empty_filename_works=no + gl_cv_func_stat_file_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - + rm -f conftest.tmp conftest.lnk fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5 -$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; } - if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then : - REPLACE_FCHOWNAT=1 - -$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 +$as_echo "$gl_cv_func_stat_file_slash" >&6; } + case $gl_cv_func_stat_dir_slash in + *no) REPLACE_STAT=1 -fi +$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h +;; + esac + case $gl_cv_func_stat_file_slash in + *no) REPLACE_STAT=1 - if test $REPLACE_CHOWN = 1; then - REPLACE_FCHOWNAT=1 - fi -else - HAVE_FCHOWNAT=0 -fi +$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h +;; + esac - if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then + if test $REPLACE_STAT = 1; then @@ -26300,267 +34402,226 @@ fi - gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" + : fi - # Code from module openat-die: - # Code from module openat-safer: - + GNULIB_STAT=1 +$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS openat-safer.$ac_objext" + # Don't call AC_STRUCT_ST_BLOCKS because it causes bugs. Details at + # http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00051.html -cat >>confdefs.h <<_ACEOF -#define GNULIB_OPENAT_SAFER 1 -_ACEOF + : - # Code from module parse-datetime: - ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include -#include <$ac_cv_struct_tm> -" -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : + : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM_TM_ZONE 1 -_ACEOF -fi -if test "$ac_cv_member_struct_tm_tm_zone" = yes; then -$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h -else - ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include + #include " -if test "x$ac_cv_have_decl_tzname" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi +if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TZNAME $ac_have_decl +#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 -$as_echo_n "checking for tzname... " >&6; } -if test "${ac_cv_var_tzname+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 +$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } +if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#if !HAVE_DECL_TZNAME -extern char *tzname[]; -#endif + + #include + #include + #if HAVE_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; int main () { -return tzname[0][0]; + + st.st_atim = ts; + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_tzname=yes -else - ac_cv_var_tzname=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 -$as_echo "$ac_cv_var_tzname" >&6; } - if test $ac_cv_var_tzname = yes; then - -$as_echo "#define HAVE_TZNAME 1" >>confdefs.h - - fi -fi - - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include /* for time_t */ -#include /* for CHAR_BIT, LONG_MIN, LONG_MAX */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1]; -typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1]; - -_ACEOF if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h - - + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes +else + ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 +$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then - # Code from module pathmax: - - - : - - - - - - - : - - - - - - - # Code from module perror: - - - - if test -n "$ERRNO_H"; then - REPLACE_PERROR=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext" - - fi - - - - - GNULIB_PERROR=1 - - - -$as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h - - +$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h - # Code from module progname: - ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include -" -if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then : - ac_have_decl=1 + fi else - ac_have_decl=0 -fi + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl +#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 _ACEOF - ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include -" -if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then : - ac_have_decl=1 + else - ac_have_decl=0 -fi + ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl +#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 _ACEOF - # Code from module quote: - - - - +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 +_ACEOF +fi - gl_LIBOBJS="$gl_LIBOBJS quote.$ac_objext" - - - - # Code from module quotearg: - +fi +fi +fi + : - gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext" - # Code from module quotearg-simple: - # Code from module readlink: + ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then : - : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 +_ACEOF +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 +_ACEOF - if test $ac_cv_func_readlink = no; then - HAVE_READLINK=0 +else + ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include + #include +" +if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 +_ACEOF +fi +fi +fi - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" +cat >>confdefs.h <<_ACEOF +#define GNULIB_STATAT 1 +_ACEOF - : - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 -$as_echo_n "checking whether readlink signature is correct... " >&6; } -if test "${gl_cv_decl_readlink_works+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 +$as_echo_n "checking for working stdalign.h... " >&6; } +if ${gl_cv_header_working_stdalign_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - /* Cause compilation failure if original declaration has wrong type. */ - ssize_t readlink (const char *, char *, size_t); +#include + #include + + /* Test that alignof yields a result consistent with offsetof. + This catches GCC bug 52023 + . */ + #ifdef __cplusplus + template struct alignof_helper { char a; t b; }; + # define ao(type) offsetof (alignof_helper, b) + #else + # define ao(type) offsetof (struct { char a; type b; }, b) + #endif + char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; + char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; + char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; + + /* Test _Alignas only on platforms where gnulib can help. */ + #if \ + ((defined __cplusplus && 201103 <= __cplusplus) \ + || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ + || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) + struct alignas_test { char c; char alignas (8) alignas_8; }; + char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 + ? 1 : -1]; + #endif + int main () { @@ -26570,187 +34631,291 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_readlink_works=yes + gl_cv_header_working_stdalign_h=yes else - gl_cv_decl_readlink_works=no + gl_cv_header_working_stdalign_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 -$as_echo "$gl_cv_decl_readlink_works" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 -$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } -if test "${gl_cv_func_readlink_works+set}" = set; then : - $as_echo_n "(cached) " >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5 +$as_echo "$gl_cv_header_working_stdalign_h" >&6; } + + if test $gl_cv_header_working_stdalign_h = yes; then + STDALIGN_H='' + else + STDALIGN_H='stdalign.h' + fi + + + if test -n "$STDALIGN_H"; then + GL_GENERATE_STDALIGN_H_TRUE= + GL_GENERATE_STDALIGN_H_FALSE='#' else - # We have readlink, so assume ln -s works. - ln -s conftest.no-such conftest.link - ln -s conftest.link conftest.lnk2 - if test "$cross_compiling" = yes; then : - gl_cv_func_readlink_works="guessing no" + GL_GENERATE_STDALIGN_H_TRUE='#' + GL_GENERATE_STDALIGN_H_FALSE= +fi + + + + STDARG_H='' + NEXT_STDARG_H='' + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 +$as_echo_n "checking for va_copy... " >&6; } + if ${gl_cv_func_va_copy+:} false; then : + $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main () { -char buf[20]; - return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; + +#ifndef va_copy +void (*func) (va_list, va_list) = va_copy; +#endif + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_readlink_works=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_va_copy=yes else - gl_cv_func_readlink_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gl_cv_func_va_copy=no fi - - rm -f conftest.link conftest.lnk2 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 -$as_echo "$gl_cv_func_readlink_works" >&6; } - if test "$gl_cv_func_readlink_works" != yes; then - -$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h - - REPLACE_READLINK=1 - - - - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 +$as_echo "$gl_cv_func_va_copy" >&6; } + if test $gl_cv_func_va_copy = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined _AIX && !defined __GNUC__ + AIX vaccine + #endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "vaccine" >/dev/null 2>&1; then : + gl_aixcc=yes +else + gl_aixcc=no +fi +rm -f conftest* + if test $gl_aixcc = yes; then + STDARG_H=stdarg.h - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - elif test "$gl_cv_decl_readlink_works" != yes; then - REPLACE_READLINK=1 + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdarg_h='<'stdarg.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_stdarg_h+:} false; then : + $as_echo_n "(cached) " >&6 +else - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - fi - fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'stdarg.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + gl_header=$gl_cv_absolute_stdarg_h + gl_cv_next_stdarg_h='"'$gl_header'"' - GNULIB_READLINK=1 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5 +$as_echo "$gl_cv_next_stdarg_h" >&6; } + fi + NEXT_STDARG_H=$gl_cv_next_stdarg_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdarg.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdarg_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive -$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h - # Code from module readlinkat: + if test "$gl_cv_next_stdarg_h" = '""'; then + gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' + NEXT_STDARG_H="$gl_cv_next_stdarg_h" + fi + else + saved_as_echo_n="$as_echo_n" + as_echo_n=':' + if ${gl_cv_func___va_copy+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#ifndef __va_copy +error, bail out +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func___va_copy=yes +else + gl_cv_func___va_copy=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi - : + as_echo_n="$saved_as_echo_n" + if test $gl_cv_func___va_copy = yes; then +$as_echo "#define va_copy __va_copy" >>confdefs.h + else - if test $ac_cv_func_readlinkat = no; then - HAVE_READLINKAT=0 +$as_echo "#define va_copy gl_va_copy" >>confdefs.h + fi + fi + fi + if test -n "$STDARG_H"; then + GL_GENERATE_STDARG_H_TRUE= + GL_GENERATE_STDARG_H_FALSE='#' +else + GL_GENERATE_STDARG_H_TRUE='#' + GL_GENERATE_STDARG_H_FALSE= +fi - gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext" + # Define two additional variables used in the Makefile substitution. + if test "$ac_cv_header_stdbool_h" = yes; then + STDBOOL_H='' + else + STDBOOL_H='stdbool.h' fi + if test -n "$STDBOOL_H"; then + GL_GENERATE_STDBOOL_H_TRUE= + GL_GENERATE_STDBOOL_H_FALSE='#' +else + GL_GENERATE_STDBOOL_H_TRUE='#' + GL_GENERATE_STDBOOL_H_FALSE= +fi - - GNULIB_READLINKAT=1 - - - -$as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h - - - - # Code from module realloc: - # Code from module realloc-gnu: + if test "$ac_cv_type__Bool" = yes; then + HAVE__BOOL=1 + else + HAVE__BOOL=0 + fi - for ac_header in stdlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF -fi -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 -$as_echo_n "checking for GNU libc compatible realloc... " >&6; } -if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then : + STDDEF_H= + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 +$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } +if ${gl_cv_decl_null_works+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - ac_cv_func_realloc_0_nonnull=no -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif +#include + int test[2 * (sizeof NULL == sizeof (void *)) -1]; int main () { -return ! realloc (0, 0); + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_realloc_0_nonnull=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_decl_null_works=yes else - ac_cv_func_realloc_0_nonnull=no + gl_cv_decl_null_works=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 +$as_echo "$gl_cv_decl_null_works" >&6; } + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + STDDEF_H=stddef.h + fi + if test -n "$STDDEF_H"; then + GL_GENERATE_STDDEF_H_TRUE= + GL_GENERATE_STDDEF_H_FALSE='#' +else + GL_GENERATE_STDDEF_H_TRUE='#' + GL_GENERATE_STDDEF_H_FALSE= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes; then : -$as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h + if test -n "$STDDEF_H"; then -else - $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h @@ -26758,325 +34923,448 @@ else + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stddef_h='<'stddef.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_stddef_h+:} false; then : + $as_echo_n "(cached) " >&6 +else - gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'stddef.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` - REPLACE_REALLOC=1 + gl_header=$gl_cv_absolute_stddef_h + gl_cv_next_stddef_h='"'$gl_header'"' fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 +$as_echo "$gl_cv_next_stddef_h" >&6; } + fi + NEXT_STDDEF_H=$gl_cv_next_stddef_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stddef.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stddef_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive -cat >>confdefs.h <<_ACEOF -#define GNULIB_REALLOC_GNU 1 -_ACEOF + fi + - # Code from module realloc-posix: - if test $gl_cv_func_malloc_posix = yes; then -$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h - else + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdio_h='<'stdio.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_stdio_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'stdio.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + gl_header=$gl_cv_absolute_stdio_h + gl_cv_next_stdio_h='"'$gl_header'"' - gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" - REPLACE_REALLOC=1 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 +$as_echo "$gl_cv_next_stdio_h" >&6; } + fi + NEXT_STDIO_H=$gl_cv_next_stdio_h - fi + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdio.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdio_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive - GNULIB_REALLOC_POSIX=1 + GNULIB_FSCANF=1 -$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define GNULIB_FSCANF 1 +_ACEOF + GNULIB_SCANF=1 - # Code from module regex: +cat >>confdefs.h <<_ACEOF +#define GNULIB_SCANF 1 +_ACEOF -# Check whether --with-included-regex was given. -if test "${with_included_regex+set}" = set; then : - withval=$with_included_regex; -fi + GNULIB_FGETC=1 + GNULIB_GETC=1 + GNULIB_GETCHAR=1 + GNULIB_FGETS=1 + GNULIB_FREAD=1 - case $with_included_regex in #( - yes|no) ac_use_included_regex=$with_included_regex - ;; - '') - # If the system regex support is good enough that it passes the - # following run test, then default to *not* using the included regex.c. - # If cross compiling, assume the test would fail and use the included - # regex.c. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5 -$as_echo_n "checking for working re_compile_pattern... " >&6; } -if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then : + + GNULIB_FPRINTF=1 + GNULIB_PRINTF=1 + GNULIB_VFPRINTF=1 + GNULIB_VPRINTF=1 + GNULIB_FPUTC=1 + GNULIB_PUTC=1 + GNULIB_PUTCHAR=1 + GNULIB_FPUTS=1 + GNULIB_PUTS=1 + GNULIB_FWRITE=1 + + + + + for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - gl_cv_func_re_compile_pattern_working=no -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - #include - #include - #include +#include int main () { -int result = 0; - static struct re_pattern_buffer regex; - unsigned char folded_chars[UCHAR_MAX + 1]; - int i; - const char *s; - struct re_registers regs; +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF - /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html - This test needs valgrind to catch the bug on Debian - GNU/Linux 3.1 x86, but it might catch the bug better - on other platforms and it shouldn't hurt to try the - test here. */ - if (setlocale (LC_ALL, "en_US.UTF-8")) - { - static char const pat[] = "insert into"; - static char const data[] = - "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; - re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE - | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern (pat, sizeof pat - 1, ®ex); - if (s) - result |= 1; - else if (re_search (®ex, data, sizeof data - 1, - 0, sizeof data - 1, ®s) - != -1) - result |= 1; - if (! setlocale (LC_ALL, "C")) - return 1; - } + eval ac_cv_have_decl_$gl_func=yes +fi + done - /* This test is from glibc bug 3957, reported by Andrew Mackey. */ - re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("a[^x]b", 6, ®ex); - if (s) - result |= 2; - /* This should fail, but succeeds for glibc-2.5. */ - else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) - result |= 2; - /* This regular expression is from Spencer ere test number 75 - in grep-2.3. */ - re_set_syntax (RE_SYNTAX_POSIX_EGREP); - memset (®ex, 0, sizeof regex); - for (i = 0; i <= UCHAR_MAX; i++) - folded_chars[i] = i; - regex.translate = folded_chars; - s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); - /* This should fail with _Invalid character class name_ error. */ - if (!s) - result |= 4; - /* Ensure that [b-a] is diagnosed as invalid, when - using RE_NO_EMPTY_RANGES. */ - re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("a[b-a]", 6, ®ex); - if (s == 0) - result |= 8; - /* This should succeed, but does not for glibc-2.1.3. */ - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("{1", 2, ®ex); - if (s) - result |= 8; - /* The following example is derived from a problem report - against gawk from Jorge Stolfi . */ - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("[an\371]*n", 7, ®ex); - if (s) - result |= 8; - /* This should match, but does not for glibc-2.2.1. */ - else if (re_match (®ex, "an", 2, 0, ®s) != 2) - result |= 8; - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - result |= 8; - /* glibc-2.2.93 does not work with a negative RANGE argument. */ - else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) - result |= 8; - /* The version of regex.c in older versions of gnulib - ignored RE_ICASE. Detect that problem too. */ - re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - result |= 16; - else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) - result |= 16; - /* Catch a bug reported by Vin Shelton in - http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html - */ - re_set_syntax (RE_SYNTAX_POSIX_BASIC - & ~RE_CONTEXT_INVALID_DUP - & ~RE_NO_EMPTY_RANGES); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); - if (s) - result |= 32; - /* REG_STARTEND was added to glibc on 2004-01-15. - Reject older versions. */ - if (! REG_STARTEND) - result |= 64; -#if 0 - /* It would be nice to reject hosts whose regoff_t values are too - narrow (including glibc on hosts with 64-bit ptrdiff_t and - 32-bit int), but we should wait until glibc implements this - feature. Otherwise, support for equivalence classes and - multibyte collation symbols would always be broken except - when compiling --without-included-regex. */ - if (sizeof (regoff_t) < sizeof (ptrdiff_t) - || sizeof (regoff_t) < sizeof (ssize_t)) - result |= 64; -#endif - return result; + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdlib_h='<'stdlib.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_stdlib_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'stdlib.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_stdlib_h + gl_cv_next_stdlib_h='"'$gl_header'"' + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 +$as_echo "$gl_cv_next_stdlib_h" >&6; } + fi + NEXT_STDLIB_H=$gl_cv_next_stdlib_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'stdlib.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_stdlib_h + fi + NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive + + + + + + + for gl_func in _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 secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_SYS_LOADAVG_H +# include +#endif +#if HAVE_RANDOM_H +# include +#endif + +int +main () +{ +#undef $gl_func + (void) $gl_func; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_re_compile_pattern_working=yes +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" else - gl_cv_func_re_compile_pattern_working=no + eval "$as_gl_Symbol=no" fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + eval ac_cv_have_decl_$gl_func=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5 -$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; } - case $gl_cv_func_re_compile_pattern_working in #( - yes) ac_use_included_regex=no;; #( - no) ac_use_included_regex=yes;; - esac - ;; - *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5 - ;; - esac - - if test $ac_use_included_regex = yes; then - -$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h - - -$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h + done -$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h -$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h -$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h -$as_echo "#define re_search rpl_re_search" >>confdefs.h + for ac_func in stpcpy +do : + ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" +if test "x$ac_cv_func_stpcpy" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STPCPY 1 +_ACEOF +fi +done -$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h + if test $ac_cv_func_stpcpy = no; then + HAVE_STPCPY=0 + fi + if test $HAVE_STPCPY = 0; then -$as_echo "#define re_match rpl_re_match" >>confdefs.h -$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h -$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h -$as_echo "#define re_comp rpl_re_comp" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext" -$as_echo "#define re_exec rpl_re_exec" >>confdefs.h + : -$as_echo "#define regcomp rpl_regcomp" >>confdefs.h + fi -$as_echo "#define regexec rpl_regexec" >>confdefs.h -$as_echo "#define regerror rpl_regerror" >>confdefs.h + GNULIB_STPCPY=1 -$as_echo "#define regfree rpl_regfree" >>confdefs.h +$as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext" + for ac_func in strcasecmp +do : + ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRCASECMP 1 +_ACEOF +fi +done + if test $ac_cv_func_strcasecmp = no; then + HAVE_STRCASECMP=0 + fi - for ac_header in libintl.h + for ac_func in strncasecmp do : - ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" -if test "x$ac_cv_header_libintl_h" = x""yes; then : + ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" +if test "x$ac_cv_func_strncasecmp" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_LIBINTL_H 1 +#define HAVE_STRNCASECMP 1 _ACEOF fi - done + if test $ac_cv_func_strncasecmp = yes; then + HAVE_STRNCASECMP=1 + else + HAVE_STRNCASECMP=0 + fi + ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" +if test "x$ac_cv_have_decl_strncasecmp" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi - : +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNCASECMP $ac_have_decl +_ACEOF + if test $ac_cv_have_decl_strncasecmp = no; then + HAVE_DECL_STRNCASECMP=0 + fi + if test $HAVE_STRCASECMP = 0; then @@ -27085,173 +35373,263 @@ done - ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include -" -if test "x$ac_cv_have_decl_isblank" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi + gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext" -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ISBLANK $ac_have_decl -_ACEOF + : fi + if test $HAVE_STRNCASECMP = 0; then - # Code from module rmdir: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5 -$as_echo_n "checking whether rmdir works... " >&6; } -if test "${gl_cv_func_rmdir_works+set}" = set; then : + + + + + + gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext" + + + : + + fi + + + if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works in linear time" >&5 +$as_echo_n "checking whether strcasestr works in linear time... " >&6; } +if ${gl_cv_func_strcasestr_linear+:} false; then : $as_echo_n "(cached) " >&6 else - mkdir conftest.dir - touch conftest.file - if test "$cross_compiling" = yes; then : - gl_cv_func_rmdir_works="guessing no" + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef __GNU_LIBRARY__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + && !defined __UCLIBC__ + Lucky user + #endif +#endif +#ifdef __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky user" >/dev/null 2>&1; then : + gl_cv_func_strcasestr_linear="guessing yes" +else + gl_cv_func_strcasestr_linear="guessing no" +fi +rm -f conftest* + + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #include + +#include /* for signal */ +#include /* for strcasestr */ +#include /* for malloc */ +#include /* for alarm */ +static void quit (int sig) { exit (sig + 128); } int main () { -int result = 0; - if (!rmdir ("conftest.file/")) - result |= 1; - else if (errno != ENOTDIR) - result |= 2; - if (!rmdir ("conftest.dir/./")) - result |= 4; - return result; + + int result = 0; + size_t m = 1000000; + char *haystack = (char *) malloc (2 * m + 2); + char *needle = (char *) malloc (m + 2); + /* Failure to compile this test due to missing alarm is okay, + since all such platforms (mingw) also lack strcasestr. */ + signal (SIGALRM, quit); + alarm (5); + /* Check for quadratic performance. */ + if (haystack && needle) + { + memset (haystack, 'A', 2 * m); + haystack[2 * m] = 'B'; + haystack[2 * m + 1] = 0; + memset (needle, 'A', m); + needle[m] = 'B'; + needle[m + 1] = 0; + if (!strcasestr (haystack, needle)) + result |= 1; + } + return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_rmdir_works=yes + gl_cv_func_strcasestr_linear=yes else - gl_cv_func_rmdir_works=no + gl_cv_func_strcasestr_linear=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -rf conftest.dir conftest.file -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5 -$as_echo "$gl_cv_func_rmdir_works" >&6; } - if test x"$gl_cv_func_rmdir_works" != xyes; then - REPLACE_RMDIR=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_linear" >&5 +$as_echo "$gl_cv_func_strcasestr_linear" >&6; } + case "$gl_cv_func_strcasestr_linear" in + *yes) ;; + *) + REPLACE_STRCASESTR=1 + ;; + esac fi + if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then - GNULIB_RMDIR=1 - - - -$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h - - # Code from module rpmatch: + gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" + : + fi - for ac_func in rpmatch + for ac_func in strcasestr do : - ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch" -if test "x$ac_cv_func_rpmatch" = x""yes; then : + ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" +if test "x$ac_cv_func_strcasestr" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_RPMATCH 1 +#define HAVE_STRCASESTR 1 _ACEOF +fi +done + + if test $ac_cv_func_strcasestr = no; then + HAVE_STRCASESTR=0 + else + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_STRCASESTR=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5 +$as_echo_n "checking whether strcasestr works... " >&6; } +if ${gl_cv_func_strcasestr_works_always+:} false; then : + $as_echo_n "(cached) " >&6 else + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +#ifdef __GNU_LIBRARY__ + #include + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + || defined __UCLIBC__ + Lucky user + #endif +#elif defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#else + Lucky user +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky user" >/dev/null 2>&1; then : + gl_cv_func_strcasestr_works_always="guessing yes" +else + gl_cv_func_strcasestr_works_always="guessing no" fi -done - +rm -f conftest* - if test $ac_cv_func_rpmatch = no; then - HAVE_RPMATCH=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5 -$as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; } -if test "${gl_cv_langinfo_yesexpr+set}" = set; then : - $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#include /* for strcasestr */ +#define P "_EF_BF_BD" +#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P +#define NEEDLE P P P P P + int main () { -char* cs = nl_langinfo(YESEXPR); return !cs; +return !!strcasestr (HAYSTACK, NEEDLE); + ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_langinfo_yesexpr=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strcasestr_works_always=yes else - gl_cv_langinfo_yesexpr=no + gl_cv_func_strcasestr_works_always=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5 -$as_echo "$gl_cv_langinfo_yesexpr" >&6; } - if test $gl_cv_langinfo_yesexpr = yes; then -$as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5 +$as_echo "$gl_cv_func_strcasestr_works_always" >&6; } + case "$gl_cv_func_strcasestr_works_always" in + *yes) ;; + *) + REPLACE_STRCASESTR=1 + ;; + esac + fi fi + if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" + + + : + fi - GNULIB_RPMATCH=1 + GNULIB_STRCASESTR=1 -$as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h - # Code from module same: +$as_echo "#define GNULIB_TEST_STRCASESTR 1" >>confdefs.h @@ -27259,12 +35637,17 @@ $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h + : - gl_LIBOBJS="$gl_LIBOBJS same.$ac_objext" + if test $ac_cv_func_strdup = yes; then + if test $gl_cv_func_malloc_posix != yes; then + REPLACE_STRDUP=1 + fi + fi : @@ -27272,9 +35655,12 @@ $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h + if test $ac_cv_have_decl_strdup = no; then + HAVE_DECL_STRDUP=0 + fi + + if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then - # Code from module same-inode: - # Code from module save-cwd: @@ -27282,20 +35668,22 @@ $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" + : + fi - gl_LIBOBJS="$gl_LIBOBJS save-cwd.$ac_objext" - : + GNULIB_STRDUP=1 - # Code from module savedir: +$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h @@ -27304,23 +35692,64 @@ $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS savedir.$ac_objext" - # Code from module selinux-at: - for ac_header in selinux/flask.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default" -if test "x$ac_cv_header_selinux_flask_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SELINUX_FLASK_H 1 + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 +$as_echo_n "checking for working strerror function... " >&6; } +if ${gl_cv_func_working_strerror+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_working_strerror="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_strerror="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +if (!*strerror (-2)) return 1; + ; + return 0; +} _ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_working_strerror=yes +else + gl_cv_func_working_strerror=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5 +$as_echo "$gl_cv_func_working_strerror" >&6; } + case "$gl_cv_func_working_strerror" in + *yes) ;; + *) + REPLACE_STRERROR=1 + ;; + esac -done + case "$gl_cv_func_strerror_r_works" in + *no) REPLACE_STRERROR=1 ;; + esac + else + REPLACE_STRERROR=1 + fi + if test $REPLACE_STRERROR = 1; then @@ -27328,423 +35757,298 @@ done - gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext" - # Code from module selinux-h: + gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" + fi - if test "$with_selinux" != no; then - for ac_header in selinux/selinux.h + +cat >>confdefs.h <<_ACEOF +#define GNULIB_STRERROR 1 +_ACEOF + + + + + + + + GNULIB_STRERROR=1 + + + + + +$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h + + + + + + if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext" + + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h do : - ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" -if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_SELINUX_SELINUX_H 1 +#define HAVE_WINSOCK2_H 1 _ACEOF fi done + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + fi - if test "$ac_cv_header_selinux_selinux_h" = yes; then - # We do have , so do compile getfilecon.c - # and arrange to use its wrappers. + : - gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext" + if test $ac_cv_have_decl_strerror_r = no; then + HAVE_DECL_STRERROR_R=0 + fi + if test $ac_cv_func_strerror_r = yes; then + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test $gl_cv_func_strerror_r_posix_signature = yes; then + case "$gl_cv_func_strerror_r_works" in + *no) REPLACE_STRERROR_R=1 ;; + esac + else + REPLACE_STRERROR_R=1 + fi + else + REPLACE_STRERROR_R=1 + fi + fi + if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then - : + gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext" - if test $gl_cv_have_include_next = yes; then - gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_selinux_selinux_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test $ac_cv_header_selinux_selinux_h = yes; then + : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_selinux_selinux_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/selinux/selinux.h#{ - s#.*"\(.*/selinux/selinux.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>' - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5 -$as_echo "$gl_cv_next_selinux_selinux_h" >&6; } - fi - NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'selinux/selinux.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h - fi - NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive + : -$as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h + : -$as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h -$as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h - fi - case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in - no:*) # already warned - ;; - *:no) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5 -$as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU findutils will be compiled without SELinux support." >&5 -$as_echo "$as_me: WARNING: GNU findutils will be compiled without SELinux support." >&2;} - esac - else - # Do as if does not exist, even if - # AC_CHECK_HEADERS_ONCE has already determined that it exists. - $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h fi - if test "$with_selinux" != no; then - for ac_header in selinux/context.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default" -if test "x$ac_cv_header_selinux_context_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SELINUX_CONTEXT_H 1 -_ACEOF - SELINUX_CONTEXT_H= -else - SELINUX_CONTEXT_H=selinux/context.h -fi - -done - else - SELINUX_CONTEXT_H=selinux/context.h - fi + GNULIB_STRERROR_R=1 - # Code from module setenv: - if test $HAVE_SETENV$REPLACE_SETENV != 10; then +$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h + # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. - gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" - fi + : - GNULIB_SETENV=1 -$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h +$as_echo "#define my_strftime nstrftime" >>confdefs.h - # Code from module size_max: - for ac_header in stdint.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H 1 -_ACEOF -fi -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 -$as_echo_n "checking for SIZE_MAX... " >&6; } -if test "${gl_cv_size_max+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - gl_cv_size_max= - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if HAVE_STDINT_H -#include -#endif -#ifdef SIZE_MAX -Found it -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Found it" >/dev/null 2>&1; then : - gl_cv_size_max=yes -fi -rm -f conftest* - if test -z "$gl_cv_size_max"; then - if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include -#include "; then : -else - size_t_bits_minus_1= -fi - if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include "; then : -else - fits_in_uint= -fi - if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then - if test $fits_in_uint = 1; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - extern size_t foo; - extern unsigned long foo; -int -main () -{ + : - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - fits_in_uint=0 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $fits_in_uint = 1; then - gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" - else - gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" - fi - else - gl_cv_size_max='((size_t)~(size_t)0)' - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 -$as_echo "$gl_cv_size_max" >&6; } - if test "$gl_cv_size_max" != yes; then -cat >>confdefs.h <<_ACEOF -#define SIZE_MAX $gl_cv_size_max -_ACEOF - fi - # Code from module snprintf: + : - gl_cv_func_snprintf_usable=no - for ac_func in snprintf -do : - ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" -if test "x$ac_cv_func_snprintf" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SNPRINTF 1 -_ACEOF -fi -done - if test $ac_cv_func_snprintf = yes; then + if test $ac_cv_have_decl_strndup = no; then + HAVE_DECL_STRNDUP=0 + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 -$as_echo_n "checking whether snprintf respects a size of 1... " >&6; } -if test "${gl_cv_func_snprintf_size1+set}" = set; then : + if test $ac_cv_func_strndup = yes; then + HAVE_STRNDUP=1 + # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5 +$as_echo_n "checking for working strndup... " >&6; } +if ${gl_cv_func_strndup_works+:} false; then : $as_echo_n "(cached) " >&6 else + if test "$cross_compiling" = yes; then : + + case $host_os in + aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; + *) gl_cv_func_strndup_works="guessing yes";; + esac - if test "$cross_compiling" = yes; then : - gl_cv_func_snprintf_size1="guessing yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -int main() + #include + #include +int +main () { - static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; - snprintf (buf, 1, "%d", 12345); - return buf[1] != 'E'; + +#if !HAVE_DECL_STRNDUP + extern + #ifdef __cplusplus + "C" + #endif + char *strndup (const char *, size_t); +#endif + char *s; + s = strndup ("some longer string", 15); + free (s); + s = strndup ("shorter string", 13); + return s[13] != '\0'; + ; + return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_snprintf_size1=yes + gl_cv_func_strndup_works=yes else - gl_cv_func_snprintf_size1=no + gl_cv_func_strndup_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5 -$as_echo "$gl_cv_func_snprintf_size1" >&6; } - - case "$gl_cv_func_snprintf_size1" in - *yes) - - case "$gl_cv_func_snprintf_retval_c99" in - *yes) - gl_cv_func_snprintf_usable=yes - ;; - esac - ;; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5 +$as_echo "$gl_cv_func_strndup_works" >&6; } + case $gl_cv_func_strndup_works in + *no) REPLACE_STRNDUP=1 ;; esac + else + HAVE_STRNDUP=0 fi - if test $gl_cv_func_snprintf_usable = no; then - - - + if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then - gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext" - - if test $ac_cv_func_snprintf = yes; then - REPLACE_SNPRINTF=1 - fi - : - - fi - - : - - + gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" - if test $ac_cv_have_decl_snprintf = no; then - HAVE_DECL_SNPRINTF=0 fi - GNULIB_SNPRINTF=1 - - -$as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h + GNULIB_STRNDUP=1 -cat >>confdefs.h <<_ACEOF -#define GNULIB_SNPRINTF 1 -_ACEOF +$as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h - # Code from module ssize_t: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 -$as_echo_n "checking for ssize_t... " >&6; } -if test "${gt_cv_ssize_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_ssize_t=yes -else - gt_cv_ssize_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 -$as_echo "$gt_cv_ssize_t" >&6; } - if test $gt_cv_ssize_t = no; then -$as_echo "#define ssize_t int" >>confdefs.h - fi - # Code from module stat: @@ -27754,102 +36058,69 @@ $as_echo "#define ssize_t int" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 -$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } -if test "${gl_cv_func_stat_dir_slash+set}" = set; then : + if test $ac_cv_have_decl_strnlen = no; then + HAVE_DECL_STRNLEN=0 + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 +$as_echo_n "checking for working strnlen... " >&6; } +if ${ac_cv_func_strnlen_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - case $host_os in - mingw*) gl_cv_func_stat_dir_slash="guessing no";; - *) gl_cv_func_stat_dir_slash="guessing yes";; - esac + # Guess no on AIX systems, yes otherwise. + case "$host_os" in + aix*) ac_cv_func_strnlen_working=no;; + *) ac_cv_func_strnlen_working=yes;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +$ac_includes_default int main () { -struct stat st; return stat (".", &st) != stat ("./", &st); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stat_dir_slash=yes -else - gl_cv_func_stat_dir_slash=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 -$as_echo "$gl_cv_func_stat_dir_slash" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 -$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } -if test "${gl_cv_func_stat_file_slash+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - touch conftest.tmp - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.tmp conftest.lnk - fi - if test "$cross_compiling" = yes; then : - gl_cv_func_stat_file_slash="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +#define S "foobar" +#define S_LEN (sizeof S - 1) -int -main () -{ -int result = 0; - struct stat st; - if (!stat ("conftest.tmp/", &st)) - result |= 1; -#if HAVE_LSTAT - if (!stat ("conftest.lnk/", &st)) - result |= 2; -#endif - return result; + /* At least one implementation is buggy: that of AIX 4.3 would + give strnlen (S, 1) == 3. */ + + int i; + for (i = 0; i < S_LEN + 1; ++i) + { + int expected = i <= S_LEN ? i : S_LEN; + if (strnlen (S, i) != expected) + return 1; + } + return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stat_file_slash=yes + ac_cv_func_strnlen_working=yes else - gl_cv_func_stat_file_slash=no + ac_cv_func_strnlen_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -f conftest.tmp conftest.lnk fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 -$as_echo "$gl_cv_func_stat_file_slash" >&6; } - case $gl_cv_func_stat_dir_slash in - *no) REPLACE_STAT=1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5 +$as_echo "$ac_cv_func_strnlen_working" >&6; } +test $ac_cv_func_strnlen_working = no && : -$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h -;; - esac - case $gl_cv_func_stat_file_slash in - *no) REPLACE_STAT=1 -$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h -;; - esac - if test $REPLACE_STAT = 1; then + if test $ac_cv_func_strnlen_working = no; then + REPLACE_STRNLEN=1 + fi + fi + if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then @@ -27857,229 +36128,216 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" + : fi - GNULIB_STAT=1 - - - -$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h - + GNULIB_STRNLEN=1 - # Code from module stat-macros: - # Code from module stat-time: - : +$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h + if test $REPLACE_STRSTR = 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5 +$as_echo_n "checking whether strstr works in linear time... " >&6; } +if ${gl_cv_func_strstr_linear+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then : +#include +#ifdef __GNU_LIBRARY__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + && !(defined __i386__ || defined __x86_64__) \ + && !defined __UCLIBC__ + Lucky user + #endif +#endif +#ifdef __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#endif -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 _ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky user" >/dev/null 2>&1; then : + gl_cv_func_strstr_linear="guessing yes" +else + gl_cv_func_strstr_linear="guessing no" +fi +rm -f conftest* + -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 -$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } -if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then : - $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - #if HAVE_SYS_TIME_H - # include - #endif - #include - struct timespec ts; - struct stat st; +#include /* for signal */ +#include /* for strstr */ +#include /* for malloc */ +#include /* for alarm */ +static void quit (int sig) { exit (sig + 128); } int main () { - st.st_atim = ts; + int result = 0; + size_t m = 1000000; + char *haystack = (char *) malloc (2 * m + 2); + char *needle = (char *) malloc (m + 2); + /* Failure to compile this test due to missing alarm is okay, + since all such platforms (mingw) also have quadratic strstr. */ + signal (SIGALRM, quit); + alarm (5); + /* Check for quadratic performance. */ + if (haystack && needle) + { + memset (haystack, 'A', 2 * m); + haystack[2 * m] = 'B'; + haystack[2 * m + 1] = 0; + memset (needle, 'A', m); + needle[m] = 'B'; + needle[m + 1] = 0; + if (!strstr (haystack, needle)) + result |= 1; + } + return result; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes -else - ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 -$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } - if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then - -$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h - - fi -else - ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 -_ACEOF - - -else - ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 -_ACEOF - - +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strstr_linear=yes else - ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 -_ACEOF - - + gl_cv_func_strstr_linear=no fi - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5 +$as_echo "$gl_cv_func_strstr_linear" >&6; } + case "$gl_cv_func_strstr_linear" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac + fi + if test $REPLACE_STRSTR = 1; then - : - + gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then : + fi -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 -_ACEOF + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_STRSTR=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 +$as_echo_n "checking whether strstr works... " >&6; } +if ${gl_cv_func_strstr_works_always+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 -_ACEOF - + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -else - ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then : +#ifdef __GNU_LIBRARY__ + #include + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + || defined __UCLIBC__ + Lucky user + #endif +#elif defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#else + Lucky user +#endif -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 _ACEOF - - -fi - -fi - +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky user" >/dev/null 2>&1; then : + gl_cv_func_strstr_works_always="guessing yes" +else + gl_cv_func_strstr_works_always="guessing no" fi +rm -f conftest* - # Code from module stdarg: - - STDARG_H=''; - NEXT_STDARG_H=''; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 -$as_echo_n "checking for va_copy... " >&6; } - if test "${gl_cv_func_va_copy+set}" = set; then : - $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#include /* for strstr */ +#define P "_EF_BF_BD" +#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P +#define NEEDLE P P P P P + int main () { - -#ifndef va_copy -void (*func) (va_list, va_list) = va_copy; -#endif +return !!strstr (HAYSTACK, NEEDLE); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_va_copy=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strstr_works_always=yes else - gl_cv_func_va_copy=no + gl_cv_func_strstr_works_always=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5 -$as_echo "$gl_cv_func_va_copy" >&6; } - if test $gl_cv_func_va_copy = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined _AIX && !defined __GNUC__ - AIX vaccine - #endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "vaccine" >/dev/null 2>&1; then : - gl_aixcc=yes -else - gl_aixcc=no fi -rm -f conftest* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 +$as_echo "$gl_cv_func_strstr_works_always" >&6; } + case "$gl_cv_func_strstr_works_always" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac + fi - if test $gl_aixcc = yes; then - STDARG_H=stdarg.h + if test $REPLACE_STRSTR = 1; then @@ -28088,162 +36346,95 @@ rm -f conftest* - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdarg_h='<'stdarg.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdarg_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else + gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + fi -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdarg.h#{ - s#.*"\(.*/stdarg.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5 -$as_echo "$gl_cv_next_stdarg_h" >&6; } - fi - NEXT_STDARG_H=$gl_cv_next_stdarg_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdarg.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdarg_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive + GNULIB_STRSTR=1 - if test "$gl_cv_next_stdarg_h" = '""'; then - gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' - NEXT_STDARG_H="$gl_cv_next_stdarg_h" - fi - else - saved_as_echo_n="$as_echo_n" - as_echo_n=':' - if test "${gl_cv_func___va_copy+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ +$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h -#ifndef __va_copy -error, bail out -#endif - ; - return 0; -} + + + for ac_func in strtol +do : + ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" +if test "x$ac_cv_func_strtol" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOL 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func___va_copy=yes -else - gl_cv_func___va_copy=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +done - as_echo_n="$saved_as_echo_n" - if test $gl_cv_func___va_copy = yes; then + if test $ac_cv_func_strtol = no; then -$as_echo "#define va_copy __va_copy" >>confdefs.h - else -$as_echo "#define va_copy gl_va_copy" >>confdefs.h - fi - fi + + + + gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext" + fi - # Code from module stdbool: + for ac_func in strtoul +do : + ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" +if test "x$ac_cv_func_strtoul" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOUL 1 +_ACEOF +fi +done - # Define two additional variables used in the Makefile substitution. + if test $ac_cv_func_strtoul = no; then - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' - fi - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - # Code from module stddef: - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h + gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext" + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 -$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if test "${gl_cv_decl_null_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; -int -main () -{ - ; - return 0; -} + + if test "$ac_cv_type_unsigned_long_long_int" = yes; then + for ac_func in strtoull +do : + ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOULL 1 _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_null_works=yes -else - gl_cv_decl_null_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 -$as_echo "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h +done + + if test $ac_cv_func_strtoull = no; then + HAVE_STRTOULL=0 + fi fi - if test -n "$STDDEF_H"; then + if test $HAVE_STRTOULL = 0; then @@ -28251,336 +36442,111 @@ $as_echo "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stddef_h='<'stddef.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stddef_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext" -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stddef.h#{ - s#.*"\(.*/stddef.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + : -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 -$as_echo "$gl_cv_next_stddef_h" >&6; } - fi - NEXT_STDDEF_H=$gl_cv_next_stddef_h + fi - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stddef.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stddef_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive - fi + GNULIB_STRTOULL=1 - # Code from module stdint: - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi +$as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - : + : - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi + : + if test "$ac_cv_have_decl_strtoumax" = yes; then + if test "$ac_cv_func_strtoumax" != yes; then + # HP-UX 11.11 has "#define strtoimax(...) ..." but no function. + REPLACE_STRTOUMAX=1 + fi + else + HAVE_DECL_STRTOUMAX=0 + fi + if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then - : + gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext" - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdint_h='<'stdint.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdint_h+set}" = set; then : - $as_echo_n "(cached) " >&6 + ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" +if test "x$ac_cv_have_decl_strtoull" = xyes; then : + ac_have_decl=1 else + ac_have_decl=0 +fi - if test $ac_cv_header_stdint_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRTOULL $ac_have_decl _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdint.h#{ - s#.*"\(.*/stdint.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_stdint_h='<'stdint.h'>' - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 -$as_echo "$gl_cv_next_stdint_h" >&6; } - fi - NEXT_STDINT_H=$gl_cv_next_stdint_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdint.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdint_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive + fi - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 - else - HAVE_STDINT_H=0 - fi + GNULIB_STRTOUMAX=1 - if test $ac_cv_header_stdint_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 -$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } -if test "${gl_cv_header_working_stdint_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - gl_cv_header_working_stdint_h=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ -#if !(defined WCHAR_MIN && defined WCHAR_MAX) -#error "WCHAR_MIN, WCHAR_MAX not defined in " -#endif - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; -#include /* for CHAR_BIT */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -struct s { - int check_PTRDIFF: - PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) - && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) - ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ - int check_SIG_ATOMIC: - SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) - && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) - ? 1 : -1; - int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; - int check_WCHAR: - WCHAR_MIN == TYPE_MINIMUM (wchar_t) - && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) - ? 1 : -1; - /* Detect bug in mingw. */ - int check_WINT: - WINT_MIN == TYPE_MINIMUM (wint_t) - && WINT_MAX == TYPE_MAXIMUM (wint_t) - ? 1 : -1; + case "$host_os" in + osf*) - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; +$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 +$as_echo_n "checking whether is self-contained... " >&6; } +if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main () { @@ -28590,431 +36556,476 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - if test "$cross_compiling" = yes; then : - gl_cv_header_working_stdint_h=yes - + gl_cv_header_sys_socket_h_selfcontained=yes else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include - + gl_cv_header_sys_socket_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 +$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } + if test $gl_cv_header_sys_socket_h_selfcontained = yes; then + for ac_func in shutdown +do : + ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" +if test "x$ac_cv_func_shutdown" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SHUTDOWN 1 +_ACEOF +fi +done -#include -#include -#define MVAL(macro) MVAL1(macro) -#define MVAL1(expression) #expression -static const char *macro_values[] = - { -#ifdef INT8_MAX - MVAL (INT8_MAX), -#endif -#ifdef INT16_MAX - MVAL (INT16_MAX), -#endif -#ifdef INT32_MAX - MVAL (INT32_MAX), -#endif -#ifdef INT64_MAX - MVAL (INT64_MAX), -#endif -#ifdef UINT8_MAX - MVAL (UINT8_MAX), -#endif -#ifdef UINT16_MAX - MVAL (UINT16_MAX), -#endif -#ifdef UINT32_MAX - MVAL (UINT32_MAX), -#endif -#ifdef UINT64_MAX - MVAL (UINT64_MAX), -#endif - NULL - }; + if test $ac_cv_func_shutdown = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines the SHUT_* macros" >&5 +$as_echo_n "checking whether defines the SHUT_* macros... " >&6; } +if ${gl_cv_header_sys_socket_h_shut+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include int main () { - - const char **mv; - for (mv = macro_values; *mv != NULL; mv++) - { - const char *value = *mv; - /* Test whether it looks like a cast expression. */ - if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 - || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 - || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 - || strncmp (value, "((int)"/*)*/, 6) == 0 - || strncmp (value, "((signed short)"/*)*/, 15) == 0 - || strncmp (value, "((signed char)"/*)*/, 14) == 0) - return mv - macro_values + 1; - } - return 0; - +int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_header_working_stdint_h=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_sys_socket_h_shut=yes +else + gl_cv_header_sys_socket_h_shut=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 -$as_echo "$gl_cv_header_working_stdint_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5 +$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } + if test $gl_cv_header_sys_socket_h_shut = no; then + SYS_SOCKET_H='sys/socket.h' + fi + fi fi - if test "$gl_cv_header_working_stdint_h" = yes; then - STDINT_H= - else - for ac_header in sys/inttypes.h sys/bitypes.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + # We need to check for ws2tcpip.h now. -fi -done - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi - if test $APPLE_UNIVERSAL_BUILD = 0; then + : - for gltype in ptrdiff_t size_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 -$as_echo_n "checking for bit size of $gltype... " >&6; } -if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then : + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_socket_h='<'sys/socket.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_socket_h+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif -#include "; then : + if test $ac_cv_header_sys_socket_h = yes; then -else - result=unknown -fi - eval gl_cv_bitsizeof_${gltype}=\$result + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/socket.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_socket_h + gl_cv_next_sys_socket_h='"'$gl_header'"' + else + gl_cv_next_sys_socket_h='<'sys/socket.h'>' + fi + fi -eval ac_res=\$gl_cv_bitsizeof_${gltype} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 +$as_echo "$gl_cv_next_sys_socket_h" >&6; } + fi + NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/socket.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_socket_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_sys_socket_h = yes; then + HAVE_SYS_SOCKET_H=1 + HAVE_WS2TCPIP_H=0 + else + HAVE_SYS_SOCKET_H=0 + if test $ac_cv_header_ws2tcpip_h = yes; then + HAVE_WS2TCPIP_H=1 + else + HAVE_WS2TCPIP_H=0 fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result + fi + + + + ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_type_sa_family_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SA_FAMILY_T 1 _ACEOF - eval BITSIZEOF_${GLTYPE}=\$result - done +fi + if test $ac_cv_type_struct_sockaddr_storage = no; then + HAVE_STRUCT_SOCKADDR_STORAGE=0 + fi + if test $ac_cv_type_sa_family_t = no; then + HAVE_SA_FAMILY_T=0 fi + if test $ac_cv_type_struct_sockaddr_storage != no; then + ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_WS2TCPIP_H + #include + #endif +" +if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 -$as_echo_n "checking for bit size of $gltype... " >&6; } -if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +_ACEOF -#include "; then : else - result=unknown + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 fi - eval gl_cv_bitsizeof_${gltype}=\$result + fi + if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ + || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then + SYS_SOCKET_H='sys/socket.h' + fi -fi -eval ac_res=\$gl_cv_bitsizeof_${gltype} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 _ACEOF - eval BITSIZEOF_${GLTYPE}=\$result - done +fi +done + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 -$as_echo_n "checking whether $gltype is signed... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then : + + + for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif +/* Some systems require prerequisite headers. */ +#include +#include - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; int main () { - +#undef $gl_func + (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - result=yes + eval "$as_gl_Symbol=yes" else - result=no + eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval gl_cv_type_${gltype}_signed=\$result - fi -eval ac_res=\$gl_cv_type_${gltype}_signed +eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_SIGNED_${GLTYPE} 1 + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done + eval ac_cv_have_decl_$gl_func=yes +fi + done - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - if test $APPLE_UNIVERSAL_BUILD = 0; then - for gltype in ptrdiff_t size_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 -$as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then : + + + + + + + + + + + : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_stat_h='<'sys/stat.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_stat_h+:} false; then : $as_echo_n "(cached) " >&6 else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif + if test $ac_cv_header_sys_stat_h = yes; then - extern $gltype foo; - extern $gltype1 foo; -int -main () -{ - ; - return 0; -} + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/stat.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_stat_h + gl_cv_next_sys_stat_h='"'$gl_header'"' + else + gl_cv_next_sys_stat_h='<'sys/stat.h'>' + fi + + fi -eval ac_res=\$gl_cv_type_${gltype}_suffix - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 +$as_echo "$gl_cv_next_sys_stat_h" >&6; } + fi + NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/stat.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_stat_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive - done + + + + + + + + + if test $WINDOWS_64_BIT_ST_SIZE = 1; then + +$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h + fi + ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include + #include +" +if test "x$ac_cv_type_nlink_t" = xyes; then : - for gltype in sig_atomic_t wchar_t wint_t ; do - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 -$as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then : +else + +$as_echo "#define nlink_t int" >>confdefs.h + +fi + + + + for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - extern $gltype foo; - extern $gltype1 foo; int main () { - +#undef $gl_func + (void) $gl_func; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done -fi -eval ac_res=\$gl_cv_type_${gltype}_suffix - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF - done + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + - STDINT_H=stdint.h - fi - # Code from module stdio: @@ -29024,180 +37035,220 @@ _ACEOF + : + + + + + + if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdio_h='<'stdio.h'>' + gl_cv_next_sys_uio_h='<'sys/uio.h'>' else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdio_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_uio_h+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + if test $ac_cv_header_sys_uio_h = yes; then + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdio.h#{ - s#.*"\(.*/stdio.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/uio.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_uio_h + gl_cv_next_sys_uio_h='"'$gl_header'"' + else + gl_cv_next_sys_uio_h='<'sys/uio.h'>' + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 -$as_echo "$gl_cv_next_stdio_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5 +$as_echo "$gl_cv_next_sys_uio_h" >&6; } fi - NEXT_STDIO_H=$gl_cv_next_stdio_h + NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdio.h'>' + gl_next_as_first_directive='<'sys/uio.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdio_h + gl_next_as_first_directive=$gl_cv_next_sys_uio_h fi - NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive - GNULIB_FPRINTF=1 - GNULIB_PRINTF=1 - GNULIB_VFPRINTF=1 - GNULIB_VPRINTF=1 - GNULIB_FPUTC=1 - GNULIB_PUTC=1 - GNULIB_PUTCHAR=1 - GNULIB_FPUTS=1 - GNULIB_PUTS=1 - GNULIB_FWRITE=1 + if test $ac_cv_header_sys_uio_h = yes; then + HAVE_SYS_UIO_H=1 + else + HAVE_SYS_UIO_H=0 + fi - for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf tmpfile vdprintf vsnprintf; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - eval ac_cv_have_decl_$gl_func=yes -fi - done - # Code from module stdlib: + : + + + if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdlib_h='<'stdlib.h'>' + gl_cv_next_sys_utsname_h='<'sys/utsname.h'>' else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdlib_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_utsname_h+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + if test $ac_cv_header_sys_utsname_h = yes; then + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdlib.h#{ - s#.*"\(.*/stdlib.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/utsname.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_utsname_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_utsname_h + gl_cv_next_sys_utsname_h='"'$gl_header'"' + else + gl_cv_next_sys_utsname_h='<'sys/utsname.h'>' + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 -$as_echo "$gl_cv_next_stdlib_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_utsname_h" >&5 +$as_echo "$gl_cv_next_sys_utsname_h" >&6; } fi - NEXT_STDLIB_H=$gl_cv_next_stdlib_h + NEXT_SYS_UTSNAME_H=$gl_cv_next_sys_utsname_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdlib.h'>' + gl_next_as_first_directive='<'sys/utsname.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdlib_h + gl_next_as_first_directive=$gl_cv_next_sys_utsname_h fi - NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H=$gl_next_as_first_directive + + if test $ac_cv_header_sys_utsname_h != yes; then + HAVE_SYS_UTSNAME_H=0 + HAVE_STRUCT_UTSNAME=0 + else + HAVE_SYS_UTSNAME_H=1 + ac_fn_c_check_type "$LINENO" "struct utsname" "ac_cv_type_struct_utsname" " +/* Minix 3.1.8 has a bug: must be included before + . */ +#include +#include + +" +if test "x$ac_cv_type_struct_utsname" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_UTSNAME 1 +_ACEOF + +else + HAVE_STRUCT_UTSNAME=0 +fi + + fi - for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt unsetenv; do + + for gl_func in uname; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#if HAVE_SYS_LOADAVG_H -# include -#endif -#if HAVE_RANDOM_H -# include -#endif + + /* Minix 3.1.8 has a bug: must be included before + . */ + #include + #include int main () @@ -29218,7 +37269,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -29228,9 +37279,6 @@ fi done - # Code from module stpcpy: - - @@ -29241,46 +37289,80 @@ fi + : - for ac_func in stpcpy -do : - ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" -if test "x$ac_cv_func_stpcpy" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STPCPY 1 -_ACEOF - -else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - -fi -done - - - if test $ac_cv_func_stpcpy = no; then - HAVE_STPCPY=0 - : - fi - GNULIB_STPCPY=1 + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_wait_h='<'sys/wait.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_wait_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test $ac_cv_header_sys_wait_h = yes; then -$as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac - # Code from module strcase: + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/wait.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_wait_h + gl_cv_next_sys_wait_h='"'$gl_header'"' + else + gl_cv_next_sys_wait_h='<'sys/wait.h'>' + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5 +$as_echo "$gl_cv_next_sys_wait_h" >&6; } + fi + NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/wait.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_wait_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive @@ -29289,30 +37371,43 @@ $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h - for ac_func in strcasecmp -do : - ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" -if test "x$ac_cv_func_strcasecmp" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRCASECMP 1 + for gl_func in waitpid; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} _ACEOF - +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" else - - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" - + eval "$as_gl_Symbol=no" fi -done - - - if test $ac_cv_func_strcasecmp = no; then - HAVE_STRCASECMP=0 - - : - - fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + eval ac_cv_have_decl_$gl_func=yes +fi + done @@ -29322,135 +37417,82 @@ done - for ac_func in strncasecmp -do : - ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" -if test "x$ac_cv_func_strncasecmp" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRNCASECMP 1 -_ACEOF -else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" -fi -done - if test $ac_cv_func_strncasecmp = no; then - : - fi - ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" -if test "x$ac_cv_have_decl_strncasecmp" = x""yes; then : + ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include +" +if test "x$ac_cv_have_decl_localtime_r" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRNCASECMP $ac_have_decl +#define HAVE_DECL_LOCALTIME_R $ac_have_decl _ACEOF - if test $ac_cv_have_decl_strncasecmp = no; then - HAVE_DECL_STRNCASECMP=0 + if test $ac_cv_have_decl_localtime_r = no; then + HAVE_DECL_LOCALTIME_R=0 fi - # Code from module strcasestr: - + : - if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works in linear time" >&5 -$as_echo_n "checking whether strcasestr works in linear time... " >&6; } -if test "${gl_cv_func_strcasestr_linear+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ - Lucky user - #endif -#endif -#ifdef __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_strcasestr_linear=yes -else - gl_cv_func_strcasestr_linear="guessing no" -fi -rm -f conftest* + if test $ac_cv_func_localtime_r = yes; then + HAVE_LOCALTIME_R=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 +$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } +if ${gl_cv_time_r_posix+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include /* for signal */ -#include /* for strcasestr */ -#include /* for malloc */ -#include /* for alarm */ -static void quit (int sig) { exit (sig + 128); } - +#include int main () { - - int result = 0; - size_t m = 1000000; - char *haystack = (char *) malloc (2 * m + 2); - char *needle = (char *) malloc (m + 2); - /* Failure to compile this test due to missing alarm is okay, - since all such platforms (mingw) also lack strcasestr. */ - signal (SIGALRM, quit); - alarm (5); - /* Check for quadratic performance. */ - if (haystack && needle) - { - memset (haystack, 'A', 2 * m); - haystack[2 * m] = 'B'; - haystack[2 * m + 1] = 0; - memset (needle, 'A', m); - needle[m] = 'B'; - needle[m + 1] = 0; - if (!strcasestr (haystack, needle)) - result |= 1; - } - return result; - +/* We don't need to append 'restrict's to the argument types, + even though the POSIX signature has the 'restrict's, + since C99 says they can't affect type compatibility. */ + struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; + if (ptr) return 0; + /* Check the return type is a pointer. + On HP-UX 10 it is 'int'. */ + *localtime_r (0, 0); ; return 0; } + _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strcasestr_linear=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_time_r_posix=yes else - gl_cv_func_strcasestr_linear=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gl_cv_time_r_posix=no fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_linear" >&5 -$as_echo "$gl_cv_func_strcasestr_linear" >&6; } - if test "$gl_cv_func_strcasestr_linear" != yes; then - REPLACE_STRCASESTR=1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 +$as_echo "$gl_cv_time_r_posix" >&6; } + if test $gl_cv_time_r_posix = yes; then + REPLACE_LOCALTIME_R=0 + else + REPLACE_LOCALTIME_R=1 + fi + else + HAVE_LOCALTIME_R=0 + fi + + if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then @@ -29459,242 +37501,326 @@ $as_echo "$gl_cv_func_strcasestr_linear" >&6; } - gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" : - fi fi - # Code from module strcasestr-simple: + GNULIB_TIME_R=1 - for ac_func in strcasestr -do : - ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" -if test "x$ac_cv_func_strcasestr" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRCASESTR 1 -_ACEOF -fi -done - if test $ac_cv_func_strcasestr = no; then - HAVE_STRCASESTR=0 - else - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRCASESTR=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5 -$as_echo_n "checking whether strcasestr works... " >&6; } -if test "${gl_cv_func_strcasestr_works_always+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNU_LIBRARY__ - #include - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - || defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user -#endif +$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h + + + + : + -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_strcasestr_works_always=yes -else - gl_cv_func_strcasestr_works_always="guessing no" -fi -rm -f conftest* + ac_fn_c_check_decl "$LINENO" "trunc" "ac_cv_have_decl_trunc" "#include +" +if test "x$ac_cv_have_decl_trunc" = xyes; then : + ac_have_decl=1 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + ac_have_decl=0 +fi -#include /* for strcasestr */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TRUNC $ac_have_decl +_ACEOF + if test "$ac_cv_have_decl_trunc" = yes; then + TRUNC_LIBM=? + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + double x; int main () { -return !!strcasestr (HAYSTACK, NEEDLE); - +x = trunc(x); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strcasestr_works_always=yes -else - gl_cv_func_strcasestr_works_always=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +if ac_fn_c_try_link "$LINENO"; then : + TRUNC_LIBM= fi - - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$TRUNC_LIBM" = "?"; then + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + double x; +int +main () +{ +x = trunc(x); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + TRUNC_LIBM="-lm" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5 -$as_echo "$gl_cv_func_strcasestr_works_always" >&6; } - if test "$gl_cv_func_strcasestr_works_always" != yes; then - REPLACE_STRCASESTR=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" - - fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$save_LIBS" fi + if test "$TRUNC_LIBM" = "?"; then + TRUNC_LIBM= + fi + + else + HAVE_DECL_TRUNC=0 + fi + if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then + TRUNC_LIBM= fi - if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then + if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then - gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext" - : + gl_LIBOBJS="$gl_LIBOBJS trunc.$ac_objext" fi - GNULIB_STRCASESTR=1 + GNULIB_TRUNC=1 -$as_echo "#define GNULIB_TEST_STRCASESTR 1" >>confdefs.h - # Code from module strdup-posix: +$as_echo "#define GNULIB_TEST_TRUNC 1" >>confdefs.h - : + for ac_func in uname +do : + ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" +if test "x$ac_cv_func_uname" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNAME 1 +_ACEOF + +fi +done + if test $ac_cv_func_uname = no; then + HAVE_UNAME=0 + fi + if test $HAVE_UNAME = 0; then - if test $ac_cv_func_strdup = yes; then - if test $gl_cv_func_malloc_posix != yes; then - REPLACE_STRDUP=1 + gl_LIBOBJS="$gl_LIBOBJS uname.$ac_objext" - gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" + : - : - fi - else + fi + GNULIB_UNAME=1 - gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" - : - fi - : - if test $ac_cv_have_decl_strdup = no; then - HAVE_DECL_STRDUP=0 - fi + : - GNULIB_STRDUP=1 -$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h - # Code from module streq: - # Code from module strerror: + if test $gl_cv_have_include_next = yes; then + gl_cv_next_unistd_h='<'unistd.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_unistd_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_unistd_h = yes; then - if test $REPLACE_STRERROR = 1; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'unistd.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_unistd_h + gl_cv_next_unistd_h='"'$gl_header'"' + else + gl_cv_next_unistd_h='<'unistd.h'>' + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 +$as_echo "$gl_cv_next_unistd_h" >&6; } + fi + NEXT_UNISTD_H=$gl_cv_next_unistd_h + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'unistd.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_unistd_h + fi + NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive - gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" -cat >>confdefs.h <<_ACEOF -#define REPLACE_STRERROR $REPLACE_STRERROR -_ACEOF + if test $ac_cv_header_unistd_h = yes; then + HAVE_UNISTD_H=1 + else + HAVE_UNISTD_H=0 fi - GNULIB_STRERROR=1 -$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h + for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if HAVE_UNISTD_H +# include +#endif +/* Some systems declare various items in the wrong headers. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include +# endif +#endif + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + eval ac_cv_have_decl_$gl_func=yes +fi + done - # Code from module strftime: + : @@ -29703,42 +37829,85 @@ $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS strftime.$ac_objext" + if { test "$HAVE_LIBUNISTRING" != yes \ + || { - # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. + test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ + || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ + && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ + || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 + } + } + } - : + } + }; then + LIBUNISTRING_UNITYPES_H='unitypes.h' + else + LIBUNISTRING_UNITYPES_H= + fi + if { test "$HAVE_LIBUNISTRING" != yes \ + || { -$as_echo "#define my_strftime nstrftime" >>confdefs.h + test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ + || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ + && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ + || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 + } + } + } - # Code from module string: + + } + }; then + LIBUNISTRING_UNIWIDTH_H='uniwidth.h' + else + LIBUNISTRING_UNIWIDTH_H= + fi - # Code from module strings: + if { test "$HAVE_LIBUNISTRING" != yes \ + || { - # Code from module strndup: + test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ + || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ + && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ + || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4 + } + } + } - : + } + }; then + LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE= + LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#' +else + LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#' + LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE= +fi @@ -29751,74 +37920,158 @@ $as_echo "#define my_strftime nstrftime" >>confdefs.h - if test $ac_cv_have_decl_strndup = no; then - HAVE_DECL_STRNDUP=0 - fi - if test $ac_cv_func_strndup = yes; then - # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5 -$as_echo_n "checking for working strndup... " >&6; } -if test "${gl_cv_func_strndup_works+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5 +$as_echo_n "checking whether unlink honors trailing slashes... " >&6; } +if ${gl_cv_func_unlink_honors_slashes+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - - case $host_os in - aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; - *) gl_cv_func_strndup_works="guessing yes";; - esac + touch conftest.file + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.file conftest.lnk + fi + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_unlink_honors_slashes="guessing no" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + #endif + #include - #include - #include int main () { - -#ifndef HAVE_DECL_STRNDUP - extern char *strndup (const char *, size_t); +int result = 0; + if (!unlink ("conftest.file/")) + result |= 1; + else if (errno != ENOTDIR) + result |= 2; +#if HAVE_LSTAT + if (!unlink ("conftest.lnk/")) + result |= 4; + else if (errno != ENOTDIR) + result |= 8; #endif - char *s; - s = strndup ("some longer string", 15); - free (s); - s = strndup ("shorter string", 13); - return s[13] != '\0'; + return result; + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strndup_works=yes + gl_cv_func_unlink_honors_slashes=yes else - gl_cv_func_strndup_works=no + gl_cv_func_unlink_honors_slashes=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + rm -f conftest.file conftest.lnk fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5 -$as_echo "$gl_cv_func_strndup_works" >&6; } - case $gl_cv_func_strndup_works in - *no) - REPLACE_STRNDUP=1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5 +$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; } + case "$gl_cv_func_unlink_honors_slashes" in + *no) + REPLACE_UNLINK=1 + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5 +$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; } +if ${gl_cv_func_unlink_parent_fails+:} false; then : + $as_echo_n "(cached) " >&6 +else + case "$host_os" in + darwin*) + if { + # Use the mktemp program if available. If not available, hide the error + # message. + tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { + # Use a simple mkdir command. It is guaranteed to fail if the directory + # already exists. $RANDOM is bash specific and expands to empty in shells + # other than bash, ksh and zsh. Its use does not increase security; + # rather, it minimizes the probability of failure in a very cluttered /tmp + # directory. + tmp=/tmp/gt$$-$RANDOM + (umask 077 && mkdir "$tmp") + }; then + mkdir "$tmp/subdir" + GL_SUBDIR_FOR_UNLINK="$tmp/subdir" + export GL_SUBDIR_FOR_UNLINK + if test "$cross_compiling" = yes; then : + # If we don't know, assume the worst. + gl_cv_func_unlink_parent_fails="guessing no" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + #endif + int main () + { + int result = 0; + if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0) + result |= 1; + else if (unlink ("..") == 0) + result |= 2; + return result; + } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_unlink_parent_fails=yes +else + gl_cv_func_unlink_parent_fails=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + unset GL_SUBDIR_FOR_UNLINK + rm -rf "$tmp" + else + gl_cv_func_unlink_parent_fails="guessing no" + fi + ;; + *) + gl_cv_func_unlink_parent_fails="guessing yes" + ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5 +$as_echo "$gl_cv_func_unlink_parent_fails" >&6; } + case "$gl_cv_func_unlink_parent_fails" in + *no) + REPLACE_UNLINK=1 +$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" + ;; + esac - ;; - esac - else + if test $REPLACE_UNLINK = 1; then @@ -29827,22 +38080,22 @@ $as_echo "$gl_cv_func_strndup_works" >&6; } - gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext" fi - GNULIB_STRNDUP=1 + GNULIB_UNLINK=1 -$as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h - # Code from module strnlen: +$as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h + @@ -29855,339 +38108,305 @@ $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h - if test $ac_cv_have_decl_strnlen = no; then - HAVE_DECL_STRNLEN=0 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 -$as_echo_n "checking for working strnlen... " >&6; } -if test "${ac_cv_func_strnlen_working+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_strnlen_working=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#define S "foobar" -#define S_LEN (sizeof S - 1) - /* At least one implementation is buggy: that of AIX 4.3 would - give strnlen (S, 1) == 3. */ + if test $ac_cv_func_unlinkat = no; then + HAVE_UNLINKAT=0 + else + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *no) + # Solaris 9 has *at functions, but uniformly mishandles trailing + # slash in all of them. + REPLACE_UNLINKAT=1 + ;; + *) + # GNU/Hurd has unlinkat, but it has the same bug as unlink. + if test $REPLACE_UNLINK = 1; then + REPLACE_UNLINKAT=1 + fi + ;; + esac + fi - int i; - for (i = 0; i < S_LEN + 1; ++i) - { - int expected = i <= S_LEN ? i : S_LEN; - if (strnlen (S, i) != expected) - return 1; - } - return 0; + if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_strnlen_working=yes -else - ac_cv_func_strnlen_working=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5 -$as_echo "$ac_cv_func_strnlen_working" >&6; } -test $ac_cv_func_strnlen_working = no && + gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" - gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" + fi - if test $ac_cv_func_strnlen_working = no; then - REPLACE_STRNLEN=1 - fi - fi - if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then + GNULIB_UNLINKAT=1 - gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" +$as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h - : - fi - GNULIB_STRNLEN=1 + : -$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h - # Code from module strnlen1: - # Code from module strstr: + if test $ac_cv_have_decl_unsetenv = no; then + HAVE_DECL_UNSETENV=0 + fi + for ac_func in unsetenv +do : + ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" +if test "x$ac_cv_func_unsetenv" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNSETENV 1 +_ACEOF +fi +done - if test $REPLACE_STRSTR = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5 -$as_echo_n "checking whether strstr works in linear time... " >&6; } -if test "${gl_cv_func_strstr_linear+set}" = set; then : + if test $ac_cv_func_unsetenv = no; then + HAVE_UNSETENV=0 + else + HAVE_UNSETENV=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 +$as_echo_n "checking for unsetenv() return type... " >&6; } +if ${gt_cv_func_unsetenv_ret+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ - Lucky user - #endif -#endif -#ifdef __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif +#undef _BSD +#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */ +#include +extern +#ifdef __cplusplus +"C" #endif +int unsetenv (const char *name); + +int +main () +{ + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_strstr_linear=yes +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_func_unsetenv_ret='int' else - gl_cv_func_strstr_linear="guessing no" + gt_cv_func_unsetenv_ret='void' fi -rm -f conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5 +$as_echo "$gt_cv_func_unsetenv_ret" >&6; } + if test $gt_cv_func_unsetenv_ret = 'void'; then + +$as_echo "#define VOID_UNSETENV 1" >>confdefs.h + + REPLACE_UNSETENV=1 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 +$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } +if ${gl_cv_func_unsetenv_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_unsetenv_works="guessing no" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include /* for signal */ -#include /* for strstr */ -#include /* for malloc */ -#include /* for alarm */ -static void quit (int sig) { exit (sig + 128); } + #include + #include + extern char **environ; int main () { - int result = 0; - size_t m = 1000000; - char *haystack = (char *) malloc (2 * m + 2); - char *needle = (char *) malloc (m + 2); - /* Failure to compile this test due to missing alarm is okay, - since all such platforms (mingw) also have quadratic strstr. */ - signal (SIGALRM, quit); - alarm (5); - /* Check for quadratic performance. */ - if (haystack && needle) - { - memset (haystack, 'A', 2 * m); - haystack[2 * m] = 'B'; - haystack[2 * m + 1] = 0; - memset (needle, 'A', m); - needle[m] = 'B'; - needle[m + 1] = 0; - if (!strstr (haystack, needle)) - result |= 1; - } - return result; + char entry1[] = "a=1"; + char entry2[] = "b=2"; + char *env[] = { entry1, entry2, NULL }; + if (putenv ((char *) "a=1")) return 1; + if (putenv (entry2)) return 2; + entry2[0] = 'a'; + unsetenv ("a"); + if (getenv ("a")) return 3; + if (!unsetenv ("") || errno != EINVAL) return 4; + entry2[0] = 'b'; + environ = env; + if (!getenv ("a")) return 5; + entry2[0] = 'a'; + unsetenv ("a"); + if (getenv ("a")) return 6; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strstr_linear=yes + gl_cv_func_unsetenv_works=yes else - gl_cv_func_strstr_linear=no + gl_cv_func_unsetenv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 +$as_echo "$gl_cv_func_unsetenv_works" >&6; } + case "$gl_cv_func_unsetenv_works" in + *yes) ;; + *) + REPLACE_UNSETENV=1 + ;; + esac + fi + + if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" + + + + + : + + + + + -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5 -$as_echo "$gl_cv_func_strstr_linear" >&6; } - if test "$gl_cv_func_strstr_linear" != yes; then - REPLACE_STRSTR=1 - fi fi - if test $REPLACE_STRSTR = 1; then + GNULIB_UNSETENV=1 - gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - fi - # Code from module strstr-simple: +$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRSTR=1 + : + if test $ac_cv_func_vasnprintf = no; then - gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 -$as_echo_n "checking whether strstr works... " >&6; } -if test "${gl_cv_func_strstr_works_always+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + : -#ifdef __GNU_LIBRARY__ - #include - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - || defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_strstr_works_always=yes -else - gl_cv_func_strstr_works_always="guessing no" -fi -rm -f conftest* -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include /* for strstr */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P -int -main () -{ -return !!strstr (HAYSTACK, NEEDLE); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strstr_works_always=yes -else - gl_cv_func_strstr_works_always=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 -$as_echo "$gl_cv_func_strstr_works_always" >&6; } - if test "$gl_cv_func_strstr_works_always" != yes; then - REPLACE_STRSTR=1 + gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" - gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - fi + + + + + gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" + + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" + + if test $ac_cv_func_vasnprintf = yes; then + +$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h + fi - GNULIB_STRSTR=1 -$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h - # Code from module strtoimax: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines strtoimax as a macro" >&5 -$as_echo_n "checking whether defines strtoimax as a macro... " >&6; } -if test "${gl_cv_func_strtoimax_macro+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef strtoimax - inttypes_h_defines_strtoimax -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "inttypes_h_defines_strtoimax" >/dev/null 2>&1; then : - gl_cv_func_strtoimax_macro=yes + ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : + else - gl_cv_func_strtoimax_macro=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax_macro" >&5 -$as_echo "$gl_cv_func_strtoimax_macro" >&6; } +$as_echo "#define ptrdiff_t long" >>confdefs.h - if test "$gl_cv_func_strtoimax_macro" != yes; then +fi @@ -30195,277 +38414,553 @@ $as_echo "$gl_cv_func_strtoimax_macro" >&6; } - for ac_func in strtoimax -do : - ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" -if test "x$ac_cv_func_strtoimax" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOIMAX 1 -_ACEOF + fi -else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +# Check whether --with-packager was given. +if test "${with_packager+set}" = set; then : + withval=$with_packager; case $withval in + yes|no) ;; + *) +cat >>confdefs.h <<_ACEOF +#define PACKAGE_PACKAGER "$withval" +_ACEOF + ;; + esac fi -done - if test $ac_cv_func_strtoimax = no; then - ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoll" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 +# Check whether --with-packager-version was given. +if test "${with_packager_version+set}" = set; then : + withval=$with_packager_version; case $withval in + yes|no) ;; + *) +cat >>confdefs.h <<_ACEOF +#define PACKAGE_PACKAGER_VERSION "$withval" +_ACEOF + ;; + esac + fi + + +# Check whether --with-packager-bug-reports was given. +if test "${with_packager_bug_reports+set}" = set; then : + withval=$with_packager_bug_reports; case $withval in + yes|no) ;; + *) cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRTOLL $ac_have_decl +#define PACKAGE_PACKAGER_BUG_REPORTS "$withval" _ACEOF + ;; + esac +fi - fi + if test "X$with_packager" = "X" && \ + test "X$with_packager_version$with_packager_bug_reports" != "X" + then + as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5 fi - GNULIB_STRTOIMAX=1 - # Code from module strtol: + : + - for ac_func in strtol -do : - ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" -if test "x$ac_cv_func_strtol" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOL 1 -_ACEOF + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_wchar_h='<'wchar.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_wchar_h+:} false; then : + $as_echo_n "(cached) " >&6 else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + if test $ac_cv_header_wchar_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'wchar.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_wchar_h + gl_cv_next_wchar_h='"'$gl_header'"' + else + gl_cv_next_wchar_h='<'wchar.h'>' + fi + fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 +$as_echo "$gl_cv_next_wchar_h" >&6; } + fi + NEXT_WCHAR_H=$gl_cv_next_wchar_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'wchar.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_wchar_h + fi + NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive - # Code from module strtoll: + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 + else + HAVE_WCHAR_H=0 + fi - if test "$ac_cv_type_long_long_int" = yes; then + if test $gt_cv_c_wint_t = yes; then + HAVE_WINT_T=1 + else + HAVE_WINT_T=0 + fi + for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +#endif +#include - for ac_func in strtoll -do : - ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" -if test "x$ac_cv_func_strtoll" = x""yes; then : +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOLL 1 +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF -else + eval ac_cv_have_decl_$gl_func=yes +fi + done - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" -fi -done - if test $ac_cv_func_strtoll = no; then - HAVE_STRTOLL=0 - : - fi - fi - GNULIB_STRTOLL=1 + : -$as_echo "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h - # Code from module strtoul: + : + if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - for ac_func in strtoul -do : - ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" -if test "x$ac_cv_func_strtoul" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOUL 1 -_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 +$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } +if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + esac + if test $LOCALE_JA != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 1; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_incomplete_state=yes else + gl_cv_func_mbrtowc_incomplete_state=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + fi fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 +$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } - # Code from module strtoull: + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 +$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } +if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on Solaris 8. + solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; + esac + if test $LOCALE_ZH_CN != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + /* This fails on Solaris 8: + mbrtowc returns 2, and sets wc to 0x00F0. + mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; - if test "$ac_cv_type_unsigned_long_long_int" = yes; then + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 6, &state) != 4 + && mbtowc (&wc, input + 3, 6) == 4) + return 1; + } + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_sanitycheck=yes +else + gl_cv_func_mbrtowc_sanitycheck=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 +$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + REPLACE_MBSTATE_T=0 + case "$gl_cv_func_mbrtowc_incomplete_state" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + case "$gl_cv_func_mbrtowc_sanitycheck" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + else + REPLACE_MBSTATE_T=1 + fi + : + - for ac_func in strtoull -do : - ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" -if test "x$ac_cv_func_strtoull" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOULL 1 -_ACEOF -else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + if test $ac_cv_func_wcrtomb = no; then + HAVE_WCRTOMB=0 + ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" " +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_wcrtomb" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -done +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_WCRTOMB $ac_have_decl +_ACEOF - if test $ac_cv_func_strtoull = no; then - HAVE_STRTOULL=0 + if test $ac_cv_have_decl_wcrtomb = yes; then + REPLACE_WCRTOMB=1 + fi + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_WCRTOMB=1 + else + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5 +$as_echo_n "checking whether wcrtomb return value is correct... " >&6; } +if ${gl_cv_func_wcrtomb_retval+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on AIX 4, OSF/1 and Solaris. + aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_wcrtomb_retval="guessing yes" ;; + esac + if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + int result = 0; + if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) + { + if (wcrtomb (NULL, 0, NULL) != 1) + result |= 1; + } + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + if (wcrtomb (NULL, 0, NULL) != 1) + result |= 2; + } + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + if (wcrtomb (NULL, 0, NULL) != 1) + result |= 4; + } + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + if (wcrtomb (NULL, 0, NULL) != 1) + result |= 8; + } + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_wcrtomb_retval=yes +else + gl_cv_func_wcrtomb_retval=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - : + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5 +$as_echo "$gl_cv_func_wcrtomb_retval" >&6; } + case "$gl_cv_func_wcrtomb_retval" in + *yes) ;; + *) REPLACE_WCRTOMB=1 ;; + esac fi fi + if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then - GNULIB_STRTOULL=1 - - - -$as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h - - # Code from module strtoumax: - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines strtoumax as a macro" >&5 -$as_echo_n "checking whether defines strtoumax as a macro... " >&6; } -if test "${gl_cv_func_strtoumax_macro+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef strtoumax - inttypes_h_defines_strtoumax -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "inttypes_h_defines_strtoumax" >/dev/null 2>&1; then : - gl_cv_func_strtoumax_macro=yes -else - gl_cv_func_strtoumax_macro=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoumax_macro" >&5 -$as_echo "$gl_cv_func_strtoumax_macro" >&6; } - if test "$gl_cv_func_strtoumax_macro" != yes; then + gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext" + : + fi - for ac_func in strtoumax -do : - ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" -if test "x$ac_cv_func_strtoumax" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOUMAX 1 -_ACEOF + GNULIB_WCRTOMB=1 -else - gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" -fi -done - if test $ac_cv_func_strtoumax = no; then +$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h - ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" -if test "x$ac_cv_have_decl_strtoull" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRTOULL $ac_have_decl -_ACEOF - fi - fi + : - GNULIB_STRTOUMAX=1 - # Code from module sys_stat: + if test $ac_cv_func_iswcntrl = yes; then + HAVE_ISWCNTRL=1 + else + HAVE_ISWCNTRL=0 + fi + if test $gt_cv_c_wint_t = yes; then + HAVE_WINT_T=1 + else + HAVE_WINT_T=0 + fi @@ -30484,198 +38979,308 @@ _ACEOF if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_stat_h='<'sys/stat.h'>' + gl_cv_next_wctype_h='<'wctype.h'>' else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_sys_stat_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_wctype_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_sys_stat_h = yes; then + if test $ac_cv_header_wctype_h = yes; then + - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/sys/stat.h#{ - s#.*"\(.*/sys/stat.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'wctype.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_wctype_h + gl_cv_next_wctype_h='"'$gl_header'"' else - gl_cv_next_sys_stat_h='<'sys/stat.h'>' + gl_cv_next_wctype_h='<'wctype.h'>' fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 -$as_echo "$gl_cv_next_sys_stat_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 +$as_echo "$gl_cv_next_wctype_h" >&6; } fi - NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h + NEXT_WCTYPE_H=$gl_cv_next_wctype_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'sys/stat.h'>' + gl_next_as_first_directive='<'wctype.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_stat_h + gl_next_as_first_directive=$gl_cv_next_wctype_h fi - NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive - - - - - - ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include - #include -" -if test "x$ac_cv_type_nlink_t" = x""yes; then : - -else - -$as_echo "#define nlink_t int" >>confdefs.h + NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive -fi - for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : + if test $ac_cv_header_wctype_h = yes; then + if test $ac_cv_func_iswcntrl = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 +$as_echo_n "checking whether iswcntrl works... " >&6; } +if ${gl_cv_func_iswcntrl_works+:} false; then : $as_echo_n "(cached) " >&6 else + + if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - +#include + #if __GNU_LIBRARY__ == 1 + Linux libc5 i18n is broken. + #endif int main () { -#undef $gl_func - (void) $gl_func; + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" + gl_cv_func_iswcntrl_works="guessing yes" else - eval "$as_gl_Symbol=no" + gl_cv_func_iswcntrl_works="guessing no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - # Code from module sys_time: - - - - - # Code from module sys_wait: +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + /* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #include + int main () { return iswprint ('x') == 0; } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_iswcntrl_works=yes +else + gl_cv_func_iswcntrl_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 +$as_echo "$gl_cv_func_iswcntrl_works" >&6; } + fi + HAVE_WCTYPE_H=1 + else + HAVE_WCTYPE_H=0 + fi + case "$gl_cv_func_iswcntrl_works" in + *yes) REPLACE_ISWCNTRL=0 ;; + *) REPLACE_ISWCNTRL=1 ;; + esac + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then + : + fi - : + if test $REPLACE_ISWCNTRL = 1; then + REPLACE_TOWLOWER=1 + else + for ac_func in towlower +do : + ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" +if test "x$ac_cv_func_towlower" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_TOWLOWER 1 +_ACEOF +fi +done + if test $ac_cv_func_towlower = yes; then + REPLACE_TOWLOWER=0 + else + ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #if HAVE_WCTYPE_H + # include + #endif +" +if test "x$ac_cv_have_decl_towlower" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TOWLOWER $ac_have_decl +_ACEOF + if test $ac_cv_have_decl_towlower = yes; then + REPLACE_TOWLOWER=1 + else + REPLACE_TOWLOWER=0 + fi + fi + fi + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then + : + fi - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_wait_h='<'sys/wait.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_sys_wait_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 +$as_echo_n "checking for wctype_t... " >&6; } +if ${gl_cv_type_wctype_t+:} false; then : $as_echo_n "(cached) " >&6 else - - if test $ac_cv_header_sys_wait_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/sys/wait.h#{ - s#.*"\(.*/sys/wait.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_sys_wait_h='<'sys/wait.h'>' - fi +/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #if HAVE_WCTYPE_H + # include + #endif + wctype_t a; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_wctype_t=yes +else + gl_cv_type_wctype_t=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5 -$as_echo "$gl_cv_next_sys_wait_h" >&6; } - fi - NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'sys/wait.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_wait_h - fi - NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 +$as_echo "$gl_cv_type_wctype_t" >&6; } + if test $gl_cv_type_wctype_t = no; then + HAVE_WCTYPE_T=0 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 +$as_echo_n "checking for wctrans_t... " >&6; } +if ${gl_cv_type_wctrans_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #include + wctrans_t a; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_wctrans_t=yes +else + gl_cv_type_wctrans_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 +$as_echo "$gl_cv_type_wctrans_t" >&6; } + if test $gl_cv_type_wctrans_t = no; then + HAVE_WCTRANS_T=0 + fi - for gl_func in waitpid; do + for gl_func in wctype iswctype wctrans towctrans ; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +# include +#endif +#include + int main () { @@ -30695,7 +39300,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -30706,115 +39311,265 @@ fi - # Code from module time: - # Code from module time_r: + : - : + : + - if test $ac_cv_have_decl_localtime_r = no; then - HAVE_DECL_LOCALTIME_R=0 - fi - : + ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" " +/* AIX 3.2.5 declares wcwidth in . */ +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include +" +if test "x$ac_cv_have_decl_wcwidth" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_WCWIDTH $ac_have_decl +_ACEOF - if test $ac_cv_func_localtime_r = yes; then - HAVE_LOCALTIME_R=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 -$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } -if test "${gl_cv_time_r_posix+set}" = set; then : + if test $ac_cv_have_decl_wcwidth != yes; then + HAVE_DECL_WCWIDTH=0 + fi + + if test $ac_cv_func_wcwidth = yes; then + HAVE_WCWIDTH=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5 +$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; } +if ${gl_cv_func_wcwidth_works+:} false; then : $as_echo_n "(cached) " >&6 else + + if test "$cross_compiling" = yes; then : + + case "$host_os" in + # Guess yes on glibc and AIX 7 systems. + *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; + *) gl_cv_func_wcwidth_works="guessing no";; + esac + +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + +#include +/* AIX 3.2.5 declares wcwidth in . */ +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include #include -int -main () +#include +#if !HAVE_DECL_WCWIDTH +extern +# ifdef __cplusplus +"C" +# endif +int wcwidth (int); +#endif +int main () { -/* We don't need to append 'restrict's to the argument types, - even though the POSIX signature has the 'restrict's, - since C99 says they can't affect type compatibility. */ - struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; - if (ptr) return 0; - /* Check the return type is a pointer. - On HP-UX 10 it is 'int'. */ - *localtime_r (0, 0); - ; - return 0; + int result = 0; + if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL) + { + if (wcwidth (0x0301) > 0) + result |= 1; + if (wcwidth (0x05B0) > 0) + result |= 2; + if (wcwidth (0x200B) > 0) + result |= 4; + } + return result; } - _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_time_r_posix=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_wcwidth_works=yes else - gl_cv_time_r_posix=no + gl_cv_func_wcwidth_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 -$as_echo "$gl_cv_time_r_posix" >&6; } - if test $gl_cv_time_r_posix = yes; then - REPLACE_LOCALTIME_R=0 - else - REPLACE_LOCALTIME_R=1 - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5 +$as_echo "$gl_cv_func_wcwidth_works" >&6; } + case "$gl_cv_func_wcwidth_works" in + *yes) ;; + *no) REPLACE_WCWIDTH=1 ;; + esac else - HAVE_LOCALTIME_R=0 + HAVE_WCWIDTH=0 fi - if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then + + if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext" + + fi + + + + + + GNULIB_WCWIDTH=1 + + + + + +$as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h + + + + : + + : + + + + for ac_header in stdint.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" +if test "x$ac_cv_header_stdint_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H 1 +_ACEOF + +fi + +done + + + + + : + + + + : + + + : + + + : + + # End of code from modules + + + + + + + + + + gltests_libdeps= + gltests_ltlibdeps= + + + + + + + + gl_source_base='tests' + gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS + gl_module_indicator_condition=$gltests_WITNESS + if test "$ac_cv_header_winsock2_h" = yes; then - gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" - : + + + + gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext" fi - GNULIB_TIME_R=1 + if test "$GNULIB_ACCEPT" != 1; then + if test "$GNULIB_ACCEPT" = 0; then + GNULIB_ACCEPT=$gl_module_indicator_condition + else + GNULIB_ACCEPT="($GNULIB_ACCEPT || $gl_module_indicator_condition)" + fi + fi -$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h - # Code from module timespec: +$as_echo "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h + + - # Code from module unistd: + + + : + + if test $ac_cv_header_arpa_inet_h = yes; then + HAVE_ARPA_INET_H=1 + else + HAVE_ARPA_INET_H=0 + fi + @@ -30831,83 +39586,96 @@ $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h if test $gl_cv_have_include_next = yes; then - gl_cv_next_unistd_h='<'unistd.h'>' + gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_unistd_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_arpa_inet_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_unistd_h = yes; then + if test $ac_cv_header_arpa_inet_h = yes; then + - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/unistd.h#{ - s#.*"\(.*/unistd.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'arpa/inet.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_arpa_inet_h + gl_cv_next_arpa_inet_h='"'$gl_header'"' else - gl_cv_next_unistd_h='<'unistd.h'>' + gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 -$as_echo "$gl_cv_next_unistd_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5 +$as_echo "$gl_cv_next_arpa_inet_h" >&6; } fi - NEXT_UNISTD_H=$gl_cv_next_unistd_h + NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'unistd.h'>' + gl_next_as_first_directive='<'arpa/inet.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_unistd_h + gl_next_as_first_directive=$gl_cv_next_arpa_inet_h fi - NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive + - if test $ac_cv_header_unistd_h = yes; then - HAVE_UNISTD_H=1 - else - HAVE_UNISTD_H=0 - fi - for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do + for gl_func in inet_ntop inet_pton; do as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -/* Some systems declare various items in the wrong headers. */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include -# endif + +/* On some systems, this header is not self-consistent. */ +#if !(defined __GLIBC__ || defined __UCLIBC__) +# include #endif +#ifdef __TANDEM +# include +#endif +#include int main () @@ -30928,7 +39696,7 @@ fi eval ac_res=\$$as_gl_Symbol { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 _ACEOF @@ -30938,491 +39706,694 @@ fi done - # Code from module unistd-safer: - - - : - - - - - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS dup-safer.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS fd-safer.$ac_objext" - - - - + if test "$ac_cv_header_winsock2_h" = yes; then - gl_LIBOBJS="$gl_LIBOBJS pipe-safer.$ac_objext" - # Code from module unitypes: - - - if { test "$HAVE_LIBUNISTRING" != yes \ - || { - - - - test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ - || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ - && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ - || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 - } - } - } + gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext" - } - }; then - LIBUNISTRING_UNITYPES_H='unitypes.h' - else - LIBUNISTRING_UNITYPES_H= fi - # Code from module uniwidth/base: - - - if { test "$HAVE_LIBUNISTRING" != yes \ - || { - test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ - || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ - && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ - || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 - } - } - } + if test "$GNULIB_BIND" != 1; then + if test "$GNULIB_BIND" = 0; then + GNULIB_BIND=$gl_module_indicator_condition + else + GNULIB_BIND="($GNULIB_BIND || $gl_module_indicator_condition)" + fi + fi - } - }; then - LIBUNISTRING_UNIWIDTH_H='uniwidth.h' - else - LIBUNISTRING_UNIWIDTH_H= - fi +$as_echo "#define GNULIB_TEST_BIND 1" >>confdefs.h - # Code from module uniwidth/width: - if { test "$HAVE_LIBUNISTRING" != yes \ - || { - test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ - || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ - && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ - || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4 - } - } - } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 +$as_echo_n "checking for a traditional french locale... " >&6; } +if ${gt_cv_locale_fr+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { + /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else + if (setlocale (LC_ALL, "") == NULL) return 1; +#endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +#if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +#endif +#ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#endif + /* Check whether in the abbreviation of the second month, the second + character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only + one byte long. This excludes the UTF-8 encoding. */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ + /* Check whether the decimal separator is a comma. + On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point + are nl_langinfo(RADIXCHAR) are both ".". */ + if (localeconv () ->decimal_point[0] != ',') return 1; +#endif + return 0; +} +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the native Windows locale name. + if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=French_France.1252 + else + # None found. + gt_cv_locale_fr=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.ISO-8859-1 + else + # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. + if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.ISO8859-1 + else + # Test for the HP-UX locale name. + if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.iso88591 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr + else + # None found. + gt_cv_locale_fr=none + fi + fi + fi + fi + fi + ;; + esac + fi + rm -fr conftest* - } - }; then - LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE= - LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#' -else - LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#' - LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE= fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 +$as_echo "$gt_cv_locale_fr" >&6; } + LOCALE_FR=$gt_cv_locale_fr - # Code from module unlink: - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5 -$as_echo_n "checking whether unlink honors trailing slashes... " >&6; } -if test "${gl_cv_func_unlink_honors_slashes+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 +$as_echo_n "checking for a french Unicode locale... " >&6; } +if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else - touch conftest.file - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.file conftest.lnk - fi - if test "$cross_compiling" = yes; then : - gl_cv_func_unlink_honors_slashes="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include -int -main () -{ -int result = 0; - if (!unlink ("conftest.file/")) - result |= 1; - else if (errno != ENOTDIR) - result |= 2; -#if HAVE_LSTAT - if (!unlink ("conftest.lnk/")) - result |= 4; - else if (errno != ENOTDIR) - result |= 8; +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if !(defined __BEOS__ || defined __HAIKU__) + /* Check whether the given locale name is recognized by the system. */ +# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +# else + if (setlocale (LC_ALL, "") == NULL) return 1; +# endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. */ +# if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + return 1; + } +# endif +# ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +# endif + /* Check whether in the abbreviation of the second month, the second + character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is + two bytes long, with UTF-8 encoding. */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%b", &t) < 4 + || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') + return 1; +#endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ + /* Check whether the decimal separator is a comma. + On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point + are nl_langinfo(RADIXCHAR) are both ".". */ + if (localeconv () ->decimal_point[0] != ',') return 1; #endif - return result; - - ; return 0; } + _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_unlink_honors_slashes=yes -else - gl_cv_func_unlink_honors_slashes=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=French_France.65001 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR.UTF-8 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr.UTF-8 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + fi + fi + ;; + esac + fi + rm -fr conftest* - rm -f conftest.file conftest.lnk fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5 -$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5 -$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; } -if test "${gl_cv_func_unlink_parent_fails+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 +$as_echo "$gt_cv_locale_fr_utf8" >&6; } + LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 +$as_echo_n "checking for a traditional french locale... " >&6; } +if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else - case "$host_os" in - darwin*) - if { - # Use the mktemp program if available. If not available, hide the error - # message. - tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" - } || - { - # Use a simple mkdir command. It is guaranteed to fail if the directory - # already exists. $RANDOM is bash specific and expands to empty in shells - # other than bash, ksh and zsh. Its use does not increase security; - # rather, it minimizes the probability of failure in a very cluttered /tmp - # directory. - tmp=/tmp/gt$$-$RANDOM - (umask 077 && mkdir "$tmp") - }; then - mkdir "$tmp/subdir" - GL_SUBDIR_FOR_UNLINK="$tmp/subdir" - export GL_SUBDIR_FOR_UNLINK - if test "$cross_compiling" = yes; then : - gl_cv_func_unlink_parent_fails="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - int main () - { - int result = 0; - if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0) - result |= 1; - else if (unlink ("..") == 0) - result |= 2; - return result; - } +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { + /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else + if (setlocale (LC_ALL, "") == NULL) return 1; +#endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +#if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +#endif +#ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#endif + /* Check whether in the abbreviation of the second month, the second + character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only + one byte long. This excludes the UTF-8 encoding. */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ + /* Check whether the decimal separator is a comma. + On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point + are nl_langinfo(RADIXCHAR) are both ".". */ + if (localeconv () ->decimal_point[0] != ',') return 1; +#endif + return 0; +} _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_unlink_parent_fails=yes -else - gl_cv_func_unlink_parent_fails=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - unset GL_SUBDIR_FOR_UNLINK - rm -rf "$tmp" - else - gl_cv_func_unlink_parent_fails="guessing no" - fi - ;; - *) - gl_cv_func_unlink_parent_fails="guessing yes" - ;; - esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the native Windows locale name. + if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=French_France.1252 + else + # None found. + gt_cv_locale_fr=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.ISO-8859-1 + else + # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. + if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.ISO8859-1 + else + # Test for the HP-UX locale name. + if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.iso88591 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr + else + # None found. + gt_cv_locale_fr=none + fi + fi + fi + fi + fi + ;; + esac + fi + rm -fr conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5 -$as_echo "$gl_cv_func_unlink_parent_fails" >&6; } - case "$gl_cv_func_unlink_parent_fails" in - *no) - -$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h - - ;; - esac - if test "$gl_cv_func_unlink_honors_slashes" != yes \ - || { case "$gl_cv_func_unlink_parent_fails" in - *yes) false;; - *no) true;; - esac - }; then - REPLACE_UNLINK=1 - - - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 +$as_echo "$gt_cv_locale_fr" >&6; } + LOCALE_FR=$gt_cv_locale_fr - gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext" - fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5 +$as_echo_n "checking for a turkish Unicode locale... " >&6; } +if ${gt_cv_locale_tr_utf8+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - GNULIB_UNLINK=1 +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { + /* On BeOS, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. But BeOS does not + implement the Turkish upper-/lowercase mappings. Therefore, let this + program return 1 on BeOS. */ + /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else + if (setlocale (LC_ALL, "") == NULL) return 1; +#endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. */ +#if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + return 1; + } +#endif +#ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#endif + /* Check whether in the abbreviation of the eighth month, the second + character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is + two bytes long, with UTF-8 encoding. */ + t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; + if (strftime (buf, sizeof (buf), "%b", &t) < 4 + || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) + return 1; + /* Check whether the upper-/lowercase mappings are as expected for + Turkish. */ + if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' + || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) + return 1; + return 0; +} +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=Turkish_Turkey.65001 + else + # None found. + gt_cv_locale_tr_utf8=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr_TR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr_TR.UTF-8 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr.UTF-8 + else + # None found. + gt_cv_locale_tr_utf8=none + fi + fi + fi + ;; + esac + else + gt_cv_locale_tr_utf8=none + fi + rm -fr conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5 +$as_echo "$gt_cv_locale_tr_utf8" >&6; } + LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 -$as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h + if test "$ac_cv_header_winsock2_h" = yes; then - # Code from module unsetenv: - : + gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext" - if test $ac_cv_have_decl_unsetenv = no; then - HAVE_DECL_UNSETENV=0 fi - for ac_func in unsetenv -do : - ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" -if test "x$ac_cv_func_unsetenv" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_UNSETENV 1 -_ACEOF -fi -done - if test $ac_cv_func_unsetenv = no; then + if test "$GNULIB_CONNECT" != 1; then + if test "$GNULIB_CONNECT" = 0; then + GNULIB_CONNECT=$gl_module_indicator_condition + else + GNULIB_CONNECT="($GNULIB_CONNECT || $gl_module_indicator_condition)" + fi + fi - gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" +$as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h - : +cat >>confdefs.h <<_ACEOF +#define GNULIB_FD_SAFER_FLAG $gl_module_indicator_condition +_ACEOF + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_FDOPEN=1 else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 -$as_echo_n "checking for unsetenv() return type... " >&6; } -if test "${gt_cv_func_unsetenv_ret+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5 +$as_echo_n "checking whether fdopen sets errno... " >&6; } +if ${gl_cv_func_fdopen_works+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#undef _BSD -#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */ -#include -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -int unsetenv (const char *name); -#else -int unsetenv(); -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_func_unsetenv_ret='int' -else - gt_cv_func_unsetenv_ret='void' -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5 -$as_echo "$gt_cv_func_unsetenv_ret" >&6; } - if test $gt_cv_func_unsetenv_ret = 'void'; then - -$as_echo "#define VOID_UNSETENV 1" >>confdefs.h - - REPLACE_UNSETENV=1 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" - fi + if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) gl_cv_func_fdopen_works="guessing no" ;; + *) gl_cv_func_fdopen_works="guessing yes" ;; + esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 -$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } -if test "${gl_cv_func_unsetenv_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_unsetenv_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include - #include - extern char **environ; - +#include +#include int -main () +main (void) { - - char entry1[] = "a=1"; - char entry2[] = "b=2"; - char *env[] = { entry1, entry2, NULL }; - if (putenv ((char *) "a=1")) return 1; - if (putenv (entry2)) return 2; - entry2[0] = 'a'; - unsetenv ("a"); - if (getenv ("a")) return 3; - if (!unsetenv ("") || errno != EINVAL) return 4; - entry2[0] = 'b'; - environ = env; - if (!getenv ("a")) return 5; - entry2[0] = 'a'; - unsetenv ("a"); - if (getenv ("a")) return 6; - - ; + FILE *fp; + errno = 0; + fp = fdopen (-1, "r"); + if (fp == NULL && errno == 0) + return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_unsetenv_works=yes + gl_cv_func_fdopen_works=yes else - gl_cv_func_unsetenv_works=no + gl_cv_func_fdopen_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 -$as_echo "$gl_cv_func_unsetenv_works" >&6; } - if test "$gl_cv_func_unsetenv_works" != yes; then - REPLACE_UNSETENV=1 - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" - - fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5 +$as_echo "$gl_cv_func_fdopen_works" >&6; } + case "$gl_cv_func_fdopen_works" in + *no) REPLACE_FDOPEN=1 ;; + esac fi + if test $REPLACE_FDOPEN = 1; then - GNULIB_UNSETENV=1 - -$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h - - - - # Code from module unused-parameter: - # Code from module update-copyright: - # Code from module useless-if-before-free: - # Code from module vasnprintf: - : + gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext" + fi - if test $ac_cv_func_vasnprintf = no; then - : + if test "$GNULIB_FDOPEN" != 1; then + if test "$GNULIB_FDOPEN" = 0; then + GNULIB_FDOPEN=$gl_module_indicator_condition + else + GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)" + fi + fi +$as_echo "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h @@ -31430,539 +40401,660 @@ $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" + : + if test $ac_cv_func_ftruncate = yes; then - gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" + case "$host_os" in + mingw*) + REPLACE_FTRUNCATE=1 + ;; + esac + else + HAVE_FTRUNCATE=0 + fi + if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then - gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" + gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext" + for ac_func in chsize +do : + ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize" +if test "x$ac_cv_func_chsize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CHSIZE 1 +_ACEOF +fi +done + fi - gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" - if test $ac_cv_func_vasnprintf = yes; then -$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h + if test "$GNULIB_FTRUNCATE" != 1; then + if test "$GNULIB_FTRUNCATE" = 0; then + GNULIB_FTRUNCATE=$gl_module_indicator_condition + else + GNULIB_FTRUNCATE="($GNULIB_FTRUNCATE || $gl_module_indicator_condition)" + fi fi +$as_echo "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h - ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : - -else - -$as_echo "#define ptrdiff_t long" >>confdefs.h - + for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF fi +done + if test $ac_cv_func_getpagesize = no; then + HAVE_GETPAGESIZE=0 + for ac_header in OS.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default" +if test "x$ac_cv_header_OS_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OS_H 1 +_ACEOF +fi +done - - - - fi - - # Code from module vc-list-files: - # Code from module verify: - # Code from module version-etc: - -# Check whether --with-packager was given. -if test "${with_packager+set}" = set; then : - withval=$with_packager; case $withval in - yes|no) ;; - *) -cat >>confdefs.h <<_ACEOF -#define PACKAGE_PACKAGER "$withval" + if test $ac_cv_header_OS_h = yes; then + HAVE_OS_H=1 + fi + for ac_header in sys/param.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_param_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_PARAM_H 1 _ACEOF - ;; - esac fi +done + if test $ac_cv_header_sys_param_h = yes; then + HAVE_SYS_PARAM_H=1 + fi + fi + case "$host_os" in + mingw*) + REPLACE_GETPAGESIZE=1 + ;; + esac + ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" +if test "x$ac_cv_have_decl_getpagesize" = xyes; then : -# Check whether --with-packager-version was given. -if test "${with_packager_version+set}" = set; then : - withval=$with_packager_version; case $withval in - yes|no) ;; - *) -cat >>confdefs.h <<_ACEOF -#define PACKAGE_PACKAGER_VERSION "$withval" -_ACEOF - ;; - esac - +else + HAVE_DECL_GETPAGESIZE=0 fi + if test $REPLACE_GETPAGESIZE = 1; then -# Check whether --with-packager-bug-reports was given. -if test "${with_packager_bug_reports+set}" = set; then : - withval=$with_packager_bug_reports; case $withval in - yes|no) ;; - *) -cat >>confdefs.h <<_ACEOF -#define PACKAGE_PACKAGER_BUG_REPORTS "$withval" -_ACEOF - ;; - esac - -fi - if test "X$with_packager" = "X" && \ - test "X$with_packager_version$with_packager_bug_reports" != "X" - then - as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5 - fi - # Code from module version-etc-fsf: - # Code from module warn-on-use: - # Code from module warnings: - # Code from module wchar: + gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext" + fi - : + if test "$GNULIB_GETPAGESIZE" != 1; then + if test "$GNULIB_GETPAGESIZE" = 0; then + GNULIB_GETPAGESIZE=$gl_module_indicator_condition + else + GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)" + fi + fi +$as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h - if test $gl_cv_have_include_next = yes; then - gl_cv_next_wchar_h='<'wchar.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_wchar_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test $ac_cv_header_wchar_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/wchar.h#{ - s#.*"\(.*/wchar.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_wchar_h='<'wchar.h'>' - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 -$as_echo "$gl_cv_next_wchar_h" >&6; } - fi - NEXT_WCHAR_H=$gl_cv_next_wchar_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'wchar.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_wchar_h - fi - NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive + HAVE_INET_PTON=1 + INET_PTON_LIB= - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi + : - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 else - HAVE_WINT_T=0 + HAVE_WINSOCK2_H=0 fi + if test $HAVE_WINSOCK2_H = 1; then + ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include +" +if test "x$ac_cv_have_decl_inet_pton" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi - for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_INET_PTON $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_inet_pton = yes; then + REPLACE_INET_PTON=1 + INET_PTON_LIB="-lws2_32" + else + HAVE_DECL_INET_PTON=0 + HAVE_INET_PTON=0 + fi + else + gl_save_LIBS=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5 +$as_echo_n "checking for library containing inet_pton... " >&6; } +if ${ac_cv_search_inet_pton+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" #endif -#include - +char inet_pton (); int main () { -#undef $gl_func - (void) $gl_func; +return inet_pton (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" +for ac_lib in '' nsl resolv; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_inet_pton=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_inet_pton+:} false; then : + break +fi +done +if ${ac_cv_search_inet_pton+:} false; then : + else - eval "$as_gl_Symbol=no" + ac_cv_search_inet_pton=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5 +$as_echo "$ac_cv_search_inet_pton" >&6; } +ac_res=$ac_cv_search_inet_pton +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + for ac_func in inet_pton +do : + ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" +if test "x$ac_cv_func_inet_pton" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +#define HAVE_INET_PTON 1 _ACEOF - eval ac_cv_have_decl_$gl_func=yes fi - done +done + if test $ac_cv_func_inet_pton = no; then + HAVE_INET_PTON=0 + fi - # Code from module wcrtomb: +fi + LIBS=$gl_save_LIBS + if test "$ac_cv_search_inet_pton" != "no" \ + && test "$ac_cv_search_inet_pton" != "none required"; then + INET_PTON_LIB="$ac_cv_search_inet_pton" + fi + : - : + ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include + #if HAVE_NETDB_H + # include + #endif + +" +if test "x$ac_cv_have_decl_inet_pton" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_INET_PTON $ac_have_decl +_ACEOF + if test $ac_cv_have_decl_inet_pton = no; then + HAVE_DECL_INET_PTON=0 + fi + fi + if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then - : - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 -$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then : + + + fi + + + + + + if test "$GNULIB_INET_PTON" != 1; then + if test "$GNULIB_INET_PTON" = 0; then + GNULIB_INET_PTON=$gl_module_indicator_condition + else + GNULIB_INET_PTON="($GNULIB_INET_PTON || $gl_module_indicator_condition)" + fi + fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac - if test $LOCALE_JA != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + #include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () +int +main () { - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 1; - } + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_incomplete_state=yes -else - gl_cv_func_mbrtowc_incomplete_state=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include - fi +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 -$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 -$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then : - $as_echo_n "(cached) " >&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () +$ac_includes_default +int +main () { - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 1; - } + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_sanitycheck=yes + ac_cv_c_bigendian=no else - gl_cv_func_mbrtowc_sanitycheck=no + ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi - + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 -$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 - fi - if test $REPLACE_MBSTATE_T = 1; then +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h - : + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac - fi : + : + : + : + : - if test $ac_cv_func_wcrtomb = no; then - HAVE_WCRTOMB=0 + HAVE_IOCTL=1 + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_IOCTL=0 else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_WCRTOMB=1 - else - - - + for ac_func in ioctl +do : + ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl" +if test "x$ac_cv_func_ioctl" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IOCTL 1 +_ACEOF +fi +done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5 -$as_echo_n "checking whether wcrtomb return value is correct... " >&6; } -if test "${gl_cv_func_wcrtomb_retval+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5 +$as_echo_n "checking for ioctl with POSIX signature... " >&6; } +if ${gl_cv_func_ioctl_posix_signature+:} false; then : $as_echo_n "(cached) " >&6 else - - case "$host_os" in - # Guess no on AIX 4, OSF/1 and Solaris. - aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_wcrtomb_retval="guessing yes" ;; - esac - if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : -else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () +#include +int +main () { - int result = 0; - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 1; - } - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 2; - } - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 4; - } - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 8; - } - return result; +extern + #ifdef __cplusplus + "C" + #endif + int ioctl (int, int, ...); + + ; + return 0; } + _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_wcrtomb_retval=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_ioctl_posix_signature=yes else - gl_cv_func_wcrtomb_retval=no + gl_cv_func_ioctl_posix_signature=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5 -$as_echo "$gl_cv_func_wcrtomb_retval" >&6; } - case "$gl_cv_func_wcrtomb_retval" in - *yes) ;; - *) REPLACE_WCRTOMB=1 ;; - esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5 +$as_echo "$gl_cv_func_ioctl_posix_signature" >&6; } + if test $gl_cv_func_ioctl_posix_signature != yes; then + REPLACE_IOCTL=1 fi fi - if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then - - : - + if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then @@ -31970,884 +41062,1800 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } - gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext" - - : + gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext" fi - GNULIB_WCRTOMB=1 - - - -$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h - - - - # Code from module wctype-h: - - - - - - : - - - - - if test $ac_cv_func_iswcntrl = yes; then - HAVE_ISWCNTRL=1 - else - HAVE_ISWCNTRL=0 + if test "$GNULIB_IOCTL" != 1; then + if test "$GNULIB_IOCTL" = 0; then + GNULIB_IOCTL=$gl_module_indicator_condition + else + GNULIB_IOCTL="($GNULIB_IOCTL || $gl_module_indicator_condition)" + fi fi - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 - fi - +$as_echo "#define GNULIB_TEST_IOCTL 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 +$as_echo_n "checking where to find the exponent in a 'float'... " >&6; } +if ${gl_cv_cc_float_expbit0+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gl_cv_cc_float_expbit0="word 0 bit 23" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { float value; unsigned int word[NWORDS]; } memory_float; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (float x) +{ + memory_float m; + size_t i; + /* Clear it first, in case + sizeof (float) < sizeof (memory_float). */ + memset (&m, 0, sizeof (memory_float)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25f); + add_to_ored_words (0.5f); + add_to_ored_words (1.0f); + add_to_ored_words (2.0f); + add_to_ored_words (4.0f); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} - : +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_float_expbit0=`cat conftest.out` +else + gl_cv_cc_float_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 +$as_echo "$gl_cv_cc_float_expbit0" >&6; } + case "$gl_cv_cc_float_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_WORD $word +_ACEOF +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_BIT $bit +_ACEOF + ;; + esac - if test $gl_cv_have_include_next = yes; then - gl_cv_next_wctype_h='<'wctype.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_wctype_h+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 +$as_echo_n "checking where to find the exponent in a 'double'... " >&6; } +if ${gl_cv_cc_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_wctype_h = yes; then - + if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/wctype.h#{ - s#.*"\(.*/wctype.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' - else - gl_cv_next_wctype_h='<'wctype.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 -$as_echo "$gl_cv_next_wctype_h" >&6; } - fi - NEXT_WCTYPE_H=$gl_cv_next_wctype_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'wctype.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_wctype_h - fi - NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive - +#if defined arm || defined __arm || defined __arm__ + mixed_endianness +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "mixed_endianness" >/dev/null 2>&1; then : + gl_cv_cc_double_expbit0="unknown" +else - if test $ac_cv_header_wctype_h = yes; then - if test $ac_cv_func_iswcntrl = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 -$as_echo_n "checking whether iswcntrl works... " >&6; } -if test "${gl_cv_func_iswcntrl_works+set}" = set; then : + : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #if __GNU_LIBRARY__ == 1 - Linux libc5 i18n is broken. - #endif +#include + #include + int main () { +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_iswcntrl_works=yes -else - gl_cv_func_iswcntrl_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include + #include - /* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #include - int main () { return iswprint ('x') == 0; } +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + ; + return 0; +} _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_iswcntrl_works=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes else - gl_cv_func_iswcntrl_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_cv_c_bigendian=no fi - - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 -$as_echo "$gl_cv_func_iswcntrl_works" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - HAVE_WCTYPE_H=1 - else - HAVE_WCTYPE_H=0 - fi - - - if test "$gl_cv_func_iswcntrl_works" = no; then - REPLACE_ISWCNTRL=1 - else - REPLACE_ISWCNTRL=0 - fi - + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then - : - fi +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 -$as_echo_n "checking for wctype_t... " >&6; } -if test "${gl_cv_type_wctype_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #if HAVE_WCTYPE_H - # include - #endif - wctype_t a; +#include int main () { +#ifndef _BIG_ENDIAN + not big endian + #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_type_wctype_t=yes + ac_cv_c_bigendian=yes else - gl_cv_type_wctype_t=no + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 -$as_echo "$gl_cv_type_wctype_t" >&6; } - if test $gl_cv_type_wctype_t = no; then - HAVE_WCTYPE_T=0 - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 -$as_echo_n "checking for wctrans_t... " >&6; } -if test "${gl_cv_type_wctrans_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #include - wctrans_t a; +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; int main () { - +return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_type_wctrans_t=yes -else - gl_cv_type_wctrans_t=no + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 -$as_echo "$gl_cv_type_wctrans_t" >&6; } - if test $gl_cv_type_wctrans_t = no; then - HAVE_WCTRANS_T=0 - fi - - - for gl_func in wctype iswctype wctrans towctrans ; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval "test \"\${$as_gl_Symbol+set}\"" = set; then : - $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# include -#endif -#include - +$ac_includes_default int main () { -#undef $gl_func - (void) $gl_func; + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no else - eval "$as_gl_Symbol=no" + ac_cv_c_bigendian=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - eval ac_cv_have_decl_$gl_func=yes + fi fi - done - - - # Code from module wcwidth: +: + case $ac_cv_c_bigendian in #( + yes) + gl_cv_cc_double_expbit0="word 0 bit 20";; #( + no) + gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( + universal) +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + ;; #( + *) + gl_cv_cc_double_expbit0="unknown" ;; + esac +fi +rm -f conftest* +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { double value; unsigned int word[NWORDS]; } memory_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (double x) +{ + memory_double m; + size_t i; + /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ + memset (&m, 0, sizeof (memory_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25); + add_to_ored_words (0.5); + add_to_ored_words (1.0); + add_to_ored_words (2.0); + add_to_ored_words (4.0); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_double_expbit0=`cat conftest.out` +else + gl_cv_cc_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - : + rm -f conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 +$as_echo "$gl_cv_cc_double_expbit0" >&6; } + case "$gl_cv_cc_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_WORD $word +_ACEOF +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_BIT $bit +_ACEOF + ;; + esac - : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 +$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } +if ${gl_cv_cc_long_double_expbit0+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gl_cv_cc_long_double_expbit0="unknown" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" " -/* AIX 3.2.5 declares wcwidth in . */ -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ +#include #include #include -#include -#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { long double value; unsigned int word[NWORDS]; } + memory_long_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (long double x) +{ + memory_long_double m; + size_t i; + /* Clear it first, in case + sizeof (long double) < sizeof (memory_long_double). */ + memset (&m, 0, sizeof (memory_long_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25L); + add_to_ored_words (0.5L); + add_to_ored_words (1.0L); + add_to_ored_words (2.0L); + add_to_ored_words (4.0L); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} -" -if test "x$ac_cv_have_decl_wcwidth" = x""yes; then : - ac_have_decl=1 +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_long_double_expbit0=`cat conftest.out` else - ac_have_decl=0 + gl_cv_cc_long_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + rm -f conftest.out + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 +$as_echo "$gl_cv_cc_long_double_expbit0" >&6; } + case "$gl_cv_cc_long_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` + cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_WCWIDTH $ac_have_decl +#define LDBL_EXPBIT0_WORD $word _ACEOF - if test $ac_cv_have_decl_wcwidth != yes; then - HAVE_DECL_WCWIDTH=0 - fi - if test $ac_cv_func_wcwidth = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5 -$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; } -if test "${gl_cv_func_wcwidth_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_BIT $bit +_ACEOF - if test "$cross_compiling" = yes; then : + ;; + esac - case "$host_os" in - # Guess yes on glibc and AIX 7 systems. - *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; - *) gl_cv_func_wcwidth_works="guessing no";; - esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 +$as_echo_n "checking where to find the exponent in a 'float'... " >&6; } +if ${gl_cv_cc_float_expbit0+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + gl_cv_cc_float_expbit0="word 0 bit 23" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -/* AIX 3.2.5 declares wcwidth in . */ -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ +#include #include #include -#include -#include -#if !HAVE_DECL_WCWIDTH -extern -# ifdef __cplusplus -"C" -# endif -int wcwidth (int); -#endif +#include +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { float value; unsigned int word[NWORDS]; } memory_float; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (float x) +{ + memory_float m; + size_t i; + /* Clear it first, in case + sizeof (float) < sizeof (memory_float). */ + memset (&m, 0, sizeof (memory_float)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} int main () { - int result = 0; - if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL) + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25f); + add_to_ored_words (0.5f); + add_to_ored_words (1.0f); + add_to_ored_words (2.0f); + add_to_ored_words (4.0f); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) { - if (wcwidth (0x0301) > 0) - result |= 1; - if (wcwidth (0x200B) > 0) - result |= 2; + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } } - return result; + fprintf (fp, "unknown"); + return (fclose (fp) != 0); } + _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_wcwidth_works=yes + gl_cv_cc_float_expbit0=`cat conftest.out` else - gl_cv_func_wcwidth_works=no + gl_cv_cc_float_expbit0="unknown" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + rm -f conftest.out fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5 -$as_echo "$gl_cv_func_wcwidth_works" >&6; } - case "$gl_cv_func_wcwidth_works" in - *yes) ;; - *no) REPLACE_WCWIDTH=1 ;; - esac - fi - if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 +$as_echo "$gl_cv_cc_float_expbit0" >&6; } + case "$gl_cv_cc_float_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_WORD $word +_ACEOF +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_BIT $bit +_ACEOF + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 +$as_echo_n "checking where to find the exponent in a 'double'... " >&6; } +if ${gl_cv_cc_double_expbit0+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : - gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - fi - if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1 \ - || test $HAVE_DECL_WCWIDTH = 0; then +#if defined arm || defined __arm || defined __arm__ + mixed_endianness +#endif - : +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "mixed_endianness" >/dev/null 2>&1; then : + gl_cv_cc_double_expbit0="unknown" +else - fi + : +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif - GNULIB_WCWIDTH=1 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; -$as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi +fi +: + case $ac_cv_c_bigendian in #( + yes) + gl_cv_cc_double_expbit0="word 0 bit 20";; #( + no) + gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + ;; #( + *) + gl_cv_cc_double_expbit0="unknown" ;; + esac - # Code from module xalloc: +fi +rm -f conftest* +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { double value; unsigned int word[NWORDS]; } memory_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (double x) +{ + memory_double m; + size_t i; + /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ + memset (&m, 0, sizeof (memory_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25); + add_to_ored_words (0.5); + add_to_ored_words (1.0); + add_to_ored_words (2.0); + add_to_ored_words (4.0); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_double_expbit0=`cat conftest.out` +else + gl_cv_cc_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 +$as_echo "$gl_cv_cc_double_expbit0" >&6; } + case "$gl_cv_cc_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_WORD $word +_ACEOF - gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext" +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_BIT $bit +_ACEOF + ;; + esac - : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 +$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } +if ${gl_cv_cc_long_double_expbit0+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : - : + gl_cv_cc_long_double_expbit0="unknown" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # Code from module xalloc-die: - # Code from module xgetcwd: +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { long double value; unsigned int word[NWORDS]; } + memory_long_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (long double x) +{ + memory_long_double m; + size_t i; + /* Clear it first, in case + sizeof (long double) < sizeof (memory_long_double). */ + memset (&m, 0, sizeof (memory_long_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25L); + add_to_ored_words (0.5L); + add_to_ored_words (1.0L); + add_to_ored_words (2.0L); + add_to_ored_words (4.0L); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_long_double_expbit0=`cat conftest.out` +else + gl_cv_cc_long_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 +$as_echo "$gl_cv_cc_long_double_expbit0" >&6; } + case "$gl_cv_cc_long_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_WORD $word +_ACEOF +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_BIT $bit +_ACEOF + ;; + esac - gl_LIBOBJS="$gl_LIBOBJS xgetcwd.$ac_objext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 +$as_echo_n "checking where to find the exponent in a 'double'... " >&6; } +if ${gl_cv_cc_double_expbit0+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # Code from module xsize: +#if defined arm || defined __arm || defined __arm__ + mixed_endianness +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "mixed_endianness" >/dev/null 2>&1; then : + gl_cv_cc_double_expbit0="unknown" +else + : +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; - for ac_header in stdint.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H 1 _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include -done +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include - # Code from module xstrndup: +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - : +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - # Code from module xstrtod: +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + fi +fi +: + case $ac_cv_c_bigendian in #( + yes) + gl_cv_cc_double_expbit0="word 0 bit 20";; #( + no) + gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( + universal) +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + ;; #( + *) + gl_cv_cc_double_expbit0="unknown" ;; + esac - gl_LIBOBJS="$gl_LIBOBJS xstrtod.$ac_objext" +fi +rm -f conftest* - # Code from module xstrtol: +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { double value; unsigned int word[NWORDS]; } memory_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (double x) +{ + memory_double m; + size_t i; + /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ + memset (&m, 0, sizeof (memory_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25); + add_to_ored_words (0.5); + add_to_ored_words (1.0); + add_to_ored_words (2.0); + add_to_ored_words (4.0); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_double_expbit0=`cat conftest.out` +else + gl_cv_cc_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 +$as_echo "$gl_cv_cc_double_expbit0" >&6; } + case "$gl_cv_cc_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_WORD $word +_ACEOF +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_BIT $bit +_ACEOF + ;; + esac - gl_LIBOBJS="$gl_LIBOBJS xstrtol.$ac_objext" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 +$as_echo_n "checking where to find the exponent in a 'float'... " >&6; } +if ${gl_cv_cc_float_expbit0+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gl_cv_cc_float_expbit0="word 0 bit 23" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { float value; unsigned int word[NWORDS]; } memory_float; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (float x) +{ + memory_float m; + size_t i; + /* Clear it first, in case + sizeof (float) < sizeof (memory_float). */ + memset (&m, 0, sizeof (memory_float)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25f); + add_to_ored_words (0.5f); + add_to_ored_words (1.0f); + add_to_ored_words (2.0f); + add_to_ored_words (4.0f); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_float_expbit0=`cat conftest.out` +else + gl_cv_cc_float_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 +$as_echo "$gl_cv_cc_float_expbit0" >&6; } + case "$gl_cv_cc_float_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_WORD $word +_ACEOF - gl_LIBOBJS="$gl_LIBOBJS xstrtoul.$ac_objext" +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_BIT $bit +_ACEOF + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 +$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } +if ${gl_cv_cc_long_double_expbit0+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + gl_cv_cc_long_double_expbit0="unknown" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { long double value; unsigned int word[NWORDS]; } + memory_long_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (long double x) +{ + memory_long_double m; + size_t i; + /* Clear it first, in case + sizeof (long double) < sizeof (memory_long_double). */ + memset (&m, 0, sizeof (memory_long_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25L); + add_to_ored_words (0.5L); + add_to_ored_words (1.0L); + add_to_ored_words (2.0L); + add_to_ored_words (4.0L); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} - gl_LIBOBJS="$gl_LIBOBJS xstrtol-error.$ac_objext" +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_cc_long_double_expbit0=`cat conftest.out` +else + gl_cv_cc_long_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + rm -f conftest.out - # Code from module xstrtoumax: - # Code from module yesno: +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 +$as_echo "$gl_cv_cc_long_double_expbit0" >&6; } + case "$gl_cv_cc_long_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_WORD $word +_ACEOF +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_BIT $bit +_ACEOF + ;; + esac + if test "$ac_cv_header_winsock2_h" = yes; then - gl_LIBOBJS="$gl_LIBOBJS yesno.$ac_objext" - : - # End of code from modules + gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext" + fi - gltests_libdeps= - gltests_ltlibdeps= + if test "$GNULIB_LISTEN" != 1; then + if test "$GNULIB_LISTEN" = 0; then + GNULIB_LISTEN=$gl_module_indicator_condition + else + GNULIB_LISTEN="($GNULIB_LISTEN || $gl_module_indicator_condition)" + fi + fi +$as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h - gl_source_base='tests' - gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS + : - gl_module_indicator_condition=$gltests_WITNESS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 -$as_echo_n "checking for a traditional french locale... " >&6; } -if test "${gt_cv_locale_fr+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only - one byte long. This excludes the UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; - return 0; -} + for ac_func in setlocale uselocale +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the native Win32 locale name. - if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=French_France.1252 - else - # None found. - gt_cv_locale_fr=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.ISO-8859-1 - else - # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. - if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.ISO8859-1 - else - # Test for the HP-UX locale name. - if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.iso88591 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr - else - # None found. - gt_cv_locale_fr=none - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 -$as_echo "$gt_cv_locale_fr" >&6; } - LOCALE_FR=$gt_cv_locale_fr - - +done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 -$as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + : -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if !(defined __BEOS__ || defined __HAIKU__) - /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -# else - if (setlocale (LC_ALL, "") == NULL) return 1; -# endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -# if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -# endif -# ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') - return 1; -#endif - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; - return 0; -} -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Win32 locale name. - if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=French_France.65001 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr.UTF-8 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - fi - fi - ;; - esac - fi - rm -fr conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 -$as_echo "$gt_cv_locale_fr_utf8" >&6; } - LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 @@ -32855,7 +42863,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } -if test "${gt_cv_locale_fr+set}" = set; then : +if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else @@ -32874,9 +42882,9 @@ char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -32885,7 +42893,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -32911,510 +42919,12 @@ int main () { one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the native Win32 locale name. - if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=French_France.1252 - else - # None found. - gt_cv_locale_fr=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.ISO-8859-1 - else - # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. - if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.ISO8859-1 - else - # Test for the HP-UX locale name. - if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.iso88591 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr - else - # None found. - gt_cv_locale_fr=none - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 -$as_echo "$gt_cv_locale_fr" >&6; } - LOCALE_FR=$gt_cv_locale_fr - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5 -$as_echo_n "checking for a turkish Unicode locale... " >&6; } -if test "${gt_cv_locale_tr_utf8+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* On BeOS, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. But BeOS does not - implement the Turkish upper-/lowercase mappings. Therefore, let this - program return 1 on BeOS. */ - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in the abbreviation of the eighth month, the second - character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) - return 1; - /* Check whether the upper-/lowercase mappings are as expected for - Turkish. */ - if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' - || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Win32 locale name. - if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=Turkish_Turkey.65001 - else - # None found. - gt_cv_locale_tr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr_TR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr_TR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr.UTF-8 - else - # None found. - gt_cv_locale_tr_utf8=none - fi - fi - fi - ;; - esac - else - gt_cv_locale_tr_utf8=none - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5 -$as_echo "$gt_cv_locale_tr_utf8" >&6; } - LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 - - - - : - - - - - - - -cat >>confdefs.h <<_ACEOF -#define GNULIB_FD_SAFER_FLAG $gl_module_indicator_condition -_ACEOF - - - - - - - if test $REPLACE_FTELLO != 0; then - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS ftell.$ac_objext" - - REPLACE_FTELL=1 - fi - - - - - GNULIB_FTELL=$gl_module_indicator_condition - - - -$as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h - - - - - - - - - for ac_func in getpagesize -do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPAGESIZE 1 -_ACEOF - -fi -done - - if test $ac_cv_func_getpagesize = no; then - HAVE_GETPAGESIZE=0 - for ac_header in OS.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default" -if test "x$ac_cv_header_OS_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OS_H 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_OS_h = yes; then - HAVE_OS_H=1 - fi - for ac_header in sys/param.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_param_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_PARAM_H 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_sys_param_h = yes; then - HAVE_SYS_PARAM_H=1 - fi - fi - case "$host_os" in - mingw*) - REPLACE_GETPAGESIZE=1 - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext" - - ;; - esac - ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" -if test "x$ac_cv_have_decl_getpagesize" = x""yes; then : - -else - HAVE_DECL_GETPAGESIZE=0 -fi - - - - - - GNULIB_GETPAGESIZE=$gl_module_indicator_condition - - - -$as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h - - - - - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS getugroups.$ac_objext" - - - : - - - - - - - - - - - : - - : - : - : - : - - - : - - - - - - - : - - - - - - - - - for ac_func in setlocale uselocale -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - : - - - - - - - - if test "$gl_threads_api" = posix; then - # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the - # pthread_rwlock_* functions. - ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include -" -if test "x$ac_cv_type_pthread_rwlock_t" = x""yes; then : - -$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h - -fi - - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -int -main () -{ - -#if __FreeBSD__ == 4 -error "No, in FreeBSD 4.0 recursive mutexes actually don't work." -#else -int x = (int)PTHREAD_MUTEX_RECURSIVE; -return !x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 -$as_echo_n "checking for a traditional french locale... " >&6; } -if test "${gt_cv_locale_fr+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; #endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only - one byte long. This excludes the UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; return 0; } @@ -33432,7 +42942,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the native Win32 locale name. + # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else @@ -33442,7 +42952,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -33487,7 +42997,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : +if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else @@ -33510,9 +43020,9 @@ int main () { #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -33521,7 +43031,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -33547,10 +43057,12 @@ int main () { || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -33568,7 +43080,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else @@ -33578,7 +43090,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -33614,7 +43126,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } -if test "${gt_cv_locale_ja+set}" = set; then : +if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else @@ -33635,9 +43147,9 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -33646,7 +43158,7 @@ int main () if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -33695,13 +43207,14 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Note that on native Win32, the Japanese locale is Japanese_Japan.932, - # and CP932 is very different from EUC-JP, so we cannot use it here. + # Note that on native Windows, the Japanese locale is + # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we + # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. @@ -33752,7 +43265,7 @@ $as_echo "$gt_cv_locale_ja" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } -if test "${gt_cv_locale_zh_CN+set}" = set; then : +if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else @@ -33774,9 +43287,9 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -33785,7 +43298,7 @@ int main () if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -33834,7 +43347,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else @@ -33842,9 +43355,15 @@ _ACEOF gt_cv_locale_zh_CN=none fi ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. + gt_cv_locale_zh_CN=none + ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. @@ -33878,7 +43397,7 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : +if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else @@ -33901,9 +43420,9 @@ int main () { #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -33912,7 +43431,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -33938,10 +43457,12 @@ int main () { || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -33959,7 +43480,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else @@ -33969,7 +43490,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -34005,7 +43526,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5 $as_echo_n "checking for a turkish Unicode locale... " >&6; } -if test "${gt_cv_locale_tr_utf8+set}" = set; then : +if ${gt_cv_locale_tr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34029,9 +43550,9 @@ int main () { program return 1 on BeOS. */ /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -34040,7 +43561,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -34087,7 +43608,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_tr_utf8=Turkish_Turkey.65001 else @@ -34097,7 +43618,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -34135,7 +43656,7 @@ $as_echo "$gt_cv_locale_tr_utf8" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } -if test "${gt_cv_locale_zh_CN+set}" = set; then : +if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34157,9 +43678,9 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -34168,7 +43689,7 @@ int main () if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -34217,7 +43738,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else @@ -34225,9 +43746,15 @@ _ACEOF gt_cv_locale_zh_CN=none fi ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. + gt_cv_locale_zh_CN=none + ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. @@ -34261,7 +43788,7 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : +if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34284,9 +43811,9 @@ int main () { #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -34295,7 +43822,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -34321,10 +43848,12 @@ int main () { || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -34342,7 +43871,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else @@ -34352,7 +43881,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -34388,7 +43917,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } -if test "${gt_cv_locale_fr+set}" = set; then : +if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34407,9 +43936,9 @@ char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -34418,7 +43947,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -34444,10 +43973,12 @@ int main () { one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -34465,7 +43996,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the native Win32 locale name. + # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else @@ -34475,7 +44006,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -34520,7 +44051,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : +if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34543,9 +44074,9 @@ int main () { #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -34554,7 +44085,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -34580,10 +44111,12 @@ int main () { || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -34601,7 +44134,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else @@ -34611,7 +44144,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -34647,7 +44180,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } -if test "${gt_cv_locale_ja+set}" = set; then : +if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34668,9 +44201,9 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -34679,7 +44212,7 @@ int main () if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -34728,13 +44261,14 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Note that on native Win32, the Japanese locale is Japanese_Japan.932, - # and CP932 is very different from EUC-JP, so we cannot use it here. + # Note that on native Windows, the Japanese locale is + # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we + # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. @@ -34785,7 +44319,7 @@ $as_echo "$gt_cv_locale_ja" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } -if test "${gt_cv_locale_zh_CN+set}" = set; then : +if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34807,9 +44341,9 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -34818,7 +44352,7 @@ int main () if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -34867,7 +44401,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else @@ -34875,9 +44409,15 @@ _ACEOF gt_cv_locale_zh_CN=none fi ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. + gt_cv_locale_zh_CN=none + ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. @@ -34911,7 +44451,7 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : +if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else @@ -34934,9 +44474,9 @@ int main () { #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -34945,7 +44485,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -34971,10 +44511,12 @@ int main () { || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -34992,7 +44534,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else @@ -35002,7 +44544,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -35038,7 +44580,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } -if test "${gt_cv_locale_zh_CN+set}" = set; then : +if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else @@ -35060,9 +44602,9 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -35071,7 +44613,7 @@ int main () if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -35120,7 +44662,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else @@ -35128,9 +44670,15 @@ _ACEOF gt_cv_locale_zh_CN=none fi ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. + gt_cv_locale_zh_CN=none + ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. @@ -35167,7 +44715,7 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; } # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = x""yes; then : +if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no @@ -35184,12 +44732,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } #include #ifdef MAP_ANONYMOUS - I cant identify this map. + I cannot identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* @@ -35200,12 +44748,12 @@ rm -f conftest* #include #ifdef MAP_ANON - I cant identify this map. + I cannot identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h @@ -35244,7 +44792,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = x""yes; then : +if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no @@ -35261,12 +44809,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } #include #ifdef MAP_ANONYMOUS - I cant identify this map. + I cannot identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* @@ -35277,12 +44825,12 @@ rm -f conftest* #include #ifdef MAP_ANON - I cant identify this map. + I cannot identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h @@ -35316,6 +44864,10 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h + + + + : @@ -35324,13 +44876,385 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h + nanosleep_save_libs=$LIBS + # Solaris 2.5.1 needs -lposix4 to get the nanosleep function. + # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. + LIB_NANOSLEEP= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5 +$as_echo_n "checking for library containing nanosleep... " >&6; } +if ${ac_cv_search_nanosleep+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nanosleep (); +int +main () +{ +return nanosleep (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt posix4; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_nanosleep=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_nanosleep+:} false; then : + break +fi +done +if ${ac_cv_search_nanosleep+:} false; then : +else + ac_cv_search_nanosleep=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5 +$as_echo "$ac_cv_search_nanosleep" >&6; } +ac_res=$ac_cv_search_nanosleep +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_cv_search_nanosleep" = "none required" || + LIB_NANOSLEEP=$ac_cv_search_nanosleep +fi + if test "x$ac_cv_search_nanosleep" != xno; then - gltests_LIBOBJS="$gltests_LIBOBJS mgetgroups.$ac_objext" + if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple Mac OS X platforms. + # The test result would be 'no (mishandles large arguments)' in 64-bit + # mode but 'yes' in 32-bit mode. But we need a configuration result that + # is valid in both modes. + gl_cv_func_nanosleep='no (mishandles large arguments)' + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5 +$as_echo_n "checking for working nanosleep... " >&6; } +if ${gl_cv_func_nanosleep+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + case "$host_os" in linux*) # Guess it halfway works when the kernel is Linux. + gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;; + *) # If we don't know, assume the worst. + gl_cv_func_nanosleep='guessing no' ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #include + #include + #if HAVE_SYS_TIME_H + #include + #endif + #include + #include + #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + #define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) + + static void + check_for_SIGALRM (int sig) + { + if (sig != SIGALRM) + _exit (1); + } + + int + main () + { + static struct timespec ts_sleep; + static struct timespec ts_remaining; + static struct sigaction act; + /* Test for major problems first. */ + if (! nanosleep) + return 2; + act.sa_handler = check_for_SIGALRM; + sigemptyset (&act.sa_mask); + sigaction (SIGALRM, &act, NULL); + ts_sleep.tv_sec = 0; + ts_sleep.tv_nsec = 1; + alarm (1); + if (nanosleep (&ts_sleep, NULL) != 0) + return 3; + /* Test for a minor problem: the handling of large arguments. */ + ts_sleep.tv_sec = TYPE_MAXIMUM (time_t); + ts_sleep.tv_nsec = 999999999; + alarm (1); + if (nanosleep (&ts_sleep, &ts_remaining) != -1) + return 4; + if (errno != EINTR) + return 5; + if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10) + return 6; + return 0; + } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_nanosleep=yes +else + case $? in 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; *) gl_cv_func_nanosleep=no;; + esac +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5 +$as_echo "$gl_cv_func_nanosleep" >&6; } + case "$gl_cv_func_nanosleep" in + *yes) + REPLACE_NANOSLEEP=0 + ;; + *) + REPLACE_NANOSLEEP=1 + case "$gl_cv_func_nanosleep" in + *"mishandles large arguments"*) + +$as_echo "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h + + ;; + *) + # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP. + for ac_lib in $LIBSOCKET; do + case " $LIB_NANOSLEEP " in + *" $ac_lib "*) ;; + *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";; + esac + done + ;; + esac + ;; + esac + else + HAVE_NANOSLEEP=0 + fi + LIBS=$nanosleep_save_libs + + if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS nanosleep.$ac_objext" + + + + : + + + + + + : + + fi + + + + + + if test "$GNULIB_NANOSLEEP" != 1; then + if test "$GNULIB_NANOSLEEP" = 0; then + GNULIB_NANOSLEEP=$gl_module_indicator_condition + else + GNULIB_NANOSLEEP="($GNULIB_NANOSLEEP || $gl_module_indicator_condition)" + fi + fi + + + + + +$as_echo "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h + + + + + : + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 +$as_echo_n "checking whether is self-contained... " >&6; } +if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_netinet_in_h_selfcontained=yes +else + gl_cv_header_netinet_in_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5 +$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; } + if test $gl_cv_header_netinet_in_h_selfcontained = yes; then + NETINET_IN_H='' + else + NETINET_IN_H='netinet/in.h' + for ac_header in netinet/in.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" +if test "x$ac_cv_header_netinet_in_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NETINET_IN_H 1 +_ACEOF + +fi + +done + + + + + + + + : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_netinet_in_h='<'netinet/in.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_netinet_in_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_netinet_in_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'netinet/in.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_netinet_in_h + gl_cv_next_netinet_in_h='"'$gl_header'"' + else + gl_cv_next_netinet_in_h='<'netinet/in.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5 +$as_echo "$gl_cv_next_netinet_in_h" >&6; } + fi + NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'netinet/in.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_netinet_in_h + fi + NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_netinet_in_h = yes; then + HAVE_NETINET_IN_H=1 + else + HAVE_NETINET_IN_H=0 + fi + + fi + + if test -n "$NETINET_IN_H"; then + GL_GENERATE_NETINET_IN_H_TRUE= + GL_GENERATE_NETINET_IN_H_FALSE='#' +else + GL_GENERATE_NETINET_IN_H_TRUE='#' + GL_GENERATE_NETINET_IN_H_FALSE= +fi + @@ -35338,7 +45262,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } -if test "${gt_cv_locale_fr+set}" = set; then : +if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else @@ -35357,9 +45281,9 @@ char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -35368,7 +45292,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -35394,10 +45318,12 @@ int main () { one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -35415,7 +45341,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the native Win32 locale name. + # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else @@ -35425,7 +45351,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -35470,7 +45396,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : +if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else @@ -35493,9 +45419,9 @@ int main () { #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -35504,7 +45430,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -35530,67 +45456,306 @@ int main () { || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif + return 0; +} + +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=French_France.65001 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR.UTF-8 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr.UTF-8 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + fi + fi + ;; + esac + fi + rm -fr conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 +$as_echo "$gt_cv_locale_fr_utf8" >&6; } + LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 + + + + + + + : + + + + + + if test $ac_cv_func_pipe != yes; then + HAVE_PIPE=0 + fi + + if test $HAVE_PIPE = 0; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS pipe.$ac_objext" + + fi + + + + + + if test "$GNULIB_PIPE" != 1; then + if test "$GNULIB_PIPE" = 0; then + GNULIB_PIPE=$gl_module_indicator_condition + else + GNULIB_PIPE="($GNULIB_PIPE || $gl_module_indicator_condition)" + fi + fi + + + + + +$as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h + + + + + for ac_func in getppriv +do : + ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv" +if test "x$ac_cv_func_getppriv" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPPRIV 1 +_ACEOF + +fi +done + + + : + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5 +$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; } +if ${gl_cv_func_svid_putenv+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_svid_putenv="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Put it in env. */ + if (putenv ("CONFTEST_putenv=val")) + return 1; + + /* Try to remove it. */ + if (putenv ("CONFTEST_putenv")) + return 2; + + /* Make sure it was deleted. */ + if (getenv ("CONFTEST_putenv") != 0) + return 3; + + return 0; + + ; return 0; } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_svid_putenv=yes +else + gl_cv_func_svid_putenv=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5 +$as_echo "$gl_cv_func_svid_putenv" >&6; } + case "$gl_cv_func_svid_putenv" in + *yes) ;; + *) + REPLACE_PUTENV=1 + ;; + esac + + if test $REPLACE_PUTENV = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext" + + + ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default" +if test "x$ac_cv_have_decl__putenv" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__PUTENV $ac_have_decl +_ACEOF + + + fi + + + + + + if test "$GNULIB_PUTENV" != 1; then + if test "$GNULIB_PUTENV" = 0; then + GNULIB_PUTENV=$gl_module_indicator_condition + else + GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)" + fi + fi + + + + + +$as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h + + + + + + + # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it + # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is + # irrelevant for anonymous mappings. + ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" +if test "x$ac_cv_func_mmap" = xyes; then : + gl_have_mmap=yes +else + gl_have_mmap=no +fi + + + # Try to allow MAP_ANONYMOUS. + gl_have_mmap_anonymous=no + if test $gl_have_mmap = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 +$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef MAP_ANONYMOUS + I cannot identify this map +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : + gl_have_mmap_anonymous=yes +fi +rm -f conftest* + + if test $gl_have_mmap_anonymous != yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef MAP_ANON + I cannot identify this map +#endif _ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Win32 locale name. - if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=French_France.65001 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr.UTF-8 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - fi - fi - ;; - esac - fi - rm -fr conftest* +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : + +$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h + gl_have_mmap_anonymous=yes fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 -$as_echo "$gt_cv_locale_fr_utf8" >&6; } - LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 +rm -f conftest* + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 +$as_echo "$gl_have_mmap_anonymous" >&6; } + if test $gl_have_mmap_anonymous = yes; then + +$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h + fi + fi : @@ -35600,65 +45765,200 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } + : - for ac_func in getppriv + + + + + + + + + for ac_func in raise do : - ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv" -if test "x$ac_cv_func_getppriv" = x""yes; then : + ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise" +if test "x$ac_cv_func_raise" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_GETPPRIV 1 +#define HAVE_RAISE 1 _ACEOF fi done + if test $ac_cv_func_raise = no; then + HAVE_RAISE=0 + else + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_RAISE=1 + fi + - : + if test $gl_cv_type_sigset_t = yes; then + ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" +if test "x$ac_cv_func_sigprocmask" = xyes; then : + gl_cv_func_sigprocmask=1 +fi + + fi + if test -z "$gl_cv_func_sigprocmask"; then + HAVE_POSIX_SIGNALBLOCKING=0 + fi + + if test $HAVE_POSIX_SIGNALBLOCKING = 0; then + : + fi + + fi + if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5 -$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; } -if test "${gl_cv_func_svid_putenv+set}" = set; then : + + + + gltests_LIBOBJS="$gltests_LIBOBJS raise.$ac_objext" + + : + fi + + + + + + if test "$GNULIB_RAISE" != 1; then + if test "$GNULIB_RAISE" = 0; then + GNULIB_RAISE=$gl_module_indicator_condition + else + GNULIB_RAISE="($GNULIB_RAISE || $gl_module_indicator_condition)" + fi + fi + + + + + +$as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h + + + + + + + if test "$ac_cv_header_winsock2_h" = yes; then + REPLACE_SELECT=1 + else + + : + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5 +$as_echo_n "checking whether select supports a 0 argument... " >&6; } +if ${gl_cv_func_select_supports0+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - gl_cv_func_svid_putenv=no + + if test "$cross_compiling" = yes; then : + + case "$host_os" in + # Guess no on Interix. + interix*) gl_cv_func_select_supports0="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_select_supports0="guessing yes";; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () + +#include +#include +#if HAVE_SYS_SELECT_H +#include +#endif +int main () { + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 5; + return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_select_supports0=yes +else + gl_cv_func_select_supports0=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - /* Put it in env. */ - if (putenv ("CONFTEST_putenv=val")) - return 1; - /* Try to remove it. */ - if (putenv ("CONFTEST_putenv")) - return 2; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5 +$as_echo "$gl_cv_func_select_supports0" >&6; } + case "$gl_cv_func_select_supports0" in + *yes) ;; + *) REPLACE_SELECT=1 ;; + esac - /* Make sure it was deleted. */ - if (getenv ("CONFTEST_putenv") != 0) - return 3; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5 +$as_echo_n "checking whether select detects invalid fds... " >&6; } +if ${gl_cv_func_select_detects_ebadf+:} false; then : + $as_echo_n "(cached) " >&6 +else - return 0; + if test "$cross_compiling" = yes; then : + + 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 + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#if HAVE_SYS_SELECT_H +# include +#endif +#include +#include + +int +main () +{ + + 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; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_svid_putenv=yes + gl_cv_func_select_detects_ebadf=yes else - gl_cv_func_svid_putenv=no + gl_cv_func_select_detects_ebadf=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -35666,30 +45966,79 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5 -$as_echo "$gl_cv_func_svid_putenv" >&6; } - if test $gl_cv_func_svid_putenv = no; then - REPLACE_PUTENV=1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5 +$as_echo "$gl_cv_func_select_detects_ebadf" >&6; } + case $gl_cv_func_select_detects_ebadf in + *yes) ;; + *) REPLACE_SELECT=1 ;; + esac + fi + + LIB_SELECT="$LIBSOCKET" + if test $REPLACE_SELECT = 1; then + case "$host_os" in + mingw*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define WIN32_LEAN_AND_MEAN +#include +int +main () +{ + MsgWaitForMultipleObjects (0, NULL, 0, 0, 0); + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : +else + LIB_SELECT="$LIB_SELECT -luser32" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ;; + esac + fi + if test $REPLACE_SELECT = 1; then - gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext" + + + + + gltests_LIBOBJS="$gltests_LIBOBJS select.$ac_objext" fi - GNULIB_PUTENV=$gl_module_indicator_condition + if test "$GNULIB_SELECT" != 1; then + if test "$GNULIB_SELECT" = 0; then + GNULIB_SELECT=$gl_module_indicator_condition + else + GNULIB_SELECT="($GNULIB_SELECT || $gl_module_indicator_condition)" + fi + fi + + + + + +$as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h + + + + + : -$as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h @@ -35698,11 +46047,14 @@ $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h case "$host_os" in mingw*) REPLACE_SETLOCALE=1 ;; + cygwin*) + case `uname -r` in + 1.5.*) REPLACE_SETLOCALE=1 ;; + esac + ;; esac - if test $REPLACE_SETLOCALE = 1; then - - : + if test $REPLACE_SETLOCALE = 1; then @@ -35721,7 +46073,16 @@ $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h - GNULIB_SETLOCALE=$gl_module_indicator_condition + + if test "$GNULIB_SETLOCALE" != 1; then + if test "$GNULIB_SETLOCALE" = 0; then + GNULIB_SETLOCALE=$gl_module_indicator_condition + else + GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)" + fi + fi + + @@ -35734,7 +46095,7 @@ $as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } -if test "${gt_cv_locale_fr+set}" = set; then : +if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else @@ -35753,9 +46114,9 @@ char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -35764,7 +46125,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -35790,10 +46151,12 @@ int main () { one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -35811,7 +46174,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the native Win32 locale name. + # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else @@ -35821,7 +46184,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -35866,7 +46229,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : +if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else @@ -35889,9 +46252,9 @@ int main () { #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -35900,7 +46263,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -35926,10 +46289,12 @@ int main () { || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -35947,7 +46312,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else @@ -35957,7 +46322,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -35993,7 +46358,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } -if test "${gt_cv_locale_ja+set}" = set; then : +if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else @@ -36014,9 +46379,9 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -36025,7 +46390,7 @@ int main () if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -36074,13 +46439,14 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Note that on native Win32, the Japanese locale is Japanese_Japan.932, - # and CP932 is very different from EUC-JP, so we cannot use it here. + # Note that on native Windows, the Japanese locale is + # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we + # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. @@ -36131,7 +46497,7 @@ $as_echo "$gt_cv_locale_ja" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } -if test "${gt_cv_locale_zh_CN+set}" = set; then : +if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else @@ -36153,9 +46519,9 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -36164,7 +46530,7 @@ int main () if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -36199,65 +46565,391 @@ int main () return 0; } -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Win32 locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac +_ACEOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=Chinese_China.54936 + else + # None found. + gt_cv_locale_zh_CN=none + fi + ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. + gt_cv_locale_zh_CN=none + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the locale name without encoding suffix. + if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN.GB18030 + else + # None found. + gt_cv_locale_zh_CN=none + fi + fi + ;; + esac + else + # If there was a link error, due to mblen(), the system is so old that + # it certainly doesn't have a chinese locale. + gt_cv_locale_zh_CN=none + fi + rm -fr conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 +$as_echo "$gt_cv_locale_zh_CN" >&6; } + LOCALE_ZH_CN=$gt_cv_locale_zh_CN + + + + if test "$ac_cv_header_winsock2_h" = yes; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext" + + fi + + + + + + if test "$GNULIB_SETSOCKOPT" != 1; then + if test "$GNULIB_SETSOCKOPT" = 0; then + GNULIB_SETSOCKOPT=$gl_module_indicator_condition + else + GNULIB_SETSOCKOPT="($GNULIB_SETSOCKOPT || $gl_module_indicator_condition)" + fi + fi + + + + + +$as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h + + + + + + + : + + + + + + if test $ac_cv_func_sigaction = yes; then + ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include +" +if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1 +_ACEOF + + +fi + + if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then + HAVE_STRUCT_SIGACTION_SA_SIGACTION=0 + fi + else + HAVE_SIGACTION=0 + fi + + if test $HAVE_SIGACTION = 0; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS sigaction.$ac_objext" + + + + + + + + : + + + + + + + + + ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" " +#include + +" +if test "x$ac_cv_type_siginfo_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGINFO_T 1 +_ACEOF + + +fi + + if test $ac_cv_type_siginfo_t = no; then + HAVE_SIGINFO_T=0 + fi + + fi + + + + + + if test "$GNULIB_SIGACTION" != 1; then + if test "$GNULIB_SIGACTION" = 0; then + GNULIB_SIGACTION=$gl_module_indicator_condition + else + GNULIB_SIGACTION="($GNULIB_SIGACTION || $gl_module_indicator_condition)" + fi + fi + + + + + +$as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_signal_h='<'signal.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_signal_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'signal.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_signal_h + gl_cv_next_signal_h='"'$gl_header'"' + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 +$as_echo "$gl_cv_next_signal_h" >&6; } + fi + NEXT_SIGNAL_H=$gl_cv_next_signal_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'signal.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_signal_h + fi + NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive + + + + + +# AIX declares sig_atomic_t to already include volatile, and C89 compilers +# then choke on 'volatile sig_atomic_t'. C99 requires that it compile. + ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " +#include + +" +if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then : + +else + HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 +fi + + + + + + + + ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " +#include + +" +if test "x$ac_cv_type_sighandler_t" = xyes; then : + +else + HAVE_SIGHANDLER_T=0 +fi + + + + for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + + + + if test $gl_cv_type_sigset_t = yes; then + ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" +if test "x$ac_cv_func_sigprocmask" = xyes; then : + gl_cv_func_sigprocmask=1 +fi + + fi + if test -z "$gl_cv_func_sigprocmask"; then + HAVE_POSIX_SIGNALBLOCKING=0 + fi + + if test $HAVE_POSIX_SIGNALBLOCKING = 0; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS sigprocmask.$ac_objext" + + : + fi + + + + + + if test "$GNULIB_SIGPROCMASK" != 1; then + if test "$GNULIB_SIGPROCMASK" = 0; then + GNULIB_SIGPROCMASK=$gl_module_indicator_condition else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none + GNULIB_SIGPROCMASK="($GNULIB_SIGPROCMASK || $gl_module_indicator_condition)" fi - rm -fr conftest* + fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 -$as_echo "$gt_cv_locale_zh_CN" >&6; } - LOCALE_ZH_CN=$gt_cv_locale_zh_CN - ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include +$as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h + + + + + + ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include " -if test "x$ac_cv_have_decl_sleep" = x""yes; then : +if test "x$ac_cv_have_decl_sleep" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -36276,24 +46968,20 @@ _ACEOF if test $ac_cv_have_decl_sleep != yes; then HAVE_SLEEP=0 - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext" - else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5 $as_echo_n "checking for working sleep... " >&6; } -if test "${gl_cv_func_sleep_works+set}" = set; then : +if ${gl_cv_func_sleep_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - gl_cv_func_sleep_works="guessing no" + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_sleep_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_sleep_works="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -36341,8 +47029,15 @@ fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5 $as_echo "$gl_cv_func_sleep_works" >&6; } - if test "$gl_cv_func_sleep_works" != yes; then - REPLACE_SLEEP=1 + case "$gl_cv_func_sleep_works" in + *yes) ;; + *) + REPLACE_SLEEP=1 + ;; + esac + fi + + if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then @@ -36353,13 +47048,21 @@ $as_echo "$gl_cv_func_sleep_works" >&6; } gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext" - fi fi - GNULIB_SLEEP=$gl_module_indicator_condition + + if test "$GNULIB_SLEEP" != 1; then + if test "$GNULIB_SLEEP" = 0; then + GNULIB_SLEEP=$gl_module_indicator_condition + else + GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)" + fi + fi + + @@ -36375,80 +47078,51 @@ $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 -$as_echo_n "checking for wchar_t... " >&6; } -if test "${gt_cv_c_wchar_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - wchar_t foo = (wchar_t)'\0'; -int -main () -{ + if test "$ac_cv_header_winsock2_h" = yes; then + + + - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wchar_t=yes -else - gt_cv_c_wchar_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 -$as_echo "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then -$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h + + + + gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext" 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. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 -$as_echo_n "checking for wint_t... " >&6; } -if test "${gt_cv_c_wint_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0'; -int -main () -{ + 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 + - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wint_t=yes -else - gt_cv_c_wint_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 -$as_echo "$gt_cv_c_wint_t" >&6; } - if test $gt_cv_c_wint_t = yes; then -$as_echo "#define HAVE_WINT_T 1" >>confdefs.h + + if test "$GNULIB_SOCKET" != 1; then + if test "$GNULIB_SOCKET" = 0; then + GNULIB_SOCKET=$gl_module_indicator_condition + else + GNULIB_SOCKET="($GNULIB_SOCKET || $gl_module_indicator_condition)" + fi fi + + + +$as_echo "#define GNULIB_TEST_SOCKET 1" >>confdefs.h + + + + + + : @@ -36462,7 +47136,7 @@ $as_echo "#define HAVE_WINT_T 1" >>confdefs.h # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = x""yes; then : +if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no @@ -36479,12 +47153,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } #include #ifdef MAP_ANONYMOUS - I cant identify this map. + I cannot identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* @@ -36495,12 +47169,12 @@ rm -f conftest* #include #ifdef MAP_ANON - I cant identify this map. + I cannot identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h @@ -36546,7 +47220,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = x""yes; then : +if test "x$ac_cv_func_mmap" = xyes; then : gl_have_mmap=yes else gl_have_mmap=no @@ -36563,12 +47237,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } #include #ifdef MAP_ANONYMOUS - I cant identify this map. + I cannot identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : gl_have_mmap_anonymous=yes fi rm -f conftest* @@ -36579,12 +47253,12 @@ rm -f conftest* #include #ifdef MAP_ANON - I cant identify this map. + I cannot identify this map #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cant identify this map." >/dev/null 2>&1; then : + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h @@ -36627,24 +47301,20 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h if test $ac_cv_func_symlink = no; then HAVE_SYMLINK=0 - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext" - else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } -if test "${gl_cv_func_symlink_works+set}" = set; then : +if ${gl_cv_func_symlink_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - gl_cv_func_symlink_works="guessing no" + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_symlink_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_symlink_works="guessing no" ;; + esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -36679,8 +47349,15 @@ fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 $as_echo "$gl_cv_func_symlink_works" >&6; } - if test "$gl_cv_func_symlink_works" != yes; then - REPLACE_SYMLINK=1 + case "$gl_cv_func_symlink_works" in + *yes) ;; + *) + REPLACE_SYMLINK=1 + ;; + esac + fi + + if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then @@ -36691,13 +47368,21 @@ $as_echo "$gl_cv_func_symlink_works" >&6; } gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext" - fi fi - GNULIB_SYMLINK=$gl_module_indicator_condition + + if test "$GNULIB_SYMLINK" != 1; then + if test "$GNULIB_SYMLINK" = 0; then + GNULIB_SYMLINK=$gl_module_indicator_condition + else + GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)" + fi + fi + + @@ -36718,6 +47403,9 @@ $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h if test $ac_cv_func_symlinkat = no; then HAVE_SYMLINKAT=0 + fi + + if test $HAVE_SYMLINKAT = 0; then @@ -36733,7 +47421,16 @@ $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h - GNULIB_SYMLINKAT=$gl_module_indicator_condition + + if test "$GNULIB_SYMLINKAT" != 1; then + if test "$GNULIB_SYMLINKAT" = 0; then + GNULIB_SYMLINKAT=$gl_module_indicator_condition + else + GNULIB_SYMLINKAT="($GNULIB_SYMLINKAT || $gl_module_indicator_condition)" + fi + fi + + @@ -36745,26 +47442,429 @@ $as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h - if test $gl_threads_api = posix; then - gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIBMULTITHREAD" - for ac_func in pthread_atfork + : + + + + + + if test $ac_cv_header_sys_ioctl_h = yes; then + HAVE_SYS_IOCTL_H=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether declares ioctl" >&5 +$as_echo_n "checking whether declares ioctl... " >&6; } +if ${gl_cv_decl_ioctl_in_sys_ioctl_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +(void) ioctl; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_decl_ioctl_in_sys_ioctl_h=yes +else + gl_cv_decl_ioctl_in_sys_ioctl_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5 +$as_echo "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; } + else + HAVE_SYS_IOCTL_H=0 + fi + + + + + + + + : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_ioctl_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_sys_ioctl_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/ioctl.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_ioctl_h + gl_cv_next_sys_ioctl_h='"'$gl_header'"' + else + gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5 +$as_echo "$gl_cv_next_sys_ioctl_h" >&6; } + fi + NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/ioctl.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive + + + + + + + for gl_func in ioctl; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +/* Some platforms declare ioctl in the wrong header. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +#endif + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 +$as_echo_n "checking whether is self-contained... " >&6; } +if ${gl_cv_header_sys_select_h_selfcontained+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +struct timeval b; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_sys_select_h_selfcontained=yes +else + gl_cv_header_sys_select_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $gl_cv_header_sys_select_h_selfcontained = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int memset; int bzero; + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + #undef memset + #define memset nonexistent_memset + extern + #ifdef __cplusplus + "C" + #endif + void *memset (void *, int, unsigned long); + #undef bzero + #define bzero nonexistent_bzero + extern + #ifdef __cplusplus + "C" + #endif + void bzero (void *, unsigned long); + fd_set fds; + FD_ZERO (&fds); + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + gl_cv_header_sys_select_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5 +$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; } + + + + + + + : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_select_h='<'sys/select.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_select_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_sys_select_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/select.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_select_h + gl_cv_next_sys_select_h='"'$gl_header'"' + else + gl_cv_next_sys_select_h='<'sys/select.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5 +$as_echo "$gl_cv_next_sys_select_h" >&6; } + fi + NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/select.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_select_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_sys_select_h = yes; then + HAVE_SYS_SELECT_H=1 + else + HAVE_SYS_SELECT_H=0 + fi + + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h do : - ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork" -if test "x$ac_cv_func_pthread_atfork" = x""yes; then : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_ATFORK 1 +#define HAVE_WINSOCK2_H 1 _ACEOF fi + done - LIBS="$gl_save_LIBS" + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 fi + for gl_func in pselect select; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Some systems require prerequisite headers. */ +#include +#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H +# include +#endif +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done @@ -36778,13 +47878,31 @@ done + if test $gl_threads_api = posix; then + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + for ac_func in pthread_atfork +do : + ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork" +if test "x$ac_cv_func_pthread_atfork" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PTHREAD_ATFORK 1 +_ACEOF + +fi +done + + LIBS="$gl_save_LIBS" + fi + + : + - gltests_LIBOBJS="$gltests_LIBOBJS unlinkdir.$ac_objext" # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later, @@ -36807,97 +47925,6 @@ $as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h abs_aux_dir=`cd "$ac_aux_dir"; pwd` - - - - - : - - - - - - ac_fn_c_check_type "$LINENO" "useconds_t" "ac_cv_type_useconds_t" "$ac_includes_default" -if test "x$ac_cv_type_useconds_t" = x""yes; then : - -else - -$as_echo "#define useconds_t unsigned int" >>confdefs.h - -fi - - if test $ac_cv_func_usleep = no; then - HAVE_USLEEP=0 - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS usleep.$ac_objext" - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usleep allows large arguments" >&5 -$as_echo_n "checking whether usleep allows large arguments... " >&6; } -if test "${gl_cv_func_usleep_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_usleep_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -int -main () -{ -return !!usleep (1000000); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_usleep_works=yes -else - gl_cv_func_usleep_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_usleep_works" >&5 -$as_echo "$gl_cv_func_usleep_works" >&6; } - if test "$gl_cv_func_usleep_works" != yes; then - REPLACE_USLEEP=1 - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS usleep.$ac_objext" - - fi - fi - - - - - GNULIB_USLEEP=$gl_module_indicator_condition - - - -$as_echo "#define GNULIB_TEST_USLEEP 1" >>confdefs.h - - - abs_aux_dir=`cd "$ac_aux_dir"; pwd` @@ -36905,7 +47932,7 @@ $as_echo "#define GNULIB_TEST_USLEEP 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 $as_echo_n "checking for a traditional french locale... " >&6; } -if test "${gt_cv_locale_fr+set}" = set; then : +if ${gt_cv_locale_fr+:} false; then : $as_echo_n "(cached) " >&6 else @@ -36924,9 +47951,9 @@ char buf[16]; int main () { /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -36935,7 +47962,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -36961,10 +47988,12 @@ int main () { one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -36982,7 +48011,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the native Win32 locale name. + # Test for the native Windows locale name. if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr=French_France.1252 else @@ -36992,7 +48021,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -37037,7 +48066,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 $as_echo_n "checking for a french Unicode locale... " >&6; } -if test "${gt_cv_locale_fr_utf8+set}" = set; then : +if ${gt_cv_locale_fr_utf8+:} false; then : $as_echo_n "(cached) " >&6 else @@ -37060,9 +48089,9 @@ int main () { #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -37071,7 +48100,7 @@ int main () { if (setlocale (LC_ALL, "") == NULL) return 1; # endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -37097,10 +48126,12 @@ int main () { || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') return 1; #endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; +#endif return 0; } @@ -37118,7 +48149,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_fr_utf8=French_France.65001 else @@ -37128,7 +48159,7 @@ _ACEOF ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the usual locale name. @@ -37164,7 +48195,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 $as_echo_n "checking for a traditional japanese locale... " >&6; } -if test "${gt_cv_locale_ja+set}" = set; then : +if ${gt_cv_locale_ja+:} false; then : $as_echo_n "(cached) " >&6 else @@ -37185,9 +48216,9 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -37196,7 +48227,7 @@ int main () if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -37245,13 +48276,14 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Note that on native Win32, the Japanese locale is Japanese_Japan.932, - # and CP932 is very different from EUC-JP, so we cannot use it here. + # Note that on native Windows, the Japanese locale is + # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we + # cannot use it here. gt_cv_locale_ja=none ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the AIX locale name. @@ -37302,7 +48334,7 @@ $as_echo "$gt_cv_locale_ja" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 $as_echo_n "checking for a transitional chinese locale... " >&6; } -if test "${gt_cv_locale_zh_CN+set}" = set; then : +if ${gt_cv_locale_zh_CN+:} false; then : $as_echo_n "(cached) " >&6 else @@ -37324,9 +48356,9 @@ int main () const char *p; /* Check whether the given locale name is recognized by the system. */ #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, + /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE category of the locale to "C". */ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) @@ -37335,7 +48367,7 @@ int main () if (setlocale (LC_ALL, "") == NULL) return 1; #endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. On OpenBSD 4.0, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "646". In this situation, @@ -37384,7 +48416,7 @@ _ACEOF # "ja" as "Japanese" or "Japanese_Japan.932", # and similar. mingw*) - # Test for the hypothetical native Win32 locale name. + # Test for the hypothetical native Windows locale name. if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then gt_cv_locale_zh_CN=Chinese_China.54936 else @@ -37392,9 +48424,15 @@ _ACEOF gt_cv_locale_zh_CN=none fi ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. + gt_cv_locale_zh_CN=none + ;; *) # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the # configure script would override the LC_ALL setting. Likewise for # LC_CTYPE, which is also set at the beginning of the configure script. # Test for the locale name without encoding suffix. @@ -37435,30 +48473,16 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; } if test $ac_cv_func_wctob = no; then + HAVE_WCTOB=0 HAVE_DECL_WCTOB=0 - - : - - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext" - - - : - else + HAVE_WCTOB=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5 $as_echo_n "checking whether wctob works... " >&6; } -if test "${gl_cv_func_wctob_works+set}" = set; then : +if ${gl_cv_func_wctob_works+:} false; then : $as_echo_n "(cached) " >&6 else @@ -37560,24 +48584,7 @@ $as_echo "$gl_cv_func_wctob_works" >&6; } *yes) ;; *) REPLACE_WCTOB=1 ;; esac - if test $REPLACE_WCTOB = 1; then - - : - - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext" - - - : - - else + if test $REPLACE_WCTOB = 0; then ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" " /* Tru64 with Desktop Toolkit C has a bug: must be included before @@ -37590,7 +48597,7 @@ $as_echo "$gl_cv_func_wctob_works" >&6; } #include " -if test "x$ac_cv_have_decl_wctob" = x""yes; then : +if test "x$ac_cv_have_decl_wctob" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -37602,17 +48609,39 @@ _ACEOF if test $ac_cv_have_decl_wctob != yes; then HAVE_DECL_WCTOB=0 - - : - fi fi fi + if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext" + + + : + + fi + + - GNULIB_WCTOB=$gl_module_indicator_condition + if test "$GNULIB_WCTOB" != 1; then + if test "$GNULIB_WCTOB" = 0; then + GNULIB_WCTOB=$gl_module_indicator_condition + else + GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)" + fi + fi + + @@ -37626,6 +48655,7 @@ $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h if false; then REPLACE_WCTOMB=1 fi + if test $REPLACE_WCTOMB = 1; then @@ -37645,7 +48675,16 @@ $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h - GNULIB_WCTOMB=$gl_module_indicator_condition + + if test "$GNULIB_WCTOMB" != 1; then + if test "$GNULIB_WCTOMB" = 0; then + GNULIB_WCTOMB=$gl_module_indicator_condition + else + GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)" + fi + fi + + @@ -37659,7 +48698,7 @@ $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h if test $gl_threads_api = posix; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 $as_echo_n "checking for sched_yield in -lrt... " >&6; } -if test "${ac_cv_lib_rt_sched_yield+set}" = set; then : +if ${ac_cv_lib_rt_sched_yield+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -37693,12 +48732,12 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } -if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then : +if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : YIELD_LIB=-lrt else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 $as_echo_n "checking for sched_yield in -lposix4... " >&6; } -if test "${ac_cv_lib_posix4_sched_yield+set}" = set; then : +if ${ac_cv_lib_posix4_sched_yield+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -37732,7 +48771,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } -if test "x$ac_cv_lib_posix4_sched_yield" = x""yes; then : +if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : YIELD_LIB=-lposix4 fi @@ -37759,14 +48798,285 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wdeclaration-after-statement" >&5 -$as_echo_n "checking whether compiler handles -Wdeclaration-after-statement... " >&6; } -if test "${gl_cv_warn__Wdeclaration_after_statement+set}" = set; then : + + + if test -n "$GCC"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5 +$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; } + if ${gl_cv_cc_nomfi_supported+:} false; then : $as_echo_n "(cached) " >&6 else - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CPPFLAGS} -Wdeclaration-after-statement" + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_nomfi_supported=yes +else + gl_cv_cc_nomfi_supported=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5 +$as_echo "$gl_cv_cc_nomfi_supported" >&6; } + + if test "$gl_cv_cc_nomfi_supported" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5 +$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; } + if ${gl_cv_cc_nomfi_needed+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +void f (void) + { + typedef struct { int a; int b; } s_t; + s_t s1 = { 0, }; + } + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_nomfi_needed=no +else + gl_cv_cc_nomfi_needed=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5 +$as_echo "$gl_cv_cc_nomfi_needed" >&6; } + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5 +$as_echo_n "checking whether -Wuninitialized is supported... " >&6; } + if ${gl_cv_cc_uninitialized_supported+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror -Wuninitialized" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_uninitialized_supported=yes +else + gl_cv_cc_uninitialized_supported=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5 +$as_echo "$gl_cv_cc_uninitialized_supported" >&6; } + + fi + + # List all gcc warning categories. + gl_manywarn_set= + for gl_manywarn_item in \ + -W \ + -Wabi \ + -Waddress \ + -Waggressive-loop-optimizations \ + -Wall \ + -Warray-bounds \ + -Wattributes \ + -Wbad-function-cast \ + -Wbuiltin-macro-redefined \ + -Wcast-align \ + -Wchar-subscripts \ + -Wclobbered \ + -Wcomment \ + -Wcomments \ + -Wcoverage-mismatch \ + -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 \ + -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-include-dirs \ + -Wmissing-parameter-type \ + -Wmissing-prototypes \ + -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-local-addr \ + -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 \ + -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 \ + -fdiagnostics-show-option \ + -funit-at-a-time \ + \ + ; do + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + + # 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 + + warnings=$gl_manywarn_set + +# Set up the list of the pointless, undesired warnings. +nw= +nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings +nw="$nw -Wundef" # All compiler preprocessors support #if UNDEF +nw="$nw -Wtraditional" # All compilers nowadays support ANSI C +nw="$nw -Wconversion" # These warnings usually don't point to mistakes. +nw="$nw -Wsign-conversion" # Likewise. +nw="$nw -Wc++-compat" # malloc returns void* and a cast would be ugly. +# Warnings we might enable in the future, but not yet (because they generate a +# lot of noise). +marginal="" +marginal="$marginal -Wtraditional-conversion" +marginal="$marginal -Wpadded" +marginal="$marginal -Wformat-nonliteral" +marginal="$marginal -Wunreachable-code" +marginal="$marginal -Wunused-parameter" +excluded_warnings="$nw $marginal" + +# Enable all GCC warnings not in this list. + + gl_warn_set= + set x $warnings; shift + for gl_warn_item + do + case " $excluded_warnings " in + *" $gl_warn_item "*) + ;; + *) + gl_warn_set="$gl_warn_set $gl_warn_item" + ;; + esac + done + warnings=$gl_warn_set + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5 +$as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; } +if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -37778,29 +49088,43 @@ main () return 0; } _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - gl_cv_warn__Wdeclaration_after_statement=yes +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_warn_c__Werror__Wunknown_warning_option=yes else - gl_cv_warn__Wdeclaration_after_statement=no + gl_cv_warn_c__Werror__Wunknown_warning_option=no fi -rm -f conftest.err conftest.i conftest.$ac_ext - CPPFLAGS="$save_CPPFLAGS" +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wdeclaration_after_statement" >&5 -$as_echo "$gl_cv_warn__Wdeclaration_after_statement" >&6; } -if test "x$gl_cv_warn__Wdeclaration_after_statement" = x""yes; then : - as_fn_append WARN_CFLAGS " -Wdeclaration-after-statement" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5 +$as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; } +if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then : + gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror' +else + gl_unknown_warnings_are_errors= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wall" >&5 -$as_echo_n "checking whether compiler handles -Wall... " >&6; } -if test "${gl_cv_warn__Wall+set}" = set; then : +# Check whether --enable-compiler-warnings was given. +if test "${enable_compiler_warnings+set}" = set; then : + enableval=$enable_compiler_warnings; + for w in $warnings + do + +as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh` +gl_positive="$w" +case $gl_positive in + -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5 +$as_echo_n "checking whether C compiler handles $w... " >&6; } +if eval \${$as_gl_Warn+:} false; then : $as_echo_n "(cached) " >&6 else - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CPPFLAGS} -Wall" + gl_save_compiler_FLAGS="$CFLAGS" + as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -37812,22 +49136,29 @@ main () return 0; } _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - gl_cv_warn__Wall=yes +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_gl_Warn=yes" else - gl_cv_warn__Wall=no + eval "$as_gl_Warn=no" fi -rm -f conftest.err conftest.i conftest.$ac_ext - CPPFLAGS="$save_CPPFLAGS" +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wall" >&5 -$as_echo "$gl_cv_warn__Wall" >&6; } -if test "x$gl_cv_warn__Wall" = x""yes; then : - as_fn_append WARN_CFLAGS " -Wall" +eval ac_res=\$$as_gl_Warn + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then : + as_fn_append WARN_CFLAGS " $w" fi + done + + +fi + @@ -37855,12 +49186,12 @@ fi ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam" -if test "x$ac_cv_func_getpwnam" = x""yes; then : +if test "x$ac_cv_func_getpwnam" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam in -lsun" >&5 $as_echo_n "checking for getpwnam in -lsun... " >&6; } -if test "${ac_cv_lib_sun_getpwnam+set}" = set; then : +if ${ac_cv_lib_sun_getpwnam+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -37894,7 +49225,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwnam" >&5 $as_echo "$ac_cv_lib_sun_getpwnam" >&6; } -if test "x$ac_cv_lib_sun_getpwnam" = x""yes; then : +if test "x$ac_cv_lib_sun_getpwnam" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSUN 1 _ACEOF @@ -37908,7 +49239,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modf in -lm" >&5 $as_echo_n "checking for modf in -lm... " >&6; } -if test "${ac_cv_lib_m_modf+set}" = set; then : +if ${ac_cv_lib_m_modf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -37942,7 +49273,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_modf" >&5 $as_echo "$ac_cv_lib_m_modf" >&6; } -if test "x$ac_cv_lib_m_modf" = x""yes; then : +if test "x$ac_cv_lib_m_modf" = xyes; then : FINDLIBS="-lm $FINDLIBS" cat >>confdefs.h <<_ACEOF @@ -37953,7 +49284,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabs in -lm" >&5 $as_echo_n "checking for fabs in -lm... " >&6; } -if test "${ac_cv_lib_m_fabs+set}" = set; then : +if ${ac_cv_lib_m_fabs+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -37987,7 +49318,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_fabs" >&5 $as_echo "$ac_cv_lib_m_fabs" >&6; } -if test "x$ac_cv_lib_m_fabs" = x""yes; then : +if test "x$ac_cv_lib_m_fabs" = xyes; then : FINDLIBS="-lm $FINDLIBS" cat >>confdefs.h <<_ACEOF @@ -38000,7 +49331,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38110,32 +49441,6 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -for ac_header in fcntl.h string.h limits.h errno.h stdlib.h stddef.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -for ac_header in unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - for ac_header in sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -38149,22 +49454,10 @@ fi done -for ac_header in sys/utsname.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_utsname_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_UTSNAME_H 1 -_ACEOF - -fi - -done - for ac_header in sys/resource.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_resource_h" = x""yes; then : +if test "x$ac_cv_header_sys_resource_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_RESOURCE_H 1 _ACEOF @@ -38175,7 +49468,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; } -if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then : +if ${ac_cv_header_sys_types_h_makedev+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38203,7 +49496,7 @@ $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } if test $ac_cv_header_sys_types_h_makedev = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then : +if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h @@ -38213,7 +49506,7 @@ fi if test $ac_cv_header_sys_mkdev_h = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then : +if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h @@ -38228,7 +49521,7 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if eval "test \"\${$as_ac_Header+set}\"" = set; then : +if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38268,7 +49561,7 @@ done if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -38302,11 +49595,11 @@ for ac_lib in '' dir; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no @@ -38325,7 +49618,7 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -38359,11 +49652,11 @@ for ac_lib in '' x; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test "${ac_cv_search_opendir+set}" = set; then : +if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no @@ -38383,7 +49676,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if test "${ac_cv_header_stat_broken+set}" = set; then : +if ${ac_cv_header_stat_broken+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38425,7 +49718,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38469,7 +49762,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then : +if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38498,7 +49791,7 @@ $as_echo "#define gid_t int" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : else @@ -38509,7 +49802,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = x""yes; then : +if test "x$ac_cv_type_ssize_t" = xyes; then : else @@ -38520,7 +49813,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +if test "x$ac_cv_type_pid_t" = xyes; then : else @@ -38531,7 +49824,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default" -if test "x$ac_cv_type_ino_t" = x""yes; then : +if test "x$ac_cv_type_ino_t" = xyes; then : else @@ -38542,7 +49835,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default" -if test "x$ac_cv_type_dev_t" = x""yes; then : +if test "x$ac_cv_type_dev_t" = xyes; then : else @@ -38553,7 +49846,7 @@ _ACEOF fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = x""yes; then : +if test "x$ac_cv_type_mode_t" = xyes; then : else @@ -38564,7 +49857,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLOCKS 1 @@ -38584,7 +49877,7 @@ fi ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then : +if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_RDEV 1 @@ -38598,7 +49891,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 $as_echo_n "checking for promoted mode_t type... " >&6; } -if test "${gl_cv_promoted_mode_t+set}" = set; then : +if ${gl_cv_promoted_mode_t+:} false; then : $as_echo_n "(cached) " >&6 else @@ -38633,7 +49926,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38670,7 +49963,7 @@ ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_ #include <$ac_cv_struct_tm> " -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -38686,7 +49979,7 @@ $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " -if test "x$ac_cv_have_decl_tzname" = x""yes; then : +if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -38698,7 +49991,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } -if test "${ac_cv_var_tzname+set}" = set; then : +if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38737,7 +50030,7 @@ fi for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" -if test "x$ac_cv_func_strftime" = x""yes; then : +if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRFTIME 1 _ACEOF @@ -38746,7 +50039,7 @@ else # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } -if test "${ac_cv_lib_intl_strftime+set}" = set; then : +if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -38780,7 +50073,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } -if test "x$ac_cv_lib_intl_strftime" = x""yes; then : +if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" @@ -38790,7 +50083,7 @@ fi done ac_fn_c_check_func "$LINENO" "memcmp" "ac_cv_func_memcmp" -if test "x$ac_cv_func_memcmp" = x""yes; then : +if test "x$ac_cv_func_memcmp" = xyes; then : $as_echo "#define HAVE_MEMCMP 1" >>confdefs.h else @@ -38803,7 +50096,7 @@ esac fi ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" -if test "x$ac_cv_func_memset" = x""yes; then : +if test "x$ac_cv_func_memset" = xyes; then : $as_echo "#define HAVE_MEMSET 1" >>confdefs.h else @@ -38816,7 +50109,7 @@ esac fi ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" -if test "x$ac_cv_func_stpcpy" = x""yes; then : +if test "x$ac_cv_func_stpcpy" = xyes; then : $as_echo "#define HAVE_STPCPY 1" >>confdefs.h else @@ -38829,7 +50122,7 @@ esac fi ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" -if test "x$ac_cv_func_strdup" = x""yes; then : +if test "x$ac_cv_func_strdup" = xyes; then : $as_echo "#define HAVE_STRDUP 1" >>confdefs.h else @@ -38842,7 +50135,7 @@ esac fi ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" -if test "x$ac_cv_func_strstr" = x""yes; then : +if test "x$ac_cv_func_strstr" = xyes; then : $as_echo "#define HAVE_STRSTR 1" >>confdefs.h else @@ -38855,7 +50148,7 @@ esac fi ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" -if test "x$ac_cv_func_strtol" = x""yes; then : +if test "x$ac_cv_func_strtol" = xyes; then : $as_echo "#define HAVE_STRTOL 1" >>confdefs.h else @@ -38868,7 +50161,7 @@ esac fi ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" -if test "x$ac_cv_func_strtoul" = x""yes; then : +if test "x$ac_cv_func_strtoul" = xyes; then : $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h else @@ -38896,7 +50189,7 @@ done for ac_func in getrusage do : ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage" -if test "x$ac_cv_func_getrusage" = x""yes; then : +if test "x$ac_cv_func_getrusage" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETRUSAGE 1 _ACEOF @@ -38907,13 +50200,13 @@ done for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" -if test "x$ac_cv_func_vprintf" = x""yes; then : +if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -if test "x$ac_cv_func__doprnt" = x""yes; then : +if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h @@ -38927,7 +50220,7 @@ done # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38960,7 +50253,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -38979,7 +50272,7 @@ else #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -39023,7 +50316,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39064,7 +50357,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -39074,23 +50367,20 @@ else /* end confdefs.h. */ $ac_includes_default int -find_stack_direction () +find_stack_direction (int *addr, int depth) { - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; } int -main () +main (int argc, char **argv) { - return find_stack_direction () < 0; + return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -39114,7 +50404,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 $as_echo_n "checking whether closedir returns void... " >&6; } -if test "${ac_cv_func_closedir_void+set}" = set; then : +if ${ac_cv_func_closedir_void+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -39156,14 +50446,14 @@ fi ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent" -if test "x$ac_cv_func_getmntent" = x""yes; then : +if test "x$ac_cv_func_getmntent" = xyes; then : else # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, # -lseq on Dynix/PTX, -lgen on Unixware. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 $as_echo_n "checking for library containing getmntent... " >&6; } -if test "${ac_cv_search_getmntent+set}" = set; then : +if ${ac_cv_search_getmntent+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -39197,11 +50487,11 @@ for ac_lib in '' sun seq gen; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_getmntent+set}" = set; then : + if ${ac_cv_search_getmntent+:} false; then : break fi done -if test "${ac_cv_search_getmntent+set}" = set; then : +if ${ac_cv_search_getmntent+:} false; then : else ac_cv_search_getmntent=no @@ -39220,7 +50510,7 @@ fi for ac_func in getmntent do : ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent" -if test "x$ac_cv_func_getmntent" = x""yes; then : +if test "x$ac_cv_func_getmntent" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETMNTENT 1 _ACEOF @@ -39234,7 +50524,7 @@ fi for ac_func in getmntent do : ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent" -if test "x$ac_cv_func_getmntent" = x""yes; then : +if test "x$ac_cv_func_getmntent" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETMNTENT 1 _ACEOF @@ -39281,7 +50571,7 @@ done for ac_func in forcefindlib do : ac_fn_c_check_func "$LINENO" "forcefindlib" "ac_cv_func_forcefindlib" -if test "x$ac_cv_func_forcefindlib" = x""yes; then : +if test "x$ac_cv_func_forcefindlib" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FORCEFINDLIB 1 _ACEOF @@ -39305,7 +50595,7 @@ done for ac_func in setgroups do : ac_fn_c_check_func "$LINENO" "setgroups" "ac_cv_func_setgroups" -if test "x$ac_cv_func_setgroups" = x""yes; then : +if test "x$ac_cv_func_setgroups" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SETGROUPS 1 _ACEOF @@ -39325,7 +50615,7 @@ done if test $ac_cv_working_alloca_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 $as_echo_n "checking for alloca as a compiler built-in... " >&6; } -if test "${gl_cv_rpl_alloca+set}" = set; then : +if ${gl_cv_rpl_alloca+:} false; then : $as_echo_n "(cached) " >&6 else @@ -39361,6 +50651,14 @@ $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h ALLOCA_H=alloca.h fi + if test -n "$ALLOCA_H"; then + GL_GENERATE_ALLOCA_H_TRUE= + GL_GENERATE_ALLOCA_H_FALSE='#' +else + GL_GENERATE_ALLOCA_H_TRUE='#' + GL_GENERATE_ALLOCA_H_FALSE= +fi + @@ -39379,9 +50677,23 @@ fi # following run test, then default to *not* using the included regex.c. # If cross compiling, assume the test would fail and use the included # regex.c. + + : + + + + + + + : + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5 $as_echo_n "checking for working re_compile_pattern... " >&6; } -if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then : +if ${gl_cv_func_re_compile_pattern_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -39389,10 +50701,25 @@ else else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - #include - #include - #include +#include + + #include + #include + #include + + #if defined M_CHECK_ACTION || HAVE_DECL_ALARM + # include + # include + #endif + + #if HAVE_MALLOC_H + # include + #endif + + #ifdef M_CHECK_ACTION + /* Exit with distinguishable exit code. */ + static void sigabrt_no_core (int sig) { raise (SIGTERM); } + #endif int main () @@ -39404,26 +50731,72 @@ int result = 0; const char *s; struct re_registers regs; - /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html - This test needs valgrind to catch the bug on Debian - GNU/Linux 3.1 x86, but it might catch the bug better - on other platforms and it shouldn't hurt to try the - test here. */ + /* Some builds of glibc go into an infinite loop on this + test. Use alarm to force death, and mallopt to avoid + malloc recursion in diagnosing the corrupted heap. */ +#if HAVE_DECL_ALARM + signal (SIGALRM, SIG_DFL); + alarm (2); +#endif +#ifdef M_CHECK_ACTION + signal (SIGABRT, sigabrt_no_core); + mallopt (M_CHECK_ACTION, 2); +#endif + if (setlocale (LC_ALL, "en_US.UTF-8")) { - static char const pat[] = "insert into"; - static char const data[] = - "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; - re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE - | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern (pat, sizeof pat - 1, ®ex); - if (s) - result |= 1; - else if (re_search (®ex, data, sizeof data - 1, - 0, sizeof data - 1, ®s) - != -1) - result |= 1; + { + /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + This test needs valgrind to catch the bug on Debian + GNU/Linux 3.1 x86, but it might catch the bug better + on other platforms and it shouldn't hurt to try the + test here. */ + static char const pat[] = "insert into"; + static char const data[] = + "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE + | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + result |= 1; + else if (re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, ®s) + != -1) + result |= 1; + } + + { + /* This test is from glibc bug 15078. + The test case is from Andreas Schwab in + . + */ + static char const pat[] = "[^x]x"; + static char const data[] = + /* */ + "\xe1\x80\x80" + "\xe1\x80\xbb" + "\xe1\x80\xbd" + "\xe1\x80\x94" + "\xe1\x80\xba" + "\xe1\x80\xaf" + "\xe1\x80\x95" + "\xe1\x80\xba" + "x"; + re_set_syntax (0); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + result |= 1; + else + { + i = re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, 0); + if (i != 0 && i != 21) + result |= 1; + } + } + if (! setlocale (LC_ALL, "C")) return 1; } @@ -39549,6 +50922,9 @@ $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; } if test $ac_use_included_regex = yes; then +$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h + + $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h @@ -39596,55 +50972,6 @@ $as_echo "#define regerror rpl_regerror" >>confdefs.h $as_echo "#define regfree rpl_regfree" >>confdefs.h - case " $LIBOBJS " in - *" regex.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS regex.$ac_objext" - ;; -esac - - - - - - - for ac_header in libintl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" -if test "x$ac_cv_header_libintl_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBINTL_H 1 -_ACEOF - -fi - -done - - - : - - - - - - - - - - - - ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include -" -if test "x$ac_cv_have_decl_isblank" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ISBLANK $ac_have_decl -_ACEOF - - fi @@ -39654,7 +50981,7 @@ _ACEOF set dummy sort; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SORT+set}" = set; then : +if ${ac_cv_path_SORT+:} false; then : $as_echo_n "(cached) " >&6 else case $SORT in @@ -39668,7 +50995,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -39705,7 +51032,7 @@ else # sort thinks there is more than one input line there. We have # to make sort -c do its thing with the input lines in the wrong # order to determine that (we can't do it in one shot because - # if sort returns nonzero we cant tell that it wasn't just + # if sort returns nonzero we can't tell that it wasn't just # complaining about this unknown -z option. if $SORT -z -c < "${srcdir:-.}/m4/order-bad.bin" 2>/dev/null >/dev/null then @@ -39746,14 +51073,14 @@ ac_fn_c_check_member "$LINENO" "struct dirent" "d_type" "ac_cv_member_struct_dir #include #include " -if test "x$ac_cv_member_struct_dirent_d_type" = x""yes; then : +if test "x$ac_cv_member_struct_dirent_d_type" = xyes; then : fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__noreturn__)) support" >&5 $as_echo_n "checking for __attribute__ ((__noreturn__)) support... " >&6; } -if test "${jy_cv_cc_attribute_noreturn+set}" = set; then : +if ${jy_cv_cc_attribute_noreturn+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -39841,7 +51168,7 @@ rm -f conf$$.file set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGFMT+set}" = set; then : +if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in @@ -39882,7 +51209,7 @@ fi set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GMSGFMT+set}" = set; then : +if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in @@ -39896,7 +51223,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -39963,7 +51290,7 @@ rm -f conf$$.file set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XGETTEXT+set}" = set; then : +if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in @@ -40040,7 +51367,7 @@ rm -f conf$$.file set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSGMERGE+set}" = set; then : +if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in @@ -40578,7 +51905,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then : +if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" @@ -40612,7 +51939,7 @@ $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then : +if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" @@ -40688,7 +52015,7 @@ typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } -if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then : +if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -40755,7 +52082,7 @@ $as_echo "$ac_res" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : +if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -40763,14 +52090,16 @@ else am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include #include + int main () { iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } @@ -40785,14 +52114,16 @@ rm -f core conftest.err conftest.$ac_objext \ LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include #include + int main () { iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); ; return 0; } @@ -40812,19 +52143,21 @@ $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } -if test "${am_cv_func_iconv_works+set}" = set; then : +if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else - am_save_LIBS="$LIBS" + am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then : - case "$host_os" in + + case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -40833,6 +52166,7 @@ else #include int main () { + int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { @@ -40849,7 +52183,8 @@ int main () (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) - return 1; + result |= 1; + iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from @@ -40868,7 +52203,27 @@ int main () (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) - return 1; + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + const char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ @@ -40887,7 +52242,8 @@ int main () (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) - return 1; + result |= 8; + iconv_close (cd_88591_to_utf8); } } #endif @@ -40901,8 +52257,8 @@ int main () && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - return 1; - return 0; + result |= 16; + return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -41408,7 +52764,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } -if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then : +if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" @@ -41600,6 +52956,240 @@ $as_echo "#define FINDUTILS 1" >>confdefs.h $as_echo "#define ALREADY_INCLUDED_CONFIG_H 1" >>confdefs.h + + + + + + + # Find any Python interpreter. + if test -z "$PYTHON"; then + for ac_prog in python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHON+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON +if test -n "$PYTHON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 +$as_echo "$PYTHON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PYTHON" && break +done +test -n "$PYTHON" || PYTHON=":" + + fi + am_display_PYTHON=python + + + if test "$PYTHON" = :; then + : + else + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 +$as_echo_n "checking for $am_display_PYTHON version... " >&6; } +if ${am_cv_python_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 +$as_echo "$am_cv_python_version" >&6; } + PYTHON_VERSION=$am_cv_python_version + + + + PYTHON_PREFIX='${prefix}' + + PYTHON_EXEC_PREFIX='${exec_prefix}' + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 +$as_echo_n "checking for $am_display_PYTHON platform... " >&6; } +if ${am_cv_python_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 +$as_echo "$am_cv_python_platform" >&6; } + PYTHON_PLATFORM=$am_cv_python_platform + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 +$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } +if ${am_cv_python_pythondir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 +$as_echo "$am_cv_python_pythondir" >&6; } + pythondir=$am_cv_python_pythondir + + + + pkgpythondir=\${pythondir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 +$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } +if ${am_cv_python_pyexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 +$as_echo "$am_cv_python_pyexecdir" >&6; } + pyexecdir=$am_cv_python_pyexecdir + + + + pkgpyexecdir=\${pyexecdir}/$PACKAGE + + + + fi + + + if test "$PYTHON" != :; then + HAVE_PYTHON_TRUE= + HAVE_PYTHON_FALSE='#' +else + HAVE_PYTHON_TRUE='#' + HAVE_PYTHON_FALSE= +fi + +for ac_prog in faketime +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FAKETIME+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$FAKETIME"; then + ac_cv_prog_FAKETIME="$FAKETIME" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_FAKETIME="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +FAKETIME=$ac_cv_prog_FAKETIME +if test -n "$FAKETIME"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FAKETIME" >&5 +$as_echo "$FAKETIME" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$FAKETIME" && break +done +test -n "$FAKETIME" || FAKETIME=":" + + if test "$FAKETIME" != :; then + HAVE_FAKETIME_TRUE= + HAVE_FAKETIME_FALSE='#' +else + HAVE_FAKETIME_TRUE='#' + HAVE_FAKETIME_FALSE= +fi + + # This is necessary so that .o files in LIBOBJS are also built via # the ANSI2KNR-filtering rules. #LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` @@ -41607,7 +53197,7 @@ $as_echo "#define ALREADY_INCLUDED_CONFIG_H 1" >>confdefs.h # Note that in the list below, po/Makefile.in should appear before # po/Makefile, so that po/Makefile can be created even if po/Makefile.in # starts off missing. -ac_config_files="$ac_config_files Makefile build-aux/Makefile doc/Makefile find/Makefile find/testsuite/Makefile gnulib/Makefile gnulib/lib/Makefile lib/Makefile locate/Makefile locate/testsuite/Makefile m4/Makefile po/Makefile.in po/Makefile tests/Makefile xargs/Makefile xargs/testsuite/Makefile" +ac_config_files="$ac_config_files Makefile build-aux/Makefile doc/Makefile find/Makefile find/testsuite/Makefile gl/Makefile gl/lib/Makefile lib/Makefile locate/Makefile locate/testsuite/Makefile m4/Makefile po/Makefile.in po/Makefile tests/Makefile xargs/Makefile xargs/testsuite/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -41673,10 +53263,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -41692,6 +53293,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -41730,8 +53332,62 @@ if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_BYTESWAP_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + + +if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi CONFIG_INCLUDE=config.h +if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -41753,6 +53409,14 @@ fi + + + +if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + gltests_libobjs= gltests_ltlibobjs= if test -n "$gltests_LIBOBJS"; then @@ -41772,8 +53436,20 @@ if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then + as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_FAKETIME_TRUE}" && test -z "${HAVE_FAKETIME_FALSE}"; then + as_fn_error $? "conditional \"HAVE_FAKETIME\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -41874,6 +53550,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -42069,16 +53746,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -42138,28 +53815,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -42180,8 +53845,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU findutils $as_me 4.5.10, which was -generated by GNU Autoconf 2.67. Invocation command line was +This file was extended by GNU findutils $as_me 4.5.14, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -42252,11 +53917,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GNU findutils config.status 4.5.10 -configured by $0, generated by GNU Autoconf 2.67, +GNU findutils config.status 4.5.14 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -42347,7 +54012,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -42398,8 +54063,8 @@ do "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "find/Makefile") CONFIG_FILES="$CONFIG_FILES find/Makefile" ;; "find/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES find/testsuite/Makefile" ;; - "gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;; - "gnulib/lib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/lib/Makefile" ;; + "gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;; + "gl/lib/Makefile") CONFIG_FILES="$CONFIG_FILES gl/lib/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "locate/Makefile") CONFIG_FILES="$CONFIG_FILES locate/Makefile" ;; "locate/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES locate/testsuite/Makefile" ;; @@ -42410,7 +54075,7 @@ do "xargs/Makefile") CONFIG_FILES="$CONFIG_FILES xargs/Makefile" ;; "xargs/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES xargs/testsuite/Makefile" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -42434,9 +54099,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -42444,12 +54110,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -42471,7 +54138,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -42499,7 +54166,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -42547,7 +54214,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -42579,7 +54246,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -42613,7 +54280,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -42625,8 +54292,8 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -42727,7 +54394,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -42746,7 +54413,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -42755,7 +54422,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -42781,8 +54448,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -42918,21 +54585,22 @@ s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -42943,20 +54611,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ + mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. @@ -43138,7 +54806,7 @@ $as_echo X"$file" | case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -43154,7 +54822,8 @@ $as_echo X"$file" | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration @@ -43165,12 +54834,12 @@ $as_echo X"$file" | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES diff --git a/configure.ac b/configure.ac index 704b5ea..6ff1bde 100644 --- a/configure.ac +++ b/configure.ac @@ -1,17 +1,16 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([GNU findutils], 4.5.10, [bug-findutils@gnu.org]) +AC_INIT([GNU findutils], 4.5.14, [bug-findutils@gnu.org]) AC_CONFIG_AUX_DIR(build-aux) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([find/pred.c]) AC_CONFIG_HEADERS([config.h]) AC_CANONICAL_HOST -AC_CONFIG_MACRO_DIR(gnulib/m4) +AC_CONFIG_MACRO_DIR(gl/m4) dnl Set of available languages. ALL_LINGUAS="be bg cs ca da de el eo es et fi fr ga gl hr hu id it ja ko lg lt ms nl pl pt pt_BR ro ru rw sk sl sr sv tr uk vi zh_CN zh_TW" -AC_SUBST(INCLUDES)dnl AC_SUBST(AUXDIR,$ac_aux_dir) dnl check for --with-fts FIND_WITH_FTS @@ -77,10 +76,9 @@ AC_PROG_CPP dnl for gnulib gl_EARLY -AM_C_PROTOTYPES - AC_PROG_INSTALL -AC_PROG_RANLIB +AC_CHECK_TOOLS([AR], [ar]) +AC_CHECK_TOOLS([RANLIB], [ranlib], [:]) dnl AC_PROG_LIBTOOL AC_PROG_MAKE_SET AC_SYS_LARGEFILE @@ -89,11 +87,39 @@ AC_SYS_LARGEFILE gl_INIT dnl Enable various GCC warnings. -gl_WARN_ADD([-Wdeclaration-after-statement]) -gl_WARN_ADD([-Wall]) - - -dnl Older versions of gnulib/m4/nls.m4 provide AM_MKINSTALLDIRS. +gl_MANYWARN_ALL_GCC([warnings]) +# Set up the list of the pointless, undesired warnings. +nw= +nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings +nw="$nw -Wundef" # All compiler preprocessors support #if UNDEF +nw="$nw -Wtraditional" # All compilers nowadays support ANSI C +nw="$nw -Wconversion" # These warnings usually don't point to mistakes. +nw="$nw -Wsign-conversion" # Likewise. +nw="$nw -Wc++-compat" # malloc returns void* and a cast would be ugly. +# Warnings we might enable in the future, but not yet (because they generate a +# lot of noise). +marginal="" +marginal="$marginal -Wtraditional-conversion" +marginal="$marginal -Wpadded" +marginal="$marginal -Wformat-nonliteral" +marginal="$marginal -Wunreachable-code" +marginal="$marginal -Wunused-parameter" +excluded_warnings="$nw $marginal" + +# Enable all GCC warnings not in this list. +gl_MANYWARN_COMPLEMENT([warnings], [$warnings], [$excluded_warnings]) + +AC_ARG_ENABLE(compiler-warnings, + AS_HELP_STRING(--enable-compiler-warnings,Enable many compiler warnings), + [ + for w in $warnings + do + gl_WARN_ADD([$w]) + done + ] + ) + +dnl Older versions of gl/m4/nls.m4 provide AM_MKINSTALLDIRS. dnl The current version of gnulib does not, but the version of dnl po/Makefile.in.in that comes with gettext-0.14.6 expects dnl that @MKINSTALLDIRS@ will be expanded. @@ -119,15 +145,11 @@ AC_SUBST([FINDLIBS]) dnl Checks for header files. AC_HEADER_STDC -dnl Assume unistd.h is present - coreutils does too. -AC_CHECK_HEADERS(fcntl.h string.h limits.h errno.h stdlib.h stddef.h) -AC_CHECK_HEADERS(unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.h) AC_CHECK_HEADERS(sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h) -dnl find.c needs sys/utsname.h because it calls uname(2). -AC_CHECK_HEADERS(sys/utsname.h) dnl fdleak.c needs sys/resource.h because it calls getrlimit(2). AC_CHECK_HEADERS(sys/resource.h) AC_HEADER_MAJOR +dnl TODO: it's possible gnulib eliminates the need for AC_HEADER_DIRENT. AC_HEADER_DIRENT AC_HEADER_STAT AC_HEADER_SYS_WAIT @@ -209,6 +231,12 @@ dnl Hence they need to know if they are being compiled into findutils or not. AC_DEFINE([FINDUTILS], 1, [Define if we are compiling GNU findutils]) AC_DEFINE([ALREADY_INCLUDED_CONFIG_H], 1, [Define so that source code can verify that config.h was already included]) +dnl Test support. +AM_PATH_PYTHON(,, [:]) +AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) +AC_CHECK_PROGS([FAKETIME],[faketime],[:]) +AM_CONDITIONAL([HAVE_FAKETIME], [test "$FAKETIME" != :]) + # This is necessary so that .o files in LIBOBJS are also built via # the ANSI2KNR-filtering rules. #LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` @@ -222,8 +250,8 @@ build-aux/Makefile doc/Makefile find/Makefile find/testsuite/Makefile -gnulib/Makefile -gnulib/lib/Makefile +gl/Makefile +gl/lib/Makefile lib/Makefile locate/Makefile locate/testsuite/Makefile diff --git a/doc/Makefile.in b/doc/Makefile.in index c8bbbf4..6a13fd6 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,238 +53,203 @@ subdir = doc DIST_COMMON = $(find_TEXINFOS) $(find_maint_TEXINFOS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in $(srcdir)/stamp-1 \ $(srcdir)/stamp-vti $(srcdir)/version.texi \ - $(srcdir)/versionmaint.texi mdate-sh + $(srcdir)/versionmaint.texi mdate-sh texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -289,6 +271,11 @@ TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__installdirs = "$(DESTDIR)$(infodir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -311,6 +298,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ @@ -318,6 +311,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -328,6 +323,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -350,59 +346,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -410,6 +453,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -421,12 +466,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -438,10 +498,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -481,49 +557,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -550,6 +666,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -559,7 +677,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -571,8 +690,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -615,26 +736,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -651,17 +794,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -683,19 +836,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -711,6 +880,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -725,8 +900,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -748,30 +932,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -779,6 +995,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -786,18 +1003,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -837,18 +1067,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -858,6 +1090,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -868,12 +1102,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -894,6 +1131,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -904,7 +1144,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -912,8 +1154,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -929,7 +1177,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -937,8 +1187,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -960,10 +1216,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -975,19 +1238,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -995,26 +1271,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -1032,6 +1338,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1044,11 +1353,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1056,6 +1375,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1063,10 +1383,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1076,10 +1399,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1103,6 +1431,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1110,14 +1439,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1127,6 +1459,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1139,7 +1473,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1180,9 +1516,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1348,9 +1689,7 @@ uninstall-html-am: uninstall-info-am: @$(PRE_UNINSTALL) - @if test -d '$(DESTDIR)$(infodir)' && \ - (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ @@ -1484,10 +1823,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) @@ -1527,8 +1871,11 @@ install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) - test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1543,18 +1890,22 @@ install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ - if test -d "$$d$$p"; then \ + d2=$$d$$p; \ + if test -d "$$d2"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ - echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ + echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ - list2="$$list2 $$d$$p"; \ + list2="$$list2 $$d2"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ @@ -1566,9 +1917,12 @@ install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) - test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \ + fi; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ @@ -1586,8 +1940,7 @@ install-info-am: $(INFO_DEPS) echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) - @if (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + @if $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ @@ -1601,8 +1954,11 @@ install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) - test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1614,8 +1970,11 @@ install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) - test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ diff --git a/doc/fdl.texi b/doc/fdl.texi index fc19ddd..cb71f05 100644 --- a/doc/fdl.texi +++ b/doc/fdl.texi @@ -481,7 +481,7 @@ license notices just after the title page: @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, -replace the ``with@dots{}Texts.'' line with this: +replace the ``with@dots{}Texts.''@: line with this: @smallexample @group @@ -503,4 +503,3 @@ to permit their use in free software. @c Local Variables: @c ispell-local-pdict: "ispell-dict" @c End: - diff --git a/doc/find-maint.info b/doc/find-maint.info index e571a52..0b88456 100644 --- a/doc/find-maint.info +++ b/doc/find-maint.info @@ -1,7 +1,5 @@ -This is -/home/james/source/GNU/findutils/git/gnu/findutils/doc/find-maint.info, -produced by makeinfo version 4.13 from -/home/james/source/GNU/findutils/git/gnu/findutils/doc/find-maint.texi. +This is ../../../findutils/doc/find-maint.info, produced by makeinfo +version 4.13 from ../../../findutils/doc/find-maint.texi. INFO-DIR-SECTION GNU organization START-INFO-DIR-ENTRY @@ -11,9 +9,9 @@ END-INFO-DIR-ENTRY This manual explains how GNU findutils is maintained, how changes should be made and tested, and what resources exist to help developers. - This is edition 4.5.10, for findutils version 4.5.10. + This is edition 4.5.14, for findutils version 4.5.14. - Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2010, 2011 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -31,9 +29,9 @@ Maintaining GNU Findutils This manual explains how GNU findutils is maintained, how changes should be made and tested, and what resources exist to help developers. - This is edition 4.5.10, for findutils version 4.5.10. + This is edition 4.5.14, for findutils version 4.5.14. - Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2010, 2011 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -225,13 +223,13 @@ circumstances. * Menu: * Make the Compiler Find the Bugs:: +* Factor Out Repeated Code:: * The File System Is Being Modified:: * Don't Trust the File System Contents:: * Debugging is For Users Too:: -* Factor Out Repeated Code::  -File: find-maint.info, Node: Make the Compiler Find the Bugs, Next: The File System Is Being Modified, Up: Coding Conventions +File: find-maint.info, Node: Make the Compiler Find the Bugs, Next: Factor Out Repeated Code, Up: Coding Conventions 4.1 Make the Compiler Find the Bugs =================================== @@ -324,7 +322,7 @@ code: *p = 0;  -File: find-maint.info, Node: Factor Out Repeated Code, Prev: Debugging is For Users Too, Up: Coding Conventions +File: find-maint.info, Node: Factor Out Repeated Code, Next: The File System Is Being Modified, Prev: Make the Compiler Find the Bugs, Up: Coding Conventions 4.2 Factor Out Repeated Code ============================ @@ -369,7 +367,7 @@ view. Nevertheless there are some areas which are only lightly-tested: Please exercise caution when working in those areas.  -File: find-maint.info, Node: Debugging is For Users Too, Next: Factor Out Repeated Code, Prev: Don't Trust the File System Contents, Up: Coding Conventions +File: find-maint.info, Node: Debugging is For Users Too, Prev: Don't Trust the File System Contents, Up: Coding Conventions 4.3 Debugging is For Users Too ============================== @@ -411,7 +409,7 @@ and the `chdir' in which a malicious person could rename the directory and substitute a symbolic link to some other directory.  -File: find-maint.info, Node: The File System Is Being Modified, Next: Don't Trust the File System Contents, Prev: Make the Compiler Find the Bugs, Up: Coding Conventions +File: find-maint.info, Node: The File System Is Being Modified, Next: Don't Trust the File System Contents, Prev: Factor Out Repeated Code, Up: Coding Conventions 4.5 The File System Is Being Modified ===================================== @@ -460,7 +458,7 @@ Valgrind Valgrind is a tool which dynamically verifies the memory accesses a program makes to ensure that they are valid (for example, that the behaviour of the program does not in any way depend on the - contents of uninitialised memory). + contents of uninitialized memory). DejaGnu DejaGnu is the test framework used to run the findutils test suite @@ -859,7 +857,7 @@ available. Here is an example alert:- When locate reads filenames from a LOCATE02 database (the default format), the buffer into which data is read is automatically extended - to accomodate the length of the filenames. + to accommodate the length of the filenames. This automatic buffer extension does not happen for old-format databases. Instead a 1026-byte buffer is used. When a longer @@ -1660,25 +1658,25 @@ permit their use in free software.  Tag Table: -Node: Top988 -Node: Introduction2066 -Node: Maintaining GNU Programs2815 -Node: Design Issues3617 -Node: Coding Conventions7568 -Node: Make the Compiler Find the Bugs9535 -Node: Factor Out Repeated Code13092 -Node: Debugging is For Users Too15118 -Node: Don't Trust the File System Contents15849 -Node: The File System Is Being Modified17132 -Node: Tools18569 -Node: Using the GNU Portability Library19770 -Node: Documentation26951 -Node: Testing29669 -Node: Bugs30010 -Node: Distributions31754 -Node: Internationalisation32789 -Node: Security33258 -Node: Making Releases44621 -Node: GNU Free Documentation License46746 +Node: Top930 +Node: Introduction2014 +Node: Maintaining GNU Programs2763 +Node: Design Issues3565 +Node: Coding Conventions7516 +Node: Make the Compiler Find the Bugs9483 +Node: Factor Out Repeated Code13031 +Node: Debugging is For Users Too15104 +Node: Don't Trust the File System Contents15802 +Node: The File System Is Being Modified17085 +Node: Tools18515 +Node: Using the GNU Portability Library19716 +Node: Documentation26897 +Node: Testing29615 +Node: Bugs29956 +Node: Distributions31700 +Node: Internationalisation32735 +Node: Security33204 +Node: Making Releases44568 +Node: GNU Free Documentation License46693  End Tag Table diff --git a/doc/find-maint.texi b/doc/find-maint.texi index 59ab4a4..8b14fd4 100644 --- a/doc/find-maint.texi +++ b/doc/find-maint.texi @@ -23,7 +23,8 @@ be made and tested, and what resources exist to help developers. This is edition @value{EDITION}, for findutils version @value{VERSION}. -Copyright @copyright{} 2007, 2008, 2010 Free Software Foundation, Inc. +Copyright @copyright{} 2007, 2008, 2010, 2011 Free Software Foundation, +Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 @@ -42,7 +43,7 @@ Free Documentation License''. @page @vskip 0pt plus 1filll -@insertcopying{} +@insertcopying @end titlepage @contents @@ -233,10 +234,10 @@ circumstances. @menu * Make the Compiler Find the Bugs:: +* Factor Out Repeated Code:: * The File System Is Being Modified:: * Don't Trust the File System Contents:: * Debugging is For Users Too:: -* Factor Out Repeated Code:: @end menu @node Make the Compiler Find the Bugs @@ -470,7 +471,7 @@ information we can work to remove unnecessary file system operations. Valgrind is a tool which dynamically verifies the memory accesses a program makes to ensure that they are valid (for example, that the behaviour of the program does not in any way depend on the contents of -uninitialised memory). +uninitialized memory). @item DejaGnu DejaGnu is the test framework used to run the findutils test suite @@ -838,7 +839,7 @@ traditional ("old") format that locate uses on other Unix systems. When locate reads filenames from a LOCATE02 database (the default format), the buffer into which data is read is automatically extended -to accomodate the length of the filenames. +to accommodate the length of the filenames. This automatic buffer extension does not happen for old-format databases. Instead a 1026-byte buffer is used. When a longer @@ -1177,7 +1178,7 @@ Release} field of these bugs appropriately and make sure the @comment LocalWords: POSIXLY fls fprintf strftime locale's EDT GMT AP @comment LocalWords: EST diff perl backquotes sprintf Falstad Oct cron @comment LocalWords: eg vmunix mkdir afs allexec allwrite ARG bigram -@comment LocalWords: bigrams cd chmod comp crc CVS dbfile dum eof +@comment LocalWords: bigrams cd chmod comp crc CVS dbfile eof @comment LocalWords: fileserver filesystem fn frcode Ghazi Hnewc iXX @comment LocalWords: joeuser Kaveh localpaths localuser LOGNAME @comment LocalWords: Meyering mv netpaths netuser nonblank nonblanks diff --git a/doc/find.info b/doc/find.info index 555fb65..db64f5b 100644 --- a/doc/find.info +++ b/doc/find.info @@ -1,7 +1,5 @@ -This is -/home/james/source/GNU/findutils/git/gnu/findutils/doc/find.info, -produced by makeinfo version 4.13 from -/home/james/source/GNU/findutils/git/gnu/findutils/doc/find.texi. +This is ../../../findutils/doc/find.info, produced by makeinfo version +4.13 from ../../../findutils/doc/find.texi. INFO-DIR-SECTION Basics START-INFO-DIR-ENTRY @@ -20,166 +18,171 @@ END-INFO-DIR-ENTRY certain criteria and performing various operations on them. Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010 Free Software Foundation, Inc. +2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU -Free Documentation License." +Free Documentation License".  Indirect: -find.info-1: 1347 -find.info-2: 295249 +find.info-1: 1289 +find.info-2: 277206  Tag Table: (Indirect) -Node: Top1347 -Node: Introduction3185 -Node: Scope6113 -Node: Overview8059 -Node: find Expressions9930 -Node: Finding Files11762 -Node: Name12227 -Node: Base Name Patterns12855 -Ref: Base Name Patterns-Footnote-114183 -Node: Full Name Patterns14395 -Node: Fast Full Name Search18398 -Node: Shell Pattern Matching21445 -Node: Links23535 -Node: Symbolic Links23970 -Node: Hard Links28475 -Node: Time31029 -Node: Age Ranges32007 -Node: Comparing Timestamps33696 -Node: Size36561 -Node: Type38405 -Node: Owner40073 -Node: Mode Bits40898 -Node: Contents46358 -Node: Directories47529 -Node: Filesystems52807 -Node: Combining Primaries With Operators54158 -Node: Actions55776 -Node: Print File Name56338 -Node: Print File Information57355 -Node: Escapes60364 -Node: Format Directives61115 -Node: Name Directives62599 -Node: Ownership Directives63585 -Node: Size Directives64593 -Node: Location Directives65964 -Node: Time Directives67083 -Node: Other Directives67986 -Node: Time Formats68246 -Node: Time Components68682 -Node: Date Components69648 -Node: Combined Time Formats70471 -Node: Formatting Flags71356 -Node: Run Commands71969 -Node: Single File72327 -Node: Multiple Files74825 -Node: Unsafe File Name Handling79516 -Node: Safe File Name Handling81229 -Node: Unusual Characters in File Names82805 -Node: Limiting Command Size85970 -Node: Controlling Parallelism88406 -Node: Interspersing File Names93185 -Node: Querying95638 -Ref: Querying-Footnote-197878 -Node: Delete Files97934 -Node: Adding Tests98581 -Node: Databases101221 -Node: Database Locations101939 -Node: Database Formats103386 -Node: LOCATE02 Database Format104495 -Node: Sample LOCATE02 Database106186 -Node: slocate Database Format106870 -Node: Old Database Format107877 -Node: Newline Handling111063 -Node: File Permissions112509 -Node: Mode Structure113087 -Node: Symbolic Modes116228 -Node: Setting Permissions117325 -Node: Copying Permissions119873 -Node: Changing Special Permissions120687 -Node: Conditional Executability122231 -Node: Multiple Changes122763 -Node: Umask and Protection124420 -Node: Numeric Modes125518 -Node: Date input formats127210 -Node: General date syntax129543 -Node: Calendar date items132495 -Node: Time of day items134493 -Node: Time zone items136690 -Node: Day of week items137925 -Node: Relative items in date strings138915 -Node: Pure numbers in date strings141718 -Node: Seconds since the Epoch142700 -Node: Specifying time zone rules144322 -Node: Authors of parse_datetime146693 -Ref: Authors of get_date146873 -Node: Reference147836 -Node: Invoking find148186 -Node: Filesystem Traversal Options149668 -Node: Warning Messages150761 -Node: Optimisation Options152822 -Node: Debug Options154767 -Node: Find Expressions155821 -Node: Invoking locate156187 -Node: Invoking updatedb162486 -Node: Invoking xargs166726 -Node: xargs options167452 -Node: Invoking the shell from xargs171958 -Node: Regular Expressions175757 -Node: findutils-default regular expression syntax177236 -Node: awk regular expression syntax179741 -Node: egrep regular expression syntax181626 -Node: emacs regular expression syntax183837 -Node: gnu-awk regular expression syntax186365 -Node: grep regular expression syntax188705 -Node: posix-awk regular expression syntax191430 -Node: posix-basic regular expression syntax193701 -Node: posix-egrep regular expression syntax194002 -Node: posix-extended regular expression syntax196375 -Node: Environment Variables198850 -Node: Common Tasks201922 -Node: Viewing And Editing202347 -Node: Archiving204064 -Node: Cleaning Up205696 -Node: Strange File Names208585 -Node: Fixing Permissions210235 -Node: Classifying Files210799 -Node: Worked Examples211517 -Node: Deleting Files212220 -Node: Copying A Subset of Files225232 -Node: Updating A Timestamp File227247 -Node: Finding the Shallowest Instance233211 -Node: Security Considerations235145 -Node: Levels of Risk236713 -Ref: Levels of Risk-Footnote-1239513 -Node: Security Considerations for find239692 -Ref: Security Considerations for find-Footnote-1242016 -Node: Problems with -exec and filenames242089 -Node: Changing the Current Working Directory243718 -Node: O_NOFOLLOW245489 -Ref: O_NOFOLLOW-Footnote-1247133 -Node: Systems without O_NOFOLLOW247235 -Ref: Systems without O_NOFOLLOW-Footnote-1249380 -Node: Race Conditions with -exec249442 -Node: Race Conditions with -print and -print0252355 -Node: Security Considerations for xargs253276 -Node: Security Considerations for locate255780 -Node: Security Summary258162 -Node: Further Reading on Security258957 -Node: Error Messages260141 -Node: Error Messages From find261170 -Node: Error Messages From xargs266295 -Node: Error Messages From locate268440 -Node: Error Messages From updatedb269672 -Node: GNU Free Documentation License270075 -Node: Primary Index295249 +Node: Top1289 +Node: Introduction3205 +Node: Scope6133 +Node: Overview8079 +Node: find Expressions9950 +Node: Finding Files11782 +Node: Name12247 +Node: Base Name Patterns12875 +Ref: Base Name Patterns-Footnote-114203 +Node: Full Name Patterns14415 +Node: Fast Full Name Search18418 +Node: Shell Pattern Matching21467 +Node: Links23557 +Node: Symbolic Links23992 +Node: Hard Links28496 +Node: Time31050 +Node: Age Ranges32028 +Node: Comparing Timestamps33717 +Node: Size36582 +Node: Type38428 +Node: Owner40096 +Node: Mode Bits40921 +Node: Contents46269 +Node: Directories47440 +Node: Filesystems52718 +Node: Combining Primaries With Operators54069 +Node: Actions55687 +Node: Print File Name56249 +Node: Print File Information57266 +Node: Escapes61217 +Node: Format Directives61968 +Node: Name Directives63213 +Node: Ownership Directives64199 +Node: Size Directives65207 +Node: Location Directives66578 +Node: Time Directives67697 +Node: Other Directives68600 +Node: Reserved and Unknown Directives68875 +Node: Time Formats69742 +Node: Time Components70203 +Node: Date Components71169 +Node: Combined Time Formats71992 +Node: Formatting Flags72877 +Node: Run Commands73487 +Node: Single File73845 +Node: Multiple Files76517 +Node: Unsafe File Name Handling81270 +Node: Safe File Name Handling82983 +Node: Unusual Characters in File Names84559 +Node: Limiting Command Size87724 +Node: Controlling Parallelism90160 +Node: Interspersing File Names95615 +Node: Querying98070 +Node: Delete Files100334 +Node: Adding Tests100981 +Node: Databases103621 +Node: Database Locations104339 +Node: Database Formats105786 +Node: LOCATE02 Database Format106895 +Node: Sample LOCATE02 Database108587 +Node: slocate Database Format109271 +Node: Old Database Format110279 +Node: Newline Handling113465 +Node: File Permissions114911 +Node: Mode Structure115489 +Node: Symbolic Modes118630 +Node: Setting Permissions119727 +Node: Copying Permissions122275 +Node: Changing Special Permissions123089 +Node: Conditional Executability124633 +Node: Multiple Changes125165 +Node: Umask and Protection126822 +Node: Numeric Modes127920 +Node: Date input formats129612 +Node: General date syntax132025 +Node: Calendar date items135009 +Node: Time of day items137007 +Node: Time zone items139204 +Node: Combined date and time of day items140457 +Node: Day of week items141310 +Node: Relative items in date strings142320 +Node: Pure numbers in date strings145123 +Node: Seconds since the Epoch146105 +Node: Specifying time zone rules147727 +Node: Authors of parse_datetime150100 +Ref: Authors of get_date150280 +Node: Configuration151243 +Node: Leaf Optimisation152025 +Node: d_type Optimisation153137 +Node: fts153439 +Node: Reference154042 +Node: Invoking find154387 +Node: Filesystem Traversal Options155869 +Node: Warning Messages156962 +Node: Optimisation Options159025 +Node: Debug Options160970 +Node: Find Expressions162024 +Node: Invoking locate162390 +Node: Invoking updatedb168689 +Node: Invoking xargs172351 +Node: xargs options173077 +Node: Invoking the shell from xargs178227 +Node: Regular Expressions182028 +Node: findutils-default regular expression syntax183507 +Node: awk regular expression syntax186012 +Node: egrep regular expression syntax187883 +Node: emacs regular expression syntax190094 +Node: gnu-awk regular expression syntax192622 +Node: grep regular expression syntax195089 +Node: posix-awk regular expression syntax197814 +Node: posix-basic regular expression syntax200116 +Node: posix-egrep regular expression syntax200417 +Node: posix-extended regular expression syntax202790 +Node: Environment Variables205265 +Node: Common Tasks208233 +Node: Viewing And Editing208658 +Node: Archiving210377 +Node: Cleaning Up212010 +Node: Strange File Names214899 +Node: Fixing Permissions216549 +Node: Classifying Files217113 +Node: Worked Examples217831 +Node: Deleting Files218536 +Node: Copying A Subset of Files231581 +Node: Updating A Timestamp File233598 +Node: Finding the Shallowest Instance239586 +Node: Security Considerations241522 +Node: Levels of Risk243090 +Ref: Levels of Risk-Footnote-1245889 +Node: Security Considerations for find246068 +Ref: Security Considerations for find-Footnote-1248392 +Node: Problems with -exec and filenames248465 +Node: Changing the Current Working Directory250098 +Node: O_NOFOLLOW251869 +Ref: O_NOFOLLOW-Footnote-1253923 +Node: Systems without O_NOFOLLOW254025 +Ref: Systems without O_NOFOLLOW-Footnote-1256178 +Node: Race Conditions with -exec256240 +Node: Race Conditions with -print and -print0259157 +Node: Security Considerations for xargs260086 +Node: Security Considerations for locate262590 +Node: Security Summary264972 +Node: Further Reading on Security265767 +Node: Error Messages266951 +Node: Error Messages From find267980 +Node: Error Messages From xargs273103 +Node: Error Messages From locate275567 +Node: Error Messages From updatedb276799 +Node: GNU Free Documentation License277206 +Node: Primary Index302380  End Tag Table diff --git a/doc/find.info-1 b/doc/find.info-1 index e24eea5..a895723 100644 --- a/doc/find.info-1 +++ b/doc/find.info-1 @@ -1,7 +1,5 @@ -This is -/home/james/source/GNU/findutils/git/gnu/findutils/doc/find.info, -produced by makeinfo version 4.13 from -/home/james/source/GNU/findutils/git/gnu/findutils/doc/find.texi. +This is ../../../findutils/doc/find.info, produced by makeinfo version +4.13 from ../../../findutils/doc/find.texi. INFO-DIR-SECTION Basics START-INFO-DIR-ENTRY @@ -20,14 +18,14 @@ END-INFO-DIR-ENTRY certain criteria and performing various operations on them. Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010 Free Software Foundation, Inc. +2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU -Free Documentation License." +Free Documentation License".  File: find.info, Node: Top, Next: Introduction, Up: (dir) @@ -39,19 +37,19 @@ This file documents the GNU utilities for finding files that match certain criteria and performing various operations on them. Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010 Free Software Foundation, Inc. +2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU -Free Documentation License." +Free Documentation License". This file documents the GNU utilities for finding files that match certain criteria and performing various actions on them. - This is edition 4.5.10, for `find' version 4.5.10. + This is edition 4.5.14, for `find' version 4.5.14. * Menu: @@ -61,6 +59,7 @@ certain criteria and performing various actions on them. * Databases:: Maintaining file name databases. * File Permissions:: How to control access to files. * Date input formats:: Specifying literal times. +* Configuration:: Options you can select at compile time. * Reference:: Summary of how to invoke the programs. * Common Tasks:: Solutions to common real-world problems. * Worked Examples:: Examples demonstrating more complex points. @@ -503,14 +502,13 @@ more databases of file names and displays the file names that contain the pattern. *Note Shell Pattern Matching::, for details about shell patterns. - If a pattern is a plain string--it contains no -metacharacters--`locate' displays all file names in the database that -contain that string. If a pattern contains metacharacters, `locate' -only displays file names that match the pattern exactly. As a result, -patterns that contain metacharacters should usually begin with a `*', -and will most often end with one as well. The exceptions are patterns -that are intended to explicitly match the beginning or end of a file -name. + If a pattern is a plain string - it contains no metacharacters - +`locate' displays all file names in the database that contain that +string. If a pattern contains metacharacters, `locate' only displays +file names that match the pattern exactly. As a result, patterns that +contain metacharacters should usually begin with a `*', and will most +often end with one as well. The exceptions are patterns that are +intended to explicitly match the beginning or end of a file name. If you only want `locate' to match against the last component of the file names (the "base name" of the files) you can use the `--basename' @@ -662,7 +660,7 @@ also occurs if a symbolic link exists but points to a file that is missing. The options controlling the behaviour of `find' with respect to -links are as follows :- +links are as follows: `-P' `find' does not dereference symbolic links at all. This is the @@ -691,7 +689,7 @@ links are as follows :- the command line. This option is deprecated. Where possible, you should use `-L' instead. - The following differences in behavior occur when the `-L' option is + The following differences in behaviour occur when the `-L' option is used: * `find' follows symbolic links to directories when searching @@ -967,10 +965,10 @@ File: find.info, Node: Size, Next: Type, Prev: Time, Up: Finding Files Gigabytes (units of 1073741824 bytes) The `b' suffix always considers blocks to be 512 bytes. This is - not affected by the setting (or non-setting) of the POSIXLY_CORRECT - environment variable. This behaviour is different from the - behaviour of the `-ls' action). If you want to use 1024-byte - units, use the `k' suffix instead. + not affected by the setting (or non-setting) of the + `POSIXLY_CORRECT' environment variable. This behaviour is + different from the behaviour of the `-ls' action). If you want to + use 1024-byte units, use the `k' suffix instead. The number can be prefixed with a `+' or a `-'. A plus sign indicates that the test should succeed if the file uses at least N @@ -1131,12 +1129,9 @@ on the basis of the result of that test. prefixed by `-' or `/'. A PMODE that starts with neither `-' nor `/' matches if MODE - exactly matches the file mode bits. - - A PMODE that starts with `+' but which is not valid (for example - `+a+x') is an error if the POSIXLY_CORRECT environment variable it - set. Otherwise this is treated as if the initial `+' were a `/', - for backward compatibility. + exactly matches the file mode bits. (To avoid confusion with an + obsolete GNU extension, MODE must not start with a `+' immediately + followed by an octal digit.) A PMODE that starts with `-' matches if _all_ the file mode bits set in MODE are set for the file; bits not set in MODE are ignored. @@ -1535,15 +1530,36 @@ File: find.info, Node: Print File Information, Next: Run Commands, Prev: Prin -- Action: -printf format True; print FORMAT on the standard output, interpreting `\' - escapes and `%' directives. Field widths and precisions can be - specified as with the `printf' C function. Format flags (like `#' - for example) may not work as you expect because many of the - fields, even numeric ones, are printed with %s. Numeric flags - which are affected in this way include G, U, b, D, k and n. This - difference in behaviour means though that the format flag `-' will - work; it forces left-alignment of the field. Unlike `-print', - `-printf' does not add a newline at the end of the string. If you - want a newline at the end of the string, add a `\n'. + escapes and `%' directives (more details in the following + sections). + + Field widths and precisions can be specified as with the `printf' C + function. Format flags (like `#' for example) may not work as you + expect because many of the fields, even numeric ones, are printed + with %s. Numeric flags which are affected in this way include `G', + `U', `b', `D', `k' and `n'. This difference in behaviour means + though that the format flag `-' will work; it forces + left-alignment of the field. Unlike `-print', `-printf' does not + add a newline at the end of the string. If you want a newline at + the end of the string, add a `\n'. + + As an example, an approximate equivalent of `-ls' with + null-terminated filenames can be achieved with this `-printf' + format: + + find -printf "%i %4k %M %3n %-8u %-8g %8s %T+ %p\n->%l\0" | cat + + A practical reason for doing this would be to get literal + filenames in the output, instead of `-ls''s backslash-escaped + names. (Using `cat' here prevents this happening for the `%p' + format specifier; *note Unusual Characters in File Names::). This + format also outputs a uniform timestamp format. + + As for symlinks, the format above outputs the symlink target on a + second line, following `\n->'. There is nothing following the + arrow for non-symlinks. Another approach, for complete + consistency, would be to `-fprintf' the symlinks into a separate + file, so they too can be null-terminated. -- Action: -fprintf file format True; like `-printf' but write to FILE like `-fprint' (*note Print @@ -1555,6 +1571,7 @@ File: find.info, Node: Print File Information, Next: Run Commands, Prev: Prin * Escapes:: * Format Directives:: * Time Formats:: +* Formatting Flags::  File: find.info, Node: Escapes, Next: Format Directives, Up: Print File Information @@ -1616,12 +1633,9 @@ width"."maximum field width" for each directive. Format flags (like even numeric ones, are printed with %s. The format flag `-' does work; it forces left-alignment of the field. - `%%' is a literal percent sign. A `%' character followed by an -unrecognised character (i.e., not a known directive or `printf' field -width and precision specifier), is discarded (but the unrecognised -character is printed), and a warning message is printed to the standard -error output (because it was probably a typo). Don't rely on this -behaviour, because other directives may be added in the future. + `%%' is a literal percent sign. *Note Reserved and Unknown +Directives::, for a description of how format directives not mentioned +below are handled. A `%' at the end of the format argument causes undefined behaviour since there is no following character. In some locales, it may hide @@ -1636,7 +1650,7 @@ novel you are reading. * Location Directives:: * Time Directives:: * Other Directives:: -* Formatting Flags:: +* Reserved and Unknown Directives::  File: find.info, Node: Name Directives, Next: Ownership Directives, Up: Format Directives @@ -1808,7 +1822,7 @@ depends on the current locale, but it typically looks like Time Formats::).  -File: find.info, Node: Other Directives, Next: Formatting Flags, Prev: Time Directives, Up: Format Directives +File: find.info, Node: Other Directives, Next: Reserved and Unknown Directives, Prev: Time Directives, Up: Format Directives 3.2.2.6 Other Directives ........................ @@ -1818,7 +1832,26 @@ File: find.info, Node: Other Directives, Next: Formatting Flags, Prev: Time D context.  -File: find.info, Node: Time Formats, Prev: Format Directives, Up: Print File Information +File: find.info, Node: Reserved and Unknown Directives, Prev: Other Directives, Up: Format Directives + +3.2.2.7 Reserved and Unknown Directives +....................................... + +The `%(', `%{' and `%[' format directives, with or without field with +and precision specifications, are reserved for future use. Don't use +them and don't rely on current experiment to predict future behaviour. +To print `(', simply use `(' rather than `%('. Likewise for `{' and +`['. + + Similarly, a `%' character followed by any other unrecognised +character (i.e., not a known directive or `printf' field width and +precision specifier), is discarded (but the unrecognised character is +printed), and a warning message is printed to the standard error output +(because it was probably a typo). Don't rely on this behaviour, +because other directives may be added in the future. + + +File: find.info, Node: Time Formats, Next: Formatting Flags, Prev: Format Directives, Up: Print File Information 3.2.3 Time Formats ------------------ @@ -1958,10 +1991,10 @@ components. field includes a fractional part.  -File: find.info, Node: Formatting Flags, Prev: Other Directives, Up: Format Directives +File: find.info, Node: Formatting Flags, Prev: Time Formats, Up: Print File Information -3.2.3.4 Formatting Flags -........................ +3.2.4 Formatting Flags +---------------------- The `%m' and `%d' directives support the `#', `0' and `+' flags, but the other directives do not, even if they print numbers. Numeric @@ -1999,14 +2032,15 @@ File: find.info, Node: Single File, Next: Multiple Files, Up: Run Commands Here is how to run a command on one file at a time. -- Action: -execdir command ; - Execute COMMAND; true if zero status is returned. `find' takes - all arguments after `-execdir' to be part of the command until an + Execute COMMAND; true if COMMAND returns zero. `find' takes all + arguments after `-execdir' to be part of the command until an argument consisting of `;' is reached. It replaces the string `{}' by the current file name being processed everywhere it occurs in the command. Both of these constructions need to be escaped (with a `\') or quoted to protect them from expansion by the - shell. The command is executed in the directory in which `find' - was run. + shell. The command is executed in the directory which `find' was + searching at the time the action was executed (that is, {} will + expand to a file in the local directory). For example, to compare each C header file in or below the current directory with the file `/tmp/master': @@ -2044,8 +2078,9 @@ problems surrounding `-exec'. -- Action: -exec command ; This insecure variant of the `-execdir' action is specified by - POSIX. The main difference is that the command is executed in the - directory from which `find' was invoked, meaning that `{}' is + POSIX. Like `-execdir command ;' it is true if zero is returned + by COMMAND. The main difference is that the command is executed in + the directory from which `find' was invoked, meaning that `{}' is expanded to a relative path starting with the name of one of the starting directories, rather than just the basename of the matched file. @@ -2069,14 +2104,15 @@ time it takes to start up the command each time. lines containing as many matched files as possible. -- Action: -execdir command {} + - This works as for `-execdir command ;', except that the `{}' at - the end of the command is expanded to a list of names of matching - files. This expansion is done in such a way as to avoid exceeding - the maximum command line length available on the system. Only one - `{}' is allowed within the command, and it must appear at the end, - immediately before the `+'. A `+' appearing in any position other - than immediately after `{}' is not considered to be special (that - is, it does not terminate the command). + This works as for `-execdir command ;', except that the result is + always true, and the `{}' at the end of the command is expanded to + a list of names of matching files. This expansion is done in such + a way as to avoid exceeding the maximum command line length + available on the system. Only one `{}' is allowed within the + command, and it must appear at the end, immediately before the + `+'. A `+' appearing in any position other than immediately after + `{}' is not considered to be special (that is, it does not + terminate the command). -- Action: -exec command {} + This insecure variant of the `-execdir' action is specified by @@ -2084,7 +2120,7 @@ lines containing as many matched files as possible. directory from which `find' was invoked, meaning that `{}' is expanded to a relative path starting with the name of one of the starting directories, rather than just the basename of the matched - file. + file. The result is always true. Before `find' exits, any partially-built command lines are executed. This happens even if the exit was caused by the `-quit' action. @@ -2098,7 +2134,7 @@ can only be at the end of the command line, and that this might be a problem for some commands (`cp' and `rsync' for example). However, there is a slightly obscure but powerful workaround for this -problem which takes advantage of the behaviour of `sh -c':- +problem which takes advantage of the behaviour of `sh -c': find startpoint -tests ... -exec sh -c 'scp "$@" remote:/dest' sh {} + @@ -2115,7 +2151,7 @@ at once, is to use the `xargs' command, which is invoked like this: `xargs' normally reads arguments from the standard input. These arguments are delimited by blanks (which can be protected with double or single quotes or a backslash) or newlines. It executes the COMMAND -(default is `/bin/echo') one or more times with any INITIAL-ARGUMENTS +(the default is `echo') one or more times with any INITIAL-ARGUMENTS followed by arguments read from standard input. Blank lines on the standard input are ignored. If the `-L' option is in use, trailing blanks indicate that `xargs' should consider the following line to be @@ -2420,10 +2456,21 @@ entire job is done. The same idea can be generalized to as many processors as you have handy. It also generalizes to other resources besides processors. For -example, if xargs is running commands that are waiting for a response +example, if `xargs' is running commands that are waiting for a response from a distant network connection, running a few in parallel may reduce the overall latency by overlapping their waiting time. + If you are running commands in parallel, you need to think about how +they should arbitrate access to any resources that they share. For +example, if more than one of them tries to print to stdout, the ouptut +will be produced in an indeterminate order (and very likely mixed up) +unless the processes collaborate in some way to prevent this. Using +some kind of locking scheme is one way to prevent such problems. In +general, using a locking scheme will help ensure correct output but +reduce performance. If you don't want to tolerate the performance +difference, simply arrange for each process to produce a separate output +file (or otherwise use separate resources). + `xargs' also allows you to "turn up" or "turn down" its parallelism in the middle of a run. Suppose you are keeping your four-processor system busy for hours, processing thousands of images using `-P 4'. @@ -2452,7 +2499,7 @@ from 4 to 3). The second `kill' will reduce it from 3 to 2. (`%4' works in some shells as a shorthand for the process ID of the background job labeled `[4]'.) - Similarly, if you started a long xargs job without parallelism, you + Similarly, if you started a long `xargs' job without parallelism, you can easily switch it to start running two commands in parallel by sending it a `SIGUSR1'. @@ -2505,7 +2552,7 @@ operation is equivalent to `find -exec' (*note Single File::). When you use the `-I' option, each line read from the input is buffered internally. This means that there is an upper limit on the -length of input line that xargs will accept when used with the `-I' +length of input line that `xargs' will accept when used with the `-I' option. To work around this limitation, you can use the `-s' option to increase the amount of buffer space that xargs uses, and you can also use an extra invocation of xargs to ensure that very long lines do not @@ -2545,15 +2592,16 @@ primary `-ok' instead of `-exec': The response to the prompt is matched against a pair of regular expressions to determine if it is a yes or no response. These - regular expressions are obtained from the system(1) if the - POSIXLY_CORRECT environment variable is set and the system has - such patterns available. Otherwise, `find''s message translations - are used. In either case, the LC_MESSAGES environment variable - will determine the regular expressions used to determine if the - answer is affirmative or negative. The interpretation of the - regular expressions themselves will be affected by the environment - variables LC_CTYPE (character classes) and LC_COLLATE (character - ranges and equivalence classes). + regular expressions are obtained from the system (`nl_langinfo' + items YESEXPR and NOEXPR are used) if the `POSIXLY_CORRECT' + environment variable is set and the system has such patterns + available. Otherwise, `find''s message translations are used. In + either case, the `LC_MESSAGES' environment variable will determine + the regular expressions used to determine if the answer is + affirmative or negative. The interpretation of the regular + expressions themselves will be affected by the environment + variables `LC_CTYPE' (character classes) and `LC_COLLATE' + (character ranges and equivalence classes). -- Action: -ok command ; This insecure variant of the `-okdir' action is specified by @@ -2575,10 +2623,6 @@ invocation of the command (*note Limiting Command Size::). line from the terminal. Only run the command line if the response starts with `y' or `Y'. Implies `-t'. - ---------- Footnotes ---------- - - (1) `nl_langinfo' items YESEXPR and NOEXPR are used -  File: find.info, Node: Delete Files, Next: Adding Tests, Prev: Run Commands, Up: Actions @@ -2760,7 +2804,7 @@ entry begins with an offset-differential count byte, which is the additional number of characters of prefix of the preceding entry to use beyond the number that the preceding entry is using of its predecessor. (The counts can be negative.) Following the count is a null-terminated -ASCII remainder--the part of the name that follows the shared prefix. +ASCII remainder - the part of the name that follows the shared prefix. If the offset-differential count is larger than can be stored in a byte (+/-127), the byte has the value 0x80 and the count follows in a @@ -2825,7 +2869,8 @@ them. The second byte of the database is zero. The second byte is immediately followed by the first database entry. The first entry in the database is not preceded by any differential count or dummy entry. Instead the differential count for the first item is assumed to be zero. -.P Starting with the second entry (if any) in the database, data is + + Starting with the second entry (if any) in the database, data is interpreted as for the GNU LOCATE02 format.  @@ -3356,7 +3401,7 @@ starting with the lowest valued bit: `ug=rw,o=r'. Numeric mode 0 corresponds to symbolic mode `a='.  -File: find.info, Node: Date input formats, Next: Reference, Prev: File Permissions, Up: Top +File: find.info, Node: Date input formats, Next: Configuration, Prev: File Permissions, Up: Top 6 Date input formats ******************** @@ -3385,7 +3430,7 @@ First, a quote: future, last Tuesday or a week from Sunday, with feelings of helpless confusion. ... - -- Robert Grudin, `Time and the Art of Living'. + --Robert Grudin, `Time and the Art of Living'. This section describes the textual date representations that GNU programs accept. These are the strings you, as a user, can supply as @@ -3397,7 +3442,8 @@ arguments to the various programs. The C interface (via the * General date syntax:: Common rules. * Calendar date items:: 19 Dec 1994. * Time of day items:: 9:20pm. -* Time zone items:: EST, PDT, GMT. +* Time zone items:: EST, PDT, UTC, ... +* Combined date and time of day items:: 1972-09-24T20:02:00,000000-0500. * Day of week items:: Monday and others. * Relative items in date strings:: next tuesday, 2 years ago. * Pure numbers in date strings:: 19931219, 1440. @@ -3423,6 +3469,8 @@ items: * time zone items + * combined date and time of day items + * day of the week items * relative items @@ -3460,8 +3508,8 @@ zone items other than `UTC' and `Z'. Here are some ways to do this: Mon Mar 1 00:21:42 UTC 2004 $ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ' 2004-03-01 00:21:42Z - $ date --iso-8601=ns | tr T ' ' # --iso-8601 is a GNU extension. - 2004-02-29 16:21:42,692722128-0800 + $ date --rfc-3339=ns # --rfc-3339 is a GNU extension. + 2004-02-29 16:21:42.692722128-08:00 $ date --rfc-2822 # a GNU extension Sun, 29 Feb 2004 16:21:42 -0800 $ date +'%Y-%m-%d %H:%M:%S %z' # %z is a GNU extension. @@ -3582,7 +3630,7 @@ maximum zone correction is 24 hours. both.  -File: find.info, Node: Time zone items, Next: Day of week items, Prev: Time of day items, Up: Date input formats +File: find.info, Node: Time zone items, Next: Combined date and time of day items, Prev: Time of day items, Up: Date input formats 6.4 Time zone items =================== @@ -3608,9 +3656,31 @@ time stamps are interpreted using the rules of the default time zone (*note Specifying time zone rules::).  -File: find.info, Node: Day of week items, Next: Relative items in date strings, Prev: Time zone items, Up: Date input formats +File: find.info, Node: Combined date and time of day items, Next: Day of week items, Prev: Time zone items, Up: Date input formats + +6.5 Combined date and time of day items +======================================= + +The ISO 8601 date and time of day extended format consists of an ISO +8601 date, a `T' character separator, and an ISO 8601 time of day. +This format is also recognized if the `T' is replaced by a space. + + In this format, the time of day should use 24-hour notation. +Fractional seconds are allowed, with either comma or period preceding +the fraction. ISO 8601 fractional minutes and hours are not supported. +Typically, hosts support nanosecond timestamp resolution; excess +precision is silently discarded. + + Here are some examples: -6.5 Day of week items + 2012-09-24T20:02:00.052-0500 + 2012-12-31T23:59:59,999999999+1100 + 1970-01-01 00:00Z + + +File: find.info, Node: Day of week items, Next: Relative items in date strings, Prev: Combined date and time of day items, Up: Date input formats + +6.6 Day of week items ===================== The explicit mention of a day of the week will forward the date (only @@ -3633,7 +3703,7 @@ represent.  File: find.info, Node: Relative items in date strings, Next: Pure numbers in date strings, Prev: Day of week items, Up: Date input formats -6.6 Relative items in date strings +6.7 Relative items in date strings ================================== "Relative items" adjust a date (or the current date if none) forward or @@ -3697,7 +3767,7 @@ before embarking on calendrical calculations.  File: find.info, Node: Pure numbers in date strings, Next: Seconds since the Epoch, Prev: Relative items in date strings, Up: Date input formats -6.7 Pure numbers in date strings +6.8 Pure numbers in date strings ================================ The precise interpretation of a pure decimal number depends on the @@ -3720,7 +3790,7 @@ overrides the year.  File: find.info, Node: Seconds since the Epoch, Next: Specifying time zone rules, Prev: Pure numbers in date strings, Up: Date input formats -6.8 Seconds since the Epoch +6.9 Seconds since the Epoch =========================== If you precede a number with `@', it represents an internal time stamp @@ -3752,8 +3822,8 @@ way to represent the intervening leap second 1998-12-31 23:59:60 UTC.  File: find.info, Node: Specifying time zone rules, Next: Authors of parse_datetime, Prev: Seconds since the Epoch, Up: Date input formats -6.9 Specifying time zone rules -============================== +6.10 Specifying time zone rules +=============================== Normally, dates are interpreted using the rules of the current time zone, which in turn are specified by the `TZ' environment variable, or @@ -3800,7 +3870,7 @@ Variable.  File: find.info, Node: Authors of parse_datetime, Prev: Specifying time zone rules, Up: Date input formats -6.10 Authors of `parse_datetime' +6.11 Authors of `parse_datetime' ================================ `parse_datetime' started life as `getdate', as originally implemented @@ -3821,9 +3891,82 @@ environment variable and external file, and lacks the thread-safety of and then edited by K. Berry ().  -File: find.info, Node: Reference, Next: Common Tasks, Prev: Date input formats, Up: Top +File: find.info, Node: Configuration, Next: Reference, Prev: Date input formats, Up: Top + +7 Configuration +*************** + +The findutils source distribution includes a `configure' script which +examines the system and generates files required to build findutils. +See the files `README' and `INSTALL'. + + A number of options can be specified on the `configure' command +line, and many of these are straightforward, adequately documented in +the `--help' output, or not normally useful. Options which are useful +or which are not obvious are explained here. + +* Menu: + +* Leaf Optimisation:: Take advantage of Unix file system semantics. +* d_type Optimisation:: Take advantage of file type information. +* fts:: A non-recursive file system search. + + +File: find.info, Node: Leaf Optimisation, Next: d_type Optimisation, Up: Configuration + +7.1 Leaf Optimisation +===================== + +Files in Unix file systems have a link count which indicates how many +names point to the same inode. Directories in Unix filssytems have a +`..' entry which functions as a hard link to the parent directory and a +`.' entry which functions as a link to the directory itself. The `..' +entry of the root directory also points to the root. This means that +`find' can deduce the number of subdirectories a directory has, simply +by subtracting 2 from the directory's link count. This allows `find' +the calls to `stat' which would otherwise be needed to discover which +directory entries are subdirectories. + + File systems which don't have these semantics should simply return a +value less than 2 in the `st_nlinks' member of `struct stat' in +response to a successful call to `stat'. + + If you are building `find' for a system on which the value of +`st_nlinks' is unreliable, you can specify +`--disable-leaf-optimisation' to `configure' to prevent this assumption +being made. + + +File: find.info, Node: d_type Optimisation, Next: fts, Prev: Leaf Optimisation, Up: Configuration + +7.2 d_type Optimisation +======================= -7 Reference +When this feature is enabled, `find' takes advantage of the fact that +on some systems `readdir' will return the type of a file in `struct +dirent'. + + +File: find.info, Node: fts, Prev: d_type Optimisation, Up: Configuration + +7.3 fts +======= + +The findutils source distribution contains two different +implementations of `find'. The older implementation descends the file +system recursively, while the newer one uses `fts'. Both are normally +installed. + + If the option `--without-fts' was passed to `configure', the +recursive implementation is installed as `find' and the fts-based +implementation is installed as `ftsfind'. Otherwise, the fts-based +implementation is installed as `find' and the recursive implementation +is installed as `oldfind'. + + +File: find.info, Node: Reference, Next: Common Tasks, Prev: Configuration, Up: Top + +8 Reference *********** Below are summaries of the command line syntax for the programs @@ -3841,7 +3984,7 @@ discussed in this manual.  File: find.info, Node: Invoking find, Next: Invoking locate, Up: Reference -7.1 Invoking `find' +8.1 Invoking `find' =================== find [-H] [-L] [-P] [-D DEBUGOPTIONS] [-OLEVEL] [FILE...] [EXPRESSION] @@ -3887,7 +4030,7 @@ use:  File: find.info, Node: Filesystem Traversal Options, Next: Warning Messages, Up: Invoking find -7.1.1 Filesystem Traversal Options +8.1.1 Filesystem Traversal Options ---------------------------------- The options `-H', `-L' or `-P' may be specified at the start of the @@ -3916,7 +4059,7 @@ symbolic links are handled.  File: find.info, Node: Warning Messages, Next: Optimisation Options, Prev: Filesystem Traversal Options, Up: Invoking find -7.1.2 Warning Messages +8.1.2 Warning Messages ---------------------- If there is an error on the `find' command line, an error message is @@ -3926,8 +4069,9 @@ but which `find' should still accept. Under these circumstances, By default, warnings are enabled only if `find' is being run interactively (specifically, if the standard input is a terminal) and -the POSIXLY_CORRECT environment variable is not set. Warning messages -can be controlled explicitly by the use of options on the command line: +the `POSIXLY_CORRECT' environment variable is not set. Warning +messages can be controlled explicitly by the use of options on the +command line: `-warn' Issue warning messages where appropriate. @@ -3968,7 +4112,7 @@ problems, and consequently cannot be turned off:  File: find.info, Node: Optimisation Options, Next: Debug Options, Prev: Warning Messages, Up: Invoking find -7.1.3 Optimisation Options +8.1.3 Optimisation Options -------------------------- The `-OLEVEL' option sets `find''s optimisation level to LEVEL. The @@ -4013,7 +4157,7 @@ optimisations performed at each optimisation level are as follows.  File: find.info, Node: Debug Options, Next: Find Expressions, Prev: Optimisation Options, Up: Invoking find -7.1.4 Debug Options +8.1.4 Debug Options ------------------- The `-D' option makes `find' produce diagnostic output. Much of the @@ -4045,7 +4189,7 @@ help'. Valid debug options include:  File: find.info, Node: Find Expressions, Prev: Debug Options, Up: Invoking find -7.1.5 Find Expressions +8.1.5 Find Expressions ---------------------- The final part of the `find' command line is a list of expressions. @@ -4056,7 +4200,7 @@ options that the expression can contain. If the expression is missing,  File: find.info, Node: Invoking locate, Next: Invoking updatedb, Prev: Invoking find, Up: Reference -7.2 Invoking `locate' +8.2 Invoking `locate' ===================== locate [OPTION...] PATTERN... @@ -4217,7 +4361,7 @@ databases returning each match of PATTERN.  File: find.info, Node: Invoking updatedb, Next: Invoking xargs, Prev: Invoking locate, Up: Reference -7.3 Invoking `updatedb' +8.3 Invoking `updatedb' ======================= updatedb [OPTION...] @@ -4232,16 +4376,6 @@ variable definitions and uses another shell script that "sources" the configuration file into the environment and then executes `updatedb' in the environment. - `updatedb' creates and updates the database of file names used by -`locate'. `updatedb' generates a list of files similar to the output -of `find' and then uses utilities for optimizing the database for -performance. `updatedb' is often run periodically as a `cron' job and -configured with environment variables or command options. Typically, -operating systems have a shell script that "exports" configurations for -variable definitions and uses another shell script that "sources" the -configuration file into the environment and then executes `updatedb' in -the environment. - `--findoptions='OPTION...'' Global options to pass on to `find'. The environment variable `FINDOPTIONS' also sets this value. Default is none. @@ -4312,7 +4446,7 @@ the environment.  File: find.info, Node: Invoking xargs, Next: Regular Expressions, Prev: Invoking updatedb, Up: Reference -7.4 Invoking `xargs' +8.4 Invoking `xargs' ==================== xargs [OPTION...] [COMMAND [INITIAL-ARGUMENTS]] @@ -4351,7 +4485,7 @@ program died due to a fatal signal.  File: find.info, Node: xargs options, Next: Invoking the shell from xargs, Up: Invoking xargs -7.4.1 xargs options +8.4.1 xargs options ------------------- `--arg-file=INPUTFILE' @@ -4373,8 +4507,8 @@ File: find.info, Node: xargs options, Next: Invoking the shell from xargs, Up Input file names are terminated by the specified character DELIM instead of by whitespace, and any quotes and backslash characters are not considered special (every character is taken literally). - Disables the end of file string, which is treated like any other - argument. + Disables the logical end of file marker string, which is treated + like any other argument. The specified delimiter may be a single character, a C-style character escape such as `\n', or an octal or hexadecimal escape @@ -4384,15 +4518,21 @@ File: find.info, Node: xargs options, Next: Invoking the shell from xargs, Up `-E EOF-STR' `--eof[=EOF-STR]' `-e[EOF-STR]' - Set the end of file string to EOF-STR. If the end of file string - occurs as a line of input, the rest of the input is ignored. If - EOF-STR is omitted (`-e') or blank (either `-e' or `-E'), there is - no end of file string. The `-e' form of this option is deprecated - in favour of the POSIX-compliant `-E' option, which you should use - instead. As of GNU xargs version 4.2.9, the default behaviour of - xargs is not to have a logical end-of-file marker. The POSIX + Set the logical end of file marker string to EOF-STR. If the + logical end of file marker string occurs as a line of input, the + rest of the input is ignored. If EOF-STR is omitted (`-e') or + blank (either `-e' or `-E'), there is no logical end of file marker + string. The `-e' form of this option is deprecated in favour of + the POSIX-compliant `-E' option, which you should use instead. As + of GNU `xargs' version 4.2.9, the default behaviour of `xargs' is + not to have a logical end of file marker string. The POSIX standard (IEEE Std 1003.1, 2004 Edition) allows this. + The logical end of file marker string is not treated specially if + the `-d' or the `-0' options are in effect. That is, when either + of these options are in effect, the whole input file will be read + even if `-E' was used. + `--help' Print a summary of the options to `xargs' and exit. @@ -4464,10 +4604,16 @@ File: find.info, Node: xargs options, Next: Invoking the shell from xargs, Up is 1. If MAX-PROCS is 0, `xargs' will run as many processes as possible simultaneously. +`--process-slot-var=ENVIRONMENT-VARIABLE-NAME' + Set the environment variable ENVIRONMENT-VARIABLE-NAME to a unique + value in each running child process. Each value is a decimal + integer. Values are reused once child processes exit. This can be + used in a rudimentary load distribution scheme, for example. +  File: find.info, Node: Invoking the shell from xargs, Prev: xargs options, Up: Invoking xargs -7.4.2 Invoking the shell from xargs +8.4.2 Invoking the shell from xargs ----------------------------------- Normally, `xargs' will exec the command you specified directly, without @@ -4501,11 +4647,11 @@ solve the more general problem. xargs -r0 sh -c 'mv "$@" /archive' move Here, a shell is being invoked. There are two shell instances to -think about. The first is the shell which launches the xargs command +think about. The first is the shell which launches the `xargs' command (this might be the shell into which you are typing, for example). The second is the shell launched by `xargs' (in fact it will probably -launch several, one after the other, depending on how many files need -to be archived). We'll refer to this second shell as a subshell. +launch several, one after the other, depending on how many files need to +be archived). We'll refer to this second shell as a subshell. Our example uses the `-c' option of `sh'. Its argument is a shell command to be executed by the subshell. Along with the rest of that @@ -4549,7 +4695,7 @@ causes `xargs' to stop immediately.  File: find.info, Node: Regular Expressions, Next: Environment Variables, Prev: Invoking xargs, Up: Reference -7.5 Regular Expressions +8.5 Regular Expressions ======================= The `-regex' and `-iregex' tests of `find' allow matching by regular @@ -4586,7 +4732,7 @@ should be one of the following:  File: find.info, Node: findutils-default regular expression syntax, Next: awk regular expression syntax, Up: Regular Expressions -7.5.1 `findutils-default' regular expression syntax +8.5.1 `findutils-default' regular expression syntax --------------------------------------------------- The character `.' matches any single character. @@ -4672,7 +4818,7 @@ subexpressions within groups.  File: find.info, Node: awk regular expression syntax, Next: egrep regular expression syntax, Prev: findutils-default regular expression syntax, Up: Regular Expressions -7.5.2 `awk' regular expression syntax +8.5.2 `awk' regular expression syntax ------------------------------------- The character `.' matches any single character except the null @@ -4695,8 +4841,8 @@ character. Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example `[z-a]', are invalid. Within square brackets, `\' can be used to quote the -following character. Character classes are not supported, so for -example you would need to use `[0-9]' instead of `[[:digit:]]'. +following character. Character classes are supported; for example +`[[:digit:]]' will match a single decimal digit. GNU extensions are not supported and so `\w', `\W', `\<', `\>', `\b', `\B', `\`', and `\'' match `w', `W', `<', `>', `b', `B', ``', and @@ -4729,7 +4875,7 @@ subexpressions within groups.  File: find.info, Node: egrep regular expression syntax, Next: emacs regular expression syntax, Prev: awk regular expression syntax, Up: Regular Expressions -7.5.3 `egrep' regular expression syntax +8.5.3 `egrep' regular expression syntax --------------------------------------- The character `.' matches any single character except newline. @@ -4795,7 +4941,7 @@ subexpressions within groups.  File: find.info, Node: emacs regular expression syntax, Next: gnu-awk regular expression syntax, Prev: egrep regular expression syntax, Up: Regular Expressions -7.5.4 `emacs' regular expression syntax +8.5.4 `emacs' regular expression syntax --------------------------------------- The character `.' matches any single character except newline. @@ -4881,7 +5027,7 @@ subexpressions within groups.  File: find.info, Node: gnu-awk regular expression syntax, Next: grep regular expression syntax, Prev: emacs regular expression syntax, Up: Regular Expressions -7.5.5 `gnu-awk' regular expression syntax +8.5.5 `gnu-awk' regular expression syntax ----------------------------------------- The character `.' matches any single character. @@ -4947,6 +5093,9 @@ except: 3. After the alternation operator `|' + Intervals are specified by `{' and `}'. Invalid intervals are +treated as literals, for example `a{1' is treated as `a\{1' + The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. @@ -4954,7 +5103,7 @@ subexpressions within groups.  File: find.info, Node: grep regular expression syntax, Next: posix-awk regular expression syntax, Prev: gnu-awk regular expression syntax, Up: Regular Expressions -7.5.6 `grep' regular expression syntax +8.5.6 `grep' regular expression syntax -------------------------------------- The character `.' matches any single character except newline. @@ -5046,7 +5195,7 @@ subexpressions within groups.  File: find.info, Node: posix-awk regular expression syntax, Next: posix-basic regular expression syntax, Prev: grep regular expression syntax, Up: Regular Expressions -7.5.7 `posix-awk' regular expression syntax +8.5.7 `posix-awk' regular expression syntax ------------------------------------------- The character `.' matches any single character except the null @@ -5099,8 +5248,8 @@ except the following places, where they are not allowed: 3. After the alternation operator `|' - Intervals are specified by `{' and `}'. Invalid intervals such as -`a{1z' are not accepted. + Intervals are specified by `{' and `}'. Invalid intervals are +treated as literals, for example `a{1' is treated as `a\{1' The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to @@ -5109,7 +5258,7 @@ subexpressions within groups.  File: find.info, Node: posix-basic regular expression syntax, Next: posix-egrep regular expression syntax, Prev: posix-awk regular expression syntax, Up: Regular Expressions -7.5.8 `posix-basic' regular expression syntax +8.5.8 `posix-basic' regular expression syntax --------------------------------------------- This is a synonym for ed. @@ -5117,7 +5266,7 @@ This is a synonym for ed.  File: find.info, Node: posix-egrep regular expression syntax, Next: posix-extended regular expression syntax, Prev: posix-basic regular expression syntax, Up: Regular Expressions -7.5.9 `posix-egrep' regular expression syntax +8.5.9 `posix-egrep' regular expression syntax --------------------------------------------- The character `.' matches any single character except newline. @@ -5186,7 +5335,7 @@ subexpressions within groups.  File: find.info, Node: posix-extended regular expression syntax, Prev: posix-egrep regular expression syntax, Up: Regular Expressions -7.5.10 `posix-extended' regular expression syntax +8.5.10 `posix-extended' regular expression syntax ------------------------------------------------- The character `.' matches any single character except the null @@ -5263,50 +5412,50 @@ subexpressions within groups.  File: find.info, Node: Environment Variables, Prev: Regular Expressions, Up: Reference -7.6 Environment Variables +8.6 Environment Variables ========================= -LANG +`LANG' Provides a default value for the internationalisation variables that are unset or null. -LC_ALL +`LC_ALL' If set to a non-empty string value, override the values of all the other internationalisation variables. -LC_COLLATE +`LC_COLLATE' The POSIX standard specifies that this variable affects the pattern matching to be used for the `\-name' option. GNU find uses the GNU version of the `fnmatch' library function. This variable also affects the interpretation of the response to - `-ok'; while the LC_MESSAGES variable selects the actual pattern + `-ok'; while the `LC_MESSAGES' variable selects the actual pattern used to interpret the response to `-ok', the interpretation of any bracket expressions in the pattern will be affected by the - LC_COLLATE variable. + `LC_COLLATE' variable. -LC_CTYPE +`LC_CTYPE' This variable affects the treatment of character classes used in regular expression and with the `-name' test, if the `fnmatch' function supports this. This variable also affects the interpretation of any character classes in the regular expressions used to interpret the response - to the prompt issued by `-ok'. The LC_CTYPE environment variable - will also affect which characters are considered to be unprintable - when filenames are printed (*note Unusual Characters in File - Names::). + to the prompt issued by `-ok'. The `LC_CTYPE' environment + variable will also affect which characters are considered to be + unprintable when filenames are printed (*note Unusual Characters + in File Names::). -LC_MESSAGES +`LC_MESSAGES' Determines the locale to be used for internationalised messages, including the interpretation of the response to the prompt made by the `-ok' action. -NLSPATH +`NLSPATH' Determines the location of the internationalisation message catalogues. -PATH +`PATH' Affects the directories which are searched to find the executables invoked by `-exec', `-execdir' `-ok' and `-okdir'. If the PATH environment variable includes the current directory (by explicitly @@ -5315,9 +5464,9 @@ PATH *Note Security Considerations::, for a more detailed discussion of security matters. -POSIXLY_CORRECT +`POSIXLY_CORRECT' Determines the block size used by `-ls' and `-fls'. If - POSIXLY_CORRECT is set, blocks are units of 512 bytes. Otherwise + `POSIXLY_CORRECT' is set, blocks are units of 512 bytes. Otherwise they are units of 1024 bytes. Setting this variable also turns off warning messages (that is, @@ -5325,22 +5474,19 @@ POSIXLY_CORRECT from the output for `-ok', all messages printed on stderr are diagnostics and must result in a non-zero exit status. - Arguments to `-perm' beginning with `+' are treated differently - when POSIXLY_CORRECT is set. See *note -perm: Mode Bits. - - When POSIXLY_CORRECT is set, the response to the prompt made by the - `-ok' action is interpreted according to the system's message + When `POSIXLY_CORRECT' is set, the response to the prompt made by + the `-ok' action is interpreted according to the system's message catalogue, as opposed to according to `find''s own message translations. -TZ +`TZ' Affects the time zone used for some of the time-related format directives of `-printf' and `-fprintf'.  File: find.info, Node: Common Tasks, Next: Worked Examples, Prev: Reference, Up: Top -8 Common Tasks +9 Common Tasks ************** The sections that follow contain some extended examples that both give @@ -5359,7 +5505,7 @@ common real-world problems.  File: find.info, Node: Viewing And Editing, Next: Archiving, Up: Common Tasks -8.1 Viewing And Editing +9.1 Viewing And Editing ======================= To view a list of files that meet certain criteria, simply run your @@ -5376,7 +5522,7 @@ viewing program: Because there is a limit to the length of any individual command line, there is a limit to the number of files that can be handled in -this way. We can get around this difficulty by using xargs like this: +this way. We can get around this difficulty by using `xargs' like this: find /usr/include -name '*.h' | xargs grep -l mode_t > todo xargs --arg-file=todo emacs @@ -5400,12 +5546,12 @@ the command line is used as `$0' by the shell that `xargs' launches.  File: find.info, Node: Archiving, Next: Cleaning Up, Prev: Viewing And Editing, Up: Common Tasks -8.2 Archiving +9.2 Archiving ============= You can pass a list of files produced by `find' to a file archiving program. GNU `tar' and `cpio' can both read lists of file names from -the standard input--either delimited by nulls (the safe way) or by +the standard input - either delimited by nulls (the safe way) or by blanks (the lazy, risky default way). To use null-delimited names, give them the `--null' option. You can store a file archive in a file, write it on a tape, or send it over a network to extract on another @@ -5444,7 +5590,7 @@ another:  File: find.info, Node: Cleaning Up, Next: Strange File Names, Prev: Archiving, Up: Common Tasks -8.3 Cleaning Up +9.3 Cleaning Up =============== This section gives examples of removing unwanted files in various @@ -5514,7 +5660,7 @@ effect and files in `dirname/foo' will be deleted too.  File: find.info, Node: Strange File Names, Next: Fixing Permissions, Prev: Cleaning Up, Up: Common Tasks -8.4 Strange File Names +9.4 Strange File Names ====================== `find' can help you remove or rename a file with strange characters in @@ -5557,7 +5703,7 @@ printed, then use `-execdir' instead of `-okdir'.  File: find.info, Node: Fixing Permissions, Next: Classifying Files, Prev: Strange File Names, Up: Common Tasks -8.5 Fixing Permissions +9.5 Fixing Permissions ====================== Suppose you want to make sure that everyone can write to the @@ -5573,7 +5719,7 @@ directories do _not_ have world write permission.  File: find.info, Node: Classifying Files, Prev: Fixing Permissions, Up: Common Tasks -8.6 Classifying Files +9.6 Classifying Files ===================== If you want to classify a set of files into several groups based on @@ -5595,8 +5741,8 @@ is one of the most time consuming parts of its work).  File: find.info, Node: Worked Examples, Next: Security Considerations, Prev: Common Tasks, Up: Top -9 Worked Examples -***************** +10 Worked Examples +****************** The tools in the findutils package, and in particular `find', have a large number of options. This means that quite often, there is more @@ -5617,8 +5763,8 @@ performed, and compares the different ways of achieving them.  File: find.info, Node: Deleting Files, Next: Copying A Subset of Files, Up: Worked Examples -9.1 Deleting Files -================== +10.1 Deleting Files +=================== One of the most common tasks that `find' is used for is locating files that can be deleted. This might include: @@ -5635,8 +5781,8 @@ sophisticated ways of locating the files that need to be deleted. We'll assume that the files we want to delete are old files underneath `/var/tmp/stuff'. -9.1.1 The Traditional Way -------------------------- +10.1.1 The Traditional Way +-------------------------- The traditional way to delete files in `/var/tmp/stuff' that have not been modified in over 90 days would have been: @@ -5670,8 +5816,8 @@ technique will usually work, it will suddenly fail when there are lots of files to delete. Since the task is to delete unwanted files, this is precisely the time we don't want things to go wrong. -9.1.2 Making Use of xargs -------------------------- +10.1.2 Making Use of `xargs' +---------------------------- So, is there a way to be more efficient in the use of `fork()' and `exec()' without running up against this limit? Yes, we can be almost @@ -5697,14 +5843,14 @@ given the limits on command line length. is widely implemented (all modern versions of Unix offer it). So far then, the news is all good. However, there is bad news too. -9.1.3 Unusual characters in filenames -------------------------------------- +10.1.3 Unusual characters in filenames +-------------------------------------- Unix-like systems allow any characters to appear in file names with the exception of the ASCII NUL character and the slash. Slashes can occur in path names (as the directory separator) but not in the names of actual directory entries. This means that the list of files that -`xargs' reads could in fact contain white space characters -- spaces, +`xargs' reads could in fact contain white space characters - spaces, tabs and newline characters. Since by default, `xargs' assumes that the list of files it is reading uses white space as an argument separator, it cannot correctly handle the case where a filename @@ -5736,8 +5882,8 @@ portable construct; although other versions of Unix (notably BSD-derived ones) support `-print0', it's not universal. So, is there a more universal mechanism? -9.1.4 Going back to -exec -------------------------- +10.1.4 Going back to `-exec' +---------------------------- There is indeed a more universal mechanism, which is a slight modification to the `-exec' action. The normal `-exec' action assumes @@ -5759,8 +5905,8 @@ findutils did not support `-exec ... +' until version 4.2.12; one of the reasons for this is that it already had the `-print0' action in any case. -9.1.5 A more secure version of -exec ------------------------------------- +10.1.5 A more secure version of `-exec' +--------------------------------------- The command above seems to be efficient and portable. However, within it lurks a security problem. The problem is shared with all the @@ -5827,8 +5973,8 @@ how many files we actually need to delete from each directory. processing, no. However, in the specific case of deleting files it is indeed possible to do better. -9.1.6 Using the -delete action ------------------------------- +10.1.6 Using the `-delete' action +--------------------------------- The most efficient and secure method of solving this problem is to use the `-delete' action: @@ -5846,8 +5992,8 @@ action has. The `-delete' action was introduced by the BSD family of operating systems. -9.1.7 Improving things still further ------------------------------------- +10.1.7 Improving things still further +------------------------------------- Is it possible to improve things still further? Not without either modifying the system library to the operating system or having more @@ -5900,8 +6046,8 @@ things: * Other activity - are other programs also doing things on those disks? -9.1.8 Conclusion ----------------- +10.1.8 Conclusion +----------------- The fastest and most secure way to delete files with the help of `find' is to use `-delete'. Using `xargs -0 -P N' can also make effective use @@ -5920,8 +6066,8 @@ insecure and isn't supported by versions of GNU findutils prior to  File: find.info, Node: Copying A Subset of Files, Next: Updating A Timestamp File, Prev: Deleting Files, Up: Worked Examples -9.2 Copying A Subset of Files -============================= +10.2 Copying A Subset of Files +============================== Suppose you want to copy some files from `/source-dir' to `/dest-dir', but there are a small number of files in `/source-dir' you don't want @@ -5963,8 +6109,8 @@ command in the pipeline).  File: find.info, Node: Updating A Timestamp File, Next: Finding the Shallowest Instance, Prev: Copying A Subset of Files, Up: Worked Examples -9.3 Updating A Timestamp File -============================= +10.3 Updating A Timestamp File +============================== Suppose we have a directory full of files which is maintained with a set of automated tools; perhaps one set of tools updates them and @@ -5976,10 +6122,10 @@ file which gives the timestamp on the newest file in the collection. We can use `find' to achieve this, but there are several different ways to do it. -9.3.1 Updating the Timestamp The Wrong Way ------------------------------------------- +10.3.1 Updating the Timestamp The Wrong Way +------------------------------------------- -The obvious but wrong answer is just to use `-newer':- +The obvious but wrong answer is just to use `-newer': find subdir -newer timestamp -exec touch -r {} timestamp \; @@ -5994,8 +6140,8 @@ be different, this could well be the wrong value. modification time of `timestamp' every time a file is to be compared against it, but that will reduce the performance of `find'. -9.3.2 Using the test utility to compare timestamps --------------------------------------------------- +10.3.2 Using the test utility to compare timestamps +--------------------------------------------------- The `test' command can be used to compare timestamps: @@ -6006,8 +6152,8 @@ The `test' command can be used to compare timestamps: into account. This resolves our earlier problem, but unfortunately this runs much more slowly. -9.3.3 A combined approach -------------------------- +10.3.3 A combined approach +-------------------------- We can of course still use `-newer' to cut down on the number of calls to `test': @@ -6024,8 +6170,8 @@ timestamp. This is indeed faster in general, but the speed difference will depend on how many updated files there are. -9.3.4 Using -printf and sort to compare timestamps --------------------------------------------------- +10.3.4 Using `-printf' and `sort' to compare timestamps +------------------------------------------------------- It is possible to use the `-printf' action to abandon the use of `test' entirely: @@ -6053,8 +6199,8 @@ information at a granularity which is finer than one second. Findutils version 4.3.3 and later will print a fractional part with %A@, but older versions will not. -9.3.5 Solving the problem with make ------------------------------------ +10.3.5 Solving the problem with `make' +-------------------------------------- Another tool which often works with timestamps is `make'. We can use `find' to generate a `Makefile' file on the fly and then use `make' to @@ -6072,8 +6218,8 @@ update the timestamps: to cope with white space within file names, and adjusting it to do so would require a rather complex shell script. -9.3.6 Coping with odd filenames too ------------------------------------ +10.3.6 Coping with odd filenames too +------------------------------------ We can fix both of these problems (looping and problems with white space), and do things more efficiently too. The following command @@ -6088,7 +6234,7 @@ works with newlines and doesn't need to sort the list of filenames. than the original timestamp file, and prints a list of them with their timestamps. The `newest.pl' script simply filters out all the filenames which have timestamps which are older than whatever the -newest file is:- +newest file is: #! /usr/bin/perl -0 my @newest = (); @@ -6114,8 +6260,8 @@ file, the timestamp is updated.  File: find.info, Node: Finding the Shallowest Instance, Prev: Updating A Timestamp File, Up: Worked Examples -9.4 Finding the Shallowest Instance -=================================== +10.4 Finding the Shallowest Instance +==================================== Suppose you maintain local copies of sources from various projects, each with their own choice of directory organisation and source code @@ -6159,7 +6305,7 @@ searching a large portion of the structure, saving a good deal of time.  File: find.info, Node: Security Considerations, Next: Error Messages, Prev: Worked Examples, Up: Top -10 Security Considerations +11 Security Considerations ************************** Security considerations are important if you are using `find' or @@ -6192,7 +6338,7 @@ on what the system is going to do with the files found by `find'.  File: find.info, Node: Levels of Risk, Next: Security Considerations for find, Up: Security Considerations -10.1 Levels of Risk +11.1 Levels of Risk =================== There are some security risks inherent in the use of `find', `xargs' @@ -6238,7 +6384,7 @@ exhaustive. If you are responsible for the operation of a system where the consequences of a security problem could be very important, you should -do two things:- +do two things: 1. Define a security policy which defines who is allowed to do what on your system. @@ -6256,7 +6402,7 @@ this way, and that's a deliberate choice  File: find.info, Node: Security Considerations for find, Next: Security Considerations for xargs, Prev: Levels of Risk, Up: Security Considerations -10.2 Security Considerations for `find' +11.2 Security Considerations for `find' ======================================= Some of the actions `find' might take have a direct effect; these @@ -6312,8 +6458,8 @@ which would not normally be included in the search (defeating the  File: find.info, Node: Problems with -exec and filenames, Next: Changing the Current Working Directory, Up: Security Considerations for find -10.2.1 Problems with -exec and filenames ----------------------------------------- +11.2.1 Problems with `-exec' and filenames +------------------------------------------ It is safe in many cases to use the `-execdir' action with any file name. Because `-execdir' prefixes the arguments it passes to programs @@ -6353,7 +6499,7 @@ of a shell command.  File: find.info, Node: Changing the Current Working Directory, Next: Race Conditions with -exec, Prev: Problems with -exec and filenames, Up: Security Considerations for find -10.2.2 Changing the Current Working Directory +11.2.2 Changing the Current Working Directory --------------------------------------------- As `find' searches the filesystem, it finds subdirectories and then @@ -6384,44 +6530,50 @@ of your system. * Menu: -* O_NOFOLLOW:: Safely changing directory using fchdir(). -* Systems without O_NOFOLLOW:: Checking for symbolic links after chdir(). +* O_NOFOLLOW:: Safely changing directory using `fchdir'. +* Systems without O_NOFOLLOW:: Checking for symbolic links after `chdir'.  File: find.info, Node: O_NOFOLLOW, Next: Systems without O_NOFOLLOW, Up: Changing the Current Working Directory -10.2.2.1 O_NOFOLLOW -................... +11.2.2.1 `O_NOFOLLOW' +..................... -If your system supports the O_NOFOLLOW flag (1) to the `open(2)' system -call, `find' uses it to safely change directories. The target +If your system supports the `O_NOFOLLOW' flag (1) to the `open(2)' +system call, `find' uses it to safely change directories. The target directory is first opened and then `find' changes working directory with the `fchdir()' system call. This ensures that symbolic links are not followed, preventing the sort of race condition attack in which use is made of symbolic links. If for any reason this approach does not work, `find' will fall back -on the method which is normally used if O_NOFOLLOW is not supported. +on the method which is normally used if `O_NOFOLLOW' is not supported. - You can tell if your system supports O_NOFOLLOW by running + You can tell if your system supports `O_NOFOLLOW' by running find --version This will tell you the version number and which features are enabled. For example, if I run this on my system now, this gives: - GNU find version 4.2.18-CVS - Features enabled: D_TYPE O_NOFOLLOW(enabled) + find (GNU findutils) 4.5.11-git + Copyright (C) 2012 Free Software Foundation, Inc. + License GPLv3+: GNU GPL version 3 or later . + This is free software: you are free to change and redistribute it. + There is NO WARRANTY, to the extent permitted by law. + + Written by Eric B. Decker, James Youngman, and Kevin Dalley. + Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2) Here, you can see that I am running a version of `find' which was -built from the development (CVS) code prior to the release of -findutils-4.2.18, and that the D_TYPE and O_NOFOLLOW features are -present. O_NOFOLLOW is qualified with "enabled". This simply means -that the current system seems to support O_NOFOLLOW. This check is +built from the development (git) code prior to the release of +findutils-4.5.12, and that several features including `O_NOFOLLOW' are +present. `O_NOFOLLOW' is qualified with "enabled". This simply means +that the current system seems to support `O_NOFOLLOW'. This check is needed because it is possible to build `find' on a system that defines -O_NOFOLLOW and then run it on a system that ignores the O_NOFOLLOW +`O_NOFOLLOW' and then run it on a system that ignores the `O_NOFOLLOW' flag. We try to detect such cases at startup by checking the operating system and version number; when this happens you will see -"O_NOFOLLOW(disabled)" instead. +`O_NOFOLLOW(disabled)' instead. ---------- Footnotes ---------- @@ -6431,11 +6583,11 @@ system and version number; when this happens you will see  File: find.info, Node: Systems without O_NOFOLLOW, Prev: O_NOFOLLOW, Up: Changing the Current Working Directory -10.2.2.2 Systems without O_NOFOLLOW -................................... +11.2.2.2 Systems without `O_NOFOLLOW' +..................................... The strategy for preventing this type of problem on systems that lack -support for the O_NOFOLLOW flag is more complex. Each time `find' +support for the `O_NOFOLLOW' flag is more complex. Each time `find' changes directory, it examines the directory it is about to move to, issues the `chdir()' system call, and then checks that it has ended up in the subdirectory it expected. If all is as expected, processing @@ -6447,7 +6599,7 @@ removing the old directory and replacing it with something else while Where a filesystem "automounter" is in use it can be the case that the use of the `chdir()' system call can itself cause a new filesystem to be mounted at that point. On systems that do not support -O_NOFOLLOW, this will cause `find''s security check to fail. +`O_NOFOLLOW', this will cause `find''s security check to fail. However, this does not normally represent a security problem, since the automounter configuration is normally set up by the system @@ -6475,8 +6627,8 @@ parent. No operations would have been performed within that directory.  File: find.info, Node: Race Conditions with -exec, Next: Race Conditions with -print and -print0, Prev: Changing the Current Working Directory, Up: Security Considerations for find -10.2.3 Race Conditions with -exec ---------------------------------- +11.2.3 Race Conditions with `-exec' +----------------------------------- The `-exec' action causes another program to be run. It passes to the program the name of the file which is being considered at the time. @@ -6527,8 +6679,8 @@ by untrusted users. For similar reasons, `-execdir' does not allow  File: find.info, Node: Race Conditions with -print and -print0, Prev: Race Conditions with -exec, Up: Security Considerations for find -10.2.4 Race Conditions with -print and -print0 ----------------------------------------------- +11.2.4 Race Conditions with `-print' and `-print0' +-------------------------------------------------- The `-print' and `-print0' actions can be used to produce a list of files matching some criteria, which can then be used with some other @@ -6549,7 +6701,7 @@ action is less secure even than `-print0'.  File: find.info, Node: Security Considerations for xargs, Next: Security Considerations for locate, Prev: Security Considerations for find, Up: Security Considerations -10.3 Security Considerations for `xargs' +11.3 Security Considerations for `xargs' ======================================== The description of the race conditions affecting the `-print' action of @@ -6599,10 +6751,10 @@ use that option.  File: find.info, Node: Security Considerations for locate, Next: Security Summary, Prev: Security Considerations for xargs, Up: Security Considerations -10.4 Security Considerations for `locate' +11.4 Security Considerations for `locate' ========================================= -10.4.1 Race Conditions +11.4.1 Race Conditions ---------------------- It is fairly unusual for the output of `locate' to be fed into another @@ -6613,7 +6765,7 @@ problems relating to whitespace in file names can be resolved by using associated with `find ... -print0'. There is no way to avoid these problems in the case of `locate'. -10.4.2 Long File Name Bugs with Old-Format Databases +11.4.2 Long File Name Bugs with Old-Format Databases ---------------------------------------------------- Old versions of `locate' have a bug in the way that old-format @@ -6654,7 +6806,7 @@ installations and most users will not be affected by this problem.  File: find.info, Node: Security Summary, Next: Further Reading on Security, Prev: Security Considerations for locate, Up: Security Considerations -10.5 Summary +11.5 Summary ============ Where untrusted parties can create files on the system, or affect the @@ -6677,7 +6829,7 @@ Informational use only  File: find.info, Node: Further Reading on Security, Prev: Security Summary, Up: Security Considerations -10.6 Further Reading on Security +11.6 Further Reading on Security ================================ While there are a number of books on computer security, there are also @@ -6707,7 +6859,7 @@ useful articles on the web that touch on the issues described above:  File: find.info, Node: Error Messages, Next: GNU Free Documentation License, Prev: Security Considerations, Up: Top -11 Error Messages +12 Error Messages ***************** This section describes some of the error messages sometimes made by @@ -6734,7 +6886,7 @@ listed.  File: find.info, Node: Error Messages From find, Next: Error Messages From xargs, Up: Error Messages -11.1 Error Messages From `find' +12.1 Error Messages From `find' =============================== Most error messages produced by find are self-explanatory. Error @@ -6761,10 +6913,10 @@ making unwanted changes in the state of the terminal. These messages might appear when `find' moves into a directory and finds that the device number and inode are different from what it expected them to be. If the directory `find' has moved into is on - an network filesystem (NFS), it will not issue this message, - because `automount' frequently mounts new filesystems on - directories as you move into them (that is how it knows you want - to use the filesystem). So, if you do see this message, be wary -- + a network filesystem (NFS), it will not issue this message, because + `automount' frequently mounts new filesystems on directories as + you move into them (that is how it knows you want to use the + filesystem). So, if you do see this message, be wary - `automount' may not have been responsible. Consider the possibility that someone else is manipulating the filesystem while `find' is running. Some people might do this in order to mislead @@ -6826,8 +6978,8 @@ making unwanted changes in the state of the terminal.  File: find.info, Node: Error Messages From xargs, Next: Error Messages From locate, Prev: Error Messages From find, Up: Error Messages -11.2 Error Messages From xargs -============================== +12.2 Error Messages From `xargs' +================================ `environment is too large for exec' This message means that you have so many environment variables set @@ -6839,15 +6991,22 @@ File: find.info, Node: Error Messages From xargs, Next: Error Messages From lo exiting the current shell. You can also use `xargs --show-limits' to understand the relevant sizes. -`can not fit single argument within argument list size limit' +`argument list too long' You are using the `-I' option and `xargs' doesn't have enough space to build a command line because it has read a really large - item and it doesn't fit. You can probably work around this + item and it doesn't fit. You may be able to work around this problem with the `-s' option, but the default size is pretty large. This is a rare situation and is more likely an attempt to test the limits of `xargs', or break it. Otherwise, you will need to try to shorten the problematic argument or not use `xargs'. +`argument line too long' + You are using the `-L' or `-l' option and one of the input lines + is too long. You may be able to work around this problem with the + `-s' option, but the default size is pretty large. If you can + modify the your `xargs' command not to use `-L' or `-l', that will + be more likely to result in success. + `cannot fork' See the description of the similar message for `find'. @@ -6870,7 +7029,7 @@ File: find.info, Node: Error Messages From xargs, Next: Error Messages From lo  File: find.info, Node: Error Messages From locate, Next: Error Messages From updatedb, Prev: Error Messages From xargs, Up: Error Messages -11.3 Error Messages From `locate' +12.3 Error Messages From `locate' ================================= `warning: database `/usr/local/var/locatedb' is more than 8 days old' @@ -6894,497 +7053,11 @@ File: find.info, Node: Error Messages From locate, Next: Error Messages From u  File: find.info, Node: Error Messages From updatedb, Prev: Error Messages From locate, Up: Error Messages -11.4 Error Messages From updatedb -================================= +12.4 Error Messages From `updatedb' +=================================== The `updatedb' program (and the programs it invokes) do issue error messages, but none seem to be candidates for guidance. If you are having a problem understanding one of these, ask for help on . - -File: find.info, Node: GNU Free Documentation License, Next: Primary Index, Prev: Error Messages, Up: Top - -Appendix A GNU Free Documentation License -***************************************** - - Version 1.3, 3 November 2008 - - Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. - `http://fsf.org/' - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - functional and useful document "free" in the sense of freedom: to - assure everyone the effective freedom to copy and redistribute it, - with or without modifying it, either commercially or - noncommercially. Secondarily, this License preserves for the - author and publisher a way to get credit for their work, while not - being considered responsible for modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work, in any medium, - that contains a notice placed by the copyright holder saying it - can be distributed under the terms of this License. Such a notice - grants a world-wide, royalty-free license, unlimited in duration, - to use that work under the conditions stated herein. The - "Document", below, refers to any such manual or work. Any member - of the public is a licensee, and is addressed as "you". You - accept the license if you copy, modify or distribute the work in a - way requiring permission under copyright law. - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter section - of the Document that deals exclusively with the relationship of the - publishers or authors of the Document to the Document's overall - subject (or to related matters) and contains nothing that could - fall directly within that overall subject. (Thus, if the Document - is in part a textbook of mathematics, a Secondary Section may not - explain any mathematics.) The relationship could be a matter of - historical connection with the subject or with related matters, or - of legal, commercial, philosophical, ethical or political position - regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. If a section does not fit the above definition of - Secondary then it is not allowed to be designated as Invariant. - The Document may contain zero Invariant Sections. If the Document - does not identify any Invariant Sections then there are none. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. A - Front-Cover Text may be at most 5 words, and a Back-Cover Text may - be at most 25 words. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, that is suitable for revising the document - straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup, or absence of - markup, has been arranged to thwart or discourage subsequent - modification by readers is not Transparent. An image format is - not Transparent if used for any substantial amount of text. A - copy that is not "Transparent" is called "Opaque". - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML, PostScript or PDF designed for - human modification. Examples of transparent image formats include - PNG, XCF and JPG. Opaque formats include proprietary formats that - can be read and edited only by proprietary word processors, SGML or - XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML, PostScript or PDF - produced by some word processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - The "publisher" means any person or entity that distributes copies - of the Document to the public. - - A section "Entitled XYZ" means a named subunit of the Document - whose title either is precisely XYZ or contains XYZ in parentheses - following text that translates XYZ in another language. (Here XYZ - stands for a specific section name mentioned below, such as - "Acknowledgements", "Dedications", "Endorsements", or "History".) - To "Preserve the Title" of such a section when you modify the - Document means that it remains a section "Entitled XYZ" according - to this definition. - - The Document may include Warranty Disclaimers next to the notice - which states that this License applies to the Document. These - Warranty Disclaimers are considered to be included by reference in - this License, but only as regards disclaiming warranties: any other - implication that these Warranty Disclaimers may have is void and - has no effect on the meaning of this License. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies (or copies in media that commonly - have printed covers) of the Document, numbering more than 100, and - the Document's license notice requires Cover Texts, you must - enclose the copies in covers that carry, clearly and legibly, all - these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a computer-network location from - which the general network-using public has access to download - using public-standard network protocols a complete Transparent - copy of the Document, free of added material. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. - - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has fewer than five), unless they release you - from this requirement. - - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - - D. Preserve all the copyright notices of the Document. - - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. - - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - - H. Include an unaltered copy of this License. - - I. Preserve the section Entitled "History", Preserve its Title, - and add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section Entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. - - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. - - K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the - section all the substance and tone of each of the contributor - acknowledgements and/or dedications given therein. - - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. - - M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. - - N. Do not retitle any existing section to be Entitled - "Endorsements" or to conflict in title with any Invariant - Section. - - O. Preserve any Warranty Disclaimers. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section Entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice, and that you preserve all - their Warranty Disclaimers. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections Entitled - "History" in the various original documents, forming one section - Entitled "History"; likewise combine any sections Entitled - "Acknowledgements", and any sections Entitled "Dedications". You - must delete all sections Entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, is called an "aggregate" if the - copyright resulting from the compilation is not used to limit the - legal rights of the compilation's users beyond what the individual - works permit. When the Document is included in an aggregate, this - License does not apply to the other works in the aggregate which - are not themselves derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one half - of the entire aggregate, the Document's Cover Texts may be placed - on covers that bracket the Document within the aggregate, or the - electronic equivalent of covers if the Document is in electronic - form. Otherwise they must appear on printed covers that bracket - the whole aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License, and all the license notices in the - Document, and any Warranty Disclaimers, provided that you also - include the original English version of this License and the - original versions of those notices and disclaimers. In case of a - disagreement between the translation and the original version of - this License or a notice or disclaimer, the original version will - prevail. - - If a section in the Document is Entitled "Acknowledgements", - "Dedications", or "History", the requirement (section 4) to - Preserve its Title (section 1) will typically require changing the - actual title. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided under this License. Any attempt - otherwise to copy, modify, sublicense, or distribute it is void, - and will automatically terminate your rights under this License. - - However, if you cease all violation of this License, then your - license from a particular copyright holder is reinstated (a) - provisionally, unless and until the copyright holder explicitly - and finally terminates your license, and (b) permanently, if the - copyright holder fails to notify you of the violation by some - reasonable means prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is - reinstated permanently if the copyright holder notifies you of the - violation by some reasonable means, this is the first time you have - received notice of violation of this License (for any work) from - that copyright holder, and you cure the violation prior to 30 days - after your receipt of the notice. - - Termination of your rights under this section does not terminate - the licenses of parties who have received copies or rights from - you under this License. If your rights have been terminated and - not permanently reinstated, receipt of a copy of some or all of - the same material does not give you any rights to use it. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. If the Document specifies that a proxy - can decide which future versions of this License can be used, that - proxy's public statement of acceptance of a version permanently - authorizes you to choose that version for the Document. - - 11. RELICENSING - - "Massive Multiauthor Collaboration Site" (or "MMC Site") means any - World Wide Web server that publishes copyrightable works and also - provides prominent facilities for anybody to edit those works. A - public wiki that anybody can edit is an example of such a server. - A "Massive Multiauthor Collaboration" (or "MMC") contained in the - site means any set of copyrightable works thus published on the MMC - site. - - "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 - license published by Creative Commons Corporation, a not-for-profit - corporation with a principal place of business in San Francisco, - California, as well as future copyleft versions of that license - published by that same organization. - - "Incorporate" means to publish or republish a Document, in whole or - in part, as part of another Document. - - An MMC is "eligible for relicensing" if it is licensed under this - License, and if all works that were first published under this - License somewhere other than this MMC, and subsequently - incorporated in whole or in part into the MMC, (1) had no cover - texts or invariant sections, and (2) were thus incorporated prior - to November 1, 2008. - - The operator of an MMC Site may republish an MMC contained in the - site under CC-BY-SA on the same site at any time before August 1, - 2009, provided the MMC is eligible for relicensing. - - -ADDENDUM: How to use this License for your documents -==================================================== - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and license -notices just after the title page: - - Copyright (C) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.3 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover - Texts. A copy of the license is included in the section entitled ``GNU - Free Documentation License''. - - If you have Invariant Sections, Front-Cover Texts and Back-Cover -Texts, replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with - the Front-Cover Texts being LIST, and with the Back-Cover Texts - being LIST. - - If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - - If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, to -permit their use in free software. - diff --git a/doc/find.info-2 b/doc/find.info-2 index 79cd5b5d12c7750573624d6f2bdd73580a791572..d124990ff164d06095cd35d0741ed90a0e658c88 100644 GIT binary patch literal 36605 zcmd6w`%@cPmgnck3I2)A<(INMfHJo0<=Wi{4A{kt!5%|(Rqe(`cOs=gW1-aQVNCz^ z`}v-8?#!-c` zuvhOCqjBAxb*gT0c~{(&pDKM?e6Gfmem&fJxwrqK=#A@}wScD8m;T4=+yMpB1mmNxw7MI=?vhc(I#*dwh2B@wctN6mP(xKfEe>{XsQ(RXh<+Pxp%W z^L|u~%c*`}5B(9an|7}CNv9f5%l@$FjQi7S+%NaGj?a!37g$E;g!Ml6yR&joh!g#3 zzq%JWA(L=A8Gf!mIi_$eA=v(JBBdO5i?TC^^&XTC>P|VWmcaSPO8^rv<4XaVWzj9C zc9o1TOtz4&duqe_&jmURQy~9JDXx_$o6$6KbE%!EtKmgmP03?_4sg z`OhmC(n8TupmejFYB-$~Lgek)&y5I*UOncamNM{6IdySwEy}tOkI@ZYx{*vim*ajt zn-sO{OFiVDLoITHMuNg&J-QqBudb)Xlf$RQ{trLA+|l3P+TY*r6wjYMduD&{+utwj zZ=T`vZ|v`HceeQVclK|8{s;Yg-`?8aFW!u+syMHE)7x@f6>sX<5cyy`JH^Sc<2Zb% zz;z;nl1W~T%OL_RrghN)xt*fhpG?R7%h|LNabLrYo4VWY-9ZJ9C(dmFxEdS#Q2HCl z?AZ_ErQvWCEVk8)cl}N^oK!o-U)_|8{k<1OJ>HVg1}M-t*?2LUT@Lz_Yxe+>&V3a9 zSlsrf*Tt~jLQ!BlWEAHW>JHO)((ib?9!_@;Yg|ZiQGJ>6D~T*##V2$=`ER%Ew`kdc z@gdPOaKy!_{;)HcbwLax5MmQwtU!6e@n-C_7WYvk<{gZ4YDaSZzt&| zt=}oIi=uN~4zFbG{i&81*3+UK4C>peYXFU0&N-1#-n;txnA*B zScCvzdJ1)TR-72|V5cC2O)u;E(+)OL)F|87@#@Wnrr^X3Y4L1Q^=5-?lf`xq>)&ql z6N}S&`m|f$yka2-Q%)u`yhD}vByFyGJ?Zo3Dm|V&f~_>JS}f~NcN~sc5g6*fHH>jb z;hfniDn3R2o%-gc8h84z=uReY3?A0Q_UD)#rd#8y#{B_4$Xre0&}dvus`2Lv-_2UU z3?gPMIyUT*&)}!xw!~A_#Z`rzg!MGN)d$ad3`=jX6#|f&!?`5KAc*5N`gk5`|kqEXc+X3Dc5qHd++#H2EDj~byRA&f}Nf)L#m^S9+y2UTynZ7X-Ki<_zhjs+DK z?0*LE=b%XlW>=b&uDF>^rlR|1QVqn0OP5iWb9p0Ygs}IVq7z83Z$^V^KE%DPh9ohA z;)6VFCn;dU%8*XDIvk!7)S_EW`d33ZW1&$2W)cA=k^f6oT$iX$esWHL_{(~1(V~{h z%503UrtBtFUr&0PL1SuFr_|$f9~VP(nRoPPVvtGZRZ+H}kVX>NZi)$dIp~TVmHT|R zF#N)}Ci#-&rTi1IFw7)efXT;xmx5`xt|lnzYZQH+Ja++uK8^+^B_m5b3ZtIkPydLZ?ily~l%Tv0+6jbp>1u1abe zgyp7YSa4d<;aCPGEa2UsyL*cp*(t{LT{)QE?V6&7A?*M^X$e$yXDTU3%^VC&khU9X zl0pj^c}D63xu3~Y>2`teaa-VXk=)^SO1SVdmle?n93-I3-H9-7Sga*@|G-$QK=;e7Wv3_%H$G%!v9LA zY{gKca0R}0eike-sCq2s3lO2NiEHEwUFEHoKUk<%Aan@xK_e3BDY^DU>8^4}Q+ikQ z0r|v?%&kR63Ws+orzNbLrsJvLd&=qzKPqB!-0%*Ol{yw7%}h=NopLZKsxM@-6Cw{$ z+2XiNW?X@t^z6Dn3cfj@*oMvX~ZbseUT7k3~%z@a&~vuR+C%Gg7(RuRjflTR+LXJo^upNLCnIUKmji=%Q( z@|N>0(F{6-TG-H0t&sDQEC?RBYqE#x3r;*?xE*s)ml7^bkiF4H*T|2+-7L?!n4S zvF)$;p#)oNGRFAQb4 z(+;Qg%JX=q<)Sa-&2b>GeA{AMc+Bi*QltT(I)&BlxGKA)$_fRq2>av8>Kn`0<U*!gdYX#4!|D_t>&C|;x+#{;v z3Au$2d%Zg@Z$X9!CnV<%MyV5Pmzl9=;YewD)VGGO^O1zv))dBst=b%W zkpi)zy5g|)?W!qNU6{AOyuiS;i1VX?FU4~Ou;S37ffHom{kBh9*HRX5LHg?%1cT)a@mAQ`qj1hNX)k!qjy*E+7tkBO=Vl;QiPW=B2oOCkT;>0jzl{ZQRONv z6j#s>xw;l+A_QM1!6r3K4s+p2#nibXMvG2q!BOTH$7SK;C5?m z%WsH8)<}ClDj`4(GwT){e<@YYn%`-wG{W?zKnsopp_(GPb*c$c+&DNtJUMBa6~Xfh zwhOe$;L>%m>=f_Hi|W_;&m5QYx2NyK@L%~4`4g!r38GchbDDc}ab)W1FNrnuHoChw zc&(t5y*0xzQZ5+~^5Hm9z z&WE$NJH@YuZ!F*Xmk)1&;`|Po=f`EV)Q8nn4M%5;$61FH^^?@eK*>SK1q@*XYSw;P z?p7akC>!u0J4JBO0g07>#}@jOC>Gu>js#N8=XlHfR$Y_0df=M6e^K4)K(fm6BEx%(0+$tdmF@!dfWr_f)DyOpb_pvAebWgbTtfbEsGp+V zxvaZ#<$19=0p(IAxl!%Z~>>LlEXBNL!gLE)ZQ{Sr0S(qacWtK2?L zI|RS}_CNEg#n4JQ9OsPOGNGGb2G!PwasEa-6>*AsVhUykJmH*+CjE@KJSn-RZ5r{p z(IX3u7DCNis2H6X7>im9U8~bL1wOP7#F8Lo9hEJGkD3Fhwo{ zk?n)dr(u1IlfUxrB;AVbBSabPRsDE8>|$;C*U-29lhsFe+j~zPkBhq4{t#_pld@@> zmHNJ1#)(eZ(3%ex1tr%|sKn?<(mbn}Vj?%h3(PD-Sdbp=4V)Ru=9pLzMkY;(kmP@X zW;TmZGp302i$!pfjU!?<(TVOjk=W8{ub&BxbhDBM$R}FYC)YSFi*9w$WJ_s1jF{z9 z(Y10xxl!~cHNByOY&UOlS(*^-Jw6RuTfW41Ld@4=^Ik8)g`h~bNM=Gj(ylhGS-gbl zmIG4cOF6CUqL3|C;;CxeJPlNTuKN~h9EvicVI3P6vCV4I%$}fOlnLeeUh&uCkFO6d zPEL!%_aA;cIeQxk2F)w05iCPdm#eXSQ?JBV8JAW1Xe`ahXazYsO~s92qO=QJ95&iO z%UOO~*?HSBTR2EiQq$74Ac_RJT7(&j{S&Qqa*y!b8=C@Xle zmu#XqIV=9{=Yz8gy7*xqPQM4Z$u$AUcNl_9_4DGN5TZss9X08=OhPWgX*MfvUPUAn ze+!{>CzvP`zNv9hz!?_%8j66BhIh#zNeLFrBIh`*UdE1d07*Cm3M?980&bY;18pGud%>{ zoNWb~Mg(e(NejOs_kbjIT%?H1IZyB#v|V6;zeo|Wg`#gcMq|Ptu+NN9TEc2ANVyJc zq6Ea?h&@1-sk~gNb4u#qpPCP}B3LnNHV($UOG;NAii&cRjLAcOs_VXocMrq%4GA|@ zsX*F#(~Azor3tV3b&WPTCxn#mCfgED(1H#&nkKg}vB?*Or^e1u4By9_;-XYn032K| zdEDj*e48nvrc=nOq)XGhVH|zD&{kps@!u1xyloCd^V!py3AlPNgO?gDB2v?xbRx4( zO4hO0X^jxr*Xxh*JY-_xj~a8u6VRlDM4eeFfq()sUz$XB7^5?unKA808V5ZvKssY& zGq)H>5!}>lDZBs9uA5psDp8X6TJRWiJ~@?};WHN4@07VOUEv1Im&vE5eAuUQ(yq}` zt8Jk*0P&^{rau*ZxfU`Qe5!oRkt!a5_{vA|{R$mSNsV`h)l}t)545SJgeBcL8BIx> zT6FR7uJ;byBa`5eaT1UwCf;s+I~>$yxV!d)yOw~{NFZPIHLZMA4l z#z5y~fzQ;X+C=A5%nR*EHi(gh@O(Qm?1@UjHlIhz?i+_%Of|XEC=vF>j1<~{#*Ii` zQvU6DSf$oPXYq>lqx;Z=5d4QKCKa^gcS9RiQ9yAZmT0s{gl?$2?cGaH$m{DfyWIjwO3E+!MrmBxi&(T%KuKuy~c z+)+v8xrT|y3b^cJq7FfBJwz}5rdV#SU(w_C`>C6eSRIIT|H#B8jBAyjT28AdTm&X17imkqNv(U$3XY-N!Kv z2}C*f432Rj8J6raMjvftA_Zk~$vv8Z=H`sojR-7J3SU7OWOx$)Wf{1)#u~?E%c;qu z(jKodKP(p@n)!h_b(D^@7`RGX(t_h2ma?;H6la_5WNwwZR<=&exUpPi#}Ui3Y}zP&Qf);gHn`YZ!mH zSDY*SBrSK&Tkls~u+~{9aa+QYQVZ8bGd8K|{rpa|;t^x0Dc2PX^qAbIk3>axVNqF| z*N>U!B0q-(^b>3!K-ez=u--PVabZfbg>p_0BdVo#!U7`A!f*EQIW}pHAu_Q>H956i z!5okmkx-8$m4U65qfde{B&QnLmdynFED=bBO=fr8g7DV}R88a{CrGpIO>;?;3C3Qv z$(4rRvWd2+=P;8Res<$+(S}^MU$U4Cj8c*LPLCvK^_TK^+XTy7`z>UdNU+fzivcMq zXji9&+=4JOT$8K(Dgufr@%+LKl0RjcNFiqUAs9iXmj$WMGQ2NiX4t+LUr5XP_}e| z%NCPNV9~ZzB{|19d1P4FUs}VBSKAt%Eb|$00v6CNyPwEqok%jEp0q;J{BELZiI{|b z3z?OKB&cly%=kBbNWEnZf`M)`1Vsx%=wZ5P?xp>LG}(!=RpOr8@e^`BWF2B@0Zw}f?X9XX(M31agrPH5_Z@3$Zfj6V>6rRZ z6~P=vaDvzZ*rbE4MdvpprHMQWFM32vigLoK0gY0(HFwv75$tY|df%2e=&aiNN>9^{ zkwg|LWNAy2w0U@|T4-qqxJlZz+s_6L9VS5G5!9izIl+lE!4BT!0awZpR7M)kPAGzR zGE#d;zEyM2k?*$sD|w*rSXdW=0>yeo{(2sSv~e#nG177s7sdl^{=4XU}G^(h1RDGgM<^xa@aaK;mp{O*vtduRNBKV9Funx%>XYa~k z{~sh{>OlC8gC{FYA2x@Znk{l64o6}rDyjKAzhc%@kIqJtvekdS<-i){(pF1S5OkL^ z+9y?;x6}Nl@LQVrv}TrQg}WhFH@T!$tv#ObrAyX`;=I@76Tu?!+=gX^!kdLdsAgah zRTj2@%z!Qf1e)Vawu$*@CdT}q%Pmf$X?EV0h5{7#4rJVEI4UVzU~}Y|%*JHTp)NKd z+#`jQLtL<)gm?dglxRw5CoG{PW9NBkfDa@JA+Yz;aT$!`<6!iPVo7r*{j$0)2R&F6 zttGM~1sby$X?->R(fXWv6W{M(*u&O2A48S#CvjXI3-nr31z1n3zRO-JrD{P?Zlahs zbfScFz)LE5!AGviPvU$+%B#lu0MY8D%-$G`f+zA=zSO&@<&+7vF+-!H^2C>^{P*1- zFHsSp<#!TDb7qr!2E=krPY}NvM<6^T|3x=oRD7d--P6|`!#aCg9KApM`IH+E(rK(@ za%^Rg?>kE~H5Sm^!FBU_`T2=@CsD+v88fv??5H1n@nYG`9yP`dCqMbpTdYkseUlFD zq(pjgT0#mCN}CMOaW<#pXfy$3RTL19yb)w_PVKZzS-6kcFyZ1!qj><{pvBGGIFA(p z2GHOag+Z{ABj(x?f@l@A^L4dDHq8@VIWJ{}#83sebt!=qbABbAi^K}hj1;-$U{)3A zw!ANNGaF3%nnLwWV;uxpL0=RvVRvzO9{)}Dlt%otPIfvnasHoyuK;PfB|(_4k@`DA z3UQp@vdJS4gE$cSJ2u#%=RMbgT~@!2aqcsH-Fh(Hhs5y!ed&QDoKg|Q2U1k!|%}VP#mS0X@Ebc+APat(;8zV)BI*+ zF$rKKAE{2%8z~g6U}hvZ^GX)Z$?=#|mE_z`QomicZ+6sb@W&hGR|2caLUP;`t${$k z{9@U-Wa>8cETs&1j@t23Gw4TXjne!fSS;0wZeDVTONh_ckO%|^=xA7;$LRwrQn2(D zuO2rZce1ywB=1}K)_3pxewp*){hNCoY@F|BqjnJG239(W3Ix5BgtOyS`fYyKQOhnW zb)MVDnHs;Vx7wjmSD5(yG7iS_cIzIt{dMxDNp{U*UeAP;nn9sP0^FVD^(DKXpODAP)t@XZT65~d$0;>42( zT#ub`4r7j2D+z}KIzBGPw}Oue3a%?HV$R?@di`(Tems6_d#=SVCl^041a@@%fs2gD z7K&fqfBe^!G8{n1&4@EdmhCU9uF@0Y9T`B}YryG0Ha*+wJgM-$+Dnka!p};TsdC4J zlB!mVp7?!;p}KoHVv61)5S*ayDy2+sIL)&UWguFhF5q7M~NJC^LD{8gE=oLIhO}E}L)k z$n_YYHbc(+(e4xI=Bi!E#d!Bndk@WICzlD5jm|w$o}nq{VD9 zs|CLaAl;h)8&s4MXjEJ{C84LPMwFc-UGU(46xl6OYVg&lRI6tjV7TS0H6?h7Q~AV2 zBa&nSV*0+wR7(ta%ApWtI#WtQPS&-$Y@ishSI`B(<}HV!h>D852kbcYvAHI}#!dZf z2WB%rZYj=8i@@5U2z6!vV0>nZiSYZq;^O1M+4(zj3DME8p_{OLm~9~pg}@@3`%XN4 z_Hlk%47H7czs{>`QD{>-FFxyLn{&7G> z=N8fy@QPZI)VuKtesu(%NSUd8y0juJFgVy=M2fAWL--^`r4@)FNy^RkppS#e31=#S z!m>yvm!Wv((#9oaoGq?80OS-UXyiqpC85t}i}EV^*l|f>Xfml)waBV4uhCS8k*YPV zm1#SsV&HNw#inKgsKL-eLdGJ$HO~=^bKr@sm#GkfN~Kd2u;l~`W%EU}M-I;KOI*L5 zC!u{cy;TQGShZOtKy#Qj7>1NvHLgiFaERy=7`Q)KL>!lpDm%3y82f5@$)+>t5@;L= zd})&78hrBD2HeQST*#1*Py_nvOG_+3u324m~ zSXo*zG-{QLk@o{0nx0Hx#GnK8k)_emLts*Hm&OVN-=USt_QBPsh>bd0&_mWKTGIF}{N zvteTWk>qmRt30`UYVEL6r~b6w>Z~lT?&)DPHXAF;XChl%GLBTtl_wU_cWcg)=aEz$ zNz;W}ghH%?^y1rR+&RgO5zU0B25&8&O?G+8K&0Zl6~yC&xF?32cG9{EmjuYtXwT-<)D z0EW#dM|^5@I}}SG7O{7Mn&RqOIib;j&TN0-Ym2Va)rjp7B|gR>$3e`2G)V#K!)Rqr4n*{=FyS;Uo!_uyF1AgQ zu^>N6+2?w~ zH$Pwe{PDQ>c>LFsbKT9Q&c($~C+7v%cO9Rdx34XHqZ#oP_la8W5gjq@KMH$Jc)-F| zv~IY+{_e@BxHMv|^q>FYvTYMM5AbBD=5E=L?bAT^^}Xx^wdO_IB@TIJ0{vWe>XH z@9VFU+8*m*K_HM6JF+kts!zCZk*+s@W~4+>vCI8B*L-7M8O=hK6UT1TPVSsL@|UV; zUCbfCvI&FjFm56Xtca($@1?noO>I(?$T2a6mdg2luIOoeqy*$5^))D($zU+@F6^&_8T3I)PCh0i;T$j@wgwPH+`y2DB*XXt{M{?T}-(I z4F{MgSdJGNLSjbiC||qh5>a2~r81y%T`L(C_KDR#OC7sQ_hRa}tVP!d%9tj`S#7H} z7Haw>w!?H3sY^w}#+y$u_hwVM;Xo;BtCslV?2hRO&y=%zhQAH4lI}+Iu>NKq~F|d zEx)LX6WUW0nTsb}lk145>qHc=f*Y2mROyE@o0GLoy{VJN)1XI5k72EUm{G$gHO<>r zs7b3BSmN04CFSh4djnO-tbQ!le}bWJ91RZUwNOR`1w8n5ZWMDrgFxHmE!j@Z_4C~iRgHmB*{H7U`N}w)u zVp=gZ3Drmo!N_}s)KjoacIzWjI)3o?zr%e`H3vt6(g;F!Wv@M40?d>@++XM=>ExdP)cWacVNFT212GiA4`S9-K{DLy>_~c{3 z)eY~C&)WwMr4SPRGLp^9?$BcOs>Slc&`X>uTI;zJThAFoUDw06Hdn02=cO%JjkkQG z-`O5Y%Hi3HULd#Qu*c_V6i1#3Ba|B&SI}TNo<{e zUvWC8^{o>tzbOL899<|K#qwEPMf?yZp^%FV)mnMNg;Vw|9DZ8KbLdgWKI*(pX{@uxe?_=Un^ z3nu*gr+@xm+KB%0PyhVC`AVD9YB+!I9CaiWIgp?Bh$KloU?}XKE`5?3&4=dx|E8za~An13qc;7Yo zA$nYJV;(_SH>J02BAJBCN?SWzSh|6>bwYpPr1>!51{S4rP5M@+hE0J{;Xa57r|I=3 zIO|DsjI?`sw-L~J{~v0f&;JRGzHw$(U#d>=-}e8%_dg~zK-PKLbB!(pr}&9#Uze`@K{V~VT{tSe4XCte`s2C#ePA+Scw?jbnT6vw+4x$r z(C4nkSN(^$==ZmL$5aEt6>MHiSKNujx6^I-vkp+e zCVaTqQWt@>u@O%L&`S>)w6`A+d*0}Bzk4ux?qQX{dsThegwr}e-+JunTN`#0qt*d> z;efE(Pn&(%Iv#!Fe&a#XFV>3RZS6rWwe89Nc&m?;_2laIAl<|+!WT=rt;r~sOyax4{GyhNuhU^ zc6Gn#=E8j~!=1c(gYLLVJQ{h=U9am;4?*kSW_)|BGD1hv|Bk2{p{M>t!m$z7IzZuG z>&;LeQw@So56T&ebs;(oSiS3wY|^pi``Qe}ORwr4R3fw^tCE?y8X;k%GGbGSz}Ekt zS|fNMGnzK~l0UUZhy;i$TZbFd-?d)tg&P-J|*7(`tThA7h(`)Wzz4EM6oWSTo zS?gL={>DAO0oqtft+R>moHT95_b8~>leR8xeG!1@^Q;FV*R`%26gI)#`wsy0XwLej z>(WMEn`6G9xSey<`ZU#29*btbzi@Sf)xg|lhX09a(Ra?7hs0>kg{`T?L+}r(#MT-| zl&c!F_?_nJvZ89?+w3>}S=X(IOy%l\0" | cat +@end example + +A practical reason for doing this would be to get literal filenames in +the output, instead of @samp{-ls}'s backslash-escaped names. (Using +@code{cat} here prevents this happening for the @samp{%p} format +specifier; @pxref{Unusual Characters in File Names}). This format also +outputs a uniform timestamp format. + +As for symlinks, the format above outputs the symlink target on a second +line, following @samp{\n->}. There is nothing following the arrow for +non-symlinks. Another approach, for complete consistency, would be to +@code{-fprintf} the symlinks into a separate file, so they too can be +null-terminated. @end deffn @deffn Action -fprintf file format @@ -1692,6 +1713,7 @@ no output is ever sent to it. * Escapes:: * Format Directives:: * Time Formats:: +* Formatting Flags:: @end menu @node Escapes @@ -1741,13 +1763,9 @@ because many of the fields, even numeric ones, are printed with %s. The format flag @samp{-} does work; it forces left-alignment of the field. -@samp{%%} is a literal percent sign. A @samp{%} character followed by -an unrecognised character (i.e., not a known directive or @code{printf} -field width and precision specifier), is discarded (but the -unrecognised character is printed), and a warning message is printed -to the standard error output (because it was probably a typo). Don't -rely on this behaviour, because other directives may be added in the -future. +@samp{%%} is a literal percent sign. @xref{Reserved and Unknown +Directives}, for a description of how format directives not mentioned +below are handled. A @samp{%} at the end of the format argument causes undefined behaviour since there is no following character. In some locales, it @@ -1761,7 +1779,7 @@ from the novel you are reading. * Location Directives:: * Time Directives:: * Other Directives:: -* Formatting Flags:: +* Reserved and Unknown Directives:: @end menu @node Name Directives @@ -1926,6 +1944,23 @@ File's last modification time in the format specified by @var{k} File's SELinux context, or empty string if the file has no SELinux context. @end table +@node Reserved and Unknown Directives +@subsubsection Reserved and Unknown Directives + +The @samp{%(}, @samp{%@{} and @samp{%[} format directives, with or +without field with and precision specifications, are reserved for +future use. Don't use them and don't rely on current experiment to +predict future behaviour. To print @samp{(}, simply use @samp{(} +rather than @samp{%(}. Likewise for @samp{@{} and @samp{[}. + +Similarly, a @samp{%} character followed by any other unrecognised +character (i.e., not a known directive or @code{printf} field width +and precision specifier), is discarded (but the unrecognised character +is printed), and a warning message is printed to the standard error +output (because it was probably a typo). Don't rely on this +behaviour, because other directives may be added in the future. + + @node Time Formats @subsection Time Formats @@ -2038,7 +2073,7 @@ seconds field includes a fractional part. @end table @node Formatting Flags -@subsubsection Formatting Flags +@subsection Formatting Flags The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0} and @samp{+} flags, but the other directives do not, even if they @@ -2076,14 +2111,15 @@ perform arbitrary actions on the files. Here is how to run a command on one file at a time. @deffn Action -execdir command ; -Execute @var{command}; true if zero status is returned. @code{find} +Execute @var{command}; true if @var{command} returns zero. @code{find} takes all arguments after @samp{-execdir} to be part of the command until an argument consisting of @samp{;} is reached. It replaces the string @samp{@{@}} by the current file name being processed everywhere it occurs in the command. Both of these constructions need to be escaped (with a @samp{\}) or quoted to protect them from expansion by the -shell. The command is executed in the directory in which @code{find} -was run. +shell. The command is executed in the directory which @code{find} +was searching at the time the action was executed (that is, @{@} will +expand to a file in the local directory). For example, to compare each C header file in or below the current directory with the file @file{/tmp/master}: @@ -2122,11 +2158,12 @@ problems surrounding @samp{-exec}. @deffn Action -exec command ; This insecure variant of the @samp{-execdir} action is specified by -POSIX. The main difference is that the command is executed in the -directory from which @code{find} was invoked, meaning that @samp{@{@}} -is expanded to a relative path starting with the name of one of the -starting directories, rather than just the basename of the matched -file. +POSIX. Like @samp{-execdir command ;} it is true if zero is +returned by @var{command}. The main difference is that the command is +executed in the directory from which @code{find} was invoked, meaning +that @samp{@{@}} is expanded to a relative path starting with the name +of one of the starting directories, rather than just the basename of +the matched file. While some implementations of @code{find} replace the @samp{@{@}} only where it appears on its own in an argument, GNU @code{find} replaces @@ -2146,14 +2183,15 @@ The @samp{-execdir} and @samp{-exec} actions have variants that build command lines containing as many matched files as possible. @deffn Action -execdir command @{@} + -This works as for @samp{-execdir command ;}, except that the -@samp{@{@}} at the end of the command is expanded to a list of names -of matching files. This expansion is done in such a way as to avoid -exceeding the maximum command line length available on the system. -Only one @samp{@{@}} is allowed within the command, and it must appear -at the end, immediately before the @samp{+}. A @samp{+} appearing in -any position other than immediately after @samp{@{@}} is not -considered to be special (that is, it does not terminate the command). +This works as for @samp{-execdir command ;}, except that the result is +always true, and the @samp{@{@}} at the end of the command is expanded +to a list of names of matching files. This expansion is done in such +a way as to avoid exceeding the maximum command line length available +on the system. Only one @samp{@{@}} is allowed within the command, +and it must appear at the end, immediately before the @samp{+}. A +@samp{+} appearing in any position other than immediately after +@samp{@{@}} is not considered to be special (that is, it does not +terminate the command). @end deffn @@ -2163,7 +2201,7 @@ POSIX. The main difference is that the command is executed in the directory from which @code{find} was invoked, meaning that @samp{@{@}} is expanded to a relative path starting with the name of one of the starting directories, rather than just the basename of the matched -file. +file. The result is always true. @end deffn Before @code{find} exits, any partially-built command lines are @@ -2179,7 +2217,7 @@ can only be at the end of the command line, and that this might be a problem for some commands (@code{cp} and @code{rsync} for example). However, there is a slightly obscure but powerful workaround for this -problem which takes advantage of the behaviour of @code{sh -c}:- +problem which takes advantage of the behaviour of @code{sh -c}: @example find startpoint -tests @dots{} -exec sh -c 'scp "$@@" remote:/dest' sh @{@} + @@ -2202,7 +2240,7 @@ xargs @r{[}@var{option}@dots{}@r{]} @r{[}@var{command} @r{[}@var{initial-argumen @code{xargs} normally reads arguments from the standard input. These arguments are delimited by blanks (which can be protected with double or single quotes or a backslash) or newlines. It executes the -@var{command} (default is @file{/bin/echo}) one or more times with any +@var{command} (the default is @file{echo}) one or more times with any @var{initial-arguments} followed by arguments read from standard input. Blank lines on the standard input are ignored. If the @samp{-L} option is in use, trailing blanks indicate that @code{xargs} @@ -2399,7 +2437,7 @@ which cannot be used to send arbitrary data to the terminal, and so these are printed as-is. @item %f, %h, %l, %p, %P The output of these directives is quoted if the output is going to a -terminal. The setting of the `LC_CTYPE' environment +terminal. The setting of the @code{LC_CTYPE} environment variable is used to determine which characters need to be quoted. This quoting is performed in the same way as for GNU @code{ls}. This @@ -2527,11 +2565,22 @@ the entire job is done. The same idea can be generalized to as many processors as you have handy. It also generalizes to other resources besides processors. For example, -if xargs is running commands that are waiting for a response from a +if @code{xargs} is running commands that are waiting for a response from a distant network connection, running a few in parallel may reduce the overall latency by overlapping their waiting time. -@code{xargs} also allows you to "turn up" or "turn down" its parallelism +If you are running commands in parallel, you need to think about how +they should arbitrate access to any resources that they share. For +example, if more than one of them tries to print to stdout, the ouptut +will be produced in an indeterminate order (and very likely mixed up) +unless the processes collaborate in some way to prevent this. Using +some kind of locking scheme is one way to prevent such problems. In +general, using a locking scheme will help ensure correct output but +reduce performance. If you don't want to tolerate the performance +difference, simply arrange for each process to produce a separate output +file (or otherwise use separate resources). + +@code{xargs} also allows you to ``turn up'' or ``turn down'' its parallelism in the middle of a run. Suppose you are keeping your four-processor system busy for hours, processing thousands of images using @code{-P 4}. Now, in the middle of the run, you or someone else wants you to reduce @@ -2561,7 +2610,7 @@ the parallelism from 4 to 3). The second @code{kill} will reduce it from 3 to 2. (@code{%4} works in some shells as a shorthand for the process ID of the background job labeled @code{[4]}.) -Similarly, if you started a long xargs job without parallelism, you +Similarly, if you started a long @code{xargs} job without parallelism, you can easily switch it to start running two commands in parallel by sending it a @code{SIGUSR1}. @@ -2620,7 +2669,7 @@ find bills -type f -execdir sort -o '@{@}.sorted' '@{@}' ';' When you use the @samp{-I} option, each line read from the input is buffered internally. This means that there is an upper limit on the -length of input line that xargs will accept when used with the +length of input line that @code{xargs} will accept when used with the @samp{-I} option. To work around this limitation, you can use the @samp{-s} option to increase the amount of buffer space that xargs uses, and you can also use an extra invocation of xargs to ensure that @@ -2661,16 +2710,16 @@ Otherwise, run it, with standard input redirected from The response to the prompt is matched against a pair of regular expressions to determine if it is a yes or no response. These regular -expressions are obtained from the system@footnote{@code{nl_langinfo} items YESEXPR and NOEXPR are used} -if the POSIXLY_CORRECT environment variable is set and the system has -such patterns available. -Otherwise, @code{find}'s message translations are used. -In either case, the LC_MESSAGES environment variable -will determine the regular expressions used to determine if the answer -is affirmative or negative. The interpretation of the regular -expressions themselves will be affected by the environment variables -LC_CTYPE (character classes) and LC_COLLATE (character ranges and -equivalence classes). +expressions are obtained from the system (@code{nl_langinfo} items +YESEXPR and NOEXPR are used) if the @code{POSIXLY_CORRECT} environment +variable is set and the system has such patterns available. Otherwise, +@code{find}'s message translations are used. In either case, the +@code{LC_MESSAGES} environment variable will determine the regular +expressions used to determine if the answer is affirmative or negative. +The interpretation of the regular expressions themselves will be +affected by the environment variables @code{LC_CTYPE} (character +classes) and @code{LC_COLLATE} (character ranges and equivalence +classes). @end deffn @deffn Action -ok command ; @@ -2876,7 +2925,7 @@ entry begins with an offset-differential count byte, which is the additional number of characters of prefix of the preceding entry to use beyond the number that the preceding entry is using of its predecessor. (The counts can be negative.) Following the count is a -null-terminated ASCII remainder---the part of the name that follows +null-terminated ASCII remainder -- the part of the name that follows the shared prefix. If the offset-differential count is larger than can be stored in a @@ -2945,7 +2994,7 @@ database is zero. The second byte is immediately followed by the first database entry. The first entry in the database is not preceded by any differential count or dummy entry. Instead the differential count for the first item is assumed to be zero. -.P + Starting with the second entry (if any) in the database, data is interpreted as for the GNU LOCATE02 format. @@ -3044,6 +3093,70 @@ at all times. Otherwise, newlines may not be correctly handled. @include parse-datetime.texi +@node Configuration +@chapter Configuration + +The findutils source distribution includes a @code{configure} script +which examines the system and generates files required to build +findutils. See the files @file{README} and @file{INSTALL}. + +A number of options can be specified on the @code{configure} command +line, and many of these are straightforward, adequately documented in +the @code{--help} output, or not normally useful. Options which are +useful or which are not obvious are explained here. + +@menu +* Leaf Optimisation:: Take advantage of Unix file system semantics. +* d_type Optimisation:: Take advantage of file type information. +* fts:: A non-recursive file system search. +@end menu + +@node Leaf Optimisation +@section Leaf Optimisation + +Files in Unix file systems have a link count which indicates how many +names point to the same inode. Directories in Unix filssytems have a +@file{..} entry which functions as a hard link to the parent directory +and a @file{.} entry which functions as a link to the directory itself. +The @file{..} entry of the root directory also points to the root. +This means that @code{find} can deduce the number of subdirectories a +directory has, simply by subtracting 2 from the directory's link +count. This allows @file{find} the calls to @code{stat} which would +otherwise be needed to discover which directory entries are +subdirectories. + +File systems which don't have these semantics should simply return a +value less than 2 in the @code{st_nlinks} member of @code{struct stat} +in response to a successful call to @code{stat}. + +If you are building @code{find} for a system on which the value of +@code{st_nlinks} is unreliable, you can specify +@code{--disable-leaf-optimisation} to @code{configure} to prevent this +assumption being made. + +@node d_type Optimisation +@section d_type Optimisation + +When this feature is enabled, @code{find} takes advantage of the fact +that on some systems @code{readdir} will return the type of a file in +@code{struct dirent}. + +@node fts +@section fts + +The findutils source distribution contains two different implementations of +@code{find}. The older implementation descends the file system +recursively, while the newer one uses @code{fts}. Both are normally +installed. + +If the option @code{--without-fts} was passed to @code{configure}, the +recursive implementation is installed as @code{find} and the fts-based +implementation is installed as @code{ftsfind}. Otherwise, the +fts-based implementation is installed as @code{find} and the recursive +implementation is installed as @code{oldfind}. + + + @node Reference @chapter Reference @@ -3145,9 +3258,9 @@ circumstances, @code{find} may issue a warning message. By default, warnings are enabled only if @code{find} is being run interactively (specifically, if the standard input is a terminal) and -the POSIXLY_CORRECT environment variable is not set. Warning messages -can be controlled explicitly by the use of options on the command -line: +the @code{POSIXLY_CORRECT} environment variable is not set. Warning +messages can be controlled explicitly by the use of options on the +command line: @table @code @item -warn @@ -3454,16 +3567,6 @@ that ``exports'' configurations for variable definitions and uses another shell script that ``sources'' the configuration file into the environment and then executes @code{updatedb} in the environment. -@code{updatedb} creates and updates the database of file names used by -@code{locate}. @code{updatedb} generates a list of files similar to -the output of @code{find} and then uses utilities for optimizing the -database for performance. @code{updatedb} is often run periodically -as a @code{cron} job and configured with environment variables or -command options. Typically, operating systems have a shell script -that ``exports'' configurations for variable definitions and uses -another shell script that ``sources'' the configuration file into the -environment and then executes @code{updatedb} in the environment. - @table @code @item --findoptions='@var{OPTION}@dots{}' Global options to pass on to @code{find}. @@ -3593,26 +3696,32 @@ file string, which is treated like any other argument. Input file names are terminated by the specified character @var{delim} instead of by whitespace, and any quotes and backslash characters are not considered special (every character is taken literally). Disables -the end of file string, which is treated like any other argument. +the logical end of file marker string, which is treated like any other +argument. The specified delimiter may be a single character, a C-style character escape such as @samp{\n}, or an octal or hexadecimal escape code. Octal and hexadecimal escape codes are understood as for the @code{printf} command. Multibyte characters are not supported. - @item -E @var{eof-str} @itemx --eof@r{[}=@var{eof-str}@r{]} @itemx -e@r{[}@var{eof-str}@r{]} -Set the end of file string to @var{eof-str}. If the end of file -string occurs as a line of input, the rest of the input is ignored. -If @var{eof-str} is omitted (@samp{-e}) or blank (either @samp{-e} or -@samp{-E}), there is no end of file string. The @samp{-e} form of -this option is deprecated in favour of the POSIX-compliant @samp{-E} -option, which you should use instead. As of GNU xargs version 4.2.9, -the default behaviour of xargs is not to have a logical end-of-file -marker. The POSIX standard (IEEE Std 1003.1, 2004 Edition) allows -this. + +Set the logical end of file marker string to @var{eof-str}. If the +logical end of file marker string occurs as a line of input, the rest of +the input is ignored. If @var{eof-str} is omitted (@samp{-e}) or blank +(either @samp{-e} or @samp{-E}), there is no logical end of file marker +string. The @samp{-e} form of this option is deprecated in favour of +the POSIX-compliant @samp{-E} option, which you should use instead. As +of GNU @code{xargs} version 4.2.9, the default behaviour of @code{xargs} +is not to have a logical end of file marker string. The POSIX standard +(IEEE Std 1003.1, 2004 Edition) allows this. + +The logical end of file marker string is not treated specially if the +@samp{-d} or the @samp{-0} options are in effect. That is, when either +of these options are in effect, the whole input file will be read even +if @samp{-E} was used. @item --help Print a summary of the options to @code{xargs} and exit. @@ -3689,6 +3798,12 @@ Exit if the size (see the @samp{-s} option) is exceeded. Run simultaneously up to @var{max-procs} processes at once; the default is 1. If @var{max-procs} is 0, @code{xargs} will run as many processes as possible simultaneously. + +@item --process-slot-var=@var{environment-variable-name} +Set the environment variable @var{environment-variable-name} to a +unique value in each running child process. Each value is a decimal +integer. Values are reused once child processes exit. This can be +used in a rudimentary load distribution scheme, for example. @end table @node Invoking the shell from xargs @@ -3729,12 +3844,12 @@ find /foo -maxdepth 1 -atime +366 -print0 | xargs -r0 sh -c 'mv "$@@" /archive' move @end example -Here, a shell is being invoked. There are two shell instances to -think about. The first is the shell which launches the xargs command +Here, a shell is being invoked. There are two shell instances to think +about. The first is the shell which launches the @code{xargs} command (this might be the shell into which you are typing, for example). The second is the shell launched by @code{xargs} (in fact it will probably -launch several, one after the other, depending on how many files need -to be archived). We'll refer to this second shell as a subshell. +launch several, one after the other, depending on how many files need to +be archived). We'll refer to this second shell as a subshell. Our example uses the @code{-c} option of @code{sh}. Its argument is a shell command to be executed by the subshell. Along with the rest of @@ -3808,23 +3923,26 @@ should be one of the following: @node Environment Variables @section Environment Variables -@table @var +@c TODO: check the variable index still contains references to these +@table @code @item LANG Provides a default value for the internationalisation variables that are unset or null. + @item LC_ALL If set to a non-empty string value, override the values of all the other internationalisation variables. + @item LC_COLLATE The POSIX standard specifies that this variable affects the pattern matching to be used for the `\-name' option. GNU find uses the GNU version of the @code{fnmatch} library function. -This variable also affects the interpretation of -the response to @code{-ok}; while the LC_MESSAGES variable selects the -actual pattern used to interpret the response to @code{-ok}, -the interpretation of any bracket expressions in the pattern will be -affected by the LC_COLLATE variable. +This variable also affects the interpretation of the response to +@code{-ok}; while the @code{LC_MESSAGES} variable selects the actual +pattern used to interpret the response to @code{-ok}, the interpretation +of any bracket expressions in the pattern will be affected by the +@code{LC_COLLATE} variable. @item LC_CTYPE This variable affects the treatment of character classes used in @@ -3833,7 +3951,7 @@ the @samp{-name} test, if the @code{fnmatch} function supports this. This variable also affects the interpretation of any character classes in the regular expressions used to interpret the response to the -prompt issued by @code{-ok}. The LC_CTYPE environment variable will +prompt issued by @code{-ok}. The @code{LC_CTYPE} environment variable will also affect which characters are considered to be unprintable when filenames are printed (@pxref{Unusual Characters in File Names}). @@ -3844,6 +3962,7 @@ including the interpretation of the response to the prompt made by the @item NLSPATH Determines the location of the internationalisation message catalogues. + @item PATH Affects the directories which are searched to find the executables invoked by @samp{-exec}, @samp{-execdir} @samp{-ok} and @samp{-okdir}. @@ -3854,8 +3973,8 @@ the find command line includes @samp{-execdir} or @samp{-okdir}, more detailed discussion of security matters. @item POSIXLY_CORRECT -Determines the block size used by @samp{-ls} and @samp{-fls}. -If @var{POSIXLY_CORRECT} is set, blocks are units of 512 bytes. Otherwise +Determines the block size used by @samp{-ls} and @samp{-fls}. If +@code{POSIXLY_CORRECT} is set, blocks are units of 512 bytes. Otherwise they are units of 1024 bytes. Setting this variable also turns off warning messages (that is, implies @@ -3863,11 +3982,7 @@ Setting this variable also turns off warning messages (that is, implies the output for @samp{-ok}, all messages printed on stderr are diagnostics and must result in a non-zero exit status. -Arguments to @samp{-perm} beginning with @samp{+} are treated -differently when POSIXLY_CORRECT is set. See -@ref{Mode Bits,-perm,File Mode Bits}. - -When POSIXLY_CORRECT is set, the response to the prompt made by the +When @code{POSIXLY_CORRECT} is set, the response to the prompt made by the @code{-ok} action is interpreted according to the system's message catalogue, as opposed to according to @code{find}'s own message translations. @@ -3916,8 +4031,8 @@ emacs `find /usr/include -name '*.h' | xargs grep -l mode_t` @end example Because there is a limit to the length of any individual command line, -there is a limit to the number of files that can be handled in this -way. We can get around this difficulty by using xargs like this: +there is a limit to the number of files that can be handled in this way. +We can get around this difficulty by using @code{xargs} like this: @example find /usr/include -name '*.h' | xargs grep -l mode_t > todo @@ -3948,7 +4063,7 @@ nothing). The capitalised @samp{Emacs} on the command line is used as You can pass a list of files produced by @code{find} to a file archiving program. GNU @code{tar} and @code{cpio} can both read lists -of file names from the standard input---either delimited by nulls (the +of file names from the standard input -- either delimited by nulls (the safe way) or by blanks (the lazy, risky default way). To use null-delimited names, give them the @samp{--null} option. You can store a file archive in a file, write it on a tape, or send it over a @@ -4267,7 +4382,7 @@ there are lots of files to delete. Since the task is to delete unwanted files, this is precisely the time we don't want things to go wrong. -@subsection Making Use of xargs +@subsection Making Use of @code{xargs} So, is there a way to be more efficient in the use of @code{fork()} and @code{exec()} without running up against this limit? @@ -4306,7 +4421,7 @@ the exception of the ASCII NUL character and the slash. Slashes can occur in path names (as the directory separator) but not in the names of actual directory entries. This means that the list of files that @code{xargs} reads could in fact contain white space -characters --- spaces, tabs and newline characters. Since by default, +characters -- spaces, tabs and newline characters. Since by default, @code{xargs} assumes that the list of files it is reading uses white space as an argument separator, it cannot correctly handle the case where a filename actually includes white space. This makes the @@ -4340,7 +4455,7 @@ this is not a portable construct; although other versions of Unix (notably BSD-derived ones) support @samp{-print0}, it's not universal. So, is there a more universal mechanism? -@subsection Going back to -exec +@subsection Going back to @code{-exec} There is indeed a more universal mechanism, which is a slight modification to the @samp{-exec} action. The normal @samp{-exec} @@ -4365,7 +4480,7 @@ until version 4.2.12; one of the reasons for this is that it already had the @samp{-print0} action in any case. -@subsection A more secure version of -exec +@subsection A more secure version of @code{-exec} The command above seems to be efficient and portable. However, within it lurks a security problem. The problem is shared with @@ -4377,7 +4492,7 @@ command to cause the deletion of a file that you can delete but they normally cannot. The problem occurs because the @samp{-exec} action is defined by the -@acronym{POSIX} standard to invoke its command with the same working directory +POSIX standard to invoke its command with the same working directory as @code{find} had when it was started. This means that the arguments which replace the @{@} include a relative path from @code{find}'s starting point down the file that needs to be deleted. For example, @@ -4445,7 +4560,7 @@ Is it possible to do any better? In the case of general file processing, no. However, in the specific case of deleting files it is indeed possible to do better. -@subsection Using the -delete action +@subsection Using the @code{-delete} action The most efficient and secure method of solving this problem is to use the @samp{-delete} action: @@ -4602,7 +4717,7 @@ different ways to do it. @subsection Updating the Timestamp The Wrong Way -The obvious but wrong answer is just to use @samp{-newer}:- +The obvious but wrong answer is just to use @samp{-newer}: @smallexample find subdir -newer timestamp -exec touch -r @{@} timestamp \; @@ -4653,7 +4768,7 @@ updated timestamp. This is indeed faster in general, but the speed difference will depend on how many updated files there are. -@subsection Using -printf and sort to compare timestamps +@subsection Using @code{-printf} and @code{sort} to compare timestamps It is possible to use the @samp{-printf} action to abandon the use of @code{test} entirely: @@ -4684,7 +4799,7 @@ Findutils version 4.3.3 and later will print a fractional part with %A@@, but older versions will not. -@subsection Solving the problem with make +@subsection Solving the problem with @code{make} Another tool which often works with timestamps is @code{make}. We can use @code{find} to generate a @file{Makefile} file on the fly and then @@ -4722,7 +4837,7 @@ The first @code{find} command generates a list of files which are newer than the original timestamp file, and prints a list of them with their timestamps. The @file{newest.pl} script simply filters out all the filenames which have timestamps which are older than whatever the -newest file is:- +newest file is: @smallexample @verbatim @@ -4878,7 +4993,7 @@ informative but not comprehensive or exhaustive. If you are responsible for the operation of a system where the consequences of a security problem could be very important, you should -do two things:- +do two things: @enumerate @item Define a security policy which defines who is allowed to do what @@ -4940,7 +5055,7 @@ filesystem which would not normally be included in the search @end menu @node Problems with -exec and filenames -@subsection Problems with -exec and filenames +@subsection Problems with @code{-exec} and filenames It is safe in many cases to use the @samp{-execdir} action with any file name. Because @samp{-execdir} prefixes the arguments it passes @@ -5011,14 +5126,14 @@ of problem. The exact form of these safeguards depends on the properties of your system. @menu -* O_NOFOLLOW:: Safely changing directory using fchdir(). -* Systems without O_NOFOLLOW:: Checking for symbolic links after chdir(). +* O_NOFOLLOW:: Safely changing directory using @code{fchdir}. +* Systems without O_NOFOLLOW:: Checking for symbolic links after @code{chdir}. @end menu @node O_NOFOLLOW -@subsubsection O_NOFOLLOW +@subsubsection @code{O_NOFOLLOW} -If your system supports the O_NOFOLLOW flag @footnote{GNU/Linux +If your system supports the @code{O_NOFOLLOW} flag @footnote{GNU/Linux (kernel version 2.1.126 and later) and FreeBSD (3.0-CURRENT and later) support this} to the @code{open(2)} system call, @code{find} uses it to safely change directories. The target directory is first opened @@ -5028,10 +5143,10 @@ followed, preventing the sort of race condition attack in which use is made of symbolic links. If for any reason this approach does not work, @code{find} will fall -back on the method which is normally used if O_NOFOLLOW is not +back on the method which is normally used if @code{O_NOFOLLOW} is not supported. -You can tell if your system supports O_NOFOLLOW by running +You can tell if your system supports @code{O_NOFOLLOW} by running @example find --version @@ -5040,26 +5155,32 @@ find --version This will tell you the version number and which features are enabled. For example, if I run this on my system now, this gives: @example -GNU find version 4.2.18-CVS -Features enabled: D_TYPE O_NOFOLLOW(enabled) +find (GNU findutils) 4.5.11-git +Copyright (C) 2012 Free Software Foundation, Inc. +License GPLv3+: GNU GPL version 3 or later . +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by Eric B. Decker, James Youngman, and Kevin Dalley. +Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD) CBO(level=2) @end example Here, you can see that I am running a version of @code{find} which was -built from the development (CVS) code prior to the release of -findutils-4.2.18, and that the D_TYPE and O_NOFOLLOW features are -present. O_NOFOLLOW is qualified with ``enabled''. This simply means -that the current system seems to support O_NOFOLLOW. This check is +built from the development (git) code prior to the release of +findutils-4.5.12, and that several features including @code{O_NOFOLLOW} are +present. @code{O_NOFOLLOW} is qualified with ``enabled''. This simply means +that the current system seems to support @code{O_NOFOLLOW}. This check is needed because it is possible to build @code{find} on a system that -defines O_NOFOLLOW and then run it on a system that ignores the -O_NOFOLLOW flag. We try to detect such cases at startup by checking +defines @code{O_NOFOLLOW} and then run it on a system that ignores the +@code{O_NOFOLLOW} flag. We try to detect such cases at startup by checking the operating system and version number; when this happens you will -see ``O_NOFOLLOW(disabled)'' instead. +see @samp{O_NOFOLLOW(disabled)} instead. @node Systems without O_NOFOLLOW -@subsubsection Systems without O_NOFOLLOW +@subsubsection Systems without @code{O_NOFOLLOW} The strategy for preventing this type of problem on systems that lack -support for the O_NOFOLLOW flag is more complex. Each time +support for the @code{O_NOFOLLOW} flag is more complex. Each time @code{find} changes directory, it examines the directory it is about to move to, issues the @code{chdir()} system call, and then checks that it has ended up in the subdirectory it expected. If all is as @@ -5071,7 +5192,7 @@ else while @code{find} is trying to descend into it. Where a filesystem ``automounter'' is in use it can be the case that the use of the @code{chdir()} system call can itself cause a new filesystem to be mounted at that point. On systems that do not -support O_NOFOLLOW, this will cause @code{find}'s security check to +support @code{O_NOFOLLOW}, this will cause @code{find}'s security check to fail. However, this does not normally represent a security problem, since @@ -5097,7 +5218,7 @@ original parent. No operations would have been performed within that directory. @node Race Conditions with -exec -@subsection Race Conditions with -exec +@subsection Race Conditions with @code{-exec} The @samp{-exec} action causes another program to be run. It passes to the program the name of the file which is being considered at the @@ -5151,7 +5272,7 @@ might be writable by untrusted users. For similar reasons, the command to be run. @node Race Conditions with -print and -print0 -@subsection Race Conditions with -print and -print0 +@subsection Race Conditions with @code{-print} and @code{-print0} The @samp{-print} and @samp{-print0} actions can be used to produce a list of files matching some criteria, which can then be used with some @@ -5380,10 +5501,10 @@ This usually happens if you have an extra bracket on the command line These messages might appear when @code{find} moves into a directory and finds that the device number and inode are different from what it expected them to be. If the directory @code{find} has moved into is -on an network filesystem (NFS), it will not issue this message, because +on a network filesystem (NFS), it will not issue this message, because @code{automount} frequently mounts new filesystems on directories as you move into them (that is how it knows you want to use the -filesystem). So, if you do see this message, be wary --- +filesystem). So, if you do see this message, be wary -- @code{automount} may not have been responsible. Consider the possibility that someone else is manipulating the filesystem while @code{find} is running. Some people might do this in order to mislead @@ -5445,7 +5566,7 @@ with a fatal signal. This is just an advisory message. @node Error Messages From xargs -@section Error Messages From xargs +@section Error Messages From @code{xargs} @table @samp @item environment is too large for exec @@ -5458,15 +5579,22 @@ Please try unsetting some environment variables, or exiting the current shell. You can also use @samp{xargs --show-limits} to understand the relevant sizes. -@item can not fit single argument within argument list size limit +@item argument list too long You are using the @samp{-I} option and @code{xargs} doesn't have enough space to build a command line because it has read a really -large item and it doesn't fit. You can probably work around this +large item and it doesn't fit. You may be able to work around this problem with the @samp{-s} option, but the default size is pretty large. This is a rare situation and is more likely an attempt to test the limits of @code{xargs}, or break it. Otherwise, you will need to try to shorten the problematic argument or not use @code{xargs}. +@item argument line too long +You are using the @samp{-L} or @samp{-l} option and one of the input +lines is too long. You may be able to work around this problem with +the @samp{-s} option, but the default size is pretty large. If you +can modify the your @code{xargs} command not to use @samp{-L} or +@samp{-l}, that will be more likely to result in success. + @item cannot fork See the description of the similar message for @code{find}. @@ -5512,7 +5640,7 @@ these programs should interoperate without problem. Ask for help on @node Error Messages From updatedb -@section Error Messages From updatedb +@section Error Messages From @code{updatedb} The @code{updatedb} program (and the programs it invokes) do issue error messages, but none seem to be candidates for guidance. If @@ -5557,7 +5685,7 @@ Expressions}, for more information on expressions. @comment LocalWords: POSIXLY fls fprintf strftime locale's EDT GMT AP @comment LocalWords: EST diff perl backquotes sprintf Falstad Oct cron @comment LocalWords: eg vmunix mkdir afs allexec allwrite ARG bigram -@comment LocalWords: bigrams cd chmod comp crc CVS dbfile dum eof +@comment LocalWords: bigrams cd chmod comp crc CVS dbfile eof @comment LocalWords: fileserver filesystem fn frcode Ghazi Hnewc iXX @comment LocalWords: joeuser Kaveh localpaths localuser LOGNAME @comment LocalWords: Meyering mv netpaths netuser nonblank nonblanks diff --git a/doc/mdate-sh b/doc/mdate-sh index 683d007..7072ea9 100755 --- a/doc/mdate-sh +++ b/doc/mdate-sh @@ -3,8 +3,7 @@ scriptversion=2010-08-21.06; # UTC -# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright (C) 1995-2013 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify @@ -40,7 +39,7 @@ fi case $1 in '') - echo "$0: No file. Try \`$0 --help' for more information." 1>&2 + echo "$0: No file. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -76,7 +75,7 @@ LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE -# variable. Since we cannot assume `unset' works, revert this +# variable. Since we cannot assume 'unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso @@ -96,14 +95,14 @@ if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi -# A `ls -l' line looks as follows on OS/2. +# A 'ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a -# user named `Jan', or `Feb', etc. However, it's unlikely that `/' +# user named "Jan", or "Feb", etc. However, it's unlikely that '/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. @@ -116,7 +115,7 @@ month= command= until test $month do - test $# -gt 0 || error "failed parsing \`$ls_command /' output" + test $# -gt 0 || error "failed parsing '$ls_command /' output" shift # Add another shift to the command. command="$command shift;" @@ -136,7 +135,7 @@ do esac done -test -n "$month" || error "failed parsing \`$ls_command /' output" +test -n "$month" || error "failed parsing '$ls_command /' output" # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\\\$save_arg1\""` diff --git a/doc/parse-datetime.texi b/doc/parse-datetime.texi index 2f1ab34..7fa3c9e 100644 --- a/doc/parse-datetime.texi +++ b/doc/parse-datetime.texi @@ -1,6 +1,6 @@ @c GNU date syntax documentation -@c Copyright (C) 1994-2006, 2009-2011 Free Software Foundation, Inc. +@c Copyright (C) 1994-2006, 2009-2014 Free Software Foundation, Inc. @c Permission is granted to copy, distribute and/or modify this document @c under the terms of the GNU Free Documentation License, Version 1.3 or @@ -38,10 +38,10 @@ demanded a knowledge of five different languages. It is no wonder then that we often look into our own immediate past or future, last Tuesday or a week from Sunday, with feelings of helpless confusion. @dots{} ---- Robert Grudin, @cite{Time and the Art of Living}. +---Robert Grudin, @cite{Time and the Art of Living}. @end quotation -This section describes the textual date representations that @sc{gnu} +This section describes the textual date representations that GNU programs accept. These are the strings you, as a user, can supply as arguments to the various programs. The C interface (via the @code{parse_datetime} function) is not described here. @@ -50,7 +50,8 @@ arguments to the various programs. The C interface (via the * General date syntax:: Common rules. * Calendar date items:: 19 Dec 1994. * Time of day items:: 9:20pm. -* Time zone items:: @sc{est}, @sc{pdt}, @sc{gmt}. +* Time zone items:: EST, PDT, UTC, @dots{} +* Combined date and time of day items:: 1972-09-24T20:02:00,000000-0500. * Day of week items:: Monday and others. * Relative items in date strings:: next tuesday, 2 years ago. * Pure numbers in date strings:: 19931219, 1440. @@ -76,6 +77,7 @@ many flavors of items: @item calendar date items @item time of day items @item time zone items +@item combined date and time of day items @item day of the week items @item relative items @item pure numbers. @@ -115,10 +117,10 @@ abbreviations like @samp{AM}, @samp{DST}, @samp{EST}, @samp{first}, The output of the @command{date} command is not always acceptable as a date string, not only because of the language problem, but also because there is no -standard meaning for time zone items like @samp{IST}. When using +standard meaning for time zone items like @samp{IST}@. When using @command{date} to generate a date string intended to be parsed later, specify a date format that is independent of language and that does not -use time zone items other than @samp{UTC} and @samp{Z}. Here are some +use time zone items other than @samp{UTC} and @samp{Z}@. Here are some ways to do this: @example @@ -126,8 +128,8 @@ $ LC_ALL=C TZ=UTC0 date Mon Mar 1 00:21:42 UTC 2004 $ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ' 2004-03-01 00:21:42Z -$ date --iso-8601=ns | tr T ' ' # --iso-8601 is a GNU extension. -2004-02-29 16:21:42,692722128-0800 +$ date --rfc-3339=ns # --rfc-3339 is a GNU extension. +2004-02-29 16:21:42.692722128-08:00 $ date --rfc-2822 # a GNU extension Sun, 29 Feb 2004 16:21:42 -0800 $ date +'%Y-%m-%d %H:%M:%S %z' # %z is a GNU extension. @@ -143,6 +145,7 @@ between round parentheses, as long as included parentheses are properly nested. Hyphens not followed by a digit are currently ignored. Leading zeros on numbers are ignored. +@cindex leap seconds Invalid dates like @samp{2005-02-29} or times like @samp{24:00} are rejected. In the typical case of a host that does not support leap seconds, a time like @samp{23:59:60} is rejected even if it @@ -159,7 +162,7 @@ specified differently, depending on whether the month is specified numerically or literally. All these strings specify the same calendar date: @example -1972-09-24 # @sc{iso} 8601. +1972-09-24 # ISO 8601. 72-9-24 # Assume 19xx for 69 through 99, # 20xx for 00 through 68. 72-09-24 # Leading zeros are ignored. @@ -182,9 +185,9 @@ sep 24 Here are the rules. -@cindex @sc{iso} 8601 date format -@cindex date format, @sc{iso} 8601 -For numeric months, the @sc{iso} 8601 format +@cindex ISO 8601 date format +@cindex date format, ISO 8601 +For numeric months, the ISO 8601 format @samp{@var{year}-@var{month}-@var{day}} is allowed, where @var{year} is any positive number, @var{month} is a number between 01 and 12, and @var{day} is a number between 01 and 31. A leading zero must be present @@ -232,9 +235,10 @@ day. Here are some examples, all of which represent the same time: 20:02:00.000000 20:02 8:02pm -20:02-0500 # In @sc{est} (U.S. Eastern Standard Time). +20:02-0500 # In EST (U.S. Eastern Standard Time). @end example +@cindex leap seconds More generally, the time of day may be given as @samp{@var{hour}:@var{minute}:@var{second}}, where @var{hour} is a number between 0 and 23, @var{minute} is a number between 0 and @@ -270,10 +274,10 @@ the one- or two-digit correction is interpreted as a number of hours. You can also separate @var{hh} from @var{mm} with a colon. When a time zone correction is given this way, it forces interpretation of the time relative to -Coordinated Universal Time (@sc{utc}), overriding any previous +Coordinated Universal Time (UTC), overriding any previous specification for the time zone or the local time zone. For example, @samp{+0530} and @samp{+05:30} both stand for the time zone 5.5 hours -ahead of @sc{utc} (e.g., India). +ahead of UTC (e.g., India). This is the best way to specify a time zone correction by fractional parts of an hour. The maximum zone correction is 24 hours. @@ -311,6 +315,32 @@ time stamps are interpreted using the rules of the default time zone (@pxref{Specifying time zone rules}). +@node Combined date and time of day items +@section Combined date and time of day items + +@cindex combined date and time of day item +@cindex ISO 8601 date and time of day format +@cindex date and time of day format, ISO 8601 + +The ISO 8601 date and time of day extended format consists of an ISO +8601 date, a @samp{T} character separator, and an ISO 8601 time of +day. This format is also recognized if the @samp{T} is replaced by a +space. + +In this format, the time of day should use 24-hour notation. +Fractional seconds are allowed, with either comma or period preceding +the fraction. ISO 8601 fractional minutes and hours are not +supported. Typically, hosts support nanosecond timestamp resolution; +excess precision is silently discarded. + +Here are some examples: + +@example +2012-09-24T20:02:00.052-0500 +2012-12-31T23:59:59,999999999+1100 +1970-01-01 00:00Z +@end example + @node Day of week items @section Day of week items @@ -455,28 +485,29 @@ supported by the internal representation is truncated toward minus infinity. Such a number cannot be combined with any other date item, as it specifies a complete time stamp. -@cindex beginning of time, for @acronym{POSIX} -@cindex epoch, for @acronym{POSIX} +@cindex beginning of time, for POSIX +@cindex epoch, for POSIX Internally, computer times are represented as a count of seconds since -an epoch---a well-defined point of time. On @acronym{GNU} and -@acronym{POSIX} systems, the epoch is 1970-01-01 00:00:00 @sc{utc}, so +an epoch---a well-defined point of time. On GNU and +POSIX systems, the epoch is 1970-01-01 00:00:00 UTC, so @samp{@@0} represents this time, @samp{@@1} represents 1970-01-01 -00:00:01 @sc{utc}, and so forth. @acronym{GNU} and most other -@acronym{POSIX}-compliant systems support such times as an extension -to @acronym{POSIX}, using negative counts, so that @samp{@@-1} -represents 1969-12-31 23:59:59 @sc{utc}. +00:00:01 UTC, and so forth. GNU and most other +POSIX-compliant systems support such times as an extension +to POSIX, using negative counts, so that @samp{@@-1} +represents 1969-12-31 23:59:59 UTC. Traditional Unix systems count seconds with 32-bit two's-complement integers and can represent times from 1901-12-13 20:45:52 through -2038-01-19 03:14:07 @sc{utc}. More modern systems use 64-bit counts +2038-01-19 03:14:07 UTC@. More modern systems use 64-bit counts of seconds with nanosecond subcounts, and can represent all the times in the known lifetime of the universe to a resolution of 1 nanosecond. +@cindex leap seconds On most hosts, these counts ignore the presence of leap seconds. For example, on most hosts @samp{@@915148799} represents 1998-12-31 -23:59:59 @sc{utc}, @samp{@@915148800} represents 1999-01-01 00:00:00 -@sc{utc}, and there is no way to represent the intervening leap second -1998-12-31 23:59:60 @sc{utc}. +23:59:59 UTC, @samp{@@915148800} represents 1999-01-01 00:00:00 +UTC, and there is no way to represent the intervening leap second +1998-12-31 23:59:60 UTC. @node Specifying time zone rules @section Specifying time zone rules @@ -491,7 +522,7 @@ two quote characters (@samp{"}) must be present in the date, and any quotes or backslashes within @var{rule} must be escaped by a backslash. -For example, with the @acronym{GNU} @command{date} command you can +For example, with the GNU @command{date} command you can answer the question ``What time is it in New York when a Paris clock shows 6:30am on October 31, 2004?'' by using a date beginning with @samp{TZ="Europe/Paris"} as shown in the following shell transcript: @@ -515,16 +546,16 @@ A @env{TZ} value is a rule that typically names a location in the @uref{http://www.twinsun.com/tz/tz-link.htm, @samp{tz} database}. A recent catalog of location names appears in the @uref{http://twiki.org/cgi-bin/xtra/tzdate, TWiki Date and Time -Gateway}. A few non-@acronym{GNU} hosts require a colon before a +Gateway}. A few non-GNU hosts require a colon before a location name in a @env{TZ} setting, e.g., @samp{TZ=":America/New_York"}. The @samp{tz} database includes a wide variety of locations ranging from @samp{Arctic/Longyearbyen} to @samp{Antarctica/South_Pole}, but if you are at sea and have your own private time zone, or if you are -using a non-@acronym{GNU} host that does not support the @samp{tz} -database, you may need to use a @acronym{POSIX} rule instead. Simple -@acronym{POSIX} rules like @samp{UTC0} specify a time zone without +using a non-GNU host that does not support the @samp{tz} +database, you may need to use a POSIX rule instead. Simple +POSIX rules like @samp{UTC0} specify a time zone without daylight saving time; other rules can specify simple daylight saving regimes. @xref{TZ Variable,, Specifying the Time Zone with @code{TZ}, libc, The GNU C Library}. @@ -548,7 +579,7 @@ implemented by Steven M. Bellovin at Chapel Hill. The code was later tweaked by a couple of people on Usenet, then completely overhauled by Rich $alz (@email{rsalz@@bbn.com}) and Jim Berets (@email{jberets@@bbn.com}) in August, 1990. Various -revisions for the @sc{gnu} system were made by David MacKenzie, Jim Meyering, +revisions for the GNU system were made by David MacKenzie, Jim Meyering, Paul Eggert and others, including renaming it to @code{get_date} to avoid a conflict with the alternative Posix function @code{getdate}, and a later rename to @code{parse_datetime}. The Posix function @@ -560,4 +591,4 @@ file, and lacks the thread-safety of @code{parse_datetime}. @cindex Berry, K. This chapter was originally produced by Fran@,{c}ois Pinard (@email{pinard@@iro.umontreal.ca}) from the @file{parse_datetime.y} source code, -and then edited by K.@: Berry (@email{kb@@cs.umb.edu}). +and then edited by K. Berry (@email{kb@@cs.umb.edu}). diff --git a/doc/regexprops.texi b/doc/regexprops.texi index e94720f..f49c326 100644 --- a/doc/regexprops.texi +++ b/doc/regexprops.texi @@ -1,5 +1,5 @@ @c Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006, -@c 2007, 2009, 2010 Free Software Foundation, Inc. +@c 2007, 2009, 2010, 2011 Free Software Foundation, Inc. @c @c Permission is granted to copy, distribute and/or modify this document @c under the terms of the GNU Free Documentation License, Version 1.3 or @@ -134,7 +134,7 @@ matches a @samp{?}. @end table -Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} can be used to quote the following character. Character classes are not supported, so for example you would need to use @samp{[0-9]} instead of @samp{[[:digit:]]}. +Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} can be used to quote the following character. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. GNU extensions are not supported and so @samp{\w}, @samp{\W}, @samp{\<}, @samp{\>}, @samp{\b}, @samp{\B}, @samp{\`}, and @samp{\'} match @samp{w}, @samp{W}, @samp{<}, @samp{>}, @samp{b}, @samp{B}, @samp{`}, and @samp{'} respectively. @@ -371,7 +371,7 @@ The characters @samp{^} and @samp{$} always represent the beginning and end of a @end enumerate - +Intervals are specified by @samp{@{} and @samp{@}}. Invalid intervals are treated as literals, for example @samp{a@{1} is treated as @samp{a\@{1} The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. @@ -513,7 +513,7 @@ The characters @samp{^} and @samp{$} always represent the beginning and end of a @end enumerate -Intervals are specified by @samp{@{} and @samp{@}}. Invalid intervals such as @samp{a@{1z} are not accepted. +Intervals are specified by @samp{@{} and @samp{@}}. Invalid intervals are treated as literals, for example @samp{a@{1} is treated as @samp{a\@{1} The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups. diff --git a/doc/stamp-1 b/doc/stamp-1 index be2510b..4f3aae1 100644 --- a/doc/stamp-1 +++ b/doc/stamp-1 @@ -1,4 +1,4 @@ -@set UPDATED 3 April 2011 -@set UPDATED-MONTH April 2011 -@set EDITION 4.5.10 -@set VERSION 4.5.10 +@set UPDATED 19 July 2014 +@set UPDATED-MONTH July 2014 +@set EDITION 4.5.14 +@set VERSION 4.5.14 diff --git a/doc/stamp-vti b/doc/stamp-vti index be2510b..df484f8 100644 --- a/doc/stamp-vti +++ b/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 3 April 2011 -@set UPDATED-MONTH April 2011 -@set EDITION 4.5.10 -@set VERSION 4.5.10 +@set UPDATED 26 October 2013 +@set UPDATED-MONTH October 2013 +@set EDITION 4.5.14 +@set VERSION 4.5.14 diff --git a/doc/texinfo.tex b/doc/texinfo.tex new file mode 100644 index 0000000..cfb5c56 --- /dev/null +++ b/doc/texinfo.tex @@ -0,0 +1,10174 @@ +% texinfo.tex -- TeX macros to handle Texinfo files. +% +% Load plain if necessary, i.e., if running under initex. +\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi +% +\def\texinfoversion{2014-05-05.10} +% +% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. +% +% This texinfo.tex file is free software: you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation, either version 3 of the +% License, or (at your option) any later version. +% +% This texinfo.tex file is distributed in the hope that it will be +% useful, but WITHOUT ANY WARRANTY; without even the implied warranty +% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +% General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this program. If not, see . +% +% As a special exception, when this file is read by TeX when processing +% a Texinfo source document, you may use the result without +% restriction. This Exception is an additional permission under section 7 +% of the GNU General Public License, version 3 ("GPLv3"). +% +% Please try the latest version of texinfo.tex before submitting bug +% reports; you can get the latest version from: +% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or +% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or +% http://www.gnu.org/software/texinfo/ (the Texinfo home page) +% The texinfo.tex in any given distribution could well be out +% of date, so if that's what you're using, please check. +% +% Send bug reports to bug-texinfo@gnu.org. Please include including a +% complete document in each bug report with which we can reproduce the +% problem. Patches are, of course, greatly appreciated. +% +% To process a Texinfo manual with TeX, it's most reliable to use the +% texi2dvi shell script that comes with the distribution. For a simple +% manual foo.texi, however, you can get away with this: +% tex foo.texi +% texindex foo.?? +% tex foo.texi +% tex foo.texi +% dvips foo.dvi -o # or whatever; this makes foo.ps. +% The extra TeX runs get the cross-reference information correct. +% Sometimes one run after texindex suffices, and sometimes you need more +% than two; texi2dvi does it as many times as necessary. +% +% It is possible to adapt texinfo.tex for other languages, to some +% extent. You can get the existing language-specific files from the +% full Texinfo distribution. +% +% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. + + +\message{Loading texinfo [version \texinfoversion]:} + +% If in a .fmt file, print the version number +% and turn on active characters that we couldn't do earlier because +% they might have appeared in the input file name. +\everyjob{\message{[Texinfo version \texinfoversion]}% + \catcode`+=\active \catcode`\_=\active} + +\chardef\other=12 + +% We never want plain's \outer definition of \+ in Texinfo. +% For @tex, we can use \tabalign. +\let\+ = \relax + +% Save some plain tex macros whose names we will redefine. +\let\ptexb=\b +\let\ptexbullet=\bullet +\let\ptexc=\c +\let\ptexcomma=\, +\let\ptexdot=\. +\let\ptexdots=\dots +\let\ptexend=\end +\let\ptexequiv=\equiv +\let\ptexexclam=\! +\let\ptexfootnote=\footnote +\let\ptexgtr=> +\let\ptexhat=^ +\let\ptexi=\i +\let\ptexindent=\indent +\let\ptexinsert=\insert +\let\ptexlbrace=\{ +\let\ptexless=< +\let\ptexnewwrite\newwrite +\let\ptexnoindent=\noindent +\let\ptexplus=+ +\let\ptexraggedright=\raggedright +\let\ptexrbrace=\} +\let\ptexslash=\/ +\let\ptexstar=\* +\let\ptext=\t +\let\ptextop=\top +{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode + +% If this character appears in an error message or help string, it +% starts a new line in the output. +\newlinechar = `^^J + +% Use TeX 3.0's \inputlineno to get the line number, for better error +% messages, but if we're using an old version of TeX, don't do anything. +% +\ifx\inputlineno\thisisundefined + \let\linenumber = \empty % Pre-3.0. +\else + \def\linenumber{l.\the\inputlineno:\space} +\fi + +% Set up fixed words for English if not already set. +\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi +\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putworderror\undefined \gdef\putworderror{error}\fi +\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi +\ifx\putwordin\undefined \gdef\putwordin{in}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi +\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi +\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi +\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi +\ifx\putwordof\undefined \gdef\putwordof{of}\fi +\ifx\putwordon\undefined \gdef\putwordon{on}\fi +\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi +\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi +\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi +\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi +\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi +\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi +\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi +% +\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi +\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi +\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi +\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi +\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi +\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi +\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi +\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi +\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi +\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi +\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi +\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi +% +\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi +\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi +\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi +\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi +\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi + +% Since the category of space is not known, we have to be careful. +\chardef\spacecat = 10 +\def\spaceisspace{\catcode`\ =\spacecat} + +% sometimes characters are active, so we need control sequences. +\chardef\ampChar = `\& +\chardef\colonChar = `\: +\chardef\commaChar = `\, +\chardef\dashChar = `\- +\chardef\dotChar = `\. +\chardef\exclamChar= `\! +\chardef\hashChar = `\# +\chardef\lquoteChar= `\` +\chardef\questChar = `\? +\chardef\rquoteChar= `\' +\chardef\semiChar = `\; +\chardef\slashChar = `\/ +\chardef\underChar = `\_ + +% Ignore a token. +% +\def\gobble#1{} + +% The following is used inside several \edef's. +\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} + +% Hyphenation fixes. +\hyphenation{ + Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script + ap-pen-dix bit-map bit-maps + data-base data-bases eshell fall-ing half-way long-est man-u-script + man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm + par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces + spell-ing spell-ings + stand-alone strong-est time-stamp time-stamps which-ever white-space + wide-spread wrap-around +} + +% Margin to add to right of even pages, to left of odd pages. +\newdimen\bindingoffset +\newdimen\normaloffset +\newdimen\pagewidth \newdimen\pageheight + +% For a final copy, take out the rectangles +% that mark overfull boxes (in case you have decided +% that the text looks ok even though it passes the margin). +% +\def\finalout{\overfullrule=0pt } + +% Sometimes it is convenient to have everything in the transcript file +% and nothing on the terminal. We don't just call \tracingall here, +% since that produces some useless output on the terminal. We also make +% some effort to order the tracing commands to reduce output in the log +% file; cf. trace.sty in LaTeX. +% +\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% +\def\loggingall{% + \tracingstats2 + \tracingpages1 + \tracinglostchars2 % 2 gives us more in etex + \tracingparagraphs1 + \tracingoutput1 + \tracingmacros2 + \tracingrestores1 + \showboxbreadth\maxdimen \showboxdepth\maxdimen + \ifx\eTeXversion\thisisundefined\else % etex gives us more logging + \tracingscantokens1 + \tracingifs1 + \tracinggroups1 + \tracingnesting2 + \tracingassigns1 + \fi + \tracingcommands3 % 3 gives us more in etex + \errorcontextlines16 +}% + +% @errormsg{MSG}. Do the index-like expansions on MSG, but if things +% aren't perfect, it's not the end of the world, being an error message, +% after all. +% +\def\errormsg{\begingroup \indexnofonts \doerrormsg} +\def\doerrormsg#1{\errmessage{#1}} + +% add check for \lastpenalty to plain's definitions. If the last thing +% we did was a \nobreak, we don't want to insert more space. +% +\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount + \removelastskip\penalty-50\smallskip\fi\fi} +\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount + \removelastskip\penalty-100\medskip\fi\fi} +\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount + \removelastskip\penalty-200\bigskip\fi\fi} + +% Do @cropmarks to get crop marks. +% +\newif\ifcropmarks +\let\cropmarks = \cropmarkstrue +% +% Dimensions to add cropmarks at corners. +% Added by P. A. MacKay, 12 Nov. 1986 +% +\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines +\newdimen\cornerlong \cornerlong=1pc +\newdimen\cornerthick \cornerthick=.3pt +\newdimen\topandbottommargin \topandbottommargin=.75in + +% Output a mark which sets \thischapter, \thissection and \thiscolor. +% We dump everything together because we only have one kind of mark. +% This works because we only use \botmark / \topmark, not \firstmark. +% +% A mark contains a subexpression of the \ifcase ... \fi construct. +% \get*marks macros below extract the needed part using \ifcase. +% +% Another complication is to let the user choose whether \thischapter +% (\thissection) refers to the chapter (section) in effect at the top +% of a page, or that at the bottom of a page. The solution is +% described on page 260 of The TeXbook. It involves outputting two +% marks for the sectioning macros, one before the section break, and +% one after. I won't pretend I can describe this better than DEK... +\def\domark{% + \toks0=\expandafter{\lastchapterdefs}% + \toks2=\expandafter{\lastsectiondefs}% + \toks4=\expandafter{\prevchapterdefs}% + \toks6=\expandafter{\prevsectiondefs}% + \toks8=\expandafter{\lastcolordefs}% + \mark{% + \the\toks0 \the\toks2 % 0: top marks (\last...) + \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...) + \noexpand\else \the\toks8 % 2: color marks + }% +} +% \topmark doesn't work for the very first chapter (after the title +% page or the contents), so we use \firstmark there -- this gets us +% the mark with the chapter defs, unless the user sneaks in, e.g., +% @setcolor (or @url, or @link, etc.) between @contents and the very +% first @chapter. +\def\gettopheadingmarks{% + \ifcase0\topmark\fi + \ifx\thischapter\empty \ifcase0\firstmark\fi \fi +} +\def\getbottomheadingmarks{\ifcase1\botmark\fi} +\def\getcolormarks{\ifcase2\topmark\fi} + +% Avoid "undefined control sequence" errors. +\def\lastchapterdefs{} +\def\lastsectiondefs{} +\def\prevchapterdefs{} +\def\prevsectiondefs{} +\def\lastcolordefs{} + +% Main output routine. +\chardef\PAGE = 255 +\output = {\onepageout{\pagecontents\PAGE}} + +\newbox\headlinebox +\newbox\footlinebox + +% \onepageout takes a vbox as an argument. Note that \pagecontents +% does insertions, but you have to call it yourself. +\def\onepageout#1{% + \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi + % + \ifodd\pageno \advance\hoffset by \bindingoffset + \else \advance\hoffset by -\bindingoffset\fi + % + % Do this outside of the \shipout so @code etc. will be expanded in + % the headline as they should be, not taken literally (outputting ''code). + \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} + % + \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi + \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% + % + \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi + \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% + % + {% + % Have to do this stuff outside the \shipout because we want it to + % take effect in \write's, yet the group defined by the \vbox ends + % before the \shipout runs. + % + \indexdummies % don't expand commands in the output. + \normalturnoffactive % \ in index entries must not stay \, e.g., if + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; + % it needs to be + % {\code {{\tt \backslashcurfont }acronym} + \shipout\vbox{% + % Do this early so pdf references go to the beginning of the page. + \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi + % + \ifcropmarks \vbox to \outervsize\bgroup + \hsize = \outerhsize + \vskip-\topandbottommargin + \vtop to0pt{% + \line{\ewtop\hfil\ewtop}% + \nointerlineskip + \line{% + \vbox{\moveleft\cornerthick\nstop}% + \hfill + \vbox{\moveright\cornerthick\nstop}% + }% + \vss}% + \vskip\topandbottommargin + \line\bgroup + \hfil % center the page within the outer (page) hsize. + \ifodd\pageno\hskip\bindingoffset\fi + \vbox\bgroup + \fi + % + \unvbox\headlinebox + \pagebody{#1}% + \ifdim\ht\footlinebox > 0pt + % Only leave this space if the footline is nonempty. + % (We lessened \vsize for it in \oddfootingyyy.) + % The \baselineskip=24pt in plain's \makefootline has no effect. + \vskip 24pt + \unvbox\footlinebox + \fi + % + \ifcropmarks + \egroup % end of \vbox\bgroup + \hfil\egroup % end of (centering) \line\bgroup + \vskip\topandbottommargin plus1fill minus1fill + \boxmaxdepth = \cornerthick + \vbox to0pt{\vss + \line{% + \vbox{\moveleft\cornerthick\nsbot}% + \hfill + \vbox{\moveright\cornerthick\nsbot}% + }% + \nointerlineskip + \line{\ewbot\hfil\ewbot}% + }% + \egroup % \vbox from first cropmarks clause + \fi + }% end of \shipout\vbox + }% end of group with \indexdummies + \advancepageno + \ifnum\outputpenalty>-20000 \else\dosupereject\fi +} + +\newinsert\margin \dimen\margin=\maxdimen + +\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} +{\catcode`\@ =11 +\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi +% marginal hacks, juha@viisa.uucp (Juha Takala) +\ifvoid\margin\else % marginal info is present + \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi +\dimen@=\dp#1\relax \unvbox#1\relax +\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi +\ifr@ggedbottom \kern-\dimen@ \vfil \fi} +} + +% Here are the rules for the cropmarks. Note that they are +% offset so that the space between them is truly \outerhsize or \outervsize +% (P. A. MacKay, 12 November, 1986) +% +\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} +\def\nstop{\vbox + {\hrule height\cornerthick depth\cornerlong width\cornerthick}} +\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} +\def\nsbot{\vbox + {\hrule height\cornerlong depth\cornerthick width\cornerthick}} + +% Parse an argument, then pass it to #1. The argument is the rest of +% the input line (except we remove a trailing comment). #1 should be a +% macro which expects an ordinary undelimited TeX argument. +% +\def\parsearg{\parseargusing{}} +\def\parseargusing#1#2{% + \def\argtorun{#2}% + \begingroup + \obeylines + \spaceisspace + #1% + \parseargline\empty% Insert the \empty token, see \finishparsearg below. +} + +{\obeylines % + \gdef\parseargline#1^^M{% + \endgroup % End of the group started in \parsearg. + \argremovecomment #1\comment\ArgTerm% + }% +} + +% First remove any @comment, then any @c comment. +\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} +\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} + +% Each occurrence of `\^^M' or `\^^M' is replaced by a single space. +% +% \argremovec might leave us with trailing space, e.g., +% @end itemize @c foo +% This space token undergoes the same procedure and is eventually removed +% by \finishparsearg. +% +\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} +\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} +\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% + \def\temp{#3}% + \ifx\temp\empty + % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: + \let\temp\finishparsearg + \else + \let\temp\argcheckspaces + \fi + % Put the space token in: + \temp#1 #3\ArgTerm +} + +% If a _delimited_ argument is enclosed in braces, they get stripped; so +% to get _exactly_ the rest of the line, we had to prevent such situation. +% We prepended an \empty token at the very beginning and we expand it now, +% just before passing the control to \argtorun. +% (Similarly, we have to think about #3 of \argcheckspacesY above: it is +% either the null string, or it ends with \^^M---thus there is no danger +% that a pair of braces would be stripped. +% +% But first, we have to remove the trailing space token. +% +\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} + +% \parseargdef\foo{...} +% is roughly equivalent to +% \def\foo{\parsearg\Xfoo} +% \def\Xfoo#1{...} +% +% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my +% favourite TeX trick. --kasal, 16nov03 + +\def\parseargdef#1{% + \expandafter \doparseargdef \csname\string#1\endcsname #1% +} +\def\doparseargdef#1#2{% + \def#2{\parsearg#1}% + \def#1##1% +} + +% Several utility definitions with active space: +{ + \obeyspaces + \gdef\obeyedspace{ } + + % Make each space character in the input produce a normal interword + % space in the output. Don't allow a line break at this space, as this + % is used only in environments like @example, where each line of input + % should produce a line of output anyway. + % + \gdef\sepspaces{\obeyspaces\let =\tie} + + % If an index command is used in an @example environment, any spaces + % therein should become regular spaces in the raw index file, not the + % expansion of \tie (\leavevmode \penalty \@M \ ). + \gdef\unsepspaces{\let =\space} +} + + +\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} + +% Define the framework for environments in texinfo.tex. It's used like this: +% +% \envdef\foo{...} +% \def\Efoo{...} +% +% It's the responsibility of \envdef to insert \begingroup before the +% actual body; @end closes the group after calling \Efoo. \envdef also +% defines \thisenv, so the current environment is known; @end checks +% whether the environment name matches. The \checkenv macro can also be +% used to check whether the current environment is the one expected. +% +% Non-false conditionals (@iftex, @ifset) don't fit into this, so they +% are not treated as environments; they don't open a group. (The +% implementation of @end takes care not to call \endgroup in this +% special case.) + + +% At run-time, environments start with this: +\def\startenvironment#1{\begingroup\def\thisenv{#1}} +% initialize +\let\thisenv\empty + +% ... but they get defined via ``\envdef\foo{...}'': +\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} +\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} + +% Check whether we're in the right environment: +\def\checkenv#1{% + \def\temp{#1}% + \ifx\thisenv\temp + \else + \badenverr + \fi +} + +% Environment mismatch, #1 expected: +\def\badenverr{% + \errhelp = \EMsimple + \errmessage{This command can appear only \inenvironment\temp, + not \inenvironment\thisenv}% +} +\def\inenvironment#1{% + \ifx#1\empty + outside of any environment% + \else + in environment \expandafter\string#1% + \fi +} + +% @end foo executes the definition of \Efoo. +% But first, it executes a specialized version of \checkenv +% +\parseargdef\end{% + \if 1\csname iscond.#1\endcsname + \else + % The general wording of \badenverr may not be ideal. + \expandafter\checkenv\csname#1\endcsname + \csname E#1\endcsname + \endgroup + \fi +} + +\newhelp\EMsimple{Press RETURN to continue.} + + +% Be sure we're in horizontal mode when doing a tie, since we make space +% equivalent to this in @example-like environments. Otherwise, a space +% at the beginning of a line will start with \penalty -- and +% since \penalty is valid in vertical mode, we'd end up putting the +% penalty on the vertical list instead of in the new paragraph. +{\catcode`@ = 11 + % Avoid using \@M directly, because that causes trouble + % if the definition is written into an index file. + \global\let\tiepenalty = \@M + \gdef\tie{\leavevmode\penalty\tiepenalty\ } +} + +% @: forces normal size whitespace following. +\def\:{\spacefactor=1000 } + +% @* forces a line break. +\def\*{\unskip\hfil\break\hbox{}\ignorespaces} + +% @/ allows a line break. +\let\/=\allowbreak + +% @. is an end-of-sentence period. +\def\.{.\spacefactor=\endofsentencespacefactor\space} + +% @! is an end-of-sentence bang. +\def\!{!\spacefactor=\endofsentencespacefactor\space} + +% @? is an end-of-sentence query. +\def\?{?\spacefactor=\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. +% +\def\onword{on} +\def\offword{off} +% +\parseargdef\frenchspacing{% + \def\temp{#1}% + \ifx\temp\onword \plainfrenchspacing + \else\ifx\temp\offword \plainnonfrenchspacing + \else + \errhelp = \EMsimple + \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% + \fi\fi +} + +% @w prevents a word break. Without the \leavevmode, @w at the +% beginning of a paragraph, when TeX is still in vertical mode, would +% produce a whole line of output instead of starting the paragraph. +\def\w#1{\leavevmode\hbox{#1}} + +% @group ... @end group forces ... to be all on one page, by enclosing +% it in a TeX vbox. We use \vtop instead of \vbox to construct the box +% to keep its height that of a normal line. According to the rules for +% \topskip (p.114 of the TeXbook), the glue inserted is +% max (\topskip - \ht (first item), 0). If that height is large, +% therefore, no glue is inserted, and the space between the headline and +% the text is small, which looks bad. +% +% Another complication is that the group might be very large. This can +% cause the glue on the previous page to be unduly stretched, because it +% does not have much material. In this case, it's better to add an +% explicit \vfill so that the extra space is at the bottom. The +% threshold for doing this is if the group is more than \vfilllimit +% percent of a page (\vfilllimit can be changed inside of @tex). +% +\newbox\groupbox +\def\vfilllimit{0.7} +% +\envdef\group{% + \ifnum\catcode`\^^M=\active \else + \errhelp = \groupinvalidhelp + \errmessage{@group invalid in context where filling is enabled}% + \fi + \startsavinginserts + % + \setbox\groupbox = \vtop\bgroup + % Do @comment since we are called inside an environment such as + % @example, where each end-of-line in the input causes an + % end-of-line in the output. We don't want the end-of-line after + % the `@group' to put extra space in the output. Since @group + % should appear on a line by itself (according to the Texinfo + % manual), we don't worry about eating any user text. + \comment +} +% +% The \vtop produces a box with normal height and large depth; thus, TeX puts +% \baselineskip glue before it, and (when the next line of text is done) +% \lineskip glue after it. Thus, space below is not quite equal to space +% above. But it's pretty close. +\def\Egroup{% + % To get correct interline space between the last line of the group + % and the first line afterwards, we have to propagate \prevdepth. + \endgraf % Not \par, as it may have been set to \lisppar. + \global\dimen1 = \prevdepth + \egroup % End the \vtop. + % \dimen0 is the vertical size of the group's box. + \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox + % \dimen2 is how much space is left on the page (more or less). + \dimen2 = \pageheight \advance\dimen2 by -\pagetotal + % if the group doesn't fit on the current page, and it's a big big + % group, force a page break. + \ifdim \dimen0 > \dimen2 + \ifdim \pagetotal < \vfilllimit\pageheight + \page + \fi + \fi + \box\groupbox + \prevdepth = \dimen1 + \checkinserts +} +% +% TeX puts in an \escapechar (i.e., `@') at the beginning of the help +% message, so this ends up printing `@group can only ...'. +% +\newhelp\groupinvalidhelp{% +group can only be used in environments such as @example,^^J% +where each line of input produces a line of output.} + +% @need space-in-mils +% forces a page break if there is not space-in-mils remaining. + +\newdimen\mil \mil=0.001in + +\parseargdef\need{% + % Ensure vertical mode, so we don't make a big box in the middle of a + % paragraph. + \par + % + % If the @need value is less than one line space, it's useless. + \dimen0 = #1\mil + \dimen2 = \ht\strutbox + \advance\dimen2 by \dp\strutbox + \ifdim\dimen0 > \dimen2 + % + % Do a \strut just to make the height of this box be normal, so the + % normal leading is inserted relative to the preceding line. + % And a page break here is fine. + \vtop to #1\mil{\strut\vfil}% + % + % TeX does not even consider page breaks if a penalty added to the + % main vertical list is 10000 or more. But in order to see if the + % empty box we just added fits on the page, we must make it consider + % page breaks. On the other hand, we don't want to actually break the + % page after the empty box. So we use a penalty of 9999. + % + % There is an extremely small chance that TeX will actually break the + % page at this \penalty, if there are no other feasible breakpoints in + % sight. (If the user is using lots of big @group commands, which + % almost-but-not-quite fill up a page, TeX will have a hard time doing + % good page breaking, for example.) However, I could not construct an + % example where a page broke at this \penalty; if it happens in a real + % document, then we can reconsider our strategy. + \penalty9999 + % + % Back up by the size of the box, whether we did a page break or not. + \kern -#1\mil + % + % Do not allow a page break right after this kern. + \nobreak + \fi +} + +% @br forces paragraph break (and is undocumented). + +\let\br = \par + +% @page forces the start of a new page. +% +\def\page{\par\vfill\supereject} + +% @exdent text.... +% outputs text on separate line in roman font, starting at standard page margin + +% This records the amount of indent in the innermost environment. +% That's how much \exdent should take out. +\newskip\exdentamount + +% This defn is used inside fill environments such as @defun. +\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} + +% This defn is used inside nofill environments such as @example. +\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount + \leftline{\hskip\leftskip{\rm#1}}}} + +% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current +% paragraph. For more general purposes, use the \margin insertion +% class. WHICH is `l' or `r'. Not documented, written for gawk manual. +% +\newskip\inmarginspacing \inmarginspacing=1cm +\def\strutdepth{\dp\strutbox} +% +\def\doinmargin#1#2{\strut\vadjust{% + \nobreak + \kern-\strutdepth + \vtop to \strutdepth{% + \baselineskip=\strutdepth + \vss + % if you have multiple lines of stuff to put here, you'll need to + % make the vbox yourself of the appropriate size. + \ifx#1l% + \llap{\ignorespaces #2\hskip\inmarginspacing}% + \else + \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% + \fi + \null + }% +}} +\def\inleftmargin{\doinmargin l} +\def\inrightmargin{\doinmargin r} +% +% @inmargin{TEXT [, RIGHT-TEXT]} +% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; +% else use TEXT for both). +% +\def\inmargin#1{\parseinmargin #1,,\finish} +\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \def\lefttext{#1}% have both texts + \def\righttext{#2}% + \else + \def\lefttext{#1}% have only one text + \def\righttext{#1}% + \fi + % + \ifodd\pageno + \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin + \else + \def\temp{\inleftmargin\lefttext}% + \fi + \temp +} + +% @| inserts a changebar to the left of the current line. It should +% surround any changed text. This approach does *not* work if the +% change spans more than two lines of output. To handle that, we would +% have adopt a much more difficult approach (putting marks into the main +% vertical list for the beginning and end of each change). This command +% is not documented, not supported, and doesn't work. +% +\def\|{% + % \vadjust can only be used in horizontal mode. + \leavevmode + % + % Append this vertical mode material after the current line in the output. + \vadjust{% + % We want to insert a rule with the height and depth of the current + % leading; that is exactly what \strutbox is supposed to record. + \vskip-\baselineskip + % + % \vadjust-items are inserted at the left edge of the type. So + % the \llap here moves out into the left-hand margin. + \llap{% + % + % For a thicker or thinner bar, change the `1pt'. + \vrule height\baselineskip width1pt + % + % This is the space between the bar and the text. + \hskip 12pt + }% + }% +} + +% @include FILE -- \input text of FILE. +% +\def\include{\parseargusing\filenamecatcodes\includezzz} +\def\includezzz#1{% + \pushthisfilestack + \def\thisfile{#1}% + {% + \makevalueexpandable % we want to expand any @value in FILE. + \turnoffactive % and allow special characters in the expansion + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @include of #1^^J}% + \edef\temp{\noexpand\input #1 }% + % + % This trickery is to read FILE outside of a group, in case it makes + % definitions, etc. + \expandafter + }\temp + \popthisfilestack +} +\def\filenamecatcodes{% + \catcode`\\=\other + \catcode`~=\other + \catcode`^=\other + \catcode`_=\other + \catcode`|=\other + \catcode`<=\other + \catcode`>=\other + \catcode`+=\other + \catcode`-=\other + \catcode`\`=\other + \catcode`\'=\other +} + +\def\pushthisfilestack{% + \expandafter\pushthisfilestackX\popthisfilestack\StackTerm +} +\def\pushthisfilestackX{% + \expandafter\pushthisfilestackY\thisfile\StackTerm +} +\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% + \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% +} + +\def\popthisfilestack{\errthisfilestackempty} +\def\errthisfilestackempty{\errmessage{Internal error: + the stack of filenames is empty.}} +% +\def\thisfile{} + +% @center line +% outputs that line, centered. +% +\parseargdef\center{% + \ifhmode + \let\centersub\centerH + \else + \let\centersub\centerV + \fi + \centersub{\hfil \ignorespaces#1\unskip \hfil}% + \let\centersub\relax % don't let the definition persist, just in case +} +\def\centerH#1{{% + \hfil\break + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{#1}% + \break +}} +% +\newcount\centerpenalty +\def\centerV#1{% + % The idea here is the same as in \startdefun, \cartouche, etc.: if + % @center is the first thing after a section heading, we need to wipe + % out the negative parskip inserted by \sectionheading, but still + % prevent a page break here. + \centerpenalty = \lastpenalty + \ifnum\centerpenalty>10000 \vskip\parskip \fi + \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi + \line{\kern\leftskip #1\kern\rightskip}% +} + +% @sp n outputs n lines of vertical space +% +\parseargdef\sp{\vskip #1\baselineskip} + +% @comment ...line which is ignored... +% @c is the same as @comment +% @ignore ... @end ignore is another way to write a comment +% +\def\comment{\begingroup \catcode`\^^M=\other% +\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% +\commentxxx} +{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} +% +\let\c=\comment + +% @paragraphindent NCHARS +% We'll use ems for NCHARS, close enough. +% NCHARS can also be the word `asis' or `none'. +% We cannot feasibly implement @paragraphindent asis, though. +% +\def\asisword{asis} % no translation, these are keywords +\def\noneword{none} +% +\parseargdef\paragraphindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \defaultparindent = 0pt + \else + \defaultparindent = #1em + \fi + \fi + \parindent = \defaultparindent +} + +% @exampleindent NCHARS +% We'll use ems for NCHARS like @paragraphindent. +% It seems @exampleindent asis isn't necessary, but +% I preserve it to make it similar to @paragraphindent. +\parseargdef\exampleindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \lispnarrowing = 0pt + \else + \lispnarrowing = #1em + \fi + \fi +} + +% @firstparagraphindent WORD +% If WORD is `none', then suppress indentation of the first paragraph +% after a section heading. If WORD is `insert', then do indent at such +% paragraphs. +% +% The paragraph indentation is suppressed or not by calling +% \suppressfirstparagraphindent, which the sectioning commands do. +% We switch the definition of this back and forth according to WORD. +% By default, we suppress indentation. +% +\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} +\def\insertword{insert} +% +\parseargdef\firstparagraphindent{% + \def\temp{#1}% + \ifx\temp\noneword + \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent + \else\ifx\temp\insertword + \let\suppressfirstparagraphindent = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @firstparagraphindent option `\temp'}% + \fi\fi +} + +% Here is how we actually suppress indentation. Redefine \everypar to +% \kern backwards by \parindent, and then reset itself to empty. +% +% We also make \indent itself not actually do anything until the next +% paragraph. +% +\gdef\dosuppressfirstparagraphindent{% + \gdef\indent{% + \restorefirstparagraphindent + \indent + }% + \gdef\noindent{% + \restorefirstparagraphindent + \noindent + }% + \global\everypar = {% + \kern -\parindent + \restorefirstparagraphindent + }% +} + +\gdef\restorefirstparagraphindent{% + \global \let \indent = \ptexindent + \global \let \noindent = \ptexnoindent + \global \everypar = {}% +} + + +% @refill is a no-op. +\let\refill=\relax + +% If working on a large document in chapters, it is convenient to +% be able to disable indexing, cross-referencing, and contents, for test runs. +% This is done with @novalidate (before @setfilename). +% +\newif\iflinks \linkstrue % by default we want the aux files. +\let\novalidate = \linksfalse + +% @setfilename is done at the beginning of every texinfo file. +% So open here the files we need to have open while reading the input. +% This makes it possible to make a .fmt file for texinfo. +\def\setfilename{% + \fixbackslash % Turn off hack to swallow `\input texinfo'. + \iflinks + \tryauxfile + % Open the new aux file. TeX will close it automatically at exit. + \immediate\openout\auxfile=\jobname.aux + \fi % \openindices needs to do some work in any case. + \openindices + \let\setfilename=\comment % Ignore extra @setfilename cmds. + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. + \openin 1 texinfo.cnf + \ifeof 1 \else \input texinfo.cnf \fi + \closein 1 + % + \comment % Ignore the actual filename. +} + +% Called from \setfilename. +% +\def\openindices{% + \newindex{cp}% + \newcodeindex{fn}% + \newcodeindex{vr}% + \newcodeindex{tp}% + \newcodeindex{ky}% + \newcodeindex{pg}% +} + +% @bye. +\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} + + +\message{pdf,} +% adobe `portable' document format +\newcount\tempnum +\newcount\lnkcount +\newtoks\filename +\newcount\filenamelength +\newcount\pgn +\newtoks\toksA +\newtoks\toksB +\newtoks\toksC +\newtoks\toksD +\newbox\boxA +\newcount\countA +\newif\ifpdf +\newif\ifpdfmakepagedest + +% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 +% can be set). So we test for \relax and 0 as well as being undefined. +\ifx\pdfoutput\thisisundefined +\else + \ifx\pdfoutput\relax + \else + \ifcase\pdfoutput + \else + \pdftrue + \fi + \fi +\fi + +% PDF uses PostScript string constants for the names of xref targets, +% for display in the outlines, and in other places. Thus, we have to +% double any backslashes. Otherwise, a name like "\node" will be +% interpreted as a newline (\n), followed by o, d, e. Not good. +% +% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and +% related messages. The final outcome is that it is up to the TeX user +% to double the backslashes and otherwise make the string valid, so +% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to +% do this reliably, so we use it. + +% #1 is a control sequence in which to do the replacements, +% which we \xdef. +\def\txiescapepdf#1{% + \ifx\pdfescapestring\thisisundefined + % No primitive available; should we give a warning or log? + % Many times it won't matter. + \else + % The expandable \pdfescapestring primitive escapes parentheses, + % backslashes, and other special chars. + \xdef#1{\pdfescapestring{#1}}% + \fi +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + +\ifpdf + % + % Color manipulation macros using ideas from pdfcolor.tex, + % except using rgb instead of cmyk; the latter is said to render as a + % very dark gray on-screen and a very dark halftone in print, instead + % of actual black. The dark red here is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. We use + % black by default, though. + \def\rgbDarkRed{0.50 0.09 0.12} + \def\rgbBlack{0 0 0} + % + % k sets the color for filling (usual text, etc.); + % K sets the color for stroking (thin rules, e.g., normal _'s). + \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} + % + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% + \domark + \pdfsetcolor{#1}% + } + % + \def\maincolor{\rgbBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} + % + \def\makefootline{% + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}% + } + % + \def\makeheadline{% + \vbox to 0pt{% + \vskip-22.5pt + \line{% + \vbox to8.5pt{}% + % Extract \thiscolor definition from the marks. + \getcolormarks + % Typeset the headline with \maincolor, then restore the color. + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% + }% + \vss + }% + \nointerlineskip + } + % + % + \pdfcatalog{/PageMode /UseOutlines} + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). + \def\dopdfimage#1#2#3{% + \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. + \let\pdfimgext=\empty + \begingroup + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{JPG}% + \fi + \else \gdef\pdfimgext{jpeg}% + \fi + \else \gdef\pdfimgext{jpg}% + \fi + \else \gdef\pdfimgext{png}% + \fi + \else \gdef\pdfimgext{PDF}% + \fi + \else \gdef\pdfimgext{pdf}% + \fi + \closein 1 + \endgroup + % + % without \immediate, ancient pdftex seg faults when the same image is + % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) + \ifnum\pdftexversion < 14 + \immediate\pdfimage + \else + \immediate\pdfximage + \fi + \ifdim \wd0 >0pt width \pdfimagewidth \fi + \ifdim \wd2 >0pt height \pdfimageheight \fi + \ifnum\pdftexversion<13 + #1.\pdfimgext + \else + {#1.\pdfimgext}% + \fi + \ifnum\pdftexversion < 14 \else + \pdfrefximage \pdflastximage + \fi} + % + \def\pdfmkdest#1{{% + % We have to set dummies so commands such as @code, and characters + % such as \, aren't expanded when present in a section title. + \indexnofonts + \turnoffactive + \makevalueexpandable + \def\pdfdestname{#1}% + \txiescapepdf\pdfdestname + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + }} + % + % used to mark target names; must be expandable. + \def\pdfmkpgn#1{#1} + % + % by default, use black for everything. + \def\urlcolor{\rgbBlack} + \def\linkcolor{\rgbBlack} + \def\endlink{\setcolor{\maincolor}\pdfendlink} + % + % Adding outlines to PDF; macros for calculating structure of outlines + % come from Petr Olsak + \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% + \else \csname#1\endcsname \fi} + \def\advancenumber#1{\tempnum=\expnumber{#1}\relax + \advance\tempnum by 1 + \expandafter\xdef\csname#1\endcsname{\the\tempnum}} + % + % #1 is the section text, which is what will be displayed in the + % outline by the pdf viewer. #2 is the pdf expression for the number + % of subentries (or empty, for subsubsections). #3 is the node text, + % which might be empty if this toc entry had no corresponding node. + % #4 is the page number + % + \def\dopdfoutline#1#2#3#4{% + % Generate a link to the node text if that exists; else, use the + % page number. We could generate a destination for the section + % text in the case where a section has no node, but it doesn't + % seem worth the trouble, since most documents are normally structured. + \edef\pdfoutlinedest{#3}% + \ifx\pdfoutlinedest\empty + \def\pdfoutlinedest{#4}% + \else + \txiescapepdf\pdfoutlinedest + \fi + % + % Also escape PDF chars in the display string. + \edef\pdfoutlinetext{#1}% + \txiescapepdf\pdfoutlinetext + % + \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% + } + % + \def\pdfmakeoutlines{% + \begingroup + % Read toc silently, to get counts of subentries for \pdfoutline. + \def\partentry##1##2##3##4{}% ignore parts in the outlines + \def\numchapentry##1##2##3##4{% + \def\thischapnum{##2}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + }% + \def\numsecentry##1##2##3##4{% + \advancenumber{chap\thischapnum}% + \def\thissecnum{##2}% + \def\thissubsecnum{0}% + }% + \def\numsubsecentry##1##2##3##4{% + \advancenumber{sec\thissecnum}% + \def\thissubsecnum{##2}% + }% + \def\numsubsubsecentry##1##2##3##4{% + \advancenumber{subsec\thissubsecnum}% + }% + \def\thischapnum{0}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + % + % use \def rather than \let here because we redefine \chapentry et + % al. a second time, below. + \def\appentry{\numchapentry}% + \def\appsecentry{\numsecentry}% + \def\appsubsecentry{\numsubsecentry}% + \def\appsubsubsecentry{\numsubsubsecentry}% + \def\unnchapentry{\numchapentry}% + \def\unnsecentry{\numsecentry}% + \def\unnsubsecentry{\numsubsecentry}% + \def\unnsubsubsecentry{\numsubsubsecentry}% + \readdatafile{toc}% + % + % Read toc second time, this time actually producing the outlines. + % The `-' means take the \expnumber as the absolute number of + % subentries, which we calculated on our first read of the .toc above. + % + % We use the node names as the destinations. + \def\numchapentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% + \def\numsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% + \def\numsubsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% + \def\numsubsubsecentry##1##2##3##4{% count is always zero + \dopdfoutline{##1}{}{##3}{##4}}% + % + % PDF outlines are displayed using system fonts, instead of + % document fonts. Therefore we cannot use special characters, + % since the encoding is unknown. For example, the eogonek from + % Latin 2 (0xea) gets translated to a | character. Info from + % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. + % + % TODO this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Too + % much work for too little return. Just use the ASCII equivalents + % we use for the index sort strings. + % + \indexnofonts + \setupdatafile + % We can have normal brace characters in the PDF outlines, unlike + % Texinfo index files. So set that up. + \def\{{\lbracecharliteral}% + \def\}{\rbracecharliteral}% + \catcode`\\=\active \otherbackslash + \input \tocreadfilename + \endgroup + } + {\catcode`[=1 \catcode`]=2 + \catcode`{=\other \catcode`}=\other + \gdef\lbracecharliteral[{]% + \gdef\rbracecharliteral[}]% + ] + % + \def\skipspaces#1{\def\PP{#1}\def\D{|}% + \ifx\PP\D\let\nextsp\relax + \else\let\nextsp\skipspaces + \addtokens{\filename}{\PP}% + \advance\filenamelength by 1 + \fi + \nextsp} + \def\getfilename#1{% + \filenamelength=0 + % If we don't expand the argument now, \skipspaces will get + % snagged on things like "@value{foo}". + \edef\temp{#1}% + \expandafter\skipspaces\temp|\relax + } + \ifnum\pdftexversion < 14 + \let \startlink \pdfannotlink + \else + \let \startlink \pdfstartlink + \fi + % make a live url in pdf output. + \def\pdfurl#1{% + \begingroup + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable + % do we want to go so far as to use \indexnofonts instead of just + % special-casing \var here? + \def\var##1{##1}% + % + \leavevmode\setcolor{\urlcolor}% + \startlink attr{/Border [0 0 0]}% + user{/Subtype /Link /A << /S /URI /URI (#1) >>}% + \endgroup} + \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} + \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} + \def\maketoks{% + \expandafter\poptoks\the\toksA|ENDTOKS|\relax + \ifx\first0\adn0 + \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 + \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 + \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else + \ifnum0=\countA\else\makelink\fi + \ifx\first.\let\next=\done\else + \let\next=\maketoks + \addtokens{\toksB}{\the\toksD} + \ifx\first,\addtokens{\toksB}{\space}\fi + \fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \next} + \def\makelink{\addtokens{\toksB}% + {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} + \def\pdflink#1{% + \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} + \setcolor{\linkcolor}#1\endlink} + \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} +\else + % non-pdf mode + \let\pdfmkdest = \gobble + \let\pdfurl = \gobble + \let\endlink = \relax + \let\setcolor = \gobble + \let\pdfsetcolor = \gobble + \let\pdfmakeoutlines = \relax +\fi % \ifx\pdfoutput + + +\message{fonts,} + +% Change the current font style to #1, remembering it in \curfontstyle. +% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in +% italics, not bold italics. +% +\def\setfontstyle#1{% + \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. + \csname ten#1\endcsname % change the current font +} + +% Select #1 fonts with the current style. +% +\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} + +\def\rm{\fam=0 \setfontstyle{rm}} +\def\it{\fam=\itfam \setfontstyle{it}} +\def\sl{\fam=\slfam \setfontstyle{sl}} +\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} +\def\tt{\fam=\ttfam \setfontstyle{tt}} + +% Unfortunately, we have to override this for titles and the like, since +% in those cases "rm" is bold. Sigh. +\def\rmisbold{\rm\def\curfontstyle{bf}} + +% Texinfo sort of supports the sans serif font style, which plain TeX does not. +% So we set up a \sf. +\newfam\sffam +\def\sf{\fam=\sffam \setfontstyle{sf}} +\let\li = \sf % Sometimes we call it \li, not \sf. + +% We don't need math for this font style. +\def\ttsl{\setfontstyle{ttsl}} + + +% Set the baselineskip to #1, and the lineskip and strut size +% correspondingly. There is no deep meaning behind these magic numbers +% used as factors; they just match (closely enough) what Knuth defined. +% +\def\lineskipfactor{.08333} +\def\strutheightpercent{.70833} +\def\strutdepthpercent {.29167} +% +% can get a sort of poor man's double spacing by redefining this. +\def\baselinefactor{1} +% +\newdimen\textleading +\def\setleading#1{% + \dimen0 = #1\relax + \normalbaselineskip = \baselinefactor\dimen0 + \normallineskip = \lineskipfactor\normalbaselineskip + \normalbaselines + \setbox\strutbox =\hbox{% + \vrule width0pt height\strutheightpercent\baselineskip + depth \strutdepthpercent \baselineskip + }% +} + +% PDF CMaps. See also LaTeX's t1.cmap. +% +% do nothing with this by default. +\expandafter\let\csname cmapOT1\endcsname\gobble +\expandafter\let\csname cmapOT1IT\endcsname\gobble +\expandafter\let\csname cmapOT1TT\endcsname\gobble + +% if we are producing pdf, and we have \pdffontattr, then define cmaps. +% (\pdffontattr was introduced many years ago, but people still run +% older pdftex's; it's easy to conditionalize, so we do.) +\ifpdf \ifx\pdffontattr\thisisundefined \else + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1-0) +%%Title: (TeX-OT1-0 TeX OT1 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1) +/Supplement 0 +>> def +/CMapName /TeX-OT1-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<23> <26> <0023> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +40 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1IT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1IT-0) +%%Title: (TeX-OT1IT-0 TeX OT1IT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1IT) +/Supplement 0 +>> def +/CMapName /TeX-OT1IT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<25> <26> <0025> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +42 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<23> <0023> +<24> <00A3> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1IT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1TT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1TT-0) +%%Title: (TeX-OT1TT-0 TeX OT1TT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1TT) +/Supplement 0 +>> def +/CMapName /TeX-OT1TT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +5 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<21> <26> <0021> +<28> <5F> <0028> +<61> <7E> <0061> +endbfrange +32 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <2191> +<0C> <2193> +<0D> <0027> +<0E> <00A1> +<0F> <00BF> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<20> <2423> +<27> <2019> +<60> <2018> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +\fi\fi + + +% Set the font macro #1 to the font named \fontprefix#2. +% #3 is the font's design size, #4 is a scale factor, #5 is the CMap +% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). +% Example: +% #1 = \textrm +% #2 = \rmshape +% #3 = 10 +% #4 = \mainmagstep +% #5 = OT1 +% +\def\setfont#1#2#3#4#5{% + \font#1=\fontprefix#2#3 scaled #4 + \csname cmap#5\endcsname#1% +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble +% +% (end of cmaps) + +% Use cm as the default font prefix. +% To specify the font prefix, you must define \fontprefix +% before you read in texinfo.tex. +\ifx\fontprefix\thisisundefined +\def\fontprefix{cm} +\fi +% Support font families that don't use the same naming scheme as CM. +\def\rmshape{r} +\def\rmbshape{bx} % where the normal face is bold +\def\bfshape{b} +\def\bxshape{bx} +\def\ttshape{tt} +\def\ttbshape{tt} +\def\ttslshape{sltt} +\def\itshape{ti} +\def\itbshape{bxti} +\def\slshape{sl} +\def\slbshape{bxsl} +\def\sfshape{ss} +\def\sfbshape{ss} +\def\scshape{csc} +\def\scbshape{csc} + +% Definitions for a main text size of 11pt. (The default in Texinfo.) +% +\def\definetextfontsizexi{% +% Text fonts (11.2pt, magstep1). +\def\textnominalsize{11pt} +\edef\mainmagstep{\magstephalf} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1095} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstep1}{OT1} +\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\titleecsize{2074} + +% Chapter (and unnumbered) fonts (17.28pt). +\def\chapnominalsize{17pt} +\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} +\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep3}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} +\setfont\chapsf\sfbshape{17}{1000}{OT1} +\let\chapbf=\chaprm +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} +\font\chapi=cmmi12 scaled \magstep2 +\font\chapsy=cmsy10 scaled \magstep3 +\def\chapecsize{1728} + +% Section fonts (14.4pt). +\def\secnominalsize{14pt} +\setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secit\itbshape{10}{\magstep2}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep2}{OT1} +\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\secsf\sfbshape{12}{\magstep1}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep2}{OT1} +\font\seci=cmmi12 scaled \magstep1 +\font\secsy=cmsy10 scaled \magstep2 +\def\sececsize{1440} + +% Subsection fonts (13.15pt). +\def\ssecnominalsize{13pt} +\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} +\setfont\ssecit\itbshape{10}{1315}{OT1IT} +\setfont\ssecsl\slbshape{10}{1315}{OT1} +\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} +\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1315}{OT1} +\font\sseci=cmmi12 scaled \magstephalf +\font\ssecsy=cmsy10 scaled 1315 +\def\ssececsize{1200} + +% Reduced fonts for @acro in text (10pt). +\def\reducednominalsize{10pt} +\setfont\reducedrm\rmshape{10}{1000}{OT1} +\setfont\reducedtt\ttshape{10}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{1000}{OT1} +\setfont\reducedit\itshape{10}{1000}{OT1IT} +\setfont\reducedsl\slshape{10}{1000}{OT1} +\setfont\reducedsf\sfshape{10}{1000}{OT1} +\setfont\reducedsc\scshape{10}{1000}{OT1} +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} +\font\reducedi=cmmi10 +\font\reducedsy=cmsy10 +\def\reducedecsize{1000} + +\textleading = 13.2pt % line spacing for 11pt CM +\textfonts % reset the current fonts +\rm +} % end of 11pt text font size definitions, \definetextfontsizexi + + +% Definitions to make the main text be 10pt Computer Modern, with +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. +% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} +\edef\mainmagstep{1000} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1000} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} +\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\titleecsize{2074} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} +\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} +\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep2}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} +\let\chapbf\chaprm +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} +\font\chapi=cmmi12 scaled \magstep1 +\font\chapsy=cmsy10 scaled \magstep2 +\def\chapecsize{1440} + +% Section fonts (12pt). +\def\secnominalsize{12pt} +\setfont\secrm\rmbshape{12}{1000}{OT1} +\setfont\secit\itbshape{10}{\magstep1}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep1}{OT1} +\setfont\sectt\ttbshape{12}{1000}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} +\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 +\def\sececsize{1200} + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} +\setfont\ssecrm\rmbshape{10}{1000}{OT1} +\setfont\ssecit\itbshape{10}{1000}{OT1IT} +\setfont\ssecsl\slbshape{10}{1000}{OT1} +\setfont\ssectt\ttbshape{10}{1000}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} +\setfont\ssecsf\sfbshape{10}{1000}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1000}{OT1} +\font\sseci=cmmi10 +\font\ssecsy=cmsy10 +\def\ssececsize{1000} + +% Reduced fonts for @acro in text (9pt). +\def\reducednominalsize{9pt} +\setfont\reducedrm\rmshape{9}{1000}{OT1} +\setfont\reducedtt\ttshape{9}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{900}{OT1} +\setfont\reducedit\itshape{9}{1000}{OT1IT} +\setfont\reducedsl\slshape{9}{1000}{OT1} +\setfont\reducedsf\sfshape{9}{1000}{OT1} +\setfont\reducedsc\scshape{10}{900}{OT1} +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} +\font\reducedi=cmmi9 +\font\reducedsy=cmsy9 +\def\reducedecsize{0900} + +\divide\parskip by 2 % reduce space between paragraphs +\textleading = 12pt % line spacing for 10pt CM +\textfonts % reset the current fonts +\rm +} % end of 10pt text font size definitions, \definetextfontsizex + + +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. +% +\def\xiword{11} +\def\xword{10} +\def\xwordpt{10pt} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% + %\wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. + % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi + \else + \errhelp=\EMsimple + \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} + \fi\fi + \endgroup +} + + +% In order for the font changes to affect most math symbols and letters, +% we have to define the \textfont of the standard families. Since +% texinfo doesn't allow for producing subscripts and superscripts except +% in the main text, we don't bother to reset \scriptfont and +% \scriptscriptfont (which would also require loading a lot more fonts). +% +\def\resetmathfonts{% + \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy + \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf + \textfont\ttfam=\tentt \textfont\sffam=\tensf +} + +% The font-changing commands redefine the meanings of \tenSTYLE, instead +% of just \STYLE. We do this because \STYLE needs to also set the +% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire +% \tenSTYLE to set the current font. +% +% Each font-changing command also sets the names \lsize (one size lower) +% and \lllsize (three sizes lower). These relative commands are used in +% the LaTeX logo and acronyms. +% +% This all needs generalizing, badly. +% +\def\textfonts{% + \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl + \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc + \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy + \let\tenttsl=\textttsl + \def\curfontsize{text}% + \def\lsize{reduced}\def\lllsize{smaller}% + \resetmathfonts \setleading{\textleading}} +\def\titlefonts{% + \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl + \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc + \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy + \let\tenttsl=\titlettsl + \def\curfontsize{title}% + \def\lsize{chap}\def\lllsize{subsec}% + \resetmathfonts \setleading{27pt}} +\def\titlefont#1{{\titlefonts\rmisbold #1}} +\def\chapfonts{% + \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl + \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc + \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy + \let\tenttsl=\chapttsl + \def\curfontsize{chap}% + \def\lsize{sec}\def\lllsize{text}% + \resetmathfonts \setleading{19pt}} +\def\secfonts{% + \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl + \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc + \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy + \let\tenttsl=\secttsl + \def\curfontsize{sec}% + \def\lsize{subsec}\def\lllsize{reduced}% + \resetmathfonts \setleading{17pt}} +\def\subsecfonts{% + \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl + \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc + \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy + \let\tenttsl=\ssecttsl + \def\curfontsize{ssec}% + \def\lsize{text}\def\lllsize{small}% + \resetmathfonts \setleading{15pt}} +\let\subsubsecfonts = \subsecfonts +\def\reducedfonts{% + \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl + \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc + \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy + \let\tenttsl=\reducedttsl + \def\curfontsize{reduced}% + \def\lsize{small}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} +\def\smallfonts{% + \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl + \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc + \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy + \let\tenttsl=\smallttsl + \def\curfontsize{small}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} +\def\smallerfonts{% + \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl + \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc + \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy + \let\tenttsl=\smallerttsl + \def\curfontsize{smaller}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{9.5pt}} + +% Fonts for short table of contents. +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +% Define these just so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + +% Set the fonts to use with the @small... environments. +\let\smallexamplefonts = \smallfonts + +% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample +% can fit this many characters: +% 8.5x11=86 smallbook=72 a4=90 a5=69 +% If we use \scriptfonts (8pt), then we can fit this many characters: +% 8.5x11=90+ smallbook=80 a4=90+ a5=77 +% For me, subjectively, the few extra characters that fit aren't worth +% the additional smallness of 8pt. So I'm making the default 9pt. +% +% By the way, for comparison, here's what fits with @example (10pt): +% 8.5x11=71 smallbook=60 a4=75 a5=58 +% --karl, 24jan03. + +% Set up the default fonts, so we can use them for creating boxes. +% +\definetextfontsizexi + + +\message{markup,} + +% Check if we are currently using a typewriter font. Since all the +% Computer Modern typewriter fonts have zero interword stretch (and +% shrink), and it is reasonable to expect all typewriter fonts to have +% this property, we can check that font parameter. +% +\def\ifmonospace{\ifdim\fontdimen3\font=0pt } + +% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will +% define and register \INITMACRO to be called on markup style changes. +% \INITMACRO can check \currentmarkupstyle for the innermost +% style and the set of \ifmarkupSTYLE switches for all styles +% currently in effect. +\newif\ifmarkupvar +\newif\ifmarkupsamp +\newif\ifmarkupkey +%\newif\ifmarkupfile % @file == @samp. +%\newif\ifmarkupoption % @option == @samp. +\newif\ifmarkupcode +\newif\ifmarkupkbd +%\newif\ifmarkupenv % @env == @code. +%\newif\ifmarkupcommand % @command == @code. +\newif\ifmarkuptex % @tex (and part of @math, for now). +\newif\ifmarkupexample +\newif\ifmarkupverb +\newif\ifmarkupverbatim + +\let\currentmarkupstyle\empty + +\def\setupmarkupstyle#1{% + \csname markup#1true\endcsname + \def\currentmarkupstyle{#1}% + \markupstylesetup +} + +\let\markupstylesetup\empty + +\def\defmarkupstylesetup#1{% + \expandafter\def\expandafter\markupstylesetup + \expandafter{\markupstylesetup #1}% + \def#1% +} + +% Markup style setup for left and right quotes. +\defmarkupstylesetup\markupsetuplq{% + \expandafter\let\expandafter \temp + \csname markupsetuplq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuplqdefault \else \temp \fi +} + +\defmarkupstylesetup\markupsetuprq{% + \expandafter\let\expandafter \temp + \csname markupsetuprq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuprqdefault \else \temp \fi +} + +{ +\catcode`\'=\active +\catcode`\`=\active + +\gdef\markupsetuplqdefault{\let`\lq} +\gdef\markupsetuprqdefault{\let'\rq} + +\gdef\markupsetcodequoteleft{\let`\codequoteleft} +\gdef\markupsetcodequoteright{\let'\codequoteright} +} + +\let\markupsetuplqcode \markupsetcodequoteleft +\let\markupsetuprqcode \markupsetcodequoteright +% +\let\markupsetuplqexample \markupsetcodequoteleft +\let\markupsetuprqexample \markupsetcodequoteright +% +\let\markupsetuplqkbd \markupsetcodequoteleft +\let\markupsetuprqkbd \markupsetcodequoteright +% +\let\markupsetuplqsamp \markupsetcodequoteleft +\let\markupsetuprqsamp \markupsetcodequoteright +% +\let\markupsetuplqverb \markupsetcodequoteleft +\let\markupsetuprqverb \markupsetcodequoteright +% +\let\markupsetuplqverbatim \markupsetcodequoteleft +\let\markupsetuprqverbatim \markupsetcodequoteright + +% Allow an option to not use regular directed right quote/apostrophe +% (char 0x27), but instead the undirected quote from cmtt (char 0x0d). +% The undirected quote is ugly, so don't make it the default, but it +% works for pasting with more pdf viewers (at least evince), the +% lilypond developers report. xpdf does work with the regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + % [Knuth] pp. 380,381,391 + % \relax disables Spanish ligatures ?` and !` of \tt font. + \relax`% + \else \char'22 \fi + \else \char'22 \fi +} + +% Commands to set the quote options. +% +\parseargdef\codequoteundirected{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% + \fi\fi +} +% +\parseargdef\codequotebacktick{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% + \fi\fi +} + +% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. +\def\noligaturesquoteleft{\relax\lq} + +% Count depth in font-changes, for error checks +\newcount\fontdepth \fontdepth=0 + +% Font commands. + +% #1 is the font command (\sl or \it), #2 is the text to slant. +% If we are in a monospaced environment, however, 1) always use \ttsl, +% and 2) do not add an italic correction. +\def\dosmartslant#1#2{% + \ifusingtt + {{\ttsl #2}\let\next=\relax}% + {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% + \next +} +\def\smartslanted{\dosmartslant\sl} +\def\smartitalic{\dosmartslant\it} + +% Output an italic correction unless \next (presumed to be the following +% character) is such as not to need one. +\def\smartitaliccorrection{% + \ifx\next,% + \else\ifx\next-% + \else\ifx\next.% + \else\ifx\next\.% + \else\ifx\next\comma% + \else\ptexslash + \fi\fi\fi\fi\fi + \aftersmartic +} + +% Unconditional use \ttsl, and no ic. @var is set to this for defuns. +\def\ttslanted#1{{\ttsl #1}} + +% @cite is like \smartslanted except unconditionally use \sl. We never want +% ttsl for book titles, do we? +\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} + +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic = \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% + \smartslanted{#1}% +} + +\let\i=\smartitalic +\let\slanted=\smartslanted +\let\dfn=\smartslanted +\let\emph=\smartitalic + +% Explicit font changes: @r, @sc, undocumented @ii. +\def\r#1{{\rm #1}} % roman font +\def\sc#1{{\smallcaps#1}} % smallcaps font +\def\ii#1{{\it #1}} % italic font + +% @b, explicit bold. Also @strong. +\def\b#1{{\bf #1}} +\let\strong=\b + +% @sansserif, explicit sans. +\def\sansserif#1{{\sf #1}} + +% We can't just use \exhyphenpenalty, because that only has effect at +% the end of a paragraph. Restore normal hyphenation at the end of the +% group within which \nohyphenation is presumably called. +% +\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} +\def\restorehyphenation{\hyphenchar\font = `- } + +% Set sfcode to normal for the chars that usually have another value. +% Can't use plain's \frenchspacing because it uses the `\x notation, and +% sometimes \x has an active definition that messes things up. +% +\catcode`@=11 + \def\plainfrenchspacing{% + \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m + \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m + \def\endofsentencespacefactor{1000}% for @. and friends + } + \def\plainnonfrenchspacing{% + \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 + \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 + \def\endofsentencespacefactor{3000}% for @. and friends + } +\catcode`@=\other +\def\endofsentencespacefactor{3000}% default + +% @t, explicit typewriter. +\def\t#1{% + {\tt \rawbackslash \plainfrenchspacing #1}% + \null +} + +% @samp. +\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} + +% @indicateurl is \samp, that is, with quotes. +\let\indicateurl=\samp + +% @code (and similar) prints in typewriter, but with spaces the same +% size as normal in the surrounding text, without hyphenation, etc. +% This is a subroutine for that. +\def\tclose#1{% + {% + % Change normal interword space to be same as for the current font. + \spaceskip = \fontdimen2\font + % + % Switch to typewriter. + \tt + % + % But `\ ' produces the large typewriter interword space. + \def\ {{\spaceskip = 0pt{} }}% + % + % Turn off hyphenation. + \nohyphenation + % + \rawbackslash + \plainfrenchspacing + #1% + }% + \null % reset spacefactor to 1000 +} + +% We *must* turn on hyphenation at `-' and `_' in @code. +% (But see \codedashfinish below.) +% Otherwise, it is too hard to avoid overfull hboxes +% in the Emacs manual, the Library manual, etc. +% +% Unfortunately, TeX uses one parameter (\hyphenchar) to control +% both hyphenation at - and hyphenation within words. +% We must therefore turn them both off (\tclose does that) +% and arrange explicitly to hyphenate at a dash. -- rms. +{ + \catcode`\-=\active \catcode`\_=\active + \catcode`\'=\active \catcode`\`=\active + \global\let'=\rq \global\let`=\lq % default definitions + % + \global\def\code{\begingroup + \setupmarkupstyle{code}% + % The following should really be moved into \setupmarkupstyle handlers. + \catcode\dashChar=\active \catcode\underChar=\active + \ifallowcodebreaks + \let-\codedash + \let_\codeunder + \else + \let-\normaldash + \let_\realunder + \fi + % Given -foo (with a single dash), we do not want to allow a break + % after the hyphen. + \global\let\codedashprev=\codedash + % + \codex + } + % + \gdef\codedash{\futurelet\next\codedashfinish} + \gdef\codedashfinish{% + \normaldash % always output the dash character itself. + % + % Now, output a discretionary to allow a line break, unless + % (a) the next character is a -, or + % (b) the preceding character is a -. + % E.g., given --posix, we do not want to allow a break after either -. + % Given --foo-bar, we do want to allow a break between the - and the b. + \ifx\next\codedash \else + \ifx\codedashprev\codedash + \else \discretionary{}{}{}\fi + \fi + % we need the space after the = for the case when \next itself is a + % space token; it would get swallowed otherwise. As in @code{- a}. + \global\let\codedashprev= \next + } +} +\def\normaldash{-} +% +\def\codex #1{\tclose{#1}\endgroup} + +\def\codeunder{% + % this is all so @math{@code{var_name}+1} can work. In math mode, _ + % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) + % will therefore expand the active definition of _, which is us + % (inside @code that is), therefore an endless loop. + \ifusingtt{\ifmmode + \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. + \else\normalunderscore \fi + \discretionary{}{}{}}% + {\_}% +} + +% An additional complication: the above will allow breaks after, e.g., +% each of the four underscores in __typeof__. This is bad. +% @allowcodebreaks provides a document-level way to turn breaking at - +% and _ on and off. +% +\newif\ifallowcodebreaks \allowcodebreakstrue + +\def\keywordtrue{true} +\def\keywordfalse{false} + +\parseargdef\allowcodebreaks{% + \def\txiarg{#1}% + \ifx\txiarg\keywordtrue + \allowcodebreakstrue + \else\ifx\txiarg\keywordfalse + \allowcodebreaksfalse + \else + \errhelp = \EMsimple + \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% + \fi\fi +} + +% For @command, @env, @file, @option quotes seem unnecessary, +% so use \code rather than \samp. +\let\command=\code +\let\env=\code +\let\file=\code +\let\option=\code + +% @uref (abbreviation for `urlref') aka @url takes an optional +% (comma-separated) second argument specifying the text to display and +% an optional third arg as text to display instead of (rather than in +% addition to) the url itself. First (mandatory) arg is the url. + +% TeX-only option to allow changing PDF output to show only the second +% arg (if given), and not the url (which is then just the link target). +\newif\ifurefurlonlylink + +% The main macro is \urefbreak, which allows breaking at expected +% places within the url. (There used to be another version, which +% didn't support automatic breaking.) +\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} +\let\uref=\urefbreak +% +\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} +\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% look for second arg + \ifdim\wd0 > 0pt + \ifpdf + \ifurefurlonlylink + % PDF plus option to not display url, show just arg + \unhbox0 + \else + % PDF, normally display both arg and url for consistency, + % visibility, if the pdf is eventually used to print, etc. + \unhbox0\ (\urefcode{#1})% + \fi + \else + \unhbox0\ (\urefcode{#1})% DVI, always show arg and url + \fi + \else + \urefcode{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% Allow line breaks around only a few characters (only). +\def\urefcatcodes{% + \catcode\ampChar=\active \catcode\dotChar=\active + \catcode\hashChar=\active \catcode\questChar=\active + \catcode\slashChar=\active +} +{ + \urefcatcodes + % + \global\def\urefcode{\begingroup + \setupmarkupstyle{code}% + \urefcatcodes + \let&\urefcodeamp + \let.\urefcodedot + \let#\urefcodehash + \let?\urefcodequest + \let/\urefcodeslash + \codex + } + % + % By default, they are just regular characters. + \global\def&{\normalamp} + \global\def.{\normaldot} + \global\def#{\normalhash} + \global\def?{\normalquest} + \global\def/{\normalslash} +} + +% we put a little stretch before and after the breakable chars, to help +% line breaking of long url's. The unequal skips make look better in +% cmtt at least, especially for dots. +\def\urefprestretchamount{.13em} +\def\urefpoststretchamount{.1em} +\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax} +\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax} +% +\def\urefcodeamp{\urefprestretch \&\urefpoststretch} +\def\urefcodedot{\urefprestretch .\urefpoststretch} +\def\urefcodehash{\urefprestretch \#\urefpoststretch} +\def\urefcodequest{\urefprestretch ?\urefpoststretch} +\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} +{ + \catcode`\/=\active + \global\def\urefcodeslashfinish{% + \urefprestretch \slashChar + % Allow line break only after the final / in a sequence of + % slashes, to avoid line break between the slashes in http://. + \ifx\next/\else \urefpoststretch \fi + } +} + +% One more complication: by default we'll break after the special +% characters, but some people like to break before the special chars, so +% allow that. Also allow no breaking at all, for manual control. +% +\parseargdef\urefbreakstyle{% + \def\txiarg{#1}% + \ifx\txiarg\wordnone + \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordbefore + \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordafter + \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} + \else + \errhelp = \EMsimple + \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\wordafter{after} +\def\wordbefore{before} +\def\wordnone{none} + +\urefbreakstyle after + +% @url synonym for @uref, since that's how everyone uses it. +% +\let\url=\uref + +% rms does not like angle brackets --karl, 17may97. +% So now @email is just like @uref, unless we are pdf. +% +%\def\email#1{\angleleft{\tt #1}\angleright} +\ifpdf + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} +\else + \let\email=\uref +\fi + +% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), +% `example' (@kbd uses ttsl only inside of @example and friends), +% or `code' (@kbd uses normal tty font always). +\parseargdef\kbdinputstyle{% + \def\txiarg{#1}% + \ifx\txiarg\worddistinct + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% + \else\ifx\txiarg\wordexample + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% + \else\ifx\txiarg\wordcode + \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\worddistinct{distinct} +\def\wordexample{example} +\def\wordcode{code} + +% Default is `distinct'. +\kbdinputstyle distinct + +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. +\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} + +\def\xkey{\key} +\def\kbdsub#1#2#3\par{% + \def\one{#1}\def\three{#3}\def\threex{??}% + \ifx\one\xkey\ifx\threex\three \key{#2}% + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi + \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi +} + +% definition of @key that produces a lozenge. Doesn't adjust to text size. +%\setfont\keyrm\rmshape{8}{1000}{OT1} +%\font\keysy=cmsy9 +%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% +% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% +% \vbox{\hrule\kern-0.4pt +% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% +% \kern-0.4pt\hrule}% +% \kern-.06em\raise0.4pt\hbox{\angleright}}}} + +% definition of @key with no lozenge. If the current font is already +% monospace, don't change it; that way, we respect @kbdinputstyle. But +% if it isn't monospace, then use \tt. +% +\def\key#1{{\setupmarkupstyle{key}% + \nohyphenation + \ifmonospace\else\tt\fi + #1}\null} + +% @clicksequence{File @click{} Open ...} +\def\clicksequence#1{\begingroup #1\endgroup} + +% @clickstyle @arrow (by default) +\parseargdef\clickstyle{\def\click{#1}} +\def\click{\arrow} + +% Typeset a dimension, e.g., `in' or `pt'. The only reason for the +% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. +% +\def\dmn#1{\thinspace #1} + +% @l was never documented to mean ``switch to the Lisp font'', +% and it is not used as such in any manual I can find. We need it for +% Polish suppressed-l. --karl, 22sep96. +%\def\l#1{{\li #1}\null} + +% @acronym for "FBI", "NATO", and the like. +% We print this one point size smaller, since it's intended for +% all-uppercase. +% +\def\acronym#1{\doacronym #1,,\finish} +\def\doacronym#1,#2,#3\finish{% + {\selectfonts\lsize #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi + \null % reset \spacefactor=1000 +} + +% @abbr for "Comput. J." and the like. +% No font change, but don't do end-of-sentence spacing. +% +\def\abbr#1{\doabbr #1,,\finish} +\def\doabbr#1,#2,#3\finish{% + {\plainfrenchspacing #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi + \null % reset \spacefactor=1000 +} + +% @asis just yields its argument. Used with @table, for example. +% +\def\asis#1{#1} + +% @math outputs its argument in math mode. +% +% One complication: _ usually means subscripts, but it could also mean +% an actual _ character, as in @math{@var{some_variable} + 1}. So make +% _ active, and distinguish by seeing if the current family is \slfam, +% which is what @var uses. +{ + \catcode`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\active + \def_{\ifnum\fam=\slfam \_\else\sb\fi}% + } +} +% Another complication: we want \\ (and @\) to output a math (or tt) \. +% FYI, plain.tex uses \\ as a temporary control sequence (for no +% particular reason), but this is not advertised and we don't care. +% +% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. +\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} +% +\def\math{% + \tex + \mathunderscore + \let\\ = \mathbackslash + \mathactive + % make the texinfo accent commands work in math mode + \let\"=\ddot + \let\'=\acute + \let\==\bar + \let\^=\hat + \let\`=\grave + \let\u=\breve + \let\v=\check + \let\~=\tilde + \let\dotaccent=\dot + $\finishmath +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. + +% Some active characters (such as <) are spaced differently in math. +% We have to reset their definitions in case the @math was an argument +% to a command which sets the catcodes (such as @item or @section). +% +{ + \catcode`^ = \active + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active + \catcode`' = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus + \let' = \ptexquoteright + } +} + +% ctrl is no longer a Texinfo command, but leave this definition for fun. +\def\ctrl #1{{\tt \rawbackslash \hat}#1} + +% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. +% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, +% except specified as a normal braced arg, so no newlines to worry about. +% +\def\outfmtnametex{tex} +% +\long\def\inlinefmt#1{\doinlinefmt #1,\finish} +\long\def\doinlinefmt#1,#2,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi +} +% +% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if +% FMTNAME is tex, else ELSE-TEXT. +\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish} +\long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi +} +% +% For raw, must switch into @tex before parsing the argument, to avoid +% setting catcodes prematurely. Doing it this way means that, for +% example, @inlineraw{html, foo{bar} gets a parse error instead of being +% ignored. But this isn't important because if people want a literal +% *right* brace they would have to use a command anyway, so they may as +% well use a command to get a left brace too. We could re-use the +% delimiter character idea from \verb, but it seems like overkill. +% +\long\def\inlineraw{\tex \doinlineraw} +\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} +\def\doinlinerawtwo#1,#2,\finish{% + \def\inlinerawname{#1}% + \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi + \endgroup % close group opened by \tex. +} + +% @inlineifset{VAR, TEXT} expands TEXT if VAR is @set. +% +\long\def\inlineifset#1{\doinlineifset #1,\finish} +\long\def\doinlineifset#1,#2,\finish{% + \def\inlinevarname{#1}% + \expandafter\ifx\csname SET\inlinevarname\endcsname\relax + \else\ignorespaces#2\fi +} + +% @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set. +% +\long\def\inlineifclear#1{\doinlineifclear #1,\finish} +\long\def\doinlineifclear#1,#2,\finish{% + \def\inlinevarname{#1}% + \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi +} + + +\message{glyphs,} +% and logos. + +% @@ prints an @, as does @atchar{}. +\def\@{\char64 } +\let\atchar=\@ + +% @{ @} @lbracechar{} @rbracechar{} all generate brace characters. +% Unless we're in typewriter, use \ecfont because the CM text fonts do +% not have braces, and we don't want to switch into math. +\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} +\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} +\let\{=\mylbrace \let\lbracechar=\{ +\let\}=\myrbrace \let\rbracechar=\} +\begingroup + % Definitions to produce \{ and \} commands for indices, + % and @{ and @} for the aux/toc files. + \catcode`\{ = \other \catcode`\} = \other + \catcode`\[ = 1 \catcode`\] = 2 + \catcode`\! = 0 \catcode`\\ = \other + !gdef!lbracecmd[\{]% + !gdef!rbracecmd[\}]% + !gdef!lbraceatcmd[@{]% + !gdef!rbraceatcmd[@}]% +!endgroup + +% @comma{} to avoid , parsing problems. +\let\comma = , + +% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. +\let\, = \ptexc +\let\dotaccent = \ptexdot +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \ptext +\let\ubaraccent = \ptexb +\let\udotaccent = \d + +% Other special characters: @questiondown @exclamdown @ordf @ordm +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. +\def\questiondown{?`} +\def\exclamdown{!`} +\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} +\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} + +% Dotless i and dotless j, used for accents. +\def\imacro{i} +\def\jmacro{j} +\def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi + \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi +} + +% The \TeX{} logo, as in plain, but resetting the spacing so that a +% period following counts as ending a sentence. (Idea found in latex.) +% +\edef\TeX{\TeX \spacefactor=1000 } + +% @LaTeX{} logo. Not quite the same results as the definition in +% latex.ltx, since we use a different font for the raised A; it's most +% convenient for us to use an explicitly smaller font, rather than using +% the \scriptstyle font (since we don't reset \scriptstyle and +% \scriptscriptstyle). +% +\def\LaTeX{% + L\kern-.36em + {\setbox0=\hbox{T}% + \vbox to \ht0{\hbox{% + \ifx\textnominalsize\xwordpt + % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. + % Revert to plain's \scriptsize, which is 7pt. + \count255=\the\fam $\fam\count255 \scriptstyle A$% + \else + % For 11pt, we can use our lllsize. + \selectfonts\lllsize A% + \fi + }% + \vss + }}% + \kern-.15em + \TeX +} + +% Some math mode symbols. +\def\bullet{$\ptexbullet$} +\def\geq{\ifmmode \ge\else $\ge$\fi} +\def\leq{\ifmmode \le\else $\le$\fi} +\def\minus{\ifmmode -\else $-$\fi} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. +% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil + }% +} + +% @enddots{} is an end-of-sentence ellipsis. +% +\def\enddots{% + \dots + \spacefactor=\endofsentencespacefactor +} + +% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. +% +% Since these characters are used in examples, they should be an even number of +% \tt widths. Each \tt character is 1en, so two makes it 1em. +% +\def\point{$\star$} +\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} +\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} +\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} + +% The @error{} command. +% Adapted from the TeXbook's \boxit. +% +\newbox\errorbox +% +{\tentt \global\dimen0 = 3em}% Width of the box. +\dimen2 = .55pt % Thickness of rules +% The text. (`r' is open on the right, `e' somewhat less so on the left.) +\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} +% +\setbox\errorbox=\hbox to \dimen0{\hfil + \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. + \advance\hsize by -2\dimen2 % Rules. + \vbox{% + \hrule height\dimen2 + \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. + \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. + \kern3pt\vrule width\dimen2}% Space to right. + \hrule height\dimen2} + \hfil} +% +\def\error{\leavevmode\lower.7ex\copy\errorbox} + +% @pounds{} is a sterling sign, which Knuth put in the CM italic font. +% +\def\pounds{{\it\$}} + +% @euro{} comes from a separate font, depending on the current style. +% We use the free feym* fonts from the eurosym package by Henrik +% Theiling, which support regular, slanted, bold and bold slanted (and +% "outlined" (blackboard board, sort of) versions, which we don't need). +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. +% +% Although only regular is the truly official Euro symbol, we ignore +% that. The Euro is designed to be slightly taller than the regular +% font height. +% +% feymr - regular +% feymo - slanted +% feybr - bold +% feybo - bold slanted +% +% There is no good (free) typewriter version, to my knowledge. +% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. +% Hmm. +% +% Also doesn't work in math. Do we need to do math with euro symbols? +% Hope not. +% +% +\def\euro{{\eurofont e}} +\def\eurofont{% + % We set the font at each command, rather than predefining it in + % \textfonts and the other font-switching commands, so that + % installations which never need the symbol don't have to have the + % font installed. + % + % There is only one designed size (nominal 10pt), so we always scale + % that to the current nominal size. + % + % By the way, simply using "at 1em" works for cmr10 and the like, but + % does not work for cmbx10 and other extended/shrunken fonts. + % + \def\eurosize{\csname\curfontsize nominalsize\endcsname}% + % + \ifx\curfontstyle\bfstylename + % bold: + \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize + \else + % regular: + \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize + \fi + \thiseurofont +} + +% Glyphs from the EC fonts. We don't use \let for the aliases, because +% sometimes we redefine the original macro, and the alias should reflect +% the redefinition. +% +% Use LaTeX names for the Icelandic letters. +\def\DH{{\ecfont \char"D0}} % Eth +\def\dh{{\ecfont \char"F0}} % eth +\def\TH{{\ecfont \char"DE}} % Thorn +\def\th{{\ecfont \char"FE}} % thorn +% +\def\guillemetleft{{\ecfont \char"13}} +\def\guillemotleft{\guillemetleft} +\def\guillemetright{{\ecfont \char"14}} +\def\guillemotright{\guillemetright} +\def\guilsinglleft{{\ecfont \char"0E}} +\def\guilsinglright{{\ecfont \char"0F}} +\def\quotedblbase{{\ecfont \char"12}} +\def\quotesinglbase{{\ecfont \char"0D}} +% +% This positioning is not perfect (see the ogonek LaTeX package), but +% we have the precomposed glyphs for the most common cases. We put the +% tests to use those glyphs in the single \ogonek macro so we have fewer +% dummy definitions to worry about for index entries, etc. +% +% ogonek is also used with other letters in Lithuanian (IOU), but using +% the precomposed glyphs for those is not so easy since they aren't in +% the same EC font. +\def\ogonek#1{{% + \def\temp{#1}% + \ifx\temp\macrocharA\Aogonek + \else\ifx\temp\macrochara\aogonek + \else\ifx\temp\macrocharE\Eogonek + \else\ifx\temp\macrochare\eogonek + \else + \ecfont \setbox0=\hbox{#1}% + \ifdim\ht0=1ex\accent"0C #1% + \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% + \fi + \fi\fi\fi\fi + }% +} +\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} +\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} +\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} +\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} +% +% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. +\def\ecfont{% + % We can't distinguish serif/sans and italic/slanted, but this + % is used for crude hacks anyway (like adding French and German + % quotes to documents typeset with CM, where we lose kerning), so + % hopefully nobody will notice/care. + \edef\ecsize{\csname\curfontsize ecsize\endcsname}% + \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% + \ifmonospace + % typewriter: + \font\thisecfont = ectt\ecsize \space at \nominalsize + \else + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi + \fi + \thisecfont +} + +% @registeredsymbol - R in a circle. The font for the R should really +% be smaller yet, but lllsize is the best we can do for now. +% Adapted from the plain.tex definition of \copyright. +% +\def\registeredsymbol{% + $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% + \hfil\crcr\Orb}}% + }$% +} + +% @textdegree - the normal degrees sign. +% +\def\textdegree{$^\circ$} + +% Laurent Siebenmann reports \Orb undefined with: +% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 +% so we'll define it if necessary. +% +\ifx\Orb\thisisundefined +\def\Orb{\mathhexbox20D} +\fi + +% Quotes. +\chardef\quotedblleft="5C +\chardef\quotedblright=`\" +\chardef\quoteleft=`\` +\chardef\quoteright=`\' + + +\message{page headings,} + +\newskip\titlepagetopglue \titlepagetopglue = 1.5in +\newskip\titlepagebottomglue \titlepagebottomglue = 2pc + +% First the title page. Must do @settitle before @titlepage. +\newif\ifseenauthor +\newif\iffinishedtitlepage + +% Do an implicit @contents or @shortcontents after @end titlepage if the +% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. +% +\newif\ifsetcontentsaftertitlepage + \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue +\newif\ifsetshortcontentsaftertitlepage + \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue + +\parseargdef\shorttitlepage{% + \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} + +\envdef\titlepage{% + % Open one extra group, as we want to close it in the middle of \Etitlepage. + \begingroup + \parindent=0pt \textfonts + % Leave some space at the very top of the page. + \vglue\titlepagetopglue + % No rule at page bottom unless we print one at the top with @title. + \finishedtitlepagetrue + % + % Most title ``pages'' are actually two pages long, with space + % at the top of the second. We don't want the ragged left on the second. + \let\oldpage = \page + \def\page{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + \let\page = \oldpage + \page + \null + }% +} + +\def\Etitlepage{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + % It is important to do the page break before ending the group, + % because the headline and footline are only empty inside the group. + % If we use the new definition of \page, we always get a blank page + % after the title page, which we certainly don't want. + \oldpage + \endgroup + % + % Need this before the \...aftertitlepage checks so that if they are + % in effect the toc pages will come out with page numbers. + \HEADINGSon + % + % If they want short, they certainly want long too. + \ifsetshortcontentsaftertitlepage + \shortcontents + \contents + \global\let\shortcontents = \relax + \global\let\contents = \relax + \fi + % + \ifsetcontentsaftertitlepage + \contents + \global\let\contents = \relax + \global\let\shortcontents = \relax + \fi +} + +\def\finishtitlepage{% + \vskip4pt \hrule height 2pt width \hsize + \vskip\titlepagebottomglue + \finishedtitlepagetrue +} + +% Settings used for typesetting titles: no hyphenation, no indentation, +% don't worry much about spacing, ragged right. This should be used +% inside a \vbox, and fonts need to be set appropriately first. Because +% it is always used for titles, nothing else, we call \rmisbold. \par +% should be specified before the end of the \vbox, since a vbox is a group. +% +\def\raggedtitlesettings{% + \rmisbold + \hyphenpenalty=10000 + \parindent=0pt + \tolerance=5000 + \ptexraggedright +} + +% Macros to be used within @titlepage: + +\let\subtitlerm=\tenrm +\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} + +\parseargdef\title{% + \checkenv\titlepage + \vbox{\titlefonts \raggedtitlesettings #1\par}% + % print a rule at the page bottom also. + \finishedtitlepagefalse + \vskip4pt \hrule height 4pt width \hsize \vskip4pt +} + +\parseargdef\subtitle{% + \checkenv\titlepage + {\subtitlefont \rightline{#1}}% +} + +% @author should come last, but may come many times. +% It can also be used inside @quotation. +% +\parseargdef\author{% + \def\temp{\quotation}% + \ifx\thisenv\temp + \def\quotationauthor{#1}% printed in \Equotation. + \else + \checkenv\titlepage + \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi + {\secfonts\rmisbold \leftline{#1}}% + \fi +} + + +% Set up page headings and footings. + +\let\thispage=\folio + +\newtoks\evenheadline % headline on even pages +\newtoks\oddheadline % headline on odd pages +\newtoks\evenfootline % footline on even pages +\newtoks\oddfootline % footline on odd pages + +% Now make TeX use those variables +\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline + \else \the\evenheadline \fi}} +\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline + \else \the\evenfootline \fi}\HEADINGShook} +\let\HEADINGShook=\relax + +% Commands to set those variables. +% For example, this is what @headings on does +% @evenheading @thistitle|@thispage|@thischapter +% @oddheading @thischapter|@thispage|@thistitle +% @evenfooting @thisfile|| +% @oddfooting ||@thisfile + + +\def\evenheading{\parsearg\evenheadingxxx} +\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} +\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% +\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddheading{\parsearg\oddheadingxxx} +\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} +\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% +\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% + +\def\evenfooting{\parsearg\evenfootingxxx} +\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} +\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% +\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddfooting{\parsearg\oddfootingxxx} +\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} +\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% + \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% + % + % Leave some space for the footline. Hopefully ok to assume + % @evenfooting will not be used by itself. + \global\advance\pageheight by -12pt + \global\advance\vsize by -12pt +} + +\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} + +% @evenheadingmarks top \thischapter <- chapter at the top of a page +% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page +% +% The same set of arguments for: +% +% @oddheadingmarks +% @evenfootingmarks +% @oddfootingmarks +% @everyheadingmarks +% @everyfootingmarks + +\def\evenheadingmarks{\headingmarks{even}{heading}} +\def\oddheadingmarks{\headingmarks{odd}{heading}} +\def\evenfootingmarks{\headingmarks{even}{footing}} +\def\oddfootingmarks{\headingmarks{odd}{footing}} +\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} + \headingmarks{odd}{heading}{#1} } +\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} + \headingmarks{odd}{footing}{#1} } +% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. +\def\headingmarks#1#2#3 {% + \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname + \global\expandafter\let\csname get#1#2marks\endcsname \temp +} + +\everyheadingmarks bottom +\everyfootingmarks bottom + +% @headings double turns headings on for double-sided printing. +% @headings single turns headings on for single-sided printing. +% @headings off turns them off. +% @headings on same as @headings double, retained for compatibility. +% @headings after turns on double-sided headings after this page. +% @headings doubleafter turns on double-sided headings after this page. +% @headings singleafter turns on single-sided headings after this page. +% By default, they are off at the start of a document, +% and turned `on' after @end titlepage. + +\def\headings #1 {\csname HEADINGS#1\endcsname} + +\def\headingsoff{% non-global headings elimination + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% +} + +\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting +\HEADINGSoff % it's the default + +% When we turn headings on, set the page number to 1. +% For double-sided printing, put current file name in lower left corner, +% chapter name on inside top of right hand pages, document +% title on inside top of left hand pages, and page numbers on outside top +% edge of all pages. +\def\HEADINGSdouble{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} +\let\contentsalignmacro = \chappager + +% For single-sided printing, chapter title goes across top left of page, +% page number on top right. +\def\HEADINGSsingle{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} +\def\HEADINGSon{\HEADINGSdouble} + +\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} +\let\HEADINGSdoubleafter=\HEADINGSafter +\def\HEADINGSdoublex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} + +\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} +\def\HEADINGSsinglex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} + +% Subroutines used in generating headings +% This produces Day Month Year style of output. +% Only define if not already defined, in case a txi-??.tex file has set +% up a different format (e.g., txi-cs.tex does this). +\ifx\today\thisisundefined +\def\today{% + \number\day\space + \ifcase\month + \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr + \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug + \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec + \fi + \space\number\year} +\fi + +% @settitle line... specifies the title of the document, for headings. +% It generates no output of its own. +\def\thistitle{\putwordNoTitle} +\def\settitle{\parsearg{\gdef\thistitle}} + + +\message{tables,} +% Tables -- @table, @ftable, @vtable, @item(x). + +% default indentation of table text +\newdimen\tableindent \tableindent=.8in +% default indentation of @itemize and @enumerate text +\newdimen\itemindent \itemindent=.3in +% margin between end of table item and start of table text. +\newdimen\itemmargin \itemmargin=.1in + +% used internally for \itemindent minus \itemmargin +\newdimen\itemmax + +% Note @table, @ftable, and @vtable define @item, @itemx, etc., with +% these defs. +% They also define \itemindex +% to index the item name in whatever manner is desired (perhaps none). + +\newif\ifitemxneedsnegativevskip + +\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} + +\def\internalBitem{\smallbreak \parsearg\itemzzz} +\def\internalBitemx{\itemxpar \parsearg\itemzzz} + +\def\itemzzz #1{\begingroup % + \advance\hsize by -\rightskip + \advance\hsize by -\tableindent + \setbox0=\hbox{\itemindicate{#1}}% + \itemindex{#1}% + \nobreak % This prevents a break before @itemx. + % + % If the item text does not fit in the space we have, put it on a line + % by itself, and do not allow a page break either before or after that + % line. We do not start a paragraph here because then if the next + % command is, e.g., @kindex, the whatsit would get put into the + % horizontal list on a line by itself, resulting in extra blank space. + \ifdim \wd0>\itemmax + % + % Make this a paragraph so we get the \parskip glue and wrapping, + % but leave it ragged-right. + \begingroup + \advance\leftskip by-\tableindent + \advance\hsize by\tableindent + \advance\rightskip by0pt plus1fil\relax + \leavevmode\unhbox0\par + \endgroup + % + % We're going to be starting a paragraph, but we don't want the + % \parskip glue -- logically it's part of the @item we just started. + \nobreak \vskip-\parskip + % + % Stop a page break at the \parskip glue coming up. However, if + % what follows is an environment such as @example, there will be no + % \parskip glue; then the negative vskip we just inserted would + % cause the example and the item to crash together. So we use this + % bizarre value of 10001 as a signal to \aboveenvbreak to insert + % \parskip glue after all. Section titles are handled this way also. + % + \penalty 10001 + \endgroup + \itemxneedsnegativevskipfalse + \else + % The item text fits into the space. Start a paragraph, so that the + % following text (if any) will end up on the same line. + \noindent + % Do this with kerns and \unhbox so that if there is a footnote in + % the item text, it can migrate to the main vertical list and + % eventually be printed. + \nobreak\kern-\tableindent + \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 + \unhbox0 + \nobreak\kern\dimen0 + \endgroup + \itemxneedsnegativevskiptrue + \fi +} + +\def\item{\errmessage{@item while not in a list environment}} +\def\itemx{\errmessage{@itemx while not in a list environment}} + +% @table, @ftable, @vtable. +\envdef\table{% + \let\itemindex\gobble + \tablecheck{table}% +} +\envdef\ftable{% + \def\itemindex ##1{\doind {fn}{\code{##1}}}% + \tablecheck{ftable}% +} +\envdef\vtable{% + \def\itemindex ##1{\doind {vr}{\code{##1}}}% + \tablecheck{vtable}% +} +\def\tablecheck#1{% + \ifnum \the\catcode`\^^M=\active + \endgroup + \errmessage{This command won't work in this context; perhaps the problem is + that we are \inenvironment\thisenv}% + \def\next{\doignore{#1}}% + \else + \let\next\tablex + \fi + \next +} +\def\tablex#1{% + \def\itemindicate{#1}% + \parsearg\tabley +} +\def\tabley#1{% + {% + \makevalueexpandable + \edef\temp{\noexpand\tablez #1\space\space\space}% + \expandafter + }\temp \endtablez +} +\def\tablez #1 #2 #3 #4\endtablez{% + \aboveenvbreak + \ifnum 0#1>0 \advance \leftskip by #1\mil \fi + \ifnum 0#2>0 \tableindent=#2\mil \fi + \ifnum 0#3>0 \advance \rightskip by #3\mil \fi + \itemmax=\tableindent + \advance \itemmax by -\itemmargin + \advance \leftskip by \tableindent + \exdentamount=\tableindent + \parindent = 0pt + \parskip = \smallskipamount + \ifdim \parskip=0pt \parskip=2pt \fi + \let\item = \internalBitem + \let\itemx = \internalBitemx +} +\def\Etable{\endgraf\afterenvbreak} +\let\Eftable\Etable +\let\Evtable\Etable +\let\Eitemize\Etable +\let\Eenumerate\Etable + +% This is the counter used by @enumerate, which is really @itemize + +\newcount \itemno + +\envdef\itemize{\parsearg\doitemize} + +\def\doitemize#1{% + \aboveenvbreak + \itemmax=\itemindent + \advance\itemmax by -\itemmargin + \advance\leftskip by \itemindent + \exdentamount=\itemindent + \parindent=0pt + \parskip=\smallskipamount + \ifdim\parskip=0pt \parskip=2pt \fi + % + % Try typesetting the item mark so that if the document erroneously says + % something like @itemize @samp (intending @table), there's an error + % right away at the @itemize. It's not the best error message in the + % world, but it's better than leaving it to the @item. This means if + % the user wants an empty mark, they have to say @w{} not just @w. + \def\itemcontents{#1}% + \setbox0 = \hbox{\itemcontents}% + % + % @itemize with no arg is equivalent to @itemize @bullet. + \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi + % + \let\item=\itemizeitem +} + +% Definition of @item while inside @itemize and @enumerate. +% +\def\itemizeitem{% + \advance\itemno by 1 % for enumerations + {\let\par=\endgraf \smallbreak}% reasonable place to break + {% + % If the document has an @itemize directly after a section title, a + % \nobreak will be last on the list, and \sectionheading will have + % done a \vskip-\parskip. In that case, we don't want to zero + % parskip, or the item text will crash with the heading. On the + % other hand, when there is normal text preceding the item (as there + % usually is), we do want to zero parskip, or there would be too much + % space. In that case, we won't have a \nobreak before. At least + % that's the theory. + \ifnum\lastpenalty<10000 \parskip=0in \fi + \noindent + \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% + % + \vadjust{\penalty 1200}}% not good to break after first line of item. + \flushcr +} + +% \splitoff TOKENS\endmark defines \first to be the first token in +% TOKENS, and \rest to be the remainder. +% +\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% + +% Allow an optional argument of an uppercase letter, lowercase letter, +% or number, to specify the first label in the enumerated list. No +% argument is the same as `1'. +% +\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} +\def\enumeratey #1 #2\endenumeratey{% + % If we were given no argument, pretend we were given `1'. + \def\thearg{#1}% + \ifx\thearg\empty \def\thearg{1}\fi + % + % Detect if the argument is a single token. If so, it might be a + % letter. Otherwise, the only valid thing it can be is a number. + % (We will always have one token, because of the test we just made. + % This is a good thing, since \splitoff doesn't work given nothing at + % all -- the first parameter is undelimited.) + \expandafter\splitoff\thearg\endmark + \ifx\rest\empty + % Only one token in the argument. It could still be anything. + % A ``lowercase letter'' is one whose \lccode is nonzero. + % An ``uppercase letter'' is one whose \lccode is both nonzero, and + % not equal to itself. + % Otherwise, we assume it's a number. + % + % We need the \relax at the end of the \ifnum lines to stop TeX from + % continuing to look for a . + % + \ifnum\lccode\expandafter`\thearg=0\relax + \numericenumerate % a number (we hope) + \else + % It's a letter. + \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax + \lowercaseenumerate % lowercase letter + \else + \uppercaseenumerate % uppercase letter + \fi + \fi + \else + % Multiple tokens in the argument. We hope it's a number. + \numericenumerate + \fi +} + +% An @enumerate whose labels are integers. The starting integer is +% given in \thearg. +% +\def\numericenumerate{% + \itemno = \thearg + \startenumeration{\the\itemno}% +} + +% The starting (lowercase) letter is in \thearg. +\def\lowercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more lowercase letters in @enumerate; get a bigger + alphabet}% + \fi + \char\lccode\itemno + }% +} + +% The starting (uppercase) letter is in \thearg. +\def\uppercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more uppercase letters in @enumerate; get a bigger + alphabet} + \fi + \char\uccode\itemno + }% +} + +% Call \doitemize, adding a period to the first argument and supplying the +% common last two arguments. Also subtract one from the initial value in +% \itemno, since @item increments \itemno. +% +\def\startenumeration#1{% + \advance\itemno by -1 + \doitemize{#1.}\flushcr +} + +% @alphaenumerate and @capsenumerate are abbreviations for giving an arg +% to @enumerate. +% +\def\alphaenumerate{\enumerate{a}} +\def\capsenumerate{\enumerate{A}} +\def\Ealphaenumerate{\Eenumerate} +\def\Ecapsenumerate{\Eenumerate} + + +% @multitable macros +% Amy Hendrickson, 8/18/94, 3/6/96 +% +% @multitable ... @end multitable will make as many columns as desired. +% Contents of each column will wrap at width given in preamble. Width +% can be specified either with sample text given in a template line, +% or in percent of \hsize, the current width of text on page. + +% Table can continue over pages but will only break between lines. + +% To make preamble: +% +% Either define widths of columns in terms of percent of \hsize: +% @multitable @columnfractions .25 .3 .45 +% @item ... +% +% Numbers following @columnfractions are the percent of the total +% current hsize to be used for each column. You may use as many +% columns as desired. + + +% Or use a template: +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item ... +% using the widest term desired in each column. + +% Each new table line starts with @item, each subsequent new column +% starts with @tab. Empty columns may be produced by supplying @tab's +% with nothing between them for as many times as empty columns are needed, +% ie, @tab@tab@tab will produce two empty columns. + +% @item, @tab do not need to be on their own lines, but it will not hurt +% if they are. + +% Sample multitable: + +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item first col stuff @tab second col stuff @tab third col +% @item +% first col stuff +% @tab +% second col stuff +% @tab +% third col +% @item first col stuff @tab second col stuff +% @tab Many paragraphs of text may be used in any column. +% +% They will wrap at the width determined by the template. +% @item@tab@tab This will be in third column. +% @end multitable + +% Default dimensions may be reset by user. +% @multitableparskip is vertical space between paragraphs in table. +% @multitableparindent is paragraph indent in table. +% @multitablecolmargin is horizontal space to be left between columns. +% @multitablelinespace is space to leave between table items, baseline +% to baseline. +% 0pt means it depends on current normal line spacing. +% +\newskip\multitableparskip +\newskip\multitableparindent +\newdimen\multitablecolspace +\newskip\multitablelinespace +\multitableparskip=0pt +\multitableparindent=6pt +\multitablecolspace=12pt +\multitablelinespace=0pt + +% Macros used to set up halign preamble: +% +\let\endsetuptable\relax +\def\xendsetuptable{\endsetuptable} +\let\columnfractions\relax +\def\xcolumnfractions{\columnfractions} +\newif\ifsetpercent + +% #1 is the @columnfraction, usually a decimal number like .5, but might +% be just 1. We just use it, whatever it is. +% +\def\pickupwholefraction#1 {% + \global\advance\colcount by 1 + \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% + \setuptable +} + +\newcount\colcount +\def\setuptable#1{% + \def\firstarg{#1}% + \ifx\firstarg\xendsetuptable + \let\go = \relax + \else + \ifx\firstarg\xcolumnfractions + \global\setpercenttrue + \else + \ifsetpercent + \let\go\pickupwholefraction + \else + \global\advance\colcount by 1 + \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a + % separator; typically that is always in the input, anyway. + \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% + \fi + \fi + \ifx\go\pickupwholefraction + % Put the argument back for the \pickupwholefraction call, so + % we'll always have a period there to be parsed. + \def\go{\pickupwholefraction#1}% + \else + \let\go = \setuptable + \fi% + \fi + \go +} + +% multitable-only commands. +% +% @headitem starts a heading row, which we typeset in bold. Assignments +% have to be global since we are inside the implicit group of an +% alignment entry. \everycr below resets \everytab so we don't have to +% undo it ourselves. +\def\headitemfont{\b}% for people to use in the template row; not changeable +\def\headitem{% + \checkenv\multitable + \crcr + \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings + \global\everytab={\bf}% can't use \headitemfont since the parsing differs + \the\everytab % for the first item +}% +% +% default for tables with no headings. +\let\headitemcrhook=\relax +% +% A \tab used to include \hskip1sp. But then the space in a template +% line is not enough. That is bad. So let's go back to just `&' until +% we again encounter the problem the 1sp was intended to solve. +% --karl, nathan@acm.org, 20apr99. +\def\tab{\checkenv\multitable &\the\everytab}% + +% @multitable ... @end multitable definitions: +% +\newtoks\everytab % insert after every tab. +% +\envdef\multitable{% + \vskip\parskip + \startsavinginserts + % + % @item within a multitable starts a normal row. + % We use \def instead of \let so that if one of the multitable entries + % contains an @itemize, we don't choke on the \item (seen as \crcr aka + % \endtemplate) expanding \doitemize. + \def\item{\crcr}% + % + \tolerance=9500 + \hbadness=9500 + \setmultitablespacing + \parskip=\multitableparskip + \parindent=\multitableparindent + \overfullrule=0pt + \global\colcount=0 + % + \everycr = {% + \noalign{% + \global\everytab={}% Reset from possible headitem. + \global\colcount=0 % Reset the column counter. + % + % Check for saved footnotes, etc.: + \checkinserts + % + % Perhaps a \nobreak, then reset: + \headitemcrhook + \global\let\headitemcrhook=\relax + }% + }% + % + \parsearg\domultitable +} +\def\domultitable#1{% + % To parse everything between @multitable and @item: + \setuptable#1 \endsetuptable + % + % This preamble sets up a generic column definition, which will + % be used as many times as user calls for columns. + % \vtop will set a single line and will also let text wrap and + % continue for many paragraphs if desired. + \halign\bgroup &% + \global\advance\colcount by 1 + \multistrut + \vtop{% + % Use the current \colcount to find the correct column width: + \hsize=\expandafter\csname col\the\colcount\endcsname + % + % In order to keep entries from bumping into each other + % we will add a \leftskip of \multitablecolspace to all columns after + % the first one. + % + % If a template has been used, we will add \multitablecolspace + % to the width of each template entry. + % + % If the user has set preamble in terms of percent of \hsize we will + % use that dimension as the width of the column, and the \leftskip + % will keep entries from bumping into each other. Table will start at + % left margin and final column will justify at right margin. + % + % Make sure we don't inherit \rightskip from the outer environment. + \rightskip=0pt + \ifnum\colcount=1 + % The first column will be indented with the surrounding text. + \advance\hsize by\leftskip + \else + \ifsetpercent \else + % If user has not set preamble in terms of percent of \hsize + % we will advance \hsize by \multitablecolspace. + \advance\hsize by \multitablecolspace + \fi + % In either case we will make \leftskip=\multitablecolspace: + \leftskip=\multitablecolspace + \fi + % Ignoring space at the beginning and end avoids an occasional spurious + % blank line, when TeX decides to break the line at the space before the + % box from the multistrut, so the strut ends up on a line by itself. + % For example: + % @multitable @columnfractions .11 .89 + % @item @code{#} + % @tab Legal holiday which is valid in major parts of the whole country. + % Is automatically provided with highlighting sequences respectively + % marking characters. + \noindent\ignorespaces##\unskip\multistrut + }\cr +} +\def\Emultitable{% + \crcr + \egroup % end the \halign + \global\setpercentfalse +} + +\def\setmultitablespacing{% + \def\multistrut{\strut}% just use the standard line spacing + % + % Compute \multitablelinespace (if not defined by user) for use in + % \multitableparskip calculation. We used define \multistrut based on + % this, but (ironically) that caused the spacing to be off. + % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. +\ifdim\multitablelinespace=0pt +\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip +\global\advance\multitablelinespace by-\ht0 +\fi +% Test to see if parskip is larger than space between lines of +% table. If not, do nothing. +% If so, set to same dimension as multitablelinespace. +\ifdim\multitableparskip>\multitablelinespace +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. +\fi% +\ifdim\multitableparskip=0pt +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. +\fi} + + +\message{conditionals,} + +% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, +% @ifnotxml always succeed. They currently do nothing; we don't +% attempt to check whether the conditionals are properly nested. But we +% have to remember that they are conditionals, so that @end doesn't +% attempt to close an environment group. +% +\def\makecond#1{% + \expandafter\let\csname #1\endcsname = \relax + \expandafter\let\csname iscond.#1\endcsname = 1 +} +\makecond{iftex} +\makecond{ifnotdocbook} +\makecond{ifnothtml} +\makecond{ifnotinfo} +\makecond{ifnotplaintext} +\makecond{ifnotxml} + +% Ignore @ignore, @ifhtml, @ifinfo, and the like. +% +\def\direntry{\doignore{direntry}} +\def\documentdescription{\doignore{documentdescription}} +\def\docbook{\doignore{docbook}} +\def\html{\doignore{html}} +\def\ifdocbook{\doignore{ifdocbook}} +\def\ifhtml{\doignore{ifhtml}} +\def\ifinfo{\doignore{ifinfo}} +\def\ifnottex{\doignore{ifnottex}} +\def\ifplaintext{\doignore{ifplaintext}} +\def\ifxml{\doignore{ifxml}} +\def\ignore{\doignore{ignore}} +\def\menu{\doignore{menu}} +\def\xml{\doignore{xml}} + +% Ignore text until a line `@end #1', keeping track of nested conditionals. +% +% A count to remember the depth of nesting. +\newcount\doignorecount + +\def\doignore#1{\begingroup + % Scan in ``verbatim'' mode: + \obeylines + \catcode`\@ = \other + \catcode`\{ = \other + \catcode`\} = \other + % + % Make sure that spaces turn into tokens that match what \doignoretext wants. + \spaceisspace + % + % Count number of #1's that we've seen. + \doignorecount = 0 + % + % Swallow text until we reach the matching `@end #1'. + \dodoignore{#1}% +} + +{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. + \obeylines % + % + \gdef\dodoignore#1{% + % #1 contains the command name as a string, e.g., `ifinfo'. + % + % Define a command to find the next `@end #1'. + \long\def\doignoretext##1^^M@end #1{% + \doignoretextyyy##1^^M@#1\_STOP_}% + % + % And this command to find another #1 command, at the beginning of a + % line. (Otherwise, we would consider a line `@c @ifset', for + % example, to count as an @ifset for nesting.) + \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% + % + % And now expand that command. + \doignoretext ^^M% + }% +} + +\def\doignoreyyy#1{% + \def\temp{#1}% + \ifx\temp\empty % Nothing found. + \let\next\doignoretextzzz + \else % Found a nested condition, ... + \advance\doignorecount by 1 + \let\next\doignoretextyyy % ..., look for another. + % If we're here, #1 ends with ^^M\ifinfo (for example). + \fi + \next #1% the token \_STOP_ is present just after this macro. +} + +% We have to swallow the remaining "\_STOP_". +% +\def\doignoretextzzz#1{% + \ifnum\doignorecount = 0 % We have just found the outermost @end. + \let\next\enddoignore + \else % Still inside a nested condition. + \advance\doignorecount by -1 + \let\next\doignoretext % Look for the next @end. + \fi + \next +} + +% Finish off ignored text. +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% +} + + +% @set VAR sets the variable VAR to an empty value. +% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. +% +% Since we want to separate VAR from REST-OF-LINE (which might be +% empty), we can't just use \parsearg; we have to insert a space of our +% own to delimit the rest of the line, and then take it out again if we +% didn't need it. +% We rely on the fact that \parsearg sets \catcode`\ =10. +% +\parseargdef\set{\setyyy#1 \endsetyyy} +\def\setyyy#1 #2\endsetyyy{% + {% + \makevalueexpandable + \def\temp{#2}% + \edef\next{\gdef\makecsname{SET#1}}% + \ifx\temp\empty + \next{}% + \else + \setzzz#2\endsetzzz + \fi + }% +} +% Remove the trailing space \setxxx inserted. +\def\setzzz#1 \endsetzzz{\next{#1}} + +% @clear VAR clears (i.e., unsets) the variable VAR. +% +\parseargdef\clear{% + {% + \makevalueexpandable + \global\expandafter\let\csname SET#1\endcsname=\relax + }% +} + +% @value{foo} gets the text saved in variable foo. +\def\value{\begingroup\makevalueexpandable\valuexxx} +\def\valuexxx#1{\expandablevalue{#1}\endgroup} +{ + \catcode`\-=\active \catcode`\_=\active + % + \gdef\makevalueexpandable{% + \let\value = \expandablevalue + % We don't want these characters active, ... + \catcode`\-=\other \catcode`\_=\other + % ..., but we might end up with active ones in the argument if + % we're called from @code, as @code{@value{foo-bar_}}, though. + % So \let them to their normal equivalents. + \let-\normaldash \let_\normalunderscore + } +} + +% We have this subroutine so that we can handle at least some @value's +% properly in indexes (we call \makevalueexpandable in \indexdummies). +% The command has to be fully expandable (if the variable is set), since +% the result winds up in the index file. This means that if the +% variable's value contains other Texinfo commands, it's almost certain +% it will fail (although perhaps we could fix that with sufficient work +% to do a one-level expansion on the result, instead of complete). +% +% Unfortunately, this has the consequence that when _ is in the *value* +% of an @set, it does not print properly in the roman fonts (get the cmr +% dot accent at position 126 instead). No fix comes to mind, and it's +% been this way since 2003 or earlier, so just ignore it. +% +\def\expandablevalue#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + {[No value for ``#1'']}% + \message{Variable `#1', used in @value, is not set.}% + \else + \csname SET#1\endcsname + \fi +} + +% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined +% with @set. +% +% To get the special treatment we need for `@end ifset,' we call +% \makecond and then redefine. +% +\makecond{ifset} +\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} +\def\doifset#1#2{% + {% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname SET#2\endcsname\relax + #1% If not set, redefine \next. + \fi + \expandafter + }\next +} +\def\ifsetfail{\doignore{ifset}} + +% @ifclear VAR ... @end executes the `...' iff VAR has never been +% defined with @set, or has been undefined with @clear. +% +% The `\else' inside the `\doifset' parameter is a trick to reuse the +% above code: if the variable is not set, do nothing, if it is set, +% then redefine \next to \ifclearfail. +% +\makecond{ifclear} +\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} +\def\ifclearfail{\doignore{ifclear}} + +% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written +% without the @) is in fact defined. We can only feasibly check at the +% TeX level, so something like `mathcode' is going to considered +% defined even though it is not a Texinfo command. +% +\makecond{ifcommanddefined} +\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} +% +\def\doifcmddefined#1#2{{% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname #2\endcsname\relax + #1% If not defined, \let\next as above. + \fi + \expandafter + }\next +} +\def\ifcmddefinedfail{\doignore{ifcommanddefined}} + +% @ifcommandnotdefined CMD ... handled similar to @ifclear above. +\makecond{ifcommandnotdefined} +\def\ifcommandnotdefined{% + \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} +\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} + +% Set the `txicommandconditionals' variable, so documents have a way to +% test if the @ifcommand...defined conditionals are available. +\set txicommandconditionals + +% @dircategory CATEGORY -- specify a category of the dir file +% which this file should belong to. Ignore this in TeX. +\let\dircategory=\comment + +% @defininfoenclose. +\let\definfoenclose=\comment + + +\message{indexing,} +% Index generation facilities + +% Define \newwrite to be identical to plain tex's \newwrite +% except not \outer, so it can be used within macros and \if's. +\edef\newwrite{\makecsname{ptexnewwrite}} + +% \newindex {foo} defines an index named foo. +% It automatically defines \fooindex such that +% \fooindex ...rest of line... puts an entry in the index foo. +% It also defines \fooindfile to be the number of the output channel for +% the file that accumulates this index. The file's extension is foo. +% The name of an index should be no more than 2 characters long +% for the sake of vms. +% +\def\newindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 % Open the file + \fi + \expandafter\xdef\csname#1index\endcsname{% % Define @#1index + \noexpand\doindex{#1}} +} + +% @defindex foo == \newindex{foo} +% +\def\defindex{\parsearg\newindex} + +% Define @defcodeindex, like @defindex except put all entries in @code. +% +\def\defcodeindex{\parsearg\newcodeindex} +% +\def\newcodeindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 + \fi + \expandafter\xdef\csname#1index\endcsname{% + \noexpand\docodeindex{#1}}% +} + + +% @synindex foo bar makes index foo feed into index bar. +% Do this instead of @defindex foo if you don't want it as a separate index. +% +% @syncodeindex foo bar similar, but put all entries made for index foo +% inside @code. +% +\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} +\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} + +% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), +% #3 the target index (bar). +\def\dosynindex#1#2#3{% + % Only do \closeout if we haven't already done it, else we'll end up + % closing the target index. + \expandafter \ifx\csname donesynindex#2\endcsname \relax + % The \closeout helps reduce unnecessary open files; the limit on the + % Acorn RISC OS is a mere 16 files. + \expandafter\closeout\csname#2indfile\endcsname + \expandafter\let\csname donesynindex#2\endcsname = 1 + \fi + % redefine \fooindfile: + \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname + \expandafter\let\csname#2indfile\endcsname=\temp + % redefine \fooindex: + \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% +} + +% Define \doindex, the driver for all \fooindex macros. +% Argument #1 is generated by the calling \fooindex macro, +% and it is "foo", the name of the index. + +% \doindex just uses \parsearg; it calls \doind for the actual work. +% This is because \doind is more useful to call from other macros. + +% There is also \dosubind {index}{topic}{subtopic} +% which makes an entry in a two-level index such as the operation index. + +\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} +\def\singleindexer #1{\doind{\indexname}{#1}} + +% like the previous two, but they put @code around the argument. +\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} +\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} + +% Take care of Texinfo commands that can appear in an index entry. +% Since there are some commands we want to expand, and others we don't, +% we have to laboriously prevent expansion for those that we don't. +% +\def\indexdummies{% + \escapechar = `\\ % use backslash in output files. + \def\@{@}% change to @@ when we switch to @ as escape char in index files. + \def\ {\realbackslash\space }% + % + % Need these unexpandable (because we define \tt as a dummy) + % definitions when @{ or @} appear in index entry text. Also, more + % complicated, when \tex is in effect and \{ is a \delimiter again. + % We can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. Perhaps we + % should use @lbracechar and @rbracechar? + \def\{{{\tt\char123}}% + \def\}{{\tt\char125}}% + % + % I don't entirely understand this, but when an index entry is + % generated from a macro call, the \endinput which \scanmacro inserts + % causes processing to be prematurely terminated. This is, + % apparently, because \indexsorttmp is fully expanded, and \endinput + % is an expandable command. The redefinition below makes \endinput + % disappear altogether for that purpose -- although logging shows that + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. + % + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} + % @findex xyz + % @end macro + % ... + % @funindex commtest + % This is not enough to reproduce the bug, but it gives the flavor. + % + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} + % + % So: + \let\endinput = \empty + % + % Do the redefinitions. + \commondummies +} + +% For the aux and toc files, @ is the escape character. So we want to +% redefine everything using @ as the escape character (instead of +% \realbackslash, still used for index files). When everything uses @, +% this will be simpler. +% +\def\atdummies{% + \def\@{@@}% + \def\ {@ }% + \let\{ = \lbraceatcmd + \let\} = \rbraceatcmd + % + % Do the redefinitions. + \commondummies + \otherbackslash +} + +% Called from \indexdummies and \atdummies. +% +\def\commondummies{% + % + % \definedummyword defines \#1 as \string\#1\space, thus effectively + % preventing its expansion. This is used only for control words, + % not control letters, because the \space would be incorrect for + % control characters, but is needed to separate the control word + % from whatever follows. + % + % For control letters, we have \definedummyletter, which omits the + % space. + % + % These can be used both for control words that take an argument and + % those that do not. If it is followed by {arg} in the input, then + % that will dutifully get written to the index (or wherever). + % + \def\definedummyword ##1{\def##1{\string##1\space}}% + \def\definedummyletter##1{\def##1{\string##1}}% + \let\definedummyaccent\definedummyletter + % + \commondummiesnofonts + % + \definedummyletter\_% + \definedummyletter\-% + % + % Non-English letters. + \definedummyword\AA + \definedummyword\AE + \definedummyword\DH + \definedummyword\L + \definedummyword\O + \definedummyword\OE + \definedummyword\TH + \definedummyword\aa + \definedummyword\ae + \definedummyword\dh + \definedummyword\exclamdown + \definedummyword\l + \definedummyword\o + \definedummyword\oe + \definedummyword\ordf + \definedummyword\ordm + \definedummyword\questiondown + \definedummyword\ss + \definedummyword\th + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword\bf + \definedummyword\gtr + \definedummyword\hat + \definedummyword\less + \definedummyword\sf + \definedummyword\sl + \definedummyword\tclose + \definedummyword\tt + % + \definedummyword\LaTeX + \definedummyword\TeX + % + % Assorted special characters. + \definedummyword\arrow + \definedummyword\bullet + \definedummyword\comma + \definedummyword\copyright + \definedummyword\registeredsymbol + \definedummyword\dots + \definedummyword\enddots + \definedummyword\entrybreak + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro + \definedummyword\expansion + \definedummyword\geq + \definedummyword\guillemetleft + \definedummyword\guillemetright + \definedummyword\guilsinglleft + \definedummyword\guilsinglright + \definedummyword\lbracechar + \definedummyword\leq + \definedummyword\minus + \definedummyword\ogonek + \definedummyword\pounds + \definedummyword\point + \definedummyword\print + \definedummyword\quotedblbase + \definedummyword\quotedblleft + \definedummyword\quotedblright + \definedummyword\quoteleft + \definedummyword\quoteright + \definedummyword\quotesinglbase + \definedummyword\rbracechar + \definedummyword\result + \definedummyword\textdegree + % + % We want to disable all macros so that they are not expanded by \write. + \macrolist + % + \normalturnoffactive + % + % Handle some cases of @value -- where it does not contain any + % (non-fully-expandable) commands. + \makevalueexpandable +} + +% \commondummiesnofonts: common to \commondummies and \indexnofonts. +% +\def\commondummiesnofonts{% + % Control letters and accents. + \definedummyletter\!% + \definedummyaccent\"% + \definedummyaccent\'% + \definedummyletter\*% + \definedummyaccent\,% + \definedummyletter\.% + \definedummyletter\/% + \definedummyletter\:% + \definedummyaccent\=% + \definedummyletter\?% + \definedummyaccent\^% + \definedummyaccent\`% + \definedummyaccent\~% + \definedummyword\u + \definedummyword\v + \definedummyword\H + \definedummyword\dotaccent + \definedummyword\ogonek + \definedummyword\ringaccent + \definedummyword\tieaccent + \definedummyword\ubaraccent + \definedummyword\udotaccent + \definedummyword\dotless + % + % Texinfo font commands. + \definedummyword\b + \definedummyword\i + \definedummyword\r + \definedummyword\sansserif + \definedummyword\sc + \definedummyword\slanted + \definedummyword\t + % + % Commands that take arguments. + \definedummyword\abbr + \definedummyword\acronym + \definedummyword\anchor + \definedummyword\cite + \definedummyword\code + \definedummyword\command + \definedummyword\dfn + \definedummyword\dmn + \definedummyword\email + \definedummyword\emph + \definedummyword\env + \definedummyword\file + \definedummyword\image + \definedummyword\indicateurl + \definedummyword\inforef + \definedummyword\kbd + \definedummyword\key + \definedummyword\math + \definedummyword\option + \definedummyword\pxref + \definedummyword\ref + \definedummyword\samp + \definedummyword\strong + \definedummyword\tie + \definedummyword\uref + \definedummyword\url + \definedummyword\var + \definedummyword\verb + \definedummyword\w + \definedummyword\xref + % + % Consider: + % @macro mkind{arg1,arg2} + % @cindex \arg2\ + % @end macro + % @mkind{foo, bar} + % The space after the comma will end up in the temporary definition + % that we make for arg2 (see \parsemargdef ff.). We want all this to be + % expanded for the sake of the index, so we end up just seeing "bar". + \let\xeatspaces = \eatspaces +} + +% For testing: output @{ and @} in index sort strings as \{ and \}. +\newif\ifusebracesinindexes + +% \indexnofonts is used when outputting the strings to sort the index +% by, and when constructing control sequence names. It eliminates all +% control sequences and just writes whatever the best ASCII sort string +% would be for a given command (usually its argument). +% +\def\indexnofonts{% + % Accent commands should become @asis. + \def\definedummyaccent##1{\let##1\asis}% + % We can just ignore other control letters. + \def\definedummyletter##1{\let##1\empty}% + % All control words become @asis by default; overrides below. + \let\definedummyword\definedummyaccent + % + \commondummiesnofonts + % + % Don't no-op \tt, since it isn't a user-level command + % and is used in the definitions of the active chars like <, >, |, etc. + % Likewise with the other plain tex font commands. + %\let\tt=\asis + % + \def\ { }% + \def\@{@}% + \def\_{\normalunderscore}% + \def\-{}% @- shouldn't affect sorting + % + % Unfortunately, texindex is not prepared to handle braces in the + % content at all. So for index sorting, we map @{ and @} to strings + % starting with |, since that ASCII character is between ASCII { and }. + \ifusebracesinindexes + \def\lbracechar{\lbracecmd}% + \def\rbracechar{\rbracecmd}% + \else + \def\lbracechar{|a}% + \def\rbracechar{|b}% + \fi + \let\{=\lbracechar + \let\}=\rbracechar + % + % + % Non-English letters. + \def\AA{AA}% + \def\AE{AE}% + \def\DH{DZZ}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% + \def\TH{ZZZ}% + \def\aa{aa}% + \def\ae{ae}% + \def\dh{dzz}% + \def\exclamdown{!}% + \def\l{l}% + \def\oe{oe}% + \def\ordf{a}% + \def\ordm{o}% + \def\o{o}% + \def\questiondown{?}% + \def\ss{ss}% + \def\th{zzz}% + % + \def\LaTeX{LaTeX}% + \def\TeX{TeX}% + % + % Assorted special characters. + % (The following {} will end up in the sort string, but that's ok.) + \def\arrow{->}% + \def\bullet{bullet}% + \def\comma{,}% + \def\copyright{copyright}% + \def\dots{...}% + \def\enddots{...}% + \def\equiv{==}% + \def\error{error}% + \def\euro{euro}% + \def\expansion{==>}% + \def\geq{>=}% + \def\guillemetleft{<<}% + \def\guillemetright{>>}% + \def\guilsinglleft{<}% + \def\guilsinglright{>}% + \def\leq{<=}% + \def\minus{-}% + \def\point{.}% + \def\pounds{pounds}% + \def\print{-|}% + \def\quotedblbase{"}% + \def\quotedblleft{"}% + \def\quotedblright{"}% + \def\quoteleft{`}% + \def\quoteright{'}% + \def\quotesinglbase{,}% + \def\registeredsymbol{R}% + \def\result{=>}% + \def\textdegree{o}% + % + \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax + \else \indexlquoteignore \fi + % + % We need to get rid of all macros, leaving only the arguments (if present). + % Of course this is not nearly correct, but it is the best we can do for now. + % makeinfo does not expand macros in the argument to @deffn, which ends up + % writing an index entry, and texindex isn't prepared for an index sort entry + % that starts with \. + % + % Since macro invocations are followed by braces, we can just redefine them + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. + % + \macrolist +} + +% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us +% ignore left quotes in the sort term. +{\catcode`\`=\active + \gdef\indexlquoteignore{\let`=\empty}} + +\let\indexbackslash=0 %overridden during \printindex. +\let\SETmarginindex=\relax % put index entries in margin (undocumented)? + +% Most index entries go through here, but \dosubind is the general case. +% #1 is the index name, #2 is the entry text. +\def\doind#1#2{\dosubind{#1}{#2}{}} + +% Workhorse for all \fooindexes. +% #1 is name of index, #2 is stuff to put there, #3 is subentry -- +% empty if called from \doind, as we usually are (the main exception +% is with most defuns, which call us directly). +% +\def\dosubind#1#2#3{% + \iflinks + {% + % Store the main index entry text (including the third arg). + \toks0 = {#2}% + % If third arg is present, precede it with a space. + \def\thirdarg{#3}% + \ifx\thirdarg\empty \else + \toks0 = \expandafter{\the\toks0 \space #3}% + \fi + % + \edef\writeto{\csname#1indfile\endcsname}% + % + \safewhatsit\dosubindwrite + }% + \fi +} + +% Write the entry in \toks0 to the index file: +% +\def\dosubindwrite{% + % Put the index entry in the margin if desired. + \ifx\SETmarginindex\relax\else + \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% + \fi + % + % Remember, we are within a group. + \indexdummies % Must do this here, since \bf, etc expand at this stage + \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now + % so it will be output as is; and it will print as backslash. + % + % Process the index entry with all font commands turned off, to + % get the string to sort by. + {\indexnofonts + \edef\temp{\the\toks0}% need full expansion + \xdef\indexsorttmp{\temp}% + }% + % + % Set up the complete index entry, with both the sort key and + % the original text, including any font commands. We write + % three arguments to \entry to the .?? file (four in the + % subentry case), texindex reduces to two when writing the .??s + % sorted result. + \edef\temp{% + \write\writeto{% + \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% + }% + \temp +} + +% Take care of unwanted page breaks/skips around a whatsit: +% +% If a skip is the last thing on the list now, preserve it +% by backing up by \lastskip, doing the \write, then inserting +% the skip again. Otherwise, the whatsit generated by the +% \write or \pdfdest will make \lastskip zero. The result is that +% sequences like this: +% @end defun +% @tindex whatever +% @defun ... +% will have extra space inserted, because the \medbreak in the +% start of the @defun won't see the skip inserted by the @end of +% the previous defun. +% +% But don't do any of this if we're not in vertical mode. We +% don't want to do a \vskip and prematurely end a paragraph. +% +% Avoid page breaks due to these extra skips, too. +% +% But wait, there is a catch there: +% We'll have to check whether \lastskip is zero skip. \ifdim is not +% sufficient for this purpose, as it ignores stretch and shrink parts +% of the skip. The only way seems to be to check the textual +% representation of the skip. +% +% The following is almost like \def\zeroskipmacro{0.0pt} except that +% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). +% +\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} +% +\newskip\whatsitskip +\newcount\whatsitpenalty +% +% ..., ready, GO: +% +\def\safewhatsit#1{\ifhmode + #1% + \else + % \lastskip and \lastpenalty cannot both be nonzero simultaneously. + \whatsitskip = \lastskip + \edef\lastskipmacro{\the\lastskip}% + \whatsitpenalty = \lastpenalty + % + % If \lastskip is nonzero, that means the last item was a + % skip. And since a skip is discardable, that means this + % -\whatsitskip glue we're inserting is preceded by a + % non-discardable item, therefore it is not a potential + % breakpoint, therefore no \nobreak needed. + \ifx\lastskipmacro\zeroskipmacro + \else + \vskip-\whatsitskip + \fi + % + #1% + % + \ifx\lastskipmacro\zeroskipmacro + % If \lastskip was zero, perhaps the last item was a penalty, and + % perhaps it was >=10000, e.g., a \nobreak. In that case, we want + % to re-insert the same penalty (values >10000 are used for various + % signals); since we just inserted a non-discardable item, any + % following glue (such as a \parskip) would be a breakpoint. For example: + % @deffn deffn-whatever + % @vindex index-whatever + % Description. + % would allow a break between the index-whatever whatsit + % and the "Description." paragraph. + \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi + \else + % On the other hand, if we had a nonzero \lastskip, + % this make-up glue would be preceded by a non-discardable item + % (the whatsit from the \write), so we must insert a \nobreak. + \nobreak\vskip\whatsitskip + \fi +\fi} + +% The index entry written in the file actually looks like +% \entry {sortstring}{page}{topic} +% or +% \entry {sortstring}{page}{topic}{subtopic} +% The texindex program reads in these files and writes files +% containing these kinds of lines: +% \initial {c} +% before the first topic whose initial is c +% \entry {topic}{pagelist} +% for a topic that is used without subtopics +% \primary {topic} +% for the beginning of a topic that is used with subtopics +% \secondary {subtopic}{pagelist} +% for each subtopic. + +% Define the user-accessible indexing commands +% @findex, @vindex, @kindex, @cindex. + +\def\findex {\fnindex} +\def\kindex {\kyindex} +\def\cindex {\cpindex} +\def\vindex {\vrindex} +\def\tindex {\tpindex} +\def\pindex {\pgindex} + +\def\cindexsub {\begingroup\obeylines\cindexsub} +{\obeylines % +\gdef\cindexsub "#1" #2^^M{\endgroup % +\dosubind{cp}{#2}{#1}}} + +% Define the macros used in formatting output of the sorted index material. + +% @printindex causes a particular index (the ??s file) to get printed. +% It does not print any chapter heading (usually an @unnumbered). +% +\parseargdef\printindex{\begingroup + \dobreak \chapheadingskip{10000}% + % + \smallfonts \rm + \tolerance = 9500 + \plainfrenchspacing + \everypar = {}% don't want the \kern\-parindent from indentation suppression. + % + % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains + % \initial {@} + % as its first line, TeX doesn't complain about mismatched braces + % (because it thinks @} is a control sequence). + \catcode`\@ = 11 + \openin 1 \jobname.#1s + \ifeof 1 + % \enddoublecolumns gets confused if there is no text in the index, + % and it loses the chapter title and the aux file entries for the + % index. The easiest way to prevent this problem is to make sure + % there is some text. + \putwordIndexNonexistent + \else + % + % If the index file exists but is empty, then \openin leaves \ifeof + % false. We have to make TeX try to read something from the file, so + % it can discover if there is anything in it. + \read 1 to \temp + \ifeof 1 + \putwordIndexIsEmpty + \else + % Index files are almost Texinfo source, but we use \ as the escape + % character. It would be better to use @, but that's too big a change + % to make right now. + \def\indexbackslash{\backslashcurfont}% + \catcode`\\ = 0 + \escapechar = `\\ + \begindoublecolumns + \input \jobname.#1s + \enddoublecolumns + \fi + \fi + \closein 1 +\endgroup} + +% These macros are used by the sorted index file itself. +% Change them to control the appearance of the index. + +\def\initial#1{{% + % Some minor font changes for the special characters. + \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt + % + % Remove any glue we may have, we'll be inserting our own. + \removelastskip + % + % We like breaks before the index initials, so insert a bonus. + \nobreak + \vskip 0pt plus 3\baselineskip + \penalty 0 + \vskip 0pt plus -3\baselineskip + % + % Typeset the initial. Making this add up to a whole number of + % baselineskips increases the chance of the dots lining up from column + % to column. It still won't often be perfect, because of the stretch + % we need before each entry, but it's better. + % + % No shrink because it confuses \balancecolumns. + \vskip 1.67\baselineskip plus .5\baselineskip + \leftline{\secbf #1}% + % Do our best not to break after the initial. + \nobreak + \vskip .33\baselineskip plus .1\baselineskip +}} + +% \entry typesets a paragraph consisting of the text (#1), dot leaders, and +% then page number (#2) flushed to the right margin. It is used for index +% and table of contents entries. The paragraph is indented by \leftskip. +% +% A straightforward implementation would start like this: +% \def\entry#1#2{... +% But this freezes the catcodes in the argument, and can cause problems to +% @code, which sets - active. This problem was fixed by a kludge--- +% ``-'' was active throughout whole index, but this isn't really right. +% The right solution is to prevent \entry from swallowing the whole text. +% --kasal, 21nov03 +\def\entry{% + \begingroup + % + % Start a new paragraph if necessary, so our assignments below can't + % affect previous text. + \par + % + % Do not fill out the last line with white space. + \parfillskip = 0in + % + % No extra space above this paragraph. + \parskip = 0in + % + % Do not prefer a separate line ending with a hyphen to fewer lines. + \finalhyphendemerits = 0 + % + % \hangindent is only relevant when the entry text and page number + % don't both fit on one line. In that case, bob suggests starting the + % dots pretty far over on the line. Unfortunately, a large + % indentation looks wrong when the entry text itself is broken across + % lines. So we use a small indentation and put up with long leaders. + % + % \hangafter is reset to 1 (which is the value we want) at the start + % of each paragraph, so we need not do anything with that. + \hangindent = 2em + % + % When the entry text needs to be broken, just fill out the first line + % with blank space. + \rightskip = 0pt plus1fil + % + % A bit of stretch before each entry for the benefit of balancing + % columns. + \vskip 0pt plus1pt + % + % When reading the text of entry, convert explicit line breaks + % from @* into spaces. The user might give these in long section + % titles, for instance. + \def\*{\unskip\space\ignorespaces}% + \def\entrybreak{\hfil\break}% + % + % Swallow the left brace of the text (first parameter): + \afterassignment\doentry + \let\temp = +} +\def\entrybreak{\unskip\space\ignorespaces}% +\def\doentry{% + \bgroup % Instead of the swallowed brace. + \noindent + \aftergroup\finishentry + % And now comes the text of the entry. +} +\def\finishentry#1{% + % #1 is the page number. + % + % The following is kludged to not output a line of dots in the index if + % there are no page numbers. The next person who breaks this will be + % cursed by a Unix daemon. + \setbox\boxA = \hbox{#1}% + \ifdim\wd\boxA = 0pt + \ % + \else + % + % If we must, put the page number on a line of its own, and fill out + % this line with blank space. (The \hfil is overwhelmed with the + % fill leaders glue in \indexdotfill if the page number does fit.) + \hfil\penalty50 + \null\nobreak\indexdotfill % Have leaders before the page number. + % + % The `\ ' here is removed by the implicit \unskip that TeX does as + % part of (the primitive) \par. Without it, a spurious underfull + % \hbox ensues. + \ifpdf + \pdfgettoks#1.% + \ \the\toksA + \else + \ #1% + \fi + \fi + \par + \endgroup +} + +% Like plain.tex's \dotfill, except uses up at least 1 em. +\def\indexdotfill{\cleaders + \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} + +\def\primary #1{\line{#1\hfil}} + +\newskip\secondaryindent \secondaryindent=0.5cm +\def\secondary#1#2{{% + \parfillskip=0in + \parskip=0in + \hangindent=1in + \hangafter=1 + \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill + \ifpdf + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \else + #2 + \fi + \par +}} + +% Define two-column mode, which we use to typeset indexes. +% Adapted from the TeXbook, page 416, which is to say, +% the manmac.tex format used to print the TeXbook itself. +\catcode`\@=11 + +\newbox\partialpage +\newdimen\doublecolumnhsize + +\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns + % Grab any single-column material above us. + \output = {% + % + % Here is a possibility not foreseen in manmac: if we accumulate a + % whole lot of material, we might end up calling this \output + % routine twice in a row (see the doublecol-lose test, which is + % essentially a couple of indexes with @setchapternewpage off). In + % that case we just ship out what is in \partialpage with the normal + % output routine. Generally, \partialpage will be empty when this + % runs and this will be a no-op. See the indexspread.tex test case. + \ifvoid\partialpage \else + \onepageout{\pagecontents\partialpage}% + \fi + % + \global\setbox\partialpage = \vbox{% + % Unvbox the main output page. + \unvbox\PAGE + \kern-\topskip \kern\baselineskip + }% + }% + \eject % run that output routine to set \partialpage + % + % Use the double-column output routine for subsequent pages. + \output = {\doublecolumnout}% + % + % Change the page size parameters. We could do this once outside this + % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 + % format, but then we repeat the same computation. Repeating a couple + % of assignments once per index is clearly meaningless for the + % execution time, so we may as well do it in one place. + % + % First we halve the line length, less a little for the gutter between + % the columns. We compute the gutter based on the line length, so it + % changes automatically with the paper format. The magic constant + % below is chosen so that the gutter has the same value (well, +-<1pt) + % as it did when we hard-coded it. + % + % We put the result in a separate register, \doublecolumhsize, so we + % can restore it in \pagesofar, after \hsize itself has (potentially) + % been clobbered. + % + \doublecolumnhsize = \hsize + \advance\doublecolumnhsize by -.04154\hsize + \divide\doublecolumnhsize by 2 + \hsize = \doublecolumnhsize + % + % Double the \vsize as well. (We don't need a separate register here, + % since nobody clobbers \vsize.) + \vsize = 2\vsize +} + +% The double-column output routine for all double-column pages except +% the last. +% +\def\doublecolumnout{% + \splittopskip=\topskip \splitmaxdepth=\maxdepth + % Get the available space for the double columns -- the normal + % (undoubled) page height minus any material left over from the + % previous page. + \dimen@ = \vsize + \divide\dimen@ by 2 + \advance\dimen@ by -\ht\partialpage + % + % box0 will be the left-hand column, box2 the right. + \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ + \onepageout\pagesofar + \unvbox255 + \penalty\outputpenalty +} +% +% Re-output the contents of the output page -- any previous material, +% followed by the two boxes we just split, in box0 and box2. +\def\pagesofar{% + \unvbox\partialpage + % + \hsize = \doublecolumnhsize + \wd0=\hsize \wd2=\hsize + \hbox to\pagewidth{\box0\hfil\box2}% +} +% +% All done with double columns. +\def\enddoublecolumns{% + % The following penalty ensures that the page builder is exercised + % _before_ we change the output routine. This is necessary in the + % following situation: + % + % The last section of the index consists only of a single entry. + % Before this section, \pagetotal is less than \pagegoal, so no + % break occurs before the last section starts. However, the last + % section, consisting of \initial and the single \entry, does not + % fit on the page and has to be broken off. Without the following + % penalty the page builder will not be exercised until \eject + % below, and by that time we'll already have changed the output + % routine to the \balancecolumns version, so the next-to-last + % double-column page will be processed with \balancecolumns, which + % is wrong: The two columns will go to the main vertical list, with + % the broken-off section in the recent contributions. As soon as + % the output routine finishes, TeX starts reconsidering the page + % break. The two columns and the broken-off section both fit on the + % page, because the two columns now take up only half of the page + % goal. When TeX sees \eject from below which follows the final + % section, it invokes the new output routine that we've set after + % \balancecolumns below; \onepageout will try to fit the two columns + % and the final section into the vbox of \pageheight (see + % \pagebody), causing an overfull box. + % + % Note that glue won't work here, because glue does not exercise the + % page builder, unlike penalties (see The TeXbook, pp. 280-281). + \penalty0 + % + \output = {% + % Split the last of the double-column material. Leave it on the + % current page, no automatic page break. + \balancecolumns + % + % If we end up splitting too much material for the current page, + % though, there will be another page break right after this \output + % invocation ends. Having called \balancecolumns once, we do not + % want to call it again. Therefore, reset \output to its normal + % definition right away. (We hope \balancecolumns will never be + % called on to balance too much material, but if it is, this makes + % the output somewhat more palatable.) + \global\output = {\onepageout{\pagecontents\PAGE}}% + }% + \eject + \endgroup % started in \begindoublecolumns + % + % \pagegoal was set to the doubled \vsize above, since we restarted + % the current page. We're now back to normal single-column + % typesetting, so reset \pagegoal to the normal \vsize (after the + % \endgroup where \vsize got restored). + \pagegoal = \vsize +} +% +% Called at the end of the double column material. +\def\balancecolumns{% + \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. + \dimen@ = \ht0 + \advance\dimen@ by \topskip + \advance\dimen@ by-\baselineskip + \divide\dimen@ by 2 % target to split to + %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% + \splittopskip = \topskip + % Loop until we get a decent breakpoint. + {% + \vbadness = 10000 + \loop + \global\setbox3 = \copy0 + \global\setbox1 = \vsplit3 to \dimen@ + \ifdim\ht3>\dimen@ + \global\advance\dimen@ by 1pt + \repeat + }% + %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% + \setbox0=\vbox to\dimen@{\unvbox1}% + \setbox2=\vbox to\dimen@{\unvbox3}% + % + \pagesofar +} +\catcode`\@ = \other + + +\message{sectioning,} +% Chapters, sections, etc. + +% Let's start with @part. +\outer\parseargdef\part{\partzzz{#1}} +\def\partzzz#1{% + \chapoddpage + \null + \vskip.3\vsize % move it down on the page a bit + \begingroup + \noindent \titlefonts\rmisbold #1\par % the text + \let\lastnode=\empty % no node to associate with + \writetocentry{part}{#1}{}% but put it in the toc + \headingsoff % no headline or footline on the part page + \chapoddpage + \endgroup +} + +% \unnumberedno is an oxymoron. But we count the unnumbered +% sections so that we can refer to them unambiguously in the pdf +% outlines by their "section number". We avoid collisions with chapter +% numbers by starting them at 10000. (If a document ever has 10000 +% chapters, we're in trouble anyway, I'm sure.) +\newcount\unnumberedno \unnumberedno = 10000 +\newcount\chapno +\newcount\secno \secno=0 +\newcount\subsecno \subsecno=0 +\newcount\subsubsecno \subsubsecno=0 + +% This counter is funny since it counts through charcodes of letters A, B, ... +\newcount\appendixno \appendixno = `\@ +% +% \def\appendixletter{\char\the\appendixno} +% We do the following ugly conditional instead of the above simple +% construct for the sake of pdftex, which needs the actual +% letter in the expansion, not just typeset. +% +\def\appendixletter{% + \ifnum\appendixno=`A A% + \else\ifnum\appendixno=`B B% + \else\ifnum\appendixno=`C C% + \else\ifnum\appendixno=`D D% + \else\ifnum\appendixno=`E E% + \else\ifnum\appendixno=`F F% + \else\ifnum\appendixno=`G G% + \else\ifnum\appendixno=`H H% + \else\ifnum\appendixno=`I I% + \else\ifnum\appendixno=`J J% + \else\ifnum\appendixno=`K K% + \else\ifnum\appendixno=`L L% + \else\ifnum\appendixno=`M M% + \else\ifnum\appendixno=`N N% + \else\ifnum\appendixno=`O O% + \else\ifnum\appendixno=`P P% + \else\ifnum\appendixno=`Q Q% + \else\ifnum\appendixno=`R R% + \else\ifnum\appendixno=`S S% + \else\ifnum\appendixno=`T T% + \else\ifnum\appendixno=`U U% + \else\ifnum\appendixno=`V V% + \else\ifnum\appendixno=`W W% + \else\ifnum\appendixno=`X X% + \else\ifnum\appendixno=`Y Y% + \else\ifnum\appendixno=`Z Z% + % The \the is necessary, despite appearances, because \appendixletter is + % expanded while writing the .toc file. \char\appendixno is not + % expandable, thus it is written literally, thus all appendixes come out + % with the same letter (or @) in the toc without it. + \else\char\the\appendixno + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +% Each @chapter defines these (using marks) as the number+name, number +% and name of the chapter. Page headings and footings can use +% these. @section does likewise. +\def\thischapter{} +\def\thischapternum{} +\def\thischaptername{} +\def\thissection{} +\def\thissectionnum{} +\def\thissectionname{} + +\newcount\absseclevel % used to calculate proper heading level +\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count + +% @raisesections: treat @section as chapter, @subsection as section, etc. +\def\raisesections{\global\advance\secbase by -1} +\let\up=\raisesections % original BFox name + +% @lowersections: treat @chapter as section, @section as subsection, etc. +\def\lowersections{\global\advance\secbase by 1} +\let\down=\lowersections % original BFox name + +% we only have subsub. +\chardef\maxseclevel = 3 +% +% A numbered section within an unnumbered changes to unnumbered too. +% To achieve this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unnlevel = \maxseclevel +% +% Trace whether the current chapter is an appendix or not: +% \chapheadtype is "N" or "A", unnumbered chapters are ignored. +\def\chapheadtype{N} + +% Choose a heading macro +% #1 is heading type +% #2 is heading level +% #3 is text for heading +\def\genhead#1#2#3{% + % Compute the abs. sec. level: + \absseclevel=#2 + \advance\absseclevel by \secbase + % Make sure \absseclevel doesn't fall outside the range: + \ifnum \absseclevel < 0 + \absseclevel = 0 + \else + \ifnum \absseclevel > 3 + \absseclevel = 3 + \fi + \fi + % The heading type: + \def\headtype{#1}% + \if \headtype U% + \ifnum \absseclevel < \unnlevel + \chardef\unnlevel = \absseclevel + \fi + \else + % Check for appendix sections: + \ifnum \absseclevel = 0 + \edef\chapheadtype{\headtype}% + \else + \if \headtype A\if \chapheadtype N% + \errmessage{@appendix... within a non-appendix chapter}% + \fi\fi + \fi + % Check for numbered within unnumbered: + \ifnum \absseclevel > \unnlevel + \def\headtype{U}% + \else + \chardef\unnlevel = 3 + \fi + \fi + % Now print the heading: + \if \headtype U% + \ifcase\absseclevel + \unnumberedzzz{#3}% + \or \unnumberedseczzz{#3}% + \or \unnumberedsubseczzz{#3}% + \or \unnumberedsubsubseczzz{#3}% + \fi + \else + \if \headtype A% + \ifcase\absseclevel + \appendixzzz{#3}% + \or \appendixsectionzzz{#3}% + \or \appendixsubseczzz{#3}% + \or \appendixsubsubseczzz{#3}% + \fi + \else + \ifcase\absseclevel + \chapterzzz{#3}% + \or \seczzz{#3}% + \or \numberedsubseczzz{#3}% + \or \numberedsubsubseczzz{#3}% + \fi + \fi + \fi + \suppressfirstparagraphindent +} + +% an interface: +\def\numhead{\genhead N} +\def\apphead{\genhead A} +\def\unnmhead{\genhead U} + +% @chapter, @appendix, @unnumbered. Increment top-level counter, reset +% all lower-level sectioning counters to zero. +% +% Also set \chaplevelprefix, which we prepend to @float sequence numbers +% (e.g., figures), q.v. By default (before any chapter), that is empty. +\let\chaplevelprefix = \empty +% +\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz +\def\chapterzzz#1{% + % section resetting is \global in case the chapter is in a group, such + % as an @include file. + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\chapno by 1 + % + % Used for \float. + \gdef\chaplevelprefix{\the\chapno.}% + \resetallfloatnos + % + % \putwordChapter can contain complex things in translations. + \toks0=\expandafter{\putwordChapter}% + \message{\the\toks0 \space \the\chapno}% + % + % Write the actual heading. + \chapmacro{#1}{Ynumbered}{\the\chapno}% + % + % So @section and the like are numbered underneath this chapter. + \global\let\section = \numberedsec + \global\let\subsection = \numberedsubsec + \global\let\subsubsection = \numberedsubsubsec +} + +\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz +% +\def\appendixzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\appendixno by 1 + \gdef\chaplevelprefix{\appendixletter.}% + \resetallfloatnos + % + % \putwordAppendix can contain complex things in translations. + \toks0=\expandafter{\putwordAppendix}% + \message{\the\toks0 \space \appendixletter}% + % + \chapmacro{#1}{Yappendix}{\appendixletter}% + % + \global\let\section = \appendixsec + \global\let\subsection = \appendixsubsec + \global\let\subsubsection = \appendixsubsubsec +} + +% normally unnmhead0 calls unnumberedzzz: +\outer\parseargdef\unnumbered{\unnmhead0{#1}} +\def\unnumberedzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\unnumberedno by 1 + % + % Since an unnumbered has no number, no prefix for figures. + \global\let\chaplevelprefix = \empty + \resetallfloatnos + % + % This used to be simply \message{#1}, but TeX fully expands the + % argument to \message. Therefore, if #1 contained @-commands, TeX + % expanded them. For example, in `@unnumbered The @cite{Book}', TeX + % expanded @cite (which turns out to cause errors because \cite is meant + % to be executed, not expanded). + % + % Anyway, we don't want the fully-expanded definition of @cite to appear + % as a result of the \message, we just want `@cite' itself. We use + % \the to achieve this: TeX expands \the only once, + % simply yielding the contents of . (We also do this for + % the toc entries.) + \toks0 = {#1}% + \message{(\the\toks0)}% + % + \chapmacro{#1}{Ynothing}{\the\unnumberedno}% + % + \global\let\section = \unnumberedsec + \global\let\subsection = \unnumberedsubsec + \global\let\subsubsection = \unnumberedsubsubsec +} + +% @centerchap is like @unnumbered, but the heading is centered. +\outer\parseargdef\centerchap{% + % Well, we could do the following in a group, but that would break + % an assumption that \chapmacro is called at the outermost level. + % Thus we are safer this way: --kasal, 24feb04 + \let\centerparametersmaybe = \centerparameters + \unnmhead0{#1}% + \let\centerparametersmaybe = \relax +} + +% @top is like @unnumbered. +\let\top\unnumbered + +% Sections. +% +\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz +\def\seczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% +} + +% normally calls appendixsectionzzz: +\outer\parseargdef\appendixsection{\apphead1{#1}} +\def\appendixsectionzzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% +} +\let\appendixsec\appendixsection + +% normally calls unnumberedseczzz: +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} +\def\unnumberedseczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% +} + +% Subsections. +% +% normally calls numberedsubseczzz: +\outer\parseargdef\numberedsubsec{\numhead2{#1}} +\def\numberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% +} + +% normally calls appendixsubseczzz: +\outer\parseargdef\appendixsubsec{\apphead2{#1}} +\def\appendixsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno}% +} + +% normally calls unnumberedsubseczzz: +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} +\def\unnumberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno}% +} + +% Subsubsections. +% +% normally numberedsubsubseczzz: +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} +\def\numberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynumbered}% + {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% normally appendixsubsubseczzz: +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} +\def\appendixsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% normally unnumberedsubsubseczzz: +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} +\def\unnumberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% These macros control what the section commands do, according +% to what kind of chapter we are in (ordinary, appendix, or unnumbered). +% Define them by default for a numbered chapter. +\let\section = \numberedsec +\let\subsection = \numberedsubsec +\let\subsubsection = \numberedsubsubsec + +% Define @majorheading, @heading and @subheading + +\def\majorheading{% + {\advance\chapheadingskip by 10pt \chapbreak }% + \parsearg\chapheadingzzz +} + +\def\chapheading{\chapbreak \parsearg\chapheadingzzz} +\def\chapheadingzzz#1{% + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip \nobreak + \suppressfirstparagraphindent +} + +% @heading, @subheading, @subsubheading. +\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} + +% These macros generate a chapter, section, etc. heading only +% (including whitespace, linebreaking, etc. around it), +% given all the information in convenient, parsed form. + +% Args are the skip and penalty (usually negative) +\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} + +% Parameter controlling skip before chapter headings (if needed) +\newskip\chapheadingskip + +% Define plain chapter starts, and page on/off switching for it. +\def\chapbreak{\dobreak \chapheadingskip {-4000}} +\def\chappager{\par\vfill\supereject} +% Because \domark is called before \chapoddpage, the filler page will +% get the headings for the next chapter, which is wrong. But we don't +% care -- we just disable all headings on the filler page. +\def\chapoddpage{% + \chappager + \ifodd\pageno \else + \begingroup + \headingsoff + \null + \chappager + \endgroup + \fi +} + +\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} + +\def\CHAPPAGoff{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chapbreak +\global\let\pagealignmacro=\chappager} + +\def\CHAPPAGon{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chappager +\global\let\pagealignmacro=\chappager +\global\def\HEADINGSon{\HEADINGSsingle}} + +\def\CHAPPAGodd{% +\global\let\contentsalignmacro = \chapoddpage +\global\let\pchapsepmacro=\chapoddpage +\global\let\pagealignmacro=\chapoddpage +\global\def\HEADINGSon{\HEADINGSdouble}} + +\CHAPPAGon + +% Chapter opening. +% +% #1 is the text, #2 is the section type (Ynumbered, Ynothing, +% Yappendix, Yomitfromtoc), #3 the chapter number. +% +% To test against our argument. +\def\Ynothingkeyword{Ynothing} +\def\Yomitfromtockeyword{Yomitfromtoc} +\def\Yappendixkeyword{Yappendix} +% +\def\chapmacro#1#2#3{% + % Insert the first mark before the heading break (see notes for \domark). + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% + \gdef\thissection{}}% + % + \def\temptype{#2}% + \ifx\temptype\Ynothingkeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{\thischaptername}}% + \else\ifx\temptype\Yomitfromtockeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{}}% + \else\ifx\temptype\Yappendixkeyword + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\appendixletter}% + % \noexpand\putwordAppendix avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} + \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \else + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\the\chapno}% + % \noexpand\putwordChapter avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordChapter{} + \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert the chapter heading break. + \pchapsepmacro + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \domark + % + {% + \chapfonts \rmisbold + % + % Have to define \lastsection before calling \donoderef, because the + % xref code eventually uses it. On the other hand, it has to be called + % after \pchapsepmacro, or the headline will change too soon. + \gdef\lastsection{#1}% + % + % Only insert the separating space if we have a chapter/appendix + % number, and don't print the unnumbered ``number''. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unnchap}% + \else\ifx\temptype\Yomitfromtockeyword + \setbox0 = \hbox{}% contents like unnumbered, but no toc entry + \def\toctype{omit}% + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% + \def\toctype{app}% + \else + \setbox0 = \hbox{#3\enspace}% + \def\toctype{numchap}% + \fi\fi\fi + % + % Write the toc entry for this chapter. Must come before the + % \donoderef, because we include the current node name in the toc + % entry, and \donoderef resets it to empty. + \writetocentry{\toctype}{#1}{#3}% + % + % For pdftex, we have to write out the node definition (aka, make + % the pdfdest) after any page break, but before the actual text has + % been typeset. If the destination for the pdf outline is after the + % text, then jumping from the outline may wind up with the text not + % being visible, for instance under high magnification. + \donoderef{#2}% + % + % Typeset the actual heading. + \nobreak % Avoid page breaks at the interline glue. + \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe + \unhbox0 #1\par}% + }% + \nobreak\bigskip % no page break after a chapter title + \nobreak +} + +% @centerchap -- centered and unnumbered. +\let\centerparametersmaybe = \relax +\def\centerparameters{% + \advance\rightskip by 3\rightskip + \leftskip = \rightskip + \parfillskip = 0pt +} + + +% I don't think this chapter style is supported any more, so I'm not +% updating it with the new noderef stuff. We'll see. --karl, 11aug03. +% +\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} +% +\def\unnchfopen #1{% + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings #1\par}% + \nobreak\bigskip\nobreak +} +\def\chfopen #1#2{\chapoddpage {\chapfonts +\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% +\par\penalty 5000 % +} +\def\centerchfopen #1{% + \chapoddpage + \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% + \nobreak\bigskip \nobreak +} +\def\CHAPFopen{% + \global\let\chapmacro=\chfopen + \global\let\centerchapmacro=\centerchfopen} + + +% Section titles. These macros combine the section number parts and +% call the generic \sectionheading to do the printing. +% +\newskip\secheadingskip +\def\secheadingbreak{\dobreak \secheadingskip{-1000}} + +% Subsection titles. +\newskip\subsecheadingskip +\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} + +% Subsubsection titles. +\def\subsubsecheadingskip{\subsecheadingskip} +\def\subsubsecheadingbreak{\subsecheadingbreak} + + +% Print any size, any type, section title. +% +% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is +% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the +% section number. +% +\def\seckeyword{sec} +% +\def\sectionheading#1#2#3#4{% + {% + \checkenv{}% should not be in an environment. + % + % Switch to the right set of fonts. + \csname #2fonts\endcsname \rmisbold + % + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % Insert first mark before the heading break (see notes for \domark). + \let\prevsectiondefs=\lastsectiondefs + \ifx\temptype\Ynothingkeyword + \ifx\sectionlevel\seckeyword + \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% + \gdef\thissection{\thissectionname}}% + \fi + \else\ifx\temptype\Yomitfromtockeyword + % Don't redefine \thissection. + \else\ifx\temptype\Yappendixkeyword + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \else + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \fi\fi\fi + % + % Go into vertical mode. Usually we'll already be there, but we + % don't want the following whatsit to end up in a preceding paragraph + % if the document didn't happen to have a blank line. + \par + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert space above the heading. + \csname #2headingbreak\endcsname + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \global\let\prevsectiondefs=\lastsectiondefs + \domark + % + % Only insert the space after the number if we have a section number. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unn}% + \gdef\lastsection{#1}% + \else\ifx\temptype\Yomitfromtockeyword + % for @headings -- no section number, don't include in toc, + % and don't redefine \lastsection. + \setbox0 = \hbox{}% + \def\toctype{omit}% + \let\sectionlevel=\empty + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{#4\enspace}% + \def\toctype{app}% + \gdef\lastsection{#1}% + \else + \setbox0 = \hbox{#4\enspace}% + \def\toctype{num}% + \gdef\lastsection{#1}% + \fi\fi\fi + % + % Write the toc entry (before \donoderef). See comments in \chapmacro. + \writetocentry{\toctype\sectionlevel}{#1}{#4}% + % + % Write the node reference (= pdf destination for pdftex). + % Again, see comments in \chapmacro. + \donoderef{#3}% + % + % Interline glue will be inserted when the vbox is completed. + % That glue will be a valid breakpoint for the page, since it'll be + % preceded by a whatsit (usually from the \donoderef, or from the + % \writetocentry if there was no node). We don't want to allow that + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak + % + % Output the actual section heading. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright + \hangindent=\wd0 % zero if no section number + \unhbox0 #1}% + }% + % Add extra space after the heading -- half of whatever came above it. + % Don't allow stretch, though. + \kern .5 \csname #2headingskip\endcsname + % + % Do not let the kern be a potential breakpoint, as it would be if it + % was followed by glue. + \nobreak + % + % We'll almost certainly start a paragraph next, so don't let that + % glue accumulate. (Not a breakpoint because it's preceded by a + % discardable item.) However, when a paragraph is not started next + % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out + % or the negative glue will cause weirdly wrong output, typically + % obscuring the section heading with something else. + \vskip-\parskip + % + % This is so the last item on the main vertical list is a known + % \penalty > 10000, so \startdefun, etc., can recognize the situation + % and do the needful. + \penalty 10001 +} + + +\message{toc,} +% Table of contents. +\newwrite\tocfile + +% Write an entry to the toc file, opening it if necessary. +% Called from @chapter, etc. +% +% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} +% We append the current node name (if any) and page number as additional +% arguments for the \{chap,sec,...}entry macros which will eventually +% read this. The node name is used in the pdf outlines as the +% destination to jump to. +% +% We open the .toc file for writing here instead of at @setfilename (or +% any other fixed time) so that @contents can be anywhere in the document. +% But if #1 is `omit', then we don't do anything. This is used for the +% table of contents chapter openings themselves. +% +\newif\iftocfileopened +\def\omitkeyword{omit}% +% +\def\writetocentry#1#2#3{% + \edef\writetoctype{#1}% + \ifx\writetoctype\omitkeyword \else + \iftocfileopened\else + \immediate\openout\tocfile = \jobname.toc + \global\tocfileopenedtrue + \fi + % + \iflinks + {\atdummies + \edef\temp{% + \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% + \temp + }% + \fi + \fi + % + % Tell \shipout to create a pdf destination on each page, if we're + % writing pdf. These are used in the table of contents. We can't + % just write one on every page because the title pages are numbered + % 1 and 2 (the page numbers aren't printed), and so are the first + % two pages of the document. Thus, we'd have two destinations named + % `1', and two named `2'. + \ifpdf \global\pdfmakepagedesttrue \fi +} + + +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. +% +\def\activecatcodes{% + \catcode`\"=\active + \catcode`\$=\active + \catcode`\<=\active + \catcode`\>=\active + \catcode`\\=\active + \catcode`\^=\active + \catcode`\_=\active + \catcode`\|=\active + \catcode`\~=\active +} + + +% Read the toc file, which is essentially Texinfo input. +\def\readtocfile{% + \setupdatafile + \activecatcodes + \input \tocreadfilename +} + +\newskip\contentsrightmargin \contentsrightmargin=1in +\newcount\savepageno +\newcount\lastnegativepageno \lastnegativepageno = -1 + +% Prepare to read what we've written to \tocfile. +% +\def\startcontents#1{% + % If @setchapternewpage on, and @headings double, the contents should + % start on an odd page, unlike chapters. Thus, we maintain + % \contentsalignmacro in parallel with \pagealignmacro. + % From: Torbjorn Granlund + \contentsalignmacro + \immediate\closeout\tocfile + % + % Don't need to put `Contents' or `Short Contents' in the headline. + % It is abundantly clear what they are. + \chapmacro{#1}{Yomitfromtoc}{}% + % + \savepageno = \pageno + \begingroup % Set up to handle contents files properly. + \raggedbottom % Worry more about breakpoints than the bottom. + \advance\hsize by -\contentsrightmargin % Don't use the full line length. + % + % Roman numerals for page numbers. + \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi +} + +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. +% +\def\tocreadfilename{\jobname.toc} + +% Normal (long) toc. +% +\def\contents{% + \startcontents{\putwordTOC}% + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \ifeof 1 \else + \pdfmakeoutlines + \fi + \closein 1 + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} + +% And just the chapters. +\def\summarycontents{% + \startcontents{\putwordShortTOC}% + % + \let\partentry = \shortpartentry + \let\numchapentry = \shortchapentry + \let\appentry = \shortchapentry + \let\unnchapentry = \shortunnchapentry + % We want a true roman here for the page numbers. + \secfonts + \let\rm=\shortcontrm \let\bf=\shortcontbf + \let\sl=\shortcontsl \let\tt=\shortconttt + \rm + \hyphenpenalty = 10000 + \advance\baselineskip by 1pt % Open it up a little. + \def\numsecentry##1##2##3##4{} + \let\appsecentry = \numsecentry + \let\unnsecentry = \numsecentry + \let\numsubsecentry = \numsecentry + \let\appsubsecentry = \numsecentry + \let\unnsubsecentry = \numsecentry + \let\numsubsubsecentry = \numsecentry + \let\appsubsubsecentry = \numsecentry + \let\unnsubsubsecentry = \numsecentry + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \closein 1 + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} +\let\shortcontents = \summarycontents + +% Typeset the label for a chapter or appendix for the short contents. +% The arg is, e.g., `A' for an appendix, or `3' for a chapter. +% +\def\shortchaplabel#1{% + % This space should be enough, since a single number is .5em, and the + % widest letter (M) is 1em, at least in the Computer Modern fonts. + % But use \hss just in case. + % (This space doesn't include the extra space that gets added after + % the label; that gets put in by \shortchapentry above.) + % + % We'd like to right-justify chapter numbers, but that looks strange + % with appendix letters. And right-justifying numbers and + % left-justifying letters looks strange when there is less than 10 + % chapters. Have to read the whole toc once to know how many chapters + % there are before deciding ... + \hbox to 1em{#1\hss}% +} + +% These macros generate individual entries in the table of contents. +% The first argument is the chapter or section name. +% The last argument is the page number. +% The arguments in between are the chapter number, section number, ... + +% Parts, in the main contents. Replace the part number, which doesn't +% exist, with an empty box. Let's hope all the numbers have the same width. +% Also ignore the page number, which is conventionally not printed. +\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} +\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} +% +% Parts, in the short toc. +\def\shortpartentry#1#2#3#4{% + \penalty-300 + \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip + \shortchapentry{{\bf #1}}{\numeralbox}{}{}% +} + +% Chapters, in the main contents. +\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} +% +% Chapters, in the short toc. +% See comments in \dochapentry re vbox and related settings. +\def\shortchapentry#1#2#3#4{% + \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% +} + +% Appendices, in the main contents. +% Need the word Appendix, and a fixed-size box. +% +\def\appendixbox#1{% + % We use M since it's probably the widest letter. + \setbox0 = \hbox{\putwordAppendix{} M}% + \hbox to \wd0{\putwordAppendix{} #1\hss}} +% +\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} + +% Unnumbered chapters. +\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} +\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} + +% Sections. +\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} +\let\appsecentry=\numsecentry +\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} + +% Subsections. +\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} +\let\appsubsecentry=\numsubsecentry +\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} + +% And subsubsections. +\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} +\let\appsubsubsecentry=\numsubsubsecentry +\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} + +% This parameter controls the indentation of the various levels. +% Same as \defaultparindent. +\newdimen\tocindent \tocindent = 15pt + +% Now for the actual typesetting. In all these, #1 is the text and #2 is the +% page number. +% +% If the toc has to be broken over pages, we want it to be at chapters +% if at all possible; hence the \penalty. +\def\dochapentry#1#2{% + \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip + \begingroup + \chapentryfonts + \tocentry{#1}{\dopageno\bgroup#2\egroup}% + \endgroup + \nobreak\vskip .25\baselineskip plus.1\baselineskip +} + +\def\dosecentry#1#2{\begingroup + \secentryfonts \leftskip=\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsecentry#1#2{\begingroup + \subsecentryfonts \leftskip=2\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsubsecentry#1#2{\begingroup + \subsubsecentryfonts \leftskip=3\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +% We use the same \entry macro as for the index entries. +\let\tocentry = \entry + +% Space between chapter (or whatever) number and the title. +\def\labelspace{\hskip1em \relax} + +\def\dopageno#1{{\rm #1}} +\def\doshortpageno#1{{\rm #1}} + +\def\chapentryfonts{\secfonts \rm} +\def\secentryfonts{\textfonts} +\def\subsecentryfonts{\textfonts} +\def\subsubsecentryfonts{\textfonts} + + +\message{environments,} +% @foo ... @end foo. + +% @tex ... @end tex escapes into raw TeX temporarily. +% One exception: @ is still an escape character, so that @end tex works. +% But \@ or @@ will get a plain @ character. + +\envdef\tex{% + \setupmarkupstyle{tex}% + \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 + \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 + \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie + \catcode `\%=14 + \catcode `\+=\other + \catcode `\"=\other + \catcode `\|=\other + \catcode `\<=\other + \catcode `\>=\other + \catcode `\`=\other + \catcode `\'=\other + \escapechar=`\\ + % + % ' is active in math mode (mathcode"8000). So reset it, and all our + % other math active characters (just in case), to plain's definitions. + \mathactive + % + \let\b=\ptexb + \let\bullet=\ptexbullet + \let\c=\ptexc + \let\,=\ptexcomma + \let\.=\ptexdot + \let\dots=\ptexdots + \let\equiv=\ptexequiv + \let\!=\ptexexclam + \let\i=\ptexi + \let\indent=\ptexindent + \let\noindent=\ptexnoindent + \let\{=\ptexlbrace + \let\+=\tabalign + \let\}=\ptexrbrace + \let\/=\ptexslash + \let\*=\ptexstar + \let\t=\ptext + \expandafter \let\csname top\endcsname=\ptextop % we've made it outer + \let\frenchspacing=\plainfrenchspacing + % + \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% + \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% + \def\@{@}% +} +% There is no need to define \Etex. + +% Define @lisp ... @end lisp. +% @lisp environment forms a group so it can rebind things, +% including the definition of @end lisp (which normally is erroneous). + +% Amount to narrow the margins by for @lisp. +\newskip\lispnarrowing \lispnarrowing=0.4in + +% This is the definition that ^^M gets inside @lisp, @example, and other +% such environments. \null is better than a space, since it doesn't +% have any width. +\def\lisppar{\null\endgraf} + +% This space is always present above and below environments. +\newskip\envskipamount \envskipamount = 0pt + +% Make spacing and below environment symmetrical. We use \parskip here +% to help in doing that, since in @example-like environments \parskip +% is reset to zero; thus the \afterenvbreak inserts no space -- but the +% start of the next paragraph will insert \parskip. +% +\def\aboveenvbreak{{% + % =10000 instead of <10000 because of a special case in \itemzzz and + % \sectionheading, q.v. + \ifnum \lastpenalty=10000 \else + \advance\envskipamount by \parskip + \endgraf + \ifdim\lastskip<\envskipamount + \removelastskip + % it's not a good place to break if the last penalty was \nobreak + % or better ... + \ifnum\lastpenalty<10000 \penalty-50 \fi + \vskip\envskipamount + \fi + \fi +}} + +\let\afterenvbreak = \aboveenvbreak + +% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will +% also clear it, so that its embedded environments do the narrowing again. +\let\nonarrowing=\relax + +% @cartouche ... @end cartouche: draw rectangle w/rounded corners around +% environment contents. +\font\circle=lcircle10 +\newdimen\circthick +\newdimen\cartouter\newdimen\cartinner +\newskip\normbskip\newskip\normpskip\newskip\normlskip +\circthick=\fontdimen8\circle +% +\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth +\def\ctr{{\hskip 6pt\circle\char'010}} +\def\cbl{{\circle\char'012\hskip -6pt}} +\def\cbr{{\hskip 6pt\circle\char'011}} +\def\carttop{\hbox to \cartouter{\hskip\lskip + \ctl\leaders\hrule height\circthick\hfil\ctr + \hskip\rskip}} +\def\cartbot{\hbox to \cartouter{\hskip\lskip + \cbl\leaders\hrule height\circthick\hfil\cbr + \hskip\rskip}} +% +\newskip\lskip\newskip\rskip + +\envdef\cartouche{% + \ifhmode\par\fi % can't be in the midst of a paragraph. + \startsavinginserts + \lskip=\leftskip \rskip=\rightskip + \leftskip=0pt\rightskip=0pt % we want these *outside*. + \cartinner=\hsize \advance\cartinner by-\lskip + \advance\cartinner by-\rskip + \cartouter=\hsize + \advance\cartouter by 18.4pt % allow for 3pt kerns on either + % side, and for 6pt waste from + % each corner char, and rule thickness + \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip + % + % If this cartouche directly follows a sectioning command, we need the + % \parskip glue (backspaced over by default) or the cartouche can + % collide with the section heading. + \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi + % + \vbox\bgroup + \baselineskip=0pt\parskip=0pt\lineskip=0pt + \carttop + \hbox\bgroup + \hskip\lskip + \vrule\kern3pt + \vbox\bgroup + \kern3pt + \hsize=\cartinner + \baselineskip=\normbskip + \lineskip=\normlskip + \parskip=\normpskip + \vskip -\parskip + \comment % For explanation, see the end of def\group. +} +\def\Ecartouche{% + \ifhmode\par\fi + \kern3pt + \egroup + \kern3pt\vrule + \hskip\rskip + \egroup + \cartbot + \egroup + \checkinserts +} + + +% This macro is called at the beginning of all the @example variants, +% inside a group. +\newdimen\nonfillparindent +\def\nonfillstart{% + \aboveenvbreak + \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy + \sepspaces % Make spaces be word-separators rather than space tokens. + \let\par = \lisppar % don't ignore blank lines + \obeylines % each line of input is a line of output + \parskip = 0pt + % Turn off paragraph indentation but redefine \indent to emulate + % the normal \indent. + \nonfillparindent=\parindent + \parindent = 0pt + \let\indent\nonfillindent + % + \emergencystretch = 0pt % don't try to avoid overfull boxes + \ifx\nonarrowing\relax + \advance \leftskip by \lispnarrowing + \exdentamount=\lispnarrowing + \else + \let\nonarrowing = \relax + \fi + \let\exdent=\nofillexdent +} + +\begingroup +\obeyspaces +% We want to swallow spaces (but not other tokens) after the fake +% @indent in our nonfill-environments, where spaces are normally +% active and set to @tie, resulting in them not being ignored after +% @indent. +\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% +\gdef\nonfillindentcheck{% +\ifx\temp % +\expandafter\nonfillindentgobble% +\else% +\leavevmode\nonfillindentbox% +\fi% +}% +\endgroup +\def\nonfillindentgobble#1{\nonfillindent} +\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} + +% If you want all examples etc. small: @set dispenvsize small. +% If you want even small examples the full size: @set dispenvsize nosmall. +% This affects the following displayed environments: +% @example, @display, @format, @lisp +% +\def\smallword{small} +\def\nosmallword{nosmall} +\let\SETdispenvsize\relax +\def\setnormaldispenv{% + \ifx\SETdispenvsize\smallword + % end paragraph for sake of leading, in case document has no blank + % line. This is redundant with what happens in \aboveenvbreak, but + % we need to do it before changing the fonts, and it's inconvenient + % to change the fonts afterward. + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} +\def\setsmalldispenv{% + \ifx\SETdispenvsize\nosmallword + \else + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} + +% We often define two environments, @foo and @smallfoo. +% Let's do it in one command. #1 is the env name, #2 the definition. +\def\makedispenvdef#1#2{% + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% + \expandafter\let\csname E#1\endcsname \afterenvbreak + \expandafter\let\csname Esmall#1\endcsname \afterenvbreak +} + +% Define two environment synonyms (#1 and #2) for an environment. +\def\maketwodispenvdef#1#2#3{% + \makedispenvdef{#1}{#3}% + \makedispenvdef{#2}{#3}% +} +% +% @lisp: indented, narrowed, typewriter font; +% @example: same as @lisp. +% +% @smallexample and @smalllisp: use smaller fonts. +% Originally contributed by Pavel@xerox. +% +\maketwodispenvdef{lisp}{example}{% + \nonfillstart + \tt\setupmarkupstyle{example}% + \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. + \gobble % eat return +} +% @display/@smalldisplay: same as @lisp except keep current font. +% +\makedispenvdef{display}{% + \nonfillstart + \gobble +} + +% @format/@smallformat: same as @display except don't narrow margins. +% +\makedispenvdef{format}{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} + +% @flushleft: same as @format, but doesn't obey \SETdispenvsize. +\envdef\flushleft{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} +\let\Eflushleft = \afterenvbreak + +% @flushright. +% +\envdef\flushright{% + \let\nonarrowing = t% + \nonfillstart + \advance\leftskip by 0pt plus 1fill\relax + \gobble +} +\let\Eflushright = \afterenvbreak + + +% @raggedright does more-or-less normal line breaking but no right +% justification. From plain.tex. Don't stretch around special +% characters in urls in this environment, since the stretch at the right +% should be enough. +\envdef\raggedright{% + \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax + \def\urefprestretchamount{0pt}% + \def\urefpoststretchamount{0pt}% +} +\let\Eraggedright\par + +\envdef\raggedleft{% + \parindent=0pt \leftskip0pt plus2em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedleft\par + +\envdef\raggedcenter{% + \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedcenter\par + + +% @quotation does normal linebreaking (hence we can't use \nonfillstart) +% and narrows the margins. We keep \parskip nonzero in general, since +% we're doing normal filling. So, when using \aboveenvbreak and +% \afterenvbreak, temporarily make \parskip 0. +% +\makedispenvdef{quotation}{\quotationstart} +% +\def\quotationstart{% + \indentedblockstart % same as \indentedblock, but increase right margin too. + \ifx\nonarrowing\relax + \advance\rightskip by \lispnarrowing + \fi + \parsearg\quotationlabel +} + +% We have retained a nonzero parskip for the environment, since we're +% doing normal filling. +% +\def\Equotation{% + \par + \ifx\quotationauthor\thisisundefined\else + % indent a bit. + \leftline{\kern 2\leftskip \sl ---\quotationauthor}% + \fi + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallquotation{\Equotation} + +% If we're given an argument, typeset it in bold with a colon after. +\def\quotationlabel#1{% + \def\temp{#1}% + \ifx\temp\empty \else + {\bf #1: }% + \fi +} + +% @indentedblock is like @quotation, but indents only on the left and +% has no optional argument. +% +\makedispenvdef{indentedblock}{\indentedblockstart} +% +\def\indentedblockstart{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip + \parindent=0pt + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi +} + +% Keep a nonzero parskip for the environment, since we're doing normal filling. +% +\def\Eindentedblock{% + \par + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallindentedblock{\Eindentedblock} + + +% LaTeX-like @verbatim...@end verbatim and @verb{...} +% If we want to allow any as delimiter, +% we need the curly braces so that makeinfo sees the @verb command, eg: +% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org +% +% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. +% +% [Knuth] p.344; only we need to do the other characters Texinfo sets +% active too. Otherwise, they get lost as the first character on a +% verbatim line. +\def\dospecials{% + \do\ \do\\\do\{\do\}\do\$\do\&% + \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% + \do\<\do\>\do\|\do\@\do+\do\"% + % Don't do the quotes -- if we do, @set txicodequoteundirected and + % @set txicodequotebacktick will not have effect on @verb and + % @verbatim, and ?` and !` ligatures won't get disabled. + %\do\`\do\'% +} +% +% [Knuth] p. 380 +\def\uncatcodespecials{% + \def\do##1{\catcode`##1=\other}\dospecials} +% +% Setup for the @verb command. +% +% Eight spaces for a tab +\begingroup + \catcode`\^^I=\active + \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} +\endgroup +% +\def\setupverb{% + \tt % easiest (and conventionally used) font for verbatim + \def\par{\leavevmode\endgraf}% + \setupmarkupstyle{verb}% + \tabeightspaces + % Respect line breaks, + % print special symbols as themselves, and + % make each space count + % must do in this order: + \obeylines \uncatcodespecials \sepspaces +} + +% Setup for the @verbatim environment +% +% Real tab expansion. +\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount +% +% We typeset each line of the verbatim in an \hbox, so we can handle +% tabs. The \global is in case the verbatim line starts with an accent, +% or some other command that starts with a begin-group. Otherwise, the +% entire \verbbox would disappear at the corresponding end-group, before +% it is typeset. Meanwhile, we can't have nested verbatim commands +% (can we?), so the \global won't be overwriting itself. +\newbox\verbbox +\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} +% +\begingroup + \catcode`\^^I=\active + \gdef\tabexpand{% + \catcode`\^^I=\active + \def^^I{\leavevmode\egroup + \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab + \divide\dimen\verbbox by\tabw + \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw + \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw + \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox + }% + } +\endgroup + +% start the verbatim environment. +\def\setupverbatim{% + \let\nonarrowing = t% + \nonfillstart + \tt % easiest (and conventionally used) font for verbatim + % The \leavevmode here is for blank lines. Otherwise, we would + % never \starttabox and the \egroup would end verbatim mode. + \def\par{\leavevmode\egroup\box\verbbox\endgraf}% + \tabexpand + \setupmarkupstyle{verbatim}% + % Respect line breaks, + % print special symbols as themselves, and + % make each space count. + % Must do in this order: + \obeylines \uncatcodespecials \sepspaces + \everypar{\starttabbox}% +} + +% Do the @verb magic: verbatim text is quoted by unique +% delimiter characters. Before first delimiter expect a +% right brace, after last delimiter expect closing brace: +% +% \def\doverb'{'#1'}'{#1} +% +% [Knuth] p. 382; only eat outer {} +\begingroup + \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other + \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] +\endgroup +% +\def\verb{\begingroup\setupverb\doverb} +% +% +% Do the @verbatim magic: define the macro \doverbatim so that +% the (first) argument ends when '@end verbatim' is reached, ie: +% +% \def\doverbatim#1@end verbatim{#1} +% +% For Texinfo it's a lot easier than for LaTeX, +% because texinfo's \verbatim doesn't stop at '\end{verbatim}': +% we need not redefine '\', '{' and '}'. +% +% Inspired by LaTeX's verbatim command set [latex.ltx] +% +\begingroup + \catcode`\ =\active + \obeylines % + % ignore everything up to the first ^^M, that's the newline at the end + % of the @verbatim input line itself. Otherwise we get an extra blank + % line in the output. + \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% + % We really want {...\end verbatim} in the body of the macro, but + % without the active space; thus we have to use \xdef and \gobble. +\endgroup +% +\envdef\verbatim{% + \setupverbatim\doverbatim +} +\let\Everbatim = \afterenvbreak + + +% @verbatiminclude FILE - insert text of file in verbatim environment. +% +\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} +% +\def\doverbatiminclude#1{% + {% + \makevalueexpandable + \setupverbatim + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% + \input #1 + \afterenvbreak + }% +} + +% @copying ... @end copying. +% Save the text away for @insertcopying later. +% +% We save the uninterpreted tokens, rather than creating a box. +% Saving the text in a box would be much easier, but then all the +% typesetting commands (@smallbook, font changes, etc.) have to be done +% beforehand -- and a) we want @copying to be done first in the source +% file; b) letting users define the frontmatter in as flexible order as +% possible is very desirable. +% +\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} +\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} +% +\def\insertcopying{% + \begingroup + \parindent = 0pt % paragraph indentation looks wrong on title page + \scanexp\copyingtext + \endgroup +} + + +\message{defuns,} +% @defun etc. + +\newskip\defbodyindent \defbodyindent=.4in +\newskip\defargsindent \defargsindent=50pt +\newskip\deflastargmargin \deflastargmargin=18pt +\newcount\defunpenalty + +% Start the processing of @deffn: +\def\startdefun{% + \ifnum\lastpenalty<10000 + \medbreak + \defunpenalty=10003 % Will keep this @deffn together with the + % following @def command, see below. + \else + % If there are two @def commands in a row, we'll have a \nobreak, + % which is there to keep the function description together with its + % header. But if there's nothing but headers, we need to allow a + % break somewhere. Check specifically for penalty 10002, inserted + % by \printdefunline, instead of 10000, since the sectioning + % commands also insert a nobreak penalty, and we don't want to allow + % a break between a section heading and a defun. + % + % As a further refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. + \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi + % + % Similarly, after a section heading, do not allow a break. + % But do insert the glue. + \medskip % preceded by discardable penalty, so not a breakpoint + \fi + % + \parindent=0in + \advance\leftskip by \defbodyindent + \exdentamount=\defbodyindent +} + +\def\dodefunx#1{% + % First, check whether we are in the right environment: + \checkenv#1% + % + % As above, allow line break if we have multiple x headers in a row. + % It's not a great place, though. + \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi + % + % And now, it's time to reuse the body of the original defun: + \expandafter\gobbledefun#1% +} +\def\gobbledefun#1\startdefun{} + +% \printdefunline \deffnheader{text} +% +\def\printdefunline#1#2{% + \begingroup + % call \deffnheader: + #1#2 \endheader + % common ending: + \interlinepenalty = 10000 + \advance\rightskip by 0pt plus 1fil\relax + \endgraf + \nobreak\vskip -\parskip + \penalty\defunpenalty % signal to \startdefun and \dodefunx + % Some of the @defun-type tags do not enable magic parentheses, + % rendering the following check redundant. But we don't optimize. + \checkparencounts + \endgroup +} + +\def\Edefun{\endgraf\medbreak} + +% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; +% the only thing remaining is to define \deffnheader. +% +\def\makedefun#1{% + \expandafter\let\csname E#1\endcsname = \Edefun + \edef\temp{\noexpand\domakedefun + \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% + \temp +} + +% \domakedefun \deffn \deffnx \deffnheader +% +% Define \deffn and \deffnx, without parameters. +% \deffnheader has to be defined explicitly. +% +\def\domakedefun#1#2#3{% + \envdef#1{% + \startdefun + \doingtypefnfalse % distinguish typed functions from all else + \parseargusing\activeparens{\printdefunline#3}% + }% + \def#2{\dodefunx#1}% + \def#3% +} + +\newif\ifdoingtypefn % doing typed function? +\newif\ifrettypeownline % typeset return type on its own line? + +% @deftypefnnewline on|off says whether the return type of typed functions +% are printed on their own line. This affects @deftypefn, @deftypefun, +% @deftypeop, and @deftypemethod. +% +\parseargdef\deftypefnnewline{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @txideftypefnnl value `\temp', + must be on|off}% + \fi\fi +} + +% Untyped functions: + +% @deffn category name args +\makedefun{deffn}{\deffngeneral{}} + +% @deffn category class name args +\makedefun{defop}#1 {\defopon{#1\ \putwordon}} + +% \defopon {category on}class name args +\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deffngeneral {subind}category name args +% +\def\deffngeneral#1#2 #3 #4\endheader{% + % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. + \dosubind{fn}{\code{#3}}{#1}% + \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% +} + +% Typed functions: + +% @deftypefn category type name args +\makedefun{deftypefn}{\deftypefngeneral{}} + +% @deftypeop category class type name args +\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} + +% \deftypeopon {category on}class type name args +\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deftypefngeneral {subind}category type name args +% +\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% + \dosubind{fn}{\code{#4}}{#1}% + \doingtypefntrue + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +% Typed variables: + +% @deftypevr category type var args +\makedefun{deftypevr}{\deftypecvgeneral{}} + +% @deftypecv category class type var args +\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} + +% \deftypecvof {category of}class type var args +\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } + +% \deftypecvgeneral {subind}category type var args +% +\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% + \dosubind{vr}{\code{#4}}{#1}% + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +% Untyped variables: + +% @defvr category var args +\makedefun{defvr}#1 {\deftypevrheader{#1} {} } + +% @defcv category class var args +\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} + +% \defcvof {category of}class var args +\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } + +% Types: + +% @deftp category name args +\makedefun{deftp}#1 #2 #3\endheader{% + \doind{tp}{\code{#2}}% + \defname{#1}{}{#2}\defunargs{#3\unskip}% +} + +% Remaining @defun-like shortcuts: +\makedefun{defun}{\deffnheader{\putwordDeffunc} } +\makedefun{defmac}{\deffnheader{\putwordDefmac} } +\makedefun{defspec}{\deffnheader{\putwordDefspec} } +\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } +\makedefun{defvar}{\defvrheader{\putwordDefvar} } +\makedefun{defopt}{\defvrheader{\putwordDefopt} } +\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } +\makedefun{defmethod}{\defopon\putwordMethodon} +\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} +\makedefun{defivar}{\defcvof\putwordInstanceVariableof} +\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} + +% \defname, which formats the name of the @def (not the args). +% #1 is the category, such as "Function". +% #2 is the return type, if any. +% #3 is the function name. +% +% We are followed by (but not passed) the arguments, if any. +% +\def\defname#1#2#3{% + \par + % Get the values of \leftskip and \rightskip as they were outside the @def... + \advance\leftskip by -\defbodyindent + % + % Determine if we are typesetting the return type of a typed function + % on a line by itself. + \rettypeownlinefalse + \ifdoingtypefn % doing a typed function specifically? + % then check user option for putting return type on its own line: + \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else + \rettypeownlinetrue + \fi + \fi + % + % How we'll format the category name. Putting it in brackets helps + % distinguish it from the body text that may end up on the next line + % just below it. + \def\temp{#1}% + \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} + % + % Figure out line sizes for the paragraph shape. We'll always have at + % least two. + \tempnum = 2 + % + % The first line needs space for \box0; but if \rightskip is nonzero, + % we need only space for the part of \box0 which exceeds it: + \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip + % + % If doing a return type on its own line, we'll have another line. + \ifrettypeownline + \advance\tempnum by 1 + \def\maybeshapeline{0in \hsize}% + \else + \def\maybeshapeline{}% + \fi + % + % The continuations: + \dimen2=\hsize \advance\dimen2 by -\defargsindent + % + % The final paragraph shape: + \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 + % + % Put the category name at the right margin. + \noindent + \hbox to 0pt{% + \hfil\box0 \kern-\hsize + % \hsize has to be shortened this way: + \kern\leftskip + % Intentionally do not respect \rightskip, since we need the space. + }% + % + % Allow all lines to be underfull without complaint: + \tolerance=10000 \hbadness=10000 + \exdentamount=\defbodyindent + {% + % defun fonts. We use typewriter by default (used to be bold) because: + % . we're printing identifiers, they should be in tt in principle. + % . in languages with many accents, such as Czech or French, it's + % common to leave accents off identifiers. The result looks ok in + % tt, but exceedingly strange in rm. + % . we don't want -- and --- to be treated as ligatures. + % . this still does not fix the ?` and !` ligatures, but so far no + % one has made identifiers using them :). + \df \tt + \def\temp{#2}% text of the return type + \ifx\temp\empty\else + \tclose{\temp}% typeset the return type + \ifrettypeownline + % put return type on its own line; prohibit line break following: + \hfil\vadjust{\nobreak}\break + \else + \space % type on same line, so just followed by a space + \fi + \fi % no return type + #3% output function name + }% + {\rm\enskip}% hskip 0.5 em of \tenrm + % + \boldbrax + % arguments will be output next, if any. +} + +% Print arguments in slanted roman (not ttsl), inconsistently with using +% tt for the name. This is because literal text is sometimes needed in +% the argument list (groff manual), and ttsl and tt are not very +% distinguishable. Prevent hyphenation at `-' chars. +% +\def\defunargs#1{% + % use sl by default (not ttsl), + % tt for the names. + \df \sl \hyphenchar\font=0 + % + % On the other hand, if an argument has two dashes (for instance), we + % want a way to get ttsl. We used to recommend @var for that, so + % leave the code in, but it's strange for @var to lead to typewriter. + % Nowadays we recommend @code, since the difference between a ttsl hyphen + % and a tt hyphen is pretty tiny. @code also disables ?` !`. + \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% + #1% + \sl\hyphenchar\font=45 +} + +% We want ()&[] to print specially on the defun line. +% +\def\activeparens{% + \catcode`\(=\active \catcode`\)=\active + \catcode`\[=\active \catcode`\]=\active + \catcode`\&=\active +} + +% Make control sequences which act like normal parenthesis chars. +\let\lparen = ( \let\rparen = ) + +% Be sure that we always have a definition for `(', etc. For example, +% if the fn name has parens in it, \boldbrax will not be in effect yet, +% so TeX would otherwise complain about undefined control sequence. +{ + \activeparens + \global\let(=\lparen \global\let)=\rparen + \global\let[=\lbrack \global\let]=\rbrack + \global\let& = \& + + \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} + \gdef\magicamp{\let&=\amprm} +} + +\newcount\parencount + +% If we encounter &foo, then turn on ()-hacking afterwards +\newif\ifampseen +\def\amprm#1 {\ampseentrue{\bf\ }} + +\def\parenfont{% + \ifampseen + % At the first level, print parens in roman, + % otherwise use the default font. + \ifnum \parencount=1 \rm \fi + \else + % The \sf parens (in \boldbrax) actually are a little bolder than + % the contained text. This is especially needed for [ and ] . + \sf + \fi +} +\def\infirstlevel#1{% + \ifampseen + \ifnum\parencount=1 + #1% + \fi + \fi +} +\def\bfafterword#1 {#1 \bf} + +\def\opnr{% + \global\advance\parencount by 1 + {\parenfont(}% + \infirstlevel \bfafterword +} +\def\clnr{% + {\parenfont)}% + \infirstlevel \sl + \global\advance\parencount by -1 +} + +\newcount\brackcount +\def\lbrb{% + \global\advance\brackcount by 1 + {\bf[}% +} +\def\rbrb{% + {\bf]}% + \global\advance\brackcount by -1 +} + +\def\checkparencounts{% + \ifnum\parencount=0 \else \badparencount \fi + \ifnum\brackcount=0 \else \badbrackcount \fi +} +% these should not use \errmessage; the glibc manual, at least, actually +% has such constructs (when documenting function pointers). +\def\badparencount{% + \message{Warning: unbalanced parentheses in @def...}% + \global\parencount=0 +} +\def\badbrackcount{% + \message{Warning: unbalanced square brackets in @def...}% + \global\brackcount=0 +} + + +\message{macros,} +% @macro. + +% To do this right we need a feature of e-TeX, \scantokens, +% which we arrange to emulate with a temporary file in ordinary TeX. +\ifx\eTeXversion\thisisundefined + \newwrite\macscribble + \def\scantokens#1{% + \toks0={#1}% + \immediate\openout\macscribble=\jobname.tmp + \immediate\write\macscribble{\the\toks0}% + \immediate\closeout\macscribble + \input \jobname.tmp + } +\fi + +\def\scanmacro#1{\begingroup + \newlinechar`\^^M + \let\xeatspaces\eatspaces + % + % Undo catcode changes of \startcontents and \doprintindex + % When called from @insertcopying or (short)caption, we need active + % backslash to get it printed correctly. Previously, we had + % \catcode`\\=\other instead. We'll see whether a problem appears + % with macro expansion. --kasal, 19aug04 + \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ + % + % ... and for \example: + \spaceisspace + % + % The \empty here causes a following catcode 5 newline to be eaten as + % part of reading whitespace after a control sequence. It does not + % eat a catcode 13 newline. There's no good way to handle the two + % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX + % would then have different behavior). See the Macro Details node in + % the manual for the workaround we recommend for macros and + % line-oriented commands. + % + \scantokens{#1\empty}% +\endgroup} + +\def\scanexp#1{% + \edef\temp{\noexpand\scanmacro{#1}}% + \temp +} + +\newcount\paramno % Count of parameters +\newtoks\macname % Macro name +\newif\ifrecursive % Is it recursive? + +% List of all defined macros in the form +% \definedummyword\macro1\definedummyword\macro2... +% Currently is also contains all @aliases; the list can be split +% if there is a need. +\def\macrolist{} + +% Add the macro to \macrolist +\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} +\def\addtomacrolistxxx#1{% + \toks0 = \expandafter{\macrolist\definedummyword#1}% + \xdef\macrolist{\the\toks0}% +} + +% Utility routines. +% This does \let #1 = #2, with \csnames; that is, +% \let \csname#1\endcsname = \csname#2\endcsname +% (except of course we have to play expansion games). +% +\def\cslet#1#2{% + \expandafter\let + \csname#1\expandafter\endcsname + \csname#2\endcsname +} + +% Trim leading and trailing spaces off a string. +% Concepts from aro-bend problem 15 (see CTAN). +{\catcode`\@=11 +\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} +\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} +\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} +\def\unbrace#1{#1} +\unbrace{\gdef\trim@@@ #1 } #2@{#1} +} + +% Trim a single trailing ^^M off a string. +{\catcode`\^^M=\other \catcode`\Q=3% +\gdef\eatcr #1{\eatcra #1Q^^MQ}% +\gdef\eatcra#1^^MQ{\eatcrb#1Q}% +\gdef\eatcrb#1Q#2Q{#1}% +} + +% Macro bodies are absorbed as an argument in a context where +% all characters are catcode 10, 11 or 12, except \ which is active +% (as in normal texinfo). It is necessary to change the definition of \ +% to recognize macro arguments; this is the job of \mbodybackslash. +% +% Non-ASCII encodings make 8-bit characters active, so un-activate +% them to avoid their expansion. Must do this non-globally, to +% confine the change to the current group. +% +% It's necessary to have hard CRs when the macro is executed. This is +% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% body, and then making it the \newlinechar in \scanmacro. +% +\def\scanctxt{% used as subroutine + \catcode`\"=\other + \catcode`\+=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\@=\other + \catcode`\^=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\~=\other + \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi +} + +\def\scanargctxt{% used for copying and captions, not macros. + \scanctxt + \catcode`\\=\other + \catcode`\^^M=\other +} + +\def\macrobodyctxt{% used for @macro definitions + \scanctxt + \catcode`\{=\other + \catcode`\}=\other + \catcode`\^^M=\other + \usembodybackslash +} + +\def\macroargctxt{% used when scanning invocations + \scanctxt + \catcode`\\=0 +} +% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" +% for the single characters \ { }. Thus, we end up with the "commands" +% that would be written @\ @{ @} in a Texinfo document. +% +% We already have @{ and @}. For @\, we define it here, and only for +% this purpose, to produce a typewriter backslash (so, the @\ that we +% define for @math can't be used with @macro calls): +% +\def\\{\normalbackslash}% +% +% We would like to do this for \, too, since that is what makeinfo does. +% But it is not possible, because Texinfo already has a command @, for a +% cedilla accent. Documents must use @comma{} instead. +% +% \anythingelse will almost certainly be an error of some kind. + + +% \mbodybackslash is the definition of \ in @macro bodies. +% It maps \foo\ => \csname macarg.foo\endcsname => #N +% where N is the macro parameter number. +% We define \csname macarg.\endcsname to be \realbackslash, so +% \\ in macro replacement text gets you a backslash. +% +{\catcode`@=0 @catcode`@\=@active + @gdef@usembodybackslash{@let\=@mbodybackslash} + @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} +} +\expandafter\def\csname macarg.\endcsname{\realbackslash} + +\def\margbackslash#1{\char`\#1 } + +\def\macro{\recursivefalse\parsearg\macroxxx} +\def\rmacro{\recursivetrue\parsearg\macroxxx} + +\def\macroxxx#1{% + \getargs{#1}% now \macname is the macname and \argl the arglist + \ifx\argl\empty % no arguments + \paramno=0\relax + \else + \expandafter\parsemargdef \argl;% + \if\paramno>256\relax + \ifx\eTeXversion\thisisundefined + \errhelp = \EMsimple + \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} + \fi + \fi + \fi + \if1\csname ismacro.\the\macname\endcsname + \message{Warning: redefining \the\macname}% + \else + \expandafter\ifx\csname \the\macname\endcsname \relax + \else \errmessage{Macro name \the\macname\space already defined}\fi + \global\cslet{macsave.\the\macname}{\the\macname}% + \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% + \addtomacrolist{\the\macname}% + \fi + \begingroup \macrobodyctxt + \ifrecursive \expandafter\parsermacbody + \else \expandafter\parsemacbody + \fi} + +\parseargdef\unmacro{% + \if1\csname ismacro.#1\endcsname + \global\cslet{#1}{macsave.#1}% + \global\expandafter\let \csname ismacro.#1\endcsname=0% + % Remove the macro name from \macrolist: + \begingroup + \expandafter\let\csname#1\endcsname \relax + \let\definedummyword\unmacrodo + \xdef\macrolist{\macrolist}% + \endgroup + \else + \errmessage{Macro #1 not defined}% + \fi +} + +% Called by \do from \dounmacro on each macro. The idea is to omit any +% macro definitions that have been changed to \relax. +% +\def\unmacrodo#1{% + \ifx #1\relax + % remove this + \else + \noexpand\definedummyword \noexpand#1% + \fi +} + +% This makes use of the obscure feature that if the last token of a +% is #, then the preceding argument is delimited by +% an opening brace, and that opening brace is not consumed. +\def\getargs#1{\getargsxxx#1{}} +\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} +\def\getmacname#1 #2\relax{\macname={#1}} +\def\getmacargs#1{\def\argl{#1}} + +% For macro processing make @ a letter so that we can make Texinfo private macro names. +\edef\texiatcatcode{\the\catcode`\@} +\catcode `@=11\relax + +% Parse the optional {params} list. Set up \paramno and \paramlist +% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH +% in the params list to some hook where the argument is to be expanded. If +% there are less than 10 arguments that hook is to be replaced by ##N where N +% is the position in that list, that is to say the macro arguments are to be +% defined `a la TeX in the macro body. +% +% That gets used by \mbodybackslash (above). +% +% We need to get `macro parameter char #' into several definitions. +% The technique used is stolen from LaTeX: let \hash be something +% unexpandable, insert that wherever you need a #, and then redefine +% it to # just before using the token list produced. +% +% The same technique is used to protect \eatspaces till just before +% the macro is used. +% +% If there are 10 or more arguments, a different technique is used, where the +% hook remains in the body, and when macro is to be expanded the body is +% processed again to replace the arguments. +% +% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the +% argument N value and then \edef the body (nothing else will expand because of +% the catcode regime underwhich the body was input). +% +% If you compile with TeX (not eTeX), and you have macros with 10 or more +% arguments, you need that no macro has more than 256 arguments, otherwise an +% error is produced. +\def\parsemargdef#1;{% + \paramno=0\def\paramlist{}% + \let\hash\relax + \let\xeatspaces\relax + \parsemargdefxxx#1,;,% + % In case that there are 10 or more arguments we parse again the arguments + % list to set new definitions for the \macarg.BLAH macros corresponding to + % each BLAH argument. It was anyhow needed to parse already once this list + % in order to count the arguments, and as macros with at most 9 arguments + % are by far more frequent than macro with 10 or more arguments, defining + % twice the \macarg.BLAH macros does not cost too much processing power. + \ifnum\paramno<10\relax\else + \paramno0\relax + \parsemmanyargdef@@#1,;,% 10 or more arguments + \fi +} +\def\parsemargdefxxx#1,{% + \if#1;\let\next=\relax + \else \let\next=\parsemargdefxxx + \advance\paramno by 1 + \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname + {\xeatspaces{\hash\the\paramno}}% + \edef\paramlist{\paramlist\hash\the\paramno,}% + \fi\next} + +\def\parsemmanyargdef@@#1,{% + \if#1;\let\next=\relax + \else + \let\next=\parsemmanyargdef@@ + \edef\tempb{\eatspaces{#1}}% + \expandafter\def\expandafter\tempa + \expandafter{\csname macarg.\tempb\endcsname}% + % Note that we need some extra \noexpand\noexpand, this is because we + % don't want \the to be expanded in the \parsermacbody as it uses an + % \xdef . + \expandafter\edef\tempa + {\noexpand\noexpand\noexpand\the\toks\the\paramno}% + \advance\paramno by 1\relax + \fi\next} + +% These two commands read recursive and nonrecursive macro bodies. +% (They're different since rec and nonrec macros end differently.) +% + +\catcode `\@\texiatcatcode +\long\def\parsemacbody#1@end macro% +{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% +\long\def\parsermacbody#1@end rmacro% +{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% +\catcode `\@=11\relax + +\let\endargs@\relax +\let\nil@\relax +\def\nilm@{\nil@}% +\long\def\nillm@{\nil@}% + +% This macro is expanded during the Texinfo macro expansion, not during its +% definition. It gets all the arguments values and assigns them to macros +% macarg.ARGNAME +% +% #1 is the macro name +% #2 is the list of argument names +% #3 is the list of argument values +\def\getargvals@#1#2#3{% + \def\macargdeflist@{}% + \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. + \def\paramlist{#2,\nil@}% + \def\macroname{#1}% + \begingroup + \macroargctxt + \def\argvaluelist{#3,\nil@}% + \def\@tempa{#3}% + \ifx\@tempa\empty + \setemptyargvalues@ + \else + \getargvals@@ + \fi +} + +% +\def\getargvals@@{% + \ifx\paramlist\nilm@ + % Some sanity check needed here that \argvaluelist is also empty. + \ifx\argvaluelist\nillm@ + \else + \errhelp = \EMsimple + \errmessage{Too many arguments in macro `\macroname'!}% + \fi + \let\next\macargexpandinbody@ + \else + \ifx\argvaluelist\nillm@ + % No more arguments values passed to macro. Set remaining named-arg + % macros to empty. + \let\next\setemptyargvalues@ + \else + % pop current arg name into \@tempb + \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% + \expandafter\@tempa\expandafter{\paramlist}% + % pop current argument value into \@tempc + \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% + \expandafter\@tempa\expandafter{\argvaluelist}% + % Here \@tempb is the current arg name and \@tempc is the current arg value. + % First place the new argument macro definition into \@tempd + \expandafter\macname\expandafter{\@tempc}% + \expandafter\let\csname macarg.\@tempb\endcsname\relax + \expandafter\def\expandafter\@tempe\expandafter{% + \csname macarg.\@tempb\endcsname}% + \edef\@tempd{\long\def\@tempe{\the\macname}}% + \push@\@tempd\macargdeflist@ + \let\next\getargvals@@ + \fi + \fi + \next +} + +\def\push@#1#2{% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter#2% + \expandafter\expandafter\expandafter{% + \expandafter#1#2}% +} + +% Replace arguments by their values in the macro body, and place the result +% in macro \@tempa +\def\macvalstoargs@{% + % To do this we use the property that token registers that are \the'ed + % within an \edef expand only once. So we are going to place all argument + % values into respective token registers. + % + % First we save the token context, and initialize argument numbering. + \begingroup + \paramno0\relax + % Then, for each argument number #N, we place the corresponding argument + % value into a new token list register \toks#N + \expandafter\putargsintokens@\saveparamlist@,;,% + % Then, we expand the body so that argument are replaced by their + % values. The trick for values not to be expanded themselves is that they + % are within tokens and that tokens expand only once in an \edef . + \edef\@tempc{\csname mac.\macroname .body\endcsname}% + % Now we restore the token stack pointer to free the token list registers + % which we have used, but we make sure that expanded body is saved after + % group. + \expandafter + \endgroup + \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% + } + +\def\macargexpandinbody@{% + %% Define the named-macro outside of this group and then close this group. + \expandafter + \endgroup + \macargdeflist@ + % First the replace in body the macro arguments by their values, the result + % is in \@tempa . + \macvalstoargs@ + % Then we point at the \norecurse or \gobble (for recursive) macro value + % with \@tempb . + \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname + % Depending on whether it is recursive or not, we need some tailing + % \egroup . + \ifx\@tempb\gobble + \let\@tempc\relax + \else + \let\@tempc\egroup + \fi + % And now we do the real job: + \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% + \@tempd +} + +\def\putargsintokens@#1,{% + \if#1;\let\next\relax + \else + \let\next\putargsintokens@ + % First we allocate the new token list register, and give it a temporary + % alias \@tempb . + \toksdef\@tempb\the\paramno + % Then we place the argument value into that token list register. + \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname + \expandafter\@tempb\expandafter{\@tempa}% + \advance\paramno by 1\relax + \fi + \next +} + +% Save the token stack pointer into macro #1 +\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} +% Restore the token stack pointer from number in macro #1 +\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} +% newtoks that can be used non \outer . +\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} + +% Tailing missing arguments are set to empty +\def\setemptyargvalues@{% + \ifx\paramlist\nilm@ + \let\next\macargexpandinbody@ + \else + \expandafter\setemptyargvaluesparser@\paramlist\endargs@ + \let\next\setemptyargvalues@ + \fi + \next +} + +\def\setemptyargvaluesparser@#1,#2\endargs@{% + \expandafter\def\expandafter\@tempa\expandafter{% + \expandafter\def\csname macarg.#1\endcsname{}}% + \push@\@tempa\macargdeflist@ + \def\paramlist{#2}% +} + +% #1 is the element target macro +% #2 is the list macro +% #3,#4\endargs@ is the list value +\def\pop@#1#2#3,#4\endargs@{% + \def#1{#3}% + \def#2{#4}% +} +\long\def\longpop@#1#2#3,#4\endargs@{% + \long\def#1{#3}% + \long\def#2{#4}% +} + +% This defines a Texinfo @macro. There are eight cases: recursive and +% nonrecursive macros of zero, one, up to nine, and many arguments. +% Much magic with \expandafter here. +% \xdef is used so that macro definitions will survive the file +% they're defined in; @include reads the file inside a group. +% +\def\defmacro{% + \let\hash=##% convert placeholders to macro parameter chars + \ifrecursive + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\scanmacro{\temp}}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup\noexpand\scanmacro{\temp}}% + \else + \ifnum\paramno<10\relax % at most 9 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \else % 10 or more + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble + \fi + \fi + \else + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \else % at most 9 + \ifnum\paramno<10\relax + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \expandafter\noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \else % 10 or more: + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse + \fi + \fi + \fi} + +\catcode `\@\texiatcatcode\relax + +\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} + +% \braceorline decides whether the next nonwhitespace character is a +% {. If so it reads up to the closing }, if not, it reads the whole +% line. Whatever was read is then fed to the next control sequence +% as an argument (by \parsebrace or \parsearg). +% +\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} +\def\braceorlinexxx{% + \ifx\nchar\bgroup\else + \expandafter\parsearg + \fi \macnamexxx} + + +% @alias. +% We need some trickery to remove the optional spaces around the equal +% sign. Make them active and then expand them all to nothing. +% +\def\alias{\parseargusing\obeyspaces\aliasxxx} +\def\aliasxxx #1{\aliasyyy#1\relax} +\def\aliasyyy #1=#2\relax{% + {% + \expandafter\let\obeyedspace=\empty + \addtomacrolist{#1}% + \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% + }% + \next +} + + +\message{cross references,} + +\newwrite\auxfile +\newif\ifhavexrefs % True if xref values are known. +\newif\ifwarnedxrefs % True if we warned once that they aren't known. + +% @inforef is relatively simple. +\def\inforef #1{\inforefzzz #1,,,,**} +\def\inforefzzz #1,#2,#3,#4**{% + \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, + node \samp{\ignorespaces#1{}}} + +% @node's only job in TeX is to define \lastnode, which is used in +% cross-references. The @node line might or might not have commas, and +% might or might not have spaces before the first comma, like: +% @node foo , bar , ... +% We don't want such trailing spaces in the node name. +% +\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} +% +% also remove a trailing comma, in case of something like this: +% @node Help-Cross, , , Cross-refs +\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} +\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} + +\let\nwnode=\node +\let\lastnode=\empty + +% Write a cross-reference definition for the current node. #1 is the +% type (Ynumbered, Yappendix, Ynothing). +% +\def\donoderef#1{% + \ifx\lastnode\empty\else + \setref{\lastnode}{#1}% + \global\let\lastnode=\empty + \fi +} + +% @anchor{NAME} -- define xref target at arbitrary point. +% +\newcount\savesfregister +% +\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} +\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} +\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} + +% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an +% anchor), which consists of three parts: +% 1) NAME-title - the current sectioning name taken from \lastsection, +% or the anchor name. +% 2) NAME-snt - section number and type, passed as the SNT arg, or +% empty for anchors. +% 3) NAME-pg - the page number. +% +% This is called from \donoderef, \anchor, and \dofloat. In the case of +% floats, there is an additional part, which is not written here: +% 4) NAME-lof - the text as it should appear in a @listoffloats. +% +\def\setref#1#2{% + \pdfmkdest{#1}% + \iflinks + {% + \atdummies % preserve commands, but don't expand them + \edef\writexrdef##1##2{% + \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef + ##1}{##2}}% these are parameters of \writexrdef + }% + \toks0 = \expandafter{\lastsection}% + \immediate \writexrdef{title}{\the\toks0 }% + \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout + }% + \fi +} + +% @xrefautosectiontitle on|off says whether @section(ing) names are used +% automatically in xrefs, if the third arg is not explicitly specified. +% This was provided as a "secret" @set xref-automatic-section-title +% variable, now it's official. +% +\parseargdef\xrefautomaticsectiontitle{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', + must be on|off}% + \fi\fi +} + +% +% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is +% the node name, #2 the name of the Info cross-reference, #3 the printed +% node name, #4 the name of the Info file, #5 the name of the printed +% manual. All but the node name can be omitted. +% +\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} +\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} +\def\ref#1{\xrefX[#1,,,,,,,]} +% +\newbox\toprefbox +\newbox\printedrefnamebox +\newbox\infofilenamebox +\newbox\printedmanualbox +% +\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup + \unsepspaces + % + % Get args without leading/trailing spaces. + \def\printedrefname{\ignorespaces #3}% + \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% + % + \def\infofilename{\ignorespaces #4}% + \setbox\infofilenamebox = \hbox{\infofilename\unskip}% + % + \def\printedmanual{\ignorespaces #5}% + \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% + % + % If the printed reference name (arg #3) was not explicitly given in + % the @xref, figure out what we want to use. + \ifdim \wd\printedrefnamebox = 0pt + % No printed node name was explicitly given. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax + % Not auto section-title: use node name inside the square brackets. + \def\printedrefname{\ignorespaces #1}% + \else + % Auto section-title: use chapter/section title inside + % the square brackets if we have it. + \ifdim \wd\printedmanualbox > 0pt + % It is in another manual, so we don't have it; use node name. + \def\printedrefname{\ignorespaces #1}% + \else + \ifhavexrefs + % We (should) know the real title if we have the xref values. + \def\printedrefname{\refx{#1-title}{}}% + \else + % Otherwise just copy the Info node name. + \def\printedrefname{\ignorespaces #1}% + \fi% + \fi + \fi + \fi + % + % Make link in pdf output. + \ifpdf + {\indexnofonts + \turnoffactive + \makevalueexpandable + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. + \getfilename{#4}% + % + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. + \edef\pdfxrefdest{#1}% + \ifx\pdfxrefdest\empty + \def\pdfxrefdest{Top}% no empty targets + \else + \txiescapepdf\pdfxrefdest % escape PDF special chars + \fi + % + \leavevmode + \startlink attr{/Border [0 0 0]}% + \ifnum\filenamelength>0 + goto file{\the\filename.pdf} name{\pdfxrefdest}% + \else + goto name{\pdfmkpgn{\pdfxrefdest}}% + \fi + }% + \setcolor{\linkcolor}% + \fi + % + % Float references are printed completely differently: "Figure 1.2" + % instead of "[somenode], p.3". We distinguish them by the + % LABEL-title being set to a magic string. + {% + % Have to otherify everything special to allow the \csname to + % include an _ in the xref name, etc. + \indexnofonts + \turnoffactive + \expandafter\global\expandafter\let\expandafter\Xthisreftitle + \csname XR#1-title\endcsname + }% + \iffloat\Xthisreftitle + % If the user specified the print name (third arg) to the ref, + % print it instead of our usual "Figure 1.2". + \ifdim\wd\printedrefnamebox = 0pt + \refx{#1-snt}{}% + \else + \printedrefname + \fi + % + % If the user also gave the printed manual name (fifth arg), append + % "in MANUALNAME". + \ifdim \wd\printedmanualbox > 0pt + \space \putwordin{} \cite{\printedmanual}% + \fi + \else + % node/anchor (non-float) references. + % + % If we use \unhbox to print the node names, TeX does not insert + % empty discretionaries after hyphens, which means that it will not + % find a line break at a hyphen in a node names. Since some manuals + % are best written with fairly long node names, containing hyphens, + % this is a loss. Therefore, we give the text of the node name + % again, so it is as if TeX is seeing it for the first time. + % + \ifdim \wd\printedmanualbox > 0pt + % Cross-manual reference with a printed manual name. + % + \crossmanualxref{\cite{\printedmanual\unskip}}% + % + \else\ifdim \wd\infofilenamebox > 0pt + % Cross-manual reference with only an info filename (arg 4), no + % printed manual name (arg 5). This is essentially the same as + % the case above; we output the filename, since we have nothing else. + % + \crossmanualxref{\code{\infofilename\unskip}}% + % + \else + % Reference within this manual. + % + % _ (for example) has to be the character _ for the purposes of the + % control sequence corresponding to the node, but it has to expand + % into the usual \leavevmode...\vrule stuff for purposes of + % printing. So we \turnoffactive for the \refx-snt, back on for the + % printing, back off for the \refx-pg. + {\turnoffactive + % Only output a following space if the -snt ref is nonempty; for + % @unnumbered and @anchor, it won't be. + \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% + \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi + }% + % output the `[mynode]' via the macro below so it can be overridden. + \xrefprintnodename\printedrefname + % + % But we always want a comma and a space: + ,\space + % + % output the `page 3'. + \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \fi\fi + \fi + \endlink +\endgroup} + +% Output a cross-manual xref to #1. Used just above (twice). +% +% Only include the text "Section ``foo'' in" if the foo is neither +% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply +% "see The Foo Manual", the idea being to refer to the whole manual. +% +% But, this being TeX, we can't easily compare our node name against the +% string "Top" while ignoring the possible spaces before and after in +% the input. By adding the arbitrary 7sp below, we make it much less +% likely that a real node name would have the same width as "Top" (e.g., +% in a monospaced font). Hopefully it will never happen in practice. +% +% For the same basic reason, we retypeset the "Top" at every +% reference, since the current font is indeterminate. +% +\def\crossmanualxref#1{% + \setbox\toprefbox = \hbox{Top\kern7sp}% + \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% + \ifdim \wd2 > 7sp % nonempty? + \ifdim \wd2 = \wd\toprefbox \else % same as Top? + \putwordSection{} ``\printedrefname'' \putwordin{}\space + \fi + \fi + #1% +} + +% This macro is called from \xrefX for the `[nodename]' part of xref +% output. It's a separate macro only so it can be changed more easily, +% since square brackets don't work well in some documents. Particularly +% one that Bob is working on :). +% +\def\xrefprintnodename#1{[#1]} + +% Things referred to by \setref. +% +\def\Ynothing{} +\def\Yomitfromtoc{} +\def\Ynumbered{% + \ifnum\secno=0 + \putwordChapter@tie \the\chapno + \else \ifnum\subsecno=0 + \putwordSection@tie \the\chapno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno + \else + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} +\def\Yappendix{% + \ifnum\secno=0 + \putwordAppendix@tie @char\the\appendixno{}% + \else \ifnum\subsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno + \else + \putwordSection@tie + @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} + +% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. +% If its value is nonempty, SUFFIX is output afterward. +% +\def\refx#1#2{% + {% + \indexnofonts + \otherbackslash + \expandafter\global\expandafter\let\expandafter\thisrefX + \csname XR#1\endcsname + }% + \ifx\thisrefX\relax + % If not defined, say something at least. + \angleleft un\-de\-fined\angleright + \iflinks + \ifhavexrefs + {\toks0 = {#1}% avoid expansion of possibly-complex value + \message{\linenumber Undefined cross reference `\the\toks0'.}}% + \else + \ifwarnedxrefs\else + \global\warnedxrefstrue + \message{Cross reference values unknown; you must run TeX again.}% + \fi + \fi + \fi + \else + % It's defined, so just use it. + \thisrefX + \fi + #2% Output the suffix in any case. +} + +% This is the macro invoked by entries in the aux file. Usually it's +% just a \def (we prepend XR to the control sequence name to avoid +% collisions). But if this is a float type, we have more work to do. +% +\def\xrdef#1#2{% + {% The node name might contain 8-bit characters, which in our current + % implementation are changed to commands like @'e. Don't let these + % mess up the control sequence name. + \indexnofonts + \turnoffactive + \xdef\safexrefname{#1}% + }% + % + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref + % + % Was that xref control sequence that we just defined for a float? + \expandafter\iffloat\csname XR\safexrefname\endcsname + % it was a float, and we have the (safe) float type in \iffloattype. + \expandafter\let\expandafter\floatlist + \csname floatlist\iffloattype\endcsname + % + % Is this the first time we've seen this float type? + \expandafter\ifx\floatlist\relax + \toks0 = {\do}% yes, so just \do + \else + % had it before, so preserve previous elements in list. + \toks0 = \expandafter{\floatlist\do}% + \fi + % + % Remember this xref in the control sequence \floatlistFLOATTYPE, + % for later use in \listoffloats. + \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 + {\safexrefname}}% + \fi +} + +% Read the last existing aux file, if any. No error if none exists. +% +\def\tryauxfile{% + \openin 1 \jobname.aux + \ifeof 1 \else + \readdatafile{aux}% + \global\havexrefstrue + \fi + \closein 1 +} + +\def\setupdatafile{% + \catcode`\^^@=\other + \catcode`\^^A=\other + \catcode`\^^B=\other + \catcode`\^^C=\other + \catcode`\^^D=\other + \catcode`\^^E=\other + \catcode`\^^F=\other + \catcode`\^^G=\other + \catcode`\^^H=\other + \catcode`\^^K=\other + \catcode`\^^L=\other + \catcode`\^^N=\other + \catcode`\^^P=\other + \catcode`\^^Q=\other + \catcode`\^^R=\other + \catcode`\^^S=\other + \catcode`\^^T=\other + \catcode`\^^U=\other + \catcode`\^^V=\other + \catcode`\^^W=\other + \catcode`\^^X=\other + \catcode`\^^Z=\other + \catcode`\^^[=\other + \catcode`\^^\=\other + \catcode`\^^]=\other + \catcode`\^^^=\other + \catcode`\^^_=\other + % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. + % in xref tags, i.e., node names. But since ^^e4 notation isn't + % supported in the main text, it doesn't seem desirable. Furthermore, + % that is not enough: for node names that actually contain a ^ + % character, we would end up writing a line like this: 'xrdef {'hat + % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first + % argument, and \hat is not an expandable control sequence. It could + % all be worked out, but why? Either we support ^^ or we don't. + % + % The other change necessary for this was to define \auxhat: + % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter + % and then to call \auxhat in \setq. + % + \catcode`\^=\other + % + % Special characters. Should be turned off anyway, but... + \catcode`\~=\other + \catcode`\[=\other + \catcode`\]=\other + \catcode`\"=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\$=\other + \catcode`\#=\other + \catcode`\&=\other + \catcode`\%=\other + \catcode`+=\other % avoid \+ for paranoia even though we've turned it off + % + % This is to support \ in node names and titles, since the \ + % characters end up in a \csname. It's easier than + % leaving it active and making its active definition an actual \ + % character. What I don't understand is why it works in the *value* + % of the xrdef. Seems like it should be a catcode12 \, and that + % should not typeset properly. But it works, so I'm moving on for + % now. --karl, 15jan04. + \catcode`\\=\other + % + % Make the characters 128-255 be printing characters. + {% + \count1=128 + \def\loop{% + \catcode\count1=\other + \advance\count1 by 1 + \ifnum \count1<256 \loop \fi + }% + }% + % + % @ is our escape character in .aux files, and we need braces. + \catcode`\{=1 + \catcode`\}=2 + \catcode`\@=0 +} + +\def\readdatafile#1{% +\begingroup + \setupdatafile + \input\jobname.#1 +\endgroup} + + +\message{insertions,} +% including footnotes. + +\newcount \footnoteno + +% The trailing space in the following definition for supereject is +% vital for proper filling; pages come out unaligned when you do a +% pagealignmacro call if that space before the closing brace is +% removed. (Generally, numeric constants should always be followed by a +% space to prevent strange expansion errors.) +\def\supereject{\par\penalty -20000\footnoteno =0 } + +% @footnotestyle is meaningful for Info output only. +\let\footnotestyle=\comment + +{\catcode `\@=11 +% +% Auto-number footnotes. Otherwise like plain. +\gdef\footnote{% + \let\indent=\ptexindent + \let\noindent=\ptexnoindent + % + \global\advance\footnoteno by \@ne + \edef\thisfootno{$^{\the\footnoteno}$}% + % + % In case the footnote comes at the end of a sentence, preserve the + % extra spacing after we do the footnote number. + \let\@sf\empty + \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi + % + % Remove inadvertent blank space before typesetting the footnote number. + \unskip + \thisfootno\@sf + \dofootnote +}% + +% Don't bother with the trickery in plain.tex to not require the +% footnote text as a parameter. Our footnotes don't need to be so general. +% +% Oh yes, they do; otherwise, @ifset (and anything else that uses +% \parseargline) fails inside footnotes because the tokens are fixed when +% the footnote is read. --karl, 16nov96. +% +\gdef\dofootnote{% + \insert\footins\bgroup + % + % Nested footnotes are not supported in TeX, that would take a lot + % more work. (\startsavinginserts does not suffice.) + \let\footnote=\errfootnote + % + % We want to typeset this text as a normal paragraph, even if the + % footnote reference occurs in (for example) a display environment. + % So reset some parameters. + \hsize=\pagewidth + \interlinepenalty\interfootnotelinepenalty + \splittopskip\ht\strutbox % top baseline for broken footnotes + \splitmaxdepth\dp\strutbox + \floatingpenalty\@MM + \leftskip\z@skip + \rightskip\z@skip + \spaceskip\z@skip + \xspaceskip\z@skip + \parindent\defaultparindent + % + \smallfonts \rm + % + % Because we use hanging indentation in footnotes, a @noindent appears + % to exdent this text, so make it be a no-op. makeinfo does not use + % hanging indentation so @noindent can still be needed within footnote + % text after an @example or the like (not that this is good style). + \let\noindent = \relax + % + % Hang the footnote text off the number. Use \everypar in case the + % footnote extends for more than one paragraph. + \everypar = {\hang}% + \textindent{\thisfootno}% + % + % Don't crash into the line above the footnote text. Since this + % expands into a box, it must come within the paragraph, lest it + % provide a place where TeX can split the footnote. + \footstrut + % + % Invoke rest of plain TeX footnote routine. + \futurelet\next\fo@t +} +}%end \catcode `\@=11 + +\def\errfootnote{% + \errhelp=\EMsimple + \errmessage{Nested footnotes not supported in texinfo.tex, + even though they work in makeinfo; sorry} +} + +% In case a @footnote appears in a vbox, save the footnote text and create +% the real \insert just after the vbox finished. Otherwise, the insertion +% would be lost. +% Similarly, if a @footnote appears inside an alignment, save the footnote +% text to a box and make the \insert when a row of the table is finished. +% And the same can be done for other insert classes. --kasal, 16nov03. +% +% Replace the \insert primitive by a cheating macro. +% Deeper inside, just make sure that the saved insertions are not spilled +% out prematurely. +% +\def\startsavinginserts{% + \ifx \insert\ptexinsert + \let\insert\saveinsert + \else + \let\checkinserts\relax + \fi +} + +% This \insert replacement works for both \insert\footins{foo} and +% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. +% +\def\saveinsert#1{% + \edef\next{\noexpand\savetobox \makeSAVEname#1}% + \afterassignment\next + % swallow the left brace + \let\temp = +} +\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} +\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} + +\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} + +\def\placesaveins#1{% + \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname + {\box#1}% +} + +% eat @SAVE -- beware, all of them have catcode \other: +{ + \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) + \gdef\gobblesave @SAVE{} +} + +% initialization: +\def\newsaveins #1{% + \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% + \next +} +\def\newsaveinsX #1{% + \csname newbox\endcsname #1% + \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts + \checksaveins #1}% +} + +% initialize: +\let\checkinserts\empty +\newsaveins\footins +\newsaveins\margin + + +% @image. We use the macros from epsf.tex to support this. +% If epsf.tex is not installed and @image is used, we complain. +% +% Check for and read epsf.tex up front. If we read it only at @image +% time, we might be inside a group, and then its definitions would get +% undone and the next image would fail. +\openin 1 = epsf.tex +\ifeof 1 \else + % Do not bother showing banner with epsf.tex v2.7k (available in + % doc/epsf.tex and on ctan). + \def\epsfannounce{\toks0 = }% + \input epsf.tex +\fi +\closein 1 +% +% We will only complain once about lack of epsf.tex. +\newif\ifwarnednoepsf +\newhelp\noepsfhelp{epsf.tex must be installed for images to + work. It is also included in the Texinfo distribution, or you can get + it from ftp://tug.org/tex/epsf.tex.} +% +\def\image#1{% + \ifx\epsfbox\thisisundefined + \ifwarnednoepsf \else + \errhelp = \noepsfhelp + \errmessage{epsf.tex not found, images will be ignored}% + \global\warnednoepsftrue + \fi + \else + \imagexxx #1,,,,,\finish + \fi +} +% +% Arguments to @image: +% #1 is (mandatory) image filename; we tack on .eps extension. +% #2 is (optional) width, #3 is (optional) height. +% #4 is (ignored optional) html alt text. +% #5 is (ignored optional) extension. +% #6 is just the usual extra ignored arg for parsing stuff. +\newif\ifimagevmode +\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup + \catcode`\^^M = 5 % in case we're inside an example + \normalturnoffactive % allow _ et al. in names + % If the image is by itself, center it. + \ifvmode + \imagevmodetrue + \else \ifx\centersub\centerV + % for @center @image, we need a vbox so we can have our vertical space + \imagevmodetrue + \vbox\bgroup % vbox has better behavior than vtop herev + \fi\fi + % + \ifimagevmode + \nobreak\medskip + % Usually we'll have text after the image which will insert + % \parskip glue, so insert it here too to equalize the space + % above and below. + \nobreak\vskip\parskip + \nobreak + \fi + % + % Leave vertical mode so that indentation from an enclosing + % environment such as @quotation is respected. + % However, if we're at the top level, we don't want the + % normal paragraph indentation. + % On the other hand, if we are in the case of @center @image, we don't + % want to start a paragraph, which will create a hsize-width box and + % eradicate the centering. + \ifx\centersub\centerV\else \noindent \fi + % + % Output the image. + \ifpdf + \dopdfimage{#1}{#2}{#3}% + \else + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \epsfbox{#1.eps}% + \fi + % + \ifimagevmode + \medskip % space after a standalone image + \fi + \ifx\centersub\centerV \egroup \fi +\endgroup} + + +% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, +% etc. We don't actually implement floating yet, we always include the +% float "here". But it seemed the best name for the future. +% +\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} + +% There may be a space before second and/or third parameter; delete it. +\def\eatcommaspace#1, {#1,} + +% #1 is the optional FLOATTYPE, the text label for this float, typically +% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, +% this float will not be numbered and cannot be referred to. +% +% #2 is the optional xref label. Also must be present for the float to +% be referable. +% +% #3 is the optional positioning argument; for now, it is ignored. It +% will somehow specify the positions allowed to float to (here, top, bottom). +% +% We keep a separate counter for each FLOATTYPE, which we reset at each +% chapter-level command. +\let\resetallfloatnos=\empty +% +\def\dofloat#1,#2,#3,#4\finish{% + \let\thiscaption=\empty + \let\thisshortcaption=\empty + % + % don't lose footnotes inside @float. + % + % BEWARE: when the floats start float, we have to issue warning whenever an + % insert appears inside a float which could possibly float. --kasal, 26may04 + % + \startsavinginserts + % + % We can't be used inside a paragraph. + \par + % + \vtop\bgroup + \def\floattype{#1}% + \def\floatlabel{#2}% + \def\floatloc{#3}% we do nothing with this yet. + % + \ifx\floattype\empty + \let\safefloattype=\empty + \else + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + \fi + % + % If label is given but no type, we handle that as the empty type. + \ifx\floatlabel\empty \else + % We want each FLOATTYPE to be numbered separately (Figure 1, + % Table 1, Figure 2, ...). (And if no label, no number.) + % + \expandafter\getfloatno\csname\safefloattype floatno\endcsname + \global\advance\floatno by 1 + % + {% + % This magic value for \lastsection is output by \setref as the + % XREFLABEL-title value. \xrefX uses it to distinguish float + % labels (which have a completely different output format) from + % node and anchor labels. And \xrdef uses it to construct the + % lists of floats. + % + \edef\lastsection{\floatmagic=\safefloattype}% + \setref{\floatlabel}{Yfloat}% + }% + \fi + % + % start with \parskip glue, I guess. + \vskip\parskip + % + % Don't suppress indentation if a float happens to start a section. + \restorefirstparagraphindent +} + +% we have these possibilities: +% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap +% @float Foo,lbl & no caption: Foo 1.1 +% @float Foo & @caption{Cap}: Foo: Cap +% @float Foo & no caption: Foo +% @float ,lbl & Caption{Cap}: 1.1: Cap +% @float ,lbl & no caption: 1.1 +% @float & @caption{Cap}: Cap +% @float & no caption: +% +\def\Efloat{% + \let\floatident = \empty + % + % In all cases, if we have a float type, it comes first. + \ifx\floattype\empty \else \def\floatident{\floattype}\fi + % + % If we have an xref label, the number comes next. + \ifx\floatlabel\empty \else + \ifx\floattype\empty \else % if also had float type, need tie first. + \appendtomacro\floatident{\tie}% + \fi + % the number. + \appendtomacro\floatident{\chaplevelprefix\the\floatno}% + \fi + % + % Start the printed caption with what we've constructed in + % \floatident, but keep it separate; we need \floatident again. + \let\captionline = \floatident + % + \ifx\thiscaption\empty \else + \ifx\floatident\empty \else + \appendtomacro\captionline{: }% had ident, so need a colon between + \fi + % + % caption text. + \appendtomacro\captionline{\scanexp\thiscaption}% + \fi + % + % If we have anything to print, print it, with space before. + % Eventually this needs to become an \insert. + \ifx\captionline\empty \else + \vskip.5\parskip + \captionline + % + % Space below caption. + \vskip\parskip + \fi + % + % If have an xref label, write the list of floats info. Do this + % after the caption, to avoid chance of it being a breakpoint. + \ifx\floatlabel\empty \else + % Write the text that goes in the lof to the aux file as + % \floatlabel-lof. Besides \floatident, we include the short + % caption if specified, else the full caption if specified, else nothing. + {% + \atdummies + % + % since we read the caption text in the macro world, where ^^M + % is turned into a normal character, we have to scan it back, so + % we don't write the literal three characters "^^M" into the aux file. + \scanexp{% + \xdef\noexpand\gtemp{% + \ifx\thisshortcaption\empty + \thiscaption + \else + \thisshortcaption + \fi + }% + }% + \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident + \ifx\gtemp\empty \else : \gtemp \fi}}% + }% + \fi + \egroup % end of \vtop + % + % place the captured inserts + % + % BEWARE: when the floats start floating, we have to issue warning + % whenever an insert appears inside a float which could possibly + % float. --kasal, 26may04 + % + \checkinserts +} + +% Append the tokens #2 to the definition of macro #1, not expanding either. +% +\def\appendtomacro#1#2{% + \expandafter\def\expandafter#1\expandafter{#1#2}% +} + +% @caption, @shortcaption +% +\def\caption{\docaption\thiscaption} +\def\shortcaption{\docaption\thisshortcaption} +\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} +\def\defcaption#1#2{\egroup \def#1{#2}} + +% The parameter is the control sequence identifying the counter we are +% going to use. Create it if it doesn't exist and assign it to \floatno. +\def\getfloatno#1{% + \ifx#1\relax + % Haven't seen this figure type before. + \csname newcount\endcsname #1% + % + % Remember to reset this floatno at the next chap. + \expandafter\gdef\expandafter\resetallfloatnos + \expandafter{\resetallfloatnos #1=0 }% + \fi + \let\floatno#1% +} + +% \setref calls this to get the XREFLABEL-snt value. We want an @xref +% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we +% first read the @float command. +% +\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% + +% Magic string used for the XREFLABEL-title value, so \xrefX can +% distinguish floats from other xref types. +\def\floatmagic{!!float!!} + +% #1 is the control sequence we are passed; we expand into a conditional +% which is true if #1 represents a float ref. That is, the magic +% \lastsection value which we \setref above. +% +\def\iffloat#1{\expandafter\doiffloat#1==\finish} +% +% #1 is (maybe) the \floatmagic string. If so, #2 will be the +% (safe) float type for this float. We set \iffloattype to #2. +% +\def\doiffloat#1=#2=#3\finish{% + \def\temp{#1}% + \def\iffloattype{#2}% + \ifx\temp\floatmagic +} + +% @listoffloats FLOATTYPE - print a list of floats like a table of contents. +% +\parseargdef\listoffloats{% + \def\floattype{#1}% floattype + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + % + % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. + \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax + \ifhavexrefs + % if the user said @listoffloats foo but never @float foo. + \message{\linenumber No `\safefloattype' floats to list.}% + \fi + \else + \begingroup + \leftskip=\tocindent % indent these entries like a toc + \let\do=\listoffloatsdo + \csname floatlist\safefloattype\endcsname + \endgroup + \fi +} + +% This is called on each entry in a list of floats. We're passed the +% xref label, in the form LABEL-title, which is how we save it in the +% aux file. We strip off the -title and look up \XRLABEL-lof, which +% has the text we're supposed to typeset here. +% +% Figures without xref labels will not be included in the list (since +% they won't appear in the aux file). +% +\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} +\def\listoffloatsdoentry#1-title\finish{{% + % Can't fully expand XR#1-lof because it can contain anything. Just + % pass the control sequence. On the other hand, XR#1-pg is just the + % page number, and we want to fully expand that so we can get a link + % in pdf output. + \toksA = \expandafter{\csname XR#1-lof\endcsname}% + % + % use the same \entry macro we use to generate the TOC and index. + \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% + \writeentry +}} + + +\message{localization,} + +% For single-language documents, @documentlanguage is usually given very +% early, just after @documentencoding. Single argument is the language +% (de) or locale (de_DE) abbreviation. +% +{ + \catcode`\_ = \active + \globaldefs=1 +\parseargdef\documentlanguage{\begingroup + \let_=\normalunderscore % normal _ character for filenames + \tex % read txi-??.tex file in plain TeX. + % Read the file by the name they passed if it exists. + \openin 1 txi-#1.tex + \ifeof 1 + \documentlanguagetrywithoutunderscore{#1_\finish}% + \else + \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 + \endgroup % end raw TeX +\endgroup} +% +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. +% +\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% + \openin 1 txi-#1.tex + \ifeof 1 + \errhelp = \nolanghelp + \errmessage{Cannot read language file txi-#1.tex}% + \else + \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 +} +}% end of special _ catcode +% +\newhelp\nolanghelp{The given language definition file cannot be found or +is empty. Maybe you need to install it? Putting it in the current +directory should work if nowhere else does.} + +% This macro is called from txi-??.tex files; the first argument is the +% \language name to set (without the "\lang@" prefix), the second and +% third args are \{left,right}hyphenmin. +% +% The language names to pass are determined when the format is built. +% See the etex.log file created at that time, e.g., +% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. +% +% With TeX Live 2008, etex now includes hyphenation patterns for all +% available languages. This means we can support hyphenation in +% Texinfo, at least to some extent. (This still doesn't solve the +% accented characters problem.) +% +\catcode`@=11 +\def\txisetlanguage#1#2#3{% + % do not set the language if the name is undefined in the current TeX. + \expandafter\ifx\csname lang@#1\endcsname \relax + \message{no patterns for #1}% + \else + \global\language = \csname lang@#1\endcsname + \fi + % but there is no harm in adjusting the hyphenmin values regardless. + \global\lefthyphenmin = #2\relax + \global\righthyphenmin = #3\relax +} + +% Helpers for encodings. +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 + \global\catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +\def\setnonasciicharscatcodenonglobal#1{% + \count255=128 + \loop\ifnum\count255<256 + \catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% +\parseargdef\documentencoding{% + % Encoding being declared for the document. + \def\declaredencoding{\csname #1.enc\endcsname}% + % + % Supported encodings: names converted to tokens in order to be able + % to compare them with \ifx. + \def\ascii{\csname US-ASCII.enc\endcsname}% + \def\latnine{\csname ISO-8859-15.enc\endcsname}% + \def\latone{\csname ISO-8859-1.enc\endcsname}% + \def\lattwo{\csname ISO-8859-2.enc\endcsname}% + \def\utfeight{\csname UTF-8.enc\endcsname}% + % + \ifx \declaredencoding \ascii + \asciichardefs + % + \else \ifx \declaredencoding \lattwo + \setnonasciicharscatcode\active + \lattwochardefs + % + \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % + \else \ifx \declaredencoding \latnine + \setnonasciicharscatcode\active + \latninechardefs + % + \else \ifx \declaredencoding \utfeight + \setnonasciicharscatcode\active + \utfeightchardefs + % + \else + \message{Unknown document encoding #1, ignoring.}% + % + \fi % utfeight + \fi % latnine + \fi % latone + \fi % lattwo + \fi % ascii +} + +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). +% +\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} + +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active +% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% + \gdef^^a0{\tie} + \gdef^^a1{\exclamdown} + \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a3{{\pounds}} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\missingcharmsg{YEN SIGN}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} + \gdef^^aa{\ordf} + \gdef^^ab{\guillemetleft} + \gdef^^ac{$\lnot$} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} + \gdef^^b1{$\pm$} + \gdef^^b2{$^2$} + \gdef^^b3{$^3$} + \gdef^^b4{\'{}} + \gdef^^b5{$\mu$} + \gdef^^b6{\P} + % + \gdef^^b7{$^.$} + \gdef^^b8{\cedilla\ } + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + % + \gdef^^bb{\guillemetright} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} + \gdef^^bf{\questiondown} + % + \gdef^^c0{\`A} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} + \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} + \gdef^^c9{\'E} + \gdef^^ca{\^E} + \gdef^^cb{\"E} + \gdef^^cc{\`I} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % + \gdef^^d0{\DH} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\~O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\O} + \gdef^^d9{\`U} + \gdef^^da{\'U} + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\TH} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\~a} + \gdef^^e4{\"a} + \gdef^^e5{\ringaccent a} + \gdef^^e6{\ae} + \gdef^^e7{\cedilla c} + \gdef^^e8{\`e} + \gdef^^e9{\'e} + \gdef^^ea{\^e} + \gdef^^eb{\"e} + \gdef^^ec{\`{\dotless i}} + \gdef^^ed{\'{\dotless i}} + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % + \gdef^^f0{\dh} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\~o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\o} + \gdef^^f9{\`u} + \gdef^^fa{\'u} + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\th} + \gdef^^ff{\"y} +} + +% Latin9 (ISO-8859-15) encoding character definitions. +\def\latninechardefs{% + % Encoding is almost identical to Latin1. + \latonechardefs + % + \gdef^^a4{\euro} + \gdef^^a6{\v S} + \gdef^^a8{\v s} + \gdef^^b4{\v Z} + \gdef^^b8{\v z} + \gdef^^bc{\OE} + \gdef^^bd{\oe} + \gdef^^be{\"Y} +} + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdef^^a0{\tie} + \gdef^^a1{\ogonek{A}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\v L} + \gdef^^a6{\'S} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\v S} + \gdef^^aa{\cedilla S} + \gdef^^ab{\v T} + \gdef^^ac{\'Z} + \gdef^^ad{\-} + \gdef^^ae{\v Z} + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} + \gdef^^b1{\ogonek{a}} + \gdef^^b2{\ogonek{ }} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} + \gdef^^b6{\'s} + \gdef^^b7{\v{}} + \gdef^^b8{\cedilla\ } + \gdef^^b9{\v s} + \gdef^^ba{\cedilla s} + \gdef^^bb{\v t} + \gdef^^bc{\'z} + \gdef^^bd{\H{}} + \gdef^^be{\v z} + \gdef^^bf{\dotaccent z} + % + \gdef^^c0{\'R} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\u A} + \gdef^^c4{\"A} + \gdef^^c5{\'L} + \gdef^^c6{\'C} + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} + \gdef^^ca{\ogonek{E}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % + \gdef^^d0{\DH} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\H O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} + \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\cedilla T} + \gdef^^df{\ss} + % + \gdef^^e0{\'r} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\u a} + \gdef^^e4{\"a} + \gdef^^e5{\'l} + \gdef^^e6{\'c} + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} + \gdef^^ea{\ogonek{e}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} + \gdef^^ed{\'{\dotless{i}}} + \gdef^^ee{\^{\dotless{i}}} + \gdef^^ef{\v d} + % + \gdef^^f0{\dh} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\H o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\v r} + \gdef^^f9{\ringaccent u} + \gdef^^fa{\'u} + \gdef^^fb{\H u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\cedilla t} + \gdef^^ff{\dotaccent{}} +} + +% UTF-8 character definitions. +% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. +% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz + +\gdef\UTFviiiTwoOctets#1#2{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\endcsname} +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} +% +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + +\gdef\UTFviiiDefined#1{% + \ifx #1\relax + \message{\linenumber Unicode char \string #1 not defined for Texinfo}% + \else + \expandafter #1% + \fi +} + +\begingroup + \catcode`\~13 + \catcode`\"12 + + \def\UTFviiiLoop{% + \global\catcode\countUTFx\active + \uccode`\~\countUTFx + \uppercase\expandafter{\UTFviiiTmp}% + \advance\countUTFx by 1 + \ifnum\countUTFx < \countUTFy + \expandafter\UTFviiiLoop + \fi} + + \countUTFx = "C2 + \countUTFy = "E0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiTwoOctets\string~}} + \UTFviiiLoop + + \countUTFx = "E0 + \countUTFy = "F0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiThreeOctets\string~}} + \UTFviiiLoop + + \countUTFx = "F0 + \countUTFy = "F4 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiFourOctets\string~}} + \UTFviiiLoop +\endgroup + +\begingroup + \catcode`\"=12 + \catcode`\<=12 + \catcode`\.=12 + \catcode`\,=12 + \catcode`\;=12 + \catcode`\!=12 + \catcode`\~=13 + + \gdef\DeclareUnicodeCharacter#1#2{% + \countUTFz = "#1\relax + %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + \begingroup + \parseXMLCharref + \def\UTFviiiTwoOctets##1##2{% + \csname u8:##1\string ##2\endcsname}% + \def\UTFviiiThreeOctets##1##2##3{% + \csname u8:##1\string ##2\string ##3\endcsname}% + \def\UTFviiiFourOctets##1##2##3##4{% + \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \gdef\UTFviiiTmp{#2}% + \endgroup} + + \gdef\parseXMLCharref{% + \ifnum\countUTFz < "A0\relax + \errhelp = \EMsimple + \errmessage{Cannot define Unicode char value < 00A0}% + \else\ifnum\countUTFz < "800\relax + \parseUTFviiiA,% + \parseUTFviiiB C\UTFviiiTwoOctets.,% + \else\ifnum\countUTFz < "10000\relax + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% + \else + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiA!% + \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% + \fi\fi\fi + } + + \gdef\parseUTFviiiA#1{% + \countUTFx = \countUTFz + \divide\countUTFz by 64 + \countUTFy = \countUTFz + \multiply\countUTFz by 64 + \advance\countUTFx by -\countUTFz + \advance\countUTFx by 128 + \uccode `#1\countUTFx + \countUTFz = \countUTFy} + + \gdef\parseUTFviiiB#1#2#3#4{% + \advance\countUTFz by "#10\relax + \uccode `#3\countUTFz + \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} +\endgroup + +\def\utfeightchardefs{% + \DeclareUnicodeCharacter{00A0}{\tie} + \DeclareUnicodeCharacter{00A1}{\exclamdown} + \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A8}{\"{ }} + \DeclareUnicodeCharacter{00A9}{\copyright} + \DeclareUnicodeCharacter{00AA}{\ordf} + \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AD}{\-} + \DeclareUnicodeCharacter{00AE}{\registeredsymbol} + \DeclareUnicodeCharacter{00AF}{\={ }} + + \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00BA}{\ordm} + \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BF}{\questiondown} + + \DeclareUnicodeCharacter{00C0}{\`A} + \DeclareUnicodeCharacter{00C1}{\'A} + \DeclareUnicodeCharacter{00C2}{\^A} + \DeclareUnicodeCharacter{00C3}{\~A} + \DeclareUnicodeCharacter{00C4}{\"A} + \DeclareUnicodeCharacter{00C5}{\AA} + \DeclareUnicodeCharacter{00C6}{\AE} + \DeclareUnicodeCharacter{00C7}{\cedilla{C}} + \DeclareUnicodeCharacter{00C8}{\`E} + \DeclareUnicodeCharacter{00C9}{\'E} + \DeclareUnicodeCharacter{00CA}{\^E} + \DeclareUnicodeCharacter{00CB}{\"E} + \DeclareUnicodeCharacter{00CC}{\`I} + \DeclareUnicodeCharacter{00CD}{\'I} + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + + \DeclareUnicodeCharacter{00D0}{\DH} + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} + \DeclareUnicodeCharacter{00D4}{\^O} + \DeclareUnicodeCharacter{00D5}{\~O} + \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D8}{\O} + \DeclareUnicodeCharacter{00D9}{\`U} + \DeclareUnicodeCharacter{00DA}{\'U} + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DE}{\TH} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} + \DeclareUnicodeCharacter{00E1}{\'a} + \DeclareUnicodeCharacter{00E2}{\^a} + \DeclareUnicodeCharacter{00E3}{\~a} + \DeclareUnicodeCharacter{00E4}{\"a} + \DeclareUnicodeCharacter{00E5}{\aa} + \DeclareUnicodeCharacter{00E6}{\ae} + \DeclareUnicodeCharacter{00E7}{\cedilla{c}} + \DeclareUnicodeCharacter{00E8}{\`e} + \DeclareUnicodeCharacter{00E9}{\'e} + \DeclareUnicodeCharacter{00EA}{\^e} + \DeclareUnicodeCharacter{00EB}{\"e} + \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} + \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + + \DeclareUnicodeCharacter{00F0}{\dh} + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} + \DeclareUnicodeCharacter{00F4}{\^o} + \DeclareUnicodeCharacter{00F5}{\~o} + \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F8}{\o} + \DeclareUnicodeCharacter{00F9}{\`u} + \DeclareUnicodeCharacter{00FA}{\'u} + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FE}{\th} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0104}{\ogonek{A}} + \DeclareUnicodeCharacter{0105}{\ogonek{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{0118}{\ogonek{E}} + \DeclareUnicodeCharacter{0119}{\ogonek{e}} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} + \DeclareUnicodeCharacter{010D}{\v{c}} + \DeclareUnicodeCharacter{010E}{\v{D}} + + \DeclareUnicodeCharacter{0112}{\=E} + \DeclareUnicodeCharacter{0113}{\=e} + \DeclareUnicodeCharacter{0114}{\u{E}} + \DeclareUnicodeCharacter{0115}{\u{e}} + \DeclareUnicodeCharacter{0116}{\dotaccent{E}} + \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{011A}{\v{E}} + \DeclareUnicodeCharacter{011B}{\v{e}} + \DeclareUnicodeCharacter{011C}{\^G} + \DeclareUnicodeCharacter{011D}{\^g} + \DeclareUnicodeCharacter{011E}{\u{G}} + \DeclareUnicodeCharacter{011F}{\u{g}} + + \DeclareUnicodeCharacter{0120}{\dotaccent{G}} + \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0124}{\^H} + \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0128}{\~I} + \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} + \DeclareUnicodeCharacter{012A}{\=I} + \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} + \DeclareUnicodeCharacter{012C}{\u{I}} + \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + + \DeclareUnicodeCharacter{0130}{\dotaccent{I}} + \DeclareUnicodeCharacter{0131}{\dotless{i}} + \DeclareUnicodeCharacter{0132}{IJ} + \DeclareUnicodeCharacter{0133}{ij} + \DeclareUnicodeCharacter{0134}{\^J} + \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0139}{\'L} + \DeclareUnicodeCharacter{013A}{\'l} + + \DeclareUnicodeCharacter{0141}{\L} + \DeclareUnicodeCharacter{0142}{\l} + \DeclareUnicodeCharacter{0143}{\'N} + \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0147}{\v{N}} + \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{014C}{\=O} + \DeclareUnicodeCharacter{014D}{\=o} + \DeclareUnicodeCharacter{014E}{\u{O}} + \DeclareUnicodeCharacter{014F}{\u{o}} + + \DeclareUnicodeCharacter{0150}{\H{O}} + \DeclareUnicodeCharacter{0151}{\H{o}} + \DeclareUnicodeCharacter{0152}{\OE} + \DeclareUnicodeCharacter{0153}{\oe} + \DeclareUnicodeCharacter{0154}{\'R} + \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0158}{\v{R}} + \DeclareUnicodeCharacter{0159}{\v{r}} + \DeclareUnicodeCharacter{015A}{\'S} + \DeclareUnicodeCharacter{015B}{\'s} + \DeclareUnicodeCharacter{015C}{\^S} + \DeclareUnicodeCharacter{015D}{\^s} + \DeclareUnicodeCharacter{015E}{\cedilla{S}} + \DeclareUnicodeCharacter{015F}{\cedilla{s}} + + \DeclareUnicodeCharacter{0160}{\v{S}} + \DeclareUnicodeCharacter{0161}{\v{s}} + \DeclareUnicodeCharacter{0162}{\cedilla{t}} + \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0164}{\v{T}} + + \DeclareUnicodeCharacter{0168}{\~U} + \DeclareUnicodeCharacter{0169}{\~u} + \DeclareUnicodeCharacter{016A}{\=U} + \DeclareUnicodeCharacter{016B}{\=u} + \DeclareUnicodeCharacter{016C}{\u{U}} + \DeclareUnicodeCharacter{016D}{\u{u}} + \DeclareUnicodeCharacter{016E}{\ringaccent{U}} + \DeclareUnicodeCharacter{016F}{\ringaccent{u}} + + \DeclareUnicodeCharacter{0170}{\H{U}} + \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0174}{\^W} + \DeclareUnicodeCharacter{0175}{\^w} + \DeclareUnicodeCharacter{0176}{\^Y} + \DeclareUnicodeCharacter{0177}{\^y} + \DeclareUnicodeCharacter{0178}{\"Y} + \DeclareUnicodeCharacter{0179}{\'Z} + \DeclareUnicodeCharacter{017A}{\'z} + \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} + \DeclareUnicodeCharacter{017C}{\dotaccent{z}} + \DeclareUnicodeCharacter{017D}{\v{Z}} + \DeclareUnicodeCharacter{017E}{\v{z}} + + \DeclareUnicodeCharacter{01C4}{D\v{Z}} + \DeclareUnicodeCharacter{01C5}{D\v{z}} + \DeclareUnicodeCharacter{01C6}{d\v{z}} + \DeclareUnicodeCharacter{01C7}{LJ} + \DeclareUnicodeCharacter{01C8}{Lj} + \DeclareUnicodeCharacter{01C9}{lj} + \DeclareUnicodeCharacter{01CA}{NJ} + \DeclareUnicodeCharacter{01CB}{Nj} + \DeclareUnicodeCharacter{01CC}{nj} + \DeclareUnicodeCharacter{01CD}{\v{A}} + \DeclareUnicodeCharacter{01CE}{\v{a}} + \DeclareUnicodeCharacter{01CF}{\v{I}} + + \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} + \DeclareUnicodeCharacter{01D1}{\v{O}} + \DeclareUnicodeCharacter{01D2}{\v{o}} + \DeclareUnicodeCharacter{01D3}{\v{U}} + \DeclareUnicodeCharacter{01D4}{\v{u}} + + \DeclareUnicodeCharacter{01E2}{\={\AE}} + \DeclareUnicodeCharacter{01E3}{\={\ae}} + \DeclareUnicodeCharacter{01E6}{\v{G}} + \DeclareUnicodeCharacter{01E7}{\v{g}} + \DeclareUnicodeCharacter{01E8}{\v{K}} + \DeclareUnicodeCharacter{01E9}{\v{k}} + + \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} + \DeclareUnicodeCharacter{01F1}{DZ} + \DeclareUnicodeCharacter{01F2}{Dz} + \DeclareUnicodeCharacter{01F3}{dz} + \DeclareUnicodeCharacter{01F4}{\'G} + \DeclareUnicodeCharacter{01F5}{\'g} + \DeclareUnicodeCharacter{01F8}{\`N} + \DeclareUnicodeCharacter{01F9}{\`n} + \DeclareUnicodeCharacter{01FC}{\'{\AE}} + \DeclareUnicodeCharacter{01FD}{\'{\ae}} + \DeclareUnicodeCharacter{01FE}{\'{\O}} + \DeclareUnicodeCharacter{01FF}{\'{\o}} + + \DeclareUnicodeCharacter{021E}{\v{H}} + \DeclareUnicodeCharacter{021F}{\v{h}} + + \DeclareUnicodeCharacter{0226}{\dotaccent{A}} + \DeclareUnicodeCharacter{0227}{\dotaccent{a}} + \DeclareUnicodeCharacter{0228}{\cedilla{E}} + \DeclareUnicodeCharacter{0229}{\cedilla{e}} + \DeclareUnicodeCharacter{022E}{\dotaccent{O}} + \DeclareUnicodeCharacter{022F}{\dotaccent{o}} + + \DeclareUnicodeCharacter{0232}{\=Y} + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + + \DeclareUnicodeCharacter{02DB}{\ogonek{ }} + + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} + \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} + \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} + \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} + \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} + \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} + \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} + \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} + \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} + \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} + + \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} + \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} + + \DeclareUnicodeCharacter{1E20}{\=G} + \DeclareUnicodeCharacter{1E21}{\=g} + \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} + \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} + \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} + \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} + \DeclareUnicodeCharacter{1E26}{\"H} + \DeclareUnicodeCharacter{1E27}{\"h} + + \DeclareUnicodeCharacter{1E30}{\'K} + \DeclareUnicodeCharacter{1E31}{\'k} + \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} + \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} + \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} + \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} + \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} + \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} + \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} + \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} + \DeclareUnicodeCharacter{1E3E}{\'M} + \DeclareUnicodeCharacter{1E3F}{\'m} + + \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} + \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} + \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} + \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} + \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} + \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} + \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} + \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} + \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} + \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} + + \DeclareUnicodeCharacter{1E54}{\'P} + \DeclareUnicodeCharacter{1E55}{\'p} + \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} + \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} + \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} + \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} + \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} + \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} + \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} + \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} + + \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} + \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} + \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} + \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} + \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} + \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} + \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} + \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} + \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} + \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} + + \DeclareUnicodeCharacter{1E7C}{\~V} + \DeclareUnicodeCharacter{1E7D}{\~v} + \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} + \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} + + \DeclareUnicodeCharacter{1E80}{\`W} + \DeclareUnicodeCharacter{1E81}{\`w} + \DeclareUnicodeCharacter{1E82}{\'W} + \DeclareUnicodeCharacter{1E83}{\'w} + \DeclareUnicodeCharacter{1E84}{\"W} + \DeclareUnicodeCharacter{1E85}{\"w} + \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} + \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} + \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} + \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} + \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} + \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} + \DeclareUnicodeCharacter{1E8C}{\"X} + \DeclareUnicodeCharacter{1E8D}{\"x} + \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} + \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} + + \DeclareUnicodeCharacter{1E90}{\^Z} + \DeclareUnicodeCharacter{1E91}{\^z} + \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} + \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} + \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} + \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} + \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} + \DeclareUnicodeCharacter{1E97}{\"t} + \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} + \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} + + \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} + \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} + + \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} + \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} + \DeclareUnicodeCharacter{1EBC}{\~E} + \DeclareUnicodeCharacter{1EBD}{\~e} + + \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} + \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} + \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} + \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} + + \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} + \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} + + \DeclareUnicodeCharacter{1EF2}{\`Y} + \DeclareUnicodeCharacter{1EF3}{\`y} + \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} + + \DeclareUnicodeCharacter{1EF8}{\~Y} + \DeclareUnicodeCharacter{1EF9}{\~y} + + \DeclareUnicodeCharacter{2013}{--} + \DeclareUnicodeCharacter{2014}{---} + \DeclareUnicodeCharacter{2018}{\quoteleft} + \DeclareUnicodeCharacter{2019}{\quoteright} + \DeclareUnicodeCharacter{201A}{\quotesinglbase} + \DeclareUnicodeCharacter{201C}{\quotedblleft} + \DeclareUnicodeCharacter{201D}{\quotedblright} + \DeclareUnicodeCharacter{201E}{\quotedblbase} + \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{2026}{\dots} + \DeclareUnicodeCharacter{2039}{\guilsinglleft} + \DeclareUnicodeCharacter{203A}{\guilsinglright} + \DeclareUnicodeCharacter{20AC}{\euro} + + \DeclareUnicodeCharacter{2192}{\expansion} + \DeclareUnicodeCharacter{21D2}{\result} + + \DeclareUnicodeCharacter{2212}{\minus} + \DeclareUnicodeCharacter{2217}{\point} + \DeclareUnicodeCharacter{2261}{\equiv} +}% end of \utfeightchardefs + + +% US-ASCII character definitions. +\def\asciichardefs{% nothing need be done + \relax +} + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + +\message{formatting,} + +\newdimen\defaultparindent \defaultparindent = 15pt + +\chapheadingskip = 15pt plus 4pt minus 2pt +\secheadingskip = 12pt plus 3pt minus 2pt +\subsecheadingskip = 9pt plus 2pt minus 2pt + +% Prevent underfull vbox error messages. +\vbadness = 10000 + +% Don't be very finicky about underfull hboxes, either. +\hbadness = 6666 + +% Following George Bush, get rid of widows and orphans. +\widowpenalty=10000 +\clubpenalty=10000 + +% Use TeX 3.0's \emergencystretch to help line breaking, but if we're +% using an old version of TeX, don't do anything. We want the amount of +% stretch added to depend on the line length, hence the dependence on +% \hsize. We call this whenever the paper size is set. +% +\def\setemergencystretch{% + \ifx\emergencystretch\thisisundefined + % Allow us to assign to \emergencystretch anyway. + \def\emergencystretch{\dimen0}% + \else + \emergencystretch = .15\hsize + \fi +} + +% Parameters in order: 1) textheight; 2) textwidth; +% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; +% 7) physical page height; 8) physical page width. +% +% We also call \setleading{\textleading}, so the caller should define +% \textleading. The caller should also set \parskip. +% +\def\internalpagesizes#1#2#3#4#5#6#7#8{% + \voffset = #3\relax + \topskip = #6\relax + \splittopskip = \topskip + % + \vsize = #1\relax + \advance\vsize by \topskip + \outervsize = \vsize + \advance\outervsize by 2\topandbottommargin + \pageheight = \vsize + % + \hsize = #2\relax + \outerhsize = \hsize + \advance\outerhsize by 0.5in + \pagewidth = \hsize + % + \normaloffset = #4\relax + \bindingoffset = #5\relax + % + \ifpdf + \pdfpageheight #7\relax + \pdfpagewidth #8\relax + % if we don't reset these, they will remain at "1 true in" of + % whatever layout pdftex was dumped with. + \pdfhorigin = 1 true in + \pdfvorigin = 1 true in + \fi + % + \setleading{\textleading} + % + \parindent = \defaultparindent + \setemergencystretch +} + +% @letterpaper (the default). +\def\letterpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % If page is nothing but text, make it come out even. + \internalpagesizes{607.2pt}{6in}% that's 46 lines + {\voffset}{.25in}% + {\bindingoffset}{36pt}% + {11in}{8.5in}% +}} + +% Use @smallbook to reset parameters for 7x9.25 trim size. +\def\smallbook{{\globaldefs = 1 + \parskip = 2pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.5in}{5in}% + {-.2in}{0in}% + {\bindingoffset}{16pt}% + {9.25in}{7in}% + % + \lispnarrowing = 0.3in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .5cm +}} + +% Use @smallerbook to reset parameters for 6x9 trim size. +% (Just testing, parameters still in flux.) +\def\smallerbook{{\globaldefs = 1 + \parskip = 1.5pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.4in}{4.8in}% + {-.2in}{-.4in}% + {0pt}{14pt}% + {9in}{6in}% + % + \lispnarrowing = 0.25in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .4cm +}} + +% Use @afourpaper to print on European A4 paper. +\def\afourpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % Double-side printing via postscript on Laserjet 4050 + % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. + % To change the settings for a different printer or situation, adjust + % \normaloffset until the front-side and back-side texts align. Then + % do the same for \bindingoffset. You can set these for testing in + % your texinfo source file like this: + % @tex + % \global\normaloffset = -6mm + % \global\bindingoffset = 10mm + % @end tex + \internalpagesizes{673.2pt}{160mm}% that's 51 lines + {\voffset}{\hoffset}% + {\bindingoffset}{44pt}% + {297mm}{210mm}% + % + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = 5mm +}} + +% Use @afivepaper to print on European A5 paper. +% From romildo@urano.iceb.ufop.br, 2 July 2000. +% He also recommends making @example and @lisp be small. +\def\afivepaper{{\globaldefs = 1 + \parskip = 2pt plus 1pt minus 0.1pt + \textleading = 12.5pt + % + \internalpagesizes{160mm}{120mm}% + {\voffset}{\hoffset}% + {\bindingoffset}{8pt}% + {210mm}{148mm}% + % + \lispnarrowing = 0.2in + \tolerance = 800 + \hfuzz = 1.2pt + \contentsrightmargin = 0pt + \defbodyindent = 2mm + \tableindent = 12mm +}} + +% A specific text layout, 24x15cm overall, intended for A4 paper. +\def\afourlatex{{\globaldefs = 1 + \afourpaper + \internalpagesizes{237mm}{150mm}% + {\voffset}{4.6mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + % + % Must explicitly reset to 0 because we call \afourpaper. + \globaldefs = 0 +}} + +% Use @afourwide to print on A4 paper in landscape format. +\def\afourwide{{\globaldefs = 1 + \afourpaper + \internalpagesizes{241mm}{165mm}% + {\voffset}{-2.95mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + \globaldefs = 0 +}} + +% @pagesizes TEXTHEIGHT[,TEXTWIDTH] +% Perhaps we should allow setting the margins, \topskip, \parskip, +% and/or leading, also. Or perhaps we should compute them somehow. +% +\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} +\def\pagesizesyyy#1,#2,#3\finish{{% + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi + \globaldefs = 1 + % + \parskip = 3pt plus 2pt minus 1pt + \setleading{\textleading}% + % + \dimen0 = #1\relax + \advance\dimen0 by \voffset + % + \dimen2 = \hsize + \advance\dimen2 by \normaloffset + % + \internalpagesizes{#1}{\hsize}% + {\voffset}{\normaloffset}% + {\bindingoffset}{44pt}% + {\dimen0}{\dimen2}% +}} + +% Set default to letter. +% +\letterpaper + + +\message{and turning on texinfo input format.} + +\def^^L{\par} % remove \outer, so ^L can appear in an @comment + +% DEL is a comment character, in case @c does not suffice. +\catcode`\^^? = 14 + +% Define macros to output various characters with catcode for normal text. +\catcode`\"=\other \def\normaldoublequote{"} +\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix +\catcode`\+=\other \def\normalplus{+} +\catcode`\<=\other \def\normalless{<} +\catcode`\>=\other \def\normalgreater{>} +\catcode`\^=\other \def\normalcaret{^} +\catcode`\_=\other \def\normalunderscore{_} +\catcode`\|=\other \def\normalverticalbar{|} +\catcode`\~=\other \def\normaltilde{~} + +% This macro is used to make a character print one way in \tt +% (where it can probably be output as-is), and another way in other fonts, +% where something hairier probably needs to be done. +% +% #1 is what to print if we are indeed using \tt; #2 is what to print +% otherwise. Since all the Computer Modern typewriter fonts have zero +% interword stretch (and shrink), and it is reasonable to expect all +% typewriter fonts to have this, we can check that font parameter. +% +\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} + +% Same as above, but check for italic font. Actually this also catches +% non-italic slanted fonts since it is impossible to distinguish them from +% italic fonts. But since this is only used by $ and it uses \sl anyway +% this is not a problem. +\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} + +% Turn off all special characters except @ +% (and those which the user can use as if they were ordinary). +% Most of these we simply print from the \tt font, but for some, we can +% use math or other variants that look better in normal text. + +\catcode`\"=\active +\def\activedoublequote{{\tt\char34}} +\let"=\activedoublequote +\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde +\chardef\hat=`\^ +\catcode`\^=\active \def\activehat{{\tt \hat}} \let^ = \activehat + +\catcode`\_=\active +\def_{\ifusingtt\normalunderscore\_} +\let\realunder=_ +% Subroutine for the previous macro. +\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } + +\catcode`\|=\active +\def|{{\tt\char124}} + +\chardef \less=`\< +\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless +\chardef \gtr=`\> +\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr +\catcode`\+=\active \def+{{\tt \char 43}} +\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix + +% used for headline/footline in the output routine, in case the page +% breaks in the middle of an @tex block. +\def\texinfochars{% + \let< = \activeless + \let> = \activegtr + \let~ = \activetilde + \let^ = \activehat + \markupsetuplqdefault \markupsetuprqdefault + \let\b = \strong + \let\i = \smartitalic + % in principle, all other definitions in \tex have to be undone too. +} + +% If a .fmt file is being used, characters that might appear in a file +% name cannot be active until we have parsed the command line. +% So turn them off again, and have \everyjob (or @setfilename) turn them on. +% \otherifyactive is called near the end of this file. +\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} + +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} + +\catcode`\@=0 + +% \backslashcurfont outputs one backslash character in current font, +% as in \char`\\. +\global\chardef\backslashcurfont=`\\ +\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work + +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} + +% In texinfo, backslash is an active character; it prints the backslash +% in fixed width font. +\catcode`\\=\active % @ for escape char from now on. + +% The story here is that in math mode, the \char of \backslashcurfont +% ends up printing the roman \ from the math symbol font (because \char +% in math mode uses the \mathcode, and plain.tex sets +% \mathcode`\\="026E). It seems better for @backslashchar{} to always +% print a typewriter backslash, hence we use an explicit \mathchar, +% which is the decimal equivalent of "715c (class 7, e.g., use \fam; +% ignored family value; char position "5C). We can't use " for the +% usual hex value because it has already been made active. +@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} +@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. + +% On startup, @fixbackslash assigns: +% @let \ = @normalbackslash +% \rawbackslash defines an active \ to do \backslashcurfont. +% \otherbackslash defines an active \ to be a literal `\' character with +% catcode other. We switch back and forth between these. +@gdef@rawbackslash{@let\=@backslashcurfont} +@gdef@otherbackslash{@let\=@realbackslash} + +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. Also revert - to its normal character, in +% case the active - from code has slipped in. +% +{@catcode`- = @active + @gdef@normalturnoffactive{% + @let-=@normaldash + @let"=@normaldoublequote + @let$=@normaldollar %$ font-lock fix + @let+=@normalplus + @let<=@normalless + @let>=@normalgreater + @let\=@normalbackslash + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let~=@normaltilde + @markupsetuplqdefault + @markupsetuprqdefault + @unsepspaces + } +} + +% Make _ and + \other characters, temporarily. +% This is canceled by @fixbackslash. +@otherifyactive + +% If a .fmt file is being used, we don't want the `\input texinfo' to show up. +% That is what \eatinput is for; after that, the `\' should revert to printing +% a backslash. +% +@gdef@eatinput input texinfo{@fixbackslash} +@global@let\ = @eatinput + +% On the other hand, perhaps the file did not have a `\input texinfo'. Then +% the first `\' in the file would cause an error. This macro tries to fix +% that, assuming it is called before the first `\' could plausibly occur. +% Also turn back on active characters that might appear in the input +% file name, in case not using a pre-dumped format. +% +@gdef@fixbackslash{% + @ifx\@eatinput @let\ = @normalbackslash @fi + @catcode`+=@active + @catcode`@_=@active +} + +% Say @foo, not \foo, in error messages. +@escapechar = `@@ + +% These (along with & and #) are made active for url-breaking, so need +% active definitions as the normal characters. +@def@normaldot{.} +@def@normalquest{?} +@def@normalslash{/} + +% These look ok in all fonts, so just make them not special. +% @hashchar{} gets its own user-level command, because of #line. +@catcode`@& = @other @def@normalamp{&} +@catcode`@# = @other @def@normalhash{#} +@catcode`@% = @other @def@normalpercent{%} + +@let @hashchar = @normalhash + +@c Finally, make ` and ' active, so that txicodequoteundirected and +@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we +@c don't make ` and ' active, @code will not get them as active chars. +@c Do this last of all since we use ` in the previous @catcode assignments. +@catcode`@'=@active +@catcode`@`=@active +@markupsetuplqdefault +@markupsetuprqdefault + +@c Local variables: +@c eval: (add-hook 'write-file-hooks 'time-stamp) +@c page-delimiter: "^\\\\message" +@c time-stamp-start: "def\\\\texinfoversion{" +@c time-stamp-format: "%:y-%02m-%02d.%02H" +@c time-stamp-end: "}" +@c End: + +@c vim:sw=2: + +@ignore + arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 +@end ignore diff --git a/doc/version.texi b/doc/version.texi index be2510b..df484f8 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 3 April 2011 -@set UPDATED-MONTH April 2011 -@set EDITION 4.5.10 -@set VERSION 4.5.10 +@set UPDATED 26 October 2013 +@set UPDATED-MONTH October 2013 +@set EDITION 4.5.14 +@set VERSION 4.5.14 diff --git a/doc/versionmaint.texi b/doc/versionmaint.texi index be2510b..4f3aae1 100644 --- a/doc/versionmaint.texi +++ b/doc/versionmaint.texi @@ -1,4 +1,4 @@ -@set UPDATED 3 April 2011 -@set UPDATED-MONTH April 2011 -@set EDITION 4.5.10 -@set VERSION 4.5.10 +@set UPDATED 19 July 2014 +@set UPDATED-MONTH July 2014 +@set EDITION 4.5.14 +@set VERSION 4.5.14 diff --git a/find/Makefile.am b/find/Makefile.am index e3f62a6..30eba1d 100644 --- a/find/Makefile.am +++ b/find/Makefile.am @@ -5,8 +5,7 @@ localedir = $(datadir)/locale # regexprops_SOURCES = regexprops.c noinst_LIBRARIES = libfindtools.a -libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c tree.c util.c sharefile.c - +libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c exec.c tree.c util.c sharefile.c print.c # We always build two versions of find, one with fts, one without. # Their names depend on whether the user specified --with-fts. @@ -19,21 +18,38 @@ if WITH_FTS bin_PROGRAMS = find oldfind find_SOURCES = ftsfind.c oldfind_SOURCES = find.c +man_MANS = find.1 oldfind.1 else bin_PROGRAMS = find ftsfind find_SOURCES = find.c ftsfind_SOURCES = ftsfind.c +man_MANS = find.1 ftsfind.1 endif -EXTRA_DIST = defs.h sharefile.h $(man_MANS) -INCLUDES = -I../gnulib/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCALEDIR=\"$(localedir)\" -LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) @FINDLIBS@ -man_MANS = find.1 +# We don't just include man_MANS in EXTRA_DIST because while the value of +# man_MANS is not always the same, we want to distribute all of those files. +EXTRA_DIST = defs.h sharefile.h print.h find.1 ftsfind.1 oldfind.1 +AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCALEDIR=\"$(localedir)\" +LDADD = ./libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) $(FINDLIBS) $(GETHOSTNAME_LIB) $(LIB_EACCESS) +# gnulib advises we link against because we use : +# $(GETHOSTNAME_LIB) uname +# $(LIB_CLOCK_GETTIME) (some inditrect dependency) +# $(LIB_EACCESS) faccessat +# $(LIB_SELINUX) selinux-h +# $(MODF_LIBM) modf + SUBDIRS = . testsuite #$(PROGRAMS): ../lib/libfind.a dist-hook: findutils-check-manpages +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean + findutils-check-manpages: $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) diff --git a/find/Makefile.in b/find/Makefile.in index 9a19f15..d45988d 100644 --- a/find/Makefile.in +++ b/find/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -42,233 +59,198 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -276,13 +258,11 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar -ARFLAGS = cru libfindtools_a_AR = $(AR) $(ARFLAGS) libfindtools_a_LIBADD = am_libfindtools_a_OBJECTS = finddata.$(OBJEXT) fstype.$(OBJEXT) \ - parser.$(OBJEXT) pred.$(OBJEXT) tree.$(OBJEXT) util.$(OBJEXT) \ - sharefile.$(OBJEXT) + parser.$(OBJEXT) pred.$(OBJEXT) exec.$(OBJEXT) tree.$(OBJEXT) \ + util.$(OBJEXT) sharefile.$(OBJEXT) print.$(OBJEXT) libfindtools_a_OBJECTS = $(am_libfindtools_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) @@ -293,25 +273,31 @@ find_OBJECTS = $(am_find_OBJECTS) find_LDADD = $(LDADD) am__DEPENDENCIES_1 = find_DEPENDENCIES = ./libfindtools.a ../lib/libfind.a \ - ../gnulib/lib/libgnulib.a $(am__DEPENDENCIES_1) \ + ../gl/lib/libgnulib.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__ftsfind_SOURCES_DIST = ftsfind.c @WITH_FTS_FALSE@am_ftsfind_OBJECTS = ftsfind.$(OBJEXT) ftsfind_OBJECTS = $(am_ftsfind_OBJECTS) ftsfind_LDADD = $(LDADD) ftsfind_DEPENDENCIES = ./libfindtools.a ../lib/libfind.a \ - ../gnulib/lib/libgnulib.a $(am__DEPENDENCIES_1) \ + ../gl/lib/libgnulib.a $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__oldfind_SOURCES_DIST = find.c @WITH_FTS_TRUE@am_oldfind_OBJECTS = find.$(OBJEXT) oldfind_OBJECTS = $(am_oldfind_OBJECTS) oldfind_LDADD = $(LDADD) oldfind_DEPENDENCIES = ./libfindtools.a ../lib/libfind.a \ - ../gnulib/lib/libgnulib.a $(am__DEPENDENCIES_1) \ + ../gl/lib/libgnulib.a $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -331,6 +317,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -352,6 +343,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) @@ -395,6 +392,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -405,6 +404,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -427,59 +427,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -487,6 +534,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -498,12 +547,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -515,10 +579,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -558,49 +638,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -627,6 +747,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -636,7 +758,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -648,8 +771,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -692,26 +817,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -728,17 +875,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -760,19 +917,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -788,6 +961,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -802,8 +981,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -825,30 +1013,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -856,6 +1076,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -863,18 +1084,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -914,18 +1148,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = -I../gnulib/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCALEDIR=\"$(localedir)\" INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -935,6 +1171,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -945,12 +1183,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -971,6 +1212,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -981,7 +1225,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -989,8 +1235,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -1006,7 +1258,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -1014,8 +1268,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -1037,10 +1297,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -1052,19 +1319,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -1072,26 +1352,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -1109,6 +1419,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1121,11 +1434,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1133,6 +1456,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1140,10 +1464,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1153,10 +1480,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1180,6 +1512,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1187,14 +1520,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1204,6 +1540,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1216,7 +1554,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1257,9 +1597,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1273,14 +1618,25 @@ AM_CFLAGS = $(WARN_CFLAGS) # noinst_PROGRAMS = regexprops # regexprops_SOURCES = regexprops.c noinst_LIBRARIES = libfindtools.a -libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c tree.c util.c sharefile.c +libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c exec.c tree.c util.c sharefile.c print.c @WITH_FTS_FALSE@find_SOURCES = find.c @WITH_FTS_TRUE@find_SOURCES = ftsfind.c @WITH_FTS_TRUE@oldfind_SOURCES = find.c +@WITH_FTS_FALSE@man_MANS = find.1 ftsfind.1 +@WITH_FTS_TRUE@man_MANS = find.1 oldfind.1 @WITH_FTS_FALSE@ftsfind_SOURCES = ftsfind.c -EXTRA_DIST = defs.h sharefile.h $(man_MANS) -LDADD = ./libfindtools.a ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) @FINDLIBS@ -man_MANS = find.1 + +# We don't just include man_MANS in EXTRA_DIST because while the value of +# man_MANS is not always the same, we want to distribute all of those files. +EXTRA_DIST = defs.h sharefile.h print.h find.1 ftsfind.1 oldfind.1 +AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCALEDIR=\"$(localedir)\" +LDADD = ./libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) $(FINDLIBS) $(GETHOSTNAME_LIB) $(LIB_EACCESS) +# gnulib advises we link against because we use : +# $(GETHOSTNAME_LIB) uname +# $(LIB_CLOCK_GETTIME) (some inditrect dependency) +# $(LIB_EACCESS) faccessat +# $(LIB_SELINUX) selinux-h +# $(MODF_LIBM) modf SUBDIRS = . testsuite all: all-recursive @@ -1319,14 +1675,17 @@ $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libfindtools.a: $(libfindtools_a_OBJECTS) $(libfindtools_a_DEPENDENCIES) +libfindtools.a: $(libfindtools_a_OBJECTS) $(libfindtools_a_DEPENDENCIES) $(EXTRA_libfindtools_a_DEPENDENCIES) -rm -f libfindtools.a $(libfindtools_a_AR) libfindtools.a $(libfindtools_a_OBJECTS) $(libfindtools_a_LIBADD) $(RANLIB) libfindtools.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ @@ -1376,13 +1735,13 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad -find$(EXEEXT): $(find_OBJECTS) $(find_DEPENDENCIES) +find$(EXEEXT): $(find_OBJECTS) $(find_DEPENDENCIES) $(EXTRA_find_DEPENDENCIES) @rm -f find$(EXEEXT) $(LINK) $(find_OBJECTS) $(find_LDADD) $(LIBS) -ftsfind$(EXEEXT): $(ftsfind_OBJECTS) $(ftsfind_DEPENDENCIES) +ftsfind$(EXEEXT): $(ftsfind_OBJECTS) $(ftsfind_DEPENDENCIES) $(EXTRA_ftsfind_DEPENDENCIES) @rm -f ftsfind$(EXEEXT) $(LINK) $(ftsfind_OBJECTS) $(ftsfind_LDADD) $(LIBS) -oldfind$(EXEEXT): $(oldfind_OBJECTS) $(oldfind_DEPENDENCIES) +oldfind$(EXEEXT): $(oldfind_OBJECTS) $(oldfind_DEPENDENCIES) $(EXTRA_oldfind_DEPENDENCIES) @rm -f oldfind$(EXEEXT) $(LINK) $(oldfind_OBJECTS) $(oldfind_LDADD) $(LIBS) @@ -1392,12 +1751,14 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/finddata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftsfind.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pred.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sharefile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ @@ -1417,11 +1778,18 @@ distclean-compile: @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1450,9 +1818,7 @@ uninstall-man1: sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -1634,13 +2000,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -1681,10 +2044,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -1698,8 +2066,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \ - mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-local \ + clean-noinstLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) @@ -1773,26 +2141,33 @@ uninstall-man: uninstall-man1 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-noinstLIBRARIES ctags ctags-recursive \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-man1 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installcheck-binPROGRAMS \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS uninstall-man \ - uninstall-man1 + clean-generic clean-local clean-noinstLIBRARIES ctags \ + ctags-recursive dist-hook distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-man1 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am \ + installcheck-binPROGRAMS installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-man uninstall-man1 #$(PROGRAMS): ../lib/libfind.a dist-hook: findutils-check-manpages +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean + findutils-check-manpages: $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) diff --git a/find/defs.h b/find/defs.h index 11d1d00..caccd2b 100644 --- a/find/defs.h +++ b/find/defs.h @@ -1,6 +1,6 @@ /* defs.h -- data types and declarations. Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,10 +20,10 @@ #ifndef INC_DEFS_H #define INC_DEFS_H 1 -#if !defined(ALREADY_INCLUDED_CONFIG_H) +#if !defined ALREADY_INCLUDED_CONFIG_H /* * Savannah bug #20128: if we include some system header and it - * includes some othersecond system header, the second system header + * includes some other second system header, the second system header * may in fact turn out to be a file provided by gnulib. For that * situation, we need to have already included so that the * Gnulib files have access to the information probed by their @@ -258,7 +258,7 @@ struct predicate /* Only used for debugging, but defined unconditionally so individual modules can be compiled with -DDEBUG. */ - char *p_name; + const char *p_name; /* The type of this node. There are two kinds. The first is real predicates ("primaries") such as -perm, -print, or -exec. The @@ -382,13 +382,13 @@ typedef bool (*PARSE_FUNC)(const struct parser_table *p, struct parser_table { enum arg_type type; - char *parser_name; + const char *parser_name; PARSE_FUNC parser_func; PRED_FUNC pred_func; }; /* parser.c */ -const struct parser_table* find_parser (char *search_name); +const struct parser_table* find_parser (const char *search_name); bool parse_print (const struct parser_table*, char *argv[], int *arg_ptr); void pred_sanity_check (const struct predicate *predicates); void check_option_combinations (const struct predicate *p); @@ -462,13 +462,9 @@ PREDICATEFUNCTION pred_context; -int launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv); - - char *find_pred_name (PRED_FUNC pred_func); - void print_predicate (FILE *fp, const struct predicate *p); void print_tree (FILE*, struct predicate *node, int indent); void print_list (FILE*, struct predicate *node); @@ -624,7 +620,6 @@ struct options */ enum quoting_style err_quoting_style; }; -extern struct options options; struct state @@ -642,7 +637,7 @@ struct state /* The file being operated on, relative to the current directory. Used for stat, readlink, remove, and opendir. */ char *rel_pathname; - /* The directory fd to which rel_pathname is relative. Thsi is relevant + /* The directory fd to which rel_pathname is relative. This is relevant * when we're navigating the hierarchy with fts() and using FTS_CWDFD. */ int cwd_dir_fd; @@ -670,6 +665,10 @@ struct state bool already_issued_stat_error_msg; }; +/* exec.c */ +bool impl_pred_exec (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr); +int launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv); + /* finddata.c */ extern struct options options; extern struct state state; diff --git a/find/exec.c b/find/exec.c new file mode 100644 index 0000000..06394f1 --- /dev/null +++ b/find/exec.c @@ -0,0 +1,388 @@ +/* exec.c -- Implementation of -exec, -execdir, -ok, -okdir. + Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, + 2004, 2005, 2006, 2007, 2008, 2009, + 2010 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/* config.h must be included first. */ +#include + +/* system headers. */ +#include +#include +#include +#include +#include + + +/* gnulib headers */ +#include "cloexec.h" +#include "dirname.h" +#include "error.h" +#include "gettext.h" +#include "save-cwd.h" +#include "xalloc.h" + +/* findutils headers */ +#include "buildcmd.h" +#include "defs.h" +#include "fdleak.h" + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + + +/* Initialize exec->wd_for_exec. + + We save in exec->wd_for_exec the directory whose path relative to + cwd_df is dir. + */ +static bool +initialize_wd_for_exec (struct exec_val *execp, int cwd_fd, const char *dir) +{ + execp->wd_for_exec = xmalloc (sizeof (*execp->wd_for_exec)); + execp->wd_for_exec->name = NULL; + execp->wd_for_exec->desc = openat (cwd_fd, dir, O_RDONLY); + if (execp->wd_for_exec->desc < 0) + return false; + set_cloexec_flag (execp->wd_for_exec->desc, true); + return true; +} + + +static bool +record_exec_dir (struct exec_val *execp) +{ + if (!execp->state.todo) + { + /* working directory not already known, so must be a *dir variant, + and this must be the first arg we added. However, this may + be -execdir foo {} \; (i.e. not multiple). */ + assert (!execp->state.todo); + + /* Record the WD. If we're using -L or fts chooses to do so for + any other reason, state.cwd_dir_fd may in fact not be the + directory containing the target file. When this happens, + rel_path will contain directory components (since it is the + path from state.cwd_dir_fd to the target file). + + We deal with this by extracting any directory part and using + that to adjust what goes into execp->wd_for_exec. + */ + if (strchr (state.rel_pathname, '/')) + { + char *dir = mdir_name (state.rel_pathname); + bool result = initialize_wd_for_exec (execp, state.cwd_dir_fd, dir); + free (dir); + return result; + } + else + { + return initialize_wd_for_exec (execp, state.cwd_dir_fd, "."); + } + } + return true; +} + + + + +bool +impl_pred_exec (const char *pathname, + struct stat *stat_buf, + struct predicate *pred_ptr) +{ + struct exec_val *execp = &pred_ptr->args.exec_vec; + char *buf = NULL; + const char *target; + bool result; + const bool local = is_exec_in_local_dir (pred_ptr->pred_func); + char *prefix; + size_t pfxlen; + + (void) stat_buf; + if (local) + { + /* For -execdir/-okdir predicates, the parser did not fill in + the wd_for_exec member of struct exec_val. So for those + predicates, we do so now. + */ + if (!record_exec_dir (execp)) + { + error (EXIT_FAILURE, errno, + _("Failed to save working directory in order to " + "run a command on %s"), + safely_quote_err_filename (0, pathname)); + /*NOTREACHED*/ + } + target = buf = base_name (state.rel_pathname); + if ('/' == target[0]) + { + /* find / execdir ls -d {} \; */ + prefix = NULL; + pfxlen = 0; + } + else + { + prefix = "./"; + pfxlen = 2u; + } + } + else + { + /* For the others (-exec, -ok), the parser should + have set wd_for_exec to initial_wd, indicating + that the exec should take place from find's initial + working directory. + */ + assert (execp->wd_for_exec == initial_wd); + target = pathname; + prefix = NULL; + pfxlen = 0u; + } + + if (execp->multiple) + { + /* Push the argument onto the current list. + * The command may or may not be run at this point, + * depending on the command line length limits. + */ + bc_push_arg (&execp->ctl, + &execp->state, + target, strlen (target)+1, + prefix, pfxlen, + 0); + + /* remember that there are pending execdirs. */ + if (execp->state.todo) + state.execdirs_outstanding = true; + + /* POSIX: If the primary expression is punctuated by a plus + * sign, the primary shall always evaluate as true + */ + result = true; + } + else + { + int i; + + for (i=0; inum_args; ++i) + { + bc_do_insert (&execp->ctl, + &execp->state, + execp->replace_vec[i], + strlen (execp->replace_vec[i]), + prefix, pfxlen, + target, strlen (target), + 0); + } + + /* Actually invoke the command. */ + bc_do_exec (&execp->ctl, &execp->state); + if (WIFEXITED(execp->last_child_status)) + { + if (0 == WEXITSTATUS(execp->last_child_status)) + result = true; /* The child succeeded. */ + else + result = false; + } + else + { + result = false; + } + if (local) + free_cwd (execp->wd_for_exec); + } + if (buf) + { + assert (local); + free (buf); + } + return result; +} + + + +/* 1) fork to get a child; parent remembers the child pid + 2) child execs the command requested + 3) parent waits for child; checks for proper pid of child + + Possible returns: + + ret errno status(h) status(l) + + pid x signal# 0177 stopped + pid x exit arg 0 term by _exit + pid x 0 signal # term by signal + -1 EINTR parent got signal + -1 other some other kind of error + + Return true only if the pid matches, status(l) is + zero, and the exit arg (status high) is 0. + Otherwise return false, possibly printing an error message. */ +static bool +prep_child_for_exec (bool close_stdin, const struct saved_cwd *wd) +{ + bool ok = true; + if (close_stdin) + { + const char inputfile[] = "/dev/null"; + + if (close (0) < 0) + { + error (0, errno, _("Cannot close standard input")); + ok = false; + } + else + { + if (open (inputfile, O_RDONLY +#if defined O_LARGEFILE + |O_LARGEFILE +#endif + ) < 0) + { + /* This is not entirely fatal, since + * executing the child with a closed + * stdin is almost as good as executing it + * with its stdin attached to /dev/null. + */ + error (0, errno, "%s", safely_quote_err_filename (0, inputfile)); + /* do not set ok=false, it is OK to continue anyway. */ + } + } + } + + /* Even if DebugSearch is set, don't announce our change of + * directory, since we're not going to emit a subsequent + * announcement of a call to stat() anyway, as we're about to exec + * something. + */ + if (0 != restore_cwd (wd)) + { + error (0, errno, _("Failed to change directory")); + ok = false; + } + return ok; +} + + +int +launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv) +{ + pid_t child_pid; + static int first_time = 1; + struct exec_val *execp = usercontext; + + /* Make sure output of command doesn't get mixed with find output. */ + fflush (stdout); + fflush (stderr); + + /* Make sure to listen for the kids. */ + if (first_time) + { + first_time = 0; + signal (SIGCHLD, SIG_DFL); + } + + child_pid = fork (); + if (child_pid == -1) + error (EXIT_FAILURE, errno, _("cannot fork")); + if (child_pid == 0) + { + /* We are the child. */ + assert (NULL != execp->wd_for_exec); + if (!prep_child_for_exec (execp->close_stdin, execp->wd_for_exec)) + { + _exit (1); + } + else + { + if (fd_leak_check_is_enabled ()) + { + complain_about_leaky_fds (); + } + } + + if (bc_args_exceed_testing_limit (argv)) + errno = E2BIG; + else + execvp (argv[0], argv); + /* TODO: use a pipe to pass back the errno value, like xargs does */ + error (0, errno, "%s", + safely_quote_err_filename (0, argv[0])); + _exit (1); + } + + while (waitpid (child_pid, &(execp->last_child_status), 0) == (pid_t) -1) + { + if (errno != EINTR) + { + error (0, errno, _("error waiting for %s"), + safely_quote_err_filename (0, argv[0])); + state.exit_status = 1; + return 0; /* FAIL */ + } + } + + if (WIFSIGNALED (execp->last_child_status)) + { + error (0, 0, _("%s terminated by signal %d"), + quotearg_n_style (0, options.err_quoting_style, argv[0]), + WTERMSIG (execp->last_child_status)); + + if (execp->multiple) + { + /* -exec \; just returns false if the invoked command fails. + * -exec {} + returns true if the invoked command fails, but + * sets the program exit status. + */ + state.exit_status = 1; + } + + return 1; /* OK */ + } + + if (0 == WEXITSTATUS (execp->last_child_status)) + { + return 1; /* OK */ + } + else + { + if (execp->multiple) + { + /* -exec \; just returns false if the invoked command fails. + * -exec {} + returns true if the invoked command fails, but + * sets the program exit status. + */ + state.exit_status = 1; + } + /* The child failed, but this is the exec callback. We + * don't want to run the child again in this case anwyay. + */ + return 1; /* FAIL (but don't try again) */ + } + +} diff --git a/find/find.1 b/find/find.1 index e851f82..f49218e 100644 --- a/find/find.1 +++ b/find/find.1 @@ -3,20 +3,21 @@ find \- search for files in a directory hierarchy .SH SYNOPSIS .B find -[\-H] [\-L] [\-P] [\-D debugopts] [\-Olevel] [path...] [expression] +[\-H] [\-L] [\-P] [\-D debugopts] [\-Olevel] [starting-point...] [expression] .SH DESCRIPTION This manual page documents the GNU version of .BR find . GNU .B find -searches the directory tree rooted at each given file name by +searches the directory tree rooted at each given starting-point by evaluating the given expression from left to right, according to the rules of precedence (see section OPERATORS), until the outcome is known (the left hand side is false for \fIand\fR operations, true for \fIor\fR), at which point .B find -moves on to the next file name. +moves on to the next file name. If no starting-point is specified, +`.' is assumed. .PP If you are using .B find @@ -401,15 +402,15 @@ instead, one with the option and one without it). .IP "\-maxdepth \fIlevels\fR" Descend at most \fIlevels\fR (a non-negative integer) levels of -directories below the command line arguments. +directories below the starting-points. .B \-maxdepth 0 - means only apply the tests and actions to the command line arguments. + means only apply the tests and actions to the starting-points themselves. .IP "\-mindepth \fIlevels\fR" Do not apply any tests or actions at levels less than \fIlevels\fR (a non-negative integer). .B \-mindepth 1 -means process all files except the command line arguments. +means process all files except the starting-points. .IP \-mount Don't descend directories on other filesystems. An alternate name for @@ -801,25 +802,9 @@ with the behaviour of .BR \-000 ). .IP "\-perm +\fImode\fR" -Deprecated, old way of searching for files with any of the permission -bits in \fImode\fR set. You should use -.B \-perm \fI/mode\fR -instead. Trying to use the `+' syntax with symbolic modes will yield -surprising results. For example, `+u+x' is a valid symbolic mode -(equivalent to +u,+x, i.e. 0111) and will therefore not be evaluated -as -.B \-perm +\fImode\fR -but instead as the exact mode specifier -.B \-perm \fImode\fR -and so it matches files with exact permissions 0111 instead of files with any -execute bit set. If you found this paragraph confusing, you're not -alone - just use -.B \-perm /\fImode\fR. -This form of the -.B \-perm -test is deprecated because the POSIX specification requires the -interpretation of a leading `+' as being part of a symbolic mode, and -so we switched to using `/' instead. +This is no longer supported (and has been deprecated since 2005). Use +.B "\-perm /\fImode\fR" +instead. .IP \-readable Matches files which are readable. This takes into account access @@ -850,7 +835,7 @@ File refers to the same inode as \fIname\fR. When is in effect, this can include symbolic links. .IP "\-size \fIn\fR[cwbkMG]" -File uses \fIn\fP units of space. The following suffixes +File uses \fIn\fP units of space, rounding up. The following suffixes can be used: .RS .IP `b' @@ -875,7 +860,10 @@ handle sparse files differently. The `b' suffix always denotes 512-byte blocks and never 1 Kilobyte blocks, which is different to the behaviour of .BR \-ls . - +The + and - prefixes signifiy greater than and less than, as usual, +but bear in mind that the size is rounded up to the next unit (so a +1-byte file is not matched by +.BR "-size -1M" ). .IP \-true Always true. @@ -1026,7 +1014,13 @@ command will be much less than the number of matched files. The command line is built in much the same way that .B xargs builds its command lines. Only one instance of `{}' is allowed within -the command. The command is executed in the starting directory. +the command. The command is executed in the starting directory. If +.B find +encounters an error, this can sometimes cause an +immediate exit, so some pending commands may not be run +at all. This variant of +.B \-exec +always returns true. .IP "\-execdir \fIcommand\fR ;" .IP "\-execdir \fIcommand\fR {} +" @@ -1055,7 +1049,26 @@ appropriately-named file in a directory in which you will run .BR \-execdir . The same applies to having entries in .B $PATH -which are empty or which are not absolute directory names. +which are empty or which are not absolute directory names. If +.B find +encounters an error, this can sometimes cause an +immediate exit, so some pending commands may not be run +at all. The result of the action depends on whether the +.B + +or the +.B ; +variant is being used; +.B \-execdir +.I command +.B {} + +always returns true, while +.B \-execdir +.I command +.B {} ; +returns true only if +.I command +returns 0. + .IP "\-fls \fIfile\fR" True; like @@ -1297,8 +1310,7 @@ function. File's last status change time in the format specified by \fIk\fR, which is the same as for %A. .IP %d -File's depth in the directory tree; 0 means the file is a command line -argument. +File's depth in the directory tree; 0 means the file is a starting-point. .IP %D The device number on which the file exists (the st_dev field of struct stat), in decimal. @@ -1316,7 +1328,7 @@ Leading directories of file's name (all but the last element). If the file name contains no slashes (since it is in the current directory) the %h specifier expands to ".". .IP %H -Command line argument under which file was found. +Starting-point under which file was found. .IP %i File's inode number (in decimal). .IP %k @@ -1343,7 +1355,7 @@ Number of hard links to file. .IP %p File's name. .IP %P -File's name with the name of the command line argument under which +File's name with the name of the starting-point under which it was found removed. .IP %s File's size in bytes. @@ -1374,6 +1386,8 @@ U=unknown type (shouldn't happen) File's type (like %y), plus follow symlinks: L=loop, N=nonexistent .IP %Z (SELinux only) file's security context. +.IP "%{ %[ %(" +Reserved for future use. .PP A `%' character followed by any other character is discarded, but the other character is printed (don't rely on this, as further format @@ -1417,7 +1431,8 @@ implies you cannot usefully use .B \-prune and -.B \-delete together. +.B \-delete +together. .IP "\-quit" Exit immediately. No child processes will be left running, but no more @@ -1444,7 +1459,7 @@ example, changing the settings of your function keys on some terminals). Unusual characters are handled differently by various actions, as described below. -.IP "\-print0, \-fprint0\" +.IP "\-print0, \-fprint0" Always print the exact filename, unchanged, even if the output is going to a terminal. @@ -1790,6 +1805,27 @@ directives of .B \-printf and .BR \-fprintf . +.SH BINARIES +The findutils source distribution contains two different +implementations of +.BR find . +The older implementation descends the file system recursively, while +the newer one uses +.BR fts (3). +Both are normally installed. +.P +If the option +.B \-\-without\-fts +was passed to +.BR configure , +the recursive implementation is installed as +.B find +and the fts-based implementation is installed as +.BR ftsfind . +Otherwise, the fts-based implementation is installed as +.B find +and the recursive implementation is installed as +.BR oldfind . .SH "EXAMPLES" .nf .B find /tmp \-name core \-type f \-print | xargs /bin/rm \-f @@ -2010,21 +2046,38 @@ description, but if the return value is non-zero, you should not rely on the correctness of the results of .BR find . +When some error occurs, +.B find +may stop immeidately, without completing all the actions specified. +For example, some starting points may not have been examined or some +pending program invocations for +.B \-exec ... {} + +or +.B \-execdir ... {} + +may not have been performed. + + .SH "SEE ALSO" \fBlocate\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1), \fBxargs\fP(1), \fBchmod\fP(1), \fBfnmatch\fP(3), \fBregex\fP(7), \fBstat\fP(2), \fBlstat\fP(2), \fBls\fP(1), \fBprintf\fP(3), \fBstrftime\fP(3), -\fBctime\fP(3), \fBFinding Files\fP (on-line in Info, or printed). +\fBctime\fP(3) + +The full documentation for +.B find +is maintained as a Texinfo manual. If the +.B info +and +.B find +programs are properly installed at your site, the command +.B info find +should give you access to the complete manual. + .SH "HISTORY" As of findutils-4.2.2, shell metacharacters (`*', `?' or `[]' for example) used in filename patterns will match a leading `.', because IEEE POSIX interpretation 126 requires this. .P -The syntax -\.B \-perm +MODE -was deprecated in findutils-4.2.21, in favour of -\.B \-perm -.BR /MODE . As of findutils-4.3.3, .B \-perm /000 now matches all files instead of none. @@ -2072,6 +2125,17 @@ Feature Added in Also occurs in \-ipath 3.8 \-iregex 3.8 .TE +.P +The syntax +\.B \-perm +MODE +was removed in findutils-4.5.12, in favour of +\.B \-perm +.BR /MODE . +The +.B +MODE +syntax had been deprecated since findutils-4.2.21 +which was released in 2005. +.P .SH "NON-BUGS" .nf .B $ find . \-name *.c \-print diff --git a/find/find.c b/find/find.c index 98d5a37..a8c6b4f 100644 --- a/find/find.c +++ b/find/find.c @@ -1,6 +1,6 @@ /* find -- search for files in a directory hierarchy Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,37 +24,55 @@ Improvements have been made by James Youngman . */ - +/* config.h must be included first. */ #include -#include "defs.h" - -#define USE_SAFE_CHDIR 1 -#undef STAT_MOUNTPOINTS - -#include +/* system headers. */ #include - -#include +#include #include +#include +#include -#include "fcntl--.h" -#include "xalloc.h" -#include "human.h" +/* gnulib headers. */ #include "canonicalize.h" - #include "closein.h" -#include "savedirinfo.h" -#include "buildcmd.h" +#include "dirent-safer.h" #include "dirname.h" -#include "xgetcwd.h" #include "error.h" -#include "fdleak.h" +#include "fcntl--.h" +#include "gettext.h" +#include "human.h" #include "progname.h" #include "save-cwd.h" +#include "xalloc.h" +#include "xgetcwd.h" -#ifdef HAVE_LOCALE_H -#include + +/* find headers. */ +#include "buildcmd.h" +#include "defs.h" +#include "fdleak.h" + +#undef STAT_MOUNTPOINTS + +#ifdef CLOSEDIR_VOID +/* Fake a return value. */ +# define CLOSEDIR(d) (closedir (d), 0) +#else +# define CLOSEDIR(d) closedir (d) +#endif + +enum +{ + NOT_AN_INODE_NUMBER = 0 +}; + +#ifdef D_INO_IN_DIRENT +# define D_INO(dp) (dp)->d_ino +#else +/* Some systems don't have inodes, so fake them to avoid lots of ifdefs. */ +# define D_INO(dp) NOT_AN_INODE_NUMBER #endif #if ENABLE_NLS @@ -77,8 +95,8 @@ static void init_mounted_dev_list (int mandatory); #endif -static void process_top_path (char *pathname, mode_t mode); -static int process_path (char *pathname, char *name, bool leaf, char *parent, mode_t type); +static void process_top_path (char *pathname, mode_t mode, ino_t inum); +static int process_path (char *pathname, char *name, bool leaf, char *parent, mode_t type, ino_t inum); static void process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, char *parent); @@ -111,6 +129,43 @@ enum WdSanityCheckFatality NON_FATAL_IF_SANITY_CHECK_FAILS }; +#if defined HAVE_STRUCT_DIRENT_D_TYPE +/* Convert the value of struct dirent.d_type into a value for + * struct stat.st_mode (at least the file type bits), or zero + * if the type is DT_UNKNOWN or is a value we don't know about. + */ +static mode_t +type_to_mode (unsigned type) +{ + switch (type) + { +#ifdef DT_FIFO + case DT_FIFO: return S_IFIFO; +#endif +#ifdef DT_CHR + case DT_CHR: return S_IFCHR; +#endif +#ifdef DT_DIR + case DT_DIR: return S_IFDIR; +#endif +#ifdef DT_BLK + case DT_BLK: return S_IFBLK; +#endif +#ifdef DT_REG + case DT_REG: return S_IFREG; +#endif +#ifdef DT_LNK + case DT_LNK: return S_IFLNK; +#endif +#ifdef DT_SOCK + case DT_SOCK: return S_IFSOCK; +#endif + default: + return 0; /* Unknown. */ + } +} +#endif + int get_current_dirfd (void) @@ -145,7 +200,7 @@ main (int argc, char **argv) if (NULL == state.shared_files) { error (EXIT_FAILURE, errno, - _("Failed initialise shared-file hash table")); + _("Failed to initialize shared-file hash table")); } /* Set the option defaults before we do the locale @@ -159,7 +214,10 @@ main (int argc, char **argv) #endif bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - atexit (close_stdin); + if (atexit (close_stdin)) + { + error (EXIT_FAILURE, errno, _("The atexit library function failed")); + } /* Check for -P, -H or -L options. */ end_of_leading_options = process_leading_options (argc, argv); @@ -171,7 +229,7 @@ main (int argc, char **argv) fprintf (stderr, "cur_day_start = %s", ctime (&options.cur_day_start)); #endif /* DEBUG */ - /* state.cwd_dir_fd has to be initialised before we call build_expression_tree () + /* state.cwd_dir_fd has to be initialized before we call build_expression_tree () * because command-line parsing may lead us to stat some files. */ state.cwd_dir_fd = AT_FDCWD; @@ -207,7 +265,7 @@ main (int argc, char **argv) /* If no paths are given, default to ".". */ for (i = end_of_leading_options; i < argc && !looks_like_expression (argv[i], true); i++) { - process_top_path (argv[i], 0); + process_top_path (argv[i], 0, starting_stat_buf.st_ino); } /* If there were no path arguments, default to ".". */ @@ -220,7 +278,7 @@ main (int argc, char **argv) * "find -printf %H" (note, not "find . -printf %H"). */ char defaultpath[2] = "."; - process_top_path (defaultpath, 0); + process_top_path (defaultpath, 0, starting_stat_buf.st_ino); } /* If "-exec ... {} +" has been used, there may be some @@ -478,6 +536,7 @@ wd_sanity_check (const char *thing_to_stat, #ifdef STAT_MOUNTPOINTS isfatal = dirchange_is_fatal (specific_what,isfatal,silent,newinfo); #else + (void) silent; isfatal = RETRY_IF_SANITY_CHECK_FAILS; #endif } @@ -779,7 +838,6 @@ safely_chdir_lstat (const char *dest, return rv; } -#if defined O_NOFOLLOW /* Safely change working directory to the specified subdirectory. If * we are not allowed to follow symbolic links, we use open() with * O_NOFOLLOW, followed by fchdir(). This ensures that we don't @@ -811,7 +869,7 @@ safely_chdir_nofollow (const char *dest, if (following_links ()) extraflags = 0; else - extraflags = O_NOFOLLOW; + extraflags = O_NOFOLLOW; /* ... which may still be 0. */ break; } @@ -863,7 +921,6 @@ safely_chdir_nofollow (const char *dest, } } } -#endif static enum SafeChdirStatus safely_chdir (const char *dest, @@ -881,9 +938,8 @@ safely_chdir (const char *dest, */ complete_pending_execdirs (); -#if !defined(O_NOFOLLOW) - options.open_nofollow_available = false; -#endif + /* gnulib defines O_NOFOLLOW to 0 if the OS doesn't have it. */ + options.open_nofollow_available = !!O_NOFOLLOW; if (options.open_nofollow_available) { result = safely_chdir_nofollow (dest, direction, statbuf_dest, @@ -927,10 +983,12 @@ chdir_back (void) static void at_top (char *pathname, mode_t mode, + ino_t inum, struct stat *pstat, void (*action)(char *pathname, char *basename, int mode, + ino_t inum, struct stat *pstat)) { int dirchange; @@ -989,7 +1047,7 @@ at_top (char *pathname, free (parent_dir); parent_dir = NULL; - action (pathname, base, mode, pstat); + action (pathname, base, mode, inum, pstat); if (dirchange) { @@ -1001,11 +1059,12 @@ at_top (char *pathname, static void do_process_top_dir (char *pathname, char *base, int mode, + ino_t inum, struct stat *pstat) { (void) pstat; - process_path (pathname, base, false, ".", mode); + process_path (pathname, base, false, ".", mode, inum); complete_pending_execdirs (); } @@ -1013,10 +1072,11 @@ static void do_process_predicate (char *pathname, char *base, int mode, + ino_t inum, struct stat *pstat) { (void) mode; - + (void) inum; state.rel_pathname = base; /* cwd_dir_fd was already set by safely_chdir */ apply_predicate (pathname, pstat, get_eval_tree ()); } @@ -1035,9 +1095,9 @@ do_process_predicate (char *pathname, and move to that. */ static void -process_top_path (char *pathname, mode_t mode) +process_top_path (char *pathname, mode_t mode, ino_t inum) { - at_top (pathname, mode, NULL, do_process_top_dir); + at_top (pathname, mode, inum, NULL, do_process_top_dir); } @@ -1122,7 +1182,7 @@ issue_loop_warning (const char *name, const char *pathname, int level) static int process_path (char *pathname, char *name, bool leaf, char *parent, - mode_t mode) + mode_t mode, ino_t inum) { struct stat stat_buf; static dev_t root_dev; /* Device ID of current argument pathname. */ @@ -1132,6 +1192,13 @@ process_path (char *pathname, char *name, bool leaf, char *parent, eval_tree = get_eval_tree (); /* Assume it is a non-directory initially. */ stat_buf.st_mode = 0; + + /* The caller usually knows the inode number, either from readdir or + * a *stat call. We use that value (the caller passes 0 to indicate + * ignorance of the inode number). + */ + stat_buf.st_ino = inum; + state.rel_pathname = name; state.type = 0; state.have_stat = false; @@ -1212,11 +1279,13 @@ process_path (char *pathname, char *name, bool leaf, char *parent, if (0 == dir_curr) { - at_top (pathname, mode, &stat_buf, do_process_predicate); + at_top (pathname, mode, stat_buf.st_ino, &stat_buf, + do_process_predicate); } else { - do_process_predicate (pathname, name, mode, &stat_buf); + do_process_predicate (pathname, name, mode, stat_buf.st_ino, + &stat_buf); } } @@ -1242,10 +1311,9 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, { int subdirs_left; /* Number of unexamined subdirs in PATHNAME. */ bool subdirs_unreliable; /* if true, cannot use dir link count as subdir limif (if false, it may STILL be unreliable) */ - unsigned int idx; /* Which entry are we on? */ struct stat stat_buf; size_t dircount = 0u; - struct savedir_dirinfo *dirinfo; + DIR *dirp; if (statp->st_nlink < 2) { @@ -1259,10 +1327,9 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, } errno = 0; - dirinfo = xsavedir (name, 0); - + dirp = opendir_safer (name); - if (dirinfo == NULL) + if (dirp == NULL) { assert (errno != 0); error (0, errno, "%s", safely_quote_err_filename (0, pathname)); @@ -1270,7 +1337,6 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, } else { - register char *namep; /* Current point in `name_space'. */ char *cur_path; /* Full path of each file to process. */ char *cur_name; /* Base name of each file to process. */ unsigned cur_path_size; /* Bytes allocated for `cur_path'. */ @@ -1347,14 +1413,42 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, } } - for (idx=0; idx < dirinfo->size; ++idx) + while (1) { - /* savedirinfo() may return dirinfo=NULL if extended information - * is not available. - */ - mode_t mode = (dirinfo->entries[idx].flags & SavedirHaveFileType) ? - dirinfo->entries[idx].type_info : 0; - namep = dirinfo->entries[idx].name; + const char *namep; + mode_t mode = 0; + const struct dirent *dp; + + /* We reset errno here to distinguish between end-of-directory and an error */ + errno = 0; + dp = readdir (dirp); + if (NULL == dp) + { + if (errno) + { + /* an error occurred, but we are not yet at the end + of the directory stream. */ + error (0, errno, "%s", safely_quote_err_filename (0, pathname)); + continue; + } + else + { + break; /* End of the directory stream. */ + } + } + else + { + namep = dp->d_name; + /* Skip "", ".", and "..". "" is returned by at least one buggy + implementation: Solaris 2.4 readdir on NFS file systems. */ + if (!namep[0] || (namep[0] == '.' && (namep[1] == '.' || namep[1] == 0))) + continue; + } + +#if defined HAVE_STRUCT_DIRENT_D_TYPE + if (dp->d_type != DT_UNKNOWN) + mode = type_to_mode (dp->d_type); +#endif /* Append this directory entry's name to the path being searched. */ file_len = pathname_len + strlen (namep); @@ -1405,8 +1499,8 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, { int count; count = process_path (cur_path, cur_name, - subdirs_left == 0, pathname, - mode); + subdirs_left == 0, pathname, + mode, D_INO(dp)); subdirs_left -= count; dircount += count; } @@ -1415,7 +1509,8 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, { /* There might be weird (e.g., CD-ROM or MS-DOS) file systems mounted, which don't have Unix-like directory link counts. */ - process_path (cur_path, cur_name, false, pathname, mode); + process_path (cur_path, cur_name, false, pathname, mode, + D_INO(dp)); } state.curdepth--; @@ -1432,7 +1527,6 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, if (strcmp (name, ".")) { enum SafeChdirStatus status; - struct dir_id did; /* We could go back and do the next command-line arg instead, maybe using longjmp. */ @@ -1468,21 +1562,10 @@ process_dir (char *pathname, char *name, int pathlen, const struct stat *statp, "%s", safely_quote_err_filename (0, pathname)); return; } - - if (dir_curr > 0) - { - did.dev = dir_ids[dir_curr-1].dev; - did.ino = dir_ids[dir_curr-1].ino; - } - else - { - did.dev = starting_stat_buf.st_dev; - did.ino = starting_stat_buf.st_ino; - } } free (cur_path); - free_dirinfo (dirinfo); + CLOSEDIR (dirp); } if (subdirs_unreliable) diff --git a/find/finddata.c b/find/finddata.c index b776962..6ef91c6 100644 --- a/find/finddata.c +++ b/find/finddata.c @@ -1,6 +1,6 @@ /* finddata.c -- global data for "find". Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005, - 2007, 2010 Free Software Foundation, Inc. + 2007, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,11 +16,17 @@ along with this program. If not, see . */ +/* config.h must be included first. */ #include -#include "defs.h" +/* system headers would go here, but we include none. */ + +/* gnulib headers. */ #include "save-cwd.h" +/* find headers. */ +#include "defs.h" + struct options options; struct state state; diff --git a/find/fstype.c b/find/fstype.c index c6dbe8b..a47b6d3 100644 --- a/find/fstype.c +++ b/find/fstype.c @@ -1,6 +1,6 @@ /* fstype.c -- determine type of file systems that files are on Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, - 2004, 2010 Free Software Foundation, Inc. + 2004, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or @@ -22,47 +22,42 @@ * of manual hacking of configure.in). */ - +/* config.h must be included first. */ #include -#include -#include - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#include - -/* The presence of unistd.h is assumed by gnulib these days, so we - * might as well assume it too. - */ -#include +/* system headers. */ +#include #include -#ifdef HAVE_SYS_MNTIO_H -#include +#if HAVE_MNTENT_H +# include #endif +#include +#include +#include #ifdef HAVE_SYS_MKDEV_H -#include +# include #endif - -#ifdef STDC_HEADERS -#include -#else -extern int errno; +#ifdef HAVE_SYS_MNTIO_H +# include +#endif +#if HAVE_SYS_MNTTAB_H +# include #endif +#include +#include +#include -#include "defs.h" -#include "../gnulib/lib/dirname.h" +/* gnulib headers. */ +#include "dirname.h" #include "xalloc.h" - -/* Need declaration of function `xstrtoumax' */ -#include "../gnulib/lib/xstrtol.h" - -#include "extendbuf.h" +#include "xstrtol.h" #include "mountlist.h" #include "error.h" +#include "gettext.h" - +/* find headers. */ +#include "defs.h" +#include "extendbuf.h" #if ENABLE_NLS # include @@ -80,19 +75,6 @@ extern int errno; static char *file_system_type_uncached (const struct stat *statp, const char *path); -/* Get MNTTYPE_IGNORE if it is available. */ -#if HAVE_MNTENT_H -# include -#endif -#if HAVE_SYS_MNTTAB_H -# include -# include -#endif - - - - - static void free_file_system_list (struct mount_entry *p) { @@ -215,7 +197,7 @@ must_read_fs_list (bool need_fs_type) static char * file_system_type_uncached (const struct stat *statp, const char *path) { - struct mount_entry *entries, *entry; + struct mount_entry *entries, *entry, *best; char *type; (void) path; @@ -228,6 +210,7 @@ file_system_type_uncached (const struct stat *statp, const char *path) } #endif + best = NULL; entries = must_read_fs_list (true); for (type=NULL, entry=entries; entry; entry=entry->me_next) { @@ -235,13 +218,24 @@ file_system_type_uncached (const struct stat *statp, const char *path) if (!strcmp (entry->me_type, MNTTYPE_IGNORE)) continue; #endif - set_fstype_devno (entry); - if (entry->me_dev == statp->st_dev) + if (0 == set_fstype_devno (entry)) { - type = xstrdup (entry->me_type); - break; + if (entry->me_dev == statp->st_dev) + { + best = entry; + /* Don't exit the loop, because some systems (for + example Linux-based systems in which /etc/mtab is a + symlink to /proc/mounts) can have duplicate entries + in the filesystem list. This happens most frequently + for /. + */ + } } } + if (best) + { + type = xstrdup (best->me_type); + } free_file_system_list (entries); /* Don't cache unknown values. */ @@ -269,7 +263,6 @@ get_mounted_filesystems (void) if (!strcmp (entry->me_type, MNTTYPE_IGNORE)) continue; #endif - set_fstype_devno (entry); len = strlen (entry->me_mountdir) + 1; p = extendbuf (result, used+len, &alloc_size); @@ -312,9 +305,11 @@ get_mounted_devices (size_t *n) if (p) { result = p; - set_fstype_devno (entry); - result[used] = entry->me_dev; - ++used; + if (0 == set_fstype_devno (entry)) + { + result[used] = entry->me_dev; + ++used; + } } else { diff --git a/find/ftsfind.1 b/find/ftsfind.1 new file mode 100644 index 0000000..08a2c54 --- /dev/null +++ b/find/ftsfind.1 @@ -0,0 +1,31 @@ +.TH FTSFIND 1 \" -*- nroff -*- +.SH NAME +ftsfind \- search for files in a directory hierarchy +.SH SYNOPSIS +.B ftsfind +[\-H] [\-L] [\-P] [\-D debugopts] [\-Olevel] [path...] [expression] +.SH DESCRIPTION +The +.B ftsfind +and +.B find +programs are functionally identical. The only difference between them +is the implementation internals of how the filesystem is searched. +The +.B find +binary has a recursive implementation while +.B ftsfind +uses +.BR fts (3). +The fts-based implementation will replace the recursive implementation +but for the moment both implementations are installed. +.P +The implementation which is installed as +.B find +on this system is the recursive implementation, since the +.B \-\-without\-fts +option was passed to the +.B configure +script when findutils was built. +.SH "SEE ALSO" +\fBfind\fP(1), \fBfts\fP(3), \fBFinding Files\fP (on-line in Info, or printed). diff --git a/find/ftsfind.c b/find/ftsfind.c index 9fdb8ef..1cdf44c 100644 --- a/find/ftsfind.c +++ b/find/ftsfind.c @@ -1,7 +1,6 @@ /* find -- search for files in a directory hierarchy (fts version) - Copyright (C) 1990, 1091, 1992, 1993, 1994, 2000, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, - 2010 Free Software Foundation, Inc. + Copyright (C) 1990, 1091, 1992, 1993, 1994, 2000, 2003, 2004, 2005, + 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,38 +26,39 @@ Dan Bernstein . */ - +/* config.h must always be included first. */ #include -#include "defs.h" - -#define USE_SAFE_CHDIR 1 -#undef STAT_MOUNTPOINTS - -#include +/* system headers. */ #include - +#include #include +#include +#include #include - #include -#include "progname.h" +/* gnulib headers. */ +#include "cloexec.h" #include "closeout.h" -#include "quotearg.h" +#include "error.h" #include "fts_.h" +#include "gettext.h" +#include "progname.h" +#include "quotearg.h" #include "save-cwd.h" #include "xgetcwd.h" -#include "error.h" + +/* find headers. */ +#include "defs.h" #include "dircallback.h" -#include "cloexec.h" #include "fdleak.h" #include "unused-result.h" -#ifdef HAVE_LOCALE_H -#include -#endif +#define USE_SAFE_CHDIR 1 +#undef STAT_MOUNTPOINTS + #if ENABLE_NLS # include @@ -79,7 +79,7 @@ /* FTS_TIGHT_CYCLE_CHECK tries to work around Savannah bug #17877 * (but actually using it doesn't fix the bug). */ -static int ftsoptions = FTS_NOSTAT|FTS_TIGHT_CYCLE_CHECK|FTS_CWDFD; +static int ftsoptions = FTS_NOSTAT|FTS_TIGHT_CYCLE_CHECK|FTS_CWDFD|FTS_VERBATIM; static int prev_depth = INT_MIN; /* fts_level can be < 0 */ static int curr_fd = -1; @@ -303,14 +303,14 @@ show_outstanding_execdirs (FILE *fp) pfx = NULL; if (pfx) { - int i; + size_t i; const struct exec_val *execp = &p->args.exec_vec; ++seen; fprintf (fp, "%s ", pfx); if (execp->multiple) fprintf (fp, "multiple "); - fprintf (fp, "%d args: ", execp->state.cmd_argc); + fprintf (fp, "%" PRIuMAX " args: ", (uintmax_t) execp->state.cmd_argc); for (i=0; istate.cmd_argc; ++i) { fprintf (fp, "%s ", execp->state.cmd_argv[i]); @@ -564,7 +564,7 @@ find (char *arg) { int level = INT_MIN; - while ( (ent=fts_read (p)) != NULL ) + while ( (errno=0, ent=fts_read (p)) != NULL ) { if (state.execdirs_outstanding) { @@ -589,6 +589,16 @@ find (char *arg) state.type = state.have_type ? ent->fts_statp->st_mode : 0; consider_visiting (p, ent); } + /* fts_read returned NULL; distinguish between "finished" and "error". */ + if (errno) + { + error (0, errno, + "failed to read file names from file system at or below %s", + safely_quote_err_filename (0, arg)); + error_severity (EXIT_FAILURE); + return false; + } + if (0 != fts_close (p)) { /* Here we break the abstraction of fts_close a bit, because we @@ -664,7 +674,7 @@ main (int argc, char **argv) if (NULL == state.shared_files) { error (EXIT_FAILURE, errno, - _("Failed initialise shared-file hash table")); + _("Failed initialize shared-file hash table")); } /* Set the option defaults before we do the locale initialisation as @@ -678,7 +688,10 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - atexit (close_stdout); + if (atexit (close_stdout)) + { + error (EXIT_FAILURE, errno, _("The atexit library function failed")); + } /* Check for -P, -H or -L options. Also -D and -O, which are * both GNU extensions. diff --git a/find/oldfind.1 b/find/oldfind.1 new file mode 100644 index 0000000..2c31921 --- /dev/null +++ b/find/oldfind.1 @@ -0,0 +1,31 @@ +.TH OLDFIND 1 \" -*- nroff -*- +.SH NAME +oldfind \- search for files in a directory hierarchy +.SH SYNOPSIS +.B oldfind +[\-H] [\-L] [\-P] [\-D debugopts] [\-Olevel] [path...] [expression] +.SH DESCRIPTION +The +.B oldfind +and +.B find +programs are functionally identical. The only difference between them +is the implementation internals of how the filesystem is searched. +The +.B oldfind +binary has a recursive implementation while +.B find +uses +.BR fts (3). +The fts-based implementation will replace the recursive implementation +but for the moment both implementations are installed. +.P +The implementation which is installed as +.B find +on this system is the fts-based implementation, since the +.B \-\-without\-fts +option was not passed to the +.B configure +script when findutils was built. +.SH "SEE ALSO" +\fBfind\fP(1), \fBfts\fP(3), \fBFinding Files\fP (on-line in Info, or printed). diff --git a/find/parser.c b/find/parser.c index 52a1ef6..dc6c47c 100644 --- a/find/parser.c +++ b/find/parser.c @@ -1,6 +1,7 @@ /* parser.c -- convert the command line args into an expression tree. - Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003, - 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003, 2004, + 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,46 +17,49 @@ along with this program. If not, see . */ +/* config.h must always come first. */ #include -#include "defs.h" -#include -#include +/* system headers. */ #include -#include +#include #include +#include #include -#include +#include +#include +#include #include -#include "mountlist.h" +#include + + +/* gnulib headers. */ +#include "error.h" +#include "fnmatch.h" +#include "fts_.h" +#include "gettext.h" #include "modechange.h" -#include "xstrtol.h" -#include "xalloc.h" +#include "mountlist.h" +#include "parse-datetime.h" +#include "print.h" #include "quotearg.h" -#include "buildcmd.h" -#include "nextelem.h" -#include "stdio-safer.h" #include "regextype.h" +#include "safe-atoi.h" +#include "selinux-at.h" +#include "splitstring.h" #include "stat-time.h" +#include "xalloc.h" #include "xstrtod.h" -#include "fts_.h" -#include "parse-datetime.h" -#include "error.h" -#include "findutils-version.h" -#include "safe-atoi.h" -#include "fdleak.h" +#include "xstrtol.h" -#include +/* find headers. */ +#include "buildcmd.h" +#include "defs.h" +#include "fdleak.h" +#include "findutils-version.h" -/* The presence of unistd.h is assumed by gnulib these days, so we - * might as well assume it too. - */ -/* We need for isatty(). */ -#include -#include -#include "selinux-at.h" #if ENABLE_NLS # include @@ -70,15 +74,6 @@ # define N_(String) String #endif -#if !defined (isascii) || defined (STDC_HEADERS) -#ifdef isascii -#undef isascii -#endif -#define isascii(c) 1 -#endif - -#define ISDIGIT(c) (isascii ((unsigned char)c) && isdigit ((unsigned char)c)) - #ifndef HAVE_ENDGRENT #define endgrent () #endif @@ -157,7 +152,6 @@ static bool parse_warn (const struct parser_table*, char *argv[], int * static bool parse_xtype (const struct parser_table*, char *argv[], int *arg_ptr); static bool parse_quit (const struct parser_table*, char *argv[], int *arg_ptr); static bool parse_context (const struct parser_table*, char *argv[], int *arg_ptr); -bool parse_print (const struct parser_table*, char *argv[], int *arg_ptr); #if 0 static bool parse_show_control_chars (const struct parser_table*, char *argv[], int *arg_ptr); #endif @@ -170,16 +164,6 @@ static bool insert_type (char **argv, int *arg_ptr, static bool insert_regex (char *argv[], int *arg_ptr, const struct parser_table *entry, int regex_options); -static bool insert_fprintf (struct format_val *vec, - const struct parser_table *entry, - PRED_FUNC func, - const char *format); - -static struct segment **make_segment (struct segment **segment, - char *format, int len, - int kind, char format_char, - char aux_format_char, - struct predicate *pred); static bool insert_exec_ok (const char *action, const struct parser_table *entry, char *argv[], @@ -203,7 +187,7 @@ static bool parse_noop (const struct parser_table* entry, char **argv, int *arg_ptr); #define PASTE(x,y) x##y -#define STRINGIFY(s) #s + #define PARSE_OPTION(what,suffix) \ { (ARG_OPTION), (what), PASTE(parse_,suffix), NULL } @@ -220,9 +204,6 @@ static bool parse_noop (const struct parser_table* entry, #define PARSE_ACTION(what,suffix) \ { (ARG_ACTION), (what), PASTE(parse_,suffix), PASTE(pred_,suffix) } -#define PARSE_ACTION_NP(what,suffix) \ - { (ARG_ACTION), (what), PASTE(parse_,suffix), NULL } - #define PARSE_PUNCTUATION(what,suffix) \ { (ARG_PUNCTUATION), (what), PASTE(parse_,suffix), PASTE(pred_,suffix) } @@ -390,7 +371,7 @@ fallback_getfilecon (int fd, const char *name, security_context_t *p, * * If the item to be examined is not a command-line argument, we * examine the link itself. */ -int +static int optionh_getfilecon (int fd, const char *name, security_context_t *p) { int rv; @@ -414,7 +395,7 @@ optionh_getfilecon (int fd, const char *name, security_context_t *p) /* optionl_getfilecon () implements the getfilecon operation when the * -L option is in effect. That option makes us examine the thing the * symbolic link points to, not the symbolic link itself. */ -int +static int optionl_getfilecon (int fd, const char *name, security_context_t *p) { int rv = getfileconat (fd, name, p); @@ -427,7 +408,7 @@ optionl_getfilecon (int fd, const char *name, security_context_t *p) /* optionp_getfilecon () implements the stat operation when the -P * option is in effect (this is also the default). That option makes * us examine the symbolic link itself, not the thing it points to. */ -int +static int optionp_getfilecon (int fd, const char *name, security_context_t *p) { return lgetfileconat (fd, name, p); @@ -586,7 +567,7 @@ parse_end_user_args (char **args, int argno, /* Check that it is legal to fid the given primary in its * position and return it. */ -const struct parser_table* +static const struct parser_table* found_parser (const char *original_arg, const struct parser_table *entry) { /* If this is an option, but we have already had a @@ -648,7 +629,7 @@ found_parser (const char *original_arg, const struct parser_table *entry) Return NULL if SEARCH_NAME is not a valid predicate name. */ const struct parser_table* -find_parser (char *search_name) +find_parser (const char *search_name) { int i; const char *original_arg = search_name; @@ -713,7 +694,7 @@ estimate_timestamp_success_rate (time_t when) * return false. */ static bool -collect_arg (char **argv, int *arg_ptr, const char **collected_arg) +collect_arg_nonconst (char **argv, int *arg_ptr, char **collected_arg) { if ((argv == NULL) || (argv[*arg_ptr] == NULL)) { @@ -729,6 +710,17 @@ collect_arg (char **argv, int *arg_ptr, const char **collected_arg) } static bool +collect_arg (char **argv, int *arg_ptr, const char **collected_arg) +{ + char *arg; + const bool result = collect_arg_nonconst (argv, arg_ptr, &arg); + *collected_arg = arg; + return result; +} + + + +static bool collect_arg_stat_info (char **argv, int *arg_ptr, struct stat *p, const char **argument) { @@ -960,6 +952,9 @@ insert_false(void) static bool parse_false (const struct parser_table* entry, char **argv, int *arg_ptr) { + (void) entry; + (void) argv; + (void) arg_ptr; return insert_false (); } @@ -1242,7 +1237,7 @@ tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n\ -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex PATTERN\n\ -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE")); puts (_("\ - -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n\ + -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n\ -readable -writable -executable\n\ -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n\ -used N -user NAME -xtype [bcdpfls]")); @@ -1610,7 +1605,7 @@ parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr) y = argv[*arg_ptr][7]; -#if !defined(HAVE_STRUCT_STAT_ST_BIRTHTIME) && !defined(HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) && !defined(HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC) && !defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC +#if !defined HAVE_STRUCT_STAT_ST_BIRTHTIME && !defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC && !defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC && !defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC if ('B' == x || 'B' == y) { error (0, 0, @@ -1621,8 +1616,8 @@ parse_newerXY (const struct parser_table* entry, char **argv, int *arg_ptr) /* -newertY (for any Y) is invalid. */ if (x == 't' - || 0 == strchr (validchars, x) - || 0 == strchr ( validchars, y)) + || (NULL == strchr (validchars, x)) + || (NULL == strchr ( validchars, y))) { return false; } @@ -1877,7 +1872,7 @@ is_feasible_path_argument (const char *arg, bool foldcase) static bool insert_path_check (const struct parser_table* entry, char **argv, int *arg_ptr, - const char *pred_name, PREDICATEFUNCTION pred) + const char *predicate_name, PREDICATEFUNCTION pred) { const char *name; bool foldcase = false; @@ -1899,7 +1894,7 @@ insert_path_check (const struct parser_table* entry, char **argv, int *arg_ptr, { error (0, 0, _("warning: -%s %s will not match anything " "because it ends with /."), - pred_name, name); + predicate_name, name); our_pred->est_success_rate = 1.0e-8; } return true; @@ -1947,17 +1942,6 @@ parse_iwholename (const struct parser_table* entry, char **argv, int *arg_ptr) return insert_path_check (entry, argv, arg_ptr, "iwholename", pred_ipath); } -static void -non_posix_mode (const char *mode) -{ - if (options.posixly_correct) - { - error (EXIT_FAILURE, 0, - _("Mode %s is not valid when POSIXLY_CORRECT is on."), - quotearg_n_style (0, options.err_quoting_style, mode)); - } -} - static bool parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr) @@ -1965,9 +1949,8 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr) mode_t perm_val[2]; float rate; int mode_start = 0; - bool havekind = false; enum permissions_type kind = PERM_EXACT; - struct mode_change *change = NULL; + struct mode_change *change; struct predicate *our_pred; const char *perm_expr; @@ -1979,45 +1962,12 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr) case '-': mode_start = 1; kind = PERM_AT_LEAST; - havekind = true; rate = 0.2; break; - case '+': - change = mode_compile (perm_expr); - if (NULL == change) - { - /* Most likely the caller is an old script that is still - * using the obsolete GNU syntax '-perm +MODE'. This old - * syntax was withdrawn in favor of '-perm /MODE' because - * it is incompatible with POSIX in some cases, but we - * still support uses of it that are not incompatible with - * POSIX. - * - * Example: POSIXLY_CORRECT=y find -perm +a+x - */ - non_posix_mode (perm_expr); - - /* support the previous behaviour. */ - mode_start = 1; - kind = PERM_ANY; - rate = 0.3; - } - else - { - /* This is a POSIX-compatible usage */ - mode_start = 0; - kind = PERM_EXACT; - rate = 0.1; - } - havekind = true; - break; - case '/': /* GNU extension */ - non_posix_mode (perm_expr); mode_start = 1; kind = PERM_ANY; - havekind = true; rate = 0.3; break; @@ -2027,18 +1977,20 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr) */ mode_start = 0; kind = PERM_EXACT; - havekind = true; rate = 0.01; break; } - if (NULL == change) - { - change = mode_compile (perm_expr + mode_start); - if (NULL == change) - error (EXIT_FAILURE, 0, _("invalid mode %s"), - quotearg_n_style (0, options.err_quoting_style, perm_expr)); - } + change = mode_compile (perm_expr + mode_start); + + /* Reject invalid modes, or modes of the form +NUMERICMODE. + The latter were formerly accepted as a GNU extension, but that + extension was incompatible with how GNU 'chmod' treats these modes now, + and it would be confusing if 'find' continued to support it. */ + if (NULL == change + || (perm_expr[0] == '+' && '0' <= perm_expr[1] && perm_expr[1] < '8')) + error (EXIT_FAILURE, 0, _("invalid mode %s"), + quotearg_n_style (0, options.err_quoting_style, perm_expr)); perm_val[0] = mode_adjust (0, false, 0, change, NULL); perm_val[1] = mode_adjust (0, true, 0, change, NULL); free (change); @@ -2062,7 +2014,6 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr) perm_expr); kind = PERM_AT_LEAST; - havekind = true; /* The "magic" number below is just the fraction of files on my * own system that "-type l -xtype l" fails for (i.e. unbroken symlinks). @@ -2073,26 +2024,7 @@ parse_perm (const struct parser_table* entry, char **argv, int *arg_ptr) our_pred = insert_primary (entry, perm_expr); our_pred->est_success_rate = rate; - if (havekind) - { - our_pred->args.perm.kind = kind; - } - else - { - - switch (perm_expr[0]) - { - case '-': - our_pred->args.perm.kind = PERM_AT_LEAST; - break; - case '+': - our_pred->args.perm.kind = PERM_ANY; - break; - default: - our_pred->args.perm.kind = PERM_EXACT; - break; - } - } + our_pred->args.perm.kind = kind; memcpy (our_pred->args.perm.val, perm_val, sizeof perm_val); return true; } @@ -2118,20 +2050,23 @@ parse_print (const struct parser_table* entry, char **argv, int *arg_ptr) static bool parse_print0 (const struct parser_table* entry, char **argv, int *arg_ptr) { + (void) entry; + (void) argv; + (void) arg_ptr; return insert_fprint (entry, NULL); } static bool parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr) { - const char *format; + char *format; const int saved_argc = *arg_ptr; - if (collect_arg (argv, arg_ptr, &format)) + if (collect_arg_nonconst (argv, arg_ptr, &format)) { struct format_val fmt; open_stdout (&fmt); - if (insert_fprintf (&fmt, entry, pred_fprintf, format)) + if (insert_fprintf (&fmt, entry, format)) { return true; } @@ -2147,18 +2082,19 @@ parse_printf (const struct parser_table* entry, char **argv, int *arg_ptr) static bool parse_fprintf (const struct parser_table* entry, char **argv, int *arg_ptr) { - const char *format, *filename; + const char *filename; + char *format; int saved_argc = *arg_ptr; if (collect_arg (argv, arg_ptr, &filename)) { - if (collect_arg (argv, arg_ptr, &format)) + if (collect_arg_nonconst (argv, arg_ptr, &format)) { struct format_val fmt; open_output_file (filename, &fmt); saved_argc = *arg_ptr; - if (insert_fprintf (&fmt, entry, pred_fprintf, format)) + if (insert_fprintf (&fmt, entry, format)) return true; } } @@ -2375,7 +2311,7 @@ parse_samefile (const struct parser_table* entry, char **argv, int *arg_ptr) * the file open if we can. This would prevent the system reusing * the file. */ - fd = -3; /* means, uninitialised */ + fd = -3; /* -3 means uninitialized */ openflags = O_RDONLY; if (options.symlink_handling == SYMLINK_NEVER_DEREF) @@ -2692,7 +2628,7 @@ parse_user (const struct parser_table* entry, char **argv, int *arg_ptr) static bool parse_version (const struct parser_table* entry, char **argv, int *arg_ptr) { - int features = 0; + bool has_features = false; int flags; (void) argv; @@ -2704,33 +2640,33 @@ parse_version (const struct parser_table* entry, char **argv, int *arg_ptr) #if CACHE_IDS printf ("CACHE_IDS "); - ++features; + has_features = true; #endif #if DEBUG printf ("DEBUG "); - ++features; + has_features = true; #endif #if DEBUG_STAT printf ("DEBUG_STAT "); - ++features; + has_features = true; #endif #if defined HAVE_STRUCT_DIRENT_D_TYPE printf ("D_TYPE "); - ++features; + has_features = true; #endif #if defined O_NOFOLLOW printf ("O_NOFOLLOW(%s) ", (options.open_nofollow_available ? "enabled" : "disabled")); - ++features; + has_features = true; #endif #if defined LEAF_OPTIMISATION printf ("LEAF_OPTIMISATION "); - ++features; + has_features = true; #endif if (0 < is_selinux_enabled ()) { printf ("SELINUX "); - ++features; + has_features = true; } flags = 0; @@ -2738,7 +2674,7 @@ parse_version (const struct parser_table* entry, char **argv, int *arg_ptr) { int nflags = 0; printf ("FTS("); - ++features; + has_features = true; if (flags & FTS_CWDFD) { @@ -2747,15 +2683,15 @@ parse_version (const struct parser_table* entry, char **argv, int *arg_ptr) printf (","); } printf ("FTS_CWDFD"); - ++nflags; + has_features = true; } printf (") "); } printf ("CBO(level=%d) ", (int)(options.optimisation_level)); - ++features; + has_features = true; - if (0 == features) + if (!has_features) { /* For the moment, leave this as English in case someone wants to parse these strings. */ @@ -2864,30 +2800,50 @@ insert_type (char **argv, int *arg_ptr, type_cell = S_IFREG; rate = 0.95f; break; -#ifdef S_IFLNK case 'l': /* symbolic link */ +#ifdef S_IFLNK type_cell = S_IFLNK; rate = 0.1f; - break; +#else + error (EXIT_FAILURE, 0, + _("-type %c is not supported because symbolic links " + "are not supported on the platform find was compiled on."), + (*typeletter)); #endif -#ifdef S_IFIFO + break; case 'p': /* pipe */ +#ifdef S_IFIFO type_cell = S_IFIFO; rate = 0.01f; - break; +#else + error (EXIT_FAILURE, 0, + _("-type %c is not supported because FIFOs " + "are not supported on the platform find was compiled on."), + (*typeletter)); #endif -#ifdef S_IFSOCK + break; case 's': /* socket */ +#ifdef S_IFSOCK type_cell = S_IFSOCK; rate = 0.01f; - break; +#else + error (EXIT_FAILURE, 0, + _("-type %c is not supported because named sockets " + "are not supported on the platform find was compiled on."), + (*typeletter)); #endif -#ifdef S_IFDOOR + break; case 'D': /* Solaris door */ +#ifdef S_IFDOOR type_cell = S_IFDOOR; rate = 0.01f; - break; +#else + error (EXIT_FAILURE, 0, + _("-type %c is not supported because Solaris doors " + "are not supported on the platform find was compiled on."), + (*typeletter)); #endif + break; default: /* None of the above ... nuke 'em. */ error (EXIT_FAILURE, 0, _("Unknown argument to -type: %c"), (*typeletter)); @@ -2938,307 +2894,15 @@ stream_is_tty (FILE *fp) -/* XXX: do we need to pass FUNC to this function? */ -static bool -insert_fprintf (struct format_val *vec, - const struct parser_table *entry, PRED_FUNC func, - const char *format_const) -{ - char *format = (char*)format_const; /* XXX: casting away constness */ - register char *scan; /* Current address in scanning `format'. */ - register char *scan2; /* Address inside of element being scanned. */ - struct segment **segmentp; /* Address of current segment. */ - struct predicate *our_pred; - - our_pred = insert_primary_withpred (entry, func, format_const); - our_pred->side_effects = our_pred->no_default_print = true; - our_pred->args.printf_vec = *vec; - our_pred->need_type = false; - our_pred->need_stat = false; - our_pred->p_cost = NeedsNothing; - - segmentp = &our_pred->args.printf_vec.segment; - *segmentp = NULL; - - for (scan = format; *scan; scan++) - { - if (*scan == '\\') - { - scan2 = scan + 1; - if (*scan2 >= '0' && *scan2 <= '7') - { - register int n, i; - - for (i = n = 0; i < 3 && (*scan2 >= '0' && *scan2 <= '7'); - i++, scan2++) - n = 8 * n + *scan2 - '0'; - scan2--; - *scan = n; - } - else - { - switch (*scan2) - { - case 'a': - *scan = 7; - break; - case 'b': - *scan = '\b'; - break; - case 'c': - make_segment (segmentp, format, scan - format, - KIND_STOP, 0, 0, - our_pred); - if (our_pred->need_stat && (our_pred->p_cost < NeedsStatInfo)) - our_pred->p_cost = NeedsStatInfo; - return true; - case 'f': - *scan = '\f'; - break; - case 'n': - *scan = '\n'; - break; - case 'r': - *scan = '\r'; - break; - case 't': - *scan = '\t'; - break; - case 'v': - *scan = '\v'; - break; - case '\\': - /* *scan = '\\'; * it already is */ - break; - default: - error (0, 0, - _("warning: unrecognized escape `\\%c'"), *scan2); - scan++; - continue; - } - } - segmentp = make_segment (segmentp, format, scan - format + 1, - KIND_PLAIN, 0, 0, - our_pred); - format = scan2 + 1; /* Move past the escape. */ - scan = scan2; /* Incremented immediately by `for'. */ - } - else if (*scan == '%') - { - if (scan[1] == 0) - { - /* Trailing %. We don't like those. */ - error (EXIT_FAILURE, 0, - _("error: %s at end of format string"), scan); - } - else if (scan[1] == '%') - { - segmentp = make_segment (segmentp, format, scan - format + 1, - KIND_PLAIN, 0, 0, - our_pred); - scan++; - format = scan + 1; - continue; - } - /* Scan past flags, width and precision, to verify kind. */ - for (scan2 = scan; *++scan2 && strchr ("-+ #", *scan2);) - /* Do nothing. */ ; - while (ISDIGIT (*scan2)) - scan2++; - if (*scan2 == '.') - for (scan2++; ISDIGIT (*scan2); scan2++) - /* Do nothing. */ ; - if (strchr ("abcdDfFgGhHiklmMnpPsStuUyYZ", *scan2)) - { - segmentp = make_segment (segmentp, format, scan2 - format, - KIND_FORMAT, *scan2, 0, - our_pred); - scan = scan2; - format = scan + 1; - } - else if (strchr ("ABCT", *scan2) && scan2[1]) - { - segmentp = make_segment (segmentp, format, scan2 - format, - KIND_FORMAT, scan2[0], scan2[1], - our_pred); - scan = scan2 + 1; - format = scan + 1; - continue; - } - else - { - /* An unrecognized % escape. Print the char after the %. */ - error (0, 0, _("warning: unrecognized format directive `%%%c'"), - *scan2); - segmentp = make_segment (segmentp, format, scan - format, - KIND_PLAIN, 0, 0, - our_pred); - format = scan + 1; - continue; - } - } - } - - if (scan > format) - make_segment (segmentp, format, scan - format, KIND_PLAIN, 0, 0, - our_pred); - return true; -} - -/* Create a new fprintf segment in *SEGMENT, with type KIND, - from the text in FORMAT, which has length LEN. - Return the address of the `next' pointer of the new segment. */ - -static struct segment ** -make_segment (struct segment **segment, - char *format, - int len, - int kind, - char format_char, - char aux_format_char, - struct predicate *pred) -{ - enum EvaluationCost mycost = NeedsNothing; - char *fmt; - - *segment = xmalloc (sizeof (struct segment)); - - (*segment)->segkind = kind; - (*segment)->format_char[0] = format_char; - (*segment)->format_char[1] = aux_format_char; - (*segment)->next = NULL; - (*segment)->text_len = len; - - fmt = (*segment)->text = xmalloc (len + sizeof "d"); - strncpy (fmt, format, len); - fmt += len; - - switch (kind) - { - case KIND_PLAIN: /* Plain text string, no % conversion. */ - case KIND_STOP: /* Terminate argument, no newline. */ - assert (0 == format_char); - assert (0 == aux_format_char); - *fmt = '\0'; - if (mycost > pred->p_cost) - pred->p_cost = NeedsNothing; - return &(*segment)->next; - break; - } - - assert (kind == KIND_FORMAT); - switch (format_char) - { - case 'l': /* object of symlink */ - pred->need_stat = true; - mycost = NeedsLinkName; - *fmt++ = 's'; - break; - - case 'y': /* file type */ - pred->need_type = true; - mycost = NeedsType; - *fmt++ = 's'; - break; - - case 'i': /* inode number */ - pred->need_inum = true; - mycost = NeedsInodeNumber; - *fmt++ = 's'; - break; - - case 'a': /* atime in `ctime' format */ - case 'A': /* atime in user-specified strftime format */ - case 'B': /* birth time in user-specified strftime format */ - case 'c': /* ctime in `ctime' format */ - case 'C': /* ctime in user-specified strftime format */ - case 'F': /* file system type */ - case 'g': /* group name */ - case 'M': /* mode in `ls -l' format (eg., "drwxr-xr-x") */ - case 's': /* size in bytes */ - case 't': /* mtime in `ctime' format */ - case 'T': /* mtime in user-specified strftime format */ - case 'u': /* user name */ - pred->need_stat = true; - mycost = NeedsStatInfo; - *fmt++ = 's'; - break; - - case 'S': /* sparseness */ - pred->need_stat = true; - mycost = NeedsStatInfo; - *fmt++ = 'g'; - break; - case 'Y': /* symlink pointed file type */ - pred->need_stat = true; - mycost = NeedsType; /* true for amortised effect */ - *fmt++ = 's'; - break; - - case 'f': /* basename of path */ - case 'h': /* leading directories part of path */ - case 'p': /* pathname */ - case 'P': /* pathname with ARGV element stripped */ - *fmt++ = 's'; - break; - - case 'Z': /* SELinux security context */ - mycost = NeedsAccessInfo; - *fmt++ = 's'; - break; - - case 'H': /* ARGV element file was found under */ - *fmt++ = 's'; - break; - - /* Numeric items that one might expect to honour - * #, 0, + flags but which do not. - */ - case 'G': /* GID number */ - case 'U': /* UID number */ - case 'b': /* size in 512-byte blocks (NOT birthtime in ctime fmt)*/ - case 'D': /* Filesystem device on which the file exits */ - case 'k': /* size in 1K blocks */ - case 'n': /* number of links */ - pred->need_stat = true; - mycost = NeedsStatInfo; - *fmt++ = 's'; - break; - - /* Numeric items that DO honour #, 0, + flags. - */ - case 'd': /* depth in search tree (0 = ARGV element) */ - *fmt++ = 'd'; - break; - - case 'm': /* mode as octal number (perms only) */ - *fmt++ = 'o'; - pred->need_stat = true; - mycost = NeedsStatInfo; - break; - - case '{': - case '[': - case '(': - error (EXIT_FAILURE, 0, - _("error: the format directive `%%%c' is reserved for future use"), - (int)kind); - /*NOTREACHED*/ - break; - } - *fmt = '\0'; - - if (mycost > pred->p_cost) - pred->p_cost = mycost; - return &(*segment)->next; -} static void -check_path_safety (const char *action, char **argv) +check_path_safety (const char *action) { - char *s; const char *path = getenv ("PATH"); + const char *path_separators = ":"; + size_t pos, len; + if (NULL == path) { /* $PATH is not set. Assume the OS default is safe. @@ -3249,34 +2913,35 @@ check_path_safety (const char *action, char **argv) return; } - (void)argv; - - s = next_element (path, 1); - while ((s = next_element ((char *) NULL, 1)) != NULL) + splitstring (path, path_separators, true, &pos, &len); + do { - if (0 == strcmp (s, ".")) + if (0 == len || (1 == len && path[pos] == '.')) { + /* empty field signifies . */ error (EXIT_FAILURE, 0, _("The current directory is included in the PATH " "environment variable, which is insecure in " "combination with the %s action of find. " "Please remove the current directory from your " - "$PATH (that is, remove \".\" or leading or trailing " - "colons)"), + "$PATH (that is, remove \".\", doubled colons, " + "or leading or trailing colons)"), action); } - else if ('/' != s[0]) + else if (path[pos] != '/') { - /* Relative paths are also dangerous in $PATH. */ + char *relpath = strndup (&path[pos], len); error (EXIT_FAILURE, 0, _("The relative path %s is included in the PATH " "environment variable, which is insecure in " "combination with the %s action of find. " "Please remove that entry from $PATH"), - safely_quote_err_filename (0, s), + safely_quote_err_filename (0, relpath ? relpath : &path[pos]), action); + /*NOTREACHED*/ + free (relpath); } - } + } while (splitstring (path, path_separators, false, &pos, &len)); } @@ -3329,7 +2994,7 @@ insert_exec_ok (const char *action, { execp->wd_for_exec = NULL; options.ignore_readdir_race = false; - check_path_safety (action, argv); + check_path_safety (action); } else { @@ -3533,7 +3198,8 @@ get_relative_timestamp (const char *str, { case COMP_LT: result->kind = COMP_GT; break; case COMP_GT: result->kind = COMP_LT; break; - default: break; + case COMP_EQ: + break; /* inversion leaves it unchanged */ } /* Convert the ASCII number into floating-point. */ diff --git a/find/pred.c b/find/pred.c index 3acfe9f..3a89679 100644 --- a/find/pred.c +++ b/find/pred.c @@ -1,7 +1,6 @@ /* pred.c -- execute the expression tree. - Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, - 2004, 2005, 2006, 2007, 2008, 2009, - 2010 Free Software Foundation, Inc. + Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005, + 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,41 +16,43 @@ along with this program. If not, see . */ +/* config.h always comes first. */ #include -#include "defs.h" -#include -#include -#include -#include -#include -#include -#include -#include +/* system headers. */ #include -#include +#include +#include +#include #include +#include #include -#include +#include +#include +#include +#include +#include +#include +#include #include /* for unlinkat() */ -#include "xalloc.h" + +/* gnulib headers. */ +#include "areadlink.h" #include "dirname.h" -#include "human.h" -#include "filemode.h" -#include "printquoted.h" -#include "buildcmd.h" -#include "yesno.h" -#include "listfile.h" +#include "error.h" +#include "fnmatch.h" +#include "gettext.h" +#include "stat-size.h" #include "stat-time.h" +#include "yesno.h" + +/* find headers. */ +#include "defs.h" #include "dircallback.h" -#include "error.h" -#include "verify.h" -#include "fdleak.h" -#include "areadlink.h" -#include "cloexec.h" -#include "save-cwd.h" +#include "listfile.h" +#include "printquoted.h" + -#include #if ENABLE_NLS # include @@ -66,30 +67,6 @@ # define N_(String) String #endif -#if !defined(SIGCHLD) && defined(SIGCLD) -#define SIGCHLD SIGCLD -#endif - - -#include - -#if HAVE_DIRENT_H -# include -# define NAMLEN(dirent) strlen((dirent)->d_name) -#else -# define dirent direct -# define NAMLEN(dirent) (dirent)->d_namlen -# if HAVE_SYS_NDIR_H -# include -# endif -# if HAVE_SYS_DIR_H -# include -# endif -# if HAVE_NDIR_H -# include -# endif -#endif - #ifdef CLOSEDIR_VOID /* Fake a return value. */ #define CLOSEDIR(d) (closedir (d), 0) @@ -97,79 +74,8 @@ #define CLOSEDIR(d) closedir (d) #endif - - - -/* Get or fake the disk device blocksize. - Usually defined by sys/param.h (if at all). */ -#ifndef DEV_BSIZE -# ifdef BSIZE -# define DEV_BSIZE BSIZE -# else /* !BSIZE */ -# define DEV_BSIZE 4096 -# endif /* !BSIZE */ -#endif /* !DEV_BSIZE */ - -/* Extract or fake data from a `struct stat'. - ST_BLKSIZE: Preferred I/O blocksize for the file, in bytes. - ST_NBLOCKS: Number of blocks in the file, including indirect blocks. - ST_NBLOCKSIZE: Size of blocks used when calculating ST_NBLOCKS. */ -#ifndef HAVE_STRUCT_STAT_ST_BLOCKS -# define ST_BLKSIZE(statbuf) DEV_BSIZE -# if defined _POSIX_SOURCE || !defined BSIZE /* fileblocks.c uses BSIZE. */ -# define ST_NBLOCKS(statbuf) \ - (S_ISREG ((statbuf).st_mode) \ - || S_ISDIR ((statbuf).st_mode) \ - ? (statbuf).st_size / ST_NBLOCKSIZE + ((statbuf).st_size % ST_NBLOCKSIZE != 0) : 0) -# else /* !_POSIX_SOURCE && BSIZE */ -# define ST_NBLOCKS(statbuf) \ - (S_ISREG ((statbuf).st_mode) \ - || S_ISDIR ((statbuf).st_mode) \ - ? st_blocks ((statbuf).st_size) : 0) -# endif /* !_POSIX_SOURCE && BSIZE */ -#else /* HAVE_STRUCT_STAT_ST_BLOCKS */ -/* Some systems, like Sequents, return st_blksize of 0 on pipes. */ -# define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \ - ? (statbuf).st_blksize : DEV_BSIZE) -# if defined hpux || defined __hpux__ || defined __hpux -/* HP-UX counts st_blocks in 1024-byte units. - This loses when mixing HP-UX and BSD file systems with NFS. */ -# define ST_NBLOCKSIZE 1024 -# else /* !hpux */ -# if defined _AIX && defined _I386 -/* AIX PS/2 counts st_blocks in 4K units. */ -# define ST_NBLOCKSIZE (4 * 1024) -# else /* not AIX PS/2 */ -# if defined _CRAY -# define ST_NBLOCKS(statbuf) \ - (S_ISREG ((statbuf).st_mode) \ - || S_ISDIR ((statbuf).st_mode) \ - ? (statbuf).st_blocks * ST_BLKSIZE(statbuf)/ST_NBLOCKSIZE : 0) -# endif /* _CRAY */ -# endif /* not AIX PS/2 */ -# endif /* !hpux */ -#endif /* HAVE_STRUCT_STAT_ST_BLOCKS */ - -#ifndef ST_NBLOCKS -# define ST_NBLOCKS(statbuf) \ - (S_ISREG ((statbuf).st_mode) \ - || S_ISDIR ((statbuf).st_mode) \ - ? (statbuf).st_blocks : 0) -#endif - -#ifndef ST_NBLOCKSIZE -# define ST_NBLOCKSIZE 512 -#endif - - -#undef MAX -#define MAX(a, b) ((a) > (b) ? (a) : (b)) - static bool match_lname (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr, bool ignore_case); -static char *format_date (struct timespec ts, int kind); -static char *ctime_format (struct timespec ts); - #ifdef DEBUG struct pred_assoc { @@ -507,165 +413,6 @@ pred_empty (const char *pathname, struct stat *stat_buf, struct predicate *pred_ } -/* Initialise exec->wd_for_exec. - - We save in exec->wd_for_exec the directory whose path relative to - cwd_df is dir. - */ -static bool -initialise_wd_for_exec (struct exec_val *execp, int cwd_fd, const char *dir) -{ - execp->wd_for_exec = xmalloc (sizeof (*execp->wd_for_exec)); - execp->wd_for_exec->name = NULL; - execp->wd_for_exec->desc = openat (cwd_fd, dir, O_RDONLY); - if (execp->wd_for_exec->desc < 0) - return false; - set_cloexec_flag (execp->wd_for_exec->desc, true); - return true; -} - - -static bool -record_exec_dir (struct exec_val *execp) -{ - if (!execp->state.todo) - { - /* Record the WD. If we're using -L or fts chooses to do so for - any other reason, state.cwd_dir_fd may in fact not be the - directory containing the target file. When this happens, - rel_path will contain directory components (since it is the - path from state.cwd_dir_fd to the target file). - - We deal with this by extracting any directory part and using - that to adjust what goes into execp->wd_for_exec. - */ - if (strchr (state.rel_pathname, '/')) - { - char *dir = mdir_name (state.rel_pathname); - bool result = initialise_wd_for_exec (execp, state.cwd_dir_fd, dir); - free (dir); - return result; - } - else - { - return initialise_wd_for_exec (execp, state.cwd_dir_fd, "."); - } - } - return true; -} - - -static bool -impl_pred_exec (const char *pathname, - struct stat *stat_buf, - struct predicate *pred_ptr) -{ - struct exec_val *execp = &pred_ptr->args.exec_vec; - char *target; - bool result; - const bool local = is_exec_in_local_dir (pred_ptr->pred_func); - char *prefix; - size_t pfxlen; - - (void) stat_buf; - if (local) - { - /* For -execdir/-okdir predicates, the parser did not fill in - the wd_for_exec member of sturct exec_val. So for those - predicates, we do so now. - */ - if (!record_exec_dir (execp)) - { - error (EXIT_FAILURE, errno, - _("Failed to save working directory in order to " - "run a command on %s"), - safely_quote_err_filename (0, pathname)); - /*NOTREACHED*/ - } - target = base_name (state.rel_pathname); - if ('/' == target[0]) - { - /* find / execdir ls -d {} \; */ - prefix = NULL; - pfxlen = 0; - } - else - { - prefix = "./"; - pfxlen = 2u; - } - } - else - { - /* For the others (-exec, -ok), the parser should - have set wd_for_exec to initial_wd, indicating - that the exec should take place from find's initial - working directory. - */ - assert (execp->wd_for_exec == initial_wd); - target = pathname; - prefix = NULL; - pfxlen = 0u; - } - - if (execp->multiple) - { - /* Push the argument onto the current list. - * The command may or may not be run at this point, - * depending on the command line length limits. - */ - bc_push_arg (&execp->ctl, - &execp->state, - target, strlen (target)+1, - prefix, pfxlen, - 0); - - /* remember that there are pending execdirs. */ - state.execdirs_outstanding = true; - - /* POSIX: If the primary expression is punctuated by a plus - * sign, the primary shall always evaluate as true - */ - result = true; - } - else - { - int i; - - for (i=0; inum_args; ++i) - { - bc_do_insert (&execp->ctl, - &execp->state, - execp->replace_vec[i], - strlen (execp->replace_vec[i]), - prefix, pfxlen, - target, strlen (target), - 0); - } - - /* Actually invoke the command. */ - bc_do_exec (&execp->ctl, &execp->state); - if (WIFEXITED(execp->last_child_status)) - { - if (0 == WEXITSTATUS(execp->last_child_status)) - result = true; /* The child succeeded. */ - else - result = false; - } - else - { - result = false; - } - } - if (target != pathname) - { - assert (local); - free (target); - } - return result; -} - - bool pred_exec (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) { @@ -729,542 +476,6 @@ pred_fprint0 (const char *pathname, struct stat *stat_buf, struct predicate *pre -static char* -mode_to_filetype (mode_t m) -{ -#define HANDLE_TYPE(t,letter) if (m==t) { return letter; } -#ifdef S_IFREG - HANDLE_TYPE(S_IFREG, "f"); /* regular file */ -#endif -#ifdef S_IFDIR - HANDLE_TYPE(S_IFDIR, "d"); /* directory */ -#endif -#ifdef S_IFLNK - HANDLE_TYPE(S_IFLNK, "l"); /* symbolic link */ -#endif -#ifdef S_IFSOCK - HANDLE_TYPE(S_IFSOCK, "s"); /* Unix domain socket */ -#endif -#ifdef S_IFBLK - HANDLE_TYPE(S_IFBLK, "b"); /* block device */ -#endif -#ifdef S_IFCHR - HANDLE_TYPE(S_IFCHR, "c"); /* character device */ -#endif -#ifdef S_IFIFO - HANDLE_TYPE(S_IFIFO, "p"); /* FIFO */ -#endif -#ifdef S_IFDOOR - HANDLE_TYPE(S_IFDOOR, "D"); /* Door (e.g. on Solaris) */ -#endif - return "U"; /* Unknown */ -} - -static double -file_sparseness (const struct stat *p) -{ -#if defined HAVE_STRUCT_STAT_ST_BLOCKS - if (0 == p->st_size) - { - if (0 == p->st_blocks) - return 1.0; - else - return p->st_blocks < 0 ? -HUGE_VAL : HUGE_VAL; - } - else - { - double blklen = file_blocksize (p) * (double)p->st_blocks; - return blklen / p->st_size; - } -#else - return 1.0; -#endif -} - - - -static void -checked_fprintf (struct format_val *dest, const char *fmt, ...) -{ - int rv; - va_list ap; - - va_start (ap, fmt); - rv = vfprintf (dest->stream, fmt, ap); - if (rv < 0) - nonfatal_nontarget_file_error (errno, dest->filename); -} - - -static void -checked_print_quoted (struct format_val *dest, - const char *format, const char *s) -{ - int rv = print_quoted (dest->stream, dest->quote_opts, dest->dest_is_tty, - format, s); - if (rv < 0) - nonfatal_nontarget_file_error (errno, dest->filename); -} - - -static void -checked_fwrite (void *p, size_t siz, size_t nmemb, struct format_val *dest) -{ - int items_written = fwrite (p, siz, nmemb, dest->stream); - if (items_written < nmemb) - nonfatal_nontarget_file_error (errno, dest->filename); -} - -static void -checked_fflush (struct format_val *dest) -{ - if (0 != fflush (dest->stream)) - { - nonfatal_nontarget_file_error (errno, dest->filename); - } -} - -static void -do_fprintf (struct format_val *dest, - struct segment *segment, - const char *pathname, - const struct stat *stat_buf) -{ - char hbuf[LONGEST_HUMAN_READABLE + 1]; - const char *cp; - - switch (segment->segkind) - { - case KIND_PLAIN: /* Plain text string (no % conversion). */ - /* trusted */ - checked_fwrite(segment->text, 1, segment->text_len, dest); - break; - - case KIND_STOP: /* Terminate argument and flush output. */ - /* trusted */ - checked_fwrite (segment->text, 1, segment->text_len, dest); - checked_fflush (dest); - break; - - case KIND_FORMAT: - switch (segment->format_char[0]) - { - case 'a': /* atime in `ctime' format. */ - /* UNTRUSTED, probably unexploitable */ - checked_fprintf (dest, segment->text, ctime_format (get_stat_atime (stat_buf))); - break; - case 'b': /* size in 512-byte blocks */ - /* UNTRUSTED, probably unexploitable */ - checked_fprintf (dest, segment->text, - human_readable ((uintmax_t) ST_NBLOCKS (*stat_buf), - hbuf, human_ceiling, - ST_NBLOCKSIZE, 512)); - break; - case 'c': /* ctime in `ctime' format */ - /* UNTRUSTED, probably unexploitable */ - checked_fprintf (dest, segment->text, ctime_format (get_stat_ctime (stat_buf))); - break; - case 'd': /* depth in search tree */ - /* UNTRUSTED, probably unexploitable */ - checked_fprintf (dest, segment->text, state.curdepth); - break; - case 'D': /* Device on which file exists (stat.st_dev) */ - /* trusted */ - checked_fprintf (dest, segment->text, - human_readable ((uintmax_t) stat_buf->st_dev, hbuf, - human_ceiling, 1, 1)); - break; - case 'f': /* base name of path */ - /* sanitised */ - { - char *base = base_name (pathname); - checked_print_quoted (dest, segment->text, base); - free (base); - } - break; - case 'F': /* file system type */ - /* trusted */ - checked_print_quoted (dest, segment->text, filesystem_type (stat_buf, pathname)); - break; - case 'g': /* group name */ - /* trusted */ - /* (well, the actual group is selected by the user but - * its name was selected by the system administrator) - */ - { - struct group *g; - - g = getgrgid (stat_buf->st_gid); - if (g) - { - segment->text[segment->text_len] = 's'; - checked_fprintf (dest, segment->text, g->gr_name); - break; - } - else - { - /* Do nothing. */ - /*FALLTHROUGH*/ - } - } - /*FALLTHROUGH*/ /*...sometimes, so 'G' case.*/ - - case 'G': /* GID number */ - /* UNTRUSTED, probably unexploitable */ - checked_fprintf (dest, segment->text, - human_readable ((uintmax_t) stat_buf->st_gid, hbuf, - human_ceiling, 1, 1)); - break; - case 'h': /* leading directories part of path */ - /* sanitised */ - { - cp = strrchr (pathname, '/'); - if (cp == NULL) /* No leading directories. */ - { - /* If there is no slash in the pathname, we still - * print the string because it contains characters - * other than just '%s'. The %h expands to ".". - */ - checked_print_quoted (dest, segment->text, "."); - } - else - { - char *s = strdup (pathname); - s[cp - pathname] = 0; - checked_print_quoted (dest, segment->text, s); - free (s); - } - } - break; - - case 'H': /* ARGV element file was found under */ - /* trusted */ - { - char *s = xmalloc (state.starting_path_length+1); - memcpy (s, pathname, state.starting_path_length); - s[state.starting_path_length] = 0; - checked_fprintf (dest, segment->text, s); - free (s); - } - break; - - case 'i': /* inode number */ - /* UNTRUSTED, but not exploitable I think */ - checked_fprintf (dest, segment->text, - human_readable ((uintmax_t) stat_buf->st_ino, hbuf, - human_ceiling, - 1, 1)); - break; - case 'k': /* size in 1K blocks */ - /* UNTRUSTED, but not exploitable I think */ - checked_fprintf (dest, segment->text, - human_readable ((uintmax_t) ST_NBLOCKS (*stat_buf), - hbuf, human_ceiling, - ST_NBLOCKSIZE, 1024)); - break; - case 'l': /* object of symlink */ - /* sanitised */ -#ifdef S_ISLNK - { - char *linkname = 0; - - if (S_ISLNK (stat_buf->st_mode)) - { - linkname = areadlinkat (state.cwd_dir_fd, state.rel_pathname); - if (linkname == NULL) - { - nonfatal_target_file_error (errno, pathname); - state.exit_status = 1; - } - } - if (linkname) - { - checked_print_quoted (dest, segment->text, linkname); - } - else - { - /* We still need to honour the field width etc., so this is - * not a no-op. - */ - checked_print_quoted (dest, segment->text, ""); - } - free (linkname); - } -#endif /* S_ISLNK */ - break; - - case 'M': /* mode as 10 chars (eg., "-rwxr-x--x" */ - /* UNTRUSTED, probably unexploitable */ - { - char modestring[16] ; - filemodestring (stat_buf, modestring); - modestring[10] = '\0'; - checked_fprintf (dest, segment->text, modestring); - } - break; - - case 'm': /* mode as octal number (perms only) */ - /* UNTRUSTED, probably unexploitable */ - { - /* Output the mode portably using the traditional numbers, - even if the host unwisely uses some other numbering - scheme. But help the compiler in the common case where - the host uses the traditional numbering scheme. */ - mode_t m = stat_buf->st_mode; - bool traditional_numbering_scheme = - (S_ISUID == 04000 && S_ISGID == 02000 && S_ISVTX == 01000 - && S_IRUSR == 00400 && S_IWUSR == 00200 && S_IXUSR == 00100 - && S_IRGRP == 00040 && S_IWGRP == 00020 && S_IXGRP == 00010 - && S_IROTH == 00004 && S_IWOTH == 00002 && S_IXOTH == 00001); - checked_fprintf (dest, segment->text, - (traditional_numbering_scheme - ? m & MODE_ALL - : ((m & S_ISUID ? 04000 : 0) - | (m & S_ISGID ? 02000 : 0) - | (m & S_ISVTX ? 01000 : 0) - | (m & S_IRUSR ? 00400 : 0) - | (m & S_IWUSR ? 00200 : 0) - | (m & S_IXUSR ? 00100 : 0) - | (m & S_IRGRP ? 00040 : 0) - | (m & S_IWGRP ? 00020 : 0) - | (m & S_IXGRP ? 00010 : 0) - | (m & S_IROTH ? 00004 : 0) - | (m & S_IWOTH ? 00002 : 0) - | (m & S_IXOTH ? 00001 : 0)))); - } - break; - - case 'n': /* number of links */ - /* UNTRUSTED, probably unexploitable */ - checked_fprintf (dest, segment->text, - human_readable ((uintmax_t) stat_buf->st_nlink, - hbuf, - human_ceiling, - 1, 1)); - break; - - case 'p': /* pathname */ - /* sanitised */ - checked_print_quoted (dest, segment->text, pathname); - break; - - case 'P': /* pathname with ARGV element stripped */ - /* sanitised */ - if (state.curdepth > 0) - { - cp = pathname + state.starting_path_length; - if (*cp == '/') - /* Move past the slash between the ARGV element - and the rest of the pathname. But if the ARGV element - ends in a slash, we didn't add another, so we've - already skipped past it. */ - cp++; - } - else - { - cp = ""; - } - checked_print_quoted (dest, segment->text, cp); - break; - - case 's': /* size in bytes */ - /* UNTRUSTED, probably unexploitable */ - checked_fprintf (dest, segment->text, - human_readable ((uintmax_t) stat_buf->st_size, - hbuf, human_ceiling, 1, 1)); - break; - - case 'S': /* sparseness */ - /* UNTRUSTED, probably unexploitable */ - checked_fprintf (dest, segment->text, file_sparseness (stat_buf));; - break; - - case 't': /* mtime in `ctime' format */ - /* UNTRUSTED, probably unexploitable */ - checked_fprintf (dest, segment->text, - ctime_format (get_stat_mtime (stat_buf))); - break; - - case 'u': /* user name */ - /* trusted */ - /* (well, the actual user is selected by the user on systems - * where chown is not restricted, but the user name was - * selected by the system administrator) - */ - { - struct passwd *p; - - p = getpwuid (stat_buf->st_uid); - if (p) - { - segment->text[segment->text_len] = 's'; - checked_fprintf (dest, segment->text, p->pw_name); - break; - } - /* else fallthru */ - } - /* FALLTHROUGH*/ /* .. to case U */ - - case 'U': /* UID number */ - /* UNTRUSTED, probably unexploitable */ - checked_fprintf (dest, segment->text, - human_readable ((uintmax_t) stat_buf->st_uid, hbuf, - human_ceiling, 1, 1)); - break; - - /* %Y: type of file system entry like `ls -l`: - * (d,-,l,s,p,b,c,n) n=nonexistent (symlink) - */ - case 'Y': /* in case of symlink */ - /* trusted */ - { -#ifdef S_ISLNK - if (S_ISLNK (stat_buf->st_mode)) - { - struct stat sbuf; - /* If we would normally follow links, do not do so. - * If we would normally not follow links, do so. - */ - if ((following_links () ? optionp_stat : optionl_stat) - (state.rel_pathname, &sbuf) != 0) - { - if ( errno == ENOENT ) - { - checked_fprintf (dest, segment->text, "N"); - break; - } - else if ( errno == ELOOP ) - { - checked_fprintf (dest, segment->text, "L"); - break; - } - else - { - checked_fprintf (dest, segment->text, "?"); - error (0, errno, "%s", - safely_quote_err_filename (0, pathname)); - /* exit_status = 1; - return ; */ - break; - } - } - checked_fprintf (dest, segment->text, - mode_to_filetype (sbuf.st_mode & S_IFMT)); - } -#endif /* S_ISLNK */ - else - { - checked_fprintf (dest, segment->text, - mode_to_filetype (stat_buf->st_mode & S_IFMT)); - } - } - break; - - case 'y': - /* trusted */ - { - checked_fprintf (dest, segment->text, - mode_to_filetype (stat_buf->st_mode & S_IFMT)); - } - break; - - case 'Z': /* SELinux security context */ - { - security_context_t scontext; - int rv = (*options.x_getfilecon) (state.cwd_dir_fd, state.rel_pathname, - &scontext); - if (rv < 0) - { - /* If getfilecon fails, there will in the general case - still be some text to print. We just make %Z expand - to an empty string. */ - checked_fprintf (dest, segment->text, ""); - - error (0, errno, _("getfilecon failed: %s"), - safely_quote_err_filename (0, pathname)); - state.exit_status = 1; - } - else - { - checked_fprintf (dest, segment->text, scontext); - freecon (scontext); - } - } - break; - } - /* end of KIND_FORMAT case */ - break; - } -} - -bool -pred_fprintf (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) -{ - struct format_val *dest = &pred_ptr->args.printf_vec; - struct segment *segment; - - for (segment = dest->segment; segment; segment = segment->next) - { - if ( (KIND_FORMAT == segment->segkind) && segment->format_char[1]) /* Component of date. */ - { - struct timespec ts; - int valid = 0; - - switch (segment->format_char[0]) - { - case 'A': - ts = get_stat_atime (stat_buf); - valid = 1; - break; - case 'B': - ts = get_stat_birthtime (stat_buf); - if ('@' == segment->format_char[1]) - valid = 1; - else - valid = (ts.tv_nsec >= 0); - break; - case 'C': - ts = get_stat_ctime (stat_buf); - valid = 1; - break; - case 'T': - ts = get_stat_mtime (stat_buf); - valid = 1; - break; - default: - assert (0); - abort (); - } - /* We trust the output of format_date not to contain - * nasty characters, though the value of the date - * is itself untrusted data. - */ - if (valid) - { - /* trusted */ - checked_fprintf (dest, segment->text, - format_date (ts, segment->format_char[1])); - } - else - { - /* The specified timestamp is not available, output - * nothing for the timestamp, but use the rest (so that - * for example find foo -printf '[%Bs] %p\n' can print - * "[] foo"). - */ - /* trusted */ - checked_fprintf (dest, segment->text, ""); - } - } - else - { - /* Print a segment which is not a date. */ - do_fprintf (dest, segment, pathname, stat_buf); - } - } - return true; -} - bool pred_fstype (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) { @@ -1501,7 +712,7 @@ pred_newerXY (const char *pathname, struct stat *stat_buf, struct predicate *pre case XVAL_BIRTHTIME: ts = get_stat_birthtime (stat_buf); collected = true; - if (ts.tv_nsec < 0); + if (ts.tv_nsec < 0) { /* XXX: Cannot determine birth time. Warn once. */ error (0, 0, _("WARNING: cannot determine birth time of file %s"), @@ -1568,7 +779,10 @@ is_ok (const char *program, const char *arg) This standard does not have requirements for locales other than POSIX */ /* XXX: printing UNTRUSTED data here. */ - fprintf (stderr, _("< %s ... %s > ? "), program, arg); + if (fprintf (stderr, _("< %s ... %s > ? "), program, arg) < 0) + { + error (EXIT_FAILURE, errno, _("Failed to write prompt for -ok")); + } fflush (stderr); return yesno (); } @@ -1987,6 +1201,8 @@ pred_context (const char *pathname, struct stat *stat_buf, security_context_t scontext; int rv = (*options.x_getfilecon) (state.cwd_dir_fd, state.rel_pathname, &scontext); + (void) stat_buf; + if (rv < 0) { error (0, errno, _("getfilecon failed: %s"), @@ -1999,524 +1215,11 @@ pred_context (const char *pathname, struct stat *stat_buf, return rv; } - -/* 1) fork to get a child; parent remembers the child pid - 2) child execs the command requested - 3) parent waits for child; checks for proper pid of child - - Possible returns: - - ret errno status(h) status(l) - - pid x signal# 0177 stopped - pid x exit arg 0 term by _exit - pid x 0 signal # term by signal - -1 EINTR parent got signal - -1 other some other kind of error - - Return true only if the pid matches, status(l) is - zero, and the exit arg (status high) is 0. - Otherwise return false, possibly printing an error message. */ - - -static bool -prep_child_for_exec (bool close_stdin, const struct saved_cwd *wd) -{ - bool ok = true; - if (close_stdin) - { - const char inputfile[] = "/dev/null"; - - if (close (0) < 0) - { - error (0, errno, _("Cannot close standard input")); - ok = false; - } - else - { - if (open (inputfile, O_RDONLY -#if defined O_LARGEFILE - |O_LARGEFILE -#endif - ) < 0) - { - /* This is not entirely fatal, since - * executing the child with a closed - * stdin is almost as good as executing it - * with its stdin attached to /dev/null. - */ - error (0, errno, "%s", safely_quote_err_filename (0, inputfile)); - /* do not set ok=false, it is OK to continue anyway. */ - } - } - } - - /* Even if DebugSearch is set, don't announce our change of - * directory, since we're not going to emit a subsequent - * announcement of a call to stat() anyway, as we're about to exec - * something. - */ - if (0 != restore_cwd (wd)) - { - error (0, errno, _("Failed to change directory")); - ok = false; - } - return ok; -} - - - - - - -int -launch (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv) -{ - pid_t child_pid; - static int first_time = 1; - struct exec_val *execp = usercontext; - - /* Make sure output of command doesn't get mixed with find output. */ - fflush (stdout); - fflush (stderr); - - /* Make sure to listen for the kids. */ - if (first_time) - { - first_time = 0; - signal (SIGCHLD, SIG_DFL); - } - - child_pid = fork (); - if (child_pid == -1) - error (EXIT_FAILURE, errno, _("cannot fork")); - if (child_pid == 0) - { - /* We are the child. */ - assert (NULL != execp->wd_for_exec); - if (!prep_child_for_exec (execp->close_stdin, execp->wd_for_exec)) - { - _exit (1); - } - else - { - if (fd_leak_check_is_enabled ()) - { - complain_about_leaky_fds (); - } - } - - if (bc_args_exceed_testing_limit (argv)) - errno = E2BIG; - else - execvp (argv[0], argv); - /* TODO: use a pipe to pass back the errno value, like xargs does */ - error (0, errno, "%s", - safely_quote_err_filename (0, argv[0])); - _exit (1); - } - - while (waitpid (child_pid, &(execp->last_child_status), 0) == (pid_t) -1) - { - if (errno != EINTR) - { - error (0, errno, _("error waiting for %s"), - safely_quote_err_filename (0, argv[0])); - state.exit_status = 1; - return 0; /* FAIL */ - } - } - - if (WIFSIGNALED (execp->last_child_status)) - { - error (0, 0, _("%s terminated by signal %d"), - quotearg_n_style (0, options.err_quoting_style, argv[0]), - WTERMSIG (execp->last_child_status)); - - if (execp->multiple) - { - /* -exec \; just returns false if the invoked command fails. - * -exec {} + returns true if the invoked command fails, but - * sets the program exit status. - */ - state.exit_status = 1; - } - - return 1; /* OK */ - } - - if (0 == WEXITSTATUS (execp->last_child_status)) - { - return 1; /* OK */ - } - else - { - if (execp->multiple) - { - /* -exec \; just returns false if the invoked command fails. - * -exec {} + returns true if the invoked command fails, but - * sets the program exit status. - */ - state.exit_status = 1; - } - /* The child failed, but this is the exec callback. We - * don't want to run the child again in this case anwyay. - */ - return 1; /* FAIL (but don't try again) */ - } - -} - - -static bool -scan_for_digit_differences (const char *p, const char *q, - size_t *first, size_t *n) -{ - bool seen = false; - size_t i; - - for (i=0; p[i] && q[i]; i++) - { - if (p[i] != q[i]) - { - if (!isdigit ((unsigned char)q[i]) || !isdigit ((unsigned char)q[i])) - return false; - - if (!seen) - { - *first = i; - *n = 1; - seen = 1; - } - else - { - if (i-*first == *n) - { - /* Still in the first sequence of differing digits. */ - ++*n; - } - else - { - /* More than one differing contiguous character sequence. */ - return false; - } - } - } - } - if (p[i] || q[i]) - { - /* strings are different lengths. */ - return false; - } - return true; -} - - -static char* -do_time_format (const char *fmt, const struct tm *p, const char *ns, size_t ns_size) -{ - static char *buf = NULL; - static size_t buf_size; - char *timefmt = NULL; - struct tm altered_time; - - - /* If the format expands to nothing (%p in some locales, for - * example), strftime can return 0. We actually want to distinguish - * the error case where the buffer is too short, so we just prepend - * an otherwise uninteresting character to prevent the no-output - * case. - */ - timefmt = xmalloc (strlen (fmt) + 2u); - sprintf (timefmt, "_%s", fmt); - - /* altered_time is a similar time, but in which both - * digits of the seconds field are different. - */ - altered_time = *p; - if (altered_time.tm_sec >= 11) - altered_time.tm_sec -= 11; - else - altered_time.tm_sec += 11; - - /* If we call strftime() with buf_size=0, the program will coredump - * on Solaris, since it unconditionally writes the terminating null - * character. - */ - buf_size = 1u; - buf = xmalloc (buf_size); - while (true) - { - /* I'm not sure that Solaris will return 0 when the buffer is too small. - * Therefore we do not check for (buf_used != 0) as the termination - * condition. - */ - size_t buf_used = strftime (buf, buf_size, timefmt, p); - if (buf_used /* Conforming POSIX system */ - && (buf_used < buf_size)) /* Solaris workaround */ - { - char *altbuf; - size_t i = 0, n = 0; - size_t final_len = (buf_used - + 1u /* for \0 */ - + ns_size); - buf = xrealloc (buf, final_len); - altbuf = xmalloc (final_len); - strftime (altbuf, buf_size, timefmt, &altered_time); - - /* Find the seconds digits; they should be the only changed part. - * In theory the result of the two formatting operations could differ in - * more than just one sequence of decimal digits (for example %X might - * in theory return a spelled-out time like "thirty seconds past noon"). - * When that happens, we just avoid inserting the nanoseconds field. - */ - if (scan_for_digit_differences (buf, altbuf, &i, &n) - && (2==n) && !isdigit ((unsigned char)buf[i+n])) - { - const size_t end_of_seconds = i + n; - const size_t suffix_len = buf_used-(end_of_seconds)+1; - - /* Move the tail (including the \0). Note that this - * is a move of an overlapping memory block, so we - * must use memmove instead of memcpy. Then insert - * the nanoseconds (but not its trailing \0). - */ - assert (end_of_seconds + ns_size + suffix_len == final_len); - memmove (buf+end_of_seconds+ns_size, - buf+end_of_seconds, - suffix_len); - memcpy (buf+i+n, ns, ns_size); - } - else - { - /* No seconds digits. No need to insert anything. */ - } - /* The first character of buf is the underscore, which we actually - * don't want. - */ - free (timefmt); - return buf+1; - } - else - { - buf = x2nrealloc (buf, &buf_size, 2u); - } - } -} - - - -/* Return a static string formatting the time WHEN according to the - * strftime format character KIND. - * - * This function contains a number of assertions. These look like - * runtime checks of the results of computations, which would be a - * problem since external events should not be tested for with - * "assert" (instead you should use "if"). However, they are not - * really runtime checks. The assertions actually exist to verify - * that the various buffers are correctly sized. - */ -static char * -format_date (struct timespec ts, int kind) -{ - /* In theory, we use an extra 10 characters for 9 digits of - * nanoseconds and 1 for the decimal point. However, the real - * world is more complex than that. - * - * For example, some systems return junk in the tv_nsec part of - * st_birthtime. An example of this is the NetBSD-4.0-RELENG kernel - * (at Sat Mar 24 18:46:46 2007) running a NetBSD-3.1-RELEASE - * runtime and examining files on an msdos filesytem. So for that - * reason we set NS_BUF_LEN to 32, which is simply "long enough" as - * opposed to "exactly the right size". Note that the behaviour of - * NetBSD appears to be a result of the use of uninitialised data, - * as it's not 100% reproducible (more like 25%). - */ - enum { - NS_BUF_LEN = 32, - DATE_LEN_PERCENT_APLUS=21 /* length of result of %A+ (it's longer than %c)*/ - }; - static char buf[128u+10u + MAX(DATE_LEN_PERCENT_APLUS, - MAX (LONGEST_HUMAN_READABLE + 2, NS_BUF_LEN+64+200))]; - char ns_buf[NS_BUF_LEN]; /* -.9999999990 (- sign can happen!)*/ - int charsprinted, need_ns_suffix; - struct tm *tm; - char fmt[6]; - - /* human_readable() assumes we pass a buffer which is at least as - * long as LONGEST_HUMAN_READABLE. We use an assertion here to - * ensure that no nasty unsigned overflow happend in our calculation - * of the size of buf. Do the assertion here rather than in the - * code for %@ so that we find the problem quickly if it exists. If - * you want to submit a patch to move this into the if statement, go - * ahead, I'll apply it. But include performance timings - * demonstrating that the performance difference is actually - * measurable. - */ - verify (sizeof (buf) >= LONGEST_HUMAN_READABLE); - - charsprinted = 0; - need_ns_suffix = 0; - - /* Format the main part of the time. */ - if (kind == '+') - { - strcpy (fmt, "%F+%T"); - need_ns_suffix = 1; - } - else - { - fmt[0] = '%'; - fmt[1] = kind; - fmt[2] = '\0'; - - /* %a, %c, and %t are handled in ctime_format() */ - switch (kind) - { - case 'S': - case 'T': - case 'X': - case '@': - need_ns_suffix = 1; - break; - default: - need_ns_suffix = 0; - break; - } - } - - if (need_ns_suffix) - { - /* Format the nanoseconds part. Leave a trailing zero to - * discourage people from writing scripts which extract the - * fractional part of the timestamp by using column offsets. - * The reason for discouraging this is that in the future, the - * granularity may not be nanoseconds. - */ - charsprinted = snprintf (ns_buf, NS_BUF_LEN, ".%09ld0", (long int)ts.tv_nsec); - assert (charsprinted < NS_BUF_LEN); - } - else - { - charsprinted = 0; - ns_buf[0] = 0; - } - - if (kind != '@') - { - tm = localtime (&ts.tv_sec); - if (tm) - { - char *s = do_time_format (fmt, tm, ns_buf, charsprinted); - if (s) - return s; - } - } - - /* If we get to here, either the format was %@, or we have fallen back to it - * because strftime failed. - */ - if (1) - { - uintmax_t w = ts.tv_sec; - size_t used, len, remaining; - - /* XXX: note that we are negating an unsigned type which is the - * widest possible unsigned type. - */ - char *p = human_readable (ts.tv_sec < 0 ? -w : w, buf + 1, - human_ceiling, 1, 1); - assert (p > buf); - assert (p < (buf + (sizeof buf))); - if (ts.tv_sec < 0) - *--p = '-'; /* XXX: Ugh, relying on internal details of human_readable(). */ - - /* Add the nanoseconds part. Because we cannot enforce a - * particlar implementation of human_readable, we cannot assume - * any particular value for (p-buf). So we need to be careful - * that there is enough space remaining in the buffer. - */ - if (need_ns_suffix) - { - len = strlen (p); - used = (p-buf) + len; /* Offset into buf of current end */ - assert (sizeof buf > used); /* Ensure we can perform subtraction safely. */ - remaining = sizeof buf - used - 1u; /* allow space for NUL */ - - if (strlen (ns_buf) >= remaining) - { - error (0, 0, - "charsprinted=%ld but remaining=%lu: ns_buf=%s", - (long)charsprinted, (unsigned long)remaining, ns_buf); - } - assert (strlen (ns_buf) < remaining); - strcat (p, ns_buf); - } - return p; - } -} - -static const char *weekdays[] = - { - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" - }; -static char * months[] = - { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - - -static char * -ctime_format (struct timespec ts) -{ - const struct tm * ptm; -#define TIME_BUF_LEN 1024u - static char resultbuf[TIME_BUF_LEN]; - int nout; - - ptm = localtime (&ts.tv_sec); - if (ptm) - { - assert (ptm->tm_wday >= 0); - assert (ptm->tm_wday < 7); - assert (ptm->tm_mon >= 0); - assert (ptm->tm_mon < 12); - assert (ptm->tm_hour >= 0); - assert (ptm->tm_hour < 24); - assert (ptm->tm_min < 60); - assert (ptm->tm_sec <= 61); /* allows 2 leap seconds. */ - - /* wkday mon mday hh:mm:ss.nnnnnnnnn yyyy */ - nout = snprintf (resultbuf, TIME_BUF_LEN, - "%3s %3s %2d %02d:%02d:%02d.%010ld %04d", - weekdays[ptm->tm_wday], - months[ptm->tm_mon], - ptm->tm_mday, - ptm->tm_hour, - ptm->tm_min, - ptm->tm_sec, - (long int)ts.tv_nsec, - 1900 + ptm->tm_year); - - assert (nout < TIME_BUF_LEN); - return resultbuf; - } - else - { - /* The time cannot be represented as a struct tm. - Output it as an integer. */ - return format_date (ts, '@'); - } -} - /* Copy STR into BUF and trim blanks from the end of BUF. Return BUF. */ static char * -blank_rtrim (str, buf) - char *str; - char *buf; +blank_rtrim (const char *str, char *buf) { int i; @@ -2527,7 +1230,7 @@ blank_rtrim (str, buf) while ((i >= 0) && ((buf[i] == ' ') || buf[i] == '\t')) i--; buf[++i] = '\0'; - return (buf); + return buf; } /* Print out the predicate list starting at NODE. */ diff --git a/find/print.c b/find/print.c new file mode 100644 index 0000000..90b62ff --- /dev/null +++ b/find/print.c @@ -0,0 +1,1322 @@ +/* print.c -- print/printf-related code. + Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003, 2004, + 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/* We always include config.h first. */ +#include + +/* system headers go here. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* gnulib headers. */ +#include "areadlink.h" +#include "dirname.h" +#include "error.h" +#include "filemode.h" +#include "gettext.h" +#include "human.h" +#include "printquoted.h" +#include "stat-size.h" +#include "stat-time.h" +#include "verify.h" +#include "xalloc.h" + +/* find-specific headers. */ +#include "defs.h" +#include "print.h" + +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + +#if defined STDC_HEADERS +# define ISDIGIT(c) isdigit ((unsigned char)c) +#else +# define ISDIGIT(c) (isascii ((unsigned char)c) && isdigit ((unsigned char)c)) +#endif +#undef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + + +/* Create a new fprintf segment in *SEGMENT, with type KIND, + from the text in FORMAT, which has length LEN. + Return the address of the `next' pointer of the new segment. */ +struct segment ** +make_segment (struct segment **segment, + char *format, + int len, + int kind, + char format_char, + char aux_format_char, + struct predicate *pred) +{ + enum EvaluationCost mycost = NeedsNothing; + char *fmt; + + assert (format_char != '{'); + assert (format_char != '['); + assert (format_char != '('); + + *segment = xmalloc (sizeof (struct segment)); + + (*segment)->segkind = kind; + (*segment)->format_char[0] = format_char; + (*segment)->format_char[1] = aux_format_char; + (*segment)->next = NULL; + (*segment)->text_len = len; + + fmt = (*segment)->text = xmalloc (len + sizeof "d"); + strncpy (fmt, format, len); + fmt += len; + + if (kind == KIND_PLAIN /* Plain text string, no % conversion. */ + || kind == KIND_STOP) /* Terminate argument, no newline. */ + { + assert (0 == format_char); + assert (0 == aux_format_char); + *fmt = '\0'; + if (mycost > pred->p_cost) + pred->p_cost = NeedsNothing; + return &(*segment)->next; + } + + assert (kind == KIND_FORMAT); + switch (format_char) + { + case '%': /* literal % */ + *fmt++ = '%'; + break; + + case 'l': /* object of symlink */ + pred->need_stat = true; + mycost = NeedsLinkName; + *fmt++ = 's'; + break; + + case 'y': /* file type */ + pred->need_type = true; + mycost = NeedsType; + *fmt++ = 's'; + break; + + case 'i': /* inode number */ + pred->need_inum = true; + mycost = NeedsInodeNumber; + *fmt++ = 's'; + break; + + case 'a': /* atime in `ctime' format */ + case 'A': /* atime in user-specified strftime format */ + case 'B': /* birth time in user-specified strftime format */ + case 'c': /* ctime in `ctime' format */ + case 'C': /* ctime in user-specified strftime format */ + case 'F': /* file system type */ + case 'g': /* group name */ + case 'M': /* mode in `ls -l' format (eg., "drwxr-xr-x") */ + case 's': /* size in bytes */ + case 't': /* mtime in `ctime' format */ + case 'T': /* mtime in user-specified strftime format */ + case 'u': /* user name */ + pred->need_stat = true; + mycost = NeedsStatInfo; + *fmt++ = 's'; + break; + + case 'S': /* sparseness */ + pred->need_stat = true; + mycost = NeedsStatInfo; + *fmt++ = 'g'; + break; + + case 'Y': /* symlink pointed file type */ + pred->need_stat = true; + mycost = NeedsType; /* true for amortised effect */ + *fmt++ = 's'; + break; + + case 'f': /* basename of path */ + case 'h': /* leading directories part of path */ + case 'p': /* pathname */ + case 'P': /* pathname with ARGV element stripped */ + *fmt++ = 's'; + break; + + case 'Z': /* SELinux security context */ + mycost = NeedsAccessInfo; + *fmt++ = 's'; + break; + + case 'H': /* ARGV element file was found under */ + *fmt++ = 's'; + break; + + /* Numeric items that one might expect to honour + * #, 0, + flags but which do not. + */ + case 'G': /* GID number */ + case 'U': /* UID number */ + case 'b': /* size in 512-byte blocks (NOT birthtime in ctime fmt)*/ + case 'D': /* Filesystem device on which the file exits */ + case 'k': /* size in 1K blocks */ + case 'n': /* number of links */ + pred->need_stat = true; + mycost = NeedsStatInfo; + *fmt++ = 's'; + break; + + /* Numeric items that DO honour #, 0, + flags. + */ + case 'd': /* depth in search tree (0 = ARGV element) */ + *fmt++ = 'd'; + break; + + case 'm': /* mode as octal number (perms only) */ + *fmt++ = 'o'; + pred->need_stat = true; + mycost = NeedsStatInfo; + break; + } + *fmt = '\0'; + + if (mycost > pred->p_cost) + pred->p_cost = mycost; + return &(*segment)->next; +} + +static bool +is_octal_char (char ch) +{ + return ch >= '0' && ch <= '7'; +} + +static char +parse_octal_escape(const char *p, size_t *consumed) +{ + register int n, i; + size_t pos = 0; + + for (i = n = 0; i < 3 && is_octal_char(p[pos]); i++, pos++) + { + n = 8 * n + p[pos] - '0'; + } + --pos; + *consumed = pos; + return n; +} + +static int +parse_escape_char(const char ch) +{ + char value = 0; + switch (ch) + { + case 'a': + value = '\a'; + break; + case 'b': + value = '\b'; + break; + case 'f': + value = '\f'; + break; + case 'n': + value = '\n'; + break; + case 'r': + value = '\r'; + break; + case 't': + value = '\t'; + break; + case 'v': + value = '\v'; + break; + case '\\': + value = '\\'; + break; + } + return value; +} + + +static size_t +get_format_flags_length(const char *p) +{ + size_t n = 0; + /* Scan past flags, width and precision, to verify kind. */ + for (; p[++n] && strchr ("-+ #", p[n]);) + { + /* Do nothing. */ + } + while (ISDIGIT (p[n])) + n++; + if (p[n] == '.') + for (n++; ISDIGIT (p[n]); n++) + /* Do nothing. */ ; + return n; +} + +static size_t +get_format_specifer_length(char ch) +{ + if (strchr ("abcdDfFgGhHiklmMnpPsStuUyYZ%", ch)) + { + return 1; + } + else if (strchr ("ABCT", ch)) + { + return 2; + } + else + { + return 0; + } +} + + +bool +insert_fprintf (struct format_val *vec, + const struct parser_table *entry, + char *format) +{ + char *segstart = format; + char *fmt_editpos; /* Current address in scanning `format'. */ + struct segment **segmentp; /* Address of current segment. */ + struct predicate *our_pred; + + our_pred = insert_primary_withpred (entry, pred_fprintf, format); + our_pred->side_effects = our_pred->no_default_print = true; + our_pred->args.printf_vec = *vec; + our_pred->need_type = false; + our_pred->need_stat = false; + our_pred->p_cost = NeedsNothing; + + segmentp = &our_pred->args.printf_vec.segment; + *segmentp = NULL; + + for (fmt_editpos = segstart; *fmt_editpos; fmt_editpos++) + { + if (fmt_editpos[0] == '\\' && fmt_editpos[1] == 'c') + { + make_segment (segmentp, segstart, fmt_editpos - segstart, + KIND_STOP, 0, 0, + our_pred); + if (our_pred->need_stat && (our_pred->p_cost < NeedsStatInfo)) + our_pred->p_cost = NeedsStatInfo; + return true; + } + else if (*fmt_editpos == '\\') + { + size_t readpos = 1; + if (!fmt_editpos[readpos]) + { + error (0, 0, _("warning: escape `\\' followed by nothing at all")); + --readpos; + /* (*fmt_editpos) is already '\\' and that's a reasonable result. */ + } + else if (is_octal_char(fmt_editpos[readpos])) + { + size_t consumed = 0; + *fmt_editpos = parse_octal_escape(fmt_editpos + readpos, &consumed); + readpos += consumed; + } + else + { + const char val = parse_escape_char(fmt_editpos[readpos]); + if (val) + { + fmt_editpos[0] = val; + } + else + { + error (0, 0, _("warning: unrecognized escape `\\%c'"), + fmt_editpos[readpos]); + fmt_editpos += readpos; + continue; + } + } + segmentp = make_segment (segmentp, + segstart, fmt_editpos - segstart + 1, + KIND_PLAIN, 0, 0, + our_pred); + segstart = fmt_editpos + readpos + 1; /* Move past the escape. */ + fmt_editpos += readpos; /* Incremented immediately by `for'. */ + } + else if (fmt_editpos[0] == '%') + { + size_t len; + if (fmt_editpos[1] == 0) + { + /* Trailing %. We don't like those. */ + error (EXIT_FAILURE, 0, + _("error: %s at end of format string"), fmt_editpos); + } + + if (fmt_editpos[1] == '%') /* %% produces just %. */ + len = 1; + else + len = get_format_flags_length(fmt_editpos); + fmt_editpos += len; + + len = get_format_specifer_length (fmt_editpos[0]); + if (len && (fmt_editpos[len-1])) + { + const char fmt2 = (len == 2) ? fmt_editpos[1] : 0; + segmentp = make_segment (segmentp, segstart, + fmt_editpos - segstart, + KIND_FORMAT, fmt_editpos[0], fmt2, + our_pred); + fmt_editpos += (len - 1); + } + else + { + if (strchr ("{[(", fmt_editpos[0])) + { + error (EXIT_FAILURE, 0, + _("error: the format directive `%%%c' is reserved for future use"), + (int)fmt_editpos[0]); + /*NOTREACHED*/ + } + + if (len == 2 && !fmt_editpos[1]) + { + error (0, 0, + _("warning: format directive `%%%c' " + "should be followed by another character"), + fmt_editpos[0]); + } + else + { + /* An unrecognized % escape. Print the char after the %. */ + error (0, 0, + _("warning: unrecognized format directive `%%%c'"), + fmt_editpos[0]); + } + segmentp = make_segment (segmentp, + segstart, fmt_editpos + 1 - segstart, + KIND_PLAIN, 0, 0, + our_pred); + } + segstart = fmt_editpos + 1; + } + } + + if (fmt_editpos > segstart) + make_segment (segmentp, segstart, fmt_editpos - segstart, KIND_PLAIN, 0, 0, + our_pred); + return true; +} + +static bool +scan_for_digit_differences (const char *p, const char *q, + size_t *first, size_t *n) +{ + bool seen = false; + size_t i; + + for (i=0; p[i] && q[i]; i++) + { + if (p[i] != q[i]) + { + if (!isdigit ((unsigned char)q[i]) || !isdigit ((unsigned char)q[i])) + return false; + + if (!seen) + { + *first = i; + *n = 1; + seen = 1; + } + else + { + if (i-*first == *n) + { + /* Still in the first sequence of differing digits. */ + ++*n; + } + else + { + /* More than one differing contiguous character sequence. */ + return false; + } + } + } + } + if (p[i] || q[i]) + { + /* strings are different lengths. */ + return false; + } + return true; +} + +static char* +do_time_format (const char *fmt, const struct tm *p, const char *ns, size_t ns_size) +{ + static char *buf = NULL; + static size_t buf_size; + char *timefmt = NULL; + struct tm altered_time; + + + /* If the format expands to nothing (%p in some locales, for + * example), strftime can return 0. We actually want to distinguish + * the error case where the buffer is too short, so we just prepend + * an otherwise uninteresting character to prevent the no-output + * case. + */ + timefmt = xmalloc (strlen (fmt) + 2u); + timefmt[0] = '_'; + memcpy (timefmt + 1, fmt, strlen (fmt) + 1); + + /* altered_time is a similar time, but in which both + * digits of the seconds field are different. + */ + altered_time = *p; + if (altered_time.tm_sec >= 11) + altered_time.tm_sec -= 11; + else + altered_time.tm_sec += 11; + + /* If we call strftime() with buf_size=0, the program will coredump + * on Solaris, since it unconditionally writes the terminating null + * character. + */ + if (buf == NULL) + { + buf_size = 1u; + buf = xmalloc (buf_size); + } + while (true) + { + /* I'm not sure that Solaris will return 0 when the buffer is too small. + * Therefore we do not check for (buf_used != 0) as the termination + * condition. + */ + size_t buf_used = strftime (buf, buf_size, timefmt, p); + if (buf_used /* Conforming POSIX system */ + && (buf_used < buf_size)) /* Solaris workaround */ + { + char *altbuf; + size_t i = 0, n = 0; + size_t final_len = (buf_used + + 1u /* for \0 */ + + ns_size); + buf = xrealloc (buf, final_len); + buf_size = final_len; + altbuf = xmalloc (final_len); + strftime (altbuf, buf_size, timefmt, &altered_time); + + /* Find the seconds digits; they should be the only changed part. + * In theory the result of the two formatting operations could differ in + * more than just one sequence of decimal digits (for example %X might + * in theory return a spelled-out time like "thirty seconds past noon"). + * When that happens, we just avoid inserting the nanoseconds field. + */ + if (scan_for_digit_differences (buf, altbuf, &i, &n) + && (2==n) && !isdigit ((unsigned char)buf[i+n])) + { + const size_t end_of_seconds = i + n; + const size_t suffix_len = buf_used-(end_of_seconds)+1; + + /* Move the tail (including the \0). Note that this + * is a move of an overlapping memory block, so we + * must use memmove instead of memcpy. Then insert + * the nanoseconds (but not its trailing \0). + */ + assert (end_of_seconds + ns_size + suffix_len == final_len); + memmove (buf+end_of_seconds+ns_size, + buf+end_of_seconds, + suffix_len); + memcpy (buf+i+n, ns, ns_size); + } + else + { + /* No seconds digits. No need to insert anything. */ + } + /* The first character of buf is the underscore, which we actually + * don't want. + */ + free (timefmt); + free (altbuf); + return buf+1; + } + else + { + buf = x2nrealloc (buf, &buf_size, sizeof *buf); + } + } +} + +/* Return a static string formatting the time WHEN according to the + * strftime format character KIND. + * + * This function contains a number of assertions. These look like + * runtime checks of the results of computations, which would be a + * problem since external events should not be tested for with + * "assert" (instead you should use "if"). However, they are not + * really runtime checks. The assertions actually exist to verify + * that the various buffers are correctly sized. + */ +static char * +format_date (struct timespec ts, int kind) +{ + /* In theory, we use an extra 10 characters for 9 digits of + * nanoseconds and 1 for the decimal point. However, the real + * world is more complex than that. + * + * For example, some systems return junk in the tv_nsec part of + * st_birthtime. An example of this is the NetBSD-4.0-RELENG kernel + * (at Sat Mar 24 18:46:46 2007) running a NetBSD-3.1-RELEASE + * runtime and examining files on an msdos filesytem. So for that + * reason we set NS_BUF_LEN to 32, which is simply "long enough" as + * opposed to "exactly the right size". Note that the behaviour of + * NetBSD appears to be a result of the use of uninitialized data, + * as it's not 100% reproducible (more like 25%). + */ + enum { + NS_BUF_LEN = 32, + DATE_LEN_PERCENT_APLUS=21 /* length of result of %A+ (it's longer than %c)*/ + }; + static char buf[128u+10u + MAX(DATE_LEN_PERCENT_APLUS, + MAX (LONGEST_HUMAN_READABLE + 2, NS_BUF_LEN+64+200))]; + char ns_buf[NS_BUF_LEN]; /* -.9999999990 (- sign can happen!)*/ + int charsprinted, need_ns_suffix; + struct tm *tm; + char fmt[6]; + + /* human_readable() assumes we pass a buffer which is at least as + * long as LONGEST_HUMAN_READABLE. We use an assertion here to + * ensure that no nasty unsigned overflow happened in our calculation + * of the size of buf. Do the assertion here rather than in the + * code for %@ so that we find the problem quickly if it exists. If + * you want to submit a patch to move this into the if statement, go + * ahead, I'll apply it. But include performance timings + * demonstrating that the performance difference is actually + * measurable. + */ + verify (sizeof (buf) >= LONGEST_HUMAN_READABLE); + + charsprinted = 0; + need_ns_suffix = 0; + + /* Format the main part of the time. */ + if (kind == '+') + { + strcpy (fmt, "%F+%T"); + need_ns_suffix = 1; + } + else + { + fmt[0] = '%'; + fmt[1] = kind; + fmt[2] = '\0'; + + /* %a, %c, and %t are handled in ctime_format() */ + switch (kind) + { + case 'S': + case 'T': + case 'X': + case '@': + need_ns_suffix = 1; + break; + default: + need_ns_suffix = 0; + break; + } + } + + if (need_ns_suffix) + { + /* Format the nanoseconds part. Leave a trailing zero to + * discourage people from writing scripts which extract the + * fractional part of the timestamp by using column offsets. + * The reason for discouraging this is that in the future, the + * granularity may not be nanoseconds. + */ + charsprinted = snprintf (ns_buf, NS_BUF_LEN, ".%09ld0", (long int)ts.tv_nsec); + assert (charsprinted < NS_BUF_LEN); + } + else + { + charsprinted = 0; + ns_buf[0] = 0; + } + + if (kind != '@') + { + tm = localtime (&ts.tv_sec); + if (tm) + { + char *s = do_time_format (fmt, tm, ns_buf, charsprinted); + if (s) + return s; + } + } + + /* If we get to here, either the format was %@, or we have fallen back to it + * because strftime failed. + */ + if (1) + { + uintmax_t w = ts.tv_sec; + size_t used, len, remaining; + + /* XXX: note that we are negating an unsigned type which is the + * widest possible unsigned type. + */ + char *p = human_readable (ts.tv_sec < 0 ? -w : w, buf + 1, + human_ceiling, 1, 1); + assert (p > buf); + assert (p < (buf + (sizeof buf))); + if (ts.tv_sec < 0) + *--p = '-'; /* XXX: Ugh, relying on internal details of human_readable(). */ + + /* Add the nanoseconds part. Because we cannot enforce a + * particlar implementation of human_readable, we cannot assume + * any particular value for (p-buf). So we need to be careful + * that there is enough space remaining in the buffer. + */ + if (need_ns_suffix) + { + len = strlen (p); + used = (p-buf) + len; /* Offset into buf of current end */ + assert (sizeof buf > used); /* Ensure we can perform subtraction safely. */ + remaining = sizeof buf - used - 1u; /* allow space for NUL */ + + if (strlen (ns_buf) >= remaining) + { + error (0, 0, + "charsprinted=%ld but remaining=%lu: ns_buf=%s", + (long)charsprinted, (unsigned long)remaining, ns_buf); + } + assert (strlen (ns_buf) < remaining); + strcat (p, ns_buf); + } + return p; + } +} + +static const char *weekdays[] = + { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" + }; +static const char * months[] = + { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; + + +static char * +ctime_format (struct timespec ts) +{ + const struct tm * ptm; +#define TIME_BUF_LEN 1024 + static char resultbuf[TIME_BUF_LEN]; + int nout; + + ptm = localtime (&ts.tv_sec); + if (ptm) + { + assert (ptm->tm_wday >= 0); + assert (ptm->tm_wday < 7); + assert (ptm->tm_mon >= 0); + assert (ptm->tm_mon < 12); + assert (ptm->tm_hour >= 0); + assert (ptm->tm_hour < 24); + assert (ptm->tm_min < 60); + assert (ptm->tm_sec <= 61); /* allows 2 leap seconds. */ + + /* wkday mon mday hh:mm:ss.nnnnnnnnn yyyy */ + nout = snprintf (resultbuf, TIME_BUF_LEN, + "%3s %3s %2d %02d:%02d:%02d.%010ld %04d", + weekdays[ptm->tm_wday], + months[ptm->tm_mon], + ptm->tm_mday, + ptm->tm_hour, + ptm->tm_min, + ptm->tm_sec, + (long int)ts.tv_nsec, + 1900 + ptm->tm_year); + + assert (nout < TIME_BUF_LEN); + return resultbuf; + } + else + { + /* The time cannot be represented as a struct tm. + Output it as an integer. */ + return format_date (ts, '@'); + } +} + +static double +file_sparseness (const struct stat *p) +{ + if (0 == p->st_size) + { + if (0 == ST_NBLOCKS(*p)) + return 1.0; + else + return ST_NBLOCKS(*p) < 0 ? -HUGE_VAL : HUGE_VAL; + } + else + { + double blklen = ST_NBLOCKSIZE * (double)ST_NBLOCKS(*p); + return blklen / p->st_size; + } +} + +static void +checked_fprintf (struct format_val *dest, const char *fmt, ...) +{ + int rv; + va_list ap; + + va_start (ap, fmt); + rv = vfprintf (dest->stream, fmt, ap); + if (rv < 0) + nonfatal_nontarget_file_error (errno, dest->filename); +} + +static void +checked_print_quoted (struct format_val *dest, + const char *format, const char *s) +{ + int rv = print_quoted (dest->stream, dest->quote_opts, dest->dest_is_tty, + format, s); + if (rv < 0) + nonfatal_nontarget_file_error (errno, dest->filename); +} + + +static void +checked_fwrite (void *p, size_t siz, size_t nmemb, struct format_val *dest) +{ + const size_t items_written = fwrite (p, siz, nmemb, dest->stream); + if (items_written < nmemb) + nonfatal_nontarget_file_error (errno, dest->filename); +} + +static void +checked_fflush (struct format_val *dest) +{ + if (0 != fflush (dest->stream)) + { + nonfatal_nontarget_file_error (errno, dest->filename); + } +} + +static const char* +mode_to_filetype (mode_t m) +{ +#define HANDLE_TYPE(t,letter) if (m==t) { return letter; } +#ifdef S_IFREG + HANDLE_TYPE(S_IFREG, "f"); /* regular file */ +#endif +#ifdef S_IFDIR + HANDLE_TYPE(S_IFDIR, "d"); /* directory */ +#endif +#ifdef S_IFLNK + HANDLE_TYPE(S_IFLNK, "l"); /* symbolic link */ +#endif +#ifdef S_IFSOCK + HANDLE_TYPE(S_IFSOCK, "s"); /* Unix domain socket */ +#endif +#ifdef S_IFBLK + HANDLE_TYPE(S_IFBLK, "b"); /* block device */ +#endif +#ifdef S_IFCHR + HANDLE_TYPE(S_IFCHR, "c"); /* character device */ +#endif +#ifdef S_IFIFO + HANDLE_TYPE(S_IFIFO, "p"); /* FIFO */ +#endif +#ifdef S_IFDOOR + HANDLE_TYPE(S_IFDOOR, "D"); /* Door (e.g. on Solaris) */ +#endif + return "U"; /* Unknown */ +} + + + +static void +do_fprintf (struct format_val *dest, + struct segment *segment, + const char *pathname, + const struct stat *stat_buf) +{ + char hbuf[LONGEST_HUMAN_READABLE + 1]; + const char *cp; + + switch (segment->segkind) + { + case KIND_PLAIN: /* Plain text string (no % conversion). */ + /* trusted */ + checked_fwrite(segment->text, 1, segment->text_len, dest); + break; + + case KIND_STOP: /* Terminate argument and flush output. */ + /* trusted */ + checked_fwrite (segment->text, 1, segment->text_len, dest); + checked_fflush (dest); + break; + + case KIND_FORMAT: + switch (segment->format_char[0]) + { + case 'a': /* atime in `ctime' format. */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, ctime_format (get_stat_atime (stat_buf))); + break; + case 'b': /* size in 512-byte blocks */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) ST_NBLOCKS (*stat_buf), + hbuf, human_ceiling, + ST_NBLOCKSIZE, 512)); + break; + case 'c': /* ctime in `ctime' format */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, ctime_format (get_stat_ctime (stat_buf))); + break; + case 'd': /* depth in search tree */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, state.curdepth); + break; + case 'D': /* Device on which file exists (stat.st_dev) */ + /* trusted */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_dev, hbuf, + human_ceiling, 1, 1)); + break; + case 'f': /* base name of path */ + /* sanitised */ + { + char *base = base_name (pathname); + checked_print_quoted (dest, segment->text, base); + free (base); + } + break; + case 'F': /* file system type */ + /* trusted */ + checked_print_quoted (dest, segment->text, filesystem_type (stat_buf, pathname)); + break; + case 'g': /* group name */ + /* trusted */ + /* (well, the actual group is selected by the user but + * its name was selected by the system administrator) + */ + { + struct group *g; + + g = getgrgid (stat_buf->st_gid); + if (g) + { + segment->text[segment->text_len] = 's'; + checked_fprintf (dest, segment->text, g->gr_name); + break; + } + else + { + /* Do nothing. */ + /*FALLTHROUGH*/ + } + } + /*FALLTHROUGH*/ /*...sometimes, so 'G' case.*/ + + case 'G': /* GID number */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_gid, hbuf, + human_ceiling, 1, 1)); + break; + case 'h': /* leading directories part of path */ + /* sanitised */ + { + cp = strrchr (pathname, '/'); + if (cp == NULL) /* No leading directories. */ + { + /* If there is no slash in the pathname, we still + * print the string because it contains characters + * other than just '%s'. The %h expands to ".". + */ + checked_print_quoted (dest, segment->text, "."); + } + else + { + char *s = strdup (pathname); + s[cp - pathname] = 0; + checked_print_quoted (dest, segment->text, s); + free (s); + } + } + break; + + case 'H': /* ARGV element file was found under */ + /* trusted */ + { + char *s = xmalloc (state.starting_path_length+1); + memcpy (s, pathname, state.starting_path_length); + s[state.starting_path_length] = 0; + checked_fprintf (dest, segment->text, s); + free (s); + } + break; + + case 'i': /* inode number */ + /* UNTRUSTED, but not exploitable I think */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_ino, hbuf, + human_ceiling, + 1, 1)); + break; + case 'k': /* size in 1K blocks */ + /* UNTRUSTED, but not exploitable I think */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) ST_NBLOCKS (*stat_buf), + hbuf, human_ceiling, + ST_NBLOCKSIZE, 1024)); + break; + case 'l': /* object of symlink */ + /* sanitised */ +#ifdef S_ISLNK + { + char *linkname = 0; + + if (S_ISLNK (stat_buf->st_mode)) + { + linkname = areadlinkat (state.cwd_dir_fd, state.rel_pathname); + if (linkname == NULL) + { + nonfatal_target_file_error (errno, pathname); + state.exit_status = 1; + } + } + if (linkname) + { + checked_print_quoted (dest, segment->text, linkname); + } + else + { + /* We still need to honour the field width etc., so this is + * not a no-op. + */ + checked_print_quoted (dest, segment->text, ""); + } + free (linkname); + } +#endif /* S_ISLNK */ + break; + + case 'M': /* mode as 10 chars (eg., "-rwxr-x--x" */ + /* UNTRUSTED, probably unexploitable */ + { + char modestring[16] ; + filemodestring (stat_buf, modestring); + modestring[10] = '\0'; + checked_fprintf (dest, segment->text, modestring); + } + break; + + case 'm': /* mode as octal number (perms only) */ + /* UNTRUSTED, probably unexploitable */ + { + /* Output the mode portably using the traditional numbers, + even if the host unwisely uses some other numbering + scheme. But help the compiler in the common case where + the host uses the traditional numbering scheme. */ + mode_t m = stat_buf->st_mode; + bool traditional_numbering_scheme = + (S_ISUID == 04000 && S_ISGID == 02000 && S_ISVTX == 01000 + && S_IRUSR == 00400 && S_IWUSR == 00200 && S_IXUSR == 00100 + && S_IRGRP == 00040 && S_IWGRP == 00020 && S_IXGRP == 00010 + && S_IROTH == 00004 && S_IWOTH == 00002 && S_IXOTH == 00001); + checked_fprintf (dest, segment->text, + (traditional_numbering_scheme + ? m & MODE_ALL + : ((m & S_ISUID ? 04000 : 0) + | (m & S_ISGID ? 02000 : 0) + | (m & S_ISVTX ? 01000 : 0) + | (m & S_IRUSR ? 00400 : 0) + | (m & S_IWUSR ? 00200 : 0) + | (m & S_IXUSR ? 00100 : 0) + | (m & S_IRGRP ? 00040 : 0) + | (m & S_IWGRP ? 00020 : 0) + | (m & S_IXGRP ? 00010 : 0) + | (m & S_IROTH ? 00004 : 0) + | (m & S_IWOTH ? 00002 : 0) + | (m & S_IXOTH ? 00001 : 0)))); + } + break; + + case 'n': /* number of links */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_nlink, + hbuf, + human_ceiling, + 1, 1)); + break; + + case 'p': /* pathname */ + /* sanitised */ + checked_print_quoted (dest, segment->text, pathname); + break; + + case 'P': /* pathname with ARGV element stripped */ + /* sanitised */ + if (state.curdepth > 0) + { + cp = pathname + state.starting_path_length; + if (*cp == '/') + /* Move past the slash between the ARGV element + and the rest of the pathname. But if the ARGV element + ends in a slash, we didn't add another, so we've + already skipped past it. */ + cp++; + } + else + { + cp = ""; + } + checked_print_quoted (dest, segment->text, cp); + break; + + case 's': /* size in bytes */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_size, + hbuf, human_ceiling, 1, 1)); + break; + + case 'S': /* sparseness */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, file_sparseness (stat_buf));; + break; + + case 't': /* mtime in `ctime' format */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + ctime_format (get_stat_mtime (stat_buf))); + break; + + case 'u': /* user name */ + /* trusted */ + /* (well, the actual user is selected by the user on systems + * where chown is not restricted, but the user name was + * selected by the system administrator) + */ + { + struct passwd *p; + + p = getpwuid (stat_buf->st_uid); + if (p) + { + segment->text[segment->text_len] = 's'; + checked_fprintf (dest, segment->text, p->pw_name); + break; + } + /* else fallthru */ + } + /* FALLTHROUGH*/ /* .. to case U */ + + case 'U': /* UID number */ + /* UNTRUSTED, probably unexploitable */ + checked_fprintf (dest, segment->text, + human_readable ((uintmax_t) stat_buf->st_uid, hbuf, + human_ceiling, 1, 1)); + break; + + /* %Y: type of file system entry like `ls -l`: + * (d,-,l,s,p,b,c,n) n=nonexistent (symlink) + */ + case 'Y': /* in case of symlink */ + /* trusted */ + { +#ifdef S_ISLNK + if (S_ISLNK (stat_buf->st_mode)) + { + struct stat sbuf; + /* If we would normally follow links, do not do so. + * If we would normally not follow links, do so. + */ + if ((following_links () ? optionp_stat : optionl_stat) + (state.rel_pathname, &sbuf) != 0) + { + if ( errno == ENOENT ) + { + checked_fprintf (dest, segment->text, "N"); + break; + } + else if ( errno == ELOOP ) + { + checked_fprintf (dest, segment->text, "L"); + break; + } + else + { + checked_fprintf (dest, segment->text, "?"); + error (0, errno, "%s", + safely_quote_err_filename (0, pathname)); + /* exit_status = 1; + return ; */ + break; + } + } + checked_fprintf (dest, segment->text, + mode_to_filetype (sbuf.st_mode & S_IFMT)); + } +#endif /* S_ISLNK */ + else + { + checked_fprintf (dest, segment->text, + mode_to_filetype (stat_buf->st_mode & S_IFMT)); + } + } + break; + + case 'y': + /* trusted */ + { + checked_fprintf (dest, segment->text, + mode_to_filetype (stat_buf->st_mode & S_IFMT)); + } + break; + + case 'Z': /* SELinux security context */ + { + security_context_t scontext; + int rv = (*options.x_getfilecon) (state.cwd_dir_fd, state.rel_pathname, + &scontext); + if (rv < 0) + { + /* If getfilecon fails, there will in the general case + still be some text to print. We just make %Z expand + to an empty string. */ + checked_fprintf (dest, segment->text, ""); + + error (0, errno, _("getfilecon failed: %s"), + safely_quote_err_filename (0, pathname)); + state.exit_status = 1; + } + else + { + checked_fprintf (dest, segment->text, scontext); + freecon (scontext); + } + } + break; + + case 0: + case '%': + checked_fprintf (dest, segment->text); + break; + } + /* end of KIND_FORMAT case */ + break; + } +} + +bool +pred_fprintf (const char *pathname, struct stat *stat_buf, struct predicate *pred_ptr) +{ + struct format_val *dest = &pred_ptr->args.printf_vec; + struct segment *segment; + + for (segment = dest->segment; segment; segment = segment->next) + { + if ( (KIND_FORMAT == segment->segkind) && segment->format_char[1]) /* Component of date. */ + { + struct timespec ts; + int valid = 0; + + switch (segment->format_char[0]) + { + case 'A': + ts = get_stat_atime (stat_buf); + valid = 1; + break; + case 'B': + ts = get_stat_birthtime (stat_buf); + if ('@' == segment->format_char[1]) + valid = 1; + else + valid = (ts.tv_nsec >= 0); + break; + case 'C': + ts = get_stat_ctime (stat_buf); + valid = 1; + break; + case 'T': + ts = get_stat_mtime (stat_buf); + valid = 1; + break; + default: + assert (0); + abort (); + } + /* We trust the output of format_date not to contain + * nasty characters, though the value of the date + * is itself untrusted data. + */ + if (valid) + { + /* trusted */ + checked_fprintf (dest, segment->text, + format_date (ts, segment->format_char[1])); + } + else + { + /* The specified timestamp is not available, output + * nothing for the timestamp, but use the rest (so that + * for example find foo -printf '[%Bs] %p\n' can print + * "[] foo"). + */ + /* trusted */ + checked_fprintf (dest, segment->text, ""); + } + } + else + { + /* Print a segment which is not a date. */ + do_fprintf (dest, segment, pathname, stat_buf); + } + } + return true; +} diff --git a/find/print.h b/find/print.h new file mode 100644 index 0000000..33883c6 --- /dev/null +++ b/find/print.h @@ -0,0 +1,16 @@ +#include "defs.h" + +struct format_val; +struct parser_table; +struct predicate; +struct segment; + +struct segment **make_segment (struct segment **segment, + char *format, int len, + int kind, char format_char, + char aux_format_char, + struct predicate *pred); +bool +insert_fprintf (struct format_val *vec, + const struct parser_table *entry, + char *format); diff --git a/find/sharefile.c b/find/sharefile.c index 1442d7b..8120dff 100644 --- a/find/sharefile.c +++ b/find/sharefile.c @@ -1,5 +1,5 @@ /* sharefile.c -- open files just once. - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,20 +15,24 @@ along with this program. If not, see . */ - +/* config.h always comes first. */ #include +/* system headers. */ +#include #include -#include #include -#include -#include +#include #include +#include -#include "stdio-safer.h" +/* gnulib headers. */ +#include "cloexec.h" #include "hash.h" +#include "stdio-safer.h" + +/* find headers. */ #include "sharefile.h" -#include "cloexec.h" #include "defs.h" diff --git a/find/sharefile.h b/find/sharefile.h index c6ef37d..786cca0 100644 --- a/find/sharefile.h +++ b/find/sharefile.h @@ -1,5 +1,5 @@ /* sharefile.h -- open files just once. - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/find/testsuite/Makefile.am b/find/testsuite/Makefile.am index f8e86ad..0e0ac0a 100644 --- a/find/testsuite/Makefile.am +++ b/find/testsuite/Makefile.am @@ -1,4 +1,4 @@ -AUTOMAKE_OPTIONS=dejagnu +AUTOMAKE_OPTIONS = dejagnu parallel-tests FIND = ../find FINDFLAGS = @@ -84,7 +84,6 @@ find.posix/sv-bug-11175.xo \ find.posix/sv-bug-12181.xo \ find.posix/sv-bug-25359.xo \ find.posix/sv-bug-27563-exec.xo \ -find.posix/depth1.xo \ find.posix/mtime0.xo \ find.posix/sizes.xo \ find.posix/name.xo \ @@ -96,18 +95,11 @@ find.posix/posixnot.xo \ find.posix/prune.xo \ find.posix/prune-result.xo \ find.posix/prune-stat.xo \ -find.posix/sizes.xo \ find.posix/sizetype.xo \ -find.posix/sv-bug-11175.xo \ -find.posix/sv-bug-12181.xo \ find.posix/sv-bug-15235.xo \ find.posix/sv-bug-19613.xo \ -find.posix/typesize.xo \ -find.posix/posixnot.xo \ -find.posix/grouping.xo \ -find.posix/and.xo \ -find.posix/exec-one.xo \ -find.gnu/follow-arg-parent-symlink.xo +find.posix/typesize.xo + EXTRA_DIST_EXP = \ config/unix.exp \ @@ -165,11 +157,11 @@ find.gnu/posix-l.exp \ find.gnu/posix-perminvalid.exp \ find.gnu/printfHdfl.exp \ find.gnu/printf.exp \ -find.gnu/printf.exp \ find.gnu/printf-nonlocal-symlink.exp \ find.gnu/printf-slash.exp \ find.gnu/printf-symlink.exp \ find.gnu/printf-h.exp \ +find.gnu/printf-reserved.exp \ find.gnu/prune-default-print.exp \ find.gnu/regex1.exp \ find.gnu/regex2.exp \ @@ -213,7 +205,6 @@ find.posix/sv-bug-12181.exp \ find.posix/sv-bug-25359.exp \ find.posix/sv-bug-27563-exec.exp \ find.posix/sv-bug-30777.exp \ -find.posix/depth1.exp \ find.posix/sizes.exp \ find.posix/name.exp \ find.posix/nameslash.exp \ @@ -226,32 +217,47 @@ find.posix/prune-result.exp \ find.posix/prune-stat.exp \ find.posix/size-invalid.exp \ find.posix/size-missing.exp \ -find.posix/sizes.exp \ find.posix/sizetype.exp \ find.posix/typearg.exp \ -find.posix/sv-bug-11175.exp \ -find.posix/sv-bug-12181.exp \ find.posix/sv-bug-15235.exp \ find.posix/sv-bug-19605.exp \ find.posix/sv-bug-19613.exp \ find.posix/sv-bug-19617.exp \ find.posix/typesize.exp \ -find.posix/grouping.exp \ -find.posix/and.exp \ -find.posix/exec-one.exp \ find.posix/user-empty.exp \ find.posix/user-missing.exp -EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) +EXTRA_DIST_GOLDEN = \ + test_escapechars.golden + +test_shell_progs = \ +sv-bug-32043.sh \ +test_escapechars.sh \ +test_escape_c.sh \ +test_inode.sh \ +sv-34079.sh \ +sv-34976-execdir-fd-leak.sh + +EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_GOLDEN) \ + $(test_shell_progs) binary_locations.sh checklists.py -CLEANFILES = *.log *.sum site.exp site.bak +CLEANFILES = *.log *.sum site.exp site.bak configured-testfiles.txt #DIST_SUBDIRS = config -checklists: - cd $(srcdir) && \ - ( find config find.gnu find.posix \( -name "*.exp" -o -name "*.xo" \) -print ; \ - ls $(EXTRA_DIST_XO) ; \ - ls $(EXTRA_DIST_EXP) ; ) | \ - sort | uniq -c | awk '$$1 != 2 { print; }' +TESTS = $(test_shell_progs) +TEST_EXTENSIONS = .sh .py + +check-local: checklists + +configured-testfiles.txt: Makefile + @echo Generating $@ + @( cd $(srcdir) && ls $(EXTRA_DIST_XO) && ls $(EXTRA_DIST_EXP) ) >| $@ + +.PHONY: checklists + +checklists: configured-testfiles.txt Makefile + $(PYTHON) $(srcdir)/checklists.py configured-testfiles.txt $(srcdir) config find.gnu find.posix + + diff --git a/find/testsuite/Makefile.in b/find/testsuite/Makefile.in index 86f4bb4..fddef9e 100644 --- a/find/testsuite/Makefile.in +++ b/find/testsuite/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,233 +55,198 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -273,9 +255,127 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir EXPECT = expect RUNTEST = runtest +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +# Restructured Text title and section. +am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//' +am__rst_section = sed 'p;s/./=/g;p;g' +# Put stdin (possibly several lines separated by ". ") in a box. +# Prefix each line by 'col' and terminate each with 'std', for coloring. +# Multi line coloring is problematic with "less -R", so we really need +# to color each line individually. +am__text_box = $(AWK) '{ \ + n = split($$0, lines, "\\. "); max = 0; \ + for (i = 1; i <= n; ++i) \ + if (max < length(lines[i])) \ + max = length(lines[i]); \ + for (i = 0; i < max; ++i) \ + line = line "="; \ + print col line std; \ + for (i = 1; i <= n; ++i) \ + if (lines[i]) \ + print col lines[i] std; \ + print col line std; \ +}' +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log, and passes +# TESTS_ENVIRONMENT. Save and restore TERM around use of +# TESTS_ENVIRONMENT, in case that unsets it. +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +srcdir=$(srcdir); export srcdir; \ +rm -f $@-t; \ +am__trap='rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st'; \ +trap "st=129; $$am__trap" 1; trap "st=130; $$am__trap" 2; \ +trap "st=141; $$am__trap" 13; trap "st=143; $$am__trap" 15; \ +am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ +test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM; \ +$(TESTS_ENVIRONMENT) +# To be appended to the command running the test. Handle the stdout +# and stderr redirection, and catch the exit status. +am__check_post = \ +>$@-t 2>&1; \ +estatus=$$?; \ +if test -n '$(DISABLE_HARD_ERRORS)' \ + && test $$estatus -eq 99; then \ + estatus=1; \ +fi; \ +TERM=$$__SAVED_TERM; export TERM; \ +$(am__tty_colors); \ +xfailed=PASS; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + xfailed=XFAIL;; \ +esac; \ +case $$estatus.$$xfailed in \ + 0.XFAIL) col=$$red; res=XPASS;; \ + 0.*) col=$$grn; res=PASS ;; \ + 77.*) col=$$blu; res=SKIP ;; \ + 99.*) col=$$red; res=FAIL ;; \ + *.XFAIL) col=$$lgn; res=XFAIL;; \ + *.*) col=$$red; res=FAIL ;; \ +esac; \ +echo "$${col}$$res$${std}: $$f"; \ +echo "$$res: $$f (exit: $$estatus)" | \ + $(am__rst_section) >$@; \ +cat $@-t >>$@; \ +rm -f $@-t +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck check-html recheck-html +TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html) +TEST_SUITE_LOG = test-suite.log +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +am__test_logs3 = $(am__test_logs2:.sh.log=.log) +SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS) +TEST_LOGS = $(am__test_logs3:.py.log=.log) +PY_LOG_COMPILE = $(PY_LOG_COMPILER) $(AM_PY_LOG_FLAGS) $(PY_LOG_FLAGS) +TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ @@ -283,6 +383,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -293,6 +395,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -315,59 +418,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -375,6 +525,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -386,12 +538,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -403,10 +570,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -446,49 +629,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -515,6 +738,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -524,7 +749,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -536,8 +762,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -580,26 +808,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -616,17 +866,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -648,19 +908,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -676,6 +952,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -690,8 +972,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -713,30 +1004,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -744,6 +1067,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -751,18 +1075,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -802,18 +1139,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -823,6 +1162,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -833,12 +1174,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -859,6 +1203,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -869,7 +1216,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -877,8 +1226,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -894,7 +1249,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -902,8 +1259,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -925,10 +1288,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -940,19 +1310,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -960,26 +1343,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -997,6 +1410,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1009,11 +1425,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1021,6 +1447,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1028,10 +1455,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1041,10 +1471,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1068,6 +1503,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1075,14 +1511,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1092,6 +1531,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1104,7 +1545,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1145,9 +1588,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1156,7 +1604,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = dejagnu +AUTOMAKE_OPTIONS = dejagnu parallel-tests FIND = ../find FINDFLAGS = DEJATOOL = find @@ -1240,7 +1688,6 @@ find.posix/sv-bug-11175.xo \ find.posix/sv-bug-12181.xo \ find.posix/sv-bug-25359.xo \ find.posix/sv-bug-27563-exec.xo \ -find.posix/depth1.xo \ find.posix/mtime0.xo \ find.posix/sizes.xo \ find.posix/name.xo \ @@ -1252,18 +1699,10 @@ find.posix/posixnot.xo \ find.posix/prune.xo \ find.posix/prune-result.xo \ find.posix/prune-stat.xo \ -find.posix/sizes.xo \ find.posix/sizetype.xo \ -find.posix/sv-bug-11175.xo \ -find.posix/sv-bug-12181.xo \ find.posix/sv-bug-15235.xo \ find.posix/sv-bug-19613.xo \ -find.posix/typesize.xo \ -find.posix/posixnot.xo \ -find.posix/grouping.xo \ -find.posix/and.xo \ -find.posix/exec-one.xo \ -find.gnu/follow-arg-parent-symlink.xo +find.posix/typesize.xo EXTRA_DIST_EXP = \ config/unix.exp \ @@ -1321,11 +1760,11 @@ find.gnu/posix-l.exp \ find.gnu/posix-perminvalid.exp \ find.gnu/printfHdfl.exp \ find.gnu/printf.exp \ -find.gnu/printf.exp \ find.gnu/printf-nonlocal-symlink.exp \ find.gnu/printf-slash.exp \ find.gnu/printf-symlink.exp \ find.gnu/printf-h.exp \ +find.gnu/printf-reserved.exp \ find.gnu/prune-default-print.exp \ find.gnu/regex1.exp \ find.gnu/regex2.exp \ @@ -1369,7 +1808,6 @@ find.posix/sv-bug-12181.exp \ find.posix/sv-bug-25359.exp \ find.posix/sv-bug-27563-exec.exp \ find.posix/sv-bug-30777.exp \ -find.posix/depth1.exp \ find.posix/sizes.exp \ find.posix/name.exp \ find.posix/nameslash.exp \ @@ -1382,27 +1820,39 @@ find.posix/prune-result.exp \ find.posix/prune-stat.exp \ find.posix/size-invalid.exp \ find.posix/size-missing.exp \ -find.posix/sizes.exp \ find.posix/sizetype.exp \ find.posix/typearg.exp \ -find.posix/sv-bug-11175.exp \ -find.posix/sv-bug-12181.exp \ find.posix/sv-bug-15235.exp \ find.posix/sv-bug-19605.exp \ find.posix/sv-bug-19613.exp \ find.posix/sv-bug-19617.exp \ find.posix/typesize.exp \ -find.posix/grouping.exp \ -find.posix/and.exp \ -find.posix/exec-one.exp \ find.posix/user-empty.exp \ find.posix/user-missing.exp -EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) -CLEANFILES = *.log *.sum site.exp site.bak +EXTRA_DIST_GOLDEN = \ + test_escapechars.golden + +test_shell_progs = \ +sv-bug-32043.sh \ +test_escapechars.sh \ +test_escape_c.sh \ +test_inode.sh \ +sv-34079.sh \ +sv-34976-execdir-fd-leak.sh + +EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_GOLDEN) \ + $(test_shell_progs) binary_locations.sh checklists.py + +CLEANFILES = *.log *.sum site.exp site.bak configured-testfiles.txt + +#DIST_SUBDIRS = config +TESTS = $(test_shell_progs) +TEST_EXTENSIONS = .sh .py all: all-am .SUFFIXES: +.SUFFIXES: .html .log .py .py$(EXEEXT) .sh .sh$(EXEEXT) $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -1441,7 +1891,7 @@ CTAGS: check-DEJAGNU: site.exp - srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + srcdir='$(srcdir)'; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ runtest=$(RUNTEST); \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ @@ -1452,20 +1902,27 @@ check-DEJAGNU: site.exp else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi; \ exit $$exit_status -site.exp: Makefile +site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG) @echo 'Making a new site.exp file...' @echo '## these variables are automatically generated by make ##' >site.tmp @echo '# Do not edit here. If you wish to override these values' >>site.tmp @echo '# edit the last section' >>site.tmp - @echo 'set srcdir $(srcdir)' >>site.tmp + @echo 'set srcdir "$(srcdir)"' >>site.tmp @echo "set objdir `pwd`" >>site.tmp @echo 'set build_alias "$(build_alias)"' >>site.tmp @echo 'set build_triplet $(build_triplet)' >>site.tmp @echo 'set host_alias "$(host_alias)"' >>site.tmp @echo 'set host_triplet $(host_triplet)' >>site.tmp - @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp - @test ! -f site.exp || \ - sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \ + echo "## Begin content included from file $$f. Do not modify. ##" \ + && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \ + && echo "## End content included from file $$f. ##" \ + || exit 1; \ + done >> site.tmp + @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp + @if test -f site.exp; then \ + sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \ + fi @-rm -f site.bak @test ! -f site.exp || mv site.exp site.bak @mv site.tmp site.exp @@ -1476,6 +1933,141 @@ distclean-DEJAGNU: rm -f $$tool.sum $$tool.log; \ done +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__sh_e_setup); \ + list='$(TEST_LOGS)'; \ + results=`for f in $$list; do \ + test -r $$f && read line < $$f && echo "$$line" \ + || echo FAIL; \ + done`; \ + all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[ ]*//'`; \ + fail=`echo "$$results" | grep -c '^FAIL'`; \ + pass=`echo "$$results" | grep -c '^PASS'`; \ + skip=`echo "$$results" | grep -c '^SKIP'`; \ + xfail=`echo "$$results" | grep -c '^XFAIL'`; \ + xpass=`echo "$$results" | grep -c '^XPASS'`; \ + failures=`expr $$fail + $$xpass`; \ + all=`expr $$all - $$skip`; \ + if test "$$all" -eq 1; then tests=test; All=; \ + else tests=tests; All="All "; fi; \ + case fail=$$fail:xpass=$$xpass:xfail=$$xfail in \ + fail=0:xpass=0:xfail=0) \ + msg="$$All$$all $$tests passed. "; \ + exit=true;; \ + fail=0:xpass=0:xfail=*) \ + msg="$$All$$all $$tests behaved as expected"; \ + if test "$$xfail" -eq 1; then xfailures=failure; \ + else xfailures=failures; fi; \ + msg="$$msg ($$xfail expected $$xfailures). "; \ + exit=true;; \ + fail=*:xpass=0:xfail=*) \ + msg="$$fail of $$all $$tests failed. "; \ + exit=false;; \ + fail=*:xpass=*:xfail=*) \ + msg="$$failures of $$all $$tests did not behave as expected"; \ + if test "$$xpass" -eq 1; then xpasses=pass; \ + else xpasses=passes; fi; \ + msg="$$msg ($$xpass unexpected $$xpasses). "; \ + exit=false;; \ + *) \ + echo >&2 "incorrect case"; exit 4;; \ + esac; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + msg="$$msg($$skip test was not run). "; \ + else \ + msg="$$msg($$skip tests were not run). "; \ + fi; \ + fi; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + echo "$$msg"; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for f in $$list; do \ + test -r $$f && read line < $$f || line=; \ + case $$line in \ + PASS:*|XFAIL:*);; \ + *) echo; cat $$f;; \ + esac; \ + done; \ + } >$(TEST_SUITE_LOG).tmp; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if test "$$failures" -ne 0; then \ + msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + msg="$${msg}Please report to $(PACKAGE_BUGREPORT). "; \ + fi; \ + fi; \ + test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \ + $(am__tty_colors); \ + if $$exit; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std"; \ + $$exit || exit 1 + +check-TESTS recheck: + @if test $@ != recheck; then \ + list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list; \ + fi + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @list='' list2='$(TEST_LOGS)'; for f in $$list2; do \ + test .log = $$f && continue; \ + if test $@ = recheck; then \ + test -f $$f || continue; \ + if test -r $$f && read line < $$f; then \ + case $$line in FAIL*|XPASS*) : ;; *) continue;; esac; \ + fi; \ + fi; \ + if test -z "$$list"; then list=$$f; else list="$$list $$f"; fi; \ + done; \ + if test $@ = recheck && test -n "$$list"; then \ + $(am__make_dryrun) || rm -f $$list || exit 1; \ + fi; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list" +recheck: + +am--mostlyclean-test-html: + list='$(TEST_LOGS:.log=.html)'; test -z "$$list" || rm -f $$list + rm -f $(TEST_SUITE_HTML) + +.log.html: + @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \ + for r2h in $$list; do \ + if ($$r2h --version) >/dev/null 2>&1; then \ + R2H=$$r2h; \ + fi; \ + done; \ + if test -z "$$R2H"; then \ + echo >&2 "cannot find rst2html, cannot create $@"; \ + exit 2; \ + fi; \ + $$R2H $< >$@.tmp + @mv $@.tmp $@ + +# Be sure to run check first, and then to convert the result. +# Beware of concurrent executions. Run "check" not "check-TESTS", as +# check-SCRIPTS and other dependencies are rebuilt by the former only. +# And expect check to fail. +check-html recheck-html: + @target=`echo $@ | sed 's/-html$$//'`; \ + rv=0; $(MAKE) $(AM_MAKEFLAGS) $$target || rv=$$?; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) TEST_LOGS= || exit 4; \ + exit $$rv +.sh.log: + @p='$<'; $(am__check_pre) $(SH_LOG_COMPILE) "$$tst" $(am__check_post) +@am__EXEEXT_TRUE@.sh$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(SH_LOG_COMPILE) "$$tst" $(am__check_post) +.py.log: + @p='$<'; $(am__check_pre) $(PY_LOG_COMPILE) "$$tst" $(am__check_post) +@am__EXEEXT_TRUE@.py$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(PY_LOG_COMPILE) "$$tst" $(am__check_post) + distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -1507,7 +2099,7 @@ distdir: $(DISTFILES) fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check-TESTS check-local check: check-am all-am: Makefile installdirs: @@ -1521,11 +2113,19 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) @@ -1591,7 +2191,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-generic +mostlyclean-am: am--mostlyclean-test-html mostlyclean-generic pdf: pdf-am @@ -1603,28 +2203,32 @@ ps-am: uninstall-am: -.MAKE: check-am install-am install-strip +.MAKE: check-am check-html install-am install-strip recheck-html -.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ - distclean distclean-DEJAGNU distclean-generic distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am uninstall uninstall-am +.PHONY: all all-am am--mostlyclean-test-html check check-DEJAGNU \ + check-TESTS check-am check-html check-local clean \ + clean-generic distclean distclean-DEJAGNU distclean-generic \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am recheck recheck-html \ + uninstall uninstall-am -#DIST_SUBDIRS = config +check-local: checklists + +configured-testfiles.txt: Makefile + @echo Generating $@ + @( cd $(srcdir) && ls $(EXTRA_DIST_XO) && ls $(EXTRA_DIST_EXP) ) >| $@ + +.PHONY: checklists -checklists: - cd $(srcdir) && \ - ( find config find.gnu find.posix \( -name "*.exp" -o -name "*.xo" \) -print ; \ - ls $(EXTRA_DIST_XO) ; \ - ls $(EXTRA_DIST_EXP) ; ) | \ - sort | uniq -c | awk '$$1 != 2 { print; }' +checklists: configured-testfiles.txt Makefile + $(PYTHON) $(srcdir)/checklists.py configured-testfiles.txt $(srcdir) config find.gnu find.posix # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/find/testsuite/binary_locations.sh b/find/testsuite/binary_locations.sh new file mode 100644 index 0000000..96943a0 --- /dev/null +++ b/find/testsuite/binary_locations.sh @@ -0,0 +1,18 @@ +# Source this file, don't execute it. + +if [[ -z "${testname}" ]]; then + echo 'Please set $testname before sourcing binary_locations.sh.' >&2 + exit 1 +fi + +parent="$(cd .. && pwd)" +if [[ -f "${parent}/ftsfind" ]]; then + ftsfind="${parent}/ftsfind" + oldfind="${parent}/find" +elif [[ -f "${parent}/oldfind" ]]; then + ftsfind="${parent}/find" + oldfind="${parent}/oldfind" +else + echo "Cannot find the executables to test." >&2 + exit 1 +fi diff --git a/find/testsuite/checklists.py b/find/testsuite/checklists.py new file mode 100644 index 0000000..2a2fd10 --- /dev/null +++ b/find/testsuite/checklists.py @@ -0,0 +1,91 @@ +"""Check that the list of test files in Makefile.am is complete and not redundant. + +Usage: + checklists file-listing-configured-files test-root subdir-1-containing-tests [subdir-2-containing-tests ...] +""" + +import os +import os.path +import re +import sys + +def report_unlisted(filename): + sys.stderr.write( + 'Error: test file %s is not listed in Makefile.am but exists on disk.\n' + % (filename,)) + + +def report_missing(filename): + sys.stderr.write( + 'Error: test file %s is listed in Makefile.am but does not exist on disk.\n' + % (filename,)) + +def report_dupe(filename): + sys.stderr.write( + 'Error: test file %s is listed more than once in Makefile.am.\n' + % (filename,)) + + +def report_problems(problem_filenames, reporting_function): + for f in problem_filenames: + reporting_function(f) + return len(problem_filenames) + + +def file_names(listfile_name): + for line in open(listfile_name, 'r').readlines(): + yield line.rstrip('\n') + + +def configured_file_names(listfile_name): + dupes = set() + result = set() + for filename in file_names(listfile_name): + if filename in result: + dupes.add(filename) + else: + result.add(filename) + return dupes, result + + +def find_test_files(roots): + testfile_rx = re.compile(r'\.(exp|xo)$') + for root in roots: + for parent, dirs, files in os.walk(root): + for file_basename in files: + if testfile_rx.search(file_basename): + yield os.path.join(parent, file_basename) + + +class TemporaryWorkingDirectory(object): + + def __init__(self, cwd): + self.new_cwd = cwd + self.old_cwd = os.getcwd() + + def __enter__(self): + os.chdir(self.new_cwd) + + def __exit__(self, *unused_args): + os.chdir(self.old_cwd) + + +def main(args): + if len(args) < 3: + sys.stderr.write(__doc__) + return 1 + dupes, configured = configured_file_names(args[1]) + with TemporaryWorkingDirectory(args[2]): + actual = set(find_test_files(args[3:])) + print '%d test files configured for find, %s files on-disk' % (len(configured), len(actual)) + problem_count = 0 + problem_count += report_problems(dupes, report_dupe) + problem_count += report_problems(configured - actual, report_missing) + problem_count += report_problems(actual - configured, report_unlisted) + if problem_count: + return 1 + else: + return 0 + +if __name__ == '__main__': + sys.exit(main(sys.argv)) diff --git a/find/testsuite/config/unix.exp b/find/testsuite/config/unix.exp index 0c1baff..a1f55c6 100644 --- a/find/testsuite/config/unix.exp +++ b/find/testsuite/config/unix.exp @@ -1,7 +1,7 @@ # -*- TCL -*- # Test-specific TCL procedures required by DejaGNU. -# Copyright (C) 2000, 2003, 2004, 2005, 2006, -# 2010 Free Software Foundation, Inc. +# Copyright (C) 2000, 2003, 2004, 2005, 2006, 2010, 2011 Free Software +# Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/find/testsuite/find.gnu/access.exp b/find/testsuite/find.gnu/access.exp index 867bc80..c6308b9 100644 --- a/find/testsuite/find.gnu/access.exp +++ b/find/testsuite/find.gnu/access.exp @@ -2,7 +2,7 @@ exec rm -rf tmp exec mkdir tmp if { ! [ fs_superuser ] } { - touch tmp/x tmp/w tmp/r tmp/rw tmp/rwx tmp/0 + touch tmp/x tmp/w tmp/r tmp/rw tmp/rwx tmp/0 exec chmod 400 tmp/r exec chmod 200 tmp/w exec chmod 100 tmp/x diff --git a/find/testsuite/find.gnu/deletedir.exp b/find/testsuite/find.gnu/deletedir.exp index 0d849d9..8809747 100644 --- a/find/testsuite/find.gnu/deletedir.exp +++ b/find/testsuite/find.gnu/deletedir.exp @@ -1,7 +1,7 @@ global FTSFIND global FINDFLAGS exec rm -rf tmp -exec mkdir tmp tmp/top +exec mkdir tmp tmp/top proc createdir {} { exec mkdir tmp/top/dir } diff --git a/find/testsuite/find.gnu/deletefile.exp b/find/testsuite/find.gnu/deletefile.exp index 5473a26..552cf67 100644 --- a/find/testsuite/find.gnu/deletefile.exp +++ b/find/testsuite/find.gnu/deletefile.exp @@ -1,7 +1,7 @@ global FTSFIND global FINDFLAGS exec rm -rf tmp -exec mkdir tmp tmp/top +exec mkdir tmp tmp/top proc touchfile {} { exec touch tmp/top/file } diff --git a/find/testsuite/find.gnu/exec-one-rtn-fail.exp b/find/testsuite/find.gnu/exec-one-rtn-fail.exp index 8022585..b761d1d 100644 --- a/find/testsuite/find.gnu/exec-one-rtn-fail.exp +++ b/find/testsuite/find.gnu/exec-one-rtn-fail.exp @@ -1,4 +1,4 @@ -# If -exec \; fails, it should return false. The return -# value of find shoudl stil; be 0, unless another error has +# If -exec \; fails, it should return false. The return +# value of find should stil; be 0, unless another error has # happened. find_start p { /tmp -exec false \; -o \( -printf "yep\n" -quit \) } diff --git a/find/testsuite/find.gnu/execdir-hier.exp b/find/testsuite/find.gnu/execdir-hier.exp index 8b43c55..59d877b 100644 --- a/find/testsuite/find.gnu/execdir-hier.exp +++ b/find/testsuite/find.gnu/execdir-hier.exp @@ -1,4 +1,4 @@ -# tests for -execdir ... \+ +# tests for -execdir ... \+ # Specifically, ensure that output for separate directoires is not mixed. if { [ safe_path ] } { exec rm -rf tmp diff --git a/find/testsuite/find.gnu/execdir-pwd.exp b/find/testsuite/find.gnu/execdir-pwd.exp index 7726f6e..740785f 100644 --- a/find/testsuite/find.gnu/execdir-pwd.exp +++ b/find/testsuite/find.gnu/execdir-pwd.exp @@ -14,7 +14,7 @@ if { [ safe_path ] } { # built up by -execdir in the wrong directory. set SKIP_OLD 1 - find_start p {tmp -name foo -execdir sh ./foo \{\} + } "" + find_start p {tmp -name foo -execdir sh ./foo \{\} + } "" set SKIP_OLD 0 exec rm -rf tmp } diff --git a/find/testsuite/find.gnu/execdir-root-only.exp b/find/testsuite/find.gnu/execdir-root-only.exp index a957e7e..c57fd31 100644 --- a/find/testsuite/find.gnu/execdir-root-only.exp +++ b/find/testsuite/find.gnu/execdir-root-only.exp @@ -1,17 +1,17 @@ # Bug report by Bas van Gompel: -# +# # This appears to work well. However when the rootdir is passed, # something looks fishy: -# +# # find / -mindepth 0 -maxdepth 0 -execdir echo {} \; # .// -# +# # I also spotted, when `+' is used: -# +# # find / -mindepth 0 -maxdepth 0 -execdir echo == {} + # == # == .// -# +# # (Notice the first line of output, which should not be there.) diff --git a/find/testsuite/find.gnu/follow-arg-parent-symlink.exp b/find/testsuite/find.gnu/follow-arg-parent-symlink.exp index 52f374a..0ab9e47 100644 --- a/find/testsuite/find.gnu/follow-arg-parent-symlink.exp +++ b/find/testsuite/find.gnu/follow-arg-parent-symlink.exp @@ -1,5 +1,5 @@ exec rm -rf tmp -exec mkdir tmp tmp/dir1 tmp/dir1/dir2 +exec mkdir tmp tmp/dir1 tmp/dir1/dir2 exec touch tmp/dir1/dir2/foo exec ln -s dir1 tmp/link1 find_start p {tmp/link1/dir2 -type f -print } diff --git a/find/testsuite/find.gnu/ilname.exp b/find/testsuite/find.gnu/ilname.exp index 9b77b6a..2d27617 100644 --- a/find/testsuite/find.gnu/ilname.exp +++ b/find/testsuite/find.gnu/ilname.exp @@ -1,6 +1,6 @@ # tests for -ilname exec rm -rf tmp -exec mkdir tmp +exec mkdir tmp exec touch tmp/one exec ln -s one tmp/two find_start p {tmp -ilname One -print} diff --git a/find/testsuite/find.gnu/lname.exp b/find/testsuite/find.gnu/lname.exp index ada635f..65f8878 100644 --- a/find/testsuite/find.gnu/lname.exp +++ b/find/testsuite/find.gnu/lname.exp @@ -1,6 +1,6 @@ # tests for -lname exec rm -rf tmp -exec mkdir tmp +exec mkdir tmp exec touch tmp/one exec ln -s one tmp/two find_start p {tmp -lname one -print} diff --git a/find/testsuite/find.gnu/perm-slash.exp b/find/testsuite/find.gnu/perm-slash.exp index a5be0ab..252d91a 100644 --- a/find/testsuite/find.gnu/perm-slash.exp +++ b/find/testsuite/find.gnu/perm-slash.exp @@ -1,8 +1,8 @@ # tests for -perm /nnn # The slash is a GNU extension -exec rm -rf tmp -exec mkdir tmp +exec rm -rf tmp +exec mkdir tmp ## set up a selection of test files foreach perm { 400 200 555 700 000 050 } { @@ -10,10 +10,10 @@ foreach perm { 400 200 555 700 000 050 } { exec chmod $perm "tmp/$perm" } -# +# # The -o operator normally has a short-circuit effect, # so we have to use "-exec false \;" to make sure that # all the parenthesised expression actually fail. -# +# find_start p {tmp -mindepth 1 -perm /555 -printf "p/555 %p\n" } # exec rm -rf tmp tmp2 diff --git a/find/testsuite/find.gnu/posix-h.exp b/find/testsuite/find.gnu/posix-h.exp index 4023b25..0ecbabe 100644 --- a/find/testsuite/find.gnu/posix-h.exp +++ b/find/testsuite/find.gnu/posix-h.exp @@ -6,8 +6,8 @@ exec mkdir tmp exec ln -s /etc/passwd tmp/LINK exec ln -s /NOSUCHFILE tmp/BROKEN -# If the file is not on the command line, the link is not +# If the file is not on the command line, the link is not # dereferenced, and so tmp/LINK should appear at depth 1 -# but as type "l". tmp itself appears first at depth 0 as +# but as type "l". tmp itself appears first at depth 0 as # a directory. find_start p { -H tmp/LINK tmp/BROKEN tmp -printf "H1: %y %d %p\n" } diff --git a/find/testsuite/find.gnu/printf-reserved.exp b/find/testsuite/find.gnu/printf-reserved.exp new file mode 100644 index 0000000..3072312 --- /dev/null +++ b/find/testsuite/find.gnu/printf-reserved.exp @@ -0,0 +1,3 @@ +find_start f { . -maxdepth 0 -printf '%(' } +find_start f { . -maxdepth 0 -printf '%\{' } +find_start f { . -maxdepth 0 -printf '%\[' } diff --git a/find/testsuite/find.gnu/printf.exp b/find/testsuite/find.gnu/printf.exp index c504d85..ba8e75b 100644 --- a/find/testsuite/find.gnu/printf.exp +++ b/find/testsuite/find.gnu/printf.exp @@ -2,5 +2,5 @@ exec rm -rf tmp exec mkdir tmp exec touch tmp/file exec chmod 600 tmp/file -find_start p {tmp -type f -printf "a %d\n" -printf "b %f\n" -printf "c %h\n" -printf "d %H\n" -printf "e %l\n" -printf "f %m\n" -printf "g %n\n" -printf "h %p\n" -printf "i %P\n" -printf "j %y\n" -printf "k %Y\n"} +find_start p {tmp -type f -printf "a %d\n" -printf "b %f\n" -printf "c %h\n" -printf "d %H\n" -printf "e %l\n" -printf "f %m\n" -printf "g %n\n" -printf "h %p\n" -printf "i %P\n" -printf "j %y\n" -printf "k %Y\n" -printf "percent it%%works%%\n" -printf "string-right !%10p!\n" -printf "string-left !%-10p!\n" -printf "trunc-R !%10.6p!\n" -printf "trunc-L !%-10.6p!\n" -printf "a5 !%5d!\n" -printf "a05 !%05d!\n" -printf "a+ %+d\n" } exec rm -rf tmp diff --git a/find/testsuite/find.gnu/printf.xo b/find/testsuite/find.gnu/printf.xo index 4eda7e3..e607293 100644 --- a/find/testsuite/find.gnu/printf.xo +++ b/find/testsuite/find.gnu/printf.xo @@ -1,4 +1,7 @@ a 1 +a+ +1 +a5 ! 1! +a05 !00001! b file c tmp d tmp @@ -9,3 +12,8 @@ h tmp/file i file j f k f +percent it%works% +string-left !tmp/file ! +string-right ! tmp/file! +trunc-L !tmp/fi ! +trunc-R ! tmp/fi! diff --git a/find/testsuite/find.gnu/sv-bug-17782.exp b/find/testsuite/find.gnu/sv-bug-17782.exp index 6771f28..db6dba2 100644 --- a/find/testsuite/find.gnu/sv-bug-17782.exp +++ b/find/testsuite/find.gnu/sv-bug-17782.exp @@ -1,9 +1,9 @@ # Savannah bug #17782. # While -execdir echo blah {} works, -execdir echo "blah {}" doesn't. -# The bug is that the ./ prefix is prepended to the argument containing the -# braces, not to the expansion of the braces, so you get output like +# The bug is that the ./ prefix is prepended to the argument containing the +# braces, not to the expansion of the braces, so you get output like # ./blah foo -# instead of +# instead of # blah ./foo # if { [ safe_path ] } { diff --git a/find/testsuite/find.gnu/sv-bug-24169.exp b/find/testsuite/find.gnu/sv-bug-24169.exp index 349e823..120a18b 100644 --- a/find/testsuite/find.gnu/sv-bug-24169.exp +++ b/find/testsuite/find.gnu/sv-bug-24169.exp @@ -2,7 +2,7 @@ # # The command: # find -neweraa -# is not valid because there is a missing argument. +# is not valid because there is a missing argument. # The result should be a clean exit with nonzero status. # However, it segfaults in 4.4.0. # @@ -15,11 +15,11 @@ if {[which $FTSFIND] == 0} then { set scriptname [info script] set testbase [file rootname $scriptname] -set test [file tail $testbase] +set test [file tail $testbase] set testname "$test.generic" set cmd "$FTSFIND -neweraa" -set expected 1 +set expected 1 send_log "$cmd\n" eval spawn -noecho $cmd @@ -31,17 +31,17 @@ if { [ lindex $result 2 ] == 0 } then { set status [ lindex $result 3] if { [llength $result] > 4 } then { if { [lindex $result 4] == "CHILDKILLED" } then { - fail "$testname, $cmd was killed: [lrange $result 5 end]" + fail "$testname, $cmd was killed: [lrange $result 5 end]" } else { - unresolved "$testname, $cmd had unexpected extended status $result" + unresolved "$testname, $cmd had unexpected extended status $result" } } else { if { $status != 1 } then { - unresolved "$testname, $cmd had unexpected status $status" + unresolved "$testname, $cmd had unexpected status $status" } else { pass "$testname" } } } else { - unresolved "$testname, failed to run $cmd" + unresolved "$testname, failed to run $cmd" } diff --git a/find/testsuite/find.gnu/used-invarg.exp b/find/testsuite/find.gnu/used-invarg.exp index be5eed1..966341f 100644 --- a/find/testsuite/find.gnu/used-invarg.exp +++ b/find/testsuite/find.gnu/used-invarg.exp @@ -1,2 +1,2 @@ -# tests for invalid argument to -used +# tests for invalid argument to -used find_start f {. -used ZZ} diff --git a/find/testsuite/find.gnu/used-missing.exp b/find/testsuite/find.gnu/used-missing.exp index b8b8674..6218433 100644 --- a/find/testsuite/find.gnu/used-missing.exp +++ b/find/testsuite/find.gnu/used-missing.exp @@ -1,2 +1,2 @@ -# tests for missing argument to -used +# tests for missing argument to -used find_start f {. -used } diff --git a/find/testsuite/find.posix/bracket-depth.exp b/find/testsuite/find.posix/bracket-depth.exp index e748f06..8ebadcd 100644 --- a/find/testsuite/find.posix/bracket-depth.exp +++ b/find/testsuite/find.posix/bracket-depth.exp @@ -1,4 +1,4 @@ exec rm -rf tmp exec mkdir tmp -# shoud not result in a fatal error. +# shoud not result in a fatal error. find_start p { tmp \( -depth \) -false -print } diff --git a/find/testsuite/find.posix/files-not-expressions1.exp b/find/testsuite/find.posix/files-not-expressions1.exp index b1de3ac..b54ff8c 100644 --- a/find/testsuite/find.posix/files-not-expressions1.exp +++ b/find/testsuite/find.posix/files-not-expressions1.exp @@ -2,7 +2,7 @@ set files "\(1 " foreach file $files { touch $file } -# shoud not result in a fatal error. +# shoud not result in a fatal error. find_start p { \(1 } foreach file $files { file delete -- $file } diff --git a/find/testsuite/find.posix/files-not-expressions2.exp b/find/testsuite/find.posix/files-not-expressions2.exp index e6dcef2..b699a24 100644 --- a/find/testsuite/find.posix/files-not-expressions2.exp +++ b/find/testsuite/find.posix/files-not-expressions2.exp @@ -2,7 +2,7 @@ set files "!2" foreach file $files { touch $file } -# shoud not result in a fatal error. +# shoud not result in a fatal error. find_start p { !2 } foreach file $files { file delete -- $file } diff --git a/find/testsuite/find.posix/files-not-expressions3.exp b/find/testsuite/find.posix/files-not-expressions3.exp index 4bd454b..96749e0 100644 --- a/find/testsuite/find.posix/files-not-expressions3.exp +++ b/find/testsuite/find.posix/files-not-expressions3.exp @@ -2,7 +2,7 @@ set files "\)" foreach file $files { touch $file } -# shoud not result in a fatal error. +# shoud not result in a fatal error. find_start p { \) } foreach file $files { file delete -- $file } diff --git a/find/testsuite/find.posix/nameslash.exp b/find/testsuite/find.posix/nameslash.exp index 1aaf220..a8b91ab 100644 --- a/find/testsuite/find.posix/nameslash.exp +++ b/find/testsuite/find.posix/nameslash.exp @@ -1,6 +1,6 @@ # tests for -name and trailing slashes. # See http://www.opengroup.org/austin/interps/uploads/40/14959/AI-186.txt -# This is a test for Savannah bug #20970. +# This is a test for Savannah bug #20970. exec rm -rf tmp exec mkdir tmp tmp/foo tmp/bar find_start p {tmp/foo/// tmp/bar/// -name foo -o -name 'bar?*'} diff --git a/find/testsuite/find.posix/perm-vanilla.exp b/find/testsuite/find.posix/perm-vanilla.exp index c6b551f..d4b9f78 100644 --- a/find/testsuite/find.posix/perm-vanilla.exp +++ b/find/testsuite/find.posix/perm-vanilla.exp @@ -1,6 +1,6 @@ # tests for -perm -exec rm -rf tmp -exec mkdir tmp +exec rm -rf tmp +exec mkdir tmp ## set up a selection of test files foreach perm { 400 555 700 } { @@ -9,10 +9,10 @@ foreach perm { 400 555 700 } { } exec ls -l tmp -# +# # The -o operator normally has a short-circuit effect, # so we have to use "-exec false \;" to make sure that # all the parenthesised expression actually fail. -# +# find_start p {tmp/400 tmp/555 tmp/700 \( -perm 400 -exec echo p400 \{\} \; -exec false \; \) -o \( -perm -400 -exec echo p-400 \{\} \; -exec false \; \) } # exec rm -rf tmp tmp2 diff --git a/find/testsuite/find.posix/sizes.exp b/find/testsuite/find.posix/sizes.exp index 1fdea48..272498e 100644 --- a/find/testsuite/find.posix/sizes.exp +++ b/find/testsuite/find.posix/sizes.exp @@ -2,14 +2,14 @@ exec rm -rf tmp exec mkdir tmp exec true > tmp/0-bytes -exec dd if=/dev/zero bs=1 count=511 of=tmp/511-bytes > /dev/null 2>/dev/null -exec dd if=/dev/zero bs=1 count=512 of=tmp/512-bytes > /dev/null 2>/dev/null -exec dd if=/dev/zero bs=1 count=513 of=tmp/513-bytes > /dev/null 2>/dev/null -exec dd if=/dev/zero bs=1 count=1024 of=tmp/1024-bytes > /dev/null 2>/dev/null +exec dd if=/dev/zero bs=1 count=511 of=tmp/511-bytes > /dev/null 2>/dev/null +exec dd if=/dev/zero bs=1 count=512 of=tmp/512-bytes > /dev/null 2>/dev/null +exec dd if=/dev/zero bs=1 count=513 of=tmp/513-bytes > /dev/null 2>/dev/null +exec dd if=/dev/zero bs=1 count=1024 of=tmp/1024-bytes > /dev/null 2>/dev/null find_start p {tmp -mindepth 1 ( -size -1 -printf "A size -1: %s %p\n" ) , ( -size 1 -printf "B size 1: %s %p\n" ) , ( -size +1 -printf "C size +1: %s %p\n" ) , ( -size -2 -printf "G size -2: %s %p\n" ) , ( -size 2 -printf "H size 2: %s %p\n" ) , ( -size +2 -printf "I size +2: %s %p\n" ) } -# ( -size =1 -printf "E size =1: %s %p\n" ) +# ( -size =1 -printf "E size =1: %s %p\n" ) # ( -size >1 -printf "F size >1: %s %p\n" ) , # ( -size <2 -printf "J size <2: %s %p\n" ) , # ( -size =2 -printf "K size =2: %s %p\n" ) , -# ( -size >2 -printf "L size >2: %s %p\n" ) +# ( -size >2 -printf "L size >2: %s %p\n" ) exec rm -rf tmp diff --git a/find/testsuite/find.posix/sv-bug-25359.exp b/find/testsuite/find.posix/sv-bug-25359.exp index 84231d0..6bfb715 100644 --- a/find/testsuite/find.posix/sv-bug-25359.exp +++ b/find/testsuite/find.posix/sv-bug-25359.exp @@ -1,7 +1,7 @@ # Test for Savannah bug 25359 # (ftsfind -H thinks that non-argument symlinks are files) # Affecting findutils -# from acb82fe44369c108b43ec3e805aa94bf28352d0a +# from acb82fe44369c108b43ec3e805aa94bf28352d0a # to 0b1acd3358466b02f32baf9423665113dc933492 exec rm -rf tmp exec mkdir tmp diff --git a/find/testsuite/find.posix/typesize.exp b/find/testsuite/find.posix/typesize.exp index 596b2da..cf91c00 100644 --- a/find/testsuite/find.posix/typesize.exp +++ b/find/testsuite/find.posix/typesize.exp @@ -1,4 +1,4 @@ -# tests for -type -size +# tests for -type -size exec rm -rf tmp exec mkdir tmp exec true > tmp/empty diff --git a/find/testsuite/sv-34079.sh b/find/testsuite/sv-34079.sh new file mode 100755 index 0000000..5773a3f --- /dev/null +++ b/find/testsuite/sv-34079.sh @@ -0,0 +1,79 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This test verifies that find does not have excessive memory consumption +# even for large directories. It's not executed by default; it will only +# run if the environment variable RUN_VERY_EXPENSIVE_TESTS is set. + +testname="$(basename $0)" + +. "${srcdir}"/binary_locations.sh + +make_test_data() { + d="$1" + ( + cd "$1" && echo "Creating test data in $(pwd -P)" >&2 || exit 1 + max=400 + for i in $(seq 0 400) + do + printf "\r%03d/%03d" $i $max >&2 + for j in $(seq 0 10000) + do + printf "%03d_%04d " $i $j + done + done | xargs sh -c 'touch "$@" || exit 255' fnord || exit 1 + printf "\rTest files created.\n" >&2 + ) +} + + +if [[ -n "${RUN_VERY_EXPENSIVE_TESTS}" ]]; then + if outdir=$(mktemp -d); then + # Create some test files. + bad="" + printf "Generating test data in %s (this may take some time...):\n" \ + "${outdir}" >&2 + if make_test_data "${outdir}"; then + # We don't check oldfind, as it uses savedir, meaning that + # it stores all the directory entries. Hence the excessive + # memory consumption bug applies to oldfind even though it is + # not using fts. + for exe in "${ftsfind}" "${oldfind}"; do + echo "Checking memory consumption of ${exe}..." >&2 + if ( ulimit -v 50000 && ${exe} "${outdir}" >/dev/null; ); then + echo "Memory consumption of ${exe} is reasonable" >&2 + else + bad="${bad}${bad:+\n}Memory consumption of ${exe} is too high" + fi + done + else + bad="failed to set up the test in ${outdir}" + fi + rm -rf "${outdir}" || exit 1 + if [[ -n "${bad}" ]]; then + echo "${bad}" >&2 + exit 1 + fi + else + echo "FAIL: could not create a test output file." >&2 + exit 1 + fi +else + echo "${testname} was not run because" '${RUN_VERY_EXPENSIVE_TESTS}' \ + "is unset." +fi + diff --git a/find/testsuite/sv-34976-execdir-fd-leak.sh b/find/testsuite/sv-34976-execdir-fd-leak.sh new file mode 100755 index 0000000..c57a04c --- /dev/null +++ b/find/testsuite/sv-34976-execdir-fd-leak.sh @@ -0,0 +1,80 @@ +#! /bin/sh +# Copyright (C) 2013 Free Software Foundation, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# This test verifies that find does not leak a file descriptor for the working +# directory specified by the -execdir option [Savannah bug #34976]. + +testname="$(basename $0)" + +. "${srcdir}"/binary_locations.sh + +# seq is not required by POSIX, so we have manual lists of number here instead. +three_to_thirty_five="3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35" +three_to_hundred="3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100" + +# Test if restricting the number of file descriptors via ulimit -n works. +# We always try to open 33 files (but the ulimit -n value changes). +test_ulimit() { + l="$1" # limit to use + ( + ulimit -n "$l" || exit 1 + for i in ${three_to_thirty_five} ; do + printf "exec %d> /dev/null || exit 1\n" $i + done | sh -x ; + ) 2>/dev/null +} +# Opening 33 files with a limit of 50 should work. +test_ulimit 40 || { echo "SKIP: ulimit does not work (case 1)" >&2; exit 0 ; } +# Opening 33 files with a limit of 20 should fail. +test_ulimit 20 && { echo "SKIP: ulimit does not work (case 2)" >&2; exit 0 ; } + +die() { + echo "$@" >&2 + exit 1 +} + +# Create test files, each 98 in the directories ".", "one" and "two". +make_test_data() { + d="$1" + ( + cd "$1" || exit 1 + mkdir one two || exit 1 + for i in ${three_to_hundred} ; do + printf "./%03d one/%03d two/%03d " $i $i $i + done \ + | xargs touch || exit 1 + ) \ + || die "failed to set up the test in ${outdir}" +} + +outdir="$(mktemp -d)" || die "FAIL: could not create a test files." + +# Create some test files. +make_test_data "${outdir}" || die "FAIL: failed to set up the test in ${outdir}" + +fail=0 +for exe in "${ftsfind}" "${oldfind}"; do + ( ulimit -n 30 && \ + ${exe} "${outdir}" -type f -execdir cat '{}' \; >/dev/null; ) \ + || { \ + echo "Option -execdir of ${exe} leaks file descriptors" >&2 ; \ + fail=1 ; \ + } +done + +rm -rf "${outdir}" || exit 1 +exit $fail diff --git a/find/testsuite/sv-bug-32043.sh b/find/testsuite/sv-bug-32043.sh new file mode 100755 index 0000000..0e5002f --- /dev/null +++ b/find/testsuite/sv-bug-32043.sh @@ -0,0 +1,33 @@ +#! /bin/sh +testname="$(basename $0)" + +parent="$(cd .. && pwd)" +if [ -f "${parent}/ftsfind" ]; then + ftsfind="${parent}/ftsfind" + oldfind="${parent}/find" +elif [ -f "${parent}/oldfind" ]; then + ftsfind="${parent}/find" + oldfind="${parent}/oldfind" +else + echo "Cannot find the executables to test." >&2 + exit 1 +fi +if tstdir=$(mktemp -d); then + touch "$tstdir/[" + expected="$tstdir/[" + for executable in "$oldfind" "$ftsfind"; do + if result=$("$executable" "$tstdir" -name '[' -print); then + if ! [ "$result" = "$expected" ]; then + echo "FAIL: $testname with $executable returned '$result' but '$expected' was expected" >&2 + exit 1 + fi + else + echo "FAIL: $executable returned $?" >&2 + exit 1 + fi + done + rm -rf "$tstdir" +else + echo "FAIL: could not create a test directory." >&2 + exit 1 +fi diff --git a/find/testsuite/test_escape_c.sh b/find/testsuite/test_escape_c.sh new file mode 100755 index 0000000..c561c5d --- /dev/null +++ b/find/testsuite/test_escape_c.sh @@ -0,0 +1,27 @@ +#! /bin/sh +testname="$(basename $0)" + +. "${srcdir}"/binary_locations.sh + +goldenfile="${srcdir}/test_escapechars.golden" +expected='hello^.^world' + +for executable in "$oldfind" "$ftsfind" +do + if result="$($executable . -maxdepth 0 \ + -printf 'hello^\cthere' \ + -exec printf %s {} \; \ + -printf '^world\n' )"; then + if [[ "${result}" != "${expected}" ]]; then + exec >&2 + echo "$executable produced incorrect output:" + echo "${result}" + echo "Expected output was:" + echo "${expected}" + exit 1 + fi + else + echo "$executable returned $?" >&2 + exit 1 + fi +done diff --git a/find/testsuite/test_escapechars.golden b/find/testsuite/test_escapechars.golden new file mode 100644 index 0000000..c5cd8ed --- /dev/null +++ b/find/testsuite/test_escapechars.golden @@ -0,0 +1,13 @@ +OCTAL1:  +OCTAL2:  +OCTAL3:  +OCTAL4: 4 +OCTAL8: 8 +BEL:  +CR: +FF: +TAB: +VTAB: +BS:  +BACKSLASH: \ +UNKNOWN: \z diff --git a/find/testsuite/test_escapechars.sh b/find/testsuite/test_escapechars.sh new file mode 100755 index 0000000..54556d5 --- /dev/null +++ b/find/testsuite/test_escapechars.sh @@ -0,0 +1,44 @@ +#! /bin/sh +testname="$(basename $0)" + +. "${srcdir}"/binary_locations.sh + +goldenfile="${srcdir}/test_escapechars.golden" + +if outfile=$(mktemp); then + for executable in "$oldfind" "$ftsfind" + do + if "$executable" . -maxdepth 0 \ + -printf 'OCTAL1: \1\n' \ + -printf 'OCTAL2: \02\n' \ + -printf 'OCTAL3: \003\n' \ + -printf 'OCTAL4: \0044\n' \ + -printf 'OCTAL8: \0028\n' \ + -printf 'BEL: \a\n' \ + -printf 'CR: \r\n' \ + -printf 'FF: \f\n' \ + -printf 'TAB: \t\n' \ + -printf 'VTAB: \v\n' \ + -printf 'BS: \b\n' \ + -printf 'BACKSLASH: \\\n' \ + -printf 'UNKNOWN: \z\n' \ + >| "${outfile}" 2>/dev/null; then + if cmp "${outfile}" "${goldenfile}"; then + rm "${outfile}" + else + exec >&2 + echo "FAIL: $executable produced incorrect output:" + od -c "${outfile}" + echo "Expected output was:" + od -c "${goldenfile}" + exit 1 + fi + else + echo "FAIL: $executable returned $?" >&2 + exit 1 + fi + done +else + echo "FAIL: could not create a test output file." >&2 + exit 1 +fi diff --git a/find/testsuite/test_inode.sh b/find/testsuite/test_inode.sh new file mode 100755 index 0000000..ed422c8 --- /dev/null +++ b/find/testsuite/test_inode.sh @@ -0,0 +1,51 @@ +#! /bin/sh +# +# Essentially this test verifies that ls -i and find -printf %i produce +# the same output. + +testname="$(basename $0)" + +. "${srcdir}"/binary_locations.sh + +make_canonical() { + sed -e 's/ /_/g' +} + +test_percent_i() { + if "${executable}" "${tmpfile}" -printf '%i_%p\n' | + make_canonical >| "${outfile}"; then + cmp "${outfile}" "${goldfile}" || { + exec >&2 + cat <| "${goldfile}" + + if outfile=$(mktemp); then + for executable in "${oldfind}" "${ftsfind}" + do + test_percent_i + done + rm -f "${outfile}" + fi + rm -f "${goldfile}" + fi + rm -f "${tmpfile}" +fi + + + diff --git a/find/tree.c b/find/tree.c index 88b6be9..026dead 100644 --- a/find/tree.c +++ b/find/tree.c @@ -1,6 +1,6 @@ /* tree.c -- helper functions to build and evaluate the expression tree. Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005, - 2006, 2007, 2010 Free Software Foundation, Inc. + 2006, 2007, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,16 +16,21 @@ along with this program. If not, see . */ +/* config.h must always come first. */ #include -#include "defs.h" +/* system headers. */ #include #include -#include -#include "xalloc.h" +/* gnulib headers. */ #include "error.h" +#include "fnmatch.h" +#include "gettext.h" +#include "xalloc.h" +/* find headers. */ +#include "defs.h" #if ENABLE_NLS # include @@ -112,7 +117,7 @@ matches_start_point (const char *glob, bool foldcase) expression, which really is the expression that should be handed to our caller, so get_expr recurses. */ -struct predicate * +static struct predicate * get_expr (struct predicate **input, short int prev_prec, const struct predicate* prev_pred) @@ -584,18 +589,18 @@ consider_arm_swap (struct predicate *p) { want_swap = succ_rate_r < succ_rate_l; if (!want_swap) - reason = "Operation is OR and right success rate >= left"; + reason = "Operation is OR; right success rate >= left"; } else if (pred_is (p, pred_and)) { want_swap = succ_rate_r > succ_rate_l; if (!want_swap) - reason = "Operation is AND and right success rate <= left"; + reason = "Operation is AND; right success rate <= left"; } else { want_swap = false; - reason = "Not AND or OR"; + reason = "Not 'AND' or 'OR'"; } } else @@ -672,10 +677,10 @@ do_arm_swaps (struct predicate *p) tests likely to succeed at the front of the list. For AND, we prefer tests likely to fail at the front of the list. - This routine "normalizes" the predicate tree by ensuring that - all expression predicates have AND (or OR or COMMA) parent nodes - which are linked along the left edge of the expression tree. - This makes manipulation of subtrees easier. + This routine "normalizes" the predicate tree by ensuring that all + expression predicates have 'AND' (or 'OR' or 'COMMA') parent + nodes which are linked along the left edge of the expression + tree. This makes manipulation of subtrees easier. EVAL_TREEP points to the root pointer of the predicate tree to be rearranged. opt_expr may return a new root pointer there. @@ -815,8 +820,9 @@ opt_expr (struct predicate **eval_treep) break; case BI_OP: - /* For nested AND or OR, recurse (AND/OR form layers on the left of - the tree), and continue scanning this level of AND or OR. */ + /* For nested 'AND' or 'OR', recurse (AND/OR form layers on + the left of the tree), and continue scanning this level + of 'AND' or 'OR'. */ curr->pred_right->side_effects = opt_expr (&curr->pred_right); break; @@ -1220,8 +1226,8 @@ calculate_derived_rates (struct predicate *p) } /* opt_expr() rearranges predicates such that each left subtree is - * rooted at a logical predicate (e.g. and or or). check_normalization() - * asserts that this property still holds. + * rooted at a logical predicate (e.g. '-a' or '-o'). + * check_normalization() asserts that this property still holds. * */ static void @@ -1446,7 +1452,7 @@ build_expression_tree (int argc, char *argv[], int end_of_leading_options) return eval_tree; } -/* Initialise the performance data for a predicate. +/* Initialize the performance data for a predicate. */ static void init_pred_perf (struct predicate *pred) @@ -1577,7 +1583,7 @@ get_new_pred_chk_op (const struct parser_table *entry, struct cost_assoc { enum EvaluationCost cost; - char *name; + const char *name; }; struct cost_assoc cost_table[] = { @@ -1597,7 +1603,7 @@ struct cost_assoc cost_table[] = struct prec_assoc { short prec; - char *prec_name; + const char *prec_name; }; static struct prec_assoc prec_table[] = @@ -1614,7 +1620,7 @@ static struct prec_assoc prec_table[] = struct op_assoc { short type; - char *type_name; + const char *type_name; }; static struct op_assoc type_table[] = @@ -1641,28 +1647,26 @@ cost_name (enum EvaluationCost cost) } -static char * -type_name (type) - short type; +static const char * +type_name (short type) { int i; for (i = 0; type_table[i].type != (short) -1; i++) if (type_table[i].type == type) break; - return (type_table[i].type_name); + return type_table[i].type_name; } -static char * -prec_name (prec) - short prec; +static const char * +prec_name (short prec) { int i; for (i = 0; prec_table[i].prec != (short) -1; i++) if (prec_table[i].prec == prec) break; - return (prec_table[i].prec_name); + return prec_table[i].prec_name; } diff --git a/find/util.c b/find/util.c index 8577396..d603fc7 100644 --- a/find/util.c +++ b/find/util.c @@ -1,6 +1,6 @@ /* util.c -- functions for initializing new tree elements, and other things. - Copyright (C) 1990, 91, 92, 93, 94, 2000, 2003, 2004, 2005, - 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005, + 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,30 +16,34 @@ along with this program. If not, see . */ +/* config.h must always come first. */ #include -#include "defs.h" -#include -#ifdef HAVE_SYS_UTSNAME_H -#include -#endif -#include -#include /* for fstatat() */ +/* system headers. */ +#include #include -#include -#include #include -#include +#include +#include +#include +#include /* for fstatat() */ +#include +#include +/* gnulib headers. */ +#include "error.h" +#include "fdleak.h" +#include "gettext.h" #include "progname.h" #include "quotearg.h" +#include "save-cwd.h" #include "timespec.h" -#include "error.h" #include "verify.h" -#include "fdleak.h" -#include "dircallback.h" #include "xalloc.h" -#include "save-cwd.h" + +/* find headers. */ +#include "defs.h" +#include "dircallback.h" #if ENABLE_NLS @@ -142,7 +146,7 @@ insert_primary_noarg (const struct parser_table *entry) static void show_valid_debug_options (FILE *fp, int full) { - int i; + size_t i; if (full) { fprintf (fp, "Valid arguments for -D:\n"); @@ -189,6 +193,10 @@ set_stat_placeholders (struct stat *p) #endif #if HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_SEC p->st_birthtimespec.tv_sec = 0; +#else + /* Avoid pointless compiler warning about unused parameters if none of these + macros are set to nonzero values. */ + (void) p; #endif } diff --git a/gnulib/Makefile.am b/gl/Makefile.am similarity index 100% rename from gnulib/Makefile.am rename to gl/Makefile.am diff --git a/gl/Makefile.in b/gl/Makefile.in new file mode 100644 index 0000000..3f3363a --- /dev/null +++ b/gl/Makefile.in @@ -0,0 +1,1888 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in 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 program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = gl +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +pkglibexecdir = @pkglibexecdir@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +AWK = @AWK@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIG_INCLUDE = @CONFIG_INCLUDE@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_ARG_SIZE = @DEFAULT_ARG_SIZE@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ +EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ +ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ +ENOLINK_VALUE = @ENOLINK_VALUE@ +EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ +EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ +ERRNO_H = @ERRNO_H@ +EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FLOAT_H = @FLOAT_H@ +FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ +GETOPT_H = @GETOPT_H@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ +GNULIB_ACOSL = @GNULIB_ACOSL@ +GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ +GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ +GNULIB_ATANL = @GNULIB_ATANL@ +GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ +GNULIB_BTOWC = @GNULIB_BTOWC@ +GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ +GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ +GNULIB_CEIL = @GNULIB_CEIL@ +GNULIB_CEILF = @GNULIB_CEILF@ +GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ +GNULIB_COSL = @GNULIB_COSL@ +GNULIB_DIRFD = @GNULIB_DIRFD@ +GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_DUP3 = @GNULIB_DUP3@ +GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ +GNULIB_ENVIRON = @GNULIB_ENVIRON@ +GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ +GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ +GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ +GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ +GNULIB_FCLOSE = @GNULIB_FCLOSE@ +GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ +GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ +GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ +GNULIB_FLOOR = @GNULIB_FLOOR@ +GNULIB_FLOORF = @GNULIB_FLOORF@ +GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ +GNULIB_FOPEN = @GNULIB_FOPEN@ +GNULIB_FPRINTF = @GNULIB_FPRINTF@ +GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FPURGE = @GNULIB_FPURGE@ +GNULIB_FPUTC = @GNULIB_FPUTC@ +GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ +GNULIB_FREOPEN = @GNULIB_FREOPEN@ +GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ +GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ +GNULIB_FSEEK = @GNULIB_FSEEK@ +GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ +GNULIB_FSTATAT = @GNULIB_FSTATAT@ +GNULIB_FSYNC = @GNULIB_FSYNC@ +GNULIB_FTELL = @GNULIB_FTELL@ +GNULIB_FTELLO = @GNULIB_FTELLO@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ +GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETDELIM = @GNULIB_GETDELIM@ +GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ +GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ +GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ +GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ +GNULIB_GETLINE = @GNULIB_GETLINE@ +GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ +GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ +GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ +GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ +GNULIB_ISBLANK = @GNULIB_ISBLANK@ +GNULIB_ISFINITE = @GNULIB_ISFINITE@ +GNULIB_ISINF = @GNULIB_ISINF@ +GNULIB_ISNAN = @GNULIB_ISNAN@ +GNULIB_ISNAND = @GNULIB_ISNAND@ +GNULIB_ISNANF = @GNULIB_ISNANF@ +GNULIB_ISNANL = @GNULIB_ISNANL@ +GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ +GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ +GNULIB_LCHMOD = @GNULIB_LCHMOD@ +GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ +GNULIB_LDEXPL = @GNULIB_LDEXPL@ +GNULIB_LINK = @GNULIB_LINK@ +GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ +GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ +GNULIB_LOGL = @GNULIB_LOGL@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_LSTAT = @GNULIB_LSTAT@ +GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ +GNULIB_MBRLEN = @GNULIB_MBRLEN@ +GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSINIT = @GNULIB_MBSINIT@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ +GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ +GNULIB_MBSSEP = @GNULIB_MBSSEP@ +GNULIB_MBSSPN = @GNULIB_MBSSPN@ +GNULIB_MBSSTR = @GNULIB_MBSSTR@ +GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ +GNULIB_MBTOWC = @GNULIB_MBTOWC@ +GNULIB_MEMCHR = @GNULIB_MEMCHR@ +GNULIB_MEMMEM = @GNULIB_MEMMEM@ +GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ +GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ +GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ +GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ +GNULIB_MKFIFO = @GNULIB_MKFIFO@ +GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ +GNULIB_MKNOD = @GNULIB_MKNOD@ +GNULIB_MKNODAT = @GNULIB_MKNODAT@ +GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ +GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ +GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ +GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ +GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ +GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ +GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ +GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ +GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ +GNULIB_OPEN = @GNULIB_OPEN@ +GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ +GNULIB_PERROR = @GNULIB_PERROR@ +GNULIB_PIPE = @GNULIB_PIPE@ +GNULIB_PIPE2 = @GNULIB_PIPE2@ +GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ +GNULIB_PREAD = @GNULIB_PREAD@ +GNULIB_PRINTF = @GNULIB_PRINTF@ +GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ +GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ +GNULIB_PUTC = @GNULIB_PUTC@ +GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ +GNULIB_PUTENV = @GNULIB_PUTENV@ +GNULIB_PUTS = @GNULIB_PUTS@ +GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ +GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ +GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ +GNULIB_READLINK = @GNULIB_READLINK@ +GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ +GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ +GNULIB_REMOVE = @GNULIB_REMOVE@ +GNULIB_RENAME = @GNULIB_RENAME@ +GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ +GNULIB_RMDIR = @GNULIB_RMDIR@ +GNULIB_ROUND = @GNULIB_ROUND@ +GNULIB_ROUNDF = @GNULIB_ROUNDF@ +GNULIB_ROUNDL = @GNULIB_ROUNDL@ +GNULIB_RPMATCH = @GNULIB_RPMATCH@ +GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ +GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ +GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ +GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ +GNULIB_SINL = @GNULIB_SINL@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ +GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ +GNULIB_SQRTL = @GNULIB_SQRTL@ +GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ +GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRERROR = @GNULIB_STRERROR@ +GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ +GNULIB_STRNCAT = @GNULIB_STRNCAT@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRPTIME = @GNULIB_STRPTIME@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ +GNULIB_STRSTR = @GNULIB_STRSTR@ +GNULIB_STRTOD = @GNULIB_STRTOD@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOLL = @GNULIB_STRTOLL@ +GNULIB_STRTOULL = @GNULIB_STRTOULL@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ +GNULIB_SYMLINK = @GNULIB_SYMLINK@ +GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ +GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ +GNULIB_TANL = @GNULIB_TANL@ +GNULIB_TIMEGM = @GNULIB_TIMEGM@ +GNULIB_TIME_R = @GNULIB_TIME_R@ +GNULIB_TMPFILE = @GNULIB_TMPFILE@ +GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ +GNULIB_TRUNC = @GNULIB_TRUNC@ +GNULIB_TRUNCF = @GNULIB_TRUNCF@ +GNULIB_TRUNCL = @GNULIB_TRUNCL@ +GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ +GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ +GNULIB_UNLINK = @GNULIB_UNLINK@ +GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ +GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ +GNULIB_UNSETENV = @GNULIB_UNSETENV@ +GNULIB_USLEEP = @GNULIB_USLEEP@ +GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ +GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ +GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ +GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ +GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ +GNULIB_VPRINTF = @GNULIB_VPRINTF@ +GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ +GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ +GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ +GNULIB_WAITPID = @GNULIB_WAITPID@ +GNULIB_WCPCPY = @GNULIB_WCPCPY@ +GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ +GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ +GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ +GNULIB_WCSCAT = @GNULIB_WCSCAT@ +GNULIB_WCSCHR = @GNULIB_WCSCHR@ +GNULIB_WCSCMP = @GNULIB_WCSCMP@ +GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ +GNULIB_WCSCPY = @GNULIB_WCSCPY@ +GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ +GNULIB_WCSDUP = @GNULIB_WCSDUP@ +GNULIB_WCSLEN = @GNULIB_WCSLEN@ +GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ +GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ +GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ +GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ +GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ +GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ +GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ +GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ +GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ +GNULIB_WCSSPN = @GNULIB_WCSSPN@ +GNULIB_WCSSTR = @GNULIB_WCSSTR@ +GNULIB_WCSTOK = @GNULIB_WCSTOK@ +GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ +GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ +GNULIB_WCTOB = @GNULIB_WCTOB@ +GNULIB_WCTOMB = @GNULIB_WCTOMB@ +GNULIB_WCTRANS = @GNULIB_WCTRANS@ +GNULIB_WCTYPE = @GNULIB_WCTYPE@ +GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ +GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ +GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ +GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ +GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ +GNULIB_WMEMSET = @GNULIB_WMEMSET@ +GNULIB_WRITE = @GNULIB_WRITE@ +GNULIB__EXIT = @GNULIB__EXIT@ +GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ +HAVE_ACOSL = @HAVE_ACOSL@ +HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ +HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ +HAVE_ATANL = @HAVE_ATANL@ +HAVE_ATOLL = @HAVE_ATOLL@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +HAVE_BTOWC = @HAVE_BTOWC@ +HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ +HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ +HAVE_COSL = @HAVE_COSL@ +HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ +HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ +HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ +HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ +HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ +HAVE_DECL_COSL = @HAVE_DECL_COSL@ +HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ +HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ +HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ +HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ +HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ +HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ +HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ +HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ +HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ +HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ +HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ +HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ +HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ +HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ +HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ +HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ +HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ +HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ +HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ +HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ +HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ +HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ +HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ +HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ +HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ +HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ +HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ +HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ +HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ +HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ +HAVE_DECL_SINL = @HAVE_DECL_SINL@ +HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ +HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DECL_TANL = @HAVE_DECL_TANL@ +HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ +HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ +HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ +HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ +HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ +HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ +HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ +HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ +HAVE_DPRINTF = @HAVE_DPRINTF@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_DUP3 = @HAVE_DUP3@ +HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ +HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ +HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ +HAVE_FACCESSAT = @HAVE_FACCESSAT@ +HAVE_FCHDIR = @HAVE_FCHDIR@ +HAVE_FCHMODAT = @HAVE_FCHMODAT@ +HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ +HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ +HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ +HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ +HAVE_FSEEKO = @HAVE_FSEEKO@ +HAVE_FSTATAT = @HAVE_FSTATAT@ +HAVE_FSYNC = @HAVE_FSYNC@ +HAVE_FTELLO = @HAVE_FTELLO@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_FUTIMENS = @HAVE_FUTIMENS@ +HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ +HAVE_GETGROUPS = @HAVE_GETGROUPS@ +HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ +HAVE_GETLOGIN = @HAVE_GETLOGIN@ +HAVE_GETOPT_H = @HAVE_GETOPT_H@ +HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ +HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_ISBLANK = @HAVE_ISBLANK@ +HAVE_ISNAND = @HAVE_ISNAND@ +HAVE_ISNANF = @HAVE_ISNANF@ +HAVE_ISNANL = @HAVE_ISNANL@ +HAVE_ISWBLANK = @HAVE_ISWBLANK@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ +HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ +HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ +HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ +HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ +HAVE_LCHMOD = @HAVE_LCHMOD@ +HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ +HAVE_LINK = @HAVE_LINK@ +HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ +HAVE_LOGL = @HAVE_LOGL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MBRLEN = @HAVE_MBRLEN@ +HAVE_MBRTOWC = @HAVE_MBRTOWC@ +HAVE_MBSINIT = @HAVE_MBSINIT@ +HAVE_MBSLEN = @HAVE_MBSLEN@ +HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ +HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ +HAVE_MEMCHR = @HAVE_MEMCHR@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDIRAT = @HAVE_MKDIRAT@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_MKFIFO = @HAVE_MKFIFO@ +HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ +HAVE_MKNOD = @HAVE_MKNOD@ +HAVE_MKNODAT = @HAVE_MKNODAT@ +HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ +HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ +HAVE_MKSTEMP = @HAVE_MKSTEMP@ +HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ +HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ +HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ +HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ +HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ +HAVE_PIPE = @HAVE_PIPE@ +HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ +HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ +HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ +HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ +HAVE_RANDOM_H = @HAVE_RANDOM_H@ +HAVE_RANDOM_R = @HAVE_RANDOM_R@ +HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ +HAVE_READLINK = @HAVE_READLINK@ +HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ +HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ +HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ +HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ +HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ +HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ +HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ +HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ +HAVE_SINL = @HAVE_SINL@ +HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ +HAVE_SQRTL = @HAVE_SQRTL@ +HAVE_STDINT_H = @HAVE_STDINT_H@ +HAVE_STPCPY = @HAVE_STPCPY@ +HAVE_STPNCPY = @HAVE_STPNCPY@ +HAVE_STRCASECMP = @HAVE_STRCASECMP@ +HAVE_STRCASESTR = @HAVE_STRCASESTR@ +HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ +HAVE_STRPBRK = @HAVE_STRPBRK@ +HAVE_STRPTIME = @HAVE_STRPTIME@ +HAVE_STRSEP = @HAVE_STRSEP@ +HAVE_STRTOD = @HAVE_STRTOD@ +HAVE_STRTOLL = @HAVE_STRTOLL@ +HAVE_STRTOULL = @HAVE_STRTOULL@ +HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ +HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ +HAVE_SYMLINK = @HAVE_SYMLINK@ +HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ +HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ +HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ +HAVE_TANL = @HAVE_TANL@ +HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNLINKAT = @HAVE_UNLINKAT@ +HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_USLEEP = @HAVE_USLEEP@ +HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ +HAVE_VASPRINTF = @HAVE_VASPRINTF@ +HAVE_VDPRINTF = @HAVE_VDPRINTF@ +HAVE_WCHAR_H = @HAVE_WCHAR_H@ +HAVE_WCHAR_T = @HAVE_WCHAR_T@ +HAVE_WCPCPY = @HAVE_WCPCPY@ +HAVE_WCPNCPY = @HAVE_WCPNCPY@ +HAVE_WCRTOMB = @HAVE_WCRTOMB@ +HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ +HAVE_WCSCAT = @HAVE_WCSCAT@ +HAVE_WCSCHR = @HAVE_WCSCHR@ +HAVE_WCSCMP = @HAVE_WCSCMP@ +HAVE_WCSCOLL = @HAVE_WCSCOLL@ +HAVE_WCSCPY = @HAVE_WCSCPY@ +HAVE_WCSCSPN = @HAVE_WCSCSPN@ +HAVE_WCSDUP = @HAVE_WCSDUP@ +HAVE_WCSLEN = @HAVE_WCSLEN@ +HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ +HAVE_WCSNCAT = @HAVE_WCSNCAT@ +HAVE_WCSNCMP = @HAVE_WCSNCMP@ +HAVE_WCSNCPY = @HAVE_WCSNCPY@ +HAVE_WCSNLEN = @HAVE_WCSNLEN@ +HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ +HAVE_WCSPBRK = @HAVE_WCSPBRK@ +HAVE_WCSRCHR = @HAVE_WCSRCHR@ +HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ +HAVE_WCSSPN = @HAVE_WCSSPN@ +HAVE_WCSSTR = @HAVE_WCSSTR@ +HAVE_WCSTOK = @HAVE_WCSTOK@ +HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ +HAVE_WCSXFRM = @HAVE_WCSXFRM@ +HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE_WMEMCHR = @HAVE_WMEMCHR@ +HAVE_WMEMCMP = @HAVE_WMEMCMP@ +HAVE_WMEMCPY = @HAVE_WMEMCPY@ +HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ +HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ +HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ +HAVE__BOOL = @HAVE__BOOL@ +HAVE__EXIT = @HAVE__EXIT@ +INCLUDE_NEXT = @INCLUDE_NEXT@ +INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ +INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMULTITHREAD = @LIBMULTITHREAD@ +LIBOBJS = @LIBOBJS@ +LIBPTH = @LIBPTH@ +LIBPTH_PREFIX = @LIBPTH_PREFIX@ +LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ +LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ +LIBTHREAD = @LIBTHREAD@ +LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ +LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ +LIB_SELINUX = @LIB_SELINUX@ +LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ +LOCALE_FR = @LOCALE_FR@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_JA = @LOCALE_JA@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ +LTLIBOBJS = @LTLIBOBJS@ +LTLIBPTH = @LTLIBPTH@ +LTLIBTHREAD = @LTLIBTHREAD@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MODF_LIBM = @MODF_LIBM@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ +NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ +NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ +NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ +NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ +NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ +NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ +NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ +NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ +NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ +NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ +NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ +NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ +NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ +NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ +NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ +NEXT_CTYPE_H = @NEXT_CTYPE_H@ +NEXT_DIRENT_H = @NEXT_DIRENT_H@ +NEXT_ERRNO_H = @NEXT_ERRNO_H@ +NEXT_FCNTL_H = @NEXT_FCNTL_H@ +NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_GETOPT_H = @NEXT_GETOPT_H@ +NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ +NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ +NEXT_LOCALE_H = @NEXT_LOCALE_H@ +NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ +NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ +NEXT_STDARG_H = @NEXT_STDARG_H@ +NEXT_STDDEF_H = @NEXT_STDDEF_H@ +NEXT_STDINT_H = @NEXT_STDINT_H@ +NEXT_STDIO_H = @NEXT_STDIO_H@ +NEXT_STDLIB_H = @NEXT_STDLIB_H@ +NEXT_STRINGS_H = @NEXT_STRINGS_H@ +NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ +NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ +NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ +NEXT_TIME_H = @NEXT_TIME_H@ +NEXT_UNISTD_H = @NEXT_UNISTD_H@ +NEXT_WCHAR_H = @NEXT_WCHAR_H@ +NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ +PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +REPLACE_BTOWC = @REPLACE_BTOWC@ +REPLACE_CALLOC = @REPLACE_CALLOC@ +REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ +REPLACE_CEIL = @REPLACE_CEIL@ +REPLACE_CEILF = @REPLACE_CEILF@ +REPLACE_CEILL = @REPLACE_CEILL@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_CLOSE = @REPLACE_CLOSE@ +REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ +REPLACE_DIRFD = @REPLACE_DIRFD@ +REPLACE_DPRINTF = @REPLACE_DPRINTF@ +REPLACE_DUP = @REPLACE_DUP@ +REPLACE_DUP2 = @REPLACE_DUP2@ +REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ +REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ +REPLACE_FCLOSE = @REPLACE_FCLOSE@ +REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ +REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ +REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FLOOR = @REPLACE_FLOOR@ +REPLACE_FLOORF = @REPLACE_FLOORF@ +REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ +REPLACE_FOPEN = @REPLACE_FOPEN@ +REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FPURGE = @REPLACE_FPURGE@ +REPLACE_FREOPEN = @REPLACE_FREOPEN@ +REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ +REPLACE_FREXPL = @REPLACE_FREXPL@ +REPLACE_FSEEK = @REPLACE_FSEEK@ +REPLACE_FSEEKO = @REPLACE_FSEEKO@ +REPLACE_FSTAT = @REPLACE_FSTAT@ +REPLACE_FSTATAT = @REPLACE_FSTATAT@ +REPLACE_FTELL = @REPLACE_FTELL@ +REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ +REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETDELIM = @REPLACE_GETDELIM@ +REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ +REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ +REPLACE_GETLINE = @REPLACE_GETLINE@ +REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ +REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ +REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ +REPLACE_ISFINITE = @REPLACE_ISFINITE@ +REPLACE_ISINF = @REPLACE_ISINF@ +REPLACE_ISNAN = @REPLACE_ISNAN@ +REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ +REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ +REPLACE_LCHOWN = @REPLACE_LCHOWN@ +REPLACE_LDEXPL = @REPLACE_LDEXPL@ +REPLACE_LINK = @REPLACE_LINK@ +REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_LSTAT = @REPLACE_LSTAT@ +REPLACE_MALLOC = @REPLACE_MALLOC@ +REPLACE_MBRLEN = @REPLACE_MBRLEN@ +REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ +REPLACE_MBSINIT = @REPLACE_MBSINIT@ +REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ +REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ +REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ +REPLACE_MBTOWC = @REPLACE_MBTOWC@ +REPLACE_MEMCHR = @REPLACE_MEMCHR@ +REPLACE_MEMMEM = @REPLACE_MEMMEM@ +REPLACE_MKDIR = @REPLACE_MKDIR@ +REPLACE_MKFIFO = @REPLACE_MKFIFO@ +REPLACE_MKNOD = @REPLACE_MKNOD@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ +REPLACE_NAN = @REPLACE_NAN@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ +REPLACE_NULL = @REPLACE_NULL@ +REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ +REPLACE_OPEN = @REPLACE_OPEN@ +REPLACE_OPENAT = @REPLACE_OPENAT@ +REPLACE_OPENDIR = @REPLACE_OPENDIR@ +REPLACE_PERROR = @REPLACE_PERROR@ +REPLACE_POPEN = @REPLACE_POPEN@ +REPLACE_PREAD = @REPLACE_PREAD@ +REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ +REPLACE_PUTENV = @REPLACE_PUTENV@ +REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ +REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_REALLOC = @REPLACE_REALLOC@ +REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ +REPLACE_REMOVE = @REPLACE_REMOVE@ +REPLACE_RENAME = @REPLACE_RENAME@ +REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ +REPLACE_RMDIR = @REPLACE_RMDIR@ +REPLACE_ROUND = @REPLACE_ROUND@ +REPLACE_ROUNDF = @REPLACE_ROUNDF@ +REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ +REPLACE_SETENV = @REPLACE_SETENV@ +REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ +REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ +REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ +REPLACE_SLEEP = @REPLACE_SLEEP@ +REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ +REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ +REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ +REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ +REPLACE_STPNCPY = @REPLACE_STPNCPY@ +REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ +REPLACE_STRDUP = @REPLACE_STRDUP@ +REPLACE_STRERROR = @REPLACE_STRERROR@ +REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ +REPLACE_STRNCAT = @REPLACE_STRNCAT@ +REPLACE_STRNDUP = @REPLACE_STRNDUP@ +REPLACE_STRNLEN = @REPLACE_STRNLEN@ +REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ +REPLACE_STRSTR = @REPLACE_STRSTR@ +REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ +REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ +REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ +REPLACE_TRUNC = @REPLACE_TRUNC@ +REPLACE_TRUNCF = @REPLACE_TRUNCF@ +REPLACE_TRUNCL = @REPLACE_TRUNCL@ +REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ +REPLACE_UNLINK = @REPLACE_UNLINK@ +REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ +REPLACE_UNSETENV = @REPLACE_UNSETENV@ +REPLACE_USLEEP = @REPLACE_USLEEP@ +REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ +REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ +REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ +REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ +REPLACE_VPRINTF = @REPLACE_VPRINTF@ +REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ +REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ +REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ +REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ +REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ +REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ +REPLACE_WCTOB = @REPLACE_WCTOB@ +REPLACE_WCTOMB = @REPLACE_WCTOMB@ +REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ +REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ +SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ +STDARG_H = @STDARG_H@ +STDBOOL_H = @STDBOOL_H@ +STDDEF_H = @STDDEF_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +TRUNC_LIBM = @TRUNC_LIBM@ +UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ +UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ +UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ +UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YIELD_LIB = @YIELD_LIB@ +abs_aux_dir = @abs_aux_dir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ +gltests_LIBOBJS = @gltests_LIBOBJS@ +gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ +gltests_WITNESS = @gltests_WITNESS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# Copyright (C) 2004, 2009 Free Software Foundation, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Automake, under +# the same distribution terms as the rest of that program. +# +# This file was generated by import-gnulib.sh . +# +SUBDIRS = lib +EXTRA_DIST = m4/gnulib-cache.m4 +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gl/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnits gl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic ctags \ + ctags-recursive distclean distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gl/lib/Makefile.am b/gl/lib/Makefile.am new file mode 100644 index 0000000..c2dd908 --- /dev/null +++ b/gl/lib/Makefile.am @@ -0,0 +1,3838 @@ +## DO NOT EDIT! GENERATED AUTOMATICALLY! +## Process this file with automake to produce Makefile.in. +# Copyright (C) 2002-2014 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . +# +# As a special exception to the GNU General Public License, +# this file may be distributed as part of a program that +# contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnulib --source-base=gl/lib --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca areadlinkat argmatch assert byteswap c-strcasestr c-strstr canonicalize cloexec closein closeout ctype d-ino d-type dirent-safer dirname errno error faccessat fchdir fcntl fdl fdopendir fflush fileblocks filemode fnmatch-gnu fopen-safer fts getdelim getline getopt-gnu gettext gettimeofday gpl-3.0 hash human idcache inline inttypes isblank locale lstat maintainer-makefile malloc manywarnings math mbrtowc mbscasestr mbsstr mktime modechange modf mountlist open parse-datetime pathmax perror progname quotearg readlink realloc regex rpmatch safe-read save-cwd savedir selinux-at snprintf stat stat-macros stat-size stat-time stdarg stdbool stddef stdint stdio stdlib stpcpy strcasestr strdup-posix strftime string strndup strtol strtoul strtoull strtoumax sys_stat sys_time sys_wait timespec uname unlinkat update-copyright verify version-etc version-etc-fsf warnings wchar wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno + +AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects + +SUBDIRS = +noinst_HEADERS = +noinst_LIBRARIES = +noinst_LTLIBRARIES = +EXTRA_DIST = +BUILT_SOURCES = +SUFFIXES = +MOSTLYCLEANFILES = core *.stackdump +MOSTLYCLEANDIRS = +CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = + +AM_CPPFLAGS = +AM_CFLAGS = + +noinst_LIBRARIES += libgnulib.a + +libgnulib_a_SOURCES = +libgnulib_a_LIBADD = $(gl_LIBOBJS) +libgnulib_a_DEPENDENCIES = $(gl_LIBOBJS) +EXTRA_libgnulib_a_SOURCES = + +## begin gnulib module absolute-header + +# Use this preprocessor expression to decide whether #include_next works. +# Do not rely on a 'configure'-time test for this, since the expression +# might appear in an installed header, which is used by some other compiler. +HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) + +## end gnulib module absolute-header + +## begin gnulib module alloca + + +libgnulib_a_LIBADD += @ALLOCA@ +libgnulib_a_DEPENDENCIES += @ALLOCA@ +EXTRA_DIST += alloca.c + +EXTRA_libgnulib_a_SOURCES += alloca.c + +## end gnulib module alloca + +## begin gnulib module alloca-opt + +BUILT_SOURCES += $(ALLOCA_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +if GL_GENERATE_ALLOCA_H +alloca.h: alloca.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/alloca.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +else +alloca.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += alloca.h alloca.h-t + +EXTRA_DIST += alloca.in.h + +## end gnulib module alloca-opt + +## begin gnulib module allocator + +libgnulib_a_SOURCES += allocator.c + +EXTRA_DIST += allocator.h + +## end gnulib module allocator + +## begin gnulib module areadlink + +libgnulib_a_SOURCES += areadlink.c + +EXTRA_DIST += areadlink.h + +## end gnulib module areadlink + +## begin gnulib module areadlink-with-size + +libgnulib_a_SOURCES += areadlink-with-size.c + +EXTRA_DIST += areadlink.h + +## end gnulib module areadlink-with-size + +## begin gnulib module areadlinkat + +libgnulib_a_SOURCES += areadlinkat.c + +EXTRA_DIST += areadlink.h at-func.c + +EXTRA_libgnulib_a_SOURCES += at-func.c + +## end gnulib module areadlinkat + +## begin gnulib module argmatch + +libgnulib_a_SOURCES += argmatch.c + +EXTRA_DIST += argmatch.h + +## end gnulib module argmatch + +## begin gnulib module at-internal + + +EXTRA_DIST += openat-priv.h openat-proc.c + +EXTRA_libgnulib_a_SOURCES += openat-proc.c + +## end gnulib module at-internal + +## begin gnulib module bitrotate + +libgnulib_a_SOURCES += bitrotate.h bitrotate.c + +## end gnulib module bitrotate + +## begin gnulib module btowc + + +EXTRA_DIST += btowc.c + +EXTRA_libgnulib_a_SOURCES += btowc.c + +## end gnulib module btowc + +## begin gnulib module byteswap + +BUILT_SOURCES += $(BYTESWAP_H) + +# We need the following in order to create when the system +# doesn't have one. +if GL_GENERATE_BYTESWAP_H +byteswap.h: byteswap.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/byteswap.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +else +byteswap.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += byteswap.h byteswap.h-t + +EXTRA_DIST += byteswap.in.h + +## end gnulib module byteswap + +## begin gnulib module c-ctype + +libgnulib_a_SOURCES += c-ctype.h c-ctype.c + +## end gnulib module c-ctype + +## begin gnulib module c-strcase + +libgnulib_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c + +## end gnulib module c-strcase + +## begin gnulib module c-strcaseeq + + +EXTRA_DIST += c-strcaseeq.h + +## end gnulib module c-strcaseeq + +## begin gnulib module c-strcasestr + +libgnulib_a_SOURCES += c-strcasestr.h c-strcasestr.c + +EXTRA_DIST += str-two-way.h + +## end gnulib module c-strcasestr + +## begin gnulib module c-strstr + +libgnulib_a_SOURCES += c-strstr.h c-strstr.c + +## end gnulib module c-strstr + +## begin gnulib module canonicalize + +libgnulib_a_SOURCES += canonicalize.c + +EXTRA_DIST += canonicalize.h + +## end gnulib module canonicalize + +## begin gnulib module careadlinkat + +libgnulib_a_SOURCES += careadlinkat.c + +EXTRA_DIST += careadlinkat.h + +## end gnulib module careadlinkat + +## begin gnulib module chdir-long + + +EXTRA_DIST += chdir-long.c chdir-long.h + +EXTRA_libgnulib_a_SOURCES += chdir-long.c + +## end gnulib module chdir-long + +## begin gnulib module cloexec + +libgnulib_a_SOURCES += cloexec.c + +EXTRA_DIST += cloexec.h + +## end gnulib module cloexec + +## begin gnulib module close + + +EXTRA_DIST += close.c + +EXTRA_libgnulib_a_SOURCES += close.c + +## end gnulib module close + +## begin gnulib module close-stream + +libgnulib_a_SOURCES += close-stream.c + +EXTRA_DIST += close-stream.h + +## end gnulib module close-stream + +## begin gnulib module closedir + + +EXTRA_DIST += closedir.c dirent-private.h + +EXTRA_libgnulib_a_SOURCES += closedir.c + +## end gnulib module closedir + +## begin gnulib module closein + +libgnulib_a_SOURCES += closein.c + +EXTRA_DIST += closein.h + +## end gnulib module closein + +## begin gnulib module closeout + +libgnulib_a_SOURCES += closeout.c + +EXTRA_DIST += closeout.h + +## end gnulib module closeout + +## begin gnulib module configmake + +# Listed in the same order as the GNU makefile conventions, and +# provided by autoconf 2.59c+ or 2.70. +# The Automake-defined pkg* macros are appended, in the order +# listed in the Automake 1.10a+ documentation. +configmake.h: Makefile + $(AM_V_GEN)rm -f $@-t && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + echo '#define PREFIX "$(prefix)"'; \ + echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ + echo '#define BINDIR "$(bindir)"'; \ + echo '#define SBINDIR "$(sbindir)"'; \ + echo '#define LIBEXECDIR "$(libexecdir)"'; \ + echo '#define DATAROOTDIR "$(datarootdir)"'; \ + echo '#define DATADIR "$(datadir)"'; \ + echo '#define SYSCONFDIR "$(sysconfdir)"'; \ + echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ + echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ + echo '#define RUNSTATEDIR "$(runstatedir)"'; \ + echo '#define INCLUDEDIR "$(includedir)"'; \ + echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ + echo '#define DOCDIR "$(docdir)"'; \ + echo '#define INFODIR "$(infodir)"'; \ + echo '#define HTMLDIR "$(htmldir)"'; \ + echo '#define DVIDIR "$(dvidir)"'; \ + echo '#define PDFDIR "$(pdfdir)"'; \ + echo '#define PSDIR "$(psdir)"'; \ + echo '#define LIBDIR "$(libdir)"'; \ + echo '#define LISPDIR "$(lispdir)"'; \ + echo '#define LOCALEDIR "$(localedir)"'; \ + echo '#define MANDIR "$(mandir)"'; \ + echo '#define MANEXT "$(manext)"'; \ + echo '#define PKGDATADIR "$(pkgdatadir)"'; \ + echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ + echo '#define PKGLIBDIR "$(pkglibdir)"'; \ + echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ + } | sed '/""/d' > $@-t && \ + mv -f $@-t $@ + +BUILT_SOURCES += configmake.h +CLEANFILES += configmake.h configmake.h-t + +## end gnulib module configmake + +## begin gnulib module ctype + +BUILT_SOURCES += ctype.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ + -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ + -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/ctype.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += ctype.h ctype.h-t + +EXTRA_DIST += ctype.in.h + +## end gnulib module ctype + +## begin gnulib module cycle-check + +libgnulib_a_SOURCES += cycle-check.c + +EXTRA_DIST += cycle-check.h + +## end gnulib module cycle-check + +## begin gnulib module dev-ino + + +EXTRA_DIST += dev-ino.h + +## end gnulib module dev-ino + +## begin gnulib module dirent + +BUILT_SOURCES += dirent.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ + -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \ + -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \ + -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \ + -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \ + -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \ + -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \ + -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \ + -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \ + -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \ + -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \ + -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \ + -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \ + -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \ + -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \ + -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \ + -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \ + -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \ + -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \ + -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \ + -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \ + -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/dirent.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += dirent.h dirent.h-t + +EXTRA_DIST += dirent.in.h + +## end gnulib module dirent + +## begin gnulib module dirent-safer + +libgnulib_a_SOURCES += opendir-safer.c + +EXTRA_DIST += dirent--.h dirent-safer.h + +## end gnulib module dirent-safer + +## begin gnulib module dirfd + + +EXTRA_DIST += dirfd.c + +EXTRA_libgnulib_a_SOURCES += dirfd.c + +## end gnulib module dirfd + +## begin gnulib module dirname + +libgnulib_a_SOURCES += dirname.c basename.c + +EXTRA_DIST += stripslash.c + +EXTRA_libgnulib_a_SOURCES += stripslash.c + +## end gnulib module dirname + +## begin gnulib module dirname-lgpl + +libgnulib_a_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c + +EXTRA_DIST += dirname.h + +## end gnulib module dirname-lgpl + +## begin gnulib module dosname + + +EXTRA_DIST += dosname.h + +## end gnulib module dosname + +## begin gnulib module dup + + +EXTRA_DIST += dup.c + +EXTRA_libgnulib_a_SOURCES += dup.c + +## end gnulib module dup + +## begin gnulib module dup2 + + +EXTRA_DIST += dup2.c + +EXTRA_libgnulib_a_SOURCES += dup2.c + +## end gnulib module dup2 + +## begin gnulib module errno + +BUILT_SOURCES += $(ERRNO_H) + +# We need the following in order to create when the system +# doesn't have one that is POSIX compliant. +if GL_GENERATE_ERRNO_H +errno.h: errno.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ + -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ + -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ + -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ + -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ + -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ + -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ + < $(srcdir)/errno.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +errno.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += errno.h errno.h-t + +EXTRA_DIST += errno.in.h + +## end gnulib module errno + +## begin gnulib module error + + +EXTRA_DIST += error.c error.h + +EXTRA_libgnulib_a_SOURCES += error.c + +## end gnulib module error + +## begin gnulib module euidaccess + + +EXTRA_DIST += euidaccess.c + +EXTRA_libgnulib_a_SOURCES += euidaccess.c + +## end gnulib module euidaccess + +## begin gnulib module exitfail + +libgnulib_a_SOURCES += exitfail.c + +EXTRA_DIST += exitfail.h + +## end gnulib module exitfail + +## begin gnulib module faccessat + + +EXTRA_DIST += at-func.c faccessat.c + +EXTRA_libgnulib_a_SOURCES += at-func.c faccessat.c + +## end gnulib module faccessat + +## begin gnulib module fchdir + + +EXTRA_DIST += fchdir.c + +EXTRA_libgnulib_a_SOURCES += fchdir.c + +## end gnulib module fchdir + +## begin gnulib module fcntl + + +EXTRA_DIST += fcntl.c + +EXTRA_libgnulib_a_SOURCES += fcntl.c + +## end gnulib module fcntl + +## begin gnulib module fcntl-h + +BUILT_SOURCES += fcntl.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ + -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ + -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ + -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ + -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ + -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ + -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ + -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ + -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ + -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/fcntl.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += fcntl.h fcntl.h-t + +EXTRA_DIST += fcntl.in.h + +## end gnulib module fcntl-h + +## begin gnulib module fcntl-safer + +libgnulib_a_SOURCES += creat-safer.c open-safer.c + +EXTRA_DIST += fcntl--.h fcntl-safer.h + +## end gnulib module fcntl-safer + +## begin gnulib module fd-hook + +libgnulib_a_SOURCES += fd-hook.c + +EXTRA_DIST += fd-hook.h + +## end gnulib module fd-hook + +## begin gnulib module fdopendir + + +EXTRA_DIST += fdopendir.c + +EXTRA_libgnulib_a_SOURCES += fdopendir.c + +## end gnulib module fdopendir + +## begin gnulib module fflush + + +EXTRA_DIST += fflush.c stdio-impl.h + +EXTRA_libgnulib_a_SOURCES += fflush.c + +## end gnulib module fflush + +## begin gnulib module file-set + +libgnulib_a_SOURCES += file-set.c + +EXTRA_DIST += file-set.h + +## end gnulib module file-set + +## begin gnulib module fileblocks + + +EXTRA_DIST += fileblocks.c + +EXTRA_libgnulib_a_SOURCES += fileblocks.c + +## end gnulib module fileblocks + +## begin gnulib module filemode + +libgnulib_a_SOURCES += filemode.c + +EXTRA_DIST += filemode.h + +## end gnulib module filemode + +## begin gnulib module filename + + +EXTRA_DIST += filename.h + +## end gnulib module filename + +## begin gnulib module filenamecat-lgpl + +libgnulib_a_SOURCES += filenamecat-lgpl.c + +EXTRA_DIST += filenamecat.h + +## end gnulib module filenamecat-lgpl + +## begin gnulib module float + +BUILT_SOURCES += $(FLOAT_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +if GL_GENERATE_FLOAT_H +float.h: float.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ + -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ + < $(srcdir)/float.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +float.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += float.h float.h-t + +EXTRA_DIST += float.c float.in.h itold.c + +EXTRA_libgnulib_a_SOURCES += float.c itold.c + +## end gnulib module float + +## begin gnulib module fnmatch + +BUILT_SOURCES += $(FNMATCH_H) + +# We need the following in order to create when the system +# doesn't have one that supports the required API. +if GL_GENERATE_FNMATCH_H +fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + < $(srcdir)/fnmatch.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +else +fnmatch.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t + +EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c + +EXTRA_libgnulib_a_SOURCES += fnmatch.c fnmatch_loop.c + +## end gnulib module fnmatch + +## begin gnulib module fopen + + +EXTRA_DIST += fopen.c + +EXTRA_libgnulib_a_SOURCES += fopen.c + +## end gnulib module fopen + +## begin gnulib module fopen-safer + +libgnulib_a_SOURCES += fopen-safer.c + +EXTRA_DIST += stdio--.h stdio-safer.h + +## end gnulib module fopen-safer + +## begin gnulib module fpending + + +EXTRA_DIST += fpending.c fpending.h + +EXTRA_libgnulib_a_SOURCES += fpending.c + +## end gnulib module fpending + +## begin gnulib module fpurge + + +EXTRA_DIST += fpurge.c stdio-impl.h + +EXTRA_libgnulib_a_SOURCES += fpurge.c + +## end gnulib module fpurge + +## begin gnulib module freadahead + + +EXTRA_DIST += freadahead.c freadahead.h stdio-impl.h + +EXTRA_libgnulib_a_SOURCES += freadahead.c + +## end gnulib module freadahead + +## begin gnulib module freading + +libgnulib_a_SOURCES += freading.c + +EXTRA_DIST += freading.h stdio-impl.h + +## end gnulib module freading + +## begin gnulib module fseek + + +EXTRA_DIST += fseek.c + +EXTRA_libgnulib_a_SOURCES += fseek.c + +## end gnulib module fseek + +## begin gnulib module fseeko + + +EXTRA_DIST += fseeko.c stdio-impl.h + +EXTRA_libgnulib_a_SOURCES += fseeko.c + +## end gnulib module fseeko + +## begin gnulib module fstat + + +EXTRA_DIST += fstat.c + +EXTRA_libgnulib_a_SOURCES += fstat.c + +## end gnulib module fstat + +## begin gnulib module fstatat + + +EXTRA_DIST += at-func.c fstatat.c + +EXTRA_libgnulib_a_SOURCES += at-func.c fstatat.c + +## end gnulib module fstatat + +## begin gnulib module ftell + + +EXTRA_DIST += ftell.c + +EXTRA_libgnulib_a_SOURCES += ftell.c + +## end gnulib module ftell + +## begin gnulib module ftello + + +EXTRA_DIST += ftello.c stdio-impl.h + +EXTRA_libgnulib_a_SOURCES += ftello.c + +## end gnulib module ftello + +## begin gnulib module fts + + +EXTRA_DIST += fts-cycle.c fts.c fts_.h + +EXTRA_libgnulib_a_SOURCES += fts-cycle.c fts.c + +## end gnulib module fts + +## begin gnulib module getcwd + + +EXTRA_DIST += getcwd.c + +EXTRA_libgnulib_a_SOURCES += getcwd.c + +## end gnulib module getcwd + +## begin gnulib module getcwd-lgpl + + +EXTRA_DIST += getcwd-lgpl.c + +EXTRA_libgnulib_a_SOURCES += getcwd-lgpl.c + +## end gnulib module getcwd-lgpl + +## begin gnulib module getdelim + + +EXTRA_DIST += getdelim.c + +EXTRA_libgnulib_a_SOURCES += getdelim.c + +## end gnulib module getdelim + +## begin gnulib module getdtablesize + + +EXTRA_DIST += getdtablesize.c + +EXTRA_libgnulib_a_SOURCES += getdtablesize.c + +## end gnulib module getdtablesize + +## begin gnulib module getgroups + + +EXTRA_DIST += getgroups.c + +EXTRA_libgnulib_a_SOURCES += getgroups.c + +## end gnulib module getgroups + +## begin gnulib module gethostname + + +EXTRA_DIST += gethostname.c w32sock.h + +EXTRA_libgnulib_a_SOURCES += gethostname.c + +## end gnulib module gethostname + +## begin gnulib module getline + + +EXTRA_DIST += getline.c + +EXTRA_libgnulib_a_SOURCES += getline.c + +## end gnulib module getline + +## begin gnulib module getopt-posix + +BUILT_SOURCES += $(GETOPT_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + < $(srcdir)/getopt.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +MOSTLYCLEANFILES += getopt.h getopt.h-t + +EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h + +EXTRA_libgnulib_a_SOURCES += getopt.c getopt1.c + +## end gnulib module getopt-posix + +## begin gnulib module gettext + +# If your project uses "gettextize --intl" to put a source-code +# copy of libintl into the package, every Makefile.am needs +# -I$(top_builddir)/intl, so that can be found in this directory. +# Here's one way to do this: +#AM_CPPFLAGS += -I$(top_builddir)/intl +# This option has no effect when the user disables NLS (because then +# the intl directory contains no libintl.h file). This option is not +# enabled by default because the intl directory might not exist if +# your project does not use "gettext --intl", and some compilers +# complain about -I options applied to nonexistent directories. + +EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath + +## end gnulib module gettext + +## begin gnulib module gettext-h + +libgnulib_a_SOURCES += gettext.h + +## end gnulib module gettext-h + +## begin gnulib module gettime + +libgnulib_a_SOURCES += gettime.c + +## end gnulib module gettime + +## begin gnulib module gettimeofday + + +EXTRA_DIST += gettimeofday.c + +EXTRA_libgnulib_a_SOURCES += gettimeofday.c + +## end gnulib module gettimeofday + +## begin gnulib module gnumakefile + +distclean-local: clean-GNUmakefile +clean-GNUmakefile: + test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile + +EXTRA_DIST += $(top_srcdir)/GNUmakefile + +## end gnulib module gnumakefile + +## begin gnulib module group-member + + +EXTRA_DIST += group-member.c + +EXTRA_libgnulib_a_SOURCES += group-member.c + +## end gnulib module group-member + +## begin gnulib module hash + +libgnulib_a_SOURCES += hash.c + +EXTRA_DIST += hash.h + +## end gnulib module hash + +## begin gnulib module hash-pjw + +libgnulib_a_SOURCES += hash-pjw.h hash-pjw.c + +## end gnulib module hash-pjw + +## begin gnulib module hash-triple + +libgnulib_a_SOURCES += hash-triple.c + +EXTRA_DIST += hash-triple.h + +## end gnulib module hash-triple + +## begin gnulib module havelib + + +EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath + +## end gnulib module havelib + +## begin gnulib module human + +libgnulib_a_SOURCES += human.c + +EXTRA_DIST += human.h + +## end gnulib module human + +## begin gnulib module i-ring + +libgnulib_a_SOURCES += i-ring.c + +EXTRA_DIST += i-ring.h + +## end gnulib module i-ring + +## begin gnulib module idcache + +libgnulib_a_SOURCES += idcache.c + +EXTRA_DIST += idcache.h + +## end gnulib module idcache + +## begin gnulib module intprops + + +EXTRA_DIST += intprops.h + +## end gnulib module intprops + +## begin gnulib module inttypes-incomplete + +BUILT_SOURCES += inttypes.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ + -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ + -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ + -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ + -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ + -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ + -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ + -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ + -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ + -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ + -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ + -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ + -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ + -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ + -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ + -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \ + -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ + -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ + -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ + -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/inttypes.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += inttypes.h inttypes.h-t + +EXTRA_DIST += inttypes.in.h + +## end gnulib module inttypes-incomplete + +## begin gnulib module isblank + + +EXTRA_DIST += isblank.c + +EXTRA_libgnulib_a_SOURCES += isblank.c + +## end gnulib module isblank + +## begin gnulib module isfinite + + +EXTRA_DIST += isfinite.c + +EXTRA_libgnulib_a_SOURCES += isfinite.c + +## end gnulib module isfinite + +## begin gnulib module isinf + + +EXTRA_DIST += isinf.c + +EXTRA_libgnulib_a_SOURCES += isinf.c + +## end gnulib module isinf + +## begin gnulib module isnand-nolibm + + +EXTRA_DIST += float+.h isnan.c isnand-nolibm.h isnand.c + +EXTRA_libgnulib_a_SOURCES += isnan.c isnand.c + +## end gnulib module isnand-nolibm + +## begin gnulib module isnanf-nolibm + + +EXTRA_DIST += float+.h isnan.c isnanf-nolibm.h isnanf.c + +EXTRA_libgnulib_a_SOURCES += isnan.c isnanf.c + +## end gnulib module isnanf-nolibm + +## begin gnulib module isnanl-nolibm + + +EXTRA_DIST += float+.h isnan.c isnanl-nolibm.h isnanl.c + +EXTRA_libgnulib_a_SOURCES += isnan.c isnanl.c + +## end gnulib module isnanl-nolibm + +## begin gnulib module iswblank + + +EXTRA_DIST += iswblank.c + +EXTRA_libgnulib_a_SOURCES += iswblank.c + +## end gnulib module iswblank + +## begin gnulib module langinfo + +BUILT_SOURCES += langinfo.h + +# We need the following in order to create an empty placeholder for +# when the system doesn't have one. +langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ + -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ + -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ + -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ + -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ + -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ + -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ + -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/langinfo.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += langinfo.h langinfo.h-t + +EXTRA_DIST += langinfo.in.h + +## end gnulib module langinfo + +## begin gnulib module localcharset + +libgnulib_a_SOURCES += localcharset.h localcharset.c + +# We need the following in order to install a simple file in $(libdir) +# which is shared with other installed packages. We use a list of referencing +# packages so that "make uninstall" will remove the file if and only if it +# is not used by another installed package. +# On systems with glibc-2.1 or newer, the file is redundant, therefore we +# avoid installing it. + +all-local: charset.alias ref-add.sed ref-del.sed + +charset_alias = $(DESTDIR)$(libdir)/charset.alias +charset_tmp = $(DESTDIR)$(libdir)/charset.tmp +install-exec-local: install-exec-localcharset +install-exec-localcharset: all-local + if test $(GLIBC21) = no; then \ + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ + darwin* | cygwin* | mingw* | pw32* | cegcc*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ + esac ; \ + else \ + need_charset_alias=false ; \ + fi ; \ + if $$need_charset_alias; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ + fi ; \ + if test -f $(charset_alias); then \ + sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ + rm -f $(charset_tmp) ; \ + else \ + if $$need_charset_alias; then \ + sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ + rm -f $(charset_tmp) ; \ + fi ; \ + fi + +uninstall-local: uninstall-localcharset +uninstall-localcharset: all-local + if test -f $(charset_alias); then \ + sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ + if grep '^# Packages using this file: $$' $(charset_tmp) \ + > /dev/null; then \ + rm -f $(charset_alias); \ + else \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ + fi; \ + rm -f $(charset_tmp); \ + fi + +charset.alias: config.charset + $(AM_V_GEN)rm -f t-$@ $@ && \ + $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ + mv t-$@ $@ + +SUFFIXES += .sed .sin +.sin.sed: + $(AM_V_GEN)rm -f t-$@ $@ && \ + sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ + mv t-$@ $@ + +CLEANFILES += charset.alias ref-add.sed ref-del.sed + +EXTRA_DIST += config.charset ref-add.sin ref-del.sin + +## end gnulib module localcharset + +## begin gnulib module locale + +BUILT_SOURCES += locale.h + +# We need the following in order to create when the system +# doesn't have one that provides all definitions. +locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ + -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ + -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ + -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ + -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ + -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ + -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \ + -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ + -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ + -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/locale.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += locale.h locale.h-t + +EXTRA_DIST += locale.in.h + +## end gnulib module locale + +## begin gnulib module localeconv + + +EXTRA_DIST += localeconv.c + +EXTRA_libgnulib_a_SOURCES += localeconv.c + +## end gnulib module localeconv + +## begin gnulib module lock + +libgnulib_a_SOURCES += glthread/lock.h glthread/lock.c + +## end gnulib module lock + +## begin gnulib module lseek + + +EXTRA_DIST += lseek.c + +EXTRA_libgnulib_a_SOURCES += lseek.c + +## end gnulib module lseek + +## begin gnulib module lstat + + +EXTRA_DIST += lstat.c + +EXTRA_libgnulib_a_SOURCES += lstat.c + +## end gnulib module lstat + +## begin gnulib module maintainer-makefile + +EXTRA_DIST += $(top_srcdir)/maint.mk + +## end gnulib module maintainer-makefile + +## begin gnulib module malloc-gnu + + +EXTRA_DIST += malloc.c + +EXTRA_libgnulib_a_SOURCES += malloc.c + +## end gnulib module malloc-gnu + +## begin gnulib module malloc-posix + + +EXTRA_DIST += malloc.c + +EXTRA_libgnulib_a_SOURCES += malloc.c + +## end gnulib module malloc-posix + +## begin gnulib module malloca + +libgnulib_a_SOURCES += malloca.c + +EXTRA_DIST += malloca.h malloca.valgrind + +## end gnulib module malloca + +## begin gnulib module math + +BUILT_SOURCES += math.h +libgnulib_a_SOURCES += math.c + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ + -e 's/@''GNULIB_ACOSF''@/$(GNULIB_ACOSF)/g' \ + -e 's/@''GNULIB_ACOSL''@/$(GNULIB_ACOSL)/g' \ + -e 's/@''GNULIB_ASINF''@/$(GNULIB_ASINF)/g' \ + -e 's/@''GNULIB_ASINL''@/$(GNULIB_ASINL)/g' \ + -e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \ + -e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \ + -e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \ + -e 's/@''GNULIB_CBRT''@/$(GNULIB_CBRT)/g' \ + -e 's/@''GNULIB_CBRTF''@/$(GNULIB_CBRTF)/g' \ + -e 's/@''GNULIB_CBRTL''@/$(GNULIB_CBRTL)/g' \ + -e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \ + -e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \ + -e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \ + -e 's/@''GNULIB_COPYSIGN''@/$(GNULIB_COPYSIGN)/g' \ + -e 's/@''GNULIB_COPYSIGNF''@/$(GNULIB_COPYSIGNF)/g' \ + -e 's/@''GNULIB_COPYSIGNL''@/$(GNULIB_COPYSIGNL)/g' \ + -e 's/@''GNULIB_COSF''@/$(GNULIB_COSF)/g' \ + -e 's/@''GNULIB_COSL''@/$(GNULIB_COSL)/g' \ + -e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \ + -e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \ + -e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \ + -e 's/@''GNULIB_EXP2''@/$(GNULIB_EXP2)/g' \ + -e 's/@''GNULIB_EXP2F''@/$(GNULIB_EXP2F)/g' \ + -e 's/@''GNULIB_EXP2L''@/$(GNULIB_EXP2L)/g' \ + -e 's/@''GNULIB_EXPM1''@/$(GNULIB_EXPM1)/g' \ + -e 's/@''GNULIB_EXPM1F''@/$(GNULIB_EXPM1F)/g' \ + -e 's/@''GNULIB_EXPM1L''@/$(GNULIB_EXPM1L)/g' \ + -e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \ + -e 's/@''GNULIB_FABSL''@/$(GNULIB_FABSL)/g' \ + -e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \ + -e 's/@''GNULIB_FLOORF''@/$(GNULIB_FLOORF)/g' \ + -e 's/@''GNULIB_FLOORL''@/$(GNULIB_FLOORL)/g' \ + -e 's/@''GNULIB_FMA''@/$(GNULIB_FMA)/g' \ + -e 's/@''GNULIB_FMAF''@/$(GNULIB_FMAF)/g' \ + -e 's/@''GNULIB_FMAL''@/$(GNULIB_FMAL)/g' \ + -e 's/@''GNULIB_FMOD''@/$(GNULIB_FMOD)/g' \ + -e 's/@''GNULIB_FMODF''@/$(GNULIB_FMODF)/g' \ + -e 's/@''GNULIB_FMODL''@/$(GNULIB_FMODL)/g' \ + -e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \ + -e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \ + -e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \ + -e 's/@''GNULIB_HYPOT''@/$(GNULIB_HYPOT)/g' \ + -e 's/@''GNULIB_HYPOTF''@/$(GNULIB_HYPOTF)/g' \ + -e 's/@''GNULIB_HYPOTL''@/$(GNULIB_HYPOTL)/g' \ + < $(srcdir)/math.in.h | \ + sed -e 's/@''GNULIB_ILOGB''@/$(GNULIB_ILOGB)/g' \ + -e 's/@''GNULIB_ILOGBF''@/$(GNULIB_ILOGBF)/g' \ + -e 's/@''GNULIB_ILOGBL''@/$(GNULIB_ILOGBL)/g' \ + -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \ + -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \ + -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \ + -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \ + -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \ + -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \ + -e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \ + -e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \ + -e 's/@''GNULIB_LOG''@/$(GNULIB_LOG)/g' \ + -e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \ + -e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \ + -e 's/@''GNULIB_LOG10''@/$(GNULIB_LOG10)/g' \ + -e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \ + -e 's/@''GNULIB_LOG10L''@/$(GNULIB_LOG10L)/g' \ + -e 's/@''GNULIB_LOG1P''@/$(GNULIB_LOG1P)/g' \ + -e 's/@''GNULIB_LOG1PF''@/$(GNULIB_LOG1PF)/g' \ + -e 's/@''GNULIB_LOG1PL''@/$(GNULIB_LOG1PL)/g' \ + -e 's/@''GNULIB_LOG2''@/$(GNULIB_LOG2)/g' \ + -e 's/@''GNULIB_LOG2F''@/$(GNULIB_LOG2F)/g' \ + -e 's/@''GNULIB_LOG2L''@/$(GNULIB_LOG2L)/g' \ + -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \ + -e 's/@''GNULIB_LOGBF''@/$(GNULIB_LOGBF)/g' \ + -e 's/@''GNULIB_LOGBL''@/$(GNULIB_LOGBL)/g' \ + -e 's/@''GNULIB_MODF''@/$(GNULIB_MODF)/g' \ + -e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \ + -e 's/@''GNULIB_MODFL''@/$(GNULIB_MODFL)/g' \ + -e 's/@''GNULIB_POWF''@/$(GNULIB_POWF)/g' \ + -e 's/@''GNULIB_REMAINDER''@/$(GNULIB_REMAINDER)/g' \ + -e 's/@''GNULIB_REMAINDERF''@/$(GNULIB_REMAINDERF)/g' \ + -e 's/@''GNULIB_REMAINDERL''@/$(GNULIB_REMAINDERL)/g' \ + -e 's/@''GNULIB_RINT''@/$(GNULIB_RINT)/g' \ + -e 's/@''GNULIB_RINTF''@/$(GNULIB_RINTF)/g' \ + -e 's/@''GNULIB_RINTL''@/$(GNULIB_RINTL)/g' \ + -e 's/@''GNULIB_ROUND''@/$(GNULIB_ROUND)/g' \ + -e 's/@''GNULIB_ROUNDF''@/$(GNULIB_ROUNDF)/g' \ + -e 's/@''GNULIB_ROUNDL''@/$(GNULIB_ROUNDL)/g' \ + -e 's/@''GNULIB_SIGNBIT''@/$(GNULIB_SIGNBIT)/g' \ + -e 's/@''GNULIB_SINF''@/$(GNULIB_SINF)/g' \ + -e 's/@''GNULIB_SINL''@/$(GNULIB_SINL)/g' \ + -e 's/@''GNULIB_SINHF''@/$(GNULIB_SINHF)/g' \ + -e 's/@''GNULIB_SQRTF''@/$(GNULIB_SQRTF)/g' \ + -e 's/@''GNULIB_SQRTL''@/$(GNULIB_SQRTL)/g' \ + -e 's/@''GNULIB_TANF''@/$(GNULIB_TANF)/g' \ + -e 's/@''GNULIB_TANL''@/$(GNULIB_TANL)/g' \ + -e 's/@''GNULIB_TANHF''@/$(GNULIB_TANHF)/g' \ + -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \ + -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \ + -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \ + | \ + sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \ + -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ + -e 's|@''HAVE_ASINF''@|$(HAVE_ASINF)|g' \ + -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \ + -e 's|@''HAVE_ATANF''@|$(HAVE_ATANF)|g' \ + -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \ + -e 's|@''HAVE_ATAN2F''@|$(HAVE_ATAN2F)|g' \ + -e 's|@''HAVE_CBRT''@|$(HAVE_CBRT)|g' \ + -e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \ + -e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \ + -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \ + -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \ + -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \ + -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ + -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \ + -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \ + -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ + -e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \ + -e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \ + -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \ + -e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \ + -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \ + -e 's|@''HAVE_FMAF''@|$(HAVE_FMAF)|g' \ + -e 's|@''HAVE_FMAL''@|$(HAVE_FMAL)|g' \ + -e 's|@''HAVE_FMODF''@|$(HAVE_FMODF)|g' \ + -e 's|@''HAVE_FMODL''@|$(HAVE_FMODL)|g' \ + -e 's|@''HAVE_FREXPF''@|$(HAVE_FREXPF)|g' \ + -e 's|@''HAVE_HYPOTF''@|$(HAVE_HYPOTF)|g' \ + -e 's|@''HAVE_HYPOTL''@|$(HAVE_HYPOTL)|g' \ + -e 's|@''HAVE_ILOGB''@|$(HAVE_ILOGB)|g' \ + -e 's|@''HAVE_ILOGBF''@|$(HAVE_ILOGBF)|g' \ + -e 's|@''HAVE_ILOGBL''@|$(HAVE_ILOGBL)|g' \ + -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \ + -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \ + -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \ + -e 's|@''HAVE_LDEXPF''@|$(HAVE_LDEXPF)|g' \ + -e 's|@''HAVE_LOGF''@|$(HAVE_LOGF)|g' \ + -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \ + -e 's|@''HAVE_LOG10F''@|$(HAVE_LOG10F)|g' \ + -e 's|@''HAVE_LOG10L''@|$(HAVE_LOG10L)|g' \ + -e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \ + -e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \ + -e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \ + -e 's|@''HAVE_LOGBF''@|$(HAVE_LOGBF)|g' \ + -e 's|@''HAVE_LOGBL''@|$(HAVE_LOGBL)|g' \ + -e 's|@''HAVE_MODFF''@|$(HAVE_MODFF)|g' \ + -e 's|@''HAVE_MODFL''@|$(HAVE_MODFL)|g' \ + -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \ + -e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \ + -e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \ + -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \ + -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \ + -e 's|@''HAVE_SINF''@|$(HAVE_SINF)|g' \ + -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \ + -e 's|@''HAVE_SINHF''@|$(HAVE_SINHF)|g' \ + -e 's|@''HAVE_SQRTF''@|$(HAVE_SQRTF)|g' \ + -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \ + -e 's|@''HAVE_TANF''@|$(HAVE_TANF)|g' \ + -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \ + -e 's|@''HAVE_TANHF''@|$(HAVE_TANHF)|g' \ + -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ + -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ + -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ + -e 's|@''HAVE_DECL_CBRTF''@|$(HAVE_DECL_CBRTF)|g' \ + -e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \ + -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \ + -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \ + -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \ + -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ + -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ + -e 's|@''HAVE_DECL_EXP2''@|$(HAVE_DECL_EXP2)|g' \ + -e 's|@''HAVE_DECL_EXP2F''@|$(HAVE_DECL_EXP2F)|g' \ + -e 's|@''HAVE_DECL_EXP2L''@|$(HAVE_DECL_EXP2L)|g' \ + -e 's|@''HAVE_DECL_EXPM1L''@|$(HAVE_DECL_EXPM1L)|g' \ + -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \ + -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \ + -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ + -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ + -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ + -e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \ + -e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \ + -e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \ + -e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \ + -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \ + -e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \ + -e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \ + -e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \ + -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \ + -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \ + -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \ + -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ + -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ + -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ + -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \ + -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ + -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \ + | \ + sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \ + -e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \ + -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \ + -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ + -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ + -e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \ + -e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \ + -e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \ + -e 's|@''REPLACE_EXP2L''@|$(REPLACE_EXP2L)|g' \ + -e 's|@''REPLACE_FABSL''@|$(REPLACE_FABSL)|g' \ + -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \ + -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \ + -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \ + -e 's|@''REPLACE_FMA''@|$(REPLACE_FMA)|g' \ + -e 's|@''REPLACE_FMAF''@|$(REPLACE_FMAF)|g' \ + -e 's|@''REPLACE_FMAL''@|$(REPLACE_FMAL)|g' \ + -e 's|@''REPLACE_FMOD''@|$(REPLACE_FMOD)|g' \ + -e 's|@''REPLACE_FMODF''@|$(REPLACE_FMODF)|g' \ + -e 's|@''REPLACE_FMODL''@|$(REPLACE_FMODL)|g' \ + -e 's|@''REPLACE_FREXPF''@|$(REPLACE_FREXPF)|g' \ + -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \ + -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \ + -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \ + -e 's|@''REPLACE_HYPOT''@|$(REPLACE_HYPOT)|g' \ + -e 's|@''REPLACE_HYPOTF''@|$(REPLACE_HYPOTF)|g' \ + -e 's|@''REPLACE_HYPOTL''@|$(REPLACE_HYPOTL)|g' \ + -e 's|@''REPLACE_ILOGB''@|$(REPLACE_ILOGB)|g' \ + -e 's|@''REPLACE_ILOGBF''@|$(REPLACE_ILOGBF)|g' \ + -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ + -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ + -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ + -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ + -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \ + -e 's|@''REPLACE_LOG''@|$(REPLACE_LOG)|g' \ + -e 's|@''REPLACE_LOGF''@|$(REPLACE_LOGF)|g' \ + -e 's|@''REPLACE_LOGL''@|$(REPLACE_LOGL)|g' \ + -e 's|@''REPLACE_LOG10''@|$(REPLACE_LOG10)|g' \ + -e 's|@''REPLACE_LOG10F''@|$(REPLACE_LOG10F)|g' \ + -e 's|@''REPLACE_LOG10L''@|$(REPLACE_LOG10L)|g' \ + -e 's|@''REPLACE_LOG1P''@|$(REPLACE_LOG1P)|g' \ + -e 's|@''REPLACE_LOG1PF''@|$(REPLACE_LOG1PF)|g' \ + -e 's|@''REPLACE_LOG1PL''@|$(REPLACE_LOG1PL)|g' \ + -e 's|@''REPLACE_LOG2''@|$(REPLACE_LOG2)|g' \ + -e 's|@''REPLACE_LOG2F''@|$(REPLACE_LOG2F)|g' \ + -e 's|@''REPLACE_LOG2L''@|$(REPLACE_LOG2L)|g' \ + -e 's|@''REPLACE_LOGB''@|$(REPLACE_LOGB)|g' \ + -e 's|@''REPLACE_LOGBF''@|$(REPLACE_LOGBF)|g' \ + -e 's|@''REPLACE_LOGBL''@|$(REPLACE_LOGBL)|g' \ + -e 's|@''REPLACE_MODF''@|$(REPLACE_MODF)|g' \ + -e 's|@''REPLACE_MODFF''@|$(REPLACE_MODFF)|g' \ + -e 's|@''REPLACE_MODFL''@|$(REPLACE_MODFL)|g' \ + -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \ + -e 's|@''REPLACE_REMAINDER''@|$(REPLACE_REMAINDER)|g' \ + -e 's|@''REPLACE_REMAINDERF''@|$(REPLACE_REMAINDERF)|g' \ + -e 's|@''REPLACE_REMAINDERL''@|$(REPLACE_REMAINDERL)|g' \ + -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \ + -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \ + -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ + -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ + -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ + -e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \ + -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \ + -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \ + -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += math.h math.h-t + +EXTRA_DIST += math.in.h + +## end gnulib module math + +## begin gnulib module mbchar + +libgnulib_a_SOURCES += mbchar.c + +EXTRA_DIST += mbchar.h + +## end gnulib module mbchar + +## begin gnulib module mbrtowc + + +EXTRA_DIST += mbrtowc.c + +EXTRA_libgnulib_a_SOURCES += mbrtowc.c + +## end gnulib module mbrtowc + +## begin gnulib module mbscasestr + +libgnulib_a_SOURCES += mbscasestr.c + +EXTRA_DIST += str-kmp.h + +## end gnulib module mbscasestr + +## begin gnulib module mbsinit + + +EXTRA_DIST += mbsinit.c + +EXTRA_libgnulib_a_SOURCES += mbsinit.c + +## end gnulib module mbsinit + +## begin gnulib module mbslen + +libgnulib_a_SOURCES += mbslen.c + +## end gnulib module mbslen + +## begin gnulib module mbsrtowcs + + +EXTRA_DIST += mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c + +EXTRA_libgnulib_a_SOURCES += mbsrtowcs-state.c mbsrtowcs.c + +## end gnulib module mbsrtowcs + +## begin gnulib module mbsstr + +libgnulib_a_SOURCES += mbsstr.c + +EXTRA_DIST += str-kmp.h + +## end gnulib module mbsstr + +## begin gnulib module mbtowc + + +EXTRA_DIST += mbtowc-impl.h mbtowc.c + +EXTRA_libgnulib_a_SOURCES += mbtowc.c + +## end gnulib module mbtowc + +## begin gnulib module mbuiter + +libgnulib_a_SOURCES += mbuiter.h mbuiter.c + +## end gnulib module mbuiter + +## begin gnulib module memchr + + +EXTRA_DIST += memchr.c memchr.valgrind + +EXTRA_libgnulib_a_SOURCES += memchr.c + +## end gnulib module memchr + +## begin gnulib module mempcpy + + +EXTRA_DIST += mempcpy.c + +EXTRA_libgnulib_a_SOURCES += mempcpy.c + +## end gnulib module mempcpy + +## begin gnulib module memrchr + + +EXTRA_DIST += memrchr.c + +EXTRA_libgnulib_a_SOURCES += memrchr.c + +## end gnulib module memrchr + +## begin gnulib module mktime + + +EXTRA_DIST += mktime-internal.h mktime.c + +EXTRA_libgnulib_a_SOURCES += mktime.c + +## end gnulib module mktime + +## begin gnulib module modechange + +libgnulib_a_SOURCES += modechange.c + +EXTRA_DIST += modechange.h + +## end gnulib module modechange + +## begin gnulib module modf + + +EXTRA_DIST += modf.c + +EXTRA_libgnulib_a_SOURCES += modf.c + +## end gnulib module modf + +## begin gnulib module mountlist + + +EXTRA_DIST += mountlist.c mountlist.h + +EXTRA_libgnulib_a_SOURCES += mountlist.c + +## end gnulib module mountlist + +## begin gnulib module msvc-inval + + +EXTRA_DIST += msvc-inval.c msvc-inval.h + +EXTRA_libgnulib_a_SOURCES += msvc-inval.c + +## end gnulib module msvc-inval + +## begin gnulib module msvc-nothrow + + +EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h + +EXTRA_libgnulib_a_SOURCES += msvc-nothrow.c + +## end gnulib module msvc-nothrow + +## begin gnulib module nl_langinfo + + +EXTRA_DIST += nl_langinfo.c + +EXTRA_libgnulib_a_SOURCES += nl_langinfo.c + +## end gnulib module nl_langinfo + +## begin gnulib module open + + +EXTRA_DIST += open.c + +EXTRA_libgnulib_a_SOURCES += open.c + +## end gnulib module open + +## begin gnulib module openat + + +EXTRA_DIST += openat.c + +EXTRA_libgnulib_a_SOURCES += openat.c + +## end gnulib module openat + +## begin gnulib module openat-die + +libgnulib_a_SOURCES += openat-die.c + +## end gnulib module openat-die + +## begin gnulib module openat-h + + +EXTRA_DIST += openat.h + +## end gnulib module openat-h + +## begin gnulib module openat-safer + +libgnulib_a_SOURCES += openat-safer.c + +EXTRA_DIST += fcntl--.h fcntl-safer.h + +## end gnulib module openat-safer + +## begin gnulib module opendir + + +EXTRA_DIST += dirent-private.h opendir.c + +EXTRA_libgnulib_a_SOURCES += opendir.c + +## end gnulib module opendir + +## begin gnulib module parse-datetime + +# This rule overrides the Automake generated .y.c rule, to ensure that the +# parse-datetime.c file gets generated in the source directory, not in the +# build directory. +parse-datetime.c: parse-datetime.y + $(AM_V_GEN)$(SHELL) $(YLWRAP) $(srcdir)/parse-datetime.y \ + y.tab.c parse-datetime.c \ + y.tab.h parse-datetime.h \ + y.output parse-datetime.output \ + -- $(YACC) $(YFLAGS) $(AM_YFLAGS) && \ + mv parse-datetime.c parse-datetime.c-t && \ + mv parse-datetime.c-t $(srcdir)/parse-datetime.c +libgnulib_a_SOURCES += parse-datetime.y +BUILT_SOURCES += parse-datetime.c +MOSTLYCLEANFILES += parse-datetime.c-t +MAINTAINERCLEANFILES += parse-datetime.c +EXTRA_DIST += parse-datetime.c + +EXTRA_DIST += parse-datetime.h + +## end gnulib module parse-datetime + +## begin gnulib module pathmax + + +EXTRA_DIST += pathmax.h + +## end gnulib module pathmax + +## begin gnulib module perror + + +EXTRA_DIST += perror.c + +EXTRA_libgnulib_a_SOURCES += perror.c + +## end gnulib module perror + +## begin gnulib module progname + +libgnulib_a_SOURCES += progname.h progname.c + +## end gnulib module progname + +## begin gnulib module quote + + +EXTRA_DIST += quote.h + +## end gnulib module quote + +## begin gnulib module quotearg + +libgnulib_a_SOURCES += quotearg.c + +EXTRA_DIST += quote.h quotearg.h + +## end gnulib module quotearg + +## begin gnulib module read + + +EXTRA_DIST += read.c + +EXTRA_libgnulib_a_SOURCES += read.c + +## end gnulib module read + +## begin gnulib module readdir + + +EXTRA_DIST += dirent-private.h readdir.c + +EXTRA_libgnulib_a_SOURCES += readdir.c + +## end gnulib module readdir + +## begin gnulib module readlink + + +EXTRA_DIST += readlink.c + +EXTRA_libgnulib_a_SOURCES += readlink.c + +## end gnulib module readlink + +## begin gnulib module readlinkat + + +EXTRA_DIST += at-func.c readlinkat.c + +EXTRA_libgnulib_a_SOURCES += at-func.c readlinkat.c + +## end gnulib module readlinkat + +## begin gnulib module realloc-gnu + + +EXTRA_DIST += realloc.c + +EXTRA_libgnulib_a_SOURCES += realloc.c + +## end gnulib module realloc-gnu + +## begin gnulib module realloc-posix + + +EXTRA_DIST += realloc.c + +EXTRA_libgnulib_a_SOURCES += realloc.c + +## end gnulib module realloc-posix + +## begin gnulib module regex + + +EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c + +EXTRA_libgnulib_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c + +## end gnulib module regex + +## begin gnulib module rewinddir + + +EXTRA_DIST += dirent-private.h rewinddir.c + +EXTRA_libgnulib_a_SOURCES += rewinddir.c + +## end gnulib module rewinddir + +## begin gnulib module rmdir + + +EXTRA_DIST += rmdir.c + +EXTRA_libgnulib_a_SOURCES += rmdir.c + +## end gnulib module rmdir + +## begin gnulib module root-uid + + +EXTRA_DIST += root-uid.h + +## end gnulib module root-uid + +## begin gnulib module rpmatch + + +EXTRA_DIST += rpmatch.c + +EXTRA_libgnulib_a_SOURCES += rpmatch.c + +## end gnulib module rpmatch + +## begin gnulib module safe-read + +libgnulib_a_SOURCES += safe-read.c + +EXTRA_DIST += safe-read.h + +## end gnulib module safe-read + +## begin gnulib module same + +libgnulib_a_SOURCES += same.c + +EXTRA_DIST += same.h + +## end gnulib module same + +## begin gnulib module same-inode + + +EXTRA_DIST += same-inode.h + +## end gnulib module same-inode + +## begin gnulib module save-cwd + +libgnulib_a_SOURCES += save-cwd.c + +EXTRA_DIST += save-cwd.h + +## end gnulib module save-cwd + +## begin gnulib module savedir + +libgnulib_a_SOURCES += savedir.c + +EXTRA_DIST += savedir.h + +## end gnulib module savedir + +## begin gnulib module selinux-at + + +EXTRA_DIST += at-func.c selinux-at.c selinux-at.h + +EXTRA_libgnulib_a_SOURCES += at-func.c selinux-at.c + +## end gnulib module selinux-at + +## begin gnulib module selinux-h + +libgnulib_a_SOURCES += se-context.in.h se-selinux.in.h se-context.c se-selinux.c + +BUILT_SOURCES += selinux/selinux.h +selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) + $(AM_V_at)$(MKDIR_P) selinux + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \ + -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ + < $(srcdir)/se-selinux.in.h; \ + } > $@-t && \ + chmod a-x $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t + +BUILT_SOURCES += $(SELINUX_CONTEXT_H) +if GL_GENERATE_SELINUX_CONTEXT_H +selinux/context.h: se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) + $(AM_V_at)$(MKDIR_P) selinux + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ + < $(srcdir)/se-context.in.h; \ + } > $@-t && \ + chmod a-x $@-t && \ + mv $@-t $@ +else +selinux/context.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += selinux/context.h selinux/context.h-t +MOSTLYCLEANDIRS += selinux + +EXTRA_DIST += getfilecon.c + +EXTRA_libgnulib_a_SOURCES += getfilecon.c + +## end gnulib module selinux-h + +## begin gnulib module setenv + + +EXTRA_DIST += setenv.c + +EXTRA_libgnulib_a_SOURCES += setenv.c + +## end gnulib module setenv + +## begin gnulib module size_max + +libgnulib_a_SOURCES += size_max.h + +## end gnulib module size_max + +## begin gnulib module snippet/_Noreturn + +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all Makefile.am that +# need it. This is ensured by the applicability 'all' defined above. + +_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h + +EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h + +## end gnulib module snippet/_Noreturn + +## begin gnulib module snippet/arg-nonnull + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +BUILT_SOURCES += arg-nonnull.h +# The arg-nonnull.h that gets inserted into generated .h files is the same as +# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut +# off. +arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t + +ARG_NONNULL_H=arg-nonnull.h + +EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h + +## end gnulib module snippet/arg-nonnull + +## begin gnulib module snippet/c++defs + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +BUILT_SOURCES += c++defs.h +# The c++defs.h that gets inserted into generated .h files is the same as +# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. +c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/build-aux/snippet/c++defs.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += c++defs.h c++defs.h-t + +CXXDEFS_H=c++defs.h + +EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h + +## end gnulib module snippet/c++defs + +## begin gnulib module snippet/unused-parameter + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +BUILT_SOURCES += unused-parameter.h +# The unused-parameter.h that gets inserted into generated .h files is the same +# as build-aux/snippet/unused-parameter.h, except that it has the copyright +# header cut off. +unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ + < $(top_srcdir)/build-aux/snippet/unused-parameter.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t + +UNUSED_PARAMETER_H=unused-parameter.h + +EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h + +## end gnulib module snippet/unused-parameter + +## begin gnulib module snippet/warn-on-use + +BUILT_SOURCES += warn-on-use.h +# The warn-on-use.h that gets inserted into generated .h files is the same as +# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut +# off. +warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t + +WARN_ON_USE_H=warn-on-use.h + +EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h + +## end gnulib module snippet/warn-on-use + +## begin gnulib module snprintf + + +EXTRA_DIST += snprintf.c + +EXTRA_libgnulib_a_SOURCES += snprintf.c + +## end gnulib module snprintf + +## begin gnulib module sockets + +libgnulib_a_SOURCES += sockets.h sockets.c + +EXTRA_DIST += w32sock.h + +## end gnulib module sockets + +## begin gnulib module stat + + +EXTRA_DIST += stat.c + +EXTRA_libgnulib_a_SOURCES += stat.c + +## end gnulib module stat + +## begin gnulib module stat-macros + + +EXTRA_DIST += stat-macros.h + +## end gnulib module stat-macros + +## begin gnulib module stat-size + + +EXTRA_DIST += stat-size.h + +## end gnulib module stat-size + +## begin gnulib module stat-time + +libgnulib_a_SOURCES += stat-time.c + +EXTRA_DIST += stat-time.h + +## end gnulib module stat-time + +## begin gnulib module statat + +libgnulib_a_SOURCES += statat.c + +## end gnulib module statat + +## begin gnulib module stdalign + +BUILT_SOURCES += $(STDALIGN_H) + +# We need the following in order to create when the system +# doesn't have one that works. +if GL_GENERATE_STDALIGN_H +stdalign.h: stdalign.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/stdalign.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +stdalign.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += stdalign.h stdalign.h-t + +EXTRA_DIST += stdalign.in.h + +## end gnulib module stdalign + +## begin gnulib module stdarg + +BUILT_SOURCES += $(STDARG_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +if GL_GENERATE_STDARG_H +stdarg.h: stdarg.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ + < $(srcdir)/stdarg.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +stdarg.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += stdarg.h stdarg.h-t + +EXTRA_DIST += stdarg.in.h + +## end gnulib module stdarg + +## begin gnulib module stdbool + +BUILT_SOURCES += $(STDBOOL_H) + +# We need the following in order to create when the system +# doesn't have one that works. +if GL_GENERATE_STDBOOL_H +stdbool.h: stdbool.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +stdbool.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += stdbool.h stdbool.h-t + +EXTRA_DIST += stdbool.in.h + +## end gnulib module stdbool + +## begin gnulib module stddef + +BUILT_SOURCES += $(STDDEF_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +if GL_GENERATE_STDDEF_H +stddef.h: stddef.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ + -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ + -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ + < $(srcdir)/stddef.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +stddef.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += stddef.h stddef.h-t + +EXTRA_DIST += stddef.in.h + +## end gnulib module stddef + +## begin gnulib module stdint + +BUILT_SOURCES += $(STDINT_H) + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +if GL_GENERATE_STDINT_H +stdint.h: stdint.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ + -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ + -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ + -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ + -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ + -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ + -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ + -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ + -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ + -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ + -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ + -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ + -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ + -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ + -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ + -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ + < $(srcdir)/stdint.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +stdint.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += stdint.h stdint.h-t + +EXTRA_DIST += stdint.in.h + +## end gnulib module stdint + +## begin gnulib module stdio + +BUILT_SOURCES += stdio.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ + -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ + -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ + -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ + -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ + -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ + -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ + -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ + -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ + -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ + -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ + -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ + -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ + -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ + -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ + -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ + -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ + -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ + -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ + -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ + -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ + -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ + -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ + -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ + -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ + -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ + -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ + -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ + -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ + -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ + -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ + -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ + -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ + -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ + -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ + -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ + -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ + -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ + -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ + -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \ + -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \ + -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ + -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ + -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ + -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ + -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ + -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ + -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ + -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ + -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ + < $(srcdir)/stdio.in.h | \ + sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ + -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ + -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ + -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ + -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ + -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ + -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ + -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ + -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ + -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ + -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ + -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \ + -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \ + -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ + -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ + -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ + -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ + -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ + -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ + -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ + -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ + -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ + -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ + -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ + -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ + -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ + -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ + -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ + -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ + -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ + -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ + -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ + -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ + -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ + -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ + -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ + -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ + -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ + -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ + -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \ + -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ + -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ + -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ + -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ + -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ + -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ + -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ + -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ + -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += stdio.h stdio.h-t + +EXTRA_DIST += stdio.in.h + +## end gnulib module stdio + +## begin gnulib module stdlib + +BUILT_SOURCES += stdlib.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ + $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ + -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ + -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ + -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ + -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ + -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ + -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ + -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ + -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ + -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ + -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ + -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ + -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ + -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ + -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ + -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ + -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ + -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ + -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ + -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ + -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ + -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' \ + -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ + -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ + -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ + -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ + -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ + < $(srcdir)/stdlib.in.h | \ + sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ + -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ + -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ + -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ + -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ + -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ + -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ + -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ + -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ + -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ + -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ + -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ + -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ + -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ + -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ + -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ + -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' \ + -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ + -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ + -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ + -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ + -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ + -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ + -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ + -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' \ + -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ + -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ + -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ + -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ + -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ + -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _Noreturn/r $(_NORETURN_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += stdlib.h stdlib.h-t + +EXTRA_DIST += stdlib.in.h + +## end gnulib module stdlib + +## begin gnulib module stpcpy + + +EXTRA_DIST += stpcpy.c + +EXTRA_libgnulib_a_SOURCES += stpcpy.c + +## end gnulib module stpcpy + +## begin gnulib module strcase + + +EXTRA_DIST += strcasecmp.c strncasecmp.c + +EXTRA_libgnulib_a_SOURCES += strcasecmp.c strncasecmp.c + +## end gnulib module strcase + +## begin gnulib module strcasestr-simple + + +EXTRA_DIST += str-two-way.h strcasestr.c + +EXTRA_libgnulib_a_SOURCES += strcasestr.c + +## end gnulib module strcasestr-simple + +## begin gnulib module strdup-posix + + +EXTRA_DIST += strdup.c + +EXTRA_libgnulib_a_SOURCES += strdup.c + +## end gnulib module strdup-posix + +## begin gnulib module streq + + +EXTRA_DIST += streq.h + +## end gnulib module streq + +## begin gnulib module strerror + + +EXTRA_DIST += strerror.c + +EXTRA_libgnulib_a_SOURCES += strerror.c + +## end gnulib module strerror + +## begin gnulib module strerror-override + + +EXTRA_DIST += strerror-override.c strerror-override.h + +EXTRA_libgnulib_a_SOURCES += strerror-override.c + +## end gnulib module strerror-override + +## begin gnulib module strerror_r-posix + + +EXTRA_DIST += strerror_r.c + +EXTRA_libgnulib_a_SOURCES += strerror_r.c + +## end gnulib module strerror_r-posix + +## begin gnulib module strftime + +libgnulib_a_SOURCES += strftime.c + +EXTRA_DIST += strftime.h + +## end gnulib module strftime + +## begin gnulib module string + +BUILT_SOURCES += string.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ + -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ + -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ + -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ + -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ + -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ + -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ + -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ + -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ + -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ + -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ + -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ + -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ + -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ + -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ + -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ + -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ + -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ + -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ + -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ + -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ + -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ + -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ + -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ + -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ + -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ + -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ + -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ + -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ + -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ + -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ + -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ + -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ + -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ + -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ + -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ + -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ + -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ + < $(srcdir)/string.in.h | \ + sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ + -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ + -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ + -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ + -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ + -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ + -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ + -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ + -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ + -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ + -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ + -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ + -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ + -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ + -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ + -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ + -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ + -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ + -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ + -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ + -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ + -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ + -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ + -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ + -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ + -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ + -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ + -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ + -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ + -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ + -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ + -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ + -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ + -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ + -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ + -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + < $(srcdir)/string.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += string.h string.h-t + +EXTRA_DIST += string.in.h + +## end gnulib module string + +## begin gnulib module strings + +BUILT_SOURCES += strings.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ + -e 's|@''GNULIB_FFS''@|$(GNULIB_FFS)|g' \ + -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \ + -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ + -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/strings.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += strings.h strings.h-t + +EXTRA_DIST += strings.in.h + +## end gnulib module strings + +## begin gnulib module strndup + + +EXTRA_DIST += strndup.c + +EXTRA_libgnulib_a_SOURCES += strndup.c + +## end gnulib module strndup + +## begin gnulib module strnlen + + +EXTRA_DIST += strnlen.c + +EXTRA_libgnulib_a_SOURCES += strnlen.c + +## end gnulib module strnlen + +## begin gnulib module strnlen1 + +libgnulib_a_SOURCES += strnlen1.h strnlen1.c + +## end gnulib module strnlen1 + +## begin gnulib module strstr-simple + + +EXTRA_DIST += str-two-way.h strstr.c + +EXTRA_libgnulib_a_SOURCES += strstr.c + +## end gnulib module strstr-simple + +## begin gnulib module strtol + + +EXTRA_DIST += strtol.c + +EXTRA_libgnulib_a_SOURCES += strtol.c + +## end gnulib module strtol + +## begin gnulib module strtoul + + +EXTRA_DIST += strtol.c strtoul.c + +EXTRA_libgnulib_a_SOURCES += strtol.c strtoul.c + +## end gnulib module strtoul + +## begin gnulib module strtoull + + +EXTRA_DIST += strtol.c strtoul.c strtoull.c + +EXTRA_libgnulib_a_SOURCES += strtol.c strtoul.c strtoull.c + +## end gnulib module strtoull + +## begin gnulib module strtoumax + + +EXTRA_DIST += strtoimax.c strtoumax.c + +EXTRA_libgnulib_a_SOURCES += strtoimax.c strtoumax.c + +## end gnulib module strtoumax + +## begin gnulib module sys_socket + +BUILT_SOURCES += sys/socket.h +libgnulib_a_SOURCES += sys_socket.c + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ + -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ + -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ + -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \ + -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \ + -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \ + -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \ + -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \ + -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \ + -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \ + -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \ + -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \ + -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \ + -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \ + -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \ + -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \ + -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \ + -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \ + -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ + -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_socket.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_socket.in.h + +## end gnulib module sys_socket + +## begin gnulib module sys_stat + +BUILT_SOURCES += sys/stat.h + +# We need the following in order to create when the system +# has one that is incomplete. +sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ + -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ + -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ + -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ + -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ + -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ + -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ + -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ + -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ + -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ + -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ + -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ + -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ + -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ + -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ + -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ + -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ + -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ + -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ + -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ + -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ + -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ + -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ + -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ + -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ + -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ + -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ + -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ + -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ + -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ + -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ + -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ + -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ + -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ + -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_stat.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_stat.in.h + +## end gnulib module sys_stat + +## begin gnulib module sys_time + +BUILT_SOURCES += sys/time.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_time.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/time.h sys/time.h-t + +EXTRA_DIST += sys_time.in.h + +## end gnulib module sys_time + +## begin gnulib module sys_types + +BUILT_SOURCES += sys/types.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/types.h: sys_types.in.h $(top_builddir)/config.status + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ + -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ + < $(srcdir)/sys_types.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/types.h sys/types.h-t + +EXTRA_DIST += sys_types.in.h + +## end gnulib module sys_types + +## begin gnulib module sys_uio + +BUILT_SOURCES += sys/uio.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/uio.h: sys_uio.in.h $(top_builddir)/config.status + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \ + -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \ + < $(srcdir)/sys_uio.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +MOSTLYCLEANFILES += sys/uio.h sys/uio.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_uio.in.h + +## end gnulib module sys_uio + +## begin gnulib module sys_utsname + +BUILT_SOURCES += sys/utsname.h + +# We need the following in order to create when the system +# does not have one. +sys/utsname.h: sys_utsname.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's/@''HAVE_SYS_UTSNAME_H''@/$(HAVE_SYS_UTSNAME_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_UTSNAME_H''@|$(NEXT_SYS_UTSNAME_H)|g' \ + -e 's/@''GNULIB_UNAME''@/$(GNULIB_UNAME)/g' \ + -e 's|@''HAVE_STRUCT_UTSNAME''@|$(HAVE_STRUCT_UTSNAME)|g' \ + -e 's|@''HAVE_UNAME''@|$(HAVE_UNAME)|g' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_utsname.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/utsname.h sys/utsname.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_utsname.in.h + +## end gnulib module sys_utsname + +## begin gnulib module sys_wait + +BUILT_SOURCES += sys/wait.h + +# We need the following in order to create when the system +# has one that is incomplete. +sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \ + -e 's/@''GNULIB_WAITPID''@/$(GNULIB_WAITPID)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_wait.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/wait.h sys/wait.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_wait.in.h + +## end gnulib module sys_wait + +## begin gnulib module threadlib + +libgnulib_a_SOURCES += glthread/threadlib.c + +EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath + +## end gnulib module threadlib + +## begin gnulib module time + +BUILT_SOURCES += time.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ + -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ + -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ + -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ + -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ + -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ + -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ + -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ + -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ + -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ + -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ + -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ + -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ + -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ + -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ + -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/time.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += time.h time.h-t + +EXTRA_DIST += time.in.h + +## end gnulib module time + +## begin gnulib module time_r + + +EXTRA_DIST += time_r.c + +EXTRA_libgnulib_a_SOURCES += time_r.c + +## end gnulib module time_r + +## begin gnulib module timespec + +libgnulib_a_SOURCES += timespec.c + +EXTRA_DIST += timespec.h + +## end gnulib module timespec + +## begin gnulib module trunc + + +EXTRA_DIST += trunc.c + +EXTRA_libgnulib_a_SOURCES += trunc.c + +## end gnulib module trunc + +## begin gnulib module uname + + +EXTRA_DIST += uname.c + +EXTRA_libgnulib_a_SOURCES += uname.c + +## end gnulib module uname + +## begin gnulib module unistd + +BUILT_SOURCES += unistd.h +libgnulib_a_SOURCES += unistd.c + +# We need the following in order to create an empty placeholder for +# when the system doesn't have one. +unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ + -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ + -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ + -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ + -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ + -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ + -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ + -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ + -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ + -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ + -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ + -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ + -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ + -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ + -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ + -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ + -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ + -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ + -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ + -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ + -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ + -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ + -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ + -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ + -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ + -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ + -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ + -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ + -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ + -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ + -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ + -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ + -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ + -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ + -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ + -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ + -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ + -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ + -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ + -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ + -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ + -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ + -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ + -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ + -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ + -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ + -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ + -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ + -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ + -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ + -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ + < $(srcdir)/unistd.in.h | \ + sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ + -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ + -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ + -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ + -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ + -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ + -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ + -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ + -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ + -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ + -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ + -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ + -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ + -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ + -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ + -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ + -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ + -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ + -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ + -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ + -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ + -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ + -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ + -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ + -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ + -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ + -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ + -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ + -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ + -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ + -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ + -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ + -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ + -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ + -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ + -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ + -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ + -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ + -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ + -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ + -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ + -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ + | \ + sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ + -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ + -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ + -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ + -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ + -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ + -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ + -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ + -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \ + -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ + -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ + -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ + -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ + -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ + -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ + -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ + -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ + -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ + -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ + -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ + -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ + -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ + -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ + -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ + -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ + -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ + -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ + -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ + -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ + -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ + -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += unistd.h unistd.h-t + +EXTRA_DIST += unistd.in.h + +## end gnulib module unistd + +## begin gnulib module unistd-safer + +libgnulib_a_SOURCES += dup-safer.c fd-safer.c pipe-safer.c + +EXTRA_DIST += unistd--.h unistd-safer.h + +## end gnulib module unistd-safer + +## begin gnulib module unitypes + +BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H) + +unitypes.h: unitypes.in.h + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/unitypes.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +MOSTLYCLEANFILES += unitypes.h unitypes.h-t + +EXTRA_DIST += unitypes.in.h + +## end gnulib module unitypes + +## begin gnulib module uniwidth/base + +BUILT_SOURCES += $(LIBUNISTRING_UNIWIDTH_H) + +uniwidth.h: uniwidth.in.h + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/uniwidth.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +MOSTLYCLEANFILES += uniwidth.h uniwidth.h-t + +EXTRA_DIST += localcharset.h uniwidth.in.h + +## end gnulib module uniwidth/base + +## begin gnulib module uniwidth/width + +if LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH +libgnulib_a_SOURCES += uniwidth/width.c +endif + +EXTRA_DIST += uniwidth/cjk.h + +## end gnulib module uniwidth/width + +## begin gnulib module unlink + + +EXTRA_DIST += unlink.c + +EXTRA_libgnulib_a_SOURCES += unlink.c + +## end gnulib module unlink + +## begin gnulib module unlinkat + + +EXTRA_DIST += at-func.c unlinkat.c + +EXTRA_libgnulib_a_SOURCES += at-func.c unlinkat.c + +## end gnulib module unlinkat + +## begin gnulib module unsetenv + + +EXTRA_DIST += unsetenv.c + +EXTRA_libgnulib_a_SOURCES += unsetenv.c + +## end gnulib module unsetenv + +## begin gnulib module update-copyright + + +EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright + +## end gnulib module update-copyright + +## begin gnulib module useless-if-before-free + + +EXTRA_DIST += $(top_srcdir)/build-aux/useless-if-before-free + +## end gnulib module useless-if-before-free + +## begin gnulib module vasnprintf + + +EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h + +EXTRA_libgnulib_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c + +## end gnulib module vasnprintf + +## begin gnulib module vc-list-files + + +EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files + +## end gnulib module vc-list-files + +## begin gnulib module verify + + +EXTRA_DIST += verify.h + +## end gnulib module verify + +## begin gnulib module version-etc + +libgnulib_a_SOURCES += version-etc.h version-etc.c + +## end gnulib module version-etc + +## begin gnulib module version-etc-fsf + +libgnulib_a_SOURCES += version-etc-fsf.c + +## end gnulib module version-etc-fsf + +## begin gnulib module wchar + +BUILT_SOURCES += wchar.h + +# We need the following in order to create when the system +# version does not work standalone. +wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ + -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ + -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ + -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ + -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ + -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ + -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ + -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ + -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ + -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ + -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ + -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ + -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ + -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ + -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ + -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ + -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ + -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ + -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ + -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ + -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ + -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ + -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ + -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ + -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ + -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ + -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ + -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ + -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ + -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ + -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ + -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ + -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ + -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ + -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ + -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ + -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ + -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ + -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ + -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ + -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ + -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ + < $(srcdir)/wchar.in.h | \ + sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ + -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ + -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ + -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ + -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ + -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ + -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ + -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ + -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ + -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ + -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ + -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ + -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ + -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ + -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ + -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ + -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ + -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ + -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ + -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ + -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ + -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ + -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ + -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ + -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ + -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ + -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ + -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ + -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ + -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ + -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ + -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ + -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ + -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ + -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ + -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ + -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ + -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ + -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ + -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ + | \ + sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ + -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ + -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ + -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ + -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ + -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ + -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ + -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ + -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ + -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ + -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ + -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ + -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += wchar.h wchar.h-t + +EXTRA_DIST += wchar.in.h + +## end gnulib module wchar + +## begin gnulib module wcrtomb + + +EXTRA_DIST += wcrtomb.c + +EXTRA_libgnulib_a_SOURCES += wcrtomb.c + +## end gnulib module wcrtomb + +## begin gnulib module wctype-h + +BUILT_SOURCES += wctype.h +libgnulib_a_SOURCES += wctype-h.c + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ + -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ + -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ + -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ + -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ + -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ + -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ + -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ + -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ + -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ + -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ + -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ + -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ + -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/wctype.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += wctype.h wctype.h-t + +EXTRA_DIST += wctype.in.h + +## end gnulib module wctype-h + +## begin gnulib module wcwidth + + +EXTRA_DIST += wcwidth.c + +EXTRA_libgnulib_a_SOURCES += wcwidth.c + +## end gnulib module wcwidth + +## begin gnulib module xalloc + +libgnulib_a_SOURCES += xmalloc.c + +EXTRA_DIST += xalloc.h + +## end gnulib module xalloc + +## begin gnulib module xalloc-die + +libgnulib_a_SOURCES += xalloc-die.c + +## end gnulib module xalloc-die + +## begin gnulib module xalloc-oversized + + +EXTRA_DIST += xalloc-oversized.h + +## end gnulib module xalloc-oversized + +## begin gnulib module xgetcwd + +libgnulib_a_SOURCES += xgetcwd.c + +EXTRA_DIST += xgetcwd.h + +## end gnulib module xgetcwd + +## begin gnulib module xsize + +libgnulib_a_SOURCES += xsize.h xsize.c + +## end gnulib module xsize + +## begin gnulib module xstrndup + +libgnulib_a_SOURCES += xstrndup.h xstrndup.c + +## end gnulib module xstrndup + +## begin gnulib module xstrtod + +libgnulib_a_SOURCES += xstrtod.c + +EXTRA_DIST += xstrtod.h + +## end gnulib module xstrtod + +## begin gnulib module xstrtol + +libgnulib_a_SOURCES += xstrtol.c xstrtoul.c xstrtol-error.c + +EXTRA_DIST += xstrtol.h + +## end gnulib module xstrtol + +## begin gnulib module xstrtoumax + +libgnulib_a_SOURCES += xstrtoumax.c + +## end gnulib module xstrtoumax + +## begin gnulib module yesno + +libgnulib_a_SOURCES += yesno.c + +EXTRA_DIST += yesno.h + +## end gnulib module yesno + + +mostlyclean-local: mostlyclean-generic + @for dir in '' $(MOSTLYCLEANDIRS); do \ + if test -n "$$dir" && test -d $$dir; then \ + echo "rmdir $$dir"; rmdir $$dir; \ + fi; \ + done; \ + : diff --git a/gl/lib/Makefile.in b/gl/lib/Makefile.in new file mode 100644 index 0000000..93354fc --- /dev/null +++ b/gl/lib/Makefile.in @@ -0,0 +1,4132 @@ +# Makefile.in generated by automake 1.11.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in 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 program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Copyright (C) 2002-2014 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . +# +# As a special exception to the GNU General Public License, +# this file may be distributed as part of a program that +# contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnulib --source-base=gl/lib --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca areadlinkat argmatch assert byteswap c-strcasestr c-strstr canonicalize cloexec closein closeout ctype d-ino d-type dirent-safer dirname errno error faccessat fchdir fcntl fdl fdopendir fflush fileblocks filemode fnmatch-gnu fopen-safer fts getdelim getline getopt-gnu gettext gettimeofday gpl-3.0 hash human idcache inline inttypes isblank locale lstat maintainer-makefile malloc manywarnings math mbrtowc mbscasestr mbsstr mktime modechange modf mountlist open parse-datetime pathmax perror progname quotearg readlink realloc regex rpmatch safe-read save-cwd savedir selinux-at snprintf stat stat-macros stat-size stat-time stdarg stdbool stddef stdint stdio stdlib stpcpy strcasestr strdup-posix strftime string strndup strtol strtoul strtoull strtoumax sys_stat sys_time sys_wait timespec uname unlinkat update-copyright verify version-etc version-etc-fsf warnings wchar wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno + + + +VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_1 = uniwidth/width.c +subdir = gl/lib +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in alloca.c parse-datetime.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ + $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ + $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +libgnulib_a_AR = $(AR) $(ARFLAGS) +am__DEPENDENCIES_1 = +am__libgnulib_a_SOURCES_DIST = allocator.c areadlink.c \ + areadlink-with-size.c areadlinkat.c argmatch.c bitrotate.h \ + bitrotate.c c-ctype.h c-ctype.c c-strcase.h c-strcasecmp.c \ + c-strncasecmp.c c-strcasestr.h c-strcasestr.c c-strstr.h \ + c-strstr.c canonicalize.c careadlinkat.c cloexec.c \ + close-stream.c closein.c closeout.c cycle-check.c \ + opendir-safer.c dirname.c basename.c dirname-lgpl.c \ + basename-lgpl.c stripslash.c exitfail.c creat-safer.c \ + open-safer.c fd-hook.c file-set.c filemode.c \ + filenamecat-lgpl.c fopen-safer.c freading.c gettext.h \ + gettime.c hash.c hash-pjw.h hash-pjw.c hash-triple.c human.c \ + i-ring.c idcache.c localcharset.h localcharset.c \ + glthread/lock.h glthread/lock.c malloca.c math.c mbchar.c \ + mbscasestr.c mbslen.c mbsstr.c mbuiter.h mbuiter.c \ + modechange.c openat-die.c openat-safer.c parse-datetime.y \ + progname.h progname.c quotearg.c safe-read.c same.c save-cwd.c \ + savedir.c se-context.in.h se-selinux.in.h se-context.c \ + se-selinux.c size_max.h sockets.h sockets.c stat-time.c \ + statat.c strftime.c strnlen1.h strnlen1.c sys_socket.c \ + glthread/threadlib.c timespec.c unistd.c dup-safer.c \ + fd-safer.c pipe-safer.c uniwidth/width.c version-etc.h \ + version-etc.c version-etc-fsf.c wctype-h.c xmalloc.c \ + xalloc-die.c xgetcwd.c xsize.h xsize.c xstrndup.h xstrndup.c \ + xstrtod.c xstrtol.c xstrtoul.c xstrtol-error.c xstrtoumax.c \ + yesno.c +am__dirstamp = $(am__leading_dot)dirstamp +@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__objects_1 = uniwidth/width.$(OBJEXT) +am_libgnulib_a_OBJECTS = allocator.$(OBJEXT) areadlink.$(OBJEXT) \ + areadlink-with-size.$(OBJEXT) areadlinkat.$(OBJEXT) \ + argmatch.$(OBJEXT) bitrotate.$(OBJEXT) c-ctype.$(OBJEXT) \ + c-strcasecmp.$(OBJEXT) c-strncasecmp.$(OBJEXT) \ + c-strcasestr.$(OBJEXT) c-strstr.$(OBJEXT) \ + canonicalize.$(OBJEXT) careadlinkat.$(OBJEXT) \ + cloexec.$(OBJEXT) close-stream.$(OBJEXT) closein.$(OBJEXT) \ + closeout.$(OBJEXT) cycle-check.$(OBJEXT) \ + opendir-safer.$(OBJEXT) dirname.$(OBJEXT) basename.$(OBJEXT) \ + dirname-lgpl.$(OBJEXT) basename-lgpl.$(OBJEXT) \ + stripslash.$(OBJEXT) exitfail.$(OBJEXT) creat-safer.$(OBJEXT) \ + open-safer.$(OBJEXT) fd-hook.$(OBJEXT) file-set.$(OBJEXT) \ + filemode.$(OBJEXT) filenamecat-lgpl.$(OBJEXT) \ + fopen-safer.$(OBJEXT) freading.$(OBJEXT) gettime.$(OBJEXT) \ + hash.$(OBJEXT) hash-pjw.$(OBJEXT) hash-triple.$(OBJEXT) \ + human.$(OBJEXT) i-ring.$(OBJEXT) idcache.$(OBJEXT) \ + localcharset.$(OBJEXT) glthread/lock.$(OBJEXT) \ + malloca.$(OBJEXT) math.$(OBJEXT) mbchar.$(OBJEXT) \ + mbscasestr.$(OBJEXT) mbslen.$(OBJEXT) mbsstr.$(OBJEXT) \ + mbuiter.$(OBJEXT) modechange.$(OBJEXT) openat-die.$(OBJEXT) \ + openat-safer.$(OBJEXT) parse-datetime.$(OBJEXT) \ + progname.$(OBJEXT) quotearg.$(OBJEXT) safe-read.$(OBJEXT) \ + same.$(OBJEXT) save-cwd.$(OBJEXT) savedir.$(OBJEXT) \ + se-context.$(OBJEXT) se-selinux.$(OBJEXT) sockets.$(OBJEXT) \ + stat-time.$(OBJEXT) statat.$(OBJEXT) strftime.$(OBJEXT) \ + strnlen1.$(OBJEXT) sys_socket.$(OBJEXT) \ + glthread/threadlib.$(OBJEXT) timespec.$(OBJEXT) \ + unistd.$(OBJEXT) dup-safer.$(OBJEXT) fd-safer.$(OBJEXT) \ + pipe-safer.$(OBJEXT) $(am__objects_1) version-etc.$(OBJEXT) \ + version-etc-fsf.$(OBJEXT) wctype-h.$(OBJEXT) xmalloc.$(OBJEXT) \ + xalloc-die.$(OBJEXT) xgetcwd.$(OBJEXT) xsize.$(OBJEXT) \ + xstrndup.$(OBJEXT) xstrtod.$(OBJEXT) xstrtol.$(OBJEXT) \ + xstrtoul.$(OBJEXT) xstrtol-error.$(OBJEXT) \ + xstrtoumax.$(OBJEXT) yesno.$(OBJEXT) +libgnulib_a_OBJECTS = $(am_libgnulib_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +YLWRAP = $(top_srcdir)/build-aux/ylwrap +SOURCES = $(libgnulib_a_SOURCES) $(EXTRA_libgnulib_a_SOURCES) +DIST_SOURCES = $(am__libgnulib_a_SOURCES_DIST) \ + $(EXTRA_libgnulib_a_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(noinst_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +pkglibexecdir = @pkglibexecdir@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +ALLOCA_H = @ALLOCA_H@ +AMTAR = @AMTAR@ +APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AUXDIR = @AUXDIR@ +AWK = @AWK@ +BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ +BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ +BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ +BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ +BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIG_INCLUDE = @CONFIG_INCLUDE@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFAULT_ARG_SIZE = @DEFAULT_ARG_SIZE@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ +EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ +ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ +ENOLINK_VALUE = @ENOLINK_VALUE@ +EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ +EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ +ERRNO_H = @ERRNO_H@ +EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ +FINDLIBOBJS = @FINDLIBOBJS@ +FINDLIBS = @FINDLIBS@ +FLOAT_H = @FLOAT_H@ +FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ +GETOPT_H = @GETOPT_H@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GLIBC21 = @GLIBC21@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ +GNULIB_ACOSL = @GNULIB_ACOSL@ +GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ +GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ +GNULIB_ATANL = @GNULIB_ATANL@ +GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ +GNULIB_BTOWC = @GNULIB_BTOWC@ +GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ +GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ +GNULIB_CEIL = @GNULIB_CEIL@ +GNULIB_CEILF = @GNULIB_CEILF@ +GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ +GNULIB_CHOWN = @GNULIB_CHOWN@ +GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ +GNULIB_COSL = @GNULIB_COSL@ +GNULIB_DIRFD = @GNULIB_DIRFD@ +GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ +GNULIB_DUP2 = @GNULIB_DUP2@ +GNULIB_DUP3 = @GNULIB_DUP3@ +GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ +GNULIB_ENVIRON = @GNULIB_ENVIRON@ +GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ +GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ +GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ +GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ +GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ +GNULIB_FCLOSE = @GNULIB_FCLOSE@ +GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ +GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ +GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ +GNULIB_FLOOR = @GNULIB_FLOOR@ +GNULIB_FLOORF = @GNULIB_FLOORF@ +GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ +GNULIB_FOPEN = @GNULIB_FOPEN@ +GNULIB_FPRINTF = @GNULIB_FPRINTF@ +GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FPURGE = @GNULIB_FPURGE@ +GNULIB_FPUTC = @GNULIB_FPUTC@ +GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ +GNULIB_FREOPEN = @GNULIB_FREOPEN@ +GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ +GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ +GNULIB_FSEEK = @GNULIB_FSEEK@ +GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ +GNULIB_FSTATAT = @GNULIB_FSTATAT@ +GNULIB_FSYNC = @GNULIB_FSYNC@ +GNULIB_FTELL = @GNULIB_FTELL@ +GNULIB_FTELLO = @GNULIB_FTELLO@ +GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ +GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ +GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ +GNULIB_GETCWD = @GNULIB_GETCWD@ +GNULIB_GETDELIM = @GNULIB_GETDELIM@ +GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ +GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ +GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ +GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ +GNULIB_GETLINE = @GNULIB_GETLINE@ +GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ +GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ +GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ +GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ +GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ +GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ +GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ +GNULIB_ISBLANK = @GNULIB_ISBLANK@ +GNULIB_ISFINITE = @GNULIB_ISFINITE@ +GNULIB_ISINF = @GNULIB_ISINF@ +GNULIB_ISNAN = @GNULIB_ISNAN@ +GNULIB_ISNAND = @GNULIB_ISNAND@ +GNULIB_ISNANF = @GNULIB_ISNANF@ +GNULIB_ISNANL = @GNULIB_ISNANL@ +GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ +GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ +GNULIB_LCHMOD = @GNULIB_LCHMOD@ +GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ +GNULIB_LDEXPL = @GNULIB_LDEXPL@ +GNULIB_LINK = @GNULIB_LINK@ +GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ +GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ +GNULIB_LOGL = @GNULIB_LOGL@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_LSTAT = @GNULIB_LSTAT@ +GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ +GNULIB_MBRLEN = @GNULIB_MBRLEN@ +GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ +GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ +GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ +GNULIB_MBSCHR = @GNULIB_MBSCHR@ +GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ +GNULIB_MBSINIT = @GNULIB_MBSINIT@ +GNULIB_MBSLEN = @GNULIB_MBSLEN@ +GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ +GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ +GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ +GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ +GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ +GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ +GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ +GNULIB_MBSSEP = @GNULIB_MBSSEP@ +GNULIB_MBSSPN = @GNULIB_MBSSPN@ +GNULIB_MBSSTR = @GNULIB_MBSSTR@ +GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ +GNULIB_MBTOWC = @GNULIB_MBTOWC@ +GNULIB_MEMCHR = @GNULIB_MEMCHR@ +GNULIB_MEMMEM = @GNULIB_MEMMEM@ +GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ +GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ +GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ +GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ +GNULIB_MKFIFO = @GNULIB_MKFIFO@ +GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ +GNULIB_MKNOD = @GNULIB_MKNOD@ +GNULIB_MKNODAT = @GNULIB_MKNODAT@ +GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ +GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ +GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ +GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ +GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ +GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ +GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ +GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ +GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ +GNULIB_OPEN = @GNULIB_OPEN@ +GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ +GNULIB_PERROR = @GNULIB_PERROR@ +GNULIB_PIPE = @GNULIB_PIPE@ +GNULIB_PIPE2 = @GNULIB_PIPE2@ +GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ +GNULIB_PREAD = @GNULIB_PREAD@ +GNULIB_PRINTF = @GNULIB_PRINTF@ +GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ +GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ +GNULIB_PUTC = @GNULIB_PUTC@ +GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ +GNULIB_PUTENV = @GNULIB_PUTENV@ +GNULIB_PUTS = @GNULIB_PUTS@ +GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ +GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ +GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ +GNULIB_READLINK = @GNULIB_READLINK@ +GNULIB_READLINKAT = @GNULIB_READLINKAT@ +GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ +GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ +GNULIB_REMOVE = @GNULIB_REMOVE@ +GNULIB_RENAME = @GNULIB_RENAME@ +GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ +GNULIB_RMDIR = @GNULIB_RMDIR@ +GNULIB_ROUND = @GNULIB_ROUND@ +GNULIB_ROUNDF = @GNULIB_ROUNDF@ +GNULIB_ROUNDL = @GNULIB_ROUNDL@ +GNULIB_RPMATCH = @GNULIB_RPMATCH@ +GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ +GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ +GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ +GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ +GNULIB_SINL = @GNULIB_SINL@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ +GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ +GNULIB_SQRTL = @GNULIB_SQRTL@ +GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ +GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ +GNULIB_STPCPY = @GNULIB_STPCPY@ +GNULIB_STPNCPY = @GNULIB_STPNCPY@ +GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ +GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ +GNULIB_STRDUP = @GNULIB_STRDUP@ +GNULIB_STRERROR = @GNULIB_STRERROR@ +GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ +GNULIB_STRNCAT = @GNULIB_STRNCAT@ +GNULIB_STRNDUP = @GNULIB_STRNDUP@ +GNULIB_STRNLEN = @GNULIB_STRNLEN@ +GNULIB_STRPBRK = @GNULIB_STRPBRK@ +GNULIB_STRPTIME = @GNULIB_STRPTIME@ +GNULIB_STRSEP = @GNULIB_STRSEP@ +GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ +GNULIB_STRSTR = @GNULIB_STRSTR@ +GNULIB_STRTOD = @GNULIB_STRTOD@ +GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ +GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ +GNULIB_STRTOLL = @GNULIB_STRTOLL@ +GNULIB_STRTOULL = @GNULIB_STRTOULL@ +GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ +GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ +GNULIB_SYMLINK = @GNULIB_SYMLINK@ +GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ +GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ +GNULIB_TANL = @GNULIB_TANL@ +GNULIB_TIMEGM = @GNULIB_TIMEGM@ +GNULIB_TIME_R = @GNULIB_TIME_R@ +GNULIB_TMPFILE = @GNULIB_TMPFILE@ +GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ +GNULIB_TRUNC = @GNULIB_TRUNC@ +GNULIB_TRUNCF = @GNULIB_TRUNCF@ +GNULIB_TRUNCL = @GNULIB_TRUNCL@ +GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ +GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ +GNULIB_UNLINK = @GNULIB_UNLINK@ +GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ +GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ +GNULIB_UNSETENV = @GNULIB_UNSETENV@ +GNULIB_USLEEP = @GNULIB_USLEEP@ +GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ +GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ +GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ +GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ +GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ +GNULIB_VPRINTF = @GNULIB_VPRINTF@ +GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ +GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ +GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ +GNULIB_WAITPID = @GNULIB_WAITPID@ +GNULIB_WCPCPY = @GNULIB_WCPCPY@ +GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ +GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ +GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ +GNULIB_WCSCAT = @GNULIB_WCSCAT@ +GNULIB_WCSCHR = @GNULIB_WCSCHR@ +GNULIB_WCSCMP = @GNULIB_WCSCMP@ +GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ +GNULIB_WCSCPY = @GNULIB_WCSCPY@ +GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ +GNULIB_WCSDUP = @GNULIB_WCSDUP@ +GNULIB_WCSLEN = @GNULIB_WCSLEN@ +GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ +GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ +GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ +GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ +GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ +GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ +GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ +GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ +GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ +GNULIB_WCSSPN = @GNULIB_WCSSPN@ +GNULIB_WCSSTR = @GNULIB_WCSSTR@ +GNULIB_WCSTOK = @GNULIB_WCSTOK@ +GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ +GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ +GNULIB_WCTOB = @GNULIB_WCTOB@ +GNULIB_WCTOMB = @GNULIB_WCTOMB@ +GNULIB_WCTRANS = @GNULIB_WCTRANS@ +GNULIB_WCTYPE = @GNULIB_WCTYPE@ +GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ +GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ +GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ +GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ +GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ +GNULIB_WMEMSET = @GNULIB_WMEMSET@ +GNULIB_WRITE = @GNULIB_WRITE@ +GNULIB__EXIT = @GNULIB__EXIT@ +GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ +HAVE_ACOSL = @HAVE_ACOSL@ +HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ +HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ +HAVE_ATANL = @HAVE_ATANL@ +HAVE_ATOLL = @HAVE_ATOLL@ +HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ +HAVE_BTOWC = @HAVE_BTOWC@ +HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ +HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ +HAVE_COSL = @HAVE_COSL@ +HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ +HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ +HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ +HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ +HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ +HAVE_DECL_COSL = @HAVE_DECL_COSL@ +HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ +HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ +HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ +HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ +HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ +HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ +HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ +HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ +HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ +HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ +HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ +HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ +HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ +HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ +HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ +HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ +HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ +HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ +HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ +HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ +HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ +HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ +HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ +HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ +HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ +HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ +HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ +HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ +HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ +HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ +HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ +HAVE_DECL_SINL = @HAVE_DECL_SINL@ +HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ +HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ +HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ +HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ +HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ +HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ +HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ +HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ +HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ +HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ +HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ +HAVE_DECL_TANL = @HAVE_DECL_TANL@ +HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ +HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ +HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ +HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ +HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ +HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ +HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ +HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ +HAVE_DPRINTF = @HAVE_DPRINTF@ +HAVE_DUP2 = @HAVE_DUP2@ +HAVE_DUP3 = @HAVE_DUP3@ +HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ +HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ +HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ +HAVE_FACCESSAT = @HAVE_FACCESSAT@ +HAVE_FCHDIR = @HAVE_FCHDIR@ +HAVE_FCHMODAT = @HAVE_FCHMODAT@ +HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ +HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ +HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ +HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ +HAVE_FSEEKO = @HAVE_FSEEKO@ +HAVE_FSTATAT = @HAVE_FSTATAT@ +HAVE_FSYNC = @HAVE_FSYNC@ +HAVE_FTELLO = @HAVE_FTELLO@ +HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ +HAVE_FUTIMENS = @HAVE_FUTIMENS@ +HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ +HAVE_GETGROUPS = @HAVE_GETGROUPS@ +HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ +HAVE_GETLOGIN = @HAVE_GETLOGIN@ +HAVE_GETOPT_H = @HAVE_GETOPT_H@ +HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ +HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ +HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ +HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_ISBLANK = @HAVE_ISBLANK@ +HAVE_ISNAND = @HAVE_ISNAND@ +HAVE_ISNANF = @HAVE_ISNANF@ +HAVE_ISNANL = @HAVE_ISNANL@ +HAVE_ISWBLANK = @HAVE_ISWBLANK@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ +HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ +HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ +HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ +HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ +HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ +HAVE_LCHMOD = @HAVE_LCHMOD@ +HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ +HAVE_LINK = @HAVE_LINK@ +HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ +HAVE_LOGL = @HAVE_LOGL@ +HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MBRLEN = @HAVE_MBRLEN@ +HAVE_MBRTOWC = @HAVE_MBRTOWC@ +HAVE_MBSINIT = @HAVE_MBSINIT@ +HAVE_MBSLEN = @HAVE_MBSLEN@ +HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ +HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ +HAVE_MEMCHR = @HAVE_MEMCHR@ +HAVE_MEMPCPY = @HAVE_MEMPCPY@ +HAVE_MKDIRAT = @HAVE_MKDIRAT@ +HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_MKFIFO = @HAVE_MKFIFO@ +HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ +HAVE_MKNOD = @HAVE_MKNOD@ +HAVE_MKNODAT = @HAVE_MKNODAT@ +HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ +HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ +HAVE_MKSTEMP = @HAVE_MKSTEMP@ +HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ +HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ +HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ +HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ +HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ +HAVE_PIPE = @HAVE_PIPE@ +HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ +HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ +HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ +HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ +HAVE_RANDOM_H = @HAVE_RANDOM_H@ +HAVE_RANDOM_R = @HAVE_RANDOM_R@ +HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ +HAVE_READLINK = @HAVE_READLINK@ +HAVE_READLINKAT = @HAVE_READLINKAT@ +HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ +HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ +HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ +HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ +HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ +HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ +HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ +HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ +HAVE_SINL = @HAVE_SINL@ +HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ +HAVE_SQRTL = @HAVE_SQRTL@ +HAVE_STDINT_H = @HAVE_STDINT_H@ +HAVE_STPCPY = @HAVE_STPCPY@ +HAVE_STPNCPY = @HAVE_STPNCPY@ +HAVE_STRCASECMP = @HAVE_STRCASECMP@ +HAVE_STRCASESTR = @HAVE_STRCASESTR@ +HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ +HAVE_STRPBRK = @HAVE_STRPBRK@ +HAVE_STRPTIME = @HAVE_STRPTIME@ +HAVE_STRSEP = @HAVE_STRSEP@ +HAVE_STRTOD = @HAVE_STRTOD@ +HAVE_STRTOLL = @HAVE_STRTOLL@ +HAVE_STRTOULL = @HAVE_STRTOULL@ +HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ +HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ +HAVE_SYMLINK = @HAVE_SYMLINK@ +HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ +HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ +HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ +HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ +HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ +HAVE_TANL = @HAVE_TANL@ +HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ +HAVE_UNISTD_H = @HAVE_UNISTD_H@ +HAVE_UNLINKAT = @HAVE_UNLINKAT@ +HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ +HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_USLEEP = @HAVE_USLEEP@ +HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ +HAVE_VASPRINTF = @HAVE_VASPRINTF@ +HAVE_VDPRINTF = @HAVE_VDPRINTF@ +HAVE_WCHAR_H = @HAVE_WCHAR_H@ +HAVE_WCHAR_T = @HAVE_WCHAR_T@ +HAVE_WCPCPY = @HAVE_WCPCPY@ +HAVE_WCPNCPY = @HAVE_WCPNCPY@ +HAVE_WCRTOMB = @HAVE_WCRTOMB@ +HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ +HAVE_WCSCAT = @HAVE_WCSCAT@ +HAVE_WCSCHR = @HAVE_WCSCHR@ +HAVE_WCSCMP = @HAVE_WCSCMP@ +HAVE_WCSCOLL = @HAVE_WCSCOLL@ +HAVE_WCSCPY = @HAVE_WCSCPY@ +HAVE_WCSCSPN = @HAVE_WCSCSPN@ +HAVE_WCSDUP = @HAVE_WCSDUP@ +HAVE_WCSLEN = @HAVE_WCSLEN@ +HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ +HAVE_WCSNCAT = @HAVE_WCSNCAT@ +HAVE_WCSNCMP = @HAVE_WCSNCMP@ +HAVE_WCSNCPY = @HAVE_WCSNCPY@ +HAVE_WCSNLEN = @HAVE_WCSNLEN@ +HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ +HAVE_WCSPBRK = @HAVE_WCSPBRK@ +HAVE_WCSRCHR = @HAVE_WCSRCHR@ +HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ +HAVE_WCSSPN = @HAVE_WCSSPN@ +HAVE_WCSSTR = @HAVE_WCSSTR@ +HAVE_WCSTOK = @HAVE_WCSTOK@ +HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ +HAVE_WCSXFRM = @HAVE_WCSXFRM@ +HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ +HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ +HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ +HAVE_WINT_T = @HAVE_WINT_T@ +HAVE_WMEMCHR = @HAVE_WMEMCHR@ +HAVE_WMEMCMP = @HAVE_WMEMCMP@ +HAVE_WMEMCPY = @HAVE_WMEMCPY@ +HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ +HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ +HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ +HAVE__BOOL = @HAVE__BOOL@ +HAVE__EXIT = @HAVE__EXIT@ +INCLUDE_NEXT = @INCLUDE_NEXT@ +INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ +INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ +LDFLAGS = @LDFLAGS@ +LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ +LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMULTITHREAD = @LIBMULTITHREAD@ +LIBOBJS = @LIBOBJS@ +LIBPTH = @LIBPTH@ +LIBPTH_PREFIX = @LIBPTH_PREFIX@ +LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ +LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ +LIBTHREAD = @LIBTHREAD@ +LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ +LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ +LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ +LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ +LIB_SELINUX = @LIB_SELINUX@ +LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ +LOCALE_FR = @LOCALE_FR@ +LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ +LOCALE_JA = @LOCALE_JA@ +LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ +LOCALE_ZH_CN = @LOCALE_ZH_CN@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ +LTLIBOBJS = @LTLIBOBJS@ +LTLIBPTH = @LTLIBPTH@ +LTLIBTHREAD = @LTLIBTHREAD@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MODF_LIBM = @MODF_LIBM@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ +NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ +NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ +NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ +NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ +NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ +NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ +NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ +NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ +NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ +NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ +NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ +NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ +NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ +NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ +NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ +NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ +NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ +NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ +NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ +NEXT_CTYPE_H = @NEXT_CTYPE_H@ +NEXT_DIRENT_H = @NEXT_DIRENT_H@ +NEXT_ERRNO_H = @NEXT_ERRNO_H@ +NEXT_FCNTL_H = @NEXT_FCNTL_H@ +NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_GETOPT_H = @NEXT_GETOPT_H@ +NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ +NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ +NEXT_LOCALE_H = @NEXT_LOCALE_H@ +NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ +NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ +NEXT_STDARG_H = @NEXT_STDARG_H@ +NEXT_STDDEF_H = @NEXT_STDDEF_H@ +NEXT_STDINT_H = @NEXT_STDINT_H@ +NEXT_STDIO_H = @NEXT_STDIO_H@ +NEXT_STDLIB_H = @NEXT_STDLIB_H@ +NEXT_STRINGS_H = @NEXT_STRINGS_H@ +NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ +NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ +NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ +NEXT_TIME_H = @NEXT_TIME_H@ +NEXT_UNISTD_H = @NEXT_UNISTD_H@ +NEXT_WCHAR_H = @NEXT_WCHAR_H@ +NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +POSUB = @POSUB@ +PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ +PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ +PRIPTR_PREFIX = @PRIPTR_PREFIX@ +PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ +PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ +PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +REPLACE_BTOWC = @REPLACE_BTOWC@ +REPLACE_CALLOC = @REPLACE_CALLOC@ +REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ +REPLACE_CEIL = @REPLACE_CEIL@ +REPLACE_CEILF = @REPLACE_CEILF@ +REPLACE_CEILL = @REPLACE_CEILL@ +REPLACE_CHOWN = @REPLACE_CHOWN@ +REPLACE_CLOSE = @REPLACE_CLOSE@ +REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ +REPLACE_DIRFD = @REPLACE_DIRFD@ +REPLACE_DPRINTF = @REPLACE_DPRINTF@ +REPLACE_DUP = @REPLACE_DUP@ +REPLACE_DUP2 = @REPLACE_DUP2@ +REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ +REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ +REPLACE_FCLOSE = @REPLACE_FCLOSE@ +REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ +REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ +REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FLOOR = @REPLACE_FLOOR@ +REPLACE_FLOORF = @REPLACE_FLOORF@ +REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ +REPLACE_FOPEN = @REPLACE_FOPEN@ +REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FPURGE = @REPLACE_FPURGE@ +REPLACE_FREOPEN = @REPLACE_FREOPEN@ +REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ +REPLACE_FREXPL = @REPLACE_FREXPL@ +REPLACE_FSEEK = @REPLACE_FSEEK@ +REPLACE_FSEEKO = @REPLACE_FSEEKO@ +REPLACE_FSTAT = @REPLACE_FSTAT@ +REPLACE_FSTATAT = @REPLACE_FSTATAT@ +REPLACE_FTELL = @REPLACE_FTELL@ +REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ +REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ +REPLACE_GETCWD = @REPLACE_GETCWD@ +REPLACE_GETDELIM = @REPLACE_GETDELIM@ +REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ +REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ +REPLACE_GETLINE = @REPLACE_GETLINE@ +REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ +REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ +REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ +REPLACE_ISFINITE = @REPLACE_ISFINITE@ +REPLACE_ISINF = @REPLACE_ISINF@ +REPLACE_ISNAN = @REPLACE_ISNAN@ +REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ +REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ +REPLACE_LCHOWN = @REPLACE_LCHOWN@ +REPLACE_LDEXPL = @REPLACE_LDEXPL@ +REPLACE_LINK = @REPLACE_LINK@ +REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ +REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ +REPLACE_LSEEK = @REPLACE_LSEEK@ +REPLACE_LSTAT = @REPLACE_LSTAT@ +REPLACE_MALLOC = @REPLACE_MALLOC@ +REPLACE_MBRLEN = @REPLACE_MBRLEN@ +REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ +REPLACE_MBSINIT = @REPLACE_MBSINIT@ +REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ +REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ +REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ +REPLACE_MBTOWC = @REPLACE_MBTOWC@ +REPLACE_MEMCHR = @REPLACE_MEMCHR@ +REPLACE_MEMMEM = @REPLACE_MEMMEM@ +REPLACE_MKDIR = @REPLACE_MKDIR@ +REPLACE_MKFIFO = @REPLACE_MKFIFO@ +REPLACE_MKNOD = @REPLACE_MKNOD@ +REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ +REPLACE_NAN = @REPLACE_NAN@ +REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ +REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ +REPLACE_NULL = @REPLACE_NULL@ +REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ +REPLACE_OPEN = @REPLACE_OPEN@ +REPLACE_OPENAT = @REPLACE_OPENAT@ +REPLACE_OPENDIR = @REPLACE_OPENDIR@ +REPLACE_PERROR = @REPLACE_PERROR@ +REPLACE_POPEN = @REPLACE_POPEN@ +REPLACE_PREAD = @REPLACE_PREAD@ +REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ +REPLACE_PUTENV = @REPLACE_PUTENV@ +REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ +REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_REALLOC = @REPLACE_REALLOC@ +REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ +REPLACE_REMOVE = @REPLACE_REMOVE@ +REPLACE_RENAME = @REPLACE_RENAME@ +REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ +REPLACE_RMDIR = @REPLACE_RMDIR@ +REPLACE_ROUND = @REPLACE_ROUND@ +REPLACE_ROUNDF = @REPLACE_ROUNDF@ +REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ +REPLACE_SETENV = @REPLACE_SETENV@ +REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ +REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ +REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ +REPLACE_SLEEP = @REPLACE_SLEEP@ +REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ +REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ +REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ +REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ +REPLACE_STPNCPY = @REPLACE_STPNCPY@ +REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ +REPLACE_STRDUP = @REPLACE_STRDUP@ +REPLACE_STRERROR = @REPLACE_STRERROR@ +REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ +REPLACE_STRNCAT = @REPLACE_STRNCAT@ +REPLACE_STRNDUP = @REPLACE_STRNDUP@ +REPLACE_STRNLEN = @REPLACE_STRNLEN@ +REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ +REPLACE_STRSTR = @REPLACE_STRSTR@ +REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ +REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ +REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_TIMEGM = @REPLACE_TIMEGM@ +REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ +REPLACE_TRUNC = @REPLACE_TRUNC@ +REPLACE_TRUNCF = @REPLACE_TRUNCF@ +REPLACE_TRUNCL = @REPLACE_TRUNCL@ +REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ +REPLACE_UNLINK = @REPLACE_UNLINK@ +REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ +REPLACE_UNSETENV = @REPLACE_UNSETENV@ +REPLACE_USLEEP = @REPLACE_USLEEP@ +REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ +REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ +REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ +REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ +REPLACE_VPRINTF = @REPLACE_VPRINTF@ +REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ +REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ +REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ +REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ +REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ +REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ +REPLACE_WCTOB = @REPLACE_WCTOB@ +REPLACE_WCTOMB = @REPLACE_WCTOMB@ +REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ +REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ +SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ +SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ +SORT = @SORT@ +SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ +STDARG_H = @STDARG_H@ +STDBOOL_H = @STDBOOL_H@ +STDDEF_H = @STDDEF_H@ +STDINT_H = @STDINT_H@ +STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ +SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +TRUNC_LIBM = @TRUNC_LIBM@ +UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ +UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ +UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ +UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ +UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ +WINT_T_SUFFIX = @WINT_T_SUFFIX@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +YIELD_LIB = @YIELD_LIB@ +abs_aux_dir = @abs_aux_dir@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +gl_LIBOBJS = @gl_LIBOBJS@ +gl_LTLIBOBJS = @gl_LTLIBOBJS@ +gltests_LIBOBJS = @gltests_LIBOBJS@ +gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ +gltests_WITNESS = @gltests_WITNESS@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects +SUBDIRS = +noinst_HEADERS = +noinst_LIBRARIES = libgnulib.a +noinst_LTLIBRARIES = + +# If your project uses "gettextize --intl" to put a source-code +# copy of libintl into the package, every Makefile.am needs +# -I$(top_builddir)/intl, so that can be found in this directory. +# Here's one way to do this: +#AM_CPPFLAGS += -I$(top_builddir)/intl +# This option has no effect when the user disables NLS (because then +# the intl directory contains no libintl.h file). This option is not +# enabled by default because the intl directory might not exist if +# your project does not use "gettext --intl", and some compilers +# complain about -I options applied to nonexistent directories. +EXTRA_DIST = alloca.c alloca.in.h allocator.h areadlink.h areadlink.h \ + areadlink.h at-func.c argmatch.h openat-priv.h openat-proc.c \ + btowc.c byteswap.in.h c-strcaseeq.h str-two-way.h \ + canonicalize.h careadlinkat.h chdir-long.c chdir-long.h \ + cloexec.h close.c close-stream.h closedir.c dirent-private.h \ + closein.h closeout.h ctype.in.h cycle-check.h dev-ino.h \ + dirent.in.h dirent--.h dirent-safer.h dirfd.c stripslash.c \ + dirname.h dosname.h dup.c dup2.c errno.in.h error.c error.h \ + euidaccess.c exitfail.h at-func.c faccessat.c fchdir.c fcntl.c \ + fcntl.in.h fcntl--.h fcntl-safer.h fd-hook.h fdopendir.c \ + fflush.c stdio-impl.h file-set.h fileblocks.c filemode.h \ + filename.h filenamecat.h float.c float.in.h itold.c fnmatch.c \ + fnmatch.in.h fnmatch_loop.c fopen.c stdio--.h stdio-safer.h \ + fpending.c fpending.h fpurge.c stdio-impl.h freadahead.c \ + freadahead.h stdio-impl.h freading.h stdio-impl.h fseek.c \ + fseeko.c stdio-impl.h fstat.c at-func.c fstatat.c ftell.c \ + ftello.c stdio-impl.h fts-cycle.c fts.c fts_.h getcwd.c \ + getcwd-lgpl.c getdelim.c getdtablesize.c getgroups.c \ + gethostname.c w32sock.h getline.c getopt.c getopt.in.h \ + getopt1.c getopt_int.h $(top_srcdir)/build-aux/config.rpath \ + gettimeofday.c $(top_srcdir)/GNUmakefile group-member.c hash.h \ + hash-triple.h $(top_srcdir)/build-aux/config.rpath human.h \ + i-ring.h idcache.h intprops.h inttypes.in.h isblank.c \ + isfinite.c isinf.c float+.h isnan.c isnand-nolibm.h isnand.c \ + float+.h isnan.c isnanf-nolibm.h isnanf.c float+.h isnan.c \ + isnanl-nolibm.h isnanl.c iswblank.c langinfo.in.h \ + config.charset ref-add.sin ref-del.sin locale.in.h \ + localeconv.c lseek.c lstat.c $(top_srcdir)/maint.mk malloc.c \ + malloc.c malloca.h malloca.valgrind math.in.h mbchar.h \ + mbrtowc.c str-kmp.h mbsinit.c mbsrtowcs-impl.h \ + mbsrtowcs-state.c mbsrtowcs.c str-kmp.h mbtowc-impl.h mbtowc.c \ + memchr.c memchr.valgrind mempcpy.c memrchr.c mktime-internal.h \ + mktime.c modechange.h modf.c mountlist.c mountlist.h \ + msvc-inval.c msvc-inval.h msvc-nothrow.c msvc-nothrow.h \ + nl_langinfo.c open.c openat.c openat.h fcntl--.h fcntl-safer.h \ + dirent-private.h opendir.c parse-datetime.c parse-datetime.h \ + pathmax.h perror.c quote.h quote.h quotearg.h read.c \ + dirent-private.h readdir.c readlink.c at-func.c readlinkat.c \ + realloc.c realloc.c regcomp.c regex.c regex.h regex_internal.c \ + regex_internal.h regexec.c dirent-private.h rewinddir.c \ + rmdir.c root-uid.h rpmatch.c safe-read.h same.h same-inode.h \ + save-cwd.h savedir.h at-func.c selinux-at.c selinux-at.h \ + getfilecon.c setenv.c \ + $(top_srcdir)/build-aux/snippet/_Noreturn.h \ + $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ + $(top_srcdir)/build-aux/snippet/c++defs.h \ + $(top_srcdir)/build-aux/snippet/unused-parameter.h \ + $(top_srcdir)/build-aux/snippet/warn-on-use.h snprintf.c \ + w32sock.h stat.c stat-macros.h stat-size.h stat-time.h \ + stdalign.in.h stdarg.in.h stdbool.in.h stddef.in.h stdint.in.h \ + stdio.in.h stdlib.in.h stpcpy.c strcasecmp.c strncasecmp.c \ + str-two-way.h strcasestr.c strdup.c streq.h strerror.c \ + strerror-override.c strerror-override.h strerror_r.c \ + strftime.h string.in.h strings.in.h strndup.c strnlen.c \ + str-two-way.h strstr.c strtol.c strtol.c strtoul.c strtol.c \ + strtoul.c strtoull.c strtoimax.c strtoumax.c sys_socket.in.h \ + sys_stat.in.h sys_time.in.h sys_types.in.h sys_uio.in.h \ + sys_utsname.in.h sys_wait.in.h \ + $(top_srcdir)/build-aux/config.rpath time.in.h time_r.c \ + timespec.h trunc.c uname.c unistd.in.h unistd--.h \ + unistd-safer.h unitypes.in.h localcharset.h uniwidth.in.h \ + uniwidth/cjk.h unlink.c at-func.c unlinkat.c unsetenv.c \ + $(top_srcdir)/build-aux/update-copyright \ + $(top_srcdir)/build-aux/useless-if-before-free asnprintf.c \ + float+.h printf-args.c printf-args.h printf-parse.c \ + printf-parse.h vasnprintf.c vasnprintf.h \ + $(top_srcdir)/build-aux/vc-list-files verify.h wchar.in.h \ + wcrtomb.c wctype.in.h wcwidth.c xalloc.h xalloc-oversized.h \ + xgetcwd.h xstrtod.h xstrtol.h yesno.h + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. +BUILT_SOURCES = $(ALLOCA_H) $(BYTESWAP_H) configmake.h ctype.h \ + dirent.h $(ERRNO_H) fcntl.h $(FLOAT_H) $(FNMATCH_H) \ + $(GETOPT_H) inttypes.h langinfo.h locale.h math.h \ + parse-datetime.c selinux/selinux.h $(SELINUX_CONTEXT_H) \ + arg-nonnull.h c++defs.h unused-parameter.h warn-on-use.h \ + $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \ + stdio.h stdlib.h string.h strings.h sys/socket.h sys/stat.h \ + sys/time.h sys/types.h sys/uio.h sys/utsname.h sys/wait.h \ + time.h unistd.h $(LIBUNISTRING_UNITYPES_H) \ + $(LIBUNISTRING_UNIWIDTH_H) wchar.h wctype.h +SUFFIXES = .sed .sin +MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t byteswap.h \ + byteswap.h-t ctype.h ctype.h-t dirent.h dirent.h-t errno.h \ + errno.h-t fcntl.h fcntl.h-t float.h float.h-t fnmatch.h \ + fnmatch.h-t getopt.h getopt.h-t inttypes.h inttypes.h-t \ + langinfo.h langinfo.h-t locale.h locale.h-t math.h math.h-t \ + parse-datetime.c-t selinux/selinux.h selinux/selinux.h-t \ + selinux/context.h selinux/context.h-t arg-nonnull.h \ + arg-nonnull.h-t c++defs.h c++defs.h-t unused-parameter.h \ + unused-parameter.h-t warn-on-use.h warn-on-use.h-t stdalign.h \ + stdalign.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t \ + stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \ + stdlib.h stdlib.h-t string.h string.h-t strings.h strings.h-t \ + sys/socket.h sys/socket.h-t sys/stat.h sys/stat.h-t sys/time.h \ + sys/time.h-t sys/types.h sys/types.h-t sys/uio.h sys/uio.h-t \ + sys/utsname.h sys/utsname.h-t sys/wait.h sys/wait.h-t time.h \ + time.h-t unistd.h unistd.h-t unitypes.h unitypes.h-t \ + uniwidth.h uniwidth.h-t wchar.h wchar.h-t wctype.h wctype.h-t +MOSTLYCLEANDIRS = selinux sys sys sys sys sys +CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ + ref-del.sed +DISTCLEANFILES = +MAINTAINERCLEANFILES = parse-datetime.c +AM_CPPFLAGS = +AM_CFLAGS = +libgnulib_a_SOURCES = allocator.c areadlink.c areadlink-with-size.c \ + areadlinkat.c argmatch.c bitrotate.h bitrotate.c c-ctype.h \ + c-ctype.c c-strcase.h c-strcasecmp.c c-strncasecmp.c \ + c-strcasestr.h c-strcasestr.c c-strstr.h c-strstr.c \ + canonicalize.c careadlinkat.c cloexec.c close-stream.c \ + closein.c closeout.c cycle-check.c opendir-safer.c dirname.c \ + basename.c dirname-lgpl.c basename-lgpl.c stripslash.c \ + exitfail.c creat-safer.c open-safer.c fd-hook.c file-set.c \ + filemode.c filenamecat-lgpl.c fopen-safer.c freading.c \ + gettext.h gettime.c hash.c hash-pjw.h hash-pjw.c hash-triple.c \ + human.c i-ring.c idcache.c localcharset.h localcharset.c \ + glthread/lock.h glthread/lock.c malloca.c math.c mbchar.c \ + mbscasestr.c mbslen.c mbsstr.c mbuiter.h mbuiter.c \ + modechange.c openat-die.c openat-safer.c parse-datetime.y \ + progname.h progname.c quotearg.c safe-read.c same.c save-cwd.c \ + savedir.c se-context.in.h se-selinux.in.h se-context.c \ + se-selinux.c size_max.h sockets.h sockets.c stat-time.c \ + statat.c strftime.c strnlen1.h strnlen1.c sys_socket.c \ + glthread/threadlib.c timespec.c unistd.c dup-safer.c \ + fd-safer.c pipe-safer.c $(am__append_1) version-etc.h \ + version-etc.c version-etc-fsf.c wctype-h.c xmalloc.c \ + xalloc-die.c xgetcwd.c xsize.h xsize.c xstrndup.h xstrndup.c \ + xstrtod.c xstrtol.c xstrtoul.c xstrtol-error.c xstrtoumax.c \ + yesno.c +libgnulib_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@ +libgnulib_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@ +EXTRA_libgnulib_a_SOURCES = alloca.c at-func.c openat-proc.c btowc.c \ + chdir-long.c close.c closedir.c dirfd.c stripslash.c dup.c \ + dup2.c error.c euidaccess.c at-func.c faccessat.c fchdir.c \ + fcntl.c fdopendir.c fflush.c fileblocks.c float.c itold.c \ + fnmatch.c fnmatch_loop.c fopen.c fpending.c fpurge.c \ + freadahead.c fseek.c fseeko.c fstat.c at-func.c fstatat.c \ + ftell.c ftello.c fts-cycle.c fts.c getcwd.c getcwd-lgpl.c \ + getdelim.c getdtablesize.c getgroups.c gethostname.c getline.c \ + getopt.c getopt1.c gettimeofday.c group-member.c isblank.c \ + isfinite.c isinf.c isnan.c isnand.c isnan.c isnanf.c isnan.c \ + isnanl.c iswblank.c localeconv.c lseek.c lstat.c malloc.c \ + malloc.c mbrtowc.c mbsinit.c mbsrtowcs-state.c mbsrtowcs.c \ + mbtowc.c memchr.c mempcpy.c memrchr.c mktime.c modf.c \ + mountlist.c msvc-inval.c msvc-nothrow.c nl_langinfo.c open.c \ + openat.c opendir.c perror.c read.c readdir.c readlink.c \ + at-func.c readlinkat.c realloc.c realloc.c regcomp.c regex.c \ + regex_internal.c regexec.c rewinddir.c rmdir.c rpmatch.c \ + at-func.c selinux-at.c getfilecon.c setenv.c snprintf.c stat.c \ + stpcpy.c strcasecmp.c strncasecmp.c strcasestr.c strdup.c \ + strerror.c strerror-override.c strerror_r.c strndup.c \ + strnlen.c strstr.c strtol.c strtol.c strtoul.c strtol.c \ + strtoul.c strtoull.c strtoimax.c strtoumax.c time_r.c trunc.c \ + uname.c unlink.c at-func.c unlinkat.c unsetenv.c asnprintf.c \ + printf-args.c printf-parse.c vasnprintf.c wcrtomb.c wcwidth.c + +# Use this preprocessor expression to decide whether #include_next works. +# Do not rely on a 'configure'-time test for this, since the expression +# might appear in an installed header, which is used by some other compiler. +HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) +charset_alias = $(DESTDIR)$(libdir)/charset.alias +charset_tmp = $(DESTDIR)$(libdir)/charset.tmp + +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all Makefile.am that +# need it. This is ensured by the applicability 'all' defined above. +_NORETURN_H = $(top_srcdir)/build-aux/snippet/_Noreturn.h +ARG_NONNULL_H = arg-nonnull.h +CXXDEFS_H = c++defs.h +UNUSED_PARAMETER_H = unused-parameter.h +WARN_ON_USE_H = warn-on-use.h +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .sed .sin .c .o .obj .y +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gl/lib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnits gl/lib/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +glthread/$(am__dirstamp): + @$(MKDIR_P) glthread + @: > glthread/$(am__dirstamp) +glthread/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) glthread/$(DEPDIR) + @: > glthread/$(DEPDIR)/$(am__dirstamp) +glthread/lock.$(OBJEXT): glthread/$(am__dirstamp) \ + glthread/$(DEPDIR)/$(am__dirstamp) +glthread/threadlib.$(OBJEXT): glthread/$(am__dirstamp) \ + glthread/$(DEPDIR)/$(am__dirstamp) +uniwidth/$(am__dirstamp): + @$(MKDIR_P) uniwidth + @: > uniwidth/$(am__dirstamp) +uniwidth/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) uniwidth/$(DEPDIR) + @: > uniwidth/$(DEPDIR)/$(am__dirstamp) +uniwidth/width.$(OBJEXT): uniwidth/$(am__dirstamp) \ + uniwidth/$(DEPDIR)/$(am__dirstamp) +libgnulib.a: $(libgnulib_a_OBJECTS) $(libgnulib_a_DEPENDENCIES) $(EXTRA_libgnulib_a_DEPENDENCIES) + -rm -f libgnulib.a + $(libgnulib_a_AR) libgnulib.a $(libgnulib_a_OBJECTS) $(libgnulib_a_LIBADD) + $(RANLIB) libgnulib.a + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f glthread/lock.$(OBJEXT) + -rm -f glthread/threadlib.$(OBJEXT) + -rm -f uniwidth/width.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlink-with-size.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at-func.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitrotate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasestr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strstr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/careadlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chdir-long.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-stream.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closein.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closeout.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cycle-check.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/euidaccess.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fflush.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-set.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileblocks.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat-lgpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpending.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpurge.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freadahead.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freading.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftell.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftello.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fts-cycle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd-lgpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfilecon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gethostname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/group-member.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-pjw.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-triple.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/human.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i-ring.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idcache.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isblank.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isfinite.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isinf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnand.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iswblank.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbchar.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbscasestr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbslen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsstr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbuiter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modechange.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mountlist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-die.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse-datetime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perror.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewinddir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpmatch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-read.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/same.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/savedir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/se-context.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/se-selinux.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selinux-at.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpcpy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror_r.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoul.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoumax.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_socket.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trunc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc-fsf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcwidth.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetcwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsize.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtod.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol-error.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoul.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoumax.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yesno.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/width.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.y.c: + $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local +installdirs: installdirs-recursive +installdirs-am: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f glthread/$(DEPDIR)/$(am__dirstamp) + -rm -f glthread/$(am__dirstamp) + -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp) + -rm -f uniwidth/$(am__dirstamp) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f parse-datetime.c + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-recursive + -rm -rf $(DEPDIR) ./$(DEPDIR) glthread/$(DEPDIR) uniwidth/$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-local distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-exec-local + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf $(DEPDIR) ./$(DEPDIR) glthread/$(DEPDIR) uniwidth/$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-local + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-local + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ + ctags-recursive install install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am all-local check check-am clean clean-generic \ + clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-local distclean-tags distdir dvi dvi-am html html-am \ + info info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-exec-local install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am uninstall-local + + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +@GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in.h $(top_builddir)/config.status +@GL_GENERATE_ALLOCA_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_ALLOCA_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_ALLOCA_H_TRUE@ cat $(srcdir)/alloca.in.h; \ +@GL_GENERATE_ALLOCA_H_TRUE@ } > $@-t && \ +@GL_GENERATE_ALLOCA_H_TRUE@ mv -f $@-t $@ +@GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status +@GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# doesn't have one. +@GL_GENERATE_BYTESWAP_H_TRUE@byteswap.h: byteswap.in.h $(top_builddir)/config.status +@GL_GENERATE_BYTESWAP_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_BYTESWAP_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_BYTESWAP_H_TRUE@ cat $(srcdir)/byteswap.in.h; \ +@GL_GENERATE_BYTESWAP_H_TRUE@ } > $@-t && \ +@GL_GENERATE_BYTESWAP_H_TRUE@ mv -f $@-t $@ +@GL_GENERATE_BYTESWAP_H_FALSE@byteswap.h: $(top_builddir)/config.status +@GL_GENERATE_BYTESWAP_H_FALSE@ rm -f $@ + +# Listed in the same order as the GNU makefile conventions, and +# provided by autoconf 2.59c+ or 2.70. +# The Automake-defined pkg* macros are appended, in the order +# listed in the Automake 1.10a+ documentation. +configmake.h: Makefile + $(AM_V_GEN)rm -f $@-t && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + echo '#define PREFIX "$(prefix)"'; \ + echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ + echo '#define BINDIR "$(bindir)"'; \ + echo '#define SBINDIR "$(sbindir)"'; \ + echo '#define LIBEXECDIR "$(libexecdir)"'; \ + echo '#define DATAROOTDIR "$(datarootdir)"'; \ + echo '#define DATADIR "$(datadir)"'; \ + echo '#define SYSCONFDIR "$(sysconfdir)"'; \ + echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ + echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ + echo '#define RUNSTATEDIR "$(runstatedir)"'; \ + echo '#define INCLUDEDIR "$(includedir)"'; \ + echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ + echo '#define DOCDIR "$(docdir)"'; \ + echo '#define INFODIR "$(infodir)"'; \ + echo '#define HTMLDIR "$(htmldir)"'; \ + echo '#define DVIDIR "$(dvidir)"'; \ + echo '#define PDFDIR "$(pdfdir)"'; \ + echo '#define PSDIR "$(psdir)"'; \ + echo '#define LIBDIR "$(libdir)"'; \ + echo '#define LISPDIR "$(lispdir)"'; \ + echo '#define LOCALEDIR "$(localedir)"'; \ + echo '#define MANDIR "$(mandir)"'; \ + echo '#define MANEXT "$(manext)"'; \ + echo '#define PKGDATADIR "$(pkgdatadir)"'; \ + echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ + echo '#define PKGLIBDIR "$(pkglibdir)"'; \ + echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ + } | sed '/""/d' > $@-t && \ + mv -f $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ + -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ + -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/ctype.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ + -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \ + -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \ + -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \ + -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \ + -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \ + -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \ + -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \ + -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \ + -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \ + -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \ + -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \ + -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \ + -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \ + -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \ + -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \ + -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \ + -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \ + -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \ + -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \ + -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \ + -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/dirent.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that is POSIX compliant. +@GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status +@GL_GENERATE_ERRNO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_ERRNO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ +@GL_GENERATE_ERRNO_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ +@GL_GENERATE_ERRNO_H_TRUE@ < $(srcdir)/errno.in.h; \ +@GL_GENERATE_ERRNO_H_TRUE@ } > $@-t && \ +@GL_GENERATE_ERRNO_H_TRUE@ mv $@-t $@ +@GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status +@GL_GENERATE_ERRNO_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ + -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ + -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ + -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ + -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ + -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ + -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ + -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ + -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ + -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/fcntl.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +@GL_GENERATE_FLOAT_H_TRUE@float.h: float.in.h $(top_builddir)/config.status +@GL_GENERATE_FLOAT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_FLOAT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ +@GL_GENERATE_FLOAT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ +@GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ +@GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ +@GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ +@GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ +@GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ +@GL_GENERATE_FLOAT_H_TRUE@ < $(srcdir)/float.in.h; \ +@GL_GENERATE_FLOAT_H_TRUE@ } > $@-t && \ +@GL_GENERATE_FLOAT_H_TRUE@ mv $@-t $@ +@GL_GENERATE_FLOAT_H_FALSE@float.h: $(top_builddir)/config.status +@GL_GENERATE_FLOAT_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# doesn't have one that supports the required API. +@GL_GENERATE_FNMATCH_H_TRUE@fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) +@GL_GENERATE_FNMATCH_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_FNMATCH_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_FNMATCH_H_TRUE@ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ +@GL_GENERATE_FNMATCH_H_TRUE@ < $(srcdir)/fnmatch.in.h; \ +@GL_GENERATE_FNMATCH_H_TRUE@ } > $@-t && \ +@GL_GENERATE_FNMATCH_H_TRUE@ mv -f $@-t $@ +@GL_GENERATE_FNMATCH_H_FALSE@fnmatch.h: $(top_builddir)/config.status +@GL_GENERATE_FNMATCH_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + < $(srcdir)/getopt.in.h; \ + } > $@-t && \ + mv -f $@-t $@ + +distclean-local: clean-GNUmakefile +clean-GNUmakefile: + test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ + -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ + -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ + -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ + -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ + -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ + -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ + -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ + -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ + -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ + -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ + -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ + -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ + -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ + -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ + -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \ + -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ + -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ + -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ + -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/inttypes.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create an empty placeholder for +# when the system doesn't have one. +langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ + -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ + -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ + -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ + -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ + -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ + -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ + -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/langinfo.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to install a simple file in $(libdir) +# which is shared with other installed packages. We use a list of referencing +# packages so that "make uninstall" will remove the file if and only if it +# is not used by another installed package. +# On systems with glibc-2.1 or newer, the file is redundant, therefore we +# avoid installing it. + +all-local: charset.alias ref-add.sed ref-del.sed +install-exec-local: install-exec-localcharset +install-exec-localcharset: all-local + if test $(GLIBC21) = no; then \ + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ + darwin* | cygwin* | mingw* | pw32* | cegcc*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ + esac ; \ + else \ + need_charset_alias=false ; \ + fi ; \ + if $$need_charset_alias; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ + fi ; \ + if test -f $(charset_alias); then \ + sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ + rm -f $(charset_tmp) ; \ + else \ + if $$need_charset_alias; then \ + sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ + rm -f $(charset_tmp) ; \ + fi ; \ + fi + +uninstall-local: uninstall-localcharset +uninstall-localcharset: all-local + if test -f $(charset_alias); then \ + sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ + if grep '^# Packages using this file: $$' $(charset_tmp) \ + > /dev/null; then \ + rm -f $(charset_alias); \ + else \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ + fi; \ + rm -f $(charset_tmp); \ + fi + +charset.alias: config.charset + $(AM_V_GEN)rm -f t-$@ $@ && \ + $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ + mv t-$@ $@ +.sin.sed: + $(AM_V_GEN)rm -f t-$@ $@ && \ + sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ + mv t-$@ $@ + +# We need the following in order to create when the system +# doesn't have one that provides all definitions. +locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ + -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ + -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ + -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ + -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ + -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ + -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \ + -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ + -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ + -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/locale.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ + -e 's/@''GNULIB_ACOSF''@/$(GNULIB_ACOSF)/g' \ + -e 's/@''GNULIB_ACOSL''@/$(GNULIB_ACOSL)/g' \ + -e 's/@''GNULIB_ASINF''@/$(GNULIB_ASINF)/g' \ + -e 's/@''GNULIB_ASINL''@/$(GNULIB_ASINL)/g' \ + -e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \ + -e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \ + -e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \ + -e 's/@''GNULIB_CBRT''@/$(GNULIB_CBRT)/g' \ + -e 's/@''GNULIB_CBRTF''@/$(GNULIB_CBRTF)/g' \ + -e 's/@''GNULIB_CBRTL''@/$(GNULIB_CBRTL)/g' \ + -e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \ + -e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \ + -e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \ + -e 's/@''GNULIB_COPYSIGN''@/$(GNULIB_COPYSIGN)/g' \ + -e 's/@''GNULIB_COPYSIGNF''@/$(GNULIB_COPYSIGNF)/g' \ + -e 's/@''GNULIB_COPYSIGNL''@/$(GNULIB_COPYSIGNL)/g' \ + -e 's/@''GNULIB_COSF''@/$(GNULIB_COSF)/g' \ + -e 's/@''GNULIB_COSL''@/$(GNULIB_COSL)/g' \ + -e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \ + -e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \ + -e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \ + -e 's/@''GNULIB_EXP2''@/$(GNULIB_EXP2)/g' \ + -e 's/@''GNULIB_EXP2F''@/$(GNULIB_EXP2F)/g' \ + -e 's/@''GNULIB_EXP2L''@/$(GNULIB_EXP2L)/g' \ + -e 's/@''GNULIB_EXPM1''@/$(GNULIB_EXPM1)/g' \ + -e 's/@''GNULIB_EXPM1F''@/$(GNULIB_EXPM1F)/g' \ + -e 's/@''GNULIB_EXPM1L''@/$(GNULIB_EXPM1L)/g' \ + -e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \ + -e 's/@''GNULIB_FABSL''@/$(GNULIB_FABSL)/g' \ + -e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \ + -e 's/@''GNULIB_FLOORF''@/$(GNULIB_FLOORF)/g' \ + -e 's/@''GNULIB_FLOORL''@/$(GNULIB_FLOORL)/g' \ + -e 's/@''GNULIB_FMA''@/$(GNULIB_FMA)/g' \ + -e 's/@''GNULIB_FMAF''@/$(GNULIB_FMAF)/g' \ + -e 's/@''GNULIB_FMAL''@/$(GNULIB_FMAL)/g' \ + -e 's/@''GNULIB_FMOD''@/$(GNULIB_FMOD)/g' \ + -e 's/@''GNULIB_FMODF''@/$(GNULIB_FMODF)/g' \ + -e 's/@''GNULIB_FMODL''@/$(GNULIB_FMODL)/g' \ + -e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \ + -e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \ + -e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \ + -e 's/@''GNULIB_HYPOT''@/$(GNULIB_HYPOT)/g' \ + -e 's/@''GNULIB_HYPOTF''@/$(GNULIB_HYPOTF)/g' \ + -e 's/@''GNULIB_HYPOTL''@/$(GNULIB_HYPOTL)/g' \ + < $(srcdir)/math.in.h | \ + sed -e 's/@''GNULIB_ILOGB''@/$(GNULIB_ILOGB)/g' \ + -e 's/@''GNULIB_ILOGBF''@/$(GNULIB_ILOGBF)/g' \ + -e 's/@''GNULIB_ILOGBL''@/$(GNULIB_ILOGBL)/g' \ + -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \ + -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \ + -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \ + -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \ + -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \ + -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \ + -e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \ + -e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \ + -e 's/@''GNULIB_LOG''@/$(GNULIB_LOG)/g' \ + -e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \ + -e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \ + -e 's/@''GNULIB_LOG10''@/$(GNULIB_LOG10)/g' \ + -e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \ + -e 's/@''GNULIB_LOG10L''@/$(GNULIB_LOG10L)/g' \ + -e 's/@''GNULIB_LOG1P''@/$(GNULIB_LOG1P)/g' \ + -e 's/@''GNULIB_LOG1PF''@/$(GNULIB_LOG1PF)/g' \ + -e 's/@''GNULIB_LOG1PL''@/$(GNULIB_LOG1PL)/g' \ + -e 's/@''GNULIB_LOG2''@/$(GNULIB_LOG2)/g' \ + -e 's/@''GNULIB_LOG2F''@/$(GNULIB_LOG2F)/g' \ + -e 's/@''GNULIB_LOG2L''@/$(GNULIB_LOG2L)/g' \ + -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \ + -e 's/@''GNULIB_LOGBF''@/$(GNULIB_LOGBF)/g' \ + -e 's/@''GNULIB_LOGBL''@/$(GNULIB_LOGBL)/g' \ + -e 's/@''GNULIB_MODF''@/$(GNULIB_MODF)/g' \ + -e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \ + -e 's/@''GNULIB_MODFL''@/$(GNULIB_MODFL)/g' \ + -e 's/@''GNULIB_POWF''@/$(GNULIB_POWF)/g' \ + -e 's/@''GNULIB_REMAINDER''@/$(GNULIB_REMAINDER)/g' \ + -e 's/@''GNULIB_REMAINDERF''@/$(GNULIB_REMAINDERF)/g' \ + -e 's/@''GNULIB_REMAINDERL''@/$(GNULIB_REMAINDERL)/g' \ + -e 's/@''GNULIB_RINT''@/$(GNULIB_RINT)/g' \ + -e 's/@''GNULIB_RINTF''@/$(GNULIB_RINTF)/g' \ + -e 's/@''GNULIB_RINTL''@/$(GNULIB_RINTL)/g' \ + -e 's/@''GNULIB_ROUND''@/$(GNULIB_ROUND)/g' \ + -e 's/@''GNULIB_ROUNDF''@/$(GNULIB_ROUNDF)/g' \ + -e 's/@''GNULIB_ROUNDL''@/$(GNULIB_ROUNDL)/g' \ + -e 's/@''GNULIB_SIGNBIT''@/$(GNULIB_SIGNBIT)/g' \ + -e 's/@''GNULIB_SINF''@/$(GNULIB_SINF)/g' \ + -e 's/@''GNULIB_SINL''@/$(GNULIB_SINL)/g' \ + -e 's/@''GNULIB_SINHF''@/$(GNULIB_SINHF)/g' \ + -e 's/@''GNULIB_SQRTF''@/$(GNULIB_SQRTF)/g' \ + -e 's/@''GNULIB_SQRTL''@/$(GNULIB_SQRTL)/g' \ + -e 's/@''GNULIB_TANF''@/$(GNULIB_TANF)/g' \ + -e 's/@''GNULIB_TANL''@/$(GNULIB_TANL)/g' \ + -e 's/@''GNULIB_TANHF''@/$(GNULIB_TANHF)/g' \ + -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \ + -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \ + -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \ + | \ + sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \ + -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ + -e 's|@''HAVE_ASINF''@|$(HAVE_ASINF)|g' \ + -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \ + -e 's|@''HAVE_ATANF''@|$(HAVE_ATANF)|g' \ + -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \ + -e 's|@''HAVE_ATAN2F''@|$(HAVE_ATAN2F)|g' \ + -e 's|@''HAVE_CBRT''@|$(HAVE_CBRT)|g' \ + -e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \ + -e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \ + -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \ + -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \ + -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \ + -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ + -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \ + -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \ + -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ + -e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \ + -e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \ + -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \ + -e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \ + -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \ + -e 's|@''HAVE_FMAF''@|$(HAVE_FMAF)|g' \ + -e 's|@''HAVE_FMAL''@|$(HAVE_FMAL)|g' \ + -e 's|@''HAVE_FMODF''@|$(HAVE_FMODF)|g' \ + -e 's|@''HAVE_FMODL''@|$(HAVE_FMODL)|g' \ + -e 's|@''HAVE_FREXPF''@|$(HAVE_FREXPF)|g' \ + -e 's|@''HAVE_HYPOTF''@|$(HAVE_HYPOTF)|g' \ + -e 's|@''HAVE_HYPOTL''@|$(HAVE_HYPOTL)|g' \ + -e 's|@''HAVE_ILOGB''@|$(HAVE_ILOGB)|g' \ + -e 's|@''HAVE_ILOGBF''@|$(HAVE_ILOGBF)|g' \ + -e 's|@''HAVE_ILOGBL''@|$(HAVE_ILOGBL)|g' \ + -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \ + -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \ + -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \ + -e 's|@''HAVE_LDEXPF''@|$(HAVE_LDEXPF)|g' \ + -e 's|@''HAVE_LOGF''@|$(HAVE_LOGF)|g' \ + -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \ + -e 's|@''HAVE_LOG10F''@|$(HAVE_LOG10F)|g' \ + -e 's|@''HAVE_LOG10L''@|$(HAVE_LOG10L)|g' \ + -e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \ + -e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \ + -e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \ + -e 's|@''HAVE_LOGBF''@|$(HAVE_LOGBF)|g' \ + -e 's|@''HAVE_LOGBL''@|$(HAVE_LOGBL)|g' \ + -e 's|@''HAVE_MODFF''@|$(HAVE_MODFF)|g' \ + -e 's|@''HAVE_MODFL''@|$(HAVE_MODFL)|g' \ + -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \ + -e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \ + -e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \ + -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \ + -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \ + -e 's|@''HAVE_SINF''@|$(HAVE_SINF)|g' \ + -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \ + -e 's|@''HAVE_SINHF''@|$(HAVE_SINHF)|g' \ + -e 's|@''HAVE_SQRTF''@|$(HAVE_SQRTF)|g' \ + -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \ + -e 's|@''HAVE_TANF''@|$(HAVE_TANF)|g' \ + -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \ + -e 's|@''HAVE_TANHF''@|$(HAVE_TANHF)|g' \ + -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ + -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ + -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ + -e 's|@''HAVE_DECL_CBRTF''@|$(HAVE_DECL_CBRTF)|g' \ + -e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \ + -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \ + -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \ + -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \ + -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ + -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ + -e 's|@''HAVE_DECL_EXP2''@|$(HAVE_DECL_EXP2)|g' \ + -e 's|@''HAVE_DECL_EXP2F''@|$(HAVE_DECL_EXP2F)|g' \ + -e 's|@''HAVE_DECL_EXP2L''@|$(HAVE_DECL_EXP2L)|g' \ + -e 's|@''HAVE_DECL_EXPM1L''@|$(HAVE_DECL_EXPM1L)|g' \ + -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \ + -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \ + -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ + -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ + -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ + -e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \ + -e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \ + -e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \ + -e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \ + -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \ + -e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \ + -e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \ + -e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \ + -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \ + -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \ + -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \ + -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ + -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ + -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ + -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \ + -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ + -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \ + | \ + sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \ + -e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \ + -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \ + -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ + -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ + -e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \ + -e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \ + -e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \ + -e 's|@''REPLACE_EXP2L''@|$(REPLACE_EXP2L)|g' \ + -e 's|@''REPLACE_FABSL''@|$(REPLACE_FABSL)|g' \ + -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \ + -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \ + -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \ + -e 's|@''REPLACE_FMA''@|$(REPLACE_FMA)|g' \ + -e 's|@''REPLACE_FMAF''@|$(REPLACE_FMAF)|g' \ + -e 's|@''REPLACE_FMAL''@|$(REPLACE_FMAL)|g' \ + -e 's|@''REPLACE_FMOD''@|$(REPLACE_FMOD)|g' \ + -e 's|@''REPLACE_FMODF''@|$(REPLACE_FMODF)|g' \ + -e 's|@''REPLACE_FMODL''@|$(REPLACE_FMODL)|g' \ + -e 's|@''REPLACE_FREXPF''@|$(REPLACE_FREXPF)|g' \ + -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \ + -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \ + -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \ + -e 's|@''REPLACE_HYPOT''@|$(REPLACE_HYPOT)|g' \ + -e 's|@''REPLACE_HYPOTF''@|$(REPLACE_HYPOTF)|g' \ + -e 's|@''REPLACE_HYPOTL''@|$(REPLACE_HYPOTL)|g' \ + -e 's|@''REPLACE_ILOGB''@|$(REPLACE_ILOGB)|g' \ + -e 's|@''REPLACE_ILOGBF''@|$(REPLACE_ILOGBF)|g' \ + -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ + -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ + -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ + -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ + -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \ + -e 's|@''REPLACE_LOG''@|$(REPLACE_LOG)|g' \ + -e 's|@''REPLACE_LOGF''@|$(REPLACE_LOGF)|g' \ + -e 's|@''REPLACE_LOGL''@|$(REPLACE_LOGL)|g' \ + -e 's|@''REPLACE_LOG10''@|$(REPLACE_LOG10)|g' \ + -e 's|@''REPLACE_LOG10F''@|$(REPLACE_LOG10F)|g' \ + -e 's|@''REPLACE_LOG10L''@|$(REPLACE_LOG10L)|g' \ + -e 's|@''REPLACE_LOG1P''@|$(REPLACE_LOG1P)|g' \ + -e 's|@''REPLACE_LOG1PF''@|$(REPLACE_LOG1PF)|g' \ + -e 's|@''REPLACE_LOG1PL''@|$(REPLACE_LOG1PL)|g' \ + -e 's|@''REPLACE_LOG2''@|$(REPLACE_LOG2)|g' \ + -e 's|@''REPLACE_LOG2F''@|$(REPLACE_LOG2F)|g' \ + -e 's|@''REPLACE_LOG2L''@|$(REPLACE_LOG2L)|g' \ + -e 's|@''REPLACE_LOGB''@|$(REPLACE_LOGB)|g' \ + -e 's|@''REPLACE_LOGBF''@|$(REPLACE_LOGBF)|g' \ + -e 's|@''REPLACE_LOGBL''@|$(REPLACE_LOGBL)|g' \ + -e 's|@''REPLACE_MODF''@|$(REPLACE_MODF)|g' \ + -e 's|@''REPLACE_MODFF''@|$(REPLACE_MODFF)|g' \ + -e 's|@''REPLACE_MODFL''@|$(REPLACE_MODFL)|g' \ + -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \ + -e 's|@''REPLACE_REMAINDER''@|$(REPLACE_REMAINDER)|g' \ + -e 's|@''REPLACE_REMAINDERF''@|$(REPLACE_REMAINDERF)|g' \ + -e 's|@''REPLACE_REMAINDERL''@|$(REPLACE_REMAINDERL)|g' \ + -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \ + -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \ + -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ + -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ + -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ + -e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \ + -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \ + -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \ + -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ + +# This rule overrides the Automake generated .y.c rule, to ensure that the +# parse-datetime.c file gets generated in the source directory, not in the +# build directory. +parse-datetime.c: parse-datetime.y + $(AM_V_GEN)$(SHELL) $(YLWRAP) $(srcdir)/parse-datetime.y \ + y.tab.c parse-datetime.c \ + y.tab.h parse-datetime.h \ + y.output parse-datetime.output \ + -- $(YACC) $(YFLAGS) $(AM_YFLAGS) && \ + mv parse-datetime.c parse-datetime.c-t && \ + mv parse-datetime.c-t $(srcdir)/parse-datetime.c +selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) + $(AM_V_at)$(MKDIR_P) selinux + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \ + -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ + < $(srcdir)/se-selinux.in.h; \ + } > $@-t && \ + chmod a-x $@-t && \ + mv $@-t $@ +@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@selinux/context.h: se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) +@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ $(AM_V_at)$(MKDIR_P) selinux +@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ +@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ +@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ < $(srcdir)/se-context.in.h; \ +@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ } > $@-t && \ +@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ chmod a-x $@-t && \ +@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ mv $@-t $@ +@GL_GENERATE_SELINUX_CONTEXT_H_FALSE@selinux/context.h: $(top_builddir)/config.status +@GL_GENERATE_SELINUX_CONTEXT_H_FALSE@ rm -f $@ +# The arg-nonnull.h that gets inserted into generated .h files is the same as +# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut +# off. +arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ + > $@-t && \ + mv $@-t $@ +# The c++defs.h that gets inserted into generated .h files is the same as +# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. +c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/build-aux/snippet/c++defs.h \ + > $@-t && \ + mv $@-t $@ +# The unused-parameter.h that gets inserted into generated .h files is the same +# as build-aux/snippet/unused-parameter.h, except that it has the copyright +# header cut off. +unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ + < $(top_srcdir)/build-aux/snippet/unused-parameter.h \ + > $@-t && \ + mv $@-t $@ +# The warn-on-use.h that gets inserted into generated .h files is the same as +# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut +# off. +warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ + > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works. +@GL_GENERATE_STDALIGN_H_TRUE@stdalign.h: stdalign.in.h $(top_builddir)/config.status +@GL_GENERATE_STDALIGN_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_STDALIGN_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_STDALIGN_H_TRUE@ cat $(srcdir)/stdalign.in.h; \ +@GL_GENERATE_STDALIGN_H_TRUE@ } > $@-t && \ +@GL_GENERATE_STDALIGN_H_TRUE@ mv $@-t $@ +@GL_GENERATE_STDALIGN_H_FALSE@stdalign.h: $(top_builddir)/config.status +@GL_GENERATE_STDALIGN_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +@GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status +@GL_GENERATE_STDARG_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_STDARG_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ +@GL_GENERATE_STDARG_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ +@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ +@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ +@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ +@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ +@GL_GENERATE_STDARG_H_TRUE@ < $(srcdir)/stdarg.in.h; \ +@GL_GENERATE_STDARG_H_TRUE@ } > $@-t && \ +@GL_GENERATE_STDARG_H_TRUE@ mv $@-t $@ +@GL_GENERATE_STDARG_H_FALSE@stdarg.h: $(top_builddir)/config.status +@GL_GENERATE_STDARG_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# doesn't have one that works. +@GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status +@GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_STDBOOL_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_STDBOOL_H_TRUE@ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ +@GL_GENERATE_STDBOOL_H_TRUE@ } > $@-t && \ +@GL_GENERATE_STDBOOL_H_TRUE@ mv $@-t $@ +@GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status +@GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +@GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status +@GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ +@GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ +@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ +@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ +@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ +@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ +@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ +@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ +@GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \ +@GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \ +@GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@ +@GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status +@GL_GENERATE_STDDEF_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +@GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status +@GL_GENERATE_STDINT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_STDINT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_STDINT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ +@GL_GENERATE_STDINT_H_TRUE@ < $(srcdir)/stdint.in.h; \ +@GL_GENERATE_STDINT_H_TRUE@ } > $@-t && \ +@GL_GENERATE_STDINT_H_TRUE@ mv $@-t $@ +@GL_GENERATE_STDINT_H_FALSE@stdint.h: $(top_builddir)/config.status +@GL_GENERATE_STDINT_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ + -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ + -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ + -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ + -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ + -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ + -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ + -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ + -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ + -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ + -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ + -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ + -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ + -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ + -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ + -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ + -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ + -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ + -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ + -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ + -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ + -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ + -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ + -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ + -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ + -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ + -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ + -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ + -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ + -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ + -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ + -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ + -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ + -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ + -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ + -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ + -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ + -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ + -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ + -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \ + -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \ + -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ + -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ + -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ + -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ + -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ + -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ + -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ + -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ + -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ + < $(srcdir)/stdio.in.h | \ + sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ + -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ + -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ + -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ + -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ + -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ + -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ + -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ + -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ + -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ + -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ + -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \ + -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \ + -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ + -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ + -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ + -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ + -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ + -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ + -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ + -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ + -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ + -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ + -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ + -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ + -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ + -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ + -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ + -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ + -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ + -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ + -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ + -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ + -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ + -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ + -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ + -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ + -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ + -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ + -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \ + -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ + -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ + -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ + -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ + -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ + -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ + -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ + -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ + -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ + $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ + -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ + -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ + -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ + -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ + -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ + -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ + -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ + -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ + -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ + -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ + -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ + -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ + -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ + -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ + -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ + -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ + -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ + -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ + -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ + -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ + -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' \ + -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ + -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ + -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ + -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ + -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ + < $(srcdir)/stdlib.in.h | \ + sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ + -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ + -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ + -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ + -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ + -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ + -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ + -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ + -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ + -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ + -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ + -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ + -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ + -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ + -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ + -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ + -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' \ + -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ + -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ + -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ + -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ + -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ + -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ + -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ + -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' \ + -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ + -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ + -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ + -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ + -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ + -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _Noreturn/r $(_NORETURN_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ + -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ + -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ + -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ + -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ + -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ + -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ + -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ + -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ + -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ + -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ + -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ + -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ + -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ + -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ + -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ + -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ + -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ + -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ + -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ + -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ + -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ + -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ + -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ + -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ + -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ + -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ + -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ + -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ + -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ + -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ + -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ + -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ + -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ + -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ + -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ + -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ + -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ + < $(srcdir)/string.in.h | \ + sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ + -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ + -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ + -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ + -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ + -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ + -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ + -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ + -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ + -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ + -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ + -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ + -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ + -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ + -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ + -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ + -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ + -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ + -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ + -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ + -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ + -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ + -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ + -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ + -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ + -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ + -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ + -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ + -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ + -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ + -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ + -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ + -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ + -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ + -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ + -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + < $(srcdir)/string.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ + -e 's|@''GNULIB_FFS''@|$(GNULIB_FFS)|g' \ + -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \ + -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ + -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/strings.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \ + -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \ + -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ + -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \ + -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \ + -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \ + -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \ + -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \ + -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \ + -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \ + -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \ + -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \ + -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \ + -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \ + -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \ + -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \ + -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \ + -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \ + -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \ + -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \ + -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_socket.in.h; \ + } > $@-t && \ + mv -f $@-t $@ + +# We need the following in order to create when the system +# has one that is incomplete. +sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ + -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ + -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ + -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ + -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ + -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ + -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ + -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ + -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ + -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ + -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ + -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ + -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ + -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ + -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ + -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ + -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ + -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ + -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ + -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ + -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ + -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ + -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ + -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ + -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ + -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ + -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ + -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ + -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ + -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ + -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ + -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ + -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ + -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ + -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_stat.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_time.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/types.h: sys_types.in.h $(top_builddir)/config.status + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ + -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ + < $(srcdir)/sys_types.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/uio.h: sys_uio.in.h $(top_builddir)/config.status + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \ + -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \ + < $(srcdir)/sys_uio.in.h; \ + } > $@-t && \ + mv -f $@-t $@ + +# We need the following in order to create when the system +# does not have one. +sys/utsname.h: sys_utsname.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's/@''HAVE_SYS_UTSNAME_H''@/$(HAVE_SYS_UTSNAME_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_UTSNAME_H''@|$(NEXT_SYS_UTSNAME_H)|g' \ + -e 's/@''GNULIB_UNAME''@/$(GNULIB_UNAME)/g' \ + -e 's|@''HAVE_STRUCT_UTSNAME''@|$(HAVE_STRUCT_UTSNAME)|g' \ + -e 's|@''HAVE_UNAME''@|$(HAVE_UNAME)|g' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_utsname.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# has one that is incomplete. +sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \ + -e 's/@''GNULIB_WAITPID''@/$(GNULIB_WAITPID)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_wait.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ + -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ + -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ + -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ + -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ + -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ + -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ + -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ + -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ + -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ + -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ + -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ + -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ + -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ + -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ + -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/time.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create an empty placeholder for +# when the system doesn't have one. +unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ + -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ + -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ + -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ + -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ + -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ + -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ + -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ + -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ + -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ + -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ + -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ + -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ + -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ + -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ + -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ + -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ + -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ + -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ + -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ + -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ + -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ + -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ + -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ + -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ + -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ + -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ + -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ + -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ + -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ + -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ + -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ + -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ + -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ + -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ + -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ + -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ + -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ + -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ + -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ + -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ + -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ + -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ + -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ + -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ + -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ + -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ + -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ + -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ + -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ + -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ + < $(srcdir)/unistd.in.h | \ + sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ + -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ + -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ + -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ + -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ + -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ + -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ + -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ + -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ + -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ + -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ + -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ + -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ + -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ + -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ + -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ + -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ + -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ + -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ + -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ + -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ + -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ + -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ + -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ + -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ + -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ + -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ + -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ + -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ + -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ + -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ + -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ + -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ + -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ + -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ + -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ + -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ + -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ + -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ + -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ + -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ + -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ + | \ + sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ + -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ + -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ + -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ + -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ + -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ + -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ + -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ + -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \ + -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ + -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ + -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ + -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ + -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ + -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ + -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ + -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ + -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ + -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ + -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ + -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ + -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ + -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ + -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ + -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ + -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ + -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ + -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ + -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ + -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ + -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ + +unitypes.h: unitypes.in.h + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/unitypes.in.h; \ + } > $@-t && \ + mv -f $@-t $@ + +uniwidth.h: uniwidth.in.h + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/uniwidth.in.h; \ + } > $@-t && \ + mv -f $@-t $@ + +# We need the following in order to create when the system +# version does not work standalone. +wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ + -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ + -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ + -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ + -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ + -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ + -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ + -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ + -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ + -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ + -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ + -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ + -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ + -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ + -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ + -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ + -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ + -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ + -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ + -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ + -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ + -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ + -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ + -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ + -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ + -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ + -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ + -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ + -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ + -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ + -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ + -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ + -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ + -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ + -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ + -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ + -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ + -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ + -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ + -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ + -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ + -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ + < $(srcdir)/wchar.in.h | \ + sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ + -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ + -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ + -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ + -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ + -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ + -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ + -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ + -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ + -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ + -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ + -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ + -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ + -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ + -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ + -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ + -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ + -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ + -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ + -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ + -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ + -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ + -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ + -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ + -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ + -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ + -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ + -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ + -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ + -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ + -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ + -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ + -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ + -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ + -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ + -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ + -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ + -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ + -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ + -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ + | \ + sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ + -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ + -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ + -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ + -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ + -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ + -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ + -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ + -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ + -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ + -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ + -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ + -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ + -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ + -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ + -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ + -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ + -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ + -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ + -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ + -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ + -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ + -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ + -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ + -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ + -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/wctype.in.h; \ + } > $@-t && \ + mv $@-t $@ + +mostlyclean-local: mostlyclean-generic + @for dir in '' $(MOSTLYCLEANDIRS); do \ + if test -n "$$dir" && test -d $$dir; then \ + echo "rmdir $$dir"; rmdir $$dir; \ + fi; \ + done; \ + : + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/gl/lib/alloca.c b/gl/lib/alloca.c new file mode 100644 index 0000000..ee0f018 --- /dev/null +++ b/gl/lib/alloca.c @@ -0,0 +1,478 @@ +/* alloca.c -- allocate automatically reclaimed memory + (Mostly) portable public-domain implementation -- D A Gwyn + + This implementation of the PWB library alloca function, + which is used to allocate space off the run-time stack so + that it is automatically reclaimed upon procedure exit, + was inspired by discussions with J. Q. Johnson of Cornell. + J.Otto Tennant contributed the Cray support. + + There are some preprocessor constants that can + be defined when compiling for your specific system, for + improved efficiency; however, the defaults should be okay. + + The general concept of this implementation is to keep + track of all alloca-allocated blocks, and reclaim any + that are found to be deeper in the stack than the current + invocation. This heuristic does not reclaim storage as + soon as it becomes invalid, but it will do so eventually. + + As a special case, alloca(0) reclaims storage without + allocating any. It is a good idea to use alloca(0) in + your main control loop, etc. to force garbage collection. */ + +#include + +#include + +#include +#include + +#ifdef emacs +# include "lisp.h" +# include "blockinput.h" +# ifdef EMACS_FREE +# undef free +# define free EMACS_FREE +# endif +#else +# define memory_full() abort () +#endif + +/* If compiling with GCC 2, this file's not needed. */ +#if !defined (__GNUC__) || __GNUC__ < 2 + +/* If someone has defined alloca as a macro, + there must be some other way alloca is supposed to work. */ +# ifndef alloca + +# ifdef emacs +# ifdef static +/* actually, only want this if static is defined as "" + -- this is for usg, in which emacs must undefine static + in order to make unexec workable + */ +# ifndef STACK_DIRECTION +you +lose +-- must know STACK_DIRECTION at compile-time +/* Using #error here is not wise since this file should work for + old and obscure compilers. */ +# endif /* STACK_DIRECTION undefined */ +# endif /* static */ +# endif /* emacs */ + +/* If your stack is a linked list of frames, you have to + provide an "address metric" ADDRESS_FUNCTION macro. */ + +# if defined (CRAY) && defined (CRAY_STACKSEG_END) +long i00afunc (); +# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) +# else +# define ADDRESS_FUNCTION(arg) &(arg) +# endif + +/* Define STACK_DIRECTION if you know the direction of stack + growth for your system; otherwise it will be automatically + deduced at run-time. + + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ + +# ifndef STACK_DIRECTION +# define STACK_DIRECTION 0 /* Direction unknown. */ +# endif + +# if STACK_DIRECTION != 0 + +# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ + +# else /* STACK_DIRECTION == 0; need run-time code. */ + +static int stack_dir; /* 1 or -1 once known. */ +# define STACK_DIR stack_dir + +static int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} + +# endif /* STACK_DIRECTION == 0 */ + +/* An "alloca header" is used to: + (a) chain together all alloca'ed blocks; + (b) keep track of stack depth. + + It is very important that sizeof(header) agree with malloc + alignment chunk size. The following default should work okay. */ + +# ifndef ALIGN_SIZE +# define ALIGN_SIZE sizeof(double) +# endif + +typedef union hdr +{ + char align[ALIGN_SIZE]; /* To force sizeof(header). */ + struct + { + union hdr *next; /* For chaining headers. */ + char *deep; /* For stack depth measure. */ + } h; +} header; + +static header *last_alloca_header = NULL; /* -> last alloca header. */ + +/* Return a pointer to at least SIZE bytes of storage, + which will be automatically reclaimed upon exit from + the procedure that called alloca. Originally, this space + was supposed to be taken from the current stack frame of the + caller, but that method cannot be made to work for some + implementations of C, for example under Gould's UTX/32. */ + +void * +alloca (size_t size) +{ + auto char probe; /* Probes stack depth: */ + register char *depth = ADDRESS_FUNCTION (probe); + +# if STACK_DIRECTION == 0 + if (STACK_DIR == 0) /* Unknown growth direction. */ + STACK_DIR = find_stack_direction (NULL, (size & 1) + 20); +# endif + + /* Reclaim garbage, defined as all alloca'd storage that + was allocated from deeper in the stack than currently. */ + + { + register header *hp; /* Traverses linked list. */ + +# ifdef emacs + BLOCK_INPUT; +# endif + + for (hp = last_alloca_header; hp != NULL;) + if ((STACK_DIR > 0 && hp->h.deep > depth) + || (STACK_DIR < 0 && hp->h.deep < depth)) + { + register header *np = hp->h.next; + + free (hp); /* Collect garbage. */ + + hp = np; /* -> next header. */ + } + else + break; /* Rest are not deeper. */ + + last_alloca_header = hp; /* -> last valid storage. */ + +# ifdef emacs + UNBLOCK_INPUT; +# endif + } + + if (size == 0) + return NULL; /* No allocation required. */ + + /* Allocate combined header + user data storage. */ + + { + /* Address of header. */ + register header *new; + + size_t combined_size = sizeof (header) + size; + if (combined_size < sizeof (header)) + memory_full (); + + new = malloc (combined_size); + + if (! new) + memory_full (); + + new->h.next = last_alloca_header; + new->h.deep = depth; + + last_alloca_header = new; + + /* User storage begins just after header. */ + + return (void *) (new + 1); + } +} + +# if defined (CRAY) && defined (CRAY_STACKSEG_END) + +# ifdef DEBUG_I00AFUNC +# include +# endif + +# ifndef CRAY_STACK +# define CRAY_STACK +# ifndef CRAY2 +/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ +struct stack_control_header + { + long shgrow:32; /* Number of times stack has grown. */ + long shaseg:32; /* Size of increments to stack. */ + long shhwm:32; /* High water mark of stack. */ + long shsize:32; /* Current size of stack (all segments). */ + }; + +/* The stack segment linkage control information occurs at + the high-address end of a stack segment. (The stack + grows from low addresses to high addresses.) The initial + part of the stack segment linkage control information is + 0200 (octal) words. This provides for register storage + for the routine which overflows the stack. */ + +struct stack_segment_linkage + { + long ss[0200]; /* 0200 overflow words. */ + long sssize:32; /* Number of words in this segment. */ + long ssbase:32; /* Offset to stack base. */ + long:32; + long sspseg:32; /* Offset to linkage control of previous + segment of stack. */ + long:32; + long sstcpt:32; /* Pointer to task common address block. */ + long sscsnm; /* Private control structure number for + microtasking. */ + long ssusr1; /* Reserved for user. */ + long ssusr2; /* Reserved for user. */ + long sstpid; /* Process ID for pid based multi-tasking. */ + long ssgvup; /* Pointer to multitasking thread giveup. */ + long sscray[7]; /* Reserved for Cray Research. */ + long ssa0; + long ssa1; + long ssa2; + long ssa3; + long ssa4; + long ssa5; + long ssa6; + long ssa7; + long sss0; + long sss1; + long sss2; + long sss3; + long sss4; + long sss5; + long sss6; + long sss7; + }; + +# else /* CRAY2 */ +/* The following structure defines the vector of words + returned by the STKSTAT library routine. */ +struct stk_stat + { + long now; /* Current total stack size. */ + long maxc; /* Amount of contiguous space which would + be required to satisfy the maximum + stack demand to date. */ + long high_water; /* Stack high-water mark. */ + long overflows; /* Number of stack overflow ($STKOFEN) calls. */ + long hits; /* Number of internal buffer hits. */ + long extends; /* Number of block extensions. */ + long stko_mallocs; /* Block allocations by $STKOFEN. */ + long underflows; /* Number of stack underflow calls ($STKRETN). */ + long stko_free; /* Number of deallocations by $STKRETN. */ + long stkm_free; /* Number of deallocations by $STKMRET. */ + long segments; /* Current number of stack segments. */ + long maxs; /* Maximum number of stack segments so far. */ + long pad_size; /* Stack pad size. */ + long current_address; /* Current stack segment address. */ + long current_size; /* Current stack segment size. This + number is actually corrupted by STKSTAT to + include the fifteen word trailer area. */ + long initial_address; /* Address of initial segment. */ + long initial_size; /* Size of initial segment. */ + }; + +/* The following structure describes the data structure which trails + any stack segment. I think that the description in 'asdef' is + out of date. I only describe the parts that I am sure about. */ + +struct stk_trailer + { + long this_address; /* Address of this block. */ + long this_size; /* Size of this block (does not include + this trailer). */ + long unknown2; + long unknown3; + long link; /* Address of trailer block of previous + segment. */ + long unknown5; + long unknown6; + long unknown7; + long unknown8; + long unknown9; + long unknown10; + long unknown11; + long unknown12; + long unknown13; + long unknown14; + }; + +# endif /* CRAY2 */ +# endif /* not CRAY_STACK */ + +# ifdef CRAY2 +/* Determine a "stack measure" for an arbitrary ADDRESS. + I doubt that "lint" will like this much. */ + +static long +i00afunc (long *address) +{ + struct stk_stat status; + struct stk_trailer *trailer; + long *block, size; + long result = 0; + + /* We want to iterate through all of the segments. The first + step is to get the stack status structure. We could do this + more quickly and more directly, perhaps, by referencing the + $LM00 common block, but I know that this works. */ + + STKSTAT (&status); + + /* Set up the iteration. */ + + trailer = (struct stk_trailer *) (status.current_address + + status.current_size + - 15); + + /* There must be at least one stack segment. Therefore it is + a fatal error if "trailer" is null. */ + + if (trailer == 0) + abort (); + + /* Discard segments that do not contain our argument address. */ + + while (trailer != 0) + { + block = (long *) trailer->this_address; + size = trailer->this_size; + if (block == 0 || size == 0) + abort (); + trailer = (struct stk_trailer *) trailer->link; + if ((block <= address) && (address < (block + size))) + break; + } + + /* Set the result to the offset in this segment and add the sizes + of all predecessor segments. */ + + result = address - block; + + if (trailer == 0) + { + return result; + } + + do + { + if (trailer->this_size <= 0) + abort (); + result += trailer->this_size; + trailer = (struct stk_trailer *) trailer->link; + } + while (trailer != 0); + + /* We are done. Note that if you present a bogus address (one + not in any segment), you will get a different number back, formed + from subtracting the address of the first block. This is probably + not what you want. */ + + return (result); +} + +# else /* not CRAY2 */ +/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. + Determine the number of the cell within the stack, + given the address of the cell. The purpose of this + routine is to linearize, in some sense, stack addresses + for alloca. */ + +static long +i00afunc (long address) +{ + long stkl = 0; + + long size, pseg, this_segment, stack; + long result = 0; + + struct stack_segment_linkage *ssptr; + + /* Register B67 contains the address of the end of the + current stack segment. If you (as a subprogram) store + your registers on the stack and find that you are past + the contents of B67, you have overflowed the segment. + + B67 also points to the stack segment linkage control + area, which is what we are really interested in. */ + + stkl = CRAY_STACKSEG_END (); + ssptr = (struct stack_segment_linkage *) stkl; + + /* If one subtracts 'size' from the end of the segment, + one has the address of the first word of the segment. + + If this is not the first segment, 'pseg' will be + nonzero. */ + + pseg = ssptr->sspseg; + size = ssptr->sssize; + + this_segment = stkl - size; + + /* It is possible that calling this routine itself caused + a stack overflow. Discard stack segments which do not + contain the target address. */ + + while (!(this_segment <= address && address <= stkl)) + { +# ifdef DEBUG_I00AFUNC + fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); +# endif + if (pseg == 0) + break; + stkl = stkl - pseg; + ssptr = (struct stack_segment_linkage *) stkl; + size = ssptr->sssize; + pseg = ssptr->sspseg; + this_segment = stkl - size; + } + + result = address - this_segment; + + /* If you subtract pseg from the current end of the stack, + you get the address of the previous stack segment's end. + This seems a little convoluted to me, but I'll bet you save + a cycle somewhere. */ + + while (pseg != 0) + { +# ifdef DEBUG_I00AFUNC + fprintf (stderr, "%011o %011o\n", pseg, size); +# endif + stkl = stkl - pseg; + ssptr = (struct stack_segment_linkage *) stkl; + size = ssptr->sssize; + pseg = ssptr->sspseg; + result += size; + } + return (result); +} + +# endif /* not CRAY2 */ +# endif /* CRAY */ + +# endif /* no alloca */ +#endif /* not GCC 2 */ diff --git a/gl/lib/alloca.in.h b/gl/lib/alloca.in.h new file mode 100644 index 0000000..5de9aaa --- /dev/null +++ b/gl/lib/alloca.in.h @@ -0,0 +1,63 @@ +/* Memory allocation on the stack. + + Copyright (C) 1995, 1999, 2001-2004, 2006-2014 Free Software Foundation, + Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, see + . + */ + +/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H + means there is a real alloca function. */ +#ifndef _GL_ALLOCA_H +#define _GL_ALLOCA_H + +/* alloca (N) returns a pointer to N bytes of memory + allocated on the stack, which will last until the function returns. + Use of alloca should be avoided: + - inside arguments of function calls - undefined behaviour, + - in inline functions - the allocation may actually last until the + calling function returns, + - for huge N (say, N >= 65536) - you never know how large (or small) + the stack is, and when the stack cannot fulfill the memory allocation + request, the program just crashes. + */ + +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _AIX +# define alloca __alloca +# elif defined _MSC_VER +# include +# 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 +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +# endif +#endif + +#endif /* _GL_ALLOCA_H */ diff --git a/gl/lib/allocator.c b/gl/lib/allocator.c new file mode 100644 index 0000000..2c1a3da --- /dev/null +++ b/gl/lib/allocator.c @@ -0,0 +1,5 @@ +#define _GL_USE_STDLIB_ALLOC 1 +#include +#include "allocator.h" +#include +struct allocator const stdlib_allocator = { malloc, realloc, free, NULL }; diff --git a/gl/lib/allocator.h b/gl/lib/allocator.h new file mode 100644 index 0000000..0904b32 --- /dev/null +++ b/gl/lib/allocator.h @@ -0,0 +1,58 @@ +/* Memory allocators such as malloc+free. + + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#ifndef _GL_ALLOCATOR_H +#define _GL_ALLOCATOR_H + +#include + +/* An object describing a memory allocator family. */ + +struct allocator +{ + /* Do not use GCC attributes such as __attribute__ ((malloc)) with + the function types pointed at by these members, because these + attributes do not work with pointers to functions. See + . */ + + /* Call ALLOCATE to allocate memory, like 'malloc'. On failure ALLOCATE + should return NULL, though not necessarily set errno. When given + a zero size it may return NULL even if successful. */ + void *(*allocate) (size_t); + + /* If nonnull, call REALLOCATE to reallocate memory, like 'realloc'. + On failure REALLOCATE should return NULL, though not necessarily set + errno. When given a zero size it may return NULL even if + successful. */ + void *(*reallocate) (void *, size_t); + + /* Call FREE to free memory, like 'free'. */ + void (*free) (void *); + + /* If nonnull, call DIE (SIZE) if MALLOC (SIZE) or REALLOC (..., + SIZE) fails. DIE should not return. SIZE should equal SIZE_MAX + if size_t overflow was detected while calculating sizes to be + passed to MALLOC or REALLOC. */ + void (*die) (size_t); +}; + +/* An allocator using the stdlib functions and a null DIE function. */ +extern struct allocator const stdlib_allocator; + +#endif /* _GL_ALLOCATOR_H */ diff --git a/gl/lib/areadlink-with-size.c b/gl/lib/areadlink-with-size.c new file mode 100644 index 0000000..161d474 --- /dev/null +++ b/gl/lib/areadlink-with-size.c @@ -0,0 +1,104 @@ +/* readlink wrapper to return the link name in malloc'd storage. + Unlike xreadlink and xreadlink_with_size, don't ever call exit. + + Copyright (C) 2001, 2003-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering */ + +#include + +#include "areadlink.h" + +#include +#include +#include +#include +#include + +#ifndef SSIZE_MAX +# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) +#endif + +/* SYMLINK_MAX is used only for an initial memory-allocation sanity + check, so it's OK to guess too small on hosts where there is no + arbitrary limit to symbolic link length. */ +#ifndef SYMLINK_MAX +# define SYMLINK_MAX 1024 +#endif + +#define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX) + +/* Call readlink to get the symbolic link value of FILE. + SIZE is a hint as to how long the link is expected to be; + typically it is taken from st_size. It need not be correct. + Return a pointer to that NUL-terminated string in malloc'd storage. + If readlink fails, malloc fails, or if the link value is longer + than SSIZE_MAX, return NULL (caller may use errno to diagnose). */ + +char * +areadlink_with_size (char const *file, size_t size) +{ + /* Some buggy file systems report garbage in st_size. Defend + against them by ignoring outlandish st_size values in the initial + memory allocation. */ + size_t symlink_max = SYMLINK_MAX; + size_t INITIAL_LIMIT_BOUND = 8 * 1024; + size_t initial_limit = (symlink_max < INITIAL_LIMIT_BOUND + ? symlink_max + 1 + : INITIAL_LIMIT_BOUND); + + /* The initial buffer size for the link value. */ + size_t buf_size = size < initial_limit ? size + 1 : initial_limit; + + while (1) + { + ssize_t r; + size_t link_length; + char *buffer = malloc (buf_size); + + if (buffer == NULL) + return NULL; + r = readlink (file, buffer, buf_size); + link_length = r; + + /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1 + with errno == ERANGE if the buffer is too small. */ + if (r < 0 && errno != ERANGE) + { + int saved_errno = errno; + free (buffer); + errno = saved_errno; + return NULL; + } + + if (link_length < buf_size) + { + buffer[link_length] = 0; + return buffer; + } + + free (buffer); + if (buf_size <= MAXSIZE / 2) + buf_size *= 2; + else if (buf_size < MAXSIZE) + buf_size = MAXSIZE; + else + { + errno = ENOMEM; + return NULL; + } + } +} diff --git a/gl/lib/areadlink.c b/gl/lib/areadlink.c new file mode 100644 index 0000000..b4b856c --- /dev/null +++ b/gl/lib/areadlink.c @@ -0,0 +1,56 @@ +/* areadlink.c -- readlink wrapper to return the link name in malloc'd storage + Unlike xreadlink and xreadlink_with_size, don't ever call exit. + + Copyright (C) 2001, 2003-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering + and Bruno Haible . */ + +#include + +/* Specification. */ +#include "areadlink.h" + +#include "careadlinkat.h" + +#include +#include + +/* Get the symbolic link value of FILENAME and put it into BUFFER, with + size BUFFER_SIZE. This function acts like readlink but has + readlinkat's signature. */ +static ssize_t +careadlinkatcwd (int fd, char const *filename, char *buffer, + size_t buffer_size) +{ + /* FD must be AT_FDCWD here, otherwise the caller is using this + function in contexts it was not meant for. */ + if (fd != AT_FDCWD) + abort (); + return readlink (filename, buffer, buffer_size); +} + +/* Call readlink to get the symbolic link value of FILENAME. + Return a pointer to that NUL-terminated string in malloc'd storage. + If readlink fails, return NULL and set errno. + If allocation fails, or if the link value is longer than SIZE_MAX :-), + return NULL and set errno to ENOMEM. */ + +char * +areadlink (char const *filename) +{ + return careadlinkat (AT_FDCWD, filename, NULL, 0, NULL, careadlinkatcwd); +} diff --git a/gl/lib/areadlink.h b/gl/lib/areadlink.h new file mode 100644 index 0000000..59abb37 --- /dev/null +++ b/gl/lib/areadlink.h @@ -0,0 +1,33 @@ +/* Read symbolic links without size limitation. + + Copyright (C) 2001, 2003-2004, 2007, 2009-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering */ + +#include + +extern char *areadlink (char const *filename); +extern char *areadlink_with_size (char const *filename, size_t size_hint); + +#if GNULIB_AREADLINKAT +extern char *areadlinkat (int fd, char const *filename); +#endif + +#if GNULIB_AREADLINKAT_WITH_SIZE +extern char *areadlinkat_with_size (int fd, char const *filename, + size_t size_hint); +#endif diff --git a/gl/lib/areadlinkat.c b/gl/lib/areadlinkat.c new file mode 100644 index 0000000..9e1a959 --- /dev/null +++ b/gl/lib/areadlinkat.c @@ -0,0 +1,65 @@ +/* areadlinkat.c -- readlinkat wrapper to return malloc'd link name + Unlike xreadlinkat, only call exit on failure to change directory. + + Copyright (C) 2001, 2003-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering , + and Bruno Haible , + and Eric Blake . */ + +#include + +/* Specification. */ +#include "areadlink.h" + +#include "careadlinkat.h" + +#if HAVE_READLINKAT + +/* Call readlinkat to get the symbolic link value of FILENAME relative to FD. + Return a pointer to that NUL-terminated string in malloc'd storage. + If readlinkat fails, return NULL and set errno (although failure to + change directory will issue a diagnostic and exit). + If allocation fails, or if the link value is longer than SIZE_MAX :-), + return NULL and set errno to ENOMEM. */ + +char * +areadlinkat (int fd, char const *filename) +{ + return careadlinkat (fd, filename, NULL, 0, NULL, readlinkat); +} + +#else /* !HAVE_READLINKAT */ + +/* It is more efficient to change directories only once and call + areadlink, rather than repeatedly call the replacement + readlinkat. */ + +# define AT_FUNC_NAME areadlinkat +# define AT_FUNC_F1 areadlink +# define AT_FUNC_POST_FILE_PARAM_DECLS /* empty */ +# define AT_FUNC_POST_FILE_ARGS /* empty */ +# define AT_FUNC_RESULT char * +# define AT_FUNC_FAIL NULL +# include "at-func.c" +# undef AT_FUNC_NAME +# undef AT_FUNC_F1 +# undef AT_FUNC_POST_FILE_PARAM_DECLS +# undef AT_FUNC_POST_FILE_ARGS +# undef AT_FUNC_RESULT +# undef AT_FUNC_FAIL + +#endif /* !HAVE_READLINKAT */ diff --git a/gl/lib/argmatch.c b/gl/lib/argmatch.c new file mode 100644 index 0000000..f56ab55 --- /dev/null +++ b/gl/lib/argmatch.c @@ -0,0 +1,277 @@ +/* argmatch.c -- find a match for a string in an array + + Copyright (C) 1990, 1998-1999, 2001-2007, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by David MacKenzie + Modified by Akim Demaille */ + +#include + +/* Specification. */ +#include "argmatch.h" + +#include +#include +#include +#include + +#include "gettext.h" +#define _(msgid) gettext (msgid) + +#include "error.h" +#include "quotearg.h" +#include "quote.h" + +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif + +/* When reporting an invalid argument, show nonprinting characters + by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use + literal_quoting_style. */ +#ifndef ARGMATCH_QUOTING_STYLE +# define ARGMATCH_QUOTING_STYLE locale_quoting_style +#endif + +/* Non failing version of argmatch call this function after failing. */ +#ifndef ARGMATCH_DIE +# include "exitfail.h" +# define ARGMATCH_DIE exit (exit_failure) +#endif + +#ifdef ARGMATCH_DIE_DECL +ARGMATCH_DIE_DECL; +#endif + +static void +__argmatch_die (void) +{ + ARGMATCH_DIE; +} + +/* Used by XARGMATCH and XARGCASEMATCH. See description in argmatch.h. + Default to __argmatch_die, but allow caller to change this at run-time. */ +argmatch_exit_fn argmatch_die = __argmatch_die; + + +/* If ARG is an unambiguous match for an element of the + NULL-terminated array ARGLIST, return the index in ARGLIST + of the matched element, else -1 if it does not match any element + or -2 if it is ambiguous (is a prefix of more than one element). + + If VALLIST is none null, use it to resolve ambiguities limited to + synonyms, i.e., for + "yes", "yop" -> 0 + "no", "nope" -> 1 + "y" is a valid argument, for 0, and "n" for 1. */ + +ptrdiff_t +argmatch (const char *arg, const char *const *arglist, + const char *vallist, size_t valsize) +{ + size_t i; /* Temporary index in ARGLIST. */ + size_t arglen; /* Length of ARG. */ + ptrdiff_t matchind = -1; /* Index of first nonexact match. */ + bool ambiguous = false; /* If true, multiple nonexact match(es). */ + + arglen = strlen (arg); + + /* Test all elements for either exact match or abbreviated matches. */ + for (i = 0; arglist[i]; i++) + { + if (!strncmp (arglist[i], arg, arglen)) + { + if (strlen (arglist[i]) == arglen) + /* Exact match found. */ + return i; + else if (matchind == -1) + /* First nonexact match found. */ + matchind = i; + else + { + /* Second nonexact match found. */ + if (vallist == NULL + || memcmp (vallist + valsize * matchind, + vallist + valsize * i, valsize)) + { + /* There is a real ambiguity, or we could not + disambiguate. */ + ambiguous = true; + } + } + } + } + if (ambiguous) + return -2; + else + return matchind; +} + +/* Error reporting for argmatch. + CONTEXT is a description of the type of entity that was being matched. + VALUE is the invalid value that was given. + PROBLEM is the return value from argmatch. */ + +void +argmatch_invalid (const char *context, const char *value, ptrdiff_t problem) +{ + char const *format = (problem == -1 + ? _("invalid argument %s for %s") + : _("ambiguous argument %s for %s")); + + error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value), + quote_n (1, context)); +} + +/* List the valid arguments for argmatch. + ARGLIST is the same as in argmatch. + VALLIST is a pointer to an array of values. + VALSIZE is the size of the elements of VALLIST */ +void +argmatch_valid (const char *const *arglist, + const char *vallist, size_t valsize) +{ + size_t i; + const char *last_val = NULL; + + /* We try to put synonyms on the same line. The assumption is that + synonyms follow each other */ + fputs (_("Valid arguments are:"), stderr); + for (i = 0; arglist[i]; i++) + if ((i == 0) + || memcmp (last_val, vallist + valsize * i, valsize)) + { + fprintf (stderr, "\n - %s", quote (arglist[i])); + last_val = vallist + valsize * i; + } + else + { + fprintf (stderr, ", %s", quote (arglist[i])); + } + putc ('\n', stderr); +} + +/* Never failing versions of the previous functions. + + CONTEXT is the context for which argmatch is called (e.g., + "--version-control", or "$VERSION_CONTROL" etc.). Upon failure, + calls the (supposed never to return) function EXIT_FN. */ + +ptrdiff_t +__xargmatch_internal (const char *context, + const char *arg, const char *const *arglist, + const char *vallist, size_t valsize, + argmatch_exit_fn exit_fn) +{ + ptrdiff_t res = argmatch (arg, arglist, vallist, valsize); + if (res >= 0) + /* Success. */ + return res; + + /* We failed. Explain why. */ + argmatch_invalid (context, arg, res); + argmatch_valid (arglist, vallist, valsize); + (*exit_fn) (); + + return -1; /* To please the compilers. */ +} + +/* Look for VALUE in VALLIST, an array of objects of size VALSIZE and + return the first corresponding argument in ARGLIST */ +const char * +argmatch_to_argument (const char *value, + const char *const *arglist, + const char *vallist, size_t valsize) +{ + size_t i; + + for (i = 0; arglist[i]; i++) + if (!memcmp (value, vallist + valsize * i, valsize)) + return arglist[i]; + return NULL; +} + +#ifdef TEST +/* + * Based on "getversion.c" by David MacKenzie + */ +char *program_name; + +/* When to make backup files. */ +enum backup_type +{ + /* Never make backups. */ + no_backups, + + /* Make simple backups of every file. */ + simple_backups, + + /* Make numbered backups of files that already have numbered backups, + and simple backups of the others. */ + numbered_existing_backups, + + /* Make numbered backups of every file. */ + numbered_backups +}; + +/* Two tables describing arguments (keys) and their corresponding + values */ +static const char *const backup_args[] = +{ + "no", "none", "off", + "simple", "never", + "existing", "nil", + "numbered", "t", + 0 +}; + +static const enum backup_type backup_vals[] = +{ + no_backups, no_backups, no_backups, + simple_backups, simple_backups, + numbered_existing_backups, numbered_existing_backups, + numbered_backups, numbered_backups +}; + +int +main (int argc, const char *const *argv) +{ + const char *cp; + enum backup_type backup_type = no_backups; + + program_name = (char *) argv[0]; + + if (argc > 2) + { + fprintf (stderr, "Usage: %s [VERSION_CONTROL]\n", program_name); + exit (1); + } + + if ((cp = getenv ("VERSION_CONTROL"))) + backup_type = XARGMATCH ("$VERSION_CONTROL", cp, + backup_args, backup_vals); + + if (argc == 2) + backup_type = XARGMATCH (program_name, argv[1], + backup_args, backup_vals); + + printf ("The version control is '%s'\n", + ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals)); + + return 0; +} +#endif diff --git a/gl/lib/argmatch.h b/gl/lib/argmatch.h new file mode 100644 index 0000000..09645db --- /dev/null +++ b/gl/lib/argmatch.h @@ -0,0 +1,111 @@ +/* argmatch.h -- definitions and prototypes for argmatch.c + + Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by David MacKenzie + Modified by Akim Demaille */ + +#ifndef ARGMATCH_H_ +# define ARGMATCH_H_ 1 + +# include + +# include "verify.h" + +#ifdef __cplusplus +extern "C" { +#endif + +# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array)) + +/* Assert there are as many real arguments as there are values + (argument list ends with a NULL guard). */ + +# define ARGMATCH_VERIFY(Arglist, Vallist) \ + verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1) + +/* Return the index of the element of ARGLIST (NULL terminated) that + matches with ARG. If VALLIST is not NULL, then use it to resolve + false ambiguities (i.e., different matches of ARG but corresponding + to the same values in VALLIST). */ + +ptrdiff_t argmatch (char const *arg, char const *const *arglist, + char const *vallist, size_t valsize) _GL_ATTRIBUTE_PURE; + +# define ARGMATCH(Arg, Arglist, Vallist) \ + argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist)) + +/* xargmatch calls this function when it fails. This function should not + return. By default, this is a function that calls ARGMATCH_DIE which + in turn defaults to 'exit (exit_failure)'. */ +typedef void (*argmatch_exit_fn) (void); +extern argmatch_exit_fn argmatch_die; + +/* Report on stderr why argmatch failed. Report correct values. */ + +void argmatch_invalid (char const *context, char const *value, + ptrdiff_t problem); + +/* Left for compatibility with the old name invalid_arg */ + +# define invalid_arg(Context, Value, Problem) \ + argmatch_invalid (Context, Value, Problem) + + + +/* Report on stderr the list of possible arguments. */ + +void argmatch_valid (char const *const *arglist, + char const *vallist, size_t valsize); + +# define ARGMATCH_VALID(Arglist, Vallist) \ + argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist)) + + + +/* Same as argmatch, but upon failure, report an explanation of the + failure, and exit using the function EXIT_FN. */ + +ptrdiff_t __xargmatch_internal (char const *context, + char const *arg, char const *const *arglist, + char const *vallist, size_t valsize, + argmatch_exit_fn exit_fn); + +/* Programmer friendly interface to __xargmatch_internal. */ + +# define XARGMATCH(Context, Arg, Arglist, Vallist) \ + ((Vallist) [__xargmatch_internal (Context, Arg, Arglist, \ + (char const *) (Vallist), \ + sizeof *(Vallist), \ + argmatch_die)]) + +/* Convert a value into a corresponding argument. */ + +char const *argmatch_to_argument (char const *value, + char const *const *arglist, + char const *vallist, size_t valsize) + _GL_ATTRIBUTE_PURE; + +# define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist) \ + argmatch_to_argument (Value, Arglist, \ + (char const *) (Vallist), sizeof *(Vallist)) + +#ifdef __cplusplus +} +#endif + +#endif /* ARGMATCH_H_ */ diff --git a/gl/lib/asnprintf.c b/gl/lib/asnprintf.c new file mode 100644 index 0000000..0c62197 --- /dev/null +++ b/gl/lib/asnprintf.c @@ -0,0 +1,34 @@ +/* Formatted output to strings. + Copyright (C) 1999, 2002, 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#include + +/* Specification. */ +#include "vasnprintf.h" + +#include + +char * +asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) +{ + va_list args; + char *result; + + va_start (args, format); + result = vasnprintf (resultbuf, lengthp, format, args); + va_end (args); + return result; +} diff --git a/gl/lib/at-func.c b/gl/lib/at-func.c new file mode 100644 index 0000000..c8ee073 --- /dev/null +++ b/gl/lib/at-func.c @@ -0,0 +1,146 @@ +/* Define at-style functions like fstatat, unlinkat, fchownat, etc. + Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ + +#ifdef GNULIB_SUPPORT_ONLY_AT_FDCWD +# include +# ifndef ENOTSUP +# define ENOTSUP EINVAL +# endif +#else +# include "openat.h" +# include "openat-priv.h" +# include "save-cwd.h" +#endif + +#ifdef AT_FUNC_USE_F1_COND +# define CALL_FUNC(F) \ + (flag == AT_FUNC_USE_F1_COND \ + ? AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS) \ + : AT_FUNC_F2 (F AT_FUNC_POST_FILE_ARGS)) +# define VALIDATE_FLAG(F) \ + if (flag & ~AT_FUNC_USE_F1_COND) \ + { \ + errno = EINVAL; \ + return FUNC_FAIL; \ + } +#else +# define CALL_FUNC(F) (AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS)) +# define VALIDATE_FLAG(F) /* empty */ +#endif + +#ifdef AT_FUNC_RESULT +# define FUNC_RESULT AT_FUNC_RESULT +#else +# define FUNC_RESULT int +#endif + +#ifdef AT_FUNC_FAIL +# define FUNC_FAIL AT_FUNC_FAIL +#else +# define FUNC_FAIL -1 +#endif + +/* Call AT_FUNC_F1 to operate on FILE, which is in the directory + open on descriptor FD. If AT_FUNC_USE_F1_COND is defined to a value, + AT_FUNC_POST_FILE_PARAM_DECLS must include a parameter named flag; + call AT_FUNC_F2 if FLAG is 0 or fail if FLAG contains more bits than + AT_FUNC_USE_F1_COND. Return int and fail with -1 unless AT_FUNC_RESULT + or AT_FUNC_FAIL are defined. If possible, do it without changing the + working directory. Otherwise, resort to using save_cwd/fchdir, + then AT_FUNC_F?/restore_cwd. If either the save_cwd or the restore_cwd + fails, then give a diagnostic and exit nonzero. */ +FUNC_RESULT +AT_FUNC_NAME (int fd, char const *file AT_FUNC_POST_FILE_PARAM_DECLS) +{ + VALIDATE_FLAG (flag); + + if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file)) + return CALL_FUNC (file); + +#ifdef GNULIB_SUPPORT_ONLY_AT_FDCWD + errno = ENOTSUP; + return FUNC_FAIL; +#else + { + /* Be careful to choose names unlikely to conflict with + AT_FUNC_POST_FILE_PARAM_DECLS. */ + struct saved_cwd saved_cwd; + int saved_errno; + FUNC_RESULT err; + + { + char proc_buf[OPENAT_BUFFER_SIZE]; + char *proc_file = openat_proc_name (proc_buf, fd, file); + if (proc_file) + { + FUNC_RESULT proc_result = CALL_FUNC (proc_file); + int proc_errno = errno; + if (proc_file != proc_buf) + free (proc_file); + /* If the syscall succeeds, or if it fails with an unexpected + errno value, then return right away. Otherwise, fall through + and resort to using save_cwd/restore_cwd. */ + if (FUNC_FAIL != proc_result) + return proc_result; + if (! EXPECTED_ERRNO (proc_errno)) + { + errno = proc_errno; + return proc_result; + } + } + } + + if (save_cwd (&saved_cwd) != 0) + openat_save_fail (errno); + if (0 <= fd && fd == saved_cwd.desc) + { + /* If saving the working directory collides with the user's + requested fd, then the user's fd must have been closed to + begin with. */ + free_cwd (&saved_cwd); + errno = EBADF; + return FUNC_FAIL; + } + + if (fchdir (fd) != 0) + { + saved_errno = errno; + free_cwd (&saved_cwd); + errno = saved_errno; + return FUNC_FAIL; + } + + err = CALL_FUNC (file); + saved_errno = (err == FUNC_FAIL ? errno : 0); + + if (restore_cwd (&saved_cwd) != 0) + openat_restore_fail (errno); + + free_cwd (&saved_cwd); + + if (saved_errno) + errno = saved_errno; + return err; + } +#endif +} +#undef CALL_FUNC +#undef FUNC_RESULT +#undef FUNC_FAIL diff --git a/gl/lib/basename-lgpl.c b/gl/lib/basename-lgpl.c new file mode 100644 index 0000000..cec50e9 --- /dev/null +++ b/gl/lib/basename-lgpl.c @@ -0,0 +1,75 @@ +/* basename.c -- return the last element in a file name + + Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "dirname.h" + +#include + +/* Return the address of the last file name component of NAME. If + NAME has no relative file name components because it is a file + system root, return the empty string. */ + +char * +last_component (char const *name) +{ + char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); + char const *p; + bool saw_slash = false; + + while (ISSLASH (*base)) + base++; + + for (p = base; *p; p++) + { + if (ISSLASH (*p)) + saw_slash = true; + else if (saw_slash) + { + base = p; + saw_slash = false; + } + } + + return (char *) base; +} + +/* Return the length of the basename NAME. Typically NAME is the + value returned by base_name or last_component. Act like strlen + (NAME), except omit all trailing slashes. */ + +size_t +base_len (char const *name) +{ + size_t len; + size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); + + for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) + continue; + + if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1 + && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) + return 2; + + if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len + && len == prefix_len && ISSLASH (name[prefix_len])) + return prefix_len + 1; + + return len; +} diff --git a/gl/lib/basename.c b/gl/lib/basename.c new file mode 100644 index 0000000..67d9420 --- /dev/null +++ b/gl/lib/basename.c @@ -0,0 +1,58 @@ +/* basename.c -- return the last element in a file name + + Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "dirname.h" + +#include +#include "xalloc.h" +#include "xstrndup.h" + +char * +base_name (char const *name) +{ + char const *base = last_component (name); + size_t length; + + /* If there is no last component, then name is a file system root or the + empty string. */ + if (! *base) + return xstrndup (name, base_len (name)); + + /* Collapse a sequence of trailing slashes into one. */ + length = base_len (base); + if (ISSLASH (base[length])) + length++; + + /* On systems with drive letters, "a/b:c" must return "./b:c" rather + than "b:c" to avoid confusion with a drive letter. On systems + with pure POSIX semantics, this is not an issue. */ + if (FILE_SYSTEM_PREFIX_LEN (base)) + { + char *p = xmalloc (length + 3); + p[0] = '.'; + p[1] = '/'; + memcpy (p + 2, base, length); + p[length + 2] = '\0'; + return p; + } + + /* Finally, copy the basename. */ + return xstrndup (base, length); +} diff --git a/gl/lib/bitrotate.c b/gl/lib/bitrotate.c new file mode 100644 index 0000000..a8f6028 --- /dev/null +++ b/gl/lib/bitrotate.c @@ -0,0 +1,3 @@ +#include +#define BITROTATE_INLINE _GL_EXTERN_INLINE +#include "bitrotate.h" diff --git a/gl/lib/bitrotate.h b/gl/lib/bitrotate.h new file mode 100644 index 0000000..9ec0b47 --- /dev/null +++ b/gl/lib/bitrotate.h @@ -0,0 +1,136 @@ +/* bitrotate.h - Rotate bits in integers + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Simon Josefsson , 2008. */ + +#ifndef _GL_BITROTATE_H +#define _GL_BITROTATE_H + +#include +#include +#include + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef BITROTATE_INLINE +# define BITROTATE_INLINE _GL_INLINE +#endif + +#ifdef UINT64_MAX +/* Given an unsigned 64-bit argument X, return the value corresponding + to rotating the bits N steps to the left. N must be between 1 and + 63 inclusive. */ +BITROTATE_INLINE uint64_t +rotl64 (uint64_t x, int n) +{ + return ((x << n) | (x >> (64 - n))) & UINT64_MAX; +} + +/* Given an unsigned 64-bit argument X, return the value corresponding + to rotating the bits N steps to the right. N must be between 1 to + 63 inclusive.*/ +BITROTATE_INLINE uint64_t +rotr64 (uint64_t x, int n) +{ + return ((x >> n) | (x << (64 - n))) & UINT64_MAX; +} +#endif + +/* Given an unsigned 32-bit argument X, return the value corresponding + to rotating the bits N steps to the left. N must be between 1 and + 31 inclusive. */ +BITROTATE_INLINE uint32_t +rotl32 (uint32_t x, int n) +{ + return ((x << n) | (x >> (32 - n))) & UINT32_MAX; +} + +/* Given an unsigned 32-bit argument X, return the value corresponding + to rotating the bits N steps to the right. N must be between 1 to + 31 inclusive.*/ +BITROTATE_INLINE uint32_t +rotr32 (uint32_t x, int n) +{ + return ((x >> n) | (x << (32 - n))) & UINT32_MAX; +} + +/* Given a size_t argument X, return the value corresponding + to rotating the bits N steps to the left. N must be between 1 and + (CHAR_BIT * sizeof (size_t) - 1) inclusive. */ +BITROTATE_INLINE size_t +rotl_sz (size_t x, int n) +{ + return ((x << n) | (x >> ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX; +} + +/* Given a size_t argument X, return the value corresponding + to rotating the bits N steps to the right. N must be between 1 to + (CHAR_BIT * sizeof (size_t) - 1) inclusive. */ +BITROTATE_INLINE size_t +rotr_sz (size_t x, int n) +{ + return ((x >> n) | (x << ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX; +} + +/* Given an unsigned 16-bit argument X, return the value corresponding + to rotating the bits N steps to the left. N must be between 1 to + 15 inclusive, but on most relevant targets N can also be 0 and 16 + because 'int' is at least 32 bits and the arguments must widen + before shifting. */ +BITROTATE_INLINE uint16_t +rotl16 (uint16_t x, int n) +{ + return ((x << n) | (x >> (16 - n))) & UINT16_MAX; +} + +/* Given an unsigned 16-bit argument X, return the value corresponding + to rotating the bits N steps to the right. N must be in 1 to 15 + inclusive, but on most relevant targets N can also be 0 and 16 + because 'int' is at least 32 bits and the arguments must widen + before shifting. */ +BITROTATE_INLINE uint16_t +rotr16 (uint16_t x, int n) +{ + return ((x >> n) | (x << (16 - n))) & UINT16_MAX; +} + +/* Given an unsigned 8-bit argument X, return the value corresponding + to rotating the bits N steps to the left. N must be between 1 to 7 + inclusive, but on most relevant targets N can also be 0 and 8 + because 'int' is at least 32 bits and the arguments must widen + before shifting. */ +BITROTATE_INLINE uint8_t +rotl8 (uint8_t x, int n) +{ + return ((x << n) | (x >> (8 - n))) & UINT8_MAX; +} + +/* Given an unsigned 8-bit argument X, return the value corresponding + to rotating the bits N steps to the right. N must be in 1 to 7 + inclusive, but on most relevant targets N can also be 0 and 8 + because 'int' is at least 32 bits and the arguments must widen + before shifting. */ +BITROTATE_INLINE uint8_t +rotr8 (uint8_t x, int n) +{ + return ((x >> n) | (x << (8 - n))) & UINT8_MAX; +} + +_GL_INLINE_HEADER_END + +#endif /* _GL_BITROTATE_H */ diff --git a/gl/lib/btowc.c b/gl/lib/btowc.c new file mode 100644 index 0000000..b06ca2e --- /dev/null +++ b/gl/lib/btowc.c @@ -0,0 +1,39 @@ +/* Convert unibyte character to wide character. + Copyright (C) 2008, 2010-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include + +wint_t +btowc (int c) +{ + if (c != EOF) + { + char buf[1]; + wchar_t wc; + + buf[0] = c; + if (mbtowc (&wc, buf, 1) >= 0) + return wc; + } + return WEOF; +} diff --git a/gl/lib/byteswap.in.h b/gl/lib/byteswap.in.h new file mode 100644 index 0000000..5d1592a --- /dev/null +++ b/gl/lib/byteswap.in.h @@ -0,0 +1,44 @@ +/* byteswap.h - Byte swapping + Copyright (C) 2005, 2007, 2009-2014 Free Software Foundation, Inc. + Written by Oskar Liljeblad , 2005. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _GL_BYTESWAP_H +#define _GL_BYTESWAP_H + +/* Given an unsigned 16-bit argument X, return the value corresponding to + X with reversed byte order. */ +#define bswap_16(x) ((((x) & 0x00FF) << 8) | \ + (((x) & 0xFF00) >> 8)) + +/* Given an unsigned 32-bit argument X, return the value corresponding to + X with reversed byte order. */ +#define bswap_32(x) ((((x) & 0x000000FF) << 24) | \ + (((x) & 0x0000FF00) << 8) | \ + (((x) & 0x00FF0000) >> 8) | \ + (((x) & 0xFF000000) >> 24)) + +/* Given an unsigned 64-bit argument X, return the value corresponding to + X with reversed byte order. */ +#define bswap_64(x) ((((x) & 0x00000000000000FFULL) << 56) | \ + (((x) & 0x000000000000FF00ULL) << 40) | \ + (((x) & 0x0000000000FF0000ULL) << 24) | \ + (((x) & 0x00000000FF000000ULL) << 8) | \ + (((x) & 0x000000FF00000000ULL) >> 8) | \ + (((x) & 0x0000FF0000000000ULL) >> 24) | \ + (((x) & 0x00FF000000000000ULL) >> 40) | \ + (((x) & 0xFF00000000000000ULL) >> 56)) + +#endif /* _GL_BYTESWAP_H */ diff --git a/gl/lib/c-ctype.c b/gl/lib/c-ctype.c new file mode 100644 index 0000000..48c6478 --- /dev/null +++ b/gl/lib/c-ctype.c @@ -0,0 +1,395 @@ +/* Character handling in C locale. + + Copyright 2000-2003, 2006, 2009-2014 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see . */ + +#include + +/* Specification. */ +#define NO_C_CTYPE_MACROS +#include "c-ctype.h" + +/* The function isascii is not locale dependent. Its use in EBCDIC is + questionable. */ +bool +c_isascii (int c) +{ + return (c >= 0x00 && c <= 0x7f); +} + +bool +c_isalnum (int c) +{ +#if C_CTYPE_CONSECUTIVE_DIGITS \ + && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII + return ((c >= '0' && c <= '9') + || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')); +#else + return ((c >= '0' && c <= '9') + || (c >= 'A' && c <= 'Z') + || (c >= 'a' && c <= 'z')); +#endif +#else + switch (c) + { + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isalpha (int c) +{ +#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII + return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'); +#else + return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); +#endif +#else + switch (c) + { + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isblank (int c) +{ + return (c == ' ' || c == '\t'); +} + +bool +c_iscntrl (int c) +{ +#if C_CTYPE_ASCII + return ((c & ~0x1f) == 0 || c == 0x7f); +#else + switch (c) + { + case ' ': case '!': case '"': case '#': case '$': case '%': + case '&': case '\'': case '(': case ')': case '*': case '+': + case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': case '?': + case '@': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + case '[': case '\\': case ']': case '^': case '_': case '`': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + case '{': case '|': case '}': case '~': + return 0; + default: + return 1; + } +#endif +} + +bool +c_isdigit (int c) +{ +#if C_CTYPE_CONSECUTIVE_DIGITS + return (c >= '0' && c <= '9'); +#else + switch (c) + { + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + return 1; + default: + return 0; + } +#endif +} + +bool +c_islower (int c) +{ +#if C_CTYPE_CONSECUTIVE_LOWERCASE + return (c >= 'a' && c <= 'z'); +#else + switch (c) + { + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isgraph (int c) +{ +#if C_CTYPE_ASCII + return (c >= '!' && c <= '~'); +#else + switch (c) + { + case '!': case '"': case '#': case '$': case '%': case '&': + case '\'': case '(': case ')': case '*': case '+': case ',': + case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': case '?': + case '@': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + case '[': case '\\': case ']': case '^': case '_': case '`': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + case '{': case '|': case '}': case '~': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isprint (int c) +{ +#if C_CTYPE_ASCII + return (c >= ' ' && c <= '~'); +#else + switch (c) + { + case ' ': case '!': case '"': case '#': case '$': case '%': + case '&': case '\'': case '(': case ')': case '*': case '+': + case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': case '?': + case '@': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + case '[': case '\\': case ']': case '^': case '_': case '`': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': + case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': + case 's': case 't': case 'u': case 'v': case 'w': case 'x': + case 'y': case 'z': + case '{': case '|': case '}': case '~': + return 1; + default: + return 0; + } +#endif +} + +bool +c_ispunct (int c) +{ +#if C_CTYPE_ASCII + return ((c >= '!' && c <= '~') + && !((c >= '0' && c <= '9') + || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'))); +#else + switch (c) + { + case '!': case '"': case '#': case '$': case '%': case '&': + case '\'': case '(': case ')': case '*': case '+': case ',': + case '-': case '.': case '/': + case ':': case ';': case '<': case '=': case '>': case '?': + case '@': + case '[': case '\\': case ']': case '^': case '_': case '`': + case '{': case '|': case '}': case '~': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isspace (int c) +{ + return (c == ' ' || c == '\t' + || c == '\n' || c == '\v' || c == '\f' || c == '\r'); +} + +bool +c_isupper (int c) +{ +#if C_CTYPE_CONSECUTIVE_UPPERCASE + return (c >= 'A' && c <= 'Z'); +#else + switch (c) + { + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': + return 1; + default: + return 0; + } +#endif +} + +bool +c_isxdigit (int c) +{ +#if C_CTYPE_CONSECUTIVE_DIGITS \ + && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII + return ((c >= '0' && c <= '9') + || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F')); +#else + return ((c >= '0' && c <= '9') + || (c >= 'A' && c <= 'F') + || (c >= 'a' && c <= 'f')); +#endif +#else + switch (c) + { + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + return 1; + default: + return 0; + } +#endif +} + +int +c_tolower (int c) +{ +#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE + return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c); +#else + switch (c) + { + case 'A': return 'a'; + case 'B': return 'b'; + case 'C': return 'c'; + case 'D': return 'd'; + case 'E': return 'e'; + case 'F': return 'f'; + case 'G': return 'g'; + case 'H': return 'h'; + case 'I': return 'i'; + case 'J': return 'j'; + case 'K': return 'k'; + case 'L': return 'l'; + case 'M': return 'm'; + case 'N': return 'n'; + case 'O': return 'o'; + case 'P': return 'p'; + case 'Q': return 'q'; + case 'R': return 'r'; + case 'S': return 's'; + case 'T': return 't'; + case 'U': return 'u'; + case 'V': return 'v'; + case 'W': return 'w'; + case 'X': return 'x'; + case 'Y': return 'y'; + case 'Z': return 'z'; + default: return c; + } +#endif +} + +int +c_toupper (int c) +{ +#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE + return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c); +#else + switch (c) + { + case 'a': return 'A'; + case 'b': return 'B'; + case 'c': return 'C'; + case 'd': return 'D'; + case 'e': return 'E'; + case 'f': return 'F'; + case 'g': return 'G'; + case 'h': return 'H'; + case 'i': return 'I'; + case 'j': return 'J'; + case 'k': return 'K'; + case 'l': return 'L'; + case 'm': return 'M'; + case 'n': return 'N'; + case 'o': return 'O'; + case 'p': return 'P'; + case 'q': return 'Q'; + case 'r': return 'R'; + case 's': return 'S'; + case 't': return 'T'; + case 'u': return 'U'; + case 'v': return 'V'; + case 'w': return 'W'; + case 'x': return 'X'; + case 'y': return 'Y'; + case 'z': return 'Z'; + default: return c; + } +#endif +} diff --git a/gl/lib/c-ctype.h b/gl/lib/c-ctype.h new file mode 100644 index 0000000..b465277 --- /dev/null +++ b/gl/lib/c-ctype.h @@ -0,0 +1,295 @@ +/* Character handling in C locale. + + These functions work like the corresponding functions in , + except that they have the C (POSIX) locale hardwired, whereas the + functions' behaviour depends on the current locale set via + setlocale. + + Copyright (C) 2000-2003, 2006, 2008-2014 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, see . */ + +#ifndef C_CTYPE_H +#define C_CTYPE_H + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* The functions defined in this file assume the "C" locale and a character + set without diacritics (ASCII-US or EBCDIC-US or something like that). + Even if the "C" locale on a particular system is an extension of the ASCII + character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it + is ISO-8859-1), the functions in this file recognize only the ASCII + characters. */ + + +/* Check whether the ASCII optimizations apply. */ + +/* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that + '0', '1', ..., '9' have consecutive integer values. */ +#define C_CTYPE_CONSECUTIVE_DIGITS 1 + +#if ('A' <= 'Z') \ + && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \ + && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \ + && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \ + && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \ + && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \ + && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \ + && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \ + && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \ + && ('Y' + 1 == 'Z') +#define C_CTYPE_CONSECUTIVE_UPPERCASE 1 +#endif + +#if ('a' <= 'z') \ + && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \ + && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \ + && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \ + && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \ + && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \ + && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \ + && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \ + && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \ + && ('y' + 1 == 'z') +#define C_CTYPE_CONSECUTIVE_LOWERCASE 1 +#endif + +#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) +/* The character set is ASCII or one of its variants or extensions, not EBCDIC. + Testing the value of '\n' and '\r' is not relevant. */ +#define C_CTYPE_ASCII 1 +#endif + + +/* Function declarations. */ + +/* Unlike the functions in , which require an argument in the range + of the 'unsigned char' type, the functions here operate on values that are + in the 'unsigned char' range or in the 'char' range. In other words, + when you have a 'char' value, you need to cast it before using it as + argument to a function: + + const char *s = ...; + if (isalpha ((unsigned char) *s)) ... + + but you don't need to cast it for the functions defined in this file: + + const char *s = ...; + if (c_isalpha (*s)) ... + */ + +extern bool c_isascii (int c) _GL_ATTRIBUTE_CONST; /* not locale dependent */ + +extern bool c_isalnum (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isalpha (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isblank (int c) _GL_ATTRIBUTE_CONST; +extern bool c_iscntrl (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isdigit (int c) _GL_ATTRIBUTE_CONST; +extern bool c_islower (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isgraph (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isprint (int c) _GL_ATTRIBUTE_CONST; +extern bool c_ispunct (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isspace (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isupper (int c) _GL_ATTRIBUTE_CONST; +extern bool c_isxdigit (int c) _GL_ATTRIBUTE_CONST; + +extern int c_tolower (int c) _GL_ATTRIBUTE_CONST; +extern int c_toupper (int c) _GL_ATTRIBUTE_CONST; + + +#if (defined __GNUC__ && !defined __STRICT_ANSI__ && defined __OPTIMIZE__ \ + && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS) + +/* ASCII optimizations. */ + +#undef c_isascii +#define c_isascii(c) \ + ({ int __c = (c); \ + (__c >= 0x00 && __c <= 0x7f); \ + }) + +#if C_CTYPE_CONSECUTIVE_DIGITS \ + && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII +#undef c_isalnum +#define c_isalnum(c) \ + ({ int __c = (c); \ + ((__c >= '0' && __c <= '9') \ + || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \ + }) +#else +#undef c_isalnum +#define c_isalnum(c) \ + ({ int __c = (c); \ + ((__c >= '0' && __c <= '9') \ + || (__c >= 'A' && __c <= 'Z') \ + || (__c >= 'a' && __c <= 'z')); \ + }) +#endif +#endif + +#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII +#undef c_isalpha +#define c_isalpha(c) \ + ({ int __c = (c); \ + ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \ + }) +#else +#undef c_isalpha +#define c_isalpha(c) \ + ({ int __c = (c); \ + ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \ + }) +#endif +#endif + +#undef c_isblank +#define c_isblank(c) \ + ({ int __c = (c); \ + (__c == ' ' || __c == '\t'); \ + }) + +#if C_CTYPE_ASCII +#undef c_iscntrl +#define c_iscntrl(c) \ + ({ int __c = (c); \ + ((__c & ~0x1f) == 0 || __c == 0x7f); \ + }) +#endif + +#if C_CTYPE_CONSECUTIVE_DIGITS +#undef c_isdigit +#define c_isdigit(c) \ + ({ int __c = (c); \ + (__c >= '0' && __c <= '9'); \ + }) +#endif + +#if C_CTYPE_CONSECUTIVE_LOWERCASE +#undef c_islower +#define c_islower(c) \ + ({ int __c = (c); \ + (__c >= 'a' && __c <= 'z'); \ + }) +#endif + +#if C_CTYPE_ASCII +#undef c_isgraph +#define c_isgraph(c) \ + ({ int __c = (c); \ + (__c >= '!' && __c <= '~'); \ + }) +#endif + +#if C_CTYPE_ASCII +#undef c_isprint +#define c_isprint(c) \ + ({ int __c = (c); \ + (__c >= ' ' && __c <= '~'); \ + }) +#endif + +#if C_CTYPE_ASCII +#undef c_ispunct +#define c_ispunct(c) \ + ({ int _c = (c); \ + (c_isgraph (_c) && ! c_isalnum (_c)); \ + }) +#endif + +#undef c_isspace +#define c_isspace(c) \ + ({ int __c = (c); \ + (__c == ' ' || __c == '\t' \ + || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \ + }) + +#if C_CTYPE_CONSECUTIVE_UPPERCASE +#undef c_isupper +#define c_isupper(c) \ + ({ int __c = (c); \ + (__c >= 'A' && __c <= 'Z'); \ + }) +#endif + +#if C_CTYPE_CONSECUTIVE_DIGITS \ + && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#if C_CTYPE_ASCII +#undef c_isxdigit +#define c_isxdigit(c) \ + ({ int __c = (c); \ + ((__c >= '0' && __c <= '9') \ + || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \ + }) +#else +#undef c_isxdigit +#define c_isxdigit(c) \ + ({ int __c = (c); \ + ((__c >= '0' && __c <= '9') \ + || (__c >= 'A' && __c <= 'F') \ + || (__c >= 'a' && __c <= 'f')); \ + }) +#endif +#endif + +#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +#undef c_tolower +#define c_tolower(c) \ + ({ int __c = (c); \ + (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \ + }) +#undef c_toupper +#define c_toupper(c) \ + ({ int __c = (c); \ + (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \ + }) +#endif + +#endif /* optimizing for speed */ + + +#ifdef __cplusplus +} +#endif + +#endif /* C_CTYPE_H */ diff --git a/gl/lib/c-strcase.h b/gl/lib/c-strcase.h new file mode 100644 index 0000000..8e66044 --- /dev/null +++ b/gl/lib/c-strcase.h @@ -0,0 +1,56 @@ +/* Case-insensitive string comparison functions in C locale. + Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2014 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef C_STRCASE_H +#define C_STRCASE_H + +#include + + +/* The functions defined in this file assume the "C" locale and a character + set without diacritics (ASCII-US or EBCDIC-US or something like that). + Even if the "C" locale on a particular system is an extension of the ASCII + character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it + is ISO-8859-1), the functions in this file recognize only the ASCII + characters. More precisely, one of the string arguments must be an ASCII + string; the other one can also contain non-ASCII characters (but then + the comparison result will be nonzero). */ + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Compare strings S1 and S2, ignoring case, returning less than, equal to or + greater than zero if S1 is lexicographically less than, equal to or greater + than S2. */ +extern int c_strcasecmp (const char *s1, const char *s2) _GL_ATTRIBUTE_PURE; + +/* Compare no more than N characters of strings S1 and S2, ignoring case, + returning less than, equal to or greater than zero if S1 is + lexicographically less than, equal to or greater than S2. */ +extern int c_strncasecmp (const char *s1, const char *s2, size_t n) + _GL_ATTRIBUTE_PURE; + + +#ifdef __cplusplus +} +#endif + + +#endif /* C_STRCASE_H */ diff --git a/gl/lib/c-strcasecmp.c b/gl/lib/c-strcasecmp.c new file mode 100644 index 0000000..b9b26a4 --- /dev/null +++ b/gl/lib/c-strcasecmp.c @@ -0,0 +1,56 @@ +/* c-strcasecmp.c -- case insensitive string comparator in C locale + Copyright (C) 1998-1999, 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +/* Specification. */ +#include "c-strcase.h" + +#include + +#include "c-ctype.h" + +int +c_strcasecmp (const char *s1, const char *s2) +{ + register const unsigned char *p1 = (const unsigned char *) s1; + register const unsigned char *p2 = (const unsigned char *) s2; + unsigned char c1, c2; + + if (p1 == p2) + return 0; + + do + { + c1 = c_tolower (*p1); + c2 = c_tolower (*p2); + + if (c1 == '\0') + break; + + ++p1; + ++p2; + } + while (c1 == c2); + + if (UCHAR_MAX <= INT_MAX) + return c1 - c2; + else + /* On machines where 'char' and 'int' are types of the same size, the + difference of two 'unsigned char' values - including the sign bit - + doesn't fit in an 'int'. */ + return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); +} diff --git a/gl/lib/c-strcaseeq.h b/gl/lib/c-strcaseeq.h new file mode 100644 index 0000000..5139a30 --- /dev/null +++ b/gl/lib/c-strcaseeq.h @@ -0,0 +1,184 @@ +/* Optimized case-insensitive string comparison in C locale. + Copyright (C) 2001-2002, 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible . */ + +#include "c-strcase.h" +#include "c-ctype.h" + +/* STRCASEEQ allows to optimize string comparison with a small literal string. + STRCASEEQ (s, "UTF-8", 'U','T','F','-','8',0,0,0,0) + is semantically equivalent to + c_strcasecmp (s, "UTF-8") == 0 + just faster. */ + +/* Help GCC to generate good code for string comparisons with + immediate strings. */ +#if defined (__GNUC__) && defined (__OPTIMIZE__) + +/* Case insensitive comparison of ASCII characters. */ +# if C_CTYPE_ASCII +# define CASEEQ(other,upper) \ + (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper)) +# elif C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE +# define CASEEQ(other,upper) \ + (c_isupper (upper) ? (other) == (upper) || (other) == (upper) - 'A' + 'a' : (other) == (upper)) +# else +# define CASEEQ(other,upper) \ + (c_toupper (other) == (upper)) +# endif + +static inline int +strcaseeq9 (const char *s1, const char *s2) +{ + return c_strcasecmp (s1 + 9, s2 + 9) == 0; +} + +static inline int +strcaseeq8 (const char *s1, const char *s2, char s28) +{ + if (CASEEQ (s1[8], s28)) + { + if (s28 == 0) + return 1; + else + return strcaseeq9 (s1, s2); + } + else + return 0; +} + +static inline int +strcaseeq7 (const char *s1, const char *s2, char s27, char s28) +{ + if (CASEEQ (s1[7], s27)) + { + if (s27 == 0) + return 1; + else + return strcaseeq8 (s1, s2, s28); + } + else + return 0; +} + +static inline int +strcaseeq6 (const char *s1, const char *s2, char s26, char s27, char s28) +{ + if (CASEEQ (s1[6], s26)) + { + if (s26 == 0) + return 1; + else + return strcaseeq7 (s1, s2, s27, s28); + } + else + return 0; +} + +static inline int +strcaseeq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28) +{ + if (CASEEQ (s1[5], s25)) + { + if (s25 == 0) + return 1; + else + return strcaseeq6 (s1, s2, s26, s27, s28); + } + else + return 0; +} + +static inline int +strcaseeq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28) +{ + if (CASEEQ (s1[4], s24)) + { + if (s24 == 0) + return 1; + else + return strcaseeq5 (s1, s2, s25, s26, s27, s28); + } + else + return 0; +} + +static inline int +strcaseeq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28) +{ + if (CASEEQ (s1[3], s23)) + { + if (s23 == 0) + return 1; + else + return strcaseeq4 (s1, s2, s24, s25, s26, s27, s28); + } + else + return 0; +} + +static inline int +strcaseeq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28) +{ + if (CASEEQ (s1[2], s22)) + { + if (s22 == 0) + return 1; + else + return strcaseeq3 (s1, s2, s23, s24, s25, s26, s27, s28); + } + else + return 0; +} + +static inline int +strcaseeq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) +{ + if (CASEEQ (s1[1], s21)) + { + if (s21 == 0) + return 1; + else + return strcaseeq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28); + } + else + return 0; +} + +static inline int +strcaseeq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) +{ + if (CASEEQ (s1[0], s20)) + { + if (s20 == 0) + return 1; + else + return strcaseeq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28); + } + else + return 0; +} + +#define STRCASEEQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ + strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) + +#else + +#define STRCASEEQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ + (c_strcasecmp (s1, s2) == 0) + +#endif diff --git a/gl/lib/c-strcasestr.c b/gl/lib/c-strcasestr.c new file mode 100644 index 0000000..12e5503 --- /dev/null +++ b/gl/lib/c-strcasestr.c @@ -0,0 +1,77 @@ +/* c-strcasestr.c -- case insensitive substring search in C locale + Copyright (C) 2005-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2005. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "c-strcasestr.h" + +#include +#include + +#include "c-ctype.h" +#include "c-strcase.h" + +/* Two-Way algorithm. */ +#define RETURN_TYPE char * +#define AVAILABLE(h, h_l, j, n_l) \ + (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ + && ((h_l) = (j) + (n_l))) +#define CANON_ELEMENT c_tolower +#define CMP_FUNC(p1, p2, l) \ + c_strncasecmp ((const char *) (p1), (const char *) (p2), l) +#include "str-two-way.h" + +/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive + comparison from the C locale, regardless of the current locale. */ +char * +c_strcasestr (const char *haystack_start, const char *needle_start) +{ + const char *haystack = haystack_start; + const char *needle = needle_start; + size_t needle_len; /* Length of NEEDLE. */ + size_t haystack_len; /* Known minimum length of HAYSTACK. */ + bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ + + /* Determine length of NEEDLE, and in the process, make sure + HAYSTACK is at least as long (no point processing all of a long + NEEDLE if HAYSTACK is too short). */ + while (*haystack && *needle) + ok &= (c_tolower ((unsigned char) *haystack++) + == c_tolower ((unsigned char) *needle++)); + if (*needle) + return NULL; + if (ok) + return (char *) haystack_start; + needle_len = needle - needle_start; + haystack = haystack_start + 1; + haystack_len = needle_len - 1; + + /* Perform the search. Abstract memory is considered to be an array + of 'unsigned char' values, not an array of 'char' values. See + ISO C 99 section 6.2.6.1. */ + if (needle_len < LONG_NEEDLE_THRESHOLD) + return two_way_short_needle ((const unsigned char *) haystack, + haystack_len, + (const unsigned char *) needle_start, + needle_len); + return two_way_long_needle ((const unsigned char *) haystack, haystack_len, + (const unsigned char *) needle_start, + needle_len); +} + +#undef LONG_NEEDLE_THRESHOLD diff --git a/gl/lib/c-strcasestr.h b/gl/lib/c-strcasestr.h new file mode 100644 index 0000000..3b6ceb9 --- /dev/null +++ b/gl/lib/c-strcasestr.h @@ -0,0 +1,36 @@ +/* Case-insensitive searching in a string in C locale. + Copyright (C) 2005, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef C_STRCASESTR_H +#define C_STRCASESTR_H + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive + comparison. */ +extern char *c_strcasestr (const char *haystack, const char *needle); + + +#ifdef __cplusplus +} +#endif + + +#endif /* C_STRCASESTR_H */ diff --git a/gl/lib/c-strncasecmp.c b/gl/lib/c-strncasecmp.c new file mode 100644 index 0000000..972eb80 --- /dev/null +++ b/gl/lib/c-strncasecmp.c @@ -0,0 +1,56 @@ +/* c-strncasecmp.c -- case insensitive string comparator in C locale + Copyright (C) 1998-1999, 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +/* Specification. */ +#include "c-strcase.h" + +#include + +#include "c-ctype.h" + +int +c_strncasecmp (const char *s1, const char *s2, size_t n) +{ + register const unsigned char *p1 = (const unsigned char *) s1; + register const unsigned char *p2 = (const unsigned char *) s2; + unsigned char c1, c2; + + if (p1 == p2 || n == 0) + return 0; + + do + { + c1 = c_tolower (*p1); + c2 = c_tolower (*p2); + + if (--n == 0 || c1 == '\0') + break; + + ++p1; + ++p2; + } + while (c1 == c2); + + if (UCHAR_MAX <= INT_MAX) + return c1 - c2; + else + /* On machines where 'char' and 'int' are types of the same size, the + difference of two 'unsigned char' values - including the sign bit - + doesn't fit in an 'int'. */ + return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); +} diff --git a/gl/lib/c-strstr.c b/gl/lib/c-strstr.c new file mode 100644 index 0000000..c13cde2 --- /dev/null +++ b/gl/lib/c-strstr.c @@ -0,0 +1,32 @@ +/* c-strstr.c -- substring search in C locale + Copyright (C) 2005-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2005, 2007. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "c-strstr.h" + +#include + +/* Find the first occurrence of NEEDLE in HAYSTACK. */ +char * +c_strstr (const char *haystack, const char *needle) +{ + /* POSIX says that strstr() interprets the strings as byte sequences, not + as character sequences in the current locale. */ + return strstr (haystack, needle); +} diff --git a/gl/lib/c-strstr.h b/gl/lib/c-strstr.h new file mode 100644 index 0000000..bc7378b --- /dev/null +++ b/gl/lib/c-strstr.h @@ -0,0 +1,44 @@ +/* Searching in a string. + Copyright (C) 2001-2003, 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + +/* The functions defined in this file assume a nearly ASCII compatible + character set. */ + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Find the first occurrence of NEEDLE in HAYSTACK. + This function is safe to be called, even in a multibyte locale, if NEEDLE + 1. consists solely of printable ASCII characters excluding '\\' and '~' + [this restriction is needed because of Shift_JIS and JOHAB] + or of the control ASCII characters '\a' '\b' '\f' '\n' '\r' '\t' '\v' + [this restriction is needed because of VISCII], and + 2. has at least length 2 + [this restriction is needed because of BIG5, BIG5-HKSCS, GBK, GB18030, + Shift_JIS, JOHAB], and + 3. does not consist entirely of decimal digits, or has at least length 4 + [this restriction is needed because of GB18030]. + This function is also safe to be called, even in a multibyte locale, if + HAYSTACK and NEEDLE are known to both consist solely of printable ASCII + characters excluding '\\' and '~'. */ +extern char *c_strstr (const char *haystack, const char *needle); + +#ifdef __cplusplus +} +#endif diff --git a/gl/lib/canonicalize.c b/gl/lib/canonicalize.c new file mode 100644 index 0000000..2b94ebc --- /dev/null +++ b/gl/lib/canonicalize.c @@ -0,0 +1,354 @@ +/* Return the canonical absolute name of a given file. + Copyright (C) 1996-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "canonicalize.h" + +#include +#include +#include +#include +#include + +#include "areadlink.h" +#include "file-set.h" +#include "hash-triple.h" +#include "pathmax.h" +#include "xalloc.h" +#include "xgetcwd.h" +#include "dosname.h" + +#define MULTIPLE_BITS_SET(i) (((i) & ((i) - 1)) != 0) + +/* In this file, we cannot handle file names longer than PATH_MAX. + On systems with no file name length limit, use a fallback. */ +#ifndef PATH_MAX +# define PATH_MAX 8192 +#endif + +#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT +# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 +#endif + +#if ISSLASH ('\\') +# define SLASHES "/\\" +#else +# define SLASHES "/" +#endif + +#if !((HAVE_CANONICALIZE_FILE_NAME && FUNC_REALPATH_WORKS) \ + || GNULIB_CANONICALIZE_LGPL) +/* Return the canonical absolute name of file NAME. A canonical name + does not contain any ".", ".." components nor any repeated file name + separators ('/') or symlinks. All components must exist. + The result is malloc'd. */ + +char * +canonicalize_file_name (const char *name) +{ + return canonicalize_filename_mode (name, CAN_EXISTING); +} +#endif /* !HAVE_CANONICALIZE_FILE_NAME */ + +/* Return true if we've already seen the triple, . + If *HT is not initialized, initialize it. */ +static bool +seen_triple (Hash_table **ht, char const *filename, struct stat const *st) +{ + if (*ht == NULL) + { + size_t initial_capacity = 7; + *ht = hash_initialize (initial_capacity, + NULL, + triple_hash, + triple_compare_ino_str, + triple_free); + if (*ht == NULL) + xalloc_die (); + } + + if (seen_file (*ht, filename, st)) + return true; + + record_file (*ht, filename, st); + return false; +} + +/* Return the canonical absolute name of file NAME, while treating + missing elements according to CAN_MODE. A canonical name + does not contain any ".", ".." components nor any repeated file name + separators ('/') or, depending on other CAN_MODE flags, symlinks. + Whether components must exist or not depends on canonicalize mode. + The result is malloc'd. */ + +char * +canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode) +{ + char *rname, *dest, *extra_buf = NULL; + char const *start; + char const *end; + char const *rname_limit; + size_t extra_len = 0; + Hash_table *ht = NULL; + int saved_errno; + int can_flags = can_mode & ~CAN_MODE_MASK; + bool logical = can_flags & CAN_NOLINKS; + size_t prefix_len; + + can_mode &= CAN_MODE_MASK; + + if (MULTIPLE_BITS_SET (can_mode)) + { + errno = EINVAL; + return NULL; + } + + if (name == NULL) + { + errno = EINVAL; + return NULL; + } + + if (name[0] == '\0') + { + errno = ENOENT; + return NULL; + } + + /* This is always zero for Posix hosts, but can be 2 for MS-Windows + and MS-DOS X:/foo/bar file names. */ + prefix_len = FILE_SYSTEM_PREFIX_LEN (name); + + if (!IS_ABSOLUTE_FILE_NAME (name)) + { + rname = xgetcwd (); + if (!rname) + return NULL; + dest = strchr (rname, '\0'); + if (dest - rname < PATH_MAX) + { + char *p = xrealloc (rname, PATH_MAX); + dest = p + (dest - rname); + rname = p; + rname_limit = rname + PATH_MAX; + } + else + { + rname_limit = dest; + } + start = name; + prefix_len = FILE_SYSTEM_PREFIX_LEN (rname); + } + else + { + rname = xmalloc (PATH_MAX); + rname_limit = rname + PATH_MAX; + dest = rname; + if (prefix_len) + { + memcpy (rname, name, prefix_len); + dest += prefix_len; + } + *dest++ = '/'; + if (DOUBLE_SLASH_IS_DISTINCT_ROOT) + { + if (ISSLASH (name[1]) && !ISSLASH (name[2]) && !prefix_len) + *dest++ = '/'; + *dest = '\0'; + } + start = name + prefix_len; + } + + for ( ; *start; start = end) + { + /* Skip sequence of multiple file name separators. */ + while (ISSLASH (*start)) + ++start; + + /* Find end of component. */ + for (end = start; *end && !ISSLASH (*end); ++end) + /* Nothing. */; + + if (end - start == 0) + break; + else if (end - start == 1 && start[0] == '.') + /* nothing */; + else if (end - start == 2 && start[0] == '.' && start[1] == '.') + { + /* Back up to previous component, ignore if at root already. */ + if (dest > rname + prefix_len + 1) + for (--dest; dest > rname && !ISSLASH (dest[-1]); --dest) + continue; + if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 + && !prefix_len && ISSLASH (*dest) && !ISSLASH (dest[1])) + dest++; + } + else + { + struct stat st; + + if (!ISSLASH (dest[-1])) + *dest++ = '/'; + + if (dest + (end - start) >= rname_limit) + { + ptrdiff_t dest_offset = dest - rname; + size_t new_size = rname_limit - rname; + + if (end - start + 1 > PATH_MAX) + new_size += end - start + 1; + else + new_size += PATH_MAX; + rname = xrealloc (rname, new_size); + rname_limit = rname + new_size; + + dest = rname + dest_offset; + } + + dest = memcpy (dest, start, end - start); + dest += end - start; + *dest = '\0'; + + if (logical && (can_mode == CAN_MISSING)) + { + /* Avoid the stat in this case as it's inconsequential. + i.e. we're neither resolving symlinks or testing + component existence. */ + st.st_mode = 0; + } + else if ((logical ? stat (rname, &st) : lstat (rname, &st)) != 0) + { + saved_errno = errno; + if (can_mode == CAN_EXISTING) + goto error; + if (can_mode == CAN_ALL_BUT_LAST) + { + if (end[strspn (end, SLASHES)] || saved_errno != ENOENT) + goto error; + continue; + } + st.st_mode = 0; + } + + if (S_ISLNK (st.st_mode)) + { + char *buf; + size_t n, len; + + /* Detect loops. We cannot use the cycle-check module here, + since it's actually possible to encounter the same symlink + more than once in a given traversal. However, encountering + the same symlink,NAME pair twice does indicate a loop. */ + if (seen_triple (&ht, name, &st)) + { + if (can_mode == CAN_MISSING) + continue; + saved_errno = ELOOP; + goto error; + } + + buf = areadlink_with_size (rname, st.st_size); + if (!buf) + { + if (can_mode == CAN_MISSING && errno != ENOMEM) + continue; + saved_errno = errno; + goto error; + } + + n = strlen (buf); + len = strlen (end); + + if (!extra_len) + { + extra_len = + ((n + len + 1) > PATH_MAX) ? (n + len + 1) : PATH_MAX; + extra_buf = xmalloc (extra_len); + } + else if ((n + len + 1) > extra_len) + { + extra_len = n + len + 1; + extra_buf = xrealloc (extra_buf, extra_len); + } + + /* Careful here, end may be a pointer into extra_buf... */ + memmove (&extra_buf[n], end, len + 1); + name = end = memcpy (extra_buf, buf, n); + + if (IS_ABSOLUTE_FILE_NAME (buf)) + { + size_t pfxlen = FILE_SYSTEM_PREFIX_LEN (buf); + + if (pfxlen) + memcpy (rname, buf, pfxlen); + dest = rname + pfxlen; + *dest++ = '/'; /* It's an absolute symlink */ + if (DOUBLE_SLASH_IS_DISTINCT_ROOT) + { + if (ISSLASH (buf[1]) && !ISSLASH (buf[2]) && !pfxlen) + *dest++ = '/'; + *dest = '\0'; + } + /* Install the new prefix to be in effect hereafter. */ + prefix_len = pfxlen; + } + else + { + /* Back up to previous component, ignore if at root + already: */ + if (dest > rname + prefix_len + 1) + for (--dest; dest > rname && !ISSLASH (dest[-1]); --dest) + continue; + if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 + && ISSLASH (*dest) && !ISSLASH (dest[1]) && !prefix_len) + dest++; + } + + free (buf); + } + else + { + if (!S_ISDIR (st.st_mode) && *end && (can_mode != CAN_MISSING)) + { + saved_errno = ENOTDIR; + goto error; + } + } + } + } + if (dest > rname + prefix_len + 1 && ISSLASH (dest[-1])) + --dest; + if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 && !prefix_len + && ISSLASH (*dest) && !ISSLASH (dest[1])) + dest++; + *dest = '\0'; + if (rname_limit != dest + 1) + rname = xrealloc (rname, dest - rname + 1); + + free (extra_buf); + if (ht) + hash_free (ht); + return rname; + +error: + free (extra_buf); + free (rname); + if (ht) + hash_free (ht); + errno = saved_errno; + return NULL; +} diff --git a/gl/lib/canonicalize.h b/gl/lib/canonicalize.h new file mode 100644 index 0000000..5fac119 --- /dev/null +++ b/gl/lib/canonicalize.h @@ -0,0 +1,48 @@ +/* Return the canonical absolute name of a given file. + Copyright (C) 1996-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef CANONICALIZE_H_ +# define CANONICALIZE_H_ + +#include /* for canonicalize_file_name */ + +#define CAN_MODE_MASK (CAN_EXISTING | CAN_ALL_BUT_LAST | CAN_MISSING) + +enum canonicalize_mode_t + { + /* All components must exist. */ + CAN_EXISTING = 0, + + /* All components excluding last one must exist. */ + CAN_ALL_BUT_LAST = 1, + + /* No requirements on components existence. */ + CAN_MISSING = 2, + + /* Don't expand symlinks. */ + CAN_NOLINKS = 4 + }; +typedef enum canonicalize_mode_t canonicalize_mode_t; + +/* Return the canonical absolute name of file NAME, while treating + missing elements according to CAN_MODE. A canonical name + does not contain any `.', `..' components nor any repeated file name + separators ('/') or, depending on other CAN_MODE flags, symlinks. + Whether components must exist or not depends on canonicalize mode. + The result is malloc'd. */ +char *canonicalize_filename_mode (const char *, canonicalize_mode_t); + +#endif /* !CANONICALIZE_H_ */ diff --git a/gl/lib/careadlinkat.c b/gl/lib/careadlinkat.c new file mode 100644 index 0000000..b36fea2 --- /dev/null +++ b/gl/lib/careadlinkat.c @@ -0,0 +1,160 @@ +/* Read symbolic links into a buffer without size limitation, relative to fd. + + Copyright (C) 2001, 2003-2004, 2007, 2009-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#include + +#include "careadlinkat.h" + +#include +#include +#include +#include + +/* Define this independently so that stdint.h is not a prerequisite. */ +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + +#ifndef SSIZE_MAX +# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) +#endif + +#include "allocator.h" + +/* Assuming the current directory is FD, get the symbolic link value + of FILENAME as a null-terminated string and put it into a buffer. + If FD is AT_FDCWD, FILENAME is interpreted relative to the current + working directory, as in openat. + + If the link is small enough to fit into BUFFER put it there. + BUFFER's size is BUFFER_SIZE, and BUFFER can be null + if BUFFER_SIZE is zero. + + If the link is not small, put it into a dynamically allocated + buffer managed by ALLOC. It is the caller's responsibility to free + the returned value if it is nonnull and is not BUFFER. A null + ALLOC stands for the standard allocator. + + The PREADLINKAT function specifies how to read links. It operates + like POSIX readlinkat() + + but can assume that its first argument is the same as FD. + + If successful, return the buffer address; otherwise return NULL and + set errno. */ + +char * +careadlinkat (int fd, char const *filename, + char *buffer, size_t buffer_size, + struct allocator const *alloc, + ssize_t (*preadlinkat) (int, char const *, char *, size_t)) +{ + char *buf; + size_t buf_size; + size_t buf_size_max = + SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; + char stack_buf[1024]; + + if (! alloc) + alloc = &stdlib_allocator; + + if (! buffer_size) + { + /* Allocate the initial buffer on the stack. This way, in the + common case of a symlink of small size, we get away with a + single small malloc() instead of a big malloc() followed by a + shrinking realloc(). */ + buffer = stack_buf; + buffer_size = sizeof stack_buf; + } + + buf = buffer; + buf_size = buffer_size; + + do + { + /* Attempt to read the link into the current buffer. */ + ssize_t link_length = preadlinkat (fd, filename, buf, buf_size); + size_t link_size; + if (link_length < 0) + { + /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1 + with errno == ERANGE if the buffer is too small. */ + int readlinkat_errno = errno; + if (readlinkat_errno != ERANGE) + { + if (buf != buffer) + { + alloc->free (buf); + errno = readlinkat_errno; + } + return NULL; + } + } + + link_size = link_length; + + if (link_size < buf_size) + { + buf[link_size++] = '\0'; + + if (buf == stack_buf) + { + char *b = (char *) alloc->allocate (link_size); + buf_size = link_size; + if (! b) + break; + memcpy (b, buf, link_size); + buf = b; + } + else if (link_size < buf_size && buf != buffer && alloc->reallocate) + { + /* Shrink BUF before returning it. */ + char *b = (char *) alloc->reallocate (buf, link_size); + if (b) + buf = b; + } + + return buf; + } + + if (buf != buffer) + alloc->free (buf); + + if (buf_size <= buf_size_max / 2) + buf_size *= 2; + else if (buf_size < buf_size_max) + buf_size = buf_size_max; + else if (buf_size_max < SIZE_MAX) + { + errno = ENAMETOOLONG; + return NULL; + } + else + break; + buf = (char *) alloc->allocate (buf_size); + } + while (buf); + + if (alloc->die) + alloc->die (buf_size); + errno = ENOMEM; + return NULL; +} diff --git a/gl/lib/careadlinkat.h b/gl/lib/careadlinkat.h new file mode 100644 index 0000000..704f815 --- /dev/null +++ b/gl/lib/careadlinkat.h @@ -0,0 +1,67 @@ +/* Read symbolic links into a buffer without size limitation, relative to fd. + + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#ifndef _GL_CAREADLINKAT_H +#define _GL_CAREADLINKAT_H + +#include +#include + +struct allocator; + +/* Assuming the current directory is FD, get the symbolic link value + of FILENAME as a null-terminated string and put it into a buffer. + If FD is AT_FDCWD, FILENAME is interpreted relative to the current + working directory, as in openat. + + If the link is small enough to fit into BUFFER put it there. + BUFFER's size is BUFFER_SIZE, and BUFFER can be null + if BUFFER_SIZE is zero. + + If the link is not small, put it into a dynamically allocated + buffer managed by ALLOC. It is the caller's responsibility to free + the returned value if it is nonnull and is not BUFFER. + + The PREADLINKAT function specifies how to read links. It operates + like POSIX readlinkat() + + but can assume that its first argument is the same as FD. + + If successful, return the buffer address; otherwise return NULL and + set errno. */ + +char *careadlinkat (int fd, char const *filename, + char *buffer, size_t buffer_size, + struct allocator const *alloc, + ssize_t (*preadlinkat) (int, char const *, + char *, size_t)); + +/* Suitable value for careadlinkat's FD argument. */ +#if HAVE_READLINKAT +/* AT_FDCWD is declared in . */ +#else +/* Define AT_FDCWD independently, so that the careadlinkat module does + not depend on the fcntl-h module. We might as well use the same value + as fcntl-h. */ +# ifndef AT_FDCWD +# define AT_FDCWD (-3041965) +# endif +#endif + +#endif /* _GL_CAREADLINKAT_H */ diff --git a/gl/lib/chdir-long.c b/gl/lib/chdir-long.c new file mode 100644 index 0000000..5b1b18f --- /dev/null +++ b/gl/lib/chdir-long.c @@ -0,0 +1,266 @@ +/* provide a chdir function that tries not to fail due to ENAMETOOLONG + Copyright (C) 2004-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#include + +#include "chdir-long.h" + +#include +#include +#include +#include +#include +#include +#include + +#ifndef PATH_MAX +# error "compile this file only if your system defines PATH_MAX" +#endif + +/* The results of openat() in this file are not leaked to any + single-threaded code that could use stdio. + FIXME - if the kernel ever adds support for multi-thread safety for + avoiding standard fds, then we should use openat_safer. */ + +struct cd_buf +{ + int fd; +}; + +static void +cdb_init (struct cd_buf *cdb) +{ + cdb->fd = AT_FDCWD; +} + +static int +cdb_fchdir (struct cd_buf const *cdb) +{ + return fchdir (cdb->fd); +} + +static void +cdb_free (struct cd_buf const *cdb) +{ + if (0 <= cdb->fd) + { + bool close_fail = close (cdb->fd); + assert (! close_fail); + } +} + +/* Given a file descriptor of an open directory (or AT_FDCWD), CDB->fd, + try to open the CDB->fd-relative directory, DIR. If the open succeeds, + update CDB->fd with the resulting descriptor, close the incoming file + descriptor, and return zero. Upon failure, return -1 and set errno. */ +static int +cdb_advance_fd (struct cd_buf *cdb, char const *dir) +{ + int new_fd = openat (cdb->fd, dir, + O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK); + if (new_fd < 0) + return -1; + + cdb_free (cdb); + cdb->fd = new_fd; + + return 0; +} + +/* Return a pointer to the first non-slash in S. */ +static char * _GL_ATTRIBUTE_PURE +find_non_slash (char const *s) +{ + size_t n_slash = strspn (s, "/"); + return (char *) s + n_slash; +} + +/* This is a function much like chdir, but without the PATH_MAX limitation + on the length of the directory name. A significant difference is that + it must be able to modify (albeit only temporarily) the directory + name. It handles an arbitrarily long directory name by operating + on manageable portions of the name. On systems without the openat + syscall, this means changing the working directory to more and more + "distant" points along the long directory name and then restoring + the working directory. If any of those attempts to save or restore + the working directory fails, this function exits nonzero. + + Note that this function may still fail with errno == ENAMETOOLONG, but + only if the specified directory name contains a component that is long + enough to provoke such a failure all by itself (e.g. if the component + has length PATH_MAX or greater on systems that define PATH_MAX). */ + +int +chdir_long (char *dir) +{ + int e = chdir (dir); + if (e == 0 || errno != ENAMETOOLONG) + return e; + + { + size_t len = strlen (dir); + char *dir_end = dir + len; + struct cd_buf cdb; + size_t n_leading_slash; + + cdb_init (&cdb); + + /* If DIR is the empty string, then the chdir above + must have failed and set errno to ENOENT. */ + assert (0 < len); + assert (PATH_MAX <= len); + + /* Count leading slashes. */ + n_leading_slash = strspn (dir, "/"); + + /* Handle any leading slashes as well as any name that matches + the regular expression, m!^//hostname[/]*! . Handling this + prefix separately usually results in a single additional + cdb_advance_fd call, but it's worthwhile, since it makes the + code in the following loop cleaner. */ + if (n_leading_slash == 2) + { + int err; + /* Find next slash. + We already know that dir[2] is neither a slash nor '\0'. */ + char *slash = memchr (dir + 3, '/', dir_end - (dir + 3)); + if (slash == NULL) + { + errno = ENAMETOOLONG; + return -1; + } + *slash = '\0'; + err = cdb_advance_fd (&cdb, dir); + *slash = '/'; + if (err != 0) + goto Fail; + dir = find_non_slash (slash + 1); + } + else if (n_leading_slash) + { + if (cdb_advance_fd (&cdb, "/") != 0) + goto Fail; + dir += n_leading_slash; + } + + assert (*dir != '/'); + assert (dir <= dir_end); + + while (PATH_MAX <= dir_end - dir) + { + int err; + /* Find a slash that is PATH_MAX or fewer bytes away from dir. + I.e. see if there is a slash that will give us a name of + length PATH_MAX-1 or less. */ + char *slash = memrchr (dir, '/', PATH_MAX); + if (slash == NULL) + { + errno = ENAMETOOLONG; + return -1; + } + + *slash = '\0'; + assert (slash - dir < PATH_MAX); + err = cdb_advance_fd (&cdb, dir); + *slash = '/'; + if (err != 0) + goto Fail; + + dir = find_non_slash (slash + 1); + } + + if (dir < dir_end) + { + if (cdb_advance_fd (&cdb, dir) != 0) + goto Fail; + } + + if (cdb_fchdir (&cdb) != 0) + goto Fail; + + cdb_free (&cdb); + return 0; + + Fail: + { + int saved_errno = errno; + cdb_free (&cdb); + errno = saved_errno; + return -1; + } + } +} + +#if TEST_CHDIR + +# include "closeout.h" +# include "error.h" + +char *program_name; + +int +main (int argc, char *argv[]) +{ + char *line = NULL; + size_t n = 0; + int len; + + program_name = argv[0]; + atexit (close_stdout); + + len = getline (&line, &n, stdin); + if (len < 0) + { + int saved_errno = errno; + if (feof (stdin)) + exit (0); + + error (EXIT_FAILURE, saved_errno, + "reading standard input"); + } + else if (len == 0) + exit (0); + + if (line[len-1] == '\n') + line[len-1] = '\0'; + + if (chdir_long (line) != 0) + error (EXIT_FAILURE, errno, + "chdir_long failed: %s", line); + + if (argc <= 1) + { + /* Using 'pwd' here makes sense only if it is a robust implementation, + like the one in coreutils after the 2004-04-19 changes. */ + char const *cmd = "pwd"; + execlp (cmd, (char *) NULL); + error (EXIT_FAILURE, errno, "%s", cmd); + } + + fclose (stdin); + fclose (stderr); + + exit (EXIT_SUCCESS); +} +#endif + +/* +Local Variables: +compile-command: "gcc -DTEST_CHDIR=1 -g -O -W -Wall chdir-long.c libcoreutils.a" +End: +*/ diff --git a/gl/lib/chdir-long.h b/gl/lib/chdir-long.h new file mode 100644 index 0000000..4b5b940 --- /dev/null +++ b/gl/lib/chdir-long.h @@ -0,0 +1,30 @@ +/* provide a chdir function that tries not to fail due to ENAMETOOLONG + Copyright (C) 2004-2005, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include +#include + +#include "pathmax.h" + +/* On systems without PATH_MAX, presume that chdir accepts + arbitrarily long directory names. */ +#ifndef PATH_MAX +# define chdir_long(Dir) chdir (Dir) +#else +int chdir_long (char *dir); +#endif diff --git a/gl/lib/cloexec.c b/gl/lib/cloexec.c new file mode 100644 index 0000000..48a0c97 --- /dev/null +++ b/gl/lib/cloexec.c @@ -0,0 +1,83 @@ +/* closexec.c - set or clear the close-on-exec descriptor flag + + Copyright (C) 1991, 2004-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + The code is taken from glibc/manual/llio.texi */ + +#include + +#include "cloexec.h" + +#include +#include +#include + +/* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true, + or clear the flag if VALUE is false. + Return 0 on success, or -1 on error with 'errno' set. + + Note that on MingW, this function does NOT protect DESC from being + inherited into spawned children. Instead, either use dup_cloexec + followed by closing the original DESC, or use interfaces such as + open or pipe2 that accept flags like O_CLOEXEC to create DESC + non-inheritable in the first place. */ + +int +set_cloexec_flag (int desc, bool value) +{ +#ifdef F_SETFD + + int flags = fcntl (desc, F_GETFD, 0); + + if (0 <= flags) + { + int newflags = (value ? flags | FD_CLOEXEC : flags & ~FD_CLOEXEC); + + if (flags == newflags + || fcntl (desc, F_SETFD, newflags) != -1) + return 0; + } + + return -1; + +#else /* !F_SETFD */ + + /* Use dup2 to reject invalid file descriptors; the cloexec flag + will be unaffected. */ + if (desc < 0) + { + errno = EBADF; + return -1; + } + if (dup2 (desc, desc) < 0) + /* errno is EBADF here. */ + return -1; + + /* There is nothing we can do on this kind of platform. Punt. */ + return 0; +#endif /* !F_SETFD */ +} + + +/* Duplicates a file handle FD, while marking the copy to be closed + prior to exec or spawn. Returns -1 and sets errno if FD could not + be duplicated. */ + +int +dup_cloexec (int fd) +{ + return fcntl (fd, F_DUPFD_CLOEXEC, 0); +} diff --git a/gl/lib/cloexec.h b/gl/lib/cloexec.h new file mode 100644 index 0000000..6c442dc --- /dev/null +++ b/gl/lib/cloexec.h @@ -0,0 +1,38 @@ +/* closexec.c - set or clear the close-on-exec descriptor flag + + Copyright (C) 2004, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +*/ + +#include + +/* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true, + or clear the flag if VALUE is false. + Return 0 on success, or -1 on error with 'errno' set. + + Note that on MingW, this function does NOT protect DESC from being + inherited into spawned children. Instead, either use dup_cloexec + followed by closing the original DESC, or use interfaces such as + open or pipe2 that accept flags like O_CLOEXEC to create DESC + non-inheritable in the first place. */ + +int set_cloexec_flag (int desc, bool value); + +/* Duplicates a file handle FD, while marking the copy to be closed + prior to exec or spawn. Returns -1 and sets errno if FD could not + be duplicated. */ + +int dup_cloexec (int fd); diff --git a/gl/lib/close-stream.c b/gl/lib/close-stream.c new file mode 100644 index 0000000..87921d4 --- /dev/null +++ b/gl/lib/close-stream.c @@ -0,0 +1,78 @@ +/* Close a stream, with nicer error checking than fclose's. + + Copyright (C) 1998-2002, 2004, 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "close-stream.h" + +#include +#include + +#include "fpending.h" + +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif + +/* Close STREAM. Return 0 if successful, EOF (setting errno) + otherwise. A failure might set errno to 0 if the error number + cannot be determined. + + A failure with errno set to EPIPE may or may not indicate an error + situation worth signaling to the user. See the documentation of the + close_stdout_set_ignore_EPIPE function for details. + + If a program writes *anything* to STREAM, that program should close + STREAM and make sure that it succeeds before exiting. Otherwise, + suppose that you go to the extreme of checking the return status + of every function that does an explicit write to STREAM. The last + printf can succeed in writing to the internal stream buffer, and yet + the fclose(STREAM) could still fail (due e.g., to a disk full error) + when it tries to write out that buffered data. Thus, you would be + left with an incomplete output file and the offending program would + exit successfully. Even calling fflush is not always sufficient, + since some file systems (NFS and CODA) buffer written/flushed data + until an actual close call. + + Besides, it's wasteful to check the return value from every call + that writes to STREAM -- just let the internal stream state record + the failure. That's what the ferror test is checking below. */ + +int +close_stream (FILE *stream) +{ + const bool some_pending = (__fpending (stream) != 0); + const bool prev_fail = (ferror (stream) != 0); + const bool fclose_fail = (fclose (stream) != 0); + + /* Return an error indication if there was a previous failure or if + fclose failed, with one exception: ignore an fclose failure if + there was no previous error, no data remains to be flushed, and + fclose failed with EBADF. That can happen when a program like cp + is invoked like this 'cp a b >&-' (i.e., with standard output + closed) and doesn't generate any output (hence no previous error + and nothing to be flushed). */ + + if (prev_fail || (fclose_fail && (some_pending || errno != EBADF))) + { + if (! fclose_fail) + errno = 0; + return EOF; + } + + return 0; +} diff --git a/gnulib/lib/close-stream.h b/gl/lib/close-stream.h similarity index 100% rename from gnulib/lib/close-stream.h rename to gl/lib/close-stream.h diff --git a/gl/lib/close.c b/gl/lib/close.c new file mode 100644 index 0000000..d7dcb3f --- /dev/null +++ b/gl/lib/close.c @@ -0,0 +1,69 @@ +/* close replacement. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include + +#include "fd-hook.h" +#include "msvc-inval.h" + +#undef close + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static int +close_nothrow (int fd) +{ + int result; + + TRY_MSVC_INVAL + { + result = close (fd); + } + CATCH_MSVC_INVAL + { + result = -1; + errno = EBADF; + } + DONE_MSVC_INVAL; + + return result; +} +#else +# define close_nothrow close +#endif + +/* Override close() to call into other gnulib modules. */ + +int +rpl_close (int fd) +{ +#if WINDOWS_SOCKETS + int retval = execute_all_close_hooks (close_nothrow, fd); +#else + int retval = close_nothrow (fd); +#endif + +#if REPLACE_FCHDIR + if (retval >= 0) + _gl_unregister_fd (fd); +#endif + + return retval; +} diff --git a/gl/lib/closedir.c b/gl/lib/closedir.c new file mode 100644 index 0000000..940c6f9 --- /dev/null +++ b/gl/lib/closedir.c @@ -0,0 +1,67 @@ +/* Stop reading the entries of a directory. + Copyright (C) 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#if REPLACE_FCHDIR +# include +#endif + +#if HAVE_CLOSEDIR + +/* Override closedir(), to keep track of the open file descriptors. + Needed because there is a function dirfd(). */ + +#else + +# include + +# include "dirent-private.h" + +#endif + +int +closedir (DIR *dirp) +{ +# if REPLACE_FCHDIR + int fd = dirfd (dirp); +# endif + int retval; + +#if HAVE_CLOSEDIR +# undef closedir + + retval = closedir (dirp); + +#else + + if (dirp->current != INVALID_HANDLE_VALUE) + FindClose (dirp->current); + free (dirp); + + retval = 0; + +#endif + +#if REPLACE_FCHDIR + if (retval >= 0) + _gl_unregister_fd (fd); +#endif + return retval; +} diff --git a/gl/lib/closein.c b/gl/lib/closein.c new file mode 100644 index 0000000..5b2c915 --- /dev/null +++ b/gl/lib/closein.c @@ -0,0 +1,112 @@ +/* Close standard input, rewinding seekable stdin if necessary. + + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "closein.h" + +#include +#include +#include +#include + +#include "gettext.h" +#define _(msgid) gettext (msgid) + +#include "close-stream.h" +#include "closeout.h" +#include "error.h" +#include "exitfail.h" +#include "freadahead.h" +#include "quotearg.h" + +static const char *file_name; + +/* Set the file name to be reported in the event an error is detected + on stdin by close_stdin. See also close_stdout_set_file_name, if + an error is detected when closing stdout. */ +void +close_stdin_set_file_name (const char *file) +{ + file_name = file; +} + +/* Close standard input, rewinding any unused input if stdin is + seekable. On error, issue a diagnostic and _exit with status + 'exit_failure'. Then call close_stdout. + + Most programs can get by with close_stdout. close_stdin is only + needed when a program wants to guarantee that partially read input + from seekable stdin is not consumed, for any subsequent clients. + For example, POSIX requires that these two commands behave alike: + + (sed -ne 1q; cat) < file + tail -n +2 file + + Since close_stdin is commonly registered via 'atexit', POSIX + and the C standard both say that it should not call 'exit', + because the behavior is undefined if 'exit' is called more than + once. So it calls '_exit' instead of 'exit'. If close_stdin + is registered via atexit before other functions are registered, + the other functions can act before this _exit is invoked. + + Applications that use close_stdout should flush any streams other + than stdin, stdout, and stderr before exiting, since the call to + _exit will bypass other buffer flushing. Applications should be + flushing and closing other streams anyway, to check for I/O errors. + Also, applications should not use tmpfile, since _exit can bypass + the removal of these files. + + It's important to detect such failures and exit nonzero because many + tools (most notably 'make' and other build-management systems) depend + on being able to detect failure in other tools via their exit status. */ + +void +close_stdin (void) +{ + bool fail = false; + + /* There is no need to flush stdin if we can determine quickly that stdin's + input buffer is empty; in this case we know that if stdin is seekable, + (fseeko (stdin, 0, SEEK_CUR), ftello (stdin)) + == lseek (0, 0, SEEK_CUR). */ + if (freadahead (stdin) > 0) + { + /* Only attempt flush if stdin is seekable, as fflush is entitled to + fail on non-seekable streams. */ + if (fseeko (stdin, 0, SEEK_CUR) == 0 && fflush (stdin) != 0) + fail = true; + } + if (close_stream (stdin) != 0) + fail = true; + if (fail) + { + /* Report failure, but defer exit until after closing stdout, + since the failure report should still be flushed. */ + char const *close_error = _("error closing file"); + if (file_name) + error (0, errno, "%s: %s", quotearg_colon (file_name), + close_error); + else + error (0, errno, "%s", close_error); + } + + close_stdout (); + + if (fail) + _exit (exit_failure); +} diff --git a/gl/lib/closein.h b/gl/lib/closein.h new file mode 100644 index 0000000..1c01156 --- /dev/null +++ b/gl/lib/closein.h @@ -0,0 +1,32 @@ +/* Close standard input, rewinding seekable stdin if necessary. + + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _GL_CLOSEIN_H +# define _GL_CLOSEIN_H 1 + +# ifdef __cplusplus +extern "C" { +# endif + +void close_stdin_set_file_name (const char *file); +void close_stdin (void); + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/gl/lib/closeout.c b/gl/lib/closeout.c new file mode 100644 index 0000000..674db78 --- /dev/null +++ b/gl/lib/closeout.c @@ -0,0 +1,124 @@ +/* Close standard output and standard error, exiting with a diagnostic on error. + + Copyright (C) 1998-2002, 2004, 2006, 2008-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "closeout.h" + +#include +#include +#include +#include + +#include "gettext.h" +#define _(msgid) gettext (msgid) + +#include "close-stream.h" +#include "error.h" +#include "exitfail.h" +#include "quotearg.h" + +static const char *file_name; + +/* Set the file name to be reported in the event an error is detected + by close_stdout. */ +void +close_stdout_set_file_name (const char *file) +{ + file_name = file; +} + +static bool ignore_EPIPE /* = false */; + +/* Specify the reaction to an EPIPE error during the closing of stdout: + - If ignore = true, it shall be ignored. + - If ignore = false, it shall evoke a diagnostic, along with a nonzero + exit status. + The default is ignore = false. + + This setting matters only if the SIGPIPE signal is ignored (i.e. its + handler set to SIG_IGN) or blocked. Only particular programs need to + temporarily ignore SIGPIPE. If SIGPIPE is ignored or blocked because + it was ignored or blocked in the parent process when it created the + child process, it usually is a bug in the parent process: It is bad + practice to have SIGPIPE ignored or blocked while creating a child + process. + + EPIPE occurs when writing to a pipe or socket that has no readers now, + when SIGPIPE is ignored or blocked. + + The ignore = false setting is suitable for a scenario where it is normally + guaranteed that the pipe writer terminates before the pipe reader. In + this case, an EPIPE is an indication of a premature termination of the + pipe reader and should lead to a diagnostic and a nonzero exit status. + + The ignore = true setting is suitable for a scenario where you don't know + ahead of time whether the pipe writer or the pipe reader will terminate + first. In this case, an EPIPE is an indication that the pipe writer can + stop doing useless write() calls; this is what close_stdout does anyway. + EPIPE is part of the normal pipe/socket shutdown protocol in this case, + and should not lead to a diagnostic message. */ + +void +close_stdout_set_ignore_EPIPE (bool ignore) +{ + ignore_EPIPE = ignore; +} + +/* Close standard output. On error, issue a diagnostic and _exit + with status 'exit_failure'. + + Also close standard error. On error, _exit with status 'exit_failure'. + + Since close_stdout is commonly registered via 'atexit', POSIX + and the C standard both say that it should not call 'exit', + because the behavior is undefined if 'exit' is called more than + once. So it calls '_exit' instead of 'exit'. If close_stdout + is registered via atexit before other functions are registered, + the other functions can act before this _exit is invoked. + + Applications that use close_stdout should flush any streams + other than stdout and stderr before exiting, since the call to + _exit will bypass other buffer flushing. Applications should + be flushing and closing other streams anyway, to check for I/O + errors. Also, applications should not use tmpfile, since _exit + can bypass the removal of these files. + + It's important to detect such failures and exit nonzero because many + tools (most notably 'make' and other build-management systems) depend + on being able to detect failure in other tools via their exit status. */ + +void +close_stdout (void) +{ + if (close_stream (stdout) != 0 + && !(ignore_EPIPE && errno == EPIPE)) + { + char const *write_error = _("write error"); + if (file_name) + error (0, errno, "%s: %s", quotearg_colon (file_name), + write_error); + else + error (0, errno, "%s", write_error); + + _exit (exit_failure); + } + + if (close_stream (stderr) != 0) + _exit (exit_failure); +} diff --git a/gl/lib/closeout.h b/gl/lib/closeout.h new file mode 100644 index 0000000..28d80ea --- /dev/null +++ b/gl/lib/closeout.h @@ -0,0 +1,36 @@ +/* Close standard output and standard error. + + Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef CLOSEOUT_H +# define CLOSEOUT_H 1 + +# include + +# ifdef __cplusplus +extern "C" { +# endif + +void close_stdout_set_file_name (const char *file); +void close_stdout_set_ignore_EPIPE (bool ignore); +void close_stdout (void); + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/gl/lib/config.charset b/gl/lib/config.charset new file mode 100644 index 0000000..289bc44 --- /dev/null +++ b/gl/lib/config.charset @@ -0,0 +1,684 @@ +#! /bin/sh +# Output a system dependent table of character encoding aliases. +# +# Copyright (C) 2000-2004, 2006-2014 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, see . +# +# The table consists of lines of the form +# ALIAS CANONICAL +# +# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". +# ALIAS is compared in a case sensitive way. +# +# CANONICAL is the GNU canonical name for this character encoding. +# It must be an encoding supported by libiconv. Support by GNU libc is +# also desirable. CANONICAL is case insensitive. Usually an upper case +# MIME charset name is preferred. +# The current list of GNU canonical charset names is as follows. +# +# name MIME? used by which systems +# (darwin = Mac OS X, woe32 = native Windows) +# +# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin +# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin +# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin +# ISO-8859-3 Y glibc solaris cygwin +# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin +# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin +# ISO-8859-6 Y glibc aix hpux solaris cygwin +# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin +# ISO-8859-8 Y glibc aix hpux osf solaris cygwin +# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin +# ISO-8859-13 glibc netbsd openbsd darwin cygwin +# ISO-8859-14 glibc cygwin +# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin +# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin +# KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin +# KOI8-T glibc +# CP437 dos +# CP775 dos +# CP850 aix osf dos +# CP852 dos +# CP855 dos +# CP856 aix +# CP857 dos +# CP861 dos +# CP862 dos +# CP864 dos +# CP865 dos +# CP866 freebsd netbsd openbsd darwin dos +# CP869 dos +# CP874 woe32 dos +# CP922 aix +# CP932 aix cygwin woe32 dos +# CP943 aix +# CP949 osf darwin woe32 dos +# CP950 woe32 dos +# CP1046 aix +# CP1124 aix +# CP1125 dos +# CP1129 aix +# CP1131 darwin +# CP1250 woe32 +# CP1251 glibc solaris netbsd openbsd darwin cygwin woe32 +# CP1252 aix woe32 +# CP1253 woe32 +# CP1254 woe32 +# CP1255 glibc woe32 +# CP1256 woe32 +# CP1257 woe32 +# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin +# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin +# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin +# EUC-TW glibc aix hpux irix osf solaris netbsd +# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin +# BIG5-HKSCS glibc solaris darwin +# GBK glibc aix osf solaris darwin cygwin woe32 dos +# GB18030 glibc solaris netbsd darwin +# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin +# JOHAB glibc solaris woe32 +# TIS-620 glibc aix hpux osf solaris cygwin +# VISCII Y glibc +# TCVN5712-1 glibc +# ARMSCII-8 glibc darwin +# GEORGIAN-PS glibc cygwin +# PT154 glibc +# HP-ROMAN8 hpux +# HP-ARABIC8 hpux +# HP-GREEK8 hpux +# HP-HEBREW8 hpux +# HP-TURKISH8 hpux +# HP-KANA8 hpux +# DEC-KANJI osf +# DEC-HANYU osf +# UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin +# +# Note: Names which are not marked as being a MIME name should not be used in +# Internet protocols for information interchange (mail, news, etc.). +# +# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications +# must understand both names and treat them as equivalent. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + +host="$1" +os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` +echo "# This file contains a table of character encoding aliases," +echo "# suitable for operating system '${os}'." +echo "# It was automatically generated from config.charset." +# List of references, updated during installation: +echo "# Packages using this file: " +case "$os" in + linux-gnulibc1*) + # Linux libc5 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + echo "C ASCII" + echo "POSIX ASCII" + for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ + en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ + en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ + es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ + et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ + fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ + it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ + sv_FI sv_SE; do + echo "$l ISO-8859-1" + echo "$l.iso-8859-1 ISO-8859-1" + echo "$l.iso-8859-15 ISO-8859-15" + echo "$l.iso-8859-15@euro ISO-8859-15" + echo "$l@euro ISO-8859-15" + echo "$l.cp-437 CP437" + echo "$l.cp-850 CP850" + echo "$l.cp-1252 CP1252" + echo "$l.cp-1252@euro CP1252" + #echo "$l.atari-st ATARI-ST" # not a commonly used encoding + echo "$l.utf-8 UTF-8" + echo "$l.utf-8@euro UTF-8" + done + for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ + sl_SI sr sr_CS sr_YU; do + echo "$l ISO-8859-2" + echo "$l.iso-8859-2 ISO-8859-2" + echo "$l.cp-852 CP852" + echo "$l.cp-1250 CP1250" + echo "$l.utf-8 UTF-8" + done + for l in mk mk_MK ru ru_RU; do + echo "$l ISO-8859-5" + echo "$l.iso-8859-5 ISO-8859-5" + echo "$l.koi8-r KOI8-R" + echo "$l.cp-866 CP866" + echo "$l.cp-1251 CP1251" + echo "$l.utf-8 UTF-8" + done + for l in ar ar_SA; do + echo "$l ISO-8859-6" + echo "$l.iso-8859-6 ISO-8859-6" + echo "$l.cp-864 CP864" + #echo "$l.cp-868 CP868" # not a commonly used encoding + echo "$l.cp-1256 CP1256" + echo "$l.utf-8 UTF-8" + done + for l in el el_GR gr gr_GR; do + echo "$l ISO-8859-7" + echo "$l.iso-8859-7 ISO-8859-7" + echo "$l.cp-869 CP869" + echo "$l.cp-1253 CP1253" + echo "$l.cp-1253@euro CP1253" + echo "$l.utf-8 UTF-8" + echo "$l.utf-8@euro UTF-8" + done + for l in he he_IL iw iw_IL; do + echo "$l ISO-8859-8" + echo "$l.iso-8859-8 ISO-8859-8" + echo "$l.cp-862 CP862" + echo "$l.cp-1255 CP1255" + echo "$l.utf-8 UTF-8" + done + for l in tr tr_TR; do + echo "$l ISO-8859-9" + echo "$l.iso-8859-9 ISO-8859-9" + echo "$l.cp-857 CP857" + echo "$l.cp-1254 CP1254" + echo "$l.utf-8 UTF-8" + done + for l in lt lt_LT lv lv_LV; do + #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name + echo "$l ISO-8859-13" + done + for l in ru_UA uk uk_UA; do + echo "$l KOI8-U" + done + for l in zh zh_CN; do + #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name + echo "$l GB2312" + done + for l in ja ja_JP ja_JP.EUC; do + echo "$l EUC-JP" + done + for l in ko ko_KR; do + echo "$l EUC-KR" + done + for l in th th_TH; do + echo "$l TIS-620" + done + for l in fa fa_IR; do + #echo "$l ISIRI-3342" # a broken encoding + echo "$l.utf-8 UTF-8" + done + ;; + linux* | *-gnu*) + # With glibc-2.1 or newer, we don't need any canonicalization, + # because glibc has iconv and both glibc and libiconv support all + # GNU canonical names directly. Therefore, the Makefile does not + # need to install the alias file at all. + # The following applies only to glibc-2.0.x and older libcs. + echo "ISO_646.IRV:1983 ASCII" + ;; + aix*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-6 ISO-8859-6" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "IBM-850 CP850" + echo "IBM-856 CP856" + echo "IBM-921 ISO-8859-13" + echo "IBM-922 CP922" + echo "IBM-932 CP932" + echo "IBM-943 CP943" + echo "IBM-1046 CP1046" + echo "IBM-1124 CP1124" + echo "IBM-1129 CP1129" + echo "IBM-1252 CP1252" + echo "IBM-eucCN GB2312" + echo "IBM-eucJP EUC-JP" + echo "IBM-eucKR EUC-KR" + echo "IBM-eucTW EUC-TW" + echo "big5 BIG5" + echo "GBK GBK" + echo "TIS-620 TIS-620" + echo "UTF-8 UTF-8" + ;; + hpux*) + echo "iso88591 ISO-8859-1" + echo "iso88592 ISO-8859-2" + echo "iso88595 ISO-8859-5" + echo "iso88596 ISO-8859-6" + echo "iso88597 ISO-8859-7" + echo "iso88598 ISO-8859-8" + echo "iso88599 ISO-8859-9" + echo "iso885915 ISO-8859-15" + echo "roman8 HP-ROMAN8" + echo "arabic8 HP-ARABIC8" + echo "greek8 HP-GREEK8" + echo "hebrew8 HP-HEBREW8" + echo "turkish8 HP-TURKISH8" + echo "kana8 HP-KANA8" + echo "tis620 TIS-620" + echo "big5 BIG5" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "hp15CN GB2312" + #echo "ccdc ?" # what is this? + echo "SJIS SHIFT_JIS" + echo "utf8 UTF-8" + ;; + irix*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-9 ISO-8859-9" + echo "eucCN GB2312" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + ;; + osf*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "cp850 CP850" + echo "big5 BIG5" + echo "dechanyu DEC-HANYU" + echo "dechanzi GB2312" + echo "deckanji DEC-KANJI" + echo "deckorean EUC-KR" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "GBK GBK" + echo "KSC5601 CP949" + echo "sdeckanji EUC-JP" + echo "SJIS SHIFT_JIS" + echo "TACTIS TIS-620" + echo "UTF-8 UTF-8" + ;; + solaris*) + echo "646 ASCII" + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-3 ISO-8859-3" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-6 ISO-8859-6" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "koi8-r KOI8-R" + echo "ansi-1251 CP1251" + echo "BIG5 BIG5" + echo "Big5-HKSCS BIG5-HKSCS" + echo "gb2312 GB2312" + echo "GBK GBK" + echo "GB18030 GB18030" + echo "cns11643 EUC-TW" + echo "5601 EUC-KR" + echo "ko_KR.johap92 JOHAB" + echo "eucJP EUC-JP" + echo "PCK SHIFT_JIS" + echo "TIS620.2533 TIS-620" + #echo "sun_eu_greek ?" # what is this? + echo "UTF-8 UTF-8" + ;; + freebsd* | os2*) + # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just + # reuse FreeBSD's locale data for OS/2. + echo "C ASCII" + echo "US-ASCII ASCII" + for l in la_LN lt_LN; do + echo "$l.ASCII ASCII" + done + for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ + fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ + lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do + echo "$l.ISO_8859-1 ISO-8859-1" + echo "$l.DIS_8859-15 ISO-8859-15" + done + for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do + echo "$l.ISO_8859-2 ISO-8859-2" + done + for l in la_LN lt_LT; do + echo "$l.ISO_8859-4 ISO-8859-4" + done + for l in ru_RU ru_SU; do + echo "$l.KOI8-R KOI8-R" + echo "$l.ISO_8859-5 ISO-8859-5" + echo "$l.CP866 CP866" + done + echo "uk_UA.KOI8-U KOI8-U" + echo "zh_TW.BIG5 BIG5" + echo "zh_TW.Big5 BIG5" + echo "zh_CN.EUC GB2312" + echo "ja_JP.EUC EUC-JP" + echo "ja_JP.SJIS SHIFT_JIS" + echo "ja_JP.Shift_JIS SHIFT_JIS" + echo "ko_KR.EUC EUC-KR" + ;; + netbsd*) + echo "646 ASCII" + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-13 ISO-8859-13" + echo "ISO8859-15 ISO-8859-15" + echo "eucCN GB2312" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "BIG5 BIG5" + echo "SJIS SHIFT_JIS" + ;; + openbsd*) + echo "646 ASCII" + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-13 ISO-8859-13" + echo "ISO8859-15 ISO-8859-15" + ;; + darwin[56]*) + # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + echo "C ASCII" + for l in en_AU en_CA en_GB en_US la_LN; do + echo "$l.US-ASCII ASCII" + done + for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ + fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ + nl_NL no_NO pt_PT sv_SE; do + echo "$l ISO-8859-1" + echo "$l.ISO8859-1 ISO-8859-1" + echo "$l.ISO8859-15 ISO-8859-15" + done + for l in la_LN; do + echo "$l.ISO8859-1 ISO-8859-1" + echo "$l.ISO8859-15 ISO-8859-15" + done + for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do + echo "$l.ISO8859-2 ISO-8859-2" + done + for l in la_LN lt_LT; do + echo "$l.ISO8859-4 ISO-8859-4" + done + for l in ru_RU; do + echo "$l.KOI8-R KOI8-R" + echo "$l.ISO8859-5 ISO-8859-5" + echo "$l.CP866 CP866" + done + for l in bg_BG; do + echo "$l.CP1251 CP1251" + done + echo "uk_UA.KOI8-U KOI8-U" + echo "zh_TW.BIG5 BIG5" + echo "zh_TW.Big5 BIG5" + echo "zh_CN.EUC GB2312" + echo "ja_JP.EUC EUC-JP" + echo "ja_JP.SJIS SHIFT_JIS" + echo "ko_KR.EUC EUC-KR" + ;; + darwin*) + # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is + # useless: + # - It returns the empty string when LANG is set to a locale of the + # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 + # LC_CTYPE file. + # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by + # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. + # - The documentation says: + # "... all code that calls BSD system routines should ensure + # that the const *char parameters of these routines are in UTF-8 + # encoding. All BSD system functions expect their string + # parameters to be in UTF-8 encoding and nothing else." + # It also says + # "An additional caveat is that string parameters for files, + # paths, and other file-system entities must be in canonical + # UTF-8. In a canonical UTF-8 Unicode string, all decomposable + # characters are decomposed ..." + # but this is not true: You can pass non-decomposed UTF-8 strings + # to file system functions, and it is the OS which will convert + # them to decomposed UTF-8 before accessing the file system. + # - The Apple Terminal application displays UTF-8 by default. + # - However, other applications are free to use different encodings: + # - xterm uses ISO-8859-1 by default. + # - TextEdit uses MacRoman by default. + # We prefer UTF-8 over decomposed UTF-8-MAC because one should + # minimize the use of decomposed Unicode. Unfortunately, through the + # Darwin file system, decomposed UTF-8 strings are leaked into user + # space nevertheless. + # Then there are also the locales with encodings other than US-ASCII + # and UTF-8. These locales can be occasionally useful to users (e.g. + # when grepping through ISO-8859-1 encoded text files), when all their + # file names are in US-ASCII. + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-13 ISO-8859-13" + echo "ISO8859-15 ISO-8859-15" + echo "KOI8-R KOI8-R" + echo "KOI8-U KOI8-U" + echo "CP866 CP866" + echo "CP949 CP949" + echo "CP1131 CP1131" + echo "CP1251 CP1251" + echo "eucCN GB2312" + echo "GB2312 GB2312" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "Big5 BIG5" + echo "Big5HKSCS BIG5-HKSCS" + echo "GBK GBK" + echo "GB18030 GB18030" + echo "SJIS SHIFT_JIS" + echo "ARMSCII-8 ARMSCII-8" + echo "PT154 PT154" + #echo "ISCII-DEV ?" + echo "* UTF-8" + ;; + beos* | haiku*) + # BeOS and Haiku have a single locale, and it has UTF-8 encoding. + echo "* UTF-8" + ;; + msdosdjgpp*) + # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + echo "#" + echo "# The encodings given here may not all be correct." + echo "# If you find that the encoding given for your language and" + echo "# country is not the one your DOS machine actually uses, just" + echo "# correct it in this file, and send a mail to" + echo "# Juan Manuel Guerrero " + echo "# and Bruno Haible ." + echo "#" + echo "C ASCII" + # ISO-8859-1 languages + echo "ca CP850" + echo "ca_ES CP850" + echo "da CP865" # not CP850 ?? + echo "da_DK CP865" # not CP850 ?? + echo "de CP850" + echo "de_AT CP850" + echo "de_CH CP850" + echo "de_DE CP850" + echo "en CP850" + echo "en_AU CP850" # not CP437 ?? + echo "en_CA CP850" + echo "en_GB CP850" + echo "en_NZ CP437" + echo "en_US CP437" + echo "en_ZA CP850" # not CP437 ?? + echo "es CP850" + echo "es_AR CP850" + echo "es_BO CP850" + echo "es_CL CP850" + echo "es_CO CP850" + echo "es_CR CP850" + echo "es_CU CP850" + echo "es_DO CP850" + echo "es_EC CP850" + echo "es_ES CP850" + echo "es_GT CP850" + echo "es_HN CP850" + echo "es_MX CP850" + echo "es_NI CP850" + echo "es_PA CP850" + echo "es_PY CP850" + echo "es_PE CP850" + echo "es_SV CP850" + echo "es_UY CP850" + echo "es_VE CP850" + echo "et CP850" + echo "et_EE CP850" + echo "eu CP850" + echo "eu_ES CP850" + echo "fi CP850" + echo "fi_FI CP850" + echo "fr CP850" + echo "fr_BE CP850" + echo "fr_CA CP850" + echo "fr_CH CP850" + echo "fr_FR CP850" + echo "ga CP850" + echo "ga_IE CP850" + echo "gd CP850" + echo "gd_GB CP850" + echo "gl CP850" + echo "gl_ES CP850" + echo "id CP850" # not CP437 ?? + echo "id_ID CP850" # not CP437 ?? + echo "is CP861" # not CP850 ?? + echo "is_IS CP861" # not CP850 ?? + echo "it CP850" + echo "it_CH CP850" + echo "it_IT CP850" + echo "lt CP775" + echo "lt_LT CP775" + echo "lv CP775" + echo "lv_LV CP775" + echo "nb CP865" # not CP850 ?? + echo "nb_NO CP865" # not CP850 ?? + echo "nl CP850" + echo "nl_BE CP850" + echo "nl_NL CP850" + echo "nn CP865" # not CP850 ?? + echo "nn_NO CP865" # not CP850 ?? + echo "no CP865" # not CP850 ?? + echo "no_NO CP865" # not CP850 ?? + echo "pt CP850" + echo "pt_BR CP850" + echo "pt_PT CP850" + echo "sv CP850" + echo "sv_SE CP850" + # ISO-8859-2 languages + echo "cs CP852" + echo "cs_CZ CP852" + echo "hr CP852" + echo "hr_HR CP852" + echo "hu CP852" + echo "hu_HU CP852" + echo "pl CP852" + echo "pl_PL CP852" + echo "ro CP852" + echo "ro_RO CP852" + echo "sk CP852" + echo "sk_SK CP852" + echo "sl CP852" + echo "sl_SI CP852" + echo "sq CP852" + echo "sq_AL CP852" + echo "sr CP852" # CP852 or CP866 or CP855 ?? + echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? + echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? + # ISO-8859-3 languages + echo "mt CP850" + echo "mt_MT CP850" + # ISO-8859-5 languages + echo "be CP866" + echo "be_BE CP866" + echo "bg CP866" # not CP855 ?? + echo "bg_BG CP866" # not CP855 ?? + echo "mk CP866" # not CP855 ?? + echo "mk_MK CP866" # not CP855 ?? + echo "ru CP866" + echo "ru_RU CP866" + echo "uk CP1125" + echo "uk_UA CP1125" + # ISO-8859-6 languages + echo "ar CP864" + echo "ar_AE CP864" + echo "ar_DZ CP864" + echo "ar_EG CP864" + echo "ar_IQ CP864" + echo "ar_IR CP864" + echo "ar_JO CP864" + echo "ar_KW CP864" + echo "ar_MA CP864" + echo "ar_OM CP864" + echo "ar_QA CP864" + echo "ar_SA CP864" + echo "ar_SY CP864" + # ISO-8859-7 languages + echo "el CP869" + echo "el_GR CP869" + # ISO-8859-8 languages + echo "he CP862" + echo "he_IL CP862" + # ISO-8859-9 languages + echo "tr CP857" + echo "tr_TR CP857" + # Japanese + echo "ja CP932" + echo "ja_JP CP932" + # Chinese + echo "zh_CN GBK" + echo "zh_TW CP950" # not CP938 ?? + # Korean + echo "kr CP949" # not CP934 ?? + echo "kr_KR CP949" # not CP934 ?? + # Thai + echo "th CP874" + echo "th_TH CP874" + # Other + echo "eo CP850" + echo "eo_EO CP850" + ;; +esac diff --git a/gl/lib/creat-safer.c b/gl/lib/creat-safer.c new file mode 100644 index 0000000..984857b --- /dev/null +++ b/gl/lib/creat-safer.c @@ -0,0 +1,31 @@ +/* Invoke creat, but avoid some glitches. + + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +#include "fcntl-safer.h" + +#include +#include "unistd-safer.h" + +int +creat_safer (char const *file, mode_t mode) +{ + return fd_safer (creat (file, mode)); +} diff --git a/gl/lib/ctype.in.h b/gl/lib/ctype.in.h new file mode 100644 index 0000000..6d292d8 --- /dev/null +++ b/gl/lib/ctype.in.h @@ -0,0 +1,57 @@ +/* A substitute for ISO C99 , for platforms on which it is incomplete. + + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Bruno Haible. */ + +/* + * ISO C 99 for platforms on which it is incomplete. + * + */ + +#ifndef _@GUARD_PREFIX@_CTYPE_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* Include the original . */ +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_CTYPE_H@ + +#ifndef _@GUARD_PREFIX@_CTYPE_H +#define _@GUARD_PREFIX@_CTYPE_H + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* Return non-zero if c is a blank, i.e. a space or tab character. */ +#if @GNULIB_ISBLANK@ +# if !@HAVE_ISBLANK@ +_GL_EXTERN_C int isblank (int c); +# endif +#elif defined GNULIB_POSIXCHECK +# undef isblank +# if HAVE_RAW_DECL_ISBLANK +_GL_WARN_ON_USE (isblank, "isblank is unportable - " + "use gnulib module isblank for portability"); +# endif +#endif + +#endif /* _@GUARD_PREFIX@_CTYPE_H */ +#endif /* _@GUARD_PREFIX@_CTYPE_H */ diff --git a/gl/lib/cycle-check.c b/gl/lib/cycle-check.c new file mode 100644 index 0000000..f7b3d07 --- /dev/null +++ b/gl/lib/cycle-check.c @@ -0,0 +1,85 @@ +/* help detect directory cycles efficiently + + Copyright (C) 2003-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering */ + +#include + +#include +#include +#include +#include +#include + +#include + +#include "cycle-check.h" + +#define CC_MAGIC 9827862 + +/* Return true if I is a power of 2, or is zero. */ + +static bool +is_zero_or_power_of_two (uintmax_t i) +{ + return (i & (i - 1)) == 0; +} + +void +cycle_check_init (struct cycle_check_state *state) +{ + state->chdir_counter = 0; + state->magic = CC_MAGIC; +} + +/* In traversing a directory hierarchy, call this function once for each + descending chdir call, with SB corresponding to the chdir operand. + If SB corresponds to a directory that has already been seen, + return true to indicate that there is a directory cycle. + Note that this is done "lazily", which means that some of + the directories in the cycle may be processed twice before + the cycle is detected. */ + +bool +cycle_check (struct cycle_check_state *state, struct stat const *sb) +{ + assert (state->magic == CC_MAGIC); + + /* If the current directory ever happens to be the same + as the one we last recorded for the cycle detection, + then it's obviously part of a cycle. */ + if (state->chdir_counter && SAME_INODE (*sb, state->dev_ino)) + return true; + + /* If the number of "descending" chdir calls is a power of two, + record the dev/ino of the current directory. */ + if (is_zero_or_power_of_two (++(state->chdir_counter))) + { + /* On all architectures that we know about, if the counter + overflows then there is a directory cycle here somewhere, + even if we haven't detected it yet. Typically this happens + only after the counter is incremented 2**64 times, so it's a + fairly theoretical point. */ + if (state->chdir_counter == 0) + return true; + + state->dev_ino.st_dev = sb->st_dev; + state->dev_ino.st_ino = sb->st_ino; + } + + return false; +} diff --git a/gl/lib/cycle-check.h b/gl/lib/cycle-check.h new file mode 100644 index 0000000..7649606 --- /dev/null +++ b/gl/lib/cycle-check.h @@ -0,0 +1,52 @@ +/* help detect directory cycles efficiently + + Copyright (C) 2003-2004, 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering */ + +#ifndef CYCLE_CHECK_H +# define CYCLE_CHECK_H 1 + +# include +# include +# include "dev-ino.h" +# include "same-inode.h" + +struct cycle_check_state +{ + struct dev_ino dev_ino; + uintmax_t chdir_counter; + int magic; +}; + +void cycle_check_init (struct cycle_check_state *state); +bool cycle_check (struct cycle_check_state *state, struct stat const *sb); + +# define CYCLE_CHECK_REFLECT_CHDIR_UP(State, SB_dir, SB_subdir) \ + do \ + { \ + /* You must call cycle_check at least once before using this macro. */ \ + if ((State)->chdir_counter == 0) \ + abort (); \ + if (SAME_INODE ((State)->dev_ino, SB_subdir)) \ + { \ + (State)->dev_ino.st_dev = (SB_dir).st_dev; \ + (State)->dev_ino.st_ino = (SB_dir).st_ino; \ + } \ + } \ + while (0) + +#endif diff --git a/gnulib/lib/dev-ino.h b/gl/lib/dev-ino.h similarity index 100% rename from gnulib/lib/dev-ino.h rename to gl/lib/dev-ino.h diff --git a/gl/lib/dirent--.h b/gl/lib/dirent--.h new file mode 100644 index 0000000..d7c51ba --- /dev/null +++ b/gl/lib/dirent--.h @@ -0,0 +1,23 @@ +/* Like dirent.h, but redefine some names to avoid glitches. + + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +#include "dirent-safer.h" + +#undef opendir +#define opendir opendir_safer diff --git a/gl/lib/dirent-private.h b/gl/lib/dirent-private.h new file mode 100644 index 0000000..83531a1 --- /dev/null +++ b/gl/lib/dirent-private.h @@ -0,0 +1,40 @@ +/* Private details of the DIR type. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _DIRENT_PRIVATE_H +#define _DIRENT_PRIVATE_H 1 + +#define WIN32_LEAN_AND_MEAN +#include + +struct gl_directory +{ + /* Status, or error code to produce in next readdir() call. + -2 means the end of the directory is already reached, + -1 means the entry was already filled by FindFirstFile, + 0 means the entry needs to be filled using FindNextFile. + A positive value is an error code. */ + int status; + /* Handle, reading the directory, at current position. */ + HANDLE current; + /* Found directory entry. */ + WIN32_FIND_DATA entry; + /* Argument to pass to FindFirstFile. It consists of the absolutized + directory name, followed by a directory separator and the wildcards. */ + char dir_name_mask[1]; +}; + +#endif /* _DIRENT_PRIVATE_H */ diff --git a/gl/lib/dirent-safer.h b/gl/lib/dirent-safer.h new file mode 100644 index 0000000..8cc75d8 --- /dev/null +++ b/gl/lib/dirent-safer.h @@ -0,0 +1,22 @@ +/* Invoke dirent-like functions, but avoid some glitches. + + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +#include + +DIR *opendir_safer (const char *name); diff --git a/gl/lib/dirent.in.h b/gl/lib/dirent.in.h new file mode 100644 index 0000000..4822d6b --- /dev/null +++ b/gl/lib/dirent.in.h @@ -0,0 +1,258 @@ +/* A GNU-like . + Copyright (C) 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _@GUARD_PREFIX@_DIRENT_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_DIRENT_H@ +# @INCLUDE_NEXT@ @NEXT_DIRENT_H@ +#endif + +#ifndef _@GUARD_PREFIX@_DIRENT_H +#define _@GUARD_PREFIX@_DIRENT_H + +/* Get ino_t. Needed on some systems, including glibc 2.8. */ +#include + +#if !@HAVE_DIRENT_H@ +/* Define types DIR and 'struct dirent'. */ +# if !GNULIB_defined_struct_dirent +struct dirent +{ + char d_type; + char d_name[1]; +}; +/* Possible values for 'd_type'. */ +# define DT_UNKNOWN 0 +# define DT_FIFO 1 /* FIFO */ +# define DT_CHR 2 /* character device */ +# define DT_DIR 4 /* directory */ +# define DT_BLK 6 /* block device */ +# define DT_REG 8 /* regular file */ +# define DT_LNK 10 /* symbolic link */ +# define DT_SOCK 12 /* socket */ +# define DT_WHT 14 /* whiteout */ +typedef struct gl_directory DIR; +# define GNULIB_defined_struct_dirent 1 +# endif +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +/* Declare overridden functions. */ + +#if @GNULIB_OPENDIR@ +# if @REPLACE_OPENDIR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef opendir +# define opendir rpl_opendir +# endif +_GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name)); +# else +# if !@HAVE_OPENDIR@ +_GL_FUNCDECL_SYS (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name)); +# endif +_GL_CXXALIASWARN (opendir); +#elif defined GNULIB_POSIXCHECK +# undef opendir +# if HAVE_RAW_DECL_OPENDIR +_GL_WARN_ON_USE (opendir, "opendir is not portable - " + "use gnulib module opendir for portability"); +# endif +#endif + +#if @GNULIB_READDIR@ +# if !@HAVE_READDIR@ +_GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp)); +_GL_CXXALIASWARN (readdir); +#elif defined GNULIB_POSIXCHECK +# undef readdir +# if HAVE_RAW_DECL_READDIR +_GL_WARN_ON_USE (readdir, "readdir is not portable - " + "use gnulib module readdir for portability"); +# endif +#endif + +#if @GNULIB_REWINDDIR@ +# if !@HAVE_REWINDDIR@ +_GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp)); +_GL_CXXALIASWARN (rewinddir); +#elif defined GNULIB_POSIXCHECK +# undef rewinddir +# if HAVE_RAW_DECL_REWINDDIR +_GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - " + "use gnulib module rewinddir for portability"); +# endif +#endif + +#if @GNULIB_CLOSEDIR@ +# if @REPLACE_CLOSEDIR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef closedir +# define closedir rpl_closedir +# endif +_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp)); +# else +# if !@HAVE_CLOSEDIR@ +_GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (closedir, int, (DIR *dirp)); +# endif +_GL_CXXALIASWARN (closedir); +#elif defined GNULIB_POSIXCHECK +# undef closedir +# if HAVE_RAW_DECL_CLOSEDIR +_GL_WARN_ON_USE (closedir, "closedir is not portable - " + "use gnulib module closedir for portability"); +# endif +#endif + +#if @GNULIB_DIRFD@ +/* Return the file descriptor associated with the given directory stream, + or -1 if none exists. */ +# if @REPLACE_DIRFD@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef dirfd +# define dirfd rpl_dirfd +# endif +_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (dirfd, int, (DIR *)); +# else +# if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd + /* dirfd is defined as a macro and not as a function. + Turn it into a function and get rid of the macro. */ +static inline int (dirfd) (DIR *dp) { return dirfd (dp); } +# undef dirfd +# endif +# if !(@HAVE_DECL_DIRFD@ || defined dirfd) +_GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (dirfd, int, (DIR *)); +# endif +_GL_CXXALIASWARN (dirfd); +#elif defined GNULIB_POSIXCHECK +# undef dirfd +# if HAVE_RAW_DECL_DIRFD +_GL_WARN_ON_USE (dirfd, "dirfd is unportable - " + "use gnulib module dirfd for portability"); +# endif +#endif + +#if @GNULIB_FDOPENDIR@ +/* Open a directory stream visiting the given directory file + descriptor. Return NULL and set errno if fd is not visiting a + directory. On success, this function consumes fd (it will be + implicitly closed either by this function or by a subsequent + closedir). */ +# if @REPLACE_FDOPENDIR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopendir +# define fdopendir rpl_fdopendir +# endif +_GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd)); +_GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd)); +# else +# if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@ +_GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd)); +# endif +_GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd)); +# endif +_GL_CXXALIASWARN (fdopendir); +#elif defined GNULIB_POSIXCHECK +# undef fdopendir +# if HAVE_RAW_DECL_FDOPENDIR +_GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - " + "use gnulib module fdopendir for portability"); +# endif +#endif + +#if @GNULIB_SCANDIR@ +/* Scan the directory DIR, calling FILTER on each directory entry. + Entries for which FILTER returns nonzero are individually malloc'd, + sorted using qsort with CMP, and collected in a malloc'd array in + *NAMELIST. Returns the number of entries selected, or -1 on error. */ +# if !@HAVE_SCANDIR@ +_GL_FUNCDECL_SYS (scandir, int, + (const char *dir, struct dirent ***namelist, + int (*filter) (const struct dirent *), + int (*cmp) (const struct dirent **, const struct dirent **)) + _GL_ARG_NONNULL ((1, 2, 4))); +# endif +/* Need to cast, because on glibc systems, the fourth parameter is + int (*cmp) (const void *, const void *). */ +_GL_CXXALIAS_SYS_CAST (scandir, int, + (const char *dir, struct dirent ***namelist, + int (*filter) (const struct dirent *), + int (*cmp) (const struct dirent **, const struct dirent **))); +_GL_CXXALIASWARN (scandir); +#elif defined GNULIB_POSIXCHECK +# undef scandir +# if HAVE_RAW_DECL_SCANDIR +_GL_WARN_ON_USE (scandir, "scandir is unportable - " + "use gnulib module scandir for portability"); +# endif +#endif + +#if @GNULIB_ALPHASORT@ +/* Compare two 'struct dirent' entries alphabetically. */ +# if !@HAVE_ALPHASORT@ +_GL_FUNCDECL_SYS (alphasort, int, + (const struct dirent **, const struct dirent **) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +# endif +/* Need to cast, because on glibc systems, the parameters are + (const void *, const void *). */ +_GL_CXXALIAS_SYS_CAST (alphasort, int, + (const struct dirent **, const struct dirent **)); +_GL_CXXALIASWARN (alphasort); +#elif defined GNULIB_POSIXCHECK +# undef alphasort +# if HAVE_RAW_DECL_ALPHASORT +_GL_WARN_ON_USE (alphasort, "alphasort is unportable - " + "use gnulib module alphasort for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_DIRENT_H */ +#endif /* _@GUARD_PREFIX@_DIRENT_H */ diff --git a/gl/lib/dirfd.c b/gl/lib/dirfd.c new file mode 100644 index 0000000..4d37928 --- /dev/null +++ b/gl/lib/dirfd.c @@ -0,0 +1,32 @@ +/* dirfd.c -- return the file descriptor associated with an open DIR* + + Copyright (C) 2001, 2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +#include +#include + +int +dirfd (DIR *dir_p) +{ + int fd = DIR_TO_FD (dir_p); + if (fd == -1) + errno = ENOTSUP; + return fd; +} diff --git a/gl/lib/dirname-lgpl.c b/gl/lib/dirname-lgpl.c new file mode 100644 index 0000000..d4a6973 --- /dev/null +++ b/gl/lib/dirname-lgpl.c @@ -0,0 +1,86 @@ +/* dirname.c -- return all but the last element in a file name + + Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "dirname.h" + +#include +#include + +/* Return the length of the prefix of FILE that will be used by + dir_name. If FILE is in the working directory, this returns zero + even though 'dir_name (FILE)' will return ".". Works properly even + if there are trailing slashes (by effectively ignoring them). */ + +size_t +dir_len (char const *file) +{ + size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); + size_t length; + + /* Advance prefix_length beyond important leading slashes. */ + prefix_length += (prefix_length != 0 + ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE + && ISSLASH (file[prefix_length])) + : (ISSLASH (file[0]) + ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT + && ISSLASH (file[1]) && ! ISSLASH (file[2]) + ? 2 : 1)) + : 0)); + + /* Strip the basename and any redundant slashes before it. */ + for (length = last_component (file) - file; + prefix_length < length; length--) + if (! ISSLASH (file[length - 1])) + break; + return length; +} + + +/* In general, we can't use the builtin 'dirname' function if available, + since it has different meanings in different environments. + In some environments the builtin 'dirname' modifies its argument. + + Return the leading directories part of FILE, allocated with malloc. + Works properly even if there are trailing slashes (by effectively + ignoring them). Return NULL on failure. + + If lstat (FILE) would succeed, then { chdir (dir_name (FILE)); + lstat (base_name (FILE)); } will access the same file. Likewise, + if the sequence { chdir (dir_name (FILE)); + rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE + to "foo" in the same directory FILE was in. */ + +char * +mdir_name (char const *file) +{ + size_t length = dir_len (file); + bool append_dot = (length == 0 + || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE + && length == FILE_SYSTEM_PREFIX_LEN (file) + && file[2] != '\0' && ! ISSLASH (file[2]))); + char *dir = malloc (length + append_dot + 1); + if (!dir) + return NULL; + memcpy (dir, file, length); + if (append_dot) + dir[length++] = '.'; + dir[length] = '\0'; + return dir; +} diff --git a/gl/lib/dirname.c b/gl/lib/dirname.c new file mode 100644 index 0000000..94f1a36 --- /dev/null +++ b/gl/lib/dirname.c @@ -0,0 +1,38 @@ +/* dirname.c -- return all but the last element in a file name + + Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "dirname.h" + +#include +#include +#include "xalloc.h" + +/* Just like mdir_name (dirname-lgpl.c), except, rather than + returning NULL upon malloc failure, here, we report the + "memory exhausted" condition and exit. */ + +char * +dir_name (char const *file) +{ + char *result = mdir_name (file); + if (!result) + xalloc_die (); + return result; +} diff --git a/gl/lib/dirname.h b/gl/lib/dirname.h new file mode 100644 index 0000000..a1b7009 --- /dev/null +++ b/gl/lib/dirname.h @@ -0,0 +1,46 @@ +/* Take file names apart into directory and base names. + + Copyright (C) 1998, 2001, 2003-2006, 2009-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef DIRNAME_H_ +# define DIRNAME_H_ 1 + +# include +# include +# include "dosname.h" + +# ifndef DIRECTORY_SEPARATOR +# define DIRECTORY_SEPARATOR '/' +# endif + +# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT +# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 +# endif + +# if GNULIB_DIRNAME +char *base_name (char const *file); +char *dir_name (char const *file); +# endif + +char *mdir_name (char const *file); +size_t base_len (char const *file) _GL_ATTRIBUTE_PURE; +size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE; +char *last_component (char const *file) _GL_ATTRIBUTE_PURE; + +bool strip_trailing_slashes (char *file); + +#endif /* not DIRNAME_H_ */ diff --git a/gl/lib/dosname.h b/gl/lib/dosname.h new file mode 100644 index 0000000..b92adfa --- /dev/null +++ b/gl/lib/dosname.h @@ -0,0 +1,53 @@ +/* File names on MS-DOS/Windows systems. + + Copyright (C) 2000-2001, 2004-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + From Paul Eggert and Jim Meyering. */ + +#ifndef _DOSNAME_H +#define _DOSNAME_H + +#if (defined _WIN32 || defined __WIN32__ || \ + defined __MSDOS__ || defined __CYGWIN__ || \ + defined __EMX__ || defined __DJGPP__) + /* This internal macro assumes ASCII, but all hosts that support drive + letters use ASCII. */ +# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ + <= 'z' - 'a') +# define FILE_SYSTEM_PREFIX_LEN(Filename) \ + (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) +# ifndef __CYGWIN__ +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 +# endif +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +#else +# define FILE_SYSTEM_PREFIX_LEN(Filename) 0 +# define ISSLASH(C) ((C) == '/') +#endif + +#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE +# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 +#endif + +#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE +# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) +# else +# define IS_ABSOLUTE_FILE_NAME(F) \ + (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0) +#endif +#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) + +#endif /* DOSNAME_H_ */ diff --git a/gl/lib/dup-safer.c b/gl/lib/dup-safer.c new file mode 100644 index 0000000..8df3cda --- /dev/null +++ b/gl/lib/dup-safer.c @@ -0,0 +1,34 @@ +/* Invoke dup, but avoid some glitches. + + Copyright (C) 2001, 2004-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include + +#include "unistd-safer.h" + +#include +#include + +/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or + STDERR_FILENO. */ + +int +dup_safer (int fd) +{ + return fcntl (fd, F_DUPFD, STDERR_FILENO + 1); +} diff --git a/gl/lib/dup.c b/gl/lib/dup.c new file mode 100644 index 0000000..c813df6 --- /dev/null +++ b/gl/lib/dup.c @@ -0,0 +1,61 @@ +/* Duplicate an open file descriptor. + + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include + +#include "msvc-inval.h" + +#undef dup + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static int +dup_nothrow (int fd) +{ + int result; + + TRY_MSVC_INVAL + { + result = dup (fd); + } + CATCH_MSVC_INVAL + { + result = -1; + errno = EBADF; + } + DONE_MSVC_INVAL; + + return result; +} +#else +# define dup_nothrow dup +#endif + +int +rpl_dup (int fd) +{ + int result = dup_nothrow (fd); +#if REPLACE_FCHDIR + if (result >= 0) + result = _gl_register_dup (fd, result); +#endif + return result; +} diff --git a/gl/lib/dup2.c b/gl/lib/dup2.c new file mode 100644 index 0000000..7de6805 --- /dev/null +++ b/gl/lib/dup2.c @@ -0,0 +1,164 @@ +/* Duplicate an open file descriptor to a specified file descriptor. + + Copyright (C) 1999, 2004-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Paul Eggert */ + +#include + +/* Specification. */ +#include + +#include +#include + +#if HAVE_DUP2 + +# undef dup2 + +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + +/* Get declarations of the native Windows API functions. */ +# define WIN32_LEAN_AND_MEAN +# include + +# include "msvc-inval.h" + +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" + +static int +ms_windows_dup2 (int fd, int desired_fd) +{ + int result; + + /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open, + dup2 (fd, fd) returns 0, but all further attempts to use fd in + future dup2 calls will hang. */ + if (fd == desired_fd) + { + if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE) + { + errno = EBADF; + return -1; + } + return fd; + } + + /* Wine 1.0.1 return 0 when desired_fd is negative but not -1: + http://bugs.winehq.org/show_bug.cgi?id=21289 */ + if (desired_fd < 0) + { + errno = EBADF; + return -1; + } + + TRY_MSVC_INVAL + { + result = dup2 (fd, desired_fd); + } + CATCH_MSVC_INVAL + { + errno = EBADF; + result = -1; + } + DONE_MSVC_INVAL; + + if (result == 0) + result = desired_fd; + + return result; +} + +# define dup2 ms_windows_dup2 + +# endif + +int +rpl_dup2 (int fd, int desired_fd) +{ + int result; + +# 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 Cygwin 1.7.25, dup2 (1, 256) can dump core. + On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */ +# if HAVE_SETDTABLESIZE + setdtablesize (desired_fd + 1); +# endif + if (desired_fd < 0) + fd = desired_fd; + if (fd == desired_fd) + return fcntl (fd, F_GETFL) == -1 ? -1 : fd; +# endif + + result = dup2 (fd, desired_fd); + + /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */ + if (result == -1 && errno == EMFILE) + errno = EBADF; +# if REPLACE_FCHDIR + if (fd != desired_fd && result != -1) + result = _gl_register_dup (fd, result); +# endif + return result; +} + +#else /* !HAVE_DUP2 */ + +/* On older platforms, dup2 did not exist. */ + +# ifndef F_DUPFD +static int +dupfd (int fd, int desired_fd) +{ + int duplicated_fd = dup (fd); + if (duplicated_fd < 0 || duplicated_fd == desired_fd) + return duplicated_fd; + else + { + int r = dupfd (fd, desired_fd); + int e = errno; + close (duplicated_fd); + errno = e; + return r; + } +} +# endif + +int +dup2 (int fd, int desired_fd) +{ + int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; + if (result == -1 || fd == desired_fd) + return result; + close (desired_fd); +# ifdef F_DUPFD + result = fcntl (fd, F_DUPFD, desired_fd); +# if REPLACE_FCHDIR + if (0 <= result) + result = _gl_register_dup (fd, result); +# endif +# else + result = dupfd (fd, desired_fd); +# endif + if (result == -1 && (errno == EMFILE || errno == EINVAL)) + errno = EBADF; + return result; +} +#endif /* !HAVE_DUP2 */ diff --git a/gl/lib/errno.in.h b/gl/lib/errno.in.h new file mode 100644 index 0000000..832afc8 --- /dev/null +++ b/gl/lib/errno.in.h @@ -0,0 +1,279 @@ +/* A POSIX-like . + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _@GUARD_PREFIX@_ERRNO_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_ERRNO_H@ + +#ifndef _@GUARD_PREFIX@_ERRNO_H +#define _@GUARD_PREFIX@_ERRNO_H + + +/* On native Windows platforms, many macros are not defined. */ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + +/* These are the same values as defined by MSVC 10, for interoperability. */ + +# ifndef ENOMSG +# define ENOMSG 122 +# define GNULIB_defined_ENOMSG 1 +# endif + +# ifndef EIDRM +# define EIDRM 111 +# define GNULIB_defined_EIDRM 1 +# endif + +# ifndef ENOLINK +# define ENOLINK 121 +# define GNULIB_defined_ENOLINK 1 +# endif + +# ifndef EPROTO +# define EPROTO 134 +# define GNULIB_defined_EPROTO 1 +# endif + +# ifndef EBADMSG +# define EBADMSG 104 +# define GNULIB_defined_EBADMSG 1 +# endif + +# ifndef EOVERFLOW +# define EOVERFLOW 132 +# define GNULIB_defined_EOVERFLOW 1 +# endif + +# ifndef ENOTSUP +# define ENOTSUP 129 +# define GNULIB_defined_ENOTSUP 1 +# endif + +# ifndef ENETRESET +# define ENETRESET 117 +# define GNULIB_defined_ENETRESET 1 +# endif + +# ifndef ECONNABORTED +# define ECONNABORTED 106 +# define GNULIB_defined_ECONNABORTED 1 +# endif + +# ifndef ECANCELED +# define ECANCELED 105 +# define GNULIB_defined_ECANCELED 1 +# endif + +# ifndef EOWNERDEAD +# define EOWNERDEAD 133 +# define GNULIB_defined_EOWNERDEAD 1 +# endif + +# ifndef ENOTRECOVERABLE +# define ENOTRECOVERABLE 127 +# define GNULIB_defined_ENOTRECOVERABLE 1 +# endif + +# ifndef EINPROGRESS +# define EINPROGRESS 112 +# define EALREADY 103 +# define ENOTSOCK 128 +# define EDESTADDRREQ 109 +# define EMSGSIZE 115 +# define EPROTOTYPE 136 +# define ENOPROTOOPT 123 +# define EPROTONOSUPPORT 135 +# define EOPNOTSUPP 130 +# define EAFNOSUPPORT 102 +# define EADDRINUSE 100 +# define EADDRNOTAVAIL 101 +# define ENETDOWN 116 +# define ENETUNREACH 118 +# define ECONNRESET 108 +# define ENOBUFS 119 +# define EISCONN 113 +# define ENOTCONN 126 +# define ETIMEDOUT 138 +# define ECONNREFUSED 107 +# define ELOOP 114 +# define EHOSTUNREACH 110 +# define EWOULDBLOCK 140 +# define GNULIB_defined_ESOCK 1 +# endif + +# ifndef ETXTBSY +# define ETXTBSY 139 +# define ENODATA 120 /* not required by POSIX */ +# define ENOSR 124 /* not required by POSIX */ +# define ENOSTR 125 /* not required by POSIX */ +# define ETIME 137 /* not required by POSIX */ +# define EOTHER 131 /* not required by POSIX */ +# define GNULIB_defined_ESTREAMS 1 +# endif + +/* These are intentionally the same values as the WSA* error numbers, defined + in . */ +# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ +# define EPFNOSUPPORT 10046 /* not required by POSIX */ +# define ESHUTDOWN 10058 /* not required by POSIX */ +# define ETOOMANYREFS 10059 /* not required by POSIX */ +# define EHOSTDOWN 10064 /* not required by POSIX */ +# define EPROCLIM 10067 /* not required by POSIX */ +# define EUSERS 10068 /* not required by POSIX */ +# define EDQUOT 10069 +# define ESTALE 10070 +# define EREMOTE 10071 /* not required by POSIX */ +# define GNULIB_defined_EWINSOCK 1 + +# endif + + +/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros + EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ +# if @EMULTIHOP_HIDDEN@ +# define EMULTIHOP @EMULTIHOP_VALUE@ +# define GNULIB_defined_EMULTIHOP 1 +# endif +# if @ENOLINK_HIDDEN@ +# define ENOLINK @ENOLINK_VALUE@ +# define GNULIB_defined_ENOLINK 1 +# endif +# if @EOVERFLOW_HIDDEN@ +# define EOVERFLOW @EOVERFLOW_VALUE@ +# define GNULIB_defined_EOVERFLOW 1 +# endif + + +/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, + EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. + Likewise, on NonStop Kernel, EDQUOT is not defined. + Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, + HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. + + Note: When one of these systems defines some of these macros some day, + binaries will have to be recompiled so that they recognizes the new + errno values from the system. */ + +# ifndef ENOMSG +# define ENOMSG 2000 +# define GNULIB_defined_ENOMSG 1 +# endif + +# ifndef EIDRM +# define EIDRM 2001 +# define GNULIB_defined_EIDRM 1 +# endif + +# ifndef ENOLINK +# define ENOLINK 2002 +# define GNULIB_defined_ENOLINK 1 +# endif + +# ifndef EPROTO +# define EPROTO 2003 +# define GNULIB_defined_EPROTO 1 +# endif + +# ifndef EMULTIHOP +# define EMULTIHOP 2004 +# define GNULIB_defined_EMULTIHOP 1 +# endif + +# ifndef EBADMSG +# define EBADMSG 2005 +# define GNULIB_defined_EBADMSG 1 +# endif + +# ifndef EOVERFLOW +# define EOVERFLOW 2006 +# define GNULIB_defined_EOVERFLOW 1 +# endif + +# ifndef ENOTSUP +# define ENOTSUP 2007 +# define GNULIB_defined_ENOTSUP 1 +# endif + +# ifndef ENETRESET +# define ENETRESET 2011 +# define GNULIB_defined_ENETRESET 1 +# endif + +# ifndef ECONNABORTED +# define ECONNABORTED 2012 +# define GNULIB_defined_ECONNABORTED 1 +# endif + +# ifndef ESTALE +# define ESTALE 2009 +# define GNULIB_defined_ESTALE 1 +# endif + +# ifndef EDQUOT +# define EDQUOT 2010 +# define GNULIB_defined_EDQUOT 1 +# endif + +# ifndef ECANCELED +# define ECANCELED 2008 +# define GNULIB_defined_ECANCELED 1 +# endif + +/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not + defined. */ + +# ifndef EOWNERDEAD +# if defined __sun + /* Use the same values as defined for Solaris >= 8, for + interoperability. */ +# define EOWNERDEAD 58 +# define ENOTRECOVERABLE 59 +# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* We have a conflict here: pthreads-win32 defines these values + differently than MSVC 10. It's hairy to decide which one to use. */ +# if defined __MINGW32__ && !defined USE_WINDOWS_THREADS + /* Use the same values as defined by pthreads-win32, for + interoperability. */ +# define EOWNERDEAD 43 +# define ENOTRECOVERABLE 44 +# else + /* Use the same values as defined by MSVC 10, for + interoperability. */ +# define EOWNERDEAD 133 +# define ENOTRECOVERABLE 127 +# endif +# else +# define EOWNERDEAD 2013 +# define ENOTRECOVERABLE 2014 +# endif +# define GNULIB_defined_EOWNERDEAD 1 +# 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/lib/error.c b/gl/lib/error.c new file mode 100644 index 0000000..31109df --- /dev/null +++ b/gl/lib/error.c @@ -0,0 +1,401 @@ +/* Error handler for noninteractive utilities + Copyright (C) 1990-1998, 2000-2007, 2009-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by David MacKenzie . */ + +#if !_LIBC +# include +#endif + +#include "error.h" + +#include +#include +#include +#include + +#if !_LIBC && ENABLE_NLS +# include "gettext.h" +# define _(msgid) gettext (msgid) +#endif + +#ifdef _LIBC +# include +# include +# include +# include +# define mbsrtowcs __mbsrtowcs +#endif + +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif + +#ifndef _ +# define _(String) String +#endif + +/* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +void (*error_print_progname) (void); + +/* This variable is incremented each time 'error' is called. */ +unsigned int error_message_count; + +#ifdef _LIBC +/* In the GNU C library, there is a predefined variable for this. */ + +# define program_name program_invocation_name +# include +# include +# include + +/* In GNU libc we want do not want to use the common name 'error' directly. + Instead make it a weak alias. */ +extern void __error (int status, int errnum, const char *message, ...) + __attribute__ ((__format__ (__printf__, 3, 4))); +extern void __error_at_line (int status, int errnum, const char *file_name, + unsigned int line_number, const char *message, + ...) + __attribute__ ((__format__ (__printf__, 5, 6)));; +# define error __error +# define error_at_line __error_at_line + +# include +# define fflush(s) INTUSE(_IO_fflush) (s) +# undef putc +# define putc(c, fp) INTUSE(_IO_putc) (c, fp) + +# include + +#else /* not _LIBC */ + +# include +# include + +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Get declarations of the native Windows API functions. */ +# define WIN32_LEAN_AND_MEAN +# include +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" +# endif + +/* The gnulib override of fcntl is not needed in this file. */ +# undef fcntl + +# if !HAVE_DECL_STRERROR_R +# ifndef HAVE_DECL_STRERROR_R +"this configure-time declaration test was not run" +# endif +# if STRERROR_R_CHAR_P +char *strerror_r (); +# else +int strerror_r (); +# endif +# endif + +/* The calling program should define program_name and set it to the + name of the executing program. */ +extern char *program_name; + +# if HAVE_STRERROR_R || defined strerror_r +# define __strerror_r strerror_r +# endif /* HAVE_STRERROR_R || defined strerror_r */ +#endif /* not _LIBC */ + +#if !_LIBC +/* Return non-zero if FD is open. */ +static int +is_open (int fd) +{ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* On native Windows: The initial state of unassigned standard file + descriptors is that they are open but point to an INVALID_HANDLE_VALUE. + There is no fcntl, and the gnulib replacement fcntl does not support + F_GETFL. */ + return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; +# else +# ifndef F_GETFL +# error Please port fcntl to your platform +# endif + return 0 <= fcntl (fd, F_GETFL); +# endif +} +#endif + +static void +flush_stdout (void) +{ +#if !_LIBC + int stdout_fd; + +# if GNULIB_FREOPEN_SAFER + /* Use of gnulib's freopen-safer module normally ensures that + fileno (stdout) == 1 + whenever stdout is open. */ + stdout_fd = STDOUT_FILENO; +# else + /* POSIX states that fileno (stdout) after fclose is unspecified. But in + practice it is not a problem, because stdout is statically allocated and + the fd of a FILE stream is stored as a field in its allocated memory. */ + stdout_fd = fileno (stdout); +# endif + /* POSIX states that fflush (stdout) after fclose is unspecified; it + is safe in glibc, but not on all other platforms. fflush (NULL) + is always defined, but too draconian. */ + if (0 <= stdout_fd && is_open (stdout_fd)) +#endif + fflush (stdout); +} + +static void +print_errno_message (int errnum) +{ + char const *s; + +#if defined HAVE_STRERROR_R || _LIBC + char errbuf[1024]; +# if STRERROR_R_CHAR_P || _LIBC + s = __strerror_r (errnum, errbuf, sizeof errbuf); +# else + if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) + s = errbuf; + else + s = 0; +# endif +#else + s = strerror (errnum); +#endif + +#if !_LIBC + if (! s) + s = _("Unknown system error"); +#endif + +#if _LIBC + __fxprintf (NULL, ": %s", s); +#else + fprintf (stderr, ": %s", s); +#endif +} + +static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3)) +error_tail (int status, int errnum, const char *message, va_list args) +{ +#if _LIBC + if (_IO_fwide (stderr, 0) > 0) + { +# define ALLOCA_LIMIT 2000 + size_t len = strlen (message) + 1; + wchar_t *wmessage = NULL; + mbstate_t st; + size_t res; + const char *tmp; + bool use_malloc = false; + + while (1) + { + if (__libc_use_alloca (len * sizeof (wchar_t))) + wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); + else + { + if (!use_malloc) + wmessage = NULL; + + wchar_t *p = (wchar_t *) realloc (wmessage, + len * sizeof (wchar_t)); + if (p == NULL) + { + free (wmessage); + fputws_unlocked (L"out of memory\n", stderr); + return; + } + wmessage = p; + use_malloc = true; + } + + memset (&st, '\0', sizeof (st)); + tmp = message; + + res = mbsrtowcs (wmessage, &tmp, len, &st); + if (res != len) + break; + + if (__builtin_expect (len >= SIZE_MAX / 2, 0)) + { + /* This really should not happen if everything is fine. */ + res = (size_t) -1; + break; + } + + len *= 2; + } + + if (res == (size_t) -1) + { + /* The string cannot be converted. */ + if (use_malloc) + { + free (wmessage); + use_malloc = false; + } + wmessage = (wchar_t *) L"???"; + } + + __vfwprintf (stderr, wmessage, args); + + if (use_malloc) + free (wmessage); + } + else +#endif + vfprintf (stderr, message, args); + va_end (args); + + ++error_message_count; + if (errnum) + print_errno_message (errnum); +#if _LIBC + __fxprintf (NULL, "\n"); +#else + putc ('\n', stderr); +#endif + fflush (stderr); + if (status) + exit (status); +} + + +/* Print the program name and error message MESSAGE, which is a printf-style + format string with optional args. + If ERRNUM is nonzero, print its corresponding system error message. + Exit with status STATUS if it is nonzero. */ +void +error (int status, int errnum, const char *message, ...) +{ + va_list args; + +#if defined _LIBC && defined __libc_ptf_call + /* We do not want this call to be cut short by a thread + cancellation. Therefore disable cancellation for now. */ + int state = PTHREAD_CANCEL_ENABLE; + __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), + 0); +#endif + + flush_stdout (); +#ifdef _LIBC + _IO_flockfile (stderr); +#endif + if (error_print_progname) + (*error_print_progname) (); + else + { +#if _LIBC + __fxprintf (NULL, "%s: ", program_name); +#else + fprintf (stderr, "%s: ", program_name); +#endif + } + + va_start (args, message); + error_tail (status, errnum, message, args); + +#ifdef _LIBC + _IO_funlockfile (stderr); +# ifdef __libc_ptf_call + __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); +# endif +#endif +} + +/* Sometimes we want to have at most one error per line. This + variable controls whether this mode is selected or not. */ +int error_one_per_line; + +void +error_at_line (int status, int errnum, const char *file_name, + unsigned int line_number, const char *message, ...) +{ + va_list args; + + if (error_one_per_line) + { + static const char *old_file_name; + static unsigned int old_line_number; + + if (old_line_number == line_number + && (file_name == old_file_name + || strcmp (old_file_name, file_name) == 0)) + /* Simply return and print nothing. */ + return; + + old_file_name = file_name; + old_line_number = line_number; + } + +#if defined _LIBC && defined __libc_ptf_call + /* We do not want this call to be cut short by a thread + cancellation. Therefore disable cancellation for now. */ + int state = PTHREAD_CANCEL_ENABLE; + __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), + 0); +#endif + + flush_stdout (); +#ifdef _LIBC + _IO_flockfile (stderr); +#endif + if (error_print_progname) + (*error_print_progname) (); + else + { +#if _LIBC + __fxprintf (NULL, "%s:", program_name); +#else + fprintf (stderr, "%s:", program_name); +#endif + } + +#if _LIBC + __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", + file_name, line_number); +#else + fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", + file_name, line_number); +#endif + + va_start (args, message); + error_tail (status, errnum, message, args); + +#ifdef _LIBC + _IO_funlockfile (stderr); +# ifdef __libc_ptf_call + __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); +# endif +#endif +} + +#ifdef _LIBC +/* Make the weak alias. */ +# undef error +# undef error_at_line +weak_alias (__error, error) +weak_alias (__error_at_line, error_at_line) +#endif diff --git a/gl/lib/error.h b/gl/lib/error.h new file mode 100644 index 0000000..4aaafb3 --- /dev/null +++ b/gl/lib/error.h @@ -0,0 +1,65 @@ +/* Declaration for error-reporting function + Copyright (C) 1995-1997, 2003, 2006, 2008-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _ERROR_H +#define _ERROR_H 1 + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The __-protected variants of the attributes 'format' and 'printf' are + accepted by gcc versions 2.6.4 (effectively 2.7) and later. + We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because + gnulib and libintl do '#define printf __printf__' when they override + the 'printf' function. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +#else +# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Print a message with 'fprintf (stderr, FORMAT, ...)'; + if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). + If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ + +extern void error (int __status, int __errnum, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); + +extern void error_at_line (int __status, int __errnum, const char *__fname, + unsigned int __lineno, const char *__format, ...) + _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6)); + +/* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +extern void (*error_print_progname) (void); + +/* This variable is incremented each time 'error' is called. */ +extern unsigned int error_message_count; + +/* Sometimes we want to have at most one error per line. This + variable controls whether this mode is selected or not. */ +extern int error_one_per_line; + +#ifdef __cplusplus +} +#endif + +#endif /* error.h */ diff --git a/gl/lib/euidaccess.c b/gl/lib/euidaccess.c new file mode 100644 index 0000000..363e6fe --- /dev/null +++ b/gl/lib/euidaccess.c @@ -0,0 +1,221 @@ +/* euidaccess -- check if effective user id can access file + + Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by David MacKenzie and Torbjorn Granlund. + Adapted for GNU C library by Roland McGrath. */ + +#ifndef _LIBC +# include +#endif + +#include +#include +#include +#include + +#include "root-uid.h" + +#if HAVE_LIBGEN_H +# include +#endif + +#include +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif + +#if defined EACCES && !defined EACCESS +# define EACCESS EACCES +#endif + +#ifndef F_OK +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 +#endif + + +#ifdef _LIBC + +# define access __access +# define getuid __getuid +# define getgid __getgid +# define geteuid __geteuid +# define getegid __getegid +# define group_member __group_member +# define euidaccess __euidaccess +# undef stat +# define stat stat64 + +#endif + +/* Return 0 if the user has permission of type MODE on FILE; + otherwise, return -1 and set 'errno'. + Like access, except that it uses the effective user and group + id's instead of the real ones, and it does not always check for read-only + file system, text busy, etc. */ + +int +euidaccess (const char *file, int mode) +{ +#if HAVE_FACCESSAT /* glibc, AIX 7, Solaris 11, Cygwin 1.7 */ + return faccessat (AT_FDCWD, file, mode, AT_EACCESS); +#elif defined EFF_ONLY_OK /* IRIX, OSF/1, Interix */ + return access (file, mode | EFF_ONLY_OK); +#elif defined ACC_SELF /* AIX */ + return accessx (file, mode, ACC_SELF); +#elif HAVE_EACCESS /* FreeBSD */ + return eaccess (file, mode); +#else /* Mac OS X, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, mingw, BeOS */ + + uid_t uid = getuid (); + gid_t gid = getgid (); + uid_t euid = geteuid (); + gid_t egid = getegid (); + struct stat stats; + +# if HAVE_DECL_SETREGID && PREFER_NONREENTRANT_EUIDACCESS + + /* Define PREFER_NONREENTRANT_EUIDACCESS if you prefer euidaccess to + return the correct result even if this would make it + nonreentrant. Define this only if your entire application is + safe even if the uid or gid might temporarily change. If your + application uses signal handlers or threads it is probably not + safe. */ + + if (mode == F_OK) + return stat (file, &stats); + else + { + int result; + int saved_errno; + + if (uid != euid) + setreuid (euid, uid); + if (gid != egid) + setregid (egid, gid); + + result = access (file, mode); + saved_errno = errno; + + /* Restore them. */ + if (uid != euid) + setreuid (uid, euid); + if (gid != egid) + setregid (gid, egid); + + errno = saved_errno; + return result; + } + +# else + + /* The following code assumes the traditional Unix model, and is not + correct on systems that have ACLs or the like. However, it's + better than nothing, and it is reentrant. */ + + unsigned int granted; + if (uid == euid && gid == egid) + /* If we are not set-uid or set-gid, access does the same. */ + return access (file, mode); + + if (stat (file, &stats) != 0) + return -1; + + /* The super-user can read and write any file, and execute any file + that anyone can execute. */ + if (euid == ROOT_UID + && ((mode & X_OK) == 0 + || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))) + return 0; + + /* Convert the mode to traditional form, clearing any bogus bits. */ + if (R_OK == 4 && W_OK == 2 && X_OK == 1 && F_OK == 0) + mode &= 7; + else + mode = ((mode & R_OK ? 4 : 0) + + (mode & W_OK ? 2 : 0) + + (mode & X_OK ? 1 : 0)); + + if (mode == 0) + return 0; /* The file exists. */ + + /* Convert the file's permission bits to traditional form. */ + if (S_IRUSR == (4 << 6) && S_IWUSR == (2 << 6) && S_IXUSR == (1 << 6) + && S_IRGRP == (4 << 3) && S_IWGRP == (2 << 3) && S_IXGRP == (1 << 3) + && S_IROTH == (4 << 0) && S_IWOTH == (2 << 0) && S_IXOTH == (1 << 0)) + granted = stats.st_mode; + else + granted = ((stats.st_mode & S_IRUSR ? 4 << 6 : 0) + + (stats.st_mode & S_IWUSR ? 2 << 6 : 0) + + (stats.st_mode & S_IXUSR ? 1 << 6 : 0) + + (stats.st_mode & S_IRGRP ? 4 << 3 : 0) + + (stats.st_mode & S_IWGRP ? 2 << 3 : 0) + + (stats.st_mode & S_IXGRP ? 1 << 3 : 0) + + (stats.st_mode & S_IROTH ? 4 << 0 : 0) + + (stats.st_mode & S_IWOTH ? 2 << 0 : 0) + + (stats.st_mode & S_IXOTH ? 1 << 0 : 0)); + + if (euid == stats.st_uid) + granted >>= 6; + else if (egid == stats.st_gid || group_member (stats.st_gid)) + granted >>= 3; + + if ((mode & ~granted) == 0) + return 0; + __set_errno (EACCESS); + return -1; + +# endif +#endif +} +#undef euidaccess +#ifdef weak_alias +weak_alias (__euidaccess, euidaccess) +#endif + +#ifdef TEST +# include +# include +# include + +char *program_name; + +int +main (int argc, char **argv) +{ + char *file; + int mode; + int err; + + program_name = argv[0]; + if (argc < 3) + abort (); + file = argv[1]; + mode = atoi (argv[2]); + + err = euidaccess (file, mode); + printf ("%d\n", err); + if (err != 0) + error (0, errno, "%s", file); + exit (0); +} +#endif diff --git a/gl/lib/exitfail.c b/gl/lib/exitfail.c new file mode 100644 index 0000000..609afc5 --- /dev/null +++ b/gl/lib/exitfail.c @@ -0,0 +1,24 @@ +/* Failure exit status + + Copyright (C) 2002-2003, 2005-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "exitfail.h" + +#include + +int volatile exit_failure = EXIT_FAILURE; diff --git a/gl/lib/exitfail.h b/gl/lib/exitfail.h new file mode 100644 index 0000000..66807d5 --- /dev/null +++ b/gl/lib/exitfail.h @@ -0,0 +1,18 @@ +/* Failure exit status + + Copyright (C) 2002, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +extern int volatile exit_failure; diff --git a/gl/lib/faccessat.c b/gl/lib/faccessat.c new file mode 100644 index 0000000..44a38ae --- /dev/null +++ b/gl/lib/faccessat.c @@ -0,0 +1,45 @@ +/* Check the access rights of a file relative to an open directory. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Eric Blake */ + +#include + +#include +#include + +#ifndef HAVE_ACCESS +/* Mingw lacks access, but it also lacks real vs. effective ids, so + the gnulib euidaccess module is good enough. */ +# undef access +# define access euidaccess +#endif + +/* Invoke access or euidaccess on file, FILE, using mode MODE, in the directory + open on descriptor FD. If possible, do it without changing the + working directory. Otherwise, resort to using save_cwd/fchdir, then + (access|euidaccess)/restore_cwd. If either the save_cwd or the + restore_cwd fails, then give a diagnostic and exit nonzero. + Note that this implementation only supports AT_EACCESS, although some + native versions also support AT_SYMLINK_NOFOLLOW. */ + +#define AT_FUNC_NAME faccessat +#define AT_FUNC_F1 euidaccess +#define AT_FUNC_F2 access +#define AT_FUNC_USE_F1_COND AT_EACCESS +#define AT_FUNC_POST_FILE_PARAM_DECLS , int mode, int flag +#define AT_FUNC_POST_FILE_ARGS , mode +#include "at-func.c" diff --git a/gl/lib/fchdir.c b/gl/lib/fchdir.c new file mode 100644 index 0000000..5d71377 --- /dev/null +++ b/gl/lib/fchdir.c @@ -0,0 +1,208 @@ +/* fchdir replacement. + Copyright (C) 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dosname.h" +#include "filenamecat.h" + +#ifndef REPLACE_OPEN_DIRECTORY +# define REPLACE_OPEN_DIRECTORY 0 +#endif + +/* This replacement assumes that a directory is not renamed while opened + through a file descriptor. + + FIXME: On mingw, this would be possible to enforce if we were to + also open a HANDLE to each directory currently visited by a file + descriptor, since mingw refuses to rename any in-use file system + object. */ + +/* Array of file descriptors opened. If REPLACE_OPEN_DIRECTORY or if it points + to a directory, it stores info about this directory. */ +typedef struct +{ + char *name; /* Absolute name of the directory, or NULL. */ + /* FIXME - add a DIR* member to make dirfd possible on mingw? */ +} dir_info_t; +static dir_info_t *dirs; +static size_t dirs_allocated; + +/* Try to ensure dirs has enough room for a slot at index fd; free any + contents already in that slot. Return false and set errno to + ENOMEM on allocation failure. */ +static bool +ensure_dirs_slot (size_t fd) +{ + if (fd < dirs_allocated) + free (dirs[fd].name); + else + { + size_t new_allocated; + dir_info_t *new_dirs; + + new_allocated = 2 * dirs_allocated + 1; + if (new_allocated <= fd) + new_allocated = fd + 1; + new_dirs = + (dirs != NULL + ? (dir_info_t *) realloc (dirs, new_allocated * sizeof *dirs) + : (dir_info_t *) malloc (new_allocated * sizeof *dirs)); + if (new_dirs == NULL) + return false; + memset (new_dirs + dirs_allocated, 0, + (new_allocated - dirs_allocated) * sizeof *dirs); + dirs = new_dirs; + dirs_allocated = new_allocated; + } + return true; +} + +/* Return an absolute name of DIR in malloc'd storage. */ +static char * +get_name (char const *dir) +{ + char *cwd; + char *result; + int saved_errno; + + if (IS_ABSOLUTE_FILE_NAME (dir)) + return strdup (dir); + + /* We often encounter "."; treat it as a special case. */ + cwd = getcwd (NULL, 0); + if (!cwd || (dir[0] == '.' && dir[1] == '\0')) + return cwd; + + result = mfile_name_concat (cwd, dir, NULL); + saved_errno = errno; + free (cwd); + errno = saved_errno; + return result; +} + +/* Hook into the gnulib replacements for open() and close() to keep track + of the open file descriptors. */ + +/* Close FD, cleaning up any fd to name mapping if fd was visiting a + directory. */ +void +_gl_unregister_fd (int fd) +{ + if (fd >= 0 && fd < dirs_allocated) + { + free (dirs[fd].name); + dirs[fd].name = NULL; + } +} + +/* Mark FD as visiting FILENAME. FD must be non-negative, and refer + to an open file descriptor. If REPLACE_OPEN_DIRECTORY is non-zero, + this should only be called if FD is visiting a directory. Close FD + and return -1 if there is insufficient memory to track the + directory name; otherwise return FD. */ +int +_gl_register_fd (int fd, const char *filename) +{ + struct stat statbuf; + + assert (0 <= fd); + if (REPLACE_OPEN_DIRECTORY + || (fstat (fd, &statbuf) == 0 && S_ISDIR (statbuf.st_mode))) + { + if (!ensure_dirs_slot (fd) + || (dirs[fd].name = get_name (filename)) == NULL) + { + int saved_errno = errno; + close (fd); + errno = saved_errno; + return -1; + } + } + return fd; +} + +/* Mark NEWFD as a duplicate of OLDFD; useful from dup, dup2, dup3, + and fcntl. Both arguments must be valid and distinct file + descriptors. Close NEWFD and return -1 if OLDFD is tracking a + directory, but there is insufficient memory to track the same + directory in NEWFD; otherwise return NEWFD. */ +int +_gl_register_dup (int oldfd, int newfd) +{ + assert (0 <= oldfd && 0 <= newfd && oldfd != newfd); + if (oldfd < dirs_allocated && dirs[oldfd].name) + { + /* Duplicated a directory; must ensure newfd is allocated. */ + if (!ensure_dirs_slot (newfd) + || (dirs[newfd].name = strdup (dirs[oldfd].name)) == NULL) + { + int saved_errno = errno; + close (newfd); + errno = saved_errno; + newfd = -1; + } + } + else if (newfd < dirs_allocated) + { + /* Duplicated a non-directory; ensure newfd is cleared. */ + free (dirs[newfd].name); + dirs[newfd].name = NULL; + } + return newfd; +} + +/* If FD is currently visiting a directory, then return the name of + that directory. Otherwise, return NULL and set errno. */ +const char * +_gl_directory_name (int fd) +{ + if (0 <= fd && fd < dirs_allocated && dirs[fd].name != NULL) + return dirs[fd].name; + /* At this point, fd is either invalid, or open but not a directory. + If dup2 fails, errno is correctly EBADF. */ + if (0 <= fd) + { + if (dup2 (fd, fd) == fd) + errno = ENOTDIR; + } + else + errno = EBADF; + return NULL; +} + + +/* Implement fchdir() in terms of chdir(). */ + +int +fchdir (int fd) +{ + const char *name = _gl_directory_name (fd); + return name ? chdir (name) : -1; +} diff --git a/gl/lib/fcntl--.h b/gl/lib/fcntl--.h new file mode 100644 index 0000000..37be26c --- /dev/null +++ b/gl/lib/fcntl--.h @@ -0,0 +1,32 @@ +/* Like fcntl.h, but redefine some names to avoid glitches. + + Copyright (C) 2005, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include +#include "fcntl-safer.h" + +#undef open +#define open open_safer + +#undef creat +#define creat creat_safer + +#if GNULIB_OPENAT_SAFER +# undef openat +# define openat openat_safer +#endif diff --git a/gl/lib/fcntl-safer.h b/gl/lib/fcntl-safer.h new file mode 100644 index 0000000..73b7ad7 --- /dev/null +++ b/gl/lib/fcntl-safer.h @@ -0,0 +1,27 @@ +/* Invoke fcntl-like functions, but avoid some glitches. + + Copyright (C) 2005, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include + +int open_safer (char const *, int, ...); +int creat_safer (char const *, mode_t); + +#if GNULIB_OPENAT_SAFER +int openat_safer (int, char const *, int, ...); +#endif diff --git a/gl/lib/fcntl.c b/gl/lib/fcntl.c new file mode 100644 index 0000000..54f7486 --- /dev/null +++ b/gl/lib/fcntl.c @@ -0,0 +1,311 @@ +/* Provide file descriptor control. + + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include +#include + +#if !HAVE_FCNTL +# define rpl_fcntl fcntl +#endif +#undef fcntl + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Get declarations of the native Windows API functions. */ +# define WIN32_LEAN_AND_MEAN +# include + +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" + +/* Upper bound on getdtablesize(). See lib/getdtablesize.c. */ +# define OPEN_MAX_MAX 0x10000 + +/* Duplicate OLDFD into the first available slot of at least NEWFD, + which must be positive, with FLAGS determining whether the duplicate + will be inheritable. */ +static int +dupfd (int oldfd, int newfd, int flags) +{ + /* Mingw has no way to create an arbitrary fd. Iterate until all + file descriptors less than newfd are filled up. */ + HANDLE curr_process = GetCurrentProcess (); + HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd); + unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT]; + unsigned int fds_to_close_bound = 0; + int result; + BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE; + int mode; + + if (newfd < 0 || getdtablesize () <= newfd) + { + errno = EINVAL; + return -1; + } + if (old_handle == INVALID_HANDLE_VALUE + || (mode = setmode (oldfd, O_BINARY)) == -1) + { + /* oldfd is not open, or is an unassigned standard file + descriptor. */ + errno = EBADF; + return -1; + } + setmode (oldfd, mode); + flags |= mode; + + for (;;) + { + HANDLE new_handle; + int duplicated_fd; + unsigned int index; + + if (!DuplicateHandle (curr_process, /* SourceProcessHandle */ + old_handle, /* SourceHandle */ + curr_process, /* TargetProcessHandle */ + (PHANDLE) &new_handle, /* TargetHandle */ + (DWORD) 0, /* DesiredAccess */ + inherit, /* InheritHandle */ + DUPLICATE_SAME_ACCESS)) /* Options */ + { + /* TODO: Translate GetLastError () into errno. */ + errno = EMFILE; + result = -1; + break; + } + duplicated_fd = _open_osfhandle ((intptr_t) new_handle, flags); + if (duplicated_fd < 0) + { + CloseHandle (new_handle); + errno = EMFILE; + result = -1; + break; + } + if (newfd <= duplicated_fd) + { + result = duplicated_fd; + break; + } + + /* Set the bit duplicated_fd in fds_to_close[]. */ + index = (unsigned int) duplicated_fd / CHAR_BIT; + if (fds_to_close_bound <= index) + { + if (sizeof fds_to_close <= index) + /* Need to increase OPEN_MAX_MAX. */ + abort (); + memset (fds_to_close + fds_to_close_bound, '\0', + index + 1 - fds_to_close_bound); + fds_to_close_bound = index + 1; + } + fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT); + } + + /* Close the previous fds that turned out to be too small. */ + { + int saved_errno = errno; + unsigned int duplicated_fd; + + for (duplicated_fd = 0; + duplicated_fd < fds_to_close_bound * CHAR_BIT; + duplicated_fd++) + if ((fds_to_close[duplicated_fd / CHAR_BIT] + >> (duplicated_fd % CHAR_BIT)) + & 1) + close (duplicated_fd); + + errno = saved_errno; + } + +# if REPLACE_FCHDIR + if (0 <= result) + result = _gl_register_dup (oldfd, result); +# endif + return result; +} +#endif /* W32 */ + +/* Perform the specified ACTION on the file descriptor FD, possibly + using the argument ARG further described below. This replacement + handles the following actions, and forwards all others on to the + native fcntl. An unrecognized ACTION returns -1 with errno set to + EINVAL. + + F_DUPFD - duplicate FD, with int ARG being the minimum target fd. + If successful, return the duplicate, which will be inheritable; + otherwise return -1 and set errno. + + F_DUPFD_CLOEXEC - duplicate FD, with int ARG being the minimum + target fd. If successful, return the duplicate, which will not be + inheritable; otherwise return -1 and set errno. + + F_GETFD - ARG need not be present. If successful, return a + non-negative value containing the descriptor flags of FD (only + FD_CLOEXEC is portable, but other flags may be present); otherwise + return -1 and set errno. */ + +int +rpl_fcntl (int fd, int action, /* arg */...) +{ + va_list arg; + int result = -1; + va_start (arg, action); + switch (action) + { + +#if !HAVE_FCNTL + case F_DUPFD: + { + int target = va_arg (arg, int); + result = dupfd (fd, target, 0); + break; + } +#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR + case F_DUPFD: + { + int target = va_arg (arg, int); + /* Detect invalid target; needed for cygwin 1.5.x. */ + if (target < 0 || getdtablesize () <= target) + errno = EINVAL; + else + { + /* Haiku alpha 2 loses fd flags on original. */ + int flags = fcntl (fd, F_GETFD); + if (flags < 0) + { + result = -1; + break; + } + result = fcntl (fd, action, target); + if (0 <= result && fcntl (fd, F_SETFD, flags) == -1) + { + int saved_errno = errno; + close (result); + result = -1; + errno = saved_errno; + } +# if REPLACE_FCHDIR + if (0 <= result) + result = _gl_register_dup (fd, result); +# endif + } + break; + } /* F_DUPFD */ +#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */ + + case F_DUPFD_CLOEXEC: + { + int target = va_arg (arg, int); + +#if !HAVE_FCNTL + result = dupfd (fd, target, O_CLOEXEC); + break; +#else /* HAVE_FCNTL */ + /* Try the system call first, if the headers claim it exists + (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we + may be running with a glibc that has the macro but with an + older kernel that does not support it. Cache the + information on whether the system call really works, but + avoid caching failure if the corresponding F_DUPFD fails + for any reason. 0 = unknown, 1 = yes, -1 = no. */ + static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0; + if (0 <= have_dupfd_cloexec) + { + result = fcntl (fd, action, target); + if (0 <= result || errno != EINVAL) + { + have_dupfd_cloexec = 1; +# if REPLACE_FCHDIR + if (0 <= result) + result = _gl_register_dup (fd, result); +# endif + } + else + { + result = rpl_fcntl (fd, F_DUPFD, target); + if (result < 0) + break; + have_dupfd_cloexec = -1; + } + } + else + result = rpl_fcntl (fd, F_DUPFD, target); + if (0 <= result && have_dupfd_cloexec == -1) + { + int flags = fcntl (result, F_GETFD); + if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1) + { + int saved_errno = errno; + close (result); + errno = saved_errno; + result = -1; + } + } + break; +#endif /* HAVE_FCNTL */ + } /* F_DUPFD_CLOEXEC */ + +#if !HAVE_FCNTL + case F_GETFD: + { +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + HANDLE handle = (HANDLE) _get_osfhandle (fd); + DWORD flags; + if (handle == INVALID_HANDLE_VALUE + || GetHandleInformation (handle, &flags) == 0) + errno = EBADF; + else + result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC; +# else /* !W32 */ + /* Use dup2 to reject invalid file descriptors. No way to + access this information, so punt. */ + if (0 <= dup2 (fd, fd)) + result = 0; +# endif /* !W32 */ + break; + } /* F_GETFD */ +#endif /* !HAVE_FCNTL */ + + /* Implementing F_SETFD on mingw is not trivial - there is no + API for changing the O_NOINHERIT bit on an fd, and merely + changing the HANDLE_FLAG_INHERIT bit on the underlying handle + can lead to odd state. It may be possible by duplicating the + handle, using _open_osfhandle with the right flags, then + using dup2 to move the duplicate onto the original, but that + is not supported for now. */ + + default: + { +#if HAVE_FCNTL + void *p = va_arg (arg, void *); + result = fcntl (fd, action, p); +#else + errno = EINVAL; +#endif + break; + } + } + va_end (arg); + return result; +} diff --git a/gl/lib/fcntl.in.h b/gl/lib/fcntl.in.h new file mode 100644 index 0000000..99f75e6 --- /dev/null +++ b/gl/lib/fcntl.in.h @@ -0,0 +1,347 @@ +/* Like , but with non-working flags defined to 0. + + Copyright (C) 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Paul Eggert */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined __need_system_fcntl_h +/* Special invocation convention. */ + +/* Needed before . + May also define off_t to a 64-bit type on native Windows. */ +#include +/* On some systems other than glibc, is a prerequisite of + . On glibc systems, we would like to avoid namespace pollution. + But on glibc systems, includes inside an + extern "C" { ... } block, which leads to errors in C++ mode with the + overridden from gnulib. These errors are known to be gone + with g++ version >= 4.3. */ +#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) +# include +#endif +#@INCLUDE_NEXT@ @NEXT_FCNTL_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_FCNTL_H + +/* Needed before . + May also define off_t to a 64-bit type on native Windows. */ +#include +/* On some systems other than glibc, is a prerequisite of + . On glibc systems, we would like to avoid namespace pollution. + But on glibc systems, includes inside an + extern "C" { ... } block, which leads to errors in C++ mode with the + overridden from gnulib. These errors are known to be gone + with g++ version >= 4.3. */ +#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) +# include +#endif +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_FCNTL_H@ + +#ifndef _@GUARD_PREFIX@_FCNTL_H +#define _@GUARD_PREFIX@_FCNTL_H + +#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ +# include +#endif + +/* Native Windows platforms declare open(), creat() in . */ +#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ + && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +# include +#endif + + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +/* Declare overridden functions. */ + +#if @GNULIB_FCNTL@ +# if @REPLACE_FCNTL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcntl +# define fcntl rpl_fcntl +# endif +_GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...)); +_GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...)); +# else +# if !@HAVE_FCNTL@ +_GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...)); +# endif +_GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...)); +# endif +_GL_CXXALIASWARN (fcntl); +#elif defined GNULIB_POSIXCHECK +# undef fcntl +# if HAVE_RAW_DECL_FCNTL +_GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " + "use gnulib module fcntl for portability"); +# endif +#endif + +#if @GNULIB_OPEN@ +# if @REPLACE_OPEN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef open +# define open rpl_open +# endif +_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); +# else +_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); +# endif +/* On HP-UX 11, in C++ mode, open() is defined as an inline function with a + default argument. _GL_CXXALIASWARN does not work in this case. */ +# if !defined __hpux +_GL_CXXALIASWARN (open); +# endif +#elif defined GNULIB_POSIXCHECK +# undef open +/* Assume open is always declared. */ +_GL_WARN_ON_USE (open, "open is not always POSIX compliant - " + "use gnulib module open for portability"); +#endif + +#if @GNULIB_OPENAT@ +# if @REPLACE_OPENAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef openat +# define openat rpl_openat +# endif +_GL_FUNCDECL_RPL (openat, int, + (int fd, char const *file, int flags, /* mode_t mode */ ...) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (openat, int, + (int fd, char const *file, int flags, /* mode_t mode */ ...)); +# else +# if !@HAVE_OPENAT@ +_GL_FUNCDECL_SYS (openat, int, + (int fd, char const *file, int flags, /* mode_t mode */ ...) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (openat, int, + (int fd, char const *file, int flags, /* mode_t mode */ ...)); +# endif +_GL_CXXALIASWARN (openat); +#elif defined GNULIB_POSIXCHECK +# undef openat +# if HAVE_RAW_DECL_OPENAT +_GL_WARN_ON_USE (openat, "openat is not portable - " + "use gnulib module openat for portability"); +# endif +#endif + + +/* Fix up the FD_* macros, only known to be missing on mingw. */ + +#ifndef FD_CLOEXEC +# define FD_CLOEXEC 1 +#endif + +/* Fix up the supported F_* macros. Intentionally leave other F_* + macros undefined. Only known to be missing on mingw. */ + +#ifndef F_DUPFD_CLOEXEC +# define F_DUPFD_CLOEXEC 0x40000000 +/* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */ +# define GNULIB_defined_F_DUPFD_CLOEXEC 1 +#else +# define GNULIB_defined_F_DUPFD_CLOEXEC 0 +#endif + +#ifndef F_DUPFD +# define F_DUPFD 1 +#endif + +#ifndef F_GETFD +# define F_GETFD 2 +#endif + +/* Fix up the O_* macros. */ + +#if !defined O_DIRECT && defined O_DIRECTIO +/* Tru64 spells it 'O_DIRECTIO'. */ +# define O_DIRECT O_DIRECTIO +#endif + +#if !defined O_CLOEXEC && defined O_NOINHERIT +/* Mingw spells it 'O_NOINHERIT'. */ +# define O_CLOEXEC O_NOINHERIT +#endif + +#ifndef O_CLOEXEC +# define O_CLOEXEC 0 +#endif + +#ifndef O_DIRECT +# define O_DIRECT 0 +#endif + +#ifndef O_DIRECTORY +# define O_DIRECTORY 0 +#endif + +#ifndef O_DSYNC +# define O_DSYNC 0 +#endif + +#ifndef O_EXEC +# 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 + +#ifndef O_NOATIME +# define O_NOATIME 0 +#endif + +#ifndef O_NONBLOCK +# define O_NONBLOCK O_NDELAY +#endif + +/* If the gnulib module 'nonblocking' is in use, guarantee a working non-zero + value of O_NONBLOCK. Otherwise, O_NONBLOCK is defined (above) to O_NDELAY + or to 0 as fallback. */ +#if @GNULIB_NONBLOCKING@ +# if O_NONBLOCK +# define GNULIB_defined_O_NONBLOCK 0 +# else +# define GNULIB_defined_O_NONBLOCK 1 +# undef O_NONBLOCK +# define O_NONBLOCK 0x40000000 +# endif +#endif + +#ifndef O_NOCTTY +# define O_NOCTTY 0 +#endif + +#ifndef O_NOFOLLOW +# 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 + +#ifndef O_SEARCH +# define O_SEARCH O_RDONLY /* This is often close enough in older systems. */ +#endif + +#ifndef O_SYNC +# define O_SYNC 0 +#endif + +#ifndef O_TTY_INIT +# define O_TTY_INIT 0 +#endif + +#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 + +/* For systems that distinguish between text and binary I/O. + O_BINARY is usually declared in fcntl.h */ +#if !defined O_BINARY && defined _O_BINARY + /* For MSC-compatible compilers. */ +# define O_BINARY _O_BINARY +# define O_TEXT _O_TEXT +#endif + +#if defined __BEOS__ || defined __HAIKU__ + /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */ +# undef O_BINARY +# undef O_TEXT +#endif + +#ifndef O_BINARY +# define O_BINARY 0 +# define O_TEXT 0 +#endif + +/* Fix up the AT_* macros. */ + +/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its + value exceeds INT_MAX, so its use as an int doesn't conform to the + C standard, and GCC and Sun C complain in some cases. If the bug + is present, undef AT_FDCWD here, so it can be redefined below. */ +#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 +# undef AT_FDCWD +#endif + +/* Use the same bit pattern as Solaris 9, but with the proper + signedness. The bit pattern is important, in case this actually is + Solaris with the above workaround. */ +#ifndef AT_FDCWD +# define AT_FDCWD (-3041965) +#endif + +/* Use the same values as Solaris 9. This shouldn't matter, but + there's no real reason to differ. */ +#ifndef AT_SYMLINK_NOFOLLOW +# define AT_SYMLINK_NOFOLLOW 4096 +#endif + +#ifndef AT_REMOVEDIR +# define AT_REMOVEDIR 1 +#endif + +/* Solaris 9 lacks these two, so just pick unique values. */ +#ifndef AT_SYMLINK_FOLLOW +# define AT_SYMLINK_FOLLOW 2 +#endif + +#ifndef AT_EACCESS +# define AT_EACCESS 4 +#endif + + +#endif /* _@GUARD_PREFIX@_FCNTL_H */ +#endif /* _@GUARD_PREFIX@_FCNTL_H */ +#endif diff --git a/gl/lib/fd-hook.c b/gl/lib/fd-hook.c new file mode 100644 index 0000000..0171cc6 --- /dev/null +++ b/gl/lib/fd-hook.c @@ -0,0 +1,116 @@ +/* Hook for making making file descriptor functions close(), ioctl() extensible. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2009. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "fd-hook.h" + +#include + +/* Currently, this entire code is only needed for the handling of sockets + on native Windows platforms. */ +#if WINDOWS_SOCKETS + +/* The first and last link in the doubly linked list. + Initially the list is empty. */ +static struct fd_hook anchor = { &anchor, &anchor, NULL, NULL }; + +int +execute_close_hooks (const struct fd_hook *remaining_list, gl_close_fn primary, + int fd) +{ + if (remaining_list == &anchor) + /* End of list reached. */ + return primary (fd); + else + return remaining_list->private_close_fn (remaining_list->private_next, + primary, fd); +} + +int +execute_all_close_hooks (gl_close_fn primary, int fd) +{ + return execute_close_hooks (anchor.private_next, primary, fd); +} + +int +execute_ioctl_hooks (const struct fd_hook *remaining_list, gl_ioctl_fn primary, + int fd, int request, void *arg) +{ + if (remaining_list == &anchor) + /* End of list reached. */ + return primary (fd, request, arg); + else + return remaining_list->private_ioctl_fn (remaining_list->private_next, + primary, fd, request, arg); +} + +int +execute_all_ioctl_hooks (gl_ioctl_fn primary, + int fd, int request, void *arg) +{ + return execute_ioctl_hooks (anchor.private_next, primary, fd, request, arg); +} + +void +register_fd_hook (close_hook_fn close_hook, ioctl_hook_fn ioctl_hook, struct fd_hook *link) +{ + if (close_hook == NULL) + close_hook = execute_close_hooks; + if (ioctl_hook == NULL) + ioctl_hook = execute_ioctl_hooks; + + if (link->private_next == NULL && link->private_prev == NULL) + { + /* Add the link to the doubly linked list. */ + link->private_next = anchor.private_next; + link->private_prev = &anchor; + link->private_close_fn = close_hook; + link->private_ioctl_fn = ioctl_hook; + anchor.private_next->private_prev = link; + anchor.private_next = link; + } + else + { + /* The link is already in use. */ + if (link->private_close_fn != close_hook + || link->private_ioctl_fn != ioctl_hook) + abort (); + } +} + +void +unregister_fd_hook (struct fd_hook *link) +{ + struct fd_hook *next = link->private_next; + struct fd_hook *prev = link->private_prev; + + if (next != NULL && prev != NULL) + { + /* The link is in use. Remove it from the doubly linked list. */ + prev->private_next = next; + next->private_prev = prev; + /* Clear the link, to mark it unused. */ + link->private_next = NULL; + link->private_prev = NULL; + link->private_close_fn = NULL; + link->private_ioctl_fn = NULL; + } +} + +#endif diff --git a/gl/lib/fd-hook.h b/gl/lib/fd-hook.h new file mode 100644 index 0000000..1aa264e --- /dev/null +++ b/gl/lib/fd-hook.h @@ -0,0 +1,119 @@ +/* Hook for making making file descriptor functions close(), ioctl() extensible. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + +#ifndef FD_HOOK_H +#define FD_HOOK_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Currently, this entire code is only needed for the handling of sockets + on native Windows platforms. */ +#if WINDOWS_SOCKETS + + +/* Type of function that closes FD. */ +typedef int (*gl_close_fn) (int fd); + +/* Type of function that applies a control request to FD. */ +typedef int (*gl_ioctl_fn) (int fd, int request, void *arg); + +/* An element of the list of file descriptor hooks. + In CLOS (Common Lisp Object System) speak, it consists of an "around" + method for the close() function and an "around" method for the ioctl() + function. + The fields of this structure are considered private. */ +struct fd_hook +{ + /* Doubly linked list. */ + struct fd_hook *private_next; + struct fd_hook *private_prev; + /* Function that treats the types of FD that it knows about and calls + execute_close_hooks (REMAINING_LIST, PRIMARY, FD) as a fallback. */ + int (*private_close_fn) (const struct fd_hook *remaining_list, + gl_close_fn primary, + int fd); + /* Function that treats the types of FD that it knows about and calls + execute_ioctl_hooks (REMAINING_LIST, PRIMARY, FD, REQUEST, ARG) as a + fallback. */ + int (*private_ioctl_fn) (const struct fd_hook *remaining_list, + gl_ioctl_fn primary, + int fd, int request, void *arg); +}; + +/* This type of function closes FD, applying special knowledge for the FD + types it knows about, and calls + execute_close_hooks (REMAINING_LIST, PRIMARY, FD) + for the other FD types. + In CLOS speak, REMAINING_LIST is the remaining list of "around" methods, + and PRIMARY is the "primary" method for close(). */ +typedef int (*close_hook_fn) (const struct fd_hook *remaining_list, + gl_close_fn primary, + int fd); + +/* Execute the close hooks in REMAINING_LIST, with PRIMARY as "primary" method. + Return 0 or -1, like close() would do. */ +extern int execute_close_hooks (const struct fd_hook *remaining_list, + gl_close_fn primary, + int fd); + +/* Execute all close hooks, with PRIMARY as "primary" method. + Return 0 or -1, like close() would do. */ +extern int execute_all_close_hooks (gl_close_fn primary, int fd); + +/* This type of function applies a control request to FD, applying special + knowledge for the FD types it knows about, and calls + execute_ioctl_hooks (REMAINING_LIST, PRIMARY, FD, REQUEST, ARG) + for the other FD types. + In CLOS speak, REMAINING_LIST is the remaining list of "around" methods, + and PRIMARY is the "primary" method for ioctl(). */ +typedef int (*ioctl_hook_fn) (const struct fd_hook *remaining_list, + gl_ioctl_fn primary, + int fd, int request, void *arg); + +/* Execute the ioctl hooks in REMAINING_LIST, with PRIMARY as "primary" method. + Return 0 or -1, like ioctl() would do. */ +extern int execute_ioctl_hooks (const struct fd_hook *remaining_list, + gl_ioctl_fn primary, + int fd, int request, void *arg); + +/* Execute all ioctl hooks, with PRIMARY as "primary" method. + Return 0 or -1, like ioctl() would do. */ +extern int execute_all_ioctl_hooks (gl_ioctl_fn primary, + int fd, int request, void *arg); + +/* Add a function pair to the list of file descriptor hooks. + CLOSE_HOOK and IOCTL_HOOK may be NULL, indicating no change. + The LINK variable points to a piece of memory which is guaranteed to be + accessible until the corresponding call to unregister_fd_hook. */ +extern void register_fd_hook (close_hook_fn close_hook, ioctl_hook_fn ioctl_hook, + struct fd_hook *link); + +/* Removes a hook from the list of file descriptor hooks. */ +extern void unregister_fd_hook (struct fd_hook *link); + + +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* FD_HOOK_H */ diff --git a/gl/lib/fd-safer.c b/gl/lib/fd-safer.c new file mode 100644 index 0000000..148f735 --- /dev/null +++ b/gl/lib/fd-safer.c @@ -0,0 +1,49 @@ +/* Return a safer copy of a file descriptor. + + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include + +#include "unistd-safer.h" + +#include +#include + +/* Return FD, unless FD would be a copy of standard input, output, or + error; in that case, return a duplicate of FD, closing FD. On + failure to duplicate, close FD, set errno, and return -1. Preserve + errno if FD is negative, so that the caller can always inspect + errno when the returned value is negative. + + This function is usefully wrapped around functions that return file + descriptors, e.g., fd_safer (open ("file", O_RDONLY)). */ + +int +fd_safer (int fd) +{ + if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) + { + int f = dup_safer (fd); + int e = errno; + close (fd); + errno = e; + fd = f; + } + + return fd; +} diff --git a/gl/lib/fdopendir.c b/gl/lib/fdopendir.c new file mode 100644 index 0000000..b6c94a0 --- /dev/null +++ b/gl/lib/fdopendir.c @@ -0,0 +1,204 @@ +/* provide a replacement fdopendir function + Copyright (C) 2004-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#include + +#include + +#include +#include + +#if !HAVE_FDOPENDIR + +# include "openat.h" +# include "openat-priv.h" +# include "save-cwd.h" + +# if GNULIB_DIRENT_SAFER +# include "dirent--.h" +# endif + +# ifndef REPLACE_FCHDIR +# define REPLACE_FCHDIR 0 +# endif + +static DIR *fdopendir_with_dup (int, int, struct saved_cwd const *); +static DIR *fd_clone_opendir (int, struct saved_cwd const *); + +/* Replacement for POSIX fdopendir. + + First, try to simulate it via opendir ("/proc/self/fd/..."). Failing + that, simulate it by using fchdir metadata, or by doing + save_cwd/fchdir/opendir(".")/restore_cwd. + If either the save_cwd or the restore_cwd fails (relatively unlikely), + then give a diagnostic and exit nonzero. + + If successful, the resulting stream is based on FD in + implementations where streams are based on file descriptors and in + applications where no other thread or signal handler allocates or + frees file descriptors. In other cases, consult dirfd on the result + to find out whether FD is still being used. + + Otherwise, this function works just like POSIX fdopendir. + + W A R N I N G: + + Unlike other fd-related functions, this one places constraints on FD. + If this function returns successfully, FD is under control of the + dirent.h system, and the caller should not close or modify the state of + FD other than by the dirent.h functions. */ +DIR * +fdopendir (int fd) +{ + DIR *dir = fdopendir_with_dup (fd, -1, NULL); + + if (! REPLACE_FCHDIR && ! dir) + { + int saved_errno = errno; + if (EXPECTED_ERRNO (saved_errno)) + { + struct saved_cwd cwd; + if (save_cwd (&cwd) != 0) + openat_save_fail (errno); + dir = fdopendir_with_dup (fd, -1, &cwd); + saved_errno = errno; + free_cwd (&cwd); + errno = saved_errno; + } + } + + return dir; +} + +/* Like fdopendir, except that if OLDER_DUPFD is not -1, it is known + to be a dup of FD which is less than FD - 1 and which will be + closed by the caller and not otherwise used by the caller. This + function makes sure that FD is closed and all file descriptors less + than FD are open, and then calls fd_clone_opendir on a dup of FD. + That way, barring race conditions, fd_clone_opendir returns a + stream whose file descriptor is FD. + + If REPLACE_CHDIR or CWD is null, use opendir ("/proc/self/fd/...", + falling back on fchdir metadata. Otherwise, CWD is a saved version + of the working directory; use fchdir/opendir(".")/restore_cwd(CWD). */ +static DIR * +fdopendir_with_dup (int fd, int older_dupfd, struct saved_cwd const *cwd) +{ + int dupfd = dup (fd); + if (dupfd < 0 && errno == EMFILE) + dupfd = older_dupfd; + if (dupfd < 0) + return NULL; + else + { + DIR *dir; + int saved_errno; + if (dupfd < fd - 1 && dupfd != older_dupfd) + { + dir = fdopendir_with_dup (fd, dupfd, cwd); + saved_errno = errno; + } + else + { + close (fd); + dir = fd_clone_opendir (dupfd, cwd); + saved_errno = errno; + if (! dir) + { + int fd1 = dup (dupfd); + if (fd1 != fd) + openat_save_fail (fd1 < 0 ? errno : EBADF); + } + } + + if (dupfd != older_dupfd) + close (dupfd); + errno = saved_errno; + return dir; + } +} + +/* Like fdopendir, except the result controls a clone of FD. It is + the caller's responsibility both to close FD and (if the result is + not null) to closedir the result. */ +static DIR * +fd_clone_opendir (int fd, struct saved_cwd const *cwd) +{ + if (REPLACE_FCHDIR || ! cwd) + { + DIR *dir = NULL; + int saved_errno = EOPNOTSUPP; + char buf[OPENAT_BUFFER_SIZE]; + char *proc_file = openat_proc_name (buf, fd, "."); + if (proc_file) + { + dir = opendir (proc_file); + saved_errno = errno; + if (proc_file != buf) + free (proc_file); + } +# if REPLACE_FCHDIR + if (! dir && EXPECTED_ERRNO (saved_errno)) + { + char const *name = _gl_directory_name (fd); + return (name ? opendir (name) : NULL); + } +# endif + errno = saved_errno; + return dir; + } + else + { + if (fchdir (fd) != 0) + return NULL; + else + { + DIR *dir = opendir ("."); + int saved_errno = errno; + if (restore_cwd (cwd) != 0) + openat_restore_fail (errno); + errno = saved_errno; + return dir; + } + } +} + +#else /* HAVE_FDOPENDIR */ + +# include +# include + +# undef fdopendir + +/* Like fdopendir, but work around GNU/Hurd bug by validating FD. */ + +DIR * +rpl_fdopendir (int fd) +{ + struct stat st; + if (fstat (fd, &st)) + return NULL; + if (!S_ISDIR (st.st_mode)) + { + errno = ENOTDIR; + return NULL; + } + return fdopendir (fd); +} + +#endif /* HAVE_FDOPENDIR */ diff --git a/gl/lib/fflush.c b/gl/lib/fflush.c new file mode 100644 index 0000000..dc9fbcd --- /dev/null +++ b/gl/lib/fflush.c @@ -0,0 +1,225 @@ +/* fflush.c -- allow flushing input streams + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +#include + +/* Specification. */ +#include + +#include +#include + +#include "freading.h" + +#include "stdio-impl.h" + +#include "unused-parameter.h" + +#undef fflush + + +#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + +/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ +static void +clear_ungetc_buffer_preserving_position (FILE *fp) +{ + if (fp->_flags & _IO_IN_BACKUP) + /* _IO_free_backup_area is a bit complicated. Simply call fseek. */ + fseeko (fp, 0, SEEK_CUR); +} + +#else + +/* Clear the stream's ungetc buffer. May modify the value of ftello (fp). */ +static void +clear_ungetc_buffer (FILE *fp) +{ +# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ + if (HASUB (fp)) + { + fp_->_p += fp_->_r; + fp_->_r = 0; + } +# elif defined __EMX__ /* emx+gcc */ + if (fp->_ungetc_count > 0) + { + fp->_ungetc_count = 0; + fp->_rcount = - fp->_rcount; + } +# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ + /* Nothing to do. */ +# else /* other implementations */ + fseeko (fp, 0, SEEK_CUR); +# endif +} + +#endif + +#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) + +# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ + +static int +disable_seek_optimization (FILE *fp) +{ + int saved_flags = fp_->_flags & (__SOPT | __SNPT); + fp_->_flags = (fp_->_flags & ~__SOPT) | __SNPT; + return saved_flags; +} + +static void +restore_seek_optimization (FILE *fp, int saved_flags) +{ + fp_->_flags = (fp_->_flags & ~(__SOPT | __SNPT)) | saved_flags; +} + +# else + +static void +update_fpos_cache (FILE *fp _GL_UNUSED_PARAMETER, + off_t pos _GL_UNUSED_PARAMETER) +{ +# if 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; +# else + /* fp_->_offset is an fpos_t. */ + /* Use a union, since on NetBSD, the compilation flags determine + whether fpos_t is typedef'd to off_t or a struct containing a + single off_t member. */ + union + { + fpos_t f; + off_t o; + } u; + u.o = pos; + fp_->_offset = u.f; +# endif + fp_->_flags |= __SOFF; +# endif +} +# endif +#endif + +/* Flush all pending data on STREAM according to POSIX rules. Both + output and seekable input streams are supported. */ +int +rpl_fflush (FILE *stream) +{ + /* When stream is NULL, POSIX and C99 only require flushing of "output + streams and update streams in which the most recent operation was not + input", and all implementations do this. + + When stream is "an output stream or an update stream in which the most + recent operation was not input", POSIX and C99 requires that fflush + writes out any buffered data, and all implementations do this. + + When stream is, however, an input stream or an update stream in + which the most recent operation was input, C99 specifies nothing, + and POSIX only specifies behavior if the stream is seekable. + mingw, in particular, drops the input buffer, leaving the file + descriptor positioned at the end of the input buffer. I.e. ftell + (stream) is lost. We don't want to call the implementation's + fflush in this case. + + We test ! freading (stream) here, rather than fwriting (stream), because + what we need to know is whether the stream holds a "read buffer", and on + mingw this is indicated by _IOREAD, regardless of _IOWRT. */ + if (stream == NULL || ! freading (stream)) + return fflush (stream); + +#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + + clear_ungetc_buffer_preserving_position (stream); + + return fflush (stream); + +#else + { + /* Notes about the file-position indicator: + 1) The file position indicator is incremented by fgetc() and decremented + by ungetc(): + + "... the fgetc() function shall ... advance the associated file + position indicator for the stream ..." + + "The file-position indicator is decremented by each successful + call to ungetc()..." + 2) says: + "The value of the file-position indicator for the stream after + reading or discarding all pushed-back bytes shall be the same + as it was before the bytes were pushed back." + Here we are discarding all pushed-back bytes. But more specifically, + 3) says: + "[After fflush(),] the file offset of the underlying open file + description shall be set to the file position of the stream, and + any characters pushed back onto the stream by ungetc() ... shall + be discarded." */ + + /* POSIX does not specify fflush behavior for non-seekable input + streams. Some implementations purge unread data, some return + EBADF, some do nothing. */ + off_t pos = ftello (stream); + if (pos == -1) + { + errno = EBADF; + return EOF; + } + + /* Clear the ungetc buffer. */ + clear_ungetc_buffer (stream); + + /* To get here, we must be flushing a seekable input stream, so the + semantics of fpurge are now appropriate to clear the buffer. To + avoid losing data, the lseek is also necessary. */ + { + int result = fpurge (stream); + if (result != 0) + return result; + } + +# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ + + { + /* Disable seek optimization for the next fseeko call. This tells the + following fseeko call to seek to the desired position directly, rather + than to seek to a block-aligned boundary. */ + int saved_flags = disable_seek_optimization (stream); + int result = fseeko (stream, pos, SEEK_SET); + + restore_seek_optimization (stream, saved_flags); + return result; + } + +# else + + pos = lseek (fileno (stream), pos, SEEK_SET); + if (pos == -1) + return EOF; + /* After a successful lseek, update the file descriptor's position cache + in the stream. */ + update_fpos_cache (stream, pos); + + return 0; + +# endif + } +#endif +} diff --git a/gl/lib/file-set.c b/gl/lib/file-set.c new file mode 100644 index 0000000..c3130d9 --- /dev/null +++ b/gl/lib/file-set.c @@ -0,0 +1,74 @@ +/* Specialized functions to manipulate a set of files. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#include +#include "file-set.h" + +#include "hash-triple.h" +#include "xalloc.h" + +/* Record file, FILE, and dev/ino from *STATS, in the hash table, HT. + If HT is NULL, return immediately. + If memory allocation fails, exit immediately. */ +void +record_file (Hash_table *ht, char const *file, struct stat const *stats) +{ + struct F_triple *ent; + + if (ht == NULL) + return; + + ent = xmalloc (sizeof *ent); + ent->name = xstrdup (file); + ent->st_ino = stats->st_ino; + ent->st_dev = stats->st_dev; + + { + struct F_triple *ent_from_table = hash_insert (ht, ent); + if (ent_from_table == NULL) + { + /* Insertion failed due to lack of memory. */ + xalloc_die (); + } + + if (ent_from_table != ent) + { + /* There was alread a matching entry in the table, so ENT was + not inserted. Free it. */ + triple_free (ent); + } + } +} + +/* Return true if there is an entry in hash table, HT, + for the file described by FILE and STATS. */ +bool +seen_file (Hash_table const *ht, char const *file, + struct stat const *stats) +{ + struct F_triple new_ent; + + if (ht == NULL) + return false; + + new_ent.name = (char *) file; + new_ent.st_ino = stats->st_ino; + new_ent.st_dev = stats->st_dev; + + return !!hash_lookup (ht, &new_ent); +} diff --git a/gl/lib/file-set.h b/gl/lib/file-set.h new file mode 100644 index 0000000..4e47d95 --- /dev/null +++ b/gl/lib/file-set.h @@ -0,0 +1,15 @@ +#include +#include +#include + +#include "hash.h" + +extern void record_file (Hash_table *ht, char const *file, + struct stat const *stats) +#if defined __GNUC__ && ((__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3) + __attribute__ ((nonnull (2, 3))) +#endif +; + +extern bool seen_file (Hash_table const *ht, char const *file, + struct stat const *stats); diff --git a/gl/lib/fileblocks.c b/gl/lib/fileblocks.c new file mode 100644 index 0000000..6de113b --- /dev/null +++ b/gl/lib/fileblocks.c @@ -0,0 +1,74 @@ +/* Convert file size to number of blocks on System V-like machines. + + Copyright (C) 1990, 1997-1999, 2004-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Brian L. Matthews, blm@6sceng.UUCP. */ + +#include + +#include + +#if HAVE_SYS_PARAM_H +# include +#endif + +#if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE + +# include + +# ifndef NINDIR + +# if defined __DJGPP__ +typedef long daddr_t; /* for disk address */ +# endif + +/* Some SysV's, like Irix, seem to lack this. Hope it's correct. */ +/* Number of inode pointers per indirect block. */ +# define NINDIR (BSIZE / sizeof (daddr_t)) +# endif /* !NINDIR */ + +/* Number of direct block addresses in an inode. */ +# define NDIR 10 + +/* Return the number of 512-byte blocks in a file of SIZE bytes. */ + +off_t +st_blocks (off_t size) +{ + off_t datablks = size / 512 + (size % 512 != 0); + off_t indrblks = 0; + + if (datablks > NDIR) + { + indrblks = (datablks - NDIR - 1) / NINDIR + 1; + + if (datablks > NDIR + NINDIR) + { + indrblks += (datablks - NDIR - NINDIR - 1) / (NINDIR * NINDIR) + 1; + + if (datablks > NDIR + NINDIR + NINDIR * NINDIR) + indrblks++; + } + } + + return datablks + indrblks; +} +#else +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int textutils_fileblocks_unused; +#endif diff --git a/gl/lib/filemode.c b/gl/lib/filemode.c new file mode 100644 index 0000000..3e2f8c0 --- /dev/null +++ b/gl/lib/filemode.c @@ -0,0 +1,180 @@ +/* filemode.c -- make a string describing file modes + + Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2014 Free + Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "filemode.h" + +/* The following is for Cray DMF (Data Migration Facility), which is a + HSM file system. A migrated file has a 'st_dm_mode' that is + different from the normal 'st_mode', so any tests for migrated + files should use the former. */ +#if HAVE_ST_DM_MODE +# define IS_MIGRATED_FILE(statp) \ + (S_ISOFD (statp->st_dm_mode) || S_ISOFL (statp->st_dm_mode)) +#else +# define IS_MIGRATED_FILE(statp) 0 +#endif + +#if ! HAVE_DECL_STRMODE + +/* Return a character indicating the type of file described by + file mode BITS: + '-' regular file + 'b' block special file + 'c' character special file + 'C' high performance ("contiguous data") file + 'd' directory + 'D' door + 'l' symbolic link + 'm' multiplexed file (7th edition Unix; obsolete) + 'n' network special file (HP-UX) + 'p' fifo (named pipe) + 'P' port + 's' socket + 'w' whiteout (4.4BSD) + '?' some other file type */ + +static char +ftypelet (mode_t bits) +{ + /* These are the most common, so test for them first. */ + if (S_ISREG (bits)) + return '-'; + if (S_ISDIR (bits)) + return 'd'; + + /* Other letters standardized by POSIX 1003.1-2004. */ + if (S_ISBLK (bits)) + return 'b'; + if (S_ISCHR (bits)) + return 'c'; + if (S_ISLNK (bits)) + return 'l'; + if (S_ISFIFO (bits)) + return 'p'; + + /* Other file types (though not letters) standardized by POSIX. */ + if (S_ISSOCK (bits)) + return 's'; + + /* Nonstandard file types. */ + if (S_ISCTG (bits)) + return 'C'; + if (S_ISDOOR (bits)) + return 'D'; + if (S_ISMPB (bits) || S_ISMPC (bits) || S_ISMPX (bits)) + return 'm'; + if (S_ISNWK (bits)) + return 'n'; + if (S_ISPORT (bits)) + return 'P'; + if (S_ISWHT (bits)) + return 'w'; + + return '?'; +} + +/* Like filemodestring, but rely only on MODE. */ + +void +strmode (mode_t mode, char *str) +{ + str[0] = ftypelet (mode); + str[1] = mode & S_IRUSR ? 'r' : '-'; + str[2] = mode & S_IWUSR ? 'w' : '-'; + str[3] = (mode & S_ISUID + ? (mode & S_IXUSR ? 's' : 'S') + : (mode & S_IXUSR ? 'x' : '-')); + str[4] = mode & S_IRGRP ? 'r' : '-'; + str[5] = mode & S_IWGRP ? 'w' : '-'; + str[6] = (mode & S_ISGID + ? (mode & S_IXGRP ? 's' : 'S') + : (mode & S_IXGRP ? 'x' : '-')); + str[7] = mode & S_IROTH ? 'r' : '-'; + str[8] = mode & S_IWOTH ? 'w' : '-'; + str[9] = (mode & S_ISVTX + ? (mode & S_IXOTH ? 't' : 'T') + : (mode & S_IXOTH ? 'x' : '-')); + str[10] = ' '; + str[11] = '\0'; +} + +#endif /* ! HAVE_DECL_STRMODE */ + +/* filemodestring - fill in string STR with an ls-style ASCII + representation of the st_mode field of file stats block STATP. + 12 characters are stored in STR. + The characters stored in STR are: + + 0 File type, as in ftypelet above, except that other letters are used + for files whose type cannot be determined solely from st_mode: + + 'F' semaphore + 'M' migrated file (Cray DMF) + 'Q' message queue + 'S' shared memory object + 'T' typed memory object + + 1 'r' if the owner may read, '-' otherwise. + + 2 'w' if the owner may write, '-' otherwise. + + 3 'x' if the owner may execute, 's' if the file is + set-user-id, '-' otherwise. + 'S' if the file is set-user-id, but the execute + bit isn't set. + + 4 'r' if group members may read, '-' otherwise. + + 5 'w' if group members may write, '-' otherwise. + + 6 'x' if group members may execute, 's' if the file is + set-group-id, '-' otherwise. + 'S' if it is set-group-id but not executable. + + 7 'r' if any user may read, '-' otherwise. + + 8 'w' if any user may write, '-' otherwise. + + 9 'x' if any user may execute, 't' if the file is "sticky" + (will be retained in swap space after execution), '-' + otherwise. + 'T' if the file is sticky but not executable. + + 10 ' ' for compatibility with 4.4BSD strmode, + since this interface does not support ACLs. + + 11 '\0'. */ + +void +filemodestring (struct stat const *statp, char *str) +{ + strmode (statp->st_mode, str); + + if (S_TYPEISSEM (statp)) + str[0] = 'F'; + else if (IS_MIGRATED_FILE (statp)) + str[0] = 'M'; + else if (S_TYPEISMQ (statp)) + str[0] = 'Q'; + else if (S_TYPEISSHM (statp)) + str[0] = 'S'; + else if (S_TYPEISTMO (statp)) + str[0] = 'T'; +} diff --git a/gl/lib/filemode.h b/gl/lib/filemode.h new file mode 100644 index 0000000..c51e6a3 --- /dev/null +++ b/gl/lib/filemode.h @@ -0,0 +1,44 @@ +/* Make a string describing file modes. + + Copyright (C) 1998-1999, 2003, 2006, 2009-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef FILEMODE_H_ + +# include +# include + +/* Get the declaration of strmode. */ +# if HAVE_DECL_STRMODE +# include /* Mac OS X, FreeBSD, OpenBSD */ +# include /* NetBSD */ +# endif + +# ifdef __cplusplus +extern "C" { +# endif + +# if !HAVE_DECL_STRMODE +extern void strmode (mode_t mode, char *str); +# endif + +extern void filemodestring (struct stat const *statp, char *str); + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/gl/lib/filename.h b/gl/lib/filename.h new file mode 100644 index 0000000..96dbaaa --- /dev/null +++ b/gl/lib/filename.h @@ -0,0 +1,54 @@ +/* Basic filename support macros. + Copyright (C) 2001-2004, 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _FILENAME_H +#define _FILENAME_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Pathname support. + ISSLASH(C) tests whether C is a directory separator character. + IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, + it may be concatenated to a directory pathname. + IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. + */ +#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ + /* Native Windows, Cygwin, OS/2, DOS */ +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +# define HAS_DEVICE(P) \ + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ + && (P)[1] == ':') +# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) +# define IS_PATH_WITH_DIR(P) \ + (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P)) +# define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0) +#else + /* Unix */ +# define ISSLASH(C) ((C) == '/') +# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) +# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL) +# define FILE_SYSTEM_PREFIX_LEN(P) 0 +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* _FILENAME_H */ diff --git a/gl/lib/filenamecat-lgpl.c b/gl/lib/filenamecat-lgpl.c new file mode 100644 index 0000000..e817f97 --- /dev/null +++ b/gl/lib/filenamecat-lgpl.c @@ -0,0 +1,88 @@ +/* Concatenate two arbitrary file names. + + Copyright (C) 1996-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +/* Specification. */ +#include "filenamecat.h" + +#include +#include + +#include "dirname.h" + +#if ! HAVE_MEMPCPY && ! defined mempcpy +# define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) +#endif + +/* Return the longest suffix of F that is a relative file name. + If it has no such suffix, return the empty string. */ + +static char const * _GL_ATTRIBUTE_PURE +longest_relative_suffix (char const *f) +{ + for (f += FILE_SYSTEM_PREFIX_LEN (f); ISSLASH (*f); f++) + continue; + return f; +} + +/* Concatenate two file name components, DIR and ABASE, in + newly-allocated storage and return the result. + The resulting file name F is such that the commands "ls F" and "(cd + DIR; ls BASE)" refer to the same file, where BASE is ABASE with any + file system prefixes and leading separators removed. + Arrange for a directory separator if necessary between DIR and BASE + in the result, removing any redundant separators. + In any case, if BASE_IN_RESULT is non-NULL, set + *BASE_IN_RESULT to point to the copy of ABASE in the returned + concatenation. However, if ABASE begins with more than one slash, + set *BASE_IN_RESULT to point to the sole corresponding slash that + is copied into the result buffer. + + Return NULL if malloc fails. */ + +char * +mfile_name_concat (char const *dir, char const *abase, char **base_in_result) +{ + char const *dirbase = last_component (dir); + size_t dirbaselen = base_len (dirbase); + size_t dirlen = dirbase - dir + dirbaselen; + size_t needs_separator = (dirbaselen && ! ISSLASH (dirbase[dirbaselen - 1])); + + char const *base = longest_relative_suffix (abase); + size_t baselen = strlen (base); + + char *p_concat = malloc (dirlen + needs_separator + baselen + 1); + char *p; + + if (p_concat == NULL) + return NULL; + + p = mempcpy (p_concat, dir, dirlen); + *p = DIRECTORY_SEPARATOR; + p += needs_separator; + + if (base_in_result) + *base_in_result = p - IS_ABSOLUTE_FILE_NAME (abase); + + p = mempcpy (p, base, baselen); + *p = '\0'; + + return p_concat; +} diff --git a/gl/lib/filenamecat.h b/gl/lib/filenamecat.h new file mode 100644 index 0000000..b33dce8 --- /dev/null +++ b/gl/lib/filenamecat.h @@ -0,0 +1,27 @@ +/* Concatenate two arbitrary file names. + + Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#if GNULIB_FILENAMECAT +char *file_name_concat (char const *dir, char const *base, + char **base_in_result); +#endif + +char *mfile_name_concat (char const *dir, char const *base, + char **base_in_result); diff --git a/gl/lib/float+.h b/gl/lib/float+.h new file mode 100644 index 0000000..5ff1511 --- /dev/null +++ b/gl/lib/float+.h @@ -0,0 +1,147 @@ +/* Supplemental information about the floating-point formats. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2007. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _FLOATPLUS_H +#define _FLOATPLUS_H + +#include +#include + +/* Number of bits in the mantissa of a floating-point number, including the + "hidden bit". */ +#if FLT_RADIX == 2 +# define FLT_MANT_BIT FLT_MANT_DIG +# define DBL_MANT_BIT DBL_MANT_DIG +# define LDBL_MANT_BIT LDBL_MANT_DIG +#elif FLT_RADIX == 4 +# define FLT_MANT_BIT (FLT_MANT_DIG * 2) +# define DBL_MANT_BIT (DBL_MANT_DIG * 2) +# define LDBL_MANT_BIT (LDBL_MANT_DIG * 2) +#elif FLT_RADIX == 16 +# define FLT_MANT_BIT (FLT_MANT_DIG * 4) +# define DBL_MANT_BIT (DBL_MANT_DIG * 4) +# define LDBL_MANT_BIT (LDBL_MANT_DIG * 4) +#endif + +/* Bit mask that can be used to mask the exponent, as an unsigned number. */ +#define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7) +#define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) +#define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7) + +/* Number of bits used for the exponent of a floating-point number, including + the exponent's sign. */ +#define FLT_EXP_BIT \ + (FLT_EXP_MASK < 0x100 ? 8 : \ + FLT_EXP_MASK < 0x200 ? 9 : \ + FLT_EXP_MASK < 0x400 ? 10 : \ + FLT_EXP_MASK < 0x800 ? 11 : \ + FLT_EXP_MASK < 0x1000 ? 12 : \ + FLT_EXP_MASK < 0x2000 ? 13 : \ + FLT_EXP_MASK < 0x4000 ? 14 : \ + FLT_EXP_MASK < 0x8000 ? 15 : \ + FLT_EXP_MASK < 0x10000 ? 16 : \ + FLT_EXP_MASK < 0x20000 ? 17 : \ + FLT_EXP_MASK < 0x40000 ? 18 : \ + FLT_EXP_MASK < 0x80000 ? 19 : \ + FLT_EXP_MASK < 0x100000 ? 20 : \ + FLT_EXP_MASK < 0x200000 ? 21 : \ + FLT_EXP_MASK < 0x400000 ? 22 : \ + FLT_EXP_MASK < 0x800000 ? 23 : \ + FLT_EXP_MASK < 0x1000000 ? 24 : \ + FLT_EXP_MASK < 0x2000000 ? 25 : \ + FLT_EXP_MASK < 0x4000000 ? 26 : \ + FLT_EXP_MASK < 0x8000000 ? 27 : \ + FLT_EXP_MASK < 0x10000000 ? 28 : \ + FLT_EXP_MASK < 0x20000000 ? 29 : \ + FLT_EXP_MASK < 0x40000000 ? 30 : \ + FLT_EXP_MASK <= 0x7fffffff ? 31 : \ + 32) +#define DBL_EXP_BIT \ + (DBL_EXP_MASK < 0x100 ? 8 : \ + DBL_EXP_MASK < 0x200 ? 9 : \ + DBL_EXP_MASK < 0x400 ? 10 : \ + DBL_EXP_MASK < 0x800 ? 11 : \ + DBL_EXP_MASK < 0x1000 ? 12 : \ + DBL_EXP_MASK < 0x2000 ? 13 : \ + DBL_EXP_MASK < 0x4000 ? 14 : \ + DBL_EXP_MASK < 0x8000 ? 15 : \ + DBL_EXP_MASK < 0x10000 ? 16 : \ + DBL_EXP_MASK < 0x20000 ? 17 : \ + DBL_EXP_MASK < 0x40000 ? 18 : \ + DBL_EXP_MASK < 0x80000 ? 19 : \ + DBL_EXP_MASK < 0x100000 ? 20 : \ + DBL_EXP_MASK < 0x200000 ? 21 : \ + DBL_EXP_MASK < 0x400000 ? 22 : \ + DBL_EXP_MASK < 0x800000 ? 23 : \ + DBL_EXP_MASK < 0x1000000 ? 24 : \ + DBL_EXP_MASK < 0x2000000 ? 25 : \ + DBL_EXP_MASK < 0x4000000 ? 26 : \ + DBL_EXP_MASK < 0x8000000 ? 27 : \ + DBL_EXP_MASK < 0x10000000 ? 28 : \ + DBL_EXP_MASK < 0x20000000 ? 29 : \ + DBL_EXP_MASK < 0x40000000 ? 30 : \ + DBL_EXP_MASK <= 0x7fffffff ? 31 : \ + 32) +#define LDBL_EXP_BIT \ + (LDBL_EXP_MASK < 0x100 ? 8 : \ + LDBL_EXP_MASK < 0x200 ? 9 : \ + LDBL_EXP_MASK < 0x400 ? 10 : \ + LDBL_EXP_MASK < 0x800 ? 11 : \ + LDBL_EXP_MASK < 0x1000 ? 12 : \ + LDBL_EXP_MASK < 0x2000 ? 13 : \ + LDBL_EXP_MASK < 0x4000 ? 14 : \ + LDBL_EXP_MASK < 0x8000 ? 15 : \ + LDBL_EXP_MASK < 0x10000 ? 16 : \ + LDBL_EXP_MASK < 0x20000 ? 17 : \ + LDBL_EXP_MASK < 0x40000 ? 18 : \ + LDBL_EXP_MASK < 0x80000 ? 19 : \ + LDBL_EXP_MASK < 0x100000 ? 20 : \ + LDBL_EXP_MASK < 0x200000 ? 21 : \ + LDBL_EXP_MASK < 0x400000 ? 22 : \ + LDBL_EXP_MASK < 0x800000 ? 23 : \ + LDBL_EXP_MASK < 0x1000000 ? 24 : \ + LDBL_EXP_MASK < 0x2000000 ? 25 : \ + LDBL_EXP_MASK < 0x4000000 ? 26 : \ + LDBL_EXP_MASK < 0x8000000 ? 27 : \ + LDBL_EXP_MASK < 0x10000000 ? 28 : \ + LDBL_EXP_MASK < 0x20000000 ? 29 : \ + LDBL_EXP_MASK < 0x40000000 ? 30 : \ + LDBL_EXP_MASK <= 0x7fffffff ? 31 : \ + 32) + +/* Number of bits used for a floating-point number: the mantissa (not + counting the "hidden bit", since it may or may not be explicit), the + exponent, and the sign. */ +#define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1) +#define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1) +#define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1) + +/* Number of bytes used for a floating-point number. + This can be smaller than the 'sizeof'. For example, on i386 systems, + 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence + LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but + sizeof (long double) = 12 or = 16. */ +#define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) +#define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) +#define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) + +/* Verify that SIZEOF_FLT <= sizeof (float) etc. */ +typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1]; +typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1]; +typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1]; + +#endif /* _FLOATPLUS_H */ diff --git a/gl/lib/float.c b/gl/lib/float.c new file mode 100644 index 0000000..b7c321d --- /dev/null +++ b/gl/lib/float.c @@ -0,0 +1,33 @@ +/* Auxiliary definitions for . + Copyright (C) 2011-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ +const union gl_long_double_union gl_LDBL_MAX = + { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } }; +#elif defined __i386__ +const union gl_long_double_union gl_LDBL_MAX = + { { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } }; +#else +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; +#endif diff --git a/gl/lib/float.in.h b/gl/lib/float.in.h new file mode 100644 index 0000000..db809f8 --- /dev/null +++ b/gl/lib/float.in.h @@ -0,0 +1,188 @@ +/* A correct . + + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _@GUARD_PREFIX@_FLOAT_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_FLOAT_H@ + +#ifndef _@GUARD_PREFIX@_FLOAT_H +#define _@GUARD_PREFIX@_FLOAT_H + +/* 'long double' properties. */ + +#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) +/* Number of mantissa units, in base FLT_RADIX. */ +# undef LDBL_MANT_DIG +# define LDBL_MANT_DIG 64 +/* Number of decimal digits that is sufficient for representing a number. */ +# undef LDBL_DIG +# define LDBL_DIG 18 +/* x-1 where x is the smallest representable number > 1. */ +# undef LDBL_EPSILON +# define LDBL_EPSILON 1.0842021724855044340E-19L +/* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ +# undef LDBL_MIN_EXP +# define LDBL_MIN_EXP (-16381) +/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ +# undef LDBL_MAX_EXP +# define LDBL_MAX_EXP 16384 +/* Minimum positive normalized number. */ +# undef LDBL_MIN +# define LDBL_MIN 3.3621031431120935063E-4932L +/* Maximum representable finite number. */ +# undef LDBL_MAX +# define LDBL_MAX 1.1897314953572317650E+4932L +/* Minimum e such that 10^e is in the range of normalized numbers. */ +# undef LDBL_MIN_10_EXP +# define LDBL_MIN_10_EXP (-4931) +/* Maximum e such that 10^e is in the range of representable finite numbers. */ +# undef LDBL_MAX_10_EXP +# define LDBL_MAX_10_EXP 4932 +#endif + +/* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of + precision in the compiler but 64 bits of precision at runtime. See + . */ +#if defined __i386__ && defined __FreeBSD__ +/* Number of mantissa units, in base FLT_RADIX. */ +# undef LDBL_MANT_DIG +# define LDBL_MANT_DIG 64 +/* Number of decimal digits that is sufficient for representing a number. */ +# undef LDBL_DIG +# define LDBL_DIG 18 +/* x-1 where x is the smallest representable number > 1. */ +# undef LDBL_EPSILON +# define LDBL_EPSILON 1.084202172485504434007452800869941711426e-19L /* 2^-63 */ +/* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ +# undef LDBL_MIN_EXP +# define LDBL_MIN_EXP (-16381) +/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ +# undef LDBL_MAX_EXP +# define LDBL_MAX_EXP 16384 +/* Minimum positive normalized number. */ +# undef LDBL_MIN +# define LDBL_MIN 3.3621031431120935E-4932L /* = 0x1p-16382L */ +/* Maximum representable finite number. */ +# undef LDBL_MAX +/* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }. + But the largest literal that GCC allows us to write is + 0x0.fffffffffffff8p16384L = { 0xFFFFF800, 0xFFFFFFFF, 32766 }. + So, define it like this through a reference to an external variable + + const unsigned int LDBL_MAX[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }; + extern const long double LDBL_MAX; + + Unfortunately, this is not a constant expression. */ +union gl_long_double_union + { + struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd; + long double ld; + }; +extern const union gl_long_double_union gl_LDBL_MAX; +# define LDBL_MAX (gl_LDBL_MAX.ld) +/* Minimum e such that 10^e is in the range of normalized numbers. */ +# undef LDBL_MIN_10_EXP +# define LDBL_MIN_10_EXP (-4931) +/* Maximum e such that 10^e is in the range of representable finite numbers. */ +# undef LDBL_MAX_10_EXP +# define LDBL_MAX_10_EXP 4932 +#endif + +/* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are + wrong. + On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */ +#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ +# undef LDBL_MIN_EXP +# define LDBL_MIN_EXP DBL_MIN_EXP +# undef LDBL_MIN_10_EXP +# define LDBL_MIN_10_EXP DBL_MIN_10_EXP +# undef LDBL_MIN +# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ +#endif +#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ +# undef LDBL_MAX +/* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }. + It is not easy to define: + #define LDBL_MAX 1.79769313486231580793728971405302307166e308L + is too small, whereas + #define LDBL_MAX 1.79769313486231580793728971405302307167e308L + is too large. Apparently a bug in GCC decimal-to-binary conversion. + Also, I can't get values larger than + #define LDBL63 ((long double) (1ULL << 63)) + #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) + #define LDBL945 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) + #define LDBL1008 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) + #define LDBL_MAX (LDBL1008 * 65535.0L + LDBL945 * (long double) 9223372036821221375ULL + LDBL882 * (long double) 4611686018427387904ULL) + which is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xF8000000 }. + So, define it like this through a reference to an external variable + + const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL }; + extern const long double LDBL_MAX; + + or through a pointer cast + + #define LDBL_MAX \ + (*(const long double *) (double[]) { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL }) + + Unfortunately, this is not a constant expression, and the latter expression + does not work well when GCC is optimizing.. */ +union gl_long_double_union + { + struct { double hi; double lo; } dd; + long double ld; + }; +extern const union gl_long_double_union gl_LDBL_MAX; +# define LDBL_MAX (gl_LDBL_MAX.ld) +#endif + +/* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong. + On IRIX 6.5, with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_EPSILON + are wrong. */ +#if defined __sgi && (LDBL_MANT_DIG >= 106) +# undef LDBL_MANT_DIG +# define LDBL_MANT_DIG 106 +# if defined __GNUC__ +# undef LDBL_MIN_EXP +# define LDBL_MIN_EXP DBL_MIN_EXP +# undef LDBL_MIN_10_EXP +# define LDBL_MIN_10_EXP DBL_MIN_10_EXP +# undef LDBL_MIN +# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ +# undef LDBL_EPSILON +# define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */ +# endif +#endif + +#if @REPLACE_ITOLD@ +/* Pull in a function that fixes the 'int' to 'long double' conversion + of glibc 2.7. */ +extern +# ifdef __cplusplus +"C" +# endif +void _Qp_itoq (long double *, int); +static void (*_gl_float_fix_itold) (long double *, int) = _Qp_itoq; +#endif + +#endif /* _@GUARD_PREFIX@_FLOAT_H */ +#endif /* _@GUARD_PREFIX@_FLOAT_H */ diff --git a/gl/lib/fnmatch.c b/gl/lib/fnmatch.c new file mode 100644 index 0000000..4246d82 --- /dev/null +++ b/gl/lib/fnmatch.c @@ -0,0 +1,350 @@ +/* Copyright (C) 1991-1993, 1996-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _LIBC +# include +#endif + +/* Enable GNU extensions in fnmatch.h. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +#if ! defined __builtin_expect && __GNUC__ < 3 +# define __builtin_expect(expr, expected) (expr) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#define WIDE_CHAR_SUPPORT \ + (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \ + && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY)) + +/* For platform which support the ISO C amendment 1 functionality we + support user defined character classes. */ +#if defined _LIBC || WIDE_CHAR_SUPPORT +# include +# include +#endif + +/* We need some of the locale data (the collation sequence information) + but there is no interface to get this information in general. Therefore + we support a correct implementation only in glibc. */ +#ifdef _LIBC +# include "../locale/localeinfo.h" +# include "../locale/elem-hash.h" +# include "../locale/coll-lookup.h" +# include + +# define CONCAT(a,b) __CONCAT(a,b) +# define mbsrtowcs __mbsrtowcs +# define fnmatch __fnmatch +extern int fnmatch (const char *pattern, const char *string, int flags); +#endif + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + +/* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */ +#define NO_LEADING_PERIOD(flags) \ + ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD)) + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself, and have not detected a bug + in the library. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand 'configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU + + +# if ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) +# define isblank(c) ((c) == ' ' || (c) == '\t') +# endif + +# define STREQ(s1, s2) (strcmp (s1, s2) == 0) + +# if defined _LIBC || WIDE_CHAR_SUPPORT +/* The GNU C library provides support for user-defined character classes + and the functions from ISO C amendment 1. */ +# ifdef CHARCLASS_NAME_MAX +# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX +# else +/* This shouldn't happen but some implementation might still have this + problem. Use a reasonable default value. */ +# define CHAR_CLASS_MAX_LENGTH 256 +# endif + +# ifdef _LIBC +# define IS_CHAR_CLASS(string) __wctype (string) +# else +# define IS_CHAR_CLASS(string) wctype (string) +# endif + +# ifdef _LIBC +# define ISWCTYPE(WC, WT) __iswctype (WC, WT) +# else +# define ISWCTYPE(WC, WT) iswctype (WC, WT) +# endif + +# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC +/* In this case we are implementing the multibyte character handling. */ +# define HANDLE_MULTIBYTE 1 +# endif + +# else +# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, 'xdigit'. */ + +# define IS_CHAR_CLASS(string) \ + (STREQ (string, "alpha") || STREQ (string, "upper") \ + || STREQ (string, "lower") || STREQ (string, "digit") \ + || STREQ (string, "alnum") || STREQ (string, "xdigit") \ + || STREQ (string, "space") || STREQ (string, "print") \ + || STREQ (string, "punct") || STREQ (string, "graph") \ + || STREQ (string, "cntrl") || STREQ (string, "blank")) +# endif + +/* Avoid depending on library functions or files + whose names are inconsistent. */ + +/* Global variable. */ +static int posixly_correct; + +# ifndef internal_function +/* Inside GNU libc we mark some function in a special way. In other + environments simply ignore the marking. */ +# define internal_function +# endif + +/* Note that this evaluates C many times. */ +# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c)) +# define CHAR char +# define UCHAR unsigned char +# define INT int +# define FCT internal_fnmatch +# define EXT ext_match +# define END end_pattern +# define L_(CS) CS +# ifdef _LIBC +# define BTOWC(C) __btowc (C) +# else +# define BTOWC(C) btowc (C) +# endif +# define STRLEN(S) strlen (S) +# define STRCAT(D, S) strcat (D, S) +# ifdef _LIBC +# define MEMPCPY(D, S, N) __mempcpy (D, S, N) +# else +# if HAVE_MEMPCPY +# define MEMPCPY(D, S, N) mempcpy (D, S, N) +# else +# define MEMPCPY(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) +# endif +# endif +# define MEMCHR(S, C, N) memchr (S, C, N) +# include "fnmatch_loop.c" + + +# if HANDLE_MULTIBYTE +# define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c)) +# define CHAR wchar_t +# define UCHAR wint_t +# define INT wint_t +# define FCT internal_fnwmatch +# define EXT ext_wmatch +# define END end_wpattern +# define L_(CS) L##CS +# define BTOWC(C) (C) +# ifdef _LIBC +# define STRLEN(S) __wcslen (S) +# define STRCAT(D, S) __wcscat (D, S) +# define MEMPCPY(D, S, N) __wmempcpy (D, S, N) +# else +# define STRLEN(S) wcslen (S) +# define STRCAT(D, S) wcscat (D, S) +# if HAVE_WMEMPCPY +# define MEMPCPY(D, S, N) wmempcpy (D, S, N) +# else +# define MEMPCPY(D, S, N) (wmemcpy (D, S, N) + (N)) +# endif +# endif +# define MEMCHR(S, C, N) wmemchr (S, C, N) +# define WIDE_CHAR_VERSION 1 + +# undef IS_CHAR_CLASS +/* We have to convert the wide character string in a multibyte string. But + we know that the character class names consist of alphanumeric characters + from the portable character set, and since the wide character encoding + for a member of the portable character set is the same code point as + its single-byte encoding, we can use a simplified method to convert the + string to a multibyte character string. */ +static wctype_t +is_char_class (const wchar_t *wcs) +{ + char s[CHAR_CLASS_MAX_LENGTH + 1]; + char *cp = s; + + do + { + /* Test for a printable character from the portable character set. */ +# ifdef _LIBC + if (*wcs < 0x20 || *wcs > 0x7e + || *wcs == 0x24 || *wcs == 0x40 || *wcs == 0x60) + return (wctype_t) 0; +# else + switch (*wcs) + { + case L' ': case L'!': case L'"': case L'#': case L'%': + case L'&': case L'\'': case L'(': case L')': case L'*': + case L'+': case L',': case L'-': case L'.': case L'/': + case L'0': case L'1': case L'2': case L'3': case L'4': + case L'5': case L'6': case L'7': case L'8': case L'9': + case L':': case L';': case L'<': case L'=': case L'>': + case L'?': + case L'A': case L'B': case L'C': case L'D': case L'E': + case L'F': case L'G': case L'H': case L'I': case L'J': + case L'K': case L'L': case L'M': case L'N': case L'O': + case L'P': case L'Q': case L'R': case L'S': case L'T': + case L'U': case L'V': case L'W': case L'X': case L'Y': + case L'Z': + case L'[': case L'\\': case L']': case L'^': case L'_': + case L'a': case L'b': case L'c': case L'd': case L'e': + case L'f': case L'g': case L'h': case L'i': case L'j': + case L'k': case L'l': case L'm': case L'n': case L'o': + case L'p': case L'q': case L'r': case L's': case L't': + case L'u': case L'v': case L'w': case L'x': case L'y': + case L'z': case L'{': case L'|': case L'}': case L'~': + break; + default: + return (wctype_t) 0; + } +# endif + + /* Avoid overrunning the buffer. */ + if (cp == s + CHAR_CLASS_MAX_LENGTH) + return (wctype_t) 0; + + *cp++ = (char) *wcs++; + } + while (*wcs != L'\0'); + + *cp = '\0'; + +# ifdef _LIBC + return __wctype (s); +# else + return wctype (s); +# endif +} +# define IS_CHAR_CLASS(string) is_char_class (string) + +# include "fnmatch_loop.c" +# endif + + +int +fnmatch (const char *pattern, const char *string, int flags) +{ +# if HANDLE_MULTIBYTE +# define ALLOCA_LIMIT 2000 + if (__builtin_expect (MB_CUR_MAX, 1) != 1) + { + mbstate_t ps; + size_t patsize; + size_t strsize; + size_t totsize; + wchar_t *wpattern; + wchar_t *wstring; + int res; + + /* Calculate the size needed to convert the strings to + wide characters. */ + memset (&ps, '\0', sizeof (ps)); + patsize = mbsrtowcs (NULL, &pattern, 0, &ps) + 1; + if (__builtin_expect (patsize != 0, 1)) + { + assert (mbsinit (&ps)); + strsize = mbsrtowcs (NULL, &string, 0, &ps) + 1; + if (__builtin_expect (strsize != 0, 1)) + { + assert (mbsinit (&ps)); + totsize = patsize + strsize; + if (__builtin_expect (! (patsize <= totsize + && totsize <= SIZE_MAX / sizeof (wchar_t)), + 0)) + { + errno = ENOMEM; + return -1; + } + + /* Allocate room for the wide characters. */ + if (__builtin_expect (totsize < ALLOCA_LIMIT, 1)) + wpattern = (wchar_t *) alloca (totsize * sizeof (wchar_t)); + else + { + wpattern = malloc (totsize * sizeof (wchar_t)); + if (__builtin_expect (! wpattern, 0)) + { + errno = ENOMEM; + return -1; + } + } + wstring = wpattern + patsize; + + /* Convert the strings into wide characters. */ + mbsrtowcs (wpattern, &pattern, patsize, &ps); + assert (mbsinit (&ps)); + mbsrtowcs (wstring, &string, strsize, &ps); + + res = internal_fnwmatch (wpattern, wstring, wstring + strsize - 1, + flags & FNM_PERIOD, flags); + + if (__builtin_expect (! (totsize < ALLOCA_LIMIT), 0)) + free (wpattern); + return res; + } + } + } + +# endif /* HANDLE_MULTIBYTE */ + + return internal_fnmatch (pattern, string, string + strlen (string), + flags & FNM_PERIOD, flags); +} + +# ifdef _LIBC +# undef fnmatch +versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3); +# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3) +strong_alias (__fnmatch, __fnmatch_old) +compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0); +# endif +libc_hidden_ver (__fnmatch, fnmatch) +# endif + +#endif /* _LIBC or not __GNU_LIBRARY__. */ diff --git a/gl/lib/fnmatch.in.h b/gl/lib/fnmatch.in.h new file mode 100644 index 0000000..d4cea65 --- /dev/null +++ b/gl/lib/fnmatch.in.h @@ -0,0 +1,67 @@ +/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _FNMATCH_H +#define _FNMATCH_H 1 + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* We #undef these before defining them because some losing systems + (HP-UX A.08.07 for example) define these in . */ +#undef FNM_PATHNAME +#undef FNM_NOESCAPE +#undef FNM_PERIOD + +/* Bits set in the FLAGS argument to 'fnmatch'. */ +#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match '/'. */ +#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ +#define FNM_PERIOD (1 << 2) /* Leading '.' is matched only explicitly. */ + +#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE +# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ +# define FNM_LEADING_DIR (1 << 3) /* Ignore '/...' after a match. */ +# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ +# define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */ +#endif + +/* Value returned by 'fnmatch' if STRING does not match PATTERN. */ +#define FNM_NOMATCH 1 + +/* This value is returned if the implementation does not support + 'fnmatch'. Since this is not the case here it will never be + returned but the conformance test suites still require the symbol + to be defined. */ +#ifdef _XOPEN_SOURCE +# define FNM_NOSYS (-1) +#endif + +/* Match NAME against the file name pattern PATTERN, + returning zero if it matches, FNM_NOMATCH if not. */ +extern int fnmatch (const char *__pattern, const char *__name, + int __flags) + _GL_ARG_NONNULL ((1, 2)); + +#ifdef __cplusplus +} +#endif + +#endif /* fnmatch.h */ diff --git a/gl/lib/fnmatch_loop.c b/gl/lib/fnmatch_loop.c new file mode 100644 index 0000000..4c6000f --- /dev/null +++ b/gl/lib/fnmatch_loop.c @@ -0,0 +1,1219 @@ +/* Copyright (C) 1991-1993, 1996-2006, 2009-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Match STRING against the file name pattern PATTERN, returning zero if + it matches, nonzero if not. */ +static int EXT (INT opt, const CHAR *pattern, const CHAR *string, + const CHAR *string_end, bool no_leading_period, int flags) + internal_function; +static const CHAR *END (const CHAR *patternp) internal_function; + +static int +internal_function +FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, + bool no_leading_period, int flags) +{ + register const CHAR *p = pattern, *n = string; + register UCHAR c; +#ifdef _LIBC +# if WIDE_CHAR_VERSION + const char *collseq = (const char *) + _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC); +# else + const UCHAR *collseq = (const UCHAR *) + _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQMB); +# endif +#endif + + while ((c = *p++) != L_('\0')) + { + bool new_no_leading_period = false; + c = FOLD (c); + + switch (c) + { + case L_('?'): + if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') + { + int res; + + res = EXT (c, p, n, string_end, no_leading_period, + flags); + if (res != -1) + return res; + } + + if (n == string_end) + return FNM_NOMATCH; + else if (*n == L_('/') && (flags & FNM_FILE_NAME)) + return FNM_NOMATCH; + else if (*n == L_('.') && no_leading_period) + return FNM_NOMATCH; + break; + + case L_('\\'): + if (!(flags & FNM_NOESCAPE)) + { + c = *p++; + if (c == L_('\0')) + /* Trailing \ loses. */ + return FNM_NOMATCH; + c = FOLD (c); + } + if (n == string_end || FOLD ((UCHAR) *n) != c) + return FNM_NOMATCH; + break; + + case L_('*'): + if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') + { + int res; + + res = EXT (c, p, n, string_end, no_leading_period, + flags); + if (res != -1) + return res; + } + + if (n != string_end && *n == L_('.') && no_leading_period) + return FNM_NOMATCH; + + for (c = *p++; c == L_('?') || c == L_('*'); c = *p++) + { + if (*p == L_('(') && (flags & FNM_EXTMATCH) != 0) + { + const CHAR *endp = END (p); + if (endp != p) + { + /* This is a pattern. Skip over it. */ + p = endp; + continue; + } + } + + if (c == L_('?')) + { + /* A ? needs to match one character. */ + if (n == string_end) + /* There isn't another character; no match. */ + return FNM_NOMATCH; + else if (*n == L_('/') + && __builtin_expect (flags & FNM_FILE_NAME, 0)) + /* A slash does not match a wildcard under + FNM_FILE_NAME. */ + return FNM_NOMATCH; + else + /* One character of the string is consumed in matching + this ? wildcard, so *??? won't match if there are + less than three characters. */ + ++n; + } + } + + if (c == L_('\0')) + /* The wildcard(s) is/are the last element of the pattern. + If the name is a file name and contains another slash + this means it cannot match, unless the FNM_LEADING_DIR + flag is set. */ + { + int result = (flags & FNM_FILE_NAME) == 0 ? 0 : FNM_NOMATCH; + + if (flags & FNM_FILE_NAME) + { + if (flags & FNM_LEADING_DIR) + result = 0; + else + { + if (MEMCHR (n, L_('/'), string_end - n) == NULL) + result = 0; + } + } + + return result; + } + else + { + const CHAR *endp; + + endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L_('/') : L_('\0'), + string_end - n); + if (endp == NULL) + endp = string_end; + + if (c == L_('[') + || (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0 + && (c == L_('@') || c == L_('+') || c == L_('!')) + && *p == L_('('))) + { + int flags2 = ((flags & FNM_FILE_NAME) + ? flags : (flags & ~FNM_PERIOD)); + bool no_leading_period2 = no_leading_period; + + for (--p; n < endp; ++n, no_leading_period2 = false) + if (FCT (p, n, string_end, no_leading_period2, flags2) + == 0) + return 0; + } + else if (c == L_('/') && (flags & FNM_FILE_NAME)) + { + while (n < string_end && *n != L_('/')) + ++n; + if (n < string_end && *n == L_('/') + && (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags) + == 0)) + return 0; + } + else + { + int flags2 = ((flags & FNM_FILE_NAME) + ? flags : (flags & ~FNM_PERIOD)); + int no_leading_period2 = no_leading_period; + + if (c == L_('\\') && !(flags & FNM_NOESCAPE)) + c = *p; + c = FOLD (c); + for (--p; n < endp; ++n, no_leading_period2 = false) + if (FOLD ((UCHAR) *n) == c + && (FCT (p, n, string_end, no_leading_period2, flags2) + == 0)) + return 0; + } + } + + /* If we come here no match is possible with the wildcard. */ + return FNM_NOMATCH; + + case L_('['): + { + /* Nonzero if the sense of the character class is inverted. */ + const CHAR *p_init = p; + const CHAR *n_init = n; + register bool not; + CHAR cold; + UCHAR fn; + + if (posixly_correct == 0) + posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; + + if (n == string_end) + return FNM_NOMATCH; + + if (*n == L_('.') && no_leading_period) + return FNM_NOMATCH; + + if (*n == L_('/') && (flags & FNM_FILE_NAME)) + /* '/' cannot be matched. */ + return FNM_NOMATCH; + + not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^'))); + if (not) + ++p; + + fn = FOLD ((UCHAR) *n); + + c = *p++; + for (;;) + { + bool is_range = false; + + if (!(flags & FNM_NOESCAPE) && c == L_('\\')) + { + if (*p == L_('\0')) + return FNM_NOMATCH; + c = FOLD ((UCHAR) *p); + ++p; + + goto normal_bracket; + } + else if (c == L_('[') && *p == L_(':')) + { + /* Leave room for the null. */ + CHAR str[CHAR_CLASS_MAX_LENGTH + 1]; + size_t c1 = 0; +#if defined _LIBC || WIDE_CHAR_SUPPORT + wctype_t wt; +#endif + const CHAR *startp = p; + + for (;;) + { + if (c1 == CHAR_CLASS_MAX_LENGTH) + /* The name is too long and therefore the pattern + is ill-formed. */ + return FNM_NOMATCH; + + c = *++p; + if (c == L_(':') && p[1] == L_(']')) + { + p += 2; + break; + } + if (c < L_('a') || c >= L_('z')) + { + /* This cannot possibly be a character class name. + Match it as a normal range. */ + p = startp; + c = L_('['); + goto normal_bracket; + } + str[c1++] = c; + } + str[c1] = L_('\0'); + +#if defined _LIBC || WIDE_CHAR_SUPPORT + wt = IS_CHAR_CLASS (str); + if (wt == 0) + /* Invalid character class name. */ + return FNM_NOMATCH; + +# if defined _LIBC && ! WIDE_CHAR_VERSION + /* The following code is glibc specific but does + there a good job in speeding up the code since + we can avoid the btowc() call. */ + if (_ISCTYPE ((UCHAR) *n, wt)) + goto matched; +# else + if (ISWCTYPE (BTOWC ((UCHAR) *n), wt)) + goto matched; +# endif +#else + if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n)) + || (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n)) + || (STREQ (str, L_("blank")) && isblank ((UCHAR) *n)) + || (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n)) + || (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n)) + || (STREQ (str, L_("graph")) && isgraph ((UCHAR) *n)) + || (STREQ (str, L_("lower")) && islower ((UCHAR) *n)) + || (STREQ (str, L_("print")) && isprint ((UCHAR) *n)) + || (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n)) + || (STREQ (str, L_("space")) && isspace ((UCHAR) *n)) + || (STREQ (str, L_("upper")) && isupper ((UCHAR) *n)) + || (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n))) + goto matched; +#endif + c = *p++; + } +#ifdef _LIBC + else if (c == L_('[') && *p == L_('=')) + { + UCHAR str[1]; + uint32_t nrules = + _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + const CHAR *startp = p; + + c = *++p; + if (c == L_('\0')) + { + p = startp; + c = L_('['); + goto normal_bracket; + } + str[0] = c; + + c = *++p; + if (c != L_('=') || p[1] != L_(']')) + { + p = startp; + c = L_('['); + goto normal_bracket; + } + p += 2; + + if (nrules == 0) + { + if ((UCHAR) *n == str[0]) + goto matched; + } + else + { + const int32_t *table; +# if WIDE_CHAR_VERSION + const int32_t *weights; + const int32_t *extra; +# else + const unsigned char *weights; + const unsigned char *extra; +# endif + const int32_t *indirect; + int32_t idx; + const UCHAR *cp = (const UCHAR *) str; + + /* This #include defines a local function! */ +# if WIDE_CHAR_VERSION +# include +# else +# include +# endif + +# if WIDE_CHAR_VERSION + table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC); + weights = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC); + extra = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC); + indirect = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC); +# else + table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); + weights = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); + extra = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); + indirect = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); +# endif + + idx = findidx (&cp); + if (idx != 0) + { + /* We found a table entry. Now see whether the + character we are currently at has the same + equivalence class value. */ + int len = weights[idx & 0xffffff]; + int32_t idx2; + const UCHAR *np = (const UCHAR *) n; + + idx2 = findidx (&np); + if (idx2 != 0 + && (idx >> 24) == (idx2 >> 24) + && len == weights[idx2 & 0xffffff]) + { + int cnt = 0; + + idx &= 0xffffff; + idx2 &= 0xffffff; + + while (cnt < len + && (weights[idx + 1 + cnt] + == weights[idx2 + 1 + cnt])) + ++cnt; + + if (cnt == len) + goto matched; + } + } + } + + c = *p++; + } +#endif + else if (c == L_('\0')) + { + /* [ unterminated, treat as normal character. */ + p = p_init; + n = n_init; + c = L_('['); + goto normal_match; + } + else + { +#ifdef _LIBC + bool is_seqval = false; + + if (c == L_('[') && *p == L_('.')) + { + uint32_t nrules = + _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + const CHAR *startp = p; + size_t c1 = 0; + + while (1) + { + c = *++p; + if (c == L_('.') && p[1] == L_(']')) + { + p += 2; + break; + } + if (c == '\0') + return FNM_NOMATCH; + ++c1; + } + + /* We have to handling the symbols differently in + ranges since then the collation sequence is + important. */ + is_range = *p == L_('-') && p[1] != L_('\0'); + + if (nrules == 0) + { + /* There are no names defined in the collation + data. Therefore we only accept the trivial + names consisting of the character itself. */ + if (c1 != 1) + return FNM_NOMATCH; + + if (!is_range && *n == startp[1]) + goto matched; + + cold = startp[1]; + c = *p++; + } + else + { + int32_t table_size; + const int32_t *symb_table; +# ifdef WIDE_CHAR_VERSION + char str[c1]; + size_t strcnt; +# else +# define str (startp + 1) +# endif + const unsigned char *extra; + int32_t idx; + int32_t elem; + int32_t second; + int32_t hash; + +# ifdef WIDE_CHAR_VERSION + /* We have to convert the name to a single-byte + string. This is possible since the names + consist of ASCII characters and the internal + representation is UCS4. */ + for (strcnt = 0; strcnt < c1; ++strcnt) + str[strcnt] = startp[1 + strcnt]; +# endif + + table_size = + _NL_CURRENT_WORD (LC_COLLATE, + _NL_COLLATE_SYMB_HASH_SIZEMB); + symb_table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_SYMB_TABLEMB); + extra = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_SYMB_EXTRAMB); + + /* Locate the character in the hashing table. */ + hash = elem_hash (str, c1); + + idx = 0; + elem = hash % table_size; + if (symb_table[2 * elem] != 0) + { + second = hash % (table_size - 2) + 1; + + do + { + /* First compare the hashing value. */ + if (symb_table[2 * elem] == hash + && (c1 + == extra[symb_table[2 * elem + 1]]) + && memcmp (str, + &extra[symb_table[2 * elem + + 1] + + 1], c1) == 0) + { + /* Yep, this is the entry. */ + idx = symb_table[2 * elem + 1]; + idx += 1 + extra[idx]; + break; + } + + /* Next entry. */ + elem += second; + } + while (symb_table[2 * elem] != 0); + } + + if (symb_table[2 * elem] != 0) + { + /* Compare the byte sequence but only if + this is not part of a range. */ +# ifdef WIDE_CHAR_VERSION + int32_t *wextra; + + idx += 1 + extra[idx]; + /* Adjust for the alignment. */ + idx = (idx + 3) & ~3; + + wextra = (int32_t *) &extra[idx + 4]; +# endif + + if (! is_range) + { +# ifdef WIDE_CHAR_VERSION + for (c1 = 0; + (int32_t) c1 < wextra[idx]; + ++c1) + if (n[c1] != wextra[1 + c1]) + break; + + if ((int32_t) c1 == wextra[idx]) + goto matched; +# else + for (c1 = 0; c1 < extra[idx]; ++c1) + if (n[c1] != extra[1 + c1]) + break; + + if (c1 == extra[idx]) + goto matched; +# endif + } + + /* Get the collation sequence value. */ + is_seqval = true; +# ifdef WIDE_CHAR_VERSION + cold = wextra[1 + wextra[idx]]; +# else + /* Adjust for the alignment. */ + idx += 1 + extra[idx]; + idx = (idx + 3) & ~4; + cold = *((int32_t *) &extra[idx]); +# endif + + c = *p++; + } + else if (c1 == 1) + { + /* No valid character. Match it as a + single byte. */ + if (!is_range && *n == str[0]) + goto matched; + + cold = str[0]; + c = *p++; + } + else + return FNM_NOMATCH; + } + } + else +# undef str +#endif + { + c = FOLD (c); + normal_bracket: + + /* We have to handling the symbols differently in + ranges since then the collation sequence is + important. */ + is_range = (*p == L_('-') && p[1] != L_('\0') + && p[1] != L_(']')); + + if (!is_range && c == fn) + goto matched; + +#if _LIBC + /* This is needed if we goto normal_bracket; from + outside of is_seqval's scope. */ + is_seqval = false; +#endif + + cold = c; + c = *p++; + } + + if (c == L_('-') && *p != L_(']')) + { +#if _LIBC + /* We have to find the collation sequence + value for C. Collation sequence is nothing + we can regularly access. The sequence + value is defined by the order in which the + definitions of the collation values for the + various characters appear in the source + file. A strange concept, nowhere + documented. */ + uint32_t fcollseq; + uint32_t lcollseq; + UCHAR cend = *p++; + +# ifdef WIDE_CHAR_VERSION + /* Search in the 'names' array for the characters. */ + fcollseq = __collseq_table_lookup (collseq, fn); + if (fcollseq == ~((uint32_t) 0)) + /* XXX We don't know anything about the character + we are supposed to match. This means we are + failing. */ + goto range_not_matched; + + if (is_seqval) + lcollseq = cold; + else + lcollseq = __collseq_table_lookup (collseq, cold); +# else + fcollseq = collseq[fn]; + lcollseq = is_seqval ? cold : collseq[(UCHAR) cold]; +# endif + + is_seqval = false; + if (cend == L_('[') && *p == L_('.')) + { + uint32_t nrules = + _NL_CURRENT_WORD (LC_COLLATE, + _NL_COLLATE_NRULES); + const CHAR *startp = p; + size_t c1 = 0; + + while (1) + { + c = *++p; + if (c == L_('.') && p[1] == L_(']')) + { + p += 2; + break; + } + if (c == '\0') + return FNM_NOMATCH; + ++c1; + } + + if (nrules == 0) + { + /* There are no names defined in the + collation data. Therefore we only + accept the trivial names consisting + of the character itself. */ + if (c1 != 1) + return FNM_NOMATCH; + + cend = startp[1]; + } + else + { + int32_t table_size; + const int32_t *symb_table; +# ifdef WIDE_CHAR_VERSION + char str[c1]; + size_t strcnt; +# else +# define str (startp + 1) +# endif + const unsigned char *extra; + int32_t idx; + int32_t elem; + int32_t second; + int32_t hash; + +# ifdef WIDE_CHAR_VERSION + /* We have to convert the name to a single-byte + string. This is possible since the names + consist of ASCII characters and the internal + representation is UCS4. */ + for (strcnt = 0; strcnt < c1; ++strcnt) + str[strcnt] = startp[1 + strcnt]; +# endif + + table_size = + _NL_CURRENT_WORD (LC_COLLATE, + _NL_COLLATE_SYMB_HASH_SIZEMB); + symb_table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_SYMB_TABLEMB); + extra = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_SYMB_EXTRAMB); + + /* Locate the character in the hashing + table. */ + hash = elem_hash (str, c1); + + idx = 0; + elem = hash % table_size; + if (symb_table[2 * elem] != 0) + { + second = hash % (table_size - 2) + 1; + + do + { + /* First compare the hashing value. */ + if (symb_table[2 * elem] == hash + && (c1 + == extra[symb_table[2 * elem + 1]]) + && memcmp (str, + &extra[symb_table[2 * elem + 1] + + 1], c1) == 0) + { + /* Yep, this is the entry. */ + idx = symb_table[2 * elem + 1]; + idx += 1 + extra[idx]; + break; + } + + /* Next entry. */ + elem += second; + } + while (symb_table[2 * elem] != 0); + } + + if (symb_table[2 * elem] != 0) + { + /* Compare the byte sequence but only if + this is not part of a range. */ +# ifdef WIDE_CHAR_VERSION + int32_t *wextra; + + idx += 1 + extra[idx]; + /* Adjust for the alignment. */ + idx = (idx + 3) & ~4; + + wextra = (int32_t *) &extra[idx + 4]; +# endif + /* Get the collation sequence value. */ + is_seqval = true; +# ifdef WIDE_CHAR_VERSION + cend = wextra[1 + wextra[idx]]; +# else + /* Adjust for the alignment. */ + idx += 1 + extra[idx]; + idx = (idx + 3) & ~4; + cend = *((int32_t *) &extra[idx]); +# endif + } + else if (symb_table[2 * elem] != 0 && c1 == 1) + { + cend = str[0]; + c = *p++; + } + else + return FNM_NOMATCH; + } +# undef str + } + else + { + if (!(flags & FNM_NOESCAPE) && cend == L_('\\')) + cend = *p++; + if (cend == L_('\0')) + return FNM_NOMATCH; + cend = FOLD (cend); + } + + /* XXX It is not entirely clear to me how to handle + characters which are not mentioned in the + collation specification. */ + if ( +# ifdef WIDE_CHAR_VERSION + lcollseq == 0xffffffff || +# endif + lcollseq <= fcollseq) + { + /* We have to look at the upper bound. */ + uint32_t hcollseq; + + if (is_seqval) + hcollseq = cend; + else + { +# ifdef WIDE_CHAR_VERSION + hcollseq = + __collseq_table_lookup (collseq, cend); + if (hcollseq == ~((uint32_t) 0)) + { + /* Hum, no information about the upper + bound. The matching succeeds if the + lower bound is matched exactly. */ + if (lcollseq != fcollseq) + goto range_not_matched; + + goto matched; + } +# else + hcollseq = collseq[cend]; +# endif + } + + if (lcollseq <= hcollseq && fcollseq <= hcollseq) + goto matched; + } +# ifdef WIDE_CHAR_VERSION + range_not_matched: +# endif +#else + /* We use a boring value comparison of the character + values. This is better than comparing using + 'strcoll' since the latter would have surprising + and sometimes fatal consequences. */ + UCHAR cend = *p++; + + if (!(flags & FNM_NOESCAPE) && cend == L_('\\')) + cend = *p++; + if (cend == L_('\0')) + return FNM_NOMATCH; + + /* It is a range. */ + if (cold <= fn && fn <= cend) + goto matched; +#endif + + c = *p++; + } + } + + if (c == L_(']')) + break; + } + + if (!not) + return FNM_NOMATCH; + break; + + matched: + /* Skip the rest of the [...] that already matched. */ + do + { + ignore_next: + c = *p++; + + if (c == L_('\0')) + /* [... (unterminated) loses. */ + return FNM_NOMATCH; + + if (!(flags & FNM_NOESCAPE) && c == L_('\\')) + { + if (*p == L_('\0')) + return FNM_NOMATCH; + /* XXX 1003.2d11 is unclear if this is right. */ + ++p; + } + else if (c == L_('[') && *p == L_(':')) + { + int c1 = 0; + const CHAR *startp = p; + + while (1) + { + c = *++p; + if (++c1 == CHAR_CLASS_MAX_LENGTH) + return FNM_NOMATCH; + + if (*p == L_(':') && p[1] == L_(']')) + break; + + if (c < L_('a') || c >= L_('z')) + { + p = startp; + goto ignore_next; + } + } + p += 2; + c = *p++; + } + else if (c == L_('[') && *p == L_('=')) + { + c = *++p; + if (c == L_('\0')) + return FNM_NOMATCH; + c = *++p; + if (c != L_('=') || p[1] != L_(']')) + return FNM_NOMATCH; + p += 2; + c = *p++; + } + else if (c == L_('[') && *p == L_('.')) + { + ++p; + while (1) + { + c = *++p; + if (c == '\0') + return FNM_NOMATCH; + + if (*p == L_('.') && p[1] == L_(']')) + break; + } + p += 2; + c = *p++; + } + } + while (c != L_(']')); + if (not) + return FNM_NOMATCH; + } + break; + + case L_('+'): + case L_('@'): + case L_('!'): + if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') + { + int res; + + res = EXT (c, p, n, string_end, no_leading_period, flags); + if (res != -1) + return res; + } + goto normal_match; + + case L_('/'): + if (NO_LEADING_PERIOD (flags)) + { + if (n == string_end || c != (UCHAR) *n) + return FNM_NOMATCH; + + new_no_leading_period = true; + break; + } + /* FALLTHROUGH */ + default: + normal_match: + if (n == string_end || c != FOLD ((UCHAR) *n)) + return FNM_NOMATCH; + } + + no_leading_period = new_no_leading_period; + ++n; + } + + if (n == string_end) + return 0; + + if ((flags & FNM_LEADING_DIR) && n != string_end && *n == L_('/')) + /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */ + return 0; + + return FNM_NOMATCH; +} + + +static const CHAR * +internal_function +END (const CHAR *pattern) +{ + const CHAR *p = pattern; + + while (1) + if (*++p == L_('\0')) + /* This is an invalid pattern. */ + return pattern; + else if (*p == L_('[')) + { + /* Handle brackets special. */ + if (posixly_correct == 0) + posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; + + /* Skip the not sign. We have to recognize it because of a possibly + following ']'. */ + if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^'))) + ++p; + /* A leading ']' is recognized as such. */ + if (*p == L_(']')) + ++p; + /* Skip over all characters of the list. */ + while (*p != L_(']')) + if (*p++ == L_('\0')) + /* This is no valid pattern. */ + return pattern; + } + else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@') + || *p == L_('!')) && p[1] == L_('(')) + p = END (p + 1); + else if (*p == L_(')')) + break; + + return p + 1; +} + + +static int +internal_function +EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, + bool no_leading_period, int flags) +{ + const CHAR *startp; + size_t level; + struct patternlist + { + struct patternlist *next; + CHAR str[1]; + } *list = NULL; + struct patternlist **lastp = &list; + size_t pattern_len = STRLEN (pattern); + const CHAR *p; + const CHAR *rs; + enum { ALLOCA_LIMIT = 8000 }; + + /* Parse the pattern. Store the individual parts in the list. */ + level = 0; + for (startp = p = pattern + 1; ; ++p) + if (*p == L_('\0')) + /* This is an invalid pattern. */ + return -1; + else if (*p == L_('[')) + { + /* Handle brackets special. */ + if (posixly_correct == 0) + posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; + + /* Skip the not sign. We have to recognize it because of a possibly + following ']'. */ + if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^'))) + ++p; + /* A leading ']' is recognized as such. */ + if (*p == L_(']')) + ++p; + /* Skip over all characters of the list. */ + while (*p != L_(']')) + if (*p++ == L_('\0')) + /* This is no valid pattern. */ + return -1; + } + else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@') + || *p == L_('!')) && p[1] == L_('(')) + /* Remember the nesting level. */ + ++level; + else if (*p == L_(')')) + { + if (level-- == 0) + { + /* This means we found the end of the pattern. */ +#define NEW_PATTERN \ + struct patternlist *newp; \ + size_t plen; \ + size_t plensize; \ + size_t newpsize; \ + \ + plen = (opt == L_('?') || opt == L_('@') \ + ? pattern_len \ + : p - startp + 1UL); \ + plensize = plen * sizeof (CHAR); \ + newpsize = offsetof (struct patternlist, str) + plensize; \ + if ((size_t) -1 / sizeof (CHAR) < plen \ + || newpsize < offsetof (struct patternlist, str) \ + || ALLOCA_LIMIT <= newpsize) \ + return -1; \ + newp = (struct patternlist *) alloca (newpsize); \ + *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0'); \ + newp->next = NULL; \ + *lastp = newp; \ + lastp = &newp->next + NEW_PATTERN; + break; + } + } + else if (*p == L_('|')) + { + if (level == 0) + { + NEW_PATTERN; + startp = p + 1; + } + } + assert (list != NULL); + assert (p[-1] == L_(')')); +#undef NEW_PATTERN + + switch (opt) + { + case L_('*'): + if (FCT (p, string, string_end, no_leading_period, flags) == 0) + return 0; + /* FALLTHROUGH */ + + case L_('+'): + do + { + for (rs = string; rs <= string_end; ++rs) + /* First match the prefix with the current pattern with the + current pattern. */ + if (FCT (list->str, string, rs, no_leading_period, + flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0 + /* This was successful. Now match the rest with the rest + of the pattern. */ + && (FCT (p, rs, string_end, + rs == string + ? no_leading_period + : rs[-1] == '/' && NO_LEADING_PERIOD (flags), + flags & FNM_FILE_NAME + ? flags : flags & ~FNM_PERIOD) == 0 + /* This didn't work. Try the whole pattern. */ + || (rs != string + && FCT (pattern - 1, rs, string_end, + rs == string + ? no_leading_period + : rs[-1] == '/' && NO_LEADING_PERIOD (flags), + flags & FNM_FILE_NAME + ? flags : flags & ~FNM_PERIOD) == 0))) + /* It worked. Signal success. */ + return 0; + } + while ((list = list->next) != NULL); + + /* None of the patterns lead to a match. */ + return FNM_NOMATCH; + + case L_('?'): + if (FCT (p, string, string_end, no_leading_period, flags) == 0) + return 0; + /* FALLTHROUGH */ + + case L_('@'): + do + /* I cannot believe it but 'strcat' is actually acceptable + here. Match the entire string with the prefix from the + pattern list and the rest of the pattern following the + pattern list. */ + if (FCT (STRCAT (list->str, p), string, string_end, + no_leading_period, + flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0) + /* It worked. Signal success. */ + return 0; + while ((list = list->next) != NULL); + + /* None of the patterns lead to a match. */ + return FNM_NOMATCH; + + case L_('!'): + for (rs = string; rs <= string_end; ++rs) + { + struct patternlist *runp; + + for (runp = list; runp != NULL; runp = runp->next) + if (FCT (runp->str, string, rs, no_leading_period, + flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0) + break; + + /* If none of the patterns matched see whether the rest does. */ + if (runp == NULL + && (FCT (p, rs, string_end, + rs == string + ? no_leading_period + : rs[-1] == '/' && NO_LEADING_PERIOD (flags), + flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) + == 0)) + /* This is successful. */ + return 0; + } + + /* None of the patterns together with the rest of the pattern + lead to a match. */ + return FNM_NOMATCH; + + default: + assert (! "Invalid extended matching operator"); + break; + } + + return -1; +} + + +#undef FOLD +#undef CHAR +#undef UCHAR +#undef INT +#undef FCT +#undef EXT +#undef END +#undef MEMPCPY +#undef MEMCHR +#undef STRLEN +#undef STRCAT +#undef L_ +#undef BTOWC diff --git a/gl/lib/fopen-safer.c b/gl/lib/fopen-safer.c new file mode 100644 index 0000000..3c9e286 --- /dev/null +++ b/gl/lib/fopen-safer.c @@ -0,0 +1,63 @@ +/* Invoke fopen, but avoid some glitches. + + Copyright (C) 2001, 2004-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include + +#include "stdio-safer.h" + +#include +#include +#include "unistd-safer.h" + +/* Like fopen, but do not return stdin, stdout, or stderr. */ + +FILE * +fopen_safer (char const *file, char const *mode) +{ + FILE *fp = fopen (file, mode); + + if (fp) + { + int fd = fileno (fp); + + if (0 <= fd && fd <= STDERR_FILENO) + { + int f = dup_safer (fd); + + if (f < 0) + { + int e = errno; + fclose (fp); + errno = e; + return NULL; + } + + if (fclose (fp) != 0 + || ! (fp = fdopen (f, mode))) + { + int e = errno; + close (f); + errno = e; + return NULL; + } + } + } + + return fp; +} diff --git a/gl/lib/fopen.c b/gl/lib/fopen.c new file mode 100644 index 0000000..8fead5a --- /dev/null +++ b/gl/lib/fopen.c @@ -0,0 +1,110 @@ +/* Open a stream to a file. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +/* If the user's config.h happens to include , let it include only + the system's here, so that orig_fopen doesn't recurse to + rpl_fopen. */ +#define __need_FILE +#include + +/* Get the original definition of fopen. It might be defined as a macro. */ +#include +#undef __need_FILE + +static FILE * +orig_fopen (const char *filename, const char *mode) +{ + return fopen (filename, mode); +} + +/* Specification. */ +/* Write "stdio.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates + this include because of the preliminary #include above. */ +#include "stdio.h" + +#include +#include +#include +#include +#include +#include + +FILE * +rpl_fopen (const char *filename, const char *mode) +{ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + if (strcmp (filename, "/dev/null") == 0) + filename = "NUL"; +#endif + +#if FOPEN_TRAILING_SLASH_BUG + /* If the filename ends in a slash and a mode that requires write access is + specified, then fail. + Rationale: POSIX + says that + "A pathname that contains at least one non-slash character and that + ends with one or more trailing slashes shall be resolved as if a + single dot character ( '.' ) were appended to the pathname." + and + "The special filename dot shall refer to the directory specified by + its predecessor." + If the named file already exists as a directory, then if a mode that + requires write access is specified, fopen() must fail because POSIX + says that it + fails with errno = EISDIR in this case. + If the named file does not exist or does not name a directory, then + fopen() must fail since the file does not contain a '.' directory. */ + { + size_t len = strlen (filename); + if (len > 0 && filename[len - 1] == '/') + { + int fd; + struct stat statbuf; + FILE *fp; + + if (mode[0] == 'w' || mode[0] == 'a') + { + errno = EISDIR; + return NULL; + } + + fd = open (filename, O_RDONLY); + if (fd < 0) + return NULL; + + if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) + { + close (fd); + errno = ENOTDIR; + return NULL; + } + + fp = fdopen (fd, mode); + if (fp == NULL) + { + int saved_errno = errno; + close (fd); + errno = saved_errno; + } + return fp; + } + } +# endif + + return orig_fopen (filename, mode); +} diff --git a/gl/lib/fpending.c b/gl/lib/fpending.c new file mode 100644 index 0000000..31aba1a --- /dev/null +++ b/gl/lib/fpending.c @@ -0,0 +1,30 @@ +/* fpending.c -- return the number of pending output bytes on a stream + Copyright (C) 2000, 2004, 2006-2007, 2009-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +#include "fpending.h" + +/* Return the number of pending (aka buffered, unflushed) + bytes on the stream, FP, that is open for writing. */ +size_t +__fpending (FILE *fp) +{ + return PENDING_OUTPUT_N_BYTES; +} diff --git a/gl/lib/fpending.h b/gl/lib/fpending.h new file mode 100644 index 0000000..dd607fe --- /dev/null +++ b/gl/lib/fpending.h @@ -0,0 +1,29 @@ +/* Declare __fpending. + + Copyright (C) 2000, 2003, 2005-2006, 2009-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + Written by Jim Meyering. */ + +#include +#include +#if HAVE_STDIO_EXT_H +# include +#endif + +#if !HAVE_DECL___FPENDING +size_t __fpending (FILE *) _GL_ATTRIBUTE_PURE; +#endif diff --git a/gl/lib/fpurge.c b/gl/lib/fpurge.c new file mode 100644 index 0000000..54a2722 --- /dev/null +++ b/gl/lib/fpurge.c @@ -0,0 +1,145 @@ +/* Flushing buffers of a FILE stream. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */ +# include +#endif +#include + +#include "stdio-impl.h" + +int +fpurge (FILE *fp) +{ +#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, musl libc */ + + __fpurge (fp); + /* The __fpurge function does not have a return value. */ + return 0; + +#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin 1.7 */ + + /* Call the system's fpurge function. */ +# undef fpurge +# if !HAVE_DECL_FPURGE + extern int fpurge (FILE *); +# endif + int result = fpurge (fp); +# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ + if (result == 0) + /* Correct the invariants that fpurge broke. + on BSD systems says: + "The following always hold: if _flags & __SRD, _w is 0." + If this invariant is not fulfilled and the stream is read-write but + currently reading, subsequent putc or fputc calls will write directly + into the buffer, although they shouldn't be allowed to. */ + if ((fp_->_flags & __SRD) != 0) + fp_->_w = 0; +# endif + return result; + +#else + + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + fp->_IO_read_end = fp->_IO_read_ptr; + fp->_IO_write_ptr = fp->_IO_write_base; + /* Avoid memory leak when there is an active ungetc buffer. */ + if (fp->_IO_save_base != NULL) + { + free (fp->_IO_save_base); + fp->_IO_save_base = NULL; + } + return 0; +# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ + fp_->_p = fp_->_bf._base; + fp_->_r = 0; + fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ + ? fp_->_bf._size + : 0); + /* Avoid memory leak when there is an active ungetc buffer. */ + if (fp_ub._base != NULL) + { + if (fp_ub._base != fp_->_ubuf) + free (fp_ub._base); + fp_ub._base = NULL; + } + return 0; +# elif defined __EMX__ /* emx+gcc */ + fp->_ptr = fp->_buffer; + fp->_rcount = 0; + fp->_wcount = 0; + fp->_ungetc_count = 0; + return 0; +# elif defined __minix /* Minix */ + fp->_ptr = fp->_buf; + if (fp->_ptr != NULL) + fp->_count = 0; + return 0; +# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ + fp->_ptr = fp->_base; + if (fp->_ptr != NULL) + fp->_cnt = 0; + return 0; +# elif defined __UCLIBC__ /* uClibc */ +# ifdef __STDIO_BUFFERS + if (fp->__modeflags & __FLAG_WRITING) + fp->__bufpos = fp->__bufstart; + else if (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) + fp->__bufpos = fp->__bufread; +# endif + return 0; +# elif defined __QNX__ /* QNX */ + fp->_Rback = fp->_Back + sizeof (fp->_Back); + fp->_Rsave = NULL; + if (fp->_Mode & 0x2000 /* _MWRITE */) + /* fp->_Buf <= fp->_Next <= fp->_Wend */ + fp->_Next = fp->_Buf; + else + /* fp->_Buf <= fp->_Next <= fp->_Rend */ + fp->_Rend = fp->_Next; + return 0; +# elif defined __MINT__ /* Atari FreeMiNT */ + if (fp->__pushed_back) + { + fp->__bufp = fp->__pushback_bufp; + fp->__pushed_back = 0; + } + /* Preserve the current file position. */ + if (fp->__target != -1) + fp->__target += fp->__bufp - fp->__buffer; + fp->__bufp = fp->__buffer; + /* Nothing in the buffer, next getc is nontrivial. */ + fp->__get_limit = fp->__bufp; + /* Nothing in the buffer, next putc is nontrivial. */ + fp->__put_limit = fp->__buffer; + return 0; +# elif defined EPLAN9 /* Plan9 */ + fp->rp = fp->wp = fp->lp = fp->buf; + return 0; +# else +# error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib." +# endif + +#endif +} diff --git a/gl/lib/freadahead.c b/gl/lib/freadahead.c new file mode 100644 index 0000000..01b0810 --- /dev/null +++ b/gl/lib/freadahead.c @@ -0,0 +1,93 @@ +/* Retrieve information about a FILE stream. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "freadahead.h" + +#include +#include "stdio-impl.h" + +size_t +freadahead (FILE *fp) +{ +#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + if (fp->_IO_write_ptr > fp->_IO_write_base) + return 0; + return (fp->_IO_read_end - fp->_IO_read_ptr) + + (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base : + 0); +#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ + if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0) + return 0; +# if defined __DragonFly__ + return __sreadahead (fp); +# else + return fp_->_r + + (HASUB (fp) ? fp_->_ur : 0); +# endif +#elif defined __EMX__ /* emx+gcc */ + if ((fp->_flags & _IOWRT) != 0) + return 0; + /* Note: fp->_ungetc_count > 0 implies fp->_rcount <= 0, + fp->_ungetc_count = 0 implies fp->_rcount >= 0. */ + /* equivalent to + (fp->_ungetc_count == 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount) */ + return (fp->_rcount > 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount); +#elif defined __minix /* Minix */ + if ((fp_->_flags & _IOWRITING) != 0) + return 0; + return fp_->_count; +#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ + if ((fp_->_flag & _IOWRT) != 0) + return 0; + return fp_->_cnt; +#elif defined __UCLIBC__ /* uClibc */ +# ifdef __STDIO_BUFFERS + if (fp->__modeflags & __FLAG_WRITING) + return 0; + return (fp->__bufread - fp->__bufpos) + + (fp->__modeflags & __FLAG_UNGOT ? 1 : 0); +# else + return 0; +# endif +#elif defined __QNX__ /* QNX */ + if ((fp->_Mode & 0x2000 /* _MWRITE */) != 0) + return 0; + /* fp->_Buf <= fp->_Next <= fp->_Rend, + and fp->_Rend may be overridden by fp->_Rsave. */ + return ((fp->_Rsave ? fp->_Rsave : fp->_Rend) - fp->_Next) + + (fp->_Mode & 0x4000 /* _MBYTE */ + ? (fp->_Back + sizeof (fp->_Back)) - fp->_Rback + : 0); +#elif defined __MINT__ /* Atari FreeMiNT */ + if (!fp->__mode.__read) + return 0; + return (fp->__pushed_back + ? fp->__get_limit - fp->__pushback_bufp + 1 + : fp->__get_limit - fp->__bufp); +#elif defined EPLAN9 /* Plan9 */ + if (fp->state == 4 /* WR */ || fp->rp >= fp->wp) + return 0; + return fp->wp - fp->rp; +#elif defined SLOW_BUT_NO_HACKS /* users can define this */ + abort (); + return 0; +#else + #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib." +#endif +} diff --git a/gl/lib/freadahead.h b/gl/lib/freadahead.h new file mode 100644 index 0000000..85c16b9 --- /dev/null +++ b/gl/lib/freadahead.h @@ -0,0 +1,47 @@ +/* Retrieve information about a FILE stream. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include + +/* Assuming the stream STREAM is open for reading: + Return the number of bytes waiting in the input buffer of STREAM. + This includes both the bytes that have been read from the underlying input + source and the bytes that have been pushed back through 'ungetc'. + + If this number is 0 and the stream is not currently writing, + fflush (STREAM) is known to be a no-op. + + STREAM must not be wide-character oriented. */ + +#if HAVE___FREADAHEAD /* musl libc */ + +# include +# define freadahead(stream) __freadahead (stream) + +#else + +# ifdef __cplusplus +extern "C" { +# endif + +extern size_t freadahead (FILE *stream) _GL_ATTRIBUTE_PURE; + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/gl/lib/freading.c b/gl/lib/freading.c new file mode 100644 index 0000000..dee4325 --- /dev/null +++ b/gl/lib/freading.c @@ -0,0 +1,74 @@ +/* Retrieve information about a FILE stream. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "freading.h" + +#include "stdio-impl.h" + +/* Don't use glibc's __freading function in glibc < 2.7, see + */ +#if !(HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))) + +bool +freading (FILE *fp) +{ + /* Most systems provide FILE as a struct and the necessary bitmask in + , because they need it for implementing getc() and putc() as + fast macros. */ +# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + return ((fp->_flags & _IO_NO_WRITES) != 0 + || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 + && fp->_IO_read_base != NULL)); +# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ + return (fp_->_flags & __SRD) != 0; +# elif defined __EMX__ /* emx+gcc */ + return (fp->_flags & _IOREAD) != 0; +# elif defined __minix /* Minix */ + return (fp->_flags & _IOREADING) != 0; +# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ +# if defined __sun /* Solaris */ + return (fp->_flag & _IOREAD) != 0 && (fp->_flag & _IOWRT) == 0; +# else + return (fp->_flag & _IOREAD) != 0; +# endif +# elif defined __UCLIBC__ /* uClibc */ + return (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) != 0; +# elif defined __QNX__ /* QNX */ + return ((fp->_Mode & 0x2 /* _MOPENW */) == 0 + || (fp->_Mode & 0x1000 /* _MREAD */) != 0); +# elif defined __MINT__ /* Atari FreeMiNT */ + if (!fp->__mode.__write) + return 1; + if (!fp->__mode.__read) + return 0; +# ifdef _IO_CURRENTLY_GETTING /* Flag added on 2009-02-28 */ + return (fp->__flags & _IO_CURRENTLY_GETTING) != 0; +# else + return (fp->__buffer < fp->__get_limit /*|| fp->__bufp == fp->__put_limit ??*/); +# endif +# elif defined EPLAN9 /* Plan9 */ + if (fp->state == 0 /* CLOSED */ || fp->state == 4 /* WR */) + return 0; + return (fp->state == 3 /* RD */ && (fp->bufl == 0 || fp->rp < fp->wp)); +# else +# error "Please port gnulib freading.c to your platform!" +# endif +} + +#endif diff --git a/gl/lib/freading.h b/gl/lib/freading.h new file mode 100644 index 0000000..3d1c7b2 --- /dev/null +++ b/gl/lib/freading.h @@ -0,0 +1,53 @@ +/* Retrieve information about a FILE stream. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include + +/* Return true if the stream STREAM is opened read-only, or if the + last operation on the stream was a read operation. Return false if + the stream is opened write-only or append-only, or if it supports + writing and there is no current read operation (such as fgetc). + + freading and fwriting will never both be true. If STREAM supports + both reads and writes, then: + - both freading and fwriting might be false when the stream is first + opened, after read encounters EOF, or after fflush, + - freading might be false or true and fwriting might be false + after repositioning (such as fseek, fsetpos, or rewind), + depending on the underlying implementation. + + STREAM must not be wide-character oriented. */ + +#if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) +/* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7, or musl libc */ + +# include +# define freading(stream) (__freading (stream) != 0) + +#else + +# ifdef __cplusplus +extern "C" { +# endif + +extern bool freading (FILE *stream) _GL_ATTRIBUTE_PURE; + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/gl/lib/fseek.c b/gl/lib/fseek.c new file mode 100644 index 0000000..f778145 --- /dev/null +++ b/gl/lib/fseek.c @@ -0,0 +1,30 @@ +/* An fseek() function that, together with fflush(), is POSIX compliant. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +/* Get off_t. */ +#include + +int +fseek (FILE *fp, long offset, int whence) +{ + /* Use the replacement fseeko function with all its workarounds. */ + return fseeko (fp, (off_t)offset, whence); +} diff --git a/gl/lib/fseeko.c b/gl/lib/fseeko.c new file mode 100644 index 0000000..e56ad0b --- /dev/null +++ b/gl/lib/fseeko.c @@ -0,0 +1,159 @@ +/* An fseeko() function that, together with fflush(), is POSIX compliant. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#include + +/* Specification. */ +#include + +/* Get off_t, lseek, _POSIX_VERSION. */ +#include + +#include "stdio-impl.h" + +int +fseeko (FILE *fp, off_t offset, int whence) +#undef fseeko +#if !HAVE_FSEEKO +# undef fseek +# define fseeko fseek +#endif +#if _GL_WINDOWS_64_BIT_OFF_T +# undef fseeko +# if HAVE__FSEEKI64 /* msvc, mingw64 */ +# define fseeko _fseeki64 +# else /* mingw */ +# define fseeko fseeko64 +# endif +#endif +{ +#if LSEEK_PIPE_BROKEN + /* mingw gives bogus answers rather than failure on non-seekable files. */ + if (lseek (fileno (fp), 0, SEEK_CUR) == -1) + return EOF; +#endif + + /* These tests are based on fpurge.c. */ +#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ + 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, Mac OS X, Cygwin */ +# if defined __SL64 && defined __SCLE /* Cygwin */ + if ((fp->_flags & __SL64) == 0) + { + /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit + mode; but has an fseeko that requires 64-bit mode. */ + FILE *tmp = fopen ("/dev/null", "r"); + if (!tmp) + return -1; + fp->_flags |= __SL64; + fp->_seek64 = tmp->_seek64; + fclose (tmp); + } +# endif + if (fp_->_p == fp_->_bf._base + && fp_->_r == 0 + && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ + ? fp_->_bf._size + : 0) + && fp_ub._base == NULL) +#elif defined __EMX__ /* emx+gcc */ + if (fp->_ptr == fp->_buffer + && fp->_rcount == 0 + && fp->_wcount == 0 + && fp->_ungetc_count == 0) +#elif defined __minix /* Minix */ + if (fp_->_ptr == fp_->_buf + && (fp_->_ptr == NULL || fp_->_count == 0)) +#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ + if (fp_->_ptr == fp_->_base + && (fp_->_ptr == NULL || fp_->_cnt == 0)) +#elif defined __UCLIBC__ /* uClibc */ + if (((fp->__modeflags & __FLAG_WRITING) == 0 + || fp->__bufpos == fp->__bufstart) + && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0 + || fp->__bufpos == fp->__bufread)) +#elif defined __QNX__ /* QNX */ + if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend) + && fp->_Rback == fp->_Back + sizeof (fp->_Back) + && fp->_Rsave == NULL) +#elif defined __MINT__ /* Atari FreeMiNT */ + if (fp->__bufp == fp->__buffer + && fp->__get_limit == fp->__bufp + && fp->__put_limit == fp->__bufp + && !fp->__pushed_back) +#elif defined EPLAN9 /* Plan9 */ + if (fp->rp == fp->buf + && fp->wp == fp->buf) +#elif FUNC_FFLUSH_STDIN < 0 && 200809 <= _POSIX_VERSION + /* Cross-compiling to some other system advertising conformance to + POSIX.1-2008 or later. Assume fseeko and fflush work as advertised. + If this assumption is incorrect, please report the bug to + bug-gnulib. */ + if (0) +#else + #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib." +#endif + { + /* We get here when an fflush() call immediately preceded this one (or + if ftell() has created buffers but no I/O has occurred on a + newly-opened stream). We know there are no buffers. */ + off_t pos = lseek (fileno (fp), offset, whence); + if (pos == -1) + { +#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ + fp_->_flags &= ~__SOFF; +#endif + return -1; + } + +#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, Mac OS X, Cygwin */ +# if defined __CYGWIN__ + /* fp_->_offset is typed as an integer. */ + fp_->_offset = pos; +# else + /* fp_->_offset is an fpos_t. */ + { + /* Use a union, since on NetBSD, the compilation flags + determine whether fpos_t is typedef'd to off_t or a struct + containing a single off_t member. */ + union + { + fpos_t f; + off_t o; + } u; + u.o = pos; + fp_->_offset = u.f; + } +# endif + fp_->_flags |= __SOFF; + fp_->_flags &= ~__SEOF; +#elif defined __EMX__ /* emx+gcc */ + fp->_flags &= ~_IOEOF; +#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ + fp->_flag &= ~_IOEOF; +#elif defined __MINT__ /* Atari FreeMiNT */ + fp->__offset = pos; + fp->__eof = 0; +#endif + return 0; + } + return fseeko (fp, offset, whence); +} diff --git a/gl/lib/fstat.c b/gl/lib/fstat.c new file mode 100644 index 0000000..ffcda9f --- /dev/null +++ b/gl/lib/fstat.c @@ -0,0 +1,88 @@ +/* fstat() replacement. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* If the user's config.h happens to include , let it include only + the system's here, so that orig_fstat doesn't recurse to + rpl_fstat. */ +#define __need_system_sys_stat_h +#include + +/* Get the original definition of fstat. It might be defined as a macro. */ +#include +#include +#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 int +orig_fstat (int fd, struct stat *buf) +{ + return fstat (fd, buf); +} + +/* Specification. */ +/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include + above. */ +#include "sys/stat.h" + +#include +#include + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +# include "msvc-inval.h" +#endif + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static int +fstat_nothrow (int fd, struct stat *buf) +{ + int result; + + TRY_MSVC_INVAL + { + result = orig_fstat (fd, buf); + } + CATCH_MSVC_INVAL + { + result = -1; + errno = EBADF; + } + DONE_MSVC_INVAL; + + return result; +} +#else +# define fstat_nothrow orig_fstat +#endif + +int +rpl_fstat (int fd, struct stat *buf) +{ +#if REPLACE_FCHDIR && REPLACE_OPEN_DIRECTORY + /* Handle the case when rpl_open() used a dummy file descriptor to work + around an open() that can't normally visit directories. */ + const char *name = _gl_directory_name (fd); + if (name != NULL) + return stat (name, buf); +#endif + + return fstat_nothrow (fd, buf); +} diff --git a/gl/lib/fstatat.c b/gl/lib/fstatat.c new file mode 100644 index 0000000..44e3266 --- /dev/null +++ b/gl/lib/fstatat.c @@ -0,0 +1,135 @@ +/* Work around an fstatat bug on Solaris 9. + + Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert and Jim Meyering. */ + +/* If the user's config.h happens to include , let it include only + the system's here, so that orig_fstatat doesn't recurse to + rpl_fstatat. */ +#define __need_system_sys_stat_h +#include + +/* Get the original definition of fstatat. It might be defined as a macro. */ +#include +#include +#undef __need_system_sys_stat_h + +#if HAVE_FSTATAT +static int +orig_fstatat (int fd, char const *filename, struct stat *buf, int flags) +{ + return fstatat (fd, filename, buf, flags); +} +#endif + +/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include + above. */ +#include "sys/stat.h" + +#include +#include +#include + +#if HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG + +# ifndef LSTAT_FOLLOWS_SLASHED_SYMLINK +# define LSTAT_FOLLOWS_SLASHED_SYMLINK 0 +# endif + +/* fstatat should always follow symbolic links that end in /, but on + Solaris 9 it doesn't if AT_SYMLINK_NOFOLLOW is specified. + Likewise, trailing slash on a non-directory should be an error. + These are the same problems that lstat.c and stat.c address, so + solve it in a similar way. + + AIX 7.1 fstatat (AT_FDCWD, ..., 0) always fails, which is a bug. + Work around this bug if FSTATAT_AT_FDCWD_0_BROKEN is nonzero. */ + +int +rpl_fstatat (int fd, char const *file, struct stat *st, int flag) +{ + int result = orig_fstatat (fd, file, st, flag); + size_t len; + + if (LSTAT_FOLLOWS_SLASHED_SYMLINK || result != 0) + return result; + len = strlen (file); + if (flag & AT_SYMLINK_NOFOLLOW) + { + /* Fix lstat behavior. */ + if (file[len - 1] != '/' || S_ISDIR (st->st_mode)) + return 0; + if (!S_ISLNK (st->st_mode)) + { + errno = ENOTDIR; + return -1; + } + result = orig_fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW); + } + /* Fix stat behavior. */ + if (result == 0 && !S_ISDIR (st->st_mode) && file[len - 1] == '/') + { + errno = ENOTDIR; + return -1; + } + return result; +} + +#else /* ! (HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG) */ + +/* On mingw, the gnulib defines 'stat' as a function-like + macro; but using it in AT_FUNC_F2 causes compilation failure + because the preprocessor sees a use of a macro that requires two + arguments but is only given one. Hence, we need an inline + forwarder to get past the preprocessor. */ +static int +stat_func (char const *name, struct stat *st) +{ + return stat (name, st); +} + +/* Likewise, if there is no native 'lstat', then the gnulib + defined it as stat, which also needs adjustment. */ +# if !HAVE_LSTAT +# undef lstat +# define lstat stat_func +# endif + +/* Replacement for Solaris' function by the same name. + + First, try to simulate it via l?stat ("/proc/self/fd/FD/FILE"). + Failing that, simulate it via save_cwd/fchdir/(stat|lstat)/restore_cwd. + If either the save_cwd or the restore_cwd fails (relatively unlikely), + then give a diagnostic and exit nonzero. + Otherwise, this function works just like Solaris' fstatat. */ + +# define AT_FUNC_NAME fstatat +# define AT_FUNC_F1 lstat +# define AT_FUNC_F2 stat_func +# define AT_FUNC_USE_F1_COND AT_SYMLINK_NOFOLLOW +# define AT_FUNC_POST_FILE_PARAM_DECLS , struct stat *st, int flag +# define AT_FUNC_POST_FILE_ARGS , st +# include "at-func.c" +# undef AT_FUNC_NAME +# undef AT_FUNC_F1 +# undef AT_FUNC_F2 +# undef AT_FUNC_USE_F1_COND +# undef AT_FUNC_POST_FILE_PARAM_DECLS +# undef AT_FUNC_POST_FILE_ARGS + +#endif /* !HAVE_FSTATAT */ diff --git a/gl/lib/ftell.c b/gl/lib/ftell.c new file mode 100644 index 0000000..d5cbccd --- /dev/null +++ b/gl/lib/ftell.c @@ -0,0 +1,37 @@ +/* An ftell() function that works around platform bugs. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include + +long +ftell (FILE *fp) +{ + /* Use the replacement ftello function with all its workarounds. */ + off_t offset = ftello (fp); + if (LONG_MIN <= offset && offset <= LONG_MAX) + return /* (long) */ offset; + else + { + errno = EOVERFLOW; + return -1; + } +} diff --git a/gl/lib/ftello.c b/gl/lib/ftello.c new file mode 100644 index 0000000..ee4f7dc --- /dev/null +++ b/gl/lib/ftello.c @@ -0,0 +1,85 @@ +/* An ftello() function that works around platform bugs. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +/* Get lseek. */ +#include + +#include "stdio-impl.h" + +off_t +ftello (FILE *fp) +#undef ftello +#if !HAVE_FTELLO +# undef ftell +# define ftello ftell +#endif +#if _GL_WINDOWS_64_BIT_OFF_T +# undef ftello +# if HAVE__FTELLI64 /* msvc, mingw64 */ +# define ftello _ftelli64 +# else /* mingw */ +# define ftello ftello64 +# endif +#endif +{ +#if LSEEK_PIPE_BROKEN + /* mingw gives bogus answers rather than failure on non-seekable files. */ + if (lseek (fileno (fp), 0, SEEK_CUR) == -1) + return -1; +#endif + +#if FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE /* Solaris */ + /* The Solaris stdio leaves the _IOREAD flag set after reading from a file + reaches EOF and the program then starts writing to the file. ftello + gets confused by this. */ + if (fp_->_flag & _IOWRT) + { + off_t pos; + + /* Call ftello nevertheless, for the side effects that it does on fp. */ + ftello (fp); + + /* Compute the file position ourselves. */ + pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR); + if (pos >= 0) + { + if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) + pos += fp_->_ptr - fp_->_base; + } + return pos; + } +#endif + +#if defined __SL64 && defined __SCLE /* Cygwin */ + if ((fp->_flags & __SL64) == 0) + { + /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit + mode; but has an ftello that requires 64-bit mode. */ + FILE *tmp = fopen ("/dev/null", "r"); + if (!tmp) + return -1; + fp->_flags |= __SL64; + fp->_seek64 = tmp->_seek64; + fclose (tmp); + } +#endif + return ftello (fp); +} diff --git a/gl/lib/fts-cycle.c b/gl/lib/fts-cycle.c new file mode 100644 index 0000000..95da56e --- /dev/null +++ b/gl/lib/fts-cycle.c @@ -0,0 +1,160 @@ +/* Detect cycles in file tree walks. + + Copyright (C) 2003-2006, 2009-2014 Free Software Foundation, Inc. + + Written by Jim Meyering. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include "cycle-check.h" +#include "hash.h" + +/* Use each of these to map a device/inode pair to an FTSENT. */ +struct Active_dir +{ + dev_t dev; + ino_t ino; + FTSENT *fts_ent; +}; + +static bool +AD_compare (void const *x, void const *y) +{ + struct Active_dir const *ax = x; + struct Active_dir const *ay = y; + return ax->ino == ay->ino + && ax->dev == ay->dev; +} + +static size_t +AD_hash (void const *x, size_t table_size) +{ + struct Active_dir const *ax = x; + return (uintmax_t) ax->ino % table_size; +} + +/* Set up the cycle-detection machinery. */ + +static bool +setup_dir (FTS *fts) +{ + if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) + { + enum { HT_INITIAL_SIZE = 31 }; + fts->fts_cycle.ht = hash_initialize (HT_INITIAL_SIZE, NULL, AD_hash, + AD_compare, free); + if (! fts->fts_cycle.ht) + return false; + } + else + { + fts->fts_cycle.state = malloc (sizeof *fts->fts_cycle.state); + if (! fts->fts_cycle.state) + return false; + cycle_check_init (fts->fts_cycle.state); + } + + return true; +} + +/* Enter a directory during a file tree walk. */ + +static bool +enter_dir (FTS *fts, FTSENT *ent) +{ + if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) + { + struct stat const *st = ent->fts_statp; + struct Active_dir *ad = malloc (sizeof *ad); + struct Active_dir *ad_from_table; + + if (!ad) + return false; + + ad->dev = st->st_dev; + ad->ino = st->st_ino; + ad->fts_ent = ent; + + /* See if we've already encountered this directory. + This can happen when following symlinks as well as + with a corrupted directory hierarchy. */ + ad_from_table = hash_insert (fts->fts_cycle.ht, ad); + + if (ad_from_table != ad) + { + free (ad); + if (!ad_from_table) + return false; + + /* There was an entry with matching dev/inode already in the table. + Record the fact that we've found a cycle. */ + ent->fts_cycle = ad_from_table->fts_ent; + ent->fts_info = FTS_DC; + } + } + else + { + if (cycle_check (fts->fts_cycle.state, ent->fts_statp)) + { + /* FIXME: setting fts_cycle like this isn't proper. + To do what the documentation requires, we'd have to + go around the cycle again and find the right entry. + But no callers in coreutils use the fts_cycle member. */ + ent->fts_cycle = ent; + ent->fts_info = FTS_DC; + } + } + + return true; +} + +/* Leave a directory during a file tree walk. */ + +static void +leave_dir (FTS *fts, FTSENT *ent) +{ + struct stat const *st = ent->fts_statp; + if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) + { + struct Active_dir obj; + void *found; + obj.dev = st->st_dev; + obj.ino = st->st_ino; + found = hash_delete (fts->fts_cycle.ht, &obj); + if (!found) + abort (); + free (found); + } + else + { + FTSENT *parent = ent->fts_parent; + if (parent != NULL && 0 <= parent->fts_level) + CYCLE_CHECK_REFLECT_CHDIR_UP (fts->fts_cycle.state, + *(parent->fts_statp), *st); + } +} + +/* Free any memory used for cycle detection. */ + +static void +free_dir (FTS *sp) +{ + if (sp->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) + { + if (sp->fts_cycle.ht) + hash_free (sp->fts_cycle.ht); + } + else + free (sp->fts_cycle.state); +} diff --git a/gl/lib/fts.c b/gl/lib/fts.c new file mode 100644 index 0000000..500e92c --- /dev/null +++ b/gl/lib/fts.c @@ -0,0 +1,2108 @@ +/* Traverse a file hierarchy. + + Copyright (C) 2004-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; +#endif /* LIBC_SCCS and not lint */ + +#include "fts_.h" + +#if HAVE_SYS_PARAM_H || defined _LIBC +# include +#endif +#ifdef _LIBC +# include +#else +# include +#endif +#include +#include +#include +#include +#include +#include + +#if ! _LIBC +# include "fcntl--.h" +# include "dirent--.h" +# include "unistd--.h" +/* FIXME - use fcntl(F_DUPFD_CLOEXEC)/openat(O_CLOEXEC) once they are + supported. */ +# include "cloexec.h" +# include "openat.h" +# include "same-inode.h" +#endif + +#include +#ifndef _D_EXACT_NAMLEN +# define _D_EXACT_NAMLEN(dirent) strlen ((dirent)->d_name) +#endif + +#if HAVE_STRUCT_DIRENT_D_TYPE +/* True if the type of the directory entry D is known. */ +# define DT_IS_KNOWN(d) ((d)->d_type != DT_UNKNOWN) +/* True if the type of the directory entry D must be T. */ +# define DT_MUST_BE(d, t) ((d)->d_type == (t)) +# define D_TYPE(d) ((d)->d_type) +#else +# define DT_IS_KNOWN(d) false +# define DT_MUST_BE(d, t) false +# define D_TYPE(d) DT_UNKNOWN + +# undef DT_UNKNOWN +# define DT_UNKNOWN 0 + +/* Any nonzero values will do here, so long as they're distinct. + Undef any existing macros out of the way. */ +# undef DT_BLK +# undef DT_CHR +# undef DT_DIR +# undef DT_FIFO +# undef DT_LNK +# undef DT_REG +# undef DT_SOCK +# define DT_BLK 1 +# define DT_CHR 2 +# define DT_DIR 3 +# define DT_FIFO 4 +# define DT_LNK 5 +# define DT_REG 6 +# define DT_SOCK 7 +#endif + +#ifndef S_IFLNK +# define S_IFLNK 0 +#endif +#ifndef S_IFSOCK +# define S_IFSOCK 0 +#endif + +enum +{ + NOT_AN_INODE_NUMBER = 0 +}; + +#ifdef D_INO_IN_DIRENT +# define D_INO(dp) (dp)->d_ino +#else +/* Some systems don't have inodes, so fake them to avoid lots of ifdefs. */ +# define D_INO(dp) NOT_AN_INODE_NUMBER +#endif + +/* If possible (see max_entries, below), read no more than this many directory + entries at a time. Without this limit (i.e., when using non-NULL + fts_compar), processing a directory with 4,000,000 entries requires ~1GiB + of memory, and handling 64M entries would require 16GiB of memory. */ +#ifndef FTS_MAX_READDIR_ENTRIES +# define FTS_MAX_READDIR_ENTRIES 100000 +#endif + +/* If there are more than this many entries in a directory, + and the conditions mentioned below are satisfied, then sort + the entries on inode number before any further processing. */ +#ifndef FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD +# define FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD 10000 +#endif + +enum +{ + _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD = FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD +}; + +enum Fts_stat +{ + FTS_NO_STAT_REQUIRED = 1, + FTS_STAT_REQUIRED = 2 +}; + +#ifdef _LIBC +# undef close +# define close __close +# undef closedir +# define closedir __closedir +# undef fchdir +# define fchdir __fchdir +# undef open +# define open __open +# undef readdir +# define readdir __readdir +#else +# undef internal_function +# define internal_function /* empty */ +#endif + +#ifndef __set_errno +# define __set_errno(Val) errno = (Val) +#endif + +/* If this host provides the openat function, then we can avoid + attempting to open "." in some initialization code below. */ +#ifdef HAVE_OPENAT +# define HAVE_OPENAT_SUPPORT 1 +#else +# define HAVE_OPENAT_SUPPORT 0 +#endif + +#ifdef NDEBUG +# define fts_assert(expr) ((void) 0) +#else +# define fts_assert(expr) \ + do \ + { \ + if (!(expr)) \ + abort (); \ + } \ + while (false) +#endif + +static FTSENT *fts_alloc (FTS *, const char *, size_t) internal_function; +static FTSENT *fts_build (FTS *, int) internal_function; +static void fts_lfree (FTSENT *) internal_function; +static void fts_load (FTS *, FTSENT *) internal_function; +static size_t fts_maxarglen (char * const *) internal_function; +static void fts_padjust (FTS *, FTSENT *) internal_function; +static bool fts_palloc (FTS *, size_t) internal_function; +static FTSENT *fts_sort (FTS *, FTSENT *, size_t) internal_function; +static unsigned short int fts_stat (FTS *, FTSENT *, bool) internal_function; +static int fts_safe_changedir (FTS *, FTSENT *, int, const char *) + internal_function; + +#include "fts-cycle.c" + +#ifndef MAX +# define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + +#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) +#define STREQ(a, b) (strcmp (a, b) == 0) + +#define CLR(opt) (sp->fts_options &= ~(opt)) +#define ISSET(opt) (sp->fts_options & (opt)) +#define SET(opt) (sp->fts_options |= (opt)) + +/* FIXME: FTS_NOCHDIR is now misnamed. + Call it FTS_USE_FULL_RELATIVE_FILE_NAMES instead. */ +#define FCHDIR(sp, fd) \ + (!ISSET(FTS_NOCHDIR) && (ISSET(FTS_CWDFD) \ + ? (cwd_advance_fd ((sp), (fd), true), 0) \ + : fchdir (fd))) + + +/* fts_build flags */ +/* FIXME: make this an enum */ +#define BCHILD 1 /* fts_children */ +#define BNAMES 2 /* fts_children, names only */ +#define BREAD 3 /* fts_read */ + +#if FTS_DEBUG +# include +# include +# include +# include "getcwdat.h" +bool fts_debug = false; +# define Dprintf(x) do { if (fts_debug) printf x; } while (false) +#else +# define Dprintf(x) +# define fd_ring_check(x) +# define fd_ring_print(a, b, c) +#endif + +#define LEAVE_DIR(Fts, Ent, Tag) \ + do \ + { \ + Dprintf ((" %s-leaving: %s\n", Tag, (Ent)->fts_path)); \ + leave_dir (Fts, Ent); \ + fd_ring_check (Fts); \ + } \ + while (false) + +static void +fd_ring_clear (I_ring *fd_ring) +{ + while ( ! i_ring_empty (fd_ring)) + { + int fd = i_ring_pop (fd_ring); + if (0 <= fd) + close (fd); + } +} + +/* Overload the fts_statp->st_size member (otherwise unused, when + fts_info is FTS_NSOK) to indicate whether fts_read should stat + this entry or not. */ +static void +fts_set_stat_required (FTSENT *p, bool required) +{ + fts_assert (p->fts_info == FTS_NSOK); + p->fts_statp->st_size = (required + ? FTS_STAT_REQUIRED + : FTS_NO_STAT_REQUIRED); +} + +/* file-descriptor-relative opendir. */ +/* FIXME: if others need this function, move it into lib/openat.c */ +static DIR * +internal_function +opendirat (int fd, char const *dir, int extra_flags, int *pdir_fd) +{ + int new_fd = openat (fd, dir, + (O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK + | extra_flags)); + DIR *dirp; + + if (new_fd < 0) + return NULL; + set_cloexec_flag (new_fd, true); + dirp = fdopendir (new_fd); + if (dirp) + *pdir_fd = new_fd; + else + { + int saved_errno = errno; + close (new_fd); + errno = saved_errno; + } + return dirp; +} + +/* Virtual fchdir. Advance SP's working directory file descriptor, + SP->fts_cwd_fd, to FD, and push the previous value onto the fd_ring. + CHDIR_DOWN_ONE is true if FD corresponds to an entry in the directory + open on sp->fts_cwd_fd; i.e., to move the working directory one level + down. */ +static void +internal_function +cwd_advance_fd (FTS *sp, int fd, bool chdir_down_one) +{ + int old = sp->fts_cwd_fd; + fts_assert (old != fd || old == AT_FDCWD); + + if (chdir_down_one) + { + /* Push "old" onto the ring. + If the displaced file descriptor is non-negative, close it. */ + int prev_fd_in_slot = i_ring_push (&sp->fts_fd_ring, old); + fd_ring_print (sp, stderr, "post-push"); + if (0 <= prev_fd_in_slot) + close (prev_fd_in_slot); /* ignore any close failure */ + } + else if ( ! ISSET (FTS_NOCHDIR)) + { + if (0 <= old) + close (old); /* ignore any close failure */ + } + + sp->fts_cwd_fd = fd; +} + +/* Restore the initial, pre-traversal, "working directory". + In FTS_CWDFD mode, we merely call cwd_advance_fd, otherwise, + we may actually change the working directory. + Return 0 upon success. Upon failure, set errno and return nonzero. */ +static int +restore_initial_cwd (FTS *sp) +{ + int fail = FCHDIR (sp, ISSET (FTS_CWDFD) ? AT_FDCWD : sp->fts_rfd); + fd_ring_clear (&(sp->fts_fd_ring)); + return fail; +} + +/* Open the directory DIR if possible, and return a file + descriptor. Return -1 and set errno on failure. It doesn't matter + whether the file descriptor has read or write access. */ + +static int +internal_function +diropen (FTS const *sp, char const *dir) +{ + int open_flags = (O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK + | (ISSET (FTS_PHYSICAL) ? O_NOFOLLOW : 0) + | (ISSET (FTS_NOATIME) ? O_NOATIME : 0)); + + int fd = (ISSET (FTS_CWDFD) + ? openat (sp->fts_cwd_fd, dir, open_flags) + : open (dir, open_flags)); + if (0 <= fd) + set_cloexec_flag (fd, true); + return fd; +} + +FTS * +fts_open (char * const *argv, + register int options, + int (*compar) (FTSENT const **, FTSENT const **)) +{ + register FTS *sp; + register FTSENT *p, *root; + register size_t nitems; + FTSENT *parent = NULL; + FTSENT *tmp = NULL; /* pacify gcc */ + bool defer_stat; + + /* Options check. */ + if (options & ~FTS_OPTIONMASK) { + __set_errno (EINVAL); + return (NULL); + } + if ((options & FTS_NOCHDIR) && (options & FTS_CWDFD)) { + __set_errno (EINVAL); + return (NULL); + } + if ( ! (options & (FTS_LOGICAL | FTS_PHYSICAL))) { + __set_errno (EINVAL); + return (NULL); + } + + /* Allocate/initialize the stream */ + if ((sp = malloc(sizeof(FTS))) == NULL) + return (NULL); + memset(sp, 0, sizeof(FTS)); + sp->fts_compar = compar; + sp->fts_options = options; + + /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ + if (ISSET(FTS_LOGICAL)) { + SET(FTS_NOCHDIR); + CLR(FTS_CWDFD); + } + + /* Initialize fts_cwd_fd. */ + sp->fts_cwd_fd = AT_FDCWD; + if ( ISSET(FTS_CWDFD) && ! HAVE_OPENAT_SUPPORT) + { + /* While it isn't technically necessary to open "." this + early, doing it here saves us the trouble of ensuring + later (where it'd be messier) that "." can in fact + be opened. If not, revert to FTS_NOCHDIR mode. */ + int fd = open (".", + O_SEARCH | (ISSET (FTS_NOATIME) ? O_NOATIME : 0)); + if (fd < 0) + { + /* Even if "." is unreadable, don't revert to FTS_NOCHDIR mode + on systems like Linux+PROC_FS, where our openat emulation + is good enough. Note: on a system that emulates + openat via /proc, this technique can still fail, but + only in extreme conditions, e.g., when the working + directory cannot be saved (i.e. save_cwd fails) -- + and that happens on Linux only when "." is unreadable + and the CWD would be longer than PATH_MAX. + FIXME: once Linux kernel openat support is well established, + replace the above open call and this entire if/else block + with the body of the if-block below. */ + if ( openat_needs_fchdir ()) + { + SET(FTS_NOCHDIR); + CLR(FTS_CWDFD); + } + } + else + { + close (fd); + } + } + + /* + * Start out with 1K of file name space, and enough, in any case, + * to hold the user's file names. + */ +#ifndef MAXPATHLEN +# define MAXPATHLEN 1024 +#endif + { + size_t maxarglen = fts_maxarglen(argv); + if (! fts_palloc(sp, MAX(maxarglen, MAXPATHLEN))) + goto mem1; + } + + /* Allocate/initialize root's parent. */ + if (*argv != NULL) { + if ((parent = fts_alloc(sp, "", 0)) == NULL) + goto mem2; + parent->fts_level = FTS_ROOTPARENTLEVEL; + } + + /* The classic fts implementation would call fts_stat with + a new entry for each iteration of the loop below. + If the comparison function is not specified or if the + FTS_DEFER_STAT option is in effect, don't stat any entry + in this loop. This is an attempt to minimize the interval + between the initial stat/lstat/fstatat and the point at which + a directory argument is first opened. This matters for any + directory command line argument that resides on a file system + without genuine i-nodes. If you specify FTS_DEFER_STAT along + with a comparison function, that function must not access any + data via the fts_statp pointer. */ + defer_stat = (compar == NULL || ISSET(FTS_DEFER_STAT)); + + /* Allocate/initialize root(s). */ + for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { + /* *Do* allow zero-length file names. */ + size_t len = strlen(*argv); + + if ( ! (options & FTS_VERBATIM)) + { + /* If there are two or more trailing slashes, trim all but one, + but don't change "//" to "/", and do map "///" to "/". */ + char const *v = *argv; + if (2 < len && v[len - 1] == '/') + while (1 < len && v[len - 2] == '/') + --len; + } + + if ((p = fts_alloc(sp, *argv, len)) == NULL) + goto mem3; + p->fts_level = FTS_ROOTLEVEL; + p->fts_parent = parent; + p->fts_accpath = p->fts_name; + /* Even when defer_stat is true, be sure to stat the first + command line argument, since fts_read (at least with + FTS_XDEV) requires that. */ + if (defer_stat && root != NULL) { + p->fts_info = FTS_NSOK; + fts_set_stat_required(p, true); + } else { + p->fts_info = fts_stat(sp, p, false); + } + + /* + * If comparison routine supplied, traverse in sorted + * order; otherwise traverse in the order specified. + */ + if (compar) { + p->fts_link = root; + root = p; + } else { + p->fts_link = NULL; + if (root == NULL) + tmp = root = p; + else { + tmp->fts_link = p; + tmp = p; + } + } + } + if (compar && nitems > 1) + root = fts_sort(sp, root, nitems); + + /* + * Allocate a dummy pointer and make fts_read think that we've just + * finished the node before the root(s); set p->fts_info to FTS_INIT + * so that everything about the "current" node is ignored. + */ + if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL) + goto mem3; + sp->fts_cur->fts_link = root; + sp->fts_cur->fts_info = FTS_INIT; + if (! setup_dir (sp)) + goto mem3; + + /* + * If using chdir(2), grab a file descriptor pointing to dot to ensure + * that we can get back here; this could be avoided for some file names, + * but almost certainly not worth the effort. Slashes, symbolic links, + * and ".." are all fairly nasty problems. Note, if we can't get the + * descriptor we run anyway, just more slowly. + */ + if (!ISSET(FTS_NOCHDIR) && !ISSET(FTS_CWDFD) + && (sp->fts_rfd = diropen (sp, ".")) < 0) + SET(FTS_NOCHDIR); + + i_ring_init (&sp->fts_fd_ring, -1); + return (sp); + +mem3: fts_lfree(root); + free(parent); +mem2: free(sp->fts_path); +mem1: free(sp); + return (NULL); +} + +static void +internal_function +fts_load (FTS *sp, register FTSENT *p) +{ + register size_t len; + register char *cp; + + /* + * Load the stream structure for the next traversal. Since we don't + * actually enter the directory until after the preorder visit, set + * the fts_accpath field specially so the chdir gets done to the right + * place and the user can access the first node. From fts_open it's + * known that the file name will fit. + */ + len = p->fts_pathlen = p->fts_namelen; + memmove(sp->fts_path, p->fts_name, len + 1); + if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { + len = strlen(++cp); + memmove(p->fts_name, cp, len + 1); + p->fts_namelen = len; + } + p->fts_accpath = p->fts_path = sp->fts_path; +} + +int +fts_close (FTS *sp) +{ + register FTSENT *freep, *p; + int saved_errno = 0; + + /* + * This still works if we haven't read anything -- the dummy structure + * points to the root list, so we step through to the end of the root + * list which has a valid parent pointer. + */ + if (sp->fts_cur) { + for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) { + freep = p; + p = p->fts_link != NULL ? p->fts_link : p->fts_parent; + free(freep); + } + free(p); + } + + /* Free up child linked list, sort array, file name buffer. */ + if (sp->fts_child) + fts_lfree(sp->fts_child); + free(sp->fts_array); + free(sp->fts_path); + + if (ISSET(FTS_CWDFD)) + { + if (0 <= sp->fts_cwd_fd) + if (close (sp->fts_cwd_fd)) + saved_errno = errno; + } + else if (!ISSET(FTS_NOCHDIR)) + { + /* Return to original directory, save errno if necessary. */ + if (fchdir(sp->fts_rfd)) + saved_errno = errno; + + /* If close fails, record errno only if saved_errno is zero, + so that we report the probably-more-meaningful fchdir errno. */ + if (close (sp->fts_rfd)) + if (saved_errno == 0) + saved_errno = errno; + } + + fd_ring_clear (&sp->fts_fd_ring); + + if (sp->fts_leaf_optimization_works_ht) + hash_free (sp->fts_leaf_optimization_works_ht); + + free_dir (sp); + + /* Free up the stream pointer. */ + free(sp); + + /* Set errno and return. */ + if (saved_errno) { + __set_errno (saved_errno); + return (-1); + } + + return (0); +} + +#if defined __linux__ \ + && HAVE_SYS_VFS_H && HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE + +# include + +/* Linux-specific constants from coreutils' src/fs.h */ +# define S_MAGIC_TMPFS 0x1021994 +# define S_MAGIC_NFS 0x6969 +# define S_MAGIC_REISERFS 0x52654973 +# define S_MAGIC_PROC 0x9FA0 + +/* Return false if it is easy to determine the file system type of + the directory on which DIR_FD is open, and sorting dirents on + inode numbers is known not to improve traversal performance with + that type of file system. Otherwise, return true. */ +static bool +dirent_inode_sort_may_be_useful (int dir_fd) +{ + /* Skip the sort only if we can determine efficiently + that skipping it is the right thing to do. + The cost of performing an unnecessary sort is negligible, + while the cost of *not* performing it can be O(N^2) with + a very large constant. */ + struct statfs fs_buf; + + /* If fstatfs fails, assume sorting would be useful. */ + if (fstatfs (dir_fd, &fs_buf) != 0) + return true; + + /* FIXME: what about when f_type is not an integral type? + deal with that if/when it's encountered. */ + switch (fs_buf.f_type) + { + case S_MAGIC_TMPFS: + case S_MAGIC_NFS: + /* On a file system of any of these types, sorting + is unnecessary, and hence wasteful. */ + return false; + + default: + return true; + } +} + +/* Given a file descriptor DIR_FD open on a directory D, + return true if it is valid to apply the leaf-optimization + technique of counting directories in D via stat.st_nlink. */ +static bool +leaf_optimization_applies (int dir_fd) +{ + struct statfs fs_buf; + + /* If fstatfs fails, assume we can't use the optimization. */ + if (fstatfs (dir_fd, &fs_buf) != 0) + return false; + + /* FIXME: do we need to detect AFS mount points? I doubt it, + unless fstatfs can report S_MAGIC_REISERFS for such a directory. */ + + switch (fs_buf.f_type) + { + /* List here the file system types that lack usable dirent.d_type + info, yet for which the optimization does apply. */ + case S_MAGIC_REISERFS: + return true; + + case S_MAGIC_PROC: + /* Explicitly listing this or any other file system type for which + the optimization is not applicable is not necessary, but we leave + it here to document the risk. Per http://bugs.debian.org/143111, + /proc may have bogus stat.st_nlink values. */ + /* fall through */ + default: + return false; + } +} + +#else +static bool +dirent_inode_sort_may_be_useful (int dir_fd _GL_UNUSED) { return true; } +static bool +leaf_optimization_applies (int dir_fd _GL_UNUSED) { return false; } +#endif + +/* link-count-optimization entry: + map a stat.st_dev number to a boolean: leaf_optimization_works */ +struct LCO_ent +{ + dev_t st_dev; + bool opt_ok; +}; + +/* Use a tiny initial size. If a traversal encounters more than + a few devices, the cost of growing/rehashing this table will be + rendered negligible by the number of inodes processed. */ +enum { LCO_HT_INITIAL_SIZE = 13 }; + +static size_t +LCO_hash (void const *x, size_t table_size) +{ + struct LCO_ent const *ax = x; + return (uintmax_t) ax->st_dev % table_size; +} + +static bool +LCO_compare (void const *x, void const *y) +{ + struct LCO_ent const *ax = x; + struct LCO_ent const *ay = y; + return ax->st_dev == ay->st_dev; +} + +/* Ask the same question as leaf_optimization_applies, but query + the cache first (FTS.fts_leaf_optimization_works_ht), and if necessary, + update that cache. */ +static bool +link_count_optimize_ok (FTSENT const *p) +{ + FTS *sp = p->fts_fts; + Hash_table *h = sp->fts_leaf_optimization_works_ht; + struct LCO_ent tmp; + struct LCO_ent *ent; + bool opt_ok; + struct LCO_ent *t2; + + /* If we're not in CWDFD mode, don't bother with this optimization, + since the caller is not serious about performance. */ + if (!ISSET(FTS_CWDFD)) + return false; + + /* map st_dev to the boolean, leaf_optimization_works */ + if (h == NULL) + { + h = sp->fts_leaf_optimization_works_ht + = hash_initialize (LCO_HT_INITIAL_SIZE, NULL, LCO_hash, + LCO_compare, free); + if (h == NULL) + return false; + } + tmp.st_dev = p->fts_statp->st_dev; + ent = hash_lookup (h, &tmp); + if (ent) + return ent->opt_ok; + + /* Look-up failed. Query directly and cache the result. */ + t2 = malloc (sizeof *t2); + if (t2 == NULL) + return false; + + /* Is it ok to perform the optimization in the dir, FTS_CWD_FD? */ + opt_ok = leaf_optimization_applies (sp->fts_cwd_fd); + t2->opt_ok = opt_ok; + t2->st_dev = p->fts_statp->st_dev; + + ent = hash_insert (h, t2); + if (ent == NULL) + { + /* insertion failed */ + free (t2); + return false; + } + fts_assert (ent == t2); + + return opt_ok; +} + +/* + * Special case of "/" at the end of the file name so that slashes aren't + * appended which would cause file names to be written as "....//foo". + */ +#define NAPPEND(p) \ + (p->fts_path[p->fts_pathlen - 1] == '/' \ + ? p->fts_pathlen - 1 : p->fts_pathlen) + +FTSENT * +fts_read (register FTS *sp) +{ + register FTSENT *p, *tmp; + register unsigned short int instr; + register char *t; + + /* If finished or unrecoverable error, return NULL. */ + if (sp->fts_cur == NULL || ISSET(FTS_STOP)) + return (NULL); + + /* Set current node pointer. */ + p = sp->fts_cur; + + /* Save and zero out user instructions. */ + instr = p->fts_instr; + p->fts_instr = FTS_NOINSTR; + + /* Any type of file may be re-visited; re-stat and re-turn. */ + if (instr == FTS_AGAIN) { + p->fts_info = fts_stat(sp, p, false); + return (p); + } + Dprintf (("fts_read: p=%s\n", + p->fts_info == FTS_INIT ? "" : p->fts_path)); + + /* + * Following a symlink -- SLNONE test allows application to see + * SLNONE and recover. If indirecting through a symlink, have + * keep a pointer to current location. If unable to get that + * pointer, follow fails. + */ + if (instr == FTS_FOLLOW && + (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { + p->fts_info = fts_stat(sp, p, true); + if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { + if ((p->fts_symfd = diropen (sp, ".")) < 0) { + p->fts_errno = errno; + p->fts_info = FTS_ERR; + } else + p->fts_flags |= FTS_SYMFOLLOW; + } + goto check_for_dir; + } + + /* Directory in pre-order. */ + if (p->fts_info == FTS_D) { + /* If skipped or crossed mount point, do post-order visit. */ + if (instr == FTS_SKIP || + (ISSET(FTS_XDEV) && p->fts_statp->st_dev != sp->fts_dev)) { + if (p->fts_flags & FTS_SYMFOLLOW) + (void)close(p->fts_symfd); + if (sp->fts_child) { + fts_lfree(sp->fts_child); + sp->fts_child = NULL; + } + p->fts_info = FTS_DP; + LEAVE_DIR (sp, p, "1"); + return (p); + } + + /* Rebuild if only read the names and now traversing. */ + if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) { + CLR(FTS_NAMEONLY); + fts_lfree(sp->fts_child); + sp->fts_child = NULL; + } + + /* + * Cd to the subdirectory. + * + * If have already read and now fail to chdir, whack the list + * to make the names come out right, and set the parent errno + * so the application will eventually get an error condition. + * Set the FTS_DONTCHDIR flag so that when we logically change + * directories back to the parent we don't do a chdir. + * + * If haven't read do so. If the read fails, fts_build sets + * FTS_STOP or the fts_info field of the node. + */ + if (sp->fts_child != NULL) { + if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) { + p->fts_errno = errno; + p->fts_flags |= FTS_DONTCHDIR; + for (p = sp->fts_child; p != NULL; + p = p->fts_link) + p->fts_accpath = + p->fts_parent->fts_accpath; + } + } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) { + if (ISSET(FTS_STOP)) + return (NULL); + /* If fts_build's call to fts_safe_changedir failed + because it was not able to fchdir into a + subdirectory, tell the caller. */ + if (p->fts_errno && p->fts_info != FTS_DNR) + p->fts_info = FTS_ERR; + LEAVE_DIR (sp, p, "2"); + return (p); + } + p = sp->fts_child; + sp->fts_child = NULL; + goto name; + } + + /* Move to the next node on this level. */ +next: tmp = p; + + /* If we have so many directory entries that we're reading them + in batches, and we've reached the end of the current batch, + read in a new batch. */ + if (p->fts_link == NULL && p->fts_parent->fts_dirp) + { + p = tmp->fts_parent; + sp->fts_cur = p; + sp->fts_path[p->fts_pathlen] = '\0'; + + if ((p = fts_build (sp, BREAD)) == NULL) + { + if (ISSET(FTS_STOP)) + return NULL; + goto cd_dot_dot; + } + + free(tmp); + goto name; + } + + if ((p = p->fts_link) != NULL) { + sp->fts_cur = p; + free(tmp); + + /* + * If reached the top, return to the original directory (or + * the root of the tree), and load the file names for the next + * root. + */ + if (p->fts_level == FTS_ROOTLEVEL) { + if (restore_initial_cwd(sp)) { + SET(FTS_STOP); + return (NULL); + } + free_dir(sp); + fts_load(sp, p); + setup_dir(sp); + goto check_for_dir; + } + + /* + * User may have called fts_set on the node. If skipped, + * ignore. If followed, get a file descriptor so we can + * get back if necessary. + */ + if (p->fts_instr == FTS_SKIP) + goto next; + if (p->fts_instr == FTS_FOLLOW) { + p->fts_info = fts_stat(sp, p, true); + if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { + if ((p->fts_symfd = diropen (sp, ".")) < 0) { + p->fts_errno = errno; + p->fts_info = FTS_ERR; + } else + p->fts_flags |= FTS_SYMFOLLOW; + } + p->fts_instr = FTS_NOINSTR; + } + +name: t = sp->fts_path + NAPPEND(p->fts_parent); + *t++ = '/'; + memmove(t, p->fts_name, p->fts_namelen + 1); +check_for_dir: + sp->fts_cur = p; + if (p->fts_info == FTS_NSOK) + { + if (p->fts_statp->st_size == FTS_STAT_REQUIRED) + { + FTSENT *parent = p->fts_parent; + if (FTS_ROOTLEVEL < p->fts_level + /* ->fts_n_dirs_remaining is not valid + for command-line-specified names. */ + && parent->fts_n_dirs_remaining == 0 + && ISSET(FTS_NOSTAT) + && ISSET(FTS_PHYSICAL) + && link_count_optimize_ok (parent)) + { + /* nothing more needed */ + } + else + { + p->fts_info = fts_stat(sp, p, false); + if (S_ISDIR(p->fts_statp->st_mode) + && p->fts_level != FTS_ROOTLEVEL + && parent->fts_n_dirs_remaining) + parent->fts_n_dirs_remaining--; + } + } + else + fts_assert (p->fts_statp->st_size == FTS_NO_STAT_REQUIRED); + } + + if (p->fts_info == FTS_D) + { + /* Now that P->fts_statp is guaranteed to be valid, + if this is a command-line directory, record its + device number, to be used for FTS_XDEV. */ + if (p->fts_level == FTS_ROOTLEVEL) + sp->fts_dev = p->fts_statp->st_dev; + Dprintf ((" entering: %s\n", p->fts_path)); + if (! enter_dir (sp, p)) + { + __set_errno (ENOMEM); + return NULL; + } + } + return p; + } +cd_dot_dot: + + /* Move up to the parent node. */ + p = tmp->fts_parent; + sp->fts_cur = p; + free(tmp); + + if (p->fts_level == FTS_ROOTPARENTLEVEL) { + /* + * Done; free everything up and set errno to 0 so the user + * can distinguish between error and EOF. + */ + free(p); + __set_errno (0); + return (sp->fts_cur = NULL); + } + + fts_assert (p->fts_info != FTS_NSOK); + + /* NUL terminate the file name. */ + sp->fts_path[p->fts_pathlen] = '\0'; + + /* + * Return to the parent directory. If at a root node, restore + * the initial working directory. If we came through a symlink, + * go back through the file descriptor. Otherwise, move up + * one level, via "..". + */ + if (p->fts_level == FTS_ROOTLEVEL) { + if (restore_initial_cwd(sp)) { + p->fts_errno = errno; + SET(FTS_STOP); + } + } else if (p->fts_flags & FTS_SYMFOLLOW) { + if (FCHDIR(sp, p->fts_symfd)) { + int saved_errno = errno; + (void)close(p->fts_symfd); + __set_errno (saved_errno); + p->fts_errno = errno; + SET(FTS_STOP); + } + (void)close(p->fts_symfd); + } else if (!(p->fts_flags & FTS_DONTCHDIR) && + fts_safe_changedir(sp, p->fts_parent, -1, "..")) { + p->fts_errno = errno; + SET(FTS_STOP); + } + p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; + if (p->fts_errno == 0) + LEAVE_DIR (sp, p, "3"); + return ISSET(FTS_STOP) ? NULL : p; +} + +/* + * Fts_set takes the stream as an argument although it's not used in this + * implementation; it would be necessary if anyone wanted to add global + * semantics to fts using fts_set. An error return is allowed for similar + * reasons. + */ +/* ARGSUSED */ +int +fts_set(FTS *sp _GL_UNUSED, FTSENT *p, int instr) +{ + if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && + instr != FTS_NOINSTR && instr != FTS_SKIP) { + __set_errno (EINVAL); + return (1); + } + p->fts_instr = instr; + return (0); +} + +FTSENT * +fts_children (register FTS *sp, int instr) +{ + register FTSENT *p; + int fd; + + if (instr != 0 && instr != FTS_NAMEONLY) { + __set_errno (EINVAL); + return (NULL); + } + + /* Set current node pointer. */ + p = sp->fts_cur; + + /* + * Errno set to 0 so user can distinguish empty directory from + * an error. + */ + __set_errno (0); + + /* Fatal errors stop here. */ + if (ISSET(FTS_STOP)) + return (NULL); + + /* Return logical hierarchy of user's arguments. */ + if (p->fts_info == FTS_INIT) + return (p->fts_link); + + /* + * If not a directory being visited in pre-order, stop here. Could + * allow FTS_DNR, assuming the user has fixed the problem, but the + * same effect is available with FTS_AGAIN. + */ + if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */) + return (NULL); + + /* Free up any previous child list. */ + if (sp->fts_child != NULL) + fts_lfree(sp->fts_child); + + if (instr == FTS_NAMEONLY) { + SET(FTS_NAMEONLY); + instr = BNAMES; + } else + instr = BCHILD; + + /* + * If using chdir on a relative file name and called BEFORE fts_read + * does its chdir to the root of a traversal, we can lose -- we need to + * chdir into the subdirectory, and we don't know where the current + * directory is, so we can't get back so that the upcoming chdir by + * fts_read will work. + */ + if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' || + ISSET(FTS_NOCHDIR)) + return (sp->fts_child = fts_build(sp, instr)); + + if ((fd = diropen (sp, ".")) < 0) + return (sp->fts_child = NULL); + sp->fts_child = fts_build(sp, instr); + if (ISSET(FTS_CWDFD)) + { + cwd_advance_fd (sp, fd, true); + } + else + { + if (fchdir(fd)) + { + int saved_errno = errno; + close (fd); + __set_errno (saved_errno); + return NULL; + } + close (fd); + } + return (sp->fts_child); +} + +/* A comparison function to sort on increasing inode number. + For some file system types, sorting either way makes a huge + performance difference for a directory with very many entries, + but sorting on increasing values is slightly better than sorting + on decreasing values. The difference is in the 5% range. */ +static int +fts_compare_ino (struct _ftsent const **a, struct _ftsent const **b) +{ + return (a[0]->fts_statp->st_ino < b[0]->fts_statp->st_ino ? -1 + : b[0]->fts_statp->st_ino < a[0]->fts_statp->st_ino ? 1 : 0); +} + +/* Map the dirent.d_type value, DTYPE, to the corresponding stat.st_mode + S_IF* bit and set ST.st_mode, thus clearing all other bits in that field. */ +static void +set_stat_type (struct stat *st, unsigned int dtype) +{ + mode_t type; + switch (dtype) + { + case DT_BLK: + type = S_IFBLK; + break; + case DT_CHR: + type = S_IFCHR; + break; + case DT_DIR: + type = S_IFDIR; + break; + case DT_FIFO: + type = S_IFIFO; + break; + case DT_LNK: + type = S_IFLNK; + break; + case DT_REG: + type = S_IFREG; + break; + case DT_SOCK: + type = S_IFSOCK; + break; + default: + type = 0; + } + st->st_mode = type; +} + +#define closedir_and_clear(dirp) \ + do \ + { \ + closedir (dirp); \ + dirp = NULL; \ + } \ + while (0) + +#define fts_opendir(file, Pdir_fd) \ + opendirat((! ISSET(FTS_NOCHDIR) && ISSET(FTS_CWDFD) \ + ? sp->fts_cwd_fd : AT_FDCWD), \ + file, \ + (((ISSET(FTS_PHYSICAL) \ + && ! (ISSET(FTS_COMFOLLOW) \ + && cur->fts_level == FTS_ROOTLEVEL)) \ + ? O_NOFOLLOW : 0) \ + | (ISSET (FTS_NOATIME) ? O_NOATIME : 0)), \ + Pdir_fd) + +/* + * This is the tricky part -- do not casually change *anything* in here. The + * idea is to build the linked list of entries that are used by fts_children + * and fts_read. There are lots of special cases. + * + * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is + * set and it's a physical walk (so that symbolic links can't be directories), + * we can do things quickly. First, if it's a 4.4BSD file system, the type + * of the file is in the directory entry. Otherwise, we assume that the number + * of subdirectories in a node is equal to the number of links to the parent. + * The former skips all stat calls. The latter skips stat calls in any leaf + * directories and for any files after the subdirectories in the directory have + * been found, cutting the stat calls by about 2/3. + */ +static FTSENT * +internal_function +fts_build (register FTS *sp, int type) +{ + register FTSENT *p, *head; + register size_t nitems; + FTSENT *tail; + void *oldaddr; + int saved_errno; + bool descend; + bool doadjust; + ptrdiff_t level; + nlink_t nlinks; + bool nostat; + size_t len, maxlen, new_len; + char *cp; + int dir_fd; + FTSENT *cur = sp->fts_cur; + bool continue_readdir = !!cur->fts_dirp; + + /* When cur->fts_dirp is non-NULL, that means we should + continue calling readdir on that existing DIR* pointer + rather than opening a new one. */ + if (continue_readdir) + { + DIR *dp = cur->fts_dirp; + dir_fd = dirfd (dp); + if (dir_fd < 0) + { + closedir_and_clear (cur->fts_dirp); + if (type == BREAD) + { + cur->fts_info = FTS_DNR; + cur->fts_errno = errno; + } + return NULL; + } + } + else + { + /* Open the directory for reading. If this fails, we're done. + If being called from fts_read, set the fts_info field. */ + if ((cur->fts_dirp = fts_opendir(cur->fts_accpath, &dir_fd)) == NULL) + { + if (type == BREAD) + { + cur->fts_info = FTS_DNR; + cur->fts_errno = errno; + } + return NULL; + } + /* Rather than calling fts_stat for each and every entry encountered + in the readdir loop (below), stat each directory only right after + opening it. */ + if (cur->fts_info == FTS_NSOK) + cur->fts_info = fts_stat(sp, cur, false); + else if (sp->fts_options & FTS_TIGHT_CYCLE_CHECK) + { + /* Now read the stat info again after opening a directory to + reveal eventual changes caused by a submount triggered by + the traversal. But do it only for utilities which use + FTS_TIGHT_CYCLE_CHECK. Therefore, only find and du + benefit/suffer from this feature for now. */ + LEAVE_DIR (sp, cur, "4"); + fts_stat (sp, cur, false); + if (! enter_dir (sp, cur)) + { + __set_errno (ENOMEM); + return NULL; + } + } + } + + /* Maximum number of readdir entries to read at one time. This + limitation is to avoid reading millions of entries into memory + at once. When an fts_compar function is specified, we have no + choice: we must read all entries into memory before calling that + function. But when no such function is specified, we can read + entries in batches that are large enough to help us with inode- + sorting, yet not so large that we risk exhausting memory. */ + size_t max_entries = (sp->fts_compar == NULL + ? FTS_MAX_READDIR_ENTRIES : SIZE_MAX); + + /* + * Nlinks is the number of possible entries of type directory in the + * directory if we're cheating on stat calls, 0 if we're not doing + * any stat calls at all, (nlink_t) -1 if we're statting everything. + */ + if (type == BNAMES) { + nlinks = 0; + /* Be quiet about nostat, GCC. */ + nostat = false; + } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { + nlinks = (cur->fts_statp->st_nlink + - (ISSET(FTS_SEEDOT) ? 0 : 2)); + nostat = true; + } else { + nlinks = -1; + nostat = false; + } + + /* + * If we're going to need to stat anything or we want to descend + * and stay in the directory, chdir. If this fails we keep going, + * but set a flag so we don't chdir after the post-order visit. + * We won't be able to stat anything, but we can still return the + * names themselves. Note, that since fts_read won't be able to + * chdir into the directory, it will have to return different file + * names than before, i.e. "a/b" instead of "b". Since the node + * has already been visited in pre-order, have to wait until the + * post-order visit to return the error. There is a special case + * here, if there was nothing to stat then it's not an error to + * not be able to stat. This is all fairly nasty. If a program + * needed sorted entries or stat information, they had better be + * checking FTS_NS on the returned nodes. + */ + if (continue_readdir) + { + /* When resuming a short readdir run, we already have + the required dirp and dir_fd. */ + descend = true; + } + else if (nlinks || type == BREAD) { + if (ISSET(FTS_CWDFD)) + { + dir_fd = dup (dir_fd); + if (0 <= dir_fd) + set_cloexec_flag (dir_fd, true); + } + if (dir_fd < 0 || fts_safe_changedir(sp, cur, dir_fd, NULL)) { + if (nlinks && type == BREAD) + cur->fts_errno = errno; + cur->fts_flags |= FTS_DONTCHDIR; + descend = false; + closedir_and_clear(cur->fts_dirp); + if (ISSET(FTS_CWDFD) && 0 <= dir_fd) + close (dir_fd); + cur->fts_dirp = NULL; + } else + descend = true; + } else + descend = false; + + /* + * Figure out the max file name length that can be stored in the + * current buffer -- the inner loop allocates more space as necessary. + * We really wouldn't have to do the maxlen calculations here, we + * could do them in fts_read before returning the name, but it's a + * lot easier here since the length is part of the dirent structure. + * + * If not changing directories set a pointer so that can just append + * each new component into the file name. + */ + len = NAPPEND(cur); + if (ISSET(FTS_NOCHDIR)) { + cp = sp->fts_path + len; + *cp++ = '/'; + } else { + /* GCC, you're too verbose. */ + cp = NULL; + } + len++; + maxlen = sp->fts_pathlen - len; + + level = cur->fts_level + 1; + + /* Read the directory, attaching each entry to the "link" pointer. */ + doadjust = false; + head = NULL; + tail = NULL; + nitems = 0; + while (cur->fts_dirp) { + bool is_dir; + size_t d_namelen; + struct dirent *dp = readdir(cur->fts_dirp); + if (dp == NULL) + break; + if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) + continue; + + d_namelen = _D_EXACT_NAMLEN (dp); + p = fts_alloc (sp, dp->d_name, d_namelen); + if (!p) + goto mem1; + if (d_namelen >= maxlen) { + /* include space for NUL */ + oldaddr = sp->fts_path; + if (! fts_palloc(sp, d_namelen + len + 1)) { + /* + * No more memory. Save + * errno, free up the current structure and the + * structures already allocated. + */ +mem1: saved_errno = errno; + free(p); + fts_lfree(head); + closedir_and_clear(cur->fts_dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + __set_errno (saved_errno); + return (NULL); + } + /* Did realloc() change the pointer? */ + if (oldaddr != sp->fts_path) { + doadjust = true; + if (ISSET(FTS_NOCHDIR)) + cp = sp->fts_path + len; + } + maxlen = sp->fts_pathlen - len; + } + + new_len = len + d_namelen; + if (new_len < len) { + /* + * In the unlikely event that we would end up + * with a file name longer than SIZE_MAX, free up + * the current structure and the structures already + * allocated, then error out with ENAMETOOLONG. + */ + free(p); + fts_lfree(head); + closedir_and_clear(cur->fts_dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + __set_errno (ENAMETOOLONG); + return (NULL); + } + p->fts_level = level; + p->fts_parent = sp->fts_cur; + p->fts_pathlen = new_len; + + /* Store dirent.d_ino, in case we need to sort + entries before processing them. */ + p->fts_statp->st_ino = D_INO (dp); + + /* Build a file name for fts_stat to stat. */ + if (ISSET(FTS_NOCHDIR)) { + p->fts_accpath = p->fts_path; + memmove(cp, p->fts_name, p->fts_namelen + 1); + } else + p->fts_accpath = p->fts_name; + + if (sp->fts_compar == NULL || ISSET(FTS_DEFER_STAT)) { + /* Record what fts_read will have to do with this + entry. In many cases, it will simply fts_stat it, + but we can take advantage of any d_type information + to optimize away the unnecessary stat calls. I.e., + if FTS_NOSTAT is in effect and we're not following + symlinks (FTS_PHYSICAL) and d_type indicates this + is *not* a directory, then we won't have to stat it + at all. If it *is* a directory, then (currently) + we stat it regardless, in order to get device and + inode numbers. Some day we might optimize that + away, too, for directories where d_ino is known to + be valid. */ + bool skip_stat = (ISSET(FTS_PHYSICAL) + && ISSET(FTS_NOSTAT) + && DT_IS_KNOWN(dp) + && ! DT_MUST_BE(dp, DT_DIR)); + p->fts_info = FTS_NSOK; + /* Propagate dirent.d_type information back + to caller, when possible. */ + set_stat_type (p->fts_statp, D_TYPE (dp)); + fts_set_stat_required(p, !skip_stat); + is_dir = (ISSET(FTS_PHYSICAL) + && DT_MUST_BE(dp, DT_DIR)); + } else { + p->fts_info = fts_stat(sp, p, false); + is_dir = (p->fts_info == FTS_D + || p->fts_info == FTS_DC + || p->fts_info == FTS_DOT); + } + + /* Decrement link count if applicable. */ + if (nlinks > 0 && is_dir) + nlinks -= nostat; + + /* We walk in directory order so "ls -f" doesn't get upset. */ + p->fts_link = NULL; + if (head == NULL) + head = tail = p; + else { + tail->fts_link = p; + tail = p; + } + ++nitems; + if (max_entries <= nitems) { + /* When there are too many dir entries, leave + fts_dirp open, so that a subsequent fts_read + can take up where we leave off. */ + goto break_without_closedir; + } + } + + if (cur->fts_dirp) + closedir_and_clear(cur->fts_dirp); + + break_without_closedir: + + /* + * If realloc() changed the address of the file name, adjust the + * addresses for the rest of the tree and the dir list. + */ + if (doadjust) + fts_padjust(sp, head); + + /* + * If not changing directories, reset the file name back to original + * state. + */ + if (ISSET(FTS_NOCHDIR)) { + if (len == sp->fts_pathlen || nitems == 0) + --cp; + *cp = '\0'; + } + + /* + * If descended after called from fts_children or after called from + * fts_read and nothing found, get back. At the root level we use + * the saved fd; if one of fts_open()'s arguments is a relative name + * to an empty directory, we wind up here with no other way back. If + * can't get back, we're done. + */ + if (!continue_readdir && descend && (type == BCHILD || !nitems) && + (cur->fts_level == FTS_ROOTLEVEL + ? restore_initial_cwd(sp) + : fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) { + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + fts_lfree(head); + return (NULL); + } + + /* If didn't find anything, return NULL. */ + if (!nitems) { + if (type == BREAD) + cur->fts_info = FTS_DP; + fts_lfree(head); + return (NULL); + } + + /* If there are many entries, no sorting function has been specified, + and this file system is of a type that may be slow with a large + number of entries, then sort the directory entries on increasing + inode numbers. */ + if (nitems > _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD + && !sp->fts_compar + && ISSET (FTS_CWDFD) + && dirent_inode_sort_may_be_useful (sp->fts_cwd_fd)) { + sp->fts_compar = fts_compare_ino; + head = fts_sort (sp, head, nitems); + sp->fts_compar = NULL; + } + + /* Sort the entries. */ + if (sp->fts_compar && nitems > 1) + head = fts_sort(sp, head, nitems); + return (head); +} + +#if FTS_DEBUG + +/* Walk ->fts_parent links starting at E_CURR, until the root of the + current hierarchy. There should be a directory with dev/inode + matching those of AD. If not, print a lot of diagnostics. */ +static void +find_matching_ancestor (FTSENT const *e_curr, struct Active_dir const *ad) +{ + FTSENT const *ent; + for (ent = e_curr; ent->fts_level >= FTS_ROOTLEVEL; ent = ent->fts_parent) + { + if (ad->ino == ent->fts_statp->st_ino + && ad->dev == ent->fts_statp->st_dev) + return; + } + printf ("ERROR: tree dir, %s, not active\n", ad->fts_ent->fts_accpath); + printf ("active dirs:\n"); + for (ent = e_curr; + ent->fts_level >= FTS_ROOTLEVEL; ent = ent->fts_parent) + printf (" %s(%"PRIuMAX"/%"PRIuMAX") to %s(%"PRIuMAX"/%"PRIuMAX")...\n", + ad->fts_ent->fts_accpath, + (uintmax_t) ad->dev, + (uintmax_t) ad->ino, + ent->fts_accpath, + (uintmax_t) ent->fts_statp->st_dev, + (uintmax_t) ent->fts_statp->st_ino); +} + +void +fts_cross_check (FTS const *sp) +{ + FTSENT const *ent = sp->fts_cur; + FTSENT const *t; + if ( ! ISSET (FTS_TIGHT_CYCLE_CHECK)) + return; + + Dprintf (("fts-cross-check cur=%s\n", ent->fts_path)); + /* Make sure every parent dir is in the tree. */ + for (t = ent->fts_parent; t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent) + { + struct Active_dir ad; + ad.ino = t->fts_statp->st_ino; + ad.dev = t->fts_statp->st_dev; + if ( ! hash_lookup (sp->fts_cycle.ht, &ad)) + printf ("ERROR: active dir, %s, not in tree\n", t->fts_path); + } + + /* Make sure every dir in the tree is an active dir. + But ENT is not necessarily a directory. If so, just skip this part. */ + if (ent->fts_parent->fts_level >= FTS_ROOTLEVEL + && (ent->fts_info == FTS_DP + || ent->fts_info == FTS_D)) + { + struct Active_dir *ad; + for (ad = hash_get_first (sp->fts_cycle.ht); ad != NULL; + ad = hash_get_next (sp->fts_cycle.ht, ad)) + { + find_matching_ancestor (ent, ad); + } + } +} + +static bool +same_fd (int fd1, int fd2) +{ + struct stat sb1, sb2; + return (fstat (fd1, &sb1) == 0 + && fstat (fd2, &sb2) == 0 + && SAME_INODE (sb1, sb2)); +} + +static void +fd_ring_print (FTS const *sp, FILE *stream, char const *msg) +{ + I_ring const *fd_ring = &sp->fts_fd_ring; + unsigned int i = fd_ring->fts_front; + char *cwd = getcwdat (sp->fts_cwd_fd, NULL, 0); + fprintf (stream, "=== %s ========== %s\n", msg, cwd); + free (cwd); + if (i_ring_empty (fd_ring)) + return; + + while (true) + { + int fd = fd_ring->fts_fd_ring[i]; + if (fd < 0) + fprintf (stream, "%d: %d:\n", i, fd); + else + { + char *wd = getcwdat (fd, NULL, 0); + fprintf (stream, "%d: %d: %s\n", i, fd, wd); + free (wd); + } + if (i == fd_ring->fts_back) + break; + i = (i + I_RING_SIZE - 1) % I_RING_SIZE; + } +} + +/* Ensure that each file descriptor on the fd_ring matches a + parent, grandparent, etc. of the current working directory. */ +static void +fd_ring_check (FTS const *sp) +{ + if (!fts_debug) + return; + + /* Make a writable copy. */ + I_ring fd_w = sp->fts_fd_ring; + + int cwd_fd = sp->fts_cwd_fd; + cwd_fd = dup (cwd_fd); + char *dot = getcwdat (cwd_fd, NULL, 0); + error (0, 0, "===== check ===== cwd: %s", dot); + free (dot); + while ( ! i_ring_empty (&fd_w)) + { + int fd = i_ring_pop (&fd_w); + if (0 <= fd) + { + int parent_fd = openat (cwd_fd, "..", O_SEARCH | O_NOATIME); + if (parent_fd < 0) + { + // Warn? + break; + } + if (!same_fd (fd, parent_fd)) + { + char *cwd = getcwdat (fd, NULL, 0); + error (0, errno, "ring : %s", cwd); + char *c2 = getcwdat (parent_fd, NULL, 0); + error (0, errno, "parent: %s", c2); + free (cwd); + free (c2); + fts_assert (0); + } + close (cwd_fd); + cwd_fd = parent_fd; + } + } + close (cwd_fd); +} +#endif + +static unsigned short int +internal_function +fts_stat(FTS *sp, register FTSENT *p, bool follow) +{ + struct stat *sbp = p->fts_statp; + int saved_errno; + + if (p->fts_level == FTS_ROOTLEVEL && ISSET(FTS_COMFOLLOW)) + follow = true; + + /* + * If doing a logical walk, or application requested FTS_FOLLOW, do + * a stat(2). If that fails, check for a non-existent symlink. If + * fail, set the errno from the stat call. + */ + if (ISSET(FTS_LOGICAL) || follow) { + if (stat(p->fts_accpath, sbp)) { + saved_errno = errno; + if (errno == ENOENT + && lstat(p->fts_accpath, sbp) == 0) { + __set_errno (0); + return (FTS_SLNONE); + } + p->fts_errno = saved_errno; + goto err; + } + } else if (fstatat(sp->fts_cwd_fd, p->fts_accpath, sbp, + AT_SYMLINK_NOFOLLOW)) { + p->fts_errno = errno; +err: memset(sbp, 0, sizeof(struct stat)); + return (FTS_NS); + } + + if (S_ISDIR(sbp->st_mode)) { + p->fts_n_dirs_remaining = (sbp->st_nlink + - (ISSET(FTS_SEEDOT) ? 0 : 2)); + if (ISDOT(p->fts_name)) { + /* Command-line "." and ".." are real directories. */ + return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT); + } + + return (FTS_D); + } + if (S_ISLNK(sbp->st_mode)) + return (FTS_SL); + if (S_ISREG(sbp->st_mode)) + return (FTS_F); + return (FTS_DEFAULT); +} + +static int +fts_compar (void const *a, void const *b) +{ + /* Convert A and B to the correct types, to pacify the compiler, and + for portability to bizarre hosts where "void const *" and "FTSENT + const **" differ in runtime representation. The comparison + function cannot modify *a and *b, but there is no compile-time + check for this. */ + FTSENT const **pa = (FTSENT const **) a; + FTSENT const **pb = (FTSENT const **) b; + return pa[0]->fts_fts->fts_compar (pa, pb); +} + +static FTSENT * +internal_function +fts_sort (FTS *sp, FTSENT *head, register size_t nitems) +{ + register FTSENT **ap, *p; + + /* On most modern hosts, void * and FTSENT ** have the same + run-time representation, and one can convert sp->fts_compar to + the type qsort expects without problem. Use the heuristic that + this is OK if the two pointer types are the same size, and if + converting FTSENT ** to long int is the same as converting + FTSENT ** to void * and then to long int. This heuristic isn't + valid in general but we don't know of any counterexamples. */ + FTSENT *dummy; + int (*compare) (void const *, void const *) = + ((sizeof &dummy == sizeof (void *) + && (long int) &dummy == (long int) (void *) &dummy) + ? (int (*) (void const *, void const *)) sp->fts_compar + : fts_compar); + + /* + * Construct an array of pointers to the structures and call qsort(3). + * Reassemble the array in the order returned by qsort. If unable to + * sort for memory reasons, return the directory entries in their + * current order. Allocate enough space for the current needs plus + * 40 so don't realloc one entry at a time. + */ + if (nitems > sp->fts_nitems) { + FTSENT **a; + + sp->fts_nitems = nitems + 40; + if (SIZE_MAX / sizeof *a < sp->fts_nitems + || ! (a = realloc (sp->fts_array, + sp->fts_nitems * sizeof *a))) { + free(sp->fts_array); + sp->fts_array = NULL; + sp->fts_nitems = 0; + return (head); + } + sp->fts_array = a; + } + for (ap = sp->fts_array, p = head; p; p = p->fts_link) + *ap++ = p; + qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), compare); + for (head = *(ap = sp->fts_array); --nitems; ++ap) + ap[0]->fts_link = ap[1]; + ap[0]->fts_link = NULL; + return (head); +} + +static FTSENT * +internal_function +fts_alloc (FTS *sp, const char *name, register size_t namelen) +{ + register FTSENT *p; + size_t len; + + /* + * The file name is a variable length array. Allocate the FTSENT + * structure and the file name in one chunk. + */ + len = sizeof(FTSENT) + namelen; + if ((p = malloc(len)) == NULL) + return (NULL); + + /* Copy the name and guarantee NUL termination. */ + memcpy(p->fts_name, name, namelen); + p->fts_name[namelen] = '\0'; + + p->fts_namelen = namelen; + p->fts_fts = sp; + p->fts_path = sp->fts_path; + p->fts_errno = 0; + p->fts_dirp = NULL; + p->fts_flags = 0; + p->fts_instr = FTS_NOINSTR; + p->fts_number = 0; + p->fts_pointer = NULL; + return (p); +} + +static void +internal_function +fts_lfree (register FTSENT *head) +{ + register FTSENT *p; + + /* Free a linked list of structures. */ + while ((p = head)) { + head = head->fts_link; + if (p->fts_dirp) + closedir (p->fts_dirp); + free(p); + } +} + +/* + * Allow essentially unlimited file name lengths; find, rm, ls should + * all work on any tree. Most systems will allow creation of file + * names much longer than MAXPATHLEN, even though the kernel won't + * resolve them. Add the size (not just what's needed) plus 256 bytes + * so don't realloc the file name 2 bytes at a time. + */ +static bool +internal_function +fts_palloc (FTS *sp, size_t more) +{ + char *p; + size_t new_len = sp->fts_pathlen + more + 256; + + /* + * See if fts_pathlen would overflow. + */ + if (new_len < sp->fts_pathlen) { + free(sp->fts_path); + sp->fts_path = NULL; + __set_errno (ENAMETOOLONG); + return false; + } + sp->fts_pathlen = new_len; + p = realloc(sp->fts_path, sp->fts_pathlen); + if (p == NULL) { + free(sp->fts_path); + sp->fts_path = NULL; + return false; + } + sp->fts_path = p; + return true; +} + +/* + * When the file name is realloc'd, have to fix all of the pointers in + * structures already returned. + */ +static void +internal_function +fts_padjust (FTS *sp, FTSENT *head) +{ + FTSENT *p; + char *addr = sp->fts_path; + +#define ADJUST(p) do { \ + if ((p)->fts_accpath != (p)->fts_name) { \ + (p)->fts_accpath = \ + (char *)addr + ((p)->fts_accpath - (p)->fts_path); \ + } \ + (p)->fts_path = addr; \ +} while (0) + /* Adjust the current set of children. */ + for (p = sp->fts_child; p; p = p->fts_link) + ADJUST(p); + + /* Adjust the rest of the tree, including the current level. */ + for (p = head; p->fts_level >= FTS_ROOTLEVEL;) { + ADJUST(p); + p = p->fts_link ? p->fts_link : p->fts_parent; + } +} + +static size_t +internal_function _GL_ATTRIBUTE_PURE +fts_maxarglen (char * const *argv) +{ + size_t len, max; + + for (max = 0; *argv; ++argv) + if ((len = strlen(*argv)) > max) + max = len; + return (max + 1); +} + +/* + * Change to dir specified by fd or file name without getting + * tricked by someone changing the world out from underneath us. + * Assumes p->fts_statp->st_dev and p->fts_statp->st_ino are filled in. + * If FD is non-negative, expect it to be used after this function returns, + * and to be closed eventually. So don't pass e.g., 'dirfd(dirp)' and then + * do closedir(dirp), because that would invalidate the saved FD. + * Upon failure, close FD immediately and return nonzero. + */ +static int +internal_function +fts_safe_changedir (FTS *sp, FTSENT *p, int fd, char const *dir) +{ + int ret; + bool is_dotdot = dir && STREQ (dir, ".."); + int newfd; + + /* This clause handles the unusual case in which FTS_NOCHDIR + is specified, along with FTS_CWDFD. In that case, there is + no need to change even the virtual cwd file descriptor. + However, if FD is non-negative, we do close it here. */ + if (ISSET (FTS_NOCHDIR)) + { + if (ISSET (FTS_CWDFD) && 0 <= fd) + close (fd); + return 0; + } + + if (fd < 0 && is_dotdot && ISSET (FTS_CWDFD)) + { + /* When possible, skip the diropen and subsequent fstat+dev/ino + comparison. I.e., when changing to parent directory + (chdir ("..")), use a file descriptor from the ring and + save the overhead of diropen+fstat, as well as avoiding + failure when we lack "x" access to the virtual cwd. */ + if ( ! i_ring_empty (&sp->fts_fd_ring)) + { + int parent_fd; + fd_ring_print (sp, stderr, "pre-pop"); + parent_fd = i_ring_pop (&sp->fts_fd_ring); + is_dotdot = true; + if (0 <= parent_fd) + { + fd = parent_fd; + dir = NULL; + } + } + } + + newfd = fd; + if (fd < 0 && (newfd = diropen (sp, dir)) < 0) + return -1; + + /* The following dev/inode check is necessary if we're doing a + "logical" traversal (through symlinks, a la chown -L), if the + system lacks O_NOFOLLOW support, or if we're changing to ".." + (but not via a popped file descriptor). When changing to the + name "..", O_NOFOLLOW can't help. In general, when the target is + not "..", diropen's use of O_NOFOLLOW ensures we don't mistakenly + follow a symlink, so we can avoid the expense of this fstat. */ + if (ISSET(FTS_LOGICAL) || ! HAVE_WORKING_O_NOFOLLOW + || (dir && STREQ (dir, ".."))) + { + struct stat sb; + if (fstat(newfd, &sb)) + { + ret = -1; + goto bail; + } + if (p->fts_statp->st_dev != sb.st_dev + || p->fts_statp->st_ino != sb.st_ino) + { + __set_errno (ENOENT); /* disinformation */ + ret = -1; + goto bail; + } + } + + if (ISSET(FTS_CWDFD)) + { + cwd_advance_fd (sp, newfd, ! is_dotdot); + return 0; + } + + ret = fchdir(newfd); +bail: + if (fd < 0) + { + int oerrno = errno; + (void)close(newfd); + __set_errno (oerrno); + } + return ret; +} diff --git a/gl/lib/fts_.h b/gl/lib/fts_.h new file mode 100644 index 0000000..63d4b74 --- /dev/null +++ b/gl/lib/fts_.h @@ -0,0 +1,276 @@ +/* Traverse a file hierarchy. + + Copyright (C) 2004-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)fts.h 8.3 (Berkeley) 8/14/94 + */ + +#ifndef _FTS_H +# define _FTS_H 1 + +# ifdef _LIBC +# include +# else +# undef __THROW +# define __THROW +# undef __BEGIN_DECLS +# undef __END_DECLS +# ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +# else +# define __BEGIN_DECLS +# define __END_DECLS +# endif +# endif + +# include +# include +# include +# include +# include "i-ring.h" + +typedef struct { + struct _ftsent *fts_cur; /* current node */ + struct _ftsent *fts_child; /* linked list of children */ + struct _ftsent **fts_array; /* sort array */ + dev_t fts_dev; /* starting device # */ + char *fts_path; /* file name for this descent */ + int fts_rfd; /* fd for root */ + int fts_cwd_fd; /* the file descriptor on which the + virtual cwd is open, or AT_FDCWD */ + size_t fts_pathlen; /* sizeof(path) */ + size_t fts_nitems; /* elements in the sort array */ + int (*fts_compar) (struct _ftsent const **, struct _ftsent const **); + /* compare fn */ + +# define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ +# define FTS_LOGICAL 0x0002 /* logical walk */ +# define FTS_NOCHDIR 0x0004 /* don't change directories */ +# define FTS_NOSTAT 0x0008 /* don't get stat info */ +# define FTS_PHYSICAL 0x0010 /* physical walk */ +# define FTS_SEEDOT 0x0020 /* return dot and dot-dot */ +# define FTS_XDEV 0x0040 /* don't cross devices */ +# define FTS_WHITEOUT 0x0080 /* return whiteout information */ + + /* There are two ways to detect cycles. + The lazy way (which works only with FTS_PHYSICAL), + with which one may process a directory that is a + part of the cycle several times before detecting the cycle. + The "tight" way, whereby fts uses more memory (proportional + to number of "active" directories, aka distance from root + of current tree to current directory -- see active_dir_ht) + to detect any cycle right away. For example, du must use + this option to avoid counting disk space in a cycle multiple + times, but chown -R need not. + The default is to use the constant-memory lazy way, when possible + (see below). + + However, with FTS_LOGICAL (when following symlinks, e.g., chown -L) + using lazy cycle detection is inadequate. For example, traversing + a directory containing a symbolic link to a peer directory, it is + possible to encounter the same directory twice even though there + is no cycle: + dir + ... + slink -> dir + So, when FTS_LOGICAL is selected, we have to use a different + mode of cycle detection: FTS_TIGHT_CYCLE_CHECK. */ +# define FTS_TIGHT_CYCLE_CHECK 0x0100 + + /* Use this flag to enable semantics with which the parent + application may be made both more efficient and more robust. + Whereas the default is to visit each directory in a recursive + traversal (via chdir), using this flag makes it so the initial + working directory is never changed. Instead, these functions + perform the traversal via a virtual working directory, maintained + through the file descriptor member, fts_cwd_fd. */ +# define FTS_CWDFD 0x0200 + + /* Historically, for each directory that fts initially encounters, it would + open it, read all entries, and stat each entry, storing the results, and + then it would process the first entry. But that behavior is bad for + locality of reference, and also causes trouble with inode-simulating + file systems like FAT, CIFS, FUSE-based ones, etc., when entries from + their name/inode cache are flushed too early. + Use this flag to make fts_open and fts_read defer the stat/lstat/fststat + of each entry until it is actually processed. However, note that if you + use this option and also specify a comparison function, that function may + not examine any data via fts_statp. However, when fts_statp->st_mode is + nonzero, the S_IFMT type bits are valid, with mapped dirent.d_type data. + Of course, that happens only on file systems that provide useful + dirent.d_type data. */ +# define FTS_DEFER_STAT 0x0400 + +# define FTS_NOATIME 0x0800 /* use O_NOATIME during traversal */ + + /* Use this flag to disable stripping of trailing slashes + from input path names during fts_open initialization. */ +# define FTS_VERBATIM 0x1000 + +# define FTS_OPTIONMASK 0x1fff /* valid user option mask */ + +# define FTS_NAMEONLY 0x2000 /* (private) child names only */ +# define FTS_STOP 0x4000 /* (private) unrecoverable error */ + int fts_options; /* fts_open options, global flags */ + + /* Map a directory's device number to a boolean. The boolean is + true if for that file system (type determined by a single fstatfs + call per FS) st_nlink can be used to calculate the number of + sub-directory entries in a directory. + Using this table is an optimization that permits us to look up + file system type on a per-inode basis at the minimal cost of + calling fstatfs only once per traversed device. */ + struct hash_table *fts_leaf_optimization_works_ht; + + union { + /* This data structure is used if FTS_TIGHT_CYCLE_CHECK is + specified. It records the directories between a starting + point and the current directory. I.e., a directory is + recorded here IFF we have visited it once, but we have not + yet completed processing of all its entries. Every time we + visit a new directory, we add that directory to this set. + When we finish with a directory (usually by visiting it a + second time), we remove it from this set. Each entry in + this data structure is a device/inode pair. This data + structure is used to detect directory cycles efficiently and + promptly even when the depth of a hierarchy is in the tens + of thousands. */ + struct hash_table *ht; + + /* FIXME: rename these two members to have the fts_ prefix */ + /* This data structure uses a lazy cycle-detection algorithm, + as done by rm via cycle-check.c. It's the default, + but it's not appropriate for programs like du. */ + struct cycle_check_state *state; + } fts_cycle; + + /* A stack of the file descriptors corresponding to the + most-recently traversed parent directories. + Currently used only in FTS_CWDFD mode. */ + I_ring fts_fd_ring; +} FTS; + +typedef struct _ftsent { + struct _ftsent *fts_cycle; /* cycle node */ + struct _ftsent *fts_parent; /* parent directory */ + struct _ftsent *fts_link; /* next file in directory */ + DIR *fts_dirp; /* Dir pointer for any directory + containing more entries than we + read at one time. */ + long fts_number; /* local numeric value */ + void *fts_pointer; /* local address value */ + char *fts_accpath; /* access file name */ + char *fts_path; /* root name; == fts_fts->fts_path */ + int fts_errno; /* errno for this node */ + int fts_symfd; /* fd for symlink */ + size_t fts_pathlen; /* strlen(fts_path) */ + + FTS *fts_fts; /* the file hierarchy itself */ + +# define FTS_ROOTPARENTLEVEL (-1) +# define FTS_ROOTLEVEL 0 + ptrdiff_t fts_level; /* depth (-1 to N) */ + + size_t fts_namelen; /* strlen(fts_name) */ + nlink_t fts_n_dirs_remaining; /* count down from st_nlink */ + +# define FTS_D 1 /* preorder directory */ +# define FTS_DC 2 /* directory that causes cycles */ +# define FTS_DEFAULT 3 /* none of the above */ +# define FTS_DNR 4 /* unreadable directory */ +# define FTS_DOT 5 /* dot or dot-dot */ +# define FTS_DP 6 /* postorder directory */ +# define FTS_ERR 7 /* error; errno is set */ +# define FTS_F 8 /* regular file */ +# define FTS_INIT 9 /* initialized only */ +# define FTS_NS 10 /* stat(2) failed */ +# define FTS_NSOK 11 /* no stat(2) requested */ +# define FTS_SL 12 /* symbolic link */ +# define FTS_SLNONE 13 /* symbolic link without target */ +# define FTS_W 14 /* whiteout object */ + unsigned short int fts_info; /* user flags for FTSENT structure */ + +# define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ +# define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ + unsigned short int fts_flags; /* private flags for FTSENT structure */ + +# define FTS_AGAIN 1 /* read node again */ +# define FTS_FOLLOW 2 /* follow symbolic link */ +# define FTS_NOINSTR 3 /* no instructions */ +# define FTS_SKIP 4 /* discard node */ + unsigned short int fts_instr; /* fts_set() instructions */ + + struct stat fts_statp[1]; /* stat(2) information */ + char fts_name[1]; /* file name */ +} FTSENT; + +#ifndef __GNUC_PREREQ +# if defined __GNUC__ && defined __GNUC_MINOR__ +# define __GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +# else +# define __GNUC_PREREQ(maj, min) 0 +# endif +#endif + +#if __GNUC_PREREQ (3,4) +# undef __attribute_warn_unused_result__ +# define __attribute_warn_unused_result__ \ + __attribute__ ((__warn_unused_result__)) +#else +# define __attribute_warn_unused_result__ /* empty */ +#endif + +__BEGIN_DECLS +FTSENT *fts_children (FTS *, int) __THROW __attribute_warn_unused_result__; +int fts_close (FTS *) __THROW __attribute_warn_unused_result__; +FTS *fts_open (char * const *, int, + int (*)(const FTSENT **, const FTSENT **)) + __THROW __attribute_warn_unused_result__; +FTSENT *fts_read (FTS *) __THROW __attribute_warn_unused_result__; +int fts_set (FTS *, FTSENT *, int) __THROW; +__END_DECLS + +#endif /* fts.h */ diff --git a/gl/lib/getcwd-lgpl.c b/gl/lib/getcwd-lgpl.c new file mode 100644 index 0000000..044c000 --- /dev/null +++ b/gl/lib/getcwd-lgpl.c @@ -0,0 +1,126 @@ +/* Copyright (C) 2011-2014 Free Software Foundation, Inc. + This file is part of gnulib. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification */ +#include + +#include +#include +#include + +#if GNULIB_GETCWD +/* Favor GPL getcwd.c if both getcwd and getcwd-lgpl modules are in use. */ +typedef int dummy; +#else + +/* Get the name of the current working directory, and put it in SIZE + bytes of BUF. Returns NULL if the directory couldn't be determined + (perhaps because the absolute name was longer than PATH_MAX, or + because of missing read/search permissions on parent directories) + or SIZE was too small. If successful, returns BUF. If BUF is + NULL, an array is allocated with 'malloc'; the array is SIZE bytes + long, unless SIZE == 0, in which case it is as big as + necessary. */ + +# undef getcwd +char * +rpl_getcwd (char *buf, size_t size) +{ + char *ptr; + char *result; + + /* Handle single size operations. */ + if (buf) + { + if (!size) + { + errno = EINVAL; + return NULL; + } + return getcwd (buf, size); + } + + if (size) + { + buf = malloc (size); + if (!buf) + { + errno = ENOMEM; + return NULL; + } + result = getcwd (buf, size); + if (!result) + { + int saved_errno = errno; + free (buf); + errno = saved_errno; + } + return result; + } + + /* Flexible sizing requested. Avoid over-allocation for the common + case of a name that fits within a 4k page, minus some space for + local variables, to be sure we don't skip over a guard page. */ + { + char tmp[4032]; + size = sizeof tmp; + ptr = getcwd (tmp, size); + if (ptr) + { + result = strdup (ptr); + if (!result) + errno = ENOMEM; + return result; + } + if (errno != ERANGE) + return NULL; + } + + /* My what a large directory name we have. */ + do + { + size <<= 1; + ptr = realloc (buf, size); + if (ptr == NULL) + { + free (buf); + errno = ENOMEM; + return NULL; + } + buf = ptr; + result = getcwd (buf, size); + } + while (!result && errno == ERANGE); + + if (!result) + { + int saved_errno = errno; + free (buf); + errno = saved_errno; + } + else + { + /* Trim to fit, if possible. */ + result = realloc (buf, strlen (buf) + 1); + if (!result) + result = buf; + } + return result; +} + +#endif diff --git a/gl/lib/getcwd.c b/gl/lib/getcwd.c new file mode 100644 index 0000000..1a013f4 --- /dev/null +++ b/gl/lib/getcwd.c @@ -0,0 +1,442 @@ +/* Copyright (C) 1991-1999, 2004-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if !_LIBC +# include +# include +#endif + +#include +#include +#include +#include +#include + +#include /* For AT_FDCWD on Solaris 9. */ + +/* If this host provides the openat function or if we're using the + gnulib replacement function with a native fdopendir, then enable + code below to make getcwd more efficient and robust. */ +#if defined HAVE_OPENAT || (defined GNULIB_OPENAT && defined HAVE_FDOPENDIR) +# define HAVE_OPENAT_SUPPORT 1 +#else +# define HAVE_OPENAT_SUPPORT 0 +#endif + +#ifndef __set_errno +# define __set_errno(val) (errno = (val)) +#endif + +#include +#ifndef _D_EXACT_NAMLEN +# define _D_EXACT_NAMLEN(d) strlen ((d)->d_name) +#endif +#ifndef _D_ALLOC_NAMLEN +# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1) +#endif + +#include +#include +#include + +#if _LIBC +# ifndef mempcpy +# define mempcpy __mempcpy +# endif +#endif + +#ifndef MAX +# define MAX(a, b) ((a) < (b) ? (b) : (a)) +#endif +#ifndef MIN +# define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + +#include "pathmax.h" + +/* In this file, PATH_MAX only serves as a threshold for choosing among two + algorithms. */ +#ifndef PATH_MAX +# define PATH_MAX 8192 +#endif + +#if D_INO_IN_DIRENT +# define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino)) +#else +# define MATCHING_INO(dp, ino) true +#endif + +#if !_LIBC +# define __getcwd rpl_getcwd +# define __lstat lstat +# define __closedir closedir +# define __opendir opendir +# define __readdir readdir +#endif + +/* The results of opendir() in this file are not used with dirfd and fchdir, + and we do not leak fds to any single-threaded code that could use stdio, + therefore save some unnecessary recursion in fchdir.c. + FIXME - if the kernel ever adds support for multi-thread safety for + avoiding standard fds, then we should use opendir_safer and + openat_safer. */ +#undef opendir +#undef closedir + +/* Get the name of the current working directory, and put it in SIZE + bytes of BUF. Returns NULL if the directory couldn't be determined or + SIZE was too small. If successful, returns BUF. In GNU, if BUF is + NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, + unless SIZE == 0, in which case it is as big as necessary. */ + +char * +__getcwd (char *buf, size_t size) +{ + /* Lengths of big file name components and entire file names, and a + deep level of file name nesting. These numbers are not upper + bounds; they are merely large values suitable for initial + allocations, designed to be large enough for most real-world + uses. */ + enum + { + BIG_FILE_NAME_COMPONENT_LENGTH = 255, + BIG_FILE_NAME_LENGTH = MIN (4095, PATH_MAX - 1), + DEEP_NESTING = 100 + }; + +#if HAVE_OPENAT_SUPPORT + int fd = AT_FDCWD; + bool fd_needs_closing = false; +#else + char dots[DEEP_NESTING * sizeof ".." + BIG_FILE_NAME_COMPONENT_LENGTH + 1]; + char *dotlist = dots; + size_t dotsize = sizeof dots; + size_t dotlen = 0; +#endif + DIR *dirstream = NULL; + dev_t rootdev, thisdev; + ino_t rootino, thisino; + char *dir; + register char *dirp; + struct stat st; + size_t allocated = size; + size_t used; + +#if HAVE_MINIMALLY_WORKING_GETCWD + /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and + this is much slower than the system getcwd (at least on + GNU/Linux). So trust the system getcwd's results unless they + look suspicious. + + Use the system getcwd even if we have openat support, since the + system getcwd works even when a parent is unreadable, while the + openat-based approach does not. + + But on AIX 5.1..7.1, the system getcwd is not even minimally + working: If the current directory name is slightly longer than + PATH_MAX, it omits the first directory component and returns + this wrong result with errno = 0. */ + +# undef getcwd + dir = getcwd (buf, size); + if (dir || (size && errno == ERANGE)) + return dir; + + /* Solaris getcwd (NULL, 0) fails with errno == EINVAL, but it has + internal magic that lets it work even if an ancestor directory is + inaccessible, which is better in many cases. So in this case try + again with a buffer that's almost always big enough. */ + if (errno == EINVAL && buf == NULL && size == 0) + { + char big_buffer[BIG_FILE_NAME_LENGTH + 1]; + dir = getcwd (big_buffer, sizeof big_buffer); + if (dir) + return strdup (dir); + } + +# if HAVE_PARTLY_WORKING_GETCWD + /* The system getcwd works, except it sometimes fails when it + shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT. */ + if (errno != ERANGE && errno != ENAMETOOLONG && errno != ENOENT) + return NULL; +# endif +#endif + + if (size == 0) + { + if (buf != NULL) + { + __set_errno (EINVAL); + return NULL; + } + + allocated = BIG_FILE_NAME_LENGTH + 1; + } + + if (buf == NULL) + { + dir = malloc (allocated); + if (dir == NULL) + return NULL; + } + else + dir = buf; + + dirp = dir + allocated; + *--dirp = '\0'; + + if (__lstat (".", &st) < 0) + goto lose; + thisdev = st.st_dev; + thisino = st.st_ino; + + if (__lstat ("/", &st) < 0) + goto lose; + rootdev = st.st_dev; + rootino = st.st_ino; + + while (!(thisdev == rootdev && thisino == rootino)) + { + struct dirent *d; + dev_t dotdev; + ino_t dotino; + bool mount_point; + int parent_status; + size_t dirroom; + size_t namlen; + bool use_d_ino = true; + + /* Look at the parent directory. */ +#if HAVE_OPENAT_SUPPORT + fd = openat (fd, "..", O_RDONLY); + if (fd < 0) + goto lose; + fd_needs_closing = true; + parent_status = fstat (fd, &st); +#else + dotlist[dotlen++] = '.'; + dotlist[dotlen++] = '.'; + dotlist[dotlen] = '\0'; + parent_status = __lstat (dotlist, &st); +#endif + if (parent_status != 0) + goto lose; + + if (dirstream && __closedir (dirstream) != 0) + { + dirstream = NULL; + goto lose; + } + + /* Figure out if this directory is a mount point. */ + dotdev = st.st_dev; + dotino = st.st_ino; + mount_point = dotdev != thisdev; + + /* Search for the last directory. */ +#if HAVE_OPENAT_SUPPORT + dirstream = fdopendir (fd); + if (dirstream == NULL) + goto lose; + fd_needs_closing = false; +#else + dirstream = __opendir (dotlist); + if (dirstream == NULL) + goto lose; + dotlist[dotlen++] = '/'; +#endif + for (;;) + { + /* Clear errno to distinguish EOF from error if readdir returns + NULL. */ + __set_errno (0); + d = __readdir (dirstream); + + /* When we've iterated through all directory entries without finding + one with a matching d_ino, rewind the stream and consider each + name again, but this time, using lstat. This is necessary in a + chroot on at least one system (glibc-2.3.6 + linux 2.6.12), where + .., ../.., ../../.., etc. all had the same device number, yet the + d_ino values for entries in / did not match those obtained + via lstat. */ + if (d == NULL && errno == 0 && use_d_ino) + { + use_d_ino = false; + rewinddir (dirstream); + d = __readdir (dirstream); + } + + if (d == NULL) + { + if (errno == 0) + /* EOF on dirstream, which can mean e.g., that the current + directory has been removed. */ + __set_errno (ENOENT); + goto lose; + } + if (d->d_name[0] == '.' && + (d->d_name[1] == '\0' || + (d->d_name[1] == '.' && d->d_name[2] == '\0'))) + continue; + + if (use_d_ino) + { + bool match = (MATCHING_INO (d, thisino) || mount_point); + if (! match) + continue; + } + + { + int entry_status; +#if HAVE_OPENAT_SUPPORT + entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW); +#else + /* Compute size needed for this file name, or for the file + name ".." in the same directory, whichever is larger. + Room for ".." might be needed the next time through + the outer loop. */ + size_t name_alloc = _D_ALLOC_NAMLEN (d); + size_t filesize = dotlen + MAX (sizeof "..", name_alloc); + + if (filesize < dotlen) + goto memory_exhausted; + + if (dotsize < filesize) + { + /* My, what a deep directory tree you have, Grandma. */ + size_t newsize = MAX (filesize, dotsize * 2); + size_t i; + if (newsize < dotsize) + goto memory_exhausted; + if (dotlist != dots) + free (dotlist); + dotlist = malloc (newsize); + if (dotlist == NULL) + goto lose; + dotsize = newsize; + + i = 0; + do + { + dotlist[i++] = '.'; + dotlist[i++] = '.'; + dotlist[i++] = '/'; + } + while (i < dotlen); + } + + memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d)); + entry_status = __lstat (dotlist, &st); +#endif + /* We don't fail here if we cannot stat() a directory entry. + This can happen when (network) file systems fail. If this + entry is in fact the one we are looking for we will find + out soon as we reach the end of the directory without + having found anything. */ + if (entry_status == 0 && S_ISDIR (st.st_mode) + && st.st_dev == thisdev && st.st_ino == thisino) + break; + } + } + + dirroom = dirp - dir; + namlen = _D_EXACT_NAMLEN (d); + + if (dirroom <= namlen) + { + if (size != 0) + { + __set_errno (ERANGE); + goto lose; + } + else + { + char *tmp; + size_t oldsize = allocated; + + allocated += MAX (allocated, namlen); + if (allocated < oldsize + || ! (tmp = realloc (dir, allocated))) + goto memory_exhausted; + + /* Move current contents up to the end of the buffer. + This is guaranteed to be non-overlapping. */ + dirp = memcpy (tmp + allocated - (oldsize - dirroom), + tmp + dirroom, + oldsize - dirroom); + dir = tmp; + } + } + dirp -= namlen; + memcpy (dirp, d->d_name, namlen); + *--dirp = '/'; + + thisdev = dotdev; + thisino = dotino; + } + + if (dirstream && __closedir (dirstream) != 0) + { + dirstream = NULL; + goto lose; + } + + if (dirp == &dir[allocated - 1]) + *--dirp = '/'; + +#if ! HAVE_OPENAT_SUPPORT + if (dotlist != dots) + free (dotlist); +#endif + + used = dir + allocated - dirp; + memmove (dir, dirp, used); + + if (size == 0) + /* Ensure that the buffer is only as large as necessary. */ + buf = realloc (dir, used); + + if (buf == NULL) + /* Either buf was NULL all along, or 'realloc' failed but + we still have the original string. */ + buf = dir; + + return buf; + + memory_exhausted: + __set_errno (ENOMEM); + lose: + { + int save = errno; + if (dirstream) + __closedir (dirstream); +#if HAVE_OPENAT_SUPPORT + if (fd_needs_closing) + close (fd); +#else + if (dotlist != dots) + free (dotlist); +#endif + if (buf == NULL) + free (dir); + __set_errno (save); + } + return NULL; +} + +#ifdef weak_alias +weak_alias (__getcwd, getcwd) +#endif diff --git a/gl/lib/getdelim.c b/gl/lib/getdelim.c new file mode 100644 index 0000000..e5714ba --- /dev/null +++ b/gl/lib/getdelim.c @@ -0,0 +1,135 @@ +/* getdelim.c --- Implementation of replacement getdelim function. + Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2014 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Ported from glibc by Simon Josefsson. */ + +/* 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 + +#include + +#include +#include +#include +#include + +#ifndef SSIZE_MAX +# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) +#endif + +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +# define getc_maybe_unlocked(fp) getc(fp) +#elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED +# undef flockfile +# undef funlockfile +# define flockfile(x) ((void) 0) +# define funlockfile(x) ((void) 0) +# define getc_maybe_unlocked(fp) getc(fp) +#else +# define getc_maybe_unlocked(fp) getc_unlocked(fp) +#endif + +/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and + NUL-terminate it). *LINEPTR is a pointer returned from malloc (or + NULL), pointing to *N characters of space. It is realloc'ed as + necessary. Returns the number of characters read (not including + the null terminator), or -1 on error or EOF. */ + +ssize_t +getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) +{ + ssize_t result; + size_t cur_len = 0; + + if (lineptr == NULL || n == NULL || fp == NULL) + { + errno = EINVAL; + return -1; + } + + flockfile (fp); + + if (*lineptr == NULL || *n == 0) + { + char *new_lineptr; + *n = 120; + new_lineptr = (char *) realloc (*lineptr, *n); + if (new_lineptr == NULL) + { + result = -1; + goto unlock_return; + } + *lineptr = new_lineptr; + } + + for (;;) + { + int i; + + i = getc_maybe_unlocked (fp); + if (i == EOF) + { + result = -1; + break; + } + + /* Make enough space for len+1 (for final NUL) bytes. */ + if (cur_len + 1 >= *n) + { + size_t needed_max = + SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; + size_t needed = 2 * *n + 1; /* Be generous. */ + char *new_lineptr; + + if (needed_max < needed) + needed = needed_max; + if (cur_len + 1 >= needed) + { + result = -1; + errno = EOVERFLOW; + goto unlock_return; + } + + new_lineptr = (char *) realloc (*lineptr, needed); + if (new_lineptr == NULL) + { + result = -1; + goto unlock_return; + } + + *lineptr = new_lineptr; + *n = needed; + } + + (*lineptr)[cur_len] = i; + cur_len++; + + if (i == delimiter) + break; + } + (*lineptr)[cur_len] = '\0'; + result = cur_len ? cur_len : result; + + unlock_return: + funlockfile (fp); /* doesn't set errno */ + + return result; +} diff --git a/gl/lib/getdtablesize.c b/gl/lib/getdtablesize.c new file mode 100644 index 0000000..946738c --- /dev/null +++ b/gl/lib/getdtablesize.c @@ -0,0 +1,107 @@ +/* getdtablesize() function for platforms that don't have it. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + +# include + +# include "msvc-inval.h" + +# if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static int +_setmaxstdio_nothrow (int newmax) +{ + int result; + + TRY_MSVC_INVAL + { + result = _setmaxstdio (newmax); + } + CATCH_MSVC_INVAL + { + result = -1; + } + DONE_MSVC_INVAL; + + return result; +} +# define _setmaxstdio _setmaxstdio_nothrow +# endif + +/* Cache for the previous getdtablesize () result. Safe to cache because + Windows also lacks setrlimit. */ +static int dtablesize; + +int +getdtablesize (void) +{ + if (dtablesize == 0) + { + /* We are looking for the number N such that the valid file descriptors + are 0..N-1. It can be obtained through a loop as follows: + { + int fd; + for (fd = 3; fd < 65536; fd++) + if (dup2 (0, fd) == -1) + break; + return fd; + } + On Windows XP, the result is 2048. + The drawback of this loop is that it allocates memory for a libc + internal array that is never freed. + + The number N can also be obtained as the upper bound for + _getmaxstdio (). _getmaxstdio () returns the maximum number of open + FILE objects. The sanity check in _setmaxstdio reveals the maximum + number of file descriptors. This too allocates memory, but it is + freed when we call _setmaxstdio with the original value. */ + int orig_max_stdio = _getmaxstdio (); + unsigned int bound; + for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2) + ; + _setmaxstdio (orig_max_stdio); + dtablesize = bound; + } + return dtablesize; +} + +#elif HAVE_GETDTABLESIZE + +# include +# undef getdtablesize + +int +rpl_getdtablesize(void) +{ + /* To date, this replacement is only compiled for Cygwin 1.7.25, + which auto-increased the RLIMIT_NOFILE soft limit until it + hits the compile-time constant hard limit of 3200. Although + that version of cygwin supported a child process inheriting + a smaller soft limit, the smaller limit is not enforced, so + we might as well just report the hard limit. */ + struct rlimit lim; + if (!getrlimit (RLIMIT_NOFILE, &lim) && lim.rlim_max != RLIM_INFINITY) + return lim.rlim_max; + return getdtablesize (); +} + +#endif diff --git a/gl/lib/getfilecon.c b/gl/lib/getfilecon.c new file mode 100644 index 0000000..2aa489e --- /dev/null +++ b/gl/lib/getfilecon.c @@ -0,0 +1,86 @@ +/* wrap getfilecon, lgetfilecon, and fgetfilecon + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* written by Jim Meyering */ + +#include + +#include + +#include +#include +#include + +/* FIXME: remove this once there is an errno-gnu module + that guarantees the definition of ENODATA. */ +#ifndef ENODATA +# define ENODATA ENOTSUP +#endif + +#undef getfilecon +#undef lgetfilecon +#undef fgetfilecon +int getfilecon (char const *file, security_context_t *con); +int lgetfilecon (char const *file, security_context_t *con); +int fgetfilecon (int fd, security_context_t *con); + +/* getfilecon, lgetfilecon, and fgetfilecon can all misbehave, be it + via an old version of libselinux where these would return 0 and set the + result context to NULL, or via a modern kernel+lib operating on a file + from a disk whose attributes were set by a kernel from around 2006. + In that latter case, the functions return a length of 10 for the + "unlabeled" context. Map both failures to a return value of -1, and + set errno to ENOTSUP in the first case, and ENODATA in the latter. */ + +static int +map_to_failure (int ret, security_context_t *con) +{ + if (ret == 0) + { + errno = ENOTSUP; + return -1; + } + + if (ret == 10 && strcmp (*con, "unlabeled") == 0) + { + freecon (*con); + errno = ENODATA; + return -1; + } + + return ret; +} + +int +rpl_getfilecon (char const *file, security_context_t *con) +{ + int ret = getfilecon (file, con); + return map_to_failure (ret, con); +} + +int +rpl_lgetfilecon (char const *file, security_context_t *con) +{ + int ret = lgetfilecon (file, con); + return map_to_failure (ret, con); +} + +int +rpl_fgetfilecon (int fd, security_context_t *con) +{ + int ret = fgetfilecon (fd, con); + return map_to_failure (ret, con); +} diff --git a/gl/lib/getgroups.c b/gl/lib/getgroups.c new file mode 100644 index 0000000..91a340f --- /dev/null +++ b/gl/lib/getgroups.c @@ -0,0 +1,131 @@ +/* provide consistent interface to getgroups for systems that don't allow N==0 + + Copyright (C) 1996, 1999, 2003, 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#include + +#include + +#include +#include +#include + +#if !HAVE_GETGROUPS + +/* Provide a stub that fails with ENOSYS, since there is no group + information available on mingw. */ +int +getgroups (int n _GL_UNUSED, GETGROUPS_T *groups _GL_UNUSED) +{ + errno = ENOSYS; + return -1; +} + +#else /* HAVE_GETGROUPS */ + +# undef getgroups +# ifndef GETGROUPS_ZERO_BUG +# define GETGROUPS_ZERO_BUG 0 +# endif + +/* On OS X 10.6 and later, use the usual getgroups, not the one + supplied when _DARWIN_C_SOURCE is defined. _DARWIN_C_SOURCE is + normally defined, since it means "conform to POSIX, but add + non-POSIX extensions even if that violates the POSIX namespace + rules", which is what we normally want. But with getgroups there + is an inconsistency, and _DARWIN_C_SOURCE means "change getgroups() + so that it no longer works right". The BUGS section of compat(5) + says that the behavior is dubious if you compile different sections + of a program with different _DARWIN_C_SOURCE settings, so fix only + the offending symbol. */ +# ifdef __APPLE__ +int posix_getgroups (int, gid_t []) __asm ("_getgroups"); +# define getgroups posix_getgroups +# endif + +/* On at least Ultrix 4.3 and NextStep 3.2, getgroups (0, NULL) always + fails. On other systems, it returns the number of supplemental + groups for the process. This function handles that special case + and lets the system-provided function handle all others. However, + it can fail with ENOMEM if memory is tight. It is unspecified + whether the effective group id is included in the list. */ + +int +rpl_getgroups (int n, gid_t *group) +{ + int n_groups; + GETGROUPS_T *gbuf; + int saved_errno; + + if (n < 0) + { + errno = EINVAL; + return -1; + } + + if (n != 0 || !GETGROUPS_ZERO_BUG) + { + int result; + if (sizeof *group == sizeof *gbuf) + return getgroups (n, (GETGROUPS_T *) group); + + if (SIZE_MAX / sizeof *gbuf <= n) + { + errno = ENOMEM; + return -1; + } + gbuf = malloc (n * sizeof *gbuf); + if (!gbuf) + return -1; + result = getgroups (n, gbuf); + if (0 <= result) + { + n = result; + while (n--) + group[n] = gbuf[n]; + } + saved_errno = errno; + free (gbuf); + errno = saved_errno; + return result; + } + + n = 20; + while (1) + { + /* No need to worry about address arithmetic overflow here, + since the ancient systems that we're running on have low + limits on the number of secondary groups. */ + gbuf = malloc (n * sizeof *gbuf); + if (!gbuf) + return -1; + n_groups = getgroups (n, gbuf); + if (n_groups == -1 ? errno != EINVAL : n_groups < n) + break; + free (gbuf); + n *= 2; + } + + saved_errno = errno; + free (gbuf); + errno = saved_errno; + + return n_groups; +} + +#endif /* HAVE_GETGROUPS */ diff --git a/gl/lib/gethostname.c b/gl/lib/gethostname.c new file mode 100644 index 0000000..785fd71 --- /dev/null +++ b/gl/lib/gethostname.c @@ -0,0 +1,104 @@ +/* gethostname emulation for SysV and POSIX.1. + + Copyright (C) 1992, 2003, 2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* David MacKenzie + Windows port by Simon Josefsson */ + +#include + +#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) +/* Unix API. */ + +/* Specification. */ +#include + +#ifdef HAVE_UNAME +# include +#endif + +#include + +/* Put up to LEN chars of the host name into NAME. + Null terminate it if the name is shorter than LEN. + Return 0 if ok, -1 if error. */ + +#include + +int +gethostname (char *name, size_t len) +{ +#ifdef HAVE_UNAME + struct utsname uts; + + if (uname (&uts) == -1) + return -1; + if (len > sizeof (uts.nodename)) + { + /* More space than we need is available. */ + name[sizeof (uts.nodename)] = '\0'; + len = sizeof (uts.nodename); + } + strncpy (name, uts.nodename, len); +#else + strcpy (name, ""); /* Hardcode your system name if you want. */ +#endif + return 0; +} + +#else +/* Native Windows API. Which primitive to choose? + - gethostname() requires linking with -lws2_32. + - GetComputerName() does not return the right kind of hostname. + - GetComputerNameEx(ComputerNameDnsHostname,...) returns the right hostname, + but it is hard to use portably: + - It requires defining _WIN32_WINNT to at least 0x0500. + - With mingw, it also requires + "#define GetComputerNameEx GetComputerNameExA". + - With older versions of mingw, none of the declarations are present at + all, not even of the enum value ComputerNameDnsHostname. + So we use gethostname(). Linking with -lws2_32 is the least evil. */ + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get INT_MAX. */ +#include + +/* Get set_winsock_errno. */ +#include "w32sock.h" + +#include "sockets.h" + +#undef gethostname + +int +rpl_gethostname (char *name, size_t len) +{ + int r; + + if (len > INT_MAX) + len = INT_MAX; + gl_sockets_startup (SOCKETS_1_1); + r = gethostname (name, (int) len); + if (r < 0) + set_winsock_errno (); + + return r; +} + +#endif diff --git a/gl/lib/getline.c b/gl/lib/getline.c new file mode 100644 index 0000000..5282e80 --- /dev/null +++ b/gl/lib/getline.c @@ -0,0 +1,27 @@ +/* getline.c --- Implementation of replacement getline function. + Copyright (C) 2005-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 3, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Simon Josefsson. */ + +#include + +#include + +ssize_t +getline (char **lineptr, size_t *n, FILE *stream) +{ + return getdelim (lineptr, n, '\n', stream); +} diff --git a/gl/lib/getopt.c b/gl/lib/getopt.c new file mode 100644 index 0000000..7d950af --- /dev/null +++ b/gl/lib/getopt.c @@ -0,0 +1,1245 @@ +/* Getopt for GNU. + 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-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _LIBC +# include +#endif + +#include "getopt.h" + +#include +#include +#include +#include + +#ifdef _LIBC +# include +#else +# include "gettext.h" +# define _(msgid) gettext (msgid) +#endif + +#if defined _LIBC && defined USE_IN_LIBIO +# include +#endif + +/* This version of 'getopt' appears to the caller like standard Unix 'getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As 'getopt_long' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Using 'getopt' or setting the environment variable POSIXLY_CORRECT + disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include "getopt_int.h" + +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when 'ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to 'getopt'. + + On entry to 'getopt', zero means this is the first call; initialize. + + When 'getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, 'optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* 1003.2 says this must be 1 before any call. */ +int optind = 1; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Keep a global copy of all internal members of getopt_data. */ + +static struct _getopt_data getopt_data; + + +#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV +extern char *getenv (); +#endif + +#ifdef _LIBC +/* Stored original parameters. + XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ +extern int __libc_argc; +extern char **__libc_argv; + +/* Bash 2.0 gives us an environment variable containing flags + indicating ARGV elements that should not be considered arguments. */ + +# ifdef USE_NONOPTION_FLAGS +/* Defined in getopt_init.c */ +extern char *__getopt_nonoption_flags; +# endif + +# ifdef USE_NONOPTION_FLAGS +# define SWAP_FLAGS(ch1, ch2) \ + if (d->__nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } +# else +# define SWAP_FLAGS(ch1, ch2) +# endif +#else /* !_LIBC */ +# define SWAP_FLAGS(ch1, ch2) +#endif /* _LIBC */ + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + 'first_nonopt' and 'last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +static void +exchange (char **argv, struct _getopt_data *d) +{ + int bottom = d->__first_nonopt; + int middle = d->__last_nonopt; + int top = d->optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + /* First make sure the handling of the '__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; + else + { + memset (__mempcpy (new_str, __getopt_nonoption_flags, + d->__nonoption_flags_max_len), + '\0', top + 1 - d->__nonoption_flags_max_len); + d->__nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } +#endif + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + d->__first_nonopt += (d->optind - d->__last_nonopt); + d->__last_nonopt = d->optind; +} + +/* Initialize the internal data when the first call is made. */ + +static const char * +_getopt_initialize (int argc _GL_UNUSED, + char **argv _GL_UNUSED, const char *optstring, + struct _getopt_data *d, int posixly_correct) +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + d->__first_nonopt = d->__last_nonopt = d->optind; + + d->__nextchar = NULL; + + d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + d->__ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + d->__ordering = REQUIRE_ORDER; + ++optstring; + } + else if (d->__posixly_correct) + d->__ordering = REQUIRE_ORDER; + else + d->__ordering = PERMUTE; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + if (!d->__posixly_correct + && argc == __libc_argc && argv == __libc_argv) + { + if (d->__nonoption_flags_max_len == 0) + { + if (__getopt_nonoption_flags == NULL + || __getopt_nonoption_flags[0] == '\0') + d->__nonoption_flags_max_len = -1; + else + { + const char *orig_str = __getopt_nonoption_flags; + int len = d->__nonoption_flags_max_len = strlen (orig_str); + if (d->__nonoption_flags_max_len < argc) + d->__nonoption_flags_max_len = argc; + __getopt_nonoption_flags = + (char *) malloc (d->__nonoption_flags_max_len); + if (__getopt_nonoption_flags == NULL) + d->__nonoption_flags_max_len = -1; + else + memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', d->__nonoption_flags_max_len - len); + } + } + d->__nonoption_flags_len = d->__nonoption_flags_max_len; + } + else + d->__nonoption_flags_len = 0; +#endif + + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If 'getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If 'getopt' finds another option character, it returns that character, + updating 'optind' and 'nextchar' so that the next call to 'getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, 'getopt' returns -1. + Then 'optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set 'opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in 'optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in 'optarg', otherwise 'optarg' is set to zero. + + If OPTSTRING starts with '-' or '+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with '--' instead of '-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a '=', or else the in next ARGV-element. + When 'getopt' finds a long-named option, it returns 0 if that option's + 'flag' field is nonzero, the value of the option's 'val' field + if the 'flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of 'struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal_r (int argc, char **argv, const char *optstring, + const struct option *longopts, int *longind, + int long_only, struct _getopt_data *d, int posixly_correct) +{ + int print_errors = d->opterr; + + if (argc < 1) + return -1; + + d->optarg = NULL; + + if (d->optind == 0 || !d->__initialized) + { + if (d->optind == 0) + d->optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring, d, + posixly_correct); + d->__initialized = 1; + } + else if (optstring[0] == '-' || optstring[0] == '+') + optstring++; + if (optstring[0] == ':') + print_errors = 0; + + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ +#if defined _LIBC && defined USE_NONOPTION_FLAGS +# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ + || (d->optind < d->__nonoption_flags_len \ + && __getopt_nonoption_flags[d->optind] == '1')) +#else +# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') +#endif + + if (d->__nextchar == NULL || *d->__nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (d->__last_nonopt > d->optind) + d->__last_nonopt = d->optind; + if (d->__first_nonopt > d->optind) + d->__first_nonopt = d->optind; + + if (d->__ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (d->__first_nonopt != d->__last_nonopt + && d->__last_nonopt != d->optind) + exchange ((char **) argv, d); + else if (d->__last_nonopt != d->optind) + d->__first_nonopt = d->optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (d->optind < argc && NONOPTION_P) + d->optind++; + d->__last_nonopt = d->optind; + } + + /* The special ARGV-element '--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (d->optind != argc && !strcmp (argv[d->optind], "--")) + { + d->optind++; + + if (d->__first_nonopt != d->__last_nonopt + && d->__last_nonopt != d->optind) + exchange ((char **) argv, d); + else if (d->__first_nonopt == d->__last_nonopt) + d->__first_nonopt = d->optind; + d->__last_nonopt = argc; + + d->optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (d->optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (d->__first_nonopt != d->__last_nonopt) + d->optind = d->__first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) + { + if (d->__ordering == REQUIRE_ORDER) + return -1; + d->optarg = argv[d->optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + d->__nextchar = (argv[d->optind] + 1 + + (longopts != NULL && argv[d->optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[d->optind][1] == '-' + || (long_only && (argv[d->optind][2] + || !strchr (optstring, argv[d->optind][1]))))) + { + char *nameend; + unsigned int namelen; + const struct option *p; + const struct option *pfound = NULL; + struct option_list + { + const struct option *p; + struct option_list *next; + } *ambig_list = NULL; + int exact = 0; + int indfound = -1; + int option_index; + + for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + namelen = nameend - d->__nextchar; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, d->__nextchar, namelen)) + { + if (namelen == (unsigned int) strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + { + /* Second or later nonexact match found. */ + struct option_list *newp = malloc (sizeof (*newp)); + newp->p = p; + newp->next = ambig_list; + ambig_list = newp; + } + } + + if (ambig_list != NULL && !exact) + { + if (print_errors) + { + struct option_list first; + first.p = pfound; + first.next = ambig_list; + ambig_list = &first; + +#if defined _LIBC && defined USE_IN_LIBIO + char *buf = NULL; + size_t buflen = 0; + + FILE *fp = open_memstream (&buf, &buflen); + if (fp != NULL) + { + fprintf (fp, + _("%s: option '%s' is ambiguous; possibilities:"), + argv[0], argv[d->optind]); + + do + { + fprintf (fp, " '--%s'", ambig_list->p->name); + ambig_list = ambig_list->next; + } + while (ambig_list != NULL); + + fputc_unlocked ('\n', fp); + + if (__builtin_expect (fclose (fp) != EOF, 1)) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } + } +#else + fprintf (stderr, + _("%s: option '%s' is ambiguous; possibilities:"), + argv[0], argv[d->optind]); + do + { + fprintf (stderr, " '--%s'", ambig_list->p->name); + ambig_list = ambig_list->next; + } + while (ambig_list != NULL); + + fputc ('\n', stderr); +#endif + } + d->__nextchar += strlen (d->__nextchar); + d->optind++; + d->optopt = 0; + return '?'; + } + + while (ambig_list != NULL) + { + struct option_list *pn = ambig_list->next; + free (ambig_list); + ambig_list = pn; + } + + if (pfound != NULL) + { + option_index = indfound; + d->optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + d->optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + + if (argv[d->optind - 1][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("\ +%s: option '--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#else + fprintf (stderr, _("\ +%s: option '--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("\ +%s: option '%c%s' doesn't allow an argument\n"), + argv[0], argv[d->optind - 1][0], + pfound->name); +#else + fprintf (stderr, _("\ +%s: option '%c%s' doesn't allow an argument\n"), + argv[0], argv[d->optind - 1][0], + pfound->name); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#endif + } + + d->__nextchar += strlen (d->__nextchar); + + d->optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (d->optind < argc) + d->optarg = argv[d->optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option '--%s' requires an argument\n"), + argv[0], pfound->name) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option '--%s' requires an argument\n"), + argv[0], pfound->name); +#endif + } + d->__nextchar += strlen (d->__nextchar); + d->optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + d->__nextchar += strlen (d->__nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[d->optind][1] == '-' + || strchr (optstring, *d->__nextchar) == NULL) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + + if (argv[d->optind][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), + argv[0], d->__nextchar); +#else + fprintf (stderr, _("%s: unrecognized option '--%s'\n"), + argv[0], d->__nextchar); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), + argv[0], argv[d->optind][0], d->__nextchar); +#else + fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), + argv[0], argv[d->optind][0], d->__nextchar); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#endif + } + d->__nextchar = (char *) ""; + d->optind++; + d->optopt = 0; + return '?'; + } + } + + /* Look at and handle the next short option-character. */ + + { + char c = *d->__nextchar++; + const char *temp = strchr (optstring, c); + + /* Increment 'optind' when we start to process its last character. */ + if (*d->__nextchar == '\0') + ++d->optind; + + if (temp == NULL || c == ':' || c == ';') + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); +#endif + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#endif + } + d->optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + if (longopts == NULL) + goto no_longs; + + /* This is an option that requires an argument. */ + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + d->optind++; + } + else if (d->optind == argc) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, + _("%s: option requires an argument -- '%c'\n"), + argv[0], c) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option requires an argument -- '%c'\n"), + argv[0], c); +#endif + } + d->optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented 'd->optind' once; + increment it again when taking next ARGV-elt as argument. */ + d->optarg = argv[d->optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; + nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) + { + if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), + argv[0], d->optarg) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), + argv[0], d->optarg); +#endif + } + d->__nextchar += strlen (d->__nextchar); + d->optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + d->optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option '-W %s' doesn't allow an argument\n"), + argv[0], pfound->name) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, _("\ +%s: option '-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + + d->__nextchar += strlen (d->__nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (d->optind < argc) + d->optarg = argv[d->optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option '-W %s' requires an argument\n"), + argv[0], pfound->name) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 + |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, _("\ +%s: option '-W %s' requires an argument\n"), + argv[0], pfound->name); +#endif + } + d->__nextchar += strlen (d->__nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + else + d->optarg = NULL; + d->__nextchar += strlen (d->__nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + no_longs: + d->__nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + d->optind++; + } + else + d->optarg = NULL; + d->__nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*d->__nextchar != '\0') + { + d->optarg = d->__nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + d->optind++; + } + else if (d->optind == argc) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option requires an argument -- '%c'\n"), + argv[0], c) >= 0) + { + _IO_flockfile (stderr); + + int old_flags2 = ((_IO_FILE *) stderr)->_flags2; + ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + + __fxprintf (NULL, "%s", buf); + + ((_IO_FILE *) stderr)->_flags2 = old_flags2; + _IO_funlockfile (stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option requires an argument -- '%c'\n"), + argv[0], c); +#endif + } + d->optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented 'optind' once; + increment it again when taking next ARGV-elt as argument. */ + d->optarg = argv[d->optind++]; + d->__nextchar = NULL; + } + } + return c; + } +} + +int +_getopt_internal (int argc, char **argv, const char *optstring, + const struct option *longopts, int *longind, int long_only, + int posixly_correct) +{ + int result; + + getopt_data.optind = optind; + getopt_data.opterr = opterr; + + result = _getopt_internal_r (argc, argv, optstring, longopts, + longind, long_only, &getopt_data, + posixly_correct); + + optind = getopt_data.optind; + optarg = getopt_data.optarg; + optopt = getopt_data.optopt; + + return result; +} + +/* glibc gets a LSB-compliant getopt. + Standalone applications get a POSIX-compliant getopt. */ +#if _LIBC +enum { POSIXLY_CORRECT = 0 }; +#else +enum { POSIXLY_CORRECT = 1 }; +#endif + +int +getopt (int argc, char *const *argv, const char *optstring) +{ + return _getopt_internal (argc, (char **) argv, optstring, + (const struct option *) 0, + (int *) 0, + 0, POSIXLY_CORRECT); +} + +#ifdef _LIBC +int +__posix_getopt (int argc, char *const *argv, const char *optstring) +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0, 1); +} +#endif + + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of 'getopt'. */ + +int +main (int argc, char **argv) +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == -1) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value '%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/gl/lib/getopt.in.h b/gl/lib/getopt.in.h new file mode 100644 index 0000000..7ab99fb --- /dev/null +++ b/gl/lib/getopt.in.h @@ -0,0 +1,255 @@ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _@GUARD_PREFIX@_GETOPT_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. We must + also inform the replacement unistd.h to not recursively use + ; our definitions will be present soon enough. */ +#if @HAVE_GETOPT_H@ +# define _GL_SYSTEM_GETOPT +# @INCLUDE_NEXT@ @NEXT_GETOPT_H@ +# undef _GL_SYSTEM_GETOPT +#endif + +#ifndef _@GUARD_PREFIX@_GETOPT_H + +#ifndef __need_getopt +# define _@GUARD_PREFIX@_GETOPT_H 1 +#endif + +/* Standalone applications should #define __GETOPT_PREFIX to an + identifier that prefixes the external functions and variables + defined in this header. When this happens, include the + headers that might declare getopt so that they will not cause + confusion if included after this file (if the system had , + we have already included it). Then systematically rename + identifiers so that they do not collide with the system functions + and variables. Renaming avoids problems with some compilers and + linkers. */ +#if defined __GETOPT_PREFIX && !defined __need_getopt +# if !@HAVE_GETOPT_H@ +# define __need_system_stdlib_h +# include +# undef __need_system_stdlib_h +# include +# include +# endif +# undef __need_getopt +# undef getopt +# undef getopt_long +# undef getopt_long_only +# undef optarg +# undef opterr +# undef optind +# undef optopt +# undef option +# define __GETOPT_CONCAT(x, y) x ## y +# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) +# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) +# define getopt __GETOPT_ID (getopt) +# define getopt_long __GETOPT_ID (getopt_long) +# define getopt_long_only __GETOPT_ID (getopt_long_only) +# define optarg __GETOPT_ID (optarg) +# define opterr __GETOPT_ID (opterr) +# define optind __GETOPT_ID (optind) +# define optopt __GETOPT_ID (optopt) +# define option __GETOPT_ID (option) +# define _getopt_internal __GETOPT_ID (getopt_internal) +#endif + +/* Standalone applications get correct prototypes for getopt_long and + getopt_long_only; they declare "char **argv". libc uses prototypes + with "char *const *argv" that are incorrect because getopt_long and + getopt_long_only can permute argv; this is required for backward + compatibility (e.g., for LSB 2.0.1). + + This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', + but it caused redefinition warnings if both unistd.h and getopt.h were + included, since unistd.h includes getopt.h having previously defined + __need_getopt. + + The only place where __getopt_argv_const is used is in definitions + of getopt_long and getopt_long_only below, but these are visible + only if __need_getopt is not defined, so it is quite safe to rewrite + the conditional as follows: +*/ +#if !defined __need_getopt +# if defined __GETOPT_PREFIX +# define __getopt_argv_const /* empty */ +# else +# define __getopt_argv_const const +# endif +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include +#endif + +#ifndef __THROW +# ifndef __GNUC_PREREQ +# define __GNUC_PREREQ(maj, min) (0) +# endif +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# else +# define __THROW +# endif +#endif + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when 'ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to 'getopt'. + + On entry to 'getopt', zero means this is the first call; initialize. + + When 'getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, 'optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message 'getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of 'struct option' terminated by an element containing a name which is + zero. + + The field 'has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field 'flag' is not NULL, it points to a variable that is set + to the value given in the field 'val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an 'int' to + a compiled-in constant, such as set a value from 'optarg', set the + option's 'flag' field to zero and its 'val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero 'flag' field, 'getopt' + returns the contents of the 'val' field. */ + +# if !GNULIB_defined_struct_option +struct option +{ + const char *name; + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; +# define GNULIB_defined_struct_option 1 +# endif + +/* Names for the values of the 'has_arg' field of 'struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, 'optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in 'optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU 'getopt'. + + The argument '--' causes premature termination of argument + scanning, explicitly telling 'getopt' that there are no more + options. + + If OPTS begins with '-', then non-option arguments are treated as + arguments to the option '\1'. This behavior is specific to the GNU + 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in + the environment, then do not permute arguments. */ + +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#ifndef __need_getopt +extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); +extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind) + __THROW _GL_ARG_NONNULL ((2, 3)); + +#endif + +#ifdef __cplusplus +} +#endif + +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + +#endif /* _@GUARD_PREFIX@_GETOPT_H */ +#endif /* _@GUARD_PREFIX@_GETOPT_H */ diff --git a/gl/lib/getopt1.c b/gl/lib/getopt1.c new file mode 100644 index 0000000..a184865 --- /dev/null +++ b/gl/lib/getopt1.c @@ -0,0 +1,170 @@ +/* getopt_long and getopt_long_only entry points for GNU getopt. + Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef _LIBC +# include +#else +# include +# include "getopt.h" +#endif +#include "getopt_int.h" + +#include + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +#include +#endif + +#ifndef NULL +#define NULL 0 +#endif + +int +getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, + const struct option *long_options, int *opt_index) +{ + return _getopt_internal (argc, (char **) argv, options, long_options, + opt_index, 0, 0); +} + +int +_getopt_long_r (int argc, char **argv, const char *options, + const struct option *long_options, int *opt_index, + struct _getopt_data *d) +{ + return _getopt_internal_r (argc, argv, options, long_options, opt_index, + 0, d, 0); +} + +/* Like getopt_long, but '-' as well as '--' can indicate a long option. + If an option that starts with '-' (not '--') doesn't match a long option, + but does match a short option, it is parsed as a short option + instead. */ + +int +getopt_long_only (int argc, char *__getopt_argv_const *argv, + const char *options, + const struct option *long_options, int *opt_index) +{ + return _getopt_internal (argc, (char **) argv, options, long_options, + opt_index, 1, 0); +} + +int +_getopt_long_only_r (int argc, char **argv, const char *options, + const struct option *long_options, int *opt_index, + struct _getopt_data *d) +{ + return _getopt_internal_r (argc, argv, options, long_options, opt_index, + 1, d, 0); +} + + +#ifdef TEST + +#include + +int +main (int argc, char **argv) +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static const struct option long_options[] = + { + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 0, 0, 0}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} + }; + + c = getopt_long (argc, argv, "abc:d:0123456789", + long_options, &option_index); + if (c == -1) + break; + + switch (c) + { + case 0: + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value '%s'\n", optarg); + break; + + case 'd': + printf ("option d with value '%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/gl/lib/getopt_int.h b/gl/lib/getopt_int.h new file mode 100644 index 0000000..24ed672 --- /dev/null +++ b/gl/lib/getopt_int.h @@ -0,0 +1,135 @@ +/* Internal declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _GETOPT_INT_H +#define _GETOPT_INT_H 1 + +#include + +extern int _getopt_internal (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only, int __posixly_correct); + + +/* Reentrant versions which can handle parsing multiple argument + vectors at the same time. */ + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using '+' as the first character + of the list of option characters, or by calling getopt. + + PERMUTE is the default. We permute the contents of ARGV as we + scan, so that eventually all the non-options are at the end. + This allows options to be given in any order, even with programs + that were not written to expect this. + + RETURN_IN_ORDER is an option available to programs that were + written to expect options and other ARGV-elements in any order + and that care about the ordering of the two. We describe each + non-option ARGV-element as if it were the argument of an option + with character code 1. Using '-' as the first character of the + list of option characters selects this mode of operation. + + The special argument '--' forces an end of option-scanning regardless + of the value of 'ordering'. In the case of RETURN_IN_ORDER, only + '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */ + +enum __ord + { + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER + }; + +/* Data type for reentrant functions. */ +struct _getopt_data +{ + /* These have exactly the same meaning as the corresponding global + variables, except that they are used for the reentrant + versions of getopt. */ + int optind; + int opterr; + int optopt; + char *optarg; + + /* Internal members. */ + + /* True if the internal members have been initialized. */ + int __initialized; + + /* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + char *__nextchar; + + /* See __ord above. */ + enum __ord __ordering; + + /* If the POSIXLY_CORRECT environment variable is set + or getopt was called. */ + int __posixly_correct; + + + /* Handle permutation of arguments. */ + + /* Describe the part of ARGV that contains non-options that have + been skipped. 'first_nonopt' is the index in ARGV of the first + of them; 'last_nonopt' is the index after the last of them. */ + + int __first_nonopt; + int __last_nonopt; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + int __nonoption_flags_max_len; + int __nonoption_flags_len; +#endif +}; + +/* The initializer is necessary to set OPTIND and OPTERR to their + default values and to clear the initialization flag. */ +#define _GETOPT_DATA_INITIALIZER { 1, 1 } + +extern int _getopt_internal_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only, struct _getopt_data *__data, + int __posixly_correct); + +extern int _getopt_long_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + struct _getopt_data *__data); + +extern int _getopt_long_only_r (int ___argc, char **___argv, + const char *__shortopts, + const struct option *__longopts, + int *__longind, + struct _getopt_data *__data); + +#endif /* getopt_int.h */ diff --git a/gl/lib/gettext.h b/gl/lib/gettext.h new file mode 100644 index 0000000..c7d6fd3 --- /dev/null +++ b/gl/lib/gettext.h @@ -0,0 +1,288 @@ +/* Convenience header for conditional use of GNU . + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#ifndef _LIBGETTEXT_H +#define _LIBGETTEXT_H 1 + +/* NLS can be disabled through the configure --disable-nls option. */ +#if ENABLE_NLS + +/* Get declarations of GNU message catalog functions. */ +# include + +/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by + the gettext() and ngettext() macros. This is an alternative to calling + textdomain(), and is useful for libraries. */ +# ifdef DEFAULT_TEXT_DOMAIN +# undef gettext +# define gettext(Msgid) \ + dgettext (DEFAULT_TEXT_DOMAIN, Msgid) +# undef ngettext +# define ngettext(Msgid1, Msgid2, N) \ + dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) +# endif + +#else + +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which + chokes if dcgettext is defined as a macro. So include it now, to make + later inclusions of a NOP. We don't include + as well because people using "gettext.h" will not include , + and also including would fail on SunOS 4, whereas + is OK. */ +#if defined(__sun) +# include +#endif + +/* Many header files from the libstdc++ coming with g++ 3.3 or newer include + , which chokes if dcgettext is defined as a macro. So include + it now, to make later inclusions of a NOP. */ +#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) +# include +# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H +# include +# endif +#endif + +/* Disabled NLS. + The casts to 'const char *' serve the purpose of producing warnings + for invalid uses of the value returned from these functions. + On pre-ANSI systems without 'const', the config.h file is supposed to + contain "#define const". */ +# undef gettext +# define gettext(Msgid) ((const char *) (Msgid)) +# undef dgettext +# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) +# undef dcgettext +# define dcgettext(Domainname, Msgid, Category) \ + ((void) (Category), dgettext (Domainname, Msgid)) +# undef ngettext +# define ngettext(Msgid1, Msgid2, N) \ + ((N) == 1 \ + ? ((void) (Msgid2), (const char *) (Msgid1)) \ + : ((void) (Msgid1), (const char *) (Msgid2))) +# undef dngettext +# define dngettext(Domainname, Msgid1, Msgid2, N) \ + ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) +# undef dcngettext +# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ + ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) +# undef textdomain +# define textdomain(Domainname) ((const char *) (Domainname)) +# undef bindtextdomain +# define bindtextdomain(Domainname, Dirname) \ + ((void) (Domainname), (const char *) (Dirname)) +# undef bind_textdomain_codeset +# define bind_textdomain_codeset(Domainname, Codeset) \ + ((void) (Domainname), (const char *) (Codeset)) + +#endif + +/* Prefer gnulib's setlocale override over libintl's setlocale override. */ +#ifdef GNULIB_defined_setlocale +# undef setlocale +# define setlocale rpl_setlocale +#endif + +/* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ +#define gettext_noop(String) String + +/* The separator between msgctxt and msgid in a .mo file. */ +#define GETTEXT_CONTEXT_GLUE "\004" + +/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a + MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be + short and rarely need to change. + The letter 'p' stands for 'particular' or 'special'. */ +#ifdef DEFAULT_TEXT_DOMAIN +# define pgettext(Msgctxt, Msgid) \ + pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#else +# define pgettext(Msgctxt, Msgid) \ + pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#endif +#define dpgettext(Domainname, Msgctxt, Msgid) \ + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) +#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ + pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) +#ifdef DEFAULT_TEXT_DOMAIN +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#else +# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#endif +#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) +#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ + npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +pgettext_aux (const char *domain, + const char *msg_ctxt_id, const char *msgid, + int category) +{ + const char *translation = dcgettext (domain, msg_ctxt_id, category); + if (translation == msg_ctxt_id) + return msgid; + else + return translation; +} + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +npgettext_aux (const char *domain, + const char *msg_ctxt_id, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) +{ + const char *translation = + dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); + if (translation == msg_ctxt_id || translation == msgid_plural) + return (n == 1 ? msgid : msgid_plural); + else + return translation; +} + +/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID + can be arbitrary expressions. But for string literals these macros are + less efficient than those above. */ + +#include + +#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 +#endif + +#define pgettext_expr(Msgctxt, Msgid) \ + dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) +#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ + dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +dcpgettext_expr (const char *domain, + const char *msgctxt, const char *msgid, + int category) +{ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + char msg_ctxt_id[msgctxt_len + msgid_len]; +#else + char buf[1024]; + char *msg_ctxt_id = + (msgctxt_len + msgid_len <= sizeof (buf) + ? buf + : (char *) malloc (msgctxt_len + msgid_len)); + if (msg_ctxt_id != NULL) +#endif + { + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcgettext (domain, msg_ctxt_id, category); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); +#endif + if (translation != msg_ctxt_id) + return translation; + } + return msgid; +} + +#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ + dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) +#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static const char * +dcnpgettext_expr (const char *domain, + const char *msgctxt, const char *msgid, + const char *msgid_plural, unsigned long int n, + int category) +{ + size_t msgctxt_len = strlen (msgctxt) + 1; + size_t msgid_len = strlen (msgid) + 1; + const char *translation; +#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + char msg_ctxt_id[msgctxt_len + msgid_len]; +#else + char buf[1024]; + char *msg_ctxt_id = + (msgctxt_len + msgid_len <= sizeof (buf) + ? buf + : (char *) malloc (msgctxt_len + msgid_len)); + if (msg_ctxt_id != NULL) +#endif + { + memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); + msg_ctxt_id[msgctxt_len - 1] = '\004'; + memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); + translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS + if (msg_ctxt_id != buf) + free (msg_ctxt_id); +#endif + if (!(translation == msg_ctxt_id || translation == msgid_plural)) + return translation; + } + return (n == 1 ? msgid : msgid_plural); +} + +#endif /* _LIBGETTEXT_H */ diff --git a/gl/lib/gettime.c b/gl/lib/gettime.c new file mode 100644 index 0000000..1b4ca8d --- /dev/null +++ b/gl/lib/gettime.c @@ -0,0 +1,48 @@ +/* gettime -- get the system clock + + Copyright (C) 2002, 2004-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include + +#include "timespec.h" + +#include + +/* Get the system time into *TS. */ + +void +gettime (struct timespec *ts) +{ +#if HAVE_NANOTIME + nanotime (ts); +#else + +# if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME + if (clock_gettime (CLOCK_REALTIME, ts) == 0) + return; +# endif + + { + struct timeval tv; + gettimeofday (&tv, NULL); + ts->tv_sec = tv.tv_sec; + ts->tv_nsec = tv.tv_usec * 1000; + } + +#endif +} diff --git a/gl/lib/gettimeofday.c b/gl/lib/gettimeofday.c new file mode 100644 index 0000000..8b2058e --- /dev/null +++ b/gl/lib/gettimeofday.c @@ -0,0 +1,154 @@ +/* Provide gettimeofday for systems that don't have it or for which it's broken. + + Copyright (C) 2001-2003, 2005-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* written by Jim Meyering */ + +#include + +/* Specification. */ +#include + +#include + +#if HAVE_SYS_TIMEB_H +# include +#endif + +#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME + +/* Work around the bug in some systems whereby gettimeofday clobbers + the static buffer that localtime uses for its return value. The + gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has + this problem. The tzset replacement is necessary for at least + Solaris 2.5, 2.5.1, and 2.6. */ + +static struct tm tm_zero_buffer; +static struct tm *localtime_buffer_addr = &tm_zero_buffer; + +# undef localtime +extern struct tm *localtime (time_t const *); + +# undef gmtime +extern struct tm *gmtime (time_t const *); + +/* This is a wrapper for localtime. It is used only on systems for which + gettimeofday clobbers the static buffer used for localtime's result. + + On the first call, record the address of the static buffer that + localtime uses for its result. */ + +struct tm * +rpl_localtime (time_t const *timep) +{ + struct tm *tm = localtime (timep); + + if (localtime_buffer_addr == &tm_zero_buffer) + localtime_buffer_addr = tm; + + return tm; +} + +/* Same as above, since gmtime and localtime use the same buffer. */ +struct tm * +rpl_gmtime (time_t const *timep) +{ + struct tm *tm = gmtime (timep); + + if (localtime_buffer_addr == &tm_zero_buffer) + localtime_buffer_addr = tm; + + return tm; +} + +#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */ + +#if TZSET_CLOBBERS_LOCALTIME + +# undef tzset +extern void tzset (void); + +/* This is a wrapper for tzset, for systems on which tzset may clobber + the static buffer used for localtime's result. */ +void +rpl_tzset (void) +{ + /* Save and restore the contents of the buffer used for localtime's + result around the call to tzset. */ + struct tm save = *localtime_buffer_addr; + tzset (); + *localtime_buffer_addr = save; +} +#endif + +/* This is a wrapper for gettimeofday. It is used only on systems + that lack this function, or whose implementation of this function + causes problems. */ + +int +gettimeofday (struct timeval *restrict tv, void *restrict tz) +{ +#undef gettimeofday +#if HAVE_GETTIMEOFDAY +# if GETTIMEOFDAY_CLOBBERS_LOCALTIME + /* Save and restore the contents of the buffer used for localtime's + result around the call to gettimeofday. */ + struct tm save = *localtime_buffer_addr; +# endif + +# if defined timeval /* 'struct timeval' overridden by gnulib? */ +# undef timeval + struct timeval otv; + int result = gettimeofday (&otv, (struct timezone *) tz); + if (result == 0) + { + tv->tv_sec = otv.tv_sec; + tv->tv_usec = otv.tv_usec; + } +# else + int result = gettimeofday (tv, (struct timezone *) tz); +# endif + +# if GETTIMEOFDAY_CLOBBERS_LOCALTIME + *localtime_buffer_addr = save; +# endif + + return result; + +#else + +# if HAVE__FTIME + + struct _timeb timebuf; + _ftime (&timebuf); + tv->tv_sec = timebuf.time; + tv->tv_usec = timebuf.millitm * 1000; + +# else + +# if !defined OK_TO_USE_1S_CLOCK +# error "Only 1-second nominal clock resolution found. Is that intended?" \ + "If so, compile with the -DOK_TO_USE_1S_CLOCK option." +# endif + tv->tv_sec = time (NULL); + tv->tv_usec = 0; + +# endif + + return 0; + +#endif +} diff --git a/gl/lib/glthread/lock.c b/gl/lib/glthread/lock.c new file mode 100644 index 0000000..33c15a0 --- /dev/null +++ b/gl/lib/glthread/lock.c @@ -0,0 +1,1057 @@ +/* Locking in multithreaded situations. + Copyright (C) 2005-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Bruno Haible , 2005. + Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, + gthr-win32.h. */ + +#include + +#include "glthread/lock.h" + +/* ========================================================================= */ + +#if USE_POSIX_THREADS + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +# if HAVE_PTHREAD_RWLOCK + +# if !defined PTHREAD_RWLOCK_INITIALIZER + +int +glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) +{ + int err; + + err = pthread_rwlock_init (&lock->rwlock, NULL); + if (err != 0) + return err; + lock->initialized = 1; + return 0; +} + +int +glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) +{ + if (!lock->initialized) + { + int err; + + err = pthread_mutex_lock (&lock->guard); + if (err != 0) + return err; + if (!lock->initialized) + { + err = glthread_rwlock_init_multithreaded (lock); + if (err != 0) + { + pthread_mutex_unlock (&lock->guard); + return err; + } + } + err = pthread_mutex_unlock (&lock->guard); + if (err != 0) + return err; + } + return pthread_rwlock_rdlock (&lock->rwlock); +} + +int +glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) +{ + if (!lock->initialized) + { + int err; + + err = pthread_mutex_lock (&lock->guard); + if (err != 0) + return err; + if (!lock->initialized) + { + err = glthread_rwlock_init_multithreaded (lock); + if (err != 0) + { + pthread_mutex_unlock (&lock->guard); + return err; + } + } + err = pthread_mutex_unlock (&lock->guard); + if (err != 0) + return err; + } + return pthread_rwlock_wrlock (&lock->rwlock); +} + +int +glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) +{ + if (!lock->initialized) + return EINVAL; + return pthread_rwlock_unlock (&lock->rwlock); +} + +int +glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) +{ + int err; + + if (!lock->initialized) + return EINVAL; + err = pthread_rwlock_destroy (&lock->rwlock); + if (err != 0) + return err; + lock->initialized = 0; + return 0; +} + +# endif + +# else + +int +glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) +{ + int err; + + err = pthread_mutex_init (&lock->lock, NULL); + if (err != 0) + return err; + err = pthread_cond_init (&lock->waiting_readers, NULL); + if (err != 0) + return err; + err = pthread_cond_init (&lock->waiting_writers, NULL); + if (err != 0) + return err; + lock->waiting_writers_count = 0; + lock->runcount = 0; + return 0; +} + +int +glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) +{ + int err; + + err = pthread_mutex_lock (&lock->lock); + if (err != 0) + return err; + /* Test whether only readers are currently running, and whether the runcount + field will not overflow. */ + /* POSIX says: "It is implementation-defined whether the calling thread + acquires the lock when a writer does not hold the lock and there are + writers blocked on the lock." Let's say, no: give the writers a higher + priority. */ + while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) + { + /* This thread has to wait for a while. Enqueue it among the + waiting_readers. */ + err = pthread_cond_wait (&lock->waiting_readers, &lock->lock); + if (err != 0) + { + pthread_mutex_unlock (&lock->lock); + return err; + } + } + lock->runcount++; + return pthread_mutex_unlock (&lock->lock); +} + +int +glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) +{ + int err; + + err = pthread_mutex_lock (&lock->lock); + if (err != 0) + return err; + /* Test whether no readers or writers are currently running. */ + while (!(lock->runcount == 0)) + { + /* This thread has to wait for a while. Enqueue it among the + waiting_writers. */ + lock->waiting_writers_count++; + err = pthread_cond_wait (&lock->waiting_writers, &lock->lock); + if (err != 0) + { + lock->waiting_writers_count--; + pthread_mutex_unlock (&lock->lock); + return err; + } + lock->waiting_writers_count--; + } + lock->runcount--; /* runcount becomes -1 */ + return pthread_mutex_unlock (&lock->lock); +} + +int +glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) +{ + int err; + + err = pthread_mutex_lock (&lock->lock); + if (err != 0) + return err; + if (lock->runcount < 0) + { + /* Drop a writer lock. */ + if (!(lock->runcount == -1)) + { + pthread_mutex_unlock (&lock->lock); + return EINVAL; + } + lock->runcount = 0; + } + else + { + /* Drop a reader lock. */ + if (!(lock->runcount > 0)) + { + pthread_mutex_unlock (&lock->lock); + return EINVAL; + } + lock->runcount--; + } + if (lock->runcount == 0) + { + /* POSIX recommends that "write locks shall take precedence over read + locks", to avoid "writer starvation". */ + if (lock->waiting_writers_count > 0) + { + /* Wake up one of the waiting writers. */ + err = pthread_cond_signal (&lock->waiting_writers); + if (err != 0) + { + pthread_mutex_unlock (&lock->lock); + return err; + } + } + else + { + /* Wake up all waiting readers. */ + err = pthread_cond_broadcast (&lock->waiting_readers); + if (err != 0) + { + pthread_mutex_unlock (&lock->lock); + return err; + } + } + } + return pthread_mutex_unlock (&lock->lock); +} + +int +glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) +{ + int err; + + err = pthread_mutex_destroy (&lock->lock); + if (err != 0) + return err; + err = pthread_cond_destroy (&lock->waiting_readers); + if (err != 0) + return err; + err = pthread_cond_destroy (&lock->waiting_writers); + if (err != 0) + return err; + return 0; +} + +# endif + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +# if HAVE_PTHREAD_MUTEX_RECURSIVE + +# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP + +int +glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) +{ + pthread_mutexattr_t attributes; + int err; + + err = pthread_mutexattr_init (&attributes); + if (err != 0) + return err; + err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); + if (err != 0) + { + pthread_mutexattr_destroy (&attributes); + return err; + } + err = pthread_mutex_init (lock, &attributes); + if (err != 0) + { + pthread_mutexattr_destroy (&attributes); + return err; + } + err = pthread_mutexattr_destroy (&attributes); + if (err != 0) + return err; + return 0; +} + +# else + +int +glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) +{ + pthread_mutexattr_t attributes; + int err; + + err = pthread_mutexattr_init (&attributes); + if (err != 0) + return err; + err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); + if (err != 0) + { + pthread_mutexattr_destroy (&attributes); + return err; + } + err = pthread_mutex_init (&lock->recmutex, &attributes); + if (err != 0) + { + pthread_mutexattr_destroy (&attributes); + return err; + } + err = pthread_mutexattr_destroy (&attributes); + if (err != 0) + return err; + lock->initialized = 1; + return 0; +} + +int +glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) +{ + if (!lock->initialized) + { + int err; + + err = pthread_mutex_lock (&lock->guard); + if (err != 0) + return err; + if (!lock->initialized) + { + err = glthread_recursive_lock_init_multithreaded (lock); + if (err != 0) + { + pthread_mutex_unlock (&lock->guard); + return err; + } + } + err = pthread_mutex_unlock (&lock->guard); + if (err != 0) + return err; + } + return pthread_mutex_lock (&lock->recmutex); +} + +int +glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) +{ + if (!lock->initialized) + return EINVAL; + return pthread_mutex_unlock (&lock->recmutex); +} + +int +glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) +{ + int err; + + if (!lock->initialized) + return EINVAL; + err = pthread_mutex_destroy (&lock->recmutex); + if (err != 0) + return err; + lock->initialized = 0; + return 0; +} + +# endif + +# else + +int +glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) +{ + int err; + + err = pthread_mutex_init (&lock->mutex, NULL); + if (err != 0) + return err; + lock->owner = (pthread_t) 0; + lock->depth = 0; + return 0; +} + +int +glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) +{ + pthread_t self = pthread_self (); + if (lock->owner != self) + { + int err; + + err = pthread_mutex_lock (&lock->mutex); + if (err != 0) + return err; + lock->owner = self; + } + if (++(lock->depth) == 0) /* wraparound? */ + { + lock->depth--; + return EAGAIN; + } + return 0; +} + +int +glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) +{ + if (lock->owner != pthread_self ()) + return EPERM; + if (lock->depth == 0) + return EINVAL; + if (--(lock->depth) == 0) + { + lock->owner = (pthread_t) 0; + return pthread_mutex_unlock (&lock->mutex); + } + else + return 0; +} + +int +glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) +{ + if (lock->owner != (pthread_t) 0) + return EBUSY; + return pthread_mutex_destroy (&lock->mutex); +} + +# endif + +/* -------------------------- gl_once_t datatype -------------------------- */ + +static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT; + +int +glthread_once_singlethreaded (pthread_once_t *once_control) +{ + /* We don't know whether pthread_once_t is an integer type, a floating-point + type, a pointer type, or a structure type. */ + char *firstbyte = (char *)once_control; + if (*firstbyte == *(const char *)&fresh_once) + { + /* First time use of once_control. Invert the first byte. */ + *firstbyte = ~ *(const char *)&fresh_once; + return 1; + } + else + return 0; +} + +#endif + +/* ========================================================================= */ + +#if USE_PTH_THREADS + +/* Use the GNU Pth threads library. */ + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +/* -------------------------- gl_once_t datatype -------------------------- */ + +static void +glthread_once_call (void *arg) +{ + void (**gl_once_temp_addr) (void) = (void (**) (void)) arg; + void (*initfunction) (void) = *gl_once_temp_addr; + initfunction (); +} + +int +glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)) +{ + void (*temp) (void) = initfunction; + return (!pth_once (once_control, glthread_once_call, &temp) ? errno : 0); +} + +int +glthread_once_singlethreaded (pth_once_t *once_control) +{ + /* We know that pth_once_t is an integer type. */ + if (*once_control == PTH_ONCE_INIT) + { + /* First time use of once_control. Invert the marker. */ + *once_control = ~ PTH_ONCE_INIT; + return 1; + } + else + return 0; +} + +#endif + +/* ========================================================================= */ + +#if USE_SOLARIS_THREADS + +/* Use the old Solaris threads library. */ + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +int +glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) +{ + int err; + + err = mutex_init (&lock->mutex, USYNC_THREAD, NULL); + if (err != 0) + return err; + lock->owner = (thread_t) 0; + lock->depth = 0; + return 0; +} + +int +glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) +{ + thread_t self = thr_self (); + if (lock->owner != self) + { + int err; + + err = mutex_lock (&lock->mutex); + if (err != 0) + return err; + lock->owner = self; + } + if (++(lock->depth) == 0) /* wraparound? */ + { + lock->depth--; + return EAGAIN; + } + return 0; +} + +int +glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) +{ + if (lock->owner != thr_self ()) + return EPERM; + if (lock->depth == 0) + return EINVAL; + if (--(lock->depth) == 0) + { + lock->owner = (thread_t) 0; + return mutex_unlock (&lock->mutex); + } + else + return 0; +} + +int +glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) +{ + if (lock->owner != (thread_t) 0) + return EBUSY; + return mutex_destroy (&lock->mutex); +} + +/* -------------------------- gl_once_t datatype -------------------------- */ + +int +glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)) +{ + if (!once_control->inited) + { + int err; + + /* Use the mutex to guarantee that if another thread is already calling + the initfunction, this thread waits until it's finished. */ + err = mutex_lock (&once_control->mutex); + if (err != 0) + return err; + if (!once_control->inited) + { + once_control->inited = 1; + initfunction (); + } + return mutex_unlock (&once_control->mutex); + } + else + return 0; +} + +int +glthread_once_singlethreaded (gl_once_t *once_control) +{ + /* We know that gl_once_t contains an integer type. */ + if (!once_control->inited) + { + /* First time use of once_control. Invert the marker. */ + once_control->inited = ~ 0; + return 1; + } + else + return 0; +} + +#endif + +/* ========================================================================= */ + +#if USE_WINDOWS_THREADS + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +void +glthread_lock_init_func (gl_lock_t *lock) +{ + InitializeCriticalSection (&lock->lock); + lock->guard.done = 1; +} + +int +glthread_lock_lock_func (gl_lock_t *lock) +{ + if (!lock->guard.done) + { + if (InterlockedIncrement (&lock->guard.started) == 0) + /* This thread is the first one to need this lock. Initialize it. */ + glthread_lock_init (lock); + else + /* Yield the CPU while waiting for another thread to finish + initializing this lock. */ + while (!lock->guard.done) + Sleep (0); + } + EnterCriticalSection (&lock->lock); + return 0; +} + +int +glthread_lock_unlock_func (gl_lock_t *lock) +{ + if (!lock->guard.done) + return EINVAL; + LeaveCriticalSection (&lock->lock); + return 0; +} + +int +glthread_lock_destroy_func (gl_lock_t *lock) +{ + if (!lock->guard.done) + return EINVAL; + DeleteCriticalSection (&lock->lock); + lock->guard.done = 0; + return 0; +} + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +/* In this file, the waitqueues are implemented as circular arrays. */ +#define gl_waitqueue_t gl_carray_waitqueue_t + +static void +gl_waitqueue_init (gl_waitqueue_t *wq) +{ + wq->array = NULL; + wq->count = 0; + wq->alloc = 0; + wq->offset = 0; +} + +/* Enqueues the current thread, represented by an event, in a wait queue. + Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */ +static HANDLE +gl_waitqueue_add (gl_waitqueue_t *wq) +{ + HANDLE event; + unsigned int index; + + if (wq->count == wq->alloc) + { + unsigned int new_alloc = 2 * wq->alloc + 1; + HANDLE *new_array = + (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE)); + if (new_array == NULL) + /* No more memory. */ + return INVALID_HANDLE_VALUE; + /* Now is a good opportunity to rotate the array so that its contents + starts at offset 0. */ + if (wq->offset > 0) + { + unsigned int old_count = wq->count; + unsigned int old_alloc = wq->alloc; + unsigned int old_offset = wq->offset; + unsigned int i; + if (old_offset + old_count > old_alloc) + { + unsigned int limit = old_offset + old_count - old_alloc; + for (i = 0; i < limit; i++) + new_array[old_alloc + i] = new_array[i]; + } + for (i = 0; i < old_count; i++) + new_array[i] = new_array[old_offset + i]; + wq->offset = 0; + } + wq->array = new_array; + wq->alloc = new_alloc; + } + /* Whether the created event is a manual-reset one or an auto-reset one, + does not matter, since we will wait on it only once. */ + event = CreateEvent (NULL, TRUE, FALSE, NULL); + if (event == INVALID_HANDLE_VALUE) + /* No way to allocate an event. */ + return INVALID_HANDLE_VALUE; + index = wq->offset + wq->count; + if (index >= wq->alloc) + index -= wq->alloc; + wq->array[index] = event; + wq->count++; + return event; +} + +/* Notifies the first thread from a wait queue and dequeues it. */ +static void +gl_waitqueue_notify_first (gl_waitqueue_t *wq) +{ + SetEvent (wq->array[wq->offset + 0]); + wq->offset++; + wq->count--; + if (wq->count == 0 || wq->offset == wq->alloc) + wq->offset = 0; +} + +/* Notifies all threads from a wait queue and dequeues them all. */ +static void +gl_waitqueue_notify_all (gl_waitqueue_t *wq) +{ + unsigned int i; + + for (i = 0; i < wq->count; i++) + { + unsigned int index = wq->offset + i; + if (index >= wq->alloc) + index -= wq->alloc; + SetEvent (wq->array[index]); + } + wq->count = 0; + wq->offset = 0; +} + +void +glthread_rwlock_init_func (gl_rwlock_t *lock) +{ + InitializeCriticalSection (&lock->lock); + gl_waitqueue_init (&lock->waiting_readers); + gl_waitqueue_init (&lock->waiting_writers); + lock->runcount = 0; + lock->guard.done = 1; +} + +int +glthread_rwlock_rdlock_func (gl_rwlock_t *lock) +{ + if (!lock->guard.done) + { + if (InterlockedIncrement (&lock->guard.started) == 0) + /* This thread is the first one to need this lock. Initialize it. */ + glthread_rwlock_init (lock); + else + /* Yield the CPU while waiting for another thread to finish + initializing this lock. */ + while (!lock->guard.done) + Sleep (0); + } + EnterCriticalSection (&lock->lock); + /* Test whether only readers are currently running, and whether the runcount + field will not overflow. */ + if (!(lock->runcount + 1 > 0)) + { + /* This thread has to wait for a while. Enqueue it among the + waiting_readers. */ + HANDLE event = gl_waitqueue_add (&lock->waiting_readers); + if (event != INVALID_HANDLE_VALUE) + { + DWORD result; + LeaveCriticalSection (&lock->lock); + /* Wait until another thread signals this event. */ + result = WaitForSingleObject (event, INFINITE); + if (result == WAIT_FAILED || result == WAIT_TIMEOUT) + abort (); + CloseHandle (event); + /* The thread which signalled the event already did the bookkeeping: + removed us from the waiting_readers, incremented lock->runcount. */ + if (!(lock->runcount > 0)) + abort (); + return 0; + } + else + { + /* Allocation failure. Weird. */ + do + { + LeaveCriticalSection (&lock->lock); + Sleep (1); + EnterCriticalSection (&lock->lock); + } + while (!(lock->runcount + 1 > 0)); + } + } + lock->runcount++; + LeaveCriticalSection (&lock->lock); + return 0; +} + +int +glthread_rwlock_wrlock_func (gl_rwlock_t *lock) +{ + if (!lock->guard.done) + { + if (InterlockedIncrement (&lock->guard.started) == 0) + /* This thread is the first one to need this lock. Initialize it. */ + glthread_rwlock_init (lock); + else + /* Yield the CPU while waiting for another thread to finish + initializing this lock. */ + while (!lock->guard.done) + Sleep (0); + } + EnterCriticalSection (&lock->lock); + /* Test whether no readers or writers are currently running. */ + if (!(lock->runcount == 0)) + { + /* This thread has to wait for a while. Enqueue it among the + waiting_writers. */ + HANDLE event = gl_waitqueue_add (&lock->waiting_writers); + if (event != INVALID_HANDLE_VALUE) + { + DWORD result; + LeaveCriticalSection (&lock->lock); + /* Wait until another thread signals this event. */ + result = WaitForSingleObject (event, INFINITE); + if (result == WAIT_FAILED || result == WAIT_TIMEOUT) + abort (); + CloseHandle (event); + /* The thread which signalled the event already did the bookkeeping: + removed us from the waiting_writers, set lock->runcount = -1. */ + if (!(lock->runcount == -1)) + abort (); + return 0; + } + else + { + /* Allocation failure. Weird. */ + do + { + LeaveCriticalSection (&lock->lock); + Sleep (1); + EnterCriticalSection (&lock->lock); + } + while (!(lock->runcount == 0)); + } + } + lock->runcount--; /* runcount becomes -1 */ + LeaveCriticalSection (&lock->lock); + return 0; +} + +int +glthread_rwlock_unlock_func (gl_rwlock_t *lock) +{ + if (!lock->guard.done) + return EINVAL; + EnterCriticalSection (&lock->lock); + if (lock->runcount < 0) + { + /* Drop a writer lock. */ + if (!(lock->runcount == -1)) + abort (); + lock->runcount = 0; + } + else + { + /* Drop a reader lock. */ + if (!(lock->runcount > 0)) + { + LeaveCriticalSection (&lock->lock); + return EPERM; + } + lock->runcount--; + } + if (lock->runcount == 0) + { + /* POSIX recommends that "write locks shall take precedence over read + locks", to avoid "writer starvation". */ + if (lock->waiting_writers.count > 0) + { + /* Wake up one of the waiting writers. */ + lock->runcount--; + gl_waitqueue_notify_first (&lock->waiting_writers); + } + else + { + /* Wake up all waiting readers. */ + lock->runcount += lock->waiting_readers.count; + gl_waitqueue_notify_all (&lock->waiting_readers); + } + } + LeaveCriticalSection (&lock->lock); + return 0; +} + +int +glthread_rwlock_destroy_func (gl_rwlock_t *lock) +{ + if (!lock->guard.done) + return EINVAL; + if (lock->runcount != 0) + return EBUSY; + DeleteCriticalSection (&lock->lock); + if (lock->waiting_readers.array != NULL) + free (lock->waiting_readers.array); + if (lock->waiting_writers.array != NULL) + free (lock->waiting_writers.array); + lock->guard.done = 0; + return 0; +} + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +void +glthread_recursive_lock_init_func (gl_recursive_lock_t *lock) +{ + lock->owner = 0; + lock->depth = 0; + InitializeCriticalSection (&lock->lock); + lock->guard.done = 1; +} + +int +glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock) +{ + if (!lock->guard.done) + { + if (InterlockedIncrement (&lock->guard.started) == 0) + /* This thread is the first one to need this lock. Initialize it. */ + glthread_recursive_lock_init (lock); + else + /* Yield the CPU while waiting for another thread to finish + initializing this lock. */ + while (!lock->guard.done) + Sleep (0); + } + { + DWORD self = GetCurrentThreadId (); + if (lock->owner != self) + { + EnterCriticalSection (&lock->lock); + lock->owner = self; + } + if (++(lock->depth) == 0) /* wraparound? */ + { + lock->depth--; + return EAGAIN; + } + } + return 0; +} + +int +glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock) +{ + if (lock->owner != GetCurrentThreadId ()) + return EPERM; + if (lock->depth == 0) + return EINVAL; + if (--(lock->depth) == 0) + { + lock->owner = 0; + LeaveCriticalSection (&lock->lock); + } + return 0; +} + +int +glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock) +{ + if (lock->owner != 0) + return EBUSY; + DeleteCriticalSection (&lock->lock); + lock->guard.done = 0; + return 0; +} + +/* -------------------------- gl_once_t datatype -------------------------- */ + +void +glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)) +{ + if (once_control->inited <= 0) + { + if (InterlockedIncrement (&once_control->started) == 0) + { + /* This thread is the first one to come to this once_control. */ + InitializeCriticalSection (&once_control->lock); + EnterCriticalSection (&once_control->lock); + once_control->inited = 0; + initfunction (); + once_control->inited = 1; + LeaveCriticalSection (&once_control->lock); + } + else + { + /* Undo last operation. */ + InterlockedDecrement (&once_control->started); + /* Some other thread has already started the initialization. + Yield the CPU while waiting for the other thread to finish + initializing and taking the lock. */ + while (once_control->inited < 0) + Sleep (0); + if (once_control->inited <= 0) + { + /* Take the lock. This blocks until the other thread has + finished calling the initfunction. */ + EnterCriticalSection (&once_control->lock); + LeaveCriticalSection (&once_control->lock); + if (!(once_control->inited > 0)) + abort (); + } + } + } +} + +#endif + +/* ========================================================================= */ diff --git a/gl/lib/glthread/lock.h b/gl/lib/glthread/lock.h new file mode 100644 index 0000000..36096c4 --- /dev/null +++ b/gl/lib/glthread/lock.h @@ -0,0 +1,927 @@ +/* Locking in multithreaded situations. + Copyright (C) 2005-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Bruno Haible , 2005. + Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, + gthr-win32.h. */ + +/* This file contains locking primitives for use with a given thread library. + It does not contain primitives for creating threads or for other + synchronization primitives. + + Normal (non-recursive) locks: + Type: gl_lock_t + Declaration: gl_lock_define(extern, name) + Initializer: gl_lock_define_initialized(, name) + Initialization: gl_lock_init (name); + Taking the lock: gl_lock_lock (name); + Releasing the lock: gl_lock_unlock (name); + De-initialization: gl_lock_destroy (name); + Equivalent functions with control of error handling: + Initialization: err = glthread_lock_init (&name); + Taking the lock: err = glthread_lock_lock (&name); + Releasing the lock: err = glthread_lock_unlock (&name); + De-initialization: err = glthread_lock_destroy (&name); + + Read-Write (non-recursive) locks: + Type: gl_rwlock_t + Declaration: gl_rwlock_define(extern, name) + Initializer: gl_rwlock_define_initialized(, name) + Initialization: gl_rwlock_init (name); + Taking the lock: gl_rwlock_rdlock (name); + gl_rwlock_wrlock (name); + Releasing the lock: gl_rwlock_unlock (name); + De-initialization: gl_rwlock_destroy (name); + Equivalent functions with control of error handling: + Initialization: err = glthread_rwlock_init (&name); + Taking the lock: err = glthread_rwlock_rdlock (&name); + err = glthread_rwlock_wrlock (&name); + Releasing the lock: err = glthread_rwlock_unlock (&name); + De-initialization: err = glthread_rwlock_destroy (&name); + + Recursive locks: + Type: gl_recursive_lock_t + Declaration: gl_recursive_lock_define(extern, name) + Initializer: gl_recursive_lock_define_initialized(, name) + Initialization: gl_recursive_lock_init (name); + Taking the lock: gl_recursive_lock_lock (name); + Releasing the lock: gl_recursive_lock_unlock (name); + De-initialization: gl_recursive_lock_destroy (name); + Equivalent functions with control of error handling: + Initialization: err = glthread_recursive_lock_init (&name); + Taking the lock: err = glthread_recursive_lock_lock (&name); + Releasing the lock: err = glthread_recursive_lock_unlock (&name); + De-initialization: err = glthread_recursive_lock_destroy (&name); + + Once-only execution: + Type: gl_once_t + Initializer: gl_once_define(extern, name) + Execution: gl_once (name, initfunction); + Equivalent functions with control of error handling: + Execution: err = glthread_once (&name, initfunction); +*/ + + +#ifndef _LOCK_H +#define _LOCK_H + +#include +#include + +/* ========================================================================= */ + +#if USE_POSIX_THREADS + +/* Use the POSIX threads library. */ + +# include + +# ifdef __cplusplus +extern "C" { +# endif + +# if PTHREAD_IN_USE_DETECTION_HARD + +/* The pthread_in_use() detection needs to be done at runtime. */ +# define pthread_in_use() \ + glthread_in_use () +extern int glthread_in_use (void); + +# endif + +# if USE_POSIX_THREADS_WEAK + +/* Use weak references to the POSIX threads library. */ + +/* Weak references avoid dragging in external libraries if the other parts + of the program don't use them. Here we use them, because we don't want + every program that uses libintl to depend on libpthread. This assumes + that libpthread would not be loaded after libintl; i.e. if libintl is + loaded first, by an executable that does not depend on libpthread, and + then a module is dynamically loaded that depends on libpthread, libintl + will not be multithread-safe. */ + +/* The way to test at runtime whether libpthread is present is to test + whether a function pointer's value, such as &pthread_mutex_init, is + non-NULL. However, some versions of GCC have a bug through which, in + PIC mode, &foo != NULL always evaluates to true if there is a direct + call to foo(...) in the same function. To avoid this, we test the + address of a function in libpthread that we don't use. */ + +# pragma weak pthread_mutex_init +# pragma weak pthread_mutex_lock +# pragma weak pthread_mutex_unlock +# pragma weak pthread_mutex_destroy +# pragma weak pthread_rwlock_init +# pragma weak pthread_rwlock_rdlock +# pragma weak pthread_rwlock_wrlock +# pragma weak pthread_rwlock_unlock +# pragma weak pthread_rwlock_destroy +# pragma weak pthread_once +# pragma weak pthread_cond_init +# pragma weak pthread_cond_wait +# pragma weak pthread_cond_signal +# pragma weak pthread_cond_broadcast +# pragma weak pthread_cond_destroy +# pragma weak pthread_mutexattr_init +# pragma weak pthread_mutexattr_settype +# pragma weak pthread_mutexattr_destroy +# ifndef pthread_self +# pragma weak pthread_self +# endif + +# if !PTHREAD_IN_USE_DETECTION_HARD +# pragma weak pthread_cancel +# define pthread_in_use() (pthread_cancel != NULL) +# endif + +# else + +# if !PTHREAD_IN_USE_DETECTION_HARD +# define pthread_in_use() 1 +# endif + +# endif + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +typedef pthread_mutex_t gl_lock_t; +# define gl_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS pthread_mutex_t NAME; +# define gl_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer; +# define gl_lock_initializer \ + PTHREAD_MUTEX_INITIALIZER +# define glthread_lock_init(LOCK) \ + (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0) +# define glthread_lock_lock(LOCK) \ + (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) +# define glthread_lock_unlock(LOCK) \ + (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) +# define glthread_lock_destroy(LOCK) \ + (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +# if HAVE_PTHREAD_RWLOCK + +# ifdef PTHREAD_RWLOCK_INITIALIZER + +typedef pthread_rwlock_t gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS pthread_rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + PTHREAD_RWLOCK_INITIALIZER +# define glthread_rwlock_init(LOCK) \ + (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) +# define glthread_rwlock_rdlock(LOCK) \ + (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0) +# define glthread_rwlock_wrlock(LOCK) \ + (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0) +# define glthread_rwlock_unlock(LOCK) \ + (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0) +# define glthread_rwlock_destroy(LOCK) \ + (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0) + +# else + +typedef struct + { + int initialized; + pthread_mutex_t guard; /* protects the initialization */ + pthread_rwlock_t rwlock; /* read-write lock */ + } + gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + { 0, PTHREAD_MUTEX_INITIALIZER } +# define glthread_rwlock_init(LOCK) \ + (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) +# define glthread_rwlock_rdlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_wrlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_unlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_destroy(LOCK) \ + (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) +extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); + +# endif + +# else + +typedef struct + { + pthread_mutex_t lock; /* protects the remaining fields */ + pthread_cond_t waiting_readers; /* waiting readers */ + pthread_cond_t waiting_writers; /* waiting writers */ + unsigned int waiting_writers_count; /* number of waiting writers */ + int runcount; /* number of readers running, or -1 when a writer runs */ + } + gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } +# define glthread_rwlock_init(LOCK) \ + (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) +# define glthread_rwlock_rdlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_wrlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_unlock(LOCK) \ + (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) +# define glthread_rwlock_destroy(LOCK) \ + (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) +extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); +extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); + +# endif + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +# if HAVE_PTHREAD_MUTEX_RECURSIVE + +# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP + +typedef pthread_mutex_t gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS pthread_mutex_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer; +# ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER +# define gl_recursive_lock_initializer \ + PTHREAD_RECURSIVE_MUTEX_INITIALIZER +# else +# define gl_recursive_lock_initializer \ + PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP +# endif +# define glthread_recursive_lock_init(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_lock(LOCK) \ + (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) +# define glthread_recursive_lock_unlock(LOCK) \ + (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) +# define glthread_recursive_lock_destroy(LOCK) \ + (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) +extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); + +# else + +typedef struct + { + pthread_mutex_t recmutex; /* recursive mutex */ + pthread_mutex_t guard; /* protects the initialization */ + int initialized; + } + gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; +# define gl_recursive_lock_initializer \ + { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 } +# define glthread_recursive_lock_init(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_lock(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_unlock(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_destroy(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) +extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); + +# endif + +# else + +/* Old versions of POSIX threads on Solaris did not have recursive locks. + We have to implement them ourselves. */ + +typedef struct + { + pthread_mutex_t mutex; + pthread_t owner; + unsigned long depth; + } + gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; +# define gl_recursive_lock_initializer \ + { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 } +# define glthread_recursive_lock_init(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_lock(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_unlock(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_destroy(LOCK) \ + (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) +extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); + +# endif + +/* -------------------------- gl_once_t datatype -------------------------- */ + +typedef pthread_once_t gl_once_t; +# define gl_once_define(STORAGECLASS, NAME) \ + STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT; +# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ + (pthread_in_use () \ + ? pthread_once (ONCE_CONTROL, INITFUNCTION) \ + : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) +extern int glthread_once_singlethreaded (pthread_once_t *once_control); + +# ifdef __cplusplus +} +# endif + +#endif + +/* ========================================================================= */ + +#if USE_PTH_THREADS + +/* Use the GNU Pth threads library. */ + +# include + +# ifdef __cplusplus +extern "C" { +# endif + +# if USE_PTH_THREADS_WEAK + +/* Use weak references to the GNU Pth threads library. */ + +# pragma weak pth_mutex_init +# pragma weak pth_mutex_acquire +# pragma weak pth_mutex_release +# pragma weak pth_rwlock_init +# pragma weak pth_rwlock_acquire +# pragma weak pth_rwlock_release +# pragma weak pth_once + +# pragma weak pth_cancel +# define pth_in_use() (pth_cancel != NULL) + +# else + +# define pth_in_use() 1 + +# endif + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +typedef pth_mutex_t gl_lock_t; +# define gl_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS pth_mutex_t NAME; +# define gl_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pth_mutex_t NAME = gl_lock_initializer; +# define gl_lock_initializer \ + PTH_MUTEX_INIT +# define glthread_lock_init(LOCK) \ + (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) +# define glthread_lock_lock(LOCK) \ + (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) +# define glthread_lock_unlock(LOCK) \ + (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) +# define glthread_lock_destroy(LOCK) \ + ((void)(LOCK), 0) + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +typedef pth_rwlock_t gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS pth_rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + PTH_RWLOCK_INIT +# define glthread_rwlock_init(LOCK) \ + (pth_in_use () && !pth_rwlock_init (LOCK) ? errno : 0) +# define glthread_rwlock_rdlock(LOCK) \ + (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? errno : 0) +# define glthread_rwlock_wrlock(LOCK) \ + (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? errno : 0) +# define glthread_rwlock_unlock(LOCK) \ + (pth_in_use () && !pth_rwlock_release (LOCK) ? errno : 0) +# define glthread_rwlock_destroy(LOCK) \ + ((void)(LOCK), 0) + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +/* In Pth, mutexes are recursive by default. */ +typedef pth_mutex_t gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS pth_mutex_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer; +# define gl_recursive_lock_initializer \ + PTH_MUTEX_INIT +# define glthread_recursive_lock_init(LOCK) \ + (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) +# define glthread_recursive_lock_lock(LOCK) \ + (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) +# define glthread_recursive_lock_unlock(LOCK) \ + (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) +# define glthread_recursive_lock_destroy(LOCK) \ + ((void)(LOCK), 0) + +/* -------------------------- gl_once_t datatype -------------------------- */ + +typedef pth_once_t gl_once_t; +# define gl_once_define(STORAGECLASS, NAME) \ + STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT; +# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ + (pth_in_use () \ + ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ + : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) +extern int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)); +extern int glthread_once_singlethreaded (pth_once_t *once_control); + +# ifdef __cplusplus +} +# endif + +#endif + +/* ========================================================================= */ + +#if USE_SOLARIS_THREADS + +/* Use the old Solaris threads library. */ + +# include +# include + +# ifdef __cplusplus +extern "C" { +# endif + +# if USE_SOLARIS_THREADS_WEAK + +/* Use weak references to the old Solaris threads library. */ + +# pragma weak mutex_init +# pragma weak mutex_lock +# pragma weak mutex_unlock +# pragma weak mutex_destroy +# pragma weak rwlock_init +# pragma weak rw_rdlock +# pragma weak rw_wrlock +# pragma weak rw_unlock +# pragma weak rwlock_destroy +# pragma weak thr_self + +# pragma weak thr_suspend +# define thread_in_use() (thr_suspend != NULL) + +# else + +# define thread_in_use() 1 + +# endif + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +typedef mutex_t gl_lock_t; +# define gl_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS mutex_t NAME; +# define gl_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS mutex_t NAME = gl_lock_initializer; +# define gl_lock_initializer \ + DEFAULTMUTEX +# define glthread_lock_init(LOCK) \ + (thread_in_use () ? mutex_init (LOCK, USYNC_THREAD, NULL) : 0) +# define glthread_lock_lock(LOCK) \ + (thread_in_use () ? mutex_lock (LOCK) : 0) +# define glthread_lock_unlock(LOCK) \ + (thread_in_use () ? mutex_unlock (LOCK) : 0) +# define glthread_lock_destroy(LOCK) \ + (thread_in_use () ? mutex_destroy (LOCK) : 0) + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +typedef rwlock_t gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + DEFAULTRWLOCK +# define glthread_rwlock_init(LOCK) \ + (thread_in_use () ? rwlock_init (LOCK, USYNC_THREAD, NULL) : 0) +# define glthread_rwlock_rdlock(LOCK) \ + (thread_in_use () ? rw_rdlock (LOCK) : 0) +# define glthread_rwlock_wrlock(LOCK) \ + (thread_in_use () ? rw_wrlock (LOCK) : 0) +# define glthread_rwlock_unlock(LOCK) \ + (thread_in_use () ? rw_unlock (LOCK) : 0) +# define glthread_rwlock_destroy(LOCK) \ + (thread_in_use () ? rwlock_destroy (LOCK) : 0) + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +/* Old Solaris threads did not have recursive locks. + We have to implement them ourselves. */ + +typedef struct + { + mutex_t mutex; + thread_t owner; + unsigned long depth; + } + gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; +# define gl_recursive_lock_initializer \ + { DEFAULTMUTEX, (thread_t) 0, 0 } +# define glthread_recursive_lock_init(LOCK) \ + (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_lock(LOCK) \ + (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_unlock(LOCK) \ + (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) +# define glthread_recursive_lock_destroy(LOCK) \ + (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) +extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); + +/* -------------------------- gl_once_t datatype -------------------------- */ + +typedef struct + { + volatile int inited; + mutex_t mutex; + } + gl_once_t; +# define gl_once_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX }; +# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ + (thread_in_use () \ + ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ + : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) +extern int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)); +extern int glthread_once_singlethreaded (gl_once_t *once_control); + +# ifdef __cplusplus +} +# endif + +#endif + +/* ========================================================================= */ + +#if USE_WINDOWS_THREADS + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include + +# ifdef __cplusplus +extern "C" { +# endif + +/* We can use CRITICAL_SECTION directly, rather than the native Windows Event, + Mutex, Semaphore types, because + - we need only to synchronize inside a single process (address space), + not inter-process locking, + - we don't need to support trylock operations. (TryEnterCriticalSection + does not work on Windows 95/98/ME. Packages that need trylock usually + define their own mutex type.) */ + +/* There is no way to statically initialize a CRITICAL_SECTION. It needs + to be done lazily, once only. For this we need spinlocks. */ + +typedef struct { volatile int done; volatile long started; } gl_spinlock_t; + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +typedef struct + { + gl_spinlock_t guard; /* protects the initialization */ + CRITICAL_SECTION lock; + } + gl_lock_t; +# define gl_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_lock_t NAME; +# define gl_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_lock_t NAME = gl_lock_initializer; +# define gl_lock_initializer \ + { { 0, -1 } } +# define glthread_lock_init(LOCK) \ + (glthread_lock_init_func (LOCK), 0) +# define glthread_lock_lock(LOCK) \ + glthread_lock_lock_func (LOCK) +# define glthread_lock_unlock(LOCK) \ + glthread_lock_unlock_func (LOCK) +# define glthread_lock_destroy(LOCK) \ + glthread_lock_destroy_func (LOCK) +extern void glthread_lock_init_func (gl_lock_t *lock); +extern int glthread_lock_lock_func (gl_lock_t *lock); +extern int glthread_lock_unlock_func (gl_lock_t *lock); +extern int glthread_lock_destroy_func (gl_lock_t *lock); + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +/* It is impossible to implement read-write locks using plain locks, without + introducing an extra thread dedicated to managing read-write locks. + Therefore here we need to use the low-level Event type. */ + +typedef struct + { + HANDLE *array; /* array of waiting threads, each represented by an event */ + unsigned int count; /* number of waiting threads */ + unsigned int alloc; /* length of allocated array */ + unsigned int offset; /* index of first waiting thread in array */ + } + gl_carray_waitqueue_t; +typedef struct + { + gl_spinlock_t guard; /* protects the initialization */ + CRITICAL_SECTION lock; /* protects the remaining fields */ + gl_carray_waitqueue_t waiting_readers; /* waiting readers */ + gl_carray_waitqueue_t waiting_writers; /* waiting writers */ + int runcount; /* number of readers running, or -1 when a writer runs */ + } + gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME; +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; +# define gl_rwlock_initializer \ + { { 0, -1 } } +# define glthread_rwlock_init(LOCK) \ + (glthread_rwlock_init_func (LOCK), 0) +# define glthread_rwlock_rdlock(LOCK) \ + glthread_rwlock_rdlock_func (LOCK) +# define glthread_rwlock_wrlock(LOCK) \ + glthread_rwlock_wrlock_func (LOCK) +# define glthread_rwlock_unlock(LOCK) \ + glthread_rwlock_unlock_func (LOCK) +# define glthread_rwlock_destroy(LOCK) \ + glthread_rwlock_destroy_func (LOCK) +extern void glthread_rwlock_init_func (gl_rwlock_t *lock); +extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock); +extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock); +extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock); +extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock); + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +/* The native Windows documentation says that CRITICAL_SECTION already + implements a recursive lock. But we need not rely on it: It's easy to + implement a recursive lock without this assumption. */ + +typedef struct + { + gl_spinlock_t guard; /* protects the initialization */ + DWORD owner; + unsigned long depth; + CRITICAL_SECTION lock; + } + gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME; +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ + STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; +# define gl_recursive_lock_initializer \ + { { 0, -1 }, 0, 0 } +# define glthread_recursive_lock_init(LOCK) \ + (glthread_recursive_lock_init_func (LOCK), 0) +# define glthread_recursive_lock_lock(LOCK) \ + glthread_recursive_lock_lock_func (LOCK) +# define glthread_recursive_lock_unlock(LOCK) \ + glthread_recursive_lock_unlock_func (LOCK) +# define glthread_recursive_lock_destroy(LOCK) \ + glthread_recursive_lock_destroy_func (LOCK) +extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock); +extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock); + +/* -------------------------- gl_once_t datatype -------------------------- */ + +typedef struct + { + volatile int inited; + volatile long started; + CRITICAL_SECTION lock; + } + gl_once_t; +# define gl_once_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_once_t NAME = { -1, -1 }; +# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ + (glthread_once_func (ONCE_CONTROL, INITFUNCTION), 0) +extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)); + +# ifdef __cplusplus +} +# endif + +#endif + +/* ========================================================================= */ + +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) + +/* Provide dummy implementation if threads are not supported. */ + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +typedef int gl_lock_t; +# define gl_lock_define(STORAGECLASS, NAME) +# define gl_lock_define_initialized(STORAGECLASS, NAME) +# define glthread_lock_init(NAME) 0 +# define glthread_lock_lock(NAME) 0 +# define glthread_lock_unlock(NAME) 0 +# define glthread_lock_destroy(NAME) 0 + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +typedef int gl_rwlock_t; +# define gl_rwlock_define(STORAGECLASS, NAME) +# define gl_rwlock_define_initialized(STORAGECLASS, NAME) +# define glthread_rwlock_init(NAME) 0 +# define glthread_rwlock_rdlock(NAME) 0 +# define glthread_rwlock_wrlock(NAME) 0 +# define glthread_rwlock_unlock(NAME) 0 +# define glthread_rwlock_destroy(NAME) 0 + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +typedef int gl_recursive_lock_t; +# define gl_recursive_lock_define(STORAGECLASS, NAME) +# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) +# define glthread_recursive_lock_init(NAME) 0 +# define glthread_recursive_lock_lock(NAME) 0 +# define glthread_recursive_lock_unlock(NAME) 0 +# define glthread_recursive_lock_destroy(NAME) 0 + +/* -------------------------- gl_once_t datatype -------------------------- */ + +typedef int gl_once_t; +# define gl_once_define(STORAGECLASS, NAME) \ + STORAGECLASS gl_once_t NAME = 0; +# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ + (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0) + +#endif + +/* ========================================================================= */ + +/* Macros with built-in error handling. */ + +/* -------------------------- gl_lock_t datatype -------------------------- */ + +#define gl_lock_init(NAME) \ + do \ + { \ + if (glthread_lock_init (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_lock_lock(NAME) \ + do \ + { \ + if (glthread_lock_lock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_lock_unlock(NAME) \ + do \ + { \ + if (glthread_lock_unlock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_lock_destroy(NAME) \ + do \ + { \ + if (glthread_lock_destroy (&NAME)) \ + abort (); \ + } \ + while (0) + +/* ------------------------- gl_rwlock_t datatype ------------------------- */ + +#define gl_rwlock_init(NAME) \ + do \ + { \ + if (glthread_rwlock_init (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_rwlock_rdlock(NAME) \ + do \ + { \ + if (glthread_rwlock_rdlock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_rwlock_wrlock(NAME) \ + do \ + { \ + if (glthread_rwlock_wrlock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_rwlock_unlock(NAME) \ + do \ + { \ + if (glthread_rwlock_unlock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_rwlock_destroy(NAME) \ + do \ + { \ + if (glthread_rwlock_destroy (&NAME)) \ + abort (); \ + } \ + while (0) + +/* --------------------- gl_recursive_lock_t datatype --------------------- */ + +#define gl_recursive_lock_init(NAME) \ + do \ + { \ + if (glthread_recursive_lock_init (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_recursive_lock_lock(NAME) \ + do \ + { \ + if (glthread_recursive_lock_lock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_recursive_lock_unlock(NAME) \ + do \ + { \ + if (glthread_recursive_lock_unlock (&NAME)) \ + abort (); \ + } \ + while (0) +#define gl_recursive_lock_destroy(NAME) \ + do \ + { \ + if (glthread_recursive_lock_destroy (&NAME)) \ + abort (); \ + } \ + while (0) + +/* -------------------------- gl_once_t datatype -------------------------- */ + +#define gl_once(NAME, INITFUNCTION) \ + do \ + { \ + if (glthread_once (&NAME, INITFUNCTION)) \ + abort (); \ + } \ + while (0) + +/* ========================================================================= */ + +#endif /* _LOCK_H */ diff --git a/gl/lib/glthread/threadlib.c b/gl/lib/glthread/threadlib.c new file mode 100644 index 0000000..26870de --- /dev/null +++ b/gl/lib/glthread/threadlib.c @@ -0,0 +1,73 @@ +/* Multithreading primitives. + Copyright (C) 2005-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Bruno Haible , 2005. */ + +#include + +/* ========================================================================= */ + +#if USE_POSIX_THREADS + +/* Use the POSIX threads library. */ + +# include +# include + +# if PTHREAD_IN_USE_DETECTION_HARD + +/* The function to be executed by a dummy thread. */ +static void * +dummy_thread_func (void *arg) +{ + return arg; +} + +int +glthread_in_use (void) +{ + static int tested; + static int result; /* 1: linked with -lpthread, 0: only with libc */ + + if (!tested) + { + pthread_t thread; + + if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0) + /* Thread creation failed. */ + result = 0; + else + { + /* Thread creation works. */ + void *retval; + if (pthread_join (thread, &retval) != 0) + abort (); + result = 1; + } + tested = 1; + } + return result; +} + +# endif + +#endif + +/* ========================================================================= */ + +/* This declaration is solely to ensure that after preprocessing + this file is never empty. */ +typedef int dummy; diff --git a/gl/lib/group-member.c b/gl/lib/group-member.c new file mode 100644 index 0000000..e869dca --- /dev/null +++ b/gl/lib/group-member.c @@ -0,0 +1,119 @@ +/* group-member.c -- determine whether group id is in calling user's group list + + Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include + +#include "xalloc-oversized.h" + +/* Most processes have no more than this many groups, and for these + processes we can avoid using malloc. */ +enum { GROUPBUF_SIZE = 100 }; + +struct group_info + { + gid_t *group; + gid_t groupbuf[GROUPBUF_SIZE]; + }; + +static void +free_group_info (struct group_info const *g) +{ + if (g->group != g->groupbuf) + free (g->group); +} + +static int +get_group_info (struct group_info *gi) +{ + int n_groups = getgroups (GROUPBUF_SIZE, gi->groupbuf); + gi->group = gi->groupbuf; + + if (n_groups < 0) + { + int n_group_slots = getgroups (0, NULL); + if (0 <= n_group_slots + && ! xalloc_oversized (n_group_slots, sizeof *gi->group)) + { + gi->group = malloc (n_group_slots * sizeof *gi->group); + if (gi->group) + n_groups = getgroups (n_group_slots, gi->group); + } + } + + /* In case of error, the user loses. */ + return n_groups; +} + +/* Return non-zero if GID is one that we have in our groups list. + Note that the groups list is not guaranteed to contain the current + or effective group ID, so they should generally be checked + separately. */ + +int +group_member (gid_t gid) +{ + int i; + int found; + struct group_info gi; + int n_groups = get_group_info (&gi); + + /* Search through the list looking for GID. */ + found = 0; + for (i = 0; i < n_groups; i++) + { + if (gid == gi.group[i]) + { + found = 1; + break; + } + } + + free_group_info (&gi); + + return found; +} + +#ifdef TEST + +char *program_name; + +int +main (int argc, char **argv) +{ + int i; + + program_name = argv[0]; + + for (i = 1; i < argc; i++) + { + gid_t gid; + + gid = atoi (argv[i]); + printf ("%d: %s\n", gid, group_member (gid) ? "yes" : "no"); + } + exit (0); +} + +#endif /* TEST */ diff --git a/gl/lib/hash-pjw.c b/gl/lib/hash-pjw.c new file mode 100644 index 0000000..18f9f01 --- /dev/null +++ b/gl/lib/hash-pjw.c @@ -0,0 +1,40 @@ +/* hash-pjw.c -- compute a hash value from a NUL-terminated string. + + Copyright (C) 2001, 2003, 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "hash-pjw.h" + +#include + +#define SIZE_BITS (sizeof (size_t) * CHAR_BIT) + +/* A hash function for NUL-terminated char* strings using + the method described by Bruno Haible. + See http://www.haible.de/bruno/hashfunc.html. */ + +size_t +hash_pjw (const void *x, size_t tablesize) +{ + const char *s; + size_t h = 0; + + for (s = x; *s; s++) + h = *s + ((h << 9) | (h >> (SIZE_BITS - 9))); + + return h % tablesize; +} diff --git a/gl/lib/hash-pjw.h b/gl/lib/hash-pjw.h new file mode 100644 index 0000000..e645613 --- /dev/null +++ b/gl/lib/hash-pjw.h @@ -0,0 +1,23 @@ +/* hash-pjw.h -- declaration for a simple hash function + Copyright (C) 2001, 2003, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Compute a hash code for a NUL-terminated string starting at X, + and return the hash code modulo TABLESIZE. + The result is platform dependent: it depends on the size of the 'size_t' + type and on the signedness of the 'char' type. */ +extern size_t hash_pjw (void const *x, size_t tablesize) _GL_ATTRIBUTE_PURE; diff --git a/gl/lib/hash-triple.c b/gl/lib/hash-triple.c new file mode 100644 index 0000000..d305fbf --- /dev/null +++ b/gl/lib/hash-triple.c @@ -0,0 +1,77 @@ +/* Hash functions for file-related triples: name, device, inode. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#include + +#include "hash-triple.h" + +#include +#include + +#include "hash-pjw.h" +#include "same.h" +#include "same-inode.h" + +#define STREQ(a, b) (strcmp (a, b) == 0) + +/* Hash an F_triple, and *do* consider the file name. */ +size_t +triple_hash (void const *x, size_t table_size) +{ + struct F_triple const *p = x; + size_t tmp = hash_pjw (p->name, table_size); + + /* Ignoring the device number here should be fine. */ + return (tmp ^ p->st_ino) % table_size; +} + +/* Hash an F_triple, without considering the file name. */ +size_t +triple_hash_no_name (void const *x, size_t table_size) +{ + struct F_triple const *p = x; + + /* Ignoring the device number here should be fine. */ + return p->st_ino % table_size; +} + +/* Compare two F_triple structs. */ +bool +triple_compare (void const *x, void const *y) +{ + struct F_triple const *a = x; + struct F_triple const *b = y; + return (SAME_INODE (*a, *b) && same_name (a->name, b->name)) ? true : false; +} + +bool +triple_compare_ino_str (void const *x, void const *y) +{ + struct F_triple const *a = x; + struct F_triple const *b = y; + return (SAME_INODE (*a, *b) && STREQ (a->name, b->name)) ? true : false; +} + +/* Free an F_triple. */ +void +triple_free (void *x) +{ + struct F_triple *a = x; + free (a->name); + free (a); +} diff --git a/gl/lib/hash-triple.h b/gl/lib/hash-triple.h new file mode 100644 index 0000000..0658d81 --- /dev/null +++ b/gl/lib/hash-triple.h @@ -0,0 +1,24 @@ +#ifndef HASH_TRIPLE_H +#define HASH_TRIPLE_H + +#include +#include +#include + +/* Describe a just-created or just-renamed destination file. */ +struct F_triple +{ + char *name; + ino_t st_ino; + dev_t st_dev; +}; + +extern size_t triple_hash (void const *x, size_t table_size) _GL_ATTRIBUTE_PURE; +extern size_t triple_hash_no_name (void const *x, size_t table_size) + _GL_ATTRIBUTE_PURE; +extern bool triple_compare (void const *x, void const *y); +extern bool triple_compare_ino_str (void const *x, void const *y) + _GL_ATTRIBUTE_PURE; +extern void triple_free (void *x); + +#endif diff --git a/gl/lib/hash.c b/gl/lib/hash.c new file mode 100644 index 0000000..d312a26 --- /dev/null +++ b/gl/lib/hash.c @@ -0,0 +1,1233 @@ +/* hash - hashing table processing. + + Copyright (C) 1998-2004, 2006-2007, 2009-2014 Free Software Foundation, Inc. + + Written by Jim Meyering, 1992. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* A generic hash table package. */ + +/* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead + of malloc. If you change USE_OBSTACK, you have to recompile! */ + +#include + +#include "hash.h" + +#include "bitrotate.h" +#include "xalloc-oversized.h" + +#include +#include +#include + +#if USE_OBSTACK +# include "obstack.h" +# ifndef obstack_chunk_alloc +# define obstack_chunk_alloc malloc +# endif +# ifndef obstack_chunk_free +# define obstack_chunk_free free +# endif +#endif + +struct hash_entry + { + void *data; + struct hash_entry *next; + }; + +struct hash_table + { + /* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1, + for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets + are not empty, there are N_ENTRIES active entries in the table. */ + struct hash_entry *bucket; + struct hash_entry const *bucket_limit; + size_t n_buckets; + size_t n_buckets_used; + size_t n_entries; + + /* Tuning arguments, kept in a physically separate structure. */ + const Hash_tuning *tuning; + + /* Three functions are given to 'hash_initialize', see the documentation + block for this function. In a word, HASHER randomizes a user entry + into a number up from 0 up to some maximum minus 1; COMPARATOR returns + true if two user entries compare equally; and DATA_FREER is the cleanup + function for a user entry. */ + Hash_hasher hasher; + Hash_comparator comparator; + Hash_data_freer data_freer; + + /* A linked list of freed struct hash_entry structs. */ + struct hash_entry *free_entry_list; + +#if USE_OBSTACK + /* Whenever obstacks are used, it is possible to allocate all overflowed + entries into a single stack, so they all can be freed in a single + operation. It is not clear if the speedup is worth the trouble. */ + struct obstack entry_stack; +#endif + }; + +/* A hash table contains many internal entries, each holding a pointer to + some user-provided data (also called a user entry). An entry indistinctly + refers to both the internal entry and its associated user entry. A user + entry contents may be hashed by a randomization function (the hashing + function, or just "hasher" for short) into a number (or "slot") between 0 + and the current table size. At each slot position in the hash table, + starts a linked chain of entries for which the user data all hash to this + slot. A bucket is the collection of all entries hashing to the same slot. + + A good "hasher" function will distribute entries rather evenly in buckets. + In the ideal case, the length of each bucket is roughly the number of + entries divided by the table size. Finding the slot for a data is usually + done in constant time by the "hasher", and the later finding of a precise + entry is linear in time with the size of the bucket. Consequently, a + larger hash table size (that is, a larger number of buckets) is prone to + yielding shorter chains, *given* the "hasher" function behaves properly. + + Long buckets slow down the lookup algorithm. One might use big hash table + sizes in hope to reduce the average length of buckets, but this might + become inordinate, as unused slots in the hash table take some space. The + best bet is to make sure you are using a good "hasher" function (beware + that those are not that easy to write! :-), and to use a table size + larger than the actual number of entries. */ + +/* If an insertion makes the ratio of nonempty buckets to table size larger + than the growth threshold (a number between 0.0 and 1.0), then increase + the table size by multiplying by the growth factor (a number greater than + 1.0). The growth threshold defaults to 0.8, and the growth factor + defaults to 1.414, meaning that the table will have doubled its size + every second time 80% of the buckets get used. */ +#define DEFAULT_GROWTH_THRESHOLD 0.8f +#define DEFAULT_GROWTH_FACTOR 1.414f + +/* If a deletion empties a bucket and causes the ratio of used buckets to + table size to become smaller than the shrink threshold (a number between + 0.0 and 1.0), then shrink the table by multiplying by the shrink factor (a + number greater than the shrink threshold but smaller than 1.0). The shrink + threshold and factor default to 0.0 and 1.0, meaning that the table never + shrinks. */ +#define DEFAULT_SHRINK_THRESHOLD 0.0f +#define DEFAULT_SHRINK_FACTOR 1.0f + +/* Use this to initialize or reset a TUNING structure to + some sensible values. */ +static const Hash_tuning default_tuning = + { + DEFAULT_SHRINK_THRESHOLD, + DEFAULT_SHRINK_FACTOR, + DEFAULT_GROWTH_THRESHOLD, + DEFAULT_GROWTH_FACTOR, + false + }; + +/* Information and lookup. */ + +/* The following few functions provide information about the overall hash + table organization: the number of entries, number of buckets and maximum + length of buckets. */ + +/* Return the number of buckets in the hash table. The table size, the total + number of buckets (used plus unused), or the maximum number of slots, are + the same quantity. */ + +size_t +hash_get_n_buckets (const Hash_table *table) +{ + return table->n_buckets; +} + +/* Return the number of slots in use (non-empty buckets). */ + +size_t +hash_get_n_buckets_used (const Hash_table *table) +{ + return table->n_buckets_used; +} + +/* Return the number of active entries. */ + +size_t +hash_get_n_entries (const Hash_table *table) +{ + return table->n_entries; +} + +/* Return the length of the longest chain (bucket). */ + +size_t +hash_get_max_bucket_length (const Hash_table *table) +{ + struct hash_entry const *bucket; + size_t max_bucket_length = 0; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + struct hash_entry const *cursor = bucket; + size_t bucket_length = 1; + + while (cursor = cursor->next, cursor) + bucket_length++; + + if (bucket_length > max_bucket_length) + max_bucket_length = bucket_length; + } + } + + return max_bucket_length; +} + +/* Do a mild validation of a hash table, by traversing it and checking two + statistics. */ + +bool +hash_table_ok (const Hash_table *table) +{ + struct hash_entry const *bucket; + size_t n_buckets_used = 0; + size_t n_entries = 0; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + struct hash_entry const *cursor = bucket; + + /* Count bucket head. */ + n_buckets_used++; + n_entries++; + + /* Count bucket overflow. */ + while (cursor = cursor->next, cursor) + n_entries++; + } + } + + if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries) + return true; + + return false; +} + +void +hash_print_statistics (const Hash_table *table, FILE *stream) +{ + size_t n_entries = hash_get_n_entries (table); + size_t n_buckets = hash_get_n_buckets (table); + size_t n_buckets_used = hash_get_n_buckets_used (table); + size_t max_bucket_length = hash_get_max_bucket_length (table); + + fprintf (stream, "# entries: %lu\n", (unsigned long int) n_entries); + fprintf (stream, "# buckets: %lu\n", (unsigned long int) n_buckets); + fprintf (stream, "# buckets used: %lu (%.2f%%)\n", + (unsigned long int) n_buckets_used, + (100.0 * n_buckets_used) / n_buckets); + fprintf (stream, "max bucket length: %lu\n", + (unsigned long int) max_bucket_length); +} + +/* Hash KEY and return a pointer to the selected bucket. + If TABLE->hasher misbehaves, abort. */ +static struct hash_entry * +safe_hasher (const Hash_table *table, const void *key) +{ + size_t n = table->hasher (key, table->n_buckets); + if (! (n < table->n_buckets)) + abort (); + return table->bucket + n; +} + +/* If ENTRY matches an entry already in the hash table, return the + entry from the table. Otherwise, return NULL. */ + +void * +hash_lookup (const Hash_table *table, const void *entry) +{ + struct hash_entry const *bucket = safe_hasher (table, entry); + struct hash_entry const *cursor; + + if (bucket->data == NULL) + return NULL; + + for (cursor = bucket; cursor; cursor = cursor->next) + if (entry == cursor->data || table->comparator (entry, cursor->data)) + return cursor->data; + + return NULL; +} + +/* Walking. */ + +/* The functions in this page traverse the hash table and process the + contained entries. For the traversal to work properly, the hash table + should not be resized nor modified while any particular entry is being + processed. In particular, entries should not be added, and an entry + may be removed only if there is no shrink threshold and the entry being + removed has already been passed to hash_get_next. */ + +/* Return the first data in the table, or NULL if the table is empty. */ + +void * +hash_get_first (const Hash_table *table) +{ + struct hash_entry const *bucket; + + if (table->n_entries == 0) + return NULL; + + for (bucket = table->bucket; ; bucket++) + if (! (bucket < table->bucket_limit)) + abort (); + else if (bucket->data) + return bucket->data; +} + +/* Return the user data for the entry following ENTRY, where ENTRY has been + returned by a previous call to either 'hash_get_first' or 'hash_get_next'. + Return NULL if there are no more entries. */ + +void * +hash_get_next (const Hash_table *table, const void *entry) +{ + struct hash_entry const *bucket = safe_hasher (table, entry); + struct hash_entry const *cursor; + + /* Find next entry in the same bucket. */ + cursor = bucket; + do + { + if (cursor->data == entry && cursor->next) + return cursor->next->data; + cursor = cursor->next; + } + while (cursor != NULL); + + /* Find first entry in any subsequent bucket. */ + while (++bucket < table->bucket_limit) + if (bucket->data) + return bucket->data; + + /* None found. */ + return NULL; +} + +/* Fill BUFFER with pointers to active user entries in the hash table, then + return the number of pointers copied. Do not copy more than BUFFER_SIZE + pointers. */ + +size_t +hash_get_entries (const Hash_table *table, void **buffer, + size_t buffer_size) +{ + size_t counter = 0; + struct hash_entry const *bucket; + struct hash_entry const *cursor; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + for (cursor = bucket; cursor; cursor = cursor->next) + { + if (counter >= buffer_size) + return counter; + buffer[counter++] = cursor->data; + } + } + } + + return counter; +} + +/* Call a PROCESSOR function for each entry of a hash table, and return the + number of entries for which the processor function returned success. A + pointer to some PROCESSOR_DATA which will be made available to each call to + the processor function. The PROCESSOR accepts two arguments: the first is + the user entry being walked into, the second is the value of PROCESSOR_DATA + as received. The walking continue for as long as the PROCESSOR function + returns nonzero. When it returns zero, the walking is interrupted. */ + +size_t +hash_do_for_each (const Hash_table *table, Hash_processor processor, + void *processor_data) +{ + size_t counter = 0; + struct hash_entry const *bucket; + struct hash_entry const *cursor; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + for (cursor = bucket; cursor; cursor = cursor->next) + { + if (! processor (cursor->data, processor_data)) + return counter; + counter++; + } + } + } + + return counter; +} + +/* Allocation and clean-up. */ + +/* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1. + This is a convenience routine for constructing other hashing functions. */ + +#if USE_DIFF_HASH + +/* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see + B. J. McKenzie, R. Harries & T. Bell, Selecting a hashing algorithm, + Software--practice & experience 20, 2 (Feb 1990), 209-224. Good hash + algorithms tend to be domain-specific, so what's good for [diffutils'] io.c + may not be good for your application." */ + +size_t +hash_string (const char *string, size_t n_buckets) +{ +# define HASH_ONE_CHAR(Value, Byte) \ + ((Byte) + rotl_sz (Value, 7)) + + size_t value = 0; + unsigned char ch; + + for (; (ch = *string); string++) + value = HASH_ONE_CHAR (value, ch); + return value % n_buckets; + +# undef HASH_ONE_CHAR +} + +#else /* not USE_DIFF_HASH */ + +/* This one comes from 'recode', and performs a bit better than the above as + per a few experiments. It is inspired from a hashing routine found in the + very old Cyber 'snoop', itself written in typical Greg Mansfield style. + (By the way, what happened to this excellent man? Is he still alive?) */ + +size_t +hash_string (const char *string, size_t n_buckets) +{ + size_t value = 0; + unsigned char ch; + + for (; (ch = *string); string++) + value = (value * 31 + ch) % n_buckets; + return value; +} + +#endif /* not USE_DIFF_HASH */ + +/* Return true if CANDIDATE is a prime number. CANDIDATE should be an odd + number at least equal to 11. */ + +static bool _GL_ATTRIBUTE_CONST +is_prime (size_t candidate) +{ + size_t divisor = 3; + size_t square = divisor * divisor; + + while (square < candidate && (candidate % divisor)) + { + divisor++; + square += 4 * divisor; + divisor++; + } + + return (candidate % divisor ? true : false); +} + +/* Round a given CANDIDATE number up to the nearest prime, and return that + prime. Primes lower than 10 are merely skipped. */ + +static size_t _GL_ATTRIBUTE_CONST +next_prime (size_t candidate) +{ + /* Skip small primes. */ + if (candidate < 10) + candidate = 10; + + /* Make it definitely odd. */ + candidate |= 1; + + while (SIZE_MAX != candidate && !is_prime (candidate)) + candidate += 2; + + return candidate; +} + +void +hash_reset_tuning (Hash_tuning *tuning) +{ + *tuning = default_tuning; +} + +/* If the user passes a NULL hasher, we hash the raw pointer. */ +static size_t +raw_hasher (const void *data, size_t n) +{ + /* When hashing unique pointers, it is often the case that they were + generated by malloc and thus have the property that the low-order + bits are 0. As this tends to give poorer performance with small + tables, we rotate the pointer value before performing division, + in an attempt to improve hash quality. */ + size_t val = rotr_sz ((size_t) data, 3); + return val % n; +} + +/* If the user passes a NULL comparator, we use pointer comparison. */ +static bool +raw_comparator (const void *a, const void *b) +{ + return a == b; +} + + +/* For the given hash TABLE, check the user supplied tuning structure for + reasonable values, and return true if there is no gross error with it. + Otherwise, definitively reset the TUNING field to some acceptable default + in the hash table (that is, the user loses the right of further modifying + tuning arguments), and return false. */ + +static bool +check_tuning (Hash_table *table) +{ + const Hash_tuning *tuning = table->tuning; + float epsilon; + if (tuning == &default_tuning) + return true; + + /* Be a bit stricter than mathematics would require, so that + rounding errors in size calculations do not cause allocations to + fail to grow or shrink as they should. The smallest allocation + is 11 (due to next_prime's algorithm), so an epsilon of 0.1 + should be good enough. */ + epsilon = 0.1f; + + if (epsilon < tuning->growth_threshold + && tuning->growth_threshold < 1 - epsilon + && 1 + epsilon < tuning->growth_factor + && 0 <= tuning->shrink_threshold + && tuning->shrink_threshold + epsilon < tuning->shrink_factor + && tuning->shrink_factor <= 1 + && tuning->shrink_threshold + epsilon < tuning->growth_threshold) + return true; + + table->tuning = &default_tuning; + return false; +} + +/* Compute the size of the bucket array for the given CANDIDATE and + TUNING, or return 0 if there is no possible way to allocate that + many entries. */ + +static size_t _GL_ATTRIBUTE_PURE +compute_bucket_size (size_t candidate, const Hash_tuning *tuning) +{ + if (!tuning->is_n_buckets) + { + float new_candidate = candidate / tuning->growth_threshold; + if (SIZE_MAX <= new_candidate) + return 0; + candidate = new_candidate; + } + candidate = next_prime (candidate); + if (xalloc_oversized (candidate, sizeof (struct hash_entry *))) + return 0; + return candidate; +} + +/* Allocate and return a new hash table, or NULL upon failure. The initial + number of buckets is automatically selected so as to _guarantee_ that you + may insert at least CANDIDATE different user entries before any growth of + the hash table size occurs. So, if have a reasonably tight a-priori upper + bound on the number of entries you intend to insert in the hash table, you + may save some table memory and insertion time, by specifying it here. If + the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE + argument has its meaning changed to the wanted number of buckets. + + TUNING points to a structure of user-supplied values, in case some fine + tuning is wanted over the default behavior of the hasher. If TUNING is + NULL, the default tuning parameters are used instead. If TUNING is + provided but the values requested are out of bounds or might cause + rounding errors, return NULL. + + The user-supplied HASHER function, when not NULL, accepts two + arguments ENTRY and TABLE_SIZE. It computes, by hashing ENTRY contents, a + slot number for that entry which should be in the range 0..TABLE_SIZE-1. + This slot number is then returned. + + The user-supplied COMPARATOR function, when not NULL, accepts two + arguments pointing to user data, it then returns true for a pair of entries + that compare equal, or false otherwise. This function is internally called + on entries which are already known to hash to the same bucket index, + but which are distinct pointers. + + The user-supplied DATA_FREER function, when not NULL, may be later called + with the user data as an argument, just before the entry containing the + data gets freed. This happens from within 'hash_free' or 'hash_clear'. + You should specify this function only if you want these functions to free + all of your 'data' data. This is typically the case when your data is + simply an auxiliary struct that you have malloc'd to aggregate several + values. */ + +Hash_table * +hash_initialize (size_t candidate, const Hash_tuning *tuning, + Hash_hasher hasher, Hash_comparator comparator, + Hash_data_freer data_freer) +{ + Hash_table *table; + + if (hasher == NULL) + hasher = raw_hasher; + if (comparator == NULL) + comparator = raw_comparator; + + table = malloc (sizeof *table); + if (table == NULL) + return NULL; + + if (!tuning) + tuning = &default_tuning; + table->tuning = tuning; + if (!check_tuning (table)) + { + /* Fail if the tuning options are invalid. This is the only occasion + when the user gets some feedback about it. Once the table is created, + if the user provides invalid tuning options, we silently revert to + using the defaults, and ignore further request to change the tuning + options. */ + goto fail; + } + + table->n_buckets = compute_bucket_size (candidate, tuning); + if (!table->n_buckets) + goto fail; + + table->bucket = calloc (table->n_buckets, sizeof *table->bucket); + if (table->bucket == NULL) + goto fail; + table->bucket_limit = table->bucket + table->n_buckets; + table->n_buckets_used = 0; + table->n_entries = 0; + + table->hasher = hasher; + table->comparator = comparator; + table->data_freer = data_freer; + + table->free_entry_list = NULL; +#if USE_OBSTACK + obstack_init (&table->entry_stack); +#endif + return table; + + fail: + free (table); + return NULL; +} + +/* Make all buckets empty, placing any chained entries on the free list. + Apply the user-specified function data_freer (if any) to the datas of any + affected entries. */ + +void +hash_clear (Hash_table *table) +{ + struct hash_entry *bucket; + + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + struct hash_entry *cursor; + struct hash_entry *next; + + /* Free the bucket overflow. */ + for (cursor = bucket->next; cursor; cursor = next) + { + if (table->data_freer) + table->data_freer (cursor->data); + cursor->data = NULL; + + next = cursor->next; + /* Relinking is done one entry at a time, as it is to be expected + that overflows are either rare or short. */ + cursor->next = table->free_entry_list; + table->free_entry_list = cursor; + } + + /* Free the bucket head. */ + if (table->data_freer) + table->data_freer (bucket->data); + bucket->data = NULL; + bucket->next = NULL; + } + } + + table->n_buckets_used = 0; + table->n_entries = 0; +} + +/* Reclaim all storage associated with a hash table. If a data_freer + function has been supplied by the user when the hash table was created, + this function applies it to the data of each entry before freeing that + entry. */ + +void +hash_free (Hash_table *table) +{ + struct hash_entry *bucket; + struct hash_entry *cursor; + struct hash_entry *next; + + /* Call the user data_freer function. */ + if (table->data_freer && table->n_entries) + { + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + if (bucket->data) + { + for (cursor = bucket; cursor; cursor = cursor->next) + table->data_freer (cursor->data); + } + } + } + +#if USE_OBSTACK + + obstack_free (&table->entry_stack, NULL); + +#else + + /* Free all bucket overflowed entries. */ + for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) + { + for (cursor = bucket->next; cursor; cursor = next) + { + next = cursor->next; + free (cursor); + } + } + + /* Also reclaim the internal list of previously freed entries. */ + for (cursor = table->free_entry_list; cursor; cursor = next) + { + next = cursor->next; + free (cursor); + } + +#endif + + /* Free the remainder of the hash table structure. */ + free (table->bucket); + free (table); +} + +/* Insertion and deletion. */ + +/* Get a new hash entry for a bucket overflow, possibly by recycling a + previously freed one. If this is not possible, allocate a new one. */ + +static struct hash_entry * +allocate_entry (Hash_table *table) +{ + struct hash_entry *new; + + if (table->free_entry_list) + { + new = table->free_entry_list; + table->free_entry_list = new->next; + } + else + { +#if USE_OBSTACK + new = obstack_alloc (&table->entry_stack, sizeof *new); +#else + new = malloc (sizeof *new); +#endif + } + + return new; +} + +/* Free a hash entry which was part of some bucket overflow, + saving it for later recycling. */ + +static void +free_entry (Hash_table *table, struct hash_entry *entry) +{ + entry->data = NULL; + entry->next = table->free_entry_list; + table->free_entry_list = entry; +} + +/* This private function is used to help with insertion and deletion. When + ENTRY matches an entry in the table, return a pointer to the corresponding + user data and set *BUCKET_HEAD to the head of the selected bucket. + Otherwise, return NULL. When DELETE is true and ENTRY matches an entry in + the table, unlink the matching entry. */ + +static void * +hash_find_entry (Hash_table *table, const void *entry, + struct hash_entry **bucket_head, bool delete) +{ + struct hash_entry *bucket = safe_hasher (table, entry); + struct hash_entry *cursor; + + *bucket_head = bucket; + + /* Test for empty bucket. */ + if (bucket->data == NULL) + return NULL; + + /* See if the entry is the first in the bucket. */ + if (entry == bucket->data || table->comparator (entry, bucket->data)) + { + void *data = bucket->data; + + if (delete) + { + if (bucket->next) + { + struct hash_entry *next = bucket->next; + + /* Bump the first overflow entry into the bucket head, then save + the previous first overflow entry for later recycling. */ + *bucket = *next; + free_entry (table, next); + } + else + { + bucket->data = NULL; + } + } + + return data; + } + + /* Scan the bucket overflow. */ + for (cursor = bucket; cursor->next; cursor = cursor->next) + { + if (entry == cursor->next->data + || table->comparator (entry, cursor->next->data)) + { + void *data = cursor->next->data; + + if (delete) + { + struct hash_entry *next = cursor->next; + + /* Unlink the entry to delete, then save the freed entry for later + recycling. */ + cursor->next = next->next; + free_entry (table, next); + } + + return data; + } + } + + /* No entry found. */ + return NULL; +} + +/* Internal helper, to move entries from SRC to DST. Both tables must + share the same free entry list. If SAFE, only move overflow + entries, saving bucket heads for later, so that no allocations will + occur. Return false if the free entry list is exhausted and an + allocation fails. */ + +static bool +transfer_entries (Hash_table *dst, Hash_table *src, bool safe) +{ + struct hash_entry *bucket; + struct hash_entry *cursor; + struct hash_entry *next; + for (bucket = src->bucket; bucket < src->bucket_limit; bucket++) + if (bucket->data) + { + void *data; + struct hash_entry *new_bucket; + + /* Within each bucket, transfer overflow entries first and + then the bucket head, to minimize memory pressure. After + all, the only time we might allocate is when moving the + bucket head, but moving overflow entries first may create + free entries that can be recycled by the time we finally + get to the bucket head. */ + for (cursor = bucket->next; cursor; cursor = next) + { + data = cursor->data; + new_bucket = safe_hasher (dst, data); + + next = cursor->next; + + if (new_bucket->data) + { + /* Merely relink an existing entry, when moving from a + bucket overflow into a bucket overflow. */ + cursor->next = new_bucket->next; + new_bucket->next = cursor; + } + else + { + /* Free an existing entry, when moving from a bucket + overflow into a bucket header. */ + new_bucket->data = data; + dst->n_buckets_used++; + free_entry (dst, cursor); + } + } + /* Now move the bucket head. Be sure that if we fail due to + allocation failure that the src table is in a consistent + state. */ + data = bucket->data; + bucket->next = NULL; + if (safe) + continue; + new_bucket = safe_hasher (dst, data); + + if (new_bucket->data) + { + /* Allocate or recycle an entry, when moving from a bucket + header into a bucket overflow. */ + struct hash_entry *new_entry = allocate_entry (dst); + + if (new_entry == NULL) + return false; + + new_entry->data = data; + new_entry->next = new_bucket->next; + new_bucket->next = new_entry; + } + else + { + /* Move from one bucket header to another. */ + new_bucket->data = data; + dst->n_buckets_used++; + } + bucket->data = NULL; + src->n_buckets_used--; + } + return true; +} + +/* For an already existing hash table, change the number of buckets through + specifying CANDIDATE. The contents of the hash table are preserved. The + new number of buckets is automatically selected so as to _guarantee_ that + the table may receive at least CANDIDATE different user entries, including + those already in the table, before any other growth of the hash table size + occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the + exact number of buckets desired. Return true iff the rehash succeeded. */ + +bool +hash_rehash (Hash_table *table, size_t candidate) +{ + Hash_table storage; + Hash_table *new_table; + size_t new_size = compute_bucket_size (candidate, table->tuning); + + if (!new_size) + return false; + if (new_size == table->n_buckets) + return true; + new_table = &storage; + new_table->bucket = calloc (new_size, sizeof *new_table->bucket); + if (new_table->bucket == NULL) + return false; + new_table->n_buckets = new_size; + new_table->bucket_limit = new_table->bucket + new_size; + new_table->n_buckets_used = 0; + new_table->n_entries = 0; + new_table->tuning = table->tuning; + new_table->hasher = table->hasher; + new_table->comparator = table->comparator; + new_table->data_freer = table->data_freer; + + /* In order for the transfer to successfully complete, we need + additional overflow entries when distinct buckets in the old + table collide into a common bucket in the new table. The worst + case possible is a hasher that gives a good spread with the old + size, but returns a constant with the new size; if we were to + guarantee table->n_buckets_used-1 free entries in advance, then + the transfer would be guaranteed to not allocate memory. + However, for large tables, a guarantee of no further allocation + introduces a lot of extra memory pressure, all for an unlikely + corner case (most rehashes reduce, rather than increase, the + number of overflow entries needed). So, we instead ensure that + the transfer process can be reversed if we hit a memory + allocation failure mid-transfer. */ + + /* Merely reuse the extra old space into the new table. */ +#if USE_OBSTACK + new_table->entry_stack = table->entry_stack; +#endif + new_table->free_entry_list = table->free_entry_list; + + if (transfer_entries (new_table, table, false)) + { + /* Entries transferred successfully; tie up the loose ends. */ + free (table->bucket); + table->bucket = new_table->bucket; + table->bucket_limit = new_table->bucket_limit; + table->n_buckets = new_table->n_buckets; + table->n_buckets_used = new_table->n_buckets_used; + table->free_entry_list = new_table->free_entry_list; + /* table->n_entries and table->entry_stack already hold their value. */ + return true; + } + + /* We've allocated new_table->bucket (and possibly some entries), + exhausted the free list, and moved some but not all entries into + new_table. We must undo the partial move before returning + failure. The only way to get into this situation is if new_table + uses fewer buckets than the old table, so we will reclaim some + free entries as overflows in the new table are put back into + distinct buckets in the old table. + + There are some pathological cases where a single pass through the + table requires more intermediate overflow entries than using two + passes. Two passes give worse cache performance and takes + longer, but at this point, we're already out of memory, so slow + and safe is better than failure. */ + table->free_entry_list = new_table->free_entry_list; + if (! (transfer_entries (table, new_table, true) + && transfer_entries (table, new_table, false))) + abort (); + /* table->n_entries already holds its value. */ + free (new_table->bucket); + return false; +} + +/* Insert ENTRY into hash TABLE if there is not already a matching entry. + + Return -1 upon memory allocation failure. + Return 1 if insertion succeeded. + Return 0 if there is already a matching entry in the table, + and in that case, if MATCHED_ENT is non-NULL, set *MATCHED_ENT + to that entry. + + This interface is easier to use than hash_insert when you must + distinguish between the latter two cases. More importantly, + hash_insert is unusable for some types of ENTRY values. When using + hash_insert, the only way to distinguish those cases is to compare + the return value and ENTRY. That works only when you can have two + different ENTRY values that point to data that compares "equal". Thus, + when the ENTRY value is a simple scalar, you must use + hash_insert_if_absent. ENTRY must not be NULL. */ +int +hash_insert_if_absent (Hash_table *table, void const *entry, + void const **matched_ent) +{ + void *data; + struct hash_entry *bucket; + + /* The caller cannot insert a NULL entry, since hash_lookup returns NULL + to indicate "not found", and hash_find_entry uses "bucket->data == NULL" + to indicate an empty bucket. */ + if (! entry) + abort (); + + /* If there's a matching entry already in the table, return that. */ + if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL) + { + if (matched_ent) + *matched_ent = data; + return 0; + } + + /* If the growth threshold of the buckets in use has been reached, increase + the table size and rehash. There's no point in checking the number of + entries: if the hashing function is ill-conditioned, rehashing is not + likely to improve it. */ + + if (table->n_buckets_used + > table->tuning->growth_threshold * table->n_buckets) + { + /* Check more fully, before starting real work. If tuning arguments + became invalid, the second check will rely on proper defaults. */ + check_tuning (table); + if (table->n_buckets_used + > table->tuning->growth_threshold * table->n_buckets) + { + const Hash_tuning *tuning = table->tuning; + float candidate = + (tuning->is_n_buckets + ? (table->n_buckets * tuning->growth_factor) + : (table->n_buckets * tuning->growth_factor + * tuning->growth_threshold)); + + if (SIZE_MAX <= candidate) + return -1; + + /* If the rehash fails, arrange to return NULL. */ + if (!hash_rehash (table, candidate)) + return -1; + + /* Update the bucket we are interested in. */ + if (hash_find_entry (table, entry, &bucket, false) != NULL) + abort (); + } + } + + /* ENTRY is not matched, it should be inserted. */ + + if (bucket->data) + { + struct hash_entry *new_entry = allocate_entry (table); + + if (new_entry == NULL) + return -1; + + /* Add ENTRY in the overflow of the bucket. */ + + new_entry->data = (void *) entry; + new_entry->next = bucket->next; + bucket->next = new_entry; + table->n_entries++; + return 1; + } + + /* Add ENTRY right in the bucket head. */ + + bucket->data = (void *) entry; + table->n_entries++; + table->n_buckets_used++; + + return 1; +} + +/* hash_insert0 is the deprecated name for hash_insert_if_absent. + . */ +int +hash_insert0 (Hash_table *table, void const *entry, void const **matched_ent) +{ + return hash_insert_if_absent (table, entry, matched_ent); +} + +/* If ENTRY matches an entry already in the hash table, return the pointer + to the entry from the table. Otherwise, insert ENTRY and return ENTRY. + Return NULL if the storage required for insertion cannot be allocated. + This implementation does not support duplicate entries or insertion of + NULL. */ + +void * +hash_insert (Hash_table *table, void const *entry) +{ + void const *matched_ent; + int err = hash_insert_if_absent (table, entry, &matched_ent); + return (err == -1 + ? NULL + : (void *) (err == 0 ? matched_ent : entry)); +} + +/* If ENTRY is already in the table, remove it and return the just-deleted + data (the user may want to deallocate its storage). If ENTRY is not in the + table, don't modify the table and return NULL. */ + +void * +hash_delete (Hash_table *table, const void *entry) +{ + void *data; + struct hash_entry *bucket; + + data = hash_find_entry (table, entry, &bucket, true); + if (!data) + return NULL; + + table->n_entries--; + if (!bucket->data) + { + table->n_buckets_used--; + + /* If the shrink threshold of the buckets in use has been reached, + rehash into a smaller table. */ + + if (table->n_buckets_used + < table->tuning->shrink_threshold * table->n_buckets) + { + /* Check more fully, before starting real work. If tuning arguments + became invalid, the second check will rely on proper defaults. */ + check_tuning (table); + if (table->n_buckets_used + < table->tuning->shrink_threshold * table->n_buckets) + { + const Hash_tuning *tuning = table->tuning; + size_t candidate = + (tuning->is_n_buckets + ? table->n_buckets * tuning->shrink_factor + : (table->n_buckets * tuning->shrink_factor + * tuning->growth_threshold)); + + if (!hash_rehash (table, candidate)) + { + /* Failure to allocate memory in an attempt to + shrink the table is not fatal. But since memory + is low, we can at least be kind and free any + spare entries, rather than keeping them tied up + in the free entry list. */ +#if ! USE_OBSTACK + struct hash_entry *cursor = table->free_entry_list; + struct hash_entry *next; + while (cursor) + { + next = cursor->next; + free (cursor); + cursor = next; + } + table->free_entry_list = NULL; +#endif + } + } + } + } + + return data; +} + +/* Testing. */ + +#if TESTING + +void +hash_print (const Hash_table *table) +{ + struct hash_entry *bucket = (struct hash_entry *) table->bucket; + + for ( ; bucket < table->bucket_limit; bucket++) + { + struct hash_entry *cursor; + + if (bucket) + printf ("%lu:\n", (unsigned long int) (bucket - table->bucket)); + + for (cursor = bucket; cursor; cursor = cursor->next) + { + char const *s = cursor->data; + /* FIXME */ + if (s) + printf (" %s\n", s); + } + } +} + +#endif /* TESTING */ diff --git a/gl/lib/hash.h b/gl/lib/hash.h new file mode 100644 index 0000000..9994f5f --- /dev/null +++ b/gl/lib/hash.h @@ -0,0 +1,107 @@ +/* hash - hashing table processing. + Copyright (C) 1998-1999, 2001, 2003, 2009-2014 Free Software Foundation, + Inc. + Written by Jim Meyering , 1998. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* A generic hash table package. */ + +/* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use + obstacks instead of malloc, and recompile 'hash.c' with same setting. */ + +#ifndef HASH_H_ +# define HASH_H_ + +# include +# include + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The warn_unused_result attribute appeared first in gcc-3.4.0. */ +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# define _GL_ATTRIBUTE_WUR __attribute__ ((__warn_unused_result__)) +# else +# define _GL_ATTRIBUTE_WUR /* empty */ +# endif + +# ifndef _GL_ATTRIBUTE_DEPRECATED +/* The __attribute__((__deprecated__)) feature + is available in gcc versions 3.1 and newer. */ +# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1) +# define _GL_ATTRIBUTE_DEPRECATED /* empty */ +# else +# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) +# endif +# endif + +typedef size_t (*Hash_hasher) (const void *, size_t); +typedef bool (*Hash_comparator) (const void *, const void *); +typedef void (*Hash_data_freer) (void *); +typedef bool (*Hash_processor) (void *, void *); + +struct hash_tuning + { + /* This structure is mainly used for 'hash_initialize', see the block + documentation of 'hash_reset_tuning' for more complete comments. */ + + float shrink_threshold; /* ratio of used buckets to trigger a shrink */ + float shrink_factor; /* ratio of new smaller size to original size */ + float growth_threshold; /* ratio of used buckets to trigger a growth */ + float growth_factor; /* ratio of new bigger size to original size */ + bool is_n_buckets; /* if CANDIDATE really means table size */ + }; + +typedef struct hash_tuning Hash_tuning; + +struct hash_table; + +typedef struct hash_table Hash_table; + +/* Information and lookup. */ +size_t hash_get_n_buckets (const Hash_table *) _GL_ATTRIBUTE_PURE; +size_t hash_get_n_buckets_used (const Hash_table *) _GL_ATTRIBUTE_PURE; +size_t hash_get_n_entries (const Hash_table *) _GL_ATTRIBUTE_PURE; +size_t hash_get_max_bucket_length (const Hash_table *) _GL_ATTRIBUTE_PURE; +bool hash_table_ok (const Hash_table *) _GL_ATTRIBUTE_PURE; +void hash_print_statistics (const Hash_table *, FILE *); +void *hash_lookup (const Hash_table *, const void *); + +/* Walking. */ +void *hash_get_first (const Hash_table *) _GL_ATTRIBUTE_PURE; +void *hash_get_next (const Hash_table *, const void *); +size_t hash_get_entries (const Hash_table *, void **, size_t); +size_t hash_do_for_each (const Hash_table *, Hash_processor, void *); + +/* Allocation and clean-up. */ +size_t hash_string (const char *, size_t) _GL_ATTRIBUTE_PURE; +void hash_reset_tuning (Hash_tuning *); +Hash_table *hash_initialize (size_t, const Hash_tuning *, + Hash_hasher, Hash_comparator, + Hash_data_freer) _GL_ATTRIBUTE_WUR; +void hash_clear (Hash_table *); +void hash_free (Hash_table *); + +/* Insertion and deletion. */ +bool hash_rehash (Hash_table *, size_t) _GL_ATTRIBUTE_WUR; +void *hash_insert (Hash_table *, const void *) _GL_ATTRIBUTE_WUR; + +/* Deprecate this interface. It has been renamed to hash_insert_if_absent. */ +int hash_insert0 (Hash_table *table, /* FIXME: remove in 2013 */ + const void *entry, + const void **matched_ent) _GL_ATTRIBUTE_DEPRECATED; +int hash_insert_if_absent (Hash_table *table, const void *entry, + const void **matched_ent); +void *hash_delete (Hash_table *, const void *); + +#endif diff --git a/gl/lib/human.c b/gl/lib/human.c new file mode 100644 index 0000000..ab6b30d --- /dev/null +++ b/gl/lib/human.c @@ -0,0 +1,470 @@ +/* human.c -- print human readable file size + + Copyright (C) 1996-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert and Larry McVoy. */ + +#include + +#include "human.h" + +#include +#include +#include +#include + +#include +#include +#include + +/* The maximum length of a suffix like "KiB". */ +#define HUMAN_READABLE_SUFFIX_LENGTH_MAX 3 + +static const char power_letter[] = +{ + 0, /* not used */ + 'K', /* kibi ('k' for kilo is a special case) */ + 'M', /* mega or mebi */ + 'G', /* giga or gibi */ + 'T', /* tera or tebi */ + 'P', /* peta or pebi */ + 'E', /* exa or exbi */ + 'Z', /* zetta or 2**70 */ + 'Y' /* yotta or 2**80 */ +}; + + +/* If INEXACT_STYLE is not human_round_to_nearest, and if easily + possible, adjust VALUE according to the style. */ + +static long double +adjust_value (int inexact_style, long double value) +{ + /* Do not use the floorl or ceill functions, as that would mean + checking for their presence and possibly linking with the + standard math library, which is a porting pain. So leave the + value alone if it is too large to easily round. */ + if (inexact_style != human_round_to_nearest && value < UINTMAX_MAX) + { + uintmax_t u = value; + value = u + (inexact_style == human_ceiling && u != value); + } + + return value; +} + +/* Group the digits of NUMBER according to the grouping rules of the + current locale. NUMBER contains NUMBERLEN digits. Modify the + bytes pointed to by NUMBER in place, subtracting 1 from NUMBER for + each byte inserted. Return the starting address of the modified + number. + + To group the digits, use GROUPING and THOUSANDS_SEP as in 'struct + lconv' from . */ + +static char * +group_number (char *number, size_t numberlen, + char const *grouping, char const *thousands_sep) +{ + register char *d; + size_t grouplen = SIZE_MAX; + size_t thousands_seplen = strlen (thousands_sep); + size_t i = numberlen; + + /* The maximum possible value for NUMBERLEN is the number of digits + in the square of the largest uintmax_t, so double the size needed. */ + char buf[2 * INT_STRLEN_BOUND (uintmax_t) + 1]; + + memcpy (buf, number, numberlen); + d = number + numberlen; + + for (;;) + { + unsigned char g = *grouping; + + if (g) + { + grouplen = g < CHAR_MAX ? g : i; + grouping++; + } + + if (i < grouplen) + grouplen = i; + + d -= grouplen; + i -= grouplen; + memcpy (d, buf + i, grouplen); + if (i == 0) + return d; + + d -= thousands_seplen; + memcpy (d, thousands_sep, thousands_seplen); + } +} + +/* Convert N to a human readable format in BUF, using the options OPTS. + + N is expressed in units of FROM_BLOCK_SIZE. FROM_BLOCK_SIZE must + be nonnegative. + + Use units of TO_BLOCK_SIZE in the output number. TO_BLOCK_SIZE + must be positive. + + Use (OPTS & (human_round_to_nearest | human_floor | human_ceiling)) + to determine whether to take the ceiling or floor of any result + that cannot be expressed exactly. + + If (OPTS & human_group_digits), group the thousands digits + according to the locale, e.g., "1,000,000" in an American English + locale. + + If (OPTS & human_autoscale), deduce the output block size + automatically; TO_BLOCK_SIZE must be 1 but it has no effect on the + output. Use powers of 1024 if (OPTS & human_base_1024), and powers + of 1000 otherwise. For example, assuming powers of 1024, 8500 + would be converted to 8.3, 133456345 to 127, 56990456345 to 53, and + so on. Numbers smaller than the power aren't modified. + human_autoscale is normally used together with human_SI. + + If (OPTS & human_space_before_unit), use a space to separate the + number from any suffix that is appended as described below. + + If (OPTS & human_SI), append an SI prefix indicating which power is + being used. If in addition (OPTS & human_B), append "B" (if base + 1000) or "iB" (if base 1024) to the SI prefix. When ((OPTS & + human_SI) && ! (OPTS & human_autoscale)), TO_BLOCK_SIZE must be a + power of 1024 or of 1000, depending on (OPTS & + human_base_1024). */ + +char * +human_readable (uintmax_t n, char *buf, int opts, + uintmax_t from_block_size, uintmax_t to_block_size) +{ + int inexact_style = + opts & (human_round_to_nearest | human_floor | human_ceiling); + unsigned int base = opts & human_base_1024 ? 1024 : 1000; + uintmax_t amt; + int tenths; + int exponent = -1; + int exponent_max = sizeof power_letter - 1; + char *p; + char *psuffix; + char const *integerlim; + + /* 0 means adjusted N == AMT.TENTHS; + 1 means AMT.TENTHS < adjusted N < AMT.TENTHS + 0.05; + 2 means adjusted N == AMT.TENTHS + 0.05; + 3 means AMT.TENTHS + 0.05 < adjusted N < AMT.TENTHS + 0.1. */ + int rounding; + + char const *decimal_point = "."; + size_t decimal_pointlen = 1; + char const *grouping = ""; + char const *thousands_sep = ""; + struct lconv const *l = localeconv (); + size_t pointlen = strlen (l->decimal_point); + if (0 < pointlen && pointlen <= MB_LEN_MAX) + { + decimal_point = l->decimal_point; + decimal_pointlen = pointlen; + } + grouping = l->grouping; + if (strlen (l->thousands_sep) <= MB_LEN_MAX) + thousands_sep = l->thousands_sep; + + psuffix = buf + LONGEST_HUMAN_READABLE - HUMAN_READABLE_SUFFIX_LENGTH_MAX; + p = psuffix; + + /* Adjust AMT out of FROM_BLOCK_SIZE units and into TO_BLOCK_SIZE + units. If this can be done exactly with integer arithmetic, do + not use floating point operations. */ + if (to_block_size <= from_block_size) + { + if (from_block_size % to_block_size == 0) + { + uintmax_t multiplier = from_block_size / to_block_size; + amt = n * multiplier; + if (amt / multiplier == n) + { + tenths = 0; + rounding = 0; + goto use_integer_arithmetic; + } + } + } + else if (from_block_size != 0 && to_block_size % from_block_size == 0) + { + uintmax_t divisor = to_block_size / from_block_size; + uintmax_t r10 = (n % divisor) * 10; + uintmax_t r2 = (r10 % divisor) * 2; + amt = n / divisor; + tenths = r10 / divisor; + rounding = r2 < divisor ? 0 < r2 : 2 + (divisor < r2); + goto use_integer_arithmetic; + } + + { + /* Either the result cannot be computed easily using uintmax_t, + or from_block_size is zero. Fall back on floating point. + FIXME: This can yield answers that are slightly off. */ + + long double dto_block_size = to_block_size; + long double damt = n * (from_block_size / dto_block_size); + size_t buflen; + size_t nonintegerlen; + + if (! (opts & human_autoscale)) + { + sprintf (buf, "%.0Lf", adjust_value (inexact_style, damt)); + buflen = strlen (buf); + nonintegerlen = 0; + } + else + { + long double e = 1; + exponent = 0; + + do + { + e *= base; + exponent++; + } + while (e * base <= damt && exponent < exponent_max); + + damt /= e; + + sprintf (buf, "%.1Lf", adjust_value (inexact_style, damt)); + buflen = strlen (buf); + nonintegerlen = decimal_pointlen + 1; + + if (1 + nonintegerlen + ! (opts & human_base_1024) < buflen + || ((opts & human_suppress_point_zero) + && buf[buflen - 1] == '0')) + { + sprintf (buf, "%.0Lf", + adjust_value (inexact_style, damt * 10) / 10); + buflen = strlen (buf); + nonintegerlen = 0; + } + } + + p = psuffix - buflen; + memmove (p, buf, buflen); + integerlim = p + buflen - nonintegerlen; + } + goto do_grouping; + + use_integer_arithmetic: + { + /* The computation can be done exactly, with integer arithmetic. + + Use power of BASE notation if requested and if adjusted AMT is + large enough. */ + + if (opts & human_autoscale) + { + exponent = 0; + + if (base <= amt) + { + do + { + unsigned int r10 = (amt % base) * 10 + tenths; + unsigned int r2 = (r10 % base) * 2 + (rounding >> 1); + amt /= base; + tenths = r10 / base; + rounding = (r2 < base + ? (r2 + rounding) != 0 + : 2 + (base < r2 + rounding)); + exponent++; + } + while (base <= amt && exponent < exponent_max); + + if (amt < 10) + { + if (inexact_style == human_round_to_nearest + ? 2 < rounding + (tenths & 1) + : inexact_style == human_ceiling && 0 < rounding) + { + tenths++; + rounding = 0; + + if (tenths == 10) + { + amt++; + tenths = 0; + } + } + + if (amt < 10 + && (tenths || ! (opts & human_suppress_point_zero))) + { + *--p = '0' + tenths; + p -= decimal_pointlen; + memcpy (p, decimal_point, decimal_pointlen); + tenths = rounding = 0; + } + } + } + } + + if (inexact_style == human_round_to_nearest + ? 5 < tenths + (0 < rounding + (amt & 1)) + : inexact_style == human_ceiling && 0 < tenths + rounding) + { + amt++; + + if ((opts & human_autoscale) + && amt == base && exponent < exponent_max) + { + exponent++; + if (! (opts & human_suppress_point_zero)) + { + *--p = '0'; + p -= decimal_pointlen; + memcpy (p, decimal_point, decimal_pointlen); + } + amt = 1; + } + } + + integerlim = p; + + do + { + int digit = amt % 10; + *--p = digit + '0'; + } + while ((amt /= 10) != 0); + } + + do_grouping: + if (opts & human_group_digits) + p = group_number (p, integerlim - p, grouping, thousands_sep); + + if (opts & human_SI) + { + if (exponent < 0) + { + uintmax_t power; + exponent = 0; + for (power = 1; power < to_block_size; power *= base) + if (++exponent == exponent_max) + break; + } + + if ((exponent | (opts & human_B)) && (opts & human_space_before_unit)) + *psuffix++ = ' '; + + if (exponent) + *psuffix++ = (! (opts & human_base_1024) && exponent == 1 + ? 'k' + : power_letter[exponent]); + + if (opts & human_B) + { + if ((opts & human_base_1024) && exponent) + *psuffix++ = 'i'; + *psuffix++ = 'B'; + } + } + + *psuffix = '\0'; + + return p; +} + + +/* The default block size used for output. This number may change in + the future as disks get larger. */ +#ifndef DEFAULT_BLOCK_SIZE +# define DEFAULT_BLOCK_SIZE 1024 +#endif + +static char const *const block_size_args[] = { "human-readable", "si", 0 }; +static int const block_size_opts[] = + { + human_autoscale + human_SI + human_base_1024, + human_autoscale + human_SI + }; + +static uintmax_t +default_block_size (void) +{ + return getenv ("POSIXLY_CORRECT") ? 512 : DEFAULT_BLOCK_SIZE; +} + +static strtol_error +humblock (char const *spec, uintmax_t *block_size, int *options) +{ + int i; + int opts = 0; + + if (! spec + && ! (spec = getenv ("BLOCK_SIZE")) + && ! (spec = getenv ("BLOCKSIZE"))) + *block_size = default_block_size (); + else + { + if (*spec == '\'') + { + opts |= human_group_digits; + spec++; + } + + if (0 <= (i = ARGMATCH (spec, block_size_args, block_size_opts))) + { + opts |= block_size_opts[i]; + *block_size = 1; + } + else + { + char *ptr; + strtol_error e = xstrtoumax (spec, &ptr, 0, block_size, + "eEgGkKmMpPtTyYzZ0"); + if (e != LONGINT_OK) + { + *options = 0; + return e; + } + for (; ! ('0' <= *spec && *spec <= '9'); spec++) + if (spec == ptr) + { + opts |= human_SI; + if (ptr[-1] == 'B') + opts |= human_B; + if (ptr[-1] != 'B' || ptr[-2] == 'i') + opts |= human_base_1024; + break; + } + } + } + + *options = opts; + return LONGINT_OK; +} + +enum strtol_error +human_options (char const *spec, int *opts, uintmax_t *block_size) +{ + strtol_error e = humblock (spec, block_size, opts); + if (*block_size == 0) + { + *block_size = default_block_size (); + e = LONGINT_INVALID; + } + return e; +} diff --git a/gl/lib/human.h b/gl/lib/human.h new file mode 100644 index 0000000..2cb1c9e --- /dev/null +++ b/gl/lib/human.h @@ -0,0 +1,83 @@ +/* human.h -- print human readable file size + + Copyright (C) 1996-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert and Larry McVoy. */ + +#ifndef HUMAN_H_ +# define HUMAN_H_ 1 + +# include +# include +# include +# include + +# include + +/* A conservative bound on the maximum length of a human-readable string. + The output can be the square of the largest uintmax_t, so double + its size before converting to a bound. + log10 (2.0) < 146/485. Add 1 for integer division truncation. + Also, the output can have a thousands separator between every digit, + so multiply by MB_LEN_MAX + 1 and then subtract MB_LEN_MAX. + Append 1 for a space before the suffix. + Finally, append 3, the maximum length of a suffix. */ +# define LONGEST_HUMAN_READABLE \ + ((2 * sizeof (uintmax_t) * CHAR_BIT * 146 / 485 + 1) * (MB_LEN_MAX + 1) \ + - MB_LEN_MAX + 1 + 3) + +/* Options for human_readable. */ +enum +{ + /* Unless otherwise specified these options may be ORed together. */ + + /* The following three options are mutually exclusive. */ + /* Round to plus infinity (default). */ + human_ceiling = 0, + /* Round to nearest, ties to even. */ + human_round_to_nearest = 1, + /* Round to minus infinity. */ + human_floor = 2, + + /* Group digits together, e.g. "1,000,000". This uses the + locale-defined grouping; the traditional C locale does not group, + so this has effect only if some other locale is in use. */ + human_group_digits = 4, + + /* When autoscaling, suppress ".0" at end. */ + human_suppress_point_zero = 8, + + /* Scale output and use SI-style units, ignoring the output block size. */ + human_autoscale = 16, + + /* Prefer base 1024 to base 1000. */ + human_base_1024 = 32, + + /* Prepend " " before unit symbol. */ + human_space_before_unit = 64, + + /* Append SI prefix, e.g. "k" or "M". */ + human_SI = 128, + + /* Append "B" (if base 1000) or "iB" (if base 1024) to SI prefix. */ + human_B = 256 +}; + +char *human_readable (uintmax_t, char *, int, uintmax_t, uintmax_t); + +enum strtol_error human_options (char const *, int *, uintmax_t *); + +#endif /* HUMAN_H_ */ diff --git a/gl/lib/i-ring.c b/gl/lib/i-ring.c new file mode 100644 index 0000000..4173a03 --- /dev/null +++ b/gl/lib/i-ring.c @@ -0,0 +1,68 @@ +/* a simple ring buffer + Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#include +#include "i-ring.h" + +#include + +void +i_ring_init (I_ring *ir, int default_val) +{ + int i; + ir->ir_empty = true; + ir->ir_front = 0; + ir->ir_back = 0; + for (i = 0; i < I_RING_SIZE; i++) + ir->ir_data[i] = default_val; + ir->ir_default_val = default_val; +} + +bool +i_ring_empty (I_ring const *ir) +{ + return ir->ir_empty; +} + +int +i_ring_push (I_ring *ir, int val) +{ + unsigned int dest_idx = (ir->ir_front + !ir->ir_empty) % I_RING_SIZE; + int old_val = ir->ir_data[dest_idx]; + ir->ir_data[dest_idx] = val; + ir->ir_front = dest_idx; + if (dest_idx == ir->ir_back) + ir->ir_back = (ir->ir_back + !ir->ir_empty) % I_RING_SIZE; + ir->ir_empty = false; + return old_val; +} + +int +i_ring_pop (I_ring *ir) +{ + int top_val; + if (i_ring_empty (ir)) + abort (); + top_val = ir->ir_data[ir->ir_front]; + ir->ir_data[ir->ir_front] = ir->ir_default_val; + if (ir->ir_front == ir->ir_back) + ir->ir_empty = true; + else + ir->ir_front = ((ir->ir_front + I_RING_SIZE - 1) % I_RING_SIZE); + return top_val; +} diff --git a/gl/lib/i-ring.h b/gl/lib/i-ring.h new file mode 100644 index 0000000..7d993fa --- /dev/null +++ b/gl/lib/i-ring.h @@ -0,0 +1,44 @@ +/* definitions for a simple ring buffer + Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include "verify.h" + +enum { I_RING_SIZE = 4 }; +verify (1 <= I_RING_SIZE); + +/* When ir_empty is true, the ring is empty. + Otherwise, ir_data[B..F] are defined, where B..F is the contiguous + range of indices, modulo I_RING_SIZE, from back to front, inclusive. + Undefined elements of ir_data are always set to ir_default_val. + Popping from an empty ring aborts. + Pushing onto a full ring returns the displaced value. + An empty ring has F==B and ir_empty == true. + A ring with one entry still has F==B, but now ir_empty == false. */ +struct I_ring +{ + int ir_data[I_RING_SIZE]; + int ir_default_val; + unsigned int ir_front; + unsigned int ir_back; + bool ir_empty; +}; +typedef struct I_ring I_ring; + +void i_ring_init (I_ring *ir, int ir_default_val); +int i_ring_push (I_ring *ir, int val); +int i_ring_pop (I_ring *ir); +bool i_ring_empty (I_ring const *ir) _GL_ATTRIBUTE_PURE; diff --git a/gl/lib/idcache.c b/gl/lib/idcache.c new file mode 100644 index 0000000..8c921bf --- /dev/null +++ b/gl/lib/idcache.c @@ -0,0 +1,227 @@ +/* idcache.c -- map user and group IDs, cached for speed + + Copyright (C) 1985, 1988-1990, 1997-1998, 2003, 2005-2007, 2009-2014 Free + Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "idcache.h" +#include +#include +#include +#include +#include + +#include + +#include "xalloc.h" + +#ifdef __DJGPP__ +static char digits[] = "0123456789"; +#endif + +struct userid +{ + union + { + uid_t u; + gid_t g; + } id; + struct userid *next; + char name[FLEXIBLE_ARRAY_MEMBER]; +}; + +/* FIXME: provide a function to free any malloc'd storage and reset lists, + so that an application can use code like this just before exiting: + #ifdef lint + idcache_clear (); + #endif +*/ + +static struct userid *user_alist; + +/* Each entry on list is a user name for which the first lookup failed. */ +static struct userid *nouser_alist; + +/* Use the same struct as for userids. */ +static struct userid *group_alist; + +/* Each entry on list is a group name for which the first lookup failed. */ +static struct userid *nogroup_alist; + +/* Translate UID to a login name, with cache, or NULL if unresolved. */ + +char * +getuser (uid_t uid) +{ + struct userid *tail; + struct userid *match = NULL; + + for (tail = user_alist; tail; tail = tail->next) + { + if (tail->id.u == uid) + { + match = tail; + break; + } + } + + if (match == NULL) + { + struct passwd *pwent = getpwuid (uid); + char const *name = pwent ? pwent->pw_name : ""; + match = xmalloc (offsetof (struct userid, name) + strlen (name) + 1); + match->id.u = uid; + strcpy (match->name, name); + + /* Add to the head of the list, so most recently used is first. */ + match->next = user_alist; + user_alist = match; + } + + return match->name[0] ? match->name : NULL; +} + +/* Translate USER to a UID, with cache. + Return NULL if there is no such user. + (We also cache which user names have no passwd entry, + so we don't keep looking them up.) */ + +uid_t * +getuidbyname (const char *user) +{ + struct userid *tail; + struct passwd *pwent; + + for (tail = user_alist; tail; tail = tail->next) + /* Avoid a function call for the most common case. */ + if (*tail->name == *user && !strcmp (tail->name, user)) + return &tail->id.u; + + for (tail = nouser_alist; tail; tail = tail->next) + /* Avoid a function call for the most common case. */ + if (*tail->name == *user && !strcmp (tail->name, user)) + return NULL; + + pwent = getpwnam (user); +#ifdef __DJGPP__ + /* We need to pretend to be the user USER, to make + pwd functions know about an arbitrary user name. */ + if (!pwent && strspn (user, digits) < strlen (user)) + { + setenv ("USER", user, 1); + pwent = getpwnam (user); /* now it will succeed */ + } +#endif + + tail = xmalloc (offsetof (struct userid, name) + strlen (user) + 1); + strcpy (tail->name, user); + + /* Add to the head of the list, so most recently used is first. */ + if (pwent) + { + tail->id.u = pwent->pw_uid; + tail->next = user_alist; + user_alist = tail; + return &tail->id.u; + } + + tail->next = nouser_alist; + nouser_alist = tail; + return NULL; +} + +/* Translate GID to a group name, with cache, or NULL if unresolved. */ + +char * +getgroup (gid_t gid) +{ + struct userid *tail; + struct userid *match = NULL; + + for (tail = group_alist; tail; tail = tail->next) + { + if (tail->id.g == gid) + { + match = tail; + break; + } + } + + if (match == NULL) + { + struct group *grent = getgrgid (gid); + char const *name = grent ? grent->gr_name : ""; + match = xmalloc (offsetof (struct userid, name) + strlen (name) + 1); + match->id.g = gid; + strcpy (match->name, name); + + /* Add to the head of the list, so most recently used is first. */ + match->next = group_alist; + group_alist = match; + } + + return match->name[0] ? match->name : NULL; +} + +/* Translate GROUP to a GID, with cache. + Return NULL if there is no such group. + (We also cache which group names have no group entry, + so we don't keep looking them up.) */ + +gid_t * +getgidbyname (const char *group) +{ + struct userid *tail; + struct group *grent; + + for (tail = group_alist; tail; tail = tail->next) + /* Avoid a function call for the most common case. */ + if (*tail->name == *group && !strcmp (tail->name, group)) + return &tail->id.g; + + for (tail = nogroup_alist; tail; tail = tail->next) + /* Avoid a function call for the most common case. */ + if (*tail->name == *group && !strcmp (tail->name, group)) + return NULL; + + grent = getgrnam (group); +#ifdef __DJGPP__ + /* We need to pretend to belong to group GROUP, to make + grp functions know about an arbitrary group name. */ + if (!grent && strspn (group, digits) < strlen (group)) + { + setenv ("GROUP", group, 1); + grent = getgrnam (group); /* now it will succeed */ + } +#endif + + tail = xmalloc (offsetof (struct userid, name) + strlen (group) + 1); + strcpy (tail->name, group); + + /* Add to the head of the list, so most recently used is first. */ + if (grent) + { + tail->id.g = grent->gr_gid; + tail->next = group_alist; + group_alist = tail; + return &tail->id.g; + } + + tail->next = nogroup_alist; + nogroup_alist = tail; + return NULL; +} diff --git a/gnulib/lib/idcache.h b/gl/lib/idcache.h similarity index 100% rename from gnulib/lib/idcache.h rename to gl/lib/idcache.h diff --git a/gl/lib/intprops.h b/gl/lib/intprops.h new file mode 100644 index 0000000..d0bb7a6 --- /dev/null +++ b/gl/lib/intprops.h @@ -0,0 +1,320 @@ +/* intprops.h -- properties of integer types + + Copyright (C) 2001-2005, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#ifndef _GL_INTPROPS_H +#define _GL_INTPROPS_H + +#include + +/* Return an integer value, converted to the same type as the integer + expression E after integer type promotion. V is the unconverted value. */ +#define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) + +/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see + . */ +#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v)) + +/* The extra casts in the following macros work around compiler bugs, + e.g., in Cray C 5.0.3.0. */ + +/* True if the arithmetic type T is an integer type. bool counts as + an integer. */ +#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) + +/* True if negative values of the signed integer type T use two's + complement, ones' complement, or signed magnitude representation, + respectively. Much GNU code assumes two's complement, but some + people like to be portable to all possible C hosts. */ +#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) +#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) +#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) + +/* True if the signed integer expression E uses two's complement. */ +#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1) + +/* True if the arithmetic type T is signed. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* Return 1 if the integer expression E, after integer promotion, has + a signed type. */ +#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) + + +/* Minimum and maximum values for integer types and expressions. These + macros have undefined behavior if T is signed and has padding bits. + If this is a problem for you, please let us know how to fix it for + your host. */ + +/* The maximum and minimum values for the integer type T. */ +#define TYPE_MINIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) 0 \ + : TYPE_SIGNED_MAGNITUDE (t) \ + ? ~ (t) 0 \ + : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) + +/* The maximum and minimum values for the type of the expression E, + after integer promotion. E should not have side effects. */ +#define _GL_INT_MINIMUM(e) \ + (_GL_INT_SIGNED (e) \ + ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \ + : _GL_INT_CONVERT (e, 0)) +#define _GL_INT_MAXIMUM(e) \ + (_GL_INT_SIGNED (e) \ + ? _GL_SIGNED_INT_MAXIMUM (e) \ + : _GL_INT_NEGATE_CONVERT (e, 1)) +#define _GL_SIGNED_INT_MAXIMUM(e) \ + (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) + + +/* Return 1 if the __typeof__ keyword works. This could be done by + 'configure', but for now it's easier to do it by hand. */ +#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ + || (0x5110 <= __SUNPRO_C && !__STDC__)) +# define _GL_HAVE___TYPEOF__ 1 +#else +# define _GL_HAVE___TYPEOF__ 0 +#endif + +/* Return 1 if the integer type or expression T might be signed. Return 0 + if it is definitely unsigned. This macro does not evaluate its argument, + and expands to an integer constant expression. */ +#if _GL_HAVE___TYPEOF__ +# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t)) +#else +# define _GL_SIGNED_TYPE_OR_EXPR(t) 1 +#endif + +/* Bound on length of the string representing an unsigned integer + value representable in B bits. log10 (2.0) < 146/485. The + smallest value of B where this bound is not tight is 2621. */ +#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) + +/* Bound on length of the string representing an integer type or expression T. + Subtract 1 for the sign bit if T is signed, and then add 1 more for + a minus sign if needed. + + Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is + signed, this macro may overestimate the true bound by one byte when + applied to unsigned types of size 2, 4, 16, ... bytes. */ +#define INT_STRLEN_BOUND(t) \ + (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ + - _GL_SIGNED_TYPE_OR_EXPR (t)) \ + + _GL_SIGNED_TYPE_OR_EXPR (t)) + +/* Bound on buffer size needed to represent an integer type or expression T, + including the terminating null. */ +#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) + + +/* Range overflow checks. + + The INT__RANGE_OVERFLOW macros return 1 if the corresponding C + operators might not yield numerically correct answers due to + arithmetic overflow. They do not rely on undefined or + implementation-defined behavior. Their implementations are simple + and straightforward, but they are a bit harder to use than the + INT__OVERFLOW macros described below. + + Example usage: + + long int i = ...; + long int j = ...; + if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX)) + printf ("multiply would overflow"); + else + printf ("product is %ld", i * j); + + Restrictions on *_RANGE_OVERFLOW macros: + + These macros do not check for all possible numerical problems or + undefined or unspecified behavior: they do not check for division + by zero, for bad shift counts, or for shifting negative numbers. + + These macros may evaluate their arguments zero or multiple times, + so the arguments should not have side effects. The arithmetic + arguments (including the MIN and MAX arguments) must be of the same + integer type after the usual arithmetic conversions, and the type + must have minimum value MIN and maximum MAX. Unsigned types should + use a zero MIN of the proper type. + + These macros are tuned for constant MIN and MAX. For commutative + operations such as A + B, they are also tuned for constant B. */ + +/* Return 1 if A + B would overflow in [MIN,MAX] arithmetic. + See above for restrictions. */ +#define INT_ADD_RANGE_OVERFLOW(a, b, min, max) \ + ((b) < 0 \ + ? (a) < (min) - (b) \ + : (max) - (b) < (a)) + +/* Return 1 if A - B would overflow in [MIN,MAX] arithmetic. + See above for restrictions. */ +#define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max) \ + ((b) < 0 \ + ? (max) + (b) < (a) \ + : (a) < (min) + (b)) + +/* Return 1 if - A would overflow in [MIN,MAX] arithmetic. + See above for restrictions. */ +#define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \ + ((min) < 0 \ + ? (a) < - (max) \ + : 0 < (a)) + +/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic. + See above for restrictions. Avoid && and || as they tickle + bugs in Sun C 5.11 2010/08/13 and other compilers; see + . */ +#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \ + ((b) < 0 \ + ? ((a) < 0 \ + ? (a) < (max) / (b) \ + : (b) == -1 \ + ? 0 \ + : (min) / (b) < (a)) \ + : (b) == 0 \ + ? 0 \ + : ((a) < 0 \ + ? (a) < (min) / (b) \ + : (max) / (b) < (a))) + +/* Return 1 if A / B would overflow in [MIN,MAX] arithmetic. + See above for restrictions. Do not check for division by zero. */ +#define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max) \ + ((min) < 0 && (b) == -1 && (a) < - (max)) + +/* Return 1 if A % B would overflow in [MIN,MAX] arithmetic. + See above for restrictions. Do not check for division by zero. + Mathematically, % should never overflow, but on x86-like hosts + INT_MIN % -1 traps, and the C standard permits this, so treat this + as an overflow too. */ +#define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max) \ + INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max) + +/* Return 1 if A << B would overflow in [MIN,MAX] arithmetic. + See above for restrictions. Here, MIN and MAX are for A only, and B need + not be of the same type as the other arguments. The C standard says that + behavior is undefined for shifts unless 0 <= B < wordwidth, and that when + A is negative then A << B has undefined behavior and A >> B has + implementation-defined behavior, but do not check these other + restrictions. */ +#define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max) \ + ((a) < 0 \ + ? (a) < (min) >> (b) \ + : (max) >> (b) < (a)) + + +/* The _GL*_OVERFLOW macros have the same restrictions as the + *_RANGE_OVERFLOW macros, except that they do not assume that operands + (e.g., A and B) have the same type as MIN and MAX. Instead, they assume + that the result (e.g., A + B) has that type. */ +#define _GL_ADD_OVERFLOW(a, b, min, max) \ + ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ + : (a) < 0 ? (b) <= (a) + (b) \ + : (b) < 0 ? (a) <= (a) + (b) \ + : (a) + (b) < (b)) +#define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ + ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ + : (a) < 0 ? 1 \ + : (b) < 0 ? (a) - (b) <= (a) \ + : (a) < (b)) +#define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ + (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ + || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) +#define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ + ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ + : (a) < 0 ? (b) <= (a) + (b) - 1 \ + : (b) < 0 && (a) + (b) <= (a)) +#define _GL_REMAINDER_OVERFLOW(a, b, min, max) \ + ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ + : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \ + : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max)) + +/* Return a nonzero value if A is a mathematical multiple of B, where + A is unsigned, B is negative, and MAX is the maximum value of A's + type. A's type must be the same as (A % B)'s type. Normally (A % + -B == 0) suffices, but things get tricky if -B would overflow. */ +#define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) \ + (((b) < -_GL_SIGNED_INT_MAXIMUM (b) \ + ? (_GL_SIGNED_INT_MAXIMUM (b) == (max) \ + ? (a) \ + : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1)) \ + : (a) % - (b)) \ + == 0) + + +/* Integer overflow checks. + + The INT__OVERFLOW macros return 1 if the corresponding C operators + might not yield numerically correct answers due to arithmetic overflow. + They work correctly on all known practical hosts, and do not rely + on undefined behavior due to signed arithmetic overflow. + + Example usage: + + long int i = ...; + long int j = ...; + if (INT_MULTIPLY_OVERFLOW (i, j)) + printf ("multiply would overflow"); + else + printf ("product is %ld", i * j); + + These macros do not check for all possible numerical problems or + undefined or unspecified behavior: they do not check for division + by zero, for bad shift counts, or for shifting negative numbers. + + These macros may evaluate their arguments zero or multiple times, so the + arguments should not have side effects. + + These macros are tuned for their last argument being a constant. + + Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, + A % B, and A << B would overflow, respectively. */ + +#define INT_ADD_OVERFLOW(a, b) \ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) +#define INT_SUBTRACT_OVERFLOW(a, b) \ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) +#define INT_NEGATE_OVERFLOW(a) \ + INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) +#define INT_MULTIPLY_OVERFLOW(a, b) \ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) +#define INT_DIVIDE_OVERFLOW(a, b) \ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW) +#define INT_REMAINDER_OVERFLOW(a, b) \ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW) +#define INT_LEFT_SHIFT_OVERFLOW(a, b) \ + INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \ + _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) + +/* Return 1 if the expression A B would overflow, + where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test, + assuming MIN and MAX are the minimum and maximum for the result type. + Arguments should be free of side effects. */ +#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \ + op_result_overflow (a, b, \ + _GL_INT_MINIMUM (0 * (b) + (a)), \ + _GL_INT_MAXIMUM (0 * (b) + (a))) + +#endif /* _GL_INTPROPS_H */ diff --git a/gl/lib/inttypes.in.h b/gl/lib/inttypes.in.h new file mode 100644 index 0000000..4b2a13b --- /dev/null +++ b/gl/lib/inttypes.in.h @@ -0,0 +1,1140 @@ +/* Copyright (C) 2006-2014 Free Software Foundation, Inc. + Written by Paul Eggert, Bruno Haible, Derek Price. + This file is part of gnulib. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* + * ISO C 99 for platforms that lack it. + * + */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* Include the original if it exists, and if this file + has not been included yet or if this file includes gnulib stdint.h + which in turn includes this file. + The include_next requires a split double-inclusion guard. */ +#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +# if @HAVE_INTTYPES_H@ + + /* Some pre-C++11 implementations need this. */ +# if defined __cplusplus && ! defined __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS 1 +# endif + +# @INCLUDE_NEXT@ @NEXT_INTTYPES_H@ +# endif +#endif + +#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +#define INTTYPES_H + +/* Include or the gnulib replacement. + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif +/* Get CHAR_BIT. */ +#include + +#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) +# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* 7.8.1 Macros for format specifiers */ + +#if defined _TNS_R_TARGET + /* Tandem NonStop R series and compatible platforms released before + July 2005 support %Ld but not %lld. */ +# define _LONG_LONG_FORMAT_PREFIX "L" +#else +# define _LONG_LONG_FORMAT_PREFIX "ll" +#endif + +#if !defined PRId8 || @PRI_MACROS_BROKEN@ +# undef PRId8 +# ifdef INT8_MAX +# define PRId8 "d" +# endif +#endif +#if !defined PRIi8 || @PRI_MACROS_BROKEN@ +# undef PRIi8 +# ifdef INT8_MAX +# define PRIi8 "i" +# endif +#endif +#if !defined PRIo8 || @PRI_MACROS_BROKEN@ +# undef PRIo8 +# ifdef UINT8_MAX +# define PRIo8 "o" +# endif +#endif +#if !defined PRIu8 || @PRI_MACROS_BROKEN@ +# undef PRIu8 +# ifdef UINT8_MAX +# define PRIu8 "u" +# endif +#endif +#if !defined PRIx8 || @PRI_MACROS_BROKEN@ +# undef PRIx8 +# ifdef UINT8_MAX +# define PRIx8 "x" +# endif +#endif +#if !defined PRIX8 || @PRI_MACROS_BROKEN@ +# undef PRIX8 +# ifdef UINT8_MAX +# define PRIX8 "X" +# endif +#endif +#if !defined PRId16 || @PRI_MACROS_BROKEN@ +# undef PRId16 +# ifdef INT16_MAX +# define PRId16 "d" +# endif +#endif +#if !defined PRIi16 || @PRI_MACROS_BROKEN@ +# undef PRIi16 +# ifdef INT16_MAX +# define PRIi16 "i" +# endif +#endif +#if !defined PRIo16 || @PRI_MACROS_BROKEN@ +# undef PRIo16 +# ifdef UINT16_MAX +# define PRIo16 "o" +# endif +#endif +#if !defined PRIu16 || @PRI_MACROS_BROKEN@ +# undef PRIu16 +# ifdef UINT16_MAX +# define PRIu16 "u" +# endif +#endif +#if !defined PRIx16 || @PRI_MACROS_BROKEN@ +# undef PRIx16 +# ifdef UINT16_MAX +# define PRIx16 "x" +# endif +#endif +#if !defined PRIX16 || @PRI_MACROS_BROKEN@ +# undef PRIX16 +# ifdef UINT16_MAX +# define PRIX16 "X" +# endif +#endif +#if !defined PRId32 || @PRI_MACROS_BROKEN@ +# undef PRId32 +# ifdef INT32_MAX +# define PRId32 "d" +# endif +#endif +#if !defined PRIi32 || @PRI_MACROS_BROKEN@ +# undef PRIi32 +# ifdef INT32_MAX +# define PRIi32 "i" +# endif +#endif +#if !defined PRIo32 || @PRI_MACROS_BROKEN@ +# undef PRIo32 +# ifdef UINT32_MAX +# define PRIo32 "o" +# endif +#endif +#if !defined PRIu32 || @PRI_MACROS_BROKEN@ +# undef PRIu32 +# ifdef UINT32_MAX +# define PRIu32 "u" +# endif +#endif +#if !defined PRIx32 || @PRI_MACROS_BROKEN@ +# undef PRIx32 +# ifdef UINT32_MAX +# define PRIx32 "x" +# endif +#endif +#if !defined PRIX32 || @PRI_MACROS_BROKEN@ +# undef PRIX32 +# ifdef UINT32_MAX +# define PRIX32 "X" +# endif +#endif +#ifdef INT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) +# define _PRI64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRI64_PREFIX "I64" +# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRId64 || @PRI_MACROS_BROKEN@ +# undef PRId64 +# define PRId64 _PRI64_PREFIX "d" +# endif +# if !defined PRIi64 || @PRI_MACROS_BROKEN@ +# undef PRIi64 +# define PRIi64 _PRI64_PREFIX "i" +# endif +#endif +#ifdef UINT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) +# define _PRIu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _PRIu64_PREFIX "I64" +# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined PRIo64 || @PRI_MACROS_BROKEN@ +# undef PRIo64 +# define PRIo64 _PRIu64_PREFIX "o" +# endif +# if !defined PRIu64 || @PRI_MACROS_BROKEN@ +# undef PRIu64 +# define PRIu64 _PRIu64_PREFIX "u" +# endif +# if !defined PRIx64 || @PRI_MACROS_BROKEN@ +# undef PRIx64 +# define PRIx64 _PRIu64_PREFIX "x" +# endif +# if !defined PRIX64 || @PRI_MACROS_BROKEN@ +# undef PRIX64 +# define PRIX64 _PRIu64_PREFIX "X" +# endif +#endif + +#if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST8 +# define PRIdLEAST8 "d" +#endif +#if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST8 +# define PRIiLEAST8 "i" +#endif +#if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST8 +# define PRIoLEAST8 "o" +#endif +#if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST8 +# define PRIuLEAST8 "u" +#endif +#if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST8 +# define PRIxLEAST8 "x" +#endif +#if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST8 +# define PRIXLEAST8 "X" +#endif +#if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST16 +# define PRIdLEAST16 "d" +#endif +#if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST16 +# define PRIiLEAST16 "i" +#endif +#if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST16 +# define PRIoLEAST16 "o" +#endif +#if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST16 +# define PRIuLEAST16 "u" +#endif +#if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST16 +# define PRIxLEAST16 "x" +#endif +#if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST16 +# define PRIXLEAST16 "X" +#endif +#if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST32 +# define PRIdLEAST32 "d" +#endif +#if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST32 +# define PRIiLEAST32 "i" +#endif +#if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST32 +# define PRIoLEAST32 "o" +#endif +#if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST32 +# define PRIuLEAST32 "u" +#endif +#if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST32 +# define PRIxLEAST32 "x" +#endif +#if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST32 +# define PRIXLEAST32 "X" +#endif +#ifdef INT64_MAX +# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIdLEAST64 +# define PRIdLEAST64 PRId64 +# endif +# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIiLEAST64 +# define PRIiLEAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIoLEAST64 +# define PRIoLEAST64 PRIo64 +# endif +# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIuLEAST64 +# define PRIuLEAST64 PRIu64 +# endif +# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIxLEAST64 +# define PRIxLEAST64 PRIx64 +# endif +# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@ +# undef PRIXLEAST64 +# define PRIXLEAST64 PRIX64 +# endif +#endif + +#if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIdFAST8 PRId64 +# else +# define PRIdFAST8 "d" +# endif +#endif +#if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define PRIiFAST8 PRIi64 +# else +# define PRIiFAST8 "i" +# endif +#endif +#if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIoFAST8 PRIo64 +# else +# define PRIoFAST8 "o" +# endif +#endif +#if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIuFAST8 PRIu64 +# else +# define PRIuFAST8 "u" +# endif +#endif +#if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIxFAST8 PRIx64 +# else +# define PRIxFAST8 "x" +# endif +#endif +#if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define PRIXFAST8 PRIX64 +# else +# define PRIXFAST8 "X" +# endif +#endif +#if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIdFAST16 PRId64 +# else +# define PRIdFAST16 "d" +# endif +#endif +#if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define PRIiFAST16 PRIi64 +# else +# define PRIiFAST16 "i" +# endif +#endif +#if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIoFAST16 PRIo64 +# else +# define PRIoFAST16 "o" +# endif +#endif +#if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIuFAST16 PRIu64 +# else +# define PRIuFAST16 "u" +# endif +#endif +#if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIxFAST16 PRIx64 +# else +# define PRIxFAST16 "x" +# endif +#endif +#if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define PRIXFAST16 PRIX64 +# else +# define PRIXFAST16 "X" +# endif +#endif +#if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIdFAST32 PRId64 +# else +# define PRIdFAST32 "d" +# endif +#endif +#if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define PRIiFAST32 PRIi64 +# else +# define PRIiFAST32 "i" +# endif +#endif +#if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIoFAST32 PRIo64 +# else +# define PRIoFAST32 "o" +# endif +#endif +#if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIuFAST32 PRIu64 +# else +# define PRIuFAST32 "u" +# endif +#endif +#if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIxFAST32 PRIx64 +# else +# define PRIxFAST32 "x" +# endif +#endif +#if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define PRIXFAST32 PRIX64 +# else +# define PRIXFAST32 "X" +# endif +#endif +#ifdef INT64_MAX +# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIdFAST64 +# define PRIdFAST64 PRId64 +# endif +# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIiFAST64 +# define PRIiFAST64 PRIi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIoFAST64 +# define PRIoFAST64 PRIo64 +# endif +# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIuFAST64 +# define PRIuFAST64 PRIu64 +# endif +# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIxFAST64 +# define PRIxFAST64 PRIx64 +# endif +# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@ +# undef PRIXFAST64 +# define PRIXFAST64 PRIX64 +# endif +#endif + +#if !defined PRIdMAX || @PRI_MACROS_BROKEN@ +# undef PRIdMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define PRIdMAX PRId64 +# else +# define PRIdMAX "ld" +# endif +#endif +#if !defined PRIiMAX || @PRI_MACROS_BROKEN@ +# undef PRIiMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define PRIiMAX PRIi64 +# else +# define PRIiMAX "li" +# endif +#endif +#if !defined PRIoMAX || @PRI_MACROS_BROKEN@ +# undef PRIoMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIoMAX PRIo64 +# else +# define PRIoMAX "lo" +# endif +#endif +#if !defined PRIuMAX || @PRI_MACROS_BROKEN@ +# undef PRIuMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIuMAX PRIu64 +# else +# define PRIuMAX "lu" +# endif +#endif +#if !defined PRIxMAX || @PRI_MACROS_BROKEN@ +# undef PRIxMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIxMAX PRIx64 +# else +# define PRIxMAX "lx" +# endif +#endif +#if !defined PRIXMAX || @PRI_MACROS_BROKEN@ +# undef PRIXMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define PRIXMAX PRIX64 +# else +# define PRIXMAX "lX" +# endif +#endif + +#if !defined PRIdPTR || @PRI_MACROS_BROKEN@ +# undef PRIdPTR +# ifdef INTPTR_MAX +# define PRIdPTR @PRIPTR_PREFIX@ "d" +# endif +#endif +#if !defined PRIiPTR || @PRI_MACROS_BROKEN@ +# undef PRIiPTR +# ifdef INTPTR_MAX +# define PRIiPTR @PRIPTR_PREFIX@ "i" +# endif +#endif +#if !defined PRIoPTR || @PRI_MACROS_BROKEN@ +# undef PRIoPTR +# ifdef UINTPTR_MAX +# define PRIoPTR @PRIPTR_PREFIX@ "o" +# endif +#endif +#if !defined PRIuPTR || @PRI_MACROS_BROKEN@ +# undef PRIuPTR +# ifdef UINTPTR_MAX +# define PRIuPTR @PRIPTR_PREFIX@ "u" +# endif +#endif +#if !defined PRIxPTR || @PRI_MACROS_BROKEN@ +# undef PRIxPTR +# ifdef UINTPTR_MAX +# define PRIxPTR @PRIPTR_PREFIX@ "x" +# endif +#endif +#if !defined PRIXPTR || @PRI_MACROS_BROKEN@ +# undef PRIXPTR +# ifdef UINTPTR_MAX +# define PRIXPTR @PRIPTR_PREFIX@ "X" +# endif +#endif + +#if !defined SCNd8 || @PRI_MACROS_BROKEN@ +# undef SCNd8 +# ifdef INT8_MAX +# define SCNd8 "hhd" +# endif +#endif +#if !defined SCNi8 || @PRI_MACROS_BROKEN@ +# undef SCNi8 +# ifdef INT8_MAX +# define SCNi8 "hhi" +# endif +#endif +#if !defined SCNo8 || @PRI_MACROS_BROKEN@ +# undef SCNo8 +# ifdef UINT8_MAX +# define SCNo8 "hho" +# endif +#endif +#if !defined SCNu8 || @PRI_MACROS_BROKEN@ +# undef SCNu8 +# ifdef UINT8_MAX +# define SCNu8 "hhu" +# endif +#endif +#if !defined SCNx8 || @PRI_MACROS_BROKEN@ +# undef SCNx8 +# ifdef UINT8_MAX +# define SCNx8 "hhx" +# endif +#endif +#if !defined SCNd16 || @PRI_MACROS_BROKEN@ +# undef SCNd16 +# ifdef INT16_MAX +# define SCNd16 "hd" +# endif +#endif +#if !defined SCNi16 || @PRI_MACROS_BROKEN@ +# undef SCNi16 +# ifdef INT16_MAX +# define SCNi16 "hi" +# endif +#endif +#if !defined SCNo16 || @PRI_MACROS_BROKEN@ +# undef SCNo16 +# ifdef UINT16_MAX +# define SCNo16 "ho" +# endif +#endif +#if !defined SCNu16 || @PRI_MACROS_BROKEN@ +# undef SCNu16 +# ifdef UINT16_MAX +# define SCNu16 "hu" +# endif +#endif +#if !defined SCNx16 || @PRI_MACROS_BROKEN@ +# undef SCNx16 +# ifdef UINT16_MAX +# define SCNx16 "hx" +# endif +#endif +#if !defined SCNd32 || @PRI_MACROS_BROKEN@ +# undef SCNd32 +# ifdef INT32_MAX +# define SCNd32 "d" +# endif +#endif +#if !defined SCNi32 || @PRI_MACROS_BROKEN@ +# undef SCNi32 +# ifdef INT32_MAX +# define SCNi32 "i" +# endif +#endif +#if !defined SCNo32 || @PRI_MACROS_BROKEN@ +# undef SCNo32 +# ifdef UINT32_MAX +# define SCNo32 "o" +# endif +#endif +#if !defined SCNu32 || @PRI_MACROS_BROKEN@ +# undef SCNu32 +# ifdef UINT32_MAX +# define SCNu32 "u" +# endif +#endif +#if !defined SCNx32 || @PRI_MACROS_BROKEN@ +# undef SCNx32 +# ifdef UINT32_MAX +# define SCNx32 "x" +# endif +#endif +#ifdef INT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) +# define _SCN64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCN64_PREFIX "I64" +# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNd64 || @PRI_MACROS_BROKEN@ +# undef SCNd64 +# define SCNd64 _SCN64_PREFIX "d" +# endif +# if !defined SCNi64 || @PRI_MACROS_BROKEN@ +# undef SCNi64 +# define SCNi64 _SCN64_PREFIX "i" +# endif +#endif +#ifdef UINT64_MAX +# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) +# define _SCNu64_PREFIX "l" +# elif defined _MSC_VER || defined __MINGW32__ +# define _SCNu64_PREFIX "I64" +# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX +# endif +# if !defined SCNo64 || @PRI_MACROS_BROKEN@ +# undef SCNo64 +# define SCNo64 _SCNu64_PREFIX "o" +# endif +# if !defined SCNu64 || @PRI_MACROS_BROKEN@ +# undef SCNu64 +# define SCNu64 _SCNu64_PREFIX "u" +# endif +# if !defined SCNx64 || @PRI_MACROS_BROKEN@ +# undef SCNx64 +# define SCNx64 _SCNu64_PREFIX "x" +# endif +#endif + +#if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST8 +# define SCNdLEAST8 "hhd" +#endif +#if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST8 +# define SCNiLEAST8 "hhi" +#endif +#if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST8 +# define SCNoLEAST8 "hho" +#endif +#if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST8 +# define SCNuLEAST8 "hhu" +#endif +#if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST8 +# define SCNxLEAST8 "hhx" +#endif +#if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST16 +# define SCNdLEAST16 "hd" +#endif +#if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST16 +# define SCNiLEAST16 "hi" +#endif +#if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST16 +# define SCNoLEAST16 "ho" +#endif +#if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST16 +# define SCNuLEAST16 "hu" +#endif +#if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST16 +# define SCNxLEAST16 "hx" +#endif +#if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST32 +# define SCNdLEAST32 "d" +#endif +#if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST32 +# define SCNiLEAST32 "i" +#endif +#if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST32 +# define SCNoLEAST32 "o" +#endif +#if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST32 +# define SCNuLEAST32 "u" +#endif +#if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST32 +# define SCNxLEAST32 "x" +#endif +#ifdef INT64_MAX +# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNdLEAST64 +# define SCNdLEAST64 SCNd64 +# endif +# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNiLEAST64 +# define SCNiLEAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNoLEAST64 +# define SCNoLEAST64 SCNo64 +# endif +# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNuLEAST64 +# define SCNuLEAST64 SCNu64 +# endif +# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@ +# undef SCNxLEAST64 +# define SCNxLEAST64 SCNx64 +# endif +#endif + +#if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNdFAST8 SCNd64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNdFAST8 "hd" +# elif INT_FAST8_MAX == 0x7f +# define SCNdFAST8 "hhd" +# else +# define SCNdFAST8 "d" +# endif +#endif +#if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST8 +# if INT_FAST8_MAX > INT32_MAX +# define SCNiFAST8 SCNi64 +# elif INT_FAST8_MAX == 0x7fff +# define SCNiFAST8 "hi" +# elif INT_FAST8_MAX == 0x7f +# define SCNiFAST8 "hhi" +# else +# define SCNiFAST8 "i" +# endif +#endif +#if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNoFAST8 SCNo64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNoFAST8 "ho" +# elif UINT_FAST8_MAX == 0xff +# define SCNoFAST8 "hho" +# else +# define SCNoFAST8 "o" +# endif +#endif +#if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNuFAST8 SCNu64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNuFAST8 "hu" +# elif UINT_FAST8_MAX == 0xff +# define SCNuFAST8 "hhu" +# else +# define SCNuFAST8 "u" +# endif +#endif +#if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST8 +# if UINT_FAST8_MAX > UINT32_MAX +# define SCNxFAST8 SCNx64 +# elif UINT_FAST8_MAX == 0xffff +# define SCNxFAST8 "hx" +# elif UINT_FAST8_MAX == 0xff +# define SCNxFAST8 "hhx" +# else +# define SCNxFAST8 "x" +# endif +#endif +#if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNdFAST16 SCNd64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNdFAST16 "hd" +# else +# define SCNdFAST16 "d" +# endif +#endif +#if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST16 +# if INT_FAST16_MAX > INT32_MAX +# define SCNiFAST16 SCNi64 +# elif INT_FAST16_MAX == 0x7fff +# define SCNiFAST16 "hi" +# else +# define SCNiFAST16 "i" +# endif +#endif +#if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNoFAST16 SCNo64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNoFAST16 "ho" +# else +# define SCNoFAST16 "o" +# endif +#endif +#if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNuFAST16 SCNu64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNuFAST16 "hu" +# else +# define SCNuFAST16 "u" +# endif +#endif +#if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST16 +# if UINT_FAST16_MAX > UINT32_MAX +# define SCNxFAST16 SCNx64 +# elif UINT_FAST16_MAX == 0xffff +# define SCNxFAST16 "hx" +# else +# define SCNxFAST16 "x" +# endif +#endif +#if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNdFAST32 SCNd64 +# else +# define SCNdFAST32 "d" +# endif +#endif +#if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST32 +# if INT_FAST32_MAX > INT32_MAX +# define SCNiFAST32 SCNi64 +# else +# define SCNiFAST32 "i" +# endif +#endif +#if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNoFAST32 SCNo64 +# else +# define SCNoFAST32 "o" +# endif +#endif +#if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNuFAST32 SCNu64 +# else +# define SCNuFAST32 "u" +# endif +#endif +#if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST32 +# if UINT_FAST32_MAX > UINT32_MAX +# define SCNxFAST32 SCNx64 +# else +# define SCNxFAST32 "x" +# endif +#endif +#ifdef INT64_MAX +# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNdFAST64 +# define SCNdFAST64 SCNd64 +# endif +# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNiFAST64 +# define SCNiFAST64 SCNi64 +# endif +#endif +#ifdef UINT64_MAX +# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNoFAST64 +# define SCNoFAST64 SCNo64 +# endif +# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNuFAST64 +# define SCNuFAST64 SCNu64 +# endif +# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@ +# undef SCNxFAST64 +# define SCNxFAST64 SCNx64 +# endif +#endif + +#if !defined SCNdMAX || @PRI_MACROS_BROKEN@ +# undef SCNdMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define SCNdMAX SCNd64 +# else +# define SCNdMAX "ld" +# endif +#endif +#if !defined SCNiMAX || @PRI_MACROS_BROKEN@ +# undef SCNiMAX +# if @INT32_MAX_LT_INTMAX_MAX@ +# define SCNiMAX SCNi64 +# else +# define SCNiMAX "li" +# endif +#endif +#if !defined SCNoMAX || @PRI_MACROS_BROKEN@ +# undef SCNoMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define SCNoMAX SCNo64 +# else +# define SCNoMAX "lo" +# endif +#endif +#if !defined SCNuMAX || @PRI_MACROS_BROKEN@ +# undef SCNuMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define SCNuMAX SCNu64 +# else +# define SCNuMAX "lu" +# endif +#endif +#if !defined SCNxMAX || @PRI_MACROS_BROKEN@ +# undef SCNxMAX +# if @UINT32_MAX_LT_UINTMAX_MAX@ +# define SCNxMAX SCNx64 +# else +# define SCNxMAX "lx" +# endif +#endif + +#if !defined SCNdPTR || @PRI_MACROS_BROKEN@ +# undef SCNdPTR +# ifdef INTPTR_MAX +# define SCNdPTR @PRIPTR_PREFIX@ "d" +# endif +#endif +#if !defined SCNiPTR || @PRI_MACROS_BROKEN@ +# undef SCNiPTR +# ifdef INTPTR_MAX +# define SCNiPTR @PRIPTR_PREFIX@ "i" +# endif +#endif +#if !defined SCNoPTR || @PRI_MACROS_BROKEN@ +# undef SCNoPTR +# ifdef UINTPTR_MAX +# define SCNoPTR @PRIPTR_PREFIX@ "o" +# endif +#endif +#if !defined SCNuPTR || @PRI_MACROS_BROKEN@ +# undef SCNuPTR +# ifdef UINTPTR_MAX +# define SCNuPTR @PRIPTR_PREFIX@ "u" +# endif +#endif +#if !defined SCNxPTR || @PRI_MACROS_BROKEN@ +# undef SCNxPTR +# ifdef UINTPTR_MAX +# define SCNxPTR @PRIPTR_PREFIX@ "x" +# endif +#endif + +/* 7.8.2 Functions for greatest-width integer types */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if @GNULIB_IMAXABS@ +# if !@HAVE_DECL_IMAXABS@ +extern intmax_t imaxabs (intmax_t); +# endif +#elif defined GNULIB_POSIXCHECK +# undef imaxabs +# if HAVE_RAW_DECL_IMAXABS +_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " + "use gnulib module imaxabs for portability"); +# endif +#endif + +#if @GNULIB_IMAXDIV@ +# if !@HAVE_DECL_IMAXDIV@ +# if !GNULIB_defined_imaxdiv_t +typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; +# define GNULIB_defined_imaxdiv_t 1 +# endif +extern imaxdiv_t imaxdiv (intmax_t, intmax_t); +# endif +#elif defined GNULIB_POSIXCHECK +# undef imaxdiv +# if HAVE_RAW_DECL_IMAXDIV +_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " + "use gnulib module imaxdiv for portability"); +# endif +#endif + +#if @GNULIB_STRTOIMAX@ +# if @REPLACE_STRTOIMAX@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoimax +# define strtoimax rpl_strtoimax +# endif +_GL_FUNCDECL_RPL (strtoimax, intmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int)); +# else +# if !@HAVE_DECL_STRTOIMAX@ +# undef strtoimax +_GL_FUNCDECL_SYS (strtoimax, intmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int)); +# endif +_GL_CXXALIASWARN (strtoimax); +#elif defined GNULIB_POSIXCHECK +# undef strtoimax +# if HAVE_RAW_DECL_STRTOIMAX +_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " + "use gnulib module strtoimax for portability"); +# endif +#endif + +#if @GNULIB_STRTOUMAX@ +# if @REPLACE_STRTOUMAX@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoumax +# define strtoumax rpl_strtoumax +# endif +_GL_FUNCDECL_RPL (strtoumax, uintmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int)); +# else +# if !@HAVE_DECL_STRTOUMAX@ +# undef strtoumax +_GL_FUNCDECL_SYS (strtoumax, uintmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int)); +# endif +_GL_CXXALIASWARN (strtoumax); +#elif defined GNULIB_POSIXCHECK +# undef strtoumax +# if HAVE_RAW_DECL_STRTOUMAX +_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " + "use gnulib module strtoumax for portability"); +# endif +#endif + +/* Don't bother defining or declaring wcstoimax and wcstoumax, since + wide-character functions like this are hardly ever useful. */ + +#ifdef __cplusplus +} +#endif + +#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ diff --git a/gl/lib/isblank.c b/gl/lib/isblank.c new file mode 100644 index 0000000..4e0aed1 --- /dev/null +++ b/gl/lib/isblank.c @@ -0,0 +1,33 @@ +/* Test whether a character is a blank. + + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +int +isblank (int c) +{ + /* On all known platforms, in all predefined locales, isblank(c) is likely + equivalent with (c == ' ' || c == '\t'). Look at the glibc definition + (in glibc/localedata/locales/i18n): The "blank" characters are '\t', ' ', + U+1680, U+180E, U+2000..U+2006, U+2008..U+200A, U+205F, U+3000, and none + except the first two is present in a common 8-bit encoding. Therefore + the substitute for other platforms is not more complicated than this. */ + return (c == ' ' || c == '\t'); +} diff --git a/gl/lib/isfinite.c b/gl/lib/isfinite.c new file mode 100644 index 0000000..e10a63b --- /dev/null +++ b/gl/lib/isfinite.c @@ -0,0 +1,51 @@ +/* Test for finite value (zero, subnormal, or normal, and not infinite or NaN). + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +/* Written by Ben Pfaff , 2007. */ + +#include + +#include "isnanf-nolibm.h" +#include "isnand-nolibm.h" +#include "isnanl-nolibm.h" + +/* The "cc" compiler on HP-UX 11.11, when optimizing, simplifies the test + x - y == 0.0 to x == y, a simplification which is invalid when x and y + are Infinity. Disable this optimization. */ +#if defined __hpux && !defined __GNUC__ +static float zerof; +static double zerod; +static long double zerol; +#else +# define zerof 0.f +# define zerod 0. +# define zerol 0.L +#endif + +int gl_isfinitef (float x) +{ + return !isnanf (x) && x - x == zerof; +} + +int gl_isfinited (double x) +{ + return !isnand (x) && x - x == zerod; +} + +int gl_isfinitel (long double x) +{ + return !isnanl (x) && x - x == zerol; +} diff --git a/gl/lib/isinf.c b/gl/lib/isinf.c new file mode 100644 index 0000000..ba8bd9a --- /dev/null +++ b/gl/lib/isinf.c @@ -0,0 +1,39 @@ +/* Test for positive or negative infinity. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +/* Written by Ben Pfaff , 2008. */ + +#include + +#include + +int +gl_isinff (float x) +{ + return x < -FLT_MAX || x > FLT_MAX; +} + +int +gl_isinfd (double x) +{ + return x < -DBL_MAX || x > DBL_MAX; +} + +int +gl_isinfl (long double x) +{ + return x < -LDBL_MAX || x > LDBL_MAX; +} diff --git a/gl/lib/isnan.c b/gl/lib/isnan.c new file mode 100644 index 0000000..878c180 --- /dev/null +++ b/gl/lib/isnan.c @@ -0,0 +1,189 @@ +/* Test for NaN that does not need libm. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +/* Specification. */ +#ifdef USE_LONG_DOUBLE +/* Specification found in math.h or isnanl-nolibm.h. */ +extern int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; +#elif ! defined USE_FLOAT +/* Specification found in math.h or isnand-nolibm.h. */ +extern int rpl_isnand (double x); +#else /* defined USE_FLOAT */ +/* Specification found in math.h or isnanf-nolibm.h. */ +extern int rpl_isnanf (float x); +#endif + +#include +#include + +#include "float+.h" + +#ifdef USE_LONG_DOUBLE +# define FUNC rpl_isnanl +# define DOUBLE long double +# define MAX_EXP LDBL_MAX_EXP +# define MIN_EXP LDBL_MIN_EXP +# if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT +# define KNOWN_EXPBIT0_LOCATION +# define EXPBIT0_WORD LDBL_EXPBIT0_WORD +# define EXPBIT0_BIT LDBL_EXPBIT0_BIT +# endif +# define SIZE SIZEOF_LDBL +# define L_(literal) literal##L +#elif ! defined USE_FLOAT +# define FUNC rpl_isnand +# define DOUBLE double +# define MAX_EXP DBL_MAX_EXP +# define MIN_EXP DBL_MIN_EXP +# if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT +# define KNOWN_EXPBIT0_LOCATION +# define EXPBIT0_WORD DBL_EXPBIT0_WORD +# define EXPBIT0_BIT DBL_EXPBIT0_BIT +# endif +# define SIZE SIZEOF_DBL +# define L_(literal) literal +#else /* defined USE_FLOAT */ +# define FUNC rpl_isnanf +# define DOUBLE float +# define MAX_EXP FLT_MAX_EXP +# define MIN_EXP FLT_MIN_EXP +# if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT +# define KNOWN_EXPBIT0_LOCATION +# define EXPBIT0_WORD FLT_EXPBIT0_WORD +# define EXPBIT0_BIT FLT_EXPBIT0_BIT +# endif +# define SIZE SIZEOF_FLT +# define L_(literal) literal##f +#endif + +#define EXP_MASK ((MAX_EXP - MIN_EXP) | 7) + +#define NWORDS \ + ((sizeof (DOUBLE) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { DOUBLE value; unsigned int word[NWORDS]; } memory_double; + +/* Most hosts nowadays use IEEE floating point, so they use IEC 60559 + representations, have infinities and NaNs, and do not trap on + exceptions. Define IEEE_FLOATING_POINT if this host is one of the + typical ones. The C11 macro __STDC_IEC_559__ is close to what is + wanted here, but is not quite right because this file does not require + all the features of C11 Annex F (and does not require C11 at all, + for that matter). */ + +#define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ + && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) + +int +FUNC (DOUBLE x) +{ +#if defined KNOWN_EXPBIT0_LOCATION && IEEE_FLOATING_POINT +# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE + /* Special CPU dependent code is needed to treat bit patterns outside the + IEEE 754 specification (such as Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals) as NaNs. + These bit patterns are: + - exponent = 0x0001..0x7FFF, mantissa bit 63 = 0, + - exponent = 0x0000, mantissa bit 63 = 1. + The NaN bit pattern is: + - exponent = 0x7FFF, mantissa >= 0x8000000000000001. */ + memory_double m; + unsigned int exponent; + + m.value = x; + exponent = (m.word[EXPBIT0_WORD] >> EXPBIT0_BIT) & EXP_MASK; +# ifdef WORDS_BIGENDIAN + /* Big endian: EXPBIT0_WORD = 0, EXPBIT0_BIT = 16. */ + if (exponent == 0) + return 1 & (m.word[0] >> 15); + else if (exponent == EXP_MASK) + return (((m.word[0] ^ 0x8000U) << 16) | m.word[1] | (m.word[2] >> 16)) != 0; + else + return 1 & ~(m.word[0] >> 15); +# else + /* Little endian: EXPBIT0_WORD = 2, EXPBIT0_BIT = 0. */ + if (exponent == 0) + return (m.word[1] >> 31); + else if (exponent == EXP_MASK) + return ((m.word[1] ^ 0x80000000U) | m.word[0]) != 0; + else + return (m.word[1] >> 31) ^ 1; +# endif +# else + /* Be careful to not do any floating-point operation on x, such as x == x, + because x may be a signaling NaN. */ +# if defined __SUNPRO_C || defined __ICC || defined _MSC_VER \ + || defined __DECC || defined __TINYC__ \ + || (defined __sgi && !defined __GNUC__) + /* The Sun C 5.0, Intel ICC 10.0, Microsoft Visual C/C++ 9.0, Compaq (ex-DEC) + 6.4, and TinyCC compilers don't recognize the initializers as constant + expressions. The Compaq compiler also fails when constant-folding + 0.0 / 0.0 even when constant-folding is not required. The Microsoft + Visual C/C++ compiler also fails when constant-folding 1.0 / 0.0 even + when constant-folding is not required. The SGI MIPSpro C compiler + complains about "floating-point operation result is out of range". */ + static DOUBLE zero = L_(0.0); + memory_double nan; + DOUBLE plus_inf = L_(1.0) / zero; + DOUBLE minus_inf = -L_(1.0) / zero; + nan.value = zero / zero; +# else + static memory_double nan = { L_(0.0) / L_(0.0) }; + static DOUBLE plus_inf = L_(1.0) / L_(0.0); + static DOUBLE minus_inf = -L_(1.0) / L_(0.0); +# endif + { + memory_double m; + + /* A NaN can be recognized through its exponent. But exclude +Infinity and + -Infinity, which have the same exponent. */ + m.value = x; + if (((m.word[EXPBIT0_WORD] ^ nan.word[EXPBIT0_WORD]) + & (EXP_MASK << EXPBIT0_BIT)) + == 0) + return (memcmp (&m.value, &plus_inf, SIZE) != 0 + && memcmp (&m.value, &minus_inf, SIZE) != 0); + else + return 0; + } +# endif +#else + /* The configuration did not find sufficient information, or does + not use IEEE floating point. Give up about the signaling NaNs; + handle only the quiet NaNs. */ + if (x == x) + { +# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE + /* Detect any special bit patterns that pass ==; see comment above. */ + memory_double m1; + memory_double m2; + + memset (&m1.value, 0, SIZE); + memset (&m2.value, 0, SIZE); + m1.value = x; + m2.value = x + (x ? 0.0L : -0.0L); + if (memcmp (&m1.value, &m2.value, SIZE) != 0) + return 1; +# endif + return 0; + } + else + return 1; +#endif +} diff --git a/gl/lib/isnand-nolibm.h b/gl/lib/isnand-nolibm.h new file mode 100644 index 0000000..cee7eec --- /dev/null +++ b/gl/lib/isnand-nolibm.h @@ -0,0 +1,33 @@ +/* Test for NaN that does not need libm. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if HAVE_ISNAND_IN_LIBC +/* Get declaration of isnan macro. */ +# include +# if __GNUC__ >= 4 + /* GCC 4.0 and newer provides three built-ins for isnan. */ +# undef isnand +# define isnand(x) __builtin_isnan ((double)(x)) +# else +# undef isnand +# define isnand(x) isnan ((double)(x)) +# endif +#else +/* Test whether X is a NaN. */ +# undef isnand +# define isnand rpl_isnand +extern int isnand (double x); +#endif diff --git a/gl/lib/isnand.c b/gl/lib/isnand.c new file mode 100644 index 0000000..318c359 --- /dev/null +++ b/gl/lib/isnand.c @@ -0,0 +1,19 @@ +/* Test for NaN that does not need libm. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2008. */ + +#include "isnan.c" diff --git a/gl/lib/isnanf-nolibm.h b/gl/lib/isnanf-nolibm.h new file mode 100644 index 0000000..41c2ef3 --- /dev/null +++ b/gl/lib/isnanf-nolibm.h @@ -0,0 +1,40 @@ +/* Test for NaN that does not need libm. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if HAVE_ISNANF_IN_LIBC +/* Get declaration of isnan macro or (older) isnanf function. */ +# include +# if __GNUC__ >= 4 + /* GCC 4.0 and newer provides three built-ins for isnan. */ +# undef isnanf +# define isnanf(x) __builtin_isnanf ((float)(x)) +# elif defined isnan +# undef isnanf +# define isnanf(x) isnan ((float)(x)) +# else + /* Get declaration of isnanf(), if not declared in . */ +# if defined __sgi + /* We can't include , because it conflicts with our definition of + isnand. Therefore declare isnanf separately. */ +extern int isnanf (float x); +# endif +# endif +#else +/* Test whether X is a NaN. */ +# undef isnanf +# define isnanf rpl_isnanf +extern int isnanf (float x); +#endif diff --git a/gl/lib/isnanf.c b/gl/lib/isnanf.c new file mode 100644 index 0000000..583a607 --- /dev/null +++ b/gl/lib/isnanf.c @@ -0,0 +1,20 @@ +/* Test for NaN that does not need libm. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#define USE_FLOAT +#include "isnan.c" diff --git a/gl/lib/isnanl-nolibm.h b/gl/lib/isnanl-nolibm.h new file mode 100644 index 0000000..371de00 --- /dev/null +++ b/gl/lib/isnanl-nolibm.h @@ -0,0 +1,33 @@ +/* Test for NaN that does not need libm. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if HAVE_ISNANL_IN_LIBC +/* Get declaration of isnan macro or (older) isnanl function. */ +# include +# if __GNUC__ >= 4 + /* GCC 4.0 and newer provides three built-ins for isnan. */ +# undef isnanl +# define isnanl(x) __builtin_isnanl ((long double)(x)) +# elif defined isnan +# undef isnanl +# define isnanl(x) isnan ((long double)(x)) +# endif +#else +/* Test whether X is a NaN. */ +# undef isnanl +# define isnanl rpl_isnanl +extern int isnanl (long double x); +#endif diff --git a/gl/lib/isnanl.c b/gl/lib/isnanl.c new file mode 100644 index 0000000..4575e4c --- /dev/null +++ b/gl/lib/isnanl.c @@ -0,0 +1,20 @@ +/* Test for NaN that does not need libm. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#define USE_LONG_DOUBLE +#include "isnan.c" diff --git a/gl/lib/iswblank.c b/gl/lib/iswblank.c new file mode 100644 index 0000000..9c1672f --- /dev/null +++ b/gl/lib/iswblank.c @@ -0,0 +1,26 @@ +/* Test wide character for being blank. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#include + +/* Specification. */ +#include + +int +iswblank (wint_t wc) +{ + return wc == ' ' || wc == '\t'; +} diff --git a/gl/lib/itold.c b/gl/lib/itold.c new file mode 100644 index 0000000..937f480 --- /dev/null +++ b/gl/lib/itold.c @@ -0,0 +1,28 @@ +/* Replacement for 'int' to 'long double' conversion routine. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +void +_Qp_itoq (long double *result, int a) +{ + /* Convert from 'int' to 'double', then from 'double' to 'long double'. */ + *result = (double) a; +} diff --git a/gl/lib/langinfo.in.h b/gl/lib/langinfo.in.h new file mode 100644 index 0000000..6f0e093 --- /dev/null +++ b/gl/lib/langinfo.in.h @@ -0,0 +1,176 @@ +/* Substitute for and wrapper around . + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* + * POSIX for platforms that lack it or have an incomplete one. + * + */ + +#ifndef _@GUARD_PREFIX@_LANGINFO_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_LANGINFO_H@ +# @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ +#endif + +#ifndef _@GUARD_PREFIX@_LANGINFO_H +#define _@GUARD_PREFIX@_LANGINFO_H + + +#if !@HAVE_LANGINFO_H@ + +/* A platform that lacks . */ + +/* Assume that it also lacks and the nl_item type. */ +# if !GNULIB_defined_nl_item +typedef int nl_item; +# define GNULIB_defined_nl_item 1 +# endif + +/* nl_langinfo items of the LC_CTYPE category */ +# define CODESET 10000 +/* nl_langinfo items of the LC_NUMERIC category */ +# define RADIXCHAR 10001 +# define THOUSEP 10002 +/* nl_langinfo items of the LC_TIME category */ +# define D_T_FMT 10003 +# define D_FMT 10004 +# define T_FMT 10005 +# define T_FMT_AMPM 10006 +# define AM_STR 10007 +# define PM_STR 10008 +# define DAY_1 10009 +# define DAY_2 (DAY_1 + 1) +# define DAY_3 (DAY_1 + 2) +# define DAY_4 (DAY_1 + 3) +# define DAY_5 (DAY_1 + 4) +# define DAY_6 (DAY_1 + 5) +# define DAY_7 (DAY_1 + 6) +# define ABDAY_1 10016 +# define ABDAY_2 (ABDAY_1 + 1) +# define ABDAY_3 (ABDAY_1 + 2) +# define ABDAY_4 (ABDAY_1 + 3) +# define ABDAY_5 (ABDAY_1 + 4) +# define ABDAY_6 (ABDAY_1 + 5) +# define ABDAY_7 (ABDAY_1 + 6) +# define MON_1 10023 +# define MON_2 (MON_1 + 1) +# define MON_3 (MON_1 + 2) +# define MON_4 (MON_1 + 3) +# define MON_5 (MON_1 + 4) +# define MON_6 (MON_1 + 5) +# define MON_7 (MON_1 + 6) +# define MON_8 (MON_1 + 7) +# define MON_9 (MON_1 + 8) +# define MON_10 (MON_1 + 9) +# define MON_11 (MON_1 + 10) +# define MON_12 (MON_1 + 11) +# define ABMON_1 10035 +# define ABMON_2 (ABMON_1 + 1) +# define ABMON_3 (ABMON_1 + 2) +# define ABMON_4 (ABMON_1 + 3) +# define ABMON_5 (ABMON_1 + 4) +# define ABMON_6 (ABMON_1 + 5) +# define ABMON_7 (ABMON_1 + 6) +# define ABMON_8 (ABMON_1 + 7) +# define ABMON_9 (ABMON_1 + 8) +# define ABMON_10 (ABMON_1 + 9) +# define ABMON_11 (ABMON_1 + 10) +# define ABMON_12 (ABMON_1 + 11) +# define ERA 10047 +# define ERA_D_FMT 10048 +# define ERA_D_T_FMT 10049 +# define ERA_T_FMT 10050 +# define ALT_DIGITS 10051 +/* nl_langinfo items of the LC_MONETARY category */ +# define CRNCYSTR 10052 +/* nl_langinfo items of the LC_MESSAGES category */ +# define YESEXPR 10053 +# define NOEXPR 10054 + +#else + +/* A platform that has . */ + +# if !@HAVE_LANGINFO_CODESET@ +# define CODESET 10000 +# define GNULIB_defined_CODESET 1 +# endif + +# if !@HAVE_LANGINFO_T_FMT_AMPM@ +# define T_FMT_AMPM 10006 +# define GNULIB_defined_T_FMT_AMPM 1 +# endif + +# if !@HAVE_LANGINFO_ERA@ +# define ERA 10047 +# define ERA_D_FMT 10048 +# define ERA_D_T_FMT 10049 +# define ERA_T_FMT 10050 +# define ALT_DIGITS 10051 +# define GNULIB_defined_ERA 1 +# endif + +# if !@HAVE_LANGINFO_YESEXPR@ +# define YESEXPR 10053 +# define NOEXPR 10054 +# define GNULIB_defined_YESEXPR 1 +# endif + +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* Declare overridden functions. */ + + +/* Return a piece of locale dependent information. + Note: The difference between nl_langinfo (CODESET) and locale_charset () + is that the latter normalizes the encoding names to GNU conventions. */ + +#if @GNULIB_NL_LANGINFO@ +# if @REPLACE_NL_LANGINFO@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef nl_langinfo +# define nl_langinfo rpl_nl_langinfo +# endif +_GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item)); +_GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item)); +# else +# if !@HAVE_NL_LANGINFO@ +_GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); +# endif +_GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); +# endif +_GL_CXXALIASWARN (nl_langinfo); +#elif defined GNULIB_POSIXCHECK +# undef nl_langinfo +# if HAVE_RAW_DECL_NL_LANGINFO +_GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " + "use gnulib module nl_langinfo for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_LANGINFO_H */ +#endif /* _@GUARD_PREFIX@_LANGINFO_H */ diff --git a/gl/lib/localcharset.c b/gl/lib/localcharset.c new file mode 100644 index 0000000..a928867 --- /dev/null +++ b/gl/lib/localcharset.c @@ -0,0 +1,558 @@ +/* Determine a canonical name for the current locale's character encoding. + + Copyright (C) 2000-2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +/* Written by Bruno Haible . */ + +#include + +/* Specification. */ +#include "localcharset.h" + +#include +#include +#include +#include +#include + +#if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET +# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ +#endif + +#if defined _WIN32 || defined __WIN32__ +# define WINDOWS_NATIVE +#endif + +#if defined __EMX__ +/* Assume EMX program runs on OS/2, even if compiled under DOS. */ +# ifndef OS2 +# define OS2 +# endif +#endif + +#if !defined WINDOWS_NATIVE +# include +# if HAVE_LANGINFO_CODESET +# include +# else +# if 0 /* see comment below */ +# include +# endif +# endif +# ifdef __CYGWIN__ +# define WIN32_LEAN_AND_MEAN +# include +# endif +#elif defined WINDOWS_NATIVE +# define WIN32_LEAN_AND_MEAN +# include +#endif +#if defined OS2 +# define INCL_DOS +# include +#endif + +/* For MB_CUR_MAX_L */ +#if defined DARWIN7 +# include +#endif + +#if ENABLE_RELOCATABLE +# include "relocatable.h" +#else +# define relocate(pathname) (pathname) +#endif + +/* Get LIBDIR. */ +#ifndef LIBDIR +# include "configmake.h" +#endif + +/* Define O_NOFOLLOW to 0 on platforms where it does not exist. */ +#ifndef O_NOFOLLOW +# define O_NOFOLLOW 0 +#endif + +#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ + /* Native Windows, Cygwin, OS/2, DOS */ +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +#endif + +#ifndef DIRECTORY_SEPARATOR +# define DIRECTORY_SEPARATOR '/' +#endif + +#ifndef ISSLASH +# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) +#endif + +#if HAVE_DECL_GETC_UNLOCKED +# undef getc +# define getc getc_unlocked +#endif + +/* The following static variable is declared 'volatile' to avoid a + possible multithread problem in the function get_charset_aliases. If we + are running in a threaded environment, and if two threads initialize + 'charset_aliases' simultaneously, both will produce the same value, + and everything will be ok if the two assignments to 'charset_aliases' + are atomic. But I don't know what will happen if the two assignments mix. */ +#if __STDC__ != 1 +# define volatile /* empty */ +#endif +/* Pointer to the contents of the charset.alias file, if it has already been + read, else NULL. Its format is: + ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ +static const char * volatile charset_aliases; + +/* Return a pointer to the contents of the charset.alias file. */ +static const char * +get_charset_aliases (void) +{ + const char *cp; + + cp = charset_aliases; + if (cp == NULL) + { +#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__) + const char *dir; + const char *base = "charset.alias"; + char *file_name; + + /* Make it possible to override the charset.alias location. This is + necessary for running the testsuite before "make install". */ + dir = getenv ("CHARSETALIASDIR"); + if (dir == NULL || dir[0] == '\0') + dir = relocate (LIBDIR); + + /* Concatenate dir and base into freshly allocated file_name. */ + { + size_t dir_len = strlen (dir); + size_t base_len = strlen (base); + int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); + file_name = (char *) malloc (dir_len + add_slash + base_len + 1); + if (file_name != NULL) + { + memcpy (file_name, dir, dir_len); + if (add_slash) + file_name[dir_len] = DIRECTORY_SEPARATOR; + memcpy (file_name + dir_len + add_slash, base, base_len + 1); + } + } + + if (file_name == NULL) + /* Out of memory. Treat the file as empty. */ + cp = ""; + else + { + int fd; + + /* Open the file. Reject symbolic links on platforms that support + O_NOFOLLOW. This is a security feature. Without it, an attacker + could retrieve parts of the contents (namely, the tail of the + first line that starts with "* ") of an arbitrary file by placing + a symbolic link to that file under the name "charset.alias" in + some writable directory and defining the environment variable + CHARSETALIASDIR to point to that directory. */ + fd = open (file_name, + O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0)); + if (fd < 0) + /* File not found. Treat it as empty. */ + cp = ""; + else + { + FILE *fp; + + fp = fdopen (fd, "r"); + if (fp == NULL) + { + /* Out of memory. Treat the file as empty. */ + close (fd); + cp = ""; + } + else + { + /* Parse the file's contents. */ + char *res_ptr = NULL; + size_t res_size = 0; + + for (;;) + { + int c; + char buf1[50+1]; + char buf2[50+1]; + size_t l1, l2; + char *old_res_ptr; + + c = getc (fp); + if (c == EOF) + break; + if (c == '\n' || c == ' ' || c == '\t') + continue; + if (c == '#') + { + /* Skip comment, to end of line. */ + do + c = getc (fp); + while (!(c == EOF || c == '\n')); + if (c == EOF) + break; + continue; + } + ungetc (c, fp); + if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) + break; + l1 = strlen (buf1); + l2 = strlen (buf2); + old_res_ptr = res_ptr; + if (res_size == 0) + { + res_size = l1 + 1 + l2 + 1; + res_ptr = (char *) malloc (res_size + 1); + } + else + { + res_size += l1 + 1 + l2 + 1; + res_ptr = (char *) realloc (res_ptr, res_size + 1); + } + if (res_ptr == NULL) + { + /* Out of memory. */ + res_size = 0; + free (old_res_ptr); + break; + } + strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); + strcpy (res_ptr + res_size - (l2 + 1), buf2); + } + fclose (fp); + if (res_size == 0) + cp = ""; + else + { + *(res_ptr + res_size) = '\0'; + cp = res_ptr; + } + } + } + + free (file_name); + } + +#else + +# if defined DARWIN7 + /* To avoid the trouble of installing a file that is shared by many + GNU packages -- many packaging systems have problems with this --, + simply inline the aliases here. */ + cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" + "ISO8859-2" "\0" "ISO-8859-2" "\0" + "ISO8859-4" "\0" "ISO-8859-4" "\0" + "ISO8859-5" "\0" "ISO-8859-5" "\0" + "ISO8859-7" "\0" "ISO-8859-7" "\0" + "ISO8859-9" "\0" "ISO-8859-9" "\0" + "ISO8859-13" "\0" "ISO-8859-13" "\0" + "ISO8859-15" "\0" "ISO-8859-15" "\0" + "KOI8-R" "\0" "KOI8-R" "\0" + "KOI8-U" "\0" "KOI8-U" "\0" + "CP866" "\0" "CP866" "\0" + "CP949" "\0" "CP949" "\0" + "CP1131" "\0" "CP1131" "\0" + "CP1251" "\0" "CP1251" "\0" + "eucCN" "\0" "GB2312" "\0" + "GB2312" "\0" "GB2312" "\0" + "eucJP" "\0" "EUC-JP" "\0" + "eucKR" "\0" "EUC-KR" "\0" + "Big5" "\0" "BIG5" "\0" + "Big5HKSCS" "\0" "BIG5-HKSCS" "\0" + "GBK" "\0" "GBK" "\0" + "GB18030" "\0" "GB18030" "\0" + "SJIS" "\0" "SHIFT_JIS" "\0" + "ARMSCII-8" "\0" "ARMSCII-8" "\0" + "PT154" "\0" "PT154" "\0" + /*"ISCII-DEV" "\0" "?" "\0"*/ + "*" "\0" "UTF-8" "\0"; +# endif + +# if defined VMS + /* To avoid the troubles of an extra file charset.alias_vms in the + sources of many GNU packages, simply inline the aliases here. */ + /* The list of encodings is taken from the OpenVMS 7.3-1 documentation + "Compaq C Run-Time Library Reference Manual for OpenVMS systems" + section 10.7 "Handling Different Character Sets". */ + cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" + "ISO8859-2" "\0" "ISO-8859-2" "\0" + "ISO8859-5" "\0" "ISO-8859-5" "\0" + "ISO8859-7" "\0" "ISO-8859-7" "\0" + "ISO8859-8" "\0" "ISO-8859-8" "\0" + "ISO8859-9" "\0" "ISO-8859-9" "\0" + /* Japanese */ + "eucJP" "\0" "EUC-JP" "\0" + "SJIS" "\0" "SHIFT_JIS" "\0" + "DECKANJI" "\0" "DEC-KANJI" "\0" + "SDECKANJI" "\0" "EUC-JP" "\0" + /* Chinese */ + "eucTW" "\0" "EUC-TW" "\0" + "DECHANYU" "\0" "DEC-HANYU" "\0" + "DECHANZI" "\0" "GB2312" "\0" + /* Korean */ + "DECKOREAN" "\0" "EUC-KR" "\0"; +# endif + +# if defined WINDOWS_NATIVE || defined __CYGWIN__ + /* To avoid the troubles of installing a separate file in the same + directory as the DLL and of retrieving the DLL's directory at + runtime, simply inline the aliases here. */ + + cp = "CP936" "\0" "GBK" "\0" + "CP1361" "\0" "JOHAB" "\0" + "CP20127" "\0" "ASCII" "\0" + "CP20866" "\0" "KOI8-R" "\0" + "CP20936" "\0" "GB2312" "\0" + "CP21866" "\0" "KOI8-RU" "\0" + "CP28591" "\0" "ISO-8859-1" "\0" + "CP28592" "\0" "ISO-8859-2" "\0" + "CP28593" "\0" "ISO-8859-3" "\0" + "CP28594" "\0" "ISO-8859-4" "\0" + "CP28595" "\0" "ISO-8859-5" "\0" + "CP28596" "\0" "ISO-8859-6" "\0" + "CP28597" "\0" "ISO-8859-7" "\0" + "CP28598" "\0" "ISO-8859-8" "\0" + "CP28599" "\0" "ISO-8859-9" "\0" + "CP28605" "\0" "ISO-8859-15" "\0" + "CP38598" "\0" "ISO-8859-8" "\0" + "CP51932" "\0" "EUC-JP" "\0" + "CP51936" "\0" "GB2312" "\0" + "CP51949" "\0" "EUC-KR" "\0" + "CP51950" "\0" "EUC-TW" "\0" + "CP54936" "\0" "GB18030" "\0" + "CP65001" "\0" "UTF-8" "\0"; +# endif +#endif + + charset_aliases = cp; + } + + return cp; +} + +/* Determine the current locale's character encoding, and canonicalize it + into one of the canonical names listed in config.charset. + The result must not be freed; it is statically allocated. + If the canonical name cannot be determined, the result is a non-canonical + name. */ + +#ifdef STATIC +STATIC +#endif +const char * +locale_charset (void) +{ + const char *codeset; + const char *aliases; + +#if !(defined WINDOWS_NATIVE || defined OS2) + +# if HAVE_LANGINFO_CODESET + + /* Most systems support nl_langinfo (CODESET) nowadays. */ + codeset = nl_langinfo (CODESET); + +# ifdef __CYGWIN__ + /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always + returns "US-ASCII". Return the suffix of the locale name from the + environment variables (if present) or the codepage as a number. */ + if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) + { + const char *locale; + static char buf[2 + 10 + 1]; + + locale = getenv ("LC_ALL"); + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_CTYPE"); + if (locale == NULL || locale[0] == '\0') + locale = getenv ("LANG"); + } + if (locale != NULL && locale[0] != '\0') + { + /* If the locale name contains an encoding after the dot, return + it. */ + const char *dot = strchr (locale, '.'); + + if (dot != NULL) + { + const char *modifier; + + dot++; + /* Look for the possible @... trailer and remove it, if any. */ + modifier = strchr (dot, '@'); + if (modifier == NULL) + return dot; + if (modifier - dot < sizeof (buf)) + { + memcpy (buf, dot, modifier - dot); + buf [modifier - dot] = '\0'; + return buf; + } + } + } + + /* The Windows API has a function returning the locale's codepage as a + number: GetACP(). This encoding is used by Cygwin, unless the user + has set the environment variable CYGWIN=codepage:oem (which very few + people do). + Output directed to console windows needs to be converted (to + GetOEMCP() if the console is using a raster font, or to + GetConsoleOutputCP() if it is using a TrueType font). Cygwin does + this conversion transparently (see winsup/cygwin/fhandler_console.cc), + converting to GetConsoleOutputCP(). This leads to correct results, + except when SetConsoleOutputCP has been called and a raster font is + in use. */ + sprintf (buf, "CP%u", GetACP ()); + codeset = buf; + } +# endif + +# else + + /* On old systems which lack it, use setlocale or getenv. */ + const char *locale = NULL; + + /* But most old systems don't have a complete set of locales. Some + (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't + use setlocale here; it would return "C" when it doesn't support the + locale name the user has set. */ +# if 0 + locale = setlocale (LC_CTYPE, NULL); +# endif + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_ALL"); + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_CTYPE"); + if (locale == NULL || locale[0] == '\0') + locale = getenv ("LANG"); + } + } + + /* On some old systems, one used to set locale = "iso8859_1". On others, + you set it to "language_COUNTRY.charset". In any case, we resolve it + through the charset.alias file. */ + codeset = locale; + +# endif + +#elif defined WINDOWS_NATIVE + + static char buf[2 + 10 + 1]; + + /* The Windows API has a function returning the locale's codepage as a + number: GetACP(). + When the output goes to a console window, it needs to be provided in + GetOEMCP() encoding if the console is using a raster font, or in + GetConsoleOutputCP() encoding if it is using a TrueType font. + But in GUI programs and for output sent to files and pipes, GetACP() + encoding is the best bet. */ + sprintf (buf, "CP%u", GetACP ()); + codeset = buf; + +#elif defined OS2 + + const char *locale; + static char buf[2 + 10 + 1]; + ULONG cp[3]; + ULONG cplen; + + /* Allow user to override the codeset, as set in the operating system, + with standard language environment variables. */ + locale = getenv ("LC_ALL"); + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_CTYPE"); + if (locale == NULL || locale[0] == '\0') + locale = getenv ("LANG"); + } + if (locale != NULL && locale[0] != '\0') + { + /* If the locale name contains an encoding after the dot, return it. */ + const char *dot = strchr (locale, '.'); + + if (dot != NULL) + { + const char *modifier; + + dot++; + /* Look for the possible @... trailer and remove it, if any. */ + modifier = strchr (dot, '@'); + if (modifier == NULL) + return dot; + if (modifier - dot < sizeof (buf)) + { + memcpy (buf, dot, modifier - dot); + buf [modifier - dot] = '\0'; + return buf; + } + } + + /* Resolve through the charset.alias file. */ + codeset = locale; + } + else + { + /* OS/2 has a function returning the locale's codepage as a number. */ + if (DosQueryCp (sizeof (cp), cp, &cplen)) + codeset = ""; + else + { + sprintf (buf, "CP%u", cp[0]); + codeset = buf; + } + } + +#endif + + if (codeset == NULL) + /* The canonical name cannot be determined. */ + codeset = ""; + + /* Resolve alias. */ + for (aliases = get_charset_aliases (); + *aliases != '\0'; + aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) + if (strcmp (codeset, aliases) == 0 + || (aliases[0] == '*' && aliases[1] == '\0')) + { + codeset = aliases + strlen (aliases) + 1; + break; + } + + /* Don't return an empty string. GNU libc and GNU libiconv interpret + the empty string as denoting "the locale's character encoding", + thus GNU libiconv would call this function a second time. */ + if (codeset[0] == '\0') + codeset = "ASCII"; + +#ifdef DARWIN7 + /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" + (the default codeset) does not work when MB_CUR_MAX is 1. */ + if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1) + codeset = "ASCII"; +#endif + + return codeset; +} diff --git a/gl/lib/localcharset.h b/gl/lib/localcharset.h new file mode 100644 index 0000000..9011d58 --- /dev/null +++ b/gl/lib/localcharset.h @@ -0,0 +1,40 @@ +/* Determine a canonical name for the current locale's character encoding. + Copyright (C) 2000-2003, 2009-2014 Free Software Foundation, Inc. + This file is part of the GNU CHARSET Library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#ifndef _LOCALCHARSET_H +#define _LOCALCHARSET_H + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Determine the current locale's character encoding, and canonicalize it + into one of the canonical names listed in config.charset. + The result must not be freed; it is statically allocated. + If the canonical name cannot be determined, the result is a non-canonical + name. */ +extern const char * locale_charset (void); + + +#ifdef __cplusplus +} +#endif + + +#endif /* _LOCALCHARSET_H */ diff --git a/gl/lib/locale.in.h b/gl/lib/locale.in.h new file mode 100644 index 0000000..10cc44b --- /dev/null +++ b/gl/lib/locale.in.h @@ -0,0 +1,216 @@ +/* A POSIX . + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#ifdef _GL_ALREADY_INCLUDING_LOCALE_H + +/* Special invocation conventions to handle Solaris header files + (through Solaris 10) when combined with gettext's libintl.h. */ + +#@INCLUDE_NEXT@ @NEXT_LOCALE_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_LOCALE_H + +#define _GL_ALREADY_INCLUDING_LOCALE_H + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_LOCALE_H@ + +#undef _GL_ALREADY_INCLUDING_LOCALE_H + +#ifndef _@GUARD_PREFIX@_LOCALE_H +#define _@GUARD_PREFIX@_LOCALE_H + +/* NetBSD 5.0 mis-defines NULL. */ +#include + +/* Mac OS X 10.5 defines the locale_t type in . */ +#if @HAVE_XLOCALE_H@ +# include +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C. + On systems that don't define it, use the same value as GNU libintl. */ +#if !defined LC_MESSAGES +# define LC_MESSAGES 1729 +#endif + +/* Bionic libc's 'struct lconv' is just a dummy. */ +#if @REPLACE_STRUCT_LCONV@ +# define lconv rpl_lconv +struct lconv +{ + /* All 'char *' are actually 'const char *'. */ + + /* Members that depend on the LC_NUMERIC category of the locale. See + */ + + /* Symbol used as decimal point. */ + char *decimal_point; + /* Symbol used to separate groups of digits to the left of the decimal + point. */ + char *thousands_sep; + /* Definition of the size of groups of digits to the left of the decimal + point. */ + char *grouping; + + /* Members that depend on the LC_MONETARY category of the locale. See + */ + + /* Symbol used as decimal point. */ + char *mon_decimal_point; + /* Symbol used to separate groups of digits to the left of the decimal + point. */ + char *mon_thousands_sep; + /* Definition of the size of groups of digits to the left of the decimal + point. */ + char *mon_grouping; + /* Sign used to indicate a value >= 0. */ + char *positive_sign; + /* Sign used to indicate a value < 0. */ + char *negative_sign; + + /* For formatting local currency. */ + /* Currency symbol (3 characters) followed by separator (1 character). */ + char *currency_symbol; + /* Number of digits after the decimal point. */ + char frac_digits; + /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char p_cs_precedes; + /* For values >= 0: Position of the sign. */ + char p_sign_posn; + /* For values >= 0: Placement of spaces between currency symbol, sign, and + number. */ + char p_sep_by_space; + /* For values < 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char n_cs_precedes; + /* For values < 0: Position of the sign. */ + char n_sign_posn; + /* For values < 0: Placement of spaces between currency symbol, sign, and + number. */ + char n_sep_by_space; + + /* For formatting international currency. */ + /* Currency symbol (3 characters) followed by separator (1 character). */ + char *int_curr_symbol; + /* Number of digits after the decimal point. */ + char int_frac_digits; + /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char int_p_cs_precedes; + /* For values >= 0: Position of the sign. */ + char int_p_sign_posn; + /* For values >= 0: Placement of spaces between currency symbol, sign, and + number. */ + char int_p_sep_by_space; + /* For values < 0: 1 if the currency symbol precedes the number, 0 if it + comes after the number. */ + char int_n_cs_precedes; + /* For values < 0: Position of the sign. */ + char int_n_sign_posn; + /* For values < 0: Placement of spaces between currency symbol, sign, and + number. */ + char int_n_sep_by_space; +}; +#endif + +#if @GNULIB_LOCALECONV@ +# if @REPLACE_LOCALECONV@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef localeconv +# define localeconv rpl_localeconv +# endif +_GL_FUNCDECL_RPL (localeconv, struct lconv *, (void)); +_GL_CXXALIAS_RPL (localeconv, struct lconv *, (void)); +# else +_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void)); +# endif +_GL_CXXALIASWARN (localeconv); +#elif @REPLACE_STRUCT_LCONV@ +# undef localeconv +# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv +#elif defined GNULIB_POSIXCHECK +# undef localeconv +# if HAVE_RAW_DECL_LOCALECONV +_GL_WARN_ON_USE (localeconv, + "localeconv returns too few information on some platforms - " + "use gnulib module localeconv for portability"); +# endif +#endif + +#if @GNULIB_SETLOCALE@ +# if @REPLACE_SETLOCALE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setlocale +# define setlocale rpl_setlocale +# define GNULIB_defined_setlocale 1 +# endif +_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale)); +_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale)); +# else +_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); +# endif +_GL_CXXALIASWARN (setlocale); +#elif defined GNULIB_POSIXCHECK +# undef setlocale +# if HAVE_RAW_DECL_SETLOCALE +_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " + "use gnulib module setlocale for portability"); +# endif +#endif + +#if @GNULIB_DUPLOCALE@ +# if @REPLACE_DUPLOCALE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef duplocale +# define duplocale rpl_duplocale +# endif +_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); +# else +# if @HAVE_DUPLOCALE@ +_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); +# endif +# endif +# if @HAVE_DUPLOCALE@ +_GL_CXXALIASWARN (duplocale); +# endif +#elif defined GNULIB_POSIXCHECK +# undef duplocale +# if HAVE_RAW_DECL_DUPLOCALE +_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " + "use gnulib module duplocale for portability"); +# endif +#endif + +#endif /* _@GUARD_PREFIX@_LOCALE_H */ +#endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */ +#endif /* _@GUARD_PREFIX@_LOCALE_H */ diff --git a/gl/lib/localeconv.c b/gl/lib/localeconv.c new file mode 100644 index 0000000..014e739 --- /dev/null +++ b/gl/lib/localeconv.c @@ -0,0 +1,103 @@ +/* Query locale dependent information for formatting numbers. + Copyright (C) 2012-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#if HAVE_STRUCT_LCONV_DECIMAL_POINT + +/* Override for platforms where 'struct lconv' lacks the int_p_*, int_n_* + members. */ + +struct lconv * +localeconv (void) +{ + static struct lconv result; +# undef lconv +# undef localeconv + struct lconv *sys_result = localeconv (); + + result.decimal_point = sys_result->decimal_point; + result.thousands_sep = sys_result->thousands_sep; + result.grouping = sys_result->grouping; + result.mon_decimal_point = sys_result->mon_decimal_point; + result.mon_thousands_sep = sys_result->mon_thousands_sep; + result.mon_grouping = sys_result->mon_grouping; + result.positive_sign = sys_result->positive_sign; + result.negative_sign = sys_result->negative_sign; + result.currency_symbol = sys_result->currency_symbol; + result.frac_digits = sys_result->frac_digits; + result.p_cs_precedes = sys_result->p_cs_precedes; + result.p_sign_posn = sys_result->p_sign_posn; + result.p_sep_by_space = sys_result->p_sep_by_space; + result.n_cs_precedes = sys_result->n_cs_precedes; + result.n_sign_posn = sys_result->n_sign_posn; + result.n_sep_by_space = sys_result->n_sep_by_space; + result.int_curr_symbol = sys_result->int_curr_symbol; + result.int_frac_digits = sys_result->int_frac_digits; + result.int_p_cs_precedes = sys_result->p_cs_precedes; + result.int_p_sign_posn = sys_result->p_sign_posn; + result.int_p_sep_by_space = sys_result->p_sep_by_space; + result.int_n_cs_precedes = sys_result->n_cs_precedes; + result.int_n_sign_posn = sys_result->n_sign_posn; + result.int_n_sep_by_space = sys_result->n_sep_by_space; + + return &result; +} + +#else + +/* Override for platforms where 'struct lconv' is a dummy. */ + +# include + +struct lconv * +localeconv (void) +{ + static /*const*/ struct lconv result = + { + /* decimal_point */ ".", + /* thousands_sep */ "", + /* grouping */ "", + /* mon_decimal_point */ "", + /* mon_thousands_sep */ "", + /* mon_grouping */ "", + /* positive_sign */ "", + /* negative_sign */ "", + /* currency_symbol */ "", + /* frac_digits */ CHAR_MAX, + /* p_cs_precedes */ CHAR_MAX, + /* p_sign_posn */ CHAR_MAX, + /* p_sep_by_space */ CHAR_MAX, + /* n_cs_precedes */ CHAR_MAX, + /* n_sign_posn */ CHAR_MAX, + /* n_sep_by_space */ CHAR_MAX, + /* int_curr_symbol */ "", + /* int_frac_digits */ CHAR_MAX, + /* int_p_cs_precedes */ CHAR_MAX, + /* int_p_sign_posn */ CHAR_MAX, + /* int_p_sep_by_space */ CHAR_MAX, + /* int_n_cs_precedes */ CHAR_MAX, + /* int_n_sign_posn */ CHAR_MAX, + /* int_n_sep_by_space */ CHAR_MAX + }; + + return &result; +} + +#endif diff --git a/gl/lib/lseek.c b/gl/lib/lseek.c new file mode 100644 index 0000000..f19b41b --- /dev/null +++ b/gl/lib/lseek.c @@ -0,0 +1,67 @@ +/* An lseek() function that detects pipes. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#include + +/* Specification. */ +#include + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Windows platforms. */ +/* Get GetFileType. */ +# include +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" +#else +# include +#endif +#include + +#undef lseek + +off_t +rpl_lseek (int fd, off_t offset, int whence) +{ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */ + HANDLE h = (HANDLE) _get_osfhandle (fd); + if (h == INVALID_HANDLE_VALUE) + { + errno = EBADF; + return -1; + } + if (GetFileType (h) != FILE_TYPE_DISK) + { + errno = ESPIPE; + return -1; + } +#else + /* BeOS lseek mistakenly succeeds on pipes... */ + struct stat statbuf; + if (fstat (fd, &statbuf) < 0) + return -1; + if (!S_ISREG (statbuf.st_mode)) + { + errno = ESPIPE; + return -1; + } +#endif +#if _GL_WINDOWS_64_BIT_OFF_T + return _lseeki64 (fd, offset, whence); +#else + return lseek (fd, offset, whence); +#endif +} diff --git a/gl/lib/lstat.c b/gl/lib/lstat.c new file mode 100644 index 0000000..f70fd43 --- /dev/null +++ b/gl/lib/lstat.c @@ -0,0 +1,97 @@ +/* Work around a bug of lstat on some systems + + Copyright (C) 1997-2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +/* If the user's config.h happens to include , let it include only + the system's here, so that orig_lstat doesn't recurse to + rpl_lstat. */ +#define __need_system_sys_stat_h +#include + +#if !HAVE_LSTAT +/* On systems that lack symlinks, our replacement already + defined lstat as stat, so there is nothing further to do other than + avoid an empty file. */ +typedef int dummy; +#else /* HAVE_LSTAT */ + +/* Get the original definition of lstat. It might be defined as a macro. */ +# include +# include +# undef __need_system_sys_stat_h + +static int +orig_lstat (const char *filename, struct stat *buf) +{ + return lstat (filename, buf); +} + +/* Specification. */ +/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include + above. */ +# include "sys/stat.h" + +# include +# include + +/* lstat works differently on Linux and Solaris systems. POSIX (see + "pathname resolution" in the glossary) requires that programs like + 'ls' take into consideration the fact that FILE has a trailing slash + when FILE is a symbolic link. On Linux and Solaris 10 systems, the + lstat function already has the desired semantics (in treating + 'lstat ("symlink/", sbuf)' just like 'lstat ("symlink/.", sbuf)', + but on Solaris 9 and earlier it does not. + + If FILE has a trailing slash and specifies a symbolic link, + then use stat() to get more info on the referent of FILE. + If the referent is a non-directory, then set errno to ENOTDIR + and return -1. Otherwise, return stat's result. */ + +int +rpl_lstat (const char *file, struct stat *sbuf) +{ + size_t len; + int lstat_result = orig_lstat (file, sbuf); + + if (lstat_result != 0) + return lstat_result; + + /* This replacement file can blindly check against '/' rather than + using the ISSLASH macro, because all platforms with '\\' either + lack symlinks (mingw) or have working lstat (cygwin) and thus do + not compile this file. 0 len should have already been filtered + out above, with a failure return of ENOENT. */ + len = strlen (file); + if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode)) + return 0; + + /* At this point, a trailing slash is only permitted on + symlink-to-dir; but it should have found information on the + directory, not the symlink. Call stat() to get info about the + link's referent. Our replacement stat guarantees valid results, + even if the symlink is not pointing to a directory. */ + if (!S_ISLNK (sbuf->st_mode)) + { + errno = ENOTDIR; + return -1; + } + return stat (file, sbuf); +} + +#endif /* HAVE_LSTAT */ diff --git a/gl/lib/malloc.c b/gl/lib/malloc.c new file mode 100644 index 0000000..bc81c54 --- /dev/null +++ b/gl/lib/malloc.c @@ -0,0 +1,56 @@ +/* malloc() function that is glibc compatible. + + Copyright (C) 1997-1998, 2006-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* written by Jim Meyering and Bruno Haible */ + +#define _GL_USE_STDLIB_ALLOC 1 +#include +/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ +#ifdef malloc +# define NEED_MALLOC_GNU 1 +# undef malloc +/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ +#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU +# define NEED_MALLOC_GNU 1 +#endif + +#include + +#include + +/* Allocate an N-byte block of memory from the heap. + If N is zero, allocate a 1-byte block. */ + +void * +rpl_malloc (size_t n) +{ + void *result; + +#if NEED_MALLOC_GNU + if (n == 0) + n = 1; +#endif + + result = malloc (n); + +#if !HAVE_MALLOC_POSIX + if (result == NULL) + errno = ENOMEM; +#endif + + return result; +} diff --git a/gl/lib/malloca.c b/gl/lib/malloca.c new file mode 100644 index 0000000..370551c --- /dev/null +++ b/gl/lib/malloca.c @@ -0,0 +1,149 @@ +/* Safe automatic memory allocation. + Copyright (C) 2003, 2006-2007, 2009-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#define _GL_USE_STDLIB_ALLOC 1 +#include + +/* Specification. */ +#include "malloca.h" + +#include + +#include "verify.h" + +/* The speed critical point in this file is freea() applied to an alloca() + result: it must be fast, to match the speed of alloca(). The speed of + mmalloca() and freea() in the other case are not critical, because they + are only invoked for big memory sizes. */ + +#if HAVE_ALLOCA + +/* Store the mmalloca() results in a hash table. This is needed to reliably + distinguish a mmalloca() result and an alloca() result. + + Although it is possible that the same pointer is returned by alloca() and + by mmalloca() at different times in the same application, it does not lead + to a bug in freea(), because: + - Before a pointer returned by alloca() can point into malloc()ed memory, + the function must return, and once this has happened the programmer must + not call freea() on it anyway. + - Before a pointer returned by mmalloca() can point into the stack, it + must be freed. The only function that can free it is freea(), and + when freea() frees it, it also removes it from the hash table. */ + +#define MAGIC_NUMBER 0x1415fb4a +#define MAGIC_SIZE sizeof (int) +/* This is how the header info would look like without any alignment + considerations. */ +struct preliminary_header { void *next; int magic; }; +/* But the header's size must be a multiple of sa_alignment_max. */ +#define HEADER_SIZE \ + (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max) +union header { + void *next; + struct { + char room[HEADER_SIZE - MAGIC_SIZE]; + int word; + } magic; +}; +verify (HEADER_SIZE == sizeof (union header)); +/* We make the hash table quite big, so that during lookups the probability + of empty hash buckets is quite high. There is no need to make the hash + table resizable, because when the hash table gets filled so much that the + lookup becomes slow, it means that the application has memory leaks. */ +#define HASH_TABLE_SIZE 257 +static void * mmalloca_results[HASH_TABLE_SIZE]; + +#endif + +void * +mmalloca (size_t n) +{ +#if HAVE_ALLOCA + /* Allocate one more word, that serves as an indicator for malloc()ed + memory, so that freea() of an alloca() result is fast. */ + size_t nplus = n + HEADER_SIZE; + + if (nplus >= n) + { + void *p = malloc (nplus); + + if (p != NULL) + { + size_t slot; + union header *h = p; + + p = h + 1; + + /* Put a magic number into the indicator word. */ + h->magic.word = MAGIC_NUMBER; + + /* Enter p into the hash table. */ + slot = (uintptr_t) p % HASH_TABLE_SIZE; + h->next = mmalloca_results[slot]; + mmalloca_results[slot] = p; + + return p; + } + } + /* Out of memory. */ + return NULL; +#else +# if !MALLOC_0_IS_NONNULL + if (n == 0) + n = 1; +# endif + return malloc (n); +#endif +} + +#if HAVE_ALLOCA +void +freea (void *p) +{ + /* mmalloca() may have returned NULL. */ + if (p != NULL) + { + /* Attempt to quickly distinguish the mmalloca() result - which has + a magic indicator word - and the alloca() result - which has an + uninitialized indicator word. It is for this test that sa_increment + additional bytes are allocated in the alloca() case. */ + if (((int *) p)[-1] == MAGIC_NUMBER) + { + /* Looks like a mmalloca() result. To see whether it really is one, + perform a lookup in the hash table. */ + size_t slot = (uintptr_t) p % HASH_TABLE_SIZE; + void **chain = &mmalloca_results[slot]; + for (; *chain != NULL;) + { + union header *h = p; + if (*chain == p) + { + /* Found it. Remove it from the hash table and free it. */ + union header *p_begin = h - 1; + *chain = p_begin->next; + free (p_begin); + return; + } + h = *chain; + chain = &h[-1].next; + } + } + /* At this point, we know it was not a mmalloca() result. */ + } +} +#endif diff --git a/gl/lib/malloca.h b/gl/lib/malloca.h new file mode 100644 index 0000000..5071e46 --- /dev/null +++ b/gl/lib/malloca.h @@ -0,0 +1,133 @@ +/* Safe automatic memory allocation. + Copyright (C) 2003-2007, 2009-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _MALLOCA_H +#define _MALLOCA_H + +#include +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call + alloca(N); otherwise it returns NULL. It either returns N bytes of + memory allocated on the stack, that lasts until the function returns, + or NULL. + Use of safe_alloca should be avoided: + - inside arguments of function calls - undefined behaviour, + - in inline functions - the allocation may actually last until the + calling function returns. +*/ +#if HAVE_ALLOCA +/* The OS usually guarantees only one guard page at the bottom of the stack, + 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 a function. */ +# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) +#else +# define safe_alloca(N) ((void) (N), NULL) +#endif + +/* malloca(N) is a safe variant of alloca(N). It allocates N bytes of + memory allocated on the stack, that must be freed using freea() before + the function returns. Upon failure, it returns NULL. */ +#if HAVE_ALLOCA +# define malloca(N) \ + ((N) < 4032 - sa_increment \ + ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ + : mmalloca (N)) +#else +# define malloca(N) \ + mmalloca (N) +#endif +extern void * mmalloca (size_t n); + +/* Free a block of memory allocated through malloca(). */ +#if HAVE_ALLOCA +extern void freea (void *p); +#else +# define freea free +#endif + +/* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). + It allocates an array of N objects, each with S bytes of memory, + on the stack. S must be positive and N must be nonnegative. + The array must be freed using freea() before the function returns. */ +#if 1 +/* Cf. the definition of xalloc_oversized. */ +# define nmalloca(n, s) \ + ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \ + ? NULL \ + : malloca ((n) * (s))) +#else +extern void * nmalloca (size_t n, size_t s); +#endif + + +#ifdef __cplusplus +} +#endif + + +/* ------------------- Auxiliary, non-public definitions ------------------- */ + +/* Determine the alignment of a type at compile time. */ +#if defined __GNUC__ || defined __IBM__ALIGNOF__ +# define sa_alignof __alignof__ +#elif defined __cplusplus + template struct sa_alignof_helper { char __slot1; type __slot2; }; +# define sa_alignof(type) offsetof (sa_alignof_helper, __slot2) +#elif defined __hpux + /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof + values. */ +# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) +#elif defined _AIX + /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof + values. */ +# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) +#else +# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) +#endif + +enum +{ +/* The desired alignment of memory allocations is the maximum alignment + among all elementary types. */ + sa_alignment_long = sa_alignof (long), + sa_alignment_double = sa_alignof (double), +#if HAVE_LONG_LONG_INT + sa_alignment_longlong = sa_alignof (long long), +#endif + sa_alignment_longdouble = sa_alignof (long double), + sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1) +#if HAVE_LONG_LONG_INT + | (sa_alignment_longlong - 1) +#endif + | (sa_alignment_longdouble - 1) + ) + 1, +/* The increment that guarantees room for a magic word must be >= sizeof (int) + and a multiple of sa_alignment_max. */ + sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max +}; + +#endif /* _MALLOCA_H */ diff --git a/gnulib/lib/malloca.valgrind b/gl/lib/malloca.valgrind similarity index 100% rename from gnulib/lib/malloca.valgrind rename to gl/lib/malloca.valgrind diff --git a/gl/lib/math.c b/gl/lib/math.c new file mode 100644 index 0000000..ddb2ded --- /dev/null +++ b/gl/lib/math.c @@ -0,0 +1,3 @@ +#include +#define _GL_MATH_INLINE _GL_EXTERN_INLINE +#include "math.h" diff --git a/gl/lib/math.in.h b/gl/lib/math.in.h new file mode 100644 index 0000000..9d73c5e --- /dev/null +++ b/gl/lib/math.in.h @@ -0,0 +1,2278 @@ +/* A GNU-like . + + Copyright (C) 2002-2003, 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _@GUARD_PREFIX@_MATH_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ + +#ifndef _@GUARD_PREFIX@_MATH_H +#define _@GUARD_PREFIX@_MATH_H + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_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. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +#ifdef __cplusplus +/* Helper macros to define type-generic function FUNC as overloaded functions, + rather than as macros like in C. POSIX declares these with an argument of + real-floating (that is, one of float, double, or long double). */ +# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \ +static inline int \ +_gl_cxx_ ## func ## f (float f) \ +{ \ + return func (f); \ +} \ +static inline int \ +_gl_cxx_ ## func ## d (double d) \ +{ \ + return func (d); \ +} \ +static inline int \ +_gl_cxx_ ## func ## l (long double l) \ +{ \ + return func (l); \ +} +# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \ +inline int \ +func (float f) \ +{ \ + return _gl_cxx_ ## func ## f (f); \ +} \ +inline int \ +func (double d) \ +{ \ + return _gl_cxx_ ## func ## d (d); \ +} \ +inline int \ +func (long double l) \ +{ \ + return _gl_cxx_ ## func ## l (l); \ +} +#endif + +/* Helper macros to define a portability warning for the + classification macro FUNC called with VALUE. POSIX declares the + classification macros with an argument of real-floating (that is, + one of float, double, or long double). */ +#define _GL_WARN_REAL_FLOATING_DECL(func) \ +_GL_MATH_INLINE int \ +rpl_ ## func ## f (float f) \ +{ \ + return func (f); \ +} \ +_GL_MATH_INLINE int \ +rpl_ ## func ## d (double d) \ +{ \ + return func (d); \ +} \ +_GL_MATH_INLINE int \ +rpl_ ## func ## l (long double l) \ +{ \ + return func (l); \ +} \ +_GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \ + "use gnulib module " #func " for portability"); \ +_GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \ + "use gnulib module " #func " for portability"); \ +_GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \ + "use gnulib module " #func " for portability") +#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ + (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ + : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ + : rpl_ ## func ## l (value)) + + +#if @REPLACE_ITOLD@ +/* Pull in a function that fixes the 'int' to 'long double' conversion + of glibc 2.7. */ +_GL_EXTERN_C void _Qp_itoq (long double *, int); +static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq; +#endif + + +/* POSIX allows platforms that don't support NAN. But all major + machines in the past 15 years have supported something close to + IEEE NaN, so we define this unconditionally. We also must define + it on platforms like Solaris 10, where NAN is present but defined + as a function pointer rather than a floating point constant. */ +#if !defined NAN || @REPLACE_NAN@ +# if !GNULIB_defined_NAN +# undef NAN + /* 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 +_GL_MATH_INLINE float +_NaN () +{ + static float zero = 0.0f; + return zero / zero; +} +# define NAN (_NaN()) +# else +# define NAN (0.0f / 0.0f) +# endif +# define GNULIB_defined_NAN 1 +# endif +#endif + +/* Solaris 10 defines HUGE_VAL, but as a function pointer rather + than a floating point constant. */ +#if @REPLACE_HUGE_VAL@ +# undef HUGE_VALF +# define HUGE_VALF (1.0f / 0.0f) +# undef HUGE_VAL +# define HUGE_VAL (1.0 / 0.0) +# undef HUGE_VALL +# define HUGE_VALL (1.0L / 0.0L) +#endif + +/* HUGE_VALF is a 'float' Infinity. */ +#ifndef HUGE_VALF +# if defined _MSC_VER +/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ +# define HUGE_VALF (1e25f * 1e25f) +# else +# define HUGE_VALF (1.0f / 0.0f) +# endif +#endif + +/* HUGE_VAL is a 'double' Infinity. */ +#ifndef HUGE_VAL +# if defined _MSC_VER +/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ +# define HUGE_VAL (1e250 * 1e250) +# else +# define HUGE_VAL (1.0 / 0.0) +# endif +#endif + +/* HUGE_VALL is a 'long double' Infinity. */ +#ifndef HUGE_VALL +# if defined _MSC_VER +/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ +# define HUGE_VALL (1e250L * 1e250L) +# else +# define HUGE_VALL (1.0L / 0.0L) +# endif +#endif + + +/* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ +#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN) +# if defined __NetBSD__ || defined __sgi + /* NetBSD, IRIX 6.5: match what ilogb() does */ +# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ +# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ +# elif defined _AIX + /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */ +# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ +# define FP_ILOGBNAN 2147483647 /* INT_MAX */ +# elif defined __sun + /* Solaris 9: match what ilogb() does */ +# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ +# define FP_ILOGBNAN 2147483647 /* INT_MAX */ +# else + /* Gnulib defined values. */ +# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */ +# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ +# endif +#endif + + +#if @GNULIB_ACOSF@ +# if !@HAVE_ACOSF@ +# undef acosf +_GL_FUNCDECL_SYS (acosf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (acosf, float, (float x)); +_GL_CXXALIASWARN (acosf); +#elif defined GNULIB_POSIXCHECK +# undef acosf +# if HAVE_RAW_DECL_ACOSF +_GL_WARN_ON_USE (acosf, "acosf is unportable - " + "use gnulib module acosf for portability"); +# endif +#endif + +#if @GNULIB_ACOSL@ +# if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@ +# undef acosl +_GL_FUNCDECL_SYS (acosl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (acosl, long double, (long double x)); +_GL_CXXALIASWARN (acosl); +#elif defined GNULIB_POSIXCHECK +# undef acosl +# if HAVE_RAW_DECL_ACOSL +_GL_WARN_ON_USE (acosl, "acosl is unportable - " + "use gnulib module acosl for portability"); +# endif +#endif + + +#if @GNULIB_ASINF@ +# if !@HAVE_ASINF@ +# undef asinf +_GL_FUNCDECL_SYS (asinf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (asinf, float, (float x)); +_GL_CXXALIASWARN (asinf); +#elif defined GNULIB_POSIXCHECK +# undef asinf +# if HAVE_RAW_DECL_ASINF +_GL_WARN_ON_USE (asinf, "asinf is unportable - " + "use gnulib module asinf for portability"); +# endif +#endif + +#if @GNULIB_ASINL@ +# if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@ +# undef asinl +_GL_FUNCDECL_SYS (asinl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (asinl, long double, (long double x)); +_GL_CXXALIASWARN (asinl); +#elif defined GNULIB_POSIXCHECK +# undef asinl +# if HAVE_RAW_DECL_ASINL +_GL_WARN_ON_USE (asinl, "asinl is unportable - " + "use gnulib module asinl for portability"); +# endif +#endif + + +#if @GNULIB_ATANF@ +# if !@HAVE_ATANF@ +# undef atanf +_GL_FUNCDECL_SYS (atanf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (atanf, float, (float x)); +_GL_CXXALIASWARN (atanf); +#elif defined GNULIB_POSIXCHECK +# undef atanf +# if HAVE_RAW_DECL_ATANF +_GL_WARN_ON_USE (atanf, "atanf is unportable - " + "use gnulib module atanf for portability"); +# endif +#endif + +#if @GNULIB_ATANL@ +# if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@ +# undef atanl +_GL_FUNCDECL_SYS (atanl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (atanl, long double, (long double x)); +_GL_CXXALIASWARN (atanl); +#elif defined GNULIB_POSIXCHECK +# undef atanl +# if HAVE_RAW_DECL_ATANL +_GL_WARN_ON_USE (atanl, "atanl is unportable - " + "use gnulib module atanl for portability"); +# endif +#endif + + +#if @GNULIB_ATAN2F@ +# if !@HAVE_ATAN2F@ +# undef atan2f +_GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); +# endif +_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); +_GL_CXXALIASWARN (atan2f); +#elif defined GNULIB_POSIXCHECK +# undef atan2f +# if HAVE_RAW_DECL_ATAN2F +_GL_WARN_ON_USE (atan2f, "atan2f is unportable - " + "use gnulib module atan2f for portability"); +# endif +#endif + + +#if @GNULIB_CBRTF@ +# if @REPLACE_CBRTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef cbrtf +# define cbrtf rpl_cbrtf +# endif +_GL_FUNCDECL_RPL (cbrtf, float, (float x)); +_GL_CXXALIAS_RPL (cbrtf, float, (float x)); +# else +# if !@HAVE_DECL_CBRTF@ +_GL_FUNCDECL_SYS (cbrtf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (cbrtf, float, (float x)); +# endif +_GL_CXXALIASWARN (cbrtf); +#elif defined GNULIB_POSIXCHECK +# undef cbrtf +# if HAVE_RAW_DECL_CBRTF +_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - " + "use gnulib module cbrtf for portability"); +# endif +#endif + +#if @GNULIB_CBRT@ +# if !@HAVE_CBRT@ +_GL_FUNCDECL_SYS (cbrt, double, (double x)); +# endif +_GL_CXXALIAS_SYS (cbrt, double, (double x)); +_GL_CXXALIASWARN (cbrt); +#elif defined GNULIB_POSIXCHECK +# undef cbrt +# if HAVE_RAW_DECL_CBRT +_GL_WARN_ON_USE (cbrt, "cbrt is unportable - " + "use gnulib module cbrt for portability"); +# endif +#endif + +#if @GNULIB_CBRTL@ +# if @REPLACE_CBRTL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef cbrtl +# define cbrtl rpl_cbrtl +# endif +_GL_FUNCDECL_RPL (cbrtl, long double, (long double x)); +_GL_CXXALIAS_RPL (cbrtl, long double, (long double x)); +# else +# if !@HAVE_DECL_CBRTL@ +_GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); +# endif +_GL_CXXALIASWARN (cbrtl); +#elif defined GNULIB_POSIXCHECK +# undef cbrtl +# if HAVE_RAW_DECL_CBRTL +_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - " + "use gnulib module cbrtl for portability"); +# endif +#endif + + +#if @GNULIB_CEILF@ +# if @REPLACE_CEILF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ceilf +# define ceilf rpl_ceilf +# endif +_GL_FUNCDECL_RPL (ceilf, float, (float x)); +_GL_CXXALIAS_RPL (ceilf, float, (float x)); +# else +# if !@HAVE_DECL_CEILF@ +# undef ceilf +_GL_FUNCDECL_SYS (ceilf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (ceilf, float, (float x)); +# endif +_GL_CXXALIASWARN (ceilf); +#elif defined GNULIB_POSIXCHECK +# undef ceilf +# if HAVE_RAW_DECL_CEILF +_GL_WARN_ON_USE (ceilf, "ceilf is unportable - " + "use gnulib module ceilf for portability"); +# endif +#endif + +#if @GNULIB_CEIL@ +# if @REPLACE_CEIL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define ceil rpl_ceil +# endif +_GL_FUNCDECL_RPL (ceil, double, (double x)); +_GL_CXXALIAS_RPL (ceil, double, (double x)); +# else +_GL_CXXALIAS_SYS (ceil, double, (double x)); +# endif +_GL_CXXALIASWARN (ceil); +#endif + +#if @GNULIB_CEILL@ +# if @REPLACE_CEILL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ceill +# define ceill rpl_ceill +# endif +_GL_FUNCDECL_RPL (ceill, long double, (long double x)); +_GL_CXXALIAS_RPL (ceill, long double, (long double x)); +# else +# if !@HAVE_DECL_CEILL@ +# undef ceill +_GL_FUNCDECL_SYS (ceill, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (ceill, long double, (long double x)); +# endif +_GL_CXXALIASWARN (ceill); +#elif defined GNULIB_POSIXCHECK +# undef ceill +# if HAVE_RAW_DECL_CEILL +_GL_WARN_ON_USE (ceill, "ceill is unportable - " + "use gnulib module ceill for portability"); +# endif +#endif + + +#if @GNULIB_COPYSIGNF@ +# if !@HAVE_DECL_COPYSIGNF@ +_GL_FUNCDECL_SYS (copysignf, float, (float x, float y)); +# endif +_GL_CXXALIAS_SYS (copysignf, float, (float x, float y)); +_GL_CXXALIASWARN (copysignf); +#elif defined GNULIB_POSIXCHECK +# undef copysignf +# if HAVE_RAW_DECL_COPYSIGNF +_GL_WARN_ON_USE (copysignf, "copysignf is unportable - " + "use gnulib module copysignf for portability"); +# endif +#endif + +#if @GNULIB_COPYSIGN@ +# if !@HAVE_COPYSIGN@ +_GL_FUNCDECL_SYS (copysign, double, (double x, double y)); +# endif +_GL_CXXALIAS_SYS (copysign, double, (double x, double y)); +_GL_CXXALIASWARN (copysign); +#elif defined GNULIB_POSIXCHECK +# undef copysign +# if HAVE_RAW_DECL_COPYSIGN +_GL_WARN_ON_USE (copysign, "copysign is unportable - " + "use gnulib module copysign for portability"); +# endif +#endif + +#if @GNULIB_COPYSIGNL@ +# if !@HAVE_COPYSIGNL@ +_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); +# endif +_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); +_GL_CXXALIASWARN (copysignl); +#elif defined GNULIB_POSIXCHECK +# undef copysignl +# if HAVE_RAW_DECL_COPYSIGNL +_GL_WARN_ON_USE (copysign, "copysignl is unportable - " + "use gnulib module copysignl for portability"); +# endif +#endif + + +#if @GNULIB_COSF@ +# if !@HAVE_COSF@ +# undef cosf +_GL_FUNCDECL_SYS (cosf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (cosf, float, (float x)); +_GL_CXXALIASWARN (cosf); +#elif defined GNULIB_POSIXCHECK +# undef cosf +# if HAVE_RAW_DECL_COSF +_GL_WARN_ON_USE (cosf, "cosf is unportable - " + "use gnulib module cosf for portability"); +# endif +#endif + +#if @GNULIB_COSL@ +# if !@HAVE_COSL@ || !@HAVE_DECL_COSL@ +# undef cosl +_GL_FUNCDECL_SYS (cosl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (cosl, long double, (long double x)); +_GL_CXXALIASWARN (cosl); +#elif defined GNULIB_POSIXCHECK +# undef cosl +# if HAVE_RAW_DECL_COSL +_GL_WARN_ON_USE (cosl, "cosl is unportable - " + "use gnulib module cosl for portability"); +# endif +#endif + + +#if @GNULIB_COSHF@ +# if !@HAVE_COSHF@ +# undef coshf +_GL_FUNCDECL_SYS (coshf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (coshf, float, (float x)); +_GL_CXXALIASWARN (coshf); +#elif defined GNULIB_POSIXCHECK +# undef coshf +# if HAVE_RAW_DECL_COSHF +_GL_WARN_ON_USE (coshf, "coshf is unportable - " + "use gnulib module coshf for portability"); +# endif +#endif + + +#if @GNULIB_EXPF@ +# if !@HAVE_EXPF@ +# undef expf +_GL_FUNCDECL_SYS (expf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (expf, float, (float x)); +_GL_CXXALIASWARN (expf); +#elif defined GNULIB_POSIXCHECK +# undef expf +# if HAVE_RAW_DECL_EXPF +_GL_WARN_ON_USE (expf, "expf is unportable - " + "use gnulib module expf for portability"); +# endif +#endif + +#if @GNULIB_EXPL@ +# if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@ +# undef expl +_GL_FUNCDECL_SYS (expl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (expl, long double, (long double x)); +_GL_CXXALIASWARN (expl); +#elif defined GNULIB_POSIXCHECK +# undef expl +# if HAVE_RAW_DECL_EXPL +_GL_WARN_ON_USE (expl, "expl is unportable - " + "use gnulib module expl for portability"); +# endif +#endif + + +#if @GNULIB_EXP2F@ +# if !@HAVE_DECL_EXP2F@ +_GL_FUNCDECL_SYS (exp2f, float, (float x)); +# endif +_GL_CXXALIAS_SYS (exp2f, float, (float x)); +_GL_CXXALIASWARN (exp2f); +#elif defined GNULIB_POSIXCHECK +# undef exp2f +# if HAVE_RAW_DECL_EXP2F +_GL_WARN_ON_USE (exp2f, "exp2f is unportable - " + "use gnulib module exp2f for portability"); +# endif +#endif + +#if @GNULIB_EXP2@ +# if @REPLACE_EXP2@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef exp2 +# define exp2 rpl_exp2 +# endif +_GL_FUNCDECL_RPL (exp2, double, (double x)); +_GL_CXXALIAS_RPL (exp2, double, (double x)); +# else +# if !@HAVE_DECL_EXP2@ +_GL_FUNCDECL_SYS (exp2, double, (double x)); +# endif +_GL_CXXALIAS_SYS (exp2, double, (double x)); +# endif +_GL_CXXALIASWARN (exp2); +#elif defined GNULIB_POSIXCHECK +# undef exp2 +# if HAVE_RAW_DECL_EXP2 +_GL_WARN_ON_USE (exp2, "exp2 is unportable - " + "use gnulib module exp2 for portability"); +# endif +#endif + +#if @GNULIB_EXP2L@ +# if @REPLACE_EXP2L@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef exp2l +# define exp2l rpl_exp2l +# endif +_GL_FUNCDECL_RPL (exp2l, long double, (long double x)); +_GL_CXXALIAS_RPL (exp2l, long double, (long double x)); +# else +# if !@HAVE_DECL_EXP2L@ +# undef exp2l +_GL_FUNCDECL_SYS (exp2l, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (exp2l, long double, (long double x)); +# endif +_GL_CXXALIASWARN (exp2l); +#elif defined GNULIB_POSIXCHECK +# undef exp2l +# if HAVE_RAW_DECL_EXP2L +_GL_WARN_ON_USE (exp2l, "exp2l is unportable - " + "use gnulib module exp2l for portability"); +# endif +#endif + + +#if @GNULIB_EXPM1F@ +# if @REPLACE_EXPM1F@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef expm1f +# define expm1f rpl_expm1f +# endif +_GL_FUNCDECL_RPL (expm1f, float, (float x)); +_GL_CXXALIAS_RPL (expm1f, float, (float x)); +# else +# if !@HAVE_EXPM1F@ +_GL_FUNCDECL_SYS (expm1f, float, (float x)); +# endif +_GL_CXXALIAS_SYS (expm1f, float, (float x)); +# endif +_GL_CXXALIASWARN (expm1f); +#elif defined GNULIB_POSIXCHECK +# undef expm1f +# if HAVE_RAW_DECL_EXPM1F +_GL_WARN_ON_USE (expm1f, "expm1f is unportable - " + "use gnulib module expm1f for portability"); +# endif +#endif + +#if @GNULIB_EXPM1@ +# if @REPLACE_EXPM1@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef expm1 +# define expm1 rpl_expm1 +# endif +_GL_FUNCDECL_RPL (expm1, double, (double x)); +_GL_CXXALIAS_RPL (expm1, double, (double x)); +# else +# if !@HAVE_EXPM1@ +_GL_FUNCDECL_SYS (expm1, double, (double x)); +# endif +_GL_CXXALIAS_SYS (expm1, double, (double x)); +# endif +_GL_CXXALIASWARN (expm1); +#elif defined GNULIB_POSIXCHECK +# undef expm1 +# if HAVE_RAW_DECL_EXPM1 +_GL_WARN_ON_USE (expm1, "expm1 is unportable - " + "use gnulib module expm1 for portability"); +# endif +#endif + +#if @GNULIB_EXPM1L@ +# if !@HAVE_DECL_EXPM1L@ +# undef expm1l +_GL_FUNCDECL_SYS (expm1l, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (expm1l, long double, (long double x)); +_GL_CXXALIASWARN (expm1l); +#elif defined GNULIB_POSIXCHECK +# undef expm1l +# if HAVE_RAW_DECL_EXPM1L +_GL_WARN_ON_USE (expm1l, "expm1l is unportable - " + "use gnulib module expm1l for portability"); +# endif +#endif + + +#if @GNULIB_FABSF@ +# if !@HAVE_FABSF@ +# undef fabsf +_GL_FUNCDECL_SYS (fabsf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (fabsf, float, (float x)); +_GL_CXXALIASWARN (fabsf); +#elif defined GNULIB_POSIXCHECK +# undef fabsf +# if HAVE_RAW_DECL_FABSF +_GL_WARN_ON_USE (fabsf, "fabsf is unportable - " + "use gnulib module fabsf for portability"); +# endif +#endif + +#if @GNULIB_FABSL@ +# if @REPLACE_FABSL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fabsl +# define fabsl rpl_fabsl +# endif +_GL_FUNCDECL_RPL (fabsl, long double, (long double x)); +_GL_CXXALIAS_RPL (fabsl, long double, (long double x)); +# else +# if !@HAVE_FABSL@ +# undef fabsl +_GL_FUNCDECL_SYS (fabsl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (fabsl, long double, (long double x)); +# endif +_GL_CXXALIASWARN (fabsl); +#elif defined GNULIB_POSIXCHECK +# undef fabsl +# if HAVE_RAW_DECL_FABSL +_GL_WARN_ON_USE (fabsl, "fabsl is unportable - " + "use gnulib module fabsl for portability"); +# endif +#endif + + +#if @GNULIB_FLOORF@ +# if @REPLACE_FLOORF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef floorf +# define floorf rpl_floorf +# endif +_GL_FUNCDECL_RPL (floorf, float, (float x)); +_GL_CXXALIAS_RPL (floorf, float, (float x)); +# else +# if !@HAVE_DECL_FLOORF@ +# undef floorf +_GL_FUNCDECL_SYS (floorf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (floorf, float, (float x)); +# endif +_GL_CXXALIASWARN (floorf); +#elif defined GNULIB_POSIXCHECK +# undef floorf +# if HAVE_RAW_DECL_FLOORF +_GL_WARN_ON_USE (floorf, "floorf is unportable - " + "use gnulib module floorf for portability"); +# endif +#endif + +#if @GNULIB_FLOOR@ +# if @REPLACE_FLOOR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define floor rpl_floor +# endif +_GL_FUNCDECL_RPL (floor, double, (double x)); +_GL_CXXALIAS_RPL (floor, double, (double x)); +# else +_GL_CXXALIAS_SYS (floor, double, (double x)); +# endif +_GL_CXXALIASWARN (floor); +#endif + +#if @GNULIB_FLOORL@ +# if @REPLACE_FLOORL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef floorl +# define floorl rpl_floorl +# endif +_GL_FUNCDECL_RPL (floorl, long double, (long double x)); +_GL_CXXALIAS_RPL (floorl, long double, (long double x)); +# else +# if !@HAVE_DECL_FLOORL@ +# undef floorl +_GL_FUNCDECL_SYS (floorl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (floorl, long double, (long double x)); +# endif +_GL_CXXALIASWARN (floorl); +#elif defined GNULIB_POSIXCHECK +# undef floorl +# if HAVE_RAW_DECL_FLOORL +_GL_WARN_ON_USE (floorl, "floorl is unportable - " + "use gnulib module floorl for portability"); +# endif +#endif + + +#if @GNULIB_FMAF@ +# if @REPLACE_FMAF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fmaf +# define fmaf rpl_fmaf +# endif +_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z)); +_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z)); +# else +# if !@HAVE_FMAF@ +_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z)); +# endif +_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z)); +# endif +_GL_CXXALIASWARN (fmaf); +#elif defined GNULIB_POSIXCHECK +# undef fmaf +# if HAVE_RAW_DECL_FMAF +_GL_WARN_ON_USE (fmaf, "fmaf is unportable - " + "use gnulib module fmaf for portability"); +# endif +#endif + +#if @GNULIB_FMA@ +# if @REPLACE_FMA@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fma +# define fma rpl_fma +# endif +_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z)); +_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z)); +# else +# if !@HAVE_FMA@ +_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z)); +# endif +_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z)); +# endif +_GL_CXXALIASWARN (fma); +#elif defined GNULIB_POSIXCHECK +# undef fma +# if HAVE_RAW_DECL_FMA +_GL_WARN_ON_USE (fma, "fma is unportable - " + "use gnulib module fma for portability"); +# endif +#endif + +#if @GNULIB_FMAL@ +# if @REPLACE_FMAL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fmal +# define fmal rpl_fmal +# endif +_GL_FUNCDECL_RPL (fmal, long double, + (long double x, long double y, long double z)); +_GL_CXXALIAS_RPL (fmal, long double, + (long double x, long double y, long double z)); +# else +# if !@HAVE_FMAL@ +# undef fmal +_GL_FUNCDECL_SYS (fmal, long double, + (long double x, long double y, long double z)); +# endif +_GL_CXXALIAS_SYS (fmal, long double, + (long double x, long double y, long double z)); +# endif +_GL_CXXALIASWARN (fmal); +#elif defined GNULIB_POSIXCHECK +# undef fmal +# if HAVE_RAW_DECL_FMAL +_GL_WARN_ON_USE (fmal, "fmal is unportable - " + "use gnulib module fmal for portability"); +# endif +#endif + + +#if @GNULIB_FMODF@ +# if @REPLACE_FMODF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fmodf +# define fmodf rpl_fmodf +# endif +_GL_FUNCDECL_RPL (fmodf, float, (float x, float y)); +_GL_CXXALIAS_RPL (fmodf, float, (float x, float y)); +# else +# if !@HAVE_FMODF@ +# undef fmodf +_GL_FUNCDECL_SYS (fmodf, float, (float x, float y)); +# endif +_GL_CXXALIAS_SYS (fmodf, float, (float x, float y)); +# endif +_GL_CXXALIASWARN (fmodf); +#elif defined GNULIB_POSIXCHECK +# undef fmodf +# if HAVE_RAW_DECL_FMODF +_GL_WARN_ON_USE (fmodf, "fmodf is unportable - " + "use gnulib module fmodf for portability"); +# endif +#endif + +#if @GNULIB_FMOD@ +# if @REPLACE_FMOD@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fmod +# define fmod rpl_fmod +# endif +_GL_FUNCDECL_RPL (fmod, double, (double x, double y)); +_GL_CXXALIAS_RPL (fmod, double, (double x, double y)); +# else +_GL_CXXALIAS_SYS (fmod, double, (double x, double y)); +# endif +_GL_CXXALIASWARN (fmod); +#elif defined GNULIB_POSIXCHECK +# undef fmod +# if HAVE_RAW_DECL_FMOD +_GL_WARN_ON_USE (fmod, "fmod has portability problems - " + "use gnulib module fmod for portability"); +# endif +#endif + +#if @GNULIB_FMODL@ +# if @REPLACE_FMODL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fmodl +# define fmodl rpl_fmodl +# endif +_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y)); +_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y)); +# else +# if !@HAVE_FMODL@ +# undef fmodl +_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y)); +# endif +_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y)); +# endif +_GL_CXXALIASWARN (fmodl); +#elif defined GNULIB_POSIXCHECK +# undef fmodl +# if HAVE_RAW_DECL_FMODL +_GL_WARN_ON_USE (fmodl, "fmodl is unportable - " + "use gnulib module fmodl for portability"); +# endif +#endif + + +/* Write x as + x = mantissa * 2^exp + where + If x finite and nonzero: 0.5 <= |mantissa| < 1.0. + If x is zero: mantissa = x, exp = 0. + If x is infinite or NaN: mantissa = x, exp unspecified. + Store exp in *EXPPTR and return mantissa. */ +#if @GNULIB_FREXPF@ +# if @REPLACE_FREXPF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef frexpf +# define frexpf rpl_frexpf +# endif +_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr)); +# else +# if !@HAVE_FREXPF@ +# undef frexpf +_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr)); +# endif +_GL_CXXALIASWARN (frexpf); +#elif defined GNULIB_POSIXCHECK +# undef frexpf +# if HAVE_RAW_DECL_FREXPF +_GL_WARN_ON_USE (frexpf, "frexpf is unportable - " + "use gnulib module frexpf for portability"); +# endif +#endif + +/* Write x as + x = mantissa * 2^exp + where + If x finite and nonzero: 0.5 <= |mantissa| < 1.0. + If x is zero: mantissa = x, exp = 0. + If x is infinite or NaN: mantissa = x, exp unspecified. + Store exp in *EXPPTR and return mantissa. */ +#if @GNULIB_FREXP@ +# if @REPLACE_FREXP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define frexp rpl_frexp +# endif +_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); +# else +_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); +# endif +_GL_CXXALIASWARN (frexp); +#elif defined GNULIB_POSIXCHECK +# undef frexp +/* Assume frexp is always declared. */ +_GL_WARN_ON_USE (frexp, "frexp is unportable - " + "use gnulib module frexp for portability"); +#endif + +/* Write x as + x = mantissa * 2^exp + where + If x finite and nonzero: 0.5 <= |mantissa| < 1.0. + If x is zero: mantissa = x, exp = 0. + If x is infinite or NaN: mantissa = x, exp unspecified. + Store exp in *EXPPTR and return mantissa. */ +#if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef frexpl +# define frexpl rpl_frexpl +# endif +_GL_FUNCDECL_RPL (frexpl, long double, + (long double x, int *expptr) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); +#else +# if !@HAVE_DECL_FREXPL@ +_GL_FUNCDECL_SYS (frexpl, long double, + (long double x, int *expptr) _GL_ARG_NONNULL ((2))); +# endif +# if @GNULIB_FREXPL@ +_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); +# endif +#endif +#if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@) +_GL_CXXALIASWARN (frexpl); +#endif +#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK +# undef frexpl +# if HAVE_RAW_DECL_FREXPL +_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " + "use gnulib module frexpl for portability"); +# endif +#endif + + +/* Return sqrt(x^2+y^2). */ +#if @GNULIB_HYPOTF@ +# if @REPLACE_HYPOTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef hypotf +# define hypotf rpl_hypotf +# endif +_GL_FUNCDECL_RPL (hypotf, float, (float x, float y)); +_GL_CXXALIAS_RPL (hypotf, float, (float x, float y)); +# else +# if !@HAVE_HYPOTF@ +_GL_FUNCDECL_SYS (hypotf, float, (float x, float y)); +# endif +_GL_CXXALIAS_SYS (hypotf, float, (float x, float y)); +# endif +_GL_CXXALIASWARN (hypotf); +#elif defined GNULIB_POSIXCHECK +# undef hypotf +# if HAVE_RAW_DECL_HYPOTF +_GL_WARN_ON_USE (hypotf, "hypotf is unportable - " + "use gnulib module hypotf for portability"); +# endif +#endif + +/* Return sqrt(x^2+y^2). */ +#if @GNULIB_HYPOT@ +# if @REPLACE_HYPOT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef hypot +# define hypot rpl_hypot +# endif +_GL_FUNCDECL_RPL (hypot, double, (double x, double y)); +_GL_CXXALIAS_RPL (hypot, double, (double x, double y)); +# else +_GL_CXXALIAS_SYS (hypot, double, (double x, double y)); +# endif +_GL_CXXALIASWARN (hypot); +#elif defined GNULIB_POSIXCHECK +# undef hypot +# if HAVE_RAW_DECL_HYPOT +_GL_WARN_ON_USE (hypotf, "hypot has portability problems - " + "use gnulib module hypot for portability"); +# endif +#endif + +/* Return sqrt(x^2+y^2). */ +#if @GNULIB_HYPOTL@ +# if @REPLACE_HYPOTL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef hypotl +# define hypotl rpl_hypotl +# endif +_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y)); +_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y)); +# else +# if !@HAVE_HYPOTL@ +_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y)); +# endif +_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y)); +# endif +_GL_CXXALIASWARN (hypotl); +#elif defined GNULIB_POSIXCHECK +# undef hypotl +# if HAVE_RAW_DECL_HYPOTL +_GL_WARN_ON_USE (hypotl, "hypotl is unportable - " + "use gnulib module hypotl for portability"); +# endif +#endif + + +#if @GNULIB_ILOGBF@ +# if @REPLACE_ILOGBF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ilogbf +# define ilogbf rpl_ilogbf +# endif +_GL_FUNCDECL_RPL (ilogbf, int, (float x)); +_GL_CXXALIAS_RPL (ilogbf, int, (float x)); +# else +# if !@HAVE_ILOGBF@ +_GL_FUNCDECL_SYS (ilogbf, int, (float x)); +# endif +_GL_CXXALIAS_SYS (ilogbf, int, (float x)); +# endif +_GL_CXXALIASWARN (ilogbf); +#elif defined GNULIB_POSIXCHECK +# undef ilogbf +# if HAVE_RAW_DECL_ILOGBF +_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - " + "use gnulib module ilogbf for portability"); +# endif +#endif + +#if @GNULIB_ILOGB@ +# if @REPLACE_ILOGB@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ilogb +# define ilogb rpl_ilogb +# endif +_GL_FUNCDECL_RPL (ilogb, int, (double x)); +_GL_CXXALIAS_RPL (ilogb, int, (double x)); +# else +# if !@HAVE_ILOGB@ +_GL_FUNCDECL_SYS (ilogb, int, (double x)); +# endif +_GL_CXXALIAS_SYS (ilogb, int, (double x)); +# endif +_GL_CXXALIASWARN (ilogb); +#elif defined GNULIB_POSIXCHECK +# undef ilogb +# if HAVE_RAW_DECL_ILOGB +_GL_WARN_ON_USE (ilogb, "ilogb is unportable - " + "use gnulib module ilogb for portability"); +# endif +#endif + +#if @GNULIB_ILOGBL@ +# if !@HAVE_ILOGBL@ +_GL_FUNCDECL_SYS (ilogbl, int, (long double x)); +# endif +_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); +_GL_CXXALIASWARN (ilogbl); +#elif defined GNULIB_POSIXCHECK +# undef ilogbl +# if HAVE_RAW_DECL_ILOGBL +_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - " + "use gnulib module ilogbl for portability"); +# endif +#endif + + +/* Return x * 2^exp. */ +#if @GNULIB_LDEXPF@ +# if !@HAVE_LDEXPF@ +# undef ldexpf +_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp)); +# endif +_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp)); +_GL_CXXALIASWARN (ldexpf); +#elif defined GNULIB_POSIXCHECK +# undef ldexpf +# if HAVE_RAW_DECL_LDEXPF +_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - " + "use gnulib module ldexpf for portability"); +# endif +#endif + +/* Return x * 2^exp. */ +#if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ldexpl +# define ldexpl rpl_ldexpl +# endif +_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); +_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); +#else +# if !@HAVE_DECL_LDEXPL@ +_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); +# endif +# if @GNULIB_LDEXPL@ +_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); +# endif +#endif +#if @GNULIB_LDEXPL@ +_GL_CXXALIASWARN (ldexpl); +#endif +#if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK +# undef ldexpl +# if HAVE_RAW_DECL_LDEXPL +_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " + "use gnulib module ldexpl for portability"); +# endif +#endif + + +#if @GNULIB_LOGF@ +# if @REPLACE_LOGF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef logf +# define logf rpl_logf +# endif +_GL_FUNCDECL_RPL (logf, float, (float x)); +_GL_CXXALIAS_RPL (logf, float, (float x)); +# else +# if !@HAVE_LOGF@ +# undef logf +_GL_FUNCDECL_SYS (logf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (logf, float, (float x)); +# endif +_GL_CXXALIASWARN (logf); +#elif defined GNULIB_POSIXCHECK +# undef logf +# if HAVE_RAW_DECL_LOGF +_GL_WARN_ON_USE (logf, "logf is unportable - " + "use gnulib module logf for portability"); +# endif +#endif + +#if @GNULIB_LOG@ +# if @REPLACE_LOG@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef log +# define log rpl_log +# endif +_GL_FUNCDECL_RPL (log, double, (double x)); +_GL_CXXALIAS_RPL (log, double, (double x)); +# else +_GL_CXXALIAS_SYS (log, double, (double x)); +# endif +_GL_CXXALIASWARN (log); +#elif defined GNULIB_POSIXCHECK +# undef log +# if HAVE_RAW_DECL_LOG +_GL_WARN_ON_USE (log, "log has portability problems - " + "use gnulib module log for portability"); +# endif +#endif + +#if @GNULIB_LOGL@ +# if @REPLACE_LOGL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef logl +# define logl rpl_logl +# endif +_GL_FUNCDECL_RPL (logl, long double, (long double x)); +_GL_CXXALIAS_RPL (logl, long double, (long double x)); +# else +# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ +# undef logl +_GL_FUNCDECL_SYS (logl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (logl, long double, (long double x)); +# endif +_GL_CXXALIASWARN (logl); +#elif defined GNULIB_POSIXCHECK +# undef logl +# if HAVE_RAW_DECL_LOGL +_GL_WARN_ON_USE (logl, "logl is unportable - " + "use gnulib module logl for portability"); +# endif +#endif + + +#if @GNULIB_LOG10F@ +# if @REPLACE_LOG10F@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef log10f +# define log10f rpl_log10f +# endif +_GL_FUNCDECL_RPL (log10f, float, (float x)); +_GL_CXXALIAS_RPL (log10f, float, (float x)); +# else +# if !@HAVE_LOG10F@ +# undef log10f +_GL_FUNCDECL_SYS (log10f, float, (float x)); +# endif +_GL_CXXALIAS_SYS (log10f, float, (float x)); +# endif +_GL_CXXALIASWARN (log10f); +#elif defined GNULIB_POSIXCHECK +# undef log10f +# if HAVE_RAW_DECL_LOG10F +_GL_WARN_ON_USE (log10f, "log10f is unportable - " + "use gnulib module log10f for portability"); +# endif +#endif + +#if @GNULIB_LOG10@ +# if @REPLACE_LOG10@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef log10 +# define log10 rpl_log10 +# endif +_GL_FUNCDECL_RPL (log10, double, (double x)); +_GL_CXXALIAS_RPL (log10, double, (double x)); +# else +_GL_CXXALIAS_SYS (log10, double, (double x)); +# endif +_GL_CXXALIASWARN (log10); +#elif defined GNULIB_POSIXCHECK +# undef log10 +# if HAVE_RAW_DECL_LOG10 +_GL_WARN_ON_USE (log10, "log10 has portability problems - " + "use gnulib module log10 for portability"); +# endif +#endif + +#if @GNULIB_LOG10L@ +# if @REPLACE_LOG10L@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef log10l +# define log10l rpl_log10l +# endif +_GL_FUNCDECL_RPL (log10l, long double, (long double x)); +_GL_CXXALIAS_RPL (log10l, long double, (long double x)); +# else +# if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@ +# undef log10l +_GL_FUNCDECL_SYS (log10l, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (log10l, long double, (long double x)); +# endif +_GL_CXXALIASWARN (log10l); +#elif defined GNULIB_POSIXCHECK +# undef log10l +# if HAVE_RAW_DECL_LOG10L +_GL_WARN_ON_USE (log10l, "log10l is unportable - " + "use gnulib module log10l for portability"); +# endif +#endif + + +#if @GNULIB_LOG1PF@ +# if @REPLACE_LOG1PF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef log1pf +# define log1pf rpl_log1pf +# endif +_GL_FUNCDECL_RPL (log1pf, float, (float x)); +_GL_CXXALIAS_RPL (log1pf, float, (float x)); +# else +# if !@HAVE_LOG1PF@ +_GL_FUNCDECL_SYS (log1pf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (log1pf, float, (float x)); +# endif +_GL_CXXALIASWARN (log1pf); +#elif defined GNULIB_POSIXCHECK +# undef log1pf +# if HAVE_RAW_DECL_LOG1PF +_GL_WARN_ON_USE (log1pf, "log1pf is unportable - " + "use gnulib module log1pf for portability"); +# endif +#endif + +#if @GNULIB_LOG1P@ +# if @REPLACE_LOG1P@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef log1p +# define log1p rpl_log1p +# endif +_GL_FUNCDECL_RPL (log1p, double, (double x)); +_GL_CXXALIAS_RPL (log1p, double, (double x)); +# else +# if !@HAVE_LOG1P@ +_GL_FUNCDECL_SYS (log1p, double, (double x)); +# endif +_GL_CXXALIAS_SYS (log1p, double, (double x)); +# endif +_GL_CXXALIASWARN (log1p); +#elif defined GNULIB_POSIXCHECK +# undef log1p +# if HAVE_RAW_DECL_LOG1P +_GL_WARN_ON_USE (log1p, "log1p has portability problems - " + "use gnulib module log1p for portability"); +# endif +#endif + +#if @GNULIB_LOG1PL@ +# if @REPLACE_LOG1PL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef log1pl +# define log1pl rpl_log1pl +# endif +_GL_FUNCDECL_RPL (log1pl, long double, (long double x)); +_GL_CXXALIAS_RPL (log1pl, long double, (long double x)); +# else +# if !@HAVE_LOG1PL@ +_GL_FUNCDECL_SYS (log1pl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (log1pl, long double, (long double x)); +# endif +_GL_CXXALIASWARN (log1pl); +#elif defined GNULIB_POSIXCHECK +# undef log1pl +# if HAVE_RAW_DECL_LOG1PL +_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - " + "use gnulib module log1pl for portability"); +# endif +#endif + + +#if @GNULIB_LOG2F@ +# if @REPLACE_LOG2F@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef log2f +# define log2f rpl_log2f +# endif +_GL_FUNCDECL_RPL (log2f, float, (float x)); +_GL_CXXALIAS_RPL (log2f, float, (float x)); +# else +# if !@HAVE_DECL_LOG2F@ +# undef log2f +_GL_FUNCDECL_SYS (log2f, float, (float x)); +# endif +_GL_CXXALIAS_SYS (log2f, float, (float x)); +# endif +_GL_CXXALIASWARN (log2f); +#elif defined GNULIB_POSIXCHECK +# undef log2f +# if HAVE_RAW_DECL_LOG2F +_GL_WARN_ON_USE (log2f, "log2f is unportable - " + "use gnulib module log2f for portability"); +# endif +#endif + +#if @GNULIB_LOG2@ +# if @REPLACE_LOG2@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef log2 +# define log2 rpl_log2 +# endif +_GL_FUNCDECL_RPL (log2, double, (double x)); +_GL_CXXALIAS_RPL (log2, double, (double x)); +# else +# if !@HAVE_DECL_LOG2@ +# undef log2 +_GL_FUNCDECL_SYS (log2, double, (double x)); +# endif +_GL_CXXALIAS_SYS (log2, double, (double x)); +# endif +_GL_CXXALIASWARN (log2); +#elif defined GNULIB_POSIXCHECK +# undef log2 +# if HAVE_RAW_DECL_LOG2 +_GL_WARN_ON_USE (log2, "log2 is unportable - " + "use gnulib module log2 for portability"); +# endif +#endif + +#if @GNULIB_LOG2L@ +# if @REPLACE_LOG2L@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef log2l +# define log2l rpl_log2l +# endif +_GL_FUNCDECL_RPL (log2l, long double, (long double x)); +_GL_CXXALIAS_RPL (log2l, long double, (long double x)); +# else +# if !@HAVE_DECL_LOG2L@ +_GL_FUNCDECL_SYS (log2l, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (log2l, long double, (long double x)); +# endif +_GL_CXXALIASWARN (log2l); +#elif defined GNULIB_POSIXCHECK +# undef log2l +# if HAVE_RAW_DECL_LOG2L +_GL_WARN_ON_USE (log2l, "log2l is unportable - " + "use gnulib module log2l for portability"); +# endif +#endif + + +#if @GNULIB_LOGBF@ +# if @REPLACE_LOGBF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef logbf +# define logbf rpl_logbf +# endif +_GL_FUNCDECL_RPL (logbf, float, (float x)); +_GL_CXXALIAS_RPL (logbf, float, (float x)); +# else +# if !@HAVE_LOGBF@ +_GL_FUNCDECL_SYS (logbf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (logbf, float, (float x)); +# endif +_GL_CXXALIASWARN (logbf); +#elif defined GNULIB_POSIXCHECK +# undef logbf +# if HAVE_RAW_DECL_LOGBF +_GL_WARN_ON_USE (logbf, "logbf is unportable - " + "use gnulib module logbf for portability"); +# endif +#endif + +#if @GNULIB_LOGB@ +# if @REPLACE_LOGB@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef logb +# define logb rpl_logb +# endif +_GL_FUNCDECL_RPL (logb, double, (double x)); +_GL_CXXALIAS_RPL (logb, double, (double x)); +# else +# if !@HAVE_DECL_LOGB@ +_GL_FUNCDECL_SYS (logb, double, (double x)); +# endif +_GL_CXXALIAS_SYS (logb, double, (double x)); +# endif +_GL_CXXALIASWARN (logb); +#elif defined GNULIB_POSIXCHECK +# undef logb +# if HAVE_RAW_DECL_LOGB +_GL_WARN_ON_USE (logb, "logb is unportable - " + "use gnulib module logb for portability"); +# endif +#endif + +#if @GNULIB_LOGBL@ +# if @REPLACE_LOGBL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef logbl +# define logbl rpl_logbl +# endif +_GL_FUNCDECL_RPL (logbl, long double, (long double x)); +_GL_CXXALIAS_RPL (logbl, long double, (long double x)); +# else +# if !@HAVE_LOGBL@ +_GL_FUNCDECL_SYS (logbl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (logbl, long double, (long double x)); +# endif +_GL_CXXALIASWARN (logbl); +#elif defined GNULIB_POSIXCHECK +# undef logbl +# if HAVE_RAW_DECL_LOGBL +_GL_WARN_ON_USE (logbl, "logbl is unportable - " + "use gnulib module logbl for portability"); +# endif +#endif + + +#if @GNULIB_MODFF@ +# if @REPLACE_MODFF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef modff +# define modff rpl_modff +# endif +_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr)); +# else +# if !@HAVE_MODFF@ +# undef modff +_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr)); +# endif +_GL_CXXALIASWARN (modff); +#elif defined GNULIB_POSIXCHECK +# undef modff +# if HAVE_RAW_DECL_MODFF +_GL_WARN_ON_USE (modff, "modff is unportable - " + "use gnulib module modff for portability"); +# endif +#endif + +#if @GNULIB_MODF@ +# if @REPLACE_MODF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef modf +# define modf rpl_modf +# endif +_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr)); +# else +_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr)); +# endif +_GL_CXXALIASWARN (modf); +#elif defined GNULIB_POSIXCHECK +# undef modf +# if HAVE_RAW_DECL_MODF +_GL_WARN_ON_USE (modf, "modf has portability problems - " + "use gnulib module modf for portability"); +# endif +#endif + +#if @GNULIB_MODFL@ +# if @REPLACE_MODFL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef modfl +# define modfl rpl_modfl +# endif +_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr)); +# else +# if !@HAVE_MODFL@ +# undef modfl +_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr)); +# endif +_GL_CXXALIASWARN (modfl); +#elif defined GNULIB_POSIXCHECK +# undef modfl +# if HAVE_RAW_DECL_MODFL +_GL_WARN_ON_USE (modfl, "modfl is unportable - " + "use gnulib module modfl for portability"); +# endif +#endif + + +#if @GNULIB_POWF@ +# if !@HAVE_POWF@ +# undef powf +_GL_FUNCDECL_SYS (powf, float, (float x, float y)); +# endif +_GL_CXXALIAS_SYS (powf, float, (float x, float y)); +_GL_CXXALIASWARN (powf); +#elif defined GNULIB_POSIXCHECK +# undef powf +# if HAVE_RAW_DECL_POWF +_GL_WARN_ON_USE (powf, "powf is unportable - " + "use gnulib module powf for portability"); +# endif +#endif + + +#if @GNULIB_REMAINDERF@ +# if @REPLACE_REMAINDERF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef remainderf +# define remainderf rpl_remainderf +# endif +_GL_FUNCDECL_RPL (remainderf, float, (float x, float y)); +_GL_CXXALIAS_RPL (remainderf, float, (float x, float y)); +# else +# if !@HAVE_REMAINDERF@ +_GL_FUNCDECL_SYS (remainderf, float, (float x, float y)); +# endif +_GL_CXXALIAS_SYS (remainderf, float, (float x, float y)); +# endif +_GL_CXXALIASWARN (remainderf); +#elif defined GNULIB_POSIXCHECK +# undef remainderf +# if HAVE_RAW_DECL_REMAINDERF +_GL_WARN_ON_USE (remainderf, "remainderf is unportable - " + "use gnulib module remainderf for portability"); +# endif +#endif + +#if @GNULIB_REMAINDER@ +# if @REPLACE_REMAINDER@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef remainder +# define remainder rpl_remainder +# endif +_GL_FUNCDECL_RPL (remainder, double, (double x, double y)); +_GL_CXXALIAS_RPL (remainder, double, (double x, double y)); +# else +# if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@ +_GL_FUNCDECL_SYS (remainder, double, (double x, double y)); +# endif +_GL_CXXALIAS_SYS (remainder, double, (double x, double y)); +# endif +_GL_CXXALIASWARN (remainder); +#elif defined GNULIB_POSIXCHECK +# undef remainder +# if HAVE_RAW_DECL_REMAINDER +_GL_WARN_ON_USE (remainder, "remainder is unportable - " + "use gnulib module remainder for portability"); +# endif +#endif + +#if @GNULIB_REMAINDERL@ +# if @REPLACE_REMAINDERL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef remainderl +# define remainderl rpl_remainderl +# endif +_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y)); +_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y)); +# else +# if !@HAVE_DECL_REMAINDERL@ +# undef remainderl +_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); +# endif +_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); +# endif +_GL_CXXALIASWARN (remainderl); +#elif defined GNULIB_POSIXCHECK +# undef remainderl +# if HAVE_RAW_DECL_REMAINDERL +_GL_WARN_ON_USE (remainderl, "remainderl is unportable - " + "use gnulib module remainderl for portability"); +# endif +#endif + + +#if @GNULIB_RINTF@ +# if !@HAVE_DECL_RINTF@ +_GL_FUNCDECL_SYS (rintf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (rintf, float, (float x)); +_GL_CXXALIASWARN (rintf); +#elif defined GNULIB_POSIXCHECK +# undef rintf +# if HAVE_RAW_DECL_RINTF +_GL_WARN_ON_USE (rintf, "rintf is unportable - " + "use gnulib module rintf for portability"); +# endif +#endif + +#if @GNULIB_RINT@ +# if !@HAVE_RINT@ +_GL_FUNCDECL_SYS (rint, double, (double x)); +# endif +_GL_CXXALIAS_SYS (rint, double, (double x)); +_GL_CXXALIASWARN (rint); +#elif defined GNULIB_POSIXCHECK +# undef rint +# if HAVE_RAW_DECL_RINT +_GL_WARN_ON_USE (rint, "rint is unportable - " + "use gnulib module rint for portability"); +# endif +#endif + +#if @GNULIB_RINTL@ +# if !@HAVE_RINTL@ +_GL_FUNCDECL_SYS (rintl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (rintl, long double, (long double x)); +_GL_CXXALIASWARN (rintl); +#elif defined GNULIB_POSIXCHECK +# undef rintl +# if HAVE_RAW_DECL_RINTL +_GL_WARN_ON_USE (rintl, "rintl is unportable - " + "use gnulib module rintl for portability"); +# endif +#endif + + +#if @GNULIB_ROUNDF@ +# if @REPLACE_ROUNDF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef roundf +# define roundf rpl_roundf +# endif +_GL_FUNCDECL_RPL (roundf, float, (float x)); +_GL_CXXALIAS_RPL (roundf, float, (float x)); +# else +# if !@HAVE_DECL_ROUNDF@ +_GL_FUNCDECL_SYS (roundf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (roundf, float, (float x)); +# endif +_GL_CXXALIASWARN (roundf); +#elif defined GNULIB_POSIXCHECK +# undef roundf +# if HAVE_RAW_DECL_ROUNDF +_GL_WARN_ON_USE (roundf, "roundf is unportable - " + "use gnulib module roundf for portability"); +# endif +#endif + +#if @GNULIB_ROUND@ +# if @REPLACE_ROUND@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef round +# define round rpl_round +# endif +_GL_FUNCDECL_RPL (round, double, (double x)); +_GL_CXXALIAS_RPL (round, double, (double x)); +# else +# if !@HAVE_DECL_ROUND@ +_GL_FUNCDECL_SYS (round, double, (double x)); +# endif +_GL_CXXALIAS_SYS (round, double, (double x)); +# endif +_GL_CXXALIASWARN (round); +#elif defined GNULIB_POSIXCHECK +# undef round +# if HAVE_RAW_DECL_ROUND +_GL_WARN_ON_USE (round, "round is unportable - " + "use gnulib module round for portability"); +# endif +#endif + +#if @GNULIB_ROUNDL@ +# if @REPLACE_ROUNDL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef roundl +# define roundl rpl_roundl +# endif +_GL_FUNCDECL_RPL (roundl, long double, (long double x)); +_GL_CXXALIAS_RPL (roundl, long double, (long double x)); +# else +# if !@HAVE_DECL_ROUNDL@ +# undef roundl +_GL_FUNCDECL_SYS (roundl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (roundl, long double, (long double x)); +# endif +_GL_CXXALIASWARN (roundl); +#elif defined GNULIB_POSIXCHECK +# undef roundl +# if HAVE_RAW_DECL_ROUNDL +_GL_WARN_ON_USE (roundl, "roundl is unportable - " + "use gnulib module roundl for portability"); +# endif +#endif + + +#if @GNULIB_SINF@ +# if !@HAVE_SINF@ +# undef sinf +_GL_FUNCDECL_SYS (sinf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (sinf, float, (float x)); +_GL_CXXALIASWARN (sinf); +#elif defined GNULIB_POSIXCHECK +# undef sinf +# if HAVE_RAW_DECL_SINF +_GL_WARN_ON_USE (sinf, "sinf is unportable - " + "use gnulib module sinf for portability"); +# endif +#endif + +#if @GNULIB_SINL@ +# if !@HAVE_SINL@ || !@HAVE_DECL_SINL@ +# undef sinl +_GL_FUNCDECL_SYS (sinl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (sinl, long double, (long double x)); +_GL_CXXALIASWARN (sinl); +#elif defined GNULIB_POSIXCHECK +# undef sinl +# if HAVE_RAW_DECL_SINL +_GL_WARN_ON_USE (sinl, "sinl is unportable - " + "use gnulib module sinl for portability"); +# endif +#endif + + +#if @GNULIB_SINHF@ +# if !@HAVE_SINHF@ +# undef sinhf +_GL_FUNCDECL_SYS (sinhf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (sinhf, float, (float x)); +_GL_CXXALIASWARN (sinhf); +#elif defined GNULIB_POSIXCHECK +# undef sinhf +# if HAVE_RAW_DECL_SINHF +_GL_WARN_ON_USE (sinhf, "sinhf is unportable - " + "use gnulib module sinhf for portability"); +# endif +#endif + + +#if @GNULIB_SQRTF@ +# if !@HAVE_SQRTF@ +# undef sqrtf +_GL_FUNCDECL_SYS (sqrtf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (sqrtf, float, (float x)); +_GL_CXXALIASWARN (sqrtf); +#elif defined GNULIB_POSIXCHECK +# undef sqrtf +# if HAVE_RAW_DECL_SQRTF +_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - " + "use gnulib module sqrtf for portability"); +# endif +#endif + +#if @GNULIB_SQRTL@ +# if @REPLACE_SQRTL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sqrtl +# define sqrtl rpl_sqrtl +# endif +_GL_FUNCDECL_RPL (sqrtl, long double, (long double x)); +_GL_CXXALIAS_RPL (sqrtl, long double, (long double x)); +# else +# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@ +# undef sqrtl +_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); +# endif +_GL_CXXALIASWARN (sqrtl); +#elif defined GNULIB_POSIXCHECK +# undef sqrtl +# if HAVE_RAW_DECL_SQRTL +_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " + "use gnulib module sqrtl for portability"); +# endif +#endif + + +#if @GNULIB_TANF@ +# if !@HAVE_TANF@ +# undef tanf +_GL_FUNCDECL_SYS (tanf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (tanf, float, (float x)); +_GL_CXXALIASWARN (tanf); +#elif defined GNULIB_POSIXCHECK +# undef tanf +# if HAVE_RAW_DECL_TANF +_GL_WARN_ON_USE (tanf, "tanf is unportable - " + "use gnulib module tanf for portability"); +# endif +#endif + +#if @GNULIB_TANL@ +# if !@HAVE_TANL@ || !@HAVE_DECL_TANL@ +# undef tanl +_GL_FUNCDECL_SYS (tanl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (tanl, long double, (long double x)); +_GL_CXXALIASWARN (tanl); +#elif defined GNULIB_POSIXCHECK +# undef tanl +# if HAVE_RAW_DECL_TANL +_GL_WARN_ON_USE (tanl, "tanl is unportable - " + "use gnulib module tanl for portability"); +# endif +#endif + + +#if @GNULIB_TANHF@ +# if !@HAVE_TANHF@ +# undef tanhf +_GL_FUNCDECL_SYS (tanhf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (tanhf, float, (float x)); +_GL_CXXALIASWARN (tanhf); +#elif defined GNULIB_POSIXCHECK +# undef tanhf +# if HAVE_RAW_DECL_TANHF +_GL_WARN_ON_USE (tanhf, "tanhf is unportable - " + "use gnulib module tanhf for portability"); +# endif +#endif + + +#if @GNULIB_TRUNCF@ +# if @REPLACE_TRUNCF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define truncf rpl_truncf +# endif +_GL_FUNCDECL_RPL (truncf, float, (float x)); +_GL_CXXALIAS_RPL (truncf, float, (float x)); +# else +# if !@HAVE_DECL_TRUNCF@ +_GL_FUNCDECL_SYS (truncf, float, (float x)); +# endif +_GL_CXXALIAS_SYS (truncf, float, (float x)); +# endif +_GL_CXXALIASWARN (truncf); +#elif defined GNULIB_POSIXCHECK +# undef truncf +# if HAVE_RAW_DECL_TRUNCF +_GL_WARN_ON_USE (truncf, "truncf is unportable - " + "use gnulib module truncf for portability"); +# endif +#endif + +#if @GNULIB_TRUNC@ +# if @REPLACE_TRUNC@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define trunc rpl_trunc +# endif +_GL_FUNCDECL_RPL (trunc, double, (double x)); +_GL_CXXALIAS_RPL (trunc, double, (double x)); +# else +# if !@HAVE_DECL_TRUNC@ +_GL_FUNCDECL_SYS (trunc, double, (double x)); +# endif +_GL_CXXALIAS_SYS (trunc, double, (double x)); +# endif +_GL_CXXALIASWARN (trunc); +#elif defined GNULIB_POSIXCHECK +# undef trunc +# if HAVE_RAW_DECL_TRUNC +_GL_WARN_ON_USE (trunc, "trunc is unportable - " + "use gnulib module trunc for portability"); +# endif +#endif + +#if @GNULIB_TRUNCL@ +# if @REPLACE_TRUNCL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef truncl +# define truncl rpl_truncl +# endif +_GL_FUNCDECL_RPL (truncl, long double, (long double x)); +_GL_CXXALIAS_RPL (truncl, long double, (long double x)); +# else +# if !@HAVE_DECL_TRUNCL@ +_GL_FUNCDECL_SYS (truncl, long double, (long double x)); +# endif +_GL_CXXALIAS_SYS (truncl, long double, (long double x)); +# endif +_GL_CXXALIASWARN (truncl); +#elif defined GNULIB_POSIXCHECK +# undef truncl +# if HAVE_RAW_DECL_TRUNCL +_GL_WARN_ON_USE (truncl, "truncl is unportable - " + "use gnulib module truncl for portability"); +# endif +#endif + + +/* Definitions of function-like macros come here, after the function + declarations. */ + + +#if @GNULIB_ISFINITE@ +# if @REPLACE_ISFINITE@ +_GL_EXTERN_C int gl_isfinitef (float x); +_GL_EXTERN_C int gl_isfinited (double x); +_GL_EXTERN_C int gl_isfinitel (long double x); +# undef isfinite +# define isfinite(x) \ + (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ + sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ + gl_isfinitef (x)) +# endif +# ifdef __cplusplus +# ifdef isfinite +_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) +# undef isfinite +_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite) +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# if defined isfinite +_GL_WARN_REAL_FLOATING_DECL (isfinite); +# undef isfinite +# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) +# endif +#endif + + +#if @GNULIB_ISINF@ +# if @REPLACE_ISINF@ +_GL_EXTERN_C int gl_isinff (float x); +_GL_EXTERN_C int gl_isinfd (double x); +_GL_EXTERN_C int gl_isinfl (long double x); +# undef isinf +# define isinf(x) \ + (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ + sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ + gl_isinff (x)) +# endif +# ifdef __cplusplus +# ifdef isinf +_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) +# undef isinf +_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf) +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# if defined isinf +_GL_WARN_REAL_FLOATING_DECL (isinf); +# undef isinf +# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) +# endif +#endif + + +#if @GNULIB_ISNANF@ +/* Test for NaN for 'float' numbers. */ +# if @HAVE_ISNANF@ +/* The original included above provides a declaration of isnan macro + or (older) isnanf function. */ +# if __GNUC__ >= 4 + /* GCC 4.0 and newer provides three built-ins for isnan. */ +# undef isnanf +# define isnanf(x) __builtin_isnanf ((float)(x)) +# elif defined isnan +# undef isnanf +# define isnanf(x) isnan ((float)(x)) +# endif +# else +/* Test whether X is a NaN. */ +# undef isnanf +# define isnanf rpl_isnanf +_GL_EXTERN_C int isnanf (float x); +# endif +#endif + +#if @GNULIB_ISNAND@ +/* Test for NaN for 'double' numbers. + This function is a gnulib extension, unlike isnan() which applied only + to 'double' numbers earlier but now is a type-generic macro. */ +# if @HAVE_ISNAND@ +/* The original included above provides a declaration of isnan + macro. */ +# if __GNUC__ >= 4 + /* GCC 4.0 and newer provides three built-ins for isnan. */ +# undef isnand +# define isnand(x) __builtin_isnan ((double)(x)) +# else +# undef isnand +# define isnand(x) isnan ((double)(x)) +# endif +# else +/* Test whether X is a NaN. */ +# undef isnand +# define isnand rpl_isnand +_GL_EXTERN_C int isnand (double x); +# endif +#endif + +#if @GNULIB_ISNANL@ +/* Test for NaN for 'long double' numbers. */ +# if @HAVE_ISNANL@ +/* The original included above provides a declaration of isnan + macro or (older) isnanl function. */ +# if __GNUC__ >= 4 + /* GCC 4.0 and newer provides three built-ins for isnan. */ +# undef isnanl +# define isnanl(x) __builtin_isnanl ((long double)(x)) +# elif defined isnan +# undef isnanl +# define isnanl(x) isnan ((long double)(x)) +# endif +# else +/* Test whether X is a NaN. */ +# undef isnanl +# define isnanl rpl_isnanl +_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST; +# endif +#endif + +/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ +#if @GNULIB_ISNAN@ +# if @REPLACE_ISNAN@ +/* We can't just use the isnanf macro (e.g.) as exposed by + isnanf.h (e.g.) here, because those may end up being macros + that recursively expand back to isnan. So use the gnulib + replacements for them directly. */ +# if @HAVE_ISNANF@ && __GNUC__ >= 4 +# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) +# else +_GL_EXTERN_C int rpl_isnanf (float x); +# define gl_isnan_f(x) rpl_isnanf (x) +# endif +# if @HAVE_ISNAND@ && __GNUC__ >= 4 +# define gl_isnan_d(x) __builtin_isnan ((double)(x)) +# else +_GL_EXTERN_C int rpl_isnand (double x); +# define gl_isnan_d(x) rpl_isnand (x) +# endif +# if @HAVE_ISNANL@ && __GNUC__ >= 4 +# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) +# else +_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST; +# define gl_isnan_l(x) rpl_isnanl (x) +# endif +# undef isnan +# define isnan(x) \ + (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ + sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ + gl_isnan_f (x)) +# elif __GNUC__ >= 4 +# undef isnan +# define isnan(x) \ + (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ + sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ + __builtin_isnanf ((float)(x))) +# endif +# ifdef __cplusplus +# ifdef isnan +_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan) +# undef isnan +_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan) +# endif +# else +/* Ensure isnan is a macro. */ +# ifndef isnan +# define isnan isnan +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# if defined isnan +_GL_WARN_REAL_FLOATING_DECL (isnan); +# undef isnan +# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) +# endif +#endif + + +#if @GNULIB_SIGNBIT@ +# if @REPLACE_SIGNBIT_USING_GCC@ +# undef signbit + /* GCC 4.0 and newer provides three built-ins for signbit. */ +# define signbit(x) \ + (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ + sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ + __builtin_signbitf (x)) +# endif +# if @REPLACE_SIGNBIT@ +# undef signbit +_GL_EXTERN_C int gl_signbitf (float arg); +_GL_EXTERN_C int gl_signbitd (double arg); +_GL_EXTERN_C int gl_signbitl (long double arg); +# if __GNUC__ >= 2 && !defined __STRICT_ANSI__ +# define _GL_NUM_UINT_WORDS(type) \ + ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf +# define gl_signbitf_OPTIMIZED_MACRO +# define gl_signbitf(arg) \ + ({ union { float _value; \ + unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ + } _m; \ + _m._value = (arg); \ + (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ + }) +# endif +# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd +# define gl_signbitd_OPTIMIZED_MACRO +# define gl_signbitd(arg) \ + ({ union { double _value; \ + unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ + } _m; \ + _m._value = (arg); \ + (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ + }) +# endif +# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl +# define gl_signbitl_OPTIMIZED_MACRO +# define gl_signbitl(arg) \ + ({ union { long double _value; \ + unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ + } _m; \ + _m._value = (arg); \ + (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ + }) +# endif +# endif +# define signbit(x) \ + (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ + sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ + gl_signbitf (x)) +# endif +# ifdef __cplusplus +# ifdef signbit +_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) +# undef signbit +_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit) +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# if defined signbit +_GL_WARN_REAL_FLOATING_DECL (signbit); +# undef signbit +# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) +# endif +#endif + +_GL_INLINE_HEADER_END + +#endif /* _@GUARD_PREFIX@_MATH_H */ +#endif /* _@GUARD_PREFIX@_MATH_H */ diff --git a/gl/lib/mbchar.c b/gl/lib/mbchar.c new file mode 100644 index 0000000..7d5bfcc --- /dev/null +++ b/gl/lib/mbchar.c @@ -0,0 +1,37 @@ +/* Copyright (C) 2001, 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + +#include + +#define MBCHAR_INLINE _GL_EXTERN_INLINE + +#include + +#include "mbchar.h" + +#if IS_BASIC_ASCII + +/* Bit table of characters in the ISO C "basic character set". */ +const unsigned int is_basic_table [UCHAR_MAX / 32 + 1] = +{ + 0x00001a00, /* '\t' '\v' '\f' */ + 0xffffffef, /* ' '...'#' '%'...'?' */ + 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */ + 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */ + /* The remaining bits are 0. */ +}; + +#endif /* IS_BASIC_ASCII */ diff --git a/gl/lib/mbchar.h b/gl/lib/mbchar.h new file mode 100644 index 0000000..700174c --- /dev/null +++ b/gl/lib/mbchar.h @@ -0,0 +1,360 @@ +/* Multibyte character data type. + Copyright (C) 2001, 2005-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible . */ + +/* A multibyte character is a short subsequence of a char* string, + representing a single wide character. + + We use multibyte characters instead of wide characters because of + the following goals: + 1) correct multibyte handling, i.e. operate according to the LC_CTYPE + locale, + 2) ease of maintenance, i.e. the maintainer needs not know all details + of the ISO C 99 standard, + 3) don't fail grossly if the input is not in the encoding set by the + locale, because often different encodings are in use in the same + countries (ISO-8859-1/UTF-8, EUC-JP/Shift_JIS, ...), + 4) fast in the case of ASCII characters, + 5) portability, i.e. don't make unportable assumptions about wchar_t. + + Multibyte characters are only accessed through the mb* macros. + + mb_ptr (mbc) + return a pointer to the beginning of the multibyte sequence. + + mb_len (mbc) + returns the number of bytes occupied by the multibyte sequence. + Always > 0. + + mb_iseq (mbc, sc) + returns true if mbc is the standard ASCII character sc. + + mb_isnul (mbc) + returns true if mbc is the nul character. + + mb_cmp (mbc1, mbc2) + returns a positive, zero, or negative value depending on whether mbc1 + sorts after, same or before mbc2. + + mb_casecmp (mbc1, mbc2) + returns a positive, zero, or negative value depending on whether mbc1 + sorts after, same or before mbc2, modulo upper/lowercase conversion. + + mb_equal (mbc1, mbc2) + returns true if mbc1 and mbc2 are equal. + + mb_caseequal (mbc1, mbc2) + returns true if mbc1 and mbc2 are equal modulo upper/lowercase conversion. + + mb_isalnum (mbc) + returns true if mbc is alphanumeric. + + mb_isalpha (mbc) + returns true if mbc is alphabetic. + + mb_isascii(mbc) + returns true if mbc is plain ASCII. + + mb_isblank (mbc) + returns true if mbc is a blank. + + mb_iscntrl (mbc) + returns true if mbc is a control character. + + mb_isdigit (mbc) + returns true if mbc is a decimal digit. + + mb_isgraph (mbc) + returns true if mbc is a graphic character. + + mb_islower (mbc) + returns true if mbc is lowercase. + + mb_isprint (mbc) + returns true if mbc is a printable character. + + mb_ispunct (mbc) + returns true if mbc is a punctuation character. + + mb_isspace (mbc) + returns true if mbc is a space character. + + mb_isupper (mbc) + returns true if mbc is uppercase. + + mb_isxdigit (mbc) + returns true if mbc is a hexadecimal digit. + + mb_width (mbc) + returns the number of columns on the output device occupied by mbc. + Always >= 0. + + mb_putc (mbc, stream) + outputs mbc on stream, a byte oriented FILE stream opened for output. + + mb_setascii (&mbc, sc) + assigns the standard ASCII character sc to mbc. + + mb_copy (&destmbc, &srcmbc) + copies srcmbc to destmbc. + + Here are the function prototypes of the macros. + + extern const char * mb_ptr (const mbchar_t mbc); + extern size_t mb_len (const mbchar_t mbc); + extern bool mb_iseq (const mbchar_t mbc, char sc); + extern bool mb_isnul (const mbchar_t mbc); + extern int mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2); + extern int mb_casecmp (const mbchar_t mbc1, const mbchar_t mbc2); + extern bool mb_equal (const mbchar_t mbc1, const mbchar_t mbc2); + extern bool mb_caseequal (const mbchar_t mbc1, const mbchar_t mbc2); + extern bool mb_isalnum (const mbchar_t mbc); + extern bool mb_isalpha (const mbchar_t mbc); + extern bool mb_isascii (const mbchar_t mbc); + extern bool mb_isblank (const mbchar_t mbc); + extern bool mb_iscntrl (const mbchar_t mbc); + extern bool mb_isdigit (const mbchar_t mbc); + extern bool mb_isgraph (const mbchar_t mbc); + extern bool mb_islower (const mbchar_t mbc); + extern bool mb_isprint (const mbchar_t mbc); + extern bool mb_ispunct (const mbchar_t mbc); + extern bool mb_isspace (const mbchar_t mbc); + extern bool mb_isupper (const mbchar_t mbc); + extern bool mb_isxdigit (const mbchar_t mbc); + extern int mb_width (const mbchar_t mbc); + extern void mb_putc (const mbchar_t mbc, FILE *stream); + extern void mb_setascii (mbchar_t *new, char sc); + extern void mb_copy (mbchar_t *new, const mbchar_t *old); + */ + +#ifndef _MBCHAR_H +#define _MBCHAR_H 1 + +#include +#include + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.1 has a bug: and must be included before + . */ +#include +#include +#include +#include + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef MBCHAR_INLINE +# define MBCHAR_INLINE _GL_INLINE +#endif + +#define MBCHAR_BUF_SIZE 24 + +struct mbchar +{ + const char *ptr; /* pointer to current character */ + size_t bytes; /* number of bytes of current character, > 0 */ + bool wc_valid; /* true if wc is a valid wide character */ + wchar_t wc; /* if wc_valid: the current character */ + char buf[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */ +}; + +/* EOF (not a real character) is represented with bytes = 0 and + wc_valid = false. */ + +typedef struct mbchar mbchar_t; + +/* Access the current character. */ +#define mb_ptr(mbc) ((mbc).ptr) +#define mb_len(mbc) ((mbc).bytes) + +/* Comparison of characters. */ +#define mb_iseq(mbc, sc) ((mbc).wc_valid && (mbc).wc == (sc)) +#define mb_isnul(mbc) ((mbc).wc_valid && (mbc).wc == 0) +#define mb_cmp(mbc1, mbc2) \ + ((mbc1).wc_valid \ + ? ((mbc2).wc_valid \ + ? (int) (mbc1).wc - (int) (mbc2).wc \ + : -1) \ + : ((mbc2).wc_valid \ + ? 1 \ + : (mbc1).bytes == (mbc2).bytes \ + ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ + : (mbc1).bytes < (mbc2).bytes \ + ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ + : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) +#define mb_casecmp(mbc1, mbc2) \ + ((mbc1).wc_valid \ + ? ((mbc2).wc_valid \ + ? (int) towlower ((mbc1).wc) - (int) towlower ((mbc2).wc) \ + : -1) \ + : ((mbc2).wc_valid \ + ? 1 \ + : (mbc1).bytes == (mbc2).bytes \ + ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ + : (mbc1).bytes < (mbc2).bytes \ + ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ + : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) +#define mb_equal(mbc1, mbc2) \ + ((mbc1).wc_valid && (mbc2).wc_valid \ + ? (mbc1).wc == (mbc2).wc \ + : (mbc1).bytes == (mbc2).bytes \ + && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) +#define mb_caseequal(mbc1, mbc2) \ + ((mbc1).wc_valid && (mbc2).wc_valid \ + ? towlower ((mbc1).wc) == towlower ((mbc2).wc) \ + : (mbc1).bytes == (mbc2).bytes \ + && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) + +/* , classification. */ +#define mb_isascii(mbc) \ + ((mbc).wc_valid && (mbc).wc >= 0 && (mbc).wc <= 127) +#define mb_isalnum(mbc) ((mbc).wc_valid && iswalnum ((mbc).wc)) +#define mb_isalpha(mbc) ((mbc).wc_valid && iswalpha ((mbc).wc)) +#define mb_isblank(mbc) ((mbc).wc_valid && iswblank ((mbc).wc)) +#define mb_iscntrl(mbc) ((mbc).wc_valid && iswcntrl ((mbc).wc)) +#define mb_isdigit(mbc) ((mbc).wc_valid && iswdigit ((mbc).wc)) +#define mb_isgraph(mbc) ((mbc).wc_valid && iswgraph ((mbc).wc)) +#define mb_islower(mbc) ((mbc).wc_valid && iswlower ((mbc).wc)) +#define mb_isprint(mbc) ((mbc).wc_valid && iswprint ((mbc).wc)) +#define mb_ispunct(mbc) ((mbc).wc_valid && iswpunct ((mbc).wc)) +#define mb_isspace(mbc) ((mbc).wc_valid && iswspace ((mbc).wc)) +#define mb_isupper(mbc) ((mbc).wc_valid && iswupper ((mbc).wc)) +#define mb_isxdigit(mbc) ((mbc).wc_valid && iswxdigit ((mbc).wc)) + +/* Extra function. */ + +/* Unprintable characters appear as a small box of width 1. */ +#define MB_UNPRINTABLE_WIDTH 1 + +MBCHAR_INLINE int +mb_width_aux (wint_t wc) +{ + int w = wcwidth (wc); + /* For unprintable characters, arbitrarily return 0 for control characters + and MB_UNPRINTABLE_WIDTH otherwise. */ + return (w >= 0 ? w : iswcntrl (wc) ? 0 : MB_UNPRINTABLE_WIDTH); +} + +#define mb_width(mbc) \ + ((mbc).wc_valid ? mb_width_aux ((mbc).wc) : MB_UNPRINTABLE_WIDTH) + +/* Output. */ +#define mb_putc(mbc, stream) fwrite ((mbc).ptr, 1, (mbc).bytes, (stream)) + +/* Assignment. */ +#define mb_setascii(mbc, sc) \ + ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \ + (mbc)->wc = (mbc)->buf[0] = (sc)) + +/* Copying a character. */ +MBCHAR_INLINE void +mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc) +{ + if (old_mbc->ptr == &old_mbc->buf[0]) + { + memcpy (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes); + new_mbc->ptr = &new_mbc->buf[0]; + } + else + new_mbc->ptr = old_mbc->ptr; + new_mbc->bytes = old_mbc->bytes; + if ((new_mbc->wc_valid = old_mbc->wc_valid)) + new_mbc->wc = old_mbc->wc; +} + + +/* is_basic(c) tests whether the single-byte character c is in the + ISO C "basic character set". + This is a convenience function, and is in this file only to share code + between mbiter_multi.h and mbfile_multi.h. */ +#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) +/* The character set is ISO-646, not EBCDIC. */ +# define IS_BASIC_ASCII 1 + +extern const unsigned int is_basic_table[]; + +MBCHAR_INLINE bool +is_basic (char c) +{ + return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) + & 1; +} + +#else + +MBCHAR_INLINE bool +is_basic (char c) +{ + switch (c) + { + case '\t': case '\v': case '\f': + case ' ': case '!': case '"': case '#': case '%': + case '&': case '\'': case '(': case ')': case '*': + case '+': case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + case ':': case ';': case '<': case '=': case '>': + case '?': + case 'A': case 'B': case 'C': case 'D': case 'E': + case 'F': case 'G': case 'H': case 'I': case 'J': + case 'K': case 'L': case 'M': case 'N': case 'O': + case 'P': case 'Q': case 'R': case 'S': case 'T': + case 'U': case 'V': case 'W': case 'X': case 'Y': + case 'Z': + case '[': case '\\': case ']': case '^': case '_': + case 'a': case 'b': case 'c': case 'd': case 'e': + case 'f': case 'g': case 'h': case 'i': case 'j': + case 'k': case 'l': case 'm': case 'n': case 'o': + case 'p': case 'q': case 'r': case 's': case 't': + case 'u': case 'v': case 'w': case 'x': case 'y': + case 'z': case '{': case '|': case '}': case '~': + return 1; + default: + return 0; + } +} + +#endif + +_GL_INLINE_HEADER_END + +#endif /* _MBCHAR_H */ diff --git a/gl/lib/mbrtowc.c b/gl/lib/mbrtowc.c new file mode 100644 index 0000000..9415fd7 --- /dev/null +++ b/gl/lib/mbrtowc.c @@ -0,0 +1,402 @@ +/* Convert multibyte character to wide character. + Copyright (C) 1999-2002, 2005-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#if GNULIB_defined_mbstate_t +/* Implement mbrtowc() on top of mbtowc(). */ + +# include +# include + +# include "localcharset.h" +# include "streq.h" +# include "verify.h" + + +verify (sizeof (mbstate_t) >= 4); + +static char internal_state[4]; + +size_t +mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) +{ + char *pstate = (char *)ps; + + if (s == NULL) + { + pwc = NULL; + s = ""; + n = 1; + } + + if (n == 0) + return (size_t)(-2); + + /* Here n > 0. */ + + if (pstate == NULL) + pstate = internal_state; + + { + size_t nstate = pstate[0]; + char buf[4]; + const char *p; + size_t m; + + switch (nstate) + { + case 0: + p = s; + m = n; + break; + case 3: + buf[2] = pstate[3]; + /*FALLTHROUGH*/ + case 2: + buf[1] = pstate[2]; + /*FALLTHROUGH*/ + case 1: + buf[0] = pstate[1]; + p = buf; + m = nstate; + buf[m++] = s[0]; + if (n >= 2 && m < 4) + { + buf[m++] = s[1]; + if (n >= 3 && m < 4) + buf[m++] = s[2]; + } + break; + default: + errno = EINVAL; + return (size_t)(-1); + } + + /* Here m > 0. */ + +# if __GLIBC__ || defined __UCLIBC__ + /* Work around bug */ + mbtowc (NULL, NULL, 0); +# endif + { + int res = mbtowc (pwc, p, m); + + if (res >= 0) + { + if (pwc != NULL && ((*pwc == 0) != (res == 0))) + abort (); + if (nstate >= (res > 0 ? res : 1)) + abort (); + res -= nstate; + pstate[0] = 0; + return res; + } + + /* mbtowc does not distinguish between invalid and incomplete multibyte + sequences. But mbrtowc needs to make this distinction. + There are two possible approaches: + - Use iconv() and its return value. + - Use built-in knowledge about the possible encodings. + Given the low quality of implementation of iconv() on the systems that + lack mbrtowc(), we use the second approach. + The possible encodings are: + - 8-bit encodings, + - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS, + - UTF-8. + Use specialized code for each. */ + if (m >= 4 || m >= MB_CUR_MAX) + goto invalid; + /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ + { + const char *encoding = locale_charset (); + + if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) + { + /* Cf. unistr/u8-mblen.c. */ + unsigned char c = (unsigned char) p[0]; + + if (c >= 0xc2) + { + if (c < 0xe0) + { + if (m == 1) + goto incomplete; + } + else if (c < 0xf0) + { + if (m == 1) + goto incomplete; + if (m == 2) + { + unsigned char c2 = (unsigned char) p[1]; + + if ((c2 ^ 0x80) < 0x40 + && (c >= 0xe1 || c2 >= 0xa0) + && (c != 0xed || c2 < 0xa0)) + goto incomplete; + } + } + else if (c <= 0xf4) + { + if (m == 1) + goto incomplete; + else /* m == 2 || m == 3 */ + { + unsigned char c2 = (unsigned char) p[1]; + + if ((c2 ^ 0x80) < 0x40 + && (c >= 0xf1 || c2 >= 0x90) + && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) + { + if (m == 2) + goto incomplete; + else /* m == 3 */ + { + unsigned char c3 = (unsigned char) p[2]; + + if ((c3 ^ 0x80) < 0x40) + goto incomplete; + } + } + } + } + } + goto invalid; + } + + /* As a reference for this code, you can use the GNU libiconv + implementation. Look for uses of the RET_TOOFEW macro. */ + + if (STREQ_OPT (encoding, + "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) + { + if (m == 1) + { + unsigned char c = (unsigned char) p[0]; + + if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f) + goto incomplete; + } + if (m == 2) + { + unsigned char c = (unsigned char) p[0]; + + if (c == 0x8f) + { + unsigned char c2 = (unsigned char) p[1]; + + if (c2 >= 0xa1 && c2 < 0xff) + goto incomplete; + } + } + goto invalid; + } + if (STREQ_OPT (encoding, + "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) + || STREQ_OPT (encoding, + "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) + || STREQ_OPT (encoding, + "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) + { + if (m == 1) + { + unsigned char c = (unsigned char) p[0]; + + if (c >= 0xa1 && c < 0xff) + goto incomplete; + } + goto invalid; + } + if (STREQ_OPT (encoding, + "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) + { + if (m == 1) + { + unsigned char c = (unsigned char) p[0]; + + if ((c >= 0xa1 && c < 0xff) || c == 0x8e) + goto incomplete; + } + else /* m == 2 || m == 3 */ + { + unsigned char c = (unsigned char) p[0]; + + if (c == 0x8e) + goto incomplete; + } + goto invalid; + } + if (STREQ_OPT (encoding, + "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) + { + if (m == 1) + { + unsigned char c = (unsigned char) p[0]; + + if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe)) + goto incomplete; + } + else /* m == 2 || m == 3 */ + { + unsigned char c = (unsigned char) p[0]; + + if (c >= 0x90 && c <= 0xe3) + { + unsigned char c2 = (unsigned char) p[1]; + + if (c2 >= 0x30 && c2 <= 0x39) + { + if (m == 2) + goto incomplete; + else /* m == 3 */ + { + unsigned char c3 = (unsigned char) p[2]; + + if (c3 >= 0x81 && c3 <= 0xfe) + goto incomplete; + } + } + } + } + goto invalid; + } + if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) + { + if (m == 1) + { + unsigned char c = (unsigned char) p[0]; + + if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea) + || (c >= 0xf0 && c <= 0xf9)) + goto incomplete; + } + goto invalid; + } + + /* An unknown multibyte encoding. */ + goto incomplete; + } + + incomplete: + { + size_t k = nstate; + /* Here 0 <= k < m < 4. */ + pstate[++k] = s[0]; + if (k < m) + { + pstate[++k] = s[1]; + if (k < m) + pstate[++k] = s[2]; + } + if (k != m) + abort (); + } + pstate[0] = m; + return (size_t)(-2); + + invalid: + errno = EILSEQ; + /* The conversion state is undefined, says POSIX. */ + return (size_t)(-1); + } + } +} + +#else +/* Override the system's mbrtowc() function. */ + +# undef mbrtowc + +size_t +rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) +{ +# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG + if (s == NULL) + { + pwc = NULL; + s = ""; + n = 1; + } +# endif + +# if MBRTOWC_RETVAL_BUG + { + static mbstate_t internal_state; + + /* Override mbrtowc's internal state. We cannot call mbsinit() on the + hidden internal state, but we can call it on our variable. */ + if (ps == NULL) + ps = &internal_state; + + if (!mbsinit (ps)) + { + /* Parse the rest of the multibyte character byte for byte. */ + size_t count = 0; + for (; n > 0; s++, n--) + { + wchar_t wc; + size_t ret = mbrtowc (&wc, s, 1, ps); + + if (ret == (size_t)(-1)) + return (size_t)(-1); + count++; + if (ret != (size_t)(-2)) + { + /* The multibyte character has been completed. */ + if (pwc != NULL) + *pwc = wc; + return (wc == 0 ? 0 : count); + } + } + return (size_t)(-2); + } + } +# endif + +# if MBRTOWC_NUL_RETVAL_BUG + { + wchar_t wc; + size_t ret = mbrtowc (&wc, s, n, ps); + + if (ret != (size_t)(-1) && ret != (size_t)(-2)) + { + if (pwc != NULL) + *pwc = wc; + if (wc == 0) + ret = 0; + } + return ret; + } +# else + { +# if MBRTOWC_NULL_ARG1_BUG + wchar_t dummy; + + if (pwc == NULL) + pwc = &dummy; +# endif + + return mbrtowc (pwc, s, n, ps); + } +# endif +} + +#endif diff --git a/gl/lib/mbscasestr.c b/gl/lib/mbscasestr.c new file mode 100644 index 0000000..c419b35 --- /dev/null +++ b/gl/lib/mbscasestr.c @@ -0,0 +1,412 @@ +/* Case-insensitive searching in a string. + Copyright (C) 2005-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2005. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include /* for NULL, in case a nonstandard string.h lacks it */ + +#include "malloca.h" +#include "mbuiter.h" + +#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) + +/* Knuth-Morris-Pratt algorithm. */ +#define UNIT unsigned char +#define CANON_ELEMENT(c) TOLOWER (c) +#include "str-kmp.h" + +/* Knuth-Morris-Pratt algorithm. + See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm + Return a boolean indicating success: + Return true and set *RESULTP if the search was completed. + Return false if it was aborted because not enough memory was available. */ +static bool +knuth_morris_pratt_multibyte (const char *haystack, const char *needle, + const char **resultp) +{ + size_t m = mbslen (needle); + mbchar_t *needle_mbchars; + size_t *table; + + /* Allocate room for needle_mbchars and the table. */ + char *memory = (char *) nmalloca (m, sizeof (mbchar_t) + sizeof (size_t)); + if (memory == NULL) + return false; + needle_mbchars = (mbchar_t *) memory; + table = (size_t *) (memory + m * sizeof (mbchar_t)); + + /* Fill needle_mbchars. */ + { + mbui_iterator_t iter; + size_t j; + + j = 0; + for (mbui_init (iter, needle); mbui_avail (iter); mbui_advance (iter), j++) + { + mb_copy (&needle_mbchars[j], &mbui_cur (iter)); + if (needle_mbchars[j].wc_valid) + needle_mbchars[j].wc = towlower (needle_mbchars[j].wc); + } + } + + /* Fill the table. + For 0 < i < m: + 0 < table[i] <= i is defined such that + forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x], + and table[i] is as large as possible with this property. + This implies: + 1) For 0 < i < m: + If table[i] < i, + needle[table[i]..i-1] = needle[0..i-1-table[i]]. + 2) For 0 < i < m: + rhaystack[0..i-1] == needle[0..i-1] + and exists h, i <= h < m: rhaystack[h] != needle[h] + implies + forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1]. + table[0] remains uninitialized. */ + { + size_t i, j; + + /* i = 1: Nothing to verify for x = 0. */ + table[1] = 1; + j = 0; + + for (i = 2; i < m; i++) + { + /* Here: j = i-1 - table[i-1]. + The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold + for x < table[i-1], by induction. + Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ + mbchar_t *b = &needle_mbchars[i - 1]; + + for (;;) + { + /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x] + is known to hold for x < i-1-j. + Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ + if (mb_equal (*b, needle_mbchars[j])) + { + /* Set table[i] := i-1-j. */ + table[i] = i - ++j; + break; + } + /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds + for x = i-1-j, because + needle[i-1] != needle[j] = needle[i-1-x]. */ + if (j == 0) + { + /* The inequality holds for all possible x. */ + table[i] = i; + break; + } + /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds + for i-1-j < x < i-1-j+table[j], because for these x: + needle[x..i-2] + = needle[x-(i-1-j)..j-1] + != needle[0..j-1-(x-(i-1-j))] (by definition of table[j]) + = needle[0..i-2-x], + hence needle[x..i-1] != needle[0..i-1-x]. + Furthermore + needle[i-1-j+table[j]..i-2] + = needle[table[j]..j-1] + = needle[0..j-1-table[j]] (by definition of table[j]). */ + j = j - table[j]; + } + /* Here: j = i - table[i]. */ + } + } + + /* Search, using the table to accelerate the processing. */ + { + size_t j; + mbui_iterator_t rhaystack; + mbui_iterator_t phaystack; + + *resultp = NULL; + j = 0; + mbui_init (rhaystack, haystack); + mbui_init (phaystack, haystack); + /* Invariant: phaystack = rhaystack + j. */ + while (mbui_avail (phaystack)) + { + mbchar_t c; + + mb_copy (&c, &mbui_cur (phaystack)); + if (c.wc_valid) + c.wc = towlower (c.wc); + if (mb_equal (needle_mbchars[j], c)) + { + j++; + mbui_advance (phaystack); + if (j == m) + { + /* The entire needle has been found. */ + *resultp = mbui_cur_ptr (rhaystack); + break; + } + } + else if (j > 0) + { + /* Found a match of needle[0..j-1], mismatch at needle[j]. */ + size_t count = table[j]; + j -= count; + for (; count > 0; count--) + { + if (!mbui_avail (rhaystack)) + abort (); + mbui_advance (rhaystack); + } + } + else + { + /* Found a mismatch at needle[0] already. */ + if (!mbui_avail (rhaystack)) + abort (); + mbui_advance (rhaystack); + mbui_advance (phaystack); + } + } + } + + freea (memory); + return true; +} + +/* Find the first occurrence of the character string NEEDLE in the character + string HAYSTACK, using case-insensitive comparison. + Note: This function may, in multibyte locales, return success even if + strlen (haystack) < strlen (needle) ! */ +char * +mbscasestr (const char *haystack, const char *needle) +{ + /* Be careful not to look at the entire extent of haystack or needle + until needed. This is useful because of these two cases: + - haystack may be very long, and a match of needle found early, + - needle may be very long, and not even a short initial segment of + needle may be found in haystack. */ + if (MB_CUR_MAX > 1) + { + mbui_iterator_t iter_needle; + + mbui_init (iter_needle, needle); + if (mbui_avail (iter_needle)) + { + /* Minimizing the worst-case complexity: + Let n = mbslen(haystack), m = mbslen(needle). + The naïve algorithm is O(n*m) worst-case. + The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a + memory allocation. + To achieve linear complexity and yet amortize the cost of the + memory allocation, we activate the Knuth-Morris-Pratt algorithm + only once the naïve algorithm has already run for some time; more + precisely, when + - the outer loop count is >= 10, + - the average number of comparisons per outer loop is >= 5, + - the total number of comparisons is >= m. + But we try it only once. If the memory allocation attempt failed, + we don't retry it. */ + bool try_kmp = true; + size_t outer_loop_count = 0; + size_t comparison_count = 0; + size_t last_ccount = 0; /* last comparison count */ + mbui_iterator_t iter_needle_last_ccount; /* = needle + last_ccount */ + + mbchar_t b; + mbui_iterator_t iter_haystack; + + mbui_init (iter_needle_last_ccount, needle); + + mb_copy (&b, &mbui_cur (iter_needle)); + if (b.wc_valid) + b.wc = towlower (b.wc); + + mbui_init (iter_haystack, haystack); + for (;; mbui_advance (iter_haystack)) + { + mbchar_t c; + + if (!mbui_avail (iter_haystack)) + /* No match. */ + return NULL; + + /* See whether it's advisable to use an asymptotically faster + algorithm. */ + if (try_kmp + && outer_loop_count >= 10 + && comparison_count >= 5 * outer_loop_count) + { + /* See if needle + comparison_count now reaches the end of + needle. */ + size_t count = comparison_count - last_ccount; + for (; + count > 0 && mbui_avail (iter_needle_last_ccount); + count--) + mbui_advance (iter_needle_last_ccount); + last_ccount = comparison_count; + if (!mbui_avail (iter_needle_last_ccount)) + { + /* Try the Knuth-Morris-Pratt algorithm. */ + const char *result; + bool success = + knuth_morris_pratt_multibyte (haystack, needle, + &result); + if (success) + return (char *) result; + try_kmp = false; + } + } + + outer_loop_count++; + comparison_count++; + mb_copy (&c, &mbui_cur (iter_haystack)); + if (c.wc_valid) + c.wc = towlower (c.wc); + if (mb_equal (c, b)) + /* The first character matches. */ + { + mbui_iterator_t rhaystack; + mbui_iterator_t rneedle; + + memcpy (&rhaystack, &iter_haystack, sizeof (mbui_iterator_t)); + mbui_advance (rhaystack); + + mbui_init (rneedle, needle); + if (!mbui_avail (rneedle)) + abort (); + mbui_advance (rneedle); + + for (;; mbui_advance (rhaystack), mbui_advance (rneedle)) + { + if (!mbui_avail (rneedle)) + /* Found a match. */ + return (char *) mbui_cur_ptr (iter_haystack); + if (!mbui_avail (rhaystack)) + /* No match. */ + return NULL; + comparison_count++; + if (!mb_caseequal (mbui_cur (rhaystack), + mbui_cur (rneedle))) + /* Nothing in this round. */ + break; + } + } + } + } + else + return (char *) haystack; + } + else + { + if (*needle != '\0') + { + /* Minimizing the worst-case complexity: + Let n = strlen(haystack), m = strlen(needle). + The naïve algorithm is O(n*m) worst-case. + The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a + memory allocation. + To achieve linear complexity and yet amortize the cost of the + memory allocation, we activate the Knuth-Morris-Pratt algorithm + only once the naïve algorithm has already run for some time; more + precisely, when + - the outer loop count is >= 10, + - the average number of comparisons per outer loop is >= 5, + - the total number of comparisons is >= m. + But we try it only once. If the memory allocation attempt failed, + we don't retry it. */ + bool try_kmp = true; + size_t outer_loop_count = 0; + size_t comparison_count = 0; + size_t last_ccount = 0; /* last comparison count */ + const char *needle_last_ccount = needle; /* = needle + last_ccount */ + + /* Speed up the following searches of needle by caching its first + character. */ + unsigned char b = TOLOWER ((unsigned char) *needle); + + needle++; + for (;; haystack++) + { + if (*haystack == '\0') + /* No match. */ + return NULL; + + /* See whether it's advisable to use an asymptotically faster + algorithm. */ + if (try_kmp + && outer_loop_count >= 10 + && comparison_count >= 5 * outer_loop_count) + { + /* See if needle + comparison_count now reaches the end of + needle. */ + if (needle_last_ccount != NULL) + { + needle_last_ccount += + strnlen (needle_last_ccount, + comparison_count - last_ccount); + if (*needle_last_ccount == '\0') + needle_last_ccount = NULL; + last_ccount = comparison_count; + } + if (needle_last_ccount == NULL) + { + /* Try the Knuth-Morris-Pratt algorithm. */ + const unsigned char *result; + bool success = + knuth_morris_pratt ((const unsigned char *) haystack, + (const unsigned char *) (needle - 1), + strlen (needle - 1), + &result); + if (success) + return (char *) result; + try_kmp = false; + } + } + + outer_loop_count++; + comparison_count++; + if (TOLOWER ((unsigned char) *haystack) == b) + /* The first character matches. */ + { + const char *rhaystack = haystack + 1; + const char *rneedle = needle; + + for (;; rhaystack++, rneedle++) + { + if (*rneedle == '\0') + /* Found a match. */ + return (char *) haystack; + if (*rhaystack == '\0') + /* No match. */ + return NULL; + comparison_count++; + if (TOLOWER ((unsigned char) *rhaystack) + != TOLOWER ((unsigned char) *rneedle)) + /* Nothing in this round. */ + break; + } + } + } + } + else + return (char *) haystack; + } +} diff --git a/gl/lib/mbsinit.c b/gl/lib/mbsinit.c new file mode 100644 index 0000000..df4bcd1 --- /dev/null +++ b/gl/lib/mbsinit.c @@ -0,0 +1,61 @@ +/* Test for initial conversion state. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include "verify.h" + +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + +/* On native Windows, 'mbstate_t' is defined as 'int'. */ + +int +mbsinit (const mbstate_t *ps) +{ + return ps == NULL || *ps == 0; +} + +#else + +/* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() + and wcrtomb(), wcsrtombs(). + We assume that + - sizeof (mbstate_t) >= 4, + - only stateless encodings are supported (such as UTF-8 and EUC-JP, but + not ISO-2022 variants), + - for each encoding, the number of bytes for a wide character is <= 4. + (This maximum is attained for UTF-8, GB18030, EUC-TW.) + We define the meaning of mbstate_t as follows: + - In mb -> wc direction, mbstate_t's first byte contains the number of + buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. + - In wc -> mb direction, mbstate_t contains no information. In other + words, it is always in the initial state. */ + +verify (sizeof (mbstate_t) >= 4); + +int +mbsinit (const mbstate_t *ps) +{ + const char *pstate = (const char *)ps; + + return pstate == NULL || pstate[0] == 0; +} + +#endif diff --git a/gl/lib/mbslen.c b/gl/lib/mbslen.c new file mode 100644 index 0000000..74c6ec1 --- /dev/null +++ b/gl/lib/mbslen.c @@ -0,0 +1,44 @@ +/* Counting the multibyte characters in a string. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2007. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include + +#include "mbuiter.h" + +/* Return the number of multibyte characters in the character string STRING. */ +size_t +mbslen (const char *string) +{ + if (MB_CUR_MAX > 1) + { + size_t count; + mbui_iterator_t iter; + + count = 0; + for (mbui_init (iter, string); mbui_avail (iter); mbui_advance (iter)) + count++; + + return count; + } + else + return strlen (string); +} diff --git a/gl/lib/mbsrtowcs-impl.h b/gl/lib/mbsrtowcs-impl.h new file mode 100644 index 0000000..d42af01 --- /dev/null +++ b/gl/lib/mbsrtowcs-impl.h @@ -0,0 +1,122 @@ +/* Convert string to wide string. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +size_t +mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) +{ + if (ps == NULL) + ps = &_gl_mbsrtowcs_state; + { + const char *src = *srcp; + + if (dest != NULL) + { + wchar_t *destptr = dest; + + for (; len > 0; destptr++, len--) + { + size_t src_avail; + size_t ret; + + /* An optimized variant of + src_avail = strnlen1 (src, MB_LEN_MAX); */ + if (src[0] == '\0') + src_avail = 1; + else if (src[1] == '\0') + src_avail = 2; + else if (src[2] == '\0') + src_avail = 3; + else if (MB_LEN_MAX <= 4 || src[3] == '\0') + src_avail = 4; + else + src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4); + + /* Parse the next multibyte character. */ + ret = mbrtowc (destptr, src, src_avail, ps); + + if (ret == (size_t)(-2)) + /* Encountered a multibyte character that extends past a '\0' byte + or that is longer than MB_LEN_MAX bytes. Cannot happen. */ + abort (); + + if (ret == (size_t)(-1)) + goto bad_input; + if (ret == 0) + { + src = NULL; + /* Here mbsinit (ps). */ + break; + } + src += ret; + } + + *srcp = src; + return destptr - dest; + } + else + { + /* Ignore dest and len, don't store *srcp at the end, and + don't clobber *ps. */ + mbstate_t state = *ps; + size_t totalcount = 0; + + for (;; totalcount++) + { + size_t src_avail; + size_t ret; + + /* An optimized variant of + src_avail = strnlen1 (src, MB_LEN_MAX); */ + if (src[0] == '\0') + src_avail = 1; + else if (src[1] == '\0') + src_avail = 2; + else if (src[2] == '\0') + src_avail = 3; + else if (MB_LEN_MAX <= 4 || src[3] == '\0') + src_avail = 4; + else + src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4); + + /* Parse the next multibyte character. */ + ret = mbrtowc (NULL, src, src_avail, &state); + + if (ret == (size_t)(-2)) + /* Encountered a multibyte character that extends past a '\0' byte + or that is longer than MB_LEN_MAX bytes. Cannot happen. */ + abort (); + + if (ret == (size_t)(-1)) + goto bad_input2; + if (ret == 0) + { + /* Here mbsinit (&state). */ + break; + } + src += ret; + } + + return totalcount; + } + + bad_input: + *srcp = src; + bad_input2: + errno = EILSEQ; + return (size_t)(-1); + } +} diff --git a/gl/lib/mbsrtowcs-state.c b/gl/lib/mbsrtowcs-state.c new file mode 100644 index 0000000..2a7019a --- /dev/null +++ b/gl/lib/mbsrtowcs-state.c @@ -0,0 +1,37 @@ +/* Convert string to wide string. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +/* Internal state used by the functions mbsrtowcs() and mbsnrtowcs(). */ +mbstate_t _gl_mbsrtowcs_state +/* The state must initially be in the "initial state"; so, zero-initialize it. + On most systems, putting it into BSS is sufficient. Not so on Mac OS X 10.3, + see . + When it needs an initializer, use 0 or {0} as initializer? 0 only works + when mbstate_t is a scalar type (such as when gnulib defines it, or on + AIX, IRIX, mingw). {0} works as an initializer in all cases: for a struct + or union type, but also for a scalar type (ISO C 99, 6.7.8.(11)). */ +#if defined __ELF__ + /* On ELF systems, variables in BSS behave well. */ +#else + /* Use braces, to be on the safe side. */ + = { 0 } +#endif + ; diff --git a/gl/lib/mbsrtowcs.c b/gl/lib/mbsrtowcs.c new file mode 100644 index 0000000..136ec34 --- /dev/null +++ b/gl/lib/mbsrtowcs.c @@ -0,0 +1,32 @@ +/* Convert string to wide string. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include + +#include "strnlen1.h" + + +extern mbstate_t _gl_mbsrtowcs_state; + +#include "mbsrtowcs-impl.h" diff --git a/gl/lib/mbsstr.c b/gl/lib/mbsstr.c new file mode 100644 index 0000000..1ae9fe4 --- /dev/null +++ b/gl/lib/mbsstr.c @@ -0,0 +1,384 @@ +/* Searching in a string. + Copyright (C) 2005-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2005. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include /* for NULL, in case a nonstandard string.h lacks it */ + +#include "malloca.h" +#include "mbuiter.h" + +/* Knuth-Morris-Pratt algorithm. */ +#define UNIT unsigned char +#define CANON_ELEMENT(c) c +#include "str-kmp.h" + +/* Knuth-Morris-Pratt algorithm. + See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm + Return a boolean indicating success: + Return true and set *RESULTP if the search was completed. + Return false if it was aborted because not enough memory was available. */ +static bool +knuth_morris_pratt_multibyte (const char *haystack, const char *needle, + const char **resultp) +{ + size_t m = mbslen (needle); + mbchar_t *needle_mbchars; + size_t *table; + + /* Allocate room for needle_mbchars and the table. */ + void *memory = nmalloca (m, sizeof (mbchar_t) + sizeof (size_t)); + void *table_memory; + if (memory == NULL) + return false; + needle_mbchars = memory; + table_memory = needle_mbchars + m; + table = table_memory; + + /* Fill needle_mbchars. */ + { + mbui_iterator_t iter; + size_t j; + + j = 0; + for (mbui_init (iter, needle); mbui_avail (iter); mbui_advance (iter), j++) + mb_copy (&needle_mbchars[j], &mbui_cur (iter)); + } + + /* Fill the table. + For 0 < i < m: + 0 < table[i] <= i is defined such that + forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x], + and table[i] is as large as possible with this property. + This implies: + 1) For 0 < i < m: + If table[i] < i, + needle[table[i]..i-1] = needle[0..i-1-table[i]]. + 2) For 0 < i < m: + rhaystack[0..i-1] == needle[0..i-1] + and exists h, i <= h < m: rhaystack[h] != needle[h] + implies + forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1]. + table[0] remains uninitialized. */ + { + size_t i, j; + + /* i = 1: Nothing to verify for x = 0. */ + table[1] = 1; + j = 0; + + for (i = 2; i < m; i++) + { + /* Here: j = i-1 - table[i-1]. + The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold + for x < table[i-1], by induction. + Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ + mbchar_t *b = &needle_mbchars[i - 1]; + + for (;;) + { + /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x] + is known to hold for x < i-1-j. + Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ + if (mb_equal (*b, needle_mbchars[j])) + { + /* Set table[i] := i-1-j. */ + table[i] = i - ++j; + break; + } + /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds + for x = i-1-j, because + needle[i-1] != needle[j] = needle[i-1-x]. */ + if (j == 0) + { + /* The inequality holds for all possible x. */ + table[i] = i; + break; + } + /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds + for i-1-j < x < i-1-j+table[j], because for these x: + needle[x..i-2] + = needle[x-(i-1-j)..j-1] + != needle[0..j-1-(x-(i-1-j))] (by definition of table[j]) + = needle[0..i-2-x], + hence needle[x..i-1] != needle[0..i-1-x]. + Furthermore + needle[i-1-j+table[j]..i-2] + = needle[table[j]..j-1] + = needle[0..j-1-table[j]] (by definition of table[j]). */ + j = j - table[j]; + } + /* Here: j = i - table[i]. */ + } + } + + /* Search, using the table to accelerate the processing. */ + { + size_t j; + mbui_iterator_t rhaystack; + mbui_iterator_t phaystack; + + *resultp = NULL; + j = 0; + mbui_init (rhaystack, haystack); + mbui_init (phaystack, haystack); + /* Invariant: phaystack = rhaystack + j. */ + while (mbui_avail (phaystack)) + if (mb_equal (needle_mbchars[j], mbui_cur (phaystack))) + { + j++; + mbui_advance (phaystack); + if (j == m) + { + /* The entire needle has been found. */ + *resultp = mbui_cur_ptr (rhaystack); + break; + } + } + else if (j > 0) + { + /* Found a match of needle[0..j-1], mismatch at needle[j]. */ + size_t count = table[j]; + j -= count; + for (; count > 0; count--) + { + if (!mbui_avail (rhaystack)) + abort (); + mbui_advance (rhaystack); + } + } + else + { + /* Found a mismatch at needle[0] already. */ + if (!mbui_avail (rhaystack)) + abort (); + mbui_advance (rhaystack); + mbui_advance (phaystack); + } + } + + freea (memory); + return true; +} + +/* Find the first occurrence of the character string NEEDLE in the character + string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. */ +char * +mbsstr (const char *haystack, const char *needle) +{ + /* Be careful not to look at the entire extent of haystack or needle + until needed. This is useful because of these two cases: + - haystack may be very long, and a match of needle found early, + - needle may be very long, and not even a short initial segment of + needle may be found in haystack. */ + if (MB_CUR_MAX > 1) + { + mbui_iterator_t iter_needle; + + mbui_init (iter_needle, needle); + if (mbui_avail (iter_needle)) + { + /* Minimizing the worst-case complexity: + Let n = mbslen(haystack), m = mbslen(needle). + The naïve algorithm is O(n*m) worst-case. + The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a + memory allocation. + To achieve linear complexity and yet amortize the cost of the + memory allocation, we activate the Knuth-Morris-Pratt algorithm + only once the naïve algorithm has already run for some time; more + precisely, when + - the outer loop count is >= 10, + - the average number of comparisons per outer loop is >= 5, + - the total number of comparisons is >= m. + But we try it only once. If the memory allocation attempt failed, + we don't retry it. */ + bool try_kmp = true; + size_t outer_loop_count = 0; + size_t comparison_count = 0; + size_t last_ccount = 0; /* last comparison count */ + mbui_iterator_t iter_needle_last_ccount; /* = needle + last_ccount */ + + mbui_iterator_t iter_haystack; + + mbui_init (iter_needle_last_ccount, needle); + mbui_init (iter_haystack, haystack); + for (;; mbui_advance (iter_haystack)) + { + if (!mbui_avail (iter_haystack)) + /* No match. */ + return NULL; + + /* See whether it's advisable to use an asymptotically faster + algorithm. */ + if (try_kmp + && outer_loop_count >= 10 + && comparison_count >= 5 * outer_loop_count) + { + /* See if needle + comparison_count now reaches the end of + needle. */ + size_t count = comparison_count - last_ccount; + for (; + count > 0 && mbui_avail (iter_needle_last_ccount); + count--) + mbui_advance (iter_needle_last_ccount); + last_ccount = comparison_count; + if (!mbui_avail (iter_needle_last_ccount)) + { + /* Try the Knuth-Morris-Pratt algorithm. */ + const char *result; + bool success = + knuth_morris_pratt_multibyte (haystack, needle, + &result); + if (success) + return (char *) result; + try_kmp = false; + } + } + + outer_loop_count++; + comparison_count++; + if (mb_equal (mbui_cur (iter_haystack), mbui_cur (iter_needle))) + /* The first character matches. */ + { + mbui_iterator_t rhaystack; + mbui_iterator_t rneedle; + + memcpy (&rhaystack, &iter_haystack, sizeof (mbui_iterator_t)); + mbui_advance (rhaystack); + + mbui_init (rneedle, needle); + if (!mbui_avail (rneedle)) + abort (); + mbui_advance (rneedle); + + for (;; mbui_advance (rhaystack), mbui_advance (rneedle)) + { + if (!mbui_avail (rneedle)) + /* Found a match. */ + return (char *) mbui_cur_ptr (iter_haystack); + if (!mbui_avail (rhaystack)) + /* No match. */ + return NULL; + comparison_count++; + if (!mb_equal (mbui_cur (rhaystack), mbui_cur (rneedle))) + /* Nothing in this round. */ + break; + } + } + } + } + else + return (char *) haystack; + } + else + { + if (*needle != '\0') + { + /* Minimizing the worst-case complexity: + Let n = strlen(haystack), m = strlen(needle). + The naïve algorithm is O(n*m) worst-case. + The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a + memory allocation. + To achieve linear complexity and yet amortize the cost of the + memory allocation, we activate the Knuth-Morris-Pratt algorithm + only once the naïve algorithm has already run for some time; more + precisely, when + - the outer loop count is >= 10, + - the average number of comparisons per outer loop is >= 5, + - the total number of comparisons is >= m. + But we try it only once. If the memory allocation attempt failed, + we don't retry it. */ + bool try_kmp = true; + size_t outer_loop_count = 0; + size_t comparison_count = 0; + size_t last_ccount = 0; /* last comparison count */ + const char *needle_last_ccount = needle; /* = needle + last_ccount */ + + /* Speed up the following searches of needle by caching its first + character. */ + char b = *needle++; + + for (;; haystack++) + { + if (*haystack == '\0') + /* No match. */ + return NULL; + + /* See whether it's advisable to use an asymptotically faster + algorithm. */ + if (try_kmp + && outer_loop_count >= 10 + && comparison_count >= 5 * outer_loop_count) + { + /* See if needle + comparison_count now reaches the end of + needle. */ + if (needle_last_ccount != NULL) + { + needle_last_ccount += + strnlen (needle_last_ccount, + comparison_count - last_ccount); + if (*needle_last_ccount == '\0') + needle_last_ccount = NULL; + last_ccount = comparison_count; + } + if (needle_last_ccount == NULL) + { + /* Try the Knuth-Morris-Pratt algorithm. */ + const unsigned char *result; + bool success = + knuth_morris_pratt ((const unsigned char *) haystack, + (const unsigned char *) (needle - 1), + strlen (needle - 1), + &result); + if (success) + return (char *) result; + try_kmp = false; + } + } + + outer_loop_count++; + comparison_count++; + if (*haystack == b) + /* The first character matches. */ + { + const char *rhaystack = haystack + 1; + const char *rneedle = needle; + + for (;; rhaystack++, rneedle++) + { + if (*rneedle == '\0') + /* Found a match. */ + return (char *) haystack; + if (*rhaystack == '\0') + /* No match. */ + return NULL; + comparison_count++; + if (*rhaystack != *rneedle) + /* Nothing in this round. */ + break; + } + } + } + } + else + return (char *) haystack; + } +} diff --git a/gl/lib/mbtowc-impl.h b/gl/lib/mbtowc-impl.h new file mode 100644 index 0000000..3cc70b0 --- /dev/null +++ b/gl/lib/mbtowc-impl.h @@ -0,0 +1,44 @@ +/* Convert multibyte character to wide character. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* We don't need a static internal state, because the encoding is not state + dependent, and when mbrtowc returns (size_t)(-2). we throw the result + away. */ + +int +mbtowc (wchar_t *pwc, const char *s, size_t n) +{ + if (s == NULL) + return 0; + else + { + mbstate_t state; + wchar_t wc; + size_t result; + + memset (&state, 0, sizeof (mbstate_t)); + result = mbrtowc (&wc, s, n, &state); + if (result == (size_t)-1 || result == (size_t)-2) + { + errno = EILSEQ; + return -1; + } + if (pwc != NULL) + *pwc = wc; + return (wc == 0 ? 0 : result); + } +} diff --git a/gl/lib/mbtowc.c b/gl/lib/mbtowc.c new file mode 100644 index 0000000..93a7445 --- /dev/null +++ b/gl/lib/mbtowc.c @@ -0,0 +1,26 @@ +/* Convert multibyte character to wide character. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include +#include +#include + +#include "mbtowc-impl.h" diff --git a/gl/lib/mbuiter.c b/gl/lib/mbuiter.c new file mode 100644 index 0000000..9167580 --- /dev/null +++ b/gl/lib/mbuiter.c @@ -0,0 +1,3 @@ +#include +#define MBUITER_INLINE _GL_EXTERN_INLINE +#include "mbuiter.h" diff --git a/gl/lib/mbuiter.h b/gl/lib/mbuiter.h new file mode 100644 index 0000000..1702f14 --- /dev/null +++ b/gl/lib/mbuiter.h @@ -0,0 +1,232 @@ +/* Iterating through multibyte strings: macros for multi-byte encodings. + Copyright (C) 2001, 2005, 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible . */ + +/* The macros in this file implement forward iteration through a + multi-byte string, without knowing its length a-priori. + + With these macros, an iteration loop that looks like + + char *iter; + for (iter = buf; *iter != '\0'; iter++) + { + do_something (*iter); + } + + becomes + + mbui_iterator_t iter; + for (mbui_init (iter, buf); mbui_avail (iter); mbui_advance (iter)) + { + do_something (mbui_cur_ptr (iter), mb_len (mbui_cur (iter))); + } + + The benefit of these macros over plain use of mbrtowc is: + - Handling of invalid multibyte sequences is possible without + making the code more complicated, while still preserving the + invalid multibyte sequences. + + Compared to mbiter.h, the macros here don't need to know the string's + length a-priori. The downside is that at each step, the look-ahead + that guards against overrunning the terminating '\0' is more expensive. + The mbui_* macros are therefore suitable when there is a high probability + that only the first few multibyte characters need to be inspected. + Whereas the mbi_* macros are better if usually the iteration runs + through the entire string. + + mbui_iterator_t + is a type usable for variable declarations. + + mbui_init (iter, startptr) + initializes the iterator, starting at startptr. + + mbui_avail (iter) + returns true if there are more multibyte characters available before + the end of string is reached. In this case, mbui_cur (iter) is + initialized to the next multibyte character. + + mbui_advance (iter) + advances the iterator by one multibyte character. + + mbui_cur (iter) + returns the current multibyte character, of type mbchar_t. All the + macros defined in mbchar.h can be used on it. + + mbui_cur_ptr (iter) + return a pointer to the beginning of the current multibyte character. + + mbui_reloc (iter, ptrdiff) + relocates iterator when the string is moved by ptrdiff bytes. + + mbui_copy (&destiter, &srciter) + copies srciter to destiter. + + Here are the function prototypes of the macros. + + extern void mbui_init (mbui_iterator_t iter, const char *startptr); + extern bool mbui_avail (mbui_iterator_t iter); + extern void mbui_advance (mbui_iterator_t iter); + extern mbchar_t mbui_cur (mbui_iterator_t iter); + extern const char * mbui_cur_ptr (mbui_iterator_t iter); + extern void mbui_reloc (mbui_iterator_t iter, ptrdiff_t ptrdiff); + extern void mbui_copy (mbui_iterator_t *new, const mbui_iterator_t *old); + */ + +#ifndef _MBUITER_H +#define _MBUITER_H 1 + +#include +#include +#include +#include +#include + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.1 has a bug: and must be included before + . */ +#include +#include +#include + +#include "mbchar.h" +#include "strnlen1.h" + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef MBUITER_INLINE +# define MBUITER_INLINE _GL_INLINE +#endif + +struct mbuiter_multi +{ + bool in_shift; /* true if next byte may not be interpreted as ASCII */ + mbstate_t state; /* if in_shift: current shift state */ + bool next_done; /* true if mbui_avail has already filled the following */ + struct mbchar cur; /* the current character: + const char *cur.ptr pointer to current character + The following are only valid after mbui_avail. + size_t cur.bytes number of bytes of current character + bool cur.wc_valid true if wc is a valid wide character + wchar_t cur.wc if wc_valid: the current character + */ +}; + +MBUITER_INLINE void +mbuiter_multi_next (struct mbuiter_multi *iter) +{ + if (iter->next_done) + return; + if (iter->in_shift) + goto with_shift; + /* Handle most ASCII characters quickly, without calling mbrtowc(). */ + if (is_basic (*iter->cur.ptr)) + { + /* These characters are part of the basic character set. ISO C 99 + guarantees that their wide character code is identical to their + char code. */ + iter->cur.bytes = 1; + iter->cur.wc = *iter->cur.ptr; + iter->cur.wc_valid = true; + } + else + { + assert (mbsinit (&iter->state)); + iter->in_shift = true; + with_shift: + iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr, + strnlen1 (iter->cur.ptr, MB_CUR_MAX), + &iter->state); + if (iter->cur.bytes == (size_t) -1) + { + /* An invalid multibyte sequence was encountered. */ + iter->cur.bytes = 1; + iter->cur.wc_valid = false; + /* Whether to set iter->in_shift = false and reset iter->state + or not is not very important; the string is bogus anyway. */ + } + else if (iter->cur.bytes == (size_t) -2) + { + /* An incomplete multibyte character at the end. */ + iter->cur.bytes = strlen (iter->cur.ptr); + iter->cur.wc_valid = false; + /* Whether to set iter->in_shift = false and reset iter->state + or not is not important; the string end is reached anyway. */ + } + else + { + if (iter->cur.bytes == 0) + { + /* A null wide character was encountered. */ + iter->cur.bytes = 1; + assert (*iter->cur.ptr == '\0'); + assert (iter->cur.wc == 0); + } + iter->cur.wc_valid = true; + + /* When in the initial state, we can go back treating ASCII + characters more quickly. */ + if (mbsinit (&iter->state)) + iter->in_shift = false; + } + } + iter->next_done = true; +} + +MBUITER_INLINE void +mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff) +{ + iter->cur.ptr += ptrdiff; +} + +MBUITER_INLINE void +mbuiter_multi_copy (struct mbuiter_multi *new_iter, const struct mbuiter_multi *old_iter) +{ + if ((new_iter->in_shift = old_iter->in_shift)) + memcpy (&new_iter->state, &old_iter->state, sizeof (mbstate_t)); + else + memset (&new_iter->state, 0, sizeof (mbstate_t)); + new_iter->next_done = old_iter->next_done; + mb_copy (&new_iter->cur, &old_iter->cur); +} + +/* Iteration macros. */ +typedef struct mbuiter_multi mbui_iterator_t; +#define mbui_init(iter, startptr) \ + ((iter).cur.ptr = (startptr), \ + (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \ + (iter).next_done = false) +#define mbui_avail(iter) \ + (mbuiter_multi_next (&(iter)), !mb_isnul ((iter).cur)) +#define mbui_advance(iter) \ + ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false) + +/* Access to the current character. */ +#define mbui_cur(iter) (iter).cur +#define mbui_cur_ptr(iter) (iter).cur.ptr + +/* Relocation. */ +#define mbui_reloc(iter, ptrdiff) mbuiter_multi_reloc (&iter, ptrdiff) + +/* Copying an iterator. */ +#define mbui_copy mbuiter_multi_copy + +_GL_INLINE_HEADER_END + +#endif /* _MBUITER_H */ diff --git a/gl/lib/memchr.c b/gl/lib/memchr.c new file mode 100644 index 0000000..6709f6e --- /dev/null +++ b/gl/lib/memchr.c @@ -0,0 +1,172 @@ +/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2014 + Free Software Foundation, Inc. + + Based on strlen implementation by Torbjorn Granlund (tege@sics.se), + with help from Dan Sahlin (dan@sics.se) and + commentary by Jim Blandy (jimb@ai.mit.edu); + adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), + and implemented by Roland McGrath (roland@ai.mit.edu). + +NOTE: The canonical source of this file is maintained with the GNU C Library. +Bugs can be reported to bug-glibc@prep.ai.mit.edu. + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3 of the License, or any +later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . */ + +#ifndef _LIBC +# include +#endif + +#include + +#include + +#if defined _LIBC +# include +#else +# define reg_char char +#endif + +#include + +#if HAVE_BP_SYM_H || defined _LIBC +# include +#else +# define BP_SYM(sym) sym +#endif + +#undef __memchr +#ifdef _LIBC +# undef memchr +#endif + +#ifndef weak_alias +# define __memchr memchr +#endif + +/* Search no more than N bytes of S for C. */ +void * +__memchr (void const *s, int c_in, size_t n) +{ + /* On 32-bit hardware, choosing longword to be a 32-bit unsigned + long instead of a 64-bit uintmax_t tends to give better + performance. On 64-bit hardware, unsigned long is generally 64 + bits already. Change this typedef to experiment with + performance. */ + typedef unsigned long int longword; + + const unsigned char *char_ptr; + const longword *longword_ptr; + longword repeated_one; + longword repeated_c; + unsigned reg_char c; + + c = (unsigned char) c_in; + + /* Handle the first few bytes by reading one byte at a time. + Do this until CHAR_PTR is aligned on a longword boundary. */ + for (char_ptr = (const unsigned char *) s; + n > 0 && (size_t) char_ptr % sizeof (longword) != 0; + --n, ++char_ptr) + if (*char_ptr == c) + return (void *) char_ptr; + + longword_ptr = (const longword *) char_ptr; + + /* All these elucidatory comments refer to 4-byte longwords, + but the theory applies equally well to any size longwords. */ + + /* Compute auxiliary longword values: + repeated_one is a value which has a 1 in every byte. + repeated_c has c in every byte. */ + repeated_one = 0x01010101; + repeated_c = c | (c << 8); + repeated_c |= repeated_c << 16; + if (0xffffffffU < (longword) -1) + { + repeated_one |= repeated_one << 31 << 1; + repeated_c |= repeated_c << 31 << 1; + if (8 < sizeof (longword)) + { + size_t i; + + for (i = 64; i < sizeof (longword) * 8; i *= 2) + { + repeated_one |= repeated_one << i; + repeated_c |= repeated_c << i; + } + } + } + + /* Instead of the traditional loop which tests each byte, we will test a + longword at a time. The tricky part is testing if *any of the four* + bytes in the longword in question are equal to c. We first use an xor + with repeated_c. This reduces the task to testing whether *any of the + four* bytes in longword1 is zero. + + We compute tmp = + ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). + That is, we perform the following operations: + 1. Subtract repeated_one. + 2. & ~longword1. + 3. & a mask consisting of 0x80 in every byte. + Consider what happens in each byte: + - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, + and step 3 transforms it into 0x80. A carry can also be propagated + to more significant bytes. + - If a byte of longword1 is nonzero, let its lowest 1 bit be at + position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, + the byte ends in a single bit of value 0 and k bits of value 1. + After step 2, the result is just k bits of value 1: 2^k - 1. After + step 3, the result is 0. And no carry is produced. + So, if longword1 has only non-zero bytes, tmp is zero. + Whereas if longword1 has a zero byte, call j the position of the least + significant zero byte. Then the result has a zero at positions 0, ..., + j-1 and a 0x80 at position j. We cannot predict the result at the more + significant bytes (positions j+1..3), but it does not matter since we + already have a non-zero bit at position 8*j+7. + + So, the test whether any byte in longword1 is zero is equivalent to + testing whether tmp is nonzero. */ + + while (n >= sizeof (longword)) + { + longword longword1 = *longword_ptr ^ repeated_c; + + if ((((longword1 - repeated_one) & ~longword1) + & (repeated_one << 7)) != 0) + break; + longword_ptr++; + n -= sizeof (longword); + } + + char_ptr = (const unsigned char *) longword_ptr; + + /* At this point, we know that either n < sizeof (longword), or one of the + sizeof (longword) bytes starting at char_ptr is == c. On little-endian + machines, we could determine the first such byte without any further + memory accesses, just by looking at the tmp result from the last loop + iteration. But this does not work on big-endian machines. Choose code + that works in both cases. */ + + for (; n > 0; --n, ++char_ptr) + { + if (*char_ptr == c) + return (void *) char_ptr; + } + + return NULL; +} +#ifdef weak_alias +weak_alias (__memchr, BP_SYM (memchr)) +#endif diff --git a/gnulib/lib/memchr.valgrind b/gl/lib/memchr.valgrind similarity index 100% rename from gnulib/lib/memchr.valgrind rename to gl/lib/memchr.valgrind diff --git a/gl/lib/mempcpy.c b/gl/lib/mempcpy.c new file mode 100644 index 0000000..ff83ee1 --- /dev/null +++ b/gl/lib/mempcpy.c @@ -0,0 +1,28 @@ +/* Copy memory area and return pointer after last written byte. + Copyright (C) 2003, 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +/* Specification. */ +#include + +/* Copy N bytes of SRC to DEST, return pointer to bytes after the + last written byte. */ +void * +mempcpy (void *dest, const void *src, size_t n) +{ + return (char *) memcpy (dest, src, n) + n; +} diff --git a/gl/lib/memrchr.c b/gl/lib/memrchr.c new file mode 100644 index 0000000..742a0c9 --- /dev/null +++ b/gl/lib/memrchr.c @@ -0,0 +1,161 @@ +/* memrchr -- find the last occurrence of a byte in a memory block + + Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2014 Free Software + Foundation, Inc. + + Based on strlen implementation by Torbjorn Granlund (tege@sics.se), + with help from Dan Sahlin (dan@sics.se) and + commentary by Jim Blandy (jimb@ai.mit.edu); + adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), + and implemented by Roland McGrath (roland@ai.mit.edu). + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if defined _LIBC +# include +#else +# include +# define reg_char char +#endif + +#include +#include + +#undef __memrchr +#ifdef _LIBC +# undef memrchr +#endif + +#ifndef weak_alias +# define __memrchr memrchr +#endif + +/* Search no more than N bytes of S for C. */ +void * +__memrchr (void const *s, int c_in, size_t n) +{ + /* On 32-bit hardware, choosing longword to be a 32-bit unsigned + long instead of a 64-bit uintmax_t tends to give better + performance. On 64-bit hardware, unsigned long is generally 64 + bits already. Change this typedef to experiment with + performance. */ + typedef unsigned long int longword; + + const unsigned char *char_ptr; + const longword *longword_ptr; + longword repeated_one; + longword repeated_c; + unsigned reg_char c; + + c = (unsigned char) c_in; + + /* Handle the last few bytes by reading one byte at a time. + Do this until CHAR_PTR is aligned on a longword boundary. */ + for (char_ptr = (const unsigned char *) s + n; + n > 0 && (size_t) char_ptr % sizeof (longword) != 0; + --n) + if (*--char_ptr == c) + return (void *) char_ptr; + + longword_ptr = (const longword *) char_ptr; + + /* All these elucidatory comments refer to 4-byte longwords, + but the theory applies equally well to any size longwords. */ + + /* Compute auxiliary longword values: + repeated_one is a value which has a 1 in every byte. + repeated_c has c in every byte. */ + repeated_one = 0x01010101; + repeated_c = c | (c << 8); + repeated_c |= repeated_c << 16; + if (0xffffffffU < (longword) -1) + { + repeated_one |= repeated_one << 31 << 1; + repeated_c |= repeated_c << 31 << 1; + if (8 < sizeof (longword)) + { + size_t i; + + for (i = 64; i < sizeof (longword) * 8; i *= 2) + { + repeated_one |= repeated_one << i; + repeated_c |= repeated_c << i; + } + } + } + + /* Instead of the traditional loop which tests each byte, we will test a + longword at a time. The tricky part is testing if *any of the four* + bytes in the longword in question are equal to c. We first use an xor + with repeated_c. This reduces the task to testing whether *any of the + four* bytes in longword1 is zero. + + We compute tmp = + ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). + That is, we perform the following operations: + 1. Subtract repeated_one. + 2. & ~longword1. + 3. & a mask consisting of 0x80 in every byte. + Consider what happens in each byte: + - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, + and step 3 transforms it into 0x80. A carry can also be propagated + to more significant bytes. + - If a byte of longword1 is nonzero, let its lowest 1 bit be at + position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, + the byte ends in a single bit of value 0 and k bits of value 1. + After step 2, the result is just k bits of value 1: 2^k - 1. After + step 3, the result is 0. And no carry is produced. + So, if longword1 has only non-zero bytes, tmp is zero. + Whereas if longword1 has a zero byte, call j the position of the least + significant zero byte. Then the result has a zero at positions 0, ..., + j-1 and a 0x80 at position j. We cannot predict the result at the more + significant bytes (positions j+1..3), but it does not matter since we + already have a non-zero bit at position 8*j+7. + + So, the test whether any byte in longword1 is zero is equivalent to + testing whether tmp is nonzero. */ + + while (n >= sizeof (longword)) + { + longword longword1 = *--longword_ptr ^ repeated_c; + + if ((((longword1 - repeated_one) & ~longword1) + & (repeated_one << 7)) != 0) + { + longword_ptr++; + break; + } + n -= sizeof (longword); + } + + char_ptr = (const unsigned char *) longword_ptr; + + /* At this point, we know that either n < sizeof (longword), or one of the + sizeof (longword) bytes starting at char_ptr is == c. On little-endian + machines, we could determine the first such byte without any further + memory accesses, just by looking at the tmp result from the last loop + iteration. But this does not work on big-endian machines. Choose code + that works in both cases. */ + + while (n-- > 0) + { + if (*--char_ptr == c) + return (void *) char_ptr; + } + + return NULL; +} +#ifdef weak_alias +weak_alias (__memrchr, memrchr) +#endif diff --git a/gnulib/lib/mktime-internal.h b/gl/lib/mktime-internal.h similarity index 100% rename from gnulib/lib/mktime-internal.h rename to gl/lib/mktime-internal.h diff --git a/gl/lib/mktime.c b/gl/lib/mktime.c new file mode 100644 index 0000000..2943823 --- /dev/null +++ b/gl/lib/mktime.c @@ -0,0 +1,741 @@ +/* Convert a 'struct tm' to a time_t value. + Copyright (C) 1993-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Paul Eggert . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + . */ + +/* Define this to have a standalone program to test this implementation of + mktime. */ +/* #define DEBUG 1 */ + +#ifndef _LIBC +# include +#endif + +/* Assume that leap seconds are possible, unless told otherwise. + If the host has a 'zic' command with a '-L leapsecondfilename' option, + then it supports leap seconds; otherwise it probably doesn't. */ +#ifndef LEAP_SECONDS_POSSIBLE +# define LEAP_SECONDS_POSSIBLE 1 +#endif + +#include + +#include + +#include /* For the real memcpy prototype. */ + +#if DEBUG +# include +# include +/* Make it work even if the system's libc has its own mktime routine. */ +# undef mktime +# define mktime my_mktime +#endif /* DEBUG */ + +/* Some of the code in this file assumes that signed integer overflow + silently wraps around. This assumption can't easily be programmed + around, nor can it be checked for portably at compile-time or + easily eliminated at run-time. + + Define WRAPV to 1 if the assumption is valid and if + #pragma GCC optimize ("wrapv") + does not trigger GCC bug 51793 + . + Otherwise, define it to 0; this forces the use of slower code that, + while not guaranteed by the C Standard, works on all production + platforms that we know about. */ +#ifndef WRAPV +# if (((__GNUC__ == 4 && 4 <= __GNUC_MINOR__) || 4 < __GNUC__) \ + && defined __GLIBC__) +# pragma GCC optimize ("wrapv") +# define WRAPV 1 +# else +# define WRAPV 0 +# endif +#endif + +/* Verify a requirement at compile-time (unlike assert, which is runtime). */ +#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } + +/* A signed type that is at least one bit wider than int. */ +#if INT_MAX <= LONG_MAX / 2 +typedef long int long_int; +#else +typedef long long int long_int; +#endif +verify (long_int_is_wide_enough, INT_MAX == INT_MAX * (long_int) 2 / 2); + +/* Shift A right by B bits portably, by dividing A by 2**B and + truncating towards minus infinity. A and B should be free of side + effects, and B should be in the range 0 <= B <= INT_BITS - 2, where + INT_BITS is the number of useful bits in an int. GNU code can + assume that INT_BITS is at least 32. + + ISO C99 says that A >> B is implementation-defined if A < 0. Some + implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift + right in the usual way when A < 0, so SHR falls back on division if + ordinary A >> B doesn't seem to be the usual signed shift. */ +#define SHR(a, b) \ + ((-1 >> 1 == -1 \ + && (long_int) -1 >> 1 == -1 \ + && ((time_t) -1 >> 1 == -1 || ! TYPE_SIGNED (time_t))) \ + ? (a) >> (b) \ + : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) + +/* The extra casts in the following macros work around compiler bugs, + e.g., in Cray C 5.0.3.0. */ + +/* True if the arithmetic type T is an integer type. bool counts as + an integer. */ +#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) + +/* True if negative values of the signed integer type T use two's + complement, or if T is an unsigned integer type. */ +#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) + +/* True if the arithmetic type T is signed. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* The maximum and minimum values for the integer type T. These + macros have undefined behavior if T is signed and has padding bits. + If this is a problem for you, please let us know how to fix it for + your host. */ +#define TYPE_MINIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) 0 \ + : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) + +#ifndef TIME_T_MIN +# define TIME_T_MIN TYPE_MINIMUM (time_t) +#endif +#ifndef TIME_T_MAX +# define TIME_T_MAX TYPE_MAXIMUM (time_t) +#endif +#define TIME_T_MIDPOINT (SHR (TIME_T_MIN + TIME_T_MAX, 1) + 1) + +verify (time_t_is_integer, TYPE_IS_INTEGER (time_t)); +verify (twos_complement_arithmetic, + (TYPE_TWOS_COMPLEMENT (int) + && TYPE_TWOS_COMPLEMENT (long_int) + && TYPE_TWOS_COMPLEMENT (time_t))); + +#define EPOCH_YEAR 1970 +#define TM_YEAR_BASE 1900 +verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0); + +/* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */ +static int +leapyear (long_int year) +{ + /* Don't add YEAR to TM_YEAR_BASE, as that might overflow. + Also, work even if YEAR is negative. */ + return + ((year & 3) == 0 + && (year % 100 != 0 + || ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3))); +} + +/* How many days come before each month (0-12). */ +#ifndef _LIBC +static +#endif +const unsigned short int __mon_yday[2][13] = + { + /* Normal years. */ + { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, + /* Leap years. */ + { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } + }; + + +#ifndef _LIBC +/* Portable standalone applications should supply a that + declares a POSIX-compliant localtime_r, for the benefit of older + implementations that lack localtime_r or have a nonstandard one. + See the gnulib time_r module for one way to implement this. */ +# undef __localtime_r +# define __localtime_r localtime_r +# define __mktime_internal mktime_internal +# include "mktime-internal.h" +#endif + +/* Return 1 if the values A and B differ according to the rules for + tm_isdst: A and B differ if one is zero and the other positive. */ +static int +isdst_differ (int a, int b) +{ + return (!a != !b) && (0 <= a) && (0 <= b); +} + +/* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) - + (YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks + were not adjusted between the time stamps. + + The YEAR values uses the same numbering as TP->tm_year. Values + need not be in the usual range. However, YEAR1 must not be less + than 2 * INT_MIN or greater than 2 * INT_MAX. + + The result may overflow. It is the caller's responsibility to + detect overflow. */ + +static time_t +ydhms_diff (long_int year1, long_int yday1, int hour1, int min1, int sec1, + int year0, int yday0, int hour0, int min0, int sec0) +{ + verify (C99_integer_division, -1 / 2 == 0); + + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid integer overflow here. */ + int a4 = SHR (year1, 2) + SHR (TM_YEAR_BASE, 2) - ! (year1 & 3); + int b4 = SHR (year0, 2) + SHR (TM_YEAR_BASE, 2) - ! (year0 & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = SHR (a100, 2); + int b400 = SHR (b100, 2); + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + + /* Compute the desired time in time_t precision. Overflow might + occur here. */ + time_t tyear1 = year1; + time_t years = tyear1 - year0; + time_t days = 365 * years + yday1 - yday0 + intervening_leap_days; + time_t hours = 24 * days + hour1 - hour0; + time_t minutes = 60 * hours + min1 - min0; + time_t seconds = 60 * minutes + sec1 - sec0; + return seconds; +} + +/* Return the average of A and B, even if A + B would overflow. */ +static time_t +time_t_avg (time_t a, time_t b) +{ + return SHR (a, 1) + SHR (b, 1) + (a & b & 1); +} + +/* Return 1 if A + B does not overflow. If time_t is unsigned and if + B's top bit is set, assume that the sum represents A - -B, and + return 1 if the subtraction does not wrap around. */ +static int +time_t_add_ok (time_t a, time_t b) +{ + if (! TYPE_SIGNED (time_t)) + { + time_t sum = a + b; + return (sum < a) == (TIME_T_MIDPOINT <= b); + } + else if (WRAPV) + { + time_t sum = a + b; + return (sum < a) == (b < 0); + } + else + { + time_t avg = time_t_avg (a, b); + return TIME_T_MIN / 2 <= avg && avg <= TIME_T_MAX / 2; + } +} + +/* Return 1 if A + B does not overflow. */ +static int +time_t_int_add_ok (time_t a, int b) +{ + verify (int_no_wider_than_time_t, INT_MAX <= TIME_T_MAX); + if (WRAPV) + { + time_t sum = a + b; + return (sum < a) == (b < 0); + } + else + { + int a_odd = a & 1; + time_t avg = SHR (a, 1) + (SHR (b, 1) + (a_odd & b)); + return TIME_T_MIN / 2 <= avg && avg <= TIME_T_MAX / 2; + } +} + +/* Return a time_t value corresponding to (YEAR-YDAY HOUR:MIN:SEC), + assuming that *T corresponds to *TP and that no clock adjustments + occurred between *TP and the desired time. + If TP is null, return a value not equal to *T; this avoids false matches. + If overflow occurs, yield the minimal or maximal value, except do not + yield a value equal to *T. */ +static time_t +guess_time_tm (long_int year, long_int yday, int hour, int min, int sec, + const time_t *t, const struct tm *tp) +{ + if (tp) + { + time_t d = ydhms_diff (year, yday, hour, min, sec, + tp->tm_year, tp->tm_yday, + tp->tm_hour, tp->tm_min, tp->tm_sec); + if (time_t_add_ok (*t, d)) + return *t + d; + } + + /* Overflow occurred one way or another. Return the nearest result + that is actually in range, except don't report a zero difference + if the actual difference is nonzero, as that would cause a false + match; and don't oscillate between two values, as that would + confuse the spring-forward gap detector. */ + return (*t < TIME_T_MIDPOINT + ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN) + : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX)); +} + +/* Use CONVERT to convert *T to a broken down time in *TP. + If *T is out of range for conversion, adjust it so that + it is the nearest in-range value and then convert that. */ +static struct tm * +ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), + time_t *t, struct tm *tp) +{ + struct tm *r = convert (t, tp); + + if (!r && *t) + { + time_t bad = *t; + time_t ok = 0; + + /* BAD is a known unconvertible time_t, and OK is a known good one. + Use binary search to narrow the range between BAD and OK until + they differ by 1. */ + while (bad != ok + (bad < 0 ? -1 : 1)) + { + time_t mid = *t = time_t_avg (ok, bad); + r = convert (t, tp); + if (r) + ok = mid; + else + bad = mid; + } + + if (!r && ok) + { + /* The last conversion attempt failed; + revert to the most recent successful attempt. */ + *t = ok; + r = convert (t, tp); + } + } + + return r; +} + + +/* Convert *TP to a time_t value, inverting + the monotonic and mostly-unit-linear conversion function CONVERT. + Use *OFFSET to keep track of a guess at the offset of the result, + compared to what the result would be for UTC without leap seconds. + If *OFFSET's guess is correct, only one CONVERT call is needed. + This function is external because it is used also by timegm.c. */ +time_t +__mktime_internal (struct tm *tp, + struct tm *(*convert) (const time_t *, struct tm *), + time_t *offset) +{ + time_t t, gt, t0, t1, t2; + struct tm tm; + + /* The maximum number of probes (calls to CONVERT) should be enough + to handle any combinations of time zone rule changes, solar time, + leap seconds, and oscillations around a spring-forward gap. + POSIX.1 prohibits leap seconds, but some hosts have them anyway. */ + int remaining_probes = 6; + + /* Time requested. Copy it in case CONVERT modifies *TP; this can + occur if TP is localtime's returned value and CONVERT is localtime. */ + int sec = tp->tm_sec; + int min = tp->tm_min; + int hour = tp->tm_hour; + int mday = tp->tm_mday; + int mon = tp->tm_mon; + int year_requested = tp->tm_year; + int isdst = tp->tm_isdst; + + /* 1 if the previous probe was DST. */ + int dst2; + + /* Ensure that mon is in range, and set year accordingly. */ + int mon_remainder = mon % 12; + int negative_mon_remainder = mon_remainder < 0; + int mon_years = mon / 12 - negative_mon_remainder; + long_int lyear_requested = year_requested; + long_int year = lyear_requested + mon_years; + + /* The other values need not be in range: + the remaining code handles minor overflows correctly, + assuming int and time_t arithmetic wraps around. + Major overflows are caught at the end. */ + + /* Calculate day of year from year, month, and day of month. + The result need not be in range. */ + int mon_yday = ((__mon_yday[leapyear (year)] + [mon_remainder + 12 * negative_mon_remainder]) + - 1); + long_int lmday = mday; + long_int yday = mon_yday + lmday; + + time_t guessed_offset = *offset; + + int sec_requested = sec; + + if (LEAP_SECONDS_POSSIBLE) + { + /* Handle out-of-range seconds specially, + since ydhms_tm_diff assumes every minute has 60 seconds. */ + if (sec < 0) + sec = 0; + if (59 < sec) + sec = 59; + } + + /* Invert CONVERT by probing. First assume the same offset as last + time. */ + + t0 = ydhms_diff (year, yday, hour, min, sec, + EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset); + + if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3) + { + /* time_t isn't large enough to rule out overflows, so check + for major overflows. A gross check suffices, since if t0 + has overflowed, it is off by a multiple of TIME_T_MAX - + TIME_T_MIN + 1. So ignore any component of the difference + that is bounded by a small value. */ + + /* Approximate log base 2 of the number of time units per + biennium. A biennium is 2 years; use this unit instead of + years to avoid integer overflow. For example, 2 average + Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds, + which is 63113904 seconds, and rint (log2 (63113904)) is + 26. */ + int ALOG2_SECONDS_PER_BIENNIUM = 26; + int ALOG2_MINUTES_PER_BIENNIUM = 20; + int ALOG2_HOURS_PER_BIENNIUM = 14; + int ALOG2_DAYS_PER_BIENNIUM = 10; + int LOG2_YEARS_PER_BIENNIUM = 1; + + int approx_requested_biennia = + (SHR (year_requested, LOG2_YEARS_PER_BIENNIUM) + - SHR (EPOCH_YEAR - TM_YEAR_BASE, LOG2_YEARS_PER_BIENNIUM) + + SHR (mday, ALOG2_DAYS_PER_BIENNIUM) + + SHR (hour, ALOG2_HOURS_PER_BIENNIUM) + + SHR (min, ALOG2_MINUTES_PER_BIENNIUM) + + (LEAP_SECONDS_POSSIBLE + ? 0 + : SHR (sec, ALOG2_SECONDS_PER_BIENNIUM))); + + int approx_biennia = SHR (t0, ALOG2_SECONDS_PER_BIENNIUM); + int diff = approx_biennia - approx_requested_biennia; + int approx_abs_diff = diff < 0 ? -1 - diff : diff; + + /* IRIX 4.0.5 cc miscalculates TIME_T_MIN / 3: it erroneously + gives a positive value of 715827882. Setting a variable + first then doing math on it seems to work. + (ghazi@caip.rutgers.edu) */ + time_t time_t_max = TIME_T_MAX; + time_t time_t_min = TIME_T_MIN; + time_t overflow_threshold = + (time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM; + + if (overflow_threshold < approx_abs_diff) + { + /* Overflow occurred. Try repairing it; this might work if + the time zone offset is enough to undo the overflow. */ + time_t repaired_t0 = -1 - t0; + approx_biennia = SHR (repaired_t0, ALOG2_SECONDS_PER_BIENNIUM); + diff = approx_biennia - approx_requested_biennia; + approx_abs_diff = diff < 0 ? -1 - diff : diff; + if (overflow_threshold < approx_abs_diff) + return -1; + guessed_offset += repaired_t0 - t0; + t0 = repaired_t0; + } + } + + /* Repeatedly use the error to improve the guess. */ + + for (t = t1 = t2 = t0, dst2 = 0; + (gt = guess_time_tm (year, yday, hour, min, sec, &t, + ranged_convert (convert, &t, &tm)), + t != gt); + t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0) + if (t == t1 && t != t2 + && (tm.tm_isdst < 0 + || (isdst < 0 + ? dst2 <= (tm.tm_isdst != 0) + : (isdst != 0) != (tm.tm_isdst != 0)))) + /* We can't possibly find a match, as we are oscillating + between two values. The requested time probably falls + within a spring-forward gap of size GT - T. Follow the common + practice in this case, which is to return a time that is GT - T + away from the requested time, preferring a time whose + tm_isdst differs from the requested value. (If no tm_isdst + was requested and only one of the two values has a nonzero + tm_isdst, prefer that value.) In practice, this is more + useful than returning -1. */ + goto offset_found; + else if (--remaining_probes == 0) + return -1; + + /* We have a match. Check whether tm.tm_isdst has the requested + value, if any. */ + if (isdst_differ (isdst, tm.tm_isdst)) + { + /* tm.tm_isdst has the wrong value. Look for a neighboring + time with the right value, and use its UTC offset. + + Heuristic: probe the adjacent timestamps in both directions, + looking for the desired isdst. This should work for all real + time zone histories in the tz database. */ + + /* Distance between probes when looking for a DST boundary. In + tzdata2003a, the shortest period of DST is 601200 seconds + (e.g., America/Recife starting 2000-10-08 01:00), and the + shortest period of non-DST surrounded by DST is 694800 + seconds (Africa/Tunis starting 1943-04-17 01:00). Use the + minimum of these two values, so we don't miss these short + periods when probing. */ + int stride = 601200; + + /* The longest period of DST in tzdata2003a is 536454000 seconds + (e.g., America/Jujuy starting 1946-10-01 01:00). The longest + period of non-DST is much longer, but it makes no real sense + to search for more than a year of non-DST, so use the DST + max. */ + int duration_max = 536454000; + + /* Search in both directions, so the maximum distance is half + the duration; add the stride to avoid off-by-1 problems. */ + int delta_bound = duration_max / 2 + stride; + + int delta, direction; + + for (delta = stride; delta < delta_bound; delta += stride) + for (direction = -1; direction <= 1; direction += 2) + if (time_t_int_add_ok (t, delta * direction)) + { + time_t ot = t + delta * direction; + struct tm otm; + ranged_convert (convert, &ot, &otm); + if (! isdst_differ (isdst, otm.tm_isdst)) + { + /* We found the desired tm_isdst. + Extrapolate back to the desired time. */ + t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm); + ranged_convert (convert, &t, &tm); + goto offset_found; + } + } + } + + offset_found: + *offset = guessed_offset + t - t0; + + if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec) + { + /* Adjust time to reflect the tm_sec requested, not the normalized value. + Also, repair any damage from a false match due to a leap second. */ + int sec_adjustment = (sec == 0 && tm.tm_sec == 60) - sec; + if (! time_t_int_add_ok (t, sec_requested)) + return -1; + t1 = t + sec_requested; + if (! time_t_int_add_ok (t1, sec_adjustment)) + return -1; + t2 = t1 + sec_adjustment; + if (! convert (&t2, &tm)) + return -1; + t = t2; + } + + *tp = tm; + return t; +} + + +/* FIXME: This should use a signed type wide enough to hold any UTC + offset in seconds. 'int' should be good enough for GNU code. We + can't fix this unilaterally though, as other modules invoke + __mktime_internal. */ +static time_t localtime_offset; + +/* Convert *TP to a time_t value. */ +time_t +mktime (struct tm *tp) +{ +#ifdef _LIBC + /* POSIX.1 8.1.1 requires that whenever mktime() is called, the + time zone names contained in the external variable 'tzname' shall + be set as if the tzset() function had been called. */ + __tzset (); +#endif + + return __mktime_internal (tp, __localtime_r, &localtime_offset); +} + +#ifdef weak_alias +weak_alias (mktime, timelocal) +#endif + +#ifdef _LIBC +libc_hidden_def (mktime) +libc_hidden_weak (timelocal) +#endif + +#if DEBUG + +static int +not_equal_tm (const struct tm *a, const struct tm *b) +{ + return ((a->tm_sec ^ b->tm_sec) + | (a->tm_min ^ b->tm_min) + | (a->tm_hour ^ b->tm_hour) + | (a->tm_mday ^ b->tm_mday) + | (a->tm_mon ^ b->tm_mon) + | (a->tm_year ^ b->tm_year) + | (a->tm_yday ^ b->tm_yday) + | isdst_differ (a->tm_isdst, b->tm_isdst)); +} + +static void +print_tm (const struct tm *tp) +{ + if (tp) + printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d", + tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday, + tp->tm_hour, tp->tm_min, tp->tm_sec, + tp->tm_yday, tp->tm_wday, tp->tm_isdst); + else + printf ("0"); +} + +static int +check_result (time_t tk, struct tm tmk, time_t tl, const struct tm *lt) +{ + if (tk != tl || !lt || not_equal_tm (&tmk, lt)) + { + printf ("mktime ("); + print_tm (lt); + printf (")\nyields ("); + print_tm (&tmk); + printf (") == %ld, should be %ld\n", (long int) tk, (long int) tl); + return 1; + } + + return 0; +} + +int +main (int argc, char **argv) +{ + int status = 0; + struct tm tm, tmk, tml; + struct tm *lt; + time_t tk, tl, tl1; + char trailer; + + if ((argc == 3 || argc == 4) + && (sscanf (argv[1], "%d-%d-%d%c", + &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer) + == 3) + && (sscanf (argv[2], "%d:%d:%d%c", + &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer) + == 3)) + { + tm.tm_year -= TM_YEAR_BASE; + tm.tm_mon--; + tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); + tmk = tm; + tl = mktime (&tmk); + lt = localtime (&tl); + if (lt) + { + tml = *lt; + lt = &tml; + } + printf ("mktime returns %ld == ", (long int) tl); + print_tm (&tmk); + printf ("\n"); + status = check_result (tl, tmk, tl, lt); + } + else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0)) + { + time_t from = atol (argv[1]); + time_t by = atol (argv[2]); + time_t to = atol (argv[3]); + + if (argc == 4) + for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) + { + lt = localtime (&tl); + if (lt) + { + tmk = tml = *lt; + tk = mktime (&tmk); + status |= check_result (tk, tmk, tl, &tml); + } + else + { + printf ("localtime (%ld) yields 0\n", (long int) tl); + status = 1; + } + tl1 = tl + by; + if ((tl1 < tl) != (by < 0)) + break; + } + else + for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) + { + /* Null benchmark. */ + lt = localtime (&tl); + if (lt) + { + tmk = tml = *lt; + tk = tl; + status |= check_result (tk, tmk, tl, &tml); + } + else + { + printf ("localtime (%ld) yields 0\n", (long int) tl); + status = 1; + } + tl1 = tl + by; + if ((tl1 < tl) != (by < 0)) + break; + } + } + else + printf ("Usage:\ +\t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\ +\t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\ +\t%s FROM BY TO - # Do not test those values (for benchmark).\n", + argv[0], argv[0], argv[0]); + + return status; +} + +#endif /* DEBUG */ + +/* +Local Variables: +compile-command: "gcc -DDEBUG -I. -Wall -W -O2 -g mktime.c -o mktime" +End: +*/ diff --git a/gl/lib/modechange.c b/gl/lib/modechange.c new file mode 100644 index 0000000..412fe1d --- /dev/null +++ b/gl/lib/modechange.c @@ -0,0 +1,414 @@ +/* modechange.c -- file mode manipulation + + Copyright (C) 1989-1990, 1997-1999, 2001, 2003-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by David MacKenzie */ + +/* The ASCII mode string is compiled into an array of 'struct + modechange', which can then be applied to each file to be changed. + We do this instead of re-parsing the ASCII string for each file + because the compiled form requires less computation to use; when + changing the mode of many files, this probably results in a + performance gain. */ + +#include + +#include "modechange.h" +#include +#include "stat-macros.h" +#include "xalloc.h" +#include + +/* The traditional octal values corresponding to each mode bit. */ +#define SUID 04000 +#define SGID 02000 +#define SVTX 01000 +#define RUSR 00400 +#define WUSR 00200 +#define XUSR 00100 +#define RGRP 00040 +#define WGRP 00020 +#define XGRP 00010 +#define ROTH 00004 +#define WOTH 00002 +#define XOTH 00001 +#define ALLM 07777 /* all octal mode bits */ + +/* Convert OCTAL, which uses one of the traditional octal values, to + an internal mode_t value. */ +static mode_t +octal_to_mode (unsigned int octal) +{ + /* Help the compiler optimize the usual case where mode_t uses + the traditional octal representation. */ + return ((S_ISUID == SUID && S_ISGID == SGID && S_ISVTX == SVTX + && S_IRUSR == RUSR && S_IWUSR == WUSR && S_IXUSR == XUSR + && S_IRGRP == RGRP && S_IWGRP == WGRP && S_IXGRP == XGRP + && S_IROTH == ROTH && S_IWOTH == WOTH && S_IXOTH == XOTH) + ? octal + : (mode_t) ((octal & SUID ? S_ISUID : 0) + | (octal & SGID ? S_ISGID : 0) + | (octal & SVTX ? S_ISVTX : 0) + | (octal & RUSR ? S_IRUSR : 0) + | (octal & WUSR ? S_IWUSR : 0) + | (octal & XUSR ? S_IXUSR : 0) + | (octal & RGRP ? S_IRGRP : 0) + | (octal & WGRP ? S_IWGRP : 0) + | (octal & XGRP ? S_IXGRP : 0) + | (octal & ROTH ? S_IROTH : 0) + | (octal & WOTH ? S_IWOTH : 0) + | (octal & XOTH ? S_IXOTH : 0))); +} + +/* Special operations flags. */ +enum + { + /* For the sentinel at the end of the mode changes array. */ + MODE_DONE, + + /* The typical case. */ + MODE_ORDINARY_CHANGE, + + /* In addition to the typical case, affect the execute bits if at + least one execute bit is set already, or if the file is a + directory. */ + MODE_X_IF_ANY_X, + + /* Instead of the typical case, copy some existing permissions for + u, g, or o onto the other two. Which of u, g, or o is copied + is determined by which bits are set in the 'value' field. */ + MODE_COPY_EXISTING + }; + +/* Description of a mode change. */ +struct mode_change +{ + char op; /* One of "=+-". */ + char flag; /* Special operations flag. */ + mode_t affected; /* Set for u, g, o, or a. */ + mode_t value; /* Bits to add/remove. */ + mode_t mentioned; /* Bits explicitly mentioned. */ +}; + +/* Return a mode_change array with the specified "=ddd"-style + mode change operation, where NEW_MODE is "ddd" and MENTIONED + contains the bits explicitly mentioned in the mode are MENTIONED. */ + +static struct mode_change * +make_node_op_equals (mode_t new_mode, mode_t mentioned) +{ + struct mode_change *p = xmalloc (2 * sizeof *p); + p->op = '='; + p->flag = MODE_ORDINARY_CHANGE; + p->affected = CHMOD_MODE_BITS; + p->value = new_mode; + p->mentioned = mentioned; + p[1].flag = MODE_DONE; + return p; +} + +/* Return a pointer to an array of file mode change operations created from + MODE_STRING, an ASCII string that contains either an octal number + specifying an absolute mode, or symbolic mode change operations with + the form: + [ugoa...][[+-=][rwxXstugo...]...][,...] + + Return NULL if 'mode_string' does not contain a valid + representation of file mode change operations. */ + +struct mode_change * +mode_compile (char const *mode_string) +{ + /* The array of mode-change directives to be returned. */ + struct mode_change *mc; + size_t used = 0; + char const *p; + + if ('0' <= *mode_string && *mode_string < '8') + { + unsigned int octal_mode = 0; + mode_t mode; + mode_t mentioned; + + p = mode_string; + do + { + octal_mode = 8 * octal_mode + *p++ - '0'; + if (ALLM < octal_mode) + return NULL; + } + while ('0' <= *p && *p < '8'); + + if (*p) + return NULL; + + mode = octal_to_mode (octal_mode); + mentioned = (p - mode_string < 5 + ? (mode & (S_ISUID | S_ISGID)) | S_ISVTX | S_IRWXUGO + : CHMOD_MODE_BITS); + return make_node_op_equals (mode, mentioned); + } + + /* Allocate enough space to hold the result. */ + { + size_t needed = 1; + for (p = mode_string; *p; p++) + needed += (*p == '=' || *p == '+' || *p == '-'); + mc = xnmalloc (needed, sizeof *mc); + } + + /* One loop iteration for each + '[ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=][0-7]+'. */ + for (p = mode_string; ; p++) + { + /* Which bits in the mode are operated on. */ + mode_t affected = 0; + + /* Turn on all the bits in 'affected' for each group given. */ + for (;; p++) + switch (*p) + { + default: + goto invalid; + case 'u': + affected |= S_ISUID | S_IRWXU; + break; + case 'g': + affected |= S_ISGID | S_IRWXG; + break; + case 'o': + affected |= S_ISVTX | S_IRWXO; + break; + case 'a': + affected |= CHMOD_MODE_BITS; + break; + case '=': case '+': case '-': + goto no_more_affected; + } + no_more_affected:; + + do + { + char op = *p++; + mode_t value; + mode_t mentioned = 0; + char flag = MODE_COPY_EXISTING; + struct mode_change *change; + + switch (*p) + { + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + { + unsigned int octal_mode = 0; + + do + { + octal_mode = 8 * octal_mode + *p++ - '0'; + if (ALLM < octal_mode) + goto invalid; + } + while ('0' <= *p && *p < '8'); + + if (affected || (*p && *p != ',')) + goto invalid; + affected = mentioned = CHMOD_MODE_BITS; + value = octal_to_mode (octal_mode); + flag = MODE_ORDINARY_CHANGE; + break; + } + + case 'u': + /* Set the affected bits to the value of the "u" bits + on the same file. */ + value = S_IRWXU; + p++; + break; + case 'g': + /* Set the affected bits to the value of the "g" bits + on the same file. */ + value = S_IRWXG; + p++; + break; + case 'o': + /* Set the affected bits to the value of the "o" bits + on the same file. */ + value = S_IRWXO; + p++; + break; + + default: + value = 0; + flag = MODE_ORDINARY_CHANGE; + + for (;; p++) + switch (*p) + { + case 'r': + value |= S_IRUSR | S_IRGRP | S_IROTH; + break; + case 'w': + value |= S_IWUSR | S_IWGRP | S_IWOTH; + break; + case 'x': + value |= S_IXUSR | S_IXGRP | S_IXOTH; + break; + case 'X': + flag = MODE_X_IF_ANY_X; + break; + case 's': + /* Set the setuid/gid bits if 'u' or 'g' is selected. */ + value |= S_ISUID | S_ISGID; + break; + case 't': + /* Set the "save text image" bit if 'o' is selected. */ + value |= S_ISVTX; + break; + default: + goto no_more_values; + } + no_more_values:; + } + + change = &mc[used++]; + change->op = op; + change->flag = flag; + change->affected = affected; + change->value = value; + change->mentioned = + (mentioned ? mentioned : affected ? affected & value : value); + } + while (*p == '=' || *p == '+' || *p == '-'); + + if (*p != ',') + break; + } + + if (*p == 0) + { + mc[used].flag = MODE_DONE; + return mc; + } + +invalid: + free (mc); + return NULL; +} + +/* Return a file mode change operation that sets permissions to match those + of REF_FILE. Return NULL (setting errno) if REF_FILE can't be accessed. */ + +struct mode_change * +mode_create_from_ref (const char *ref_file) +{ + struct stat ref_stats; + + if (stat (ref_file, &ref_stats) != 0) + return NULL; + return make_node_op_equals (ref_stats.st_mode, CHMOD_MODE_BITS); +} + +/* Return the file mode bits of OLDMODE (which is the mode of a + directory if DIR), assuming the umask is UMASK_VALUE, adjusted as + indicated by the list of change operations CHANGES. If DIR, the + type 'X' change affects the returned value even if no execute bits + were set in OLDMODE, and set user and group ID bits are preserved + unless CHANGES mentioned them. If PMODE_BITS is not null, store into + *PMODE_BITS a mask denoting file mode bits that are affected by + CHANGES. + + The returned value and *PMODE_BITS contain only file mode bits. + For example, they have the S_IFMT bits cleared on a standard + Unix-like host. */ + +mode_t +mode_adjust (mode_t oldmode, bool dir, mode_t umask_value, + struct mode_change const *changes, mode_t *pmode_bits) +{ + /* The adjusted mode. */ + mode_t newmode = oldmode & CHMOD_MODE_BITS; + + /* File mode bits that CHANGES cares about. */ + mode_t mode_bits = 0; + + for (; changes->flag != MODE_DONE; changes++) + { + mode_t affected = changes->affected; + mode_t omit_change = + (dir ? S_ISUID | S_ISGID : 0) & ~ changes->mentioned; + mode_t value = changes->value; + + switch (changes->flag) + { + case MODE_ORDINARY_CHANGE: + break; + + case MODE_COPY_EXISTING: + /* Isolate in 'value' the bits in 'newmode' to copy. */ + value &= newmode; + + /* Copy the isolated bits to the other two parts. */ + value |= ((value & (S_IRUSR | S_IRGRP | S_IROTH) + ? S_IRUSR | S_IRGRP | S_IROTH : 0) + | (value & (S_IWUSR | S_IWGRP | S_IWOTH) + ? S_IWUSR | S_IWGRP | S_IWOTH : 0) + | (value & (S_IXUSR | S_IXGRP | S_IXOTH) + ? S_IXUSR | S_IXGRP | S_IXOTH : 0)); + break; + + case MODE_X_IF_ANY_X: + /* Affect the execute bits if execute bits are already set + or if the file is a directory. */ + if ((newmode & (S_IXUSR | S_IXGRP | S_IXOTH)) | dir) + value |= S_IXUSR | S_IXGRP | S_IXOTH; + break; + } + + /* If WHO was specified, limit the change to the affected bits. + Otherwise, apply the umask. Either way, omit changes as + requested. */ + value &= (affected ? affected : ~umask_value) & ~ omit_change; + + switch (changes->op) + { + case '=': + /* If WHO was specified, preserve the previous values of + bits that are not affected by this change operation. + Otherwise, clear all the bits. */ + { + mode_t preserved = (affected ? ~affected : 0) | omit_change; + mode_bits |= CHMOD_MODE_BITS & ~preserved; + newmode = (newmode & preserved) | value; + break; + } + + case '+': + mode_bits |= value; + newmode |= value; + break; + + case '-': + mode_bits |= value; + newmode &= ~value; + break; + } + } + + if (pmode_bits) + *pmode_bits = mode_bits; + return newmode; +} diff --git a/gl/lib/modechange.h b/gl/lib/modechange.h new file mode 100644 index 0000000..e969ba9 --- /dev/null +++ b/gl/lib/modechange.h @@ -0,0 +1,30 @@ +/* modechange.h -- definitions for file mode manipulation + + Copyright (C) 1989-1990, 1997, 2003-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if ! defined MODECHANGE_H_ +# define MODECHANGE_H_ + +# include +# include + +struct mode_change *mode_compile (const char *); +struct mode_change *mode_create_from_ref (const char *); +mode_t mode_adjust (mode_t, bool, mode_t, struct mode_change const *, + mode_t *); + +#endif diff --git a/gl/lib/modf.c b/gl/lib/modf.c new file mode 100644 index 0000000..393740e --- /dev/null +++ b/gl/lib/modf.c @@ -0,0 +1,44 @@ +/* Get signed integer and fractional parts of a floating-point number. + Copyright (C) 2012-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +double +modf (double x, double *iptr) +{ + if (isfinite (x)) + { + double integer_part = trunc (x); + *iptr = integer_part; + return x - integer_part; + } + else + { + if (isinf (x)) + { + *iptr = x; + return 1.0 / x; + } + else /* isnand (x) */ + { + *iptr = x; + return x; + } + } +} diff --git a/gl/lib/mountlist.c b/gl/lib/mountlist.c new file mode 100644 index 0000000..d59c993 --- /dev/null +++ b/gl/lib/mountlist.c @@ -0,0 +1,983 @@ +/* mountlist.c -- return a list of mounted file systems + + Copyright (C) 1991-1992, 1997-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "mountlist.h" + +#include +#include +#include +#include +#include + +#include "xalloc.h" + +#include + +#include + +#include + +#if HAVE_SYS_PARAM_H +# include +#endif + +#if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */ +# if HAVE_SYS_UCRED_H +# include /* needed on OSF V4.0 for definition of NGROUPS, + NGROUPS is used as an array dimension in ucred.h */ +# include /* needed by powerpc-apple-darwin1.3.7 */ +# endif +# if HAVE_SYS_MOUNT_H +# include +# endif +# if HAVE_SYS_FS_TYPES_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +# endif +# if HAVE_STRUCT_FSSTAT_F_FSTYPENAME +# define FS_TYPE(Ent) ((Ent).f_fstypename) +# else +# define FS_TYPE(Ent) mnt_names[(Ent).f_type] +# endif +#endif /* MOUNTED_GETFSSTAT */ + +#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ +# include +# if !defined MOUNTED +# if defined _PATH_MOUNTED /* GNU libc */ +# define MOUNTED _PATH_MOUNTED +# endif +# if defined MNT_MNTTAB /* HP-UX. */ +# define MOUNTED MNT_MNTTAB +# endif +# if defined MNTTABNAME /* Dynix. */ +# define MOUNTED MNTTABNAME +# endif +# endif +#endif + +#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ +# include +#endif + +#ifdef MOUNTED_GETMNTINFO2 /* NetBSD 3.0. */ +# include +#endif + +#ifdef MOUNTED_GETMNT /* Ultrix. */ +# include +# include +#endif + +#ifdef MOUNTED_FS_STAT_DEV /* BeOS. */ +# include +# include +#endif + +#ifdef MOUNTED_FREAD /* SVR2. */ +# include +#endif + +#ifdef MOUNTED_FREAD_FSTYP /* SVR3. */ +# include +# include +# include +#endif + +#ifdef MOUNTED_LISTMNTENT +# include +#endif + +#ifdef MOUNTED_GETMNTENT2 /* SVR4. */ +# include +#endif + +#ifdef MOUNTED_VMOUNT /* AIX. */ +# include +# include +#endif + +#ifdef MOUNTED_INTERIX_STATVFS /* Interix. */ +# include +# include +#endif + +#ifdef DOLPHIN +/* So special that it's not worth putting this in autoconf. */ +# undef MOUNTED_FREAD_FSTYP +# define MOUNTED_GETMNTTBL +#endif + +#if HAVE_SYS_MNTENT_H +/* This is to get MNTOPT_IGNORE on e.g. SVR4. */ +# include +#endif + +#ifndef HAVE_HASMNTOPT +# define hasmntopt(mnt, opt) ((char *) 0) +#endif + +#undef MNT_IGNORE +#ifdef MNTOPT_IGNORE +# define MNT_IGNORE(M) hasmntopt (M, MNTOPT_IGNORE) +#else +# define MNT_IGNORE(M) 0 +#endif + +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif + +/* The results of open() in this file are not used with fchdir, + therefore save some unnecessary work in fchdir.c. */ +#undef open +#undef close + +/* The results of opendir() in this file are not used with dirfd and fchdir, + therefore save some unnecessary work in fchdir.c. */ +#undef opendir +#undef closedir + +#define ME_DUMMY_0(Fs_name, Fs_type) \ + (strcmp (Fs_type, "autofs") == 0 \ + || strcmp (Fs_type, "proc") == 0 \ + || strcmp (Fs_type, "subfs") == 0 \ + /* for Linux 2.6/3.x */ \ + || strcmp (Fs_type, "debugfs") == 0 \ + || strcmp (Fs_type, "devpts") == 0 \ + || strcmp (Fs_type, "fusectl") == 0 \ + || strcmp (Fs_type, "mqueue") == 0 \ + || strcmp (Fs_type, "rpc_pipefs") == 0 \ + || strcmp (Fs_type, "sysfs") == 0 \ + /* FreeBSD, Linux 2.4 */ \ + || strcmp (Fs_type, "devfs") == 0 \ + /* for NetBSD 3.0 */ \ + || strcmp (Fs_type, "kernfs") == 0 \ + /* for Irix 6.5 */ \ + || strcmp (Fs_type, "ignore") == 0) + +/* Historically, we have marked as "dummy" any file system of type "none", + but now that programs like du need to know about bind-mounted directories, + we grant an exception to any with "bind" in its list of mount options. + I.e., those are *not* dummy entries. */ +#ifdef MOUNTED_GETMNTENT1 +# define ME_DUMMY(Fs_name, Fs_type, Fs_ent) \ + (ME_DUMMY_0 (Fs_name, Fs_type) \ + || (strcmp (Fs_type, "none") == 0 \ + && !hasmntopt (Fs_ent, "bind"))) +#else +# define ME_DUMMY(Fs_name, Fs_type) \ + (ME_DUMMY_0 (Fs_name, Fs_type) || strcmp (Fs_type, "none") == 0) +#endif + +#ifdef __CYGWIN__ +# include +# define ME_REMOTE me_remote +/* All cygwin mount points include ':' or start with '//'; so it + requires a native Windows call to determine remote disks. */ +static bool +me_remote (char const *fs_name, char const *fs_type _GL_UNUSED) +{ + if (fs_name[0] && fs_name[1] == ':') + { + char drive[4]; + sprintf (drive, "%c:\\", fs_name[0]); + switch (GetDriveType (drive)) + { + case DRIVE_REMOVABLE: + case DRIVE_FIXED: + case DRIVE_CDROM: + case DRIVE_RAMDISK: + return false; + } + } + return true; +} +#endif + +#ifndef ME_REMOTE +/* A file system is "remote" if its Fs_name contains a ':' + or if (it is of type (smbfs or cifs) and its Fs_name starts with '//'). */ +# define ME_REMOTE(Fs_name, Fs_type) \ + (strchr (Fs_name, ':') != NULL \ + || ((Fs_name)[0] == '/' \ + && (Fs_name)[1] == '/' \ + && (strcmp (Fs_type, "smbfs") == 0 \ + || strcmp (Fs_type, "cifs") == 0))) +#endif + +#if MOUNTED_GETMNTINFO + +# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME +static char * +fstype_to_string (short int t) +{ + switch (t) + { +# ifdef MOUNT_PC + case MOUNT_PC: + return "pc"; +# endif +# ifdef MOUNT_MFS + case MOUNT_MFS: + return "mfs"; +# endif +# ifdef MOUNT_LO + case MOUNT_LO: + return "lo"; +# endif +# ifdef MOUNT_TFS + case MOUNT_TFS: + return "tfs"; +# endif +# ifdef MOUNT_TMP + case MOUNT_TMP: + return "tmp"; +# endif +# ifdef MOUNT_UFS + case MOUNT_UFS: + return "ufs" ; +# endif +# ifdef MOUNT_NFS + case MOUNT_NFS: + return "nfs" ; +# endif +# ifdef MOUNT_MSDOS + case MOUNT_MSDOS: + return "msdos" ; +# endif +# ifdef MOUNT_LFS + case MOUNT_LFS: + return "lfs" ; +# endif +# ifdef MOUNT_LOFS + case MOUNT_LOFS: + return "lofs" ; +# endif +# ifdef MOUNT_FDESC + case MOUNT_FDESC: + return "fdesc" ; +# endif +# ifdef MOUNT_PORTAL + case MOUNT_PORTAL: + return "portal" ; +# endif +# ifdef MOUNT_NULL + case MOUNT_NULL: + return "null" ; +# endif +# ifdef MOUNT_UMAP + case MOUNT_UMAP: + return "umap" ; +# endif +# ifdef MOUNT_KERNFS + case MOUNT_KERNFS: + return "kernfs" ; +# endif +# ifdef MOUNT_PROCFS + case MOUNT_PROCFS: + return "procfs" ; +# endif +# ifdef MOUNT_AFS + case MOUNT_AFS: + return "afs" ; +# endif +# ifdef MOUNT_CD9660 + case MOUNT_CD9660: + return "cd9660" ; +# endif +# ifdef MOUNT_UNION + case MOUNT_UNION: + return "union" ; +# endif +# ifdef MOUNT_DEVFS + case MOUNT_DEVFS: + return "devfs" ; +# endif +# ifdef MOUNT_EXT2FS + case MOUNT_EXT2FS: + return "ext2fs" ; +# endif + default: + return "?"; + } +} +# endif + +static char * +fsp_to_string (const struct statfs *fsp) +{ +# if HAVE_STRUCT_STATFS_F_FSTYPENAME + return (char *) (fsp->f_fstypename); +# else + return fstype_to_string (fsp->f_type); +# endif +} + +#endif /* MOUNTED_GETMNTINFO */ + +#ifdef MOUNTED_VMOUNT /* AIX. */ +static char * +fstype_to_string (int t) +{ + struct vfs_ent *e; + + e = getvfsbytype (t); + if (!e || !e->vfsent_name) + return "none"; + else + return e->vfsent_name; +} +#endif /* MOUNTED_VMOUNT */ + + +#if defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2 + +/* Return the device number from MOUNT_OPTIONS, if possible. + Otherwise return (dev_t) -1. */ +static dev_t +dev_from_mount_options (char const *mount_options) +{ + /* GNU/Linux allows file system implementations to define their own + meaning for "dev=" mount options, so don't trust the meaning + here. */ +# ifndef __linux__ + + static char const dev_pattern[] = ",dev="; + char const *devopt = strstr (mount_options, dev_pattern); + + if (devopt) + { + char const *optval = devopt + sizeof dev_pattern - 1; + char *optvalend; + unsigned long int dev; + errno = 0; + dev = strtoul (optval, &optvalend, 16); + if (optval != optvalend + && (*optvalend == '\0' || *optvalend == ',') + && ! (dev == ULONG_MAX && errno == ERANGE) + && dev == (dev_t) dev) + return dev; + } + +# endif + (void) mount_options; + return -1; +} + +#endif + +/* Return a list of the currently mounted file systems, or NULL on error. + Add each entry to the tail of the list so that they stay in order. + If NEED_FS_TYPE is true, ensure that the file system type fields in + the returned list are valid. Otherwise, they might not be. */ + +struct mount_entry * +read_file_system_list (bool need_fs_type) +{ + struct mount_entry *mount_list; + struct mount_entry *me; + struct mount_entry **mtail = &mount_list; + (void) need_fs_type; + +#ifdef MOUNTED_LISTMNTENT + { + struct tabmntent *mntlist, *p; + struct mntent *mnt; + struct mount_entry *me; + + /* the third and fourth arguments could be used to filter mounts, + but Crays doesn't seem to have any mounts that we want to + remove. Specifically, automount create normal NFS mounts. + */ + + if (listmntent (&mntlist, KMTAB, NULL, NULL) < 0) + return NULL; + for (p = mntlist; p; p = p->next) + { + mnt = p->ment; + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt->mnt_fsname); + me->me_mountdir = xstrdup (mnt->mnt_dir); + me->me_type = xstrdup (mnt->mnt_type); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = -1; + *mtail = me; + mtail = &me->me_next; + } + freemntlist (mntlist); + } +#endif + +#ifdef MOUNTED_GETMNTENT1 /* GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ + { + struct mntent *mnt; + char const *table = MOUNTED; + FILE *fp; + + fp = setmntent (table, "r"); + if (fp == NULL) + return NULL; + + while ((mnt = getmntent (fp))) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt->mnt_fsname); + me->me_mountdir = xstrdup (mnt->mnt_dir); + me->me_type = xstrdup (mnt->mnt_type); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type, mnt); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = dev_from_mount_options (mnt->mnt_opts); + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + + if (endmntent (fp) == 0) + goto free_then_fail; + } +#endif /* MOUNTED_GETMNTENT1. */ + +#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ + { + struct statfs *fsp; + int entries; + + entries = getmntinfo (&fsp, MNT_NOWAIT); + if (entries < 0) + return NULL; + for (; entries-- > 0; fsp++) + { + char *fs_type = fsp_to_string (fsp); + + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsp->f_mntfromname); + me->me_mountdir = xstrdup (fsp->f_mntonname); + me->me_type = fs_type; + me->me_type_malloced = 0; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + } +#endif /* MOUNTED_GETMNTINFO */ + +#ifdef MOUNTED_GETMNTINFO2 /* NetBSD 3.0. */ + { + struct statvfs *fsp; + int entries; + + entries = getmntinfo (&fsp, MNT_NOWAIT); + if (entries < 0) + return NULL; + for (; entries-- > 0; fsp++) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsp->f_mntfromname); + me->me_mountdir = xstrdup (fsp->f_mntonname); + me->me_type = xstrdup (fsp->f_fstypename); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + } +#endif /* MOUNTED_GETMNTINFO2 */ + +#ifdef MOUNTED_GETMNT /* Ultrix. */ + { + int offset = 0; + int val; + struct fs_data fsd; + + while (errno = 0, + 0 < (val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY, + (char *) 0))) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fsd.fd_req.devname); + me->me_mountdir = xstrdup (fsd.fd_req.path); + me->me_type = gt_names[fsd.fd_req.fstype]; + me->me_type_malloced = 0; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = fsd.fd_req.dev; + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + if (val < 0) + goto free_then_fail; + } +#endif /* MOUNTED_GETMNT. */ + +#if defined MOUNTED_FS_STAT_DEV /* BeOS */ + { + /* The next_dev() and fs_stat_dev() system calls give the list of + all file systems, including the information returned by statvfs() + (fs type, total blocks, free blocks etc.), but without the mount + point. But on BeOS all file systems except / are mounted in the + rootfs, directly under /. + The directory name of the mount point is often, but not always, + identical to the volume name of the device. + We therefore get the list of subdirectories of /, and the list + of all file systems, and match the two lists. */ + + DIR *dirp; + struct rootdir_entry + { + char *name; + dev_t dev; + ino_t ino; + struct rootdir_entry *next; + }; + struct rootdir_entry *rootdir_list; + struct rootdir_entry **rootdir_tail; + int32 pos; + dev_t dev; + fs_info fi; + + /* All volumes are mounted in the rootfs, directly under /. */ + rootdir_list = NULL; + rootdir_tail = &rootdir_list; + dirp = opendir ("/"); + if (dirp) + { + struct dirent *d; + + while ((d = readdir (dirp)) != NULL) + { + char *name; + struct stat statbuf; + + if (strcmp (d->d_name, "..") == 0) + continue; + + if (strcmp (d->d_name, ".") == 0) + name = xstrdup ("/"); + else + { + name = xmalloc (1 + strlen (d->d_name) + 1); + name[0] = '/'; + strcpy (name + 1, d->d_name); + } + + if (lstat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode)) + { + struct rootdir_entry *re = xmalloc (sizeof *re); + re->name = name; + re->dev = statbuf.st_dev; + re->ino = statbuf.st_ino; + + /* Add to the linked list. */ + *rootdir_tail = re; + rootdir_tail = &re->next; + } + else + free (name); + } + closedir (dirp); + } + *rootdir_tail = NULL; + + for (pos = 0; (dev = next_dev (&pos)) >= 0; ) + if (fs_stat_dev (dev, &fi) >= 0) + { + /* Note: fi.dev == dev. */ + struct rootdir_entry *re; + + for (re = rootdir_list; re; re = re->next) + if (re->dev == fi.dev && re->ino == fi.root) + break; + + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (fi.device_name[0] != '\0' + ? fi.device_name : fi.fsh_name); + me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name); + me->me_type = xstrdup (fi.fsh_name); + me->me_type_malloced = 1; + me->me_dev = fi.dev; + me->me_dummy = 0; + me->me_remote = (fi.flags & B_FS_IS_SHARED) != 0; + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + *mtail = NULL; + + while (rootdir_list != NULL) + { + struct rootdir_entry *re = rootdir_list; + rootdir_list = re->next; + free (re->name); + free (re); + } + } +#endif /* MOUNTED_FS_STAT_DEV */ + +#if defined MOUNTED_GETFSSTAT /* __alpha running OSF_1 */ + { + int numsys, counter; + size_t bufsize; + struct statfs *stats; + + numsys = getfsstat (NULL, 0L, MNT_NOWAIT); + if (numsys < 0) + return NULL; + if (SIZE_MAX / sizeof *stats <= numsys) + xalloc_die (); + + bufsize = (1 + numsys) * sizeof *stats; + stats = xmalloc (bufsize); + numsys = getfsstat (stats, bufsize, MNT_NOWAIT); + + if (numsys < 0) + { + free (stats); + return NULL; + } + + for (counter = 0; counter < numsys; counter++) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (stats[counter].f_mntfromname); + me->me_mountdir = xstrdup (stats[counter].f_mntonname); + me->me_type = xstrdup (FS_TYPE (stats[counter])); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + + free (stats); + } +#endif /* MOUNTED_GETFSSTAT */ + +#if defined MOUNTED_FREAD || defined MOUNTED_FREAD_FSTYP /* SVR[23]. */ + { + struct mnttab mnt; + char *table = "/etc/mnttab"; + FILE *fp; + + fp = fopen (table, "r"); + if (fp == NULL) + return NULL; + + while (fread (&mnt, sizeof mnt, 1, fp) > 0) + { + me = xmalloc (sizeof *me); +# ifdef GETFSTYP /* SVR3. */ + me->me_devname = xstrdup (mnt.mt_dev); +# else + me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6); + strcpy (me->me_devname, "/dev/"); + strcpy (me->me_devname + 5, mnt.mt_dev); +# endif + me->me_mountdir = xstrdup (mnt.mt_filsys); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + me->me_type = ""; + me->me_type_malloced = 0; +# ifdef GETFSTYP /* SVR3. */ + if (need_fs_type) + { + struct statfs fsd; + char typebuf[FSTYPSZ]; + + if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 + && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1) + { + me->me_type = xstrdup (typebuf); + me->me_type_malloced = 1; + } + } +# endif + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + + if (ferror (fp)) + { + /* The last fread() call must have failed. */ + int saved_errno = errno; + fclose (fp); + errno = saved_errno; + goto free_then_fail; + } + + if (fclose (fp) == EOF) + goto free_then_fail; + } +#endif /* MOUNTED_FREAD || MOUNTED_FREAD_FSTYP. */ + +#ifdef MOUNTED_GETMNTTBL /* DolphinOS goes its own way. */ + { + struct mntent **mnttbl = getmnttbl (), **ent; + for (ent = mnttbl; *ent; ent++) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup ((*ent)->mt_resource); + me->me_mountdir = xstrdup ((*ent)->mt_directory); + me->me_type = xstrdup ((*ent)->mt_fstype); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + endmnttbl (); + } +#endif + +#ifdef MOUNTED_GETMNTENT2 /* SVR4. */ + { + struct mnttab mnt; + char *table = MNTTAB; + FILE *fp; + int ret; + int lockfd = -1; + +# if defined F_RDLCK && defined F_SETLKW + /* MNTTAB_LOCK is a macro name of our own invention; it's not present in + e.g. Solaris 2.6. If the SVR4 folks ever define a macro + for this file name, we should use their macro name instead. + (Why not just lock MNTTAB directly? We don't know.) */ +# ifndef MNTTAB_LOCK +# define MNTTAB_LOCK "/etc/.mnttab.lock" +# endif + lockfd = open (MNTTAB_LOCK, O_RDONLY); + if (0 <= lockfd) + { + struct flock flock; + flock.l_type = F_RDLCK; + flock.l_whence = SEEK_SET; + flock.l_start = 0; + flock.l_len = 0; + while (fcntl (lockfd, F_SETLKW, &flock) == -1) + if (errno != EINTR) + { + int saved_errno = errno; + close (lockfd); + errno = saved_errno; + return NULL; + } + } + else if (errno != ENOENT) + return NULL; +# endif + + errno = 0; + fp = fopen (table, "r"); + if (fp == NULL) + ret = errno; + else + { + while ((ret = getmntent (fp, &mnt)) == 0) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (mnt.mnt_special); + me->me_mountdir = xstrdup (mnt.mnt_mountp); + me->me_type = xstrdup (mnt.mnt_fstype); + me->me_type_malloced = 1; + me->me_dummy = MNT_IGNORE (&mnt) != 0; + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = dev_from_mount_options (mnt.mnt_mntopts); + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + + ret = fclose (fp) == EOF ? errno : 0 < ret ? 0 : -1; + } + + if (0 <= lockfd && close (lockfd) != 0) + ret = errno; + + if (0 <= ret) + { + errno = ret; + goto free_then_fail; + } + } +#endif /* MOUNTED_GETMNTENT2. */ + +#ifdef MOUNTED_VMOUNT /* AIX. */ + { + int bufsize; + char *entries, *thisent; + struct vmount *vmp; + int n_entries; + int i; + + /* Ask how many bytes to allocate for the mounted file system info. */ + if (mntctl (MCTL_QUERY, sizeof bufsize, (struct vmount *) &bufsize) != 0) + return NULL; + entries = xmalloc (bufsize); + + /* Get the list of mounted file systems. */ + n_entries = mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries); + if (n_entries < 0) + { + int saved_errno = errno; + free (entries); + errno = saved_errno; + return NULL; + } + + for (i = 0, thisent = entries; + i < n_entries; + i++, thisent += vmp->vmt_length) + { + char *options, *ignore; + + vmp = (struct vmount *) thisent; + me = xmalloc (sizeof *me); + if (vmp->vmt_flags & MNT_REMOTE) + { + char *host, *dir; + + me->me_remote = 1; + /* Prepend the remote dirname. */ + host = thisent + vmp->vmt_data[VMT_HOSTNAME].vmt_off; + dir = thisent + vmp->vmt_data[VMT_OBJECT].vmt_off; + me->me_devname = xmalloc (strlen (host) + strlen (dir) + 2); + strcpy (me->me_devname, host); + strcat (me->me_devname, ":"); + strcat (me->me_devname, dir); + } + else + { + me->me_remote = 0; + me->me_devname = xstrdup (thisent + + vmp->vmt_data[VMT_OBJECT].vmt_off); + } + me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off); + me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype)); + me->me_type_malloced = 1; + options = thisent + vmp->vmt_data[VMT_ARGS].vmt_off; + ignore = strstr (options, "ignore"); + me->me_dummy = (ignore + && (ignore == options || ignore[-1] == ',') + && (ignore[sizeof "ignore" - 1] == ',' + || ignore[sizeof "ignore" - 1] == '\0')); + me->me_dev = (dev_t) -1; /* vmt_fsid might be the info we want. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + free (entries); + } +#endif /* MOUNTED_VMOUNT. */ + +#ifdef MOUNTED_INTERIX_STATVFS + { + DIR *dirp = opendir ("/dev/fs"); + char node[9 + NAME_MAX]; + + if (!dirp) + goto free_then_fail; + + while (1) + { + struct statvfs dev; + struct dirent entry; + struct dirent *result; + + if (readdir_r (dirp, &entry, &result) || result == NULL) + break; + + strcpy (node, "/dev/fs/"); + strcat (node, entry.d_name); + + if (statvfs (node, &dev) == 0) + { + me = xmalloc (sizeof *me); + me->me_devname = xstrdup (dev.f_mntfromname); + me->me_mountdir = xstrdup (dev.f_mntonname); + me->me_type = xstrdup (dev.f_fstypename); + me->me_type_malloced = 1; + me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); + me->me_remote = ME_REMOTE (me->me_devname, me->me_type); + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ + + /* Add to the linked list. */ + *mtail = me; + mtail = &me->me_next; + } + } + closedir (dirp); + } +#endif /* MOUNTED_INTERIX_STATVFS */ + + *mtail = NULL; + return mount_list; + + + free_then_fail: + { + int saved_errno = errno; + *mtail = NULL; + + while (mount_list) + { + me = mount_list->me_next; + free_mount_entry (mount_list); + mount_list = me; + } + + errno = saved_errno; + return NULL; + } +} + +/* Free a mount entry as returned from read_file_system_list (). */ + +void free_mount_entry (struct mount_entry *me) +{ + free (me->me_devname); + free (me->me_mountdir); + if (me->me_type_malloced) + free (me->me_type); + free (me); +} diff --git a/gl/lib/mountlist.h b/gl/lib/mountlist.h new file mode 100644 index 0000000..1e4dfae --- /dev/null +++ b/gl/lib/mountlist.h @@ -0,0 +1,41 @@ +/* mountlist.h -- declarations for list of mounted file systems + + Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef MOUNTLIST_H_ +# define MOUNTLIST_H_ + +# include +# include + +/* A mount table entry. */ +struct mount_entry +{ + char *me_devname; /* Device node name, including "/dev/". */ + char *me_mountdir; /* Mount point directory name. */ + char *me_type; /* "nfs", "4.2", etc. */ + dev_t me_dev; /* Device number of me_mountdir. */ + unsigned int me_dummy : 1; /* Nonzero for dummy file systems. */ + unsigned int me_remote : 1; /* Nonzero for remote fileystems. */ + unsigned int me_type_malloced : 1; /* Nonzero if me_type was malloced. */ + struct mount_entry *me_next; +}; + +struct mount_entry *read_file_system_list (bool need_fs_type); +void free_mount_entry (struct mount_entry *entry); + +#endif diff --git a/gl/lib/msvc-inval.c b/gl/lib/msvc-inval.c new file mode 100644 index 0000000..f83827f --- /dev/null +++ b/gl/lib/msvc-inval.c @@ -0,0 +1,129 @@ +/* Invalid parameter handler for MSVC runtime libraries. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#include + +/* Specification. */ +#include "msvc-inval.h" + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ + && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING) + +/* Get _invalid_parameter_handler type and _set_invalid_parameter_handler + declaration. */ +# include + +# if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING + +static void __cdecl +gl_msvc_invalid_parameter_handler (const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, + unsigned int line, + uintptr_t dummy) +{ +} + +# else + +/* Get declarations of the native Windows API functions. */ +# define WIN32_LEAN_AND_MEAN +# include + +# if defined _MSC_VER + +static void __cdecl +gl_msvc_invalid_parameter_handler (const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, + unsigned int line, + uintptr_t dummy) +{ + RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL); +} + +# else + +/* An index to thread-local storage. */ +static DWORD tls_index; +static int tls_initialized /* = 0 */; + +/* Used as a fallback only. */ +static struct gl_msvc_inval_per_thread not_per_thread; + +struct gl_msvc_inval_per_thread * +gl_msvc_inval_current (void) +{ + if (!tls_initialized) + { + tls_index = TlsAlloc (); + tls_initialized = 1; + } + if (tls_index == TLS_OUT_OF_INDEXES) + /* TlsAlloc had failed. */ + return ¬_per_thread; + else + { + struct gl_msvc_inval_per_thread *pointer = + (struct gl_msvc_inval_per_thread *) TlsGetValue (tls_index); + if (pointer == NULL) + { + /* First call. Allocate a new 'struct gl_msvc_inval_per_thread'. */ + pointer = + (struct gl_msvc_inval_per_thread *) + malloc (sizeof (struct gl_msvc_inval_per_thread)); + if (pointer == NULL) + /* Could not allocate memory. Use the global storage. */ + pointer = ¬_per_thread; + TlsSetValue (tls_index, pointer); + } + return pointer; + } +} + +static void __cdecl +gl_msvc_invalid_parameter_handler (const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, + unsigned int line, + uintptr_t dummy) +{ + struct gl_msvc_inval_per_thread *current = gl_msvc_inval_current (); + if (current->restart_valid) + longjmp (current->restart, 1); + else + /* An invalid parameter notification from outside the gnulib code. + Give the caller a chance to intervene. */ + RaiseException (STATUS_GNULIB_INVALID_PARAMETER, 0, 0, NULL); +} + +# endif + +# endif + +static int gl_msvc_inval_initialized /* = 0 */; + +void +gl_msvc_inval_ensure_handler (void) +{ + if (gl_msvc_inval_initialized == 0) + { + _set_invalid_parameter_handler (gl_msvc_invalid_parameter_handler); + gl_msvc_inval_initialized = 1; + } +} + +#endif diff --git a/gl/lib/msvc-inval.h b/gl/lib/msvc-inval.h new file mode 100644 index 0000000..a0ef540 --- /dev/null +++ b/gl/lib/msvc-inval.h @@ -0,0 +1,222 @@ +/* Invalid parameter handler for MSVC runtime libraries. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#ifndef _MSVC_INVAL_H +#define _MSVC_INVAL_H + +/* With MSVC runtime libraries with the "invalid parameter handler" concept, + functions like fprintf(), dup2(), or close() crash when the caller passes + an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF) + instead. + This file defines macros that turn such an invalid parameter notification + into a non-local exit. An error code can then be produced at the target + of this exit. You can thus write code like + + TRY_MSVC_INVAL + { + + } + CATCH_MSVC_INVAL + { + + } + DONE_MSVC_INVAL; + + This entire block expands to a single statement. + + The handling of invalid parameters can be done in three ways: + + * The default way, which is reasonable for programs (not libraries): + AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [DEFAULT_HANDLING]) + + * The way for libraries that make "hairy" calls (like close(-1), or + fclose(fp) where fileno(fp) is closed, or simply getdtablesize()): + AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [HAIRY_LIBRARY_HANDLING]) + + * The way for libraries that make no "hairy" calls: + AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [SANE_LIBRARY_HANDLING]) + */ + +#define DEFAULT_HANDLING 0 +#define HAIRY_LIBRARY_HANDLING 1 +#define SANE_LIBRARY_HANDLING 2 + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ + && !(MSVC_INVALID_PARAMETER_HANDLING == SANE_LIBRARY_HANDLING) +/* A native Windows platform with the "invalid parameter handler" concept, + and either DEFAULT_HANDLING or HAIRY_LIBRARY_HANDLING. */ + +# if MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING +/* Default handling. */ + +# ifdef __cplusplus +extern "C" { +# endif + +/* Ensure that the invalid parameter handler in installed that just returns. + Because we assume no other part of the program installs a different + invalid parameter handler, this solution is multithread-safe. */ +extern void gl_msvc_inval_ensure_handler (void); + +# ifdef __cplusplus +} +# endif + +# define TRY_MSVC_INVAL \ + do \ + { \ + gl_msvc_inval_ensure_handler (); \ + if (1) +# define CATCH_MSVC_INVAL \ + else +# define DONE_MSVC_INVAL \ + } \ + while (0) + +# else +/* Handling for hairy libraries. */ + +# include + +/* Gnulib can define its own status codes, as described in the page + "Raising Software Exceptions" on microsoft.com + . + Our status codes are composed of + - 0xE0000000, mandatory for all user-defined status codes, + - 0x474E550, a API identifier ("GNU"), + - 0, 1, 2, ..., used to distinguish different status codes from the + same API. */ +# define STATUS_GNULIB_INVALID_PARAMETER (0xE0000000 + 0x474E550 + 0) + +# if defined _MSC_VER +/* A compiler that supports __try/__except, as described in the page + "try-except statement" on microsoft.com + . + With __try/__except, we can use the multithread-safe exception handling. */ + +# ifdef __cplusplus +extern "C" { +# endif + +/* Ensure that the invalid parameter handler in installed that raises a + software exception with code STATUS_GNULIB_INVALID_PARAMETER. + Because we assume no other part of the program installs a different + invalid parameter handler, this solution is multithread-safe. */ +extern void gl_msvc_inval_ensure_handler (void); + +# ifdef __cplusplus +} +# endif + +# define TRY_MSVC_INVAL \ + do \ + { \ + gl_msvc_inval_ensure_handler (); \ + __try +# define CATCH_MSVC_INVAL \ + __except (GetExceptionCode () == STATUS_GNULIB_INVALID_PARAMETER \ + ? EXCEPTION_EXECUTE_HANDLER \ + : EXCEPTION_CONTINUE_SEARCH) +# define DONE_MSVC_INVAL \ + } \ + while (0) + +# else +/* Any compiler. + We can only use setjmp/longjmp. */ + +# include + +# ifdef __cplusplus +extern "C" { +# endif + +struct gl_msvc_inval_per_thread +{ + /* The restart that will resume execution at the code between + CATCH_MSVC_INVAL and DONE_MSVC_INVAL. It is enabled only between + TRY_MSVC_INVAL and CATCH_MSVC_INVAL. */ + jmp_buf restart; + + /* Tells whether the contents of restart is valid. */ + int restart_valid; +}; + +/* Ensure that the invalid parameter handler in installed that passes + control to the gl_msvc_inval_restart if it is valid, or raises a + software exception with code STATUS_GNULIB_INVALID_PARAMETER otherwise. + Because we assume no other part of the program installs a different + invalid parameter handler, this solution is multithread-safe. */ +extern void gl_msvc_inval_ensure_handler (void); + +/* Return a pointer to the per-thread data for the current thread. */ +extern struct gl_msvc_inval_per_thread *gl_msvc_inval_current (void); + +# ifdef __cplusplus +} +# endif + +# define TRY_MSVC_INVAL \ + do \ + { \ + struct gl_msvc_inval_per_thread *msvc_inval_current; \ + gl_msvc_inval_ensure_handler (); \ + msvc_inval_current = gl_msvc_inval_current (); \ + /* First, initialize gl_msvc_inval_restart. */ \ + if (setjmp (msvc_inval_current->restart) == 0) \ + { \ + /* Then, mark it as valid. */ \ + msvc_inval_current->restart_valid = 1; +# define CATCH_MSVC_INVAL \ + /* Execution completed. \ + Mark gl_msvc_inval_restart as invalid. */ \ + msvc_inval_current->restart_valid = 0; \ + } \ + else \ + { \ + /* Execution triggered an invalid parameter notification. \ + Mark gl_msvc_inval_restart as invalid. */ \ + msvc_inval_current->restart_valid = 0; +# define DONE_MSVC_INVAL \ + } \ + } \ + while (0) + +# endif + +# endif + +#else +/* A platform that does not need to the invalid parameter handler, + or when SANE_LIBRARY_HANDLING is desired. */ + +/* The braces here avoid GCC warnings like + "warning: suggest explicit braces to avoid ambiguous 'else'". */ +# define TRY_MSVC_INVAL \ + do \ + { \ + if (1) +# define CATCH_MSVC_INVAL \ + else +# define DONE_MSVC_INVAL \ + } \ + while (0) + +#endif + +#endif /* _MSVC_INVAL_H */ diff --git a/gl/lib/msvc-nothrow.c b/gl/lib/msvc-nothrow.c new file mode 100644 index 0000000..b1e5f0c --- /dev/null +++ b/gl/lib/msvc-nothrow.c @@ -0,0 +1,49 @@ +/* Wrappers that don't throw invalid parameter notifications + with MSVC runtime libraries. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#include + +/* Specification. */ +#include "msvc-nothrow.h" + +/* Get declarations of the native Windows API functions. */ +#define WIN32_LEAN_AND_MEAN +#include + +#include "msvc-inval.h" + +#undef _get_osfhandle + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +intptr_t +_gl_nothrow_get_osfhandle (int fd) +{ + intptr_t result; + + TRY_MSVC_INVAL + { + result = _get_osfhandle (fd); + } + CATCH_MSVC_INVAL + { + result = (intptr_t) INVALID_HANDLE_VALUE; + } + DONE_MSVC_INVAL; + + return result; +} +#endif diff --git a/gl/lib/msvc-nothrow.h b/gl/lib/msvc-nothrow.h new file mode 100644 index 0000000..0d4dea5 --- /dev/null +++ b/gl/lib/msvc-nothrow.h @@ -0,0 +1,43 @@ +/* Wrappers that don't throw invalid parameter notifications + with MSVC runtime libraries. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#ifndef _MSVC_NOTHROW_H +#define _MSVC_NOTHROW_H + +/* With MSVC runtime libraries with the "invalid parameter handler" concept, + functions like fprintf(), dup2(), or close() crash when the caller passes + an invalid argument. But POSIX wants error codes (such as EINVAL or EBADF) + instead. + This file defines wrappers that turn such an invalid parameter notification + into an error code. */ + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + +/* Get original declaration of _get_osfhandle. */ +# include + +# if HAVE_MSVC_INVALID_PARAMETER_HANDLER + +/* Override _get_osfhandle. */ +extern intptr_t _gl_nothrow_get_osfhandle (int fd); +# define _get_osfhandle _gl_nothrow_get_osfhandle + +# endif + +#endif + +#endif /* _MSVC_NOTHROW_H */ diff --git a/gl/lib/nl_langinfo.c b/gl/lib/nl_langinfo.c new file mode 100644 index 0000000..287abfd --- /dev/null +++ b/gl/lib/nl_langinfo.c @@ -0,0 +1,271 @@ +/* nl_langinfo() replacement: query locale dependent information. + + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#if REPLACE_NL_LANGINFO + +/* Override nl_langinfo with support for added nl_item values. */ + +# include +# include + +# undef nl_langinfo + +char * +rpl_nl_langinfo (nl_item item) +{ + switch (item) + { +# if GNULIB_defined_CODESET + case CODESET: + { + const char *locale; + static char buf[2 + 10 + 1]; + + locale = setlocale (LC_CTYPE, NULL); + if (locale != NULL && locale[0] != '\0') + { + /* If the locale name contains an encoding after the dot, return + it. */ + const char *dot = strchr (locale, '.'); + + if (dot != NULL) + { + const char *modifier; + + dot++; + /* Look for the possible @... trailer and remove it, if any. */ + modifier = strchr (dot, '@'); + if (modifier == NULL) + return dot; + if (modifier - dot < sizeof (buf)) + { + memcpy (buf, dot, modifier - dot); + buf [modifier - dot] = '\0'; + return buf; + } + } + } + return ""; + } +# endif +# if GNULIB_defined_T_FMT_AMPM + case T_FMT_AMPM: + return "%I:%M:%S %p"; +# endif +# if GNULIB_defined_ERA + case ERA: + /* The format is not standardized. In glibc it is a sequence of strings + of the form "direction:offset:start_date:end_date:era_name:era_format" + with an empty string at the end. */ + return ""; + case ERA_D_FMT: + /* The %Ex conversion in strftime behaves like %x if the locale does not + have an alternative time format. */ + item = D_FMT; + break; + case ERA_D_T_FMT: + /* The %Ec conversion in strftime behaves like %c if the locale does not + have an alternative time format. */ + item = D_T_FMT; + break; + case ERA_T_FMT: + /* The %EX conversion in strftime behaves like %X if the locale does not + have an alternative time format. */ + item = T_FMT; + break; + case ALT_DIGITS: + /* The format is not standardized. In glibc it is a sequence of 10 + strings, appended in memory. */ + return "\0\0\0\0\0\0\0\0\0\0"; +# endif +# if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS + case YESEXPR: + return "^[yY]"; + case NOEXPR: + return "^[nN]"; +# endif + default: + break; + } + return nl_langinfo (item); +} + +#else + +/* Provide nl_langinfo from scratch. */ + +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + +/* Native Windows platforms. */ + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include + +# include + +# else + +/* An old Unix platform without locales, such as Linux libc5 or BeOS. */ + +# endif + +# include + +char * +nl_langinfo (nl_item item) +{ + switch (item) + { + /* nl_langinfo items of the LC_CTYPE category */ + case CODESET: +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + { + static char buf[2 + 10 + 1]; + + /* The Windows API has a function returning the locale's codepage as + a number. */ + sprintf (buf, "CP%u", GetACP ()); + return buf; + } +# elif defined __BEOS__ + return "UTF-8"; +# else + return "ISO-8859-1"; +# endif + /* nl_langinfo items of the LC_NUMERIC category */ + case RADIXCHAR: + return localeconv () ->decimal_point; + case THOUSEP: + return localeconv () ->thousands_sep; + /* nl_langinfo items of the LC_TIME category. + TODO: Really use the locale. */ + case D_T_FMT: + case ERA_D_T_FMT: + return "%a %b %e %H:%M:%S %Y"; + case D_FMT: + case ERA_D_FMT: + return "%m/%d/%y"; + case T_FMT: + case ERA_T_FMT: + return "%H:%M:%S"; + case T_FMT_AMPM: + return "%I:%M:%S %p"; + case AM_STR: + return "AM"; + case PM_STR: + return "PM"; + case DAY_1: + return "Sunday"; + case DAY_2: + return "Monday"; + case DAY_3: + return "Tuesday"; + case DAY_4: + return "Wednesday"; + case DAY_5: + return "Thursday"; + case DAY_6: + return "Friday"; + case DAY_7: + return "Saturday"; + case ABDAY_1: + return "Sun"; + case ABDAY_2: + return "Mon"; + case ABDAY_3: + return "Tue"; + case ABDAY_4: + return "Wed"; + case ABDAY_5: + return "Thu"; + case ABDAY_6: + return "Fri"; + case ABDAY_7: + return "Sat"; + case MON_1: + return "January"; + case MON_2: + return "February"; + case MON_3: + return "March"; + case MON_4: + return "April"; + case MON_5: + return "May"; + case MON_6: + return "June"; + case MON_7: + return "July"; + case MON_8: + return "August"; + case MON_9: + return "September"; + case MON_10: + return "October"; + case MON_11: + return "November"; + case MON_12: + return "December"; + case ABMON_1: + return "Jan"; + case ABMON_2: + return "Feb"; + case ABMON_3: + return "Mar"; + case ABMON_4: + return "Apr"; + case ABMON_5: + return "May"; + case ABMON_6: + return "Jun"; + case ABMON_7: + return "Jul"; + case ABMON_8: + return "Aug"; + case ABMON_9: + return "Sep"; + case ABMON_10: + return "Oct"; + case ABMON_11: + return "Nov"; + case ABMON_12: + return "Dec"; + case ERA: + return ""; + case ALT_DIGITS: + return "\0\0\0\0\0\0\0\0\0\0"; + /* nl_langinfo items of the LC_MONETARY category + TODO: Really use the locale. */ + case CRNCYSTR: + return "-"; + /* nl_langinfo items of the LC_MESSAGES category + TODO: Really use the locale. */ + case YESEXPR: + return "^[yY]"; + case NOEXPR: + return "^[nN]"; + default: + return ""; + } +} + +#endif diff --git a/gl/lib/open-safer.c b/gl/lib/open-safer.c new file mode 100644 index 0000000..91d6923 --- /dev/null +++ b/gl/lib/open-safer.c @@ -0,0 +1,46 @@ +/* Invoke open, but avoid some glitches. + + Copyright (C) 2005-2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include + +#include "fcntl-safer.h" + +#include +#include +#include "unistd-safer.h" + +int +open_safer (char const *file, int flags, ...) +{ + mode_t mode = 0; + + if (flags & O_CREAT) + { + va_list ap; + va_start (ap, flags); + + /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 + creates crashing code when 'mode_t' is smaller than 'int'. */ + mode = va_arg (ap, PROMOTED_MODE_T); + + va_end (ap); + } + + return fd_safer (open (file, flags, mode)); +} diff --git a/gl/lib/open.c b/gl/lib/open.c new file mode 100644 index 0000000..d6f8e0d --- /dev/null +++ b/gl/lib/open.c @@ -0,0 +1,181 @@ +/* Open a descriptor to a file. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +/* If the user's config.h happens to include , let it include only + the system's here, so that orig_open doesn't recurse to + rpl_open. */ +#define __need_system_fcntl_h +#include + +/* Get the original definition of open. It might be defined as a macro. */ +#include +#include +#undef __need_system_fcntl_h + +static int +orig_open (const char *filename, int flags, mode_t mode) +{ + return open (filename, flags, mode); +} + +/* Specification. */ +/* Write "fcntl.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates + this include because of the preliminary #include above. */ +#include "fcntl.h" + +#include +#include +#include +#include +#include +#include + +#ifndef REPLACE_OPEN_DIRECTORY +# define REPLACE_OPEN_DIRECTORY 0 +#endif + +int +open (const char *filename, int flags, ...) +{ + mode_t mode; + int fd; + + mode = 0; + if (flags & O_CREAT) + { + va_list arg; + va_start (arg, flags); + + /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 + creates crashing code when 'mode_t' is smaller than 'int'. */ + mode = va_arg (arg, PROMOTED_MODE_T); + + va_end (arg); + } + +#if GNULIB_defined_O_NONBLOCK + /* The only known platform that lacks O_NONBLOCK is mingw, but it + also lacks named pipes and Unix sockets, which are the only two + file types that require non-blocking handling in open(). + Therefore, it is safe to ignore O_NONBLOCK here. It is handy + that mingw also lacks openat(), so that is also covered here. */ + flags &= ~O_NONBLOCK; +#endif + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + if (strcmp (filename, "/dev/null") == 0) + filename = "NUL"; +#endif + +#if OPEN_TRAILING_SLASH_BUG + /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR + is specified, then fail. + Rationale: POSIX + says that + "A pathname that contains at least one non-slash character and that + ends with one or more trailing slashes shall be resolved as if a + single dot character ( '.' ) were appended to the pathname." + and + "The special filename dot shall refer to the directory specified by + its predecessor." + If the named file already exists as a directory, then + - if O_CREAT is specified, open() must fail because of the semantics + of O_CREAT, + - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX + says that it + fails with errno = EISDIR in this case. + If the named file does not exist or does not name a directory, then + - if O_CREAT is specified, open() must fail since open() cannot create + directories, + - if O_WRONLY or O_RDWR is specified, open() must fail because the + file does not contain a '.' directory. */ + if (flags & (O_CREAT | O_WRONLY | O_RDWR)) + { + size_t len = strlen (filename); + if (len > 0 && filename[len - 1] == '/') + { + errno = EISDIR; + return -1; + } + } +#endif + + fd = orig_open (filename, flags, mode); + +#if REPLACE_FCHDIR + /* Implementing fchdir and fdopendir requires the ability to open a + directory file descriptor. If open doesn't support that (as on + mingw), we use a dummy file that behaves the same as directories + on Linux (ie. always reports EOF on attempts to read()), and + override fstat() in fchdir.c to hide the fact that we have a + dummy. */ + if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES + && ((flags & O_ACCMODE) == O_RDONLY + || (O_SEARCH != O_RDONLY && (flags & O_ACCMODE) == O_SEARCH))) + { + struct stat statbuf; + if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)) + { + /* Maximum recursion depth of 1. */ + fd = open ("/dev/null", flags, mode); + if (0 <= fd) + fd = _gl_register_fd (fd, filename); + } + else + errno = EACCES; + } +#endif + +#if OPEN_TRAILING_SLASH_BUG + /* If the filename ends in a slash and fd does not refer to a directory, + then fail. + Rationale: POSIX + says that + "A pathname that contains at least one non-slash character and that + ends with one or more trailing slashes shall be resolved as if a + single dot character ( '.' ) were appended to the pathname." + and + "The special filename dot shall refer to the directory specified by + its predecessor." + If the named file without the slash is not a directory, open() must fail + with ENOTDIR. */ + if (fd >= 0) + { + /* We know len is positive, since open did not fail with ENOENT. */ + size_t len = strlen (filename); + if (filename[len - 1] == '/') + { + struct stat statbuf; + + if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) + { + close (fd); + errno = ENOTDIR; + return -1; + } + } + } +#endif + +#if REPLACE_FCHDIR + if (!REPLACE_OPEN_DIRECTORY && 0 <= fd) + fd = _gl_register_fd (fd, filename); +#endif + + return fd; +} diff --git a/gl/lib/openat-die.c b/gl/lib/openat-die.c new file mode 100644 index 0000000..02f1fd7 --- /dev/null +++ b/gl/lib/openat-die.c @@ -0,0 +1,62 @@ +/* Report a save- or restore-cwd failure in our openat replacement and then exit. + + Copyright (C) 2005-2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "openat.h" + +#include + +#ifndef GNULIB_LIBPOSIX +# include "error.h" +#endif + +#include "exitfail.h" + +#include "gettext.h" +#define _(msgid) gettext (msgid) + +void +openat_save_fail (int errnum) +{ +#ifndef GNULIB_LIBPOSIX + error (exit_failure, errnum, + _("unable to record current working directory")); +#endif + /* _Noreturn cannot be applied to error, since it returns + when its first argument is 0. To help compilers understand that this + function does not return, call abort. Also, the abort is a + safety feature if exit_failure is 0 (which shouldn't happen). */ + abort (); +} + + +/* Exit with an error about failure to restore the working directory + during an openat emulation. The caller must ensure that fd 2 is + not a just-opened fd, even when openat_safer is not in use. */ + +void +openat_restore_fail (int errnum) +{ +#ifndef GNULIB_LIBPOSIX + error (exit_failure, errnum, + _("failed to return to initial working directory")); +#endif + + /* As above. */ + abort (); +} diff --git a/gl/lib/openat-priv.h b/gl/lib/openat-priv.h new file mode 100644 index 0000000..326c739 --- /dev/null +++ b/gl/lib/openat-priv.h @@ -0,0 +1,64 @@ +/* Internals for openat-like functions. + + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#ifndef _GL_HEADER_OPENAT_PRIV +#define _GL_HEADER_OPENAT_PRIV + +#include +#include +#include + +/* Maximum number of bytes that it is safe to allocate as a single + array on the stack, and that is known as a compile-time constant. + The assumption is that we'll touch the array very quickly, or a + temporary very near the array, provoking an out-of-memory trap. On + some operating systems, there is only one guard page for the stack, + and a page size can be as small as 4096 bytes. Subtract 64 in the + hope that this will let the compiler touch a nearby temporary and + provoke a trap. */ +#define SAFER_ALLOCA_MAX (4096 - 64) + +#define SAFER_ALLOCA(m) ((m) < SAFER_ALLOCA_MAX ? (m) : SAFER_ALLOCA_MAX) + +#if defined PATH_MAX +# define OPENAT_BUFFER_SIZE SAFER_ALLOCA (PATH_MAX) +#elif defined _XOPEN_PATH_MAX +# define OPENAT_BUFFER_SIZE SAFER_ALLOCA (_XOPEN_PATH_MAX) +#else +# define OPENAT_BUFFER_SIZE SAFER_ALLOCA (1024) +#endif + +char *openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file); + +/* Trying to access a BUILD_PROC_NAME file will fail on systems without + /proc support, and even on systems *with* ProcFS support. Return + nonzero if the failure may be legitimate, e.g., because /proc is not + readable, or the particular .../fd/N directory is not present. */ +#define EXPECTED_ERRNO(Errno) \ + ((Errno) == ENOTDIR || (Errno) == ENOENT \ + || (Errno) == EPERM || (Errno) == EACCES \ + || (Errno) == ENOSYS /* Solaris 8 */ \ + || (Errno) == EOPNOTSUPP /* FreeBSD */) + +/* Wrapper function shared among linkat and renameat. */ +int at_func2 (int fd1, char const *file1, + int fd2, char const *file2, + int (*func) (char const *file1, char const *file2)); + +#endif /* _GL_HEADER_OPENAT_PRIV */ diff --git a/gl/lib/openat-proc.c b/gl/lib/openat-proc.c new file mode 100644 index 0000000..6a4f6ad --- /dev/null +++ b/gl/lib/openat-proc.c @@ -0,0 +1,110 @@ +/* Create /proc/self/fd-related names for subfiles of open directories. + + Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include + +#include "openat-priv.h" + +#include +#include +#include + +#include +#include +#include +#include + +#include "intprops.h" + +/* The results of open() in this file are not used with fchdir, + and we do not leak fds to any single-threaded code that could use stdio, + therefore save some unnecessary work in fchdir.c. + FIXME - if the kernel ever adds support for multi-thread safety for + avoiding standard fds, then we should use open_safer. */ +#undef open +#undef close + +#define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/%s" + +#define PROC_SELF_FD_NAME_SIZE_BOUND(len) \ + (sizeof PROC_SELF_FD_FORMAT - sizeof "%d%s" \ + + INT_STRLEN_BOUND (int) + (len) + 1) + + +/* Set BUF to the expansion of PROC_SELF_FD_FORMAT, using FD and FILE + respectively for %d and %s. If successful, return BUF if the + result fits in BUF, dynamically allocated memory otherwise. But + return NULL if /proc is not reliable, either because the operating + system support is lacking or because memory is low. */ +char * +openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file) +{ + static int proc_status = 0; + + /* Make sure the caller gets ENOENT when appropriate. */ + if (!*file) + { + buf[0] = '\0'; + return buf; + } + + if (! proc_status) + { + /* Set PROC_STATUS to a positive value if /proc/self/fd is + reliable, and a negative value otherwise. Solaris 10 + /proc/self/fd mishandles "..", and any file name might expand + to ".." after symbolic link expansion, so avoid /proc/self/fd + if it mishandles "..". Solaris 10 has openat, but this + problem is exhibited on code that built on Solaris 8 and + running on Solaris 10. */ + + int proc_self_fd = open ("/proc/self/fd", + O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK); + if (proc_self_fd < 0) + proc_status = -1; + else + { + /* Detect whether /proc/self/fd/%i/../fd exists, where %i is the + number of a file descriptor open on /proc/self/fd. On Linux, + that name resolves to /proc/self/fd, which was opened above. + However, on Solaris, it may resolve to /proc/self/fd/fd, which + cannot exist, since all names in /proc/self/fd are numeric. */ + char dotdot_buf[PROC_SELF_FD_NAME_SIZE_BOUND (sizeof "../fd" - 1)]; + sprintf (dotdot_buf, PROC_SELF_FD_FORMAT, proc_self_fd, "../fd"); + proc_status = access (dotdot_buf, F_OK) ? -1 : 1; + close (proc_self_fd); + } + } + + if (proc_status < 0) + return NULL; + else + { + size_t bufsize = PROC_SELF_FD_NAME_SIZE_BOUND (strlen (file)); + char *result = buf; + if (OPENAT_BUFFER_SIZE < bufsize) + { + result = malloc (bufsize); + if (! result) + return NULL; + } + sprintf (result, PROC_SELF_FD_FORMAT, fd, file); + return result; + } +} diff --git a/gl/lib/openat-safer.c b/gl/lib/openat-safer.c new file mode 100644 index 0000000..d0dc2d7 --- /dev/null +++ b/gl/lib/openat-safer.c @@ -0,0 +1,46 @@ +/* Invoke openat, but avoid some glitches. + + Copyright (C) 2005-2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert for open, ported by Eric Blake for openat. */ + +#include + +#include "fcntl-safer.h" + +#include +#include +#include "unistd-safer.h" + +int +openat_safer (int fd, char const *file, int flags, ...) +{ + mode_t mode = 0; + + if (flags & O_CREAT) + { + va_list ap; + va_start (ap, flags); + + /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 + creates crashing code when 'mode_t' is smaller than 'int'. */ + mode = va_arg (ap, PROMOTED_MODE_T); + + va_end (ap); + } + + return fd_safer (openat (fd, file, flags, mode)); +} diff --git a/gl/lib/openat.c b/gl/lib/openat.c new file mode 100644 index 0000000..9d2f7d4 --- /dev/null +++ b/gl/lib/openat.c @@ -0,0 +1,286 @@ +/* provide a replacement openat function + Copyright (C) 2004-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +/* If the user's config.h happens to include , let it include only + the system's here, so that orig_openat doesn't recurse to + rpl_openat. */ +#define __need_system_fcntl_h +#include + +/* Get the original definition of open. It might be defined as a macro. */ +#include +#include +#undef __need_system_fcntl_h + +#if HAVE_OPENAT +static int +orig_openat (int fd, char const *filename, int flags, mode_t mode) +{ + return openat (fd, filename, flags, mode); +} +#endif + +/* Write "fcntl.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates + this include because of the preliminary #include above. */ +#include "fcntl.h" + +#include "openat.h" + +#include +#include +#include +#include +#include +#include + +#if HAVE_OPENAT + +/* Like openat, but work around Solaris 9 bugs with trailing slash. */ +int +rpl_openat (int dfd, char const *filename, int flags, ...) +{ + mode_t mode; + int fd; + + mode = 0; + if (flags & O_CREAT) + { + va_list arg; + va_start (arg, flags); + + /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 + creates crashing code when 'mode_t' is smaller than 'int'. */ + mode = va_arg (arg, PROMOTED_MODE_T); + + va_end (arg); + } + +# if OPEN_TRAILING_SLASH_BUG + /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR + is specified, then fail. + Rationale: POSIX + says that + "A pathname that contains at least one non-slash character and that + ends with one or more trailing slashes shall be resolved as if a + single dot character ( '.' ) were appended to the pathname." + and + "The special filename dot shall refer to the directory specified by + its predecessor." + If the named file already exists as a directory, then + - if O_CREAT is specified, open() must fail because of the semantics + of O_CREAT, + - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX + says that it + fails with errno = EISDIR in this case. + If the named file does not exist or does not name a directory, then + - if O_CREAT is specified, open() must fail since open() cannot create + directories, + - if O_WRONLY or O_RDWR is specified, open() must fail because the + file does not contain a '.' directory. */ + if (flags & (O_CREAT | O_WRONLY | O_RDWR)) + { + size_t len = strlen (filename); + if (len > 0 && filename[len - 1] == '/') + { + errno = EISDIR; + return -1; + } + } +# endif + + fd = orig_openat (dfd, filename, flags, mode); + +# if OPEN_TRAILING_SLASH_BUG + /* If the filename ends in a slash and fd does not refer to a directory, + then fail. + Rationale: POSIX + says that + "A pathname that contains at least one non-slash character and that + ends with one or more trailing slashes shall be resolved as if a + single dot character ( '.' ) were appended to the pathname." + and + "The special filename dot shall refer to the directory specified by + its predecessor." + If the named file without the slash is not a directory, open() must fail + with ENOTDIR. */ + if (fd >= 0) + { + /* We know len is positive, since open did not fail with ENOENT. */ + size_t len = strlen (filename); + if (filename[len - 1] == '/') + { + struct stat statbuf; + + if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) + { + close (fd); + errno = ENOTDIR; + return -1; + } + } + } +# endif + + return fd; +} + +#else /* !HAVE_OPENAT */ + +# include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ +# include "openat-priv.h" +# include "save-cwd.h" + +/* Replacement for Solaris' openat function. + + First, try to simulate it via open ("/proc/self/fd/FD/FILE"). + Failing that, simulate it by doing save_cwd/fchdir/open/restore_cwd. + If either the save_cwd or the restore_cwd fails (relatively unlikely), + then give a diagnostic and exit nonzero. + Otherwise, upon failure, set errno and return -1, as openat does. + Upon successful completion, return a file descriptor. */ +int +openat (int fd, char const *file, int flags, ...) +{ + mode_t mode = 0; + + if (flags & O_CREAT) + { + va_list arg; + va_start (arg, flags); + + /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 + creates crashing code when 'mode_t' is smaller than 'int'. */ + mode = va_arg (arg, PROMOTED_MODE_T); + + va_end (arg); + } + + return openat_permissive (fd, file, flags, mode, NULL); +} + +/* Like openat (FD, FILE, FLAGS, MODE), but if CWD_ERRNO is + nonnull, set *CWD_ERRNO to an errno value if unable to save + or restore the initial working directory. This is needed only + the first time remove.c's remove_dir opens a command-line + directory argument. + + If a previous attempt to restore the current working directory + failed, then we must not even try to access a '.'-relative name. + It is the caller's responsibility not to call this function + in that case. */ + +int +openat_permissive (int fd, char const *file, int flags, mode_t mode, + int *cwd_errno) +{ + struct saved_cwd saved_cwd; + int saved_errno; + int err; + bool save_ok; + + if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file)) + return open (file, flags, mode); + + { + char buf[OPENAT_BUFFER_SIZE]; + char *proc_file = openat_proc_name (buf, fd, file); + if (proc_file) + { + int open_result = open (proc_file, flags, mode); + int open_errno = errno; + if (proc_file != buf) + free (proc_file); + /* If the syscall succeeds, or if it fails with an unexpected + errno value, then return right away. Otherwise, fall through + and resort to using save_cwd/restore_cwd. */ + if (0 <= open_result || ! EXPECTED_ERRNO (open_errno)) + { + errno = open_errno; + return open_result; + } + } + } + + save_ok = (save_cwd (&saved_cwd) == 0); + if (! save_ok) + { + if (! cwd_errno) + openat_save_fail (errno); + *cwd_errno = errno; + } + if (0 <= fd && fd == saved_cwd.desc) + { + /* If saving the working directory collides with the user's + requested fd, then the user's fd must have been closed to + begin with. */ + free_cwd (&saved_cwd); + errno = EBADF; + return -1; + } + + err = fchdir (fd); + saved_errno = errno; + + if (! err) + { + err = open (file, flags, mode); + saved_errno = errno; + if (save_ok && restore_cwd (&saved_cwd) != 0) + { + if (! cwd_errno) + { + /* Don't write a message to just-created fd 2. */ + saved_errno = errno; + if (err == STDERR_FILENO) + close (err); + openat_restore_fail (saved_errno); + } + *cwd_errno = errno; + } + } + + free_cwd (&saved_cwd); + errno = saved_errno; + return err; +} + +/* Return true if our openat implementation must resort to + using save_cwd and restore_cwd. */ +bool +openat_needs_fchdir (void) +{ + bool needs_fchdir = true; + int fd = open ("/", O_SEARCH); + + if (0 <= fd) + { + char buf[OPENAT_BUFFER_SIZE]; + char *proc_file = openat_proc_name (buf, fd, "."); + if (proc_file) + { + needs_fchdir = false; + if (proc_file != buf) + free (proc_file); + } + close (fd); + } + + return needs_fchdir; +} + +#endif /* !HAVE_OPENAT */ diff --git a/gl/lib/openat.h b/gl/lib/openat.h new file mode 100644 index 0000000..29e23a5 --- /dev/null +++ b/gl/lib/openat.h @@ -0,0 +1,123 @@ +/* provide a replacement openat function + Copyright (C) 2004-2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#ifndef _GL_HEADER_OPENAT +#define _GL_HEADER_OPENAT + +#include + +#include +#include +#include +#include + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN + +#if !HAVE_OPENAT + +int openat_permissive (int fd, char const *file, int flags, mode_t mode, + int *cwd_errno); +bool openat_needs_fchdir (void); + +#else + +# define openat_permissive(Fd, File, Flags, Mode, Cwd_errno) \ + openat (Fd, File, Flags, Mode) +# define openat_needs_fchdir() false + +#endif + +_Noreturn void openat_restore_fail (int); +_Noreturn void openat_save_fail (int); + +/* Using these function names makes application code + slightly more readable than it would be with + fchownat (..., 0) or fchownat (..., AT_SYMLINK_NOFOLLOW). */ + +#if GNULIB_FCHOWNAT + +# ifndef FCHOWNAT_INLINE +# define FCHOWNAT_INLINE _GL_INLINE +# endif + +FCHOWNAT_INLINE int +chownat (int fd, char const *file, uid_t owner, gid_t group) +{ + return fchownat (fd, file, owner, group, 0); +} + +FCHOWNAT_INLINE int +lchownat (int fd, char const *file, uid_t owner, gid_t group) +{ + return fchownat (fd, file, owner, group, AT_SYMLINK_NOFOLLOW); +} + +#endif + +#if GNULIB_FCHMODAT + +# ifndef FCHMODAT_INLINE +# define FCHMODAT_INLINE _GL_INLINE +# endif + +FCHMODAT_INLINE int +chmodat (int fd, char const *file, mode_t mode) +{ + return fchmodat (fd, file, mode, 0); +} + +FCHMODAT_INLINE int +lchmodat (int fd, char const *file, mode_t mode) +{ + return fchmodat (fd, file, mode, AT_SYMLINK_NOFOLLOW); +} + +#endif + +#if GNULIB_STATAT + +# ifndef STATAT_INLINE +# define STATAT_INLINE _GL_INLINE +# endif + +STATAT_INLINE int +statat (int fd, char const *name, struct stat *st) +{ + return fstatat (fd, name, st, 0); +} + +STATAT_INLINE int +lstatat (int fd, char const *name, struct stat *st) +{ + return fstatat (fd, name, st, AT_SYMLINK_NOFOLLOW); +} + +#endif + +/* For now, there are no wrappers named laccessat or leuidaccessat, + since gnulib doesn't support faccessat(,AT_SYMLINK_NOFOLLOW) and + since access rights on symlinks are of limited utility. Likewise, + wrappers are not provided for accessat or euidaccessat, so as to + avoid dragging in -lgen on some platforms. */ + +_GL_INLINE_HEADER_END + +#endif /* _GL_HEADER_OPENAT */ diff --git a/gl/lib/opendir-safer.c b/gl/lib/opendir-safer.c new file mode 100644 index 0000000..e31da88 --- /dev/null +++ b/gl/lib/opendir-safer.c @@ -0,0 +1,76 @@ +/* Invoke opendir, but avoid some glitches. + + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +#include + +#include "dirent-safer.h" + +#include +#include +#include "unistd-safer.h" + +/* Like opendir, but do not clobber stdin, stdout, or stderr. */ + +DIR * +opendir_safer (char const *name) +{ + DIR *dp = opendir (name); + + if (dp) + { + int fd = dirfd (dp); + + if (0 <= fd && fd <= STDERR_FILENO) + { + /* If fdopendir is native (as on Linux), then it is safe to + assume dirfd(fdopendir(n))==n. If we are using the + gnulib module fdopendir, then this guarantee is not met, + but fdopendir recursively calls opendir_safer up to 3 + times to at least get a safe fd. If fdopendir is not + present but dirfd is accurate (as on cygwin 1.5.x), then + we recurse up to 3 times ourselves. Finally, if dirfd + always fails (as on mingw), then we are already safe. */ + DIR *newdp; + int e; +#if HAVE_FDOPENDIR || GNULIB_FDOPENDIR + int f = dup_safer (fd); + if (f < 0) + { + e = errno; + newdp = NULL; + } + else + { + newdp = fdopendir (f); + e = errno; + if (! newdp) + close (f); + } +#else /* !FDOPENDIR */ + newdp = opendir_safer (name); + e = errno; +#endif + closedir (dp); + errno = e; + dp = newdp; + } + } + + return dp; +} diff --git a/gl/lib/opendir.c b/gl/lib/opendir.c new file mode 100644 index 0000000..c67f2e5 --- /dev/null +++ b/gl/lib/opendir.c @@ -0,0 +1,148 @@ +/* Start reading the entries of a directory. + Copyright (C) 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include + +#if HAVE_OPENDIR + +/* Override opendir(), to keep track of the open file descriptors. + Needed because there is a function dirfd(). */ + +#else + +# include + +# include "dirent-private.h" +# include "filename.h" + +#endif + +#if REPLACE_FCHDIR +# include +#endif + +DIR * +opendir (const char *dir_name) +{ +#if HAVE_OPENDIR +# undef opendir + DIR *dirp; + + dirp = opendir (dir_name); + if (dirp == NULL) + return NULL; + +#else + + char dir_name_mask[MAX_PATH + 1 + 1 + 1]; + int status; + HANDLE current; + WIN32_FIND_DATA entry; + struct gl_directory *dirp; + + if (dir_name[0] == '\0') + { + errno = ENOENT; + return NULL; + } + + /* Make the dir_name absolute, so that we continue reading the same + directory if the current directory changed between this opendir() + call and a subsequent rewinddir() call. */ + if (!GetFullPathName (dir_name, MAX_PATH, dir_name_mask, NULL)) + { + errno = EINVAL; + return NULL; + } + + /* Append the mask. + "*" and "*.*" appear to be equivalent. */ + { + char *p; + + p = dir_name_mask + strlen (dir_name_mask); + if (p > dir_name_mask && !ISSLASH (p[-1])) + *p++ = '\\'; + *p++ = '*'; + *p = '\0'; + } + + /* Start searching the directory. */ + status = -1; + current = FindFirstFile (dir_name_mask, &entry); + if (current == INVALID_HANDLE_VALUE) + { + switch (GetLastError ()) + { + case ERROR_FILE_NOT_FOUND: + status = -2; + break; + case ERROR_PATH_NOT_FOUND: + errno = ENOENT; + return NULL; + case ERROR_DIRECTORY: + errno = ENOTDIR; + return NULL; + case ERROR_ACCESS_DENIED: + errno = EACCES; + return NULL; + default: + errno = EIO; + return NULL; + } + } + + /* Allocate the result. */ + dirp = + (struct gl_directory *) + malloc (offsetof (struct gl_directory, dir_name_mask[0]) + + strlen (dir_name_mask) + 1); + if (dirp == NULL) + { + if (current != INVALID_HANDLE_VALUE) + FindClose (current); + errno = ENOMEM; + return NULL; + } + dirp->status = status; + dirp->current = current; + if (status == -1) + memcpy (&dirp->entry, &entry, sizeof (WIN32_FIND_DATA)); + strcpy (dirp->dir_name_mask, dir_name_mask); + +#endif + +#if REPLACE_FCHDIR + { + int fd = dirfd (dirp); + if (0 <= fd && _gl_register_fd (fd, dir_name) != fd) + { + int saved_errno = errno; + closedir (dirp); + errno = saved_errno; + return NULL; + } + } +#endif + + return dirp; +} diff --git a/gl/lib/parse-datetime.c b/gl/lib/parse-datetime.c new file mode 100644 index 0000000..b897e8e --- /dev/null +++ b/gl/lib/parse-datetime.c @@ -0,0 +1,3608 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.5" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Copy the first part of user declarations. */ + +/* Line 268 of yacc.c */ +#line 1 "parse-datetime.y" + +/* Parse a string into an internal time stamp. + + Copyright (C) 1999-2000, 2002-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Originally written by Steven M. Bellovin while + at the University of North Carolina at Chapel Hill. Later tweaked by + a couple of people on Usenet. Completely overhauled by Rich $alz + and Jim Berets in August, 1990. + + Modified by Paul Eggert in August 1999 to do + the right thing about local DST. Also modified by Paul Eggert + in February 2004 to support + nanosecond-resolution time stamps, and in October 2004 to support + TZ strings in dates. */ + +/* FIXME: Check for arithmetic overflow in all cases, not just + some of them. */ + +#include + +#include "parse-datetime.h" + +#include "intprops.h" +#include "timespec.h" +#include "verify.h" + +/* There's no need to extend the stack, so there's no need to involve + alloca. */ +#define YYSTACK_USE_ALLOCA 0 + +/* Tell Bison how much stack space is needed. 20 should be plenty for + this grammar, which is not right recursive. Beware setting it too + high, since that might cause problems on machines whose + implementations have lame stack-overflow checking. */ +#define YYMAXDEPTH 20 +#define YYINITDEPTH YYMAXDEPTH + +/* Since the code of parse-datetime.y is not included in the Emacs executable + itself, there is no need to #define static in this file. Even if + the code were included in the Emacs executable, it probably + wouldn't do any harm to #undef it here; this will only cause + problems if we try to write to a static variable, which I don't + think this code needs to do. */ +#ifdef emacs +# undef static +#endif + +#include +#include +#include +#include +#include + +#include "xalloc.h" + +/* Bison's skeleton tests _STDLIB_H, while some stdlib.h headers + use _STDLIB_H_ as witness. Map the latter to the one bison uses. */ +/* FIXME: this is temporary. Remove when we have a mechanism to ensure + that the version we're using is fixed, too. */ +#ifdef _STDLIB_H_ +# undef _STDLIB_H +# define _STDLIB_H 1 +#endif + +/* ISDIGIT differs from isdigit, as follows: + - Its arg may be any int or unsigned int; it need not be an unsigned char + or EOF. + - It's typically faster. + POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to + isdigit unless it's important to use the locale's definition + of "digit" even when the host does not conform to POSIX. */ +#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) + +/* Shift A right by B bits portably, by dividing A by 2**B and + truncating towards minus infinity. A and B should be free of side + effects, and B should be in the range 0 <= B <= INT_BITS - 2, where + INT_BITS is the number of useful bits in an int. GNU code can + assume that INT_BITS is at least 32. + + ISO C99 says that A >> B is implementation-defined if A < 0. Some + implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift + right in the usual way when A < 0, so SHR falls back on division if + ordinary A >> B doesn't seem to be the usual signed shift. */ +#define SHR(a, b) \ + (-1 >> 1 == -1 \ + ? (a) >> (b) \ + : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) + +#define EPOCH_YEAR 1970 +#define TM_YEAR_BASE 1900 + +#define HOUR(x) ((x) * 60) + +/* long_time_t is a signed integer type that contains all time_t values. */ +verify (TYPE_IS_INTEGER (time_t)); +#if TIME_T_FITS_IN_LONG_INT +typedef long int long_time_t; +#else +typedef time_t long_time_t; +#endif + +/* Convert a possibly-signed character to an unsigned character. This is + a bit safer than casting to unsigned char, since it catches some type + errors that the cast doesn't. */ +static unsigned char to_uchar (char ch) { return ch; } + +/* Lots of this code assumes time_t and time_t-like values fit into + long_time_t. */ +verify (TYPE_MINIMUM (long_time_t) <= TYPE_MINIMUM (time_t) + && TYPE_MAXIMUM (time_t) <= TYPE_MAXIMUM (long_time_t)); + +/* FIXME: It also assumes that signed integer overflow silently wraps around, + but this is not true any more with recent versions of GCC 4. */ + +/* An integer value, and the number of digits in its textual + representation. */ +typedef struct +{ + bool negative; + long int value; + size_t digits; +} textint; + +/* An entry in the lexical lookup table. */ +typedef struct +{ + char const *name; + int type; + int value; +} table; + +/* Meridian: am, pm, or 24-hour style. */ +enum { MERam, MERpm, MER24 }; + +enum { BILLION = 1000000000, LOG10_BILLION = 9 }; + +/* Relative times. */ +typedef struct +{ + /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ + long int year; + long int month; + long int day; + long int hour; + long int minutes; + long_time_t seconds; + long int ns; +} relative_time; + +#if HAVE_COMPOUND_LITERALS +# define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 }) +#else +static relative_time const RELATIVE_TIME_0; +#endif + +/* Information passed to and from the parser. */ +typedef struct +{ + /* The input string remaining to be parsed. */ + const char *input; + + /* N, if this is the Nth Tuesday. */ + long int day_ordinal; + + /* Day of week; Sunday is 0. */ + int day_number; + + /* tm_isdst flag for the local zone. */ + int local_isdst; + + /* Time zone, in minutes east of UTC. */ + long int time_zone; + + /* Style used for time. */ + int meridian; + + /* Gregorian year, month, day, hour, minutes, seconds, and nanoseconds. */ + textint year; + long int month; + long int day; + long int hour; + long int minutes; + struct timespec seconds; /* includes nanoseconds */ + + /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ + relative_time rel; + + /* Presence or counts of nonterminals of various flavors parsed so far. */ + bool timespec_seen; + bool rels_seen; + size_t dates_seen; + size_t days_seen; + size_t local_zones_seen; + size_t dsts_seen; + size_t times_seen; + size_t zones_seen; + + /* Table of local time zone abbreviations, terminated by a null entry. */ + table local_time_zone_table[3]; +} parser_control; + +union YYSTYPE; +static int yylex (union YYSTYPE *, parser_control *); +static int yyerror (parser_control const *, char const *); +static long int time_zone_hhmm (parser_control *, textint, long int); + +/* Extract into *PC any date and time info from a string of digits + of the form e.g., YYYYMMDD, YYMMDD, HHMM, HH (and sometimes YYY, + YYYY, ...). */ +static void +digits_to_date_time (parser_control *pc, textint text_int) +{ + if (pc->dates_seen && ! pc->year.digits + && ! pc->rels_seen && (pc->times_seen || 2 < text_int.digits)) + pc->year = text_int; + else + { + if (4 < text_int.digits) + { + pc->dates_seen++; + pc->day = text_int.value % 100; + pc->month = (text_int.value / 100) % 100; + pc->year.value = text_int.value / 10000; + pc->year.digits = text_int.digits - 4; + } + else + { + pc->times_seen++; + if (text_int.digits <= 2) + { + pc->hour = text_int.value; + pc->minutes = 0; + } + else + { + pc->hour = text_int.value / 100; + pc->minutes = text_int.value % 100; + } + pc->seconds.tv_sec = 0; + pc->seconds.tv_nsec = 0; + pc->meridian = MER24; + } + } +} + +/* Increment PC->rel by FACTOR * REL (FACTOR is 1 or -1). */ +static void +apply_relative_time (parser_control *pc, relative_time rel, int factor) +{ + pc->rel.ns += factor * rel.ns; + pc->rel.seconds += factor * rel.seconds; + pc->rel.minutes += factor * rel.minutes; + pc->rel.hour += factor * rel.hour; + pc->rel.day += factor * rel.day; + pc->rel.month += factor * rel.month; + pc->rel.year += factor * rel.year; + pc->rels_seen = true; +} + +/* Set PC-> hour, minutes, seconds and nanoseconds members from arguments. */ +static void +set_hhmmss (parser_control *pc, long int hour, long int minutes, + time_t sec, long int nsec) +{ + pc->hour = hour; + pc->minutes = minutes; + pc->seconds.tv_sec = sec; + pc->seconds.tv_nsec = nsec; +} + + + +/* Line 268 of yacc.c */ +#line 358 "parse-datetime.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + tAGO = 258, + tDST = 259, + tYEAR_UNIT = 260, + tMONTH_UNIT = 261, + tHOUR_UNIT = 262, + tMINUTE_UNIT = 263, + tSEC_UNIT = 264, + tDAY_UNIT = 265, + tDAY_SHIFT = 266, + tDAY = 267, + tDAYZONE = 268, + tLOCAL_ZONE = 269, + tMERIDIAN = 270, + tMONTH = 271, + tORDINAL = 272, + tZONE = 273, + tSNUMBER = 274, + tUNUMBER = 275, + tSDECIMAL_NUMBER = 276, + tUDECIMAL_NUMBER = 277 + }; +#endif +/* Tokens. */ +#define tAGO 258 +#define tDST 259 +#define tYEAR_UNIT 260 +#define tMONTH_UNIT 261 +#define tHOUR_UNIT 262 +#define tMINUTE_UNIT 263 +#define tSEC_UNIT 264 +#define tDAY_UNIT 265 +#define tDAY_SHIFT 266 +#define tDAY 267 +#define tDAYZONE 268 +#define tLOCAL_ZONE 269 +#define tMERIDIAN 270 +#define tMONTH 271 +#define tORDINAL 272 +#define tZONE 273 +#define tSNUMBER 274 +#define tUNUMBER 275 +#define tSDECIMAL_NUMBER 276 +#define tUDECIMAL_NUMBER 277 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 293 of yacc.c */ +#line 297 "parse-datetime.y" + + long int intval; + textint textintval; + struct timespec timespec; + relative_time rel; + + + +/* Line 293 of yacc.c */ +#line 447 "parse-datetime.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +/* Copy the second part of user declarations. */ + + +/* Line 343 of yacc.c */ +#line 459 "parse-datetime.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 12 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 112 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 28 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 26 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 91 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 114 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 277 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 26, 2, 2, 27, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 25, 2, + 2, 2, 2, 2, 23, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 24, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 5, 7, 10, 11, 14, 16, 18, + 20, 22, 24, 26, 28, 30, 32, 34, 38, 41, + 46, 53, 55, 58, 63, 70, 71, 73, 76, 78, + 81, 83, 85, 88, 91, 95, 97, 100, 102, 105, + 108, 111, 115, 121, 125, 129, 132, 137, 140, 144, + 146, 150, 153, 155, 157, 160, 163, 165, 168, 171, + 173, 176, 179, 181, 184, 187, 189, 192, 195, 197, + 200, 203, 206, 209, 211, 213, 216, 219, 222, 225, + 228, 231, 233, 235, 237, 239, 241, 243, 245, 247, + 250, 251 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 29, 0, -1, 30, -1, 31, -1, 23, 48, -1, + -1, 31, 32, -1, 33, -1, 35, -1, 39, -1, + 40, -1, 42, -1, 41, -1, 44, -1, 51, -1, + 52, -1, 34, -1, 43, 24, 36, -1, 20, 15, + -1, 20, 25, 20, 15, -1, 20, 25, 20, 25, + 50, 15, -1, 36, -1, 20, 38, -1, 20, 25, + 20, 37, -1, 20, 25, 20, 25, 50, 37, -1, + -1, 38, -1, 19, 53, -1, 14, -1, 14, 4, + -1, 18, -1, 24, -1, 18, 46, -1, 24, 46, + -1, 18, 19, 53, -1, 13, -1, 18, 4, -1, + 12, -1, 12, 26, -1, 17, 12, -1, 20, 12, + -1, 20, 27, 20, -1, 20, 27, 20, 27, 20, + -1, 20, 16, 19, -1, 16, 19, 19, -1, 16, + 20, -1, 16, 20, 26, 20, -1, 20, 16, -1, + 20, 16, 20, -1, 43, -1, 20, 19, 19, -1, + 45, 3, -1, 45, -1, 47, -1, 17, 5, -1, + 20, 5, -1, 5, -1, 17, 6, -1, 20, 6, + -1, 6, -1, 17, 10, -1, 20, 10, -1, 10, + -1, 17, 7, -1, 20, 7, -1, 7, -1, 17, + 8, -1, 20, 8, -1, 8, -1, 17, 9, -1, + 20, 9, -1, 21, 9, -1, 22, 9, -1, 9, + -1, 46, -1, 19, 5, -1, 19, 6, -1, 19, + 10, -1, 19, 7, -1, 19, 8, -1, 19, 9, + -1, 11, -1, 49, -1, 50, -1, 21, -1, 19, + -1, 22, -1, 20, -1, 20, -1, 20, 46, -1, + -1, 25, 20, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 324, 324, 325, 329, 336, 338, 342, 344, 346, + 348, 350, 352, 354, 355, 356, 360, 364, 368, 373, + 378, 383, 387, 392, 397, 404, 406, 410, 418, 423, + 433, 435, 437, 440, 443, 445, 447, 452, 457, 462, + 467, 475, 480, 500, 508, 516, 521, 527, 532, 538, + 542, 552, 554, 556, 561, 563, 565, 567, 569, 571, + 573, 575, 577, 579, 581, 583, 585, 587, 589, 591, + 593, 595, 597, 599, 601, 605, 607, 609, 611, 613, + 615, 620, 624, 624, 627, 628, 633, 634, 639, 644, + 655, 656 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "tAGO", "tDST", "tYEAR_UNIT", + "tMONTH_UNIT", "tHOUR_UNIT", "tMINUTE_UNIT", "tSEC_UNIT", "tDAY_UNIT", + "tDAY_SHIFT", "tDAY", "tDAYZONE", "tLOCAL_ZONE", "tMERIDIAN", "tMONTH", + "tORDINAL", "tZONE", "tSNUMBER", "tUNUMBER", "tSDECIMAL_NUMBER", + "tUDECIMAL_NUMBER", "'@'", "'T'", "':'", "','", "'/'", "$accept", "spec", + "timespec", "items", "item", "datetime", "iso_8601_datetime", "time", + "iso_8601_time", "o_zone_offset", "zone_offset", "local_zone", "zone", + "day", "date", "iso_8601_date", "rel", "relunit", "relunit_snumber", + "dayshift", "seconds", "signed_seconds", "unsigned_seconds", "number", + "hybrid", "o_colon_minutes", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 64, 84, 58, 44, 47 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 28, 29, 29, 30, 31, 31, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 33, 34, 35, 35, + 35, 35, 36, 36, 36, 37, 37, 38, 39, 39, + 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, + 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 43, 44, 44, 44, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, + 46, 47, 48, 48, 49, 49, 50, 50, 51, 52, + 53, 53 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 2, 0, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 2, 4, + 6, 1, 2, 4, 6, 0, 1, 2, 1, 2, + 1, 1, 2, 2, 3, 1, 2, 1, 2, 2, + 2, 3, 5, 3, 3, 2, 4, 2, 3, 1, + 3, 2, 1, 1, 2, 2, 1, 2, 2, 1, + 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, + 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 0, 2 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 5, 0, 0, 2, 3, 85, 87, 84, 86, 4, + 82, 83, 1, 56, 59, 65, 68, 73, 62, 81, + 37, 35, 28, 0, 0, 30, 0, 88, 0, 0, + 31, 6, 7, 16, 8, 21, 9, 10, 12, 11, + 49, 13, 52, 74, 53, 14, 15, 38, 29, 0, + 45, 54, 57, 63, 66, 69, 60, 39, 36, 90, + 32, 75, 76, 78, 79, 80, 77, 55, 58, 64, + 67, 70, 61, 40, 18, 47, 90, 0, 0, 22, + 89, 71, 72, 33, 0, 51, 44, 0, 0, 34, + 43, 48, 50, 27, 25, 41, 0, 17, 46, 91, + 19, 90, 0, 23, 26, 0, 0, 25, 42, 25, + 20, 24, 0, 25 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 2, 3, 4, 31, 32, 33, 34, 35, 103, + 104, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 9, 10, 11, 45, 46, 93 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -93 +static const yytype_int8 yypact[] = +{ + 38, 27, 77, -93, 46, -93, -93, -93, -93, -93, + -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, + 62, -93, 82, -3, 66, 3, 74, -4, 83, 84, + 75, -93, -93, -93, -93, -93, -93, -93, -93, -93, + 71, -93, 93, -93, -93, -93, -93, -93, -93, 78, + 72, -93, -93, -93, -93, -93, -93, -93, -93, 25, + -93, -93, -93, -93, -93, -93, -93, -93, -93, -93, + -93, -93, -93, -93, -93, 21, 19, 79, 80, -93, + -93, -93, -93, -93, 81, -93, -93, 85, 86, -93, + -93, -93, -93, -93, -6, 76, 17, -93, -93, -93, + -93, 87, 69, -93, -93, 88, 89, -1, -93, 18, + -93, -93, 69, 91 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -93, -93, -93, -93, -93, -93, -93, -93, 20, -68, + -27, -93, -93, -93, -93, -93, -93, -93, 60, -93, + -93, -93, -92, -93, -93, 43 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const yytype_uint8 yytable[] = +{ + 79, 67, 68, 69, 70, 71, 72, 58, 73, 100, + 107, 74, 75, 101, 110, 76, 49, 50, 101, 102, + 113, 77, 59, 78, 61, 62, 63, 64, 65, 66, + 61, 62, 63, 64, 65, 66, 101, 101, 92, 111, + 90, 91, 106, 112, 88, 111, 5, 6, 7, 8, + 88, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 1, 23, 24, 25, 26, 27, 28, 29, 79, + 30, 51, 52, 53, 54, 55, 56, 12, 57, 61, + 62, 63, 64, 65, 66, 60, 48, 80, 47, 6, + 83, 8, 81, 82, 26, 84, 85, 86, 87, 94, + 95, 96, 89, 105, 97, 98, 99, 0, 108, 109, + 101, 0, 88 +}; + +#define yypact_value_is_default(yystate) \ + ((yystate) == (-93)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + +static const yytype_int8 yycheck[] = +{ + 27, 5, 6, 7, 8, 9, 10, 4, 12, 15, + 102, 15, 16, 19, 15, 19, 19, 20, 19, 25, + 112, 25, 19, 27, 5, 6, 7, 8, 9, 10, + 5, 6, 7, 8, 9, 10, 19, 19, 19, 107, + 19, 20, 25, 25, 25, 113, 19, 20, 21, 22, + 25, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 23, 16, 17, 18, 19, 20, 21, 22, 96, + 24, 5, 6, 7, 8, 9, 10, 0, 12, 5, + 6, 7, 8, 9, 10, 25, 4, 27, 26, 20, + 30, 22, 9, 9, 19, 24, 3, 19, 26, 20, + 20, 20, 59, 27, 84, 20, 20, -1, 20, 20, + 19, -1, 25 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 23, 29, 30, 31, 19, 20, 21, 22, 48, + 49, 50, 0, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, + 24, 32, 33, 34, 35, 36, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 51, 52, 26, 4, 19, + 20, 5, 6, 7, 8, 9, 10, 12, 4, 19, + 46, 5, 6, 7, 8, 9, 10, 5, 6, 7, + 8, 9, 10, 12, 15, 16, 19, 25, 27, 38, + 46, 9, 9, 46, 24, 3, 19, 26, 25, 53, + 19, 20, 19, 53, 20, 20, 20, 36, 20, 20, + 15, 19, 25, 37, 38, 27, 25, 50, 20, 20, + 15, 37, 25, 50 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (pc, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* This macro is provided for backward compatibility. */ + +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval, pc) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, pc); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + parser_control *pc; +#endif +{ + if (!yyvaluep) + return; + YYUSE (pc); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, pc) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + parser_control *pc; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_control *pc) +#else +static void +yy_reduce_print (yyvsp, yyrule, pc) + YYSTYPE *yyvsp; + int yyrule; + parser_control *pc; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , pc); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule, pc); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_control *pc) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, pc) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + parser_control *pc; +#endif +{ + YYUSE (yyvaluep); + YYUSE (pc); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (parser_control *pc); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (parser_control *pc) +#else +int +yyparse (pc) + parser_control *pc; +#endif +#endif +{ +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + + /* Number of syntax errors so far. */ + int yynerrs; + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 4: + +/* Line 1806 of yacc.c */ +#line 330 "parse-datetime.y" + { + pc->seconds = (yyvsp[(2) - (2)].timespec); + pc->timespec_seen = true; + } + break; + + case 7: + +/* Line 1806 of yacc.c */ +#line 343 "parse-datetime.y" + { pc->times_seen++; pc->dates_seen++; } + break; + + case 8: + +/* Line 1806 of yacc.c */ +#line 345 "parse-datetime.y" + { pc->times_seen++; } + break; + + case 9: + +/* Line 1806 of yacc.c */ +#line 347 "parse-datetime.y" + { pc->local_zones_seen++; } + break; + + case 10: + +/* Line 1806 of yacc.c */ +#line 349 "parse-datetime.y" + { pc->zones_seen++; } + break; + + case 11: + +/* Line 1806 of yacc.c */ +#line 351 "parse-datetime.y" + { pc->dates_seen++; } + break; + + case 12: + +/* Line 1806 of yacc.c */ +#line 353 "parse-datetime.y" + { pc->days_seen++; } + break; + + case 18: + +/* Line 1806 of yacc.c */ +#line 369 "parse-datetime.y" + { + set_hhmmss (pc, (yyvsp[(1) - (2)].textintval).value, 0, 0, 0); + pc->meridian = (yyvsp[(2) - (2)].intval); + } + break; + + case 19: + +/* Line 1806 of yacc.c */ +#line 374 "parse-datetime.y" + { + set_hhmmss (pc, (yyvsp[(1) - (4)].textintval).value, (yyvsp[(3) - (4)].textintval).value, 0, 0); + pc->meridian = (yyvsp[(4) - (4)].intval); + } + break; + + case 20: + +/* Line 1806 of yacc.c */ +#line 379 "parse-datetime.y" + { + set_hhmmss (pc, (yyvsp[(1) - (6)].textintval).value, (yyvsp[(3) - (6)].textintval).value, (yyvsp[(5) - (6)].timespec).tv_sec, (yyvsp[(5) - (6)].timespec).tv_nsec); + pc->meridian = (yyvsp[(6) - (6)].intval); + } + break; + + case 22: + +/* Line 1806 of yacc.c */ +#line 388 "parse-datetime.y" + { + set_hhmmss (pc, (yyvsp[(1) - (2)].textintval).value, 0, 0, 0); + pc->meridian = MER24; + } + break; + + case 23: + +/* Line 1806 of yacc.c */ +#line 393 "parse-datetime.y" + { + set_hhmmss (pc, (yyvsp[(1) - (4)].textintval).value, (yyvsp[(3) - (4)].textintval).value, 0, 0); + pc->meridian = MER24; + } + break; + + case 24: + +/* Line 1806 of yacc.c */ +#line 398 "parse-datetime.y" + { + set_hhmmss (pc, (yyvsp[(1) - (6)].textintval).value, (yyvsp[(3) - (6)].textintval).value, (yyvsp[(5) - (6)].timespec).tv_sec, (yyvsp[(5) - (6)].timespec).tv_nsec); + pc->meridian = MER24; + } + break; + + case 27: + +/* Line 1806 of yacc.c */ +#line 411 "parse-datetime.y" + { + pc->zones_seen++; + pc->time_zone = time_zone_hhmm (pc, (yyvsp[(1) - (2)].textintval), (yyvsp[(2) - (2)].intval)); + } + break; + + case 28: + +/* Line 1806 of yacc.c */ +#line 419 "parse-datetime.y" + { + pc->local_isdst = (yyvsp[(1) - (1)].intval); + pc->dsts_seen += (0 < (yyvsp[(1) - (1)].intval)); + } + break; + + case 29: + +/* Line 1806 of yacc.c */ +#line 424 "parse-datetime.y" + { + pc->local_isdst = 1; + pc->dsts_seen += (0 < (yyvsp[(1) - (2)].intval)) + 1; + } + break; + + case 30: + +/* Line 1806 of yacc.c */ +#line 434 "parse-datetime.y" + { pc->time_zone = (yyvsp[(1) - (1)].intval); } + break; + + case 31: + +/* Line 1806 of yacc.c */ +#line 436 "parse-datetime.y" + { pc->time_zone = HOUR(7); } + break; + + case 32: + +/* Line 1806 of yacc.c */ +#line 438 "parse-datetime.y" + { pc->time_zone = (yyvsp[(1) - (2)].intval); + apply_relative_time (pc, (yyvsp[(2) - (2)].rel), 1); } + break; + + case 33: + +/* Line 1806 of yacc.c */ +#line 441 "parse-datetime.y" + { pc->time_zone = HOUR(7); + apply_relative_time (pc, (yyvsp[(2) - (2)].rel), 1); } + break; + + case 34: + +/* Line 1806 of yacc.c */ +#line 444 "parse-datetime.y" + { pc->time_zone = (yyvsp[(1) - (3)].intval) + time_zone_hhmm (pc, (yyvsp[(2) - (3)].textintval), (yyvsp[(3) - (3)].intval)); } + break; + + case 35: + +/* Line 1806 of yacc.c */ +#line 446 "parse-datetime.y" + { pc->time_zone = (yyvsp[(1) - (1)].intval) + 60; } + break; + + case 36: + +/* Line 1806 of yacc.c */ +#line 448 "parse-datetime.y" + { pc->time_zone = (yyvsp[(1) - (2)].intval) + 60; } + break; + + case 37: + +/* Line 1806 of yacc.c */ +#line 453 "parse-datetime.y" + { + pc->day_ordinal = 0; + pc->day_number = (yyvsp[(1) - (1)].intval); + } + break; + + case 38: + +/* Line 1806 of yacc.c */ +#line 458 "parse-datetime.y" + { + pc->day_ordinal = 0; + pc->day_number = (yyvsp[(1) - (2)].intval); + } + break; + + case 39: + +/* Line 1806 of yacc.c */ +#line 463 "parse-datetime.y" + { + pc->day_ordinal = (yyvsp[(1) - (2)].intval); + pc->day_number = (yyvsp[(2) - (2)].intval); + } + break; + + case 40: + +/* Line 1806 of yacc.c */ +#line 468 "parse-datetime.y" + { + pc->day_ordinal = (yyvsp[(1) - (2)].textintval).value; + pc->day_number = (yyvsp[(2) - (2)].intval); + } + break; + + case 41: + +/* Line 1806 of yacc.c */ +#line 476 "parse-datetime.y" + { + pc->month = (yyvsp[(1) - (3)].textintval).value; + pc->day = (yyvsp[(3) - (3)].textintval).value; + } + break; + + case 42: + +/* Line 1806 of yacc.c */ +#line 481 "parse-datetime.y" + { + /* Interpret as YYYY/MM/DD if the first value has 4 or more digits, + otherwise as MM/DD/YY. + The goal in recognizing YYYY/MM/DD is solely to support legacy + machine-generated dates like those in an RCS log listing. If + you want portability, use the ISO 8601 format. */ + if (4 <= (yyvsp[(1) - (5)].textintval).digits) + { + pc->year = (yyvsp[(1) - (5)].textintval); + pc->month = (yyvsp[(3) - (5)].textintval).value; + pc->day = (yyvsp[(5) - (5)].textintval).value; + } + else + { + pc->month = (yyvsp[(1) - (5)].textintval).value; + pc->day = (yyvsp[(3) - (5)].textintval).value; + pc->year = (yyvsp[(5) - (5)].textintval); + } + } + break; + + case 43: + +/* Line 1806 of yacc.c */ +#line 501 "parse-datetime.y" + { + /* e.g. 17-JUN-1992. */ + pc->day = (yyvsp[(1) - (3)].textintval).value; + pc->month = (yyvsp[(2) - (3)].intval); + pc->year.value = -(yyvsp[(3) - (3)].textintval).value; + pc->year.digits = (yyvsp[(3) - (3)].textintval).digits; + } + break; + + case 44: + +/* Line 1806 of yacc.c */ +#line 509 "parse-datetime.y" + { + /* e.g. JUN-17-1992. */ + pc->month = (yyvsp[(1) - (3)].intval); + pc->day = -(yyvsp[(2) - (3)].textintval).value; + pc->year.value = -(yyvsp[(3) - (3)].textintval).value; + pc->year.digits = (yyvsp[(3) - (3)].textintval).digits; + } + break; + + case 45: + +/* Line 1806 of yacc.c */ +#line 517 "parse-datetime.y" + { + pc->month = (yyvsp[(1) - (2)].intval); + pc->day = (yyvsp[(2) - (2)].textintval).value; + } + break; + + case 46: + +/* Line 1806 of yacc.c */ +#line 522 "parse-datetime.y" + { + pc->month = (yyvsp[(1) - (4)].intval); + pc->day = (yyvsp[(2) - (4)].textintval).value; + pc->year = (yyvsp[(4) - (4)].textintval); + } + break; + + case 47: + +/* Line 1806 of yacc.c */ +#line 528 "parse-datetime.y" + { + pc->day = (yyvsp[(1) - (2)].textintval).value; + pc->month = (yyvsp[(2) - (2)].intval); + } + break; + + case 48: + +/* Line 1806 of yacc.c */ +#line 533 "parse-datetime.y" + { + pc->day = (yyvsp[(1) - (3)].textintval).value; + pc->month = (yyvsp[(2) - (3)].intval); + pc->year = (yyvsp[(3) - (3)].textintval); + } + break; + + case 50: + +/* Line 1806 of yacc.c */ +#line 543 "parse-datetime.y" + { + /* ISO 8601 format. YYYY-MM-DD. */ + pc->year = (yyvsp[(1) - (3)].textintval); + pc->month = -(yyvsp[(2) - (3)].textintval).value; + pc->day = -(yyvsp[(3) - (3)].textintval).value; + } + break; + + case 51: + +/* Line 1806 of yacc.c */ +#line 553 "parse-datetime.y" + { apply_relative_time (pc, (yyvsp[(1) - (2)].rel), (yyvsp[(2) - (2)].intval)); } + break; + + case 52: + +/* Line 1806 of yacc.c */ +#line 555 "parse-datetime.y" + { apply_relative_time (pc, (yyvsp[(1) - (1)].rel), 1); } + break; + + case 53: + +/* Line 1806 of yacc.c */ +#line 557 "parse-datetime.y" + { apply_relative_time (pc, (yyvsp[(1) - (1)].rel), 1); } + break; + + case 54: + +/* Line 1806 of yacc.c */ +#line 562 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].intval); } + break; + + case 55: + +/* Line 1806 of yacc.c */ +#line 564 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 56: + +/* Line 1806 of yacc.c */ +#line 566 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = 1; } + break; + + case 57: + +/* Line 1806 of yacc.c */ +#line 568 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].intval); } + break; + + case 58: + +/* Line 1806 of yacc.c */ +#line 570 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 59: + +/* Line 1806 of yacc.c */ +#line 572 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = 1; } + break; + + case 60: + +/* Line 1806 of yacc.c */ +#line 574 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); } + break; + + case 61: + +/* Line 1806 of yacc.c */ +#line 576 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); } + break; + + case 62: + +/* Line 1806 of yacc.c */ +#line 578 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (1)].intval); } + break; + + case 63: + +/* Line 1806 of yacc.c */ +#line 580 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].intval); } + break; + + case 64: + +/* Line 1806 of yacc.c */ +#line 582 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 65: + +/* Line 1806 of yacc.c */ +#line 584 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = 1; } + break; + + case 66: + +/* Line 1806 of yacc.c */ +#line 586 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].intval); } + break; + + case 67: + +/* Line 1806 of yacc.c */ +#line 588 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 68: + +/* Line 1806 of yacc.c */ +#line 590 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = 1; } + break; + + case 69: + +/* Line 1806 of yacc.c */ +#line 592 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].intval); } + break; + + case 70: + +/* Line 1806 of yacc.c */ +#line 594 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 71: + +/* Line 1806 of yacc.c */ +#line 596 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; } + break; + + case 72: + +/* Line 1806 of yacc.c */ +#line 598 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; } + break; + + case 73: + +/* Line 1806 of yacc.c */ +#line 600 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = 1; } + break; + + case 75: + +/* Line 1806 of yacc.c */ +#line 606 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 76: + +/* Line 1806 of yacc.c */ +#line 608 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 77: + +/* Line 1806 of yacc.c */ +#line 610 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); } + break; + + case 78: + +/* Line 1806 of yacc.c */ +#line 612 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 79: + +/* Line 1806 of yacc.c */ +#line 614 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 80: + +/* Line 1806 of yacc.c */ +#line 616 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; } + break; + + case 81: + +/* Line 1806 of yacc.c */ +#line 621 "parse-datetime.y" + { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (1)].intval); } + break; + + case 85: + +/* Line 1806 of yacc.c */ +#line 629 "parse-datetime.y" + { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; } + break; + + case 87: + +/* Line 1806 of yacc.c */ +#line 635 "parse-datetime.y" + { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; } + break; + + case 88: + +/* Line 1806 of yacc.c */ +#line 640 "parse-datetime.y" + { digits_to_date_time (pc, (yyvsp[(1) - (1)].textintval)); } + break; + + case 89: + +/* Line 1806 of yacc.c */ +#line 645 "parse-datetime.y" + { + /* Hybrid all-digit and relative offset, so that we accept e.g., + "YYYYMMDD +N days" as well as "YYYYMMDD N days". */ + digits_to_date_time (pc, (yyvsp[(1) - (2)].textintval)); + apply_relative_time (pc, (yyvsp[(2) - (2)].rel), 1); + } + break; + + case 90: + +/* Line 1806 of yacc.c */ +#line 655 "parse-datetime.y" + { (yyval.intval) = -1; } + break; + + case 91: + +/* Line 1806 of yacc.c */ +#line 657 "parse-datetime.y" + { (yyval.intval) = (yyvsp[(2) - (2)].textintval).value; } + break; + + + +/* Line 1806 of yacc.c */ +#line 2410 "parse-datetime.c" + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (pc, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (pc, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, pc); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, pc); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (pc, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, pc); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, pc); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + + +/* Line 2067 of yacc.c */ +#line 660 "parse-datetime.y" + + +static table const meridian_table[] = +{ + { "AM", tMERIDIAN, MERam }, + { "A.M.", tMERIDIAN, MERam }, + { "PM", tMERIDIAN, MERpm }, + { "P.M.", tMERIDIAN, MERpm }, + { NULL, 0, 0 } +}; + +static table const dst_table[] = +{ + { "DST", tDST, 0 } +}; + +static table const month_and_day_table[] = +{ + { "JANUARY", tMONTH, 1 }, + { "FEBRUARY", tMONTH, 2 }, + { "MARCH", tMONTH, 3 }, + { "APRIL", tMONTH, 4 }, + { "MAY", tMONTH, 5 }, + { "JUNE", tMONTH, 6 }, + { "JULY", tMONTH, 7 }, + { "AUGUST", tMONTH, 8 }, + { "SEPTEMBER",tMONTH, 9 }, + { "SEPT", tMONTH, 9 }, + { "OCTOBER", tMONTH, 10 }, + { "NOVEMBER", tMONTH, 11 }, + { "DECEMBER", tMONTH, 12 }, + { "SUNDAY", tDAY, 0 }, + { "MONDAY", tDAY, 1 }, + { "TUESDAY", tDAY, 2 }, + { "TUES", tDAY, 2 }, + { "WEDNESDAY",tDAY, 3 }, + { "WEDNES", tDAY, 3 }, + { "THURSDAY", tDAY, 4 }, + { "THUR", tDAY, 4 }, + { "THURS", tDAY, 4 }, + { "FRIDAY", tDAY, 5 }, + { "SATURDAY", tDAY, 6 }, + { NULL, 0, 0 } +}; + +static table const time_units_table[] = +{ + { "YEAR", tYEAR_UNIT, 1 }, + { "MONTH", tMONTH_UNIT, 1 }, + { "FORTNIGHT",tDAY_UNIT, 14 }, + { "WEEK", tDAY_UNIT, 7 }, + { "DAY", tDAY_UNIT, 1 }, + { "HOUR", tHOUR_UNIT, 1 }, + { "MINUTE", tMINUTE_UNIT, 1 }, + { "MIN", tMINUTE_UNIT, 1 }, + { "SECOND", tSEC_UNIT, 1 }, + { "SEC", tSEC_UNIT, 1 }, + { NULL, 0, 0 } +}; + +/* Assorted relative-time words. */ +static table const relative_time_table[] = +{ + { "TOMORROW", tDAY_SHIFT, 1 }, + { "YESTERDAY",tDAY_SHIFT, -1 }, + { "TODAY", tDAY_SHIFT, 0 }, + { "NOW", tDAY_SHIFT, 0 }, + { "LAST", tORDINAL, -1 }, + { "THIS", tORDINAL, 0 }, + { "NEXT", tORDINAL, 1 }, + { "FIRST", tORDINAL, 1 }, +/*{ "SECOND", tORDINAL, 2 }, */ + { "THIRD", tORDINAL, 3 }, + { "FOURTH", tORDINAL, 4 }, + { "FIFTH", tORDINAL, 5 }, + { "SIXTH", tORDINAL, 6 }, + { "SEVENTH", tORDINAL, 7 }, + { "EIGHTH", tORDINAL, 8 }, + { "NINTH", tORDINAL, 9 }, + { "TENTH", tORDINAL, 10 }, + { "ELEVENTH", tORDINAL, 11 }, + { "TWELFTH", tORDINAL, 12 }, + { "AGO", tAGO, -1 }, + { "HENCE", tAGO, 1 }, + { NULL, 0, 0 } +}; + +/* The universal time zone table. These labels can be used even for + time stamps that would not otherwise be valid, e.g., GMT time + stamps in London during summer. */ +static table const universal_time_zone_table[] = +{ + { "GMT", tZONE, HOUR ( 0) }, /* Greenwich Mean */ + { "UT", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ + { "UTC", tZONE, HOUR ( 0) }, + { NULL, 0, 0 } +}; + +/* The time zone table. This table is necessarily incomplete, as time + zone abbreviations are ambiguous; e.g. Australians interpret "EST" + as Eastern time in Australia, not as US Eastern Standard Time. + You cannot rely on parse_datetime to handle arbitrary time zone + abbreviations; use numeric abbreviations like "-0500" instead. */ +static table const time_zone_table[] = +{ + { "WET", tZONE, HOUR ( 0) }, /* Western European */ + { "WEST", tDAYZONE, HOUR ( 0) }, /* Western European Summer */ + { "BST", tDAYZONE, HOUR ( 0) }, /* British Summer */ + { "ART", tZONE, -HOUR ( 3) }, /* Argentina */ + { "BRT", tZONE, -HOUR ( 3) }, /* Brazil */ + { "BRST", tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */ + { "NST", tZONE, -(HOUR ( 3) + 30) }, /* Newfoundland Standard */ + { "NDT", tDAYZONE,-(HOUR ( 3) + 30) }, /* Newfoundland Daylight */ + { "AST", tZONE, -HOUR ( 4) }, /* Atlantic Standard */ + { "ADT", tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */ + { "CLT", tZONE, -HOUR ( 4) }, /* Chile */ + { "CLST", tDAYZONE, -HOUR ( 4) }, /* Chile Summer */ + { "EST", tZONE, -HOUR ( 5) }, /* Eastern Standard */ + { "EDT", tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */ + { "CST", tZONE, -HOUR ( 6) }, /* Central Standard */ + { "CDT", tDAYZONE, -HOUR ( 6) }, /* Central Daylight */ + { "MST", tZONE, -HOUR ( 7) }, /* Mountain Standard */ + { "MDT", tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */ + { "PST", tZONE, -HOUR ( 8) }, /* Pacific Standard */ + { "PDT", tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */ + { "AKST", tZONE, -HOUR ( 9) }, /* Alaska Standard */ + { "AKDT", tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */ + { "HST", tZONE, -HOUR (10) }, /* Hawaii Standard */ + { "HAST", tZONE, -HOUR (10) }, /* Hawaii-Aleutian Standard */ + { "HADT", tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */ + { "SST", tZONE, -HOUR (12) }, /* Samoa Standard */ + { "WAT", tZONE, HOUR ( 1) }, /* West Africa */ + { "CET", tZONE, HOUR ( 1) }, /* Central European */ + { "CEST", tDAYZONE, HOUR ( 1) }, /* Central European Summer */ + { "MET", tZONE, HOUR ( 1) }, /* Middle European */ + { "MEZ", tZONE, HOUR ( 1) }, /* Middle European */ + { "MEST", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ + { "MESZ", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ + { "EET", tZONE, HOUR ( 2) }, /* Eastern European */ + { "EEST", tDAYZONE, HOUR ( 2) }, /* Eastern European Summer */ + { "CAT", tZONE, HOUR ( 2) }, /* Central Africa */ + { "SAST", tZONE, HOUR ( 2) }, /* South Africa Standard */ + { "EAT", tZONE, HOUR ( 3) }, /* East Africa */ + { "MSK", tZONE, HOUR ( 3) }, /* Moscow */ + { "MSD", tDAYZONE, HOUR ( 3) }, /* Moscow Daylight */ + { "IST", tZONE, (HOUR ( 5) + 30) }, /* India Standard */ + { "SGT", tZONE, HOUR ( 8) }, /* Singapore */ + { "KST", tZONE, HOUR ( 9) }, /* Korea Standard */ + { "JST", tZONE, HOUR ( 9) }, /* Japan Standard */ + { "GST", tZONE, HOUR (10) }, /* Guam Standard */ + { "NZST", tZONE, HOUR (12) }, /* New Zealand Standard */ + { "NZDT", tDAYZONE, HOUR (12) }, /* New Zealand Daylight */ + { NULL, 0, 0 } +}; + +/* Military time zone table. + + Note 'T' is a special case, as it is used as the separator in ISO + 8601 date and time of day representation. */ +static table const military_table[] = +{ + { "A", tZONE, -HOUR ( 1) }, + { "B", tZONE, -HOUR ( 2) }, + { "C", tZONE, -HOUR ( 3) }, + { "D", tZONE, -HOUR ( 4) }, + { "E", tZONE, -HOUR ( 5) }, + { "F", tZONE, -HOUR ( 6) }, + { "G", tZONE, -HOUR ( 7) }, + { "H", tZONE, -HOUR ( 8) }, + { "I", tZONE, -HOUR ( 9) }, + { "K", tZONE, -HOUR (10) }, + { "L", tZONE, -HOUR (11) }, + { "M", tZONE, -HOUR (12) }, + { "N", tZONE, HOUR ( 1) }, + { "O", tZONE, HOUR ( 2) }, + { "P", tZONE, HOUR ( 3) }, + { "Q", tZONE, HOUR ( 4) }, + { "R", tZONE, HOUR ( 5) }, + { "S", tZONE, HOUR ( 6) }, + { "T", 'T', 0 }, + { "U", tZONE, HOUR ( 8) }, + { "V", tZONE, HOUR ( 9) }, + { "W", tZONE, HOUR (10) }, + { "X", tZONE, HOUR (11) }, + { "Y", tZONE, HOUR (12) }, + { "Z", tZONE, HOUR ( 0) }, + { NULL, 0, 0 } +}; + + + +/* Convert a time zone expressed as HH:MM into an integer count of + minutes. If MM is negative, then S is of the form HHMM and needs + to be picked apart; otherwise, S is of the form HH. As specified in + http://www.opengroup.org/susv3xbd/xbd_chap08.html#tag_08_03, allow + only valid TZ range, and consider first two digits as hours, if no + minutes specified. */ + +static long int +time_zone_hhmm (parser_control *pc, textint s, long int mm) +{ + long int n_minutes; + + /* If the length of S is 1 or 2 and no minutes are specified, + interpret it as a number of hours. */ + if (s.digits <= 2 && mm < 0) + s.value *= 100; + + if (mm < 0) + n_minutes = (s.value / 100) * 60 + s.value % 100; + else + n_minutes = s.value * 60 + (s.negative ? -mm : mm); + + /* If the absolute number of minutes is larger than 24 hours, + arrange to reject it by incrementing pc->zones_seen. Thus, + we allow only values in the range UTC-24:00 to UTC+24:00. */ + if (24 * 60 < abs (n_minutes)) + pc->zones_seen++; + + return n_minutes; +} + +static int +to_hour (long int hours, int meridian) +{ + switch (meridian) + { + default: /* Pacify GCC. */ + case MER24: + return 0 <= hours && hours < 24 ? hours : -1; + case MERam: + return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1; + case MERpm: + return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1; + } +} + +static long int +to_year (textint textyear) +{ + long int year = textyear.value; + + if (year < 0) + year = -year; + + /* XPG4 suggests that years 00-68 map to 2000-2068, and + years 69-99 map to 1969-1999. */ + else if (textyear.digits == 2) + year += year < 69 ? 2000 : 1900; + + return year; +} + +static table const * _GL_ATTRIBUTE_PURE +lookup_zone (parser_control const *pc, char const *name) +{ + table const *tp; + + for (tp = universal_time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + /* Try local zone abbreviations before those in time_zone_table, as + the local ones are more likely to be right. */ + for (tp = pc->local_time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + for (tp = time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + return NULL; +} + +#if ! HAVE_TM_GMTOFF +/* Yield the difference between *A and *B, + measured in seconds, ignoring leap seconds. + The body of this function is taken directly from the GNU C Library; + see src/strftime.c. */ +static long int +tm_diff (struct tm const *a, struct tm const *b) +{ + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid int overflow in leap day calculations. */ + int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); + int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = SHR (a100, 2); + int b400 = SHR (b100, 2); + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + long int ayear = a->tm_year; + long int years = ayear - b->tm_year; + long int days = (365 * years + intervening_leap_days + + (a->tm_yday - b->tm_yday)); + return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + + (a->tm_min - b->tm_min)) + + (a->tm_sec - b->tm_sec)); +} +#endif /* ! HAVE_TM_GMTOFF */ + +static table const * +lookup_word (parser_control const *pc, char *word) +{ + char *p; + char *q; + size_t wordlen; + table const *tp; + bool period_found; + bool abbrev; + + /* Make it uppercase. */ + for (p = word; *p; p++) + { + unsigned char ch = *p; + *p = c_toupper (ch); + } + + for (tp = meridian_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* See if we have an abbreviation for a month. */ + wordlen = strlen (word); + abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.'); + + for (tp = month_and_day_table; tp->name; tp++) + if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0) + return tp; + + if ((tp = lookup_zone (pc, word))) + return tp; + + if (strcmp (word, dst_table[0].name) == 0) + return dst_table; + + for (tp = time_units_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* Strip off any plural and try the units table again. */ + if (word[wordlen - 1] == 'S') + { + word[wordlen - 1] = '\0'; + for (tp = time_units_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + word[wordlen - 1] = 'S'; /* For "this" in relative_time_table. */ + } + + for (tp = relative_time_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* Military time zones. */ + if (wordlen == 1) + for (tp = military_table; tp->name; tp++) + if (word[0] == tp->name[0]) + return tp; + + /* Drop out any periods and try the time zone table again. */ + for (period_found = false, p = q = word; (*p = *q); q++) + if (*q == '.') + period_found = true; + else + p++; + if (period_found && (tp = lookup_zone (pc, word))) + return tp; + + return NULL; +} + +static int +yylex (YYSTYPE *lvalp, parser_control *pc) +{ + unsigned char c; + size_t count; + + for (;;) + { + while (c = *pc->input, c_isspace (c)) + pc->input++; + + if (ISDIGIT (c) || c == '-' || c == '+') + { + char const *p; + int sign; + unsigned long int value; + if (c == '-' || c == '+') + { + sign = c == '-' ? -1 : 1; + while (c = *++pc->input, c_isspace (c)) + continue; + if (! ISDIGIT (c)) + /* skip the '-' sign */ + continue; + } + else + sign = 0; + p = pc->input; + for (value = 0; ; value *= 10) + { + unsigned long int value1 = value + (c - '0'); + if (value1 < value) + return '?'; + value = value1; + c = *++p; + if (! ISDIGIT (c)) + break; + if (ULONG_MAX / 10 < value) + return '?'; + } + if ((c == '.' || c == ',') && ISDIGIT (p[1])) + { + time_t s; + int ns; + int digits; + unsigned long int value1; + + /* Check for overflow when converting value to time_t. */ + if (sign < 0) + { + s = - value; + if (0 < s) + return '?'; + value1 = -s; + } + else + { + s = value; + if (s < 0) + return '?'; + value1 = s; + } + if (value != value1) + return '?'; + + /* Accumulate fraction, to ns precision. */ + p++; + ns = *p++ - '0'; + for (digits = 2; digits <= LOG10_BILLION; digits++) + { + ns *= 10; + if (ISDIGIT (*p)) + ns += *p++ - '0'; + } + + /* Skip excess digits, truncating toward -Infinity. */ + if (sign < 0) + for (; ISDIGIT (*p); p++) + if (*p != '0') + { + ns++; + break; + } + while (ISDIGIT (*p)) + p++; + + /* Adjust to the timespec convention, which is that + tv_nsec is always a positive offset even if tv_sec is + negative. */ + if (sign < 0 && ns) + { + s--; + if (! (s < 0)) + return '?'; + ns = BILLION - ns; + } + + lvalp->timespec.tv_sec = s; + lvalp->timespec.tv_nsec = ns; + pc->input = p; + return sign ? tSDECIMAL_NUMBER : tUDECIMAL_NUMBER; + } + else + { + lvalp->textintval.negative = sign < 0; + if (sign < 0) + { + lvalp->textintval.value = - value; + if (0 < lvalp->textintval.value) + return '?'; + } + else + { + lvalp->textintval.value = value; + if (lvalp->textintval.value < 0) + return '?'; + } + lvalp->textintval.digits = p - pc->input; + pc->input = p; + return sign ? tSNUMBER : tUNUMBER; + } + } + + if (c_isalpha (c)) + { + char buff[20]; + char *p = buff; + table const *tp; + + do + { + if (p - buff < sizeof buff - 1) + *p++ = c; + c = *++pc->input; + } + while (c_isalpha (c) || c == '.'); + + *p = '\0'; + tp = lookup_word (pc, buff); + if (! tp) + return '?'; + lvalp->intval = tp->value; + return tp->type; + } + + if (c != '(') + return to_uchar (*pc->input++); + + count = 0; + do + { + c = *pc->input++; + if (c == '\0') + return c; + if (c == '(') + count++; + else if (c == ')') + count--; + } + while (count != 0); + } +} + +/* Do nothing if the parser reports an error. */ +static int +yyerror (parser_control const *pc _GL_UNUSED, + char const *s _GL_UNUSED) +{ + return 0; +} + +/* If *TM0 is the old and *TM1 is the new value of a struct tm after + passing it to mktime, return true if it's OK that mktime returned T. + It's not OK if *TM0 has out-of-range members. */ + +static bool +mktime_ok (struct tm const *tm0, struct tm const *tm1, time_t t) +{ + if (t == (time_t) -1) + { + /* Guard against falsely reporting an error when parsing a time + stamp that happens to equal (time_t) -1, on a host that + supports such a time stamp. */ + tm1 = localtime (&t); + if (!tm1) + return false; + } + + return ! ((tm0->tm_sec ^ tm1->tm_sec) + | (tm0->tm_min ^ tm1->tm_min) + | (tm0->tm_hour ^ tm1->tm_hour) + | (tm0->tm_mday ^ tm1->tm_mday) + | (tm0->tm_mon ^ tm1->tm_mon) + | (tm0->tm_year ^ tm1->tm_year)); +} + +/* A reasonable upper bound for the size of ordinary TZ strings. + Use heap allocation if TZ's length exceeds this. */ +enum { TZBUFSIZE = 100 }; + +/* Return a copy of TZ, stored in TZBUF if it fits, and heap-allocated + otherwise. */ +static char * +get_tz (char tzbuf[TZBUFSIZE]) +{ + char *tz = getenv ("TZ"); + if (tz) + { + size_t tzsize = strlen (tz) + 1; + tz = (tzsize <= TZBUFSIZE + ? memcpy (tzbuf, tz, tzsize) + : xmemdup (tz, tzsize)); + } + return tz; +} + +/* Parse a date/time string, storing the resulting time value into *RESULT. + The string itself is pointed to by P. Return true if successful. + P can be an incomplete or relative time specification; if so, use + *NOW as the basis for the returned time. */ +bool +parse_datetime (struct timespec *result, char const *p, + struct timespec const *now) +{ + time_t Start; + long int Start_ns; + struct tm const *tmp; + struct tm tm; + struct tm tm0; + parser_control pc; + struct timespec gettime_buffer; + unsigned char c; + bool tz_was_altered = false; + char *tz0 = NULL; + char tz0buf[TZBUFSIZE]; + bool ok = true; + + if (! now) + { + gettime (&gettime_buffer); + now = &gettime_buffer; + } + + Start = now->tv_sec; + Start_ns = now->tv_nsec; + + tmp = localtime (&now->tv_sec); + if (! tmp) + return false; + + while (c = *p, c_isspace (c)) + p++; + + if (strncmp (p, "TZ=\"", 4) == 0) + { + char const *tzbase = p + 4; + size_t tzsize = 1; + char const *s; + + for (s = tzbase; *s; s++, tzsize++) + if (*s == '\\') + { + s++; + if (! (*s == '\\' || *s == '"')) + break; + } + else if (*s == '"') + { + char *z; + char *tz1; + char tz1buf[TZBUFSIZE]; + bool large_tz = TZBUFSIZE < tzsize; + bool setenv_ok; + tz0 = get_tz (tz0buf); + z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf; + for (s = tzbase; *s != '"'; s++) + *z++ = *(s += *s == '\\'); + *z = '\0'; + setenv_ok = setenv ("TZ", tz1, 1) == 0; + if (large_tz) + free (tz1); + if (!setenv_ok) + goto fail; + tz_was_altered = true; + + p = s + 1; + while (c = *p, c_isspace (c)) + p++; + + break; + } + } + + /* As documented, be careful to treat the empty string just like + a date string of "0". Without this, an empty string would be + declared invalid when parsed during a DST transition. */ + if (*p == '\0') + p = "0"; + + pc.input = p; + pc.year.value = tmp->tm_year; + pc.year.value += TM_YEAR_BASE; + pc.year.digits = 0; + pc.month = tmp->tm_mon + 1; + pc.day = tmp->tm_mday; + pc.hour = tmp->tm_hour; + pc.minutes = tmp->tm_min; + pc.seconds.tv_sec = tmp->tm_sec; + pc.seconds.tv_nsec = Start_ns; + tm.tm_isdst = tmp->tm_isdst; + + pc.meridian = MER24; + pc.rel = RELATIVE_TIME_0; + pc.timespec_seen = false; + pc.rels_seen = false; + pc.dates_seen = 0; + pc.days_seen = 0; + pc.times_seen = 0; + pc.local_zones_seen = 0; + pc.dsts_seen = 0; + pc.zones_seen = 0; + +#if HAVE_STRUCT_TM_TM_ZONE + pc.local_time_zone_table[0].name = tmp->tm_zone; + pc.local_time_zone_table[0].type = tLOCAL_ZONE; + pc.local_time_zone_table[0].value = tmp->tm_isdst; + pc.local_time_zone_table[1].name = NULL; + + /* Probe the names used in the next three calendar quarters, looking + for a tm_isdst different from the one we already have. */ + { + int quarter; + for (quarter = 1; quarter <= 3; quarter++) + { + time_t probe = Start + quarter * (90 * 24 * 60 * 60); + struct tm const *probe_tm = localtime (&probe); + if (probe_tm && probe_tm->tm_zone + && probe_tm->tm_isdst != pc.local_time_zone_table[0].value) + { + { + pc.local_time_zone_table[1].name = probe_tm->tm_zone; + pc.local_time_zone_table[1].type = tLOCAL_ZONE; + pc.local_time_zone_table[1].value = probe_tm->tm_isdst; + pc.local_time_zone_table[2].name = NULL; + } + break; + } + } + } +#else +#if HAVE_TZNAME + { +# if !HAVE_DECL_TZNAME + extern char *tzname[]; +# endif + int i; + for (i = 0; i < 2; i++) + { + pc.local_time_zone_table[i].name = tzname[i]; + pc.local_time_zone_table[i].type = tLOCAL_ZONE; + pc.local_time_zone_table[i].value = i; + } + pc.local_time_zone_table[i].name = NULL; + } +#else + pc.local_time_zone_table[0].name = NULL; +#endif +#endif + + if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name + && ! strcmp (pc.local_time_zone_table[0].name, + pc.local_time_zone_table[1].name)) + { + /* This locale uses the same abbreviation for standard and + daylight times. So if we see that abbreviation, we don't + know whether it's daylight time. */ + pc.local_time_zone_table[0].value = -1; + pc.local_time_zone_table[1].name = NULL; + } + + if (yyparse (&pc) != 0) + goto fail; + + if (pc.timespec_seen) + *result = pc.seconds; + else + { + if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen + | (pc.local_zones_seen + pc.zones_seen))) + goto fail; + + tm.tm_year = to_year (pc.year) - TM_YEAR_BASE; + tm.tm_mon = pc.month - 1; + tm.tm_mday = pc.day; + if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen)) + { + tm.tm_hour = to_hour (pc.hour, pc.meridian); + if (tm.tm_hour < 0) + goto fail; + tm.tm_min = pc.minutes; + tm.tm_sec = pc.seconds.tv_sec; + } + else + { + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + pc.seconds.tv_nsec = 0; + } + + /* Let mktime deduce tm_isdst if we have an absolute time stamp. */ + if (pc.dates_seen | pc.days_seen | pc.times_seen) + tm.tm_isdst = -1; + + /* But if the input explicitly specifies local time with or without + DST, give mktime that information. */ + if (pc.local_zones_seen) + tm.tm_isdst = pc.local_isdst; + + tm0 = tm; + + Start = mktime (&tm); + + if (! mktime_ok (&tm0, &tm, Start)) + { + if (! pc.zones_seen) + goto fail; + else + { + /* Guard against falsely reporting errors near the time_t + boundaries when parsing times in other time zones. For + example, suppose the input string "1969-12-31 23:00:00 -0100", + the current time zone is 8 hours ahead of UTC, and the min + time_t value is 1970-01-01 00:00:00 UTC. Then the min + localtime value is 1970-01-01 08:00:00, and mktime will + therefore fail on 1969-12-31 23:00:00. To work around the + problem, set the time zone to 1 hour behind UTC temporarily + by setting TZ="XXX1:00" and try mktime again. */ + + long int time_zone = pc.time_zone; + long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone; + long int abs_time_zone_hour = abs_time_zone / 60; + int abs_time_zone_min = abs_time_zone % 60; + char tz1buf[sizeof "XXX+0:00" + + sizeof pc.time_zone * CHAR_BIT / 3]; + if (!tz_was_altered) + tz0 = get_tz (tz0buf); + sprintf (tz1buf, "XXX%s%ld:%02d", &"-"[time_zone < 0], + abs_time_zone_hour, abs_time_zone_min); + if (setenv ("TZ", tz1buf, 1) != 0) + goto fail; + tz_was_altered = true; + tm = tm0; + Start = mktime (&tm); + if (! mktime_ok (&tm0, &tm, Start)) + goto fail; + } + } + + if (pc.days_seen && ! pc.dates_seen) + { + tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7 + + 7 * (pc.day_ordinal + - (0 < pc.day_ordinal + && tm.tm_wday != pc.day_number))); + tm.tm_isdst = -1; + Start = mktime (&tm); + if (Start == (time_t) -1) + goto fail; + } + + /* Add relative date. */ + if (pc.rel.year | pc.rel.month | pc.rel.day) + { + int year = tm.tm_year + pc.rel.year; + int month = tm.tm_mon + pc.rel.month; + int day = tm.tm_mday + pc.rel.day; + if (((year < tm.tm_year) ^ (pc.rel.year < 0)) + | ((month < tm.tm_mon) ^ (pc.rel.month < 0)) + | ((day < tm.tm_mday) ^ (pc.rel.day < 0))) + goto fail; + tm.tm_year = year; + tm.tm_mon = month; + tm.tm_mday = day; + tm.tm_hour = tm0.tm_hour; + tm.tm_min = tm0.tm_min; + tm.tm_sec = tm0.tm_sec; + tm.tm_isdst = tm0.tm_isdst; + Start = mktime (&tm); + if (Start == (time_t) -1) + goto fail; + } + + /* The only "output" of this if-block is an updated Start value, + so this block must follow others that clobber Start. */ + if (pc.zones_seen) + { + long int delta = pc.time_zone * 60; + time_t t1; +#ifdef HAVE_TM_GMTOFF + delta -= tm.tm_gmtoff; +#else + time_t t = Start; + struct tm const *gmt = gmtime (&t); + if (! gmt) + goto fail; + delta -= tm_diff (&tm, gmt); +#endif + t1 = Start - delta; + if ((Start < t1) != (delta < 0)) + goto fail; /* time_t overflow */ + Start = t1; + } + + /* Add relative hours, minutes, and seconds. On hosts that support + leap seconds, ignore the possibility of leap seconds; e.g., + "+ 10 minutes" adds 600 seconds, even if one of them is a + leap second. Typically this is not what the user wants, but it's + too hard to do it the other way, because the time zone indicator + must be applied before relative times, and if mktime is applied + again the time zone will be lost. */ + { + long int sum_ns = pc.seconds.tv_nsec + pc.rel.ns; + long int normalized_ns = (sum_ns % BILLION + BILLION) % BILLION; + time_t t0 = Start; + long int d1 = 60 * 60 * pc.rel.hour; + time_t t1 = t0 + d1; + long int d2 = 60 * pc.rel.minutes; + time_t t2 = t1 + d2; + long_time_t d3 = pc.rel.seconds; + long_time_t t3 = t2 + d3; + long int d4 = (sum_ns - normalized_ns) / BILLION; + long_time_t t4 = t3 + d4; + time_t t5 = t4; + + if ((d1 / (60 * 60) ^ pc.rel.hour) + | (d2 / 60 ^ pc.rel.minutes) + | ((t1 < t0) ^ (d1 < 0)) + | ((t2 < t1) ^ (d2 < 0)) + | ((t3 < t2) ^ (d3 < 0)) + | ((t4 < t3) ^ (d4 < 0)) + | (t5 != t4)) + goto fail; + + result->tv_sec = t5; + result->tv_nsec = normalized_ns; + } + } + + goto done; + + fail: + ok = false; + done: + if (tz_was_altered) + ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0; + if (tz0 != tz0buf) + free (tz0); + return ok; +} + +#if TEST + +int +main (int ac, char **av) +{ + char buff[BUFSIZ]; + + printf ("Enter date, or blank line to exit.\n\t> "); + fflush (stdout); + + buff[BUFSIZ - 1] = '\0'; + while (fgets (buff, BUFSIZ - 1, stdin) && buff[0]) + { + struct timespec d; + struct tm const *tm; + if (! parse_datetime (&d, buff, NULL)) + printf ("Bad format - couldn't convert.\n"); + else if (! (tm = localtime (&d.tv_sec))) + { + long int sec = d.tv_sec; + printf ("localtime (%ld) failed\n", sec); + } + else + { + int ns = d.tv_nsec; + printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n", + tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec, ns); + } + printf ("\t> "); + fflush (stdout); + } + return 0; +} +#endif /* TEST */ + diff --git a/gl/lib/parse-datetime.h b/gl/lib/parse-datetime.h new file mode 100644 index 0000000..9c9bb93 --- /dev/null +++ b/gl/lib/parse-datetime.h @@ -0,0 +1,22 @@ +/* Parse a string into an internal time stamp. + + Copyright (C) 1995, 1997-1998, 2003-2004, 2007, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include + +bool parse_datetime (struct timespec *, char const *, struct timespec const *); diff --git a/gl/lib/parse-datetime.y b/gl/lib/parse-datetime.y new file mode 100644 index 0000000..0ba0a52 --- /dev/null +++ b/gl/lib/parse-datetime.y @@ -0,0 +1,1626 @@ +%{ +/* Parse a string into an internal time stamp. + + Copyright (C) 1999-2000, 2002-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Originally written by Steven M. Bellovin while + at the University of North Carolina at Chapel Hill. Later tweaked by + a couple of people on Usenet. Completely overhauled by Rich $alz + and Jim Berets in August, 1990. + + Modified by Paul Eggert in August 1999 to do + the right thing about local DST. Also modified by Paul Eggert + in February 2004 to support + nanosecond-resolution time stamps, and in October 2004 to support + TZ strings in dates. */ + +/* FIXME: Check for arithmetic overflow in all cases, not just + some of them. */ + +#include + +#include "parse-datetime.h" + +#include "intprops.h" +#include "timespec.h" +#include "verify.h" + +/* There's no need to extend the stack, so there's no need to involve + alloca. */ +#define YYSTACK_USE_ALLOCA 0 + +/* Tell Bison how much stack space is needed. 20 should be plenty for + this grammar, which is not right recursive. Beware setting it too + high, since that might cause problems on machines whose + implementations have lame stack-overflow checking. */ +#define YYMAXDEPTH 20 +#define YYINITDEPTH YYMAXDEPTH + +/* Since the code of parse-datetime.y is not included in the Emacs executable + itself, there is no need to #define static in this file. Even if + the code were included in the Emacs executable, it probably + wouldn't do any harm to #undef it here; this will only cause + problems if we try to write to a static variable, which I don't + think this code needs to do. */ +#ifdef emacs +# undef static +#endif + +#include +#include +#include +#include +#include + +#include "xalloc.h" + +/* Bison's skeleton tests _STDLIB_H, while some stdlib.h headers + use _STDLIB_H_ as witness. Map the latter to the one bison uses. */ +/* FIXME: this is temporary. Remove when we have a mechanism to ensure + that the version we're using is fixed, too. */ +#ifdef _STDLIB_H_ +# undef _STDLIB_H +# define _STDLIB_H 1 +#endif + +/* ISDIGIT differs from isdigit, as follows: + - Its arg may be any int or unsigned int; it need not be an unsigned char + or EOF. + - It's typically faster. + POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to + isdigit unless it's important to use the locale's definition + of "digit" even when the host does not conform to POSIX. */ +#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) + +/* Shift A right by B bits portably, by dividing A by 2**B and + truncating towards minus infinity. A and B should be free of side + effects, and B should be in the range 0 <= B <= INT_BITS - 2, where + INT_BITS is the number of useful bits in an int. GNU code can + assume that INT_BITS is at least 32. + + ISO C99 says that A >> B is implementation-defined if A < 0. Some + implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift + right in the usual way when A < 0, so SHR falls back on division if + ordinary A >> B doesn't seem to be the usual signed shift. */ +#define SHR(a, b) \ + (-1 >> 1 == -1 \ + ? (a) >> (b) \ + : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) + +#define EPOCH_YEAR 1970 +#define TM_YEAR_BASE 1900 + +#define HOUR(x) ((x) * 60) + +/* long_time_t is a signed integer type that contains all time_t values. */ +verify (TYPE_IS_INTEGER (time_t)); +#if TIME_T_FITS_IN_LONG_INT +typedef long int long_time_t; +#else +typedef time_t long_time_t; +#endif + +/* Convert a possibly-signed character to an unsigned character. This is + a bit safer than casting to unsigned char, since it catches some type + errors that the cast doesn't. */ +static unsigned char to_uchar (char ch) { return ch; } + +/* Lots of this code assumes time_t and time_t-like values fit into + long_time_t. */ +verify (TYPE_MINIMUM (long_time_t) <= TYPE_MINIMUM (time_t) + && TYPE_MAXIMUM (time_t) <= TYPE_MAXIMUM (long_time_t)); + +/* FIXME: It also assumes that signed integer overflow silently wraps around, + but this is not true any more with recent versions of GCC 4. */ + +/* An integer value, and the number of digits in its textual + representation. */ +typedef struct +{ + bool negative; + long int value; + size_t digits; +} textint; + +/* An entry in the lexical lookup table. */ +typedef struct +{ + char const *name; + int type; + int value; +} table; + +/* Meridian: am, pm, or 24-hour style. */ +enum { MERam, MERpm, MER24 }; + +enum { BILLION = 1000000000, LOG10_BILLION = 9 }; + +/* Relative times. */ +typedef struct +{ + /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ + long int year; + long int month; + long int day; + long int hour; + long int minutes; + long_time_t seconds; + long int ns; +} relative_time; + +#if HAVE_COMPOUND_LITERALS +# define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 }) +#else +static relative_time const RELATIVE_TIME_0; +#endif + +/* Information passed to and from the parser. */ +typedef struct +{ + /* The input string remaining to be parsed. */ + const char *input; + + /* N, if this is the Nth Tuesday. */ + long int day_ordinal; + + /* Day of week; Sunday is 0. */ + int day_number; + + /* tm_isdst flag for the local zone. */ + int local_isdst; + + /* Time zone, in minutes east of UTC. */ + long int time_zone; + + /* Style used for time. */ + int meridian; + + /* Gregorian year, month, day, hour, minutes, seconds, and nanoseconds. */ + textint year; + long int month; + long int day; + long int hour; + long int minutes; + struct timespec seconds; /* includes nanoseconds */ + + /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ + relative_time rel; + + /* Presence or counts of nonterminals of various flavors parsed so far. */ + bool timespec_seen; + bool rels_seen; + size_t dates_seen; + size_t days_seen; + size_t local_zones_seen; + size_t dsts_seen; + size_t times_seen; + size_t zones_seen; + + /* Table of local time zone abbreviations, terminated by a null entry. */ + table local_time_zone_table[3]; +} parser_control; + +union YYSTYPE; +static int yylex (union YYSTYPE *, parser_control *); +static int yyerror (parser_control const *, char const *); +static long int time_zone_hhmm (parser_control *, textint, long int); + +/* Extract into *PC any date and time info from a string of digits + of the form e.g., YYYYMMDD, YYMMDD, HHMM, HH (and sometimes YYY, + YYYY, ...). */ +static void +digits_to_date_time (parser_control *pc, textint text_int) +{ + if (pc->dates_seen && ! pc->year.digits + && ! pc->rels_seen && (pc->times_seen || 2 < text_int.digits)) + pc->year = text_int; + else + { + if (4 < text_int.digits) + { + pc->dates_seen++; + pc->day = text_int.value % 100; + pc->month = (text_int.value / 100) % 100; + pc->year.value = text_int.value / 10000; + pc->year.digits = text_int.digits - 4; + } + else + { + pc->times_seen++; + if (text_int.digits <= 2) + { + pc->hour = text_int.value; + pc->minutes = 0; + } + else + { + pc->hour = text_int.value / 100; + pc->minutes = text_int.value % 100; + } + pc->seconds.tv_sec = 0; + pc->seconds.tv_nsec = 0; + pc->meridian = MER24; + } + } +} + +/* Increment PC->rel by FACTOR * REL (FACTOR is 1 or -1). */ +static void +apply_relative_time (parser_control *pc, relative_time rel, int factor) +{ + pc->rel.ns += factor * rel.ns; + pc->rel.seconds += factor * rel.seconds; + pc->rel.minutes += factor * rel.minutes; + pc->rel.hour += factor * rel.hour; + pc->rel.day += factor * rel.day; + pc->rel.month += factor * rel.month; + pc->rel.year += factor * rel.year; + pc->rels_seen = true; +} + +/* Set PC-> hour, minutes, seconds and nanoseconds members from arguments. */ +static void +set_hhmmss (parser_control *pc, long int hour, long int minutes, + time_t sec, long int nsec) +{ + pc->hour = hour; + pc->minutes = minutes; + pc->seconds.tv_sec = sec; + pc->seconds.tv_nsec = nsec; +} + +%} + +/* We want a reentrant parser, even if the TZ manipulation and the calls to + localtime and gmtime are not reentrant. */ +%pure-parser +%parse-param { parser_control *pc } +%lex-param { parser_control *pc } + +/* This grammar has 31 shift/reduce conflicts. */ +%expect 31 + +%union +{ + long int intval; + textint textintval; + struct timespec timespec; + relative_time rel; +} + +%token tAGO +%token tDST + +%token tYEAR_UNIT tMONTH_UNIT tHOUR_UNIT tMINUTE_UNIT tSEC_UNIT +%token tDAY_UNIT tDAY_SHIFT + +%token tDAY tDAYZONE tLOCAL_ZONE tMERIDIAN +%token tMONTH tORDINAL tZONE + +%token tSNUMBER tUNUMBER +%token tSDECIMAL_NUMBER tUDECIMAL_NUMBER + +%type o_colon_minutes +%type seconds signed_seconds unsigned_seconds + +%type relunit relunit_snumber dayshift + +%% + +spec: + timespec + | items + ; + +timespec: + '@' seconds + { + pc->seconds = $2; + pc->timespec_seen = true; + } + ; + +items: + /* empty */ + | items item + ; + +item: + datetime + { pc->times_seen++; pc->dates_seen++; } + | time + { pc->times_seen++; } + | local_zone + { pc->local_zones_seen++; } + | zone + { pc->zones_seen++; } + | date + { pc->dates_seen++; } + | day + { pc->days_seen++; } + | rel + | number + | hybrid + ; + +datetime: + iso_8601_datetime + ; + +iso_8601_datetime: + iso_8601_date 'T' iso_8601_time + ; + +time: + tUNUMBER tMERIDIAN + { + set_hhmmss (pc, $1.value, 0, 0, 0); + pc->meridian = $2; + } + | tUNUMBER ':' tUNUMBER tMERIDIAN + { + set_hhmmss (pc, $1.value, $3.value, 0, 0); + pc->meridian = $4; + } + | tUNUMBER ':' tUNUMBER ':' unsigned_seconds tMERIDIAN + { + set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); + pc->meridian = $6; + } + | iso_8601_time + ; + +iso_8601_time: + tUNUMBER zone_offset + { + set_hhmmss (pc, $1.value, 0, 0, 0); + pc->meridian = MER24; + } + | tUNUMBER ':' tUNUMBER o_zone_offset + { + set_hhmmss (pc, $1.value, $3.value, 0, 0); + pc->meridian = MER24; + } + | tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_zone_offset + { + set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); + pc->meridian = MER24; + } + ; + +o_zone_offset: + /* empty */ + | zone_offset + ; + +zone_offset: + tSNUMBER o_colon_minutes + { + pc->zones_seen++; + pc->time_zone = time_zone_hhmm (pc, $1, $2); + } + ; + +local_zone: + tLOCAL_ZONE + { + pc->local_isdst = $1; + pc->dsts_seen += (0 < $1); + } + | tLOCAL_ZONE tDST + { + pc->local_isdst = 1; + pc->dsts_seen += (0 < $1) + 1; + } + ; + +/* Note 'T' is a special case, as it is used as the separator in ISO + 8601 date and time of day representation. */ +zone: + tZONE + { pc->time_zone = $1; } + | 'T' + { pc->time_zone = HOUR(7); } + | tZONE relunit_snumber + { pc->time_zone = $1; + apply_relative_time (pc, $2, 1); } + | 'T' relunit_snumber + { pc->time_zone = HOUR(7); + apply_relative_time (pc, $2, 1); } + | tZONE tSNUMBER o_colon_minutes + { pc->time_zone = $1 + time_zone_hhmm (pc, $2, $3); } + | tDAYZONE + { pc->time_zone = $1 + 60; } + | tZONE tDST + { pc->time_zone = $1 + 60; } + ; + +day: + tDAY + { + pc->day_ordinal = 0; + pc->day_number = $1; + } + | tDAY ',' + { + pc->day_ordinal = 0; + pc->day_number = $1; + } + | tORDINAL tDAY + { + pc->day_ordinal = $1; + pc->day_number = $2; + } + | tUNUMBER tDAY + { + pc->day_ordinal = $1.value; + pc->day_number = $2; + } + ; + +date: + tUNUMBER '/' tUNUMBER + { + pc->month = $1.value; + pc->day = $3.value; + } + | tUNUMBER '/' tUNUMBER '/' tUNUMBER + { + /* Interpret as YYYY/MM/DD if the first value has 4 or more digits, + otherwise as MM/DD/YY. + The goal in recognizing YYYY/MM/DD is solely to support legacy + machine-generated dates like those in an RCS log listing. If + you want portability, use the ISO 8601 format. */ + if (4 <= $1.digits) + { + pc->year = $1; + pc->month = $3.value; + pc->day = $5.value; + } + else + { + pc->month = $1.value; + pc->day = $3.value; + pc->year = $5; + } + } + | tUNUMBER tMONTH tSNUMBER + { + /* e.g. 17-JUN-1992. */ + pc->day = $1.value; + pc->month = $2; + pc->year.value = -$3.value; + pc->year.digits = $3.digits; + } + | tMONTH tSNUMBER tSNUMBER + { + /* e.g. JUN-17-1992. */ + pc->month = $1; + pc->day = -$2.value; + pc->year.value = -$3.value; + pc->year.digits = $3.digits; + } + | tMONTH tUNUMBER + { + pc->month = $1; + pc->day = $2.value; + } + | tMONTH tUNUMBER ',' tUNUMBER + { + pc->month = $1; + pc->day = $2.value; + pc->year = $4; + } + | tUNUMBER tMONTH + { + pc->day = $1.value; + pc->month = $2; + } + | tUNUMBER tMONTH tUNUMBER + { + pc->day = $1.value; + pc->month = $2; + pc->year = $3; + } + | iso_8601_date + ; + +iso_8601_date: + tUNUMBER tSNUMBER tSNUMBER + { + /* ISO 8601 format. YYYY-MM-DD. */ + pc->year = $1; + pc->month = -$2.value; + pc->day = -$3.value; + } + ; + +rel: + relunit tAGO + { apply_relative_time (pc, $1, $2); } + | relunit + { apply_relative_time (pc, $1, 1); } + | dayshift + { apply_relative_time (pc, $1, 1); } + ; + +relunit: + tORDINAL tYEAR_UNIT + { $$ = RELATIVE_TIME_0; $$.year = $1; } + | tUNUMBER tYEAR_UNIT + { $$ = RELATIVE_TIME_0; $$.year = $1.value; } + | tYEAR_UNIT + { $$ = RELATIVE_TIME_0; $$.year = 1; } + | tORDINAL tMONTH_UNIT + { $$ = RELATIVE_TIME_0; $$.month = $1; } + | tUNUMBER tMONTH_UNIT + { $$ = RELATIVE_TIME_0; $$.month = $1.value; } + | tMONTH_UNIT + { $$ = RELATIVE_TIME_0; $$.month = 1; } + | tORDINAL tDAY_UNIT + { $$ = RELATIVE_TIME_0; $$.day = $1 * $2; } + | tUNUMBER tDAY_UNIT + { $$ = RELATIVE_TIME_0; $$.day = $1.value * $2; } + | tDAY_UNIT + { $$ = RELATIVE_TIME_0; $$.day = $1; } + | tORDINAL tHOUR_UNIT + { $$ = RELATIVE_TIME_0; $$.hour = $1; } + | tUNUMBER tHOUR_UNIT + { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } + | tHOUR_UNIT + { $$ = RELATIVE_TIME_0; $$.hour = 1; } + | tORDINAL tMINUTE_UNIT + { $$ = RELATIVE_TIME_0; $$.minutes = $1; } + | tUNUMBER tMINUTE_UNIT + { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } + | tMINUTE_UNIT + { $$ = RELATIVE_TIME_0; $$.minutes = 1; } + | tORDINAL tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = $1; } + | tUNUMBER tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } + | tSDECIMAL_NUMBER tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } + | tUDECIMAL_NUMBER tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } + | tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = 1; } + | relunit_snumber + ; + +relunit_snumber: + tSNUMBER tYEAR_UNIT + { $$ = RELATIVE_TIME_0; $$.year = $1.value; } + | tSNUMBER tMONTH_UNIT + { $$ = RELATIVE_TIME_0; $$.month = $1.value; } + | tSNUMBER tDAY_UNIT + { $$ = RELATIVE_TIME_0; $$.day = $1.value * $2; } + | tSNUMBER tHOUR_UNIT + { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } + | tSNUMBER tMINUTE_UNIT + { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } + | tSNUMBER tSEC_UNIT + { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } + ; + +dayshift: + tDAY_SHIFT + { $$ = RELATIVE_TIME_0; $$.day = $1; } + ; + +seconds: signed_seconds | unsigned_seconds; + +signed_seconds: + tSDECIMAL_NUMBER + | tSNUMBER + { $$.tv_sec = $1.value; $$.tv_nsec = 0; } + ; + +unsigned_seconds: + tUDECIMAL_NUMBER + | tUNUMBER + { $$.tv_sec = $1.value; $$.tv_nsec = 0; } + ; + +number: + tUNUMBER + { digits_to_date_time (pc, $1); } + ; + +hybrid: + tUNUMBER relunit_snumber + { + /* Hybrid all-digit and relative offset, so that we accept e.g., + "YYYYMMDD +N days" as well as "YYYYMMDD N days". */ + digits_to_date_time (pc, $1); + apply_relative_time (pc, $2, 1); + } + ; + +o_colon_minutes: + /* empty */ + { $$ = -1; } + | ':' tUNUMBER + { $$ = $2.value; } + ; + +%% + +static table const meridian_table[] = +{ + { "AM", tMERIDIAN, MERam }, + { "A.M.", tMERIDIAN, MERam }, + { "PM", tMERIDIAN, MERpm }, + { "P.M.", tMERIDIAN, MERpm }, + { NULL, 0, 0 } +}; + +static table const dst_table[] = +{ + { "DST", tDST, 0 } +}; + +static table const month_and_day_table[] = +{ + { "JANUARY", tMONTH, 1 }, + { "FEBRUARY", tMONTH, 2 }, + { "MARCH", tMONTH, 3 }, + { "APRIL", tMONTH, 4 }, + { "MAY", tMONTH, 5 }, + { "JUNE", tMONTH, 6 }, + { "JULY", tMONTH, 7 }, + { "AUGUST", tMONTH, 8 }, + { "SEPTEMBER",tMONTH, 9 }, + { "SEPT", tMONTH, 9 }, + { "OCTOBER", tMONTH, 10 }, + { "NOVEMBER", tMONTH, 11 }, + { "DECEMBER", tMONTH, 12 }, + { "SUNDAY", tDAY, 0 }, + { "MONDAY", tDAY, 1 }, + { "TUESDAY", tDAY, 2 }, + { "TUES", tDAY, 2 }, + { "WEDNESDAY",tDAY, 3 }, + { "WEDNES", tDAY, 3 }, + { "THURSDAY", tDAY, 4 }, + { "THUR", tDAY, 4 }, + { "THURS", tDAY, 4 }, + { "FRIDAY", tDAY, 5 }, + { "SATURDAY", tDAY, 6 }, + { NULL, 0, 0 } +}; + +static table const time_units_table[] = +{ + { "YEAR", tYEAR_UNIT, 1 }, + { "MONTH", tMONTH_UNIT, 1 }, + { "FORTNIGHT",tDAY_UNIT, 14 }, + { "WEEK", tDAY_UNIT, 7 }, + { "DAY", tDAY_UNIT, 1 }, + { "HOUR", tHOUR_UNIT, 1 }, + { "MINUTE", tMINUTE_UNIT, 1 }, + { "MIN", tMINUTE_UNIT, 1 }, + { "SECOND", tSEC_UNIT, 1 }, + { "SEC", tSEC_UNIT, 1 }, + { NULL, 0, 0 } +}; + +/* Assorted relative-time words. */ +static table const relative_time_table[] = +{ + { "TOMORROW", tDAY_SHIFT, 1 }, + { "YESTERDAY",tDAY_SHIFT, -1 }, + { "TODAY", tDAY_SHIFT, 0 }, + { "NOW", tDAY_SHIFT, 0 }, + { "LAST", tORDINAL, -1 }, + { "THIS", tORDINAL, 0 }, + { "NEXT", tORDINAL, 1 }, + { "FIRST", tORDINAL, 1 }, +/*{ "SECOND", tORDINAL, 2 }, */ + { "THIRD", tORDINAL, 3 }, + { "FOURTH", tORDINAL, 4 }, + { "FIFTH", tORDINAL, 5 }, + { "SIXTH", tORDINAL, 6 }, + { "SEVENTH", tORDINAL, 7 }, + { "EIGHTH", tORDINAL, 8 }, + { "NINTH", tORDINAL, 9 }, + { "TENTH", tORDINAL, 10 }, + { "ELEVENTH", tORDINAL, 11 }, + { "TWELFTH", tORDINAL, 12 }, + { "AGO", tAGO, -1 }, + { "HENCE", tAGO, 1 }, + { NULL, 0, 0 } +}; + +/* The universal time zone table. These labels can be used even for + time stamps that would not otherwise be valid, e.g., GMT time + stamps in London during summer. */ +static table const universal_time_zone_table[] = +{ + { "GMT", tZONE, HOUR ( 0) }, /* Greenwich Mean */ + { "UT", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ + { "UTC", tZONE, HOUR ( 0) }, + { NULL, 0, 0 } +}; + +/* The time zone table. This table is necessarily incomplete, as time + zone abbreviations are ambiguous; e.g. Australians interpret "EST" + as Eastern time in Australia, not as US Eastern Standard Time. + You cannot rely on parse_datetime to handle arbitrary time zone + abbreviations; use numeric abbreviations like "-0500" instead. */ +static table const time_zone_table[] = +{ + { "WET", tZONE, HOUR ( 0) }, /* Western European */ + { "WEST", tDAYZONE, HOUR ( 0) }, /* Western European Summer */ + { "BST", tDAYZONE, HOUR ( 0) }, /* British Summer */ + { "ART", tZONE, -HOUR ( 3) }, /* Argentina */ + { "BRT", tZONE, -HOUR ( 3) }, /* Brazil */ + { "BRST", tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */ + { "NST", tZONE, -(HOUR ( 3) + 30) }, /* Newfoundland Standard */ + { "NDT", tDAYZONE,-(HOUR ( 3) + 30) }, /* Newfoundland Daylight */ + { "AST", tZONE, -HOUR ( 4) }, /* Atlantic Standard */ + { "ADT", tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */ + { "CLT", tZONE, -HOUR ( 4) }, /* Chile */ + { "CLST", tDAYZONE, -HOUR ( 4) }, /* Chile Summer */ + { "EST", tZONE, -HOUR ( 5) }, /* Eastern Standard */ + { "EDT", tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */ + { "CST", tZONE, -HOUR ( 6) }, /* Central Standard */ + { "CDT", tDAYZONE, -HOUR ( 6) }, /* Central Daylight */ + { "MST", tZONE, -HOUR ( 7) }, /* Mountain Standard */ + { "MDT", tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */ + { "PST", tZONE, -HOUR ( 8) }, /* Pacific Standard */ + { "PDT", tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */ + { "AKST", tZONE, -HOUR ( 9) }, /* Alaska Standard */ + { "AKDT", tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */ + { "HST", tZONE, -HOUR (10) }, /* Hawaii Standard */ + { "HAST", tZONE, -HOUR (10) }, /* Hawaii-Aleutian Standard */ + { "HADT", tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */ + { "SST", tZONE, -HOUR (12) }, /* Samoa Standard */ + { "WAT", tZONE, HOUR ( 1) }, /* West Africa */ + { "CET", tZONE, HOUR ( 1) }, /* Central European */ + { "CEST", tDAYZONE, HOUR ( 1) }, /* Central European Summer */ + { "MET", tZONE, HOUR ( 1) }, /* Middle European */ + { "MEZ", tZONE, HOUR ( 1) }, /* Middle European */ + { "MEST", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ + { "MESZ", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ + { "EET", tZONE, HOUR ( 2) }, /* Eastern European */ + { "EEST", tDAYZONE, HOUR ( 2) }, /* Eastern European Summer */ + { "CAT", tZONE, HOUR ( 2) }, /* Central Africa */ + { "SAST", tZONE, HOUR ( 2) }, /* South Africa Standard */ + { "EAT", tZONE, HOUR ( 3) }, /* East Africa */ + { "MSK", tZONE, HOUR ( 3) }, /* Moscow */ + { "MSD", tDAYZONE, HOUR ( 3) }, /* Moscow Daylight */ + { "IST", tZONE, (HOUR ( 5) + 30) }, /* India Standard */ + { "SGT", tZONE, HOUR ( 8) }, /* Singapore */ + { "KST", tZONE, HOUR ( 9) }, /* Korea Standard */ + { "JST", tZONE, HOUR ( 9) }, /* Japan Standard */ + { "GST", tZONE, HOUR (10) }, /* Guam Standard */ + { "NZST", tZONE, HOUR (12) }, /* New Zealand Standard */ + { "NZDT", tDAYZONE, HOUR (12) }, /* New Zealand Daylight */ + { NULL, 0, 0 } +}; + +/* Military time zone table. + + Note 'T' is a special case, as it is used as the separator in ISO + 8601 date and time of day representation. */ +static table const military_table[] = +{ + { "A", tZONE, -HOUR ( 1) }, + { "B", tZONE, -HOUR ( 2) }, + { "C", tZONE, -HOUR ( 3) }, + { "D", tZONE, -HOUR ( 4) }, + { "E", tZONE, -HOUR ( 5) }, + { "F", tZONE, -HOUR ( 6) }, + { "G", tZONE, -HOUR ( 7) }, + { "H", tZONE, -HOUR ( 8) }, + { "I", tZONE, -HOUR ( 9) }, + { "K", tZONE, -HOUR (10) }, + { "L", tZONE, -HOUR (11) }, + { "M", tZONE, -HOUR (12) }, + { "N", tZONE, HOUR ( 1) }, + { "O", tZONE, HOUR ( 2) }, + { "P", tZONE, HOUR ( 3) }, + { "Q", tZONE, HOUR ( 4) }, + { "R", tZONE, HOUR ( 5) }, + { "S", tZONE, HOUR ( 6) }, + { "T", 'T', 0 }, + { "U", tZONE, HOUR ( 8) }, + { "V", tZONE, HOUR ( 9) }, + { "W", tZONE, HOUR (10) }, + { "X", tZONE, HOUR (11) }, + { "Y", tZONE, HOUR (12) }, + { "Z", tZONE, HOUR ( 0) }, + { NULL, 0, 0 } +}; + + + +/* Convert a time zone expressed as HH:MM into an integer count of + minutes. If MM is negative, then S is of the form HHMM and needs + to be picked apart; otherwise, S is of the form HH. As specified in + http://www.opengroup.org/susv3xbd/xbd_chap08.html#tag_08_03, allow + only valid TZ range, and consider first two digits as hours, if no + minutes specified. */ + +static long int +time_zone_hhmm (parser_control *pc, textint s, long int mm) +{ + long int n_minutes; + + /* If the length of S is 1 or 2 and no minutes are specified, + interpret it as a number of hours. */ + if (s.digits <= 2 && mm < 0) + s.value *= 100; + + if (mm < 0) + n_minutes = (s.value / 100) * 60 + s.value % 100; + else + n_minutes = s.value * 60 + (s.negative ? -mm : mm); + + /* If the absolute number of minutes is larger than 24 hours, + arrange to reject it by incrementing pc->zones_seen. Thus, + we allow only values in the range UTC-24:00 to UTC+24:00. */ + if (24 * 60 < abs (n_minutes)) + pc->zones_seen++; + + return n_minutes; +} + +static int +to_hour (long int hours, int meridian) +{ + switch (meridian) + { + default: /* Pacify GCC. */ + case MER24: + return 0 <= hours && hours < 24 ? hours : -1; + case MERam: + return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1; + case MERpm: + return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1; + } +} + +static long int +to_year (textint textyear) +{ + long int year = textyear.value; + + if (year < 0) + year = -year; + + /* XPG4 suggests that years 00-68 map to 2000-2068, and + years 69-99 map to 1969-1999. */ + else if (textyear.digits == 2) + year += year < 69 ? 2000 : 1900; + + return year; +} + +static table const * _GL_ATTRIBUTE_PURE +lookup_zone (parser_control const *pc, char const *name) +{ + table const *tp; + + for (tp = universal_time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + /* Try local zone abbreviations before those in time_zone_table, as + the local ones are more likely to be right. */ + for (tp = pc->local_time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + for (tp = time_zone_table; tp->name; tp++) + if (strcmp (name, tp->name) == 0) + return tp; + + return NULL; +} + +#if ! HAVE_TM_GMTOFF +/* Yield the difference between *A and *B, + measured in seconds, ignoring leap seconds. + The body of this function is taken directly from the GNU C Library; + see src/strftime.c. */ +static long int +tm_diff (struct tm const *a, struct tm const *b) +{ + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid int overflow in leap day calculations. */ + int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); + int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = SHR (a100, 2); + int b400 = SHR (b100, 2); + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + long int ayear = a->tm_year; + long int years = ayear - b->tm_year; + long int days = (365 * years + intervening_leap_days + + (a->tm_yday - b->tm_yday)); + return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + + (a->tm_min - b->tm_min)) + + (a->tm_sec - b->tm_sec)); +} +#endif /* ! HAVE_TM_GMTOFF */ + +static table const * +lookup_word (parser_control const *pc, char *word) +{ + char *p; + char *q; + size_t wordlen; + table const *tp; + bool period_found; + bool abbrev; + + /* Make it uppercase. */ + for (p = word; *p; p++) + { + unsigned char ch = *p; + *p = c_toupper (ch); + } + + for (tp = meridian_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* See if we have an abbreviation for a month. */ + wordlen = strlen (word); + abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.'); + + for (tp = month_and_day_table; tp->name; tp++) + if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0) + return tp; + + if ((tp = lookup_zone (pc, word))) + return tp; + + if (strcmp (word, dst_table[0].name) == 0) + return dst_table; + + for (tp = time_units_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* Strip off any plural and try the units table again. */ + if (word[wordlen - 1] == 'S') + { + word[wordlen - 1] = '\0'; + for (tp = time_units_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + word[wordlen - 1] = 'S'; /* For "this" in relative_time_table. */ + } + + for (tp = relative_time_table; tp->name; tp++) + if (strcmp (word, tp->name) == 0) + return tp; + + /* Military time zones. */ + if (wordlen == 1) + for (tp = military_table; tp->name; tp++) + if (word[0] == tp->name[0]) + return tp; + + /* Drop out any periods and try the time zone table again. */ + for (period_found = false, p = q = word; (*p = *q); q++) + if (*q == '.') + period_found = true; + else + p++; + if (period_found && (tp = lookup_zone (pc, word))) + return tp; + + return NULL; +} + +static int +yylex (YYSTYPE *lvalp, parser_control *pc) +{ + unsigned char c; + size_t count; + + for (;;) + { + while (c = *pc->input, c_isspace (c)) + pc->input++; + + if (ISDIGIT (c) || c == '-' || c == '+') + { + char const *p; + int sign; + unsigned long int value; + if (c == '-' || c == '+') + { + sign = c == '-' ? -1 : 1; + while (c = *++pc->input, c_isspace (c)) + continue; + if (! ISDIGIT (c)) + /* skip the '-' sign */ + continue; + } + else + sign = 0; + p = pc->input; + for (value = 0; ; value *= 10) + { + unsigned long int value1 = value + (c - '0'); + if (value1 < value) + return '?'; + value = value1; + c = *++p; + if (! ISDIGIT (c)) + break; + if (ULONG_MAX / 10 < value) + return '?'; + } + if ((c == '.' || c == ',') && ISDIGIT (p[1])) + { + time_t s; + int ns; + int digits; + unsigned long int value1; + + /* Check for overflow when converting value to time_t. */ + if (sign < 0) + { + s = - value; + if (0 < s) + return '?'; + value1 = -s; + } + else + { + s = value; + if (s < 0) + return '?'; + value1 = s; + } + if (value != value1) + return '?'; + + /* Accumulate fraction, to ns precision. */ + p++; + ns = *p++ - '0'; + for (digits = 2; digits <= LOG10_BILLION; digits++) + { + ns *= 10; + if (ISDIGIT (*p)) + ns += *p++ - '0'; + } + + /* Skip excess digits, truncating toward -Infinity. */ + if (sign < 0) + for (; ISDIGIT (*p); p++) + if (*p != '0') + { + ns++; + break; + } + while (ISDIGIT (*p)) + p++; + + /* Adjust to the timespec convention, which is that + tv_nsec is always a positive offset even if tv_sec is + negative. */ + if (sign < 0 && ns) + { + s--; + if (! (s < 0)) + return '?'; + ns = BILLION - ns; + } + + lvalp->timespec.tv_sec = s; + lvalp->timespec.tv_nsec = ns; + pc->input = p; + return sign ? tSDECIMAL_NUMBER : tUDECIMAL_NUMBER; + } + else + { + lvalp->textintval.negative = sign < 0; + if (sign < 0) + { + lvalp->textintval.value = - value; + if (0 < lvalp->textintval.value) + return '?'; + } + else + { + lvalp->textintval.value = value; + if (lvalp->textintval.value < 0) + return '?'; + } + lvalp->textintval.digits = p - pc->input; + pc->input = p; + return sign ? tSNUMBER : tUNUMBER; + } + } + + if (c_isalpha (c)) + { + char buff[20]; + char *p = buff; + table const *tp; + + do + { + if (p - buff < sizeof buff - 1) + *p++ = c; + c = *++pc->input; + } + while (c_isalpha (c) || c == '.'); + + *p = '\0'; + tp = lookup_word (pc, buff); + if (! tp) + return '?'; + lvalp->intval = tp->value; + return tp->type; + } + + if (c != '(') + return to_uchar (*pc->input++); + + count = 0; + do + { + c = *pc->input++; + if (c == '\0') + return c; + if (c == '(') + count++; + else if (c == ')') + count--; + } + while (count != 0); + } +} + +/* Do nothing if the parser reports an error. */ +static int +yyerror (parser_control const *pc _GL_UNUSED, + char const *s _GL_UNUSED) +{ + return 0; +} + +/* If *TM0 is the old and *TM1 is the new value of a struct tm after + passing it to mktime, return true if it's OK that mktime returned T. + It's not OK if *TM0 has out-of-range members. */ + +static bool +mktime_ok (struct tm const *tm0, struct tm const *tm1, time_t t) +{ + if (t == (time_t) -1) + { + /* Guard against falsely reporting an error when parsing a time + stamp that happens to equal (time_t) -1, on a host that + supports such a time stamp. */ + tm1 = localtime (&t); + if (!tm1) + return false; + } + + return ! ((tm0->tm_sec ^ tm1->tm_sec) + | (tm0->tm_min ^ tm1->tm_min) + | (tm0->tm_hour ^ tm1->tm_hour) + | (tm0->tm_mday ^ tm1->tm_mday) + | (tm0->tm_mon ^ tm1->tm_mon) + | (tm0->tm_year ^ tm1->tm_year)); +} + +/* A reasonable upper bound for the size of ordinary TZ strings. + Use heap allocation if TZ's length exceeds this. */ +enum { TZBUFSIZE = 100 }; + +/* Return a copy of TZ, stored in TZBUF if it fits, and heap-allocated + otherwise. */ +static char * +get_tz (char tzbuf[TZBUFSIZE]) +{ + char *tz = getenv ("TZ"); + if (tz) + { + size_t tzsize = strlen (tz) + 1; + tz = (tzsize <= TZBUFSIZE + ? memcpy (tzbuf, tz, tzsize) + : xmemdup (tz, tzsize)); + } + return tz; +} + +/* Parse a date/time string, storing the resulting time value into *RESULT. + The string itself is pointed to by P. Return true if successful. + P can be an incomplete or relative time specification; if so, use + *NOW as the basis for the returned time. */ +bool +parse_datetime (struct timespec *result, char const *p, + struct timespec const *now) +{ + time_t Start; + long int Start_ns; + struct tm const *tmp; + struct tm tm; + struct tm tm0; + parser_control pc; + struct timespec gettime_buffer; + unsigned char c; + bool tz_was_altered = false; + char *tz0 = NULL; + char tz0buf[TZBUFSIZE]; + bool ok = true; + + if (! now) + { + gettime (&gettime_buffer); + now = &gettime_buffer; + } + + Start = now->tv_sec; + Start_ns = now->tv_nsec; + + tmp = localtime (&now->tv_sec); + if (! tmp) + return false; + + while (c = *p, c_isspace (c)) + p++; + + if (strncmp (p, "TZ=\"", 4) == 0) + { + char const *tzbase = p + 4; + size_t tzsize = 1; + char const *s; + + for (s = tzbase; *s; s++, tzsize++) + if (*s == '\\') + { + s++; + if (! (*s == '\\' || *s == '"')) + break; + } + else if (*s == '"') + { + char *z; + char *tz1; + char tz1buf[TZBUFSIZE]; + bool large_tz = TZBUFSIZE < tzsize; + bool setenv_ok; + tz0 = get_tz (tz0buf); + z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf; + for (s = tzbase; *s != '"'; s++) + *z++ = *(s += *s == '\\'); + *z = '\0'; + setenv_ok = setenv ("TZ", tz1, 1) == 0; + if (large_tz) + free (tz1); + if (!setenv_ok) + goto fail; + tz_was_altered = true; + + p = s + 1; + while (c = *p, c_isspace (c)) + p++; + + break; + } + } + + /* As documented, be careful to treat the empty string just like + a date string of "0". Without this, an empty string would be + declared invalid when parsed during a DST transition. */ + if (*p == '\0') + p = "0"; + + pc.input = p; + pc.year.value = tmp->tm_year; + pc.year.value += TM_YEAR_BASE; + pc.year.digits = 0; + pc.month = tmp->tm_mon + 1; + pc.day = tmp->tm_mday; + pc.hour = tmp->tm_hour; + pc.minutes = tmp->tm_min; + pc.seconds.tv_sec = tmp->tm_sec; + pc.seconds.tv_nsec = Start_ns; + tm.tm_isdst = tmp->tm_isdst; + + pc.meridian = MER24; + pc.rel = RELATIVE_TIME_0; + pc.timespec_seen = false; + pc.rels_seen = false; + pc.dates_seen = 0; + pc.days_seen = 0; + pc.times_seen = 0; + pc.local_zones_seen = 0; + pc.dsts_seen = 0; + pc.zones_seen = 0; + +#if HAVE_STRUCT_TM_TM_ZONE + pc.local_time_zone_table[0].name = tmp->tm_zone; + pc.local_time_zone_table[0].type = tLOCAL_ZONE; + pc.local_time_zone_table[0].value = tmp->tm_isdst; + pc.local_time_zone_table[1].name = NULL; + + /* Probe the names used in the next three calendar quarters, looking + for a tm_isdst different from the one we already have. */ + { + int quarter; + for (quarter = 1; quarter <= 3; quarter++) + { + time_t probe = Start + quarter * (90 * 24 * 60 * 60); + struct tm const *probe_tm = localtime (&probe); + if (probe_tm && probe_tm->tm_zone + && probe_tm->tm_isdst != pc.local_time_zone_table[0].value) + { + { + pc.local_time_zone_table[1].name = probe_tm->tm_zone; + pc.local_time_zone_table[1].type = tLOCAL_ZONE; + pc.local_time_zone_table[1].value = probe_tm->tm_isdst; + pc.local_time_zone_table[2].name = NULL; + } + break; + } + } + } +#else +#if HAVE_TZNAME + { +# if !HAVE_DECL_TZNAME + extern char *tzname[]; +# endif + int i; + for (i = 0; i < 2; i++) + { + pc.local_time_zone_table[i].name = tzname[i]; + pc.local_time_zone_table[i].type = tLOCAL_ZONE; + pc.local_time_zone_table[i].value = i; + } + pc.local_time_zone_table[i].name = NULL; + } +#else + pc.local_time_zone_table[0].name = NULL; +#endif +#endif + + if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name + && ! strcmp (pc.local_time_zone_table[0].name, + pc.local_time_zone_table[1].name)) + { + /* This locale uses the same abbreviation for standard and + daylight times. So if we see that abbreviation, we don't + know whether it's daylight time. */ + pc.local_time_zone_table[0].value = -1; + pc.local_time_zone_table[1].name = NULL; + } + + if (yyparse (&pc) != 0) + goto fail; + + if (pc.timespec_seen) + *result = pc.seconds; + else + { + if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen + | (pc.local_zones_seen + pc.zones_seen))) + goto fail; + + tm.tm_year = to_year (pc.year) - TM_YEAR_BASE; + tm.tm_mon = pc.month - 1; + tm.tm_mday = pc.day; + if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen)) + { + tm.tm_hour = to_hour (pc.hour, pc.meridian); + if (tm.tm_hour < 0) + goto fail; + tm.tm_min = pc.minutes; + tm.tm_sec = pc.seconds.tv_sec; + } + else + { + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + pc.seconds.tv_nsec = 0; + } + + /* Let mktime deduce tm_isdst if we have an absolute time stamp. */ + if (pc.dates_seen | pc.days_seen | pc.times_seen) + tm.tm_isdst = -1; + + /* But if the input explicitly specifies local time with or without + DST, give mktime that information. */ + if (pc.local_zones_seen) + tm.tm_isdst = pc.local_isdst; + + tm0 = tm; + + Start = mktime (&tm); + + if (! mktime_ok (&tm0, &tm, Start)) + { + if (! pc.zones_seen) + goto fail; + else + { + /* Guard against falsely reporting errors near the time_t + boundaries when parsing times in other time zones. For + example, suppose the input string "1969-12-31 23:00:00 -0100", + the current time zone is 8 hours ahead of UTC, and the min + time_t value is 1970-01-01 00:00:00 UTC. Then the min + localtime value is 1970-01-01 08:00:00, and mktime will + therefore fail on 1969-12-31 23:00:00. To work around the + problem, set the time zone to 1 hour behind UTC temporarily + by setting TZ="XXX1:00" and try mktime again. */ + + long int time_zone = pc.time_zone; + long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone; + long int abs_time_zone_hour = abs_time_zone / 60; + int abs_time_zone_min = abs_time_zone % 60; + char tz1buf[sizeof "XXX+0:00" + + sizeof pc.time_zone * CHAR_BIT / 3]; + if (!tz_was_altered) + tz0 = get_tz (tz0buf); + sprintf (tz1buf, "XXX%s%ld:%02d", &"-"[time_zone < 0], + abs_time_zone_hour, abs_time_zone_min); + if (setenv ("TZ", tz1buf, 1) != 0) + goto fail; + tz_was_altered = true; + tm = tm0; + Start = mktime (&tm); + if (! mktime_ok (&tm0, &tm, Start)) + goto fail; + } + } + + if (pc.days_seen && ! pc.dates_seen) + { + tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7 + + 7 * (pc.day_ordinal + - (0 < pc.day_ordinal + && tm.tm_wday != pc.day_number))); + tm.tm_isdst = -1; + Start = mktime (&tm); + if (Start == (time_t) -1) + goto fail; + } + + /* Add relative date. */ + if (pc.rel.year | pc.rel.month | pc.rel.day) + { + int year = tm.tm_year + pc.rel.year; + int month = tm.tm_mon + pc.rel.month; + int day = tm.tm_mday + pc.rel.day; + if (((year < tm.tm_year) ^ (pc.rel.year < 0)) + | ((month < tm.tm_mon) ^ (pc.rel.month < 0)) + | ((day < tm.tm_mday) ^ (pc.rel.day < 0))) + goto fail; + tm.tm_year = year; + tm.tm_mon = month; + tm.tm_mday = day; + tm.tm_hour = tm0.tm_hour; + tm.tm_min = tm0.tm_min; + tm.tm_sec = tm0.tm_sec; + tm.tm_isdst = tm0.tm_isdst; + Start = mktime (&tm); + if (Start == (time_t) -1) + goto fail; + } + + /* The only "output" of this if-block is an updated Start value, + so this block must follow others that clobber Start. */ + if (pc.zones_seen) + { + long int delta = pc.time_zone * 60; + time_t t1; +#ifdef HAVE_TM_GMTOFF + delta -= tm.tm_gmtoff; +#else + time_t t = Start; + struct tm const *gmt = gmtime (&t); + if (! gmt) + goto fail; + delta -= tm_diff (&tm, gmt); +#endif + t1 = Start - delta; + if ((Start < t1) != (delta < 0)) + goto fail; /* time_t overflow */ + Start = t1; + } + + /* Add relative hours, minutes, and seconds. On hosts that support + leap seconds, ignore the possibility of leap seconds; e.g., + "+ 10 minutes" adds 600 seconds, even if one of them is a + leap second. Typically this is not what the user wants, but it's + too hard to do it the other way, because the time zone indicator + must be applied before relative times, and if mktime is applied + again the time zone will be lost. */ + { + long int sum_ns = pc.seconds.tv_nsec + pc.rel.ns; + long int normalized_ns = (sum_ns % BILLION + BILLION) % BILLION; + time_t t0 = Start; + long int d1 = 60 * 60 * pc.rel.hour; + time_t t1 = t0 + d1; + long int d2 = 60 * pc.rel.minutes; + time_t t2 = t1 + d2; + long_time_t d3 = pc.rel.seconds; + long_time_t t3 = t2 + d3; + long int d4 = (sum_ns - normalized_ns) / BILLION; + long_time_t t4 = t3 + d4; + time_t t5 = t4; + + if ((d1 / (60 * 60) ^ pc.rel.hour) + | (d2 / 60 ^ pc.rel.minutes) + | ((t1 < t0) ^ (d1 < 0)) + | ((t2 < t1) ^ (d2 < 0)) + | ((t3 < t2) ^ (d3 < 0)) + | ((t4 < t3) ^ (d4 < 0)) + | (t5 != t4)) + goto fail; + + result->tv_sec = t5; + result->tv_nsec = normalized_ns; + } + } + + goto done; + + fail: + ok = false; + done: + if (tz_was_altered) + ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0; + if (tz0 != tz0buf) + free (tz0); + return ok; +} + +#if TEST + +int +main (int ac, char **av) +{ + char buff[BUFSIZ]; + + printf ("Enter date, or blank line to exit.\n\t> "); + fflush (stdout); + + buff[BUFSIZ - 1] = '\0'; + while (fgets (buff, BUFSIZ - 1, stdin) && buff[0]) + { + struct timespec d; + struct tm const *tm; + if (! parse_datetime (&d, buff, NULL)) + printf ("Bad format - couldn't convert.\n"); + else if (! (tm = localtime (&d.tv_sec))) + { + long int sec = d.tv_sec; + printf ("localtime (%ld) failed\n", sec); + } + else + { + int ns = d.tv_nsec; + printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n", + tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec, ns); + } + printf ("\t> "); + fflush (stdout); + } + return 0; +} +#endif /* TEST */ diff --git a/gl/lib/pathmax.h b/gl/lib/pathmax.h new file mode 100644 index 0000000..33fc355 --- /dev/null +++ b/gl/lib/pathmax.h @@ -0,0 +1,83 @@ +/* Define PATH_MAX somehow. Requires sys/types.h. + Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2014 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _PATHMAX_H +# define _PATHMAX_H + +/* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename, + including the terminating NUL byte. + + PATH_MAX is not defined on systems which have no limit on filename length, + such as GNU/Hurd. + + This file does *not* define PATH_MAX always. Programs that use this file + can handle the GNU/Hurd case in several ways: + - Either with a package-wide handling, or with a per-file handling, + - Either through a + #ifdef PATH_MAX + or through a fallback like + #ifndef PATH_MAX + # define PATH_MAX 8192 + #endif + or through a fallback like + #ifndef PATH_MAX + # define PATH_MAX pathconf ("/", _PC_PATH_MAX) + #endif + */ + +# include + +# include + +# ifndef _POSIX_PATH_MAX +# define _POSIX_PATH_MAX 256 +# endif + +/* Don't include sys/param.h if it already has been. */ +# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN +# include +# endif + +# if !defined PATH_MAX && defined MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# endif + +# ifdef __hpux +/* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename, + *not* including the terminating NUL byte, and is set to 1023. + Additionally, when _XOPEN_SOURCE is defined to 500 or more, PATH_MAX is + not defined at all any more. */ +# undef PATH_MAX +# define PATH_MAX 1024 +# endif + +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com, + section "Maximum Path Length Limitation", + + explains that the maximum size of a filename, including the terminating + NUL byte, is 260 = 3 + 256 + 1. + This is the same value as + - FILENAME_MAX in , + - _MAX_PATH in , + - MAX_PATH in . + Undefine the original value, because mingw's gets it wrong. */ +# undef PATH_MAX +# define PATH_MAX 260 +# endif + +#endif /* _PATHMAX_H */ diff --git a/gl/lib/perror.c b/gl/lib/perror.c new file mode 100644 index 0000000..c0548c9 --- /dev/null +++ b/gl/lib/perror.c @@ -0,0 +1,49 @@ +/* Print a message describing error code. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + Written by Bruno Haible and Simon Josefsson. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include + +#include "strerror-override.h" + +/* Use the system functions, not the gnulib overrides in this file. */ +#undef fprintf + +void +perror (const char *string) +{ + char stackbuf[STACKBUF_LEN]; + int ret; + + /* Our implementation guarantees that this will be a non-empty + string, even if it returns EINVAL; and stackbuf should be sized + large enough to avoid ERANGE. */ + ret = strerror_r (errno, stackbuf, sizeof stackbuf); + if (ret == ERANGE) + abort (); + + if (string != NULL && *string != '\0') + fprintf (stderr, "%s: %s\n", string, stackbuf); + else + fprintf (stderr, "%s\n", stackbuf); +} diff --git a/gl/lib/pipe-safer.c b/gl/lib/pipe-safer.c new file mode 100644 index 0000000..70fb40f --- /dev/null +++ b/gl/lib/pipe-safer.c @@ -0,0 +1,56 @@ +/* Invoke pipe, but avoid some glitches. + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +#include "unistd-safer.h" + +#include +#include + +/* Like pipe, but ensure that neither of the file descriptors is + STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. Fail with ENOSYS on + platforms that lack pipe. */ + +int +pipe_safer (int fd[2]) +{ +#if HAVE_PIPE + if (pipe (fd) == 0) + { + int i; + for (i = 0; i < 2; i++) + { + fd[i] = fd_safer (fd[i]); + if (fd[i] < 0) + { + int e = errno; + close (fd[1 - i]); + errno = e; + return -1; + } + } + + return 0; + } +#else + errno = ENOSYS; +#endif + + return -1; +} diff --git a/gl/lib/printf-args.c b/gl/lib/printf-args.c new file mode 100644 index 0000000..39cd0a4 --- /dev/null +++ b/gl/lib/printf-args.c @@ -0,0 +1,187 @@ +/* Decomposed printf argument list. + Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2014 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +/* This file can be parametrized with the following macros: + ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. + PRINTF_FETCHARGS Name of the function to be defined. + STATIC Set to 'static' to declare the function static. */ + +#ifndef PRINTF_FETCHARGS +# include +#endif + +/* Specification. */ +#ifndef PRINTF_FETCHARGS +# include "printf-args.h" +#endif + +#ifdef STATIC +STATIC +#endif +int +PRINTF_FETCHARGS (va_list args, arguments *a) +{ + size_t i; + argument *ap; + + for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) + switch (ap->type) + { + case TYPE_SCHAR: + ap->a.a_schar = va_arg (args, /*signed char*/ int); + break; + case TYPE_UCHAR: + ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); + break; + case TYPE_SHORT: + ap->a.a_short = va_arg (args, /*short*/ int); + break; + case TYPE_USHORT: + ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); + break; + case TYPE_INT: + ap->a.a_int = va_arg (args, int); + break; + case TYPE_UINT: + ap->a.a_uint = va_arg (args, unsigned int); + break; + case TYPE_LONGINT: + ap->a.a_longint = va_arg (args, long int); + break; + case TYPE_ULONGINT: + ap->a.a_ulongint = va_arg (args, unsigned long int); + break; +#if HAVE_LONG_LONG_INT + case TYPE_LONGLONGINT: + ap->a.a_longlongint = va_arg (args, long long int); + break; + case TYPE_ULONGLONGINT: + ap->a.a_ulonglongint = va_arg (args, unsigned long long int); + break; +#endif + case TYPE_DOUBLE: + ap->a.a_double = va_arg (args, double); + break; + case TYPE_LONGDOUBLE: + ap->a.a_longdouble = va_arg (args, long double); + break; + case TYPE_CHAR: + ap->a.a_char = va_arg (args, int); + break; +#if HAVE_WINT_T + case TYPE_WIDE_CHAR: + /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by + default argument promotions", this is not the case in mingw32, + where wint_t is 'unsigned short'. */ + ap->a.a_wide_char = + (sizeof (wint_t) < sizeof (int) + ? (wint_t) va_arg (args, int) + : va_arg (args, wint_t)); + break; +#endif + case TYPE_STRING: + ap->a.a_string = va_arg (args, const char *); + /* A null pointer is an invalid argument for "%s", but in practice + it occurs quite frequently in printf statements that produce + debug output. Use a fallback in this case. */ + if (ap->a.a_string == NULL) + ap->a.a_string = "(NULL)"; + break; +#if HAVE_WCHAR_T + case TYPE_WIDE_STRING: + ap->a.a_wide_string = va_arg (args, const wchar_t *); + /* A null pointer is an invalid argument for "%ls", but in practice + it occurs quite frequently in printf statements that produce + debug output. Use a fallback in this case. */ + if (ap->a.a_wide_string == NULL) + { + static const wchar_t wide_null_string[] = + { + (wchar_t)'(', + (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', + (wchar_t)')', + (wchar_t)0 + }; + ap->a.a_wide_string = wide_null_string; + } + break; +#endif + case TYPE_POINTER: + ap->a.a_pointer = va_arg (args, void *); + break; + case TYPE_COUNT_SCHAR_POINTER: + ap->a.a_count_schar_pointer = va_arg (args, signed char *); + break; + case TYPE_COUNT_SHORT_POINTER: + ap->a.a_count_short_pointer = va_arg (args, short *); + break; + case TYPE_COUNT_INT_POINTER: + ap->a.a_count_int_pointer = va_arg (args, int *); + break; + case TYPE_COUNT_LONGINT_POINTER: + ap->a.a_count_longint_pointer = va_arg (args, long int *); + break; +#if HAVE_LONG_LONG_INT + case TYPE_COUNT_LONGLONGINT_POINTER: + ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); + break; +#endif +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ + case TYPE_U8_STRING: + ap->a.a_u8_string = va_arg (args, const uint8_t *); + /* A null pointer is an invalid argument for "%U", but in practice + it occurs quite frequently in printf statements that produce + debug output. Use a fallback in this case. */ + if (ap->a.a_u8_string == NULL) + { + static const uint8_t u8_null_string[] = + { '(', 'N', 'U', 'L', 'L', ')', 0 }; + ap->a.a_u8_string = u8_null_string; + } + break; + case TYPE_U16_STRING: + ap->a.a_u16_string = va_arg (args, const uint16_t *); + /* A null pointer is an invalid argument for "%lU", but in practice + it occurs quite frequently in printf statements that produce + debug output. Use a fallback in this case. */ + if (ap->a.a_u16_string == NULL) + { + static const uint16_t u16_null_string[] = + { '(', 'N', 'U', 'L', 'L', ')', 0 }; + ap->a.a_u16_string = u16_null_string; + } + break; + case TYPE_U32_STRING: + ap->a.a_u32_string = va_arg (args, const uint32_t *); + /* A null pointer is an invalid argument for "%llU", but in practice + it occurs quite frequently in printf statements that produce + debug output. Use a fallback in this case. */ + if (ap->a.a_u32_string == NULL) + { + static const uint32_t u32_null_string[] = + { '(', 'N', 'U', 'L', 'L', ')', 0 }; + ap->a.a_u32_string = u32_null_string; + } + break; +#endif + default: + /* Unknown type. */ + return -1; + } + return 0; +} diff --git a/gl/lib/printf-args.h b/gl/lib/printf-args.h new file mode 100644 index 0000000..9364eed --- /dev/null +++ b/gl/lib/printf-args.h @@ -0,0 +1,158 @@ +/* Decomposed printf argument list. + Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2014 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#ifndef _PRINTF_ARGS_H +#define _PRINTF_ARGS_H + +/* This file can be parametrized with the following macros: + ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. + PRINTF_FETCHARGS Name of the function to be declared. + STATIC Set to 'static' to declare the function static. */ + +/* Default parameters. */ +#ifndef PRINTF_FETCHARGS +# define PRINTF_FETCHARGS printf_fetchargs +#endif + +/* Get size_t. */ +#include + +/* Get wchar_t. */ +#if HAVE_WCHAR_T +# include +#endif + +/* Get wint_t. */ +#if HAVE_WINT_T +# include +#endif + +/* Get va_list. */ +#include + + +/* Argument types */ +typedef enum +{ + TYPE_NONE, + TYPE_SCHAR, + TYPE_UCHAR, + TYPE_SHORT, + TYPE_USHORT, + TYPE_INT, + TYPE_UINT, + TYPE_LONGINT, + TYPE_ULONGINT, +#if HAVE_LONG_LONG_INT + TYPE_LONGLONGINT, + TYPE_ULONGLONGINT, +#endif + TYPE_DOUBLE, + TYPE_LONGDOUBLE, + TYPE_CHAR, +#if HAVE_WINT_T + TYPE_WIDE_CHAR, +#endif + TYPE_STRING, +#if HAVE_WCHAR_T + TYPE_WIDE_STRING, +#endif + TYPE_POINTER, + TYPE_COUNT_SCHAR_POINTER, + TYPE_COUNT_SHORT_POINTER, + TYPE_COUNT_INT_POINTER, + TYPE_COUNT_LONGINT_POINTER +#if HAVE_LONG_LONG_INT +, TYPE_COUNT_LONGLONGINT_POINTER +#endif +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ +, TYPE_U8_STRING +, TYPE_U16_STRING +, TYPE_U32_STRING +#endif +} arg_type; + +/* Polymorphic argument */ +typedef struct +{ + arg_type type; + union + { + signed char a_schar; + unsigned char a_uchar; + short a_short; + unsigned short a_ushort; + int a_int; + unsigned int a_uint; + long int a_longint; + unsigned long int a_ulongint; +#if HAVE_LONG_LONG_INT + long long int a_longlongint; + unsigned long long int a_ulonglongint; +#endif + float a_float; + double a_double; + long double a_longdouble; + int a_char; +#if HAVE_WINT_T + wint_t a_wide_char; +#endif + const char* a_string; +#if HAVE_WCHAR_T + const wchar_t* a_wide_string; +#endif + void* a_pointer; + signed char * a_count_schar_pointer; + short * a_count_short_pointer; + int * a_count_int_pointer; + long int * a_count_longint_pointer; +#if HAVE_LONG_LONG_INT + long long int * a_count_longlongint_pointer; +#endif +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ + const uint8_t * a_u8_string; + const uint16_t * a_u16_string; + const uint32_t * a_u32_string; +#endif + } + a; +} +argument; + +/* Number of directly allocated arguments (no malloc() needed). */ +#define N_DIRECT_ALLOC_ARGUMENTS 7 + +typedef struct +{ + size_t count; + argument *arg; + argument direct_alloc_arg[N_DIRECT_ALLOC_ARGUMENTS]; +} +arguments; + + +/* Fetch the arguments, putting them into a. */ +#ifdef STATIC +STATIC +#else +extern +#endif +int PRINTF_FETCHARGS (va_list args, arguments *a); + +#endif /* _PRINTF_ARGS_H */ diff --git a/gl/lib/printf-parse.c b/gl/lib/printf-parse.c new file mode 100644 index 0000000..131d0f0 --- /dev/null +++ b/gl/lib/printf-parse.c @@ -0,0 +1,638 @@ +/* Formatted output to strings. + Copyright (C) 1999-2000, 2002-2003, 2006-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +/* This file can be parametrized with the following macros: + CHAR_T The element type of the format string. + CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters + in the format string are ASCII. + DIRECTIVE Structure denoting a format directive. + Depends on CHAR_T. + DIRECTIVES Structure denoting the set of format directives of a + format string. Depends on CHAR_T. + PRINTF_PARSE Function that parses a format string. + Depends on CHAR_T. + STATIC Set to 'static' to declare the function static. + ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ + +#ifndef PRINTF_PARSE +# include +#endif + +/* Specification. */ +#ifndef PRINTF_PARSE +# include "printf-parse.h" +#endif + +/* Default parameters. */ +#ifndef PRINTF_PARSE +# define PRINTF_PARSE printf_parse +# define CHAR_T char +# define DIRECTIVE char_directive +# define DIRECTIVES char_directives +#endif + +/* Get size_t, NULL. */ +#include + +/* Get intmax_t. */ +#if defined IN_LIBINTL || defined IN_LIBASPRINTF +# if HAVE_STDINT_H_WITH_UINTMAX +# include +# endif +# if HAVE_INTTYPES_H_WITH_UINTMAX +# include +# endif +#else +# include +#endif + +/* malloc(), realloc(), free(). */ +#include + +/* memcpy(). */ +#include + +/* errno. */ +#include + +/* Checked size_t computations. */ +#include "xsize.h" + +#if CHAR_T_ONLY_ASCII +/* c_isascii(). */ +# include "c-ctype.h" +#endif + +#ifdef STATIC +STATIC +#endif +int +PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) +{ + const CHAR_T *cp = format; /* pointer into format */ + size_t arg_posn = 0; /* number of regular arguments consumed */ + size_t d_allocated; /* allocated elements of d->dir */ + size_t a_allocated; /* allocated elements of a->arg */ + size_t max_width_length = 0; + size_t max_precision_length = 0; + + d->count = 0; + d_allocated = N_DIRECT_ALLOC_DIRECTIVES; + d->dir = d->direct_alloc_dir; + + a->count = 0; + a_allocated = N_DIRECT_ALLOC_ARGUMENTS; + a->arg = a->direct_alloc_arg; + +#define REGISTER_ARG(_index_,_type_) \ + { \ + size_t n = (_index_); \ + if (n >= a_allocated) \ + { \ + size_t memory_size; \ + argument *memory; \ + \ + a_allocated = xtimes (a_allocated, 2); \ + if (a_allocated <= n) \ + a_allocated = xsum (n, 1); \ + memory_size = xtimes (a_allocated, sizeof (argument)); \ + if (size_overflow_p (memory_size)) \ + /* Overflow, would lead to out of memory. */ \ + goto out_of_memory; \ + memory = (argument *) (a->arg != a->direct_alloc_arg \ + ? realloc (a->arg, memory_size) \ + : malloc (memory_size)); \ + if (memory == NULL) \ + /* Out of memory. */ \ + goto out_of_memory; \ + if (a->arg == a->direct_alloc_arg) \ + memcpy (memory, a->arg, a->count * sizeof (argument)); \ + a->arg = memory; \ + } \ + while (a->count <= n) \ + a->arg[a->count++].type = TYPE_NONE; \ + if (a->arg[n].type == TYPE_NONE) \ + a->arg[n].type = (_type_); \ + else if (a->arg[n].type != (_type_)) \ + /* Ambiguous type for positional argument. */ \ + goto error; \ + } + + while (*cp != '\0') + { + CHAR_T c = *cp++; + if (c == '%') + { + size_t arg_index = ARG_NONE; + DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ + + /* Initialize the next directive. */ + dp->dir_start = cp - 1; + dp->flags = 0; + dp->width_start = NULL; + dp->width_end = NULL; + dp->width_arg_index = ARG_NONE; + dp->precision_start = NULL; + dp->precision_end = NULL; + dp->precision_arg_index = ARG_NONE; + dp->arg_index = ARG_NONE; + + /* Test for positional argument. */ + if (*cp >= '0' && *cp <= '9') + { + const CHAR_T *np; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + ; + if (*np == '$') + { + size_t n = 0; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + n = xsum (xtimes (n, 10), *np - '0'); + if (n == 0) + /* Positional argument 0. */ + goto error; + if (size_overflow_p (n)) + /* n too large, would lead to out of memory later. */ + goto error; + arg_index = n - 1; + cp = np + 1; + } + } + + /* Read the flags. */ + for (;;) + { + if (*cp == '\'') + { + dp->flags |= FLAG_GROUP; + cp++; + } + else if (*cp == '-') + { + dp->flags |= FLAG_LEFT; + cp++; + } + else if (*cp == '+') + { + dp->flags |= FLAG_SHOWSIGN; + cp++; + } + else if (*cp == ' ') + { + dp->flags |= FLAG_SPACE; + cp++; + } + else if (*cp == '#') + { + dp->flags |= FLAG_ALT; + cp++; + } + else if (*cp == '0') + { + dp->flags |= FLAG_ZERO; + cp++; + } +#if __GLIBC__ >= 2 && !defined __UCLIBC__ + else if (*cp == 'I') + { + dp->flags |= FLAG_LOCALIZED; + cp++; + } +#endif + else + break; + } + + /* Parse the field width. */ + if (*cp == '*') + { + dp->width_start = cp; + cp++; + dp->width_end = cp; + if (max_width_length < 1) + max_width_length = 1; + + /* Test for positional argument. */ + if (*cp >= '0' && *cp <= '9') + { + const CHAR_T *np; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + ; + if (*np == '$') + { + size_t n = 0; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + n = xsum (xtimes (n, 10), *np - '0'); + if (n == 0) + /* Positional argument 0. */ + goto error; + if (size_overflow_p (n)) + /* n too large, would lead to out of memory later. */ + goto error; + dp->width_arg_index = n - 1; + cp = np + 1; + } + } + if (dp->width_arg_index == ARG_NONE) + { + dp->width_arg_index = arg_posn++; + if (dp->width_arg_index == ARG_NONE) + /* arg_posn wrapped around. */ + goto error; + } + REGISTER_ARG (dp->width_arg_index, TYPE_INT); + } + else if (*cp >= '0' && *cp <= '9') + { + size_t width_length; + + dp->width_start = cp; + for (; *cp >= '0' && *cp <= '9'; cp++) + ; + dp->width_end = cp; + width_length = dp->width_end - dp->width_start; + if (max_width_length < width_length) + max_width_length = width_length; + } + + /* Parse the precision. */ + if (*cp == '.') + { + cp++; + if (*cp == '*') + { + dp->precision_start = cp - 1; + cp++; + dp->precision_end = cp; + if (max_precision_length < 2) + max_precision_length = 2; + + /* Test for positional argument. */ + if (*cp >= '0' && *cp <= '9') + { + const CHAR_T *np; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + ; + if (*np == '$') + { + size_t n = 0; + + for (np = cp; *np >= '0' && *np <= '9'; np++) + n = xsum (xtimes (n, 10), *np - '0'); + if (n == 0) + /* Positional argument 0. */ + goto error; + if (size_overflow_p (n)) + /* n too large, would lead to out of memory + later. */ + goto error; + dp->precision_arg_index = n - 1; + cp = np + 1; + } + } + if (dp->precision_arg_index == ARG_NONE) + { + dp->precision_arg_index = arg_posn++; + if (dp->precision_arg_index == ARG_NONE) + /* arg_posn wrapped around. */ + goto error; + } + REGISTER_ARG (dp->precision_arg_index, TYPE_INT); + } + else + { + size_t precision_length; + + dp->precision_start = cp - 1; + for (; *cp >= '0' && *cp <= '9'; cp++) + ; + dp->precision_end = cp; + precision_length = dp->precision_end - dp->precision_start; + if (max_precision_length < precision_length) + max_precision_length = precision_length; + } + } + + { + arg_type type; + + /* Parse argument type/size specifiers. */ + { + int flags = 0; + + for (;;) + { + if (*cp == 'h') + { + flags |= (1 << (flags & 1)); + cp++; + } + else if (*cp == 'L') + { + flags |= 4; + cp++; + } + else if (*cp == 'l') + { + flags += 8; + cp++; + } + else if (*cp == 'j') + { + if (sizeof (intmax_t) > sizeof (long)) + { + /* intmax_t = long long */ + flags += 16; + } + else if (sizeof (intmax_t) > sizeof (int)) + { + /* intmax_t = long */ + flags += 8; + } + cp++; + } + else if (*cp == 'z' || *cp == 'Z') + { + /* 'z' is standardized in ISO C 99, but glibc uses 'Z' + because the warning facility in gcc-2.95.2 understands + only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ + if (sizeof (size_t) > sizeof (long)) + { + /* size_t = long long */ + flags += 16; + } + else if (sizeof (size_t) > sizeof (int)) + { + /* size_t = long */ + flags += 8; + } + cp++; + } + else if (*cp == 't') + { + if (sizeof (ptrdiff_t) > sizeof (long)) + { + /* ptrdiff_t = long long */ + flags += 16; + } + else if (sizeof (ptrdiff_t) > sizeof (int)) + { + /* ptrdiff_t = long */ + flags += 8; + } + cp++; + } +#if defined __APPLE__ && defined __MACH__ + /* 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') + { + if (64 / 8 > sizeof (long)) + { + /* int64_t = long long */ + flags += 16; + } + else + { + /* int64_t = long */ + flags += 8; + } + cp++; + } +#endif +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* On native Windows, PRIdMAX is defined as "I64d". + We cannot change it to "lld" because PRIdMAX must also + be understood by the system's printf routines. */ + else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') + { + if (64 / 8 > sizeof (long)) + { + /* __int64 = long long */ + flags += 16; + } + else + { + /* __int64 = long */ + flags += 8; + } + cp += 3; + } +#endif + else + break; + } + + /* Read the conversion character. */ + c = *cp++; + switch (c) + { + case 'd': case 'i': +#if HAVE_LONG_LONG_INT + /* If 'long long' exists and is larger than 'long': */ + if (flags >= 16 || (flags & 4)) + type = TYPE_LONGLONGINT; + else +#endif + /* If 'long long' exists and is the same as 'long', we parse + "lld" into TYPE_LONGINT. */ + if (flags >= 8) + type = TYPE_LONGINT; + else if (flags & 2) + type = TYPE_SCHAR; + else if (flags & 1) + type = TYPE_SHORT; + else + type = TYPE_INT; + break; + case 'o': case 'u': case 'x': case 'X': +#if HAVE_LONG_LONG_INT + /* If 'long long' exists and is larger than 'long': */ + if (flags >= 16 || (flags & 4)) + type = TYPE_ULONGLONGINT; + else +#endif + /* If 'unsigned long long' exists and is the same as + 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ + if (flags >= 8) + type = TYPE_ULONGINT; + else if (flags & 2) + type = TYPE_UCHAR; + else if (flags & 1) + type = TYPE_USHORT; + else + type = TYPE_UINT; + break; + case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': + case 'a': case 'A': + if (flags >= 16 || (flags & 4)) + type = TYPE_LONGDOUBLE; + else + type = TYPE_DOUBLE; + break; + case 'c': + if (flags >= 8) +#if HAVE_WINT_T + type = TYPE_WIDE_CHAR; +#else + goto error; +#endif + else + type = TYPE_CHAR; + break; +#if HAVE_WINT_T + case 'C': + type = TYPE_WIDE_CHAR; + c = 'c'; + break; +#endif + case 's': + if (flags >= 8) +#if HAVE_WCHAR_T + type = TYPE_WIDE_STRING; +#else + goto error; +#endif + else + type = TYPE_STRING; + break; +#if HAVE_WCHAR_T + case 'S': + type = TYPE_WIDE_STRING; + c = 's'; + break; +#endif + case 'p': + type = TYPE_POINTER; + break; + case 'n': +#if HAVE_LONG_LONG_INT + /* If 'long long' exists and is larger than 'long': */ + if (flags >= 16 || (flags & 4)) + type = TYPE_COUNT_LONGLONGINT_POINTER; + else +#endif + /* If 'long long' exists and is the same as 'long', we parse + "lln" into TYPE_COUNT_LONGINT_POINTER. */ + if (flags >= 8) + type = TYPE_COUNT_LONGINT_POINTER; + else if (flags & 2) + type = TYPE_COUNT_SCHAR_POINTER; + else if (flags & 1) + type = TYPE_COUNT_SHORT_POINTER; + else + type = TYPE_COUNT_INT_POINTER; + break; +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ + case 'U': + if (flags >= 16) + type = TYPE_U32_STRING; + else if (flags >= 8) + type = TYPE_U16_STRING; + else + type = TYPE_U8_STRING; + break; +#endif + case '%': + type = TYPE_NONE; + break; + default: + /* Unknown conversion character. */ + goto error; + } + } + + if (type != TYPE_NONE) + { + dp->arg_index = arg_index; + if (dp->arg_index == ARG_NONE) + { + dp->arg_index = arg_posn++; + if (dp->arg_index == ARG_NONE) + /* arg_posn wrapped around. */ + goto error; + } + REGISTER_ARG (dp->arg_index, type); + } + dp->conversion = c; + dp->dir_end = cp; + } + + d->count++; + if (d->count >= d_allocated) + { + size_t memory_size; + DIRECTIVE *memory; + + d_allocated = xtimes (d_allocated, 2); + memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); + if (size_overflow_p (memory_size)) + /* Overflow, would lead to out of memory. */ + goto out_of_memory; + memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir + ? realloc (d->dir, memory_size) + : malloc (memory_size)); + if (memory == NULL) + /* Out of memory. */ + goto out_of_memory; + if (d->dir == d->direct_alloc_dir) + memcpy (memory, d->dir, d->count * sizeof (DIRECTIVE)); + d->dir = memory; + } + } +#if CHAR_T_ONLY_ASCII + else if (!c_isascii (c)) + { + /* Non-ASCII character. Not supported. */ + goto error; + } +#endif + } + d->dir[d->count].dir_start = cp; + + d->max_width_length = max_width_length; + d->max_precision_length = max_precision_length; + return 0; + +error: + if (a->arg != a->direct_alloc_arg) + free (a->arg); + if (d->dir != d->direct_alloc_dir) + free (d->dir); + errno = EINVAL; + return -1; + +out_of_memory: + if (a->arg != a->direct_alloc_arg) + free (a->arg); + if (d->dir != d->direct_alloc_dir) + free (d->dir); + errno = ENOMEM; + return -1; +} + +#undef PRINTF_PARSE +#undef DIRECTIVES +#undef DIRECTIVE +#undef CHAR_T_ONLY_ASCII +#undef CHAR_T diff --git a/gl/lib/printf-parse.h b/gl/lib/printf-parse.h new file mode 100644 index 0000000..2651195 --- /dev/null +++ b/gl/lib/printf-parse.h @@ -0,0 +1,193 @@ +/* Parse printf format string. + Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2014 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#ifndef _PRINTF_PARSE_H +#define _PRINTF_PARSE_H + +/* This file can be parametrized with the following macros: + ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. + STATIC Set to 'static' to declare the function static. */ + +#if HAVE_FEATURES_H +# include /* for __GLIBC__, __UCLIBC__ */ +#endif + +#include "printf-args.h" + + +/* Flags */ +#define FLAG_GROUP 1 /* ' flag */ +#define FLAG_LEFT 2 /* - flag */ +#define FLAG_SHOWSIGN 4 /* + flag */ +#define FLAG_SPACE 8 /* space flag */ +#define FLAG_ALT 16 /* # flag */ +#define FLAG_ZERO 32 +#if __GLIBC__ >= 2 && !defined __UCLIBC__ +# define FLAG_LOCALIZED 64 /* I flag, uses localized digits */ +#endif + +/* arg_index value indicating that no argument is consumed. */ +#define ARG_NONE (~(size_t)0) + +/* xxx_directive: A parsed directive. + xxx_directives: A parsed format string. */ + +/* Number of directly allocated directives (no malloc() needed). */ +#define N_DIRECT_ALLOC_DIRECTIVES 7 + +/* A parsed directive. */ +typedef struct +{ + const char* dir_start; + const char* dir_end; + int flags; + const char* width_start; + const char* width_end; + size_t width_arg_index; + const char* precision_start; + const char* precision_end; + size_t precision_arg_index; + char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ + size_t arg_index; +} +char_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + char_directive *dir; + size_t max_width_length; + size_t max_precision_length; + char_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; +} +char_directives; + +#if ENABLE_UNISTDIO + +/* A parsed directive. */ +typedef struct +{ + const uint8_t* dir_start; + const uint8_t* dir_end; + int flags; + const uint8_t* width_start; + const uint8_t* width_end; + size_t width_arg_index; + const uint8_t* precision_start; + const uint8_t* precision_end; + size_t precision_arg_index; + uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ + size_t arg_index; +} +u8_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + u8_directive *dir; + size_t max_width_length; + size_t max_precision_length; + u8_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; +} +u8_directives; + +/* A parsed directive. */ +typedef struct +{ + const uint16_t* dir_start; + const uint16_t* dir_end; + int flags; + const uint16_t* width_start; + const uint16_t* width_end; + size_t width_arg_index; + const uint16_t* precision_start; + const uint16_t* precision_end; + size_t precision_arg_index; + uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ + size_t arg_index; +} +u16_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + u16_directive *dir; + size_t max_width_length; + size_t max_precision_length; + u16_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; +} +u16_directives; + +/* A parsed directive. */ +typedef struct +{ + const uint32_t* dir_start; + const uint32_t* dir_end; + int flags; + const uint32_t* width_start; + const uint32_t* width_end; + size_t width_arg_index; + const uint32_t* precision_start; + const uint32_t* precision_end; + size_t precision_arg_index; + uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ + size_t arg_index; +} +u32_directive; + +/* A parsed format string. */ +typedef struct +{ + size_t count; + u32_directive *dir; + size_t max_width_length; + size_t max_precision_length; + u32_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; +} +u32_directives; + +#endif + + +/* Parses the format string. Fills in the number N of directives, and fills + in directives[0], ..., directives[N-1], and sets directives[N].dir_start + to the end of the format string. Also fills in the arg_type fields of the + arguments and the needed count of arguments. */ +#if ENABLE_UNISTDIO +extern int + ulc_printf_parse (const char *format, char_directives *d, arguments *a); +extern int + u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a); +extern int + u16_printf_parse (const uint16_t *format, u16_directives *d, + arguments *a); +extern int + u32_printf_parse (const uint32_t *format, u32_directives *d, + arguments *a); +#else +# ifdef STATIC +STATIC +# else +extern +# endif +int printf_parse (const char *format, char_directives *d, arguments *a); +#endif + +#endif /* _PRINTF_PARSE_H */ diff --git a/gl/lib/progname.c b/gl/lib/progname.c new file mode 100644 index 0000000..2919be9 --- /dev/null +++ b/gl/lib/progname.c @@ -0,0 +1,92 @@ +/* Program name management. + Copyright (C) 2001-2003, 2005-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2001. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + +#include + +/* Specification. */ +#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */ +#include "progname.h" + +#include /* get program_invocation_name declaration */ +#include +#include +#include + + +/* String containing name the program is called with. + To be initialized by main(). */ +const char *program_name = NULL; + +/* Set program_name, based on argv[0]. + argv0 must be a string allocated with indefinite extent, and must not be + modified after this call. */ +void +set_program_name (const char *argv0) +{ + /* libtool creates a temporary executable whose name is sometimes prefixed + with "lt-" (depends on the platform). It also makes argv[0] absolute. + But the name of the temporary executable is a detail that should not be + visible to the end user and to the test suite. + Remove this "/.libs/" or "/.libs/lt-" prefix here. */ + const char *slash; + const char *base; + + /* Sanity check. POSIX requires the invoking process to pass a non-NULL + argv[0]. */ + if (argv0 == NULL) + { + /* It's a bug in the invoking program. Help diagnosing it. */ + fputs ("A NULL argv[0] was passed through an exec system call.\n", + stderr); + abort (); + } + + slash = strrchr (argv0, '/'); + base = (slash != NULL ? slash + 1 : argv0); + if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0) + { + argv0 = base; + if (strncmp (base, "lt-", 3) == 0) + { + argv0 = base + 3; + /* On glibc systems, remove the "lt-" prefix from the variable + program_invocation_short_name. */ +#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME + program_invocation_short_name = (char *) argv0; +#endif + } + } + + /* But don't strip off a leading / in general, because when the user + runs + /some/hidden/place/bin/cp foo foo + he should get the error message + /some/hidden/place/bin/cp: `foo' and `foo' are the same file + not + cp: `foo' and `foo' are the same file + */ + + program_name = argv0; + + /* On glibc systems, the error() function comes from libc and uses the + variable program_invocation_name, not program_name. So set this variable + as well. */ +#if HAVE_DECL_PROGRAM_INVOCATION_NAME + program_invocation_name = (char *) argv0; +#endif +} diff --git a/gl/lib/progname.h b/gl/lib/progname.h new file mode 100644 index 0000000..fa15871 --- /dev/null +++ b/gl/lib/progname.h @@ -0,0 +1,62 @@ +/* Program name management. + Copyright (C) 2001-2004, 2006, 2009-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2001. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _PROGNAME_H +#define _PROGNAME_H + +/* Programs using this file should do the following in main(): + set_program_name (argv[0]); + */ + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* String containing name the program is called with. */ +extern const char *program_name; + +/* Set program_name, based on argv[0]. + argv0 must be a string allocated with indefinite extent, and must not be + modified after this call. */ +extern void set_program_name (const char *argv0); + +#if ENABLE_RELOCATABLE + +/* Set program_name, based on argv[0], and original installation prefix and + directory, for relocatability. */ +extern void set_program_name_and_installdir (const char *argv0, + const char *orig_installprefix, + const char *orig_installdir); +#undef set_program_name +#define set_program_name(ARG0) \ + set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR) + +/* Return the full pathname of the current executable, based on the earlier + call to set_program_name_and_installdir. Return NULL if unknown. */ +extern char *get_full_program_name (void); + +#endif + + +#ifdef __cplusplus +} +#endif + + +#endif /* _PROGNAME_H */ diff --git a/gl/lib/quote.h b/gl/lib/quote.h new file mode 100644 index 0000000..fb338a7 --- /dev/null +++ b/gl/lib/quote.h @@ -0,0 +1,46 @@ +/* quote.h - prototypes for quote.c + + Copyright (C) 1998-2001, 2003, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef QUOTE_H_ +# define QUOTE_H_ 1 + +# include + +/* The quoting options used by quote_n and quote. Its type is incomplete, + so it's useful only in expressions like '"e_quoting_options'. */ +extern struct quoting_options quote_quoting_options; + +/* Return an unambiguous printable representation of ARG (of size + ARGSIZE), allocated in slot N, suitable for diagnostics. If + ARGSIZE is SIZE_MAX, use the string length of the argument for + ARGSIZE. */ +char const *quote_n_mem (int n, char const *arg, size_t argsize); + +/* Return an unambiguous printable representation of ARG (of size + ARGSIZE), suitable for diagnostics. If ARGSIZE is SIZE_MAX, use + the string length of the argument for ARGSIZE. */ +char const *quote_mem (char const *arg, size_t argsize); + +/* Return an unambiguous printable representation of ARG, allocated in + slot N, suitable for diagnostics. */ +char const *quote_n (int n, char const *arg); + +/* Return an unambiguous printable representation of ARG, suitable for + diagnostics. */ +char const *quote (char const *arg); + +#endif /* !QUOTE_H_ */ diff --git a/gl/lib/quotearg.c b/gl/lib/quotearg.c new file mode 100644 index 0000000..bef7b98 --- /dev/null +++ b/gl/lib/quotearg.c @@ -0,0 +1,968 @@ +/* quotearg.c - quote arguments for output + + Copyright (C) 1998-2002, 2004-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert */ + +/* Without this pragma, gcc 4.7.0 20111124 mistakenly suggests that + the quoting_options_from_style function might be candidate for + attribute 'pure' */ +#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +#endif + +#include + +#include "quotearg.h" +#include "quote.h" + +#include "xalloc.h" +#include "c-strcaseeq.h" +#include "localcharset.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "gettext.h" +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid + +#ifndef SIZE_MAX +# define SIZE_MAX ((size_t) -1) +#endif + +#define INT_BITS (sizeof (int) * CHAR_BIT) + +struct quoting_options +{ + /* Basic quoting style. */ + enum quoting_style style; + + /* Additional flags. Bitwise combination of enum quoting_flags. */ + int flags; + + /* Quote the characters indicated by this bit vector even if the + quoting style would not normally require them to be quoted. */ + unsigned int quote_these_too[(UCHAR_MAX / INT_BITS) + 1]; + + /* The left quote for custom_quoting_style. */ + char const *left_quote; + + /* The right quote for custom_quoting_style. */ + char const *right_quote; +}; + +/* Names of quoting styles. */ +char const *const quoting_style_args[] = +{ + "literal", + "shell", + "shell-always", + "c", + "c-maybe", + "escape", + "locale", + "clocale", + 0 +}; + +/* Correspondences to quoting style names. */ +enum quoting_style const quoting_style_vals[] = +{ + literal_quoting_style, + shell_quoting_style, + shell_always_quoting_style, + c_quoting_style, + c_maybe_quoting_style, + escape_quoting_style, + locale_quoting_style, + clocale_quoting_style +}; + +/* The default quoting options. */ +static struct quoting_options default_quoting_options; + +/* Allocate a new set of quoting options, with contents initially identical + to O if O is not null, or to the default if O is null. + It is the caller's responsibility to free the result. */ +struct quoting_options * +clone_quoting_options (struct quoting_options *o) +{ + int e = errno; + struct quoting_options *p = xmemdup (o ? o : &default_quoting_options, + sizeof *o); + errno = e; + return p; +} + +/* Get the value of O's quoting style. If O is null, use the default. */ +enum quoting_style +get_quoting_style (struct quoting_options *o) +{ + return (o ? o : &default_quoting_options)->style; +} + +/* In O (or in the default if O is null), + set the value of the quoting style to S. */ +void +set_quoting_style (struct quoting_options *o, enum quoting_style s) +{ + (o ? o : &default_quoting_options)->style = s; +} + +/* In O (or in the default if O is null), + set the value of the quoting options for character C to I. + Return the old value. Currently, the only values defined for I are + 0 (the default) and 1 (which means to quote the character even if + it would not otherwise be quoted). */ +int +set_char_quoting (struct quoting_options *o, char c, int i) +{ + unsigned char uc = c; + unsigned int *p = + (o ? o : &default_quoting_options)->quote_these_too + uc / INT_BITS; + int shift = uc % INT_BITS; + int r = (*p >> shift) & 1; + *p ^= ((i & 1) ^ r) << shift; + return r; +} + +/* In O (or in the default if O is null), + set the value of the quoting options flag to I, which can be a + bitwise combination of enum quoting_flags, or 0 for default + behavior. Return the old value. */ +int +set_quoting_flags (struct quoting_options *o, int i) +{ + int r; + if (!o) + o = &default_quoting_options; + r = o->flags; + o->flags = i; + return r; +} + +void +set_custom_quoting (struct quoting_options *o, + char const *left_quote, char const *right_quote) +{ + if (!o) + o = &default_quoting_options; + o->style = custom_quoting_style; + if (!left_quote || !right_quote) + abort (); + o->left_quote = left_quote; + o->right_quote = right_quote; +} + +/* Return quoting options for STYLE, with no extra quoting. */ +static struct quoting_options /* NOT PURE!! */ +quoting_options_from_style (enum quoting_style style) +{ + struct quoting_options o = { literal_quoting_style, 0, { 0 }, NULL, NULL }; + if (style == custom_quoting_style) + abort (); + o.style = style; + return o; +} + +/* MSGID approximates a quotation mark. Return its translation if it + has one; otherwise, return either it or "\"", depending on S. + + S is either clocale_quoting_style or locale_quoting_style. */ +static char const * +gettext_quote (char const *msgid, enum quoting_style s) +{ + char const *translation = _(msgid); + char const *locale_code; + + if (translation != msgid) + return translation; + + /* For UTF-8 and GB-18030, use single quotes U+2018 and U+2019. + Here is a list of other locales that include U+2018 and U+2019: + + ISO-8859-7 0xA1 KOI8-T 0x91 + CP869 0x8B CP874 0x91 + CP932 0x81 0x65 CP936 0xA1 0xAE + CP949 0xA1 0xAE CP950 0xA1 0xA5 + CP1250 0x91 CP1251 0x91 + CP1252 0x91 CP1253 0x91 + CP1254 0x91 CP1255 0x91 + CP1256 0x91 CP1257 0x91 + EUC-JP 0xA1 0xC6 EUC-KR 0xA1 0xAE + EUC-TW 0xA1 0xE4 BIG5 0xA1 0xA5 + BIG5-HKSCS 0xA1 0xA5 EUC-CN 0xA1 0xAE + GBK 0xA1 0xAE Georgian-PS 0x91 + PT154 0x91 + + None of these is still in wide use; using iconv is overkill. */ + locale_code = locale_charset (); + if (STRCASEEQ (locale_code, "UTF-8", 'U','T','F','-','8',0,0,0,0)) + return msgid[0] == '`' ? "\xe2\x80\x98": "\xe2\x80\x99"; + if (STRCASEEQ (locale_code, "GB18030", 'G','B','1','8','0','3','0',0,0)) + return msgid[0] == '`' ? "\xa1\ae": "\xa1\xaf"; + + return (s == clocale_quoting_style ? "\"" : "'"); +} + +/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of + argument ARG (of size ARGSIZE), using QUOTING_STYLE, FLAGS, and + QUOTE_THESE_TOO to control quoting. + Terminate the output with a null character, and return the written + size of the output, not counting the terminating null. + If BUFFERSIZE is too small to store the output string, return the + value that would have been returned had BUFFERSIZE been large enough. + If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE. + + This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG, + ARGSIZE, O), except it breaks O into its component pieces and is + not careful about errno. */ + +static size_t +quotearg_buffer_restyled (char *buffer, size_t buffersize, + char const *arg, size_t argsize, + enum quoting_style quoting_style, int flags, + unsigned int const *quote_these_too, + char const *left_quote, + char const *right_quote) +{ + size_t i; + size_t len = 0; + char const *quote_string = 0; + size_t quote_string_len = 0; + bool backslash_escapes = false; + bool unibyte_locale = MB_CUR_MAX == 1; + bool elide_outer_quotes = (flags & QA_ELIDE_OUTER_QUOTES) != 0; + +#define STORE(c) \ + do \ + { \ + if (len < buffersize) \ + buffer[len] = (c); \ + len++; \ + } \ + while (0) + + switch (quoting_style) + { + case c_maybe_quoting_style: + quoting_style = c_quoting_style; + elide_outer_quotes = true; + /* Fall through. */ + case c_quoting_style: + if (!elide_outer_quotes) + STORE ('"'); + backslash_escapes = true; + quote_string = "\""; + quote_string_len = 1; + break; + + case escape_quoting_style: + backslash_escapes = true; + elide_outer_quotes = false; + break; + + case locale_quoting_style: + case clocale_quoting_style: + case custom_quoting_style: + { + if (quoting_style != custom_quoting_style) + { + /* TRANSLATORS: + Get translations for open and closing quotation marks. + The message catalog should translate "`" to a left + quotation mark suitable for the locale, and similarly for + "'". For example, a French Unicode local should translate + these to U+00AB (LEFT-POINTING DOUBLE ANGLE + QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE + QUOTATION MARK), respectively. + + If the catalog has no translation, we will try to + use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and + Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the + current locale is not Unicode, locale_quoting_style + will quote 'like this', and clocale_quoting_style will + quote "like this". You should always include translations + for "`" and "'" even if U+2018 and U+2019 are appropriate + for your locale. + + If you don't know what to put here, please see + + and use glyphs suitable for your language. */ + left_quote = gettext_quote (N_("`"), quoting_style); + right_quote = gettext_quote (N_("'"), quoting_style); + } + if (!elide_outer_quotes) + for (quote_string = left_quote; *quote_string; quote_string++) + STORE (*quote_string); + backslash_escapes = true; + quote_string = right_quote; + quote_string_len = strlen (quote_string); + } + break; + + case shell_quoting_style: + quoting_style = shell_always_quoting_style; + elide_outer_quotes = true; + /* Fall through. */ + case shell_always_quoting_style: + if (!elide_outer_quotes) + STORE ('\''); + quote_string = "'"; + quote_string_len = 1; + break; + + case literal_quoting_style: + elide_outer_quotes = false; + break; + + default: + abort (); + } + + for (i = 0; ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); i++) + { + unsigned char c; + unsigned char esc; + bool is_right_quote = false; + + if (backslash_escapes + && quote_string_len + && (i + quote_string_len + <= (argsize == SIZE_MAX && 1 < quote_string_len + /* Use strlen only if we must: when argsize is SIZE_MAX, + and when the quote string is more than 1 byte long. + If we do call strlen, save the result. */ + ? (argsize = strlen (arg)) : argsize)) + && memcmp (arg + i, quote_string, quote_string_len) == 0) + { + if (elide_outer_quotes) + goto force_outer_quoting_style; + is_right_quote = true; + } + + c = arg[i]; + switch (c) + { + case '\0': + if (backslash_escapes) + { + if (elide_outer_quotes) + goto force_outer_quoting_style; + STORE ('\\'); + /* If quote_string were to begin with digits, we'd need to + test for the end of the arg as well. However, it's + hard to imagine any locale that would use digits in + quotes, and set_custom_quoting is documented not to + accept them. */ + if (i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9') + { + STORE ('0'); + STORE ('0'); + } + c = '0'; + /* We don't have to worry that this last '0' will be + backslash-escaped because, again, quote_string should + not start with it and because quote_these_too is + documented as not accepting it. */ + } + else if (flags & QA_ELIDE_NULL_BYTES) + continue; + break; + + case '?': + switch (quoting_style) + { + case shell_always_quoting_style: + if (elide_outer_quotes) + goto force_outer_quoting_style; + break; + + case c_quoting_style: + if ((flags & QA_SPLIT_TRIGRAPHS) + && i + 2 < argsize && arg[i + 1] == '?') + switch (arg[i + 2]) + { + case '!': case '\'': + case '(': case ')': case '-': case '/': + case '<': case '=': case '>': + /* Escape the second '?' in what would otherwise be + a trigraph. */ + if (elide_outer_quotes) + goto force_outer_quoting_style; + c = arg[i + 2]; + i += 2; + STORE ('?'); + STORE ('"'); + STORE ('"'); + STORE ('?'); + break; + + default: + break; + } + break; + + default: + break; + } + break; + + case '\a': esc = 'a'; goto c_escape; + case '\b': esc = 'b'; goto c_escape; + case '\f': esc = 'f'; goto c_escape; + case '\n': esc = 'n'; goto c_and_shell_escape; + case '\r': esc = 'r'; goto c_and_shell_escape; + case '\t': esc = 't'; goto c_and_shell_escape; + case '\v': esc = 'v'; goto c_escape; + case '\\': esc = c; + /* No need to escape the escape if we are trying to elide + outer quotes and nothing else is problematic. */ + if (backslash_escapes && elide_outer_quotes && quote_string_len) + goto store_c; + + c_and_shell_escape: + if (quoting_style == shell_always_quoting_style + && elide_outer_quotes) + goto force_outer_quoting_style; + /* Fall through. */ + c_escape: + if (backslash_escapes) + { + c = esc; + goto store_escape; + } + break; + + case '{': case '}': /* sometimes special if isolated */ + if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1)) + break; + /* Fall through. */ + case '#': case '~': + if (i != 0) + break; + /* Fall through. */ + case ' ': + case '!': /* special in bash */ + case '"': case '$': case '&': + case '(': case ')': case '*': case ';': + case '<': + case '=': /* sometimes special in 0th or (with "set -k") later args */ + case '>': case '[': + case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */ + case '`': case '|': + /* A shell special character. In theory, '$' and '`' could + be the first bytes of multibyte characters, which means + we should check them with mbrtowc, but in practice this + doesn't happen so it's not worth worrying about. */ + if (quoting_style == shell_always_quoting_style + && elide_outer_quotes) + goto force_outer_quoting_style; + break; + + case '\'': + if (quoting_style == shell_always_quoting_style) + { + if (elide_outer_quotes) + goto force_outer_quoting_style; + STORE ('\''); + STORE ('\\'); + STORE ('\''); + } + break; + + case '%': case '+': case ',': case '-': case '.': case '/': + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': case ':': + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': + case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': + case 'Y': case 'Z': case ']': case '_': case 'a': case 'b': + case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': + case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': + case 'o': case 'p': case 'q': case 'r': case 's': case 't': + case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': + /* These characters don't cause problems, no matter what the + quoting style is. They cannot start multibyte sequences. + A digit or a special letter would cause trouble if it + appeared at the beginning of quote_string because we'd then + escape by prepending a backslash. However, it's hard to + imagine any locale that would use digits or letters as + quotes, and set_custom_quoting is documented not to accept + them. Also, a digit or a special letter would cause + trouble if it appeared in quote_these_too, but that's also + documented as not accepting them. */ + break; + + default: + /* If we have a multibyte sequence, copy it until we reach + its end, find an error, or come back to the initial shift + state. For C-like styles, if the sequence has + unprintable characters, escape the whole sequence, since + we can't easily escape single characters within it. */ + { + /* Length of multibyte sequence found so far. */ + size_t m; + + bool printable; + + if (unibyte_locale) + { + m = 1; + printable = isprint (c) != 0; + } + else + { + mbstate_t mbstate; + memset (&mbstate, 0, sizeof mbstate); + + m = 0; + printable = true; + if (argsize == SIZE_MAX) + argsize = strlen (arg); + + do + { + wchar_t w; + size_t bytes = mbrtowc (&w, &arg[i + m], + argsize - (i + m), &mbstate); + if (bytes == 0) + break; + else if (bytes == (size_t) -1) + { + printable = false; + break; + } + else if (bytes == (size_t) -2) + { + printable = false; + while (i + m < argsize && arg[i + m]) + m++; + break; + } + else + { + /* Work around a bug with older shells that "see" a '\' + that is really the 2nd byte of a multibyte character. + In practice the problem is limited to ASCII + chars >= '@' that are shell special chars. */ + if ('[' == 0x5b && elide_outer_quotes + && quoting_style == shell_always_quoting_style) + { + size_t j; + for (j = 1; j < bytes; j++) + switch (arg[i + m + j]) + { + case '[': case '\\': case '^': + case '`': case '|': + goto force_outer_quoting_style; + + default: + break; + } + } + + if (! iswprint (w)) + printable = false; + m += bytes; + } + } + while (! mbsinit (&mbstate)); + } + + if (1 < m || (backslash_escapes && ! printable)) + { + /* Output a multibyte sequence, or an escaped + unprintable unibyte character. */ + size_t ilim = i + m; + + for (;;) + { + if (backslash_escapes && ! printable) + { + if (elide_outer_quotes) + goto force_outer_quoting_style; + STORE ('\\'); + STORE ('0' + (c >> 6)); + STORE ('0' + ((c >> 3) & 7)); + c = '0' + (c & 7); + } + else if (is_right_quote) + { + STORE ('\\'); + is_right_quote = false; + } + if (ilim <= i + 1) + break; + STORE (c); + c = arg[++i]; + } + + goto store_c; + } + } + } + + if (! ((backslash_escapes || elide_outer_quotes) + && quote_these_too + && quote_these_too[c / INT_BITS] >> (c % INT_BITS) & 1) + && !is_right_quote) + goto store_c; + + store_escape: + if (elide_outer_quotes) + goto force_outer_quoting_style; + STORE ('\\'); + + store_c: + STORE (c); + } + + if (len == 0 && quoting_style == shell_always_quoting_style + && elide_outer_quotes) + goto force_outer_quoting_style; + + if (quote_string && !elide_outer_quotes) + for (; *quote_string; quote_string++) + STORE (*quote_string); + + if (len < buffersize) + buffer[len] = '\0'; + return len; + + force_outer_quoting_style: + /* Don't reuse quote_these_too, since the addition of outer quotes + sufficiently quotes the specified characters. */ + return quotearg_buffer_restyled (buffer, buffersize, arg, argsize, + quoting_style, + flags & ~QA_ELIDE_OUTER_QUOTES, NULL, + left_quote, right_quote); +} + +/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of + argument ARG (of size ARGSIZE), using O to control quoting. + If O is null, use the default. + Terminate the output with a null character, and return the written + size of the output, not counting the terminating null. + If BUFFERSIZE is too small to store the output string, return the + value that would have been returned had BUFFERSIZE been large enough. + If ARGSIZE is SIZE_MAX, use the string length of the argument for + ARGSIZE. */ +size_t +quotearg_buffer (char *buffer, size_t buffersize, + char const *arg, size_t argsize, + struct quoting_options const *o) +{ + struct quoting_options const *p = o ? o : &default_quoting_options; + int e = errno; + size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize, + p->style, p->flags, p->quote_these_too, + p->left_quote, p->right_quote); + errno = e; + return r; +} + +/* Equivalent to quotearg_alloc (ARG, ARGSIZE, NULL, O). */ +char * +quotearg_alloc (char const *arg, size_t argsize, + struct quoting_options const *o) +{ + return quotearg_alloc_mem (arg, argsize, NULL, o); +} + +/* Like quotearg_buffer (..., ARG, ARGSIZE, O), except return newly + allocated storage containing the quoted string, and store the + resulting size into *SIZE, if non-NULL. The result can contain + embedded null bytes only if ARGSIZE is not SIZE_MAX, SIZE is not + NULL, and set_quoting_flags has not set the null byte elision + flag. */ +char * +quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size, + struct quoting_options const *o) +{ + struct quoting_options const *p = o ? o : &default_quoting_options; + int e = errno; + /* Elide embedded null bytes if we can't return a size. */ + int flags = p->flags | (size ? 0 : QA_ELIDE_NULL_BYTES); + size_t bufsize = quotearg_buffer_restyled (0, 0, arg, argsize, p->style, + flags, p->quote_these_too, + p->left_quote, + p->right_quote) + 1; + char *buf = xcharalloc (bufsize); + quotearg_buffer_restyled (buf, bufsize, arg, argsize, p->style, flags, + p->quote_these_too, + p->left_quote, p->right_quote); + errno = e; + if (size) + *size = bufsize - 1; + return buf; +} + +/* A storage slot with size and pointer to a value. */ +struct slotvec +{ + size_t size; + char *val; +}; + +/* Preallocate a slot 0 buffer, so that the caller can always quote + one small component of a "memory exhausted" message in slot 0. */ +static char slot0[256]; +static unsigned int nslots = 1; +static struct slotvec slotvec0 = {sizeof slot0, slot0}; +static struct slotvec *slotvec = &slotvec0; + +void +quotearg_free (void) +{ + struct slotvec *sv = slotvec; + unsigned int i; + for (i = 1; i < nslots; i++) + free (sv[i].val); + if (sv[0].val != slot0) + { + free (sv[0].val); + slotvec0.size = sizeof slot0; + slotvec0.val = slot0; + } + if (sv != &slotvec0) + { + free (sv); + slotvec = &slotvec0; + } + nslots = 1; +} + +/* Use storage slot N to return a quoted version of argument ARG. + ARG is of size ARGSIZE, but if that is SIZE_MAX, ARG is a + null-terminated string. + OPTIONS specifies the quoting options. + The returned value points to static storage that can be + reused by the next call to this function with the same value of N. + N must be nonnegative. N is deliberately declared with type "int" + to allow for future extensions (using negative values). */ +static char * +quotearg_n_options (int n, char const *arg, size_t argsize, + struct quoting_options const *options) +{ + int e = errno; + + unsigned int n0 = n; + struct slotvec *sv = slotvec; + + if (n < 0) + abort (); + + if (nslots <= n0) + { + /* FIXME: technically, the type of n1 should be 'unsigned int', + but that evokes an unsuppressible warning from gcc-4.0.1 and + older. If gcc ever provides an option to suppress that warning, + revert to the original type, so that the test in xalloc_oversized + is once again performed only at compile time. */ + size_t n1 = n0 + 1; + bool preallocated = (sv == &slotvec0); + + if (xalloc_oversized (n1, sizeof *sv)) + xalloc_die (); + + slotvec = sv = xrealloc (preallocated ? NULL : sv, n1 * sizeof *sv); + if (preallocated) + *sv = slotvec0; + memset (sv + nslots, 0, (n1 - nslots) * sizeof *sv); + nslots = n1; + } + + { + size_t size = sv[n].size; + char *val = sv[n].val; + /* Elide embedded null bytes since we don't return a size. */ + int flags = options->flags | QA_ELIDE_NULL_BYTES; + size_t qsize = quotearg_buffer_restyled (val, size, arg, argsize, + options->style, flags, + options->quote_these_too, + options->left_quote, + options->right_quote); + + if (size <= qsize) + { + sv[n].size = size = qsize + 1; + if (val != slot0) + free (val); + sv[n].val = val = xcharalloc (size); + quotearg_buffer_restyled (val, size, arg, argsize, options->style, + flags, options->quote_these_too, + options->left_quote, + options->right_quote); + } + + errno = e; + return val; + } +} + +char * +quotearg_n (int n, char const *arg) +{ + return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options); +} + +char * +quotearg_n_mem (int n, char const *arg, size_t argsize) +{ + return quotearg_n_options (n, arg, argsize, &default_quoting_options); +} + +char * +quotearg (char const *arg) +{ + return quotearg_n (0, arg); +} + +char * +quotearg_mem (char const *arg, size_t argsize) +{ + return quotearg_n_mem (0, arg, argsize); +} + +char * +quotearg_n_style (int n, enum quoting_style s, char const *arg) +{ + struct quoting_options const o = quoting_options_from_style (s); + return quotearg_n_options (n, arg, SIZE_MAX, &o); +} + +char * +quotearg_n_style_mem (int n, enum quoting_style s, + char const *arg, size_t argsize) +{ + struct quoting_options const o = quoting_options_from_style (s); + return quotearg_n_options (n, arg, argsize, &o); +} + +char * +quotearg_style (enum quoting_style s, char const *arg) +{ + return quotearg_n_style (0, s, arg); +} + +char * +quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize) +{ + return quotearg_n_style_mem (0, s, arg, argsize); +} + +char * +quotearg_char_mem (char const *arg, size_t argsize, char ch) +{ + struct quoting_options options; + options = default_quoting_options; + set_char_quoting (&options, ch, 1); + return quotearg_n_options (0, arg, argsize, &options); +} + +char * +quotearg_char (char const *arg, char ch) +{ + return quotearg_char_mem (arg, SIZE_MAX, ch); +} + +char * +quotearg_colon (char const *arg) +{ + return quotearg_char (arg, ':'); +} + +char * +quotearg_colon_mem (char const *arg, size_t argsize) +{ + return quotearg_char_mem (arg, argsize, ':'); +} + +char * +quotearg_n_custom (int n, char const *left_quote, + char const *right_quote, char const *arg) +{ + return quotearg_n_custom_mem (n, left_quote, right_quote, arg, + SIZE_MAX); +} + +char * +quotearg_n_custom_mem (int n, char const *left_quote, + char const *right_quote, + char const *arg, size_t argsize) +{ + struct quoting_options o = default_quoting_options; + set_custom_quoting (&o, left_quote, right_quote); + return quotearg_n_options (n, arg, argsize, &o); +} + +char * +quotearg_custom (char const *left_quote, char const *right_quote, + char const *arg) +{ + return quotearg_n_custom (0, left_quote, right_quote, arg); +} + +char * +quotearg_custom_mem (char const *left_quote, char const *right_quote, + char const *arg, size_t argsize) +{ + return quotearg_n_custom_mem (0, left_quote, right_quote, arg, + argsize); +} + + +/* The quoting option used by the functions of quote.h. */ +struct quoting_options quote_quoting_options = + { + locale_quoting_style, + 0, + { 0 }, + NULL, NULL + }; + +char const * +quote_n_mem (int n, char const *arg, size_t argsize) +{ + return quotearg_n_options (n, arg, argsize, "e_quoting_options); +} + +char const * +quote_mem (char const *arg, size_t argsize) +{ + return quote_n_mem (0, arg, argsize); +} + +char const * +quote_n (int n, char const *arg) +{ + return quote_n_mem (n, arg, SIZE_MAX); +} + +char const * +quote (char const *arg) +{ + return quote_n (0, arg); +} diff --git a/gl/lib/quotearg.h b/gl/lib/quotearg.h new file mode 100644 index 0000000..da29d7b --- /dev/null +++ b/gl/lib/quotearg.h @@ -0,0 +1,391 @@ +/* quotearg.h - quote arguments for output + + Copyright (C) 1998-2002, 2004, 2006, 2008-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert */ + +#ifndef QUOTEARG_H_ +# define QUOTEARG_H_ 1 + +# include + +/* Basic quoting styles. For each style, an example is given on the + input strings "simple", "\0 \t\n'\"\033?""?/\\", and "a:b", using + quotearg_buffer, quotearg_mem, and quotearg_colon_mem with that + style and the default flags and quoted characters. Note that the + examples are shown here as valid C strings rather than what + displays on a terminal (with "??/" as a trigraph for "\\"). */ +enum quoting_style + { + /* Output names as-is (ls --quoting-style=literal). Can result in + embedded null bytes if QA_ELIDE_NULL_BYTES is not in + effect. + + quotearg_buffer: + "simple", "\0 \t\n'\"\033??/\\", "a:b" + quotearg: + "simple", " \t\n'\"\033??/\\", "a:b" + quotearg_colon: + "simple", " \t\n'\"\033??/\\", "a:b" + */ + literal_quoting_style, + + /* Quote names for the shell if they contain shell metacharacters + or would cause ambiguous output (ls --quoting-style=shell). + Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not + in effect. + + quotearg_buffer: + "simple", "'\0 \t\n'\\''\"\033??/\\'", "a:b" + quotearg: + "simple", "' \t\n'\\''\"\033??/\\'", "a:b" + quotearg_colon: + "simple", "' \t\n'\\''\"\033??/\\'", "'a:b'" + */ + shell_quoting_style, + + /* Quote names for the shell, even if they would normally not + require quoting (ls --quoting-style=shell-always). Can result + in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. + Behaves like shell_quoting_style if QA_ELIDE_OUTER_QUOTES is in + effect. + + quotearg_buffer: + "'simple'", "'\0 \t\n'\\''\"\033??/\\'", "'a:b'" + quotearg: + "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'" + quotearg_colon: + "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'" + */ + shell_always_quoting_style, + + /* Quote names as for a C language string (ls --quoting-style=c). + Behaves like c_maybe_quoting_style if QA_ELIDE_OUTER_QUOTES is + in effect. Split into consecutive strings if + QA_SPLIT_TRIGRAPHS. + + quotearg_buffer: + "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" + quotearg: + "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" + quotearg_colon: + "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\"" + */ + c_quoting_style, + + /* Like c_quoting_style except omit the surrounding double-quote + characters if no quoted characters are encountered. + + quotearg_buffer: + "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b" + quotearg: + "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b" + quotearg_colon: + "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" + */ + c_maybe_quoting_style, + + /* Like c_quoting_style except always omit the surrounding + double-quote characters and ignore QA_SPLIT_TRIGRAPHS + (ls --quoting-style=escape). + + quotearg_buffer: + "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b" + quotearg: + "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b" + quotearg_colon: + "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a\\:b" + */ + escape_quoting_style, + + /* Like clocale_quoting_style, but use single quotes in the + default C locale or if the program does not use gettext + (ls --quoting-style=locale). For UTF-8 locales, quote + characters will use Unicode. + + LC_MESSAGES=C + quotearg_buffer: + "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'" + quotearg: + "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'" + quotearg_colon: + "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a\\:b'" + + LC_MESSAGES=pt_PT.utf8 + quotearg_buffer: + "\302\253simple\302\273", + "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" + quotearg: + "\302\253simple\302\273", + "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" + quotearg_colon: + "\302\253simple\302\273", + "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273" + */ + locale_quoting_style, + + /* Like c_quoting_style except use quotation marks appropriate for + the locale and ignore QA_SPLIT_TRIGRAPHS + (ls --quoting-style=clocale). + + LC_MESSAGES=C + quotearg_buffer: + "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" + quotearg: + "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" + quotearg_colon: + "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\"" + + LC_MESSAGES=pt_PT.utf8 + quotearg_buffer: + "\302\253simple\302\273", + "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" + quotearg: + "\302\253simple\302\273", + "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" + quotearg_colon: + "\302\253simple\302\273", + "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273" + */ + clocale_quoting_style, + + /* Like clocale_quoting_style except use the custom quotation marks + set by set_custom_quoting. If custom quotation marks are not + set, the behavior is undefined. + + left_quote = right_quote = "'" + quotearg_buffer: + "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'" + quotearg: + "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'" + quotearg_colon: + "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a\\:b'" + + left_quote = "(" and right_quote = ")" + quotearg_buffer: + "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)" + quotearg: + "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)" + quotearg_colon: + "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a\\:b)" + + left_quote = ":" and right_quote = " " + quotearg_buffer: + ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b " + quotearg: + ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b " + quotearg_colon: + ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a\\:b " + + left_quote = "\"'" and right_quote = "'\"" + Notice that this is treated as a single level of quotes or two + levels where the outer quote need not be escaped within the inner + quotes. For two levels where the outer quote must be escaped + within the inner quotes, you must use separate quotearg + invocations. + quotearg_buffer: + "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\"" + quotearg: + "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\"" + quotearg_colon: + "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a\\:b'\"" + */ + custom_quoting_style + }; + +/* Flags for use in set_quoting_flags. */ +enum quoting_flags + { + /* Always elide null bytes from styles that do not quote them, + even when the length of the result is available to the + caller. */ + QA_ELIDE_NULL_BYTES = 0x01, + + /* Omit the surrounding quote characters if no escaped characters + are encountered. Note that if no other character needs + escaping, then neither does the escape character. */ + QA_ELIDE_OUTER_QUOTES = 0x02, + + /* In the c_quoting_style and c_maybe_quoting_style, split ANSI + trigraph sequences into concatenated strings (for example, + "?""?/" rather than "??/", which could be confused with + "\\"). */ + QA_SPLIT_TRIGRAPHS = 0x04 + }; + +/* For now, --quoting-style=literal is the default, but this may change. */ +# ifndef DEFAULT_QUOTING_STYLE +# define DEFAULT_QUOTING_STYLE literal_quoting_style +# endif + +/* Names of quoting styles and their corresponding values. */ +extern char const *const quoting_style_args[]; +extern enum quoting_style const quoting_style_vals[]; + +struct quoting_options; + +/* The functions listed below set and use a hidden variable + that contains the default quoting style options. */ + +/* Allocate a new set of quoting options, with contents initially identical + to O if O is not null, or to the default if O is null. + It is the caller's responsibility to free the result. */ +struct quoting_options *clone_quoting_options (struct quoting_options *o); + +/* Get the value of O's quoting style. If O is null, use the default. */ +enum quoting_style get_quoting_style (struct quoting_options *o); + +/* In O (or in the default if O is null), + set the value of the quoting style to S. */ +void set_quoting_style (struct quoting_options *o, enum quoting_style s); + +/* In O (or in the default if O is null), + set the value of the quoting options for character C to I. + Return the old value. Currently, the only values defined for I are + 0 (the default) and 1 (which means to quote the character even if + it would not otherwise be quoted). C must never be a digit or a + letter that has special meaning after a backslash (for example, "\t" + for tab). */ +int set_char_quoting (struct quoting_options *o, char c, int i); + +/* In O (or in the default if O is null), + set the value of the quoting options flag to I, which can be a + bitwise combination of enum quoting_flags, or 0 for default + behavior. Return the old value. */ +int set_quoting_flags (struct quoting_options *o, int i); + +/* In O (or in the default if O is null), + set the value of the quoting style to custom_quoting_style, + set the left quote to LEFT_QUOTE, and set the right quote to + RIGHT_QUOTE. Each of LEFT_QUOTE and RIGHT_QUOTE must be + null-terminated and can be the empty string. Because backslashes are + used for escaping, it does not make sense for RIGHT_QUOTE to contain + a backslash. RIGHT_QUOTE must not begin with a digit or a letter + that has special meaning after a backslash (for example, "\t" for + tab). */ +void set_custom_quoting (struct quoting_options *o, + char const *left_quote, + char const *right_quote); + +/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of + argument ARG (of size ARGSIZE), using O to control quoting. + If O is null, use the default. + Terminate the output with a null character, and return the written + size of the output, not counting the terminating null. + If BUFFERSIZE is too small to store the output string, return the + value that would have been returned had BUFFERSIZE been large enough. + If ARGSIZE is -1, use the string length of the argument for ARGSIZE. + On output, BUFFER might contain embedded null bytes if ARGSIZE was + not -1, the style of O does not use backslash escapes, and the + flags of O do not request elision of null bytes.*/ +size_t quotearg_buffer (char *buffer, size_t buffersize, + char const *arg, size_t argsize, + struct quoting_options const *o); + +/* Like quotearg_buffer, except return the result in a newly allocated + buffer. It is the caller's responsibility to free the result. The + result will not contain embedded null bytes. */ +char *quotearg_alloc (char const *arg, size_t argsize, + struct quoting_options const *o); + +/* Like quotearg_alloc, except that the length of the result, + excluding the terminating null byte, is stored into SIZE if it is + non-NULL. The result might contain embedded null bytes if ARGSIZE + was not -1, SIZE was not NULL, the style of O does not use + backslash escapes, and the flags of O do not request elision of + null bytes.*/ +char *quotearg_alloc_mem (char const *arg, size_t argsize, + size_t *size, struct quoting_options const *o); + +/* Use storage slot N to return a quoted version of the string ARG. + Use the default quoting options. + The returned value points to static storage that can be + reused by the next call to this function with the same value of N. + N must be nonnegative. The output of all functions in the + quotearg_n family are guaranteed to not contain embedded null + bytes.*/ +char *quotearg_n (int n, char const *arg); + +/* Equivalent to quotearg_n (0, ARG). */ +char *quotearg (char const *arg); + +/* Use storage slot N to return a quoted version of the argument ARG + of size ARGSIZE. This is like quotearg_n (N, ARG), except it can + quote null bytes. */ +char *quotearg_n_mem (int n, char const *arg, size_t argsize); + +/* Equivalent to quotearg_n_mem (0, ARG, ARGSIZE). */ +char *quotearg_mem (char const *arg, size_t argsize); + +/* Use style S and storage slot N to return a quoted version of the string ARG. + This is like quotearg_n (N, ARG), except that it uses S with no other + options to specify the quoting method. */ +char *quotearg_n_style (int n, enum quoting_style s, char const *arg); + +/* Use style S and storage slot N to return a quoted version of the + argument ARG of size ARGSIZE. This is like quotearg_n_style + (N, S, ARG), except it can quote null bytes. */ +char *quotearg_n_style_mem (int n, enum quoting_style s, + char const *arg, size_t argsize); + +/* Equivalent to quotearg_n_style (0, S, ARG). */ +char *quotearg_style (enum quoting_style s, char const *arg); + +/* Equivalent to quotearg_n_style_mem (0, S, ARG, ARGSIZE). */ +char *quotearg_style_mem (enum quoting_style s, + char const *arg, size_t argsize); + +/* Like quotearg (ARG), except also quote any instances of CH. + See set_char_quoting for a description of acceptable CH values. */ +char *quotearg_char (char const *arg, char ch); + +/* Like quotearg_char (ARG, CH), except it can quote null bytes. */ +char *quotearg_char_mem (char const *arg, size_t argsize, char ch); + +/* Equivalent to quotearg_char (ARG, ':'). */ +char *quotearg_colon (char const *arg); + +/* Like quotearg_colon (ARG), except it can quote null bytes. */ +char *quotearg_colon_mem (char const *arg, size_t argsize); + +/* Like quotearg_n_style (N, S, ARG) but with S as custom_quoting_style + with left quote as LEFT_QUOTE and right quote as RIGHT_QUOTE. See + set_custom_quoting for a description of acceptable LEFT_QUOTE and + RIGHT_QUOTE values. */ +char *quotearg_n_custom (int n, char const *left_quote, + char const *right_quote, char const *arg); + +/* Like quotearg_n_custom (N, LEFT_QUOTE, RIGHT_QUOTE, ARG) except it + can quote null bytes. */ +char *quotearg_n_custom_mem (int n, char const *left_quote, + char const *right_quote, + char const *arg, size_t argsize); + +/* Equivalent to quotearg_n_custom (0, LEFT_QUOTE, RIGHT_QUOTE, ARG). */ +char *quotearg_custom (char const *left_quote, char const *right_quote, + char const *arg); + +/* Equivalent to quotearg_n_custom_mem (0, LEFT_QUOTE, RIGHT_QUOTE, ARG, + ARGSIZE). */ +char *quotearg_custom_mem (char const *left_quote, + char const *right_quote, + char const *arg, size_t argsize); + +/* Free any dynamically allocated memory. */ +void quotearg_free (void); + +#endif /* !QUOTEARG_H_ */ diff --git a/gl/lib/read.c b/gl/lib/read.c new file mode 100644 index 0000000..d125b51 --- /dev/null +++ b/gl/lib/read.c @@ -0,0 +1,85 @@ +/* POSIX compatible read() function. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + +# include +# include + +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ +# include + +# include "msvc-inval.h" +# include "msvc-nothrow.h" + +# undef read + +# if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static ssize_t +read_nothrow (int fd, void *buf, size_t count) +{ + ssize_t result; + + TRY_MSVC_INVAL + { + result = read (fd, buf, count); + } + CATCH_MSVC_INVAL + { + result = -1; + errno = EBADF; + } + DONE_MSVC_INVAL; + + return result; +} +# else +# define read_nothrow read +# endif + +ssize_t +rpl_read (int fd, void *buf, size_t count) +{ + ssize_t ret = read_nothrow (fd, buf, count); + +# if GNULIB_NONBLOCKING + if (ret < 0 + && GetLastError () == ERROR_NO_DATA) + { + HANDLE h = (HANDLE) _get_osfhandle (fd); + if (GetFileType (h) == FILE_TYPE_PIPE) + { + /* h is a pipe or socket. */ + DWORD state; + if (GetNamedPipeHandleState (h, &state, NULL, NULL, NULL, NULL, 0) + && (state & PIPE_NOWAIT) != 0) + /* h is a pipe in non-blocking mode. + Change errno from EINVAL to EAGAIN. */ + errno = EAGAIN; + } + } +# endif + + return ret; +} + +#endif diff --git a/gl/lib/readdir.c b/gl/lib/readdir.c new file mode 100644 index 0000000..b74aebe --- /dev/null +++ b/gl/lib/readdir.c @@ -0,0 +1,98 @@ +/* Read the next entry of a directory. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include + +#include "dirent-private.h" + +struct dirent * +readdir (DIR *dirp) +{ + char type; + struct dirent *result; + + /* There is no need to add code to produce entries for "." and "..". + According to the POSIX:2008 section "4.12 Pathname Resolution" + + "." and ".." are syntactic entities. + POSIX also says: + "If entries for dot or dot-dot exist, one entry shall be returned + for dot and one entry shall be returned for dot-dot; otherwise, + they shall not be returned." */ + + switch (dirp->status) + { + case -2: + /* End of directory already reached. */ + return NULL; + case -1: + break; + case 0: + if (!FindNextFile (dirp->current, &dirp->entry)) + { + switch (GetLastError ()) + { + case ERROR_NO_MORE_FILES: + dirp->status = -2; + return NULL; + default: + errno = EIO; + return NULL; + } + } + break; + default: + errno = dirp->status; + return NULL; + } + + dirp->status = 0; + + if (dirp->entry.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + type = DT_DIR; + else if (dirp->entry.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) + type = DT_LNK; + else if ((dirp->entry.dwFileAttributes + & ~(FILE_ATTRIBUTE_READONLY + | FILE_ATTRIBUTE_HIDDEN + | FILE_ATTRIBUTE_SYSTEM + | FILE_ATTRIBUTE_ARCHIVE + | FILE_ATTRIBUTE_NORMAL + | FILE_ATTRIBUTE_TEMPORARY + | FILE_ATTRIBUTE_SPARSE_FILE + | FILE_ATTRIBUTE_COMPRESSED + | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED + | FILE_ATTRIBUTE_ENCRYPTED)) == 0) + /* Devices like COM1, LPT1, NUL would also have the attributes 0x20 but + they cannot occur here. */ + type = DT_REG; + else + type = DT_UNKNOWN; + + /* Reuse the memory of dirp->entry for the result. */ + result = + (struct dirent *) + ((char *) dirp->entry.cFileName - offsetof (struct dirent, d_name[0])); + result->d_type = type; + + return result; +} diff --git a/gl/lib/readlink.c b/gl/lib/readlink.c new file mode 100644 index 0000000..4c49639 --- /dev/null +++ b/gl/lib/readlink.c @@ -0,0 +1,74 @@ +/* Stub for readlink(). + Copyright (C) 2003-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include + +#if !HAVE_READLINK + +/* readlink() substitute for systems that don't have a readlink() function, + such as DJGPP 2.03 and mingw32. */ + +ssize_t +readlink (const char *name, char *buf _GL_UNUSED, + size_t bufsize _GL_UNUSED) +{ + struct stat statbuf; + + /* In general we should use lstat() here, not stat(). But on platforms + without symbolic links, lstat() - if it exists - would be equivalent to + stat(), therefore we can use stat(). This saves us a configure check. */ + if (stat (name, &statbuf) >= 0) + errno = EINVAL; + return -1; +} + +#else /* HAVE_READLINK */ + +# undef readlink + +/* readlink() wrapper that uses correct types, for systems like cygwin + 1.5.x where readlink returns int, and which rejects trailing slash, + for Solaris 9. */ + +ssize_t +rpl_readlink (const char *name, char *buf, size_t bufsize) +{ +# if READLINK_TRAILING_SLASH_BUG + size_t len = strlen (name); + if (len && name[len - 1] == '/') + { + /* Even if name without the slash is a symlink to a directory, + both lstat() and stat() must resolve the trailing slash to + the directory rather than the symlink. We can therefore + safely use stat() to distinguish between EINVAL and + ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat(). */ + struct stat st; + if (stat (name, &st) == 0) + errno = EINVAL; + return -1; + } +# endif /* READLINK_TRAILING_SLASH_BUG */ + return readlink (name, buf, bufsize); +} + +#endif /* HAVE_READLINK */ diff --git a/gl/lib/readlinkat.c b/gl/lib/readlinkat.c new file mode 100644 index 0000000..c8a6050 --- /dev/null +++ b/gl/lib/readlinkat.c @@ -0,0 +1,47 @@ +/* Read a symlink relative to an open directory. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Eric Blake */ + +#include + +#include + +/* Gnulib provides a readlink stub for mingw; use it for distinction + between EINVAL and ENOENT, rather than always failing with ENOSYS. */ + +/* POSIX 2008 says that unlike readlink, readlinkat returns 0 for + success instead of the buffer length. But this would render + readlinkat worthless since readlink does not guarantee a + NUL-terminated buffer. Assume this was a bug in POSIX. */ + +/* Read the contents of symlink FILE into buffer BUF of size LEN, in the + directory open on descriptor FD. If possible, do it without changing + the working directory. Otherwise, resort to using save_cwd/fchdir, + then readlink/restore_cwd. If either the save_cwd or the restore_cwd + fails, then give a diagnostic and exit nonzero. */ + +#define AT_FUNC_NAME readlinkat +#define AT_FUNC_F1 readlink +#define AT_FUNC_POST_FILE_PARAM_DECLS , char *buf, size_t len +#define AT_FUNC_POST_FILE_ARGS , buf, len +#define AT_FUNC_RESULT ssize_t +#include "at-func.c" +#undef AT_FUNC_NAME +#undef AT_FUNC_F1 +#undef AT_FUNC_POST_FILE_PARAM_DECLS +#undef AT_FUNC_POST_FILE_ARGS +#undef AT_FUNC_RESULT diff --git a/gl/lib/realloc.c b/gl/lib/realloc.c new file mode 100644 index 0000000..8dfcfbe --- /dev/null +++ b/gl/lib/realloc.c @@ -0,0 +1,79 @@ +/* realloc() function that is glibc compatible. + + Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering and Bruno Haible */ + +#define _GL_USE_STDLIB_ALLOC 1 +#include + +/* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */ +#ifdef realloc +# define NEED_REALLOC_GNU 1 +/* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU. */ +#elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU +# define NEED_REALLOC_GNU 1 +#endif + +/* Infer the properties of the system's malloc function. + The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ +#if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU +# define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1 +#endif + +#include + +#include + +/* Change the size of an allocated block of memory P to N bytes, + with error checking. If N is zero, change it to 1. If P is NULL, + use malloc. */ + +void * +rpl_realloc (void *p, size_t n) +{ + void *result; + +#if NEED_REALLOC_GNU + if (n == 0) + { + n = 1; + + /* In theory realloc might fail, so don't rely on it to free. */ + free (p); + p = NULL; + } +#endif + + if (p == NULL) + { +#if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE + if (n == 0) + n = 1; +#endif + result = malloc (n); + } + else + result = realloc (p, n); + +#if !HAVE_REALLOC_POSIX + if (result == NULL) + errno = ENOMEM; +#endif + + return result; +} diff --git a/gl/lib/ref-add.sin b/gl/lib/ref-add.sin new file mode 100644 index 0000000..0e14022 --- /dev/null +++ b/gl/lib/ref-add.sin @@ -0,0 +1,29 @@ +# Add this package to a list of references stored in a text file. +# +# Copyright (C) 2000, 2009-2014 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, see . +# +# Written by Bruno Haible . +# +/^# Packages using this file: / { + s/# Packages using this file:// + ta + :a + s/ @PACKAGE@ / @PACKAGE@ / + tb + s/ $/ @PACKAGE@ / + :b + s/^/# Packages using this file:/ +} diff --git a/gl/lib/ref-del.sin b/gl/lib/ref-del.sin new file mode 100644 index 0000000..2dbcf7b --- /dev/null +++ b/gl/lib/ref-del.sin @@ -0,0 +1,24 @@ +# Remove this package from a list of references stored in a text file. +# +# Copyright (C) 2000, 2009-2014 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, see . +# +# Written by Bruno Haible . +# +/^# Packages using this file: / { + s/# Packages using this file:// + s/ @PACKAGE@ / / + s/^/# Packages using this file:/ +} diff --git a/gl/lib/regcomp.c b/gl/lib/regcomp.c new file mode 100644 index 0000000..249d757 --- /dev/null +++ b/gl/lib/regcomp.c @@ -0,0 +1,3922 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2002-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Isamu Hasegawa . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + . */ + +static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, + size_t length, reg_syntax_t syntax); +static void re_compile_fastmap_iter (regex_t *bufp, + const re_dfastate_t *init_state, + char *fastmap); +static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); +#ifdef RE_ENABLE_I18N +static void free_charset (re_charset_t *cset); +#endif /* RE_ENABLE_I18N */ +static void free_workarea_compile (regex_t *preg); +static reg_errcode_t create_initial_state (re_dfa_t *dfa); +#ifdef RE_ENABLE_I18N +static void optimize_utf8 (re_dfa_t *dfa); +#endif +static reg_errcode_t analyze (regex_t *preg); +static reg_errcode_t preorder (bin_tree_t *root, + reg_errcode_t (fn (void *, bin_tree_t *)), + void *extra); +static reg_errcode_t postorder (bin_tree_t *root, + reg_errcode_t (fn (void *, bin_tree_t *)), + void *extra); +static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); +static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); +static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, + bin_tree_t *node); +static reg_errcode_t calc_first (void *extra, bin_tree_t *node); +static reg_errcode_t calc_next (void *extra, bin_tree_t *node); +static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); +static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint); +static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, + unsigned int constraint); +static reg_errcode_t calc_eclosure (re_dfa_t *dfa); +static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, + Idx node, bool root); +static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); +static Idx fetch_number (re_string_t *input, re_token_t *token, + reg_syntax_t syntax); +static int peek_token (re_token_t *token, re_string_t *input, + reg_syntax_t syntax) internal_function; +static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, + reg_syntax_t syntax, reg_errcode_t *err); +static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, + re_token_t *token, reg_syntax_t syntax, + Idx nest, reg_errcode_t *err); +static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, + re_token_t *token, reg_syntax_t syntax, + Idx nest, reg_errcode_t *err); +static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, + re_token_t *token, reg_syntax_t syntax, + Idx nest, reg_errcode_t *err); +static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, + re_token_t *token, reg_syntax_t syntax, + Idx nest, reg_errcode_t *err); +static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, + re_dfa_t *dfa, re_token_t *token, + reg_syntax_t syntax, reg_errcode_t *err); +static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, + re_token_t *token, reg_syntax_t syntax, + reg_errcode_t *err); +static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, + re_string_t *regexp, + re_token_t *token, int token_len, + re_dfa_t *dfa, + reg_syntax_t syntax, + bool accept_hyphen); +static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, + re_string_t *regexp, + re_token_t *token); +#ifdef RE_ENABLE_I18N +static reg_errcode_t build_equiv_class (bitset_t sbcset, + re_charset_t *mbcset, + Idx *equiv_class_alloc, + const unsigned char *name); +static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, + bitset_t sbcset, + re_charset_t *mbcset, + Idx *char_class_alloc, + const char *class_name, + reg_syntax_t syntax); +#else /* not RE_ENABLE_I18N */ +static reg_errcode_t build_equiv_class (bitset_t sbcset, + const unsigned char *name); +static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, + bitset_t sbcset, + const char *class_name, + reg_syntax_t syntax); +#endif /* not RE_ENABLE_I18N */ +static bin_tree_t *build_charclass_op (re_dfa_t *dfa, + RE_TRANSLATE_TYPE trans, + const char *class_name, + const char *extra, + bool non_match, reg_errcode_t *err); +static bin_tree_t *create_tree (re_dfa_t *dfa, + bin_tree_t *left, bin_tree_t *right, + re_token_type_t type); +static bin_tree_t *create_token_tree (re_dfa_t *dfa, + bin_tree_t *left, bin_tree_t *right, + const re_token_t *token); +static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); +static void free_token (re_token_t *node); +static reg_errcode_t free_tree (void *extra, bin_tree_t *node); +static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); + +/* This table gives an error message for each of the error codes listed + in regex.h. Obviously the order here has to be same as there. + POSIX doesn't require that we do anything for REG_NOERROR, + but why not be nice? */ + +static const char __re_error_msgid[] = + { +#define REG_NOERROR_IDX 0 + gettext_noop ("Success") /* REG_NOERROR */ + "\0" +#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") + gettext_noop ("No match") /* REG_NOMATCH */ + "\0" +#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") + gettext_noop ("Invalid regular expression") /* REG_BADPAT */ + "\0" +#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") + gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ + "\0" +#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") + gettext_noop ("Invalid character class name") /* REG_ECTYPE */ + "\0" +#define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") + gettext_noop ("Trailing backslash") /* REG_EESCAPE */ + "\0" +#define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") + gettext_noop ("Invalid back reference") /* REG_ESUBREG */ + "\0" +#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") + gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ + "\0" +#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") + gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ + "\0" +#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") + gettext_noop ("Unmatched \\{") /* REG_EBRACE */ + "\0" +#define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") + gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ + "\0" +#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") + gettext_noop ("Invalid range end") /* REG_ERANGE */ + "\0" +#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") + gettext_noop ("Memory exhausted") /* REG_ESPACE */ + "\0" +#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") + gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ + "\0" +#define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") + gettext_noop ("Premature end of regular expression") /* REG_EEND */ + "\0" +#define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") + gettext_noop ("Regular expression too big") /* REG_ESIZE */ + "\0" +#define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") + gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ + }; + +static const size_t __re_error_msgid_idx[] = + { + REG_NOERROR_IDX, + REG_NOMATCH_IDX, + REG_BADPAT_IDX, + REG_ECOLLATE_IDX, + REG_ECTYPE_IDX, + REG_EESCAPE_IDX, + REG_ESUBREG_IDX, + REG_EBRACK_IDX, + REG_EPAREN_IDX, + REG_EBRACE_IDX, + REG_BADBR_IDX, + REG_ERANGE_IDX, + REG_ESPACE_IDX, + REG_BADRPT_IDX, + REG_EEND_IDX, + REG_ESIZE_IDX, + REG_ERPAREN_IDX + }; + +/* Entry points for GNU code. */ + +/* re_compile_pattern is the GNU regular expression compiler: it + compiles PATTERN (of length LENGTH) and puts the result in BUFP. + Returns 0 if the pattern was valid, otherwise an error string. + + Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields + are set in BUFP on entry. */ + +#ifdef _LIBC +const char * +re_compile_pattern (pattern, length, bufp) + const char *pattern; + size_t length; + struct re_pattern_buffer *bufp; +#else /* size_t might promote */ +const char * +re_compile_pattern (const char *pattern, size_t length, + struct re_pattern_buffer *bufp) +#endif +{ + reg_errcode_t ret; + + /* And GNU code determines whether or not to get register information + by passing null for the REGS argument to re_match, etc., not by + setting no_sub, unless RE_NO_SUB is set. */ + bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); + + /* Match anchors at newline. */ + bufp->newline_anchor = 1; + + ret = re_compile_internal (bufp, pattern, length, re_syntax_options); + + if (!ret) + return NULL; + return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); +} +#ifdef _LIBC +weak_alias (__re_compile_pattern, re_compile_pattern) +#endif + +/* Set by 're_set_syntax' to the current regexp syntax to recognize. Can + also be assigned to arbitrarily: each pattern buffer stores its own + syntax, so it can be changed between regex compilations. */ +/* This has no initializer because initialized variables in Emacs + become read-only after dumping. */ +reg_syntax_t re_syntax_options; + + +/* Specify the precise syntax of regexps for compilation. This provides + for compatibility for various utilities which historically have + different, incompatible syntaxes. + + The argument SYNTAX is a bit mask comprised of the various bits + defined in regex.h. We return the old syntax. */ + +reg_syntax_t +re_set_syntax (syntax) + reg_syntax_t syntax; +{ + reg_syntax_t ret = re_syntax_options; + + re_syntax_options = syntax; + return ret; +} +#ifdef _LIBC +weak_alias (__re_set_syntax, re_set_syntax) +#endif + +int +re_compile_fastmap (bufp) + struct re_pattern_buffer *bufp; +{ + re_dfa_t *dfa = bufp->buffer; + char *fastmap = bufp->fastmap; + + memset (fastmap, '\0', sizeof (char) * SBC_MAX); + re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); + if (dfa->init_state != dfa->init_state_word) + re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); + if (dfa->init_state != dfa->init_state_nl) + re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); + if (dfa->init_state != dfa->init_state_begbuf) + re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); + bufp->fastmap_accurate = 1; + return 0; +} +#ifdef _LIBC +weak_alias (__re_compile_fastmap, re_compile_fastmap) +#endif + +static inline void +__attribute__ ((always_inline)) +re_set_fastmap (char *fastmap, bool icase, int ch) +{ + fastmap[ch] = 1; + if (icase) + fastmap[tolower (ch)] = 1; +} + +/* Helper function for re_compile_fastmap. + Compile fastmap for the initial_state INIT_STATE. */ + +static void +re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, + char *fastmap) +{ + re_dfa_t *dfa = bufp->buffer; + Idx node_cnt; + bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); + for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) + { + Idx node = init_state->nodes.elems[node_cnt]; + re_token_type_t type = dfa->nodes[node].type; + + if (type == CHARACTER) + { + re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); +#ifdef RE_ENABLE_I18N + if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) + { + unsigned char buf[MB_LEN_MAX]; + unsigned char *p; + wchar_t wc; + mbstate_t state; + + p = buf; + *p++ = dfa->nodes[node].opr.c; + while (++node < dfa->nodes_len + && dfa->nodes[node].type == CHARACTER + && dfa->nodes[node].mb_partial) + *p++ = dfa->nodes[node].opr.c; + memset (&state, '\0', sizeof (state)); + if (__mbrtowc (&wc, (const char *) buf, p - buf, + &state) == p - buf + && (__wcrtomb ((char *) buf, towlower (wc), &state) + != (size_t) -1)) + re_set_fastmap (fastmap, false, buf[0]); + } +#endif + } + else if (type == SIMPLE_BRACKET) + { + int i, ch; + for (i = 0, ch = 0; i < BITSET_WORDS; ++i) + { + int j; + bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; + for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) + if (w & ((bitset_word_t) 1 << j)) + re_set_fastmap (fastmap, icase, ch); + } + } +#ifdef RE_ENABLE_I18N + else if (type == COMPLEX_BRACKET) + { + re_charset_t *cset = dfa->nodes[node].opr.mbcset; + Idx i; + +# ifdef _LIBC + /* See if we have to try all bytes which start multiple collation + elements. + e.g. In da_DK, we want to catch 'a' since "aa" is a valid + collation element, and don't catch 'b' since 'b' is + the only collation element which starts from 'b' (and + it is caught by SIMPLE_BRACKET). */ + if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0 + && (cset->ncoll_syms || cset->nranges)) + { + const int32_t *table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); + for (i = 0; i < SBC_MAX; ++i) + if (table[i] < 0) + re_set_fastmap (fastmap, icase, i); + } +# endif /* _LIBC */ + + /* See if we have to start the match at all multibyte characters, + i.e. where we would not find an invalid sequence. This only + applies to multibyte character sets; for single byte character + sets, the SIMPLE_BRACKET again suffices. */ + if (dfa->mb_cur_max > 1 + && (cset->nchar_classes || cset->non_match || cset->nranges +# ifdef _LIBC + || cset->nequiv_classes +# endif /* _LIBC */ + )) + { + unsigned char c = 0; + do + { + mbstate_t mbs; + memset (&mbs, 0, sizeof (mbs)); + if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2) + re_set_fastmap (fastmap, false, (int) c); + } + while (++c != 0); + } + + else + { + /* ... Else catch all bytes which can start the mbchars. */ + for (i = 0; i < cset->nmbchars; ++i) + { + char buf[256]; + mbstate_t state; + memset (&state, '\0', sizeof (state)); + if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) + re_set_fastmap (fastmap, icase, *(unsigned char *) buf); + if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) + { + if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) + != (size_t) -1) + re_set_fastmap (fastmap, false, *(unsigned char *) buf); + } + } + } + } +#endif /* RE_ENABLE_I18N */ + else if (type == OP_PERIOD +#ifdef RE_ENABLE_I18N + || type == OP_UTF8_PERIOD +#endif /* RE_ENABLE_I18N */ + || type == END_OF_RE) + { + memset (fastmap, '\1', sizeof (char) * SBC_MAX); + if (type == END_OF_RE) + bufp->can_be_null = 1; + return; + } + } +} + +/* Entry point for POSIX code. */ +/* regcomp takes a regular expression as a string and compiles it. + + PREG is a regex_t *. We do not expect any fields to be initialized, + since POSIX says we shouldn't. Thus, we set + + 'buffer' to the compiled pattern; + 'used' to the length of the compiled pattern; + 'syntax' to RE_SYNTAX_POSIX_EXTENDED if the + REG_EXTENDED bit in CFLAGS is set; otherwise, to + RE_SYNTAX_POSIX_BASIC; + 'newline_anchor' to REG_NEWLINE being set in CFLAGS; + 'fastmap' to an allocated space for the fastmap; + 'fastmap_accurate' to zero; + 're_nsub' to the number of subexpressions in PATTERN. + + PATTERN is the address of the pattern string. + + CFLAGS is a series of bits which affect compilation. + + If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we + use POSIX basic syntax. + + If REG_NEWLINE is set, then . and [^...] don't match newline. + Also, regexec will try a match beginning after every newline. + + If REG_ICASE is set, then we considers upper- and lowercase + versions of letters to be equivalent when matching. + + If REG_NOSUB is set, then when PREG is passed to regexec, that + routine will report only success or failure, and nothing about the + registers. + + It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for + the return codes and their meanings.) */ + +int +regcomp (preg, pattern, cflags) + regex_t *_Restrict_ preg; + const char *_Restrict_ pattern; + int cflags; +{ + reg_errcode_t ret; + reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED + : RE_SYNTAX_POSIX_BASIC); + + preg->buffer = NULL; + preg->allocated = 0; + preg->used = 0; + + /* Try to allocate space for the fastmap. */ + preg->fastmap = re_malloc (char, SBC_MAX); + if (BE (preg->fastmap == NULL, 0)) + return REG_ESPACE; + + syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; + + /* If REG_NEWLINE is set, newlines are treated differently. */ + if (cflags & REG_NEWLINE) + { /* REG_NEWLINE implies neither . nor [^...] match newline. */ + syntax &= ~RE_DOT_NEWLINE; + syntax |= RE_HAT_LISTS_NOT_NEWLINE; + /* It also changes the matching behavior. */ + preg->newline_anchor = 1; + } + else + preg->newline_anchor = 0; + preg->no_sub = !!(cflags & REG_NOSUB); + preg->translate = NULL; + + ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); + + /* POSIX doesn't distinguish between an unmatched open-group and an + unmatched close-group: both are REG_EPAREN. */ + if (ret == REG_ERPAREN) + ret = REG_EPAREN; + + /* We have already checked preg->fastmap != NULL. */ + if (BE (ret == REG_NOERROR, 1)) + /* Compute the fastmap now, since regexec cannot modify the pattern + buffer. This function never fails in this implementation. */ + (void) re_compile_fastmap (preg); + else + { + /* Some error occurred while compiling the expression. */ + re_free (preg->fastmap); + preg->fastmap = NULL; + } + + return (int) ret; +} +#ifdef _LIBC +weak_alias (__regcomp, regcomp) +#endif + +/* Returns a message corresponding to an error code, ERRCODE, returned + from either regcomp or regexec. We don't use PREG here. */ + +#ifdef _LIBC +size_t +regerror (errcode, preg, errbuf, errbuf_size) + int errcode; + const regex_t *_Restrict_ preg; + char *_Restrict_ errbuf; + size_t errbuf_size; +#else /* size_t might promote */ +size_t +regerror (int errcode, const regex_t *_Restrict_ preg, + char *_Restrict_ errbuf, size_t errbuf_size) +#endif +{ + const char *msg; + size_t msg_size; + + if (BE (errcode < 0 + || errcode >= (int) (sizeof (__re_error_msgid_idx) + / sizeof (__re_error_msgid_idx[0])), 0)) + /* Only error codes returned by the rest of the code should be passed + to this routine. If we are given anything else, or if other regex + code generates an invalid error code, then the program has a bug. + Dump core so we can fix it. */ + abort (); + + msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); + + msg_size = strlen (msg) + 1; /* Includes the null. */ + + if (BE (errbuf_size != 0, 1)) + { + size_t cpy_size = msg_size; + if (BE (msg_size > errbuf_size, 0)) + { + cpy_size = errbuf_size - 1; + errbuf[cpy_size] = '\0'; + } + memcpy (errbuf, msg, cpy_size); + } + + return msg_size; +} +#ifdef _LIBC +weak_alias (__regerror, regerror) +#endif + + +#ifdef RE_ENABLE_I18N +/* This static array is used for the map to single-byte characters when + UTF-8 is used. Otherwise we would allocate memory just to initialize + it the same all the time. UTF-8 is the preferred encoding so this is + a worthwhile optimization. */ +static const bitset_t utf8_sb_map = +{ + /* Set the first 128 bits. */ +# if defined __GNUC__ && !defined __STRICT_ANSI__ + [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX +# else +# if 4 * BITSET_WORD_BITS < ASCII_CHARS +# error "bitset_word_t is narrower than 32 bits" +# elif 3 * BITSET_WORD_BITS < ASCII_CHARS + BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX, +# elif 2 * BITSET_WORD_BITS < ASCII_CHARS + BITSET_WORD_MAX, BITSET_WORD_MAX, +# elif 1 * BITSET_WORD_BITS < ASCII_CHARS + BITSET_WORD_MAX, +# endif + (BITSET_WORD_MAX + >> (SBC_MAX % BITSET_WORD_BITS == 0 + ? 0 + : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) +# endif +}; +#endif + + +static void +free_dfa_content (re_dfa_t *dfa) +{ + Idx i, j; + + if (dfa->nodes) + for (i = 0; i < dfa->nodes_len; ++i) + free_token (dfa->nodes + i); + re_free (dfa->nexts); + for (i = 0; i < dfa->nodes_len; ++i) + { + if (dfa->eclosures != NULL) + re_node_set_free (dfa->eclosures + i); + if (dfa->inveclosures != NULL) + re_node_set_free (dfa->inveclosures + i); + if (dfa->edests != NULL) + re_node_set_free (dfa->edests + i); + } + re_free (dfa->edests); + re_free (dfa->eclosures); + re_free (dfa->inveclosures); + re_free (dfa->nodes); + + if (dfa->state_table) + for (i = 0; i <= dfa->state_hash_mask; ++i) + { + struct re_state_table_entry *entry = dfa->state_table + i; + for (j = 0; j < entry->num; ++j) + { + re_dfastate_t *state = entry->array[j]; + free_state (state); + } + re_free (entry->array); + } + re_free (dfa->state_table); +#ifdef RE_ENABLE_I18N + if (dfa->sb_char != utf8_sb_map) + re_free (dfa->sb_char); +#endif + re_free (dfa->subexp_map); +#ifdef DEBUG + re_free (dfa->re_str); +#endif + + re_free (dfa); +} + + +/* Free dynamically allocated space used by PREG. */ + +void +regfree (preg) + regex_t *preg; +{ + re_dfa_t *dfa = preg->buffer; + if (BE (dfa != NULL, 1)) + { + lock_fini (dfa->lock); + free_dfa_content (dfa); + } + preg->buffer = NULL; + preg->allocated = 0; + + re_free (preg->fastmap); + preg->fastmap = NULL; + + re_free (preg->translate); + preg->translate = NULL; +} +#ifdef _LIBC +weak_alias (__regfree, regfree) +#endif + +/* Entry points compatible with 4.2 BSD regex library. We don't define + them unless specifically requested. */ + +#if defined _REGEX_RE_COMP || defined _LIBC + +/* BSD has one and only one pattern buffer. */ +static struct re_pattern_buffer re_comp_buf; + +char * +# ifdef _LIBC +/* Make these definitions weak in libc, so POSIX programs can redefine + these names if they don't use our functions, and still use + regcomp/regexec above without link errors. */ +weak_function +# endif +re_comp (s) + const char *s; +{ + reg_errcode_t ret; + char *fastmap; + + if (!s) + { + if (!re_comp_buf.buffer) + return gettext ("No previous regular expression"); + return 0; + } + + if (re_comp_buf.buffer) + { + fastmap = re_comp_buf.fastmap; + re_comp_buf.fastmap = NULL; + __regfree (&re_comp_buf); + memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); + re_comp_buf.fastmap = fastmap; + } + + if (re_comp_buf.fastmap == NULL) + { + re_comp_buf.fastmap = (char *) malloc (SBC_MAX); + if (re_comp_buf.fastmap == NULL) + return (char *) gettext (__re_error_msgid + + __re_error_msgid_idx[(int) REG_ESPACE]); + } + + /* Since 're_exec' always passes NULL for the 'regs' argument, we + don't need to initialize the pattern buffer fields which affect it. */ + + /* Match anchors at newlines. */ + re_comp_buf.newline_anchor = 1; + + ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); + + if (!ret) + return NULL; + + /* Yes, we're discarding 'const' here if !HAVE_LIBINTL. */ + return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); +} + +#ifdef _LIBC +libc_freeres_fn (free_mem) +{ + __regfree (&re_comp_buf); +} +#endif + +#endif /* _REGEX_RE_COMP */ + +/* Internal entry point. + Compile the regular expression PATTERN, whose length is LENGTH. + SYNTAX indicate regular expression's syntax. */ + +static reg_errcode_t +re_compile_internal (regex_t *preg, const char * pattern, size_t length, + reg_syntax_t syntax) +{ + reg_errcode_t err = REG_NOERROR; + re_dfa_t *dfa; + re_string_t regexp; + + /* Initialize the pattern buffer. */ + preg->fastmap_accurate = 0; + preg->syntax = syntax; + preg->not_bol = preg->not_eol = 0; + preg->used = 0; + preg->re_nsub = 0; + preg->can_be_null = 0; + preg->regs_allocated = REGS_UNALLOCATED; + + /* Initialize the dfa. */ + dfa = preg->buffer; + if (BE (preg->allocated < sizeof (re_dfa_t), 0)) + { + /* If zero allocated, but buffer is non-null, try to realloc + enough space. This loses if buffer's address is bogus, but + that is the user's responsibility. If ->buffer is NULL this + is a simple allocation. */ + dfa = re_realloc (preg->buffer, re_dfa_t, 1); + if (dfa == NULL) + return REG_ESPACE; + preg->allocated = sizeof (re_dfa_t); + preg->buffer = dfa; + } + preg->used = sizeof (re_dfa_t); + + err = init_dfa (dfa, length); + if (BE (err == REG_NOERROR && lock_init (dfa->lock) != 0, 0)) + err = REG_ESPACE; + if (BE (err != REG_NOERROR, 0)) + { + free_dfa_content (dfa); + preg->buffer = NULL; + preg->allocated = 0; + return err; + } +#ifdef DEBUG + /* Note: length+1 will not overflow since it is checked in init_dfa. */ + dfa->re_str = re_malloc (char, length + 1); + strncpy (dfa->re_str, pattern, length + 1); +#endif + + err = re_string_construct (®exp, pattern, length, preg->translate, + (syntax & RE_ICASE) != 0, dfa); + if (BE (err != REG_NOERROR, 0)) + { + re_compile_internal_free_return: + free_workarea_compile (preg); + re_string_destruct (®exp); + lock_fini (dfa->lock); + free_dfa_content (dfa); + preg->buffer = NULL; + preg->allocated = 0; + return err; + } + + /* Parse the regular expression, and build a structure tree. */ + preg->re_nsub = 0; + dfa->str_tree = parse (®exp, preg, syntax, &err); + if (BE (dfa->str_tree == NULL, 0)) + goto re_compile_internal_free_return; + + /* Analyze the tree and create the nfa. */ + err = analyze (preg); + if (BE (err != REG_NOERROR, 0)) + goto re_compile_internal_free_return; + +#ifdef RE_ENABLE_I18N + /* If possible, do searching in single byte encoding to speed things up. */ + if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) + optimize_utf8 (dfa); +#endif + + /* Then create the initial state of the dfa. */ + err = create_initial_state (dfa); + + /* Release work areas. */ + free_workarea_compile (preg); + re_string_destruct (®exp); + + if (BE (err != REG_NOERROR, 0)) + { + lock_fini (dfa->lock); + free_dfa_content (dfa); + preg->buffer = NULL; + preg->allocated = 0; + } + + return err; +} + +/* Initialize DFA. We use the length of the regular expression PAT_LEN + as the initial length of some arrays. */ + +static reg_errcode_t +init_dfa (re_dfa_t *dfa, size_t pat_len) +{ + __re_size_t table_size; +#ifndef _LIBC + const char *codeset_name; +#endif +#ifdef RE_ENABLE_I18N + size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); +#else + size_t max_i18n_object_size = 0; +#endif + size_t max_object_size = + MAX (sizeof (struct re_state_table_entry), + MAX (sizeof (re_token_t), + MAX (sizeof (re_node_set), + MAX (sizeof (regmatch_t), + max_i18n_object_size)))); + + memset (dfa, '\0', sizeof (re_dfa_t)); + + /* Force allocation of str_tree_storage the first time. */ + dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; + + /* Avoid overflows. The extra "/ 2" is for the table_size doubling + calculation below, and for similar doubling calculations + elsewhere. And it's <= rather than <, because some of the + doubling calculations add 1 afterwards. */ + if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 <= pat_len, 0)) + return REG_ESPACE; + + dfa->nodes_alloc = pat_len + 1; + dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); + + /* table_size = 2 ^ ceil(log pat_len) */ + for (table_size = 1; ; table_size <<= 1) + if (table_size > pat_len) + break; + + dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); + dfa->state_hash_mask = table_size - 1; + + dfa->mb_cur_max = MB_CUR_MAX; +#ifdef _LIBC + if (dfa->mb_cur_max == 6 + && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) + dfa->is_utf8 = 1; + dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) + != 0); +#else + codeset_name = nl_langinfo (CODESET); + if ((codeset_name[0] == 'U' || codeset_name[0] == 'u') + && (codeset_name[1] == 'T' || codeset_name[1] == 't') + && (codeset_name[2] == 'F' || codeset_name[2] == 'f') + && strcmp (codeset_name + 3 + (codeset_name[3] == '-'), "8") == 0) + dfa->is_utf8 = 1; + + /* We check exhaustively in the loop below if this charset is a + superset of ASCII. */ + dfa->map_notascii = 0; +#endif + +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + { + if (dfa->is_utf8) + dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; + else + { + int i, j, ch; + + dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); + if (BE (dfa->sb_char == NULL, 0)) + return REG_ESPACE; + + /* Set the bits corresponding to single byte chars. */ + for (i = 0, ch = 0; i < BITSET_WORDS; ++i) + for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) + { + wint_t wch = __btowc (ch); + if (wch != WEOF) + dfa->sb_char[i] |= (bitset_word_t) 1 << j; +# ifndef _LIBC + if (isascii (ch) && wch != ch) + dfa->map_notascii = 1; +# endif + } + } + } +#endif + + if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) + return REG_ESPACE; + return REG_NOERROR; +} + +/* Initialize WORD_CHAR table, which indicate which character is + "word". In this case "word" means that it is the word construction + character used by some operators like "\<", "\>", etc. */ + +static void +internal_function +init_word_char (re_dfa_t *dfa) +{ + int i = 0; + int j; + int ch = 0; + dfa->word_ops_used = 1; + if (BE (dfa->map_notascii == 0, 1)) + { + bitset_word_t bits0 = 0x00000000; + bitset_word_t bits1 = 0x03ff0000; + bitset_word_t bits2 = 0x87fffffe; + bitset_word_t bits3 = 0x07fffffe; + if (BITSET_WORD_BITS == 64) + { + dfa->word_char[0] = bits1 << 31 << 1 | bits0; + dfa->word_char[1] = bits3 << 31 << 1 | bits2; + i = 2; + } + else if (BITSET_WORD_BITS == 32) + { + dfa->word_char[0] = bits0; + dfa->word_char[1] = bits1; + dfa->word_char[2] = bits2; + dfa->word_char[3] = bits3; + i = 4; + } + else + goto general_case; + ch = 128; + + if (BE (dfa->is_utf8, 1)) + { + memset (&dfa->word_char[i], '\0', (SBC_MAX - ch) / 8); + return; + } + } + + general_case: + for (; i < BITSET_WORDS; ++i) + for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) + if (isalnum (ch) || ch == '_') + dfa->word_char[i] |= (bitset_word_t) 1 << j; +} + +/* Free the work area which are only used while compiling. */ + +static void +free_workarea_compile (regex_t *preg) +{ + re_dfa_t *dfa = preg->buffer; + bin_tree_storage_t *storage, *next; + for (storage = dfa->str_tree_storage; storage; storage = next) + { + next = storage->next; + re_free (storage); + } + dfa->str_tree_storage = NULL; + dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; + dfa->str_tree = NULL; + re_free (dfa->org_indices); + dfa->org_indices = NULL; +} + +/* Create initial states for all contexts. */ + +static reg_errcode_t +create_initial_state (re_dfa_t *dfa) +{ + Idx first, i; + reg_errcode_t err; + re_node_set init_nodes; + + /* Initial states have the epsilon closure of the node which is + the first node of the regular expression. */ + first = dfa->str_tree->first->node_idx; + dfa->init_node = first; + err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); + if (BE (err != REG_NOERROR, 0)) + return err; + + /* The back-references which are in initial states can epsilon transit, + since in this case all of the subexpressions can be null. + Then we add epsilon closures of the nodes which are the next nodes of + the back-references. */ + if (dfa->nbackref > 0) + for (i = 0; i < init_nodes.nelem; ++i) + { + Idx node_idx = init_nodes.elems[i]; + re_token_type_t type = dfa->nodes[node_idx].type; + + Idx clexp_idx; + if (type != OP_BACK_REF) + continue; + for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) + { + re_token_t *clexp_node; + clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; + if (clexp_node->type == OP_CLOSE_SUBEXP + && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) + break; + } + if (clexp_idx == init_nodes.nelem) + continue; + + if (type == OP_BACK_REF) + { + Idx dest_idx = dfa->edests[node_idx].elems[0]; + if (!re_node_set_contains (&init_nodes, dest_idx)) + { + reg_errcode_t merge_err + = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); + if (merge_err != REG_NOERROR) + return merge_err; + i = 0; + } + } + } + + /* It must be the first time to invoke acquire_state. */ + dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); + /* We don't check ERR here, since the initial state must not be NULL. */ + if (BE (dfa->init_state == NULL, 0)) + return err; + if (dfa->init_state->has_constraint) + { + dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, + CONTEXT_WORD); + dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, + CONTEXT_NEWLINE); + dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, + &init_nodes, + CONTEXT_NEWLINE + | CONTEXT_BEGBUF); + if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL + || dfa->init_state_begbuf == NULL, 0)) + return err; + } + else + dfa->init_state_word = dfa->init_state_nl + = dfa->init_state_begbuf = dfa->init_state; + + re_node_set_free (&init_nodes); + return REG_NOERROR; +} + +#ifdef RE_ENABLE_I18N +/* If it is possible to do searching in single byte encoding instead of UTF-8 + to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change + DFA nodes where needed. */ + +static void +optimize_utf8 (re_dfa_t *dfa) +{ + Idx node; + int i; + bool mb_chars = false; + bool has_period = false; + + for (node = 0; node < dfa->nodes_len; ++node) + switch (dfa->nodes[node].type) + { + case CHARACTER: + if (dfa->nodes[node].opr.c >= ASCII_CHARS) + mb_chars = true; + break; + case ANCHOR: + switch (dfa->nodes[node].opr.ctx_type) + { + case LINE_FIRST: + case LINE_LAST: + case BUF_FIRST: + case BUF_LAST: + break; + default: + /* Word anchors etc. cannot be handled. It's okay to test + opr.ctx_type since constraints (for all DFA nodes) are + created by ORing one or more opr.ctx_type values. */ + return; + } + break; + case OP_PERIOD: + has_period = true; + break; + case OP_BACK_REF: + case OP_ALT: + case END_OF_RE: + case OP_DUP_ASTERISK: + case OP_OPEN_SUBEXP: + case OP_CLOSE_SUBEXP: + break; + case COMPLEX_BRACKET: + return; + case SIMPLE_BRACKET: + /* Just double check. */ + { + int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0 + ? 0 + : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS); + for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) + { + if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0) + return; + rshift = 0; + } + } + break; + default: + abort (); + } + + if (mb_chars || has_period) + for (node = 0; node < dfa->nodes_len; ++node) + { + if (dfa->nodes[node].type == CHARACTER + && dfa->nodes[node].opr.c >= ASCII_CHARS) + dfa->nodes[node].mb_partial = 0; + else if (dfa->nodes[node].type == OP_PERIOD) + dfa->nodes[node].type = OP_UTF8_PERIOD; + } + + /* The search can be in single byte locale. */ + dfa->mb_cur_max = 1; + dfa->is_utf8 = 0; + dfa->has_mb_node = dfa->nbackref > 0 || has_period; +} +#endif + +/* Analyze the structure tree, and calculate "first", "next", "edest", + "eclosure", and "inveclosure". */ + +static reg_errcode_t +analyze (regex_t *preg) +{ + re_dfa_t *dfa = preg->buffer; + reg_errcode_t ret; + + /* Allocate arrays. */ + dfa->nexts = re_malloc (Idx, dfa->nodes_alloc); + dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc); + dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); + dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); + if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL + || dfa->eclosures == NULL, 0)) + return REG_ESPACE; + + dfa->subexp_map = re_malloc (Idx, preg->re_nsub); + if (dfa->subexp_map != NULL) + { + Idx i; + for (i = 0; i < preg->re_nsub; i++) + dfa->subexp_map[i] = i; + preorder (dfa->str_tree, optimize_subexps, dfa); + for (i = 0; i < preg->re_nsub; i++) + if (dfa->subexp_map[i] != i) + break; + if (i == preg->re_nsub) + { + free (dfa->subexp_map); + dfa->subexp_map = NULL; + } + } + + ret = postorder (dfa->str_tree, lower_subexps, preg); + if (BE (ret != REG_NOERROR, 0)) + return ret; + ret = postorder (dfa->str_tree, calc_first, dfa); + if (BE (ret != REG_NOERROR, 0)) + return ret; + preorder (dfa->str_tree, calc_next, dfa); + ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); + if (BE (ret != REG_NOERROR, 0)) + return ret; + ret = calc_eclosure (dfa); + if (BE (ret != REG_NOERROR, 0)) + return ret; + + /* We only need this during the prune_impossible_nodes pass in regexec.c; + skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ + if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) + || dfa->nbackref) + { + dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); + if (BE (dfa->inveclosures == NULL, 0)) + return REG_ESPACE; + ret = calc_inveclosure (dfa); + } + + return ret; +} + +/* Our parse trees are very unbalanced, so we cannot use a stack to + implement parse tree visits. Instead, we use parent pointers and + some hairy code in these two functions. */ +static reg_errcode_t +postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), + void *extra) +{ + bin_tree_t *node, *prev; + + for (node = root; ; ) + { + /* Descend down the tree, preferably to the left (or to the right + if that's the only child). */ + while (node->left || node->right) + if (node->left) + node = node->left; + else + node = node->right; + + do + { + reg_errcode_t err = fn (extra, node); + if (BE (err != REG_NOERROR, 0)) + return err; + if (node->parent == NULL) + return REG_NOERROR; + prev = node; + node = node->parent; + } + /* Go up while we have a node that is reached from the right. */ + while (node->right == prev || node->right == NULL); + node = node->right; + } +} + +static reg_errcode_t +preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), + void *extra) +{ + bin_tree_t *node; + + for (node = root; ; ) + { + reg_errcode_t err = fn (extra, node); + if (BE (err != REG_NOERROR, 0)) + return err; + + /* Go to the left node, or up and to the right. */ + if (node->left) + node = node->left; + else + { + bin_tree_t *prev = NULL; + while (node->right == prev || node->right == NULL) + { + prev = node; + node = node->parent; + if (!node) + return REG_NOERROR; + } + node = node->right; + } + } +} + +/* Optimization pass: if a SUBEXP is entirely contained, strip it and tell + re_search_internal to map the inner one's opr.idx to this one's. Adjust + backreferences as well. Requires a preorder visit. */ +static reg_errcode_t +optimize_subexps (void *extra, bin_tree_t *node) +{ + re_dfa_t *dfa = (re_dfa_t *) extra; + + if (node->token.type == OP_BACK_REF && dfa->subexp_map) + { + int idx = node->token.opr.idx; + node->token.opr.idx = dfa->subexp_map[idx]; + dfa->used_bkref_map |= 1 << node->token.opr.idx; + } + + else if (node->token.type == SUBEXP + && node->left && node->left->token.type == SUBEXP) + { + Idx other_idx = node->left->token.opr.idx; + + node->left = node->left->left; + if (node->left) + node->left->parent = node; + + dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; + if (other_idx < BITSET_WORD_BITS) + dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); + } + + return REG_NOERROR; +} + +/* Lowering pass: Turn each SUBEXP node into the appropriate concatenation + of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */ +static reg_errcode_t +lower_subexps (void *extra, bin_tree_t *node) +{ + regex_t *preg = (regex_t *) extra; + reg_errcode_t err = REG_NOERROR; + + if (node->left && node->left->token.type == SUBEXP) + { + node->left = lower_subexp (&err, preg, node->left); + if (node->left) + node->left->parent = node; + } + if (node->right && node->right->token.type == SUBEXP) + { + node->right = lower_subexp (&err, preg, node->right); + if (node->right) + node->right->parent = node; + } + + return err; +} + +static bin_tree_t * +lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) +{ + re_dfa_t *dfa = preg->buffer; + bin_tree_t *body = node->left; + bin_tree_t *op, *cls, *tree1, *tree; + + if (preg->no_sub + /* We do not optimize empty subexpressions, because otherwise we may + have bad CONCAT nodes with NULL children. This is obviously not + very common, so we do not lose much. An example that triggers + this case is the sed "script" /\(\)/x. */ + && node->left != NULL + && (node->token.opr.idx >= BITSET_WORD_BITS + || !(dfa->used_bkref_map + & ((bitset_word_t) 1 << node->token.opr.idx)))) + return node->left; + + /* Convert the SUBEXP node to the concatenation of an + OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */ + op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP); + cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); + tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; + tree = create_tree (dfa, op, tree1, CONCAT); + if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + + op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; + op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; + return tree; +} + +/* Pass 1 in building the NFA: compute FIRST and create unlinked automaton + nodes. Requires a postorder visit. */ +static reg_errcode_t +calc_first (void *extra, bin_tree_t *node) +{ + re_dfa_t *dfa = (re_dfa_t *) extra; + if (node->token.type == CONCAT) + { + node->first = node->left->first; + node->node_idx = node->left->node_idx; + } + else + { + node->first = node; + node->node_idx = re_dfa_add_node (dfa, node->token); + if (BE (node->node_idx == REG_MISSING, 0)) + return REG_ESPACE; + if (node->token.type == ANCHOR) + dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type; + } + return REG_NOERROR; +} + +/* Pass 2: compute NEXT on the tree. Preorder visit. */ +static reg_errcode_t +calc_next (void *extra, bin_tree_t *node) +{ + switch (node->token.type) + { + case OP_DUP_ASTERISK: + node->left->next = node; + break; + case CONCAT: + node->left->next = node->right->first; + node->right->next = node->next; + break; + default: + if (node->left) + node->left->next = node->next; + if (node->right) + node->right->next = node->next; + break; + } + return REG_NOERROR; +} + +/* Pass 3: link all DFA nodes to their NEXT node (any order will do). */ +static reg_errcode_t +link_nfa_nodes (void *extra, bin_tree_t *node) +{ + re_dfa_t *dfa = (re_dfa_t *) extra; + Idx idx = node->node_idx; + reg_errcode_t err = REG_NOERROR; + + switch (node->token.type) + { + case CONCAT: + break; + + case END_OF_RE: + assert (node->next == NULL); + break; + + case OP_DUP_ASTERISK: + case OP_ALT: + { + Idx left, right; + dfa->has_plural_match = 1; + if (node->left != NULL) + left = node->left->first->node_idx; + else + left = node->next->node_idx; + if (node->right != NULL) + right = node->right->first->node_idx; + else + right = node->next->node_idx; + assert (REG_VALID_INDEX (left)); + assert (REG_VALID_INDEX (right)); + err = re_node_set_init_2 (dfa->edests + idx, left, right); + } + break; + + case ANCHOR: + case OP_OPEN_SUBEXP: + case OP_CLOSE_SUBEXP: + err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); + break; + + case OP_BACK_REF: + dfa->nexts[idx] = node->next->node_idx; + if (node->token.type == OP_BACK_REF) + err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); + break; + + default: + assert (!IS_EPSILON_NODE (node->token.type)); + dfa->nexts[idx] = node->next->node_idx; + break; + } + + return err; +} + +/* Duplicate the epsilon closure of the node ROOT_NODE. + Note that duplicated nodes have constraint INIT_CONSTRAINT in addition + to their own constraint. */ + +static reg_errcode_t +internal_function +duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node, + Idx root_node, unsigned int init_constraint) +{ + Idx org_node, clone_node; + bool ok; + unsigned int constraint = init_constraint; + for (org_node = top_org_node, clone_node = top_clone_node;;) + { + Idx org_dest, clone_dest; + if (dfa->nodes[org_node].type == OP_BACK_REF) + { + /* If the back reference epsilon-transit, its destination must + also have the constraint. Then duplicate the epsilon closure + of the destination of the back reference, and store it in + edests of the back reference. */ + org_dest = dfa->nexts[org_node]; + re_node_set_empty (dfa->edests + clone_node); + clone_dest = duplicate_node (dfa, org_dest, constraint); + if (BE (clone_dest == REG_MISSING, 0)) + return REG_ESPACE; + dfa->nexts[clone_node] = dfa->nexts[org_node]; + ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + } + else if (dfa->edests[org_node].nelem == 0) + { + /* In case of the node can't epsilon-transit, don't duplicate the + destination and store the original destination as the + destination of the node. */ + dfa->nexts[clone_node] = dfa->nexts[org_node]; + break; + } + else if (dfa->edests[org_node].nelem == 1) + { + /* In case of the node can epsilon-transit, and it has only one + destination. */ + org_dest = dfa->edests[org_node].elems[0]; + re_node_set_empty (dfa->edests + clone_node); + /* If the node is root_node itself, it means the epsilon closure + has a loop. Then tie it to the destination of the root_node. */ + if (org_node == root_node && clone_node != org_node) + { + ok = re_node_set_insert (dfa->edests + clone_node, org_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + break; + } + /* In case the node has another constraint, append it. */ + constraint |= dfa->nodes[org_node].constraint; + clone_dest = duplicate_node (dfa, org_dest, constraint); + if (BE (clone_dest == REG_MISSING, 0)) + return REG_ESPACE; + ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + } + else /* dfa->edests[org_node].nelem == 2 */ + { + /* In case of the node can epsilon-transit, and it has two + destinations. In the bin_tree_t and DFA, that's '|' and '*'. */ + org_dest = dfa->edests[org_node].elems[0]; + re_node_set_empty (dfa->edests + clone_node); + /* Search for a duplicated node which satisfies the constraint. */ + clone_dest = search_duplicated_node (dfa, org_dest, constraint); + if (clone_dest == REG_MISSING) + { + /* There is no such duplicated node, create a new one. */ + reg_errcode_t err; + clone_dest = duplicate_node (dfa, org_dest, constraint); + if (BE (clone_dest == REG_MISSING, 0)) + return REG_ESPACE; + ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + err = duplicate_node_closure (dfa, org_dest, clone_dest, + root_node, constraint); + if (BE (err != REG_NOERROR, 0)) + return err; + } + else + { + /* There is a duplicated node which satisfies the constraint, + use it to avoid infinite loop. */ + ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + } + + org_dest = dfa->edests[org_node].elems[1]; + clone_dest = duplicate_node (dfa, org_dest, constraint); + if (BE (clone_dest == REG_MISSING, 0)) + return REG_ESPACE; + ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); + if (BE (! ok, 0)) + return REG_ESPACE; + } + org_node = org_dest; + clone_node = clone_dest; + } + return REG_NOERROR; +} + +/* Search for a node which is duplicated from the node ORG_NODE, and + satisfies the constraint CONSTRAINT. */ + +static Idx +search_duplicated_node (const re_dfa_t *dfa, Idx org_node, + unsigned int constraint) +{ + Idx idx; + for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) + { + if (org_node == dfa->org_indices[idx] + && constraint == dfa->nodes[idx].constraint) + return idx; /* Found. */ + } + return REG_MISSING; /* Not found. */ +} + +/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. + Return the index of the new node, or REG_MISSING if insufficient storage is + available. */ + +static Idx +duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint) +{ + Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); + if (BE (dup_idx != REG_MISSING, 1)) + { + dfa->nodes[dup_idx].constraint = constraint; + dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; + dfa->nodes[dup_idx].duplicated = 1; + + /* Store the index of the original node. */ + dfa->org_indices[dup_idx] = org_idx; + } + return dup_idx; +} + +static reg_errcode_t +calc_inveclosure (re_dfa_t *dfa) +{ + Idx src, idx; + bool ok; + for (idx = 0; idx < dfa->nodes_len; ++idx) + re_node_set_init_empty (dfa->inveclosures + idx); + + for (src = 0; src < dfa->nodes_len; ++src) + { + Idx *elems = dfa->eclosures[src].elems; + for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) + { + ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); + if (BE (! ok, 0)) + return REG_ESPACE; + } + } + + return REG_NOERROR; +} + +/* Calculate "eclosure" for all the node in DFA. */ + +static reg_errcode_t +calc_eclosure (re_dfa_t *dfa) +{ + Idx node_idx; + bool incomplete; +#ifdef DEBUG + assert (dfa->nodes_len > 0); +#endif + incomplete = false; + /* For each nodes, calculate epsilon closure. */ + for (node_idx = 0; ; ++node_idx) + { + reg_errcode_t err; + re_node_set eclosure_elem; + if (node_idx == dfa->nodes_len) + { + if (!incomplete) + break; + incomplete = false; + node_idx = 0; + } + +#ifdef DEBUG + assert (dfa->eclosures[node_idx].nelem != REG_MISSING); +#endif + + /* If we have already calculated, skip it. */ + if (dfa->eclosures[node_idx].nelem != 0) + continue; + /* Calculate epsilon closure of 'node_idx'. */ + err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true); + if (BE (err != REG_NOERROR, 0)) + return err; + + if (dfa->eclosures[node_idx].nelem == 0) + { + incomplete = true; + re_node_set_free (&eclosure_elem); + } + } + return REG_NOERROR; +} + +/* Calculate epsilon closure of NODE. */ + +static reg_errcode_t +calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) +{ + reg_errcode_t err; + Idx i; + re_node_set eclosure; + bool ok; + bool incomplete = false; + err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); + if (BE (err != REG_NOERROR, 0)) + return err; + + /* This indicates that we are calculating this node now. + We reference this value to avoid infinite loop. */ + dfa->eclosures[node].nelem = REG_MISSING; + + /* If the current node has constraints, duplicate all nodes + since they must inherit the constraints. */ + if (dfa->nodes[node].constraint + && dfa->edests[node].nelem + && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) + { + err = duplicate_node_closure (dfa, node, node, node, + dfa->nodes[node].constraint); + if (BE (err != REG_NOERROR, 0)) + return err; + } + + /* Expand each epsilon destination nodes. */ + if (IS_EPSILON_NODE(dfa->nodes[node].type)) + for (i = 0; i < dfa->edests[node].nelem; ++i) + { + re_node_set eclosure_elem; + Idx edest = dfa->edests[node].elems[i]; + /* If calculating the epsilon closure of 'edest' is in progress, + return intermediate result. */ + if (dfa->eclosures[edest].nelem == REG_MISSING) + { + incomplete = true; + continue; + } + /* If we haven't calculated the epsilon closure of 'edest' yet, + calculate now. Otherwise use calculated epsilon closure. */ + if (dfa->eclosures[edest].nelem == 0) + { + err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false); + if (BE (err != REG_NOERROR, 0)) + return err; + } + else + eclosure_elem = dfa->eclosures[edest]; + /* Merge the epsilon closure of 'edest'. */ + err = re_node_set_merge (&eclosure, &eclosure_elem); + if (BE (err != REG_NOERROR, 0)) + return err; + /* If the epsilon closure of 'edest' is incomplete, + the epsilon closure of this node is also incomplete. */ + if (dfa->eclosures[edest].nelem == 0) + { + incomplete = true; + re_node_set_free (&eclosure_elem); + } + } + + /* An epsilon closure includes itself. */ + ok = re_node_set_insert (&eclosure, node); + if (BE (! ok, 0)) + return REG_ESPACE; + if (incomplete && !root) + dfa->eclosures[node].nelem = 0; + else + dfa->eclosures[node] = eclosure; + *new_set = eclosure; + return REG_NOERROR; +} + +/* Functions for token which are used in the parser. */ + +/* Fetch a token from INPUT. + We must not use this function inside bracket expressions. */ + +static void +internal_function +fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) +{ + re_string_skip_bytes (input, peek_token (result, input, syntax)); +} + +/* Peek a token from INPUT, and return the length of the token. + We must not use this function inside bracket expressions. */ + +static int +internal_function +peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) +{ + unsigned char c; + + if (re_string_eoi (input)) + { + token->type = END_OF_RE; + return 0; + } + + c = re_string_peek_byte (input, 0); + token->opr.c = c; + + token->word_char = 0; +#ifdef RE_ENABLE_I18N + token->mb_partial = 0; + if (input->mb_cur_max > 1 && + !re_string_first_byte (input, re_string_cur_idx (input))) + { + token->type = CHARACTER; + token->mb_partial = 1; + return 1; + } +#endif + if (c == '\\') + { + unsigned char c2; + if (re_string_cur_idx (input) + 1 >= re_string_length (input)) + { + token->type = BACK_SLASH; + return 1; + } + + c2 = re_string_peek_byte_case (input, 1); + token->opr.c = c2; + token->type = CHARACTER; +#ifdef RE_ENABLE_I18N + if (input->mb_cur_max > 1) + { + wint_t wc = re_string_wchar_at (input, + re_string_cur_idx (input) + 1); + token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; + } + else +#endif + token->word_char = IS_WORD_CHAR (c2) != 0; + + switch (c2) + { + case '|': + if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) + token->type = OP_ALT; + break; + case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + if (!(syntax & RE_NO_BK_REFS)) + { + token->type = OP_BACK_REF; + token->opr.idx = c2 - '1'; + } + break; + case '<': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = WORD_FIRST; + } + break; + case '>': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = WORD_LAST; + } + break; + case 'b': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = WORD_DELIM; + } + break; + case 'B': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = NOT_WORD_DELIM; + } + break; + case 'w': + if (!(syntax & RE_NO_GNU_OPS)) + token->type = OP_WORD; + break; + case 'W': + if (!(syntax & RE_NO_GNU_OPS)) + token->type = OP_NOTWORD; + break; + case 's': + if (!(syntax & RE_NO_GNU_OPS)) + token->type = OP_SPACE; + break; + case 'S': + if (!(syntax & RE_NO_GNU_OPS)) + token->type = OP_NOTSPACE; + break; + case '`': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = BUF_FIRST; + } + break; + case '\'': + if (!(syntax & RE_NO_GNU_OPS)) + { + token->type = ANCHOR; + token->opr.ctx_type = BUF_LAST; + } + break; + case '(': + if (!(syntax & RE_NO_BK_PARENS)) + token->type = OP_OPEN_SUBEXP; + break; + case ')': + if (!(syntax & RE_NO_BK_PARENS)) + token->type = OP_CLOSE_SUBEXP; + break; + case '+': + if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) + token->type = OP_DUP_PLUS; + break; + case '?': + if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) + token->type = OP_DUP_QUESTION; + break; + case '{': + if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) + token->type = OP_OPEN_DUP_NUM; + break; + case '}': + if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) + token->type = OP_CLOSE_DUP_NUM; + break; + default: + break; + } + return 2; + } + + token->type = CHARACTER; +#ifdef RE_ENABLE_I18N + if (input->mb_cur_max > 1) + { + wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); + token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; + } + else +#endif + token->word_char = IS_WORD_CHAR (token->opr.c); + + switch (c) + { + case '\n': + if (syntax & RE_NEWLINE_ALT) + token->type = OP_ALT; + break; + case '|': + if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) + token->type = OP_ALT; + break; + case '*': + token->type = OP_DUP_ASTERISK; + break; + case '+': + if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) + token->type = OP_DUP_PLUS; + break; + case '?': + if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) + token->type = OP_DUP_QUESTION; + break; + case '{': + if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) + token->type = OP_OPEN_DUP_NUM; + break; + case '}': + if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) + token->type = OP_CLOSE_DUP_NUM; + break; + case '(': + if (syntax & RE_NO_BK_PARENS) + token->type = OP_OPEN_SUBEXP; + break; + case ')': + if (syntax & RE_NO_BK_PARENS) + token->type = OP_CLOSE_SUBEXP; + break; + case '[': + token->type = OP_OPEN_BRACKET; + break; + case '.': + token->type = OP_PERIOD; + break; + case '^': + if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && + re_string_cur_idx (input) != 0) + { + char prev = re_string_peek_byte (input, -1); + if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') + break; + } + token->type = ANCHOR; + token->opr.ctx_type = LINE_FIRST; + break; + case '$': + if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && + re_string_cur_idx (input) + 1 != re_string_length (input)) + { + re_token_t next; + re_string_skip_bytes (input, 1); + peek_token (&next, input, syntax); + re_string_skip_bytes (input, -1); + if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) + break; + } + token->type = ANCHOR; + token->opr.ctx_type = LINE_LAST; + break; + default: + break; + } + return 1; +} + +/* Peek a token from INPUT, and return the length of the token. + We must not use this function out of bracket expressions. */ + +static int +internal_function +peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) +{ + unsigned char c; + if (re_string_eoi (input)) + { + token->type = END_OF_RE; + return 0; + } + c = re_string_peek_byte (input, 0); + token->opr.c = c; + +#ifdef RE_ENABLE_I18N + if (input->mb_cur_max > 1 && + !re_string_first_byte (input, re_string_cur_idx (input))) + { + token->type = CHARACTER; + return 1; + } +#endif /* RE_ENABLE_I18N */ + + if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) + && re_string_cur_idx (input) + 1 < re_string_length (input)) + { + /* In this case, '\' escape a character. */ + unsigned char c2; + re_string_skip_bytes (input, 1); + c2 = re_string_peek_byte (input, 0); + token->opr.c = c2; + token->type = CHARACTER; + return 1; + } + if (c == '[') /* '[' is a special char in a bracket exps. */ + { + unsigned char c2; + int token_len; + if (re_string_cur_idx (input) + 1 < re_string_length (input)) + c2 = re_string_peek_byte (input, 1); + else + c2 = 0; + token->opr.c = c2; + token_len = 2; + switch (c2) + { + case '.': + token->type = OP_OPEN_COLL_ELEM; + break; + case '=': + token->type = OP_OPEN_EQUIV_CLASS; + break; + case ':': + if (syntax & RE_CHAR_CLASSES) + { + token->type = OP_OPEN_CHAR_CLASS; + break; + } + /* else fall through. */ + default: + token->type = CHARACTER; + token->opr.c = c; + token_len = 1; + break; + } + return token_len; + } + switch (c) + { + case '-': + token->type = OP_CHARSET_RANGE; + break; + case ']': + token->type = OP_CLOSE_BRACKET; + break; + case '^': + token->type = OP_NON_MATCH_LIST; + break; + default: + token->type = CHARACTER; + } + return 1; +} + +/* Functions for parser. */ + +/* Entry point of the parser. + Parse the regular expression REGEXP and return the structure tree. + If an error occurs, ERR is set by error code, and return NULL. + This function build the following tree, from regular expression : + CAT + / \ + / \ + EOR + + CAT means concatenation. + EOR means end of regular expression. */ + +static bin_tree_t * +parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, + reg_errcode_t *err) +{ + re_dfa_t *dfa = preg->buffer; + bin_tree_t *tree, *eor, *root; + re_token_t current_token; + dfa->syntax = syntax; + fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); + tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + eor = create_tree (dfa, NULL, NULL, END_OF_RE); + if (tree != NULL) + root = create_tree (dfa, tree, eor, CONCAT); + else + root = eor; + if (BE (eor == NULL || root == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + return root; +} + +/* This function build the following tree, from regular expression + |: + ALT + / \ + / \ + + + ALT means alternative, which represents the operator '|'. */ + +static bin_tree_t * +parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, + reg_syntax_t syntax, Idx nest, reg_errcode_t *err) +{ + re_dfa_t *dfa = preg->buffer; + bin_tree_t *tree, *branch = NULL; + tree = parse_branch (regexp, preg, token, syntax, nest, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + + while (token->type == OP_ALT) + { + fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); + if (token->type != OP_ALT && token->type != END_OF_RE + && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) + { + branch = parse_branch (regexp, preg, token, syntax, nest, err); + if (BE (*err != REG_NOERROR && branch == NULL, 0)) + return NULL; + } + else + branch = NULL; + tree = create_tree (dfa, tree, branch, OP_ALT); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + } + return tree; +} + +/* This function build the following tree, from regular expression + : + CAT + / \ + / \ + + + CAT means concatenation. */ + +static bin_tree_t * +parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, + reg_syntax_t syntax, Idx nest, reg_errcode_t *err) +{ + bin_tree_t *tree, *expr; + re_dfa_t *dfa = preg->buffer; + tree = parse_expression (regexp, preg, token, syntax, nest, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + + while (token->type != OP_ALT && token->type != END_OF_RE + && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) + { + expr = parse_expression (regexp, preg, token, syntax, nest, err); + if (BE (*err != REG_NOERROR && expr == NULL, 0)) + { + if (tree != NULL) + postorder (tree, free_tree, NULL); + return NULL; + } + if (tree != NULL && expr != NULL) + { + bin_tree_t *newtree = create_tree (dfa, tree, expr, CONCAT); + if (newtree == NULL) + { + postorder (expr, free_tree, NULL); + postorder (tree, free_tree, NULL); + *err = REG_ESPACE; + return NULL; + } + tree = newtree; + } + else if (tree == NULL) + tree = expr; + /* Otherwise expr == NULL, we don't need to create new tree. */ + } + return tree; +} + +/* This function build the following tree, from regular expression a*: + * + | + a +*/ + +static bin_tree_t * +parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, + reg_syntax_t syntax, Idx nest, reg_errcode_t *err) +{ + re_dfa_t *dfa = preg->buffer; + bin_tree_t *tree; + switch (token->type) + { + case CHARACTER: + tree = create_token_tree (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + { + while (!re_string_eoi (regexp) + && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) + { + bin_tree_t *mbc_remain; + fetch_token (token, regexp, syntax); + mbc_remain = create_token_tree (dfa, NULL, NULL, token); + tree = create_tree (dfa, tree, mbc_remain, CONCAT); + if (BE (mbc_remain == NULL || tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + } + } +#endif + break; + case OP_OPEN_SUBEXP: + tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + break; + case OP_OPEN_BRACKET: + tree = parse_bracket_exp (regexp, dfa, token, syntax, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + break; + case OP_BACK_REF: + if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) + { + *err = REG_ESUBREG; + return NULL; + } + dfa->used_bkref_map |= 1 << token->opr.idx; + tree = create_token_tree (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + ++dfa->nbackref; + dfa->has_mb_node = 1; + break; + case OP_OPEN_DUP_NUM: + if (syntax & RE_CONTEXT_INVALID_DUP) + { + *err = REG_BADRPT; + return NULL; + } + /* FALLTHROUGH */ + case OP_DUP_ASTERISK: + case OP_DUP_PLUS: + case OP_DUP_QUESTION: + if (syntax & RE_CONTEXT_INVALID_OPS) + { + *err = REG_BADRPT; + return NULL; + } + else if (syntax & RE_CONTEXT_INDEP_OPS) + { + fetch_token (token, regexp, syntax); + return parse_expression (regexp, preg, token, syntax, nest, err); + } + /* else fall through */ + case OP_CLOSE_SUBEXP: + if ((token->type == OP_CLOSE_SUBEXP) && + !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) + { + *err = REG_ERPAREN; + return NULL; + } + /* else fall through */ + case OP_CLOSE_DUP_NUM: + /* We treat it as a normal character. */ + + /* Then we can these characters as normal characters. */ + token->type = CHARACTER; + /* mb_partial and word_char bits should be initialized already + by peek_token. */ + tree = create_token_tree (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + break; + case ANCHOR: + if ((token->opr.ctx_type + & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) + && dfa->word_ops_used == 0) + init_word_char (dfa); + if (token->opr.ctx_type == WORD_DELIM + || token->opr.ctx_type == NOT_WORD_DELIM) + { + bin_tree_t *tree_first, *tree_last; + if (token->opr.ctx_type == WORD_DELIM) + { + token->opr.ctx_type = WORD_FIRST; + tree_first = create_token_tree (dfa, NULL, NULL, token); + token->opr.ctx_type = WORD_LAST; + } + else + { + token->opr.ctx_type = INSIDE_WORD; + tree_first = create_token_tree (dfa, NULL, NULL, token); + token->opr.ctx_type = INSIDE_NOTWORD; + } + tree_last = create_token_tree (dfa, NULL, NULL, token); + tree = create_tree (dfa, tree_first, tree_last, OP_ALT); + if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + } + else + { + tree = create_token_tree (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + } + /* We must return here, since ANCHORs can't be followed + by repetition operators. + eg. RE"^*" is invalid or "", + it must not be "". */ + fetch_token (token, regexp, syntax); + return tree; + case OP_PERIOD: + tree = create_token_tree (dfa, NULL, NULL, token); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + if (dfa->mb_cur_max > 1) + dfa->has_mb_node = 1; + break; + case OP_WORD: + case OP_NOTWORD: + tree = build_charclass_op (dfa, regexp->trans, + "alnum", + "_", + token->type == OP_NOTWORD, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + break; + case OP_SPACE: + case OP_NOTSPACE: + tree = build_charclass_op (dfa, regexp->trans, + "space", + "", + token->type == OP_NOTSPACE, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + break; + case OP_ALT: + case END_OF_RE: + return NULL; + case BACK_SLASH: + *err = REG_EESCAPE; + return NULL; + default: + /* Must not happen? */ +#ifdef DEBUG + assert (0); +#endif + return NULL; + } + fetch_token (token, regexp, syntax); + + while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS + || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) + { + tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); + if (BE (*err != REG_NOERROR && tree == NULL, 0)) + return NULL; + /* In BRE consecutive duplications are not allowed. */ + if ((syntax & RE_CONTEXT_INVALID_DUP) + && (token->type == OP_DUP_ASTERISK + || token->type == OP_OPEN_DUP_NUM)) + { + *err = REG_BADRPT; + return NULL; + } + } + + return tree; +} + +/* This function build the following tree, from regular expression + (): + SUBEXP + | + +*/ + +static bin_tree_t * +parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, + reg_syntax_t syntax, Idx nest, reg_errcode_t *err) +{ + re_dfa_t *dfa = preg->buffer; + bin_tree_t *tree; + size_t cur_nsub; + cur_nsub = preg->re_nsub++; + + fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); + + /* The subexpression may be a null string. */ + if (token->type == OP_CLOSE_SUBEXP) + tree = NULL; + else + { + tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); + if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) + { + if (tree != NULL) + postorder (tree, free_tree, NULL); + *err = REG_EPAREN; + } + if (BE (*err != REG_NOERROR, 0)) + return NULL; + } + + if (cur_nsub <= '9' - '1') + dfa->completed_bkref_map |= 1 << cur_nsub; + + tree = create_tree (dfa, tree, NULL, SUBEXP); + if (BE (tree == NULL, 0)) + { + *err = REG_ESPACE; + return NULL; + } + tree->token.opr.idx = cur_nsub; + return tree; +} + +/* This function parse repetition operators like "*", "+", "{1,3}" etc. */ + +static bin_tree_t * +parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, + re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) +{ + bin_tree_t *tree = NULL, *old_tree = NULL; + Idx i, start, end, start_idx = re_string_cur_idx (regexp); + re_token_t start_token = *token; + + if (token->type == OP_OPEN_DUP_NUM) + { + end = 0; + start = fetch_number (regexp, token, syntax); + if (start == REG_MISSING) + { + if (token->type == CHARACTER && token->opr.c == ',') + start = 0; /* We treat "{,m}" as "{0,m}". */ + else + { + *err = REG_BADBR; /* {} is invalid. */ + return NULL; + } + } + if (BE (start != REG_ERROR, 1)) + { + /* We treat "{n}" as "{n,n}". */ + end = ((token->type == OP_CLOSE_DUP_NUM) ? start + : ((token->type == CHARACTER && token->opr.c == ',') + ? fetch_number (regexp, token, syntax) : REG_ERROR)); + } + if (BE (start == REG_ERROR || end == REG_ERROR, 0)) + { + /* Invalid sequence. */ + if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) + { + if (token->type == END_OF_RE) + *err = REG_EBRACE; + else + *err = REG_BADBR; + + return NULL; + } + + /* If the syntax bit is set, rollback. */ + re_string_set_index (regexp, start_idx); + *token = start_token; + token->type = CHARACTER; + /* mb_partial and word_char bits should be already initialized by + peek_token. */ + return elem; + } + + if (BE ((end != REG_MISSING && start > end) + || token->type != OP_CLOSE_DUP_NUM, 0)) + { + /* First number greater than second. */ + *err = REG_BADBR; + return NULL; + } + + if (BE (RE_DUP_MAX < (end == REG_MISSING ? start : end), 0)) + { + *err = REG_ESIZE; + return NULL; + } + } + else + { + start = (token->type == OP_DUP_PLUS) ? 1 : 0; + end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING; + } + + fetch_token (token, regexp, syntax); + + if (BE (elem == NULL, 0)) + return NULL; + if (BE (start == 0 && end == 0, 0)) + { + postorder (elem, free_tree, NULL); + return NULL; + } + + /* Extract "{n,m}" to "...{0,}". */ + if (BE (start > 0, 0)) + { + tree = elem; + for (i = 2; i <= start; ++i) + { + elem = duplicate_tree (elem, dfa); + tree = create_tree (dfa, tree, elem, CONCAT); + if (BE (elem == NULL || tree == NULL, 0)) + goto parse_dup_op_espace; + } + + if (start == end) + return tree; + + /* Duplicate ELEM before it is marked optional. */ + elem = duplicate_tree (elem, dfa); + old_tree = tree; + } + else + old_tree = NULL; + + if (elem->token.type == SUBEXP) + { + uintptr_t subidx = elem->token.opr.idx; + postorder (elem, mark_opt_subexp, (void *) subidx); + } + + tree = create_tree (dfa, elem, NULL, + (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT)); + if (BE (tree == NULL, 0)) + goto parse_dup_op_espace; + +/* From gnulib's "intprops.h": + True if the arithmetic type T is signed. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + + /* This loop is actually executed only when end != REG_MISSING, + to rewrite {0,n} as ((...?)?)?... We have + already created the start+1-th copy. */ + if (TYPE_SIGNED (Idx) || end != REG_MISSING) + for (i = start + 2; i <= end; ++i) + { + elem = duplicate_tree (elem, dfa); + tree = create_tree (dfa, tree, elem, CONCAT); + if (BE (elem == NULL || tree == NULL, 0)) + goto parse_dup_op_espace; + + tree = create_tree (dfa, tree, NULL, OP_ALT); + if (BE (tree == NULL, 0)) + goto parse_dup_op_espace; + } + + if (old_tree) + tree = create_tree (dfa, old_tree, tree, CONCAT); + + return tree; + + parse_dup_op_espace: + *err = REG_ESPACE; + return NULL; +} + +/* Size of the names for collating symbol/equivalence_class/character_class. + I'm not sure, but maybe enough. */ +#define BRACKET_NAME_BUF_SIZE 32 + +#ifndef _LIBC + /* Local function for parse_bracket_exp only used in case of NOT _LIBC. + Build the range expression which starts from START_ELEM, and ends + at END_ELEM. The result are written to MBCSET and SBCSET. + RANGE_ALLOC is the allocated size of mbcset->range_starts, and + mbcset->range_ends, is a pointer argument since we may + update it. */ + +static reg_errcode_t +internal_function +# ifdef RE_ENABLE_I18N +build_range_exp (const reg_syntax_t syntax, + bitset_t sbcset, + re_charset_t *mbcset, + Idx *range_alloc, + const bracket_elem_t *start_elem, + const bracket_elem_t *end_elem) +# else /* not RE_ENABLE_I18N */ +build_range_exp (const reg_syntax_t syntax, + bitset_t sbcset, + const bracket_elem_t *start_elem, + const bracket_elem_t *end_elem) +# endif /* not RE_ENABLE_I18N */ +{ + unsigned int start_ch, end_ch; + /* Equivalence Classes and Character Classes can't be a range start/end. */ + if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS + || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, + 0)) + return REG_ERANGE; + + /* We can handle no multi character collating elements without libc + support. */ + if (BE ((start_elem->type == COLL_SYM + && strlen ((char *) start_elem->opr.name) > 1) + || (end_elem->type == COLL_SYM + && strlen ((char *) end_elem->opr.name) > 1), 0)) + return REG_ECOLLATE; + +# ifdef RE_ENABLE_I18N + { + wchar_t wc; + wint_t start_wc; + wint_t end_wc; + + start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch + : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] + : 0)); + end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch + : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] + : 0)); + start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) + ? __btowc (start_ch) : start_elem->opr.wch); + end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) + ? __btowc (end_ch) : end_elem->opr.wch); + if (start_wc == WEOF || end_wc == WEOF) + return REG_ECOLLATE; + else if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_wc > end_wc, 0)) + return REG_ERANGE; + + /* Got valid collation sequence values, add them as a new entry. + However, for !_LIBC we have no collation elements: if the + character set is single byte, the single byte character set + that we build below suffices. parse_bracket_exp passes + no MBCSET if dfa->mb_cur_max == 1. */ + if (mbcset) + { + /* Check the space of the arrays. */ + if (BE (*range_alloc == mbcset->nranges, 0)) + { + /* There is not enough space, need realloc. */ + wchar_t *new_array_start, *new_array_end; + Idx new_nranges; + + /* +1 in case of mbcset->nranges is 0. */ + new_nranges = 2 * mbcset->nranges + 1; + /* Use realloc since mbcset->range_starts and mbcset->range_ends + are NULL if *range_alloc == 0. */ + new_array_start = re_realloc (mbcset->range_starts, wchar_t, + new_nranges); + new_array_end = re_realloc (mbcset->range_ends, wchar_t, + new_nranges); + + if (BE (new_array_start == NULL || new_array_end == NULL, 0)) + return REG_ESPACE; + + mbcset->range_starts = new_array_start; + mbcset->range_ends = new_array_end; + *range_alloc = new_nranges; + } + + mbcset->range_starts[mbcset->nranges] = start_wc; + mbcset->range_ends[mbcset->nranges++] = end_wc; + } + + /* Build the table for single byte characters. */ + for (wc = 0; wc < SBC_MAX; ++wc) + { + if (start_wc <= wc && wc <= end_wc) + bitset_set (sbcset, wc); + } + } +# else /* not RE_ENABLE_I18N */ + { + unsigned int ch; + start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch + : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] + : 0)); + end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch + : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] + : 0)); + if (start_ch > end_ch) + return REG_ERANGE; + /* Build the table for single byte characters. */ + for (ch = 0; ch < SBC_MAX; ++ch) + if (start_ch <= ch && ch <= end_ch) + bitset_set (sbcset, ch); + } +# endif /* not RE_ENABLE_I18N */ + return REG_NOERROR; +} +#endif /* not _LIBC */ + +#ifndef _LIBC +/* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. + Build the collating element which is represented by NAME. + The result are written to MBCSET and SBCSET. + COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a + pointer argument since we may update it. */ + +static reg_errcode_t +internal_function +# ifdef RE_ENABLE_I18N +build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, + Idx *coll_sym_alloc, const unsigned char *name) +# else /* not RE_ENABLE_I18N */ +build_collating_symbol (bitset_t sbcset, const unsigned char *name) +# endif /* not RE_ENABLE_I18N */ +{ + size_t name_len = strlen ((const char *) name); + if (BE (name_len != 1, 0)) + return REG_ECOLLATE; + else + { + bitset_set (sbcset, name[0]); + return REG_NOERROR; + } +} +#endif /* not _LIBC */ + +/* This function parse bracket expression like "[abc]", "[a-c]", + "[[.a-a.]]" etc. */ + +static bin_tree_t * +parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, + reg_syntax_t syntax, reg_errcode_t *err) +{ +#ifdef _LIBC + const unsigned char *collseqmb; + const char *collseqwc; + uint32_t nrules; + int32_t table_size; + const int32_t *symb_table; + const unsigned char *extra; + + /* Local function for parse_bracket_exp used in _LIBC environment. + Seek the collating symbol entry corresponding to NAME. + Return the index of the symbol in the SYMB_TABLE, + or -1 if not found. */ + + auto inline int32_t + __attribute__ ((always_inline)) + seek_collating_symbol_entry (const unsigned char *name, size_t name_len) + { + int32_t elem; + + for (elem = 0; elem < table_size; elem++) + if (symb_table[2 * elem] != 0) + { + int32_t idx = symb_table[2 * elem + 1]; + /* Skip the name of collating element name. */ + idx += 1 + extra[idx]; + if (/* Compare the length of the name. */ + name_len == extra[idx] + /* Compare the name. */ + && memcmp (name, &extra[idx + 1], name_len) == 0) + /* Yep, this is the entry. */ + return elem; + } + return -1; + } + + /* Local function for parse_bracket_exp used in _LIBC environment. + Look up the collation sequence value of BR_ELEM. + Return the value if succeeded, UINT_MAX otherwise. */ + + auto inline unsigned int + __attribute__ ((always_inline)) + lookup_collation_sequence_value (bracket_elem_t *br_elem) + { + if (br_elem->type == SB_CHAR) + { + /* + if (MB_CUR_MAX == 1) + */ + if (nrules == 0) + return collseqmb[br_elem->opr.ch]; + else + { + wint_t wc = __btowc (br_elem->opr.ch); + return __collseq_table_lookup (collseqwc, wc); + } + } + else if (br_elem->type == MB_CHAR) + { + if (nrules != 0) + return __collseq_table_lookup (collseqwc, br_elem->opr.wch); + } + else if (br_elem->type == COLL_SYM) + { + size_t sym_name_len = strlen ((char *) br_elem->opr.name); + if (nrules != 0) + { + int32_t elem, idx; + elem = seek_collating_symbol_entry (br_elem->opr.name, + sym_name_len); + if (elem != -1) + { + /* We found the entry. */ + idx = symb_table[2 * elem + 1]; + /* Skip the name of collating element name. */ + idx += 1 + extra[idx]; + /* Skip the byte sequence of the collating element. */ + idx += 1 + extra[idx]; + /* Adjust for the alignment. */ + idx = (idx + 3) & ~3; + /* Skip the multibyte collation sequence value. */ + idx += sizeof (unsigned int); + /* Skip the wide char sequence of the collating element. */ + idx += sizeof (unsigned int) * + (1 + *(unsigned int *) (extra + idx)); + /* Return the collation sequence value. */ + return *(unsigned int *) (extra + idx); + } + else if (sym_name_len == 1) + { + /* No valid character. Match it as a single byte + character. */ + return collseqmb[br_elem->opr.name[0]]; + } + } + else if (sym_name_len == 1) + return collseqmb[br_elem->opr.name[0]]; + } + return UINT_MAX; + } + + /* Local function for parse_bracket_exp used in _LIBC environment. + Build the range expression which starts from START_ELEM, and ends + at END_ELEM. The result are written to MBCSET and SBCSET. + RANGE_ALLOC is the allocated size of mbcset->range_starts, and + mbcset->range_ends, is a pointer argument since we may + update it. */ + + auto inline reg_errcode_t + __attribute__ ((always_inline)) + build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc, + bracket_elem_t *start_elem, bracket_elem_t *end_elem) + { + unsigned int ch; + uint32_t start_collseq; + uint32_t end_collseq; + + /* Equivalence Classes and Character Classes can't be a range + start/end. */ + if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS + || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, + 0)) + return REG_ERANGE; + + /* FIXME: Implement rational ranges here, too. */ + start_collseq = lookup_collation_sequence_value (start_elem); + end_collseq = lookup_collation_sequence_value (end_elem); + /* Check start/end collation sequence values. */ + if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) + return REG_ECOLLATE; + if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) + return REG_ERANGE; + + /* Got valid collation sequence values, add them as a new entry. + However, if we have no collation elements, and the character set + is single byte, the single byte character set that we + build below suffices. */ + if (nrules > 0 || dfa->mb_cur_max > 1) + { + /* Check the space of the arrays. */ + if (BE (*range_alloc == mbcset->nranges, 0)) + { + /* There is not enough space, need realloc. */ + uint32_t *new_array_start; + uint32_t *new_array_end; + Idx new_nranges; + + /* +1 in case of mbcset->nranges is 0. */ + new_nranges = 2 * mbcset->nranges + 1; + new_array_start = re_realloc (mbcset->range_starts, uint32_t, + new_nranges); + new_array_end = re_realloc (mbcset->range_ends, uint32_t, + new_nranges); + + if (BE (new_array_start == NULL || new_array_end == NULL, 0)) + return REG_ESPACE; + + mbcset->range_starts = new_array_start; + mbcset->range_ends = new_array_end; + *range_alloc = new_nranges; + } + + mbcset->range_starts[mbcset->nranges] = start_collseq; + mbcset->range_ends[mbcset->nranges++] = end_collseq; + } + + /* Build the table for single byte characters. */ + for (ch = 0; ch < SBC_MAX; ch++) + { + uint32_t ch_collseq; + /* + if (MB_CUR_MAX == 1) + */ + if (nrules == 0) + ch_collseq = collseqmb[ch]; + else + ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); + if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) + bitset_set (sbcset, ch); + } + return REG_NOERROR; + } + + /* Local function for parse_bracket_exp used in _LIBC environment. + Build the collating element which is represented by NAME. + The result are written to MBCSET and SBCSET. + COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a + pointer argument since we may update it. */ + + auto inline reg_errcode_t + __attribute__ ((always_inline)) + build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, + Idx *coll_sym_alloc, const unsigned char *name) + { + int32_t elem, idx; + size_t name_len = strlen ((const char *) name); + if (nrules != 0) + { + elem = seek_collating_symbol_entry (name, name_len); + if (elem != -1) + { + /* We found the entry. */ + idx = symb_table[2 * elem + 1]; + /* Skip the name of collating element name. */ + idx += 1 + extra[idx]; + } + else if (name_len == 1) + { + /* No valid character, treat it as a normal + character. */ + bitset_set (sbcset, name[0]); + return REG_NOERROR; + } + else + return REG_ECOLLATE; + + /* Got valid collation sequence, add it as a new entry. */ + /* Check the space of the arrays. */ + if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) + { + /* Not enough, realloc it. */ + /* +1 in case of mbcset->ncoll_syms is 0. */ + Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; + /* Use realloc since mbcset->coll_syms is NULL + if *alloc == 0. */ + int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, + new_coll_sym_alloc); + if (BE (new_coll_syms == NULL, 0)) + return REG_ESPACE; + mbcset->coll_syms = new_coll_syms; + *coll_sym_alloc = new_coll_sym_alloc; + } + mbcset->coll_syms[mbcset->ncoll_syms++] = idx; + return REG_NOERROR; + } + else + { + if (BE (name_len != 1, 0)) + return REG_ECOLLATE; + else + { + bitset_set (sbcset, name[0]); + return REG_NOERROR; + } + } + } +#endif + + re_token_t br_token; + re_bitset_ptr_t sbcset; +#ifdef RE_ENABLE_I18N + re_charset_t *mbcset; + Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; + Idx equiv_class_alloc = 0, char_class_alloc = 0; +#endif /* not RE_ENABLE_I18N */ + bool non_match = false; + bin_tree_t *work_tree; + int token_len; + bool first_round = true; +#ifdef _LIBC + collseqmb = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); + nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + if (nrules) + { + /* + if (MB_CUR_MAX > 1) + */ + collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); + table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); + symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_SYMB_TABLEMB); + extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_SYMB_EXTRAMB); + } +#endif + sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); +#ifdef RE_ENABLE_I18N + mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); +#endif /* RE_ENABLE_I18N */ +#ifdef RE_ENABLE_I18N + if (BE (sbcset == NULL || mbcset == NULL, 0)) +#else + if (BE (sbcset == NULL, 0)) +#endif /* RE_ENABLE_I18N */ + { + re_free (sbcset); +#ifdef RE_ENABLE_I18N + re_free (mbcset); +#endif + *err = REG_ESPACE; + return NULL; + } + + token_len = peek_token_bracket (token, regexp, syntax); + if (BE (token->type == END_OF_RE, 0)) + { + *err = REG_BADPAT; + goto parse_bracket_exp_free_return; + } + if (token->type == OP_NON_MATCH_LIST) + { +#ifdef RE_ENABLE_I18N + mbcset->non_match = 1; +#endif /* not RE_ENABLE_I18N */ + non_match = true; + if (syntax & RE_HAT_LISTS_NOT_NEWLINE) + bitset_set (sbcset, '\n'); + re_string_skip_bytes (regexp, token_len); /* Skip a token. */ + token_len = peek_token_bracket (token, regexp, syntax); + if (BE (token->type == END_OF_RE, 0)) + { + *err = REG_BADPAT; + goto parse_bracket_exp_free_return; + } + } + + /* We treat the first ']' as a normal character. */ + if (token->type == OP_CLOSE_BRACKET) + token->type = CHARACTER; + + while (1) + { + bracket_elem_t start_elem, end_elem; + unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; + unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; + reg_errcode_t ret; + int token_len2 = 0; + bool is_range_exp = false; + re_token_t token2; + + start_elem.opr.name = start_name_buf; + ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, + syntax, first_round); + if (BE (ret != REG_NOERROR, 0)) + { + *err = ret; + goto parse_bracket_exp_free_return; + } + first_round = false; + + /* Get information about the next token. We need it in any case. */ + token_len = peek_token_bracket (token, regexp, syntax); + + /* Do not check for ranges if we know they are not allowed. */ + if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) + { + if (BE (token->type == END_OF_RE, 0)) + { + *err = REG_EBRACK; + goto parse_bracket_exp_free_return; + } + if (token->type == OP_CHARSET_RANGE) + { + re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ + token_len2 = peek_token_bracket (&token2, regexp, syntax); + if (BE (token2.type == END_OF_RE, 0)) + { + *err = REG_EBRACK; + goto parse_bracket_exp_free_return; + } + if (token2.type == OP_CLOSE_BRACKET) + { + /* We treat the last '-' as a normal character. */ + re_string_skip_bytes (regexp, -token_len); + token->type = CHARACTER; + } + else + is_range_exp = true; + } + } + + if (is_range_exp == true) + { + end_elem.opr.name = end_name_buf; + ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, + dfa, syntax, true); + if (BE (ret != REG_NOERROR, 0)) + { + *err = ret; + goto parse_bracket_exp_free_return; + } + + token_len = peek_token_bracket (token, regexp, syntax); + +#ifdef _LIBC + *err = build_range_exp (sbcset, mbcset, &range_alloc, + &start_elem, &end_elem); +#else +# ifdef RE_ENABLE_I18N + *err = build_range_exp (syntax, sbcset, + dfa->mb_cur_max > 1 ? mbcset : NULL, + &range_alloc, &start_elem, &end_elem); +# else + *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem); +# endif +#endif /* RE_ENABLE_I18N */ + if (BE (*err != REG_NOERROR, 0)) + goto parse_bracket_exp_free_return; + } + else + { + switch (start_elem.type) + { + case SB_CHAR: + bitset_set (sbcset, start_elem.opr.ch); + break; +#ifdef RE_ENABLE_I18N + case MB_CHAR: + /* Check whether the array has enough space. */ + if (BE (mbchar_alloc == mbcset->nmbchars, 0)) + { + wchar_t *new_mbchars; + /* Not enough, realloc it. */ + /* +1 in case of mbcset->nmbchars is 0. */ + mbchar_alloc = 2 * mbcset->nmbchars + 1; + /* Use realloc since array is NULL if *alloc == 0. */ + new_mbchars = re_realloc (mbcset->mbchars, wchar_t, + mbchar_alloc); + if (BE (new_mbchars == NULL, 0)) + goto parse_bracket_exp_espace; + mbcset->mbchars = new_mbchars; + } + mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; + break; +#endif /* RE_ENABLE_I18N */ + case EQUIV_CLASS: + *err = build_equiv_class (sbcset, +#ifdef RE_ENABLE_I18N + mbcset, &equiv_class_alloc, +#endif /* RE_ENABLE_I18N */ + start_elem.opr.name); + if (BE (*err != REG_NOERROR, 0)) + goto parse_bracket_exp_free_return; + break; + case COLL_SYM: + *err = build_collating_symbol (sbcset, +#ifdef RE_ENABLE_I18N + mbcset, &coll_sym_alloc, +#endif /* RE_ENABLE_I18N */ + start_elem.opr.name); + if (BE (*err != REG_NOERROR, 0)) + goto parse_bracket_exp_free_return; + break; + case CHAR_CLASS: + *err = build_charclass (regexp->trans, sbcset, +#ifdef RE_ENABLE_I18N + mbcset, &char_class_alloc, +#endif /* RE_ENABLE_I18N */ + (const char *) start_elem.opr.name, + syntax); + if (BE (*err != REG_NOERROR, 0)) + goto parse_bracket_exp_free_return; + break; + default: + assert (0); + break; + } + } + if (BE (token->type == END_OF_RE, 0)) + { + *err = REG_EBRACK; + goto parse_bracket_exp_free_return; + } + if (token->type == OP_CLOSE_BRACKET) + break; + } + + re_string_skip_bytes (regexp, token_len); /* Skip a token. */ + + /* If it is non-matching list. */ + if (non_match) + bitset_not (sbcset); + +#ifdef RE_ENABLE_I18N + /* Ensure only single byte characters are set. */ + if (dfa->mb_cur_max > 1) + bitset_mask (sbcset, dfa->sb_char); + + if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes + || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes + || mbcset->non_match))) + { + bin_tree_t *mbc_tree; + int sbc_idx; + /* Build a tree for complex bracket. */ + dfa->has_mb_node = 1; + br_token.type = COMPLEX_BRACKET; + br_token.opr.mbcset = mbcset; + mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); + if (BE (mbc_tree == NULL, 0)) + goto parse_bracket_exp_espace; + for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) + if (sbcset[sbc_idx]) + break; + /* If there are no bits set in sbcset, there is no point + of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ + if (sbc_idx < BITSET_WORDS) + { + /* Build a tree for simple bracket. */ + br_token.type = SIMPLE_BRACKET; + br_token.opr.sbcset = sbcset; + work_tree = create_token_tree (dfa, NULL, NULL, &br_token); + if (BE (work_tree == NULL, 0)) + goto parse_bracket_exp_espace; + + /* Then join them by ALT node. */ + work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); + if (BE (work_tree == NULL, 0)) + goto parse_bracket_exp_espace; + } + else + { + re_free (sbcset); + work_tree = mbc_tree; + } + } + else +#endif /* not RE_ENABLE_I18N */ + { +#ifdef RE_ENABLE_I18N + free_charset (mbcset); +#endif + /* Build a tree for simple bracket. */ + br_token.type = SIMPLE_BRACKET; + br_token.opr.sbcset = sbcset; + work_tree = create_token_tree (dfa, NULL, NULL, &br_token); + if (BE (work_tree == NULL, 0)) + goto parse_bracket_exp_espace; + } + return work_tree; + + parse_bracket_exp_espace: + *err = REG_ESPACE; + parse_bracket_exp_free_return: + re_free (sbcset); +#ifdef RE_ENABLE_I18N + free_charset (mbcset); +#endif /* RE_ENABLE_I18N */ + return NULL; +} + +/* Parse an element in the bracket expression. */ + +static reg_errcode_t +parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, + re_token_t *token, int token_len, re_dfa_t *dfa, + reg_syntax_t syntax, bool accept_hyphen) +{ +#ifdef RE_ENABLE_I18N + int cur_char_size; + cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); + if (cur_char_size > 1) + { + elem->type = MB_CHAR; + elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); + re_string_skip_bytes (regexp, cur_char_size); + return REG_NOERROR; + } +#endif /* RE_ENABLE_I18N */ + re_string_skip_bytes (regexp, token_len); /* Skip a token. */ + if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS + || token->type == OP_OPEN_EQUIV_CLASS) + return parse_bracket_symbol (elem, regexp, token); + if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) + { + /* A '-' must only appear as anything but a range indicator before + the closing bracket. Everything else is an error. */ + re_token_t token2; + (void) peek_token_bracket (&token2, regexp, syntax); + if (token2.type != OP_CLOSE_BRACKET) + /* The actual error value is not standardized since this whole + case is undefined. But ERANGE makes good sense. */ + return REG_ERANGE; + } + elem->type = SB_CHAR; + elem->opr.ch = token->opr.c; + return REG_NOERROR; +} + +/* Parse a bracket symbol in the bracket expression. Bracket symbols are + such as [::], [..], and + [==]. */ + +static reg_errcode_t +parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, + re_token_t *token) +{ + unsigned char ch, delim = token->opr.c; + int i = 0; + if (re_string_eoi(regexp)) + return REG_EBRACK; + for (;; ++i) + { + if (i >= BRACKET_NAME_BUF_SIZE) + return REG_EBRACK; + if (token->type == OP_OPEN_CHAR_CLASS) + ch = re_string_fetch_byte_case (regexp); + else + ch = re_string_fetch_byte (regexp); + if (re_string_eoi(regexp)) + return REG_EBRACK; + if (ch == delim && re_string_peek_byte (regexp, 0) == ']') + break; + elem->opr.name[i] = ch; + } + re_string_skip_bytes (regexp, 1); + elem->opr.name[i] = '\0'; + switch (token->type) + { + case OP_OPEN_COLL_ELEM: + elem->type = COLL_SYM; + break; + case OP_OPEN_EQUIV_CLASS: + elem->type = EQUIV_CLASS; + break; + case OP_OPEN_CHAR_CLASS: + elem->type = CHAR_CLASS; + break; + default: + break; + } + return REG_NOERROR; +} + + /* Helper function for parse_bracket_exp. + Build the equivalence class which is represented by NAME. + The result are written to MBCSET and SBCSET. + EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, + is a pointer argument since we may update it. */ + +static reg_errcode_t +#ifdef RE_ENABLE_I18N +build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, + Idx *equiv_class_alloc, const unsigned char *name) +#else /* not RE_ENABLE_I18N */ +build_equiv_class (bitset_t sbcset, const unsigned char *name) +#endif /* not RE_ENABLE_I18N */ +{ +#ifdef _LIBC + uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + if (nrules != 0) + { + const int32_t *table, *indirect; + const unsigned char *weights, *extra, *cp; + unsigned char char_buf[2]; + int32_t idx1, idx2; + unsigned int ch; + size_t len; + /* This #include defines a local function! */ +# include + /* Calculate the index for equivalence class. */ + cp = name; + table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); + weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_WEIGHTMB); + extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_EXTRAMB); + indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_INDIRECTMB); + idx1 = findidx (&cp, -1); + if (BE (idx1 == 0 || *cp != '\0', 0)) + /* This isn't a valid character. */ + return REG_ECOLLATE; + + /* Build single byte matching table for this equivalence class. */ + len = weights[idx1 & 0xffffff]; + for (ch = 0; ch < SBC_MAX; ++ch) + { + char_buf[0] = ch; + cp = char_buf; + idx2 = findidx (&cp, 1); +/* + idx2 = table[ch]; +*/ + if (idx2 == 0) + /* This isn't a valid character. */ + continue; + /* Compare only if the length matches and the collation rule + index is the same. */ + if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) + { + int cnt = 0; + + while (cnt <= len && + weights[(idx1 & 0xffffff) + 1 + cnt] + == weights[(idx2 & 0xffffff) + 1 + cnt]) + ++cnt; + + if (cnt > len) + bitset_set (sbcset, ch); + } + } + /* Check whether the array has enough space. */ + if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) + { + /* Not enough, realloc it. */ + /* +1 in case of mbcset->nequiv_classes is 0. */ + Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; + /* Use realloc since the array is NULL if *alloc == 0. */ + int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, + int32_t, + new_equiv_class_alloc); + if (BE (new_equiv_classes == NULL, 0)) + return REG_ESPACE; + mbcset->equiv_classes = new_equiv_classes; + *equiv_class_alloc = new_equiv_class_alloc; + } + mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; + } + else +#endif /* _LIBC */ + { + if (BE (strlen ((const char *) name) != 1, 0)) + return REG_ECOLLATE; + bitset_set (sbcset, *name); + } + return REG_NOERROR; +} + + /* Helper function for parse_bracket_exp. + Build the character class which is represented by NAME. + The result are written to MBCSET and SBCSET. + CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, + is a pointer argument since we may update it. */ + +static reg_errcode_t +#ifdef RE_ENABLE_I18N +build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, + re_charset_t *mbcset, Idx *char_class_alloc, + const char *class_name, reg_syntax_t syntax) +#else /* not RE_ENABLE_I18N */ +build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, + const char *class_name, reg_syntax_t syntax) +#endif /* not RE_ENABLE_I18N */ +{ + int i; + const char *name = class_name; + + /* In case of REG_ICASE "upper" and "lower" match the both of + upper and lower cases. */ + if ((syntax & RE_ICASE) + && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) + name = "alpha"; + +#ifdef RE_ENABLE_I18N + /* Check the space of the arrays. */ + if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) + { + /* Not enough, realloc it. */ + /* +1 in case of mbcset->nchar_classes is 0. */ + Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1; + /* Use realloc since array is NULL if *alloc == 0. */ + wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, + new_char_class_alloc); + if (BE (new_char_classes == NULL, 0)) + return REG_ESPACE; + mbcset->char_classes = new_char_classes; + *char_class_alloc = new_char_class_alloc; + } + mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); +#endif /* RE_ENABLE_I18N */ + +#define BUILD_CHARCLASS_LOOP(ctype_func) \ + do { \ + if (BE (trans != NULL, 0)) \ + { \ + for (i = 0; i < SBC_MAX; ++i) \ + if (ctype_func (i)) \ + bitset_set (sbcset, trans[i]); \ + } \ + else \ + { \ + for (i = 0; i < SBC_MAX; ++i) \ + if (ctype_func (i)) \ + bitset_set (sbcset, i); \ + } \ + } while (0) + + if (strcmp (name, "alnum") == 0) + BUILD_CHARCLASS_LOOP (isalnum); + else if (strcmp (name, "cntrl") == 0) + BUILD_CHARCLASS_LOOP (iscntrl); + else if (strcmp (name, "lower") == 0) + BUILD_CHARCLASS_LOOP (islower); + else if (strcmp (name, "space") == 0) + BUILD_CHARCLASS_LOOP (isspace); + else if (strcmp (name, "alpha") == 0) + BUILD_CHARCLASS_LOOP (isalpha); + else if (strcmp (name, "digit") == 0) + BUILD_CHARCLASS_LOOP (isdigit); + else if (strcmp (name, "print") == 0) + BUILD_CHARCLASS_LOOP (isprint); + else if (strcmp (name, "upper") == 0) + BUILD_CHARCLASS_LOOP (isupper); + else if (strcmp (name, "blank") == 0) + BUILD_CHARCLASS_LOOP (isblank); + else if (strcmp (name, "graph") == 0) + BUILD_CHARCLASS_LOOP (isgraph); + else if (strcmp (name, "punct") == 0) + BUILD_CHARCLASS_LOOP (ispunct); + else if (strcmp (name, "xdigit") == 0) + BUILD_CHARCLASS_LOOP (isxdigit); + else + return REG_ECTYPE; + + return REG_NOERROR; +} + +static bin_tree_t * +build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, + const char *class_name, + const char *extra, bool non_match, + reg_errcode_t *err) +{ + re_bitset_ptr_t sbcset; +#ifdef RE_ENABLE_I18N + re_charset_t *mbcset; + Idx alloc = 0; +#endif /* not RE_ENABLE_I18N */ + reg_errcode_t ret; + re_token_t br_token; + bin_tree_t *tree; + + sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); +#ifdef RE_ENABLE_I18N + mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); +#endif /* RE_ENABLE_I18N */ + +#ifdef RE_ENABLE_I18N + if (BE (sbcset == NULL || mbcset == NULL, 0)) +#else /* not RE_ENABLE_I18N */ + if (BE (sbcset == NULL, 0)) +#endif /* not RE_ENABLE_I18N */ + { + *err = REG_ESPACE; + return NULL; + } + + if (non_match) + { +#ifdef RE_ENABLE_I18N + mbcset->non_match = 1; +#endif /* not RE_ENABLE_I18N */ + } + + /* We don't care the syntax in this case. */ + ret = build_charclass (trans, sbcset, +#ifdef RE_ENABLE_I18N + mbcset, &alloc, +#endif /* RE_ENABLE_I18N */ + class_name, 0); + + if (BE (ret != REG_NOERROR, 0)) + { + re_free (sbcset); +#ifdef RE_ENABLE_I18N + free_charset (mbcset); +#endif /* RE_ENABLE_I18N */ + *err = ret; + return NULL; + } + /* \w match '_' also. */ + for (; *extra; extra++) + bitset_set (sbcset, *extra); + + /* If it is non-matching list. */ + if (non_match) + bitset_not (sbcset); + +#ifdef RE_ENABLE_I18N + /* Ensure only single byte characters are set. */ + if (dfa->mb_cur_max > 1) + bitset_mask (sbcset, dfa->sb_char); +#endif + + /* Build a tree for simple bracket. */ + br_token.type = SIMPLE_BRACKET; + br_token.opr.sbcset = sbcset; + tree = create_token_tree (dfa, NULL, NULL, &br_token); + if (BE (tree == NULL, 0)) + goto build_word_op_espace; + +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + { + bin_tree_t *mbc_tree; + /* Build a tree for complex bracket. */ + br_token.type = COMPLEX_BRACKET; + br_token.opr.mbcset = mbcset; + dfa->has_mb_node = 1; + mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); + if (BE (mbc_tree == NULL, 0)) + goto build_word_op_espace; + /* Then join them by ALT node. */ + tree = create_tree (dfa, tree, mbc_tree, OP_ALT); + if (BE (mbc_tree != NULL, 1)) + return tree; + } + else + { + free_charset (mbcset); + return tree; + } +#else /* not RE_ENABLE_I18N */ + return tree; +#endif /* not RE_ENABLE_I18N */ + + build_word_op_espace: + re_free (sbcset); +#ifdef RE_ENABLE_I18N + free_charset (mbcset); +#endif /* RE_ENABLE_I18N */ + *err = REG_ESPACE; + return NULL; +} + +/* This is intended for the expressions like "a{1,3}". + Fetch a number from 'input', and return the number. + Return REG_MISSING if the number field is empty like "{,1}". + Return RE_DUP_MAX + 1 if the number field is too large. + Return REG_ERROR if an error occurred. */ + +static Idx +fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) +{ + Idx num = REG_MISSING; + unsigned char c; + while (1) + { + fetch_token (token, input, syntax); + c = token->opr.c; + if (BE (token->type == END_OF_RE, 0)) + return REG_ERROR; + if (token->type == OP_CLOSE_DUP_NUM || c == ',') + break; + num = ((token->type != CHARACTER || c < '0' || '9' < c + || num == REG_ERROR) + ? REG_ERROR + : num == REG_MISSING + ? c - '0' + : MIN (RE_DUP_MAX + 1, num * 10 + c - '0')); + } + return num; +} + +#ifdef RE_ENABLE_I18N +static void +free_charset (re_charset_t *cset) +{ + re_free (cset->mbchars); +# ifdef _LIBC + re_free (cset->coll_syms); + re_free (cset->equiv_classes); + re_free (cset->range_starts); + re_free (cset->range_ends); +# endif + re_free (cset->char_classes); + re_free (cset); +} +#endif /* RE_ENABLE_I18N */ + +/* Functions for binary tree operation. */ + +/* Create a tree node. */ + +static bin_tree_t * +create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, + re_token_type_t type) +{ + re_token_t t; + t.type = type; + return create_token_tree (dfa, left, right, &t); +} + +static bin_tree_t * +create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, + const re_token_t *token) +{ + bin_tree_t *tree; + if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) + { + bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); + + if (storage == NULL) + return NULL; + storage->next = dfa->str_tree_storage; + dfa->str_tree_storage = storage; + dfa->str_tree_storage_idx = 0; + } + tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; + + tree->parent = NULL; + tree->left = left; + tree->right = right; + tree->token = *token; + tree->token.duplicated = 0; + tree->token.opt_subexp = 0; + tree->first = NULL; + tree->next = NULL; + tree->node_idx = REG_MISSING; + + if (left != NULL) + left->parent = tree; + if (right != NULL) + right->parent = tree; + return tree; +} + +/* Mark the tree SRC as an optional subexpression. + To be called from preorder or postorder. */ + +static reg_errcode_t +mark_opt_subexp (void *extra, bin_tree_t *node) +{ + Idx idx = (uintptr_t) extra; + if (node->token.type == SUBEXP && node->token.opr.idx == idx) + node->token.opt_subexp = 1; + + return REG_NOERROR; +} + +/* Free the allocated memory inside NODE. */ + +static void +free_token (re_token_t *node) +{ +#ifdef RE_ENABLE_I18N + if (node->type == COMPLEX_BRACKET && node->duplicated == 0) + free_charset (node->opr.mbcset); + else +#endif /* RE_ENABLE_I18N */ + if (node->type == SIMPLE_BRACKET && node->duplicated == 0) + re_free (node->opr.sbcset); +} + +/* Worker function for tree walking. Free the allocated memory inside NODE + and its children. */ + +static reg_errcode_t +free_tree (void *extra, bin_tree_t *node) +{ + free_token (&node->token); + return REG_NOERROR; +} + + +/* Duplicate the node SRC, and return new node. This is a preorder + visit similar to the one implemented by the generic visitor, but + we need more infrastructure to maintain two parallel trees --- so, + it's easier to duplicate. */ + +static bin_tree_t * +duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) +{ + const bin_tree_t *node; + bin_tree_t *dup_root; + bin_tree_t **p_new = &dup_root, *dup_node = root->parent; + + for (node = root; ; ) + { + /* Create a new tree and link it back to the current parent. */ + *p_new = create_token_tree (dfa, NULL, NULL, &node->token); + if (*p_new == NULL) + return NULL; + (*p_new)->parent = dup_node; + (*p_new)->token.duplicated = 1; + dup_node = *p_new; + + /* Go to the left node, or up and to the right. */ + if (node->left) + { + node = node->left; + p_new = &dup_node->left; + } + else + { + const bin_tree_t *prev = NULL; + while (node->right == prev || node->right == NULL) + { + prev = node; + node = node->parent; + dup_node = dup_node->parent; + if (!node) + return dup_root; + } + node = node->right; + p_new = &dup_node->right; + } + } +} diff --git a/gl/lib/regex.c b/gl/lib/regex.c new file mode 100644 index 0000000..95beb6f --- /dev/null +++ b/gl/lib/regex.c @@ -0,0 +1,81 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2002-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Isamu Hasegawa . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _LIBC +# include + +# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +# endif +# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wold-style-definition" +# pragma GCC diagnostic ignored "-Wtype-limits" +# endif +#endif + +/* Make sure no one compiles this code with a C++ compiler. */ +#if defined __cplusplus && defined _LIBC +# error "This is C code, use a C compiler" +#endif + +#ifdef _LIBC +/* We have to keep the namespace clean. */ +# define regfree(preg) __regfree (preg) +# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) +# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) +# define regerror(errcode, preg, errbuf, errbuf_size) \ + __regerror(errcode, preg, errbuf, errbuf_size) +# define re_set_registers(bu, re, nu, st, en) \ + __re_set_registers (bu, re, nu, st, en) +# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ + __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) +# define re_match(bufp, string, size, pos, regs) \ + __re_match (bufp, string, size, pos, regs) +# define re_search(bufp, string, size, startpos, range, regs) \ + __re_search (bufp, string, size, startpos, range, regs) +# define re_compile_pattern(pattern, length, bufp) \ + __re_compile_pattern (pattern, length, bufp) +# define re_set_syntax(syntax) __re_set_syntax (syntax) +# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ + __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) +# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) + +# include "../locale/localeinfo.h" +#endif + +/* On some systems, limits.h sets RE_DUP_MAX to a lower value than + GNU regex allows. Include it before , which correctly + #undefs RE_DUP_MAX and sets it to the right value. */ +#include + +#include +#include "regex_internal.h" + +#include "regex_internal.c" +#include "regcomp.c" +#include "regexec.c" + +/* Binary backward compatibility. */ +#if _LIBC +# include +# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) +link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") +int re_max_failures = 2000; +# endif +#endif diff --git a/gl/lib/regex.h b/gl/lib/regex.h new file mode 100644 index 0000000..a3ac7a9 --- /dev/null +++ b/gl/lib/regex.h @@ -0,0 +1,667 @@ +/* Definitions for data structures and routines for the regular + expression library. + Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2014 Free Software + Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _REGEX_H +#define _REGEX_H 1 + +#include + +/* Allow the use in C++ code. */ +#ifdef __cplusplus +extern "C" { +#endif + +/* Define __USE_GNU to declare GNU extensions that violate the + POSIX name space rules. */ +#ifdef _GNU_SOURCE +# define __USE_GNU 1 +#endif + +#ifdef _REGEX_LARGE_OFFSETS + +/* Use types and values that are wide enough to represent signed and + unsigned byte offsets in memory. This currently works only when + the regex code is used outside of the GNU C library; it is not yet + supported within glibc itself, and glibc users should not define + _REGEX_LARGE_OFFSETS. */ + +/* The type of nonnegative object indexes. Traditionally, GNU regex + uses 'int' for these. Code that uses __re_idx_t should work + regardless of whether the type is signed. */ +typedef size_t __re_idx_t; + +/* The type of object sizes. */ +typedef size_t __re_size_t; + +/* The type of object sizes, in places where the traditional code + uses unsigned long int. */ +typedef size_t __re_long_size_t; + +#else + +/* The traditional GNU regex implementation mishandles strings longer + than INT_MAX. */ +typedef int __re_idx_t; +typedef unsigned int __re_size_t; +typedef unsigned long int __re_long_size_t; + +#endif + +/* The following two types have to be signed and unsigned integer type + wide enough to hold a value of a pointer. For most ANSI compilers + ptrdiff_t and size_t should be likely OK. Still size of these two + types is 2 for Microsoft C. Ugh... */ +typedef long int s_reg_t; +typedef unsigned long int active_reg_t; + +/* The following bits are used to determine the regexp syntax we + recognize. The set/not-set meanings are chosen so that Emacs syntax + remains the value 0. The bits are given in alphabetical order, and + the definitions shifted by one from the previous bit; thus, when we + add or remove a bit, only one other definition need change. */ +typedef unsigned long int reg_syntax_t; + +#ifdef __USE_GNU +/* If this bit is not set, then \ inside a bracket expression is literal. + If set, then such a \ quotes the following character. */ +# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) + +/* If this bit is not set, then + and ? are operators, and \+ and \? are + literals. + If set, then \+ and \? are operators and + and ? are literals. */ +# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) + +/* If this bit is set, then character classes are supported. They are: + [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], + [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. + If not set, then character classes are not supported. */ +# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) + +/* If this bit is set, then ^ and $ are always anchors (outside bracket + expressions, of course). + If this bit is not set, then it depends: + ^ is an anchor if it is at the beginning of a regular + expression or after an open-group or an alternation operator; + $ is an anchor if it is at the end of a regular expression, or + before a close-group or an alternation operator. + + This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because + POSIX draft 11.2 says that * etc. in leading positions is undefined. + We already implemented a previous draft which made those constructs + invalid, though, so we haven't changed the code back. */ +# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) + +/* If this bit is set, then special characters are always special + regardless of where they are in the pattern. + If this bit is not set, then special characters are special only in + some contexts; otherwise they are ordinary. Specifically, + * + ? and intervals are only special when not after the beginning, + open-group, or alternation operator. */ +# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) + +/* If this bit is set, then *, +, ?, and { cannot be first in an re or + immediately after an alternation or begin-group operator. */ +# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) + +/* If this bit is set, then . matches newline. + If not set, then it doesn't. */ +# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) + +/* If this bit is set, then . doesn't match NUL. + If not set, then it does. */ +# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) + +/* If this bit is set, nonmatching lists [^...] do not match newline. + If not set, they do. */ +# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) + +/* If this bit is set, either \{...\} or {...} defines an + interval, depending on RE_NO_BK_BRACES. + If not set, \{, \}, {, and } are literals. */ +# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) + +/* If this bit is set, +, ? and | aren't recognized as operators. + If not set, they are. */ +# define RE_LIMITED_OPS (RE_INTERVALS << 1) + +/* If this bit is set, newline is an alternation operator. + If not set, newline is literal. */ +# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) + +/* If this bit is set, then '{...}' defines an interval, and \{ and \} + are literals. + If not set, then '\{...\}' defines an interval. */ +# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) + +/* If this bit is set, (...) defines a group, and \( and \) are literals. + If not set, \(...\) defines a group, and ( and ) are literals. */ +# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) + +/* If this bit is set, then \ matches . + If not set, then \ is a back-reference. */ +# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) + +/* If this bit is set, then | is an alternation operator, and \| is literal. + If not set, then \| is an alternation operator, and | is literal. */ +# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) + +/* If this bit is set, then an ending range point collating higher + than the starting range point, as in [z-a], is invalid. + If not set, then when ending range point collates higher than the + starting range point, the range is ignored. */ +# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) + +/* If this bit is set, then an unmatched ) is ordinary. + If not set, then an unmatched ) is invalid. */ +# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) + +/* If this bit is set, succeed as soon as we match the whole pattern, + without further backtracking. */ +# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) + +/* If this bit is set, do not process the GNU regex operators. + If not set, then the GNU regex operators are recognized. */ +# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) + +/* If this bit is set, turn on internal regex debugging. + If not set, and debugging was on, turn it off. + This only works if regex.c is compiled -DDEBUG. + We define this bit always, so that all that's needed to turn on + debugging is to recompile regex.c; the calling code can always have + this bit set, and it won't affect anything in the normal case. */ +# define RE_DEBUG (RE_NO_GNU_OPS << 1) + +/* If this bit is set, a syntactically invalid interval is treated as + a string of ordinary characters. For example, the ERE 'a{1' is + treated as 'a\{1'. */ +# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) + +/* If this bit is set, then ignore case when matching. + If not set, then case is significant. */ +# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) + +/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only + for ^, because it is difficult to scan the regex backwards to find + whether ^ should be special. */ +# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) + +/* If this bit is set, then \{ cannot be first in a regex or + immediately after an alternation, open-group or \} operator. */ +# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) + +/* If this bit is set, then no_sub will be set to 1 during + re_compile_pattern. */ +# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) +#endif + +/* This global variable defines the particular regexp syntax to use (for + some interfaces). When a regexp is compiled, the syntax used is + stored in the pattern buffer, so changing this does not affect + already-compiled regexps. */ +extern reg_syntax_t re_syntax_options; + +#ifdef __USE_GNU +/* Define combinations of the above bits for the standard possibilities. + (The [[[ comments delimit what gets put into the Texinfo file, so + don't delete them!) */ +/* [[[begin syntaxes]]] */ +# define RE_SYNTAX_EMACS 0 + +# define RE_SYNTAX_AWK \ + (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ + | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CHAR_CLASSES \ + | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) + +# define RE_SYNTAX_GNU_AWK \ + ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ + | RE_INVALID_INTERVAL_ORD) \ + & ~(RE_DOT_NOT_NULL | RE_CONTEXT_INDEP_OPS \ + | RE_CONTEXT_INVALID_OPS )) + +# define RE_SYNTAX_POSIX_AWK \ + (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ + | RE_INTERVALS | RE_NO_GNU_OPS \ + | RE_INVALID_INTERVAL_ORD) + +# define RE_SYNTAX_GREP \ + (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ + | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ + | RE_NEWLINE_ALT) + +# define RE_SYNTAX_EGREP \ + (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ + | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ + | RE_NO_BK_VBAR) + +# define RE_SYNTAX_POSIX_EGREP \ + (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ + | RE_INVALID_INTERVAL_ORD) + +/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ +# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC + +# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC + +/* Syntax bits common to both basic and extended POSIX regex syntax. */ +# define _RE_SYNTAX_POSIX_COMMON \ + (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ + | RE_INTERVALS | RE_NO_EMPTY_RANGES) + +# define RE_SYNTAX_POSIX_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) + +/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes + RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this + isn't minimal, since other operators, such as \`, aren't disabled. */ +# define RE_SYNTAX_POSIX_MINIMAL_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) + +# define RE_SYNTAX_POSIX_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) + +/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is + removed and RE_NO_BK_REFS is added. */ +# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) +/* [[[end syntaxes]]] */ + +/* Maximum number of duplicates an interval can allow. POSIX-conforming + systems might define this in , but we want our + value, so remove any previous define. */ +# ifdef _REGEX_INCLUDE_LIMITS_H +# include +# endif +# ifdef RE_DUP_MAX +# undef RE_DUP_MAX +# endif + +/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored + the counter as a 2-byte signed integer. This is no longer true, so + RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to + ((SIZE_MAX - 9) / 10) if _REGEX_LARGE_OFFSETS is defined. + However, there would be a huge performance problem if someone + actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains + its historical value. */ +# define RE_DUP_MAX (0x7fff) +#endif + + +/* POSIX 'cflags' bits (i.e., information for 'regcomp'). */ + +/* If this bit is set, then use extended regular expression syntax. + If not set, then use basic regular expression syntax. */ +#define REG_EXTENDED 1 + +/* If this bit is set, then ignore case when matching. + If not set, then case is significant. */ +#define REG_ICASE (1 << 1) + +/* If this bit is set, then anchors do not match at newline + characters in the string. + If not set, then anchors do match at newlines. */ +#define REG_NEWLINE (1 << 2) + +/* If this bit is set, then report only success or fail in regexec. + If not set, then returns differ between not matching and errors. */ +#define REG_NOSUB (1 << 3) + + +/* POSIX 'eflags' bits (i.e., information for regexec). */ + +/* If this bit is set, then the beginning-of-line operator doesn't match + the beginning of the string (presumably because it's not the + beginning of a line). + If not set, then the beginning-of-line operator does match the + beginning of the string. */ +#define REG_NOTBOL 1 + +/* Like REG_NOTBOL, except for the end-of-line. */ +#define REG_NOTEOL (1 << 1) + +/* Use PMATCH[0] to delimit the start and end of the search in the + buffer. */ +#define REG_STARTEND (1 << 2) + + +/* If any error codes are removed, changed, or added, update the + '__re_error_msgid' table in regcomp.c. */ + +typedef enum +{ + _REG_ENOSYS = -1, /* This will never happen for this implementation. */ + _REG_NOERROR = 0, /* Success. */ + _REG_NOMATCH, /* Didn't find a match (for regexec). */ + + /* POSIX regcomp return error codes. (In the order listed in the + standard.) */ + _REG_BADPAT, /* Invalid pattern. */ + _REG_ECOLLATE, /* Invalid collating element. */ + _REG_ECTYPE, /* Invalid character class name. */ + _REG_EESCAPE, /* Trailing backslash. */ + _REG_ESUBREG, /* Invalid back reference. */ + _REG_EBRACK, /* Unmatched left bracket. */ + _REG_EPAREN, /* Parenthesis imbalance. */ + _REG_EBRACE, /* Unmatched \{. */ + _REG_BADBR, /* Invalid contents of \{\}. */ + _REG_ERANGE, /* Invalid range end. */ + _REG_ESPACE, /* Ran out of memory. */ + _REG_BADRPT, /* No preceding re for repetition op. */ + + /* Error codes we've added. */ + _REG_EEND, /* Premature end. */ + _REG_ESIZE, /* Too large (e.g., repeat count too large). */ + _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ +} reg_errcode_t; + +#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K +# define REG_ENOSYS _REG_ENOSYS +#endif +#define REG_NOERROR _REG_NOERROR +#define REG_NOMATCH _REG_NOMATCH +#define REG_BADPAT _REG_BADPAT +#define REG_ECOLLATE _REG_ECOLLATE +#define REG_ECTYPE _REG_ECTYPE +#define REG_EESCAPE _REG_EESCAPE +#define REG_ESUBREG _REG_ESUBREG +#define REG_EBRACK _REG_EBRACK +#define REG_EPAREN _REG_EPAREN +#define REG_EBRACE _REG_EBRACE +#define REG_BADBR _REG_BADBR +#define REG_ERANGE _REG_ERANGE +#define REG_ESPACE _REG_ESPACE +#define REG_BADRPT _REG_BADRPT +#define REG_EEND _REG_EEND +#define REG_ESIZE _REG_ESIZE +#define REG_ERPAREN _REG_ERPAREN + +/* This data structure represents a compiled pattern. Before calling + the pattern compiler, the fields 'buffer', 'allocated', 'fastmap', + and 'translate' can be set. After the pattern has been compiled, + the fields 're_nsub', 'not_bol' and 'not_eol' are available. All + other fields are private to the regex routines. */ + +#ifndef RE_TRANSLATE_TYPE +# define __RE_TRANSLATE_TYPE unsigned char * +# ifdef __USE_GNU +# define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE +# endif +#endif + +#ifdef __USE_GNU +# define __REPB_PREFIX(name) name +#else +# define __REPB_PREFIX(name) __##name +#endif + +struct re_pattern_buffer +{ + /* Space that holds the compiled pattern. The type + 'struct re_dfa_t' is private and is not declared here. */ + struct re_dfa_t *__REPB_PREFIX(buffer); + + /* Number of bytes to which 'buffer' points. */ + __re_long_size_t __REPB_PREFIX(allocated); + + /* Number of bytes actually used in 'buffer'. */ + __re_long_size_t __REPB_PREFIX(used); + + /* Syntax setting with which the pattern was compiled. */ + reg_syntax_t __REPB_PREFIX(syntax); + + /* Pointer to a fastmap, if any, otherwise zero. re_search uses the + fastmap, if there is one, to skip over impossible starting points + for matches. */ + char *__REPB_PREFIX(fastmap); + + /* Either a translate table to apply to all characters before + comparing them, or zero for no translation. The translation is + applied to a pattern when it is compiled and to a string when it + is matched. */ + __RE_TRANSLATE_TYPE __REPB_PREFIX(translate); + + /* Number of subexpressions found by the compiler. */ + size_t re_nsub; + + /* Zero if this pattern cannot match the empty string, one else. + Well, in truth it's used only in 're_search_2', to see whether or + not we should use the fastmap, so we don't set this absolutely + perfectly; see 're_compile_fastmap' (the "duplicate" case). */ + unsigned __REPB_PREFIX(can_be_null) : 1; + + /* If REGS_UNALLOCATED, allocate space in the 'regs' structure + for 'max (RE_NREGS, re_nsub + 1)' groups. + If REGS_REALLOCATE, reallocate space if necessary. + If REGS_FIXED, use what's there. */ +#ifdef __USE_GNU +# define REGS_UNALLOCATED 0 +# define REGS_REALLOCATE 1 +# define REGS_FIXED 2 +#endif + unsigned __REPB_PREFIX(regs_allocated) : 2; + + /* Set to zero when 're_compile_pattern' compiles a pattern; set to + one by 're_compile_fastmap' if it updates the fastmap. */ + unsigned __REPB_PREFIX(fastmap_accurate) : 1; + + /* If set, 're_match_2' does not return information about + subexpressions. */ + unsigned __REPB_PREFIX(no_sub) : 1; + + /* If set, a beginning-of-line anchor doesn't match at the beginning + of the string. */ + unsigned __REPB_PREFIX(not_bol) : 1; + + /* Similarly for an end-of-line anchor. */ + unsigned __REPB_PREFIX(not_eol) : 1; + + /* If true, an anchor at a newline matches. */ + unsigned __REPB_PREFIX(newline_anchor) : 1; +}; + +typedef struct re_pattern_buffer regex_t; + +/* Type for byte offsets within the string. POSIX mandates this. */ +#ifdef _REGEX_LARGE_OFFSETS +/* POSIX 1003.1-2008 requires that regoff_t be at least as wide as + ptrdiff_t and ssize_t. We don't know of any hosts where ptrdiff_t + is wider than ssize_t, so ssize_t is safe. */ +typedef ssize_t regoff_t; +#else +/* The traditional GNU regex implementation mishandles strings longer + than INT_MAX. */ +typedef int regoff_t; +#endif + + +#ifdef __USE_GNU +/* This is the structure we store register match data in. See + regex.texinfo for a full description of what registers match. */ +struct re_registers +{ + __re_size_t num_regs; + regoff_t *start; + regoff_t *end; +}; + + +/* If 'regs_allocated' is REGS_UNALLOCATED in the pattern buffer, + 're_match_2' returns information about at least this many registers + the first time a 'regs' structure is passed. */ +# ifndef RE_NREGS +# define RE_NREGS 30 +# endif +#endif + + +/* POSIX specification for registers. Aside from the different names than + 're_registers', POSIX uses an array of structures, instead of a + structure of arrays. */ +typedef struct +{ + regoff_t rm_so; /* Byte offset from string's start to substring's start. */ + regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ +} regmatch_t; + +/* Declarations for routines. */ + +#ifdef __USE_GNU +/* Sets the current default syntax to SYNTAX, and return the old syntax. + You can also simply assign to the 're_syntax_options' variable. */ +extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); + +/* Compile the regular expression PATTERN, with length LENGTH + and syntax given by the global 're_syntax_options', into the buffer + BUFFER. Return NULL if successful, and an error string if not. + + To free the allocated storage, you must call 'regfree' on BUFFER. + Note that the translate table must either have been initialised by + 'regcomp', with a malloc'ed value, or set to NULL before calling + 'regfree'. */ +extern const char *re_compile_pattern (const char *__pattern, size_t __length, + struct re_pattern_buffer *__buffer); + + +/* Compile a fastmap for the compiled pattern in BUFFER; used to + accelerate searches. Return 0 if successful and -2 if was an + internal error. */ +extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); + + +/* Search in the string STRING (with length LENGTH) for the pattern + compiled into BUFFER. Start searching at position START, for RANGE + characters. Return the starting position of the match, -1 for no + match, or -2 for an internal error. Also return register + information in REGS (if REGS and BUFFER->no_sub are nonzero). */ +extern regoff_t re_search (struct re_pattern_buffer *__buffer, + const char *__string, __re_idx_t __length, + __re_idx_t __start, regoff_t __range, + struct re_registers *__regs); + + +/* Like 're_search', but search in the concatenation of STRING1 and + STRING2. Also, stop searching at index START + STOP. */ +extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, + const char *__string1, __re_idx_t __length1, + const char *__string2, __re_idx_t __length2, + __re_idx_t __start, regoff_t __range, + struct re_registers *__regs, + __re_idx_t __stop); + + +/* Like 're_search', but return how many characters in STRING the regexp + in BUFFER matched, starting at position START. */ +extern regoff_t re_match (struct re_pattern_buffer *__buffer, + const char *__string, __re_idx_t __length, + __re_idx_t __start, struct re_registers *__regs); + + +/* Relates to 're_match' as 're_search_2' relates to 're_search'. */ +extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer, + const char *__string1, __re_idx_t __length1, + const char *__string2, __re_idx_t __length2, + __re_idx_t __start, struct re_registers *__regs, + __re_idx_t __stop); + + +/* Set REGS to hold NUM_REGS registers, storing them in STARTS and + ENDS. Subsequent matches using BUFFER and REGS will use this memory + for recording register information. STARTS and ENDS must be + allocated with malloc, and must each be at least 'NUM_REGS * sizeof + (regoff_t)' bytes long. + + If NUM_REGS == 0, then subsequent matches should allocate their own + register data. + + Unless this function is called, the first search or match using + BUFFER will allocate its own register data, without + freeing the old data. */ +extern void re_set_registers (struct re_pattern_buffer *__buffer, + struct re_registers *__regs, + __re_size_t __num_regs, + regoff_t *__starts, regoff_t *__ends); +#endif /* Use GNU */ + +#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD) +# ifndef _CRAY +/* 4.2 bsd compatibility. */ +extern char *re_comp (const char *); +extern int re_exec (const char *); +# endif +#endif + +/* GCC 2.95 and later have "__restrict"; C99 compilers have + "restrict", and "configure" may have defined "restrict". + Other compilers use __restrict, __restrict__, and _Restrict, and + 'configure' might #define 'restrict' to those words, so pick a + different name. */ +#ifndef _Restrict_ +# if 199901L <= __STDC_VERSION__ +# define _Restrict_ restrict +# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) +# define _Restrict_ __restrict +# else +# define _Restrict_ +# endif +#endif +/* gcc 3.1 and up support the [restrict] syntax. Don't trust + sys/cdefs.h's definition of __restrict_arr, though, as it + mishandles gcc -ansi -pedantic. */ +#ifndef _Restrict_arr_ +# if ((199901L <= __STDC_VERSION__ \ + || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ + && !defined __STRICT_ANSI__)) \ + && !defined __GNUG__) +# define _Restrict_arr_ _Restrict_ +# else +# define _Restrict_arr_ +# endif +#endif + +/* POSIX compatibility. */ +extern int regcomp (regex_t *_Restrict_ __preg, + const char *_Restrict_ __pattern, + int __cflags); + +extern int regexec (const regex_t *_Restrict_ __preg, + const char *_Restrict_ __string, size_t __nmatch, + regmatch_t __pmatch[_Restrict_arr_], + int __eflags); + +extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg, + char *_Restrict_ __errbuf, size_t __errbuf_size); + +extern void regfree (regex_t *__preg); + + +#ifdef __cplusplus +} +#endif /* C++ */ + +#endif /* regex.h */ diff --git a/gl/lib/regex_internal.c b/gl/lib/regex_internal.c new file mode 100644 index 0000000..c5bb012 --- /dev/null +++ b/gl/lib/regex_internal.c @@ -0,0 +1,1736 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2002-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Isamu Hasegawa . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + . */ + +static void re_string_construct_common (const char *str, Idx len, + re_string_t *pstr, + RE_TRANSLATE_TYPE trans, bool icase, + const re_dfa_t *dfa) internal_function; +static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, + const re_node_set *nodes, + re_hashval_t hash) internal_function; +static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, + const re_node_set *nodes, + unsigned int context, + re_hashval_t hash) internal_function; + +/* Functions for string operation. */ + +/* This function allocate the buffers. It is necessary to call + re_string_reconstruct before using the object. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, + RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) +{ + reg_errcode_t ret; + Idx init_buf_len; + + /* Ensure at least one character fits into the buffers. */ + if (init_len < dfa->mb_cur_max) + init_len = dfa->mb_cur_max; + init_buf_len = (len + 1 < init_len) ? len + 1: init_len; + re_string_construct_common (str, len, pstr, trans, icase, dfa); + + ret = re_string_realloc_buffers (pstr, init_buf_len); + if (BE (ret != REG_NOERROR, 0)) + return ret; + + pstr->word_char = dfa->word_char; + pstr->word_ops_used = dfa->word_ops_used; + pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; + pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; + pstr->valid_raw_len = pstr->valid_len; + return REG_NOERROR; +} + +/* This function allocate the buffers, and initialize them. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_string_construct (re_string_t *pstr, const char *str, Idx len, + RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) +{ + reg_errcode_t ret; + memset (pstr, '\0', sizeof (re_string_t)); + re_string_construct_common (str, len, pstr, trans, icase, dfa); + + if (len > 0) + { + ret = re_string_realloc_buffers (pstr, len + 1); + if (BE (ret != REG_NOERROR, 0)) + return ret; + } + pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; + + if (icase) + { +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + { + while (1) + { + ret = build_wcs_upper_buffer (pstr); + if (BE (ret != REG_NOERROR, 0)) + return ret; + if (pstr->valid_raw_len >= len) + break; + if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) + break; + ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); + if (BE (ret != REG_NOERROR, 0)) + return ret; + } + } + else +#endif /* RE_ENABLE_I18N */ + build_upper_buffer (pstr); + } + else + { +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + build_wcs_buffer (pstr); + else +#endif /* RE_ENABLE_I18N */ + { + if (trans != NULL) + re_string_translate_buffer (pstr); + else + { + pstr->valid_len = pstr->bufs_len; + pstr->valid_raw_len = pstr->bufs_len; + } + } + } + + return REG_NOERROR; +} + +/* Helper functions for re_string_allocate, and re_string_construct. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) +{ +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + { + wint_t *new_wcs; + + /* Avoid overflow in realloc. */ + const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); + if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_buf_len, 0)) + return REG_ESPACE; + + new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); + if (BE (new_wcs == NULL, 0)) + return REG_ESPACE; + pstr->wcs = new_wcs; + if (pstr->offsets != NULL) + { + Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); + if (BE (new_offsets == NULL, 0)) + return REG_ESPACE; + pstr->offsets = new_offsets; + } + } +#endif /* RE_ENABLE_I18N */ + if (pstr->mbs_allocated) + { + unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, + new_buf_len); + if (BE (new_mbs == NULL, 0)) + return REG_ESPACE; + pstr->mbs = new_mbs; + } + pstr->bufs_len = new_buf_len; + return REG_NOERROR; +} + + +static void +internal_function +re_string_construct_common (const char *str, Idx len, re_string_t *pstr, + RE_TRANSLATE_TYPE trans, bool icase, + const re_dfa_t *dfa) +{ + pstr->raw_mbs = (const unsigned char *) str; + pstr->len = len; + pstr->raw_len = len; + pstr->trans = trans; + pstr->icase = icase; + pstr->mbs_allocated = (trans != NULL || icase); + pstr->mb_cur_max = dfa->mb_cur_max; + pstr->is_utf8 = dfa->is_utf8; + pstr->map_notascii = dfa->map_notascii; + pstr->stop = pstr->len; + pstr->raw_stop = pstr->stop; +} + +#ifdef RE_ENABLE_I18N + +/* Build wide character buffer PSTR->WCS. + If the byte sequence of the string are: + (0), (1), (0), (1), + Then wide character buffer will be: + , WEOF , , WEOF , + We use WEOF for padding, they indicate that the position isn't + a first byte of a multibyte character. + + Note that this function assumes PSTR->VALID_LEN elements are already + built and starts from PSTR->VALID_LEN. */ + +static void +internal_function +build_wcs_buffer (re_string_t *pstr) +{ +#ifdef _LIBC + unsigned char buf[MB_LEN_MAX]; + assert (MB_LEN_MAX >= pstr->mb_cur_max); +#else + unsigned char buf[64]; +#endif + mbstate_t prev_st; + Idx byte_idx, end_idx, remain_len; + size_t mbclen; + + /* Build the buffers from pstr->valid_len to either pstr->len or + pstr->bufs_len. */ + end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; + for (byte_idx = pstr->valid_len; byte_idx < end_idx;) + { + wchar_t wc; + const char *p; + + remain_len = end_idx - byte_idx; + prev_st = pstr->cur_state; + /* Apply the translation if we need. */ + if (BE (pstr->trans != NULL, 0)) + { + int i, ch; + + for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) + { + ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; + buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; + } + p = (const char *) buf; + } + else + p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; + mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); + if (BE (mbclen == (size_t) -1 || mbclen == 0 + || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0)) + { + /* We treat these cases as a singlebyte character. */ + mbclen = 1; + wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; + if (BE (pstr->trans != NULL, 0)) + wc = pstr->trans[wc]; + pstr->cur_state = prev_st; + } + else if (BE (mbclen == (size_t) -2, 0)) + { + /* The buffer doesn't have enough space, finish to build. */ + pstr->cur_state = prev_st; + break; + } + + /* Write wide character and padding. */ + pstr->wcs[byte_idx++] = wc; + /* Write paddings. */ + for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) + pstr->wcs[byte_idx++] = WEOF; + } + pstr->valid_len = byte_idx; + pstr->valid_raw_len = byte_idx; +} + +/* Build wide character buffer PSTR->WCS like build_wcs_buffer, + but for REG_ICASE. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +build_wcs_upper_buffer (re_string_t *pstr) +{ + mbstate_t prev_st; + Idx src_idx, byte_idx, end_idx, remain_len; + size_t mbclen; +#ifdef _LIBC + char buf[MB_LEN_MAX]; + assert (MB_LEN_MAX >= pstr->mb_cur_max); +#else + char buf[64]; +#endif + + byte_idx = pstr->valid_len; + end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; + + /* The following optimization assumes that ASCII characters can be + mapped to wide characters with a simple cast. */ + if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) + { + while (byte_idx < end_idx) + { + wchar_t wc; + + if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) + && mbsinit (&pstr->cur_state)) + { + /* In case of a singlebyte character. */ + pstr->mbs[byte_idx] + = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); + /* The next step uses the assumption that wchar_t is encoded + ASCII-safe: all ASCII values can be converted like this. */ + pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; + ++byte_idx; + continue; + } + + remain_len = end_idx - byte_idx; + prev_st = pstr->cur_state; + mbclen = __mbrtowc (&wc, + ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + + byte_idx), remain_len, &pstr->cur_state); + if (BE (mbclen < (size_t) -2, 1)) + { + wchar_t wcu = towupper (wc); + if (wcu != wc) + { + size_t mbcdlen; + + mbcdlen = wcrtomb (buf, wcu, &prev_st); + if (BE (mbclen == mbcdlen, 1)) + memcpy (pstr->mbs + byte_idx, buf, mbclen); + else + { + src_idx = byte_idx; + goto offsets_needed; + } + } + else + memcpy (pstr->mbs + byte_idx, + pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); + pstr->wcs[byte_idx++] = wcu; + /* Write paddings. */ + for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) + pstr->wcs[byte_idx++] = WEOF; + } + else if (mbclen == (size_t) -1 || mbclen == 0 + || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) + { + /* It is an invalid character, an incomplete character + at the end of the string, or '\0'. Just use the byte. */ + int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; + pstr->mbs[byte_idx] = ch; + /* And also cast it to wide char. */ + pstr->wcs[byte_idx++] = (wchar_t) ch; + if (BE (mbclen == (size_t) -1, 0)) + pstr->cur_state = prev_st; + } + else + { + /* The buffer doesn't have enough space, finish to build. */ + pstr->cur_state = prev_st; + break; + } + } + pstr->valid_len = byte_idx; + pstr->valid_raw_len = byte_idx; + return REG_NOERROR; + } + else + for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) + { + wchar_t wc; + const char *p; + offsets_needed: + remain_len = end_idx - byte_idx; + prev_st = pstr->cur_state; + if (BE (pstr->trans != NULL, 0)) + { + int i, ch; + + for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) + { + ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; + buf[i] = pstr->trans[ch]; + } + p = (const char *) buf; + } + else + p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; + mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); + if (BE (mbclen < (size_t) -2, 1)) + { + wchar_t wcu = towupper (wc); + if (wcu != wc) + { + size_t mbcdlen; + + mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); + if (BE (mbclen == mbcdlen, 1)) + memcpy (pstr->mbs + byte_idx, buf, mbclen); + else if (mbcdlen != (size_t) -1) + { + size_t i; + + if (byte_idx + mbcdlen > pstr->bufs_len) + { + pstr->cur_state = prev_st; + break; + } + + if (pstr->offsets == NULL) + { + pstr->offsets = re_malloc (Idx, pstr->bufs_len); + + if (pstr->offsets == NULL) + return REG_ESPACE; + } + if (!pstr->offsets_needed) + { + for (i = 0; i < (size_t) byte_idx; ++i) + pstr->offsets[i] = i; + pstr->offsets_needed = 1; + } + + memcpy (pstr->mbs + byte_idx, buf, mbcdlen); + pstr->wcs[byte_idx] = wcu; + pstr->offsets[byte_idx] = src_idx; + for (i = 1; i < mbcdlen; ++i) + { + pstr->offsets[byte_idx + i] + = src_idx + (i < mbclen ? i : mbclen - 1); + pstr->wcs[byte_idx + i] = WEOF; + } + pstr->len += mbcdlen - mbclen; + if (pstr->raw_stop > src_idx) + pstr->stop += mbcdlen - mbclen; + end_idx = (pstr->bufs_len > pstr->len) + ? pstr->len : pstr->bufs_len; + byte_idx += mbcdlen; + src_idx += mbclen; + continue; + } + else + memcpy (pstr->mbs + byte_idx, p, mbclen); + } + else + memcpy (pstr->mbs + byte_idx, p, mbclen); + + if (BE (pstr->offsets_needed != 0, 0)) + { + size_t i; + for (i = 0; i < mbclen; ++i) + pstr->offsets[byte_idx + i] = src_idx + i; + } + src_idx += mbclen; + + pstr->wcs[byte_idx++] = wcu; + /* Write paddings. */ + for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) + pstr->wcs[byte_idx++] = WEOF; + } + else if (mbclen == (size_t) -1 || mbclen == 0 + || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) + { + /* It is an invalid character or '\0'. Just use the byte. */ + int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; + + if (BE (pstr->trans != NULL, 0)) + ch = pstr->trans [ch]; + pstr->mbs[byte_idx] = ch; + + if (BE (pstr->offsets_needed != 0, 0)) + pstr->offsets[byte_idx] = src_idx; + ++src_idx; + + /* And also cast it to wide char. */ + pstr->wcs[byte_idx++] = (wchar_t) ch; + if (BE (mbclen == (size_t) -1, 0)) + pstr->cur_state = prev_st; + } + else + { + /* The buffer doesn't have enough space, finish to build. */ + pstr->cur_state = prev_st; + break; + } + } + pstr->valid_len = byte_idx; + pstr->valid_raw_len = src_idx; + return REG_NOERROR; +} + +/* Skip characters until the index becomes greater than NEW_RAW_IDX. + Return the index. */ + +static Idx +internal_function +re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) +{ + mbstate_t prev_st; + Idx rawbuf_idx; + size_t mbclen; + wint_t wc = WEOF; + + /* Skip the characters which are not necessary to check. */ + for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; + rawbuf_idx < new_raw_idx;) + { + wchar_t wc2; + Idx remain_len = pstr->raw_len - rawbuf_idx; + prev_st = pstr->cur_state; + mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, + remain_len, &pstr->cur_state); + if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) + { + /* We treat these cases as a single byte character. */ + if (mbclen == 0 || remain_len == 0) + wc = L'\0'; + else + wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); + mbclen = 1; + pstr->cur_state = prev_st; + } + else + wc = wc2; + /* Then proceed the next character. */ + rawbuf_idx += mbclen; + } + *last_wc = wc; + return rawbuf_idx; +} +#endif /* RE_ENABLE_I18N */ + +/* Build the buffer PSTR->MBS, and apply the translation if we need. + This function is used in case of REG_ICASE. */ + +static void +internal_function +build_upper_buffer (re_string_t *pstr) +{ + Idx char_idx, end_idx; + end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; + + for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) + { + int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; + if (BE (pstr->trans != NULL, 0)) + ch = pstr->trans[ch]; + pstr->mbs[char_idx] = toupper (ch); + } + pstr->valid_len = char_idx; + pstr->valid_raw_len = char_idx; +} + +/* Apply TRANS to the buffer in PSTR. */ + +static void +internal_function +re_string_translate_buffer (re_string_t *pstr) +{ + Idx buf_idx, end_idx; + end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; + + for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) + { + int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; + pstr->mbs[buf_idx] = pstr->trans[ch]; + } + + pstr->valid_len = buf_idx; + pstr->valid_raw_len = buf_idx; +} + +/* This function re-construct the buffers. + Concretely, convert to wide character in case of pstr->mb_cur_max > 1, + convert to upper case in case of REG_ICASE, apply translation. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) +{ + Idx offset; + + if (BE (pstr->raw_mbs_idx <= idx, 0)) + offset = idx - pstr->raw_mbs_idx; + else + { + /* Reset buffer. */ +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); +#endif /* RE_ENABLE_I18N */ + pstr->len = pstr->raw_len; + pstr->stop = pstr->raw_stop; + pstr->valid_len = 0; + pstr->raw_mbs_idx = 0; + pstr->valid_raw_len = 0; + pstr->offsets_needed = 0; + pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF + : CONTEXT_NEWLINE | CONTEXT_BEGBUF); + if (!pstr->mbs_allocated) + pstr->mbs = (unsigned char *) pstr->raw_mbs; + offset = idx; + } + + if (BE (offset != 0, 1)) + { + /* Should the already checked characters be kept? */ + if (BE (offset < pstr->valid_raw_len, 1)) + { + /* Yes, move them to the front of the buffer. */ +#ifdef RE_ENABLE_I18N + if (BE (pstr->offsets_needed, 0)) + { + Idx low = 0, high = pstr->valid_len, mid; + do + { + mid = (high + low) / 2; + if (pstr->offsets[mid] > offset) + high = mid; + else if (pstr->offsets[mid] < offset) + low = mid + 1; + else + break; + } + while (low < high); + if (pstr->offsets[mid] < offset) + ++mid; + pstr->tip_context = re_string_context_at (pstr, mid - 1, + eflags); + /* This can be quite complicated, so handle specially + only the common and easy case where the character with + different length representation of lower and upper + case is present at or after offset. */ + if (pstr->valid_len > offset + && mid == offset && pstr->offsets[mid] == offset) + { + memmove (pstr->wcs, pstr->wcs + offset, + (pstr->valid_len - offset) * sizeof (wint_t)); + memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); + pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; + for (low = 0; low < pstr->valid_len; low++) + pstr->offsets[low] = pstr->offsets[low + offset] - offset; + } + else + { + /* Otherwise, just find out how long the partial multibyte + character at offset is and fill it with WEOF/255. */ + pstr->len = pstr->raw_len - idx + offset; + pstr->stop = pstr->raw_stop - idx + offset; + pstr->offsets_needed = 0; + while (mid > 0 && pstr->offsets[mid - 1] == offset) + --mid; + while (mid < pstr->valid_len) + if (pstr->wcs[mid] != WEOF) + break; + else + ++mid; + if (mid == pstr->valid_len) + pstr->valid_len = 0; + else + { + pstr->valid_len = pstr->offsets[mid] - offset; + if (pstr->valid_len) + { + for (low = 0; low < pstr->valid_len; ++low) + pstr->wcs[low] = WEOF; + memset (pstr->mbs, 255, pstr->valid_len); + } + } + pstr->valid_raw_len = pstr->valid_len; + } + } + else +#endif + { + pstr->tip_context = re_string_context_at (pstr, offset - 1, + eflags); +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + memmove (pstr->wcs, pstr->wcs + offset, + (pstr->valid_len - offset) * sizeof (wint_t)); +#endif /* RE_ENABLE_I18N */ + if (BE (pstr->mbs_allocated, 0)) + memmove (pstr->mbs, pstr->mbs + offset, + pstr->valid_len - offset); + pstr->valid_len -= offset; + pstr->valid_raw_len -= offset; +#if DEBUG + assert (pstr->valid_len > 0); +#endif + } + } + else + { +#ifdef RE_ENABLE_I18N + /* No, skip all characters until IDX. */ + Idx prev_valid_len = pstr->valid_len; + + if (BE (pstr->offsets_needed, 0)) + { + pstr->len = pstr->raw_len - idx + offset; + pstr->stop = pstr->raw_stop - idx + offset; + pstr->offsets_needed = 0; + } +#endif + pstr->valid_len = 0; +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + { + Idx wcs_idx; + wint_t wc = WEOF; + + if (pstr->is_utf8) + { + const unsigned char *raw, *p, *end; + + /* Special case UTF-8. Multi-byte chars start with any + byte other than 0x80 - 0xbf. */ + raw = pstr->raw_mbs + pstr->raw_mbs_idx; + end = raw + (offset - pstr->mb_cur_max); + if (end < pstr->raw_mbs) + end = pstr->raw_mbs; + p = raw + offset - 1; +#ifdef _LIBC + /* We know the wchar_t encoding is UCS4, so for the simple + case, ASCII characters, skip the conversion step. */ + if (isascii (*p) && BE (pstr->trans == NULL, 1)) + { + memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); + /* pstr->valid_len = 0; */ + wc = (wchar_t) *p; + } + else +#endif + for (; p >= end; --p) + if ((*p & 0xc0) != 0x80) + { + mbstate_t cur_state; + wchar_t wc2; + Idx mlen = raw + pstr->len - p; + unsigned char buf[6]; + size_t mbclen; + + const unsigned char *pp = p; + if (BE (pstr->trans != NULL, 0)) + { + int i = mlen < 6 ? mlen : 6; + while (--i >= 0) + buf[i] = pstr->trans[p[i]]; + pp = buf; + } + /* XXX Don't use mbrtowc, we know which conversion + to use (UTF-8 -> UCS4). */ + memset (&cur_state, 0, sizeof (cur_state)); + mbclen = __mbrtowc (&wc2, (const char *) pp, mlen, + &cur_state); + if (raw + offset - p <= mbclen + && mbclen < (size_t) -2) + { + memset (&pstr->cur_state, '\0', + sizeof (mbstate_t)); + pstr->valid_len = mbclen - (raw + offset - p); + wc = wc2; + } + break; + } + } + + if (wc == WEOF) + pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; + if (wc == WEOF) + pstr->tip_context + = re_string_context_at (pstr, prev_valid_len - 1, eflags); + else + pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) + && IS_WIDE_WORD_CHAR (wc)) + ? CONTEXT_WORD + : ((IS_WIDE_NEWLINE (wc) + && pstr->newline_anchor) + ? CONTEXT_NEWLINE : 0)); + if (BE (pstr->valid_len, 0)) + { + for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) + pstr->wcs[wcs_idx] = WEOF; + if (pstr->mbs_allocated) + memset (pstr->mbs, 255, pstr->valid_len); + } + pstr->valid_raw_len = pstr->valid_len; + } + else +#endif /* RE_ENABLE_I18N */ + { + int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; + pstr->valid_raw_len = 0; + if (pstr->trans) + c = pstr->trans[c]; + pstr->tip_context = (bitset_contain (pstr->word_char, c) + ? CONTEXT_WORD + : ((IS_NEWLINE (c) && pstr->newline_anchor) + ? CONTEXT_NEWLINE : 0)); + } + } + if (!BE (pstr->mbs_allocated, 0)) + pstr->mbs += offset; + } + pstr->raw_mbs_idx = idx; + pstr->len -= offset; + pstr->stop -= offset; + + /* Then build the buffers. */ +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + { + if (pstr->icase) + { + reg_errcode_t ret = build_wcs_upper_buffer (pstr); + if (BE (ret != REG_NOERROR, 0)) + return ret; + } + else + build_wcs_buffer (pstr); + } + else +#endif /* RE_ENABLE_I18N */ + if (BE (pstr->mbs_allocated, 0)) + { + if (pstr->icase) + build_upper_buffer (pstr); + else if (pstr->trans != NULL) + re_string_translate_buffer (pstr); + } + else + pstr->valid_len = pstr->len; + + pstr->cur_idx = 0; + return REG_NOERROR; +} + +static unsigned char +internal_function __attribute__ ((pure)) +re_string_peek_byte_case (const re_string_t *pstr, Idx idx) +{ + int ch; + Idx off; + + /* Handle the common (easiest) cases first. */ + if (BE (!pstr->mbs_allocated, 1)) + return re_string_peek_byte (pstr, idx); + +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1 + && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) + return re_string_peek_byte (pstr, idx); +#endif + + off = pstr->cur_idx + idx; +#ifdef RE_ENABLE_I18N + if (pstr->offsets_needed) + off = pstr->offsets[off]; +#endif + + ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; + +#ifdef RE_ENABLE_I18N + /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I + this function returns CAPITAL LETTER I instead of first byte of + DOTLESS SMALL LETTER I. The latter would confuse the parser, + since peek_byte_case doesn't advance cur_idx in any way. */ + if (pstr->offsets_needed && !isascii (ch)) + return re_string_peek_byte (pstr, idx); +#endif + + return ch; +} + +static unsigned char +internal_function +re_string_fetch_byte_case (re_string_t *pstr) +{ + if (BE (!pstr->mbs_allocated, 1)) + return re_string_fetch_byte (pstr); + +#ifdef RE_ENABLE_I18N + if (pstr->offsets_needed) + { + Idx off; + int ch; + + /* For tr_TR.UTF-8 [[:islower:]] there is + [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip + in that case the whole multi-byte character and return + the original letter. On the other side, with + [[: DOTLESS SMALL LETTER I return [[:I, as doing + anything else would complicate things too much. */ + + if (!re_string_first_byte (pstr, pstr->cur_idx)) + return re_string_fetch_byte (pstr); + + off = pstr->offsets[pstr->cur_idx]; + ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; + + if (! isascii (ch)) + return re_string_fetch_byte (pstr); + + re_string_skip_bytes (pstr, + re_string_char_size_at (pstr, pstr->cur_idx)); + return ch; + } +#endif + + return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; +} + +static void +internal_function +re_string_destruct (re_string_t *pstr) +{ +#ifdef RE_ENABLE_I18N + re_free (pstr->wcs); + re_free (pstr->offsets); +#endif /* RE_ENABLE_I18N */ + if (pstr->mbs_allocated) + re_free (pstr->mbs); +} + +/* Return the context at IDX in INPUT. */ + +static unsigned int +internal_function +re_string_context_at (const re_string_t *input, Idx idx, int eflags) +{ + int c; + if (BE (! REG_VALID_INDEX (idx), 0)) + /* In this case, we use the value stored in input->tip_context, + since we can't know the character in input->mbs[-1] here. */ + return input->tip_context; + if (BE (idx == input->len, 0)) + return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF + : CONTEXT_NEWLINE | CONTEXT_ENDBUF); +#ifdef RE_ENABLE_I18N + if (input->mb_cur_max > 1) + { + wint_t wc; + Idx wc_idx = idx; + while(input->wcs[wc_idx] == WEOF) + { +#ifdef DEBUG + /* It must not happen. */ + assert (REG_VALID_INDEX (wc_idx)); +#endif + --wc_idx; + if (! REG_VALID_INDEX (wc_idx)) + return input->tip_context; + } + wc = input->wcs[wc_idx]; + if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) + return CONTEXT_WORD; + return (IS_WIDE_NEWLINE (wc) && input->newline_anchor + ? CONTEXT_NEWLINE : 0); + } + else +#endif + { + c = re_string_byte_at (input, idx); + if (bitset_contain (input->word_char, c)) + return CONTEXT_WORD; + return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; + } +} + +/* Functions for set operation. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_node_set_alloc (re_node_set *set, Idx size) +{ + set->alloc = size; + set->nelem = 0; + set->elems = re_malloc (Idx, size); + if (BE (set->elems == NULL, 0) && (MALLOC_0_IS_NONNULL || size != 0)) + return REG_ESPACE; + return REG_NOERROR; +} + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_node_set_init_1 (re_node_set *set, Idx elem) +{ + set->alloc = 1; + set->nelem = 1; + set->elems = re_malloc (Idx, 1); + if (BE (set->elems == NULL, 0)) + { + set->alloc = set->nelem = 0; + return REG_ESPACE; + } + set->elems[0] = elem; + return REG_NOERROR; +} + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2) +{ + set->alloc = 2; + set->elems = re_malloc (Idx, 2); + if (BE (set->elems == NULL, 0)) + return REG_ESPACE; + if (elem1 == elem2) + { + set->nelem = 1; + set->elems[0] = elem1; + } + else + { + set->nelem = 2; + if (elem1 < elem2) + { + set->elems[0] = elem1; + set->elems[1] = elem2; + } + else + { + set->elems[0] = elem2; + set->elems[1] = elem1; + } + } + return REG_NOERROR; +} + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_node_set_init_copy (re_node_set *dest, const re_node_set *src) +{ + dest->nelem = src->nelem; + if (src->nelem > 0) + { + dest->alloc = dest->nelem; + dest->elems = re_malloc (Idx, dest->alloc); + if (BE (dest->elems == NULL, 0)) + { + dest->alloc = dest->nelem = 0; + return REG_ESPACE; + } + memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); + } + else + re_node_set_init_empty (dest); + return REG_NOERROR; +} + +/* Calculate the intersection of the sets SRC1 and SRC2. And merge it to + DEST. Return value indicate the error code or REG_NOERROR if succeeded. + Note: We assume dest->elems is NULL, when dest->alloc is 0. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, + const re_node_set *src2) +{ + Idx i1, i2, is, id, delta, sbase; + if (src1->nelem == 0 || src2->nelem == 0) + return REG_NOERROR; + + /* We need dest->nelem + 2 * elems_in_intersection; this is a + conservative estimate. */ + if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) + { + Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; + Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc); + if (BE (new_elems == NULL, 0)) + return REG_ESPACE; + dest->elems = new_elems; + dest->alloc = new_alloc; + } + + /* Find the items in the intersection of SRC1 and SRC2, and copy + into the top of DEST those that are not already in DEST itself. */ + sbase = dest->nelem + src1->nelem + src2->nelem; + i1 = src1->nelem - 1; + i2 = src2->nelem - 1; + id = dest->nelem - 1; + for (;;) + { + if (src1->elems[i1] == src2->elems[i2]) + { + /* Try to find the item in DEST. Maybe we could binary search? */ + while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1]) + --id; + + if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1]) + dest->elems[--sbase] = src1->elems[i1]; + + if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2)) + break; + } + + /* Lower the highest of the two items. */ + else if (src1->elems[i1] < src2->elems[i2]) + { + if (! REG_VALID_INDEX (--i2)) + break; + } + else + { + if (! REG_VALID_INDEX (--i1)) + break; + } + } + + id = dest->nelem - 1; + is = dest->nelem + src1->nelem + src2->nelem - 1; + delta = is - sbase + 1; + + /* Now copy. When DELTA becomes zero, the remaining + DEST elements are already in place; this is more or + less the same loop that is in re_node_set_merge. */ + dest->nelem += delta; + if (delta > 0 && REG_VALID_INDEX (id)) + for (;;) + { + if (dest->elems[is] > dest->elems[id]) + { + /* Copy from the top. */ + dest->elems[id + delta--] = dest->elems[is--]; + if (delta == 0) + break; + } + else + { + /* Slide from the bottom. */ + dest->elems[id + delta] = dest->elems[id]; + if (! REG_VALID_INDEX (--id)) + break; + } + } + + /* Copy remaining SRC elements. */ + memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); + + return REG_NOERROR; +} + +/* Calculate the union set of the sets SRC1 and SRC2. And store it to + DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_node_set_init_union (re_node_set *dest, const re_node_set *src1, + const re_node_set *src2) +{ + Idx i1, i2, id; + if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) + { + dest->alloc = src1->nelem + src2->nelem; + dest->elems = re_malloc (Idx, dest->alloc); + if (BE (dest->elems == NULL, 0)) + return REG_ESPACE; + } + else + { + if (src1 != NULL && src1->nelem > 0) + return re_node_set_init_copy (dest, src1); + else if (src2 != NULL && src2->nelem > 0) + return re_node_set_init_copy (dest, src2); + else + re_node_set_init_empty (dest); + return REG_NOERROR; + } + for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) + { + if (src1->elems[i1] > src2->elems[i2]) + { + dest->elems[id++] = src2->elems[i2++]; + continue; + } + if (src1->elems[i1] == src2->elems[i2]) + ++i2; + dest->elems[id++] = src1->elems[i1++]; + } + if (i1 < src1->nelem) + { + memcpy (dest->elems + id, src1->elems + i1, + (src1->nelem - i1) * sizeof (Idx)); + id += src1->nelem - i1; + } + else if (i2 < src2->nelem) + { + memcpy (dest->elems + id, src2->elems + i2, + (src2->nelem - i2) * sizeof (Idx)); + id += src2->nelem - i2; + } + dest->nelem = id; + return REG_NOERROR; +} + +/* Calculate the union set of the sets DEST and SRC. And store it to + DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +re_node_set_merge (re_node_set *dest, const re_node_set *src) +{ + Idx is, id, sbase, delta; + if (src == NULL || src->nelem == 0) + return REG_NOERROR; + if (dest->alloc < 2 * src->nelem + dest->nelem) + { + Idx new_alloc = 2 * (src->nelem + dest->alloc); + Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc); + if (BE (new_buffer == NULL, 0)) + return REG_ESPACE; + dest->elems = new_buffer; + dest->alloc = new_alloc; + } + + if (BE (dest->nelem == 0, 0)) + { + dest->nelem = src->nelem; + memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); + return REG_NOERROR; + } + + /* Copy into the top of DEST the items of SRC that are not + found in DEST. Maybe we could binary search in DEST? */ + for (sbase = dest->nelem + 2 * src->nelem, + is = src->nelem - 1, id = dest->nelem - 1; + REG_VALID_INDEX (is) && REG_VALID_INDEX (id); ) + { + if (dest->elems[id] == src->elems[is]) + is--, id--; + else if (dest->elems[id] < src->elems[is]) + dest->elems[--sbase] = src->elems[is--]; + else /* if (dest->elems[id] > src->elems[is]) */ + --id; + } + + if (REG_VALID_INDEX (is)) + { + /* If DEST is exhausted, the remaining items of SRC must be unique. */ + sbase -= is + 1; + memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx)); + } + + id = dest->nelem - 1; + is = dest->nelem + 2 * src->nelem - 1; + delta = is - sbase + 1; + if (delta == 0) + return REG_NOERROR; + + /* Now copy. When DELTA becomes zero, the remaining + DEST elements are already in place. */ + dest->nelem += delta; + for (;;) + { + if (dest->elems[is] > dest->elems[id]) + { + /* Copy from the top. */ + dest->elems[id + delta--] = dest->elems[is--]; + if (delta == 0) + break; + } + else + { + /* Slide from the bottom. */ + dest->elems[id + delta] = dest->elems[id]; + if (! REG_VALID_INDEX (--id)) + { + /* Copy remaining SRC elements. */ + memcpy (dest->elems, dest->elems + sbase, + delta * sizeof (Idx)); + break; + } + } + } + + return REG_NOERROR; +} + +/* Insert the new element ELEM to the re_node_set* SET. + SET should not already have ELEM. + Return true if successful. */ + +static bool +internal_function __attribute_warn_unused_result__ +re_node_set_insert (re_node_set *set, Idx elem) +{ + Idx idx; + /* In case the set is empty. */ + if (set->alloc == 0) + return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1); + + if (BE (set->nelem, 0) == 0) + { + /* We already guaranteed above that set->alloc != 0. */ + set->elems[0] = elem; + ++set->nelem; + return true; + } + + /* Realloc if we need. */ + if (set->alloc == set->nelem) + { + Idx *new_elems; + set->alloc = set->alloc * 2; + new_elems = re_realloc (set->elems, Idx, set->alloc); + if (BE (new_elems == NULL, 0)) + return false; + set->elems = new_elems; + } + + /* Move the elements which follows the new element. Test the + first element separately to skip a check in the inner loop. */ + if (elem < set->elems[0]) + { + idx = 0; + for (idx = set->nelem; idx > 0; idx--) + set->elems[idx] = set->elems[idx - 1]; + } + else + { + for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) + set->elems[idx] = set->elems[idx - 1]; + } + + /* Insert the new element. */ + set->elems[idx] = elem; + ++set->nelem; + return true; +} + +/* Insert the new element ELEM to the re_node_set* SET. + SET should not already have any element greater than or equal to ELEM. + Return true if successful. */ + +static bool +internal_function __attribute_warn_unused_result__ +re_node_set_insert_last (re_node_set *set, Idx elem) +{ + /* Realloc if we need. */ + if (set->alloc == set->nelem) + { + Idx *new_elems; + set->alloc = (set->alloc + 1) * 2; + new_elems = re_realloc (set->elems, Idx, set->alloc); + if (BE (new_elems == NULL, 0)) + return false; + set->elems = new_elems; + } + + /* Insert the new element. */ + set->elems[set->nelem++] = elem; + return true; +} + +/* Compare two node sets SET1 and SET2. + Return true if SET1 and SET2 are equivalent. */ + +static bool +internal_function __attribute__ ((pure)) +re_node_set_compare (const re_node_set *set1, const re_node_set *set2) +{ + Idx i; + if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) + return false; + for (i = set1->nelem ; REG_VALID_INDEX (--i) ; ) + if (set1->elems[i] != set2->elems[i]) + return false; + return true; +} + +/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ + +static Idx +internal_function __attribute__ ((pure)) +re_node_set_contains (const re_node_set *set, Idx elem) +{ + __re_size_t idx, right, mid; + if (! REG_VALID_NONZERO_INDEX (set->nelem)) + return 0; + + /* Binary search the element. */ + idx = 0; + right = set->nelem - 1; + while (idx < right) + { + mid = (idx + right) / 2; + if (set->elems[mid] < elem) + idx = mid + 1; + else + right = mid; + } + return set->elems[idx] == elem ? idx + 1 : 0; +} + +static void +internal_function +re_node_set_remove_at (re_node_set *set, Idx idx) +{ + if (idx < 0 || idx >= set->nelem) + return; + --set->nelem; + for (; idx < set->nelem; idx++) + set->elems[idx] = set->elems[idx + 1]; +} + + +/* Add the token TOKEN to dfa->nodes, and return the index of the token. + Or return REG_MISSING if an error occurred. */ + +static Idx +internal_function +re_dfa_add_node (re_dfa_t *dfa, re_token_t token) +{ + if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) + { + size_t new_nodes_alloc = dfa->nodes_alloc * 2; + Idx *new_nexts, *new_indices; + re_node_set *new_edests, *new_eclosures; + re_token_t *new_nodes; + + /* Avoid overflows in realloc. */ + const size_t max_object_size = MAX (sizeof (re_token_t), + MAX (sizeof (re_node_set), + sizeof (Idx))); + if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0)) + return REG_MISSING; + + new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); + if (BE (new_nodes == NULL, 0)) + return REG_MISSING; + dfa->nodes = new_nodes; + new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); + new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); + new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); + new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); + if (BE (new_nexts == NULL || new_indices == NULL + || new_edests == NULL || new_eclosures == NULL, 0)) + return REG_MISSING; + dfa->nexts = new_nexts; + dfa->org_indices = new_indices; + dfa->edests = new_edests; + dfa->eclosures = new_eclosures; + dfa->nodes_alloc = new_nodes_alloc; + } + dfa->nodes[dfa->nodes_len] = token; + dfa->nodes[dfa->nodes_len].constraint = 0; +#ifdef RE_ENABLE_I18N + dfa->nodes[dfa->nodes_len].accept_mb = + ((token.type == OP_PERIOD && dfa->mb_cur_max > 1) + || token.type == COMPLEX_BRACKET); +#endif + dfa->nexts[dfa->nodes_len] = REG_MISSING; + re_node_set_init_empty (dfa->edests + dfa->nodes_len); + re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); + return dfa->nodes_len++; +} + +static re_hashval_t +internal_function +calc_state_hash (const re_node_set *nodes, unsigned int context) +{ + re_hashval_t hash = nodes->nelem + context; + Idx i; + for (i = 0 ; i < nodes->nelem ; i++) + hash += nodes->elems[i]; + return hash; +} + +/* Search for the state whose node_set is equivalent to NODES. + Return the pointer to the state, if we found it in the DFA. + Otherwise create the new one and return it. In case of an error + return NULL and set the error code in ERR. + Note: - We assume NULL as the invalid state, then it is possible that + return value is NULL and ERR is REG_NOERROR. + - We never return non-NULL value in case of any errors, it is for + optimization. */ + +static re_dfastate_t * +internal_function __attribute_warn_unused_result__ +re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, + const re_node_set *nodes) +{ + re_hashval_t hash; + re_dfastate_t *new_state; + struct re_state_table_entry *spot; + Idx i; +#ifdef lint + /* Suppress bogus uninitialized-variable warnings. */ + *err = REG_NOERROR; +#endif + if (BE (nodes->nelem == 0, 0)) + { + *err = REG_NOERROR; + return NULL; + } + hash = calc_state_hash (nodes, 0); + spot = dfa->state_table + (hash & dfa->state_hash_mask); + + for (i = 0 ; i < spot->num ; i++) + { + re_dfastate_t *state = spot->array[i]; + if (hash != state->hash) + continue; + if (re_node_set_compare (&state->nodes, nodes)) + return state; + } + + /* There are no appropriate state in the dfa, create the new one. */ + new_state = create_ci_newstate (dfa, nodes, hash); + if (BE (new_state == NULL, 0)) + *err = REG_ESPACE; + + return new_state; +} + +/* Search for the state whose node_set is equivalent to NODES and + whose context is equivalent to CONTEXT. + Return the pointer to the state, if we found it in the DFA. + Otherwise create the new one and return it. In case of an error + return NULL and set the error code in ERR. + Note: - We assume NULL as the invalid state, then it is possible that + return value is NULL and ERR is REG_NOERROR. + - We never return non-NULL value in case of any errors, it is for + optimization. */ + +static re_dfastate_t * +internal_function __attribute_warn_unused_result__ +re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, + const re_node_set *nodes, unsigned int context) +{ + re_hashval_t hash; + re_dfastate_t *new_state; + struct re_state_table_entry *spot; + Idx i; +#ifdef lint + /* Suppress bogus uninitialized-variable warnings. */ + *err = REG_NOERROR; +#endif + if (nodes->nelem == 0) + { + *err = REG_NOERROR; + return NULL; + } + hash = calc_state_hash (nodes, context); + spot = dfa->state_table + (hash & dfa->state_hash_mask); + + for (i = 0 ; i < spot->num ; i++) + { + re_dfastate_t *state = spot->array[i]; + if (state->hash == hash + && state->context == context + && re_node_set_compare (state->entrance_nodes, nodes)) + return state; + } + /* There are no appropriate state in 'dfa', create the new one. */ + new_state = create_cd_newstate (dfa, nodes, context, hash); + if (BE (new_state == NULL, 0)) + *err = REG_ESPACE; + + return new_state; +} + +/* Finish initialization of the new state NEWSTATE, and using its hash value + HASH put in the appropriate bucket of DFA's state table. Return value + indicates the error code if failed. */ + +static reg_errcode_t +__attribute_warn_unused_result__ +register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, + re_hashval_t hash) +{ + struct re_state_table_entry *spot; + reg_errcode_t err; + Idx i; + + newstate->hash = hash; + err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); + if (BE (err != REG_NOERROR, 0)) + return REG_ESPACE; + for (i = 0; i < newstate->nodes.nelem; i++) + { + Idx elem = newstate->nodes.elems[i]; + if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) + if (! re_node_set_insert_last (&newstate->non_eps_nodes, elem)) + return REG_ESPACE; + } + + spot = dfa->state_table + (hash & dfa->state_hash_mask); + if (BE (spot->alloc <= spot->num, 0)) + { + Idx new_alloc = 2 * spot->num + 2; + re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, + new_alloc); + if (BE (new_array == NULL, 0)) + return REG_ESPACE; + spot->array = new_array; + spot->alloc = new_alloc; + } + spot->array[spot->num++] = newstate; + return REG_NOERROR; +} + +static void +free_state (re_dfastate_t *state) +{ + re_node_set_free (&state->non_eps_nodes); + re_node_set_free (&state->inveclosure); + if (state->entrance_nodes != &state->nodes) + { + re_node_set_free (state->entrance_nodes); + re_free (state->entrance_nodes); + } + re_node_set_free (&state->nodes); + re_free (state->word_trtable); + re_free (state->trtable); + re_free (state); +} + +/* Create the new state which is independent of contexts. + Return the new state if succeeded, otherwise return NULL. */ + +static re_dfastate_t * +internal_function __attribute_warn_unused_result__ +create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, + re_hashval_t hash) +{ + Idx i; + reg_errcode_t err; + re_dfastate_t *newstate; + + newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); + if (BE (newstate == NULL, 0)) + return NULL; + err = re_node_set_init_copy (&newstate->nodes, nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_free (newstate); + return NULL; + } + + newstate->entrance_nodes = &newstate->nodes; + for (i = 0 ; i < nodes->nelem ; i++) + { + re_token_t *node = dfa->nodes + nodes->elems[i]; + re_token_type_t type = node->type; + if (type == CHARACTER && !node->constraint) + continue; +#ifdef RE_ENABLE_I18N + newstate->accept_mb |= node->accept_mb; +#endif /* RE_ENABLE_I18N */ + + /* If the state has the halt node, the state is a halt state. */ + if (type == END_OF_RE) + newstate->halt = 1; + else if (type == OP_BACK_REF) + newstate->has_backref = 1; + else if (type == ANCHOR || node->constraint) + newstate->has_constraint = 1; + } + err = register_state (dfa, newstate, hash); + if (BE (err != REG_NOERROR, 0)) + { + free_state (newstate); + newstate = NULL; + } + return newstate; +} + +/* Create the new state which is depend on the context CONTEXT. + Return the new state if succeeded, otherwise return NULL. */ + +static re_dfastate_t * +internal_function __attribute_warn_unused_result__ +create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, + unsigned int context, re_hashval_t hash) +{ + Idx i, nctx_nodes = 0; + reg_errcode_t err; + re_dfastate_t *newstate; + + newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); + if (BE (newstate == NULL, 0)) + return NULL; + err = re_node_set_init_copy (&newstate->nodes, nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_free (newstate); + return NULL; + } + + newstate->context = context; + newstate->entrance_nodes = &newstate->nodes; + + for (i = 0 ; i < nodes->nelem ; i++) + { + re_token_t *node = dfa->nodes + nodes->elems[i]; + re_token_type_t type = node->type; + unsigned int constraint = node->constraint; + + if (type == CHARACTER && !constraint) + continue; +#ifdef RE_ENABLE_I18N + newstate->accept_mb |= node->accept_mb; +#endif /* RE_ENABLE_I18N */ + + /* If the state has the halt node, the state is a halt state. */ + if (type == END_OF_RE) + newstate->halt = 1; + else if (type == OP_BACK_REF) + newstate->has_backref = 1; + + if (constraint) + { + if (newstate->entrance_nodes == &newstate->nodes) + { + newstate->entrance_nodes = re_malloc (re_node_set, 1); + if (BE (newstate->entrance_nodes == NULL, 0)) + { + free_state (newstate); + return NULL; + } + if (re_node_set_init_copy (newstate->entrance_nodes, nodes) + != REG_NOERROR) + return NULL; + nctx_nodes = 0; + newstate->has_constraint = 1; + } + + if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) + { + re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); + ++nctx_nodes; + } + } + } + err = register_state (dfa, newstate, hash); + if (BE (err != REG_NOERROR, 0)) + { + free_state (newstate); + newstate = NULL; + } + return newstate; +} diff --git a/gl/lib/regex_internal.h b/gl/lib/regex_internal.h new file mode 100644 index 0000000..f44551b --- /dev/null +++ b/gl/lib/regex_internal.h @@ -0,0 +1,909 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2002-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Isamu Hasegawa . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _REGEX_INTERNAL_H +#define _REGEX_INTERNAL_H 1 + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef _LIBC +# include +# define lock_define(name) __libc_lock_define (, name) +# define lock_init(lock) (__libc_lock_init (lock), 0) +# define lock_fini(lock) 0 +# define lock_lock(lock) __libc_lock_lock (lock) +# define lock_unlock(lock) __libc_lock_unlock (lock) +#elif defined GNULIB_LOCK +# include "glthread/lock.h" + /* Use gl_lock_define if empty macro arguments are known to work. + Otherwise, fall back on less-portable substitutes. */ +# if ((defined __GNUC__ && !defined __STRICT_ANSI__) \ + || (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__)) +# define lock_define(name) gl_lock_define (, name) +# elif USE_POSIX_THREADS +# define lock_define(name) pthread_mutex_t name; +# elif USE_PTH_THREADS +# define lock_define(name) pth_mutex_t name; +# elif USE_SOLARIS_THREADS +# define lock_define(name) mutex_t name; +# elif USE_WINDOWS_THREADS +# define lock_define(name) gl_lock_t name; +# else +# define lock_define(name) +# endif +# define lock_init(lock) glthread_lock_init (&(lock)) +# define lock_fini(lock) glthread_lock_destroy (&(lock)) +# define lock_lock(lock) glthread_lock_lock (&(lock)) +# define lock_unlock(lock) glthread_lock_unlock (&(lock)) +#elif defined GNULIB_PTHREAD +# include +# define lock_define(name) pthread_mutex_t name; +# define lock_init(lock) pthread_mutex_init (&(lock), 0) +# define lock_fini(lock) pthread_mutex_destroy (&(lock)) +# define lock_lock(lock) pthread_mutex_lock (&(lock)) +# define lock_unlock(lock) pthread_mutex_unlock (&(lock)) +#else +# define lock_define(name) +# define lock_init(lock) 0 +# define lock_fini(lock) ((void) 0) + /* The 'dfa' avoids an "unused variable 'dfa'" warning from GCC. */ +# define lock_lock(lock) ((void) dfa) +# define lock_unlock(lock) ((void) 0) +#endif + +/* In case that the system doesn't have isblank(). */ +#if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) +# define isblank(ch) ((ch) == ' ' || (ch) == '\t') +#endif + +#ifdef _LIBC +# ifndef _RE_DEFINE_LOCALE_FUNCTIONS +# define _RE_DEFINE_LOCALE_FUNCTIONS 1 +# include +# include +# include +# endif +#endif + +/* This is for other GNU distributions with internationalized messages. */ +#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC +# include +# ifdef _LIBC +# undef gettext +# define gettext(msgid) \ + __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES) +# endif +#else +# define gettext(msgid) (msgid) +#endif + +#ifndef gettext_noop +/* This define is so xgettext can find the internationalizable + strings. */ +# define gettext_noop(String) String +#endif + +#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE) || _LIBC +# define RE_ENABLE_I18N +#endif + +#if __GNUC__ >= 3 +# define BE(expr, val) __builtin_expect (expr, val) +#else +# define BE(expr, val) (expr) +#endif + +/* Number of ASCII characters. */ +#define ASCII_CHARS 0x80 + +/* Number of single byte characters. */ +#define SBC_MAX (UCHAR_MAX + 1) + +#define COLL_ELEM_LEN_MAX 8 + +/* The character which represents newline. */ +#define NEWLINE_CHAR '\n' +#define WIDE_NEWLINE_CHAR L'\n' + +/* Rename to standard API for using out of glibc. */ +#ifndef _LIBC +# undef __wctype +# undef __iswctype +# define __wctype wctype +# define __iswctype iswctype +# define __btowc btowc +# define __mbrtowc mbrtowc +# define __wcrtomb wcrtomb +# define __regfree regfree +# define attribute_hidden +#endif /* not _LIBC */ + +#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1) +# define __attribute__(arg) +#endif + +typedef __re_idx_t Idx; +#ifdef _REGEX_LARGE_OFFSETS +# define IDX_MAX (SIZE_MAX - 2) +#else +# define IDX_MAX INT_MAX +#endif + +/* Special return value for failure to match. */ +#define REG_MISSING ((Idx) -1) + +/* Special return value for internal error. */ +#define REG_ERROR ((Idx) -2) + +/* Test whether N is a valid index, and is not one of the above. */ +#ifdef _REGEX_LARGE_OFFSETS +# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR) +#else +# define REG_VALID_INDEX(n) (0 <= (n)) +#endif + +/* Test whether N is a valid nonzero index. */ +#ifdef _REGEX_LARGE_OFFSETS +# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1)) +#else +# define REG_VALID_NONZERO_INDEX(n) (0 < (n)) +#endif + +/* A hash value, suitable for computing hash tables. */ +typedef __re_size_t re_hashval_t; + +/* An integer used to represent a set of bits. It must be unsigned, + and must be at least as wide as unsigned int. */ +typedef unsigned long int bitset_word_t; +/* All bits set in a bitset_word_t. */ +#define BITSET_WORD_MAX ULONG_MAX + +/* Number of bits in a bitset_word_t. For portability to hosts with + padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)'; + instead, deduce it directly from BITSET_WORD_MAX. Avoid + greater-than-32-bit integers and unconditional shifts by more than + 31 bits, as they're not portable. */ +#if BITSET_WORD_MAX == 0xffffffffUL +# define BITSET_WORD_BITS 32 +#elif BITSET_WORD_MAX >> 31 >> 4 == 1 +# define BITSET_WORD_BITS 36 +#elif BITSET_WORD_MAX >> 31 >> 16 == 1 +# define BITSET_WORD_BITS 48 +#elif BITSET_WORD_MAX >> 31 >> 28 == 1 +# define BITSET_WORD_BITS 60 +#elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1 +# define BITSET_WORD_BITS 64 +#elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1 +# define BITSET_WORD_BITS 72 +#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1 +# define BITSET_WORD_BITS 128 +#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1 +# define BITSET_WORD_BITS 256 +#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1 +# define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */ +# if BITSET_WORD_BITS <= SBC_MAX +# error "Invalid SBC_MAX" +# endif +#else +# error "Add case for new bitset_word_t size" +#endif + +/* Number of bitset_word_t values in a bitset_t. */ +#define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS) + +typedef bitset_word_t bitset_t[BITSET_WORDS]; +typedef bitset_word_t *re_bitset_ptr_t; +typedef const bitset_word_t *re_const_bitset_ptr_t; + +#define PREV_WORD_CONSTRAINT 0x0001 +#define PREV_NOTWORD_CONSTRAINT 0x0002 +#define NEXT_WORD_CONSTRAINT 0x0004 +#define NEXT_NOTWORD_CONSTRAINT 0x0008 +#define PREV_NEWLINE_CONSTRAINT 0x0010 +#define NEXT_NEWLINE_CONSTRAINT 0x0020 +#define PREV_BEGBUF_CONSTRAINT 0x0040 +#define NEXT_ENDBUF_CONSTRAINT 0x0080 +#define WORD_DELIM_CONSTRAINT 0x0100 +#define NOT_WORD_DELIM_CONSTRAINT 0x0200 + +typedef enum +{ + INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, + WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, + WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, + INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, + LINE_FIRST = PREV_NEWLINE_CONSTRAINT, + LINE_LAST = NEXT_NEWLINE_CONSTRAINT, + BUF_FIRST = PREV_BEGBUF_CONSTRAINT, + BUF_LAST = NEXT_ENDBUF_CONSTRAINT, + WORD_DELIM = WORD_DELIM_CONSTRAINT, + NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT +} re_context_type; + +typedef struct +{ + Idx alloc; + Idx nelem; + Idx *elems; +} re_node_set; + +typedef enum +{ + NON_TYPE = 0, + + /* Node type, These are used by token, node, tree. */ + CHARACTER = 1, + END_OF_RE = 2, + SIMPLE_BRACKET = 3, + OP_BACK_REF = 4, + OP_PERIOD = 5, +#ifdef RE_ENABLE_I18N + COMPLEX_BRACKET = 6, + OP_UTF8_PERIOD = 7, +#endif /* RE_ENABLE_I18N */ + + /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used + when the debugger shows values of this enum type. */ +#define EPSILON_BIT 8 + OP_OPEN_SUBEXP = EPSILON_BIT | 0, + OP_CLOSE_SUBEXP = EPSILON_BIT | 1, + OP_ALT = EPSILON_BIT | 2, + OP_DUP_ASTERISK = EPSILON_BIT | 3, + ANCHOR = EPSILON_BIT | 4, + + /* Tree type, these are used only by tree. */ + CONCAT = 16, + SUBEXP = 17, + + /* Token type, these are used only by token. */ + OP_DUP_PLUS = 18, + OP_DUP_QUESTION, + OP_OPEN_BRACKET, + OP_CLOSE_BRACKET, + OP_CHARSET_RANGE, + OP_OPEN_DUP_NUM, + OP_CLOSE_DUP_NUM, + OP_NON_MATCH_LIST, + OP_OPEN_COLL_ELEM, + OP_CLOSE_COLL_ELEM, + OP_OPEN_EQUIV_CLASS, + OP_CLOSE_EQUIV_CLASS, + OP_OPEN_CHAR_CLASS, + OP_CLOSE_CHAR_CLASS, + OP_WORD, + OP_NOTWORD, + OP_SPACE, + OP_NOTSPACE, + BACK_SLASH + +} re_token_type_t; + +#ifdef RE_ENABLE_I18N +typedef struct +{ + /* Multibyte characters. */ + wchar_t *mbchars; + + /* Collating symbols. */ +# ifdef _LIBC + int32_t *coll_syms; +# endif + + /* Equivalence classes. */ +# ifdef _LIBC + int32_t *equiv_classes; +# endif + + /* Range expressions. */ +# ifdef _LIBC + uint32_t *range_starts; + uint32_t *range_ends; +# else /* not _LIBC */ + wchar_t *range_starts; + wchar_t *range_ends; +# endif /* not _LIBC */ + + /* Character classes. */ + wctype_t *char_classes; + + /* If this character set is the non-matching list. */ + unsigned int non_match : 1; + + /* # of multibyte characters. */ + Idx nmbchars; + + /* # of collating symbols. */ + Idx ncoll_syms; + + /* # of equivalence classes. */ + Idx nequiv_classes; + + /* # of range expressions. */ + Idx nranges; + + /* # of character classes. */ + Idx nchar_classes; +} re_charset_t; +#endif /* RE_ENABLE_I18N */ + +typedef struct +{ + union + { + unsigned char c; /* for CHARACTER */ + re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ +#ifdef RE_ENABLE_I18N + re_charset_t *mbcset; /* for COMPLEX_BRACKET */ +#endif /* RE_ENABLE_I18N */ + Idx idx; /* for BACK_REF */ + re_context_type ctx_type; /* for ANCHOR */ + } opr; +#if __GNUC__ >= 2 && !defined __STRICT_ANSI__ + re_token_type_t type : 8; +#else + re_token_type_t type; +#endif + unsigned int constraint : 10; /* context constraint */ + unsigned int duplicated : 1; + unsigned int opt_subexp : 1; +#ifdef RE_ENABLE_I18N + unsigned int accept_mb : 1; + /* These 2 bits can be moved into the union if needed (e.g. if running out + of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ + unsigned int mb_partial : 1; +#endif + unsigned int word_char : 1; +} re_token_t; + +#define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) + +struct re_string_t +{ + /* Indicate the raw buffer which is the original string passed as an + argument of regexec(), re_search(), etc.. */ + const unsigned char *raw_mbs; + /* Store the multibyte string. In case of "case insensitive mode" like + REG_ICASE, upper cases of the string are stored, otherwise MBS points + the same address that RAW_MBS points. */ + unsigned char *mbs; +#ifdef RE_ENABLE_I18N + /* Store the wide character string which is corresponding to MBS. */ + wint_t *wcs; + Idx *offsets; + mbstate_t cur_state; +#endif + /* Index in RAW_MBS. Each character mbs[i] corresponds to + raw_mbs[raw_mbs_idx + i]. */ + Idx raw_mbs_idx; + /* The length of the valid characters in the buffers. */ + Idx valid_len; + /* The corresponding number of bytes in raw_mbs array. */ + Idx valid_raw_len; + /* The length of the buffers MBS and WCS. */ + Idx bufs_len; + /* The index in MBS, which is updated by re_string_fetch_byte. */ + Idx cur_idx; + /* length of RAW_MBS array. */ + Idx raw_len; + /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ + Idx len; + /* End of the buffer may be shorter than its length in the cases such + as re_match_2, re_search_2. Then, we use STOP for end of the buffer + instead of LEN. */ + Idx raw_stop; + /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ + Idx stop; + + /* The context of mbs[0]. We store the context independently, since + the context of mbs[0] may be different from raw_mbs[0], which is + the beginning of the input string. */ + unsigned int tip_context; + /* The translation passed as a part of an argument of re_compile_pattern. */ + RE_TRANSLATE_TYPE trans; + /* Copy of re_dfa_t's word_char. */ + re_const_bitset_ptr_t word_char; + /* true if REG_ICASE. */ + unsigned char icase; + unsigned char is_utf8; + unsigned char map_notascii; + unsigned char mbs_allocated; + unsigned char offsets_needed; + unsigned char newline_anchor; + unsigned char word_ops_used; + int mb_cur_max; +}; +typedef struct re_string_t re_string_t; + + +struct re_dfa_t; +typedef struct re_dfa_t re_dfa_t; + +#ifndef _LIBC +# define internal_function +#endif + +#ifndef NOT_IN_libc +static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, + Idx new_buf_len) + internal_function; +# ifdef RE_ENABLE_I18N +static void build_wcs_buffer (re_string_t *pstr) internal_function; +static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) + internal_function; +# endif /* RE_ENABLE_I18N */ +static void build_upper_buffer (re_string_t *pstr) internal_function; +static void re_string_translate_buffer (re_string_t *pstr) internal_function; +static unsigned int re_string_context_at (const re_string_t *input, Idx idx, + int eflags) + internal_function __attribute__ ((pure)); +#endif +#define re_string_peek_byte(pstr, offset) \ + ((pstr)->mbs[(pstr)->cur_idx + offset]) +#define re_string_fetch_byte(pstr) \ + ((pstr)->mbs[(pstr)->cur_idx++]) +#define re_string_first_byte(pstr, idx) \ + ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) +#define re_string_is_single_byte_char(pstr, idx) \ + ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ + || (pstr)->wcs[(idx) + 1] != WEOF)) +#define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) +#define re_string_cur_idx(pstr) ((pstr)->cur_idx) +#define re_string_get_buffer(pstr) ((pstr)->mbs) +#define re_string_length(pstr) ((pstr)->len) +#define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) +#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) +#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) + +#if defined _LIBC || HAVE_ALLOCA +# include +#endif + +#ifndef _LIBC +# if HAVE_ALLOCA +/* The OS usually guarantees only one guard page at the bottom of the stack, + 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. */ +# define __libc_use_alloca(n) ((n) < 4032) +# else +/* alloca is implemented with malloc, so just use malloc. */ +# define __libc_use_alloca(n) 0 +# undef alloca +# define alloca(n) malloc (n) +# endif +#endif + +#ifdef _LIBC +# define MALLOC_0_IS_NONNULL 1 +#elif !defined MALLOC_0_IS_NONNULL +# define MALLOC_0_IS_NONNULL 0 +#endif + +#ifndef MAX +# define MAX(a,b) ((a) < (b) ? (b) : (a)) +#endif +#ifndef MIN +# define MIN(a,b) ((a) < (b) ? (a) : (b)) +#endif + +#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) +#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) +#define re_free(p) free (p) + +struct bin_tree_t +{ + struct bin_tree_t *parent; + struct bin_tree_t *left; + struct bin_tree_t *right; + struct bin_tree_t *first; + struct bin_tree_t *next; + + re_token_t token; + + /* 'node_idx' is the index in dfa->nodes, if 'type' == 0. + Otherwise 'type' indicate the type of this node. */ + Idx node_idx; +}; +typedef struct bin_tree_t bin_tree_t; + +#define BIN_TREE_STORAGE_SIZE \ + ((1024 - sizeof (void *)) / sizeof (bin_tree_t)) + +struct bin_tree_storage_t +{ + struct bin_tree_storage_t *next; + bin_tree_t data[BIN_TREE_STORAGE_SIZE]; +}; +typedef struct bin_tree_storage_t bin_tree_storage_t; + +#define CONTEXT_WORD 1 +#define CONTEXT_NEWLINE (CONTEXT_WORD << 1) +#define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) +#define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) + +#define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) +#define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) +#define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) +#define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) +#define IS_ORDINARY_CONTEXT(c) ((c) == 0) + +#define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') +#define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) +#define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') +#define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) + +#define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ + ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ + || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ + || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ + || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) + +#define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ + ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ + || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ + || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ + || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) + +struct re_dfastate_t +{ + re_hashval_t hash; + re_node_set nodes; + re_node_set non_eps_nodes; + re_node_set inveclosure; + re_node_set *entrance_nodes; + struct re_dfastate_t **trtable, **word_trtable; + unsigned int context : 4; + unsigned int halt : 1; + /* If this state can accept "multi byte". + Note that we refer to multibyte characters, and multi character + collating elements as "multi byte". */ + unsigned int accept_mb : 1; + /* If this state has backreference node(s). */ + unsigned int has_backref : 1; + unsigned int has_constraint : 1; +}; +typedef struct re_dfastate_t re_dfastate_t; + +struct re_state_table_entry +{ + Idx num; + Idx alloc; + re_dfastate_t **array; +}; + +/* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ + +typedef struct +{ + Idx next_idx; + Idx alloc; + re_dfastate_t **array; +} state_array_t; + +/* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ + +typedef struct +{ + Idx node; + Idx str_idx; /* The position NODE match at. */ + state_array_t path; +} re_sub_match_last_t; + +/* Store information about the node NODE whose type is OP_OPEN_SUBEXP. + And information about the node, whose type is OP_CLOSE_SUBEXP, + corresponding to NODE is stored in LASTS. */ + +typedef struct +{ + Idx str_idx; + Idx node; + state_array_t *path; + Idx alasts; /* Allocation size of LASTS. */ + Idx nlasts; /* The number of LASTS. */ + re_sub_match_last_t **lasts; +} re_sub_match_top_t; + +struct re_backref_cache_entry +{ + Idx node; + Idx str_idx; + Idx subexp_from; + Idx subexp_to; + char more; + char unused; + unsigned short int eps_reachable_subexps_map; +}; + +typedef struct +{ + /* The string object corresponding to the input string. */ + re_string_t input; +#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) + const re_dfa_t *const dfa; +#else + const re_dfa_t *dfa; +#endif + /* EFLAGS of the argument of regexec. */ + int eflags; + /* Where the matching ends. */ + Idx match_last; + Idx last_node; + /* The state log used by the matcher. */ + re_dfastate_t **state_log; + Idx state_log_top; + /* Back reference cache. */ + Idx nbkref_ents; + Idx abkref_ents; + struct re_backref_cache_entry *bkref_ents; + int max_mb_elem_len; + Idx nsub_tops; + Idx asub_tops; + re_sub_match_top_t **sub_tops; +} re_match_context_t; + +typedef struct +{ + re_dfastate_t **sifted_states; + re_dfastate_t **limited_states; + Idx last_node; + Idx last_str_idx; + re_node_set limits; +} re_sift_context_t; + +struct re_fail_stack_ent_t +{ + Idx idx; + Idx node; + regmatch_t *regs; + re_node_set eps_via_nodes; +}; + +struct re_fail_stack_t +{ + Idx num; + Idx alloc; + struct re_fail_stack_ent_t *stack; +}; + +struct re_dfa_t +{ + re_token_t *nodes; + size_t nodes_alloc; + size_t nodes_len; + Idx *nexts; + Idx *org_indices; + re_node_set *edests; + re_node_set *eclosures; + re_node_set *inveclosures; + struct re_state_table_entry *state_table; + re_dfastate_t *init_state; + re_dfastate_t *init_state_word; + re_dfastate_t *init_state_nl; + re_dfastate_t *init_state_begbuf; + bin_tree_t *str_tree; + bin_tree_storage_t *str_tree_storage; + re_bitset_ptr_t sb_char; + int str_tree_storage_idx; + + /* number of subexpressions 're_nsub' is in regex_t. */ + re_hashval_t state_hash_mask; + Idx init_node; + Idx nbackref; /* The number of backreference in this dfa. */ + + /* Bitmap expressing which backreference is used. */ + bitset_word_t used_bkref_map; + bitset_word_t completed_bkref_map; + + unsigned int has_plural_match : 1; + /* If this dfa has "multibyte node", which is a backreference or + a node which can accept multibyte character or multi character + collating element. */ + unsigned int has_mb_node : 1; + unsigned int is_utf8 : 1; + unsigned int map_notascii : 1; + unsigned int word_ops_used : 1; + int mb_cur_max; + bitset_t word_char; + reg_syntax_t syntax; + Idx *subexp_map; +#ifdef DEBUG + char* re_str; +#endif + lock_define (lock) +}; + +#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) +#define re_node_set_remove(set,id) \ + (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) +#define re_node_set_empty(p) ((p)->nelem = 0) +#define re_node_set_free(set) re_free ((set)->elems) + + +typedef enum +{ + SB_CHAR, + MB_CHAR, + EQUIV_CLASS, + COLL_SYM, + CHAR_CLASS +} bracket_elem_type; + +typedef struct +{ + bracket_elem_type type; + union + { + unsigned char ch; + unsigned char *name; + wchar_t wch; + } opr; +} bracket_elem_t; + + +/* Functions for bitset_t operation. */ + +static void +bitset_set (bitset_t set, Idx i) +{ + set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS; +} + +static void +bitset_clear (bitset_t set, Idx i) +{ + set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS); +} + +static bool +bitset_contain (const bitset_t set, Idx i) +{ + return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1; +} + +static void +bitset_empty (bitset_t set) +{ + memset (set, '\0', sizeof (bitset_t)); +} + +static void +bitset_set_all (bitset_t set) +{ + memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS)); + if (SBC_MAX % BITSET_WORD_BITS != 0) + set[BITSET_WORDS - 1] = + ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; +} + +static void +bitset_copy (bitset_t dest, const bitset_t src) +{ + memcpy (dest, src, sizeof (bitset_t)); +} + +static void __attribute__ ((unused)) +bitset_not (bitset_t set) +{ + int bitset_i; + for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) + set[bitset_i] = ~set[bitset_i]; + if (SBC_MAX % BITSET_WORD_BITS != 0) + set[BITSET_WORDS - 1] = + ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1) + & ~set[BITSET_WORDS - 1]); +} + +static void __attribute__ ((unused)) +bitset_merge (bitset_t dest, const bitset_t src) +{ + int bitset_i; + for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) + dest[bitset_i] |= src[bitset_i]; +} + +static void __attribute__ ((unused)) +bitset_mask (bitset_t dest, const bitset_t src) +{ + int bitset_i; + for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) + dest[bitset_i] &= src[bitset_i]; +} + +#ifdef RE_ENABLE_I18N +/* Functions for re_string. */ +static int +internal_function __attribute__ ((pure, unused)) +re_string_char_size_at (const re_string_t *pstr, Idx idx) +{ + int byte_idx; + if (pstr->mb_cur_max == 1) + return 1; + for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) + if (pstr->wcs[idx + byte_idx] != WEOF) + break; + return byte_idx; +} + +static wint_t +internal_function __attribute__ ((pure, unused)) +re_string_wchar_at (const re_string_t *pstr, Idx idx) +{ + if (pstr->mb_cur_max == 1) + return (wint_t) pstr->mbs[idx]; + return (wint_t) pstr->wcs[idx]; +} + +# ifndef NOT_IN_libc +static int +internal_function __attribute__ ((pure, unused)) +re_string_elem_size_at (const re_string_t *pstr, Idx idx) +{ +# ifdef _LIBC + const unsigned char *p, *extra; + const int32_t *table, *indirect; +# include + uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + + if (nrules != 0) + { + table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); + extra = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); + indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_INDIRECTMB); + p = pstr->mbs + idx; + findidx (&p, pstr->len - idx); + return p - pstr->mbs - idx; + } + else +# endif /* _LIBC */ + return 1; +} +# endif +#endif /* RE_ENABLE_I18N */ + +#ifndef __GNUC_PREREQ +# if defined __GNUC__ && defined __GNUC_MINOR__ +# define __GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +# else +# define __GNUC_PREREQ(maj, min) 0 +# endif +#endif + +#if __GNUC_PREREQ (3,4) +# undef __attribute_warn_unused_result__ +# define __attribute_warn_unused_result__ \ + __attribute__ ((__warn_unused_result__)) +#else +# define __attribute_warn_unused_result__ /* empty */ +#endif + +#endif /* _REGEX_INTERNAL_H */ diff --git a/gl/lib/regexec.c b/gl/lib/regexec.c new file mode 100644 index 0000000..7c91449 --- /dev/null +++ b/gl/lib/regexec.c @@ -0,0 +1,4410 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2002-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Isamu Hasegawa . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with the GNU C Library; if not, see + . */ + +static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, + Idx n) internal_function; +static void match_ctx_clean (re_match_context_t *mctx) internal_function; +static void match_ctx_free (re_match_context_t *cache) internal_function; +static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node, + Idx str_idx, Idx from, Idx to) + internal_function; +static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) + internal_function; +static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node, + Idx str_idx) internal_function; +static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, + Idx node, Idx str_idx) + internal_function; +static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, + re_dfastate_t **limited_sts, Idx last_node, + Idx last_str_idx) + internal_function; +static reg_errcode_t re_search_internal (const regex_t *preg, + const char *string, Idx length, + Idx start, Idx last_start, Idx stop, + size_t nmatch, regmatch_t pmatch[], + int eflags) internal_function; +static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp, + const char *string1, Idx length1, + const char *string2, Idx length2, + Idx start, regoff_t range, + struct re_registers *regs, + Idx stop, bool ret_len) internal_function; +static regoff_t re_search_stub (struct re_pattern_buffer *bufp, + const char *string, Idx length, Idx start, + regoff_t range, Idx stop, + struct re_registers *regs, + bool ret_len) internal_function; +static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, + Idx nregs, int regs_allocated) internal_function; +static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) + internal_function; +static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, + Idx *p_match_first) internal_function; +static Idx check_halt_state_context (const re_match_context_t *mctx, + const re_dfastate_t *state, Idx idx) + internal_function; +static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, + regmatch_t *prev_idx_match, Idx cur_node, + Idx cur_idx, Idx nmatch) internal_function; +static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, + Idx str_idx, Idx dest_node, Idx nregs, + regmatch_t *regs, + re_node_set *eps_via_nodes) + internal_function; +static reg_errcode_t set_regs (const regex_t *preg, + const re_match_context_t *mctx, + size_t nmatch, regmatch_t *pmatch, + bool fl_backtrack) internal_function; +static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) + internal_function; + +#ifdef RE_ENABLE_I18N +static int sift_states_iter_mb (const re_match_context_t *mctx, + re_sift_context_t *sctx, + Idx node_idx, Idx str_idx, Idx max_str_idx) + internal_function; +#endif /* RE_ENABLE_I18N */ +static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, + re_sift_context_t *sctx) + internal_function; +static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, + re_sift_context_t *sctx, Idx str_idx, + re_node_set *cur_dest) + internal_function; +static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, + re_sift_context_t *sctx, + Idx str_idx, + re_node_set *dest_nodes) + internal_function; +static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, + re_node_set *dest_nodes, + const re_node_set *candidates) + internal_function; +static bool check_dst_limits (const re_match_context_t *mctx, + const re_node_set *limits, + Idx dst_node, Idx dst_idx, Idx src_node, + Idx src_idx) internal_function; +static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, + int boundaries, Idx subexp_idx, + Idx from_node, Idx bkref_idx) + internal_function; +static int check_dst_limits_calc_pos (const re_match_context_t *mctx, + Idx limit, Idx subexp_idx, + Idx node, Idx str_idx, + Idx bkref_idx) internal_function; +static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, + re_node_set *dest_nodes, + const re_node_set *candidates, + re_node_set *limits, + struct re_backref_cache_entry *bkref_ents, + Idx str_idx) internal_function; +static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, + re_sift_context_t *sctx, + Idx str_idx, const re_node_set *candidates) + internal_function; +static reg_errcode_t merge_state_array (const re_dfa_t *dfa, + re_dfastate_t **dst, + re_dfastate_t **src, Idx num) + internal_function; +static re_dfastate_t *find_recover_state (reg_errcode_t *err, + re_match_context_t *mctx) internal_function; +static re_dfastate_t *transit_state (reg_errcode_t *err, + re_match_context_t *mctx, + re_dfastate_t *state) internal_function; +static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, + re_match_context_t *mctx, + re_dfastate_t *next_state) + internal_function; +static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, + re_node_set *cur_nodes, + Idx str_idx) internal_function; +#if 0 +static re_dfastate_t *transit_state_sb (reg_errcode_t *err, + re_match_context_t *mctx, + re_dfastate_t *pstate) + internal_function; +#endif +#ifdef RE_ENABLE_I18N +static reg_errcode_t transit_state_mb (re_match_context_t *mctx, + re_dfastate_t *pstate) + internal_function; +#endif /* RE_ENABLE_I18N */ +static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, + const re_node_set *nodes) + internal_function; +static reg_errcode_t get_subexp (re_match_context_t *mctx, + Idx bkref_node, Idx bkref_str_idx) + internal_function; +static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, + const re_sub_match_top_t *sub_top, + re_sub_match_last_t *sub_last, + Idx bkref_node, Idx bkref_str) + internal_function; +static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, + Idx subexp_idx, int type) internal_function; +static reg_errcode_t check_arrival (re_match_context_t *mctx, + state_array_t *path, Idx top_node, + Idx top_str, Idx last_node, Idx last_str, + int type) internal_function; +static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, + Idx str_idx, + re_node_set *cur_nodes, + re_node_set *next_nodes) + internal_function; +static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, + re_node_set *cur_nodes, + Idx ex_subexp, int type) + internal_function; +static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, + re_node_set *dst_nodes, + Idx target, Idx ex_subexp, + int type) internal_function; +static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, + re_node_set *cur_nodes, Idx cur_str, + Idx subexp_num, int type) + internal_function; +static bool build_trtable (const re_dfa_t *dfa, + re_dfastate_t *state) internal_function; +#ifdef RE_ENABLE_I18N +static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, + const re_string_t *input, Idx idx) + internal_function; +# ifdef _LIBC +static unsigned int find_collation_sequence_value (const unsigned char *mbs, + size_t name_len) + internal_function; +# endif /* _LIBC */ +#endif /* RE_ENABLE_I18N */ +static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, + const re_dfastate_t *state, + re_node_set *states_node, + bitset_t *states_ch) internal_function; +static bool check_node_accept (const re_match_context_t *mctx, + const re_token_t *node, Idx idx) + internal_function; +static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len) + internal_function; + +/* Entry point for POSIX code. */ + +/* regexec searches for a given pattern, specified by PREG, in the + string STRING. + + If NMATCH is zero or REG_NOSUB was set in the cflags argument to + 'regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at + least NMATCH elements, and we set them to the offsets of the + corresponding matched substrings. + + EFLAGS specifies "execution flags" which affect matching: if + REG_NOTBOL is set, then ^ does not match at the beginning of the + string; if REG_NOTEOL is set, then $ does not match at the end. + + We return 0 if we find a match and REG_NOMATCH if not. */ + +int +regexec (preg, string, nmatch, pmatch, eflags) + const regex_t *_Restrict_ preg; + const char *_Restrict_ string; + size_t nmatch; + regmatch_t pmatch[_Restrict_arr_]; + int eflags; +{ + reg_errcode_t err; + Idx start, length; + re_dfa_t *dfa = preg->buffer; + + if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) + return REG_BADPAT; + + if (eflags & REG_STARTEND) + { + start = pmatch[0].rm_so; + length = pmatch[0].rm_eo; + } + else + { + start = 0; + length = strlen (string); + } + + lock_lock (dfa->lock); + if (preg->no_sub) + err = re_search_internal (preg, string, length, start, length, + length, 0, NULL, eflags); + else + err = re_search_internal (preg, string, length, start, length, + length, nmatch, pmatch, eflags); + lock_unlock (dfa->lock); + return err != REG_NOERROR; +} + +#ifdef _LIBC +# include +versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); + +# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) +__typeof__ (__regexec) __compat_regexec; + +int +attribute_compat_text_section +__compat_regexec (const regex_t *_Restrict_ preg, + const char *_Restrict_ string, size_t nmatch, + regmatch_t pmatch[], int eflags) +{ + return regexec (preg, string, nmatch, pmatch, + eflags & (REG_NOTBOL | REG_NOTEOL)); +} +compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); +# endif +#endif + +/* Entry points for GNU code. */ + +/* re_match, re_search, re_match_2, re_search_2 + + The former two functions operate on STRING with length LENGTH, + while the later two operate on concatenation of STRING1 and STRING2 + with lengths LENGTH1 and LENGTH2, respectively. + + re_match() matches the compiled pattern in BUFP against the string, + starting at index START. + + re_search() first tries matching at index START, then it tries to match + starting from index START + 1, and so on. The last start position tried + is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same + way as re_match().) + + The parameter STOP of re_{match,search}_2 specifies that no match exceeding + the first STOP characters of the concatenation of the strings should be + concerned. + + If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match + and all groups is stored in REGS. (For the "_2" variants, the offsets are + computed relative to the concatenation, not relative to the individual + strings.) + + On success, re_match* functions return the length of the match, re_search* + return the position of the start of the match. Return value -1 means no + match was found and -2 indicates an internal error. */ + +regoff_t +re_match (bufp, string, length, start, regs) + struct re_pattern_buffer *bufp; + const char *string; + Idx length, start; + struct re_registers *regs; +{ + return re_search_stub (bufp, string, length, start, 0, length, regs, true); +} +#ifdef _LIBC +weak_alias (__re_match, re_match) +#endif + +regoff_t +re_search (bufp, string, length, start, range, regs) + struct re_pattern_buffer *bufp; + const char *string; + Idx length, start; + regoff_t range; + struct re_registers *regs; +{ + return re_search_stub (bufp, string, length, start, range, length, regs, + false); +} +#ifdef _LIBC +weak_alias (__re_search, re_search) +#endif + +regoff_t +re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) + struct re_pattern_buffer *bufp; + const char *string1, *string2; + Idx length1, length2, start, stop; + struct re_registers *regs; +{ + return re_search_2_stub (bufp, string1, length1, string2, length2, + start, 0, regs, stop, true); +} +#ifdef _LIBC +weak_alias (__re_match_2, re_match_2) +#endif + +regoff_t +re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) + struct re_pattern_buffer *bufp; + const char *string1, *string2; + Idx length1, length2, start, stop; + regoff_t range; + struct re_registers *regs; +{ + return re_search_2_stub (bufp, string1, length1, string2, length2, + start, range, regs, stop, false); +} +#ifdef _LIBC +weak_alias (__re_search_2, re_search_2) +#endif + +static regoff_t +re_search_2_stub (struct re_pattern_buffer *bufp, + const char *string1, Idx length1, + const char *string2, Idx length2, + Idx start, regoff_t range, struct re_registers *regs, + Idx stop, bool ret_len) +{ + const char *str; + regoff_t rval; + Idx len = length1 + length2; + char *s = NULL; + + if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) + return -2; + + /* Concatenate the strings. */ + if (length2 > 0) + if (length1 > 0) + { + s = re_malloc (char, len); + + if (BE (s == NULL, 0)) + return -2; +#ifdef _LIBC + memcpy (__mempcpy (s, string1, length1), string2, length2); +#else + memcpy (s, string1, length1); + memcpy (s + length1, string2, length2); +#endif + str = s; + } + else + str = string2; + else + str = string1; + + rval = re_search_stub (bufp, str, len, start, range, stop, regs, + ret_len); + re_free (s); + return rval; +} + +/* The parameters have the same meaning as those of re_search. + Additional parameters: + If RET_LEN is true the length of the match is returned (re_match style); + otherwise the position of the match is returned. */ + +static regoff_t +re_search_stub (struct re_pattern_buffer *bufp, + const char *string, Idx length, + Idx start, regoff_t range, Idx stop, struct re_registers *regs, + bool ret_len) +{ + reg_errcode_t result; + regmatch_t *pmatch; + Idx nregs; + regoff_t rval; + int eflags = 0; + re_dfa_t *dfa = bufp->buffer; + Idx last_start = start + range; + + /* Check for out-of-range. */ + if (BE (start < 0 || start > length, 0)) + return -1; + if (BE (length < last_start || (0 <= range && last_start < start), 0)) + last_start = length; + else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0)) + last_start = 0; + + lock_lock (dfa->lock); + + eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; + eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; + + /* Compile fastmap if we haven't yet. */ + if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate) + re_compile_fastmap (bufp); + + if (BE (bufp->no_sub, 0)) + regs = NULL; + + /* We need at least 1 register. */ + if (regs == NULL) + nregs = 1; + else if (BE (bufp->regs_allocated == REGS_FIXED + && regs->num_regs <= bufp->re_nsub, 0)) + { + nregs = regs->num_regs; + if (BE (nregs < 1, 0)) + { + /* Nothing can be copied to regs. */ + regs = NULL; + nregs = 1; + } + } + else + nregs = bufp->re_nsub + 1; + pmatch = re_malloc (regmatch_t, nregs); + if (BE (pmatch == NULL, 0)) + { + rval = -2; + goto out; + } + + result = re_search_internal (bufp, string, length, start, last_start, stop, + nregs, pmatch, eflags); + + rval = 0; + + /* I hope we needn't fill their regs with -1's when no match was found. */ + if (result != REG_NOERROR) + rval = result == REG_NOMATCH ? -1 : -2; + else if (regs != NULL) + { + /* If caller wants register contents data back, copy them. */ + bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, + bufp->regs_allocated); + if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) + rval = -2; + } + + if (BE (rval == 0, 1)) + { + if (ret_len) + { + assert (pmatch[0].rm_so == start); + rval = pmatch[0].rm_eo - start; + } + else + rval = pmatch[0].rm_so; + } + re_free (pmatch); + out: + lock_unlock (dfa->lock); + return rval; +} + +static unsigned +re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, + int regs_allocated) +{ + int rval = REGS_REALLOCATE; + Idx i; + Idx need_regs = nregs + 1; + /* We need one extra element beyond 'num_regs' for the '-1' marker GNU code + uses. */ + + /* Have the register data arrays been allocated? */ + if (regs_allocated == REGS_UNALLOCATED) + { /* No. So allocate them with malloc. */ + regs->start = re_malloc (regoff_t, need_regs); + if (BE (regs->start == NULL, 0)) + return REGS_UNALLOCATED; + regs->end = re_malloc (regoff_t, need_regs); + if (BE (regs->end == NULL, 0)) + { + re_free (regs->start); + return REGS_UNALLOCATED; + } + regs->num_regs = need_regs; + } + else if (regs_allocated == REGS_REALLOCATE) + { /* Yes. If we need more elements than were already + allocated, reallocate them. If we need fewer, just + leave it alone. */ + if (BE (need_regs > regs->num_regs, 0)) + { + regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); + regoff_t *new_end; + if (BE (new_start == NULL, 0)) + return REGS_UNALLOCATED; + new_end = re_realloc (regs->end, regoff_t, need_regs); + if (BE (new_end == NULL, 0)) + { + re_free (new_start); + return REGS_UNALLOCATED; + } + regs->start = new_start; + regs->end = new_end; + regs->num_regs = need_regs; + } + } + else + { + assert (regs_allocated == REGS_FIXED); + /* This function may not be called with REGS_FIXED and nregs too big. */ + assert (regs->num_regs >= nregs); + rval = REGS_FIXED; + } + + /* Copy the regs. */ + for (i = 0; i < nregs; ++i) + { + regs->start[i] = pmatch[i].rm_so; + regs->end[i] = pmatch[i].rm_eo; + } + for ( ; i < regs->num_regs; ++i) + regs->start[i] = regs->end[i] = -1; + + return rval; +} + +/* Set REGS to hold NUM_REGS registers, storing them in STARTS and + ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use + this memory for recording register information. STARTS and ENDS + must be allocated using the malloc library routine, and must each + be at least NUM_REGS * sizeof (regoff_t) bytes long. + + If NUM_REGS == 0, then subsequent matches should allocate their own + register data. + + Unless this function is called, the first search or match using + PATTERN_BUFFER will allocate its own register data, without + freeing the old data. */ + +void +re_set_registers (bufp, regs, num_regs, starts, ends) + struct re_pattern_buffer *bufp; + struct re_registers *regs; + __re_size_t num_regs; + regoff_t *starts, *ends; +{ + if (num_regs) + { + bufp->regs_allocated = REGS_REALLOCATE; + regs->num_regs = num_regs; + regs->start = starts; + regs->end = ends; + } + else + { + bufp->regs_allocated = REGS_UNALLOCATED; + regs->num_regs = 0; + regs->start = regs->end = NULL; + } +} +#ifdef _LIBC +weak_alias (__re_set_registers, re_set_registers) +#endif + +/* Entry points compatible with 4.2 BSD regex library. We don't define + them unless specifically requested. */ + +#if defined _REGEX_RE_COMP || defined _LIBC +int +# ifdef _LIBC +weak_function +# endif +re_exec (s) + const char *s; +{ + return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); +} +#endif /* _REGEX_RE_COMP */ + +/* Internal entry point. */ + +/* Searches for a compiled pattern PREG in the string STRING, whose + length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same + meaning as with regexec. LAST_START is START + RANGE, where + START and RANGE have the same meaning as with re_search. + Return REG_NOERROR if we find a match, and REG_NOMATCH if not, + otherwise return the error code. + Note: We assume front end functions already check ranges. + (0 <= LAST_START && LAST_START <= LENGTH) */ + +static reg_errcode_t +__attribute_warn_unused_result__ +re_search_internal (const regex_t *preg, + const char *string, Idx length, + Idx start, Idx last_start, Idx stop, + size_t nmatch, regmatch_t pmatch[], + int eflags) +{ + reg_errcode_t err; + const re_dfa_t *dfa = preg->buffer; + Idx left_lim, right_lim; + int incr; + bool fl_longest_match; + int match_kind; + Idx match_first; + Idx match_last = REG_MISSING; + Idx extra_nmatch; + bool sb; + int ch; +#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) + re_match_context_t mctx = { .dfa = dfa }; +#else + re_match_context_t mctx; +#endif + char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate + && start != last_start && !preg->can_be_null) + ? preg->fastmap : NULL); + RE_TRANSLATE_TYPE t = preg->translate; + +#if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) + memset (&mctx, '\0', sizeof (re_match_context_t)); + mctx.dfa = dfa; +#endif + + extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; + nmatch -= extra_nmatch; + + /* Check if the DFA haven't been compiled. */ + if (BE (preg->used == 0 || dfa->init_state == NULL + || dfa->init_state_word == NULL || dfa->init_state_nl == NULL + || dfa->init_state_begbuf == NULL, 0)) + return REG_NOMATCH; + +#ifdef DEBUG + /* We assume front-end functions already check them. */ + assert (0 <= last_start && last_start <= length); +#endif + + /* If initial states with non-begbuf contexts have no elements, + the regex must be anchored. If preg->newline_anchor is set, + we'll never use init_state_nl, so do not check it. */ + if (dfa->init_state->nodes.nelem == 0 + && dfa->init_state_word->nodes.nelem == 0 + && (dfa->init_state_nl->nodes.nelem == 0 + || !preg->newline_anchor)) + { + if (start != 0 && last_start != 0) + return REG_NOMATCH; + start = last_start = 0; + } + + /* We must check the longest matching, if nmatch > 0. */ + fl_longest_match = (nmatch != 0 || dfa->nbackref); + + err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, + preg->translate, (preg->syntax & RE_ICASE) != 0, + dfa); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + mctx.input.stop = stop; + mctx.input.raw_stop = stop; + mctx.input.newline_anchor = preg->newline_anchor; + + err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + + /* We will log all the DFA states through which the dfa pass, + if nmatch > 1, or this dfa has "multibyte node", which is a + back-reference or a node which can accept multibyte character or + multi character collating element. */ + if (nmatch > 1 || dfa->has_mb_node) + { + /* Avoid overflow. */ + if (BE ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) + <= mctx.input.bufs_len), 0)) + { + err = REG_ESPACE; + goto free_return; + } + + mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); + if (BE (mctx.state_log == NULL, 0)) + { + err = REG_ESPACE; + goto free_return; + } + } + else + mctx.state_log = NULL; + + match_first = start; + mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF + : CONTEXT_NEWLINE | CONTEXT_BEGBUF; + + /* Check incrementally whether the input string matches. */ + incr = (last_start < start) ? -1 : 1; + left_lim = (last_start < start) ? last_start : start; + right_lim = (last_start < start) ? start : last_start; + sb = dfa->mb_cur_max == 1; + match_kind = + (fastmap + ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) + | (start <= last_start ? 2 : 0) + | (t != NULL ? 1 : 0)) + : 8); + + for (;; match_first += incr) + { + err = REG_NOMATCH; + if (match_first < left_lim || right_lim < match_first) + goto free_return; + + /* Advance as rapidly as possible through the string, until we + find a plausible place to start matching. This may be done + with varying efficiency, so there are various possibilities: + only the most common of them are specialized, in order to + save on code size. We use a switch statement for speed. */ + switch (match_kind) + { + case 8: + /* No fastmap. */ + break; + + case 7: + /* Fastmap with single-byte translation, match forward. */ + while (BE (match_first < right_lim, 1) + && !fastmap[t[(unsigned char) string[match_first]]]) + ++match_first; + goto forward_match_found_start_or_reached_end; + + case 6: + /* Fastmap without translation, match forward. */ + while (BE (match_first < right_lim, 1) + && !fastmap[(unsigned char) string[match_first]]) + ++match_first; + + forward_match_found_start_or_reached_end: + if (BE (match_first == right_lim, 0)) + { + ch = match_first >= length + ? 0 : (unsigned char) string[match_first]; + if (!fastmap[t ? t[ch] : ch]) + goto free_return; + } + break; + + case 4: + case 5: + /* Fastmap without multi-byte translation, match backwards. */ + while (match_first >= left_lim) + { + ch = match_first >= length + ? 0 : (unsigned char) string[match_first]; + if (fastmap[t ? t[ch] : ch]) + break; + --match_first; + } + if (match_first < left_lim) + goto free_return; + break; + + default: + /* In this case, we can't determine easily the current byte, + since it might be a component byte of a multibyte + character. Then we use the constructed buffer instead. */ + for (;;) + { + /* If MATCH_FIRST is out of the valid range, reconstruct the + buffers. */ + __re_size_t offset = match_first - mctx.input.raw_mbs_idx; + if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0)) + { + err = re_string_reconstruct (&mctx.input, match_first, + eflags); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + + offset = match_first - mctx.input.raw_mbs_idx; + } + /* If MATCH_FIRST is out of the buffer, leave it as '\0'. + Note that MATCH_FIRST must not be smaller than 0. */ + ch = (match_first >= length + ? 0 : re_string_byte_at (&mctx.input, offset)); + if (fastmap[ch]) + break; + match_first += incr; + if (match_first < left_lim || match_first > right_lim) + { + err = REG_NOMATCH; + goto free_return; + } + } + break; + } + + /* Reconstruct the buffers so that the matcher can assume that + the matching starts from the beginning of the buffer. */ + err = re_string_reconstruct (&mctx.input, match_first, eflags); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + +#ifdef RE_ENABLE_I18N + /* Don't consider this char as a possible match start if it part, + yet isn't the head, of a multibyte character. */ + if (!sb && !re_string_first_byte (&mctx.input, 0)) + continue; +#endif + + /* It seems to be appropriate one, then use the matcher. */ + /* We assume that the matching starts from 0. */ + mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; + match_last = check_matching (&mctx, fl_longest_match, + start <= last_start ? &match_first : NULL); + if (match_last != REG_MISSING) + { + if (BE (match_last == REG_ERROR, 0)) + { + err = REG_ESPACE; + goto free_return; + } + else + { + mctx.match_last = match_last; + if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) + { + re_dfastate_t *pstate = mctx.state_log[match_last]; + mctx.last_node = check_halt_state_context (&mctx, pstate, + match_last); + } + if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) + || dfa->nbackref) + { + err = prune_impossible_nodes (&mctx); + if (err == REG_NOERROR) + break; + if (BE (err != REG_NOMATCH, 0)) + goto free_return; + match_last = REG_MISSING; + } + else + break; /* We found a match. */ + } + } + + match_ctx_clean (&mctx); + } + +#ifdef DEBUG + assert (match_last != REG_MISSING); + assert (err == REG_NOERROR); +#endif + + /* Set pmatch[] if we need. */ + if (nmatch > 0) + { + Idx reg_idx; + + /* Initialize registers. */ + for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) + pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; + + /* Set the points where matching start/end. */ + pmatch[0].rm_so = 0; + pmatch[0].rm_eo = mctx.match_last; + /* FIXME: This function should fail if mctx.match_last exceeds + the maximum possible regoff_t value. We need a new error + code REG_OVERFLOW. */ + + if (!preg->no_sub && nmatch > 1) + { + err = set_regs (preg, &mctx, nmatch, pmatch, + dfa->has_plural_match && dfa->nbackref > 0); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + + /* At last, add the offset to each register, since we slid + the buffers so that we could assume that the matching starts + from 0. */ + for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) + if (pmatch[reg_idx].rm_so != -1) + { +#ifdef RE_ENABLE_I18N + if (BE (mctx.input.offsets_needed != 0, 0)) + { + pmatch[reg_idx].rm_so = + (pmatch[reg_idx].rm_so == mctx.input.valid_len + ? mctx.input.valid_raw_len + : mctx.input.offsets[pmatch[reg_idx].rm_so]); + pmatch[reg_idx].rm_eo = + (pmatch[reg_idx].rm_eo == mctx.input.valid_len + ? mctx.input.valid_raw_len + : mctx.input.offsets[pmatch[reg_idx].rm_eo]); + } +#else + assert (mctx.input.offsets_needed == 0); +#endif + pmatch[reg_idx].rm_so += match_first; + pmatch[reg_idx].rm_eo += match_first; + } + for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) + { + pmatch[nmatch + reg_idx].rm_so = -1; + pmatch[nmatch + reg_idx].rm_eo = -1; + } + + if (dfa->subexp_map) + for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) + if (dfa->subexp_map[reg_idx] != reg_idx) + { + pmatch[reg_idx + 1].rm_so + = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; + pmatch[reg_idx + 1].rm_eo + = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; + } + } + + free_return: + re_free (mctx.state_log); + if (dfa->nbackref) + match_ctx_free (&mctx); + re_string_destruct (&mctx.input); + return err; +} + +static reg_errcode_t +__attribute_warn_unused_result__ +prune_impossible_nodes (re_match_context_t *mctx) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx halt_node, match_last; + reg_errcode_t ret; + re_dfastate_t **sifted_states; + re_dfastate_t **lim_states = NULL; + re_sift_context_t sctx; +#ifdef DEBUG + assert (mctx->state_log != NULL); +#endif + match_last = mctx->match_last; + halt_node = mctx->last_node; + + /* Avoid overflow. */ + if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) <= match_last, 0)) + return REG_ESPACE; + + sifted_states = re_malloc (re_dfastate_t *, match_last + 1); + if (BE (sifted_states == NULL, 0)) + { + ret = REG_ESPACE; + goto free_return; + } + if (dfa->nbackref) + { + lim_states = re_malloc (re_dfastate_t *, match_last + 1); + if (BE (lim_states == NULL, 0)) + { + ret = REG_ESPACE; + goto free_return; + } + while (1) + { + memset (lim_states, '\0', + sizeof (re_dfastate_t *) * (match_last + 1)); + sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, + match_last); + ret = sift_states_backward (mctx, &sctx); + re_node_set_free (&sctx.limits); + if (BE (ret != REG_NOERROR, 0)) + goto free_return; + if (sifted_states[0] != NULL || lim_states[0] != NULL) + break; + do + { + --match_last; + if (! REG_VALID_INDEX (match_last)) + { + ret = REG_NOMATCH; + goto free_return; + } + } while (mctx->state_log[match_last] == NULL + || !mctx->state_log[match_last]->halt); + halt_node = check_halt_state_context (mctx, + mctx->state_log[match_last], + match_last); + } + ret = merge_state_array (dfa, sifted_states, lim_states, + match_last + 1); + re_free (lim_states); + lim_states = NULL; + if (BE (ret != REG_NOERROR, 0)) + goto free_return; + } + else + { + sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); + ret = sift_states_backward (mctx, &sctx); + re_node_set_free (&sctx.limits); + if (BE (ret != REG_NOERROR, 0)) + goto free_return; + if (sifted_states[0] == NULL) + { + ret = REG_NOMATCH; + goto free_return; + } + } + re_free (mctx->state_log); + mctx->state_log = sifted_states; + sifted_states = NULL; + mctx->last_node = halt_node; + mctx->match_last = match_last; + ret = REG_NOERROR; + free_return: + re_free (sifted_states); + re_free (lim_states); + return ret; +} + +/* Acquire an initial state and return it. + We must select appropriate initial state depending on the context, + since initial states may have constraints like "\<", "^", etc.. */ + +static inline re_dfastate_t * +__attribute__ ((always_inline)) internal_function +acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, + Idx idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + if (dfa->init_state->has_constraint) + { + unsigned int context; + context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); + if (IS_WORD_CONTEXT (context)) + return dfa->init_state_word; + else if (IS_ORDINARY_CONTEXT (context)) + return dfa->init_state; + else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) + return dfa->init_state_begbuf; + else if (IS_NEWLINE_CONTEXT (context)) + return dfa->init_state_nl; + else if (IS_BEGBUF_CONTEXT (context)) + { + /* It is relatively rare case, then calculate on demand. */ + return re_acquire_state_context (err, dfa, + dfa->init_state->entrance_nodes, + context); + } + else + /* Must not happen? */ + return dfa->init_state; + } + else + return dfa->init_state; +} + +/* Check whether the regular expression match input string INPUT or not, + and return the index where the matching end. Return REG_MISSING if + there is no match, and return REG_ERROR in case of an error. + FL_LONGEST_MATCH means we want the POSIX longest matching. + If P_MATCH_FIRST is not NULL, and the match fails, it is set to the + next place where we may want to try matching. + Note that the matcher assumes that the matching starts from the current + index of the buffer. */ + +static Idx +internal_function __attribute_warn_unused_result__ +check_matching (re_match_context_t *mctx, bool fl_longest_match, + Idx *p_match_first) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err; + Idx match = 0; + Idx match_last = REG_MISSING; + Idx cur_str_idx = re_string_cur_idx (&mctx->input); + re_dfastate_t *cur_state; + bool at_init_state = p_match_first != NULL; + Idx next_start_idx = cur_str_idx; + + err = REG_NOERROR; + cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); + /* An initial state must not be NULL (invalid). */ + if (BE (cur_state == NULL, 0)) + { + assert (err == REG_ESPACE); + return REG_ERROR; + } + + if (mctx->state_log != NULL) + { + mctx->state_log[cur_str_idx] = cur_state; + + /* Check OP_OPEN_SUBEXP in the initial state in case that we use them + later. E.g. Processing back references. */ + if (BE (dfa->nbackref, 0)) + { + at_init_state = false; + err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); + if (BE (err != REG_NOERROR, 0)) + return err; + + if (cur_state->has_backref) + { + err = transit_state_bkref (mctx, &cur_state->nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + } + } + } + + /* If the RE accepts NULL string. */ + if (BE (cur_state->halt, 0)) + { + if (!cur_state->has_constraint + || check_halt_state_context (mctx, cur_state, cur_str_idx)) + { + if (!fl_longest_match) + return cur_str_idx; + else + { + match_last = cur_str_idx; + match = 1; + } + } + } + + while (!re_string_eoi (&mctx->input)) + { + re_dfastate_t *old_state = cur_state; + Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; + + if ((BE (next_char_idx >= mctx->input.bufs_len, 0) + && mctx->input.bufs_len < mctx->input.len) + || (BE (next_char_idx >= mctx->input.valid_len, 0) + && mctx->input.valid_len < mctx->input.len)) + { + err = extend_buffers (mctx, next_char_idx + 1); + if (BE (err != REG_NOERROR, 0)) + { + assert (err == REG_ESPACE); + return REG_ERROR; + } + } + + cur_state = transit_state (&err, mctx, cur_state); + if (mctx->state_log != NULL) + cur_state = merge_state_with_log (&err, mctx, cur_state); + + if (cur_state == NULL) + { + /* Reached the invalid state or an error. Try to recover a valid + state using the state log, if available and if we have not + already found a valid (even if not the longest) match. */ + if (BE (err != REG_NOERROR, 0)) + return REG_ERROR; + + if (mctx->state_log == NULL + || (match && !fl_longest_match) + || (cur_state = find_recover_state (&err, mctx)) == NULL) + break; + } + + if (BE (at_init_state, 0)) + { + if (old_state == cur_state) + next_start_idx = next_char_idx; + else + at_init_state = false; + } + + if (cur_state->halt) + { + /* Reached a halt state. + Check the halt state can satisfy the current context. */ + if (!cur_state->has_constraint + || check_halt_state_context (mctx, cur_state, + re_string_cur_idx (&mctx->input))) + { + /* We found an appropriate halt state. */ + match_last = re_string_cur_idx (&mctx->input); + match = 1; + + /* We found a match, do not modify match_first below. */ + p_match_first = NULL; + if (!fl_longest_match) + break; + } + } + } + + if (p_match_first) + *p_match_first += next_start_idx; + + return match_last; +} + +/* Check NODE match the current context. */ + +static bool +internal_function +check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) +{ + re_token_type_t type = dfa->nodes[node].type; + unsigned int constraint = dfa->nodes[node].constraint; + if (type != END_OF_RE) + return false; + if (!constraint) + return true; + if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) + return false; + return true; +} + +/* Check the halt state STATE match the current context. + Return 0 if not match, if the node, STATE has, is a halt node and + match the context, return the node. */ + +static Idx +internal_function +check_halt_state_context (const re_match_context_t *mctx, + const re_dfastate_t *state, Idx idx) +{ + Idx i; + unsigned int context; +#ifdef DEBUG + assert (state->halt); +#endif + context = re_string_context_at (&mctx->input, idx, mctx->eflags); + for (i = 0; i < state->nodes.nelem; ++i) + if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) + return state->nodes.elems[i]; + return 0; +} + +/* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA + corresponding to the DFA). + Return the destination node, and update EPS_VIA_NODES; + return REG_MISSING in case of errors. */ + +static Idx +internal_function +proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, + Idx *pidx, Idx node, re_node_set *eps_via_nodes, + struct re_fail_stack_t *fs) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx i; + bool ok; + if (IS_EPSILON_NODE (dfa->nodes[node].type)) + { + re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; + re_node_set *edests = &dfa->edests[node]; + Idx dest_node; + ok = re_node_set_insert (eps_via_nodes, node); + if (BE (! ok, 0)) + return REG_ERROR; + /* Pick up a valid destination, or return REG_MISSING if none + is found. */ + for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i) + { + Idx candidate = edests->elems[i]; + if (!re_node_set_contains (cur_nodes, candidate)) + continue; + if (dest_node == REG_MISSING) + dest_node = candidate; + + else + { + /* In order to avoid infinite loop like "(a*)*", return the second + epsilon-transition if the first was already considered. */ + if (re_node_set_contains (eps_via_nodes, dest_node)) + return candidate; + + /* Otherwise, push the second epsilon-transition on the fail stack. */ + else if (fs != NULL + && push_fail_stack (fs, *pidx, candidate, nregs, regs, + eps_via_nodes)) + return REG_ERROR; + + /* We know we are going to exit. */ + break; + } + } + return dest_node; + } + else + { + Idx naccepted = 0; + re_token_type_t type = dfa->nodes[node].type; + +#ifdef RE_ENABLE_I18N + if (dfa->nodes[node].accept_mb) + naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); + else +#endif /* RE_ENABLE_I18N */ + if (type == OP_BACK_REF) + { + Idx subexp_idx = dfa->nodes[node].opr.idx + 1; + naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; + if (fs != NULL) + { + if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) + return REG_MISSING; + else if (naccepted) + { + char *buf = (char *) re_string_get_buffer (&mctx->input); + if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, + naccepted) != 0) + return REG_MISSING; + } + } + + if (naccepted == 0) + { + Idx dest_node; + ok = re_node_set_insert (eps_via_nodes, node); + if (BE (! ok, 0)) + return REG_ERROR; + dest_node = dfa->edests[node].elems[0]; + if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, + dest_node)) + return dest_node; + } + } + + if (naccepted != 0 + || check_node_accept (mctx, dfa->nodes + node, *pidx)) + { + Idx dest_node = dfa->nexts[node]; + *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; + if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL + || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, + dest_node))) + return REG_MISSING; + re_node_set_empty (eps_via_nodes); + return dest_node; + } + } + return REG_MISSING; +} + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, + Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) +{ + reg_errcode_t err; + Idx num = fs->num++; + if (fs->num == fs->alloc) + { + struct re_fail_stack_ent_t *new_array; + new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) + * fs->alloc * 2)); + if (new_array == NULL) + return REG_ESPACE; + fs->alloc *= 2; + fs->stack = new_array; + } + fs->stack[num].idx = str_idx; + fs->stack[num].node = dest_node; + fs->stack[num].regs = re_malloc (regmatch_t, nregs); + if (fs->stack[num].regs == NULL) + return REG_ESPACE; + memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); + err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); + return err; +} + +static Idx +internal_function +pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, + regmatch_t *regs, re_node_set *eps_via_nodes) +{ + Idx num = --fs->num; + assert (REG_VALID_INDEX (num)); + *pidx = fs->stack[num].idx; + memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); + re_node_set_free (eps_via_nodes); + re_free (fs->stack[num].regs); + *eps_via_nodes = fs->stack[num].eps_via_nodes; + return fs->stack[num].node; +} + +/* Set the positions where the subexpressions are starts/ends to registers + PMATCH. + Note: We assume that pmatch[0] is already set, and + pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, + regmatch_t *pmatch, bool fl_backtrack) +{ + const re_dfa_t *dfa = preg->buffer; + Idx idx, cur_node; + re_node_set eps_via_nodes; + struct re_fail_stack_t *fs; + struct re_fail_stack_t fs_body = { 0, 2, NULL }; + regmatch_t *prev_idx_match; + bool prev_idx_match_malloced = false; + +#ifdef DEBUG + assert (nmatch > 1); + assert (mctx->state_log != NULL); +#endif + if (fl_backtrack) + { + fs = &fs_body; + fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); + if (fs->stack == NULL) + return REG_ESPACE; + } + else + fs = NULL; + + cur_node = dfa->init_node; + re_node_set_init_empty (&eps_via_nodes); + + if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) + prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); + else + { + prev_idx_match = re_malloc (regmatch_t, nmatch); + if (prev_idx_match == NULL) + { + free_fail_stack_return (fs); + return REG_ESPACE; + } + prev_idx_match_malloced = true; + } + memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); + + for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) + { + update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); + + if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) + { + Idx reg_idx; + if (fs) + { + for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) + if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) + break; + if (reg_idx == nmatch) + { + re_node_set_free (&eps_via_nodes); + if (prev_idx_match_malloced) + re_free (prev_idx_match); + return free_fail_stack_return (fs); + } + cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, + &eps_via_nodes); + } + else + { + re_node_set_free (&eps_via_nodes); + if (prev_idx_match_malloced) + re_free (prev_idx_match); + return REG_NOERROR; + } + } + + /* Proceed to next node. */ + cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, + &eps_via_nodes, fs); + + if (BE (! REG_VALID_INDEX (cur_node), 0)) + { + if (BE (cur_node == REG_ERROR, 0)) + { + re_node_set_free (&eps_via_nodes); + if (prev_idx_match_malloced) + re_free (prev_idx_match); + free_fail_stack_return (fs); + return REG_ESPACE; + } + if (fs) + cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, + &eps_via_nodes); + else + { + re_node_set_free (&eps_via_nodes); + if (prev_idx_match_malloced) + re_free (prev_idx_match); + return REG_NOMATCH; + } + } + } + re_node_set_free (&eps_via_nodes); + if (prev_idx_match_malloced) + re_free (prev_idx_match); + return free_fail_stack_return (fs); +} + +static reg_errcode_t +internal_function +free_fail_stack_return (struct re_fail_stack_t *fs) +{ + if (fs) + { + Idx fs_idx; + for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) + { + re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); + re_free (fs->stack[fs_idx].regs); + } + re_free (fs->stack); + } + return REG_NOERROR; +} + +static void +internal_function +update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, + regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) +{ + int type = dfa->nodes[cur_node].type; + if (type == OP_OPEN_SUBEXP) + { + Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; + + /* We are at the first node of this sub expression. */ + if (reg_num < nmatch) + { + pmatch[reg_num].rm_so = cur_idx; + pmatch[reg_num].rm_eo = -1; + } + } + else if (type == OP_CLOSE_SUBEXP) + { + Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; + if (reg_num < nmatch) + { + /* We are at the last node of this sub expression. */ + if (pmatch[reg_num].rm_so < cur_idx) + { + pmatch[reg_num].rm_eo = cur_idx; + /* This is a non-empty match or we are not inside an optional + subexpression. Accept this right away. */ + memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); + } + else + { + if (dfa->nodes[cur_node].opt_subexp + && prev_idx_match[reg_num].rm_so != -1) + /* We transited through an empty match for an optional + subexpression, like (a?)*, and this is not the subexp's + first match. Copy back the old content of the registers + so that matches of an inner subexpression are undone as + well, like in ((a?))*. */ + memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); + else + /* We completed a subexpression, but it may be part of + an optional one, so do not update PREV_IDX_MATCH. */ + pmatch[reg_num].rm_eo = cur_idx; + } + } + } +} + +/* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 + and sift the nodes in each states according to the following rules. + Updated state_log will be wrote to STATE_LOG. + + Rules: We throw away the Node 'a' in the STATE_LOG[STR_IDX] if... + 1. When STR_IDX == MATCH_LAST(the last index in the state_log): + If 'a' isn't the LAST_NODE and 'a' can't epsilon transit to + the LAST_NODE, we throw away the node 'a'. + 2. When 0 <= STR_IDX < MATCH_LAST and 'a' accepts + string 's' and transit to 'b': + i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw + away the node 'a'. + ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is + thrown away, we throw away the node 'a'. + 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b': + i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the + node 'a'. + ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, + we throw away the node 'a'. */ + +#define STATE_NODE_CONTAINS(state,node) \ + ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) + +static reg_errcode_t +internal_function +sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) +{ + reg_errcode_t err; + int null_cnt = 0; + Idx str_idx = sctx->last_str_idx; + re_node_set cur_dest; + +#ifdef DEBUG + assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); +#endif + + /* Build sifted state_log[str_idx]. It has the nodes which can epsilon + transit to the last_node and the last_node itself. */ + err = re_node_set_init_1 (&cur_dest, sctx->last_node); + if (BE (err != REG_NOERROR, 0)) + return err; + err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + + /* Then check each states in the state_log. */ + while (str_idx > 0) + { + /* Update counters. */ + null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; + if (null_cnt > mctx->max_mb_elem_len) + { + memset (sctx->sifted_states, '\0', + sizeof (re_dfastate_t *) * str_idx); + re_node_set_free (&cur_dest); + return REG_NOERROR; + } + re_node_set_empty (&cur_dest); + --str_idx; + + if (mctx->state_log[str_idx]) + { + err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + + /* Add all the nodes which satisfy the following conditions: + - It can epsilon transit to a node in CUR_DEST. + - It is in CUR_SRC. + And update state_log. */ + err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + err = REG_NOERROR; + free_return: + re_node_set_free (&cur_dest); + return err; +} + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, + Idx str_idx, re_node_set *cur_dest) +{ + const re_dfa_t *const dfa = mctx->dfa; + const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; + Idx i; + + /* Then build the next sifted state. + We build the next sifted state on 'cur_dest', and update + 'sifted_states[str_idx]' with 'cur_dest'. + Note: + 'cur_dest' is the sifted state from 'state_log[str_idx + 1]'. + 'cur_src' points the node_set of the old 'state_log[str_idx]' + (with the epsilon nodes pre-filtered out). */ + for (i = 0; i < cur_src->nelem; i++) + { + Idx prev_node = cur_src->elems[i]; + int naccepted = 0; + bool ok; + +#ifdef DEBUG + re_token_type_t type = dfa->nodes[prev_node].type; + assert (!IS_EPSILON_NODE (type)); +#endif +#ifdef RE_ENABLE_I18N + /* If the node may accept "multi byte". */ + if (dfa->nodes[prev_node].accept_mb) + naccepted = sift_states_iter_mb (mctx, sctx, prev_node, + str_idx, sctx->last_str_idx); +#endif /* RE_ENABLE_I18N */ + + /* We don't check backreferences here. + See update_cur_sifted_state(). */ + if (!naccepted + && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) + && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], + dfa->nexts[prev_node])) + naccepted = 1; + + if (naccepted == 0) + continue; + + if (sctx->limits.nelem) + { + Idx to_idx = str_idx + naccepted; + if (check_dst_limits (mctx, &sctx->limits, + dfa->nexts[prev_node], to_idx, + prev_node, str_idx)) + continue; + } + ok = re_node_set_insert (cur_dest, prev_node); + if (BE (! ok, 0)) + return REG_ESPACE; + } + + return REG_NOERROR; +} + +/* Helper functions. */ + +static reg_errcode_t +internal_function +clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) +{ + Idx top = mctx->state_log_top; + + if ((next_state_log_idx >= mctx->input.bufs_len + && mctx->input.bufs_len < mctx->input.len) + || (next_state_log_idx >= mctx->input.valid_len + && mctx->input.valid_len < mctx->input.len)) + { + reg_errcode_t err; + err = extend_buffers (mctx, next_state_log_idx + 1); + if (BE (err != REG_NOERROR, 0)) + return err; + } + + if (top < next_state_log_idx) + { + memset (mctx->state_log + top + 1, '\0', + sizeof (re_dfastate_t *) * (next_state_log_idx - top)); + mctx->state_log_top = next_state_log_idx; + } + return REG_NOERROR; +} + +static reg_errcode_t +internal_function +merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, + re_dfastate_t **src, Idx num) +{ + Idx st_idx; + reg_errcode_t err; + for (st_idx = 0; st_idx < num; ++st_idx) + { + if (dst[st_idx] == NULL) + dst[st_idx] = src[st_idx]; + else if (src[st_idx] != NULL) + { + re_node_set merged_set; + err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, + &src[st_idx]->nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); + re_node_set_free (&merged_set); + if (BE (err != REG_NOERROR, 0)) + return err; + } + } + return REG_NOERROR; +} + +static reg_errcode_t +internal_function +update_cur_sifted_state (const re_match_context_t *mctx, + re_sift_context_t *sctx, Idx str_idx, + re_node_set *dest_nodes) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err = REG_NOERROR; + const re_node_set *candidates; + candidates = ((mctx->state_log[str_idx] == NULL) ? NULL + : &mctx->state_log[str_idx]->nodes); + + if (dest_nodes->nelem == 0) + sctx->sifted_states[str_idx] = NULL; + else + { + if (candidates) + { + /* At first, add the nodes which can epsilon transit to a node in + DEST_NODE. */ + err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); + if (BE (err != REG_NOERROR, 0)) + return err; + + /* Then, check the limitations in the current sift_context. */ + if (sctx->limits.nelem) + { + err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, + mctx->bkref_ents, str_idx); + if (BE (err != REG_NOERROR, 0)) + return err; + } + } + + sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + } + + if (candidates && mctx->state_log[str_idx]->has_backref) + { + err = sift_states_bkref (mctx, sctx, str_idx, candidates); + if (BE (err != REG_NOERROR, 0)) + return err; + } + return REG_NOERROR; +} + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, + const re_node_set *candidates) +{ + reg_errcode_t err = REG_NOERROR; + Idx i; + + re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + + if (!state->inveclosure.alloc) + { + err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); + if (BE (err != REG_NOERROR, 0)) + return REG_ESPACE; + for (i = 0; i < dest_nodes->nelem; i++) + { + err = re_node_set_merge (&state->inveclosure, + dfa->inveclosures + dest_nodes->elems[i]); + if (BE (err != REG_NOERROR, 0)) + return REG_ESPACE; + } + } + return re_node_set_add_intersect (dest_nodes, candidates, + &state->inveclosure); +} + +static reg_errcode_t +internal_function +sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, + const re_node_set *candidates) +{ + Idx ecl_idx; + reg_errcode_t err; + re_node_set *inv_eclosure = dfa->inveclosures + node; + re_node_set except_nodes; + re_node_set_init_empty (&except_nodes); + for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) + { + Idx cur_node = inv_eclosure->elems[ecl_idx]; + if (cur_node == node) + continue; + if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) + { + Idx edst1 = dfa->edests[cur_node].elems[0]; + Idx edst2 = ((dfa->edests[cur_node].nelem > 1) + ? dfa->edests[cur_node].elems[1] : REG_MISSING); + if ((!re_node_set_contains (inv_eclosure, edst1) + && re_node_set_contains (dest_nodes, edst1)) + || (REG_VALID_NONZERO_INDEX (edst2) + && !re_node_set_contains (inv_eclosure, edst2) + && re_node_set_contains (dest_nodes, edst2))) + { + err = re_node_set_add_intersect (&except_nodes, candidates, + dfa->inveclosures + cur_node); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&except_nodes); + return err; + } + } + } + } + for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) + { + Idx cur_node = inv_eclosure->elems[ecl_idx]; + if (!re_node_set_contains (&except_nodes, cur_node)) + { + Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1; + re_node_set_remove_at (dest_nodes, idx); + } + } + re_node_set_free (&except_nodes); + return REG_NOERROR; +} + +static bool +internal_function +check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, + Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx lim_idx, src_pos, dst_pos; + + Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); + Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); + for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) + { + Idx subexp_idx; + struct re_backref_cache_entry *ent; + ent = mctx->bkref_ents + limits->elems[lim_idx]; + subexp_idx = dfa->nodes[ent->node].opr.idx; + + dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], + subexp_idx, dst_node, dst_idx, + dst_bkref_idx); + src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], + subexp_idx, src_node, src_idx, + src_bkref_idx); + + /* In case of: + ( ) + ( ) + ( ) */ + if (src_pos == dst_pos) + continue; /* This is unrelated limitation. */ + else + return true; + } + return false; +} + +static int +internal_function +check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, + Idx subexp_idx, Idx from_node, Idx bkref_idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + const re_node_set *eclosures = dfa->eclosures + from_node; + Idx node_idx; + + /* Else, we are on the boundary: examine the nodes on the epsilon + closure. */ + for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) + { + Idx node = eclosures->elems[node_idx]; + switch (dfa->nodes[node].type) + { + case OP_BACK_REF: + if (bkref_idx != REG_MISSING) + { + struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; + do + { + Idx dst; + int cpos; + + if (ent->node != node) + continue; + + if (subexp_idx < BITSET_WORD_BITS + && !(ent->eps_reachable_subexps_map + & ((bitset_word_t) 1 << subexp_idx))) + continue; + + /* Recurse trying to reach the OP_OPEN_SUBEXP and + OP_CLOSE_SUBEXP cases below. But, if the + destination node is the same node as the source + node, don't recurse because it would cause an + infinite loop: a regex that exhibits this behavior + is ()\1*\1* */ + dst = dfa->edests[node].elems[0]; + if (dst == from_node) + { + if (boundaries & 1) + return -1; + else /* if (boundaries & 2) */ + return 0; + } + + cpos = + check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, + dst, bkref_idx); + if (cpos == -1 /* && (boundaries & 1) */) + return -1; + if (cpos == 0 && (boundaries & 2)) + return 0; + + if (subexp_idx < BITSET_WORD_BITS) + ent->eps_reachable_subexps_map + &= ~((bitset_word_t) 1 << subexp_idx); + } + while (ent++->more); + } + break; + + case OP_OPEN_SUBEXP: + if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) + return -1; + break; + + case OP_CLOSE_SUBEXP: + if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) + return 0; + break; + + default: + break; + } + } + + return (boundaries & 2) ? 1 : 0; +} + +static int +internal_function +check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, + Idx subexp_idx, Idx from_node, Idx str_idx, + Idx bkref_idx) +{ + struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; + int boundaries; + + /* If we are outside the range of the subexpression, return -1 or 1. */ + if (str_idx < lim->subexp_from) + return -1; + + if (lim->subexp_to < str_idx) + return 1; + + /* If we are within the subexpression, return 0. */ + boundaries = (str_idx == lim->subexp_from); + boundaries |= (str_idx == lim->subexp_to) << 1; + if (boundaries == 0) + return 0; + + /* Else, examine epsilon closure. */ + return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, + from_node, bkref_idx); +} + +/* Check the limitations of sub expressions LIMITS, and remove the nodes + which are against limitations from DEST_NODES. */ + +static reg_errcode_t +internal_function +check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, + const re_node_set *candidates, re_node_set *limits, + struct re_backref_cache_entry *bkref_ents, Idx str_idx) +{ + reg_errcode_t err; + Idx node_idx, lim_idx; + + for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) + { + Idx subexp_idx; + struct re_backref_cache_entry *ent; + ent = bkref_ents + limits->elems[lim_idx]; + + if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) + continue; /* This is unrelated limitation. */ + + subexp_idx = dfa->nodes[ent->node].opr.idx; + if (ent->subexp_to == str_idx) + { + Idx ops_node = REG_MISSING; + Idx cls_node = REG_MISSING; + for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) + { + Idx node = dest_nodes->elems[node_idx]; + re_token_type_t type = dfa->nodes[node].type; + if (type == OP_OPEN_SUBEXP + && subexp_idx == dfa->nodes[node].opr.idx) + ops_node = node; + else if (type == OP_CLOSE_SUBEXP + && subexp_idx == dfa->nodes[node].opr.idx) + cls_node = node; + } + + /* Check the limitation of the open subexpression. */ + /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ + if (REG_VALID_INDEX (ops_node)) + { + err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, + candidates); + if (BE (err != REG_NOERROR, 0)) + return err; + } + + /* Check the limitation of the close subexpression. */ + if (REG_VALID_INDEX (cls_node)) + for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) + { + Idx node = dest_nodes->elems[node_idx]; + if (!re_node_set_contains (dfa->inveclosures + node, + cls_node) + && !re_node_set_contains (dfa->eclosures + node, + cls_node)) + { + /* It is against this limitation. + Remove it form the current sifted state. */ + err = sub_epsilon_src_nodes (dfa, node, dest_nodes, + candidates); + if (BE (err != REG_NOERROR, 0)) + return err; + --node_idx; + } + } + } + else /* (ent->subexp_to != str_idx) */ + { + for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) + { + Idx node = dest_nodes->elems[node_idx]; + re_token_type_t type = dfa->nodes[node].type; + if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) + { + if (subexp_idx != dfa->nodes[node].opr.idx) + continue; + /* It is against this limitation. + Remove it form the current sifted state. */ + err = sub_epsilon_src_nodes (dfa, node, dest_nodes, + candidates); + if (BE (err != REG_NOERROR, 0)) + return err; + } + } + } + } + return REG_NOERROR; +} + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, + Idx str_idx, const re_node_set *candidates) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err; + Idx node_idx, node; + re_sift_context_t local_sctx; + Idx first_idx = search_cur_bkref_entry (mctx, str_idx); + + if (first_idx == REG_MISSING) + return REG_NOERROR; + + local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ + + for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) + { + Idx enabled_idx; + re_token_type_t type; + struct re_backref_cache_entry *entry; + node = candidates->elems[node_idx]; + type = dfa->nodes[node].type; + /* Avoid infinite loop for the REs like "()\1+". */ + if (node == sctx->last_node && str_idx == sctx->last_str_idx) + continue; + if (type != OP_BACK_REF) + continue; + + entry = mctx->bkref_ents + first_idx; + enabled_idx = first_idx; + do + { + Idx subexp_len; + Idx to_idx; + Idx dst_node; + bool ok; + re_dfastate_t *cur_state; + + if (entry->node != node) + continue; + subexp_len = entry->subexp_to - entry->subexp_from; + to_idx = str_idx + subexp_len; + dst_node = (subexp_len ? dfa->nexts[node] + : dfa->edests[node].elems[0]); + + if (to_idx > sctx->last_str_idx + || sctx->sifted_states[to_idx] == NULL + || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) + || check_dst_limits (mctx, &sctx->limits, node, + str_idx, dst_node, to_idx)) + continue; + + if (local_sctx.sifted_states == NULL) + { + local_sctx = *sctx; + err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + local_sctx.last_node = node; + local_sctx.last_str_idx = str_idx; + ok = re_node_set_insert (&local_sctx.limits, enabled_idx); + if (BE (! ok, 0)) + { + err = REG_ESPACE; + goto free_return; + } + cur_state = local_sctx.sifted_states[str_idx]; + err = sift_states_backward (mctx, &local_sctx); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + if (sctx->limited_states != NULL) + { + err = merge_state_array (dfa, sctx->limited_states, + local_sctx.sifted_states, + str_idx + 1); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + local_sctx.sifted_states[str_idx] = cur_state; + re_node_set_remove (&local_sctx.limits, enabled_idx); + + /* mctx->bkref_ents may have changed, reload the pointer. */ + entry = mctx->bkref_ents + enabled_idx; + } + while (enabled_idx++, entry++->more); + } + err = REG_NOERROR; + free_return: + if (local_sctx.sifted_states != NULL) + { + re_node_set_free (&local_sctx.limits); + } + + return err; +} + + +#ifdef RE_ENABLE_I18N +static int +internal_function +sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, + Idx node_idx, Idx str_idx, Idx max_str_idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + int naccepted; + /* Check the node can accept "multi byte". */ + naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); + if (naccepted > 0 && str_idx + naccepted <= max_str_idx && + !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], + dfa->nexts[node_idx])) + /* The node can't accept the "multi byte", or the + destination was already thrown away, then the node + could't accept the current input "multi byte". */ + naccepted = 0; + /* Otherwise, it is sure that the node could accept + 'naccepted' bytes input. */ + return naccepted; +} +#endif /* RE_ENABLE_I18N */ + + +/* Functions for state transition. */ + +/* Return the next state to which the current state STATE will transit by + accepting the current input byte, and update STATE_LOG if necessary. + If STATE can accept a multibyte char/collating element/back reference + update the destination of STATE_LOG. */ + +static re_dfastate_t * +internal_function __attribute_warn_unused_result__ +transit_state (reg_errcode_t *err, re_match_context_t *mctx, + re_dfastate_t *state) +{ + re_dfastate_t **trtable; + unsigned char ch; + +#ifdef RE_ENABLE_I18N + /* If the current state can accept multibyte. */ + if (BE (state->accept_mb, 0)) + { + *err = transit_state_mb (mctx, state); + if (BE (*err != REG_NOERROR, 0)) + return NULL; + } +#endif /* RE_ENABLE_I18N */ + + /* Then decide the next state with the single byte. */ +#if 0 + if (0) + /* don't use transition table */ + return transit_state_sb (err, mctx, state); +#endif + + /* Use transition table */ + ch = re_string_fetch_byte (&mctx->input); + for (;;) + { + trtable = state->trtable; + if (BE (trtable != NULL, 1)) + return trtable[ch]; + + trtable = state->word_trtable; + if (BE (trtable != NULL, 1)) + { + unsigned int context; + context + = re_string_context_at (&mctx->input, + re_string_cur_idx (&mctx->input) - 1, + mctx->eflags); + if (IS_WORD_CONTEXT (context)) + return trtable[ch + SBC_MAX]; + else + return trtable[ch]; + } + + if (!build_trtable (mctx->dfa, state)) + { + *err = REG_ESPACE; + return NULL; + } + + /* Retry, we now have a transition table. */ + } +} + +/* Update the state_log if we need */ +static re_dfastate_t * +internal_function +merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, + re_dfastate_t *next_state) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx cur_idx = re_string_cur_idx (&mctx->input); + + if (cur_idx > mctx->state_log_top) + { + mctx->state_log[cur_idx] = next_state; + mctx->state_log_top = cur_idx; + } + else if (mctx->state_log[cur_idx] == 0) + { + mctx->state_log[cur_idx] = next_state; + } + else + { + re_dfastate_t *pstate; + unsigned int context; + re_node_set next_nodes, *log_nodes, *table_nodes = NULL; + /* If (state_log[cur_idx] != 0), it implies that cur_idx is + the destination of a multibyte char/collating element/ + back reference. Then the next state is the union set of + these destinations and the results of the transition table. */ + pstate = mctx->state_log[cur_idx]; + log_nodes = pstate->entrance_nodes; + if (next_state != NULL) + { + table_nodes = next_state->entrance_nodes; + *err = re_node_set_init_union (&next_nodes, table_nodes, + log_nodes); + if (BE (*err != REG_NOERROR, 0)) + return NULL; + } + else + next_nodes = *log_nodes; + /* Note: We already add the nodes of the initial state, + then we don't need to add them here. */ + + context = re_string_context_at (&mctx->input, + re_string_cur_idx (&mctx->input) - 1, + mctx->eflags); + next_state = mctx->state_log[cur_idx] + = re_acquire_state_context (err, dfa, &next_nodes, context); + /* We don't need to check errors here, since the return value of + this function is next_state and ERR is already set. */ + + if (table_nodes != NULL) + re_node_set_free (&next_nodes); + } + + if (BE (dfa->nbackref, 0) && next_state != NULL) + { + /* Check OP_OPEN_SUBEXP in the current state in case that we use them + later. We must check them here, since the back references in the + next state might use them. */ + *err = check_subexp_matching_top (mctx, &next_state->nodes, + cur_idx); + if (BE (*err != REG_NOERROR, 0)) + return NULL; + + /* If the next state has back references. */ + if (next_state->has_backref) + { + *err = transit_state_bkref (mctx, &next_state->nodes); + if (BE (*err != REG_NOERROR, 0)) + return NULL; + next_state = mctx->state_log[cur_idx]; + } + } + + return next_state; +} + +/* Skip bytes in the input that correspond to part of a + multi-byte match, then look in the log for a state + from which to restart matching. */ +static re_dfastate_t * +internal_function +find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) +{ + re_dfastate_t *cur_state; + do + { + Idx max = mctx->state_log_top; + Idx cur_str_idx = re_string_cur_idx (&mctx->input); + + do + { + if (++cur_str_idx > max) + return NULL; + re_string_skip_bytes (&mctx->input, 1); + } + while (mctx->state_log[cur_str_idx] == NULL); + + cur_state = merge_state_with_log (err, mctx, NULL); + } + while (*err == REG_NOERROR && cur_state == NULL); + return cur_state; +} + +/* Helper functions for transit_state. */ + +/* From the node set CUR_NODES, pick up the nodes whose types are + OP_OPEN_SUBEXP and which have corresponding back references in the regular + expression. And register them to use them later for evaluating the + corresponding back references. */ + +static reg_errcode_t +internal_function +check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, + Idx str_idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx node_idx; + reg_errcode_t err; + + /* TODO: This isn't efficient. + Because there might be more than one nodes whose types are + OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all + nodes. + E.g. RE: (a){2} */ + for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) + { + Idx node = cur_nodes->elems[node_idx]; + if (dfa->nodes[node].type == OP_OPEN_SUBEXP + && dfa->nodes[node].opr.idx < BITSET_WORD_BITS + && (dfa->used_bkref_map + & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) + { + err = match_ctx_add_subtop (mctx, node, str_idx); + if (BE (err != REG_NOERROR, 0)) + return err; + } + } + return REG_NOERROR; +} + +#if 0 +/* Return the next state to which the current state STATE will transit by + accepting the current input byte. */ + +static re_dfastate_t * +transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, + re_dfastate_t *state) +{ + const re_dfa_t *const dfa = mctx->dfa; + re_node_set next_nodes; + re_dfastate_t *next_state; + Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); + unsigned int context; + + *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); + if (BE (*err != REG_NOERROR, 0)) + return NULL; + for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) + { + Idx cur_node = state->nodes.elems[node_cnt]; + if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) + { + *err = re_node_set_merge (&next_nodes, + dfa->eclosures + dfa->nexts[cur_node]); + if (BE (*err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return NULL; + } + } + } + context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); + next_state = re_acquire_state_context (err, dfa, &next_nodes, context); + /* We don't need to check errors here, since the return value of + this function is next_state and ERR is already set. */ + + re_node_set_free (&next_nodes); + re_string_skip_bytes (&mctx->input, 1); + return next_state; +} +#endif + +#ifdef RE_ENABLE_I18N +static reg_errcode_t +internal_function +transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err; + Idx i; + + for (i = 0; i < pstate->nodes.nelem; ++i) + { + re_node_set dest_nodes, *new_nodes; + Idx cur_node_idx = pstate->nodes.elems[i]; + int naccepted; + Idx dest_idx; + unsigned int context; + re_dfastate_t *dest_state; + + if (!dfa->nodes[cur_node_idx].accept_mb) + continue; + + if (dfa->nodes[cur_node_idx].constraint) + { + context = re_string_context_at (&mctx->input, + re_string_cur_idx (&mctx->input), + mctx->eflags); + if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, + context)) + continue; + } + + /* How many bytes the node can accept? */ + naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, + re_string_cur_idx (&mctx->input)); + if (naccepted == 0) + continue; + + /* The node can accepts 'naccepted' bytes. */ + dest_idx = re_string_cur_idx (&mctx->input) + naccepted; + mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted + : mctx->max_mb_elem_len); + err = clean_state_log_if_needed (mctx, dest_idx); + if (BE (err != REG_NOERROR, 0)) + return err; +#ifdef DEBUG + assert (dfa->nexts[cur_node_idx] != REG_MISSING); +#endif + new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; + + dest_state = mctx->state_log[dest_idx]; + if (dest_state == NULL) + dest_nodes = *new_nodes; + else + { + err = re_node_set_init_union (&dest_nodes, + dest_state->entrance_nodes, new_nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + } + context = re_string_context_at (&mctx->input, dest_idx - 1, + mctx->eflags); + mctx->state_log[dest_idx] + = re_acquire_state_context (&err, dfa, &dest_nodes, context); + if (dest_state != NULL) + re_node_set_free (&dest_nodes); + if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) + return err; + } + return REG_NOERROR; +} +#endif /* RE_ENABLE_I18N */ + +static reg_errcode_t +internal_function +transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err; + Idx i; + Idx cur_str_idx = re_string_cur_idx (&mctx->input); + + for (i = 0; i < nodes->nelem; ++i) + { + Idx dest_str_idx, prev_nelem, bkc_idx; + Idx node_idx = nodes->elems[i]; + unsigned int context; + const re_token_t *node = dfa->nodes + node_idx; + re_node_set *new_dest_nodes; + + /* Check whether 'node' is a backreference or not. */ + if (node->type != OP_BACK_REF) + continue; + + if (node->constraint) + { + context = re_string_context_at (&mctx->input, cur_str_idx, + mctx->eflags); + if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) + continue; + } + + /* 'node' is a backreference. + Check the substring which the substring matched. */ + bkc_idx = mctx->nbkref_ents; + err = get_subexp (mctx, node_idx, cur_str_idx); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + + /* And add the epsilon closures (which is 'new_dest_nodes') of + the backreference to appropriate state_log. */ +#ifdef DEBUG + assert (dfa->nexts[node_idx] != REG_MISSING); +#endif + for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) + { + Idx subexp_len; + re_dfastate_t *dest_state; + struct re_backref_cache_entry *bkref_ent; + bkref_ent = mctx->bkref_ents + bkc_idx; + if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) + continue; + subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; + new_dest_nodes = (subexp_len == 0 + ? dfa->eclosures + dfa->edests[node_idx].elems[0] + : dfa->eclosures + dfa->nexts[node_idx]); + dest_str_idx = (cur_str_idx + bkref_ent->subexp_to + - bkref_ent->subexp_from); + context = re_string_context_at (&mctx->input, dest_str_idx - 1, + mctx->eflags); + dest_state = mctx->state_log[dest_str_idx]; + prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 + : mctx->state_log[cur_str_idx]->nodes.nelem); + /* Add 'new_dest_node' to state_log. */ + if (dest_state == NULL) + { + mctx->state_log[dest_str_idx] + = re_acquire_state_context (&err, dfa, new_dest_nodes, + context); + if (BE (mctx->state_log[dest_str_idx] == NULL + && err != REG_NOERROR, 0)) + goto free_return; + } + else + { + re_node_set dest_nodes; + err = re_node_set_init_union (&dest_nodes, + dest_state->entrance_nodes, + new_dest_nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&dest_nodes); + goto free_return; + } + mctx->state_log[dest_str_idx] + = re_acquire_state_context (&err, dfa, &dest_nodes, context); + re_node_set_free (&dest_nodes); + if (BE (mctx->state_log[dest_str_idx] == NULL + && err != REG_NOERROR, 0)) + goto free_return; + } + /* We need to check recursively if the backreference can epsilon + transit. */ + if (subexp_len == 0 + && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) + { + err = check_subexp_matching_top (mctx, new_dest_nodes, + cur_str_idx); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + err = transit_state_bkref (mctx, new_dest_nodes); + if (BE (err != REG_NOERROR, 0)) + goto free_return; + } + } + } + err = REG_NOERROR; + free_return: + return err; +} + +/* Enumerate all the candidates which the backreference BKREF_NODE can match + at BKREF_STR_IDX, and register them by match_ctx_add_entry(). + Note that we might collect inappropriate candidates here. + However, the cost of checking them strictly here is too high, then we + delay these checking for prune_impossible_nodes(). */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) +{ + const re_dfa_t *const dfa = mctx->dfa; + Idx subexp_num, sub_top_idx; + const char *buf = (const char *) re_string_get_buffer (&mctx->input); + /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ + Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); + if (cache_idx != REG_MISSING) + { + const struct re_backref_cache_entry *entry + = mctx->bkref_ents + cache_idx; + do + if (entry->node == bkref_node) + return REG_NOERROR; /* We already checked it. */ + while (entry++->more); + } + + subexp_num = dfa->nodes[bkref_node].opr.idx; + + /* For each sub expression */ + for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) + { + reg_errcode_t err; + re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; + re_sub_match_last_t *sub_last; + Idx sub_last_idx, sl_str, bkref_str_off; + + if (dfa->nodes[sub_top->node].opr.idx != subexp_num) + continue; /* It isn't related. */ + + sl_str = sub_top->str_idx; + bkref_str_off = bkref_str_idx; + /* At first, check the last node of sub expressions we already + evaluated. */ + for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) + { + regoff_t sl_str_diff; + sub_last = sub_top->lasts[sub_last_idx]; + sl_str_diff = sub_last->str_idx - sl_str; + /* The matched string by the sub expression match with the substring + at the back reference? */ + if (sl_str_diff > 0) + { + if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) + { + /* Not enough chars for a successful match. */ + if (bkref_str_off + sl_str_diff > mctx->input.len) + break; + + err = clean_state_log_if_needed (mctx, + bkref_str_off + + sl_str_diff); + if (BE (err != REG_NOERROR, 0)) + return err; + buf = (const char *) re_string_get_buffer (&mctx->input); + } + if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) + /* We don't need to search this sub expression any more. */ + break; + } + bkref_str_off += sl_str_diff; + sl_str += sl_str_diff; + err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, + bkref_str_idx); + + /* Reload buf, since the preceding call might have reallocated + the buffer. */ + buf = (const char *) re_string_get_buffer (&mctx->input); + + if (err == REG_NOMATCH) + continue; + if (BE (err != REG_NOERROR, 0)) + return err; + } + + if (sub_last_idx < sub_top->nlasts) + continue; + if (sub_last_idx > 0) + ++sl_str; + /* Then, search for the other last nodes of the sub expression. */ + for (; sl_str <= bkref_str_idx; ++sl_str) + { + Idx cls_node; + regoff_t sl_str_off; + const re_node_set *nodes; + sl_str_off = sl_str - sub_top->str_idx; + /* The matched string by the sub expression match with the substring + at the back reference? */ + if (sl_str_off > 0) + { + if (BE (bkref_str_off >= mctx->input.valid_len, 0)) + { + /* If we are at the end of the input, we cannot match. */ + if (bkref_str_off >= mctx->input.len) + break; + + err = extend_buffers (mctx, bkref_str_off + 1); + if (BE (err != REG_NOERROR, 0)) + return err; + + buf = (const char *) re_string_get_buffer (&mctx->input); + } + if (buf [bkref_str_off++] != buf[sl_str - 1]) + break; /* We don't need to search this sub expression + any more. */ + } + if (mctx->state_log[sl_str] == NULL) + continue; + /* Does this state have a ')' of the sub expression? */ + nodes = &mctx->state_log[sl_str]->nodes; + cls_node = find_subexp_node (dfa, nodes, subexp_num, + OP_CLOSE_SUBEXP); + if (cls_node == REG_MISSING) + continue; /* No. */ + if (sub_top->path == NULL) + { + sub_top->path = calloc (sizeof (state_array_t), + sl_str - sub_top->str_idx + 1); + if (sub_top->path == NULL) + return REG_ESPACE; + } + /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node + in the current context? */ + err = check_arrival (mctx, sub_top->path, sub_top->node, + sub_top->str_idx, cls_node, sl_str, + OP_CLOSE_SUBEXP); + if (err == REG_NOMATCH) + continue; + if (BE (err != REG_NOERROR, 0)) + return err; + sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); + if (BE (sub_last == NULL, 0)) + return REG_ESPACE; + err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, + bkref_str_idx); + if (err == REG_NOMATCH) + continue; + } + } + return REG_NOERROR; +} + +/* Helper functions for get_subexp(). */ + +/* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. + If it can arrive, register the sub expression expressed with SUB_TOP + and SUB_LAST. */ + +static reg_errcode_t +internal_function +get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, + re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) +{ + reg_errcode_t err; + Idx to_idx; + /* Can the subexpression arrive the back reference? */ + err = check_arrival (mctx, &sub_last->path, sub_last->node, + sub_last->str_idx, bkref_node, bkref_str, + OP_OPEN_SUBEXP); + if (err != REG_NOERROR) + return err; + err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, + sub_last->str_idx); + if (BE (err != REG_NOERROR, 0)) + return err; + to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; + return clean_state_log_if_needed (mctx, to_idx); +} + +/* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. + Search '(' if FL_OPEN, or search ')' otherwise. + TODO: This function isn't efficient... + Because there might be more than one nodes whose types are + OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all + nodes. + E.g. RE: (a){2} */ + +static Idx +internal_function +find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, + Idx subexp_idx, int type) +{ + Idx cls_idx; + for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) + { + Idx cls_node = nodes->elems[cls_idx]; + const re_token_t *node = dfa->nodes + cls_node; + if (node->type == type + && node->opr.idx == subexp_idx) + return cls_node; + } + return REG_MISSING; +} + +/* Check whether the node TOP_NODE at TOP_STR can arrive to the node + LAST_NODE at LAST_STR. We record the path onto PATH since it will be + heavily reused. + Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, + Idx top_str, Idx last_node, Idx last_str, int type) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err = REG_NOERROR; + Idx subexp_num, backup_cur_idx, str_idx, null_cnt; + re_dfastate_t *cur_state = NULL; + re_node_set *cur_nodes, next_nodes; + re_dfastate_t **backup_state_log; + unsigned int context; + + subexp_num = dfa->nodes[top_node].opr.idx; + /* Extend the buffer if we need. */ + if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) + { + re_dfastate_t **new_array; + Idx old_alloc = path->alloc; + Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1; + Idx new_alloc; + if (BE (IDX_MAX - old_alloc < incr_alloc, 0)) + return REG_ESPACE; + new_alloc = old_alloc + incr_alloc; + if (BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0)) + return REG_ESPACE; + new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); + if (BE (new_array == NULL, 0)) + return REG_ESPACE; + path->array = new_array; + path->alloc = new_alloc; + memset (new_array + old_alloc, '\0', + sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); + } + + str_idx = path->next_idx ? path->next_idx : top_str; + + /* Temporary modify MCTX. */ + backup_state_log = mctx->state_log; + backup_cur_idx = mctx->input.cur_idx; + mctx->state_log = path->array; + mctx->input.cur_idx = str_idx; + + /* Setup initial node set. */ + context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); + if (str_idx == top_str) + { + err = re_node_set_init_1 (&next_nodes, top_node); + if (BE (err != REG_NOERROR, 0)) + return err; + err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + } + else + { + cur_state = mctx->state_log[str_idx]; + if (cur_state && cur_state->has_backref) + { + err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); + if (BE (err != REG_NOERROR, 0)) + return err; + } + else + re_node_set_init_empty (&next_nodes); + } + if (str_idx == top_str || (cur_state && cur_state->has_backref)) + { + if (next_nodes.nelem) + { + err = expand_bkref_cache (mctx, &next_nodes, str_idx, + subexp_num, type); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + } + cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); + if (BE (cur_state == NULL && err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + mctx->state_log[str_idx] = cur_state; + } + + for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) + { + re_node_set_empty (&next_nodes); + if (mctx->state_log[str_idx + 1]) + { + err = re_node_set_merge (&next_nodes, + &mctx->state_log[str_idx + 1]->nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + } + if (cur_state) + { + err = check_arrival_add_next_nodes (mctx, str_idx, + &cur_state->non_eps_nodes, + &next_nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + } + ++str_idx; + if (next_nodes.nelem) + { + err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + err = expand_bkref_cache (mctx, &next_nodes, str_idx, + subexp_num, type); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + } + context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); + cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); + if (BE (cur_state == NULL && err != REG_NOERROR, 0)) + { + re_node_set_free (&next_nodes); + return err; + } + mctx->state_log[str_idx] = cur_state; + null_cnt = cur_state == NULL ? null_cnt + 1 : 0; + } + re_node_set_free (&next_nodes); + cur_nodes = (mctx->state_log[last_str] == NULL ? NULL + : &mctx->state_log[last_str]->nodes); + path->next_idx = str_idx; + + /* Fix MCTX. */ + mctx->state_log = backup_state_log; + mctx->input.cur_idx = backup_cur_idx; + + /* Then check the current node set has the node LAST_NODE. */ + if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) + return REG_NOERROR; + + return REG_NOMATCH; +} + +/* Helper functions for check_arrival. */ + +/* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them + to NEXT_NODES. + TODO: This function is similar to the functions transit_state*(), + however this function has many additional works. + Can't we unify them? */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, + re_node_set *cur_nodes, re_node_set *next_nodes) +{ + const re_dfa_t *const dfa = mctx->dfa; + bool ok; + Idx cur_idx; +#ifdef RE_ENABLE_I18N + reg_errcode_t err = REG_NOERROR; +#endif + re_node_set union_set; + re_node_set_init_empty (&union_set); + for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) + { + int naccepted = 0; + Idx cur_node = cur_nodes->elems[cur_idx]; +#ifdef DEBUG + re_token_type_t type = dfa->nodes[cur_node].type; + assert (!IS_EPSILON_NODE (type)); +#endif +#ifdef RE_ENABLE_I18N + /* If the node may accept "multi byte". */ + if (dfa->nodes[cur_node].accept_mb) + { + naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, + str_idx); + if (naccepted > 1) + { + re_dfastate_t *dest_state; + Idx next_node = dfa->nexts[cur_node]; + Idx next_idx = str_idx + naccepted; + dest_state = mctx->state_log[next_idx]; + re_node_set_empty (&union_set); + if (dest_state) + { + err = re_node_set_merge (&union_set, &dest_state->nodes); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&union_set); + return err; + } + } + ok = re_node_set_insert (&union_set, next_node); + if (BE (! ok, 0)) + { + re_node_set_free (&union_set); + return REG_ESPACE; + } + mctx->state_log[next_idx] = re_acquire_state (&err, dfa, + &union_set); + if (BE (mctx->state_log[next_idx] == NULL + && err != REG_NOERROR, 0)) + { + re_node_set_free (&union_set); + return err; + } + } + } +#endif /* RE_ENABLE_I18N */ + if (naccepted + || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) + { + ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); + if (BE (! ok, 0)) + { + re_node_set_free (&union_set); + return REG_ESPACE; + } + } + } + re_node_set_free (&union_set); + return REG_NOERROR; +} + +/* For all the nodes in CUR_NODES, add the epsilon closures of them to + CUR_NODES, however exclude the nodes which are: + - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. + - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. +*/ + +static reg_errcode_t +internal_function +check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, + Idx ex_subexp, int type) +{ + reg_errcode_t err; + Idx idx, outside_node; + re_node_set new_nodes; +#ifdef DEBUG + assert (cur_nodes->nelem); +#endif + err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); + if (BE (err != REG_NOERROR, 0)) + return err; + /* Create a new node set NEW_NODES with the nodes which are epsilon + closures of the node in CUR_NODES. */ + + for (idx = 0; idx < cur_nodes->nelem; ++idx) + { + Idx cur_node = cur_nodes->elems[idx]; + const re_node_set *eclosure = dfa->eclosures + cur_node; + outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); + if (outside_node == REG_MISSING) + { + /* There are no problematic nodes, just merge them. */ + err = re_node_set_merge (&new_nodes, eclosure); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&new_nodes); + return err; + } + } + else + { + /* There are problematic nodes, re-calculate incrementally. */ + err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, + ex_subexp, type); + if (BE (err != REG_NOERROR, 0)) + { + re_node_set_free (&new_nodes); + return err; + } + } + } + re_node_set_free (cur_nodes); + *cur_nodes = new_nodes; + return REG_NOERROR; +} + +/* Helper function for check_arrival_expand_ecl. + Check incrementally the epsilon closure of TARGET, and if it isn't + problematic append it to DST_NODES. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, + Idx target, Idx ex_subexp, int type) +{ + Idx cur_node; + for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) + { + bool ok; + + if (dfa->nodes[cur_node].type == type + && dfa->nodes[cur_node].opr.idx == ex_subexp) + { + if (type == OP_CLOSE_SUBEXP) + { + ok = re_node_set_insert (dst_nodes, cur_node); + if (BE (! ok, 0)) + return REG_ESPACE; + } + break; + } + ok = re_node_set_insert (dst_nodes, cur_node); + if (BE (! ok, 0)) + return REG_ESPACE; + if (dfa->edests[cur_node].nelem == 0) + break; + if (dfa->edests[cur_node].nelem == 2) + { + reg_errcode_t err; + err = check_arrival_expand_ecl_sub (dfa, dst_nodes, + dfa->edests[cur_node].elems[1], + ex_subexp, type); + if (BE (err != REG_NOERROR, 0)) + return err; + } + cur_node = dfa->edests[cur_node].elems[0]; + } + return REG_NOERROR; +} + + +/* For all the back references in the current state, calculate the + destination of the back references by the appropriate entry + in MCTX->BKREF_ENTS. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, + Idx cur_str, Idx subexp_num, int type) +{ + const re_dfa_t *const dfa = mctx->dfa; + reg_errcode_t err; + Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); + struct re_backref_cache_entry *ent; + + if (cache_idx_start == REG_MISSING) + return REG_NOERROR; + + restart: + ent = mctx->bkref_ents + cache_idx_start; + do + { + Idx to_idx, next_node; + + /* Is this entry ENT is appropriate? */ + if (!re_node_set_contains (cur_nodes, ent->node)) + continue; /* No. */ + + to_idx = cur_str + ent->subexp_to - ent->subexp_from; + /* Calculate the destination of the back reference, and append it + to MCTX->STATE_LOG. */ + if (to_idx == cur_str) + { + /* The backreference did epsilon transit, we must re-check all the + node in the current state. */ + re_node_set new_dests; + reg_errcode_t err2, err3; + next_node = dfa->edests[ent->node].elems[0]; + if (re_node_set_contains (cur_nodes, next_node)) + continue; + err = re_node_set_init_1 (&new_dests, next_node); + err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); + err3 = re_node_set_merge (cur_nodes, &new_dests); + re_node_set_free (&new_dests); + if (BE (err != REG_NOERROR || err2 != REG_NOERROR + || err3 != REG_NOERROR, 0)) + { + err = (err != REG_NOERROR ? err + : (err2 != REG_NOERROR ? err2 : err3)); + return err; + } + /* TODO: It is still inefficient... */ + goto restart; + } + else + { + re_node_set union_set; + next_node = dfa->nexts[ent->node]; + if (mctx->state_log[to_idx]) + { + bool ok; + if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, + next_node)) + continue; + err = re_node_set_init_copy (&union_set, + &mctx->state_log[to_idx]->nodes); + ok = re_node_set_insert (&union_set, next_node); + if (BE (err != REG_NOERROR || ! ok, 0)) + { + re_node_set_free (&union_set); + err = err != REG_NOERROR ? err : REG_ESPACE; + return err; + } + } + else + { + err = re_node_set_init_1 (&union_set, next_node); + if (BE (err != REG_NOERROR, 0)) + return err; + } + mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); + re_node_set_free (&union_set); + if (BE (mctx->state_log[to_idx] == NULL + && err != REG_NOERROR, 0)) + return err; + } + } + while (ent++->more); + return REG_NOERROR; +} + +/* Build transition table for the state. + Return true if successful. */ + +static bool +internal_function +build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) +{ + reg_errcode_t err; + Idx i, j; + int ch; + bool need_word_trtable = false; + bitset_word_t elem, mask; + bool dests_node_malloced = false; + bool dest_states_malloced = false; + Idx ndests; /* Number of the destination states from 'state'. */ + re_dfastate_t **trtable; + re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; + re_node_set follows, *dests_node; + bitset_t *dests_ch; + bitset_t acceptable; + + struct dests_alloc + { + re_node_set dests_node[SBC_MAX]; + bitset_t dests_ch[SBC_MAX]; + } *dests_alloc; + + /* We build DFA states which corresponds to the destination nodes + from 'state'. 'dests_node[i]' represents the nodes which i-th + destination state contains, and 'dests_ch[i]' represents the + characters which i-th destination state accepts. */ + if (__libc_use_alloca (sizeof (struct dests_alloc))) + dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); + else + { + dests_alloc = re_malloc (struct dests_alloc, 1); + if (BE (dests_alloc == NULL, 0)) + return false; + dests_node_malloced = true; + } + dests_node = dests_alloc->dests_node; + dests_ch = dests_alloc->dests_ch; + + /* Initialize transition table. */ + state->word_trtable = state->trtable = NULL; + + /* At first, group all nodes belonging to 'state' into several + destinations. */ + ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); + if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0)) + { + if (dests_node_malloced) + free (dests_alloc); + /* Return false in case of an error, true otherwise. */ + if (ndests == 0) + { + state->trtable = (re_dfastate_t **) + calloc (sizeof (re_dfastate_t *), SBC_MAX); + if (BE (state->trtable == NULL, 0)) + return false; + return true; + } + return false; + } + + err = re_node_set_alloc (&follows, ndests + 1); + if (BE (err != REG_NOERROR, 0)) + goto out_free; + + /* Avoid arithmetic overflow in size calculation. */ + if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) + / (3 * sizeof (re_dfastate_t *))) + < ndests), + 0)) + goto out_free; + + if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX + + ndests * 3 * sizeof (re_dfastate_t *))) + dest_states = (re_dfastate_t **) + alloca (ndests * 3 * sizeof (re_dfastate_t *)); + else + { + dest_states = (re_dfastate_t **) + malloc (ndests * 3 * sizeof (re_dfastate_t *)); + if (BE (dest_states == NULL, 0)) + { +out_free: + if (dest_states_malloced) + free (dest_states); + re_node_set_free (&follows); + for (i = 0; i < ndests; ++i) + re_node_set_free (dests_node + i); + if (dests_node_malloced) + free (dests_alloc); + return false; + } + dest_states_malloced = true; + } + dest_states_word = dest_states + ndests; + dest_states_nl = dest_states_word + ndests; + bitset_empty (acceptable); + + /* Then build the states for all destinations. */ + for (i = 0; i < ndests; ++i) + { + Idx next_node; + re_node_set_empty (&follows); + /* Merge the follows of this destination states. */ + for (j = 0; j < dests_node[i].nelem; ++j) + { + next_node = dfa->nexts[dests_node[i].elems[j]]; + if (next_node != REG_MISSING) + { + err = re_node_set_merge (&follows, dfa->eclosures + next_node); + if (BE (err != REG_NOERROR, 0)) + goto out_free; + } + } + dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); + if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) + goto out_free; + /* If the new state has context constraint, + build appropriate states for these contexts. */ + if (dest_states[i]->has_constraint) + { + dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, + CONTEXT_WORD); + if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) + goto out_free; + + if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) + need_word_trtable = true; + + dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, + CONTEXT_NEWLINE); + if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) + goto out_free; + } + else + { + dest_states_word[i] = dest_states[i]; + dest_states_nl[i] = dest_states[i]; + } + bitset_merge (acceptable, dests_ch[i]); + } + + if (!BE (need_word_trtable, 0)) + { + /* We don't care about whether the following character is a word + character, or we are in a single-byte character set so we can + discern by looking at the character code: allocate a + 256-entry transition table. */ + trtable = state->trtable = + (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); + if (BE (trtable == NULL, 0)) + goto out_free; + + /* For all characters ch...: */ + for (i = 0; i < BITSET_WORDS; ++i) + for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; + elem; + mask <<= 1, elem >>= 1, ++ch) + if (BE (elem & 1, 0)) + { + /* There must be exactly one destination which accepts + character ch. See group_nodes_into_DFAstates. */ + for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) + ; + + /* j-th destination accepts the word character ch. */ + if (dfa->word_char[i] & mask) + trtable[ch] = dest_states_word[j]; + else + trtable[ch] = dest_states[j]; + } + } + else + { + /* We care about whether the following character is a word + character, and we are in a multi-byte character set: discern + by looking at the character code: build two 256-entry + transition tables, one starting at trtable[0] and one + starting at trtable[SBC_MAX]. */ + trtable = state->word_trtable = + (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); + if (BE (trtable == NULL, 0)) + goto out_free; + + /* For all characters ch...: */ + for (i = 0; i < BITSET_WORDS; ++i) + for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; + elem; + mask <<= 1, elem >>= 1, ++ch) + if (BE (elem & 1, 0)) + { + /* There must be exactly one destination which accepts + character ch. See group_nodes_into_DFAstates. */ + for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) + ; + + /* j-th destination accepts the word character ch. */ + trtable[ch] = dest_states[j]; + trtable[ch + SBC_MAX] = dest_states_word[j]; + } + } + + /* new line */ + if (bitset_contain (acceptable, NEWLINE_CHAR)) + { + /* The current state accepts newline character. */ + for (j = 0; j < ndests; ++j) + if (bitset_contain (dests_ch[j], NEWLINE_CHAR)) + { + /* k-th destination accepts newline character. */ + trtable[NEWLINE_CHAR] = dest_states_nl[j]; + if (need_word_trtable) + trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j]; + /* There must be only one destination which accepts + newline. See group_nodes_into_DFAstates. */ + break; + } + } + + if (dest_states_malloced) + free (dest_states); + + re_node_set_free (&follows); + for (i = 0; i < ndests; ++i) + re_node_set_free (dests_node + i); + + if (dests_node_malloced) + free (dests_alloc); + + return true; +} + +/* Group all nodes belonging to STATE into several destinations. + Then for all destinations, set the nodes belonging to the destination + to DESTS_NODE[i] and set the characters accepted by the destination + to DEST_CH[i]. This function return the number of destinations. */ + +static Idx +internal_function +group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, + re_node_set *dests_node, bitset_t *dests_ch) +{ + reg_errcode_t err; + bool ok; + Idx i, j, k; + Idx ndests; /* Number of the destinations from 'state'. */ + bitset_t accepts; /* Characters a node can accept. */ + const re_node_set *cur_nodes = &state->nodes; + bitset_empty (accepts); + ndests = 0; + + /* For all the nodes belonging to 'state', */ + for (i = 0; i < cur_nodes->nelem; ++i) + { + re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; + re_token_type_t type = node->type; + unsigned int constraint = node->constraint; + + /* Enumerate all single byte character this node can accept. */ + if (type == CHARACTER) + bitset_set (accepts, node->opr.c); + else if (type == SIMPLE_BRACKET) + { + bitset_merge (accepts, node->opr.sbcset); + } + else if (type == OP_PERIOD) + { +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + bitset_merge (accepts, dfa->sb_char); + else +#endif + bitset_set_all (accepts); + if (!(dfa->syntax & RE_DOT_NEWLINE)) + bitset_clear (accepts, '\n'); + if (dfa->syntax & RE_DOT_NOT_NULL) + bitset_clear (accepts, '\0'); + } +#ifdef RE_ENABLE_I18N + else if (type == OP_UTF8_PERIOD) + { + if (ASCII_CHARS % BITSET_WORD_BITS == 0) + memset (accepts, -1, ASCII_CHARS / CHAR_BIT); + else + bitset_merge (accepts, utf8_sb_map); + if (!(dfa->syntax & RE_DOT_NEWLINE)) + bitset_clear (accepts, '\n'); + if (dfa->syntax & RE_DOT_NOT_NULL) + bitset_clear (accepts, '\0'); + } +#endif + else + continue; + + /* Check the 'accepts' and sift the characters which are not + match it the context. */ + if (constraint) + { + if (constraint & NEXT_NEWLINE_CONSTRAINT) + { + bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); + bitset_empty (accepts); + if (accepts_newline) + bitset_set (accepts, NEWLINE_CHAR); + else + continue; + } + if (constraint & NEXT_ENDBUF_CONSTRAINT) + { + bitset_empty (accepts); + continue; + } + + if (constraint & NEXT_WORD_CONSTRAINT) + { + bitset_word_t any_set = 0; + if (type == CHARACTER && !node->word_char) + { + bitset_empty (accepts); + continue; + } +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + for (j = 0; j < BITSET_WORDS; ++j) + any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); + else +#endif + for (j = 0; j < BITSET_WORDS; ++j) + any_set |= (accepts[j] &= dfa->word_char[j]); + if (!any_set) + continue; + } + if (constraint & NEXT_NOTWORD_CONSTRAINT) + { + bitset_word_t any_set = 0; + if (type == CHARACTER && node->word_char) + { + bitset_empty (accepts); + continue; + } +#ifdef RE_ENABLE_I18N + if (dfa->mb_cur_max > 1) + for (j = 0; j < BITSET_WORDS; ++j) + any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); + else +#endif + for (j = 0; j < BITSET_WORDS; ++j) + any_set |= (accepts[j] &= ~dfa->word_char[j]); + if (!any_set) + continue; + } + } + + /* Then divide 'accepts' into DFA states, or create a new + state. Above, we make sure that accepts is not empty. */ + for (j = 0; j < ndests; ++j) + { + bitset_t intersec; /* Intersection sets, see below. */ + bitset_t remains; + /* Flags, see below. */ + bitset_word_t has_intersec, not_subset, not_consumed; + + /* Optimization, skip if this state doesn't accept the character. */ + if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) + continue; + + /* Enumerate the intersection set of this state and 'accepts'. */ + has_intersec = 0; + for (k = 0; k < BITSET_WORDS; ++k) + has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; + /* And skip if the intersection set is empty. */ + if (!has_intersec) + continue; + + /* Then check if this state is a subset of 'accepts'. */ + not_subset = not_consumed = 0; + for (k = 0; k < BITSET_WORDS; ++k) + { + not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; + not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; + } + + /* If this state isn't a subset of 'accepts', create a + new group state, which has the 'remains'. */ + if (not_subset) + { + bitset_copy (dests_ch[ndests], remains); + bitset_copy (dests_ch[j], intersec); + err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); + if (BE (err != REG_NOERROR, 0)) + goto error_return; + ++ndests; + } + + /* Put the position in the current group. */ + ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); + if (BE (! ok, 0)) + goto error_return; + + /* If all characters are consumed, go to next node. */ + if (!not_consumed) + break; + } + /* Some characters remain, create a new group. */ + if (j == ndests) + { + bitset_copy (dests_ch[ndests], accepts); + err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); + if (BE (err != REG_NOERROR, 0)) + goto error_return; + ++ndests; + bitset_empty (accepts); + } + } + return ndests; + error_return: + for (j = 0; j < ndests; ++j) + re_node_set_free (dests_node + j); + return REG_MISSING; +} + +#ifdef RE_ENABLE_I18N +/* Check how many bytes the node 'dfa->nodes[node_idx]' accepts. + Return the number of the bytes the node accepts. + STR_IDX is the current index of the input string. + + This function handles the nodes which can accept one character, or + one collating element like '.', '[a-z]', opposite to the other nodes + can only accept one byte. */ + +static int +internal_function +check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, + const re_string_t *input, Idx str_idx) +{ + const re_token_t *node = dfa->nodes + node_idx; + int char_len, elem_len; + Idx i; + + if (BE (node->type == OP_UTF8_PERIOD, 0)) + { + unsigned char c = re_string_byte_at (input, str_idx), d; + if (BE (c < 0xc2, 1)) + return 0; + + if (str_idx + 2 > input->len) + return 0; + + d = re_string_byte_at (input, str_idx + 1); + if (c < 0xe0) + return (d < 0x80 || d > 0xbf) ? 0 : 2; + else if (c < 0xf0) + { + char_len = 3; + if (c == 0xe0 && d < 0xa0) + return 0; + } + else if (c < 0xf8) + { + char_len = 4; + if (c == 0xf0 && d < 0x90) + return 0; + } + else if (c < 0xfc) + { + char_len = 5; + if (c == 0xf8 && d < 0x88) + return 0; + } + else if (c < 0xfe) + { + char_len = 6; + if (c == 0xfc && d < 0x84) + return 0; + } + else + return 0; + + if (str_idx + char_len > input->len) + return 0; + + for (i = 1; i < char_len; ++i) + { + d = re_string_byte_at (input, str_idx + i); + if (d < 0x80 || d > 0xbf) + return 0; + } + return char_len; + } + + char_len = re_string_char_size_at (input, str_idx); + if (node->type == OP_PERIOD) + { + if (char_len <= 1) + return 0; + /* FIXME: I don't think this if is needed, as both '\n' + and '\0' are char_len == 1. */ + /* '.' accepts any one character except the following two cases. */ + if ((!(dfa->syntax & RE_DOT_NEWLINE) && + re_string_byte_at (input, str_idx) == '\n') || + ((dfa->syntax & RE_DOT_NOT_NULL) && + re_string_byte_at (input, str_idx) == '\0')) + return 0; + return char_len; + } + + elem_len = re_string_elem_size_at (input, str_idx); + if ((elem_len <= 1 && char_len <= 1) || char_len == 0) + return 0; + + if (node->type == COMPLEX_BRACKET) + { + const re_charset_t *cset = node->opr.mbcset; +# ifdef _LIBC + const unsigned char *pin + = ((const unsigned char *) re_string_get_buffer (input) + str_idx); + Idx j; + uint32_t nrules; +# endif /* _LIBC */ + int match_len = 0; + wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) + ? re_string_wchar_at (input, str_idx) : 0); + + /* match with multibyte character? */ + for (i = 0; i < cset->nmbchars; ++i) + if (wc == cset->mbchars[i]) + { + match_len = char_len; + goto check_node_accept_bytes_match; + } + /* match with character_class? */ + for (i = 0; i < cset->nchar_classes; ++i) + { + wctype_t wt = cset->char_classes[i]; + if (__iswctype (wc, wt)) + { + match_len = char_len; + goto check_node_accept_bytes_match; + } + } + +# ifdef _LIBC + nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + if (nrules != 0) + { + unsigned int in_collseq = 0; + const int32_t *table, *indirect; + const unsigned char *weights, *extra; + const char *collseqwc; + /* This #include defines a local function! */ +# include + + /* match with collating_symbol? */ + if (cset->ncoll_syms) + extra = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); + for (i = 0; i < cset->ncoll_syms; ++i) + { + const unsigned char *coll_sym = extra + cset->coll_syms[i]; + /* Compare the length of input collating element and + the length of current collating element. */ + if (*coll_sym != elem_len) + continue; + /* Compare each bytes. */ + for (j = 0; j < *coll_sym; j++) + if (pin[j] != coll_sym[1 + j]) + break; + if (j == *coll_sym) + { + /* Match if every bytes is equal. */ + match_len = j; + goto check_node_accept_bytes_match; + } + } + + if (cset->nranges) + { + if (elem_len <= char_len) + { + collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); + in_collseq = __collseq_table_lookup (collseqwc, wc); + } + else + in_collseq = find_collation_sequence_value (pin, elem_len); + } + /* match with range expression? */ + /* FIXME: Implement rational ranges here, too. */ + for (i = 0; i < cset->nranges; ++i) + if (cset->range_starts[i] <= in_collseq + && in_collseq <= cset->range_ends[i]) + { + match_len = elem_len; + goto check_node_accept_bytes_match; + } + + /* match with equivalence_class? */ + if (cset->nequiv_classes) + { + const unsigned char *cp = pin; + table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); + weights = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); + extra = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); + indirect = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); + int32_t idx = findidx (&cp, elem_len); + if (idx > 0) + for (i = 0; i < cset->nequiv_classes; ++i) + { + int32_t equiv_class_idx = cset->equiv_classes[i]; + size_t weight_len = weights[idx & 0xffffff]; + if (weight_len == weights[equiv_class_idx & 0xffffff] + && (idx >> 24) == (equiv_class_idx >> 24)) + { + Idx cnt = 0; + + idx &= 0xffffff; + equiv_class_idx &= 0xffffff; + + while (cnt <= weight_len + && (weights[equiv_class_idx + 1 + cnt] + == weights[idx + 1 + cnt])) + ++cnt; + if (cnt > weight_len) + { + match_len = elem_len; + goto check_node_accept_bytes_match; + } + } + } + } + } + else +# endif /* _LIBC */ + { + /* match with range expression? */ + for (i = 0; i < cset->nranges; ++i) + { + if (cset->range_starts[i] <= wc && wc <= cset->range_ends[i]) + { + match_len = char_len; + goto check_node_accept_bytes_match; + } + } + } + check_node_accept_bytes_match: + if (!cset->non_match) + return match_len; + else + { + if (match_len > 0) + return 0; + else + return (elem_len > char_len) ? elem_len : char_len; + } + } + return 0; +} + +# ifdef _LIBC +static unsigned int +internal_function +find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) +{ + uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); + if (nrules == 0) + { + if (mbs_len == 1) + { + /* No valid character. Match it as a single byte character. */ + const unsigned char *collseq = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); + return collseq[mbs[0]]; + } + return UINT_MAX; + } + else + { + int32_t idx; + const unsigned char *extra = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); + int32_t extrasize = (const unsigned char *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; + + for (idx = 0; idx < extrasize;) + { + int mbs_cnt; + bool found = false; + int32_t elem_mbs_len; + /* Skip the name of collating element name. */ + idx = idx + extra[idx] + 1; + elem_mbs_len = extra[idx++]; + if (mbs_len == elem_mbs_len) + { + for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) + if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) + break; + if (mbs_cnt == elem_mbs_len) + /* Found the entry. */ + found = true; + } + /* Skip the byte sequence of the collating element. */ + idx += elem_mbs_len; + /* Adjust for the alignment. */ + idx = (idx + 3) & ~3; + /* Skip the collation sequence value. */ + idx += sizeof (uint32_t); + /* Skip the wide char sequence of the collating element. */ + idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1); + /* If we found the entry, return the sequence value. */ + if (found) + return *(uint32_t *) (extra + idx); + /* Skip the collation sequence value. */ + idx += sizeof (uint32_t); + } + return UINT_MAX; + } +} +# endif /* _LIBC */ +#endif /* RE_ENABLE_I18N */ + +/* Check whether the node accepts the byte which is IDX-th + byte of the INPUT. */ + +static bool +internal_function +check_node_accept (const re_match_context_t *mctx, const re_token_t *node, + Idx idx) +{ + unsigned char ch; + ch = re_string_byte_at (&mctx->input, idx); + switch (node->type) + { + case CHARACTER: + if (node->opr.c != ch) + return false; + break; + + case SIMPLE_BRACKET: + if (!bitset_contain (node->opr.sbcset, ch)) + return false; + break; + +#ifdef RE_ENABLE_I18N + case OP_UTF8_PERIOD: + if (ch >= ASCII_CHARS) + return false; + /* FALLTHROUGH */ +#endif + case OP_PERIOD: + if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) + || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) + return false; + break; + + default: + return false; + } + + if (node->constraint) + { + /* The node has constraints. Check whether the current context + satisfies the constraints. */ + unsigned int context = re_string_context_at (&mctx->input, idx, + mctx->eflags); + if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) + return false; + } + + return true; +} + +/* Extend the buffers, if the buffers have run out. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +extend_buffers (re_match_context_t *mctx, int min_len) +{ + reg_errcode_t ret; + re_string_t *pstr = &mctx->input; + + /* Avoid overflow. */ + if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2 + <= pstr->bufs_len, 0)) + return REG_ESPACE; + + /* Double the lengths of the buffers, but allocate at least MIN_LEN. */ + ret = re_string_realloc_buffers (pstr, + MAX (min_len, + MIN (pstr->len, pstr->bufs_len * 2))); + if (BE (ret != REG_NOERROR, 0)) + return ret; + + if (mctx->state_log != NULL) + { + /* And double the length of state_log. */ + /* XXX We have no indication of the size of this buffer. If this + allocation fail we have no indication that the state_log array + does not have the right size. */ + re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, + pstr->bufs_len + 1); + if (BE (new_array == NULL, 0)) + return REG_ESPACE; + mctx->state_log = new_array; + } + + /* Then reconstruct the buffers. */ + if (pstr->icase) + { +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + { + ret = build_wcs_upper_buffer (pstr); + if (BE (ret != REG_NOERROR, 0)) + return ret; + } + else +#endif /* RE_ENABLE_I18N */ + build_upper_buffer (pstr); + } + else + { +#ifdef RE_ENABLE_I18N + if (pstr->mb_cur_max > 1) + build_wcs_buffer (pstr); + else +#endif /* RE_ENABLE_I18N */ + { + if (pstr->trans != NULL) + re_string_translate_buffer (pstr); + } + } + return REG_NOERROR; +} + + +/* Functions for matching context. */ + +/* Initialize MCTX. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) +{ + mctx->eflags = eflags; + mctx->match_last = REG_MISSING; + if (n > 0) + { + /* Avoid overflow. */ + size_t max_object_size = + MAX (sizeof (struct re_backref_cache_entry), + sizeof (re_sub_match_top_t *)); + if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n, 0)) + return REG_ESPACE; + + mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); + mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); + if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) + return REG_ESPACE; + } + /* Already zero-ed by the caller. + else + mctx->bkref_ents = NULL; + mctx->nbkref_ents = 0; + mctx->nsub_tops = 0; */ + mctx->abkref_ents = n; + mctx->max_mb_elem_len = 1; + mctx->asub_tops = n; + return REG_NOERROR; +} + +/* Clean the entries which depend on the current input in MCTX. + This function must be invoked when the matcher changes the start index + of the input, or changes the input string. */ + +static void +internal_function +match_ctx_clean (re_match_context_t *mctx) +{ + Idx st_idx; + for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) + { + Idx sl_idx; + re_sub_match_top_t *top = mctx->sub_tops[st_idx]; + for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) + { + re_sub_match_last_t *last = top->lasts[sl_idx]; + re_free (last->path.array); + re_free (last); + } + re_free (top->lasts); + if (top->path) + { + re_free (top->path->array); + re_free (top->path); + } + free (top); + } + + mctx->nsub_tops = 0; + mctx->nbkref_ents = 0; +} + +/* Free all the memory associated with MCTX. */ + +static void +internal_function +match_ctx_free (re_match_context_t *mctx) +{ + /* First, free all the memory associated with MCTX->SUB_TOPS. */ + match_ctx_clean (mctx); + re_free (mctx->sub_tops); + re_free (mctx->bkref_ents); +} + +/* Add a new backreference entry to MCTX. + Note that we assume that caller never call this function with duplicate + entry, and call with STR_IDX which isn't smaller than any existing entry. +*/ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, + Idx to) +{ + if (mctx->nbkref_ents >= mctx->abkref_ents) + { + struct re_backref_cache_entry* new_entry; + new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, + mctx->abkref_ents * 2); + if (BE (new_entry == NULL, 0)) + { + re_free (mctx->bkref_ents); + return REG_ESPACE; + } + mctx->bkref_ents = new_entry; + memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', + sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); + mctx->abkref_ents *= 2; + } + if (mctx->nbkref_ents > 0 + && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) + mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; + + mctx->bkref_ents[mctx->nbkref_ents].node = node; + mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; + mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; + mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; + + /* This is a cache that saves negative results of check_dst_limits_calc_pos. + If bit N is clear, means that this entry won't epsilon-transition to + an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If + it is set, check_dst_limits_calc_pos_1 will recurse and try to find one + such node. + + A backreference does not epsilon-transition unless it is empty, so set + to all zeros if FROM != TO. */ + mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map + = (from == to ? -1 : 0); + + mctx->bkref_ents[mctx->nbkref_ents++].more = 0; + if (mctx->max_mb_elem_len < to - from) + mctx->max_mb_elem_len = to - from; + return REG_NOERROR; +} + +/* Return the first entry with the same str_idx, or REG_MISSING if none is + found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ + +static Idx +internal_function +search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) +{ + Idx left, right, mid, last; + last = right = mctx->nbkref_ents; + for (left = 0; left < right;) + { + mid = (left + right) / 2; + if (mctx->bkref_ents[mid].str_idx < str_idx) + left = mid + 1; + else + right = mid; + } + if (left < last && mctx->bkref_ents[left].str_idx == str_idx) + return left; + else + return REG_MISSING; +} + +/* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches + at STR_IDX. */ + +static reg_errcode_t +internal_function __attribute_warn_unused_result__ +match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) +{ +#ifdef DEBUG + assert (mctx->sub_tops != NULL); + assert (mctx->asub_tops > 0); +#endif + if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) + { + Idx new_asub_tops = mctx->asub_tops * 2; + re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, + re_sub_match_top_t *, + new_asub_tops); + if (BE (new_array == NULL, 0)) + return REG_ESPACE; + mctx->sub_tops = new_array; + mctx->asub_tops = new_asub_tops; + } + mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); + if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) + return REG_ESPACE; + mctx->sub_tops[mctx->nsub_tops]->node = node; + mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; + return REG_NOERROR; +} + +/* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches + at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ + +static re_sub_match_last_t * +internal_function +match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) +{ + re_sub_match_last_t *new_entry; + if (BE (subtop->nlasts == subtop->alasts, 0)) + { + Idx new_alasts = 2 * subtop->alasts + 1; + re_sub_match_last_t **new_array = re_realloc (subtop->lasts, + re_sub_match_last_t *, + new_alasts); + if (BE (new_array == NULL, 0)) + return NULL; + subtop->lasts = new_array; + subtop->alasts = new_alasts; + } + new_entry = calloc (1, sizeof (re_sub_match_last_t)); + if (BE (new_entry != NULL, 1)) + { + subtop->lasts[subtop->nlasts] = new_entry; + new_entry->node = node; + new_entry->str_idx = str_idx; + ++subtop->nlasts; + } + return new_entry; +} + +static void +internal_function +sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, + re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) +{ + sctx->sifted_states = sifted_sts; + sctx->limited_states = limited_sts; + sctx->last_node = last_node; + sctx->last_str_idx = last_str_idx; + re_node_set_init_empty (&sctx->limits); +} diff --git a/gl/lib/rewinddir.c b/gl/lib/rewinddir.c new file mode 100644 index 0000000..d201ffa --- /dev/null +++ b/gl/lib/rewinddir.c @@ -0,0 +1,49 @@ +/* Restart reading the entries of a directory from the beginning. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include + +#include "dirent-private.h" + +void +rewinddir (DIR *dirp) +{ + /* Like in closedir(). */ + if (dirp->current != INVALID_HANDLE_VALUE) + FindClose (dirp->current); + + /* Like in opendir(). */ + dirp->status = -1; + dirp->current = FindFirstFile (dirp->dir_name_mask, &dirp->entry); + if (dirp->current == INVALID_HANDLE_VALUE) + { + switch (GetLastError ()) + { + case ERROR_FILE_NOT_FOUND: + dirp->status = -2; + break; + default: + /* Save the error code for the next readdir() call. */ + dirp->status = ENOENT; + break; + } + } +} diff --git a/gl/lib/rmdir.c b/gl/lib/rmdir.c new file mode 100644 index 0000000..ec7a586 --- /dev/null +++ b/gl/lib/rmdir.c @@ -0,0 +1,53 @@ +/* Work around rmdir bugs. + + Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include +#include + +#include "dosname.h" + +#undef rmdir + +/* Remove directory DIR. + Return 0 if successful, -1 if not. */ + +int +rpl_rmdir (char const *dir) +{ + /* Work around cygwin 1.5.x bug where rmdir("dir/./") succeeds. */ + size_t len = strlen (dir); + int result; + while (len && ISSLASH (dir[len - 1])) + len--; + if (len && dir[len - 1] == '.' && (1 == len || ISSLASH (dir[len - 2]))) + { + errno = EINVAL; + return -1; + } + result = rmdir (dir); + /* Work around mingw bug, where rmdir("file/") fails with EINVAL + instead of ENOTDIR. We've already filtered out trailing ., the + only reason allowed by POSIX for EINVAL. */ + if (result == -1 && errno == EINVAL) + errno = ENOTDIR; + return result; +} diff --git a/gl/lib/root-uid.h b/gl/lib/root-uid.h new file mode 100644 index 0000000..39e3c99 --- /dev/null +++ b/gl/lib/root-uid.h @@ -0,0 +1,30 @@ +/* The user ID that always has appropriate privileges in the POSIX sense. + + Copyright 2012-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + Written by Paul Eggert. */ + +#ifndef ROOT_UID_H_ +#define ROOT_UID_H_ + +/* The user ID that always has appropriate privileges in the POSIX sense. */ +#ifdef __TANDEM +# define ROOT_UID 65535 +#else +# define ROOT_UID 0 +#endif + +#endif diff --git a/gl/lib/rpmatch.c b/gl/lib/rpmatch.c new file mode 100644 index 0000000..4481082 --- /dev/null +++ b/gl/lib/rpmatch.c @@ -0,0 +1,176 @@ +/* Determine whether string value is affirmation or negative response + according to current locale's data. + + Copyright (C) 1996, 1998, 2000, 2002-2003, 2006-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include + +#if ENABLE_NLS +# include +# include +# include +# if HAVE_LANGINFO_YESEXPR +# include +# endif +# include +# include "gettext.h" +# define _(msgid) gettext (msgid) +# define N_(msgid) gettext_noop (msgid) + +# if HAVE_LANGINFO_YESEXPR +/* Return the localized regular expression pattern corresponding to + ENGLISH_PATTERN. NL_INDEX can be used with nl_langinfo. + The resulting string may only be used until the next nl_langinfo call. */ +static const char * +localized_pattern (const char *english_pattern, nl_item nl_index, + bool posixly_correct) +{ + const char *translated_pattern; + + /* We prefer to get the patterns from a PO file. It would be possible to + always use nl_langinfo (YESEXPR) instead of _("^[yY]"), and + nl_langinfo (NOEXPR) instead of _("^[nN]"), if we could assume that the + system's locale support is good. But this is not the case e.g. on Cygwin. + The localizations of gnulib.pot are of better quality in general. + Also, if we use locale info from non-free systems that don't have a + 'localedef' command, we deprive the users of the freedom to localize + this pattern for their preferred language. + But some programs, such as 'cp', 'mv', 'rm', 'find', 'xargs', are + specified by POSIX to use nl_langinfo (YESEXPR). We implement this + behaviour if POSIXLY_CORRECT is set, for the sake of these programs. */ + + /* If the user wants strict POSIX compliance, use nl_langinfo. */ + if (posixly_correct) + { + translated_pattern = nl_langinfo (nl_index); + /* Check against a broken system return value. */ + if (translated_pattern != NULL && translated_pattern[0] != '\0') + return translated_pattern; + } + + /* Look in the gnulib message catalog. */ + translated_pattern = _(english_pattern); + if (translated_pattern == english_pattern) + { + /* The gnulib message catalog provides no translation. + Try the system's message catalog. */ + translated_pattern = nl_langinfo (nl_index); + /* Check against a broken system return value. */ + if (translated_pattern != NULL && translated_pattern[0] != '\0') + return translated_pattern; + /* Fall back to English. */ + translated_pattern = english_pattern; + } + return translated_pattern; +} +# else +# define localized_pattern(english_pattern,nl_index,posixly_correct) \ + _(english_pattern) +# endif + +static int +try (const char *response, const char *pattern, char **lastp, regex_t *re) +{ + if (*lastp == NULL || strcmp (pattern, *lastp) != 0) + { + char *safe_pattern; + + /* The pattern has changed. */ + if (*lastp != NULL) + { + /* Free the old compiled pattern. */ + regfree (re); + free (*lastp); + *lastp = NULL; + } + /* Put the PATTERN into safe memory before calling regcomp. + (regcomp may call nl_langinfo, overwriting PATTERN's storage. */ + safe_pattern = strdup (pattern); + if (safe_pattern == NULL) + return -1; + /* Compile the pattern and cache it for future runs. */ + if (regcomp (re, safe_pattern, REG_EXTENDED) != 0) + { + free (safe_pattern); + return -1; + } + *lastp = safe_pattern; + } + + /* See if the regular expression matches RESPONSE. */ + return regexec (re, response, 0, NULL, 0) == 0; +} +#endif + + +int +rpmatch (const char *response) +{ +#if ENABLE_NLS + /* Match against one of the response patterns, compiling the pattern + first if necessary. */ + + /* We cache the response patterns and compiled regexps here. */ + static char *last_yesexpr, *last_noexpr; + static regex_t cached_yesre, cached_nore; + +# if HAVE_LANGINFO_YESEXPR + bool posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL); +# endif + + const char *yesexpr, *noexpr; + int result; + + /* TRANSLATORS: A regular expression testing for an affirmative answer + (english: "yes"). Testing the first character may be sufficient. + Take care to consider upper and lower case. + To enquire the regular expression that your system uses for this + purpose, you can use the command + locale -k LC_MESSAGES | grep '^yesexpr=' */ + yesexpr = localized_pattern (N_("^[yY]"), YESEXPR, posixly_correct); + result = try (response, yesexpr, &last_yesexpr, &cached_yesre); + if (result < 0) + return -1; + if (result) + return 1; + + /* TRANSLATORS: A regular expression testing for a negative answer + (english: "no"). Testing the first character may be sufficient. + Take care to consider upper and lower case. + To enquire the regular expression that your system uses for this + purpose, you can use the command + locale -k LC_MESSAGES | grep '^noexpr=' */ + noexpr = localized_pattern (N_("^[nN]"), NOEXPR, posixly_correct); + result = try (response, noexpr, &last_noexpr, &cached_nore); + if (result < 0) + return -1; + if (result) + return 0; + + return -1; +#else + /* Test against "^[yY]" and "^[nN]", hardcoded to avoid requiring regex */ + return (*response == 'y' || *response == 'Y' ? 1 + : *response == 'n' || *response == 'N' ? 0 : -1); +#endif +} diff --git a/gl/lib/safe-read.c b/gl/lib/safe-read.c new file mode 100644 index 0000000..c9b8828 --- /dev/null +++ b/gl/lib/safe-read.c @@ -0,0 +1,77 @@ +/* An interface to read and write that retries after interrupts. + + Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#ifdef SAFE_WRITE +# include "safe-write.h" +#else +# include "safe-read.h" +#endif + +/* Get ssize_t. */ +#include +#include + +#include + +#ifdef EINTR +# define IS_EINTR(x) ((x) == EINTR) +#else +# define IS_EINTR(x) 0 +#endif + +#include + +#ifdef SAFE_WRITE +# define safe_rw safe_write +# define rw write +#else +# define safe_rw safe_read +# define rw read +# undef const +# define const /* empty */ +#endif + +/* Read(write) up to COUNT bytes at BUF from(to) descriptor FD, retrying if + interrupted. Return the actual number of bytes read(written), zero for EOF, + or SAFE_READ_ERROR(SAFE_WRITE_ERROR) upon error. */ +size_t +safe_rw (int fd, void const *buf, size_t count) +{ + /* Work around a bug in Tru64 5.1. Attempting to read more than + INT_MAX bytes fails with errno == EINVAL. See + . + When decreasing COUNT, keep it block-aligned. */ + enum { BUGGY_READ_MAXIMUM = INT_MAX & ~8191 }; + + for (;;) + { + ssize_t result = rw (fd, buf, count); + + if (0 <= result) + return result; + else if (IS_EINTR (errno)) + continue; + else if (errno == EINVAL && BUGGY_READ_MAXIMUM < count) + count = BUGGY_READ_MAXIMUM; + else + return result; + } +} diff --git a/gl/lib/safe-read.h b/gl/lib/safe-read.h new file mode 100644 index 0000000..aba8bdb --- /dev/null +++ b/gl/lib/safe-read.h @@ -0,0 +1,47 @@ +/* An interface to read() that retries after interrupts. + Copyright (C) 2002, 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Some system calls may be interrupted and fail with errno = EINTR in the + following situations: + - The process is stopped and restarted (signal SIGSTOP and SIGCONT, user + types Ctrl-Z) on some platforms: Mac OS X. + - The process receives a signal for which a signal handler was installed + with sigaction() with an sa_flags field that does not contain + SA_RESTART. + - The process receives a signal for which a signal handler was installed + with signal() and for which no call to siginterrupt(sig,0) was done, + on some platforms: AIX, HP-UX, IRIX, OSF/1, Solaris. + + This module provides a wrapper around read() that handles EINTR. */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +#define SAFE_READ_ERROR ((size_t) -1) + +/* Read up to COUNT bytes at BUF from descriptor FD, retrying if interrupted. + Return the actual number of bytes read, zero for EOF, or SAFE_READ_ERROR + upon error. */ +extern size_t safe_read (int fd, void *buf, size_t count); + + +#ifdef __cplusplus +} +#endif diff --git a/gl/lib/same-inode.h b/gl/lib/same-inode.h new file mode 100644 index 0000000..584f606 --- /dev/null +++ b/gl/lib/same-inode.h @@ -0,0 +1,33 @@ +/* Determine whether two stat buffers refer to the same file. + + Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef SAME_INODE_H +# define SAME_INODE_H 1 + +# ifdef __VMS +# define SAME_INODE(a, b) \ + ((a).st_ino[0] == (b).st_ino[0] \ + && (a).st_ino[1] == (b).st_ino[1] \ + && (a).st_ino[2] == (b).st_ino[2] \ + && (a).st_dev == (b).st_dev) +# else +# define SAME_INODE(a, b) \ + ((a).st_ino == (b).st_ino \ + && (a).st_dev == (b).st_dev) +# endif + +#endif diff --git a/gl/lib/same.c b/gl/lib/same.c new file mode 100644 index 0000000..5c00e8a --- /dev/null +++ b/gl/lib/same.c @@ -0,0 +1,123 @@ +/* Determine whether two file names refer to the same file. + + Copyright (C) 1997-2000, 2002-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#ifndef _POSIX_NAME_MAX +# define _POSIX_NAME_MAX 14 +#endif + +#include "same.h" +#include "dirname.h" +#include "error.h" +#include "same-inode.h" + +#ifndef MIN +# define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + +/* Return nonzero if SOURCE and DEST point to the same name in the same + directory. */ + +bool +same_name (const char *source, const char *dest) +{ + /* Compare the basenames. */ + char const *source_basename = last_component (source); + char const *dest_basename = last_component (dest); + size_t source_baselen = base_len (source_basename); + size_t dest_baselen = base_len (dest_basename); + bool identical_basenames = + (source_baselen == dest_baselen + && memcmp (source_basename, dest_basename, dest_baselen) == 0); + bool compare_dirs = identical_basenames; + bool same = false; + +#if ! _POSIX_NO_TRUNC && HAVE_PATHCONF && defined _PC_NAME_MAX + /* This implementation silently truncates components of file names. If + the base names might be truncated, check whether the truncated + base names are the same, while checking the directories. */ + size_t slen_max = HAVE_LONG_FILE_NAMES ? 255 : _POSIX_NAME_MAX; + size_t min_baselen = MIN (source_baselen, dest_baselen); + if (slen_max <= min_baselen + && memcmp (source_basename, dest_basename, slen_max) == 0) + compare_dirs = true; +#endif + + if (compare_dirs) + { + struct stat source_dir_stats; + struct stat dest_dir_stats; + char *source_dirname, *dest_dirname; + + /* Compare the parent directories (via the device and inode numbers). */ + source_dirname = dir_name (source); + dest_dirname = dir_name (dest); + + if (stat (source_dirname, &source_dir_stats)) + { + /* Shouldn't happen. */ + error (1, errno, "%s", source_dirname); + } + + if (stat (dest_dirname, &dest_dir_stats)) + { + /* Shouldn't happen. */ + error (1, errno, "%s", dest_dirname); + } + + same = SAME_INODE (source_dir_stats, dest_dir_stats); + +#if ! _POSIX_NO_TRUNC && HAVE_PATHCONF && defined _PC_NAME_MAX + if (same && ! identical_basenames) + { + long name_max = (errno = 0, pathconf (dest_dirname, _PC_NAME_MAX)); + if (name_max < 0) + { + if (errno) + { + /* Shouldn't happen. */ + error (1, errno, "%s", dest_dirname); + } + same = false; + } + else + same = (name_max <= min_baselen + && memcmp (source_basename, dest_basename, name_max) == 0); + } +#endif + + free (source_dirname); + free (dest_dirname); + } + + return same; +} diff --git a/gl/lib/same.h b/gl/lib/same.h new file mode 100644 index 0000000..5f5c005 --- /dev/null +++ b/gl/lib/same.h @@ -0,0 +1,25 @@ +/* Determine whether two file names refer to the same file. + + Copyright (C) 1997-2000, 2003-2004, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef SAME_H_ +# define SAME_H_ 1 + +# include + +bool same_name (const char *source, const char *dest); + +#endif /* SAME_H_ */ diff --git a/gl/lib/save-cwd.c b/gl/lib/save-cwd.c new file mode 100644 index 0000000..7aafacd --- /dev/null +++ b/gl/lib/save-cwd.c @@ -0,0 +1,99 @@ +/* save-cwd.c -- Save and restore current working directory. + + Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +#include "save-cwd.h" + +#include +#include +#include +#include +#include + +#include "chdir-long.h" +#include "unistd--.h" +#include "cloexec.h" + +#if GNULIB_FCNTL_SAFER +# include "fcntl--.h" +#else +# define GNULIB_FCNTL_SAFER 0 +#endif + +/* Record the location of the current working directory in CWD so that + the program may change to other directories and later use restore_cwd + to return to the recorded location. This function may allocate + space using malloc (via getcwd) or leave a file descriptor open; + use free_cwd to perform the necessary free or close. Upon failure, + no memory is allocated, any locally opened file descriptors are + closed; return non-zero -- in that case, free_cwd need not be + called, but doing so is ok. Otherwise, return zero. + + The _raison d'etre_ for this interface is that the working directory + is sometimes inaccessible, and getcwd is not robust or as efficient. + So, we prefer to use the open/fchdir approach, but fall back on + getcwd if necessary. This module works for most cases with just + the getcwd-lgpl module, but to be truly robust, use the getcwd module. + + Some systems lack fchdir altogether: e.g., OS/2, pre-2001 Cygwin, + SCO Xenix. Also, SunOS 4 and Irix 5.3 provide the function, yet it + doesn't work for partitions on which auditing is enabled. If + you're still using an obsolete system with these problems, please + send email to the maintainer of this code. */ + +int +save_cwd (struct saved_cwd *cwd) +{ + cwd->name = NULL; + + cwd->desc = open (".", O_SEARCH); + if (!GNULIB_FCNTL_SAFER) + cwd->desc = fd_safer (cwd->desc); + if (cwd->desc < 0) + { + cwd->name = getcwd (NULL, 0); + return cwd->name ? 0 : -1; + } + + set_cloexec_flag (cwd->desc, true); + return 0; +} + +/* Change to recorded location, CWD, in directory hierarchy. + Upon failure, return -1 (errno is set by chdir or fchdir). + Upon success, return zero. */ + +int +restore_cwd (const struct saved_cwd *cwd) +{ + if (0 <= cwd->desc) + return fchdir (cwd->desc); + else + return chdir_long (cwd->name); +} + +void +free_cwd (struct saved_cwd *cwd) +{ + if (cwd->desc >= 0) + close (cwd->desc); + free (cwd->name); +} diff --git a/gl/lib/save-cwd.h b/gl/lib/save-cwd.h new file mode 100644 index 0000000..6b84e46 --- /dev/null +++ b/gl/lib/save-cwd.h @@ -0,0 +1,34 @@ +/* Save and restore current working directory. + + Copyright (C) 1995, 1997-1998, 2003, 2009-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#ifndef SAVE_CWD_H +# define SAVE_CWD_H 1 + +struct saved_cwd + { + int desc; + char *name; + }; + +int save_cwd (struct saved_cwd *cwd); +int restore_cwd (const struct saved_cwd *cwd); +void free_cwd (struct saved_cwd *cwd); + +#endif /* SAVE_CWD_H */ diff --git a/gl/lib/savedir.c b/gl/lib/savedir.c new file mode 100644 index 0000000..111d84b --- /dev/null +++ b/gl/lib/savedir.c @@ -0,0 +1,205 @@ +/* savedir.c -- save the list of files in a directory in a string + + Copyright (C) 1990, 1997-2001, 2003-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by David MacKenzie . */ + +#include + +#include "savedir.h" + +#include + +#include + +#include "dirent--.h" +#ifndef _D_EXACT_NAMLEN +# define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name) +#endif + +#include +#include +#include + +#include "xalloc.h" + +typedef struct +{ + char *name; +#if D_INO_IN_DIRENT + ino_t ino; +#endif +} direntry_t; + +/* Compare the names of two directory entries */ + +static int +direntry_cmp_name (void const *a, void const *b) +{ + direntry_t const *dea = a; + direntry_t const *deb = b; + + return strcmp (dea->name, deb->name); +} + +#if D_INO_IN_DIRENT +/* Compare the inode numbers of two directory entries */ + +static int +direntry_cmp_inode (void const *a, void const *b) +{ + direntry_t const *dea = a; + direntry_t const *deb = b; + + return dea->ino < deb->ino ? -1 : dea->ino > deb->ino; +} +#endif + +typedef int (*comparison_function) (void const *, void const *); + +static comparison_function const comparison_function_table[] = + { + 0, + direntry_cmp_name +#if D_INO_IN_DIRENT + , direntry_cmp_inode +#endif + }; + +/* Return a freshly allocated string containing the file names + in directory DIRP, separated by '\0' characters; + the end is marked by two '\0' characters in a row. + Returned values are sorted according to OPTION. + Return NULL (setting errno) if DIRP cannot be read. + If DIRP is NULL, return NULL without affecting errno. */ + +char * +streamsavedir (DIR *dirp, enum savedir_option option) +{ + char *name_space = NULL; + size_t allocated = 0; + direntry_t *entries = NULL; + size_t entries_allocated = 0; + size_t entries_used = 0; + size_t used = 0; + int readdir_errno; + comparison_function cmp = comparison_function_table[option]; + + if (dirp == NULL) + return NULL; + + for (;;) + { + struct dirent const *dp; + char const *entry; + + errno = 0; + dp = readdir (dirp); + if (! dp) + break; + + /* Skip "", ".", and "..". "" is returned by at least one buggy + implementation: Solaris 2.4 readdir on NFS file systems. */ + entry = dp->d_name; + if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0') + { + size_t entry_size = _D_EXACT_NAMLEN (dp) + 1; + if (cmp) + { + if (entries_allocated == entries_used) + { + size_t n = entries_allocated; + entries = x2nrealloc (entries, &n, sizeof *entries); + entries_allocated = n; + } + entries[entries_used].name = xstrdup (entry); +#if D_INO_IN_DIRENT + entries[entries_used].ino = dp->d_ino; +#endif + entries_used++; + } + else + { + if (allocated - used <= entry_size) + { + size_t n = used + entry_size; + if (n < used) + xalloc_die (); + name_space = x2nrealloc (name_space, &n, 1); + allocated = n; + } + memcpy (name_space + used, entry, entry_size); + } + used += entry_size; + } + } + + readdir_errno = errno; + if (readdir_errno != 0) + { + free (entries); + free (name_space); + errno = readdir_errno; + return NULL; + } + + if (cmp) + { + size_t i; + + qsort (entries, entries_used, sizeof *entries, cmp); + name_space = xmalloc (used + 1); + used = 0; + for (i = 0; i < entries_used; i++) + { + char *dest = name_space + used; + used += stpcpy (dest, entries[i].name) - dest + 1; + free (entries[i].name); + } + free (entries); + } + else if (used == allocated) + name_space = xrealloc (name_space, used + 1); + + name_space[used] = '\0'; + return name_space; +} + +/* Return a freshly allocated string containing the file names + in directory DIR, separated by '\0' characters; + the end is marked by two '\0' characters in a row. + Return NULL (setting errno) if DIR cannot be opened, read, or closed. */ + +char * +savedir (char const *dir, enum savedir_option option) +{ + DIR *dirp = opendir (dir); + if (! dirp) + return NULL; + else + { + char *name_space = streamsavedir (dirp, option); + if (closedir (dirp) != 0) + { + int closedir_errno = errno; + free (name_space); + errno = closedir_errno; + return NULL; + } + return name_space; + } +} diff --git a/gl/lib/savedir.h b/gl/lib/savedir.h new file mode 100644 index 0000000..aff4ad9 --- /dev/null +++ b/gl/lib/savedir.h @@ -0,0 +1,41 @@ +/* Save the list of files in a directory in a string. + + Copyright (C) 1997, 1999, 2001, 2003, 2005, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by David MacKenzie . */ + +#ifndef _GL_SAVEDIR_H +#define _GL_SAVEDIR_H + +#include + +enum savedir_option + { + SAVEDIR_SORT_NONE, + SAVEDIR_SORT_NAME, +#if D_INO_IN_DIRENT + SAVEDIR_SORT_INODE, + SAVEDIR_SORT_FASTREAD = SAVEDIR_SORT_INODE +#else + SAVEDIR_SORT_FASTREAD = SAVEDIR_SORT_NONE +#endif + }; + +char *streamsavedir (DIR *, enum savedir_option); +char *savedir (char const *, enum savedir_option); + +#endif diff --git a/gl/lib/se-context.c b/gl/lib/se-context.c new file mode 100644 index 0000000..2e5aa13 --- /dev/null +++ b/gl/lib/se-context.c @@ -0,0 +1,3 @@ +#include +#define SE_CONTEXT_INLINE _GL_EXTERN_INLINE +#include diff --git a/gl/lib/se-context.in.h b/gl/lib/se-context.in.h new file mode 100644 index 0000000..c3890a2 --- /dev/null +++ b/gl/lib/se-context.in.h @@ -0,0 +1,46 @@ +#ifndef SELINUX_CONTEXT_H +# define SELINUX_CONTEXT_H + +# include + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef SE_CONTEXT_INLINE +# define SE_CONTEXT_INLINE _GL_INLINE +#endif + +/* The definition of _GL_UNUSED_PARAMETER is copied here. */ + +typedef int context_t; +SE_CONTEXT_INLINE context_t context_new (char const *s _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return 0; } +SE_CONTEXT_INLINE char *context_str (context_t con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return (void *) 0; } +SE_CONTEXT_INLINE void context_free (context_t c _GL_UNUSED_PARAMETER) {} + +SE_CONTEXT_INLINE int context_user_set (context_t sc _GL_UNUSED_PARAMETER, + char const *s _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_CONTEXT_INLINE int context_role_set (context_t sc _GL_UNUSED_PARAMETER, + char const *s _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_CONTEXT_INLINE int context_range_set (context_t sc _GL_UNUSED_PARAMETER, + char const *s _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_CONTEXT_INLINE int context_type_set (context_t sc _GL_UNUSED_PARAMETER, + char const *s _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_CONTEXT_INLINE char *context_type_get (context_t sc _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return (void *) 0; } +SE_CONTEXT_INLINE char *context_range_get (context_t sc _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return (void *) 0; } +SE_CONTEXT_INLINE char *context_role_get (context_t sc _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return (void *) 0; } +SE_CONTEXT_INLINE char *context_user_get (context_t sc _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return (void *) 0; } + +_GL_INLINE_HEADER_END + +#endif diff --git a/gl/lib/se-selinux.c b/gl/lib/se-selinux.c new file mode 100644 index 0000000..ee4e57f --- /dev/null +++ b/gl/lib/se-selinux.c @@ -0,0 +1,3 @@ +#include +#define SE_SELINUX_INLINE _GL_EXTERN_INLINE +#include diff --git a/gl/lib/se-selinux.in.h b/gl/lib/se-selinux.in.h new file mode 100644 index 0000000..5eb92a2 --- /dev/null +++ b/gl/lib/se-selinux.in.h @@ -0,0 +1,123 @@ +/* Replacement for platforms that lack it. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _@GUARD_PREFIX@_SELINUX_SELINUX_H +# define _@GUARD_PREFIX@_SELINUX_SELINUX_H + +# if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +# endif +@PRAGMA_COLUMNS@ + +# if HAVE_SELINUX_SELINUX_H + +#@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@ + +# else + +# include +# include + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +# ifndef SE_SELINUX_INLINE +# define SE_SELINUX_INLINE _GL_INLINE +# endif + +/* The definition of _GL_UNUSED_PARAMETER is copied here. */ + +# if !GNULIB_defined_security_types + +typedef unsigned short security_class_t; +typedef char *security_context_t; +# define is_selinux_enabled() 0 + +SE_SELINUX_INLINE int +getcon (security_context_t *con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE void +freecon (security_context_t con _GL_UNUSED_PARAMETER) {} + +SE_SELINUX_INLINE int +getfscreatecon (security_context_t *con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +setfscreatecon (security_context_t con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +matchpathcon (char const *file _GL_UNUSED_PARAMETER, + mode_t m _GL_UNUSED_PARAMETER, + security_context_t *con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +getfilecon (char const *file _GL_UNUSED_PARAMETER, + security_context_t *con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +lgetfilecon (char const *file _GL_UNUSED_PARAMETER, + security_context_t *con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +fgetfilecon (int fd, security_context_t *con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +setfilecon (char const *file _GL_UNUSED_PARAMETER, + security_context_t con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +lsetfilecon (char const *file _GL_UNUSED_PARAMETER, + security_context_t con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +fsetfilecon (int fd _GL_UNUSED_PARAMETER, + security_context_t con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } + +SE_SELINUX_INLINE int +security_check_context (security_context_t con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +security_check_context_raw (security_context_t con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +setexeccon (security_context_t con _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE int +security_compute_create (security_context_t scon _GL_UNUSED_PARAMETER, + security_context_t tcon _GL_UNUSED_PARAMETER, + security_class_t tclass _GL_UNUSED_PARAMETER, + security_context_t *newcon _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } +SE_SELINUX_INLINE security_class_t +string_to_security_class (char const *name) + { errno = ENOTSUP; return 0; } +SE_SELINUX_INLINE int +matchpathcon_init_prefix (char const *path _GL_UNUSED_PARAMETER, + char const *prefix _GL_UNUSED_PARAMETER) + { errno = ENOTSUP; return -1; } + +# define GNULIB_defined_security_types 1 +# endif + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN + +# endif +#endif /* _@GUARD_PREFIX@_SELINUX_SELINUX_H */ diff --git a/gl/lib/selinux-at.c b/gl/lib/selinux-at.c new file mode 100644 index 0000000..d2032c0 --- /dev/null +++ b/gl/lib/selinux-at.c @@ -0,0 +1,71 @@ +/* openat-style fd-relative functions for SE Linux + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#include + +#include "selinux-at.h" +#include "openat.h" + +#include +#include +#include +#include + +#include "save-cwd.h" + +#include "openat-priv.h" + +#define AT_FUNC_NAME getfileconat +#define AT_FUNC_F1 getfilecon +#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t *con +#define AT_FUNC_POST_FILE_ARGS , con +#include "at-func.c" +#undef AT_FUNC_NAME +#undef AT_FUNC_F1 +#undef AT_FUNC_POST_FILE_PARAM_DECLS +#undef AT_FUNC_POST_FILE_ARGS + +#define AT_FUNC_NAME lgetfileconat +#define AT_FUNC_F1 lgetfilecon +#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t *con +#define AT_FUNC_POST_FILE_ARGS , con +#include "at-func.c" +#undef AT_FUNC_NAME +#undef AT_FUNC_F1 +#undef AT_FUNC_POST_FILE_PARAM_DECLS +#undef AT_FUNC_POST_FILE_ARGS + +#define AT_FUNC_NAME setfileconat +#define AT_FUNC_F1 setfilecon +#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t con +#define AT_FUNC_POST_FILE_ARGS , con +#include "at-func.c" +#undef AT_FUNC_NAME +#undef AT_FUNC_F1 +#undef AT_FUNC_POST_FILE_PARAM_DECLS +#undef AT_FUNC_POST_FILE_ARGS + +#define AT_FUNC_NAME lsetfileconat +#define AT_FUNC_F1 lsetfilecon +#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t con +#define AT_FUNC_POST_FILE_ARGS , con +#include "at-func.c" +#undef AT_FUNC_NAME +#undef AT_FUNC_F1 +#undef AT_FUNC_POST_FILE_PARAM_DECLS +#undef AT_FUNC_POST_FILE_ARGS diff --git a/gl/lib/selinux-at.h b/gl/lib/selinux-at.h new file mode 100644 index 0000000..e65687e --- /dev/null +++ b/gl/lib/selinux-at.h @@ -0,0 +1,52 @@ +/* Prototypes for openat-style fd-relative SELinux functions + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include + +/* These are the dir-fd-relative variants of the functions without the + "at" suffix. For example, getfileconat (AT_FDCWD, file, &c) is usually + equivalent to getfilecon (file, &c). The emulation is accomplished + by first attempting getfilecon ("/proc/self/fd/DIR_FD/FILE", &c). + Failing that, simulate it via save_cwd/fchdir/getfilecon/restore_cwd. + If either the save_cwd or the restore_cwd fails (relatively unlikely), + then give a diagnostic and exit nonzero. */ + +/* dir-fd-relative getfilecon. Set *CON to the SELinux security context + of the file specified by DIR_FD and FILE and return the length of *CON. + DIR_FD and FILE are interpreted as for fstatat[*]. A non-NULL *CON + must be freed with freecon. Upon error, set *CON to NULL, set errno + and return -1. + [*] with flags=0 here, with flags=AT_SYMLINK_NOFOLLOW for lgetfileconat */ +int getfileconat (int dir_fd, char const *file, security_context_t *con); + +/* dir-fd-relative lgetfilecon. This function is just like getfileconat, + except when DIR_FD and FILE specify a symlink: lgetfileconat operates on + the symlink, while getfileconat operates on the referent of the symlink. */ +int lgetfileconat (int dir_fd, char const *file, security_context_t *con); + +/* dir-fd-relative setfilecon. Set the SELinux security context of + the file specified by DIR_FD and FILE to CON. DIR_FD and FILE are + interpreted as for fstatat[*]. Upon success, return 0. + Otherwise, return -1 and set errno. */ +int setfileconat (int dir_fd, char const *file, security_context_t con); + +/* dir-fd-relative lsetfilecon. This function is just like setfileconat, + except that rather than dereferencing a symlink, this function affects it. */ +/* dir-fd-relative lsetfilecon. This function is just like setfileconat, + except when DIR_FD and FILE specify a symlink: lsetfileconat operates on + the symlink, while setfileconat operates on the referent of the symlink. */ +int lsetfileconat (int dir_fd, char const *file, security_context_t con); diff --git a/gl/lib/setenv.c b/gl/lib/setenv.c new file mode 100644 index 0000000..06791a9 --- /dev/null +++ b/gl/lib/setenv.c @@ -0,0 +1,390 @@ +/* Copyright (C) 1992, 1995-2003, 2005-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#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 +#endif + +#include + +/* Specification. */ +#include + +#include +#ifndef __set_errno +# define __set_errno(ev) ((errno) = (ev)) +#endif + +#include +#if _LIBC || HAVE_UNISTD_H +# include +#endif + +#if !_LIBC +# include "malloca.h" +#endif + +#if _LIBC || !HAVE_SETENV + +#if !_LIBC +# define __environ environ +#endif + +#if _LIBC +/* This lock protects against simultaneous modifications of 'environ'. */ +# include +__libc_lock_define_initialized (static, envlock) +# define LOCK __libc_lock_lock (envlock) +# define UNLOCK __libc_lock_unlock (envlock) +#else +# define LOCK +# define UNLOCK +#endif + +/* In the GNU C library we must keep the namespace clean. */ +#ifdef _LIBC +# define setenv __setenv +# define clearenv __clearenv +# define tfind __tfind +# define tsearch __tsearch +#endif + +/* In the GNU C library implementation we try to be more clever and + allow arbitrarily many changes of the environment given that the used + values are from a small set. Outside glibc this will eat up all + memory after a while. */ +#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \ + && defined __GNUC__) +# define USE_TSEARCH 1 +# include +typedef int (*compar_fn_t) (const void *, const void *); + +/* This is a pointer to the root of the search tree with the known + values. */ +static void *known_values; + +# define KNOWN_VALUE(Str) \ + ({ \ + void *value = tfind (Str, &known_values, (compar_fn_t) strcmp); \ + value != NULL ? *(char **) value : NULL; \ + }) +# define STORE_VALUE(Str) \ + tsearch (Str, &known_values, (compar_fn_t) strcmp) + +#else +# undef USE_TSEARCH + +# define KNOWN_VALUE(Str) NULL +# define STORE_VALUE(Str) do { } while (0) + +#endif + + +/* If this variable is not a null pointer we allocated the current + environment. */ +static char **last_environ; + + +/* This function is used by 'setenv' and 'putenv'. The difference between + the two functions is that for the former must create a new string which + is then placed in the environment, while the argument of 'putenv' + must be used directly. This is all complicated by the fact that we try + to reuse values once generated for a 'setenv' call since we can never + free the strings. */ +int +__add_to_environ (const char *name, const char *value, const char *combined, + int replace) +{ + char **ep; + size_t size; + const size_t namelen = strlen (name); + const size_t vallen = value != NULL ? strlen (value) + 1 : 0; + + LOCK; + + /* We have to get the pointer now that we have the lock and not earlier + since another thread might have created a new environment. */ + ep = __environ; + + size = 0; + if (ep != NULL) + { + for (; *ep != NULL; ++ep) + if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=') + break; + else + ++size; + } + + if (ep == NULL || *ep == NULL) + { + char **new_environ; +#ifdef USE_TSEARCH + char *new_value; +#endif + + /* We allocated this space; we can extend it. */ + new_environ = + (char **) (last_environ == NULL + ? malloc ((size + 2) * sizeof (char *)) + : realloc (last_environ, (size + 2) * sizeof (char *))); + if (new_environ == NULL) + { + /* It's easier to set errno to ENOMEM than to rely on the + 'malloc-posix' and 'realloc-posix' gnulib modules. */ + __set_errno (ENOMEM); + UNLOCK; + return -1; + } + + /* If the whole entry is given add it. */ + if (combined != NULL) + /* We must not add the string to the search tree since it belongs + to the user. */ + new_environ[size] = (char *) combined; + else + { + /* See whether the value is already known. */ +#ifdef USE_TSEARCH +# ifdef _LIBC + new_value = (char *) alloca (namelen + 1 + vallen); + __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), + value, vallen); +# else + new_value = (char *) malloca (namelen + 1 + vallen); + if (new_value == NULL) + { + __set_errno (ENOMEM); + UNLOCK; + return -1; + } + memcpy (new_value, name, namelen); + new_value[namelen] = '='; + memcpy (&new_value[namelen + 1], value, vallen); +# endif + + new_environ[size] = KNOWN_VALUE (new_value); + if (new_environ[size] == NULL) +#endif + { + new_environ[size] = (char *) malloc (namelen + 1 + vallen); + if (new_environ[size] == NULL) + { +#if defined USE_TSEARCH && !defined _LIBC + freea (new_value); +#endif + __set_errno (ENOMEM); + UNLOCK; + return -1; + } + +#ifdef USE_TSEARCH + memcpy (new_environ[size], new_value, namelen + 1 + vallen); +#else + memcpy (new_environ[size], name, namelen); + new_environ[size][namelen] = '='; + memcpy (&new_environ[size][namelen + 1], value, vallen); +#endif + /* And save the value now. We cannot do this when we remove + the string since then we cannot decide whether it is a + user string or not. */ + STORE_VALUE (new_environ[size]); + } +#if defined USE_TSEARCH && !defined _LIBC + freea (new_value); +#endif + } + + if (__environ != last_environ) + memcpy ((char *) new_environ, (char *) __environ, + size * sizeof (char *)); + + new_environ[size + 1] = NULL; + + last_environ = __environ = new_environ; + } + else if (replace) + { + char *np; + + /* Use the user string if given. */ + if (combined != NULL) + np = (char *) combined; + else + { +#ifdef USE_TSEARCH + char *new_value; +# ifdef _LIBC + new_value = alloca (namelen + 1 + vallen); + __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), + value, vallen); +# else + new_value = malloca (namelen + 1 + vallen); + if (new_value == NULL) + { + __set_errno (ENOMEM); + UNLOCK; + return -1; + } + memcpy (new_value, name, namelen); + new_value[namelen] = '='; + memcpy (&new_value[namelen + 1], value, vallen); +# endif + + np = KNOWN_VALUE (new_value); + if (np == NULL) +#endif + { + np = (char *) malloc (namelen + 1 + vallen); + if (np == NULL) + { +#if defined USE_TSEARCH && !defined _LIBC + freea (new_value); +#endif + __set_errno (ENOMEM); + UNLOCK; + return -1; + } + +#ifdef USE_TSEARCH + memcpy (np, new_value, namelen + 1 + vallen); +#else + memcpy (np, name, namelen); + np[namelen] = '='; + memcpy (&np[namelen + 1], value, vallen); +#endif + /* And remember the value. */ + STORE_VALUE (np); + } +#if defined USE_TSEARCH && !defined _LIBC + freea (new_value); +#endif + } + + *ep = np; + } + + UNLOCK; + + return 0; +} + +int +setenv (const char *name, const char *value, int replace) +{ + if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) + { + __set_errno (EINVAL); + return -1; + } + + return __add_to_environ (name, value, NULL, replace); +} + +/* The 'clearenv' was planned to be added to POSIX.1 but probably + never made it. Nevertheless the POSIX.9 standard (POSIX bindings + for Fortran 77) requires this function. */ +int +clearenv (void) +{ + LOCK; + + if (__environ == last_environ && __environ != NULL) + { + /* We allocated this environment so we can free it. */ + free (__environ); + last_environ = NULL; + } + + /* Clear the environment pointer removes the whole environment. */ + __environ = NULL; + + UNLOCK; + + return 0; +} + +#ifdef _LIBC +static void +free_mem (void) +{ + /* Remove all traces. */ + clearenv (); + + /* Now remove the search tree. */ + __tdestroy (known_values, free); + known_values = NULL; +} +text_set_element (__libc_subfreeres, free_mem); + + +# undef setenv +# undef clearenv +weak_alias (__setenv, setenv) +weak_alias (__clearenv, clearenv) +#endif + +#endif /* _LIBC || !HAVE_SETENV */ + +/* The rest of this file is called into use when replacing an existing + but buggy setenv. Known bugs include failure to diagnose invalid + name, and consuming a leading '=' from value. */ +#if HAVE_SETENV + +# undef setenv +# if !HAVE_DECL_SETENV +extern int setenv (const char *, const char *, int); +# endif +# define STREQ(a, b) (strcmp (a, b) == 0) + +int +rpl_setenv (const char *name, const char *value, int replace) +{ + int result; + if (!name || !*name || strchr (name, '=')) + { + errno = EINVAL; + return -1; + } + /* Call the real setenv even if replace is 0, in case implementation + has underlying data to update, such as when environ changes. */ + result = setenv (name, value, replace); + if (result == 0 && replace && *value == '=') + { + char *tmp = getenv (name); + if (!STREQ (tmp, value)) + { + int saved_errno; + size_t len = strlen (value); + tmp = malloca (len + 2); + /* Since leading '=' is eaten, double it up. */ + *tmp = '='; + memcpy (tmp + 1, value, len + 1); + result = setenv (name, tmp, replace); + saved_errno = errno; + freea (tmp); + errno = saved_errno; + } + } + return result; +} + +#endif /* HAVE_SETENV */ diff --git a/gl/lib/size_max.h b/gl/lib/size_max.h new file mode 100644 index 0000000..461ff1c --- /dev/null +++ b/gl/lib/size_max.h @@ -0,0 +1,30 @@ +/* size_max.h -- declare SIZE_MAX through system headers + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. + Written by Simon Josefsson. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef GNULIB_SIZE_MAX_H +#define GNULIB_SIZE_MAX_H + +/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ +# include +/* Get SIZE_MAX declaration on systems like glibc 2. */ +# if HAVE_STDINT_H +# include +# endif +/* On systems where these include files don't define it, SIZE_MAX is defined + in config.h. */ + +#endif /* GNULIB_SIZE_MAX_H */ diff --git a/gl/lib/snprintf.c b/gl/lib/snprintf.c new file mode 100644 index 0000000..ea1321c --- /dev/null +++ b/gl/lib/snprintf.c @@ -0,0 +1,71 @@ +/* Formatted output to strings. + Copyright (C) 2004, 2006-2014 Free Software Foundation, Inc. + Written by Simon Josefsson and Paul Eggert. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include +#include +#include + +#include "vasnprintf.h" + +/* Print formatted output to string STR. Similar to sprintf, but + additional length SIZE limit how much is written into STR. Returns + string length of formatted string (which may be larger than SIZE). + STR may be NULL, in which case nothing will be written. On error, + return a negative value. */ +int +snprintf (char *str, size_t size, const char *format, ...) +{ + char *output; + size_t len; + size_t lenbuf = size; + va_list args; + + va_start (args, format); + output = vasnprintf (str, &lenbuf, format, args); + len = lenbuf; + va_end (args); + + if (!output) + return -1; + + if (output != str) + { + if (size) + { + size_t pruned_len = (len < size ? len : size - 1); + memcpy (str, output, pruned_len); + str[pruned_len] = '\0'; + } + + free (output); + } + + if (INT_MAX < len) + { + errno = EOVERFLOW; + return -1; + } + + return len; +} diff --git a/gl/lib/sockets.c b/gl/lib/sockets.c new file mode 100644 index 0000000..962c578 --- /dev/null +++ b/gl/lib/sockets.c @@ -0,0 +1,154 @@ +/* sockets.c --- wrappers for Windows socket functions + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Simon Josefsson */ + +#include + +/* Specification. */ +#include "sockets.h" + +#if WINDOWS_SOCKETS + +/* This includes winsock2.h on MinGW. */ +# include + +# include "fd-hook.h" +# include "msvc-nothrow.h" + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +# include "w32sock.h" + +static int +close_fd_maybe_socket (const struct fd_hook *remaining_list, + gl_close_fn primary, + int fd) +{ + /* Note about multithread-safety: There is a race condition where, between + our calls to closesocket() and the primary close(), some other thread + could make system calls that allocate precisely the same HANDLE value + as sock; then the primary close() would call CloseHandle() on it. */ + SOCKET sock; + WSANETWORKEVENTS ev; + + /* Test whether fd refers to a socket. */ + sock = FD_TO_SOCKET (fd); + ev.lNetworkEvents = 0xDEADBEEF; + WSAEnumNetworkEvents (sock, NULL, &ev); + if (ev.lNetworkEvents != 0xDEADBEEF) + { + /* fd refers to a socket. */ + /* FIXME: other applications, like squid, use an undocumented + _free_osfhnd free function. But this is not enough: The 'osfile' + flags for fd also needs to be cleared, but it is hard to access it. + Instead, here we just close twice the file descriptor. */ + if (closesocket (sock)) + { + set_winsock_errno (); + return -1; + } + else + { + /* This call frees the file descriptor and does a + CloseHandle ((HANDLE) _get_osfhandle (fd)), which fails. */ + _close (fd); + return 0; + } + } + else + /* Some other type of file descriptor. */ + return execute_close_hooks (remaining_list, primary, fd); +} + +static int +ioctl_fd_maybe_socket (const struct fd_hook *remaining_list, + gl_ioctl_fn primary, + int fd, int request, void *arg) +{ + SOCKET sock; + WSANETWORKEVENTS ev; + + /* Test whether fd refers to a socket. */ + sock = FD_TO_SOCKET (fd); + ev.lNetworkEvents = 0xDEADBEEF; + WSAEnumNetworkEvents (sock, NULL, &ev); + if (ev.lNetworkEvents != 0xDEADBEEF) + { + /* fd refers to a socket. */ + if (ioctlsocket (sock, request, arg) < 0) + { + set_winsock_errno (); + return -1; + } + else + return 0; + } + else + /* Some other type of file descriptor. */ + return execute_ioctl_hooks (remaining_list, primary, fd, request, arg); +} + +static struct fd_hook fd_sockets_hook; + +static int initialized_sockets_version /* = 0 */; + +#endif /* WINDOWS_SOCKETS */ + +int +gl_sockets_startup (int version _GL_UNUSED) +{ +#if WINDOWS_SOCKETS + if (version > initialized_sockets_version) + { + WSADATA data; + int err; + + err = WSAStartup (version, &data); + if (err != 0) + return 1; + + if (data.wVersion < version) + return 2; + + if (initialized_sockets_version == 0) + register_fd_hook (close_fd_maybe_socket, ioctl_fd_maybe_socket, + &fd_sockets_hook); + + initialized_sockets_version = version; + } +#endif + + return 0; +} + +int +gl_sockets_cleanup (void) +{ +#if WINDOWS_SOCKETS + int err; + + initialized_sockets_version = 0; + + unregister_fd_hook (&fd_sockets_hook); + + err = WSACleanup (); + if (err != 0) + return 1; +#endif + + return 0; +} diff --git a/gl/lib/sockets.h b/gl/lib/sockets.h new file mode 100644 index 0000000..0bee1dd --- /dev/null +++ b/gl/lib/sockets.h @@ -0,0 +1,62 @@ +/* sockets.h - wrappers for Windows socket functions + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Simon Josefsson */ + +#ifndef SOCKETS_H +# define SOCKETS_H 1 + +#define SOCKETS_1_0 0x100 /* don't use - does not work on Windows XP */ +#define SOCKETS_1_1 0x101 +#define SOCKETS_2_0 0x200 /* don't use - does not work on Windows XP */ +#define SOCKETS_2_1 0x201 +#define SOCKETS_2_2 0x202 + +int gl_sockets_startup (int version) +#if !WINDOWS_SOCKETS + _GL_ATTRIBUTE_CONST +#endif + ; + +int gl_sockets_cleanup (void) +#if !WINDOWS_SOCKETS + _GL_ATTRIBUTE_CONST +#endif + ; + +/* This function is useful it you create a socket using gnulib's + Winsock wrappers but needs to pass on the socket handle to some + other library that only accepts sockets. */ +#if WINDOWS_SOCKETS + +#include + +#include "msvc-nothrow.h" + +static inline SOCKET +gl_fd_to_handle (int fd) +{ + return _get_osfhandle (fd); +} + +#else + +#define gl_fd_to_handle(x) (x) + +#endif /* WINDOWS_SOCKETS */ + +#endif /* SOCKETS_H */ diff --git a/gnulib/lib/stat-macros.h b/gl/lib/stat-macros.h similarity index 100% rename from gnulib/lib/stat-macros.h rename to gl/lib/stat-macros.h diff --git a/gl/lib/stat-size.h b/gl/lib/stat-size.h new file mode 100644 index 0000000..42482fa --- /dev/null +++ b/gl/lib/stat-size.h @@ -0,0 +1,107 @@ +/* macros useful in interpreting size-related values in struct stat. + Copyright (C) 1989, 1991-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ +/* + Macros defined by this file (s is an rvalue of type struct stat): + + DEV_BSIZE: The device blocksize. But use ST_NBLOCKSIZE instead. + ST_BLKSIZE(s): Preferred (in the sense of best performance) I/O blocksize + for the file, in bytes. + ST_NBLOCKS(s): Number of blocks in the file, including indirect blocks. + ST_NBLOCKSIZE: Size of blocks used when calculating ST_NBLOCKS. + */ +#ifndef STAT_SIZE_H +#define STAT_SIZE_H + +/* sys/param.h may define DEV_BSIZE */ +#if HAVE_SYS_PARAM_H +# include +#endif + + +/* Get or fake the disk device blocksize. + Usually defined by sys/param.h (if at all). */ +#if !defined DEV_BSIZE && defined BSIZE +# define DEV_BSIZE BSIZE +#endif +#if !defined DEV_BSIZE && defined BBSIZE /* SGI sys/param.h */ +# define DEV_BSIZE BBSIZE +#endif +#ifndef DEV_BSIZE +# define DEV_BSIZE 4096 +#endif + + + +/* Extract or fake data from a 'struct stat'. + ST_BLKSIZE: Preferred I/O blocksize for the file, in bytes. + ST_NBLOCKS: Number of blocks in the file, including indirect blocks. + ST_NBLOCKSIZE: Size of blocks used when calculating ST_NBLOCKS. */ +#ifndef HAVE_STRUCT_STAT_ST_BLOCKS +# define ST_BLKSIZE(statbuf) DEV_BSIZE + /* coreutils' fileblocks.c also uses BSIZE. */ +# if defined _POSIX_SOURCE || !defined BSIZE +# define ST_NBLOCKS(statbuf) \ + ((statbuf).st_size / ST_NBLOCKSIZE + ((statbuf).st_size % ST_NBLOCKSIZE != 0)) +# else + /* This definition calls st_blocks, which is in the fileblocks module. */ +# define ST_NBLOCKS(statbuf) \ + (S_ISREG ((statbuf).st_mode) || S_ISDIR ((statbuf).st_mode) ? \ + st_blocks ((statbuf).st_size) : 0) +# endif +#else +/* Some systems, like Sequents, return st_blksize of 0 on pipes. + Also, when running 'rsh hpux11-system cat any-file', cat would + determine that the output stream had an st_blksize of 2147421096. + Conversely st_blksize can be 2 GiB (or maybe even larger) with XFS + on 64-bit hosts. Somewhat arbitrarily, limit the "optimal" block + size to SIZE_MAX / 8 + 1. (Dividing SIZE_MAX by only 4 wouldn't + suffice, since "cat" sometimes multiplies the result by 4.) If + anyone knows of a system for which this limit is too small, please + report it as a bug in this code. */ +# define ST_BLKSIZE(statbuf) ((0 < (statbuf).st_blksize \ + && (statbuf).st_blksize <= ((size_t)-1) / 8 + 1) \ + ? (statbuf).st_blksize : DEV_BSIZE) +# if defined hpux || defined __hpux__ || defined __hpux + /* HP-UX counts st_blocks in 1024-byte units. + This loses when mixing HP-UX and BSD file systems with NFS. */ +# define ST_NBLOCKSIZE 1024 +# else /* !hpux */ +# if defined _AIX && defined _I386 + /* AIX PS/2 counts st_blocks in 4K units. */ +# define ST_NBLOCKSIZE (4 * 1024) +# else +# if defined _CRAY +# define ST_NBLOCKS(statbuf) \ + (S_ISREG ((statbuf).st_mode) || S_ISDIR ((statbuf).st_mode) \ + ? (statbuf).st_blocks * ST_BLKSIZE (statbuf) / ST_NBLOCKSIZE : 0) +# endif +# endif +# endif +#endif + +#ifndef ST_NBLOCKS +# define ST_NBLOCKS(statbuf) ((statbuf).st_blocks) +#endif + +#ifndef ST_NBLOCKSIZE +# ifdef S_BLKSIZE +# define ST_NBLOCKSIZE S_BLKSIZE +# else +# define ST_NBLOCKSIZE 512 +# endif +#endif + +#endif /* STAT_SIZE_H */ diff --git a/gl/lib/stat-time.c b/gl/lib/stat-time.c new file mode 100644 index 0000000..81b83dd --- /dev/null +++ b/gl/lib/stat-time.c @@ -0,0 +1,3 @@ +#include +#define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE +#include "stat-time.h" diff --git a/gl/lib/stat-time.h b/gl/lib/stat-time.h new file mode 100644 index 0000000..b3df6eb --- /dev/null +++ b/gl/lib/stat-time.h @@ -0,0 +1,199 @@ +/* stat-related time functions. + + Copyright (C) 2005, 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#ifndef STAT_TIME_H +#define STAT_TIME_H 1 + +#include +#include + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_STAT_TIME_INLINE +# define _GL_STAT_TIME_INLINE _GL_INLINE +#endif + +/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type + struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, + ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, + if available. ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim + for access, status change, data modification, or birth (creation) + time respectively. + + These macros are private to stat-time.h. */ +#if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC +# ifdef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC +# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) +# else +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec) +# endif +#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC +# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec) +#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec) +#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC +# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec) +#endif + +/* Return the nanosecond component of *ST's access time. */ +_GL_STAT_TIME_INLINE long int +get_stat_atime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_atim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_atim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's status change time. */ +_GL_STAT_TIME_INLINE long int +get_stat_ctime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_ctim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_ctim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's data modification time. */ +_GL_STAT_TIME_INLINE long int +get_stat_mtime_ns (struct stat const *st) +{ +# if defined STAT_TIMESPEC + return STAT_TIMESPEC (st, st_mtim).tv_nsec; +# elif defined STAT_TIMESPEC_NS + return STAT_TIMESPEC_NS (st, st_mtim); +# else + return 0; +# endif +} + +/* Return the nanosecond component of *ST's birth time. */ +_GL_STAT_TIME_INLINE long int +get_stat_birthtime_ns (struct stat const *st) +{ +# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC + return STAT_TIMESPEC (st, st_birthtim).tv_nsec; +# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + return STAT_TIMESPEC_NS (st, st_birthtim); +# else + /* Avoid a "parameter unused" warning. */ + (void) st; + return 0; +# endif +} + +/* Return *ST's access time. */ +_GL_STAT_TIME_INLINE struct timespec +get_stat_atime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_atim); +#else + struct timespec t; + t.tv_sec = st->st_atime; + t.tv_nsec = get_stat_atime_ns (st); + return t; +#endif +} + +/* Return *ST's status change time. */ +_GL_STAT_TIME_INLINE struct timespec +get_stat_ctime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_ctim); +#else + struct timespec t; + t.tv_sec = st->st_ctime; + t.tv_nsec = get_stat_ctime_ns (st); + return t; +#endif +} + +/* Return *ST's data modification time. */ +_GL_STAT_TIME_INLINE struct timespec +get_stat_mtime (struct stat const *st) +{ +#ifdef STAT_TIMESPEC + return STAT_TIMESPEC (st, st_mtim); +#else + struct timespec t; + t.tv_sec = st->st_mtime; + t.tv_nsec = get_stat_mtime_ns (st); + return t; +#endif +} + +/* Return *ST's birth time, if available; otherwise return a value + with tv_sec and tv_nsec both equal to -1. */ +_GL_STAT_TIME_INLINE struct timespec +get_stat_birthtime (struct stat const *st) +{ + struct timespec t; + +#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC) + t = STAT_TIMESPEC (st, st_birthtim); +#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC + t.tv_sec = st->st_birthtime; + t.tv_nsec = st->st_birthtimensec; +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* Native Windows platforms (but not Cygwin) put the "file creation + time" in st_ctime (!). See + . */ + t.tv_sec = st->st_ctime; + t.tv_nsec = 0; +#else + /* Birth time is not supported. */ + t.tv_sec = -1; + t.tv_nsec = -1; + /* Avoid a "parameter unused" warning. */ + (void) st; +#endif + +#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \ + || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) + /* FreeBSD and NetBSD sometimes signal the absence of knowledge by + using zero. Attempt to work around this problem. Alas, this can + report failure even for valid time stamps. Also, NetBSD + sometimes returns junk in the birth time fields; work around this + bug if it is detected. */ + if (! (t.tv_sec && 0 <= t.tv_nsec && t.tv_nsec < 1000000000)) + { + t.tv_sec = -1; + t.tv_nsec = -1; + } +#endif + + return t; +} + +_GL_INLINE_HEADER_END + +#endif diff --git a/gl/lib/stat.c b/gl/lib/stat.c new file mode 100644 index 0000000..35f4b0b --- /dev/null +++ b/gl/lib/stat.c @@ -0,0 +1,138 @@ +/* Work around platform bugs in stat. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Eric Blake */ + +/* If the user's config.h happens to include , let it include only + the system's here, so that orig_stat doesn't recurse to + rpl_stat. */ +#define __need_system_sys_stat_h +#include + +/* Get the original definition of stat. It might be defined as a macro. */ +#include +#include +#undef __need_system_sys_stat_h + +#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 +# elif REPLACE_FUNC_STAT_FILE +/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a. + Bypass it. */ +# define stat _stat +# define REPLACE_FUNC_STAT_DIR 1 +# undef REPLACE_FUNC_STAT_FILE +# endif +#endif + +static int +orig_stat (const char *filename, struct stat *buf) +{ + return stat (filename, buf); +} + +/* Specification. */ +/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc + eliminates this include because of the preliminary #include + above. */ +#include "sys/stat.h" + +#include +#include +#include +#include +#include "dosname.h" +#include "verify.h" + +#if REPLACE_FUNC_STAT_DIR +# include "pathmax.h" + /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also + have a constant PATH_MAX. */ +# ifndef PATH_MAX +# error "Please port this replacement to your platform" +# endif +#endif + +/* Store information about NAME into ST. Work around bugs with + trailing slashes. Mingw has other bugs (such as st_ino always + being 0 on success) which this wrapper does not work around. But + at least this implementation provides the ability to emulate fchdir + correctly. */ + +int +rpl_stat (char const *name, struct stat *st) +{ + int result = orig_stat (name, st); +#if REPLACE_FUNC_STAT_FILE + /* Solaris 9 mistakenly succeeds when given a non-directory with a + trailing slash. */ + if (result == 0 && !S_ISDIR (st->st_mode)) + { + size_t len = strlen (name); + if (ISSLASH (name[len - 1])) + { + errno = ENOTDIR; + return -1; + } + } +#endif /* REPLACE_FUNC_STAT_FILE */ +#if REPLACE_FUNC_STAT_DIR + + if (result == -1 && errno == ENOENT) + { + /* Due to mingw's oddities, there are some directories (like + c:\) where stat() only succeeds with a trailing slash, and + other directories (like c:\windows) where stat() only + succeeds without a trailing slash. But we want the two to be + synonymous, since chdir() manages either style. Likewise, Mingw also + reports ENOENT for names longer than PATH_MAX, when we want + ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR. + Fortunately, mingw PATH_MAX is small enough for stack + allocation. */ + char fixed_name[PATH_MAX + 1] = {0}; + size_t len = strlen (name); + bool check_dir = false; + verify (PATH_MAX <= 4096); + if (PATH_MAX <= len) + errno = ENAMETOOLONG; + else if (len) + { + strcpy (fixed_name, name); + if (ISSLASH (fixed_name[len - 1])) + { + check_dir = true; + while (len && ISSLASH (fixed_name[len - 1])) + fixed_name[--len] = '\0'; + if (!len) + fixed_name[0] = '/'; + } + else + fixed_name[len++] = '/'; + result = orig_stat (fixed_name, st); + if (result == 0 && check_dir && !S_ISDIR (st->st_mode)) + { + result = -1; + errno = ENOTDIR; + } + } + } +#endif /* REPLACE_FUNC_STAT_DIR */ + return result; +} diff --git a/gl/lib/statat.c b/gl/lib/statat.c new file mode 100644 index 0000000..8cdb17e --- /dev/null +++ b/gl/lib/statat.c @@ -0,0 +1,3 @@ +#include +#define STATAT_INLINE _GL_EXTERN_INLINE +#include "openat.h" diff --git a/gl/lib/stdalign.in.h b/gl/lib/stdalign.in.h new file mode 100644 index 0000000..dcaab55 --- /dev/null +++ b/gl/lib/stdalign.in.h @@ -0,0 +1,110 @@ +/* A substitute for ISO C11 . + + Copyright 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Paul Eggert and Bruno Haible. */ + +#ifndef _GL_STDALIGN_H +#define _GL_STDALIGN_H + +/* ISO C11 for platforms that lack it. + + References: + ISO C11 (latest free draft + ) + sections 6.5.3.4, 6.7.5, 7.15. + C++11 (latest free draft + ) + section 18.10. */ + +/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment + requirement of a structure member (i.e., slot or field) that is of + type TYPE, as an integer constant expression. + + This differs from GCC's __alignof__ operator, which can yield a + better-performing alignment for an object of that type. For + example, on x86 with GCC, __alignof__ (double) and __alignof__ + (long long) are 8, whereas alignof (double) and alignof (long long) + are 4 unless the option '-malign-double' is used. + + The result cannot be used as a value for an 'enum' constant, if you + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. + + Include for offsetof. */ +#include + +/* FreeBSD 9.1 , included by and lots of other + standard headers, defines conflicting implementations of _Alignas + and _Alignof that are no better than ours; override them. */ +#undef _Alignas +#undef _Alignof + +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +# ifdef __cplusplus +# if 201103 <= __cplusplus +# define _Alignof(type) alignof (type) +# else + template struct __alignof_helper { char __a; __t __b; }; +# define _Alignof(type) offsetof (__alignof_helper, __b) +# endif +# else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +# endif +#endif +#define alignof _Alignof +#define __alignof_is_defined 1 + +/* alignas (A), also known as _Alignas (A), aligns a variable or type + to the alignment A, where A is an integer constant expression. For + example: + + int alignas (8) foo; + struct s { int a; int alignas (8) bar; }; + + aligns the address of FOO and the offset of BAR to be multiples of 8. + + A should be a power of two that is at least the type's alignment + and at most the implementation's alignment limit. This limit is + 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable + to MSVC through at least version 10.0, A should be an integer + constant, as MSVC does not support expressions such as 1 << 3. + To be portable to Sun C 5.11, do not align auto variables to + anything stricter than their default alignment. + + The following C11 requirements are not supported here: + + - If A is zero, alignas has no effect. + - alignas can be used multiple times; the strictest one wins. + - alignas (TYPE) is equivalent to alignas (alignof (TYPE)). + + */ + +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +# if defined __cplusplus && 201103 <= __cplusplus +# define _Alignas(a) alignas (a) +# elif (__GNUC__ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ + || __ICC || 0x5110 <= __SUNPRO_C) +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +# elif 1300 <= _MSC_VER +# define _Alignas(a) __declspec (align (a)) +# endif +#endif +#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__) +# define alignas _Alignas +# define __alignas_is_defined 1 +#endif + +#endif /* _GL_STDALIGN_H */ diff --git a/gl/lib/stdarg.in.h b/gl/lib/stdarg.in.h new file mode 100644 index 0000000..5b37dd3 --- /dev/null +++ b/gl/lib/stdarg.in.h @@ -0,0 +1,35 @@ +/* Substitute for and wrapper around . + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _@GUARD_PREFIX@_STDARG_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_STDARG_H@ + +#ifndef _@GUARD_PREFIX@_STDARG_H +#define _@GUARD_PREFIX@_STDARG_H + +#ifndef va_copy +# define va_copy(a,b) ((a) = (b)) +#endif + +#endif /* _@GUARD_PREFIX@_STDARG_H */ +#endif /* _@GUARD_PREFIX@_STDARG_H */ diff --git a/gl/lib/stdbool.in.h b/gl/lib/stdbool.in.h new file mode 100644 index 0000000..651e8df --- /dev/null +++ b/gl/lib/stdbool.in.h @@ -0,0 +1,132 @@ +/* Copyright (C) 2001-2003, 2006-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2001. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _GL_STDBOOL_H +#define _GL_STDBOOL_H + +/* ISO C 99 for platforms that lack it. */ + +/* Usage suggestions: + + Programs that use should be aware of some limitations + and standards compliance issues. + + Standards compliance: + + - must be #included before 'bool', 'false', 'true' + can be used. + + - You cannot assume that sizeof (bool) == 1. + + - Programs should not undefine the macros bool, true, and false, + as C99 lists that as an "obsolescent feature". + + Limitations of this substitute, when used in a C89 environment: + + - must be #included before the '_Bool' type can be used. + + - You cannot assume that _Bool is a typedef; it might be a macro. + + - Bit-fields of type 'bool' are not supported. Portable code + should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. + + - In C99, casts and automatic conversions to '_Bool' or 'bool' are + performed in such a way that every nonzero value gets converted + to 'true', and zero gets converted to 'false'. This doesn't work + with this substitute. With this substitute, only the values 0 and 1 + give the expected result when converted to _Bool' or 'bool'. + + - C99 allows the use of (_Bool)0.0 in constant expressions, but + this substitute cannot always provide this property. + + Also, it is suggested that programs use 'bool' rather than '_Bool'; + this isn't required, but 'bool' is more common. */ + + +/* 7.16. Boolean type and values */ + +/* BeOS already #defines false 0, true 1. We use the same + definitions below, but temporarily we have to #undef them. */ +#if defined __BEOS__ && !defined __HAIKU__ +# include /* defines bool but not _Bool */ +# undef false +# undef true +#endif + +#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@ +typedef bool _Bool; +# 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 + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html + Similar bugs are likely with other compilers as well; this file + wouldn't be used if was working. + So we override the _Bool type. + If !@HAVE__BOOL@: + Need to define _Bool ourselves. As 'signed char' or as an enum type? + Use of a typedef, with SunPRO C, leads to a stupid + "warning: _Bool is a keyword in ISO C99". + Use of an enum type, with IRIX cc, leads to a stupid + "warning(1185): enumerated type mixed with another type". + Even the existence of an enum type, without a typedef, + "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 + /* With this compiler, trust the _Bool type if the compiler has it. */ +# 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 + +/* The other macros must be usable in preprocessor directives. */ +#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/lib/stddef.in.h b/gl/lib/stddef.in.h new file mode 100644 index 0000000..f5c0e05 --- /dev/null +++ b/gl/lib/stddef.in.h @@ -0,0 +1,86 @@ +/* A substitute for POSIX 2008 , for platforms that have issues. + + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Eric Blake. */ + +/* + * POSIX 2008 for platforms that have issues. + * + */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined __need_wchar_t || defined __need_size_t \ + || defined __need_ptrdiff_t || defined __need_NULL \ + || defined __need_wint_t +/* Special invocation convention inside gcc header files. In + particular, gcc provides a version of that blindly + redefines NULL even when __need_wint_t was defined, even though + wint_t is not normally provided by . Hence, we must + remember if special invocation has ever been used to obtain wint_t, + in which case we need to clean up NULL yet again. */ + +# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) +# ifdef __need_wint_t +# undef _@GUARD_PREFIX@_STDDEF_H +# define _GL_STDDEF_WINT_T +# endif +# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ +# endif + +#else +/* Normal invocation convention. */ + +# ifndef _@GUARD_PREFIX@_STDDEF_H + +/* The include_next requires a split double-inclusion guard. */ + +# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ + +# ifndef _@GUARD_PREFIX@_STDDEF_H +# define _@GUARD_PREFIX@_STDDEF_H + +/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ +#if @REPLACE_NULL@ +# undef NULL +# ifdef __cplusplus + /* ISO C++ says that the macro NULL must expand to an integer constant + expression, hence '((void *) 0)' is not allowed in C++. */ +# if __GNUG__ >= 3 + /* GNU C++ has a __null macro that behaves like an integer ('int' or + 'long') but has the same size as a pointer. Use that, to avoid + warnings. */ +# define NULL __null +# else +# define NULL 0L +# endif +# else +# define NULL ((void *) 0) +# endif +#endif + +/* Some platforms lack wchar_t. */ +#if !@HAVE_WCHAR_T@ +# define wchar_t int +#endif + +# endif /* _@GUARD_PREFIX@_STDDEF_H */ +# endif /* _@GUARD_PREFIX@_STDDEF_H */ +#endif /* __need_XXX */ diff --git a/gl/lib/stdint.in.h b/gl/lib/stdint.in.h new file mode 100644 index 0000000..247f0d8 --- /dev/null +++ b/gl/lib/stdint.in.h @@ -0,0 +1,635 @@ +/* Copyright (C) 2001-2002, 2004-2014 Free Software Foundation, Inc. + Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. + This file is part of gnulib. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* + * ISO C 99 for platforms that lack it. + * + */ + +#ifndef _@GUARD_PREFIX@_STDINT_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* When including a system file that in turn includes , + use the system , not our substitute. This avoids + problems with (for example) VMS, whose includes + . */ +#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H + +/* On Android (Bionic libc), includes this file before + having defined 'time_t'. Therefore in this case avoid including + other system header files; just include the system's . + Ideally we should test __BIONIC__ here, but it is only defined after + has been included; hence test __ANDROID__ instead. */ +#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H +# @INCLUDE_NEXT@ @NEXT_STDINT_H@ +#else + +/* Get those types that are already defined in other system include + files, so that we can "#define int8_t signed char" below without + worrying about a later system include file containing a "typedef + signed char int8_t;" that will get messed up by our macro. Our + macros should all be consistent with the system versions, except + for the "fast" types and macros, which we recommend against using + in public interfaces due to compiler differences. */ + +#if @HAVE_STDINT_H@ +# if defined __sgi && ! defined __c99 + /* Bypass IRIX's if in C89 mode, since it merely annoys users + with "This header file is to be used only for c99 mode compilations" + diagnostics. */ +# define __STDINT_H__ +# endif + + /* Some pre-C++11 implementations need this. */ +# ifdef __cplusplus +# ifndef __STDC_CONSTANT_MACROS +# define __STDC_CONSTANT_MACROS 1 +# endif +# ifndef __STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS 1 +# endif +# endif + + /* Other systems may have an incomplete or buggy . + Include it before , since any "#include " + in would reinclude us, skipping our contents because + _@GUARD_PREFIX@_STDINT_H is defined. + The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_STDINT_H@ +#endif + +#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H +#define _@GUARD_PREFIX@_STDINT_H + +/* defines some of the stdint.h types as well, on glibc, + IRIX 6.5, and OpenBSD 3.8 (via ). + AIX 5.2 isn't needed and causes troubles. + Mac OS X 10.4.6 includes (which is us), but + relies on the system definitions, so include + after @NEXT_STDINT_H@. */ +#if @HAVE_SYS_TYPES_H@ && ! defined _AIX +# include +#endif + +/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, + LONG_MIN, LONG_MAX, ULONG_MAX. */ +#include + +#if @HAVE_INTTYPES_H@ + /* In OpenBSD 3.8, includes , which defines + int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. + also defines intptr_t and uintptr_t. */ +# include +#elif @HAVE_SYS_INTTYPES_H@ + /* Solaris 7 has the types except the *_fast*_t types, and + the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ +# include +#endif + +#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ + /* Linux libc4 >= 4.6.7 and libc5 have a that defines + int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is + included by . */ +# include +#endif + +#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H + +/* Minimum and maximum values for an integer type under the usual assumption. + Return an unspecified value if BITS == 0, adding a check to pacify + picky compilers. */ + +#define _STDINT_MIN(signed, bits, zero) \ + ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) + +#define _STDINT_MAX(signed, bits, zero) \ + ((signed) \ + ? ~ _STDINT_MIN (signed, bits, zero) \ + : /* The expression for the unsigned case. The subtraction of (signed) \ + is a nop in the unsigned case and avoids "signed integer overflow" \ + warnings in the signed case. */ \ + ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) + +#if !GNULIB_defined_stdint_types + +/* 7.18.1.1. Exact-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. */ + +#undef int8_t +#undef uint8_t +typedef signed char gl_int8_t; +typedef unsigned char gl_uint8_t; +#define int8_t gl_int8_t +#define uint8_t gl_uint8_t + +#undef int16_t +#undef uint16_t +typedef short int gl_int16_t; +typedef unsigned short int gl_uint16_t; +#define int16_t gl_int16_t +#define uint16_t gl_uint16_t + +#undef int32_t +#undef uint32_t +typedef int gl_int32_t; +typedef unsigned int gl_uint32_t; +#define int32_t gl_int32_t +#define uint32_t gl_uint32_t + +/* If the system defines INT64_MAX, assume int64_t works. That way, + if the underlying platform defines int64_t to be a 64-bit long long + int, the code below won't mistakenly define it to be a 64-bit long + int, which would mess up C++ name mangling. We must use #ifdef + rather than #if, to avoid an error with HP-UX 10.20 cc. */ + +#ifdef INT64_MAX +# define GL_INT64_T +#else +/* Do not undefine int64_t if gnulib is not being used with 64-bit + types, since otherwise it breaks platforms like Tandem/NSK. */ +# if LONG_MAX >> 31 >> 31 == 1 +# undef int64_t +typedef long int gl_int64_t; +# define int64_t gl_int64_t +# define GL_INT64_T +# elif defined _MSC_VER +# undef int64_t +typedef __int64 gl_int64_t; +# define int64_t gl_int64_t +# define GL_INT64_T +# elif @HAVE_LONG_LONG_INT@ +# undef int64_t +typedef long long int gl_int64_t; +# define int64_t gl_int64_t +# define GL_INT64_T +# endif +#endif + +#ifdef UINT64_MAX +# define GL_UINT64_T +#else +# if ULONG_MAX >> 31 >> 31 >> 1 == 1 +# undef uint64_t +typedef unsigned long int gl_uint64_t; +# define uint64_t gl_uint64_t +# define GL_UINT64_T +# elif defined _MSC_VER +# undef uint64_t +typedef unsigned __int64 gl_uint64_t; +# define uint64_t gl_uint64_t +# define GL_UINT64_T +# elif @HAVE_UNSIGNED_LONG_LONG_INT@ +# undef uint64_t +typedef unsigned long long int gl_uint64_t; +# define uint64_t gl_uint64_t +# define GL_UINT64_T +# endif +#endif + +/* Avoid collision with Solaris 2.5.1 etc. */ +#define _UINT8_T +#define _UINT32_T +#define _UINT64_T + + +/* 7.18.1.2. Minimum-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types + are the same as the corresponding N_t types. */ + +#undef int_least8_t +#undef uint_least8_t +#undef int_least16_t +#undef uint_least16_t +#undef int_least32_t +#undef uint_least32_t +#undef int_least64_t +#undef uint_least64_t +#define int_least8_t int8_t +#define uint_least8_t uint8_t +#define int_least16_t int16_t +#define uint_least16_t uint16_t +#define int_least32_t int32_t +#define uint_least32_t uint32_t +#ifdef GL_INT64_T +# define int_least64_t int64_t +#endif +#ifdef GL_UINT64_T +# define uint_least64_t uint64_t +#endif + +/* 7.18.1.3. Fastest minimum-width integer types */ + +/* Note: Other substitutes may define these types differently. + It is not recommended to use these types in public header files. */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types + are taken from the same list of types. The following code normally + uses types consistent with glibc, as that lessens the chance of + incompatibility with older GNU hosts. */ + +#undef int_fast8_t +#undef uint_fast8_t +#undef int_fast16_t +#undef uint_fast16_t +#undef int_fast32_t +#undef uint_fast32_t +#undef int_fast64_t +#undef uint_fast64_t +typedef signed char gl_int_fast8_t; +typedef unsigned char gl_uint_fast8_t; + +#ifdef __sun +/* Define types compatible with SunOS 5.10, so that code compiled under + earlier SunOS versions works with code compiled under SunOS 5.10. */ +typedef int gl_int_fast32_t; +typedef unsigned int gl_uint_fast32_t; +#else +typedef long int gl_int_fast32_t; +typedef unsigned long int gl_uint_fast32_t; +#endif +typedef gl_int_fast32_t gl_int_fast16_t; +typedef gl_uint_fast32_t gl_uint_fast16_t; + +#define int_fast8_t gl_int_fast8_t +#define uint_fast8_t gl_uint_fast8_t +#define int_fast16_t gl_int_fast16_t +#define uint_fast16_t gl_uint_fast16_t +#define int_fast32_t gl_int_fast32_t +#define uint_fast32_t gl_uint_fast32_t +#ifdef GL_INT64_T +# define int_fast64_t int64_t +#endif +#ifdef GL_UINT64_T +# define uint_fast64_t uint64_t +#endif + +/* 7.18.1.4. Integer types capable of holding object pointers */ + +#undef intptr_t +#undef uintptr_t +typedef long int gl_intptr_t; +typedef unsigned long int gl_uintptr_t; +#define intptr_t gl_intptr_t +#define uintptr_t gl_uintptr_t + +/* 7.18.1.5. Greatest-width integer types */ + +/* Note: These types are compiler dependent. It may be unwise to use them in + public header files. */ + +/* If the system defines INTMAX_MAX, assume that intmax_t works, and + similarly for UINTMAX_MAX and uintmax_t. This avoids problems with + assuming one type where another is used by the system. */ + +#ifndef INTMAX_MAX +# undef INTMAX_C +# undef intmax_t +# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +typedef long long int gl_intmax_t; +# define intmax_t gl_intmax_t +# elif defined GL_INT64_T +# define intmax_t int64_t +# else +typedef long int gl_intmax_t; +# define intmax_t gl_intmax_t +# endif +#endif + +#ifndef UINTMAX_MAX +# undef UINTMAX_C +# undef uintmax_t +# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +typedef unsigned long long int gl_uintmax_t; +# define uintmax_t gl_uintmax_t +# elif defined GL_UINT64_T +# define uintmax_t uint64_t +# else +typedef unsigned long int gl_uintmax_t; +# define uintmax_t gl_uintmax_t +# endif +#endif + +/* Verify that intmax_t and uintmax_t have the same size. Too much code + breaks if this is not the case. If this check fails, the reason is likely + to be found in the autoconf macros. */ +typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) + ? 1 : -1]; + +#define GNULIB_defined_stdint_types 1 +#endif /* !GNULIB_defined_stdint_types */ + +/* 7.18.2. Limits of specified-width integer types */ + +/* 7.18.2.1. Limits of exact-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. */ + +#undef INT8_MIN +#undef INT8_MAX +#undef UINT8_MAX +#define INT8_MIN (~ INT8_MAX) +#define INT8_MAX 127 +#define UINT8_MAX 255 + +#undef INT16_MIN +#undef INT16_MAX +#undef UINT16_MAX +#define INT16_MIN (~ INT16_MAX) +#define INT16_MAX 32767 +#define UINT16_MAX 65535 + +#undef INT32_MIN +#undef INT32_MAX +#undef UINT32_MAX +#define INT32_MIN (~ INT32_MAX) +#define INT32_MAX 2147483647 +#define UINT32_MAX 4294967295U + +#if defined GL_INT64_T && ! defined INT64_MAX +/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 + evaluates the latter incorrectly in preprocessor expressions. */ +# define INT64_MIN (- INTMAX_C (1) << 63) +# define INT64_MAX INTMAX_C (9223372036854775807) +#endif + +#if defined GL_UINT64_T && ! defined UINT64_MAX +# define UINT64_MAX UINTMAX_C (18446744073709551615) +#endif + +/* 7.18.2.2. Limits of minimum-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types + are the same as the corresponding N_t types. */ + +#undef INT_LEAST8_MIN +#undef INT_LEAST8_MAX +#undef UINT_LEAST8_MAX +#define INT_LEAST8_MIN INT8_MIN +#define INT_LEAST8_MAX INT8_MAX +#define UINT_LEAST8_MAX UINT8_MAX + +#undef INT_LEAST16_MIN +#undef INT_LEAST16_MAX +#undef UINT_LEAST16_MAX +#define INT_LEAST16_MIN INT16_MIN +#define INT_LEAST16_MAX INT16_MAX +#define UINT_LEAST16_MAX UINT16_MAX + +#undef INT_LEAST32_MIN +#undef INT_LEAST32_MAX +#undef UINT_LEAST32_MAX +#define INT_LEAST32_MIN INT32_MIN +#define INT_LEAST32_MAX INT32_MAX +#define UINT_LEAST32_MAX UINT32_MAX + +#undef INT_LEAST64_MIN +#undef INT_LEAST64_MAX +#ifdef GL_INT64_T +# define INT_LEAST64_MIN INT64_MIN +# define INT_LEAST64_MAX INT64_MAX +#endif + +#undef UINT_LEAST64_MAX +#ifdef GL_UINT64_T +# define UINT_LEAST64_MAX UINT64_MAX +#endif + +/* 7.18.2.3. Limits of fastest minimum-width integer types */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types + are taken from the same list of types. */ + +#undef INT_FAST8_MIN +#undef INT_FAST8_MAX +#undef UINT_FAST8_MAX +#define INT_FAST8_MIN SCHAR_MIN +#define INT_FAST8_MAX SCHAR_MAX +#define UINT_FAST8_MAX UCHAR_MAX + +#undef INT_FAST16_MIN +#undef INT_FAST16_MAX +#undef UINT_FAST16_MAX +#define INT_FAST16_MIN INT_FAST32_MIN +#define INT_FAST16_MAX INT_FAST32_MAX +#define UINT_FAST16_MAX UINT_FAST32_MAX + +#undef INT_FAST32_MIN +#undef INT_FAST32_MAX +#undef UINT_FAST32_MAX +#ifdef __sun +# define INT_FAST32_MIN INT_MIN +# define INT_FAST32_MAX INT_MAX +# define UINT_FAST32_MAX UINT_MAX +#else +# define INT_FAST32_MIN LONG_MIN +# define INT_FAST32_MAX LONG_MAX +# define UINT_FAST32_MAX ULONG_MAX +#endif + +#undef INT_FAST64_MIN +#undef INT_FAST64_MAX +#ifdef GL_INT64_T +# define INT_FAST64_MIN INT64_MIN +# define INT_FAST64_MAX INT64_MAX +#endif + +#undef UINT_FAST64_MAX +#ifdef GL_UINT64_T +# define UINT_FAST64_MAX UINT64_MAX +#endif + +/* 7.18.2.4. Limits of integer types capable of holding object pointers */ + +#undef INTPTR_MIN +#undef INTPTR_MAX +#undef UINTPTR_MAX +#define INTPTR_MIN LONG_MIN +#define INTPTR_MAX LONG_MAX +#define UINTPTR_MAX ULONG_MAX + +/* 7.18.2.5. Limits of greatest-width integer types */ + +#ifndef INTMAX_MAX +# undef INTMAX_MIN +# ifdef INT64_MAX +# define INTMAX_MIN INT64_MIN +# define INTMAX_MAX INT64_MAX +# else +# define INTMAX_MIN INT32_MIN +# define INTMAX_MAX INT32_MAX +# endif +#endif + +#ifndef UINTMAX_MAX +# ifdef UINT64_MAX +# define UINTMAX_MAX UINT64_MAX +# else +# define UINTMAX_MAX UINT32_MAX +# endif +#endif + +/* 7.18.3. Limits of other integer types */ + +/* ptrdiff_t limits */ +#undef PTRDIFF_MIN +#undef PTRDIFF_MAX +#if @APPLE_UNIVERSAL_BUILD@ +# ifdef _LP64 +# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) +# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) +# else +# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) +# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) +# endif +#else +# define PTRDIFF_MIN \ + _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) +# define PTRDIFF_MAX \ + _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) +#endif + +/* sig_atomic_t limits */ +#undef SIG_ATOMIC_MIN +#undef SIG_ATOMIC_MAX +#define SIG_ATOMIC_MIN \ + _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ + 0@SIG_ATOMIC_T_SUFFIX@) +#define SIG_ATOMIC_MAX \ + _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ + 0@SIG_ATOMIC_T_SUFFIX@) + + +/* size_t limit */ +#undef SIZE_MAX +#if @APPLE_UNIVERSAL_BUILD@ +# ifdef _LP64 +# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) +# else +# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) +# endif +#else +# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) +#endif + +/* wchar_t limits */ +/* Get WCHAR_MIN, WCHAR_MAX. + This include is not on the top, above, because on OSF/1 4.0 we have a + sequence of nested includes + -> -> -> , and the latter includes + and assumes its types are already defined. */ +#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ +# include +# include +# include +# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H +# include +# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H +#endif +#undef WCHAR_MIN +#undef WCHAR_MAX +#define WCHAR_MIN \ + _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) +#define WCHAR_MAX \ + _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) + +/* wint_t limits */ +#undef WINT_MIN +#undef WINT_MAX +#define WINT_MIN \ + _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +#define WINT_MAX \ + _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) + +/* 7.18.4. Macros for integer constants */ + +/* 7.18.4.1. Macros for minimum-width integer constants */ +/* According to ISO C 99 Technical Corrigendum 1 */ + +/* Here we assume a standard architecture where the hardware integer + types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ + +#undef INT8_C +#undef UINT8_C +#define INT8_C(x) x +#define UINT8_C(x) x + +#undef INT16_C +#undef UINT16_C +#define INT16_C(x) x +#define UINT16_C(x) x + +#undef INT32_C +#undef UINT32_C +#define INT32_C(x) x +#define UINT32_C(x) x ## U + +#undef INT64_C +#undef UINT64_C +#if LONG_MAX >> 31 >> 31 == 1 +# define INT64_C(x) x##L +#elif defined _MSC_VER +# define INT64_C(x) x##i64 +#elif @HAVE_LONG_LONG_INT@ +# define INT64_C(x) x##LL +#endif +#if ULONG_MAX >> 31 >> 31 >> 1 == 1 +# define UINT64_C(x) x##UL +#elif defined _MSC_VER +# define UINT64_C(x) x##ui64 +#elif @HAVE_UNSIGNED_LONG_LONG_INT@ +# define UINT64_C(x) x##ULL +#endif + +/* 7.18.4.2. Macros for greatest-width integer constants */ + +#ifndef INTMAX_C +# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# define INTMAX_C(x) x##LL +# elif defined GL_INT64_T +# define INTMAX_C(x) INT64_C(x) +# else +# define INTMAX_C(x) x##L +# endif +#endif + +#ifndef UINTMAX_C +# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# define UINTMAX_C(x) x##ULL +# elif defined GL_UINT64_T +# define UINTMAX_C(x) UINT64_C(x) +# else +# define UINTMAX_C(x) x##UL +# endif +#endif + +#endif /* _@GUARD_PREFIX@_STDINT_H */ +#endif /* !(defined __ANDROID__ && ...) */ +#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gl/lib/stdio--.h b/gl/lib/stdio--.h new file mode 100644 index 0000000..83ddf5a --- /dev/null +++ b/gl/lib/stdio--.h @@ -0,0 +1,41 @@ +/* Like stdio.h, but redefine some names to avoid glitches. + + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include +#include "stdio-safer.h" + +#if GNULIB_FOPEN_SAFER +# undef fopen +# define fopen fopen_safer +#endif + +#if GNULIB_FREOPEN_SAFER +# undef freopen +# define freopen freopen_safer +#endif + +#if GNULIB_TMPFILE_SAFER +# undef tmpfile +# define tmpfile tmpfile_safer +#endif + +#if GNULIB_POPEN_SAFER +# undef popen +# define popen popen_safer +#endif diff --git a/gl/lib/stdio-impl.h b/gl/lib/stdio-impl.h new file mode 100644 index 0000000..299fe47 --- /dev/null +++ b/gl/lib/stdio-impl.h @@ -0,0 +1,112 @@ +/* Implementation details of FILE streams. + Copyright (C) 2007-2008, 2010-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Many stdio implementations have the same logic and therefore can share + the same implementation of stdio extension API, except that some fields + have different naming conventions, or their access requires some casts. */ + + +/* BSD stdio derived implementations. */ + +#if defined __NetBSD__ /* NetBSD */ +/* Get __NetBSD_Version__. */ +# include +#endif + +#include /* For detecting Plan9. */ + +#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */ + +# if defined __DragonFly__ /* DragonFly */ + /* See . */ +# define fp_ ((struct { struct __FILE_public pub; \ + struct { unsigned char *_base; int _size; } _bf; \ + void *cookie; \ + void *_close; \ + void *_read; \ + void *_seek; \ + void *_write; \ + struct { unsigned char *_base; int _size; } _ub; \ + int _ur; \ + unsigned char _ubuf[3]; \ + unsigned char _nbuf[1]; \ + struct { unsigned char *_base; int _size; } _lb; \ + int _blksize; \ + fpos_t _offset; \ + /* More fields, not relevant here. */ \ + } *) fp) + /* See . */ +# define _p pub._p +# define _flags pub._flags +# define _r pub._r +# define _w pub._w +# else +# define fp_ fp +# endif + +# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */ + /* See + and */ + struct __sfileext + { + struct __sbuf _ub; /* ungetc buffer */ + /* More fields, not relevant here. */ + }; +# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub +# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */ +# define fp_ub fp_->_ub +# endif + +# define HASUB(fp) (fp_ub._base != NULL) + +#endif + + +/* SystemV derived implementations. */ + +#ifdef __TANDEM /* NonStop Kernel */ +# ifndef _IOERR +/* These values were determined by the program 'stdioext-flags' at + . */ +# define _IOERR 0x40 +# define _IOREAD 0x80 +# define _IOWRT 0x4 +# define _IORW 0x100 +# endif +#endif + +#if defined _IOERR + +# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */ +# define fp_ ((struct { unsigned char *_ptr; \ + unsigned char *_base; \ + unsigned char *_end; \ + long _cnt; \ + int _file; \ + unsigned int _flag; \ + } *) fp) +# else +# define fp_ fp +# endif + +# if defined _SCO_DS /* OpenServer */ +# define _cnt __cnt +# define _ptr __ptr +# define _base __base +# define _flag __flag +# endif + +#endif diff --git a/gl/lib/stdio-safer.h b/gl/lib/stdio-safer.h new file mode 100644 index 0000000..96c861f --- /dev/null +++ b/gl/lib/stdio-safer.h @@ -0,0 +1,36 @@ +/* Invoke stdio functions, but avoid some glitches. + + Copyright (C) 2001, 2003, 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include + +#if GNULIB_FOPEN_SAFER +FILE *fopen_safer (char const *, char const *); +#endif + +#if GNULIB_FREOPEN_SAFER +FILE *freopen_safer (char const *, char const *, FILE *); +#endif + +#if GNULIB_POPEN_SAFER +FILE *popen_safer (char const *, char const *); +#endif + +#if GNULIB_TMPFILE_SAFER +FILE *tmpfile_safer (void); +#endif diff --git a/gl/lib/stdio.in.h b/gl/lib/stdio.in.h new file mode 100644 index 0000000..1e1fe84 --- /dev/null +++ b/gl/lib/stdio.in.h @@ -0,0 +1,1353 @@ +/* A GNU-like . + + Copyright (C) 2004, 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H +/* Special invocation convention: + - Inside glibc header files. + - On OSF/1 5.1 we have a sequence of nested includes + -> -> -> -> + -> -> -> . + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ + +#@INCLUDE_NEXT@ @NEXT_STDIO_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_STDIO_H + +#define _GL_ALREADY_INCLUDING_STDIO_H + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_STDIO_H@ + +#undef _GL_ALREADY_INCLUDING_STDIO_H + +#ifndef _@GUARD_PREFIX@_STDIO_H +#define _@GUARD_PREFIX@_STDIO_H + +/* Get va_list. Needed on many systems, including glibc 2.8. */ +#include + +#include + +/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 + and eglibc 2.11.2. + May also define off_t to a 64-bit type on native Windows. */ +#include + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The __-protected variants of the attributes 'format' and 'printf' are + accepted by gcc versions 2.6.4 (effectively 2.7) and later. + We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because + gnulib and libintl do '#define printf __printf__' when they override + the 'printf' function. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +#else +# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ +#endif + +/* _GL_ATTRIBUTE_FORMAT_PRINTF + indicates to GCC that the function takes a format string and arguments, + where the format string directives are the ones standardized by ISO C99 + and POSIX. */ +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) +# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) +#else +# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +#endif + +/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, + except that it indicates to GCC that the supported format string directives + are the ones of the system printf(), rather than the ones standardized by + ISO C99 and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) + +/* _GL_ATTRIBUTE_FORMAT_SCANF + indicates to GCC that the function takes a format string and arguments, + where the format string directives are the ones standardized by ISO C99 + and POSIX. */ +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) +# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) +#else +# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) +#endif + +/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, + except that it indicates to GCC that the supported format string directives + are the ones of the system scanf(), rather than the ones standardized by + ISO C99 and POSIX. */ +#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) + +/* Solaris 10 declares renameat in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ + && ! defined __GLIBC__ +# include +#endif + + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* Macros for stringification. */ +#define _GL_STDIO_STRINGIZE(token) #token +#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) + +/* When also using extern inline, suppress the use of static inline in + standard headers of problematic Apple configurations, as Libc at + least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., + . + Perhaps Apple will fix this some day. */ +#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ + && defined __GNUC__ && defined __STDC__) +# undef putc_unlocked +#endif + +#if @GNULIB_DPRINTF@ +# if @REPLACE_DPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dprintf rpl_dprintf +# endif +_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); +# else +# if !@HAVE_DPRINTF@ +_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); +# endif +_GL_CXXALIASWARN (dprintf); +#elif defined GNULIB_POSIXCHECK +# undef dprintf +# if HAVE_RAW_DECL_DPRINTF +_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " + "use gnulib module dprintf for portability"); +# endif +#endif + +#if @GNULIB_FCLOSE@ +/* Close STREAM and its underlying file descriptor. */ +# if @REPLACE_FCLOSE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define fclose rpl_fclose +# endif +_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); +# else +_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); +# endif +_GL_CXXALIASWARN (fclose); +#elif defined GNULIB_POSIXCHECK +# undef fclose +/* Assume fclose is always declared. */ +_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " + "use gnulib module fclose for portable POSIX compliance"); +#endif + +#if @GNULIB_FDOPEN@ +# if @REPLACE_FDOPEN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fdopen +# define fdopen rpl_fdopen +# endif +_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); +# else +_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); +# endif +_GL_CXXALIASWARN (fdopen); +#elif defined GNULIB_POSIXCHECK +# undef fdopen +/* Assume fdopen is always declared. */ +_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " + "use gnulib module fdopen for portability"); +#endif + +#if @GNULIB_FFLUSH@ +/* Flush all pending data on STREAM according to POSIX rules. Both + output and seekable input streams are supported. + Note! LOSS OF DATA can occur if fflush is applied on an input stream + that is _not_seekable_ or on an update stream that is _not_seekable_ + and in which the most recent operation was input. Seekability can + be tested with lseek(fileno(fp),0,SEEK_CUR). */ +# if @REPLACE_FFLUSH@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define fflush rpl_fflush +# endif +_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); +_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); +# else +_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); +# endif +_GL_CXXALIASWARN (fflush); +#elif defined GNULIB_POSIXCHECK +# undef fflush +/* Assume fflush is always declared. */ +_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " + "use gnulib module fflush for portable POSIX compliance"); +#endif + +#if @GNULIB_FGETC@ +# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fgetc +# define fgetc rpl_fgetc +# endif +_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); +# else +_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); +# endif +_GL_CXXALIASWARN (fgetc); +#endif + +#if @GNULIB_FGETS@ +# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fgets +# define fgets rpl_fgets +# endif +_GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream) + _GL_ARG_NONNULL ((1, 3))); +_GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream)); +# else +_GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream)); +# endif +_GL_CXXALIASWARN (fgets); +#endif + +#if @GNULIB_FOPEN@ +# if @REPLACE_FOPEN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fopen +# define fopen rpl_fopen +# endif +_GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); +# else +_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); +# endif +_GL_CXXALIASWARN (fopen); +#elif defined GNULIB_POSIXCHECK +# undef fopen +/* Assume fopen is always declared. */ +_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " + "use gnulib module fopen for portability"); +#endif + +#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ +# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ + || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define fprintf rpl_fprintf +# endif +# define GNULIB_overrides_fprintf 1 +# if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ +_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +# else +_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); +# else +_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); +# endif +_GL_CXXALIASWARN (fprintf); +#endif +#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK +# if !GNULIB_overrides_fprintf +# undef fprintf +# endif +/* Assume fprintf is always declared. */ +_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " + "use gnulib module fprintf-posix for portable " + "POSIX compliance"); +#endif + +#if @GNULIB_FPURGE@ +/* Discard all pending buffered I/O data on STREAM. + STREAM must not be wide-character oriented. + When discarding pending output, the file position is set back to where it + was before the write calls. When discarding pending input, the file + position is advanced to match the end of the previously read input. + Return 0 if successful. Upon error, return -1 and set errno. */ +# if @REPLACE_FPURGE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define fpurge rpl_fpurge +# endif +_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); +# else +# if !@HAVE_DECL_FPURGE@ +_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); +# endif +_GL_CXXALIASWARN (fpurge); +#elif defined GNULIB_POSIXCHECK +# undef fpurge +# if HAVE_RAW_DECL_FPURGE +_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " + "use gnulib module fpurge for portability"); +# endif +#endif + +#if @GNULIB_FPUTC@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fputc +# define fputc rpl_fputc +# endif +_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); +# else +_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); +# endif +_GL_CXXALIASWARN (fputc); +#endif + +#if @GNULIB_FPUTS@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fputs +# define fputs rpl_fputs +# endif +_GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); +# else +_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); +# endif +_GL_CXXALIASWARN (fputs); +#endif + +#if @GNULIB_FREAD@ +# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fread +# define fread rpl_fread +# endif +_GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream) + _GL_ARG_NONNULL ((4))); +_GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); +# else +_GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); +# endif +_GL_CXXALIASWARN (fread); +#endif + +#if @GNULIB_FREOPEN@ +# if @REPLACE_FREOPEN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef freopen +# define freopen rpl_freopen +# endif +_GL_FUNCDECL_RPL (freopen, FILE *, + (const char *filename, const char *mode, FILE *stream) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (freopen, FILE *, + (const char *filename, const char *mode, FILE *stream)); +# else +_GL_CXXALIAS_SYS (freopen, FILE *, + (const char *filename, const char *mode, FILE *stream)); +# endif +_GL_CXXALIASWARN (freopen); +#elif defined GNULIB_POSIXCHECK +# undef freopen +/* Assume freopen is always declared. */ +_GL_WARN_ON_USE (freopen, + "freopen on native Windows platforms is not POSIX compliant - " + "use gnulib module freopen for portability"); +#endif + +#if @GNULIB_FSCANF@ +# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fscanf +# define fscanf rpl_fscanf +# endif +_GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...)); +# else +_GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...)); +# endif +_GL_CXXALIASWARN (fscanf); +#endif + + +/* Set up the following warnings, based on which modules are in use. + GNU Coding Standards discourage the use of fseek, since it imposes + an arbitrary limitation on some 32-bit hosts. Remember that the + fseek module depends on the fseeko module, so we only have three + cases to consider: + + 1. The developer is not using either module. Issue a warning under + GNULIB_POSIXCHECK for both functions, to remind them that both + functions have bugs on some systems. _GL_NO_LARGE_FILES has no + impact on this warning. + + 2. The developer is using both modules. They may be unaware of the + arbitrary limitations of fseek, so issue a warning under + GNULIB_POSIXCHECK. On the other hand, they may be using both + modules intentionally, so the developer can define + _GL_NO_LARGE_FILES in the compilation units where the use of fseek + is safe, to silence the warning. + + 3. The developer is using the fseeko module, but not fseek. Gnulib + guarantees that fseek will still work around platform bugs in that + case, but we presume that the developer is aware of the pitfalls of + fseek and was trying to avoid it, so issue a warning even when + GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be + defined to silence the warning in particular compilation units. + In C++ compilations with GNULIB_NAMESPACE, in order to avoid that + fseek gets defined as a macro, it is recommended that the developer + uses the fseek module, even if he is not calling the fseek function. + + Most gnulib clients that perform stream operations should fall into + category 3. */ + +#if @GNULIB_FSEEK@ +# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES +# define _GL_FSEEK_WARN /* Category 2, above. */ +# undef fseek +# endif +# if @REPLACE_FSEEK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fseek +# define fseek rpl_fseek +# endif +_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); +# else +_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); +# endif +_GL_CXXALIASWARN (fseek); +#endif + +#if @GNULIB_FSEEKO@ +# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES +# define _GL_FSEEK_WARN /* Category 3, above. */ +# undef fseek +# endif +# if @REPLACE_FSEEKO@ +/* Provide an fseeko function that is aware of a preceding fflush(), and which + detects pipes. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fseeko +# define fseeko rpl_fseeko +# endif +_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); +# else +# if ! @HAVE_DECL_FSEEKO@ +_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (fseeko); +#elif defined GNULIB_POSIXCHECK +# define _GL_FSEEK_WARN /* Category 1, above. */ +# undef fseek +# undef fseeko +# if HAVE_RAW_DECL_FSEEKO +_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " + "use gnulib module fseeko for portability"); +# endif +#endif + +#ifdef _GL_FSEEK_WARN +# undef _GL_FSEEK_WARN +/* Here, either fseek is undefined (but C89 guarantees that it is + declared), or it is defined as rpl_fseek (declared above). */ +_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " + "on 32-bit platforms - " + "use fseeko function for handling of large files"); +#endif + + +/* ftell, ftello. See the comments on fseek/fseeko. */ + +#if @GNULIB_FTELL@ +# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES +# define _GL_FTELL_WARN /* Category 2, above. */ +# undef ftell +# endif +# if @REPLACE_FTELL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ftell +# define ftell rpl_ftell +# endif +_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); +# else +_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); +# endif +_GL_CXXALIASWARN (ftell); +#endif + +#if @GNULIB_FTELLO@ +# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES +# define _GL_FTELL_WARN /* Category 3, above. */ +# undef ftell +# endif +# if @REPLACE_FTELLO@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ftello +# define ftello rpl_ftello +# endif +_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); +# else +# if ! @HAVE_DECL_FTELLO@ +_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); +# endif +_GL_CXXALIASWARN (ftello); +#elif defined GNULIB_POSIXCHECK +# define _GL_FTELL_WARN /* Category 1, above. */ +# undef ftell +# undef ftello +# if HAVE_RAW_DECL_FTELLO +_GL_WARN_ON_USE (ftello, "ftello is unportable - " + "use gnulib module ftello for portability"); +# endif +#endif + +#ifdef _GL_FTELL_WARN +# undef _GL_FTELL_WARN +/* Here, either ftell is undefined (but C89 guarantees that it is + declared), or it is defined as rpl_ftell (declared above). */ +_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " + "on 32-bit platforms - " + "use ftello function for handling of large files"); +#endif + + +#if @GNULIB_FWRITE@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fwrite +# define fwrite rpl_fwrite +# endif +_GL_FUNCDECL_RPL (fwrite, size_t, + (const void *ptr, size_t s, size_t n, FILE *stream) + _GL_ARG_NONNULL ((1, 4))); +_GL_CXXALIAS_RPL (fwrite, size_t, + (const void *ptr, size_t s, size_t n, FILE *stream)); +# else +_GL_CXXALIAS_SYS (fwrite, size_t, + (const void *ptr, size_t s, size_t n, FILE *stream)); + +/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 + , + which sometimes causes an unwanted diagnostic for fwrite calls. + This affects only function declaration attributes under certain + versions of gcc and clang, 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 +# undef fwrite_unlocked +extern size_t __REDIRECT (rpl_fwrite, + (const void *__restrict, size_t, size_t, + FILE *__restrict), + fwrite); +extern size_t __REDIRECT (rpl_fwrite_unlocked, + (const void *__restrict, size_t, size_t, + FILE *__restrict), + fwrite_unlocked); +# define fwrite rpl_fwrite +# define fwrite_unlocked rpl_fwrite_unlocked +# endif +# endif +_GL_CXXALIASWARN (fwrite); +#endif + +#if @GNULIB_GETC@ +# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getc +# define getc rpl_fgetc +# endif +_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); +# else +_GL_CXXALIAS_SYS (getc, int, (FILE *stream)); +# endif +_GL_CXXALIASWARN (getc); +#endif + +#if @GNULIB_GETCHAR@ +# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getchar +# define getchar rpl_getchar +# endif +_GL_FUNCDECL_RPL (getchar, int, (void)); +_GL_CXXALIAS_RPL (getchar, int, (void)); +# else +_GL_CXXALIAS_SYS (getchar, int, (void)); +# endif +_GL_CXXALIASWARN (getchar); +#endif + +#if @GNULIB_GETDELIM@ +/* Read input, up to (and including) the next occurrence of DELIMITER, from + STREAM, store it in *LINEPTR (and NUL-terminate it). + *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE + bytes of space. It is realloc'd as necessary. + Return the number of bytes read and stored at *LINEPTR (not including the + NUL terminator), or -1 on error or EOF. */ +# if @REPLACE_GETDELIM@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdelim +# define getdelim rpl_getdelim +# endif +_GL_FUNCDECL_RPL (getdelim, ssize_t, + (char **lineptr, size_t *linesize, int delimiter, + FILE *stream) + _GL_ARG_NONNULL ((1, 2, 4))); +_GL_CXXALIAS_RPL (getdelim, ssize_t, + (char **lineptr, size_t *linesize, int delimiter, + FILE *stream)); +# else +# if !@HAVE_DECL_GETDELIM@ +_GL_FUNCDECL_SYS (getdelim, ssize_t, + (char **lineptr, size_t *linesize, int delimiter, + FILE *stream) + _GL_ARG_NONNULL ((1, 2, 4))); +# endif +_GL_CXXALIAS_SYS (getdelim, ssize_t, + (char **lineptr, size_t *linesize, int delimiter, + FILE *stream)); +# endif +_GL_CXXALIASWARN (getdelim); +#elif defined GNULIB_POSIXCHECK +# undef getdelim +# if HAVE_RAW_DECL_GETDELIM +_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " + "use gnulib module getdelim for portability"); +# endif +#endif + +#if @GNULIB_GETLINE@ +/* Read a line, up to (and including) the next newline, from STREAM, store it + in *LINEPTR (and NUL-terminate it). + *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE + bytes of space. It is realloc'd as necessary. + Return the number of bytes read and stored at *LINEPTR (not including the + NUL terminator), or -1 on error or EOF. */ +# if @REPLACE_GETLINE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getline +# define getline rpl_getline +# endif +_GL_FUNCDECL_RPL (getline, ssize_t, + (char **lineptr, size_t *linesize, FILE *stream) + _GL_ARG_NONNULL ((1, 2, 3))); +_GL_CXXALIAS_RPL (getline, ssize_t, + (char **lineptr, size_t *linesize, FILE *stream)); +# else +# if !@HAVE_DECL_GETLINE@ +_GL_FUNCDECL_SYS (getline, ssize_t, + (char **lineptr, size_t *linesize, FILE *stream) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +_GL_CXXALIAS_SYS (getline, ssize_t, + (char **lineptr, size_t *linesize, FILE *stream)); +# endif +# if @HAVE_DECL_GETLINE@ +_GL_CXXALIASWARN (getline); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getline +# if HAVE_RAW_DECL_GETLINE +_GL_WARN_ON_USE (getline, "getline is unportable - " + "use gnulib module getline for portability"); +# endif +#endif + +/* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning; besides, C11 + removed it. */ +#undef gets +#if HAVE_RAW_DECL_GETS +_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); +#endif + + +#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ +struct obstack; +/* Grow an obstack with formatted output. Return the number of + bytes added to OBS. No trailing nul byte is added, and the + object should be closed with obstack_finish before use. Upon + memory allocation error, call obstack_alloc_failed_handler. Upon + other error, return -1. */ +# if @REPLACE_OBSTACK_PRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define obstack_printf rpl_obstack_printf +# endif +_GL_FUNCDECL_RPL (obstack_printf, int, + (struct obstack *obs, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (obstack_printf, int, + (struct obstack *obs, const char *format, ...)); +# else +# if !@HAVE_DECL_OBSTACK_PRINTF@ +_GL_FUNCDECL_SYS (obstack_printf, int, + (struct obstack *obs, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (obstack_printf, int, + (struct obstack *obs, const char *format, ...)); +# endif +_GL_CXXALIASWARN (obstack_printf); +# if @REPLACE_OBSTACK_PRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define obstack_vprintf rpl_obstack_vprintf +# endif +_GL_FUNCDECL_RPL (obstack_vprintf, int, + (struct obstack *obs, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (obstack_vprintf, int, + (struct obstack *obs, const char *format, va_list args)); +# else +# if !@HAVE_DECL_OBSTACK_PRINTF@ +_GL_FUNCDECL_SYS (obstack_vprintf, int, + (struct obstack *obs, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (obstack_vprintf, int, + (struct obstack *obs, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (obstack_vprintf); +#endif + +#if @GNULIB_PCLOSE@ +# if !@HAVE_PCLOSE@ +_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); +_GL_CXXALIASWARN (pclose); +#elif defined GNULIB_POSIXCHECK +# undef pclose +# if HAVE_RAW_DECL_PCLOSE +_GL_WARN_ON_USE (pclose, "pclose is unportable - " + "use gnulib module pclose for more portability"); +# endif +#endif + +#if @GNULIB_PERROR@ +/* Print a message to standard error, describing the value of ERRNO, + (if STRING is not NULL and not empty) prefixed with STRING and ": ", + and terminated with a newline. */ +# if @REPLACE_PERROR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define perror rpl_perror +# endif +_GL_FUNCDECL_RPL (perror, void, (const char *string)); +_GL_CXXALIAS_RPL (perror, void, (const char *string)); +# else +_GL_CXXALIAS_SYS (perror, void, (const char *string)); +# endif +_GL_CXXALIASWARN (perror); +#elif defined GNULIB_POSIXCHECK +# undef perror +/* Assume perror is always declared. */ +_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " + "use gnulib module perror for portability"); +#endif + +#if @GNULIB_POPEN@ +# if @REPLACE_POPEN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef popen +# define popen rpl_popen +# endif +_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); +# else +# if !@HAVE_POPEN@ +_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); +# endif +_GL_CXXALIASWARN (popen); +#elif defined GNULIB_POSIXCHECK +# undef popen +# if HAVE_RAW_DECL_POPEN +_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " + "use gnulib module popen or pipe for more portability"); +# endif +#endif + +#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ +# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ + || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) +# if defined __GNUC__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +/* Don't break __attribute__((format(printf,M,N))). */ +# define printf __printf__ +# endif +# if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ +_GL_FUNCDECL_RPL_1 (__printf__, int, + (const char *format, ...) + __asm__ (@ASM_SYMBOL_PREFIX@ + _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) + _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ARG_NONNULL ((1))); +# else +_GL_FUNCDECL_RPL_1 (__printf__, int, + (const char *format, ...) + __asm__ (@ASM_SYMBOL_PREFIX@ + _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) + _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); +# else +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define printf rpl_printf +# endif +_GL_FUNCDECL_RPL (printf, int, + (const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); +# endif +# define GNULIB_overrides_printf 1 +# else +_GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); +# endif +_GL_CXXALIASWARN (printf); +#endif +#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK +# if !GNULIB_overrides_printf +# undef printf +# endif +/* Assume printf is always declared. */ +_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " + "use gnulib module printf-posix for portable " + "POSIX compliance"); +#endif + +#if @GNULIB_PUTC@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putc +# define putc rpl_fputc +# endif +_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); +# else +_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); +# endif +_GL_CXXALIASWARN (putc); +#endif + +#if @GNULIB_PUTCHAR@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putchar +# define putchar rpl_putchar +# endif +_GL_FUNCDECL_RPL (putchar, int, (int c)); +_GL_CXXALIAS_RPL (putchar, int, (int c)); +# else +_GL_CXXALIAS_SYS (putchar, int, (int c)); +# endif +_GL_CXXALIASWARN (putchar); +#endif + +#if @GNULIB_PUTS@ +# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef puts +# define puts rpl_puts +# endif +_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (puts, int, (const char *string)); +# else +_GL_CXXALIAS_SYS (puts, int, (const char *string)); +# endif +_GL_CXXALIASWARN (puts); +#endif + +#if @GNULIB_REMOVE@ +# if @REPLACE_REMOVE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef remove +# define remove rpl_remove +# endif +_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (remove, int, (const char *name)); +# else +_GL_CXXALIAS_SYS (remove, int, (const char *name)); +# endif +_GL_CXXALIASWARN (remove); +#elif defined GNULIB_POSIXCHECK +# undef remove +/* Assume remove is always declared. */ +_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " + "use gnulib module remove for more portability"); +#endif + +#if @GNULIB_RENAME@ +# if @REPLACE_RENAME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef rename +# define rename rpl_rename +# endif +_GL_FUNCDECL_RPL (rename, int, + (const char *old_filename, const char *new_filename) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (rename, int, + (const char *old_filename, const char *new_filename)); +# else +_GL_CXXALIAS_SYS (rename, int, + (const char *old_filename, const char *new_filename)); +# endif +_GL_CXXALIASWARN (rename); +#elif defined GNULIB_POSIXCHECK +# undef rename +/* Assume rename is always declared. */ +_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " + "use gnulib module rename for more portability"); +#endif + +#if @GNULIB_RENAMEAT@ +# if @REPLACE_RENAMEAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef renameat +# define renameat rpl_renameat +# endif +_GL_FUNCDECL_RPL (renameat, int, + (int fd1, char const *file1, int fd2, char const *file2) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (renameat, int, + (int fd1, char const *file1, int fd2, char const *file2)); +# else +# if !@HAVE_RENAMEAT@ +_GL_FUNCDECL_SYS (renameat, int, + (int fd1, char const *file1, int fd2, char const *file2) + _GL_ARG_NONNULL ((2, 4))); +# endif +_GL_CXXALIAS_SYS (renameat, int, + (int fd1, char const *file1, int fd2, char const *file2)); +# endif +_GL_CXXALIASWARN (renameat); +#elif defined GNULIB_POSIXCHECK +# undef renameat +# if HAVE_RAW_DECL_RENAMEAT +_GL_WARN_ON_USE (renameat, "renameat is not portable - " + "use gnulib module renameat for portability"); +# endif +#endif + +#if @GNULIB_SCANF@ +# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +# if defined __GNUC__ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef scanf +/* Don't break __attribute__((format(scanf,M,N))). */ +# define scanf __scanf__ +# endif +_GL_FUNCDECL_RPL_1 (__scanf__, int, + (const char *format, ...) + __asm__ (@ASM_SYMBOL_PREFIX@ + _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) + _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...)); +# else +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef scanf +# define scanf rpl_scanf +# endif +_GL_FUNCDECL_RPL (scanf, int, (const char *format, ...) + _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (scanf, int, (const char *format, ...)); +# endif +# else +_GL_CXXALIAS_SYS (scanf, int, (const char *format, ...)); +# endif +_GL_CXXALIASWARN (scanf); +#endif + +#if @GNULIB_SNPRINTF@ +# if @REPLACE_SNPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define snprintf rpl_snprintf +# endif +_GL_FUNCDECL_RPL (snprintf, int, + (char *str, size_t size, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ARG_NONNULL ((3))); +_GL_CXXALIAS_RPL (snprintf, int, + (char *str, size_t size, const char *format, ...)); +# else +# if !@HAVE_DECL_SNPRINTF@ +_GL_FUNCDECL_SYS (snprintf, int, + (char *str, size_t size, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) + _GL_ARG_NONNULL ((3))); +# endif +_GL_CXXALIAS_SYS (snprintf, int, + (char *str, size_t size, const char *format, ...)); +# endif +_GL_CXXALIASWARN (snprintf); +#elif defined GNULIB_POSIXCHECK +# undef snprintf +# if HAVE_RAW_DECL_SNPRINTF +_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " + "use gnulib module snprintf for portability"); +# endif +#endif + +/* Some people would argue that all sprintf uses should be warned about + (for example, OpenBSD issues a link warning for it), + since it can cause security holes due to buffer overruns. + However, we believe that sprintf can be used safely, and is more + efficient than snprintf in those safe cases; and as proof of our + belief, we use sprintf in several gnulib modules. So this header + intentionally avoids adding a warning to sprintf except when + GNULIB_POSIXCHECK is defined. */ + +#if @GNULIB_SPRINTF_POSIX@ +# if @REPLACE_SPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define sprintf rpl_sprintf +# endif +_GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); +# else +_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); +# endif +_GL_CXXALIASWARN (sprintf); +#elif defined GNULIB_POSIXCHECK +# undef sprintf +/* Assume sprintf is always declared. */ +_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " + "use gnulib module sprintf-posix for portable " + "POSIX compliance"); +#endif + +#if @GNULIB_TMPFILE@ +# if @REPLACE_TMPFILE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define tmpfile rpl_tmpfile +# endif +_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); +_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); +# else +_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); +# endif +_GL_CXXALIASWARN (tmpfile); +#elif defined GNULIB_POSIXCHECK +# undef tmpfile +# if HAVE_RAW_DECL_TMPFILE +_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " + "use gnulib module tmpfile for portability"); +# endif +#endif + +#if @GNULIB_VASPRINTF@ +/* Write formatted output to a string dynamically allocated with malloc(). + If the memory allocation succeeds, store the address of the string in + *RESULT and return the number of resulting bytes, excluding the trailing + NUL. Upon memory allocation error, or some other error, return -1. */ +# if @REPLACE_VASPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define asprintf rpl_asprintf +# endif +_GL_FUNCDECL_RPL (asprintf, int, + (char **result, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (asprintf, int, + (char **result, const char *format, ...)); +# else +# if !@HAVE_VASPRINTF@ +_GL_FUNCDECL_SYS (asprintf, int, + (char **result, const char *format, ...) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (asprintf, int, + (char **result, const char *format, ...)); +# endif +_GL_CXXALIASWARN (asprintf); +# if @REPLACE_VASPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vasprintf rpl_vasprintf +# endif +_GL_FUNCDECL_RPL (vasprintf, int, + (char **result, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (vasprintf, int, + (char **result, const char *format, va_list args)); +# else +# if !@HAVE_VASPRINTF@ +_GL_FUNCDECL_SYS (vasprintf, int, + (char **result, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (vasprintf, int, + (char **result, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vasprintf); +#endif + +#if @GNULIB_VDPRINTF@ +# if @REPLACE_VDPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vdprintf rpl_vdprintf +# endif +_GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); +# else +# if !@HAVE_VDPRINTF@ +_GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((2))); +# endif +/* Need to cast, because on Solaris, the third parameter will likely be + __va_list args. */ +_GL_CXXALIAS_SYS_CAST (vdprintf, int, + (int fd, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vdprintf); +#elif defined GNULIB_POSIXCHECK +# undef vdprintf +# if HAVE_RAW_DECL_VDPRINTF +_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " + "use gnulib module vdprintf for portability"); +# endif +#endif + +#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ +# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ + || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vfprintf rpl_vfprintf +# endif +# define GNULIB_overrides_vfprintf 1 +# if @GNULIB_VFPRINTF_POSIX@ +_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +# else +_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); +# else +/* Need to cast, because on Solaris, the third parameter is + __va_list args + and GCC's fixincludes did not change this to __gnuc_va_list. */ +_GL_CXXALIAS_SYS_CAST (vfprintf, int, + (FILE *fp, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vfprintf); +#endif +#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK +# if !GNULIB_overrides_vfprintf +# undef vfprintf +# endif +/* Assume vfprintf is always declared. */ +_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " + "use gnulib module vfprintf-posix for portable " + "POSIX compliance"); +#endif + +#if @GNULIB_VFSCANF@ +# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef vfscanf +# define vfscanf rpl_vfscanf +# endif +_GL_FUNCDECL_RPL (vfscanf, int, + (FILE *stream, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (vfscanf, int, + (FILE *stream, const char *format, va_list args)); +# else +_GL_CXXALIAS_SYS (vfscanf, int, + (FILE *stream, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vfscanf); +#endif + +#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ +# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ + || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vprintf rpl_vprintf +# endif +# define GNULIB_overrides_vprintf 1 +# if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ +_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) + _GL_ARG_NONNULL ((1))); +# else +_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); +# else +/* Need to cast, because on Solaris, the second parameter is + __va_list args + and GCC's fixincludes did not change this to __gnuc_va_list. */ +_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vprintf); +#endif +#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK +# if !GNULIB_overrides_vprintf +# undef vprintf +# endif +/* Assume vprintf is always declared. */ +_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " + "use gnulib module vprintf-posix for portable " + "POSIX compliance"); +#endif + +#if @GNULIB_VSCANF@ +# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef vscanf +# define vscanf rpl_vscanf +# endif +_GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args)); +# else +_GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vscanf); +#endif + +#if @GNULIB_VSNPRINTF@ +# if @REPLACE_VSNPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vsnprintf rpl_vsnprintf +# endif +_GL_FUNCDECL_RPL (vsnprintf, int, + (char *str, size_t size, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ARG_NONNULL ((3))); +_GL_CXXALIAS_RPL (vsnprintf, int, + (char *str, size_t size, const char *format, va_list args)); +# else +# if !@HAVE_DECL_VSNPRINTF@ +_GL_FUNCDECL_SYS (vsnprintf, int, + (char *str, size_t size, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) + _GL_ARG_NONNULL ((3))); +# endif +_GL_CXXALIAS_SYS (vsnprintf, int, + (char *str, size_t size, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vsnprintf); +#elif defined GNULIB_POSIXCHECK +# undef vsnprintf +# if HAVE_RAW_DECL_VSNPRINTF +_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " + "use gnulib module vsnprintf for portability"); +# endif +#endif + +#if @GNULIB_VSPRINTF_POSIX@ +# if @REPLACE_VSPRINTF@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define vsprintf rpl_vsprintf +# endif +_GL_FUNCDECL_RPL (vsprintf, int, + (char *str, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (vsprintf, int, + (char *str, const char *format, va_list args)); +# else +/* Need to cast, because on Solaris, the third parameter is + __va_list args + and GCC's fixincludes did not change this to __gnuc_va_list. */ +_GL_CXXALIAS_SYS_CAST (vsprintf, int, + (char *str, const char *format, va_list args)); +# endif +_GL_CXXALIASWARN (vsprintf); +#elif defined GNULIB_POSIXCHECK +# undef vsprintf +/* Assume vsprintf is always declared. */ +_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " + "use gnulib module vsprintf-posix for portable " + "POSIX compliance"); +#endif + +#endif /* _@GUARD_PREFIX@_STDIO_H */ +#endif /* _@GUARD_PREFIX@_STDIO_H */ +#endif diff --git a/gl/lib/stdlib.in.h b/gl/lib/stdlib.in.h new file mode 100644 index 0000000..46e10db --- /dev/null +++ b/gl/lib/stdlib.in.h @@ -0,0 +1,954 @@ +/* A GNU-like . + + Copyright (C) 1995, 2001-2004, 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#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@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_STDLIB_H + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ + +#ifndef _@GUARD_PREFIX@_STDLIB_H +#define _@GUARD_PREFIX@_STDLIB_H + +/* NetBSD 5.0 mis-defines NULL. */ +#include + +/* MirBSD 10 defines WEXITSTATUS in , not in . */ +#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS +# include +#endif + +/* Solaris declares getloadavg() in . */ +#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ +# include +#endif + +/* Native Windows platforms declare mktemp() in . */ +#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +# include +#endif + +#if @GNULIB_RANDOM_R@ + +/* OSF/1 5.1 declares 'struct random_data' in , which is included + from if _REENTRANT is defined. Include it whenever we need + 'struct random_data'. */ +# if @HAVE_RANDOM_H@ +# include +# endif + +# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@ +# include +# endif + +# if !@HAVE_STRUCT_RANDOM_DATA@ +/* Define 'struct random_data'. + But allow multiple gnulib generated replacements to coexist. */ +# if !GNULIB_defined_struct_random_data +struct random_data +{ + int32_t *fptr; /* Front pointer. */ + int32_t *rptr; /* Rear pointer. */ + int32_t *state; /* Array of state values. */ + int rand_type; /* Type of random number generator. */ + int rand_deg; /* Degree of random number generator. */ + int rand_sep; /* Distance between front and rear. */ + int32_t *end_ptr; /* Pointer behind state table. */ +}; +# define GNULIB_defined_struct_random_data 1 +# endif +# endif +#endif + +#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +/* On Mac OS X 10.3, only declares mkstemp. */ +/* On Mac OS X 10.5, only declares mkstemps. */ +/* On Cygwin 1.7.1, only declares getsubopt. */ +/* But avoid namespace pollution on glibc systems and native Windows. */ +# include +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The definition of _Noreturn is copied here. */ + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ +#ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +#endif +/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere + with proper operation of xargs. */ +#ifndef EXIT_FAILURE +# define EXIT_FAILURE 1 +#elif EXIT_FAILURE != 1 +# undef EXIT_FAILURE +# define EXIT_FAILURE 1 +#endif + + +#if @GNULIB__EXIT@ +/* Terminate the current process with the given return code, without running + the 'atexit' handlers. */ +# if !@HAVE__EXIT@ +_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); +# endif +_GL_CXXALIAS_SYS (_Exit, void, (int status)); +_GL_CXXALIASWARN (_Exit); +#elif defined GNULIB_POSIXCHECK +# undef _Exit +# if HAVE_RAW_DECL__EXIT +_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " + "use gnulib module _Exit for portability"); +# endif +#endif + + +#if @GNULIB_ATOLL@ +/* Parse a signed decimal integer. + Returns the value of the integer. Errors are not detected. */ +# if !@HAVE_ATOLL@ +_GL_FUNCDECL_SYS (atoll, long long, (const char *string) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); +_GL_CXXALIASWARN (atoll); +#elif defined GNULIB_POSIXCHECK +# undef atoll +# if HAVE_RAW_DECL_ATOLL +_GL_WARN_ON_USE (atoll, "atoll is unportable - " + "use gnulib module atoll for portability"); +# endif +#endif + +#if @GNULIB_CALLOC_POSIX@ +# if @REPLACE_CALLOC@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef calloc +# define calloc rpl_calloc +# endif +_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); +_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); +# else +_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); +# endif +_GL_CXXALIASWARN (calloc); +#elif defined GNULIB_POSIXCHECK +# undef calloc +/* Assume calloc is always declared. */ +_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " + "use gnulib module calloc-posix for portability"); +#endif + +#if @GNULIB_CANONICALIZE_FILE_NAME@ +# if @REPLACE_CANONICALIZE_FILE_NAME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define canonicalize_file_name rpl_canonicalize_file_name +# endif +_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); +# else +# if !@HAVE_CANONICALIZE_FILE_NAME@ +_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); +# endif +_GL_CXXALIASWARN (canonicalize_file_name); +#elif defined GNULIB_POSIXCHECK +# undef canonicalize_file_name +# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +_GL_WARN_ON_USE (canonicalize_file_name, + "canonicalize_file_name is unportable - " + "use gnulib module canonicalize-lgpl for portability"); +# endif +#endif + +#if @GNULIB_GETLOADAVG@ +/* Store max(NELEM,3) load average numbers in LOADAVG[]. + The three numbers are the load average of the last 1 minute, the last 5 + minutes, and the last 15 minutes, respectively. + LOADAVG is an array of NELEM numbers. */ +# if !@HAVE_DECL_GETLOADAVG@ +_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); +_GL_CXXALIASWARN (getloadavg); +#elif defined GNULIB_POSIXCHECK +# undef getloadavg +# if HAVE_RAW_DECL_GETLOADAVG +_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " + "use gnulib module getloadavg for portability"); +# endif +#endif + +#if @GNULIB_GETSUBOPT@ +/* Assuming *OPTIONP is a comma separated list of elements of the form + "token" or "token=value", getsubopt parses the first of these elements. + If the first element refers to a "token" that is member of the given + NULL-terminated array of tokens: + - It replaces the comma with a NUL byte, updates *OPTIONP to point past + the first option and the comma, sets *VALUEP to the value of the + element (or NULL if it doesn't contain an "=" sign), + - It returns the index of the "token" in the given array of tokens. + Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. + For more details see the POSIX:2001 specification. + http://www.opengroup.org/susv3xsh/getsubopt.html */ +# if !@HAVE_GETSUBOPT@ +_GL_FUNCDECL_SYS (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +_GL_CXXALIAS_SYS (getsubopt, int, + (char **optionp, char *const *tokens, char **valuep)); +_GL_CXXALIASWARN (getsubopt); +#elif defined GNULIB_POSIXCHECK +# undef getsubopt +# if HAVE_RAW_DECL_GETSUBOPT +_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " + "use gnulib module getsubopt for portability"); +# endif +#endif + +#if @GNULIB_GRANTPT@ +/* Change the ownership and access permission of the slave side of the + pseudo-terminal whose master side is specified by FD. */ +# if !@HAVE_GRANTPT@ +_GL_FUNCDECL_SYS (grantpt, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (grantpt, int, (int fd)); +_GL_CXXALIASWARN (grantpt); +#elif defined GNULIB_POSIXCHECK +# undef grantpt +# if HAVE_RAW_DECL_GRANTPT +_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " + "use gnulib module grantpt for portability"); +# endif +#endif + +/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not + rely on GNU or POSIX semantics for malloc and realloc (for example, + by never specifying a zero size), so it does not need malloc or + realloc to be redefined. */ +#if @GNULIB_MALLOC_POSIX@ +# if @REPLACE_MALLOC@ +# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ + || _GL_USE_STDLIB_ALLOC) +# undef malloc +# define malloc rpl_malloc +# endif +_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); +_GL_CXXALIAS_RPL (malloc, void *, (size_t size)); +# else +_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); +# endif +_GL_CXXALIASWARN (malloc); +#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef malloc +/* Assume malloc is always declared. */ +_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " + "use gnulib module malloc-posix for portability"); +#endif + +/* Convert a multibyte character to a wide character. */ +#if @GNULIB_MBTOWC@ +# if @REPLACE_MBTOWC@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbtowc +# define mbtowc rpl_mbtowc +# endif +_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); +_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); +# else +_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); +# endif +_GL_CXXALIASWARN (mbtowc); +#endif + +#if @GNULIB_MKDTEMP@ +/* Create a unique temporary directory from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the directory name unique. + Returns TEMPLATE, or a null pointer if it cannot get a unique name. + The directory is created mode 700. */ +# if !@HAVE_MKDTEMP@ +_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); +_GL_CXXALIASWARN (mkdtemp); +#elif defined GNULIB_POSIXCHECK +# undef mkdtemp +# if HAVE_RAW_DECL_MKDTEMP +_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " + "use gnulib module mkdtemp for portability"); +# endif +#endif + +#if @GNULIB_MKOSTEMP@ +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + The file is then created, with the specified flags, ensuring it didn't exist + before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if !@HAVE_MKOSTEMP@ +_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); +_GL_CXXALIASWARN (mkostemp); +#elif defined GNULIB_POSIXCHECK +# undef mkostemp +# if HAVE_RAW_DECL_MKOSTEMP +_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " + "use gnulib module mkostemp for portability"); +# endif +#endif + +#if @GNULIB_MKOSTEMPS@ +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE before a suffix of length + SUFFIXLEN must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + The file is then created, with the specified flags, ensuring it didn't exist + before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if !@HAVE_MKOSTEMPS@ +_GL_FUNCDECL_SYS (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkostemps, int, + (char * /*template*/, int /*suffixlen*/, int /*flags*/)); +_GL_CXXALIASWARN (mkostemps); +#elif defined GNULIB_POSIXCHECK +# undef mkostemps +# if HAVE_RAW_DECL_MKOSTEMPS +_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " + "use gnulib module mkostemps for portability"); +# endif +#endif + +#if @GNULIB_MKSTEMP@ +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The file is then created, ensuring it didn't exist before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if @REPLACE_MKSTEMP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mkstemp rpl_mkstemp +# endif +_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); +# else +# if ! @HAVE_MKSTEMP@ +_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); +# endif +_GL_CXXALIASWARN (mkstemp); +#elif defined GNULIB_POSIXCHECK +# undef mkstemp +# if HAVE_RAW_DECL_MKSTEMP +_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " + "use gnulib module mkstemp for portability"); +# endif +#endif + +#if @GNULIB_MKSTEMPS@ +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE prior to a suffix of length + SUFFIXLEN must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The file is then created, ensuring it didn't exist before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +# if !@HAVE_MKSTEMPS@ +_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); +_GL_CXXALIASWARN (mkstemps); +#elif defined GNULIB_POSIXCHECK +# undef mkstemps +# if HAVE_RAW_DECL_MKSTEMPS +_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " + "use gnulib module mkstemps for portability"); +# endif +#endif + +#if @GNULIB_POSIX_OPENPT@ +/* Return an FD open to the master side of a pseudo-terminal. Flags should + include O_RDWR, and may also include O_NOCTTY. */ +# if !@HAVE_POSIX_OPENPT@ +_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); +# endif +_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); +_GL_CXXALIASWARN (posix_openpt); +#elif defined GNULIB_POSIXCHECK +# undef posix_openpt +# if HAVE_RAW_DECL_POSIX_OPENPT +_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " + "use gnulib module posix_openpt for portability"); +# endif +#endif + +#if @GNULIB_PTSNAME@ +/* Return the pathname of the pseudo-terminal slave associated with + the master FD is open on, or NULL on errors. */ +# 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 +_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); +# endif +_GL_CXXALIASWARN (ptsname); +#elif defined GNULIB_POSIXCHECK +# undef ptsname +# if HAVE_RAW_DECL_PTSNAME +_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " + "use gnulib module ptsname for portability"); +# endif +#endif + +#if @GNULIB_PTSNAME_R@ +/* Set the pathname of the pseudo-terminal slave associated with + the master FD is open on and return 0, or set errno and return + non-zero on errors. */ +# if @REPLACE_PTSNAME_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ptsname_r +# define ptsname_r rpl_ptsname_r +# endif +_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); +# else +# if !@HAVE_PTSNAME_R@ +_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); +# endif +_GL_CXXALIASWARN (ptsname_r); +#elif defined GNULIB_POSIXCHECK +# undef ptsname_r +# if HAVE_RAW_DECL_PTSNAME_R +_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " + "use gnulib module ptsname_r for portability"); +# endif +#endif + +#if @GNULIB_PUTENV@ +# if @REPLACE_PUTENV@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef putenv +# define putenv rpl_putenv +# endif +_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (putenv, int, (char *string)); +# else +_GL_CXXALIAS_SYS (putenv, int, (char *string)); +# endif +_GL_CXXALIASWARN (putenv); +#endif + + +#if @GNULIB_RANDOM_R@ +# if !@HAVE_RANDOM_R@ +# ifndef RAND_MAX +# define RAND_MAX 2147483647 +# endif +# endif +#endif + + +#if @GNULIB_RANDOM@ +# if !@HAVE_RANDOM@ +_GL_FUNCDECL_SYS (random, long, (void)); +# endif +_GL_CXXALIAS_SYS (random, long, (void)); +_GL_CXXALIASWARN (random); +#elif defined GNULIB_POSIXCHECK +# undef random +# if HAVE_RAW_DECL_RANDOM +_GL_WARN_ON_USE (random, "random is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if @GNULIB_RANDOM@ +# if !@HAVE_RANDOM@ +_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); +# endif +_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); +_GL_CXXALIASWARN (srandom); +#elif defined GNULIB_POSIXCHECK +# undef srandom +# if HAVE_RAW_DECL_SRANDOM +_GL_WARN_ON_USE (srandom, "srandom is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if @GNULIB_RANDOM@ +# if !@HAVE_RANDOM@ +_GL_FUNCDECL_SYS (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (initstate, char *, + (unsigned int seed, char *buf, size_t buf_size)); +_GL_CXXALIASWARN (initstate); +#elif defined GNULIB_POSIXCHECK +# undef initstate +# if HAVE_RAW_DECL_INITSTATE_R +_GL_WARN_ON_USE (initstate, "initstate is unportable - " + "use gnulib module random for portability"); +# endif +#endif + +#if @GNULIB_RANDOM@ +# if !@HAVE_RANDOM@ +_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); +_GL_CXXALIASWARN (setstate); +#elif defined GNULIB_POSIXCHECK +# undef setstate +# if HAVE_RAW_DECL_SETSTATE_R +_GL_WARN_ON_USE (setstate, "setstate is unportable - " + "use gnulib module random for portability"); +# endif +#endif + + +#if @GNULIB_RANDOM_R@ +# if @REPLACE_RANDOM_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef random_r +# define random_r rpl_random_r +# endif +_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); +# else +# if !@HAVE_RANDOM_R@ +_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); +# endif +_GL_CXXALIASWARN (random_r); +#elif defined GNULIB_POSIXCHECK +# undef random_r +# if HAVE_RAW_DECL_RANDOM_R +_GL_WARN_ON_USE (random_r, "random_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if @GNULIB_RANDOM_R@ +# if @REPLACE_RANDOM_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef srandom_r +# define srandom_r rpl_srandom_r +# endif +_GL_FUNCDECL_RPL (srandom_r, int, + (unsigned int seed, struct random_data *rand_state) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (srandom_r, int, + (unsigned int seed, struct random_data *rand_state)); +# else +# if !@HAVE_RANDOM_R@ +_GL_FUNCDECL_SYS (srandom_r, int, + (unsigned int seed, struct random_data *rand_state) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (srandom_r, int, + (unsigned int seed, struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (srandom_r); +#elif defined GNULIB_POSIXCHECK +# undef srandom_r +# if HAVE_RAW_DECL_SRANDOM_R +_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if @GNULIB_RANDOM_R@ +# if @REPLACE_RANDOM_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef initstate_r +# define initstate_r rpl_initstate_r +# endif +_GL_FUNCDECL_RPL (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state)); +# else +# if !@HAVE_RANDOM_R@ +_GL_FUNCDECL_SYS (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state) + _GL_ARG_NONNULL ((2, 4))); +# endif +_GL_CXXALIAS_SYS (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (initstate_r); +#elif defined GNULIB_POSIXCHECK +# undef initstate_r +# if HAVE_RAW_DECL_INITSTATE_R +_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + +#if @GNULIB_RANDOM_R@ +# if @REPLACE_RANDOM_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setstate_r +# define setstate_r rpl_setstate_r +# endif +_GL_FUNCDECL_RPL (setstate_r, int, + (char *arg_state, struct random_data *rand_state) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (setstate_r, int, + (char *arg_state, struct random_data *rand_state)); +# else +# if !@HAVE_RANDOM_R@ +_GL_FUNCDECL_SYS (setstate_r, int, + (char *arg_state, struct random_data *rand_state) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (setstate_r, int, + (char *arg_state, struct random_data *rand_state)); +# endif +_GL_CXXALIASWARN (setstate_r); +#elif defined GNULIB_POSIXCHECK +# undef setstate_r +# if HAVE_RAW_DECL_SETSTATE_R +_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " + "use gnulib module random_r for portability"); +# endif +#endif + + +#if @GNULIB_REALLOC_POSIX@ +# if @REPLACE_REALLOC@ +# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ + || _GL_USE_STDLIB_ALLOC) +# undef realloc +# define realloc rpl_realloc +# endif +_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); +_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); +# else +_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); +# endif +_GL_CXXALIASWARN (realloc); +#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC +# undef realloc +/* Assume realloc is always declared. */ +_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " + "use gnulib module realloc-posix for portability"); +#endif + +#if @GNULIB_REALPATH@ +# if @REPLACE_REALPATH@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define realpath rpl_realpath +# endif +_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); +# else +# if !@HAVE_REALPATH@ +_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); +# endif +_GL_CXXALIASWARN (realpath); +#elif defined GNULIB_POSIXCHECK +# undef realpath +# if HAVE_RAW_DECL_REALPATH +_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " + "canonicalize or canonicalize-lgpl for portability"); +# endif +#endif + +#if @GNULIB_RPMATCH@ +/* Test a user response to a question. + Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ +# if !@HAVE_RPMATCH@ +_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); +_GL_CXXALIASWARN (rpmatch); +#elif defined GNULIB_POSIXCHECK +# undef rpmatch +# if HAVE_RAW_DECL_RPMATCH +_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " + "use gnulib module rpmatch for portability"); +# 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. */ +# if @REPLACE_SETENV@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setenv +# define setenv rpl_setenv +# endif +_GL_FUNCDECL_RPL (setenv, int, + (const char *name, const char *value, int replace) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (setenv, int, + (const char *name, const char *value, int replace)); +# else +# if !@HAVE_DECL_SETENV@ +_GL_FUNCDECL_SYS (setenv, int, + (const char *name, const char *value, int replace) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (setenv, int, + (const char *name, const char *value, int replace)); +# endif +# if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) +_GL_CXXALIASWARN (setenv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef setenv +# if HAVE_RAW_DECL_SETENV +_GL_WARN_ON_USE (setenv, "setenv is unportable - " + "use gnulib module setenv for portability"); +# endif +#endif + +#if @GNULIB_STRTOD@ + /* Parse a double from STRING, updating ENDP if appropriate. */ +# if @REPLACE_STRTOD@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtod rpl_strtod +# endif +_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); +# else +# if !@HAVE_STRTOD@ +_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); +# endif +_GL_CXXALIASWARN (strtod); +#elif defined GNULIB_POSIXCHECK +# undef strtod +# if HAVE_RAW_DECL_STRTOD +_GL_WARN_ON_USE (strtod, "strtod is unportable - " + "use gnulib module strtod for portability"); +# endif +#endif + +#if @GNULIB_STRTOLL@ +/* Parse a signed integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set + to ERANGE. */ +# if !@HAVE_STRTOLL@ +_GL_FUNCDECL_SYS (strtoll, long long, + (const char *string, char **endptr, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoll, long long, + (const char *string, char **endptr, int base)); +_GL_CXXALIASWARN (strtoll); +#elif defined GNULIB_POSIXCHECK +# undef strtoll +# if HAVE_RAW_DECL_STRTOLL +_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " + "use gnulib module strtoll for portability"); +# endif +#endif + +#if @GNULIB_STRTOULL@ +/* Parse an unsigned integer whose textual representation starts at STRING. + The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with prefix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the integer is + stored in *ENDPTR. + Upon overflow, the return value is ULLONG_MAX, and errno is set to + ERANGE. */ +# if !@HAVE_STRTOULL@ +_GL_FUNCDECL_SYS (strtoull, unsigned long long, + (const char *string, char **endptr, int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoull, unsigned long long, + (const char *string, char **endptr, int base)); +_GL_CXXALIASWARN (strtoull); +#elif defined GNULIB_POSIXCHECK +# undef strtoull +# if HAVE_RAW_DECL_STRTOULL +_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " + "use gnulib module strtoull for portability"); +# endif +#endif + +#if @GNULIB_UNLOCKPT@ +/* Unlock the slave side of the pseudo-terminal whose master side is specified + by FD, so that it can be opened. */ +# if !@HAVE_UNLOCKPT@ +_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); +_GL_CXXALIASWARN (unlockpt); +#elif defined GNULIB_POSIXCHECK +# undef unlockpt +# if HAVE_RAW_DECL_UNLOCKPT +_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " + "use gnulib module unlockpt for portability"); +# endif +#endif + +#if @GNULIB_UNSETENV@ +/* Remove the variable NAME from the environment. */ +# if @REPLACE_UNSETENV@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unsetenv +# define unsetenv rpl_unsetenv +# endif +_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); +# else +# if !@HAVE_DECL_UNSETENV@ +_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); +# endif +# if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) +_GL_CXXALIASWARN (unsetenv); +# endif +#elif defined GNULIB_POSIXCHECK +# undef unsetenv +# if HAVE_RAW_DECL_UNSETENV +_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " + "use gnulib module unsetenv for portability"); +# endif +#endif + +/* Convert a wide character to a multibyte character. */ +#if @GNULIB_WCTOMB@ +# if @REPLACE_WCTOMB@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctomb +# define wctomb rpl_wctomb +# endif +_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); +_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); +# else +_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); +# endif +_GL_CXXALIASWARN (wctomb); +#endif + + +#endif /* _@GUARD_PREFIX@_STDLIB_H */ +#endif /* _@GUARD_PREFIX@_STDLIB_H */ +#endif diff --git a/gl/lib/stpcpy.c b/gl/lib/stpcpy.c new file mode 100644 index 0000000..880a706 --- /dev/null +++ b/gl/lib/stpcpy.c @@ -0,0 +1,49 @@ +/* stpcpy.c -- copy a string and return pointer to end of new string + Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2014 Free Software + Foundation, Inc. + + NOTE: The canonical source of this file is maintained with the GNU C Library. + Bugs can be reported to bug-glibc@prep.ai.mit.edu. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#undef __stpcpy +#ifdef _LIBC +# undef stpcpy +#endif + +#ifndef weak_alias +# define __stpcpy stpcpy +#endif + +/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ +char * +__stpcpy (char *dest, const char *src) +{ + register char *d = dest; + register const char *s = src; + + do + *d++ = *s; + while (*s++ != '\0'); + + return d - 1; +} +#ifdef weak_alias +weak_alias (__stpcpy, stpcpy) +#endif diff --git a/gl/lib/str-kmp.h b/gl/lib/str-kmp.h new file mode 100644 index 0000000..b25d07f --- /dev/null +++ b/gl/lib/str-kmp.h @@ -0,0 +1,153 @@ +/* Substring search in a NUL terminated string of UNIT elements, + using the Knuth-Morris-Pratt algorithm. + Copyright (C) 2005-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2005. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Before including this file, you need to define: + UNIT The element type of the needle and haystack. + CANON_ELEMENT(c) A macro that canonicalizes an element right after + it has been fetched from needle or haystack. + The argument is of type UNIT; the result must be + of type UNIT as well. */ + +/* Knuth-Morris-Pratt algorithm. + See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm + HAYSTACK is the NUL terminated string in which to search for. + NEEDLE is the string to search for in HAYSTACK, consisting of NEEDLE_LEN + units. + Return a boolean indicating success: + Return true and set *RESULTP if the search was completed. + Return false if it was aborted because not enough memory was available. */ +static bool +knuth_morris_pratt (const UNIT *haystack, + const UNIT *needle, size_t needle_len, + const UNIT **resultp) +{ + size_t m = needle_len; + + /* Allocate the table. */ + size_t *table = (size_t *) nmalloca (m, sizeof (size_t)); + if (table == NULL) + return false; + /* Fill the table. + For 0 < i < m: + 0 < table[i] <= i is defined such that + forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x], + and table[i] is as large as possible with this property. + This implies: + 1) For 0 < i < m: + If table[i] < i, + needle[table[i]..i-1] = needle[0..i-1-table[i]]. + 2) For 0 < i < m: + rhaystack[0..i-1] == needle[0..i-1] + and exists h, i <= h < m: rhaystack[h] != needle[h] + implies + forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1]. + table[0] remains uninitialized. */ + { + size_t i, j; + + /* i = 1: Nothing to verify for x = 0. */ + table[1] = 1; + j = 0; + + for (i = 2; i < m; i++) + { + /* Here: j = i-1 - table[i-1]. + The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold + for x < table[i-1], by induction. + Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ + UNIT b = CANON_ELEMENT (needle[i - 1]); + + for (;;) + { + /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x] + is known to hold for x < i-1-j. + Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ + if (b == CANON_ELEMENT (needle[j])) + { + /* Set table[i] := i-1-j. */ + table[i] = i - ++j; + break; + } + /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds + for x = i-1-j, because + needle[i-1] != needle[j] = needle[i-1-x]. */ + if (j == 0) + { + /* The inequality holds for all possible x. */ + table[i] = i; + break; + } + /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds + for i-1-j < x < i-1-j+table[j], because for these x: + needle[x..i-2] + = needle[x-(i-1-j)..j-1] + != needle[0..j-1-(x-(i-1-j))] (by definition of table[j]) + = needle[0..i-2-x], + hence needle[x..i-1] != needle[0..i-1-x]. + Furthermore + needle[i-1-j+table[j]..i-2] + = needle[table[j]..j-1] + = needle[0..j-1-table[j]] (by definition of table[j]). */ + j = j - table[j]; + } + /* Here: j = i - table[i]. */ + } + } + + /* Search, using the table to accelerate the processing. */ + { + size_t j; + const UNIT *rhaystack; + const UNIT *phaystack; + + *resultp = NULL; + j = 0; + rhaystack = haystack; + phaystack = haystack; + /* Invariant: phaystack = rhaystack + j. */ + while (*phaystack != 0) + if (CANON_ELEMENT (needle[j]) == CANON_ELEMENT (*phaystack)) + { + j++; + phaystack++; + if (j == m) + { + /* The entire needle has been found. */ + *resultp = rhaystack; + break; + } + } + else if (j > 0) + { + /* Found a match of needle[0..j-1], mismatch at needle[j]. */ + rhaystack += table[j]; + j -= table[j]; + } + else + { + /* Found a mismatch at needle[0] already. */ + rhaystack++; + phaystack++; + } + } + + freea (table); + return true; +} + +#undef CANON_ELEMENT diff --git a/gl/lib/str-two-way.h b/gl/lib/str-two-way.h new file mode 100644 index 0000000..49ee746 --- /dev/null +++ b/gl/lib/str-two-way.h @@ -0,0 +1,452 @@ +/* Byte-wise substring search, using the Two-Way algorithm. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Written by Eric Blake , 2008. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +/* Before including this file, you need to include and + , and define: + RESULT_TYPE A macro that expands to the return type. + AVAILABLE(h, h_l, j, n_l) + A macro that returns nonzero if there are + at least N_L bytes left starting at H[J]. + H is 'unsigned char *', H_L, J, and N_L + are 'size_t'; H_L is an lvalue. For + NUL-terminated searches, H_L can be + modified each iteration to avoid having + to compute the end of H up front. + + For case-insensitivity, you may optionally define: + CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L + characters of P1 and P2 are equal. + CANON_ELEMENT(c) A macro that canonicalizes an element right after + it has been fetched from one of the two strings. + The argument is an 'unsigned char'; the result + must be an 'unsigned char' as well. + + This file undefines the macros documented above, and defines + LONG_NEEDLE_THRESHOLD. +*/ + +#include +#include + +/* We use the Two-Way string matching algorithm (also known as + Chrochemore-Perrin), which guarantees linear complexity with + constant space. Additionally, for long needles, we also use a bad + character shift table similar to the Boyer-Moore algorithm to + achieve improved (potentially sub-linear) performance. + + See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, + http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, + http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf +*/ + +/* Point at which computing a bad-byte shift table is likely to be + worthwhile. Small needles should not compute a table, since it + adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a + speedup no greater than a factor of NEEDLE_LEN. The larger the + needle, the better the potential performance gain. On the other + hand, on non-POSIX systems with CHAR_BIT larger than eight, the + memory required for the table is prohibitive. */ +#if CHAR_BIT < 10 +# define LONG_NEEDLE_THRESHOLD 32U +#else +# define LONG_NEEDLE_THRESHOLD SIZE_MAX +#endif + +#ifndef MAX +# define MAX(a, b) ((a < b) ? (b) : (a)) +#endif + +#ifndef CANON_ELEMENT +# define CANON_ELEMENT(c) c +#endif +#ifndef CMP_FUNC +# define CMP_FUNC memcmp +#endif + +/* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. + Return the index of the first byte in the right half, and set + *PERIOD to the global period of the right half. + + The global period of a string is the smallest index (possibly its + length) at which all remaining bytes in the string are repetitions + of the prefix (the last repetition may be a subset of the prefix). + + When NEEDLE is factored into two halves, a local period is the + length of the smallest word that shares a suffix with the left half + and shares a prefix with the right half. All factorizations of a + non-empty NEEDLE have a local period of at least 1 and no greater + than NEEDLE_LEN. + + A critical factorization has the property that the local period + equals the global period. All strings have at least one critical + factorization with the left half smaller than the global period. + And while some strings have more than one critical factorization, + it is provable that with an ordered alphabet, at least one of the + critical factorizations corresponds to a maximal suffix. + + Given an ordered alphabet, a critical factorization can be computed + in linear time, with 2 * NEEDLE_LEN comparisons, by computing the + shorter of two ordered maximal suffixes. The ordered maximal + suffixes are determined by lexicographic comparison while tracking + periodicity. */ +static size_t +critical_factorization (const unsigned char *needle, size_t needle_len, + size_t *period) +{ + /* Index of last byte of left half, or SIZE_MAX. */ + size_t max_suffix, max_suffix_rev; + size_t j; /* Index into NEEDLE for current candidate suffix. */ + size_t k; /* Offset into current period. */ + size_t p; /* Intermediate period. */ + unsigned char a, b; /* Current comparison bytes. */ + + /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered + out 0-length needles. */ + if (needle_len < 3) + { + *period = 1; + return needle_len - 1; + } + + /* Invariants: + 0 <= j < NEEDLE_LEN - 1 + -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed) + min(max_suffix, max_suffix_rev) < global period of NEEDLE + 1 <= p <= global period of NEEDLE + p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j] + 1 <= k <= p + */ + + /* Perform lexicographic search. */ + max_suffix = SIZE_MAX; + j = 0; + k = p = 1; + while (j + k < needle_len) + { + a = CANON_ELEMENT (needle[j + k]); + b = CANON_ELEMENT (needle[max_suffix + k]); + if (a < b) + { + /* Suffix is smaller, period is entire prefix so far. */ + j += k; + k = 1; + p = j - max_suffix; + } + else if (a == b) + { + /* Advance through repetition of the current period. */ + if (k != p) + ++k; + else + { + j += p; + k = 1; + } + } + else /* b < a */ + { + /* Suffix is larger, start over from current location. */ + max_suffix = j++; + k = p = 1; + } + } + *period = p; + + /* Perform reverse lexicographic search. */ + max_suffix_rev = SIZE_MAX; + j = 0; + k = p = 1; + while (j + k < needle_len) + { + a = CANON_ELEMENT (needle[j + k]); + b = CANON_ELEMENT (needle[max_suffix_rev + k]); + if (b < a) + { + /* Suffix is smaller, period is entire prefix so far. */ + j += k; + k = 1; + p = j - max_suffix_rev; + } + else if (a == b) + { + /* Advance through repetition of the current period. */ + if (k != p) + ++k; + else + { + j += p; + k = 1; + } + } + else /* a < b */ + { + /* Suffix is larger, start over from current location. */ + max_suffix_rev = j++; + k = p = 1; + } + } + + /* Choose the shorter suffix. Return the index of the first byte of + the right half, rather than the last byte of the left half. + + For some examples, 'banana' has two critical factorizations, both + exposed by the two lexicographic extreme suffixes of 'anana' and + 'nana', where both suffixes have a period of 2. On the other + hand, with 'aab' and 'bba', both strings have a single critical + factorization of the last byte, with the suffix having a period + of 1. While the maximal lexicographic suffix of 'aab' is 'b', + the maximal lexicographic suffix of 'bba' is 'ba', which is not a + critical factorization. Conversely, the maximal reverse + lexicographic suffix of 'a' works for 'bba', but not 'ab' for + 'aab'. The shorter suffix of the two will always be a critical + factorization. */ + if (max_suffix_rev + 1 < max_suffix + 1) + return max_suffix + 1; + *period = p; + return max_suffix_rev + 1; +} + +/* Return the first location of non-empty NEEDLE within HAYSTACK, or + NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This + method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD. + Performance is guaranteed to be linear, with an initialization cost + of 2 * NEEDLE_LEN comparisons. + + If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at + most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. + If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * + HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ +static RETURN_TYPE +two_way_short_needle (const unsigned char *haystack, size_t haystack_len, + const unsigned char *needle, size_t needle_len) +{ + size_t i; /* Index into current byte of NEEDLE. */ + size_t j; /* Index into current window of HAYSTACK. */ + size_t period; /* The period of the right half of needle. */ + size_t suffix; /* The index of the right half of needle. */ + + /* Factor the needle into two halves, such that the left half is + smaller than the global period, and the right half is + periodic (with a period as large as NEEDLE_LEN - suffix). */ + suffix = critical_factorization (needle, needle_len, &period); + + /* Perform the search. Each iteration compares the right half + first. */ + if (CMP_FUNC (needle, needle + period, suffix) == 0) + { + /* Entire needle is periodic; a mismatch in the left half can + only advance by the period, so use memory to avoid rescanning + known occurrences of the period in the right half. */ + size_t memory = 0; + j = 0; + while (AVAILABLE (haystack, haystack_len, j, needle_len)) + { + /* Scan for matches in right half. */ + i = MAX (suffix, memory); + while (i < needle_len && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + ++i; + if (needle_len <= i) + { + /* Scan for matches in left half. */ + i = suffix - 1; + while (memory < i + 1 && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + --i; + if (i + 1 < memory + 1) + return (RETURN_TYPE) (haystack + j); + /* No match, so remember how many repetitions of period + on the right half were scanned. */ + j += period; + memory = needle_len - period; + } + else + { + j += i - suffix + 1; + memory = 0; + } + } + } + else + { + /* The two halves of needle are distinct; no extra memory is + required, and any mismatch results in a maximal shift. */ + period = MAX (suffix, needle_len - suffix) + 1; + j = 0; + while (AVAILABLE (haystack, haystack_len, j, needle_len)) + { + /* Scan for matches in right half. */ + i = suffix; + while (i < needle_len && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + ++i; + if (needle_len <= i) + { + /* Scan for matches in left half. */ + i = suffix - 1; + while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + --i; + if (i == SIZE_MAX) + return (RETURN_TYPE) (haystack + j); + j += period; + } + else + j += i - suffix + 1; + } + } + return NULL; +} + +/* Return the first location of non-empty NEEDLE within HAYSTACK, or + NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This + method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN. + Performance is guaranteed to be linear, with an initialization cost + of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations. + + If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at + most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, + and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible. + If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * + HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and + sublinear performance is not possible. */ +static RETURN_TYPE +two_way_long_needle (const unsigned char *haystack, size_t haystack_len, + const unsigned char *needle, size_t needle_len) +{ + size_t i; /* Index into current byte of NEEDLE. */ + size_t j; /* Index into current window of HAYSTACK. */ + size_t period; /* The period of the right half of needle. */ + size_t suffix; /* The index of the right half of needle. */ + size_t shift_table[1U << CHAR_BIT]; /* See below. */ + + /* Factor the needle into two halves, such that the left half is + smaller than the global period, and the right half is + periodic (with a period as large as NEEDLE_LEN - suffix). */ + suffix = critical_factorization (needle, needle_len, &period); + + /* Populate shift_table. For each possible byte value c, + shift_table[c] is the distance from the last occurrence of c to + the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. + shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ + for (i = 0; i < 1U << CHAR_BIT; i++) + shift_table[i] = needle_len; + for (i = 0; i < needle_len; i++) + shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; + + /* Perform the search. Each iteration compares the right half + first. */ + if (CMP_FUNC (needle, needle + period, suffix) == 0) + { + /* Entire needle is periodic; a mismatch in the left half can + only advance by the period, so use memory to avoid rescanning + known occurrences of the period in the right half. */ + size_t memory = 0; + size_t shift; + j = 0; + while (AVAILABLE (haystack, haystack_len, j, needle_len)) + { + /* Check the last byte first; if it does not match, then + shift to the next possible match location. */ + shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; + if (0 < shift) + { + if (memory && shift < period) + { + /* Since needle is periodic, but the last period has + a byte out of place, there can be no match until + after the mismatch. */ + shift = needle_len - period; + } + memory = 0; + j += shift; + continue; + } + /* Scan for matches in right half. The last byte has + already been matched, by virtue of the shift table. */ + i = MAX (suffix, memory); + while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + ++i; + if (needle_len - 1 <= i) + { + /* Scan for matches in left half. */ + i = suffix - 1; + while (memory < i + 1 && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + --i; + if (i + 1 < memory + 1) + return (RETURN_TYPE) (haystack + j); + /* No match, so remember how many repetitions of period + on the right half were scanned. */ + j += period; + memory = needle_len - period; + } + else + { + j += i - suffix + 1; + memory = 0; + } + } + } + else + { + /* The two halves of needle are distinct; no extra memory is + required, and any mismatch results in a maximal shift. */ + size_t shift; + period = MAX (suffix, needle_len - suffix) + 1; + j = 0; + while (AVAILABLE (haystack, haystack_len, j, needle_len)) + { + /* Check the last byte first; if it does not match, then + shift to the next possible match location. */ + shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; + if (0 < shift) + { + j += shift; + continue; + } + /* Scan for matches in right half. The last byte has + already been matched, by virtue of the shift table. */ + i = suffix; + while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + ++i; + if (needle_len - 1 <= i) + { + /* Scan for matches in left half. */ + i = suffix - 1; + while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) + == CANON_ELEMENT (haystack[i + j]))) + --i; + if (i == SIZE_MAX) + return (RETURN_TYPE) (haystack + j); + j += period; + } + else + j += i - suffix + 1; + } + } + return NULL; +} + +#undef AVAILABLE +#undef CANON_ELEMENT +#undef CMP_FUNC +#undef MAX +#undef RETURN_TYPE diff --git a/gl/lib/strcasecmp.c b/gl/lib/strcasecmp.c new file mode 100644 index 0000000..90177d5 --- /dev/null +++ b/gl/lib/strcasecmp.c @@ -0,0 +1,62 @@ +/* Case-insensitive string comparison function. + Copyright (C) 1998-1999, 2005-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include + +#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) + +/* Compare strings S1 and S2, ignoring case, returning less than, equal to or + greater than zero if S1 is lexicographically less than, equal to or greater + than S2. + Note: This function does not work with multibyte strings! */ + +int +strcasecmp (const char *s1, const char *s2) +{ + const unsigned char *p1 = (const unsigned char *) s1; + const unsigned char *p2 = (const unsigned char *) s2; + unsigned char c1, c2; + + if (p1 == p2) + return 0; + + do + { + c1 = TOLOWER (*p1); + c2 = TOLOWER (*p2); + + if (c1 == '\0') + break; + + ++p1; + ++p2; + } + while (c1 == c2); + + if (UCHAR_MAX <= INT_MAX) + return c1 - c2; + else + /* On machines where 'char' and 'int' are types of the same size, the + difference of two 'unsigned char' values - including the sign bit - + doesn't fit in an 'int'. */ + return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); +} diff --git a/gl/lib/strcasestr.c b/gl/lib/strcasestr.c new file mode 100644 index 0000000..7ac738d --- /dev/null +++ b/gl/lib/strcasestr.c @@ -0,0 +1,82 @@ +/* Case-insensitive searching in a string. + Copyright (C) 2005-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2005. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include + +#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) + +/* Two-Way algorithm. */ +#define RETURN_TYPE char * +#define AVAILABLE(h, h_l, j, n_l) \ + (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ + && ((h_l) = (j) + (n_l))) +#define CANON_ELEMENT(c) TOLOWER (c) +#define CMP_FUNC(p1, p2, l) \ + strncasecmp ((const char *) (p1), (const char *) (p2), l) +#include "str-two-way.h" + +/* Find the first occurrence of NEEDLE in HAYSTACK, using + case-insensitive comparison. This function gives unspecified + results in multibyte locales. */ +char * +strcasestr (const char *haystack_start, const char *needle_start) +{ + const char *haystack = haystack_start; + const char *needle = needle_start; + size_t needle_len; /* Length of NEEDLE. */ + size_t haystack_len; /* Known minimum length of HAYSTACK. */ + bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ + + /* Determine length of NEEDLE, and in the process, make sure + HAYSTACK is at least as long (no point processing all of a long + NEEDLE if HAYSTACK is too short). */ + while (*haystack && *needle) + { + ok &= (TOLOWER ((unsigned char) *haystack) + == TOLOWER ((unsigned char) *needle)); + haystack++; + needle++; + } + if (*needle) + return NULL; + if (ok) + return (char *) haystack_start; + needle_len = needle - needle_start; + haystack = haystack_start + 1; + haystack_len = needle_len - 1; + + /* Perform the search. Abstract memory is considered to be an array + of 'unsigned char' values, not an array of 'char' values. See + ISO C 99 section 6.2.6.1. */ + if (needle_len < LONG_NEEDLE_THRESHOLD) + return two_way_short_needle ((const unsigned char *) haystack, + haystack_len, + (const unsigned char *) needle_start, + needle_len); + return two_way_long_needle ((const unsigned char *) haystack, haystack_len, + (const unsigned char *) needle_start, + needle_len); +} + +#undef LONG_NEEDLE_THRESHOLD diff --git a/gl/lib/strdup.c b/gl/lib/strdup.c new file mode 100644 index 0000000..14cb126 --- /dev/null +++ b/gl/lib/strdup.c @@ -0,0 +1,54 @@ +/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#ifndef _LIBC +# include +#endif + +/* Get specification. */ +#include + +#include + +#undef __strdup +#ifdef _LIBC +# undef strdup +#endif + +#ifndef weak_alias +# define __strdup strdup +#endif + +/* Duplicate S, returning an identical malloc'd string. */ +char * +__strdup (const char *s) +{ + size_t len = strlen (s) + 1; + void *new = malloc (len); + + if (new == NULL) + return NULL; + + return (char *) memcpy (new, s, len); +} +#ifdef libc_hidden_def +libc_hidden_def (__strdup) +#endif +#ifdef weak_alias +weak_alias (__strdup, strdup) +#endif diff --git a/gl/lib/streq.h b/gl/lib/streq.h new file mode 100644 index 0000000..0e62fb9 --- /dev/null +++ b/gl/lib/streq.h @@ -0,0 +1,176 @@ +/* Optimized string comparison. + Copyright (C) 2001-2002, 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible . */ + +#ifndef _GL_STREQ_H +#define _GL_STREQ_H + +#include + +/* STREQ_OPT allows to optimize string comparison with a small literal string. + STREQ_OPT (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) + is semantically equivalent to + strcmp (s, "EUC-KR") == 0 + just faster. */ + +/* Help GCC to generate good code for string comparisons with + immediate strings. */ +#if defined (__GNUC__) && defined (__OPTIMIZE__) + +static inline int +streq9 (const char *s1, const char *s2) +{ + return strcmp (s1 + 9, s2 + 9) == 0; +} + +static inline int +streq8 (const char *s1, const char *s2, char s28) +{ + if (s1[8] == s28) + { + if (s28 == 0) + return 1; + else + return streq9 (s1, s2); + } + else + return 0; +} + +static inline int +streq7 (const char *s1, const char *s2, char s27, char s28) +{ + if (s1[7] == s27) + { + if (s27 == 0) + return 1; + else + return streq8 (s1, s2, s28); + } + else + return 0; +} + +static inline int +streq6 (const char *s1, const char *s2, char s26, char s27, char s28) +{ + if (s1[6] == s26) + { + if (s26 == 0) + return 1; + else + return streq7 (s1, s2, s27, s28); + } + else + return 0; +} + +static inline int +streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28) +{ + if (s1[5] == s25) + { + if (s25 == 0) + return 1; + else + return streq6 (s1, s2, s26, s27, s28); + } + else + return 0; +} + +static inline int +streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28) +{ + if (s1[4] == s24) + { + if (s24 == 0) + return 1; + else + return streq5 (s1, s2, s25, s26, s27, s28); + } + else + return 0; +} + +static inline int +streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28) +{ + if (s1[3] == s23) + { + if (s23 == 0) + return 1; + else + return streq4 (s1, s2, s24, s25, s26, s27, s28); + } + else + return 0; +} + +static inline int +streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28) +{ + if (s1[2] == s22) + { + if (s22 == 0) + return 1; + else + return streq3 (s1, s2, s23, s24, s25, s26, s27, s28); + } + else + return 0; +} + +static inline int +streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) +{ + if (s1[1] == s21) + { + if (s21 == 0) + return 1; + else + return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28); + } + else + return 0; +} + +static inline int +streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) +{ + if (s1[0] == s20) + { + if (s20 == 0) + return 1; + else + return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28); + } + else + return 0; +} + +#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ + streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) + +#else + +#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ + (strcmp (s1, s2) == 0) + +#endif + +#endif /* _GL_STREQ_H */ diff --git a/gl/lib/strerror-override.c b/gl/lib/strerror-override.c new file mode 100644 index 0000000..255d933 --- /dev/null +++ b/gl/lib/strerror-override.c @@ -0,0 +1,302 @@ +/* strerror-override.c --- POSIX compatible system error routine + + Copyright (C) 2010-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2010. */ + +#include + +#include "strerror-override.h" + +#include + +#if GNULIB_defined_EWINSOCK /* native Windows platforms */ +# if HAVE_WINSOCK2_H +# include +# endif +#endif + +/* If ERRNUM maps to an errno value defined by gnulib, return a string + describing the error. Otherwise return NULL. */ +const char * +strerror_override (int errnum) +{ + /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */ + switch (errnum) + { +#if REPLACE_STRERROR_0 + case 0: + return "Success"; +#endif + +#if GNULIB_defined_ESOCK /* native Windows platforms with older */ + case EINPROGRESS: + return "Operation now in progress"; + case EALREADY: + return "Operation already in progress"; + case ENOTSOCK: + return "Socket operation on non-socket"; + case EDESTADDRREQ: + return "Destination address required"; + case EMSGSIZE: + return "Message too long"; + case EPROTOTYPE: + return "Protocol wrong type for socket"; + case ENOPROTOOPT: + return "Protocol not available"; + case EPROTONOSUPPORT: + return "Protocol not supported"; + case EOPNOTSUPP: + return "Operation not supported"; + case EAFNOSUPPORT: + return "Address family not supported by protocol"; + case EADDRINUSE: + return "Address already in use"; + case EADDRNOTAVAIL: + return "Cannot assign requested address"; + case ENETDOWN: + return "Network is down"; + case ENETUNREACH: + return "Network is unreachable"; + case ECONNRESET: + return "Connection reset by peer"; + case ENOBUFS: + return "No buffer space available"; + case EISCONN: + return "Transport endpoint is already connected"; + case ENOTCONN: + return "Transport endpoint is not connected"; + case ETIMEDOUT: + return "Connection timed out"; + case ECONNREFUSED: + return "Connection refused"; + case ELOOP: + return "Too many levels of symbolic links"; + case EHOSTUNREACH: + return "No route to host"; + case EWOULDBLOCK: + return "Operation would block"; +#endif +#if GNULIB_defined_ESTREAMS /* native Windows platforms with older */ + case ETXTBSY: + return "Text file busy"; + case ENODATA: + return "No data available"; + case ENOSR: + return "Out of streams resources"; + case ENOSTR: + return "Device not a stream"; + case ETIME: + return "Timer expired"; + case EOTHER: + return "Other error"; +#endif +#if GNULIB_defined_EWINSOCK /* native Windows platforms */ + case ESOCKTNOSUPPORT: + return "Socket type not supported"; + case EPFNOSUPPORT: + return "Protocol family not supported"; + case ESHUTDOWN: + return "Cannot send after transport endpoint shutdown"; + case ETOOMANYREFS: + return "Too many references: cannot splice"; + case EHOSTDOWN: + return "Host is down"; + case EPROCLIM: + return "Too many processes"; + case EUSERS: + return "Too many users"; + case EDQUOT: + return "Disk quota exceeded"; + case ESTALE: + return "Stale NFS file handle"; + case EREMOTE: + return "Object is remote"; +# if HAVE_WINSOCK2_H + /* WSA_INVALID_HANDLE maps to EBADF */ + /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */ + /* WSA_INVALID_PARAMETER maps to EINVAL */ + case WSA_OPERATION_ABORTED: + return "Overlapped operation aborted"; + case WSA_IO_INCOMPLETE: + return "Overlapped I/O event object not in signaled state"; + case WSA_IO_PENDING: + return "Overlapped operations will complete later"; + /* WSAEINTR maps to EINTR */ + /* WSAEBADF maps to EBADF */ + /* WSAEACCES maps to EACCES */ + /* WSAEFAULT maps to EFAULT */ + /* WSAEINVAL maps to EINVAL */ + /* WSAEMFILE maps to EMFILE */ + /* WSAEWOULDBLOCK maps to EWOULDBLOCK */ + /* WSAEINPROGRESS maps to EINPROGRESS */ + /* WSAEALREADY maps to EALREADY */ + /* WSAENOTSOCK maps to ENOTSOCK */ + /* WSAEDESTADDRREQ maps to EDESTADDRREQ */ + /* WSAEMSGSIZE maps to EMSGSIZE */ + /* WSAEPROTOTYPE maps to EPROTOTYPE */ + /* WSAENOPROTOOPT maps to ENOPROTOOPT */ + /* WSAEPROTONOSUPPORT maps to EPROTONOSUPPORT */ + /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */ + /* WSAEOPNOTSUPP maps to EOPNOTSUPP */ + /* WSAEPFNOSUPPORT is EPFNOSUPPORT */ + /* WSAEAFNOSUPPORT maps to EAFNOSUPPORT */ + /* WSAEADDRINUSE maps to EADDRINUSE */ + /* WSAEADDRNOTAVAIL maps to EADDRNOTAVAIL */ + /* WSAENETDOWN maps to ENETDOWN */ + /* WSAENETUNREACH maps to ENETUNREACH */ + /* WSAENETRESET maps to ENETRESET */ + /* WSAECONNABORTED maps to ECONNABORTED */ + /* WSAECONNRESET maps to ECONNRESET */ + /* WSAENOBUFS maps to ENOBUFS */ + /* WSAEISCONN maps to EISCONN */ + /* WSAENOTCONN maps to ENOTCONN */ + /* WSAESHUTDOWN is ESHUTDOWN */ + /* WSAETOOMANYREFS is ETOOMANYREFS */ + /* WSAETIMEDOUT maps to ETIMEDOUT */ + /* WSAECONNREFUSED maps to ECONNREFUSED */ + /* WSAELOOP maps to ELOOP */ + /* WSAENAMETOOLONG maps to ENAMETOOLONG */ + /* WSAEHOSTDOWN is EHOSTDOWN */ + /* WSAEHOSTUNREACH maps to EHOSTUNREACH */ + /* WSAENOTEMPTY maps to ENOTEMPTY */ + /* WSAEPROCLIM is EPROCLIM */ + /* WSAEUSERS is EUSERS */ + /* WSAEDQUOT is EDQUOT */ + /* WSAESTALE is ESTALE */ + /* WSAEREMOTE is EREMOTE */ + case WSASYSNOTREADY: + return "Network subsystem is unavailable"; + case WSAVERNOTSUPPORTED: + return "Winsock.dll version out of range"; + case WSANOTINITIALISED: + return "Successful WSAStartup not yet performed"; + case WSAEDISCON: + return "Graceful shutdown in progress"; + case WSAENOMORE: case WSA_E_NO_MORE: + return "No more results"; + case WSAECANCELLED: case WSA_E_CANCELLED: + return "Call was canceled"; + case WSAEINVALIDPROCTABLE: + return "Procedure call table is invalid"; + case WSAEINVALIDPROVIDER: + return "Service provider is invalid"; + case WSAEPROVIDERFAILEDINIT: + return "Service provider failed to initialize"; + case WSASYSCALLFAILURE: + return "System call failure"; + case WSASERVICE_NOT_FOUND: + return "Service not found"; + case WSATYPE_NOT_FOUND: + return "Class type not found"; + case WSAEREFUSED: + return "Database query was refused"; + case WSAHOST_NOT_FOUND: + return "Host not found"; + case WSATRY_AGAIN: + return "Nonauthoritative host not found"; + case WSANO_RECOVERY: + return "Nonrecoverable error"; + case WSANO_DATA: + return "Valid name, no data record of requested type"; + /* WSA_QOS_* omitted */ +# endif +#endif + +#if GNULIB_defined_ENOMSG + case ENOMSG: + return "No message of desired type"; +#endif + +#if GNULIB_defined_EIDRM + case EIDRM: + return "Identifier removed"; +#endif + +#if GNULIB_defined_ENOLINK + case ENOLINK: + return "Link has been severed"; +#endif + +#if GNULIB_defined_EPROTO + case EPROTO: + return "Protocol error"; +#endif + +#if GNULIB_defined_EMULTIHOP + case EMULTIHOP: + return "Multihop attempted"; +#endif + +#if GNULIB_defined_EBADMSG + case EBADMSG: + return "Bad message"; +#endif + +#if GNULIB_defined_EOVERFLOW + case EOVERFLOW: + return "Value too large for defined data type"; +#endif + +#if GNULIB_defined_ENOTSUP + case ENOTSUP: + return "Not supported"; +#endif + +#if GNULIB_defined_ENETRESET + case ENETRESET: + return "Network dropped connection on reset"; +#endif + +#if GNULIB_defined_ECONNABORTED + case ECONNABORTED: + return "Software caused connection abort"; +#endif + +#if GNULIB_defined_ESTALE + case ESTALE: + return "Stale NFS file handle"; +#endif + +#if GNULIB_defined_EDQUOT + case EDQUOT: + return "Disk quota exceeded"; +#endif + +#if GNULIB_defined_ECANCELED + case ECANCELED: + return "Operation canceled"; +#endif + +#if GNULIB_defined_EOWNERDEAD + case EOWNERDEAD: + return "Owner died"; +#endif + +#if GNULIB_defined_ENOTRECOVERABLE + case ENOTRECOVERABLE: + 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/lib/strerror-override.h b/gl/lib/strerror-override.h new file mode 100644 index 0000000..e98c1c1 --- /dev/null +++ b/gl/lib/strerror-override.h @@ -0,0 +1,56 @@ +/* strerror-override.h --- POSIX compatible system error routine + + Copyright (C) 2010-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _GL_STRERROR_OVERRIDE_H +# define _GL_STRERROR_OVERRIDE_H + +# include +# include + +/* Reasonable buffer size that should never trigger ERANGE; if this + proves too small, we intentionally abort(), to remind us to fix + this value. */ +# define STACKBUF_LEN 256 + +/* If ERRNUM maps to an errno value defined by gnulib, return a string + describing the error. Otherwise return NULL. */ +# if REPLACE_STRERROR_0 \ + || GNULIB_defined_ESOCK \ + || GNULIB_defined_ESTREAMS \ + || GNULIB_defined_EWINSOCK \ + || GNULIB_defined_ENOMSG \ + || GNULIB_defined_EIDRM \ + || GNULIB_defined_ENOLINK \ + || GNULIB_defined_EPROTO \ + || GNULIB_defined_EMULTIHOP \ + || GNULIB_defined_EBADMSG \ + || GNULIB_defined_EOVERFLOW \ + || GNULIB_defined_ENOTSUP \ + || GNULIB_defined_ENETRESET \ + || GNULIB_defined_ECONNABORTED \ + || GNULIB_defined_ESTALE \ + || GNULIB_defined_EDQUOT \ + || GNULIB_defined_ECANCELED \ + || GNULIB_defined_EOWNERDEAD \ + || GNULIB_defined_ENOTRECOVERABLE \ + || GNULIB_defined_EILSEQ +extern const char *strerror_override (int errnum) _GL_ATTRIBUTE_CONST; +# else +# define strerror_override(ignored) NULL +# endif + +#endif /* _GL_STRERROR_OVERRIDE_H */ diff --git a/gl/lib/strerror.c b/gl/lib/strerror.c new file mode 100644 index 0000000..e54f0cc --- /dev/null +++ b/gl/lib/strerror.c @@ -0,0 +1,70 @@ +/* strerror.c --- POSIX compatible system error routine + + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include +#include + +#include "intprops.h" +#include "strerror-override.h" +#include "verify.h" + +/* Use the system functions, not the gnulib overrides in this file. */ +#undef sprintf + +char * +strerror (int n) +#undef strerror +{ + static char buf[STACKBUF_LEN]; + size_t len; + + /* Cast away const, due to the historical signature of strerror; + callers should not be modifying the string. */ + const char *msg = strerror_override (n); + if (msg) + return (char *) msg; + + msg = strerror (n); + + /* Our strerror_r implementation might use the system's strerror + buffer, so all other clients of strerror have to see the error + copied into a buffer that we manage. This is not thread-safe, + even if the system strerror is, but portable programs shouldn't + be using strerror if they care about thread-safety. */ + if (!msg || !*msg) + { + static char const fmt[] = "Unknown error %d"; + verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n)); + sprintf (buf, fmt, n); + errno = EINVAL; + return buf; + } + + /* Fix STACKBUF_LEN if this ever aborts. */ + len = strlen (msg); + if (sizeof buf <= len) + abort (); + + return memcpy (buf, msg, len + 1); +} diff --git a/gl/lib/strerror_r.c b/gl/lib/strerror_r.c new file mode 100644 index 0000000..4aa96cb --- /dev/null +++ b/gl/lib/strerror_r.c @@ -0,0 +1,326 @@ +/* strerror_r.c --- POSIX compatible system error routine + + Copyright (C) 2010-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2010. */ + +#include + +/* Enable declaration of sys_nerr and sys_errlist in on NetBSD. */ +#define _NETBSD_SOURCE 1 + +/* Specification. */ +#include + +#include +#include +#include + +#include "strerror-override.h" + +#if (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) && HAVE___XPG_STRERROR_R /* glibc >= 2.3.4, cygwin >= 1.7.9 */ + +# define USE_XPG_STRERROR_R 1 +extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen); + +#elif HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) + +/* The system's strerror_r function is OK, except that its third argument + is 'int', not 'size_t', or its return type is wrong. */ + +# include + +# define USE_SYSTEM_STRERROR_R 1 + +#else /* (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__ ? !HAVE___XPG_STRERROR_R : !HAVE_DECL_STRERROR_R) */ + +/* Use the system's strerror(). Exclude glibc and cygwin because the + system strerror_r has the wrong return type, and cygwin 1.7.9 + strerror_r clobbers strerror. */ +# undef strerror + +# define USE_SYSTEM_STRERROR 1 + +# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __sgi || (defined __sun && !defined _LP64) || defined __CYGWIN__ + +/* No locking needed. */ + +/* Get catgets internationalization functions. */ +# if HAVE_CATGETS +# include +# endif + +/* Get sys_nerr, sys_errlist on HP-UX (otherwise only declared in C++ mode). + Get sys_nerr, sys_errlist on IRIX (otherwise only declared with _SGIAPI). */ +# if defined __hpux || defined __sgi +extern int sys_nerr; +extern char *sys_errlist[]; +# endif + +/* Get sys_nerr on Solaris. */ +# if defined __sun && !defined _LP64 +extern int sys_nerr; +# endif + +# else + +# include "glthread/lock.h" + +/* This lock protects the buffer returned by strerror(). We assume that + no other uses of strerror() exist in the program. */ +gl_lock_define_initialized(static, strerror_lock) + +# endif + +#endif + +/* On MSVC, there is no snprintf() function, just a _snprintf(). + It is of lower quality, but sufficient for the simple use here. + We only have to make sure to NUL terminate the result (_snprintf + does not NUL terminate, like strncpy). */ +#if !HAVE_SNPRINTF +static int +local_snprintf (char *buf, size_t buflen, const char *format, ...) +{ + va_list args; + int result; + + va_start (args, format); + result = _vsnprintf (buf, buflen, format, args); + va_end (args); + if (buflen > 0 && (result < 0 || result >= buflen)) + buf[buflen - 1] = '\0'; + return result; +} +# define snprintf local_snprintf +#endif + +/* Copy as much of MSG into BUF as possible, without corrupting errno. + Return 0 if MSG fit in BUFLEN, otherwise return ERANGE. */ +static int +safe_copy (char *buf, size_t buflen, const char *msg) +{ + size_t len = strlen (msg); + int ret; + + if (len < buflen) + { + /* Although POSIX allows memcpy() to corrupt errno, we don't + know of any implementation where this is a real problem. */ + memcpy (buf, msg, len + 1); + ret = 0; + } + else + { + memcpy (buf, msg, buflen - 1); + buf[buflen - 1] = '\0'; + ret = ERANGE; + } + return ret; +} + + +int +strerror_r (int errnum, char *buf, size_t buflen) +#undef strerror_r +{ + /* Filter this out now, so that rest of this replacement knows that + there is room for a non-empty message and trailing NUL. */ + if (buflen <= 1) + { + if (buflen) + *buf = '\0'; + return ERANGE; + } + *buf = '\0'; + + /* Check for gnulib overrides. */ + { + char const *msg = strerror_override (errnum); + + if (msg) + return safe_copy (buf, buflen, msg); + } + + { + int ret; + int saved_errno = errno; + +#if USE_XPG_STRERROR_R + + { + ret = __xpg_strerror_r (errnum, buf, buflen); + if (ret < 0) + ret = errno; + if (!*buf) + { + /* glibc 2.13 would not touch buf on err, so we have to fall + back to GNU strerror_r which always returns a thread-safe + untruncated string to (partially) copy into our buf. */ + safe_copy (buf, buflen, strerror_r (errnum, buf, buflen)); + } + } + +#elif USE_SYSTEM_STRERROR_R + + if (buflen > INT_MAX) + buflen = INT_MAX; + +# ifdef __hpux + /* On HP-UX 11.31, strerror_r always fails when buflen < 80; it + also fails to change buf on EINVAL. */ + { + char stackbuf[80]; + + if (buflen < sizeof stackbuf) + { + ret = strerror_r (errnum, stackbuf, sizeof stackbuf); + if (ret == 0) + ret = safe_copy (buf, buflen, stackbuf); + } + else + ret = strerror_r (errnum, buf, buflen); + } +# else + ret = strerror_r (errnum, buf, buflen); + + /* Some old implementations may return (-1, EINVAL) instead of EINVAL. */ + if (ret < 0) + ret = errno; +# endif + +# ifdef _AIX + /* AIX returns 0 rather than ERANGE when truncating strings; try + again until we are sure we got the entire string. */ + if (!ret && strlen (buf) == buflen - 1) + { + char stackbuf[STACKBUF_LEN]; + size_t len; + strerror_r (errnum, stackbuf, sizeof stackbuf); + len = strlen (stackbuf); + /* STACKBUF_LEN should have been large enough. */ + if (len + 1 == sizeof stackbuf) + abort (); + if (buflen <= len) + ret = ERANGE; + } +# else + /* Solaris 10 does not populate buf on ERANGE. OpenBSD 4.7 + truncates early on ERANGE rather than return a partial integer. + We prefer the maximal string. We set buf[0] earlier, and we + know of no implementation that modifies buf to be an + unterminated string, so this strlen should be portable in + practice (rather than pulling in a safer strnlen). */ + if (ret == ERANGE && strlen (buf) < buflen - 1) + { + char stackbuf[STACKBUF_LEN]; + + /* STACKBUF_LEN should have been large enough. */ + if (strerror_r (errnum, stackbuf, sizeof stackbuf) == ERANGE) + abort (); + safe_copy (buf, buflen, stackbuf); + } +# endif + +#else /* USE_SYSTEM_STRERROR */ + + /* Try to do what strerror (errnum) does, but without clobbering the + buffer used by strerror(). */ + +# if defined __NetBSD__ || defined __hpux || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __CYGWIN__ /* NetBSD, HP-UX, native Windows, Cygwin */ + + /* NetBSD: sys_nerr, sys_errlist are declared through _NETBSD_SOURCE + and above. + HP-UX: sys_nerr, sys_errlist are declared explicitly above. + native Windows: sys_nerr, sys_errlist are declared in . + Cygwin: sys_nerr, sys_errlist are declared in . */ + if (errnum >= 0 && errnum < sys_nerr) + { +# if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux) +# if defined __NetBSD__ + nl_catd catd = catopen ("libc", NL_CAT_LOCALE); + const char *errmsg = + (catd != (nl_catd)-1 + ? catgets (catd, 1, errnum, sys_errlist[errnum]) + : sys_errlist[errnum]); +# endif +# if defined __hpux + nl_catd catd = catopen ("perror", NL_CAT_LOCALE); + const char *errmsg = + (catd != (nl_catd)-1 + ? catgets (catd, 1, 1 + errnum, sys_errlist[errnum]) + : sys_errlist[errnum]); +# endif +# else + const char *errmsg = sys_errlist[errnum]; +# endif + if (errmsg == NULL || *errmsg == '\0') + ret = EINVAL; + else + ret = safe_copy (buf, buflen, errmsg); +# if HAVE_CATGETS && (defined __NetBSD__ || defined __hpux) + if (catd != (nl_catd)-1) + catclose (catd); +# endif + } + else + ret = EINVAL; + +# elif defined __sgi || (defined __sun && !defined _LP64) /* IRIX, Solaris <= 9 32-bit */ + + /* For a valid error number, the system's strerror() function returns + a pointer to a not copied string, not to a buffer. */ + if (errnum >= 0 && errnum < sys_nerr) + { + char *errmsg = strerror (errnum); + + if (errmsg == NULL || *errmsg == '\0') + ret = EINVAL; + else + ret = safe_copy (buf, buflen, errmsg); + } + else + ret = EINVAL; + +# else + + gl_lock_lock (strerror_lock); + + { + char *errmsg = strerror (errnum); + + /* For invalid error numbers, strerror() on + - IRIX 6.5 returns NULL, + - HP-UX 11 returns an empty string. */ + if (errmsg == NULL || *errmsg == '\0') + ret = EINVAL; + else + ret = safe_copy (buf, buflen, errmsg); + } + + gl_lock_unlock (strerror_lock); + +# endif + +#endif + + if (ret == EINVAL && !*buf) + snprintf (buf, buflen, "Unknown error %d", errnum); + + errno = saved_errno; + return ret; + } +} diff --git a/gl/lib/strftime.c b/gl/lib/strftime.c new file mode 100644 index 0000000..857cca5 --- /dev/null +++ b/gl/lib/strftime.c @@ -0,0 +1,1487 @@ +/* Copyright (C) 1991-2001, 2003-2007, 2009-2014 Free Software Foundation, Inc. + + NOTE: The canonical source of this file is maintained with the GNU C Library. + Bugs can be reported to bug-glibc@prep.ai.mit.edu. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef _LIBC +# define HAVE_STRUCT_ERA_ENTRY 1 +# define HAVE_TM_GMTOFF 1 +# define HAVE_TM_ZONE 1 +# define HAVE_TZNAME 1 +# define HAVE_TZSET 1 +# include "../locale/localeinfo.h" +#else +# include +# if FPRINTFTIME +# include "fprintftime.h" +# else +# include "strftime.h" +# endif +#endif + +#include +#include + +#if HAVE_TZNAME && !HAVE_DECL_TZNAME +extern char *tzname[]; +#endif + +/* Do multibyte processing if multibyte encodings are supported, unless + multibyte sequences are safe in formats. Multibyte sequences are + safe if they cannot contain byte sequences that look like format + conversion specifications. The multibyte encodings used by the + C library on the various platforms (UTF-8, GB2312, GBK, CP936, + GB18030, EUC-TW, BIG5, BIG5-HKSCS, CP950, EUC-JP, EUC-KR, CP949, + SHIFT_JIS, CP932, JOHAB) are safe for formats, because the byte '%' + cannot occur in a multibyte character except in the first byte. + + The DEC-HANYU encoding used on OSF/1 is not safe for formats, but + this encoding has never been seen in real-life use, so we ignore + it. */ +#if !(defined __osf__ && 0) +# define MULTIBYTE_IS_FORMAT_SAFE 1 +#endif +#define DO_MULTIBYTE (! MULTIBYTE_IS_FORMAT_SAFE) + +#if DO_MULTIBYTE +# include + static const mbstate_t mbstate_zero; +#endif + +#include +#include +#include +#include +#include + +#ifdef COMPILE_WIDE +# include +# define CHAR_T wchar_t +# define UCHAR_T unsigned int +# define L_(Str) L##Str +# define NLW(Sym) _NL_W##Sym + +# define MEMCPY(d, s, n) __wmemcpy (d, s, n) +# define STRLEN(s) __wcslen (s) + +#else +# define CHAR_T char +# define UCHAR_T unsigned char +# define L_(Str) Str +# define NLW(Sym) Sym + +# define MEMCPY(d, s, n) memcpy (d, s, n) +# define STRLEN(s) strlen (s) + +#endif + +/* Shift A right by B bits portably, by dividing A by 2**B and + truncating towards minus infinity. A and B should be free of side + effects, and B should be in the range 0 <= B <= INT_BITS - 2, where + INT_BITS is the number of useful bits in an int. GNU code can + assume that INT_BITS is at least 32. + + ISO C99 says that A >> B is implementation-defined if A < 0. Some + implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift + right in the usual way when A < 0, so SHR falls back on division if + ordinary A >> B doesn't seem to be the usual signed shift. */ +#define SHR(a, b) \ + (-1 >> 1 == -1 \ + ? (a) >> (b) \ + : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) + +/* Bound on length of the string representing an integer type or expression T. + Subtract 1 for the sign bit if t is signed; log10 (2.0) < 146/485; + add 1 for integer division truncation; add 1 more for a minus sign + if needed. */ +#define INT_STRLEN_BOUND(t) \ + ((sizeof (t) * CHAR_BIT - 1) * 146 / 485 + 2) + +#define TM_YEAR_BASE 1900 + +#ifndef __isleap +/* Nonzero if YEAR is a leap year (every 4 years, + except every 100th isn't, and every 400th is). */ +# define __isleap(year) \ + ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) +#endif + + +#ifdef _LIBC +# define tzname __tzname +# define tzset __tzset +#endif + +#if !HAVE_TM_GMTOFF +/* Portable standalone applications should supply a "time.h" that + declares a POSIX-compliant localtime_r, for the benefit of older + implementations that lack localtime_r or have a nonstandard one. + See the gnulib time_r module for one way to implement this. */ +# undef __gmtime_r +# undef __localtime_r +# define __gmtime_r gmtime_r +# define __localtime_r localtime_r +#endif + + +#ifndef FPRINTFTIME +# define FPRINTFTIME 0 +#endif + +#if FPRINTFTIME +# define STREAM_OR_CHAR_T FILE +# define STRFTIME_ARG(x) /* empty */ +#else +# define STREAM_OR_CHAR_T CHAR_T +# define STRFTIME_ARG(x) x, +#endif + +#if FPRINTFTIME +# define memset_byte(P, Len, Byte) \ + do { size_t _i; for (_i = 0; _i < Len; _i++) fputc (Byte, P); } while (0) +# define memset_space(P, Len) memset_byte (P, Len, ' ') +# define memset_zero(P, Len) memset_byte (P, Len, '0') +#elif defined COMPILE_WIDE +# define memset_space(P, Len) (wmemset (P, L' ', Len), (P) += (Len)) +# define memset_zero(P, Len) (wmemset (P, L'0', Len), (P) += (Len)) +#else +# define memset_space(P, Len) (memset (P, ' ', Len), (P) += (Len)) +# define memset_zero(P, Len) (memset (P, '0', Len), (P) += (Len)) +#endif + +#if FPRINTFTIME +# define advance(P, N) +#else +# define advance(P, N) ((P) += (N)) +#endif + +#define add(n, f) \ + do \ + { \ + size_t _n = (n); \ + size_t _w = (width < 0 ? 0 : width); \ + size_t _incr = _n < _w ? _w : _n; \ + if (_incr >= maxsize - i) \ + return 0; \ + if (p) \ + { \ + if (digits == 0 && _n < _w) \ + { \ + size_t _delta = width - _n; \ + if (pad == L_('0')) \ + memset_zero (p, _delta); \ + else \ + memset_space (p, _delta); \ + } \ + f; \ + advance (p, _n); \ + } \ + i += _incr; \ + } while (0) + +#if FPRINTFTIME +# define add1(C) add (1, fputc (C, p)) +#else +# define add1(C) add (1, *p = C) +#endif + +#if FPRINTFTIME +# define cpy(n, s) \ + add ((n), \ + do \ + { \ + if (to_lowcase) \ + fwrite_lowcase (p, (s), _n); \ + else if (to_uppcase) \ + fwrite_uppcase (p, (s), _n); \ + else \ + { \ + /* Ignore the value of fwrite. The caller can determine whether \ + an error occurred by inspecting ferror (P). All known fwrite \ + implementations set the stream's error indicator when they \ + fail due to ENOMEM etc., even though C11 and POSIX.1-2008 do \ + not require this. */ \ + fwrite (s, _n, 1, p); \ + } \ + } \ + while (0) \ + ) +#else +# define cpy(n, s) \ + add ((n), \ + if (to_lowcase) \ + memcpy_lowcase (p, (s), _n LOCALE_ARG); \ + else if (to_uppcase) \ + memcpy_uppcase (p, (s), _n LOCALE_ARG); \ + else \ + MEMCPY ((void *) p, (void const *) (s), _n)) +#endif + +#ifdef COMPILE_WIDE +# ifndef USE_IN_EXTENDED_LOCALE_MODEL +# undef __mbsrtowcs_l +# define __mbsrtowcs_l(d, s, l, st, loc) __mbsrtowcs (d, s, l, st) +# endif +# define widen(os, ws, l) \ + { \ + mbstate_t __st; \ + const char *__s = os; \ + memset (&__st, '\0', sizeof (__st)); \ + l = __mbsrtowcs_l (NULL, &__s, 0, &__st, loc); \ + ws = (wchar_t *) alloca ((l + 1) * sizeof (wchar_t)); \ + (void) __mbsrtowcs_l (ws, &__s, l, &__st, loc); \ + } +#endif + + +#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL +/* We use this code also for the extended locale handling where the + function gets as an additional argument the locale which has to be + used. To access the values we have to redefine the _NL_CURRENT + macro. */ +# define strftime __strftime_l +# define wcsftime __wcsftime_l +# undef _NL_CURRENT +# define _NL_CURRENT(category, item) \ + (current->values[_NL_ITEM_INDEX (item)].string) +# define LOCALE_ARG , loc +# define LOCALE_PARAM_PROTO , __locale_t loc +# define HELPER_LOCALE_ARG , current +#else +# define LOCALE_PARAM_PROTO +# define LOCALE_ARG +# ifdef _LIBC +# define HELPER_LOCALE_ARG , _NL_CURRENT_DATA (LC_TIME) +# else +# define HELPER_LOCALE_ARG +# endif +#endif + +#ifdef COMPILE_WIDE +# ifdef USE_IN_EXTENDED_LOCALE_MODEL +# define TOUPPER(Ch, L) __towupper_l (Ch, L) +# define TOLOWER(Ch, L) __towlower_l (Ch, L) +# else +# define TOUPPER(Ch, L) towupper (Ch) +# define TOLOWER(Ch, L) towlower (Ch) +# endif +#else +# ifdef USE_IN_EXTENDED_LOCALE_MODEL +# define TOUPPER(Ch, L) __toupper_l (Ch, L) +# define TOLOWER(Ch, L) __tolower_l (Ch, L) +# else +# define TOUPPER(Ch, L) toupper (Ch) +# define TOLOWER(Ch, L) tolower (Ch) +# endif +#endif +/* We don't use 'isdigit' here since the locale dependent + interpretation is not what we want here. We only need to accept + the arabic digits in the ASCII range. One day there is perhaps a + more reliable way to accept other sets of digits. */ +#define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9) + +#if FPRINTFTIME +static void +fwrite_lowcase (FILE *fp, const CHAR_T *src, size_t len) +{ + while (len-- > 0) + { + fputc (TOLOWER ((UCHAR_T) *src, loc), fp); + ++src; + } +} + +static void +fwrite_uppcase (FILE *fp, const CHAR_T *src, size_t len) +{ + while (len-- > 0) + { + fputc (TOUPPER ((UCHAR_T) *src, loc), fp); + ++src; + } +} +#else +static CHAR_T * +memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, + size_t len LOCALE_PARAM_PROTO) +{ + while (len-- > 0) + dest[len] = TOLOWER ((UCHAR_T) src[len], loc); + return dest; +} + +static CHAR_T * +memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, + size_t len LOCALE_PARAM_PROTO) +{ + while (len-- > 0) + dest[len] = TOUPPER ((UCHAR_T) src[len], loc); + return dest; +} +#endif + + +#if ! HAVE_TM_GMTOFF +/* Yield the difference between *A and *B, + measured in seconds, ignoring leap seconds. */ +# define tm_diff ftime_tm_diff +static int +tm_diff (const struct tm *a, const struct tm *b) +{ + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid int overflow in leap day calculations, + but it's OK to assume that A and B are close to each other. */ + int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); + int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = SHR (a100, 2); + int b400 = SHR (b100, 2); + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + int years = a->tm_year - b->tm_year; + int days = (365 * years + intervening_leap_days + + (a->tm_yday - b->tm_yday)); + return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + + (a->tm_min - b->tm_min)) + + (a->tm_sec - b->tm_sec)); +} +#endif /* ! HAVE_TM_GMTOFF */ + + + +/* The number of days from the first day of the first ISO week of this + year to the year day YDAY with week day WDAY. ISO weeks start on + Monday; the first ISO week has the year's first Thursday. YDAY may + be as small as YDAY_MINIMUM. */ +#define ISO_WEEK_START_WDAY 1 /* Monday */ +#define ISO_WEEK1_WDAY 4 /* Thursday */ +#define YDAY_MINIMUM (-366) +#ifdef __GNUC__ +__inline__ +#endif +static int +iso_week_days (int yday, int wday) +{ + /* Add enough to the first operand of % to make it nonnegative. */ + int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7; + return (yday + - (yday - wday + ISO_WEEK1_WDAY + big_enough_multiple_of_7) % 7 + + ISO_WEEK1_WDAY - ISO_WEEK_START_WDAY); +} + + +/* When compiling this file, GNU applications can #define my_strftime + to a symbol (typically nstrftime) to get an extended strftime with + extra arguments UT and NS. Emacs is a special case for now, but + this Emacs-specific code can be removed once Emacs's config.h + defines my_strftime. */ +#if defined emacs && !defined my_strftime +# define my_strftime nstrftime +#endif + +#if FPRINTFTIME +# undef my_strftime +# define my_strftime fprintftime +#endif + +#ifdef my_strftime +# define extra_args , ut, ns +# define extra_args_spec , int ut, int ns +#else +# if defined COMPILE_WIDE +# define my_strftime wcsftime +# define nl_get_alt_digit _nl_get_walt_digit +# else +# define my_strftime strftime +# define nl_get_alt_digit _nl_get_alt_digit +# endif +# define extra_args +# define extra_args_spec +/* We don't have this information in general. */ +# define ut 0 +# define ns 0 +#endif + + +/* Just like my_strftime, below, but with one more parameter, UPCASE, + to indicate that the result should be converted to upper case. */ +static size_t +strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s, + STRFTIME_ARG (size_t maxsize) + const CHAR_T *format, + const struct tm *tp extra_args_spec LOCALE_PARAM_PROTO) +{ +#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL + struct locale_data *const current = loc->__locales[LC_TIME]; +#endif +#if FPRINTFTIME + size_t maxsize = (size_t) -1; +#endif + + int hour12 = tp->tm_hour; +#ifdef _NL_CURRENT + /* We cannot make the following values variables since we must delay + the evaluation of these values until really needed since some + expressions might not be valid in every situation. The 'struct tm' + might be generated by a strptime() call that initialized + only a few elements. Dereference the pointers only if the format + requires this. Then it is ok to fail if the pointers are invalid. */ +# define a_wkday \ + ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday)) +# define f_wkday \ + ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday)) +# define a_month \ + ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon)) +# define f_month \ + ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)) +# define ampm \ + ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \ + ? NLW(PM_STR) : NLW(AM_STR))) + +# define aw_len STRLEN (a_wkday) +# define am_len STRLEN (a_month) +# define ap_len STRLEN (ampm) +#endif + const char *zone; + size_t i = 0; + STREAM_OR_CHAR_T *p = s; + const CHAR_T *f; +#if DO_MULTIBYTE && !defined COMPILE_WIDE + const char *format_end = NULL; +#endif + +#if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST + /* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned + by localtime. On such systems, we must either use the tzset and + localtime wrappers to work around the bug (which sets + HAVE_RUN_TZSET_TEST) or make a copy of the structure. */ + struct tm copy = *tp; + tp = © +#endif + + zone = NULL; +#if HAVE_TM_ZONE + /* The POSIX test suite assumes that setting + the environment variable TZ to a new value before calling strftime() + will influence the result (the %Z format) even if the information in + TP is computed with a totally different time zone. + This is bogus: though POSIX allows bad behavior like this, + POSIX does not require it. Do the right thing instead. */ + zone = (const char *) tp->tm_zone; +#endif +#if HAVE_TZNAME + if (ut) + { + if (! (zone && *zone)) + zone = "GMT"; + } + else + { + /* POSIX.1 requires that local time zone information be used as + though strftime called tzset. */ +# if HAVE_TZSET + tzset (); +# endif + } +#endif + + if (hour12 > 12) + hour12 -= 12; + else + if (hour12 == 0) + hour12 = 12; + + for (f = format; *f != '\0'; ++f) + { + int pad = 0; /* Padding for number ('-', '_', or 0). */ + int modifier; /* Field modifier ('E', 'O', or 0). */ + int digits = 0; /* Max digits for numeric format. */ + int number_value; /* Numeric value to be printed. */ + unsigned int u_number_value; /* (unsigned int) number_value. */ + bool negative_number; /* The number is negative. */ + bool always_output_a_sign; /* +/- should always be output. */ + int tz_colon_mask; /* Bitmask of where ':' should appear. */ + const CHAR_T *subfmt; + CHAR_T sign_char; + CHAR_T *bufp; + CHAR_T buf[1 + + 2 /* for the two colons in a %::z or %:::z time zone */ + + (sizeof (int) < sizeof (time_t) + ? INT_STRLEN_BOUND (time_t) + : INT_STRLEN_BOUND (int))]; + int width = -1; + bool to_lowcase = false; + bool to_uppcase = upcase; + size_t colons; + bool change_case = false; + int format_char; + +#if DO_MULTIBYTE && !defined COMPILE_WIDE + switch (*f) + { + case L_('%'): + break; + + case L_('\b'): case L_('\t'): case L_('\n'): + case L_('\v'): case L_('\f'): case L_('\r'): + case L_(' '): case L_('!'): case L_('"'): case L_('#'): case L_('&'): + case L_('\''): case L_('('): case L_(')'): case L_('*'): case L_('+'): + case L_(','): case L_('-'): case L_('.'): case L_('/'): case L_('0'): + case L_('1'): case L_('2'): case L_('3'): case L_('4'): case L_('5'): + case L_('6'): case L_('7'): case L_('8'): case L_('9'): case L_(':'): + case L_(';'): case L_('<'): case L_('='): case L_('>'): case L_('?'): + case L_('A'): case L_('B'): case L_('C'): case L_('D'): case L_('E'): + case L_('F'): case L_('G'): case L_('H'): case L_('I'): case L_('J'): + case L_('K'): case L_('L'): case L_('M'): case L_('N'): case L_('O'): + case L_('P'): case L_('Q'): case L_('R'): case L_('S'): case L_('T'): + case L_('U'): case L_('V'): case L_('W'): case L_('X'): case L_('Y'): + case L_('Z'): case L_('['): case L_('\\'): case L_(']'): case L_('^'): + case L_('_'): case L_('a'): case L_('b'): case L_('c'): case L_('d'): + case L_('e'): case L_('f'): case L_('g'): case L_('h'): case L_('i'): + case L_('j'): case L_('k'): case L_('l'): case L_('m'): case L_('n'): + case L_('o'): case L_('p'): case L_('q'): case L_('r'): case L_('s'): + case L_('t'): case L_('u'): case L_('v'): case L_('w'): case L_('x'): + case L_('y'): case L_('z'): case L_('{'): case L_('|'): case L_('}'): + case L_('~'): + /* The C Standard requires these 98 characters (plus '%') to + be in the basic execution character set. None of these + characters can start a multibyte sequence, so they need + not be analyzed further. */ + add1 (*f); + continue; + + default: + /* Copy this multibyte sequence until we reach its end, find + an error, or come back to the initial shift state. */ + { + mbstate_t mbstate = mbstate_zero; + size_t len = 0; + size_t fsize; + + if (! format_end) + format_end = f + strlen (f) + 1; + fsize = format_end - f; + + do + { + size_t bytes = mbrlen (f + len, fsize - len, &mbstate); + + if (bytes == 0) + break; + + if (bytes == (size_t) -2) + { + len += strlen (f + len); + break; + } + + if (bytes == (size_t) -1) + { + len++; + break; + } + + len += bytes; + } + while (! mbsinit (&mbstate)); + + cpy (len, f); + f += len - 1; + continue; + } + } + +#else /* ! DO_MULTIBYTE */ + + /* Either multibyte encodings are not supported, they are + safe for formats, so any non-'%' byte can be copied through, + or this is the wide character version. */ + if (*f != L_('%')) + { + add1 (*f); + continue; + } + +#endif /* ! DO_MULTIBYTE */ + + /* Check for flags that can modify a format. */ + while (1) + { + switch (*++f) + { + /* This influences the number formats. */ + case L_('_'): + case L_('-'): + case L_('0'): + pad = *f; + continue; + + /* This changes textual output. */ + case L_('^'): + to_uppcase = true; + continue; + case L_('#'): + change_case = true; + continue; + + default: + break; + } + break; + } + + /* As a GNU extension we allow to specify the field width. */ + if (ISDIGIT (*f)) + { + width = 0; + do + { + if (width > INT_MAX / 10 + || (width == INT_MAX / 10 && *f - L_('0') > INT_MAX % 10)) + /* Avoid overflow. */ + width = INT_MAX; + else + { + width *= 10; + width += *f - L_('0'); + } + ++f; + } + while (ISDIGIT (*f)); + } + + /* Check for modifiers. */ + switch (*f) + { + case L_('E'): + case L_('O'): + modifier = *f++; + break; + + default: + modifier = 0; + break; + } + + /* Now do the specified format. */ + format_char = *f; + switch (format_char) + { +#define DO_NUMBER(d, v) \ + do \ + { \ + digits = d; \ + number_value = v; \ + goto do_number; \ + } \ + while (0) +#define DO_SIGNED_NUMBER(d, negative, v) \ + do \ + { \ + digits = d; \ + negative_number = negative; \ + u_number_value = v; \ + goto do_signed_number; \ + } \ + while (0) + + /* The mask is not what you might think. + When the ordinal i'th bit is set, insert a colon + before the i'th digit of the time zone representation. */ +#define DO_TZ_OFFSET(d, negative, mask, v) \ + do \ + { \ + digits = d; \ + negative_number = negative; \ + tz_colon_mask = mask; \ + u_number_value = v; \ + goto do_tz_offset; \ + } \ + while (0) +#define DO_NUMBER_SPACEPAD(d, v) \ + do \ + { \ + digits = d; \ + number_value = v; \ + goto do_number_spacepad; \ + } \ + while (0) + + case L_('%'): + if (modifier != 0) + goto bad_format; + add1 (*f); + break; + + case L_('a'): + if (modifier != 0) + goto bad_format; + if (change_case) + { + to_uppcase = true; + to_lowcase = false; + } +#ifdef _NL_CURRENT + cpy (aw_len, a_wkday); + break; +#else + goto underlying_strftime; +#endif + + case 'A': + if (modifier != 0) + goto bad_format; + if (change_case) + { + to_uppcase = true; + to_lowcase = false; + } +#ifdef _NL_CURRENT + cpy (STRLEN (f_wkday), f_wkday); + break; +#else + goto underlying_strftime; +#endif + + case L_('b'): + case L_('h'): + if (change_case) + { + to_uppcase = true; + to_lowcase = false; + } + if (modifier != 0) + goto bad_format; +#ifdef _NL_CURRENT + cpy (am_len, a_month); + break; +#else + goto underlying_strftime; +#endif + + case L_('B'): + if (modifier != 0) + goto bad_format; + if (change_case) + { + to_uppcase = true; + to_lowcase = false; + } +#ifdef _NL_CURRENT + cpy (STRLEN (f_month), f_month); + break; +#else + goto underlying_strftime; +#endif + + case L_('c'): + if (modifier == L_('O')) + goto bad_format; +#ifdef _NL_CURRENT + if (! (modifier == 'E' + && (*(subfmt = + (const CHAR_T *) _NL_CURRENT (LC_TIME, + NLW(ERA_D_T_FMT))) + != '\0'))) + subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT)); +#else + goto underlying_strftime; +#endif + + subformat: + { + size_t len = strftime_case_ (to_uppcase, + NULL, STRFTIME_ARG ((size_t) -1) + subfmt, + tp extra_args LOCALE_ARG); + add (len, strftime_case_ (to_uppcase, p, + STRFTIME_ARG (maxsize - i) + subfmt, + tp extra_args LOCALE_ARG)); + } + break; + +#if !(defined _NL_CURRENT && HAVE_STRUCT_ERA_ENTRY) + underlying_strftime: + { + /* The relevant information is available only via the + underlying strftime implementation, so use that. */ + char ufmt[5]; + char *u = ufmt; + char ubuf[1024]; /* enough for any single format in practice */ + size_t len; + /* Make sure we're calling the actual underlying strftime. + In some cases, config.h contains something like + "#define strftime rpl_strftime". */ +# ifdef strftime +# undef strftime + size_t strftime (); +# endif + + /* The space helps distinguish strftime failure from empty + output. */ + *u++ = ' '; + *u++ = '%'; + if (modifier != 0) + *u++ = modifier; + *u++ = format_char; + *u = '\0'; + len = strftime (ubuf, sizeof ubuf, ufmt, tp); + if (len != 0) + cpy (len - 1, ubuf + 1); + } + break; +#endif + + case L_('C'): + if (modifier == L_('O')) + goto bad_format; + if (modifier == L_('E')) + { +#if HAVE_STRUCT_ERA_ENTRY + struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); + if (era) + { +# ifdef COMPILE_WIDE + size_t len = __wcslen (era->era_wname); + cpy (len, era->era_wname); +# else + size_t len = strlen (era->era_name); + cpy (len, era->era_name); +# endif + break; + } +#else + goto underlying_strftime; +#endif + } + + { + int century = tp->tm_year / 100 + TM_YEAR_BASE / 100; + century -= tp->tm_year % 100 < 0 && 0 < century; + DO_SIGNED_NUMBER (2, tp->tm_year < - TM_YEAR_BASE, century); + } + + case L_('x'): + if (modifier == L_('O')) + goto bad_format; +#ifdef _NL_CURRENT + if (! (modifier == L_('E') + && (*(subfmt = + (const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT))) + != L_('\0')))) + subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT)); + goto subformat; +#else + goto underlying_strftime; +#endif + case L_('D'): + if (modifier != 0) + goto bad_format; + subfmt = L_("%m/%d/%y"); + goto subformat; + + case L_('d'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, tp->tm_mday); + + case L_('e'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER_SPACEPAD (2, tp->tm_mday); + + /* All numeric formats set DIGITS and NUMBER_VALUE (or U_NUMBER_VALUE) + and then jump to one of these labels. */ + + do_tz_offset: + always_output_a_sign = true; + goto do_number_body; + + do_number_spacepad: + /* Force '_' flag unless overridden by '0' or '-' flag. */ + if (pad != L_('0') && pad != L_('-')) + pad = L_('_'); + + do_number: + /* Format NUMBER_VALUE according to the MODIFIER flag. */ + negative_number = number_value < 0; + u_number_value = number_value; + + do_signed_number: + always_output_a_sign = false; + tz_colon_mask = 0; + + do_number_body: + /* Format U_NUMBER_VALUE according to the MODIFIER flag. + NEGATIVE_NUMBER is nonzero if the original number was + negative; in this case it was converted directly to + unsigned int (i.e., modulo (UINT_MAX + 1)) without + negating it. */ + if (modifier == L_('O') && !negative_number) + { +#ifdef _NL_CURRENT + /* Get the locale specific alternate representation of + the number. If none exist NULL is returned. */ + const CHAR_T *cp = nl_get_alt_digit (u_number_value + HELPER_LOCALE_ARG); + + if (cp != NULL) + { + size_t digitlen = STRLEN (cp); + if (digitlen != 0) + { + cpy (digitlen, cp); + break; + } + } +#else + goto underlying_strftime; +#endif + } + + bufp = buf + sizeof (buf) / sizeof (buf[0]); + + if (negative_number) + u_number_value = - u_number_value; + + do + { + if (tz_colon_mask & 1) + *--bufp = ':'; + tz_colon_mask >>= 1; + *--bufp = u_number_value % 10 + L_('0'); + u_number_value /= 10; + } + while (u_number_value != 0 || tz_colon_mask != 0); + + do_number_sign_and_padding: + if (digits < width) + digits = width; + + sign_char = (negative_number ? L_('-') + : always_output_a_sign ? L_('+') + : 0); + + if (pad == L_('-')) + { + if (sign_char) + add1 (sign_char); + } + else + { + int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0])) + - bufp) - !!sign_char; + + if (padding > 0) + { + if (pad == L_('_')) + { + if ((size_t) padding >= maxsize - i) + return 0; + + if (p) + memset_space (p, padding); + i += padding; + width = width > padding ? width - padding : 0; + if (sign_char) + add1 (sign_char); + } + else + { + if ((size_t) digits >= maxsize - i) + return 0; + + if (sign_char) + add1 (sign_char); + + if (p) + memset_zero (p, padding); + i += padding; + width = 0; + } + } + else + { + if (sign_char) + add1 (sign_char); + } + } + + cpy (buf + sizeof (buf) / sizeof (buf[0]) - bufp, bufp); + break; + + case L_('F'): + if (modifier != 0) + goto bad_format; + subfmt = L_("%Y-%m-%d"); + goto subformat; + + case L_('H'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, tp->tm_hour); + + case L_('I'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, hour12); + + case L_('k'): /* GNU extension. */ + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER_SPACEPAD (2, tp->tm_hour); + + case L_('l'): /* GNU extension. */ + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER_SPACEPAD (2, hour12); + + case L_('j'): + if (modifier == L_('E')) + goto bad_format; + + DO_SIGNED_NUMBER (3, tp->tm_yday < -1, tp->tm_yday + 1U); + + case L_('M'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, tp->tm_min); + + case L_('m'): + if (modifier == L_('E')) + goto bad_format; + + DO_SIGNED_NUMBER (2, tp->tm_mon < -1, tp->tm_mon + 1U); + +#ifndef _LIBC + case L_('N'): /* GNU extension. */ + if (modifier == L_('E')) + goto bad_format; + + number_value = ns; + if (width == -1) + width = 9; + else + { + /* Take an explicit width less than 9 as a precision. */ + int j; + for (j = width; j < 9; j++) + number_value /= 10; + } + + DO_NUMBER (width, number_value); +#endif + + case L_('n'): + add1 (L_('\n')); + break; + + case L_('P'): + to_lowcase = true; +#ifndef _NL_CURRENT + format_char = L_('p'); +#endif + /* FALLTHROUGH */ + + case L_('p'): + if (change_case) + { + to_uppcase = false; + to_lowcase = true; + } +#ifdef _NL_CURRENT + cpy (ap_len, ampm); + break; +#else + goto underlying_strftime; +#endif + + case L_('R'): + subfmt = L_("%H:%M"); + goto subformat; + + case L_('r'): +#ifdef _NL_CURRENT + if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, + NLW(T_FMT_AMPM))) + == L_('\0')) + subfmt = L_("%I:%M:%S %p"); + goto subformat; +#else + goto underlying_strftime; +#endif + + case L_('S'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, tp->tm_sec); + + case L_('s'): /* GNU extension. */ + { + struct tm ltm; + time_t t; + + ltm = *tp; + t = mktime (<m); + + /* Generate string value for T using time_t arithmetic; + this works even if sizeof (long) < sizeof (time_t). */ + + bufp = buf + sizeof (buf) / sizeof (buf[0]); + negative_number = t < 0; + + do + { + int d = t % 10; + t /= 10; + *--bufp = (negative_number ? -d : d) + L_('0'); + } + while (t != 0); + + digits = 1; + always_output_a_sign = false; + goto do_number_sign_and_padding; + } + + case L_('X'): + if (modifier == L_('O')) + goto bad_format; +#ifdef _NL_CURRENT + if (! (modifier == L_('E') + && (*(subfmt = + (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_T_FMT))) + != L_('\0')))) + subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT)); + goto subformat; +#else + goto underlying_strftime; +#endif + case L_('T'): + subfmt = L_("%H:%M:%S"); + goto subformat; + + case L_('t'): + add1 (L_('\t')); + break; + + case L_('u'): + DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1); + + case L_('U'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7); + + case L_('V'): + case L_('g'): + case L_('G'): + if (modifier == L_('E')) + goto bad_format; + { + /* YEAR is a leap year if and only if (tp->tm_year + TM_YEAR_BASE) + is a leap year, except that YEAR and YEAR - 1 both work + correctly even when (tp->tm_year + TM_YEAR_BASE) would + overflow. */ + int year = (tp->tm_year + + (tp->tm_year < 0 + ? TM_YEAR_BASE % 400 + : TM_YEAR_BASE % 400 - 400)); + int year_adjust = 0; + int days = iso_week_days (tp->tm_yday, tp->tm_wday); + + if (days < 0) + { + /* This ISO week belongs to the previous year. */ + year_adjust = -1; + days = iso_week_days (tp->tm_yday + (365 + __isleap (year - 1)), + tp->tm_wday); + } + else + { + int d = iso_week_days (tp->tm_yday - (365 + __isleap (year)), + tp->tm_wday); + if (0 <= d) + { + /* This ISO week belongs to the next year. */ + year_adjust = 1; + days = d; + } + } + + switch (*f) + { + case L_('g'): + { + int yy = (tp->tm_year % 100 + year_adjust) % 100; + DO_NUMBER (2, (0 <= yy + ? yy + : tp->tm_year < -TM_YEAR_BASE - year_adjust + ? -yy + : yy + 100)); + } + + case L_('G'): + DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE - year_adjust, + (tp->tm_year + (unsigned int) TM_YEAR_BASE + + year_adjust)); + + default: + DO_NUMBER (2, days / 7 + 1); + } + } + + case L_('W'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (2, (tp->tm_yday - (tp->tm_wday - 1 + 7) % 7 + 7) / 7); + + case L_('w'): + if (modifier == L_('E')) + goto bad_format; + + DO_NUMBER (1, tp->tm_wday); + + case L_('Y'): + if (modifier == 'E') + { +#if HAVE_STRUCT_ERA_ENTRY + struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); + if (era) + { +# ifdef COMPILE_WIDE + subfmt = era->era_wformat; +# else + subfmt = era->era_format; +# endif + goto subformat; + } +#else + goto underlying_strftime; +#endif + } + if (modifier == L_('O')) + goto bad_format; + + DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE, + tp->tm_year + (unsigned int) TM_YEAR_BASE); + + case L_('y'): + if (modifier == L_('E')) + { +#if HAVE_STRUCT_ERA_ENTRY + struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); + if (era) + { + int delta = tp->tm_year - era->start_date[0]; + DO_NUMBER (1, (era->offset + + delta * era->absolute_direction)); + } +#else + goto underlying_strftime; +#endif + } + + { + int yy = tp->tm_year % 100; + if (yy < 0) + yy = tp->tm_year < - TM_YEAR_BASE ? -yy : yy + 100; + DO_NUMBER (2, yy); + } + + case L_('Z'): + if (change_case) + { + to_uppcase = false; + to_lowcase = true; + } + +#if HAVE_TZNAME + /* The tzset() call might have changed the value. */ + if (!(zone && *zone) && tp->tm_isdst >= 0) + zone = tzname[tp->tm_isdst != 0]; +#endif + if (! zone) + zone = ""; + +#ifdef COMPILE_WIDE + { + /* The zone string is always given in multibyte form. We have + to transform it first. */ + wchar_t *wczone; + size_t len; + widen (zone, wczone, len); + cpy (len, wczone); + } +#else + cpy (strlen (zone), zone); +#endif + break; + + case L_(':'): + /* :, ::, and ::: are valid only just before 'z'. + :::: etc. are rejected later. */ + for (colons = 1; f[colons] == L_(':'); colons++) + continue; + if (f[colons] != L_('z')) + goto bad_format; + f += colons; + goto do_z_conversion; + + case L_('z'): + colons = 0; + + do_z_conversion: + if (tp->tm_isdst < 0) + break; + + { + int diff; + int hour_diff; + int min_diff; + int sec_diff; +#if HAVE_TM_GMTOFF + diff = tp->tm_gmtoff; +#else + if (ut) + diff = 0; + else + { + struct tm gtm; + struct tm ltm; + time_t lt; + + ltm = *tp; + lt = mktime (<m); + + if (lt == (time_t) -1) + { + /* mktime returns -1 for errors, but -1 is also a + valid time_t value. Check whether an error really + occurred. */ + struct tm tm; + + if (! __localtime_r (<, &tm) + || ((ltm.tm_sec ^ tm.tm_sec) + | (ltm.tm_min ^ tm.tm_min) + | (ltm.tm_hour ^ tm.tm_hour) + | (ltm.tm_mday ^ tm.tm_mday) + | (ltm.tm_mon ^ tm.tm_mon) + | (ltm.tm_year ^ tm.tm_year))) + break; + } + + if (! __gmtime_r (<, >m)) + break; + + diff = tm_diff (<m, >m); + } +#endif + + hour_diff = diff / 60 / 60; + min_diff = diff / 60 % 60; + sec_diff = diff % 60; + + switch (colons) + { + case 0: /* +hhmm */ + DO_TZ_OFFSET (5, diff < 0, 0, hour_diff * 100 + min_diff); + + case 1: tz_hh_mm: /* +hh:mm */ + DO_TZ_OFFSET (6, diff < 0, 04, hour_diff * 100 + min_diff); + + case 2: tz_hh_mm_ss: /* +hh:mm:ss */ + DO_TZ_OFFSET (9, diff < 0, 024, + hour_diff * 10000 + min_diff * 100 + sec_diff); + + case 3: /* +hh if possible, else +hh:mm, else +hh:mm:ss */ + if (sec_diff != 0) + goto tz_hh_mm_ss; + if (min_diff != 0) + goto tz_hh_mm; + DO_TZ_OFFSET (3, diff < 0, 0, hour_diff); + + default: + goto bad_format; + } + } + + case L_('\0'): /* GNU extension: % at end of format. */ + --f; + /* Fall through. */ + default: + /* Unknown format; output the format, including the '%', + since this is most likely the right thing to do if a + multibyte string has been misparsed. */ + bad_format: + { + int flen; + for (flen = 1; f[1 - flen] != L_('%'); flen++) + continue; + cpy (flen, &f[1 - flen]); + } + break; + } + } + +#if ! FPRINTFTIME + if (p && maxsize != 0) + *p = L_('\0'); +#endif + + return i; +} + +/* Write information from TP into S according to the format + string FORMAT, writing no more that MAXSIZE characters + (including the terminating '\0') and returning number of + characters written. If S is NULL, nothing will be written + anywhere, so to determine how many characters would be + written, use NULL for S and (size_t) -1 for MAXSIZE. */ +size_t +my_strftime (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) + const CHAR_T *format, + const struct tm *tp extra_args_spec LOCALE_PARAM_PROTO) +{ + return strftime_case_ (false, s, STRFTIME_ARG (maxsize) + format, tp extra_args LOCALE_ARG); +} + +#if defined _LIBC && ! FPRINTFTIME +libc_hidden_def (my_strftime) +#endif + + +#if defined emacs && ! FPRINTFTIME +/* For Emacs we have a separate interface which corresponds to the normal + strftime function plus the ut argument, but without the ns argument. */ +size_t +emacs_strftimeu (char *s, size_t maxsize, const char *format, + const struct tm *tp, int ut) +{ + return my_strftime (s, maxsize, format, tp, ut, 0); +} +#endif diff --git a/gl/lib/strftime.h b/gl/lib/strftime.h new file mode 100644 index 0000000..be016ea --- /dev/null +++ b/gl/lib/strftime.h @@ -0,0 +1,34 @@ +/* declarations for strftime.c + + Copyright (C) 2002, 2004, 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Just like strftime, but with two more arguments: + POSIX requires that strftime use the local timezone information. + When __UTC is nonzero and tm->tm_zone is NULL or the empty string, + use UTC instead. Use __NS as the number of nanoseconds in the + %N directive. */ +size_t nstrftime (char *, size_t, char const *, struct tm const *, + int __utc, int __ns); + +#ifdef __cplusplus +} +#endif diff --git a/gl/lib/string.in.h b/gl/lib/string.in.h new file mode 100644 index 0000000..9062142 --- /dev/null +++ b/gl/lib/string.in.h @@ -0,0 +1,1029 @@ +/* A GNU-like . + + Copyright (C) 1995-1996, 2001-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _@GUARD_PREFIX@_STRING_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_STRING_H@ + +#ifndef _@GUARD_PREFIX@_STRING_H +#define _@GUARD_PREFIX@_STRING_H + +/* NetBSD 5.0 mis-defines NULL. */ +#include + +/* MirBSD defines mbslen as a macro. */ +#if @GNULIB_MBSLEN@ && defined __MirBSD__ +# include +#endif + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* NetBSD 5.0 declares strsignal in , not in . */ +/* But in any case avoid namespace pollution on glibc systems. */ +#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ + && ! defined __GLIBC__ +# include +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +/* Find the index of the least-significant set bit. */ +#if @GNULIB_FFSL@ +# if !@HAVE_FFSL@ +_GL_FUNCDECL_SYS (ffsl, int, (long int i)); +# endif +_GL_CXXALIAS_SYS (ffsl, int, (long int i)); +_GL_CXXALIASWARN (ffsl); +#elif defined GNULIB_POSIXCHECK +# undef ffsl +# if HAVE_RAW_DECL_FFSL +_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); +# endif +#endif + + +/* Find the index of the least-significant set bit. */ +#if @GNULIB_FFSLL@ +# if !@HAVE_FFSLL@ +_GL_FUNCDECL_SYS (ffsll, int, (long long int i)); +# endif +_GL_CXXALIAS_SYS (ffsll, int, (long long int i)); +_GL_CXXALIASWARN (ffsll); +#elif defined GNULIB_POSIXCHECK +# undef ffsll +# if HAVE_RAW_DECL_FFSLL +_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); +# endif +#endif + + +/* Return the first instance of C within N bytes of S, or NULL. */ +#if @GNULIB_MEMCHR@ +# if @REPLACE_MEMCHR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define memchr rpl_memchr +# endif +_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); +# else +# if ! @HAVE_MEMCHR@ +_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C" { const void * std::memchr (const void *, int, size_t); } + extern "C++" { void * std::memchr (void *, int, size_t); } */ +_GL_CXXALIAS_SYS_CAST2 (memchr, + void *, (void const *__s, int __c, size_t __n), + void const *, (void const *__s, int __c, size_t __n)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); +_GL_CXXALIASWARN1 (memchr, void const *, + (void const *__s, int __c, size_t __n)); +# else +_GL_CXXALIASWARN (memchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memchr +/* Assume memchr is always declared. */ +_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +#endif + +/* Return the first occurrence of NEEDLE in HAYSTACK. */ +#if @GNULIB_MEMMEM@ +# if @REPLACE_MEMMEM@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define memmem rpl_memmem +# endif +_GL_FUNCDECL_RPL (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 3))); +_GL_CXXALIAS_RPL (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len)); +# else +# if ! @HAVE_DECL_MEMMEM@ +_GL_FUNCDECL_SYS (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 3))); +# endif +_GL_CXXALIAS_SYS (memmem, void *, + (void const *__haystack, size_t __haystack_len, + void const *__needle, size_t __needle_len)); +# endif +_GL_CXXALIASWARN (memmem); +#elif defined GNULIB_POSIXCHECK +# undef memmem +# if HAVE_RAW_DECL_MEMMEM +_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " + "use gnulib module memmem-simple for portability, " + "and module memmem for speed" ); +# endif +#endif + +/* Copy N bytes of SRC to DEST, return pointer to bytes after the + last written byte. */ +#if @GNULIB_MEMPCPY@ +# if ! @HAVE_MEMPCPY@ +_GL_FUNCDECL_SYS (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (mempcpy, void *, + (void *restrict __dest, void const *restrict __src, + size_t __n)); +_GL_CXXALIASWARN (mempcpy); +#elif defined GNULIB_POSIXCHECK +# undef mempcpy +# if HAVE_RAW_DECL_MEMPCPY +_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " + "use gnulib module mempcpy for portability"); +# endif +#endif + +/* Search backwards through a block for a byte (specified as an int). */ +#if @GNULIB_MEMRCHR@ +# if ! @HAVE_DECL_MEMRCHR@ +_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const void * std::memrchr (const void *, int, size_t); } + extern "C++" { void * std::memrchr (void *, int, size_t); } */ +_GL_CXXALIAS_SYS_CAST2 (memrchr, + void *, (void const *, int, size_t), + void const *, (void const *, int, size_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); +_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); +# else +_GL_CXXALIASWARN (memrchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef memrchr +# if HAVE_RAW_DECL_MEMRCHR +_GL_WARN_ON_USE (memrchr, "memrchr is unportable - " + "use gnulib module memrchr for portability"); +# endif +#endif + +/* Find the first occurrence of C in S. More efficient than + memchr(S,C,N), at the expense of undefined behavior if C does not + occur within N bytes. */ +#if @GNULIB_RAWMEMCHR@ +# if ! @HAVE_RAWMEMCHR@ +_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const void * std::rawmemchr (const void *, int); } + extern "C++" { void * std::rawmemchr (void *, int); } */ +_GL_CXXALIAS_SYS_CAST2 (rawmemchr, + void *, (void const *__s, int __c_in), + void const *, (void const *__s, int __c_in)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); +_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); +# else +_GL_CXXALIASWARN (rawmemchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef rawmemchr +# if HAVE_RAW_DECL_RAWMEMCHR +_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " + "use gnulib module rawmemchr for portability"); +# endif +#endif + +/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ +#if @GNULIB_STPCPY@ +# if ! @HAVE_STPCPY@ +_GL_FUNCDECL_SYS (stpcpy, char *, + (char *restrict __dst, char const *restrict __src) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (stpcpy, char *, + (char *restrict __dst, char const *restrict __src)); +_GL_CXXALIASWARN (stpcpy); +#elif defined GNULIB_POSIXCHECK +# undef stpcpy +# if HAVE_RAW_DECL_STPCPY +_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " + "use gnulib module stpcpy for portability"); +# endif +#endif + +/* Copy no more than N bytes of SRC to DST, returning a pointer past the + last non-NUL byte written into DST. */ +#if @GNULIB_STPNCPY@ +# if @REPLACE_STPNCPY@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef stpncpy +# define stpncpy rpl_stpncpy +# endif +_GL_FUNCDECL_RPL (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n)); +# else +# if ! @HAVE_STPNCPY@ +_GL_FUNCDECL_SYS (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (stpncpy, char *, + (char *restrict __dst, char const *restrict __src, + size_t __n)); +# endif +_GL_CXXALIASWARN (stpncpy); +#elif defined GNULIB_POSIXCHECK +# undef stpncpy +# if HAVE_RAW_DECL_STPNCPY +_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + "use gnulib module stpncpy for portability"); +# endif +#endif + +#if defined GNULIB_POSIXCHECK +/* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +# undef strchr +/* Assume strchr is always declared. */ +_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " + "in some multibyte locales - " + "use mbschr if you care about internationalization"); +#endif + +/* Find the first occurrence of C in S or the final NUL byte. */ +#if @GNULIB_STRCHRNUL@ +# if @REPLACE_STRCHRNUL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strchrnul rpl_strchrnul +# endif +_GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strchrnul, char *, + (const char *str, int ch)); +# else +# if ! @HAVE_STRCHRNUL@ +_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const char * std::strchrnul (const char *, int); } + extern "C++" { char * std::strchrnul (char *, int); } */ +_GL_CXXALIAS_SYS_CAST2 (strchrnul, + char *, (char const *__s, int __c_in), + char const *, (char const *__s, int __c_in)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); +_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); +# else +_GL_CXXALIASWARN (strchrnul); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strchrnul +# if HAVE_RAW_DECL_STRCHRNUL +_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " + "use gnulib module strchrnul for portability"); +# endif +#endif + +/* Duplicate S, returning an identical malloc'd string. */ +#if @GNULIB_STRDUP@ +# if @REPLACE_STRDUP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strdup +# define strdup rpl_strdup +# endif +_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); +# else +# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup + /* strdup exists as a function and as a macro. Get rid of the macro. */ +# undef strdup +# endif +# if !(@HAVE_DECL_STRDUP@ || defined strdup) +_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); +# endif +_GL_CXXALIASWARN (strdup); +#elif defined GNULIB_POSIXCHECK +# undef strdup +# if HAVE_RAW_DECL_STRDUP +_GL_WARN_ON_USE (strdup, "strdup is unportable - " + "use gnulib module strdup for portability"); +# endif +#endif + +/* Append no more than N characters from SRC onto DEST. */ +#if @GNULIB_STRNCAT@ +# if @REPLACE_STRNCAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strncat +# define strncat rpl_strncat +# endif +_GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); +# else +_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); +# endif +_GL_CXXALIASWARN (strncat); +#elif defined GNULIB_POSIXCHECK +# undef strncat +# if HAVE_RAW_DECL_STRNCAT +_GL_WARN_ON_USE (strncat, "strncat is unportable - " + "use gnulib module strncat for portability"); +# endif +#endif + +/* Return a newly allocated copy of at most N bytes of STRING. */ +#if @GNULIB_STRNDUP@ +# if @REPLACE_STRNDUP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strndup +# define strndup rpl_strndup +# endif +_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n)); +# else +# if ! @HAVE_DECL_STRNDUP@ +_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n)); +# endif +_GL_CXXALIASWARN (strndup); +#elif defined GNULIB_POSIXCHECK +# undef strndup +# if HAVE_RAW_DECL_STRNDUP +_GL_WARN_ON_USE (strndup, "strndup is unportable - " + "use gnulib module strndup for portability"); +# endif +#endif + +/* Find the length (number of bytes) of STRING, but scan at most + MAXLEN bytes. If no '\0' terminator is found in that many bytes, + return MAXLEN. */ +#if @GNULIB_STRNLEN@ +# if @REPLACE_STRNLEN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strnlen +# define strnlen rpl_strnlen +# endif +_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)); +# else +# if ! @HAVE_DECL_STRNLEN@ +_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)); +# endif +_GL_CXXALIASWARN (strnlen); +#elif defined GNULIB_POSIXCHECK +# undef strnlen +# if HAVE_RAW_DECL_STRNLEN +_GL_WARN_ON_USE (strnlen, "strnlen is unportable - " + "use gnulib module strnlen for portability"); +# endif +#endif + +#if defined GNULIB_POSIXCHECK +/* strcspn() assumes the second argument is a list of single-byte characters. + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +# undef strcspn +/* Assume strcspn is always declared. */ +_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " + "in multibyte locales - " + "use mbscspn if you care about internationalization"); +#endif + +/* Find the first occurrence in S of any character in ACCEPT. */ +#if @GNULIB_STRPBRK@ +# if ! @HAVE_STRPBRK@ +_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C" { const char * strpbrk (const char *, const char *); } + extern "C++" { char * strpbrk (char *, const char *); } */ +_GL_CXXALIAS_SYS_CAST2 (strpbrk, + char *, (char const *__s, char const *__accept), + const char *, (char const *__s, char const *__accept)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); +_GL_CXXALIASWARN1 (strpbrk, char const *, + (char const *__s, char const *__accept)); +# else +_GL_CXXALIASWARN (strpbrk); +# endif +# if defined GNULIB_POSIXCHECK +/* strpbrk() assumes the second argument is a list of single-byte characters. + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +# undef strpbrk +_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " + "in multibyte locales - " + "use mbspbrk if you care about internationalization"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strpbrk +# if HAVE_RAW_DECL_STRPBRK +_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " + "use gnulib module strpbrk for portability"); +# endif +#endif + +#if defined GNULIB_POSIXCHECK +/* strspn() assumes the second argument is a list of single-byte characters. + Even in this simple case, it cannot work with multibyte strings. */ +# undef strspn +/* Assume strspn is always declared. */ +_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + "in multibyte locales - " + "use mbsspn if you care about internationalization"); +#endif + +#if defined GNULIB_POSIXCHECK +/* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +# undef strrchr +/* Assume strrchr is always declared. */ +_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " + "in some multibyte locales - " + "use mbsrchr if you care about internationalization"); +#endif + +/* Search the next delimiter (char listed in DELIM) starting at *STRINGP. + If one is found, overwrite it with a NUL, and advance *STRINGP + to point to the next char after it. Otherwise, set *STRINGP to NULL. + If *STRINGP was already NULL, nothing happens. + Return the old value of *STRINGP. + + This is a variant of strtok() that is multithread-safe and supports + empty fields. + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + Caveat: It doesn't work with multibyte strings unless all of the delimiter + characters are ASCII characters < 0x30. + + See also strtok_r(). */ +#if @GNULIB_STRSEP@ +# if ! @HAVE_STRSEP@ +_GL_FUNCDECL_SYS (strsep, char *, + (char **restrict __stringp, char const *restrict __delim) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (strsep, char *, + (char **restrict __stringp, char const *restrict __delim)); +_GL_CXXALIASWARN (strsep); +# if defined GNULIB_POSIXCHECK +# undef strsep +_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " + "in multibyte locales - " + "use mbssep if you care about internationalization"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strsep +# if HAVE_RAW_DECL_STRSEP +_GL_WARN_ON_USE (strsep, "strsep is unportable - " + "use gnulib module strsep for portability"); +# endif +#endif + +#if @GNULIB_STRSTR@ +# if @REPLACE_STRSTR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strstr rpl_strstr +# endif +_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); +# else + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const char * strstr (const char *, const char *); } + extern "C++" { char * strstr (char *, const char *); } */ +_GL_CXXALIAS_SYS_CAST2 (strstr, + char *, (const char *haystack, const char *needle), + const char *, (const char *haystack, const char *needle)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); +_GL_CXXALIASWARN1 (strstr, const char *, + (const char *haystack, const char *needle)); +# else +_GL_CXXALIASWARN (strstr); +# endif +#elif defined GNULIB_POSIXCHECK +/* strstr() does not work with multibyte strings if the locale encoding is + different from UTF-8: + POSIX says that it operates on "strings", and "string" in POSIX is defined + as a sequence of bytes, not of characters. */ +# undef strstr +/* Assume strstr is always declared. */ +_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " + "work correctly on character strings in most " + "multibyte locales - " + "use mbsstr if you care about internationalization, " + "or use strstr if you care about speed"); +#endif + +/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive + comparison. */ +#if @GNULIB_STRCASESTR@ +# if @REPLACE_STRCASESTR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strcasestr rpl_strcasestr +# endif +_GL_FUNCDECL_RPL (strcasestr, char *, + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (strcasestr, char *, + (const char *haystack, const char *needle)); +# else +# if ! @HAVE_STRCASESTR@ +_GL_FUNCDECL_SYS (strcasestr, char *, + (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { const char * strcasestr (const char *, const char *); } + extern "C++" { char * strcasestr (char *, const char *); } */ +_GL_CXXALIAS_SYS_CAST2 (strcasestr, + char *, (const char *haystack, const char *needle), + const char *, (const char *haystack, const char *needle)); +# endif +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); +_GL_CXXALIASWARN1 (strcasestr, const char *, + (const char *haystack, const char *needle)); +# else +_GL_CXXALIASWARN (strcasestr); +# endif +#elif defined GNULIB_POSIXCHECK +/* strcasestr() does not work with multibyte strings: + It is a glibc extension, and glibc implements it only for unibyte + locales. */ +# undef strcasestr +# if HAVE_RAW_DECL_STRCASESTR +_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " + "strings in multibyte locales - " + "use mbscasestr if you care about " + "internationalization, or use c-strcasestr if you want " + "a locale independent function"); +# endif +#endif + +/* Parse S into tokens separated by characters in DELIM. + If S is NULL, the saved pointer in SAVE_PTR is used as + the next starting point. For example: + char s[] = "-abc-=-def"; + char *sp; + x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" + x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL + x = strtok_r(NULL, "=", &sp); // x = NULL + // s = "abc\0-def\0" + + This is a variant of strtok() that is multithread-safe. + + For the POSIX documentation for this function, see: + http://www.opengroup.org/susv3xsh/strtok.html + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + Caveat: It doesn't work with multibyte strings unless all of the delimiter + characters are ASCII characters < 0x30. + + See also strsep(). */ +#if @GNULIB_STRTOK_R@ +# if @REPLACE_STRTOK_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtok_r +# define strtok_r rpl_strtok_r +# endif +_GL_FUNCDECL_RPL (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr)); +# else +# if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK +# undef strtok_r +# endif +# if ! @HAVE_DECL_STRTOK_R@ +_GL_FUNCDECL_SYS (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (strtok_r, char *, + (char *restrict s, char const *restrict delim, + char **restrict save_ptr)); +# endif +_GL_CXXALIASWARN (strtok_r); +# if defined GNULIB_POSIXCHECK +_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " + "strings in multibyte locales - " + "use mbstok_r if you care about internationalization"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strtok_r +# if HAVE_RAW_DECL_STRTOK_R +_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " + "use gnulib module strtok_r for portability"); +# endif +#endif + + +/* The following functions are not specified by POSIX. They are gnulib + extensions. */ + +#if @GNULIB_MBSLEN@ +/* Return the number of multibyte characters in the character string STRING. + This considers multibyte characters, unlike strlen, which counts bytes. */ +# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ +# undef mbslen +# endif +# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbslen rpl_mbslen +# endif +_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); +# else +_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); +# endif +_GL_CXXALIASWARN (mbslen); +#endif + +#if @GNULIB_MBSNLEN@ +/* Return the number of multibyte characters in the character string starting + at STRING and ending at STRING + LEN. */ +_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1)); +#endif + +#if @GNULIB_MBSCHR@ +/* Locate the first single-byte character C in the character string STRING, + and return a pointer to it. Return NULL if C is not found in STRING. + Unlike strchr(), this function works correctly in multibyte locales with + encodings such as GB18030. */ +# if defined __hpux +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbschr rpl_mbschr /* avoid collision with HP-UX function */ +# endif +_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); +# else +_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); +# endif +_GL_CXXALIASWARN (mbschr); +#endif + +#if @GNULIB_MBSRCHR@ +/* Locate the last single-byte character C in the character string STRING, + and return a pointer to it. Return NULL if C is not found in STRING. + Unlike strrchr(), this function works correctly in multibyte locales with + encodings such as GB18030. */ +# if defined __hpux || defined __INTERIX +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbsrchr rpl_mbsrchr /* avoid collision with system function */ +# endif +_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); +# else +_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); +# endif +_GL_CXXALIASWARN (mbsrchr); +#endif + +#if @GNULIB_MBSSTR@ +/* Find the first occurrence of the character string NEEDLE in the character + string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. + Unlike strstr(), this function works correctly in multibyte locales with + encodings different from UTF-8. */ +_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if @GNULIB_MBSCASECMP@ +/* Compare the character strings S1 and S2, ignoring case, returning less than, + equal to or greater than zero if S1 is lexicographically less than, equal to + or greater than S2. + Note: This function may, in multibyte locales, return 0 for strings of + different lengths! + Unlike strcasecmp(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if @GNULIB_MBSNCASECMP@ +/* Compare the initial segment of the character string S1 consisting of at most + N characters with the initial segment of the character string S2 consisting + of at most N characters, ignoring case, returning less than, equal to or + greater than zero if the initial segment of S1 is lexicographically less + than, equal to or greater than the initial segment of S2. + Note: This function may, in multibyte locales, return 0 for initial segments + of different lengths! + Unlike strncasecmp(), this function works correctly in multibyte locales. + But beware that N is not a byte count but a character count! */ +_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if @GNULIB_MBSPCASECMP@ +/* Compare the initial segment of the character string STRING consisting of + at most mbslen (PREFIX) characters with the character string PREFIX, + ignoring case. If the two match, return a pointer to the first byte + after this prefix in STRING. Otherwise, return NULL. + Note: This function may, in multibyte locales, return non-NULL if STRING + is of smaller length than PREFIX! + Unlike strncasecmp(), this function works correctly in multibyte + locales. */ +_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if @GNULIB_MBSCASESTR@ +/* Find the first occurrence of the character string NEEDLE in the character + string HAYSTACK, using case-insensitive comparison. + Note: This function may, in multibyte locales, return success even if + strlen (haystack) < strlen (needle) ! + Unlike strcasestr(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if @GNULIB_MBSCSPN@ +/* Find the first occurrence in the character string STRING of any character + in the character string ACCEPT. Return the number of bytes from the + beginning of the string to this occurrence, or to the end of the string + if none exists. + Unlike strcspn(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if @GNULIB_MBSPBRK@ +/* Find the first occurrence in the character string STRING of any character + in the character string ACCEPT. Return the pointer to it, or NULL if none + exists. + Unlike strpbrk(), this function works correctly in multibyte locales. */ +# if defined __hpux +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ +# endif +_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); +# else +_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); +# endif +_GL_CXXALIASWARN (mbspbrk); +#endif + +#if @GNULIB_MBSSPN@ +/* Find the first occurrence in the character string STRING of any character + not in the character string REJECT. Return the number of bytes from the + beginning of the string to this occurrence, or to the end of the string + if none exists. + Unlike strspn(), this function works correctly in multibyte locales. */ +_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if @GNULIB_MBSSEP@ +/* Search the next delimiter (multibyte character listed in the character + string DELIM) starting at the character string *STRINGP. + If one is found, overwrite it with a NUL, and advance *STRINGP to point + to the next multibyte character after it. Otherwise, set *STRINGP to NULL. + If *STRINGP was already NULL, nothing happens. + Return the old value of *STRINGP. + + This is a variant of mbstok_r() that supports empty fields. + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + + See also mbstok_r(). */ +_GL_EXTERN_C char * mbssep (char **stringp, const char *delim) + _GL_ARG_NONNULL ((1, 2)); +#endif + +#if @GNULIB_MBSTOK_R@ +/* Parse the character string STRING into tokens separated by characters in + the character string DELIM. + If STRING is NULL, the saved pointer in SAVE_PTR is used as + the next starting point. For example: + char s[] = "-abc-=-def"; + char *sp; + x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" + x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL + x = mbstok_r(NULL, "=", &sp); // x = NULL + // s = "abc\0-def\0" + + Caveat: It modifies the original string. + Caveat: These functions cannot be used on constant strings. + Caveat: The identity of the delimiting character is lost. + + See also mbssep(). */ +_GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr) + _GL_ARG_NONNULL ((2, 3)); +#endif + +/* Map any int, typically from errno, into an error message. */ +#if @GNULIB_STRERROR@ +# if @REPLACE_STRERROR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerror +# define strerror rpl_strerror +# endif +_GL_FUNCDECL_RPL (strerror, char *, (int)); +_GL_CXXALIAS_RPL (strerror, char *, (int)); +# else +_GL_CXXALIAS_SYS (strerror, char *, (int)); +# endif +_GL_CXXALIASWARN (strerror); +#elif defined GNULIB_POSIXCHECK +# undef strerror +/* Assume strerror is always declared. */ +_GL_WARN_ON_USE (strerror, "strerror is unportable - " + "use gnulib module strerror to guarantee non-NULL result"); +#endif + +/* Map any int, typically from errno, into an error message. Multithread-safe. + Uses the POSIX declaration, not the glibc declaration. */ +#if @GNULIB_STRERROR_R@ +# if @REPLACE_STRERROR_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strerror_r +# define strerror_r rpl_strerror_r +# endif +_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); +# else +# if !@HAVE_DECL_STRERROR_R@ +_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); +# endif +# if @HAVE_DECL_STRERROR_R@ +_GL_CXXALIASWARN (strerror_r); +# endif +#elif defined GNULIB_POSIXCHECK +# undef strerror_r +# if HAVE_RAW_DECL_STRERROR_R +_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " + "use gnulib module strerror_r-posix for portability"); +# endif +#endif + +#if @GNULIB_STRSIGNAL@ +# if @REPLACE_STRSIGNAL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strsignal rpl_strsignal +# endif +_GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); +_GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); +# else +# if ! @HAVE_DECL_STRSIGNAL@ +_GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); +# endif +/* Need to cast, because on Cygwin 1.5.x systems, the return type is + 'const char *'. */ +_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); +# endif +_GL_CXXALIASWARN (strsignal); +#elif defined GNULIB_POSIXCHECK +# undef strsignal +# if HAVE_RAW_DECL_STRSIGNAL +_GL_WARN_ON_USE (strsignal, "strsignal is unportable - " + "use gnulib module strsignal for portability"); +# endif +#endif + +#if @GNULIB_STRVERSCMP@ +# if !@HAVE_STRVERSCMP@ +_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) + _GL_ATTRIBUTE_PURE + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); +_GL_CXXALIASWARN (strverscmp); +#elif defined GNULIB_POSIXCHECK +# undef strverscmp +# if HAVE_RAW_DECL_STRVERSCMP +_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " + "use gnulib module strverscmp for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_STRING_H */ +#endif /* _@GUARD_PREFIX@_STRING_H */ diff --git a/gl/lib/strings.in.h b/gl/lib/strings.in.h new file mode 100644 index 0000000..de0cd08 --- /dev/null +++ b/gl/lib/strings.in.h @@ -0,0 +1,122 @@ +/* A substitute . + + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _@GUARD_PREFIX@_STRINGS_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* Minix 3.1.8 has a bug: must be included before . + But avoid namespace pollution on glibc systems. */ +#if defined __minix && !defined __GLIBC__ +# include +#endif + +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_STRINGS_H@ +# @INCLUDE_NEXT@ @NEXT_STRINGS_H@ +#endif + +#ifndef _@GUARD_PREFIX@_STRINGS_H +#define _@GUARD_PREFIX@_STRINGS_H + +#if ! @HAVE_DECL_STRNCASECMP@ +/* Get size_t. */ +# include +#endif + + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +#ifdef __cplusplus +extern "C" { +#endif + + + /* Find the index of the least-significant set bit. */ +#if @GNULIB_FFS@ +# if !@HAVE_FFS@ +_GL_FUNCDECL_SYS (ffs, int, (int i)); +# endif +_GL_CXXALIAS_SYS (ffs, int, (int i)); +_GL_CXXALIASWARN (ffs); +#elif defined GNULIB_POSIXCHECK +# undef ffs +# if HAVE_RAW_DECL_FFS +_GL_WARN_ON_USE (ffs, "ffs is not portable - use the ffs module"); +# endif +#endif + +/* Compare strings S1 and S2, ignoring case, returning less than, equal to or + greater than zero if S1 is lexicographically less than, equal to or greater + than S2. + Note: This function does not work in multibyte locales. */ +#if ! @HAVE_STRCASECMP@ +extern int strcasecmp (char const *s1, char const *s2) + _GL_ARG_NONNULL ((1, 2)); +#endif +#if defined GNULIB_POSIXCHECK +/* strcasecmp() does not work with multibyte strings: + POSIX says that it operates on "strings", and "string" in POSIX is defined + as a sequence of bytes, not of characters. */ +# undef strcasecmp +# if HAVE_RAW_DECL_STRCASECMP +_GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character " + "strings in multibyte locales - " + "use mbscasecmp if you care about " + "internationalization, or use c_strcasecmp , " + "gnulib module c-strcase) if you want a locale " + "independent function"); +# endif +#endif + +/* Compare no more than N bytes of strings S1 and S2, ignoring case, + returning less than, equal to or greater than zero if S1 is + lexicographically less than, equal to or greater than S2. + Note: This function cannot work correctly in multibyte locales. */ +#if ! @HAVE_DECL_STRNCASECMP@ +extern int strncasecmp (char const *s1, char const *s2, size_t n) + _GL_ARG_NONNULL ((1, 2)); +#endif +#if defined GNULIB_POSIXCHECK +/* strncasecmp() does not work with multibyte strings: + POSIX says that it operates on "strings", and "string" in POSIX is defined + as a sequence of bytes, not of characters. */ +# undef strncasecmp +# if HAVE_RAW_DECL_STRNCASECMP +_GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character " + "strings in multibyte locales - " + "use mbsncasecmp or mbspcasecmp if you care about " + "internationalization, or use c_strncasecmp , " + "gnulib module c-strcase) if you want a locale " + "independent function"); +# endif +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* _@GUARD_PREFIX@_STRING_H */ +#endif /* _@GUARD_PREFIX@_STRING_H */ diff --git a/gl/lib/stripslash.c b/gl/lib/stripslash.c new file mode 100644 index 0000000..6f802d4 --- /dev/null +++ b/gl/lib/stripslash.c @@ -0,0 +1,45 @@ +/* stripslash.c -- remove redundant trailing slashes from a file name + + Copyright (C) 1990, 2001, 2003-2006, 2009-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "dirname.h" + +/* Remove trailing slashes from FILE. Return true if a trailing slash + was removed. This is useful when using file name completion from a + shell that adds a "/" after directory names (such as tcsh and + bash), because on symlinks to directories, several system calls + have different semantics according to whether a trailing slash is + present. */ + +bool +strip_trailing_slashes (char *file) +{ + char *base = last_component (file); + char *base_lim; + bool had_slash; + + /* last_component returns "" for file system roots, but we need to turn + "///" into "/". */ + if (! *base) + base = file; + base_lim = base + base_len (base); + had_slash = (*base_lim != '\0'); + *base_lim = '\0'; + return had_slash; +} diff --git a/gl/lib/strncasecmp.c b/gl/lib/strncasecmp.c new file mode 100644 index 0000000..2ee532b --- /dev/null +++ b/gl/lib/strncasecmp.c @@ -0,0 +1,62 @@ +/* strncasecmp.c -- case insensitive string comparator + Copyright (C) 1998-1999, 2005-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include + +#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) + +/* Compare no more than N bytes of strings S1 and S2, ignoring case, + returning less than, equal to or greater than zero if S1 is + lexicographically less than, equal to or greater than S2. + Note: This function cannot work correctly in multibyte locales. */ + +int +strncasecmp (const char *s1, const char *s2, size_t n) +{ + register const unsigned char *p1 = (const unsigned char *) s1; + register const unsigned char *p2 = (const unsigned char *) s2; + unsigned char c1, c2; + + if (p1 == p2 || n == 0) + return 0; + + do + { + c1 = TOLOWER (*p1); + c2 = TOLOWER (*p2); + + if (--n == 0 || c1 == '\0') + break; + + ++p1; + ++p2; + } + while (c1 == c2); + + if (UCHAR_MAX <= INT_MAX) + return c1 - c2; + else + /* On machines where 'char' and 'int' are types of the same size, the + difference of two 'unsigned char' values - including the sign bit - + doesn't fit in an 'int'. */ + return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); +} diff --git a/gl/lib/strndup.c b/gl/lib/strndup.c new file mode 100644 index 0000000..cc1a484 --- /dev/null +++ b/gl/lib/strndup.c @@ -0,0 +1,36 @@ +/* A replacement function, for systems that lack strndup. + + Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2014 Free Software + Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +#include + +#include + +char * +strndup (char const *s, size_t n) +{ + size_t len = strnlen (s, n); + char *new = malloc (len + 1); + + if (new == NULL) + return NULL; + + new[len] = '\0'; + return memcpy (new, s, len); +} diff --git a/gl/lib/strnlen.c b/gl/lib/strnlen.c new file mode 100644 index 0000000..ddccebc --- /dev/null +++ b/gl/lib/strnlen.c @@ -0,0 +1,30 @@ +/* Find the length of STRING, but scan at most MAXLEN characters. + Copyright (C) 2005-2007, 2009-2014 Free Software Foundation, Inc. + Written by Simon Josefsson. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +#include + +/* Find the length of STRING, but scan at most MAXLEN characters. + If no '\0' terminator is found in that many characters, return MAXLEN. */ + +size_t +strnlen (const char *string, size_t maxlen) +{ + const char *end = memchr (string, '\0', maxlen); + return end ? (size_t) (end - string) : maxlen; +} diff --git a/gl/lib/strnlen1.c b/gl/lib/strnlen1.c new file mode 100644 index 0000000..363776a --- /dev/null +++ b/gl/lib/strnlen1.c @@ -0,0 +1,35 @@ +/* Find the length of STRING + 1, but scan at most MAXLEN bytes. + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "strnlen1.h" + +#include + +/* Find the length of STRING + 1, but scan at most MAXLEN bytes. + If no '\0' terminator is found in that many characters, return MAXLEN. */ +/* This is the same as strnlen (string, maxlen - 1) + 1. */ +size_t +strnlen1 (const char *string, size_t maxlen) +{ + const char *end = (const char *) memchr (string, '\0', maxlen); + if (end != NULL) + return end - string + 1; + else + return maxlen; +} diff --git a/gl/lib/strnlen1.h b/gl/lib/strnlen1.h new file mode 100644 index 0000000..b2f956f --- /dev/null +++ b/gl/lib/strnlen1.h @@ -0,0 +1,40 @@ +/* Find the length of STRING + 1, but scan at most MAXLEN bytes. + Copyright (C) 2005, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _STRNLEN1_H +#define _STRNLEN1_H + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Find the length of STRING + 1, but scan at most MAXLEN bytes. + If no '\0' terminator is found in that many characters, return MAXLEN. */ +/* This is the same as strnlen (string, maxlen - 1) + 1. */ +extern size_t strnlen1 (const char *string, size_t maxlen) + _GL_ATTRIBUTE_PURE; + + +#ifdef __cplusplus +} +#endif + + +#endif /* _STRNLEN1_H */ diff --git a/gl/lib/strstr.c b/gl/lib/strstr.c new file mode 100644 index 0000000..d5b9d78 --- /dev/null +++ b/gl/lib/strstr.c @@ -0,0 +1,82 @@ +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +/* This particular implementation was written by Eric Blake, 2008. */ + +#ifndef _LIBC +# include +#endif + +/* Specification of strstr. */ +#include + +#include + +#ifndef _LIBC +# define __builtin_expect(expr, val) (expr) +#endif + +#define RETURN_TYPE char * +#define AVAILABLE(h, h_l, j, n_l) \ + (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ + && ((h_l) = (j) + (n_l))) +#include "str-two-way.h" + +/* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK + if NEEDLE is empty, otherwise NULL if NEEDLE is not found in + HAYSTACK. */ +char * +strstr (const char *haystack_start, const char *needle_start) +{ + const char *haystack = haystack_start; + const char *needle = needle_start; + size_t needle_len; /* Length of NEEDLE. */ + size_t haystack_len; /* Known minimum length of HAYSTACK. */ + bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ + + /* Determine length of NEEDLE, and in the process, make sure + HAYSTACK is at least as long (no point processing all of a long + NEEDLE if HAYSTACK is too short). */ + while (*haystack && *needle) + ok &= *haystack++ == *needle++; + if (*needle) + return NULL; + if (ok) + return (char *) haystack_start; + + /* Reduce the size of haystack using strchr, since it has a smaller + linear coefficient than the Two-Way algorithm. */ + needle_len = needle - needle_start; + haystack = strchr (haystack_start + 1, *needle_start); + if (!haystack || __builtin_expect (needle_len == 1, 0)) + return (char *) haystack; + needle -= needle_len; + haystack_len = (haystack > haystack_start + needle_len ? 1 + : needle_len + haystack_start - haystack); + + /* Perform the search. Abstract memory is considered to be an array + of 'unsigned char' values, not an array of 'char' values. See + ISO C 99 section 6.2.6.1. */ + if (needle_len < LONG_NEEDLE_THRESHOLD) + return two_way_short_needle ((const unsigned char *) haystack, + haystack_len, + (const unsigned char *) needle, needle_len); + return two_way_long_needle ((const unsigned char *) haystack, haystack_len, + (const unsigned char *) needle, needle_len); +} + +#undef LONG_NEEDLE_THRESHOLD diff --git a/gl/lib/strtoimax.c b/gl/lib/strtoimax.c new file mode 100644 index 0000000..2c33d58 --- /dev/null +++ b/gl/lib/strtoimax.c @@ -0,0 +1,82 @@ +/* Convert string representation of a number into an intmax_t value. + + Copyright (C) 1999, 2001-2004, 2006, 2009-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include + +/* Verify interface. */ +#include + +#include + +#include "verify.h" + +#ifdef UNSIGNED +# if HAVE_UNSIGNED_LONG_LONG_INT +# ifndef HAVE_DECL_STRTOULL +"this configure-time declaration test was not run" +# endif +# if !HAVE_DECL_STRTOULL +unsigned long long int strtoull (char const *, char **, int); +# endif +# endif + +#else + +# if HAVE_LONG_LONG_INT +# ifndef HAVE_DECL_STRTOLL +"this configure-time declaration test was not run" +# endif +# if !HAVE_DECL_STRTOLL +long long int strtoll (char const *, char **, int); +# endif +# endif +#endif + +#ifdef UNSIGNED +# define Have_long_long HAVE_UNSIGNED_LONG_LONG_INT +# define Int uintmax_t +# define Strtoimax strtoumax +# define Strtol strtoul +# define Strtoll strtoull +# define Unsigned unsigned +#else +# define Have_long_long HAVE_LONG_LONG_INT +# define Int intmax_t +# define Strtoimax strtoimax +# define Strtol strtol +# define Strtoll strtoll +# define Unsigned +#endif + +Int +Strtoimax (char const *ptr, char **endptr, int base) +{ +#if Have_long_long + verify (sizeof (Int) == sizeof (Unsigned long int) + || sizeof (Int) == sizeof (Unsigned long long int)); + + if (sizeof (Int) != sizeof (Unsigned long int)) + return Strtoll (ptr, endptr, base); +#else + verify (sizeof (Int) == sizeof (Unsigned long int)); +#endif + + return Strtol (ptr, endptr, base); +} diff --git a/gl/lib/strtol.c b/gl/lib/strtol.c new file mode 100644 index 0000000..2e015dc --- /dev/null +++ b/gl/lib/strtol.c @@ -0,0 +1,433 @@ +/* Convert string representation of a number into an integer value. + + Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2014 Free Software + Foundation, Inc. + + NOTE: The canonical source of this file is maintained with the GNU C + Library. Bugs can be reported to bug-glibc@gnu.org. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef _LIBC +# define USE_NUMBER_GROUPING +#else +# include +#endif + +#include +#include +#ifndef __set_errno +# define __set_errno(Val) errno = (Val) +#endif + +#include +#include +#include +#include + +#ifdef USE_NUMBER_GROUPING +# include "../locale/localeinfo.h" +#endif + +/* Nonzero if we are defining 'strtoul' or 'strtoull', operating on + unsigned integers. */ +#ifndef UNSIGNED +# define UNSIGNED 0 +# define INT LONG int +#else +# define INT unsigned LONG int +#endif + +/* Determine the name. */ +#ifdef USE_IN_EXTENDED_LOCALE_MODEL +# if UNSIGNED +# ifdef USE_WIDE_CHAR +# ifdef QUAD +# define strtol __wcstoull_l +# else +# define strtol __wcstoul_l +# endif +# else +# ifdef QUAD +# define strtol __strtoull_l +# else +# define strtol __strtoul_l +# endif +# endif +# else +# ifdef USE_WIDE_CHAR +# ifdef QUAD +# define strtol __wcstoll_l +# else +# define strtol __wcstol_l +# endif +# else +# ifdef QUAD +# define strtol __strtoll_l +# else +# define strtol __strtol_l +# endif +# endif +# endif +#else +# if UNSIGNED +# ifdef USE_WIDE_CHAR +# ifdef QUAD +# define strtol wcstoull +# else +# define strtol wcstoul +# endif +# else +# ifdef QUAD +# define strtol strtoull +# else +# define strtol strtoul +# endif +# endif +# else +# ifdef USE_WIDE_CHAR +# ifdef QUAD +# define strtol wcstoll +# else +# define strtol wcstol +# endif +# else +# ifdef QUAD +# define strtol strtoll +# endif +# endif +# endif +#endif + +/* If QUAD is defined, we are defining 'strtoll' or 'strtoull', + operating on 'long long int's. */ +#ifdef QUAD +# define LONG long long +# define STRTOL_LONG_MIN LLONG_MIN +# define STRTOL_LONG_MAX LLONG_MAX +# define STRTOL_ULONG_MAX ULLONG_MAX + +/* The extra casts in the following macros work around compiler bugs, + e.g., in Cray C 5.0.3.0. */ + +/* True if negative values of the signed integer type T use two's + complement, ones' complement, or signed magnitude representation, + respectively. Much GNU code assumes two's complement, but some + people like to be portable to all possible C hosts. */ +# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) +# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) +# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) + +/* True if the arithmetic type T is signed. */ +# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* The maximum and minimum values for the integer type T. These + macros have undefined behavior if T is signed and has padding bits. + If this is a problem for you, please let us know how to fix it for + your host. */ +# define TYPE_MINIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) 0 \ + : TYPE_SIGNED_MAGNITUDE (t) \ + ? ~ (t) 0 \ + : ~ TYPE_MAXIMUM (t))) +# define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) + +# ifndef ULLONG_MAX +# define ULLONG_MAX TYPE_MAXIMUM (unsigned long long) +# endif +# ifndef LLONG_MAX +# define LLONG_MAX TYPE_MAXIMUM (long long int) +# endif +# ifndef LLONG_MIN +# define LLONG_MIN TYPE_MINIMUM (long long int) +# endif + +# if __GNUC__ == 2 && __GNUC_MINOR__ < 7 + /* Work around gcc bug with using this constant. */ + static const unsigned long long int maxquad = ULLONG_MAX; +# undef STRTOL_ULONG_MAX +# define STRTOL_ULONG_MAX maxquad +# endif +#else +# define LONG long +# define STRTOL_LONG_MIN LONG_MIN +# define STRTOL_LONG_MAX LONG_MAX +# define STRTOL_ULONG_MAX ULONG_MAX +#endif + + +/* We use this code also for the extended locale handling where the + function gets as an additional argument the locale which has to be + used. To access the values we have to redefine the _NL_CURRENT + macro. */ +#ifdef USE_IN_EXTENDED_LOCALE_MODEL +# undef _NL_CURRENT +# define _NL_CURRENT(category, item) \ + (current->values[_NL_ITEM_INDEX (item)].string) +# define LOCALE_PARAM , loc +# define LOCALE_PARAM_PROTO , __locale_t loc +#else +# define LOCALE_PARAM +# define LOCALE_PARAM_PROTO +#endif + +#ifdef USE_WIDE_CHAR +# include +# include +# define L_(Ch) L##Ch +# define UCHAR_TYPE wint_t +# define STRING_TYPE wchar_t +# ifdef USE_IN_EXTENDED_LOCALE_MODEL +# define ISSPACE(Ch) __iswspace_l ((Ch), loc) +# define ISALPHA(Ch) __iswalpha_l ((Ch), loc) +# define TOUPPER(Ch) __towupper_l ((Ch), loc) +# else +# define ISSPACE(Ch) iswspace (Ch) +# define ISALPHA(Ch) iswalpha (Ch) +# define TOUPPER(Ch) towupper (Ch) +# endif +#else +# define L_(Ch) Ch +# define UCHAR_TYPE unsigned char +# define STRING_TYPE char +# ifdef USE_IN_EXTENDED_LOCALE_MODEL +# define ISSPACE(Ch) __isspace_l ((Ch), loc) +# define ISALPHA(Ch) __isalpha_l ((Ch), loc) +# define TOUPPER(Ch) __toupper_l ((Ch), loc) +# else +# define ISSPACE(Ch) isspace (Ch) +# define ISALPHA(Ch) isalpha (Ch) +# define TOUPPER(Ch) toupper (Ch) +# endif +#endif + +#define INTERNAL(X) INTERNAL1(X) +#define INTERNAL1(X) __##X##_internal +#define WEAKNAME(X) WEAKNAME1(X) + +#ifdef USE_NUMBER_GROUPING +/* This file defines a function to check for correct grouping. */ +# include "grouping.h" +#endif + + + +/* Convert NPTR to an 'unsigned long int' or 'long int' in base BASE. + If BASE is 0 the base is determined by the presence of a leading + zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal. + If BASE is < 2 or > 36, it is reset to 10. + If ENDPTR is not NULL, a pointer to the character after the last + one converted is stored in *ENDPTR. */ + +INT +INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr, + int base, int group LOCALE_PARAM_PROTO) +{ + int negative; + register unsigned LONG int cutoff; + register unsigned int cutlim; + register unsigned LONG int i; + register const STRING_TYPE *s; + register UCHAR_TYPE c; + const STRING_TYPE *save, *end; + int overflow; + +#ifdef USE_NUMBER_GROUPING +# ifdef USE_IN_EXTENDED_LOCALE_MODEL + struct locale_data *current = loc->__locales[LC_NUMERIC]; +# endif + /* The thousands character of the current locale. */ + wchar_t thousands = L'\0'; + /* The numeric grouping specification of the current locale, + in the format described in . */ + const char *grouping; + + if (group) + { + grouping = _NL_CURRENT (LC_NUMERIC, GROUPING); + if (*grouping <= 0 || *grouping == CHAR_MAX) + grouping = NULL; + else + { + /* Figure out the thousands separator character. */ +# if defined _LIBC || defined _HAVE_BTOWC + thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP)); + if (thousands == WEOF) + thousands = L'\0'; +# endif + if (thousands == L'\0') + grouping = NULL; + } + } + else + grouping = NULL; +#endif + + if (base < 0 || base == 1 || base > 36) + { + __set_errno (EINVAL); + return 0; + } + + save = s = nptr; + + /* Skip white space. */ + while (ISSPACE (*s)) + ++s; + if (*s == L_('\0')) + goto noconv; + + /* Check for a sign. */ + if (*s == L_('-')) + { + negative = 1; + ++s; + } + else if (*s == L_('+')) + { + negative = 0; + ++s; + } + else + negative = 0; + + /* Recognize number prefix and if BASE is zero, figure it out ourselves. */ + if (*s == L_('0')) + { + if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X')) + { + s += 2; + base = 16; + } + else if (base == 0) + base = 8; + } + else if (base == 0) + base = 10; + + /* Save the pointer so we can check later if anything happened. */ + save = s; + +#ifdef USE_NUMBER_GROUPING + if (group) + { + /* Find the end of the digit string and check its grouping. */ + end = s; + for (c = *end; c != L_('\0'); c = *++end) + if ((wchar_t) c != thousands + && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9')) + && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base)) + break; + if (*s == thousands) + end = s; + else + end = correctly_grouped_prefix (s, end, thousands, grouping); + } + else +#endif + end = NULL; + + cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base; + cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base; + + overflow = 0; + i = 0; + for (c = *s; c != L_('\0'); c = *++s) + { + if (s == end) + break; + if (c >= L_('0') && c <= L_('9')) + c -= L_('0'); + else if (ISALPHA (c)) + c = TOUPPER (c) - L_('A') + 10; + else + break; + if ((int) c >= base) + break; + /* Check for overflow. */ + if (i > cutoff || (i == cutoff && c > cutlim)) + overflow = 1; + else + { + i *= (unsigned LONG int) base; + i += c; + } + } + + /* Check if anything actually happened. */ + if (s == save) + goto noconv; + + /* Store in ENDPTR the address of one character + past the last character we converted. */ + if (endptr != NULL) + *endptr = (STRING_TYPE *) s; + +#if !UNSIGNED + /* Check for a value that is within the range of + 'unsigned LONG int', but outside the range of 'LONG int'. */ + if (overflow == 0 + && i > (negative + ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1 + : (unsigned LONG int) STRTOL_LONG_MAX)) + overflow = 1; +#endif + + if (overflow) + { + __set_errno (ERANGE); +#if UNSIGNED + return STRTOL_ULONG_MAX; +#else + return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX; +#endif + } + + /* Return the result of the appropriate sign. */ + return negative ? -i : i; + +noconv: + /* We must handle a special case here: the base is 0 or 16 and the + first two characters are '0' and 'x', but the rest are no + hexadecimal digits. This is no error case. We return 0 and + ENDPTR points to the 'x'. */ + if (endptr != NULL) + { + if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X') + && save[-2] == L_('0')) + *endptr = (STRING_TYPE *) &save[-1]; + else + /* There was no number to convert. */ + *endptr = (STRING_TYPE *) nptr; + } + + return 0L; +} + +/* External user entry point. */ + + +INT +#ifdef weak_function +weak_function +#endif +strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr, + int base LOCALE_PARAM_PROTO) +{ + return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM); +} diff --git a/gl/lib/strtoul.c b/gl/lib/strtoul.c new file mode 100644 index 0000000..4c5ceaf --- /dev/null +++ b/gl/lib/strtoul.c @@ -0,0 +1,19 @@ +/* Copyright (C) 1991, 1997, 2009-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#define UNSIGNED 1 + +#include "strtol.c" diff --git a/gl/lib/strtoull.c b/gl/lib/strtoull.c new file mode 100644 index 0000000..30e6e02 --- /dev/null +++ b/gl/lib/strtoull.c @@ -0,0 +1,26 @@ +/* Function to parse an 'unsigned long long int' from text. + Copyright (C) 1995-1997, 1999, 2009-2014 Free Software Foundation, Inc. + NOTE: The canonical source of this file is maintained with the GNU C + Library. Bugs can be reported to bug-glibc@gnu.org. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#define QUAD 1 + +#include "strtoul.c" + +#ifdef _LIBC +strong_alias (__strtoull_internal, __strtouq_internal) +weak_alias (strtoull, strtouq) +#endif diff --git a/gnulib/lib/strtoumax.c b/gl/lib/strtoumax.c similarity index 100% rename from gnulib/lib/strtoumax.c rename to gl/lib/strtoumax.c diff --git a/gl/lib/sys_socket.c b/gl/lib/sys_socket.c new file mode 100644 index 0000000..3f017f8 --- /dev/null +++ b/gl/lib/sys_socket.c @@ -0,0 +1,3 @@ +#include +#define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE +#include "sys/socket.h" diff --git a/gl/lib/sys_socket.in.h b/gl/lib/sys_socket.in.h new file mode 100644 index 0000000..3cdc0d1 --- /dev/null +++ b/gl/lib/sys_socket.in.h @@ -0,0 +1,692 @@ +/* Provide a sys/socket header file for systems lacking it (read: MinGW) + and for systems where it is incomplete. + Copyright (C) 2005-2014 Free Software Foundation, Inc. + Written by Simon Josefsson. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* This file is supposed to be used on platforms that lack , + on platforms where cannot be included standalone, and on + platforms where does not provide all necessary definitions. + It is intended to provide definitions and prototypes needed by an + application. */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined _GL_ALREADY_INCLUDING_SYS_SOCKET_H +/* Special invocation convention: + - On Cygwin 1.5.x we have a sequence of nested includes + -> -> -> , + and the latter includes . In this situation, the functions + are not yet declared, therefore we cannot provide the C++ aliases. */ + +#@INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H + +#if @HAVE_SYS_SOCKET_H@ + +# define _GL_ALREADY_INCLUDING_SYS_SOCKET_H + +/* On many platforms, assumes prior inclusion of + . */ +# include + +/* On FreeBSD 6.4, defines some macros that assume that NULL + is defined. */ +# include + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_SYS_SOCKET_H@ + +# undef _GL_ALREADY_INCLUDING_SYS_SOCKET_H + +#endif + +#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H +#define _@GUARD_PREFIX@_SYS_SOCKET_H + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_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. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +#if !@HAVE_SA_FAMILY_T@ +# if !GNULIB_defined_sa_family_t +typedef unsigned short sa_family_t; +# define GNULIB_defined_sa_family_t 1 +# endif +#endif + +#if @HAVE_STRUCT_SOCKADDR_STORAGE@ +/* Make the 'struct sockaddr_storage' field 'ss_family' visible on AIX 7.1. */ +# if !@HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ +# ifndef ss_family +# define ss_family __ss_family +# endif +# endif +#else +# include +/* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on + 2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */ +# define __ss_aligntype unsigned long int +# define _SS_SIZE 256 +# define _SS_PADSIZE \ + (_SS_SIZE - ((sizeof (sa_family_t) >= alignof (__ss_aligntype) \ + ? sizeof (sa_family_t) \ + : alignof (__ss_aligntype)) \ + + sizeof (__ss_aligntype))) + +# if !GNULIB_defined_struct_sockaddr_storage +struct sockaddr_storage +{ + sa_family_t ss_family; /* Address family, etc. */ + __ss_aligntype __ss_align; /* Force desired alignment. */ + char __ss_padding[_SS_PADSIZE]; +}; +# define GNULIB_defined_struct_sockaddr_storage 1 +# endif + +#endif + +/* Get struct iovec. */ +/* But avoid namespace pollution on glibc systems. */ +#if ! defined __GLIBC__ +# include +#endif + +#if @HAVE_SYS_SOCKET_H@ + +/* A platform that has . */ + +/* For shutdown(). */ +# if !defined SHUT_RD +# define SHUT_RD 0 +# endif +# if !defined SHUT_WR +# define SHUT_WR 1 +# endif +# if !defined SHUT_RDWR +# define SHUT_RDWR 2 +# endif + +#else + +# ifdef __CYGWIN__ +# error "Cygwin does have a sys/socket.h, doesn't it?!?" +# endif + +/* A platform that lacks . + + Currently only MinGW is supported. See the gnulib manual regarding + Windows sockets. MinGW has the header files winsock2.h and + ws2tcpip.h that declare the sys/socket.h definitions we need. Note + that you can influence which definitions you get by setting the + WINVER symbol before including these two files. For example, + getaddrinfo is only available if _WIN32_WINNT >= 0x0501 (that + symbol is set indirectly through WINVER). You can set this by + adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your + code may not run on older Windows releases then. My Windows 2000 + box was not able to run the code, for example. The situation is + slightly confusing because + + suggests that getaddrinfo should be available on all Windows + releases. */ + +# if @HAVE_WINSOCK2_H@ +# include +# endif +# if @HAVE_WS2TCPIP_H@ +# include +# endif + +/* For shutdown(). */ +# if !defined SHUT_RD && defined SD_RECEIVE +# define SHUT_RD SD_RECEIVE +# endif +# if !defined SHUT_WR && defined SD_SEND +# define SHUT_WR SD_SEND +# endif +# if !defined SHUT_RDWR && defined SD_BOTH +# define SHUT_RDWR SD_BOTH +# endif + +# if @HAVE_WINSOCK2_H@ +/* Include headers needed by the emulation code. */ +# include +# include + +# if !GNULIB_defined_socklen_t +typedef int socklen_t; +# define GNULIB_defined_socklen_t 1 +# endif + +# endif + +/* Rudimentary 'struct msghdr'; this works as long as you don't try to + access msg_control or msg_controllen. */ +struct msghdr { + void *msg_name; + socklen_t msg_namelen; + struct iovec *msg_iov; + int msg_iovlen; + int msg_flags; +}; + +#endif + +/* Fix some definitions from . */ + +#if @HAVE_WINSOCK2_H@ + +# if !GNULIB_defined_rpl_fd_isset + +/* Re-define FD_ISSET to avoid a WSA call while we are not using + network sockets. */ +_GL_SYS_SOCKET_INLINE int +rpl_fd_isset (SOCKET fd, fd_set * set) +{ + u_int i; + if (set == NULL) + return 0; + + for (i = 0; i < set->fd_count; i++) + if (set->fd_array[i] == fd) + return 1; + + return 0; +} + +# define GNULIB_defined_rpl_fd_isset 1 +# endif + +# undef FD_ISSET +# define FD_ISSET(fd, set) rpl_fd_isset(fd, set) + +#endif + +/* Hide some function declarations from . */ + +#if @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 "); +# 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 "); +# 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 + _GL_WARN_ON_USE (select, + "select() used without including "); +# endif +# endif +#endif + +/* Wrap everything else to use libc file descriptors for sockets. */ + +#if @GNULIB_SOCKET@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef socket +# define socket rpl_socket +# endif +_GL_FUNCDECL_RPL (socket, int, (int domain, int type, int protocol)); +_GL_CXXALIAS_RPL (socket, int, (int domain, int type, int protocol)); +# else +_GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol)); +# endif +_GL_CXXALIASWARN (socket); +#elif @HAVE_WINSOCK2_H@ +# undef socket +# define socket socket_used_without_requesting_gnulib_module_socket +#elif defined GNULIB_POSIXCHECK +# undef socket +# if HAVE_RAW_DECL_SOCKET +_GL_WARN_ON_USE (socket, "socket is not always POSIX compliant - " + "use gnulib module socket for portability"); +# endif +#endif + +#if @GNULIB_CONNECT@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef connect +# define connect rpl_connect +# endif +_GL_FUNCDECL_RPL (connect, int, + (int fd, const struct sockaddr *addr, socklen_t addrlen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (connect, int, + (int fd, const struct sockaddr *addr, socklen_t addrlen)); +# else +/* Need to cast, because on NonStop Kernel, the third parameter is + size_t addrlen. */ +_GL_CXXALIAS_SYS_CAST (connect, int, + (int fd, + const struct sockaddr *addr, socklen_t addrlen)); +# endif +_GL_CXXALIASWARN (connect); +#elif @HAVE_WINSOCK2_H@ +# undef connect +# define connect socket_used_without_requesting_gnulib_module_connect +#elif defined GNULIB_POSIXCHECK +# undef connect +# if HAVE_RAW_DECL_CONNECT +_GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - " + "use gnulib module connect for portability"); +# endif +#endif + +#if @GNULIB_ACCEPT@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef accept +# define accept rpl_accept +# endif +_GL_FUNCDECL_RPL (accept, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +_GL_CXXALIAS_RPL (accept, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# else +/* Need to cast, because on Solaris 10 systems, the third parameter is + void *addrlen. */ +_GL_CXXALIAS_SYS_CAST (accept, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# endif +_GL_CXXALIASWARN (accept); +#elif @HAVE_WINSOCK2_H@ +# undef accept +# define accept accept_used_without_requesting_gnulib_module_accept +#elif defined GNULIB_POSIXCHECK +# undef accept +# if HAVE_RAW_DECL_ACCEPT +_GL_WARN_ON_USE (accept, "accept is not always POSIX compliant - " + "use gnulib module accept for portability"); +# endif +#endif + +#if @GNULIB_BIND@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef bind +# define bind rpl_bind +# endif +_GL_FUNCDECL_RPL (bind, int, + (int fd, const struct sockaddr *addr, socklen_t addrlen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (bind, int, + (int fd, const struct sockaddr *addr, socklen_t addrlen)); +# else +/* Need to cast, because on NonStop Kernel, the third parameter is + size_t addrlen. */ +_GL_CXXALIAS_SYS_CAST (bind, int, + (int fd, + const struct sockaddr *addr, socklen_t addrlen)); +# endif +_GL_CXXALIASWARN (bind); +#elif @HAVE_WINSOCK2_H@ +# undef bind +# define bind bind_used_without_requesting_gnulib_module_bind +#elif defined GNULIB_POSIXCHECK +# undef bind +# if HAVE_RAW_DECL_BIND +_GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - " + "use gnulib module bind for portability"); +# endif +#endif + +#if @GNULIB_GETPEERNAME@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getpeername +# define getpeername rpl_getpeername +# endif +_GL_FUNCDECL_RPL (getpeername, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (getpeername, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# else +/* Need to cast, because on Solaris 10 systems, the third parameter is + void *addrlen. */ +_GL_CXXALIAS_SYS_CAST (getpeername, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# endif +_GL_CXXALIASWARN (getpeername); +#elif @HAVE_WINSOCK2_H@ +# undef getpeername +# define getpeername getpeername_used_without_requesting_gnulib_module_getpeername +#elif defined GNULIB_POSIXCHECK +# undef getpeername +# if HAVE_RAW_DECL_GETPEERNAME +_GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - " + "use gnulib module getpeername for portability"); +# endif +#endif + +#if @GNULIB_GETSOCKNAME@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsockname +# define getsockname rpl_getsockname +# endif +_GL_FUNCDECL_RPL (getsockname, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (getsockname, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# else +/* Need to cast, because on Solaris 10 systems, the third parameter is + void *addrlen. */ +_GL_CXXALIAS_SYS_CAST (getsockname, int, + (int fd, struct sockaddr *addr, socklen_t *addrlen)); +# endif +_GL_CXXALIASWARN (getsockname); +#elif @HAVE_WINSOCK2_H@ +# undef getsockname +# define getsockname getsockname_used_without_requesting_gnulib_module_getsockname +#elif defined GNULIB_POSIXCHECK +# undef getsockname +# if HAVE_RAW_DECL_GETSOCKNAME +_GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - " + "use gnulib module getsockname for portability"); +# endif +#endif + +#if @GNULIB_GETSOCKOPT@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getsockopt +# define getsockopt rpl_getsockopt +# endif +_GL_FUNCDECL_RPL (getsockopt, int, (int fd, int level, int optname, + void *optval, socklen_t *optlen) + _GL_ARG_NONNULL ((4, 5))); +_GL_CXXALIAS_RPL (getsockopt, int, (int fd, int level, int optname, + void *optval, socklen_t *optlen)); +# else +/* Need to cast, because on Solaris 10 systems, the fifth parameter is + void *optlen. */ +_GL_CXXALIAS_SYS_CAST (getsockopt, int, (int fd, int level, int optname, + void *optval, socklen_t *optlen)); +# endif +_GL_CXXALIASWARN (getsockopt); +#elif @HAVE_WINSOCK2_H@ +# undef getsockopt +# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt +#elif defined GNULIB_POSIXCHECK +# undef getsockopt +# if HAVE_RAW_DECL_GETSOCKOPT +_GL_WARN_ON_USE (getsockopt, "getsockopt is not always POSIX compliant - " + "use gnulib module getsockopt for portability"); +# endif +#endif + +#if @GNULIB_LISTEN@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef listen +# define listen rpl_listen +# endif +_GL_FUNCDECL_RPL (listen, int, (int fd, int backlog)); +_GL_CXXALIAS_RPL (listen, int, (int fd, int backlog)); +# else +_GL_CXXALIAS_SYS (listen, int, (int fd, int backlog)); +# endif +_GL_CXXALIASWARN (listen); +#elif @HAVE_WINSOCK2_H@ +# undef listen +# define listen listen_used_without_requesting_gnulib_module_listen +#elif defined GNULIB_POSIXCHECK +# undef listen +# if HAVE_RAW_DECL_LISTEN +_GL_WARN_ON_USE (listen, "listen is not always POSIX compliant - " + "use gnulib module listen for portability"); +# endif +#endif + +#if @GNULIB_RECV@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef recv +# define recv rpl_recv +# endif +_GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); +# else +_GL_CXXALIAS_SYS (recv, ssize_t, (int fd, void *buf, size_t len, int flags)); +# endif +_GL_CXXALIASWARN (recv); +#elif @HAVE_WINSOCK2_H@ +# undef recv +# define recv recv_used_without_requesting_gnulib_module_recv +#elif defined GNULIB_POSIXCHECK +# undef recv +# if HAVE_RAW_DECL_RECV +_GL_WARN_ON_USE (recv, "recv is not always POSIX compliant - " + "use gnulib module recv for portability"); +# endif +#endif + +#if @GNULIB_SEND@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef send +# define send rpl_send +# endif +_GL_FUNCDECL_RPL (send, ssize_t, + (int fd, const void *buf, size_t len, int flags) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (send, ssize_t, + (int fd, const void *buf, size_t len, int flags)); +# else +_GL_CXXALIAS_SYS (send, ssize_t, + (int fd, const void *buf, size_t len, int flags)); +# endif +_GL_CXXALIASWARN (send); +#elif @HAVE_WINSOCK2_H@ +# undef send +# define send send_used_without_requesting_gnulib_module_send +#elif defined GNULIB_POSIXCHECK +# undef send +# if HAVE_RAW_DECL_SEND +_GL_WARN_ON_USE (send, "send is not always POSIX compliant - " + "use gnulib module send for portability"); +# endif +#endif + +#if @GNULIB_RECVFROM@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef recvfrom +# define recvfrom rpl_recvfrom +# endif +_GL_FUNCDECL_RPL (recvfrom, ssize_t, + (int fd, void *buf, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (recvfrom, ssize_t, + (int fd, void *buf, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen)); +# else +/* Need to cast, because on Solaris 10 systems, the sixth parameter is + void *fromlen. */ +_GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t, + (int fd, void *buf, size_t len, int flags, + struct sockaddr *from, socklen_t *fromlen)); +# endif +_GL_CXXALIASWARN (recvfrom); +#elif @HAVE_WINSOCK2_H@ +# undef recvfrom +# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom +#elif defined GNULIB_POSIXCHECK +# undef recvfrom +# if HAVE_RAW_DECL_RECVFROM +_GL_WARN_ON_USE (recvfrom, "recvfrom is not always POSIX compliant - " + "use gnulib module recvfrom for portability"); +# endif +#endif + +#if @GNULIB_SENDTO@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sendto +# define sendto rpl_sendto +# endif +_GL_FUNCDECL_RPL (sendto, ssize_t, + (int fd, const void *buf, size_t len, int flags, + const struct sockaddr *to, socklen_t tolen) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (sendto, ssize_t, + (int fd, const void *buf, size_t len, int flags, + const struct sockaddr *to, socklen_t tolen)); +# else +/* Need to cast, because on NonStop Kernel, the sixth parameter is + size_t tolen. */ +_GL_CXXALIAS_SYS_CAST (sendto, ssize_t, + (int fd, const void *buf, size_t len, int flags, + const struct sockaddr *to, socklen_t tolen)); +# endif +_GL_CXXALIASWARN (sendto); +#elif @HAVE_WINSOCK2_H@ +# undef sendto +# define sendto sendto_used_without_requesting_gnulib_module_sendto +#elif defined GNULIB_POSIXCHECK +# undef sendto +# if HAVE_RAW_DECL_SENDTO +_GL_WARN_ON_USE (sendto, "sendto is not always POSIX compliant - " + "use gnulib module sendto for portability"); +# endif +#endif + +#if @GNULIB_SETSOCKOPT@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef setsockopt +# define setsockopt rpl_setsockopt +# endif +_GL_FUNCDECL_RPL (setsockopt, int, (int fd, int level, int optname, + const void * optval, socklen_t optlen) + _GL_ARG_NONNULL ((4))); +_GL_CXXALIAS_RPL (setsockopt, int, (int fd, int level, int optname, + const void * optval, socklen_t optlen)); +# else +/* Need to cast, because on NonStop Kernel, the fifth parameter is + size_t optlen. */ +_GL_CXXALIAS_SYS_CAST (setsockopt, int, + (int fd, int level, int optname, + const void * optval, socklen_t optlen)); +# endif +_GL_CXXALIASWARN (setsockopt); +#elif @HAVE_WINSOCK2_H@ +# undef setsockopt +# define setsockopt setsockopt_used_without_requesting_gnulib_module_setsockopt +#elif defined GNULIB_POSIXCHECK +# undef setsockopt +# if HAVE_RAW_DECL_SETSOCKOPT +_GL_WARN_ON_USE (setsockopt, "setsockopt is not always POSIX compliant - " + "use gnulib module setsockopt for portability"); +# endif +#endif + +#if @GNULIB_SHUTDOWN@ +# if @HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef shutdown +# define shutdown rpl_shutdown +# endif +_GL_FUNCDECL_RPL (shutdown, int, (int fd, int how)); +_GL_CXXALIAS_RPL (shutdown, int, (int fd, int how)); +# else +_GL_CXXALIAS_SYS (shutdown, int, (int fd, int how)); +# endif +_GL_CXXALIASWARN (shutdown); +#elif @HAVE_WINSOCK2_H@ +# undef shutdown +# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown +#elif defined GNULIB_POSIXCHECK +# undef shutdown +# if HAVE_RAW_DECL_SHUTDOWN +_GL_WARN_ON_USE (shutdown, "shutdown is not always POSIX compliant - " + "use gnulib module shutdown for portability"); +# endif +#endif + +#if @GNULIB_ACCEPT4@ +/* Accept a connection on a socket, with specific opening flags. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + See also the Linux man page at + . */ +# if @HAVE_ACCEPT4@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define accept4 rpl_accept4 +# endif +_GL_FUNCDECL_RPL (accept4, int, + (int sockfd, struct sockaddr *addr, socklen_t *addrlen, + int flags)); +_GL_CXXALIAS_RPL (accept4, int, + (int sockfd, struct sockaddr *addr, socklen_t *addrlen, + int flags)); +# else +_GL_FUNCDECL_SYS (accept4, int, + (int sockfd, struct sockaddr *addr, socklen_t *addrlen, + int flags)); +_GL_CXXALIAS_SYS (accept4, int, + (int sockfd, struct sockaddr *addr, socklen_t *addrlen, + int flags)); +# endif +_GL_CXXALIASWARN (accept4); +#elif defined GNULIB_POSIXCHECK +# undef accept4 +# if HAVE_RAW_DECL_ACCEPT4 +_GL_WARN_ON_USE (accept4, "accept4 is unportable - " + "use gnulib module accept4 for portability"); +# endif +#endif + +_GL_INLINE_HEADER_END + +#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */ +#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */ +#endif diff --git a/gl/lib/sys_stat.in.h b/gl/lib/sys_stat.in.h new file mode 100644 index 0000000..b47a7ff --- /dev/null +++ b/gl/lib/sys_stat.in.h @@ -0,0 +1,732 @@ +/* Provide a more complete sys/stat header file. + Copyright (C) 2005-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ + +/* This file is supposed to be used on platforms where is + incomplete. It is intended to provide definitions and prototypes + needed by an application. Start with what the system provides. */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined __need_system_sys_stat_h +/* Special invocation convention. */ + +#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_SYS_STAT_H + +/* Get nlink_t. + May also define off_t to a 64-bit type on native Windows. */ +#include + +/* Get struct timespec. */ +#include + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ + +#ifndef _@GUARD_PREFIX@_SYS_STAT_H +#define _@GUARD_PREFIX@_SYS_STAT_H + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* Before doing "#define mkdir rpl_mkdir" below, we need to include all + headers that may declare mkdir(). Native Windows platforms declare mkdir + in and/or , not in . */ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include /* mingw32, mingw64 */ +# include /* mingw64, MSVC 9 */ +#endif + +/* Native Windows platforms declare umask() in . */ +#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +# include +#endif + +/* Large File Support on native Windows. */ +#if @WINDOWS_64_BIT_ST_SIZE@ +# define stat _stati64 +#endif + +#ifndef S_IFIFO +# ifdef _S_IFIFO +# define S_IFIFO _S_IFIFO +# endif +#endif + +#ifndef S_IFMT +# define S_IFMT 0170000 +#endif + +#if STAT_MACROS_BROKEN +# undef S_ISBLK +# undef S_ISCHR +# undef S_ISDIR +# undef S_ISFIFO +# undef S_ISLNK +# undef S_ISNAM +# undef S_ISMPB +# undef S_ISMPC +# undef S_ISNWK +# undef S_ISREG +# undef S_ISSOCK +#endif + +#ifndef S_ISBLK +# ifdef S_IFBLK +# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) +# else +# define S_ISBLK(m) 0 +# endif +#endif + +#ifndef S_ISCHR +# ifdef S_IFCHR +# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +# else +# define S_ISCHR(m) 0 +# endif +#endif + +#ifndef S_ISDIR +# ifdef S_IFDIR +# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +# else +# define S_ISDIR(m) 0 +# endif +#endif + +#ifndef S_ISDOOR /* Solaris 2.5 and up */ +# define S_ISDOOR(m) 0 +#endif + +#ifndef S_ISFIFO +# ifdef S_IFIFO +# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) +# else +# define S_ISFIFO(m) 0 +# endif +#endif + +#ifndef S_ISLNK +# ifdef S_IFLNK +# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) +# else +# define S_ISLNK(m) 0 +# endif +#endif + +#ifndef S_ISMPB /* V7 */ +# ifdef S_IFMPB +# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) +# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) +# else +# define S_ISMPB(m) 0 +# define S_ISMPC(m) 0 +# 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) +# else +# define S_ISNAM(m) 0 +# endif +#endif + +#ifndef S_ISNWK /* HP/UX */ +# ifdef S_IFNWK +# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) +# else +# define S_ISNWK(m) 0 +# endif +#endif + +#ifndef S_ISPORT /* Solaris 10 and up */ +# define S_ISPORT(m) 0 +#endif + +#ifndef S_ISREG +# ifdef S_IFREG +# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +# else +# define S_ISREG(m) 0 +# endif +#endif + +#ifndef S_ISSOCK +# ifdef S_IFSOCK +# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) +# else +# define S_ISSOCK(m) 0 +# endif +#endif + + +#ifndef S_TYPEISMQ +# define S_TYPEISMQ(p) 0 +#endif + +#ifndef S_TYPEISTMO +# define S_TYPEISTMO(p) 0 +#endif + + +#ifndef S_TYPEISSEM +# ifdef S_INSEM +# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) +# else +# define S_TYPEISSEM(p) 0 +# endif +#endif + +#ifndef S_TYPEISSHM +# ifdef S_INSHD +# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) +# else +# define S_TYPEISSHM(p) 0 +# endif +#endif + +/* high performance ("contiguous data") */ +#ifndef S_ISCTG +# define S_ISCTG(p) 0 +#endif + +/* Cray DMF (data migration facility): off line, with data */ +#ifndef S_ISOFD +# define S_ISOFD(p) 0 +#endif + +/* Cray DMF (data migration facility): off line, with no data */ +#ifndef S_ISOFL +# define S_ISOFL(p) 0 +#endif + +/* 4.4BSD whiteout */ +#ifndef S_ISWHT +# define S_ISWHT(m) 0 +#endif + +/* If any of the following are undefined, + define them to their de facto standard values. */ +#if !S_ISUID +# define S_ISUID 04000 +#endif +#if !S_ISGID +# define S_ISGID 02000 +#endif + +/* S_ISVTX is a common extension to POSIX. */ +#ifndef S_ISVTX +# define S_ISVTX 01000 +#endif + +#if !S_IRUSR && S_IREAD +# define S_IRUSR S_IREAD +#endif +#if !S_IRUSR +# define S_IRUSR 00400 +#endif +#if !S_IRGRP +# define S_IRGRP (S_IRUSR >> 3) +#endif +#if !S_IROTH +# define S_IROTH (S_IRUSR >> 6) +#endif + +#if !S_IWUSR && S_IWRITE +# define S_IWUSR S_IWRITE +#endif +#if !S_IWUSR +# define S_IWUSR 00200 +#endif +#if !S_IWGRP +# define S_IWGRP (S_IWUSR >> 3) +#endif +#if !S_IWOTH +# define S_IWOTH (S_IWUSR >> 6) +#endif + +#if !S_IXUSR && S_IEXEC +# define S_IXUSR S_IEXEC +#endif +#if !S_IXUSR +# define S_IXUSR 00100 +#endif +#if !S_IXGRP +# define S_IXGRP (S_IXUSR >> 3) +#endif +#if !S_IXOTH +# define S_IXOTH (S_IXUSR >> 6) +#endif + +#if !S_IRWXU +# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) +#endif +#if !S_IRWXG +# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) +#endif +#if !S_IRWXO +# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) +#endif + +/* S_IXUGO is a common extension to POSIX. */ +#if !S_IXUGO +# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) +#endif + +#ifndef S_IRWXUGO +# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) +#endif + +/* Macros for futimens and utimensat. */ +#ifndef UTIME_NOW +# define UTIME_NOW (-1) +# define UTIME_OMIT (-2) +#endif + + +#if @GNULIB_FCHMODAT@ +# if !@HAVE_FCHMODAT@ +_GL_FUNCDECL_SYS (fchmodat, int, + (int fd, char const *file, mode_t mode, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (fchmodat, int, + (int fd, char const *file, mode_t mode, int flag)); +_GL_CXXALIASWARN (fchmodat); +#elif defined GNULIB_POSIXCHECK +# undef fchmodat +# if HAVE_RAW_DECL_FCHMODAT +_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " + "use gnulib module openat for portability"); +# endif +#endif + + +#if @GNULIB_FSTAT@ +# if @REPLACE_FSTAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fstat +# define fstat rpl_fstat +# endif +_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); +# else +_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); +# endif +_GL_CXXALIASWARN (fstat); +#elif @WINDOWS_64_BIT_ST_SIZE@ +/* Above, we define stat to _stati64. */ +# define fstat _fstati64 +#elif defined GNULIB_POSIXCHECK +# undef fstat +# if HAVE_RAW_DECL_FSTAT +_GL_WARN_ON_USE (fstat, "fstat has portability problems - " + "use gnulib module fstat for portability"); +# endif +#endif + + +#if @GNULIB_FSTATAT@ +# if @REPLACE_FSTATAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fstatat +# define fstatat rpl_fstatat +# endif +_GL_FUNCDECL_RPL (fstatat, int, + (int fd, char const *name, struct stat *st, int flags) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (fstatat, int, + (int fd, char const *name, struct stat *st, int flags)); +# else +# if !@HAVE_FSTATAT@ +_GL_FUNCDECL_SYS (fstatat, int, + (int fd, char const *name, struct stat *st, int flags) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (fstatat, int, + (int fd, char const *name, struct stat *st, int flags)); +# endif +_GL_CXXALIASWARN (fstatat); +#elif defined GNULIB_POSIXCHECK +# undef fstatat +# if HAVE_RAW_DECL_FSTATAT +_GL_WARN_ON_USE (fstatat, "fstatat is not portable - " + "use gnulib module openat for portability"); +# endif +#endif + + +#if @GNULIB_FUTIMENS@ +/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens + implementation relies on futimesat, which on Solaris 10 makes an invocation + to futimens that is meant to invoke the libc's futimens(), not gnulib's + futimens(). */ +# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef futimens +# define futimens rpl_futimens +# endif +_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); +_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); +# else +# if !@HAVE_FUTIMENS@ +_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); +# endif +_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); +# endif +# if @HAVE_FUTIMENS@ +_GL_CXXALIASWARN (futimens); +# endif +#elif defined GNULIB_POSIXCHECK +# undef futimens +# if HAVE_RAW_DECL_FUTIMENS +_GL_WARN_ON_USE (futimens, "futimens is not portable - " + "use gnulib module futimens for portability"); +# endif +#endif + + +#if @GNULIB_LCHMOD@ +/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME + denotes a symbolic link. */ +# if !@HAVE_LCHMOD@ +/* The lchmod replacement follows symbolic links. Callers should take + this into account; lchmod should be applied only to arguments that + are known to not be symbolic links. On hosts that lack lchmod, + this can lead to race conditions between the check and the + invocation of lchmod, but we know of no workarounds that are + reliable in general. You might try requesting support for lchmod + from your operating system supplier. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lchmod chmod +# endif +/* Need to cast, because on mingw, the second parameter of chmod is + int mode. */ +_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, + (const char *filename, mode_t mode)); +# else +# if 0 /* assume already declared */ +_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); +# endif +# if @HAVE_LCHMOD@ +_GL_CXXALIASWARN (lchmod); +# endif +#elif defined GNULIB_POSIXCHECK +# undef lchmod +# if HAVE_RAW_DECL_LCHMOD +_GL_WARN_ON_USE (lchmod, "lchmod is unportable - " + "use gnulib module lchmod for portability"); +# endif +#endif + + +#if @GNULIB_LSTAT@ +# if ! @HAVE_LSTAT@ +/* mingw does not support symlinks, therefore it does not have lstat. But + without links, stat does just fine. */ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lstat stat +# endif +_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf)); +# elif @REPLACE_LSTAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lstat +# define lstat rpl_lstat +# endif +_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); +# else +_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); +# endif +# if @HAVE_LSTAT@ +_GL_CXXALIASWARN (lstat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef lstat +# if HAVE_RAW_DECL_LSTAT +_GL_WARN_ON_USE (lstat, "lstat is unportable - " + "use gnulib module lstat for portability"); +# endif +#endif + + +#if @REPLACE_MKDIR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkdir +# define mkdir rpl_mkdir +# endif +_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); +#else +/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. + Additionally, it declares _mkdir (and depending on compile flags, an + alias mkdir), only in the nonstandard includes and , + which are included above. */ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + +# if !GNULIB_defined_rpl_mkdir +static int +rpl_mkdir (char const *name, mode_t mode) +{ + return _mkdir (name); +} +# define GNULIB_defined_rpl_mkdir 1 +# endif + +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mkdir rpl_mkdir +# endif +_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); +# else +_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); +# endif +#endif +_GL_CXXALIASWARN (mkdir); + + +#if @GNULIB_MKDIRAT@ +# if !@HAVE_MKDIRAT@ +_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); +_GL_CXXALIASWARN (mkdirat); +#elif defined GNULIB_POSIXCHECK +# undef mkdirat +# if HAVE_RAW_DECL_MKDIRAT +_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " + "use gnulib module openat for portability"); +# endif +#endif + + +#if @GNULIB_MKFIFO@ +# if @REPLACE_MKFIFO@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mkfifo +# define mkfifo rpl_mkfifo +# endif +_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); +# else +# if !@HAVE_MKFIFO@ +_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); +# endif +_GL_CXXALIASWARN (mkfifo); +#elif defined GNULIB_POSIXCHECK +# undef mkfifo +# if HAVE_RAW_DECL_MKFIFO +_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " + "use gnulib module mkfifo for portability"); +# endif +#endif + + +#if @GNULIB_MKFIFOAT@ +# if !@HAVE_MKFIFOAT@ +_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); +_GL_CXXALIASWARN (mkfifoat); +#elif defined GNULIB_POSIXCHECK +# undef mkfifoat +# if HAVE_RAW_DECL_MKFIFOAT +_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " + "use gnulib module mkfifoat for portability"); +# endif +#endif + + +#if @GNULIB_MKNOD@ +# if @REPLACE_MKNOD@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mknod +# define mknod rpl_mknod +# endif +_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); +# else +# if !@HAVE_MKNOD@ +_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ +_GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); +# endif +_GL_CXXALIASWARN (mknod); +#elif defined GNULIB_POSIXCHECK +# undef mknod +# if HAVE_RAW_DECL_MKNOD +_GL_WARN_ON_USE (mknod, "mknod is not portable - " + "use gnulib module mknod for portability"); +# endif +#endif + + +#if @GNULIB_MKNODAT@ +# if !@HAVE_MKNODAT@ +_GL_FUNCDECL_SYS (mknodat, int, + (int fd, char const *file, mode_t mode, dev_t dev) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mknodat, int, + (int fd, char const *file, mode_t mode, dev_t dev)); +_GL_CXXALIASWARN (mknodat); +#elif defined GNULIB_POSIXCHECK +# undef mknodat +# if HAVE_RAW_DECL_MKNODAT +_GL_WARN_ON_USE (mknodat, "mknodat is not portable - " + "use gnulib module mkfifoat for portability"); +# endif +#endif + + +#if @GNULIB_STAT@ +# if @REPLACE_STAT@ +/* We can't use the object-like #define stat rpl_stat, because of + struct stat. This means that rpl_stat will not be used if the user + does (stat)(a,b). Oh well. */ +# if defined _AIX && defined stat && defined _LARGE_FILES + /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, + so we have to replace stat64() instead of stat(). */ +# undef stat64 +# define stat64(name, st) rpl_stat (name, st) +# elif @WINDOWS_64_BIT_ST_SIZE@ + /* Above, we define stat to _stati64. */ +# if defined __MINGW32__ && defined _stati64 +# ifndef _USE_32BIT_TIME_T + /* The system headers define _stati64 to _stat64. */ +# undef _stat64 +# define _stat64(name, st) rpl_stat (name, st) +# endif +# elif defined _MSC_VER && defined _stati64 +# ifdef _USE_32BIT_TIME_T + /* The system headers define _stati64 to _stat32i64. */ +# undef _stat32i64 +# define _stat32i64(name, st) rpl_stat (name, st) +# else + /* The system headers define _stati64 to _stat64. */ +# undef _stat64 +# define _stat64(name, st) rpl_stat (name, st) +# endif +# else +# undef _stati64 +# define _stati64(name, st) rpl_stat (name, st) +# endif +# elif defined __MINGW32__ && defined stat +# ifdef _USE_32BIT_TIME_T + /* The system headers define stat to _stat32i64. */ +# undef _stat32i64 +# define _stat32i64(name, st) rpl_stat (name, st) +# else + /* The system headers define stat to _stat64. */ +# undef _stat64 +# define _stat64(name, st) rpl_stat (name, st) +# endif +# elif defined _MSC_VER && defined stat +# ifdef _USE_32BIT_TIME_T + /* The system headers define stat to _stat32. */ +# undef _stat32 +# define _stat32(name, st) rpl_stat (name, st) +# else + /* The system headers define stat to _stat64i32. */ +# undef _stat64i32 +# define _stat64i32(name, st) rpl_stat (name, st) +# endif +# else /* !(_AIX ||__MINGW32__ || _MSC_VER) */ +# undef stat +# define stat(name, st) rpl_stat (name, st) +# endif /* !_LARGE_FILES */ +_GL_EXTERN_C int stat (const char *name, struct stat *buf) + _GL_ARG_NONNULL ((1, 2)); +# endif +#elif defined GNULIB_POSIXCHECK +# undef stat +# if HAVE_RAW_DECL_STAT +_GL_WARN_ON_USE (stat, "stat is unportable - " + "use gnulib module stat for portability"); +# endif +#endif + + +#if @GNULIB_UTIMENSAT@ +/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat + implementation relies on futimesat, which on Solaris 10 makes an invocation + to utimensat that is meant to invoke the libc's utimensat(), not gnulib's + utimensat(). */ +# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun) +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef utimensat +# define utimensat rpl_utimensat +# endif +_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, + struct timespec const times[2], int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, + struct timespec const times[2], int flag)); +# else +# if !@HAVE_UTIMENSAT@ +_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, + struct timespec const times[2], int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, + struct timespec const times[2], int flag)); +# endif +# if @HAVE_UTIMENSAT@ +_GL_CXXALIASWARN (utimensat); +# endif +#elif defined GNULIB_POSIXCHECK +# undef utimensat +# if HAVE_RAW_DECL_UTIMENSAT +_GL_WARN_ON_USE (utimensat, "utimensat is not portable - " + "use gnulib module utimensat for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_SYS_STAT_H */ +#endif /* _@GUARD_PREFIX@_SYS_STAT_H */ +#endif diff --git a/gl/lib/sys_time.in.h b/gl/lib/sys_time.in.h new file mode 100644 index 0000000..30057ad --- /dev/null +++ b/gl/lib/sys_time.in.h @@ -0,0 +1,213 @@ +/* Provide a more complete sys/time.h. + + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Paul Eggert. */ + +#ifndef _@GUARD_PREFIX@_SYS_TIME_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* On Cygwin and on many BSDish systems, includes itself + recursively via . + Simply delegate to the system's header in this case; it is a no-op. + Without this extra ifdef, the C++ gettimeofday declaration below + would be a forward declaration in gnulib's nested . */ +#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +#else + +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_SYS_TIME_H@ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +#endif + +#ifndef _@GUARD_PREFIX@_SYS_TIME_H +#define _@GUARD_PREFIX@_SYS_TIME_H + +#if ! @HAVE_SYS_TIME_H@ +# include +#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 +# undef _GL_INCLUDING_WINSOCK2_H +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@ + +# if @REPLACE_STRUCT_TIMEVAL@ +# define timeval rpl_timeval +# endif + +# if !GNULIB_defined_struct_timeval +struct timeval +{ + time_t tv_sec; + long int tv_usec; +}; +# define GNULIB_defined_struct_timeval 1 +# endif + +#endif + +#ifdef __cplusplus +} +#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@ +_GL_FUNCDECL_SYS (gettimeofday, int, + (struct timeval *restrict, void *restrict) + _GL_ARG_NONNULL ((1))); +# 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 +_GL_CXXALIASWARN (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 + +/* Hide some function declarations from . */ + +#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 "); +# 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 "); +# 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 + _GL_WARN_ON_USE (socket, + "socket() used without including "); + _GL_WARN_ON_USE (connect, + "connect() used without including "); + _GL_WARN_ON_USE (accept, + "accept() used without including "); + _GL_WARN_ON_USE (bind, + "bind() used without including "); + _GL_WARN_ON_USE (getpeername, + "getpeername() used without including "); + _GL_WARN_ON_USE (getsockname, + "getsockname() used without including "); + _GL_WARN_ON_USE (getsockopt, + "getsockopt() used without including "); + _GL_WARN_ON_USE (listen, + "listen() used without including "); + _GL_WARN_ON_USE (recv, + "recv() used without including "); + _GL_WARN_ON_USE (send, + "send() used without including "); + _GL_WARN_ON_USE (recvfrom, + "recvfrom() used without including "); + _GL_WARN_ON_USE (sendto, + "sendto() used without including "); + _GL_WARN_ON_USE (setsockopt, + "setsockopt() used without including "); + _GL_WARN_ON_USE (shutdown, + "shutdown() used without including "); +# 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 + _GL_WARN_ON_USE (select, + "select() used without including "); +# endif +# endif +#endif + +#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ +#endif /* _CYGWIN_SYS_TIME_H */ +#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ diff --git a/gl/lib/sys_types.in.h b/gl/lib/sys_types.in.h new file mode 100644 index 0000000..deb5d67 --- /dev/null +++ b/gl/lib/sys_types.in.h @@ -0,0 +1,53 @@ +/* Provide a more complete sys/types.h. + + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#ifndef _@GUARD_PREFIX@_SYS_TYPES_H + +/* The include_next requires a split double-inclusion guard. */ +# define _GL_INCLUDING_SYS_TYPES_H +#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@ +# undef _GL_INCLUDING_SYS_TYPES_H + +#ifndef _@GUARD_PREFIX@_SYS_TYPES_H +#define _@GUARD_PREFIX@_SYS_TYPES_H + +/* Override off_t if Large File Support is requested on native Windows. */ +#if @WINDOWS_64_BIT_OFF_T@ +/* Same as int64_t in . */ +# if defined _MSC_VER +# define off_t __int64 +# else +# define off_t long long int +# endif +/* Indicator, for gnulib internal purposes. */ +# define _GL_WINDOWS_64_BIT_OFF_T 1 +#endif + +/* MSVC 9 defines size_t in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ +# include +#endif + +#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ +#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ diff --git a/gl/lib/sys_uio.in.h b/gl/lib/sys_uio.in.h new file mode 100644 index 0000000..0b403bc --- /dev/null +++ b/gl/lib/sys_uio.in.h @@ -0,0 +1,63 @@ +/* Substitute for . + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +# if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +# endif +@PRAGMA_COLUMNS@ + +#ifndef _@GUARD_PREFIX@_SYS_UIO_H + +#if @HAVE_SYS_UIO_H@ + +/* On OpenBSD 4.4, assumes prior inclusion of . */ +# include + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_SYS_UIO_H@ + +#endif + +#ifndef _@GUARD_PREFIX@_SYS_UIO_H +#define _@GUARD_PREFIX@_SYS_UIO_H + +#if !@HAVE_SYS_UIO_H@ +/* A platform that lacks . */ +/* Get 'size_t' and 'ssize_t'. */ +# include + +# ifdef __cplusplus +extern "C" { +# endif + +# if !GNULIB_defined_struct_iovec +/* All known platforms that lack also lack any declaration + of struct iovec in any other header. */ +struct iovec { + void *iov_base; + size_t iov_len; +}; +# define GNULIB_defined_struct_iovec 1 +# endif + +# ifdef __cplusplus +} +# endif + +#endif + +#endif /* _@GUARD_PREFIX@_SYS_UIO_H */ +#endif /* _@GUARD_PREFIX@_SYS_UIO_H */ diff --git a/gl/lib/sys_utsname.in.h b/gl/lib/sys_utsname.in.h new file mode 100644 index 0000000..f9e9d9d --- /dev/null +++ b/gl/lib/sys_utsname.in.h @@ -0,0 +1,108 @@ +/* Substitute for . + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _@GUARD_PREFIX@_SYS_UTSNAME_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if @HAVE_SYS_UTSNAME_H@ + +/* Minix 3.1.8 has a bug: must be included before . + But avoid namespace pollution on glibc systems. */ +# if defined __minix && !defined __GLIBC__ +# include +# endif + +# @INCLUDE_NEXT@ @NEXT_SYS_UTSNAME_H@ + +#endif + +#define _@GUARD_PREFIX@_SYS_UTSNAME_H + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +#ifdef __cplusplus +extern "C" { +#endif + +#if !@HAVE_STRUCT_UTSNAME@ +/* Length of the entries in 'struct utsname' is 256. */ +# define _UTSNAME_LENGTH 256 + +# ifndef _UTSNAME_NODENAME_LENGTH +# define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH +# endif +# ifndef _UTSNAME_SYSNAME_LENGTH +# define _UTSNAME_SYSNAME_LENGTH _UTSNAME_LENGTH +# endif +# ifndef _UTSNAME_RELEASE_LENGTH +# define _UTSNAME_RELEASE_LENGTH _UTSNAME_LENGTH +# endif +# ifndef _UTSNAME_VERSION_LENGTH +# define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH +# endif +# ifndef _UTSNAME_MACHINE_LENGTH +# define _UTSNAME_MACHINE_LENGTH _UTSNAME_LENGTH +# endif + +# if !GNULIB_defined_struct_utsname +/* Structure describing the system and machine. */ +struct utsname + { + /* Name of this node on the network. */ + char nodename[_UTSNAME_NODENAME_LENGTH]; + + /* Name of the implementation of the operating system. */ + char sysname[_UTSNAME_SYSNAME_LENGTH]; + /* Current release level of this implementation. */ + char release[_UTSNAME_RELEASE_LENGTH]; + /* Current version level of this release. */ + char version[_UTSNAME_VERSION_LENGTH]; + + /* Name of the hardware type the system is running on. */ + char machine[_UTSNAME_MACHINE_LENGTH]; + }; +# define GNULIB_defined_struct_utsname 1 +# endif + +#endif /* !@HAVE_STRUCT_UTSNAME@ */ + + +#if @GNULIB_UNAME@ +# if !@HAVE_UNAME@ +extern int uname (struct utsname *buf) _GL_ARG_NONNULL ((1)); +# endif +#elif defined GNULIB_POSIXCHECK +# undef uname +# if HAVE_RAW_DECL_UNAME +_GL_WARN_ON_USE (uname, "uname is unportable - " + "use gnulib module uname for portability"); +# endif +#endif + + +#ifdef __cplusplus +} +#endif + + +#endif /* _@GUARD_PREFIX@_SYS_UTSNAME_H */ diff --git a/gl/lib/sys_wait.in.h b/gl/lib/sys_wait.in.h new file mode 100644 index 0000000..6412af4 --- /dev/null +++ b/gl/lib/sys_wait.in.h @@ -0,0 +1,129 @@ +/* A POSIX-like . + Copyright (C) 2001-2003, 2005-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + + +#ifndef _@GUARD_PREFIX@_SYS_WAIT_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. */ +#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +# @INCLUDE_NEXT@ @NEXT_SYS_WAIT_H@ +#endif + +#ifndef _@GUARD_PREFIX@_SYS_WAIT_H +#define _@GUARD_PREFIX@_SYS_WAIT_H + +/* Get pid_t. */ +#include + + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +/* Unix API. */ + +/* The following macros apply to an argument x, that is a status of a process, + as returned by waitpid(). + On nearly all systems, including Linux/x86, WEXITSTATUS are bits 15..8 and + WTERMSIG are bits 7..0, while BeOS uses the opposite. Therefore programs + have to use the abstract macros. */ + +/* For valid x, exactly one of WIFSIGNALED(x), WIFEXITED(x), WIFSTOPPED(x) + is true. */ +# ifndef WIFSIGNALED +# define WIFSIGNALED(x) (WTERMSIG (x) != 0 && WTERMSIG(x) != 0x7f) +# endif +# ifndef WIFEXITED +# define WIFEXITED(x) (WTERMSIG (x) == 0) +# endif +# ifndef WIFSTOPPED +# define WIFSTOPPED(x) (WTERMSIG (x) == 0x7f) +# endif + +/* The termination signal. Only to be accessed if WIFSIGNALED(x) is true. */ +# ifndef WTERMSIG +# define WTERMSIG(x) ((x) & 0x7f) +# endif + +/* The exit status. Only to be accessed if WIFEXITED(x) is true. */ +# ifndef WEXITSTATUS +# define WEXITSTATUS(x) (((x) >> 8) & 0xff) +# endif + +/* The stopping signal. Only to be accessed if WIFSTOPPED(x) is true. */ +# ifndef WSTOPSIG +# define WSTOPSIG(x) (((x) >> 8) & 0x7f) +# endif + +/* True if the process dumped core. Not standardized by POSIX. */ +# ifndef WCOREDUMP +# define WCOREDUMP(x) ((x) & 0x80) +# endif + +#else +/* Native Windows API. */ + +# include /* for SIGTERM */ + +/* The following macros apply to an argument x, that is a status of a process, + as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess(). + This value is simply an 'int', not composed of bit fields. */ + +/* When an unhandled fatal signal terminates a process, the exit code is 3. */ +# define WIFSIGNALED(x) ((x) == 3) +# define WIFEXITED(x) ((x) != 3) +# define WIFSTOPPED(x) 0 + +/* The signal that terminated a process is not known posthum. */ +# define WTERMSIG(x) SIGTERM + +# define WEXITSTATUS(x) (x) + +/* There are no stopping signals. */ +# define WSTOPSIG(x) 0 + +/* There are no core dumps. */ +# define WCOREDUMP(x) 0 + +#endif + + +/* Declarations of functions. */ + +#if @GNULIB_WAITPID@ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +_GL_FUNCDECL_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); +# endif +_GL_CXXALIAS_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); +_GL_CXXALIASWARN (waitpid); +#elif defined GNULIB_POSIXCHECK +# undef waitpid +# if HAVE_RAW_DECL_WAITPID +_GL_WARN_ON_USE (waitpid, "waitpid is unportable - " + "use gnulib module sys_wait for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_SYS_WAIT_H */ +#endif /* _@GUARD_PREFIX@_SYS_WAIT_H */ diff --git a/gl/lib/time.in.h b/gl/lib/time.in.h new file mode 100644 index 0000000..81abdf4 --- /dev/null +++ b/gl/lib/time.in.h @@ -0,0 +1,274 @@ +/* A more-standard . + + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* Don't get in the way of glibc when it includes time.h merely to + declare a few standard symbols, rather than to declare all the + symbols. Also, Solaris 8 eventually includes itself + recursively; if that is happening, just include the system + without adding our own declarations. */ +#if (defined __need_time_t || defined __need_clock_t \ + || defined __need_timespec \ + || defined _@GUARD_PREFIX@_TIME_H) + +# @INCLUDE_NEXT@ @NEXT_TIME_H@ + +#else + +# define _@GUARD_PREFIX@_TIME_H + +# @INCLUDE_NEXT@ @NEXT_TIME_H@ + +/* NetBSD 5.0 mis-defines NULL. */ +# include + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). + Or they define it with the wrong member names or define it in + (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, + but the pthreads-win32 library defines it in . */ +# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ +# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ +# include +# elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ +# include +# else + +# ifdef __cplusplus +extern "C" { +# endif + +# if !GNULIB_defined_struct_timespec +# undef timespec +# define timespec rpl_timespec +struct timespec +{ + time_t tv_sec; + long int tv_nsec; +}; +# define GNULIB_defined_struct_timespec 1 +# endif + +# ifdef __cplusplus +} +# endif + +# endif +# endif + +# if !GNULIB_defined_struct_time_t_must_be_integral +/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires + time_t to be an integer type, even though C99 permits floating + point. We don't know of any implementation that uses floating + point, and it is much easier to write code that doesn't have to + worry about that corner case, so we force the issue. */ +struct __time_t_must_be_integral { + unsigned int __floating_time_t_unsupported : (time_t) 1; +}; +# define GNULIB_defined_struct_time_t_must_be_integral 1 +# endif + +/* Sleep for at least RQTP seconds unless interrupted, If interrupted, + return -1 and store the remaining time into RMTP. See + . */ +# if @GNULIB_NANOSLEEP@ +# if @REPLACE_NANOSLEEP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define nanosleep rpl_nanosleep +# endif +_GL_FUNCDECL_RPL (nanosleep, int, + (struct timespec const *__rqtp, struct timespec *__rmtp) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (nanosleep, int, + (struct timespec const *__rqtp, struct timespec *__rmtp)); +# else +# if ! @HAVE_NANOSLEEP@ +_GL_FUNCDECL_SYS (nanosleep, int, + (struct timespec const *__rqtp, struct timespec *__rmtp) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (nanosleep, int, + (struct timespec const *__rqtp, struct timespec *__rmtp)); +# endif +_GL_CXXALIASWARN (nanosleep); +# endif + +/* Return the 'time_t' representation of TP and normalize TP. */ +# if @GNULIB_MKTIME@ +# if @REPLACE_MKTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define mktime rpl_mktime +# endif +_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); +# else +_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); +# endif +_GL_CXXALIASWARN (mktime); +# endif + +/* Convert TIMER to RESULT, assuming local time and UTC respectively. See + and + . */ +# if @GNULIB_TIME_R@ +# if @REPLACE_LOCALTIME_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef localtime_r +# define localtime_r rpl_localtime_r +# endif +_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result)); +# else +# if ! @HAVE_DECL_LOCALTIME_R@ +_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result)); +# endif +# if @HAVE_DECL_LOCALTIME_R@ +_GL_CXXALIASWARN (localtime_r); +# endif +# if @REPLACE_LOCALTIME_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gmtime_r +# define gmtime_r rpl_gmtime_r +# endif +_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result)); +# else +# if ! @HAVE_DECL_LOCALTIME_R@ +_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, + struct tm *restrict __result)); +# endif +# if @HAVE_DECL_LOCALTIME_R@ +_GL_CXXALIASWARN (gmtime_r); +# endif +# endif + +/* Convert TIMER to RESULT, assuming local time and UTC respectively. See + and + . */ +# if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_LOCALTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef localtime +# define localtime rpl_localtime +# endif +_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer)); +# else +_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); +# endif +_GL_CXXALIASWARN (localtime); +# endif + +# if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_GMTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gmtime +# define gmtime rpl_gmtime +# endif +_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer)); +# else +_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer)); +# endif +_GL_CXXALIASWARN (gmtime); +# endif + +/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store + the resulting broken-down time into TM. See + . */ +# if @GNULIB_STRPTIME@ +# if ! @HAVE_STRPTIME@ +_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, + char const *restrict __format, + struct tm *restrict __tm) + _GL_ARG_NONNULL ((1, 2, 3))); +# endif +_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, + char const *restrict __format, + struct tm *restrict __tm)); +_GL_CXXALIASWARN (strptime); +# endif + +/* Convert TM to a time_t value, assuming UTC. */ +# if @GNULIB_TIMEGM@ +# if @REPLACE_TIMEGM@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef timegm +# define timegm rpl_timegm +# endif +_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); +# else +# if ! @HAVE_TIMEGM@ +_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); +# endif +_GL_CXXALIASWARN (timegm); +# endif + +/* Encourage applications to avoid unsafe functions that can overrun + buffers when given outlandish struct tm values. Portable + applications should use strftime (or even sprintf) instead. */ +# if defined GNULIB_POSIXCHECK +# undef asctime +_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " + "better use strftime (or even sprintf) instead"); +# endif +# if defined GNULIB_POSIXCHECK +# undef asctime_r +_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " + "better use strftime (or even sprintf) instead"); +# endif +# if defined GNULIB_POSIXCHECK +# undef ctime +_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " + "better use strftime (or even sprintf) instead"); +# endif +# if defined GNULIB_POSIXCHECK +# undef ctime_r +_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " + "better use strftime (or even sprintf) instead"); +# endif + +#endif diff --git a/gl/lib/time_r.c b/gl/lib/time_r.c new file mode 100644 index 0000000..a848d54 --- /dev/null +++ b/gl/lib/time_r.c @@ -0,0 +1,44 @@ +/* Reentrant time functions like localtime_r. + + Copyright (C) 2003, 2006-2007, 2010-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +/* Written by Paul Eggert. */ + +#include + +#include + +static struct tm * +copy_tm_result (struct tm *dest, struct tm const *src) +{ + if (! src) + return 0; + *dest = *src; + return dest; +} + + +struct tm * +gmtime_r (time_t const * restrict t, struct tm * restrict tp) +{ + return copy_tm_result (tp, gmtime (t)); +} + +struct tm * +localtime_r (time_t const * restrict t, struct tm * restrict tp) +{ + return copy_tm_result (tp, localtime (t)); +} diff --git a/gl/lib/timespec.c b/gl/lib/timespec.c new file mode 100644 index 0000000..2b6098e --- /dev/null +++ b/gl/lib/timespec.c @@ -0,0 +1,3 @@ +#include +#define _GL_TIMESPEC_INLINE _GL_EXTERN_INLINE +#include "timespec.h" diff --git a/gl/lib/timespec.h b/gl/lib/timespec.h new file mode 100644 index 0000000..872cbb7 --- /dev/null +++ b/gl/lib/timespec.h @@ -0,0 +1,112 @@ +/* timespec -- System time interface + + Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if ! defined TIMESPEC_H +# define TIMESPEC_H + +# include + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_TIMESPEC_INLINE +# define _GL_TIMESPEC_INLINE _GL_INLINE +#endif + +/* Resolution of timespec time stamps (in units per second), and log + base 10 of the resolution. */ + +enum { TIMESPEC_RESOLUTION = 1000000000 }; +enum { LOG10_TIMESPEC_RESOLUTION = 9 }; + +/* Return a timespec with seconds S and nanoseconds NS. */ + +_GL_TIMESPEC_INLINE struct timespec +make_timespec (time_t s, long int ns) +{ + struct timespec r; + r.tv_sec = s; + r.tv_nsec = ns; + return r; +} + +/* Return negative, zero, positive if A < B, A == B, A > B, respectively. + + For each time stamp T, this code assumes that either: + + * T.tv_nsec is in the range 0..999999999; or + * T.tv_sec corresponds to a valid leap second on a host that supports + leap seconds, and T.tv_nsec is in the range 1000000000..1999999999; or + * T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or + T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000. + This allows for special struct timespec values that are less or + greater than all possible valid time stamps. + + In all these cases, it is safe to subtract two tv_nsec values and + convert the result to integer without worrying about overflow on + any platform of interest to the GNU project, since all such + platforms have 32-bit int or wider. + + Replacing "(int) (a.tv_nsec - b.tv_nsec)" with something like + "a.tv_nsec < b.tv_nsec ? -1 : a.tv_nsec > b.tv_nsec" would cause + this function to work in some cases where the above assumption is + violated, but not in all cases (e.g., a.tv_sec==1, a.tv_nsec==-2, + b.tv_sec==0, b.tv_nsec==999999999) and is arguably not worth the + extra instructions. Using a subtraction has the advantage of + detecting some invalid cases on platforms that detect integer + overflow. + + The (int) cast avoids a gcc -Wconversion warning. */ + +_GL_TIMESPEC_INLINE int +timespec_cmp (struct timespec a, struct timespec b) +{ + return (a.tv_sec < b.tv_sec ? -1 + : a.tv_sec > b.tv_sec ? 1 + : (int) (a.tv_nsec - b.tv_nsec)); +} + +/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be + nonnegative. */ +_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) + _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'. */ +_GL_TIMESPEC_INLINE double +timespectod (struct timespec a) +{ + return a.tv_sec + a.tv_nsec / 1e9; +} + +void gettime (struct timespec *); +int settime (struct timespec const *); + +_GL_INLINE_HEADER_END + +#endif diff --git a/gl/lib/trunc.c b/gl/lib/trunc.c new file mode 100644 index 0000000..974ff45 --- /dev/null +++ b/gl/lib/trunc.c @@ -0,0 +1,121 @@ +/* Round towards zero. + Copyright (C) 2007, 2010-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#if ! defined USE_LONG_DOUBLE +# include +#endif + +/* Specification. */ +#include + +#include + +#undef MIN + +#ifdef USE_LONG_DOUBLE +# define FUNC truncl +# define DOUBLE long double +# define MANT_DIG LDBL_MANT_DIG +# define MIN LDBL_MIN +# define L_(literal) literal##L +#elif ! defined USE_FLOAT +# define FUNC trunc +# define DOUBLE double +# define MANT_DIG DBL_MANT_DIG +# define MIN DBL_MIN +# define L_(literal) literal +#else /* defined USE_FLOAT */ +# define FUNC truncf +# define DOUBLE float +# define MANT_DIG FLT_MANT_DIG +# define MIN FLT_MIN +# define L_(literal) literal##f +#endif + +/* -0.0. See minus-zero.h. */ +#if defined __hpux || defined __sgi || defined __ICC +# define MINUS_ZERO (-MIN * MIN) +#else +# define MINUS_ZERO L_(-0.0) +#endif + +/* MSVC with option -fp:strict refuses to compile constant initializers that + contain floating-point operations. Pacify this compiler. */ +#ifdef _MSC_VER +# pragma fenv_access (off) +#endif + +/* 2^(MANT_DIG-1). */ +static const DOUBLE TWO_MANT_DIG = + /* Assume MANT_DIG <= 5 * 31. + Use the identity + n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5). */ + (DOUBLE) (1U << ((MANT_DIG - 1) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5)); + +DOUBLE +FUNC (DOUBLE x) +{ + /* The use of 'volatile' guarantees that excess precision bits are dropped + at each addition step and before the following comparison at the caller's + site. It is necessary on x86 systems where double-floats are not IEEE + compliant by default, to avoid that the results become platform and compiler + option dependent. 'volatile' is a portable alternative to gcc's + -ffloat-store option. */ + volatile DOUBLE y = x; + volatile DOUBLE z = y; + + if (z > L_(0.0)) + { + /* For 0 < x < 1, return +0.0 even if the current rounding mode is + FE_DOWNWARD. */ + if (z < L_(1.0)) + z = L_(0.0); + /* Avoid rounding errors for values near 2^k, where k >= MANT_DIG-1. */ + else if (z < TWO_MANT_DIG) + { + /* Round to the next integer (nearest or up or down, doesn't matter). */ + z += TWO_MANT_DIG; + z -= TWO_MANT_DIG; + /* Enforce rounding down. */ + if (z > y) + z -= L_(1.0); + } + } + else if (z < L_(0.0)) + { + /* For -1 < x < 0, return -0.0 regardless of the current rounding + mode. */ + if (z > L_(-1.0)) + z = MINUS_ZERO; + /* Avoid rounding errors for values near -2^k, where k >= MANT_DIG-1. */ + else if (z > - TWO_MANT_DIG) + { + /* Round to the next integer (nearest or up or down, doesn't matter). */ + z -= TWO_MANT_DIG; + z += TWO_MANT_DIG; + /* Enforce rounding up. */ + if (z < y) + z += L_(1.0); + } + } + return z; +} diff --git a/gl/lib/uname.c b/gl/lib/uname.c new file mode 100644 index 0000000..c1d8519 --- /dev/null +++ b/gl/lib/uname.c @@ -0,0 +1,268 @@ +/* uname replacement. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +/* This file provides an implementation only for the native Windows API. */ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + +#include +#include +#include +#include +#include + +/* Mingw headers don't have all the platform codes. */ +#ifndef VER_PLATFORM_WIN32_CE +# define VER_PLATFORM_WIN32_CE 3 +#endif + +/* Some headers don't have all the processor architecture codes. */ +#ifndef PROCESSOR_ARCHITECTURE_AMD64 +# define PROCESSOR_ARCHITECTURE_AMD64 9 +#endif +#ifndef PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 +# define PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 10 +#endif + +/* Mingw headers don't have the latest processor codes. */ +#ifndef PROCESSOR_AMD_X8664 +# define PROCESSOR_AMD_X8664 8664 +#endif + +int +uname (struct utsname *buf) +{ + OSVERSIONINFO version; + OSVERSIONINFOEX versionex; + BOOL have_versionex; /* indicates whether versionex is filled */ + const char *super_version; + + /* Preparation: Fill version and, if possible, also versionex. + But try to call GetVersionEx only once in the common case. */ + versionex.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX); + have_versionex = GetVersionEx ((OSVERSIONINFO *) &versionex); + if (have_versionex) + { + /* We know that OSVERSIONINFO is a subset of OSVERSIONINFOEX. */ + memcpy (&version, &versionex, sizeof (OSVERSIONINFO)); + } + else + { + version.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); + if (!GetVersionEx (&version)) + abort (); + } + + /* Fill in nodename. */ + if (gethostname (buf->nodename, sizeof (buf->nodename)) < 0) + strcpy (buf->nodename, "localhost"); + + /* Determine major-major Windows version. */ + if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) + { + /* Windows NT or newer. */ + super_version = "NT"; + } + else if (version.dwPlatformId == VER_PLATFORM_WIN32_CE) + { + /* Windows CE or Embedded CE. */ + super_version = "CE"; + } + else if (version.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) + { + /* Windows 95/98/ME. */ + switch (version.dwMinorVersion) + { + case 0: + super_version = "95"; + break; + case 10: + super_version = "98"; + break; + case 90: + super_version = "ME"; + break; + default: + super_version = ""; + break; + } + } + else + super_version = ""; + + /* Fill in sysname. */ +#ifdef __MINGW32__ + /* Returns a string compatible with the MSYS uname.exe program, + so that no further changes are needed to GNU config.guess. + For example, + $ ./uname.exe -s => MINGW32_NT-5.1 + */ + sprintf (buf->sysname, "MINGW32_%s-%u.%u", super_version, + (unsigned int) version.dwMajorVersion, + (unsigned int) version.dwMinorVersion); +#else + sprintf (buf->sysname, "Windows%s", super_version); +#endif + + /* Fill in release, version. */ + /* The MSYS uname.exe programs uses strings from a modified Cygwin runtime: + $ ./uname.exe -r => 1.0.11(0.46/3/2) + $ ./uname.exe -v => 2008-08-25 23:40 + There is no point in imitating this behaviour. */ + if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) + { + /* Windows NT or newer. */ + struct windows_version + { + int major; + int minor; + unsigned int server_offset; + const char *name; + }; + + /* Storing the workstation and server version names in a single + stream does not waste memory when they are the same. These + macros abstract the representation. VERSION1 is used if + version.wProductType does not matter, VERSION2 if it does. */ + #define VERSION1(major, minor, name) \ + { major, minor, 0, name } + #define VERSION2(major, minor, workstation, server) \ + { major, minor, sizeof workstation, workstation "\0" server } + static const struct windows_version versions[] = + { + VERSION2 (3, -1, "Windows NT Workstation", "Windows NT Server"), + VERSION2 (4, -1, "Windows NT Workstation", "Windows NT Server"), + VERSION1 (5, 0, "Windows 2000"), + VERSION1 (5, 1, "Windows XP"), + VERSION1 (5, 2, "Windows Server 2003"), + VERSION2 (6, 0, "Windows Vista", "Windows Server 2008"), + VERSION2 (6, 1, "Windows 7", "Windows Server 2008 R2"), + VERSION2 (-1, -1, "Windows", "Windows Server") + }; + const char *base; + const struct windows_version *v = versions; + + /* Find a version that matches ours. The last element is a + wildcard that always ends the loop. */ + while ((v->major != version.dwMajorVersion && v->major != -1) + || (v->minor != version.dwMinorVersion && v->minor != -1)) + v++; + + if (have_versionex && versionex.wProductType != VER_NT_WORKSTATION) + base = v->name + v->server_offset; + else + base = v->name; + if (v->major == -1 || v->minor == -1) + sprintf (buf->release, "%s %u.%u", + base, + (unsigned int) version.dwMajorVersion, + (unsigned int) version.dwMinorVersion); + else + strcpy (buf->release, base); + } + else if (version.dwPlatformId == VER_PLATFORM_WIN32_CE) + { + /* Windows CE or Embedded CE. */ + sprintf (buf->release, "Windows CE %u.%u", + (unsigned int) version.dwMajorVersion, + (unsigned int) version.dwMinorVersion); + } + else + { + /* Windows 95/98/ME. */ + sprintf (buf->release, "Windows %s", super_version); + } + strcpy (buf->version, version.szCSDVersion); + + /* Fill in machine. */ + { + SYSTEM_INFO info; + + GetSystemInfo (&info); + /* Check for Windows NT or CE, since the info.wProcessorLevel is + garbage on Windows 95. */ + if (version.dwPlatformId == VER_PLATFORM_WIN32_NT + || version.dwPlatformId == VER_PLATFORM_WIN32_CE) + { + /* Windows NT or newer, or Windows CE or Embedded CE. */ + switch (info.wProcessorArchitecture) + { + case PROCESSOR_ARCHITECTURE_AMD64: + strcpy (buf->machine, "x86_64"); + break; + case PROCESSOR_ARCHITECTURE_IA64: + strcpy (buf->machine, "ia64"); + break; + case PROCESSOR_ARCHITECTURE_INTEL: + strcpy (buf->machine, "i386"); + if (info.wProcessorLevel >= 3) + buf->machine[1] = + '0' + (info.wProcessorLevel <= 6 ? info.wProcessorLevel : 6); + break; + case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64: + strcpy (buf->machine, "i686"); + break; + case PROCESSOR_ARCHITECTURE_MIPS: + strcpy (buf->machine, "mips"); + break; + case PROCESSOR_ARCHITECTURE_ALPHA: + case PROCESSOR_ARCHITECTURE_ALPHA64: + strcpy (buf->machine, "alpha"); + break; + case PROCESSOR_ARCHITECTURE_PPC: + strcpy (buf->machine, "powerpc"); + break; + case PROCESSOR_ARCHITECTURE_SHX: + strcpy (buf->machine, "sh"); + break; + case PROCESSOR_ARCHITECTURE_ARM: + strcpy (buf->machine, "arm"); + break; + default: + strcpy (buf->machine, "unknown"); + break; + } + } + else + { + /* Windows 95/98/ME. */ + switch (info.dwProcessorType) + { + case PROCESSOR_AMD_X8664: + strcpy (buf->machine, "x86_64"); + break; + case PROCESSOR_INTEL_IA64: + strcpy (buf->machine, "ia64"); + break; + default: + if (info.dwProcessorType % 100 == 86) + sprintf (buf->machine, "i%u", + (unsigned int) info.dwProcessorType); + else + strcpy (buf->machine, "unknown"); + break; + } + } + } + + return 0; +} + +#endif diff --git a/gl/lib/unistd--.h b/gl/lib/unistd--.h new file mode 100644 index 0000000..9d0e54d --- /dev/null +++ b/gl/lib/unistd--.h @@ -0,0 +1,32 @@ +/* Like unistd.h, but redefine some names to avoid glitches. + + Copyright (C) 2005, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +#include +#include "unistd-safer.h" + +#undef dup +#define dup dup_safer + +#undef pipe +#define pipe pipe_safer + +#if GNULIB_PIPE2_SAFER +# undef pipe2 +# define pipe2 pipe2_safer +#endif diff --git a/gl/lib/unistd-safer.h b/gl/lib/unistd-safer.h new file mode 100644 index 0000000..4b0ca6a --- /dev/null +++ b/gl/lib/unistd-safer.h @@ -0,0 +1,31 @@ +/* Invoke unistd-like functions, but avoid some glitches. + + Copyright (C) 2001, 2003, 2005, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert and Eric Blake. */ + +int dup_safer (int); +int fd_safer (int); +int pipe_safer (int[2]); + +#if GNULIB_FD_SAFER_FLAG +int dup_safer_flag (int, int); +int fd_safer_flag (int, int); +#endif + +#if GNULIB_PIPE2_SAFER +int pipe2_safer (int[2], int); +#endif diff --git a/gl/lib/unistd.c b/gl/lib/unistd.c new file mode 100644 index 0000000..6c6a8e2 --- /dev/null +++ b/gl/lib/unistd.c @@ -0,0 +1,3 @@ +#include +#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE +#include "unistd.h" diff --git a/gl/lib/unistd.in.h b/gl/lib/unistd.in.h new file mode 100644 index 0000000..622b228 --- /dev/null +++ b/gl/lib/unistd.in.h @@ -0,0 +1,1557 @@ +/* Substitute for and wrapper around . + Copyright (C) 2003-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _@GUARD_PREFIX@_UNISTD_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#ifdef _GL_INCLUDING_UNISTD_H +/* Special invocation convention: + - On Mac OS X 10.3.9 we have a sequence of nested includes + -> -> -> + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ + +#@INCLUDE_NEXT@ @NEXT_UNISTD_H@ + +#else +/* Normal invocation convention. */ + +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_UNISTD_H@ +# define _GL_INCLUDING_UNISTD_H +# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ +# undef _GL_INCLUDING_UNISTD_H +#endif + +/* Get all possible declarations of gethostname(). */ +#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ + && !defined _GL_INCLUDING_WINSOCK2_H +# define _GL_INCLUDING_WINSOCK2_H +# include +# undef _GL_INCLUDING_WINSOCK2_H +#endif + +#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H +#define _@GUARD_PREFIX@_UNISTD_H + +/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ +#include + +/* mingw doesn't define the SEEK_* or *_FILENO macros in . */ +/* Cygwin 1.7.1 declares symlinkat in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ + || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ + && defined __CYGWIN__)) \ + && ! defined __GLIBC__ +# include +#endif + +/* Cygwin 1.7.1 declares unlinkat in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ + && ! defined __GLIBC__ +# include +#endif + +/* mingw fails to declare _exit in . */ +/* mingw, MSVC, BeOS, Haiku declare environ in , not in + . */ +/* Solaris declares getcwd not only in but also in . */ +/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system is + included here. */ +/* But avoid namespace pollution on glibc systems. */ +#if !defined __GLIBC__ && !defined __osf__ +# define __need_system_stdlib_h +# include +# undef __need_system_stdlib_h +#endif + +/* Native Windows platforms declare chdir, getcwd, rmdir in + and/or , not in . + They also declare access(), chmod(), close(), dup(), dup2(), isatty(), + lseek(), read(), unlink(), write() in . */ +#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ + || defined GNULIB_POSIXCHECK) \ + && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) +# include /* mingw32, mingw64 */ +# include /* mingw64, MSVC 9 */ +#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \ + || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \ + || defined GNULIB_POSIXCHECK) \ + && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +# include +#endif + +/* AIX and OSF/1 5.1 declare getdomainname in , not in . + NonStop Kernel declares gethostname in , not in . */ +/* But avoid namespace pollution on glibc systems. */ +#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ + || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ + && !defined __GLIBC__ +# include +#endif + +/* MSVC defines off_t in . + May also define off_t to a 64-bit type on native Windows. */ +#if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@ +/* Get off_t. */ +# include +#endif + +#if (@GNULIB_READ@ || @GNULIB_WRITE@ \ + || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ + || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) +/* Get ssize_t. */ +# include +#endif + +/* 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 +#endif + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#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. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +/* Hide some function declarations from . */ + +#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ +# 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 "); + _GL_WARN_ON_USE (connect, + "connect() used without including "); + _GL_WARN_ON_USE (accept, + "accept() used without including "); + _GL_WARN_ON_USE (bind, + "bind() used without including "); + _GL_WARN_ON_USE (getpeername, + "getpeername() used without including "); + _GL_WARN_ON_USE (getsockname, + "getsockname() used without including "); + _GL_WARN_ON_USE (getsockopt, + "getsockopt() used without including "); + _GL_WARN_ON_USE (listen, + "listen() used without including "); + _GL_WARN_ON_USE (recv, + "recv() used without including "); + _GL_WARN_ON_USE (send, + "send() used without including "); + _GL_WARN_ON_USE (recvfrom, + "recvfrom() used without including "); + _GL_WARN_ON_USE (sendto, + "sendto() used without including "); + _GL_WARN_ON_USE (setsockopt, + "setsockopt() used without including "); + _GL_WARN_ON_USE (shutdown, + "shutdown() used without including "); +# 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 + _GL_WARN_ON_USE (select, + "select() used without including "); +# endif +# endif +#endif + + +/* OS/2 EMX lacks these macros. */ +#ifndef STDIN_FILENO +# define STDIN_FILENO 0 +#endif +#ifndef STDOUT_FILENO +# define STDOUT_FILENO 1 +#endif +#ifndef STDERR_FILENO +# define STDERR_FILENO 2 +#endif + +/* Ensure *_OK macros exist. */ +#ifndef F_OK +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 +#endif + + +/* Declare overridden functions. */ + + +#if defined GNULIB_POSIXCHECK +/* The access() function is a security risk. */ +_GL_WARN_ON_USE (access, "the access function is a security risk - " + "use the gnulib module faccessat instead"); +#endif + + +#if @GNULIB_CHDIR@ +_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); +_GL_CXXALIASWARN (chdir); +#elif defined GNULIB_POSIXCHECK +# undef chdir +# if HAVE_RAW_DECL_CHDIR +_GL_WARN_ON_USE (chown, "chdir is not always in - " + "use gnulib module chdir for portability"); +# endif +#endif + + +#if @GNULIB_CHOWN@ +/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE + to GID (if GID is not -1). Follow symbolic links. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if @REPLACE_DUP2@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dup2 rpl_dup2 +# endif +_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); +_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); +# else +# if !@HAVE_DUP2@ +_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); +# endif +_GL_CXXALIASWARN (dup2); +#elif defined GNULIB_POSIXCHECK +# undef dup2 +# if HAVE_RAW_DECL_DUP2 +_GL_WARN_ON_USE (dup2, "dup2 is unportable - " + "use gnulib module dup2 for portability"); +# endif +#endif + + +#if @GNULIB_DUP3@ +/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the + specified flags. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + Close NEWFD first if it is open. + Return newfd if successful, otherwise -1 and errno set. + See the Linux man page at + . */ +# if @HAVE_DUP3@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define dup3 rpl_dup3 +# endif +_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); +_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); +# else +_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); +_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); +# endif +_GL_CXXALIASWARN (dup3); +#elif defined GNULIB_POSIXCHECK +# undef dup3 +# if HAVE_RAW_DECL_DUP3 +_GL_WARN_ON_USE (dup3, "dup3 is unportable - " + "use gnulib module dup3 for portability"); +# endif +#endif + + +#if @GNULIB_ENVIRON@ +# if !@HAVE_DECL_ENVIRON@ +/* Set of environment variables and values. An array of strings of the form + "VARIABLE=VALUE", terminated with a NULL. */ +# if defined __APPLE__ && defined __MACH__ +# include +# define environ (*_NSGetEnviron ()) +# else +# ifdef __cplusplus +extern "C" { +# endif +extern char **environ; +# ifdef __cplusplus +} +# endif +# endif +# endif +#elif defined GNULIB_POSIXCHECK +# if HAVE_RAW_DECL_ENVIRON +_GL_UNISTD_INLINE char *** +rpl_environ (void) +{ + return &environ; +} +_GL_WARN_ON_USE (rpl_environ, "environ is unportable - " + "use gnulib module environ for portability"); +# undef environ +# define environ (*rpl_environ ()) +# endif +#endif + + +#if @GNULIB_EUIDACCESS@ +/* Like access(), except that it uses the effective user id and group id of + the current process. */ +# if !@HAVE_EUIDACCESS@ +_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); +_GL_CXXALIASWARN (euidaccess); +# if defined GNULIB_POSIXCHECK +/* Like access(), this function is a security risk. */ +_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " + "use the gnulib module faccessat instead"); +# endif +#elif defined GNULIB_POSIXCHECK +# undef euidaccess +# if HAVE_RAW_DECL_EUIDACCESS +_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " + "use gnulib module euidaccess for portability"); +# endif +#endif + + +#if @GNULIB_FACCESSAT@ +# if !@HAVE_FACCESSAT@ +_GL_FUNCDECL_SYS (faccessat, int, + (int fd, char const *file, int mode, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (faccessat, int, + (int fd, char const *file, int mode, int flag)); +_GL_CXXALIASWARN (faccessat); +#elif defined GNULIB_POSIXCHECK +# undef faccessat +# if HAVE_RAW_DECL_FACCESSAT +_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " + "use gnulib module faccessat for portability"); +# endif +#endif + + +#if @GNULIB_FCHDIR@ +/* Change the process' current working directory to the directory on which + the given file descriptor is open. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if ! @HAVE_FCHDIR@ +_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); + +/* Gnulib internal hooks needed to maintain the fchdir metadata. */ +_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) + _GL_ARG_NONNULL ((2)); +_GL_EXTERN_C void _gl_unregister_fd (int fd); +_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); +_GL_EXTERN_C const char *_gl_directory_name (int fd); + +# else +# if !@HAVE_DECL_FCHDIR@ +_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); +# endif +# endif +_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); +_GL_CXXALIASWARN (fchdir); +#elif defined GNULIB_POSIXCHECK +# undef fchdir +# if HAVE_RAW_DECL_FCHDIR +_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " + "use gnulib module fchdir for portability"); +# endif +#endif + + +#if @GNULIB_FCHOWNAT@ +# if @REPLACE_FCHOWNAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fchownat +# define fchownat rpl_fchownat +# endif +_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag)); +# else +# if !@HAVE_FCHOWNAT@ +_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, + uid_t owner, gid_t group, int flag)); +# endif +_GL_CXXALIASWARN (fchownat); +#elif defined GNULIB_POSIXCHECK +# undef fchownat +# if HAVE_RAW_DECL_FCHOWNAT +_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " + "use gnulib module openat for portability"); +# endif +#endif + + +#if @GNULIB_FDATASYNC@ +/* Synchronize changes to a file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@ +_GL_FUNCDECL_SYS (fdatasync, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (fdatasync, int, (int fd)); +_GL_CXXALIASWARN (fdatasync); +#elif defined GNULIB_POSIXCHECK +# undef fdatasync +# if HAVE_RAW_DECL_FDATASYNC +_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " + "use gnulib module fdatasync for portability"); +# endif +#endif + + +#if @GNULIB_FSYNC@ +/* Synchronize changes, including metadata, to a file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if !@HAVE_FSYNC@ +_GL_FUNCDECL_SYS (fsync, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (fsync, int, (int fd)); +_GL_CXXALIASWARN (fsync); +#elif defined GNULIB_POSIXCHECK +# undef fsync +# if HAVE_RAW_DECL_FSYNC +_GL_WARN_ON_USE (fsync, "fsync is unportable - " + "use gnulib module fsync for portability"); +# endif +#endif + + +#if @GNULIB_FTRUNCATE@ +/* Change the size of the file to which FD is opened to become equal to LENGTH. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if @REPLACE_FTRUNCATE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ftruncate +# define ftruncate rpl_ftruncate +# endif +_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length)); +_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length)); +# else +# if !@HAVE_FTRUNCATE@ +_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); +# endif +_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); +# endif +_GL_CXXALIASWARN (ftruncate); +#elif defined GNULIB_POSIXCHECK +# undef ftruncate +# if HAVE_RAW_DECL_FTRUNCATE +_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " + "use gnulib module ftruncate for portability"); +# endif +#endif + + +#if @GNULIB_GETCWD@ +/* Get the name of the current working directory, and put it in SIZE bytes + of BUF. + Return BUF if successful, or NULL if the directory couldn't be determined + or SIZE was too small. + See the POSIX:2008 specification + . + Additionally, the gnulib module 'getcwd' guarantees the following GNU + extension: If BUF is NULL, an array is allocated with 'malloc'; the array + is SIZE bytes long, unless SIZE == 0, in which case it is as big as + necessary. */ +# if @REPLACE_GETCWD@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getcwd rpl_getcwd +# endif +_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); +_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); +# else +/* Need to cast, because on mingw, the second parameter is + int size. */ +_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); +# endif +_GL_CXXALIASWARN (getcwd); +#elif defined GNULIB_POSIXCHECK +# undef getcwd +# if HAVE_RAW_DECL_GETCWD +_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " + "use gnulib module getcwd for portability"); +# endif +#endif + + +#if @GNULIB_GETDOMAINNAME@ +/* Return the NIS domain name of the machine. + WARNING! The NIS domain name is unrelated to the fully qualified host name + of the machine. It is also unrelated to email addresses. + WARNING! The NIS domain name is usually the empty string or "(none)" when + not using NIS. + + Put up to LEN bytes of the NIS domain name into NAME. + Null terminate it if the name is shorter than LEN. + If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. + Return 0 if successful, otherwise set errno and return -1. */ +# if @REPLACE_GETDOMAINNAME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdomainname +# define getdomainname rpl_getdomainname +# endif +_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); +# else +# if !@HAVE_DECL_GETDOMAINNAME@ +_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); +# endif +_GL_CXXALIASWARN (getdomainname); +#elif defined GNULIB_POSIXCHECK +# undef getdomainname +# if HAVE_RAW_DECL_GETDOMAINNAME +_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " + "use gnulib module getdomainname for portability"); +# endif +#endif + + +#if @GNULIB_GETDTABLESIZE@ +/* Return the maximum number of file descriptors in the current process. + In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ +# if @REPLACE_GETDTABLESIZE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdtablesize +# define getdtablesize rpl_getdtablesize +# endif +_GL_FUNCDECL_RPL (getdtablesize, int, (void)); +_GL_CXXALIAS_RPL (getdtablesize, int, (void)); +# else +# if !@HAVE_GETDTABLESIZE@ +_GL_FUNCDECL_SYS (getdtablesize, int, (void)); +# endif +_GL_CXXALIAS_SYS (getdtablesize, int, (void)); +# endif +_GL_CXXALIASWARN (getdtablesize); +#elif defined GNULIB_POSIXCHECK +# undef getdtablesize +# if HAVE_RAW_DECL_GETDTABLESIZE +_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " + "use gnulib module getdtablesize for portability"); +# endif +#endif + + +#if @GNULIB_GETGROUPS@ +/* Return the supplemental groups that the current process belongs to. + It is unspecified whether the effective group id is in the list. + If N is 0, return the group count; otherwise, N describes how many + entries are available in GROUPS. Return -1 and set errno if N is + not 0 and not large enough. Fails with ENOSYS on some systems. */ +# if @REPLACE_GETGROUPS@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getgroups +# define getgroups rpl_getgroups +# endif +_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); +_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); +# else +# if !@HAVE_GETGROUPS@ +_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); +# endif +_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); +# endif +_GL_CXXALIASWARN (getgroups); +#elif defined GNULIB_POSIXCHECK +# undef getgroups +# if HAVE_RAW_DECL_GETGROUPS +_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " + "use gnulib module getgroups for portability"); +# endif +#endif + + +#if @GNULIB_GETHOSTNAME@ +/* Return the standard host name of the machine. + WARNING! The host name may or may not be fully qualified. + + Put up to LEN bytes of the host name into NAME. + Null terminate it if the name is shorter than LEN. + If the host name is longer than LEN, set errno = EINVAL and return -1. + Return 0 if successful, otherwise set errno and return -1. */ +# if @UNISTD_H_HAVE_WINSOCK2_H@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname rpl_gethostname +# endif +_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); +# else +# if !@HAVE_GETHOSTNAME@ +_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second + parameter is + int len. */ +_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); +# endif +_GL_CXXALIASWARN (gethostname); +#elif @UNISTD_H_HAVE_WINSOCK2_H@ +# undef gethostname +# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname +#elif defined GNULIB_POSIXCHECK +# undef gethostname +# if HAVE_RAW_DECL_GETHOSTNAME +_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " + "use gnulib module gethostname for portability"); +# endif +#endif + + +#if @GNULIB_GETLOGIN@ +/* Returns the user's login name, or NULL if it cannot be found. Upon error, + returns NULL with errno set. + + See . + + Most programs don't need to use this function, because the information is + available through environment variables: + ${LOGNAME-$USER} on Unix platforms, + $USERNAME on native Windows platforms. + */ +# if !@HAVE_GETLOGIN@ +_GL_FUNCDECL_SYS (getlogin, char *, (void)); +# endif +_GL_CXXALIAS_SYS (getlogin, char *, (void)); +_GL_CXXALIASWARN (getlogin); +#elif defined GNULIB_POSIXCHECK +# undef getlogin +# if HAVE_RAW_DECL_GETLOGIN +_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " + "use gnulib module getlogin for portability"); +# endif +#endif + + +#if @GNULIB_GETLOGIN_R@ +/* Copies the user's login name to NAME. + The array pointed to by NAME has room for SIZE bytes. + + Returns 0 if successful. Upon error, an error number is returned, or -1 in + the case that the login name cannot be found but no specific error is + provided (this case is hopefully rare but is left open by the POSIX spec). + + See . + + Most programs don't need to use this function, because the information is + available through environment variables: + ${LOGNAME-$USER} on Unix platforms, + $USERNAME on native Windows platforms. + */ +# if @REPLACE_GETLOGIN_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getlogin_r rpl_getlogin_r +# endif +_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); +# else +# if !@HAVE_DECL_GETLOGIN_R@ +_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on Solaris 10 systems, the second argument is + int size. */ +_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); +# endif +_GL_CXXALIASWARN (getlogin_r); +#elif defined GNULIB_POSIXCHECK +# undef getlogin_r +# if HAVE_RAW_DECL_GETLOGIN_R +_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " + "use gnulib module getlogin_r for portability"); +# endif +#endif + + +#if @GNULIB_GETPAGESIZE@ +# if @REPLACE_GETPAGESIZE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getpagesize rpl_getpagesize +# endif +_GL_FUNCDECL_RPL (getpagesize, int, (void)); +_GL_CXXALIAS_RPL (getpagesize, int, (void)); +# else +# if !@HAVE_GETPAGESIZE@ +# if !defined getpagesize +/* This is for POSIX systems. */ +# if !defined _gl_getpagesize && defined _SC_PAGESIZE +# if ! (defined __VMS && __VMS_VER < 70000000) +# define _gl_getpagesize() sysconf (_SC_PAGESIZE) +# endif +# endif +/* This is for older VMS. */ +# if !defined _gl_getpagesize && defined __VMS +# ifdef __ALPHA +# define _gl_getpagesize() 8192 +# else +# define _gl_getpagesize() 512 +# endif +# endif +/* This is for BeOS. */ +# if !defined _gl_getpagesize && @HAVE_OS_H@ +# include +# if defined B_PAGE_SIZE +# define _gl_getpagesize() B_PAGE_SIZE +# endif +# endif +/* This is for AmigaOS4.0. */ +# if !defined _gl_getpagesize && defined __amigaos4__ +# define _gl_getpagesize() 2048 +# endif +/* This is for older Unix systems. */ +# if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ +# include +# ifdef EXEC_PAGESIZE +# define _gl_getpagesize() EXEC_PAGESIZE +# else +# ifdef NBPG +# ifndef CLSIZE +# define CLSIZE 1 +# endif +# define _gl_getpagesize() (NBPG * CLSIZE) +# else +# ifdef NBPC +# define _gl_getpagesize() NBPC +# endif +# endif +# endif +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define getpagesize() _gl_getpagesize () +# else +# if !GNULIB_defined_getpagesize_function +_GL_UNISTD_INLINE int +getpagesize () +{ + return _gl_getpagesize (); +} +# define GNULIB_defined_getpagesize_function 1 +# endif +# endif +# endif +# endif +/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ +_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); +# endif +# if @HAVE_DECL_GETPAGESIZE@ +_GL_CXXALIASWARN (getpagesize); +# endif +#elif defined GNULIB_POSIXCHECK +# undef getpagesize +# if HAVE_RAW_DECL_GETPAGESIZE +_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " + "use gnulib module getpagesize for portability"); +# endif +#endif + + +#if @GNULIB_GETUSERSHELL@ +/* Return the next valid login shell on the system, or NULL when the end of + the list has been reached. */ +# if !@HAVE_DECL_GETUSERSHELL@ +_GL_FUNCDECL_SYS (getusershell, char *, (void)); +# endif +_GL_CXXALIAS_SYS (getusershell, char *, (void)); +_GL_CXXALIASWARN (getusershell); +#elif defined GNULIB_POSIXCHECK +# undef getusershell +# if HAVE_RAW_DECL_GETUSERSHELL +_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + +#if @GNULIB_GETUSERSHELL@ +/* Rewind to pointer that is advanced at each getusershell() call. */ +# if !@HAVE_DECL_GETUSERSHELL@ +_GL_FUNCDECL_SYS (setusershell, void, (void)); +# endif +_GL_CXXALIAS_SYS (setusershell, void, (void)); +_GL_CXXALIASWARN (setusershell); +#elif defined GNULIB_POSIXCHECK +# undef setusershell +# if HAVE_RAW_DECL_SETUSERSHELL +_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + +#if @GNULIB_GETUSERSHELL@ +/* Free the pointer that is advanced at each getusershell() call and + associated resources. */ +# if !@HAVE_DECL_GETUSERSHELL@ +_GL_FUNCDECL_SYS (endusershell, void, (void)); +# endif +_GL_CXXALIAS_SYS (endusershell, void, (void)); +_GL_CXXALIASWARN (endusershell); +#elif defined GNULIB_POSIXCHECK +# undef endusershell +# if HAVE_RAW_DECL_ENDUSERSHELL +_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " + "use gnulib module getusershell for portability"); +# endif +#endif + + +#if @GNULIB_GROUP_MEMBER@ +/* Determine whether group id is in calling user's group list. */ +# if !@HAVE_GROUP_MEMBER@ +_GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); +# endif +_GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); +_GL_CXXALIASWARN (group_member); +#elif defined GNULIB_POSIXCHECK +# undef group_member +# if HAVE_RAW_DECL_GROUP_MEMBER +_GL_WARN_ON_USE (group_member, "group_member is unportable - " + "use gnulib module group-member for portability"); +# endif +#endif + + +#if @GNULIB_ISATTY@ +# if @REPLACE_ISATTY@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef isatty +# define isatty rpl_isatty +# endif +_GL_FUNCDECL_RPL (isatty, int, (int fd)); +_GL_CXXALIAS_RPL (isatty, int, (int fd)); +# else +_GL_CXXALIAS_SYS (isatty, int, (int fd)); +# endif +_GL_CXXALIASWARN (isatty); +#elif defined GNULIB_POSIXCHECK +# undef isatty +# if HAVE_RAW_DECL_ISATTY +_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " + "use gnulib module isatty for portability"); +# endif +#endif + + +#if @GNULIB_LCHOWN@ +/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE + to GID (if GID is not -1). Do not follow symbolic links. + Return 0 if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if @REPLACE_LCHOWN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef lchown +# define lchown rpl_lchown +# endif +_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); +# else +# if !@HAVE_LCHOWN@ +_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); +# endif +_GL_CXXALIASWARN (lchown); +#elif defined GNULIB_POSIXCHECK +# undef lchown +# if HAVE_RAW_DECL_LCHOWN +_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " + "use gnulib module lchown for portability"); +# endif +#endif + + +#if @GNULIB_LINK@ +/* Create a new hard link for an existing file. + Return 0 if successful, otherwise -1 and errno set. + See POSIX:2008 specification + . */ +# if @REPLACE_LINK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define link rpl_link +# endif +_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); +# else +# if !@HAVE_LINK@ +_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); +# endif +_GL_CXXALIASWARN (link); +#elif defined GNULIB_POSIXCHECK +# undef link +# if HAVE_RAW_DECL_LINK +_GL_WARN_ON_USE (link, "link is unportable - " + "use gnulib module link for portability"); +# endif +#endif + + +#if @GNULIB_LINKAT@ +/* Create a new hard link for an existing file, relative to two + directories. FLAG controls whether symlinks are followed. + Return 0 if successful, otherwise -1 and errno set. */ +# if @REPLACE_LINKAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef linkat +# define linkat rpl_linkat +# endif +_GL_FUNCDECL_RPL (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag) + _GL_ARG_NONNULL ((2, 4))); +_GL_CXXALIAS_RPL (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag)); +# else +# if !@HAVE_LINKAT@ +_GL_FUNCDECL_SYS (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag) + _GL_ARG_NONNULL ((2, 4))); +# endif +_GL_CXXALIAS_SYS (linkat, int, + (int fd1, const char *path1, int fd2, const char *path2, + int flag)); +# endif +_GL_CXXALIASWARN (linkat); +#elif defined GNULIB_POSIXCHECK +# undef linkat +# if HAVE_RAW_DECL_LINKAT +_GL_WARN_ON_USE (linkat, "linkat is unportable - " + "use gnulib module linkat for portability"); +# endif +#endif + + +#if @GNULIB_LSEEK@ +/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. + Return the new offset if successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if @REPLACE_LSEEK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define lseek rpl_lseek +# endif +_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); +# else +_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); +# endif +_GL_CXXALIASWARN (lseek); +#elif defined GNULIB_POSIXCHECK +# undef lseek +# if HAVE_RAW_DECL_LSEEK +_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " + "systems - use gnulib module lseek for portability"); +# endif +#endif + + +#if @GNULIB_PIPE@ +/* Create a pipe, defaulting to O_BINARY mode. + Store the read-end as fd[0] and the write-end as fd[1]. + Return 0 upon success, or -1 with errno set upon failure. */ +# if !@HAVE_PIPE@ +_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (pipe, int, (int fd[2])); +_GL_CXXALIASWARN (pipe); +#elif defined GNULIB_POSIXCHECK +# undef pipe +# if HAVE_RAW_DECL_PIPE +_GL_WARN_ON_USE (pipe, "pipe is unportable - " + "use gnulib module pipe-posix for portability"); +# endif +#endif + + +#if @GNULIB_PIPE2@ +/* Create a pipe, applying the given flags when opening the read-end of the + pipe and the write-end of the pipe. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + Store the read-end as fd[0] and the write-end as fd[1]. + Return 0 upon success, or -1 with errno set upon failure. + See also the Linux man page at + . */ +# if @HAVE_PIPE2@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define pipe2 rpl_pipe2 +# endif +_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); +# else +_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); +# endif +_GL_CXXALIASWARN (pipe2); +#elif defined GNULIB_POSIXCHECK +# undef pipe2 +# if HAVE_RAW_DECL_PIPE2 +_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " + "use gnulib module pipe2 for portability"); +# endif +#endif + + +#if @GNULIB_PREAD@ +/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. + Return the number of bytes placed into BUF if successful, otherwise + set errno and return -1. 0 indicates EOF. + See the POSIX:2008 specification + . */ +# if @REPLACE_PREAD@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pread +# define pread rpl_pread +# endif +_GL_FUNCDECL_RPL (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset)); +# else +# if !@HAVE_PREAD@ +_GL_FUNCDECL_SYS (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (pread, ssize_t, + (int fd, void *buf, size_t bufsize, off_t offset)); +# endif +_GL_CXXALIASWARN (pread); +#elif defined GNULIB_POSIXCHECK +# undef pread +# if HAVE_RAW_DECL_PREAD +_GL_WARN_ON_USE (pread, "pread is unportable - " + "use gnulib module pread for portability"); +# endif +#endif + + +#if @GNULIB_PWRITE@ +/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. + Return the number of bytes written if successful, otherwise + set errno and return -1. 0 indicates nothing written. See the + POSIX:2008 specification + . */ +# if @REPLACE_PWRITE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pwrite +# define pwrite rpl_pwrite +# endif +_GL_FUNCDECL_RPL (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset)); +# else +# if !@HAVE_PWRITE@ +_GL_FUNCDECL_SYS (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (pwrite, ssize_t, + (int fd, const void *buf, size_t bufsize, off_t offset)); +# endif +_GL_CXXALIASWARN (pwrite); +#elif defined GNULIB_POSIXCHECK +# undef pwrite +# if HAVE_RAW_DECL_PWRITE +_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " + "use gnulib module pwrite for portability"); +# endif +#endif + + +#if @GNULIB_READ@ +/* Read up to COUNT bytes from file descriptor FD into the buffer starting + at BUF. See the POSIX:2008 specification + . */ +# if @REPLACE_READ@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef read +# define read rpl_read +# endif +_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); +# else +/* Need to cast, because on mingw, the third parameter is + unsigned int count + and the return type is 'int'. */ +_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (read); +#endif + + +#if @GNULIB_READLINK@ +/* Read the contents of the symbolic link FILE and place the first BUFSIZE + bytes of it into BUF. Return the number of bytes placed into BUF if + successful, otherwise -1 and errno set. + See the POSIX:2008 specification + . */ +# if @REPLACE_READLINK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define readlink rpl_readlink +# endif +_GL_FUNCDECL_RPL (readlink, ssize_t, + (const char *file, char *buf, size_t bufsize) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (readlink, ssize_t, + (const char *file, char *buf, size_t bufsize)); +# else +# if !@HAVE_READLINK@ +_GL_FUNCDECL_SYS (readlink, ssize_t, + (const char *file, char *buf, size_t bufsize) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (readlink, ssize_t, + (const char *file, char *buf, size_t bufsize)); +# endif +_GL_CXXALIASWARN (readlink); +#elif defined GNULIB_POSIXCHECK +# undef readlink +# if HAVE_RAW_DECL_READLINK +_GL_WARN_ON_USE (readlink, "readlink is unportable - " + "use gnulib module readlink for portability"); +# endif +#endif + + +#if @GNULIB_READLINKAT@ +# if !@HAVE_READLINKAT@ +_GL_FUNCDECL_SYS (readlinkat, ssize_t, + (int fd, char const *file, char *buf, size_t len) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (readlinkat, ssize_t, + (int fd, char const *file, char *buf, size_t len)); +_GL_CXXALIASWARN (readlinkat); +#elif defined GNULIB_POSIXCHECK +# undef readlinkat +# if HAVE_RAW_DECL_READLINKAT +_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " + "use gnulib module readlinkat for portability"); +# endif +#endif + + +#if @GNULIB_RMDIR@ +/* Remove the directory DIR. */ +# if @REPLACE_RMDIR@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define rmdir rpl_rmdir +# endif +_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); +# else +_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); +# endif +_GL_CXXALIASWARN (rmdir); +#elif defined GNULIB_POSIXCHECK +# undef rmdir +# if HAVE_RAW_DECL_RMDIR +_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " + "use gnulib module rmdir for portability"); +# endif +#endif + + +#if @GNULIB_SETHOSTNAME@ +/* Set the host name of the machine. + The host name may or may not be fully qualified. + + Put LEN bytes of NAME into the host name. + Return 0 if successful, otherwise, set errno and return -1. + + Platforms with no ability to set the hostname return -1 and set + errno = ENOSYS. */ +# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@ +_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, 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)); +_GL_CXXALIASWARN (sethostname); +#elif defined GNULIB_POSIXCHECK +# undef sethostname +# if HAVE_RAW_DECL_SETHOSTNAME +_GL_WARN_ON_USE (sethostname, "sethostname is unportable - " + "use gnulib module sethostname for portability"); +# endif +#endif + + +#if @GNULIB_SLEEP@ +/* Pause the execution of the current thread for N seconds. + Returns the number of seconds left to sleep. + See the POSIX:2008 specification + . */ +# if @REPLACE_SLEEP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef sleep +# define sleep rpl_sleep +# endif +_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); +_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); +# else +# if !@HAVE_SLEEP@ +_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); +# endif +_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); +# endif +_GL_CXXALIASWARN (sleep); +#elif defined GNULIB_POSIXCHECK +# undef sleep +# if HAVE_RAW_DECL_SLEEP +_GL_WARN_ON_USE (sleep, "sleep is unportable - " + "use gnulib module sleep for portability"); +# endif +#endif + + +#if @GNULIB_SYMLINK@ +# if @REPLACE_SYMLINK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef symlink +# define symlink rpl_symlink +# endif +_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) + _GL_ARG_NONNULL ((1, 2))); +_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); +# else +# if !@HAVE_SYMLINK@ +_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) + _GL_ARG_NONNULL ((1, 2))); +# endif +_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); +# endif +_GL_CXXALIASWARN (symlink); +#elif defined GNULIB_POSIXCHECK +# undef symlink +# if HAVE_RAW_DECL_SYMLINK +_GL_WARN_ON_USE (symlink, "symlink is not portable - " + "use gnulib module symlink for portability"); +# endif +#endif + + +#if @GNULIB_SYMLINKAT@ +# if !@HAVE_SYMLINKAT@ +_GL_FUNCDECL_SYS (symlinkat, int, + (char const *contents, int fd, char const *file) + _GL_ARG_NONNULL ((1, 3))); +# endif +_GL_CXXALIAS_SYS (symlinkat, int, + (char const *contents, int fd, char const *file)); +_GL_CXXALIASWARN (symlinkat); +#elif defined GNULIB_POSIXCHECK +# undef symlinkat +# if HAVE_RAW_DECL_SYMLINKAT +_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " + "use gnulib module symlinkat for portability"); +# endif +#endif + + +#if @GNULIB_TTYNAME_R@ +/* Store at most BUFLEN characters of the pathname of the terminal FD is + open on in BUF. Return 0 on success, otherwise an error number. */ +# if @REPLACE_TTYNAME_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ttyname_r +# define ttyname_r rpl_ttyname_r +# endif +_GL_FUNCDECL_RPL (ttyname_r, int, + (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (ttyname_r, int, + (int fd, char *buf, size_t buflen)); +# else +# if !@HAVE_DECL_TTYNAME_R@ +_GL_FUNCDECL_SYS (ttyname_r, int, + (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (ttyname_r, int, + (int fd, char *buf, size_t buflen)); +# endif +_GL_CXXALIASWARN (ttyname_r); +#elif defined GNULIB_POSIXCHECK +# undef ttyname_r +# if HAVE_RAW_DECL_TTYNAME_R +_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " + "use gnulib module ttyname_r for portability"); +# endif +#endif + + +#if @GNULIB_UNLINK@ +# if @REPLACE_UNLINK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlink +# define unlink rpl_unlink +# endif +_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (unlink, int, (char const *file)); +# else +_GL_CXXALIAS_SYS (unlink, int, (char const *file)); +# endif +_GL_CXXALIASWARN (unlink); +#elif defined GNULIB_POSIXCHECK +# undef unlink +# if HAVE_RAW_DECL_UNLINK +_GL_WARN_ON_USE (unlink, "unlink is not portable - " + "use gnulib module unlink for portability"); +# endif +#endif + + +#if @GNULIB_UNLINKAT@ +# if @REPLACE_UNLINKAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef unlinkat +# define unlinkat rpl_unlinkat +# endif +_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); +# else +# if !@HAVE_UNLINKAT@ +_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); +# endif +_GL_CXXALIASWARN (unlinkat); +#elif defined GNULIB_POSIXCHECK +# undef unlinkat +# if HAVE_RAW_DECL_UNLINKAT +_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " + "use gnulib module openat for portability"); +# endif +#endif + + +#if @GNULIB_USLEEP@ +/* Pause the execution of the current thread for N microseconds. + Returns 0 on completion, or -1 on range error. + See the POSIX:2001 specification + . */ +# if @REPLACE_USLEEP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef usleep +# define usleep rpl_usleep +# endif +_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); +_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); +# else +# if !@HAVE_USLEEP@ +_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); +# endif +_GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); +# endif +_GL_CXXALIASWARN (usleep); +#elif defined GNULIB_POSIXCHECK +# undef usleep +# if HAVE_RAW_DECL_USLEEP +_GL_WARN_ON_USE (usleep, "usleep is unportable - " + "use gnulib module usleep for portability"); +# endif +#endif + + +#if @GNULIB_WRITE@ +/* Write up to COUNT bytes starting at BUF to file descriptor FD. + See the POSIX:2008 specification + . */ +# if @REPLACE_WRITE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef write +# define write rpl_write +# endif +_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); +# else +/* Need to cast, because on mingw, the third parameter is + unsigned int count + and the return type is 'int'. */ +_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); +# endif +_GL_CXXALIASWARN (write); +#endif + +_GL_INLINE_HEADER_END + +#endif /* _@GUARD_PREFIX@_UNISTD_H */ +#endif /* _GL_INCLUDING_UNISTD_H */ +#endif /* _@GUARD_PREFIX@_UNISTD_H */ diff --git a/gl/lib/unitypes.in.h b/gl/lib/unitypes.in.h new file mode 100644 index 0000000..bc302c2 --- /dev/null +++ b/gl/lib/unitypes.in.h @@ -0,0 +1,46 @@ +/* Elementary types and macros for the GNU UniString library. + Copyright (C) 2002, 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _UNITYPES_H +#define _UNITYPES_H + +/* Get uint8_t, uint16_t, uint32_t. */ +#include + +/* Type representing a Unicode character. */ +typedef uint32_t ucs4_t; + +/* Attribute of a function whose result depends only on the arguments + (not pointers!) and which has no side effects. */ +#ifndef _UC_ATTRIBUTE_CONST +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _UC_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _UC_ATTRIBUTE_CONST +# endif +#endif + +/* Attribute of a function whose result depends only on the arguments + (possibly pointers) and global memory, and which has no side effects. */ +#ifndef _UC_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _UC_ATTRIBUTE_PURE +# endif +#endif + +#endif /* _UNITYPES_H */ diff --git a/gl/lib/uniwidth.in.h b/gl/lib/uniwidth.in.h new file mode 100644 index 0000000..b2fd218 --- /dev/null +++ b/gl/lib/uniwidth.in.h @@ -0,0 +1,72 @@ +/* Display width functions. + Copyright (C) 2001-2002, 2005, 2007, 2009-2014 Free Software Foundation, + Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _UNIWIDTH_H +#define _UNIWIDTH_H + +#include "unitypes.h" + +/* Get size_t. */ +#include + +/* Get locale_charset() declaration. */ +#include "localcharset.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Display width. */ + +/* These functions are locale dependent. The encoding argument identifies + the encoding (e.g. "ISO-8859-2" for Polish). */ + +/* Determine number of column positions required for UC. */ +extern int + uc_width (ucs4_t uc, const char *encoding) + _UC_ATTRIBUTE_PURE; + +/* Determine number of column positions required for first N units + (or fewer if S ends before this) in S. */ +extern int + u8_width (const uint8_t *s, size_t n, const char *encoding) + _UC_ATTRIBUTE_PURE; +extern int + u16_width (const uint16_t *s, size_t n, const char *encoding) + _UC_ATTRIBUTE_PURE; +extern int + u32_width (const uint32_t *s, size_t n, const char *encoding) + _UC_ATTRIBUTE_PURE; + +/* Determine number of column positions required for S. */ +extern int + u8_strwidth (const uint8_t *s, const char *encoding) + _UC_ATTRIBUTE_PURE; +extern int + u16_strwidth (const uint16_t *s, const char *encoding) + _UC_ATTRIBUTE_PURE; +extern int + u32_strwidth (const uint32_t *s, const char *encoding) + _UC_ATTRIBUTE_PURE; + + +#ifdef __cplusplus +} +#endif + +#endif /* _UNIWIDTH_H */ diff --git a/gl/lib/uniwidth/cjk.h b/gl/lib/uniwidth/cjk.h new file mode 100644 index 0000000..71ea0cb --- /dev/null +++ b/gl/lib/uniwidth/cjk.h @@ -0,0 +1,37 @@ +/* Test for CJK encoding. + Copyright (C) 2001-2002, 2005-2007, 2009-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2002. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include "streq.h" + +static int +is_cjk_encoding (const char *encoding) +{ + if (0 + /* Legacy Japanese encodings */ + || STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0) + /* Legacy Chinese encodings */ + || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) + || STREQ_OPT (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0) + || STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0) + || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0) + /* Legacy Korean encodings */ + || STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) + || STREQ_OPT (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0) + || STREQ_OPT (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0)) + return 1; + return 0; +} diff --git a/gl/lib/uniwidth/width.c b/gl/lib/uniwidth/width.c new file mode 100644 index 0000000..2c070c3 --- /dev/null +++ b/gl/lib/uniwidth/width.c @@ -0,0 +1,368 @@ +/* Determine display width of Unicode character. + Copyright (C) 2001-2002, 2006-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2002. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "uniwidth.h" + +#include "cjk.h" + +/* + * Non-spacing attribute table. + * Consists of: + * - Non-spacing characters; generated from PropList.txt or + * "grep '^[^;]*;[^;]*;[^;]*;[^;]*;NSM;' UnicodeData.txt" + * - Format control characters; generated from + * "grep '^[^;]*;[^;]*;Cf;' UnicodeData.txt" + * - Zero width characters; generated from + * "grep '^[^;]*;ZERO WIDTH ' UnicodeData.txt" + */ +static const unsigned char nonspacing_table_data[27*64] = { + /* 0x0000-0x01ff */ + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */ + 0xff, 0xff, 0xff, 0xff, 0x00, 0x20, 0x00, 0x00, /* 0x0080-0x00bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00c0-0x00ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0100-0x013f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0140-0x017f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0180-0x01bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x01c0-0x01ff */ + /* 0x0200-0x03ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0200-0x023f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0240-0x027f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0280-0x02bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x02c0-0x02ff */ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x0300-0x033f */ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, /* 0x0340-0x037f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0380-0x03bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x03c0-0x03ff */ + /* 0x0400-0x05ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0400-0x043f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0440-0x047f */ + 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0480-0x04bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x04c0-0x04ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0500-0x053f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0540-0x057f */ + 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, /* 0x0580-0x05bf */ + 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x05c0-0x05ff */ + /* 0x0600-0x07ff */ + 0x0f, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, /* 0x0600-0x063f */ + 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, /* 0x0640-0x067f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0680-0x06bf */ + 0x00, 0x00, 0xc0, 0xbf, 0x9f, 0x3d, 0x00, 0x00, /* 0x06c0-0x06ff */ + 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x0700-0x073f */ + 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0740-0x077f */ + 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, /* 0x0780-0x07bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x07c0-0x07ff */ + /* 0x0800-0x09ff */ + 0x00, 0x00, 0xc0, 0xfb, 0xef, 0x3e, 0x00, 0x00, /* 0x0800-0x083f */ + 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, /* 0x0840-0x087f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08c0-0x08ff */ + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, /* 0x0900-0x093f */ + 0xfe, 0x21, 0xfe, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0940-0x097f */ + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0980-0x09bf */ + 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x09c0-0x09ff */ + /* 0x0a00-0x0bff */ + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a00-0x0a3f */ + 0x86, 0x39, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, /* 0x0a40-0x0a7f */ + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a80-0x0abf */ + 0xbe, 0x21, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0ac0-0x0aff */ + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, /* 0x0b00-0x0b3f */ + 0x1e, 0x20, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0b40-0x0b7f */ + 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0b80-0x0bbf */ + 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0bc0-0x0bff */ + /* 0x0c00-0x0dff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, /* 0x0c00-0x0c3f */ + 0xc1, 0x3d, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0c40-0x0c7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0c80-0x0cbf */ + 0x00, 0x30, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0cc0-0x0cff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d00-0x0d3f */ + 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0d40-0x0d7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d80-0x0dbf */ + 0x00, 0x04, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0dc0-0x0dff */ + /* 0x0e00-0x0fff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x07, /* 0x0e00-0x0e3f */ + 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0e40-0x0e7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x1b, /* 0x0e80-0x0ebf */ + 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0ec0-0x0eff */ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x02, /* 0x0f00-0x0f3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, /* 0x0f40-0x0f7f */ + 0xdf, 0xe0, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x1f, /* 0x0f80-0x0fbf */ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0fc0-0x0fff */ + /* 0x1000-0x11ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfd, 0x66, /* 0x1000-0x103f */ + 0x00, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x1e, 0x00, /* 0x1040-0x107f */ + 0x64, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x1080-0x10bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10c0-0x10ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1100-0x113f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1140-0x117f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1180-0x11bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11c0-0x11ff */ + /* 0x1200-0x13ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1200-0x123f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1240-0x127f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1280-0x12bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x12c0-0x12ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1300-0x133f */ + 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, /* 0x1340-0x137f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1380-0x13bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13c0-0x13ff */ + /* 0x1600-0x17ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1600-0x163f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1640-0x167f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1680-0x16bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16c0-0x16ff */ + 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, /* 0x1700-0x173f */ + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, /* 0x1740-0x177f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x3f, /* 0x1780-0x17bf */ + 0x40, 0xfe, 0x0f, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x17c0-0x17ff */ + /* 0x1800-0x19ff */ + 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1800-0x183f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1840-0x187f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18c0-0x18ff */ + 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x04, 0x0e, /* 0x1900-0x193f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1940-0x197f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1980-0x19bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x19c0-0x19ff */ + /* 0x1a00-0x1bff */ + 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, /* 0x1a00-0x1a3f */ + 0x00, 0x00, 0x40, 0x7f, 0xe5, 0x1f, 0xf8, 0x9f, /* 0x1a40-0x1a7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1a80-0x1abf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1ac0-0x1aff */ + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x17, /* 0x1b00-0x1b3f */ + 0x04, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x1b40-0x1b7f */ + 0x03, 0x00, 0x00, 0x00, 0x3c, 0x03, 0x00, 0x00, /* 0x1b80-0x1bbf */ + 0x00, 0x00, 0x00, 0x00, 0x40, 0xa3, 0x03, 0x00, /* 0x1bc0-0x1bff */ + /* 0x1c00-0x1dff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xcf, 0x00, /* 0x1c00-0x1c3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c40-0x1c7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c80-0x1cbf */ + 0x00, 0x00, 0xf7, 0xff, 0xfd, 0x21, 0x00, 0x00, /* 0x1cc0-0x1cff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d00-0x1d3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d40-0x1d7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d80-0x1dbf */ + 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xf0, /* 0x1dc0-0x1dff */ + /* 0x2000-0x21ff */ + 0x00, 0xf8, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, /* 0x2000-0x203f */ + 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, /* 0x2040-0x207f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2080-0x20bf */ + 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, /* 0x20c0-0x20ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2100-0x213f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2140-0x217f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2180-0x21bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x21c0-0x21ff */ + /* 0x2c00-0x2dff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c00-0x2c3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c40-0x2c7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c80-0x2cbf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, /* 0x2cc0-0x2cff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d00-0x2d3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x2d40-0x2d7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d80-0x2dbf */ + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* 0x2dc0-0x2dff */ + /* 0x3000-0x31ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* 0x3000-0x303f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3040-0x307f */ + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, /* 0x3080-0x30bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30c0-0x30ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3100-0x313f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3140-0x317f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3180-0x31bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x31c0-0x31ff */ + /* 0xa600-0xa7ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa600-0xa63f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x30, /* 0xa640-0xa67f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa680-0xa6bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, /* 0xa6c0-0xa6ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa700-0xa73f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa740-0xa77f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa780-0xa7bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa7c0-0xa7ff */ + /* 0xa800-0xa9ff */ + 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, /* 0xa800-0xa83f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa840-0xa87f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa880-0xa8bf */ + 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, /* 0xa8c0-0xa8ff */ + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, /* 0xa900-0xa93f */ + 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa940-0xa97f */ + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x13, /* 0xa980-0xa9bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa9c0-0xa9ff */ + /* 0xaa00-0xabff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x00, /* 0xaa00-0xaa3f */ + 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaa40-0xaa7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0xc1, /* 0xaa80-0xaabf */ + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaac0-0xaaff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab00-0xab3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab40-0xab7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab80-0xabbf */ + 0x00, 0x00, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00, /* 0xabc0-0xabff */ + /* 0xfa00-0xfbff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa00-0xfa3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa40-0xfa7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa80-0xfabf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfac0-0xfaff */ + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* 0xfb00-0xfb3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb40-0xfb7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb80-0xfbbf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfbc0-0xfbff */ + /* 0xfe00-0xffff */ + 0xff, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, /* 0xfe00-0xfe3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe40-0xfe7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe80-0xfebf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0xfec0-0xfeff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff00-0xff3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff40-0xff7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff80-0xffbf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, /* 0xffc0-0xffff */ + /* 0x10000-0x101ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10000-0x1003f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10040-0x1007f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10080-0x100bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x100c0-0x100ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10100-0x1013f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10140-0x1017f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10180-0x101bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, /* 0x101c0-0x101ff */ + /* 0x10a00-0x10bff */ + 0x6e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, /* 0x10a00-0x10a3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a40-0x10a7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a80-0x10abf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10ac0-0x10aff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b00-0x10b3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b40-0x10b7f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b80-0x10bbf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10bc0-0x10bff */ + /* 0x11000-0x111ff */ + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, /* 0x11000-0x1103f */ + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11040-0x1107f */ + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x26, /* 0x11080-0x110bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x110c0-0x110ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11100-0x1113f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11140-0x1117f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11180-0x111bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x111c0-0x111ff */ + /* 0x1d000-0x1d1ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d000-0x1d03f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d040-0x1d07f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d080-0x1d0bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d0c0-0x1d0ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d100-0x1d13f */ + 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0xf8, 0xff, /* 0x1d140-0x1d17f */ + 0xe7, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, /* 0x1d180-0x1d1bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d1c0-0x1d1ff */ + /* 0x1d200-0x1d3ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d200-0x1d23f */ + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d240-0x1d27f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d280-0x1d2bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d2c0-0x1d2ff */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d300-0x1d33f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d340-0x1d37f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d380-0x1d3bf */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0x1d3c0-0x1d3ff */ +}; +static const signed char nonspacing_table_ind[240] = { + 0, 1, 2, 3, 4, 5, 6, 7, /* 0x0000-0x0fff */ + 8, 9, -1, 10, 11, 12, 13, -1, /* 0x1000-0x1fff */ + 14, -1, -1, -1, -1, -1, 15, -1, /* 0x2000-0x2fff */ + 16, -1, -1, -1, -1, -1, -1, -1, /* 0x3000-0x3fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x4000-0x4fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x5000-0x5fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x6000-0x6fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x7000-0x7fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x8000-0x8fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x9000-0x9fff */ + -1, -1, -1, 17, 18, 19, -1, -1, /* 0xa000-0xafff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb000-0xbfff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc000-0xcfff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd000-0xdfff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe000-0xefff */ + -1, -1, -1, -1, -1, 20, -1, 21, /* 0xf000-0xffff */ + 22, -1, -1, -1, -1, 23, -1, -1, /* 0x10000-0x10fff */ + 24, -1, -1, -1, -1, -1, -1, -1, /* 0x11000-0x11fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x12000-0x12fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x13000-0x13fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x14000-0x14fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x15000-0x15fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x16000-0x16fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x17000-0x17fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x18000-0x18fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x19000-0x19fff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1a000-0x1afff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1b000-0x1bfff */ + -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1c000-0x1cfff */ + 25, 26, -1, -1, -1, -1, -1, -1 /* 0x1d000-0x1dfff */ +}; + +/* Determine number of column positions required for UC. */ +int +uc_width (ucs4_t uc, const char *encoding) +{ + /* Test for non-spacing or control character. */ + if ((uc >> 9) < 240) + { + int ind = nonspacing_table_ind[uc >> 9]; + if (ind >= 0) + if ((nonspacing_table_data[64*ind + ((uc >> 3) & 63)] >> (uc & 7)) & 1) + { + if (uc > 0 && uc < 0xa0) + return -1; + else + return 0; + } + } + else if ((uc >> 9) == (0xe0000 >> 9)) + { + if (uc >= 0xe0100) + { + if (uc <= 0xe01ef) + return 0; + } + else + { + if (uc >= 0xe0020 ? uc <= 0xe007f : uc == 0xe0001) + return 0; + } + } + /* Test for double-width character. + * Generated from "grep '^[^;]\{4,5\};[WF]' EastAsianWidth.txt" + * and "grep '^[^;]\{4,5\};[^WF]' EastAsianWidth.txt" + */ + if (uc >= 0x1100 + && ((uc < 0x1160) /* Hangul Jamo */ + || (uc >= 0x2329 && uc < 0x232b) /* Angle Brackets */ + || (uc >= 0x2e80 && uc < 0xa4d0 /* CJK ... Yi */ + && !(uc == 0x303f) && !(uc >= 0x4dc0 && uc < 0x4e00)) + || (uc >= 0xac00 && uc < 0xd7a4) /* Hangul Syllables */ + || (uc >= 0xf900 && uc < 0xfb00) /* CJK Compatibility Ideographs */ + || (uc >= 0xfe10 && uc < 0xfe20) /* Presentation Forms for Vertical */ + || (uc >= 0xfe30 && uc < 0xfe70) /* CJK Compatibility Forms */ + || (uc >= 0xff00 && uc < 0xff61) /* Fullwidth Forms */ + || (uc >= 0xffe0 && uc < 0xffe7) /* Fullwidth Signs */ + || (uc >= 0x20000 && uc <= 0x2ffff) /* Supplementary Ideographic Plane */ + || (uc >= 0x30000 && uc <= 0x3ffff) /* Tertiary Ideographic Plane */ + ) ) + return 2; + /* In ancient CJK encodings, Cyrillic and most other characters are + double-width as well. */ + if (uc >= 0x00A1 && uc < 0xFF61 && uc != 0x20A9 + && is_cjk_encoding (encoding)) + return 2; + return 1; +} diff --git a/gl/lib/unlink.c b/gl/lib/unlink.c new file mode 100644 index 0000000..a234be4 --- /dev/null +++ b/gl/lib/unlink.c @@ -0,0 +1,97 @@ +/* Work around unlink bugs. + + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include +#include +#include +#include + +#include "dosname.h" + +#undef unlink + +/* Remove file NAME. + Return 0 if successful, -1 if not. */ + +int +rpl_unlink (char const *name) +{ + /* Work around Solaris 9 bug where unlink("file/") succeeds. */ + size_t len = strlen (name); + int result = 0; + if (len && ISSLASH (name[len - 1])) + { + /* We can't unlink(2) something if it doesn't exist. If it does + exist, then it resolved to a directory, due to the trailing + slash, and POSIX requires that the unlink attempt to remove + that directory (which would leave the symlink dangling). + Unfortunately, Solaris 9 is one of the platforms where the + root user can unlink directories, and we don't want to + cripple this behavior on real directories, even if it is + seldom needed (at any rate, it's nicer to let coreutils' + unlink(1) give the correct errno for non-root users). But we + don't know whether name was an actual directory, or a symlink + to a directory; and due to the bug of ignoring trailing + slash, Solaris 9 would end up successfully unlinking the + symlink instead of the directory. Technically, we could use + realpath to find the canonical directory name to attempt + deletion on. But that is a lot of work for a corner case; so + we instead just use an lstat on the shortened name, and + reject symlinks with trailing slashes. The root user of + unlink(1) will just have to live with the rule that they + can't delete a directory via a symlink. */ + struct stat st; + result = lstat (name, &st); + if (result == 0) + { + /* Trailing NUL will overwrite the trailing slash. */ + char *short_name = malloc (len); + if (!short_name) + { + errno = EPERM; + return -1; + } + memcpy (short_name, name, len); + while (len && ISSLASH (short_name[len - 1])) + short_name[--len] = '\0'; + if (len && (lstat (short_name, &st) || S_ISLNK (st.st_mode))) + { + free (short_name); + errno = EPERM; + return -1; + } + free (short_name); + } + } + if (!result) + { +#if UNLINK_PARENT_BUG + if (len >= 2 && name[len - 1] == '.' && name[len - 2] == '.' + && (len == 2 || ISSLASH (name[len - 3]))) + { + errno = EISDIR; /* could also use EPERM */ + return -1; + } +#endif + result = unlink (name); + } + return result; +} diff --git a/gl/lib/unlinkat.c b/gl/lib/unlinkat.c new file mode 100644 index 0000000..fff8310 --- /dev/null +++ b/gl/lib/unlinkat.c @@ -0,0 +1,109 @@ +/* Work around unlinkat bugs on Solaris 9 and Hurd. + + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake. */ + +#include + +#include + +#include +#include +#include +#include + +#include + +#include "dosname.h" +#include "openat.h" + +#if HAVE_UNLINKAT + +# undef unlinkat + +/* unlinkat without AT_REMOVEDIR does not honor trailing / on Solaris + 9. Solve it in a similar manner to unlink. Hurd has the same + issue. */ + +int +rpl_unlinkat (int fd, char const *name, int flag) +{ + size_t len; + int result = 0; + /* rmdir behavior has no problems with trailing slash. */ + if (flag & AT_REMOVEDIR) + return unlinkat (fd, name, flag); + + len = strlen (name); + if (len && ISSLASH (name[len - 1])) + { + /* See the lengthy comment in unlink.c why we disobey the POSIX + rule of letting unlink("link-to-dir/") attempt to unlink a + directory. */ + struct stat st; + result = lstatat (fd, name, &st); + if (result == 0) + { + /* Trailing NUL will overwrite the trailing slash. */ + char *short_name = malloc (len); + if (!short_name) + { + errno = EPERM; + return -1; + } + memcpy (short_name, name, len); + while (len && ISSLASH (short_name[len - 1])) + short_name[--len] = '\0'; + if (len && (lstatat (fd, short_name, &st) || S_ISLNK (st.st_mode))) + { + free (short_name); + errno = EPERM; + return -1; + } + free (short_name); + } + } + if (!result) + result = unlinkat (fd, name, flag); + return result; +} + +#else /* !HAVE_UNLINKAT */ + +/* Replacement for Solaris' function by the same name. + + First, try to simulate it via (unlink|rmdir) ("/proc/self/fd/FD/FILE"). + Failing that, simulate it via save_cwd/fchdir/(unlink|rmdir)/restore_cwd. + If either the save_cwd or the restore_cwd fails (relatively unlikely), + then give a diagnostic and exit nonzero. + Otherwise, this function works just like Solaris' unlinkat. */ + +# define AT_FUNC_NAME unlinkat +# define AT_FUNC_F1 rmdir +# define AT_FUNC_F2 unlink +# define AT_FUNC_USE_F1_COND AT_REMOVEDIR +# define AT_FUNC_POST_FILE_PARAM_DECLS , int flag +# define AT_FUNC_POST_FILE_ARGS /* empty */ +# include "at-func.c" +# undef AT_FUNC_NAME +# undef AT_FUNC_F1 +# undef AT_FUNC_F2 +# undef AT_FUNC_USE_F1_COND +# undef AT_FUNC_POST_FILE_PARAM_DECLS +# undef AT_FUNC_POST_FILE_ARGS + +#endif /* !HAVE_UNLINKAT */ diff --git a/gl/lib/unsetenv.c b/gl/lib/unsetenv.c new file mode 100644 index 0000000..53721fc --- /dev/null +++ b/gl/lib/unsetenv.c @@ -0,0 +1,127 @@ +/* Copyright (C) 1992, 1995-2002, 2005-2014 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 under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc + optimizes away the name == NULL test below. */ +#define _GL_ARG_NONNULL(params) + +#include + +/* Specification. */ +#include + +#include +#if !_LIBC +# define __set_errno(ev) ((errno) = (ev)) +#endif + +#include +#include + +#if !_LIBC +# define __environ environ +#endif + +#if _LIBC +/* This lock protects against simultaneous modifications of 'environ'. */ +# include +__libc_lock_define_initialized (static, envlock) +# define LOCK __libc_lock_lock (envlock) +# define UNLOCK __libc_lock_unlock (envlock) +#else +# define LOCK +# define UNLOCK +#endif + +/* In the GNU C library we must keep the namespace clean. */ +#ifdef _LIBC +# define unsetenv __unsetenv +#endif + +#if _LIBC || !HAVE_UNSETENV + +int +unsetenv (const char *name) +{ + size_t len; + char **ep; + + if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) + { + __set_errno (EINVAL); + return -1; + } + + len = strlen (name); + + LOCK; + + ep = __environ; + while (*ep != NULL) + if (!strncmp (*ep, name, len) && (*ep)[len] == '=') + { + /* Found it. Remove this pointer by moving later ones back. */ + char **dp = ep; + + do + dp[0] = dp[1]; + while (*dp++); + /* Continue the loop in case NAME appears again. */ + } + else + ++ep; + + UNLOCK; + + return 0; +} + +#ifdef _LIBC +# undef unsetenv +weak_alias (__unsetenv, unsetenv) +#endif + +#else /* HAVE_UNSETENV */ + +# undef unsetenv +# if !HAVE_DECL_UNSETENV +# if VOID_UNSETENV +extern void unsetenv (const char *); +# else +extern int unsetenv (const char *); +# endif +# endif + +/* Call the underlying unsetenv, in case there is hidden bookkeeping + that needs updating beyond just modifying environ. */ +int +rpl_unsetenv (const char *name) +{ + int result = 0; + if (!name || !*name || strchr (name, '=')) + { + errno = EINVAL; + return -1; + } + while (getenv (name)) +# if !VOID_UNSETENV + result = +# endif + unsetenv (name); + return result; +} + +#endif /* HAVE_UNSETENV */ diff --git a/gl/lib/vasnprintf.c b/gl/lib/vasnprintf.c new file mode 100644 index 0000000..b7c8709 --- /dev/null +++ b/gl/lib/vasnprintf.c @@ -0,0 +1,5607 @@ +/* vsprintf with automatic memory allocation. + Copyright (C) 1999, 2002-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +/* This file can be parametrized with the following macros: + VASNPRINTF The name of the function being defined. + FCHAR_T The element type of the format string. + DCHAR_T The element type of the destination (result) string. + FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters + in the format string are ASCII. MUST be set if + FCHAR_T and DCHAR_T are not the same type. + DIRECTIVE Structure denoting a format directive. + Depends on FCHAR_T. + DIRECTIVES Structure denoting the set of format directives of a + format string. Depends on FCHAR_T. + PRINTF_PARSE Function that parses a format string. + Depends on FCHAR_T. + DCHAR_CPY memcpy like function for DCHAR_T[] arrays. + DCHAR_SET memset like function for DCHAR_T[] arrays. + DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. + SNPRINTF The system's snprintf (or similar) function. + This may be either snprintf or swprintf. + TCHAR_T The element type of the argument and result string + of the said SNPRINTF function. This may be either + char or wchar_t. The code exploits that + sizeof (TCHAR_T) | sizeof (DCHAR_T) and + alignof (TCHAR_T) <= alignof (DCHAR_T). + DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. + DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. + DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. + DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. + DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ + +/* Tell glibc's to provide a prototype for snprintf(). + This must come before because may include + , and once has been included, it's too late. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +#ifndef VASNPRINTF +# include +#endif +#ifndef IN_LIBINTL +# include +#endif + +/* Specification. */ +#ifndef VASNPRINTF +# if WIDE_CHAR_VERSION +# include "vasnwprintf.h" +# else +# include "vasnprintf.h" +# endif +#endif + +#include /* localeconv() */ +#include /* snprintf(), sprintf() */ +#include /* abort(), malloc(), realloc(), free() */ +#include /* memcpy(), strlen() */ +#include /* errno */ +#include /* CHAR_BIT */ +#include /* DBL_MAX_EXP, LDBL_MAX_EXP */ +#if HAVE_NL_LANGINFO +# include +#endif +#ifndef VASNPRINTF +# if WIDE_CHAR_VERSION +# include "wprintf-parse.h" +# else +# include "printf-parse.h" +# endif +#endif + +/* Checked size_t computations. */ +#include "xsize.h" + +#include "verify.h" + +#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL +# include +# include "float+.h" +#endif + +#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL +# include +# include "isnand-nolibm.h" +#endif + +#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL +# include +# include "isnanl-nolibm.h" +# include "fpucw.h" +#endif + +#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL +# include +# include "isnand-nolibm.h" +# include "printf-frexp.h" +#endif + +#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL +# include +# include "isnanl-nolibm.h" +# include "printf-frexpl.h" +# include "fpucw.h" +#endif + +/* Default parameters. */ +#ifndef VASNPRINTF +# if WIDE_CHAR_VERSION +# define VASNPRINTF vasnwprintf +# define FCHAR_T wchar_t +# define DCHAR_T wchar_t +# define TCHAR_T wchar_t +# define DCHAR_IS_TCHAR 1 +# define DIRECTIVE wchar_t_directive +# define DIRECTIVES wchar_t_directives +# define PRINTF_PARSE wprintf_parse +# define DCHAR_CPY wmemcpy +# define DCHAR_SET wmemset +# else +# define VASNPRINTF vasnprintf +# define FCHAR_T char +# define DCHAR_T char +# define TCHAR_T char +# define DCHAR_IS_TCHAR 1 +# define DIRECTIVE char_directive +# define DIRECTIVES char_directives +# define PRINTF_PARSE printf_parse +# define DCHAR_CPY memcpy +# define DCHAR_SET memset +# endif +#endif +#if WIDE_CHAR_VERSION + /* TCHAR_T is wchar_t. */ +# define USE_SNPRINTF 1 +# if HAVE_DECL__SNWPRINTF + /* On Windows, the function swprintf() has a different signature than + on Unix; we use the function _snwprintf() or - on mingw - snwprintf() + instead. The mingw function snwprintf() has fewer bugs than the + MSVCRT function _snwprintf(), so prefer that. */ +# if defined __MINGW32__ +# define SNPRINTF snwprintf +# else +# define SNPRINTF _snwprintf +# endif +# else + /* Unix. */ +# define SNPRINTF swprintf +# endif +#else + /* TCHAR_T is char. */ + /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. + But don't use it on BeOS, since BeOS snprintf produces no output if the + size argument is >= 0x3000000. + Also don't use it on Linux libc5, since there snprintf with size = 1 + writes any output without bounds, like sprintf. */ +# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1) +# define USE_SNPRINTF 1 +# else +# define USE_SNPRINTF 0 +# endif +# if HAVE_DECL__SNPRINTF + /* Windows. The mingw function snprintf() has fewer bugs than the MSVCRT + function _snprintf(), so prefer that. */ +# if defined __MINGW32__ +# define SNPRINTF snprintf + /* Here we need to call the native snprintf, not rpl_snprintf. */ +# undef snprintf +# else +# define SNPRINTF _snprintf +# endif +# else + /* Unix. */ +# define SNPRINTF snprintf + /* Here we need to call the native snprintf, not rpl_snprintf. */ +# undef snprintf +# endif +#endif +/* Here we need to call the native sprintf, not rpl_sprintf. */ +#undef sprintf + +/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized" + warnings in this file. Use -Dlint to suppress them. */ +#ifdef lint +# define IF_LINT(Code) Code +#else +# define IF_LINT(Code) /* empty */ +#endif + +/* Avoid some warnings from "gcc -Wshadow". + This file doesn't use the exp() and remainder() functions. */ +#undef exp +#define exp expo +#undef remainder +#define remainder rem + +#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION +# if (HAVE_STRNLEN && !defined _AIX) +# define local_strnlen strnlen +# else +# ifndef local_strnlen_defined +# define local_strnlen_defined 1 +static size_t +local_strnlen (const char *string, size_t maxlen) +{ + const char *end = memchr (string, '\0', maxlen); + return end ? (size_t) (end - string) : maxlen; +} +# endif +# endif +#endif + +#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T +# if HAVE_WCSLEN +# define local_wcslen wcslen +# else + /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid + a dependency towards this library, here is a local substitute. + Define this substitute only once, even if this file is included + twice in the same compilation unit. */ +# ifndef local_wcslen_defined +# define local_wcslen_defined 1 +static size_t +local_wcslen (const wchar_t *s) +{ + const wchar_t *ptr; + + for (ptr = s; *ptr != (wchar_t) 0; ptr++) + ; + return ptr - s; +} +# endif +# endif +#endif + +#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T && WIDE_CHAR_VERSION +# if HAVE_WCSNLEN +# define local_wcsnlen wcsnlen +# else +# ifndef local_wcsnlen_defined +# define local_wcsnlen_defined 1 +static size_t +local_wcsnlen (const wchar_t *s, size_t maxlen) +{ + const wchar_t *ptr; + + for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--) + ; + return ptr - s; +} +# endif +# endif +#endif + +#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL +/* Determine the decimal-point character according to the current locale. */ +# ifndef decimal_point_char_defined +# define decimal_point_char_defined 1 +static char +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 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__)) + point = nl_langinfo (RADIXCHAR); +# elif 1 + char pointbuf[5]; + sprintf (pointbuf, "%#.0f", 1.0); + point = &pointbuf[1]; +# else + point = localeconv () -> decimal_point; +# endif + /* The decimal point is always a single byte: either '.' or ','. */ + return (point[0] != '\0' ? point[0] : '.'); +} +# endif +#endif + +#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL + +/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ +static int +is_infinite_or_zero (double x) +{ + return isnand (x) || x + x == x; +} + +#endif + +#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL + +/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ +static int +is_infinite_or_zerol (long double x) +{ + return isnanl (x) || x + x == x; +} + +#endif + +#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL + +/* Converting 'long double' to decimal without rare rounding bugs requires + real bignums. We use the naming conventions of GNU gmp, but vastly simpler + (and slower) algorithms. */ + +typedef unsigned int mp_limb_t; +# define GMP_LIMB_BITS 32 +verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS); + +typedef unsigned long long mp_twolimb_t; +# define GMP_TWOLIMB_BITS 64 +verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS); + +/* Representation of a bignum >= 0. */ +typedef struct +{ + size_t nlimbs; + mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ +} mpn_t; + +/* Compute the product of two bignums >= 0. + Return the allocated memory in case of success, NULL in case of memory + allocation failure. */ +static void * +multiply (mpn_t src1, mpn_t src2, mpn_t *dest) +{ + const mp_limb_t *p1; + const mp_limb_t *p2; + size_t len1; + size_t len2; + + if (src1.nlimbs <= src2.nlimbs) + { + len1 = src1.nlimbs; + p1 = src1.limbs; + len2 = src2.nlimbs; + p2 = src2.limbs; + } + else + { + len1 = src2.nlimbs; + p1 = src2.limbs; + len2 = src1.nlimbs; + p2 = src1.limbs; + } + /* Now 0 <= len1 <= len2. */ + if (len1 == 0) + { + /* src1 or src2 is zero. */ + dest->nlimbs = 0; + dest->limbs = (mp_limb_t *) malloc (1); + } + else + { + /* Here 1 <= len1 <= len2. */ + size_t dlen; + mp_limb_t *dp; + size_t k, i, j; + + dlen = len1 + len2; + dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); + if (dp == NULL) + return NULL; + for (k = len2; k > 0; ) + dp[--k] = 0; + for (i = 0; i < len1; i++) + { + mp_limb_t digit1 = p1[i]; + mp_twolimb_t carry = 0; + for (j = 0; j < len2; j++) + { + mp_limb_t digit2 = p2[j]; + carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; + carry += dp[i + j]; + dp[i + j] = (mp_limb_t) carry; + carry = carry >> GMP_LIMB_BITS; + } + dp[i + len2] = (mp_limb_t) carry; + } + /* Normalise. */ + while (dlen > 0 && dp[dlen - 1] == 0) + dlen--; + dest->nlimbs = dlen; + dest->limbs = dp; + } + return dest->limbs; +} + +/* Compute the quotient of a bignum a >= 0 and a bignum b > 0. + a is written as a = q * b + r with 0 <= r < b. q is the quotient, r + the remainder. + Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, + q is incremented. + Return the allocated memory in case of success, NULL in case of memory + allocation failure. */ +static void * +divide (mpn_t a, mpn_t b, mpn_t *q) +{ + /* Algorithm: + First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] + with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). + If m=n=1, perform a single-precision division: + r:=0, j:=m, + while j>0 do + {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = + = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r=n>1, perform a multiple-precision division: + We have a/b < beta^(m-n+1). + s:=intDsize-1-(highest bit in b[n-1]), 0<=s=beta/2. + For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} + Compute q* : + q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). + In case of overflow (q* >= beta) set q* := beta-1. + Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] + and c3 := b[n-2] * q*. + {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow + occurred. Furthermore 0 <= c3 < beta^2. + If there was overflow and + r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, + the next test can be skipped.} + While c3 > c2, {Here 0 <= c2 < c3 < beta^2} + Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. + If q* > 0: + Put r := r - b * q* * beta^j. In detail: + [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. + hence: u:=0, for i:=0 to n-1 do + u := u + q* * b[i], + r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), + u:=u div beta (+ 1, if carry in subtraction) + r[n+j]:=r[n+j]-u. + {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 + < q* + 1 <= beta, + the carry u does not overflow.} + If a negative carry occurs, put q* := q* - 1 + and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. + Set q[j] := q*. + Normalise [q[m-n],..,q[0]]; this yields the quotient q. + Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the + rest r. + The room for q[j] can be allocated at the memory location of r[n+j]. + Finally, round-to-even: + Shift r left by 1 bit. + If r > b or if r = b and q[0] is odd, q := q+1. + */ + const mp_limb_t *a_ptr = a.limbs; + size_t a_len = a.nlimbs; + const mp_limb_t *b_ptr = b.limbs; + size_t b_len = b.nlimbs; + mp_limb_t *roomptr; + mp_limb_t *tmp_roomptr = NULL; + mp_limb_t *q_ptr; + size_t q_len; + mp_limb_t *r_ptr; + size_t r_len; + + /* Allocate room for a_len+2 digits. + (Need a_len+1 digits for the real division and 1 more digit for the + final rounding of q.) */ + roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); + if (roomptr == NULL) + return NULL; + + /* Normalise a. */ + while (a_len > 0 && a_ptr[a_len - 1] == 0) + a_len--; + + /* Normalise b. */ + for (;;) + { + if (b_len == 0) + /* Division by zero. */ + abort (); + if (b_ptr[b_len - 1] == 0) + b_len--; + else + break; + } + + /* Here m = a_len >= 0 and n = b_len > 0. */ + + if (a_len < b_len) + { + /* m beta^(m-2) <= a/b < beta^m */ + r_ptr = roomptr; + q_ptr = roomptr + 1; + { + mp_limb_t den = b_ptr[0]; + mp_limb_t remainder = 0; + const mp_limb_t *sourceptr = a_ptr + a_len; + mp_limb_t *destptr = q_ptr + a_len; + size_t count; + for (count = a_len; count > 0; count--) + { + mp_twolimb_t num = + ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; + *--destptr = num / den; + remainder = num % den; + } + /* Normalise and store r. */ + if (remainder > 0) + { + r_ptr[0] = remainder; + r_len = 1; + } + else + r_len = 0; + /* Normalise q. */ + q_len = a_len; + if (q_ptr[q_len - 1] == 0) + q_len--; + } + } + else + { + /* n>1: multiple precision division. + beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> + beta^(m-n-1) <= a/b < beta^(m-n+1). */ + /* Determine s. */ + size_t s; + { + mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ + /* Determine s = GMP_LIMB_BITS - integer_length (msd). + Code copied from gnulib's integer_length.c. */ +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) + s = __builtin_clz (msd); +# else +# if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT + if (GMP_LIMB_BITS <= DBL_MANT_BIT) + { + /* Use 'double' operations. + Assumes an IEEE 754 'double' implementation. */ +# define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) +# define DBL_EXP_BIAS (DBL_EXP_MASK / 2 - 1) +# define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + union { double value; unsigned int word[NWORDS]; } m; + + /* Use a single integer to floating-point conversion. */ + m.value = msd; + + s = GMP_LIMB_BITS + - (((m.word[DBL_EXPBIT0_WORD] >> DBL_EXPBIT0_BIT) & DBL_EXP_MASK) + - DBL_EXP_BIAS); + } + else +# undef NWORDS +# endif + { + s = 31; + if (msd >= 0x10000) + { + msd = msd >> 16; + s -= 16; + } + if (msd >= 0x100) + { + msd = msd >> 8; + s -= 8; + } + if (msd >= 0x10) + { + msd = msd >> 4; + s -= 4; + } + if (msd >= 0x4) + { + msd = msd >> 2; + s -= 2; + } + if (msd >= 0x2) + { + msd = msd >> 1; + s -= 1; + } + } +# endif + } + /* 0 <= s < GMP_LIMB_BITS. + Copy b, shifting it left by s bits. */ + if (s > 0) + { + tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); + if (tmp_roomptr == NULL) + { + free (roomptr); + return NULL; + } + { + const mp_limb_t *sourceptr = b_ptr; + mp_limb_t *destptr = tmp_roomptr; + mp_twolimb_t accu = 0; + size_t count; + for (count = b_len; count > 0; count--) + { + accu += (mp_twolimb_t) *sourceptr++ << s; + *destptr++ = (mp_limb_t) accu; + accu = accu >> GMP_LIMB_BITS; + } + /* accu must be zero, since that was how s was determined. */ + if (accu != 0) + abort (); + } + b_ptr = tmp_roomptr; + } + /* Copy a, shifting it left by s bits, yields r. + Memory layout: + At the beginning: r = roomptr[0..a_len], + at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ + r_ptr = roomptr; + if (s == 0) + { + memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); + r_ptr[a_len] = 0; + } + else + { + const mp_limb_t *sourceptr = a_ptr; + mp_limb_t *destptr = r_ptr; + mp_twolimb_t accu = 0; + size_t count; + for (count = a_len; count > 0; count--) + { + accu += (mp_twolimb_t) *sourceptr++ << s; + *destptr++ = (mp_limb_t) accu; + accu = accu >> GMP_LIMB_BITS; + } + *destptr++ = (mp_limb_t) accu; + } + q_ptr = roomptr + b_len; + q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ + { + size_t j = a_len - b_len; /* m-n */ + mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ + mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ + mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ + ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; + /* Division loop, traversed m-n+1 times. + j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ + for (;;) + { + mp_limb_t q_star; + mp_limb_t c1; + if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ + { + /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ + mp_twolimb_t num = + ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) + | r_ptr[j + b_len - 1]; + q_star = num / b_msd; + c1 = num % b_msd; + } + else + { + /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ + q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ + /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta + <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta + <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) + {<= beta !}. + If yes, jump directly to the subtraction loop. + (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta + <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ + if (r_ptr[j + b_len] > b_msd + || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) + /* r[j+n] >= b[n-1]+1 or + r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a + carry. */ + goto subtract; + } + /* q_star = q*, + c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, 0, decrease it by + b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 + this can happen only twice. */ + if (c3 > c2) + { + q_star = q_star - 1; /* q* := q* - 1 */ + if (c3 - c2 > b_msdd) + q_star = q_star - 1; /* q* := q* - 1 */ + } + } + if (q_star > 0) + subtract: + { + /* Subtract r := r - b * q* * beta^j. */ + mp_limb_t cr; + { + const mp_limb_t *sourceptr = b_ptr; + mp_limb_t *destptr = r_ptr + j; + mp_twolimb_t carry = 0; + size_t count; + for (count = b_len; count > 0; count--) + { + /* Here 0 <= carry <= q*. */ + carry = + carry + + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ + + (mp_limb_t) ~(*destptr); + /* Here 0 <= carry <= beta*q* + beta-1. */ + *destptr++ = ~(mp_limb_t) carry; + carry = carry >> GMP_LIMB_BITS; /* <= q* */ + } + cr = (mp_limb_t) carry; + } + /* Subtract cr from r_ptr[j + b_len], then forget about + r_ptr[j + b_len]. */ + if (cr > r_ptr[j + b_len]) + { + /* Subtraction gave a carry. */ + q_star = q_star - 1; /* q* := q* - 1 */ + /* Add b back. */ + { + const mp_limb_t *sourceptr = b_ptr; + mp_limb_t *destptr = r_ptr + j; + mp_limb_t carry = 0; + size_t count; + for (count = b_len; count > 0; count--) + { + mp_limb_t source1 = *sourceptr++; + mp_limb_t source2 = *destptr; + *destptr++ = source1 + source2 + carry; + carry = + (carry + ? source1 >= (mp_limb_t) ~source2 + : source1 > (mp_limb_t) ~source2); + } + } + /* Forget about the carry and about r[j+n]. */ + } + } + /* q* is determined. Store it as q[j]. */ + q_ptr[j] = q_star; + if (j == 0) + break; + j--; + } + } + r_len = b_len; + /* Normalise q. */ + if (q_ptr[q_len - 1] == 0) + q_len--; +# if 0 /* Not needed here, since we need r only to compare it with b/2, and + b is shifted left by s bits. */ + /* Shift r right by s bits. */ + if (s > 0) + { + mp_limb_t ptr = r_ptr + r_len; + mp_twolimb_t accu = 0; + size_t count; + for (count = r_len; count > 0; count--) + { + accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; + accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); + *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); + } + } +# endif + /* Normalise r. */ + while (r_len > 0 && r_ptr[r_len - 1] == 0) + r_len--; + } + /* Compare r << 1 with b. */ + if (r_len > b_len) + goto increment_q; + { + size_t i; + for (i = b_len;;) + { + mp_limb_t r_i = + (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) + | (i < r_len ? r_ptr[i] << 1 : 0); + mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); + if (r_i > b_i) + goto increment_q; + if (r_i < b_i) + goto keep_q; + if (i == 0) + break; + i--; + } + } + if (q_len > 0 && ((q_ptr[0] & 1) != 0)) + /* q is odd. */ + increment_q: + { + size_t i; + for (i = 0; i < q_len; i++) + if (++(q_ptr[i]) != 0) + goto keep_q; + q_ptr[q_len++] = 1; + } + keep_q: + if (tmp_roomptr != NULL) + free (tmp_roomptr); + q->limbs = q_ptr; + q->nlimbs = q_len; + return roomptr; +} + +/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal + representation. + Destroys the contents of a. + Return the allocated memory - containing the decimal digits in low-to-high + order, terminated with a NUL character - in case of success, NULL in case + of memory allocation failure. */ +static char * +convert_to_decimal (mpn_t a, size_t extra_zeroes) +{ + mp_limb_t *a_ptr = a.limbs; + size_t a_len = a.nlimbs; + /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ + size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); + char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); + if (c_ptr != NULL) + { + char *d_ptr = c_ptr; + for (; extra_zeroes > 0; extra_zeroes--) + *d_ptr++ = '0'; + while (a_len > 0) + { + /* Divide a by 10^9, in-place. */ + mp_limb_t remainder = 0; + mp_limb_t *ptr = a_ptr + a_len; + size_t count; + for (count = a_len; count > 0; count--) + { + mp_twolimb_t num = + ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; + *ptr = num / 1000000000; + remainder = num % 1000000000; + } + /* Store the remainder as 9 decimal digits. */ + for (count = 9; count > 0; count--) + { + *d_ptr++ = '0' + (remainder % 10); + remainder = remainder / 10; + } + /* Normalize a. */ + if (a_ptr[a_len - 1] == 0) + a_len--; + } + /* Remove leading zeroes. */ + while (d_ptr > c_ptr && d_ptr[-1] == '0') + d_ptr--; + /* But keep at least one zero. */ + if (d_ptr == c_ptr) + *d_ptr++ = '0'; + /* Terminate the string. */ + *d_ptr = '\0'; + } + return c_ptr; +} + +# if NEED_PRINTF_LONG_DOUBLE + +/* Assuming x is finite and >= 0: + write x as x = 2^e * m, where m is a bignum. + Return the allocated memory in case of success, NULL in case of memory + allocation failure. */ +static void * +decode_long_double (long double x, int *ep, mpn_t *mp) +{ + mpn_t m; + int exp; + long double y; + size_t i; + + /* Allocate memory for result. */ + m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; + m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); + if (m.limbs == NULL) + return NULL; + /* Split into exponential part and mantissa. */ + y = frexpl (x, &exp); + if (!(y >= 0.0L && y < 1.0L)) + abort (); + /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * 2^LDBL_MANT_BIT), and the + latter is an integer. */ + /* Convert the mantissa (y * 2^LDBL_MANT_BIT) to a sequence of limbs. + I'm not sure whether it's safe to cast a 'long double' value between + 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only + 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', + doesn't matter). */ +# if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 +# if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 + { + mp_limb_t hi, lo; + y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); + hi = (int) y; + y -= hi; + if (!(y >= 0.0L && y < 1.0L)) + abort (); + y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); + lo = (int) y; + y -= lo; + if (!(y >= 0.0L && y < 1.0L)) + abort (); + m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; + } +# else + { + mp_limb_t d; + y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); + d = (int) y; + y -= d; + if (!(y >= 0.0L && y < 1.0L)) + abort (); + m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; + } +# endif +# endif + for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) + { + mp_limb_t hi, lo; + y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); + hi = (int) y; + y -= hi; + if (!(y >= 0.0L && y < 1.0L)) + abort (); + y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); + lo = (int) y; + y -= lo; + if (!(y >= 0.0L && y < 1.0L)) + abort (); + m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; + } +# if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess + precision. */ + if (!(y == 0.0L)) + abort (); +# endif + /* Normalise. */ + while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) + m.nlimbs--; + *mp = m; + *ep = exp - LDBL_MANT_BIT; + return m.limbs; +} + +# endif + +# if NEED_PRINTF_DOUBLE + +/* Assuming x is finite and >= 0: + write x as x = 2^e * m, where m is a bignum. + Return the allocated memory in case of success, NULL in case of memory + allocation failure. */ +static void * +decode_double (double x, int *ep, mpn_t *mp) +{ + mpn_t m; + int exp; + double y; + size_t i; + + /* Allocate memory for result. */ + m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; + m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); + if (m.limbs == NULL) + return NULL; + /* Split into exponential part and mantissa. */ + y = frexp (x, &exp); + if (!(y >= 0.0 && y < 1.0)) + abort (); + /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * 2^DBL_MANT_BIT), and the + latter is an integer. */ + /* Convert the mantissa (y * 2^DBL_MANT_BIT) to a sequence of limbs. + I'm not sure whether it's safe to cast a 'double' value between + 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only + 'double' values between 0 and 2^16 (to 'unsigned int' or 'int', + doesn't matter). */ +# if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0 +# if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 + { + mp_limb_t hi, lo; + y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); + hi = (int) y; + y -= hi; + if (!(y >= 0.0 && y < 1.0)) + abort (); + y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); + lo = (int) y; + y -= lo; + if (!(y >= 0.0 && y < 1.0)) + abort (); + m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; + } +# else + { + mp_limb_t d; + y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); + d = (int) y; + y -= d; + if (!(y >= 0.0 && y < 1.0)) + abort (); + m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d; + } +# endif +# endif + for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) + { + mp_limb_t hi, lo; + y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); + hi = (int) y; + y -= hi; + if (!(y >= 0.0 && y < 1.0)) + abort (); + y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); + lo = (int) y; + y -= lo; + if (!(y >= 0.0 && y < 1.0)) + abort (); + m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; + } + if (!(y == 0.0)) + abort (); + /* Normalise. */ + while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) + m.nlimbs--; + *mp = m; + *ep = exp - DBL_MANT_BIT; + return m.limbs; +} + +# endif + +/* Assuming x = 2^e * m is finite and >= 0, and n is an integer: + Returns the decimal representation of round (x * 10^n). + Return the allocated memory - containing the decimal digits in low-to-high + order, terminated with a NUL character - in case of success, NULL in case + of memory allocation failure. */ +static char * +scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) +{ + int s; + size_t extra_zeroes; + unsigned int abs_n; + unsigned int abs_s; + mp_limb_t *pow5_ptr; + size_t pow5_len; + unsigned int s_limbs; + unsigned int s_bits; + mpn_t pow5; + mpn_t z; + void *z_memory; + char *digits; + + if (memory == NULL) + return NULL; + /* x = 2^e * m, hence + y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) + = round (2^s * 5^n * m). */ + s = e + n; + extra_zeroes = 0; + /* Factor out a common power of 10 if possible. */ + if (s > 0 && n > 0) + { + extra_zeroes = (s < n ? s : n); + s -= extra_zeroes; + n -= extra_zeroes; + } + /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. + Before converting to decimal, we need to compute + z = round (2^s * 5^n * m). */ + /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same + sign. 2.322 is slightly larger than log(5)/log(2). */ + abs_n = (n >= 0 ? n : -n); + abs_s = (s >= 0 ? s : -s); + pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 + + abs_s / GMP_LIMB_BITS + 1) + * sizeof (mp_limb_t)); + if (pow5_ptr == NULL) + { + free (memory); + return NULL; + } + /* Initialize with 1. */ + pow5_ptr[0] = 1; + pow5_len = 1; + /* Multiply with 5^|n|. */ + if (abs_n > 0) + { + static mp_limb_t const small_pow5[13 + 1] = + { + 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, + 48828125, 244140625, 1220703125 + }; + unsigned int n13; + for (n13 = 0; n13 <= abs_n; n13 += 13) + { + mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; + size_t j; + mp_twolimb_t carry = 0; + for (j = 0; j < pow5_len; j++) + { + mp_limb_t digit2 = pow5_ptr[j]; + carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; + pow5_ptr[j] = (mp_limb_t) carry; + carry = carry >> GMP_LIMB_BITS; + } + if (carry > 0) + pow5_ptr[pow5_len++] = (mp_limb_t) carry; + } + } + s_limbs = abs_s / GMP_LIMB_BITS; + s_bits = abs_s % GMP_LIMB_BITS; + if (n >= 0 ? s >= 0 : s <= 0) + { + /* Multiply with 2^|s|. */ + if (s_bits > 0) + { + mp_limb_t *ptr = pow5_ptr; + mp_twolimb_t accu = 0; + size_t count; + for (count = pow5_len; count > 0; count--) + { + accu += (mp_twolimb_t) *ptr << s_bits; + *ptr++ = (mp_limb_t) accu; + accu = accu >> GMP_LIMB_BITS; + } + if (accu > 0) + { + *ptr = (mp_limb_t) accu; + pow5_len++; + } + } + if (s_limbs > 0) + { + size_t count; + for (count = pow5_len; count > 0;) + { + count--; + pow5_ptr[s_limbs + count] = pow5_ptr[count]; + } + for (count = s_limbs; count > 0;) + { + count--; + pow5_ptr[count] = 0; + } + pow5_len += s_limbs; + } + pow5.limbs = pow5_ptr; + pow5.nlimbs = pow5_len; + if (n >= 0) + { + /* Multiply m with pow5. No division needed. */ + z_memory = multiply (m, pow5, &z); + } + else + { + /* Divide m by pow5 and round. */ + z_memory = divide (m, pow5, &z); + } + } + else + { + pow5.limbs = pow5_ptr; + pow5.nlimbs = pow5_len; + if (n >= 0) + { + /* n >= 0, s < 0. + Multiply m with pow5, then divide by 2^|s|. */ + mpn_t numerator; + mpn_t denominator; + void *tmp_memory; + tmp_memory = multiply (m, pow5, &numerator); + if (tmp_memory == NULL) + { + free (pow5_ptr); + free (memory); + return NULL; + } + /* Construct 2^|s|. */ + { + mp_limb_t *ptr = pow5_ptr + pow5_len; + size_t i; + for (i = 0; i < s_limbs; i++) + ptr[i] = 0; + ptr[s_limbs] = (mp_limb_t) 1 << s_bits; + denominator.limbs = ptr; + denominator.nlimbs = s_limbs + 1; + } + z_memory = divide (numerator, denominator, &z); + free (tmp_memory); + } + else + { + /* n < 0, s > 0. + Multiply m with 2^s, then divide by pow5. */ + mpn_t numerator; + mp_limb_t *num_ptr; + num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) + * sizeof (mp_limb_t)); + if (num_ptr == NULL) + { + free (pow5_ptr); + free (memory); + return NULL; + } + { + mp_limb_t *destptr = num_ptr; + { + size_t i; + for (i = 0; i < s_limbs; i++) + *destptr++ = 0; + } + if (s_bits > 0) + { + const mp_limb_t *sourceptr = m.limbs; + mp_twolimb_t accu = 0; + size_t count; + for (count = m.nlimbs; count > 0; count--) + { + accu += (mp_twolimb_t) *sourceptr++ << s_bits; + *destptr++ = (mp_limb_t) accu; + accu = accu >> GMP_LIMB_BITS; + } + if (accu > 0) + *destptr++ = (mp_limb_t) accu; + } + else + { + const mp_limb_t *sourceptr = m.limbs; + size_t count; + for (count = m.nlimbs; count > 0; count--) + *destptr++ = *sourceptr++; + } + numerator.limbs = num_ptr; + numerator.nlimbs = destptr - num_ptr; + } + z_memory = divide (numerator, pow5, &z); + free (num_ptr); + } + } + free (pow5_ptr); + free (memory); + + /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ + + if (z_memory == NULL) + return NULL; + digits = convert_to_decimal (z, extra_zeroes); + free (z_memory); + return digits; +} + +# if NEED_PRINTF_LONG_DOUBLE + +/* Assuming x is finite and >= 0, and n is an integer: + Returns the decimal representation of round (x * 10^n). + Return the allocated memory - containing the decimal digits in low-to-high + order, terminated with a NUL character - in case of success, NULL in case + of memory allocation failure. */ +static char * +scale10_round_decimal_long_double (long double x, int n) +{ + int e IF_LINT(= 0); + mpn_t m; + void *memory = decode_long_double (x, &e, &m); + return scale10_round_decimal_decoded (e, m, memory, n); +} + +# endif + +# if NEED_PRINTF_DOUBLE + +/* Assuming x is finite and >= 0, and n is an integer: + Returns the decimal representation of round (x * 10^n). + Return the allocated memory - containing the decimal digits in low-to-high + order, terminated with a NUL character - in case of success, NULL in case + of memory allocation failure. */ +static char * +scale10_round_decimal_double (double x, int n) +{ + int e IF_LINT(= 0); + mpn_t m; + void *memory = decode_double (x, &e, &m); + return scale10_round_decimal_decoded (e, m, memory, n); +} + +# endif + +# if NEED_PRINTF_LONG_DOUBLE + +/* Assuming x is finite and > 0: + Return an approximation for n with 10^n <= x < 10^(n+1). + The approximation is usually the right n, but may be off by 1 sometimes. */ +static int +floorlog10l (long double x) +{ + int exp; + long double y; + double z; + double l; + + /* Split into exponential part and mantissa. */ + y = frexpl (x, &exp); + if (!(y >= 0.0L && y < 1.0L)) + abort (); + if (y == 0.0L) + return INT_MIN; + if (y < 0.5L) + { + while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) + { + y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); + exp -= GMP_LIMB_BITS; + } + if (y < (1.0L / (1 << 16))) + { + y *= 1.0L * (1 << 16); + exp -= 16; + } + if (y < (1.0L / (1 << 8))) + { + y *= 1.0L * (1 << 8); + exp -= 8; + } + if (y < (1.0L / (1 << 4))) + { + y *= 1.0L * (1 << 4); + exp -= 4; + } + if (y < (1.0L / (1 << 2))) + { + y *= 1.0L * (1 << 2); + exp -= 2; + } + if (y < (1.0L / (1 << 1))) + { + y *= 1.0L * (1 << 1); + exp -= 1; + } + } + if (!(y >= 0.5L && y < 1.0L)) + abort (); + /* Compute an approximation for l = log2(x) = exp + log2(y). */ + l = exp; + z = y; + if (z < 0.70710678118654752444) + { + z *= 1.4142135623730950488; + l -= 0.5; + } + if (z < 0.8408964152537145431) + { + z *= 1.1892071150027210667; + l -= 0.25; + } + if (z < 0.91700404320467123175) + { + z *= 1.0905077326652576592; + l -= 0.125; + } + if (z < 0.9576032806985736469) + { + z *= 1.0442737824274138403; + l -= 0.0625; + } + /* Now 0.95 <= z <= 1.01. */ + z = 1 - z; + /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) + Four terms are enough to get an approximation with error < 10^-7. */ + l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); + /* Finally multiply with log(2)/log(10), yields an approximation for + log10(x). */ + l *= 0.30102999566398119523; + /* Round down to the next integer. */ + return (int) l + (l < 0 ? -1 : 0); +} + +# endif + +# if NEED_PRINTF_DOUBLE + +/* Assuming x is finite and > 0: + Return an approximation for n with 10^n <= x < 10^(n+1). + The approximation is usually the right n, but may be off by 1 sometimes. */ +static int +floorlog10 (double x) +{ + int exp; + double y; + double z; + double l; + + /* Split into exponential part and mantissa. */ + y = frexp (x, &exp); + if (!(y >= 0.0 && y < 1.0)) + abort (); + if (y == 0.0) + return INT_MIN; + if (y < 0.5) + { + while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) + { + y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); + exp -= GMP_LIMB_BITS; + } + if (y < (1.0 / (1 << 16))) + { + y *= 1.0 * (1 << 16); + exp -= 16; + } + if (y < (1.0 / (1 << 8))) + { + y *= 1.0 * (1 << 8); + exp -= 8; + } + if (y < (1.0 / (1 << 4))) + { + y *= 1.0 * (1 << 4); + exp -= 4; + } + if (y < (1.0 / (1 << 2))) + { + y *= 1.0 * (1 << 2); + exp -= 2; + } + if (y < (1.0 / (1 << 1))) + { + y *= 1.0 * (1 << 1); + exp -= 1; + } + } + if (!(y >= 0.5 && y < 1.0)) + abort (); + /* Compute an approximation for l = log2(x) = exp + log2(y). */ + l = exp; + z = y; + if (z < 0.70710678118654752444) + { + z *= 1.4142135623730950488; + l -= 0.5; + } + if (z < 0.8408964152537145431) + { + z *= 1.1892071150027210667; + l -= 0.25; + } + if (z < 0.91700404320467123175) + { + z *= 1.0905077326652576592; + l -= 0.125; + } + if (z < 0.9576032806985736469) + { + z *= 1.0442737824274138403; + l -= 0.0625; + } + /* Now 0.95 <= z <= 1.01. */ + z = 1 - z; + /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) + Four terms are enough to get an approximation with error < 10^-7. */ + l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); + /* Finally multiply with log(2)/log(10), yields an approximation for + log10(x). */ + l *= 0.30102999566398119523; + /* Round down to the next integer. */ + return (int) l + (l < 0 ? -1 : 0); +} + +# endif + +/* Tests whether a string of digits consists of exactly PRECISION zeroes and + a single '1' digit. */ +static int +is_borderline (const char *digits, size_t precision) +{ + for (; precision > 0; precision--, digits++) + if (*digits != '0') + return 0; + if (*digits != '1') + return 0; + digits++; + return *digits == '\0'; +} + +#endif + +#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 + +/* Use a different function name, to make it possible that the 'wchar_t' + parametrization and the 'char' parametrization get compiled in the same + translation unit. */ +# if WIDE_CHAR_VERSION +# define MAX_ROOM_NEEDED wmax_room_needed +# else +# define MAX_ROOM_NEEDED max_room_needed +# endif + +/* Returns the number of TCHAR_T units needed as temporary space for the result + of sprintf or SNPRINTF of a single conversion directive. */ +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) +{ + size_t tmp_length; + + switch (conversion) + { + case 'd': case 'i': case 'u': +# if HAVE_LONG_LONG_INT + if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long long) * CHAR_BIT + * 0.30103 /* binary -> decimal */ + ) + + 1; /* turn floor into ceil */ + else +# endif + if (type == TYPE_LONGINT || type == TYPE_ULONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long) * CHAR_BIT + * 0.30103 /* binary -> decimal */ + ) + + 1; /* turn floor into ceil */ + else + tmp_length = + (unsigned int) (sizeof (unsigned int) * CHAR_BIT + * 0.30103 /* binary -> decimal */ + ) + + 1; /* turn floor into ceil */ + if (tmp_length < precision) + tmp_length = precision; + /* Multiply by 2, as an estimate for FLAG_GROUP. */ + tmp_length = xsum (tmp_length, tmp_length); + /* Add 1, to account for a leading sign. */ + tmp_length = xsum (tmp_length, 1); + break; + + case 'o': +# if HAVE_LONG_LONG_INT + if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long long) * CHAR_BIT + * 0.333334 /* binary -> octal */ + ) + + 1; /* turn floor into ceil */ + else +# endif + if (type == TYPE_LONGINT || type == TYPE_ULONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long) * CHAR_BIT + * 0.333334 /* binary -> octal */ + ) + + 1; /* turn floor into ceil */ + else + tmp_length = + (unsigned int) (sizeof (unsigned int) * CHAR_BIT + * 0.333334 /* binary -> octal */ + ) + + 1; /* turn floor into ceil */ + if (tmp_length < precision) + tmp_length = precision; + /* Add 1, to account for a leading sign. */ + tmp_length = xsum (tmp_length, 1); + break; + + case 'x': case 'X': +# if HAVE_LONG_LONG_INT + if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long long) * CHAR_BIT + * 0.25 /* binary -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + else +# endif + if (type == TYPE_LONGINT || type == TYPE_ULONGINT) + tmp_length = + (unsigned int) (sizeof (unsigned long) * CHAR_BIT + * 0.25 /* binary -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + else + tmp_length = + (unsigned int) (sizeof (unsigned int) * CHAR_BIT + * 0.25 /* binary -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + if (tmp_length < precision) + tmp_length = precision; + /* Add 2, to account for a leading sign or alternate form. */ + tmp_length = xsum (tmp_length, 2); + break; + + case 'f': case 'F': + if (type == TYPE_LONGDOUBLE) + tmp_length = + (unsigned int) (LDBL_MAX_EXP + * 0.30103 /* binary -> decimal */ + * 2 /* estimate for FLAG_GROUP */ + ) + + 1 /* turn floor into ceil */ + + 10; /* sign, decimal point etc. */ + else + tmp_length = + (unsigned int) (DBL_MAX_EXP + * 0.30103 /* binary -> decimal */ + * 2 /* estimate for FLAG_GROUP */ + ) + + 1 /* turn floor into ceil */ + + 10; /* sign, decimal point etc. */ + tmp_length = xsum (tmp_length, precision); + break; + + case 'e': case 'E': case 'g': case 'G': + tmp_length = + 12; /* sign, decimal point, exponent etc. */ + tmp_length = xsum (tmp_length, precision); + break; + + case 'a': case 'A': + if (type == TYPE_LONGDOUBLE) + tmp_length = + (unsigned int) (LDBL_DIG + * 0.831 /* decimal -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + else + tmp_length = + (unsigned int) (DBL_DIG + * 0.831 /* decimal -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + if (tmp_length < precision) + tmp_length = precision; + /* Account for sign, decimal point etc. */ + tmp_length = xsum (tmp_length, 12); + break; + + case 'c': +# if HAVE_WINT_T && !WIDE_CHAR_VERSION + if (type == TYPE_WIDE_CHAR) + tmp_length = MB_CUR_MAX; + else +# endif + tmp_length = 1; + break; + + case 's': +# if HAVE_WCHAR_T + if (type == TYPE_WIDE_STRING) + { +# if WIDE_CHAR_VERSION + /* ISO C says about %ls in fwprintf: + "If the precision is not specified or is greater than the size + of the array, the array shall contain a null wide character." + So if there is a precision, we must not use wcslen. */ + const wchar_t *arg = ap->arg[arg_index].a.a_wide_string; + + if (has_precision) + tmp_length = local_wcsnlen (arg, precision); + else + tmp_length = local_wcslen (arg); +# else + /* ISO C says about %ls in fprintf: + "If a precision is specified, no more than that many bytes are + written (including shift sequences, if any), and the array + shall contain a null wide character if, to equal the multibyte + character sequence length given by the precision, the function + would need to access a wide character one past the end of the + array." + So if there is a precision, we must not use wcslen. */ + /* This case has already been handled separately in VASNPRINTF. */ + abort (); +# endif + } + else +# endif + { +# if WIDE_CHAR_VERSION + /* ISO C says about %s in fwprintf: + "If the precision is not specified or is greater than the size + of the converted array, the converted array shall contain a + null wide character." + So if there is a precision, we must not use strlen. */ + /* This case has already been handled separately in VASNPRINTF. */ + abort (); +# else + /* ISO C says about %s in fprintf: + "If the precision is not specified or greater than the size of + the array, the array shall contain a null character." + So if there is a precision, we must not use strlen. */ + const char *arg = ap->arg[arg_index].a.a_string; + + if (has_precision) + tmp_length = local_strnlen (arg, precision); + else + tmp_length = strlen (arg); +# endif + } + break; + + case 'p': + tmp_length = + (unsigned int) (sizeof (void *) * CHAR_BIT + * 0.25 /* binary -> hexadecimal */ + ) + + 1 /* turn floor into ceil */ + + 2; /* account for leading 0x */ + break; + + default: + abort (); + } + + if (!pad_ourselves) + { +# if ENABLE_UNISTDIO + /* Padding considers the number of characters, therefore the number of + elements after padding may be + > max (tmp_length, width) + but is certainly + <= tmp_length + width. */ + tmp_length = xsum (tmp_length, width); +# else + /* Padding considers the number of elements, says POSIX. */ + if (tmp_length < width) + tmp_length = width; +# endif + } + + tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ + + return tmp_length; +} + +#endif + +DCHAR_T * +VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, + const FCHAR_T *format, va_list args) +{ + DIRECTIVES d; + arguments a; + + if (PRINTF_PARSE (format, &d, &a) < 0) + /* errno is already set. */ + return NULL; + +#define CLEANUP() \ + if (d.dir != d.direct_alloc_dir) \ + free (d.dir); \ + if (a.arg != a.direct_alloc_arg) \ + free (a.arg); + + if (PRINTF_FETCHARGS (args, &a) < 0) + { + CLEANUP (); + errno = EINVAL; + return NULL; + } + + { + size_t buf_neededlength; + TCHAR_T *buf; + TCHAR_T *buf_malloced; + const FCHAR_T *cp; + size_t i; + DIRECTIVE *dp; + /* Output string accumulator. */ + DCHAR_T *result; + size_t allocated; + size_t length; + + /* Allocate a small buffer that will hold a directive passed to + sprintf or snprintf. */ + buf_neededlength = + xsum4 (7, d.max_width_length, d.max_precision_length, 6); +#if HAVE_ALLOCA + if (buf_neededlength < 4000 / sizeof (TCHAR_T)) + { + buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); + buf_malloced = NULL; + } + else +#endif + { + size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); + if (size_overflow_p (buf_memsize)) + goto out_of_memory_1; + buf = (TCHAR_T *) malloc (buf_memsize); + if (buf == NULL) + goto out_of_memory_1; + buf_malloced = buf; + } + + if (resultbuf != NULL) + { + result = resultbuf; + allocated = *lengthp; + } + else + { + result = NULL; + allocated = 0; + } + length = 0; + /* Invariants: + result is either == resultbuf or == NULL or malloc-allocated. + If length > 0, then result != NULL. */ + + /* Ensures that allocated >= needed. Aborts through a jump to + out_of_memory if needed is SIZE_MAX or otherwise too big. */ +#define ENSURE_ALLOCATION(needed) \ + if ((needed) > allocated) \ + { \ + size_t memory_size; \ + DCHAR_T *memory; \ + \ + allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ + if ((needed) > allocated) \ + allocated = (needed); \ + memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ + if (size_overflow_p (memory_size)) \ + goto out_of_memory; \ + if (result == resultbuf || result == NULL) \ + memory = (DCHAR_T *) malloc (memory_size); \ + else \ + memory = (DCHAR_T *) realloc (result, memory_size); \ + if (memory == NULL) \ + goto out_of_memory; \ + if (result == resultbuf && length > 0) \ + DCHAR_CPY (memory, result, length); \ + result = memory; \ + } + + for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) + { + if (cp != dp->dir_start) + { + size_t n = dp->dir_start - cp; + size_t augmented_length = xsum (length, n); + + ENSURE_ALLOCATION (augmented_length); + /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we + need that the format string contains only ASCII characters + if FCHAR_T and DCHAR_T are not the same type. */ + if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) + { + DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); + length = augmented_length; + } + else + { + do + result[length++] = (unsigned char) *cp++; + while (--n > 0); + } + } + if (i == d.count) + break; + + /* Execute a single directive. */ + if (dp->conversion == '%') + { + size_t augmented_length; + + if (!(dp->arg_index == ARG_NONE)) + abort (); + augmented_length = xsum (length, 1); + ENSURE_ALLOCATION (augmented_length); + result[length] = '%'; + length = augmented_length; + } + else + { + if (!(dp->arg_index != ARG_NONE)) + abort (); + + if (dp->conversion == 'n') + { + switch (a.arg[dp->arg_index].type) + { + case TYPE_COUNT_SCHAR_POINTER: + *a.arg[dp->arg_index].a.a_count_schar_pointer = length; + break; + case TYPE_COUNT_SHORT_POINTER: + *a.arg[dp->arg_index].a.a_count_short_pointer = length; + break; + case TYPE_COUNT_INT_POINTER: + *a.arg[dp->arg_index].a.a_count_int_pointer = length; + break; + case TYPE_COUNT_LONGINT_POINTER: + *a.arg[dp->arg_index].a.a_count_longint_pointer = length; + break; +#if HAVE_LONG_LONG_INT + case TYPE_COUNT_LONGLONGINT_POINTER: + *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; + break; +#endif + default: + abort (); + } + } +#if ENABLE_UNISTDIO + /* The unistdio extensions. */ + else if (dp->conversion == 'U') + { + arg_type type = a.arg[dp->arg_index].type; + int flags = dp->flags; + int has_width; + size_t width; + int has_precision; + size_t precision; + + has_width = 0; + width = 0; + if (dp->width_start != dp->width_end) + { + if (dp->width_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->width_arg_index].a.a_int; + if (arg < 0) + { + /* "A negative field width is taken as a '-' flag + followed by a positive field width." */ + flags |= FLAG_LEFT; + width = (unsigned int) (-arg); + } + else + width = arg; + } + else + { + const FCHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + has_width = 1; + } + + has_precision = 0; + precision = 0; + if (dp->precision_start != dp->precision_end) + { + if (dp->precision_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->precision_arg_index].a.a_int; + /* "A negative precision is taken as if the precision + were omitted." */ + if (arg >= 0) + { + precision = arg; + has_precision = 1; + } + } + else + { + const FCHAR_T *digitp = dp->precision_start + 1; + + precision = 0; + while (digitp != dp->precision_end) + precision = xsum (xtimes (precision, 10), *digitp++ - '0'); + has_precision = 1; + } + } + + switch (type) + { + case TYPE_U8_STRING: + { + const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; + const uint8_t *arg_end; + size_t characters; + + if (has_precision) + { + /* Use only PRECISION characters, from the left. */ + arg_end = arg; + characters = 0; + for (; precision > 0; precision--) + { + int count = u8_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else if (has_width) + { + /* Use the entire string, and count the number of + characters. */ + arg_end = arg; + characters = 0; + for (;;) + { + int count = u8_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else + { + /* Use the entire string. */ + arg_end = arg + u8_strlen (arg); + /* The number of characters doesn't matter. */ + characters = 0; + } + + if (has_width && width > characters + && !(dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + +# if DCHAR_IS_UINT8_T + { + size_t n = arg_end - arg; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_CPY (result + length, arg, n); + length += n; + } +# else + { /* Convert. */ + DCHAR_T *converted = result + length; + size_t converted_len = allocated - length; +# if DCHAR_IS_TCHAR + /* Convert from UTF-8 to locale encoding. */ + converted = + u8_conv_to_encoding (locale_charset (), + iconveh_question_mark, + arg, arg_end - arg, NULL, + converted, &converted_len); +# else + /* Convert from UTF-8 to UTF-16/UTF-32. */ + converted = + U8_TO_DCHAR (arg, arg_end - arg, + converted, &converted_len); +# endif + if (converted == NULL) + { + int saved_errno = errno; + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = saved_errno; + return NULL; + } + if (converted != result + length) + { + ENSURE_ALLOCATION (xsum (length, converted_len)); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } + length += converted_len; + } +# endif + + if (has_width && width > characters + && (dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + } + break; + + case TYPE_U16_STRING: + { + const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; + const uint16_t *arg_end; + size_t characters; + + if (has_precision) + { + /* Use only PRECISION characters, from the left. */ + arg_end = arg; + characters = 0; + for (; precision > 0; precision--) + { + int count = u16_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else if (has_width) + { + /* Use the entire string, and count the number of + characters. */ + arg_end = arg; + characters = 0; + for (;;) + { + int count = u16_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else + { + /* Use the entire string. */ + arg_end = arg + u16_strlen (arg); + /* The number of characters doesn't matter. */ + characters = 0; + } + + if (has_width && width > characters + && !(dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + +# if DCHAR_IS_UINT16_T + { + size_t n = arg_end - arg; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_CPY (result + length, arg, n); + length += n; + } +# else + { /* Convert. */ + DCHAR_T *converted = result + length; + size_t converted_len = allocated - length; +# if DCHAR_IS_TCHAR + /* Convert from UTF-16 to locale encoding. */ + converted = + u16_conv_to_encoding (locale_charset (), + iconveh_question_mark, + arg, arg_end - arg, NULL, + converted, &converted_len); +# else + /* Convert from UTF-16 to UTF-8/UTF-32. */ + converted = + U16_TO_DCHAR (arg, arg_end - arg, + converted, &converted_len); +# endif + if (converted == NULL) + { + int saved_errno = errno; + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = saved_errno; + return NULL; + } + if (converted != result + length) + { + ENSURE_ALLOCATION (xsum (length, converted_len)); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } + length += converted_len; + } +# endif + + if (has_width && width > characters + && (dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + } + break; + + case TYPE_U32_STRING: + { + const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; + const uint32_t *arg_end; + size_t characters; + + if (has_precision) + { + /* Use only PRECISION characters, from the left. */ + arg_end = arg; + characters = 0; + for (; precision > 0; precision--) + { + int count = u32_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else if (has_width) + { + /* Use the entire string, and count the number of + characters. */ + arg_end = arg; + characters = 0; + for (;;) + { + int count = u32_strmblen (arg_end); + if (count == 0) + break; + if (count < 0) + { + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else + { + /* Use the entire string. */ + arg_end = arg + u32_strlen (arg); + /* The number of characters doesn't matter. */ + characters = 0; + } + + if (has_width && width > characters + && !(dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + +# if DCHAR_IS_UINT32_T + { + size_t n = arg_end - arg; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_CPY (result + length, arg, n); + length += n; + } +# else + { /* Convert. */ + DCHAR_T *converted = result + length; + size_t converted_len = allocated - length; +# if DCHAR_IS_TCHAR + /* Convert from UTF-32 to locale encoding. */ + converted = + u32_conv_to_encoding (locale_charset (), + iconveh_question_mark, + arg, arg_end - arg, NULL, + converted, &converted_len); +# else + /* Convert from UTF-32 to UTF-8/UTF-16. */ + converted = + U32_TO_DCHAR (arg, arg_end - arg, + converted, &converted_len); +# endif + if (converted == NULL) + { + int saved_errno = errno; + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = saved_errno; + return NULL; + } + if (converted != result + length) + { + ENSURE_ALLOCATION (xsum (length, converted_len)); + DCHAR_CPY (result + length, converted, converted_len); + free (converted); + } + length += converted_len; + } +# endif + + if (has_width && width > characters + && (dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + } + break; + + default: + abort (); + } + } +#endif +#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T + else if (dp->conversion == 's' +# if WIDE_CHAR_VERSION + && a.arg[dp->arg_index].type != TYPE_WIDE_STRING +# else + && a.arg[dp->arg_index].type == TYPE_WIDE_STRING +# endif + ) + { + /* The normal handling of the 's' directive below requires + allocating a temporary buffer. The determination of its + length (tmp_length), in the case when a precision is + specified, below requires a conversion between a char[] + string and a wchar_t[] wide string. It could be done, but + we have no guarantee that the implementation of sprintf will + use the exactly same algorithm. Without this guarantee, it + is possible to have buffer overrun bugs. In order to avoid + such bugs, we implement the entire processing of the 's' + directive ourselves. */ + int flags = dp->flags; + int has_width; + size_t width; + int has_precision; + size_t precision; + + has_width = 0; + width = 0; + if (dp->width_start != dp->width_end) + { + if (dp->width_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->width_arg_index].a.a_int; + if (arg < 0) + { + /* "A negative field width is taken as a '-' flag + followed by a positive field width." */ + flags |= FLAG_LEFT; + width = (unsigned int) (-arg); + } + else + width = arg; + } + else + { + const FCHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + has_width = 1; + } + + has_precision = 0; + precision = 6; + if (dp->precision_start != dp->precision_end) + { + if (dp->precision_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->precision_arg_index].a.a_int; + /* "A negative precision is taken as if the precision + were omitted." */ + if (arg >= 0) + { + precision = arg; + has_precision = 1; + } + } + else + { + const FCHAR_T *digitp = dp->precision_start + 1; + + precision = 0; + while (digitp != dp->precision_end) + precision = xsum (xtimes (precision, 10), *digitp++ - '0'); + has_precision = 1; + } + } + +# if WIDE_CHAR_VERSION + /* %s in vasnwprintf. See the specification of fwprintf. */ + { + const char *arg = a.arg[dp->arg_index].a.a_string; + const char *arg_end; + size_t characters; + + if (has_precision) + { + /* Use only as many bytes as needed to produce PRECISION + wide characters, from the left. */ +# if HAVE_MBRTOWC + mbstate_t state; + memset (&state, '\0', sizeof (mbstate_t)); +# endif + arg_end = arg; + characters = 0; + for (; precision > 0; precision--) + { + int count; +# if HAVE_MBRTOWC + count = mbrlen (arg_end, MB_CUR_MAX, &state); +# else + count = mblen (arg_end, MB_CUR_MAX); +# endif + if (count == 0) + /* Found the terminating NUL. */ + break; + if (count < 0) + { + /* Invalid or incomplete multibyte character. */ + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else if (has_width) + { + /* Use the entire string, and count the number of wide + characters. */ +# if HAVE_MBRTOWC + mbstate_t state; + memset (&state, '\0', sizeof (mbstate_t)); +# endif + arg_end = arg; + characters = 0; + for (;;) + { + int count; +# if HAVE_MBRTOWC + count = mbrlen (arg_end, MB_CUR_MAX, &state); +# else + count = mblen (arg_end, MB_CUR_MAX); +# endif + if (count == 0) + /* Found the terminating NUL. */ + break; + if (count < 0) + { + /* Invalid or incomplete multibyte character. */ + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end += count; + characters++; + } + } + else + { + /* Use the entire string. */ + arg_end = arg + strlen (arg); + /* The number of characters doesn't matter. */ + characters = 0; + } + + if (has_width && width > characters + && !(dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + + if (has_precision || has_width) + { + /* We know the number of wide characters in advance. */ + size_t remaining; +# if HAVE_MBRTOWC + mbstate_t state; + memset (&state, '\0', sizeof (mbstate_t)); +# endif + ENSURE_ALLOCATION (xsum (length, characters)); + for (remaining = characters; remaining > 0; remaining--) + { + wchar_t wc; + int count; +# if HAVE_MBRTOWC + count = mbrtowc (&wc, arg, arg_end - arg, &state); +# else + count = mbtowc (&wc, arg, arg_end - arg); +# endif + if (count <= 0) + /* mbrtowc not consistent with mbrlen, or mbtowc + not consistent with mblen. */ + abort (); + result[length++] = wc; + arg += count; + } + if (!(arg == arg_end)) + abort (); + } + else + { +# if HAVE_MBRTOWC + mbstate_t state; + memset (&state, '\0', sizeof (mbstate_t)); +# endif + while (arg < arg_end) + { + wchar_t wc; + int count; +# if HAVE_MBRTOWC + count = mbrtowc (&wc, arg, arg_end - arg, &state); +# else + count = mbtowc (&wc, arg, arg_end - arg); +# endif + if (count <= 0) + /* mbrtowc not consistent with mbrlen, or mbtowc + not consistent with mblen. */ + abort (); + ENSURE_ALLOCATION (xsum (length, 1)); + result[length++] = wc; + arg += count; + } + } + + if (has_width && width > characters + && (dp->flags & FLAG_LEFT)) + { + size_t n = width - characters; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + } +# else + /* %ls in vasnprintf. See the specification of fprintf. */ + { + const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; + const wchar_t *arg_end; + size_t characters; +# if !DCHAR_IS_TCHAR + /* This code assumes that TCHAR_T is 'char'. */ + verify (sizeof (TCHAR_T) == 1); + TCHAR_T *tmpsrc; + DCHAR_T *tmpdst; + size_t tmpdst_len; +# endif + size_t w; + + if (has_precision) + { + /* Use only as many wide characters as needed to produce + at most PRECISION bytes, from the left. */ +# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t + mbstate_t state; + memset (&state, '\0', sizeof (mbstate_t)); +# endif + arg_end = arg; + characters = 0; + while (precision > 0) + { + char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ + int count; + + if (*arg_end == 0) + /* Found the terminating null wide character. */ + break; +# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t + count = wcrtomb (cbuf, *arg_end, &state); +# else + count = wctomb (cbuf, *arg_end); +# endif + if (count < 0) + { + /* Cannot convert. */ + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + if (precision < count) + break; + arg_end++; + characters += count; + precision -= count; + } + } +# if DCHAR_IS_TCHAR + else if (has_width) +# else + else +# endif + { + /* Use the entire string, and count the number of + bytes. */ +# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t + mbstate_t state; + memset (&state, '\0', sizeof (mbstate_t)); +# endif + arg_end = arg; + characters = 0; + for (;;) + { + char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ + int count; + + if (*arg_end == 0) + /* Found the terminating null wide character. */ + break; +# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t + count = wcrtomb (cbuf, *arg_end, &state); +# else + count = wctomb (cbuf, *arg_end); +# endif + if (count < 0) + { + /* Cannot convert. */ + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + arg_end++; + characters += count; + } + } +# if DCHAR_IS_TCHAR + else + { + /* Use the entire string. */ + arg_end = arg + local_wcslen (arg); + /* The number of bytes doesn't matter. */ + characters = 0; + } +# endif + +# if !DCHAR_IS_TCHAR + /* Convert the string into a piece of temporary memory. */ + tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T)); + if (tmpsrc == NULL) + goto out_of_memory; + { + TCHAR_T *tmpptr = tmpsrc; + size_t remaining; +# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t + mbstate_t state; + memset (&state, '\0', sizeof (mbstate_t)); +# endif + for (remaining = characters; remaining > 0; ) + { + char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ + int count; + + if (*arg == 0) + abort (); +# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t + count = wcrtomb (cbuf, *arg, &state); +# else + count = wctomb (cbuf, *arg); +# endif + if (count <= 0) + /* Inconsistency. */ + abort (); + memcpy (tmpptr, cbuf, count); + tmpptr += count; + arg++; + remaining -= count; + } + if (!(arg == arg_end)) + abort (); + } + + /* Convert from TCHAR_T[] to DCHAR_T[]. */ + tmpdst = + DCHAR_CONV_FROM_ENCODING (locale_charset (), + iconveh_question_mark, + tmpsrc, characters, + NULL, + NULL, &tmpdst_len); + if (tmpdst == NULL) + { + int saved_errno = errno; + free (tmpsrc); + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = saved_errno; + return NULL; + } + free (tmpsrc); +# endif + + if (has_width) + { +# if ENABLE_UNISTDIO + /* Outside POSIX, it's preferable to compare the width + against the number of _characters_ of the converted + value. */ + w = DCHAR_MBSNLEN (result + length, characters); +# else + /* The width is compared against the number of _bytes_ + of the converted value, says POSIX. */ + w = characters; +# endif + } + else + /* w doesn't matter. */ + w = 0; + + if (has_width && width > w + && !(dp->flags & FLAG_LEFT)) + { + size_t n = width - w; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + +# if DCHAR_IS_TCHAR + if (has_precision || has_width) + { + /* We know the number of bytes in advance. */ + size_t remaining; +# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t + mbstate_t state; + memset (&state, '\0', sizeof (mbstate_t)); +# endif + ENSURE_ALLOCATION (xsum (length, characters)); + for (remaining = characters; remaining > 0; ) + { + char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ + int count; + + if (*arg == 0) + abort (); +# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t + count = wcrtomb (cbuf, *arg, &state); +# else + count = wctomb (cbuf, *arg); +# endif + if (count <= 0) + /* Inconsistency. */ + abort (); + memcpy (result + length, cbuf, count); + length += count; + arg++; + remaining -= count; + } + if (!(arg == arg_end)) + abort (); + } + else + { +# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t + mbstate_t state; + memset (&state, '\0', sizeof (mbstate_t)); +# endif + while (arg < arg_end) + { + char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ + int count; + + if (*arg == 0) + abort (); +# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t + count = wcrtomb (cbuf, *arg, &state); +# else + count = wctomb (cbuf, *arg); +# endif + if (count <= 0) + { + /* Cannot convert. */ + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EILSEQ; + return NULL; + } + ENSURE_ALLOCATION (xsum (length, count)); + memcpy (result + length, cbuf, count); + length += count; + arg++; + } + } +# else + ENSURE_ALLOCATION (xsum (length, tmpdst_len)); + DCHAR_CPY (result + length, tmpdst, tmpdst_len); + free (tmpdst); + length += tmpdst_len; +# endif + + if (has_width && width > w + && (dp->flags & FLAG_LEFT)) + { + size_t n = width - w; + ENSURE_ALLOCATION (xsum (length, n)); + DCHAR_SET (result + length, ' ', n); + length += n; + } + } +# endif + } +#endif +#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL + else if ((dp->conversion == 'a' || dp->conversion == 'A') +# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE)) + && (0 +# if NEED_PRINTF_DOUBLE + || a.arg[dp->arg_index].type == TYPE_DOUBLE +# endif +# if NEED_PRINTF_LONG_DOUBLE + || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE +# endif + ) +# endif + ) + { + arg_type type = a.arg[dp->arg_index].type; + int flags = dp->flags; + int has_width; + size_t width; + int has_precision; + size_t precision; + size_t tmp_length; + DCHAR_T tmpbuf[700]; + DCHAR_T *tmp; + DCHAR_T *pad_ptr; + DCHAR_T *p; + + has_width = 0; + width = 0; + if (dp->width_start != dp->width_end) + { + if (dp->width_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->width_arg_index].a.a_int; + if (arg < 0) + { + /* "A negative field width is taken as a '-' flag + followed by a positive field width." */ + flags |= FLAG_LEFT; + width = (unsigned int) (-arg); + } + else + width = arg; + } + else + { + const FCHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + has_width = 1; + } + + has_precision = 0; + precision = 0; + if (dp->precision_start != dp->precision_end) + { + if (dp->precision_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->precision_arg_index].a.a_int; + /* "A negative precision is taken as if the precision + were omitted." */ + if (arg >= 0) + { + precision = arg; + has_precision = 1; + } + } + else + { + const FCHAR_T *digitp = dp->precision_start + 1; + + precision = 0; + while (digitp != dp->precision_end) + precision = xsum (xtimes (precision, 10), *digitp++ - '0'); + has_precision = 1; + } + } + + /* Allocate a temporary buffer of sufficient size. */ + if (type == TYPE_LONGDOUBLE) + tmp_length = + (unsigned int) ((LDBL_DIG + 1) + * 0.831 /* decimal -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + else + tmp_length = + (unsigned int) ((DBL_DIG + 1) + * 0.831 /* decimal -> hexadecimal */ + ) + + 1; /* turn floor into ceil */ + if (tmp_length < precision) + tmp_length = precision; + /* Account for sign, decimal point etc. */ + tmp_length = xsum (tmp_length, 12); + + if (tmp_length < width) + tmp_length = width; + + tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ + + if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) + tmp = tmpbuf; + else + { + size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); + + if (size_overflow_p (tmp_memsize)) + /* Overflow, would lead to out of memory. */ + goto out_of_memory; + tmp = (DCHAR_T *) malloc (tmp_memsize); + if (tmp == NULL) + /* Out of memory. */ + goto out_of_memory; + } + + pad_ptr = NULL; + p = tmp; + if (type == TYPE_LONGDOUBLE) + { +# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE + long double arg = a.arg[dp->arg_index].a.a_longdouble; + + if (isnanl (arg)) + { + if (dp->conversion == 'A') + { + *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; + } + else + { + *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; + } + } + else + { + int sign = 0; + DECL_LONG_DOUBLE_ROUNDING + + BEGIN_LONG_DOUBLE_ROUNDING (); + + if (signbit (arg)) /* arg < 0.0L or negative zero */ + { + sign = -1; + arg = -arg; + } + + if (sign < 0) + *p++ = '-'; + else if (flags & FLAG_SHOWSIGN) + *p++ = '+'; + else if (flags & FLAG_SPACE) + *p++ = ' '; + + if (arg > 0.0L && arg + arg == arg) + { + if (dp->conversion == 'A') + { + *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; + } + else + { + *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; + } + } + else + { + int exponent; + long double mantissa; + + if (arg > 0.0L) + mantissa = printf_frexpl (arg, &exponent); + else + { + exponent = 0; + mantissa = 0.0L; + } + + if (has_precision + && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) + { + /* Round the mantissa. */ + long double tail = mantissa; + size_t q; + + for (q = precision; ; q--) + { + int digit = (int) tail; + tail -= digit; + if (q == 0) + { + if (digit & 1 ? tail >= 0.5L : tail > 0.5L) + tail = 1 - tail; + else + tail = - tail; + break; + } + tail *= 16.0L; + } + if (tail != 0.0L) + for (q = precision; q > 0; q--) + tail *= 0.0625L; + mantissa += tail; + } + + *p++ = '0'; + *p++ = dp->conversion - 'A' + 'X'; + pad_ptr = p; + { + int digit; + + digit = (int) mantissa; + mantissa -= digit; + *p++ = '0' + digit; + if ((flags & FLAG_ALT) + || mantissa > 0.0L || precision > 0) + { + *p++ = decimal_point_char (); + /* This loop terminates because we assume + that FLT_RADIX is a power of 2. */ + while (mantissa > 0.0L) + { + mantissa *= 16.0L; + digit = (int) mantissa; + mantissa -= digit; + *p++ = digit + + (digit < 10 + ? '0' + : dp->conversion - 10); + if (precision > 0) + precision--; + } + while (precision > 0) + { + *p++ = '0'; + precision--; + } + } + } + *p++ = dp->conversion - 'A' + 'P'; +# if WIDE_CHAR_VERSION + { + static const wchar_t decimal_format[] = + { '%', '+', 'd', '\0' }; + SNPRINTF (p, 6 + 1, decimal_format, exponent); + } + while (*p != '\0') + p++; +# else + if (sizeof (DCHAR_T) == 1) + { + sprintf ((char *) p, "%+d", exponent); + while (*p != '\0') + p++; + } + else + { + char expbuf[6 + 1]; + const char *ep; + sprintf (expbuf, "%+d", exponent); + for (ep = expbuf; (*p = *ep) != '\0'; ep++) + p++; + } +# endif + } + + END_LONG_DOUBLE_ROUNDING (); + } +# else + abort (); +# endif + } + else + { +# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE + double arg = a.arg[dp->arg_index].a.a_double; + + if (isnand (arg)) + { + if (dp->conversion == 'A') + { + *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; + } + else + { + *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; + } + } + else + { + int sign = 0; + + if (signbit (arg)) /* arg < 0.0 or negative zero */ + { + sign = -1; + arg = -arg; + } + + if (sign < 0) + *p++ = '-'; + else if (flags & FLAG_SHOWSIGN) + *p++ = '+'; + else if (flags & FLAG_SPACE) + *p++ = ' '; + + if (arg > 0.0 && arg + arg == arg) + { + if (dp->conversion == 'A') + { + *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; + } + else + { + *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; + } + } + else + { + int exponent; + double mantissa; + + if (arg > 0.0) + mantissa = printf_frexp (arg, &exponent); + else + { + exponent = 0; + mantissa = 0.0; + } + + if (has_precision + && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) + { + /* Round the mantissa. */ + double tail = mantissa; + size_t q; + + for (q = precision; ; q--) + { + int digit = (int) tail; + tail -= digit; + if (q == 0) + { + if (digit & 1 ? tail >= 0.5 : tail > 0.5) + tail = 1 - tail; + else + tail = - tail; + break; + } + tail *= 16.0; + } + if (tail != 0.0) + for (q = precision; q > 0; q--) + tail *= 0.0625; + mantissa += tail; + } + + *p++ = '0'; + *p++ = dp->conversion - 'A' + 'X'; + pad_ptr = p; + { + int digit; + + digit = (int) mantissa; + mantissa -= digit; + *p++ = '0' + digit; + if ((flags & FLAG_ALT) + || mantissa > 0.0 || precision > 0) + { + *p++ = decimal_point_char (); + /* This loop terminates because we assume + that FLT_RADIX is a power of 2. */ + while (mantissa > 0.0) + { + mantissa *= 16.0; + digit = (int) mantissa; + mantissa -= digit; + *p++ = digit + + (digit < 10 + ? '0' + : dp->conversion - 10); + if (precision > 0) + precision--; + } + while (precision > 0) + { + *p++ = '0'; + precision--; + } + } + } + *p++ = dp->conversion - 'A' + 'P'; +# if WIDE_CHAR_VERSION + { + static const wchar_t decimal_format[] = + { '%', '+', 'd', '\0' }; + SNPRINTF (p, 6 + 1, decimal_format, exponent); + } + while (*p != '\0') + p++; +# else + if (sizeof (DCHAR_T) == 1) + { + sprintf ((char *) p, "%+d", exponent); + while (*p != '\0') + p++; + } + else + { + char expbuf[6 + 1]; + const char *ep; + sprintf (expbuf, "%+d", exponent); + for (ep = expbuf; (*p = *ep) != '\0'; ep++) + p++; + } +# endif + } + } +# else + abort (); +# endif + } + /* The generated string now extends from tmp to p, with the + zero padding insertion point being at pad_ptr. */ + if (has_width && p - tmp < width) + { + size_t pad = width - (p - tmp); + DCHAR_T *end = p + pad; + + if (flags & FLAG_LEFT) + { + /* Pad with spaces on the right. */ + for (; pad > 0; pad--) + *p++ = ' '; + } + else if ((flags & FLAG_ZERO) && pad_ptr != NULL) + { + /* Pad with zeroes. */ + DCHAR_T *q = end; + + while (p > pad_ptr) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = '0'; + } + else + { + /* Pad with spaces on the left. */ + DCHAR_T *q = end; + + while (p > tmp) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = ' '; + } + + p = end; + } + + { + size_t count = p - tmp; + + if (count >= tmp_length) + /* tmp_length was incorrectly calculated - fix the + code above! */ + abort (); + + /* Make room for the result. */ + if (count >= allocated - length) + { + size_t n = xsum (length, count); + + ENSURE_ALLOCATION (n); + } + + /* Append the result. */ + memcpy (result + length, tmp, count * sizeof (DCHAR_T)); + if (tmp != tmpbuf) + free (tmp); + length += count; + } + } +#endif +#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL + else if ((dp->conversion == 'f' || dp->conversion == 'F' + || dp->conversion == 'e' || dp->conversion == 'E' + || dp->conversion == 'g' || dp->conversion == 'G' + || dp->conversion == 'a' || dp->conversion == 'A') + && (0 +# if NEED_PRINTF_DOUBLE + || a.arg[dp->arg_index].type == TYPE_DOUBLE +# elif NEED_PRINTF_INFINITE_DOUBLE + || (a.arg[dp->arg_index].type == TYPE_DOUBLE + /* The systems (mingw) which produce wrong output + for Inf, -Inf, and NaN also do so for -0.0. + Therefore we treat this case here as well. */ + && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) +# endif +# if NEED_PRINTF_LONG_DOUBLE + || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE +# elif NEED_PRINTF_INFINITE_LONG_DOUBLE + || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE + /* Some systems produce wrong output for Inf, + -Inf, and NaN. Some systems in this category + (IRIX 5.3) also do so for -0.0. Therefore we + treat this case here as well. */ + && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) +# endif + )) + { +# if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) + arg_type type = a.arg[dp->arg_index].type; +# endif + int flags = dp->flags; + int has_width; + size_t width; + int has_precision; + size_t precision; + size_t tmp_length; + DCHAR_T tmpbuf[700]; + DCHAR_T *tmp; + DCHAR_T *pad_ptr; + DCHAR_T *p; + + has_width = 0; + width = 0; + if (dp->width_start != dp->width_end) + { + if (dp->width_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->width_arg_index].a.a_int; + if (arg < 0) + { + /* "A negative field width is taken as a '-' flag + followed by a positive field width." */ + flags |= FLAG_LEFT; + width = (unsigned int) (-arg); + } + else + width = arg; + } + else + { + const FCHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + has_width = 1; + } + + has_precision = 0; + precision = 0; + if (dp->precision_start != dp->precision_end) + { + if (dp->precision_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->precision_arg_index].a.a_int; + /* "A negative precision is taken as if the precision + were omitted." */ + if (arg >= 0) + { + precision = arg; + has_precision = 1; + } + } + else + { + const FCHAR_T *digitp = dp->precision_start + 1; + + precision = 0; + while (digitp != dp->precision_end) + precision = xsum (xtimes (precision, 10), *digitp++ - '0'); + has_precision = 1; + } + } + + /* POSIX specifies the default precision to be 6 for %f, %F, + %e, %E, but not for %g, %G. Implementations appear to use + the same default precision also for %g, %G. But for %a, %A, + the default precision is 0. */ + if (!has_precision) + if (!(dp->conversion == 'a' || dp->conversion == 'A')) + precision = 6; + + /* Allocate a temporary buffer of sufficient size. */ +# if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE + tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); +# elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE + tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); +# elif NEED_PRINTF_LONG_DOUBLE + tmp_length = LDBL_DIG + 1; +# elif NEED_PRINTF_DOUBLE + tmp_length = DBL_DIG + 1; +# else + tmp_length = 0; +# endif + if (tmp_length < precision) + tmp_length = precision; +# if NEED_PRINTF_LONG_DOUBLE +# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE + if (type == TYPE_LONGDOUBLE) +# endif + if (dp->conversion == 'f' || dp->conversion == 'F') + { + long double arg = a.arg[dp->arg_index].a.a_longdouble; + if (!(isnanl (arg) || arg + arg == arg)) + { + /* arg is finite and nonzero. */ + int exponent = floorlog10l (arg < 0 ? -arg : arg); + if (exponent >= 0 && tmp_length < exponent + precision) + tmp_length = exponent + precision; + } + } +# endif +# if NEED_PRINTF_DOUBLE +# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE + if (type == TYPE_DOUBLE) +# endif + if (dp->conversion == 'f' || dp->conversion == 'F') + { + double arg = a.arg[dp->arg_index].a.a_double; + if (!(isnand (arg) || arg + arg == arg)) + { + /* arg is finite and nonzero. */ + int exponent = floorlog10 (arg < 0 ? -arg : arg); + if (exponent >= 0 && tmp_length < exponent + precision) + tmp_length = exponent + precision; + } + } +# endif + /* Account for sign, decimal point etc. */ + tmp_length = xsum (tmp_length, 12); + + if (tmp_length < width) + tmp_length = width; + + tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ + + if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) + tmp = tmpbuf; + else + { + size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); + + if (size_overflow_p (tmp_memsize)) + /* Overflow, would lead to out of memory. */ + goto out_of_memory; + tmp = (DCHAR_T *) malloc (tmp_memsize); + if (tmp == NULL) + /* Out of memory. */ + goto out_of_memory; + } + + pad_ptr = NULL; + p = tmp; + +# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE +# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE + if (type == TYPE_LONGDOUBLE) +# endif + { + long double arg = a.arg[dp->arg_index].a.a_longdouble; + + if (isnanl (arg)) + { + if (dp->conversion >= 'A' && dp->conversion <= 'Z') + { + *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; + } + else + { + *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; + } + } + else + { + int sign = 0; + DECL_LONG_DOUBLE_ROUNDING + + BEGIN_LONG_DOUBLE_ROUNDING (); + + if (signbit (arg)) /* arg < 0.0L or negative zero */ + { + sign = -1; + arg = -arg; + } + + if (sign < 0) + *p++ = '-'; + else if (flags & FLAG_SHOWSIGN) + *p++ = '+'; + else if (flags & FLAG_SPACE) + *p++ = ' '; + + if (arg > 0.0L && arg + arg == arg) + { + if (dp->conversion >= 'A' && dp->conversion <= 'Z') + { + *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; + } + else + { + *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; + } + } + else + { +# if NEED_PRINTF_LONG_DOUBLE + pad_ptr = p; + + if (dp->conversion == 'f' || dp->conversion == 'F') + { + char *digits; + size_t ndigits; + + digits = + scale10_round_decimal_long_double (arg, precision); + if (digits == NULL) + { + END_LONG_DOUBLE_ROUNDING (); + goto out_of_memory; + } + ndigits = strlen (digits); + + if (ndigits > precision) + do + { + --ndigits; + *p++ = digits[ndigits]; + } + while (ndigits > precision); + else + *p++ = '0'; + /* Here ndigits <= precision. */ + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > ndigits; precision--) + *p++ = '0'; + while (ndigits > 0) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + + free (digits); + } + else if (dp->conversion == 'e' || dp->conversion == 'E') + { + int exponent; + + if (arg == 0.0L) + { + exponent = 0; + *p++ = '0'; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > 0; precision--) + *p++ = '0'; + } + } + else + { + /* arg > 0.0L. */ + int adjusted; + char *digits; + size_t ndigits; + + exponent = floorlog10l (arg); + adjusted = 0; + for (;;) + { + digits = + scale10_round_decimal_long_double (arg, + (int)precision - exponent); + if (digits == NULL) + { + END_LONG_DOUBLE_ROUNDING (); + goto out_of_memory; + } + ndigits = strlen (digits); + + if (ndigits == precision + 1) + break; + if (ndigits < precision + || ndigits > precision + 2) + /* The exponent was not guessed + precisely enough. */ + abort (); + if (adjusted) + /* None of two values of exponent is + the right one. Prevent an endless + loop. */ + abort (); + free (digits); + if (ndigits == precision) + exponent -= 1; + else + exponent += 1; + adjusted = 1; + } + /* Here ndigits = precision+1. */ + if (is_borderline (digits, precision)) + { + /* Maybe the exponent guess was too high + and a smaller exponent can be reached + by turning a 10...0 into 9...9x. */ + char *digits2 = + scale10_round_decimal_long_double (arg, + (int)precision - exponent + 1); + if (digits2 == NULL) + { + free (digits); + END_LONG_DOUBLE_ROUNDING (); + goto out_of_memory; + } + if (strlen (digits2) == precision + 1) + { + free (digits); + digits = digits2; + exponent -= 1; + } + else + free (digits2); + } + /* Here ndigits = precision+1. */ + + *p++ = digits[--ndigits]; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + while (ndigits > 0) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + + free (digits); + } + + *p++ = dp->conversion; /* 'e' or 'E' */ +# if WIDE_CHAR_VERSION + { + static const wchar_t decimal_format[] = + { '%', '+', '.', '2', 'd', '\0' }; + SNPRINTF (p, 6 + 1, decimal_format, exponent); + } + while (*p != '\0') + p++; +# else + if (sizeof (DCHAR_T) == 1) + { + sprintf ((char *) p, "%+.2d", exponent); + while (*p != '\0') + p++; + } + else + { + char expbuf[6 + 1]; + const char *ep; + sprintf (expbuf, "%+.2d", exponent); + for (ep = expbuf; (*p = *ep) != '\0'; ep++) + p++; + } +# endif + } + else if (dp->conversion == 'g' || dp->conversion == 'G') + { + if (precision == 0) + precision = 1; + /* precision >= 1. */ + + if (arg == 0.0L) + /* The exponent is 0, >= -4, < precision. + Use fixed-point notation. */ + { + size_t ndigits = precision; + /* Number of trailing zeroes that have to be + dropped. */ + size_t nzeroes = + (flags & FLAG_ALT ? 0 : precision - 1); + + --ndigits; + *p++ = '0'; + if ((flags & FLAG_ALT) || ndigits > nzeroes) + { + *p++ = decimal_point_char (); + while (ndigits > nzeroes) + { + --ndigits; + *p++ = '0'; + } + } + } + else + { + /* arg > 0.0L. */ + int exponent; + int adjusted; + char *digits; + size_t ndigits; + size_t nzeroes; + + exponent = floorlog10l (arg); + adjusted = 0; + for (;;) + { + digits = + scale10_round_decimal_long_double (arg, + (int)(precision - 1) - exponent); + if (digits == NULL) + { + END_LONG_DOUBLE_ROUNDING (); + goto out_of_memory; + } + ndigits = strlen (digits); + + if (ndigits == precision) + break; + if (ndigits < precision - 1 + || ndigits > precision + 1) + /* The exponent was not guessed + precisely enough. */ + abort (); + if (adjusted) + /* None of two values of exponent is + the right one. Prevent an endless + loop. */ + abort (); + free (digits); + if (ndigits < precision) + exponent -= 1; + else + exponent += 1; + adjusted = 1; + } + /* Here ndigits = precision. */ + if (is_borderline (digits, precision - 1)) + { + /* Maybe the exponent guess was too high + and a smaller exponent can be reached + by turning a 10...0 into 9...9x. */ + char *digits2 = + scale10_round_decimal_long_double (arg, + (int)(precision - 1) - exponent + 1); + if (digits2 == NULL) + { + free (digits); + END_LONG_DOUBLE_ROUNDING (); + goto out_of_memory; + } + if (strlen (digits2) == precision) + { + free (digits); + digits = digits2; + exponent -= 1; + } + else + free (digits2); + } + /* Here ndigits = precision. */ + + /* Determine the number of trailing zeroes + that have to be dropped. */ + nzeroes = 0; + if ((flags & FLAG_ALT) == 0) + while (nzeroes < ndigits + && digits[nzeroes] == '0') + nzeroes++; + + /* The exponent is now determined. */ + if (exponent >= -4 + && exponent < (long)precision) + { + /* Fixed-point notation: + max(exponent,0)+1 digits, then the + decimal point, then the remaining + digits without trailing zeroes. */ + if (exponent >= 0) + { + size_t count = exponent + 1; + /* Note: count <= precision = ndigits. */ + for (; count > 0; count--) + *p++ = digits[--ndigits]; + if ((flags & FLAG_ALT) || ndigits > nzeroes) + { + *p++ = decimal_point_char (); + while (ndigits > nzeroes) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + } + else + { + size_t count = -exponent - 1; + *p++ = '0'; + *p++ = decimal_point_char (); + for (; count > 0; count--) + *p++ = '0'; + while (ndigits > nzeroes) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + } + else + { + /* Exponential notation. */ + *p++ = digits[--ndigits]; + if ((flags & FLAG_ALT) || ndigits > nzeroes) + { + *p++ = decimal_point_char (); + while (ndigits > nzeroes) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ +# if WIDE_CHAR_VERSION + { + static const wchar_t decimal_format[] = + { '%', '+', '.', '2', 'd', '\0' }; + SNPRINTF (p, 6 + 1, decimal_format, exponent); + } + while (*p != '\0') + p++; +# else + if (sizeof (DCHAR_T) == 1) + { + sprintf ((char *) p, "%+.2d", exponent); + while (*p != '\0') + p++; + } + else + { + char expbuf[6 + 1]; + const char *ep; + sprintf (expbuf, "%+.2d", exponent); + for (ep = expbuf; (*p = *ep) != '\0'; ep++) + p++; + } +# endif + } + + free (digits); + } + } + else + abort (); +# else + /* arg is finite. */ + if (!(arg == 0.0L)) + abort (); + + pad_ptr = p; + + if (dp->conversion == 'f' || dp->conversion == 'F') + { + *p++ = '0'; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > 0; precision--) + *p++ = '0'; + } + } + else if (dp->conversion == 'e' || dp->conversion == 'E') + { + *p++ = '0'; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > 0; precision--) + *p++ = '0'; + } + *p++ = dp->conversion; /* 'e' or 'E' */ + *p++ = '+'; + *p++ = '0'; + *p++ = '0'; + } + else if (dp->conversion == 'g' || dp->conversion == 'G') + { + *p++ = '0'; + if (flags & FLAG_ALT) + { + size_t ndigits = + (precision > 0 ? precision - 1 : 0); + *p++ = decimal_point_char (); + for (; ndigits > 0; --ndigits) + *p++ = '0'; + } + } + else if (dp->conversion == 'a' || dp->conversion == 'A') + { + *p++ = '0'; + *p++ = dp->conversion - 'A' + 'X'; + pad_ptr = p; + *p++ = '0'; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > 0; precision--) + *p++ = '0'; + } + *p++ = dp->conversion - 'A' + 'P'; + *p++ = '+'; + *p++ = '0'; + } + else + abort (); +# endif + } + + END_LONG_DOUBLE_ROUNDING (); + } + } +# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE + else +# endif +# endif +# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE + { + double arg = a.arg[dp->arg_index].a.a_double; + + if (isnand (arg)) + { + if (dp->conversion >= 'A' && dp->conversion <= 'Z') + { + *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; + } + else + { + *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; + } + } + else + { + int sign = 0; + + if (signbit (arg)) /* arg < 0.0 or negative zero */ + { + sign = -1; + arg = -arg; + } + + if (sign < 0) + *p++ = '-'; + else if (flags & FLAG_SHOWSIGN) + *p++ = '+'; + else if (flags & FLAG_SPACE) + *p++ = ' '; + + if (arg > 0.0 && arg + arg == arg) + { + if (dp->conversion >= 'A' && dp->conversion <= 'Z') + { + *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; + } + else + { + *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; + } + } + else + { +# if NEED_PRINTF_DOUBLE + pad_ptr = p; + + if (dp->conversion == 'f' || dp->conversion == 'F') + { + char *digits; + size_t ndigits; + + digits = + scale10_round_decimal_double (arg, precision); + if (digits == NULL) + goto out_of_memory; + ndigits = strlen (digits); + + if (ndigits > precision) + do + { + --ndigits; + *p++ = digits[ndigits]; + } + while (ndigits > precision); + else + *p++ = '0'; + /* Here ndigits <= precision. */ + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > ndigits; precision--) + *p++ = '0'; + while (ndigits > 0) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + + free (digits); + } + else if (dp->conversion == 'e' || dp->conversion == 'E') + { + int exponent; + + if (arg == 0.0) + { + exponent = 0; + *p++ = '0'; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > 0; precision--) + *p++ = '0'; + } + } + else + { + /* arg > 0.0. */ + int adjusted; + char *digits; + size_t ndigits; + + exponent = floorlog10 (arg); + adjusted = 0; + for (;;) + { + digits = + scale10_round_decimal_double (arg, + (int)precision - exponent); + if (digits == NULL) + goto out_of_memory; + ndigits = strlen (digits); + + if (ndigits == precision + 1) + break; + if (ndigits < precision + || ndigits > precision + 2) + /* The exponent was not guessed + precisely enough. */ + abort (); + if (adjusted) + /* None of two values of exponent is + the right one. Prevent an endless + loop. */ + abort (); + free (digits); + if (ndigits == precision) + exponent -= 1; + else + exponent += 1; + adjusted = 1; + } + /* Here ndigits = precision+1. */ + if (is_borderline (digits, precision)) + { + /* Maybe the exponent guess was too high + and a smaller exponent can be reached + by turning a 10...0 into 9...9x. */ + char *digits2 = + scale10_round_decimal_double (arg, + (int)precision - exponent + 1); + if (digits2 == NULL) + { + free (digits); + goto out_of_memory; + } + if (strlen (digits2) == precision + 1) + { + free (digits); + digits = digits2; + exponent -= 1; + } + else + free (digits2); + } + /* Here ndigits = precision+1. */ + + *p++ = digits[--ndigits]; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + while (ndigits > 0) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + + free (digits); + } + + *p++ = dp->conversion; /* 'e' or 'E' */ +# if WIDE_CHAR_VERSION + { + static const wchar_t decimal_format[] = + /* Produce the same number of exponent digits + as the native printf implementation. */ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + { '%', '+', '.', '3', 'd', '\0' }; +# else + { '%', '+', '.', '2', 'd', '\0' }; +# endif + SNPRINTF (p, 6 + 1, decimal_format, exponent); + } + while (*p != '\0') + p++; +# else + { + static const char decimal_format[] = + /* Produce the same number of exponent digits + as the native printf implementation. */ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + "%+.3d"; +# else + "%+.2d"; +# endif + if (sizeof (DCHAR_T) == 1) + { + sprintf ((char *) p, decimal_format, exponent); + while (*p != '\0') + p++; + } + else + { + char expbuf[6 + 1]; + const char *ep; + sprintf (expbuf, decimal_format, exponent); + for (ep = expbuf; (*p = *ep) != '\0'; ep++) + p++; + } + } +# endif + } + else if (dp->conversion == 'g' || dp->conversion == 'G') + { + if (precision == 0) + precision = 1; + /* precision >= 1. */ + + if (arg == 0.0) + /* The exponent is 0, >= -4, < precision. + Use fixed-point notation. */ + { + size_t ndigits = precision; + /* Number of trailing zeroes that have to be + dropped. */ + size_t nzeroes = + (flags & FLAG_ALT ? 0 : precision - 1); + + --ndigits; + *p++ = '0'; + if ((flags & FLAG_ALT) || ndigits > nzeroes) + { + *p++ = decimal_point_char (); + while (ndigits > nzeroes) + { + --ndigits; + *p++ = '0'; + } + } + } + else + { + /* arg > 0.0. */ + int exponent; + int adjusted; + char *digits; + size_t ndigits; + size_t nzeroes; + + exponent = floorlog10 (arg); + adjusted = 0; + for (;;) + { + digits = + scale10_round_decimal_double (arg, + (int)(precision - 1) - exponent); + if (digits == NULL) + goto out_of_memory; + ndigits = strlen (digits); + + if (ndigits == precision) + break; + if (ndigits < precision - 1 + || ndigits > precision + 1) + /* The exponent was not guessed + precisely enough. */ + abort (); + if (adjusted) + /* None of two values of exponent is + the right one. Prevent an endless + loop. */ + abort (); + free (digits); + if (ndigits < precision) + exponent -= 1; + else + exponent += 1; + adjusted = 1; + } + /* Here ndigits = precision. */ + if (is_borderline (digits, precision - 1)) + { + /* Maybe the exponent guess was too high + and a smaller exponent can be reached + by turning a 10...0 into 9...9x. */ + char *digits2 = + scale10_round_decimal_double (arg, + (int)(precision - 1) - exponent + 1); + if (digits2 == NULL) + { + free (digits); + goto out_of_memory; + } + if (strlen (digits2) == precision) + { + free (digits); + digits = digits2; + exponent -= 1; + } + else + free (digits2); + } + /* Here ndigits = precision. */ + + /* Determine the number of trailing zeroes + that have to be dropped. */ + nzeroes = 0; + if ((flags & FLAG_ALT) == 0) + while (nzeroes < ndigits + && digits[nzeroes] == '0') + nzeroes++; + + /* The exponent is now determined. */ + if (exponent >= -4 + && exponent < (long)precision) + { + /* Fixed-point notation: + max(exponent,0)+1 digits, then the + decimal point, then the remaining + digits without trailing zeroes. */ + if (exponent >= 0) + { + size_t count = exponent + 1; + /* Note: count <= precision = ndigits. */ + for (; count > 0; count--) + *p++ = digits[--ndigits]; + if ((flags & FLAG_ALT) || ndigits > nzeroes) + { + *p++ = decimal_point_char (); + while (ndigits > nzeroes) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + } + else + { + size_t count = -exponent - 1; + *p++ = '0'; + *p++ = decimal_point_char (); + for (; count > 0; count--) + *p++ = '0'; + while (ndigits > nzeroes) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + } + else + { + /* Exponential notation. */ + *p++ = digits[--ndigits]; + if ((flags & FLAG_ALT) || ndigits > nzeroes) + { + *p++ = decimal_point_char (); + while (ndigits > nzeroes) + { + --ndigits; + *p++ = digits[ndigits]; + } + } + *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ +# if WIDE_CHAR_VERSION + { + static const wchar_t decimal_format[] = + /* Produce the same number of exponent digits + as the native printf implementation. */ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + { '%', '+', '.', '3', 'd', '\0' }; +# else + { '%', '+', '.', '2', 'd', '\0' }; +# endif + SNPRINTF (p, 6 + 1, decimal_format, exponent); + } + while (*p != '\0') + p++; +# else + { + static const char decimal_format[] = + /* Produce the same number of exponent digits + as the native printf implementation. */ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + "%+.3d"; +# else + "%+.2d"; +# endif + if (sizeof (DCHAR_T) == 1) + { + sprintf ((char *) p, decimal_format, exponent); + while (*p != '\0') + p++; + } + else + { + char expbuf[6 + 1]; + const char *ep; + sprintf (expbuf, decimal_format, exponent); + for (ep = expbuf; (*p = *ep) != '\0'; ep++) + p++; + } + } +# endif + } + + free (digits); + } + } + else + abort (); +# else + /* arg is finite. */ + if (!(arg == 0.0)) + abort (); + + pad_ptr = p; + + if (dp->conversion == 'f' || dp->conversion == 'F') + { + *p++ = '0'; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > 0; precision--) + *p++ = '0'; + } + } + else if (dp->conversion == 'e' || dp->conversion == 'E') + { + *p++ = '0'; + if ((flags & FLAG_ALT) || precision > 0) + { + *p++ = decimal_point_char (); + for (; precision > 0; precision--) + *p++ = '0'; + } + *p++ = dp->conversion; /* 'e' or 'E' */ + *p++ = '+'; + /* Produce the same number of exponent digits as + the native printf implementation. */ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + *p++ = '0'; +# endif + *p++ = '0'; + *p++ = '0'; + } + else if (dp->conversion == 'g' || dp->conversion == 'G') + { + *p++ = '0'; + if (flags & FLAG_ALT) + { + size_t ndigits = + (precision > 0 ? precision - 1 : 0); + *p++ = decimal_point_char (); + for (; ndigits > 0; --ndigits) + *p++ = '0'; + } + } + else + abort (); +# endif + } + } + } +# endif + + /* The generated string now extends from tmp to p, with the + zero padding insertion point being at pad_ptr. */ + if (has_width && p - tmp < width) + { + size_t pad = width - (p - tmp); + DCHAR_T *end = p + pad; + + if (flags & FLAG_LEFT) + { + /* Pad with spaces on the right. */ + for (; pad > 0; pad--) + *p++ = ' '; + } + else if ((flags & FLAG_ZERO) && pad_ptr != NULL) + { + /* Pad with zeroes. */ + DCHAR_T *q = end; + + while (p > pad_ptr) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = '0'; + } + else + { + /* Pad with spaces on the left. */ + DCHAR_T *q = end; + + while (p > tmp) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = ' '; + } + + p = end; + } + + { + size_t count = p - tmp; + + if (count >= tmp_length) + /* tmp_length was incorrectly calculated - fix the + code above! */ + abort (); + + /* Make room for the result. */ + if (count >= allocated - length) + { + size_t n = xsum (length, count); + + ENSURE_ALLOCATION (n); + } + + /* Append the result. */ + memcpy (result + length, tmp, count * sizeof (DCHAR_T)); + if (tmp != tmpbuf) + free (tmp); + length += count; + } + } +#endif + else + { + arg_type type = a.arg[dp->arg_index].type; + int flags = dp->flags; +#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION + int has_width; + size_t width; +#endif +#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION + int has_precision; + size_t precision; +#endif +#if NEED_PRINTF_UNBOUNDED_PRECISION + int prec_ourselves; +#else +# define prec_ourselves 0 +#endif +#if NEED_PRINTF_FLAG_LEFTADJUST +# define pad_ourselves 1 +#elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION + int pad_ourselves; +#else +# define pad_ourselves 0 +#endif + TCHAR_T *fbp; + unsigned int prefix_count; + int prefixes[2] IF_LINT (= { 0 }); + int orig_errno; +#if !USE_SNPRINTF + size_t tmp_length; + TCHAR_T tmpbuf[700]; + TCHAR_T *tmp; +#endif + +#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION + has_width = 0; + width = 0; + if (dp->width_start != dp->width_end) + { + if (dp->width_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->width_arg_index].a.a_int; + if (arg < 0) + { + /* "A negative field width is taken as a '-' flag + followed by a positive field width." */ + flags |= FLAG_LEFT; + width = (unsigned int) (-arg); + } + else + width = arg; + } + else + { + const FCHAR_T *digitp = dp->width_start; + + do + width = xsum (xtimes (width, 10), *digitp++ - '0'); + while (digitp != dp->width_end); + } + has_width = 1; + } +#endif + +#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION + has_precision = 0; + precision = 6; + if (dp->precision_start != dp->precision_end) + { + if (dp->precision_arg_index != ARG_NONE) + { + int arg; + + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + arg = a.arg[dp->precision_arg_index].a.a_int; + /* "A negative precision is taken as if the precision + were omitted." */ + if (arg >= 0) + { + precision = arg; + has_precision = 1; + } + } + else + { + const FCHAR_T *digitp = dp->precision_start + 1; + + precision = 0; + while (digitp != dp->precision_end) + precision = xsum (xtimes (precision, 10), *digitp++ - '0'); + has_precision = 1; + } + } +#endif + + /* Decide whether to handle the precision ourselves. */ +#if NEED_PRINTF_UNBOUNDED_PRECISION + switch (dp->conversion) + { + case 'd': case 'i': case 'u': + case 'o': + case 'x': case 'X': case 'p': + prec_ourselves = has_precision && (precision > 0); + break; + default: + prec_ourselves = 0; + break; + } +#endif + + /* Decide whether to perform the padding ourselves. */ +#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION) + switch (dp->conversion) + { +# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO + /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need + to perform the padding after this conversion. Functions + with unistdio extensions perform the padding based on + character count rather than element count. */ + case 'c': case 's': +# endif +# if NEED_PRINTF_FLAG_ZERO + case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': + case 'a': case 'A': +# endif + pad_ourselves = 1; + break; + default: + pad_ourselves = prec_ourselves; + break; + } +#endif + +#if !USE_SNPRINTF + /* Allocate a temporary buffer of sufficient size for calling + sprintf. */ + tmp_length = + MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type, + flags, width, has_precision, precision, + pad_ourselves); + + if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) + tmp = tmpbuf; + else + { + size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); + + if (size_overflow_p (tmp_memsize)) + /* Overflow, would lead to out of memory. */ + goto out_of_memory; + tmp = (TCHAR_T *) malloc (tmp_memsize); + if (tmp == NULL) + /* Out of memory. */ + goto out_of_memory; + } +#endif + + /* Construct the format string for calling snprintf or + sprintf. */ + fbp = buf; + *fbp++ = '%'; +#if NEED_PRINTF_FLAG_GROUPING + /* The underlying implementation doesn't support the ' flag. + Produce no grouping characters in this case; this is + acceptable because the grouping is locale dependent. */ +#else + if (flags & FLAG_GROUP) + *fbp++ = '\''; +#endif + if (flags & FLAG_LEFT) + *fbp++ = '-'; + if (flags & FLAG_SHOWSIGN) + *fbp++ = '+'; + if (flags & FLAG_SPACE) + *fbp++ = ' '; + if (flags & FLAG_ALT) + *fbp++ = '#'; +#if __GLIBC__ >= 2 && !defined __UCLIBC__ + if (flags & FLAG_LOCALIZED) + *fbp++ = 'I'; +#endif + if (!pad_ourselves) + { + if (flags & FLAG_ZERO) + *fbp++ = '0'; + if (dp->width_start != dp->width_end) + { + size_t n = dp->width_end - dp->width_start; + /* The width specification is known to consist only + of standard ASCII characters. */ + if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) + { + memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); + fbp += n; + } + else + { + const FCHAR_T *mp = dp->width_start; + do + *fbp++ = (unsigned char) *mp++; + while (--n > 0); + } + } + } + if (!prec_ourselves) + { + if (dp->precision_start != dp->precision_end) + { + size_t n = dp->precision_end - dp->precision_start; + /* The precision specification is known to consist only + of standard ASCII characters. */ + if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) + { + memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); + fbp += n; + } + else + { + const FCHAR_T *mp = dp->precision_start; + do + *fbp++ = (unsigned char) *mp++; + while (--n > 0); + } + } + } + + switch (type) + { +#if HAVE_LONG_LONG_INT + case TYPE_LONGLONGINT: + case TYPE_ULONGLONGINT: +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + *fbp++ = 'I'; + *fbp++ = '6'; + *fbp++ = '4'; + break; +# else + *fbp++ = 'l'; + /*FALLTHROUGH*/ +# endif +#endif + case TYPE_LONGINT: + case TYPE_ULONGINT: +#if HAVE_WINT_T + case TYPE_WIDE_CHAR: +#endif +#if HAVE_WCHAR_T + case TYPE_WIDE_STRING: +#endif + *fbp++ = 'l'; + break; + case TYPE_LONGDOUBLE: + *fbp++ = 'L'; + break; + default: + break; + } +#if NEED_PRINTF_DIRECTIVE_F + if (dp->conversion == 'F') + *fbp = 'f'; + else +#endif + *fbp = dp->conversion; +#if USE_SNPRINTF +# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + fbp[1] = '%'; + fbp[2] = 'n'; + fbp[3] = '\0'; +# else + /* On glibc2 systems from glibc >= 2.3 - probably also older + ones - we know that snprintf's return value conforms to + ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and + gl_SNPRINTF_TRUNCATION_C99 pass. + Therefore we can avoid using %n in this situation. + On glibc2 systems from 2004-10-18 or newer, the use of %n + in format strings in writable memory may crash the program + (if compiled with _FORTIFY_SOURCE=2), so we should avoid it + in this situation. */ + /* On native Windows systems (such as mingw), we can avoid using + %n because: + - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, + snprintf does not write more than the specified number + of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes + '4', '5', '6' into buf, not '4', '5', '\0'.) + - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf + allows us to recognize the case of an insufficient + buffer size: it returns -1 in this case. + On native Windows systems (such as mingw) where the OS is + Windows Vista, the use of %n in format strings by default + crashes the program. See + and + + So we should avoid %n in this situation. */ + fbp[1] = '\0'; +# endif +#else + fbp[1] = '\0'; +#endif + + /* Construct the arguments for calling snprintf or sprintf. */ + prefix_count = 0; + if (!pad_ourselves && dp->width_arg_index != ARG_NONE) + { + if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) + abort (); + prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; + } + if (!prec_ourselves && dp->precision_arg_index != ARG_NONE) + { + if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) + abort (); + prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; + } + +#if USE_SNPRINTF + /* The SNPRINTF result is appended after result[0..length]. + The latter is an array of DCHAR_T; SNPRINTF appends an + array of TCHAR_T to it. This is possible because + sizeof (TCHAR_T) divides sizeof (DCHAR_T) and + alignof (TCHAR_T) <= alignof (DCHAR_T). */ +# define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) + /* Ensure that maxlen below will be >= 2. Needed on BeOS, + where an snprintf() with maxlen==1 acts like sprintf(). */ + ENSURE_ALLOCATION (xsum (length, + (2 + TCHARS_PER_DCHAR - 1) + / TCHARS_PER_DCHAR)); + /* Prepare checking whether snprintf returns the count + via %n. */ + *(TCHAR_T *) (result + length) = '\0'; +#endif + + orig_errno = errno; + + for (;;) + { + int count = -1; + +#if USE_SNPRINTF + int retcount = 0; + size_t maxlen = allocated - length; + /* SNPRINTF can fail if its second argument is + > INT_MAX. */ + if (maxlen > INT_MAX / TCHARS_PER_DCHAR) + maxlen = INT_MAX / TCHARS_PER_DCHAR; + maxlen = maxlen * TCHARS_PER_DCHAR; +# define SNPRINTF_BUF(arg) \ + switch (prefix_count) \ + { \ + case 0: \ + retcount = SNPRINTF ((TCHAR_T *) (result + length), \ + maxlen, buf, \ + arg, &count); \ + break; \ + case 1: \ + retcount = SNPRINTF ((TCHAR_T *) (result + length), \ + maxlen, buf, \ + prefixes[0], arg, &count); \ + break; \ + case 2: \ + retcount = SNPRINTF ((TCHAR_T *) (result + length), \ + maxlen, buf, \ + prefixes[0], prefixes[1], arg, \ + &count); \ + break; \ + default: \ + abort (); \ + } +#else +# define SNPRINTF_BUF(arg) \ + switch (prefix_count) \ + { \ + case 0: \ + count = sprintf (tmp, buf, arg); \ + break; \ + case 1: \ + count = sprintf (tmp, buf, prefixes[0], arg); \ + break; \ + case 2: \ + count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ + arg); \ + break; \ + default: \ + abort (); \ + } +#endif + + errno = 0; + switch (type) + { + case TYPE_SCHAR: + { + int arg = a.arg[dp->arg_index].a.a_schar; + SNPRINTF_BUF (arg); + } + break; + case TYPE_UCHAR: + { + unsigned int arg = a.arg[dp->arg_index].a.a_uchar; + SNPRINTF_BUF (arg); + } + break; + case TYPE_SHORT: + { + int arg = a.arg[dp->arg_index].a.a_short; + SNPRINTF_BUF (arg); + } + break; + case TYPE_USHORT: + { + unsigned int arg = a.arg[dp->arg_index].a.a_ushort; + SNPRINTF_BUF (arg); + } + break; + case TYPE_INT: + { + int arg = a.arg[dp->arg_index].a.a_int; + SNPRINTF_BUF (arg); + } + break; + case TYPE_UINT: + { + unsigned int arg = a.arg[dp->arg_index].a.a_uint; + SNPRINTF_BUF (arg); + } + break; + case TYPE_LONGINT: + { + long int arg = a.arg[dp->arg_index].a.a_longint; + SNPRINTF_BUF (arg); + } + break; + case TYPE_ULONGINT: + { + unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; + SNPRINTF_BUF (arg); + } + break; +#if HAVE_LONG_LONG_INT + case TYPE_LONGLONGINT: + { + long long int arg = a.arg[dp->arg_index].a.a_longlongint; + SNPRINTF_BUF (arg); + } + break; + case TYPE_ULONGLONGINT: + { + unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; + SNPRINTF_BUF (arg); + } + break; +#endif + case TYPE_DOUBLE: + { + double arg = a.arg[dp->arg_index].a.a_double; + SNPRINTF_BUF (arg); + } + break; + case TYPE_LONGDOUBLE: + { + long double arg = a.arg[dp->arg_index].a.a_longdouble; + SNPRINTF_BUF (arg); + } + break; + case TYPE_CHAR: + { + int arg = a.arg[dp->arg_index].a.a_char; + SNPRINTF_BUF (arg); + } + break; +#if HAVE_WINT_T + case TYPE_WIDE_CHAR: + { + wint_t arg = a.arg[dp->arg_index].a.a_wide_char; + SNPRINTF_BUF (arg); + } + break; +#endif + case TYPE_STRING: + { + const char *arg = a.arg[dp->arg_index].a.a_string; + SNPRINTF_BUF (arg); + } + break; +#if HAVE_WCHAR_T + case TYPE_WIDE_STRING: + { + const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; + SNPRINTF_BUF (arg); + } + break; +#endif + case TYPE_POINTER: + { + void *arg = a.arg[dp->arg_index].a.a_pointer; + SNPRINTF_BUF (arg); + } + break; + default: + abort (); + } + +#if USE_SNPRINTF + /* Portability: Not all implementations of snprintf() + are ISO C 99 compliant. Determine the number of + bytes that snprintf() has produced or would have + produced. */ + if (count >= 0) + { + /* Verify that snprintf() has NUL-terminated its + result. */ + if (count < maxlen + && ((TCHAR_T *) (result + length)) [count] != '\0') + abort (); + /* Portability hack. */ + if (retcount > count) + count = retcount; + } + else + { + /* snprintf() doesn't understand the '%n' + directive. */ + if (fbp[1] != '\0') + { + /* Don't use the '%n' directive; instead, look + at the snprintf() return value. */ + fbp[1] = '\0'; + continue; + } + else + { + /* Look at the snprintf() return value. */ + if (retcount < 0) + { +# if !HAVE_SNPRINTF_RETVAL_C99 + /* HP-UX 10.20 snprintf() is doubly deficient: + It doesn't understand the '%n' directive, + *and* it returns -1 (rather than the length + that would have been required) when the + buffer is too small. + But a failure at this point can also come + from other reasons than a too small buffer, + such as an invalid wide string argument to + the %ls directive, or possibly an invalid + floating-point argument. */ + size_t tmp_length = + MAX_ROOM_NEEDED (&a, dp->arg_index, + dp->conversion, type, flags, + has_width ? width : 0, + has_precision, + precision, pad_ourselves); + + if (maxlen < tmp_length) + { + /* Make more room. But try to do through + this reallocation only once. */ + size_t bigger_need = + xsum (length, + xsum (tmp_length, + TCHARS_PER_DCHAR - 1) + / TCHARS_PER_DCHAR); + /* And always grow proportionally. + (There may be several arguments, each + needing a little more room than the + previous one.) */ + size_t bigger_need2 = + xsum (xtimes (allocated, 2), 12); + if (bigger_need < bigger_need2) + bigger_need = bigger_need2; + ENSURE_ALLOCATION (bigger_need); + continue; + } +# endif + } + else + count = retcount; + } + } +#endif + + /* Attempt to handle failure. */ + if (count < 0) + { + /* SNPRINTF or sprintf failed. Save and use the errno + that it has set, if any. */ + int saved_errno = errno; + + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = + (saved_errno != 0 + ? saved_errno + : (dp->conversion == 'c' || dp->conversion == 's' + ? EILSEQ + : EINVAL)); + return NULL; + } + +#if USE_SNPRINTF + /* Handle overflow of the allocated buffer. + If such an overflow occurs, a C99 compliant snprintf() + returns a count >= maxlen. However, a non-compliant + snprintf() function returns only count = maxlen - 1. To + cover both cases, test whether count >= maxlen - 1. */ + if ((unsigned int) count + 1 >= maxlen) + { + /* If maxlen already has attained its allowed maximum, + allocating more memory will not increase maxlen. + Instead of looping, bail out. */ + if (maxlen == INT_MAX / TCHARS_PER_DCHAR) + goto overflow; + else + { + /* Need at least (count + 1) * sizeof (TCHAR_T) + bytes. (The +1 is for the trailing NUL.) + But ask for (count + 2) * sizeof (TCHAR_T) + bytes, so that in the next round, we likely get + maxlen > (unsigned int) count + 1 + and so we don't get here again. + And allocate proportionally, to avoid looping + eternally if snprintf() reports a too small + count. */ + size_t n = + xmax (xsum (length, + ((unsigned int) count + 2 + + TCHARS_PER_DCHAR - 1) + / TCHARS_PER_DCHAR), + xtimes (allocated, 2)); + + ENSURE_ALLOCATION (n); + continue; + } + } +#endif + +#if NEED_PRINTF_UNBOUNDED_PRECISION + if (prec_ourselves) + { + /* Handle the precision. */ + TCHAR_T *prec_ptr = +# if USE_SNPRINTF + (TCHAR_T *) (result + length); +# else + tmp; +# endif + size_t prefix_count; + size_t move; + + prefix_count = 0; + /* Put the additional zeroes after the sign. */ + if (count >= 1 + && (*prec_ptr == '-' || *prec_ptr == '+' + || *prec_ptr == ' ')) + prefix_count = 1; + /* Put the additional zeroes after the 0x prefix if + (flags & FLAG_ALT) || (dp->conversion == 'p'). */ + else if (count >= 2 + && prec_ptr[0] == '0' + && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X')) + prefix_count = 2; + + move = count - prefix_count; + if (precision > move) + { + /* Insert zeroes. */ + size_t insert = precision - move; + TCHAR_T *prec_end; + +# if USE_SNPRINTF + size_t n = + xsum (length, + (count + insert + TCHARS_PER_DCHAR - 1) + / TCHARS_PER_DCHAR); + length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; + ENSURE_ALLOCATION (n); + length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; + prec_ptr = (TCHAR_T *) (result + length); +# endif + + prec_end = prec_ptr + count; + prec_ptr += prefix_count; + + while (prec_end > prec_ptr) + { + prec_end--; + prec_end[insert] = prec_end[0]; + } + + prec_end += insert; + do + *--prec_end = '0'; + while (prec_end > prec_ptr); + + count += insert; + } + } +#endif + +#if !USE_SNPRINTF + if (count >= tmp_length) + /* tmp_length was incorrectly calculated - fix the + code above! */ + abort (); +#endif + +#if !DCHAR_IS_TCHAR + /* Convert from TCHAR_T[] to DCHAR_T[]. */ + if (dp->conversion == 'c' || dp->conversion == 's') + { + /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING + TYPE_WIDE_STRING. + The result string is not certainly ASCII. */ + const TCHAR_T *tmpsrc; + DCHAR_T *tmpdst; + size_t tmpdst_len; + /* This code assumes that TCHAR_T is 'char'. */ + verify (sizeof (TCHAR_T) == 1); +# if USE_SNPRINTF + tmpsrc = (TCHAR_T *) (result + length); +# else + tmpsrc = tmp; +# endif + tmpdst = + DCHAR_CONV_FROM_ENCODING (locale_charset (), + iconveh_question_mark, + tmpsrc, count, + NULL, + NULL, &tmpdst_len); + if (tmpdst == NULL) + { + int saved_errno = errno; + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = saved_errno; + return NULL; + } + ENSURE_ALLOCATION (xsum (length, tmpdst_len)); + DCHAR_CPY (result + length, tmpdst, tmpdst_len); + free (tmpdst); + count = tmpdst_len; + } + else + { + /* The result string is ASCII. + Simple 1:1 conversion. */ +# if USE_SNPRINTF + /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a + no-op conversion, in-place on the array starting + at (result + length). */ + if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) +# endif + { + const TCHAR_T *tmpsrc; + DCHAR_T *tmpdst; + size_t n; + +# if USE_SNPRINTF + if (result == resultbuf) + { + tmpsrc = (TCHAR_T *) (result + length); + /* ENSURE_ALLOCATION will not move tmpsrc + (because it's part of resultbuf). */ + ENSURE_ALLOCATION (xsum (length, count)); + } + else + { + /* ENSURE_ALLOCATION will move the array + (because it uses realloc(). */ + ENSURE_ALLOCATION (xsum (length, count)); + tmpsrc = (TCHAR_T *) (result + length); + } +# else + tmpsrc = tmp; + ENSURE_ALLOCATION (xsum (length, count)); +# endif + tmpdst = result + length; + /* Copy backwards, because of overlapping. */ + tmpsrc += count; + tmpdst += count; + for (n = count; n > 0; n--) + *--tmpdst = (unsigned char) *--tmpsrc; + } + } +#endif + +#if DCHAR_IS_TCHAR && !USE_SNPRINTF + /* Make room for the result. */ + if (count > allocated - length) + { + /* Need at least count elements. But allocate + proportionally. */ + size_t n = + xmax (xsum (length, count), xtimes (allocated, 2)); + + ENSURE_ALLOCATION (n); + } +#endif + + /* Here count <= allocated - length. */ + + /* Perform padding. */ +#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION + if (pad_ourselves && has_width) + { + size_t w; +# if ENABLE_UNISTDIO + /* Outside POSIX, it's preferable to compare the width + against the number of _characters_ of the converted + value. */ + w = DCHAR_MBSNLEN (result + length, count); +# else + /* The width is compared against the number of _bytes_ + of the converted value, says POSIX. */ + w = count; +# endif + if (w < width) + { + size_t pad = width - w; + + /* Make room for the result. */ + if (xsum (count, pad) > allocated - length) + { + /* Need at least count + pad elements. But + allocate proportionally. */ + size_t n = + xmax (xsum3 (length, count, pad), + xtimes (allocated, 2)); + +# if USE_SNPRINTF + length += count; + ENSURE_ALLOCATION (n); + length -= count; +# else + ENSURE_ALLOCATION (n); +# endif + } + /* Here count + pad <= allocated - length. */ + + { +# if !DCHAR_IS_TCHAR || USE_SNPRINTF + DCHAR_T * const rp = result + length; +# else + DCHAR_T * const rp = tmp; +# endif + DCHAR_T *p = rp + count; + DCHAR_T *end = p + pad; + DCHAR_T *pad_ptr; +# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO + if (dp->conversion == 'c' + || dp->conversion == 's') + /* No zero-padding for string directives. */ + pad_ptr = NULL; + else +# endif + { + pad_ptr = (*rp == '-' ? rp + 1 : rp); + /* No zero-padding of "inf" and "nan". */ + if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') + || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) + pad_ptr = NULL; + } + /* The generated string now extends from rp to p, + with the zero padding insertion point being at + pad_ptr. */ + + count = count + pad; /* = end - rp */ + + if (flags & FLAG_LEFT) + { + /* Pad with spaces on the right. */ + for (; pad > 0; pad--) + *p++ = ' '; + } + else if ((flags & FLAG_ZERO) && pad_ptr != NULL) + { + /* Pad with zeroes. */ + DCHAR_T *q = end; + + while (p > pad_ptr) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = '0'; + } + else + { + /* Pad with spaces on the left. */ + DCHAR_T *q = end; + + while (p > rp) + *--q = *--p; + for (; pad > 0; pad--) + *p++ = ' '; + } + } + } + } +#endif + + /* Here still count <= allocated - length. */ + +#if !DCHAR_IS_TCHAR || USE_SNPRINTF + /* The snprintf() result did fit. */ +#else + /* Append the sprintf() result. */ + memcpy (result + length, tmp, count * sizeof (DCHAR_T)); +#endif +#if !USE_SNPRINTF + if (tmp != tmpbuf) + free (tmp); +#endif + +#if NEED_PRINTF_DIRECTIVE_F + if (dp->conversion == 'F') + { + /* Convert the %f result to upper case for %F. */ + DCHAR_T *rp = result + length; + size_t rc; + for (rc = count; rc > 0; rc--, rp++) + if (*rp >= 'a' && *rp <= 'z') + *rp = *rp - 'a' + 'A'; + } +#endif + + length += count; + break; + } + errno = orig_errno; +#undef pad_ourselves +#undef prec_ourselves + } + } + } + + /* Add the final NUL. */ + ENSURE_ALLOCATION (xsum (length, 1)); + result[length] = '\0'; + + if (result != resultbuf && length + 1 < allocated) + { + /* Shrink the allocated memory if possible. */ + DCHAR_T *memory; + + memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); + if (memory != NULL) + result = memory; + } + + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + *lengthp = length; + /* Note that we can produce a big string of a length > INT_MAX. POSIX + says that snprintf() fails with errno = EOVERFLOW in this case, but + that's only because snprintf() returns an 'int'. This function does + not have this limitation. */ + return result; + +#if USE_SNPRINTF + overflow: + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + CLEANUP (); + errno = EOVERFLOW; + return NULL; +#endif + + out_of_memory: + if (!(result == resultbuf || result == NULL)) + free (result); + if (buf_malloced != NULL) + free (buf_malloced); + out_of_memory_1: + CLEANUP (); + errno = ENOMEM; + return NULL; + } +} + +#undef MAX_ROOM_NEEDED +#undef TCHARS_PER_DCHAR +#undef SNPRINTF +#undef USE_SNPRINTF +#undef DCHAR_SET +#undef DCHAR_CPY +#undef PRINTF_PARSE +#undef DIRECTIVES +#undef DIRECTIVE +#undef DCHAR_IS_TCHAR +#undef TCHAR_T +#undef DCHAR_T +#undef FCHAR_T +#undef VASNPRINTF diff --git a/gl/lib/vasnprintf.h b/gl/lib/vasnprintf.h new file mode 100644 index 0000000..daa946d --- /dev/null +++ b/gl/lib/vasnprintf.h @@ -0,0 +1,79 @@ +/* vsprintf with automatic memory allocation. + Copyright (C) 2002-2004, 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#ifndef _VASNPRINTF_H +#define _VASNPRINTF_H + +/* Get va_list. */ +#include + +/* Get size_t. */ +#include + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The __-protected variants of the attributes 'format' and 'printf' are + accepted by gcc versions 2.6.4 (effectively 2.7) and later. + We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because + gnulib and libintl do '#define printf __printf__' when they override + the 'printf' function. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) +#else +# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Write formatted output to a string dynamically allocated with malloc(). + You can pass a preallocated buffer for the result in RESULTBUF and its + size in *LENGTHP; otherwise you pass RESULTBUF = NULL. + If successful, return the address of the string (this may be = RESULTBUF + if no dynamic memory allocation was necessary) and set *LENGTHP to the + number of resulting bytes, excluding the trailing NUL. Upon error, set + errno and return NULL. + + When dynamic memory allocation occurs, the preallocated buffer is left + alone (with possibly modified contents). This makes it possible to use + a statically allocated or stack-allocated buffer, like this: + + char buf[100]; + size_t len = sizeof (buf); + char *output = vasnprintf (buf, &len, format, args); + if (output == NULL) + ... error handling ...; + else + { + ... use the output string ...; + if (output != buf) + free (output); + } + */ +#if REPLACE_VASNPRINTF +# define asnprintf rpl_asnprintf +# define vasnprintf rpl_vasnprintf +#endif +extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) + _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); +extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) + _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0)); + +#ifdef __cplusplus +} +#endif + +#endif /* _VASNPRINTF_H */ diff --git a/gl/lib/verify.h b/gl/lib/verify.h new file mode 100644 index 0000000..a25e514 --- /dev/null +++ b/gl/lib/verify.h @@ -0,0 +1,279 @@ +/* Compile-time assert-like macros. + + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ + +#ifndef _GL_VERIFY_H +#define _GL_VERIFY_H + + +/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. + This is supported by GCC 4.6.0 and later, in C mode, and its use + here generates easier-to-read diagnostics when verify (R) fails. + + Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. + This will likely be supported by future GCC versions, in C++ mode. + + Use this only with GCC. If we were willing to slow 'configure' + down we could also use it with other compilers, but since this + affects only the quality of diagnostics, why bother? */ +#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ + && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ + && !defined __cplusplus) +# define _GL_HAVE__STATIC_ASSERT 1 +#endif +/* The condition (99 < __GNUC__) is temporary, until we know about the + first G++ release that supports static_assert. */ +#if (99 < __GNUC__) && defined __cplusplus +# define _GL_HAVE_STATIC_ASSERT 1 +#endif + +/* FreeBSD 9.1 , included by and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE_STATIC_ASSERT +# include +# undef _Static_assert +#endif + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + If _Static_assert works, verify (R) uses it directly. Similarly, + _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct + that is an operand of sizeof. + + The code below uses several ideas for C++ compilers, and for C + compilers that do not support _Static_assert: + + * The first step is ((R) ? 1 : -1). Given an expression R, of + integral or boolean or floating-point type, this yields an + expression of integral type, whose value is later verified to be + constant and nonnegative. + + * Next this expression W is wrapped in a type + struct _gl_verify_type { + unsigned int _gl_verify_error_if_negative: W; + }. + If W is negative, this yields a compile-time error. No compiler can + deal with a bit-field of negative size. + + One might think that an array size check would have the same + effect, that is, that the type struct { unsigned int dummy[W]; } + would work as well. However, inside a function, some compilers + (such as C++ compilers and GNU C) allow local parameters and + variables inside array size expressions. With these compilers, + an array size check would not properly diagnose this misuse of + the verify macro: + + void function (int n) { verify (n < 0); } + + * For the verify macro, the struct _gl_verify_type will need to + somehow be embedded into a declaration. To be portable, this + declaration must declare an object, a constant, a function, or a + typedef name. If the declared entity uses the type directly, + such as in + + struct dummy {...}; + typedef struct {...} dummy; + extern struct {...} *dummy; + extern void dummy (struct {...} *); + extern struct {...} *dummy (void); + + two uses of the verify macro would yield colliding declarations + if the entity names are not disambiguated. A workaround is to + attach the current line number to the entity name: + + #define _GL_CONCAT0(x, y) x##y + #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) + extern struct {...} * _GL_CONCAT (dummy, __LINE__); + + But this has the problem that two invocations of verify from + within the same macro would collide, since the __LINE__ value + would be the same for both invocations. (The GCC __COUNTER__ + macro solves this problem, but is not portable.) + + A solution is to use the sizeof operator. It yields a number, + getting rid of the identity of the type. Declarations like + + extern int dummy [sizeof (struct {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + + can be repeated. + + * Should the implementation use a named struct or an unnamed struct? + Which of the following alternatives can be used? + + extern int dummy [sizeof (struct {...})]; + extern int dummy [sizeof (struct _gl_verify_type {...})]; + extern void dummy (int [sizeof (struct {...})]); + extern void dummy (int [sizeof (struct _gl_verify_type {...})]); + extern int (*dummy (void)) [sizeof (struct {...})]; + extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})]; + + In the second and sixth case, the struct type is exported to the + outer scope; two such declarations therefore collide. GCC warns + about the first, third, and fourth cases. So the only remaining + possibility is the fifth case: + + 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 + __COUNTER__ macro that can let us generate unique identifiers for + each dummy function, to suppress this warning. + + * This implementation exploits the fact that older versions of GCC, + 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. */ + +/* Concatenate two preprocessor tokens. */ +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y + +/* _GL_COUNTER is an integer, preferably one that changes each time we + use it. Use __COUNTER__ if it works, falling back on __LINE__ + otherwise. __LINE__ isn't perfect, but it's better than a + constant. */ +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif + +/* Generate a symbol with the given prefix, making it unique if + possible. */ +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) + +/* Verify requirement R at compile-time, as an integer constant expression + that returns 1. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. */ + +#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) + +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_verify_type +template + struct _gl_verify_type { + unsigned int _gl_verify_error_if_negative: w; + }; +# define GNULIB_defined_struct__gl_verify_type 1 +# endif +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + _gl_verify_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } +#endif + +/* Verify requirement R at compile-time, as a declaration without a + trailing ';'. If R is false, fail at compile-time, preferably + with a diagnostic that includes the string-literal DIAGNOSTIC. + + Unfortunately, unlike C11, this implementation must appear as an + ordinary declaration, and cannot appear inside struct { ... }. */ + +#ifdef _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY _Static_assert +#else +# define _GL_VERIFY(R, DIAGNOSTIC) \ + extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ + [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] +#endif + +/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ +#ifdef _GL_STATIC_ASSERT_H +# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert +# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) +# endif +# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +#endif + +/* @assert.h omit start@ */ + +/* Each of these macros verifies that its argument R is nonzero. To + be portable, R should be an integer constant expression. Unlike + assert (R), there is no run-time overhead. + + There are two macros, since no single macro can be used in all + contexts in C. verify_true (R) is for scalar contexts, including + integer constant expression contexts. verify (R) is for declaration + contexts, e.g., the top level. */ + +/* Verify requirement R at compile-time, as an integer constant expression. + Return 1. This is equivalent to verify_expr (R, 1). + + verify_true is obsolescent; please use verify_expr instead. */ + +#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") + +/* Verify requirement R at compile-time. Return the value of the + expression E. */ + +#define verify_expr(R, E) \ + (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) + +/* Verify requirement R at compile-time, as a declaration without a + trailing ';'. */ + +#define verify(R) _GL_VERIFY (R, "verify (" #R ")") + +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + +/* Assume that R always holds. This lets the compiler optimize + accordingly. R should not have side-effects; it may or may not be + evaluated. Behavior is undefined if R is false. */ + +#if (__has_builtin (__builtin_unreachable) \ + || 4 < __GNUC__ + (5 <= __GNUC_MINOR__)) +# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) +#elif 1200 <= _MSC_VER +# define assume(R) __assume (R) +#elif (defined lint \ + && (__has_builtin (__builtin_trap) \ + || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__)))) + /* Doing it this way helps various packages when configured with + --enable-gcc-warnings, which compiles with -Dlint. It's nicer + when 'assume' silences warnings even with older GCCs. */ +# define assume(R) ((R) ? (void) 0 : __builtin_trap ()) +#else +# define assume(R) ((void) (0 && (R))) +#endif + +/* @assert.h omit end@ */ + +#endif diff --git a/gl/lib/version-etc-fsf.c b/gl/lib/version-etc-fsf.c new file mode 100644 index 0000000..b37dd60 --- /dev/null +++ b/gl/lib/version-etc-fsf.c @@ -0,0 +1,30 @@ +/* Variable with FSF copyright information, for version-etc. + Copyright (C) 1999-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +/* Specification. */ +#include "version-etc.h" + +/* Default copyright goes to the FSF. */ + +const char version_etc_copyright[] = + /* Do *not* mark this string for translation. %s is a copyright + symbol suitable for this locale, and %d is the copyright + year. */ + "Copyright %s %d Free Software Foundation, Inc."; diff --git a/gl/lib/version-etc.c b/gl/lib/version-etc.c new file mode 100644 index 0000000..04f5b62 --- /dev/null +++ b/gl/lib/version-etc.c @@ -0,0 +1,258 @@ +/* Print --version and bug-reporting information in a consistent format. + Copyright (C) 1999-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +/* Specification. */ +#include "version-etc.h" + +#include +#include +#include + +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif + +#include "gettext.h" +#define _(msgid) gettext (msgid) + +/* If you use AM_INIT_AUTOMAKE's no-define option, + PACKAGE is not defined. Use PACKAGE_TARNAME instead. */ +#if ! defined PACKAGE && defined PACKAGE_TARNAME +# define PACKAGE PACKAGE_TARNAME +#endif + +enum { COPYRIGHT_YEAR = 2014 }; + +/* The three functions below display the --version information the + standard way. + + If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of + the program. The formats are therefore: + + PACKAGE VERSION + + or + + COMMAND_NAME (PACKAGE) VERSION. + + The functions differ in the way they are passed author names. */ + +/* Display the --version information the standard way. + + Author names are given in the array AUTHORS. N_AUTHORS is the + number of elements in the array. */ +void +version_etc_arn (FILE *stream, + const char *command_name, const char *package, + const char *version, + const char * const * authors, size_t n_authors) +{ + if (command_name) + fprintf (stream, "%s (%s) %s\n", command_name, package, version); + else + fprintf (stream, "%s %s\n", package, version); + +#ifdef PACKAGE_PACKAGER +# ifdef PACKAGE_PACKAGER_VERSION + fprintf (stream, _("Packaged by %s (%s)\n"), PACKAGE_PACKAGER, + PACKAGE_PACKAGER_VERSION); +# else + fprintf (stream, _("Packaged by %s\n"), PACKAGE_PACKAGER); +# endif +#endif + + /* TRANSLATORS: Translate "(C)" to the copyright symbol + (C-in-a-circle), if this symbol is available in the user's + locale. Otherwise, do not translate "(C)"; leave it as-is. */ + fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR); + + fputs (_("\ +\n\ +License GPLv3+: GNU GPL version 3 or later .\n\ +This is free software: you are free to change and redistribute it.\n\ +There is NO WARRANTY, to the extent permitted by law.\n\ +\n\ +"), + stream); + + switch (n_authors) + { + case 0: + /* The caller must provide at least one author name. */ + abort (); + case 1: + /* TRANSLATORS: %s denotes an author name. */ + fprintf (stream, _("Written by %s.\n"), authors[0]); + break; + case 2: + /* TRANSLATORS: Each %s denotes an author name. */ + fprintf (stream, _("Written by %s and %s.\n"), authors[0], authors[1]); + break; + case 3: + /* TRANSLATORS: Each %s denotes an author name. */ + fprintf (stream, _("Written by %s, %s, and %s.\n"), + authors[0], authors[1], authors[2]); + break; + case 4: + /* TRANSLATORS: Each %s denotes an author name. + You can use line breaks, estimating that each author name occupies + ca. 16 screen columns and that a screen line has ca. 80 columns. */ + fprintf (stream, _("Written by %s, %s, %s,\nand %s.\n"), + authors[0], authors[1], authors[2], authors[3]); + break; + case 5: + /* TRANSLATORS: Each %s denotes an author name. + You can use line breaks, estimating that each author name occupies + ca. 16 screen columns and that a screen line has ca. 80 columns. */ + fprintf (stream, _("Written by %s, %s, %s,\n%s, and %s.\n"), + authors[0], authors[1], authors[2], authors[3], authors[4]); + break; + case 6: + /* TRANSLATORS: Each %s denotes an author name. + You can use line breaks, estimating that each author name occupies + ca. 16 screen columns and that a screen line has ca. 80 columns. */ + fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, and %s.\n"), + authors[0], authors[1], authors[2], authors[3], authors[4], + authors[5]); + break; + case 7: + /* TRANSLATORS: Each %s denotes an author name. + You can use line breaks, estimating that each author name occupies + ca. 16 screen columns and that a screen line has ca. 80 columns. */ + fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"), + authors[0], authors[1], authors[2], authors[3], authors[4], + authors[5], authors[6]); + break; + case 8: + /* TRANSLATORS: Each %s denotes an author name. + You can use line breaks, estimating that each author name occupies + ca. 16 screen columns and that a screen line has ca. 80 columns. */ + fprintf (stream, _("\ +Written by %s, %s, %s,\n%s, %s, %s, %s,\nand %s.\n"), + authors[0], authors[1], authors[2], authors[3], authors[4], + authors[5], authors[6], authors[7]); + break; + case 9: + /* TRANSLATORS: Each %s denotes an author name. + You can use line breaks, estimating that each author name occupies + ca. 16 screen columns and that a screen line has ca. 80 columns. */ + fprintf (stream, _("\ +Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"), + authors[0], authors[1], authors[2], authors[3], authors[4], + authors[5], authors[6], authors[7], authors[8]); + break; + default: + /* 10 or more authors. Use an abbreviation, since the human reader + will probably not want to read the entire list anyway. */ + /* TRANSLATORS: Each %s denotes an author name. + You can use line breaks, estimating that each author name occupies + ca. 16 screen columns and that a screen line has ca. 80 columns. */ + fprintf (stream, _("\ +Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"), + authors[0], authors[1], authors[2], authors[3], authors[4], + authors[5], authors[6], authors[7], authors[8]); + break; + } +} + +/* Display the --version information the standard way. See the initial + comment to this module, for more information. + + Author names are given in the NULL-terminated array AUTHORS. */ +void +version_etc_ar (FILE *stream, + const char *command_name, const char *package, + const char *version, const char * const * authors) +{ + size_t n_authors; + + for (n_authors = 0; authors[n_authors]; n_authors++) + ; + version_etc_arn (stream, command_name, package, version, authors, n_authors); +} + +/* Display the --version information the standard way. See the initial + comment to this module, for more information. + + Author names are given in the NULL-terminated va_list AUTHORS. */ +void +version_etc_va (FILE *stream, + const char *command_name, const char *package, + const char *version, va_list authors) +{ + size_t n_authors; + const char *authtab[10]; + + for (n_authors = 0; + n_authors < 10 + && (authtab[n_authors] = va_arg (authors, const char *)) != NULL; + n_authors++) + ; + version_etc_arn (stream, command_name, package, version, + authtab, n_authors); +} + + +/* Display the --version information the standard way. + + If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of + the program. The formats are therefore: + + PACKAGE VERSION + + or + + COMMAND_NAME (PACKAGE) VERSION. + + The authors names are passed as separate arguments, with an additional + NULL argument at the end. */ +void +version_etc (FILE *stream, + const char *command_name, const char *package, + const char *version, /* const char *author1, ...*/ ...) +{ + va_list authors; + + va_start (authors, version); + version_etc_va (stream, command_name, package, version, authors); + va_end (authors); +} + +void +emit_bug_reporting_address (void) +{ + /* TRANSLATORS: The placeholder indicates the bug-reporting address + for this package. Please add _another line_ saying + "Report translation bugs to <...>\n" with the address for translation + bugs (typically your translation team's web or email address). */ + printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT); +#ifdef PACKAGE_PACKAGER_BUG_REPORTS + printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER, + PACKAGE_PACKAGER_BUG_REPORTS); +#endif +#ifdef PACKAGE_URL + printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); +#else + printf (_("%s home page: \n"), + PACKAGE_NAME, PACKAGE); +#endif + fputs (_("General help using GNU software: \n"), + stdout); +} diff --git a/gl/lib/version-etc.h b/gl/lib/version-etc.h new file mode 100644 index 0000000..8e1b2cc --- /dev/null +++ b/gl/lib/version-etc.h @@ -0,0 +1,78 @@ +/* Print --version and bug-reporting information in a consistent format. + Copyright (C) 1999, 2003, 2005, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#ifndef VERSION_ETC_H +# define VERSION_ETC_H 1 + +# include +# include + +/* The 'sentinel' attribute was added in gcc 4.0. */ +#ifndef _GL_ATTRIBUTE_SENTINEL +# if 4 <= __GNUC__ +# define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__)) +# else +# define _GL_ATTRIBUTE_SENTINEL /* empty */ +# endif +#endif + +extern const char version_etc_copyright[]; + +/* The three functions below display the --version information in the + standard way: command and package names, package version, followed + by a short GPLv3+ notice and a list of up to 10 author names. + + If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of + the program. The formats are therefore: + + PACKAGE VERSION + + or + + COMMAND_NAME (PACKAGE) VERSION. + + The functions differ in the way they are passed author names: */ + +/* N_AUTHORS names are supplied in array AUTHORS. */ +extern void version_etc_arn (FILE *stream, + const char *command_name, const char *package, + const char *version, + const char * const * authors, size_t n_authors); + +/* Names are passed in the NULL-terminated array AUTHORS. */ +extern void version_etc_ar (FILE *stream, + const char *command_name, const char *package, + const char *version, const char * const * authors); + +/* Names are passed in the NULL-terminated va_list. */ +extern void version_etc_va (FILE *stream, + const char *command_name, const char *package, + const char *version, va_list authors); + +/* Names are passed as separate arguments, with an additional + NULL argument at the end. */ +extern void version_etc (FILE *stream, + const char *command_name, const char *package, + const char *version, + /* const char *author1, ..., NULL */ ...) + _GL_ATTRIBUTE_SENTINEL; + +/* Display the usual "Report bugs to" stanza. */ +extern void emit_bug_reporting_address (void); + +#endif /* VERSION_ETC_H */ diff --git a/gl/lib/w32sock.h b/gl/lib/w32sock.h new file mode 100644 index 0000000..b921b1b --- /dev/null +++ b/gl/lib/w32sock.h @@ -0,0 +1,136 @@ +/* w32sock.h --- internal auxiliary functions for Windows socket functions + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini */ + +#include + +/* Get O_RDWR and O_BINARY. */ +#include + +/* Get _open_osfhandle(). */ +#include + +/* Get _get_osfhandle(). */ +#include "msvc-nothrow.h" + +#define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd))) +#define SOCKET_TO_FD(fh) (_open_osfhandle ((intptr_t) (fh), O_RDWR | O_BINARY)) + +static inline void +set_winsock_errno (void) +{ + int err = WSAGetLastError (); + + /* Map some WSAE* errors to the runtime library's error codes. */ + switch (err) + { + case WSA_INVALID_HANDLE: + errno = EBADF; + break; + case WSA_NOT_ENOUGH_MEMORY: + errno = ENOMEM; + break; + case WSA_INVALID_PARAMETER: + errno = EINVAL; + break; + case WSAENAMETOOLONG: + errno = ENAMETOOLONG; + break; + case WSAENOTEMPTY: + errno = ENOTEMPTY; + break; + case WSAEWOULDBLOCK: + errno = EWOULDBLOCK; + break; + case WSAEINPROGRESS: + errno = EINPROGRESS; + break; + case WSAEALREADY: + errno = EALREADY; + break; + case WSAENOTSOCK: + errno = ENOTSOCK; + break; + case WSAEDESTADDRREQ: + errno = EDESTADDRREQ; + break; + case WSAEMSGSIZE: + errno = EMSGSIZE; + break; + case WSAEPROTOTYPE: + errno = EPROTOTYPE; + break; + case WSAENOPROTOOPT: + errno = ENOPROTOOPT; + break; + case WSAEPROTONOSUPPORT: + errno = EPROTONOSUPPORT; + break; + case WSAEOPNOTSUPP: + errno = EOPNOTSUPP; + break; + case WSAEAFNOSUPPORT: + errno = EAFNOSUPPORT; + break; + case WSAEADDRINUSE: + errno = EADDRINUSE; + break; + case WSAEADDRNOTAVAIL: + errno = EADDRNOTAVAIL; + break; + case WSAENETDOWN: + errno = ENETDOWN; + break; + case WSAENETUNREACH: + errno = ENETUNREACH; + break; + case WSAENETRESET: + errno = ENETRESET; + break; + case WSAECONNABORTED: + errno = ECONNABORTED; + break; + case WSAECONNRESET: + errno = ECONNRESET; + break; + case WSAENOBUFS: + errno = ENOBUFS; + break; + case WSAEISCONN: + errno = EISCONN; + break; + case WSAENOTCONN: + errno = ENOTCONN; + break; + case WSAETIMEDOUT: + errno = ETIMEDOUT; + break; + case WSAECONNREFUSED: + errno = ECONNREFUSED; + break; + case WSAELOOP: + errno = ELOOP; + break; + case WSAEHOSTUNREACH: + errno = EHOSTUNREACH; + break; + default: + errno = (err > 10000 && err < 10025) ? err - 10000 : err; + break; + } +} diff --git a/gl/lib/wchar.in.h b/gl/lib/wchar.in.h new file mode 100644 index 0000000..473285f --- /dev/null +++ b/gl/lib/wchar.in.h @@ -0,0 +1,1028 @@ +/* A substitute for ISO C99 , for platforms that have issues. + + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Eric Blake. */ + +/* + * ISO C 99 for platforms that have issues. + * + * + * For now, this just ensures proper prerequisite inclusion order and + * the declaration of wcwidth(). + */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H +/* Special invocation convention: + - Inside glibc and uClibc header files. + - On HP-UX 11.00 we have a sequence of nested includes + -> -> , and the latter includes , + once indirectly -> -> -> + and once directly. In both situations 'wint_t' is not yet defined, + therefore we cannot provide the function overrides; instead include only + the system's . + - On IRIX 6.5, similarly, we have an include -> , and + the latter includes . But here, we have no way to detect whether + is completely included or is still being included. */ + +#@INCLUDE_NEXT@ @NEXT_WCHAR_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_WCHAR_H + +#define _GL_ALREADY_INCLUDING_WCHAR_H + +#if @HAVE_FEATURES_H@ +# include /* for __GLIBC__ */ +#endif + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . + In some builds of uClibc, is nonexistent and wchar_t is defined + by . + But avoid namespace pollution on glibc systems. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +#endif +#ifndef __GLIBC__ +# include +# include +#endif + +/* Include the original if it exists. + Some builds of uClibc lack it. */ +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_WCHAR_H@ +# @INCLUDE_NEXT@ @NEXT_WCHAR_H@ +#endif + +#undef _GL_ALREADY_INCLUDING_WCHAR_H + +#ifndef _@GUARD_PREFIX@_WCHAR_H +#define _@GUARD_PREFIX@_WCHAR_H + +/* The __attribute__ feature is available in gcc versions 2.5 and later. + The attribute __pure__ was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +/* Define wint_t and WEOF. (Also done in wctype.in.h.) */ +#if !@HAVE_WINT_T@ && !defined wint_t +# define wint_t int +# ifndef WEOF +# define WEOF -1 +# endif +#else +/* MSVC defines wint_t as 'unsigned short' in . + This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be + "unchanged by default argument promotions". Override it. */ +# if defined _MSC_VER +# if !GNULIB_defined_wint_t +# include +typedef unsigned int rpl_wint_t; +# undef wint_t +# define wint_t rpl_wint_t +# define GNULIB_defined_wint_t 1 +# endif +# endif +# ifndef WEOF +# define WEOF ((wint_t) -1) +# endif +#endif + + +/* Override mbstate_t if it is too small. + On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for + implementing mbrtowc for encodings like UTF-8. */ +#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ +# if !GNULIB_defined_mbstate_t +typedef int rpl_mbstate_t; +# undef mbstate_t +# define mbstate_t rpl_mbstate_t +# define GNULIB_defined_mbstate_t 1 +# endif +#endif + + +/* Convert a single-byte character to a wide character. */ +#if @GNULIB_BTOWC@ +# if @REPLACE_BTOWC@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef btowc +# define btowc rpl_btowc +# endif +_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (btowc, wint_t, (int c)); +# else +# if !@HAVE_BTOWC@ +_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (btowc, wint_t, (int c)); +# endif +_GL_CXXALIASWARN (btowc); +#elif defined GNULIB_POSIXCHECK +# undef btowc +# if HAVE_RAW_DECL_BTOWC +_GL_WARN_ON_USE (btowc, "btowc is unportable - " + "use gnulib module btowc for portability"); +# endif +#endif + + +/* Convert a wide character to a single-byte character. */ +#if @GNULIB_WCTOB@ +# if @REPLACE_WCTOB@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wctob +# define wctob rpl_wctob +# endif +_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); +# else +# if !defined wctob && !@HAVE_DECL_WCTOB@ +/* wctob is provided by gnulib, or wctob exists but is not declared. */ +_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); +# endif +_GL_CXXALIASWARN (wctob); +#elif defined GNULIB_POSIXCHECK +# undef wctob +# if HAVE_RAW_DECL_WCTOB +_GL_WARN_ON_USE (wctob, "wctob is unportable - " + "use gnulib module wctob for portability"); +# endif +#endif + + +/* Test whether *PS is in the initial state. */ +#if @GNULIB_MBSINIT@ +# if @REPLACE_MBSINIT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsinit +# define mbsinit rpl_mbsinit +# endif +_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); +# else +# if !@HAVE_MBSINIT@ +_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); +# endif +_GL_CXXALIASWARN (mbsinit); +#elif defined GNULIB_POSIXCHECK +# undef mbsinit +# if HAVE_RAW_DECL_MBSINIT +_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " + "use gnulib module mbsinit for portability"); +# endif +#endif + + +/* Convert a multibyte character to a wide character. */ +#if @GNULIB_MBRTOWC@ +# if @REPLACE_MBRTOWC@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrtowc +# define mbrtowc rpl_mbrtowc +# endif +_GL_FUNCDECL_RPL (mbrtowc, size_t, + (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbrtowc, size_t, + (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); +# else +# if !@HAVE_MBRTOWC@ +_GL_FUNCDECL_SYS (mbrtowc, size_t, + (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbrtowc, size_t, + (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); +# endif +_GL_CXXALIASWARN (mbrtowc); +#elif defined GNULIB_POSIXCHECK +# undef mbrtowc +# if HAVE_RAW_DECL_MBRTOWC +_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " + "use gnulib module mbrtowc for portability"); +# endif +#endif + + +/* Recognize a multibyte character. */ +#if @GNULIB_MBRLEN@ +# if @REPLACE_MBRLEN@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbrlen +# define mbrlen rpl_mbrlen +# endif +_GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); +_GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); +# else +# if !@HAVE_MBRLEN@ +_GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); +# endif +_GL_CXXALIASWARN (mbrlen); +#elif defined GNULIB_POSIXCHECK +# undef mbrlen +# if HAVE_RAW_DECL_MBRLEN +_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " + "use gnulib module mbrlen for portability"); +# endif +#endif + + +/* Convert a string to a wide string. */ +#if @GNULIB_MBSRTOWCS@ +# if @REPLACE_MBSRTOWCS@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsrtowcs +# define mbsrtowcs rpl_mbsrtowcs +# endif +_GL_FUNCDECL_RPL (mbsrtowcs, size_t, + (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbsrtowcs, size_t, + (wchar_t *dest, const char **srcp, size_t len, + mbstate_t *ps)); +# else +# if !@HAVE_MBSRTOWCS@ +_GL_FUNCDECL_SYS (mbsrtowcs, size_t, + (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsrtowcs, size_t, + (wchar_t *dest, const char **srcp, size_t len, + mbstate_t *ps)); +# endif +_GL_CXXALIASWARN (mbsrtowcs); +#elif defined GNULIB_POSIXCHECK +# undef mbsrtowcs +# if HAVE_RAW_DECL_MBSRTOWCS +_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " + "use gnulib module mbsrtowcs for portability"); +# endif +#endif + + +/* Convert a string to a wide string. */ +#if @GNULIB_MBSNRTOWCS@ +# if @REPLACE_MBSNRTOWCS@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef mbsnrtowcs +# define mbsnrtowcs rpl_mbsnrtowcs +# endif +_GL_FUNCDECL_RPL (mbsnrtowcs, size_t, + (wchar_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (mbsnrtowcs, size_t, + (wchar_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps)); +# else +# if !@HAVE_MBSNRTOWCS@ +_GL_FUNCDECL_SYS (mbsnrtowcs, size_t, + (wchar_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (mbsnrtowcs, size_t, + (wchar_t *dest, const char **srcp, size_t srclen, size_t len, + mbstate_t *ps)); +# endif +_GL_CXXALIASWARN (mbsnrtowcs); +#elif defined GNULIB_POSIXCHECK +# undef mbsnrtowcs +# if HAVE_RAW_DECL_MBSNRTOWCS +_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " + "use gnulib module mbsnrtowcs for portability"); +# endif +#endif + + +/* Convert a wide character to a multibyte character. */ +#if @GNULIB_WCRTOMB@ +# if @REPLACE_WCRTOMB@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcrtomb +# define wcrtomb rpl_wcrtomb +# endif +_GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); +_GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); +# else +# if !@HAVE_WCRTOMB@ +_GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); +# endif +_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); +# endif +_GL_CXXALIASWARN (wcrtomb); +#elif defined GNULIB_POSIXCHECK +# undef wcrtomb +# if HAVE_RAW_DECL_WCRTOMB +_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " + "use gnulib module wcrtomb for portability"); +# endif +#endif + + +/* Convert a wide string to a string. */ +#if @GNULIB_WCSRTOMBS@ +# if @REPLACE_WCSRTOMBS@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsrtombs +# define wcsrtombs rpl_wcsrtombs +# endif +_GL_FUNCDECL_RPL (wcsrtombs, size_t, + (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (wcsrtombs, size_t, + (char *dest, const wchar_t **srcp, size_t len, + mbstate_t *ps)); +# else +# if !@HAVE_WCSRTOMBS@ +_GL_FUNCDECL_SYS (wcsrtombs, size_t, + (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (wcsrtombs, size_t, + (char *dest, const wchar_t **srcp, size_t len, + mbstate_t *ps)); +# endif +_GL_CXXALIASWARN (wcsrtombs); +#elif defined GNULIB_POSIXCHECK +# undef wcsrtombs +# if HAVE_RAW_DECL_WCSRTOMBS +_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " + "use gnulib module wcsrtombs for portability"); +# endif +#endif + + +/* Convert a wide string to a string. */ +#if @GNULIB_WCSNRTOMBS@ +# if @REPLACE_WCSNRTOMBS@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcsnrtombs +# define wcsnrtombs rpl_wcsnrtombs +# endif +_GL_FUNCDECL_RPL (wcsnrtombs, size_t, + (char *dest, const wchar_t **srcp, size_t srclen, size_t len, + mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (wcsnrtombs, size_t, + (char *dest, const wchar_t **srcp, size_t srclen, size_t len, + mbstate_t *ps)); +# else +# if !@HAVE_WCSNRTOMBS@ +_GL_FUNCDECL_SYS (wcsnrtombs, size_t, + (char *dest, const wchar_t **srcp, size_t srclen, size_t len, + mbstate_t *ps) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (wcsnrtombs, size_t, + (char *dest, const wchar_t **srcp, size_t srclen, size_t len, + mbstate_t *ps)); +# endif +_GL_CXXALIASWARN (wcsnrtombs); +#elif defined GNULIB_POSIXCHECK +# undef wcsnrtombs +# if HAVE_RAW_DECL_WCSNRTOMBS +_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " + "use gnulib module wcsnrtombs for portability"); +# endif +#endif + + +/* Return the number of screen columns needed for WC. */ +#if @GNULIB_WCWIDTH@ +# if @REPLACE_WCWIDTH@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcwidth +# define wcwidth rpl_wcwidth +# endif +_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); +# else +# if !@HAVE_DECL_WCWIDTH@ +/* wcwidth exists but is not declared. */ +_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); +# endif +_GL_CXXALIASWARN (wcwidth); +#elif defined GNULIB_POSIXCHECK +# undef wcwidth +# if HAVE_RAW_DECL_WCWIDTH +_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " + "use gnulib module wcwidth for portability"); +# endif +#endif + + +/* Search N wide characters of S for C. */ +#if @GNULIB_WMEMCHR@ +# if !@HAVE_WMEMCHR@ +_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t); + wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wmemchr, + wchar_t *, (const wchar_t *, wchar_t, size_t), + const wchar_t *, (const wchar_t *, wchar_t, size_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +_GL_CXXALIASWARN1 (wmemchr, const wchar_t *, + (const wchar_t *s, wchar_t c, size_t n)); +# else +_GL_CXXALIASWARN (wmemchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wmemchr +# if HAVE_RAW_DECL_WMEMCHR +_GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " + "use gnulib module wmemchr for portability"); +# endif +#endif + + +/* Compare N wide characters of S1 and S2. */ +#if @GNULIB_WMEMCMP@ +# if !@HAVE_WMEMCMP@ +_GL_FUNCDECL_SYS (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wmemcmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +_GL_CXXALIASWARN (wmemcmp); +#elif defined GNULIB_POSIXCHECK +# undef wmemcmp +# if HAVE_RAW_DECL_WMEMCMP +_GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " + "use gnulib module wmemcmp for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST. */ +#if @GNULIB_WMEMCPY@ +# if !@HAVE_WMEMCPY@ +_GL_FUNCDECL_SYS (wmemcpy, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemcpy, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +_GL_CXXALIASWARN (wmemcpy); +#elif defined GNULIB_POSIXCHECK +# undef wmemcpy +# if HAVE_RAW_DECL_WMEMCPY +_GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " + "use gnulib module wmemcpy for portability"); +# endif +#endif + + +/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for + overlapping memory areas. */ +#if @GNULIB_WMEMMOVE@ +# if !@HAVE_WMEMMOVE@ +_GL_FUNCDECL_SYS (wmemmove, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemmove, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +_GL_CXXALIASWARN (wmemmove); +#elif defined GNULIB_POSIXCHECK +# undef wmemmove +# if HAVE_RAW_DECL_WMEMMOVE +_GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " + "use gnulib module wmemmove for portability"); +# endif +#endif + + +/* Set N wide characters of S to C. */ +#if @GNULIB_WMEMSET@ +# if !@HAVE_WMEMSET@ +_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +# endif +_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); +_GL_CXXALIASWARN (wmemset); +#elif defined GNULIB_POSIXCHECK +# undef wmemset +# if HAVE_RAW_DECL_WMEMSET +_GL_WARN_ON_USE (wmemset, "wmemset is unportable - " + "use gnulib module wmemset for portability"); +# endif +#endif + + +/* Return the number of wide characters in S. */ +#if @GNULIB_WCSLEN@ +# if !@HAVE_WCSLEN@ +_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); +_GL_CXXALIASWARN (wcslen); +#elif defined GNULIB_POSIXCHECK +# undef wcslen +# if HAVE_RAW_DECL_WCSLEN +_GL_WARN_ON_USE (wcslen, "wcslen is unportable - " + "use gnulib module wcslen for portability"); +# endif +#endif + + +/* Return the number of wide characters in S, but at most MAXLEN. */ +#if @GNULIB_WCSNLEN@ +# if !@HAVE_WCSNLEN@ +_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); +_GL_CXXALIASWARN (wcsnlen); +#elif defined GNULIB_POSIXCHECK +# undef wcsnlen +# if HAVE_RAW_DECL_WCSNLEN +_GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " + "use gnulib module wcsnlen for portability"); +# endif +#endif + + +/* Copy SRC to DEST. */ +#if @GNULIB_WCSCPY@ +# if !@HAVE_WCSCPY@ +_GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); +# endif +_GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); +_GL_CXXALIASWARN (wcscpy); +#elif defined GNULIB_POSIXCHECK +# undef wcscpy +# if HAVE_RAW_DECL_WCSCPY +_GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " + "use gnulib module wcscpy for portability"); +# endif +#endif + + +/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ +#if @GNULIB_WCPCPY@ +# if !@HAVE_WCPCPY@ +_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); +# endif +_GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); +_GL_CXXALIASWARN (wcpcpy); +#elif defined GNULIB_POSIXCHECK +# undef wcpcpy +# if HAVE_RAW_DECL_WCPCPY +_GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " + "use gnulib module wcpcpy for portability"); +# endif +#endif + + +/* Copy no more than N wide characters of SRC to DEST. */ +#if @GNULIB_WCSNCPY@ +# if !@HAVE_WCSNCPY@ +_GL_FUNCDECL_SYS (wcsncpy, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsncpy, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +_GL_CXXALIASWARN (wcsncpy); +#elif defined GNULIB_POSIXCHECK +# undef wcsncpy +# if HAVE_RAW_DECL_WCSNCPY +_GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " + "use gnulib module wcsncpy for portability"); +# endif +#endif + + +/* Copy no more than N characters of SRC to DEST, returning the address of + the last character written into DEST. */ +#if @GNULIB_WCPNCPY@ +# if !@HAVE_WCPNCPY@ +_GL_FUNCDECL_SYS (wcpncpy, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcpncpy, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +_GL_CXXALIASWARN (wcpncpy); +#elif defined GNULIB_POSIXCHECK +# undef wcpncpy +# if HAVE_RAW_DECL_WCPNCPY +_GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " + "use gnulib module wcpncpy for portability"); +# endif +#endif + + +/* Append SRC onto DEST. */ +#if @GNULIB_WCSCAT@ +# if !@HAVE_WCSCAT@ +_GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); +# endif +_GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); +_GL_CXXALIASWARN (wcscat); +#elif defined GNULIB_POSIXCHECK +# undef wcscat +# if HAVE_RAW_DECL_WCSCAT +_GL_WARN_ON_USE (wcscat, "wcscat is unportable - " + "use gnulib module wcscat for portability"); +# endif +#endif + + +/* Append no more than N wide characters of SRC onto DEST. */ +#if @GNULIB_WCSNCAT@ +# if !@HAVE_WCSNCAT@ +_GL_FUNCDECL_SYS (wcsncat, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsncat, wchar_t *, + (wchar_t *dest, const wchar_t *src, size_t n)); +_GL_CXXALIASWARN (wcsncat); +#elif defined GNULIB_POSIXCHECK +# undef wcsncat +# if HAVE_RAW_DECL_WCSNCAT +_GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " + "use gnulib module wcsncat for portability"); +# endif +#endif + + +/* Compare S1 and S2. */ +#if @GNULIB_WCSCMP@ +# if !@HAVE_WCSCMP@ +_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +_GL_CXXALIASWARN (wcscmp); +#elif defined GNULIB_POSIXCHECK +# undef wcscmp +# if HAVE_RAW_DECL_WCSCMP +_GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " + "use gnulib module wcscmp for portability"); +# endif +#endif + + +/* Compare no more than N wide characters of S1 and S2. */ +#if @GNULIB_WCSNCMP@ +# if !@HAVE_WCSNCMP@ +_GL_FUNCDECL_SYS (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsncmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +_GL_CXXALIASWARN (wcsncmp); +#elif defined GNULIB_POSIXCHECK +# undef wcsncmp +# if HAVE_RAW_DECL_WCSNCMP +_GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " + "use gnulib module wcsncmp for portability"); +# endif +#endif + + +/* Compare S1 and S2, ignoring case. */ +#if @GNULIB_WCSCASECMP@ +# if !@HAVE_WCSCASECMP@ +_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); +_GL_CXXALIASWARN (wcscasecmp); +#elif defined GNULIB_POSIXCHECK +# undef wcscasecmp +# if HAVE_RAW_DECL_WCSCASECMP +_GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " + "use gnulib module wcscasecmp for portability"); +# endif +#endif + + +/* Compare no more than N chars of S1 and S2, ignoring case. */ +#if @GNULIB_WCSNCASECMP@ +# if !@HAVE_WCSNCASECMP@ +_GL_FUNCDECL_SYS (wcsncasecmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsncasecmp, int, + (const wchar_t *s1, const wchar_t *s2, size_t n)); +_GL_CXXALIASWARN (wcsncasecmp); +#elif defined GNULIB_POSIXCHECK +# undef wcsncasecmp +# if HAVE_RAW_DECL_WCSNCASECMP +_GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " + "use gnulib module wcsncasecmp for portability"); +# endif +#endif + + +/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE + category of the current locale. */ +#if @GNULIB_WCSCOLL@ +# if !@HAVE_WCSCOLL@ +_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); +# endif +_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); +_GL_CXXALIASWARN (wcscoll); +#elif defined GNULIB_POSIXCHECK +# undef wcscoll +# if HAVE_RAW_DECL_WCSCOLL +_GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " + "use gnulib module wcscoll for portability"); +# endif +#endif + + +/* Transform S2 into array pointed to by S1 such that if wcscmp is applied + to two transformed strings the result is the as applying 'wcscoll' to the + original strings. */ +#if @GNULIB_WCSXFRM@ +# if !@HAVE_WCSXFRM@ +_GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); +# endif +_GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); +_GL_CXXALIASWARN (wcsxfrm); +#elif defined GNULIB_POSIXCHECK +# undef wcsxfrm +# if HAVE_RAW_DECL_WCSXFRM +_GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " + "use gnulib module wcsxfrm for portability"); +# endif +#endif + + +/* Duplicate S, returning an identical malloc'd string. */ +#if @GNULIB_WCSDUP@ +# if !@HAVE_WCSDUP@ +_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +# endif +_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); +_GL_CXXALIASWARN (wcsdup); +#elif defined GNULIB_POSIXCHECK +# undef wcsdup +# if HAVE_RAW_DECL_WCSDUP +_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " + "use gnulib module wcsdup for portability"); +# endif +#endif + + +/* Find the first occurrence of WC in WCS. */ +#if @GNULIB_WCSCHR@ +# if !@HAVE_WCSCHR@ +_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcschr (const wchar_t *, wchar_t); + wchar_t * std::wcschr (wchar_t *, wchar_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcschr, + wchar_t *, (const wchar_t *, wchar_t), + const wchar_t *, (const wchar_t *, wchar_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc)); +_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); +# else +_GL_CXXALIASWARN (wcschr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcschr +# if HAVE_RAW_DECL_WCSCHR +_GL_WARN_ON_USE (wcschr, "wcschr is unportable - " + "use gnulib module wcschr for portability"); +# endif +#endif + + +/* Find the last occurrence of WC in WCS. */ +#if @GNULIB_WCSRCHR@ +# if !@HAVE_WCSRCHR@ +_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcsrchr (const wchar_t *, wchar_t); + wchar_t * std::wcsrchr (wchar_t *, wchar_t); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcsrchr, + wchar_t *, (const wchar_t *, wchar_t), + const wchar_t *, (const wchar_t *, wchar_t)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc)); +_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); +# else +_GL_CXXALIASWARN (wcsrchr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsrchr +# if HAVE_RAW_DECL_WCSRCHR +_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " + "use gnulib module wcsrchr for portability"); +# endif +#endif + + +/* Return the length of the initial segmet of WCS which consists entirely + of wide characters not in REJECT. */ +#if @GNULIB_WCSCSPN@ +# if !@HAVE_WCSCSPN@ +_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); +_GL_CXXALIASWARN (wcscspn); +#elif defined GNULIB_POSIXCHECK +# undef wcscspn +# if HAVE_RAW_DECL_WCSCSPN +_GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " + "use gnulib module wcscspn for portability"); +# endif +#endif + + +/* Return the length of the initial segmet of WCS which consists entirely + of wide characters in ACCEPT. */ +#if @GNULIB_WCSSPN@ +# if !@HAVE_WCSSPN@ +_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); +_GL_CXXALIASWARN (wcsspn); +#elif defined GNULIB_POSIXCHECK +# undef wcsspn +# if HAVE_RAW_DECL_WCSSPN +_GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " + "use gnulib module wcsspn for portability"); +# endif +#endif + + +/* Find the first occurrence in WCS of any character in ACCEPT. */ +#if @GNULIB_WCSPBRK@ +# if !@HAVE_WCSPBRK@ +_GL_FUNCDECL_SYS (wcspbrk, wchar_t *, + (const wchar_t *wcs, const wchar_t *accept) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *); + wchar_t * std::wcspbrk (wchar_t *, const wchar_t *); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcspbrk, + wchar_t *, (const wchar_t *, const wchar_t *), + const wchar_t *, (const wchar_t *, const wchar_t *)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcspbrk, wchar_t *, + (wchar_t *wcs, const wchar_t *accept)); +_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, + (const wchar_t *wcs, const wchar_t *accept)); +# else +_GL_CXXALIASWARN (wcspbrk); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcspbrk +# if HAVE_RAW_DECL_WCSPBRK +_GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " + "use gnulib module wcspbrk for portability"); +# endif +#endif + + +/* Find the first occurrence of NEEDLE in HAYSTACK. */ +#if @GNULIB_WCSSTR@ +# if !@HAVE_WCSSTR@ +_GL_FUNCDECL_SYS (wcsstr, wchar_t *, + (const wchar_t *haystack, const wchar_t *needle) + _GL_ATTRIBUTE_PURE); +# endif + /* On some systems, this function is defined as an overloaded function: + extern "C++" { + const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); + wchar_t * std::wcsstr (wchar_t *, const wchar_t *); + } */ +_GL_CXXALIAS_SYS_CAST2 (wcsstr, + wchar_t *, (const wchar_t *, const wchar_t *), + const wchar_t *, (const wchar_t *, const wchar_t *)); +# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ + && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) +_GL_CXXALIASWARN1 (wcsstr, wchar_t *, + (wchar_t *haystack, const wchar_t *needle)); +_GL_CXXALIASWARN1 (wcsstr, const wchar_t *, + (const wchar_t *haystack, const wchar_t *needle)); +# else +_GL_CXXALIASWARN (wcsstr); +# endif +#elif defined GNULIB_POSIXCHECK +# undef wcsstr +# if HAVE_RAW_DECL_WCSSTR +_GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " + "use gnulib module wcsstr for portability"); +# endif +#endif + + +/* Divide WCS into tokens separated by characters in DELIM. */ +#if @GNULIB_WCSTOK@ +# if !@HAVE_WCSTOK@ +_GL_FUNCDECL_SYS (wcstok, wchar_t *, + (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); +# endif +_GL_CXXALIAS_SYS (wcstok, wchar_t *, + (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); +_GL_CXXALIASWARN (wcstok); +#elif defined GNULIB_POSIXCHECK +# undef wcstok +# if HAVE_RAW_DECL_WCSTOK +_GL_WARN_ON_USE (wcstok, "wcstok is unportable - " + "use gnulib module wcstok for portability"); +# endif +#endif + + +/* Determine number of column positions required for first N wide + characters (or fewer if S ends before this) in S. */ +#if @GNULIB_WCSWIDTH@ +# if @REPLACE_WCSWIDTH@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef wcswidth +# define wcswidth rpl_wcswidth +# endif +_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n) + _GL_ATTRIBUTE_PURE); +_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); +# else +# if !@HAVE_WCSWIDTH@ +_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n) + _GL_ATTRIBUTE_PURE); +# endif +_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); +# endif +_GL_CXXALIASWARN (wcswidth); +#elif defined GNULIB_POSIXCHECK +# undef wcswidth +# if HAVE_RAW_DECL_WCSWIDTH +_GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " + "use gnulib module wcswidth for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_WCHAR_H */ +#endif /* _@GUARD_PREFIX@_WCHAR_H */ +#endif diff --git a/gl/lib/wcrtomb.c b/gl/lib/wcrtomb.c new file mode 100644 index 0000000..1d340cd --- /dev/null +++ b/gl/lib/wcrtomb.c @@ -0,0 +1,53 @@ +/* Convert wide character to multibyte character. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2008. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include + + +size_t +wcrtomb (char *s, wchar_t wc, mbstate_t *ps) +{ + /* This implementation of wcrtomb on top of wctomb() supports only + stateless encodings. ps must be in the initial state. */ + if (ps != NULL && !mbsinit (ps)) + { + errno = EINVAL; + return (size_t)(-1); + } + + if (s == NULL) + /* We know the NUL wide character corresponds to the NUL character. */ + return 1; + else + { + int ret = wctomb (s, wc); + + if (ret >= 0) + return ret; + else + { + errno = EILSEQ; + return (size_t)(-1); + } + } +} diff --git a/gl/lib/wctype-h.c b/gl/lib/wctype-h.c new file mode 100644 index 0000000..bb5f847 --- /dev/null +++ b/gl/lib/wctype-h.c @@ -0,0 +1,4 @@ +/* Normally this would be wctype.c, but that name's already taken. */ +#include +#define _GL_WCTYPE_INLINE _GL_EXTERN_INLINE +#include "wctype.h" diff --git a/gl/lib/wctype.in.h b/gl/lib/wctype.in.h new file mode 100644 index 0000000..ab06653 --- /dev/null +++ b/gl/lib/wctype.in.h @@ -0,0 +1,514 @@ +/* A substitute for ISO C99 , for platforms that lack it. + + Copyright (C) 2006-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +/* Written by Bruno Haible and Paul Eggert. */ + +/* + * ISO C 99 for platforms that lack it. + * + * + * iswctype, towctrans, towlower, towupper, wctrans, wctype, + * wctrans_t, and wctype_t are not yet implemented. + */ + +#ifndef _@GUARD_PREFIX@_WCTYPE_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if @HAVE_WINT_T@ +/* Solaris 2.5 has a bug: must be included before . + Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +# include +# include +# include +# include +#endif + +/* mingw has declarations of towupper and towlower in as + well . Include in advance to avoid rpl_ prefix + being added to the declarations. */ +#ifdef __MINGW32__ +# include +#endif + +/* Include the original if it exists. + BeOS 5 has the functions but no . */ +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_WCTYPE_H@ +# @INCLUDE_NEXT@ @NEXT_WCTYPE_H@ +#endif + +#ifndef _@GUARD_PREFIX@_WCTYPE_H +#define _@GUARD_PREFIX@_WCTYPE_H + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef _GL_WCTYPE_INLINE +# define _GL_WCTYPE_INLINE _GL_INLINE +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* Solaris 2.6 includes which includes which + #defines a number of identifiers in the application namespace. Revert + these #defines. */ +#ifdef __sun +# undef multibyte +# undef eucw1 +# undef eucw2 +# undef eucw3 +# undef scrw1 +# undef scrw2 +# undef scrw3 +#endif + +/* Define wint_t and WEOF. (Also done in wchar.in.h.) */ +#if !@HAVE_WINT_T@ && !defined wint_t +# define wint_t int +# ifndef WEOF +# define WEOF -1 +# endif +#else +/* MSVC defines wint_t as 'unsigned short' in . + This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be + "unchanged by default argument promotions". Override it. */ +# if defined _MSC_VER +# if !GNULIB_defined_wint_t +# include +typedef unsigned int rpl_wint_t; +# undef wint_t +# define wint_t rpl_wint_t +# define GNULIB_defined_wint_t 1 +# endif +# endif +# ifndef WEOF +# define WEOF ((wint_t) -1) +# endif +#endif + + +#if !GNULIB_defined_wctype_functions + +/* FreeBSD 4.4 to 4.11 has but lacks the functions. + Linux libc5 has and the functions but they are broken. + Assume all 11 functions (all isw* except iswblank) are implemented the + same way, or not at all. */ +# if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@ + +/* IRIX 5.3 has macros but no functions, its isw* macros refer to an + undefined variable _ctmp_ and to macros like _P, and they + refer to system functions like _iswctype that are not in the + standard C library. Rather than try to get ancient buggy + implementations like this to work, just disable them. */ +# undef iswalnum +# undef iswalpha +# undef iswblank +# undef iswcntrl +# undef iswdigit +# undef iswgraph +# undef iswlower +# undef iswprint +# undef iswpunct +# undef iswspace +# undef iswupper +# undef iswxdigit +# undef towlower +# undef towupper + +/* Linux libc5 has and the functions but they are broken. */ +# if @REPLACE_ISWCNTRL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define iswalnum rpl_iswalnum +# define iswalpha rpl_iswalpha +# define iswblank rpl_iswblank +# define iswcntrl rpl_iswcntrl +# define iswdigit rpl_iswdigit +# define iswgraph rpl_iswgraph +# define iswlower rpl_iswlower +# define iswprint rpl_iswprint +# define iswpunct rpl_iswpunct +# define iswspace rpl_iswspace +# define iswupper rpl_iswupper +# define iswxdigit rpl_iswxdigit +# endif +# endif +# if @REPLACE_TOWLOWER@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define towlower rpl_towlower +# define towupper rpl_towupper +# endif +# endif + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswalnum +# else +iswalnum +# endif + (wint_t wc) +{ + return ((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswalpha +# else +iswalpha +# endif + (wint_t wc) +{ + return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswblank +# else +iswblank +# endif + (wint_t wc) +{ + return wc == ' ' || wc == '\t'; +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswcntrl +# else +iswcntrl +# endif + (wint_t wc) +{ + return (wc & ~0x1f) == 0 || wc == 0x7f; +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswdigit +# else +iswdigit +# endif + (wint_t wc) +{ + return wc >= '0' && wc <= '9'; +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswgraph +# else +iswgraph +# endif + (wint_t wc) +{ + return wc >= '!' && wc <= '~'; +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswlower +# else +iswlower +# endif + (wint_t wc) +{ + return wc >= 'a' && wc <= 'z'; +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswprint +# else +iswprint +# endif + (wint_t wc) +{ + return wc >= ' ' && wc <= '~'; +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswpunct +# else +iswpunct +# endif + (wint_t wc) +{ + return (wc >= '!' && wc <= '~' + && !((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswspace +# else +iswspace +# endif + (wint_t wc) +{ + return (wc == ' ' || wc == '\t' + || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswupper +# else +iswupper +# endif + (wint_t wc) +{ + return wc >= 'A' && wc <= 'Z'; +} + +_GL_WCTYPE_INLINE int +# if @REPLACE_ISWCNTRL@ +rpl_iswxdigit +# else +iswxdigit +# endif + (wint_t wc) +{ + return ((wc >= '0' && wc <= '9') + || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); +} + +_GL_WCTYPE_INLINE wint_t +# if @REPLACE_TOWLOWER@ +rpl_towlower +# else +towlower +# endif + (wint_t wc) +{ + return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc); +} + +_GL_WCTYPE_INLINE wint_t +# if @REPLACE_TOWLOWER@ +rpl_towupper +# else +towupper +# endif + (wint_t wc) +{ + return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc); +} + +# elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@) +/* Only the iswblank function is missing. */ + +# if @REPLACE_ISWBLANK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define iswblank rpl_iswblank +# endif +_GL_FUNCDECL_RPL (iswblank, int, (wint_t wc)); +# else +_GL_FUNCDECL_SYS (iswblank, int, (wint_t wc)); +# endif + +# endif + +# if defined __MINGW32__ + +/* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. + The functions towlower and towupper are implemented in the MSVCRT library + to take a wchar_t argument and return a wchar_t result. mingw declares + these functions to take a wint_t argument and return a wint_t result. + This means that: + 1. When the user passes an argument outside the range 0x0000..0xFFFF, the + function will look only at the lower 16 bits. This is allowed according + to POSIX. + 2. The return value is returned in the lower 16 bits of the result register. + The upper 16 bits are random: whatever happened to be in that part of the + result register. We need to fix this by adding a zero-extend from + wchar_t to wint_t after the call. */ + +_GL_WCTYPE_INLINE wint_t +rpl_towlower (wint_t wc) +{ + return (wint_t) (wchar_t) towlower (wc); +} +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define towlower rpl_towlower +# endif + +_GL_WCTYPE_INLINE wint_t +rpl_towupper (wint_t wc) +{ + return (wint_t) (wchar_t) towupper (wc); +} +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define towupper rpl_towupper +# endif + +# endif /* __MINGW32__ */ + +# define GNULIB_defined_wctype_functions 1 +#endif + +#if @REPLACE_ISWCNTRL@ +_GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc)); +_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc)); +_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc)); +_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc)); +_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc)); +_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc)); +_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc)); +_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc)); +_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc)); +_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc)); +_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc)); +_GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc)); +_GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc)); +_GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc)); +_GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc)); +_GL_CXXALIAS_SYS (iswlower, int, (wint_t wc)); +_GL_CXXALIAS_SYS (iswprint, int, (wint_t wc)); +_GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc)); +_GL_CXXALIAS_SYS (iswspace, int, (wint_t wc)); +_GL_CXXALIAS_SYS (iswupper, int, (wint_t wc)); +_GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc)); +#endif +_GL_CXXALIASWARN (iswalnum); +_GL_CXXALIASWARN (iswalpha); +_GL_CXXALIASWARN (iswcntrl); +_GL_CXXALIASWARN (iswdigit); +_GL_CXXALIASWARN (iswgraph); +_GL_CXXALIASWARN (iswlower); +_GL_CXXALIASWARN (iswprint); +_GL_CXXALIASWARN (iswpunct); +_GL_CXXALIASWARN (iswspace); +_GL_CXXALIASWARN (iswupper); +_GL_CXXALIASWARN (iswxdigit); + +#if @GNULIB_ISWBLANK@ +# if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@ +_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc)); +# else +_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc)); +# endif +_GL_CXXALIASWARN (iswblank); +#endif + +#if !@HAVE_WCTYPE_T@ +# if !GNULIB_defined_wctype_t +typedef void * wctype_t; +# define GNULIB_defined_wctype_t 1 +# endif +#endif + +/* Get a descriptor for a wide character property. */ +#if @GNULIB_WCTYPE@ +# if !@HAVE_WCTYPE_T@ +_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)); +# endif +_GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); +_GL_CXXALIASWARN (wctype); +#elif defined GNULIB_POSIXCHECK +# undef wctype +# if HAVE_RAW_DECL_WCTYPE +_GL_WARN_ON_USE (wctype, "wctype is unportable - " + "use gnulib module wctype for portability"); +# endif +#endif + +/* Test whether a wide character has a given property. + The argument WC must be either a wchar_t value or WEOF. + The argument DESC must have been returned by the wctype() function. */ +#if @GNULIB_ISWCTYPE@ +# if !@HAVE_WCTYPE_T@ +_GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc)); +# endif +_GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc)); +_GL_CXXALIASWARN (iswctype); +#elif defined GNULIB_POSIXCHECK +# undef iswctype +# if HAVE_RAW_DECL_ISWCTYPE +_GL_WARN_ON_USE (iswctype, "iswctype is unportable - " + "use gnulib module iswctype for portability"); +# endif +#endif + +#if @REPLACE_TOWLOWER@ || defined __MINGW32__ +_GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc)); +_GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); +#else +_GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc)); +_GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc)); +#endif +_GL_CXXALIASWARN (towlower); +_GL_CXXALIASWARN (towupper); + +#if !@HAVE_WCTRANS_T@ +# if !GNULIB_defined_wctrans_t +typedef void * wctrans_t; +# define GNULIB_defined_wctrans_t 1 +# endif +#endif + +/* Get a descriptor for a wide character case conversion. */ +#if @GNULIB_WCTRANS@ +# if !@HAVE_WCTRANS_T@ +_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)); +# endif +_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); +_GL_CXXALIASWARN (wctrans); +#elif defined GNULIB_POSIXCHECK +# undef wctrans +# if HAVE_RAW_DECL_WCTRANS +_GL_WARN_ON_USE (wctrans, "wctrans is unportable - " + "use gnulib module wctrans for portability"); +# endif +#endif + +/* Perform a given case conversion on a wide character. + The argument WC must be either a wchar_t value or WEOF. + The argument DESC must have been returned by the wctrans() function. */ +#if @GNULIB_TOWCTRANS@ +# if !@HAVE_WCTRANS_T@ +_GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +# endif +_GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); +_GL_CXXALIASWARN (towctrans); +#elif defined GNULIB_POSIXCHECK +# undef towctrans +# if HAVE_RAW_DECL_TOWCTRANS +_GL_WARN_ON_USE (towctrans, "towctrans is unportable - " + "use gnulib module towctrans for portability"); +# endif +#endif + +_GL_INLINE_HEADER_END + +#endif /* _@GUARD_PREFIX@_WCTYPE_H */ +#endif /* _@GUARD_PREFIX@_WCTYPE_H */ diff --git a/gl/lib/wcwidth.c b/gl/lib/wcwidth.c new file mode 100644 index 0000000..d7837bb --- /dev/null +++ b/gl/lib/wcwidth.c @@ -0,0 +1,50 @@ +/* Determine the number of screen columns needed for a character. + Copyright (C) 2006-2007, 2010-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +/* Get iswprint. */ +#include + +#include "localcharset.h" +#include "streq.h" +#include "uniwidth.h" + +int +wcwidth (wchar_t wc) +#undef wcwidth +{ + /* In UTF-8 locales, use a Unicode aware width function. */ + const char *encoding = locale_charset (); + if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0)) + { + /* We assume that in a UTF-8 locale, a wide character is the same as a + Unicode character. */ + return uc_width (wc, encoding); + } + else + { + /* Otherwise, fall back to the system's wcwidth function. */ +#if HAVE_WCWIDTH + return wcwidth (wc); +#else + return wc == 0 ? 0 : iswprint (wc) ? 1 : -1; +#endif + } +} diff --git a/gl/lib/xalloc-die.c b/gl/lib/xalloc-die.c new file mode 100644 index 0000000..7bdd2a3 --- /dev/null +++ b/gl/lib/xalloc-die.c @@ -0,0 +1,41 @@ +/* Report a memory allocation failure and exit. + + Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "xalloc.h" + +#include + +#include "error.h" +#include "exitfail.h" + +#include "gettext.h" +#define _(msgid) gettext (msgid) + +void +xalloc_die (void) +{ + error (exit_failure, 0, "%s", _("memory exhausted")); + + /* _Noreturn cannot be given to error, since it may return if + its first argument is 0. To help compilers understand the + xalloc_die does not return, call abort. Also, the abort is a + safety feature if exit_failure is 0 (which shouldn't happen). */ + abort (); +} diff --git a/gl/lib/xalloc-oversized.h b/gl/lib/xalloc-oversized.h new file mode 100644 index 0000000..f332922 --- /dev/null +++ b/gl/lib/xalloc-oversized.h @@ -0,0 +1,38 @@ +/* xalloc-oversized.h -- memory allocation size checking + + Copyright (C) 1990-2000, 2003-2004, 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef XALLOC_OVERSIZED_H_ +# define XALLOC_OVERSIZED_H_ + +# include + +/* Return 1 if an array of N objects, each of size S, cannot exist due + to size arithmetic overflow. S must be positive and N must be + nonnegative. This is a macro, not a function, so that it + works correctly even when SIZE_MAX < N. + + By gnulib convention, SIZE_MAX represents overflow in size + calculations, so the conservative dividend to use here is + SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. + However, malloc (SIZE_MAX) fails on all known hosts where + sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for + exactly-SIZE_MAX allocations on such hosts; this avoids a test and + branch when S is known to be 1. */ +# define xalloc_oversized(n, s) \ + ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) + +#endif /* !XALLOC_OVERSIZED_H_ */ diff --git a/gl/lib/xalloc.h b/gl/lib/xalloc.h new file mode 100644 index 0000000..0bd6bce --- /dev/null +++ b/gl/lib/xalloc.h @@ -0,0 +1,262 @@ +/* xalloc.h -- malloc with out-of-memory checking + + Copyright (C) 1990-2000, 2003-2004, 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef XALLOC_H_ +#define XALLOC_H_ + +#include + +#include "xalloc-oversized.h" + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef XALLOC_INLINE +# define XALLOC_INLINE _GL_INLINE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +#if __GNUC__ >= 3 +# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +#else +# define _GL_ATTRIBUTE_MALLOC +#endif + +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) +#else +# define _GL_ATTRIBUTE_ALLOC_SIZE(args) +#endif + +/* This function is always triggered when memory is exhausted. + It must be defined by the application, either explicitly + or by using gnulib's xalloc-die module. This is the + function to call when one wants the program to die because of a + memory allocation failure. */ +extern _Noreturn void xalloc_die (void); + +void *xmalloc (size_t s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); +void *xzalloc (size_t s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); +void *xcalloc (size_t n, size_t s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); +void *xrealloc (void *p, size_t s) + _GL_ATTRIBUTE_ALLOC_SIZE ((2)); +void *x2realloc (void *p, size_t *pn); +void *xmemdup (void const *p, size_t s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((2)); +char *xstrdup (char const *str) + _GL_ATTRIBUTE_MALLOC; + +/* In the following macros, T must be an elementary or structure/union or + typedef'ed type, or a pointer to such a type. To apply one of the + following macros to a function pointer or array type, you need to typedef + it first and use the typedef name. */ + +/* Allocate an object of type T dynamically, with error checking. */ +/* extern t *XMALLOC (typename t); */ +#define XMALLOC(t) ((t *) xmalloc (sizeof (t))) + +/* Allocate memory for N elements of type T, with error checking. */ +/* extern t *XNMALLOC (size_t n, typename t); */ +#define XNMALLOC(n, t) \ + ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t)))) + +/* Allocate an object of type T dynamically, with error checking, + and zero it. */ +/* extern t *XZALLOC (typename t); */ +#define XZALLOC(t) ((t *) xzalloc (sizeof (t))) + +/* Allocate memory for N elements of type T, with error checking, + and zero it. */ +/* extern t *XCALLOC (size_t n, typename t); */ +#define XCALLOC(n, t) \ + ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t)))) + + +/* Allocate an array of N objects, each with S bytes of memory, + dynamically, with error checking. S must be nonzero. */ + +XALLOC_INLINE void *xnmalloc (size_t n, size_t s) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); +XALLOC_INLINE void * +xnmalloc (size_t n, size_t s) +{ + if (xalloc_oversized (n, s)) + xalloc_die (); + return xmalloc (n * s); +} + +/* Change the size of an allocated block of memory P to an array of N + objects each of S bytes, with error checking. S must be nonzero. */ + +XALLOC_INLINE void *xnrealloc (void *p, size_t n, size_t s) + _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)); +XALLOC_INLINE void * +xnrealloc (void *p, size_t n, size_t s) +{ + if (xalloc_oversized (n, s)) + xalloc_die (); + return xrealloc (p, n * s); +} + +/* If P is null, allocate a block of at least *PN such objects; + otherwise, reallocate P so that it contains more than *PN objects + each of S bytes. S must be nonzero. Set *PN to the new number of + objects, and return the pointer to the new block. *PN is never set + to zero, and the returned pointer is never null. + + Repeated reallocations are guaranteed to make progress, either by + allocating an initial block with a nonzero size, or by allocating a + larger block. + + In the following implementation, nonzero sizes are increased by a + factor of approximately 1.5 so that repeated reallocations have + O(N) overall cost rather than O(N**2) cost, but the + specification for this function does not guarantee that rate. + + Here is an example of use: + + int *p = NULL; + size_t used = 0; + size_t allocated = 0; + + void + append_int (int value) + { + if (used == allocated) + p = x2nrealloc (p, &allocated, sizeof *p); + p[used++] = value; + } + + This causes x2nrealloc to allocate a block of some nonzero size the + first time it is called. + + To have finer-grained control over the initial size, set *PN to a + nonzero value before calling this function with P == NULL. For + example: + + int *p = NULL; + size_t used = 0; + size_t allocated = 0; + size_t allocated1 = 1000; + + void + append_int (int value) + { + if (used == allocated) + { + p = x2nrealloc (p, &allocated1, sizeof *p); + allocated = allocated1; + } + p[used++] = value; + } + + */ + +XALLOC_INLINE void * +x2nrealloc (void *p, size_t *pn, size_t s) +{ + size_t n = *pn; + + if (! p) + { + if (! n) + { + /* The approximate size to use for initial small allocation + requests, when the invoking code specifies an old size of + zero. This is the largest "small" request for the GNU C + library malloc. */ + enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; + + n = DEFAULT_MXFAST / s; + n += !n; + } + } + else + { + /* Set N = floor (1.5 * N) + 1 so that progress is made even if N == 0. + Check for overflow, so that N * S stays in size_t range. + The check may be slightly conservative, but an exact check isn't + worth the trouble. */ + if ((size_t) -1 / 3 * 2 / s <= n) + xalloc_die (); + n += n / 2 + 1; + } + + *pn = n; + return xrealloc (p, n * s); +} + +/* Return a pointer to a new buffer of N bytes. This is like xmalloc, + except it returns char *. */ + +XALLOC_INLINE char *xcharalloc (size_t n) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); +XALLOC_INLINE char * +xcharalloc (size_t n) +{ + return XNMALLOC (n, char); +} + +#ifdef __cplusplus +} + +/* C++ does not allow conversions from void * to other pointer types + without a cast. Use templates to work around the problem when + possible. */ + +template inline T * +xrealloc (T *p, size_t s) +{ + return (T *) xrealloc ((void *) p, s); +} + +template inline T * +xnrealloc (T *p, size_t n, size_t s) +{ + return (T *) xnrealloc ((void *) p, n, s); +} + +template inline T * +x2realloc (T *p, size_t *pn) +{ + return (T *) x2realloc ((void *) p, pn); +} + +template inline T * +x2nrealloc (T *p, size_t *pn, size_t s) +{ + return (T *) x2nrealloc ((void *) p, pn, s); +} + +template inline T * +xmemdup (T const *p, size_t s) +{ + return (T *) xmemdup ((void const *) p, s); +} + +#endif + + +#endif /* !XALLOC_H_ */ diff --git a/gl/lib/xgetcwd.c b/gl/lib/xgetcwd.c new file mode 100644 index 0000000..e91e8e5 --- /dev/null +++ b/gl/lib/xgetcwd.c @@ -0,0 +1,41 @@ +/* xgetcwd.c -- return current directory with unlimited length + + Copyright (C) 2001, 2003-2004, 2006-2007, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +#include "xgetcwd.h" + +#include +#include + +#include "xalloc.h" + +/* Return the current directory, newly allocated. + Upon an out-of-memory error, call xalloc_die. + Upon any other type of error, return NULL. */ + +char * +xgetcwd (void) +{ + char *cwd = getcwd (NULL, 0); + if (! cwd && errno == ENOMEM) + xalloc_die (); + return cwd; +} diff --git a/gl/lib/xgetcwd.h b/gl/lib/xgetcwd.h new file mode 100644 index 0000000..9630d6c --- /dev/null +++ b/gl/lib/xgetcwd.h @@ -0,0 +1,17 @@ +/* prototype for xgetcwd + Copyright (C) 1995, 2001, 2003, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +extern char *xgetcwd (void); diff --git a/gl/lib/xmalloc.c b/gl/lib/xmalloc.c new file mode 100644 index 0000000..264d44a --- /dev/null +++ b/gl/lib/xmalloc.c @@ -0,0 +1,122 @@ +/* xmalloc.c -- malloc with out of memory checking + + Copyright (C) 1990-2000, 2002-2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#define XALLOC_INLINE _GL_EXTERN_INLINE + +#include "xalloc.h" + +#include +#include + +/* 1 if calloc is known to be compatible with GNU calloc. This + matters if we are not also using the calloc module, which defines + HAVE_CALLOC_GNU and supports the GNU API even on non-GNU platforms. */ +#if defined HAVE_CALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__) +enum { HAVE_GNU_CALLOC = 1 }; +#else +enum { HAVE_GNU_CALLOC = 0 }; +#endif + +/* Allocate N bytes of memory dynamically, with error checking. */ + +void * +xmalloc (size_t n) +{ + void *p = malloc (n); + if (!p && n != 0) + xalloc_die (); + return p; +} + +/* Change the size of an allocated block of memory P to N bytes, + with error checking. */ + +void * +xrealloc (void *p, size_t n) +{ + if (!n && p) + { + /* The GNU and C99 realloc behaviors disagree here. Act like + GNU, even if the underlying realloc is C99. */ + free (p); + return NULL; + } + + p = realloc (p, n); + if (!p && n) + xalloc_die (); + return p; +} + +/* If P is null, allocate a block of at least *PN bytes; otherwise, + reallocate P so that it contains more than *PN bytes. *PN must be + nonzero unless P is null. Set *PN to the new block's size, and + return the pointer to the new block. *PN is never set to zero, and + the returned pointer is never null. */ + +void * +x2realloc (void *p, size_t *pn) +{ + return x2nrealloc (p, pn, 1); +} + +/* Allocate S bytes of zeroed memory dynamically, with error checking. + There's no need for xnzalloc (N, S), since it would be equivalent + to xcalloc (N, S). */ + +void * +xzalloc (size_t s) +{ + return memset (xmalloc (s), 0, s); +} + +/* Allocate zeroed memory for N elements of S bytes, with error + checking. S must be nonzero. */ + +void * +xcalloc (size_t n, size_t s) +{ + void *p; + /* Test for overflow, since some calloc implementations don't have + proper overflow checks. But omit overflow and size-zero tests if + HAVE_GNU_CALLOC, since GNU calloc catches overflow and never + returns NULL if successful. */ + if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s)) + || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0))) + xalloc_die (); + return p; +} + +/* Clone an object P of size S, with error checking. There's no need + for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any + need for an arithmetic overflow check. */ + +void * +xmemdup (void const *p, size_t s) +{ + return memcpy (xmalloc (s), p, s); +} + +/* Clone STRING. */ + +char * +xstrdup (char const *string) +{ + return xmemdup (string, strlen (string) + 1); +} diff --git a/gl/lib/xsize.c b/gl/lib/xsize.c new file mode 100644 index 0000000..4b4914c --- /dev/null +++ b/gl/lib/xsize.c @@ -0,0 +1,3 @@ +#include +#define XSIZE_INLINE _GL_EXTERN_INLINE +#include "xsize.h" diff --git a/gl/lib/xsize.h b/gl/lib/xsize.h new file mode 100644 index 0000000..fd12c67 --- /dev/null +++ b/gl/lib/xsize.h @@ -0,0 +1,117 @@ +/* xsize.h -- Checked size_t computations. + + Copyright (C) 2003, 2008-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _XSIZE_H +#define _XSIZE_H + +/* Get size_t. */ +#include + +/* Get SIZE_MAX. */ +#include +#if HAVE_STDINT_H +# include +#endif + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#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). + These computations can lead to overflow. When this happens, malloc() + returns a piece of memory that is way too small, and the program then + crashes while attempting to fill the memory. + To avoid this, the functions and macros in this file check for overflow. + The convention is that SIZE_MAX represents overflow. + malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc + implementation that uses mmap --, it's recommended to use size_overflow_p() + or size_in_bounds_p() before invoking malloc(). + The example thus becomes: + size_t size = xsum (header_size, xtimes (n, element_size)); + void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); +*/ + +/* Convert an arbitrary value >= 0 to type size_t. */ +#define xcast_size_t(N) \ + ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) + +/* Sum of two sizes, with overflow check. */ +XSIZE_INLINE size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xsum (size_t size1, size_t size2) +{ + size_t sum = size1 + size2; + return (sum >= size1 ? sum : SIZE_MAX); +} + +/* Sum of three sizes, with overflow check. */ +XSIZE_INLINE size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xsum3 (size_t size1, size_t size2, size_t size3) +{ + return xsum (xsum (size1, size2), size3); +} + +/* Sum of four sizes, with overflow check. */ +XSIZE_INLINE size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) +{ + return xsum (xsum (xsum (size1, size2), size3), size4); +} + +/* Maximum of two sizes, with overflow check. */ +XSIZE_INLINE size_t +#if __GNUC__ >= 3 +__attribute__ ((__pure__)) +#endif +xmax (size_t size1, size_t size2) +{ + /* No explicit check is needed here, because for any n: + max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ + return (size1 >= size2 ? size1 : 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 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) + +/* Check for overflow. */ +#define size_overflow_p(SIZE) \ + ((SIZE) == SIZE_MAX) +/* Check against overflow. */ +#define size_in_bounds_p(SIZE) \ + ((SIZE) != SIZE_MAX) + +_GL_INLINE_HEADER_END + +#endif /* _XSIZE_H */ diff --git a/gl/lib/xstrndup.c b/gl/lib/xstrndup.c new file mode 100644 index 0000000..d2259c8 --- /dev/null +++ b/gl/lib/xstrndup.c @@ -0,0 +1,36 @@ +/* Duplicate a bounded initial segment of a string, with out-of-memory + checking. + Copyright (C) 2003, 2006-2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "xstrndup.h" + +#include +#include "xalloc.h" + +/* Return a newly allocated copy of at most N bytes of STRING. + In other words, return a copy of the initial segment of length N of + STRING. */ +char * +xstrndup (const char *string, size_t n) +{ + char *s = strndup (string, n); + if (! s) + xalloc_die (); + return s; +} diff --git a/gl/lib/xstrndup.h b/gl/lib/xstrndup.h new file mode 100644 index 0000000..6a409f7 --- /dev/null +++ b/gl/lib/xstrndup.h @@ -0,0 +1,23 @@ +/* Duplicate a bounded initial segment of a string, with out-of-memory + checking. + Copyright (C) 2003, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Return a newly allocated copy of at most N bytes of STRING. + In other words, return a copy of the initial segment of length N of + STRING. */ +extern char *xstrndup (const char *string, size_t n); diff --git a/gl/lib/xstrtod.c b/gl/lib/xstrtod.c new file mode 100644 index 0000000..7caa615 --- /dev/null +++ b/gl/lib/xstrtod.c @@ -0,0 +1,71 @@ +/* error-checking interface to strtod-like functions + + Copyright (C) 1996, 1999-2000, 2003-2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#include + +#include "xstrtod.h" + +#include +#include +#include + +#if LONG +# define XSTRTOD xstrtold +# define DOUBLE long double +#else +# define XSTRTOD xstrtod +# define DOUBLE double +#endif + +/* An interface to a string-to-floating-point conversion function that + encapsulates all the error checking one should usually perform. + Like strtod/strtold, but upon successful + conversion put the result in *RESULT and return true. Return + false and don't modify *RESULT upon any failure. CONVERT + specifies the conversion function, e.g., strtod itself. */ + +bool +XSTRTOD (char const *str, char const **ptr, DOUBLE *result, + DOUBLE (*convert) (char const *, char **)) +{ + DOUBLE val; + char *terminator; + bool ok = true; + + errno = 0; + val = convert (str, &terminator); + + /* Having a non-zero terminator is an error only when PTR is NULL. */ + if (terminator == str || (ptr == NULL && *terminator != '\0')) + ok = false; + else + { + /* Allow underflow (in which case CONVERT returns zero), + but flag overflow as an error. */ + if (val != 0 && errno == ERANGE) + ok = false; + } + + if (ptr != NULL) + *ptr = terminator; + + *result = val; + return ok; +} diff --git a/gl/lib/xstrtod.h b/gl/lib/xstrtod.h new file mode 100644 index 0000000..1fb8d7b --- /dev/null +++ b/gl/lib/xstrtod.h @@ -0,0 +1,31 @@ +/* Error-checking interface to strtod-like functions. + + Copyright (C) 1996, 1998, 2003-2004, 2006, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#ifndef XSTRTOD_H +# define XSTRTOD_H 1 + +# include + +bool xstrtod (const char *str, const char **ptr, double *result, + double (*convert) (char const *, char **)); +bool xstrtold (const char *str, const char **ptr, long double *result, + long double (*convert) (char const *, char **)); + +#endif /* not XSTRTOD_H */ diff --git a/gl/lib/xstrtol-error.c b/gl/lib/xstrtol-error.c new file mode 100644 index 0000000..9629dab --- /dev/null +++ b/gl/lib/xstrtol-error.c @@ -0,0 +1,98 @@ +/* A more useful interface to strtol. + + Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include "xstrtol.h" + +#include + +#include "error.h" +#include "exitfail.h" +#include "gettext.h" + +#define N_(msgid) msgid + +/* Report an error for an invalid integer in an option argument. + + ERR is the error code returned by one of the xstrto* functions. + + Use OPT_IDX to decide whether to print the short option string "C" + or "-C" or a long option string derived from LONG_OPTION. OPT_IDX + is -2 if the short option "C" was used, without any leading "-"; it + is -1 if the short option "-C" was used; otherwise it is an index + into LONG_OPTIONS, which should have a name preceded by two '-' + characters. + + ARG is the option-argument containing the integer. + + After reporting an error, exit with status EXIT_STATUS if it is + nonzero. */ + +static void +xstrtol_error (enum strtol_error err, + int opt_idx, char c, struct option const *long_options, + char const *arg, + int exit_status) +{ + char const *hyphens = "--"; + char const *msgid; + char const *option; + char option_buffer[2]; + + switch (err) + { + default: + abort (); + + case LONGINT_INVALID: + msgid = N_("invalid %s%s argument '%s'"); + break; + + case LONGINT_INVALID_SUFFIX_CHAR: + case LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW: + msgid = N_("invalid suffix in %s%s argument '%s'"); + break; + + case LONGINT_OVERFLOW: + msgid = N_("%s%s argument '%s' too large"); + break; + } + + if (opt_idx < 0) + { + hyphens -= opt_idx; + option_buffer[0] = c; + option_buffer[1] = '\0'; + option = option_buffer; + } + else + option = long_options[opt_idx].name; + + error (exit_status, 0, gettext (msgid), hyphens, option, arg); +} + +/* Like xstrtol_error, except exit with a failure status. */ + +void +xstrtol_fatal (enum strtol_error err, + int opt_idx, char c, struct option const *long_options, + char const *arg) +{ + xstrtol_error (err, opt_idx, c, long_options, arg, exit_failure); + abort (); +} diff --git a/gl/lib/xstrtol.c b/gl/lib/xstrtol.c new file mode 100644 index 0000000..f6d535a --- /dev/null +++ b/gl/lib/xstrtol.c @@ -0,0 +1,241 @@ +/* A more useful interface to strtol. + + Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Jim Meyering. */ + +#ifndef __strtol +# define __strtol strtol +# define __strtol_t long int +# define __xstrtol xstrtol +# define STRTOL_T_MINIMUM LONG_MIN +# define STRTOL_T_MAXIMUM LONG_MAX +#endif + +#include + +#include "xstrtol.h" + +/* Some pre-ANSI implementations (e.g. SunOS 4) + need stderr defined if assertion checking is enabled. */ +#include + +#include +#include +#include +#include +#include +#include + +#include "intprops.h" + +/* xstrtoll.c and xstrtoull.c, which include this file, require that + ULLONG_MAX, LLONG_MAX, LLONG_MIN are defined, but does not + define them on all platforms. */ +#ifndef ULLONG_MAX +# define ULLONG_MAX TYPE_MAXIMUM (unsigned long long) +#endif +#ifndef LLONG_MAX +# define LLONG_MAX TYPE_MAXIMUM (long long int) +#endif +#ifndef LLONG_MIN +# define LLONG_MIN TYPE_MINIMUM (long long int) +#endif + +static strtol_error +bkm_scale (__strtol_t *x, int scale_factor) +{ + if (TYPE_SIGNED (__strtol_t) && *x < STRTOL_T_MINIMUM / scale_factor) + { + *x = STRTOL_T_MINIMUM; + return LONGINT_OVERFLOW; + } + if (STRTOL_T_MAXIMUM / scale_factor < *x) + { + *x = STRTOL_T_MAXIMUM; + return LONGINT_OVERFLOW; + } + *x *= scale_factor; + return LONGINT_OK; +} + +static strtol_error +bkm_scale_by_power (__strtol_t *x, int base, int power) +{ + strtol_error err = LONGINT_OK; + while (power--) + err |= bkm_scale (x, base); + return err; +} + +/* FIXME: comment. */ + +strtol_error +__xstrtol (const char *s, char **ptr, int strtol_base, + __strtol_t *val, const char *valid_suffixes) +{ + char *t_ptr; + char **p; + __strtol_t tmp; + strtol_error err = LONGINT_OK; + + assert (0 <= strtol_base && strtol_base <= 36); + + p = (ptr ? ptr : &t_ptr); + + if (! TYPE_SIGNED (__strtol_t)) + { + const char *q = s; + unsigned char ch = *q; + while (isspace (ch)) + ch = *++q; + if (ch == '-') + return LONGINT_INVALID; + } + + errno = 0; + tmp = __strtol (s, p, strtol_base); + + if (*p == s) + { + /* If there is no number but there is a valid suffix, assume the + number is 1. The string is invalid otherwise. */ + if (valid_suffixes && **p && strchr (valid_suffixes, **p)) + tmp = 1; + else + return LONGINT_INVALID; + } + else if (errno != 0) + { + if (errno != ERANGE) + return LONGINT_INVALID; + err = LONGINT_OVERFLOW; + } + + /* Let valid_suffixes == NULL mean "allow any suffix". */ + /* FIXME: update all callers except the ones that allow suffixes + after the number, changing last parameter NULL to "". */ + if (!valid_suffixes) + { + *val = tmp; + return err; + } + + if (**p != '\0') + { + int base = 1024; + int suffixes = 1; + strtol_error overflow; + + if (!strchr (valid_suffixes, **p)) + { + *val = tmp; + return err | LONGINT_INVALID_SUFFIX_CHAR; + } + + if (strchr (valid_suffixes, '0')) + { + /* The "valid suffix" '0' is a special flag meaning that + an optional second suffix is allowed, which can change + the base. A suffix "B" (e.g. "100MB") stands for a power + of 1000, whereas a suffix "iB" (e.g. "100MiB") stands for + a power of 1024. If no suffix (e.g. "100M"), assume + power-of-1024. */ + + switch (p[0][1]) + { + case 'i': + if (p[0][2] == 'B') + suffixes += 2; + break; + + case 'B': + case 'D': /* 'D' is obsolescent */ + base = 1000; + suffixes++; + break; + } + } + + switch (**p) + { + case 'b': + overflow = bkm_scale (&tmp, 512); + break; + + case 'B': + overflow = bkm_scale (&tmp, 1024); + break; + + case 'c': + overflow = LONGINT_OK; + break; + + case 'E': /* exa or exbi */ + overflow = bkm_scale_by_power (&tmp, base, 6); + break; + + case 'G': /* giga or gibi */ + case 'g': /* 'g' is undocumented; for compatibility only */ + overflow = bkm_scale_by_power (&tmp, base, 3); + break; + + case 'k': /* kilo */ + case 'K': /* kibi */ + overflow = bkm_scale_by_power (&tmp, base, 1); + break; + + case 'M': /* mega or mebi */ + case 'm': /* 'm' is undocumented; for compatibility only */ + overflow = bkm_scale_by_power (&tmp, base, 2); + break; + + case 'P': /* peta or pebi */ + overflow = bkm_scale_by_power (&tmp, base, 5); + break; + + case 'T': /* tera or tebi */ + case 't': /* 't' is undocumented; for compatibility only */ + overflow = bkm_scale_by_power (&tmp, base, 4); + break; + + case 'w': + overflow = bkm_scale (&tmp, 2); + break; + + case 'Y': /* yotta or 2**80 */ + overflow = bkm_scale_by_power (&tmp, base, 8); + break; + + case 'Z': /* zetta or 2**70 */ + overflow = bkm_scale_by_power (&tmp, base, 7); + break; + + default: + *val = tmp; + return err | LONGINT_INVALID_SUFFIX_CHAR; + } + + err |= overflow; + *p += suffixes; + if (**p) + err |= LONGINT_INVALID_SUFFIX_CHAR; + } + + *val = tmp; + return err; +} diff --git a/gl/lib/xstrtol.h b/gl/lib/xstrtol.h new file mode 100644 index 0000000..fe54f6a --- /dev/null +++ b/gl/lib/xstrtol.h @@ -0,0 +1,73 @@ +/* A more useful interface to strtol. + + Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2014 Free Software + Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef XSTRTOL_H_ +# define XSTRTOL_H_ 1 + +# include +# include + +# ifndef _STRTOL_ERROR +enum strtol_error + { + LONGINT_OK = 0, + + /* These two values can be ORed together, to indicate that both + errors occurred. */ + LONGINT_OVERFLOW = 1, + LONGINT_INVALID_SUFFIX_CHAR = 2, + + LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW = (LONGINT_INVALID_SUFFIX_CHAR + | LONGINT_OVERFLOW), + LONGINT_INVALID = 4 + }; +typedef enum strtol_error strtol_error; +# endif + +# define _DECLARE_XSTRTOL(name, type) \ + strtol_error name (const char *, char **, int, type *, const char *); +_DECLARE_XSTRTOL (xstrtol, long int) +_DECLARE_XSTRTOL (xstrtoul, unsigned long int) +_DECLARE_XSTRTOL (xstrtoimax, intmax_t) +_DECLARE_XSTRTOL (xstrtoumax, uintmax_t) + +#if HAVE_LONG_LONG_INT +_DECLARE_XSTRTOL (xstrtoll, long long int) +_DECLARE_XSTRTOL (xstrtoull, unsigned long long int) +#endif + +/* Report an error for an invalid integer in an option argument. + + ERR is the error code returned by one of the xstrto* functions. + + Use OPT_IDX to decide whether to print the short option string "C" + or "-C" or a long option string derived from LONG_OPTION. OPT_IDX + is -2 if the short option "C" was used, without any leading "-"; it + is -1 if the short option "-C" was used; otherwise it is an index + into LONG_OPTIONS, which should have a name preceded by two '-' + characters. + + ARG is the option-argument containing the integer. + + After reporting an error, exit with a failure status. */ + +_Noreturn void xstrtol_fatal (enum strtol_error, + int, char, struct option const *, + char const *); + +#endif /* not XSTRTOL_H_ */ diff --git a/gnulib/lib/xstrtoul.c b/gl/lib/xstrtoul.c similarity index 100% rename from gnulib/lib/xstrtoul.c rename to gl/lib/xstrtoul.c diff --git a/gnulib/lib/xstrtoumax.c b/gl/lib/xstrtoumax.c similarity index 100% rename from gnulib/lib/xstrtoumax.c rename to gl/lib/xstrtoumax.c diff --git a/gl/lib/yesno.c b/gl/lib/yesno.c new file mode 100644 index 0000000..ddb3445 --- /dev/null +++ b/gl/lib/yesno.c @@ -0,0 +1,60 @@ +/* yesno.c -- read a yes/no response from stdin + + Copyright (C) 1990, 1998, 2001, 2003-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "yesno.h" + +#include +#include + +/* Return true if we read an affirmative line from standard input. + + Since this function uses stdin, it is suggested that the caller not + use STDIN_FILENO directly, and also that the line + atexit(close_stdin) be added to main(). */ + +bool +yesno (void) +{ + bool yes; + +#if ENABLE_NLS + char *response = NULL; + size_t response_size = 0; + ssize_t response_len = getline (&response, &response_size, stdin); + + if (response_len <= 0) + yes = false; + else + { + response[response_len - 1] = '\0'; + yes = (0 < rpmatch (response)); + } + + free (response); +#else + /* Test against "^[yY]", hardcoded to avoid requiring getline, + regex, and rpmatch. */ + int c = getchar (); + yes = (c == 'y' || c == 'Y'); + while (c != '\n' && c != EOF) + c = getchar (); +#endif + + return yes; +} diff --git a/gl/lib/yesno.h b/gl/lib/yesno.h new file mode 100644 index 0000000..3a6d8c9 --- /dev/null +++ b/gl/lib/yesno.h @@ -0,0 +1,24 @@ +/* declare yesno + Copyright (C) 2004, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef YESNO_H_ +# define YESNO_H_ + +# include + +bool yesno (void); + +#endif diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4 new file mode 100644 index 0000000..8eca551 --- /dev/null +++ b/gl/m4/00gnulib.m4 @@ -0,0 +1,46 @@ +# 00gnulib.m4 serial 3 +dnl Copyright (C) 2009-2014 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 This file must be named something that sorts before all other +dnl gnulib-provided .m4 files. It is needed until such time as we can +dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and +dnl m4_divert semantics. + +# Until autoconf 2.63, handling of the diversion stack required m4_init +# to be called first; but this does not happen with aclocal. Wrapping +# the entire execution in another layer of the diversion stack fixes this. +# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4 +# for whether it was FIFO or LIFO; in order to properly balance with +# m4_init, we need to undo our push just before anything wrapped within +# the m4_init body. The way to ensure this is to wrap both sides of +# m4_init with a one-shot macro that does the pop at the right time. +m4_ifndef([_m4_divert_diversion], +[m4_divert_push([KILL]) +m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])]) +m4_define([m4_init], + [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])]) + + +# AC_DEFUN_ONCE([NAME], VALUE) +# ---------------------------- +# Define NAME to expand to VALUE on the first use (whether by direct +# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. +# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This +# definition is slower than the version in Autoconf 2.64, because it +# can only use interfaces that existed since 2.59; but it achieves the +# same effect. Quoting is necessary to avoid confusing Automake. +m4_version_prereq([2.63.263], [], +[m4_define([AC][_DEFUN_ONCE], + [AC][_DEFUN([$1], + [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], + [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl +[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) + +# gl_00GNULIB +# ----------- +# Witness macro that this file has been included. Needed to force +# Automake to include this file prior to all other gnulib .m4 files. +AC_DEFUN([gl_00GNULIB]) diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4 new file mode 100644 index 0000000..ce3e39e --- /dev/null +++ b/gl/m4/absolute-header.m4 @@ -0,0 +1,102 @@ +# absolute-header.m4 serial 16 +dnl Copyright (C) 2006-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Derek Price. + +# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...) +# --------------------------------------- +# Find the absolute name of a header file, testing first if the header exists. +# If the header were sys/inttypes.h, this macro would define +# ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h +# in config.h +# (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"'). +# The three "///" are to pacify Sun C 5.8, which otherwise would say +# "warning: #include of /usr/include/... may be non-portable". +# Use '""', not '<>', so that the /// cannot be confused with a C99 comment. +# Note: This macro assumes that the header file is not empty after +# preprocessing, i.e. it does not only define preprocessor macros but also +# provides some type/enum definitions or function/variable declarations. +AC_DEFUN([gl_ABSOLUTE_HEADER], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_PREPROC_REQUIRE()dnl +dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted +dnl until we can assume autoconf 2.64 or newer. +m4_foreach_w([gl_HEADER_NAME], [$1], + [AS_VAR_PUSHDEF([gl_absolute_header], + [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl + AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>], + m4_defn([gl_absolute_header]), + [AS_VAR_PUSHDEF([ac_header_exists], + [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl + AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl + if test AS_VAR_GET(ac_header_exists) = yes; then + gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME])) + fi + AS_VAR_POPDEF([ac_header_exists])dnl + ])dnl + AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])), + ["AS_VAR_GET(gl_absolute_header)"], + [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.]) + AS_VAR_POPDEF([gl_absolute_header])dnl +])dnl +])# gl_ABSOLUTE_HEADER + +# gl_ABSOLUTE_HEADER_ONE(HEADER) +# ------------------------------ +# Like gl_ABSOLUTE_HEADER, except that: +# - it assumes that the header exists, +# - it uses the current CPPFLAGS, +# - it does not cache the result, +# - it is silent. +AC_DEFUN([gl_ABSOLUTE_HEADER_ONE], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])]) + dnl AIX "xlc -E" and "cc -E" omit #line directives for header files + dnl that contain only a #include of other header files and no + dnl non-comment tokens of their own. This leads to a failure to + dnl detect the absolute name of , , + dnl and others. The workaround is to force preservation of comments + dnl through option -C. This ensures all necessary #line directives + dnl are present. GCC supports option -C as well. + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac +changequote(,) + case "$host_os" in + mingw*) + dnl For the sake of native Windows compilers (excluding gcc), + dnl treat backslash as a directory separator, like /. + dnl Actually, these compilers use a double-backslash as + dnl directory separator, inside the + dnl # line "filename" + dnl directives. + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + dnl A sed expression that turns a string into a basic regular + dnl expression, for use within "/.../". + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo '$1' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' +changequote([,]) + dnl eval is necessary to expand gl_absname_cpp. + dnl Ultrix and Pyramid sh refuse to redirect output of eval, + dnl so use subshell. + AS_VAR_SET([gl_cv_absolute_]AS_TR_SH([[$1]]), +[`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | + sed -n "$gl_absolute_header_sed"`]) +]) diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4 new file mode 100644 index 0000000..d7bdea6 --- /dev/null +++ b/gl/m4/alloca.m4 @@ -0,0 +1,121 @@ +# alloca.m4 serial 14 +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_ALLOCA], +[ + AC_REQUIRE([AC_FUNC_ALLOCA]) + if test $ac_cv_func_alloca_works = no; then + gl_PREREQ_ALLOCA + fi + + # Define an additional variable used in the Makefile substitution. + if test $ac_cv_working_alloca_h = yes; then + AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ + AC_EGREP_CPP([Need own alloca], [ +#if defined __GNUC__ || defined _AIX || defined _MSC_VER + Need own alloca +#endif + ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) + ]) + if test $gl_cv_rpl_alloca = yes; then + dnl OK, alloca can be implemented through a compiler built-in. + AC_DEFINE([HAVE_ALLOCA], [1], + [Define to 1 if you have 'alloca' after including , + a header that may be supplied by this distribution.]) + ALLOCA_H=alloca.h + else + dnl alloca exists as a library function, i.e. it is slow and probably + dnl a memory leak. Don't define HAVE_ALLOCA in this case. + ALLOCA_H= + fi + else + ALLOCA_H=alloca.h + fi + AC_SUBST([ALLOCA_H]) + AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"]) +]) + +# Prerequisites of lib/alloca.c. +# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. +AC_DEFUN([gl_PREREQ_ALLOCA], [:]) + +# This works around a bug in autoconf <= 2.68. +# See . + +m4_version_prereq([2.69], [] ,[ + +# This is taken from the following Autoconf patch: +# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497 + +# _AC_LIBOBJ_ALLOCA +# ----------------- +# Set up the LIBOBJ replacement of 'alloca'. Well, not exactly +# AC_LIBOBJ since we actually set the output variable 'ALLOCA'. +# Nevertheless, for Automake, AC_LIBSOURCES it. +m4_define([_AC_LIBOBJ_ALLOCA], +[# The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. +AC_LIBSOURCES(alloca.c) +AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl +AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.]) + +AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray, +[AC_EGREP_CPP(webecray, +[#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif +], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + AC_CHECK_FUNC($ac_func, + [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, + [Define to one of '_getb67', 'GETB67', + 'getb67' for Cray-2 and Cray-YMP + systems. This function is required for + 'alloca.c' support on those systems.]) + break]) + done +fi + +AC_CACHE_CHECK([stack direction for C alloca], + [ac_cv_c_stack_direction], +[AC_RUN_IFELSE([AC_LANG_SOURCE( +[AC_INCLUDES_DEFAULT +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} + +int +main (int argc, char **argv) +{ + return find_stack_direction (0, argc + !argv + 20) < 0; +}])], + [ac_cv_c_stack_direction=1], + [ac_cv_c_stack_direction=-1], + [ac_cv_c_stack_direction=0])]) +AH_VERBATIM([STACK_DIRECTION], +[/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +@%:@undef STACK_DIRECTION])dnl +AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) +])# _AC_LIBOBJ_ALLOCA +]) diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4 new file mode 100644 index 0000000..f01699a --- /dev/null +++ b/gl/m4/arpa_inet_h.m4 @@ -0,0 +1,57 @@ +# arpa_inet_h.m4 serial 13 +dnl Copyright (C) 2006, 2008-2014 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 Written by Simon Josefsson and Bruno Haible + +AC_DEFUN([gl_HEADER_ARPA_INET], +[ + 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_ARPA_INET_H_DEFAULTS]) + + AC_CHECK_HEADERS_ONCE([arpa/inet.h]) + if test $ac_cv_header_arpa_inet_h = yes; then + HAVE_ARPA_INET_H=1 + else + HAVE_ARPA_INET_H=0 + fi + AC_SUBST([HAVE_ARPA_INET_H]) + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([arpa/inet.h]) + + AC_REQUIRE([gl_FEATURES_H]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ +/* On some systems, this header is not self-consistent. */ +#if !(defined __GLIBC__ || defined __UCLIBC__) +# include +#endif +#ifdef __TANDEM +# include +#endif +#include + ]], [inet_ntop inet_pton]) +]) + +AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_ARPA_INET_H_DEFAULTS], +[ + GNULIB_INET_NTOP=0; AC_SUBST([GNULIB_INET_NTOP]) + GNULIB_INET_PTON=0; AC_SUBST([GNULIB_INET_PTON]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP]) + HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON]) + REPLACE_INET_NTOP=0; AC_SUBST([REPLACE_INET_NTOP]) + REPLACE_INET_PTON=0; AC_SUBST([REPLACE_INET_PTON]) +]) diff --git a/gl/m4/assert.m4 b/gl/m4/assert.m4 new file mode 100644 index 0000000..b9bb634 --- /dev/null +++ b/gl/m4/assert.m4 @@ -0,0 +1,24 @@ +#serial 7 + +# Copyright (C) 1998-1999, 2001, 2004, 2008-2014 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. + +dnl based on code from Eleftherios Gkioulekas +dnl Autoconf 2.60 provides AC_HEADER_ASSERT for the same purpose, but +dnl it has broken semantics for --enable-assert until 2.64. +AC_DEFUN([gl_ASSERT], +[ + AC_MSG_CHECKING([whether to enable assertions]) + AC_ARG_ENABLE([assert], + [AS_HELP_STRING([--disable-assert], [turn off assertions])], + [AS_IF([test "x$enableval" = xno], + [AC_DEFINE([NDEBUG], [1], + [Define to 1 if assertions should be disabled.])], + [test "x$enableval" != xyes], + [AC_MSG_WARN([invalid argument supplied to --enable-assert]) + enable_assert=yes])], + [enable_assert=yes]) + AC_MSG_RESULT([$enable_assert]) +]) diff --git a/gl/m4/bison.m4 b/gl/m4/bison.m4 new file mode 100644 index 0000000..c003367 --- /dev/null +++ b/gl/m4/bison.m4 @@ -0,0 +1,24 @@ +# serial 7 + +# Copyright (C) 2002, 2005, 2009-2014 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. + +AC_DEFUN([gl_BISON], +[ + # parse-datetime.y works with bison only. + : ${YACC='bison -y'} +dnl +dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB +dnl requires an Autoconf greater than 2.59c, but it will probably still be +dnl useful to override the description of YACC in the --help output, re +dnl parse-datetime.y assuming 'bison -y'. + AC_ARG_VAR([YACC], +[The "Yet Another C Compiler" implementation to use. Defaults to 'bison -y'. +Values other than 'bison -y' will most likely break on most systems.])dnl + AC_ARG_VAR([YFLAGS], +[YFLAGS contains the list arguments that will be passed by default to Bison. +This script will default YFLAGS to the empty string to avoid a default value of +'-d' given by some make applications.])dnl +]) diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4 new file mode 100644 index 0000000..9988944 --- /dev/null +++ b/gl/m4/btowc.m4 @@ -0,0 +1,116 @@ +# btowc.m4 serial 10 +dnl Copyright (C) 2008-2014 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_BTOWC], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + + dnl Check whether is usable at all, first. Otherwise the test + dnl program below may lead to an endless loop. See + dnl . + AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) + + AC_CHECK_FUNCS_ONCE([btowc]) + if test $ac_cv_func_btowc = no; then + HAVE_BTOWC=0 + else + + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gt_LOCALE_FR]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Cygwin 1.7.2 btowc('\0') is WEOF, not 0. + AC_CACHE_CHECK([whether btowc(0) is correct], + [gl_cv_func_btowc_nul], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (btowc ('\0') != 0) + return 1; + return 0; +}]])], + [gl_cv_func_btowc_nul=yes], + [gl_cv_func_btowc_nul=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess no on Cygwin. + cygwin*) gl_cv_func_btowc_nul="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_btowc_nul="guessing yes" ;; + esac +changequote([,])dnl + ]) + ]) + + dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF. + AC_CACHE_CHECK([whether btowc(EOF) is correct], + [gl_cv_func_btowc_eof], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on IRIX. + irix*) gl_cv_func_btowc_eof="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_btowc_eof="guessing yes" ;; + esac +changequote([,])dnl + if test $LOCALE_FR != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) + { + if (btowc (EOF) != WEOF) + return 1; + } + return 0; +}]])], + [gl_cv_func_btowc_eof=yes], + [gl_cv_func_btowc_eof=no], + [:]) + fi + ]) + + case "$gl_cv_func_btowc_nul" in + *yes) ;; + *) REPLACE_BTOWC=1 ;; + esac + case "$gl_cv_func_btowc_eof" in + *yes) ;; + *) REPLACE_BTOWC=1 ;; + esac + fi +]) + +# Prerequisites of lib/btowc.c. +AC_DEFUN([gl_PREREQ_BTOWC], [ + : +]) diff --git a/gl/m4/byteswap.m4 b/gl/m4/byteswap.m4 new file mode 100644 index 0000000..6d6357c --- /dev/null +++ b/gl/m4/byteswap.m4 @@ -0,0 +1,19 @@ +# byteswap.m4 serial 4 +dnl Copyright (C) 2005, 2007, 2009-2014 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 Written by Oskar Liljeblad. + +AC_DEFUN([gl_BYTESWAP], +[ + dnl Prerequisites of lib/byteswap.in.h. + AC_CHECK_HEADERS([byteswap.h], [ + BYTESWAP_H='' + ], [ + BYTESWAP_H='byteswap.h' + ]) + AC_SUBST([BYTESWAP_H]) + AM_CONDITIONAL([GL_GENERATE_BYTESWAP_H], [test -n "$BYTESWAP_H"]) +]) diff --git a/gl/m4/canonicalize.m4 b/gl/m4/canonicalize.m4 new file mode 100644 index 0000000..ace4556 --- /dev/null +++ b/gl/m4/canonicalize.m4 @@ -0,0 +1,124 @@ +# canonicalize.m4 serial 26 + +dnl Copyright (C) 2003-2007, 2009-2014 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. + +# Provides canonicalize_file_name and canonicalize_filename_mode, but does +# not provide or fix realpath. +AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE], +[ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([canonicalize_file_name]) + AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) + AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) + if test $ac_cv_func_canonicalize_file_name = no; then + HAVE_CANONICALIZE_FILE_NAME=0 + else + case "$gl_cv_func_realpath_works" in + *yes) ;; + *) REPLACE_CANONICALIZE_FILE_NAME=1 ;; + esac + fi +]) + +# Provides canonicalize_file_name and realpath. +AC_DEFUN([gl_CANONICALIZE_LGPL], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE]) + if test $ac_cv_func_canonicalize_file_name = no; then + HAVE_CANONICALIZE_FILE_NAME=0 + if test $ac_cv_func_realpath = no; then + HAVE_REALPATH=0 + else + case "$gl_cv_func_realpath_works" in + *yes) ;; + *) REPLACE_REALPATH=1 ;; + esac + fi + else + case "$gl_cv_func_realpath_works" in + *yes) + ;; + *) + REPLACE_CANONICALIZE_FILE_NAME=1 + REPLACE_REALPATH=1 + ;; + esac + fi +]) + +# Like gl_CANONICALIZE_LGPL, except prepare for separate compilation +# (no REPLACE_CANONICALIZE_FILE_NAME, no REPLACE_REALPATH, no AC_LIBOBJ). +AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], +[ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink]) + AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) + AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) + AC_CHECK_HEADERS_ONCE([sys/param.h]) +]) + +# Check whether realpath works. Assume that if a platform has both +# realpath and canonicalize_file_name, but the former is broken, then +# so is the latter. +AC_DEFUN([gl_FUNC_REALPATH_WORKS], +[ + AC_CHECK_FUNCS_ONCE([realpath]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [ + touch conftest.a + mkdir conftest.d + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ + ]GL_NOCRASH[ + #include + #include + ]], [[ + int result = 0; + { + char *name = realpath ("conftest.a", NULL); + if (!(name && *name == '/')) + result |= 1; + } + { + char *name = realpath ("conftest.b/../conftest.a", NULL); + if (name != NULL) + result |= 2; + } + { + char *name = realpath ("conftest.a/", NULL); + if (name != NULL) + result |= 4; + } + { + char *name1 = realpath (".", NULL); + char *name2 = realpath ("conftest.d//./..", NULL); + if (strcmp (name1, name2) != 0) + result |= 8; + } + return result; + ]]) + ], + [gl_cv_func_realpath_works=yes], + [gl_cv_func_realpath_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_realpath_works="guessing no" ;; + esac + ]) + rm -rf conftest.a conftest.d + ]) + case "$gl_cv_func_realpath_works" in + *yes) + AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath() + can malloc memory, always gives an absolute path, and handles + trailing slash correctly.]) + ;; + esac +]) diff --git a/gl/m4/chdir-long.m4 b/gl/m4/chdir-long.m4 new file mode 100644 index 0000000..8ed436d --- /dev/null +++ b/gl/m4/chdir-long.m4 @@ -0,0 +1,30 @@ +#serial 15 + +# Use Gnulib's robust chdir function. +# It can handle arbitrarily long directory names, which means +# that when it is given the name of an existing directory, it +# never fails with ENAMETOOLONG. +# Arrange to compile chdir-long.c only on systems that define PATH_MAX. + +dnl Copyright (C) 2004-2007, 2009-2014 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. + +# Written by Jim Meyering. + +AC_DEFUN([gl_FUNC_CHDIR_LONG], +[ + AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) + AC_CACHE_CHECK([whether this system has an arbitrary file name length limit], + gl_cv_have_arbitrary_file_name_length_limit, + [AC_EGREP_CPP([have_arbitrary_file_name_length_limit], + gl_PATHMAX_SNIPPET[ +#ifdef PATH_MAX +have_arbitrary_file_name_length_limit +#endif], + gl_cv_have_arbitrary_file_name_length_limit=yes, + gl_cv_have_arbitrary_file_name_length_limit=no)]) +]) + +AC_DEFUN([gl_PREREQ_CHDIR_LONG], [:]) diff --git a/gl/m4/check-math-lib.m4 b/gl/m4/check-math-lib.m4 new file mode 100644 index 0000000..a3894aa --- /dev/null +++ b/gl/m4/check-math-lib.m4 @@ -0,0 +1,32 @@ +# check-math-lib.m4 serial 4 +dnl Copyright (C) 2007, 2009-2014 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 +dnl gl_CHECK_MATH_LIB (VARIABLE, EXPRESSION [, EXTRA-CODE]) +dnl +dnl Sets the shell VARIABLE according to the libraries needed by EXPRESSION +dnl to compile and link: to the empty string if no extra libraries are needed, +dnl to "-lm" if -lm is needed, or to "missing" if it does not compile and +dnl link either way. +dnl +dnl Example: gl_CHECK_MATH_LIB([ROUNDF_LIBM], [x = roundf (x);]) +AC_DEFUN([gl_CHECK_MATH_LIB], [ + save_LIBS=$LIBS + $1=missing + for libm in "" "-lm"; do + LIBS="$save_LIBS $libm" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + $3 + double x;]], + [$2])], + [$1=$libm +break]) + done + LIBS=$save_LIBS +]) diff --git a/gl/m4/clock_time.m4 b/gl/m4/clock_time.m4 new file mode 100644 index 0000000..6c4a637 --- /dev/null +++ b/gl/m4/clock_time.m4 @@ -0,0 +1,31 @@ +# clock_time.m4 serial 10 +dnl Copyright (C) 2002-2006, 2009-2014 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. + +# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME. +# For a program named, say foo, you should add a line like the following +# in the corresponding Makefile.am file: +# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) + +AC_DEFUN([gl_CLOCK_TIME], +[ + dnl Persuade glibc and Solaris to declare these functions. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. + # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. + + # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* + # programs in the package would end up linked with that potentially-shared + # library, inducing unnecessary run-time overhead. + LIB_CLOCK_GETTIME= + AC_SUBST([LIB_CLOCK_GETTIME]) + gl_saved_libs=$LIBS + AC_SEARCH_LIBS([clock_gettime], [rt posix4], + [test "$ac_cv_search_clock_gettime" = "none required" || + LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) + AC_CHECK_FUNCS([clock_gettime clock_settime]) + LIBS=$gl_saved_libs +]) diff --git a/gl/m4/close-stream.m4 b/gl/m4/close-stream.m4 new file mode 100644 index 0000000..80cde85 --- /dev/null +++ b/gl/m4/close-stream.m4 @@ -0,0 +1,11 @@ +#serial 4 +dnl Copyright (C) 2006-2007, 2009-2014 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 Prerequisites of lib/close-stream.c. +AC_DEFUN([gl_CLOSE_STREAM], +[ + : +]) diff --git a/gl/m4/close.m4 b/gl/m4/close.m4 new file mode 100644 index 0000000..68510c5 --- /dev/null +++ b/gl/m4/close.m4 @@ -0,0 +1,33 @@ +# close.m4 serial 8 +dnl Copyright (C) 2008-2014 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_CLOSE], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_MSVC_INVAL]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_CLOSE=1 + fi + m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [ + gl_PREREQ_SYS_H_WINSOCK2 + if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then + dnl Even if the 'socket' module is not used here, another part of the + dnl application may use it and pass file descriptors that refer to + dnl sockets to the close() function. So enable the support for sockets. + REPLACE_CLOSE=1 + fi + ]) + dnl Replace close() for supporting the gnulib-defined fchdir() function, + dnl to keep fchdir's bookkeeping up-to-date. + m4_ifdef([gl_FUNC_FCHDIR], [ + if test $REPLACE_CLOSE = 0; then + gl_TEST_FCHDIR + if test $HAVE_FCHDIR = 0; then + REPLACE_CLOSE=1 + fi + fi + ]) +]) diff --git a/gl/m4/closedir.m4 b/gl/m4/closedir.m4 new file mode 100644 index 0000000..d234a52 --- /dev/null +++ b/gl/m4/closedir.m4 @@ -0,0 +1,25 @@ +# closedir.m4 serial 2 +dnl Copyright (C) 2011-2014 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_CLOSEDIR], +[ + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + + AC_CHECK_FUNCS([closedir]) + if test $ac_cv_func_closedir = no; then + HAVE_CLOSEDIR=0 + fi + dnl Replace closedir() for supporting the gnulib-defined fchdir() function, + dnl to keep fchdir's bookkeeping up-to-date. + m4_ifdef([gl_FUNC_FCHDIR], [ + gl_TEST_FCHDIR + if test $HAVE_FCHDIR = 0; then + if test $HAVE_CLOSEDIR = 1; then + REPLACE_CLOSEDIR=1 + fi + fi + ]) +]) diff --git a/gl/m4/closein.m4 b/gl/m4/closein.m4 new file mode 100644 index 0000000..db7fb5a --- /dev/null +++ b/gl/m4/closein.m4 @@ -0,0 +1,11 @@ +# closein.m4 serial 2 +dnl Copyright (C) 2007, 2009-2014 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 Prerequisites of lib/closein.c. +AC_DEFUN([gl_CLOSEIN], +[ + : +]) diff --git a/gl/m4/closeout.m4 b/gl/m4/closeout.m4 new file mode 100644 index 0000000..2f0c87e --- /dev/null +++ b/gl/m4/closeout.m4 @@ -0,0 +1,12 @@ +# closeout.m4 serial 6 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +dnl Prerequisites of lib/closeout.c. +AC_DEFUN([gl_CLOSEOUT], +[ + : +]) diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4 new file mode 100644 index 0000000..d7de8d6 --- /dev/null +++ b/gl/m4/codeset.m4 @@ -0,0 +1,23 @@ +# codeset.m4 serial 5 (gettext-0.18.2) +dnl Copyright (C) 2000-2002, 2006, 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[char* cs = nl_langinfo(CODESET); return !cs;]])], + [am_cv_langinfo_codeset=yes], + [am_cv_langinfo_codeset=no]) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE([HAVE_LANGINFO_CODESET], [1], + [Define if you have and nl_langinfo(CODESET).]) + fi +]) diff --git a/gl/m4/configmake.m4 b/gl/m4/configmake.m4 new file mode 100644 index 0000000..0cd86cf --- /dev/null +++ b/gl/m4/configmake.m4 @@ -0,0 +1,55 @@ +# configmake.m4 serial 2 +dnl Copyright (C) 2010-2014 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. + +# gl_CONFIGMAKE_PREP +# ------------------ +# Guarantee all of the standard directory variables, even when used with +# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir +# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b, +# and runstatedir in 1.14.1). +AC_DEFUN([gl_CONFIGMAKE_PREP], +[ + dnl Technically, datadir should default to datarootdir. But if + dnl autoconf is too old to provide datarootdir, then reversing the + dnl definition is a reasonable compromise. Only AC_SUBST a variable + dnl if it was not already defined earlier by autoconf. + if test "x$datarootdir" = x; then + AC_SUBST([datarootdir], ['${datadir}']) + fi + dnl Copy the approach used in autoconf 2.60. + if test "x$docdir" = x; then + AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], + ['${datarootdir}/doc/${PACKAGE_TARNAME}'], + ['${datarootdir}/doc/${PACKAGE}'])]) + fi + dnl The remaining variables missing from autoconf 2.59 are easier. + if test "x$htmldir" = x; then + AC_SUBST([htmldir], ['${docdir}']) + fi + if test "x$dvidir" = x; then + AC_SUBST([dvidir], ['${docdir}']) + fi + if test "x$pdfdir" = x; then + AC_SUBST([pdfdir], ['${docdir}']) + fi + if test "x$psdir" = x; then + AC_SUBST([psdir], ['${docdir}']) + fi + if test "x$lispdir" = x; then + AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp']) + fi + if test "x$localedir" = x; then + AC_SUBST([localedir], ['${datarootdir}/locale']) + fi + dnl Added in autoconf 2.70 + if test "x$runstatedir" = x; then + AC_SUBST([runstatedir], ['${localstatedir}/run']) + fi + + dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely + dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe. + AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}']) +]) diff --git a/gl/m4/ctype.m4 b/gl/m4/ctype.m4 new file mode 100644 index 0000000..150383b --- /dev/null +++ b/gl/m4/ctype.m4 @@ -0,0 +1,32 @@ +# ctype_h.m4 serial 6 +dnl Copyright (C) 2009-2014 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_CTYPE_H], +[ + AC_REQUIRE([gl_CTYPE_H_DEFAULTS]) + + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_NEXT_HEADERS([ctype.h]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [isblank]) +]) + +AC_DEFUN([gl_CTYPE_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_CTYPE_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_CTYPE_H_DEFAULTS], +[ + GNULIB_ISBLANK=0; AC_SUBST([GNULIB_ISBLANK]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK]) +]) diff --git a/gl/m4/cycle-check.m4 b/gl/m4/cycle-check.m4 new file mode 100644 index 0000000..62d08ee --- /dev/null +++ b/gl/m4/cycle-check.m4 @@ -0,0 +1,7 @@ +#serial 7 +dnl Copyright (C) 2005-2007, 2009-2014 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_CYCLE_CHECK], [:]) diff --git a/gl/m4/d-ino.m4 b/gl/m4/d-ino.m4 new file mode 100644 index 0000000..5ccb733 --- /dev/null +++ b/gl/m4/d-ino.m4 @@ -0,0 +1,55 @@ +# serial 14 + +dnl From Jim Meyering. +dnl +dnl Check whether struct dirent has a member named d_ino. +dnl + +# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2014 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. + +AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], + [AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([for d_ino member in directory struct], + gl_cv_struct_dirent_d_ino, + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + ]], + [[DIR *dp = opendir ("."); + struct dirent *e; + struct stat st; + if (! dp) + return 1; + e = readdir (dp); + if (! e) + return 2; + if (lstat (e->d_name, &st) != 0) + return 3; + if (e->d_ino != st.st_ino) + return 4; + return 0; + ]])], + [gl_cv_struct_dirent_d_ino=yes], + [gl_cv_struct_dirent_d_ino=no], + [case "$host_os" in + # Guess yes on glibc systems with Linux kernel. + linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_struct_dirent_d_ino="guessing no" ;; + esac + ])]) + case "$gl_cv_struct_dirent_d_ino" in + *yes) + AC_DEFINE([D_INO_IN_DIRENT], [1], + [Define if struct dirent has a member d_ino that actually works.]) + ;; + esac + ] +) diff --git a/gl/m4/d-type.m4 b/gl/m4/d-type.m4 new file mode 100644 index 0000000..0190d73 --- /dev/null +++ b/gl/m4/d-type.m4 @@ -0,0 +1,32 @@ +# serial 11 + +dnl From Jim Meyering. +dnl +dnl Check whether struct dirent has a member named d_type. +dnl + +# Copyright (C) 1997, 1999-2004, 2006, 2009-2014 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. + +AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE], + [AC_CACHE_CHECK([for d_type member in directory struct], + gl_cv_struct_dirent_d_type, + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include +#include + ]], + [[struct dirent dp; dp.d_type = 0;]])], + [gl_cv_struct_dirent_d_type=yes], + [gl_cv_struct_dirent_d_type=no]) + ] + ) + if test $gl_cv_struct_dirent_d_type = yes; then + AC_DEFINE([HAVE_STRUCT_DIRENT_D_TYPE], [1], + [Define if there is a member named d_type in the struct describing + directory headers.]) + fi + ] +) diff --git a/gl/m4/dirent-safer.m4 b/gl/m4/dirent-safer.m4 new file mode 100644 index 0000000..0a197fb --- /dev/null +++ b/gl/m4/dirent-safer.m4 @@ -0,0 +1,10 @@ +#serial 2 +dnl Copyright (C) 2009-2014 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_DIRENT_SAFER], +[ + AC_CHECK_FUNCS_ONCE([fdopendir]) +]) diff --git a/gl/m4/dirent_h.m4 b/gl/m4/dirent_h.m4 new file mode 100644 index 0000000..3f2b16b --- /dev/null +++ b/gl/m4/dirent_h.m4 @@ -0,0 +1,64 @@ +# dirent_h.m4 serial 16 +dnl Copyright (C) 2008-2014 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 Written by Bruno Haible. + +AC_DEFUN([gl_DIRENT_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_DIRENT_H_DEFAULTS]) + + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([dirent.h]) + if test $ac_cv_header_dirent_h = yes; then + HAVE_DIRENT_H=1 + else + HAVE_DIRENT_H=0 + fi + AC_SUBST([HAVE_DIRENT_H]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir]) +]) + +AC_DEFUN([gl_DIRENT_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_DIRENT_H_DEFAULTS], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR + GNULIB_OPENDIR=0; AC_SUBST([GNULIB_OPENDIR]) + GNULIB_READDIR=0; AC_SUBST([GNULIB_READDIR]) + GNULIB_REWINDDIR=0; AC_SUBST([GNULIB_REWINDDIR]) + GNULIB_CLOSEDIR=0; AC_SUBST([GNULIB_CLOSEDIR]) + GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD]) + GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR]) + GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR]) + GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_OPENDIR=1; AC_SUBST([HAVE_OPENDIR]) + HAVE_READDIR=1; AC_SUBST([HAVE_READDIR]) + HAVE_REWINDDIR=1; AC_SUBST([HAVE_REWINDDIR]) + HAVE_CLOSEDIR=1; AC_SUBST([HAVE_CLOSEDIR]) + HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD]) + HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR]) + HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR]) + HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR]) + HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT]) + REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR]) + REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR]) + REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD]) + REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR]) +]) diff --git a/gl/m4/dirfd.m4 b/gl/m4/dirfd.m4 new file mode 100644 index 0000000..b422769 --- /dev/null +++ b/gl/m4/dirfd.m4 @@ -0,0 +1,83 @@ +# serial 22 -*- Autoconf -*- + +dnl Find out how to get the file descriptor associated with an open DIR*. + +# Copyright (C) 2001-2006, 2008-2014 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. + +dnl From Jim Meyering + +AC_DEFUN([gl_FUNC_DIRFD], +[ + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + + dnl Persuade glibc to declare dirfd(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_FUNCS([dirfd]) + AC_CHECK_DECLS([dirfd], , , + [[#include + #include ]]) + if test $ac_cv_have_decl_dirfd = no; then + HAVE_DECL_DIRFD=0 + fi + + AC_CACHE_CHECK([whether dirfd is a macro], + gl_cv_func_dirfd_macro, + [AC_EGREP_CPP([dirent_header_defines_dirfd], [ +#include +#include +#ifdef dirfd + dirent_header_defines_dirfd +#endif], + gl_cv_func_dirfd_macro=yes, + gl_cv_func_dirfd_macro=no)]) + + # Use the replacement only if we have no function or macro with that name. + if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then + if test $ac_cv_have_decl_dirfd = yes; then + # If the system declares dirfd already, let's declare rpl_dirfd instead. + REPLACE_DIRFD=1 + fi + fi +]) + +dnl Prerequisites of lib/dirfd.c. +AC_DEFUN([gl_PREREQ_DIRFD], +[ + AC_CACHE_CHECK([how to get the file descriptor associated with an open DIR*], + [gl_cv_sys_dir_fd_member_name], + [ + dirfd_save_CFLAGS=$CFLAGS + for ac_expr in d_fd dd_fd; do + + CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include + #include ]], + [[DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;]])], + [dir_fd_found=yes] + ) + CFLAGS=$dirfd_save_CFLAGS + test "$dir_fd_found" = yes && break + done + test "$dir_fd_found" = yes || ac_expr=no_such_member + + gl_cv_sys_dir_fd_member_name=$ac_expr + ] + ) + if test $gl_cv_sys_dir_fd_member_name != no_such_member; then + AC_DEFINE_UNQUOTED([DIR_FD_MEMBER_NAME], + [$gl_cv_sys_dir_fd_member_name], + [the name of the file descriptor member of DIR]) + fi + AH_VERBATIM([DIR_TO_FD], + [#ifdef DIR_FD_MEMBER_NAME +# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) +#else +# define DIR_TO_FD(Dir_p) -1 +#endif +]) +]) diff --git a/gl/m4/dirname.m4 b/gl/m4/dirname.m4 new file mode 100644 index 0000000..d2627b8 --- /dev/null +++ b/gl/m4/dirname.m4 @@ -0,0 +1,19 @@ +#serial 10 -*- autoconf -*- +dnl Copyright (C) 2002-2006, 2009-2014 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_DIRNAME], +[ + AC_REQUIRE([gl_DIRNAME_LGPL]) +]) + +AC_DEFUN([gl_DIRNAME_LGPL], +[ + dnl Prerequisites of lib/dirname.h. + AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) + + dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c, + dnl lib/stripslash.c. +]) diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4 new file mode 100644 index 0000000..937f4bc --- /dev/null +++ b/gl/m4/double-slash-root.m4 @@ -0,0 +1,38 @@ +# double-slash-root.m4 serial 4 -*- Autoconf -*- +dnl Copyright (C) 2006, 2008-2014 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_DOUBLE_SLASH_ROOT], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root], + [ if test x"$cross_compiling" = xyes ; then + # When cross-compiling, there is no way to tell whether // is special + # short of a list of hosts. However, the only known hosts to date + # that have a distinct // are Apollo DomainOS (too old to port to), + # Cygwin, and z/OS. If anyone knows of another system for which // has + # special semantics and is distinct from /, please report it to + # . + case $host in + *-cygwin | i370-ibm-openedition) + gl_cv_double_slash_root=yes ;; + *) + # Be optimistic and assume that / and // are the same when we + # don't know. + gl_cv_double_slash_root='unknown, assuming no' ;; + esac + else + set x `ls -di / // 2>/dev/null` + if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then + gl_cv_double_slash_root=no + else + gl_cv_double_slash_root=yes + fi + fi]) + if test "$gl_cv_double_slash_root" = yes; then + AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1], + [Define to 1 if // is a file system root distinct from /.]) + fi +]) diff --git a/gl/m4/dup.m4 b/gl/m4/dup.m4 new file mode 100644 index 0000000..9393bc5 --- /dev/null +++ b/gl/m4/dup.m4 @@ -0,0 +1,25 @@ +# dup.m4 serial 3 +dnl Copyright (C) 2011-2014 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_DUP], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_MSVC_INVAL]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_DUP=1 + fi + dnl Replace dup() for supporting the gnulib-defined fchdir() function, + dnl to keep fchdir's bookkeeping up-to-date. + m4_ifdef([gl_FUNC_FCHDIR], [ + gl_TEST_FCHDIR + if test $HAVE_FCHDIR = 0; then + REPLACE_DUP=1 + fi + ]) +]) + +# Prerequisites of lib/dup.c. +AC_DEFUN([gl_PREREQ_DUP], [:]) diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4 new file mode 100644 index 0000000..89638a0 --- /dev/null +++ b/gl/m4/dup2.m4 @@ -0,0 +1,87 @@ +#serial 20 +dnl Copyright (C) 2002, 2005, 2007, 2009-2014 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_DUP2], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [ + AC_CHECK_FUNCS_ONCE([dup2]) + if test $ac_cv_func_dup2 = no; then + HAVE_DUP2=0 + fi + ], [ + AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.]) + ]) + if test $HAVE_DUP2 = 1; then + AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works], + [AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[#include +#include +#include ]], + [int result = 0; +#ifdef FD_CLOEXEC + if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) + result |= 1; +#endif + if (dup2 (1, 1) == 0) + result |= 2; +#ifdef FD_CLOEXEC + if (fcntl (1, F_GETFD) != FD_CLOEXEC) + result |= 4; +#endif + close (0); + if (dup2 (0, 0) != -1) + result |= 8; + /* Many gnulib modules require POSIX conformance of EBADF. */ + if (dup2 (2, 1000000) == -1 && errno != EBADF) + result |= 16; + /* Flush out some cygwin core dumps. */ + if (dup2 (2, -1) != -1 || errno != EBADF) + result |= 32; + dup2 (2, 255); + dup2 (2, 256); + return result; + ]) + ], + [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], + [case "$host_os" in + mingw*) # on this platform, dup2 always returns 0 for success + gl_cv_func_dup2_works="guessing no" ;; + cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 + gl_cv_func_dup2_works="guessing no" ;; + linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a + # closed fd may yield -EBADF instead of -1 / errno=EBADF. + gl_cv_func_dup2_works="guessing no" ;; + freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. + gl_cv_func_dup2_works="guessing no" ;; + haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. + gl_cv_func_dup2_works="guessing no" ;; + *) gl_cv_func_dup2_works="guessing yes" ;; + esac]) + ]) + case "$gl_cv_func_dup2_works" in + *yes) ;; + *) + REPLACE_DUP2=1 + AC_CHECK_FUNCS([setdtablesize]) + ;; + esac + fi + dnl Replace dup2() for supporting the gnulib-defined fchdir() function, + dnl to keep fchdir's bookkeeping up-to-date. + m4_ifdef([gl_FUNC_FCHDIR], [ + gl_TEST_FCHDIR + if test $HAVE_FCHDIR = 0; then + if test $HAVE_DUP2 = 1; then + REPLACE_DUP2=1 + fi + fi + ]) +]) + +# Prerequisites of lib/dup2.c. +AC_DEFUN([gl_PREREQ_DUP2], []) diff --git a/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4 new file mode 100644 index 0000000..8a51fe7 --- /dev/null +++ b/gl/m4/eealloc.m4 @@ -0,0 +1,31 @@ +# eealloc.m4 serial 3 +dnl Copyright (C) 2003, 2009-2014 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_EEALLOC], +[ + AC_REQUIRE([gl_EEMALLOC]) + AC_REQUIRE([gl_EEREALLOC]) +]) + +AC_DEFUN([gl_EEMALLOC], +[ + _AC_FUNC_MALLOC_IF( + [gl_cv_func_malloc_0_nonnull=1], + [gl_cv_func_malloc_0_nonnull=0]) + AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull], + [If malloc(0) is != NULL, define this to 1. Otherwise define this + to 0.]) +]) + +AC_DEFUN([gl_EEREALLOC], +[ + _AC_FUNC_REALLOC_IF( + [gl_cv_func_realloc_0_nonnull=1], + [gl_cv_func_realloc_0_nonnull=0]) + AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull], + [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this + to 0.]) +]) diff --git a/gl/m4/environ.m4 b/gl/m4/environ.m4 new file mode 100644 index 0000000..cfabe46 --- /dev/null +++ b/gl/m4/environ.m4 @@ -0,0 +1,47 @@ +# environ.m4 serial 6 +dnl Copyright (C) 2001-2004, 2006-2014 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_ONCE([gl_ENVIRON], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + dnl Persuade glibc to declare environ. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_HEADERS_ONCE([unistd.h]) + gt_CHECK_VAR_DECL( + [#if HAVE_UNISTD_H + #include + #endif + /* mingw, BeOS, Haiku declare environ in , not in . */ + #include + ], + [environ]) + if test $gt_cv_var_environ_declaration != yes; then + HAVE_DECL_ENVIRON=0 + fi +]) + +# Check if a variable is properly declared. +# gt_CHECK_VAR_DECL(includes,variable) +AC_DEFUN([gt_CHECK_VAR_DECL], +[ + define([gt_cv_var], [gt_cv_var_]$2[_declaration]) + AC_MSG_CHECKING([if $2 is properly declared]) + AC_CACHE_VAL([gt_cv_var], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[$1 + extern struct { int foo; } $2;]], + [[$2.foo = 1;]])], + [gt_cv_var=no], + [gt_cv_var=yes])]) + AC_MSG_RESULT([$gt_cv_var]) + if test $gt_cv_var = yes; then + AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1, + [Define if you have the declaration of $2.]) + fi + undefine([gt_cv_var]) +]) diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4 new file mode 100644 index 0000000..4ee9e6a --- /dev/null +++ b/gl/m4/errno_h.m4 @@ -0,0 +1,137 @@ +# errno_h.m4 serial 12 +dnl Copyright (C) 2004, 2006, 2008-2014 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_ONCE([gl_HEADER_ERRNO_H], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ + AC_EGREP_CPP([booboo],[ +#include +#if !defined ETXTBSY +booboo +#endif +#if !defined ENOMSG +booboo +#endif +#if !defined EIDRM +booboo +#endif +#if !defined ENOLINK +booboo +#endif +#if !defined EPROTO +booboo +#endif +#if !defined EMULTIHOP +booboo +#endif +#if !defined EBADMSG +booboo +#endif +#if !defined EOVERFLOW +booboo +#endif +#if !defined ENOTSUP +booboo +#endif +#if !defined ENETRESET +booboo +#endif +#if !defined ECONNABORTED +booboo +#endif +#if !defined ESTALE +booboo +#endif +#if !defined EDQUOT +booboo +#endif +#if !defined ECANCELED +booboo +#endif +#if !defined EOWNERDEAD +booboo +#endif +#if !defined ENOTRECOVERABLE +booboo +#endif +#if !defined EILSEQ +booboo +#endif + ], + [gl_cv_header_errno_h_complete=no], + [gl_cv_header_errno_h_complete=yes]) + ]) + if test $gl_cv_header_errno_h_complete = yes; then + ERRNO_H='' + else + gl_NEXT_HEADERS([errno.h]) + ERRNO_H='errno.h' + fi + AC_SUBST([ERRNO_H]) + AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"]) + gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) + gl_REPLACE_ERRNO_VALUE([ENOLINK]) + gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) +]) + +# Assuming $1 = EOVERFLOW. +# The EOVERFLOW errno value ought to be defined in , according to +# POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and +# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. +# Check for the value of EOVERFLOW. +# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. +AC_DEFUN([gl_REPLACE_ERRNO_VALUE], +[ + if test -n "$ERRNO_H"; then + AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ + AC_EGREP_CPP([yes],[ +#include +#ifdef ]$1[ +yes +#endif + ], + [gl_cv_header_errno_h_]$1[=yes], + [gl_cv_header_errno_h_]$1[=no]) + if test $gl_cv_header_errno_h_]$1[ = no; then + AC_EGREP_CPP([yes],[ +#define _XOPEN_SOURCE_EXTENDED 1 +#include +#ifdef ]$1[ +yes +#endif + ], [gl_cv_header_errno_h_]$1[=hidden]) + if test $gl_cv_header_errno_h_]$1[ = hidden; then + dnl The macro exists but is hidden. + dnl Define it to the same value. + AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include +]) + fi + fi + ]) + case $gl_cv_header_errno_h_]$1[ in + yes | no) + ]$1[_HIDDEN=0; ]$1[_VALUE= + ;; + *) + ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" + ;; + esac + AC_SUBST($1[_HIDDEN]) + AC_SUBST($1[_VALUE]) + fi +]) + +dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. +dnl Remove this when we can assume autoconf >= 2.61. +m4_ifdef([AC_COMPUTE_INT], [], [ + AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) +]) diff --git a/gl/m4/error.m4 b/gl/m4/error.m4 new file mode 100644 index 0000000..f08ae50 --- /dev/null +++ b/gl/m4/error.m4 @@ -0,0 +1,27 @@ +#serial 14 + +# Copyright (C) 1996-1998, 2001-2004, 2009-2014 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. + +AC_DEFUN([gl_ERROR], +[ + dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer + dnl maintained in Autoconf and because it invokes AC_LIBOBJ. + AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[error_at_line (0, 0, "", 0, "an error occurred");]])], + [ac_cv_lib_error_at_line=yes], + [ac_cv_lib_error_at_line=no])]) +]) + +# Prerequisites of lib/error.c. +AC_DEFUN([gl_PREREQ_ERROR], +[ + AC_REQUIRE([AC_FUNC_STRERROR_R]) + : +]) diff --git a/gl/m4/euidaccess.m4 b/gl/m4/euidaccess.m4 new file mode 100644 index 0000000..55393a4 --- /dev/null +++ b/gl/m4/euidaccess.m4 @@ -0,0 +1,52 @@ +# euidaccess.m4 serial 15 +dnl Copyright (C) 2002-2014 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_NONREENTRANT_EUIDACCESS], +[ + AC_REQUIRE([gl_FUNC_EUIDACCESS]) + AC_CHECK_DECLS([setregid]) + AC_DEFINE([PREFER_NONREENTRANT_EUIDACCESS], [1], + [Define this if you prefer euidaccess to return the correct result + even if this would make it nonreentrant. Define this only if your + entire application is safe even if the uid or gid might temporarily + change. If your application uses signal handlers or threads it + is probably not safe.]) +]) + +AC_DEFUN([gl_FUNC_EUIDACCESS], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + + dnl Persuade glibc to declare euidaccess(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_FUNCS([euidaccess]) + if test $ac_cv_func_euidaccess = no; then + HAVE_EUIDACCESS=0 + fi +]) + +# Prerequisites of lib/euidaccess.c. +AC_DEFUN([gl_PREREQ_EUIDACCESS], [ + dnl Prefer POSIX faccessat over non-standard euidaccess. + AC_CHECK_FUNCS_ONCE([faccessat]) + dnl Try various other non-standard fallbacks. + AC_CHECK_HEADERS([libgen.h]) + AC_FUNC_GETGROUPS + + # Solaris 9 and 10 need -lgen to get the eaccess function. + # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all* + # programs in the package would end up linked with that potentially-shared + # library, inducing unnecessary run-time overhead. + LIB_EACCESS= + AC_SUBST([LIB_EACCESS]) + gl_saved_libs=$LIBS + AC_SEARCH_LIBS([eaccess], [gen], + [test "$ac_cv_search_eaccess" = "none required" || + LIB_EACCESS=$ac_cv_search_eaccess]) + AC_CHECK_FUNCS([eaccess]) + LIBS=$gl_saved_libs +]) diff --git a/gl/m4/exponentd.m4 b/gl/m4/exponentd.m4 new file mode 100644 index 0000000..7bee635 --- /dev/null +++ b/gl/m4/exponentd.m4 @@ -0,0 +1,116 @@ +# exponentd.m4 serial 3 +dnl Copyright (C) 2007-2008, 2010-2014 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_DOUBLE_EXPONENT_LOCATION], +[ + AC_CACHE_CHECK([where to find the exponent in a 'double'], + [gl_cv_cc_double_expbit0], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { double value; unsigned int word[NWORDS]; } memory_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (double x) +{ + memory_double m; + size_t i; + /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ + memset (&m, 0, sizeof (memory_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25); + add_to_ored_words (0.5); + add_to_ored_words (1.0); + add_to_ored_words (2.0); + add_to_ored_words (4.0); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} + ]])], + [gl_cv_cc_double_expbit0=`cat conftest.out`], + [gl_cv_cc_double_expbit0="unknown"], + [ + dnl On ARM, there are two 'double' floating-point formats, used by + dnl different sets of instructions: The older FPA instructions assume + dnl that they are stored in big-endian word order, while the words + dnl (like integer types) are stored in little-endian byte order. + dnl The newer VFP instructions assume little-endian order + dnl consistently. + AC_EGREP_CPP([mixed_endianness], [ +#if defined arm || defined __arm || defined __arm__ + mixed_endianness +#endif + ], + [gl_cv_cc_double_expbit0="unknown"], + [ + pushdef([AC_MSG_CHECKING],[:])dnl + pushdef([AC_MSG_RESULT],[:])dnl + pushdef([AC_MSG_RESULT_UNQUOTED],[:])dnl + AC_C_BIGENDIAN( + [gl_cv_cc_double_expbit0="word 0 bit 20"], + [gl_cv_cc_double_expbit0="word 1 bit 20"], + [gl_cv_cc_double_expbit0="unknown"]) + popdef([AC_MSG_RESULT_UNQUOTED])dnl + popdef([AC_MSG_RESULT])dnl + popdef([AC_MSG_CHECKING])dnl + ]) + ]) + rm -f conftest.out + ]) + case "$gl_cv_cc_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` + AC_DEFINE_UNQUOTED([DBL_EXPBIT0_WORD], [$word], + [Define as the word index where to find the exponent of 'double'.]) + AC_DEFINE_UNQUOTED([DBL_EXPBIT0_BIT], [$bit], + [Define as the bit index in the word where to find bit 0 of the exponent of 'double'.]) + ;; + esac +]) diff --git a/gl/m4/exponentf.m4 b/gl/m4/exponentf.m4 new file mode 100644 index 0000000..b2dfeef --- /dev/null +++ b/gl/m4/exponentf.m4 @@ -0,0 +1,92 @@ +# exponentf.m4 serial 2 +dnl Copyright (C) 2007-2008, 2010-2014 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_FLOAT_EXPONENT_LOCATION], +[ + AC_CACHE_CHECK([where to find the exponent in a 'float'], + [gl_cv_cc_float_expbit0], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { float value; unsigned int word[NWORDS]; } memory_float; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (float x) +{ + memory_float m; + size_t i; + /* Clear it first, in case + sizeof (float) < sizeof (memory_float). */ + memset (&m, 0, sizeof (memory_float)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25f); + add_to_ored_words (0.5f); + add_to_ored_words (1.0f); + add_to_ored_words (2.0f); + add_to_ored_words (4.0f); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} + ]])], + [gl_cv_cc_float_expbit0=`cat conftest.out`], + [gl_cv_cc_float_expbit0="unknown"], + [gl_cv_cc_float_expbit0="word 0 bit 23"]) + rm -f conftest.out + ]) + case "$gl_cv_cc_float_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` + AC_DEFINE_UNQUOTED([FLT_EXPBIT0_WORD], [$word], + [Define as the word index where to find the exponent of 'float'.]) + AC_DEFINE_UNQUOTED([FLT_EXPBIT0_BIT], [$bit], + [Define as the bit index in the word where to find bit 0 of the exponent of 'float'.]) + ;; + esac +]) diff --git a/gl/m4/exponentl.m4 b/gl/m4/exponentl.m4 new file mode 100644 index 0000000..d6f4ba7 --- /dev/null +++ b/gl/m4/exponentl.m4 @@ -0,0 +1,98 @@ +# exponentl.m4 serial 3 +dnl Copyright (C) 2007-2014 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_LONG_DOUBLE_EXPONENT_LOCATION], +[ + AC_REQUIRE([gl_BIGENDIAN]) + AC_CACHE_CHECK([where to find the exponent in a 'long double'], + [gl_cv_cc_long_double_expbit0], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { long double value; unsigned int word[NWORDS]; } + memory_long_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (long double x) +{ + memory_long_double m; + size_t i; + /* Clear it first, in case + sizeof (long double) < sizeof (memory_long_double). */ + memset (&m, 0, sizeof (memory_long_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25L); + add_to_ored_words (0.5L); + add_to_ored_words (1.0L); + add_to_ored_words (2.0L); + add_to_ored_words (4.0L); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} + ]])], + [gl_cv_cc_long_double_expbit0=`cat conftest.out`], + [gl_cv_cc_long_double_expbit0="unknown"], + [ + dnl When cross-compiling, we don't know. It depends on the + dnl ABI and compiler version. There are too many cases. + gl_cv_cc_long_double_expbit0="unknown" + ]) + rm -f conftest.out + ]) + case "$gl_cv_cc_long_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` + AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_WORD], [$word], + [Define as the word index where to find the exponent of 'long double'.]) + AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_BIT], [$bit], + [Define as the bit index in the word where to find bit 0 of the exponent of 'long double'.]) + ;; + esac +]) diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4 new file mode 100644 index 0000000..37f55ca --- /dev/null +++ b/gl/m4/extensions.m4 @@ -0,0 +1,138 @@ +# serial 13 -*- Autoconf -*- +# Enable extensions on systems that normally disable them. + +# Copyright (C) 2003, 2006-2014 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 git +# Autoconf. Perhaps we can remove this once we can assume Autoconf +# 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. + +# If autoconf reports a warning +# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS +# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS +# the fix is +# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked +# but always AC_REQUIREd, +# 2) to ensure that for each occurrence of +# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +# or +# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) +# the corresponding gnulib module description has 'extensions' among +# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS +# invocation occurs in gl_EARLY, not in gl_INIT. + +# AC_USE_SYSTEM_EXTENSIONS +# ------------------------ +# 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 +# cause problems on some platforms (such as __EXTENSIONS__). +AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], +[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl +AC_BEFORE([$0], [AC_RUN_IFELSE])dnl + + AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) + if test "$MINIX" = yes; then + AC_DEFINE([_POSIX_SOURCE], [1], + [Define to 1 if you need to in order for 'stat' and other + things to work.]) + AC_DEFINE([_POSIX_1_SOURCE], [2], + [Define to 2 if the system does not provide POSIX.1 features + 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 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 OS X. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#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__ +#endif +]) + AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], + [ac_cv_safe_to_define___extensions__], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +# define __EXTENSIONS__ 1 + ]AC_INCLUDES_DEFAULT])], + [ac_cv_safe_to_define___extensions__=yes], + [ac_cv_safe_to_define___extensions__=no])]) + test $ac_cv_safe_to_define___extensions__ = yes && + AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_ALL_SOURCE]) + AC_DEFINE([_DARWIN_C_SOURCE]) + 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 + mbstate_t x;]])], + [], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #define _XOPEN_SOURCE 500 + #include + 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 +# ------------------------ +# Enable extensions on systems that normally disable them, +# typically due to standards-conformance issues. +AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], +[ + dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. + dnl gnulib does not need it. But if it gets required by third-party macros + dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a + dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". + dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, + dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. + AC_REQUIRE([AC_GNU_SOURCE]) + + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +]) diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4 new file mode 100644 index 0000000..240150e --- /dev/null +++ b/gl/m4/extern-inline.m4 @@ -0,0 +1,84 @@ +dnl 'extern inline' a la ISO C99. + +dnl Copyright 2012-2014 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], +[/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress the use of extern inline on problematic Apple configurations. + OS X 10.8 and earlier mishandle it; see, e.g., + . + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Perhaps Apple will fix this some day. */ +#if (defined __APPLE__ \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_APPLE_BUG +#endif +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_APPLE_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_APPLE_BUG) +# if defined __GNUC_GNU_INLINE__ && __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 +# define _GL_EXTERN_INLINE_IN_USE +#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 + /* Suppress GCC's bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + . */ +# 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/faccessat.m4 b/gl/m4/faccessat.m4 new file mode 100644 index 0000000..d9016bd --- /dev/null +++ b/gl/m4/faccessat.m4 @@ -0,0 +1,28 @@ +# serial 6 +# See if we need to provide faccessat replacement. + +dnl Copyright (C) 2009-2014 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. + +# Written by Eric Blake. + +AC_DEFUN([gl_FUNC_FACCESSAT], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + + dnl Persuade glibc to declare faccessat(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_FUNCS_ONCE([faccessat]) + if test $ac_cv_func_faccessat = no; then + HAVE_FACCESSAT=0 + fi +]) + +# Prerequisites of lib/faccessat.m4. +AC_DEFUN([gl_PREREQ_FACCESSAT], +[ + AC_CHECK_FUNCS([access]) +]) diff --git a/gl/m4/fchdir.m4 b/gl/m4/fchdir.m4 new file mode 100644 index 0000000..9da16b0 --- /dev/null +++ b/gl/m4/fchdir.m4 @@ -0,0 +1,61 @@ +# fchdir.m4 serial 21 +dnl Copyright (C) 2006-2014 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_FCHDIR], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + AC_CHECK_DECLS_ONCE([fchdir]) + if test $ac_cv_have_decl_fchdir = no; then + HAVE_DECL_FCHDIR=0 + fi + + AC_REQUIRE([gl_TEST_FCHDIR]) + if test $HAVE_FCHDIR = 0; then + AC_LIBOBJ([fchdir]) + gl_PREREQ_FCHDIR + AC_DEFINE([REPLACE_FCHDIR], [1], + [Define to 1 if gnulib's fchdir() replacement is used.]) + dnl We must also replace anything that can manipulate a directory fd, + dnl to keep our bookkeeping up-to-date. We don't have to replace + dnl fstatat, since no platform has fstatat but lacks fchdir. + AC_CACHE_CHECK([whether open can visit directories], + [gl_cv_func_open_directory_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include +]], [return open(".", O_RDONLY) < 0;])], + [gl_cv_func_open_directory_works=yes], + [gl_cv_func_open_directory_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_open_directory_works="guessing no" ;; + esac + ])]) + case "$gl_cv_func_open_directory_works" in + *yes) ;; + *) + AC_DEFINE([REPLACE_OPEN_DIRECTORY], [1], [Define to 1 if open() should +work around the inability to open a directory.]) + ;; + esac + fi +]) + +# Determine whether to use the overrides in lib/fchdir.c. +AC_DEFUN([gl_TEST_FCHDIR], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([fchdir]) + if test $ac_cv_func_fchdir = no; then + HAVE_FCHDIR=0 + fi +]) + +# Prerequisites of lib/fchdir.c. +AC_DEFUN([gl_PREREQ_FCHDIR], [:]) diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4 new file mode 100644 index 0000000..43c9312 --- /dev/null +++ b/gl/m4/fcntl-o.m4 @@ -0,0 +1,134 @@ +# fcntl-o.m4 serial 4 +dnl Copyright (C) 2006, 2009-2014 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 Written by Paul Eggert. + +# Test whether the flags O_NOATIME and O_NOFOLLOW actually work. +# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. +# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. +AC_DEFUN([gl_FCNTL_O_FLAGS], +[ + dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. + dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes + dnl AC_GNU_SOURCE. + m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], + [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], + [AC_REQUIRE([AC_GNU_SOURCE])]) + + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_CHECK_FUNCS_ONCE([symlink]) + AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + # defined sleep(n) _sleep ((n) * 1000) + #endif + #include + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; + ]], + [[ + int result = !constants; + #if HAVE_SYMLINK + { + static char const sym[] = "conftest.sym"; + 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 + { + int fd = open (sym, O_RDONLY | O_NOFOLLOW); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + unlink (sym); + } + #endif + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + if (fd < 0) + result |= 8; + else + { + struct stat st0; + if (fstat (fd, &st0) != 0) + result |= 16; + else + { + char c; + sleep (1); + if (read (fd, &c, 1) != 1) + result |= 24; + else + { + if (close (fd) != 0) + result |= 32; + else + { + struct stat st1; + if (stat (file, &st1) != 0) + result |= 40; + else + if (st0.st_atime != st1.st_atime) + result |= 64; + } + } + } + } + } + return result;]])], + [gl_cv_header_working_fcntl_h=yes], + [case $? in #( + 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac], + [gl_cv_header_working_fcntl_h=cross-compiling])]) + + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], + [Define to 1 if O_NOATIME works.]) + + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], + [Define to 1 if O_NOFOLLOW works.]) +]) diff --git a/gl/m4/fcntl-safer.m4 b/gl/m4/fcntl-safer.m4 new file mode 100644 index 0000000..2179dde --- /dev/null +++ b/gl/m4/fcntl-safer.m4 @@ -0,0 +1,16 @@ +#serial 9 +dnl Copyright (C) 2005-2007, 2009-2014 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_FCNTL_SAFER], +[ + dnl Prerequisites of lib/open-safer.c. + AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) +]) + +AC_DEFUN([gl_OPENAT_SAFER], +[ + AC_REQUIRE([gl_FCNTL_SAFER]) +]) diff --git a/gl/m4/fcntl.m4 b/gl/m4/fcntl.m4 new file mode 100644 index 0000000..4a2771f --- /dev/null +++ b/gl/m4/fcntl.m4 @@ -0,0 +1,95 @@ +# fcntl.m4 serial 5 +dnl Copyright (C) 2009-2014 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. + +# For now, this module ensures that fcntl() +# - supports F_DUPFD correctly +# - supports or emulates F_DUPFD_CLOEXEC +# - supports F_GETFD +# Still to be ported to mingw: +# - F_SETFD +# - F_GETFL, F_SETFL +# - F_GETOWN, F_SETOWN +# - F_GETLK, F_SETLK, F_SETLKW +AC_DEFUN([gl_FUNC_FCNTL], +[ + dnl Persuade glibc to expose F_DUPFD_CLOEXEC. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CHECK_FUNCS_ONCE([fcntl]) + if test $ac_cv_func_fcntl = no; then + gl_REPLACE_FCNTL + else + dnl cygwin 1.5.x F_DUPFD has wrong errno, and allows negative target + dnl haiku alpha 2 F_DUPFD has wrong errno + AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly], + [gl_cv_func_fcntl_f_dupfd_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +]], [[int result = 0; + if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; + if (errno != EINVAL) result |= 2; + return result; + ]])], + [gl_cv_func_fcntl_f_dupfd_works=yes], + [gl_cv_func_fcntl_f_dupfd_works=no], + [# Guess that it works on glibc systems + case $host_os in #(( + *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; + *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; + esac])]) + case $gl_cv_func_fcntl_f_dupfd_works in + *yes) ;; + *) gl_REPLACE_FCNTL + AC_DEFINE([FCNTL_DUPFD_BUGGY], [1], [Define this to 1 if F_DUPFD + behavior does not match POSIX]) ;; + esac + + dnl Many systems lack F_DUPFD_CLOEXEC + AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC], + [gl_cv_func_fcntl_f_dupfd_cloexec], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#ifndef F_DUPFD_CLOEXEC +choke me +#endif + ]])], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#ifdef __linux__ +/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace + it to support the semantics on older kernels that failed with EINVAL. */ +choke me +#endif + ]])], + [gl_cv_func_fcntl_f_dupfd_cloexec=yes], + [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])], + [gl_cv_func_fcntl_f_dupfd_cloexec=no])]) + if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then + gl_REPLACE_FCNTL + dnl No witness macro needed for this bug. + fi + fi + dnl Replace fcntl() for supporting the gnulib-defined fchdir() function, + dnl to keep fchdir's bookkeeping up-to-date. + m4_ifdef([gl_FUNC_FCHDIR], [ + gl_TEST_FCHDIR + if test $HAVE_FCHDIR = 0; then + gl_REPLACE_FCNTL + fi + ]) +]) + +AC_DEFUN([gl_REPLACE_FCNTL], +[ + AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([fcntl]) + if test $ac_cv_func_fcntl = no; then + HAVE_FCNTL=0 + else + REPLACE_FCNTL=1 + fi +]) diff --git a/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4 new file mode 100644 index 0000000..fb2556d --- /dev/null +++ b/gl/m4/fcntl_h.m4 @@ -0,0 +1,50 @@ +# serial 15 +# Configure fcntl.h. +dnl Copyright (C) 2006-2007, 2009-2014 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 Written by Paul Eggert. + +AC_DEFUN([gl_FCNTL_H], +[ + AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) + AC_REQUIRE([gl_FCNTL_O_FLAGS]) + gl_NEXT_HEADERS([fcntl.h]) + + dnl Ensure the type pid_t gets defined. + AC_REQUIRE([AC_TYPE_PID_T]) + + dnl Ensure the type mode_t gets defined. + AC_REQUIRE([AC_TYPE_MODE_T]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use, if it is not common + dnl enough to be declared everywhere. + gl_WARN_ON_USE_PREPARE([[#include + ]], [fcntl openat]) +]) + +AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_FCNTL_H_DEFAULTS], +[ + GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) + GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING]) + GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) + GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) + HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) + REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) + REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) + REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT]) +]) diff --git a/gl/m4/fdopen.m4 b/gl/m4/fdopen.m4 new file mode 100644 index 0000000..4cf8f35 --- /dev/null +++ b/gl/m4/fdopen.m4 @@ -0,0 +1,47 @@ +# fdopen.m4 serial 3 +dnl Copyright (C) 2011-2014 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_FDOPEN], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_MSVC_INVAL]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_FDOPEN=1 + else + dnl Test whether fdopen() sets errno when it fails due to a bad fd argument. + AC_CACHE_CHECK([whether fdopen sets errno], [gl_cv_func_fdopen_works], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +int +main (void) +{ + FILE *fp; + errno = 0; + fp = fdopen (-1, "r"); + if (fp == NULL && errno == 0) + return 1; + return 0; +}]])], + [gl_cv_func_fdopen_works=yes], + [gl_cv_func_fdopen_works=no], + [case "$host_os" in + mingw*) gl_cv_func_fdopen_works="guessing no" ;; + *) gl_cv_func_fdopen_works="guessing yes" ;; + esac + ]) + ]) + case "$gl_cv_func_fdopen_works" in + *no) REPLACE_FDOPEN=1 ;; + esac + fi +]) + +dnl Prerequisites of lib/fdopen.c. +AC_DEFUN([gl_PREREQ_FDOPEN], []) diff --git a/gl/m4/fdopendir.m4 b/gl/m4/fdopendir.m4 new file mode 100644 index 0000000..a3e7849 --- /dev/null +++ b/gl/m4/fdopendir.m4 @@ -0,0 +1,61 @@ +# serial 10 +# See if we need to provide fdopendir. + +dnl Copyright (C) 2009-2014 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. + +# Written by Eric Blake. + +AC_DEFUN([gl_FUNC_FDOPENDIR], +[ + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + dnl FreeBSD 7.3 has the function, but failed to declare it. + AC_CHECK_DECLS([fdopendir], [], [HAVE_DECL_FDOPENDIR=0], [[ +#include + ]]) + AC_CHECK_FUNCS_ONCE([fdopendir]) + if test $ac_cv_func_fdopendir = no; then + HAVE_FDOPENDIR=0 + else + AC_CACHE_CHECK([whether fdopendir works], + [gl_cv_func_fdopendir_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +#include +#if !HAVE_DECL_FDOPENDIR +extern +# ifdef __cplusplus +"C" +# endif +DIR *fdopendir (int); +#endif +]], [int result = 0; + int fd = open ("conftest.c", O_RDONLY); + if (fd < 0) result |= 1; + if (fdopendir (fd)) result |= 2; + if (close (fd)) result |= 4; + return result;])], + [gl_cv_func_fdopendir_works=yes], + [gl_cv_func_fdopendir_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_fdopendir_works="guessing no" ;; + esac + ])]) + case "$gl_cv_func_fdopendir_works" in + *yes) ;; + *) + REPLACE_FDOPENDIR=1 + ;; + esac + fi +]) diff --git a/gl/m4/fflush.m4 b/gl/m4/fflush.m4 new file mode 100644 index 0000000..d8069c9 --- /dev/null +++ b/gl/m4/fflush.m4 @@ -0,0 +1,89 @@ +# fflush.m4 serial 15 + +# Copyright (C) 2007-2014 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. + +dnl From Eric Blake + +dnl Find out how to obey POSIX semantics of fflush(stdin) discarding +dnl unread input on seekable streams, rather than C99 undefined semantics. + +AC_DEFUN([gl_FUNC_FFLUSH], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + gl_FUNC_FFLUSH_STDIN + if test $gl_cv_func_fflush_stdin != yes; then + REPLACE_FFLUSH=1 + fi +]) + +dnl Determine whether fflush works on input streams. +dnl Sets gl_cv_func_fflush_stdin. + +AC_DEFUN([gl_FUNC_FFLUSH_STDIN], +[ + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_CACHE_CHECK([whether fflush works on input streams], + [gl_cv_func_fflush_stdin], + [echo hello world > conftest.txt + AC_RUN_IFELSE([AC_LANG_PROGRAM( + [[ +#include +#if HAVE_UNISTD_H +# include +#else /* on Windows with MSVC */ +# include +#endif + ]], [[FILE *f = fopen ("conftest.txt", "r"); + char buffer[10]; + int fd; + int c; + if (f == NULL) + return 1; + fd = fileno (f); + if (fd < 0 || fread (buffer, 1, 5, f) != 5) + return 2; + /* For deterministic results, ensure f read a bigger buffer. */ + if (lseek (fd, 0, SEEK_CUR) == 5) + return 3; + /* POSIX requires fflush-fseek to set file offset of fd. This fails + on BSD systems and on mingw. */ + if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) + return 4; + if (lseek (fd, 0, SEEK_CUR) != 5) + return 5; + /* Verify behaviour of fflush after ungetc. See + */ + /* Verify behaviour of fflush after a backup ungetc. This fails on + mingw. */ + c = fgetc (f); + ungetc (c, f); + fflush (f); + if (fgetc (f) != c) + return 6; + /* Verify behaviour of fflush after a non-backup ungetc. This fails + on glibc 2.8 and on BSD systems. */ + c = fgetc (f); + ungetc ('@', f); + fflush (f); + if (fgetc (f) != c) + return 7; + return 0; + ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no], + [gl_cv_func_fflush_stdin=cross]) + rm conftest.txt + ]) + case $gl_cv_func_fflush_stdin in + yes) gl_func_fflush_stdin=1 ;; + no) gl_func_fflush_stdin=0 ;; + *) gl_func_fflush_stdin='(-1)' ;; + esac + AC_DEFINE_UNQUOTED([FUNC_FFLUSH_STDIN], [$gl_func_fflush_stdin], + [Define to 1 if fflush is known to work on stdin as per POSIX.1-2008, + 0 if fflush is known to not work, -1 if unknown.]) +]) + +# Prerequisites of lib/fflush.c. +AC_DEFUN([gl_PREREQ_FFLUSH], [:]) diff --git a/gl/m4/fileblocks.m4 b/gl/m4/fileblocks.m4 new file mode 100644 index 0000000..2ec23e7 --- /dev/null +++ b/gl/m4/fileblocks.m4 @@ -0,0 +1,23 @@ +# fileblocks.m4 serial 6 +dnl Copyright (C) 2002, 2005-2006, 2009-2014 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_FILEBLOCKS], +[ + m4_pushdef([AC_LIBOBJ], [:]) + dnl Note: AC_STRUCT_ST_BLOCKS does AC_LIBOBJ([fileblocks]). + AC_STRUCT_ST_BLOCKS + m4_popdef([AC_LIBOBJ]) + dnl The stat-size module depends on this one and also assumes that + dnl HAVE_STRUCT_STAT_ST_BLOCKS is correctly defined. So if you + dnl remove the call above, please make sure that this does not + dnl introduce a bug into lib/stat-size.h. +]) + +# Prerequisites of lib/fileblocks.c. +AC_DEFUN([gl_PREREQ_FILEBLOCKS], [ + AC_CHECK_HEADERS_ONCE([sys/param.h]) + : +]) diff --git a/gl/m4/filemode.m4 b/gl/m4/filemode.m4 new file mode 100644 index 0000000..0b9e356 --- /dev/null +++ b/gl/m4/filemode.m4 @@ -0,0 +1,11 @@ +# filemode.m4 serial 8 +dnl Copyright (C) 2002, 2005-2006, 2009-2014 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_FILEMODE], +[ + AC_REQUIRE([AC_STRUCT_ST_DM_MODE]) + AC_CHECK_DECLS_ONCE([strmode]) +]) diff --git a/gl/m4/filenamecat.m4 b/gl/m4/filenamecat.m4 new file mode 100644 index 0000000..6c6656a --- /dev/null +++ b/gl/m4/filenamecat.m4 @@ -0,0 +1,16 @@ +# filenamecat.m4 serial 11 +dnl Copyright (C) 2002-2006, 2009-2014 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_FILE_NAME_CONCAT], +[ + AC_REQUIRE([gl_FILE_NAME_CONCAT_LGPL]) +]) + +AC_DEFUN([gl_FILE_NAME_CONCAT_LGPL], +[ + dnl Prerequisites of lib/filenamecat-lgpl.c. + AC_CHECK_FUNCS_ONCE([mempcpy]) +]) diff --git a/gl/m4/flexmember.m4 b/gl/m4/flexmember.m4 new file mode 100644 index 0000000..b138550 --- /dev/null +++ b/gl/m4/flexmember.m4 @@ -0,0 +1,41 @@ +# serial 3 +# Check for flexible array member support. + +# Copyright (C) 2006, 2009-2014 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. + +# Written by Paul Eggert. + +AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], +[ + AC_CACHE_CHECK([for flexible array member], + ac_cv_c_flexmember, + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + struct s { int n; double d[]; };]], + [[int m = getchar (); + struct s *p = malloc (offsetof (struct s, d) + + m * sizeof (double)); + p->d[0] = 0.0; + return p->d != (double *) NULL;]])], + [ac_cv_c_flexmember=yes], + [ac_cv_c_flexmember=no])]) + if test $ac_cv_c_flexmember = yes; then + AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [], + [Define to nothing if C supports flexible array members, and to + 1 if it does not. That way, with a declaration like 'struct s + { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack + can be used with pre-C99 compilers. + When computing the size of such an object, don't use 'sizeof (struct s)' + as it overestimates the size. Use 'offsetof (struct s, d)' instead. + Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with + MSVC and with C++ compilers.]) + else + AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1]) + fi +]) diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4 new file mode 100644 index 0000000..a27ef7f --- /dev/null +++ b/gl/m4/float_h.m4 @@ -0,0 +1,98 @@ +# float_h.m4 serial 9 +dnl Copyright (C) 2007, 2009-2014 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_FLOAT_H], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + FLOAT_H= + REPLACE_FLOAT_LDBL=0 + case "$host_os" in + aix* | beos* | openbsd* | mirbsd* | irix*) + FLOAT_H=float.h + ;; + freebsd*) + case "$host_cpu" in +changequote(,)dnl + i[34567]86 ) +changequote([,])dnl + FLOAT_H=float.h + ;; + x86_64 ) + # On x86_64 systems, the C compiler may still be generating + # 32-bit code. + AC_EGREP_CPP([yes], + [#if defined __LP64__ || defined __x86_64__ || defined __amd64__ + yes + #endif], + [], + [FLOAT_H=float.h]) + ;; + esac + ;; + linux*) + case "$host_cpu" in + powerpc*) + FLOAT_H=float.h + ;; + esac + ;; + esac + case "$host_os" in + aix* | freebsd* | linux*) + if test -n "$FLOAT_H"; then + REPLACE_FLOAT_LDBL=1 + fi + ;; + esac + + dnl Test against glibc-2.7 Linux/SPARC64 bug. + REPLACE_ITOLD=0 + AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works], + [gl_cv_func_itold_works], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +int i = -1; +volatile long double ld; +int main () +{ + ld += i * 1.0L; + if (ld > 0) + return 1; + return 0; +}]])], + [gl_cv_func_itold_works=yes], + [gl_cv_func_itold_works=no], + [case "$host" in + sparc*-*-linux*) + AC_EGREP_CPP([yes], + [#if defined __LP64__ || defined __arch64__ + yes + #endif], + [gl_cv_func_itold_works="guessing no"], + [gl_cv_func_itold_works="guessing yes"]) + ;; + *) gl_cv_func_itold_works="guessing yes" ;; + esac + ]) + ]) + case "$gl_cv_func_itold_works" in + *no) + REPLACE_ITOLD=1 + dnl We add the workaround to but also to , + dnl to increase the chances that the fix function gets pulled in. + FLOAT_H=float.h + ;; + esac + + if test -n "$FLOAT_H"; then + gl_NEXT_HEADERS([float.h]) + fi + AC_SUBST([FLOAT_H]) + AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"]) + AC_SUBST([REPLACE_ITOLD]) +]) diff --git a/gl/m4/fnmatch.m4 b/gl/m4/fnmatch.m4 new file mode 100644 index 0000000..9db4144 --- /dev/null +++ b/gl/m4/fnmatch.m4 @@ -0,0 +1,156 @@ +# Check for fnmatch - serial 9. + +# Copyright (C) 2000-2007, 2009-2014 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. + +# Autoconf defines AC_FUNC_FNMATCH, but that is obsolescent. +# New applications should use the macros below instead. + +# Request a POSIX compliant fnmatch function. +AC_DEFUN([gl_FUNC_FNMATCH_POSIX], +[ + m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX]) + + dnl Persuade glibc to declare FNM_CASEFOLD etc. + dnl This is only needed if gl_fnmatch_required = GNU. It would be possible + dnl to avoid this dependency for gl_FUNC_FNMATCH_POSIX by putting + dnl gl_FUNC_FNMATCH_GNU into a separate .m4 file. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + FNMATCH_H= + gl_fnmatch_required_lowercase=` + echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]' + ` + gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" + AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch], + [$gl_fnmatch_cache_var], + [dnl Some versions of Solaris, SCO, and the GNU C Library + dnl have a broken or incompatible fnmatch. + dnl So we run a test program. If we are cross-compiling, take no chance. + dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this + dnl test. + if test $gl_fnmatch_required = GNU; then + gl_fnmatch_gnu_start= + gl_fnmatch_gnu_end= + else + gl_fnmatch_gnu_start='#if 0' + gl_fnmatch_gnu_end='#endif' + fi + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + static int + y (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == 0; + } + static int + n (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == FNM_NOMATCH; + } + ]], + [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; + char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; + static char const A_1[] = { 'A' - 1, 0 }; + static char const A01[] = { 'A' + 1, 0 }; + static char const a_1[] = { 'a' - 1, 0 }; + static char const a01[] = { 'a' + 1, 0 }; + static char const bs_1[] = { '\\\\' - 1, 0 }; + static char const bs01[] = { '\\\\' + 1, 0 }; + int result = 0; + if (!n ("a*", "", 0)) + return 1; + if (!y ("a*", "abc", 0)) + return 1; + if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ + return 1; + if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) + return 2; + if (!y ("a\\\\bc", "abc", 0)) + return 3; + if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) + return 3; + if (!y ("*x", ".x", 0)) + return 4; + if (!n ("*x", ".x", FNM_PERIOD)) + return 4; + if (!y (Apat, "\\\\", 0)) + return 5; + if (!y (Apat, "A", 0)) + return 5; + if (!y (apat, "\\\\", 0)) + return 5; + if (!y (apat, "a", 0)) + return 5; + if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, a01, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) + return 5; + $gl_fnmatch_gnu_start + if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) + result |= 8; + if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) + result |= 16; + if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) + result |= 32; + if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + $gl_fnmatch_gnu_end + return result; + ]])], + [eval "$gl_fnmatch_cache_var=yes"], + [eval "$gl_fnmatch_cache_var=no"], + [eval "$gl_fnmatch_cache_var=\"guessing no\""]) + ]) + eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" + if test "$gl_fnmatch_result" = yes; then + dnl Not strictly necessary. Only to avoid spurious leftover files if people + dnl don't do "make distclean". + rm -f "$gl_source_base/fnmatch.h" + else + FNMATCH_H=fnmatch.h + fi + AC_SUBST([FNMATCH_H]) + AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) +]) + +# Request a POSIX compliant fnmatch function with GNU extensions. +AC_DEFUN([gl_FUNC_FNMATCH_GNU], +[ + m4_divert_text([INIT_PREPARE], [gl_fnmatch_required=GNU]) + + AC_REQUIRE([gl_FUNC_FNMATCH_POSIX]) +]) + +AC_DEFUN([gl_PREREQ_FNMATCH], +[ + dnl We must choose a different name for our function, since on ELF systems + dnl a broken fnmatch() in libc.so would override our fnmatch() if it is + dnl compiled into a shared library. + AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch], + [Define to a replacement function name for fnmatch().]) + dnl Prerequisites of lib/fnmatch.c. + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + AC_CHECK_DECLS([isblank], [], [], [[#include ]]) + AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy]) + AC_CHECK_HEADERS_ONCE([wctype.h]) +]) diff --git a/gl/m4/fopen.m4 b/gl/m4/fopen.m4 new file mode 100644 index 0000000..7b26c78 --- /dev/null +++ b/gl/m4/fopen.m4 @@ -0,0 +1,58 @@ +# fopen.m4 serial 9 +dnl Copyright (C) 2007-2014 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_FOPEN], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + mingw* | pw*) + dnl Replace fopen, for handling of "/dev/null". + REPLACE_FOPEN=1 + dnl fopen on mingw also has the trailing slash bug. + gl_cv_func_fopen_slash="guessing no" + ;; + *) + dnl fopen("foo/", "w") should not create a file when the file name has a + dnl trailing slash. + AC_CACHE_CHECK([whether fopen recognizes a trailing slash], + [gl_cv_func_fopen_slash], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +int main () +{ + return fopen ("conftest.sl/", "w") != NULL; +}]])], + [gl_cv_func_fopen_slash=yes], + [gl_cv_func_fopen_slash=no], + [ +changequote(,)dnl + case "$host_os" in + aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) + gl_cv_func_fopen_slash="guessing no" ;; + *) + gl_cv_func_fopen_slash="guessing yes" ;; + esac +changequote([,])dnl + ]) + rm -f conftest.sl + ]) + ;; + esac + case "$gl_cv_func_fopen_slash" in + *no) + AC_DEFINE([FOPEN_TRAILING_SLASH_BUG], [1], + [Define to 1 if fopen() fails to recognize a trailing slash.]) + REPLACE_FOPEN=1 + ;; + esac +]) + +# Prerequisites of lib/fopen.c. +AC_DEFUN([gl_PREREQ_FOPEN], [:]) diff --git a/gl/m4/fpending.m4 b/gl/m4/fpending.m4 new file mode 100644 index 0000000..c2d01ef --- /dev/null +++ b/gl/m4/fpending.m4 @@ -0,0 +1,99 @@ +# serial 21 + +# Copyright (C) 2000-2001, 2004-2014 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. + +dnl From Jim Meyering +dnl Using code from emacs, based on suggestions from Paul Eggert +dnl and Ulrich Drepper. + +dnl Find out how to determine the number of pending output bytes on a stream. +dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems, +dnl we have to grub around in the FILE struct. + +AC_DEFUN([gl_FUNC_FPENDING], +[ + AC_CHECK_HEADERS_ONCE([stdio_ext.h]) + fp_headers=' + #include + #if HAVE_STDIO_EXT_H + # include + #endif + ' + AC_CACHE_CHECK([for __fpending], [gl_cv_func___fpending], + [ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([$fp_headers], + [[return ! __fpending (stdin);]])], + [gl_cv_func___fpending=yes], + [gl_cv_func___fpending=no]) + ]) + if test $gl_cv_func___fpending = yes; then + AC_CHECK_DECLS([__fpending], [], [], [$fp_headers]) + fi +]) + +AC_DEFUN([gl_PREREQ_FPENDING], +[ + AC_CACHE_CHECK( + [how to determine the number of pending output bytes on a stream], + ac_cv_sys_pending_output_n_bytes, + [ + for ac_expr in \ + \ + '# glibc2' \ + 'fp->_IO_write_ptr - fp->_IO_write_base' \ + \ + '# traditional Unix' \ + 'fp->_ptr - fp->_base' \ + \ + '# BSD' \ + 'fp->_p - fp->_bf._base' \ + \ + '# SCO, Unixware' \ + '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ + \ + '# QNX' \ + '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ + \ + '# old glibc?' \ + 'fp->__bufp - fp->__buffer' \ + \ + '# old glibc iostream?' \ + 'fp->_pptr - fp->_pbase' \ + \ + '# emx+gcc' \ + 'fp->_ptr - fp->_buffer' \ + \ + '# Minix' \ + 'fp->_ptr - fp->_buf' \ + \ + '# Plan9' \ + 'fp->wp - fp->buf' \ + \ + '# VMS' \ + '(*fp)->_ptr - (*fp)->_base' \ + \ + '# e.g., DGUX R4.11; the info is not available' \ + 1 \ + ; do + + # Skip each embedded comment. + case "$ac_expr" in '#'*) continue;; esac + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[FILE *fp = stdin; (void) ($ac_expr);]])], + [fp_done=yes] + ) + test "$fp_done" = yes && break + done + + ac_cv_sys_pending_output_n_bytes=$ac_expr + ] + ) + AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES], + $ac_cv_sys_pending_output_n_bytes, + [the number of pending output bytes on stream 'fp']) +]) diff --git a/gl/m4/fpieee.m4 b/gl/m4/fpieee.m4 new file mode 100644 index 0000000..729afe8 --- /dev/null +++ b/gl/m4/fpieee.m4 @@ -0,0 +1,54 @@ +# fpieee.m4 serial 2 +dnl Copyright (C) 2007, 2009-2014 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 IEEE 754 standardized three items: +dnl - The formats of single-float and double-float - nowadays commonly +dnl available as 'float' and 'double' in C and C++. +dnl No autoconf test needed. +dnl - The overflow and division by zero behaviour: The result are values +dnl '±Inf' and 'NaN', rather than exceptions as it was before. +dnl This file provides an autoconf macro for ensuring this behaviour of +dnl floating-point operations. +dnl - A set of conditions (overflow, underflow, inexact, etc.) which can +dnl be configured to trigger an exception. +dnl This cannot be done in a portable way: it depends on the compiler, +dnl libc, kernel, and CPU. No autoconf macro is provided for this. + +dnl Ensure non-trapping behaviour of floating-point overflow and +dnl floating-point division by zero. +dnl (For integer overflow, see gcc's -ftrapv option; for integer division by +dnl zero, see the autoconf macro in intdiv0.m4.) + +AC_DEFUN([gl_FP_IEEE], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + # IEEE behaviour is the default on all CPUs except Alpha and SH + # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 + # and the GCC 4.1.2 manual). + case "$host_cpu" in + alpha*) + # On Alpha systems, a compiler option provides the behaviour. + # See the ieee(3) manual page, also available at + # + if test -n "$GCC"; then + # GCC has the option -mieee. + # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. + CPPFLAGS="$CPPFLAGS -mieee" + else + # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact. + # For full IEEE compliance (rarely needed), use option -ieee_with_inexact. + CPPFLAGS="$CPPFLAGS -ieee" + fi + ;; + sh*) + if test -n "$GCC"; then + # GCC has the option -mieee. + CPPFLAGS="$CPPFLAGS -mieee" + fi + ;; + esac +]) diff --git a/gl/m4/fpurge.m4 b/gl/m4/fpurge.m4 new file mode 100644 index 0000000..ee017d2 --- /dev/null +++ b/gl/m4/fpurge.m4 @@ -0,0 +1,45 @@ +# fpurge.m4 serial 7 +dnl Copyright (C) 2007, 2009-2014 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_FPURGE], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([fpurge]) + AC_CHECK_FUNCS_ONCE([__fpurge]) + AC_CHECK_DECLS([fpurge], , , [[#include ]]) + if test "x$ac_cv_func_fpurge" = xyes; then + HAVE_FPURGE=1 + # Detect BSD bug. Only cygwin 1.7 is known to be immune. + AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include +]], [FILE *f = fopen ("conftest.txt", "w+"); + if (!f) return 1; + if (fputc ('a', f) != 'a') return 2; + rewind (f); + if (fgetc (f) != 'a') return 3; + if (fgetc (f) != EOF) return 4; + if (fpurge (f) != 0) return 5; + if (putc ('b', f) != 'b') return 6; + if (fclose (f) != 0) return 7; + if ((f = fopen ("conftest.txt", "r")) == NULL) return 8; + if (fgetc (f) != 'a') return 9; + if (fgetc (f) != 'b') return 10; + if (fgetc (f) != EOF) return 11; + if (fclose (f) != 0) return 12; + if (remove ("conftest.txt") != 0) return 13; + return 0;])], + [gl_cv_func_fpurge_works=yes], [gl_cv_func_fpurge_works=no], + [gl_cv_func_fpurge_works='guessing no'])]) + if test "x$gl_cv_func_fpurge_works" != xyes; then + REPLACE_FPURGE=1 + fi + else + HAVE_FPURGE=0 + fi + if test "x$ac_cv_have_decl_fpurge" = xno; then + HAVE_DECL_FPURGE=0 + fi +]) diff --git a/gl/m4/freadahead.m4 b/gl/m4/freadahead.m4 new file mode 100644 index 0000000..95b4141 --- /dev/null +++ b/gl/m4/freadahead.m4 @@ -0,0 +1,10 @@ +# freadahead.m4 serial 1 +dnl Copyright (C) 2012-2014 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_FREADAHEAD], +[ + AC_CHECK_FUNCS_ONCE([__freadahead]) +]) diff --git a/gl/m4/freading.m4 b/gl/m4/freading.m4 new file mode 100644 index 0000000..836f4d7 --- /dev/null +++ b/gl/m4/freading.m4 @@ -0,0 +1,10 @@ +# freading.m4 serial 1 +dnl Copyright (C) 2007, 2009-2014 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_FREADING], +[ + AC_CHECK_FUNCS_ONCE([__freading]) +]) diff --git a/gl/m4/fseek.m4 b/gl/m4/fseek.m4 new file mode 100644 index 0000000..a5ea41d --- /dev/null +++ b/gl/m4/fseek.m4 @@ -0,0 +1,15 @@ +# fseek.m4 serial 4 +dnl Copyright (C) 2007, 2009-2014 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_FSEEK], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_FSEEKO]) + dnl When fseeko needs fixes, fseek needs them too. + if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then + REPLACE_FSEEK=1 + fi +]) diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4 new file mode 100644 index 0000000..4ccb57d --- /dev/null +++ b/gl/m4/fseeko.m4 @@ -0,0 +1,73 @@ +# fseeko.m4 serial 17 +dnl Copyright (C) 2007-2014 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_FSEEKO], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) + AC_REQUIRE([gl_SYS_TYPES_H]) + AC_REQUIRE([AC_PROG_CC]) + + dnl Persuade glibc to declare fseeko(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko], + [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include +]], [fseeko (stdin, 0, 0);])], + [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no]) + ]) + + AC_CHECK_DECLS_ONCE([fseeko]) + if test $ac_cv_have_decl_fseeko = no; then + HAVE_DECL_FSEEKO=0 + fi + + if test $gl_cv_func_fseeko = no; then + HAVE_FSEEKO=0 + else + if test $WINDOWS_64_BIT_OFF_T = 1; then + REPLACE_FSEEKO=1 + fi + if test $gl_cv_var_stdin_large_offset = no; then + REPLACE_FSEEKO=1 + fi + m4_ifdef([gl_FUNC_FFLUSH_STDIN], [ + gl_FUNC_FFLUSH_STDIN + if test $gl_cv_func_fflush_stdin != yes; then + REPLACE_FSEEKO=1 + fi + ]) + fi +]) + +dnl Code shared by fseeko and ftello. Determine if large files are supported, +dnl but stdin does not start as a large file by default. +AC_DEFUN([gl_STDIN_LARGE_OFFSET], + [ + AC_CACHE_CHECK([whether stdin defaults to large file offsets], + [gl_cv_var_stdin_large_offset], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], +[[#if defined __SL64 && defined __SCLE /* cygwin */ + /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making + fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and + it is easier to do a version check than building a runtime test. */ +# include +# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) + choke me +# endif +#endif]])], + [gl_cv_var_stdin_large_offset=yes], + [gl_cv_var_stdin_large_offset=no])]) +]) + +# Prerequisites of lib/fseeko.c. +AC_DEFUN([gl_PREREQ_FSEEKO], +[ + dnl Native Windows has the function _fseeki64. mingw hides it, but mingw64 + dnl makes it usable again. + AC_CHECK_FUNCS([_fseeki64]) +]) diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4 new file mode 100644 index 0000000..ddd3fb9 --- /dev/null +++ b/gl/m4/fstat.m4 @@ -0,0 +1,36 @@ +# fstat.m4 serial 4 +dnl Copyright (C) 2011-2014 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_FSTAT], +[ + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + + AC_REQUIRE([gl_MSVC_INVAL]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_FSTAT=1 + fi + + AC_REQUIRE([gl_HEADER_SYS_STAT_H]) + if test $WINDOWS_64_BIT_ST_SIZE = 1; then + REPLACE_FSTAT=1 + fi + + dnl Replace fstat() for supporting the gnulib-defined open() on directories. + m4_ifdef([gl_FUNC_FCHDIR], [ + gl_TEST_FCHDIR + if test $HAVE_FCHDIR = 0; then + case "$gl_cv_func_open_directory_works" in + *yes) ;; + *) + REPLACE_FSTAT=1 + ;; + esac + fi + ]) +]) + +# Prerequisites of lib/fstat.c. +AC_DEFUN([gl_PREREQ_FSTAT], [:]) diff --git a/gl/m4/fstatat.m4 b/gl/m4/fstatat.m4 new file mode 100644 index 0000000..548eb7b --- /dev/null +++ b/gl/m4/fstatat.m4 @@ -0,0 +1,60 @@ +# fstatat.m4 serial 3 +dnl Copyright (C) 2004-2014 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. + +# Written by Jim Meyering. + +# If we have the fstatat function, and it has the bug (in AIX 7.1) +# that it does not fill in st_size correctly, use the replacement function. +AC_DEFUN([gl_FUNC_FSTATAT], +[ + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CHECK_FUNCS_ONCE([fstatat]) + + if test $ac_cv_func_fstatat = no; then + HAVE_FSTATAT=0 + else + dnl Test for an AIX 7.1 bug; see + dnl . + AC_CACHE_CHECK([whether fstatat (..., 0) works], + [gl_cv_func_fstatat_zero_flag], + [AC_RUN_IFELSE( + [AC_LANG_SOURCE( + [[ + #include + #include + int + main (void) + { + struct stat a; + return fstatat (AT_FDCWD, ".", &a, 0) != 0; + } + ]])], + [gl_cv_func_fstatat_zero_flag=yes], + [gl_cv_func_fstatat_zero_flag=no], + [case "$host_os" in + aix*) gl_cv_func_fstatat_zero_flag="guessing no";; + *) gl_cv_func_fstatat_zero_flag="guessing yes";; + esac + ]) + ]) + + case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in + *yes+*yes) ;; + *) REPLACE_FSTATAT=1 + case $gl_cv_func_fstatat_zero_flag in + *yes) + AC_DEFINE([HAVE_WORKING_FSTATAT_ZERO_FLAG], [1], + [Define to 1 if fstatat (..., 0) works. + For example, it does not work in AIX 7.1.]) + ;; + esac + ;; + esac + fi +]) diff --git a/gl/m4/fstypename.m4 b/gl/m4/fstypename.m4 new file mode 100644 index 0000000..d90e006 --- /dev/null +++ b/gl/m4/fstypename.m4 @@ -0,0 +1,23 @@ +#serial 6 + +dnl From Jim Meyering. +dnl +dnl See if struct statfs has the f_fstypename member. +dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME. +dnl + +# Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2014 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. + +AC_DEFUN([gl_FSTYPENAME], +[ + AC_CHECK_MEMBERS([struct statfs.f_fstypename],,, + [ + #include + #include + #include + ]) +]) diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4 new file mode 100644 index 0000000..b99e76d --- /dev/null +++ b/gl/m4/ftell.m4 @@ -0,0 +1,15 @@ +# ftell.m4 serial 3 +dnl Copyright (C) 2007, 2009-2014 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_FTELL], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_FTELLO]) + dnl When ftello needs fixes, ftell needs them too. + if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then + REPLACE_FTELL=1 + fi +]) diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4 new file mode 100644 index 0000000..14a9bee --- /dev/null +++ b/gl/m4/ftello.m4 @@ -0,0 +1,140 @@ +# ftello.m4 serial 11 +dnl Copyright (C) 2007-2014 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_FTELLO], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) + AC_REQUIRE([gl_SYS_TYPES_H]) + + dnl Persuade glibc to declare ftello(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_DECLS_ONCE([ftello]) + if test $ac_cv_have_decl_ftello = no; then + HAVE_DECL_FTELLO=0 + fi + + AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello], + [ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[ftello (stdin);]])], + [gl_cv_func_ftello=yes], + [gl_cv_func_ftello=no]) + ]) + if test $gl_cv_func_ftello = no; then + HAVE_FTELLO=0 + else + if test $WINDOWS_64_BIT_OFF_T = 1; then + REPLACE_FTELLO=1 + fi + if test $gl_cv_var_stdin_large_offset = no; then + REPLACE_FTELLO=1 + fi + if test $REPLACE_FTELLO = 0; then + dnl Detect bug on Solaris. + dnl ftell and ftello produce incorrect results after putc that followed a + dnl getc call that reached EOF on Solaris. This is because the _IOREAD + dnl flag does not get cleared in this case, even though _IOWRT gets set, + dnl and ftell and ftello look whether the _IOREAD flag is set. + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CACHE_CHECK([whether ftello works], + [gl_cv_func_ftello_works], + [ + dnl Initial guess, used when cross-compiling or when /dev/tty cannot + dnl be opened. +changequote(,)dnl + case "$host_os" in + # Guess no on Solaris. + solaris*) gl_cv_func_ftello_works="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_ftello_works="guessing yes" ;; + esac +changequote([,])dnl + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +#define TESTFILE "conftest.tmp" +int +main (void) +{ + FILE *fp; + + /* Create a file with some contents. */ + fp = fopen (TESTFILE, "w"); + if (fp == NULL) + return 70; + if (fwrite ("foogarsh", 1, 8, fp) < 8) + return 71; + if (fclose (fp)) + return 72; + + /* The file's contents is now "foogarsh". */ + + /* Try writing after reading to EOF. */ + fp = fopen (TESTFILE, "r+"); + if (fp == NULL) + return 73; + if (fseek (fp, -1, SEEK_END)) + return 74; + if (!(getc (fp) == 'h')) + return 1; + if (!(getc (fp) == EOF)) + return 2; + if (!(ftell (fp) == 8)) + return 3; + if (!(ftell (fp) == 8)) + return 4; + if (!(putc ('!', fp) == '!')) + return 5; + if (!(ftell (fp) == 9)) + return 6; + if (!(fclose (fp) == 0)) + return 7; + fp = fopen (TESTFILE, "r"); + if (fp == NULL) + return 75; + { + char buf[10]; + if (!(fread (buf, 1, 10, fp) == 9)) + return 10; + if (!(memcmp (buf, "foogarsh!", 9) == 0)) + return 11; + } + if (!(fclose (fp) == 0)) + return 12; + + /* The file's contents is now "foogarsh!". */ + + return 0; +}]])], + [gl_cv_func_ftello_works=yes], + [gl_cv_func_ftello_works=no], [:]) + ]) + case "$gl_cv_func_ftello_works" in + *yes) ;; + *) + REPLACE_FTELLO=1 + AC_DEFINE([FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE], [1], + [Define to 1 if the system's ftello function has the Solaris bug.]) + ;; + esac + fi + fi +]) + +# Prerequisites of lib/ftello.c. +AC_DEFUN([gl_PREREQ_FTELLO], +[ + dnl Native Windows has the function _ftelli64. mingw hides it, but mingw64 + dnl makes it usable again. + AC_CHECK_FUNCS([_ftelli64]) +]) diff --git a/gl/m4/ftruncate.m4 b/gl/m4/ftruncate.m4 new file mode 100644 index 0000000..29c76cc --- /dev/null +++ b/gl/m4/ftruncate.m4 @@ -0,0 +1,40 @@ +# serial 20 + +# See if we need to emulate a missing ftruncate function using chsize. + +# Copyright (C) 2000-2001, 2003-2007, 2009-2014 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. + +AC_DEFUN([gl_FUNC_FTRUNCATE], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([ftruncate]) + if test $ac_cv_func_ftruncate = yes; then + m4_ifdef([gl_LARGEFILE], [ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + mingw*) + dnl Native Windows, and Large File Support is requested. + dnl The MSVCRT _chsize() function only accepts a 32-bit file size, + dnl and the mingw64 ftruncate64() function is unreliable (it may + dnl delete the file, see + dnl ). + dnl Use gnulib's ftruncate() implementation instead. + REPLACE_FTRUNCATE=1 + ;; + esac + ], [ + : + ]) + else + HAVE_FTRUNCATE=0 + fi +]) + +# Prerequisites of lib/ftruncate.c. +AC_DEFUN([gl_PREREQ_FTRUNCATE], +[ + AC_CHECK_FUNCS([chsize]) +]) diff --git a/gl/m4/fts.m4 b/gl/m4/fts.m4 new file mode 100644 index 0000000..80acc2c --- /dev/null +++ b/gl/m4/fts.m4 @@ -0,0 +1,22 @@ +#serial 20 +dnl Copyright (C) 2005-2014 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_FTS], +[ + gl_FUNC_FTS_CORE +]) + +AC_DEFUN([gl_FUNC_FTS_CORE], +[ + dnl Prerequisites of lib/fts.c. + gl_FUNC_OPENAT + + AC_CHECK_FUNCS_ONCE([fstatfs]) + AC_CHECK_HEADERS_ONCE([sys/param.h sys/vfs.h])dnl + AC_CHECK_MEMBERS([struct statfs.f_type],,, + [$ac_includes_default + #include ]) +]) diff --git a/gl/m4/getcwd-abort-bug.m4 b/gl/m4/getcwd-abort-bug.m4 new file mode 100644 index 0000000..de69622 --- /dev/null +++ b/gl/m4/getcwd-abort-bug.m4 @@ -0,0 +1,140 @@ +# serial 7 +# Determine whether getcwd aborts when the length of the working directory +# name is unusually large. Any length between 4k and 16k trigger the bug +# when using glibc-2.4.90-9 or older. + +# Copyright (C) 2006, 2009-2014 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. + +# From Jim Meyering + +# gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG], +[ + AC_CHECK_DECLS_ONCE([getcwd]) + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) + AC_CHECK_FUNCS([getpagesize]) + AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k], + gl_cv_func_getcwd_abort_bug, + [# Remove any remnants of a previous test. + rm -rf confdir-14B--- + # Arrange for deletion of the temporary directory this test creates. + ac_clean_files="$ac_clean_files confdir-14B---" + dnl Please keep this in sync with tests/test-getcwd.c. + AC_RUN_IFELSE( + [AC_LANG_SOURCE( + [[ +#include +#include +#if HAVE_UNISTD_H +# include +#else /* on Windows with MSVC */ +# include +#endif +#include +#include + +]gl_PATHMAX_SNIPPET[ + +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir + +#ifndef S_IRWXU +# define S_IRWXU 0700 +#endif + +/* FIXME: skip the run-test altogether on systems without getpagesize. */ +#if ! HAVE_GETPAGESIZE +# define getpagesize() 0 +#endif + +/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than + the 16kB pagesize on ia64 linux. Those conditions make the code below + trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ +#define TARGET_LEN (5 * 1024) + +int +main () +{ + char *cwd; + size_t initial_cwd_len; + int fail = 0; + + /* The bug is triggered when PATH_MAX < getpagesize (), so skip + this relatively expensive and invasive test if that's not true. */ +#ifdef PATH_MAX + int bug_possible = PATH_MAX < getpagesize (); +#else + int bug_possible = 0; +#endif + if (! bug_possible) + return 0; + + cwd = getcwd (NULL, 0); + if (cwd == NULL) + return 2; + + initial_cwd_len = strlen (cwd); + free (cwd); + + if (1) + { + static char const dir_name[] = "confdir-14B---"; + size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) + / sizeof dir_name); + size_t d; + for (d = 0; d < desired_depth; d++) + { + if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) + { + if (! (errno == ERANGE || errno == ENAMETOOLONG + || errno == ENOENT)) + fail = 3; /* Unable to construct deep hierarchy. */ + break; + } + } + + /* If libc has the bug in question, this invocation of getcwd + results in a failed assertion. */ + cwd = getcwd (NULL, 0); + if (cwd == NULL) + fail = 4; /* getcwd didn't assert, but it failed for a long name + where the answer could have been learned. */ + free (cwd); + + /* Call rmdir first, in case the above chdir failed. */ + rmdir (dir_name); + while (0 < d--) + { + if (chdir ("..") < 0) + { + fail = 5; + break; + } + rmdir (dir_name); + } + } + + return fail; +} + ]])], + [gl_cv_func_getcwd_abort_bug=no], + [dnl An abort will provoke an exit code of something like 134 (128 + 6). + dnl An exit code of 4 can also occur (in OpenBSD 4.9, NetBSD 5.1 for + dnl example): getcwd (NULL, 0) fails rather than returning a string + dnl longer than PATH_MAX. This may be POSIX compliant (in some + dnl interpretations of POSIX). But gnulib's getcwd module wants to + dnl provide a non-NULL value in this case. + ret=$? + if test $ret -ge 128 || test $ret = 4; then + gl_cv_func_getcwd_abort_bug=yes + else + gl_cv_func_getcwd_abort_bug=no + fi], + [gl_cv_func_getcwd_abort_bug=yes]) + ]) + AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2]) +]) diff --git a/gl/m4/getcwd-path-max.m4 b/gl/m4/getcwd-path-max.m4 new file mode 100644 index 0000000..6b49f1a --- /dev/null +++ b/gl/m4/getcwd-path-max.m4 @@ -0,0 +1,204 @@ +# serial 19 +# Check for several getcwd bugs with long file names. +# If so, arrange to compile the wrapper function. + +# This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20. +# I've heard that this is due to a Linux kernel bug, and that it has +# been fixed between 2.4.21-pre3 and 2.4.21-pre4. + +# Copyright (C) 2003-2007, 2009-2014 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. + +# From Jim Meyering + +AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX], +[ + AC_CHECK_DECLS_ONCE([getcwd]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) + AC_CACHE_CHECK([whether getcwd handles long file names properly], + gl_cv_func_getcwd_path_max, + [# Arrange for deletion of the temporary directory this test creates. + ac_clean_files="$ac_clean_files confdir3" + dnl Please keep this in sync with tests/test-getcwd.c. + AC_RUN_IFELSE( + [AC_LANG_SOURCE( + [[ +#include +#include +#if HAVE_UNISTD_H +# include +#else +# include +#endif +#include +#include +#include +#include +#include + +]gl_PATHMAX_SNIPPET[ + +#ifndef AT_FDCWD +# define AT_FDCWD 0 +#endif +#ifdef ENAMETOOLONG +# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) +#else +# define is_ENAMETOOLONG(x) 0 +#endif + +/* Use the getcwd function, not any macro. */ +#undef getcwd + +/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +#undef mkdir + +#ifndef S_IRWXU +# define S_IRWXU 0700 +#endif + +/* The length of this name must be 8. */ +#define DIR_NAME "confdir3" +#define DIR_NAME_LEN 8 +#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) + +/* The length of "../". */ +#define DOTDOTSLASH_LEN 3 + +/* Leftover bytes in the buffer, to work around library or OS bugs. */ +#define BUF_SLOP 20 + +int +main () +{ +#ifndef PATH_MAX + /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- + at least not on a local file system. And if we were to start worrying + about remote file systems, we'd have to enable the wrapper function + all of the time, just to be safe. That's not worth the cost. */ + exit (0); +#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ + - DIR_NAME_SIZE - BUF_SLOP) \ + <= PATH_MAX) + /* FIXME: Assuming there's a system for which this is true, + this should be done in a compile test. */ + exit (0); +#else + char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) + + DIR_NAME_SIZE + BUF_SLOP]; + char *cwd = getcwd (buf, PATH_MAX); + size_t initial_cwd_len; + size_t cwd_len; + int fail = 0; + size_t n_chdirs = 0; + + if (cwd == NULL) + exit (10); + + cwd_len = initial_cwd_len = strlen (cwd); + + while (1) + { + size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); + char *c = NULL; + + cwd_len += DIR_NAME_SIZE; + /* If mkdir or chdir fails, it could be that this system cannot create + any file with an absolute name longer than PATH_MAX, such as cygwin. + If so, leave fail as 0, because the current working directory can't + be too long for getcwd if it can't even be created. For other + errors, be pessimistic and consider that as a failure, too. */ + if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) + { + if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) + fail = 20; + break; + } + + if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) + { + c = getcwd (buf, PATH_MAX); + if (!c && errno == ENOENT) + { + fail = 11; + break; + } + if (c) + { + fail = 31; + break; + } + if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) + { + fail = 21; + break; + } + } + + if (dotdot_max <= cwd_len - initial_cwd_len) + { + if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) + break; + c = getcwd (buf, cwd_len + 1); + if (!c) + { + if (! (errno == ERANGE || errno == ENOENT + || is_ENAMETOOLONG (errno))) + { + fail = 22; + break; + } + if (AT_FDCWD || errno == ERANGE || errno == ENOENT) + { + fail = 12; + break; + } + } + } + + if (c && strlen (c) != cwd_len) + { + fail = 23; + break; + } + ++n_chdirs; + } + + /* Leaving behind such a deep directory is not polite. + So clean up here, right away, even though the driving + shell script would also clean up. */ + { + size_t i; + + /* Try rmdir first, in case the chdir failed. */ + rmdir (DIR_NAME); + for (i = 0; i <= n_chdirs; i++) + { + if (chdir ("..") < 0) + break; + if (rmdir (DIR_NAME) != 0) + break; + } + } + + exit (fail); +#endif +} + ]])], + [gl_cv_func_getcwd_path_max=yes], + [case $? in + 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; + 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; + *) gl_cv_func_getcwd_path_max=no;; + esac], + [case "$host_os" in + aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; + *) gl_cv_func_getcwd_path_max=no;; + esac]) + ]) +]) diff --git a/gl/m4/getcwd.m4 b/gl/m4/getcwd.m4 new file mode 100644 index 0000000..fc986cd --- /dev/null +++ b/gl/m4/getcwd.m4 @@ -0,0 +1,155 @@ +# getcwd.m4 - check for working getcwd that is compatible with glibc + +# Copyright (C) 2001, 2003-2007, 2009-2014 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. + +# Written by Paul Eggert. +# serial 12 + +AC_DEFUN([gl_FUNC_GETCWD_NULL], + [ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result], + [gl_cv_func_getcwd_null], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +# if HAVE_UNISTD_H +# include +# else /* on Windows with MSVC */ +# include +# endif +# ifndef getcwd + char *getcwd (); +# endif +]], [[ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* mingw cwd does not start with '/', but getcwd does allocate. + However, mingw fails to honor non-zero size. */ +#else + if (chdir ("/") != 0) + return 1; + else + { + char *f = getcwd (NULL, 0); + if (! f) + return 2; + if (f[0] != '/') + return 3; + if (f[1] != '\0') + return 4; + return 0; + } +#endif + ]])], + [gl_cv_func_getcwd_null=yes], + [gl_cv_func_getcwd_null=no], + [[case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_getcwd_null="guessing yes";; + # Guess yes on Cygwin. + cygwin*) gl_cv_func_getcwd_null="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_getcwd_null="guessing no";; + esac + ]])]) +]) + +AC_DEFUN([gl_FUNC_GETCWD_SIGNATURE], +[ + AC_CACHE_CHECK([for getcwd with POSIX signature], + [gl_cv_func_getcwd_posix_signature], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[extern + #ifdef __cplusplus + "C" + #endif + char *getcwd (char *, size_t); + ]]) + ], + [gl_cv_func_getcwd_posix_signature=yes], + [gl_cv_func_getcwd_posix_signature=no]) + ]) +]) + +dnl Guarantee that getcwd will malloc with a NULL first argument. Assumes +dnl that either the system getcwd is robust, or that calling code is okay +dnl with spurious failures when run from a directory with an absolute name +dnl larger than 4k bytes. +dnl +dnl Assumes that getcwd exists; if you are worried about obsolete +dnl platforms that lacked getcwd(), then you need to use the GPL module. +AC_DEFUN([gl_FUNC_GETCWD_LGPL], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_GETCWD_NULL]) + AC_REQUIRE([gl_FUNC_GETCWD_SIGNATURE]) + + case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in + *yes,yes) ;; + *) + dnl Minimal replacement lib/getcwd-lgpl.c. + REPLACE_GETCWD=1 + ;; + esac +]) + +dnl Check for all known getcwd bugs; useful for a program likely to be +dnl executed from an arbitrary location. +AC_DEFUN([gl_FUNC_GETCWD], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_GETCWD_NULL]) + AC_REQUIRE([gl_FUNC_GETCWD_SIGNATURE]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + gl_abort_bug=no + case "$host_os" in + mingw*) + gl_cv_func_getcwd_path_max=yes + ;; + *) + gl_FUNC_GETCWD_PATH_MAX + case "$gl_cv_func_getcwd_null" in + *yes) + gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]) + ;; + esac + ;; + esac + dnl Define HAVE_MINIMALLY_WORKING_GETCWD and HAVE_PARTLY_WORKING_GETCWD + dnl if appropriate. + case "$gl_cv_func_getcwd_path_max" in + "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 + trusted when it succeeds.]) + ;; + esac + case "$gl_cv_func_getcwd_path_max" in + "no, but it is partly working") + AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1], + [Define to 1 if getcwd works, except it sometimes fails when it + shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT.]) + ;; + esac + + if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \ + || test $gl_cv_func_getcwd_posix_signature != yes \ + || test "$gl_cv_func_getcwd_path_max" != yes \ + || test $gl_abort_bug = yes; then + REPLACE_GETCWD=1 + fi +]) + +# Prerequisites of lib/getcwd.c, when full replacement is in effect. +AC_DEFUN([gl_PREREQ_GETCWD], +[ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO]) + : +]) diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4 new file mode 100644 index 0000000..c763994 --- /dev/null +++ b/gl/m4/getdelim.m4 @@ -0,0 +1,88 @@ +# getdelim.m4 serial 10 + +dnl Copyright (C) 2005-2007, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_PREREQ([2.59]) + +AC_DEFUN([gl_FUNC_GETDELIM], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + + dnl Persuade glibc to declare getdelim(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_DECLS_ONCE([getdelim]) + + AC_CHECK_FUNCS_ONCE([getdelim]) + if test $ac_cv_func_getdelim = yes; then + HAVE_GETDELIM=1 + dnl Found it in some library. Verify that it works. + AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim], + [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +# include +# include +# include + int main () + { + FILE *in = fopen ("./conftest.data", "r"); + if (!in) + return 1; + { + /* Test result for a NULL buffer and a zero size. + Based on a test program from Karl Heuer. */ + char *line = NULL; + size_t siz = 0; + int len = getdelim (&line, &siz, '\n', in); + if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) + return 2; + } + { + /* Test result for a NULL buffer and a non-zero size. + This crashes on FreeBSD 8.0. */ + char *line = NULL; + size_t siz = (size_t)(~0) / 4; + if (getdelim (&line, &siz, '\n', in) == -1) + return 3; + } + return 0; + } + ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works. + , [gl_cv_func_working_getdelim=no] dnl The library version does NOT work. + , dnl We're cross compiling. Assume it works on glibc2 systems. + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + Lucky GNU user + #endif +#endif + ], + [gl_cv_func_working_getdelim="guessing yes"], + [gl_cv_func_working_getdelim="guessing no"])] + )]) + case "$gl_cv_func_working_getdelim" in + *no) + REPLACE_GETDELIM=1 + ;; + esac + else + HAVE_GETDELIM=0 + fi + + if test $ac_cv_have_decl_getdelim = no; then + HAVE_DECL_GETDELIM=0 + fi +]) + +# Prerequisites of lib/getdelim.c. +AC_DEFUN([gl_PREREQ_GETDELIM], +[ + AC_CHECK_FUNCS([flockfile funlockfile]) + AC_CHECK_DECLS([getc_unlocked]) +]) diff --git a/gl/m4/getdtablesize.m4 b/gl/m4/getdtablesize.m4 new file mode 100644 index 0000000..aa523b6 --- /dev/null +++ b/gl/m4/getdtablesize.m4 @@ -0,0 +1,44 @@ +# getdtablesize.m4 serial 5 +dnl Copyright (C) 2008-2014 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_GETDTABLESIZE], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CHECK_FUNCS_ONCE([getdtablesize]) + if test $ac_cv_func_getdtablesize = yes; then + # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit + # up to an unchangeable hard limit; all other platforms correctly + # require setrlimit before getdtablesize() can report a larger value. + AC_CACHE_CHECK([whether getdtablesize works], + [gl_cv_func_getdtablesize_works], + [AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[#include ]], + [int size = getdtablesize(); + if (dup2 (0, getdtablesize()) != -1) + return 1; + if (size != getdtablesize()) + return 2; + ])], + [gl_cv_func_getdtablesize_works=yes], + [gl_cv_func_getdtablesize_works=no], + [case "$host_os" in + cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows + gl_cv_func_getdtablesize_works="guessing no" ;; + *) gl_cv_func_getdtablesize_works="guessing yes" ;; + esac]) + ]) + case "$gl_cv_func_getdtablesize_works" in + *yes) ;; + *) REPLACE_GETDTABLESIZE=1 ;; + esac + else + HAVE_GETDTABLESIZE=0 + fi +]) + +# Prerequisites of lib/getdtablesize.c. +AC_DEFUN([gl_PREREQ_GETDTABLESIZE], [:]) diff --git a/gl/m4/getgroups.m4 b/gl/m4/getgroups.m4 new file mode 100644 index 0000000..f05357d --- /dev/null +++ b/gl/m4/getgroups.m4 @@ -0,0 +1,107 @@ +# serial 18 + +dnl From Jim Meyering. +dnl A wrapper around AC_FUNC_GETGROUPS. + +# Copyright (C) 1996-1997, 1999-2004, 2008-2014 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. + +m4_version_prereq([2.70], [] ,[ + +# This is taken from the following Autoconf patch: +# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9 +AC_DEFUN([AC_FUNC_GETGROUPS], +[ + AC_REQUIRE([AC_TYPE_GETGROUPS])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles + AC_CHECK_FUNC([getgroups]) + + # If we don't yet have getgroups, see if it's in -lbsd. + # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. + ac_save_LIBS=$LIBS + if test $ac_cv_func_getgroups = no; then + AC_CHECK_LIB(bsd, getgroups, [GETGROUPS_LIB=-lbsd]) + fi + + # Run the program to test the functionality of the system-supplied + # getgroups function only if there is such a function. + if test $ac_cv_func_getgroups = yes; then + AC_CACHE_CHECK([for working getgroups], [ac_cv_func_getgroups_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT], + [[/* On Ultrix 4.3, getgroups (0, 0) always fails. */ + return getgroups (0, 0) == -1;]]) + ], + [ac_cv_func_getgroups_works=yes], + [ac_cv_func_getgroups_works=no], + [case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, assume the worst. + *) ac_cv_func_getgroups_works="guessing no" ;; + esac + ]) + ]) + else + ac_cv_func_getgroups_works=no + fi + case "$ac_cv_func_getgroups_works" in + *yes) + AC_DEFINE([HAVE_GETGROUPS], [1], + [Define to 1 if your system has a working `getgroups' function.]) + ;; + esac + LIBS=$ac_save_LIBS +])# AC_FUNC_GETGROUPS + +]) + +AC_DEFUN([gl_FUNC_GETGROUPS], +[ + AC_REQUIRE([AC_TYPE_GETGROUPS]) + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + AC_FUNC_GETGROUPS + if test $ac_cv_func_getgroups != yes; then + HAVE_GETGROUPS=0 + else + if test "$ac_cv_type_getgroups" != gid_t \ + || { case "$ac_cv_func_getgroups_works" in + *yes) false;; + *) true;; + esac + }; then + REPLACE_GETGROUPS=1 + AC_DEFINE([GETGROUPS_ZERO_BUG], [1], [Define this to 1 if + getgroups(0,NULL) does not return the number of groups.]) + else + dnl Detect FreeBSD bug; POSIX requires getgroups(-1,ptr) to fail. + AC_CACHE_CHECK([whether getgroups handles negative values], + [gl_cv_func_getgroups_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], + [[int size = getgroups (0, 0); + gid_t *list = malloc (size * sizeof *list); + return getgroups (-1, list) != -1;]])], + [gl_cv_func_getgroups_works=yes], + [gl_cv_func_getgroups_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_getgroups_works="guessing no" ;; + esac + ])]) + case "$gl_cv_func_getgroups_works" in + *yes) ;; + *) REPLACE_GETGROUPS=1 ;; + esac + fi + fi + test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS" +]) diff --git a/gl/m4/gethostname.m4 b/gl/m4/gethostname.m4 new file mode 100644 index 0000000..d759ab1 --- /dev/null +++ b/gl/m4/gethostname.m4 @@ -0,0 +1,107 @@ +# gethostname.m4 serial 13 +dnl Copyright (C) 2002, 2008-2014 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. + +# Ensure +# - the gethostname() function, +# - the HOST_NAME_MAX macro in . +AC_DEFUN([gl_FUNC_GETHOSTNAME], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + gl_PREREQ_SYS_H_WINSOCK2 + + dnl Where is gethostname() defined? + dnl - On native Windows, it is in ws2_32.dll. + dnl - Otherwise it is in libc. + GETHOSTNAME_LIB= + AC_CHECK_FUNCS([gethostname], , [ + AC_CACHE_CHECK([for gethostname in winsock2.h and -lws2_32], + [gl_cv_w32_gethostname], + [gl_cv_w32_gethostname=no + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#ifdef HAVE_WINSOCK2_H +#include +#endif +#include +]], [[gethostname(NULL, 0);]])], [gl_cv_w32_gethostname=yes]) + LIBS="$gl_save_LIBS" + ]) + if test "$gl_cv_w32_gethostname" = "yes"; then + GETHOSTNAME_LIB="-lws2_32" + fi + ]) + AC_SUBST([GETHOSTNAME_LIB]) + + if test "$ac_cv_func_gethostname" = no; then + HAVE_GETHOSTNAME=0 + fi + + gl_PREREQ_HOST_NAME_MAX +]) + +# Provide HOST_NAME_MAX when lacks it. +AC_DEFUN([gl_PREREQ_HOST_NAME_MAX], [ + dnl - On most Unix systems, use MAXHOSTNAMELEN from instead. + dnl - On Solaris, Cygwin, BeOS, use MAXHOSTNAMELEN from instead. + dnl - On mingw, use 256, because + dnl says: + dnl "if a buffer of 256 bytes is passed in the name parameter and + dnl the namelen parameter is set to 256, the buffer size will always + dnl be adequate." + dnl With this, there is no need to use sysconf (_SC_HOST_NAME_MAX), which + dnl is not a compile-time constant. + dnl We cannot override using the usual technique, because + dnl gl_CHECK_NEXT_HEADERS does not work for . Therefore retrieve + dnl the value of HOST_NAME_MAX at configure time. + AC_CHECK_HEADERS_ONCE([sys/param.h]) + AC_CHECK_HEADERS_ONCE([sys/socket.h]) + AC_CHECK_HEADERS_ONCE([netdb.h]) + AC_CACHE_CHECK([for HOST_NAME_MAX], [gl_cv_decl_HOST_NAME_MAX], [ + gl_cv_decl_HOST_NAME_MAX= + AC_EGREP_CPP([lucky], [ +#include +#ifdef HOST_NAME_MAX +lucky +#endif + ], [gl_cv_decl_HOST_NAME_MAX=yes]) + if test -z "$gl_cv_decl_HOST_NAME_MAX"; then + dnl It's not defined in . Substitute it. + if test "$gl_cv_w32_gethostname" = yes; then + dnl mingw. + gl_cv_decl_HOST_NAME_MAX=256 + else + _AC_COMPUTE_INT([MAXHOSTNAMELEN], [gl_cv_decl_HOST_NAME_MAX], [ +#include +#if HAVE_SYS_PARAM_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_NETDB_H +# include +#endif +], + [dnl The system does not define MAXHOSTNAMELEN in any of the common + dnl headers. Use a safe fallback. + gl_cv_decl_HOST_NAME_MAX=256 + ]) + fi + fi + ]) + if test "$gl_cv_decl_HOST_NAME_MAX" != yes; then + AC_DEFINE_UNQUOTED([HOST_NAME_MAX], [$gl_cv_decl_HOST_NAME_MAX], + [Define HOST_NAME_MAX when does not define it.]) + fi +]) + +# Prerequisites of lib/gethostname.c. +AC_DEFUN([gl_PREREQ_GETHOSTNAME], [ + if test "$gl_cv_w32_gethostname" != "yes"; then + AC_CHECK_FUNCS([uname]) + fi +]) diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4 new file mode 100644 index 0000000..0330666 --- /dev/null +++ b/gl/m4/getline.m4 @@ -0,0 +1,96 @@ +# getline.m4 serial 26 + +dnl Copyright (C) 1998-2003, 2005-2007, 2009-2014 Free Software Foundation, +dnl Inc. +dnl +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_PREREQ([2.59]) + +dnl See if there's a working, system-supplied version of the getline function. +dnl We can't just do AC_REPLACE_FUNCS([getline]) because some systems +dnl have a function by that name in -linet that doesn't have anything +dnl to do with the function we need. +AC_DEFUN([gl_FUNC_GETLINE], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + + dnl Persuade glibc to declare getline(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_DECLS_ONCE([getline]) + + gl_getline_needs_run_time_check=no + AC_CHECK_FUNC([getline], + [dnl Found it in some library. Verify that it works. + gl_getline_needs_run_time_check=yes], + [am_cv_func_working_getline=no]) + if test $gl_getline_needs_run_time_check = yes; then + AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline], + [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +# include +# include +# include + int main () + { + FILE *in = fopen ("./conftest.data", "r"); + if (!in) + return 1; + { + /* Test result for a NULL buffer and a zero size. + Based on a test program from Karl Heuer. */ + char *line = NULL; + size_t siz = 0; + int len = getline (&line, &siz, in); + if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) + return 2; + } + { + /* Test result for a NULL buffer and a non-zero size. + This crashes on FreeBSD 8.0. */ + char *line = NULL; + size_t siz = (size_t)(~0) / 4; + if (getline (&line, &siz, in) == -1) + return 3; + } + return 0; + } + ]])], [am_cv_func_working_getline=yes] dnl The library version works. + , [am_cv_func_working_getline=no] dnl The library version does NOT work. + , dnl We're cross compiling. Assume it works on glibc2 systems. + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ >= 2) && !defined __UCLIBC__ + Lucky GNU user + #endif +#endif + ], + [am_cv_func_working_getline="guessing yes"], + [am_cv_func_working_getline="guessing no"])] + )]) + fi + + if test $ac_cv_have_decl_getline = no; then + HAVE_DECL_GETLINE=0 + fi + + case "$am_cv_func_working_getline" in + *no) + dnl Set REPLACE_GETLINE always: Even if we have not found the broken + dnl getline function among $LIBS, it may exist in libinet and the + dnl executable may be linked with -linet. + REPLACE_GETLINE=1 + ;; + esac +]) + +# Prerequisites of lib/getline.c. +AC_DEFUN([gl_PREREQ_GETLINE], +[ + : +]) diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4 new file mode 100644 index 0000000..f127028 --- /dev/null +++ b/gl/m4/getopt.m4 @@ -0,0 +1,368 @@ +# getopt.m4 serial 44 +dnl Copyright (C) 2002-2006, 2008-2014 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. + +# Request a POSIX compliant getopt function. +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], [ + REPLACE_GETOPT=1 + ], [ + REPLACE_GETOPT=0 + 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. + gl_GETOPT_SUBSTITUTE_HEADER + fi +]) + +# Request a POSIX compliant getopt function with GNU extensions (such as +# options with optional arguments) and the functions getopt_long, +# getopt_long_only. +AC_DEFUN([gl_FUNC_GETOPT_GNU], +[ + m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) + + AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) +]) + +# Determine whether to replace the entire getopt facility. +AC_DEFUN([gl_GETOPT_CHECK_HEADERS], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON + + dnl Persuade Solaris to declare optarg, optind, opterr, optopt. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + gl_CHECK_NEXT_HEADERS([getopt.h]) + if test $ac_cv_header_getopt_h = yes; then + HAVE_GETOPT_H=1 + else + HAVE_GETOPT_H=0 + fi + AC_SUBST([HAVE_GETOPT_H]) + + gl_replace_getopt= + + dnl Test whether is available. + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) + fi + + dnl Test whether the function getopt_long is available. + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes]) + fi + + 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 '+' + dnl behavior with getopt-gnu. + if test -z "$gl_replace_getopt"; then + AC_CACHE_CHECK([whether getopt is POSIX compatible], + [gl_cv_func_getopt_posix], + [ + 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 and getopt() entirely). + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include + +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; + + 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 and getopt() entirely). + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include + +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; + 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 +#include +#include + +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]) + 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 ;; + esac + fi + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then + AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu], + [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the + # optstring is necessary for programs like m4 that have POSIX-mandated + # semantics for supporting options interspersed with files. + # Also, since getopt_long is a GNU extension, we require optind=0. + # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; + # so take care to revert to the correct (non-)export state. +dnl GNU Coding Standards currently allow awk but not env; besides, env +dnl is ambiguous with environment values that contain newlines. + gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' + case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" + #include + #include + ]GL_NOCRASH[ + ]], [[ + int result = 0; + + nocrash_init(); + + /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, + 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"; + static char plus[] = "-+"; + char *argv[3] = { conftest, plus, NULL }; + opterr = 0; + if (getopt (2, argv, "+a") != '?') + result |= 1; + } + /* This code succeeds on glibc 2.8, mingw, + 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"; + static char p[] = "-p"; + static char foo[] = "foo"; + static char bar[] = "bar"; + char *argv[] = { program, p, foo, bar, NULL }; + + optind = 1; + if (getopt (4, argv, "p::") != 'p') + result |= 2; + else if (optarg != NULL) + result |= 4; + else if (getopt (4, argv, "p::") != -1) + result |= 6; + else if (optind != 2) + result |= 8; + } + /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ + { + static char program[] = "program"; + static char foo[] = "foo"; + static char p[] = "-p"; + char *argv[] = { program, foo, p, NULL }; + optind = 0; + if (getopt (3, argv, "-p") != 1) + result |= 16; + else if (getopt (3, argv, "-p") != 'p') + result |= 16; + } + /* This code fails on glibc 2.11. */ + { + static char program[] = "program"; + static char b[] = "-b"; + static char a[] = "-a"; + char *argv[] = { program, b, a, NULL }; + optind = opterr = 0; + if (getopt (3, argv, "+:a:b") != 'b') + result |= 32; + else if (getopt (3, argv, "+:a:b") != ':') + result |= 32; + } + /* This code dumps core on glibc 2.14. */ + { + static char program[] = "program"; + static char w[] = "-W"; + static char dummy[] = "dummy"; + char *argv[] = { program, w, dummy, NULL }; + optind = opterr = 1; + if (getopt (3, argv, "W;") != 'W') + result |= 64; + } + return result; + ]])], + [gl_cv_func_getopt_gnu=yes], + [gl_cv_func_getopt_gnu=no], + [dnl Cross compiling. Assume the worst, even on glibc platforms. + gl_cv_func_getopt_gnu="guessing no" + ]) + case $gl_had_POSIXLY_CORRECT in + exported) ;; + yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;; + *) AS_UNSET([POSIXLY_CORRECT]) ;; + esac + ]) + 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 + #include + #include + ]], + [[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 +]) + +AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], +[ + GETOPT_H=getopt.h + AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], + [Define to rpl_ if the getopt replacement functions and variables + should be used.]) + AC_SUBST([GETOPT_H]) +]) + +# Prerequisites of lib/getopt*. +AC_DEFUN([gl_PREREQ_GETOPT], +[ + AC_CHECK_DECLS_ONCE([getenv]) +]) diff --git a/gl/m4/getpagesize.m4 b/gl/m4/getpagesize.m4 new file mode 100644 index 0000000..ce50695 --- /dev/null +++ b/gl/m4/getpagesize.m4 @@ -0,0 +1,32 @@ +# getpagesize.m4 serial 9 +dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_GETPAGESIZE], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CHECK_FUNCS([getpagesize]) + if test $ac_cv_func_getpagesize = no; then + HAVE_GETPAGESIZE=0 + AC_CHECK_HEADERS([OS.h]) + if test $ac_cv_header_OS_h = yes; then + HAVE_OS_H=1 + fi + AC_CHECK_HEADERS([sys/param.h]) + if test $ac_cv_header_sys_param_h = yes; then + HAVE_SYS_PARAM_H=1 + fi + fi + case "$host_os" in + mingw*) + REPLACE_GETPAGESIZE=1 + ;; + esac + dnl Also check whether it's declared. + dnl mingw has getpagesize() in libgcc.a but doesn't declare it. + AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0]) +]) diff --git a/gl/m4/gettext.m4 b/gl/m4/gettext.m4 new file mode 100644 index 0000000..be247bf --- /dev/null +++ b/gl/m4/gettext.m4 @@ -0,0 +1,401 @@ +# gettext.m4 serial 66 (gettext-0.18.2) +dnl Copyright (C) 1995-2014 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 +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +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 Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2006, 2008-2010. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value '$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], + [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define([gt_included_intl], + ifelse([$1], [external], + ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), + [yes])) + define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + gt_NEEDS_INIT + AM_GNU_GETTEXT_NEED([$2]) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. + gt_INTL_MACOSX + + dnl Set USE_NLS. + AC_REQUIRE([AM_NLS]) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl Add a version number to the cache macros. + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH([included-gettext], + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings + ]])], + [eval "$gt_func_gnugettext_libc=yes"], + [eval "$gt_func_gnugettext_libc=no"])]) + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + [$gt_func_gnugettext_libintl], + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ]])], + [eval "$gt_func_gnugettext_libintl=yes"], + [eval "$gt_func_gnugettext_libintl=no"]) + dnl Now see whether libintl exists and depends on libiconv. + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ]])], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + CATOBJEXT= + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Some extra flags are needed during linking. + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE([ENABLE_NLS], [1], + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + AC_MSG_CHECKING([whether to use NLS]) + AC_MSG_RESULT([$USE_NLS]) + if test "$USE_NLS" = "yes"; then + AC_MSG_CHECKING([where the gettext function comes from]) + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + AC_MSG_RESULT([$gt_source]) + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE([HAVE_GETTEXT], [1], + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE([HAVE_DCGETTEXT], [1], + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST([BUILD_INCLUDED_LIBINTL]) + AC_SUBST([USE_INCLUDED_LIBINTL]) + AC_SUBST([CATOBJEXT]) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST([DATADIRNAME]) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST([INSTOBJEXT]) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST([GENCAT]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLOBJS= + if test "$USE_INCLUDED_LIBINTL" = yes; then + INTLOBJS="\$(GETTOBJS)" + fi + AC_SUBST([INTLOBJS]) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST([INTLLIBS]) + + dnl Make all documented variables known to autoconf. + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + AC_SUBST([POSUB]) +]) + + +dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. +m4_define([gt_NEEDS_INIT], +[ + m4_divert_text([DEFAULTS], [gt_needs=]) + m4_define([gt_NEEDS_INIT], []) +]) + + +dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) +AC_DEFUN([AM_GNU_GETTEXT_NEED], +[ + m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/gl/m4/gettime.m4 b/gl/m4/gettime.m4 new file mode 100644 index 0000000..c5ec264 --- /dev/null +++ b/gl/m4/gettime.m4 @@ -0,0 +1,13 @@ +# gettime.m4 serial 8 +dnl Copyright (C) 2002, 2004-2006, 2009-2014 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_GETTIME], +[ + dnl Prerequisites of lib/gettime.c. + AC_REQUIRE([gl_CLOCK_TIME]) + AC_REQUIRE([gl_TIMESPEC]) + AC_CHECK_FUNCS_ONCE([gettimeofday nanotime]) +]) diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4 new file mode 100644 index 0000000..1c2d66e --- /dev/null +++ b/gl/m4/gettimeofday.m4 @@ -0,0 +1,138 @@ +# serial 21 + +# Copyright (C) 2001-2003, 2005, 2007, 2009-2014 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. + +dnl From Jim Meyering. + +AC_DEFUN([gl_FUNC_GETTIMEOFDAY], +[ + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_HEADER_SYS_TIME_H]) + AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([gettimeofday]) + + gl_gettimeofday_timezone=void + if test $ac_cv_func_gettimeofday != yes; then + HAVE_GETTIMEOFDAY=0 + else + gl_FUNC_GETTIMEOFDAY_CLOBBER + AC_CACHE_CHECK([for gettimeofday with POSIX signature], + [gl_cv_func_gettimeofday_posix_signature], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + struct timeval c; + int gettimeofday (struct timeval *restrict, void *restrict); + ]], + [[/* glibc uses struct timezone * rather than the POSIX void * + if _GNU_SOURCE is defined. However, since the only portable + use of gettimeofday uses NULL as the second parameter, and + since the glibc definition is actually more typesafe, it is + not worth wrapping this to get a compliant signature. */ + int (*f) (struct timeval *restrict, void *restrict) + = gettimeofday; + int x = f (&c, 0); + return !(x | c.tv_sec | c.tv_usec); + ]])], + [gl_cv_func_gettimeofday_posix_signature=yes], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include +int gettimeofday (struct timeval *restrict, struct timezone *restrict); + ]])], + [gl_cv_func_gettimeofday_posix_signature=almost], + [gl_cv_func_gettimeofday_posix_signature=no])])]) + if test $gl_cv_func_gettimeofday_posix_signature = almost; then + gl_gettimeofday_timezone='struct timezone' + elif test $gl_cv_func_gettimeofday_posix_signature != yes; then + REPLACE_GETTIMEOFDAY=1 + fi + dnl If we override 'struct timeval', we also have to override gettimeofday. + if test $REPLACE_STRUCT_TIMEVAL = 1; then + REPLACE_GETTIMEOFDAY=1 + fi + m4_ifdef([gl_FUNC_TZSET_CLOBBER], [ + gl_FUNC_TZSET_CLOBBER + case "$gl_cv_func_tzset_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + gl_GETTIMEOFDAY_REPLACE_LOCALTIME + AC_DEFINE([tzset], [rpl_tzset], + [Define to rpl_tzset if the wrapper function should be used.]) + AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1], + [Define if tzset clobbers localtime's static buffer.]) + ;; + esac + ]) + fi + AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone], + [Define this to 'void' or 'struct timezone' to match the system's + declaration of the second argument to gettimeofday.]) +]) + + +dnl See if gettimeofday clobbers the static buffer that localtime uses +dnl for its return value. The gettimeofday function from Mac OS X 10.0.4 +dnl (i.e., Darwin 1.3.7) has this problem. +dnl +dnl If it does, then arrange to use gettimeofday and localtime only via +dnl the wrapper functions that work around the problem. + +AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], +[ + AC_REQUIRE([gl_HEADER_SYS_TIME_H]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], + [gl_cv_func_gettimeofday_clobber], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + #include + ]], + [[ + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; + ]])], + [gl_cv_func_gettimeofday_clobber=no], + [gl_cv_func_gettimeofday_clobber=yes], + [# When cross-compiling: + case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + esac + ])]) + + case "$gl_cv_func_gettimeofday_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + gl_GETTIMEOFDAY_REPLACE_LOCALTIME + AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1], + [Define if gettimeofday clobbers the localtime buffer.]) + ;; + esac +]) + +AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ + REPLACE_GMTIME=1 + REPLACE_LOCALTIME=1 +]) + +# Prerequisites of lib/gettimeofday.c. +AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [ + AC_CHECK_HEADERS([sys/timeb.h]) + AC_CHECK_FUNCS([_ftime]) +]) diff --git a/gl/m4/glibc21.m4 b/gl/m4/glibc21.m4 new file mode 100644 index 0000000..ab58b71 --- /dev/null +++ b/gl/m4/glibc21.m4 @@ -0,0 +1,34 @@ +# glibc21.m4 serial 5 +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +# Test for the GNU C Library, version 2.1 or newer, or uClibc. +# From Bruno Haible. + +AC_DEFUN([gl_GLIBC21], + [ + AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], + [ac_cv_gnu_library_2_1], + [AC_EGREP_CPP([Lucky], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif +#ifdef __UCLIBC__ + Lucky user +#endif + ], + [ac_cv_gnu_library_2_1=yes], + [ac_cv_gnu_library_2_1=no]) + ] + ) + AC_SUBST([GLIBC21]) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 new file mode 100644 index 0000000..373a4eb --- /dev/null +++ b/gl/m4/gnulib-cache.m4 @@ -0,0 +1,156 @@ +# Copyright (C) 2002-2014 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . +# +# As a special exception to the GNU General Public License, +# this file may be distributed as part of a program that +# contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# +# This file represents the specification of how gnulib-tool is used. +# It acts as a cache: It is written and read by gnulib-tool. +# In projects that use version control, this file is meant to be put under +# version control, like the configure.ac and various Makefile.am files. + + +# Specification in the form of a command-line invocation: +# gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnulib --source-base=gl/lib --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca areadlinkat argmatch assert byteswap c-strcasestr c-strstr canonicalize cloexec closein closeout ctype d-ino d-type dirent-safer dirname errno error faccessat fchdir fcntl fdl fdopendir fflush fileblocks filemode fnmatch-gnu fopen-safer fts getdelim getline getopt-gnu gettext gettimeofday gpl-3.0 hash human idcache inline inttypes isblank locale lstat maintainer-makefile malloc manywarnings math mbrtowc mbscasestr mbsstr mktime modechange modf mountlist open parse-datetime pathmax perror progname quotearg readlink realloc regex rpmatch safe-read save-cwd savedir selinux-at snprintf stat stat-macros stat-size stat-time stdarg stdbool stddef stdint stdio stdlib stpcpy strcasestr strdup-posix strftime string strndup strtol strtoul strtoull strtoumax sys_stat sys_time sys_wait timespec uname unlinkat update-copyright verify version-etc version-etc-fsf warnings wchar wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno + +# Specification in the form of a few gnulib-tool.m4 macro invocations: +gl_LOCAL_DIR([gnulib-local]) +gl_MODULES([ + alloca + areadlinkat + argmatch + assert + byteswap + c-strcasestr + c-strstr + canonicalize + cloexec + closein + closeout + ctype + d-ino + d-type + dirent-safer + dirname + errno + error + faccessat + fchdir + fcntl + fdl + fdopendir + fflush + fileblocks + filemode + fnmatch-gnu + fopen-safer + fts + getdelim + getline + getopt-gnu + gettext + gettimeofday + gpl-3.0 + hash + human + idcache + inline + inttypes + isblank + locale + lstat + maintainer-makefile + malloc + manywarnings + math + mbrtowc + mbscasestr + mbsstr + mktime + modechange + modf + mountlist + open + parse-datetime + pathmax + perror + progname + quotearg + readlink + realloc + regex + rpmatch + safe-read + save-cwd + savedir + selinux-at + snprintf + stat + stat-macros + stat-size + stat-time + stdarg + stdbool + stddef + stdint + stdio + stdlib + stpcpy + strcasestr + strdup-posix + strftime + string + strndup + strtol + strtoul + strtoull + strtoumax + sys_stat + sys_time + sys_wait + timespec + uname + unlinkat + update-copyright + verify + version-etc + version-etc-fsf + warnings + wchar + wcwidth + xalloc + xalloc-die + xgetcwd + xstrtod + xstrtol + xstrtoumax + yesno +]) +gl_AVOID([]) +gl_SOURCE_BASE([gl/lib]) +gl_M4_BASE([gl/m4]) +gl_PO_BASE([]) +gl_DOC_BASE([doc]) +gl_TESTS_BASE([tests]) +gl_WITH_TESTS +gl_LIB([libgnulib]) +gl_MAKEFILE_NAME([]) +gl_MACRO_PREFIX([gl]) +gl_PO_DOMAIN([]) +gl_WITNESS_C_MACRO([]) diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 new file mode 100644 index 0000000..20ce40e --- /dev/null +++ b/gl/m4/gnulib-common.m4 @@ -0,0 +1,437 @@ +# gnulib-common.m4 serial 34 +dnl Copyright (C) 2007-2014 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. + +# gl_COMMON +# is expanded unconditionally through gnulib-tool magic. +AC_DEFUN([gl_COMMON], [ + dnl Use AC_REQUIRE here, so that the code is expanded once only. + AC_REQUIRE([gl_00GNULIB]) + AC_REQUIRE([gl_COMMON_BODY]) +]) +AC_DEFUN([gl_COMMON_BODY], [ + AH_VERBATIM([_Noreturn], +[/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif +]) + AH_VERBATIM([isoc99_inline], +[/* 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 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__ +# define __GNUC_STDC_INLINE__ 1 +#endif]) + AH_VERBATIM([unused_parameter], +[/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +#else +# define _GL_UNUSED +#endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED + +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The __const__ attribute was added in gcc 2.95. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +#else +# define _GL_ATTRIBUTE_CONST /* empty */ +#endif +]) + dnl Preparation for running test programs: + dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not + dnl to /dev/tty, so they can be redirected to log files. Such diagnostics + dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. + LIBC_FATAL_STDERR_=1 + export LIBC_FATAL_STDERR_ +]) + +# gl_MODULE_INDICATOR_CONDITION +# expands to a C preprocessor expression that evaluates to 1 or 0, depending +# whether a gnulib module that has been requested shall be considered present +# or not. +m4_define([gl_MODULE_INDICATOR_CONDITION], [1]) + +# gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) +# sets the shell variable that indicates the presence of the given module to +# a C preprocessor expression that will evaluate to 1. +AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], +[ + gl_MODULE_INDICATOR_SET_VARIABLE_AUX( + [GNULIB_[]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], + [gl_MODULE_INDICATOR_CONDITION]) +]) + +# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable]) +# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION. +# The shell variable's value is a C preprocessor expression that evaluates +# to 0 or 1. +AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX], +[ + m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1], + [ + dnl Simplify the expression VALUE || 1 to 1. + $1=1 + ], + [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1], + [gl_MODULE_INDICATOR_CONDITION])]) +]) + +# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition]) +# modifies the shell variable to include the given condition. The shell +# variable's value is a C preprocessor expression that evaluates to 0 or 1. +AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR], +[ + dnl Simplify the expression 1 || CONDITION to 1. + if test "$[]$1" != 1; then + dnl Simplify the expression 0 || CONDITION to CONDITION. + if test "$[]$1" = 0; then + $1=$2 + else + $1="($[]$1 || $2)" + fi + fi +]) + +# gl_MODULE_INDICATOR([modulename]) +# defines a C macro indicating the presence of the given module +# in a location where it can be used. +# | Value | Value | +# | in lib/ | in tests/ | +# --------------------------------------------+---------+-----------+ +# Module present among main modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module present among tests-related modules: | 0 | 1 | +# --------------------------------------------+---------+-----------+ +# Module not present at all: | 0 | 0 | +# --------------------------------------------+---------+-----------+ +AC_DEFUN([gl_MODULE_INDICATOR], +[ + AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), + [gl_MODULE_INDICATOR_CONDITION], + [Define to a C preprocessor expression that evaluates to 1 or 0, + depending whether the gnulib module $1 shall be considered present.]) +]) + +# gl_MODULE_INDICATOR_FOR_TESTS([modulename]) +# defines a C macro indicating the presence of the given module +# in lib or tests. This is useful to determine whether the module +# should be tested. +# | Value | Value | +# | in lib/ | in tests/ | +# --------------------------------------------+---------+-----------+ +# Module present among main modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module present among tests-related modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module not present at all: | 0 | 0 | +# --------------------------------------------+---------+-----------+ +AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], +[ + AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], + [Define to 1 when the gnulib module $1 should be tested.]) +]) + +# gl_ASSERT_NO_GNULIB_POSIXCHECK +# asserts that there will never be a need to #define GNULIB_POSIXCHECK. +# and thereby enables an optimization of configure and config.h. +# Used by Emacs. +AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], +[ + dnl Override gl_WARN_ON_USE_PREPARE. + dnl But hide this definition from 'aclocal'. + AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], []) +]) + +# gl_ASSERT_NO_GNULIB_TESTS +# asserts that there will be no gnulib tests in the scope of the configure.ac +# and thereby enables an optimization of config.h. +# Used by Emacs. +AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS], +[ + dnl Override gl_MODULE_INDICATOR_FOR_TESTS. + AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) +]) + +# Test whether exists. +# Set HAVE_FEATURES_H. +AC_DEFUN([gl_FEATURES_H], +[ + AC_CHECK_HEADERS_ONCE([features.h]) + if test $ac_cv_header_features_h = yes; then + HAVE_FEATURES_H=1 + else + HAVE_FEATURES_H=0 + fi + AC_SUBST([HAVE_FEATURES_H]) +]) + +# m4_foreach_w +# is a backport of autoconf-2.59c's m4_foreach_w. +# Remove this macro when we can assume autoconf >= 2.60. +m4_ifndef([m4_foreach_w], + [m4_define([m4_foreach_w], + [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) + +# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) +# ---------------------------------------------------- +# Backport of autoconf-2.63b's macro. +# Remove this macro when we can assume autoconf >= 2.64. +m4_ifndef([AS_VAR_IF], +[m4_define([AS_VAR_IF], +[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) + +# gl_PROG_CC_C99 +# Modifies the value of the shell variable CC in an attempt to make $CC +# understand ISO C99 source code. +# This is like AC_PROG_CC_C99, except that +# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60, +# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC +# , +# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 +# . +# Remaining problems: +# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options +# to CC twice +# . +# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. +AC_DEFUN([gl_PROG_CC_C99], +[ + dnl Change that version number to the minimum Autoconf version that supports + dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls. + m4_version_prereq([9.0], + [AC_REQUIRE([AC_PROG_CC_C99])], + [AC_REQUIRE([AC_PROG_CC_STDC])]) +]) + +# gl_PROG_AR_RANLIB +# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. +# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override +# the values. +AC_DEFUN([gl_PROG_AR_RANLIB], +[ + dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler + dnl as "cc", and GCC as "gcc". They have different object file formats and + dnl library formats. In particular, the GNU binutils programs ar, ranlib + dnl produce libraries that work only with gcc, not with cc. + AC_REQUIRE([AC_PROG_CC]) + AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], + [ + AC_EGREP_CPP([Amsterdam], + [ +#ifdef __ACK__ +Amsterdam +#endif + ], + [gl_cv_c_amsterdam_compiler=yes], + [gl_cv_c_amsterdam_compiler=no]) + ]) + if test -z "$AR"; then + if test $gl_cv_c_amsterdam_compiler = yes; then + AR='cc -c.a' + if test -z "$ARFLAGS"; then + ARFLAGS='-o' + fi + else + dnl Use the Automake-documented default values for AR and ARFLAGS, + dnl but prefer ${host}-ar over ar (useful for cross-compiling). + AC_CHECK_TOOL([AR], [ar], [ar]) + if test -z "$ARFLAGS"; then + ARFLAGS='cru' + fi + fi + else + if test -z "$ARFLAGS"; then + ARFLAGS='cru' + fi + fi + AC_SUBST([AR]) + AC_SUBST([ARFLAGS]) + if test -z "$RANLIB"; then + if test $gl_cv_c_amsterdam_compiler = yes; then + RANLIB=':' + else + dnl Use the ranlib program if it is available. + AC_PROG_RANLIB + fi + fi + AC_SUBST([RANLIB]) +]) + +# AC_PROG_MKDIR_P +# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix +# for interoperability with automake-1.9.6 from autoconf-2.62. +# 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], + m4_defn([AC_PROG_MKDIR_P])[ + AC_SUBST([MKDIR_P])])], [ + dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. + AC_DEFUN_ONCE([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. +# 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 + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + }]], + [[int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t)]])], + [ac_cv_c_restrict=$ac_kw]) + test "$ac_cv_c_restrict" != no && break + done + ]) + AH_VERBATIM([restrict], +[/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict, even + though the corresponding Sun C compiler does, which causes + "#define restrict _Restrict" in the previous line. Perhaps some future + version of Sun C++ will work with _Restrict; if so, it'll probably + define __RESTRICT, just as Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +#endif]) + case $ac_cv_c_restrict in + restrict) ;; + no) AC_DEFINE([restrict], []) ;; + *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; + esac +]) +]) + +# gl_BIGENDIAN +# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. +# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some +# macros invoke AC_C_BIGENDIAN with arguments. +AC_DEFUN([gl_BIGENDIAN], +[ + AC_C_BIGENDIAN +]) + +# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) +# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not +# output a spurious "(cached)" mark in the midst of other configure output. +# This macro should be used instead of AC_CACHE_VAL when it is not surrounded +# by an AC_MSG_CHECKING/AC_MSG_RESULT pair. +AC_DEFUN([gl_CACHE_VAL_SILENT], +[ + saved_as_echo_n="$as_echo_n" + as_echo_n=':' + AC_CACHE_VAL([$1], [$2]) + as_echo_n="$saved_as_echo_n" +]) + +# AS_VAR_COPY was added in autoconf 2.63b +m4_define_default([AS_VAR_COPY], +[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) + +# AC_PROG_SED was added in autoconf 2.59b +m4_ifndef([AC_PROG_SED], +[AC_DEFUN([AC_PROG_SED], +[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED, + [dnl ac_script should not contain more than 99 commands (for HP-UX sed), + dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed. + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + AS_UNSET([ac_script]) + if test -z "$SED"; then + ac_path_SED_found=false + _AS_PATH_WALK([], [ + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + AS_EXECUTABLE_P(["$ac_path_SED"]) || continue + case `"$ac_path_SED" --version 2>&1` in + *GNU*) ac_cv_path_SED=$ac_path_SED ac_path_SED_found=:;; + *) + ac_count=0 + _AS_ECHO_N([0123456789]) >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >> conftest.nl + "$ac_path_SED" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best so far, but keep looking for better + ac_cv_path_SED=$ac_path_SED + ac_path_SED_max=$ac_count + fi + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + $ac_path_SED_found && break 3 + done + done]) + if test -z "$ac_cv_path_SED"; then + AC_ERROR([no acceptable sed could be found in \$PATH]) + fi + else + ac_cv_path_SED=$SED + fi + SED="$ac_cv_path_SED" + AC_SUBST([SED])dnl + rm -f conftest.sed +])])]) diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 new file mode 100644 index 0000000..55abf0b --- /dev/null +++ b/gl/m4/gnulib-comp.m4 @@ -0,0 +1,2702 @@ +# DO NOT EDIT! GENERATED AUTOMATICALLY! +# Copyright (C) 2002-2014 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . +# +# As a special exception to the GNU General Public License, +# this file may be distributed as part of a program that +# contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# +# This file represents the compiled summary of the specification in +# gnulib-cache.m4. It lists the computed macro invocations that need +# to be invoked from configure.ac. +# In projects that use version control, this file can be treated like +# other built files. + + +# This macro should be invoked from ./configure.ac, in the section +# "Checks for programs", right after AC_PROG_CC, and certainly before +# any checks for libraries, header files, types and library functions. +AC_DEFUN([gl_EARLY], +[ + m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace + m4_pattern_allow([^gl_ES$])dnl a valid locale name + m4_pattern_allow([^gl_LIBOBJS$])dnl a variable + m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable + AC_REQUIRE([gl_PROG_AR_RANLIB]) + AC_REQUIRE([AM_PROG_CC_C_O]) + # Code from module absolute-header: + # Code from module accept: + # Code from module accept-tests: + # Code from module alloca: + # Code from module alloca-opt: + # Code from module alloca-opt-tests: + # Code from module allocator: + # Code from module areadlink: + # Code from module areadlink-tests: + # Code from module areadlink-with-size: + # Code from module areadlink-with-size-tests: + # Code from module areadlinkat: + # Code from module areadlinkat-tests: + # Code from module argmatch: + # Code from module argmatch-tests: + # Code from module arpa_inet: + # Code from module arpa_inet-tests: + # Code from module assert: + # Code from module at-internal: + # Code from module binary-io: + # Code from module binary-io-tests: + # Code from module bind: + # Code from module bind-tests: + # Code from module bitrotate: + # Code from module bitrotate-tests: + # Code from module btowc: + # Code from module btowc-tests: + # Code from module byteswap: + # Code from module byteswap-tests: + # Code from module c-ctype: + # Code from module c-ctype-tests: + # Code from module c-strcase: + # Code from module c-strcase-tests: + # Code from module c-strcaseeq: + # Code from module c-strcasestr: + # Code from module c-strcasestr-tests: + # Code from module c-strstr: + # Code from module c-strstr-tests: + # Code from module canonicalize: + # Code from module canonicalize-tests: + # Code from module careadlinkat: + # Code from module chdir: + # Code from module chdir-long: + # Code from module chdir-tests: + # Code from module clock-time: + # Code from module cloexec: + # Code from module cloexec-tests: + # Code from module close: + # Code from module close-stream: + # Code from module close-tests: + # Code from module closedir: + # Code from module closein: + # Code from module closein-tests: + # Code from module closeout: + # Code from module configmake: + # Code from module connect: + # Code from module connect-tests: + # Code from module ctype: + # Code from module ctype-tests: + # Code from module cycle-check: + # Code from module d-ino: + # Code from module d-type: + # Code from module dev-ino: + # Code from module dirent: + # Code from module dirent-safer: + # Code from module dirent-safer-tests: + # Code from module dirent-tests: + # Code from module dirfd: + # Code from module dirname: + # Code from module dirname-lgpl: + # Code from module dirname-tests: + # Code from module dosname: + # Code from module double-slash-root: + # Code from module dup: + # Code from module dup-tests: + # Code from module dup2: + # Code from module dup2-tests: + # Code from module environ: + # Code from module environ-tests: + # Code from module errno: + # Code from module errno-tests: + # Code from module error: + # Code from module euidaccess: + # Code from module exitfail: + # Code from module extensions: + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + # Code from module extern-inline: + # Code from module faccessat: + # Code from module faccessat-tests: + # Code from module fchdir: + # Code from module fchdir-tests: + # Code from module fcntl: + # Code from module fcntl-h: + # Code from module fcntl-h-tests: + # Code from module fcntl-safer: + # Code from module fcntl-safer-tests: + # Code from module fcntl-tests: + # Code from module fd-hook: + # Code from module fd-safer-flag: + # Code from module fdl: + # Code from module fdopen: + # Code from module fdopen-tests: + # Code from module fdopendir: + # Code from module fdopendir-tests: + # Code from module fflush: + AC_REQUIRE([AC_FUNC_FSEEKO]) + # Code from module fflush-tests: + # Code from module fgetc-tests: + # Code from module file-set: + # Code from module fileblocks: + # Code from module filemode: + # Code from module filename: + # Code from module filenamecat-lgpl: + # Code from module flexmember: + # Code from module float: + # Code from module float-tests: + # Code from module fnmatch: + # Code from module fnmatch-gnu: + # Code from module fnmatch-tests: + # Code from module fopen: + # Code from module fopen-safer: + # Code from module fopen-safer-tests: + # Code from module fopen-tests: + # Code from module fpending: + # Code from module fpending-tests: + # Code from module fpieee: + AC_REQUIRE([gl_FP_IEEE]) + # Code from module fpucw: + # Code from module fpurge: + # Code from module fpurge-tests: + # Code from module fputc-tests: + # Code from module fread-tests: + # Code from module freadahead: + # Code from module freadahead-tests: + # Code from module freading: + # Code from module freading-tests: + # Code from module fseek: + # Code from module fseek-tests: + # Code from module fseeko: + AC_REQUIRE([AC_FUNC_FSEEKO]) + # Code from module fseeko-tests: + # Code from module fstat: + # Code from module fstat-tests: + # Code from module fstatat: + # Code from module fstatat-tests: + # Code from module ftell: + # Code from module ftell-tests: + # Code from module ftello: + AC_REQUIRE([AC_FUNC_FSEEKO]) + # Code from module ftello-tests: + # Code from module ftruncate: + # Code from module ftruncate-tests: + # Code from module fts: + # Code from module fwrite-tests: + # Code from module getcwd: + # Code from module getcwd-lgpl: + # Code from module getcwd-lgpl-tests: + # Code from module getcwd-tests: + # Code from module getdelim: + # Code from module getdelim-tests: + # Code from module getdtablesize: + # Code from module getdtablesize-tests: + # Code from module getgroups: + # Code from module getgroups-tests: + # Code from module gethostname: + # Code from module gethostname-tests: + # Code from module getline: + # Code from module getline-tests: + # Code from module getopt-gnu: + # Code from module getopt-posix: + # Code from module getopt-posix-tests: + # Code from module getpagesize: + # Code from module gettext: + # Code from module gettext-h: + # Code from module gettime: + # Code from module gettimeofday: + # Code from module gettimeofday-tests: + # Code from module gnumakefile: + # Code from module gpl-3.0: + # Code from module group-member: + # Code from module hash: + # Code from module hash-pjw: + # Code from module hash-tests: + # Code from module hash-triple: + # Code from module havelib: + # Code from module human: + # Code from module i-ring: + # Code from module i-ring-tests: + # Code from module idcache: + # Code from module ignore-value: + # Code from module ignore-value-tests: + # Code from module include_next: + # Code from module inet_pton: + # Code from module inet_pton-tests: + # Code from module inline: + # Code from module intprops: + # Code from module intprops-tests: + # Code from module inttostr: + # Code from module inttostr-tests: + # Code from module inttypes: + # Code from module inttypes-incomplete: + # Code from module inttypes-tests: + # Code from module ioctl: + # Code from module ioctl-tests: + # Code from module isblank: + # Code from module isblank-tests: + # Code from module isfinite: + # Code from module isfinite-tests: + # Code from module isinf: + # Code from module isinf-tests: + # Code from module isnand-nolibm: + # Code from module isnand-nolibm-tests: + # Code from module isnanf-nolibm: + # Code from module isnanf-nolibm-tests: + # Code from module isnanl-nolibm: + # Code from module isnanl-nolibm-tests: + # Code from module iswblank: + # Code from module iswblank-tests: + # Code from module langinfo: + # Code from module langinfo-tests: + # Code from module largefile: + AC_REQUIRE([AC_SYS_LARGEFILE]) + # Code from module listen: + # Code from module listen-tests: + # Code from module localcharset: + # Code from module locale: + # Code from module locale-tests: + # Code from module localeconv: + # Code from module localeconv-tests: + # Code from module localename: + # Code from module localename-tests: + # Code from module lock: + # Code from module lock-tests: + # Code from module lseek: + # Code from module lseek-tests: + # Code from module lstat: + # Code from module lstat-tests: + # Code from module maintainer-makefile: + # Code from module malloc: + # Code from module malloc-gnu: + # Code from module malloc-gnu-tests: + # Code from module malloc-posix: + # Code from module malloca: + # Code from module malloca-tests: + # Code from module manywarnings: + # Code from module math: + # Code from module math-tests: + # Code from module mbchar: + # Code from module mbrtowc: + # Code from module mbrtowc-tests: + # Code from module mbscasestr: + # Code from module mbscasestr-tests: + # Code from module mbsinit: + # Code from module mbsinit-tests: + # Code from module mbslen: + # Code from module mbsrtowcs: + # Code from module mbsrtowcs-tests: + # Code from module mbsstr: + # Code from module mbsstr-tests: + # Code from module mbtowc: + # Code from module mbuiter: + # Code from module memchr: + # Code from module memchr-tests: + # Code from module mempcpy: + # Code from module memrchr: + # Code from module memrchr-tests: + # Code from module mktime: + # Code from module modechange: + # Code from module modf: + # Code from module modf-tests: + # Code from module mountlist: + # Code from module msvc-inval: + # Code from module msvc-nothrow: + # Code from module multiarch: + # Code from module nanosleep: + # Code from module nanosleep-tests: + # Code from module netinet_in: + # Code from module netinet_in-tests: + # Code from module nl_langinfo: + # Code from module nl_langinfo-tests: + # Code from module nocrash: + # Code from module open: + # Code from module open-tests: + # Code from module openat: + # Code from module openat-die: + # Code from module openat-h: + # Code from module openat-safer: + # Code from module openat-safer-tests: + # Code from module openat-tests: + # Code from module opendir: + # Code from module parse-datetime: + # Code from module parse-datetime-tests: + # Code from module pathmax: + # Code from module pathmax-tests: + # Code from module perror: + # Code from module perror-tests: + # Code from module pipe-posix: + # Code from module pipe-posix-tests: + # Code from module priv-set: + # Code from module priv-set-tests: + # Code from module progname: + # Code from module putenv: + # Code from module quote: + # Code from module quotearg: + # Code from module quotearg-simple: + # Code from module quotearg-simple-tests: + # Code from module raise: + # Code from module raise-tests: + # Code from module read: + # Code from module read-tests: + # Code from module readdir: + # Code from module readlink: + # Code from module readlink-tests: + # Code from module readlinkat: + # Code from module readlinkat-tests: + # Code from module realloc: + # Code from module realloc-gnu: + # Code from module realloc-gnu-tests: + # Code from module realloc-posix: + # Code from module regex: + # Code from module regex-tests: + # Code from module rewinddir: + # Code from module rmdir: + # Code from module rmdir-tests: + # Code from module root-uid: + # Code from module rpmatch: + # Code from module safe-read: + # Code from module same: + # Code from module same-inode: + # Code from module save-cwd: + # Code from module savedir: + # Code from module select: + # Code from module select-tests: + # Code from module selinux-at: + # Code from module selinux-h: + # Code from module setenv: + # Code from module setenv-tests: + # Code from module setlocale: + # Code from module setlocale-tests: + # Code from module setsockopt: + # Code from module setsockopt-tests: + # Code from module sigaction: + # Code from module sigaction-tests: + # Code from module signal-h: + # Code from module signal-h-tests: + # Code from module sigprocmask: + # Code from module sigprocmask-tests: + # Code from module size_max: + # Code from module sleep: + # Code from module sleep-tests: + # Code from module snippet/_Noreturn: + # Code from module snippet/arg-nonnull: + # Code from module snippet/c++defs: + # Code from module snippet/unused-parameter: + # Code from module snippet/warn-on-use: + # Code from module snprintf: + # Code from module snprintf-tests: + # Code from module socket: + # Code from module socketlib: + # Code from module sockets: + # Code from module sockets-tests: + # Code from module socklen: + # Code from module ssize_t: + # Code from module stat: + # Code from module stat-macros: + # Code from module stat-size: + # Code from module stat-tests: + # Code from module stat-time: + # Code from module stat-time-tests: + # Code from module statat: + # Code from module statat-tests: + # Code from module stdalign: + # Code from module stdalign-tests: + # Code from module stdarg: + dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode + dnl for the builtin va_copy to work. With Autoconf 2.60 or later, + dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99 + dnl shouldn't hurt, though installers are on their own to set c99 mode. + gl_PROG_CC_C99 + # Code from module stdbool: + # Code from module stdbool-tests: + # Code from module stddef: + # Code from module stddef-tests: + # Code from module stdint: + # Code from module stdint-tests: + # Code from module stdio: + # Code from module stdio-tests: + # Code from module stdlib: + # Code from module stdlib-tests: + # Code from module stpcpy: + # Code from module strcase: + # Code from module strcasestr: + # Code from module strcasestr-simple: + # Code from module strcasestr-tests: + # Code from module strdup-posix: + # Code from module streq: + # Code from module strerror: + # Code from module strerror-override: + # Code from module strerror-tests: + # Code from module strerror_r-posix: + # Code from module strerror_r-posix-tests: + # Code from module strftime: + # Code from module strftime-tests: + # Code from module string: + # Code from module string-tests: + # Code from module strings: + # Code from module strings-tests: + # Code from module strndup: + # Code from module strnlen: + # Code from module strnlen-tests: + # Code from module strnlen1: + # Code from module strstr: + # Code from module strstr-simple: + # Code from module strstr-tests: + # Code from module strtol: + # Code from module strtol-tests: + # Code from module strtoul: + # Code from module strtoul-tests: + # Code from module strtoull: + # Code from module strtoull-tests: + # Code from module strtoumax: + # Code from module strtoumax-tests: + # Code from module symlink: + # Code from module symlink-tests: + # Code from module symlinkat: + # Code from module symlinkat-tests: + # Code from module sys_ioctl: + # Code from module sys_ioctl-tests: + # Code from module sys_select: + # Code from module sys_select-tests: + # Code from module sys_socket: + # Code from module sys_socket-tests: + # Code from module sys_stat: + # Code from module sys_stat-tests: + # Code from module sys_time: + # Code from module sys_time-tests: + # Code from module sys_types: + # Code from module sys_types-tests: + # Code from module sys_uio: + # Code from module sys_uio-tests: + # Code from module sys_utsname: + # Code from module sys_utsname-tests: + # Code from module sys_wait: + # Code from module sys_wait-tests: + # Code from module test-framework-sh: + # Code from module test-framework-sh-tests: + # Code from module thread: + # Code from module thread-tests: + # Code from module threadlib: + gl_THREADLIB_EARLY + # Code from module time: + # Code from module time-tests: + # Code from module time_r: + # Code from module timespec: + # Code from module trunc: + # Code from module trunc-tests: + # Code from module uname: + # Code from module uname-tests: + # Code from module unistd: + # Code from module unistd-safer: + # Code from module unistd-safer-tests: + # Code from module unistd-tests: + # Code from module unitypes: + # Code from module uniwidth/base: + # Code from module uniwidth/width: + # Code from module uniwidth/width-tests: + # Code from module unlink: + # Code from module unlink-tests: + # Code from module unlinkat: + # Code from module unlinkat-tests: + # Code from module unlinkdir: + # Code from module unsetenv: + # Code from module unsetenv-tests: + # Code from module update-copyright: + # Code from module update-copyright-tests: + # Code from module useless-if-before-free: + # Code from module vasnprintf: + # Code from module vasnprintf-tests: + # Code from module vc-list-files: + # Code from module vc-list-files-tests: + # Code from module verify: + # Code from module verify-tests: + # Code from module version-etc: + # Code from module version-etc-fsf: + # Code from module version-etc-tests: + # Code from module warnings: + # Code from module wchar: + # Code from module wchar-tests: + # Code from module wcrtomb: + # Code from module wcrtomb-tests: + # Code from module wctob: + # Code from module wctomb: + # Code from module wctype-h: + # Code from module wctype-h-tests: + # Code from module wcwidth: + # Code from module wcwidth-tests: + # Code from module xalloc: + # Code from module xalloc-die: + # Code from module xalloc-die-tests: + # Code from module xalloc-oversized: + # Code from module xgetcwd: + # Code from module xsize: + # Code from module xstrndup: + # Code from module xstrtod: + # Code from module xstrtol: + # Code from module xstrtol-tests: + # Code from module xstrtoumax: + # Code from module xstrtoumax-tests: + # Code from module yesno: + # Code from module yesno-tests: + # Code from module yield: +]) + +# This macro should be invoked from ./configure.ac, in the section +# "Check for header files, types and library functions". +AC_DEFUN([gl_INIT], +[ + AM_CONDITIONAL([GL_COND_LIBTOOL], [false]) + gl_cond_libtool=false + gl_libdeps= + gl_ltlibdeps= + gl_m4_base='gl/m4' + m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) + m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) + m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) + m4_pushdef([gl_LIBSOURCES_LIST], []) + m4_pushdef([gl_LIBSOURCES_DIR], []) + gl_COMMON + gl_source_base='gl/lib' + gl_FUNC_ALLOCA + gl_MODULE_INDICATOR([areadlinkat]) + gl_ASSERT + AC_LIBOBJ([openat-proc]) + gl_FUNC_BTOWC + if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then + AC_LIBOBJ([btowc]) + gl_PREREQ_BTOWC + fi + gl_WCHAR_MODULE_INDICATOR([btowc]) + gl_BYTESWAP + gl_FUNC_CANONICALIZE_FILENAME_MODE + gl_MODULE_INDICATOR([canonicalize]) + gl_MODULE_INDICATOR_FOR_TESTS([canonicalize]) + gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name]) + AC_CHECK_FUNCS_ONCE([readlinkat]) + gl_UNISTD_MODULE_INDICATOR([chdir]) + gl_FUNC_CHDIR_LONG + if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then + AC_LIBOBJ([chdir-long]) + gl_PREREQ_CHDIR_LONG + fi + gl_CLOCK_TIME + gl_MODULE_INDICATOR_FOR_TESTS([cloexec]) + gl_FUNC_CLOSE + if test $REPLACE_CLOSE = 1; then + AC_LIBOBJ([close]) + fi + gl_UNISTD_MODULE_INDICATOR([close]) + gl_CLOSE_STREAM + gl_MODULE_INDICATOR([close-stream]) + gl_FUNC_CLOSEDIR + if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then + AC_LIBOBJ([closedir]) + fi + gl_DIRENT_MODULE_INDICATOR([closedir]) + gl_CLOSEIN + gl_CLOSEOUT + gl_CONFIGMAKE_PREP + gl_CTYPE_H + gl_CYCLE_CHECK + gl_CHECK_TYPE_STRUCT_DIRENT_D_INO + gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE + gl_DIRENT_H + gl_DIRENT_SAFER + gl_MODULE_INDICATOR([dirent-safer]) + gl_FUNC_DIRFD + if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then + AC_LIBOBJ([dirfd]) + gl_PREREQ_DIRFD + fi + gl_DIRENT_MODULE_INDICATOR([dirfd]) + gl_DIRNAME + gl_MODULE_INDICATOR([dirname]) + gl_DIRNAME_LGPL + gl_DOUBLE_SLASH_ROOT + gl_FUNC_DUP + if test $REPLACE_DUP = 1; then + AC_LIBOBJ([dup]) + gl_PREREQ_DUP + fi + gl_UNISTD_MODULE_INDICATOR([dup]) + 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_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_FUNC_EUIDACCESS + if test $HAVE_EUIDACCESS = 0; then + AC_LIBOBJ([euidaccess]) + gl_PREREQ_EUIDACCESS + fi + gl_UNISTD_MODULE_INDICATOR([euidaccess]) + AC_REQUIRE([gl_EXTERN_INLINE]) + gl_FUNC_FACCESSAT + if test $HAVE_FACCESSAT = 0; then + AC_LIBOBJ([faccessat]) + gl_PREREQ_FACCESSAT + fi + gl_MODULE_INDICATOR([faccessat]) + gl_UNISTD_MODULE_INDICATOR([faccessat]) + gl_FUNC_FCHDIR + gl_UNISTD_MODULE_INDICATOR([fchdir]) + gl_FUNC_FCNTL + if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then + AC_LIBOBJ([fcntl]) + fi + gl_FCNTL_MODULE_INDICATOR([fcntl]) + gl_FCNTL_H + gl_FCNTL_SAFER + gl_MODULE_INDICATOR([fcntl-safer]) + gl_FUNC_FDOPENDIR + if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then + AC_LIBOBJ([fdopendir]) + fi + gl_DIRENT_MODULE_INDICATOR([fdopendir]) + gl_MODULE_INDICATOR([fdopendir]) + gl_FUNC_FFLUSH + if test $REPLACE_FFLUSH = 1; then + AC_LIBOBJ([fflush]) + gl_PREREQ_FFLUSH + fi + gl_MODULE_INDICATOR([fflush]) + gl_STDIO_MODULE_INDICATOR([fflush]) + gl_FILEBLOCKS + if test $ac_cv_member_struct_stat_st_blocks = no; then + AC_LIBOBJ([fileblocks]) + gl_PREREQ_FILEBLOCKS + fi + gl_FILEMODE + gl_FILE_NAME_CONCAT_LGPL + AC_C_FLEXIBLE_ARRAY_MEMBER + 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_FNMATCH_POSIX + if test -n "$FNMATCH_H"; then + AC_LIBOBJ([fnmatch]) + gl_PREREQ_FNMATCH + fi + gl_FUNC_FNMATCH_GNU + if test -n "$FNMATCH_H"; then + AC_LIBOBJ([fnmatch]) + gl_PREREQ_FNMATCH + fi + gl_FUNC_FOPEN + if test $REPLACE_FOPEN = 1; then + AC_LIBOBJ([fopen]) + gl_PREREQ_FOPEN + fi + gl_STDIO_MODULE_INDICATOR([fopen]) + gl_MODULE_INDICATOR([fopen-safer]) + gl_FUNC_FPENDING + if test $gl_cv_func___fpending = no; then + AC_LIBOBJ([fpending]) + gl_PREREQ_FPENDING + fi + gl_FUNC_FPURGE + if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then + AC_LIBOBJ([fpurge]) + fi + gl_STDIO_MODULE_INDICATOR([fpurge]) + gl_FUNC_FREADAHEAD + if test $ac_cv_func___freadahead = no; then + AC_LIBOBJ([freadahead]) + fi + gl_FUNC_FREADING + 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_FSTATAT + if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then + AC_LIBOBJ([fstatat]) + fi + gl_SYS_STAT_MODULE_INDICATOR([fstatat]) + 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_FTS + dnl Use this version of fts unconditionally, since the GNU libc and + dnl NetBSD versions have bugs and/or unnecessary limitations. + AC_LIBOBJ([fts]) + gl_FUNC_GETCWD + if test $REPLACE_GETCWD = 1; then + AC_LIBOBJ([getcwd]) + gl_PREREQ_GETCWD + fi + gl_MODULE_INDICATOR([getcwd]) + gl_UNISTD_MODULE_INDICATOR([getcwd]) + gl_FUNC_GETCWD_LGPL + if test $REPLACE_GETCWD = 1; then + AC_LIBOBJ([getcwd-lgpl]) + fi + gl_UNISTD_MODULE_INDICATOR([getcwd]) + 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_GETDTABLESIZE + if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then + AC_LIBOBJ([getdtablesize]) + gl_PREREQ_GETDTABLESIZE + fi + gl_UNISTD_MODULE_INDICATOR([getdtablesize]) + gl_FUNC_GETGROUPS + if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then + AC_LIBOBJ([getgroups]) + fi + gl_UNISTD_MODULE_INDICATOR([getgroups]) + gl_FUNC_GETHOSTNAME + if test $HAVE_GETHOSTNAME = 0; then + AC_LIBOBJ([gethostname]) + gl_PREREQ_GETHOSTNAME + fi + gl_UNISTD_MODULE_INDICATOR([gethostname]) + 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]) + 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_FUNC_GROUP_MEMBER + if test $HAVE_GROUP_MEMBER = 0; then + AC_LIBOBJ([group-member]) + gl_PREREQ_GROUP_MEMBER + fi + gl_UNISTD_MODULE_INDICATOR([group-member]) + gl_HUMAN + gl_I_RING + gl_IDCACHE + gl_INLINE + gl_INTTYPES_H + gl_INTTYPES_INCOMPLETE + gl_FUNC_ISBLANK + if test $HAVE_ISBLANK = 0; then + AC_LIBOBJ([isblank]) + fi + gl_CTYPE_MODULE_INDICATOR([isblank]) + gl_ISFINITE + if test $REPLACE_ISFINITE = 1; then + AC_LIBOBJ([isfinite]) + fi + gl_MATH_MODULE_INDICATOR([isfinite]) + gl_ISINF + if test $REPLACE_ISINF = 1; then + AC_LIBOBJ([isinf]) + fi + gl_MATH_MODULE_INDICATOR([isinf]) + 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 + gl_FUNC_ISWBLANK + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then + : + else + if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then + AC_LIBOBJ([iswblank]) + fi + fi + gl_WCTYPE_MODULE_INDICATOR([iswblank]) + gl_LANGINFO_H + AC_REQUIRE([gl_LARGEFILE]) + gl_LOCALCHARSET + LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" + AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) + gl_LOCALE_H + gl_FUNC_LOCALECONV + if test $REPLACE_LOCALECONV = 1; then + AC_LIBOBJ([localeconv]) + gl_PREREQ_LOCALECONV + fi + gl_LOCALE_MODULE_INDICATOR([localeconv]) + gl_LOCK + gl_MODULE_INDICATOR([lock]) + gl_FUNC_LSEEK + if test $REPLACE_LSEEK = 1; then + AC_LIBOBJ([lseek]) + fi + gl_UNISTD_MODULE_INDICATOR([lseek]) + gl_FUNC_LSTAT + if test $REPLACE_LSTAT = 1; then + AC_LIBOBJ([lstat]) + gl_PREREQ_LSTAT + fi + gl_SYS_STAT_MODULE_INDICATOR([lstat]) + AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER], + [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])]) + AC_REQUIRE([AC_PROG_SED]) + 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_MALLOCA + gl_MATH_H + gl_MBCHAR + gl_FUNC_MBRTOWC + if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then + AC_LIBOBJ([mbrtowc]) + gl_PREREQ_MBRTOWC + fi + gl_WCHAR_MODULE_INDICATOR([mbrtowc]) + gl_STRING_MODULE_INDICATOR([mbscasestr]) + gl_FUNC_MBSINIT + if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then + AC_LIBOBJ([mbsinit]) + gl_PREREQ_MBSINIT + fi + gl_WCHAR_MODULE_INDICATOR([mbsinit]) + gl_FUNC_MBSLEN + gl_STRING_MODULE_INDICATOR([mbslen]) + gl_FUNC_MBSRTOWCS + if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then + AC_LIBOBJ([mbsrtowcs]) + AC_LIBOBJ([mbsrtowcs-state]) + gl_PREREQ_MBSRTOWCS + fi + gl_WCHAR_MODULE_INDICATOR([mbsrtowcs]) + gl_STRING_MODULE_INDICATOR([mbsstr]) + gl_FUNC_MBTOWC + if test $REPLACE_MBTOWC = 1; then + AC_LIBOBJ([mbtowc]) + gl_PREREQ_MBTOWC + fi + gl_STDLIB_MODULE_INDICATOR([mbtowc]) + gl_MBITER + 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_MEMPCPY + if test $HAVE_MEMPCPY = 0; then + AC_LIBOBJ([mempcpy]) + gl_PREREQ_MEMPCPY + fi + gl_STRING_MODULE_INDICATOR([mempcpy]) + gl_FUNC_MEMRCHR + if test $ac_cv_func_memrchr = no; then + AC_LIBOBJ([memrchr]) + gl_PREREQ_MEMRCHR + fi + gl_STRING_MODULE_INDICATOR([memrchr]) + gl_FUNC_MKTIME + if test $REPLACE_MKTIME = 1; then + AC_LIBOBJ([mktime]) + gl_PREREQ_MKTIME + fi + gl_TIME_MODULE_INDICATOR([mktime]) + gl_MODECHANGE + gl_FUNC_MODF + if test $REPLACE_MODF = 1; then + AC_LIBOBJ([modf]) + fi + gl_MATH_MODULE_INDICATOR([modf]) + gl_MOUNTLIST + if test $gl_cv_list_mounted_fs = yes; then + AC_LIBOBJ([mountlist]) + gl_PREREQ_MOUNTLIST_EXTRA + fi + 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_FUNC_NL_LANGINFO + if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then + AC_LIBOBJ([nl_langinfo]) + fi + gl_LANGINFO_MODULE_INDICATOR([nl_langinfo]) + gl_FUNC_OPEN + if test $REPLACE_OPEN = 1; then + AC_LIBOBJ([open]) + gl_PREREQ_OPEN + fi + gl_FCNTL_MODULE_INDICATOR([open]) + gl_FUNC_OPENAT + if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then + AC_LIBOBJ([openat]) + gl_PREREQ_OPENAT + fi + gl_MODULE_INDICATOR([openat]) dnl for lib/getcwd.c + gl_FCNTL_MODULE_INDICATOR([openat]) + gl_OPENAT_SAFER + gl_MODULE_INDICATOR([openat-safer]) + gl_FUNC_OPENDIR + if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then + AC_LIBOBJ([opendir]) + fi + gl_DIRENT_MODULE_INDICATOR([opendir]) + gl_PARSE_DATETIME + gl_PATHMAX + gl_FUNC_PERROR + if test $REPLACE_PERROR = 1; then + AC_LIBOBJ([perror]) + fi + gl_STRING_MODULE_INDICATOR([perror]) + AC_CHECK_DECLS([program_invocation_name], [], [], [#include ]) + AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include ]) + gl_QUOTE + gl_QUOTEARG + gl_FUNC_READ + if test $REPLACE_READ = 1; then + AC_LIBOBJ([read]) + gl_PREREQ_READ + fi + gl_UNISTD_MODULE_INDICATOR([read]) + gl_FUNC_READDIR + if test $HAVE_READDIR = 0; then + AC_LIBOBJ([readdir]) + fi + gl_DIRENT_MODULE_INDICATOR([readdir]) + gl_FUNC_READLINK + if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then + AC_LIBOBJ([readlink]) + gl_PREREQ_READLINK + fi + gl_UNISTD_MODULE_INDICATOR([readlink]) + gl_FUNC_READLINKAT + if test $HAVE_READLINKAT = 0; then + AC_LIBOBJ([readlinkat]) + fi + gl_UNISTD_MODULE_INDICATOR([readlinkat]) + gl_FUNC_REALLOC_GNU + if test $REPLACE_REALLOC = 1; then + AC_LIBOBJ([realloc]) + fi + gl_MODULE_INDICATOR([realloc-gnu]) + gl_FUNC_REALLOC_POSIX + if test $REPLACE_REALLOC = 1; then + AC_LIBOBJ([realloc]) + fi + gl_STDLIB_MODULE_INDICATOR([realloc-posix]) + gl_REGEX + if test $ac_use_included_regex = yes; then + AC_LIBOBJ([regex]) + gl_PREREQ_REGEX + fi + gl_FUNC_REWINDDIR + if test $HAVE_REWINDDIR = 0; then + AC_LIBOBJ([rewinddir]) + fi + gl_DIRENT_MODULE_INDICATOR([rewinddir]) + gl_FUNC_RMDIR + if test $REPLACE_RMDIR = 1; then + AC_LIBOBJ([rmdir]) + fi + gl_UNISTD_MODULE_INDICATOR([rmdir]) + gl_FUNC_RPMATCH + if test $HAVE_RPMATCH = 0; then + AC_LIBOBJ([rpmatch]) + gl_PREREQ_RPMATCH + fi + gl_STDLIB_MODULE_INDICATOR([rpmatch]) + gl_PREREQ_SAFE_READ + gl_SAME + gl_SAVE_CWD + gl_SAVEDIR + AC_CHECK_HEADERS([selinux/flask.h]) + AC_LIBOBJ([selinux-at]) + gl_HEADERS_SELINUX_SELINUX_H + gl_HEADERS_SELINUX_CONTEXT_H + if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then + AC_LIBOBJ([getfilecon]) + fi + gl_FUNC_SETENV + if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then + AC_LIBOBJ([setenv]) + fi + gl_STDLIB_MODULE_INDICATOR([setenv]) + gl_SIZE_MAX + gl_FUNC_SNPRINTF + gl_STDIO_MODULE_INDICATOR([snprintf]) + gl_MODULE_INDICATOR([snprintf]) + gl_SOCKETLIB + gl_SOCKETS + gl_TYPE_SOCKLEN_T + gt_TYPE_SSIZE_T + gl_FUNC_STAT + if test $REPLACE_STAT = 1; then + AC_LIBOBJ([stat]) + gl_PREREQ_STAT + fi + gl_SYS_STAT_MODULE_INDICATOR([stat]) + gl_STAT_SIZE + gl_STAT_TIME + gl_STAT_BIRTHTIME + gl_MODULE_INDICATOR([statat]) dnl for lib/openat.h + gl_STDALIGN_H + gl_STDARG_H + AM_STDBOOL_H + gl_STDDEF_H + gl_STDINT_H + gl_STDIO_H + gl_STDLIB_H + gl_FUNC_STPCPY + if test $HAVE_STPCPY = 0; then + AC_LIBOBJ([stpcpy]) + gl_PREREQ_STPCPY + fi + gl_STRING_MODULE_INDICATOR([stpcpy]) + 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_STRCASESTR + if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then + AC_LIBOBJ([strcasestr]) + gl_PREREQ_STRCASESTR + fi + gl_FUNC_STRCASESTR_SIMPLE + if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then + AC_LIBOBJ([strcasestr]) + gl_PREREQ_STRCASESTR + fi + gl_STRING_MODULE_INDICATOR([strcasestr]) + 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_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]) + gl_FUNC_GNU_STRFTIME + 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_STRSTR + if test $REPLACE_STRSTR = 1; then + AC_LIBOBJ([strstr]) + fi + gl_FUNC_STRSTR_SIMPLE + if test $REPLACE_STRSTR = 1; then + AC_LIBOBJ([strstr]) + fi + gl_STRING_MODULE_INDICATOR([strstr]) + gl_FUNC_STRTOL + if test $ac_cv_func_strtol = no; then + AC_LIBOBJ([strtol]) + fi + gl_FUNC_STRTOUL + if test $ac_cv_func_strtoul = no; then + AC_LIBOBJ([strtoul]) + fi + gl_FUNC_STRTOULL + if test $HAVE_STRTOULL = 0; then + AC_LIBOBJ([strtoull]) + gl_PREREQ_STRTOULL + fi + gl_STDLIB_MODULE_INDICATOR([strtoull]) + gl_FUNC_STRTOUMAX + if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then + AC_LIBOBJ([strtoumax]) + gl_PREREQ_STRTOUMAX + fi + gl_INTTYPES_MODULE_INDICATOR([strtoumax]) + 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_SYS_UTSNAME_H + AC_PROG_MKDIR_P + gl_SYS_WAIT_H + AC_PROG_MKDIR_P + 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_TIMESPEC + gl_FUNC_TRUNC + if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then + AC_LIBOBJ([trunc]) + fi + gl_MATH_MODULE_INDICATOR([trunc]) + gl_FUNC_UNAME + if test $HAVE_UNAME = 0; then + AC_LIBOBJ([uname]) + gl_PREREQ_UNAME + fi + gl_SYS_UTSNAME_MODULE_INDICATOR([uname]) + gl_UNISTD_H + gl_UNISTD_SAFER + gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h]) + gl_LIBUNISTRING_LIBHEADER([0.9], [uniwidth.h]) + gl_LIBUNISTRING_MODULE([0.9.4], [uniwidth/width]) + gl_FUNC_UNLINK + if test $REPLACE_UNLINK = 1; then + AC_LIBOBJ([unlink]) + fi + gl_UNISTD_MODULE_INDICATOR([unlink]) + gl_FUNC_UNLINKAT + if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then + AC_LIBOBJ([unlinkat]) + fi + gl_UNISTD_MODULE_INDICATOR([unlinkat]) + 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_FUNC_VASNPRINTF + gl_VERSION_ETC + gl_WCHAR_H + gl_FUNC_WCRTOMB + if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then + AC_LIBOBJ([wcrtomb]) + gl_PREREQ_WCRTOMB + fi + gl_WCHAR_MODULE_INDICATOR([wcrtomb]) + gl_WCTYPE_H + gl_FUNC_WCWIDTH + if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then + AC_LIBOBJ([wcwidth]) + fi + gl_WCHAR_MODULE_INDICATOR([wcwidth]) + gl_XALLOC + gl_XGETCWD + gl_XSIZE + gl_XSTRNDUP + gl_XSTRTOD + gl_XSTRTOL + gl_YESNO + # End of code from modules + m4_ifval(gl_LIBSOURCES_LIST, [ + m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || + for gl_file in ]gl_LIBSOURCES_LIST[ ; do + if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then + echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 + exit 1 + fi + done])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gl_LIBSOURCES_DIR]) + m4_popdef([gl_LIBSOURCES_LIST]) + m4_popdef([AC_LIBSOURCES]) + m4_popdef([AC_REPLACE_FUNCS]) + m4_popdef([AC_LIBOBJ]) + AC_CONFIG_COMMANDS_PRE([ + gl_libobjs= + gl_ltlibobjs= + if test -n "$gl_LIBOBJS"; then + # Remove the extension. + sed_drop_objext='s/\.o$//;s/\.obj$//' + for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do + gl_libobjs="$gl_libobjs $i.$ac_objext" + gl_ltlibobjs="$gl_ltlibobjs $i.lo" + done + fi + AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) + AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) + ]) + gltests_libdeps= + gltests_ltlibdeps= + m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) + m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) + m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) + m4_pushdef([gltests_LIBSOURCES_LIST], []) + m4_pushdef([gltests_LIBSOURCES_DIR], []) + gl_COMMON + gl_source_base='tests' +changequote(,)dnl + gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS +changequote([, ])dnl + AC_SUBST([gltests_WITNESS]) + gl_module_indicator_condition=$gltests_WITNESS + m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) + 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]) + gl_HEADER_ARPA_INET + AC_PROG_MKDIR_P + 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]) + gt_LOCALE_FR + gt_LOCALE_FR_UTF8 + gt_LOCALE_FR + gt_LOCALE_TR_UTF8 + 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_MODULE_INDICATOR([fd-safer-flag]) + 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_GETPAGESIZE + if test $REPLACE_GETPAGESIZE = 1; then + AC_LIBOBJ([getpagesize]) + fi + gl_UNISTD_MODULE_INDICATOR([getpagesize]) + 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]) + AC_C_BIGENDIAN + gl_INTTOSTR + gl_FUNC_IOCTL + if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then + AC_LIBOBJ([ioctl]) + fi + gl_SYS_IOCTL_MODULE_INDICATOR([ioctl]) + gl_FLOAT_EXPONENT_LOCATION + gl_DOUBLE_EXPONENT_LOCATION + gl_LONG_DOUBLE_EXPONENT_LOCATION + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + gl_FLOAT_EXPONENT_LOCATION + gl_DOUBLE_EXPONENT_LOCATION + gl_LONG_DOUBLE_EXPONENT_LOCATION + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + gl_DOUBLE_EXPONENT_LOCATION + gl_FLOAT_EXPONENT_LOCATION + gl_LONG_DOUBLE_EXPONENT_LOCATION + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + 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]) + AC_CHECK_FUNCS_ONCE([newlocale]) + gl_LOCALENAME + AC_CHECK_FUNCS_ONCE([newlocale]) + gt_LOCALE_FR + gt_LOCALE_FR_UTF8 + gt_LOCALE_JA + gt_LOCALE_ZH_CN + gt_LOCALE_FR_UTF8 + gt_LOCALE_TR_UTF8 + gt_LOCALE_ZH_CN + gt_LOCALE_FR_UTF8 + gt_LOCALE_FR + gt_LOCALE_FR_UTF8 + gt_LOCALE_JA + gt_LOCALE_ZH_CN + gt_LOCALE_FR_UTF8 + gt_LOCALE_ZH_CN + 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_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_NANOSLEEP + if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then + AC_LIBOBJ([nanosleep]) + gl_PREREQ_NANOSLEEP + fi + gl_TIME_MODULE_INDICATOR([nanosleep]) + AC_CHECK_DECLS_ONCE([alarm]) + gl_HEADER_NETINET_IN + AC_PROG_MKDIR_P + gt_LOCALE_FR + gt_LOCALE_FR_UTF8 + gl_FUNC_PIPE + if test $HAVE_PIPE = 0; then + AC_LIBOBJ([pipe]) + fi + gl_UNISTD_MODULE_INDICATOR([pipe]) + gl_PRIV_SET + 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. + dnl FIXME: zerosize-ptr.h requires these: make a module for it + gl_FUNC_MMAP_ANON + AC_CHECK_HEADERS_ONCE([sys/mman.h]) + AC_CHECK_FUNCS_ONCE([mprotect]) + gl_FUNC_RAISE + if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then + AC_LIBOBJ([raise]) + gl_PREREQ_RAISE + fi + gl_SIGNAL_MODULE_INDICATOR([raise]) + gl_FUNC_SELECT + if test $REPLACE_SELECT = 1; then + AC_LIBOBJ([select]) + fi + gl_SYS_SELECT_MODULE_INDICATOR([select]) + AC_CHECK_HEADERS_ONCE([sys/wait.h]) + gl_FUNC_SETLOCALE + if test $REPLACE_SETLOCALE = 1; then + AC_LIBOBJ([setlocale]) + gl_PREREQ_SETLOCALE + fi + gl_LOCALE_MODULE_INDICATOR([setlocale]) + gt_LOCALE_FR + gt_LOCALE_FR_UTF8 + gt_LOCALE_JA + gt_LOCALE_ZH_CN + 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]) + gl_SIGACTION + if test $HAVE_SIGACTION = 0; then + AC_LIBOBJ([sigaction]) + gl_PREREQ_SIGACTION + fi + gl_SIGNAL_MODULE_INDICATOR([sigaction]) + gl_SIGNAL_H + gl_SIGNALBLOCKING + if test $HAVE_POSIX_SIGNALBLOCKING = 0; then + AC_LIBOBJ([sigprocmask]) + gl_PREREQ_SIGPROCMASK + fi + gl_SIGNAL_MODULE_INDICATOR([sigprocmask]) + gl_FUNC_SLEEP + if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then + AC_LIBOBJ([sleep]) + fi + gl_UNISTD_MODULE_INDICATOR([sleep]) + AC_CHECK_DECLS_ONCE([alarm]) + 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]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WINT_T]) + AC_CHECK_DECLS_ONCE([alarm]) + 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_DECLS_ONCE([alarm]) + 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_FUNC_SYMLINKAT + if test $HAVE_SYMLINKAT = 0; then + AC_LIBOBJ([symlinkat]) + fi + gl_UNISTD_MODULE_INDICATOR([symlinkat]) + gl_SYS_IOCTL_H + AC_PROG_MKDIR_P + gl_HEADER_SYS_SELECT + AC_PROG_MKDIR_P + AC_CHECK_FUNCS_ONCE([shutdown]) + gl_THREAD + gl_UNLINKDIR + abs_aux_dir=`cd "$ac_aux_dir"; pwd` + AC_SUBST([abs_aux_dir]) + abs_aux_dir=`cd "$ac_aux_dir"; pwd` + AC_SUBST([abs_aux_dir]) + gt_LOCALE_FR + gt_LOCALE_FR_UTF8 + gt_LOCALE_JA + gt_LOCALE_ZH_CN + gl_FUNC_WCTOB + if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then + AC_LIBOBJ([wctob]) + gl_PREREQ_WCTOB + fi + gl_WCHAR_MODULE_INDICATOR([wctob]) + gl_FUNC_WCTOMB + if test $REPLACE_WCTOMB = 1; then + AC_LIBOBJ([wctomb]) + gl_PREREQ_WCTOMB + fi + gl_STDLIB_MODULE_INDICATOR([wctomb]) + gl_YIELD + m4_popdef([gl_MODULE_INDICATOR_CONDITION]) + m4_ifval(gltests_LIBSOURCES_LIST, [ + m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || + for gl_file in ]gltests_LIBSOURCES_LIST[ ; do + if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then + echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 + exit 1 + fi + done])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gltests_LIBSOURCES_DIR]) + m4_popdef([gltests_LIBSOURCES_LIST]) + m4_popdef([AC_LIBSOURCES]) + m4_popdef([AC_REPLACE_FUNCS]) + m4_popdef([AC_LIBOBJ]) + AC_CONFIG_COMMANDS_PRE([ + gltests_libobjs= + gltests_ltlibobjs= + if test -n "$gltests_LIBOBJS"; then + # Remove the extension. + sed_drop_objext='s/\.o$//;s/\.obj$//' + for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do + gltests_libobjs="$gltests_libobjs $i.$ac_objext" + gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" + done + fi + AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) + AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) + ]) + LIBGNULIB_LIBDEPS="$gl_libdeps" + AC_SUBST([LIBGNULIB_LIBDEPS]) + LIBGNULIB_LTLIBDEPS="$gl_ltlibdeps" + AC_SUBST([LIBGNULIB_LTLIBDEPS]) + LIBTESTS_LIBDEPS="$gltests_libdeps" + AC_SUBST([LIBTESTS_LIBDEPS]) +]) + +# Like AC_LIBOBJ, except that the module name goes +# into gl_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gl_LIBOBJ], [ + AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl + gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" +]) + +# Like AC_REPLACE_FUNCS, except that the module name goes +# into gl_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gl_REPLACE_FUNCS], [ + m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl + AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) +]) + +# Like AC_LIBSOURCES, except the directory where the source file is +# expected is derived from the gnulib-tool parameterization, +# and alloca is special cased (for the alloca-opt module). +# We could also entirely rely on EXTRA_lib..._SOURCES. +AC_DEFUN([gl_LIBSOURCES], [ + m4_foreach([_gl_NAME], [$1], [ + m4_if(_gl_NAME, [alloca.c], [], [ + m4_define([gl_LIBSOURCES_DIR], [gl/lib]) + m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) + ]) + ]) +]) + +# Like AC_LIBOBJ, except that the module name goes +# into gltests_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gltests_LIBOBJ], [ + AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl + gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" +]) + +# Like AC_REPLACE_FUNCS, except that the module name goes +# into gltests_LIBOBJS instead of into LIBOBJS. +AC_DEFUN([gltests_REPLACE_FUNCS], [ + m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl + AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) +]) + +# Like AC_LIBSOURCES, except the directory where the source file is +# expected is derived from the gnulib-tool parameterization, +# and alloca is special cased (for the alloca-opt module). +# We could also entirely rely on EXTRA_lib..._SOURCES. +AC_DEFUN([gltests_LIBSOURCES], [ + m4_foreach([_gl_NAME], [$1], [ + m4_if(_gl_NAME, [alloca.c], [], [ + m4_define([gltests_LIBSOURCES_DIR], [tests]) + m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) + ]) + ]) +]) + +# This macro records the list of files which have been installed by +# gnulib-tool and may be removed by future gnulib-tool invocations. +AC_DEFUN([gl_FILE_LIST], [ + build-aux/config.rpath + build-aux/snippet/_Noreturn.h + build-aux/snippet/arg-nonnull.h + build-aux/snippet/c++defs.h + build-aux/snippet/unused-parameter.h + build-aux/snippet/warn-on-use.h + build-aux/update-copyright + build-aux/useless-if-before-free + build-aux/vc-list-files + doc/fdl.texi + doc/gpl-3.0.texi + doc/parse-datetime.texi + lib/alloca.c + lib/alloca.in.h + lib/allocator.c + lib/allocator.h + lib/areadlink-with-size.c + lib/areadlink.c + lib/areadlink.h + lib/areadlinkat.c + lib/argmatch.c + lib/argmatch.h + lib/asnprintf.c + lib/at-func.c + lib/basename-lgpl.c + lib/basename.c + lib/bitrotate.c + lib/bitrotate.h + lib/btowc.c + lib/byteswap.in.h + lib/c-ctype.c + lib/c-ctype.h + lib/c-strcase.h + lib/c-strcasecmp.c + lib/c-strcaseeq.h + lib/c-strcasestr.c + lib/c-strcasestr.h + lib/c-strncasecmp.c + lib/c-strstr.c + lib/c-strstr.h + lib/canonicalize.c + lib/canonicalize.h + lib/careadlinkat.c + lib/careadlinkat.h + lib/chdir-long.c + lib/chdir-long.h + lib/cloexec.c + lib/cloexec.h + lib/close-stream.c + lib/close-stream.h + lib/close.c + lib/closedir.c + lib/closein.c + lib/closein.h + lib/closeout.c + lib/closeout.h + lib/config.charset + lib/creat-safer.c + lib/ctype.in.h + lib/cycle-check.c + lib/cycle-check.h + lib/dev-ino.h + lib/dirent--.h + lib/dirent-private.h + lib/dirent-safer.h + lib/dirent.in.h + lib/dirfd.c + lib/dirname-lgpl.c + lib/dirname.c + lib/dirname.h + lib/dosname.h + lib/dup-safer.c + lib/dup.c + lib/dup2.c + lib/errno.in.h + lib/error.c + lib/error.h + lib/euidaccess.c + lib/exitfail.c + lib/exitfail.h + lib/faccessat.c + lib/fchdir.c + lib/fcntl--.h + lib/fcntl-safer.h + lib/fcntl.c + lib/fcntl.in.h + lib/fd-hook.c + lib/fd-hook.h + lib/fd-safer.c + lib/fdopendir.c + lib/fflush.c + lib/file-set.c + lib/file-set.h + lib/fileblocks.c + lib/filemode.c + lib/filemode.h + lib/filename.h + lib/filenamecat-lgpl.c + lib/filenamecat.h + lib/float+.h + lib/float.c + lib/float.in.h + lib/fnmatch.c + lib/fnmatch.in.h + lib/fnmatch_loop.c + lib/fopen-safer.c + lib/fopen.c + lib/fpending.c + lib/fpending.h + lib/fpurge.c + lib/freadahead.c + lib/freadahead.h + lib/freading.c + lib/freading.h + lib/fseek.c + lib/fseeko.c + lib/fstat.c + lib/fstatat.c + lib/ftell.c + lib/ftello.c + lib/fts-cycle.c + lib/fts.c + lib/fts_.h + lib/getcwd-lgpl.c + lib/getcwd.c + lib/getdelim.c + lib/getdtablesize.c + lib/getfilecon.c + lib/getgroups.c + lib/gethostname.c + lib/getline.c + lib/getopt.c + lib/getopt.in.h + lib/getopt1.c + lib/getopt_int.h + lib/gettext.h + lib/gettime.c + lib/gettimeofday.c + lib/glthread/lock.c + lib/glthread/lock.h + lib/glthread/threadlib.c + lib/group-member.c + lib/hash-pjw.c + lib/hash-pjw.h + lib/hash-triple.c + lib/hash-triple.h + lib/hash.c + lib/hash.h + lib/human.c + lib/human.h + lib/i-ring.c + lib/i-ring.h + lib/idcache.c + lib/idcache.h + lib/intprops.h + lib/inttypes.in.h + lib/isblank.c + lib/isfinite.c + lib/isinf.c + lib/isnan.c + lib/isnand-nolibm.h + lib/isnand.c + lib/isnanf-nolibm.h + lib/isnanf.c + lib/isnanl-nolibm.h + lib/isnanl.c + lib/iswblank.c + lib/itold.c + lib/langinfo.in.h + lib/localcharset.c + lib/localcharset.h + lib/locale.in.h + lib/localeconv.c + lib/lseek.c + lib/lstat.c + lib/malloc.c + lib/malloca.c + lib/malloca.h + lib/malloca.valgrind + lib/math.c + lib/math.in.h + lib/mbchar.c + lib/mbchar.h + lib/mbrtowc.c + lib/mbscasestr.c + lib/mbsinit.c + lib/mbslen.c + lib/mbsrtowcs-impl.h + lib/mbsrtowcs-state.c + lib/mbsrtowcs.c + lib/mbsstr.c + lib/mbtowc-impl.h + lib/mbtowc.c + lib/mbuiter.c + lib/mbuiter.h + lib/memchr.c + lib/memchr.valgrind + lib/mempcpy.c + lib/memrchr.c + lib/mktime-internal.h + lib/mktime.c + lib/modechange.c + lib/modechange.h + lib/modf.c + lib/mountlist.c + lib/mountlist.h + lib/msvc-inval.c + lib/msvc-inval.h + lib/msvc-nothrow.c + lib/msvc-nothrow.h + lib/nl_langinfo.c + lib/open-safer.c + lib/open.c + lib/openat-die.c + lib/openat-priv.h + lib/openat-proc.c + lib/openat-safer.c + lib/openat.c + lib/openat.h + lib/opendir-safer.c + lib/opendir.c + lib/parse-datetime.h + lib/parse-datetime.y + lib/pathmax.h + lib/perror.c + lib/pipe-safer.c + lib/printf-args.c + lib/printf-args.h + lib/printf-parse.c + lib/printf-parse.h + lib/progname.c + lib/progname.h + lib/quote.h + lib/quotearg.c + lib/quotearg.h + lib/read.c + lib/readdir.c + lib/readlink.c + lib/readlinkat.c + lib/realloc.c + lib/ref-add.sin + lib/ref-del.sin + lib/regcomp.c + lib/regex.c + lib/regex.h + lib/regex_internal.c + lib/regex_internal.h + lib/regexec.c + lib/rewinddir.c + lib/rmdir.c + lib/root-uid.h + lib/rpmatch.c + lib/safe-read.c + lib/safe-read.h + lib/same-inode.h + lib/same.c + lib/same.h + lib/save-cwd.c + lib/save-cwd.h + lib/savedir.c + lib/savedir.h + lib/se-context.c + lib/se-context.in.h + lib/se-selinux.c + lib/se-selinux.in.h + lib/selinux-at.c + lib/selinux-at.h + lib/setenv.c + lib/size_max.h + lib/snprintf.c + lib/sockets.c + lib/sockets.h + lib/stat-macros.h + lib/stat-size.h + lib/stat-time.c + lib/stat-time.h + lib/stat.c + lib/statat.c + lib/stdalign.in.h + lib/stdarg.in.h + lib/stdbool.in.h + lib/stddef.in.h + lib/stdint.in.h + lib/stdio--.h + lib/stdio-impl.h + lib/stdio-safer.h + lib/stdio.in.h + lib/stdlib.in.h + lib/stpcpy.c + lib/str-kmp.h + lib/str-two-way.h + lib/strcasecmp.c + lib/strcasestr.c + lib/strdup.c + lib/streq.h + lib/strerror-override.c + lib/strerror-override.h + lib/strerror.c + lib/strerror_r.c + lib/strftime.c + lib/strftime.h + lib/string.in.h + lib/strings.in.h + lib/stripslash.c + lib/strncasecmp.c + lib/strndup.c + lib/strnlen.c + lib/strnlen1.c + lib/strnlen1.h + lib/strstr.c + lib/strtoimax.c + lib/strtol.c + lib/strtoul.c + lib/strtoull.c + lib/strtoumax.c + lib/sys_socket.c + lib/sys_socket.in.h + lib/sys_stat.in.h + lib/sys_time.in.h + lib/sys_types.in.h + lib/sys_uio.in.h + lib/sys_utsname.in.h + lib/sys_wait.in.h + lib/time.in.h + lib/time_r.c + lib/timespec.c + lib/timespec.h + lib/trunc.c + lib/uname.c + lib/unistd--.h + lib/unistd-safer.h + lib/unistd.c + lib/unistd.in.h + lib/unitypes.in.h + lib/uniwidth.in.h + lib/uniwidth/cjk.h + lib/uniwidth/width.c + lib/unlink.c + lib/unlinkat.c + lib/unsetenv.c + lib/vasnprintf.c + lib/vasnprintf.h + lib/verify.h + lib/version-etc-fsf.c + lib/version-etc.c + lib/version-etc.h + lib/w32sock.h + lib/wchar.in.h + lib/wcrtomb.c + lib/wctype-h.c + lib/wctype.in.h + lib/wcwidth.c + lib/xalloc-die.c + lib/xalloc-oversized.h + lib/xalloc.h + lib/xgetcwd.c + lib/xgetcwd.h + lib/xmalloc.c + lib/xsize.c + lib/xsize.h + lib/xstrndup.c + lib/xstrndup.h + lib/xstrtod.c + lib/xstrtod.h + lib/xstrtol-error.c + lib/xstrtol.c + lib/xstrtol.h + lib/xstrtoul.c + lib/xstrtoumax.c + lib/yesno.c + lib/yesno.h + m4/00gnulib.m4 + m4/absolute-header.m4 + m4/alloca.m4 + m4/arpa_inet_h.m4 + m4/assert.m4 + m4/bison.m4 + m4/btowc.m4 + m4/byteswap.m4 + m4/canonicalize.m4 + m4/chdir-long.m4 + m4/check-math-lib.m4 + m4/clock_time.m4 + m4/close-stream.m4 + m4/close.m4 + m4/closedir.m4 + m4/closein.m4 + m4/closeout.m4 + m4/codeset.m4 + m4/configmake.m4 + m4/ctype.m4 + m4/cycle-check.m4 + m4/d-ino.m4 + m4/d-type.m4 + m4/dirent-safer.m4 + m4/dirent_h.m4 + m4/dirfd.m4 + m4/dirname.m4 + m4/double-slash-root.m4 + m4/dup.m4 + m4/dup2.m4 + m4/eealloc.m4 + m4/environ.m4 + m4/errno_h.m4 + m4/error.m4 + m4/euidaccess.m4 + m4/exponentd.m4 + m4/exponentf.m4 + m4/exponentl.m4 + m4/extensions.m4 + m4/extern-inline.m4 + m4/faccessat.m4 + m4/fchdir.m4 + m4/fcntl-o.m4 + m4/fcntl-safer.m4 + m4/fcntl.m4 + m4/fcntl_h.m4 + m4/fdopen.m4 + m4/fdopendir.m4 + m4/fflush.m4 + m4/fileblocks.m4 + m4/filemode.m4 + m4/filenamecat.m4 + m4/flexmember.m4 + m4/float_h.m4 + m4/fnmatch.m4 + m4/fopen.m4 + m4/fpending.m4 + m4/fpieee.m4 + m4/fpurge.m4 + m4/freadahead.m4 + m4/freading.m4 + m4/fseek.m4 + m4/fseeko.m4 + m4/fstat.m4 + m4/fstatat.m4 + m4/fstypename.m4 + m4/ftell.m4 + m4/ftello.m4 + m4/ftruncate.m4 + m4/fts.m4 + m4/getcwd-abort-bug.m4 + m4/getcwd-path-max.m4 + m4/getcwd.m4 + m4/getdelim.m4 + m4/getdtablesize.m4 + m4/getgroups.m4 + m4/gethostname.m4 + m4/getline.m4 + m4/getopt.m4 + m4/getpagesize.m4 + m4/gettext.m4 + m4/gettime.m4 + m4/gettimeofday.m4 + m4/glibc2.m4 + m4/glibc21.m4 + m4/gnulib-common.m4 + m4/group-member.m4 + m4/human.m4 + m4/i-ring.m4 + m4/iconv.m4 + m4/idcache.m4 + m4/include_next.m4 + m4/inet_pton.m4 + m4/inline.m4 + m4/intdiv0.m4 + m4/intl.m4 + m4/intldir.m4 + m4/intlmacosx.m4 + m4/intmax.m4 + m4/intmax_t.m4 + m4/inttostr.m4 + m4/inttypes-pri.m4 + m4/inttypes.m4 + m4/inttypes_h.m4 + m4/ioctl.m4 + m4/isblank.m4 + m4/isfinite.m4 + m4/isinf.m4 + m4/isnand.m4 + m4/isnanf.m4 + m4/isnanl.m4 + m4/iswblank.m4 + m4/langinfo_h.m4 + m4/largefile.m4 + m4/lcmessage.m4 + m4/lib-ld.m4 + m4/lib-link.m4 + m4/lib-prefix.m4 + m4/libunistring-base.m4 + m4/localcharset.m4 + m4/locale-fr.m4 + m4/locale-ja.m4 + m4/locale-tr.m4 + m4/locale-zh.m4 + m4/locale_h.m4 + m4/localeconv.m4 + m4/localename.m4 + m4/lock.m4 + m4/longlong.m4 + m4/ls-mntd-fs.m4 + m4/lseek.m4 + m4/lstat.m4 + m4/malloc.m4 + m4/malloca.m4 + m4/manywarnings.m4 + m4/math_h.m4 + m4/mathfunc.m4 + m4/mbchar.m4 + m4/mbiter.m4 + m4/mbrtowc.m4 + m4/mbsinit.m4 + m4/mbslen.m4 + m4/mbsrtowcs.m4 + m4/mbstate_t.m4 + m4/mbtowc.m4 + m4/memchr.m4 + m4/mempcpy.m4 + m4/memrchr.m4 + m4/mktime.m4 + m4/mmap-anon.m4 + m4/mode_t.m4 + m4/modechange.m4 + m4/modf.m4 + m4/mountlist.m4 + m4/msvc-inval.m4 + m4/msvc-nothrow.m4 + m4/multiarch.m4 + m4/nanosleep.m4 + m4/netinet_in_h.m4 + m4/nl_langinfo.m4 + m4/nls.m4 + m4/nocrash.m4 + m4/off_t.m4 + m4/onceonly.m4 + m4/open.m4 + m4/openat.m4 + m4/opendir.m4 + m4/parse-datetime.m4 + m4/pathmax.m4 + m4/perror.m4 + m4/pipe.m4 + m4/po.m4 + m4/printf-posix.m4 + m4/printf.m4 + m4/priv-set.m4 + m4/progtest.m4 + m4/putenv.m4 + m4/quote.m4 + m4/quotearg.m4 + m4/raise.m4 + m4/read.m4 + m4/readdir.m4 + m4/readlink.m4 + m4/readlinkat.m4 + m4/realloc.m4 + m4/regex.m4 + m4/rewinddir.m4 + m4/rmdir.m4 + m4/rpmatch.m4 + m4/safe-read.m4 + m4/same.m4 + m4/save-cwd.m4 + m4/savedir.m4 + m4/select.m4 + m4/selinux-context-h.m4 + m4/selinux-selinux-h.m4 + m4/setenv.m4 + m4/setlocale.m4 + m4/sigaction.m4 + m4/signal_h.m4 + m4/signalblocking.m4 + m4/size_max.m4 + m4/sleep.m4 + m4/snprintf.m4 + m4/socketlib.m4 + m4/sockets.m4 + m4/socklen.m4 + m4/sockpfaf.m4 + m4/ssize_t.m4 + m4/st_dm_mode.m4 + m4/stat-size.m4 + m4/stat-time.m4 + m4/stat.m4 + m4/stdalign.m4 + m4/stdarg.m4 + m4/stdbool.m4 + m4/stddef_h.m4 + m4/stdint.m4 + m4/stdint_h.m4 + m4/stdio_h.m4 + m4/stdlib_h.m4 + m4/stpcpy.m4 + m4/strcase.m4 + m4/strcasestr.m4 + m4/strdup.m4 + m4/strerror.m4 + m4/strerror_r.m4 + m4/strftime.m4 + m4/string_h.m4 + m4/strings_h.m4 + m4/strndup.m4 + m4/strnlen.m4 + m4/strstr.m4 + m4/strtol.m4 + m4/strtoul.m4 + m4/strtoull.m4 + m4/strtoumax.m4 + m4/symlink.m4 + m4/symlinkat.m4 + m4/sys_ioctl_h.m4 + m4/sys_select_h.m4 + m4/sys_socket_h.m4 + m4/sys_stat_h.m4 + m4/sys_time_h.m4 + m4/sys_types_h.m4 + m4/sys_uio_h.m4 + m4/sys_utsname_h.m4 + m4/sys_wait_h.m4 + m4/thread.m4 + m4/threadlib.m4 + m4/time_h.m4 + m4/time_r.m4 + m4/timespec.m4 + m4/tm_gmtoff.m4 + m4/trunc.m4 + m4/uintmax_t.m4 + m4/uname.m4 + m4/ungetc.m4 + m4/unistd-safer.m4 + m4/unistd_h.m4 + m4/unlink.m4 + m4/unlinkat.m4 + m4/unlinkdir.m4 + m4/vasnprintf.m4 + m4/version-etc.m4 + m4/visibility.m4 + m4/warn-on-use.m4 + m4/warnings.m4 + m4/wchar_h.m4 + m4/wchar_t.m4 + m4/wcrtomb.m4 + m4/wctob.m4 + m4/wctomb.m4 + m4/wctype_h.m4 + m4/wcwidth.m4 + m4/wint_t.m4 + m4/xalloc.m4 + m4/xgetcwd.m4 + m4/xsize.m4 + m4/xstrndup.m4 + m4/xstrtod.m4 + m4/xstrtol.m4 + m4/yesno.m4 + m4/yield.m4 + tests/infinity.h + tests/init.sh + tests/macros.h + tests/minus-zero.h + tests/nan.h + tests/nap.h + tests/randomd.c + tests/signature.h + tests/test-accept.c + tests/test-alloca-opt.c + tests/test-areadlink-with-size.c + tests/test-areadlink.c + tests/test-areadlink.h + tests/test-areadlinkat.c + tests/test-argmatch.c + tests/test-arpa_inet.c + tests/test-binary-io.c + tests/test-binary-io.sh + tests/test-bind.c + tests/test-bitrotate.c + tests/test-btowc.c + tests/test-btowc1.sh + tests/test-btowc2.sh + tests/test-byteswap.c + tests/test-c-ctype.c + tests/test-c-strcase.sh + tests/test-c-strcasecmp.c + tests/test-c-strcasestr.c + tests/test-c-strncasecmp.c + tests/test-c-strstr.c + tests/test-canonicalize.c + tests/test-chdir.c + tests/test-cloexec.c + tests/test-close.c + tests/test-closein.c + tests/test-closein.sh + tests/test-connect.c + tests/test-ctype.c + tests/test-dirent-safer.c + tests/test-dirent.c + tests/test-dirname.c + tests/test-dup-safer.c + tests/test-dup.c + tests/test-dup2.c + tests/test-environ.c + tests/test-errno.c + tests/test-faccessat.c + tests/test-fchdir.c + tests/test-fcntl-h.c + tests/test-fcntl-safer.c + tests/test-fcntl.c + tests/test-fdopen.c + tests/test-fdopendir.c + tests/test-fflush.c + tests/test-fflush2.c + tests/test-fflush2.sh + tests/test-fgetc.c + tests/test-float.c + tests/test-fnmatch.c + tests/test-fopen-safer.c + tests/test-fopen.c + tests/test-fopen.h + tests/test-fpending.c + tests/test-fpending.sh + tests/test-fpurge.c + tests/test-fputc.c + tests/test-fread.c + tests/test-freadahead.c + tests/test-freadahead.sh + tests/test-freading.c + tests/test-fseek.c + tests/test-fseek.sh + tests/test-fseek2.sh + tests/test-fseeko.c + tests/test-fseeko.sh + tests/test-fseeko2.sh + tests/test-fseeko3.c + tests/test-fseeko3.sh + tests/test-fseeko4.c + tests/test-fseeko4.sh + tests/test-fstat.c + tests/test-fstatat.c + tests/test-ftell.c + tests/test-ftell.sh + tests/test-ftell2.sh + tests/test-ftell3.c + tests/test-ftello.c + tests/test-ftello.sh + tests/test-ftello2.sh + tests/test-ftello3.c + tests/test-ftello4.c + tests/test-ftello4.sh + tests/test-ftruncate.c + tests/test-ftruncate.sh + tests/test-fwrite.c + tests/test-getcwd-lgpl.c + tests/test-getcwd.c + tests/test-getcwd.sh + tests/test-getdelim.c + tests/test-getdtablesize.c + tests/test-getgroups.c + tests/test-gethostname.c + tests/test-getline.c + tests/test-getopt.c + tests/test-getopt.h + tests/test-getopt_long.h + tests/test-gettimeofday.c + tests/test-hash.c + tests/test-i-ring.c + tests/test-ignore-value.c + tests/test-inet_pton.c + tests/test-init.sh + tests/test-intprops.c + tests/test-inttostr.c + tests/test-inttypes.c + tests/test-ioctl.c + tests/test-isblank.c + tests/test-isfinite.c + tests/test-isinf.c + tests/test-isnand-nolibm.c + tests/test-isnand.h + tests/test-isnanf-nolibm.c + tests/test-isnanf.h + tests/test-isnanl-nolibm.c + tests/test-isnanl.h + tests/test-iswblank.c + tests/test-langinfo.c + tests/test-listen.c + tests/test-locale.c + tests/test-localeconv.c + tests/test-localename.c + tests/test-lock.c + tests/test-lseek.c + tests/test-lseek.sh + tests/test-lstat.c + tests/test-lstat.h + tests/test-malloc-gnu.c + tests/test-malloca.c + tests/test-math.c + tests/test-mbrtowc-w32-1.sh + tests/test-mbrtowc-w32-2.sh + tests/test-mbrtowc-w32-3.sh + tests/test-mbrtowc-w32-4.sh + tests/test-mbrtowc-w32-5.sh + tests/test-mbrtowc-w32.c + tests/test-mbrtowc.c + tests/test-mbrtowc1.sh + tests/test-mbrtowc2.sh + tests/test-mbrtowc3.sh + tests/test-mbrtowc4.sh + tests/test-mbscasestr1.c + tests/test-mbscasestr2.c + tests/test-mbscasestr2.sh + tests/test-mbscasestr3.c + tests/test-mbscasestr3.sh + tests/test-mbscasestr4.c + tests/test-mbscasestr4.sh + tests/test-mbsinit.c + tests/test-mbsinit.sh + tests/test-mbsrtowcs.c + tests/test-mbsrtowcs1.sh + tests/test-mbsrtowcs2.sh + tests/test-mbsrtowcs3.sh + tests/test-mbsrtowcs4.sh + tests/test-mbsstr1.c + tests/test-mbsstr2.c + tests/test-mbsstr2.sh + tests/test-mbsstr3.c + tests/test-mbsstr3.sh + tests/test-memchr.c + tests/test-memrchr.c + tests/test-modf.c + tests/test-modf.h + tests/test-nanosleep.c + tests/test-netinet_in.c + tests/test-nl_langinfo.c + tests/test-nl_langinfo.sh + tests/test-open.c + tests/test-open.h + tests/test-openat-safer.c + tests/test-openat.c + tests/test-parse-datetime.c + tests/test-pathmax.c + tests/test-perror.c + tests/test-perror.sh + tests/test-perror2.c + tests/test-pipe.c + tests/test-priv-set.c + tests/test-quotearg-simple.c + tests/test-quotearg.h + tests/test-raise.c + tests/test-read.c + tests/test-readlink.c + tests/test-readlink.h + tests/test-readlinkat.c + tests/test-realloc-gnu.c + tests/test-regex.c + tests/test-rmdir.c + tests/test-rmdir.h + tests/test-select-fd.c + tests/test-select-in.sh + tests/test-select-out.sh + tests/test-select-stdin.c + tests/test-select.c + tests/test-select.h + tests/test-setenv.c + tests/test-setlocale1.c + tests/test-setlocale1.sh + tests/test-setlocale2.c + tests/test-setlocale2.sh + tests/test-setsockopt.c + tests/test-sigaction.c + tests/test-signal-h.c + tests/test-sigprocmask.c + tests/test-sleep.c + tests/test-snprintf.c + tests/test-sockets.c + tests/test-stat-time.c + tests/test-stat.c + tests/test-stat.h + tests/test-statat.c + tests/test-stdalign.c + tests/test-stdbool.c + tests/test-stddef.c + tests/test-stdint.c + tests/test-stdio.c + tests/test-stdlib.c + tests/test-strcasestr.c + tests/test-strerror.c + tests/test-strerror_r.c + tests/test-strftime.c + tests/test-string.c + tests/test-strings.c + tests/test-strnlen.c + tests/test-strstr.c + tests/test-strtol.c + tests/test-strtoul.c + tests/test-strtoull.c + tests/test-strtoumax.c + tests/test-symlink.c + tests/test-symlink.h + tests/test-symlinkat.c + tests/test-sys_ioctl.c + tests/test-sys_select.c + tests/test-sys_socket.c + tests/test-sys_stat.c + tests/test-sys_time.c + tests/test-sys_types.c + tests/test-sys_uio.c + tests/test-sys_utsname.c + tests/test-sys_wait.c + tests/test-sys_wait.h + tests/test-thread_create.c + tests/test-thread_self.c + tests/test-time.c + tests/test-trunc1.c + tests/test-trunc2.c + tests/test-uname.c + tests/test-unistd.c + tests/test-unlink.c + tests/test-unlink.h + tests/test-unlinkat.c + tests/test-unsetenv.c + tests/test-update-copyright.sh + tests/test-vasnprintf.c + tests/test-vc-list-files-cvs.sh + tests/test-vc-list-files-git.sh + tests/test-verify.c + tests/test-verify.sh + tests/test-version-etc.c + tests/test-version-etc.sh + tests/test-wchar.c + tests/test-wcrtomb-w32-1.sh + tests/test-wcrtomb-w32-2.sh + tests/test-wcrtomb-w32-3.sh + tests/test-wcrtomb-w32-4.sh + tests/test-wcrtomb-w32-5.sh + tests/test-wcrtomb-w32.c + tests/test-wcrtomb.c + tests/test-wcrtomb.sh + tests/test-wctype-h.c + tests/test-wcwidth.c + tests/test-xalloc-die.c + tests/test-xalloc-die.sh + tests/test-xstrtol.c + tests/test-xstrtol.sh + tests/test-xstrtoul.c + tests/test-xstrtoumax.c + tests/test-xstrtoumax.sh + tests/test-yesno.c + tests/test-yesno.sh + tests/uniwidth/test-uc_width.c + tests/uniwidth/test-uc_width2.c + tests/uniwidth/test-uc_width2.sh + tests/zerosize-ptr.h + tests=lib/accept.c + tests=lib/anytostr.c + tests=lib/arpa_inet.in.h + tests=lib/at-func.c + tests=lib/binary-io.c + tests=lib/binary-io.h + tests=lib/bind.c + tests=lib/connect.c + tests=lib/dup-safer-flag.c + tests=lib/fd-safer-flag.c + tests=lib/fdopen.c + tests=lib/fpucw.h + tests=lib/ftruncate.c + tests=lib/getpagesize.c + tests=lib/glthread/thread.c + tests=lib/glthread/thread.h + tests=lib/glthread/yield.h + tests=lib/ignore-value.h + tests=lib/imaxtostr.c + tests=lib/inet_pton.c + tests=lib/inttostr.c + tests=lib/inttostr.h + tests=lib/ioctl.c + tests=lib/listen.c + tests=lib/localename.c + tests=lib/localename.h + tests=lib/nanosleep.c + tests=lib/netinet_in.in.h + tests=lib/offtostr.c + tests=lib/pipe.c + tests=lib/priv-set.c + tests=lib/priv-set.h + tests=lib/putenv.c + tests=lib/raise.c + tests=lib/select.c + tests=lib/setlocale.c + tests=lib/setsockopt.c + tests=lib/sig-handler.c + tests=lib/sig-handler.h + tests=lib/sigaction.c + tests=lib/signal.in.h + tests=lib/sigprocmask.c + tests=lib/sleep.c + tests=lib/socket.c + tests=lib/symlink.c + tests=lib/symlinkat.c + tests=lib/sys_ioctl.in.h + tests=lib/sys_select.in.h + tests=lib/uinttostr.c + tests=lib/umaxtostr.c + tests=lib/unlinkdir.c + tests=lib/unlinkdir.h + tests=lib/w32sock.h + tests=lib/wctob.c + tests=lib/wctomb-impl.h + tests=lib/wctomb.c + top/GNUmakefile + top/maint.mk +]) diff --git a/gl/m4/group-member.m4 b/gl/m4/group-member.m4 new file mode 100644 index 0000000..11d55d6 --- /dev/null +++ b/gl/m4/group-member.m4 @@ -0,0 +1,29 @@ +# serial 14 + +# Copyright (C) 1999-2001, 2003-2007, 2009-2014 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. + +dnl Written by Jim Meyering + +AC_DEFUN([gl_FUNC_GROUP_MEMBER], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + + dnl Persuade glibc to declare group_member(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl Do this replacement check manually because I want the hyphen + dnl (not the underscore) in the filename. + AC_CHECK_FUNC([group_member], , [ + HAVE_GROUP_MEMBER=0 + ]) +]) + +# Prerequisites of lib/group-member.c. +AC_DEFUN([gl_PREREQ_GROUP_MEMBER], +[ + AC_REQUIRE([AC_FUNC_GETGROUPS]) +]) diff --git a/gl/m4/human.m4 b/gl/m4/human.m4 new file mode 100644 index 0000000..840b0d4 --- /dev/null +++ b/gl/m4/human.m4 @@ -0,0 +1,11 @@ +#serial 11 +dnl Copyright (C) 2002-2006, 2009-2014 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 Prerequisites of lib/human.c. +AC_DEFUN([gl_HUMAN], +[ + : +]) diff --git a/gl/m4/i-ring.m4 b/gl/m4/i-ring.m4 new file mode 100644 index 0000000..ac46841 --- /dev/null +++ b/gl/m4/i-ring.m4 @@ -0,0 +1,10 @@ +# serial 2 +dnl Copyright (C) 2006, 2009-2014 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_I_RING], +[ + : +]) diff --git a/gl/m4/iconv.m4 b/gl/m4/iconv.m4 new file mode 100644 index 0000000..4b29c5f --- /dev/null +++ b/gl/m4/iconv.m4 @@ -0,0 +1,268 @@ +# iconv.m4 serial 18 (gettext-0.18.2) +dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_func_iconv=yes]) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, + dnl Solaris 10. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +int main () +{ + int result = 0; + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\263"; + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + const char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + result |= 8; + iconv_close (cd_88591_to_utf8); + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + result |= 16; + return result; +}]])], + [am_cv_func_iconv_works=yes], + [am_cv_func_iconv_works=no], + [ +changequote(,)dnl + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac +changequote([,])dnl + ]) + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE([HAVE_ICONV], [1], + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) +]) + +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to +dnl avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [m4_ifdef([gl_00GNULIB], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])])) +gl_iconv_AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL([am_cv_proto_iconv], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + ]], + [[]])], + [am_cv_proto_iconv_arg1=""], + [am_cv_proto_iconv_arg1="const"]) + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([ + $am_cv_proto_iconv]) + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + dnl Also substitute ICONV_CONST in the gnulib generated . + m4_ifdef([gl_ICONV_H_DEFAULTS], + [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + if test -n "$am_cv_proto_iconv_arg1"; then + ICONV_CONST="const" + fi + ]) + fi +]) diff --git a/gl/m4/idcache.m4 b/gl/m4/idcache.m4 new file mode 100644 index 0000000..e168fde --- /dev/null +++ b/gl/m4/idcache.m4 @@ -0,0 +1,11 @@ +# idcache.m4 serial 7 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_IDCACHE], +[ + : +]) diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4 new file mode 100644 index 0000000..69ad3db --- /dev/null +++ b/gl/m4/include_next.m4 @@ -0,0 +1,223 @@ +# include_next.m4 serial 23 +dnl Copyright (C) 2006-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert and Derek Price. + +dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. +dnl +dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to +dnl 'include' otherwise. +dnl +dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler +dnl supports it in the special case that it is the first include directive in +dnl the given file, or to 'include' otherwise. +dnl +dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, +dnl so as to avoid GCC warnings when the gcc option -pedantic is used. +dnl '#pragma GCC system_header' has the same effect as if the file was found +dnl through the include search path specified with '-isystem' options (as +dnl opposed to the search path specified with '-I' options). Namely, gcc +dnl does not warn about some things, and on some systems (Solaris and Interix) +dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side +dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead +dnl of plain '__STDC__'. +dnl +dnl PRAGMA_COLUMNS can be used in files that override system header files, so +dnl as to avoid compilation errors on HP NonStop systems when the gnulib file +dnl is included by a system header file that does a "#pragma COLUMNS 80" (which +dnl has the effect of truncating the lines of that file and all files that it +dnl includes to 80 columns) and the gnulib file has lines longer than 80 +dnl columns. + +AC_DEFUN([gl_INCLUDE_NEXT], +[ + AC_LANG_PREPROC_REQUIRE() + AC_CACHE_CHECK([whether the preprocessor supports include_next], + [gl_cv_have_include_next], + [rm -rf conftestd1a conftestd1b conftestd2 + mkdir conftestd1a conftestd1b conftestd2 + dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on + dnl AIX 6.1 support include_next when used as first preprocessor directive + dnl in a file, but not when preceded by another include directive. Check + dnl for this bug by including . + dnl Additionally, with this same compiler, include_next is a no-op when + dnl used in a header file that was included by specifying its absolute + dnl file name. Despite these two bugs, include_next is used in the + dnl compiler's . By virtue of the second bug, we need to use + dnl include_next as well in this case. + cat < conftestd1a/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include_next +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat < conftestd1b/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include +#include_next +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat < conftestd2/conftest.h +#ifndef DEFINED_IN_CONFTESTD1 +#error "include_next test doesn't work" +#endif +#define DEFINED_IN_CONFTESTD2 +EOF + gl_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" +dnl We intentionally avoid using AC_LANG_SOURCE here. + AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], + [gl_cv_have_include_next=yes], + [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" + AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], + [gl_cv_have_include_next=buggy], + [gl_cv_have_include_next=no]) + ]) + CPPFLAGS="$gl_save_CPPFLAGS" + rm -rf conftestd1a conftestd1b conftestd2 + ]) + PRAGMA_SYSTEM_HEADER= + if test $gl_cv_have_include_next = yes; then + INCLUDE_NEXT=include_next + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + if test -n "$GCC"; then + PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' + fi + else + if test $gl_cv_have_include_next = buggy; then + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + else + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include + fi + fi + AC_SUBST([INCLUDE_NEXT]) + AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) + AC_SUBST([PRAGMA_SYSTEM_HEADER]) + AC_CACHE_CHECK([whether system header files limit the line length], + [gl_cv_pragma_columns], + [dnl HP NonStop systems, which define __TANDEM, have this misfeature. + AC_EGREP_CPP([choke me], + [ +#ifdef __TANDEM +choke me +#endif + ], + [gl_cv_pragma_columns=yes], + [gl_cv_pragma_columns=no]) + ]) + if test $gl_cv_pragma_columns = yes; then + PRAGMA_COLUMNS="#pragma COLUMNS 10000" + else + PRAGMA_COLUMNS= + fi + AC_SUBST([PRAGMA_COLUMNS]) +]) + +# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) +# ------------------------------------------ +# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be +# ''; otherwise define it to be +# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. +# Also, if #include_next works as first preprocessing directive in a file, +# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to +# be +# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. +# That way, a header file with the following line: +# #@INCLUDE_NEXT@ @NEXT_FOO_H@ +# or +# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ +# behaves (after sed substitution) as if it contained +# #include_next +# even if the compiler does not support include_next. +# The three "///" are to pacify Sun C 5.8, which otherwise would say +# "warning: #include of /usr/include/... may be non-portable". +# Use '""', not '<>', so that the /// cannot be confused with a C99 comment. +# Note: This macro assumes that the header file is not empty after +# preprocessing, i.e. it does not only define preprocessor macros but also +# provides some type/enum definitions or function/variable declarations. +# +# This macro also checks whether each header exists, by invoking +# AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument. +AC_DEFUN([gl_CHECK_NEXT_HEADERS], +[ + gl_NEXT_HEADERS_INTERNAL([$1], [check]) +]) + +# gl_NEXT_HEADERS(HEADER1 HEADER2 ...) +# ------------------------------------ +# Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist. +# This is suitable for headers like that are standardized by C89 +# and therefore can be assumed to exist. +AC_DEFUN([gl_NEXT_HEADERS], +[ + gl_NEXT_HEADERS_INTERNAL([$1], [assume]) +]) + +# The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. +AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], +[ + AC_REQUIRE([gl_INCLUDE_NEXT]) + AC_REQUIRE([AC_CANONICAL_HOST]) + + m4_if([$2], [check], + [AC_CHECK_HEADERS_ONCE([$1]) + ]) + +dnl FIXME: gl_next_header and gl_header_exists must be used unquoted +dnl until we can assume autoconf 2.64 or newer. + m4_foreach_w([gl_HEADER_NAME], [$1], + [AS_VAR_PUSHDEF([gl_next_header], + [gl_cv_next_]m4_defn([gl_HEADER_NAME])) + if test $gl_cv_have_include_next = yes; then + AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) + else + AC_CACHE_CHECK( + [absolute name of <]m4_defn([gl_HEADER_NAME])[>], + m4_defn([gl_next_header]), + [m4_if([$2], [check], + [AS_VAR_PUSHDEF([gl_header_exists], + [ac_cv_header_]m4_defn([gl_HEADER_NAME])) + if test AS_VAR_GET(gl_header_exists) = yes; then + AS_VAR_POPDEF([gl_header_exists]) + ]) + gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) + AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME)) + AS_VAR_SET(gl_next_header, ['"'$gl_header'"']) + m4_if([$2], [check], + [else + AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) + fi + ]) + ]) + fi + AC_SUBST( + AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), + [AS_VAR_GET(gl_next_header)]) + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'gl_HEADER_NAME'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=AS_VAR_GET(gl_next_header) + fi + AC_SUBST( + AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), + [$gl_next_as_first_directive]) + AS_VAR_POPDEF([gl_next_header])]) +]) + +# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; +# this fallback is safe for all earlier autoconf versions. +m4_define_default([AC_LANG_DEFINES_PROVIDED]) diff --git a/gl/m4/inet_pton.m4 b/gl/m4/inet_pton.m4 new file mode 100644 index 0000000..136ed24 --- /dev/null +++ b/gl/m4/inet_pton.m4 @@ -0,0 +1,68 @@ +# inet_pton.m4 serial 17 +dnl Copyright (C) 2006, 2008-2014 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_INET_PTON], +[ + AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS]) + + dnl Persuade Solaris to declare inet_pton. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([AC_C_RESTRICT]) + + dnl Most platforms that provide inet_pton define it in libc. + dnl Solaris 8..10 provide inet_pton in libnsl instead. + dnl Solaris 2.6..7 provide inet_pton in libresolv instead. + dnl Native Windows provides it in -lws2_32 instead, with a declaration in + dnl , and it uses stdcall calling convention, not cdecl + dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it). + HAVE_INET_PTON=1 + INET_PTON_LIB= + gl_PREREQ_SYS_H_WINSOCK2 + if test $HAVE_WINSOCK2_H = 1; then + AC_CHECK_DECLS([inet_pton],,, [[#include ]]) + if test $ac_cv_have_decl_inet_pton = yes; then + dnl It needs to be overridden, because the stdcall calling convention + dnl is not compliant with POSIX. + REPLACE_INET_PTON=1 + INET_PTON_LIB="-lws2_32" + else + HAVE_DECL_INET_PTON=0 + HAVE_INET_PTON=0 + fi + else + gl_save_LIBS=$LIBS + AC_SEARCH_LIBS([inet_pton], [nsl resolv], [], + [AC_CHECK_FUNCS([inet_pton]) + if test $ac_cv_func_inet_pton = no; then + HAVE_INET_PTON=0 + fi + ]) + LIBS=$gl_save_LIBS + + if test "$ac_cv_search_inet_pton" != "no" \ + && test "$ac_cv_search_inet_pton" != "none required"; then + INET_PTON_LIB="$ac_cv_search_inet_pton" + fi + + AC_CHECK_HEADERS_ONCE([netdb.h]) + AC_CHECK_DECLS([inet_pton],,, + [[#include + #if HAVE_NETDB_H + # include + #endif + ]]) + if test $ac_cv_have_decl_inet_pton = no; then + HAVE_DECL_INET_PTON=0 + fi + fi + AC_SUBST([INET_PTON_LIB]) +]) + +# Prerequisites of lib/inet_pton.c. +AC_DEFUN([gl_PREREQ_INET_PTON], [ + AC_REQUIRE([gl_SOCKET_FAMILIES]) +]) diff --git a/gl/m4/inline.m4 b/gl/m4/inline.m4 new file mode 100644 index 0000000..c49957f --- /dev/null +++ b/gl/m4/inline.m4 @@ -0,0 +1,40 @@ +# inline.m4 serial 4 +dnl Copyright (C) 2006, 2009-2014 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 Test for the 'inline' keyword or equivalent. +dnl Define 'inline' to a supported equivalent, or to nothing if not supported, +dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an +dnl equivalent is effectively supported, i.e. if the compiler is likely to +dnl drop unused 'static inline' functions. +AC_DEFUN([gl_INLINE], +[ + AC_REQUIRE([AC_C_INLINE]) + AC_CACHE_CHECK([whether the compiler generally respects inline], + [gl_cv_c_inline_effective], + [if test $ac_cv_c_inline = no; then + gl_cv_c_inline_effective=no + else + dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is + dnl specified. + dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result + dnl depends on optimization flags, which can be in CFLAGS. + dnl (AC_EGREP_CPP looks only at the CPPFLAGS.) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], + [[#ifdef __NO_INLINE__ + #error "inline is not effective" + #endif]])], + [gl_cv_c_inline_effective=yes], + [gl_cv_c_inline_effective=no]) + fi + ]) + if test $gl_cv_c_inline_effective = yes; then + AC_DEFINE([HAVE_INLINE], [1], + [Define to 1 if the compiler supports one of the keywords + 'inline', '__inline__', '__inline' and effectively inlines + functions marked as such.]) + fi +]) diff --git a/gl/m4/intlmacosx.m4 b/gl/m4/intlmacosx.m4 new file mode 100644 index 0000000..8a045f6 --- /dev/null +++ b/gl/m4/intlmacosx.m4 @@ -0,0 +1,56 @@ +# intlmacosx.m4 serial 5 (gettext-0.18.2) +dnl Copyright (C) 2004-2014 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 +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +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 Mac OS X. +dnl Defines INTL_MACOSX_LIBS. +AC_DEFUN([gt_INTL_MACOSX], +[ + dnl Check for API introduced in Mac OS X 10.2. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], + [gt_cv_func_CFPreferencesCopyAppValue], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFPreferencesCopyAppValue(NULL, NULL)]])], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], + [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi + 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" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFLocaleCopyCurrent();]])], + [gt_cv_func_CFLocaleCopyCurrent=yes], + [gt_cv_func_CFLocaleCopyCurrent=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], + [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 + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4 new file mode 100644 index 0000000..af5561e --- /dev/null +++ b/gl/m4/intmax_t.m4 @@ -0,0 +1,67 @@ +# intmax_t.m4 serial 8 +dnl Copyright (C) 1997-2004, 2006-2007, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +AC_PREREQ([2.53]) + +# Define intmax_t to 'long' or 'long long' +# if it is not already defined in or . + +AC_DEFUN([gl_AC_TYPE_INTMAX_T], +[ + dnl For simplicity, we assume that a header file defines 'intmax_t' if and + dnl only if it defines 'uintmax_t'. + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + test $ac_cv_type_long_long_int = yes \ + && ac_type='long long' \ + || ac_type='long' + AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], + [Define to long or long long if and don't define.]) + else + AC_DEFINE([HAVE_INTMAX_T], [1], + [Define if you have the 'intmax_t' type in or .]) + fi +]) + +dnl An alternative would be to explicitly test for 'intmax_t'. + +AC_DEFUN([gt_AC_TYPE_INTMAX_T], +[ + AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([gl_AC_HEADER_STDINT_H]) + AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif + ]], + [[intmax_t x = -1; return !x;]])], + [gt_cv_c_intmax_t=yes], + [gt_cv_c_intmax_t=no])]) + if test $gt_cv_c_intmax_t = yes; then + AC_DEFINE([HAVE_INTMAX_T], [1], + [Define if you have the 'intmax_t' type in or .]) + else + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + test $ac_cv_type_long_long_int = yes \ + && ac_type='long long' \ + || ac_type='long' + AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], + [Define to long or long long if and don't define.]) + fi +]) diff --git a/gl/m4/inttostr.m4 b/gl/m4/inttostr.m4 new file mode 100644 index 0000000..c48e9de --- /dev/null +++ b/gl/m4/inttostr.m4 @@ -0,0 +1,32 @@ +#serial 8 +dnl Copyright (C) 2004-2006, 2009-2014 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_INTTOSTR], +[ + gl_PREREQ_INTTOSTR + gl_PREREQ_IMAXTOSTR + gl_PREREQ_OFFTOSTR + gl_PREREQ_UMAXTOSTR + gl_PREREQ_UINTTOSTR +]) + +# Prerequisites of lib/inttostr.h. +AC_DEFUN([gl_PREREQ_INTTOSTR], [ + AC_REQUIRE([AC_TYPE_OFF_T]) + : +]) + +# Prerequisites of lib/imaxtostr.c. +AC_DEFUN([gl_PREREQ_IMAXTOSTR], [:]) + +# Prerequisites of lib/offtostr.c. +AC_DEFUN([gl_PREREQ_OFFTOSTR], [:]) + +# Prerequisites of lib/umaxtostr.c. +AC_DEFUN([gl_PREREQ_UMAXTOSTR], [:]) + +# Prerequisites of lib/uinttostr.c. +AC_DEFUN([gl_PREREQ_UINTTOSTR], [:]) diff --git a/gl/m4/inttypes-pri.m4 b/gl/m4/inttypes-pri.m4 new file mode 100644 index 0000000..00251e1 --- /dev/null +++ b/gl/m4/inttypes-pri.m4 @@ -0,0 +1,42 @@ +# inttypes-pri.m4 serial 7 (gettext-0.18.2) +dnl Copyright (C) 1997-2002, 2006, 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ([2.53]) + +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. + +AC_DEFUN([gt_INTTYPES_PRI], +[ + AC_CHECK_HEADERS([inttypes.h]) + if test $ac_cv_header_inttypes_h = yes; then + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], + [gt_cv_inttypes_pri_broken], + [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#ifdef PRId32 +char *p = PRId32; +#endif + ]], + [[]])], + [gt_cv_inttypes_pri_broken=no], + [gt_cv_inttypes_pri_broken=yes]) + ]) + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], + [Define if exists and defines unusable PRI* macros.]) + PRI_MACROS_BROKEN=1 + else + PRI_MACROS_BROKEN=0 + fi + AC_SUBST([PRI_MACROS_BROKEN]) +]) diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4 new file mode 100644 index 0000000..2f9317d --- /dev/null +++ b/gl/m4/inttypes.m4 @@ -0,0 +1,158 @@ +# inttypes.m4 serial 26 +dnl Copyright (C) 2006-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Derek Price, Bruno Haible. +dnl Test whether is supported or must be substituted. + +AC_DEFUN([gl_INTTYPES_H], +[ + AC_REQUIRE([gl_INTTYPES_INCOMPLETE]) + gl_INTTYPES_PRI_SCN +]) + +AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE], +[ + AC_REQUIRE([gl_STDINT_H]) + AC_CHECK_HEADERS_ONCE([inttypes.h]) + + dnl Override always, so that the portability warnings work. + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + gl_CHECK_NEXT_HEADERS([inttypes.h]) + + AC_REQUIRE([gl_MULTIARCH]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [imaxabs imaxdiv strtoimax strtoumax]) +]) + +# Ensure that the PRI* and SCN* macros are defined appropriately. +AC_DEFUN([gl_INTTYPES_PRI_SCN], +[ + AC_REQUIRE([gt_INTTYPES_PRI]) + + PRIPTR_PREFIX= + if test -n "$STDINT_H"; then + dnl Using the gnulib . It always defines intptr_t to 'long'. + PRIPTR_PREFIX='"l"' + else + dnl Using the system's . + for glpfx in '' l ll I64; do + case $glpfx in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + I64) gltype1='__int64';; + esac + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include + extern intptr_t foo; + extern $gltype1 foo;]])], + [PRIPTR_PREFIX='"'$glpfx'"']) + test -n "$PRIPTR_PREFIX" && break + done + fi + AC_SUBST([PRIPTR_PREFIX]) + + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [INT32_MAX_LT_INTMAX_MAX], + [defined INT32_MAX && defined INTMAX_MAX], + [INT32_MAX < INTMAX_MAX], + [sizeof (int) < sizeof (long long int)]) + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [INT64_MAX_EQ_LONG_MAX], + [defined INT64_MAX], + [INT64_MAX == LONG_MAX], + [sizeof (long long int) == sizeof (long int)]) + else + INT64_MAX_EQ_LONG_MAX=-1 + fi + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [UINT32_MAX_LT_UINTMAX_MAX], + [defined UINT32_MAX && defined UINTMAX_MAX], + [UINT32_MAX < UINTMAX_MAX], + [sizeof (unsigned int) < sizeof (unsigned long long int)]) + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( + [UINT64_MAX_EQ_ULONG_MAX], + [defined UINT64_MAX], + [UINT64_MAX == ULONG_MAX], + [sizeof (unsigned long long int) == sizeof (unsigned long int)]) + else + UINT64_MAX_EQ_ULONG_MAX=-1 + fi +]) + +# Define the symbol $1 to be 1 if the condition is true, 0 otherwise. +# If $2 is true, the condition is $3; otherwise if long long int is supported +# approximate the condition with $4; otherwise, assume the condition is false. +# The condition should work on all C99 platforms; the approximations should be +# good enough to work on all practical pre-C99 platforms. +# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. +AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], +[ + AC_CACHE_CHECK([whether $3], + [gl_cv_test_$1], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[/* Work also in C++ mode. */ + #define __STDC_LIMIT_MACROS 1 + + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + + #include + #if HAVE_STDINT_H + #include + #endif + + #if $2 + #define CONDITION ($3) + #elif HAVE_LONG_LONG_INT + #define CONDITION ($4) + #else + #define CONDITION 0 + #endif + int test[CONDITION ? 1 : -1];]])], + [gl_cv_test_$1=yes], + [gl_cv_test_$1=no])]) + if test $gl_cv_test_$1 = yes; then + $1=1; + else + $1=0; + fi + AC_SUBST([$1]) +]) + +AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_INTTYPES_H_DEFAULTS], +[ + GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS]) + GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV]) + GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX]) + GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS]) + HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) + HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) + HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) + REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) + REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX]) + INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) + INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) + PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN]) + PRIPTR_PREFIX=__PRIPTR_PREFIX; AC_SUBST([PRIPTR_PREFIX]) + UINT32_MAX_LT_UINTMAX_MAX=1; AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX]) + UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; AC_SUBST([UINT64_MAX_EQ_ULONG_MAX]) +]) diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4 new file mode 100644 index 0000000..87be9cf --- /dev/null +++ b/gl/m4/inttypes_h.m4 @@ -0,0 +1,29 @@ +# inttypes_h.m4 serial 10 +dnl Copyright (C) 1997-2004, 2006, 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([gl_AC_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[uintmax_t i = (uintmax_t) -1; return !i;]])], + [gl_cv_header_inttypes_h=yes], + [gl_cv_header_inttypes_h=no])]) + if test $gl_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff --git a/gl/m4/ioctl.m4 b/gl/m4/ioctl.m4 new file mode 100644 index 0000000..5a31a39 --- /dev/null +++ b/gl/m4/ioctl.m4 @@ -0,0 +1,41 @@ +# ioctl.m4 serial 4 +dnl Copyright (C) 2008-2014 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_IOCTL], +[ + AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS]) + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + HAVE_IOCTL=1 + if test "$ac_cv_header_winsock2_h" = yes; then + dnl Even if the 'socket' module is not used here, another part of the + dnl application may use it and pass file descriptors that refer to + dnl sockets to the ioctl() function. So enable the support for sockets. + HAVE_IOCTL=0 + else + AC_CHECK_FUNCS([ioctl]) + dnl On glibc systems, the second parameter is 'unsigned long int request', + dnl not 'int request'. We cannot simply cast the function pointer, but + dnl instead need a wrapper. + AC_CACHE_CHECK([for ioctl with POSIX signature], + [gl_cv_func_ioctl_posix_signature], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[extern + #ifdef __cplusplus + "C" + #endif + int ioctl (int, int, ...); + ]]) + ], + [gl_cv_func_ioctl_posix_signature=yes], + [gl_cv_func_ioctl_posix_signature=no]) + ]) + if test $gl_cv_func_ioctl_posix_signature != yes; then + REPLACE_IOCTL=1 + fi + fi +]) diff --git a/gl/m4/isblank.m4 b/gl/m4/isblank.m4 new file mode 100644 index 0000000..7aa858c --- /dev/null +++ b/gl/m4/isblank.m4 @@ -0,0 +1,17 @@ +# isblank.m4 serial 3 +dnl Copyright (C) 2009-2014 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_ISBLANK], +[ + dnl Persuade glibc to declare isblank(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_CTYPE_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([isblank]) + if test $ac_cv_func_isblank = no; then + HAVE_ISBLANK=0 + fi +]) diff --git a/gl/m4/isfinite.m4 b/gl/m4/isfinite.m4 new file mode 100644 index 0000000..53ad909 --- /dev/null +++ b/gl/m4/isfinite.m4 @@ -0,0 +1,165 @@ +# isfinite.m4 serial 13 +dnl Copyright (C) 2007-2014 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_ISFINITE], +[ + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + dnl Persuade glibc to declare isfinite. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_DECLS([isfinite], , , [[#include ]]) + if test "$ac_cv_have_decl_isfinite" = yes; then + gl_CHECK_MATH_LIB([ISFINITE_LIBM], + [x = isfinite (x) + isfinite ((float) x);]) + if test "$ISFINITE_LIBM" != missing; then + dnl Test whether isfinite() on 'long double' works. + gl_ISFINITEL_WORKS + case "$gl_cv_func_isfinitel_works" in + *yes) ;; + *) ISFINITE_LIBM=missing;; + esac + dnl Also, isfinite() on 'double' does not work on Linux/ia64 (because of + dnl signalling NaNs). But this does not have to be tested, since + dnl isfinite(long double) also does not work in this situation. + fi + fi + if test "$ac_cv_have_decl_isfinite" != yes || + test "$ISFINITE_LIBM" = missing; then + REPLACE_ISFINITE=1 + dnl No libraries are needed to link lib/isfinite.c. + ISFINITE_LIBM= + fi + AC_SUBST([ISFINITE_LIBM]) +]) + +dnl Test whether isfinite() on 'long double' recognizes all numbers which are +dnl neither finite nor infinite. This test fails e.g. on i686, x86_64, ia64, +dnl because of +dnl - pseudo-denormals on x86_64, +dnl - pseudo-zeroes, unnormalized numbers, and pseudo-denormals on i686, +dnl - pseudo-NaN, pseudo-Infinity, pseudo-zeroes, unnormalized numbers, and +dnl pseudo-denormals on ia64. +AC_DEFUN([gl_ISFINITEL_WORKS], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gl_BIGENDIAN]) + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether isfinite(long double) works], [gl_cv_func_isfinitel_works], + [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { unsigned int word[NWORDS]; long double value; } + memory_long_double; +/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the + runtime type conversion. */ +#ifdef __sgi +static long double NaNl () +{ + double zero = 0.0; + return zero / zero; +} +#else +# define NaNl() (0.0L / 0.0L) +#endif +int main () +{ + int result = 0; + + { + memory_long_double m; + unsigned int i; + + /* The isfinite macro should be immune against changes in the sign bit and + in the mantissa bits. The xor operation twiddles a bit that can only be + a sign bit or a mantissa bit (since the exponent never extends to + bit 31). */ + m.value = NaNl (); + m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); + for (i = 0; i < NWORDS; i++) + m.word[i] |= 1; + if (isfinite (m.value)) + result |= 1; + } + +#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + if (isfinite (x.value)) + result |= 2; + } + { + /* Signalling NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + if (isfinite (x.value)) + result |= 2; + } + /* The isfinite macro should recognize Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in + Intel IA-64 Architecture Software Developer's Manual, Volume 1: + Application Architecture. + Table 5-2 "Floating-Point Register Encodings" + Figure 5-6 "Memory to Floating-Point Register Data Translation" + */ + { /* Pseudo-NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + if (isfinite (x.value)) + result |= 4; + } + { /* Pseudo-Infinity. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + if (isfinite (x.value)) + result |= 8; + } + { /* Pseudo-Zero. */ + static memory_long_double x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + if (isfinite (x.value)) + result |= 16; + } + { /* Unnormalized number. */ + static memory_long_double x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + if (isfinite (x.value)) + result |= 32; + } + { /* Pseudo-Denormal. */ + static memory_long_double x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + if (isfinite (x.value)) + result |= 64; + } +#endif + + return result; +}]])], [gl_cv_func_isfinitel_works=yes], [gl_cv_func_isfinitel_works=no], + [case "$host_cpu" in + # Guess no on ia64, x86_64, i386. + ia64 | x86_64 | i*86) gl_cv_func_isfinitel_works="guessing no";; + *) gl_cv_func_isfinitel_works="guessing yes";; + esac + ]) + ]) +]) diff --git a/gl/m4/isinf.m4 b/gl/m4/isinf.m4 new file mode 100644 index 0000000..7174ace --- /dev/null +++ b/gl/m4/isinf.m4 @@ -0,0 +1,175 @@ +# isinf.m4 serial 9 +dnl Copyright (C) 2007-2014 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_ISINF], +[ + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + dnl Persuade glibc to declare isinf. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_DECLS([isinf], , , + [[#include + #ifndef isinf + #error "isinf must be a macro, not a function" + #endif + ]]) + if test "$ac_cv_have_decl_isinf" = yes; then + gl_CHECK_MATH_LIB([ISINF_LIBM], [x = isinf (x) + isinf ((float) x);]) + if test "$ISINF_LIBM" != missing; then + dnl Test whether isinf() on 'long double' works. + gl_ISINFL_WORKS + case "$gl_cv_func_isinfl_works" in + *yes) ;; + *) ISINF_LIBM=missing;; + esac + fi + fi + if test "$ac_cv_have_decl_isinf" != yes || + test "$ISINF_LIBM" = missing; then + REPLACE_ISINF=1 + dnl No libraries are needed to link lib/isinf.c. + ISINF_LIBM= + fi + AC_SUBST([ISINF_LIBM]) +]) + +dnl Test whether isinf() works: +dnl 1) Whether it correctly returns false for LDBL_MAX. +dnl 2) Whether on 'long double' recognizes all numbers which are neither +dnl finite nor infinite. This test fails on OpenBSD/x86, but could also +dnl fail e.g. on i686, x86_64, ia64, because of +dnl - pseudo-denormals on x86_64, +dnl - pseudo-zeroes, unnormalized numbers, and pseudo-denormals on i686, +dnl - pseudo-NaN, pseudo-Infinity, pseudo-zeroes, unnormalized numbers, and +dnl pseudo-denormals on ia64. +AC_DEFUN([gl_ISINFL_WORKS], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gl_BIGENDIAN]) + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether isinf(long double) works], [gl_cv_func_isinfl_works], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { unsigned int word[NWORDS]; long double value; } + memory_long_double; +/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the + runtime type conversion. */ +#ifdef __sgi +static long double NaNl () +{ + double zero = 0.0; + return zero / zero; +} +#else +# define NaNl() (0.0L / 0.0L) +#endif +int main () +{ + int result = 0; + + if (isinf (LDBL_MAX)) + result |= 1; + + { + memory_long_double m; + unsigned int i; + + /* The isinf macro should be immune against changes in the sign bit and + in the mantissa bits. The xor operation twiddles a bit that can only be + a sign bit or a mantissa bit (since the exponent never extends to + bit 31). */ + m.value = NaNl (); + m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); + for (i = 0; i < NWORDS; i++) + m.word[i] |= 1; + if (isinf (m.value)) + result |= 2; + } + +#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + if (isinf (x.value)) + result |= 2; + } + { + /* Signalling NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + if (isinf (x.value)) + result |= 2; + } + /* The isinf macro should recognize Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in + Intel IA-64 Architecture Software Developer's Manual, Volume 1: + Application Architecture. + Table 5-2 "Floating-Point Register Encodings" + Figure 5-6 "Memory to Floating-Point Register Data Translation" + */ + { /* Pseudo-NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + if (isinf (x.value)) + result |= 4; + } + { /* Pseudo-Infinity. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + if (isinf (x.value)) + result |= 8; + } + { /* Pseudo-Zero. */ + static memory_long_double x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + if (isinf (x.value)) + result |= 16; + } + { /* Unnormalized number. */ + static memory_long_double x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + if (isinf (x.value)) + result |= 32; + } + { /* Pseudo-Denormal. */ + static memory_long_double x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + if (isinf (x.value)) + result |= 64; + } +#endif + + return result; +}]])], [gl_cv_func_isinfl_works=yes], [gl_cv_func_isinfl_works=no], + [ + case "$host" in + # Guess no on OpenBSD ia64, x86_64, i386. + ia64-*-openbsd* | x86_64-*-openbsd* | i*86-*-openbsd*) + gl_cv_func_isinfl_works="guessing no";; + *) + gl_cv_func_isinfl_works="guessing yes";; + esac + ]) + ]) +]) diff --git a/gl/m4/isnand.m4 b/gl/m4/isnand.m4 new file mode 100644 index 0000000..36e4ea3 --- /dev/null +++ b/gl/m4/isnand.m4 @@ -0,0 +1,96 @@ +# isnand.m4 serial 11 +dnl Copyright (C) 2007-2014 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 Check how to get or define isnand(). + +AC_DEFUN([gl_FUNC_ISNAND], +[ + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + ISNAND_LIBM= + gl_HAVE_ISNAND_NO_LIBM + if test $gl_cv_func_isnand_no_libm = no; then + gl_HAVE_ISNAND_IN_LIBM + if test $gl_cv_func_isnand_in_libm = yes; then + ISNAND_LIBM=-lm + fi + fi + dnl The variable gl_func_isnand set here is used by isnan.m4. + if test $gl_cv_func_isnand_no_libm = yes \ + || test $gl_cv_func_isnand_in_libm = yes; then + gl_func_isnand=yes + else + gl_func_isnand=no + HAVE_ISNAND=0 + fi + AC_SUBST([ISNAND_LIBM]) +]) + +dnl Check how to get or define isnand() without linking with libm. + +AC_DEFUN([gl_FUNC_ISNAND_NO_LIBM], +[ + gl_HAVE_ISNAND_NO_LIBM + gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm + if test $gl_cv_func_isnand_no_libm = yes; then + AC_DEFINE([HAVE_ISNAND_IN_LIBC], [1], + [Define if the isnan(double) function is available in libc.]) + fi +]) + +dnl Prerequisites of replacement isnand definition. It does not need -lm. +AC_DEFUN([gl_PREREQ_ISNAND], +[ + AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) +]) + +dnl Test whether isnand() can be used with libm. + +AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM], +[ + AC_CACHE_CHECK([whether isnan(double) can be used with libm], + [gl_cv_func_isnand_in_libm], + [ + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #if __GNUC__ >= 4 + # undef isnand + # define isnand(x) __builtin_isnan ((double)(x)) + #elif defined isnan + # undef isnand + # define isnand(x) isnan ((double)(x)) + #endif + double x;]], + [[return isnand (x);]])], + [gl_cv_func_isnand_in_libm=yes], + [gl_cv_func_isnand_in_libm=no]) + LIBS="$save_LIBS" + ]) +]) + +AC_DEFUN([gl_HAVE_ISNAND_NO_LIBM], +[ + AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm], + [gl_cv_func_isnand_no_libm], + [ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #if __GNUC__ >= 4 + # undef isnand + # define isnand(x) __builtin_isnan ((double)(x)) + #else + # undef isnand + # define isnand(x) isnan ((double)(x)) + #endif + double x;]], + [[return isnand (x);]])], + [gl_cv_func_isnand_no_libm=yes], + [gl_cv_func_isnand_no_libm=no]) + ]) +]) diff --git a/gl/m4/isnanf.m4 b/gl/m4/isnanf.m4 new file mode 100644 index 0000000..1f2717d --- /dev/null +++ b/gl/m4/isnanf.m4 @@ -0,0 +1,188 @@ +# isnanf.m4 serial 14 +dnl Copyright (C) 2007-2014 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 Check how to get or define isnanf(). + +AC_DEFUN([gl_FUNC_ISNANF], +[ + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + ISNANF_LIBM= + gl_HAVE_ISNANF_NO_LIBM + if test $gl_cv_func_isnanf_no_libm = no; then + gl_HAVE_ISNANF_IN_LIBM + if test $gl_cv_func_isnanf_in_libm = yes; then + ISNANF_LIBM=-lm + fi + fi + dnl The variable gl_func_isnanf set here is used by isnan.m4. + if test $gl_cv_func_isnanf_no_libm = yes \ + || test $gl_cv_func_isnanf_in_libm = yes; then + save_LIBS="$LIBS" + LIBS="$LIBS $ISNANF_LIBM" + gl_ISNANF_WORKS + LIBS="$save_LIBS" + case "$gl_cv_func_isnanf_works" in + *yes) gl_func_isnanf=yes ;; + *) gl_func_isnanf=no; ISNANF_LIBM= ;; + esac + else + gl_func_isnanf=no + fi + if test $gl_func_isnanf != yes; then + HAVE_ISNANF=0 + fi + AC_SUBST([ISNANF_LIBM]) +]) + +dnl Check how to get or define isnanf() without linking with libm. + +AC_DEFUN([gl_FUNC_ISNANF_NO_LIBM], +[ + gl_HAVE_ISNANF_NO_LIBM + if test $gl_cv_func_isnanf_no_libm = yes; then + gl_ISNANF_WORKS + fi + if test $gl_cv_func_isnanf_no_libm = yes \ + && { case "$gl_cv_func_isnanf_works" in + *yes) true;; + *) false;; + esac + }; then + gl_func_isnanf_no_libm=yes + AC_DEFINE([HAVE_ISNANF_IN_LIBC], [1], + [Define if the isnan(float) function is available in libc.]) + else + gl_func_isnanf_no_libm=no + fi +]) + +dnl Prerequisites of replacement isnanf definition. It does not need -lm. +AC_DEFUN([gl_PREREQ_ISNANF], +[ + gl_FLOAT_EXPONENT_LOCATION +]) + +dnl Test whether isnanf() can be used without libm. +AC_DEFUN([gl_HAVE_ISNANF_NO_LIBM], +[ + AC_CACHE_CHECK([whether isnan(float) can be used without linking with libm], + [gl_cv_func_isnanf_no_libm], + [ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #if __GNUC__ >= 4 + # undef isnanf + # define isnanf(x) __builtin_isnanf ((float)(x)) + #elif defined isnan + # undef isnanf + # define isnanf(x) isnan ((float)(x)) + #endif + float x;]], + [[return isnanf (x);]])], + [gl_cv_func_isnanf_no_libm=yes], + [gl_cv_func_isnanf_no_libm=no]) + ]) +]) + +dnl Test whether isnanf() can be used with libm. +AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM], +[ + AC_CACHE_CHECK([whether isnan(float) can be used with libm], + [gl_cv_func_isnanf_in_libm], + [ + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #if __GNUC__ >= 4 + # undef isnanf + # define isnanf(x) __builtin_isnanf ((float)(x)) + #elif defined isnan + # undef isnanf + # define isnanf(x) isnan ((float)(x)) + #endif + float x;]], + [[return isnanf (x);]])], + [gl_cv_func_isnanf_in_libm=yes], + [gl_cv_func_isnanf_in_libm=no]) + LIBS="$save_LIBS" + ]) +]) + +dnl Test whether isnanf() rejects Infinity (this fails on Solaris 2.5.1), +dnl recognizes a NaN (this fails on IRIX 6.5 with cc), and recognizes a NaN +dnl with in-memory representation 0x7fbfffff (this fails on IRIX 6.5). +AC_DEFUN([gl_ISNANF_WORKS], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION]) + AC_CACHE_CHECK([whether isnan(float) works], [gl_cv_func_isnanf_works], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#if __GNUC__ >= 4 +# undef isnanf +# define isnanf(x) __builtin_isnanf ((float)(x)) +#elif defined isnan +# undef isnanf +# define isnanf(x) isnan ((float)(x)) +#endif +/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ +#ifdef __DECC +static float +NaN () +{ + static float zero = 0.0f; + return zero / zero; +} +#else +# define NaN() (0.0f / 0.0f) +#endif +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { unsigned int word[NWORDS]; float value; } memory_float; +int main() +{ + int result = 0; + + if (isnanf (1.0f / 0.0f)) + result |= 1; + + if (!isnanf (NaN ())) + result |= 2; + +#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT + /* The isnanf function should be immune against changes in the sign bit and + in the mantissa bits. The xor operation twiddles a bit that can only be + a sign bit or a mantissa bit. */ + if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0) + { + memory_float m; + + m.value = NaN (); + /* Set the bits below the exponent to 01111...111. */ + m.word[0] &= -1U << FLT_EXPBIT0_BIT; + m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; + if (!isnanf (m.value)) + result |= 4; + } +#endif + + return result; +}]])], + [gl_cv_func_isnanf_works=yes], + [gl_cv_func_isnanf_works=no], + [case "$host_os" in + irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; + *) gl_cv_func_isnanf_works="guessing yes";; + esac + ]) + ]) +]) diff --git a/gl/m4/isnanl.m4 b/gl/m4/isnanl.m4 new file mode 100644 index 0000000..98b2b69 --- /dev/null +++ b/gl/m4/isnanl.m4 @@ -0,0 +1,255 @@ +# isnanl.m4 serial 17 +dnl Copyright (C) 2007-2014 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_ISNANL], +[ + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + ISNANL_LIBM= + gl_HAVE_ISNANL_NO_LIBM + if test $gl_cv_func_isnanl_no_libm = no; then + gl_HAVE_ISNANL_IN_LIBM + if test $gl_cv_func_isnanl_in_libm = yes; then + ISNANL_LIBM=-lm + fi + fi + dnl The variable gl_func_isnanl set here is used by isnan.m4. + if test $gl_cv_func_isnanl_no_libm = yes \ + || test $gl_cv_func_isnanl_in_libm = yes; then + save_LIBS="$LIBS" + LIBS="$LIBS $ISNANL_LIBM" + gl_FUNC_ISNANL_WORKS + LIBS="$save_LIBS" + case "$gl_cv_func_isnanl_works" in + *yes) gl_func_isnanl=yes ;; + *) gl_func_isnanl=no; ISNANL_LIBM= ;; + esac + else + gl_func_isnanl=no + fi + if test $gl_func_isnanl != yes; then + HAVE_ISNANL=0 + fi + AC_SUBST([ISNANL_LIBM]) +]) + +AC_DEFUN([gl_FUNC_ISNANL_NO_LIBM], +[ + gl_HAVE_ISNANL_NO_LIBM + gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm + if test $gl_func_isnanl_no_libm = yes; then + gl_FUNC_ISNANL_WORKS + case "$gl_cv_func_isnanl_works" in + *yes) ;; + *) gl_func_isnanl_no_libm=no ;; + esac + fi + if test $gl_func_isnanl_no_libm = yes; then + AC_DEFINE([HAVE_ISNANL_IN_LIBC], [1], + [Define if the isnan(long double) function is available in libc.]) + fi +]) + +dnl Prerequisites of replacement isnanl definition. It does not need -lm. +AC_DEFUN([gl_PREREQ_ISNANL], +[ + gl_LONG_DOUBLE_EXPONENT_LOCATION + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) +]) + +dnl Test whether isnanl() can be used without libm. +AC_DEFUN([gl_HAVE_ISNANL_NO_LIBM], +[ + AC_CACHE_CHECK([whether isnan(long double) can be used without linking with libm], + [gl_cv_func_isnanl_no_libm], + [ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #if __GNUC__ >= 4 + # undef isnanl + # define isnanl(x) __builtin_isnanl ((long double)(x)) + #elif defined isnan + # undef isnanl + # define isnanl(x) isnan ((long double)(x)) + #endif + long double x;]], + [[return isnanl (x);]])], + [gl_cv_func_isnanl_no_libm=yes], + [gl_cv_func_isnanl_no_libm=no]) + ]) +]) + +dnl Test whether isnanl() can be used with libm. +AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM], +[ + AC_CACHE_CHECK([whether isnan(long double) can be used with libm], + [gl_cv_func_isnanl_in_libm], + [ + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #if __GNUC__ >= 4 + # undef isnanl + # define isnanl(x) __builtin_isnanl ((long double)(x)) + #elif defined isnan + # undef isnanl + # define isnanl(x) isnan ((long double)(x)) + #endif + long double x;]], + [[return isnanl (x);]])], + [gl_cv_func_isnanl_in_libm=yes], + [gl_cv_func_isnanl_in_libm=no]) + LIBS="$save_LIBS" + ]) +]) + +dnl Test whether isnanl() recognizes all numbers which are neither finite nor +dnl infinite. This test fails e.g. on NetBSD/i386 and on glibc/ia64. +dnl Also, the GCC >= 4.0 built-in __builtin_isnanl does not pass the tests +dnl - for pseudo-denormals on i686 and x86_64, +dnl - for pseudo-zeroes, unnormalized numbers, and pseudo-denormals on ia64. +AC_DEFUN([gl_FUNC_ISNANL_WORKS], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gl_BIGENDIAN]) + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether isnanl works], [gl_cv_func_isnanl_works], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +#if __GNUC__ >= 4 +# undef isnanl +# define isnanl(x) __builtin_isnanl ((long double)(x)) +#elif defined isnan +# undef isnanl +# define isnanl(x) isnan ((long double)(x)) +#endif +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { unsigned int word[NWORDS]; long double value; } + memory_long_double; +/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the + runtime type conversion. */ +#ifdef __sgi +static long double NaNl () +{ + double zero = 0.0; + return zero / zero; +} +#else +# define NaNl() (0.0L / 0.0L) +#endif +int main () +{ + int result = 0; + + if (!isnanl (NaNl ())) + result |= 1; + + { + memory_long_double m; + unsigned int i; + + /* The isnanl function should be immune against changes in the sign bit and + in the mantissa bits. The xor operation twiddles a bit that can only be + a sign bit or a mantissa bit (since the exponent never extends to + bit 31). */ + m.value = NaNl (); + m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); + for (i = 0; i < NWORDS; i++) + m.word[i] |= 1; + if (!isnanl (m.value)) + result |= 1; + } + +#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + if (!isnanl (x.value)) + result |= 2; + } + { + /* Signalling NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + if (!isnanl (x.value)) + result |= 2; + } + /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in + Intel IA-64 Architecture Software Developer's Manual, Volume 1: + Application Architecture. + Table 5-2 "Floating-Point Register Encodings" + Figure 5-6 "Memory to Floating-Point Register Data Translation" + */ + { /* Pseudo-NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + if (!isnanl (x.value)) + result |= 4; + } + { /* Pseudo-Infinity. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + if (!isnanl (x.value)) + result |= 8; + } + { /* Pseudo-Zero. */ + static memory_long_double x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + if (!isnanl (x.value)) + result |= 16; + } + { /* Unnormalized number. */ + static memory_long_double x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + if (!isnanl (x.value)) + result |= 32; + } + { /* Pseudo-Denormal. */ + static memory_long_double x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + if (!isnanl (x.value)) + result |= 64; + } +#endif + + return result; +}]])], + [gl_cv_func_isnanl_works=yes], + [gl_cv_func_isnanl_works=no], + [case "$host_cpu" in + # Guess no on ia64, x86_64, i386. + ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; + *) + case "$host_os" in + netbsd*) gl_cv_func_isnanl_works="guessing no";; + *) gl_cv_func_isnanl_works="guessing yes";; + esac + ;; + esac + ]) + ]) +]) diff --git a/gl/m4/iswblank.m4 b/gl/m4/iswblank.m4 new file mode 100644 index 0000000..a9ce0a3 --- /dev/null +++ b/gl/m4/iswblank.m4 @@ -0,0 +1,41 @@ +# iswblank.m4 serial 4 +dnl Copyright (C) 2011-2014 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_ISWBLANK], +[ + AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) + AC_REQUIRE([gl_WCTYPE_H]) + dnl Persuade glibc to declare iswblank(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([iswblank]) + AC_CHECK_DECLS([iswblank], , , [[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include +#include +]]) + if test $ac_cv_func_iswblank = no; then + HAVE_ISWBLANK=0 + if test $ac_cv_have_decl_iswblank = yes; then + REPLACE_ISWBLANK=1 + fi + fi + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then + dnl Redefine all of iswcntrl, ..., towupper in . + : + else + if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then + dnl Redefine only iswblank. + : + fi + fi + +]) diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4 new file mode 100644 index 0000000..e8d78f9 --- /dev/null +++ b/gl/m4/langinfo_h.m4 @@ -0,0 +1,105 @@ +# langinfo_h.m4 serial 7 +dnl Copyright (C) 2009-2014 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_LANGINFO_H], +[ + AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) + + dnl Persuade glibc-2.0.6 to define CODESET. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([langinfo.h]) + + dnl Determine whether exists. It is missing on mingw and BeOS. + HAVE_LANGINFO_CODESET=0 + HAVE_LANGINFO_T_FMT_AMPM=0 + HAVE_LANGINFO_ERA=0 + HAVE_LANGINFO_YESEXPR=0 + AC_CHECK_HEADERS_ONCE([langinfo.h]) + if test $ac_cv_header_langinfo_h = yes; then + HAVE_LANGINFO_H=1 + dnl Determine what defines. CODESET and ERA etc. are missing + dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3. + AC_CACHE_CHECK([whether langinfo.h defines CODESET], + [gl_cv_header_langinfo_codeset], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include +int a = CODESET; +]])], + [gl_cv_header_langinfo_codeset=yes], + [gl_cv_header_langinfo_codeset=no]) + ]) + if test $gl_cv_header_langinfo_codeset = yes; then + HAVE_LANGINFO_CODESET=1 + fi + AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM], + [gl_cv_header_langinfo_t_fmt_ampm], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include +int a = T_FMT_AMPM; +]])], + [gl_cv_header_langinfo_t_fmt_ampm=yes], + [gl_cv_header_langinfo_t_fmt_ampm=no]) + ]) + if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then + HAVE_LANGINFO_T_FMT_AMPM=1 + fi + AC_CACHE_CHECK([whether langinfo.h defines ERA], + [gl_cv_header_langinfo_era], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include +int a = ERA; +]])], + [gl_cv_header_langinfo_era=yes], + [gl_cv_header_langinfo_era=no]) + ]) + if test $gl_cv_header_langinfo_era = yes; then + HAVE_LANGINFO_ERA=1 + fi + AC_CACHE_CHECK([whether langinfo.h defines YESEXPR], + [gl_cv_header_langinfo_yesexpr], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include +int a = YESEXPR; +]])], + [gl_cv_header_langinfo_yesexpr=yes], + [gl_cv_header_langinfo_yesexpr=no]) + ]) + if test $gl_cv_header_langinfo_yesexpr = yes; then + HAVE_LANGINFO_YESEXPR=1 + fi + else + HAVE_LANGINFO_H=0 + fi + AC_SUBST([HAVE_LANGINFO_H]) + AC_SUBST([HAVE_LANGINFO_CODESET]) + AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM]) + AC_SUBST([HAVE_LANGINFO_ERA]) + AC_SUBST([HAVE_LANGINFO_YESEXPR]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [nl_langinfo]) +]) + +AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_LANGINFO_H_DEFAULTS], +[ + GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO]) + REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO]) +]) diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4 new file mode 100644 index 0000000..a1b564a --- /dev/null +++ b/gl/m4/largefile.m4 @@ -0,0 +1,146 @@ +# Enable large files on systems where this is not the default. + +# Copyright 1992-1996, 1998-2014 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.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 +# ------------------------------- +m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], +[@%:@include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]];[]dnl +]) + + +# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, +# CACHE-VAR, +# DESCRIPTION, +# PROLOGUE, [FUNCTION-BODY]) +# -------------------------------------------------------- +m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], +[AC_CACHE_CHECK([for $1 value needed for large files], [$3], +[while :; do + m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( + [AC_LANG_PROGRAM([$5], [$6])], + [$3=no; break]) + m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( + [AC_LANG_PROGRAM([@%:@define $1 $2 +$5], [$6])], + [$3=$2; break]) + $3=unknown + break +done]) +case $$3 in #( + no | unknown) ;; + *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);; +esac +rm -rf conftest*[]dnl +])# _AC_SYS_LARGEFILE_MACRO_VALUE + + +# AC_SYS_LARGEFILE +# ---------------- +# By default, many hosts won't let programs access large files; +# one must use special compiler options to get large-file access to work. +# For more details about this brain damage please see: +# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html +AC_DEFUN([AC_SYS_LARGEFILE], +[AC_ARG_ENABLE(largefile, + [ --disable-largefile omit support for large files]) +if test "$enable_largefile" != no; then + + AC_CACHE_CHECK([for special C compiler options needed for large files], + ac_cv_sys_largefile_CC, + [ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) + AC_COMPILE_IFELSE([], [break]) + CC="$CC -n32" + AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi]) + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, + ac_cv_sys_file_offset_bits, + [Number of bits in a file offset, on hosts where this is settable.], + [_AC_SYS_LARGEFILE_TEST_INCLUDES]) + if test $ac_cv_sys_file_offset_bits = unknown; then + _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, + ac_cv_sys_large_files, + [Define for large files, on AIX-style hosts.], + [_AC_SYS_LARGEFILE_TEST_INCLUDES]) + fi + + 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.70 + +# Enable large files on systems where this is implemented by Gnulib, not by the +# system headers. +# Set the variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE if Gnulib +# overrides ensure that off_t or 'struct size.st_size' are 64-bit, respectively. +AC_DEFUN([gl_LARGEFILE], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + mingw*) + dnl Native Windows. + dnl mingw64 defines off_t to a 64-bit type already, if + dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE. + AC_CACHE_CHECK([for 64-bit off_t], [gl_cv_type_off_t_64], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; + ]], + [[]])], + [gl_cv_type_off_t_64=yes], [gl_cv_type_off_t_64=no]) + ]) + if test $gl_cv_type_off_t_64 = no; then + WINDOWS_64_BIT_OFF_T=1 + else + WINDOWS_64_BIT_OFF_T=0 + fi + dnl But all native Windows platforms (including mingw64) have a 32-bit + dnl st_size member in 'struct stat'. + WINDOWS_64_BIT_ST_SIZE=1 + ;; + *) + dnl Nothing to do on gnulib's side. + dnl A 64-bit off_t is + 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, + dnl - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX, + dnl - impossible to achieve on Minix 3.1.8. + WINDOWS_64_BIT_OFF_T=0 + WINDOWS_64_BIT_ST_SIZE=0 + ;; + esac +]) diff --git a/gl/m4/lcmessage.m4 b/gl/m4/lcmessage.m4 new file mode 100644 index 0000000..7470ec5 --- /dev/null +++ b/gl/m4/lcmessage.m4 @@ -0,0 +1,35 @@ +# lcmessage.m4 serial 7 (gettext-0.18.2) +dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014 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, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +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 Authors: +dnl Ulrich Drepper , 1995. + +# Check whether LC_MESSAGES is available in . + +AC_DEFUN([gt_LC_MESSAGES], +[ + AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[return LC_MESSAGES]])], + [gt_cv_val_LC_MESSAGES=yes], + [gt_cv_val_LC_MESSAGES=no])]) + if test $gt_cv_val_LC_MESSAGES = yes; then + AC_DEFINE([HAVE_LC_MESSAGES], [1], + [Define if your file defines LC_MESSAGES.]) + fi +]) diff --git a/gl/m4/lib-ld.m4 b/gl/m4/lib-ld.m4 new file mode 100644 index 0000000..ddc569f --- /dev/null +++ b/gl/m4/lib-ld.m4 @@ -0,0 +1,119 @@ +# lib-ld.m4 serial 6 +dnl Copyright (C) 1996-2003, 2009-2014 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/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid +dnl collision with libtool.m4. + +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 lds only accept -v. +case `$LD -v 2>&1 /dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || 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 $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + 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" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL([acl_cv_path_LD], +[if test -z "$LD"; then + 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 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 = 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE([rpath], + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_FROMPACKAGE(name, package) +dnl declares that libname comes from the given package. The configure file +dnl will then not have a --with-libname-prefix option but a +dnl --with-package-prefix option. Several libraries can come from the same +dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar +dnl macro call that searches for libname. +AC_DEFUN([AC_LIB_FROMPACKAGE], +[ + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_frompackage_]NAME, [$2]) + popdef([NAME]) + pushdef([PACK],[$2]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + define([acl_libsinpackage_]PACKUP, + m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) + popdef([PACKUP]) + popdef([PACK]) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) + pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) + pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) + dnl Autoconf >= 2.61 supports dots in --with options. + pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH(P_A_C_K[-prefix], +[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + if test "$acl_libdirstem2" != "$acl_libdirstem" \ + && ! test -d "$withval/$acl_libdirstem"; then + additional_libdir="$withval/$acl_libdirstem2" + fi + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been + dnl computed. So it has to be reset here. + HAVE_LIB[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi + popdef([P_A_C_K]) + popdef([PACKLIBS]) + popdef([PACKUP]) + popdef([PACK]) + popdef([NAME]) +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem" \ + && test "X$dir" != "X/usr/$acl_libdirstem2"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) diff --git a/gl/m4/lib-prefix.m4 b/gl/m4/lib-prefix.m4 new file mode 100644 index 0000000..31f49e4 --- /dev/null +++ b/gl/m4/lib-prefix.m4 @@ -0,0 +1,224 @@ +# lib-prefix.m4 serial 7 (gettext-0.18) +dnl Copyright (C) 2001-2005, 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates +dnl - a variable acl_libdirstem, containing the basename of the libdir, either +dnl "lib" or "lib64" or "lib/64", +dnl - a variable acl_libdirstem2, as a secondary possible value for +dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or +dnl "lib/amd64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. + dnl On glibc systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine + dnl the compiler's default mode by looking at the compiler's library search + dnl path. If at least one of its elements ends in /lib64 or points to a + dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. + dnl Otherwise we use the default, namely "lib". + dnl On Solaris systems, the current practice is that on a system supporting + dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under + dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or + dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. + AC_REQUIRE([AC_CANONICAL_HOST]) + acl_libdirstem=lib + acl_libdirstem2= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], + [AC_EGREP_CPP([sixtyfour bits], [ +#ifdef _LP64 +sixtyfour bits +#endif + ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) + ]) + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem2=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" +]) diff --git a/gl/m4/libunistring-base.m4 b/gl/m4/libunistring-base.m4 new file mode 100644 index 0000000..d003267 --- /dev/null +++ b/gl/m4/libunistring-base.m4 @@ -0,0 +1,141 @@ +# libunistring-base.m4 serial 5 +dnl Copyright (C) 2010-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paolo Bonzini and Bruno Haible. + +dnl gl_LIBUNISTRING_MODULE([VERSION], [Module]) +dnl Declares that the source files of Module should be compiled, unless we +dnl are linking with libunistring and its version is >= the given VERSION. +dnl Defines an automake conditional LIBUNISTRING_COMPILE_$MODULE that is +dnl true if the source files of Module should be compiled. +dnl This macro is to be used for public libunistring API, not for +dnl undocumented API. +dnl +dnl You have to bump the VERSION argument to the next projected version +dnl number each time you make a change that affects the behaviour of the +dnl functions defined in Module (even if the sources of Module itself do not +dnl change). + +AC_DEFUN([gl_LIBUNISTRING_MODULE], +[ + AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) + dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from + dnl gl_LIBUNISTRING_CORE if that macro has been run. + AM_CONDITIONAL(AS_TR_CPP([LIBUNISTRING_COMPILE_$2]), + [gl_LIBUNISTRING_VERSION_CMP([$1])]) +]) + +dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile]) +dnl Declares that HeaderFile should be created, unless we are linking +dnl with libunistring and its version is >= the given VERSION. +dnl HeaderFile should be relative to the lib directory and end in '.h'. +dnl Prepares for substituting LIBUNISTRING_HEADERFILE (to HeaderFile or empty). +dnl +dnl When we are linking with the already installed libunistring and its version +dnl is < VERSION, we create HeaderFile here, because we may compile functions +dnl (via gl_LIBUNISTRING_MODULE above) that are not contained in the installed +dnl version. +dnl When we are linking with the already installed libunistring and its version +dnl is > VERSION, we don't create HeaderFile here: it could cause compilation +dnl errors in other libunistring header files if some types are missing. +dnl +dnl You have to bump the VERSION argument to the next projected version +dnl number each time you make a non-comment change to the HeaderFile. + +AC_DEFUN([gl_LIBUNISTRING_LIBHEADER], +[ + AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) + dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from + dnl gl_LIBUNISTRING_CORE if that macro has been run. + if gl_LIBUNISTRING_VERSION_CMP([$1]); then + LIBUNISTRING_[]AS_TR_CPP([$2])='$2' + else + LIBUNISTRING_[]AS_TR_CPP([$2])= + fi + AC_SUBST([LIBUNISTRING_]AS_TR_CPP([$2])) +]) + +dnl Miscellaneous preparations/initializations. + +AC_DEFUN([gl_LIBUNISTRING_LIB_PREPARE], +[ + dnl Ensure that HAVE_LIBUNISTRING is fully determined at this point. + m4_ifdef([gl_LIBUNISTRING], [AC_REQUIRE([gl_LIBUNISTRING])]) + + AC_REQUIRE([AC_PROG_AWK]) + +dnl Sed expressions to extract the parts of a version number. +changequote(,) +gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' +gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' +gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} +i\ +0 +q +' +changequote([,]) + + if test "$HAVE_LIBUNISTRING" = yes; then + LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` + LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` + LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` + fi +]) + +dnl gl_LIBUNISTRING_VERSION_CMP([VERSION]) +dnl Expands to a shell statement that evaluates to true if LIBUNISTRING_VERSION +dnl is less than the VERSION argument. +AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP], +[ { test "$HAVE_LIBUNISTRING" != yes \ + || { + dnl AS_LITERAL_IF exists and works fine since autoconf-2.59 at least. + AS_LITERAL_IF([$1], + [dnl This is the optimized variant, that assumes the argument is a literal: + m4_pushdef([requested_version_major], + [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^\([0-9]*\).*], [\1]), [])]) + m4_pushdef([requested_version_minor], + [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.]\([0-9]*\).*], [\1]), [$1])]) + m4_pushdef([requested_version_subminor], + [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.][0-9]*[.]\([0-9]*\).*], [\1]), [$1])]) + test $LIBUNISTRING_VERSION_MAJOR -lt requested_version_major \ + || { test $LIBUNISTRING_VERSION_MAJOR -eq requested_version_major \ + && { test $LIBUNISTRING_VERSION_MINOR -lt requested_version_minor \ + || { test $LIBUNISTRING_VERSION_MINOR -eq requested_version_minor \ + && test $LIBUNISTRING_VERSION_SUBMINOR -lt requested_version_subminor + } + } + } + m4_popdef([requested_version_subminor]) + m4_popdef([requested_version_minor]) + m4_popdef([requested_version_major]) + ], + [dnl This is the unoptimized variant: + requested_version_major=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_major"` + requested_version_minor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_minor"` + requested_version_subminor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_subminor"` + test $LIBUNISTRING_VERSION_MAJOR -lt $requested_version_major \ + || { test $LIBUNISTRING_VERSION_MAJOR -eq $requested_version_major \ + && { test $LIBUNISTRING_VERSION_MINOR -lt $requested_version_minor \ + || { test $LIBUNISTRING_VERSION_MINOR -eq $requested_version_minor \ + && test $LIBUNISTRING_VERSION_SUBMINOR -lt $requested_version_subminor + } + } + } + ]) + } + }]) + +dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the +dnl same as ORIG, otherwise to 0. +m4_define([gl_LIBUNISTRING_ARG_OR_ZERO], [m4_if([$1], [$2], [0], [$1])]) diff --git a/gl/m4/localcharset.m4 b/gl/m4/localcharset.m4 new file mode 100644 index 0000000..ada2f01 --- /dev/null +++ b/gl/m4/localcharset.m4 @@ -0,0 +1,17 @@ +# localcharset.m4 serial 7 +dnl Copyright (C) 2002, 2004, 2006, 2009-2014 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_LOCALCHARSET], +[ + dnl Prerequisites of lib/localcharset.c. + AC_REQUIRE([AM_LANGINFO_CODESET]) + AC_REQUIRE([gl_FCNTL_O_FLAGS]) + AC_CHECK_DECLS_ONCE([getc_unlocked]) + + dnl Prerequisites of the lib/Makefile.am snippet. + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_GLIBC21]) +]) diff --git a/gl/m4/locale-fr.m4 b/gl/m4/locale-fr.m4 new file mode 100644 index 0000000..27db5ab --- /dev/null +++ b/gl/m4/locale-fr.m4 @@ -0,0 +1,250 @@ +# locale-fr.m4 serial 17 +dnl Copyright (C) 2003, 2005-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Determine the name of a french locale with traditional encoding. +AC_DEFUN([gt_LOCALE_FR], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_LANGINFO_CODESET]) + AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [ + AC_LANG_CONFTEST([AC_LANG_SOURCE([ +changequote(,)dnl +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { + /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else + if (setlocale (LC_ALL, "") == NULL) return 1; +#endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +#if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +#endif +#ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#endif + /* Check whether in the abbreviation of the second month, the second + character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only + one byte long. This excludes the UTF-8 encoding. */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ + /* Check whether the decimal separator is a comma. + On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point + are nl_langinfo(RADIXCHAR) are both ".". */ + if (localeconv () ->decimal_point[0] != ',') return 1; +#endif + return 0; +} +changequote([,])dnl + ])]) + if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the native Windows locale name. + if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=French_France.1252 + else + # None found. + gt_cv_locale_fr=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.ISO-8859-1 + else + # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. + if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.ISO8859-1 + else + # Test for the HP-UX locale name. + if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr_FR.iso88591 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr=fr + else + # None found. + gt_cv_locale_fr=none + fi + fi + fi + fi + fi + ;; + esac + fi + rm -fr conftest* + ]) + LOCALE_FR=$gt_cv_locale_fr + AC_SUBST([LOCALE_FR]) +]) + +dnl Determine the name of a french locale with UTF-8 encoding. +AC_DEFUN([gt_LOCALE_FR_UTF8], +[ + AC_REQUIRE([AM_LANGINFO_CODESET]) + AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [ + AC_LANG_CONFTEST([AC_LANG_SOURCE([ +changequote(,)dnl +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { + /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. */ +#if !(defined __BEOS__ || defined __HAIKU__) + /* Check whether the given locale name is recognized by the system. */ +# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +# else + if (setlocale (LC_ALL, "") == NULL) return 1; +# endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. */ +# if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + return 1; + } +# endif +# ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +# endif + /* Check whether in the abbreviation of the second month, the second + character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is + two bytes long, with UTF-8 encoding. */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%b", &t) < 4 + || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') + return 1; +#endif +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ + /* Check whether the decimal separator is a comma. + On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point + are nl_langinfo(RADIXCHAR) are both ".". */ + if (localeconv () ->decimal_point[0] != ',') return 1; +#endif + return 0; +} +changequote([,])dnl + ])]) + if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=French_France.65001 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr_FR.UTF-8 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_fr_utf8=fr.UTF-8 + else + # None found. + gt_cv_locale_fr_utf8=none + fi + fi + fi + ;; + esac + fi + rm -fr conftest* + ]) + LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 + AC_SUBST([LOCALE_FR_UTF8]) +]) diff --git a/gl/m4/locale-ja.m4 b/gl/m4/locale-ja.m4 new file mode 100644 index 0000000..c88fe8b --- /dev/null +++ b/gl/m4/locale-ja.m4 @@ -0,0 +1,136 @@ +# locale-ja.m4 serial 12 +dnl Copyright (C) 2003, 2005-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Determine the name of a japanese locale with EUC-JP encoding. +AC_DEFUN([gt_LOCALE_JA], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_LANGINFO_CODESET]) + AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [ + AC_LANG_CONFTEST([AC_LANG_SOURCE([ +changequote(,)dnl +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () +{ + const char *p; + /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else + if (setlocale (LC_ALL, "") == NULL) return 1; +#endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +#if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +#endif +#ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#endif + /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales + on Cygwin 1.5.x. */ + if (MB_CUR_MAX == 1) + return 1; + /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. + This excludes the UTF-8 encoding (except on MirBSD). */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + return 0; +} +changequote([,])dnl + ])]) + if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Note that on native Windows, the Japanese locale is + # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we + # cannot use it here. + gt_cv_locale_ja=none + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the AIX locale name. + if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.EUC-JP + else + # Test for the HP-UX, OSF/1, NetBSD locale name. + if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.eucJP + else + # Test for the IRIX, FreeBSD locale name. + if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja_JP.EUC + else + # Test for the Solaris 7 locale name. + if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_ja=ja + else + # Special test for NetBSD 1.6. + if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then + gt_cv_locale_ja=ja_JP.eucJP + else + # None found. + gt_cv_locale_ja=none + fi + fi + fi + fi + fi + fi + ;; + esac + fi + rm -fr conftest* + ]) + LOCALE_JA=$gt_cv_locale_ja + AC_SUBST([LOCALE_JA]) +]) diff --git a/gl/m4/locale-tr.m4 b/gl/m4/locale-tr.m4 new file mode 100644 index 0000000..535b256 --- /dev/null +++ b/gl/m4/locale-tr.m4 @@ -0,0 +1,127 @@ +# locale-tr.m4 serial 10 +dnl Copyright (C) 2003, 2005-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Determine the name of a turkish locale with UTF-8 encoding. +AC_DEFUN([gt_LOCALE_TR_UTF8], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_LANGINFO_CODESET]) + AC_CACHE_CHECK([for a turkish Unicode locale], [gt_cv_locale_tr_utf8], [ + AC_LANG_CONFTEST([AC_LANG_SOURCE([ +changequote(,)dnl +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () { + /* On BeOS, locales are not implemented in libc. Rather, libintl + imitates locale dependent behaviour by looking at the environment + variables, and all locales use the UTF-8 encoding. But BeOS does not + implement the Turkish upper-/lowercase mappings. Therefore, let this + program return 1 on BeOS. */ + /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else + if (setlocale (LC_ALL, "") == NULL) return 1; +#endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. */ +#if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) + return 1; + } +#endif +#ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#endif + /* Check whether in the abbreviation of the eighth month, the second + character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is + two bytes long, with UTF-8 encoding. */ + t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; + if (strftime (buf, sizeof (buf), "%b", &t) < 4 + || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) + return 1; + /* Check whether the upper-/lowercase mappings are as expected for + Turkish. */ + if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' + || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) + return 1; + return 0; +} +changequote([,])dnl + ])]) + if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=Turkish_Turkey.65001 + else + # None found. + gt_cv_locale_tr_utf8=none + fi + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the usual locale name. + if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr_TR + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr_TR.UTF-8 + else + # Test for the Solaris 7 locale name. + if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_tr_utf8=tr.UTF-8 + else + # None found. + gt_cv_locale_tr_utf8=none + fi + fi + fi + ;; + esac + else + gt_cv_locale_tr_utf8=none + fi + rm -fr conftest* + ]) + LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 + AC_SUBST([LOCALE_TR_UTF8]) +]) diff --git a/gl/m4/locale-zh.m4 b/gl/m4/locale-zh.m4 new file mode 100644 index 0000000..d3b2347 --- /dev/null +++ b/gl/m4/locale-zh.m4 @@ -0,0 +1,130 @@ +# locale-zh.m4 serial 12 +dnl Copyright (C) 2003, 2005-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl Determine the name of a chinese locale with GB18030 encoding. +AC_DEFUN([gt_LOCALE_ZH_CN], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_LANGINFO_CODESET]) + AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [ + AC_LANG_CONFTEST([AC_LANG_SOURCE([ +changequote(,)dnl +#include +#include +#include +#if HAVE_LANGINFO_CODESET +# include +#endif +#include +#include +struct tm t; +char buf[16]; +int main () +{ + const char *p; + /* Check whether the given locale name is recognized by the system. */ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, setlocale(category, "") looks at the system settings, + not at the environment variables. Also, when an encoding suffix such + as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE + category of the locale to "C". */ + if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL + || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) + return 1; +#else + if (setlocale (LC_ALL, "") == NULL) return 1; +#endif + /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". + On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) + is empty, and the behaviour of Tcl 8.4 in this locale is not useful. + On OpenBSD 4.0, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "646". In this situation, + some unit tests fail. + On MirBSD 10, when an unsupported locale is specified, setlocale() + succeeds but then nl_langinfo(CODESET) is "UTF-8". */ +#if HAVE_LANGINFO_CODESET + { + const char *cs = nl_langinfo (CODESET); + if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 + || strcmp (cs, "UTF-8") == 0) + return 1; + } +#endif +#ifdef __CYGWIN__ + /* On Cygwin, avoid locale names without encoding suffix, because the + locale_charset() function relies on the encoding suffix. Note that + LC_ALL is set on the command line. */ + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; +#endif + /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. + This excludes the UTF-8 encoding (except on MirBSD). */ + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; + /* Check whether a typical GB18030 multibyte sequence is recognized as a + single wide character. This excludes the GB2312 and GBK encodings. */ + if (mblen ("\203\062\332\066", 5) != 4) + return 1; + return 0; +} +changequote([,])dnl + ])]) + if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then + case "$host_os" in + # Handle native Windows specially, because there setlocale() interprets + # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", + # "fr" or "fra" as "French" or "French_France.1252", + # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) + # Test for the hypothetical native Windows locale name. + if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=Chinese_China.54936 + else + # None found. + gt_cv_locale_zh_CN=none + fi + ;; + solaris2.8) + # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are + # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. + # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. + gt_cv_locale_zh_CN=none + ;; + *) + # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because + # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the + # configure script would override the LC_ALL setting. Likewise for + # LC_CTYPE, which is also set at the beginning of the configure script. + # Test for the locale name without encoding suffix. + if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN + else + # Test for the locale name with explicit encoding suffix. + if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then + gt_cv_locale_zh_CN=zh_CN.GB18030 + else + # None found. + gt_cv_locale_zh_CN=none + fi + fi + ;; + esac + else + # If there was a link error, due to mblen(), the system is so old that + # it certainly doesn't have a chinese locale. + gt_cv_locale_zh_CN=none + fi + rm -fr conftest* + ]) + LOCALE_ZH_CN=$gt_cv_locale_zh_CN + AC_SUBST([LOCALE_ZH_CN]) +]) diff --git a/gl/m4/locale_h.m4 b/gl/m4/locale_h.m4 new file mode 100644 index 0000000..2838588 --- /dev/null +++ b/gl/m4/locale_h.m4 @@ -0,0 +1,122 @@ +# locale_h.m4 serial 19 +dnl Copyright (C) 2007, 2009-2014 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_LOCALE_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_LOCALE_H_DEFAULTS]) + + dnl Persuade glibc to define locale_t and the int_p_*, int_n_* + dnl members of 'struct lconv'. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + dnl If is replaced, then must also be replaced. + AC_REQUIRE([gl_STDDEF_H]) + + dnl Solaris 11 2011-11 defines the int_p_*, int_n_* members of 'struct lconv' + dnl only if _LCONV_C99 is defined. + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + solaris*) + AC_DEFINE([_LCONV_C99], [1], [Define to 1 on Solaris.]) + ;; + esac + + AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001], + [gl_cv_header_locale_h_posix2001], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + int x = LC_MESSAGES; + int y = sizeof (((struct lconv *) 0)->decimal_point);]], + [[]])], + [gl_cv_header_locale_h_posix2001=yes], + [gl_cv_header_locale_h_posix2001=no])]) + + dnl Check for . + AC_CHECK_HEADERS_ONCE([xlocale.h]) + if test $ac_cv_header_xlocale_h = yes; then + HAVE_XLOCALE_H=1 + dnl Check whether use of locale_t requires inclusion of , + dnl e.g. on Mac OS X 10.5. If does not define locale_t by + dnl itself, we assume that will do so. + AC_CACHE_CHECK([whether locale.h defines locale_t], + [gl_cv_header_locale_has_locale_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + locale_t x;]], + [[]])], + [gl_cv_header_locale_has_locale_t=yes], + [gl_cv_header_locale_has_locale_t=no]) + ]) + if test $gl_cv_header_locale_has_locale_t = yes; then + gl_cv_header_locale_h_needs_xlocale_h=no + else + gl_cv_header_locale_h_needs_xlocale_h=yes + fi + else + HAVE_XLOCALE_H=0 + gl_cv_header_locale_h_needs_xlocale_h=no + fi + AC_SUBST([HAVE_XLOCALE_H]) + + dnl Check whether 'struct lconv' is complete. + dnl Bionic libc's 'struct lconv' is just a dummy. + dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x, + dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members. + AC_CACHE_CHECK([whether struct lconv is properly defined], + [gl_cv_sys_struct_lconv_ok], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + struct lconv l; + int x = sizeof (l.decimal_point); + int y = sizeof (l.int_p_cs_precedes);]], + [[]])], + [gl_cv_sys_struct_lconv_ok=yes], + [gl_cv_sys_struct_lconv_ok=no]) + ]) + if test $gl_cv_sys_struct_lconv_ok = no; then + REPLACE_STRUCT_LCONV=1 + fi + + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_NEXT_HEADERS([locale.h]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include +/* Some systems provide declarations in a non-standard header. */ +#if HAVE_XLOCALE_H +# include +#endif + ]], + [setlocale duplocale]) +]) + +AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_LOCALE_H_DEFAULTS], +[ + GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV]) + GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE]) + GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE]) + REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV]) + REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE]) + REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE]) + REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV]) +]) diff --git a/gl/m4/localeconv.m4 b/gl/m4/localeconv.m4 new file mode 100644 index 0000000..1fd2919 --- /dev/null +++ b/gl/m4/localeconv.m4 @@ -0,0 +1,22 @@ +# localeconv.m4 serial 1 +dnl Copyright (C) 2012-2014 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_LOCALECONV], +[ + AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) + AC_REQUIRE([gl_LOCALE_H]) + + if test $REPLACE_STRUCT_LCONV = 1; then + REPLACE_LOCALECONV=1 + fi +]) + +# Prerequisites of lib/localeconv.c. +AC_DEFUN([gl_PREREQ_LOCALECONV], +[ + AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [], + [[#include ]]) +]) diff --git a/gl/m4/localename.m4 b/gl/m4/localename.m4 new file mode 100644 index 0000000..d865c66 --- /dev/null +++ b/gl/m4/localename.m4 @@ -0,0 +1,12 @@ +# localename.m4 serial 2 +dnl Copyright (C) 2007, 2009-2014 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_LOCALENAME], +[ + AC_REQUIRE([gt_LC_MESSAGES]) + AC_REQUIRE([gt_INTL_MACOSX]) + AC_CHECK_FUNCS([setlocale uselocale]) +]) diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4 new file mode 100644 index 0000000..73a3c54 --- /dev/null +++ b/gl/m4/lock.m4 @@ -0,0 +1,42 @@ +# lock.m4 serial 13 (gettext-0.18.2) +dnl Copyright (C) 2005-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([gl_LOCK], +[ + AC_REQUIRE([gl_THREADLIB]) + if test "$gl_threads_api" = posix; then + # 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], + [Define if the POSIX multithreading library has read/write locks.])], + [], + [#include ]) + # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [[#include ]], + [[ +#if __FreeBSD__ == 4 +error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) +error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." +#else +int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !x; +#endif + ]])], + [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], + [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) + fi + gl_PREREQ_LOCK +]) + +# Prerequisites of lib/glthread/lock.c. +AC_DEFUN([gl_PREREQ_LOCK], [:]) diff --git a/gl/m4/longlong.m4 b/gl/m4/longlong.m4 new file mode 100644 index 0000000..eefb37c --- /dev/null +++ b/gl/m4/longlong.m4 @@ -0,0 +1,113 @@ +# longlong.m4 serial 17 +dnl Copyright (C) 1999-2007, 2009-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_LONG_LONG_INT if 'long long int' works. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. + +# Note: If the type 'long long int' exists but is only 32 bits large +# (as on some very old compilers), HAVE_LONG_LONG_INT will not be +# defined. In this case you can treat 'long long int' like 'long int'. + +AC_DEFUN([AC_TYPE_LONG_LONG_INT], +[ + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], + [ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. + dnl If cross compiling, assume the bug is not important, since + dnl nobody cross compiles for this platform as far as we know. + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[@%:@include + @%:@ifndef LLONG_MAX + @%:@ define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + @%:@ define LLONG_MAX (HALF - 1 + HALF) + @%:@endif]], + [[long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0;]])], + [], + [ac_cv_type_long_long_int=no], + [:]) + fi + fi]) + if test $ac_cv_type_long_long_int = yes; then + AC_DEFINE([HAVE_LONG_LONG_INT], [1], + [Define to 1 if the system has the type 'long long int'.]) + fi +]) + +# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. + +# Note: If the type 'unsigned long long int' exists but is only 32 bits +# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT +# will not be defined. In this case you can treat 'unsigned long long int' +# like 'unsigned long int'. + +AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], +[ + AC_CACHE_CHECK([for unsigned long long int], + [ac_cv_type_unsigned_long_long_int], + [ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + AC_LINK_IFELSE( + [_AC_TYPE_LONG_LONG_SNIPPET], + [], + [ac_cv_type_unsigned_long_long_int=no]) + fi]) + if test $ac_cv_type_unsigned_long_long_int = yes; then + AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], + [Define to 1 if the system has the type 'unsigned long long int'.]) + fi +]) + +# Expands to a C program that can be used to test for simultaneous support +# of 'long long' and 'unsigned long long'. We don't want to say that +# 'long long' is available if 'unsigned long long' is not, or vice versa, +# because too many programs rely on the symmetry between signed and unsigned +# integer types (excluding 'bool'). +AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], +[ + AC_LANG_PROGRAM( + [[/* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63;]], + [[/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull));]]) +]) diff --git a/gl/m4/ls-mntd-fs.m4 b/gl/m4/ls-mntd-fs.m4 new file mode 100644 index 0000000..a5e169b --- /dev/null +++ b/gl/m4/ls-mntd-fs.m4 @@ -0,0 +1,357 @@ +# serial 30 +# How to list mounted file systems. + +# Copyright (C) 1998-2004, 2006, 2009-2014 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. + +dnl From Jim Meyering. +dnl +dnl This is not pretty. I've just taken the autoconf code and wrapped +dnl it in an AC_DEFUN and made some other fixes. +dnl + +# Replace Autoconf's AC_FUNC_GETMNTENT to work around a bug in Autoconf +# through Autoconf 2.59. We can remove this once we assume Autoconf 2.60 +# or later. +AC_DEFUN([AC_FUNC_GETMNTENT], +[# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, +# -lseq on Dynix/PTX, -lgen on Unixware. +AC_SEARCH_LIBS([getmntent], [sun seq gen]) +AC_CHECK_FUNCS([getmntent]) +]) + +# gl_LIST_MOUNTED_FILE_SYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS], + [ +AC_CHECK_FUNCS([listmntent getmntinfo]) +AC_CHECK_HEADERS_ONCE([sys/param.h sys/statvfs.h]) + +# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses +# NGROUPS (as the array dimension for a struct member) without a definition. +AC_CHECK_HEADERS([sys/ucred.h], [], [], [#include ]) + +AC_CHECK_HEADERS([sys/mount.h], [], [], + [AC_INCLUDES_DEFAULT + [#if HAVE_SYS_PARAM_H + #include + #endif]]) + +AC_CHECK_HEADERS([mntent.h sys/fs_types.h]) + getfsstat_includes="\ +$ac_includes_default +#if HAVE_SYS_PARAM_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +#if HAVE_SYS_UCRED_H +# include /* needed for definition of NGROUPS */ +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_FS_TYPES_H +# include /* needed by powerpc-apple-darwin1.3.7 */ +#endif +" +AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes]) + +# Determine how to get the list of mounted file systems. +ac_list_mounted_fs= + +# If the getmntent function is available but not in the standard library, +# make sure LIBS contains the appropriate -l option. +AC_FUNC_GETMNTENT + +# This test must precede the ones for getmntent because Unicos-9 is +# reported to have the getmntent function, but its support is incompatible +# with other getmntent implementations. + +# NOTE: Normally, I wouldn't use a check for system type as I've done for +# 'CRAY' below since that goes against the whole autoconf philosophy. But +# I think there is too great a chance that some non-Cray system has a +# function named listmntent to risk the false positive. + +if test -z "$ac_list_mounted_fs"; then + # Cray UNICOS 9 + AC_MSG_CHECKING([for listmntent of Cray/Unicos-9]) + AC_CACHE_VAL([fu_cv_sys_mounted_cray_listmntent], + [fu_cv_sys_mounted_cray_listmntent=no + AC_EGREP_CPP([yes], + [#ifdef _CRAY +yes +#endif + ], [test $ac_cv_func_listmntent = yes \ + && fu_cv_sys_mounted_cray_listmntent=yes] + ) + ] + ) + AC_MSG_RESULT([$fu_cv_sys_mounted_cray_listmntent]) + if test $fu_cv_sys_mounted_cray_listmntent = yes; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_LISTMNTENT], [1], + [Define if there is a function named listmntent that can be used to + list all mounted file systems. (UNICOS)]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # AIX. + AC_MSG_CHECKING([for mntctl function and struct vmount]) + AC_CACHE_VAL([fu_cv_sys_mounted_vmount], + [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], + [fu_cv_sys_mounted_vmount=yes], + [fu_cv_sys_mounted_vmount=no])]) + AC_MSG_RESULT([$fu_cv_sys_mounted_vmount]) + if test $fu_cv_sys_mounted_vmount = yes; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_VMOUNT], [1], + [Define if there is a function named mntctl that can be used to read + the list of mounted file systems, and there is a system header file + that declares 'struct vmount'. (AIX)]) + fi +fi + +if test $ac_cv_func_getmntent = yes; then + + # This system has the getmntent function. + # Determine whether it's the one-argument variant or the two-argument one. + + if test -z "$ac_list_mounted_fs"; then + # 4.3BSD, SunOS, HP-UX, Dynix, Irix + AC_MSG_CHECKING([for one-argument getmntent function]) + AC_CACHE_VAL([fu_cv_sys_mounted_getmntent1], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ +#include + +#include +#if !defined MOUNTED +# if defined _PATH_MOUNTED /* GNU libc */ +# define MOUNTED _PATH_MOUNTED +# endif +# if defined MNT_MNTTAB /* HP-UX. */ +# define MOUNTED MNT_MNTTAB +# endif +# if defined MNTTABNAME /* Dynix. */ +# define MOUNTED MNTTABNAME +# endif +#endif +]], + [[ struct mntent *mnt = 0; char *table = MOUNTED; + if (sizeof mnt && sizeof table) return 0;]])], + [fu_cv_sys_mounted_getmntent1=yes], + [fu_cv_sys_mounted_getmntent1=no])]) + AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent1]) + if test $fu_cv_sys_mounted_getmntent1 = yes; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_GETMNTENT1], [1], + [Define if there is a function named getmntent for reading the list + of mounted file systems, and that function takes a single argument. + (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) + fi + fi + + if test -z "$ac_list_mounted_fs"; then + # SVR4 + AC_MSG_CHECKING([for two-argument getmntent function]) + AC_CACHE_VAL([fu_cv_sys_mounted_getmntent2], + [AC_EGREP_HEADER([getmntent], [sys/mnttab.h], + fu_cv_sys_mounted_getmntent2=yes, + fu_cv_sys_mounted_getmntent2=no)]) + AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent2]) + if test $fu_cv_sys_mounted_getmntent2 = yes; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_GETMNTENT2], [1], + [Define if there is a function named getmntent for reading the list of + mounted file systems, and that function takes two arguments. (SVR4)]) + AC_CHECK_FUNCS([hasmntopt]) + fi + fi + +fi + +if test -z "$ac_list_mounted_fs"; then + # DEC Alpha running OSF/1, and Apple Darwin 1.3. + # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h + + AC_MSG_CHECKING([for getfsstat function]) + AC_CACHE_VAL([fu_cv_sys_mounted_getfsstat], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include +#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME +# define FS_TYPE(Ent) ((Ent).f_fstypename) +#else +# define FS_TYPE(Ent) mnt_names[(Ent).f_type] +#endif +$getfsstat_includes]] +, + [[struct statfs *stats; + int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); + char *t = FS_TYPE (*stats); ]])], + [fu_cv_sys_mounted_getfsstat=yes], + [fu_cv_sys_mounted_getfsstat=no])]) + AC_MSG_RESULT([$fu_cv_sys_mounted_getfsstat]) + if test $fu_cv_sys_mounted_getfsstat = yes; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_GETFSSTAT], [1], + [Define if there is a function named getfsstat for reading the + list of mounted file systems. (DEC Alpha running OSF/1)]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # SVR3 + AC_MSG_CHECKING([for FIXME existence of three headers]) + AC_CACHE_VAL([fu_cv_sys_mounted_fread_fstyp], + [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#include ]])], + [fu_cv_sys_mounted_fread_fstyp=yes], + [fu_cv_sys_mounted_fread_fstyp=no])]) + AC_MSG_RESULT([$fu_cv_sys_mounted_fread_fstyp]) + if test $fu_cv_sys_mounted_fread_fstyp = yes; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_FREAD_FSTYP], [1], + [Define if (like SVR2) there is no specific function for reading the + list of mounted file systems, and your system has these header files: + and . (SVR3)]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # 4.4BSD and DEC OSF/1. + AC_MSG_CHECKING([for getmntinfo function]) + AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo], + [ + test "$ac_cv_func_getmntinfo" = yes \ + && fu_cv_sys_mounted_getmntinfo=yes \ + || fu_cv_sys_mounted_getmntinfo=no + ]) + AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo]) + if test $fu_cv_sys_mounted_getmntinfo = yes; then + AC_MSG_CHECKING([whether getmntinfo returns statvfs structures]) + AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo2], + [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#if HAVE_SYS_PARAM_H +# include +#endif +#include +#if HAVE_SYS_MOUNT_H +# include +#endif +#if HAVE_SYS_STATVFS_H +# include +#endif +extern +#ifdef __cplusplus +"C" +#endif +int getmntinfo (struct statfs **, int); + ]], [])], + [fu_cv_sys_mounted_getmntinfo2=no], + [fu_cv_sys_mounted_getmntinfo2=yes]) + ]) + AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo2]) + if test $fu_cv_sys_mounted_getmntinfo2 = no; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_GETMNTINFO], [1], + [Define if there is a function named getmntinfo for reading the + list of mounted file systems and it returns an array of + 'struct statfs'. (4.4BSD, Darwin)]) + else + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_GETMNTINFO2], [1], + [Define if there is a function named getmntinfo for reading the + list of mounted file systems and it returns an array of + 'struct statvfs'. (NetBSD 3.0)]) + fi + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # Ultrix + AC_MSG_CHECKING([for getmnt function]) + AC_CACHE_VAL([fu_cv_sys_mounted_getmnt], + [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ +#include +#include ]])], + [fu_cv_sys_mounted_getmnt=yes], + [fu_cv_sys_mounted_getmnt=no])]) + AC_MSG_RESULT([$fu_cv_sys_mounted_getmnt]) + if test $fu_cv_sys_mounted_getmnt = yes; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_GETMNT], [1], + [Define if there is a function named getmnt for reading the list of + mounted file systems. (Ultrix)]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # BeOS + AC_CHECK_FUNCS([next_dev fs_stat_dev]) + AC_CHECK_HEADERS([fs_info.h]) + AC_MSG_CHECKING([for BEOS mounted file system support functions]) + if test $ac_cv_header_fs_info_h = yes \ + && test $ac_cv_func_next_dev = yes \ + && test $ac_cv_func_fs_stat_dev = yes; then + fu_result=yes + else + fu_result=no + fi + AC_MSG_RESULT([$fu_result]) + if test $fu_result = yes; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_FS_STAT_DEV], [1], + [Define if there are functions named next_dev and fs_stat_dev for + reading the list of mounted file systems. (BeOS)]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # SVR2 + AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) + AC_CACHE_VAL([fu_cv_sys_mounted_fread], + [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], + [fu_cv_sys_mounted_fread=yes], + [fu_cv_sys_mounted_fread=no])]) + AC_MSG_RESULT([$fu_cv_sys_mounted_fread]) + if test $fu_cv_sys_mounted_fread = yes; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_FREAD], [1], + [Define if there is no specific function for reading the list of + mounted file systems. fread will be used to read /etc/mnttab. + (SVR2) ]) + fi +fi + +if test -z "$ac_list_mounted_fs"; then + # Interix / BSD alike statvfs + # the code is really interix specific, so make sure, we're on it. + case "$host" in + *-interix*) + AC_CHECK_FUNCS([statvfs]) + if test $ac_cv_func_statvfs = yes; then + ac_list_mounted_fs=found + AC_DEFINE([MOUNTED_INTERIX_STATVFS], [1], + [Define if we are on interix, and ought to use statvfs plus + some special knowledge on where mounted file systems can be + found. (Interix)]) + fi + ;; + esac +fi + +if test -z "$ac_list_mounted_fs"; then + AC_MSG_ERROR([could not determine how to read list of mounted file systems]) + # FIXME -- no need to abort building the whole package + # Can't build mountlist.c or anything that needs its functions +fi + +AS_IF([test $ac_list_mounted_fs = found], [$1], [$2]) + + ]) diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4 new file mode 100644 index 0000000..0904d02 --- /dev/null +++ b/gl/m4/lseek.m4 @@ -0,0 +1,71 @@ +# lseek.m4 serial 10 +dnl Copyright (C) 2007, 2009-2014 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_LSEEK], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_PROG_CC]) + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe], + [case "$host_os" in + mingw*) + dnl Native Windows. + dnl The result of lseek (fd, (off_t)0, SEEK_CUR) or + dnl SetFilePointer(handle, 0, NULL, FILE_CURRENT) + dnl for a pipe depends on the environment: In a Cygwin 1.5 + dnl environment it succeeds (wrong); in a Cygwin 1.7 environment + dnl it fails with a wrong errno value. + gl_cv_func_lseek_pipe=no + ;; + *) + if test $cross_compiling = no; then + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include /* for off_t */ +#include /* for SEEK_CUR */ +#if HAVE_UNISTD_H +# include +#else /* on Windows with MSVC */ +# include +#endif +]], [[ + /* Exit with success only if stdin is seekable. */ + return lseek (0, (off_t)0, SEEK_CUR) < 0; +]])], + [if test -s conftest$ac_exeext \ + && ./conftest$ac_exeext < conftest.$ac_ext \ + && test 1 = "`echo hi \ + | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then + gl_cv_func_lseek_pipe=yes + else + gl_cv_func_lseek_pipe=no + fi + ], + [gl_cv_func_lseek_pipe=no]) + else + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[ +#if defined __BEOS__ +/* BeOS mistakenly return 0 when trying to seek on pipes. */ + Choke me. +#endif]])], + [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no]) + fi + ;; + esac + ]) + if test $gl_cv_func_lseek_pipe = no; then + REPLACE_LSEEK=1 + AC_DEFINE([LSEEK_PIPE_BROKEN], [1], + [Define to 1 if lseek does not detect pipes.]) + fi + + AC_REQUIRE([gl_SYS_TYPES_H]) + if test $WINDOWS_64_BIT_OFF_T = 1; then + REPLACE_LSEEK=1 + fi +]) diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4 new file mode 100644 index 0000000..c5e72b8 --- /dev/null +++ b/gl/m4/lstat.m4 @@ -0,0 +1,73 @@ +# serial 26 + +# Copyright (C) 1997-2001, 2003-2014 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. + +dnl From Jim Meyering. + +AC_DEFUN([gl_FUNC_LSTAT], +[ + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + dnl If lstat does not exist, the replacement does + dnl "#define lstat stat", and lstat.c is a no-op. + AC_CHECK_FUNCS_ONCE([lstat]) + if test $ac_cv_func_lstat = yes; then + AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *no) + REPLACE_LSTAT=1 + ;; + esac + else + HAVE_LSTAT=0 + fi +]) + +# Prerequisites of lib/lstat.c. +AC_DEFUN([gl_PREREQ_LSTAT], [:]) + +AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], +[ + dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it + dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ. + AC_CACHE_CHECK([whether lstat correctly handles trailing slash], + [gl_cv_func_lstat_dereferences_slashed_symlink], + [rm -f conftest.sym conftest.file + echo >conftest.file + if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT], + [[struct stat sbuf; + /* Linux will dereference the symlink and fail, as required by + POSIX. That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; + ]])], + [gl_cv_func_lstat_dereferences_slashed_symlink=yes], + [gl_cv_func_lstat_dereferences_slashed_symlink=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; + esac + ]) + else + # If the 'ln -s' command failed, then we probably don't even + # have an lstat function. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" + fi + rm -f conftest.sym conftest.file + ]) + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *yes) + AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1], + [Define to 1 if 'lstat' dereferences a symlink specified + with a trailing slash.]) + ;; + esac +]) diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4 new file mode 100644 index 0000000..322ad6e --- /dev/null +++ b/gl/m4/malloc.m4 @@ -0,0 +1,98 @@ +# malloc.m4 serial 14 +dnl Copyright (C) 2007, 2009-2014 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. + +m4_version_prereq([2.70], [] ,[ + +# This is taken from the following Autoconf patch: +# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9 +AC_DEFUN([_AC_FUNC_MALLOC_IF], +[ + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles + AC_CHECK_HEADERS([stdlib.h]) + AC_CACHE_CHECK([for GNU libc compatible malloc], + [ac_cv_func_malloc_0_nonnull], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include + #else + char *malloc (); + #endif + ]], + [[return ! malloc (0);]]) + ], + [ac_cv_func_malloc_0_nonnull=yes], + [ac_cv_func_malloc_0_nonnull=no], + [case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ + | hpux* | solaris* | cygwin* | mingw*) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; + esac + ]) + ]) + AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2]) +])# _AC_FUNC_MALLOC_IF + +]) + +# gl_FUNC_MALLOC_GNU +# ------------------ +# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if +# it is not. +AC_DEFUN([gl_FUNC_MALLOC_GNU], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. + _AC_FUNC_MALLOC_IF( + [AC_DEFINE([HAVE_MALLOC_GNU], [1], + [Define to 1 if your system has a GNU libc compatible 'malloc' + function, and to 0 otherwise.])], + [AC_DEFINE([HAVE_MALLOC_GNU], [0]) + REPLACE_MALLOC=1 + ]) +]) + +# gl_FUNC_MALLOC_POSIX +# -------------------- +# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it +# fails), and replace malloc if it is not. +AC_DEFUN([gl_FUNC_MALLOC_POSIX], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) + if test $gl_cv_func_malloc_posix = yes; then + AC_DEFINE([HAVE_MALLOC_POSIX], [1], + [Define if the 'malloc' function is POSIX compliant.]) + else + REPLACE_MALLOC=1 + fi +]) + +# Test whether malloc, realloc, calloc are POSIX compliant, +# Set gl_cv_func_malloc_posix to yes or no accordingly. +AC_DEFUN([gl_CHECK_MALLOC_POSIX], +[ + AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], + [gl_cv_func_malloc_posix], + [ + dnl It is too dangerous to try to allocate a large amount of memory: + dnl some systems go to their knees when you do that. So assume that + dnl all Unix implementations of the function are POSIX compliant. + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[]], + [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + choke me + #endif + ]])], + [gl_cv_func_malloc_posix=yes], + [gl_cv_func_malloc_posix=no]) + ]) +]) diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4 new file mode 100644 index 0000000..dcc1a08 --- /dev/null +++ b/gl/m4/malloca.m4 @@ -0,0 +1,15 @@ +# malloca.m4 serial 1 +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_MALLOCA], +[ + dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables + dnl @ALLOCA@ and @LTALLOCA@. + dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies. + AC_REQUIRE([gl_EEMALLOC]) + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) +]) diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4 new file mode 100644 index 0000000..e1cee6c --- /dev/null +++ b/gl/m4/manywarnings.m4 @@ -0,0 +1,223 @@ +# manywarnings.m4 serial 6 +dnl Copyright (C) 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# gl_MANYWARN_COMPLEMENT(OUTVAR, LISTVAR, REMOVEVAR) +# -------------------------------------------------- +# Copy LISTVAR to OUTVAR except for the entries in REMOVEVAR. +# Elements separated by whitespace. In set logic terms, the function +# does OUTVAR = LISTVAR \ REMOVEVAR. +AC_DEFUN([gl_MANYWARN_COMPLEMENT], +[ + gl_warn_set= + set x $2; shift + for gl_warn_item + do + case " $3 " in + *" $gl_warn_item "*) + ;; + *) + gl_warn_set="$gl_warn_set $gl_warn_item" + ;; + esac + done + $1=$gl_warn_set +]) + +# gl_MANYWARN_ALL_GCC(VARIABLE) +# ----------------------------- +# Add all documented GCC warning parameters to variable VARIABLE. +# Note that you need to test them using gl_WARN_ADD if you want to +# make sure your gcc understands it. +AC_DEFUN([gl_MANYWARN_ALL_GCC], +[ + 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 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], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_nomfi_supported=yes], + [gl_cv_cc_nomfi_supported=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_nomfi_supported]) + + if test "$gl_cv_cc_nomfi_supported" = yes; then + dnl Now check whether -Wno-missing-field-initializers is needed + dnl for the { 0, } construct. + AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed]) + AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[void f (void) + { + typedef struct { int a; int b; } s_t; + s_t s1 = { 0, }; + } + ]], + [[]])], + [gl_cv_cc_nomfi_needed=no], + [gl_cv_cc_nomfi_needed=yes]) + CFLAGS="$gl_save_CFLAGS" + ]) + 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 \ + -W \ + -Wabi \ + -Waddress \ + -Waggressive-loop-optimizations \ + -Wall \ + -Warray-bounds \ + -Wattributes \ + -Wbad-function-cast \ + -Wbuiltin-macro-redefined \ + -Wcast-align \ + -Wchar-subscripts \ + -Wclobbered \ + -Wcomment \ + -Wcomments \ + -Wcoverage-mismatch \ + -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 \ + -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-include-dirs \ + -Wmissing-parameter-type \ + -Wmissing-prototypes \ + -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-local-addr \ + -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 \ + -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 \ + -fdiagnostics-show-option \ + -funit-at-a-time \ + \ + ; do + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + + # 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 new file mode 100644 index 0000000..9e2adfb --- /dev/null +++ b/gl/m4/math_h.m4 @@ -0,0 +1,353 @@ +# math_h.m4 serial 114 +dnl Copyright (C) 2007-2014 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_MATH_H], +[ + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + gl_CHECK_NEXT_HEADERS([math.h]) + + AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], + [[/* Solaris 10 has a broken definition of NAN. Other platforms + fail to provide NAN, or provide it only in C99 mode; this + test only needs to fail when NAN is provided but wrong. */ + float f = 1.0f; +#ifdef NAN + f = NAN; +#endif + return f == 0;]])], + [gl_cv_header_math_nan_works=yes], + [gl_cv_header_math_nan_works=no])]) + if test $gl_cv_header_math_nan_works = no; then + REPLACE_NAN=1 + fi + AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], + [[/* Solaris 10 has a broken definition of HUGE_VAL. */ + double d = HUGE_VAL; + return d == 0;]])], + [gl_cv_header_math_huge_val_works=yes], + [gl_cv_header_math_huge_val_works=no])]) + if test $gl_cv_header_math_huge_val_works = no; then + REPLACE_HUGE_VAL=1 + fi + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include ]], + [acosf acosl asinf asinl atanf atanl + cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf + expf expl exp2 exp2f exp2l expm1 expm1f expm1l + fabsf fabsl floorf floorl fma fmaf fmal + fmod fmodf fmodl frexpf frexpl hypotf hypotl + ilogb ilogbf ilogbl + ldexpf ldexpl + log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l + logb logbf logbl + modf modff modfl powf + remainder remainderf remainderl + rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl + tanf tanl tanhf trunc truncf truncl]) +]) + +AC_DEFUN([gl_MATH_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_MATH_H_DEFAULTS], +[ + GNULIB_ACOSF=0; AC_SUBST([GNULIB_ACOSF]) + GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) + GNULIB_ASINF=0; AC_SUBST([GNULIB_ASINF]) + GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) + GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF]) + GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) + GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F]) + GNULIB_CBRT=0; AC_SUBST([GNULIB_CBRT]) + GNULIB_CBRTF=0; AC_SUBST([GNULIB_CBRTF]) + GNULIB_CBRTL=0; AC_SUBST([GNULIB_CBRTL]) + GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL]) + GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) + GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) + GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN]) + GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF]) + GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL]) + GNULIB_COSF=0; AC_SUBST([GNULIB_COSF]) + GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) + GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF]) + GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF]) + GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) + GNULIB_EXP2=0; AC_SUBST([GNULIB_EXP2]) + GNULIB_EXP2F=0; AC_SUBST([GNULIB_EXP2F]) + GNULIB_EXP2L=0; AC_SUBST([GNULIB_EXP2L]) + GNULIB_EXPM1=0; AC_SUBST([GNULIB_EXPM1]) + GNULIB_EXPM1F=0; AC_SUBST([GNULIB_EXPM1F]) + GNULIB_EXPM1L=0; AC_SUBST([GNULIB_EXPM1L]) + GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF]) + GNULIB_FABSL=0; AC_SUBST([GNULIB_FABSL]) + GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR]) + GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) + GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) + GNULIB_FMA=0; AC_SUBST([GNULIB_FMA]) + GNULIB_FMAF=0; AC_SUBST([GNULIB_FMAF]) + GNULIB_FMAL=0; AC_SUBST([GNULIB_FMAL]) + GNULIB_FMOD=0; AC_SUBST([GNULIB_FMOD]) + GNULIB_FMODF=0; AC_SUBST([GNULIB_FMODF]) + GNULIB_FMODL=0; AC_SUBST([GNULIB_FMODL]) + GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF]) + GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) + GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) + GNULIB_HYPOT=0; AC_SUBST([GNULIB_HYPOT]) + GNULIB_HYPOTF=0; AC_SUBST([GNULIB_HYPOTF]) + GNULIB_HYPOTL=0; AC_SUBST([GNULIB_HYPOTL]) + GNULIB_ILOGB=0; AC_SUBST([GNULIB_ILOGB]) + GNULIB_ILOGBF=0; AC_SUBST([GNULIB_ILOGBF]) + GNULIB_ILOGBL=0; AC_SUBST([GNULIB_ILOGBL]) + GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) + GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) + GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) + GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) + GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) + GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) + GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF]) + GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) + GNULIB_LOG=0; AC_SUBST([GNULIB_LOG]) + GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF]) + GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) + GNULIB_LOG10=0; AC_SUBST([GNULIB_LOG10]) + GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F]) + GNULIB_LOG10L=0; AC_SUBST([GNULIB_LOG10L]) + GNULIB_LOG1P=0; AC_SUBST([GNULIB_LOG1P]) + GNULIB_LOG1PF=0; AC_SUBST([GNULIB_LOG1PF]) + GNULIB_LOG1PL=0; AC_SUBST([GNULIB_LOG1PL]) + GNULIB_LOG2=0; AC_SUBST([GNULIB_LOG2]) + GNULIB_LOG2F=0; AC_SUBST([GNULIB_LOG2F]) + GNULIB_LOG2L=0; AC_SUBST([GNULIB_LOG2L]) + GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) + GNULIB_LOGBF=0; AC_SUBST([GNULIB_LOGBF]) + GNULIB_LOGBL=0; AC_SUBST([GNULIB_LOGBL]) + GNULIB_MODF=0; AC_SUBST([GNULIB_MODF]) + GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF]) + GNULIB_MODFL=0; AC_SUBST([GNULIB_MODFL]) + GNULIB_POWF=0; AC_SUBST([GNULIB_POWF]) + GNULIB_REMAINDER=0; AC_SUBST([GNULIB_REMAINDER]) + GNULIB_REMAINDERF=0; AC_SUBST([GNULIB_REMAINDERF]) + GNULIB_REMAINDERL=0; AC_SUBST([GNULIB_REMAINDERL]) + GNULIB_RINT=0; AC_SUBST([GNULIB_RINT]) + GNULIB_RINTF=0; AC_SUBST([GNULIB_RINTF]) + GNULIB_RINTL=0; AC_SUBST([GNULIB_RINTL]) + GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) + GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) + GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) + GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) + GNULIB_SINF=0; AC_SUBST([GNULIB_SINF]) + GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) + GNULIB_SINHF=0; AC_SUBST([GNULIB_SINHF]) + GNULIB_SQRTF=0; AC_SUBST([GNULIB_SQRTF]) + GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) + GNULIB_TANF=0; AC_SUBST([GNULIB_TANF]) + GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) + GNULIB_TANHF=0; AC_SUBST([GNULIB_TANHF]) + GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) + GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) + GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_ACOSF=1; AC_SUBST([HAVE_ACOSF]) + HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) + HAVE_ASINF=1; AC_SUBST([HAVE_ASINF]) + HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) + HAVE_ATANF=1; AC_SUBST([HAVE_ATANF]) + HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) + HAVE_ATAN2F=1; AC_SUBST([HAVE_ATAN2F]) + HAVE_CBRT=1; AC_SUBST([HAVE_CBRT]) + HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF]) + HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL]) + HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN]) + HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL]) + HAVE_COSF=1; AC_SUBST([HAVE_COSF]) + HAVE_COSL=1; AC_SUBST([HAVE_COSL]) + HAVE_COSHF=1; AC_SUBST([HAVE_COSHF]) + HAVE_EXPF=1; AC_SUBST([HAVE_EXPF]) + HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) + HAVE_EXPM1=1; AC_SUBST([HAVE_EXPM1]) + HAVE_EXPM1F=1; AC_SUBST([HAVE_EXPM1F]) + HAVE_FABSF=1; AC_SUBST([HAVE_FABSF]) + HAVE_FABSL=1; AC_SUBST([HAVE_FABSL]) + HAVE_FMA=1; AC_SUBST([HAVE_FMA]) + HAVE_FMAF=1; AC_SUBST([HAVE_FMAF]) + HAVE_FMAL=1; AC_SUBST([HAVE_FMAL]) + HAVE_FMODF=1; AC_SUBST([HAVE_FMODF]) + HAVE_FMODL=1; AC_SUBST([HAVE_FMODL]) + HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF]) + HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF]) + HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL]) + HAVE_ILOGB=1; AC_SUBST([HAVE_ILOGB]) + HAVE_ILOGBF=1; AC_SUBST([HAVE_ILOGBF]) + HAVE_ILOGBL=1; AC_SUBST([HAVE_ILOGBL]) + HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) + HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) + HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) + HAVE_LDEXPF=1; AC_SUBST([HAVE_LDEXPF]) + HAVE_LOGF=1; AC_SUBST([HAVE_LOGF]) + HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) + HAVE_LOG10F=1; AC_SUBST([HAVE_LOG10F]) + HAVE_LOG10L=1; AC_SUBST([HAVE_LOG10L]) + HAVE_LOG1P=1; AC_SUBST([HAVE_LOG1P]) + HAVE_LOG1PF=1; AC_SUBST([HAVE_LOG1PF]) + HAVE_LOG1PL=1; AC_SUBST([HAVE_LOG1PL]) + HAVE_LOGBF=1; AC_SUBST([HAVE_LOGBF]) + HAVE_LOGBL=1; AC_SUBST([HAVE_LOGBL]) + HAVE_MODFF=1; AC_SUBST([HAVE_MODFF]) + HAVE_MODFL=1; AC_SUBST([HAVE_MODFL]) + HAVE_POWF=1; AC_SUBST([HAVE_POWF]) + HAVE_REMAINDER=1; AC_SUBST([HAVE_REMAINDER]) + HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF]) + HAVE_RINT=1; AC_SUBST([HAVE_RINT]) + HAVE_RINTL=1; AC_SUBST([HAVE_RINTL]) + HAVE_SINF=1; AC_SUBST([HAVE_SINF]) + HAVE_SINL=1; AC_SUBST([HAVE_SINL]) + HAVE_SINHF=1; AC_SUBST([HAVE_SINHF]) + HAVE_SQRTF=1; AC_SUBST([HAVE_SQRTF]) + HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) + HAVE_TANF=1; AC_SUBST([HAVE_TANF]) + HAVE_TANL=1; AC_SUBST([HAVE_TANL]) + HAVE_TANHF=1; AC_SUBST([HAVE_TANHF]) + HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) + HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) + HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) + HAVE_DECL_CBRTF=1; AC_SUBST([HAVE_DECL_CBRTF]) + HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL]) + HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) + HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) + HAVE_DECL_COPYSIGNF=1; AC_SUBST([HAVE_DECL_COPYSIGNF]) + HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) + HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) + HAVE_DECL_EXP2=1; AC_SUBST([HAVE_DECL_EXP2]) + HAVE_DECL_EXP2F=1; AC_SUBST([HAVE_DECL_EXP2F]) + HAVE_DECL_EXP2L=1; AC_SUBST([HAVE_DECL_EXP2L]) + HAVE_DECL_EXPM1L=1; AC_SUBST([HAVE_DECL_EXPM1L]) + HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) + HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) + HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) + HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) + HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) + HAVE_DECL_LOG10L=1; AC_SUBST([HAVE_DECL_LOG10L]) + HAVE_DECL_LOG2=1; AC_SUBST([HAVE_DECL_LOG2]) + HAVE_DECL_LOG2F=1; AC_SUBST([HAVE_DECL_LOG2F]) + HAVE_DECL_LOG2L=1; AC_SUBST([HAVE_DECL_LOG2L]) + HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) + HAVE_DECL_REMAINDER=1; AC_SUBST([HAVE_DECL_REMAINDER]) + HAVE_DECL_REMAINDERL=1; AC_SUBST([HAVE_DECL_REMAINDERL]) + HAVE_DECL_RINTF=1; AC_SUBST([HAVE_DECL_RINTF]) + HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND]) + HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF]) + HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL]) + HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) + HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) + HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) + HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) + HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) + HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) + REPLACE_CBRTF=0; AC_SUBST([REPLACE_CBRTF]) + REPLACE_CBRTL=0; AC_SUBST([REPLACE_CBRTL]) + REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL]) + REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) + REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) + REPLACE_EXPM1=0; AC_SUBST([REPLACE_EXPM1]) + REPLACE_EXPM1F=0; AC_SUBST([REPLACE_EXPM1F]) + REPLACE_EXP2=0; AC_SUBST([REPLACE_EXP2]) + REPLACE_EXP2L=0; AC_SUBST([REPLACE_EXP2L]) + REPLACE_FABSL=0; AC_SUBST([REPLACE_FABSL]) + REPLACE_FLOOR=0; AC_SUBST([REPLACE_FLOOR]) + REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) + REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) + REPLACE_FMA=0; AC_SUBST([REPLACE_FMA]) + REPLACE_FMAF=0; AC_SUBST([REPLACE_FMAF]) + REPLACE_FMAL=0; AC_SUBST([REPLACE_FMAL]) + REPLACE_FMOD=0; AC_SUBST([REPLACE_FMOD]) + REPLACE_FMODF=0; AC_SUBST([REPLACE_FMODF]) + REPLACE_FMODL=0; AC_SUBST([REPLACE_FMODL]) + REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF]) + REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) + REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) + REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) + REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT]) + REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF]) + REPLACE_HYPOTL=0; AC_SUBST([REPLACE_HYPOTL]) + REPLACE_ILOGB=0; AC_SUBST([REPLACE_ILOGB]) + REPLACE_ILOGBF=0; AC_SUBST([REPLACE_ILOGBF]) + REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) + REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) + REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) + REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) + REPLACE_LOG=0; AC_SUBST([REPLACE_LOG]) + REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF]) + REPLACE_LOGL=0; AC_SUBST([REPLACE_LOGL]) + REPLACE_LOG10=0; AC_SUBST([REPLACE_LOG10]) + REPLACE_LOG10F=0; AC_SUBST([REPLACE_LOG10F]) + REPLACE_LOG10L=0; AC_SUBST([REPLACE_LOG10L]) + REPLACE_LOG1P=0; AC_SUBST([REPLACE_LOG1P]) + REPLACE_LOG1PF=0; AC_SUBST([REPLACE_LOG1PF]) + REPLACE_LOG1PL=0; AC_SUBST([REPLACE_LOG1PL]) + REPLACE_LOG2=0; AC_SUBST([REPLACE_LOG2]) + REPLACE_LOG2F=0; AC_SUBST([REPLACE_LOG2F]) + REPLACE_LOG2L=0; AC_SUBST([REPLACE_LOG2L]) + REPLACE_LOGB=0; AC_SUBST([REPLACE_LOGB]) + REPLACE_LOGBF=0; AC_SUBST([REPLACE_LOGBF]) + REPLACE_LOGBL=0; AC_SUBST([REPLACE_LOGBL]) + REPLACE_MODF=0; AC_SUBST([REPLACE_MODF]) + REPLACE_MODFF=0; AC_SUBST([REPLACE_MODFF]) + REPLACE_MODFL=0; AC_SUBST([REPLACE_MODFL]) + REPLACE_NAN=0; AC_SUBST([REPLACE_NAN]) + REPLACE_REMAINDER=0; AC_SUBST([REPLACE_REMAINDER]) + REPLACE_REMAINDERF=0; AC_SUBST([REPLACE_REMAINDERF]) + REPLACE_REMAINDERL=0; AC_SUBST([REPLACE_REMAINDERL]) + REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) + REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) + REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) + REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) + REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) + REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL]) + REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC]) + REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF]) + REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) +]) + +# gl_LONG_DOUBLE_VS_DOUBLE +# determines whether 'long double' and 'double' have the same representation. +# Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines +# HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly. +# The currently known platforms where this is the case are: +# Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9. +AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE], +[ + AC_CACHE_CHECK([whether long double and double are the same], + [gl_cv_long_double_equals_double], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[typedef int check[sizeof (long double) == sizeof (double) + && LDBL_MANT_DIG == DBL_MANT_DIG + && LDBL_MAX_EXP == DBL_MAX_EXP + && LDBL_MIN_EXP == DBL_MIN_EXP + ? 1 : -1]; + ]])], + [gl_cv_long_double_equals_double=yes], + [gl_cv_long_double_equals_double=no]) + ]) + if test $gl_cv_long_double_equals_double = yes; then + AC_DEFINE([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE], [1], + [Define to 1 if 'long double' and 'double' have the same representation.]) + HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 + else + HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 + fi + AC_SUBST([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]) +]) diff --git a/gl/m4/mathfunc.m4 b/gl/m4/mathfunc.m4 new file mode 100644 index 0000000..6f0e6aa --- /dev/null +++ b/gl/m4/mathfunc.m4 @@ -0,0 +1,163 @@ +# mathfunc.m4 serial 11 +dnl Copyright (C) 2010-2014 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. + +# gl_MATHFUNC(FUNC, RETTYPE, PARAMTYPES [, INCLUDES] [, EXTRA-CODE]) +# ------------------------------------------------------------------ +# tests whether the function FUNC is available in libc or libm. +# RETTYPE is the return type. PARAMTYPES is a parameter list, with parentheses. +# It sets FUNC_LIBM to empty or "-lm" accordingly. + +AC_DEFUN([gl_MATHFUNC], +[ + dnl We need the RETTYPE and PARAMTYPES in order to force linking with the + dnl function. + dnl 1) With gcc >= 4.3 on glibc/x86_64, calls to the 'fabs' function + dnl are inlined by the compiler, therefore linking of these calls does + dnl not require -lm, but taking the function pointer of 'fabs' does. + dnl 2) On MSVC 9, many math functions exist only as macros with arguments, + dnl whereas the function pointer is undefined. + dnl On the other hand, taking just the function pointer is not enough. + dnl 1) On AIX 7.1, when 'long double' is 128 bit large ("xlc -qldbl128" or + dnl "xlc -qlongdouble" or "gcc -mlong-double-128") many math functions + dnl exist as macros with arguments, that may reference libm or even + dnl completely undefined functions such as __rint128. + dnl 2) In AIX 7.1 with gcc 4.2, when optimization is turned on, calls to + dnl rint() with simple arguments are turned into rintf() calls by the + dnl compiler. But while rint() is resides in libc, rintf() is in libm. + m4_pushdef([func], [$1]) + m4_pushdef([FUNC], [m4_translit([$1],[abcdefghijklmnopqrstuvwxyz], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) + m4_pushdef([ARGS], [m4_bpatsubst( + [m4_bpatsubst( + [m4_bpatsubst( + [m4_bpatsubst( + [m4_bpatsubst( + [m4_bpatsubst( + [m4_bpatsubst( + [m4_bpatsubst( + [m4_bpatsubst( + [$3], + [int \*], [&i_ret])], + [float \*], [&f_ret])], + [double \*], [&d_ret])], + [long double \*], [&l_ret])], + [int], [2])], + [float], [1.618034f])], + [long double], [1.618033988749894848L])], + [double], [1.6180339887])], + [void], [])]) + FUNC[]_LIBM= + AC_CACHE_CHECK([whether func() can be used without linking with libm], + [gl_cv_func_]func[_no_libm], + [ + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + $4 + $2 (*funcptr) $3 = ]func[; + int i_ret; + float f_ret; + double d_ret; + long double l_ret;]], + [[$2 y = funcptr ]ARGS[ + ]func[ ]ARGS[; + $5 + return y < 0.3 || y > 1.7; + ]])], + [gl_cv_func_]func[_no_libm=yes], + [gl_cv_func_]func[_no_libm=no]) + ]) + if test $gl_cv_func_[]func[]_no_libm = no; then + AC_CACHE_CHECK([whether func() can be used with libm], + [gl_cv_func_]func[_in_libm], + [ + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + $4 + $2 (*funcptr) $3 = ]func[; + int i_ret; + float f_ret; + double d_ret; + long double l_ret;]], + [[$2 y = funcptr ]ARGS[ + ]func[ ]ARGS[; + $5 + return y < 0.3 || y > 1.7; + ]])], + [gl_cv_func_]func[_in_libm=yes], + [gl_cv_func_]func[_in_libm=no]) + LIBS="$save_LIBS" + ]) + if test $gl_cv_func_[]func[]_in_libm = yes; then + FUNC[]_LIBM=-lm + fi + fi + AC_SUBST(FUNC[_LIBM]) + m4_popdef([ARGS]) + m4_popdef([FUNC]) + m4_popdef([func]) +]) + +# gl_COMMON_DOUBLE_MATHFUNC(FUNC) +# ------------------------------- +# tests whether the function FUNC is available in libc or libm. +# It sets FUNC_LIBM to empty or "-lm" accordingly. +# FUNC must be one of the following functions, that are present on all systems +# and provided by libm on all systems except Mac OS X, BeOS, Haiku: +# acos asin atan atan2 cbrt cos cosh erf erfc exp fmod hypot j0 j1 jn lgamma +# log log10 log1p pow remainder sin sinh sqrt tan tanh y0 y1 yn + +AC_DEFUN([gl_COMMON_DOUBLE_MATHFUNC], +[ + AC_REQUIRE([gl_COMMON_DOUBLE_MATHFUNC_TEST]) + m4_pushdef([FUNC], [m4_translit([$1],[abcdefghijklmnopqrstuvwxyz], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) + FUNC[]_LIBM="$POW_LIBM" + AC_SUBST(FUNC[_LIBM]) + m4_popdef([FUNC]) +]) + +AC_DEFUN([gl_COMMON_DOUBLE_MATHFUNC_TEST], +[ + dnl We could use any of the following: + dnl gl_MATHFUNC([acos], [double], [(double)]) + dnl gl_MATHFUNC([asin], [double], [(double)]) + dnl gl_MATHFUNC([atan], [double], [(double)]) + dnl gl_MATHFUNC([atan2], [double], [(double, double)]) + dnl gl_MATHFUNC([cbrt], [double], [(double)]) + dnl gl_MATHFUNC([cos], [double], [(double)]) + dnl gl_MATHFUNC([cosh], [double], [(double)]) + dnl gl_MATHFUNC([erf], [double], [(double)]) + dnl gl_MATHFUNC([erfc], [double], [(double)]) + dnl gl_MATHFUNC([exp], [double], [(double)]) + dnl gl_MATHFUNC([fmod], [double], [(double, double)]) + dnl gl_MATHFUNC([hypot], [double], [(double, double)]) + dnl gl_MATHFUNC([j0], [double], [(double)]) + dnl gl_MATHFUNC([j1], [double], [(double)]) + dnl gl_MATHFUNC([jn], [double], [(int, double)]) + dnl gl_MATHFUNC([lgamma], [double], [(double)]) + dnl gl_MATHFUNC([log], [double], [(double)]) + dnl gl_MATHFUNC([log10], [double], [(double)]) + dnl gl_MATHFUNC([log1p], [double], [(double)]) + dnl gl_MATHFUNC([pow], [double], [(double, double)]) + dnl gl_MATHFUNC([remainder], [double], [(double, double)]) + dnl gl_MATHFUNC([sin], [double], [(double)]) + dnl gl_MATHFUNC([sinh], [double], [(double)]) + dnl gl_MATHFUNC([sqrt], [double], [(double)]) + dnl gl_MATHFUNC([tan], [double], [(double)]) + dnl gl_MATHFUNC([tanh], [double], [(double)]) + dnl gl_MATHFUNC([y0], [double], [(double)]) + dnl gl_MATHFUNC([y1], [double], [(double)]) + dnl gl_MATHFUNC([yn], [double], [(int, double)]) + gl_MATHFUNC([pow], [double], [(double, double)]) +]) diff --git a/gl/m4/mbchar.m4 b/gl/m4/mbchar.m4 new file mode 100644 index 0000000..e250ca8 --- /dev/null +++ b/gl/m4/mbchar.m4 @@ -0,0 +1,13 @@ +# mbchar.m4 serial 9 +dnl Copyright (C) 2005-2007, 2009-2014 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 autoconf tests required for use of mbchar.m4 +dnl From Bruno Haible. + +AC_DEFUN([gl_MBCHAR], +[ + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) +]) diff --git a/gl/m4/mbiter.m4 b/gl/m4/mbiter.m4 new file mode 100644 index 0000000..648bf45 --- /dev/null +++ b/gl/m4/mbiter.m4 @@ -0,0 +1,14 @@ +# mbiter.m4 serial 7 +dnl Copyright (C) 2005, 2008-2014 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 autoconf tests required for use of mbiter.h +dnl From Bruno Haible. + +AC_DEFUN([gl_MBITER], +[ + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + : +]) diff --git a/gl/m4/mbrtowc.m4 b/gl/m4/mbrtowc.m4 new file mode 100644 index 0000000..a9d1570 --- /dev/null +++ b/gl/m4/mbrtowc.m4 @@ -0,0 +1,572 @@ +# mbrtowc.m4 serial 25 +dnl Copyright (C) 2001-2002, 2004-2005, 2008-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_MBRTOWC], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + gl_MBSTATE_T_BROKEN + + AC_CHECK_FUNCS_ONCE([mbrtowc]) + if test $ac_cv_func_mbrtowc = no; then + HAVE_MBRTOWC=0 + AC_CHECK_DECLS([mbrtowc],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +]]) + if test $ac_cv_have_decl_mbrtowc = yes; then + dnl On Minix 3.1.8, the system's declares mbrtowc() although + dnl it does not have the function. Avoid a collision with gnulib's + dnl replacement. + REPLACE_MBRTOWC=1 + fi + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBRTOWC=1 + else + gl_MBRTOWC_NULL_ARG1 + gl_MBRTOWC_NULL_ARG2 + gl_MBRTOWC_RETVAL + gl_MBRTOWC_NUL_RETVAL + case "$gl_cv_func_mbrtowc_null_arg1" in + *yes) ;; + *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1], + [Define if the mbrtowc function has the NULL pwc argument bug.]) + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_null_arg2" in + *yes) ;; + *) AC_DEFINE([MBRTOWC_NULL_ARG2_BUG], [1], + [Define if the mbrtowc function has the NULL string argument bug.]) + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_retval" in + *yes) ;; + *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], + [Define if the mbrtowc function returns a wrong return value.]) + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_nul_retval" in + *yes) ;; + *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1], + [Define if the mbrtowc function does not return 0 for a NUL character.]) + REPLACE_MBRTOWC=1 + ;; + esac + fi + fi +]) + +dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that +dnl redefines the semantics of the given mbstate_t type. +dnl Result is REPLACE_MBSTATE_T. +dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to +dnl avoid inconsistencies. + +AC_DEFUN([gl_MBSTATE_T_BROKEN], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + AC_CHECK_FUNCS_ONCE([mbsinit]) + AC_CHECK_FUNCS_ONCE([mbrtowc]) + if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + gl_MBRTOWC_INCOMPLETE_STATE + gl_MBRTOWC_SANITYCHECK + REPLACE_MBSTATE_T=0 + case "$gl_cv_func_mbrtowc_incomplete_state" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + case "$gl_cv_func_mbrtowc_sanitycheck" in + *yes) ;; + *) REPLACE_MBSTATE_T=1 ;; + esac + else + REPLACE_MBSTATE_T=1 + fi +]) + +dnl Test whether mbrtowc puts the state into non-initial state when parsing an +dnl incomplete multibyte character. +dnl Result is gl_cv_func_mbrtowc_incomplete_state. + +AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gt_LOCALE_JA]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether mbrtowc handles incomplete characters], + [gl_cv_func_mbrtowc_incomplete_state], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on AIX and OSF/1. + aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + esac +changequote([,])dnl + if test $LOCALE_JA != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + if (mbsinit (&state)) + return 1; + } + return 0; +}]])], + [gl_cv_func_mbrtowc_incomplete_state=yes], + [gl_cv_func_mbrtowc_incomplete_state=no], + [:]) + fi + ]) +]) + +dnl Test whether mbrtowc works not worse than mbtowc. +dnl Result is gl_cv_func_mbrtowc_sanitycheck. + +AC_DEFUN([gl_MBRTOWC_SANITYCHECK], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gt_LOCALE_ZH_CN]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc], + [gl_cv_func_mbrtowc_sanitycheck], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on Solaris 8. + solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; + esac +changequote([,])dnl + if test $LOCALE_ZH_CN != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + /* This fails on Solaris 8: + mbrtowc returns 2, and sets wc to 0x00F0. + mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 6, &state) != 4 + && mbtowc (&wc, input + 3, 6) == 4) + return 1; + } + return 0; +}]])], + [gl_cv_func_mbrtowc_sanitycheck=yes], + [gl_cv_func_mbrtowc_sanitycheck=no], + [:]) + fi + ]) +]) + +dnl Test whether mbrtowc supports a NULL pwc argument correctly. +dnl Result is gl_cv_func_mbrtowc_null_arg1. + +AC_DEFUN([gl_MBRTOWC_NULL_ARG1], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gt_LOCALE_FR_UTF8]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether mbrtowc handles a NULL pwc argument], + [gl_cv_func_mbrtowc_null_arg1], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on Solaris. + solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; + esac +changequote([,])dnl + if test $LOCALE_FR_UTF8 != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + int result = 0; + + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + char input[] = "\303\237er"; + mbstate_t state; + wchar_t wc; + size_t ret; + + memset (&state, '\0', sizeof (mbstate_t)); + wc = (wchar_t) 0xBADFACE; + ret = mbrtowc (&wc, input, 5, &state); + if (ret != 2) + result |= 1; + if (!mbsinit (&state)) + result |= 2; + + memset (&state, '\0', sizeof (mbstate_t)); + ret = mbrtowc (NULL, input, 5, &state); + if (ret != 2) /* Solaris 7 fails here: ret is -1. */ + result |= 4; + if (!mbsinit (&state)) + result |= 8; + } + return result; +}]])], + [gl_cv_func_mbrtowc_null_arg1=yes], + [gl_cv_func_mbrtowc_null_arg1=no], + [:]) + fi + ]) +]) + +dnl Test whether mbrtowc supports a NULL string argument correctly. +dnl Result is gl_cv_func_mbrtowc_null_arg2. + +AC_DEFUN([gl_MBRTOWC_NULL_ARG2], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gt_LOCALE_FR_UTF8]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument], + [gl_cv_func_mbrtowc_null_arg2], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on OSF/1. + osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; + esac +changequote([,])dnl + if test $LOCALE_FR_UTF8 != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + mbstate_t state; + wchar_t wc; + int ret; + + memset (&state, '\0', sizeof (mbstate_t)); + wc = (wchar_t) 0xBADFACE; + mbrtowc (&wc, NULL, 5, &state); + /* Check that wc was not modified. */ + if (wc != (wchar_t) 0xBADFACE) + return 1; + } + return 0; +}]])], + [gl_cv_func_mbrtowc_null_arg2=yes], + [gl_cv_func_mbrtowc_null_arg2=no], + [:]) + fi + ]) +]) + +dnl Test whether mbrtowc, when parsing the end of a multibyte character, +dnl correctly returns the number of bytes that were needed to complete the +dnl character (not the total number of bytes of the multibyte character). +dnl Result is gl_cv_func_mbrtowc_retval. + +AC_DEFUN([gl_MBRTOWC_RETVAL], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gt_LOCALE_FR_UTF8]) + AC_REQUIRE([gt_LOCALE_JA]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CACHE_CHECK([whether mbrtowc has a correct return value], + [gl_cv_func_mbrtowc_retval], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on HP-UX, Solaris, native Windows. + hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_retval="guessing yes" ;; + esac +changequote([,])dnl + if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ + || { case "$host_os" in mingw*) true;; *) false;; esac; }; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + int result = 0; + int found_some_locale = 0; + /* This fails on Solaris. */ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + char input[] = "B\303\274\303\237er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + { + input[1] = '\0'; + if (mbrtowc (&wc, input + 2, 5, &state) != 1) + result |= 1; + } + found_some_locale = 1; + } + /* This fails on HP-UX 11.11. */ + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) + { + input[1] = '\0'; + if (mbrtowc (&wc, input + 2, 5, &state) != 2) + result |= 2; + } + found_some_locale = 1; + } + /* This fails on native Windows. */ + if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) + { + char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 4; + } + found_some_locale = 1; + } + if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) + { + char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 8; + } + found_some_locale = 1; + } + if (setlocale (LC_ALL, "Chinese_China.936") != NULL) + { + char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) + { + input[3] = '\0'; + if (mbrtowc (&wc, input + 4, 4, &state) != 1) + result |= 16; + } + found_some_locale = 1; + } + return (found_some_locale ? result : 77); +}]])], + [gl_cv_func_mbrtowc_retval=yes], + [if test $? != 77; then + gl_cv_func_mbrtowc_retval=no + fi + ], + [:]) + fi + ]) +]) + +dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0. +dnl Result is gl_cv_func_mbrtowc_nul_retval. + +AC_DEFUN([gl_MBRTOWC_NUL_RETVAL], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gt_LOCALE_ZH_CN]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character], + [gl_cv_func_mbrtowc_nul_retval], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on Solaris 8 and 9. + solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; + esac +changequote([,])dnl + if test $LOCALE_ZH_CN != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + /* This fails on Solaris 8 and 9. */ + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + mbstate_t state; + wchar_t wc; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (&wc, "", 1, &state) != 0) + return 1; + } + return 0; +}]])], + [gl_cv_func_mbrtowc_nul_retval=yes], + [gl_cv_func_mbrtowc_nul_retval=no], + [:]) + fi + ]) +]) + +# Prerequisites of lib/mbrtowc.c. +AC_DEFUN([gl_PREREQ_MBRTOWC], [ + : +]) + + +dnl From Paul Eggert + +dnl This is an override of an autoconf macro. + +AC_DEFUN([AC_FUNC_MBRTOWC], +[ + dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. + AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], + gl_cv_func_mbrtowc, + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include ]], + [[wchar_t wc; + char const s[] = ""; + size_t n = 1; + mbstate_t state; + return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], + gl_cv_func_mbrtowc=yes, + gl_cv_func_mbrtowc=no)]) + if test $gl_cv_func_mbrtowc = yes; then + AC_DEFINE([HAVE_MBRTOWC], [1], + [Define to 1 if mbrtowc and mbstate_t are properly declared.]) + fi +]) diff --git a/gl/m4/mbsinit.m4 b/gl/m4/mbsinit.m4 new file mode 100644 index 0000000..e1598a1 --- /dev/null +++ b/gl/m4/mbsinit.m4 @@ -0,0 +1,51 @@ +# mbsinit.m4 serial 8 +dnl Copyright (C) 2008, 2010-2014 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_MBSINIT], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + gl_MBSTATE_T_BROKEN + + AC_CHECK_FUNCS_ONCE([mbsinit]) + if test $ac_cv_func_mbsinit = no; then + HAVE_MBSINIT=0 + AC_CHECK_DECLS([mbsinit],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +]]) + if test $ac_cv_have_decl_mbsinit = yes; then + dnl On Minix 3.1.8, the system's declares mbsinit() although + dnl it does not have the function. Avoid a collision with gnulib's + dnl replacement. + REPLACE_MBSINIT=1 + fi + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBSINIT=1 + else + dnl On mingw, mbsinit() always returns 1, which is inappropriate for + dnl states produced by mbrtowc() for an incomplete multibyte character + dnl in multibyte locales. + case "$host_os" in + mingw*) REPLACE_MBSINIT=1 ;; + esac + fi + fi +]) + +# Prerequisites of lib/mbsinit.c. +AC_DEFUN([gl_PREREQ_MBSINIT], [ + : +]) diff --git a/gl/m4/mbslen.m4 b/gl/m4/mbslen.m4 new file mode 100644 index 0000000..1dc1940 --- /dev/null +++ b/gl/m4/mbslen.m4 @@ -0,0 +1,16 @@ +# mbslen.m4 serial 2 +dnl Copyright (C) 2010-2014 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_MBSLEN], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([mbslen]) + if test $ac_cv_func_mbslen = yes; then + HAVE_MBSLEN=1 + else + HAVE_MBSLEN=0 + fi +]) diff --git a/gl/m4/mbsrtowcs.m4 b/gl/m4/mbsrtowcs.m4 new file mode 100644 index 0000000..6967f35 --- /dev/null +++ b/gl/m4/mbsrtowcs.m4 @@ -0,0 +1,155 @@ +# mbsrtowcs.m4 serial 13 +dnl Copyright (C) 2008-2014 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_MBSRTOWCS], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + gl_MBSTATE_T_BROKEN + + AC_CHECK_FUNCS_ONCE([mbsrtowcs]) + if test $ac_cv_func_mbsrtowcs = no; then + HAVE_MBSRTOWCS=0 + AC_CHECK_DECLS([mbsrtowcs],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +]]) + if test $ac_cv_have_decl_mbsrtowcs = yes; then + dnl On Minix 3.1.8, the system's declares mbsrtowcs() although + dnl it does not have the function. Avoid a collision with gnulib's + dnl replacement. + REPLACE_MBSRTOWCS=1 + fi + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_MBSRTOWCS=1 + else + gl_MBSRTOWCS_WORKS + case "$gl_cv_func_mbsrtowcs_works" in + *yes) ;; + *) REPLACE_MBSRTOWCS=1 ;; + esac + fi + fi +]) + +dnl Test whether mbsrtowcs works. +dnl Result is gl_cv_func_mbsrtowcs_works. + +AC_DEFUN([gl_MBSRTOWCS_WORKS], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gt_LOCALE_FR]) + AC_REQUIRE([gt_LOCALE_FR_UTF8]) + AC_REQUIRE([gt_LOCALE_JA]) + AC_REQUIRE([gt_LOCALE_ZH_CN]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether mbsrtowcs works], + [gl_cv_func_mbsrtowcs_works], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on HP-UX, Solaris, mingw. + hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; + esac +changequote([,])dnl + if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + int result = 0; + /* Test whether the function supports a NULL destination argument. + This fails on native Windows. */ + if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) + { + const char input[] = "\337er"; + const char *src = input; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbsrtowcs (NULL, &src, 1, &state) != 3 + || src != input) + result |= 1; + } + /* Test whether the function works when started with a conversion state + in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + const char input[] = "B\303\274\303\237er"; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) + if (!mbsinit (&state)) + { + const char *src = input + 2; + if (mbsrtowcs (NULL, &src, 10, &state) != 4) + result |= 2; + } + } + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + const char input[] = "<\306\374\313\334\270\354>"; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) + if (!mbsinit (&state)) + { + const char *src = input + 4; + if (mbsrtowcs (NULL, &src, 10, &state) != 3) + result |= 4; + } + } + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + const char input[] = "B\250\271\201\060\211\070er"; + mbstate_t state; + + memset (&state, '\0', sizeof (mbstate_t)); + if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) + if (!mbsinit (&state)) + { + const char *src = input + 2; + if (mbsrtowcs (NULL, &src, 10, &state) != 4) + result |= 8; + } + } + return result; +}]])], + [gl_cv_func_mbsrtowcs_works=yes], + [gl_cv_func_mbsrtowcs_works=no], + [:]) + fi + ]) +]) + +# Prerequisites of lib/mbsrtowcs.c. +AC_DEFUN([gl_PREREQ_MBSRTOWCS], [ + : +]) diff --git a/gl/m4/mbstate_t.m4 b/gl/m4/mbstate_t.m4 new file mode 100644 index 0000000..068155a --- /dev/null +++ b/gl/m4/mbstate_t.m4 @@ -0,0 +1,41 @@ +# mbstate_t.m4 serial 13 +dnl Copyright (C) 2000-2002, 2008-2014 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. + +# From Paul Eggert. + +# BeOS 5 has but does not define mbstate_t, +# so you can't declare an object of that type. +# Check for this incompatibility with Standard C. + +# AC_TYPE_MBSTATE_T +# ----------------- +AC_DEFUN([AC_TYPE_MBSTATE_T], +[ + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11 + + AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include ]], + [[mbstate_t x; return sizeof x;]])], + [ac_cv_type_mbstate_t=yes], + [ac_cv_type_mbstate_t=no])]) + if test $ac_cv_type_mbstate_t = yes; then + AC_DEFINE([HAVE_MBSTATE_T], [1], + [Define to 1 if declares mbstate_t.]) + else + AC_DEFINE([mbstate_t], [int], + [Define to a type if does not define.]) + fi +]) diff --git a/gl/m4/mbtowc.m4 b/gl/m4/mbtowc.m4 new file mode 100644 index 0000000..cacfe16 --- /dev/null +++ b/gl/m4/mbtowc.m4 @@ -0,0 +1,19 @@ +# mbtowc.m4 serial 2 +dnl Copyright (C) 2011-2014 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_MBTOWC], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + + if false; then + REPLACE_MBTOWC=1 + fi +]) + +# Prerequisites of lib/mbtowc.c. +AC_DEFUN([gl_PREREQ_MBTOWC], [ + : +]) diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4 new file mode 100644 index 0000000..b9f126c --- /dev/null +++ b/gl/m4/memchr.m4 @@ -0,0 +1,88 @@ +# memchr.m4 serial 12 +dnl Copyright (C) 2002-2004, 2009-2014 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_ONCE([gl_FUNC_MEMCHR], +[ + 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_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + m4_ifdef([gl_FUNC_MEMCHR_OBSOLETE], [ + dnl These days, we assume memchr is present. But if support for old + dnl platforms is desired: + AC_CHECK_FUNCS_ONCE([memchr]) + if test $ac_cv_func_memchr = no; then + HAVE_MEMCHR=0 + fi + ]) + if test $HAVE_MEMCHR = 1; then + # Detect platform-specific bugs in some versions of glibc: + # memchr should not dereference anything with length 0 + # http://bugzilla.redhat.com/499689 + # memchr should not dereference overestimated length after a match + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 + # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 + # Assume that memchr works on platforms that lack mprotect. + AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#if HAVE_SYS_MMAN_H +# include +# include +# include +# include +# ifndef MAP_FILE +# define MAP_FILE 0 +# endif +#endif +]], [[ + int result = 0; + char *fence = NULL; +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT +# if HAVE_MAP_ANONYMOUS + const int flags = MAP_ANONYMOUS | MAP_PRIVATE; + const int fd = -1; +# else /* !HAVE_MAP_ANONYMOUS */ + const int flags = MAP_FILE | MAP_PRIVATE; + int fd = open ("/dev/zero", O_RDONLY, 0666); + if (fd >= 0) +# endif + { + int pagesize = getpagesize (); + char *two_pages = + (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, + flags, fd, 0); + if (two_pages != (char *)(-1) + && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) + fence = two_pages + pagesize; + } +#endif + if (fence) + { + if (memchr (fence, 0, 0)) + result |= 1; + strcpy (fence - 9, "12345678"); + if (memchr (fence - 9, 0, 79) != fence - 1) + result |= 2; + if (memchr (fence - 1, 0, 3) != fence - 1) + result |= 4; + } + return result; +]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], + [dnl Be pessimistic for now. + gl_cv_func_memchr_works="guessing no"])]) + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_MEMCHR=1 + fi + fi +]) + +# Prerequisites of lib/memchr.c. +AC_DEFUN([gl_PREREQ_MEMCHR], [ + AC_CHECK_HEADERS([bp-sym.h]) +]) diff --git a/gl/m4/mempcpy.m4 b/gl/m4/mempcpy.m4 new file mode 100644 index 0000000..b6d0b14 --- /dev/null +++ b/gl/m4/mempcpy.m4 @@ -0,0 +1,26 @@ +# mempcpy.m4 serial 11 +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_MEMPCPY], +[ + dnl Persuade glibc to declare mempcpy(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'. + AC_REQUIRE([AC_C_RESTRICT]) + + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_CHECK_FUNCS([mempcpy]) + if test $ac_cv_func_mempcpy = no; then + HAVE_MEMPCPY=0 + fi +]) + +# Prerequisites of lib/mempcpy.c. +AC_DEFUN([gl_PREREQ_MEMPCPY], [ + : +]) diff --git a/gl/m4/memrchr.m4 b/gl/m4/memrchr.m4 new file mode 100644 index 0000000..5dbe4d1 --- /dev/null +++ b/gl/m4/memrchr.m4 @@ -0,0 +1,23 @@ +# memrchr.m4 serial 10 +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_MEMRCHR], +[ + dnl Persuade glibc to declare memrchr(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_CHECK_DECLS_ONCE([memrchr]) + if test $ac_cv_have_decl_memrchr = no; then + HAVE_DECL_MEMRCHR=0 + fi + + AC_CHECK_FUNCS([memrchr]) +]) + +# Prerequisites of lib/memrchr.c. +AC_DEFUN([gl_PREREQ_MEMRCHR], [:]) diff --git a/gl/m4/mktime.m4 b/gl/m4/mktime.m4 new file mode 100644 index 0000000..e8d340a --- /dev/null +++ b/gl/m4/mktime.m4 @@ -0,0 +1,253 @@ +# serial 25 +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Jim Meyering. + +AC_DEFUN([gl_FUNC_MKTIME], +[ + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + + dnl We don't use AC_FUNC_MKTIME any more, because it is no longer maintained + dnl in Autoconf and because it invokes AC_LIBOBJ. + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_CHECK_DECLS_ONCE([alarm]) + AC_REQUIRE([gl_MULTIARCH]) + if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple Mac OS X platforms. + # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. + # But we need a configuration result that is valid in both modes. + gl_cv_func_working_mktime=no + fi + AC_CACHE_CHECK([for working mktime], [gl_cv_func_working_mktime], + [AC_RUN_IFELSE( + [AC_LANG_SOURCE( +[[/* Test program from Paul Eggert and Tony Leneis. */ +#include +#include +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#if HAVE_DECL_ALARM +# include +#endif + +/* Work around redefinition to rpl_putenv by other config tests. */ +#undef putenv + +static time_t time_t_max; +static time_t time_t_min; + +/* Values we'll use to set the TZ environment variable. */ +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" +}; +#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +static int +spring_forward_gap () +{ + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; + tm.tm_mday = 5; + tm.tm_hour = 2; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + return mktime (&tm) != (time_t) -1; +} + +static int +mktime_test1 (time_t now) +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (time_t now) +{ + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) + && mktime_test1 ((time_t) (time_t_min + now))); +} + +static int +irix_6_4_bug () +{ + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + return tm.tm_mon == 2 && tm.tm_mday == 31; +} + +static int +bigtime_test (int j) +{ + struct tm tm; + time_t now; + tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + now = mktime (&tm); + if (now != (time_t) -1) + { + struct tm *lt = localtime (&now); + if (! (lt + && lt->tm_year == tm.tm_year + && lt->tm_mon == tm.tm_mon + && lt->tm_mday == tm.tm_mday + && lt->tm_hour == tm.tm_hour + && lt->tm_min == tm.tm_min + && lt->tm_sec == tm.tm_sec + && lt->tm_yday == tm.tm_yday + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) + return 0; + } + return 1; +} + +static int +year_2050_test () +{ + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ + unsigned long int answer = 2527315200UL; + + struct tm tm; + time_t t; + tm.tm_year = 2050 - 1900; + tm.tm_mon = 2 - 1; + tm.tm_mday = 1; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = -1; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + t = mktime (&tm); + + /* Check that the result is either a failure, or close enough + to the correct answer that we can assume the discrepancy is + due to leap seconds. */ + return (t == (time_t) -1 + || (0 < t && answer - 120 <= t && t <= answer + 120)); +} + +int +main () +{ + int result = 0; + time_t t, delta; + int i, j; + int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; + int time_t_signed = ! ((time_t) 0 < (time_t) -1); + +#if HAVE_DECL_ALARM + /* This test makes some buggy mktime implementations loop. + Give up after 60 seconds; a mktime slower than that + isn't worth using anyway. */ + signal (SIGALRM, SIG_DFL); + alarm (60); +#endif + + time_t_max = (! time_t_signed + ? (time_t) -1 + : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) + * 2 + 1)); + time_t_min = (! time_t_signed + ? (time_t) 0 + : time_t_signed_magnitude + ? ~ (time_t) 0 + : ~ time_t_max); + + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) + putenv (tz_strings[i]); + + for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta) + if (! mktime_test (t)) + result |= 1; + if ((result & 2) == 0 + && ! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) + result |= 2; + + for (j = 1; (result & 4) == 0; j <<= 1) + { + if (! bigtime_test (j)) + result |= 4; + if (INT_MAX / 2 < j) + break; + } + if ((result & 8) == 0 && ! bigtime_test (INT_MAX)) + result |= 8; + } + if (! irix_6_4_bug ()) + result |= 16; + if (! spring_forward_gap ()) + result |= 32; + if (! year_2050_test ()) + result |= 64; + return result; +}]])], + [gl_cv_func_working_mktime=yes], + [gl_cv_func_working_mktime=no], + [gl_cv_func_working_mktime=no]) + ]) + + if test $gl_cv_func_working_mktime = no; then + REPLACE_MKTIME=1 + else + REPLACE_MKTIME=0 + fi +]) + +AC_DEFUN([gl_FUNC_MKTIME_INTERNAL], [ + AC_REQUIRE([gl_FUNC_MKTIME]) + if test $REPLACE_MKTIME = 0; then + dnl BeOS has __mktime_internal in libc, but other platforms don't. + AC_CHECK_FUNC([__mktime_internal], + [AC_DEFINE([mktime_internal], [__mktime_internal], + [Define to the real name of the mktime_internal function.]) + ], + [dnl mktime works but it doesn't export __mktime_internal, + dnl so we need to substitute our own mktime implementation. + REPLACE_MKTIME=1 + ]) + fi +]) + +# Prerequisites of lib/mktime.c. +AC_DEFUN([gl_PREREQ_MKTIME], [:]) diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4 new file mode 100644 index 0000000..94ae2e2 --- /dev/null +++ b/gl/m4/mmap-anon.m4 @@ -0,0 +1,55 @@ +# mmap-anon.m4 serial 10 +dnl Copyright (C) 2005, 2007, 2009-2014 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. + +# Detect how mmap can be used to create anonymous (not file-backed) memory +# mappings. +# - 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 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. + +AC_DEFUN([gl_FUNC_MMAP_ANON], +[ + dnl Persuade glibc to define MAP_ANONYMOUS. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it + # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is + # irrelevant for anonymous mappings. + AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no]) + + # Try to allow MAP_ANONYMOUS. + gl_have_mmap_anonymous=no + if test $gl_have_mmap = yes; then + AC_MSG_CHECKING([for MAP_ANONYMOUS]) + AC_EGREP_CPP([I cannot identify this map], [ +#include +#ifdef MAP_ANONYMOUS + I cannot identify this map +#endif +], + [gl_have_mmap_anonymous=yes]) + if test $gl_have_mmap_anonymous != yes; then + AC_EGREP_CPP([I cannot identify this map], [ +#include +#ifdef MAP_ANON + I cannot identify this map +#endif +], + [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], + [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.]) + gl_have_mmap_anonymous=yes]) + fi + AC_MSG_RESULT([$gl_have_mmap_anonymous]) + if test $gl_have_mmap_anonymous = yes; then + AC_DEFINE([HAVE_MAP_ANONYMOUS], [1], + [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including + config.h and .]) + fi + fi +]) diff --git a/gl/m4/mode_t.m4 b/gl/m4/mode_t.m4 new file mode 100644 index 0000000..db6e192 --- /dev/null +++ b/gl/m4/mode_t.m4 @@ -0,0 +1,26 @@ +# mode_t.m4 serial 2 +dnl Copyright (C) 2009-2014 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. + +# For using mode_t, it's sufficient to use AC_TYPE_MODE_T and +# include . + +# Define PROMOTED_MODE_T to the type that is the result of "default argument +# promotion" (ISO C 6.5.2.2.(6)) of the type mode_t. +AC_DEFUN([gl_PROMOTED_TYPE_MODE_T], +[ + AC_REQUIRE([AC_TYPE_MODE_T]) + AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [ + dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int', + dnl and to itself otherwise. This assumption is not guaranteed by the ISO C + dnl standard, but we don't know of any real-world counterexamples. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])], + [gl_cv_promoted_mode_t='int'], + [gl_cv_promoted_mode_t='mode_t']) + ]) + AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t], + [Define to the type that is the result of default argument promotions of type mode_t.]) +]) diff --git a/gl/m4/modechange.m4 b/gl/m4/modechange.m4 new file mode 100644 index 0000000..b89101e --- /dev/null +++ b/gl/m4/modechange.m4 @@ -0,0 +1,11 @@ +# modechange.m4 serial 7 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_MODECHANGE], +[ + : +]) diff --git a/gl/m4/modf.m4 b/gl/m4/modf.m4 new file mode 100644 index 0000000..20f2af6 --- /dev/null +++ b/gl/m4/modf.m4 @@ -0,0 +1,83 @@ +# modf.m4 serial 3 +dnl Copyright (C) 2011-2014 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_MODF], +[ + m4_divert_text([DEFAULTS], [gl_modf_required=plain]) + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + + dnl Determine MODF_LIBM. + gl_MATHFUNC([modf], [double], [(double, double *)]) + + m4_ifdef([gl_FUNC_MODF_IEEE], [ + if test $gl_modf_required = ieee && test $REPLACE_MODF = 0; then + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether modf works according to ISO C 99 with IEC 60559], + [gl_cv_func_modf_ieee], + [ + save_LIBS="$LIBS" + LIBS="$LIBS $MODF_LIBM" + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#ifndef __NO_MATH_INLINES +# define __NO_MATH_INLINES 1 /* for glibc */ +#endif +#include +]gl_DOUBLE_MINUS_ZERO_CODE[ +]gl_DOUBLE_SIGNBIT_CODE[ +/* Compare two numbers with ==. + This is a separate function because IRIX 6.5 "cc -O" miscompiles an + 'x == x' test. */ +static int +numeric_equal (double x, double y) +{ + return x == y; +} +static double dummy (double x, double *iptr) { return 0; } +double zero; +double minus_one = - 1.0; +int main (int argc, char *argv[]) +{ + double (*my_modf) (double, double *) = argc ? modf : dummy; + int result = 0; + double i; + double f; + /* Test modf(NaN,...). + This test fails on NetBSD 5.1, Cygwin. */ + f = my_modf (zero / zero, &i); + if (numeric_equal (f, f)) + result |= 1; + /* Test modf(-Inf,...). + This test fails on FreeBSD 6.4, OpenBSD 4.9, IRIX 6.5, OSF/1 5.1. */ + f = my_modf (minus_one / zero, &i); + if (!(f == 0.0) || (signbitd (minus_zerod) && !signbitd (f))) + result |= 2; + return result; +} + ]])], + [gl_cv_func_modf_ieee=yes], + [gl_cv_func_modf_ieee=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_modf_ieee="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_modf_ieee="guessing no" ;; + esac + ]) + LIBS="$save_LIBS" + ]) + case "$gl_cv_func_modf_ieee" in + *yes) ;; + *) REPLACE_MODF=1 ;; + esac + fi + ]) + if test $REPLACE_MODF = 1; then + dnl Find libraries needed to link lib/modf.c. + AC_REQUIRE([gl_FUNC_TRUNC]) + MODF_LIBM="$TRUNC_LIBM" + fi +]) diff --git a/gl/m4/mountlist.m4 b/gl/m4/mountlist.m4 new file mode 100644 index 0000000..f5c60bc --- /dev/null +++ b/gl/m4/mountlist.m4 @@ -0,0 +1,19 @@ +# serial 11 +dnl Copyright (C) 2002-2006, 2009-2014 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_MOUNTLIST], +[ + gl_LIST_MOUNTED_FILE_SYSTEMS([gl_cv_list_mounted_fs=yes], + [gl_cv_list_mounted_fs=no]) +]) + +# Prerequisites of lib/mountlist.c not done by gl_LIST_MOUNTED_FILE_SYSTEMS. +AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA], +[ + dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h. + AC_CHECK_HEADERS([sys/mntent.h]) + gl_FSTYPENAME +]) diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4 new file mode 100644 index 0000000..7f26087 --- /dev/null +++ b/gl/m4/msvc-inval.m4 @@ -0,0 +1,19 @@ +# msvc-inval.m4 serial 1 +dnl Copyright (C) 2011-2014 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_MSVC_INVAL], +[ + AC_CHECK_FUNCS_ONCE([_set_invalid_parameter_handler]) + if test $ac_cv_func__set_invalid_parameter_handler = yes; then + HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 + AC_DEFINE([HAVE_MSVC_INVALID_PARAMETER_HANDLER], [1], + [Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept.]) + else + HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 + fi + AC_SUBST([HAVE_MSVC_INVALID_PARAMETER_HANDLER]) +]) diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4 new file mode 100644 index 0000000..9e32c17 --- /dev/null +++ b/gl/m4/msvc-nothrow.m4 @@ -0,0 +1,10 @@ +# msvc-nothrow.m4 serial 1 +dnl Copyright (C) 2011-2014 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_MSVC_NOTHROW], +[ + AC_REQUIRE([gl_MSVC_INVAL]) +]) diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4 new file mode 100644 index 0000000..2cb956d --- /dev/null +++ b/gl/m4/multiarch.m4 @@ -0,0 +1,62 @@ +# multiarch.m4 serial 7 +dnl Copyright (C) 2008-2014 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 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 +# this: +# +# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ +# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ +# CPP="gcc -E" CXXCPP="g++ -E" +# +# Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly. + +AC_DEFUN_ONCE([gl_MULTIARCH], +[ + dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. + gl_cv_c_multiarch=no + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + ]])], + [ + dnl Check for potential -arch flags. It is not universal unless + dnl there are at least two -arch flags with different values. + arch= + prev= + for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do + if test -n "$prev"; then + case $word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$arch" || test "$arch" = "$word"; then + arch="$word" + else + gl_cv_c_multiarch=yes + fi + ;; + esac + prev= + else + if test "x$word" = "x-arch"; then + prev=arch + fi + fi + done + ]) + if test $gl_cv_c_multiarch = yes; then + APPLE_UNIVERSAL_BUILD=1 + else + APPLE_UNIVERSAL_BUILD=0 + fi + AC_SUBST([APPLE_UNIVERSAL_BUILD]) +]) diff --git a/gl/m4/nanosleep.m4 b/gl/m4/nanosleep.m4 new file mode 100644 index 0000000..d1d6111 --- /dev/null +++ b/gl/m4/nanosleep.m4 @@ -0,0 +1,148 @@ +# serial 36 + +dnl From Jim Meyering. +dnl Check for the nanosleep function. +dnl If not found, use the supplied replacement. +dnl + +# Copyright (C) 1999-2001, 2003-2014 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. + +AC_DEFUN([gl_FUNC_NANOSLEEP], +[ + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade glibc and Solaris to declare nanosleep. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_HEADERS_ONCE([sys/time.h]) + AC_REQUIRE([gl_FUNC_SELECT]) + + nanosleep_save_libs=$LIBS + + # Solaris 2.5.1 needs -lposix4 to get the nanosleep function. + # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. + LIB_NANOSLEEP= + AC_SUBST([LIB_NANOSLEEP]) + AC_SEARCH_LIBS([nanosleep], [rt posix4], + [test "$ac_cv_search_nanosleep" = "none required" || + LIB_NANOSLEEP=$ac_cv_search_nanosleep]) + if test "x$ac_cv_search_nanosleep" != xno; then + dnl The system has a nanosleep function. + + AC_REQUIRE([gl_MULTIARCH]) + if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple Mac OS X platforms. + # The test result would be 'no (mishandles large arguments)' in 64-bit + # mode but 'yes' in 32-bit mode. But we need a configuration result that + # is valid in both modes. + gl_cv_func_nanosleep='no (mishandles large arguments)' + fi + + AC_CACHE_CHECK([for working nanosleep], + [gl_cv_func_nanosleep], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ + #include + #include + #include + #if HAVE_SYS_TIME_H + #include + #endif + #include + #include + #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + #define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) + + static void + check_for_SIGALRM (int sig) + { + if (sig != SIGALRM) + _exit (1); + } + + int + main () + { + static struct timespec ts_sleep; + static struct timespec ts_remaining; + static struct sigaction act; + /* Test for major problems first. */ + if (! nanosleep) + return 2; + act.sa_handler = check_for_SIGALRM; + sigemptyset (&act.sa_mask); + sigaction (SIGALRM, &act, NULL); + ts_sleep.tv_sec = 0; + ts_sleep.tv_nsec = 1; + alarm (1); + if (nanosleep (&ts_sleep, NULL) != 0) + return 3; + /* Test for a minor problem: the handling of large arguments. */ + ts_sleep.tv_sec = TYPE_MAXIMUM (time_t); + ts_sleep.tv_nsec = 999999999; + alarm (1); + if (nanosleep (&ts_sleep, &ts_remaining) != -1) + return 4; + if (errno != EINTR) + return 5; + if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10) + return 6; + return 0; + }]])], + [gl_cv_func_nanosleep=yes], + [case $? in dnl ( + 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; dnl ( + *) gl_cv_func_nanosleep=no;; + esac], + [case "$host_os" in dnl (( + linux*) # Guess it halfway works when the kernel is Linux. + gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;; + *) # If we don't know, assume the worst. + gl_cv_func_nanosleep='guessing no' ;; + esac + ]) + ]) + case "$gl_cv_func_nanosleep" in + *yes) + REPLACE_NANOSLEEP=0 + ;; + *) + REPLACE_NANOSLEEP=1 + case "$gl_cv_func_nanosleep" in + *"mishandles large arguments"*) + AC_DEFINE([HAVE_BUG_BIG_NANOSLEEP], [1], + [Define to 1 if nanosleep mishandles large arguments.]) + ;; + *) + # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP. + for ac_lib in $LIBSOCKET; do + case " $LIB_NANOSLEEP " in + *" $ac_lib "*) ;; + *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";; + esac + done + ;; + esac + ;; + esac + else + HAVE_NANOSLEEP=0 + fi + LIBS=$nanosleep_save_libs +]) + +# Prerequisites of lib/nanosleep.c. +AC_DEFUN([gl_PREREQ_NANOSLEEP], +[ + AC_CHECK_HEADERS_ONCE([sys/select.h]) + gl_PREREQ_SIG_HANDLER_H +]) diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4 new file mode 100644 index 0000000..1d447d6 --- /dev/null +++ b/gl/m4/netinet_in_h.m4 @@ -0,0 +1,31 @@ +# netinet_in_h.m4 serial 5 +dnl Copyright (C) 2006-2014 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_HEADER_NETINET_IN], +[ + AC_CACHE_CHECK([whether is self-contained], + [gl_cv_header_netinet_in_h_selfcontained], + [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], + [gl_cv_header_netinet_in_h_selfcontained=yes], + [gl_cv_header_netinet_in_h_selfcontained=no]) + ]) + if test $gl_cv_header_netinet_in_h_selfcontained = yes; then + NETINET_IN_H='' + else + NETINET_IN_H='netinet/in.h' + AC_CHECK_HEADERS([netinet/in.h]) + gl_CHECK_NEXT_HEADERS([netinet/in.h]) + if test $ac_cv_header_netinet_in_h = yes; then + HAVE_NETINET_IN_H=1 + else + HAVE_NETINET_IN_H=0 + fi + AC_SUBST([HAVE_NETINET_IN_H]) + fi + AC_SUBST([NETINET_IN_H]) + AM_CONDITIONAL([GL_GENERATE_NETINET_IN_H], [test -n "$NETINET_IN_H"]) +]) diff --git a/gl/m4/nl_langinfo.m4 b/gl/m4/nl_langinfo.m4 new file mode 100644 index 0000000..6976e77 --- /dev/null +++ b/gl/m4/nl_langinfo.m4 @@ -0,0 +1,50 @@ +# nl_langinfo.m4 serial 5 +dnl Copyright (C) 2009-2014 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_NL_LANGINFO], +[ + AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) + AC_REQUIRE([gl_LANGINFO_H]) + AC_CHECK_FUNCS_ONCE([nl_langinfo]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + if test $ac_cv_func_nl_langinfo = yes; then + # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. + AC_CACHE_CHECK([whether YESEXPR works], + [gl_cv_func_nl_langinfo_yesexpr_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM([[#include +]], [[return !*nl_langinfo(YESEXPR); +]])], + [gl_cv_func_nl_langinfo_yesexpr_works=yes], + [gl_cv_func_nl_langinfo_yesexpr_works=no], + [ + case "$host_os" in + # Guess no on irix systems. + irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; + # Guess yes elsewhere. + *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; + esac + ]) + ]) + case $gl_cv_func_nl_langinfo_yesexpr_works in + *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; + *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; + esac + AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS], + [$FUNC_NL_LANGINFO_YESEXPR_WORKS], + [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.]) + if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ + && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then + : + else + REPLACE_NL_LANGINFO=1 + AC_DEFINE([REPLACE_NL_LANGINFO], [1], + [Define if nl_langinfo exists but is overridden by gnulib.]) + fi + else + HAVE_NL_LANGINFO=0 + fi +]) diff --git a/gl/m4/nls.m4 b/gl/m4/nls.m4 new file mode 100644 index 0000000..53cdc8b --- /dev/null +++ b/gl/m4/nls.m4 @@ -0,0 +1,32 @@ +# nls.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 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, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +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 Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.50]) + +AC_DEFUN([AM_NLS], +[ + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE([nls], + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT([$USE_NLS]) + AC_SUBST([USE_NLS]) +]) diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4 new file mode 100644 index 0000000..5a5d77d --- /dev/null +++ b/gl/m4/nocrash.m4 @@ -0,0 +1,130 @@ +# nocrash.m4 serial 4 +dnl Copyright (C) 2005, 2009-2014 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 Based on libsigsegv, from Bruno Haible and Paolo Bonzini. + +AC_PREREQ([2.13]) + +dnl Expands to some code for use in .c programs that will cause the configure +dnl test to exit instead of crashing. This is useful to avoid triggering +dnl action from a background debugger and to avoid core dumps. +dnl Usage: ... +dnl ]GL_NOCRASH[ +dnl ... +dnl int main() { nocrash_init(); ... } +AC_DEFUN([GL_NOCRASH],[[ +#include +#if defined __MACH__ && defined __APPLE__ +/* Avoid a crash on Mac OS X. */ +#include +#include +#include +#include +#include +#include +/* The exception port on which our thread listens. */ +static mach_port_t our_exception_port; +/* The main function of the thread listening for exceptions of type + EXC_BAD_ACCESS. */ +static void * +mach_exception_thread (void *arg) +{ + /* Buffer for a message to be received. */ + struct { + mach_msg_header_t head; + mach_msg_body_t msgh_body; + char data[1024]; + } msg; + mach_msg_return_t retval; + /* Wait for a message on the exception port. */ + retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), + our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + if (retval != MACH_MSG_SUCCESS) + abort (); + exit (1); +} +static void +nocrash_init (void) +{ + mach_port_t self = mach_task_self (); + /* Allocate a port on which the thread shall listen for exceptions. */ + if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) + == KERN_SUCCESS) { + /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + if (mach_port_insert_right (self, our_exception_port, our_exception_port, + MACH_MSG_TYPE_MAKE_SEND) + == KERN_SUCCESS) { + /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting + for us. */ + exception_mask_t mask = EXC_MASK_BAD_ACCESS; + /* Create the thread listening on the exception port. */ + pthread_attr_t attr; + pthread_t thread; + if (pthread_attr_init (&attr) == 0 + && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 + && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { + pthread_attr_destroy (&attr); + /* Replace the exception port info for these exceptions with our own. + Note that we replace the exception port for the entire task, not only + for a particular thread. This has the effect that when our exception + port gets the message, the thread specific exception port has already + been asked, and we don't need to bother about it. + See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + task_set_exception_ports (self, mask, our_exception_port, + EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); + } + } + } +} +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Avoid a crash on native Windows. */ +#define WIN32_LEAN_AND_MEAN +#include +#include +static LONG WINAPI +exception_filter (EXCEPTION_POINTERS *ExceptionInfo) +{ + switch (ExceptionInfo->ExceptionRecord->ExceptionCode) + { + case EXCEPTION_ACCESS_VIOLATION: + case EXCEPTION_IN_PAGE_ERROR: + case EXCEPTION_STACK_OVERFLOW: + case EXCEPTION_GUARD_PAGE: + case EXCEPTION_PRIV_INSTRUCTION: + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_NONCONTINUABLE_EXCEPTION: + exit (1); + } + return EXCEPTION_CONTINUE_SEARCH; +} +static void +nocrash_init (void) +{ + SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); +} +#else +/* Avoid a crash on POSIX systems. */ +#include +/* A POSIX signal handler. */ +static void +exception_handler (int sig) +{ + exit (1); +} +static void +nocrash_init (void) +{ +#ifdef SIGSEGV + signal (SIGSEGV, exception_handler); +#endif +#ifdef SIGBUS + signal (SIGBUS, exception_handler); +#endif +} +#endif +]]) diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4 new file mode 100644 index 0000000..f5885b3 --- /dev/null +++ b/gl/m4/off_t.m4 @@ -0,0 +1,18 @@ +# off_t.m4 serial 1 +dnl Copyright (C) 2012-2014 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 Check whether to override the 'off_t' type. +dnl Set WINDOWS_64_BIT_OFF_T. + +AC_DEFUN([gl_TYPE_OFF_T], +[ + m4_ifdef([gl_LARGEFILE], [ + AC_REQUIRE([gl_LARGEFILE]) + ], [ + WINDOWS_64_BIT_OFF_T=0 + ]) + AC_SUBST([WINDOWS_64_BIT_OFF_T]) +]) diff --git a/gl/m4/onceonly.m4 b/gl/m4/onceonly.m4 new file mode 100644 index 0000000..15f94ce --- /dev/null +++ b/gl/m4/onceonly.m4 @@ -0,0 +1,104 @@ +# onceonly.m4 serial 9 +dnl Copyright (C) 2002-2003, 2005-2006, 2008-2014 Free Software Foundation, +dnl Inc. +dnl +dnl This file is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This file is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this file. If not, see . +dnl +dnl As a special exception to the GNU General Public License, +dnl this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl This file defines some "once only" variants of standard autoconf macros. +dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS +dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS +dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS +dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL +dnl The advantage is that the check for each of the headers/functions/decls +dnl will be put only once into the 'configure' file. It keeps the size of +dnl the 'configure' file down, and avoids redundant output when 'configure' +dnl is run. +dnl The drawback is that the checks cannot be conditionalized. If you write +dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi +dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to +dnl empty, and the check will be inserted before the body of the AC_DEFUNed +dnl function. + +dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE +dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to +dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested +dnl headers at once, thus reducing the size of 'configure'. It is known to work +dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%. + +dnl Autoconf version 2.59 plus gnulib is required; this file is not needed +dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of +dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first +dnl argument! +AC_PREREQ([2.59]) + +# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of +# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). +AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ + : + m4_foreach_w([gl_HEADER_NAME], [$1], [ + AC_DEFUN([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME, + [./-], [___])), [ + m4_divert_text([INIT_PREPARE], + [gl_header_list="$gl_header_list gl_HEADER_NAME"]) + gl_HEADERS_EXPANSION + AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])), + [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.]) + ]) + AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME, + [./-], [___]))) + ]) +]) +m4_define([gl_HEADERS_EXPANSION], [ + m4_divert_text([DEFAULTS], [gl_header_list=]) + AC_CHECK_HEADERS([$gl_header_list]) + m4_define([gl_HEADERS_EXPANSION], []) +]) + +# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of +# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). +AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ + : + m4_foreach_w([gl_FUNC_NAME], [$1], [ + AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ + m4_divert_text([INIT_PREPARE], + [gl_func_list="$gl_func_list gl_FUNC_NAME"]) + gl_FUNCS_EXPANSION + AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])), + [Define to 1 if you have the ']m4_defn([gl_FUNC_NAME])[' function.]) + ]) + AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) + ]) +]) +m4_define([gl_FUNCS_EXPANSION], [ + m4_divert_text([DEFAULTS], [gl_func_list=]) + AC_CHECK_FUNCS([$gl_func_list]) + m4_define([gl_FUNCS_EXPANSION], []) +]) + +# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of +# AC_CHECK_DECLS(DECL1, DECL2, ...). +AC_DEFUN([AC_CHECK_DECLS_ONCE], [ + : + m4_foreach_w([gl_DECL_NAME], [$1], [ + AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ + AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) + ]) + AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) + ]) +]) diff --git a/gl/m4/open.m4 b/gl/m4/open.m4 new file mode 100644 index 0000000..68f116f --- /dev/null +++ b/gl/m4/open.m4 @@ -0,0 +1,91 @@ +# open.m4 serial 14 +dnl Copyright (C) 2007-2014 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_OPEN], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + mingw* | pw*) + REPLACE_OPEN=1 + ;; + *) + dnl open("foo/") should not create a file when the file name has a + dnl trailing slash. FreeBSD only has the problem on symlinks. + AC_CHECK_FUNCS_ONCE([lstat]) + AC_CACHE_CHECK([whether open recognizes a trailing slash], + [gl_cv_func_open_slash], + [# Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + touch conftest.tmp + ln -s conftest.tmp conftest.lnk + fi + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#if HAVE_UNISTD_H +# include +#endif +int main () +{ + int result = 0; +#if HAVE_LSTAT + if (open ("conftest.lnk/", O_RDONLY) != -1) + result |= 1; +#endif + if (open ("conftest.sl/", O_CREAT, 0600) >= 0) + result |= 2; + return result; +}]])], + [gl_cv_func_open_slash=yes], + [gl_cv_func_open_slash=no], + [ +changequote(,)dnl + case "$host_os" in + freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) + gl_cv_func_open_slash="guessing no" ;; + *) + gl_cv_func_open_slash="guessing yes" ;; + esac +changequote([,])dnl + ]) + rm -f conftest.sl conftest.tmp conftest.lnk + ]) + case "$gl_cv_func_open_slash" in + *no) + AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], + [Define to 1 if open() fails to recognize a trailing slash.]) + REPLACE_OPEN=1 + ;; + esac + ;; + esac + dnl Replace open() for supporting the gnulib-defined fchdir() function, + dnl to keep fchdir's bookkeeping up-to-date. + m4_ifdef([gl_FUNC_FCHDIR], [ + if test $REPLACE_OPEN = 0; then + gl_TEST_FCHDIR + if test $HAVE_FCHDIR = 0; then + REPLACE_OPEN=1 + fi + fi + ]) + dnl Replace open() for supporting the gnulib-defined O_NONBLOCK flag. + m4_ifdef([gl_NONBLOCKING_IO], [ + if test $REPLACE_OPEN = 0; then + gl_NONBLOCKING_IO + if test $gl_cv_have_open_O_NONBLOCK != yes; then + REPLACE_OPEN=1 + fi + fi + ]) +]) + +# Prerequisites of lib/open.c. +AC_DEFUN([gl_PREREQ_OPEN], +[ + AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) + : +]) diff --git a/gl/m4/openat.m4 b/gl/m4/openat.m4 new file mode 100644 index 0000000..ad1d9d3 --- /dev/null +++ b/gl/m4/openat.m4 @@ -0,0 +1,36 @@ +# serial 45 +# See if we need to use our replacement for Solaris' openat et al functions. + +dnl Copyright (C) 2004-2014 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. + +# Written by Jim Meyering. + +AC_DEFUN([gl_FUNC_OPENAT], +[ + AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([openat]) + AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) + case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in + yes+*yes) + ;; + yes+*) + # Solaris 9 has *at functions, but uniformly mishandles trailing + # slash in all of them. + REPLACE_OPENAT=1 + ;; + *) + HAVE_OPENAT=0 + ;; + esac +]) + +# Prerequisites of lib/openat.c. +AC_DEFUN([gl_PREREQ_OPENAT], +[ + AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) + : +]) diff --git a/gl/m4/opendir.m4 b/gl/m4/opendir.m4 new file mode 100644 index 0000000..fa29c64 --- /dev/null +++ b/gl/m4/opendir.m4 @@ -0,0 +1,25 @@ +# opendir.m4 serial 2 +dnl Copyright (C) 2011-2014 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_OPENDIR], +[ + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + + AC_CHECK_FUNCS([opendir]) + if test $ac_cv_func_opendir = no; then + HAVE_OPENDIR=0 + fi + dnl Replace opendir() for supporting the gnulib-defined fchdir() function, + dnl to keep fchdir's bookkeeping up-to-date. + m4_ifdef([gl_FUNC_FCHDIR], [ + gl_TEST_FCHDIR + if test $HAVE_FCHDIR = 0; then + if test $HAVE_OPENDIR = 1; then + REPLACE_OPENDIR=1 + fi + fi + ]) +]) diff --git a/gl/m4/parse-datetime.m4 b/gl/m4/parse-datetime.m4 new file mode 100644 index 0000000..7873009 --- /dev/null +++ b/gl/m4/parse-datetime.m4 @@ -0,0 +1,55 @@ +# parse-datetime.m4 serial 21 +dnl Copyright (C) 2002-2006, 2008-2014 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 Define HAVE_COMPOUND_LITERALS if the C compiler supports compound literals +dnl as in ISO C99. +dnl Note that compound literals such as (struct s) { 3, 4 } can be used for +dnl initialization of stack-allocated variables, but are not constant +dnl expressions and therefore cannot be used as initializer for global or +dnl static variables (even though gcc supports this in pre-C99 mode). +AC_DEFUN([gl_C_COMPOUND_LITERALS], +[ + AC_CACHE_CHECK([for compound literals], [gl_cv_compound_literals], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[struct s { int i, j; };]], + [[struct s t = (struct s) { 3, 4 }; + if (t.i != 0) return 0;]])], + gl_cv_compound_literals=yes, + gl_cv_compound_literals=no)]) + if test $gl_cv_compound_literals = yes; then + AC_DEFINE([HAVE_COMPOUND_LITERALS], [1], + [Define if you have compound literals.]) + fi +]) + +AC_DEFUN([gl_PARSE_DATETIME], +[ + dnl Prerequisites of lib/parse-datetime.h. + AC_REQUIRE([AM_STDBOOL_H]) + AC_REQUIRE([gl_TIMESPEC]) + + dnl Prerequisites of lib/parse-datetime.y. + AC_REQUIRE([gl_BISON]) + AC_REQUIRE([gl_C_COMPOUND_LITERALS]) + AC_STRUCT_TIMEZONE + AC_REQUIRE([gl_CLOCK_TIME]) + AC_REQUIRE([gl_TM_GMTOFF]) + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[ +#include /* for time_t */ +#include /* for CHAR_BIT, LONG_MIN, LONG_MAX */ +#define TYPE_MINIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) ((t) 0 < (t) -1 \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) +typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1]; +typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1]; + ]])], + [AC_DEFINE([TIME_T_FITS_IN_LONG_INT], [1], + [Define to 1 if all 'time_t' values fit in a 'long int'.]) + ]) +]) diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4 new file mode 100644 index 0000000..114f91f --- /dev/null +++ b/gl/m4/pathmax.m4 @@ -0,0 +1,42 @@ +# pathmax.m4 serial 10 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_PATHMAX], +[ + dnl Prerequisites of lib/pathmax.h. + AC_CHECK_HEADERS_ONCE([sys/param.h]) +]) + +# Expands to a piece of C program that defines PATH_MAX in the same way as +# "pathmax.h" will do. +AC_DEFUN([gl_PATHMAX_SNIPPET], [[ +/* Arrange to define PATH_MAX, like "pathmax.h" does. */ +#if HAVE_UNISTD_H +# include +#endif +#include +#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN +# include +#endif +#if !defined PATH_MAX && defined MAXPATHLEN +# define PATH_MAX MAXPATHLEN +#endif +#ifdef __hpux +# undef PATH_MAX +# define PATH_MAX 1024 +#endif +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# undef PATH_MAX +# define PATH_MAX 260 +#endif +]]) + +# Prerequisites of gl_PATHMAX_SNIPPET. +AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ], +[ + AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h]) +]) diff --git a/gl/m4/perror.m4 b/gl/m4/perror.m4 new file mode 100644 index 0000000..ff9c08f --- /dev/null +++ b/gl/m4/perror.m4 @@ -0,0 +1,63 @@ +# perror.m4 serial 6 +dnl Copyright (C) 2008-2014 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_PERROR], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([gl_HEADER_ERRNO_H]) + AC_REQUIRE([gl_FUNC_STRERROR_R]) + AC_REQUIRE([gl_FUNC_STRERROR_0]) + dnl We intentionally do not check for the broader REPLACE_STRERROR_R, + dnl since on glibc systems, strerror_r is replaced only for signature + dnl issues, and perror is just fine. Rather, we only want to + dnl replace perror if strerror_r was replaced for a content fix. + if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then + dnl The system's perror() cannot know about the new errno values we add + dnl to , or any fix for strerror(0). Replace it. + REPLACE_PERROR=1 + fi + case ${gl_cv_func_strerror_r_works-unset} in + unset|*yes) + AC_CACHE_CHECK([whether perror matches strerror], + [gl_cv_func_perror_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + #include + ]], + [[char *str = strerror (-1); + if (!getenv("CONFTEST_OUTPUT")) return 0; + if (!str) str = ""; + puts (str); + errno = -1; + perror (""); + return 0; + ]])], + [if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \ + && cmp conftest.txt1 conftest.txt2 >/dev/null; then + gl_cv_func_perror_works=yes + else + gl_cv_func_perror_works=no + fi + rm -rf conftest.txt1 conftest.txt2], + [gl_cv_func_perror_works=no], + [dnl Guess no when cross-compiling. + gl_cv_func_perror_works="guessing no" + ]) + ]) + if test "$gl_cv_func_perror_works" != yes; then + REPLACE_PERROR=1 + fi + ;; + *) + dnl The system's perror() probably inherits the bugs in the + dnl system's strerror_r(). Replace it. + REPLACE_PERROR=1 + ;; + esac +]) diff --git a/gl/m4/pipe.m4 b/gl/m4/pipe.m4 new file mode 100644 index 0000000..d3532d5 --- /dev/null +++ b/gl/m4/pipe.m4 @@ -0,0 +1,15 @@ +# pipe.m4 serial 2 +dnl Copyright (C) 2010-2014 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_PIPE], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + + AC_CHECK_FUNCS_ONCE([pipe]) + if test $ac_cv_func_pipe != yes; then + HAVE_PIPE=0 + fi +]) diff --git a/gl/m4/po.m4 b/gl/m4/po.m4 new file mode 100644 index 0000000..bd210c5 --- /dev/null +++ b/gl/m4/po.m4 @@ -0,0 +1,453 @@ +# po.m4 serial 21 (gettext-0.18.3) +dnl Copyright (C) 1995-2014 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 +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +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 Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.60]) + +dnl Checks for all prerequisites of the po subdirectory. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AC_PROG_MKDIR_P])dnl + AC_REQUIRE([AC_PROG_SED])dnl + AC_REQUIRE([AM_NLS])dnl + + dnl Release version of the gettext macros. This is used to ensure that + dnl the gettext macros and po/Makefile.in.in are in sync. + AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) + + dnl Test whether it is GNU msgfmt >= 0.15. +changequote(,)dnl + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([MSGFMT_015]) +changequote(,)dnl + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac +changequote([,])dnl + AC_SUBST([GMSGFMT_015]) + + dnl Search for GNU xgettext 0.12 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Test whether it is GNU xgettext >= 0.15. +changequote(,)dnl + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac +changequote([,])dnl + AC_SUBST([XGETTEXT_015]) + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + + dnl Installation directories. + dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we + dnl have to define it here, so that it can be used in po/Makefile. + test -n "$localedir" || localedir='${datadir}/locale' + AC_SUBST([localedir]) + + dnl Support for AM_XGETTEXT_OPTION. + test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= + AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) + + AC_CONFIG_COMMANDS([po-directories], [[ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assignment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assignment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done]], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + +dnl Postprocesses a Makefile in a directory containing PO files. +AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], +[ + # When this code is run, in config.status, two variables have already been + # set: + # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, + # - LINGUAS is the value of the environment variable LINGUAS at configure + # time. + +changequote(,)dnl + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + # Find a way to echo strings without interpreting backslash. + if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='echo' + else + if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then + gt_echo='printf %s\n' + else + echo_func () { + cat < "$ac_file.tmp" + tab=`printf '\t'` + if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` + cat >> "$ac_file.tmp" < /dev/null; then + # Add dependencies that cannot be formulated as a simple suffix rule. + for lang in $ALL_LINGUAS; do + frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` + cat >> "$ac_file.tmp" <> "$ac_file.tmp" < +#include +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +# include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +# include +#endif +static char buf[100]; +int main () +{ + int result = 0; +#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX + buf[0] = '\0'; + if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 + || strcmp (buf, "12345671 33") != 0) + result |= 1; +#endif + buf[0] = '\0'; + if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 + || strcmp (buf, "12345672 33") != 0) + result |= 2; + buf[0] = '\0'; + if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 + || strcmp (buf, "12345673 33") != 0) + result |= 4; + buf[0] = '\0'; + if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 + || strcmp (buf, "1.5 33") != 0) + result |= 8; + return result; +}]])], + [gl_cv_func_printf_sizes_c99=yes], + [gl_cv_func_printf_sizes_c99=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; + # 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 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. + openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) + gl_cv_func_printf_sizes_c99="guessing no";; + openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; + # Guess yes on Solaris >= 2.10. + solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; + solaris*) gl_cv_func_printf_sizes_c99="guessing no";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_printf_sizes_c99="guessing no";; + netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_sizes_c99="guessing no";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports 'long double' +dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001) +dnl Result is gl_cv_func_printf_long_double. + +AC_DEFUN([gl_PRINTF_LONG_DOUBLE], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports 'long double' arguments], + [gl_cv_func_printf_long_double], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +static char buf[10000]; +int main () +{ + int result = 0; + buf[0] = '\0'; + if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 + || strcmp (buf, "1.750000 33") != 0) + result |= 1; + buf[0] = '\0'; + if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 + || strcmp (buf, "1.750000e+00 33") != 0) + result |= 2; + buf[0] = '\0'; + if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 + || strcmp (buf, "1.75 33") != 0) + result |= 4; + return result; +}]])], + [gl_cv_func_printf_long_double=yes], + [gl_cv_func_printf_long_double=no], + [ +changequote(,)dnl + case "$host_os" in + beos*) gl_cv_func_printf_long_double="guessing no";; + mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; + *) gl_cv_func_printf_long_double="guessing yes";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports infinite and NaN +dnl 'double' arguments and negative zero arguments in the %f, %e, %g +dnl directives. (ISO C99, POSIX:2001) +dnl Result is gl_cv_func_printf_infinite. + +AC_DEFUN([gl_PRINTF_INFINITE], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports infinite 'double' arguments], + [gl_cv_func_printf_infinite], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +static int +strisnan (const char *string, size_t start_index, size_t end_index) +{ + if (start_index < end_index) + { + if (string[start_index] == '-') + start_index++; + if (start_index + 3 <= end_index + && memcmp (string + start_index, "nan", 3) == 0) + { + start_index += 3; + if (start_index == end_index + || (string[start_index] == '(' && string[end_index - 1] == ')')) + return 1; + } + } + return 0; +} +static int +have_minus_zero () +{ + static double plus_zero = 0.0; + double minus_zero = - plus_zero; + return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; +} +static char buf[10000]; +static double zero = 0.0; +int main () +{ + int result = 0; + if (sprintf (buf, "%f", 1.0 / zero) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + result |= 1; + if (sprintf (buf, "%f", -1.0 / zero) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + result |= 1; + if (sprintf (buf, "%f", zero / zero) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 2; + if (sprintf (buf, "%e", 1.0 / zero) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + result |= 4; + if (sprintf (buf, "%e", -1.0 / zero) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + result |= 4; + if (sprintf (buf, "%e", zero / zero) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 8; + if (sprintf (buf, "%g", 1.0 / zero) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + result |= 16; + if (sprintf (buf, "%g", -1.0 / zero) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + result |= 16; + if (sprintf (buf, "%g", zero / zero) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 32; + /* This test fails on HP-UX 10.20. */ + if (have_minus_zero ()) + if (sprintf (buf, "%g", - zero) < 0 + || strcmp (buf, "-0") != 0) + result |= 64; + return result; +}]])], + [gl_cv_func_printf_infinite=yes], + [gl_cv_func_printf_infinite=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_infinite="guessing yes";; + # 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 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. + hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; + hpux*) gl_cv_func_printf_infinite="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_printf_infinite="guessing no";; + netbsd*) gl_cv_func_printf_infinite="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_printf_infinite="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_infinite="guessing no";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports infinite and NaN +dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001) +dnl Result is gl_cv_func_printf_infinite_long_double. + +AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE], +[ + AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gl_BIGENDIAN]) + AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + dnl The user can set or unset the variable gl_printf_safe to indicate + dnl that he wishes a safe handling of non-IEEE-754 'long double' values. + if test -n "$gl_printf_safe"; then + AC_DEFINE([CHECK_PRINTF_SAFE], [1], + [Define if you wish *printf() functions that have a safe handling of + non-IEEE-754 'long double' values.]) + fi + case "$gl_cv_func_printf_long_double" in + *yes) + AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments], + [gl_cv_func_printf_infinite_long_double], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +]GL_NOCRASH[ +#include +#include +#include +static int +strisnan (const char *string, size_t start_index, size_t end_index) +{ + if (start_index < end_index) + { + if (string[start_index] == '-') + start_index++; + if (start_index + 3 <= end_index + && memcmp (string + start_index, "nan", 3) == 0) + { + start_index += 3; + if (start_index == end_index + || (string[start_index] == '(' && string[end_index - 1] == ')')) + return 1; + } + } + return 0; +} +static char buf[10000]; +static long double zeroL = 0.0L; +int main () +{ + int result = 0; + nocrash_init(); + if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + result |= 1; + if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + result |= 1; + if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 1; + if (sprintf (buf, "%Le", 1.0L / zeroL) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + result |= 1; + if (sprintf (buf, "%Le", -1.0L / zeroL) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + result |= 1; + if (sprintf (buf, "%Le", zeroL / zeroL) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 1; + if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + result |= 1; + if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + result |= 1; + if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 1; +#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 2; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 2; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 2; + } + { + /* Signalling NaN. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 2; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 2; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 2; + } + { /* Pseudo-NaN. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 4; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 4; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 4; + } + { /* Pseudo-Infinity. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 8; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 8; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 8; + } + { /* Pseudo-Zero. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 16; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 16; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 16; + } + { /* Unnormalized number. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 32; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 32; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 32; + } + { /* Pseudo-Denormal. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 64; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 64; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + result |= 64; + } +#endif + return result; +}]])], + [gl_cv_func_printf_infinite_long_double=yes], + [gl_cv_func_printf_infinite_long_double=no], + [ +changequote(,)dnl + case "$host_cpu" in + # Guess no on ia64, x86_64, i386. + ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; + *) + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # Guess yes on FreeBSD >= 6. + freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # Guess yes on HP-UX >= 11. + hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; + hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_infinite_long_double="guessing no";; + esac + ;; + esac +changequote([,])dnl + ]) + ]) + ;; + *) + gl_cv_func_printf_infinite_long_double="irrelevant" + ;; + esac +]) + +dnl Test whether the *printf family of functions supports the 'a' and 'A' +dnl conversion specifier for hexadecimal output of floating-point numbers. +dnl (ISO C99, POSIX:2001) +dnl Result is gl_cv_func_printf_directive_a. + +AC_DEFUN([gl_PRINTF_DIRECTIVE_A], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives], + [gl_cv_func_printf_directive_a], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +static char buf[100]; +static double zero = 0.0; +int main () +{ + int result = 0; + if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 + || (strcmp (buf, "0x1.922p+1 33") != 0 + && strcmp (buf, "0x3.244p+0 33") != 0 + && strcmp (buf, "0x6.488p-1 33") != 0 + && strcmp (buf, "0xc.91p-2 33") != 0)) + result |= 1; + if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 + || (strcmp (buf, "-0X1.922P+1 33") != 0 + && strcmp (buf, "-0X3.244P+0 33") != 0 + && strcmp (buf, "-0X6.488P-1 33") != 0 + && strcmp (buf, "-0XC.91P-2 33") != 0)) + result |= 2; + /* This catches a FreeBSD 6.1 bug: it doesn't round. */ + if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 + || (strcmp (buf, "0x1.83p+0 33") != 0 + && strcmp (buf, "0x3.05p-1 33") != 0 + && strcmp (buf, "0x6.0ap-2 33") != 0 + && strcmp (buf, "0xc.14p-3 33") != 0)) + result |= 4; + /* This catches a FreeBSD 6.1 bug. See + */ + if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0 + || buf[0] == '0') + result |= 8; + /* 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 Mac OS X 10.3.9 (Darwin 7.9) bug and also a + glibc 2.4 bug . */ + if (sprintf (buf, "%.1La", 1.999L) < 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 |= 32; + return result; +}]])], + [gl_cv_func_printf_directive_a=yes], + [gl_cv_func_printf_directive_a=no], + [ + case "$host_os" in + # Guess yes on glibc >= 2.5 systems. + *-gnu*) + AC_EGREP_CPP([BZ2908], [ + #include + #ifdef __GNU_LIBRARY__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__ + BZ2908 + #endif + #endif + ], + [gl_cv_func_printf_directive_a="guessing yes"], + [gl_cv_func_printf_directive_a="guessing no"]) + ;; + # If we don't know, assume the worst. + *) gl_cv_func_printf_directive_a="guessing no";; + esac + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports the %F format +dnl directive. (ISO C99, POSIX:2001) +dnl Result is gl_cv_func_printf_directive_f. + +AC_DEFUN([gl_PRINTF_DIRECTIVE_F], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports the 'F' directive], + [gl_cv_func_printf_directive_f], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +static char buf[100]; +static double zero = 0.0; +int main () +{ + int result = 0; + if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 + || strcmp (buf, "1234567.000000 33") != 0) + result |= 1; + if (sprintf (buf, "%F", 1.0 / zero) < 0 + || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) + result |= 2; + /* This catches a Cygwin 1.5.x bug. */ + if (sprintf (buf, "%.F", 1234.0) < 0 + || strcmp (buf, "1234") != 0) + result |= 4; + return result; +}]])], + [gl_cv_func_printf_directive_f=yes], + [gl_cv_func_printf_directive_f=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; + # 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 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. + solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; + solaris*) gl_cv_func_printf_sizes_c99="guessing no";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_directive_f="guessing no";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports the %n format +dnl directive. (ISO C99, POSIX:2001) +dnl Result is gl_cv_func_printf_directive_n. + +AC_DEFUN([gl_PRINTF_DIRECTIVE_N], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports the 'n' directive], + [gl_cv_func_printf_directive_n], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#include +#ifdef _MSC_VER +/* See page about "Parameter Validation" on msdn.microsoft.com. */ +static void cdecl +invalid_parameter_handler (const wchar_t *expression, + const wchar_t *function, + const wchar_t *file, unsigned int line, + uintptr_t dummy) +{ + exit (1); +} +#endif +static char fmtstring[10]; +static char buf[100]; +int main () +{ + int count = -1; +#ifdef _MSC_VER + _set_invalid_parameter_handler (invalid_parameter_handler); +#endif + /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) + support %n in format strings in read-only memory but not in writable + memory. */ + strcpy (fmtstring, "%d %n"); + if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 + || strcmp (buf, "123 ") != 0 + || count != 4) + return 1; + return 0; +}]])], + [gl_cv_func_printf_directive_n=yes], + [gl_cv_func_printf_directive_n=no], + [ +changequote(,)dnl + case "$host_os" in + mingw*) gl_cv_func_printf_directive_n="guessing no";; + *) gl_cv_func_printf_directive_n="guessing yes";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports the %ls format +dnl directive and in particular, when a precision is specified, whether +dnl the functions stop converting the wide string argument when the number +dnl of bytes that have been produced by this conversion equals or exceeds +dnl the precision. +dnl Result is gl_cv_func_printf_directive_ls. + +AC_DEFUN([gl_PRINTF_DIRECTIVE_LS], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports the 'ls' directive], + [gl_cv_func_printf_directive_ls], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +#include +int main () +{ + int result = 0; + char buf[100]; + /* Test whether %ls works at all. + This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on + Cygwin 1.5. */ + { + static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; + buf[0] = '\0'; + if (sprintf (buf, "%ls", wstring) < 0 + || strcmp (buf, "abc") != 0) + result |= 1; + } + /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an + assertion failure inside libc), but not on OpenBSD 4.0. */ + { + static const wchar_t wstring[] = { 'a', 0 }; + buf[0] = '\0'; + if (sprintf (buf, "%ls", wstring) < 0 + || strcmp (buf, "a") != 0) + result |= 2; + } + /* Test whether precisions in %ls are supported as specified in ISO C 99 + section 7.19.6.1: + "If a precision is specified, no more than that many bytes are written + (including shift sequences, if any), and the array shall contain a + null wide character if, to equal the multibyte character sequence + length given by the precision, the function would need to access a + wide character one past the end of the array." + This test fails on Solaris 10. */ + { + static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; + buf[0] = '\0'; + if (sprintf (buf, "%.2ls", wstring) < 0 + || strcmp (buf, "ab") != 0) + result |= 8; + } + return result; +}]])], + [gl_cv_func_printf_directive_ls=yes], + [gl_cv_func_printf_directive_ls=no], + [ +changequote(,)dnl + case "$host_os" in + openbsd*) gl_cv_func_printf_directive_ls="guessing no";; + irix*) gl_cv_func_printf_directive_ls="guessing no";; + solaris*) gl_cv_func_printf_directive_ls="guessing no";; + cygwin*) gl_cv_func_printf_directive_ls="guessing no";; + beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; + *) gl_cv_func_printf_directive_ls="guessing yes";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports POSIX/XSI format +dnl strings with positions. (POSIX:2001) +dnl Result is gl_cv_func_printf_positions. + +AC_DEFUN([gl_PRINTF_POSITIONS], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions], + [gl_cv_func_printf_positions], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () +{ + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); +}]])], + [gl_cv_func_printf_positions=yes], + [gl_cv_func_printf_positions=no], + [ +changequote(,)dnl + case "$host_os" in + netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) + gl_cv_func_printf_positions="guessing no";; + beos*) gl_cv_func_printf_positions="guessing no";; + mingw* | pw*) gl_cv_func_printf_positions="guessing no";; + *) gl_cv_func_printf_positions="guessing yes";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports POSIX/XSI format +dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001) +dnl Result is gl_cv_func_printf_flag_grouping. + +AC_DEFUN([gl_PRINTF_FLAG_GROUPING], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports the grouping flag], + [gl_cv_func_printf_flag_grouping], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +static char buf[100]; +int main () +{ + if (sprintf (buf, "%'d %d", 1234567, 99) < 0 + || buf[strlen (buf) - 1] != '9') + return 1; + return 0; +}]])], + [gl_cv_func_printf_flag_grouping=yes], + [gl_cv_func_printf_flag_grouping=no], + [ +changequote(,)dnl + case "$host_os" in + cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; + netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; + mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; + *) gl_cv_func_printf_flag_grouping="guessing yes";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports the - flag correctly. +dnl (ISO C99.) See +dnl +dnl Result is gl_cv_func_printf_flag_leftadjust. + +AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly], + [gl_cv_func_printf_flag_leftadjust], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +static char buf[100]; +int main () +{ + /* Check that a '-' flag is not annihilated by a negative width. */ + if (sprintf (buf, "a%-*sc", -3, "b") < 0 + || strcmp (buf, "ab c") != 0) + return 1; + return 0; +}]])], + [gl_cv_func_printf_flag_leftadjust=yes], + [gl_cv_func_printf_flag_leftadjust=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess yes on HP-UX 11. + hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; + # Guess no on HP-UX 10 and older. + hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_printf_flag_leftadjust="guessing yes";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports padding of non-finite +dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See +dnl +dnl Result is gl_cv_func_printf_flag_zero. + +AC_DEFUN([gl_PRINTF_FLAG_ZERO], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports the zero flag correctly], + [gl_cv_func_printf_flag_zero], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +static char buf[100]; +static double zero = 0.0; +int main () +{ + if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0 + || (strcmp (buf, " inf") != 0 + && strcmp (buf, " infinity") != 0)) + return 1; + return 0; +}]])], + [gl_cv_func_printf_flag_zero=yes], + [gl_cv_func_printf_flag_zero=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_printf_flag_zero="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_flag_zero="guessing no";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions supports large precisions. +dnl On mingw, precisions larger than 512 are treated like 512, in integer, +dnl floating-point or pointer output. On Solaris 10/x86, precisions larger +dnl than 510 in floating-point output crash the program. On Solaris 10/SPARC, +dnl precisions larger than 510 in floating-point output yield wrong results. +dnl On AIX 7.1, precisions larger than 998 in floating-point output yield +dnl wrong results. On BeOS, precisions larger than 1044 crash the program. +dnl Result is gl_cv_func_printf_precision. + +AC_DEFUN([gl_PRINTF_PRECISION], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf supports large precisions], + [gl_cv_func_printf_precision], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +static char buf[5000]; +int main () +{ + int result = 0; +#ifdef __BEOS__ + /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ + return 1; +#endif + if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) + result |= 1; + if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5) + result |= 2; + if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5 + || buf[0] != '1') + result |= 4; + if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5 + || buf[0] != '1') + result |= 4; + return result; +}]])], + [gl_cv_func_printf_precision=yes], + [gl_cv_func_printf_precision=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess no only on Solaris, native Windows, and BeOS systems. + solaris*) gl_cv_func_printf_precision="guessing no" ;; + mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; + beos*) gl_cv_func_printf_precision="guessing no" ;; + *) gl_cv_func_printf_precision="guessing yes" ;; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the *printf family of functions recovers gracefully in case +dnl of an out-of-memory condition, or whether it crashes the entire program. +dnl Result is gl_cv_func_printf_enomem. + +AC_DEFUN([gl_PRINTF_ENOMEM], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gl_MULTIARCH]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether printf survives out-of-memory conditions], + [gl_cv_func_printf_enomem], + [ + gl_cv_func_printf_enomem="guessing no" + if test "$cross_compiling" = no; then + if test $APPLE_UNIVERSAL_BUILD = 0; then + AC_LANG_CONFTEST([AC_LANG_SOURCE([ +]GL_NOCRASH[ +changequote(,)dnl +#include +#include +#include +#include +#include +int main() +{ + struct rlimit limit; + int ret; + nocrash_init (); + /* Some printf implementations allocate temporary space with malloc. */ + /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ +#ifdef RLIMIT_DATA + if (getrlimit (RLIMIT_DATA, &limit) < 0) + return 77; + if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) + limit.rlim_max = 5000000; + limit.rlim_cur = limit.rlim_max; + if (setrlimit (RLIMIT_DATA, &limit) < 0) + return 77; +#endif + /* On Linux systems, malloc() is limited by RLIMIT_AS. */ +#ifdef RLIMIT_AS + if (getrlimit (RLIMIT_AS, &limit) < 0) + return 77; + if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) + limit.rlim_max = 5000000; + limit.rlim_cur = limit.rlim_max; + if (setrlimit (RLIMIT_AS, &limit) < 0) + return 77; +#endif + /* Some printf implementations allocate temporary space on the stack. */ +#ifdef RLIMIT_STACK + if (getrlimit (RLIMIT_STACK, &limit) < 0) + return 77; + if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) + limit.rlim_max = 5000000; + limit.rlim_cur = limit.rlim_max; + if (setrlimit (RLIMIT_STACK, &limit) < 0) + return 77; +#endif + ret = printf ("%.5000000f", 1.0); + return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); +} +changequote([,])dnl + ])]) + if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then + (./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 + case $? in + 0) gl_cv_func_printf_enomem="yes" ;; + 77) gl_cv_func_printf_enomem="guessing no" ;; + *) gl_cv_func_printf_enomem="no" ;; + esac + else + gl_cv_func_printf_enomem="guessing no" + fi + rm -fr conftest* + else + 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" + fi + fi + if test "$gl_cv_func_printf_enomem" = "guessing no"; then +changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on Solaris. + solaris*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on AIX. + aix*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on HP-UX/hppa. + hpux*) case "$host_cpu" in + hppa*) gl_cv_func_printf_enomem="guessing yes";; + *) gl_cv_func_printf_enomem="guessing no";; + esac + ;; + # Guess yes on IRIX. + irix*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on OSF/1. + osf*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_printf_enomem="guessing yes";; + # Guess yes on Haiku. + haiku*) gl_cv_func_printf_enomem="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_enomem="guessing no";; + esac +changequote([,])dnl + fi + ]) +]) + +dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001) +dnl Result is ac_cv_func_snprintf. + +AC_DEFUN([gl_SNPRINTF_PRESENCE], +[ + AC_CHECK_FUNCS_ONCE([snprintf]) +]) + +dnl Test whether the string produced by the snprintf function is always NUL +dnl terminated. (ISO C99, POSIX:2001) +dnl Result is gl_cv_func_snprintf_truncation_c99. + +AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_SNPRINTF_PRESENCE]) + AC_CACHE_CHECK([whether snprintf truncates the result as in C99], + [gl_cv_func_snprintf_truncation_c99], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#if HAVE_SNPRINTF +# define my_snprintf snprintf +#else +# include +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} +#endif +static char buf[100]; +int main () +{ + strcpy (buf, "ABCDEF"); + my_snprintf (buf, 3, "%d %d", 4567, 89); + if (memcmp (buf, "45\0DEF", 6) != 0) + return 1; + return 0; +}]])], + [gl_cv_func_snprintf_truncation_c99=yes], + [gl_cv_func_snprintf_truncation_c99=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # 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 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. + openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) + gl_cv_func_snprintf_truncation_c99="guessing no";; + openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on Solaris >= 2.6. + solaris2.[0-5] | solaris2.[0-5].*) + gl_cv_func_snprintf_truncation_c99="guessing no";; + solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on AIX >= 4. + aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; + aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on HP-UX >= 11. + hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; + hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on IRIX >= 6.5. + irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on OSF/1 >= 5. + osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; + osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_snprintf_truncation_c99="guessing no";; + netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_snprintf_truncation_c99="guessing no";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the return value of the snprintf function is the number +dnl of bytes (excluding the terminating NUL) that would have been produced +dnl if the buffer had been large enough. (ISO C99, POSIX:2001) +dnl For example, this test program fails on IRIX 6.5: +dnl --------------------------------------------------------------------- +dnl #include +dnl int main() +dnl { +dnl static char buf[8]; +dnl int retval = snprintf (buf, 3, "%d", 12345); +dnl return retval >= 0 && retval < 3; +dnl } +dnl --------------------------------------------------------------------- +dnl Result is gl_cv_func_snprintf_retval_c99. + +AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_SNPRINTF_PRESENCE]) + AC_CACHE_CHECK([whether snprintf returns a byte count as in C99], + [gl_cv_func_snprintf_retval_c99], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#if HAVE_SNPRINTF +# define my_snprintf snprintf +#else +# include +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} +#endif +static char buf[100]; +int main () +{ + strcpy (buf, "ABCDEF"); + if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7) + return 1; + if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7) + return 2; + if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7) + return 3; + return 0; +}]])], + [gl_cv_func_snprintf_retval_c99=yes], + [gl_cv_func_snprintf_retval_c99=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # 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 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. + openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) + gl_cv_func_snprintf_retval_c99="guessing no";; + openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on Solaris >= 2.10. + solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; + solaris*) gl_cv_func_printf_sizes_c99="guessing no";; + # Guess yes on AIX >= 4. + aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; + aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_snprintf_retval_c99="guessing no";; + netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_snprintf_retval_c99="guessing no";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the snprintf function supports the %n format directive +dnl also in truncated portions of the format string. (ISO C99, POSIX:2001) +dnl Result is gl_cv_func_snprintf_directive_n. + +AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_SNPRINTF_PRESENCE]) + AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive], + [gl_cv_func_snprintf_directive_n], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +#if HAVE_SNPRINTF +# define my_snprintf snprintf +#else +# include +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} +#endif +static char fmtstring[10]; +static char buf[100]; +int main () +{ + int count = -1; + /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) + support %n in format strings in read-only memory but not in writable + memory. */ + strcpy (fmtstring, "%d %n"); + my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); + if (count != 6) + return 1; + return 0; +}]])], + [gl_cv_func_snprintf_directive_n=yes], + [gl_cv_func_snprintf_directive_n=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; + # 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 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. + solaris2.[0-5] | solaris2.[0-5].*) + gl_cv_func_snprintf_directive_n="guessing no";; + solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; + # Guess yes on AIX >= 4. + aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; + aix*) gl_cv_func_snprintf_directive_n="guessing yes";; + # Guess yes on IRIX >= 6.5. + irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; + # Guess yes on OSF/1 >= 5. + osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; + osf*) gl_cv_func_snprintf_directive_n="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_snprintf_directive_n="guessing no";; + netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_snprintf_directive_n="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_snprintf_directive_n="guessing no";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl Test whether the snprintf function, when passed a size = 1, writes any +dnl output without bounds in this case, behaving like sprintf. This is the +dnl case on Linux libc5. +dnl Result is gl_cv_func_snprintf_size1. + +AC_DEFUN([gl_SNPRINTF_SIZE1], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gl_SNPRINTF_PRESENCE]) + AC_CACHE_CHECK([whether snprintf respects a size of 1], + [gl_cv_func_snprintf_size1], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#if HAVE_SNPRINTF +# define my_snprintf snprintf +#else +# include +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} +#endif +int main() +{ + static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; + my_snprintf (buf, 1, "%d", 12345); + return buf[1] != 'E'; +}]])], + [gl_cv_func_snprintf_size1=yes], + [gl_cv_func_snprintf_size1=no], + [gl_cv_func_snprintf_size1="guessing yes"]) + ]) +]) + +dnl Test whether the vsnprintf function, when passed a zero size, produces no +dnl output. (ISO C99, POSIX:2001) +dnl For example, snprintf nevertheless writes a NUL byte in this case +dnl on OSF/1 5.1: +dnl --------------------------------------------------------------------- +dnl #include +dnl int main() +dnl { +dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; +dnl snprintf (buf, 0, "%d", 12345); +dnl return buf[0] != 'D'; +dnl } +dnl --------------------------------------------------------------------- +dnl And vsnprintf writes any output without bounds in this case, behaving like +dnl vsprintf, on HP-UX 11 and OSF/1 5.1: +dnl --------------------------------------------------------------------- +dnl #include +dnl #include +dnl static int my_snprintf (char *buf, int size, const char *format, ...) +dnl { +dnl va_list args; +dnl int ret; +dnl va_start (args, format); +dnl ret = vsnprintf (buf, size, format, args); +dnl va_end (args); +dnl return ret; +dnl } +dnl int main() +dnl { +dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; +dnl my_snprintf (buf, 0, "%d", 12345); +dnl return buf[0] != 'D'; +dnl } +dnl --------------------------------------------------------------------- +dnl Result is gl_cv_func_vsnprintf_zerosize_c99. + +AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99], + [gl_cv_func_vsnprintf_zerosize_c99], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +static int my_snprintf (char *buf, int size, const char *format, ...) +{ + va_list args; + int ret; + va_start (args, format); + ret = vsnprintf (buf, size, format, args); + va_end (args); + return ret; +} +int main() +{ + static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; + my_snprintf (buf, 0, "%d", 12345); + return buf[0] != 'D'; +}]])], + [gl_cv_func_vsnprintf_zerosize_c99=yes], + [gl_cv_func_vsnprintf_zerosize_c99=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # 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 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. + cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on Solaris >= 2.6. + solaris2.[0-5] | solaris2.[0-5].*) + gl_cv_func_vsnprintf_zerosize_c99="guessing no";; + solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on AIX >= 4. + aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; + aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on IRIX >= 6.5. + irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_vsnprintf_zerosize_c99="guessing no";; + netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on mingw. + mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; + esac +changequote([,])dnl + ]) + ]) +]) + +dnl The results of these tests on various platforms are: +dnl +dnl 1 = gl_PRINTF_SIZES_C99 +dnl 2 = gl_PRINTF_LONG_DOUBLE +dnl 3 = gl_PRINTF_INFINITE +dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE +dnl 5 = gl_PRINTF_DIRECTIVE_A +dnl 6 = gl_PRINTF_DIRECTIVE_F +dnl 7 = gl_PRINTF_DIRECTIVE_N +dnl 8 = gl_PRINTF_DIRECTIVE_LS +dnl 9 = gl_PRINTF_POSITIONS +dnl 10 = gl_PRINTF_FLAG_GROUPING +dnl 11 = gl_PRINTF_FLAG_LEFTADJUST +dnl 12 = gl_PRINTF_FLAG_ZERO +dnl 13 = gl_PRINTF_PRECISION +dnl 14 = gl_PRINTF_ENOMEM +dnl 15 = gl_SNPRINTF_PRESENCE +dnl 16 = gl_SNPRINTF_TRUNCATION_C99 +dnl 17 = gl_SNPRINTF_RETVAL_C99 +dnl 18 = gl_SNPRINTF_DIRECTIVE_N +dnl 19 = gl_SNPRINTF_SIZE1 +dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99 +dnl +dnl 1 = checking whether printf supports size specifiers as in C99... +dnl 2 = checking whether printf supports 'long double' arguments... +dnl 3 = checking whether printf supports infinite 'double' arguments... +dnl 4 = checking whether printf supports infinite 'long double' arguments... +dnl 5 = checking whether printf supports the 'a' and 'A' directives... +dnl 6 = checking whether printf supports the 'F' directive... +dnl 7 = checking whether printf supports the 'n' directive... +dnl 8 = checking whether printf supports the 'ls' directive... +dnl 9 = checking whether printf supports POSIX/XSI format strings with positions... +dnl 10 = checking whether printf supports the grouping flag... +dnl 11 = checking whether printf supports the left-adjust flag correctly... +dnl 12 = checking whether printf supports the zero flag correctly... +dnl 13 = checking whether printf supports large precisions... +dnl 14 = checking whether printf survives out-of-memory conditions... +dnl 15 = checking for snprintf... +dnl 16 = checking whether snprintf truncates the result as in C99... +dnl 17 = checking whether snprintf returns a byte count as in C99... +dnl 18 = checking whether snprintf fully supports the 'n' directive... +dnl 19 = checking whether snprintf respects a size of 1... +dnl 20 = checking whether vsnprintf respects a zero size as in C99... +dnl +dnl . = yes, # = no. +dnl +dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . . +dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . . +dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . +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) . . . # # . . # . . . . . # . . . . . . +dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . +dnl Solaris 11 2011-11 . . # # # . . # . . . # . . . . . . . . +dnl Solaris 10 . . # # # . . # . . . # # . . . . . . . +dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . . +dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # +dnl AIX 7.1 . . # # # . . . . . . # # . . . . . . . +dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . . +dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . # . . . +dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . . +dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . # +dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? # +dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . . +dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . # +dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # # +dnl NetBSD 5.0 . . . # # . . . . . . # . # . . . . . . +dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ? +dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . . +dnl Haiku . . . # # # . # . . . . . ? . . ? . . . +dnl BeOS # # . # # # . ? # . ? . # ? . . ? . . . +dnl old mingw / msvcrt # # # # # # . . # # . # # ? . # # # . . +dnl MSVC 9 # # # # # # # . # # . # # ? # # # # . . +dnl mingw 2009-2011 . # . # . . . . # # . . . ? . . . . . . +dnl mingw-w64 2011 # # # # # # . . # # . # # ? . # # # . . diff --git a/gl/m4/priv-set.m4 b/gl/m4/priv-set.m4 new file mode 100644 index 0000000..6a1ed24 --- /dev/null +++ b/gl/m4/priv-set.m4 @@ -0,0 +1,15 @@ +# serial 8 + +# Copyright (C) 2009-2014 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. + +# Written by David Bartley. + +AC_DEFUN([gl_PRIV_SET], +[ + AC_CHECK_FUNCS([getppriv]) + AC_CHECK_HEADERS_ONCE([priv.h]) +]) diff --git a/gl/m4/progtest.m4 b/gl/m4/progtest.m4 new file mode 100644 index 0000000..b499f79 --- /dev/null +++ b/gl/m4/progtest.m4 @@ -0,0 +1,91 @@ +# progtest.m4 serial 7 (gettext-0.18.2) +dnl Copyright (C) 1996-2003, 2005, 2008-2014 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 +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +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 Authors: +dnl Ulrich Drepper , 1996. + +AC_PREREQ([2.50]) + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which + # contains only /bin. Note that ksh looks also at the FPATH variable, + # so we have to set that as well for the test. + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ + || PATH_SEPARATOR=';' + } +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL([ac_cv_path_$1], +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$][$1]) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST([$1])dnl +]) diff --git a/gl/m4/putenv.m4 b/gl/m4/putenv.m4 new file mode 100644 index 0000000..d79321b --- /dev/null +++ b/gl/m4/putenv.m4 @@ -0,0 +1,56 @@ +# putenv.m4 serial 20 +dnl Copyright (C) 2002-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Jim Meyering. +dnl +dnl Check whether putenv ("FOO") removes FOO from the environment. +dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that. + +AC_DEFUN([gl_FUNC_PUTENV], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([for putenv compatible with GNU and SVID], + [gl_cv_func_svid_putenv], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[ + /* Put it in env. */ + if (putenv ("CONFTEST_putenv=val")) + return 1; + + /* Try to remove it. */ + if (putenv ("CONFTEST_putenv")) + return 2; + + /* Make sure it was deleted. */ + if (getenv ("CONFTEST_putenv") != 0) + return 3; + + return 0; + ]])], + gl_cv_func_svid_putenv=yes, + gl_cv_func_svid_putenv=no, + dnl When crosscompiling, assume putenv is broken. + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_svid_putenv="guessing no" ;; + esac + ]) + ]) + case "$gl_cv_func_svid_putenv" in + *yes) ;; + *) + REPLACE_PUTENV=1 + ;; + esac +]) + +# Prerequisites of lib/putenv.c. +AC_DEFUN([gl_PREREQ_PUTENV], +[ + AC_CHECK_DECLS([_putenv]) +]) diff --git a/gl/m4/quote.m4 b/gl/m4/quote.m4 new file mode 100644 index 0000000..95b3e71 --- /dev/null +++ b/gl/m4/quote.m4 @@ -0,0 +1,13 @@ +# quote.m4 serial 6 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_QUOTE], +[ + dnl Prerequisites of lib/quote.c. + dnl (none) + : +]) diff --git a/gl/m4/quotearg.m4 b/gl/m4/quotearg.m4 new file mode 100644 index 0000000..eaebbf6 --- /dev/null +++ b/gl/m4/quotearg.m4 @@ -0,0 +1,10 @@ +# quotearg.m4 serial 9 +dnl Copyright (C) 2002, 2004-2014 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_QUOTEARG], +[ + : +]) diff --git a/gl/m4/raise.m4 b/gl/m4/raise.m4 new file mode 100644 index 0000000..8656578 --- /dev/null +++ b/gl/m4/raise.m4 @@ -0,0 +1,34 @@ +# raise.m4 serial 3 +dnl Copyright (C) 2011-2014 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_RAISE], +[ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_MSVC_INVAL]) + AC_CHECK_FUNCS([raise]) + if test $ac_cv_func_raise = no; then + HAVE_RAISE=0 + else + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_RAISE=1 + fi + m4_ifdef([gl_SIGNALBLOCKING], [ + gl_SIGNALBLOCKING + if test $HAVE_POSIX_SIGNALBLOCKING = 0; then + m4_ifdef([gl_SIGNAL_SIGPIPE], [ + gl_SIGNAL_SIGPIPE + if test $gl_cv_header_signal_h_SIGPIPE != yes; then + REPLACE_RAISE=1 + fi + ], [:]) + fi + ]) + fi +]) + +# Prerequisites of lib/raise.c. +AC_DEFUN([gl_PREREQ_RAISE], [:]) diff --git a/gl/m4/read.m4 b/gl/m4/read.m4 new file mode 100644 index 0000000..176b0b0 --- /dev/null +++ b/gl/m4/read.m4 @@ -0,0 +1,26 @@ +# read.m4 serial 4 +dnl Copyright (C) 2011-2014 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_READ], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_MSVC_INVAL]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_READ=1 + fi + dnl This ifdef is just an optimization, to avoid performing a configure + dnl check whose result is not used. It does not make the test of + dnl GNULIB_UNISTD_H_NONBLOCKING or GNULIB_NONBLOCKING redundant. + m4_ifdef([gl_NONBLOCKING_IO], [ + gl_NONBLOCKING_IO + if test $gl_cv_have_nonblocking != yes; then + REPLACE_READ=1 + fi + ]) +]) + +# Prerequisites of lib/read.c. +AC_DEFUN([gl_PREREQ_READ], [:]) diff --git a/gl/m4/readdir.m4 b/gl/m4/readdir.m4 new file mode 100644 index 0000000..bd7be5c --- /dev/null +++ b/gl/m4/readdir.m4 @@ -0,0 +1,15 @@ +# readdir.m4 serial 1 +dnl Copyright (C) 2011-2014 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_READDIR], +[ + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + + AC_CHECK_FUNCS([readdir]) + if test $ac_cv_func_readdir = no; then + HAVE_READDIR=0 + fi +]) diff --git a/gl/m4/readlink.m4 b/gl/m4/readlink.m4 new file mode 100644 index 0000000..f9ce868 --- /dev/null +++ b/gl/m4/readlink.m4 @@ -0,0 +1,71 @@ +# readlink.m4 serial 12 +dnl Copyright (C) 2003, 2007, 2009-2014 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_READLINK], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CHECK_FUNCS_ONCE([readlink]) + if test $ac_cv_func_readlink = no; then + HAVE_READLINK=0 + else + AC_CACHE_CHECK([whether readlink signature is correct], + [gl_cv_decl_readlink_works], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + /* Cause compilation failure if original declaration has wrong type. */ + ssize_t readlink (const char *, char *, size_t);]])], + [gl_cv_decl_readlink_works=yes], [gl_cv_decl_readlink_works=no])]) + dnl Solaris 9 ignores trailing slash. + dnl FreeBSD 7.2 dereferences only one level of links with trailing slash. + AC_CACHE_CHECK([whether readlink handles trailing slash correctly], + [gl_cv_func_readlink_works], + [# We have readlink, so assume ln -s works. + ln -s conftest.no-such conftest.link + ln -s conftest.link conftest.lnk2 + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include +]], [[char buf[20]; + return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])], + [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_readlink_works="guessing no" ;; + esac + ]) + rm -f conftest.link conftest.lnk2]) + case "$gl_cv_func_readlink_works" in + *yes) + if test "$gl_cv_decl_readlink_works" != yes; then + REPLACE_READLINK=1 + fi + ;; + *) + AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink + fails to recognize a trailing slash.]) + REPLACE_READLINK=1 + ;; + esac + fi +]) + +# Like gl_FUNC_READLINK, except prepare for separate compilation +# (no REPLACE_READLINK, no AC_LIBOBJ). +AC_DEFUN([gl_FUNC_READLINK_SEPARATE], +[ + AC_CHECK_FUNCS_ONCE([readlink]) + gl_PREREQ_READLINK +]) + +# Prerequisites of lib/readlink.c. +AC_DEFUN([gl_PREREQ_READLINK], +[ + : +]) diff --git a/gl/m4/readlinkat.m4 b/gl/m4/readlinkat.m4 new file mode 100644 index 0000000..65c0689 --- /dev/null +++ b/gl/m4/readlinkat.m4 @@ -0,0 +1,19 @@ +# serial 3 +# See if we need to provide readlinkat replacement. + +dnl Copyright (C) 2009-2014 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. + +# Written by Eric Blake. + +AC_DEFUN([gl_FUNC_READLINKAT], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([readlinkat]) + if test $ac_cv_func_readlinkat = no; then + HAVE_READLINKAT=0 + fi +]) diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4 new file mode 100644 index 0000000..f96537b --- /dev/null +++ b/gl/m4/realloc.m4 @@ -0,0 +1,76 @@ +# realloc.m4 serial 13 +dnl Copyright (C) 2007, 2009-2014 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. + +m4_version_prereq([2.70], [] ,[ + +# This is taken from the following Autoconf patch: +# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9 +AC_DEFUN([_AC_FUNC_REALLOC_IF], +[ + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles + AC_CHECK_HEADERS([stdlib.h]) + AC_CACHE_CHECK([for GNU libc compatible realloc], + [ac_cv_func_realloc_0_nonnull], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include + #else + char *realloc (); + #endif + ]], + [[return ! realloc (0, 0);]]) + ], + [ac_cv_func_realloc_0_nonnull=yes], + [ac_cv_func_realloc_0_nonnull=no], + [case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ + | hpux* | solaris* | cygwin* | mingw*) + ac_cv_func_realloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_realloc_0_nonnull=no ;; + esac + ]) + ]) + AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2]) +])# AC_FUNC_REALLOC + +]) + +# gl_FUNC_REALLOC_GNU +# ------------------- +# Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace +# realloc if it is not. +AC_DEFUN([gl_FUNC_REALLOC_GNU], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + dnl _AC_FUNC_REALLOC_IF is defined in Autoconf. + _AC_FUNC_REALLOC_IF( + [AC_DEFINE([HAVE_REALLOC_GNU], [1], + [Define to 1 if your system has a GNU libc compatible 'realloc' + function, and to 0 otherwise.])], + [AC_DEFINE([HAVE_REALLOC_GNU], [0]) + REPLACE_REALLOC=1 + ]) +])# gl_FUNC_REALLOC_GNU + +# gl_FUNC_REALLOC_POSIX +# --------------------- +# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it +# fails), and replace realloc if it is not. +AC_DEFUN([gl_FUNC_REALLOC_POSIX], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) + if test $gl_cv_func_malloc_posix = yes; then + AC_DEFINE([HAVE_REALLOC_POSIX], [1], + [Define if the 'realloc' function is POSIX compliant.]) + else + REPLACE_REALLOC=1 + fi +]) diff --git a/gl/m4/regex.m4 b/gl/m4/regex.m4 new file mode 100644 index 0000000..08bd46a --- /dev/null +++ b/gl/m4/regex.m4 @@ -0,0 +1,291 @@ +# serial 65 + +# Copyright (C) 1996-2001, 2003-2014 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. + +dnl Initially derived from code in GNU grep. +dnl Mostly written by Jim Meyering. + +AC_PREREQ([2.50]) + +AC_DEFUN([gl_REGEX], +[ + AC_ARG_WITH([included-regex], + [AS_HELP_STRING([--without-included-regex], + [don't compile regex; this is the default on systems + with recent-enough versions of the GNU C Library + (use with caution on other systems).])]) + + case $with_included_regex in #( + yes|no) ac_use_included_regex=$with_included_regex + ;; + '') + # If the system regex support is good enough that it passes the + # following run test, then default to *not* using the included regex.c. + # If cross compiling, assume the test would fail and use the included + # regex.c. + AC_CHECK_DECLS_ONCE([alarm]) + AC_CHECK_HEADERS_ONCE([malloc.h]) + AC_CACHE_CHECK([for working re_compile_pattern], + [gl_cv_func_re_compile_pattern_working], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + + #include + #include + #include + + #if defined M_CHECK_ACTION || HAVE_DECL_ALARM + # include + # include + #endif + + #if HAVE_MALLOC_H + # include + #endif + + #ifdef M_CHECK_ACTION + /* Exit with distinguishable exit code. */ + static void sigabrt_no_core (int sig) { raise (SIGTERM); } + #endif + ]], + [[int result = 0; + static struct re_pattern_buffer regex; + unsigned char folded_chars[UCHAR_MAX + 1]; + int i; + const char *s; + struct re_registers regs; + + /* Some builds of glibc go into an infinite loop on this + test. Use alarm to force death, and mallopt to avoid + malloc recursion in diagnosing the corrupted heap. */ +#if HAVE_DECL_ALARM + signal (SIGALRM, SIG_DFL); + alarm (2); +#endif +#ifdef M_CHECK_ACTION + signal (SIGABRT, sigabrt_no_core); + mallopt (M_CHECK_ACTION, 2); +#endif + + if (setlocale (LC_ALL, "en_US.UTF-8")) + { + { + /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + This test needs valgrind to catch the bug on Debian + GNU/Linux 3.1 x86, but it might catch the bug better + on other platforms and it shouldn't hurt to try the + test here. */ + static char const pat[] = "insert into"; + static char const data[] = + "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE + | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + result |= 1; + else if (re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, ®s) + != -1) + result |= 1; + } + + { + /* This test is from glibc bug 15078. + The test case is from Andreas Schwab in + . + */ + static char const pat[] = "[^x]x"; + static char const data[] = + /* */ + "\xe1\x80\x80" + "\xe1\x80\xbb" + "\xe1\x80\xbd" + "\xe1\x80\x94" + "\xe1\x80\xba" + "\xe1\x80\xaf" + "\xe1\x80\x95" + "\xe1\x80\xba" + "x"; + re_set_syntax (0); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + result |= 1; + else + { + i = re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, 0); + if (i != 0 && i != 21) + result |= 1; + } + } + + if (! setlocale (LC_ALL, "C")) + return 1; + } + + /* This test is from glibc bug 3957, reported by Andrew Mackey. */ + re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("a[^x]b", 6, ®ex); + if (s) + result |= 2; + /* This should fail, but succeeds for glibc-2.5. */ + else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) + result |= 2; + + /* This regular expression is from Spencer ere test number 75 + in grep-2.3. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + for (i = 0; i <= UCHAR_MAX; i++) + folded_chars[i] = i; + regex.translate = folded_chars; + s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); + /* This should fail with _Invalid character class name_ error. */ + if (!s) + result |= 4; + + /* Ensure that [b-a] is diagnosed as invalid, when + using RE_NO_EMPTY_RANGES. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("a[b-a]", 6, ®ex); + if (s == 0) + result |= 8; + + /* This should succeed, but does not for glibc-2.1.3. */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("{1", 2, ®ex); + if (s) + result |= 8; + + /* The following example is derived from a problem report + against gawk from Jorge Stolfi . */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[an\371]*n", 7, ®ex); + if (s) + result |= 8; + /* This should match, but does not for glibc-2.2.1. */ + else if (re_match (®ex, "an", 2, 0, ®s) != 2) + result |= 8; + + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + result |= 8; + /* glibc-2.2.93 does not work with a negative RANGE argument. */ + else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) + result |= 8; + + /* The version of regex.c in older versions of gnulib + ignored RE_ICASE. Detect that problem too. */ + re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + result |= 16; + else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) + result |= 16; + + /* Catch a bug reported by Vin Shelton in + http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html + */ + re_set_syntax (RE_SYNTAX_POSIX_BASIC + & ~RE_CONTEXT_INVALID_DUP + & ~RE_NO_EMPTY_RANGES); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); + if (s) + result |= 32; + + /* REG_STARTEND was added to glibc on 2004-01-15. + Reject older versions. */ + if (! REG_STARTEND) + result |= 64; + +#if 0 + /* It would be nice to reject hosts whose regoff_t values are too + narrow (including glibc on hosts with 64-bit ptrdiff_t and + 32-bit int), but we should wait until glibc implements this + feature. Otherwise, support for equivalence classes and + multibyte collation symbols would always be broken except + when compiling --without-included-regex. */ + if (sizeof (regoff_t) < sizeof (ptrdiff_t) + || sizeof (regoff_t) < sizeof (ssize_t)) + result |= 64; +#endif + + return result; + ]])], + [gl_cv_func_re_compile_pattern_working=yes], + [gl_cv_func_re_compile_pattern_working=no], + dnl When crosscompiling, assume it is not working. + [gl_cv_func_re_compile_pattern_working=no])]) + case $gl_cv_func_re_compile_pattern_working in #( + yes) ac_use_included_regex=no;; #( + no) ac_use_included_regex=yes;; + esac + ;; + *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) + ;; + esac + + if test $ac_use_included_regex = yes; then + AC_DEFINE([_REGEX_INCLUDE_LIMITS_H], [1], + [Define if you want to include , so that it + consistently overrides 's RE_DUP_MAX.]) + AC_DEFINE([_REGEX_LARGE_OFFSETS], [1], + [Define if you want regoff_t to be at least as wide POSIX requires.]) + AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], + [Define to rpl_re_syntax_options if the replacement should be used.]) + AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], + [Define to rpl_re_set_syntax if the replacement should be used.]) + AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern], + [Define to rpl_re_compile_pattern if the replacement should be used.]) + AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap], + [Define to rpl_re_compile_fastmap if the replacement should be used.]) + AC_DEFINE([re_search], [rpl_re_search], + [Define to rpl_re_search if the replacement should be used.]) + AC_DEFINE([re_search_2], [rpl_re_search_2], + [Define to rpl_re_search_2 if the replacement should be used.]) + AC_DEFINE([re_match], [rpl_re_match], + [Define to rpl_re_match if the replacement should be used.]) + AC_DEFINE([re_match_2], [rpl_re_match_2], + [Define to rpl_re_match_2 if the replacement should be used.]) + AC_DEFINE([re_set_registers], [rpl_re_set_registers], + [Define to rpl_re_set_registers if the replacement should be used.]) + AC_DEFINE([re_comp], [rpl_re_comp], + [Define to rpl_re_comp if the replacement should be used.]) + AC_DEFINE([re_exec], [rpl_re_exec], + [Define to rpl_re_exec if the replacement should be used.]) + AC_DEFINE([regcomp], [rpl_regcomp], + [Define to rpl_regcomp if the replacement should be used.]) + AC_DEFINE([regexec], [rpl_regexec], + [Define to rpl_regexec if the replacement should be used.]) + AC_DEFINE([regerror], [rpl_regerror], + [Define to rpl_regerror if the replacement should be used.]) + AC_DEFINE([regfree], [rpl_regfree], + [Define to rpl_regfree if the replacement should be used.]) + fi +]) + +# Prerequisites of lib/regex.c and lib/regex_internal.c. +AC_DEFUN([gl_PREREQ_REGEX], +[ + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + AC_REQUIRE([gl_EEMALLOC]) + AC_REQUIRE([gl_GLIBC21]) + AC_CHECK_HEADERS([libintl.h]) + AC_CHECK_FUNCS_ONCE([isblank iswctype]) + AC_CHECK_DECLS([isblank], [], [], [[#include ]]) +]) diff --git a/gl/m4/rewinddir.m4 b/gl/m4/rewinddir.m4 new file mode 100644 index 0000000..06f5414 --- /dev/null +++ b/gl/m4/rewinddir.m4 @@ -0,0 +1,15 @@ +# rewinddir.m4 serial 1 +dnl Copyright (C) 2011-2014 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_REWINDDIR], +[ + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + + AC_CHECK_FUNCS([rewinddir]) + if test $ac_cv_func_rewinddir = no; then + HAVE_REWINDDIR=0 + fi +]) diff --git a/gl/m4/rmdir.m4 b/gl/m4/rmdir.m4 new file mode 100644 index 0000000..db6a939 --- /dev/null +++ b/gl/m4/rmdir.m4 @@ -0,0 +1,49 @@ +# rmdir.m4 serial 13 +dnl Copyright (C) 2002, 2005, 2009-2014 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_RMDIR], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + dnl Detect cygwin 1.5.x bug. + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works], + [mkdir conftest.dir + touch conftest.file + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + #endif +]], [[int result = 0; + if (!rmdir ("conftest.file/")) + result |= 1; + else if (errno != ENOTDIR) + result |= 2; + if (!rmdir ("conftest.dir/./")) + result |= 4; + return result; + ]])], + [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rmdir_works="guessing no" ;; + esac + ]) + rm -rf conftest.dir conftest.file]) + case "$gl_cv_func_rmdir_works" in + *yes) ;; + *) + REPLACE_RMDIR=1 + ;; + esac +]) diff --git a/gl/m4/rpmatch.m4 b/gl/m4/rpmatch.m4 new file mode 100644 index 0000000..6fd0f5d --- /dev/null +++ b/gl/m4/rpmatch.m4 @@ -0,0 +1,31 @@ +# rpmatch.m4 serial 10 +dnl Copyright (C) 2002-2003, 2007-2014 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_RPMATCH], +[ + dnl Persuade glibc to declare rpmatch(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_CHECK_FUNCS([rpmatch]) + if test $ac_cv_func_rpmatch = no; then + HAVE_RPMATCH=0 + fi +]) + +# Prerequisites of lib/rpmatch.c. +AC_DEFUN([gl_PREREQ_RPMATCH], [ + AC_CACHE_CHECK([for nl_langinfo and YESEXPR], [gl_cv_langinfo_yesexpr], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[char* cs = nl_langinfo(YESEXPR); return !cs;]])], + [gl_cv_langinfo_yesexpr=yes], + [gl_cv_langinfo_yesexpr=no]) + ]) + if test $gl_cv_langinfo_yesexpr = yes; then + AC_DEFINE([HAVE_LANGINFO_YESEXPR], [1], + [Define if you have and nl_langinfo(YESEXPR).]) + fi +]) diff --git a/gl/m4/safe-read.m4 b/gl/m4/safe-read.m4 new file mode 100644 index 0000000..f0c42e0 --- /dev/null +++ b/gl/m4/safe-read.m4 @@ -0,0 +1,12 @@ +# safe-read.m4 serial 6 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +# Prerequisites of lib/safe-read.c. +AC_DEFUN([gl_PREREQ_SAFE_READ], +[ + AC_REQUIRE([gt_TYPE_SSIZE_T]) +]) diff --git a/gl/m4/same.m4 b/gl/m4/same.m4 new file mode 100644 index 0000000..cb63894 --- /dev/null +++ b/gl/m4/same.m4 @@ -0,0 +1,13 @@ +#serial 9 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +dnl Prerequisites of lib/same.c. +AC_DEFUN([gl_SAME], +[ + AC_REQUIRE([AC_SYS_LONG_FILE_NAMES]) + AC_CHECK_FUNCS_ONCE([pathconf]) +]) diff --git a/gl/m4/save-cwd.m4 b/gl/m4/save-cwd.m4 new file mode 100644 index 0000000..68dd1c5 --- /dev/null +++ b/gl/m4/save-cwd.m4 @@ -0,0 +1,11 @@ +# serial 10 +dnl Copyright (C) 2002-2006, 2009-2014 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 Prerequisites for lib/save-cwd.c. +AC_DEFUN([gl_SAVE_CWD], +[ + AC_CHECK_FUNCS_ONCE([fchdir]) +]) diff --git a/gl/m4/savedir.m4 b/gl/m4/savedir.m4 new file mode 100644 index 0000000..8f617db --- /dev/null +++ b/gl/m4/savedir.m4 @@ -0,0 +1,11 @@ +# savedir.m4 serial 10 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_SAVEDIR], +[ + : +]) diff --git a/gl/m4/select.m4 b/gl/m4/select.m4 new file mode 100644 index 0000000..1d2fcb3 --- /dev/null +++ b/gl/m4/select.m4 @@ -0,0 +1,113 @@ +# select.m4 serial 7 +dnl Copyright (C) 2009-2014 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_SELECT], +[ + AC_REQUIRE([gl_HEADER_SYS_SELECT]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_SOCKETS]) + if test "$ac_cv_header_winsock2_h" = yes; then + REPLACE_SELECT=1 + else + dnl On Interix 3.5, select(0, NULL, NULL, NULL, timeout) fails with error + dnl EFAULT. + AC_CHECK_HEADERS_ONCE([sys/select.h]) + AC_CACHE_CHECK([whether select supports a 0 argument], + [gl_cv_func_select_supports0], + [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#if HAVE_SYS_SELECT_H +#include +#endif +int main () +{ + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 5; + return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0; +}]])], [gl_cv_func_select_supports0=yes], [gl_cv_func_select_supports0=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess no on Interix. + interix*) gl_cv_func_select_supports0="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_select_supports0="guessing yes";; + esac +changequote([,])dnl + ]) + ]) + case "$gl_cv_func_select_supports0" in + *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 +#include +#if HAVE_SYS_SELECT_H +# include +#endif +#include +#include +]],[[ + 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. + LIB_SELECT="$LIBSOCKET" + if test $REPLACE_SELECT = 1; then + case "$host_os" in + mingw*) + dnl On the MSVC platform, the function MsgWaitForMultipleObjects + dnl (used in lib/select.c) requires linking with -luser32. On mingw, + dnl it is implicit. + AC_LINK_IFELSE( + [AC_LANG_SOURCE([[ +#define WIN32_LEAN_AND_MEAN +#include +int +main () +{ + MsgWaitForMultipleObjects (0, NULL, 0, 0, 0); + return 0; +}]])], + [], + [LIB_SELECT="$LIB_SELECT -luser32"]) + ;; + esac + fi + AC_SUBST([LIB_SELECT]) +]) diff --git a/gl/m4/selinux-context-h.m4 b/gl/m4/selinux-context-h.m4 new file mode 100644 index 0000000..1e4bcfe --- /dev/null +++ b/gl/m4/selinux-context-h.m4 @@ -0,0 +1,22 @@ +# serial 3 -*- Autoconf -*- +# Copyright (C) 2006-2007, 2009-2014 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. + +# From Jim Meyering +# Provide , if necessary. + +AC_DEFUN([gl_HEADERS_SELINUX_CONTEXT_H], +[ + AC_REQUIRE([gl_LIBSELINUX]) + if test "$with_selinux" != no; then + AC_CHECK_HEADERS([selinux/context.h], + [SELINUX_CONTEXT_H=], + [SELINUX_CONTEXT_H=selinux/context.h]) + else + SELINUX_CONTEXT_H=selinux/context.h + fi + AC_SUBST([SELINUX_CONTEXT_H]) + AM_CONDITIONAL([GL_GENERATE_SELINUX_CONTEXT_H], [test -n "$SELINUX_CONTEXT_H"]) +]) diff --git a/gl/m4/selinux-selinux-h.m4 b/gl/m4/selinux-selinux-h.m4 new file mode 100644 index 0000000..af0696c --- /dev/null +++ b/gl/m4/selinux-selinux-h.m4 @@ -0,0 +1,71 @@ +# serial 5 -*- Autoconf -*- +# Copyright (C) 2006-2007, 2009-2014 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. + +# From Jim Meyering +# Provide , if necessary. +# If it is already present, provide wrapper functions to guard against +# misbehavior from getfilecon, lgetfilecon, and fgetfilecon. + +AC_DEFUN([gl_HEADERS_SELINUX_SELINUX_H], +[ + AC_REQUIRE([gl_LIBSELINUX]) + if test "$with_selinux" != no; then + AC_CHECK_HEADERS([selinux/selinux.h]) + + if test "$ac_cv_header_selinux_selinux_h" = yes; then + # We do have , so do compile getfilecon.c + # and arrange to use its wrappers. + gl_CHECK_NEXT_HEADERS([selinux/selinux.h]) + AC_DEFINE([getfilecon], [rpl_getfilecon], + [Always use our getfilecon wrapper.]) + AC_DEFINE([lgetfilecon], [rpl_lgetfilecon], + [Always use our lgetfilecon wrapper.]) + AC_DEFINE([fgetfilecon], [rpl_fgetfilecon], + [Always use our fgetfilecon wrapper.]) + fi + + case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in + no:*) # already warned + ;; + *:no) + AC_MSG_WARN([libselinux was found but selinux/selinux.h is missing.]) + AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.]) + esac + else + # Do as if does not exist, even if + # AC_CHECK_HEADERS_ONCE has already determined that it exists. + AC_DEFINE([HAVE_SELINUX_SELINUX_H], [0]) + fi +]) + +AC_DEFUN([gl_LIBSELINUX], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_CANONICAL_BUILD]) + + AC_ARG_WITH([selinux], + AS_HELP_STRING([--without-selinux], [do not use SELinux, even on systems with SELinux]), + [], [with_selinux=maybe]) + + LIB_SELINUX= + if test "$with_selinux" != no; then + gl_save_LIBS=$LIBS + AC_SEARCH_LIBS([setfilecon], [selinux], + [test "$ac_cv_search_setfilecon" = "none required" || + LIB_SELINUX=$ac_cv_search_setfilecon]) + LIBS=$gl_save_LIBS + fi + AC_SUBST([LIB_SELINUX]) + + # Warn if SELinux is found but libselinux is absent; + if test "$ac_cv_search_setfilecon" = no; then + if test "$host" = "$build" && test -d /selinux; then + AC_MSG_WARN([This system supports SELinux but libselinux is missing.]) + AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.]) + fi + with_selinux=no + fi +]) diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4 new file mode 100644 index 0000000..0f46a7b --- /dev/null +++ b/gl/m4/setenv.m4 @@ -0,0 +1,160 @@ +# setenv.m4 serial 26 +dnl Copyright (C) 2001-2004, 2006-2014 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_SETENV], +[ + AC_REQUIRE([gl_FUNC_SETENV_SEPARATE]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + if test $ac_cv_func_setenv = no; then + HAVE_SETENV=0 + else + AC_CACHE_CHECK([whether setenv validates arguments], + [gl_cv_func_setenv_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + #include + ]], [[ + int result = 0; + { + if (setenv ("", "", 0) != -1) + result |= 1; + else if (errno != EINVAL) + result |= 2; + } + { + if (setenv ("a", "=", 1) != 0) + result |= 4; + else if (strcmp (getenv ("a"), "=") != 0) + result |= 8; + } + return result; + ]])], + [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_setenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_setenv_works="guessing no" ;; + esac + ])]) + case "$gl_cv_func_setenv_works" in + *yes) ;; + *) + REPLACE_SETENV=1 + ;; + esac + fi +]) + +# Like gl_FUNC_SETENV, except prepare for separate compilation +# (no REPLACE_SETENV, no AC_LIBOBJ). +AC_DEFUN([gl_FUNC_SETENV_SEPARATE], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_CHECK_DECLS_ONCE([setenv]) + if test $ac_cv_have_decl_setenv = no; then + HAVE_DECL_SETENV=0 + fi + AC_CHECK_FUNCS_ONCE([setenv]) + gl_PREREQ_SETENV +]) + +AC_DEFUN([gl_FUNC_UNSETENV], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CHECK_DECLS_ONCE([unsetenv]) + if test $ac_cv_have_decl_unsetenv = no; then + HAVE_DECL_UNSETENV=0 + fi + AC_CHECK_FUNCS([unsetenv]) + if test $ac_cv_func_unsetenv = no; then + HAVE_UNSETENV=0 + else + HAVE_UNSETENV=1 + dnl Some BSDs return void, failing to do error checking. + AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#undef _BSD +#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */ +#include +extern +#ifdef __cplusplus +"C" +#endif +int unsetenv (const char *name); + ]], + [[]])], + [gt_cv_func_unsetenv_ret='int'], + [gt_cv_func_unsetenv_ret='void'])]) + if test $gt_cv_func_unsetenv_ret = 'void'; then + AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void + instead of int.]) + REPLACE_UNSETENV=1 + fi + + dnl Solaris 10 unsetenv does not remove all copies of a name. + dnl Haiku alpha 2 unsetenv gets confused by assignment to environ. + dnl OpenBSD 4.7 unsetenv("") does not fail. + AC_CACHE_CHECK([whether unsetenv obeys POSIX], + [gl_cv_func_unsetenv_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + extern char **environ; + ]], [[ + char entry1[] = "a=1"; + char entry2[] = "b=2"; + char *env[] = { entry1, entry2, NULL }; + if (putenv ((char *) "a=1")) return 1; + if (putenv (entry2)) return 2; + entry2[0] = 'a'; + unsetenv ("a"); + if (getenv ("a")) return 3; + if (!unsetenv ("") || errno != EINVAL) return 4; + entry2[0] = 'b'; + environ = env; + if (!getenv ("a")) return 5; + entry2[0] = 'a'; + unsetenv ("a"); + if (getenv ("a")) return 6; + ]])], + [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_unsetenv_works="guessing no" ;; + esac + ])]) + case "$gl_cv_func_unsetenv_works" in + *yes) ;; + *) + REPLACE_UNSETENV=1 + ;; + esac + fi +]) + +# Prerequisites of lib/setenv.c. +AC_DEFUN([gl_PREREQ_SETENV], +[ + AC_REQUIRE([AC_FUNC_ALLOCA]) + AC_REQUIRE([gl_ENVIRON]) + AC_CHECK_HEADERS_ONCE([unistd.h]) + AC_CHECK_HEADERS([search.h]) + AC_CHECK_FUNCS([tsearch]) +]) + +# Prerequisites of lib/unsetenv.c. +AC_DEFUN([gl_PREREQ_UNSETENV], +[ + AC_REQUIRE([gl_ENVIRON]) + AC_CHECK_HEADERS_ONCE([unistd.h]) +]) diff --git a/gl/m4/setlocale.m4 b/gl/m4/setlocale.m4 new file mode 100644 index 0000000..fe83aab --- /dev/null +++ b/gl/m4/setlocale.m4 @@ -0,0 +1,29 @@ +# setlocale.m4 serial 4 +dnl Copyright (C) 2011-2014 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_SETLOCALE], +[ + AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + dnl On native Windows systems, setlocale(category,NULL) does not look at + dnl the environment variables LC_ALL, category, and LANG. + mingw*) REPLACE_SETLOCALE=1 ;; + dnl On Cygwin 1.5.x, setlocale always succeeds but setlocale(LC_CTYPE,NULL) + dnl is then still "C". + cygwin*) + case `uname -r` in + 1.5.*) REPLACE_SETLOCALE=1 ;; + esac + ;; + esac +]) + +# Prerequisites of lib/setlocale.c. +AC_DEFUN([gl_PREREQ_SETLOCALE], +[ + : +]) diff --git a/gl/m4/sigaction.m4 b/gl/m4/sigaction.m4 new file mode 100644 index 0000000..d060986 --- /dev/null +++ b/gl/m4/sigaction.m4 @@ -0,0 +1,40 @@ +# sigaction.m4 serial 7 +dnl Copyright (C) 2008-2014 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 if sigaction interface is present. +AC_DEFUN([gl_SIGACTION], +[ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([sigaction]) + if test $ac_cv_func_sigaction = yes; then + AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , , + [[#include ]]) + if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then + HAVE_STRUCT_SIGACTION_SA_SIGACTION=0 + fi + else + HAVE_SIGACTION=0 + fi +]) + +# Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c. +AC_DEFUN([gl_PREREQ_SIGACTION], +[ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([AC_TYPE_UID_T]) + AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H]) + AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt]) + AC_CHECK_TYPES([siginfo_t], [], [], [[ +#include + ]]) + if test $ac_cv_type_siginfo_t = no; then + HAVE_SIGINFO_T=0 + fi +]) + +# Prerequisites of lib/sig-handler.h. +AC_DEFUN([gl_PREREQ_SIG_HANDLER_H], [:]) diff --git a/gl/m4/signal_h.m4 b/gl/m4/signal_h.m4 new file mode 100644 index 0000000..c8f664f --- /dev/null +++ b/gl/m4/signal_h.m4 @@ -0,0 +1,83 @@ +# signal_h.m4 serial 18 +dnl Copyright (C) 2007-2014 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_SIGNAL_H], +[ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T]) + gl_NEXT_HEADERS([signal.h]) + +# AIX declares sig_atomic_t to already include volatile, and C89 compilers +# then choke on 'volatile sig_atomic_t'. C99 requires that it compile. + AC_CHECK_TYPE([volatile sig_atomic_t], [], + [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[ +#include + ]]) + + dnl Ensure the type pid_t gets defined. + AC_REQUIRE([AC_TYPE_PID_T]) + + AC_REQUIRE([AC_TYPE_UID_T]) + + dnl Persuade glibc to define sighandler_t. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[ +#include + ]]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [pthread_sigmask sigaction + sigaddset sigdelset sigemptyset sigfillset sigismember + sigpending sigprocmask]) +]) + +AC_DEFUN([gl_CHECK_TYPE_SIGSET_T], +[ + AC_CHECK_TYPES([sigset_t], + [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no], + [[ + #include + /* Mingw defines sigset_t not in , but in . */ + #include + ]]) + if test $gl_cv_type_sigset_t != yes; then + HAVE_SIGSET_T=0 + fi +]) + +AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_SIGNAL_H_DEFAULTS], +[ + GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK]) + GNULIB_RAISE=0; AC_SUBST([GNULIB_RAISE]) + GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) + GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK]) + GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) + HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK]) + HAVE_RAISE=1; AC_SUBST([HAVE_RAISE]) + HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T]) + HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T]) + HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION]) + HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; + AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION]) + HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; + AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T]) + HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T]) + REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK]) + REPLACE_RAISE=0; AC_SUBST([REPLACE_RAISE]) +]) diff --git a/gl/m4/signalblocking.m4 b/gl/m4/signalblocking.m4 new file mode 100644 index 0000000..a2ad9e8 --- /dev/null +++ b/gl/m4/signalblocking.m4 @@ -0,0 +1,25 @@ +# signalblocking.m4 serial 14 +dnl Copyright (C) 2001-2002, 2006-2014 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 available signal blocking primitives. Three different APIs exist: +# 1) POSIX: sigemptyset, sigaddset, sigprocmask +# 2) SYSV: sighold, sigrelse +# 3) BSD: sigblock, sigsetmask +# For simplicity, here we check only for the POSIX signal blocking. +AC_DEFUN([gl_SIGNALBLOCKING], +[ + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T]) + if test $gl_cv_type_sigset_t = yes; then + AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1]) + fi + if test -z "$gl_cv_func_sigprocmask"; then + HAVE_POSIX_SIGNALBLOCKING=0 + fi +]) + +# Prerequisites of lib/sigprocmask.c. +AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:]) diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4 new file mode 100644 index 0000000..7e192d5 --- /dev/null +++ b/gl/m4/size_max.m4 @@ -0,0 +1,79 @@ +# size_max.m4 serial 10 +dnl Copyright (C) 2003, 2005-2006, 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([gl_SIZE_MAX], +[ + AC_CHECK_HEADERS([stdint.h]) + dnl First test whether the system already has SIZE_MAX. + AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ + gl_cv_size_max= + AC_EGREP_CPP([Found it], [ +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif +], [gl_cv_size_max=yes]) + if test -z "$gl_cv_size_max"; then + dnl Define it ourselves. Here we assume that the type 'size_t' is not wider + dnl than the type 'unsigned long'. Try hard to find a definition that can + dnl be used in a preprocessor #if, i.e. doesn't contain a cast. + AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], + [#include +#include ], [size_t_bits_minus_1=]) + AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], + [#include ], [fits_in_uint=]) + if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then + if test $fits_in_uint = 1; then + dnl Even though SIZE_MAX fits in an unsigned int, it must be of type + dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + extern size_t foo; + extern unsigned long foo; + ]], + [[]])], + [fits_in_uint=0]) + fi + dnl We cannot use 'expr' to simplify this expression, because 'expr' + dnl works only with 'long' integers in the host environment, while we + dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. + if test $fits_in_uint = 1; then + gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" + else + gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" + fi + else + dnl Shouldn't happen, but who knows... + gl_cv_size_max='((size_t)~(size_t)0)' + fi + fi + ]) + if test "$gl_cv_size_max" != yes; then + AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], + [Define as the maximum value of type 'size_t', if the system doesn't define it.]) + fi + dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after + dnl . Remember that the #undef in AH_VERBATIM gets replaced with + dnl #define by AC_DEFINE_UNQUOTED. + AH_VERBATIM([SIZE_MAX], +[/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#ifndef SIZE_MAX +# undef SIZE_MAX +#endif]) +]) + +dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. +dnl Remove this when we can assume autoconf >= 2.61. +m4_ifdef([AC_COMPUTE_INT], [], [ + AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) +]) diff --git a/gl/m4/sleep.m4 b/gl/m4/sleep.m4 new file mode 100644 index 0000000..2f84da5 --- /dev/null +++ b/gl/m4/sleep.m4 @@ -0,0 +1,62 @@ +# sleep.m4 serial 7 +dnl Copyright (C) 2007-2014 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_SLEEP], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + dnl We expect to see the declaration of sleep() in a header file. + dnl Older versions of mingw have a sleep() function that is an alias to + dnl _sleep() in MSVCRT. It has a different signature than POSIX sleep(): + dnl it takes the number of milliseconds as argument and returns void. + dnl mingw does not declare this function. + AC_CHECK_DECLS([sleep], , , [[#include ]]) + AC_CHECK_FUNCS_ONCE([sleep]) + if test $ac_cv_have_decl_sleep != yes; then + HAVE_SLEEP=0 + else + dnl Cygwin 1.5.x has a bug where sleep can't exceed 49.7 days. + AC_CACHE_CHECK([for working sleep], [gl_cv_func_sleep_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +#include +static void +handle_alarm (int sig) +{ + if (sig != SIGALRM) + _exit (2); +} +]], [[ + /* Failure to compile this test due to missing alarm is okay, + since all such platforms (mingw) also lack sleep. */ + unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */ + unsigned int remaining; + signal (SIGALRM, handle_alarm); + alarm (1); + remaining = sleep (pentecost); + if (remaining > pentecost) + return 3; + if (remaining <= pentecost - 10) + return 4; + return 0; + ]])], + [gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_sleep_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_sleep_works="guessing no" ;; + esac + ])]) + case "$gl_cv_func_sleep_works" in + *yes) ;; + *) + REPLACE_SLEEP=1 + ;; + esac + fi +]) diff --git a/gl/m4/snprintf.m4 b/gl/m4/snprintf.m4 new file mode 100644 index 0000000..888db35 --- /dev/null +++ b/gl/m4/snprintf.m4 @@ -0,0 +1,54 @@ +# snprintf.m4 serial 6 +dnl Copyright (C) 2002-2004, 2007-2014 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 Libintl 0.17 will replace snprintf only if it does not support %1$s, +dnl but defers to any gnulib snprintf replacements. Therefore, gnulib +dnl must guarantee that the decision for replacing snprintf is a superset +dnl of the reasons checked by libintl. +AC_DEFUN([gl_FUNC_SNPRINTF], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + gl_cv_func_snprintf_usable=no + AC_CHECK_FUNCS([snprintf]) + if test $ac_cv_func_snprintf = yes; then + gl_SNPRINTF_SIZE1 + case "$gl_cv_func_snprintf_size1" in + *yes) + gl_SNPRINTF_RETVAL_C99 + case "$gl_cv_func_snprintf_retval_c99" in + *yes) + gl_PRINTF_POSITIONS + case "$gl_cv_func_printf_positions" in + *yes) + gl_cv_func_snprintf_usable=yes + ;; + esac + ;; + esac + ;; + esac + fi + if test $gl_cv_func_snprintf_usable = no; then + gl_REPLACE_SNPRINTF + fi + AC_CHECK_DECLS_ONCE([snprintf]) + if test $ac_cv_have_decl_snprintf = no; then + HAVE_DECL_SNPRINTF=0 + fi +]) + +AC_DEFUN([gl_REPLACE_SNPRINTF], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_LIBOBJ([snprintf]) + if test $ac_cv_func_snprintf = yes; then + REPLACE_SNPRINTF=1 + fi + gl_PREREQ_SNPRINTF +]) + +# Prerequisites of lib/snprintf.c. +AC_DEFUN([gl_PREREQ_SNPRINTF], [:]) diff --git a/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4 new file mode 100644 index 0000000..041498b --- /dev/null +++ b/gl/m4/socketlib.m4 @@ -0,0 +1,86 @@ +# socketlib.m4 serial 1 +dnl Copyright (C) 2008-2014 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 gl_SOCKETLIB +dnl Determines the library to use for socket functions. +dnl Sets and AC_SUBSTs LIBSOCKET. + +AC_DEFUN([gl_SOCKETLIB], +[ + gl_PREREQ_SYS_H_WINSOCK2 dnl for HAVE_WINSOCK2_H + LIBSOCKET= + if test $HAVE_WINSOCK2_H = 1; then + dnl Native Windows API (not Cygwin). + AC_CACHE_CHECK([if we need to call WSAStartup in winsock2.h and -lws2_32], + [gl_cv_func_wsastartup], [ + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lws2_32" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#ifdef HAVE_WINSOCK2_H +# include +#endif]], [[ + WORD wVersionRequested = MAKEWORD(1, 1); + WSADATA wsaData; + int err = WSAStartup(wVersionRequested, &wsaData); + WSACleanup ();]])], + gl_cv_func_wsastartup=yes, gl_cv_func_wsastartup=no) + LIBS="$gl_save_LIBS" + ]) + if test "$gl_cv_func_wsastartup" = "yes"; then + AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.]) + LIBSOCKET='-lws2_32' + fi + else + dnl Unix API. + dnl Solaris has most socket functions in libsocket. + dnl Haiku has most socket functions in libnetwork. + dnl BeOS has most socket functions in libnet. + AC_CACHE_CHECK([for library containing setsockopt], [gl_cv_lib_socket], [ + gl_cv_lib_socket= + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern +#ifdef __cplusplus +"C" +#endif +char setsockopt();]], [[setsockopt();]])], + [], + [gl_save_LIBS="$LIBS" + LIBS="$gl_save_LIBS -lsocket" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern +#ifdef __cplusplus +"C" +#endif +char setsockopt();]], [[setsockopt();]])], + [gl_cv_lib_socket="-lsocket"]) + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnetwork" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern +#ifdef __cplusplus +"C" +#endif +char setsockopt();]], [[setsockopt();]])], + [gl_cv_lib_socket="-lnetwork"]) + if test -z "$gl_cv_lib_socket"; then + LIBS="$gl_save_LIBS -lnet" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern +#ifdef __cplusplus +"C" +#endif +char setsockopt();]], [[setsockopt();]])], + [gl_cv_lib_socket="-lnet"]) + fi + fi + LIBS="$gl_save_LIBS" + ]) + if test -z "$gl_cv_lib_socket"; then + gl_cv_lib_socket="none needed" + fi + ]) + if test "$gl_cv_lib_socket" != "none needed"; then + LIBSOCKET="$gl_cv_lib_socket" + fi + fi + AC_SUBST([LIBSOCKET]) +]) diff --git a/gl/m4/sockets.m4 b/gl/m4/sockets.m4 new file mode 100644 index 0000000..da6ff74 --- /dev/null +++ b/gl/m4/sockets.m4 @@ -0,0 +1,17 @@ +# sockets.m4 serial 7 +dnl Copyright (C) 2008-2014 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_SOCKETS], +[ + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([gl_SOCKETLIB]) + gl_PREREQ_SOCKETS +]) + +# Prerequisites of lib/sockets.c. +AC_DEFUN([gl_PREREQ_SOCKETS], [ + : +]) diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4 new file mode 100644 index 0000000..4c07f86 --- /dev/null +++ b/gl/m4/socklen.m4 @@ -0,0 +1,77 @@ +# socklen.m4 serial 10 +dnl Copyright (C) 2005-2007, 2009-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Albert Chin, Windows fixes from Simon Josefsson. + +dnl Check for socklen_t: historically on BSD it is an int, and in +dnl POSIX 1g it is a type of its own, but some platforms use different +dnl types for the argument to getsockopt, getpeername, etc.: +dnl HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS. +dnl So we have to test to find something that will work. + +AC_DEFUN([gl_TYPE_SOCKLEN_T], + [AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])dnl + AC_CHECK_TYPE([socklen_t], , + [AC_MSG_CHECKING([for socklen_t equivalent]) + AC_CACHE_VAL([gl_cv_socklen_t_equiv], + [# Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + gl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t "unsigned int" "long int" "unsigned long int"; do + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include + #include + + int getpeername (int, $arg2 *, $t *);]], + [[$t len; + getpeername (0, 0, &len);]])], + [gl_cv_socklen_t_equiv="$t"]) + test "$gl_cv_socklen_t_equiv" != "" && break + done + test "$gl_cv_socklen_t_equiv" != "" && break + done + ]) + if test "$gl_cv_socklen_t_equiv" = ""; then + AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) + fi + AC_MSG_RESULT([$gl_cv_socklen_t_equiv]) + AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], + [type to use in place of socklen_t if not defined])], + [gl_SOCKET_HEADERS])]) + +dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find +dnl it there too. But on Cygwin, wc2tcpip.h must not be included. Users +dnl of this module should use the same include pattern as gl_SOCKET_HEADERS. +dnl When you change this macro, keep also in sync: +dnl - gl_CHECK_SOCKET_HEADERS, +dnl - the Include section of modules/socklen. +AC_DEFUN([gl_SOCKET_HEADERS], +[ +/* is not needed according to POSIX, but the + in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#if HAVE_SYS_SOCKET_H +# include +#elif HAVE_WS2TCPIP_H +# include +#endif +]) + +dnl Tests for the existence of the header for socket facilities. +dnl Defines the C macros HAVE_SYS_SOCKET_H, HAVE_WS2TCPIP_H. +dnl This macro must match gl_SOCKET_HEADERS. +AC_DEFUN([gl_CHECK_SOCKET_HEADERS], + [AC_CHECK_HEADERS_ONCE([sys/socket.h]) + if test $ac_cv_header_sys_socket_h = no; then + dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make + dnl the check for those headers unconditional; yet cygwin reports + dnl that the headers are present but cannot be compiled (since on + dnl cygwin, all socket information should come from sys/socket.h). + AC_CHECK_HEADERS([ws2tcpip.h]) + fi + ]) diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4 new file mode 100644 index 0000000..31d436f --- /dev/null +++ b/gl/m4/sockpfaf.m4 @@ -0,0 +1,87 @@ +# sockpfaf.m4 serial 8 +dnl Copyright (C) 2004, 2006, 2009-2014 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 Test for some common socket protocol families (PF_INET, PF_INET6, ...) +dnl and some common address families (AF_INET, AF_INET6, ...). +dnl This test assumes that a system supports an address family if and only if +dnl it supports the corresponding protocol family. + +dnl From Bruno Haible. + +AC_DEFUN([gl_SOCKET_FAMILIES], +[ + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + AC_CHECK_HEADERS_ONCE([netinet/in.h]) + + AC_MSG_CHECKING([for IPv4 sockets]) + AC_CACHE_VAL([gl_cv_socket_ipv4], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif]], +[[int x = AF_INET; struct in_addr y; struct sockaddr_in z; + if (&x && &y && &z) return 0;]])], + gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)]) + AC_MSG_RESULT([$gl_cv_socket_ipv4]) + if test $gl_cv_socket_ipv4 = yes; then + AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if defines AF_INET.]) + fi + + AC_MSG_CHECKING([for IPv6 sockets]) + AC_CACHE_VAL([gl_cv_socket_ipv6], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif]], +[[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; + if (&x && &y && &z) return 0;]])], + gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)]) + AC_MSG_RESULT([$gl_cv_socket_ipv6]) + if test $gl_cv_socket_ipv6 = yes; then + AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if defines AF_INET6.]) + fi +]) + +AC_DEFUN([gl_SOCKET_FAMILY_UNIX], +[ + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + AC_CHECK_HEADERS_ONCE([sys/un.h]) + + AC_MSG_CHECKING([for UNIX domain sockets]) + AC_CACHE_VAL([gl_cv_socket_unix], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_UN_H +#include +#endif +#ifdef HAVE_WINSOCK2_H +#include +#endif]], +[[int x = AF_UNIX; struct sockaddr_un y; + if (&x && &y) return 0;]])], + gl_cv_socket_unix=yes, gl_cv_socket_unix=no)]) + AC_MSG_RESULT([$gl_cv_socket_unix]) + if test $gl_cv_socket_unix = yes; then + AC_DEFINE([HAVE_UNIXSOCKET], [1], [Define to 1 if defines AF_UNIX.]) + fi +]) diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4 new file mode 100644 index 0000000..fbe1d06 --- /dev/null +++ b/gl/m4/ssize_t.m4 @@ -0,0 +1,23 @@ +# ssize_t.m4 serial 5 (gettext-0.18.2) +dnl Copyright (C) 2001-2003, 2006, 2010-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether ssize_t is defined. + +AC_DEFUN([gt_TYPE_SSIZE_T], +[ + AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[int x = sizeof (ssize_t *) + sizeof (ssize_t); + return !x;]])], + [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) + if test $gt_cv_ssize_t = no; then + AC_DEFINE([ssize_t], [int], + [Define as a signed type of the same size as size_t.]) + fi +]) diff --git a/gl/m4/st_dm_mode.m4 b/gl/m4/st_dm_mode.m4 new file mode 100644 index 0000000..3c9b52e --- /dev/null +++ b/gl/m4/st_dm_mode.m4 @@ -0,0 +1,23 @@ +# serial 6 + +# Copyright (C) 1998-1999, 2001, 2009-2014 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. + +# Define HAVE_ST_DM_MODE if struct stat has an st_dm_mode member. + +AC_DEFUN([AC_STRUCT_ST_DM_MODE], + [AC_CACHE_CHECK([for st_dm_mode in struct stat], [ac_cv_struct_st_dm_mode], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +#include ]], [[struct stat s; s.st_dm_mode;]])], + [ac_cv_struct_st_dm_mode=yes], + [ac_cv_struct_st_dm_mode=no])]) + + if test $ac_cv_struct_st_dm_mode = yes; then + AC_DEFINE([HAVE_ST_DM_MODE], [1], + [Define if struct stat has an st_dm_mode member. ]) + fi + ] +) diff --git a/gl/m4/stat-size.m4 b/gl/m4/stat-size.m4 new file mode 100644 index 0000000..71acd35 --- /dev/null +++ b/gl/m4/stat-size.m4 @@ -0,0 +1,14 @@ +#serial 1 + +# Copyright (C) 2011-2014 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. + +AC_DEFUN([gl_STAT_SIZE], +[ + # Don't call AC_STRUCT_ST_BLOCKS because it causes bugs. Details at + # http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00051.html + AC_CHECK_HEADERS_ONCE([sys/param.h]) +]) diff --git a/gl/m4/stat-time.m4 b/gl/m4/stat-time.m4 new file mode 100644 index 0000000..ea5c4fc --- /dev/null +++ b/gl/m4/stat-time.m4 @@ -0,0 +1,83 @@ +# Checks for stat-related time functions. + +# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2014 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. + +dnl From Paul Eggert. + +# st_atim.tv_nsec - Linux, Solaris, Cygwin +# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE +# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE +# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) + +# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) +# st_birthtim - Cygwin 1.7.0+ + +AC_DEFUN([gl_STAT_TIME], +[ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + + AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], + [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ + #include + #include + #if HAVE_SYS_TIME_H + # include + #endif + #include + struct timespec ts; + struct stat st; + ]], + [[ + st.st_atim = ts; + ]])], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], + [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) + if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1], + [Define to 1 if the type of the st_atim member of a struct stat is + struct timespec.]) + fi], + [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [], + [AC_CHECK_MEMBERS([struct stat.st_atimensec], [], + [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [], + [#include + #include ])], + [#include + #include ])], + [#include + #include ])], + [#include + #include ]) +]) + +# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.) +# and NTFS (Cygwin). +# There was a time when this field was named st_createtime (21 June +# 2002 to 16 July 2002) But that window is very small and applied only +# to development code, so systems still using that configuration are +# not supported. See revisions 1.10 and 1.11 of FreeBSD's +# src/sys/ufs/ufs/dinode.h. +# +AC_DEFUN([gl_STAT_BIRTHTIME], +[ + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [], + [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [], + [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [], + [#include + #include ])], + [#include + #include ])], + [#include + #include ]) +]) diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4 new file mode 100644 index 0000000..1ae327b --- /dev/null +++ b/gl/m4/stat.m4 @@ -0,0 +1,71 @@ +# serial 11 + +# Copyright (C) 2009-2014 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. + +AC_DEFUN([gl_FUNC_STAT], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([lstat]) + dnl mingw is the only known platform where stat(".") and stat("./") differ + AC_CACHE_CHECK([whether stat handles trailing slashes on directories], + [gl_cv_func_stat_dir_slash], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include +]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])], + [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no], + [case $host_os in + mingw*) gl_cv_func_stat_dir_slash="guessing no";; + *) gl_cv_func_stat_dir_slash="guessing yes";; + esac])]) + dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/"). + dnl (For mingw, this is due to a broken stat() override in libmingwex.a.) + dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/"). + AC_CACHE_CHECK([whether stat handles trailing slashes on files], + [gl_cv_func_stat_file_slash], + [touch conftest.tmp + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.tmp conftest.lnk + fi + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include +]], [[int result = 0; + struct stat st; + if (!stat ("conftest.tmp/", &st)) + result |= 1; +#if HAVE_LSTAT + if (!stat ("conftest.lnk/", &st)) + result |= 2; +#endif + return result; + ]])], + [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_stat_file_slash="guessing no" ;; + esac + ]) + rm -f conftest.tmp conftest.lnk]) + case $gl_cv_func_stat_dir_slash in + *no) REPLACE_STAT=1 + AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs + help when passed a directory name with a trailing slash]);; + esac + case $gl_cv_func_stat_file_slash in + *no) REPLACE_STAT=1 + AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs + help when passed a file name with a trailing slash]);; + esac +]) + +# Prerequisites of lib/stat.c. +AC_DEFUN([gl_PREREQ_STAT], [:]) diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4 new file mode 100644 index 0000000..9efafe5 --- /dev/null +++ b/gl/m4/stdalign.m4 @@ -0,0 +1,53 @@ +# Check for stdalign.h that conforms to C11. + +dnl Copyright 2011-2014 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. + +# Prepare for substituting if it is not supported. + +AC_DEFUN([gl_STDALIGN_H], +[ + AC_CACHE_CHECK([for working stdalign.h], + [gl_cv_header_working_stdalign_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + + /* Test that alignof yields a result consistent with offsetof. + This catches GCC bug 52023 + . */ + #ifdef __cplusplus + template struct alignof_helper { char a; t b; }; + # define ao(type) offsetof (alignof_helper, b) + #else + # define ao(type) offsetof (struct { char a; type b; }, b) + #endif + char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; + char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; + char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; + + /* Test _Alignas only on platforms where gnulib can help. */ + #if \ + ((defined __cplusplus && 201103 <= __cplusplus) \ + || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ + || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) + struct alignas_test { char c; char alignas (8) alignas_8; }; + char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 + ? 1 : -1]; + #endif + ]])], + [gl_cv_header_working_stdalign_h=yes], + [gl_cv_header_working_stdalign_h=no])]) + + if test $gl_cv_header_working_stdalign_h = yes; then + STDALIGN_H='' + else + STDALIGN_H='stdalign.h' + fi + + AC_SUBST([STDALIGN_H]) + AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"]) +]) diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4 new file mode 100644 index 0000000..732aa31 --- /dev/null +++ b/gl/m4/stdarg.m4 @@ -0,0 +1,78 @@ +# stdarg.m4 serial 6 +dnl Copyright (C) 2006, 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Provide a working va_copy in combination with . + +AC_DEFUN([gl_STDARG_H], +[ + STDARG_H='' + NEXT_STDARG_H='' + AC_MSG_CHECKING([for va_copy]) + AC_CACHE_VAL([gl_cv_func_va_copy], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[ +#ifndef va_copy +void (*func) (va_list, va_list) = va_copy; +#endif + ]])], + [gl_cv_func_va_copy=yes], + [gl_cv_func_va_copy=no])]) + AC_MSG_RESULT([$gl_cv_func_va_copy]) + if test $gl_cv_func_va_copy = no; then + dnl Provide a substitute. + dnl Usually a simple definition in is enough. Not so on AIX 5 + dnl with some versions of the /usr/vac/bin/cc compiler. It has an + dnl which does '#undef va_copy', leading to a missing va_copy symbol. For + dnl this platform, we use an substitute. But we cannot use this + dnl approach on other platforms, because often defines only + dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do + dnl not work in this situation. + AC_EGREP_CPP([vaccine], + [#if defined _AIX && !defined __GNUC__ + AIX vaccine + #endif + ], [gl_aixcc=yes], [gl_aixcc=no]) + if test $gl_aixcc = yes; then + dnl Provide a substitute file. + STDARG_H=stdarg.h + gl_NEXT_HEADERS([stdarg.h]) + dnl Fallback for the case when contains only macro definitions. + if test "$gl_cv_next_stdarg_h" = '""'; then + gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' + NEXT_STDARG_H="$gl_cv_next_stdarg_h" + fi + else + dnl Provide a substitute in , either __va_copy or as a simple + dnl assignment. + gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[ +#ifndef __va_copy +error, bail out +#endif + ]])], + [gl_cv_func___va_copy=yes], + [gl_cv_func___va_copy=no])]) + if test $gl_cv_func___va_copy = yes; then + AC_DEFINE([va_copy], [__va_copy], + [Define as a macro for copying va_list variables.]) + else + AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */ +#define gl_va_copy(a,b) ((a) = (b))]) + AC_DEFINE([va_copy], [gl_va_copy], + [Define as a macro for copying va_list variables.]) + fi + fi + fi + AC_SUBST([STDARG_H]) + AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"]) + AC_SUBST([NEXT_STDARG_H]) +]) diff --git a/gl/m4/stdbool.m4 b/gl/m4/stdbool.m4 new file mode 100644 index 0000000..006ed52 --- /dev/null +++ b/gl/m4/stdbool.m4 @@ -0,0 +1,100 @@ +# Check for stdbool.h that conforms to C99. + +dnl Copyright (C) 2002-2006, 2009-2014 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. + +#serial 5 + +# Prepare for substituting if it is not supported. + +AC_DEFUN([AM_STDBOOL_H], +[ + AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) + + # Define two additional variables used in the Makefile substitution. + + if test "$ac_cv_header_stdbool_h" = yes; then + STDBOOL_H='' + else + STDBOOL_H='stdbool.h' + fi + AC_SUBST([STDBOOL_H]) + AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) + + if test "$ac_cv_type__Bool" = yes; then + HAVE__BOOL=1 + else + HAVE__BOOL=0 + fi + AC_SUBST([HAVE__BOOL]) +]) + +# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. +AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) + +# This version of the macro is needed in autoconf <= 2.68. + +AC_DEFUN([AC_CHECK_HEADER_STDBOOL], + [AC_CACHE_CHECK([for stdbool.h that conforms to C99], + [ac_cv_header_stdbool_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; + ]], + [[ + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); + ]])], + [ac_cv_header_stdbool_h=yes], + [ac_cv_header_stdbool_h=no])]) + AC_CHECK_TYPES([_Bool]) +]) diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4 new file mode 100644 index 0000000..c555e29 --- /dev/null +++ b/gl/m4/stddef_h.m4 @@ -0,0 +1,47 @@ +dnl A placeholder for POSIX 2008 , for platforms that have issues. +# stddef_h.m4 serial 4 +dnl Copyright (C) 2009-2014 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_STDDEF_H], +[ + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + STDDEF_H= + if test $gt_cv_c_wchar_t = no; then + HAVE_WCHAR_T=0 + STDDEF_H=stddef.h + fi + AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], + [gl_cv_decl_null_works], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + int test[2 * (sizeof NULL == sizeof (void *)) -1]; +]])], + [gl_cv_decl_null_works=yes], + [gl_cv_decl_null_works=no])]) + if test $gl_cv_decl_null_works = no; then + REPLACE_NULL=1 + STDDEF_H=stddef.h + fi + AC_SUBST([STDDEF_H]) + AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) + if test -n "$STDDEF_H"; then + gl_NEXT_HEADERS([stddef.h]) + fi +]) + +AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_STDDEF_H_DEFAULTS], +[ + dnl Assume proper GNU behavior unless another module says otherwise. + REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) + HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) +]) diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4 new file mode 100644 index 0000000..1981d9d --- /dev/null +++ b/gl/m4/stdint.m4 @@ -0,0 +1,484 @@ +# stdint.m4 serial 43 +dnl Copyright (C) 2001-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert and Bruno Haible. +dnl Test whether is supported or must be substituted. + +AC_DEFUN_ONCE([gl_STDINT_H], +[ + AC_PREREQ([2.59])dnl + + dnl Check for long long int and unsigned long long int. + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + if test $ac_cv_type_long_long_int = yes; then + HAVE_LONG_LONG_INT=1 + else + HAVE_LONG_LONG_INT=0 + fi + AC_SUBST([HAVE_LONG_LONG_INT]) + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + if test $ac_cv_type_unsigned_long_long_int = yes; then + HAVE_UNSIGNED_LONG_LONG_INT=1 + else + HAVE_UNSIGNED_LONG_LONG_INT=0 + fi + AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) + + dnl Check for , in the same way as gl_WCHAR_H does. + AC_CHECK_HEADERS_ONCE([wchar.h]) + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 + else + HAVE_WCHAR_H=0 + fi + AC_SUBST([HAVE_WCHAR_H]) + + dnl Check for . + dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. + if test $ac_cv_header_inttypes_h = yes; then + HAVE_INTTYPES_H=1 + else + HAVE_INTTYPES_H=0 + fi + AC_SUBST([HAVE_INTTYPES_H]) + + dnl Check for . + dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. + if test $ac_cv_header_sys_types_h = yes; then + HAVE_SYS_TYPES_H=1 + else + HAVE_SYS_TYPES_H=0 + fi + AC_SUBST([HAVE_SYS_TYPES_H]) + + gl_CHECK_NEXT_HEADERS([stdint.h]) + if test $ac_cv_header_stdint_h = yes; then + HAVE_STDINT_H=1 + else + HAVE_STDINT_H=0 + fi + AC_SUBST([HAVE_STDINT_H]) + + dnl Now see whether we need a substitute . + if test $ac_cv_header_stdint_h = yes; then + AC_CACHE_CHECK([whether stdint.h conforms to C99], + [gl_cv_header_working_stdint_h], + [gl_cv_header_working_stdint_h=no + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include +/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ +#if !(defined WCHAR_MIN && defined WCHAR_MAX) +#error "WCHAR_MIN, WCHAR_MAX not defined in " +#endif +] +gl_STDINT_INCLUDES +[ +#ifdef INT8_MAX +int8_t a1 = INT8_MAX; +int8_t a1min = INT8_MIN; +#endif +#ifdef INT16_MAX +int16_t a2 = INT16_MAX; +int16_t a2min = INT16_MIN; +#endif +#ifdef INT32_MAX +int32_t a3 = INT32_MAX; +int32_t a3min = INT32_MIN; +#endif +#ifdef INT64_MAX +int64_t a4 = INT64_MAX; +int64_t a4min = INT64_MIN; +#endif +#ifdef UINT8_MAX +uint8_t b1 = UINT8_MAX; +#else +typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; +#endif +#ifdef UINT16_MAX +uint16_t b2 = UINT16_MAX; +#endif +#ifdef UINT32_MAX +uint32_t b3 = UINT32_MAX; +#endif +#ifdef UINT64_MAX +uint64_t b4 = UINT64_MAX; +#endif +int_least8_t c1 = INT8_C (0x7f); +int_least8_t c1max = INT_LEAST8_MAX; +int_least8_t c1min = INT_LEAST8_MIN; +int_least16_t c2 = INT16_C (0x7fff); +int_least16_t c2max = INT_LEAST16_MAX; +int_least16_t c2min = INT_LEAST16_MIN; +int_least32_t c3 = INT32_C (0x7fffffff); +int_least32_t c3max = INT_LEAST32_MAX; +int_least32_t c3min = INT_LEAST32_MIN; +int_least64_t c4 = INT64_C (0x7fffffffffffffff); +int_least64_t c4max = INT_LEAST64_MAX; +int_least64_t c4min = INT_LEAST64_MIN; +uint_least8_t d1 = UINT8_C (0xff); +uint_least8_t d1max = UINT_LEAST8_MAX; +uint_least16_t d2 = UINT16_C (0xffff); +uint_least16_t d2max = UINT_LEAST16_MAX; +uint_least32_t d3 = UINT32_C (0xffffffff); +uint_least32_t d3max = UINT_LEAST32_MAX; +uint_least64_t d4 = UINT64_C (0xffffffffffffffff); +uint_least64_t d4max = UINT_LEAST64_MAX; +int_fast8_t e1 = INT_FAST8_MAX; +int_fast8_t e1min = INT_FAST8_MIN; +int_fast16_t e2 = INT_FAST16_MAX; +int_fast16_t e2min = INT_FAST16_MIN; +int_fast32_t e3 = INT_FAST32_MAX; +int_fast32_t e3min = INT_FAST32_MIN; +int_fast64_t e4 = INT_FAST64_MAX; +int_fast64_t e4min = INT_FAST64_MIN; +uint_fast8_t f1 = UINT_FAST8_MAX; +uint_fast16_t f2 = UINT_FAST16_MAX; +uint_fast32_t f3 = UINT_FAST32_MAX; +uint_fast64_t f4 = UINT_FAST64_MAX; +#ifdef INTPTR_MAX +intptr_t g = INTPTR_MAX; +intptr_t gmin = INTPTR_MIN; +#endif +#ifdef UINTPTR_MAX +uintptr_t h = UINTPTR_MAX; +#endif +intmax_t i = INTMAX_MAX; +uintmax_t j = UINTMAX_MAX; + +#include /* for CHAR_BIT */ +#define TYPE_MINIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) +#define TYPE_MAXIMUM(t) \ + ((t) ((t) 0 < (t) -1 \ + ? (t) -1 \ + : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) +struct s { + int check_PTRDIFF: + PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) + && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) + ? 1 : -1; + /* Detect bug in FreeBSD 6.0 / ia64. */ + int check_SIG_ATOMIC: + SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) + && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) + ? 1 : -1; + int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; + int check_WCHAR: + WCHAR_MIN == TYPE_MINIMUM (wchar_t) + && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) + ? 1 : -1; + /* Detect bug in mingw. */ + int check_WINT: + WINT_MIN == TYPE_MINIMUM (wint_t) + && WINT_MAX == TYPE_MAXIMUM (wint_t) + ? 1 : -1; + + /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ + int check_UINT8_C: + (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; + int check_UINT16_C: + (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; + + /* Detect bugs in OpenBSD 3.9 stdint.h. */ +#ifdef UINT8_MAX + int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; +#endif +#ifdef UINT16_MAX + int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; +#endif +#ifdef UINT32_MAX + int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; +#endif +#ifdef UINT64_MAX + int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; +#endif + int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; + int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; + int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; + int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; + int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; + int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; + int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; + int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; + int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; + int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; + int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; +}; + ]])], + [dnl Determine whether the various *_MIN, *_MAX macros are usable + dnl in preprocessor expression. We could do it by compiling a test + dnl program for each of these macros. It is faster to run a program + dnl that inspects the macro expansion. + dnl This detects a bug on HP-UX 11.23/ia64. + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[ +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include +] +gl_STDINT_INCLUDES +[ +#include +#include +#define MVAL(macro) MVAL1(macro) +#define MVAL1(expression) #expression +static const char *macro_values[] = + { +#ifdef INT8_MAX + MVAL (INT8_MAX), +#endif +#ifdef INT16_MAX + MVAL (INT16_MAX), +#endif +#ifdef INT32_MAX + MVAL (INT32_MAX), +#endif +#ifdef INT64_MAX + MVAL (INT64_MAX), +#endif +#ifdef UINT8_MAX + MVAL (UINT8_MAX), +#endif +#ifdef UINT16_MAX + MVAL (UINT16_MAX), +#endif +#ifdef UINT32_MAX + MVAL (UINT32_MAX), +#endif +#ifdef UINT64_MAX + MVAL (UINT64_MAX), +#endif + NULL + }; +]], [[ + const char **mv; + for (mv = macro_values; *mv != NULL; mv++) + { + const char *value = *mv; + /* Test whether it looks like a cast expression. */ + if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 + || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 + || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 + || strncmp (value, "((int)"/*)*/, 6) == 0 + || strncmp (value, "((signed short)"/*)*/, 15) == 0 + || strncmp (value, "((signed char)"/*)*/, 14) == 0) + return mv - macro_values + 1; + } + return 0; +]])], + [gl_cv_header_working_stdint_h=yes], + [], + [dnl When cross-compiling, assume it works. + gl_cv_header_working_stdint_h=yes + ]) + ]) + ]) + fi + if test "$gl_cv_header_working_stdint_h" = yes; then + STDINT_H= + else + dnl Check for , and for + dnl (used in Linux libc4 >= 4.6.7 and libc5). + AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + else + HAVE_SYS_INTTYPES_H=0 + fi + AC_SUBST([HAVE_SYS_INTTYPES_H]) + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + else + HAVE_SYS_BITYPES_H=0 + fi + AC_SUBST([HAVE_SYS_BITYPES_H]) + + gl_STDINT_TYPE_PROPERTIES + STDINT_H=stdint.h + fi + AC_SUBST([STDINT_H]) + AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) +]) + +dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) +dnl Determine the size of each of the given types in bits. +AC_DEFUN([gl_STDINT_BITSIZEOF], +[ + dnl Use a shell loop, to avoid bloating configure, and + dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into + dnl config.h.in, + dnl - extra AC_SUBST calls, so that the right substitutions are made. + m4_foreach_w([gltype], [$1], + [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), + [Define to the number of bits in type ']gltype['.])]) + for gltype in $1 ; do + AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], + [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], + [$2 +#include ], [result=unknown]) + eval gl_cv_bitsizeof_${gltype}=\$result + ]) + eval result=\$gl_cv_bitsizeof_${gltype} + if test $result = unknown; then + dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, + dnl do a syntax check even on unused #if conditions and give an error + dnl on valid C code like this: + dnl #if 0 + dnl # if > 32 + dnl # endif + dnl #endif + result=0 + fi + GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) + eval BITSIZEOF_${GLTYPE}=\$result + done + m4_foreach_w([gltype], [$1], + [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) +]) + +dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) +dnl Determine the signedness of each of the given types. +dnl Define HAVE_SIGNED_TYPE if type is signed. +AC_DEFUN([gl_CHECK_TYPES_SIGNED], +[ + dnl Use a shell loop, to avoid bloating configure, and + dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into + dnl config.h.in, + dnl - extra AC_SUBST calls, so that the right substitutions are made. + m4_foreach_w([gltype], [$1], + [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), + [Define to 1 if ']gltype[' is a signed integer type.])]) + for gltype in $1 ; do + AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([$2[ + int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], + result=yes, result=no) + eval gl_cv_type_${gltype}_signed=\$result + ]) + eval result=\$gl_cv_type_${gltype}_signed + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + if test "$result" = yes; then + AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) + eval HAVE_SIGNED_${GLTYPE}=1 + else + eval HAVE_SIGNED_${GLTYPE}=0 + fi + done + m4_foreach_w([gltype], [$1], + [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) +]) + +dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) +dnl Determine the suffix to use for integer constants of the given types. +dnl Define t_SUFFIX for each such type. +AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], +[ + dnl Use a shell loop, to avoid bloating configure, and + dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into + dnl config.h.in, + dnl - extra AC_SUBST calls, so that the right substitutions are made. + m4_foreach_w([gltype], [$1], + [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], + [Define to l, ll, u, ul, ull, etc., as suitable for + constants of type ']gltype['.])]) + for gltype in $1 ; do + AC_CACHE_CHECK([for $gltype integer literal suffix], + [gl_cv_type_${gltype}_suffix], + [eval gl_cv_type_${gltype}_suffix=no + eval result=\$gl_cv_type_${gltype}_signed + if test "$result" = yes; then + glsufu= + else + glsufu=u + fi + for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do + case $glsuf in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + i64) gltype1='__int64';; + u) gltype1='unsigned int';; + ul) gltype1='unsigned long int';; + ull) gltype1='unsigned long long int';; + ui64)gltype1='unsigned __int64';; + esac + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([$2[ + extern $gltype foo; + extern $gltype1 foo;]])], + [eval gl_cv_type_${gltype}_suffix=\$glsuf]) + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" != no && break + done]) + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" = no && result= + eval ${GLTYPE}_SUFFIX=\$result + AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) + done + m4_foreach_w([gltype], [$1], + [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) +]) + +dnl gl_STDINT_INCLUDES +AC_DEFUN([gl_STDINT_INCLUDES], +[[ + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif +]]) + +dnl gl_STDINT_TYPE_PROPERTIES +dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t +dnl of interest to stdint.in.h. +AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], +[ + AC_REQUIRE([gl_MULTIARCH]) + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_STDINT_BITSIZEOF([ptrdiff_t size_t], + [gl_STDINT_INCLUDES]) + fi + gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], + [gl_STDINT_INCLUDES]) + gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], + [gl_STDINT_INCLUDES]) + gl_cv_type_ptrdiff_t_signed=yes + gl_cv_type_size_t_signed=no + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], + [gl_STDINT_INCLUDES]) + fi + gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], + [gl_STDINT_INCLUDES]) + + dnl If wint_t is smaller than 'int', it cannot satisfy the ISO C 99 + dnl requirement that wint_t is "unchanged by default argument promotions". + dnl In this case gnulib's and override wint_t. + dnl Set the variable BITSIZEOF_WINT_T accordingly. + if test $BITSIZEOF_WINT_T -lt 32; then + BITSIZEOF_WINT_T=32 + fi +]) + +dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. +dnl Remove this when we can assume autoconf >= 2.61. +m4_ifdef([AC_COMPUTE_INT], [], [ + AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) +]) + +# Hey Emacs! +# Local Variables: +# indent-tabs-mode: nil +# End: diff --git a/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4 new file mode 100644 index 0000000..7fc2ce9 --- /dev/null +++ b/gl/m4/stdint_h.m4 @@ -0,0 +1,27 @@ +# stdint_h.m4 serial 9 +dnl Copyright (C) 1997-2004, 2006, 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([gl_AC_HEADER_STDINT_H], +[ + AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include ]], + [[uintmax_t i = (uintmax_t) -1; return !i;]])], + [gl_cv_header_stdint_h=yes], + [gl_cv_header_stdint_h=no])]) + if test $gl_cv_header_stdint_h = yes; then + AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], + [Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4 new file mode 100644 index 0000000..d15913a --- /dev/null +++ b/gl/m4/stdio_h.m4 @@ -0,0 +1,194 @@ +# stdio_h.m4 serial 43 +dnl Copyright (C) 2007-2014 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_STDIO_H], +[ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + gl_NEXT_HEADERS([stdio.h]) + + dnl No need to create extra modules for these functions. Everyone who uses + dnl 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 + GNULIB_FGETS=1 + GNULIB_FREAD=1 + dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c" + dnl "expected source file, required through AC_LIBSOURCES, not found". It is + dnl also an optimization, to avoid performing a configure check whose result + dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING + dnl or GNULIB_NONBLOCKING redundant. + m4_ifdef([gl_NONBLOCKING_IO], [ + gl_NONBLOCKING_IO + if test $gl_cv_have_nonblocking != yes; then + REPLACE_STDIO_READ_FUNCS=1 + AC_LIBOBJ([stdio-read]) + fi + ]) + + dnl No need to create extra modules for these functions. Everyone who uses + dnl likely needs them. + GNULIB_FPRINTF=1 + GNULIB_PRINTF=1 + GNULIB_VFPRINTF=1 + GNULIB_VPRINTF=1 + GNULIB_FPUTC=1 + GNULIB_PUTC=1 + GNULIB_PUTCHAR=1 + GNULIB_FPUTS=1 + GNULIB_PUTS=1 + GNULIB_FWRITE=1 + dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" + dnl "expected source file, required through AC_LIBSOURCES, not found". It is + dnl also an optimization, to avoid performing a configure check whose result + dnl is not used. But it does not make the test of GNULIB_STDIO_H_SIGPIPE or + dnl GNULIB_SIGPIPE redundant. + m4_ifdef([gl_SIGNAL_SIGPIPE], [ + gl_SIGNAL_SIGPIPE + if test $gl_cv_header_signal_h_SIGPIPE != yes; then + REPLACE_STDIO_WRITE_FUNCS=1 + AC_LIBOBJ([stdio-write]) + fi + ]) + dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" + dnl "expected source file, required through AC_LIBSOURCES, not found". It is + dnl also an optimization, to avoid performing a configure check whose result + dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING + dnl or GNULIB_NONBLOCKING redundant. + m4_ifdef([gl_NONBLOCKING_IO], [ + gl_NONBLOCKING_IO + if test $gl_cv_have_nonblocking != yes; then + REPLACE_STDIO_WRITE_FUNCS=1 + AC_LIBOBJ([stdio-write]) + fi + ]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use, and which is not + dnl guaranteed by both C89 and C11. + gl_WARN_ON_USE_PREPARE([[#include + ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen + renameat snprintf tmpfile vdprintf vsnprintf]) +]) + +AC_DEFUN([gl_STDIO_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_STDIO_H_DEFAULTS], +[ + GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) + GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) + GNULIB_FDOPEN=0; AC_SUBST([GNULIB_FDOPEN]) + GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) + GNULIB_FGETC=0; AC_SUBST([GNULIB_FGETC]) + GNULIB_FGETS=0; AC_SUBST([GNULIB_FGETS]) + GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) + GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) + GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) + GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) + GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) + GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) + GNULIB_FREAD=0; AC_SUBST([GNULIB_FREAD]) + GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) + GNULIB_FSCANF=0; AC_SUBST([GNULIB_FSCANF]) + GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) + GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) + GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) + GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) + GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) + GNULIB_GETC=0; AC_SUBST([GNULIB_GETC]) + GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR]) + GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) + GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) + GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) + GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) + GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE]) + GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) + GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) + GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) + GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) + GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) + GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) + GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) + GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) + GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) + GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) + GNULIB_SCANF=0; AC_SUBST([GNULIB_SCANF]) + GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) + GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) + GNULIB_STDIO_H_NONBLOCKING=0; AC_SUBST([GNULIB_STDIO_H_NONBLOCKING]) + GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) + GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) + GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) + GNULIB_VFSCANF=0; AC_SUBST([GNULIB_VFSCANF]) + GNULIB_VSCANF=0; AC_SUBST([GNULIB_VSCANF]) + GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) + GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) + GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) + GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) + GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) + GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) + GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) + HAVE_DECL_FSEEKO=1; AC_SUBST([HAVE_DECL_FSEEKO]) + HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) + HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) + HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) + HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) + HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) + HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) + HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) + HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) + HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO]) + HAVE_PCLOSE=1; AC_SUBST([HAVE_PCLOSE]) + HAVE_POPEN=1; AC_SUBST([HAVE_POPEN]) + HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) + HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) + HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) + REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) + REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) + REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN]) + REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) + REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) + REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) + REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) + REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) + REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) + REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) + REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) + REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) + REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) + REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) + REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) + REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) + REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) + REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) + REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) + REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) + REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) + REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) + REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) + REPLACE_STDIO_READ_FUNCS=0; AC_SUBST([REPLACE_STDIO_READ_FUNCS]) + REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) + REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE]) + REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) + REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) + REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) + REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) + REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) + REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) +]) diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4 new file mode 100644 index 0000000..03b448b --- /dev/null +++ b/gl/m4/stdlib_h.m4 @@ -0,0 +1,117 @@ +# stdlib_h.m4 serial 42 +dnl Copyright (C) 2007-2014 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_STDLIB_H], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + gl_NEXT_HEADERS([stdlib.h]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use, and which is not + dnl guaranteed by C89. + gl_WARN_ON_USE_PREPARE([[#include +#if HAVE_SYS_LOADAVG_H +# include +#endif +#if HAVE_RANDOM_H +# include +#endif + ]], [_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 + secure_getenv setenv setstate setstate_r srandom srandom_r + strtod strtoll strtoull unlockpt unsetenv]) +]) + +AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_STDLIB_H_DEFAULTS], +[ + GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) + GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) + GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) + GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) + GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) + GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) + GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) + GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) + GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) + GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) + GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) + GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) + GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) + GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) + GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) + GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) + GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R]) + GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) + GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM]) + GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) + 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]) + GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) + GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) + GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) + GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) + GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) + HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) + HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) + HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) + HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) + HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) + HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) + HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) + HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) + HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) + HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) + HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) + HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) + HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) + HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) + HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) + 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]) + HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) + HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) + HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) + HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) + HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) + HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) + REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) + REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) + 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]) + REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) + REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) + REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) + REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) + REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) + REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) +]) diff --git a/gl/m4/stpcpy.m4 b/gl/m4/stpcpy.m4 new file mode 100644 index 0000000..966ba95 --- /dev/null +++ b/gl/m4/stpcpy.m4 @@ -0,0 +1,25 @@ +# stpcpy.m4 serial 8 +dnl Copyright (C) 2002, 2007, 2009-2014 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_STPCPY], +[ + dnl Persuade glibc to declare stpcpy(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'. + AC_REQUIRE([AC_C_RESTRICT]) + + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_CHECK_FUNCS([stpcpy]) + if test $ac_cv_func_stpcpy = no; then + HAVE_STPCPY=0 + fi +]) + +# Prerequisites of lib/stpcpy.c. +AC_DEFUN([gl_PREREQ_STPCPY], [ + : +]) diff --git a/gl/m4/strcase.m4 b/gl/m4/strcase.m4 new file mode 100644 index 0000000..66322b8 --- /dev/null +++ b/gl/m4/strcase.m4 @@ -0,0 +1,45 @@ +# strcase.m4 serial 11 +dnl Copyright (C) 2002, 2005-2014 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_STRCASE], +[ + gl_FUNC_STRCASECMP + gl_FUNC_STRNCASECMP +]) + +AC_DEFUN([gl_FUNC_STRCASECMP], +[ + AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) + AC_CHECK_FUNCS([strcasecmp]) + if test $ac_cv_func_strcasecmp = no; then + HAVE_STRCASECMP=0 + fi +]) + +AC_DEFUN([gl_FUNC_STRNCASECMP], +[ + AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) + AC_CHECK_FUNCS([strncasecmp]) + if test $ac_cv_func_strncasecmp = yes; then + HAVE_STRNCASECMP=1 + else + HAVE_STRNCASECMP=0 + fi + AC_CHECK_DECLS([strncasecmp]) + if test $ac_cv_have_decl_strncasecmp = no; then + HAVE_DECL_STRNCASECMP=0 + fi +]) + +# Prerequisites of lib/strcasecmp.c. +AC_DEFUN([gl_PREREQ_STRCASECMP], [ + : +]) + +# Prerequisites of lib/strncasecmp.c. +AC_DEFUN([gl_PREREQ_STRNCASECMP], [ + : +]) diff --git a/gl/m4/strcasestr.m4 b/gl/m4/strcasestr.m4 new file mode 100644 index 0000000..e2d87fe --- /dev/null +++ b/gl/m4/strcasestr.m4 @@ -0,0 +1,142 @@ +# strcasestr.m4 serial 21 +dnl Copyright (C) 2005, 2007-2014 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 Check that strcasestr is present and works. +AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + + dnl Persuade glibc to declare strcasestr(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_FUNC_MEMCHR]) + AC_CHECK_FUNCS([strcasestr]) + if test $ac_cv_func_strcasestr = no; then + HAVE_STRCASESTR=0 + else + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_STRCASESTR=1 + else + dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. + AC_CACHE_CHECK([whether strcasestr works], + [gl_cv_func_strcasestr_works_always], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include /* for strcasestr */ +#define P "_EF_BF_BD" +#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P +#define NEEDLE P P P P P +]], [[return !!strcasestr (HAYSTACK, NEEDLE); + ]])], + [gl_cv_func_strcasestr_works_always=yes], + [gl_cv_func_strcasestr_works_always=no], + [dnl glibc 2.12 and cygwin 1.7.7 have a known bug. uClibc is not + dnl affected, since it uses different source code for strcasestr + dnl than glibc. + dnl Assume that it works on all other platforms, even if it is not + dnl linear. + AC_EGREP_CPP([Lucky user], + [ +#ifdef __GNU_LIBRARY__ + #include + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + || defined __UCLIBC__ + Lucky user + #endif +#elif defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#else + Lucky user +#endif + ], + [gl_cv_func_strcasestr_works_always="guessing yes"], + [gl_cv_func_strcasestr_works_always="guessing no"]) + ]) + ]) + case "$gl_cv_func_strcasestr_works_always" in + *yes) ;; + *) + REPLACE_STRCASESTR=1 + ;; + esac + fi + fi +]) # gl_FUNC_STRCASESTR_SIMPLE + +dnl Additionally, check that strcasestr is efficient. +AC_DEFUN([gl_FUNC_STRCASESTR], +[ + AC_REQUIRE([gl_FUNC_STRCASESTR_SIMPLE]) + if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then + AC_CACHE_CHECK([whether strcasestr works in linear time], + [gl_cv_func_strcasestr_linear], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include /* for signal */ +#include /* for strcasestr */ +#include /* for malloc */ +#include /* for alarm */ +static void quit (int sig) { exit (sig + 128); } +]], [[ + int result = 0; + size_t m = 1000000; + char *haystack = (char *) malloc (2 * m + 2); + char *needle = (char *) malloc (m + 2); + /* Failure to compile this test due to missing alarm is okay, + since all such platforms (mingw) also lack strcasestr. */ + signal (SIGALRM, quit); + alarm (5); + /* Check for quadratic performance. */ + if (haystack && needle) + { + memset (haystack, 'A', 2 * m); + haystack[2 * m] = 'B'; + haystack[2 * m + 1] = 0; + memset (needle, 'A', m); + needle[m] = 'B'; + needle[m + 1] = 0; + if (!strcasestr (haystack, needle)) + result |= 1; + } + return result; + ]])], + [gl_cv_func_strcasestr_linear=yes], [gl_cv_func_strcasestr_linear=no], + [dnl Only glibc > 2.12 and cygwin > 1.7.7 are known to have a + dnl strcasestr that works in linear time. + AC_EGREP_CPP([Lucky user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + && !defined __UCLIBC__ + Lucky user + #endif +#endif +#ifdef __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#endif + ], + [gl_cv_func_strcasestr_linear="guessing yes"], + [gl_cv_func_strcasestr_linear="guessing no"]) + ]) + ]) + case "$gl_cv_func_strcasestr_linear" in + *yes) ;; + *) + REPLACE_STRCASESTR=1 + ;; + esac + fi +]) # gl_FUNC_STRCASESTR + +# Prerequisites of lib/strcasestr.c. +AC_DEFUN([gl_PREREQ_STRCASESTR], [ + : +]) diff --git a/gl/m4/strdup.m4 b/gl/m4/strdup.m4 new file mode 100644 index 0000000..1681a30 --- /dev/null +++ b/gl/m4/strdup.m4 @@ -0,0 +1,36 @@ +# strdup.m4 serial 13 + +dnl Copyright (C) 2002-2014 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_STRDUP], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([strdup]) + AC_CHECK_DECLS_ONCE([strdup]) + if test $ac_cv_have_decl_strdup = no; then + HAVE_DECL_STRDUP=0 + fi +]) + +AC_DEFUN([gl_FUNC_STRDUP_POSIX], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) + AC_CHECK_FUNCS_ONCE([strdup]) + if test $ac_cv_func_strdup = yes; then + if test $gl_cv_func_malloc_posix != yes; then + REPLACE_STRDUP=1 + fi + fi + AC_CHECK_DECLS_ONCE([strdup]) + if test $ac_cv_have_decl_strdup = no; then + HAVE_DECL_STRDUP=0 + fi +]) + +# Prerequisites of lib/strdup.c. +AC_DEFUN([gl_PREREQ_STRDUP], [:]) diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4 new file mode 100644 index 0000000..0763fe3 --- /dev/null +++ b/gl/m4/strerror.m4 @@ -0,0 +1,96 @@ +# strerror.m4 serial 17 +dnl Copyright (C) 2002, 2007-2014 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_STRERROR], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_HEADER_ERRNO_H]) + AC_REQUIRE([gl_FUNC_STRERROR_0]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ + AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) + ]) + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + AC_CACHE_CHECK([for working strerror function], + [gl_cv_func_working_strerror], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[if (!*strerror (-2)) return 1;]])], + [gl_cv_func_working_strerror=yes], + [gl_cv_func_working_strerror=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_working_strerror="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_strerror="guessing no" ;; + esac + ]) + ]) + case "$gl_cv_func_working_strerror" in + *yes) ;; + *) + dnl The system's strerror() fails to return a string for out-of-range + dnl integers. Replace it. + REPLACE_STRERROR=1 + ;; + esac + m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ + dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's + dnl buffer, we must replace strerror. + case "$gl_cv_func_strerror_r_works" in + *no) REPLACE_STRERROR=1 ;; + esac + ]) + else + dnl The system's strerror() cannot know about the new errno values we add + dnl to , or any fix for strerror(0). Replace it. + REPLACE_STRERROR=1 + fi +]) + +dnl Detect if strerror(0) passes (that is, does not set errno, and does not +dnl return a string that matches strerror(-1)). +AC_DEFUN([gl_FUNC_STRERROR_0], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + REPLACE_STRERROR_0=0 + AC_CACHE_CHECK([whether strerror(0) succeeds], + [gl_cv_func_strerror_0_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + ]], + [[int result = 0; + char *str; + errno = 0; + str = strerror (0); + if (!*str) result |= 1; + if (errno) result |= 2; + if (strstr (str, "nknown") || strstr (str, "ndefined")) + result |= 4; + return result;]])], + [gl_cv_func_strerror_0_works=yes], + [gl_cv_func_strerror_0_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_strerror_0_works="guessing no" ;; + esac + ]) + ]) + case "$gl_cv_func_strerror_0_works" in + *yes) ;; + *) + REPLACE_STRERROR_0=1 + AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0) + does not return a message implying success.]) + ;; + esac +]) diff --git a/gl/m4/strerror_r.m4 b/gl/m4/strerror_r.m4 new file mode 100644 index 0000000..e13a369 --- /dev/null +++ b/gl/m4/strerror_r.m4 @@ -0,0 +1,173 @@ +# strerror_r.m4 serial 15 +dnl Copyright (C) 2002, 2007-2014 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_STRERROR_R], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) + + dnl Persuade Solaris to declare strerror_r(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + dnl Some systems don't declare strerror_r() if _THREAD_SAFE and _REENTRANT + dnl are not defined. + AC_CHECK_DECLS_ONCE([strerror_r]) + if test $ac_cv_have_decl_strerror_r = no; then + HAVE_DECL_STRERROR_R=0 + fi + + if test $ac_cv_func_strerror_r = yes; then + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + if test $gl_cv_func_strerror_r_posix_signature = yes; then + case "$gl_cv_func_strerror_r_works" in + dnl The system's strerror_r has bugs. Replace it. + *no) REPLACE_STRERROR_R=1 ;; + esac + else + dnl The system's strerror_r() has a wrong signature. Replace it. + REPLACE_STRERROR_R=1 + fi + else + dnl The system's strerror_r() cannot know about the new errno values we + dnl add to , or any fix for strerror(0). Replace it. + REPLACE_STRERROR_R=1 + fi + fi +]) + +# Prerequisites of lib/strerror_r.c. +AC_DEFUN([gl_PREREQ_STRERROR_R], [ + dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r. + AC_CHECK_FUNCS_ONCE([__xpg_strerror_r]) + AC_CHECK_FUNCS_ONCE([catgets]) + AC_CHECK_FUNCS_ONCE([snprintf]) +]) + +# Detect if strerror_r works, but without affecting whether a replacement +# strerror_r will be used. +AC_DEFUN([gl_FUNC_STRERROR_R_WORKS], +[ + AC_REQUIRE([gl_HEADER_ERRNO_H]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_FUNC_STRERROR_0]) + + AC_CHECK_FUNCS_ONCE([strerror_r]) + if test $ac_cv_func_strerror_r = yes; then + if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then + dnl The POSIX prototype is: int strerror_r (int, char *, size_t); + dnl glibc, Cygwin: char *strerror_r (int, char *, size_t); + dnl AIX 5.1, OSF/1 5.1: int strerror_r (int, char *, int); + AC_CACHE_CHECK([for strerror_r with POSIX signature], + [gl_cv_func_strerror_r_posix_signature], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + int strerror_r (int, char *, size_t); + ]], + [])], + [gl_cv_func_strerror_r_posix_signature=yes], + [gl_cv_func_strerror_r_posix_signature=no]) + ]) + if test $gl_cv_func_strerror_r_posix_signature = yes; then + dnl AIX 6.1 strerror_r fails by returning -1, not an error number. + 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 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], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + ]], + [[int result = 0; + char buf[79]; + if (strerror_r (EACCES, buf, 0) < 0) + result |= 1; + errno = 0; + if (strerror_r (EACCES, buf, sizeof buf) != 0) + result |= 2; + strcpy (buf, "Unknown"); + if (strerror_r (0, buf, sizeof buf) != 0) + result |= 4; + if (errno) + result |= 8; + if (strstr (buf, "nknown") || strstr (buf, "ndefined")) + result |= 0x10; + errno = 0; + *buf = 0; + if (strerror_r (-3, buf, sizeof buf) < 0) + result |= 0x20; + if (errno) + result |= 0x40; + if (!*buf) + result |= 0x80; + return result; + ]])], + [gl_cv_func_strerror_r_works=yes], + [gl_cv_func_strerror_r_works=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess no on AIX. + aix*) gl_cv_func_strerror_r_works="guessing no";; + # Guess no on HP-UX. + hpux*) gl_cv_func_strerror_r_works="guessing no";; + # Guess no on BSD variants. + *bsd*) gl_cv_func_strerror_r_works="guessing no";; + # Guess yes otherwise. + *) gl_cv_func_strerror_r_works="guessing yes";; + esac +changequote([,])dnl + ]) + ]) + else + dnl The system's strerror() has a wrong signature. + dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r. + AC_CHECK_FUNCS_ONCE([__xpg_strerror_r]) + dnl In glibc < 2.14, __xpg_strerror_r does not populate buf on failure. + dnl In cygwin < 1.7.10, __xpg_strerror_r clobbers strerror's buffer. + if test $ac_cv_func___xpg_strerror_r = yes; then + AC_CACHE_CHECK([whether __xpg_strerror_r works], + [gl_cv_func_strerror_r_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + extern + #ifdef __cplusplus + "C" + #endif + int __xpg_strerror_r(int, char *, size_t); + ]], + [[int result = 0; + char buf[256] = "^"; + char copy[256]; + char *str = strerror (-1); + strcpy (copy, str); + if (__xpg_strerror_r (-2, buf, 1) == 0) + result |= 1; + if (*buf) + result |= 2; + __xpg_strerror_r (-2, buf, 256); + if (strcmp (str, copy)) + result |= 4; + return result; + ]])], + [gl_cv_func_strerror_r_works=yes], + [gl_cv_func_strerror_r_works=no], + [dnl Guess no on all platforms that have __xpg_strerror_r, + dnl at least until fixed glibc and cygwin are more common. + gl_cv_func_strerror_r_works="guessing no" + ]) + ]) + fi + fi + fi + fi +]) diff --git a/gl/m4/strftime.m4 b/gl/m4/strftime.m4 new file mode 100644 index 0000000..0ba3dd0 --- /dev/null +++ b/gl/m4/strftime.m4 @@ -0,0 +1,28 @@ +# serial 33 + +# Copyright (C) 1996-1997, 1999-2007, 2009-2014 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. + +# Written by Jim Meyering and Paul Eggert. + +AC_DEFUN([gl_FUNC_GNU_STRFTIME], +[ + gl_FUNC_STRFTIME +]) + +# These are the prerequisite macros for GNU's strftime.c replacement. +AC_DEFUN([gl_FUNC_STRFTIME], +[ + # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. + AC_REQUIRE([AC_STRUCT_TIMEZONE]) + + AC_REQUIRE([gl_TM_GMTOFF]) + + AC_CHECK_FUNCS_ONCE([tzset]) + + AC_DEFINE([my_strftime], [nstrftime], + [Define to the name of the strftime replacement function.]) +]) diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4 new file mode 100644 index 0000000..64e683f --- /dev/null +++ b/gl/m4/string_h.m4 @@ -0,0 +1,120 @@ +# Configure a GNU-like replacement for . + +# Copyright (C) 2007-2014 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. + +# serial 21 + +# Written by Paul Eggert. + +AC_DEFUN([gl_HEADER_STRING_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_HEADER_STRING_H_BODY]) +]) + +AC_DEFUN([gl_HEADER_STRING_H_BODY], +[ + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + gl_NEXT_HEADERS([string.h]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use, and which is not + dnl guaranteed by C89. + gl_WARN_ON_USE_PREPARE([[#include + ]], + [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul + strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r + strerror_r strsignal strverscmp]) +]) + +AC_DEFUN([gl_STRING_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], +[ + GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) + GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) + GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) + GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) + GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) + GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) + GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) + GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) + GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) + GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) + GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) + GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) + GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) + GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) + GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) + GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) + GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) + GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) + GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) + GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) + GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) + GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) + GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) + GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) + GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) + GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) + GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) + GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) + GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) + GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) + GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) + GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) + GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) + GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) + GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) + GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) + GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) + HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) + HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) + HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) + HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) + HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) + HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) + HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) + HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) + HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) + HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) + HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) + HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) + HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) + HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) + HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) + HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) + HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) + HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) + HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) + HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) + REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) + REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) + REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) + REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) + REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) + REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) + REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) + REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) + REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) + REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) + REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) + REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) + REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) + REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) + UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) +]) diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4 new file mode 100644 index 0000000..0eac17c --- /dev/null +++ b/gl/m4/strings_h.m4 @@ -0,0 +1,52 @@ +# Configure a replacement for . +# serial 6 + +# Copyright (C) 2007, 2009-2014 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. + +AC_DEFUN([gl_HEADER_STRINGS_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_HEADER_STRINGS_H_BODY]) +]) + +AC_DEFUN([gl_HEADER_STRINGS_H_BODY], +[ + AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) + + gl_CHECK_NEXT_HEADERS([strings.h]) + if test $ac_cv_header_strings_h = yes; then + HAVE_STRINGS_H=1 + else + HAVE_STRINGS_H=0 + fi + AC_SUBST([HAVE_STRINGS_H]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ + /* Minix 3.1.8 has a bug: must be included before + . */ + #include + #include + ]], [ffs strcasecmp strncasecmp]) +]) + +AC_DEFUN([gl_STRINGS_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS], +[ + GNULIB_FFS=0; AC_SUBST([GNULIB_FFS]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_FFS=1; AC_SUBST([HAVE_FFS]) + HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) + HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP]) +]) diff --git a/gl/m4/strndup.m4 b/gl/m4/strndup.m4 new file mode 100644 index 0000000..55df039 --- /dev/null +++ b/gl/m4/strndup.m4 @@ -0,0 +1,55 @@ +# strndup.m4 serial 21 +dnl Copyright (C) 2002-2003, 2005-2014 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_STRNDUP], +[ + dnl Persuade glibc to declare strndup(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_CHECK_DECLS_ONCE([strndup]) + AC_CHECK_FUNCS_ONCE([strndup]) + if test $ac_cv_have_decl_strndup = no; then + HAVE_DECL_STRNDUP=0 + fi + + if test $ac_cv_func_strndup = yes; then + HAVE_STRNDUP=1 + # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. + AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works], + [AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[#include + #include ]], [[ +#if !HAVE_DECL_STRNDUP + extern + #ifdef __cplusplus + "C" + #endif + char *strndup (const char *, size_t); +#endif + char *s; + s = strndup ("some longer string", 15); + free (s); + s = strndup ("shorter string", 13); + return s[13] != '\0';]])], + [gl_cv_func_strndup_works=yes], + [gl_cv_func_strndup_works=no], + [ +changequote(,)dnl + case $host_os in + aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; + *) gl_cv_func_strndup_works="guessing yes";; + esac +changequote([,])dnl + ])]) + case $gl_cv_func_strndup_works in + *no) REPLACE_STRNDUP=1 ;; + esac + else + HAVE_STRNDUP=0 + fi +]) diff --git a/gl/m4/strnlen.m4 b/gl/m4/strnlen.m4 new file mode 100644 index 0000000..94317f8 --- /dev/null +++ b/gl/m4/strnlen.m4 @@ -0,0 +1,30 @@ +# strnlen.m4 serial 13 +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_STRNLEN], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + + dnl Persuade glibc to declare strnlen(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_CHECK_DECLS_ONCE([strnlen]) + if test $ac_cv_have_decl_strnlen = no; then + HAVE_DECL_STRNLEN=0 + else + m4_pushdef([AC_LIBOBJ], [:]) + dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]). + AC_FUNC_STRNLEN + m4_popdef([AC_LIBOBJ]) + if test $ac_cv_func_strnlen_working = no; then + REPLACE_STRNLEN=1 + fi + fi +]) + +# Prerequisites of lib/strnlen.c. +AC_DEFUN([gl_PREREQ_STRNLEN], [:]) diff --git a/gl/m4/strstr.m4 b/gl/m4/strstr.m4 new file mode 100644 index 0000000..33cd7a3 --- /dev/null +++ b/gl/m4/strstr.m4 @@ -0,0 +1,130 @@ +# strstr.m4 serial 16 +dnl Copyright (C) 2008-2014 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 Check that strstr works. +AC_DEFUN([gl_FUNC_STRSTR_SIMPLE], +[ + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_MEMCHR]) + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_STRSTR=1 + else + dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. + AC_CACHE_CHECK([whether strstr works], + [gl_cv_func_strstr_works_always], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include /* for strstr */ +#define P "_EF_BF_BD" +#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P +#define NEEDLE P P P P P +]], [[return !!strstr (HAYSTACK, NEEDLE); + ]])], + [gl_cv_func_strstr_works_always=yes], + [gl_cv_func_strstr_works_always=no], + [dnl glibc 2.12 and cygwin 1.7.7 have a known bug. uClibc is not + dnl affected, since it uses different source code for strstr than + dnl glibc. + dnl Assume that it works on all other platforms, even if it is not + dnl linear. + AC_EGREP_CPP([Lucky user], + [ +#ifdef __GNU_LIBRARY__ + #include + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + || defined __UCLIBC__ + Lucky user + #endif +#elif defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#else + Lucky user +#endif + ], + [gl_cv_func_strstr_works_always="guessing yes"], + [gl_cv_func_strstr_works_always="guessing no"]) + ]) + ]) + case "$gl_cv_func_strstr_works_always" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac + fi +]) # gl_FUNC_STRSTR_SIMPLE + +dnl Additionally, check that strstr is efficient. +AC_DEFUN([gl_FUNC_STRSTR], +[ + AC_REQUIRE([gl_FUNC_STRSTR_SIMPLE]) + if test $REPLACE_STRSTR = 0; then + AC_CACHE_CHECK([whether strstr works in linear time], + [gl_cv_func_strstr_linear], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include /* for signal */ +#include /* for strstr */ +#include /* for malloc */ +#include /* for alarm */ +static void quit (int sig) { exit (sig + 128); } +]], [[ + int result = 0; + size_t m = 1000000; + char *haystack = (char *) malloc (2 * m + 2); + char *needle = (char *) malloc (m + 2); + /* Failure to compile this test due to missing alarm is okay, + since all such platforms (mingw) also have quadratic strstr. */ + signal (SIGALRM, quit); + alarm (5); + /* Check for quadratic performance. */ + if (haystack && needle) + { + memset (haystack, 'A', 2 * m); + haystack[2 * m] = 'B'; + haystack[2 * m + 1] = 0; + memset (needle, 'A', m); + needle[m] = 'B'; + needle[m + 1] = 0; + if (!strstr (haystack, needle)) + result |= 1; + } + return result; + ]])], + [gl_cv_func_strstr_linear=yes], [gl_cv_func_strstr_linear=no], + [dnl Only glibc > 2.12 on processors without SSE 4.2 instructions and + dnl cygwin > 1.7.7 are known to have a bug-free strstr that works in + dnl linear time. + AC_EGREP_CPP([Lucky user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + && !(defined __i386__ || defined __x86_64__) \ + && !defined __UCLIBC__ + Lucky user + #endif +#endif +#ifdef __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) + Lucky user + #endif +#endif + ], + [gl_cv_func_strstr_linear="guessing yes"], + [gl_cv_func_strstr_linear="guessing no"]) + ]) + ]) + case "$gl_cv_func_strstr_linear" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac + fi +]) # gl_FUNC_STRSTR diff --git a/gl/m4/strtol.m4 b/gl/m4/strtol.m4 new file mode 100644 index 0000000..9dd4546 --- /dev/null +++ b/gl/m4/strtol.m4 @@ -0,0 +1,10 @@ +# strtol.m4 serial 6 +dnl Copyright (C) 2002-2003, 2006, 2009-2014 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_STRTOL], +[ + AC_CHECK_FUNCS([strtol]) +]) diff --git a/gl/m4/strtoul.m4 b/gl/m4/strtoul.m4 new file mode 100644 index 0000000..c7c0d24 --- /dev/null +++ b/gl/m4/strtoul.m4 @@ -0,0 +1,10 @@ +# strtoul.m4 serial 5 +dnl Copyright (C) 2002, 2006, 2009-2014 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_STRTOUL], +[ + AC_CHECK_FUNCS([strtoul]) +]) diff --git a/gl/m4/strtoull.m4 b/gl/m4/strtoull.m4 new file mode 100644 index 0000000..f4d5f61 --- /dev/null +++ b/gl/m4/strtoull.m4 @@ -0,0 +1,24 @@ +# strtoull.m4 serial 7 +dnl Copyright (C) 2002, 2004, 2006, 2008-2014 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_STRTOULL], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + dnl We don't need (and can't compile) the replacement strtoull + dnl unless the type 'unsigned long long int' exists. + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + if test "$ac_cv_type_unsigned_long_long_int" = yes; then + AC_CHECK_FUNCS([strtoull]) + if test $ac_cv_func_strtoull = no; then + HAVE_STRTOULL=0 + fi + fi +]) + +# Prerequisites of lib/strtoull.c. +AC_DEFUN([gl_PREREQ_STRTOULL], [ + : +]) diff --git a/gl/m4/strtoumax.m4 b/gl/m4/strtoumax.m4 new file mode 100644 index 0000000..fc582fc --- /dev/null +++ b/gl/m4/strtoumax.m4 @@ -0,0 +1,28 @@ +# strtoumax.m4 serial 12 +dnl Copyright (C) 2002-2004, 2006, 2009-2014 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_STRTOUMAX], +[ + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + + dnl On OSF/1 5.1 with cc, this function is declared but not defined. + AC_CHECK_FUNCS_ONCE([strtoumax]) + AC_CHECK_DECLS_ONCE([strtoumax]) + if test "$ac_cv_have_decl_strtoumax" = yes; then + if test "$ac_cv_func_strtoumax" != yes; then + # HP-UX 11.11 has "#define strtoimax(...) ..." but no function. + REPLACE_STRTOUMAX=1 + fi + else + HAVE_DECL_STRTOUMAX=0 + fi +]) + +# Prerequisites of lib/strtoumax.c. +AC_DEFUN([gl_PREREQ_STRTOUMAX], [ + AC_CHECK_DECLS([strtoull]) + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) +]) diff --git a/gl/m4/symlink.m4 b/gl/m4/symlink.m4 new file mode 100644 index 0000000..de4924b --- /dev/null +++ b/gl/m4/symlink.m4 @@ -0,0 +1,53 @@ +# serial 6 +# See if we need to provide symlink replacement. + +dnl Copyright (C) 2009-2014 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. + +# Written by Eric Blake. + +AC_DEFUN([gl_FUNC_SYMLINK], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CHECK_FUNCS_ONCE([symlink]) + dnl The best we can do on mingw is provide a dummy that always fails, so + dnl that compilation can proceed with fewer ifdefs. On FreeBSD 7.2, AIX 7.1, + dnl and Solaris 9, we want to fix a bug with trailing slash handling. + if test $ac_cv_func_symlink = no; then + HAVE_SYMLINK=0 + else + AC_CACHE_CHECK([whether symlink handles trailing slash correctly], + [gl_cv_func_symlink_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[int result = 0; + if (!symlink ("a", "conftest.link/")) + result |= 1; + if (symlink ("conftest.f", "conftest.lnk2")) + result |= 2; + else if (!symlink ("a", "conftest.lnk2/")) + result |= 4; + return result; + ]])], + [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_symlink_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_symlink_works="guessing no" ;; + esac + ]) + rm -f conftest.f conftest.link conftest.lnk2]) + case "$gl_cv_func_symlink_works" in + *yes) ;; + *) + REPLACE_SYMLINK=1 + ;; + esac + fi +]) diff --git a/gl/m4/symlinkat.m4 b/gl/m4/symlinkat.m4 new file mode 100644 index 0000000..db7ad48 --- /dev/null +++ b/gl/m4/symlinkat.m4 @@ -0,0 +1,20 @@ +# serial 5 +# See if we need to provide symlinkat replacement. + +dnl Copyright (C) 2009-2014 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. + +# Written by Eric Blake. + +AC_DEFUN([gl_FUNC_SYMLINKAT], +[ + AC_REQUIRE([gl_FUNC_OPENAT]) + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([symlinkat]) + if test $ac_cv_func_symlinkat = no; then + HAVE_SYMLINKAT=0 + fi +]) diff --git a/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4 new file mode 100644 index 0000000..1654231 --- /dev/null +++ b/gl/m4/sys_ioctl_h.m4 @@ -0,0 +1,64 @@ +# sys_ioctl_h.m4 serial 10 +dnl Copyright (C) 2008-2014 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 Written by Bruno Haible. + +AC_DEFUN([gl_SYS_IOCTL_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_SYS_IOCTL_H_DEFAULTS]) + + AC_CHECK_HEADERS_ONCE([sys/ioctl.h]) + if test $ac_cv_header_sys_ioctl_h = yes; then + HAVE_SYS_IOCTL_H=1 + dnl Test whether declares ioctl(), or whether some other + dnl header file, such as or , is needed for that. + AC_CACHE_CHECK([whether declares ioctl], + [gl_cv_decl_ioctl_in_sys_ioctl_h], + [dnl We cannot use AC_CHECK_DECL because it produces its own messages. + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT([#include ])], + [(void) ioctl;])], + [gl_cv_decl_ioctl_in_sys_ioctl_h=yes], + [gl_cv_decl_ioctl_in_sys_ioctl_h=no]) + ]) + else + HAVE_SYS_IOCTL_H=0 + fi + AC_SUBST([HAVE_SYS_IOCTL_H]) + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([sys/ioctl.h]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include +/* Some platforms declare ioctl in the wrong header. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +#endif + ]], [ioctl]) +]) + +AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_SYS_IOCTL_H_DEFAULTS], +[ + GNULIB_IOCTL=0; AC_SUBST([GNULIB_IOCTL]) + dnl Assume proper GNU behavior unless another module says otherwise. + SYS_IOCTL_H_HAVE_WINSOCK2_H=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H]) + SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) + REPLACE_IOCTL=0; AC_SUBST([REPLACE_IOCTL]) +]) diff --git a/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4 new file mode 100644 index 0000000..1a502b4 --- /dev/null +++ b/gl/m4/sys_select_h.m4 @@ -0,0 +1,95 @@ +# sys_select_h.m4 serial 20 +dnl Copyright (C) 2006-2014 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_HEADER_SYS_SELECT], +[ + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) + AC_CACHE_CHECK([whether is self-contained], + [gl_cv_header_sys_select_h_selfcontained], + [ + dnl Test against two bugs: + dnl 1. On many platforms, assumes prior inclusion of + dnl . + dnl 2. On OSF/1 4.0, provides only a forward declaration + dnl of 'struct timeval', and no definition of this type. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[struct timeval b;]])], + [gl_cv_header_sys_select_h_selfcontained=yes], + [gl_cv_header_sys_select_h_selfcontained=no]) + dnl Test against another bug: + dnl 3. On Solaris 10, provides an FD_ZERO implementation + dnl that relies on memset(), but without including . + if test $gl_cv_header_sys_select_h_selfcontained = yes; then + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[int memset; int bzero;]]) + ], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], [[ + #undef memset + #define memset nonexistent_memset + extern + #ifdef __cplusplus + "C" + #endif + void *memset (void *, int, unsigned long); + #undef bzero + #define bzero nonexistent_bzero + extern + #ifdef __cplusplus + "C" + #endif + void bzero (void *, unsigned long); + fd_set fds; + FD_ZERO (&fds); + ]]) + ], + [], + [gl_cv_header_sys_select_h_selfcontained=no]) + ]) + fi + ]) + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([sys/select.h]) + if test $ac_cv_header_sys_select_h = yes; then + HAVE_SYS_SELECT_H=1 + else + HAVE_SYS_SELECT_H=0 + fi + AC_SUBST([HAVE_SYS_SELECT_H]) + gl_PREREQ_SYS_H_WINSOCK2 + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ +/* Some systems require prerequisite headers. */ +#include +#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H +# include +#endif +#include + ]], [pselect select]) +]) + +AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS], +[ + GNULIB_PSELECT=0; AC_SUBST([GNULIB_PSELECT]) + GNULIB_SELECT=0; AC_SUBST([GNULIB_SELECT]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_PSELECT=1; AC_SUBST([HAVE_PSELECT]) + REPLACE_PSELECT=0; AC_SUBST([REPLACE_PSELECT]) + REPLACE_SELECT=0; AC_SUBST([REPLACE_SELECT]) +]) diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4 new file mode 100644 index 0000000..114d828 --- /dev/null +++ b/gl/m4/sys_socket_h.m4 @@ -0,0 +1,176 @@ +# sys_socket_h.m4 serial 23 +dnl Copyright (C) 2005-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson. + +AC_DEFUN([gl_HEADER_SYS_SOCKET], +[ + AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + + dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have + dnl old-style declarations (with return type 'int' instead of 'ssize_t') + dnl unless _POSIX_PII_SOCKET is defined. + case "$host_os" in + osf*) + AC_DEFINE([_POSIX_PII_SOCKET], [1], + [Define to 1 in order to get the POSIX compatible declarations + of socket functions.]) + ;; + esac + + AC_CACHE_CHECK([whether is self-contained], + [gl_cv_header_sys_socket_h_selfcontained], + [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], + [gl_cv_header_sys_socket_h_selfcontained=yes], + [gl_cv_header_sys_socket_h_selfcontained=no]) + ]) + if test $gl_cv_header_sys_socket_h_selfcontained = yes; then + dnl If the shutdown function exists, should define + dnl SHUT_RD, SHUT_WR, SHUT_RDWR. + AC_CHECK_FUNCS([shutdown]) + if test $ac_cv_func_shutdown = yes; then + AC_CACHE_CHECK([whether defines the SHUT_* macros], + [gl_cv_header_sys_socket_h_shut], + [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])], + [gl_cv_header_sys_socket_h_shut=yes], + [gl_cv_header_sys_socket_h_shut=no]) + ]) + if test $gl_cv_header_sys_socket_h_shut = no; then + SYS_SOCKET_H='sys/socket.h' + fi + fi + fi + # We need to check for ws2tcpip.h now. + gl_PREREQ_SYS_H_SOCKET + AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[ + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif +]) + if test $ac_cv_type_struct_sockaddr_storage = no; then + HAVE_STRUCT_SOCKADDR_STORAGE=0 + fi + if test $ac_cv_type_sa_family_t = no; then + HAVE_SA_FAMILY_T=0 + fi + if test $ac_cv_type_struct_sockaddr_storage != no; then + AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family], + [], + [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0], + [#include + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_WS2TCPIP_H + #include + #endif + ]) + fi + if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ + || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then + SYS_SOCKET_H='sys/socket.h' + fi + gl_PREREQ_SYS_H_WINSOCK2 + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ +/* Some systems require prerequisite headers. */ +#include +#include + ]], [socket connect accept bind getpeername getsockname getsockopt + listen recv send recvfrom sendto setsockopt shutdown accept4]) +]) + +AC_DEFUN([gl_PREREQ_SYS_H_SOCKET], +[ + dnl Check prerequisites of the replacement. + AC_REQUIRE([gl_CHECK_SOCKET_HEADERS]) + gl_CHECK_NEXT_HEADERS([sys/socket.h]) + if test $ac_cv_header_sys_socket_h = yes; then + HAVE_SYS_SOCKET_H=1 + HAVE_WS2TCPIP_H=0 + else + HAVE_SYS_SOCKET_H=0 + if test $ac_cv_header_ws2tcpip_h = yes; then + HAVE_WS2TCPIP_H=1 + else + HAVE_WS2TCPIP_H=0 + fi + fi + AC_SUBST([HAVE_SYS_SOCKET_H]) + AC_SUBST([HAVE_WS2TCPIP_H]) +]) + +# Common prerequisites of the replacement and of the +# replacement. +# Sets and substitutes HAVE_WINSOCK2_H. +AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2], +[ + 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_CHECK_HEADERS_ONCE([sys/socket.h]) + if test $ac_cv_header_sys_socket_h != yes; then + dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make + dnl the check for those headers unconditional; yet cygwin reports + dnl that the headers are present but cannot be compiled (since on + dnl cygwin, all socket information should come from sys/socket.h). + AC_CHECK_HEADERS([winsock2.h]) + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + AC_SUBST([HAVE_WINSOCK2_H]) +]) + +AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], +[ + GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET]) + GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT]) + GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT]) + GNULIB_BIND=0; AC_SUBST([GNULIB_BIND]) + GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME]) + GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME]) + GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT]) + GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN]) + GNULIB_RECV=0; AC_SUBST([GNULIB_RECV]) + GNULIB_SEND=0; AC_SUBST([GNULIB_SEND]) + GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM]) + GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO]) + GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT]) + GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN]) + GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4]) + HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE]) + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; + AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY]) + HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T]) + HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4]) +]) diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4 new file mode 100644 index 0000000..eaa7642 --- /dev/null +++ b/gl/m4/sys_stat_h.m4 @@ -0,0 +1,96 @@ +# sys_stat_h.m4 serial 28 -*- Autoconf -*- +dnl Copyright (C) 2006-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Eric Blake. +dnl Provide a GNU-like . + +AC_DEFUN([gl_HEADER_SYS_STAT_H], +[ + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + + dnl Check for broken stat macros. + AC_REQUIRE([AC_HEADER_STAT]) + + gl_CHECK_NEXT_HEADERS([sys/stat.h]) + + dnl Ensure the type mode_t gets defined. + AC_REQUIRE([AC_TYPE_MODE_T]) + + dnl Whether to override 'struct stat'. + m4_ifdef([gl_LARGEFILE], [ + AC_REQUIRE([gl_LARGEFILE]) + ], [ + WINDOWS_64_BIT_ST_SIZE=0 + ]) + AC_SUBST([WINDOWS_64_BIT_ST_SIZE]) + if test $WINDOWS_64_BIT_ST_SIZE = 1; then + AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1], + [Define to 1 if Gnulib overrides 'struct stat' on Windows so that + struct stat.st_size becomes 64-bit.]) + fi + + dnl Define types that are supposed to be defined in or + dnl . + AC_CHECK_TYPE([nlink_t], [], + [AC_DEFINE([nlink_t], [int], + [Define to the type of st_nlink in struct stat, or a supertype.])], + [#include + #include ]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat + mknod mknodat stat utimensat]) +]) # gl_HEADER_SYS_STAT_H + +AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR + GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) + GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT]) + GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) + GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) + GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) + GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) + GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) + GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) + GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) + GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) + GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) + GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) + GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) + HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) + HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) + HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) + HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) + HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) + HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) + HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) + HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) + HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) + HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) + REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) + REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) + REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) + REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) + REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) + REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) + REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) + REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) + REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) +]) diff --git a/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4 new file mode 100644 index 0000000..5c79300 --- /dev/null +++ b/gl/m4/sys_time_h.m4 @@ -0,0 +1,110 @@ +# Configure a replacement for . +# serial 8 + +# Copyright (C) 2007, 2009-2014 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. + +# Written by Paul Eggert and Martin Lambers. + +AC_DEFUN([gl_HEADER_SYS_TIME_H], +[ + dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement + dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1 + dnl statements that occur in other macros. + AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) +]) + +AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], +[ + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + gl_CHECK_NEXT_HEADERS([sys/time.h]) + + if test $ac_cv_header_sys_time_h != yes; then + HAVE_SYS_TIME_H=0 + fi + + dnl On native Windows with MSVC, 'struct timeval' is defined in + dnl only. So include that header in the list. + gl_PREREQ_SYS_H_WINSOCK2 + AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + ]], + [[static struct timeval x; x.tv_sec = x.tv_usec;]])], + [gl_cv_sys_struct_timeval=yes], + [gl_cv_sys_struct_timeval=no]) + ]) + if test $gl_cv_sys_struct_timeval != yes; then + HAVE_STRUCT_TIMEVAL=0 + else + dnl On native Windows with a 64-bit 'time_t', 'struct timeval' is defined + dnl (in and for mingw64, in 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. + 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( + [[#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + ]], + [[static struct timeval x; + 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]) + ]) + if test $gl_cv_sys_struct_timeval_tv_sec != yes; then + REPLACE_STRUCT_TIMEVAL=1 + fi + fi + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ +#if HAVE_SYS_TIME_H +# include +#endif +#include + ]], [gettimeofday]) +]) + +AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], +[ + GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY]) + dnl Assume POSIX behavior unless another module says otherwise. + HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY]) + HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) + HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H]) + REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY]) + REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL]) +]) diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4 new file mode 100644 index 0000000..9748905 --- /dev/null +++ b/gl/m4/sys_types_h.m4 @@ -0,0 +1,24 @@ +# sys_types_h.m4 serial 5 +dnl Copyright (C) 2011-2014 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_ONCE([gl_SYS_TYPES_H], +[ + AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) + gl_NEXT_HEADERS([sys/types.h]) + + dnl Ensure the type pid_t gets defined. + AC_REQUIRE([AC_TYPE_PID_T]) + + dnl Ensure the type mode_t gets defined. + AC_REQUIRE([AC_TYPE_MODE_T]) + + dnl Whether to override the 'off_t' type. + AC_REQUIRE([gl_TYPE_OFF_T]) +]) + +AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], +[ +]) diff --git a/gl/m4/sys_uio_h.m4 b/gl/m4/sys_uio_h.m4 new file mode 100644 index 0000000..ba6b4b5 --- /dev/null +++ b/gl/m4/sys_uio_h.m4 @@ -0,0 +1,31 @@ +# sys_uio_h.m4 serial 1 +dnl Copyright (C) 2011-2014 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_HEADER_SYS_UIO], +[ + AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS]) + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([sys/uio.h]) + if test $ac_cv_header_sys_uio_h = yes; then + HAVE_SYS_UIO_H=1 + else + HAVE_SYS_UIO_H=0 + fi + AC_SUBST([HAVE_SYS_UIO_H]) +]) + +AC_DEFUN([gl_SYS_UIO_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_SYS_UIO_H_DEFAULTS], +[ +]) diff --git a/gl/m4/sys_utsname_h.m4 b/gl/m4/sys_utsname_h.m4 new file mode 100644 index 0000000..5e75e2d --- /dev/null +++ b/gl/m4/sys_utsname_h.m4 @@ -0,0 +1,54 @@ +# sys_utsname_h.m4 serial 8 +dnl Copyright (C) 2009-2014 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 Written by Bruno Haible. + +AC_DEFUN([gl_SYS_UTSNAME_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_SYS_UTSNAME_H_DEFAULTS]) + + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([sys/utsname.h]) + if test $ac_cv_header_sys_utsname_h != yes; then + HAVE_SYS_UTSNAME_H=0 + HAVE_STRUCT_UTSNAME=0 + else + HAVE_SYS_UTSNAME_H=1 + AC_CHECK_TYPES([struct utsname], [], [HAVE_STRUCT_UTSNAME=0], [[ +/* Minix 3.1.8 has a bug: must be included before + . */ +#include +#include + ]]) + fi + AC_SUBST([HAVE_SYS_UTSNAME_H]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ + /* Minix 3.1.8 has a bug: must be included before + . */ + #include + #include + ]], [uname]) +]) + +AC_DEFUN([gl_SYS_UTSNAME_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_UTSNAME_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) +]) + +AC_DEFUN([gl_SYS_UTSNAME_H_DEFAULTS], +[ + GNULIB_UNAME=0; AC_SUBST([GNULIB_UNAME]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_UNAME=1; AC_SUBST([HAVE_UNAME]) + HAVE_STRUCT_UTSNAME=1; AC_SUBST([HAVE_STRUCT_UTSNAME]) +]) diff --git a/gl/m4/sys_wait_h.m4 b/gl/m4/sys_wait_h.m4 new file mode 100644 index 0000000..a9676c2 --- /dev/null +++ b/gl/m4/sys_wait_h.m4 @@ -0,0 +1,36 @@ +# sys_wait_h.m4 serial 6 +dnl Copyright (C) 2008-2014 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_SYS_WAIT_H], +[ + AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS]) + + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([sys/wait.h]) + + dnl Ensure the type pid_t gets defined. + AC_REQUIRE([AC_TYPE_PID_T]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include ]], + [waitpid]) +]) + +AC_DEFUN([gl_SYS_WAIT_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_SYS_WAIT_H_DEFAULTS], +[ + GNULIB_WAITPID=0; AC_SUBST([GNULIB_WAITPID]) + dnl Assume proper GNU behavior unless another module says otherwise. +]) diff --git a/gl/m4/thread.m4 b/gl/m4/thread.m4 new file mode 100644 index 0000000..b6d602a --- /dev/null +++ b/gl/m4/thread.m4 @@ -0,0 +1,17 @@ +# thread.m4 serial 3 +dnl Copyright (C) 2008-2014 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_THREAD], +[ + AC_REQUIRE([gl_THREADLIB]) + + if test $gl_threads_api = posix; then + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + AC_CHECK_FUNCS([pthread_atfork]) + LIBS="$gl_save_LIBS" + fi +]) diff --git a/gl/m4/threadlib.m4 b/gl/m4/threadlib.m4 new file mode 100644 index 0000000..a881702 --- /dev/null +++ b/gl/m4/threadlib.m4 @@ -0,0 +1,371 @@ +# threadlib.m4 serial 10 (gettext-0.18.2) +dnl Copyright (C) 2005-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl gl_THREADLIB +dnl ------------ +dnl Tests for a multithreading library to be used. +dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO +dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the +dnl default is 'no', otherwise it is system dependent. In both cases, the user +dnl can change the choice through the options --enable-threads=choice or +dnl --disable-threads. +dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, +dnl USE_PTH_THREADS, USE_WINDOWS_THREADS +dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use +dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with +dnl libtool). +dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for +dnl programs that really need multithread functionality. The difference +dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak +dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". +dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for +dnl multithread-safe programs. + +AC_DEFUN([gl_THREADLIB_EARLY], +[ + AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) +]) + +dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. + +AC_DEFUN([gl_THREADLIB_EARLY_BODY], +[ + dnl Ordering constraints: This macro modifies CPPFLAGS in a way that + dnl influences the result of the autoconf tests that test for *_unlocked + dnl declarations, on AIX 5 at least. Therefore it must come early. + AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl + AC_BEFORE([$0], [gl_ARGP])dnl + + AC_REQUIRE([AC_CANONICAL_HOST]) + dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. + dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes + dnl AC_GNU_SOURCE. + m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], + [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], + [AC_REQUIRE([AC_GNU_SOURCE])]) + dnl Check for multithreading. + m4_ifdef([gl_THREADLIB_DEFAULT_NO], + [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], + [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) + AC_ARG_ENABLE([threads], +AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ +AC_HELP_STRING([--disable-threads], [build without multithread safety])]), + [gl_use_threads=$enableval], + [if test -n "$gl_use_threads_default"; then + gl_use_threads="$gl_use_threads_default" + else +changequote(,)dnl + case "$host_os" in + dnl Disable multithreading by default on OSF/1, because it interferes + dnl with fork()/exec(): When msgexec is linked with -lpthread, its + dnl child process gets an endless segmentation fault inside execvp(). + dnl Disable multithreading by default on Cygwin 1.5.x, because it has + dnl bugs that lead to endless loops or crashes. See + dnl . + osf*) gl_use_threads=no ;; + cygwin*) + case `uname -r` in + 1.[0-5].*) gl_use_threads=no ;; + *) gl_use_threads=yes ;; + esac + ;; + *) gl_use_threads=yes ;; + esac +changequote([,])dnl + fi + ]) + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # For using : + case "$host_os" in + osf*) + # On OSF/1, the compiler needs the flag -D_REENTRANT so that it + # groks . cc also understands the flag -pthread, but + # we don't use it because 1. gcc-2.95 doesn't understand -pthread, + # 2. putting a flag into CPPFLAGS that has an effect on the linker + # causes the AC_LINK_IFELSE test below to succeed unexpectedly, + # leading to wrong values of LIBTHREAD and LTLIBTHREAD. + CPPFLAGS="$CPPFLAGS -D_REENTRANT" + ;; + esac + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case "$host_os" in + aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; + solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; + esac + fi +]) + +dnl The guts of gl_THREADLIB. Needs to be expanded only once. + +AC_DEFUN([gl_THREADLIB_BODY], +[ + AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) + gl_threads_api=none + LIBTHREAD= + LTLIBTHREAD= + LIBMULTITHREAD= + LTLIBMULTITHREAD= + if test "$gl_use_threads" != no; then + dnl Check whether the compiler and linker support weak declarations. + AC_CACHE_CHECK([whether imported symbols can be declared weak], + [gl_cv_have_weak], + [gl_cv_have_weak=no + dnl First, test whether the compiler accepts it syntactically. + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[extern void xyzzy (); +#pragma weak xyzzy]], + [[xyzzy();]])], + [gl_cv_have_weak=maybe]) + if test $gl_cv_have_weak = maybe; then + dnl Second, test whether it actually works. On Cygwin 1.7.2, with + dnl gcc 4.3, symbols declared weak always evaluate to the address 0. + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#pragma weak fputs +int main () +{ + return (fputs == NULL); +}]])], + [gl_cv_have_weak=yes], + [gl_cv_have_weak=no], + [dnl When cross-compiling, assume that only ELF platforms support + dnl weak symbols. + AC_EGREP_CPP([Extensible Linking Format], + [#ifdef __ELF__ + Extensible Linking Format + #endif + ], + [gl_cv_have_weak="guessing yes"], + [gl_cv_have_weak="guessing no"]) + ]) + fi + ]) + if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then + # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that + # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. + AC_CHECK_HEADER([pthread.h], + [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) + if test "$gl_have_pthread_h" = yes; then + # Other possible tests: + # -lpthreads (FSU threads, PCthreads) + # -lgthreads + gl_have_pthread= + # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist + # in libc. IRIX 6.5 has the first one in both libc and libpthread, but + # the second one only in libpthread, and lock.c needs it. + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[pthread_mutex_lock((pthread_mutex_t*)0); + pthread_mutexattr_init((pthread_mutexattr_t*)0);]])], + [gl_have_pthread=yes]) + # Test for libpthread by looking for pthread_kill. (Not pthread_self, + # since it is defined as a macro on OSF/1.) + if test -n "$gl_have_pthread"; then + # The program links fine without libpthread. But it may actually + # need to link with libpthread in order to create multiple threads. + AC_CHECK_LIB([pthread], [pthread_kill], + [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread + # On Solaris and HP-UX, most pthread functions exist also in libc. + # Therefore pthread_in_use() needs to actually try to create a + # thread: pthread_create from libc will fail, whereas + # pthread_create will actually create a thread. + case "$host_os" in + solaris* | hpux*) + AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], + [Define if the pthread_in_use() detection is hard.]) + esac + ]) + else + # Some library is needed. Try libpthread and libc_r. + AC_CHECK_LIB([pthread], [pthread_kill], + [gl_have_pthread=yes + LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread + LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) + if test -z "$gl_have_pthread"; then + # For FreeBSD 4. + AC_CHECK_LIB([c_r], [pthread_kill], + [gl_have_pthread=yes + LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r + LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) + fi + fi + if test -n "$gl_have_pthread"; then + gl_threads_api=posix + AC_DEFINE([USE_POSIX_THREADS], [1], + [Define if the POSIX multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], + [Define if references to the POSIX multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + fi + if test -z "$gl_have_pthread"; then + if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then + gl_have_solaristhread= + gl_save_LIBS="$LIBS" + LIBS="$LIBS -lthread" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include +#include + ]], + [[thr_self();]])], + [gl_have_solaristhread=yes]) + LIBS="$gl_save_LIBS" + if test -n "$gl_have_solaristhread"; then + gl_threads_api=solaris + LIBTHREAD=-lthread + LTLIBTHREAD=-lthread + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + AC_DEFINE([USE_SOLARIS_THREADS], [1], + [Define if the old Solaris multithreading library can be used.]) + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], + [Define if references to the old Solaris multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + fi + fi + if test "$gl_use_threads" = pth; then + gl_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_LINKFLAGS([pth]) + gl_have_pth= + gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBPTH" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include ]], [[pth_self();]])], + [gl_have_pth=yes]) + LIBS="$gl_save_LIBS" + if test -n "$gl_have_pth"; then + gl_threads_api=pth + LIBTHREAD="$LIBPTH" + LTLIBTHREAD="$LTLIBPTH" + LIBMULTITHREAD="$LIBTHREAD" + LTLIBMULTITHREAD="$LTLIBTHREAD" + AC_DEFINE([USE_PTH_THREADS], [1], + [Define if the GNU Pth multithreading library can be used.]) + if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then + if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then + AC_DEFINE([USE_PTH_THREADS_WEAK], [1], + [Define if references to the GNU Pth multithreading library should be made weak.]) + LIBTHREAD= + LTLIBTHREAD= + fi + fi + else + CPPFLAGS="$gl_save_CPPFLAGS" + fi + fi + if test -z "$gl_have_pthread"; then + case "$gl_use_threads" in + yes | windows | win32) # The 'win32' is for backward compatibility. + if { case "$host_os" in + mingw*) true;; + *) false;; + esac + }; then + gl_threads_api=windows + AC_DEFINE([USE_WINDOWS_THREADS], [1], + [Define if the native Windows multithreading API can be used.]) + fi + ;; + esac + fi + fi + AC_MSG_CHECKING([for multithread API to use]) + AC_MSG_RESULT([$gl_threads_api]) + AC_SUBST([LIBTHREAD]) + AC_SUBST([LTLIBTHREAD]) + AC_SUBST([LIBMULTITHREAD]) + AC_SUBST([LTLIBMULTITHREAD]) +]) + +AC_DEFUN([gl_THREADLIB], +[ + AC_REQUIRE([gl_THREADLIB_EARLY]) + AC_REQUIRE([gl_THREADLIB_BODY]) +]) + + +dnl gl_DISABLE_THREADS +dnl ------------------ +dnl Sets the gl_THREADLIB default so that threads are not used by default. +dnl The user can still override it at installation time, by using the +dnl configure option '--enable-threads'. + +AC_DEFUN([gl_DISABLE_THREADS], [ + m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) +]) + + +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 +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 +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 +dnl NetBSD 1.6 -- +dnl +dnl OpenBSD 3.4 posix -lpthread Y OK +dnl +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 +dnl HP-UX 11 posix -lpthread N (cc) OK +dnl Y (gcc) +dnl +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 +dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK +dnl -lpthread (gcc) Y +dnl +dnl Cygwin posix -lpthread Y OK +dnl +dnl Any of the above pth -lpth 0.0 +dnl +dnl Mingw windows N OK +dnl +dnl BeOS 5 -- +dnl +dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is +dnl turned off: +dnl OK if all three tests terminate OK, +dnl 0.5 if the first test terminates OK but the second one loops endlessly, +dnl 0.0 if the first test already loops endlessly. diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4 new file mode 100644 index 0000000..9852778 --- /dev/null +++ b/gl/m4/time_h.m4 @@ -0,0 +1,118 @@ +# Configure a more-standard replacement for . + +# Copyright (C) 2000-2001, 2003-2007, 2009-2014 Free Software Foundation, Inc. + +# serial 8 + +# 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. + +# Written by Paul Eggert and Jim Meyering. + +AC_DEFUN([gl_HEADER_TIME_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_HEADER_TIME_H_BODY]) +]) + +AC_DEFUN([gl_HEADER_TIME_H_BODY], +[ + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + gl_NEXT_HEADERS([time.h]) + AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) +]) + +dnl Check whether 'struct timespec' is declared +dnl in time.h, sys/time.h, or pthread.h. + +AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], +[ + AC_CHECK_HEADERS_ONCE([sys/time.h]) + AC_CACHE_CHECK([for struct timespec in ], + [gl_cv_sys_struct_timespec_in_time_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [gl_cv_sys_struct_timespec_in_time_h=yes], + [gl_cv_sys_struct_timespec_in_time_h=no])]) + + TIME_H_DEFINES_STRUCT_TIMESPEC=0 + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + if test $gl_cv_sys_struct_timespec_in_time_h = yes; then + TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + AC_CACHE_CHECK([for struct timespec in ], + [gl_cv_sys_struct_timespec_in_sys_time_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [gl_cv_sys_struct_timespec_in_sys_time_h=yes], + [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) + if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then + SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 + else + AC_CACHE_CHECK([for struct timespec in ], + [gl_cv_sys_struct_timespec_in_pthread_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [gl_cv_sys_struct_timespec_in_pthread_h=yes], + [gl_cv_sys_struct_timespec_in_pthread_h=no])]) + if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then + PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + fi + fi + fi + AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) + AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) + AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) +]) + +AC_DEFUN([gl_TIME_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], +[ + GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) + GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) + GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) + GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) + GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) + HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) + HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) + HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) + dnl If another module says to replace or to not replace, do that. + dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; + dnl this lets maintainers check for portability. + REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) + REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) + REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) + REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) + + dnl Hack so that the time module doesn't depend on the sys_time module. + dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent. + : ${GNULIB_GETTIMEOFDAY=0}; AC_SUBST([GNULIB_GETTIMEOFDAY]) + dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME + dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier + dnl is no longer a big deal. + REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME]) + REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME]) +]) diff --git a/gl/m4/time_r.m4 b/gl/m4/time_r.m4 new file mode 100644 index 0000000..7e15600 --- /dev/null +++ b/gl/m4/time_r.m4 @@ -0,0 +1,58 @@ +dnl Reentrant time functions: localtime_r, gmtime_r. + +dnl Copyright (C) 2003, 2006-2014 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 Written by Paul Eggert. + +AC_DEFUN([gl_TIME_R], +[ + dnl Persuade glibc and Solaris to declare localtime_r. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([AC_C_RESTRICT]) + + dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is + dnl not defined. + AC_CHECK_DECLS([localtime_r], [], [], [[#include ]]) + if test $ac_cv_have_decl_localtime_r = no; then + HAVE_DECL_LOCALTIME_R=0 + fi + + AC_CHECK_FUNCS_ONCE([localtime_r]) + if test $ac_cv_func_localtime_r = yes; then + HAVE_LOCALTIME_R=1 + AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature], + [gl_cv_time_r_posix], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[/* We don't need to append 'restrict's to the argument types, + even though the POSIX signature has the 'restrict's, + since C99 says they can't affect type compatibility. */ + struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; + if (ptr) return 0; + /* Check the return type is a pointer. + On HP-UX 10 it is 'int'. */ + *localtime_r (0, 0);]]) + ], + [gl_cv_time_r_posix=yes], + [gl_cv_time_r_posix=no]) + ]) + if test $gl_cv_time_r_posix = yes; then + REPLACE_LOCALTIME_R=0 + else + REPLACE_LOCALTIME_R=1 + fi + else + HAVE_LOCALTIME_R=0 + fi +]) + +# Prerequisites of lib/time_r.c. +AC_DEFUN([gl_PREREQ_TIME_R], [ + : +]) diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4 new file mode 100644 index 0000000..2ce654f --- /dev/null +++ b/gl/m4/timespec.m4 @@ -0,0 +1,11 @@ +#serial 15 + +# Copyright (C) 2000-2001, 2003-2007, 2009-2014 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. + +dnl From Jim Meyering + +AC_DEFUN([gl_TIMESPEC], [:]) diff --git a/gl/m4/tm_gmtoff.m4 b/gl/m4/tm_gmtoff.m4 new file mode 100644 index 0000000..486351b --- /dev/null +++ b/gl/m4/tm_gmtoff.m4 @@ -0,0 +1,14 @@ +# tm_gmtoff.m4 serial 3 +dnl Copyright (C) 2002, 2009-2014 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_TM_GMTOFF], +[ + AC_CHECK_MEMBER([struct tm.tm_gmtoff], + [AC_DEFINE([HAVE_TM_GMTOFF], [1], + [Define if struct tm has the tm_gmtoff member.])], + , + [#include ]) +]) diff --git a/gl/m4/trunc.m4 b/gl/m4/trunc.m4 new file mode 100644 index 0000000..ba87bd0 --- /dev/null +++ b/gl/m4/trunc.m4 @@ -0,0 +1,95 @@ +# trunc.m4 serial 9 +dnl Copyright (C) 2007, 2010-2014 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_TRUNC], +[ + m4_divert_text([DEFAULTS], [gl_trunc_required=plain]) + AC_REQUIRE([gl_MATH_H_DEFAULTS]) + dnl Persuade glibc to declare trunc(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + dnl Test whether trunc() is declared. + AC_CHECK_DECLS([trunc], , , [[#include ]]) + if test "$ac_cv_have_decl_trunc" = yes; then + dnl Test whether trunc() can be used without libm. + TRUNC_LIBM=? + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + double x;]], + [[x = trunc(x);]])], + [TRUNC_LIBM=]) + if test "$TRUNC_LIBM" = "?"; then + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#ifndef __NO_MATH_INLINES + # define __NO_MATH_INLINES 1 /* for glibc */ + #endif + #include + double x;]], + [[x = trunc(x);]])], + [TRUNC_LIBM="-lm"]) + LIBS="$save_LIBS" + fi + if test "$TRUNC_LIBM" = "?"; then + TRUNC_LIBM= + fi + m4_ifdef([gl_FUNC_TRUNC_IEEE], [ + if test $gl_trunc_required = ieee && test $REPLACE_TRUNC = 0; then + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether trunc works according to ISO C 99 with IEC 60559], + [gl_cv_func_trunc_ieee], + [ + save_LIBS="$LIBS" + LIBS="$LIBS $TRUNC_LIBM" + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#ifndef __NO_MATH_INLINES +# define __NO_MATH_INLINES 1 /* for glibc */ +#endif +#include +]gl_DOUBLE_MINUS_ZERO_CODE[ +]gl_DOUBLE_SIGNBIT_CODE[ +static double dummy (double f) { return 0; } +int main (int argc, char *argv[]) +{ + double (*my_trunc) (double) = argc ? trunc : dummy; + /* Test whether trunc (-0.0) is -0.0. */ + if (signbitd (minus_zerod) && !signbitd (my_trunc (minus_zerod))) + return 1; + return 0; +} + ]])], + [gl_cv_func_trunc_ieee=yes], + [gl_cv_func_trunc_ieee=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_trunc_ieee="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_trunc_ieee="guessing no" ;; + esac + ]) + LIBS="$save_LIBS" + ]) + case "$gl_cv_func_trunc_ieee" in + *yes) ;; + *) REPLACE_TRUNC=1 ;; + esac + fi + ]) + else + HAVE_DECL_TRUNC=0 + fi + if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then + dnl No libraries are needed to link lib/trunc.c. + TRUNC_LIBM= + fi + AC_SUBST([TRUNC_LIBM]) +]) diff --git a/gl/m4/uname.m4 b/gl/m4/uname.m4 new file mode 100644 index 0000000..0136f2e --- /dev/null +++ b/gl/m4/uname.m4 @@ -0,0 +1,19 @@ +# uname.m4 serial 11 +dnl Copyright (C) 2009-2014 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_UNAME], +[ + AC_REQUIRE([gl_SYS_UTSNAME_H_DEFAULTS]) + AC_CHECK_FUNCS([uname]) + if test $ac_cv_func_uname = no; then + HAVE_UNAME=0 + fi +]) + +# Prerequisites of lib/uname.c. +AC_DEFUN([gl_PREREQ_UNAME], [ + : +]) diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4 new file mode 100644 index 0000000..6cdf625 --- /dev/null +++ b/gl/m4/ungetc.m4 @@ -0,0 +1,46 @@ +# ungetc.m4 serial 3 +dnl Copyright (C) 2009-2014 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_ONCE([gl_FUNC_UNGETC_WORKS], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + AC_CACHE_CHECK([whether ungetc works on arbitrary bytes], + [gl_cv_func_ungetc_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include + ]], [FILE *f; + if (!(f = fopen ("conftest.tmp", "w+"))) return 1; + if (fputs ("abc", f) < 0) return 2; + rewind (f); + if (fgetc (f) != 'a') return 3; + if (fgetc (f) != 'b') return 4; + if (ungetc ('d', f) != 'd') return 5; + if (ftell (f) != 1) return 6; + if (fgetc (f) != 'd') return 7; + if (ftell (f) != 2) return 8; + if (fseek (f, 0, SEEK_CUR) != 0) return 9; + if (ftell (f) != 2) return 10; + if (fgetc (f) != 'c') return 11; + fclose (f); remove ("conftest.tmp");])], + [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_ungetc_works="guessing no" ;; + esac + ]) + ]) + case "$gl_cv_func_ungetc_works" in + *yes) ;; + *) + AC_DEFINE([FUNC_UNGETC_BROKEN], [1], + [Define to 1 if ungetc is broken when used on arbitrary bytes.]) + ;; + esac +]) diff --git a/gl/m4/unistd-safer.m4 b/gl/m4/unistd-safer.m4 new file mode 100644 index 0000000..96cb7df --- /dev/null +++ b/gl/m4/unistd-safer.m4 @@ -0,0 +1,10 @@ +#serial 9 +dnl Copyright (C) 2002, 2005-2006, 2009-2014 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_UNISTD_SAFER], +[ + AC_CHECK_FUNCS_ONCE([pipe]) +]) diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4 new file mode 100644 index 0000000..1fa197e --- /dev/null +++ b/gl/m4/unistd_h.m4 @@ -0,0 +1,187 @@ +# unistd_h.m4 serial 67 +dnl Copyright (C) 2006-2014 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 Written by Simon Josefsson, Bruno Haible. + +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]) + + gl_CHECK_NEXT_HEADERS([unistd.h]) + if test $ac_cv_header_unistd_h = yes; then + HAVE_UNISTD_H=1 + else + HAVE_UNISTD_H=0 + fi + AC_SUBST([HAVE_UNISTD_H]) + + dnl Ensure the type pid_t gets defined. + AC_REQUIRE([AC_TYPE_PID_T]) + + dnl Determine WINDOWS_64_BIT_OFF_T. + AC_REQUIRE([gl_TYPE_OFF_T]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ +#if HAVE_UNISTD_H +# include +#endif +/* Some systems declare various items in the wrong headers. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include +# endif +#endif + ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat + fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups + gethostname getlogin getlogin_r getpagesize + getusershell setusershell endusershell + group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite + readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r + unlink unlinkat usleep]) +]) + +AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_UNISTD_H_DEFAULTS], +[ + GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR]) + GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) + GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) + GNULIB_DUP=0; AC_SUBST([GNULIB_DUP]) + GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) + GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) + GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) + GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) + GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) + GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) + GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) + GNULIB_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC]) + GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) + GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) + GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) + GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) + GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) + GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) + GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) + GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) + GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) + GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) + GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) + GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) + GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY]) + GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) + GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) + GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) + GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) + GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) + GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) + GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) + GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) + GNULIB_READ=0; AC_SUBST([GNULIB_READ]) + GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) + GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) + GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) + GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME]) + GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) + GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) + GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) + GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) + GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) + GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) + GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) + GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) + GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) + GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) + HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) + HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) + HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) + HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) + HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) + HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) + HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) + HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) + HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) + HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) + HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) + HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) + HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) + HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) + HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) + HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) + HAVE_LINK=1; AC_SUBST([HAVE_LINK]) + HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) + HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) + HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) + HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) + HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) + HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) + HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) + HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) + HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) + HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) + HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) + HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) + HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) + HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) + HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) + HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) + HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) + HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) + HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) + HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) + HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) + HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) + HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) + HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) + REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) + REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) + REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) + REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) + REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) + REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) + REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) + REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) + REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) + REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) + REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) + REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) + REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) + REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) + REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) + REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) + REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) + REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) + REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) + REPLACE_READ=0; AC_SUBST([REPLACE_READ]) + REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) + REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) + REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) + REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) + REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) + REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) + REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) + REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) + REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) + UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) +]) diff --git a/gl/m4/unlink.m4 b/gl/m4/unlink.m4 new file mode 100644 index 0000000..03cf8ae --- /dev/null +++ b/gl/m4/unlink.m4 @@ -0,0 +1,130 @@ +# unlink.m4 serial 11 +dnl Copyright (C) 2009-2014 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_UNLINK], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CHECK_HEADERS_ONCE([unistd.h]) + + dnl Detect FreeBSD 7.2, AIX 7.1, Solaris 9 bug. + AC_CACHE_CHECK([whether unlink honors trailing slashes], + [gl_cv_func_unlink_honors_slashes], + [touch conftest.file + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.file conftest.lnk + fi + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + #endif + #include + ]], + [[int result = 0; + if (!unlink ("conftest.file/")) + result |= 1; + else if (errno != ENOTDIR) + result |= 2; +#if HAVE_LSTAT + if (!unlink ("conftest.lnk/")) + result |= 4; + else if (errno != ENOTDIR) + result |= 8; +#endif + return result; + ]])], + [gl_cv_func_unlink_honors_slashes=yes], + [gl_cv_func_unlink_honors_slashes=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_unlink_honors_slashes="guessing no" ;; + esac + ]) + rm -f conftest.file conftest.lnk]) + case "$gl_cv_func_unlink_honors_slashes" in + *no) + REPLACE_UNLINK=1 + ;; + esac + + dnl Detect Mac OS X 10.5.6 bug: On read-write HFS mounts, unlink("..") or + dnl unlink("../..") succeeds without doing anything. + AC_CACHE_CHECK([whether unlink of a parent directory fails as it should], + [gl_cv_func_unlink_parent_fails], + [case "$host_os" in + darwin*) + dnl Try to unlink a subdirectory of /tmp, because /tmp is usually on a + dnl HFS mount on Mac OS X. Use a subdirectory, owned by the current + dnl user, because otherwise unlink() may fail due to permissions + dnl reasons, and because when running as root we don't want to risk + dnl destroying the entire /tmp. + if { + # Use the mktemp program if available. If not available, hide the error + # message. + tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { + # Use a simple mkdir command. It is guaranteed to fail if the directory + # already exists. $RANDOM is bash specific and expands to empty in shells + # other than bash, ksh and zsh. Its use does not increase security; + # rather, it minimizes the probability of failure in a very cluttered /tmp + # directory. + tmp=/tmp/gt$$-$RANDOM + (umask 077 && mkdir "$tmp") + }; then + mkdir "$tmp/subdir" + GL_SUBDIR_FOR_UNLINK="$tmp/subdir" + export GL_SUBDIR_FOR_UNLINK + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + #endif + int main () + { + int result = 0; + if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0) + result |= 1; + else if (unlink ("..") == 0) + result |= 2; + return result; + } + ]])], + [gl_cv_func_unlink_parent_fails=yes], + [gl_cv_func_unlink_parent_fails=no], + [# If we don't know, assume the worst. + gl_cv_func_unlink_parent_fails="guessing no" + ]) + unset GL_SUBDIR_FOR_UNLINK + rm -rf "$tmp" + else + gl_cv_func_unlink_parent_fails="guessing no" + fi + ;; + *) + gl_cv_func_unlink_parent_fails="guessing yes" + ;; + esac + ]) + case "$gl_cv_func_unlink_parent_fails" in + *no) + REPLACE_UNLINK=1 + AC_DEFINE([UNLINK_PARENT_BUG], [1], + [Define to 1 if unlink() on a parent directory may succeed]) + ;; + esac +]) diff --git a/gl/m4/unlinkat.m4 b/gl/m4/unlinkat.m4 new file mode 100644 index 0000000..f5110aa --- /dev/null +++ b/gl/m4/unlinkat.m4 @@ -0,0 +1,33 @@ +# unlinkat.m4 serial 2 +dnl Copyright (C) 2004-2014 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. + +# Written by Jim Meyering. + +AC_DEFUN([gl_FUNC_UNLINKAT], +[ + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_FUNCS_ONCE([unlinkat]) + AC_REQUIRE([gl_FUNC_UNLINK]) + AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) + if test $ac_cv_func_unlinkat = no; then + HAVE_UNLINKAT=0 + else + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *no) + # Solaris 9 has *at functions, but uniformly mishandles trailing + # slash in all of them. + REPLACE_UNLINKAT=1 + ;; + *) + # GNU/Hurd has unlinkat, but it has the same bug as unlink. + if test $REPLACE_UNLINK = 1; then + REPLACE_UNLINKAT=1 + fi + ;; + esac + fi +]) diff --git a/gl/m4/unlinkdir.m4 b/gl/m4/unlinkdir.m4 new file mode 100644 index 0000000..99797af --- /dev/null +++ b/gl/m4/unlinkdir.m4 @@ -0,0 +1,32 @@ +# serial 7 + +# Copyright (C) 2005-2007, 2009-2014 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. + +# Written by Paul Eggert. + +AC_DEFUN([gl_UNLINKDIR], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CHECK_HEADERS_ONCE([priv.h]) + + # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later, + # Cygwin, and mingw never let anyone (even root) unlink directories. + # If anyone knows of another system for which unlink can never + # remove a directory, please report it to . + # Unfortunately this is difficult to test for, since it requires root access + # and might create garbage in the file system, + # so the code below simply relies on the kernel name and version number. + case $host_os in + gnu[[0-9]]* | \ + linux-* | linux | \ + freebsd2.2* | freebsd[[3-9]]* | freebsd[[1-9]][[0-9]]* | \ + cygwin | \ + mingw*) + AC_DEFINE([UNLINK_CANNOT_UNLINK_DIR], [1], + [Define to 1 if unlink (dir) cannot possibly succeed.]);; + esac +]) diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4 new file mode 100644 index 0000000..106192e --- /dev/null +++ b/gl/m4/vasnprintf.m4 @@ -0,0 +1,291 @@ +# vasnprintf.m4 serial 36 +dnl Copyright (C) 2002-2004, 2006-2014 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_VASNPRINTF], +[ + AC_CHECK_FUNCS_ONCE([vasnprintf]) + if test $ac_cv_func_vasnprintf = no; then + gl_REPLACE_VASNPRINTF + fi +]) + +AC_DEFUN([gl_REPLACE_VASNPRINTF], +[ + AC_CHECK_FUNCS_ONCE([vasnprintf]) + AC_LIBOBJ([vasnprintf]) + AC_LIBOBJ([printf-args]) + AC_LIBOBJ([printf-parse]) + AC_LIBOBJ([asnprintf]) + if test $ac_cv_func_vasnprintf = yes; then + AC_DEFINE([REPLACE_VASNPRINTF], [1], + [Define if vasnprintf exists but is overridden by gnulib.]) + fi + gl_PREREQ_PRINTF_ARGS + gl_PREREQ_PRINTF_PARSE + gl_PREREQ_VASNPRINTF + gl_PREREQ_ASNPRINTF +]) + +# Prerequisites of lib/printf-args.h, lib/printf-args.c. +AC_DEFUN([gl_PREREQ_PRINTF_ARGS], +[ + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WINT_T]) +]) + +# Prerequisites of lib/printf-parse.h, lib/printf-parse.c. +AC_DEFUN([gl_PREREQ_PRINTF_PARSE], +[ + AC_REQUIRE([gl_FEATURES_H]) + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WINT_T]) + AC_REQUIRE([AC_TYPE_SIZE_T]) + AC_CHECK_TYPE([ptrdiff_t], , + [AC_DEFINE([ptrdiff_t], [long], + [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) + ]) + AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) +]) + +# Prerequisites of lib/vasnprintf.c. +AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], +[ + AC_REQUIRE([AC_FUNC_ALLOCA]) + AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) + AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WINT_T]) + AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) + dnl Use the _snprintf function only if it is declared (because on NetBSD it + dnl is defined as a weak alias of snprintf; we prefer to use the latter). + AC_CHECK_DECLS([_snprintf], , , [[#include ]]) + dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization + dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE. + AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) + dnl We can avoid a lot of code by assuming that snprintf's return value + dnl conforms to ISO C99. So check that. + AC_REQUIRE([gl_SNPRINTF_RETVAL_C99]) + case "$gl_cv_func_snprintf_retval_c99" in + *yes) + AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1], + [Define if the return value of the snprintf function is the number of + of bytes (excluding the terminating NUL) that would have been produced + if the buffer had been large enough.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting 'long double' +# arguments. +AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE], +[ + AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) + case "$gl_cv_func_printf_long_double" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], + [Define if the vasnprintf implementation needs special code for + 'long double' arguments.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double' +# arguments. +AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE], +[ + AC_REQUIRE([gl_PRINTF_INFINITE]) + case "$gl_cv_func_printf_infinite" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1], + [Define if the vasnprintf implementation needs special code for + infinite 'double' arguments.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double' +# arguments. +AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE], +[ + AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) + dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if + dnl NEED_PRINTF_LONG_DOUBLE is already set. + AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE]) + case "$gl_cv_func_printf_long_double" in + *yes) + case "$gl_cv_func_printf_infinite_long_double" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1], + [Define if the vasnprintf implementation needs special code for + infinite 'long double' arguments.]) + ;; + esac + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive. +AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], +[ + AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) + case "$gl_cv_func_printf_directive_a" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1], + [Define if the vasnprintf implementation needs special code for + the 'a' and 'A' directives.]) + AC_CHECK_FUNCS([nl_langinfo]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive. +AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F], +[ + AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) + case "$gl_cv_func_printf_directive_f" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1], + [Define if the vasnprintf implementation needs special code for + the 'F' directive.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive. +AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS], +[ + AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) + case "$gl_cv_func_printf_directive_ls" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1], + [Define if the vasnprintf implementation needs special code for + the 'ls' directive.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag. +AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING], +[ + AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) + case "$gl_cv_func_printf_flag_grouping" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1], + [Define if the vasnprintf implementation needs special code for the + ' flag.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag. +AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST], +[ + AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) + case "$gl_cv_func_printf_flag_leftadjust" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1], + [Define if the vasnprintf implementation needs special code for the + '-' flag.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag. +AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO], +[ + AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) + case "$gl_cv_func_printf_flag_zero" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1], + [Define if the vasnprintf implementation needs special code for the + 0 flag.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for supporting large precisions. +AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION], +[ + AC_REQUIRE([gl_PRINTF_PRECISION]) + case "$gl_cv_func_printf_precision" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1], + [Define if the vasnprintf implementation needs special code for + supporting large precisions without arbitrary bounds.]) + AC_DEFINE([NEED_PRINTF_DOUBLE], [1], + [Define if the vasnprintf implementation needs special code for + 'double' arguments.]) + AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], + [Define if the vasnprintf implementation needs special code for + 'long double' arguments.]) + ;; + esac +]) + +# Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory +# conditions. +AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM], +[ + AC_REQUIRE([gl_PRINTF_ENOMEM]) + case "$gl_cv_func_printf_enomem" in + *yes) + ;; + *) + AC_DEFINE([NEED_PRINTF_ENOMEM], [1], + [Define if the vasnprintf implementation needs special code for + surviving out-of-memory conditions.]) + AC_DEFINE([NEED_PRINTF_DOUBLE], [1], + [Define if the vasnprintf implementation needs special code for + 'double' arguments.]) + AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], + [Define if the vasnprintf implementation needs special code for + 'long double' arguments.]) + ;; + esac +]) + +# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance. +AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS], +[ + AC_REQUIRE([gl_PREREQ_VASNPRINTF]) + gl_PREREQ_VASNPRINTF_LONG_DOUBLE + gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE + gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE + gl_PREREQ_VASNPRINTF_DIRECTIVE_A + gl_PREREQ_VASNPRINTF_DIRECTIVE_F + gl_PREREQ_VASNPRINTF_DIRECTIVE_LS + gl_PREREQ_VASNPRINTF_FLAG_GROUPING + gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST + gl_PREREQ_VASNPRINTF_FLAG_ZERO + gl_PREREQ_VASNPRINTF_PRECISION + gl_PREREQ_VASNPRINTF_ENOMEM +]) + +# Prerequisites of lib/asnprintf.c. +AC_DEFUN([gl_PREREQ_ASNPRINTF], +[ +]) diff --git a/gl/m4/version-etc.m4 b/gl/m4/version-etc.m4 new file mode 100644 index 0000000..667f9f8 --- /dev/null +++ b/gl/m4/version-etc.m4 @@ -0,0 +1,33 @@ +# version-etc.m4 serial 1 +# Copyright (C) 2009-2014 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. + +dnl $1 - configure flag and define name +dnl $2 - human readable description +m4_define([gl_VERSION_ETC_FLAG], +[dnl + AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])], + [dnl + case $withval in + yes|no) ;; + *) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;; + esac + ]) +]) + +AC_DEFUN([gl_VERSION_ETC], +[dnl + gl_VERSION_ETC_FLAG([packager], + [String identifying the packager of this software]) + gl_VERSION_ETC_FLAG([packager-version], + [Packager-specific version information]) + gl_VERSION_ETC_FLAG([packager-bug-reports], + [Packager info for bug reports (URL/e-mail/...)]) + if test "X$with_packager" = "X" && \ + test "X$with_packager_version$with_packager_bug_reports" != "X" + then + AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager]) + fi +]) diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4 new file mode 100644 index 0000000..cc690f8 --- /dev/null +++ b/gl/m4/warn-on-use.m4 @@ -0,0 +1,47 @@ +# warn-on-use.m4 serial 5 +dnl Copyright (C) 2010-2014 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. + +# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) +# --------------------------------------- +# For each whitespace-separated element in the list of NAMES, define +# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES +# even after being undefined as a macro. +# +# See warn-on-use.h for some hints on how to poison function names, as +# well as ideas on poisoning global variables and macros. NAMES may +# include global variables, but remember that only functions work with +# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single +# header, but if the replacement header pulls in other headers because +# some systems declare functions in the wrong header, then INCLUDES +# should do likewise. +# +# It is generally safe to assume declarations for functions declared +# in the intersection of C89 and C11 (such as printf) without +# needing gl_WARN_ON_USE_PREPARE. +AC_DEFUN([gl_WARN_ON_USE_PREPARE], +[ + m4_foreach_w([gl_decl], [$2], + [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), + [Define to 1 if ]m4_defn([gl_decl])[ is declared even after + undefining macros.])])dnl +dnl FIXME: gl_Symbol must be used unquoted until we can assume +dnl autoconf 2.64 or newer. + for gl_func in m4_flatten([$2]); do + AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl + AC_CACHE_CHECK([whether $gl_func is declared without a macro], + gl_Symbol, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], +[@%:@undef $gl_func + (void) $gl_func;])], + [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) + AS_VAR_IF(gl_Symbol, [yes], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) + dnl shortcut - if the raw declaration exists, then set a cache + dnl variable to allow skipping any later AC_CHECK_DECL efforts + eval ac_cv_have_decl_$gl_func=yes]) + AS_VAR_POPDEF([gl_Symbol])dnl + done +]) diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4 new file mode 100644 index 0000000..43156f4 --- /dev/null +++ b/gl/m4/warnings.m4 @@ -0,0 +1,79 @@ +# warnings.m4 serial 11 +dnl Copyright (C) 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# gl_AS_VAR_APPEND(VAR, VALUE) +# ---------------------------- +# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it. +m4_ifdef([AS_VAR_APPEND], +[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])], +[m4_define([gl_AS_VAR_APPEND], +[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])]) + + +# gl_COMPILER_OPTION_IF(OPTION, [IF-SUPPORTED], [IF-NOT-SUPPORTED], +# [PROGRAM = AC_LANG_PROGRAM()]) +# ----------------------------------------------------------------- +# Check if the compiler supports OPTION when compiling PROGRAM. +# +# FIXME: gl_Warn must be used unquoted until we can assume Autoconf +# 2.64 or newer. +AC_DEFUN([gl_COMPILER_OPTION_IF], +[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl +AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl +AS_LITERAL_IF([$1], + [m4_pushdef([gl_Positive], m4_bpatsubst([$1], [^-Wno-], [-W]))], + [gl_positive="$1" +case $gl_positive in + -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;; +esac +m4_pushdef([gl_Positive], [$gl_positive])])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [ + gl_save_compiler_FLAGS="$gl_Flags" + gl_AS_VAR_APPEND(m4_defn([gl_Flags]), + [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["]) + AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])], + [AS_VAR_SET(gl_Warn, [yes])], + [AS_VAR_SET(gl_Warn, [no])]) + gl_Flags="$gl_save_compiler_FLAGS" +]) +AS_VAR_IF(gl_Warn, [yes], [$2], [$3]) +m4_popdef([gl_Positive])dnl +AS_VAR_POPDEF([gl_Flags])dnl +AS_VAR_POPDEF([gl_Warn])dnl +]) + +# gl_UNKNOWN_WARNINGS_ARE_ERRORS +# ------------------------------ +# Clang doesn't complain about unknown warning options unless one also +# specifies -Wunknown-warning-option -Werror. Detect this. +AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS], +[gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option], + [gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'], + [gl_unknown_warnings_are_errors=])]) + +# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS], +# [PROGRAM = AC_LANG_PROGRAM()]) +# --------------------------------------------- +# Adds parameter to WARN_CFLAGS if the compiler supports it when +# compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]). +# +# If VARIABLE is a variable name, AC_SUBST it. +AC_DEFUN([gl_WARN_ADD], +[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS]) +gl_COMPILER_OPTION_IF([$1], + [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])], + [], + [$3]) +m4_ifval([$2], + [AS_LITERAL_IF([$2], [AC_SUBST([$2])])], + [AC_SUBST([WARN_CFLAGS])])dnl +]) + +# Local Variables: +# mode: autoconf +# End: diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4 new file mode 100644 index 0000000..85db952 --- /dev/null +++ b/gl/m4/wchar_h.m4 @@ -0,0 +1,225 @@ +dnl A placeholder for ISO C99 , for platforms that have issues. + +dnl Copyright (C) 2007-2014 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 Written by Eric Blake. + +# wchar_h.m4 serial 39 + +AC_DEFUN([gl_WCHAR_H], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) + dnl Prepare for creating substitute . + dnl Check for (missing in Linux uClibc when built without wide + dnl character support). + dnl is always overridden, because of GNULIB_POSIXCHECK. + gl_CHECK_NEXT_HEADERS([wchar.h]) + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 + else + HAVE_WCHAR_H=0 + fi + AC_SUBST([HAVE_WCHAR_H]) + + AC_REQUIRE([gl_FEATURES_H]) + + AC_REQUIRE([gt_TYPE_WINT_T]) + if test $gt_cv_c_wint_t = yes; then + HAVE_WINT_T=1 + else + HAVE_WINT_T=0 + fi + AC_SUBST([HAVE_WINT_T]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +#endif +#include + ]], + [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb + wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset + wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp + wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr + wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth + ]) +]) + +dnl Check whether is usable at all. +AC_DEFUN([gl_WCHAR_H_INLINE_OK], +[ + dnl Test whether suffers due to the transition from '__inline' to + dnl 'gnu_inline'. See + dnl and . In summary, + dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and + dnl the option -std=c99 or -std=gnu99, leads to a broken . + AC_CACHE_CHECK([whether uses 'inline' correctly], + [gl_cv_header_wchar_h_correct_inline], + [gl_cv_header_wchar_h_correct_inline=yes + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([[#define wcstod renamed_wcstod +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +extern int zero (void); +int main () { return zero(); } +]])]) + if AC_TRY_EVAL([ac_compile]); then + mv conftest.$ac_objext conftest1.$ac_objext + AC_LANG_CONFTEST([ + AC_LANG_SOURCE([[#define wcstod renamed_wcstod +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int zero (void) { return 0; } +]])]) + if AC_TRY_EVAL([ac_compile]); then + mv conftest.$ac_objext conftest2.$ac_objext + if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then + : + else + gl_cv_header_wchar_h_correct_inline=no + fi + fi + fi + rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext + ]) + if test $gl_cv_header_wchar_h_correct_inline = no; then + AC_MSG_ERROR([ cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). +This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in +C99 mode. You have four options: + - Add the flag -fgnu89-inline to CC and reconfigure, or + - Fix your include files, using parts of + , or + - Use a gcc version older than 4.3, or + - Don't use the flags -std=c99 or -std=gnu99. +Configuration aborted.]) + fi +]) + +AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_WCHAR_H_DEFAULTS], +[ + GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) + GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) + GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) + GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) + GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) + GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) + GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) + GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) + GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) + GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) + GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) + GNULIB_WMEMCHR=0; AC_SUBST([GNULIB_WMEMCHR]) + GNULIB_WMEMCMP=0; AC_SUBST([GNULIB_WMEMCMP]) + GNULIB_WMEMCPY=0; AC_SUBST([GNULIB_WMEMCPY]) + GNULIB_WMEMMOVE=0; AC_SUBST([GNULIB_WMEMMOVE]) + GNULIB_WMEMSET=0; AC_SUBST([GNULIB_WMEMSET]) + GNULIB_WCSLEN=0; AC_SUBST([GNULIB_WCSLEN]) + GNULIB_WCSNLEN=0; AC_SUBST([GNULIB_WCSNLEN]) + GNULIB_WCSCPY=0; AC_SUBST([GNULIB_WCSCPY]) + GNULIB_WCPCPY=0; AC_SUBST([GNULIB_WCPCPY]) + GNULIB_WCSNCPY=0; AC_SUBST([GNULIB_WCSNCPY]) + GNULIB_WCPNCPY=0; AC_SUBST([GNULIB_WCPNCPY]) + GNULIB_WCSCAT=0; AC_SUBST([GNULIB_WCSCAT]) + GNULIB_WCSNCAT=0; AC_SUBST([GNULIB_WCSNCAT]) + GNULIB_WCSCMP=0; AC_SUBST([GNULIB_WCSCMP]) + GNULIB_WCSNCMP=0; AC_SUBST([GNULIB_WCSNCMP]) + GNULIB_WCSCASECMP=0; AC_SUBST([GNULIB_WCSCASECMP]) + GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP]) + GNULIB_WCSCOLL=0; AC_SUBST([GNULIB_WCSCOLL]) + GNULIB_WCSXFRM=0; AC_SUBST([GNULIB_WCSXFRM]) + GNULIB_WCSDUP=0; AC_SUBST([GNULIB_WCSDUP]) + GNULIB_WCSCHR=0; AC_SUBST([GNULIB_WCSCHR]) + GNULIB_WCSRCHR=0; AC_SUBST([GNULIB_WCSRCHR]) + GNULIB_WCSCSPN=0; AC_SUBST([GNULIB_WCSCSPN]) + GNULIB_WCSSPN=0; AC_SUBST([GNULIB_WCSSPN]) + GNULIB_WCSPBRK=0; AC_SUBST([GNULIB_WCSPBRK]) + GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR]) + GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK]) + GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) + HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) + HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC]) + HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN]) + HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS]) + HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS]) + HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB]) + HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS]) + HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS]) + HAVE_WMEMCHR=1; AC_SUBST([HAVE_WMEMCHR]) + HAVE_WMEMCMP=1; AC_SUBST([HAVE_WMEMCMP]) + HAVE_WMEMCPY=1; AC_SUBST([HAVE_WMEMCPY]) + HAVE_WMEMMOVE=1; AC_SUBST([HAVE_WMEMMOVE]) + HAVE_WMEMSET=1; AC_SUBST([HAVE_WMEMSET]) + HAVE_WCSLEN=1; AC_SUBST([HAVE_WCSLEN]) + HAVE_WCSNLEN=1; AC_SUBST([HAVE_WCSNLEN]) + HAVE_WCSCPY=1; AC_SUBST([HAVE_WCSCPY]) + HAVE_WCPCPY=1; AC_SUBST([HAVE_WCPCPY]) + HAVE_WCSNCPY=1; AC_SUBST([HAVE_WCSNCPY]) + HAVE_WCPNCPY=1; AC_SUBST([HAVE_WCPNCPY]) + HAVE_WCSCAT=1; AC_SUBST([HAVE_WCSCAT]) + HAVE_WCSNCAT=1; AC_SUBST([HAVE_WCSNCAT]) + HAVE_WCSCMP=1; AC_SUBST([HAVE_WCSCMP]) + HAVE_WCSNCMP=1; AC_SUBST([HAVE_WCSNCMP]) + HAVE_WCSCASECMP=1; AC_SUBST([HAVE_WCSCASECMP]) + HAVE_WCSNCASECMP=1; AC_SUBST([HAVE_WCSNCASECMP]) + HAVE_WCSCOLL=1; AC_SUBST([HAVE_WCSCOLL]) + HAVE_WCSXFRM=1; AC_SUBST([HAVE_WCSXFRM]) + HAVE_WCSDUP=1; AC_SUBST([HAVE_WCSDUP]) + HAVE_WCSCHR=1; AC_SUBST([HAVE_WCSCHR]) + HAVE_WCSRCHR=1; AC_SUBST([HAVE_WCSRCHR]) + HAVE_WCSCSPN=1; AC_SUBST([HAVE_WCSCSPN]) + HAVE_WCSSPN=1; AC_SUBST([HAVE_WCSSPN]) + HAVE_WCSPBRK=1; AC_SUBST([HAVE_WCSPBRK]) + HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR]) + HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK]) + HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH]) + HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) + HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) + REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) + REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC]) + REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB]) + REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT]) + REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC]) + REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN]) + REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS]) + REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS]) + REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB]) + REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) + REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) + REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) + REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH]) +]) diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4 new file mode 100644 index 0000000..839a04c --- /dev/null +++ b/gl/m4/wchar_t.m4 @@ -0,0 +1,24 @@ +# wchar_t.m4 serial 4 (gettext-0.18.2) +dnl Copyright (C) 2002-2003, 2008-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether has the 'wchar_t' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WCHAR_T], +[ + AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + wchar_t foo = (wchar_t)'\0';]], + [[]])], + [gt_cv_c_wchar_t=yes], + [gt_cv_c_wchar_t=no])]) + if test $gt_cv_c_wchar_t = yes; then + AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) + fi +]) diff --git a/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4 new file mode 100644 index 0000000..844ef6a --- /dev/null +++ b/gl/m4/wcrtomb.m4 @@ -0,0 +1,112 @@ +# wcrtomb.m4 serial 11 +dnl Copyright (C) 2008-2014 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_WCRTOMB], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + + AC_REQUIRE([AC_TYPE_MBSTATE_T]) + gl_MBSTATE_T_BROKEN + + AC_CHECK_FUNCS_ONCE([wcrtomb]) + if test $ac_cv_func_wcrtomb = no; then + HAVE_WCRTOMB=0 + AC_CHECK_DECLS([wcrtomb],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +]]) + if test $ac_cv_have_decl_wcrtomb = yes; then + dnl On Minix 3.1.8, the system's declares wcrtomb() although + dnl it does not have the function. Avoid a collision with gnulib's + dnl replacement. + REPLACE_WCRTOMB=1 + fi + else + if test $REPLACE_MBSTATE_T = 1; then + REPLACE_WCRTOMB=1 + else + dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes + dnl returns 0 instead of 1. + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gt_LOCALE_FR]) + AC_REQUIRE([gt_LOCALE_FR_UTF8]) + AC_REQUIRE([gt_LOCALE_JA]) + AC_REQUIRE([gt_LOCALE_ZH_CN]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether wcrtomb return value is correct], + [gl_cv_func_wcrtomb_retval], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on AIX 4, OSF/1 and Solaris. + aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_wcrtomb_retval="guessing yes" ;; + esac +changequote([,])dnl + if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + int result = 0; + if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) + { + if (wcrtomb (NULL, 0, NULL) != 1) + result |= 1; + } + if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) + { + if (wcrtomb (NULL, 0, NULL) != 1) + result |= 2; + } + if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) + { + if (wcrtomb (NULL, 0, NULL) != 1) + result |= 4; + } + if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { + if (wcrtomb (NULL, 0, NULL) != 1) + result |= 8; + } + return result; +}]])], + [gl_cv_func_wcrtomb_retval=yes], + [gl_cv_func_wcrtomb_retval=no], + [:]) + fi + ]) + case "$gl_cv_func_wcrtomb_retval" in + *yes) ;; + *) REPLACE_WCRTOMB=1 ;; + esac + fi + fi +]) + +# Prerequisites of lib/wcrtomb.c. +AC_DEFUN([gl_PREREQ_WCRTOMB], [ + : +]) diff --git a/gl/m4/wctob.m4 b/gl/m4/wctob.m4 new file mode 100644 index 0000000..41f57af --- /dev/null +++ b/gl/m4/wctob.m4 @@ -0,0 +1,127 @@ +# wctob.m4 serial 10 +dnl Copyright (C) 2008-2014 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_WCTOB], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + + AC_CHECK_FUNCS_ONCE([wctob]) + if test $ac_cv_func_wctob = no; then + HAVE_WCTOB=0 + HAVE_DECL_WCTOB=0 + else + HAVE_WCTOB=1 + + dnl Solaris 9 has the wctob() function but it does not work. + dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned + dnl registers, see . + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gt_LOCALE_FR]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether wctob works], + [gl_cv_func_wctob_works], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on Solaris <= 9 and Cygwin. + solaris2.[1-9] | solaris2.[1-9].* | cygwin*) + gl_cv_func_wctob_works="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_wctob_works="guessing yes" ;; + esac +changequote([,])dnl + case "$host_os" in + cygwin*) + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include + +register long global __asm__ ("%ebx"); + +int main () +{ + setlocale (LC_ALL, "en_US.UTF-8"); + + global = 0x12345678; + if (wctob (0x00FC) != -1) + return 1; + if (global != 0x12345678) + return 2; + return 0; +}]])], + [:], + [gl_cv_func_wctob_works=no], + [:]) + ;; + esac + if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int main () +{ + if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) + { + wchar_t wc; + + if (mbtowc (&wc, "\374", 1) == 1) + if (wctob (wc) != (unsigned char) '\374') + return 1; + } + return 0; +}]])], + [gl_cv_func_wctob_works=yes], + [gl_cv_func_wctob_works=no], + [:]) + fi + ]) + case "$gl_cv_func_wctob_works" in + *yes) ;; + *) REPLACE_WCTOB=1 ;; + esac + if test $REPLACE_WCTOB = 0; then + + dnl IRIX 6.5 has the wctob() function but does not declare it. + AC_CHECK_DECLS([wctob], [], [], [[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include +]]) + if test $ac_cv_have_decl_wctob != yes; then + HAVE_DECL_WCTOB=0 + fi + fi + fi +]) + +# Prerequisites of lib/wctob.c. +AC_DEFUN([gl_PREREQ_WCTOB], [ + : +]) diff --git a/gl/m4/wctomb.m4 b/gl/m4/wctomb.m4 new file mode 100644 index 0000000..3b4ff79 --- /dev/null +++ b/gl/m4/wctomb.m4 @@ -0,0 +1,19 @@ +# wctomb.m4 serial 2 +dnl Copyright (C) 2011-2014 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_WCTOMB], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + + if false; then + REPLACE_WCTOMB=1 + fi +]) + +# Prerequisites of lib/wctomb.c. +AC_DEFUN([gl_PREREQ_WCTOMB], [ + : +]) diff --git a/gl/m4/wctype_h.m4 b/gl/m4/wctype_h.m4 new file mode 100644 index 0000000..3fac0ee --- /dev/null +++ b/gl/m4/wctype_h.m4 @@ -0,0 +1,209 @@ +# wctype_h.m4 serial 18 + +dnl A placeholder for ISO C99 , for platforms that lack it. + +dnl Copyright (C) 2006-2014 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 Written by Paul Eggert. + +AC_DEFUN([gl_WCTYPE_H], +[ + AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CHECK_FUNCS_ONCE([iswcntrl]) + if test $ac_cv_func_iswcntrl = yes; then + HAVE_ISWCNTRL=1 + else + HAVE_ISWCNTRL=0 + fi + AC_SUBST([HAVE_ISWCNTRL]) + + AC_REQUIRE([gt_TYPE_WINT_T]) + if test $gt_cv_c_wint_t = yes; then + HAVE_WINT_T=1 + else + HAVE_WINT_T=0 + fi + AC_SUBST([HAVE_WINT_T]) + + gl_CHECK_NEXT_HEADERS([wctype.h]) + if test $ac_cv_header_wctype_h = yes; then + if test $ac_cv_func_iswcntrl = yes; then + dnl Linux libc5 has an iswprint function that returns 0 for all arguments. + dnl The other functions are likely broken in the same way. + AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ + /* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #include + int main () { return iswprint ('x') == 0; } + ]])], + [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #if __GNU_LIBRARY__ == 1 + Linux libc5 i18n is broken. + #endif]], [])], + [gl_cv_func_iswcntrl_works="guessing yes"], + [gl_cv_func_iswcntrl_works="guessing no"]) + ]) + ]) + fi + HAVE_WCTYPE_H=1 + else + HAVE_WCTYPE_H=0 + fi + AC_SUBST([HAVE_WCTYPE_H]) + + case "$gl_cv_func_iswcntrl_works" in + *yes) REPLACE_ISWCNTRL=0 ;; + *) REPLACE_ISWCNTRL=1 ;; + esac + AC_SUBST([REPLACE_ISWCNTRL]) + + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then + dnl Redefine all of iswcntrl, ..., iswxdigit in . + : + fi + + if test $REPLACE_ISWCNTRL = 1; then + REPLACE_TOWLOWER=1 + else + AC_CHECK_FUNCS([towlower]) + if test $ac_cv_func_towlower = yes; then + REPLACE_TOWLOWER=0 + else + AC_CHECK_DECLS([towlower],,, + [[/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #if HAVE_WCTYPE_H + # include + #endif + ]]) + if test $ac_cv_have_decl_towlower = yes; then + dnl On Minix 3.1.8, the system's declares towlower() and + dnl towupper() although it does not have the functions. Avoid a + dnl collision with gnulib's replacement. + REPLACE_TOWLOWER=1 + else + REPLACE_TOWLOWER=0 + fi + fi + fi + AC_SUBST([REPLACE_TOWLOWER]) + + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then + dnl Redefine towlower, towupper in . + : + fi + + dnl We assume that the wctype() and iswctype() functions exist if and only + dnl if the type wctype_t is defined in or in if that + dnl exists. + dnl HP-UX 11.00 declares all these in and lacks . + AC_CACHE_CHECK([for wctype_t], [gl_cv_type_wctype_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #if HAVE_WCTYPE_H + # include + #endif + wctype_t a; + ]], + [[]])], + [gl_cv_type_wctype_t=yes], + [gl_cv_type_wctype_t=no]) + ]) + if test $gl_cv_type_wctype_t = no; then + HAVE_WCTYPE_T=0 + fi + + dnl We assume that the wctrans() and towctrans() functions exist if and only + dnl if the type wctrans_t is defined in . + AC_CACHE_CHECK([for wctrans_t], [gl_cv_type_wctrans_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[/* Tru64 with Desktop Toolkit C has a bug: must be + included before . + BSD/OS 4.0.1 has a bug: , and + must be included before . */ + #include + #include + #include + #include + #include + wctrans_t a; + ]], + [[]])], + [gl_cv_type_wctrans_t=yes], + [gl_cv_type_wctrans_t=no]) + ]) + if test $gl_cv_type_wctrans_t = no; then + HAVE_WCTRANS_T=0 + fi + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +# include +#endif +#include + ]], + [wctype iswctype wctrans towctrans + ]) +]) + +AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) +]) + +AC_DEFUN([gl_WCTYPE_H_DEFAULTS], +[ + GNULIB_ISWBLANK=0; AC_SUBST([GNULIB_ISWBLANK]) + GNULIB_WCTYPE=0; AC_SUBST([GNULIB_WCTYPE]) + GNULIB_ISWCTYPE=0; AC_SUBST([GNULIB_ISWCTYPE]) + GNULIB_WCTRANS=0; AC_SUBST([GNULIB_WCTRANS]) + GNULIB_TOWCTRANS=0; AC_SUBST([GNULIB_TOWCTRANS]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_ISWBLANK=1; AC_SUBST([HAVE_ISWBLANK]) + HAVE_WCTYPE_T=1; AC_SUBST([HAVE_WCTYPE_T]) + HAVE_WCTRANS_T=1; AC_SUBST([HAVE_WCTRANS_T]) + REPLACE_ISWBLANK=0; AC_SUBST([REPLACE_ISWBLANK]) +]) diff --git a/gl/m4/wcwidth.m4 b/gl/m4/wcwidth.m4 new file mode 100644 index 0000000..f00a6cc --- /dev/null +++ b/gl/m4/wcwidth.m4 @@ -0,0 +1,101 @@ +# wcwidth.m4 serial 23 +dnl Copyright (C) 2006-2014 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_WCWIDTH], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Persuade glibc to declare wcwidth(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WINT_T]) + + AC_CHECK_HEADERS_ONCE([wchar.h]) + AC_CHECK_FUNCS_ONCE([wcwidth]) + + AC_CHECK_DECLS([wcwidth], [], [], [[ +/* AIX 3.2.5 declares wcwidth in . */ +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include +]]) + if test $ac_cv_have_decl_wcwidth != yes; then + HAVE_DECL_WCWIDTH=0 + fi + + if test $ac_cv_func_wcwidth = yes; then + HAVE_WCWIDTH=1 + dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. + dnl On OpenBSD 5.0, wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1. + dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1. + dnl This leads to bugs in 'ls' (coreutils). + AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales], + [gl_cv_func_wcwidth_works], + [ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ +#include +/* AIX 3.2.5 declares wcwidth in . */ +#include +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include +#if !HAVE_DECL_WCWIDTH +extern +# ifdef __cplusplus +"C" +# endif +int wcwidth (int); +#endif +int main () +{ + int result = 0; + if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL) + { + if (wcwidth (0x0301) > 0) + result |= 1; + if (wcwidth (0x05B0) > 0) + result |= 2; + if (wcwidth (0x200B) > 0) + result |= 4; + } + return result; +}]])], + [gl_cv_func_wcwidth_works=yes], + [gl_cv_func_wcwidth_works=no], + [ +changequote(,)dnl + case "$host_os" in + # Guess yes on glibc and AIX 7 systems. + *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; + *) gl_cv_func_wcwidth_works="guessing no";; + esac +changequote([,])dnl + ]) + ]) + case "$gl_cv_func_wcwidth_works" in + *yes) ;; + *no) REPLACE_WCWIDTH=1 ;; + esac + else + HAVE_WCWIDTH=0 + fi + dnl We don't substitute HAVE_WCWIDTH. We assume that if the system does not + dnl have the wcwidth function, then it does not declare it. +]) diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4 new file mode 100644 index 0000000..9b07b07 --- /dev/null +++ b/gl/m4/wint_t.m4 @@ -0,0 +1,32 @@ +# wint_t.m4 serial 5 (gettext-0.18.2) +dnl Copyright (C) 2003, 2007-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. +dnl Test whether has the 'wint_t' type. +dnl Prerequisite: AC_PROG_CC + +AC_DEFUN([gt_TYPE_WINT_T], +[ + AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include + wint_t foo = (wchar_t)'\0';]], + [[]])], + [gt_cv_c_wint_t=yes], + [gt_cv_c_wint_t=no])]) + if test $gt_cv_c_wint_t = yes; then + AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) + fi +]) diff --git a/gl/m4/xalloc.m4 b/gl/m4/xalloc.m4 new file mode 100644 index 0000000..b6a2257 --- /dev/null +++ b/gl/m4/xalloc.m4 @@ -0,0 +1,7 @@ +# xalloc.m4 serial 18 +dnl Copyright (C) 2002-2006, 2009-2014 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_XALLOC], [:]) diff --git a/gl/m4/xgetcwd.m4 b/gl/m4/xgetcwd.m4 new file mode 100644 index 0000000..c6057fd --- /dev/null +++ b/gl/m4/xgetcwd.m4 @@ -0,0 +1,10 @@ +#serial 8 +dnl Copyright (C) 2002-2006, 2009-2014 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_XGETCWD], +[ + : +]) diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4 new file mode 100644 index 0000000..3af23ec --- /dev/null +++ b/gl/m4/xsize.m4 @@ -0,0 +1,12 @@ +# xsize.m4 serial 5 +dnl Copyright (C) 2003-2004, 2008-2014 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_XSIZE], +[ + dnl Prerequisites of lib/xsize.h. + AC_REQUIRE([gl_SIZE_MAX]) + AC_CHECK_HEADERS([stdint.h]) +]) diff --git a/gl/m4/xstrndup.m4 b/gl/m4/xstrndup.m4 new file mode 100644 index 0000000..8521f0e --- /dev/null +++ b/gl/m4/xstrndup.m4 @@ -0,0 +1,15 @@ +# xstrndup.m4 serial 2 +dnl Copyright (C) 2003, 2009-2014 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_XSTRNDUP], +[ + gl_PREREQ_XSTRNDUP +]) + +# Prerequisites of lib/xstrndup.c. +AC_DEFUN([gl_PREREQ_XSTRNDUP], [ + : +]) diff --git a/gl/m4/xstrtod.m4 b/gl/m4/xstrtod.m4 new file mode 100644 index 0000000..94d1c45 --- /dev/null +++ b/gl/m4/xstrtod.m4 @@ -0,0 +1,18 @@ +#serial 8 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +# Prerequisites of lib/xstrtod.c. +AC_DEFUN([gl_XSTRTOD], +[ + : +]) + +# Prerequisites of lib/xstrtold.c. +AC_DEFUN([gl_XSTRTOLD], +[ + : +]) diff --git a/gl/m4/xstrtol.m4 b/gl/m4/xstrtol.m4 new file mode 100644 index 0000000..03419d8 --- /dev/null +++ b/gl/m4/xstrtol.m4 @@ -0,0 +1,10 @@ +#serial 11 +dnl Copyright (C) 2002-2007, 2009-2014 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_XSTRTOL], +[ + : +]) diff --git a/gl/m4/yesno.m4 b/gl/m4/yesno.m4 new file mode 100644 index 0000000..89fdbf2 --- /dev/null +++ b/gl/m4/yesno.m4 @@ -0,0 +1,12 @@ +# yesno.m4 serial 6 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2014 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, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_YESNO], +[ + dnl No prerequisites of lib/yesno.c. + : +]) diff --git a/gl/m4/yield.m4 b/gl/m4/yield.m4 new file mode 100644 index 0000000..e9442a6 --- /dev/null +++ b/gl/m4/yield.m4 @@ -0,0 +1,19 @@ +# yield.m4 serial 2 +dnl Copyright (C) 2005-2014 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_YIELD], +[ + AC_REQUIRE([gl_THREADLIB]) + dnl On some systems, sched_yield is in librt, rather than in libpthread. + YIELD_LIB= + if test $gl_threads_api = posix; then + dnl Solaris has sched_yield in librt, not in libpthread or libc. + AC_CHECK_LIB([rt], [sched_yield], [YIELD_LIB=-lrt], + [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt. + AC_CHECK_LIB([posix4], [sched_yield], [YIELD_LIB=-lposix4])]) + fi + AC_SUBST([YIELD_LIB]) +]) diff --git a/gnulib/Makefile.in b/gnulib/Makefile.in deleted file mode 100644 index 4212c6a..0000000 --- a/gnulib/Makefile.in +++ /dev/null @@ -1,1551 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in 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 program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = gnulib -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ - $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ - $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -pkglibexecdir = @pkglibexecdir@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -AMTAR = @AMTAR@ -APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUXDIR = @AUXDIR@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CONFIG_INCLUDE = @CONFIG_INCLUDE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFAULT_ARG_SIZE = @DEFAULT_ARG_SIZE@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FINDLIBOBJS = @FINDLIBOBJS@ -FINDLIBS = @FINDLIBS@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC21 = @GLIBC21@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GNULIB_ACOSL = @GNULIB_ACOSL@ -GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ -GNULIB_ASINL = @GNULIB_ASINL@ -GNULIB_ATANL = @GNULIB_ATANL@ -GNULIB_ATOLL = @GNULIB_ATOLL@ -GNULIB_BTOWC = @GNULIB_BTOWC@ -GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ -GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ -GNULIB_CEIL = @GNULIB_CEIL@ -GNULIB_CEILF = @GNULIB_CEILF@ -GNULIB_CEILL = @GNULIB_CEILL@ -GNULIB_CHOWN = @GNULIB_CHOWN@ -GNULIB_CLOSE = @GNULIB_CLOSE@ -GNULIB_COSL = @GNULIB_COSL@ -GNULIB_DIRFD = @GNULIB_DIRFD@ -GNULIB_DPRINTF = @GNULIB_DPRINTF@ -GNULIB_DUP2 = @GNULIB_DUP2@ -GNULIB_DUP3 = @GNULIB_DUP3@ -GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_EXPL = @GNULIB_EXPL@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ -GNULIB_FFLUSH = @GNULIB_FFLUSH@ -GNULIB_FLOOR = @GNULIB_FLOOR@ -GNULIB_FLOORF = @GNULIB_FLOORF@ -GNULIB_FLOORL = @GNULIB_FLOORL@ -GNULIB_FOPEN = @GNULIB_FOPEN@ -GNULIB_FPRINTF = @GNULIB_FPRINTF@ -GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ -GNULIB_FPURGE = @GNULIB_FPURGE@ -GNULIB_FPUTC = @GNULIB_FPUTC@ -GNULIB_FPUTS = @GNULIB_FPUTS@ -GNULIB_FREOPEN = @GNULIB_FREOPEN@ -GNULIB_FREXP = @GNULIB_FREXP@ -GNULIB_FREXPL = @GNULIB_FREXPL@ -GNULIB_FSEEK = @GNULIB_FSEEK@ -GNULIB_FSEEKO = @GNULIB_FSEEKO@ -GNULIB_FSTATAT = @GNULIB_FSTATAT@ -GNULIB_FSYNC = @GNULIB_FSYNC@ -GNULIB_FTELL = @GNULIB_FTELL@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ -GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ -GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ -GNULIB_GRANTPT = @GNULIB_GRANTPT@ -GNULIB_IMAXABS = @GNULIB_IMAXABS@ -GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ -GNULIB_ISBLANK = @GNULIB_ISBLANK@ -GNULIB_ISFINITE = @GNULIB_ISFINITE@ -GNULIB_ISINF = @GNULIB_ISINF@ -GNULIB_ISNAN = @GNULIB_ISNAN@ -GNULIB_ISNAND = @GNULIB_ISNAND@ -GNULIB_ISNANF = @GNULIB_ISNANF@ -GNULIB_ISNANL = @GNULIB_ISNANL@ -GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ -GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ -GNULIB_LCHMOD = @GNULIB_LCHMOD@ -GNULIB_LCHOWN = @GNULIB_LCHOWN@ -GNULIB_LDEXPL = @GNULIB_LDEXPL@ -GNULIB_LINK = @GNULIB_LINK@ -GNULIB_LINKAT = @GNULIB_LINKAT@ -GNULIB_LOGB = @GNULIB_LOGB@ -GNULIB_LOGL = @GNULIB_LOGL@ -GNULIB_LSEEK = @GNULIB_LSEEK@ -GNULIB_LSTAT = @GNULIB_LSTAT@ -GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ -GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ -GNULIB_OPEN = @GNULIB_OPEN@ -GNULIB_OPENAT = @GNULIB_OPENAT@ -GNULIB_PERROR = @GNULIB_PERROR@ -GNULIB_PIPE = @GNULIB_PIPE@ -GNULIB_PIPE2 = @GNULIB_PIPE2@ -GNULIB_POPEN = @GNULIB_POPEN@ -GNULIB_PREAD = @GNULIB_PREAD@ -GNULIB_PRINTF = @GNULIB_PRINTF@ -GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ -GNULIB_PTSNAME = @GNULIB_PTSNAME@ -GNULIB_PUTC = @GNULIB_PUTC@ -GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ -GNULIB_PUTENV = @GNULIB_PUTENV@ -GNULIB_PUTS = @GNULIB_PUTS@ -GNULIB_PWRITE = @GNULIB_PWRITE@ -GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ -GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ -GNULIB_READLINK = @GNULIB_READLINK@ -GNULIB_READLINKAT = @GNULIB_READLINKAT@ -GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -GNULIB_RENAME = @GNULIB_RENAME@ -GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ -GNULIB_RMDIR = @GNULIB_RMDIR@ -GNULIB_ROUND = @GNULIB_ROUND@ -GNULIB_ROUNDF = @GNULIB_ROUNDF@ -GNULIB_ROUNDL = @GNULIB_ROUNDL@ -GNULIB_RPMATCH = @GNULIB_RPMATCH@ -GNULIB_SCANDIR = @GNULIB_SCANDIR@ -GNULIB_SETENV = @GNULIB_SETENV@ -GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ -GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ -GNULIB_SINL = @GNULIB_SINL@ -GNULIB_SLEEP = @GNULIB_SLEEP@ -GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ -GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ -GNULIB_SQRTL = @GNULIB_SQRTL@ -GNULIB_STAT = @GNULIB_STAT@ -GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ -GNULIB_STPCPY = @GNULIB_STPCPY@ -GNULIB_STPNCPY = @GNULIB_STPNCPY@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TANL = @GNULIB_TANL@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TRUNC = @GNULIB_TRUNC@ -GNULIB_TRUNCF = @GNULIB_TRUNCF@ -GNULIB_TRUNCL = @GNULIB_TRUNCL@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ACOSL = @HAVE_ACOSL@ -HAVE_ALPHASORT = @HAVE_ALPHASORT@ -HAVE_ASINL = @HAVE_ASINL@ -HAVE_ATANL = @HAVE_ATANL@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ -HAVE_BTOWC = @HAVE_BTOWC@ -HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ -HAVE_CHOWN = @HAVE_CHOWN@ -HAVE_COSL = @HAVE_COSL@ -HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ -HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ -HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ -HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ -HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ -HAVE_DECL_COSL = @HAVE_DECL_COSL@ -HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ -HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ -HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ -HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ -HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ -HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ -HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ -HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ -HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ -HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ -HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ -HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ -HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ -HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ -HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ -HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ -HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ -HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ -HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ -HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ -HAVE_DECL_SINL = @HAVE_DECL_SINL@ -HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ -HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ -HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ -HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ -HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ -HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ -HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ -HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ -HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ -HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ -HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ -HAVE_DECL_TANL = @HAVE_DECL_TANL@ -HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ -HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ -HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ -HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ -HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ -HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_EXPL = @HAVE_EXPL@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -HAVE_FCHDIR = @HAVE_FCHDIR@ -HAVE_FCHMODAT = @HAVE_FCHMODAT@ -HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ -HAVE_FCNTL = @HAVE_FCNTL@ -HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ -HAVE_FEATURES_H = @HAVE_FEATURES_H@ -HAVE_FSEEKO = @HAVE_FSEEKO@ -HAVE_FSTATAT = @HAVE_FSTATAT@ -HAVE_FSYNC = @HAVE_FSYNC@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISNAND = @HAVE_ISNAND@ -HAVE_ISNANF = @HAVE_ISNANF@ -HAVE_ISNANL = @HAVE_ISNANL@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LOGL = @HAVE_LOGL@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ -HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ -HAVE_OPENAT = @HAVE_OPENAT@ -HAVE_OS_H = @HAVE_OS_H@ -HAVE_PIPE = @HAVE_PIPE@ -HAVE_PIPE2 = @HAVE_PIPE2@ -HAVE_PREAD = @HAVE_PREAD@ -HAVE_PTSNAME = @HAVE_PTSNAME@ -HAVE_PWRITE = @HAVE_PWRITE@ -HAVE_RANDOM_H = @HAVE_RANDOM_H@ -HAVE_RANDOM_R = @HAVE_RANDOM_R@ -HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -HAVE_REALPATH = @HAVE_REALPATH@ -HAVE_RENAMEAT = @HAVE_RENAMEAT@ -HAVE_RPMATCH = @HAVE_RPMATCH@ -HAVE_SCANDIR = @HAVE_SCANDIR@ -HAVE_SETENV = @HAVE_SETENV@ -HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ -HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ -HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ -HAVE_SINL = @HAVE_SINL@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_SQRTL = @HAVE_SQRTL@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASECMP = @HAVE_STRCASECMP@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TANL = @HAVE_TANL@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = @INCLUDES@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LDFLAGS = @LDFLAGS@ -LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ -LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ -LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ -LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ -LIB_EACCESS = @LIB_EACCESS@ -LIB_SELINUX = @LIB_SELINUX@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MODF_LIBM = @MODF_LIBM@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ -NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ -NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ -NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_DIRENT_H = @NEXT_DIRENT_H@ -NEXT_ERRNO_H = @NEXT_ERRNO_H@ -NEXT_FCNTL_H = @NEXT_FCNTL_H@ -NEXT_FLOAT_H = @NEXT_FLOAT_H@ -NEXT_GETOPT_H = @NEXT_GETOPT_H@ -NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ -NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -NEXT_LOCALE_H = @NEXT_LOCALE_H@ -NEXT_MATH_H = @NEXT_MATH_H@ -NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ -NEXT_STDARG_H = @NEXT_STDARG_H@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_STRINGS_H = @NEXT_STRINGS_H@ -NEXT_STRING_H = @NEXT_STRING_H@ -NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ -NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ -NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ -NEXT_TIME_H = @NEXT_TIME_H@ -NEXT_UNISTD_H = @NEXT_UNISTD_H@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -POSUB = @POSUB@ -PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ -PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ -PRIPTR_PREFIX = @PRIPTR_PREFIX@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ -PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ -PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ -RANLIB = @RANLIB@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CEIL = @REPLACE_CEIL@ -REPLACE_CEILF = @REPLACE_CEILF@ -REPLACE_CEILL = @REPLACE_CEILL@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -REPLACE_DIRFD = @REPLACE_DIRFD@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FLOOR = @REPLACE_FLOOR@ -REPLACE_FLOORF = @REPLACE_FLOORF@ -REPLACE_FLOORL = @REPLACE_FLOORL@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FREXP = @REPLACE_FREXP@ -REPLACE_FREXPL = @REPLACE_FREXPL@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ -REPLACE_GETLINE = @REPLACE_GETLINE@ -REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ -REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ -REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ -REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ -REPLACE_ISFINITE = @REPLACE_ISFINITE@ -REPLACE_ISINF = @REPLACE_ISINF@ -REPLACE_ISNAN = @REPLACE_ISNAN@ -REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ -REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ -REPLACE_LCHOWN = @REPLACE_LCHOWN@ -REPLACE_LDEXPL = @REPLACE_LDEXPL@ -REPLACE_LINK = @REPLACE_LINK@ -REPLACE_LINKAT = @REPLACE_LINKAT@ -REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ -REPLACE_LSEEK = @REPLACE_LSEEK@ -REPLACE_LSTAT = @REPLACE_LSTAT@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NAN = @REPLACE_NAN@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_OPENDIR = @REPLACE_OPENDIR@ -REPLACE_PERROR = @REPLACE_PERROR@ -REPLACE_POPEN = @REPLACE_POPEN@ -REPLACE_PREAD = @REPLACE_PREAD@ -REPLACE_PRINTF = @REPLACE_PRINTF@ -REPLACE_PUTENV = @REPLACE_PUTENV@ -REPLACE_PWRITE = @REPLACE_PWRITE@ -REPLACE_READLINK = @REPLACE_READLINK@ -REPLACE_REALLOC = @REPLACE_REALLOC@ -REPLACE_REALPATH = @REPLACE_REALPATH@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_ROUND = @REPLACE_ROUND@ -REPLACE_ROUNDF = @REPLACE_ROUNDF@ -REPLACE_ROUNDL = @REPLACE_ROUNDL@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ -REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ -REPLACE_SLEEP = @REPLACE_SLEEP@ -REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ -REPLACE_SPRINTF = @REPLACE_SPRINTF@ -REPLACE_STAT = @REPLACE_STAT@ -REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ -REPLACE_STPNCPY = @REPLACE_STPNCPY@ -REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ -REPLACE_STRDUP = @REPLACE_STRDUP@ -REPLACE_STRERROR = @REPLACE_STRERROR@ -REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_SYMLINK = @REPLACE_SYMLINK@ -REPLACE_TIMEGM = @REPLACE_TIMEGM@ -REPLACE_TMPFILE = @REPLACE_TMPFILE@ -REPLACE_TRUNC = @REPLACE_TRUNC@ -REPLACE_TRUNCF = @REPLACE_TRUNCF@ -REPLACE_TRUNCL = @REPLACE_TRUNCL@ -REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -REPLACE_UNLINK = @REPLACE_UNLINK@ -REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -SORT = @SORT@ -SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ -STDARG_H = @STDARG_H@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ -UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ -UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ -UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ -UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ -UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WARN_CFLAGS = @WARN_CFLAGS@ -WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ -WINT_T_SUFFIX = @WINT_T_SUFFIX@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -YIELD_LIB = @YIELD_LIB@ -abs_aux_dir = @abs_aux_dir@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Copyright (C) 2004, 2009 Free Software Foundation, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Automake, under -# the same distribution terms as the rest of that program. -# -# This file was generated by import-gnulib.sh . -# -SUBDIRS = lib -EXTRA_DIST = m4/gnulib-cache.m4 -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gnulib/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnits gnulib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic ctags \ - ctags-recursive distclean distclean-generic distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ - tags-recursive uninstall uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am deleted file mode 100644 index cbb54d6..0000000 --- a/gnulib/lib/Makefile.am +++ /dev/null @@ -1,3038 +0,0 @@ -## DO NOT EDIT! GENERATED AUTOMATICALLY! -## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2011 Free Software Foundation, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-libtool --macro-prefix=gl alloca areadlinkat argmatch assert c-strcasestr c-strstr canonicalize cloexec closein closeout ctype d-type dirent-safer dirname errno error faccessat fchdir fcntl fdl fdopendir fflush fileblocks filemode fnmatch-gnu fopen-safer fts getdelim getline getopt-gnu gettext gettimeofday gpl-3.0 hash human idcache inline inttypes isblank locale lstat maintainer-makefile malloc math mbrtowc mbscasestr mbsstr mktime modechange modf mountlist open parse-datetime pathmax perror progname quotearg readlink realloc regex rpmatch save-cwd savedir selinux-at snprintf stat stat-macros stat-time stdarg stdbool stddef stdint stdio stdlib stpcpy strcasestr strdup-posix strftime string strtol strtoul strtoull strtoumax sys_stat sys_time sys_wait timespec update-copyright verify version-etc version-etc-fsf warnings wchar wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno - -AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects - -SUBDIRS = -noinst_HEADERS = -noinst_LIBRARIES = -noinst_LTLIBRARIES = -EXTRA_DIST = -BUILT_SOURCES = -SUFFIXES = -MOSTLYCLEANFILES = core *.stackdump -MOSTLYCLEANDIRS = -CLEANFILES = -DISTCLEANFILES = -MAINTAINERCLEANFILES = - -AM_CPPFLAGS = -AM_CFLAGS = - -noinst_LIBRARIES += libgnulib.a - -libgnulib_a_SOURCES = -libgnulib_a_LIBADD = $(gl_LIBOBJS) -libgnulib_a_DEPENDENCIES = $(gl_LIBOBJS) -EXTRA_libgnulib_a_SOURCES = - -## begin gnulib module alloca - - -EXTRA_DIST += alloca.c - -EXTRA_libgnulib_a_SOURCES += alloca.c - -libgnulib_a_LIBADD += @ALLOCA@ -libgnulib_a_DEPENDENCIES += @ALLOCA@ -## end gnulib module alloca - -## begin gnulib module alloca-opt - -BUILT_SOURCES += $(ALLOCA_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -alloca.h: alloca.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/alloca.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -MOSTLYCLEANFILES += alloca.h alloca.h-t - -EXTRA_DIST += alloca.in.h - -## end gnulib module alloca-opt - -## begin gnulib module areadlink - -libgnulib_a_SOURCES += areadlink.c - -EXTRA_DIST += areadlink.h - -## end gnulib module areadlink - -## begin gnulib module areadlink-with-size - -libgnulib_a_SOURCES += areadlink-with-size.c - -EXTRA_DIST += areadlink.h - -## end gnulib module areadlink-with-size - -## begin gnulib module areadlinkat - -libgnulib_a_SOURCES += areadlinkat.c - -EXTRA_DIST += areadlink.h - -## end gnulib module areadlinkat - -## begin gnulib module arg-nonnull - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += arg-nonnull.h -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/arg-nonnull.h, except that it has the copyright header cut off. -arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/build-aux/arg-nonnull.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t - -ARG_NONNULL_H=arg-nonnull.h - -EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h - -## end gnulib module arg-nonnull - -## begin gnulib module argmatch - - -EXTRA_DIST += argmatch.c argmatch.h - -EXTRA_libgnulib_a_SOURCES += argmatch.c - -## end gnulib module argmatch - -## begin gnulib module bitrotate - -libgnulib_a_SOURCES += bitrotate.h - -## end gnulib module bitrotate - -## begin gnulib module btowc - - -EXTRA_DIST += btowc.c - -EXTRA_libgnulib_a_SOURCES += btowc.c - -## end gnulib module btowc - -## begin gnulib module c++defs - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += c++defs.h -# The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/c++defs.h, except that it has the copyright header cut off. -c++defs.h: $(top_srcdir)/build-aux/c++defs.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/build-aux/c++defs.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += c++defs.h c++defs.h-t - -CXXDEFS_H=c++defs.h - -EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h - -## end gnulib module c++defs - -## begin gnulib module c-ctype - -libgnulib_a_SOURCES += c-ctype.h c-ctype.c - -## end gnulib module c-ctype - -## begin gnulib module c-strcase - -libgnulib_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c - -## end gnulib module c-strcase - -## begin gnulib module c-strcasestr - -libgnulib_a_SOURCES += c-strcasestr.h c-strcasestr.c - -EXTRA_DIST += str-two-way.h - -## end gnulib module c-strcasestr - -## begin gnulib module c-strstr - -libgnulib_a_SOURCES += c-strstr.h c-strstr.c - -## end gnulib module c-strstr - -## begin gnulib module canonicalize - - -EXTRA_DIST += canonicalize.c canonicalize.h - -EXTRA_libgnulib_a_SOURCES += canonicalize.c - -## end gnulib module canonicalize - -## begin gnulib module chdir-long - - -EXTRA_DIST += chdir-long.c chdir-long.h - -EXTRA_libgnulib_a_SOURCES += chdir-long.c - -## end gnulib module chdir-long - -## begin gnulib module chown - - -EXTRA_DIST += chown.c fchown-stub.c - -EXTRA_libgnulib_a_SOURCES += chown.c fchown-stub.c - -## end gnulib module chown - -## begin gnulib module cloexec - - -EXTRA_DIST += cloexec.c cloexec.h - -EXTRA_libgnulib_a_SOURCES += cloexec.c - -## end gnulib module cloexec - -## begin gnulib module close - - -EXTRA_DIST += close.c - -EXTRA_libgnulib_a_SOURCES += close.c - -## end gnulib module close - -## begin gnulib module close-hook - -libgnulib_a_SOURCES += close-hook.c - -EXTRA_DIST += close-hook.h - -## end gnulib module close-hook - -## begin gnulib module close-stream - - -EXTRA_DIST += close-stream.c close-stream.h - -EXTRA_libgnulib_a_SOURCES += close-stream.c - -## end gnulib module close-stream - -## begin gnulib module closein - - -EXTRA_DIST += closein.c closein.h - -EXTRA_libgnulib_a_SOURCES += closein.c - -## end gnulib module closein - -## begin gnulib module closeout - - -EXTRA_DIST += closeout.c closeout.h - -EXTRA_libgnulib_a_SOURCES += closeout.c - -## end gnulib module closeout - -## begin gnulib module configmake - -# Listed in the same order as the GNU makefile conventions, and -# provided by autoconf 2.59c+. -# The Automake-defined pkg* macros are appended, in the order -# listed in the Automake 1.10a+ documentation. -configmake.h: Makefile - $(AM_V_GEN)rm -f $@-t && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - echo '#define PREFIX "$(prefix)"'; \ - echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ - echo '#define BINDIR "$(bindir)"'; \ - echo '#define SBINDIR "$(sbindir)"'; \ - echo '#define LIBEXECDIR "$(libexecdir)"'; \ - echo '#define DATAROOTDIR "$(datarootdir)"'; \ - echo '#define DATADIR "$(datadir)"'; \ - echo '#define SYSCONFDIR "$(sysconfdir)"'; \ - echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ - echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ - echo '#define INCLUDEDIR "$(includedir)"'; \ - echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ - echo '#define DOCDIR "$(docdir)"'; \ - echo '#define INFODIR "$(infodir)"'; \ - echo '#define HTMLDIR "$(htmldir)"'; \ - echo '#define DVIDIR "$(dvidir)"'; \ - echo '#define PDFDIR "$(pdfdir)"'; \ - echo '#define PSDIR "$(psdir)"'; \ - echo '#define LIBDIR "$(libdir)"'; \ - echo '#define LISPDIR "$(lispdir)"'; \ - echo '#define LOCALEDIR "$(localedir)"'; \ - echo '#define MANDIR "$(mandir)"'; \ - echo '#define MANEXT "$(manext)"'; \ - echo '#define PKGDATADIR "$(pkgdatadir)"'; \ - echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ - echo '#define PKGLIBDIR "$(pkglibdir)"'; \ - echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ - } | sed '/""/d' > $@-t && \ - if test -f $@ && cmp $@-t $@ > /dev/null; then \ - rm -f $@-t; \ - else \ - rm -f $@; mv $@-t $@; \ - fi - -BUILT_SOURCES += configmake.h -CLEANFILES += configmake.h configmake.h-t - -## end gnulib module configmake - -## begin gnulib module ctype - -BUILT_SOURCES += ctype.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -ctype.h: ctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ - -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ - -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/ctype.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += ctype.h ctype.h-t - -EXTRA_DIST += ctype.in.h - -## end gnulib module ctype - -## begin gnulib module cycle-check - - -EXTRA_DIST += cycle-check.c cycle-check.h - -EXTRA_libgnulib_a_SOURCES += cycle-check.c - -## end gnulib module cycle-check - -## begin gnulib module dev-ino - - -EXTRA_DIST += dev-ino.h - -## end gnulib module dev-ino - -## begin gnulib module dirent - -BUILT_SOURCES += dirent.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -dirent.h: dirent.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ - -e 's|@''GNULIB_DIRFD''@|$(GNULIB_DIRFD)|g' \ - -e 's|@''GNULIB_FDOPENDIR''@|$(GNULIB_FDOPENDIR)|g' \ - -e 's|@''GNULIB_SCANDIR''@|$(GNULIB_SCANDIR)|g' \ - -e 's|@''GNULIB_ALPHASORT''@|$(GNULIB_ALPHASORT)|g' \ - -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \ - -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \ - -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \ - -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \ - -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \ - -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \ - -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \ - -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \ - -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/dirent.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += dirent.h dirent.h-t - -EXTRA_DIST += dirent.in.h - -## end gnulib module dirent - -## begin gnulib module dirent-safer - - -EXTRA_DIST += dirent--.h dirent-safer.h opendir-safer.c - -EXTRA_libgnulib_a_SOURCES += opendir-safer.c - -## end gnulib module dirent-safer - -## begin gnulib module dirfd - - -EXTRA_DIST += dirfd.c - -EXTRA_libgnulib_a_SOURCES += dirfd.c - -## end gnulib module dirfd - -## begin gnulib module dirname - - -EXTRA_DIST += basename.c dirname.c stripslash.c - -EXTRA_libgnulib_a_SOURCES += basename.c dirname.c stripslash.c - -## end gnulib module dirname - -## begin gnulib module dirname-lgpl - - -EXTRA_DIST += basename-lgpl.c dirname-lgpl.c dirname.h stripslash.c - -EXTRA_libgnulib_a_SOURCES += basename-lgpl.c dirname-lgpl.c stripslash.c - -## end gnulib module dirname-lgpl - -## begin gnulib module dosname - - -EXTRA_DIST += dosname.h - -## end gnulib module dosname - -## begin gnulib module dup2 - - -EXTRA_DIST += dup2.c - -EXTRA_libgnulib_a_SOURCES += dup2.c - -## end gnulib module dup2 - -## begin gnulib module errno - -BUILT_SOURCES += $(ERRNO_H) - -# We need the following in order to create when the system -# doesn't have one that is POSIX compliant. -errno.h: errno.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ - -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ - -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ - -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ - -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ - -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ - -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ - < $(srcdir)/errno.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += errno.h errno.h-t - -EXTRA_DIST += errno.in.h - -## end gnulib module errno - -## begin gnulib module error - - -EXTRA_DIST += error.c error.h - -EXTRA_libgnulib_a_SOURCES += error.c - -## end gnulib module error - -## begin gnulib module euidaccess - - -EXTRA_DIST += euidaccess.c - -EXTRA_libgnulib_a_SOURCES += euidaccess.c - -## end gnulib module euidaccess - -## begin gnulib module exitfail - -libgnulib_a_SOURCES += exitfail.c - -EXTRA_DIST += exitfail.h - -## end gnulib module exitfail - -## begin gnulib module faccessat - - -EXTRA_DIST += faccessat.c - -EXTRA_libgnulib_a_SOURCES += faccessat.c - -## end gnulib module faccessat - -## begin gnulib module fchdir - - -EXTRA_DIST += fchdir.c - -EXTRA_libgnulib_a_SOURCES += fchdir.c - -## end gnulib module fchdir - -## begin gnulib module fclose - - -EXTRA_DIST += fclose.c - -EXTRA_libgnulib_a_SOURCES += fclose.c - -## end gnulib module fclose - -## begin gnulib module fcntl - - -EXTRA_DIST += fcntl.c - -EXTRA_libgnulib_a_SOURCES += fcntl.c - -## end gnulib module fcntl - -## begin gnulib module fcntl-h - -BUILT_SOURCES += fcntl.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -fcntl.h: fcntl.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ - -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \ - -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \ - -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \ - -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ - -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ - -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ - -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ - -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/fcntl.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += fcntl.h fcntl.h-t - -EXTRA_DIST += fcntl.in.h - -## end gnulib module fcntl-h - -## begin gnulib module fcntl-safer - - -EXTRA_DIST += creat-safer.c fcntl--.h fcntl-safer.h open-safer.c - -EXTRA_libgnulib_a_SOURCES += creat-safer.c open-safer.c - -## end gnulib module fcntl-safer - -## begin gnulib module fdopendir - - -EXTRA_DIST += fdopendir.c openat-priv.h openat-proc.c - -EXTRA_libgnulib_a_SOURCES += fdopendir.c openat-proc.c - -## end gnulib module fdopendir - -## begin gnulib module fflush - - -EXTRA_DIST += fflush.c stdio-impl.h - -EXTRA_libgnulib_a_SOURCES += fflush.c - -## end gnulib module fflush - -## begin gnulib module file-set - -libgnulib_a_SOURCES += file-set.c - -EXTRA_DIST += file-set.h - -## end gnulib module file-set - -## begin gnulib module fileblocks - - -EXTRA_DIST += fileblocks.c - -EXTRA_libgnulib_a_SOURCES += fileblocks.c - -## end gnulib module fileblocks - -## begin gnulib module filemode - - -EXTRA_DIST += filemode.c filemode.h - -EXTRA_libgnulib_a_SOURCES += filemode.c - -## end gnulib module filemode - -## begin gnulib module float - -BUILT_SOURCES += $(FLOAT_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -float.h: float.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ - < $(srcdir)/float.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += float.h float.h-t - -EXTRA_DIST += float.in.h - -## end gnulib module float - -## begin gnulib module fnmatch - -BUILT_SOURCES += $(FNMATCH_H) - -# We need the following in order to create when the system -# doesn't have one that supports the required API. -fnmatch.h: fnmatch.in.h $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/fnmatch.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t - -EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c - -EXTRA_libgnulib_a_SOURCES += fnmatch.c fnmatch_loop.c - -## end gnulib module fnmatch - -## begin gnulib module fopen - - -EXTRA_DIST += fopen.c - -EXTRA_libgnulib_a_SOURCES += fopen.c - -## end gnulib module fopen - -## begin gnulib module fopen-safer - - -EXTRA_DIST += fopen-safer.c stdio--.h stdio-safer.h - -EXTRA_libgnulib_a_SOURCES += fopen-safer.c - -## end gnulib module fopen-safer - -## begin gnulib module fpending - - -EXTRA_DIST += fpending.c fpending.h - -EXTRA_libgnulib_a_SOURCES += fpending.c - -## end gnulib module fpending - -## begin gnulib module fpurge - - -EXTRA_DIST += fpurge.c stdio-impl.h - -EXTRA_libgnulib_a_SOURCES += fpurge.c - -## end gnulib module fpurge - -## begin gnulib module freadahead - -libgnulib_a_SOURCES += freadahead.c - -EXTRA_DIST += freadahead.h stdio-impl.h - -## end gnulib module freadahead - -## begin gnulib module freading - -libgnulib_a_SOURCES += freading.c - -EXTRA_DIST += freading.h stdio-impl.h - -## end gnulib module freading - -## begin gnulib module fseeko - - -EXTRA_DIST += fseeko.c stdio-impl.h - -EXTRA_libgnulib_a_SOURCES += fseeko.c - -## end gnulib module fseeko - -## begin gnulib module ftello - - -EXTRA_DIST += ftello.c stdio-impl.h - -EXTRA_libgnulib_a_SOURCES += ftello.c - -## end gnulib module ftello - -## begin gnulib module fts - - -EXTRA_DIST += fts-cycle.c fts.c fts_.h - -EXTRA_libgnulib_a_SOURCES += fts-cycle.c fts.c - -## end gnulib module fts - -## begin gnulib module getcwd - - -EXTRA_DIST += getcwd.c - -EXTRA_libgnulib_a_SOURCES += getcwd.c - -## end gnulib module getcwd - -## begin gnulib module getdelim - - -EXTRA_DIST += getdelim.c - -EXTRA_libgnulib_a_SOURCES += getdelim.c - -## end gnulib module getdelim - -## begin gnulib module getdtablesize - - -EXTRA_DIST += getdtablesize.c - -EXTRA_libgnulib_a_SOURCES += getdtablesize.c - -## end gnulib module getdtablesize - -## begin gnulib module getgroups - - -EXTRA_DIST += getgroups.c - -EXTRA_libgnulib_a_SOURCES += getgroups.c - -## end gnulib module getgroups - -## begin gnulib module getline - - -EXTRA_DIST += getline.c - -EXTRA_libgnulib_a_SOURCES += getline.c - -## end gnulib module getline - -## begin gnulib module getopt-posix - -BUILT_SOURCES += $(GETOPT_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -getopt.h: getopt.in.h $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -MOSTLYCLEANFILES += getopt.h getopt.h-t - -EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h - -EXTRA_libgnulib_a_SOURCES += getopt.c getopt1.c - -## end gnulib module getopt-posix - -## begin gnulib module gettext - -# This is for those projects which use "gettextize --intl" to put a source-code -# copy of libintl into their package. In such projects, every Makefile.am needs -# -I$(top_builddir)/intl, so that can be found in this directory. -# For the Makefile.ams in other directories it is the maintainer's -# responsibility; for the one from gnulib we do it here. -# This option has no effect when the user disables NLS (because then the intl -# directory contains no libintl.h file) or when the project does not use -# "gettextize --intl". -AM_CPPFLAGS += -I$(top_builddir)/intl - -EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath - -## end gnulib module gettext - -## begin gnulib module gettext-h - -libgnulib_a_SOURCES += gettext.h - -## end gnulib module gettext-h - -## begin gnulib module gettime - - -EXTRA_DIST += gettime.c - -EXTRA_libgnulib_a_SOURCES += gettime.c - -## end gnulib module gettime - -## begin gnulib module gettimeofday - - -EXTRA_DIST += gettimeofday.c - -EXTRA_libgnulib_a_SOURCES += gettimeofday.c - -## end gnulib module gettimeofday - -## begin gnulib module gnumakefile - -distclean-local: clean-GNUmakefile -clean-GNUmakefile: - test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || : - -EXTRA_DIST += $(top_srcdir)/GNUmakefile - -## end gnulib module gnumakefile - -## begin gnulib module group-member - - -EXTRA_DIST += group-member.c group-member.h - -EXTRA_libgnulib_a_SOURCES += group-member.c - -## end gnulib module group-member - -## begin gnulib module hash - - -EXTRA_DIST += hash.c hash.h - -EXTRA_libgnulib_a_SOURCES += hash.c - -## end gnulib module hash - -## begin gnulib module hash-pjw - -libgnulib_a_SOURCES += hash-pjw.h hash-pjw.c - -## end gnulib module hash-pjw - -## begin gnulib module hash-triple - -libgnulib_a_SOURCES += hash-triple.c - -EXTRA_DIST += hash-triple.h - -## end gnulib module hash-triple - -## begin gnulib module havelib - - -EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath - -## end gnulib module havelib - -## begin gnulib module human - - -EXTRA_DIST += human.c human.h - -EXTRA_libgnulib_a_SOURCES += human.c - -## end gnulib module human - -## begin gnulib module i-ring - - -EXTRA_DIST += i-ring.c i-ring.h - -EXTRA_libgnulib_a_SOURCES += i-ring.c - -## end gnulib module i-ring - -## begin gnulib module idcache - - -EXTRA_DIST += idcache.c idcache.h - -EXTRA_libgnulib_a_SOURCES += idcache.c - -## end gnulib module idcache - -## begin gnulib module intprops - - -EXTRA_DIST += intprops.h - -## end gnulib module intprops - -## begin gnulib module inttypes - -BUILT_SOURCES += inttypes.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -inttypes.h: inttypes.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ - -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ - -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ - -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ - -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ - -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ - -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ - -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ - -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ - -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ - -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ - -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ - -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ - -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ - -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ - -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/inttypes.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += inttypes.h inttypes.h-t - -EXTRA_DIST += inttypes.in.h - -## end gnulib module inttypes - -## begin gnulib module isblank - - -EXTRA_DIST += isblank.c - -EXTRA_libgnulib_a_SOURCES += isblank.c - -## end gnulib module isblank - -## begin gnulib module iswblank - - -EXTRA_DIST += iswblank.c - -EXTRA_libgnulib_a_SOURCES += iswblank.c - -## end gnulib module iswblank - -## begin gnulib module langinfo - -BUILT_SOURCES += langinfo.h - -# We need the following in order to create an empty placeholder for -# when the system doesn't have one. -langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ - -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \ - -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ - -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ - -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ - -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ - -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ - -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/langinfo.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += langinfo.h langinfo.h-t - -EXTRA_DIST += langinfo.in.h - -## end gnulib module langinfo - -## begin gnulib module lchown - - -EXTRA_DIST += lchown.c - -EXTRA_libgnulib_a_SOURCES += lchown.c - -## end gnulib module lchown - -## begin gnulib module localcharset - -libgnulib_a_SOURCES += localcharset.h localcharset.c - -# We need the following in order to install a simple file in $(libdir) -# which is shared with other installed packages. We use a list of referencing -# packages so that "make uninstall" will remove the file if and only if it -# is not used by another installed package. -# On systems with glibc-2.1 or newer, the file is redundant, therefore we -# avoid installing it. - -all-local: charset.alias ref-add.sed ref-del.sed - -charset_alias = $(DESTDIR)$(libdir)/charset.alias -charset_tmp = $(DESTDIR)$(libdir)/charset.tmp -install-exec-local: install-exec-localcharset -install-exec-localcharset: all-local - if test $(GLIBC21) = no; then \ - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ - esac ; \ - else \ - need_charset_alias=false ; \ - fi ; \ - if $$need_charset_alias; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ - fi ; \ - if test -f $(charset_alias); then \ - sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - else \ - if $$need_charset_alias; then \ - sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - fi ; \ - fi - -uninstall-local: uninstall-localcharset -uninstall-localcharset: all-local - if test -f $(charset_alias); then \ - sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ - if grep '^# Packages using this file: $$' $(charset_tmp) \ - > /dev/null; then \ - rm -f $(charset_alias); \ - else \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ - fi; \ - rm -f $(charset_tmp); \ - fi - -charset.alias: config.charset - $(AM_V_GEN)rm -f t-$@ $@ && \ - $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ - mv t-$@ $@ - -SUFFIXES += .sed .sin -.sin.sed: - $(AM_V_GEN)rm -f t-$@ $@ && \ - sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ - mv t-$@ $@ - -CLEANFILES += charset.alias ref-add.sed ref-del.sed - -EXTRA_DIST += config.charset ref-add.sin ref-del.sin - -## end gnulib module localcharset - -## begin gnulib module locale - -BUILT_SOURCES += locale.h - -# We need the following in order to create when the system -# doesn't have one that provides all definitions. -locale.h: locale.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ - -e 's|@''GNULIB_SETLOCALE''@|$(GNULIB_SETLOCALE)|g' \ - -e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \ - -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ - -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ - -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ - -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/locale.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += locale.h locale.h-t - -EXTRA_DIST += locale.in.h - -## end gnulib module locale - -## begin gnulib module lseek - - -EXTRA_DIST += lseek.c - -EXTRA_libgnulib_a_SOURCES += lseek.c - -## end gnulib module lseek - -## begin gnulib module lstat - - -EXTRA_DIST += lstat.c - -EXTRA_libgnulib_a_SOURCES += lstat.c - -## end gnulib module lstat - -## begin gnulib module maintainer-makefile - -EXTRA_DIST += $(top_srcdir)/maint.mk - -## end gnulib module maintainer-makefile - -## begin gnulib module malloc-gnu - - -EXTRA_DIST += malloc.c - -EXTRA_libgnulib_a_SOURCES += malloc.c - -## end gnulib module malloc-gnu - -## begin gnulib module malloc-posix - - -EXTRA_DIST += malloc.c - -EXTRA_libgnulib_a_SOURCES += malloc.c - -## end gnulib module malloc-posix - -## begin gnulib module malloca - -libgnulib_a_SOURCES += malloca.c - -EXTRA_DIST += malloca.h malloca.valgrind - -## end gnulib module malloca - -## begin gnulib module math - -BUILT_SOURCES += math.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ - -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \ - -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \ - -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \ - -e 's|@''GNULIB_CEIL''@|$(GNULIB_CEIL)|g' \ - -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \ - -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \ - -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \ - -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \ - -e 's|@''GNULIB_FLOOR''@|$(GNULIB_FLOOR)|g' \ - -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \ - -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \ - -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \ - -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \ - -e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \ - -e 's|@''GNULIB_ISINF''@|$(GNULIB_ISINF)|g' \ - -e 's|@''GNULIB_ISNAN''@|$(GNULIB_ISNAN)|g' \ - -e 's|@''GNULIB_ISNANF''@|$(GNULIB_ISNANF)|g' \ - -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \ - -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \ - -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \ - -e 's|@''GNULIB_LOGB''@|$(GNULIB_LOGB)|g' \ - -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \ - -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \ - -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \ - -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \ - -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \ - -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \ - -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \ - -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \ - -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \ - -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \ - -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \ - < $(srcdir)/math.in.h | \ - sed -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ - -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \ - -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \ - -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ - -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ - -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \ - -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \ - -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \ - -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \ - -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \ - -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \ - -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \ - -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ - -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ - -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ - -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \ - -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \ - -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ - -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ - -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \ - -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \ - -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ - -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ - -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \ - -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ - -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \ - -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \ - -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \ - -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ - -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ - -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ - -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \ - -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ - -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \ - | \ - sed -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \ - -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ - -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ - -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \ - -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \ - -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \ - -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \ - -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \ - -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \ - -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ - -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ - -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ - -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \ - -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \ - -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \ - -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \ - -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ - -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ - -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ - -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \ - -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \ - -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += math.h math.h-t - -EXTRA_DIST += math.in.h - -## end gnulib module math - -## begin gnulib module mbchar - -libgnulib_a_SOURCES += mbchar.c - -EXTRA_DIST += mbchar.h - -## end gnulib module mbchar - -## begin gnulib module mbrtowc - - -EXTRA_DIST += mbrtowc.c - -EXTRA_libgnulib_a_SOURCES += mbrtowc.c - -## end gnulib module mbrtowc - -## begin gnulib module mbscasestr - -libgnulib_a_SOURCES += mbscasestr.c - -EXTRA_DIST += str-kmp.h - -## end gnulib module mbscasestr - -## begin gnulib module mbsinit - - -EXTRA_DIST += mbsinit.c - -EXTRA_libgnulib_a_SOURCES += mbsinit.c - -## end gnulib module mbsinit - -## begin gnulib module mbslen - -libgnulib_a_SOURCES += mbslen.c - -## end gnulib module mbslen - -## begin gnulib module mbsrtowcs - - -EXTRA_DIST += mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c - -EXTRA_libgnulib_a_SOURCES += mbsrtowcs-state.c mbsrtowcs.c - -## end gnulib module mbsrtowcs - -## begin gnulib module mbsstr - -libgnulib_a_SOURCES += mbsstr.c - -EXTRA_DIST += str-kmp.h - -## end gnulib module mbsstr - -## begin gnulib module mbtowc - - -EXTRA_DIST += mbtowc-impl.h mbtowc.c - -EXTRA_libgnulib_a_SOURCES += mbtowc.c - -## end gnulib module mbtowc - -## begin gnulib module mbuiter - -libgnulib_a_SOURCES += mbuiter.h - -## end gnulib module mbuiter - -## begin gnulib module memchr - - -EXTRA_DIST += memchr.c memchr.valgrind - -EXTRA_libgnulib_a_SOURCES += memchr.c - -## end gnulib module memchr - -## begin gnulib module mempcpy - - -EXTRA_DIST += mempcpy.c - -EXTRA_libgnulib_a_SOURCES += mempcpy.c - -## end gnulib module mempcpy - -## begin gnulib module memrchr - - -EXTRA_DIST += memrchr.c - -EXTRA_libgnulib_a_SOURCES += memrchr.c - -## end gnulib module memrchr - -## begin gnulib module mkdir - - -EXTRA_DIST += mkdir.c - -EXTRA_libgnulib_a_SOURCES += mkdir.c - -## end gnulib module mkdir - -## begin gnulib module mktime - - -EXTRA_DIST += mktime-internal.h mktime.c - -EXTRA_libgnulib_a_SOURCES += mktime.c - -## end gnulib module mktime - -## begin gnulib module modechange - - -EXTRA_DIST += modechange.c modechange.h - -EXTRA_libgnulib_a_SOURCES += modechange.c - -## end gnulib module modechange - -## begin gnulib module mountlist - - -EXTRA_DIST += mountlist.c mountlist.h - -EXTRA_libgnulib_a_SOURCES += mountlist.c - -## end gnulib module mountlist - -## begin gnulib module nl_langinfo - - -EXTRA_DIST += nl_langinfo.c - -EXTRA_libgnulib_a_SOURCES += nl_langinfo.c - -## end gnulib module nl_langinfo - -## begin gnulib module open - - -EXTRA_DIST += open.c - -EXTRA_libgnulib_a_SOURCES += open.c - -## end gnulib module open - -## begin gnulib module openat - - -EXTRA_DIST += at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c openat-priv.h openat-proc.c openat.c openat.h unlinkat.c - -EXTRA_libgnulib_a_SOURCES += at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c openat-proc.c openat.c unlinkat.c - -## end gnulib module openat - -## begin gnulib module openat-die - -libgnulib_a_SOURCES += openat-die.c - -## end gnulib module openat-die - -## begin gnulib module openat-safer - - -EXTRA_DIST += fcntl--.h fcntl-safer.h openat-safer.c - -EXTRA_libgnulib_a_SOURCES += openat-safer.c - -## end gnulib module openat-safer - -## begin gnulib module parse-datetime - -# This rule overrides the Automake generated .y.c rule, to ensure that the -# parse-datetime.c file gets generated in the source directory, not in the -# build directory. -parse-datetime.c: parse-datetime.y - $(AM_V_GEN)$(SHELL) $(YLWRAP) $(srcdir)/parse-datetime.y \ - y.tab.c parse-datetime.c \ - y.tab.h parse-datetime.h \ - y.output parse-datetime.output \ - -- $(YACC) $(YFLAGS) $(AM_YFLAGS) && \ - mv parse-datetime.c parse-datetime.c-t && \ - mv parse-datetime.c-t $(srcdir)/parse-datetime.c -libgnulib_a_SOURCES += parse-datetime.y -BUILT_SOURCES += parse-datetime.c -MOSTLYCLEANFILES += parse-datetime.c-t -MAINTAINERCLEANFILES += parse-datetime.c -EXTRA_DIST += parse-datetime.c - -EXTRA_DIST += parse-datetime.h - -## end gnulib module parse-datetime - -## begin gnulib module pathmax - - -EXTRA_DIST += pathmax.h - -## end gnulib module pathmax - -## begin gnulib module perror - - -EXTRA_DIST += perror.c - -EXTRA_libgnulib_a_SOURCES += perror.c - -## end gnulib module perror - -## begin gnulib module progname - -libgnulib_a_SOURCES += progname.h progname.c - -## end gnulib module progname - -## begin gnulib module quote - - -EXTRA_DIST += quote.c quote.h - -EXTRA_libgnulib_a_SOURCES += quote.c - -## end gnulib module quote - -## begin gnulib module quotearg - - -EXTRA_DIST += quotearg.c quotearg.h - -EXTRA_libgnulib_a_SOURCES += quotearg.c - -## end gnulib module quotearg - -## begin gnulib module readlink - - -EXTRA_DIST += readlink.c - -EXTRA_libgnulib_a_SOURCES += readlink.c - -## end gnulib module readlink - -## begin gnulib module readlinkat - - -EXTRA_DIST += readlinkat.c - -EXTRA_libgnulib_a_SOURCES += readlinkat.c - -## end gnulib module readlinkat - -## begin gnulib module realloc-gnu - - -EXTRA_DIST += realloc.c - -EXTRA_libgnulib_a_SOURCES += realloc.c - -## end gnulib module realloc-gnu - -## begin gnulib module realloc-posix - - -EXTRA_DIST += realloc.c - -EXTRA_libgnulib_a_SOURCES += realloc.c - -## end gnulib module realloc-posix - -## begin gnulib module regex - - -EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c - -EXTRA_libgnulib_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c - -## end gnulib module regex - -## begin gnulib module rmdir - - -EXTRA_DIST += rmdir.c - -EXTRA_libgnulib_a_SOURCES += rmdir.c - -## end gnulib module rmdir - -## begin gnulib module rpmatch - - -EXTRA_DIST += rpmatch.c - -EXTRA_libgnulib_a_SOURCES += rpmatch.c - -## end gnulib module rpmatch - -## begin gnulib module same - - -EXTRA_DIST += same.c same.h - -EXTRA_libgnulib_a_SOURCES += same.c - -## end gnulib module same - -## begin gnulib module same-inode - - -EXTRA_DIST += same-inode.h - -## end gnulib module same-inode - -## begin gnulib module save-cwd - - -EXTRA_DIST += save-cwd.c save-cwd.h - -EXTRA_libgnulib_a_SOURCES += save-cwd.c - -## end gnulib module save-cwd - -## begin gnulib module savedir - - -EXTRA_DIST += savedir.c savedir.h - -EXTRA_libgnulib_a_SOURCES += savedir.c - -## end gnulib module savedir - -## begin gnulib module selinux-at - - -EXTRA_DIST += selinux-at.c selinux-at.h - -EXTRA_libgnulib_a_SOURCES += selinux-at.c - -## end gnulib module selinux-at - -## begin gnulib module selinux-h - -libgnulib_a_SOURCES += se-context.in.h se-selinux.in.h - -BUILT_SOURCES += selinux/selinux.h -selinux/selinux.h: se-selinux.in.h $(UNUSED_PARAMETER_H) - $(AM_V_at)$(MKDIR_P) selinux - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \ - -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ - < $(srcdir)/se-selinux.in.h; \ - } > $@-t && \ - chmod a-x $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t - -BUILT_SOURCES += $(SELINUX_CONTEXT_H) -selinux/context.h: se-context.in.h $(UNUSED_PARAMETER_H) - $(AM_V_at)$(MKDIR_P) selinux - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ - < $(srcdir)/se-context.in.h; \ - } > $@-t && \ - chmod a-x $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += selinux/context.h selinux/context.h-t -MOSTLYCLEANDIRS += selinux - -EXTRA_DIST += getfilecon.c - -EXTRA_libgnulib_a_SOURCES += getfilecon.c - -## end gnulib module selinux-h - -## begin gnulib module setenv - - -EXTRA_DIST += setenv.c - -EXTRA_libgnulib_a_SOURCES += setenv.c - -## end gnulib module setenv - -## begin gnulib module size_max - -libgnulib_a_SOURCES += size_max.h - -## end gnulib module size_max - -## begin gnulib module snprintf - - -EXTRA_DIST += snprintf.c - -EXTRA_libgnulib_a_SOURCES += snprintf.c - -## end gnulib module snprintf - -## begin gnulib module stat - - -EXTRA_DIST += stat.c - -EXTRA_libgnulib_a_SOURCES += stat.c - -## end gnulib module stat - -## begin gnulib module stat-macros - - -EXTRA_DIST += stat-macros.h - -## end gnulib module stat-macros - -## begin gnulib module stat-time - - -EXTRA_DIST += stat-time.h - -## end gnulib module stat-time - -## begin gnulib module stdarg - -BUILT_SOURCES += $(STDARG_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdarg.h: stdarg.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ - < $(srcdir)/stdarg.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdarg.h stdarg.h-t - -EXTRA_DIST += stdarg.in.h - -## end gnulib module stdarg - -## begin gnulib module stdbool - -BUILT_SOURCES += $(STDBOOL_H) - -# We need the following in order to create when the system -# doesn't have one that works. -stdbool.h: stdbool.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdbool.h stdbool.h-t - -EXTRA_DIST += stdbool.in.h - -## end gnulib module stdbool - -## begin gnulib module stddef - -BUILT_SOURCES += $(STDDEF_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stddef.h: stddef.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ - -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ - -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ - < $(srcdir)/stddef.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stddef.h stddef.h-t - -EXTRA_DIST += stddef.in.h - -## end gnulib module stddef - -## begin gnulib module stdint - -BUILT_SOURCES += $(STDINT_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdint.h: stdint.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ - -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ - -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ - -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ - -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ - -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ - -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ - -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ - -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ - -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ - -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ - -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ - -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ - -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdint.h stdint.h-t - -EXTRA_DIST += stdint.in.h - -## end gnulib module stdint - -## begin gnulib module stdio - -BUILT_SOURCES += stdio.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ - -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ - -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ - -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ - -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ - -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ - -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ - -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ - -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ - -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ - -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ - -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ - -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ - -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ - -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ - -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ - -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ - -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ - -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ - -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ - -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ - -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ - -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ - -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ - -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ - -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ - -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ - -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ - -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ - -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ - -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ - -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ - -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ - -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ - -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ - -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ - -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ - -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ - < $(srcdir)/stdio.in.h | \ - sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ - -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ - -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ - -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ - -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ - -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ - -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ - -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ - -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ - -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ - -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ - -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ - -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ - -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ - -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ - -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ - -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ - -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ - -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ - -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ - -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ - -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ - -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ - -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ - -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ - -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ - -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ - -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ - -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ - -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ - -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ - -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ - -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ - -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ - -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ - -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ - -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ - -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ - -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ - -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ - -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ - -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ - -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ - -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ - -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdio.h stdio.h-t - -EXTRA_DIST += stdio.in.h - -## end gnulib module stdio - -## begin gnulib module stdlib - -BUILT_SOURCES += stdlib.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ - -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \ - -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ - -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ - -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ - -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ - -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \ - -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ - -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \ - -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ - -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ - -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ - -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ - -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ - -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \ - -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ - -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ - -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_SETENV''@|$(GNULIB_SETENV)|g' \ - -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ - -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ - -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ - -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \ - -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \ - -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ - -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \ - < $(srcdir)/stdlib.in.h | \ - sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ - -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ - -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ - -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ - -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ - -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ - -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ - -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ - -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ - -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ - -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_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ - -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ - -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ - -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ - -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ - -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ - -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ - -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ - -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ - -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ - -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ - -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ - -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ - -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ - -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ - -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ - -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ - -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ - -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdlib.h stdlib.h-t - -EXTRA_DIST += stdlib.in.h - -## end gnulib module stdlib - -## begin gnulib module stpcpy - - -EXTRA_DIST += stpcpy.c - -EXTRA_libgnulib_a_SOURCES += stpcpy.c - -## end gnulib module stpcpy - -## begin gnulib module strcase - - -EXTRA_DIST += strcasecmp.c strncasecmp.c - -EXTRA_libgnulib_a_SOURCES += strcasecmp.c strncasecmp.c - -## end gnulib module strcase - -## begin gnulib module strcasestr-simple - - -EXTRA_DIST += str-two-way.h strcasestr.c - -EXTRA_libgnulib_a_SOURCES += strcasestr.c - -## end gnulib module strcasestr-simple - -## begin gnulib module strdup-posix - - -EXTRA_DIST += strdup.c - -EXTRA_libgnulib_a_SOURCES += strdup.c - -## end gnulib module strdup-posix - -## begin gnulib module streq - - -EXTRA_DIST += streq.h - -## end gnulib module streq - -## begin gnulib module strerror - - -EXTRA_DIST += strerror.c - -EXTRA_libgnulib_a_SOURCES += strerror.c - -## end gnulib module strerror - -## begin gnulib module strftime - - -EXTRA_DIST += strftime.c strftime.h - -EXTRA_libgnulib_a_SOURCES += strftime.c - -## end gnulib module strftime - -## begin gnulib module string - -BUILT_SOURCES += string.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ - -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ - -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ - -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ - -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ - -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ - -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ - -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ - -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ - -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ - -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ - -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ - -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ - -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ - -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ - -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ - -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ - -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ - -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ - -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ - -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ - -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ - -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ - -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ - -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \ - -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ - -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ - -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ - -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ - -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ - -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ - -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ - -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ - -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \ - -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ - -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ - < $(srcdir)/string.in.h | \ - sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ - -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ - -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ - -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ - -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ - -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ - -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ - -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ - -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ - -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ - -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ - -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ - -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ - -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ - -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ - -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ - -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ - -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ - -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ - -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ - -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ - -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ - -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ - -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ - -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ - -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ - -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ - -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ - -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ - -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ - -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - < $(srcdir)/string.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += string.h string.h-t - -EXTRA_DIST += string.in.h - -## end gnulib module string - -## begin gnulib module strings - -BUILT_SOURCES += strings.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -strings.h: strings.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ - -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ - -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/strings.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += strings.h strings.h-t - -EXTRA_DIST += strings.in.h - -## end gnulib module strings - -## begin gnulib module strndup - - -EXTRA_DIST += strndup.c - -EXTRA_libgnulib_a_SOURCES += strndup.c - -## end gnulib module strndup - -## begin gnulib module strnlen - - -EXTRA_DIST += strnlen.c - -EXTRA_libgnulib_a_SOURCES += strnlen.c - -## end gnulib module strnlen - -## begin gnulib module strnlen1 - -libgnulib_a_SOURCES += strnlen1.h strnlen1.c - -## end gnulib module strnlen1 - -## begin gnulib module strstr-simple - - -EXTRA_DIST += str-two-way.h strstr.c - -EXTRA_libgnulib_a_SOURCES += strstr.c - -## end gnulib module strstr-simple - -## begin gnulib module strtoimax - - -EXTRA_DIST += strtoimax.c - -EXTRA_libgnulib_a_SOURCES += strtoimax.c - -## end gnulib module strtoimax - -## begin gnulib module strtol - - -EXTRA_DIST += strtol.c - -EXTRA_libgnulib_a_SOURCES += strtol.c - -## end gnulib module strtol - -## begin gnulib module strtoll - - -EXTRA_DIST += strtoll.c - -EXTRA_libgnulib_a_SOURCES += strtoll.c - -## end gnulib module strtoll - -## begin gnulib module strtoul - - -EXTRA_DIST += strtoul.c - -EXTRA_libgnulib_a_SOURCES += strtoul.c - -## end gnulib module strtoul - -## begin gnulib module strtoull - - -EXTRA_DIST += strtoull.c - -EXTRA_libgnulib_a_SOURCES += strtoull.c - -## end gnulib module strtoull - -## begin gnulib module strtoumax - - -EXTRA_DIST += strtoumax.c - -EXTRA_libgnulib_a_SOURCES += strtoumax.c - -## end gnulib module strtoumax - -## begin gnulib module sys_stat - -BUILT_SOURCES += sys/stat.h - -# We need the following in order to create when the system -# has one that is incomplete. -sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ - -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \ - -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \ - -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \ - -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \ - -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \ - -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \ - -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \ - -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \ - -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \ - -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \ - -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \ - -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \ - -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ - -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ - -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ - -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ - -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ - -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ - -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ - -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ - -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ - -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ - -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ - -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ - -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ - -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ - -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ - -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ - -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ - -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ - -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ - -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_stat.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t -MOSTLYCLEANDIRS += sys - -EXTRA_DIST += sys_stat.in.h - -## end gnulib module sys_stat - -## begin gnulib module sys_time - -BUILT_SOURCES += sys/time.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -sys/time.h: sys_time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ - -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ - -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ - -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ - -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_time.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/time.h sys/time.h-t - -EXTRA_DIST += sys_time.in.h - -## end gnulib module sys_time - -## begin gnulib module sys_wait - -BUILT_SOURCES += sys/wait.h - -# We need the following in order to create when the system -# has one that is incomplete. -sys/wait.h: sys_wait.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \ - -e 's|@''GNULIB_WAITPID''@|$(GNULIB_WAITPID)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_wait.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/wait.h sys/wait.h-t -MOSTLYCLEANDIRS += sys - -EXTRA_DIST += sys_wait.in.h - -## end gnulib module sys_wait - -## begin gnulib module time - -BUILT_SOURCES += time.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ - -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \ - -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \ - -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \ - -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \ - -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \ - -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ - -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ - -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ - -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ - -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ - -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ - -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ - -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ - -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/time.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += time.h time.h-t - -EXTRA_DIST += time.in.h - -## end gnulib module time - -## begin gnulib module time_r - - -EXTRA_DIST += time_r.c - -EXTRA_libgnulib_a_SOURCES += time_r.c - -## end gnulib module time_r - -## begin gnulib module timespec - - -EXTRA_DIST += timespec.h - -## end gnulib module timespec - -## begin gnulib module unistd - -BUILT_SOURCES += unistd.h - -# We need the following in order to create an empty placeholder for -# when the system doesn't have one. -unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ - -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ - -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ - -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ - -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ - -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ - -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ - -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ - -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ - -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ - -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ - -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ - -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ - -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ - -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ - -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ - -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ - -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ - -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ - -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ - -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ - -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ - -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ - -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ - -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ - -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \ - -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ - -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ - -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \ - -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ - -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ - -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ - -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ - -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ - -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ - -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \ - -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ - -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ - -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ - -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ - -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ - -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ - < $(srcdir)/unistd.in.h | \ - sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ - -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ - -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ - -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ - -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ - -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ - -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ - -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ - -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ - -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ - -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ - -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ - -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ - -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ - -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ - -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ - -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ - -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ - -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ - -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ - -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ - -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ - -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ - -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ - -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ - -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ - -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ - -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ - -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ - -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ - -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ - -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ - -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ - -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ - -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ - -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ - | \ - sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ - -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ - -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ - -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ - -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ - -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ - -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ - -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ - -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ - -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ - -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ - -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ - -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ - -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ - -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ - -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ - -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ - -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ - -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ - -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ - -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ - -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ - -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ - -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ - -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += unistd.h unistd.h-t - -EXTRA_DIST += unistd.in.h - -## end gnulib module unistd - -## begin gnulib module unistd-safer - - -EXTRA_DIST += dup-safer.c fd-safer.c pipe-safer.c unistd--.h unistd-safer.h - -EXTRA_libgnulib_a_SOURCES += dup-safer.c fd-safer.c pipe-safer.c - -## end gnulib module unistd-safer - -## begin gnulib module unitypes - -BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H) - -unitypes.h: unitypes.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/unitypes.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -MOSTLYCLEANFILES += unitypes.h unitypes.h-t - -EXTRA_DIST += unitypes.in.h - -## end gnulib module unitypes - -## begin gnulib module uniwidth/base - -BUILT_SOURCES += $(LIBUNISTRING_UNIWIDTH_H) - -uniwidth.h: uniwidth.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/uniwidth.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -MOSTLYCLEANFILES += uniwidth.h uniwidth.h-t - -EXTRA_DIST += localcharset.h uniwidth.in.h - -## end gnulib module uniwidth/base - -## begin gnulib module uniwidth/width - -if LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH -libgnulib_a_SOURCES += uniwidth/width.c -endif - -EXTRA_DIST += uniwidth/cjk.h - -## end gnulib module uniwidth/width - -## begin gnulib module unlink - - -EXTRA_DIST += unlink.c - -EXTRA_libgnulib_a_SOURCES += unlink.c - -## end gnulib module unlink - -## begin gnulib module unsetenv - - -EXTRA_DIST += unsetenv.c - -EXTRA_libgnulib_a_SOURCES += unsetenv.c - -## end gnulib module unsetenv - -## begin gnulib module unused-parameter - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += unused-parameter.h -# The unused-parameter.h that gets inserted into generated .h files is the same -# as build-aux/unused-parameter.h, except that it has the copyright header cut -# off. -unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ - < $(top_srcdir)/build-aux/unused-parameter.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t - -UNUSED_PARAMETER_H=unused-parameter.h - -EXTRA_DIST += $(top_srcdir)/build-aux/unused-parameter.h - -## end gnulib module unused-parameter - -## begin gnulib module update-copyright - - -EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright - -## end gnulib module update-copyright - -## begin gnulib module useless-if-before-free - - -EXTRA_DIST += $(top_srcdir)/build-aux/useless-if-before-free - -## end gnulib module useless-if-before-free - -## begin gnulib module vasnprintf - - -EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h - -EXTRA_libgnulib_a_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c - -## end gnulib module vasnprintf - -## begin gnulib module vc-list-files - - -EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files - -## end gnulib module vc-list-files - -## begin gnulib module verify - -libgnulib_a_SOURCES += verify.h - -## end gnulib module verify - -## begin gnulib module version-etc - -libgnulib_a_SOURCES += version-etc.h version-etc.c - -## end gnulib module version-etc - -## begin gnulib module version-etc-fsf - -libgnulib_a_SOURCES += version-etc-fsf.c - -## end gnulib module version-etc-fsf - -## begin gnulib module warn-on-use - -BUILT_SOURCES += warn-on-use.h -# The warn-on-use.h that gets inserted into generated .h files is the same as -# build-aux/warn-on-use.h, except that it has the copyright header cut off. -warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/warn-on-use.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t - -WARN_ON_USE_H=warn-on-use.h - -EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h - -## end gnulib module warn-on-use - -## begin gnulib module wchar - -BUILT_SOURCES += wchar.h - -# We need the following in order to create when the system -# version does not work standalone. -wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ - -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ - -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ - -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ - -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ - -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ - -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ - -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ - -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ - -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ - -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ - -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ - -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ - -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ - -e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \ - -e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \ - -e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \ - -e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \ - -e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \ - -e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \ - -e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \ - -e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \ - -e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \ - -e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \ - -e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \ - -e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \ - -e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \ - -e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \ - -e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \ - -e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \ - -e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \ - -e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \ - -e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \ - -e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \ - -e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \ - -e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \ - -e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \ - -e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \ - -e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \ - -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \ - -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \ - -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \ - < $(srcdir)/wchar.in.h | \ - sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ - -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ - -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ - -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ - -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ - -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ - -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ - -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ - -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ - -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ - -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ - -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ - -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ - -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ - -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ - -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ - -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ - -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ - -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ - -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ - -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ - -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ - -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ - -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ - -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ - -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ - -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ - -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ - -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ - -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ - -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ - -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ - -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ - -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ - -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ - -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ - -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ - -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ - -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ - -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ - | \ - sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ - -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ - -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ - -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ - -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ - -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ - -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ - -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ - -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ - -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ - -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ - -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ - -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += wchar.h wchar.h-t - -EXTRA_DIST += wchar.in.h - -## end gnulib module wchar - -## begin gnulib module wcrtomb - - -EXTRA_DIST += wcrtomb.c - -EXTRA_libgnulib_a_SOURCES += wcrtomb.c - -## end gnulib module wcrtomb - -## begin gnulib module wctype-h - -BUILT_SOURCES += wctype.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ - -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ - -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ - -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ - -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ - -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ - -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ - -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ - -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ - -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ - -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ - -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ - -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/wctype.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += wctype.h wctype.h-t - -EXTRA_DIST += wctype.in.h - -## end gnulib module wctype-h - -## begin gnulib module wcwidth - - -EXTRA_DIST += wcwidth.c - -EXTRA_libgnulib_a_SOURCES += wcwidth.c - -## end gnulib module wcwidth - -## begin gnulib module xalloc - - -EXTRA_DIST += xalloc.h xmalloc.c - -EXTRA_libgnulib_a_SOURCES += xmalloc.c - -## end gnulib module xalloc - -## begin gnulib module xalloc-die - -libgnulib_a_SOURCES += xalloc-die.c - -## end gnulib module xalloc-die - -## begin gnulib module xgetcwd - - -EXTRA_DIST += xgetcwd.c xgetcwd.h - -EXTRA_libgnulib_a_SOURCES += xgetcwd.c - -## end gnulib module xgetcwd - -## begin gnulib module xsize - -libgnulib_a_SOURCES += xsize.h - -## end gnulib module xsize - -## begin gnulib module xstrndup - -libgnulib_a_SOURCES += xstrndup.h xstrndup.c - -## end gnulib module xstrndup - -## begin gnulib module xstrtod - - -EXTRA_DIST += xstrtod.c xstrtod.h - -EXTRA_libgnulib_a_SOURCES += xstrtod.c - -## end gnulib module xstrtod - -## begin gnulib module xstrtol - - -EXTRA_DIST += xstrtol-error.c xstrtol.c xstrtol.h xstrtoul.c - -EXTRA_libgnulib_a_SOURCES += xstrtol-error.c xstrtol.c xstrtoul.c - -## end gnulib module xstrtol - -## begin gnulib module xstrtoumax - -libgnulib_a_SOURCES += xstrtoumax.c - -## end gnulib module xstrtoumax - -## begin gnulib module yesno - - -EXTRA_DIST += yesno.c yesno.h - -EXTRA_libgnulib_a_SOURCES += yesno.c - -## end gnulib module yesno - - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : diff --git a/gnulib/lib/Makefile.in b/gnulib/lib/Makefile.in deleted file mode 100644 index 6ea995f..0000000 --- a/gnulib/lib/Makefile.in +++ /dev/null @@ -1,3265 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in 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 program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright (C) 2002-2011 Free Software Foundation, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-libtool --macro-prefix=gl alloca areadlinkat argmatch assert c-strcasestr c-strstr canonicalize cloexec closein closeout ctype d-type dirent-safer dirname errno error faccessat fchdir fcntl fdl fdopendir fflush fileblocks filemode fnmatch-gnu fopen-safer fts getdelim getline getopt-gnu gettext gettimeofday gpl-3.0 hash human idcache inline inttypes isblank locale lstat maintainer-makefile malloc math mbrtowc mbscasestr mbsstr mktime modechange modf mountlist open parse-datetime pathmax perror progname quotearg readlink realloc regex rpmatch save-cwd savedir selinux-at snprintf stat stat-macros stat-time stdarg stdbool stddef stdint stdio stdlib stpcpy strcasestr strdup-posix strftime string strtol strtoul strtoull strtoumax sys_stat sys_time sys_wait timespec update-copyright verify version-etc version-etc-fsf warnings wchar wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_1 = uniwidth/width.c -subdir = gnulib/lib -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in alloca.c parse-datetime.c -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ - $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ - $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -AR = ar -ARFLAGS = cru -libgnulib_a_AR = $(AR) $(ARFLAGS) -am__DEPENDENCIES_1 = -am__libgnulib_a_SOURCES_DIST = areadlink.c areadlink-with-size.c \ - areadlinkat.c bitrotate.h c-ctype.h c-ctype.c c-strcase.h \ - c-strcasecmp.c c-strncasecmp.c c-strcasestr.h c-strcasestr.c \ - c-strstr.h c-strstr.c close-hook.c exitfail.c file-set.c \ - freadahead.c freading.c gettext.h hash-pjw.h hash-pjw.c \ - hash-triple.c localcharset.h localcharset.c malloca.c mbchar.c \ - mbscasestr.c mbslen.c mbsstr.c mbuiter.h openat-die.c \ - parse-datetime.y progname.h progname.c se-context.in.h \ - se-selinux.in.h size_max.h strnlen1.h strnlen1.c \ - uniwidth/width.c verify.h version-etc.h version-etc.c \ - version-etc-fsf.c xalloc-die.c xsize.h xstrndup.h xstrndup.c \ - xstrtoumax.c -am__dirstamp = $(am__leading_dot)dirstamp -@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__objects_1 = uniwidth/width.$(OBJEXT) -am_libgnulib_a_OBJECTS = areadlink.$(OBJEXT) \ - areadlink-with-size.$(OBJEXT) areadlinkat.$(OBJEXT) \ - c-ctype.$(OBJEXT) c-strcasecmp.$(OBJEXT) \ - c-strncasecmp.$(OBJEXT) c-strcasestr.$(OBJEXT) \ - c-strstr.$(OBJEXT) close-hook.$(OBJEXT) exitfail.$(OBJEXT) \ - file-set.$(OBJEXT) freadahead.$(OBJEXT) freading.$(OBJEXT) \ - hash-pjw.$(OBJEXT) hash-triple.$(OBJEXT) \ - localcharset.$(OBJEXT) malloca.$(OBJEXT) mbchar.$(OBJEXT) \ - mbscasestr.$(OBJEXT) mbslen.$(OBJEXT) mbsstr.$(OBJEXT) \ - openat-die.$(OBJEXT) parse-datetime.$(OBJEXT) \ - progname.$(OBJEXT) strnlen1.$(OBJEXT) $(am__objects_1) \ - version-etc.$(OBJEXT) version-etc-fsf.$(OBJEXT) \ - xalloc-die.$(OBJEXT) xstrndup.$(OBJEXT) xstrtoumax.$(OBJEXT) -libgnulib_a_OBJECTS = $(am_libgnulib_a_OBJECTS) -LTLIBRARIES = $(noinst_LTLIBRARIES) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) -YLWRAP = $(top_srcdir)/build-aux/ylwrap -SOURCES = $(libgnulib_a_SOURCES) $(EXTRA_libgnulib_a_SOURCES) -DIST_SOURCES = $(am__libgnulib_a_SOURCES_DIST) \ - $(EXTRA_libgnulib_a_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -HEADERS = $(noinst_HEADERS) -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -pkglibexecdir = @pkglibexecdir@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -AMTAR = @AMTAR@ -APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AUXDIR = @AUXDIR@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CONFIG_INCLUDE = @CONFIG_INCLUDE@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFAULT_ARG_SIZE = @DEFAULT_ARG_SIZE@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FINDLIBOBJS = @FINDLIBOBJS@ -FINDLIBS = @FINDLIBS@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC21 = @GLIBC21@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GNULIB_ACOSL = @GNULIB_ACOSL@ -GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ -GNULIB_ASINL = @GNULIB_ASINL@ -GNULIB_ATANL = @GNULIB_ATANL@ -GNULIB_ATOLL = @GNULIB_ATOLL@ -GNULIB_BTOWC = @GNULIB_BTOWC@ -GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ -GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ -GNULIB_CEIL = @GNULIB_CEIL@ -GNULIB_CEILF = @GNULIB_CEILF@ -GNULIB_CEILL = @GNULIB_CEILL@ -GNULIB_CHOWN = @GNULIB_CHOWN@ -GNULIB_CLOSE = @GNULIB_CLOSE@ -GNULIB_COSL = @GNULIB_COSL@ -GNULIB_DIRFD = @GNULIB_DIRFD@ -GNULIB_DPRINTF = @GNULIB_DPRINTF@ -GNULIB_DUP2 = @GNULIB_DUP2@ -GNULIB_DUP3 = @GNULIB_DUP3@ -GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_EXPL = @GNULIB_EXPL@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ -GNULIB_FFLUSH = @GNULIB_FFLUSH@ -GNULIB_FLOOR = @GNULIB_FLOOR@ -GNULIB_FLOORF = @GNULIB_FLOORF@ -GNULIB_FLOORL = @GNULIB_FLOORL@ -GNULIB_FOPEN = @GNULIB_FOPEN@ -GNULIB_FPRINTF = @GNULIB_FPRINTF@ -GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ -GNULIB_FPURGE = @GNULIB_FPURGE@ -GNULIB_FPUTC = @GNULIB_FPUTC@ -GNULIB_FPUTS = @GNULIB_FPUTS@ -GNULIB_FREOPEN = @GNULIB_FREOPEN@ -GNULIB_FREXP = @GNULIB_FREXP@ -GNULIB_FREXPL = @GNULIB_FREXPL@ -GNULIB_FSEEK = @GNULIB_FSEEK@ -GNULIB_FSEEKO = @GNULIB_FSEEKO@ -GNULIB_FSTATAT = @GNULIB_FSTATAT@ -GNULIB_FSYNC = @GNULIB_FSYNC@ -GNULIB_FTELL = @GNULIB_FTELL@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ -GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ -GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ -GNULIB_GRANTPT = @GNULIB_GRANTPT@ -GNULIB_IMAXABS = @GNULIB_IMAXABS@ -GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ -GNULIB_ISBLANK = @GNULIB_ISBLANK@ -GNULIB_ISFINITE = @GNULIB_ISFINITE@ -GNULIB_ISINF = @GNULIB_ISINF@ -GNULIB_ISNAN = @GNULIB_ISNAN@ -GNULIB_ISNAND = @GNULIB_ISNAND@ -GNULIB_ISNANF = @GNULIB_ISNANF@ -GNULIB_ISNANL = @GNULIB_ISNANL@ -GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ -GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ -GNULIB_LCHMOD = @GNULIB_LCHMOD@ -GNULIB_LCHOWN = @GNULIB_LCHOWN@ -GNULIB_LDEXPL = @GNULIB_LDEXPL@ -GNULIB_LINK = @GNULIB_LINK@ -GNULIB_LINKAT = @GNULIB_LINKAT@ -GNULIB_LOGB = @GNULIB_LOGB@ -GNULIB_LOGL = @GNULIB_LOGL@ -GNULIB_LSEEK = @GNULIB_LSEEK@ -GNULIB_LSTAT = @GNULIB_LSTAT@ -GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ -GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ -GNULIB_OPEN = @GNULIB_OPEN@ -GNULIB_OPENAT = @GNULIB_OPENAT@ -GNULIB_PERROR = @GNULIB_PERROR@ -GNULIB_PIPE = @GNULIB_PIPE@ -GNULIB_PIPE2 = @GNULIB_PIPE2@ -GNULIB_POPEN = @GNULIB_POPEN@ -GNULIB_PREAD = @GNULIB_PREAD@ -GNULIB_PRINTF = @GNULIB_PRINTF@ -GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ -GNULIB_PTSNAME = @GNULIB_PTSNAME@ -GNULIB_PUTC = @GNULIB_PUTC@ -GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ -GNULIB_PUTENV = @GNULIB_PUTENV@ -GNULIB_PUTS = @GNULIB_PUTS@ -GNULIB_PWRITE = @GNULIB_PWRITE@ -GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ -GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ -GNULIB_READLINK = @GNULIB_READLINK@ -GNULIB_READLINKAT = @GNULIB_READLINKAT@ -GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -GNULIB_RENAME = @GNULIB_RENAME@ -GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ -GNULIB_RMDIR = @GNULIB_RMDIR@ -GNULIB_ROUND = @GNULIB_ROUND@ -GNULIB_ROUNDF = @GNULIB_ROUNDF@ -GNULIB_ROUNDL = @GNULIB_ROUNDL@ -GNULIB_RPMATCH = @GNULIB_RPMATCH@ -GNULIB_SCANDIR = @GNULIB_SCANDIR@ -GNULIB_SETENV = @GNULIB_SETENV@ -GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ -GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ -GNULIB_SINL = @GNULIB_SINL@ -GNULIB_SLEEP = @GNULIB_SLEEP@ -GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ -GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ -GNULIB_SQRTL = @GNULIB_SQRTL@ -GNULIB_STAT = @GNULIB_STAT@ -GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ -GNULIB_STPCPY = @GNULIB_STPCPY@ -GNULIB_STPNCPY = @GNULIB_STPNCPY@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TANL = @GNULIB_TANL@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TRUNC = @GNULIB_TRUNC@ -GNULIB_TRUNCF = @GNULIB_TRUNCF@ -GNULIB_TRUNCL = @GNULIB_TRUNCL@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ACOSL = @HAVE_ACOSL@ -HAVE_ALPHASORT = @HAVE_ALPHASORT@ -HAVE_ASINL = @HAVE_ASINL@ -HAVE_ATANL = @HAVE_ATANL@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ -HAVE_BTOWC = @HAVE_BTOWC@ -HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ -HAVE_CHOWN = @HAVE_CHOWN@ -HAVE_COSL = @HAVE_COSL@ -HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ -HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ -HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ -HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ -HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ -HAVE_DECL_COSL = @HAVE_DECL_COSL@ -HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ -HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ -HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ -HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ -HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ -HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ -HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ -HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ -HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ -HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ -HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ -HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ -HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ -HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ -HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ -HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ -HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ -HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ -HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ -HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ -HAVE_DECL_SINL = @HAVE_DECL_SINL@ -HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ -HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ -HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ -HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ -HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ -HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ -HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ -HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ -HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ -HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ -HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ -HAVE_DECL_TANL = @HAVE_DECL_TANL@ -HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ -HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ -HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ -HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ -HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ -HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_EXPL = @HAVE_EXPL@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -HAVE_FCHDIR = @HAVE_FCHDIR@ -HAVE_FCHMODAT = @HAVE_FCHMODAT@ -HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ -HAVE_FCNTL = @HAVE_FCNTL@ -HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ -HAVE_FEATURES_H = @HAVE_FEATURES_H@ -HAVE_FSEEKO = @HAVE_FSEEKO@ -HAVE_FSTATAT = @HAVE_FSTATAT@ -HAVE_FSYNC = @HAVE_FSYNC@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISNAND = @HAVE_ISNAND@ -HAVE_ISNANF = @HAVE_ISNANF@ -HAVE_ISNANL = @HAVE_ISNANL@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LOGL = @HAVE_LOGL@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ -HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ -HAVE_OPENAT = @HAVE_OPENAT@ -HAVE_OS_H = @HAVE_OS_H@ -HAVE_PIPE = @HAVE_PIPE@ -HAVE_PIPE2 = @HAVE_PIPE2@ -HAVE_PREAD = @HAVE_PREAD@ -HAVE_PTSNAME = @HAVE_PTSNAME@ -HAVE_PWRITE = @HAVE_PWRITE@ -HAVE_RANDOM_H = @HAVE_RANDOM_H@ -HAVE_RANDOM_R = @HAVE_RANDOM_R@ -HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -HAVE_REALPATH = @HAVE_REALPATH@ -HAVE_RENAMEAT = @HAVE_RENAMEAT@ -HAVE_RPMATCH = @HAVE_RPMATCH@ -HAVE_SCANDIR = @HAVE_SCANDIR@ -HAVE_SETENV = @HAVE_SETENV@ -HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ -HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ -HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ -HAVE_SINL = @HAVE_SINL@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_SQRTL = @HAVE_SQRTL@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASECMP = @HAVE_STRCASECMP@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TANL = @HAVE_TANL@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = @INCLUDES@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LDFLAGS = @LDFLAGS@ -LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ -LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ -LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ -LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ -LIB_EACCESS = @LIB_EACCESS@ -LIB_SELINUX = @LIB_SELINUX@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MODF_LIBM = @MODF_LIBM@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ -NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ -NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ -NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_DIRENT_H = @NEXT_DIRENT_H@ -NEXT_ERRNO_H = @NEXT_ERRNO_H@ -NEXT_FCNTL_H = @NEXT_FCNTL_H@ -NEXT_FLOAT_H = @NEXT_FLOAT_H@ -NEXT_GETOPT_H = @NEXT_GETOPT_H@ -NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ -NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -NEXT_LOCALE_H = @NEXT_LOCALE_H@ -NEXT_MATH_H = @NEXT_MATH_H@ -NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ -NEXT_STDARG_H = @NEXT_STDARG_H@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_STRINGS_H = @NEXT_STRINGS_H@ -NEXT_STRING_H = @NEXT_STRING_H@ -NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ -NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ -NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ -NEXT_TIME_H = @NEXT_TIME_H@ -NEXT_UNISTD_H = @NEXT_UNISTD_H@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -POSUB = @POSUB@ -PRAGMA_COLUMNS = @PRAGMA_COLUMNS@ -PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ -PRIPTR_PREFIX = @PRIPTR_PREFIX@ -PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ -PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ -PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ -RANLIB = @RANLIB@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CEIL = @REPLACE_CEIL@ -REPLACE_CEILF = @REPLACE_CEILF@ -REPLACE_CEILL = @REPLACE_CEILL@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -REPLACE_DIRFD = @REPLACE_DIRFD@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FLOOR = @REPLACE_FLOOR@ -REPLACE_FLOORF = @REPLACE_FLOORF@ -REPLACE_FLOORL = @REPLACE_FLOORL@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FREXP = @REPLACE_FREXP@ -REPLACE_FREXPL = @REPLACE_FREXPL@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ -REPLACE_GETLINE = @REPLACE_GETLINE@ -REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ -REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ -REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ -REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ -REPLACE_ISFINITE = @REPLACE_ISFINITE@ -REPLACE_ISINF = @REPLACE_ISINF@ -REPLACE_ISNAN = @REPLACE_ISNAN@ -REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ -REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ -REPLACE_LCHOWN = @REPLACE_LCHOWN@ -REPLACE_LDEXPL = @REPLACE_LDEXPL@ -REPLACE_LINK = @REPLACE_LINK@ -REPLACE_LINKAT = @REPLACE_LINKAT@ -REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ -REPLACE_LSEEK = @REPLACE_LSEEK@ -REPLACE_LSTAT = @REPLACE_LSTAT@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NAN = @REPLACE_NAN@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_OPENDIR = @REPLACE_OPENDIR@ -REPLACE_PERROR = @REPLACE_PERROR@ -REPLACE_POPEN = @REPLACE_POPEN@ -REPLACE_PREAD = @REPLACE_PREAD@ -REPLACE_PRINTF = @REPLACE_PRINTF@ -REPLACE_PUTENV = @REPLACE_PUTENV@ -REPLACE_PWRITE = @REPLACE_PWRITE@ -REPLACE_READLINK = @REPLACE_READLINK@ -REPLACE_REALLOC = @REPLACE_REALLOC@ -REPLACE_REALPATH = @REPLACE_REALPATH@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_ROUND = @REPLACE_ROUND@ -REPLACE_ROUNDF = @REPLACE_ROUNDF@ -REPLACE_ROUNDL = @REPLACE_ROUNDL@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ -REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ -REPLACE_SLEEP = @REPLACE_SLEEP@ -REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ -REPLACE_SPRINTF = @REPLACE_SPRINTF@ -REPLACE_STAT = @REPLACE_STAT@ -REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ -REPLACE_STPNCPY = @REPLACE_STPNCPY@ -REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ -REPLACE_STRDUP = @REPLACE_STRDUP@ -REPLACE_STRERROR = @REPLACE_STRERROR@ -REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_SYMLINK = @REPLACE_SYMLINK@ -REPLACE_TIMEGM = @REPLACE_TIMEGM@ -REPLACE_TMPFILE = @REPLACE_TMPFILE@ -REPLACE_TRUNC = @REPLACE_TRUNC@ -REPLACE_TRUNCF = @REPLACE_TRUNCF@ -REPLACE_TRUNCL = @REPLACE_TRUNCL@ -REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -REPLACE_UNLINK = @REPLACE_UNLINK@ -REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -SORT = @SORT@ -SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ -STDARG_H = @STDARG_H@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ -UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ -UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ -UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ -UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ -UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WARN_CFLAGS = @WARN_CFLAGS@ -WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ -WINT_T_SUFFIX = @WINT_T_SUFFIX@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -YIELD_LIB = @YIELD_LIB@ -abs_aux_dir = @abs_aux_dir@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects -SUBDIRS = -noinst_HEADERS = -noinst_LIBRARIES = libgnulib.a -noinst_LTLIBRARIES = -EXTRA_DIST = alloca.c alloca.in.h areadlink.h areadlink.h areadlink.h \ - $(top_srcdir)/build-aux/arg-nonnull.h argmatch.c argmatch.h \ - btowc.c $(top_srcdir)/build-aux/c++defs.h str-two-way.h \ - canonicalize.c canonicalize.h chdir-long.c chdir-long.h \ - chown.c fchown-stub.c cloexec.c cloexec.h close.c close-hook.h \ - close-stream.c close-stream.h closein.c closein.h closeout.c \ - closeout.h ctype.in.h cycle-check.c cycle-check.h dev-ino.h \ - dirent.in.h dirent--.h dirent-safer.h opendir-safer.c dirfd.c \ - basename.c dirname.c stripslash.c basename-lgpl.c \ - dirname-lgpl.c dirname.h stripslash.c dosname.h dup2.c \ - errno.in.h error.c error.h euidaccess.c exitfail.h faccessat.c \ - fchdir.c fclose.c fcntl.c fcntl.in.h creat-safer.c fcntl--.h \ - fcntl-safer.h open-safer.c fdopendir.c openat-priv.h \ - openat-proc.c fflush.c stdio-impl.h file-set.h fileblocks.c \ - filemode.c filemode.h float.in.h fnmatch.c fnmatch.in.h \ - fnmatch_loop.c fopen.c fopen-safer.c stdio--.h stdio-safer.h \ - fpending.c fpending.h fpurge.c stdio-impl.h freadahead.h \ - stdio-impl.h freading.h stdio-impl.h fseeko.c stdio-impl.h \ - ftello.c stdio-impl.h fts-cycle.c fts.c fts_.h getcwd.c \ - getdelim.c getdtablesize.c getgroups.c getline.c getopt.c \ - getopt.in.h getopt1.c getopt_int.h \ - $(top_srcdir)/build-aux/config.rpath gettime.c gettimeofday.c \ - $(top_srcdir)/GNUmakefile group-member.c group-member.h hash.c \ - hash.h hash-triple.h $(top_srcdir)/build-aux/config.rpath \ - human.c human.h i-ring.c i-ring.h idcache.c idcache.h \ - intprops.h inttypes.in.h isblank.c iswblank.c langinfo.in.h \ - lchown.c config.charset ref-add.sin ref-del.sin locale.in.h \ - lseek.c lstat.c $(top_srcdir)/maint.mk malloc.c malloc.c \ - malloca.h malloca.valgrind math.in.h mbchar.h mbrtowc.c \ - str-kmp.h mbsinit.c mbsrtowcs-impl.h mbsrtowcs-state.c \ - mbsrtowcs.c str-kmp.h mbtowc-impl.h mbtowc.c memchr.c \ - memchr.valgrind mempcpy.c memrchr.c mkdir.c mktime-internal.h \ - mktime.c modechange.c modechange.h mountlist.c mountlist.h \ - nl_langinfo.c open.c at-func.c fchmodat.c fchownat.c fstatat.c \ - mkdirat.c openat-priv.h openat-proc.c openat.c openat.h \ - unlinkat.c fcntl--.h fcntl-safer.h openat-safer.c \ - parse-datetime.c parse-datetime.h pathmax.h perror.c quote.c \ - quote.h quotearg.c quotearg.h readlink.c readlinkat.c \ - realloc.c realloc.c regcomp.c regex.c regex.h regex_internal.c \ - regex_internal.h regexec.c rmdir.c rpmatch.c same.c same.h \ - same-inode.h save-cwd.c save-cwd.h savedir.c savedir.h \ - selinux-at.c selinux-at.h getfilecon.c setenv.c snprintf.c \ - stat.c stat-macros.h stat-time.h stdarg.in.h stdbool.in.h \ - stddef.in.h stdint.in.h stdio.in.h stdlib.in.h stpcpy.c \ - strcasecmp.c strncasecmp.c str-two-way.h strcasestr.c strdup.c \ - streq.h strerror.c strftime.c strftime.h string.in.h \ - strings.in.h strndup.c strnlen.c str-two-way.h strstr.c \ - strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \ - strtoumax.c sys_stat.in.h sys_time.in.h sys_wait.in.h \ - time.in.h time_r.c timespec.h unistd.in.h dup-safer.c \ - fd-safer.c pipe-safer.c unistd--.h unistd-safer.h \ - unitypes.in.h localcharset.h uniwidth.in.h uniwidth/cjk.h \ - unlink.c unsetenv.c $(top_srcdir)/build-aux/unused-parameter.h \ - $(top_srcdir)/build-aux/update-copyright \ - $(top_srcdir)/build-aux/useless-if-before-free asnprintf.c \ - float+.h printf-args.c printf-args.h printf-parse.c \ - printf-parse.h vasnprintf.c vasnprintf.h \ - $(top_srcdir)/build-aux/vc-list-files \ - $(top_srcdir)/build-aux/warn-on-use.h wchar.in.h wcrtomb.c \ - wctype.in.h wcwidth.c xalloc.h xmalloc.c xgetcwd.c xgetcwd.h \ - xstrtod.c xstrtod.h xstrtol-error.c xstrtol.c xstrtol.h \ - xstrtoul.c yesno.c yesno.h - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. -BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h configmake.h \ - ctype.h dirent.h $(ERRNO_H) fcntl.h $(FLOAT_H) $(FNMATCH_H) \ - $(GETOPT_H) inttypes.h langinfo.h locale.h math.h \ - parse-datetime.c selinux/selinux.h $(SELINUX_CONTEXT_H) \ - $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \ - stdlib.h string.h strings.h sys/stat.h sys/time.h sys/wait.h \ - time.h unistd.h $(LIBUNISTRING_UNITYPES_H) \ - $(LIBUNISTRING_UNIWIDTH_H) unused-parameter.h warn-on-use.h \ - wchar.h wctype.h -SUFFIXES = .sed .sin -MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ - arg-nonnull.h-t c++defs.h c++defs.h-t ctype.h ctype.h-t \ - dirent.h dirent.h-t errno.h errno.h-t fcntl.h fcntl.h-t \ - float.h float.h-t fnmatch.h fnmatch.h-t getopt.h getopt.h-t \ - inttypes.h inttypes.h-t langinfo.h langinfo.h-t locale.h \ - locale.h-t math.h math.h-t parse-datetime.c-t \ - selinux/selinux.h selinux/selinux.h-t selinux/context.h \ - selinux/context.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t \ - stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \ - stdlib.h stdlib.h-t string.h string.h-t strings.h strings.h-t \ - sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t sys/wait.h \ - sys/wait.h-t time.h time.h-t unistd.h unistd.h-t unitypes.h \ - unitypes.h-t uniwidth.h uniwidth.h-t unused-parameter.h \ - unused-parameter.h-t warn-on-use.h warn-on-use.h-t wchar.h \ - wchar.h-t wctype.h wctype.h-t -MOSTLYCLEANDIRS = selinux sys sys -CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ - ref-del.sed -DISTCLEANFILES = -MAINTAINERCLEANFILES = parse-datetime.c - -# This is for those projects which use "gettextize --intl" to put a source-code -# copy of libintl into their package. In such projects, every Makefile.am needs -# -I$(top_builddir)/intl, so that can be found in this directory. -# For the Makefile.ams in other directories it is the maintainer's -# responsibility; for the one from gnulib we do it here. -# This option has no effect when the user disables NLS (because then the intl -# directory contains no libintl.h file) or when the project does not use -# "gettextize --intl". -AM_CPPFLAGS = -I$(top_builddir)/intl -AM_CFLAGS = -libgnulib_a_SOURCES = areadlink.c areadlink-with-size.c areadlinkat.c \ - bitrotate.h c-ctype.h c-ctype.c c-strcase.h c-strcasecmp.c \ - c-strncasecmp.c c-strcasestr.h c-strcasestr.c c-strstr.h \ - c-strstr.c close-hook.c exitfail.c file-set.c freadahead.c \ - freading.c gettext.h hash-pjw.h hash-pjw.c hash-triple.c \ - localcharset.h localcharset.c malloca.c mbchar.c mbscasestr.c \ - mbslen.c mbsstr.c mbuiter.h openat-die.c parse-datetime.y \ - progname.h progname.c se-context.in.h se-selinux.in.h \ - size_max.h strnlen1.h strnlen1.c $(am__append_1) verify.h \ - version-etc.h version-etc.c version-etc-fsf.c xalloc-die.c \ - xsize.h xstrndup.h xstrndup.c xstrtoumax.c -libgnulib_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@ -libgnulib_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@ -EXTRA_libgnulib_a_SOURCES = alloca.c argmatch.c btowc.c canonicalize.c \ - chdir-long.c chown.c fchown-stub.c cloexec.c close.c \ - close-stream.c closein.c closeout.c cycle-check.c \ - opendir-safer.c dirfd.c basename.c dirname.c stripslash.c \ - basename-lgpl.c dirname-lgpl.c stripslash.c dup2.c error.c \ - euidaccess.c faccessat.c fchdir.c fclose.c fcntl.c \ - creat-safer.c open-safer.c fdopendir.c openat-proc.c fflush.c \ - fileblocks.c filemode.c fnmatch.c fnmatch_loop.c fopen.c \ - fopen-safer.c fpending.c fpurge.c fseeko.c ftello.c \ - fts-cycle.c fts.c getcwd.c getdelim.c getdtablesize.c \ - getgroups.c getline.c getopt.c getopt1.c gettime.c \ - gettimeofday.c group-member.c hash.c human.c i-ring.c \ - idcache.c isblank.c iswblank.c lchown.c lseek.c lstat.c \ - malloc.c malloc.c mbrtowc.c mbsinit.c mbsrtowcs-state.c \ - mbsrtowcs.c mbtowc.c memchr.c mempcpy.c memrchr.c mkdir.c \ - mktime.c modechange.c mountlist.c nl_langinfo.c open.c \ - at-func.c fchmodat.c fchownat.c fstatat.c mkdirat.c \ - openat-proc.c openat.c unlinkat.c openat-safer.c perror.c \ - quote.c quotearg.c readlink.c readlinkat.c realloc.c realloc.c \ - regcomp.c regex.c regex_internal.c regexec.c rmdir.c rpmatch.c \ - same.c save-cwd.c savedir.c selinux-at.c getfilecon.c setenv.c \ - snprintf.c stat.c stpcpy.c strcasecmp.c strncasecmp.c \ - strcasestr.c strdup.c strerror.c strftime.c strndup.c \ - strnlen.c strstr.c strtoimax.c strtol.c strtoll.c strtoul.c \ - strtoull.c strtoumax.c time_r.c dup-safer.c fd-safer.c \ - pipe-safer.c unlink.c unsetenv.c asnprintf.c printf-args.c \ - printf-parse.c vasnprintf.c wcrtomb.c wcwidth.c xmalloc.c \ - xgetcwd.c xstrtod.c xstrtol-error.c xstrtol.c xstrtoul.c \ - yesno.c -ARG_NONNULL_H = arg-nonnull.h -CXXDEFS_H = c++defs.h -charset_alias = $(DESTDIR)$(libdir)/charset.alias -charset_tmp = $(DESTDIR)$(libdir)/charset.tmp -UNUSED_PARAMETER_H = unused-parameter.h -WARN_ON_USE_H = warn-on-use.h -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .sed .sin .c .o .obj .y -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gnulib/lib/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnits gnulib/lib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -uniwidth/$(am__dirstamp): - @$(MKDIR_P) uniwidth - @: > uniwidth/$(am__dirstamp) -uniwidth/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) uniwidth/$(DEPDIR) - @: > uniwidth/$(DEPDIR)/$(am__dirstamp) -uniwidth/width.$(OBJEXT): uniwidth/$(am__dirstamp) \ - uniwidth/$(DEPDIR)/$(am__dirstamp) -libgnulib.a: $(libgnulib_a_OBJECTS) $(libgnulib_a_DEPENDENCIES) - -rm -f libgnulib.a - $(libgnulib_a_AR) libgnulib.a $(libgnulib_a_OBJECTS) $(libgnulib_a_LIBADD) - $(RANLIB) libgnulib.a - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f uniwidth/width.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlink-with-size.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlinkat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at-func.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasestr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strstr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chdir-long.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chown.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-hook.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-stream.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closein.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closeout.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/creat-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cycle-check.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/euidaccess.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchmodat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchown-stub.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchownat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fclose.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fflush.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-set.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileblocks.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpending.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpurge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freadahead.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freading.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftello.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fts-cycle.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fts.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfilecon.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/group-member.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-pjw.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-triple.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/human.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i-ring.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idcache.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isblank.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iswblank.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lchown.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbchar.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbscasestr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbslen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsstr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdirat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modechange.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mountlist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-die.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse-datetime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perror.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpmatch.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/same.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/savedir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selinux-at.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpcpy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strftime.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoll.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoul.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoumax.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc-fsf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version-etc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcwidth.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetcwd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtod.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol-error.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoul.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoumax.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yesno.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/width.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< - -.c.obj: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.y.c: - $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local -installdirs: installdirs-recursive -installdirs-am: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp) - -rm -f uniwidth/$(am__dirstamp) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -rm -f parse-datetime.c - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-recursive - -rm -rf $(DEPDIR) ./$(DEPDIR) uniwidth/$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-local distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-exec-local - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf $(DEPDIR) ./$(DEPDIR) uniwidth/$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-local - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-local - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - ctags-recursive install install-am install-strip \ - tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local check check-am clean clean-generic \ - clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \ - ctags-recursive distclean distclean-compile distclean-generic \ - distclean-local distclean-tags distdir dvi dvi-am html html-am \ - info info-am install install-am install-data install-data-am \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-exec-local install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \ - tags-recursive uninstall uninstall-am uninstall-local - - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -alloca.h: alloca.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/alloca.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/arg-nonnull.h, except that it has the copyright header cut off. -arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/build-aux/arg-nonnull.h \ - > $@-t && \ - mv $@-t $@ -# The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/c++defs.h, except that it has the copyright header cut off. -c++defs.h: $(top_srcdir)/build-aux/c++defs.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/build-aux/c++defs.h \ - > $@-t && \ - mv $@-t $@ - -# Listed in the same order as the GNU makefile conventions, and -# provided by autoconf 2.59c+. -# The Automake-defined pkg* macros are appended, in the order -# listed in the Automake 1.10a+ documentation. -configmake.h: Makefile - $(AM_V_GEN)rm -f $@-t && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - echo '#define PREFIX "$(prefix)"'; \ - echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ - echo '#define BINDIR "$(bindir)"'; \ - echo '#define SBINDIR "$(sbindir)"'; \ - echo '#define LIBEXECDIR "$(libexecdir)"'; \ - echo '#define DATAROOTDIR "$(datarootdir)"'; \ - echo '#define DATADIR "$(datadir)"'; \ - echo '#define SYSCONFDIR "$(sysconfdir)"'; \ - echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ - echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ - echo '#define INCLUDEDIR "$(includedir)"'; \ - echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ - echo '#define DOCDIR "$(docdir)"'; \ - echo '#define INFODIR "$(infodir)"'; \ - echo '#define HTMLDIR "$(htmldir)"'; \ - echo '#define DVIDIR "$(dvidir)"'; \ - echo '#define PDFDIR "$(pdfdir)"'; \ - echo '#define PSDIR "$(psdir)"'; \ - echo '#define LIBDIR "$(libdir)"'; \ - echo '#define LISPDIR "$(lispdir)"'; \ - echo '#define LOCALEDIR "$(localedir)"'; \ - echo '#define MANDIR "$(mandir)"'; \ - echo '#define MANEXT "$(manext)"'; \ - echo '#define PKGDATADIR "$(pkgdatadir)"'; \ - echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ - echo '#define PKGLIBDIR "$(pkglibdir)"'; \ - echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ - } | sed '/""/d' > $@-t && \ - if test -f $@ && cmp $@-t $@ > /dev/null; then \ - rm -f $@-t; \ - else \ - rm -f $@; mv $@-t $@; \ - fi - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -ctype.h: ctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ - -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ - -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/ctype.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -dirent.h: dirent.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ - -e 's|@''GNULIB_DIRFD''@|$(GNULIB_DIRFD)|g' \ - -e 's|@''GNULIB_FDOPENDIR''@|$(GNULIB_FDOPENDIR)|g' \ - -e 's|@''GNULIB_SCANDIR''@|$(GNULIB_SCANDIR)|g' \ - -e 's|@''GNULIB_ALPHASORT''@|$(GNULIB_ALPHASORT)|g' \ - -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \ - -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \ - -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \ - -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \ - -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \ - -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \ - -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \ - -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \ - -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/dirent.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that is POSIX compliant. -errno.h: errno.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ - -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ - -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ - -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ - -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ - -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ - -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ - < $(srcdir)/errno.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -fcntl.h: fcntl.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ - -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \ - -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \ - -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \ - -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ - -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ - -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ - -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ - -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/fcntl.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -float.h: float.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ - < $(srcdir)/float.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that supports the required API. -fnmatch.h: fnmatch.in.h $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/fnmatch.in.h; \ - } > $@-t && \ - mv -f $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -getopt.h: getopt.in.h $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv -f $@-t $@ - -distclean-local: clean-GNUmakefile -clean-GNUmakefile: - test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || : - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -inttypes.h: inttypes.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ - -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ - -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ - -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ - -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ - -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ - -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ - -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ - -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ - -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ - -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ - -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ - -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ - -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ - -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ - -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/inttypes.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create an empty placeholder for -# when the system doesn't have one. -langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ - -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \ - -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ - -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ - -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ - -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ - -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ - -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/langinfo.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to install a simple file in $(libdir) -# which is shared with other installed packages. We use a list of referencing -# packages so that "make uninstall" will remove the file if and only if it -# is not used by another installed package. -# On systems with glibc-2.1 or newer, the file is redundant, therefore we -# avoid installing it. - -all-local: charset.alias ref-add.sed ref-del.sed -install-exec-local: install-exec-localcharset -install-exec-localcharset: all-local - if test $(GLIBC21) = no; then \ - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ - esac ; \ - else \ - need_charset_alias=false ; \ - fi ; \ - if $$need_charset_alias; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ - fi ; \ - if test -f $(charset_alias); then \ - sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - else \ - if $$need_charset_alias; then \ - sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - fi ; \ - fi - -uninstall-local: uninstall-localcharset -uninstall-localcharset: all-local - if test -f $(charset_alias); then \ - sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ - if grep '^# Packages using this file: $$' $(charset_tmp) \ - > /dev/null; then \ - rm -f $(charset_alias); \ - else \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ - fi; \ - rm -f $(charset_tmp); \ - fi - -charset.alias: config.charset - $(AM_V_GEN)rm -f t-$@ $@ && \ - $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ - mv t-$@ $@ -.sin.sed: - $(AM_V_GEN)rm -f t-$@ $@ && \ - sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ - mv t-$@ $@ - -# We need the following in order to create when the system -# doesn't have one that provides all definitions. -locale.h: locale.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ - -e 's|@''GNULIB_SETLOCALE''@|$(GNULIB_SETLOCALE)|g' \ - -e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \ - -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ - -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ - -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ - -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/locale.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \ - -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \ - -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \ - -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \ - -e 's|@''GNULIB_CEIL''@|$(GNULIB_CEIL)|g' \ - -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \ - -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \ - -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \ - -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \ - -e 's|@''GNULIB_FLOOR''@|$(GNULIB_FLOOR)|g' \ - -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \ - -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \ - -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \ - -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \ - -e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \ - -e 's|@''GNULIB_ISINF''@|$(GNULIB_ISINF)|g' \ - -e 's|@''GNULIB_ISNAN''@|$(GNULIB_ISNAN)|g' \ - -e 's|@''GNULIB_ISNANF''@|$(GNULIB_ISNANF)|g' \ - -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \ - -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \ - -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \ - -e 's|@''GNULIB_LOGB''@|$(GNULIB_LOGB)|g' \ - -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \ - -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \ - -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \ - -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \ - -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \ - -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \ - -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \ - -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \ - -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \ - -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \ - -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \ - < $(srcdir)/math.in.h | \ - sed -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \ - -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \ - -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \ - -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \ - -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \ - -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \ - -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \ - -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \ - -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \ - -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \ - -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \ - -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \ - -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \ - -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \ - -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \ - -e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \ - -e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \ - -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \ - -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \ - -e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \ - -e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \ - -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \ - -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \ - -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \ - -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \ - -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \ - -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \ - -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \ - -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \ - -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \ - -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \ - -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \ - -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ - -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \ - | \ - sed -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \ - -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ - -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ - -e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \ - -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \ - -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \ - -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \ - -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \ - -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \ - -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ - -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ - -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ - -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \ - -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \ - -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \ - -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \ - -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ - -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ - -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ - -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \ - -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \ - -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -# This rule overrides the Automake generated .y.c rule, to ensure that the -# parse-datetime.c file gets generated in the source directory, not in the -# build directory. -parse-datetime.c: parse-datetime.y - $(AM_V_GEN)$(SHELL) $(YLWRAP) $(srcdir)/parse-datetime.y \ - y.tab.c parse-datetime.c \ - y.tab.h parse-datetime.h \ - y.output parse-datetime.output \ - -- $(YACC) $(YFLAGS) $(AM_YFLAGS) && \ - mv parse-datetime.c parse-datetime.c-t && \ - mv parse-datetime.c-t $(srcdir)/parse-datetime.c -selinux/selinux.h: se-selinux.in.h $(UNUSED_PARAMETER_H) - $(AM_V_at)$(MKDIR_P) selinux - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \ - -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ - < $(srcdir)/se-selinux.in.h; \ - } > $@-t && \ - chmod a-x $@-t && \ - mv $@-t $@ -selinux/context.h: se-context.in.h $(UNUSED_PARAMETER_H) - $(AM_V_at)$(MKDIR_P) selinux - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ - < $(srcdir)/se-context.in.h; \ - } > $@-t && \ - chmod a-x $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdarg.h: stdarg.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \ - < $(srcdir)/stdarg.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works. -stdbool.h: stdbool.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stddef.h: stddef.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ - -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ - -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ - < $(srcdir)/stddef.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdint.h: stdint.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ - -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ - -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ - -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ - -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ - -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ - -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ - -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ - -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ - -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ - -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ - -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ - -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ - -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ - -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \ - -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \ - -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \ - -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \ - -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \ - -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \ - -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \ - -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \ - -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \ - -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \ - -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \ - -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \ - -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \ - -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \ - -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \ - -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \ - -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \ - -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \ - -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \ - -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \ - -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \ - -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \ - -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \ - -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \ - -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \ - -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \ - -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \ - -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \ - -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \ - -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \ - -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \ - -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \ - -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \ - -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \ - -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \ - -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \ - -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \ - -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \ - < $(srcdir)/stdio.in.h | \ - sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ - -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ - -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ - -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ - -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ - -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ - -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ - -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ - -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ - -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ - -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ - -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ - -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ - -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ - -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ - -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ - -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ - -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ - -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ - -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ - -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ - -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ - -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ - -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ - -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ - -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ - -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ - -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ - -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ - -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ - -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ - -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ - -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ - -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ - -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ - -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ - -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ - -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ - -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ - -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ - -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ - -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ - -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ - -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ - -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ - -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \ - -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \ - -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \ - -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \ - -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \ - -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \ - -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \ - -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \ - -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \ - -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \ - -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \ - -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \ - -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \ - -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \ - -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \ - -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \ - -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_SETENV''@|$(GNULIB_SETENV)|g' \ - -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \ - -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \ - -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \ - -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \ - -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \ - -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ - -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \ - < $(srcdir)/stdlib.in.h | \ - sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ - -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ - -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ - -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ - -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ - -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ - -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ - -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ - -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ - -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ - -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_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ - -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ - -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ - -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ - -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ - -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ - -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ - -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ - -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ - -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ - -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ - -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ - -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ - -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ - -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ - -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ - -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ - -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ - -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ - -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \ - -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \ - -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \ - -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \ - -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \ - -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \ - -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \ - -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \ - -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \ - -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \ - -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \ - -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \ - -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \ - -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \ - -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \ - -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \ - -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \ - -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \ - -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \ - -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \ - -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \ - -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \ - -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \ - -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \ - -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \ - -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \ - -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \ - -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \ - -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \ - -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \ - -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \ - -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \ - -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \ - -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \ - -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \ - < $(srcdir)/string.in.h | \ - sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ - -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ - -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ - -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ - -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ - -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ - -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ - -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ - -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ - -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ - -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ - -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ - -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ - -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ - -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ - -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ - -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ - -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ - -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ - -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ - -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ - -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ - -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ - -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ - -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ - -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ - -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ - -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ - -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ - -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ - -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - < $(srcdir)/string.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -strings.h: strings.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ - -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ - -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/strings.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# has one that is incomplete. -sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ - -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \ - -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \ - -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \ - -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \ - -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \ - -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \ - -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \ - -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \ - -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \ - -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \ - -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \ - -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \ - -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ - -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ - -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ - -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ - -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ - -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ - -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ - -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ - -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ - -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ - -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ - -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ - -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ - -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ - -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ - -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ - -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ - -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ - -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ - -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_stat.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -sys/time.h: sys_time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ - -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ - -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ - -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ - -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_time.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# has one that is incomplete. -sys/wait.h: sys_wait.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \ - -e 's|@''GNULIB_WAITPID''@|$(GNULIB_WAITPID)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_wait.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ - -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \ - -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \ - -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \ - -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \ - -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \ - -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ - -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ - -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ - -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ - -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ - -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ - -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ - -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ - -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/time.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create an empty placeholder for -# when the system doesn't have one. -unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ - -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \ - -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \ - -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \ - -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \ - -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \ - -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \ - -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \ - -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \ - -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \ - -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \ - -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \ - -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \ - -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \ - -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \ - -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \ - -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \ - -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \ - -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \ - -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \ - -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \ - -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \ - -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \ - -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \ - -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \ - -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \ - -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \ - -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \ - -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \ - -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \ - -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \ - -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \ - -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \ - -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \ - -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \ - -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \ - -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \ - -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \ - -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \ - -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \ - -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \ - -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \ - < $(srcdir)/unistd.in.h | \ - sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ - -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ - -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ - -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ - -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ - -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ - -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ - -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ - -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ - -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ - -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ - -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ - -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ - -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ - -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ - -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ - -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ - -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ - -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ - -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ - -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ - -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ - -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ - -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ - -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ - -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ - -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ - -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ - -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ - -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ - -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ - -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ - -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ - -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ - -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ - -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ - | \ - sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ - -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ - -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ - -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ - -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ - -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ - -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ - -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ - -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ - -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ - -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ - -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ - -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ - -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ - -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ - -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ - -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ - -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ - -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ - -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ - -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ - -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ - -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ - -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ - -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -unitypes.h: unitypes.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/unitypes.in.h; \ - } > $@-t && \ - mv -f $@-t $@ - -uniwidth.h: uniwidth.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/uniwidth.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -# The unused-parameter.h that gets inserted into generated .h files is the same -# as build-aux/unused-parameter.h, except that it has the copyright header cut -# off. -unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ - < $(top_srcdir)/build-aux/unused-parameter.h \ - > $@-t && \ - mv $@-t $@ -# The warn-on-use.h that gets inserted into generated .h files is the same as -# build-aux/warn-on-use.h, except that it has the copyright header cut off. -warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/warn-on-use.h \ - > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# version does not work standalone. -wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ - -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ - -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ - -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \ - -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \ - -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \ - -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \ - -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \ - -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \ - -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \ - -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \ - -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \ - -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \ - -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \ - -e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \ - -e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \ - -e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \ - -e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \ - -e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \ - -e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \ - -e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \ - -e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \ - -e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \ - -e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \ - -e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \ - -e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \ - -e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \ - -e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \ - -e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \ - -e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \ - -e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \ - -e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \ - -e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \ - -e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \ - -e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \ - -e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \ - -e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \ - -e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \ - -e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \ - -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \ - -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \ - -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \ - < $(srcdir)/wchar.in.h | \ - sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ - -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ - -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ - -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ - -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ - -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ - -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ - -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ - -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ - -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ - -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ - -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ - -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ - -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ - -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ - -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ - -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ - -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ - -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ - -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ - -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ - -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ - -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ - -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ - -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ - -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ - -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ - -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ - -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ - -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ - -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ - -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ - -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ - -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ - -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ - -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ - -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ - -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ - -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ - -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ - | \ - sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ - -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ - -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ - -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ - -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ - -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ - -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ - -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ - -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ - -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ - -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ - -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ - -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ - -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ - -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ - -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ - -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ - -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ - -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ - -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ - -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ - -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ - -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ - -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ - -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/wctype.in.h; \ - } > $@-t && \ - mv $@-t $@ - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/gnulib/lib/alloca.c b/gnulib/lib/alloca.c deleted file mode 100644 index 771c2fa..0000000 --- a/gnulib/lib/alloca.c +++ /dev/null @@ -1,491 +0,0 @@ -/* alloca.c -- allocate automatically reclaimed memory - (Mostly) portable public-domain implementation -- D A Gwyn - - This implementation of the PWB library alloca function, - which is used to allocate space off the run-time stack so - that it is automatically reclaimed upon procedure exit, - was inspired by discussions with J. Q. Johnson of Cornell. - J.Otto Tennant contributed the Cray support. - - There are some preprocessor constants that can - be defined when compiling for your specific system, for - improved efficiency; however, the defaults should be okay. - - The general concept of this implementation is to keep - track of all alloca-allocated blocks, and reclaim any - that are found to be deeper in the stack than the current - invocation. This heuristic does not reclaim storage as - soon as it becomes invalid, but it will do so eventually. - - As a special case, alloca(0) reclaims storage without - allocating any. It is a good idea to use alloca(0) in - your main control loop, etc. to force garbage collection. */ - -#include - -#include - -#include -#include - -#ifdef emacs -# include "lisp.h" -# include "blockinput.h" -# ifdef EMACS_FREE -# undef free -# define free EMACS_FREE -# endif -#else -# define memory_full() abort () -#endif - -/* If compiling with GCC 2, this file's not needed. */ -#if !defined (__GNUC__) || __GNUC__ < 2 - -/* If someone has defined alloca as a macro, - there must be some other way alloca is supposed to work. */ -# ifndef alloca - -# ifdef emacs -# ifdef static -/* actually, only want this if static is defined as "" - -- this is for usg, in which emacs must undefine static - in order to make unexec workable - */ -# ifndef STACK_DIRECTION -you -lose --- must know STACK_DIRECTION at compile-time -/* Using #error here is not wise since this file should work for - old and obscure compilers. */ -# endif /* STACK_DIRECTION undefined */ -# endif /* static */ -# endif /* emacs */ - -/* If your stack is a linked list of frames, you have to - provide an "address metric" ADDRESS_FUNCTION macro. */ - -# if defined (CRAY) && defined (CRAY_STACKSEG_END) -long i00afunc (); -# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) -# else -# define ADDRESS_FUNCTION(arg) &(arg) -# endif - -/* Define STACK_DIRECTION if you know the direction of stack - growth for your system; otherwise it will be automatically - deduced at run-time. - - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ - -# ifndef STACK_DIRECTION -# define STACK_DIRECTION 0 /* Direction unknown. */ -# endif - -# if STACK_DIRECTION != 0 - -# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ - -# else /* STACK_DIRECTION == 0; need run-time code. */ - -static int stack_dir; /* 1 or -1 once known. */ -# define STACK_DIR stack_dir - -static void -find_stack_direction (char **ptr) -{ - auto char dummy; /* To get stack address. */ - - if (*ptr == NULL) - { /* Initial entry. */ - *ptr = ADDRESS_FUNCTION (dummy); - - find_stack_direction (ptr); /* Recurse once. */ - } - else - { - /* Second entry. */ - if (ADDRESS_FUNCTION (dummy) > *ptr) - stack_dir = 1; /* Stack grew upward. */ - else - stack_dir = -1; /* Stack grew downward. */ - } -} - -# endif /* STACK_DIRECTION == 0 */ - -/* An "alloca header" is used to: - (a) chain together all alloca'ed blocks; - (b) keep track of stack depth. - - It is very important that sizeof(header) agree with malloc - alignment chunk size. The following default should work okay. */ - -# ifndef ALIGN_SIZE -# define ALIGN_SIZE sizeof(double) -# endif - -typedef union hdr -{ - char align[ALIGN_SIZE]; /* To force sizeof(header). */ - struct - { - union hdr *next; /* For chaining headers. */ - char *deep; /* For stack depth measure. */ - } h; -} header; - -static header *last_alloca_header = NULL; /* -> last alloca header. */ - -/* Return a pointer to at least SIZE bytes of storage, - which will be automatically reclaimed upon exit from - the procedure that called alloca. Originally, this space - was supposed to be taken from the current stack frame of the - caller, but that method cannot be made to work for some - implementations of C, for example under Gould's UTX/32. */ - -void * -alloca (size_t size) -{ - auto char probe; /* Probes stack depth: */ - register char *depth = ADDRESS_FUNCTION (probe); - -# if STACK_DIRECTION == 0 - if (STACK_DIR == 0) /* Unknown growth direction. */ - { - char *addr = NULL; /* Address of first `dummy', once known. */ - find_stack_direction (&addr); - } -# endif - - /* Reclaim garbage, defined as all alloca'd storage that - was allocated from deeper in the stack than currently. */ - - { - register header *hp; /* Traverses linked list. */ - -# ifdef emacs - BLOCK_INPUT; -# endif - - for (hp = last_alloca_header; hp != NULL;) - if ((STACK_DIR > 0 && hp->h.deep > depth) - || (STACK_DIR < 0 && hp->h.deep < depth)) - { - register header *np = hp->h.next; - - free (hp); /* Collect garbage. */ - - hp = np; /* -> next header. */ - } - else - break; /* Rest are not deeper. */ - - last_alloca_header = hp; /* -> last valid storage. */ - -# ifdef emacs - UNBLOCK_INPUT; -# endif - } - - if (size == 0) - return NULL; /* No allocation required. */ - - /* Allocate combined header + user data storage. */ - - { - /* Address of header. */ - register header *new; - - size_t combined_size = sizeof (header) + size; - if (combined_size < sizeof (header)) - memory_full (); - - new = malloc (combined_size); - - if (! new) - memory_full (); - - new->h.next = last_alloca_header; - new->h.deep = depth; - - last_alloca_header = new; - - /* User storage begins just after header. */ - - return (void *) (new + 1); - } -} - -# if defined (CRAY) && defined (CRAY_STACKSEG_END) - -# ifdef DEBUG_I00AFUNC -# include -# endif - -# ifndef CRAY_STACK -# define CRAY_STACK -# ifndef CRAY2 -/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ -struct stack_control_header - { - long shgrow:32; /* Number of times stack has grown. */ - long shaseg:32; /* Size of increments to stack. */ - long shhwm:32; /* High water mark of stack. */ - long shsize:32; /* Current size of stack (all segments). */ - }; - -/* The stack segment linkage control information occurs at - the high-address end of a stack segment. (The stack - grows from low addresses to high addresses.) The initial - part of the stack segment linkage control information is - 0200 (octal) words. This provides for register storage - for the routine which overflows the stack. */ - -struct stack_segment_linkage - { - long ss[0200]; /* 0200 overflow words. */ - long sssize:32; /* Number of words in this segment. */ - long ssbase:32; /* Offset to stack base. */ - long:32; - long sspseg:32; /* Offset to linkage control of previous - segment of stack. */ - long:32; - long sstcpt:32; /* Pointer to task common address block. */ - long sscsnm; /* Private control structure number for - microtasking. */ - long ssusr1; /* Reserved for user. */ - long ssusr2; /* Reserved for user. */ - long sstpid; /* Process ID for pid based multi-tasking. */ - long ssgvup; /* Pointer to multitasking thread giveup. */ - long sscray[7]; /* Reserved for Cray Research. */ - long ssa0; - long ssa1; - long ssa2; - long ssa3; - long ssa4; - long ssa5; - long ssa6; - long ssa7; - long sss0; - long sss1; - long sss2; - long sss3; - long sss4; - long sss5; - long sss6; - long sss7; - }; - -# else /* CRAY2 */ -/* The following structure defines the vector of words - returned by the STKSTAT library routine. */ -struct stk_stat - { - long now; /* Current total stack size. */ - long maxc; /* Amount of contiguous space which would - be required to satisfy the maximum - stack demand to date. */ - long high_water; /* Stack high-water mark. */ - long overflows; /* Number of stack overflow ($STKOFEN) calls. */ - long hits; /* Number of internal buffer hits. */ - long extends; /* Number of block extensions. */ - long stko_mallocs; /* Block allocations by $STKOFEN. */ - long underflows; /* Number of stack underflow calls ($STKRETN). */ - long stko_free; /* Number of deallocations by $STKRETN. */ - long stkm_free; /* Number of deallocations by $STKMRET. */ - long segments; /* Current number of stack segments. */ - long maxs; /* Maximum number of stack segments so far. */ - long pad_size; /* Stack pad size. */ - long current_address; /* Current stack segment address. */ - long current_size; /* Current stack segment size. This - number is actually corrupted by STKSTAT to - include the fifteen word trailer area. */ - long initial_address; /* Address of initial segment. */ - long initial_size; /* Size of initial segment. */ - }; - -/* The following structure describes the data structure which trails - any stack segment. I think that the description in 'asdef' is - out of date. I only describe the parts that I am sure about. */ - -struct stk_trailer - { - long this_address; /* Address of this block. */ - long this_size; /* Size of this block (does not include - this trailer). */ - long unknown2; - long unknown3; - long link; /* Address of trailer block of previous - segment. */ - long unknown5; - long unknown6; - long unknown7; - long unknown8; - long unknown9; - long unknown10; - long unknown11; - long unknown12; - long unknown13; - long unknown14; - }; - -# endif /* CRAY2 */ -# endif /* not CRAY_STACK */ - -# ifdef CRAY2 -/* Determine a "stack measure" for an arbitrary ADDRESS. - I doubt that "lint" will like this much. */ - -static long -i00afunc (long *address) -{ - struct stk_stat status; - struct stk_trailer *trailer; - long *block, size; - long result = 0; - - /* We want to iterate through all of the segments. The first - step is to get the stack status structure. We could do this - more quickly and more directly, perhaps, by referencing the - $LM00 common block, but I know that this works. */ - - STKSTAT (&status); - - /* Set up the iteration. */ - - trailer = (struct stk_trailer *) (status.current_address - + status.current_size - - 15); - - /* There must be at least one stack segment. Therefore it is - a fatal error if "trailer" is null. */ - - if (trailer == 0) - abort (); - - /* Discard segments that do not contain our argument address. */ - - while (trailer != 0) - { - block = (long *) trailer->this_address; - size = trailer->this_size; - if (block == 0 || size == 0) - abort (); - trailer = (struct stk_trailer *) trailer->link; - if ((block <= address) && (address < (block + size))) - break; - } - - /* Set the result to the offset in this segment and add the sizes - of all predecessor segments. */ - - result = address - block; - - if (trailer == 0) - { - return result; - } - - do - { - if (trailer->this_size <= 0) - abort (); - result += trailer->this_size; - trailer = (struct stk_trailer *) trailer->link; - } - while (trailer != 0); - - /* We are done. Note that if you present a bogus address (one - not in any segment), you will get a different number back, formed - from subtracting the address of the first block. This is probably - not what you want. */ - - return (result); -} - -# else /* not CRAY2 */ -/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. - Determine the number of the cell within the stack, - given the address of the cell. The purpose of this - routine is to linearize, in some sense, stack addresses - for alloca. */ - -static long -i00afunc (long address) -{ - long stkl = 0; - - long size, pseg, this_segment, stack; - long result = 0; - - struct stack_segment_linkage *ssptr; - - /* Register B67 contains the address of the end of the - current stack segment. If you (as a subprogram) store - your registers on the stack and find that you are past - the contents of B67, you have overflowed the segment. - - B67 also points to the stack segment linkage control - area, which is what we are really interested in. */ - - stkl = CRAY_STACKSEG_END (); - ssptr = (struct stack_segment_linkage *) stkl; - - /* If one subtracts 'size' from the end of the segment, - one has the address of the first word of the segment. - - If this is not the first segment, 'pseg' will be - nonzero. */ - - pseg = ssptr->sspseg; - size = ssptr->sssize; - - this_segment = stkl - size; - - /* It is possible that calling this routine itself caused - a stack overflow. Discard stack segments which do not - contain the target address. */ - - while (!(this_segment <= address && address <= stkl)) - { -# ifdef DEBUG_I00AFUNC - fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); -# endif - if (pseg == 0) - break; - stkl = stkl - pseg; - ssptr = (struct stack_segment_linkage *) stkl; - size = ssptr->sssize; - pseg = ssptr->sspseg; - this_segment = stkl - size; - } - - result = address - this_segment; - - /* If you subtract pseg from the current end of the stack, - you get the address of the previous stack segment's end. - This seems a little convoluted to me, but I'll bet you save - a cycle somewhere. */ - - while (pseg != 0) - { -# ifdef DEBUG_I00AFUNC - fprintf (stderr, "%011o %011o\n", pseg, size); -# endif - stkl = stkl - pseg; - ssptr = (struct stack_segment_linkage *) stkl; - size = ssptr->sssize; - pseg = ssptr->sspseg; - result += size; - } - return (result); -} - -# endif /* not CRAY2 */ -# endif /* CRAY */ - -# endif /* no alloca */ -#endif /* not GCC version 3 */ diff --git a/gnulib/lib/alloca.in.h b/gnulib/lib/alloca.in.h deleted file mode 100644 index 5b69c6c..0000000 --- a/gnulib/lib/alloca.in.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Memory allocation on the stack. - - Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation, - Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ - -/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H - means there is a real alloca function. */ -#ifndef _GL_ALLOCA_H -#define _GL_ALLOCA_H - -/* alloca (N) returns a pointer to N bytes of memory - allocated on the stack, which will last until the function returns. - Use of alloca should be avoided: - - inside arguments of function calls - undefined behaviour, - - in inline functions - the allocation may actually last until the - calling function returns, - - for huge N (say, N >= 65536) - you never know how large (or small) - the stack is, and when the stack cannot fulfill the memory allocation - request, the program just crashes. - */ - -#ifndef alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# elif defined _AIX -# define alloca __alloca -# elif defined _MSC_VER -# include -# define alloca _alloca -# elif defined __DECC && defined __VMS -# define alloca __ALLOCA -# else -# include -# ifdef __cplusplus -extern "C" -# endif -void *alloca (size_t); -# endif -#endif - -#endif /* _GL_ALLOCA_H */ diff --git a/gnulib/lib/areadlink-with-size.c b/gnulib/lib/areadlink-with-size.c deleted file mode 100644 index e7e21b7..0000000 --- a/gnulib/lib/areadlink-with-size.c +++ /dev/null @@ -1,104 +0,0 @@ -/* readlink wrapper to return the link name in malloc'd storage. - Unlike xreadlink and xreadlink_with_size, don't ever call exit. - - Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering */ - -#include - -#include "areadlink.h" - -#include -#include -#include -#include -#include - -#ifndef SSIZE_MAX -# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) -#endif - -/* SYMLINK_MAX is used only for an initial memory-allocation sanity - check, so it's OK to guess too small on hosts where there is no - arbitrary limit to symbolic link length. */ -#ifndef SYMLINK_MAX -# define SYMLINK_MAX 1024 -#endif - -#define MAXSIZE (SIZE_MAX < SSIZE_MAX ? SIZE_MAX : SSIZE_MAX) - -/* Call readlink to get the symbolic link value of FILE. - SIZE is a hint as to how long the link is expected to be; - typically it is taken from st_size. It need not be correct. - Return a pointer to that NUL-terminated string in malloc'd storage. - If readlink fails, malloc fails, or if the link value is longer - than SSIZE_MAX, return NULL (caller may use errno to diagnose). */ - -char * -areadlink_with_size (char const *file, size_t size) -{ - /* Some buggy file systems report garbage in st_size. Defend - against them by ignoring outlandish st_size values in the initial - memory allocation. */ - size_t symlink_max = SYMLINK_MAX; - size_t INITIAL_LIMIT_BOUND = 8 * 1024; - size_t initial_limit = (symlink_max < INITIAL_LIMIT_BOUND - ? symlink_max + 1 - : INITIAL_LIMIT_BOUND); - - /* The initial buffer size for the link value. */ - size_t buf_size = size < initial_limit ? size + 1 : initial_limit; - - while (1) - { - ssize_t r; - size_t link_length; - char *buffer = malloc (buf_size); - - if (buffer == NULL) - return NULL; - r = readlink (file, buffer, buf_size); - link_length = r; - - /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1 - with errno == ERANGE if the buffer is too small. */ - if (r < 0 && errno != ERANGE) - { - int saved_errno = errno; - free (buffer); - errno = saved_errno; - return NULL; - } - - if (link_length < buf_size) - { - buffer[link_length] = 0; - return buffer; - } - - free (buffer); - if (buf_size <= MAXSIZE / 2) - buf_size *= 2; - else if (buf_size < MAXSIZE) - buf_size = MAXSIZE; - else - { - errno = ENOMEM; - return NULL; - } - } -} diff --git a/gnulib/lib/areadlink.c b/gnulib/lib/areadlink.c deleted file mode 100644 index bc6104f..0000000 --- a/gnulib/lib/areadlink.c +++ /dev/null @@ -1,131 +0,0 @@ -/* areadlink.c -- readlink wrapper to return the link name in malloc'd storage - Unlike xreadlink and xreadlink_with_size, don't ever call exit. - - Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering - and Bruno Haible . */ - -#include - -/* Specification. */ -#include "areadlink.h" - -#include -#include -#include -#include -#include -#include - -#ifndef SSIZE_MAX -# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) -#endif - -/* Use the system functions, not the gnulib overrides in this file. */ -#undef malloc -#undef realloc - -/* The initial buffer size for the link value. A power of 2 - detects arithmetic overflow earlier, but is not required. */ -enum { - INITIAL_BUF_SIZE = 1024 -}; - -/* Call readlink to get the symbolic link value of FILENAME. - Return a pointer to that NUL-terminated string in malloc'd storage. - If readlink fails, return NULL and set errno. - If realloc fails, or if the link value is longer than SIZE_MAX :-), - return NULL and set errno to ENOMEM. */ - -char * -areadlink (char const *filename) -{ - /* Allocate the initial buffer on the stack. This way, in the common - case of a symlink of small size, we get away with a single small malloc() - instead of a big malloc() followed by a shrinking realloc(). */ - char initial_buf[INITIAL_BUF_SIZE]; - - char *buffer = initial_buf; - size_t buf_size = sizeof initial_buf; - - while (1) - { - /* Attempt to read the link into the current buffer. */ - ssize_t link_length = readlink (filename, buffer, buf_size); - - /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1 - with errno == ERANGE if the buffer is too small. */ - if (link_length < 0 && errno != ERANGE) - { - if (buffer != initial_buf) - { - int saved_errno = errno; - free (buffer); - errno = saved_errno; - } - return NULL; - } - - if ((size_t) link_length < buf_size) - { - buffer[link_length++] = '\0'; - - /* Return it in a chunk of memory as small as possible. */ - if (buffer == initial_buf) - { - buffer = (char *) malloc (link_length); - if (buffer == NULL) - { - /* It's easier to set errno to ENOMEM than to rely on the - 'malloc-posix' gnulib module. */ - errno = ENOMEM; - return NULL; - } - memcpy (buffer, initial_buf, link_length); - } - else - { - /* Shrink buffer before returning it. */ - if ((size_t) link_length < buf_size) - { - char *smaller_buffer = (char *) realloc (buffer, link_length); - - if (smaller_buffer != NULL) - buffer = smaller_buffer; - } - } - return buffer; - } - - if (buffer != initial_buf) - free (buffer); - buf_size *= 2; - if (SSIZE_MAX < buf_size || (SIZE_MAX / 2 < SSIZE_MAX && buf_size == 0)) - { - errno = ENOMEM; - return NULL; - } - buffer = (char *) malloc (buf_size); - if (buffer == NULL) - { - /* It's easier to set errno to ENOMEM than to rely on the - 'malloc-posix' gnulib module. */ - errno = ENOMEM; - return NULL; - } - } -} diff --git a/gnulib/lib/areadlink.h b/gnulib/lib/areadlink.h deleted file mode 100644 index 30e3b69..0000000 --- a/gnulib/lib/areadlink.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Read symbolic links without size limitation. - - Copyright (C) 2001, 2003-2004, 2007, 2009-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering */ - -#include - -extern char *areadlink (char const *filename); -extern char *areadlink_with_size (char const *filename, size_t size_hint); - -#if GNULIB_AREADLINKAT -extern char *areadlinkat (int fd, char const *filename); -#endif - -#if GNULIB_AREADLINKAT_WITH_SIZE -extern char *areadlinkat_with_size (int fd, char const *filename, - size_t size_hint); -#endif diff --git a/gnulib/lib/areadlinkat.c b/gnulib/lib/areadlinkat.c deleted file mode 100644 index a13c0e5..0000000 --- a/gnulib/lib/areadlinkat.c +++ /dev/null @@ -1,145 +0,0 @@ -/* areadlinkat.c -- readlinkat wrapper to return malloc'd link name - Unlike xreadlinkat, only call exit on failure to change directory. - - Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering , - and Bruno Haible , - and Eric Blake . */ - -#include - -/* Specification. */ -#include "areadlink.h" - -#include -#include -#include -#include -#include -#include - -#ifndef SSIZE_MAX -# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) -#endif - -#if HAVE_READLINKAT - -/* The initial buffer size for the link value. A power of 2 - detects arithmetic overflow earlier, but is not required. */ -enum { - INITIAL_BUF_SIZE = 1024 -}; - -/* Call readlinkat to get the symbolic link value of FILENAME relative to FD. - Return a pointer to that NUL-terminated string in malloc'd storage. - If readlinkat fails, return NULL and set errno (although failure to - change directory will issue a diagnostic and exit). - If realloc fails, or if the link value is longer than SIZE_MAX :-), - return NULL and set errno to ENOMEM. */ - -char * -areadlinkat (int fd, char const *filename) -{ - /* Allocate the initial buffer on the stack. This way, in the common - case of a symlink of small size, we get away with a single small malloc() - instead of a big malloc() followed by a shrinking realloc(). */ - char initial_buf[INITIAL_BUF_SIZE]; - - char *buffer = initial_buf; - size_t buf_size = sizeof initial_buf; - - while (1) - { - /* Attempt to read the link into the current buffer. */ - ssize_t link_length = readlinkat (fd, filename, buffer, buf_size); - - /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1 - with errno == ERANGE if the buffer is too small. */ - if (link_length < 0 && errno != ERANGE) - { - if (buffer != initial_buf) - { - int saved_errno = errno; - free (buffer); - errno = saved_errno; - } - return NULL; - } - - if ((size_t) link_length < buf_size) - { - buffer[link_length++] = '\0'; - - /* Return it in a chunk of memory as small as possible. */ - if (buffer == initial_buf) - { - buffer = (char *) malloc (link_length); - if (buffer == NULL) - /* errno is ENOMEM. */ - return NULL; - memcpy (buffer, initial_buf, link_length); - } - else - { - /* Shrink buffer before returning it. */ - if ((size_t) link_length < buf_size) - { - char *smaller_buffer = (char *) realloc (buffer, link_length); - - if (smaller_buffer != NULL) - buffer = smaller_buffer; - } - } - return buffer; - } - - if (buffer != initial_buf) - free (buffer); - buf_size *= 2; - if (SSIZE_MAX < buf_size || (SIZE_MAX / 2 < SSIZE_MAX && buf_size == 0)) - { - errno = ENOMEM; - return NULL; - } - buffer = (char *) malloc (buf_size); - if (buffer == NULL) - /* errno is ENOMEM. */ - return NULL; - } -} - -#else /* !HAVE_READLINKAT */ - -/* It is more efficient to change directories only once and call - areadlink, rather than repeatedly call the replacement - readlinkat. */ - -# define AT_FUNC_NAME areadlinkat -# define AT_FUNC_F1 areadlink -# define AT_FUNC_POST_FILE_PARAM_DECLS /* empty */ -# define AT_FUNC_POST_FILE_ARGS /* empty */ -# define AT_FUNC_RESULT char * -# define AT_FUNC_FAIL NULL -# include "at-func.c" -# undef AT_FUNC_NAME -# undef AT_FUNC_F1 -# undef AT_FUNC_POST_FILE_PARAM_DECLS -# undef AT_FUNC_POST_FILE_ARGS -# undef AT_FUNC_RESULT -# undef AT_FUNC_FAIL - -#endif /* !HAVE_READLINKAT */ diff --git a/gnulib/lib/argmatch.c b/gnulib/lib/argmatch.c deleted file mode 100644 index 9a3eca4..0000000 --- a/gnulib/lib/argmatch.c +++ /dev/null @@ -1,277 +0,0 @@ -/* argmatch.c -- find a match for a string in an array - - Copyright (C) 1990, 1998-1999, 2001-2007, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by David MacKenzie - Modified by Akim Demaille */ - -#include - -/* Specification. */ -#include "argmatch.h" - -#include -#include -#include -#include - -#include "gettext.h" -#define _(msgid) gettext (msgid) - -#include "error.h" -#include "quotearg.h" -#include "quote.h" - -#if USE_UNLOCKED_IO -# include "unlocked-io.h" -#endif - -/* When reporting an invalid argument, show nonprinting characters - by using the quoting style ARGMATCH_QUOTING_STYLE. Do not use - literal_quoting_style. */ -#ifndef ARGMATCH_QUOTING_STYLE -# define ARGMATCH_QUOTING_STYLE locale_quoting_style -#endif - -/* Non failing version of argmatch call this function after failing. */ -#ifndef ARGMATCH_DIE -# include "exitfail.h" -# define ARGMATCH_DIE exit (exit_failure) -#endif - -#ifdef ARGMATCH_DIE_DECL -ARGMATCH_DIE_DECL; -#endif - -static void -__argmatch_die (void) -{ - ARGMATCH_DIE; -} - -/* Used by XARGMATCH and XARGCASEMATCH. See description in argmatch.h. - Default to __argmatch_die, but allow caller to change this at run-time. */ -argmatch_exit_fn argmatch_die = __argmatch_die; - - -/* If ARG is an unambiguous match for an element of the - NULL-terminated array ARGLIST, return the index in ARGLIST - of the matched element, else -1 if it does not match any element - or -2 if it is ambiguous (is a prefix of more than one element). - - If VALLIST is none null, use it to resolve ambiguities limited to - synonyms, i.e., for - "yes", "yop" -> 0 - "no", "nope" -> 1 - "y" is a valid argument, for `0', and "n" for `1'. */ - -ptrdiff_t -argmatch (const char *arg, const char *const *arglist, - const char *vallist, size_t valsize) -{ - size_t i; /* Temporary index in ARGLIST. */ - size_t arglen; /* Length of ARG. */ - ptrdiff_t matchind = -1; /* Index of first nonexact match. */ - bool ambiguous = false; /* If true, multiple nonexact match(es). */ - - arglen = strlen (arg); - - /* Test all elements for either exact match or abbreviated matches. */ - for (i = 0; arglist[i]; i++) - { - if (!strncmp (arglist[i], arg, arglen)) - { - if (strlen (arglist[i]) == arglen) - /* Exact match found. */ - return i; - else if (matchind == -1) - /* First nonexact match found. */ - matchind = i; - else - { - /* Second nonexact match found. */ - if (vallist == NULL - || memcmp (vallist + valsize * matchind, - vallist + valsize * i, valsize)) - { - /* There is a real ambiguity, or we could not - disambiguate. */ - ambiguous = true; - } - } - } - } - if (ambiguous) - return -2; - else - return matchind; -} - -/* Error reporting for argmatch. - CONTEXT is a description of the type of entity that was being matched. - VALUE is the invalid value that was given. - PROBLEM is the return value from argmatch. */ - -void -argmatch_invalid (const char *context, const char *value, ptrdiff_t problem) -{ - char const *format = (problem == -1 - ? _("invalid argument %s for %s") - : _("ambiguous argument %s for %s")); - - error (0, 0, format, quotearg_n_style (0, ARGMATCH_QUOTING_STYLE, value), - quote_n (1, context)); -} - -/* List the valid arguments for argmatch. - ARGLIST is the same as in argmatch. - VALLIST is a pointer to an array of values. - VALSIZE is the size of the elements of VALLIST */ -void -argmatch_valid (const char *const *arglist, - const char *vallist, size_t valsize) -{ - size_t i; - const char *last_val = NULL; - - /* We try to put synonyms on the same line. The assumption is that - synonyms follow each other */ - fprintf (stderr, _("Valid arguments are:")); - for (i = 0; arglist[i]; i++) - if ((i == 0) - || memcmp (last_val, vallist + valsize * i, valsize)) - { - fprintf (stderr, "\n - `%s'", arglist[i]); - last_val = vallist + valsize * i; - } - else - { - fprintf (stderr, ", `%s'", arglist[i]); - } - putc ('\n', stderr); -} - -/* Never failing versions of the previous functions. - - CONTEXT is the context for which argmatch is called (e.g., - "--version-control", or "$VERSION_CONTROL" etc.). Upon failure, - calls the (supposed never to return) function EXIT_FN. */ - -ptrdiff_t -__xargmatch_internal (const char *context, - const char *arg, const char *const *arglist, - const char *vallist, size_t valsize, - argmatch_exit_fn exit_fn) -{ - ptrdiff_t res = argmatch (arg, arglist, vallist, valsize); - if (res >= 0) - /* Success. */ - return res; - - /* We failed. Explain why. */ - argmatch_invalid (context, arg, res); - argmatch_valid (arglist, vallist, valsize); - (*exit_fn) (); - - return -1; /* To please the compilers. */ -} - -/* Look for VALUE in VALLIST, an array of objects of size VALSIZE and - return the first corresponding argument in ARGLIST */ -const char * -argmatch_to_argument (const char *value, - const char *const *arglist, - const char *vallist, size_t valsize) -{ - size_t i; - - for (i = 0; arglist[i]; i++) - if (!memcmp (value, vallist + valsize * i, valsize)) - return arglist[i]; - return NULL; -} - -#ifdef TEST -/* - * Based on "getversion.c" by David MacKenzie - */ -char *program_name; - -/* When to make backup files. */ -enum backup_type -{ - /* Never make backups. */ - no_backups, - - /* Make simple backups of every file. */ - simple_backups, - - /* Make numbered backups of files that already have numbered backups, - and simple backups of the others. */ - numbered_existing_backups, - - /* Make numbered backups of every file. */ - numbered_backups -}; - -/* Two tables describing arguments (keys) and their corresponding - values */ -static const char *const backup_args[] = -{ - "no", "none", "off", - "simple", "never", - "existing", "nil", - "numbered", "t", - 0 -}; - -static const enum backup_type backup_vals[] = -{ - no_backups, no_backups, no_backups, - simple_backups, simple_backups, - numbered_existing_backups, numbered_existing_backups, - numbered_backups, numbered_backups -}; - -int -main (int argc, const char *const *argv) -{ - const char *cp; - enum backup_type backup_type = no_backups; - - program_name = (char *) argv[0]; - - if (argc > 2) - { - fprintf (stderr, "Usage: %s [VERSION_CONTROL]\n", program_name); - exit (1); - } - - if ((cp = getenv ("VERSION_CONTROL"))) - backup_type = XARGMATCH ("$VERSION_CONTROL", cp, - backup_args, backup_vals); - - if (argc == 2) - backup_type = XARGMATCH (program_name, argv[1], - backup_args, backup_vals); - - printf ("The version control is `%s'\n", - ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals)); - - return 0; -} -#endif diff --git a/gnulib/lib/argmatch.h b/gnulib/lib/argmatch.h deleted file mode 100644 index 9ebe2d1..0000000 --- a/gnulib/lib/argmatch.h +++ /dev/null @@ -1,102 +0,0 @@ -/* argmatch.h -- definitions and prototypes for argmatch.c - - Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by David MacKenzie - Modified by Akim Demaille */ - -#ifndef ARGMATCH_H_ -# define ARGMATCH_H_ 1 - -# include - -# include "verify.h" - -# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array)) - -/* Assert there are as many real arguments as there are values - (argument list ends with a NULL guard). */ - -# define ARGMATCH_VERIFY(Arglist, Vallist) \ - verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1) - -/* Return the index of the element of ARGLIST (NULL terminated) that - matches with ARG. If VALLIST is not NULL, then use it to resolve - false ambiguities (i.e., different matches of ARG but corresponding - to the same values in VALLIST). */ - -ptrdiff_t argmatch (char const *arg, char const *const *arglist, - char const *vallist, size_t valsize); - -# define ARGMATCH(Arg, Arglist, Vallist) \ - argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist)) - -/* xargmatch calls this function when it fails. This function should not - return. By default, this is a function that calls ARGMATCH_DIE which - in turn defaults to `exit (exit_failure)'. */ -typedef void (*argmatch_exit_fn) (void); -extern argmatch_exit_fn argmatch_die; - -/* Report on stderr why argmatch failed. Report correct values. */ - -void argmatch_invalid (char const *context, char const *value, - ptrdiff_t problem); - -/* Left for compatibility with the old name invalid_arg */ - -# define invalid_arg(Context, Value, Problem) \ - argmatch_invalid (Context, Value, Problem) - - - -/* Report on stderr the list of possible arguments. */ - -void argmatch_valid (char const *const *arglist, - char const *vallist, size_t valsize); - -# define ARGMATCH_VALID(Arglist, Vallist) \ - argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist)) - - - -/* Same as argmatch, but upon failure, reports a explanation on the - failure, and exits using the function EXIT_FN. */ - -ptrdiff_t __xargmatch_internal (char const *context, - char const *arg, char const *const *arglist, - char const *vallist, size_t valsize, - argmatch_exit_fn exit_fn); - -/* Programmer friendly interface to __xargmatch_internal. */ - -# define XARGMATCH(Context, Arg, Arglist, Vallist) \ - ((Vallist) [__xargmatch_internal (Context, Arg, Arglist, \ - (char const *) (Vallist), \ - sizeof *(Vallist), \ - argmatch_die)]) - -/* Convert a value into a corresponding argument. */ - -char const *argmatch_to_argument (char const *value, - char const *const *arglist, - char const *vallist, size_t valsize); - -# define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist) \ - argmatch_to_argument (Value, Arglist, \ - (char const *) (Vallist), sizeof *(Vallist)) - -#endif /* ARGMATCH_H_ */ diff --git a/gnulib/lib/asnprintf.c b/gnulib/lib/asnprintf.c deleted file mode 100644 index e4fd95c..0000000 --- a/gnulib/lib/asnprintf.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Formatted output to strings. - Copyright (C) 1999, 2002, 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include "vasnprintf.h" - -#include - -char * -asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) -{ - va_list args; - char *result; - - va_start (args, format); - result = vasnprintf (resultbuf, lengthp, format, args); - va_end (args); - return result; -} diff --git a/gnulib/lib/at-func.c b/gnulib/lib/at-func.c deleted file mode 100644 index 52868bc..0000000 --- a/gnulib/lib/at-func.c +++ /dev/null @@ -1,131 +0,0 @@ -/* Define an at-style functions like fstatat, unlinkat, fchownat, etc. - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ -#include "openat.h" -#include "openat-priv.h" -#include "save-cwd.h" - -#ifdef AT_FUNC_USE_F1_COND -# define CALL_FUNC(F) \ - (flag == AT_FUNC_USE_F1_COND \ - ? AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS) \ - : AT_FUNC_F2 (F AT_FUNC_POST_FILE_ARGS)) -# define VALIDATE_FLAG(F) \ - if (flag & ~AT_FUNC_USE_F1_COND) \ - { \ - errno = EINVAL; \ - return FUNC_FAIL; \ - } -#else -# define CALL_FUNC(F) (AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS)) -# define VALIDATE_FLAG(F) /* empty */ -#endif - -#ifdef AT_FUNC_RESULT -# define FUNC_RESULT AT_FUNC_RESULT -#else -# define FUNC_RESULT int -#endif - -#ifdef AT_FUNC_FAIL -# define FUNC_FAIL AT_FUNC_FAIL -#else -# define FUNC_FAIL -1 -#endif - -/* Call AT_FUNC_F1 to operate on FILE, which is in the directory - open on descriptor FD. If AT_FUNC_USE_F1_COND is defined to a value, - AT_FUNC_POST_FILE_PARAM_DECLS must inlude a parameter named flag; - call AT_FUNC_F2 if FLAG is 0 or fail if FLAG contains more bits than - AT_FUNC_USE_F1_COND. Return int and fail with -1 unless AT_FUNC_RESULT - or AT_FUNC_FAIL are defined. If possible, do it without changing the - working directory. Otherwise, resort to using save_cwd/fchdir, - then AT_FUNC_F?/restore_cwd. If either the save_cwd or the restore_cwd - fails, then give a diagnostic and exit nonzero. */ -FUNC_RESULT -AT_FUNC_NAME (int fd, char const *file AT_FUNC_POST_FILE_PARAM_DECLS) -{ - /* Be careful to choose names unlikely to conflict with - AT_FUNC_POST_FILE_PARAM_DECLS. */ - struct saved_cwd saved_cwd; - int saved_errno; - FUNC_RESULT err; - - VALIDATE_FLAG (flag); - - if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file)) - return CALL_FUNC (file); - - { - char proc_buf[OPENAT_BUFFER_SIZE]; - char *proc_file = openat_proc_name (proc_buf, fd, file); - if (proc_file) - { - FUNC_RESULT proc_result = CALL_FUNC (proc_file); - int proc_errno = errno; - if (proc_file != proc_buf) - free (proc_file); - /* If the syscall succeeds, or if it fails with an unexpected - errno value, then return right away. Otherwise, fall through - and resort to using save_cwd/restore_cwd. */ - if (FUNC_FAIL != proc_result) - return proc_result; - if (! EXPECTED_ERRNO (proc_errno)) - { - errno = proc_errno; - return proc_result; - } - } - } - - if (save_cwd (&saved_cwd) != 0) - openat_save_fail (errno); - if (0 <= fd && fd == saved_cwd.desc) - { - /* If saving the working directory collides with the user's - requested fd, then the user's fd must have been closed to - begin with. */ - free_cwd (&saved_cwd); - errno = EBADF; - return FUNC_FAIL; - } - - if (fchdir (fd) != 0) - { - saved_errno = errno; - free_cwd (&saved_cwd); - errno = saved_errno; - return FUNC_FAIL; - } - - err = CALL_FUNC (file); - saved_errno = (err == FUNC_FAIL ? errno : 0); - - if (restore_cwd (&saved_cwd) != 0) - openat_restore_fail (errno); - - free_cwd (&saved_cwd); - - if (saved_errno) - errno = saved_errno; - return err; -} -#undef CALL_FUNC -#undef FUNC_RESULT -#undef FUNC_FAIL diff --git a/gnulib/lib/basename-lgpl.c b/gnulib/lib/basename-lgpl.c deleted file mode 100644 index 529bc35..0000000 --- a/gnulib/lib/basename-lgpl.c +++ /dev/null @@ -1,75 +0,0 @@ -/* basename.c -- return the last element in a file name - - Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "dirname.h" - -#include - -/* Return the address of the last file name component of NAME. If - NAME has no relative file name components because it is a file - system root, return the empty string. */ - -char * -last_component (char const *name) -{ - char const *base = name + FILE_SYSTEM_PREFIX_LEN (name); - char const *p; - bool saw_slash = false; - - while (ISSLASH (*base)) - base++; - - for (p = base; *p; p++) - { - if (ISSLASH (*p)) - saw_slash = true; - else if (saw_slash) - { - base = p; - saw_slash = false; - } - } - - return (char *) base; -} - -/* Return the length of the basename NAME. Typically NAME is the - value returned by base_name or last_component. Act like strlen - (NAME), except omit all trailing slashes. */ - -size_t -base_len (char const *name) -{ - size_t len; - size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name); - - for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) - continue; - - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1 - && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2]) - return 2; - - if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len - && len == prefix_len && ISSLASH (name[prefix_len])) - return prefix_len + 1; - - return len; -} diff --git a/gnulib/lib/basename.c b/gnulib/lib/basename.c deleted file mode 100644 index 90ac501..0000000 --- a/gnulib/lib/basename.c +++ /dev/null @@ -1,58 +0,0 @@ -/* basename.c -- return the last element in a file name - - Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "dirname.h" - -#include -#include "xalloc.h" -#include "xstrndup.h" - -char * -base_name (char const *name) -{ - char const *base = last_component (name); - size_t length; - - /* If there is no last component, then name is a file system root or the - empty string. */ - if (! *base) - return xstrndup (name, base_len (name)); - - /* Collapse a sequence of trailing slashes into one. */ - length = base_len (base); - if (ISSLASH (base[length])) - length++; - - /* On systems with drive letters, `a/b:c' must return `./b:c' rather - than `b:c' to avoid confusion with a drive letter. On systems - with pure POSIX semantics, this is not an issue. */ - if (FILE_SYSTEM_PREFIX_LEN (base)) - { - char *p = xmalloc (length + 3); - p[0] = '.'; - p[1] = '/'; - memcpy (p + 2, base, length); - p[length + 2] = '\0'; - return p; - } - - /* Finally, copy the basename. */ - return xstrndup (base, length); -} diff --git a/gnulib/lib/bitrotate.h b/gnulib/lib/bitrotate.h deleted file mode 100644 index c3a5e1a..0000000 --- a/gnulib/lib/bitrotate.h +++ /dev/null @@ -1,126 +0,0 @@ -/* bitrotate.h - Rotate bits in integers - Copyright (C) 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Simon Josefsson , 2008. */ - -#ifndef _GL_BITROTATE_H -#define _GL_BITROTATE_H - -#include -#include -#include - -#ifdef UINT64_MAX -/* Given an unsigned 64-bit argument X, return the value corresponding - to rotating the bits N steps to the left. N must be between 1 and - 63 inclusive. */ -static inline uint64_t -rotl64 (uint64_t x, int n) -{ - return ((x << n) | (x >> (64 - n))) & UINT64_MAX; -} - -/* Given an unsigned 64-bit argument X, return the value corresponding - to rotating the bits N steps to the right. N must be between 1 to - 63 inclusive.*/ -static inline uint64_t -rotr64 (uint64_t x, int n) -{ - return ((x >> n) | (x << (64 - n))) & UINT64_MAX; -} -#endif - -/* Given an unsigned 32-bit argument X, return the value corresponding - to rotating the bits N steps to the left. N must be between 1 and - 31 inclusive. */ -static inline uint32_t -rotl32 (uint32_t x, int n) -{ - return ((x << n) | (x >> (32 - n))) & UINT32_MAX; -} - -/* Given an unsigned 32-bit argument X, return the value corresponding - to rotating the bits N steps to the right. N must be between 1 to - 31 inclusive.*/ -static inline uint32_t -rotr32 (uint32_t x, int n) -{ - return ((x >> n) | (x << (32 - n))) & UINT32_MAX; -} - -/* Given a size_t argument X, return the value corresponding - to rotating the bits N steps to the left. N must be between 1 and - (CHAR_BIT * sizeof (size_t) - 1) inclusive. */ -static inline size_t -rotl_sz (size_t x, int n) -{ - return ((x << n) | (x >> ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX; -} - -/* Given a size_t argument X, return the value corresponding - to rotating the bits N steps to the right. N must be between 1 to - (CHAR_BIT * sizeof (size_t) - 1) inclusive. */ -static inline size_t -rotr_sz (size_t x, int n) -{ - return ((x >> n) | (x << ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX; -} - -/* Given an unsigned 16-bit argument X, return the value corresponding - to rotating the bits N steps to the left. N must be between 1 to - 15 inclusive, but on most relevant targets N can also be 0 and 16 - because 'int' is at least 32 bits and the arguments must widen - before shifting. */ -static inline uint16_t -rotl16 (uint16_t x, int n) -{ - return ((x << n) | (x >> (16 - n))) & UINT16_MAX; -} - -/* Given an unsigned 16-bit argument X, return the value corresponding - to rotating the bits N steps to the right. N must be in 1 to 15 - inclusive, but on most relevant targets N can also be 0 and 16 - because 'int' is at least 32 bits and the arguments must widen - before shifting. */ -static inline uint16_t -rotr16 (uint16_t x, int n) -{ - return ((x >> n) | (x << (16 - n))) & UINT16_MAX; -} - -/* Given an unsigned 8-bit argument X, return the value corresponding - to rotating the bits N steps to the left. N must be between 1 to 7 - inclusive, but on most relevant targets N can also be 0 and 8 - because 'int' is at least 32 bits and the arguments must widen - before shifting. */ -static inline uint8_t -rotl8 (uint8_t x, int n) -{ - return ((x << n) | (x >> (8 - n))) & UINT8_MAX; -} - -/* Given an unsigned 8-bit argument X, return the value corresponding - to rotating the bits N steps to the right. N must be in 1 to 7 - inclusive, but on most relevant targets N can also be 0 and 8 - because 'int' is at least 32 bits and the arguments must widen - before shifting. */ -static inline uint8_t -rotr8 (uint8_t x, int n) -{ - return ((x >> n) | (x << (8 - n))) & UINT8_MAX; -} - -#endif /* _GL_BITROTATE_H */ diff --git a/gnulib/lib/btowc.c b/gnulib/lib/btowc.c deleted file mode 100644 index 9b3908d..0000000 --- a/gnulib/lib/btowc.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Convert unibyte character to wide character. - Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include - -wint_t -btowc (int c) -{ - if (c != EOF) - { - char buf[1]; - wchar_t wc; - - buf[0] = c; - if (mbtowc (&wc, buf, 1) >= 0) - return wc; - } - return WEOF; -} diff --git a/gnulib/lib/c-ctype.c b/gnulib/lib/c-ctype.c deleted file mode 100644 index 0fb4295..0000000 --- a/gnulib/lib/c-ctype.c +++ /dev/null @@ -1,396 +0,0 @@ -/* Character handling in C locale. - - Copyright 2000-2003, 2006, 2009-2011 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software Foundation, -Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#define NO_C_CTYPE_MACROS -#include "c-ctype.h" - -/* The function isascii is not locale dependent. Its use in EBCDIC is - questionable. */ -bool -c_isascii (int c) -{ - return (c >= 0x00 && c <= 0x7f); -} - -bool -c_isalnum (int c) -{ -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII - return ((c >= '0' && c <= '9') - || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')); -#else - return ((c >= '0' && c <= '9') - || (c >= 'A' && c <= 'Z') - || (c >= 'a' && c <= 'z')); -#endif -#else - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isalpha (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII - return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'); -#else - return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); -#endif -#else - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isblank (int c) -{ - return (c == ' ' || c == '\t'); -} - -bool -c_iscntrl (int c) -{ -#if C_CTYPE_ASCII - return ((c & ~0x1f) == 0 || c == 0x7f); -#else - switch (c) - { - case ' ': case '!': case '"': case '#': case '$': case '%': - case '&': case '\'': case '(': case ')': case '*': case '+': - case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case '[': case '\\': case ']': case '^': case '_': case '`': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '{': case '|': case '}': case '~': - return 0; - default: - return 1; - } -#endif -} - -bool -c_isdigit (int c) -{ -#if C_CTYPE_CONSECUTIVE_DIGITS - return (c >= '0' && c <= '9'); -#else - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - return 1; - default: - return 0; - } -#endif -} - -bool -c_islower (int c) -{ -#if C_CTYPE_CONSECUTIVE_LOWERCASE - return (c >= 'a' && c <= 'z'); -#else - switch (c) - { - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isgraph (int c) -{ -#if C_CTYPE_ASCII - return (c >= '!' && c <= '~'); -#else - switch (c) - { - case '!': case '"': case '#': case '$': case '%': case '&': - case '\'': case '(': case ')': case '*': case '+': case ',': - case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case '[': case '\\': case ']': case '^': case '_': case '`': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '{': case '|': case '}': case '~': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isprint (int c) -{ -#if C_CTYPE_ASCII - return (c >= ' ' && c <= '~'); -#else - switch (c) - { - case ' ': case '!': case '"': case '#': case '$': case '%': - case '&': case '\'': case '(': case ')': case '*': case '+': - case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case '[': case '\\': case ']': case '^': case '_': case '`': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '{': case '|': case '}': case '~': - return 1; - default: - return 0; - } -#endif -} - -bool -c_ispunct (int c) -{ -#if C_CTYPE_ASCII - return ((c >= '!' && c <= '~') - && !((c >= '0' && c <= '9') - || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'))); -#else - switch (c) - { - case '!': case '"': case '#': case '$': case '%': case '&': - case '\'': case '(': case ')': case '*': case '+': case ',': - case '-': case '.': case '/': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case '[': case '\\': case ']': case '^': case '_': case '`': - case '{': case '|': case '}': case '~': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isspace (int c) -{ - return (c == ' ' || c == '\t' - || c == '\n' || c == '\v' || c == '\f' || c == '\r'); -} - -bool -c_isupper (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE - return (c >= 'A' && c <= 'Z'); -#else - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isxdigit (int c) -{ -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII - return ((c >= '0' && c <= '9') - || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F')); -#else - return ((c >= '0' && c <= '9') - || (c >= 'A' && c <= 'F') - || (c >= 'a' && c <= 'f')); -#endif -#else - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - return 1; - default: - return 0; - } -#endif -} - -int -c_tolower (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE - return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c); -#else - switch (c) - { - case 'A': return 'a'; - case 'B': return 'b'; - case 'C': return 'c'; - case 'D': return 'd'; - case 'E': return 'e'; - case 'F': return 'f'; - case 'G': return 'g'; - case 'H': return 'h'; - case 'I': return 'i'; - case 'J': return 'j'; - case 'K': return 'k'; - case 'L': return 'l'; - case 'M': return 'm'; - case 'N': return 'n'; - case 'O': return 'o'; - case 'P': return 'p'; - case 'Q': return 'q'; - case 'R': return 'r'; - case 'S': return 's'; - case 'T': return 't'; - case 'U': return 'u'; - case 'V': return 'v'; - case 'W': return 'w'; - case 'X': return 'x'; - case 'Y': return 'y'; - case 'Z': return 'z'; - default: return c; - } -#endif -} - -int -c_toupper (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE - return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c); -#else - switch (c) - { - case 'a': return 'A'; - case 'b': return 'B'; - case 'c': return 'C'; - case 'd': return 'D'; - case 'e': return 'E'; - case 'f': return 'F'; - case 'g': return 'G'; - case 'h': return 'H'; - case 'i': return 'I'; - case 'j': return 'J'; - case 'k': return 'K'; - case 'l': return 'L'; - case 'm': return 'M'; - case 'n': return 'N'; - case 'o': return 'O'; - case 'p': return 'P'; - case 'q': return 'Q'; - case 'r': return 'R'; - case 's': return 'S'; - case 't': return 'T'; - case 'u': return 'U'; - case 'v': return 'V'; - case 'w': return 'W'; - case 'x': return 'X'; - case 'y': return 'Y'; - case 'z': return 'Z'; - default: return c; - } -#endif -} diff --git a/gnulib/lib/c-ctype.h b/gnulib/lib/c-ctype.h deleted file mode 100644 index 57e71ee..0000000 --- a/gnulib/lib/c-ctype.h +++ /dev/null @@ -1,295 +0,0 @@ -/* Character handling in C locale. - - These functions work like the corresponding functions in , - except that they have the C (POSIX) locale hardwired, whereas the - functions' behaviour depends on the current locale set via - setlocale. - - Copyright (C) 2000-2003, 2006, 2008-2011 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software Foundation, -Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef C_CTYPE_H -#define C_CTYPE_H - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* The functions defined in this file assume the "C" locale and a character - set without diacritics (ASCII-US or EBCDIC-US or something like that). - Even if the "C" locale on a particular system is an extension of the ASCII - character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it - is ISO-8859-1), the functions in this file recognize only the ASCII - characters. */ - - -/* Check whether the ASCII optimizations apply. */ - -/* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that - '0', '1', ..., '9' have consecutive integer values. */ -#define C_CTYPE_CONSECUTIVE_DIGITS 1 - -#if ('A' <= 'Z') \ - && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \ - && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \ - && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \ - && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \ - && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \ - && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \ - && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \ - && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \ - && ('Y' + 1 == 'Z') -#define C_CTYPE_CONSECUTIVE_UPPERCASE 1 -#endif - -#if ('a' <= 'z') \ - && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \ - && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \ - && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \ - && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \ - && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \ - && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \ - && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \ - && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \ - && ('y' + 1 == 'z') -#define C_CTYPE_CONSECUTIVE_LOWERCASE 1 -#endif - -#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) -/* The character set is ASCII or one of its variants or extensions, not EBCDIC. - Testing the value of '\n' and '\r' is not relevant. */ -#define C_CTYPE_ASCII 1 -#endif - - -/* Function declarations. */ - -/* Unlike the functions in , which require an argument in the range - of the 'unsigned char' type, the functions here operate on values that are - in the 'unsigned char' range or in the 'char' range. In other words, - when you have a 'char' value, you need to cast it before using it as - argument to a function: - - const char *s = ...; - if (isalpha ((unsigned char) *s)) ... - - but you don't need to cast it for the functions defined in this file: - - const char *s = ...; - if (c_isalpha (*s)) ... - */ - -extern bool c_isascii (int c); /* not locale dependent */ - -extern bool c_isalnum (int c); -extern bool c_isalpha (int c); -extern bool c_isblank (int c); -extern bool c_iscntrl (int c); -extern bool c_isdigit (int c); -extern bool c_islower (int c); -extern bool c_isgraph (int c); -extern bool c_isprint (int c); -extern bool c_ispunct (int c); -extern bool c_isspace (int c); -extern bool c_isupper (int c); -extern bool c_isxdigit (int c); - -extern int c_tolower (int c); -extern int c_toupper (int c); - - -#if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS - -/* ASCII optimizations. */ - -#undef c_isascii -#define c_isascii(c) \ - ({ int __c = (c); \ - (__c >= 0x00 && __c <= 0x7f); \ - }) - -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII -#undef c_isalnum -#define c_isalnum(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \ - }) -#else -#undef c_isalnum -#define c_isalnum(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || (__c >= 'A' && __c <= 'Z') \ - || (__c >= 'a' && __c <= 'z')); \ - }) -#endif -#endif - -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII -#undef c_isalpha -#define c_isalpha(c) \ - ({ int __c = (c); \ - ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \ - }) -#else -#undef c_isalpha -#define c_isalpha(c) \ - ({ int __c = (c); \ - ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \ - }) -#endif -#endif - -#undef c_isblank -#define c_isblank(c) \ - ({ int __c = (c); \ - (__c == ' ' || __c == '\t'); \ - }) - -#if C_CTYPE_ASCII -#undef c_iscntrl -#define c_iscntrl(c) \ - ({ int __c = (c); \ - ((__c & ~0x1f) == 0 || __c == 0x7f); \ - }) -#endif - -#if C_CTYPE_CONSECUTIVE_DIGITS -#undef c_isdigit -#define c_isdigit(c) \ - ({ int __c = (c); \ - (__c >= '0' && __c <= '9'); \ - }) -#endif - -#if C_CTYPE_CONSECUTIVE_LOWERCASE -#undef c_islower -#define c_islower(c) \ - ({ int __c = (c); \ - (__c >= 'a' && __c <= 'z'); \ - }) -#endif - -#if C_CTYPE_ASCII -#undef c_isgraph -#define c_isgraph(c) \ - ({ int __c = (c); \ - (__c >= '!' && __c <= '~'); \ - }) -#endif - -#if C_CTYPE_ASCII -#undef c_isprint -#define c_isprint(c) \ - ({ int __c = (c); \ - (__c >= ' ' && __c <= '~'); \ - }) -#endif - -#if C_CTYPE_ASCII -#undef c_ispunct -#define c_ispunct(c) \ - ({ int _c = (c); \ - (c_isgraph (_c) && ! c_isalnum (_c)); \ - }) -#endif - -#undef c_isspace -#define c_isspace(c) \ - ({ int __c = (c); \ - (__c == ' ' || __c == '\t' \ - || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \ - }) - -#if C_CTYPE_CONSECUTIVE_UPPERCASE -#undef c_isupper -#define c_isupper(c) \ - ({ int __c = (c); \ - (__c >= 'A' && __c <= 'Z'); \ - }) -#endif - -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII -#undef c_isxdigit -#define c_isxdigit(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \ - }) -#else -#undef c_isxdigit -#define c_isxdigit(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || (__c >= 'A' && __c <= 'F') \ - || (__c >= 'a' && __c <= 'f')); \ - }) -#endif -#endif - -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#undef c_tolower -#define c_tolower(c) \ - ({ int __c = (c); \ - (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \ - }) -#undef c_toupper -#define c_toupper(c) \ - ({ int __c = (c); \ - (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \ - }) -#endif - -#endif /* optimizing for speed */ - - -#ifdef __cplusplus -} -#endif - -#endif /* C_CTYPE_H */ diff --git a/gnulib/lib/c-strcase.h b/gnulib/lib/c-strcase.h deleted file mode 100644 index 4148c34..0000000 --- a/gnulib/lib/c-strcase.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Case-insensitive string comparison functions in C locale. - Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2011 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef C_STRCASE_H -#define C_STRCASE_H - -#include - - -/* The functions defined in this file assume the "C" locale and a character - set without diacritics (ASCII-US or EBCDIC-US or something like that). - Even if the "C" locale on a particular system is an extension of the ASCII - character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it - is ISO-8859-1), the functions in this file recognize only the ASCII - characters. More precisely, one of the string arguments must be an ASCII - string; the other one can also contain non-ASCII characters (but then - the comparison result will be nonzero). */ - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Compare strings S1 and S2, ignoring case, returning less than, equal to or - greater than zero if S1 is lexicographically less than, equal to or greater - than S2. */ -extern int c_strcasecmp (const char *s1, const char *s2); - -/* Compare no more than N characters of strings S1 and S2, ignoring case, - returning less than, equal to or greater than zero if S1 is - lexicographically less than, equal to or greater than S2. */ -extern int c_strncasecmp (const char *s1, const char *s2, size_t n); - - -#ifdef __cplusplus -} -#endif - - -#endif /* C_STRCASE_H */ diff --git a/gnulib/lib/c-strcasecmp.c b/gnulib/lib/c-strcasecmp.c deleted file mode 100644 index 4c4e106..0000000 --- a/gnulib/lib/c-strcasecmp.c +++ /dev/null @@ -1,57 +0,0 @@ -/* c-strcasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include "c-strcase.h" - -#include - -#include "c-ctype.h" - -int -c_strcasecmp (const char *s1, const char *s2) -{ - register const unsigned char *p1 = (const unsigned char *) s1; - register const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - - if (p1 == p2) - return 0; - - do - { - c1 = c_tolower (*p1); - c2 = c_tolower (*p2); - - if (c1 == '\0') - break; - - ++p1; - ++p2; - } - while (c1 == c2); - - if (UCHAR_MAX <= INT_MAX) - return c1 - c2; - else - /* On machines where 'char' and 'int' are types of the same size, the - difference of two 'unsigned char' values - including the sign bit - - doesn't fit in an 'int'. */ - return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); -} diff --git a/gnulib/lib/c-strcasestr.c b/gnulib/lib/c-strcasestr.c deleted file mode 100644 index 45fccca..0000000 --- a/gnulib/lib/c-strcasestr.c +++ /dev/null @@ -1,77 +0,0 @@ -/* c-strcasestr.c -- case insensitive substring search in C locale - Copyright (C) 2005-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2005. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include "c-strcasestr.h" - -#include -#include - -#include "c-ctype.h" -#include "c-strcase.h" - -/* Two-Way algorithm. */ -#define RETURN_TYPE char * -#define AVAILABLE(h, h_l, j, n_l) \ - (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ - && ((h_l) = (j) + (n_l))) -#define CANON_ELEMENT c_tolower -#define CMP_FUNC(p1, p2, l) \ - c_strncasecmp ((const char *) (p1), (const char *) (p2), l) -#include "str-two-way.h" - -/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive - comparison from the C locale, regardless of the current locale. */ -char * -c_strcasestr (const char *haystack_start, const char *needle_start) -{ - const char *haystack = haystack_start; - const char *needle = needle_start; - size_t needle_len; /* Length of NEEDLE. */ - size_t haystack_len; /* Known minimum length of HAYSTACK. */ - bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ - - /* Determine length of NEEDLE, and in the process, make sure - HAYSTACK is at least as long (no point processing all of a long - NEEDLE if HAYSTACK is too short). */ - while (*haystack && *needle) - ok &= (c_tolower ((unsigned char) *haystack++) - == c_tolower ((unsigned char) *needle++)); - if (*needle) - return NULL; - if (ok) - return (char *) haystack_start; - needle_len = needle - needle_start; - haystack = haystack_start + 1; - haystack_len = needle_len - 1; - - /* Perform the search. Abstract memory is considered to be an array - of 'unsigned char' values, not an array of 'char' values. See - ISO C 99 section 6.2.6.1. */ - if (needle_len < LONG_NEEDLE_THRESHOLD) - return two_way_short_needle ((const unsigned char *) haystack, - haystack_len, - (const unsigned char *) needle_start, - needle_len); - return two_way_long_needle ((const unsigned char *) haystack, haystack_len, - (const unsigned char *) needle_start, - needle_len); -} - -#undef LONG_NEEDLE_THRESHOLD diff --git a/gnulib/lib/c-strcasestr.h b/gnulib/lib/c-strcasestr.h deleted file mode 100644 index 396c0d4..0000000 --- a/gnulib/lib/c-strcasestr.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Case-insensitive searching in a string in C locale. - Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef C_STRCASESTR_H -#define C_STRCASESTR_H - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive - comparison. */ -extern char *c_strcasestr (const char *haystack, const char *needle); - - -#ifdef __cplusplus -} -#endif - - -#endif /* C_STRCASESTR_H */ diff --git a/gnulib/lib/c-strncasecmp.c b/gnulib/lib/c-strncasecmp.c deleted file mode 100644 index 0c433b9..0000000 --- a/gnulib/lib/c-strncasecmp.c +++ /dev/null @@ -1,57 +0,0 @@ -/* c-strncasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include "c-strcase.h" - -#include - -#include "c-ctype.h" - -int -c_strncasecmp (const char *s1, const char *s2, size_t n) -{ - register const unsigned char *p1 = (const unsigned char *) s1; - register const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - - if (p1 == p2 || n == 0) - return 0; - - do - { - c1 = c_tolower (*p1); - c2 = c_tolower (*p2); - - if (--n == 0 || c1 == '\0') - break; - - ++p1; - ++p2; - } - while (c1 == c2); - - if (UCHAR_MAX <= INT_MAX) - return c1 - c2; - else - /* On machines where 'char' and 'int' are types of the same size, the - difference of two 'unsigned char' values - including the sign bit - - doesn't fit in an 'int'. */ - return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); -} diff --git a/gnulib/lib/c-strstr.c b/gnulib/lib/c-strstr.c deleted file mode 100644 index 307c1f9..0000000 --- a/gnulib/lib/c-strstr.c +++ /dev/null @@ -1,32 +0,0 @@ -/* c-strstr.c -- substring search in C locale - Copyright (C) 2005-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2005, 2007. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include "c-strstr.h" - -#include - -/* Find the first occurrence of NEEDLE in HAYSTACK. */ -char * -c_strstr (const char *haystack, const char *needle) -{ - /* POSIX says that strstr() interprets the strings as byte sequences, not - as character sequences in the current locale. */ - return strstr (haystack, needle); -} diff --git a/gnulib/lib/c-strstr.h b/gnulib/lib/c-strstr.h deleted file mode 100644 index b4206b9..0000000 --- a/gnulib/lib/c-strstr.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Searching in a string. - Copyright (C) 2001-2003, 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - - -/* The functions defined in this file assume a nearly ASCII compatible - character set. */ - - -#ifdef __cplusplus -extern "C" { -#endif - -/* Find the first occurrence of NEEDLE in HAYSTACK. - This function is safe to be called, even in a multibyte locale, if NEEDLE - 1. consists solely of printable ASCII characters excluding '\\' and '~' - [this restriction is needed because of Shift_JIS and JOHAB] - or of the control ASCII characters '\a' '\b' '\f' '\n' '\r' '\t' '\v' - [this restriction is needed because of VISCII], and - 2. has at least length 2 - [this restriction is needed because of BIG5, BIG5-HKSCS, GBK, GB18030, - Shift_JIS, JOHAB], and - 3. does not consist entirely of decimal digits, or has at least length 4 - [this restricion is needed because of GB18030]. - This function is also safe to be called, even in a multibyte locale, if - HAYSTACK and NEEDLE are known to both consist solely of printable ASCII - characters excluding '\\' and '~'. */ -extern char *c_strstr (const char *haystack, const char *needle); - -#ifdef __cplusplus -} -#endif diff --git a/gnulib/lib/canonicalize.c b/gnulib/lib/canonicalize.c deleted file mode 100644 index a329a33..0000000 --- a/gnulib/lib/canonicalize.c +++ /dev/null @@ -1,290 +0,0 @@ -/* Return the canonical absolute name of a given file. - Copyright (C) 1996-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "canonicalize.h" - -#include -#include -#include -#include -#include - -#include "areadlink.h" -#include "file-set.h" -#include "hash-triple.h" -#include "pathmax.h" -#include "xalloc.h" -#include "xgetcwd.h" - -#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT -# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 -#endif - -#if !((HAVE_CANONICALIZE_FILE_NAME && FUNC_REALPATH_WORKS) \ - || GNULIB_CANONICALIZE_LGPL) -/* Return the canonical absolute name of file NAME. A canonical name - does not contain any `.', `..' components nor any repeated file name - separators ('/') or symlinks. All components must exist. - The result is malloc'd. */ - -char * -canonicalize_file_name (const char *name) -{ - return canonicalize_filename_mode (name, CAN_EXISTING); -} -#endif /* !HAVE_CANONICALIZE_FILE_NAME */ - -/* Return true if we've already seen the triple, . - If *HT is not initialized, initialize it. */ -static bool -seen_triple (Hash_table **ht, char const *filename, struct stat const *st) -{ - if (*ht == NULL) - { - size_t initial_capacity = 7; - *ht = hash_initialize (initial_capacity, - NULL, - triple_hash, - triple_compare_ino_str, - triple_free); - if (*ht == NULL) - xalloc_die (); - } - - if (seen_file (*ht, filename, st)) - return true; - - record_file (*ht, filename, st); - return false; -} - -/* Return the canonical absolute name of file NAME, while treating - missing elements according to CAN_MODE. A canonical name - does not contain any `.', `..' components nor any repeated file name - separators ('/') or symlinks. Whether components must exist - or not depends on canonicalize mode. The result is malloc'd. */ - -char * -canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode) -{ - char *rname, *dest, *extra_buf = NULL; - char const *start; - char const *end; - char const *rname_limit; - size_t extra_len = 0; - Hash_table *ht = NULL; - int saved_errno; - - if (name == NULL) - { - errno = EINVAL; - return NULL; - } - - if (name[0] == '\0') - { - errno = ENOENT; - return NULL; - } - - if (name[0] != '/') - { - rname = xgetcwd (); - if (!rname) - return NULL; - dest = strchr (rname, '\0'); - if (dest - rname < PATH_MAX) - { - char *p = xrealloc (rname, PATH_MAX); - dest = p + (dest - rname); - rname = p; - rname_limit = rname + PATH_MAX; - } - else - { - rname_limit = dest; - } - } - else - { - rname = xmalloc (PATH_MAX); - rname_limit = rname + PATH_MAX; - rname[0] = '/'; - dest = rname + 1; - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && name[1] == '/') - *dest++ = '/'; - } - - for (start = name; *start; start = end) - { - /* Skip sequence of multiple file name separators. */ - while (*start == '/') - ++start; - - /* Find end of component. */ - for (end = start; *end && *end != '/'; ++end) - /* Nothing. */; - - if (end - start == 0) - break; - else if (end - start == 1 && start[0] == '.') - /* nothing */; - else if (end - start == 2 && start[0] == '.' && start[1] == '.') - { - /* Back up to previous component, ignore if at root already. */ - if (dest > rname + 1) - while ((--dest)[-1] != '/'); - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 - && *dest == '/') - dest++; - } - else - { - struct stat st; - - if (dest[-1] != '/') - *dest++ = '/'; - - if (dest + (end - start) >= rname_limit) - { - ptrdiff_t dest_offset = dest - rname; - size_t new_size = rname_limit - rname; - - if (end - start + 1 > PATH_MAX) - new_size += end - start + 1; - else - new_size += PATH_MAX; - rname = xrealloc (rname, new_size); - rname_limit = rname + new_size; - - dest = rname + dest_offset; - } - - dest = memcpy (dest, start, end - start); - dest += end - start; - *dest = '\0'; - - if (lstat (rname, &st) != 0) - { - saved_errno = errno; - if (can_mode == CAN_EXISTING) - goto error; - if (can_mode == CAN_ALL_BUT_LAST) - { - if (end[strspn (end, "/")] || saved_errno != ENOENT) - goto error; - continue; - } - st.st_mode = 0; - } - - if (S_ISLNK (st.st_mode)) - { - char *buf; - size_t n, len; - - /* Detect loops. We cannot use the cycle-check module here, - since it's actually possible to encounter the same symlink - more than once in a given traversal. However, encountering - the same symlink,NAME pair twice does indicate a loop. */ - if (seen_triple (&ht, name, &st)) - { - if (can_mode == CAN_MISSING) - continue; - saved_errno = ELOOP; - goto error; - } - - buf = areadlink_with_size (rname, st.st_size); - if (!buf) - { - if (can_mode == CAN_MISSING && errno != ENOMEM) - continue; - saved_errno = errno; - goto error; - } - - n = strlen (buf); - len = strlen (end); - - if (!extra_len) - { - extra_len = - ((n + len + 1) > PATH_MAX) ? (n + len + 1) : PATH_MAX; - extra_buf = xmalloc (extra_len); - } - else if ((n + len + 1) > extra_len) - { - extra_len = n + len + 1; - extra_buf = xrealloc (extra_buf, extra_len); - } - - /* Careful here, end may be a pointer into extra_buf... */ - memmove (&extra_buf[n], end, len + 1); - name = end = memcpy (extra_buf, buf, n); - - if (buf[0] == '/') - { - dest = rname + 1; /* It's an absolute symlink */ - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && buf[1] == '/') - *dest++ = '/'; - } - else - { - /* Back up to previous component, ignore if at root - already: */ - if (dest > rname + 1) - while ((--dest)[-1] != '/'); - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 - && *dest == '/') - dest++; - } - - free (buf); - } - else - { - if (!S_ISDIR (st.st_mode) && *end && (can_mode != CAN_MISSING)) - { - saved_errno = ENOTDIR; - goto error; - } - } - } - } - if (dest > rname + 1 && dest[-1] == '/') - --dest; - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 && *dest == '/') - dest++; - *dest = '\0'; - if (rname_limit != dest + 1) - rname = xrealloc (rname, dest - rname + 1); - - free (extra_buf); - if (ht) - hash_free (ht); - return rname; - -error: - free (extra_buf); - free (rname); - if (ht) - hash_free (ht); - errno = saved_errno; - return NULL; -} diff --git a/gnulib/lib/canonicalize.h b/gnulib/lib/canonicalize.h deleted file mode 100644 index 04ad79c..0000000 --- a/gnulib/lib/canonicalize.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Return the canonical absolute name of a given file. - Copyright (C) 1996-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef CANONICALIZE_H_ -# define CANONICALIZE_H_ - -#include /* for canonicalize_file_name */ - -enum canonicalize_mode_t - { - /* All components must exist. */ - CAN_EXISTING = 0, - - /* All components excluding last one must exist. */ - CAN_ALL_BUT_LAST = 1, - - /* No requirements on components existence. */ - CAN_MISSING = 2 - }; -typedef enum canonicalize_mode_t canonicalize_mode_t; - -/* Return a malloc'd string containing the canonical absolute name of - the named file. This acts like canonicalize_file_name, except that - whether components must exist depends on the canonicalize_mode_t - argument. */ -char *canonicalize_filename_mode (const char *, canonicalize_mode_t); - -#endif /* !CANONICALIZE_H_ */ diff --git a/gnulib/lib/chdir-long.c b/gnulib/lib/chdir-long.c deleted file mode 100644 index 96b750c..0000000 --- a/gnulib/lib/chdir-long.c +++ /dev/null @@ -1,266 +0,0 @@ -/* provide a chdir function that tries not to fail due to ENAMETOOLONG - Copyright (C) 2004-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include "chdir-long.h" - -#include -#include -#include -#include -#include -#include -#include - -#ifndef PATH_MAX -# error "compile this file only if your system defines PATH_MAX" -#endif - -/* The results of openat() in this file are not leaked to any - single-threaded code that could use stdio. - FIXME - if the kernel ever adds support for multi-thread safety for - avoiding standard fds, then we should use openat_safer. */ - -struct cd_buf -{ - int fd; -}; - -static inline void -cdb_init (struct cd_buf *cdb) -{ - cdb->fd = AT_FDCWD; -} - -static inline int -cdb_fchdir (struct cd_buf const *cdb) -{ - return fchdir (cdb->fd); -} - -static inline void -cdb_free (struct cd_buf const *cdb) -{ - if (0 <= cdb->fd) - { - bool close_fail = close (cdb->fd); - assert (! close_fail); - } -} - -/* Given a file descriptor of an open directory (or AT_FDCWD), CDB->fd, - try to open the CDB->fd-relative directory, DIR. If the open succeeds, - update CDB->fd with the resulting descriptor, close the incoming file - descriptor, and return zero. Upon failure, return -1 and set errno. */ -static int -cdb_advance_fd (struct cd_buf *cdb, char const *dir) -{ - int new_fd = openat (cdb->fd, dir, - O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK); - if (new_fd < 0) - return -1; - - cdb_free (cdb); - cdb->fd = new_fd; - - return 0; -} - -/* Return a pointer to the first non-slash in S. */ -static inline char * -find_non_slash (char const *s) -{ - size_t n_slash = strspn (s, "/"); - return (char *) s + n_slash; -} - -/* This is a function much like chdir, but without the PATH_MAX limitation - on the length of the directory name. A significant difference is that - it must be able to modify (albeit only temporarily) the directory - name. It handles an arbitrarily long directory name by operating - on manageable portions of the name. On systems without the openat - syscall, this means changing the working directory to more and more - `distant' points along the long directory name and then restoring - the working directory. If any of those attempts to save or restore - the working directory fails, this function exits nonzero. - - Note that this function may still fail with errno == ENAMETOOLONG, but - only if the specified directory name contains a component that is long - enough to provoke such a failure all by itself (e.g. if the component - has length PATH_MAX or greater on systems that define PATH_MAX). */ - -int -chdir_long (char *dir) -{ - int e = chdir (dir); - if (e == 0 || errno != ENAMETOOLONG) - return e; - - { - size_t len = strlen (dir); - char *dir_end = dir + len; - struct cd_buf cdb; - size_t n_leading_slash; - - cdb_init (&cdb); - - /* If DIR is the empty string, then the chdir above - must have failed and set errno to ENOENT. */ - assert (0 < len); - assert (PATH_MAX <= len); - - /* Count leading slashes. */ - n_leading_slash = strspn (dir, "/"); - - /* Handle any leading slashes as well as any name that matches - the regular expression, m!^//hostname[/]*! . Handling this - prefix separately usually results in a single additional - cdb_advance_fd call, but it's worthwhile, since it makes the - code in the following loop cleaner. */ - if (n_leading_slash == 2) - { - int err; - /* Find next slash. - We already know that dir[2] is neither a slash nor '\0'. */ - char *slash = memchr (dir + 3, '/', dir_end - (dir + 3)); - if (slash == NULL) - { - errno = ENAMETOOLONG; - return -1; - } - *slash = '\0'; - err = cdb_advance_fd (&cdb, dir); - *slash = '/'; - if (err != 0) - goto Fail; - dir = find_non_slash (slash + 1); - } - else if (n_leading_slash) - { - if (cdb_advance_fd (&cdb, "/") != 0) - goto Fail; - dir += n_leading_slash; - } - - assert (*dir != '/'); - assert (dir <= dir_end); - - while (PATH_MAX <= dir_end - dir) - { - int err; - /* Find a slash that is PATH_MAX or fewer bytes away from dir. - I.e. see if there is a slash that will give us a name of - length PATH_MAX-1 or less. */ - char *slash = memrchr (dir, '/', PATH_MAX); - if (slash == NULL) - { - errno = ENAMETOOLONG; - return -1; - } - - *slash = '\0'; - assert (slash - dir < PATH_MAX); - err = cdb_advance_fd (&cdb, dir); - *slash = '/'; - if (err != 0) - goto Fail; - - dir = find_non_slash (slash + 1); - } - - if (dir < dir_end) - { - if (cdb_advance_fd (&cdb, dir) != 0) - goto Fail; - } - - if (cdb_fchdir (&cdb) != 0) - goto Fail; - - cdb_free (&cdb); - return 0; - - Fail: - { - int saved_errno = errno; - cdb_free (&cdb); - errno = saved_errno; - return -1; - } - } -} - -#if TEST_CHDIR - -# include "closeout.h" -# include "error.h" - -char *program_name; - -int -main (int argc, char *argv[]) -{ - char *line = NULL; - size_t n = 0; - int len; - - program_name = argv[0]; - atexit (close_stdout); - - len = getline (&line, &n, stdin); - if (len < 0) - { - int saved_errno = errno; - if (feof (stdin)) - exit (0); - - error (EXIT_FAILURE, saved_errno, - "reading standard input"); - } - else if (len == 0) - exit (0); - - if (line[len-1] == '\n') - line[len-1] = '\0'; - - if (chdir_long (line) != 0) - error (EXIT_FAILURE, errno, - "chdir_long failed: %s", line); - - if (argc <= 1) - { - /* Using `pwd' here makes sense only if it is a robust implementation, - like the one in coreutils after the 2004-04-19 changes. */ - char const *cmd = "pwd"; - execlp (cmd, (char *) NULL); - error (EXIT_FAILURE, errno, "%s", cmd); - } - - fclose (stdin); - fclose (stderr); - - exit (EXIT_SUCCESS); -} -#endif - -/* -Local Variables: -compile-command: "gcc -DTEST_CHDIR=1 -g -O -W -Wall chdir-long.c libcoreutils.a" -End: -*/ diff --git a/gnulib/lib/chdir-long.h b/gnulib/lib/chdir-long.h deleted file mode 100644 index 1ad9dd8..0000000 --- a/gnulib/lib/chdir-long.h +++ /dev/null @@ -1,34 +0,0 @@ -/* provide a chdir function that tries not to fail due to ENAMETOOLONG - Copyright (C) 2004-2005, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include -#include - -#ifndef PATH_MAX -# ifdef MAXPATHLEN -# define PATH_MAX MAXPATHLEN -# endif -#endif - -/* On systems without PATH_MAX, presume that chdir accepts - arbitrarily long directory names. */ -#ifndef PATH_MAX -# define chdir_long(Dir) chdir (Dir) -#else -int chdir_long (char *dir); -#endif diff --git a/gnulib/lib/chown.c b/gnulib/lib/chown.c deleted file mode 100644 index 9d97e73..0000000 --- a/gnulib/lib/chown.c +++ /dev/null @@ -1,156 +0,0 @@ -/* provide consistent interface to chown for systems that don't interpret - an ID of -1 as meaning `don't change the corresponding ID'. - - Copyright (C) 1997, 2004-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -/* Specification. */ -#include - -#include -#include -#include -#include -#include - -#if !HAVE_CHOWN - -/* Simple stub that always fails with ENOSYS, for mingw. */ -int -chown (const char *file _GL_UNUSED, uid_t uid _GL_UNUSED, - gid_t gid _GL_UNUSED) -{ - errno = ENOSYS; - return -1; -} - -#else /* HAVE_CHOWN */ - -/* Below we refer to the system's chown(). */ -# undef chown - -/* The results of open() in this file are not used with fchdir, - therefore save some unnecessary work in fchdir.c. */ -# undef open -# undef close - -/* Provide a more-closely POSIX-conforming version of chown on - systems with one or both of the following problems: - - chown doesn't treat an ID of -1 as meaning - `don't change the corresponding ID'. - - chown doesn't dereference symlinks. */ - -int -rpl_chown (const char *file, uid_t uid, gid_t gid) -{ - struct stat st; - bool stat_valid = false; - int result; - -# if CHOWN_CHANGE_TIME_BUG - if (gid != (gid_t) -1 || uid != (uid_t) -1) - { - if (stat (file, &st)) - return -1; - stat_valid = true; - } -# endif - -# if CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE - if (gid == (gid_t) -1 || uid == (uid_t) -1) - { - /* Stat file to get id(s) that should remain unchanged. */ - if (!stat_valid && stat (file, &st)) - return -1; - if (gid == (gid_t) -1) - gid = st.st_gid; - if (uid == (uid_t) -1) - uid = st.st_uid; - } -# endif - -# if CHOWN_MODIFIES_SYMLINK - { - /* Handle the case in which the system-supplied chown function - does *not* follow symlinks. Instead, it changes permissions - on the symlink itself. To work around that, we open the - file (but this can fail due to lack of read or write permission) and - use fchown on the resulting descriptor. */ - int open_flags = O_NONBLOCK | O_NOCTTY; - int fd = open (file, O_RDONLY | open_flags); - if (0 <= fd - || (errno == EACCES - && 0 <= (fd = open (file, O_WRONLY | open_flags)))) - { - int saved_errno; - bool fchown_socket_failure; - - result = fchown (fd, uid, gid); - saved_errno = errno; - - /* POSIX says fchown can fail with errno == EINVAL on sockets - and pipes, so fall back on chown in that case. */ - fchown_socket_failure = - (result != 0 && saved_errno == EINVAL - && fstat (fd, &st) == 0 - && (S_ISFIFO (st.st_mode) || S_ISSOCK (st.st_mode))); - - close (fd); - - if (! fchown_socket_failure) - { - errno = saved_errno; - return result; - } - } - else if (errno != EACCES) - return -1; - } -# endif - -# if CHOWN_TRAILING_SLASH_BUG - if (!stat_valid) - { - size_t len = strlen (file); - if (len && file[len - 1] == '/' && stat (file, &st)) - return -1; - } -# endif - - result = chown (file, uid, gid); - -# if CHOWN_CHANGE_TIME_BUG - if (result == 0 && stat_valid - && (uid == st.st_uid || uid == (uid_t) -1) - && (gid == st.st_gid || gid == (gid_t) -1)) - { - /* No change in ownership, but at least one argument was not -1, - so we are required to update ctime. Since chown succeeded, - we assume that chmod will do likewise. Fortunately, on all - known systems where a 'no-op' chown skips the ctime update, a - 'no-op' chmod still does the trick. */ - result = chmod (file, st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO - | S_ISUID | S_ISGID | S_ISVTX)); - } -# endif - - return result; -} - -#endif /* HAVE_CHOWN */ diff --git a/gnulib/lib/cloexec.c b/gnulib/lib/cloexec.c deleted file mode 100644 index d525202..0000000 --- a/gnulib/lib/cloexec.c +++ /dev/null @@ -1,83 +0,0 @@ -/* closexec.c - set or clear the close-on-exec descriptor flag - - Copyright (C) 1991, 2004-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - - The code is taken from glibc/manual/llio.texi */ - -#include - -#include "cloexec.h" - -#include -#include -#include - -/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true, - or clear the flag if VALUE is false. - Return 0 on success, or -1 on error with `errno' set. - - Note that on MingW, this function does NOT protect DESC from being - inherited into spawned children. Instead, either use dup_cloexec - followed by closing the original DESC, or use interfaces such as - open or pipe2 that accept flags like O_CLOEXEC to create DESC - non-inheritable in the first place. */ - -int -set_cloexec_flag (int desc, bool value) -{ -#ifdef F_SETFD - - int flags = fcntl (desc, F_GETFD, 0); - - if (0 <= flags) - { - int newflags = (value ? flags | FD_CLOEXEC : flags & ~FD_CLOEXEC); - - if (flags == newflags - || fcntl (desc, F_SETFD, newflags) != -1) - return 0; - } - - return -1; - -#else /* !F_SETFD */ - - /* Use dup2 to reject invalid file descriptors; the cloexec flag - will be unaffected. */ - if (desc < 0) - { - errno = EBADF; - return -1; - } - if (dup2 (desc, desc) < 0) - /* errno is EBADF here. */ - return -1; - - /* There is nothing we can do on this kind of platform. Punt. */ - return 0; -#endif /* !F_SETFD */ -} - - -/* Duplicates a file handle FD, while marking the copy to be closed - prior to exec or spawn. Returns -1 and sets errno if FD could not - be duplicated. */ - -int -dup_cloexec (int fd) -{ - return fcntl (fd, F_DUPFD_CLOEXEC, 0); -} diff --git a/gnulib/lib/cloexec.h b/gnulib/lib/cloexec.h deleted file mode 100644 index 17c8ac0..0000000 --- a/gnulib/lib/cloexec.h +++ /dev/null @@ -1,38 +0,0 @@ -/* closexec.c - set or clear the close-on-exec descriptor flag - - Copyright (C) 2004, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -*/ - -#include - -/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true, - or clear the flag if VALUE is false. - Return 0 on success, or -1 on error with `errno' set. - - Note that on MingW, this function does NOT protect DESC from being - inherited into spawned children. Instead, either use dup_cloexec - followed by closing the original DESC, or use interfaces such as - open or pipe2 that accept flags like O_CLOEXEC to create DESC - non-inheritable in the first place. */ - -int set_cloexec_flag (int desc, bool value); - -/* Duplicates a file handle FD, while marking the copy to be closed - prior to exec or spawn. Returns -1 and sets errno if FD could not - be duplicated. */ - -int dup_cloexec (int fd); diff --git a/gnulib/lib/close-hook.c b/gnulib/lib/close-hook.c deleted file mode 100644 index ecc5f46..0000000 --- a/gnulib/lib/close-hook.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Hook for making the close() function extensible. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2009. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include "close-hook.h" - -#include -#include - -#undef close - - -/* Currently, this entire code is only needed for the handling of sockets - on native Windows platforms. */ -#if WINDOWS_SOCKETS - -/* The first and last link in the doubly linked list. - Initially the list is empty. */ -static struct close_hook anchor = { &anchor, &anchor, NULL }; - -int -execute_close_hooks (int fd, const struct close_hook *remaining_list) -{ - if (remaining_list == &anchor) - /* End of list reached. */ - return close (fd); - else - return remaining_list->private_fn (fd, remaining_list->private_next); -} - -int -execute_all_close_hooks (int fd) -{ - return execute_close_hooks (fd, anchor.private_next); -} - -void -register_close_hook (close_hook_fn hook, struct close_hook *link) -{ - if (link->private_next == NULL && link->private_prev == NULL) - { - /* Add the link to the doubly linked list. */ - link->private_next = anchor.private_next; - link->private_prev = &anchor; - link->private_fn = hook; - anchor.private_next->private_prev = link; - anchor.private_next = link; - } - else - { - /* The link is already in use. */ - if (link->private_fn != hook) - abort (); - } -} - -void -unregister_close_hook (struct close_hook *link) -{ - struct close_hook *next = link->private_next; - struct close_hook *prev = link->private_prev; - - if (next != NULL && prev != NULL) - { - /* The link is in use. Remove it from the doubly linked list. */ - prev->private_next = next; - next->private_prev = prev; - /* Clear the link, to mark it unused. */ - link->private_next = NULL; - link->private_prev = NULL; - link->private_fn = NULL; - } -} - -#endif diff --git a/gnulib/lib/close-hook.h b/gnulib/lib/close-hook.h deleted file mode 100644 index 283bebb..0000000 --- a/gnulib/lib/close-hook.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Hook for making the close() function extensible. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - - -#ifndef CLOSE_HOOK_H -#define CLOSE_HOOK_H - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Currently, this entire code is only needed for the handling of sockets - on native Windows platforms. */ -#if WINDOWS_SOCKETS - - -/* An element of the list of close hooks. - The fields of this structure are considered private. */ -struct close_hook -{ - /* Doubly linked list. */ - struct close_hook *private_next; - struct close_hook *private_prev; - /* Function that treats the types of FD that it knows about and calls - execute_close_hooks (FD, REMAINING_LIST) as a fallback. */ - int (*private_fn) (int fd, const struct close_hook *remaining_list); -}; - -/* This type of function closes FD, applying special knowledge for the FD - types it knows about, and calls execute_close_hooks (FD, REMAINING_LIST) - for the other FD types. */ -typedef int (*close_hook_fn) (int fd, const struct close_hook *remaining_list); - -/* Execute the close hooks in REMAINING_LIST. - Return 0 or -1, like close() would do. */ -extern int execute_close_hooks (int fd, const struct close_hook *remaining_list); - -/* Execute all close hooks. - Return 0 or -1, like close() would do. */ -extern int execute_all_close_hooks (int fd); - -/* Add a function to the list of close hooks. - The LINK variable points to a piece of memory which is guaranteed to be - accessible until the corresponding call to unregister_close_hook. */ -extern void register_close_hook (close_hook_fn hook, struct close_hook *link); - -/* Removes a function from the list of close hooks. */ -extern void unregister_close_hook (struct close_hook *link); - - -#endif - - -#ifdef __cplusplus -} -#endif - -#endif /* CLOSE_HOOK_H */ diff --git a/gnulib/lib/close-stream.c b/gnulib/lib/close-stream.c deleted file mode 100644 index 8819b58..0000000 --- a/gnulib/lib/close-stream.c +++ /dev/null @@ -1,78 +0,0 @@ -/* Close a stream, with nicer error checking than fclose's. - - Copyright (C) 1998-2002, 2004, 2006-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "close-stream.h" - -#include -#include - -#include "fpending.h" - -#if USE_UNLOCKED_IO -# include "unlocked-io.h" -#endif - -/* Close STREAM. Return 0 if successful, EOF (setting errno) - otherwise. A failure might set errno to 0 if the error number - cannot be determined. - - A failure with errno set to EPIPE may or may not indicate an error - situation worth signaling to the user. See the documentation of the - close_stdout_set_ignore_EPIPE function for details. - - If a program writes *anything* to STREAM, that program should close - STREAM and make sure that it succeeds before exiting. Otherwise, - suppose that you go to the extreme of checking the return status - of every function that does an explicit write to STREAM. The last - printf can succeed in writing to the internal stream buffer, and yet - the fclose(STREAM) could still fail (due e.g., to a disk full error) - when it tries to write out that buffered data. Thus, you would be - left with an incomplete output file and the offending program would - exit successfully. Even calling fflush is not always sufficient, - since some file systems (NFS and CODA) buffer written/flushed data - until an actual close call. - - Besides, it's wasteful to check the return value from every call - that writes to STREAM -- just let the internal stream state record - the failure. That's what the ferror test is checking below. */ - -int -close_stream (FILE *stream) -{ - const bool some_pending = (__fpending (stream) != 0); - const bool prev_fail = (ferror (stream) != 0); - const bool fclose_fail = (fclose (stream) != 0); - - /* Return an error indication if there was a previous failure or if - fclose failed, with one exception: ignore an fclose failure if - there was no previous error, no data remains to be flushed, and - fclose failed with EBADF. That can happen when a program like cp - is invoked like this `cp a b >&-' (i.e., with standard output - closed) and doesn't generate any output (hence no previous error - and nothing to be flushed). */ - - if (prev_fail || (fclose_fail && (some_pending || errno != EBADF))) - { - if (! fclose_fail) - errno = 0; - return EOF; - } - - return 0; -} diff --git a/gnulib/lib/close.c b/gnulib/lib/close.c deleted file mode 100644 index 1c06c16..0000000 --- a/gnulib/lib/close.c +++ /dev/null @@ -1,42 +0,0 @@ -/* close replacement. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include "close-hook.h" - -/* Override close() to call into other gnulib modules. */ - -int -rpl_close (int fd) -#undef close -{ -#if WINDOWS_SOCKETS - int retval = execute_all_close_hooks (fd); -#else - int retval = close (fd); -#endif - -#if REPLACE_FCHDIR - if (retval >= 0) - _gl_unregister_fd (fd); -#endif - - return retval; -} diff --git a/gnulib/lib/closein.c b/gnulib/lib/closein.c deleted file mode 100644 index beff8bb..0000000 --- a/gnulib/lib/closein.c +++ /dev/null @@ -1,111 +0,0 @@ -/* Close standard input, rewinding seekable stdin if necessary. - - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "closein.h" - -#include -#include -#include -#include - -#include "gettext.h" -#define _(msgid) gettext (msgid) - -#include "close-stream.h" -#include "closeout.h" -#include "error.h" -#include "exitfail.h" -#include "freadahead.h" -#include "quotearg.h" - -static const char *file_name; - -/* Set the file name to be reported in the event an error is detected - on stdin by close_stdin. See also close_stdout_set_file_name, if - an error is detected when closing stdout. */ -void -close_stdin_set_file_name (const char *file) -{ - file_name = file; -} - -/* Close standard input, rewinding any unused input if stdin is - seekable. On error, issue a diagnostic and _exit with status - 'exit_failure'. Then call close_stdout. - - Most programs can get by with close_stdout. close_stdin is only - needed when a program wants to guarantee that partially read input - from seekable stdin is not consumed, for any subsequent clients. - For example, POSIX requires that these two commands behave alike: - - (sed -ne 1q; cat) < file - tail -n 1 file - - Since close_stdin is commonly registered via 'atexit', POSIX - and the C standard both say that it should not call 'exit', - because the behavior is undefined if 'exit' is called more than - once. So it calls '_exit' instead of 'exit'. If close_stdin - is registered via atexit before other functions are registered, - the other functions can act before this _exit is invoked. - - Applications that use close_stdout should flush any streams other - than stdin, stdout, and stderr before exiting, since the call to - _exit will bypass other buffer flushing. Applications should be - flushing and closing other streams anyway, to check for I/O errors. - Also, applications should not use tmpfile, since _exit can bypass - the removal of these files. - - It's important to detect such failures and exit nonzero because many - tools (most notably `make' and other build-management systems) depend - on being able to detect failure in other tools via their exit status. */ - -void -close_stdin (void) -{ - bool fail = false; - - /* There is no need to flush stdin if we can determine quickly that stdin's - input buffer is empty; in this case we know that if stdin is seekable, - fseeko (stdin, 0, SEEK_CUR) == lseek (0, 0, SEEK_CUR). */ - if (freadahead (stdin) > 0) - { - /* Only attempt flush if stdin is seekable, as fflush is entitled to - fail on non-seekable streams. */ - if (fseeko (stdin, 0, SEEK_CUR) == 0 && fflush (stdin) != 0) - fail = true; - } - if (close_stream (stdin) != 0) - fail = true; - if (fail) - { - /* Report failure, but defer exit until after closing stdout, - since the failure report should still be flushed. */ - char const *close_error = _("error closing file"); - if (file_name) - error (0, errno, "%s: %s", quotearg_colon (file_name), - close_error); - else - error (0, errno, "%s", close_error); - } - - close_stdout (); - - if (fail) - _exit (exit_failure); -} diff --git a/gnulib/lib/closein.h b/gnulib/lib/closein.h deleted file mode 100644 index 5e614d5..0000000 --- a/gnulib/lib/closein.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Close standard input, rewinding seekable stdin if necessary. - - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CLOSEIN_H -# define _GL_CLOSEIN_H 1 - -# ifdef __cplusplus -extern "C" { -# endif - -void close_stdin_set_file_name (const char *file); -void close_stdin (void); - -# ifdef __cplusplus -} -# endif - -#endif diff --git a/gnulib/lib/closeout.c b/gnulib/lib/closeout.c deleted file mode 100644 index f6cdd3f..0000000 --- a/gnulib/lib/closeout.c +++ /dev/null @@ -1,124 +0,0 @@ -/* Close standard output and standard error, exiting with a diagnostic on error. - - Copyright (C) 1998-2002, 2004, 2006, 2008-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "closeout.h" - -#include -#include -#include -#include - -#include "gettext.h" -#define _(msgid) gettext (msgid) - -#include "close-stream.h" -#include "error.h" -#include "exitfail.h" -#include "quotearg.h" - -static const char *file_name; - -/* Set the file name to be reported in the event an error is detected - by close_stdout. */ -void -close_stdout_set_file_name (const char *file) -{ - file_name = file; -} - -static bool ignore_EPIPE /* = false */; - -/* Specify the reaction to an EPIPE error during the closing of stdout: - - If ignore = true, it shall be ignored. - - If ignore = false, it shall evoke a diagnostic, along with a nonzero - exit status. - The default is ignore = false. - - This setting matters only if the SIGPIPE signal is ignored (i.e. its - handler set to SIG_IGN) or blocked. Only particular programs need to - temporarily ignore SIGPIPE. If SIGPIPE is ignored or blocked because - it was ignored or blocked in the parent process when it created the - child process, it usually is a bug in the parent process: It is bad - practice to have SIGPIPE ignored or blocked while creating a child - process. - - EPIPE occurs when writing to a pipe or socket that has no readers now, - when SIGPIPE is ignored or blocked. - - The ignore = false setting is suitable for a scenario where it is normally - guaranteed that the pipe writer terminates before the pipe reader. In - this case, an EPIPE is an indication of a premature termination of the - pipe reader and should lead to a diagnostic and a nonzero exit status. - - The ignore = true setting is suitable for a scenario where you don't know - ahead of time whether the pipe writer or the pipe reader will terminate - first. In this case, an EPIPE is an indication that the pipe writer can - stop doing useless write() calls; this is what close_stdout does anyway. - EPIPE is part of the normal pipe/socket shutdown protocol in this case, - and should not lead to a diagnostic message. */ - -void -close_stdout_set_ignore_EPIPE (bool ignore) -{ - ignore_EPIPE = ignore; -} - -/* Close standard output. On error, issue a diagnostic and _exit - with status 'exit_failure'. - - Also close standard error. On error, _exit with status 'exit_failure'. - - Since close_stdout is commonly registered via 'atexit', POSIX - and the C standard both say that it should not call 'exit', - because the behavior is undefined if 'exit' is called more than - once. So it calls '_exit' instead of 'exit'. If close_stdout - is registered via atexit before other functions are registered, - the other functions can act before this _exit is invoked. - - Applications that use close_stdout should flush any streams - other than stdout and stderr before exiting, since the call to - _exit will bypass other buffer flushing. Applications should - be flushing and closing other streams anyway, to check for I/O - errors. Also, applications should not use tmpfile, since _exit - can bypass the removal of these files. - - It's important to detect such failures and exit nonzero because many - tools (most notably `make' and other build-management systems) depend - on being able to detect failure in other tools via their exit status. */ - -void -close_stdout (void) -{ - if (close_stream (stdout) != 0 - && !(ignore_EPIPE && errno == EPIPE)) - { - char const *write_error = _("write error"); - if (file_name) - error (0, errno, "%s: %s", quotearg_colon (file_name), - write_error); - else - error (0, errno, "%s", write_error); - - _exit (exit_failure); - } - - if (close_stream (stderr) != 0) - _exit (exit_failure); -} diff --git a/gnulib/lib/closeout.h b/gnulib/lib/closeout.h deleted file mode 100644 index ec8d7a6..0000000 --- a/gnulib/lib/closeout.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Close standard output and standard error. - - Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef CLOSEOUT_H -# define CLOSEOUT_H 1 - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -void close_stdout_set_file_name (const char *file); -void close_stdout_set_ignore_EPIPE (bool ignore); -void close_stdout (void); - -# ifdef __cplusplus -} -# endif - -#endif diff --git a/gnulib/lib/config.charset b/gnulib/lib/config.charset deleted file mode 100644 index 93b5a5d..0000000 --- a/gnulib/lib/config.charset +++ /dev/null @@ -1,683 +0,0 @@ -#! /bin/sh -# Output a system dependent table of character encoding aliases. -# -# Copyright (C) 2000-2004, 2006-2011 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# The table consists of lines of the form -# ALIAS CANONICAL -# -# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". -# ALIAS is compared in a case sensitive way. -# -# CANONICAL is the GNU canonical name for this character encoding. -# It must be an encoding supported by libiconv. Support by GNU libc is -# also desirable. CANONICAL is case insensitive. Usually an upper case -# MIME charset name is preferred. -# The current list of GNU canonical charset names is as follows. -# -# name MIME? used by which systems -# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin -# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin -# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin -# ISO-8859-3 Y glibc solaris cygwin -# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin -# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin -# ISO-8859-6 Y glibc aix hpux solaris cygwin -# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin -# ISO-8859-8 Y glibc aix hpux osf solaris cygwin -# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin -# ISO-8859-13 glibc netbsd openbsd darwin cygwin -# ISO-8859-14 glibc cygwin -# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin -# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin -# KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin -# KOI8-T glibc -# CP437 dos -# CP775 dos -# CP850 aix osf dos -# CP852 dos -# CP855 dos -# CP856 aix -# CP857 dos -# CP861 dos -# CP862 dos -# CP864 dos -# CP865 dos -# CP866 freebsd netbsd openbsd darwin dos -# CP869 dos -# CP874 woe32 dos -# CP922 aix -# CP932 aix cygwin woe32 dos -# CP943 aix -# CP949 osf darwin woe32 dos -# CP950 woe32 dos -# CP1046 aix -# CP1124 aix -# CP1125 dos -# CP1129 aix -# CP1131 darwin -# CP1250 woe32 -# CP1251 glibc solaris netbsd openbsd darwin cygwin woe32 -# CP1252 aix woe32 -# CP1253 woe32 -# CP1254 woe32 -# CP1255 glibc woe32 -# CP1256 woe32 -# CP1257 woe32 -# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin -# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin -# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin -# EUC-TW glibc aix hpux irix osf solaris netbsd -# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin -# BIG5-HKSCS glibc solaris darwin -# GBK glibc aix osf solaris darwin cygwin woe32 dos -# GB18030 glibc solaris netbsd darwin -# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin -# JOHAB glibc solaris woe32 -# TIS-620 glibc aix hpux osf solaris cygwin -# VISCII Y glibc -# TCVN5712-1 glibc -# ARMSCII-8 glibc darwin -# GEORGIAN-PS glibc cygwin -# PT154 glibc -# HP-ROMAN8 hpux -# HP-ARABIC8 hpux -# HP-GREEK8 hpux -# HP-HEBREW8 hpux -# HP-TURKISH8 hpux -# HP-KANA8 hpux -# DEC-KANJI osf -# DEC-HANYU osf -# UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin -# -# Note: Names which are not marked as being a MIME name should not be used in -# Internet protocols for information interchange (mail, news, etc.). -# -# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications -# must understand both names and treat them as equivalent. -# -# The first argument passed to this file is the canonical host specification, -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM - -host="$1" -os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` -echo "# This file contains a table of character encoding aliases," -echo "# suitable for operating system '${os}'." -echo "# It was automatically generated from config.charset." -# List of references, updated during installation: -echo "# Packages using this file: " -case "$os" in - linux-gnulibc1*) - # Linux libc5 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - echo "C ASCII" - echo "POSIX ASCII" - for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ - en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ - en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ - es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ - et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ - fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ - it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ - sv_FI sv_SE; do - echo "$l ISO-8859-1" - echo "$l.iso-8859-1 ISO-8859-1" - echo "$l.iso-8859-15 ISO-8859-15" - echo "$l.iso-8859-15@euro ISO-8859-15" - echo "$l@euro ISO-8859-15" - echo "$l.cp-437 CP437" - echo "$l.cp-850 CP850" - echo "$l.cp-1252 CP1252" - echo "$l.cp-1252@euro CP1252" - #echo "$l.atari-st ATARI-ST" # not a commonly used encoding - echo "$l.utf-8 UTF-8" - echo "$l.utf-8@euro UTF-8" - done - for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ - sl_SI sr sr_CS sr_YU; do - echo "$l ISO-8859-2" - echo "$l.iso-8859-2 ISO-8859-2" - echo "$l.cp-852 CP852" - echo "$l.cp-1250 CP1250" - echo "$l.utf-8 UTF-8" - done - for l in mk mk_MK ru ru_RU; do - echo "$l ISO-8859-5" - echo "$l.iso-8859-5 ISO-8859-5" - echo "$l.koi8-r KOI8-R" - echo "$l.cp-866 CP866" - echo "$l.cp-1251 CP1251" - echo "$l.utf-8 UTF-8" - done - for l in ar ar_SA; do - echo "$l ISO-8859-6" - echo "$l.iso-8859-6 ISO-8859-6" - echo "$l.cp-864 CP864" - #echo "$l.cp-868 CP868" # not a commonly used encoding - echo "$l.cp-1256 CP1256" - echo "$l.utf-8 UTF-8" - done - for l in el el_GR gr gr_GR; do - echo "$l ISO-8859-7" - echo "$l.iso-8859-7 ISO-8859-7" - echo "$l.cp-869 CP869" - echo "$l.cp-1253 CP1253" - echo "$l.cp-1253@euro CP1253" - echo "$l.utf-8 UTF-8" - echo "$l.utf-8@euro UTF-8" - done - for l in he he_IL iw iw_IL; do - echo "$l ISO-8859-8" - echo "$l.iso-8859-8 ISO-8859-8" - echo "$l.cp-862 CP862" - echo "$l.cp-1255 CP1255" - echo "$l.utf-8 UTF-8" - done - for l in tr tr_TR; do - echo "$l ISO-8859-9" - echo "$l.iso-8859-9 ISO-8859-9" - echo "$l.cp-857 CP857" - echo "$l.cp-1254 CP1254" - echo "$l.utf-8 UTF-8" - done - for l in lt lt_LT lv lv_LV; do - #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name - echo "$l ISO-8859-13" - done - for l in ru_UA uk uk_UA; do - echo "$l KOI8-U" - done - for l in zh zh_CN; do - #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name - echo "$l GB2312" - done - for l in ja ja_JP ja_JP.EUC; do - echo "$l EUC-JP" - done - for l in ko ko_KR; do - echo "$l EUC-KR" - done - for l in th th_TH; do - echo "$l TIS-620" - done - for l in fa fa_IR; do - #echo "$l ISIRI-3342" # a broken encoding - echo "$l.utf-8 UTF-8" - done - ;; - linux* | *-gnu*) - # With glibc-2.1 or newer, we don't need any canonicalization, - # because glibc has iconv and both glibc and libiconv support all - # GNU canonical names directly. Therefore, the Makefile does not - # need to install the alias file at all. - # The following applies only to glibc-2.0.x and older libcs. - echo "ISO_646.IRV:1983 ASCII" - ;; - aix*) - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-6 ISO-8859-6" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-8 ISO-8859-8" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-15 ISO-8859-15" - echo "IBM-850 CP850" - echo "IBM-856 CP856" - echo "IBM-921 ISO-8859-13" - echo "IBM-922 CP922" - echo "IBM-932 CP932" - echo "IBM-943 CP943" - echo "IBM-1046 CP1046" - echo "IBM-1124 CP1124" - echo "IBM-1129 CP1129" - echo "IBM-1252 CP1252" - echo "IBM-eucCN GB2312" - echo "IBM-eucJP EUC-JP" - echo "IBM-eucKR EUC-KR" - echo "IBM-eucTW EUC-TW" - echo "big5 BIG5" - echo "GBK GBK" - echo "TIS-620 TIS-620" - echo "UTF-8 UTF-8" - ;; - hpux*) - echo "iso88591 ISO-8859-1" - echo "iso88592 ISO-8859-2" - echo "iso88595 ISO-8859-5" - echo "iso88596 ISO-8859-6" - echo "iso88597 ISO-8859-7" - echo "iso88598 ISO-8859-8" - echo "iso88599 ISO-8859-9" - echo "iso885915 ISO-8859-15" - echo "roman8 HP-ROMAN8" - echo "arabic8 HP-ARABIC8" - echo "greek8 HP-GREEK8" - echo "hebrew8 HP-HEBREW8" - echo "turkish8 HP-TURKISH8" - echo "kana8 HP-KANA8" - echo "tis620 TIS-620" - echo "big5 BIG5" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - echo "hp15CN GB2312" - #echo "ccdc ?" # what is this? - echo "SJIS SHIFT_JIS" - echo "utf8 UTF-8" - ;; - irix*) - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-9 ISO-8859-9" - echo "eucCN GB2312" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - ;; - osf*) - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-8 ISO-8859-8" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-15 ISO-8859-15" - echo "cp850 CP850" - echo "big5 BIG5" - echo "dechanyu DEC-HANYU" - echo "dechanzi GB2312" - echo "deckanji DEC-KANJI" - echo "deckorean EUC-KR" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - echo "GBK GBK" - echo "KSC5601 CP949" - echo "sdeckanji EUC-JP" - echo "SJIS SHIFT_JIS" - echo "TACTIS TIS-620" - echo "UTF-8 UTF-8" - ;; - solaris*) - echo "646 ASCII" - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-3 ISO-8859-3" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-6 ISO-8859-6" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-8 ISO-8859-8" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-15 ISO-8859-15" - echo "koi8-r KOI8-R" - echo "ansi-1251 CP1251" - echo "BIG5 BIG5" - echo "Big5-HKSCS BIG5-HKSCS" - echo "gb2312 GB2312" - echo "GBK GBK" - echo "GB18030 GB18030" - echo "cns11643 EUC-TW" - echo "5601 EUC-KR" - echo "ko_KR.johap92 JOHAB" - echo "eucJP EUC-JP" - echo "PCK SHIFT_JIS" - echo "TIS620.2533 TIS-620" - #echo "sun_eu_greek ?" # what is this? - echo "UTF-8 UTF-8" - ;; - freebsd* | os2*) - # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just - # reuse FreeBSD's locale data for OS/2. - echo "C ASCII" - echo "US-ASCII ASCII" - for l in la_LN lt_LN; do - echo "$l.ASCII ASCII" - done - for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ - fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ - lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do - echo "$l.ISO_8859-1 ISO-8859-1" - echo "$l.DIS_8859-15 ISO-8859-15" - done - for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do - echo "$l.ISO_8859-2 ISO-8859-2" - done - for l in la_LN lt_LT; do - echo "$l.ISO_8859-4 ISO-8859-4" - done - for l in ru_RU ru_SU; do - echo "$l.KOI8-R KOI8-R" - echo "$l.ISO_8859-5 ISO-8859-5" - echo "$l.CP866 CP866" - done - echo "uk_UA.KOI8-U KOI8-U" - echo "zh_TW.BIG5 BIG5" - echo "zh_TW.Big5 BIG5" - echo "zh_CN.EUC GB2312" - echo "ja_JP.EUC EUC-JP" - echo "ja_JP.SJIS SHIFT_JIS" - echo "ja_JP.Shift_JIS SHIFT_JIS" - echo "ko_KR.EUC EUC-KR" - ;; - netbsd*) - echo "646 ASCII" - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-13 ISO-8859-13" - echo "ISO8859-15 ISO-8859-15" - echo "eucCN GB2312" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - echo "BIG5 BIG5" - echo "SJIS SHIFT_JIS" - ;; - openbsd*) - echo "646 ASCII" - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-13 ISO-8859-13" - echo "ISO8859-15 ISO-8859-15" - ;; - darwin[56]*) - # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - echo "C ASCII" - for l in en_AU en_CA en_GB en_US la_LN; do - echo "$l.US-ASCII ASCII" - done - for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ - fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ - nl_NL no_NO pt_PT sv_SE; do - echo "$l ISO-8859-1" - echo "$l.ISO8859-1 ISO-8859-1" - echo "$l.ISO8859-15 ISO-8859-15" - done - for l in la_LN; do - echo "$l.ISO8859-1 ISO-8859-1" - echo "$l.ISO8859-15 ISO-8859-15" - done - for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do - echo "$l.ISO8859-2 ISO-8859-2" - done - for l in la_LN lt_LT; do - echo "$l.ISO8859-4 ISO-8859-4" - done - for l in ru_RU; do - echo "$l.KOI8-R KOI8-R" - echo "$l.ISO8859-5 ISO-8859-5" - echo "$l.CP866 CP866" - done - for l in bg_BG; do - echo "$l.CP1251 CP1251" - done - echo "uk_UA.KOI8-U KOI8-U" - echo "zh_TW.BIG5 BIG5" - echo "zh_TW.Big5 BIG5" - echo "zh_CN.EUC GB2312" - echo "ja_JP.EUC EUC-JP" - echo "ja_JP.SJIS SHIFT_JIS" - echo "ko_KR.EUC EUC-KR" - ;; - darwin*) - # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is - # useless: - # - It returns the empty string when LANG is set to a locale of the - # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 - # LC_CTYPE file. - # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by - # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. - # - The documentation says: - # "... all code that calls BSD system routines should ensure - # that the const *char parameters of these routines are in UTF-8 - # encoding. All BSD system functions expect their string - # parameters to be in UTF-8 encoding and nothing else." - # It also says - # "An additional caveat is that string parameters for files, - # paths, and other file-system entities must be in canonical - # UTF-8. In a canonical UTF-8 Unicode string, all decomposable - # characters are decomposed ..." - # but this is not true: You can pass non-decomposed UTF-8 strings - # to file system functions, and it is the OS which will convert - # them to decomposed UTF-8 before accessing the file system. - # - The Apple Terminal application displays UTF-8 by default. - # - However, other applications are free to use different encodings: - # - xterm uses ISO-8859-1 by default. - # - TextEdit uses MacRoman by default. - # We prefer UTF-8 over decomposed UTF-8-MAC because one should - # minimize the use of decomposed Unicode. Unfortunately, through the - # Darwin file system, decomposed UTF-8 strings are leaked into user - # space nevertheless. - # Then there are also the locales with encodings other than US-ASCII - # and UTF-8. These locales can be occasionally useful to users (e.g. - # when grepping through ISO-8859-1 encoded text files), when all their - # file names are in US-ASCII. - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-13 ISO-8859-13" - echo "ISO8859-15 ISO-8859-15" - echo "KOI8-R KOI8-R" - echo "KOI8-U KOI8-U" - echo "CP866 CP866" - echo "CP949 CP949" - echo "CP1131 CP1131" - echo "CP1251 CP1251" - echo "eucCN GB2312" - echo "GB2312 GB2312" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "Big5 BIG5" - echo "Big5HKSCS BIG5-HKSCS" - echo "GBK GBK" - echo "GB18030 GB18030" - echo "SJIS SHIFT_JIS" - echo "ARMSCII-8 ARMSCII-8" - echo "PT154 PT154" - #echo "ISCII-DEV ?" - echo "* UTF-8" - ;; - beos* | haiku*) - # BeOS and Haiku have a single locale, and it has UTF-8 encoding. - echo "* UTF-8" - ;; - msdosdjgpp*) - # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - echo "#" - echo "# The encodings given here may not all be correct." - echo "# If you find that the encoding given for your language and" - echo "# country is not the one your DOS machine actually uses, just" - echo "# correct it in this file, and send a mail to" - echo "# Juan Manuel Guerrero " - echo "# and Bruno Haible ." - echo "#" - echo "C ASCII" - # ISO-8859-1 languages - echo "ca CP850" - echo "ca_ES CP850" - echo "da CP865" # not CP850 ?? - echo "da_DK CP865" # not CP850 ?? - echo "de CP850" - echo "de_AT CP850" - echo "de_CH CP850" - echo "de_DE CP850" - echo "en CP850" - echo "en_AU CP850" # not CP437 ?? - echo "en_CA CP850" - echo "en_GB CP850" - echo "en_NZ CP437" - echo "en_US CP437" - echo "en_ZA CP850" # not CP437 ?? - echo "es CP850" - echo "es_AR CP850" - echo "es_BO CP850" - echo "es_CL CP850" - echo "es_CO CP850" - echo "es_CR CP850" - echo "es_CU CP850" - echo "es_DO CP850" - echo "es_EC CP850" - echo "es_ES CP850" - echo "es_GT CP850" - echo "es_HN CP850" - echo "es_MX CP850" - echo "es_NI CP850" - echo "es_PA CP850" - echo "es_PY CP850" - echo "es_PE CP850" - echo "es_SV CP850" - echo "es_UY CP850" - echo "es_VE CP850" - echo "et CP850" - echo "et_EE CP850" - echo "eu CP850" - echo "eu_ES CP850" - echo "fi CP850" - echo "fi_FI CP850" - echo "fr CP850" - echo "fr_BE CP850" - echo "fr_CA CP850" - echo "fr_CH CP850" - echo "fr_FR CP850" - echo "ga CP850" - echo "ga_IE CP850" - echo "gd CP850" - echo "gd_GB CP850" - echo "gl CP850" - echo "gl_ES CP850" - echo "id CP850" # not CP437 ?? - echo "id_ID CP850" # not CP437 ?? - echo "is CP861" # not CP850 ?? - echo "is_IS CP861" # not CP850 ?? - echo "it CP850" - echo "it_CH CP850" - echo "it_IT CP850" - echo "lt CP775" - echo "lt_LT CP775" - echo "lv CP775" - echo "lv_LV CP775" - echo "nb CP865" # not CP850 ?? - echo "nb_NO CP865" # not CP850 ?? - echo "nl CP850" - echo "nl_BE CP850" - echo "nl_NL CP850" - echo "nn CP865" # not CP850 ?? - echo "nn_NO CP865" # not CP850 ?? - echo "no CP865" # not CP850 ?? - echo "no_NO CP865" # not CP850 ?? - echo "pt CP850" - echo "pt_BR CP850" - echo "pt_PT CP850" - echo "sv CP850" - echo "sv_SE CP850" - # ISO-8859-2 languages - echo "cs CP852" - echo "cs_CZ CP852" - echo "hr CP852" - echo "hr_HR CP852" - echo "hu CP852" - echo "hu_HU CP852" - echo "pl CP852" - echo "pl_PL CP852" - echo "ro CP852" - echo "ro_RO CP852" - echo "sk CP852" - echo "sk_SK CP852" - echo "sl CP852" - echo "sl_SI CP852" - echo "sq CP852" - echo "sq_AL CP852" - echo "sr CP852" # CP852 or CP866 or CP855 ?? - echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? - echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? - # ISO-8859-3 languages - echo "mt CP850" - echo "mt_MT CP850" - # ISO-8859-5 languages - echo "be CP866" - echo "be_BE CP866" - echo "bg CP866" # not CP855 ?? - echo "bg_BG CP866" # not CP855 ?? - echo "mk CP866" # not CP855 ?? - echo "mk_MK CP866" # not CP855 ?? - echo "ru CP866" - echo "ru_RU CP866" - echo "uk CP1125" - echo "uk_UA CP1125" - # ISO-8859-6 languages - echo "ar CP864" - echo "ar_AE CP864" - echo "ar_DZ CP864" - echo "ar_EG CP864" - echo "ar_IQ CP864" - echo "ar_IR CP864" - echo "ar_JO CP864" - echo "ar_KW CP864" - echo "ar_MA CP864" - echo "ar_OM CP864" - echo "ar_QA CP864" - echo "ar_SA CP864" - echo "ar_SY CP864" - # ISO-8859-7 languages - echo "el CP869" - echo "el_GR CP869" - # ISO-8859-8 languages - echo "he CP862" - echo "he_IL CP862" - # ISO-8859-9 languages - echo "tr CP857" - echo "tr_TR CP857" - # Japanese - echo "ja CP932" - echo "ja_JP CP932" - # Chinese - echo "zh_CN GBK" - echo "zh_TW CP950" # not CP938 ?? - # Korean - echo "kr CP949" # not CP934 ?? - echo "kr_KR CP949" # not CP934 ?? - # Thai - echo "th CP874" - echo "th_TH CP874" - # Other - echo "eo CP850" - echo "eo_EO CP850" - ;; -esac diff --git a/gnulib/lib/creat-safer.c b/gnulib/lib/creat-safer.c deleted file mode 100644 index 2a6916d..0000000 --- a/gnulib/lib/creat-safer.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Invoke creat, but avoid some glitches. - - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -#include "fcntl-safer.h" - -#include -#include "unistd-safer.h" - -int -creat_safer (char const *file, mode_t mode) -{ - return fd_safer (creat (file, mode)); -} diff --git a/gnulib/lib/ctype.in.h b/gnulib/lib/ctype.in.h deleted file mode 100644 index 648c1f4..0000000 --- a/gnulib/lib/ctype.in.h +++ /dev/null @@ -1,58 +0,0 @@ -/* A substitute for ISO C99 , for platforms on which it is incomplete. - - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Bruno Haible. */ - -/* - * ISO C 99 for platforms on which it is incomplete. - * - */ - -#ifndef _GL_CTYPE_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* Include the original . */ -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_CTYPE_H@ - -#ifndef _GL_CTYPE_H -#define _GL_CTYPE_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Return non-zero if c is a blank, i.e. a space or tab character. */ -#if @GNULIB_ISBLANK@ -# if !@HAVE_ISBLANK@ -_GL_EXTERN_C int isblank (int c); -# endif -#elif defined GNULIB_POSIXCHECK -# undef isblank -# if HAVE_RAW_DECL_ISBLANK -_GL_WARN_ON_USE (isblank, "isblank is unportable - " - "use gnulib module isblank for portability"); -# endif -#endif - -#endif /* _GL_CTYPE_H */ -#endif /* _GL_CTYPE_H */ diff --git a/gnulib/lib/cycle-check.c b/gnulib/lib/cycle-check.c deleted file mode 100644 index 3b48a9d..0000000 --- a/gnulib/lib/cycle-check.c +++ /dev/null @@ -1,85 +0,0 @@ -/* help detect directory cycles efficiently - - Copyright (C) 2003-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering */ - -#include - -#include -#include -#include -#include -#include - -#include - -#include "cycle-check.h" - -#define CC_MAGIC 9827862 - -/* Return true if I is a power of 2, or is zero. */ - -static inline bool -is_zero_or_power_of_two (uintmax_t i) -{ - return (i & (i - 1)) == 0; -} - -void -cycle_check_init (struct cycle_check_state *state) -{ - state->chdir_counter = 0; - state->magic = CC_MAGIC; -} - -/* In traversing a directory hierarchy, call this function once for each - descending chdir call, with SB corresponding to the chdir operand. - If SB corresponds to a directory that has already been seen, - return true to indicate that there is a directory cycle. - Note that this is done `lazily', which means that some of - the directories in the cycle may be processed twice before - the cycle is detected. */ - -bool -cycle_check (struct cycle_check_state *state, struct stat const *sb) -{ - assert (state->magic == CC_MAGIC); - - /* If the current directory ever happens to be the same - as the one we last recorded for the cycle detection, - then it's obviously part of a cycle. */ - if (state->chdir_counter && SAME_INODE (*sb, state->dev_ino)) - return true; - - /* If the number of `descending' chdir calls is a power of two, - record the dev/ino of the current directory. */ - if (is_zero_or_power_of_two (++(state->chdir_counter))) - { - /* On all architectures that we know about, if the counter - overflows then there is a directory cycle here somewhere, - even if we haven't detected it yet. Typically this happens - only after the counter is incremented 2**64 times, so it's a - fairly theoretical point. */ - if (state->chdir_counter == 0) - return true; - - state->dev_ino.st_dev = sb->st_dev; - state->dev_ino.st_ino = sb->st_ino; - } - - return false; -} diff --git a/gnulib/lib/cycle-check.h b/gnulib/lib/cycle-check.h deleted file mode 100644 index 064710e..0000000 --- a/gnulib/lib/cycle-check.h +++ /dev/null @@ -1,52 +0,0 @@ -/* help detect directory cycles efficiently - - Copyright (C) 2003-2004, 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering */ - -#ifndef CYCLE_CHECK_H -# define CYCLE_CHECK_H 1 - -# include -# include -# include "dev-ino.h" -# include "same-inode.h" - -struct cycle_check_state -{ - struct dev_ino dev_ino; - uintmax_t chdir_counter; - int magic; -}; - -void cycle_check_init (struct cycle_check_state *state); -bool cycle_check (struct cycle_check_state *state, struct stat const *sb); - -# define CYCLE_CHECK_REFLECT_CHDIR_UP(State, SB_dir, SB_subdir) \ - do \ - { \ - /* You must call cycle_check at least once before using this macro. */ \ - if ((State)->chdir_counter == 0) \ - abort (); \ - if (SAME_INODE ((State)->dev_ino, SB_subdir)) \ - { \ - (State)->dev_ino.st_dev = (SB_dir).st_dev; \ - (State)->dev_ino.st_ino = (SB_dir).st_ino; \ - } \ - } \ - while (0) - -#endif diff --git a/gnulib/lib/dirent--.h b/gnulib/lib/dirent--.h deleted file mode 100644 index bb20132..0000000 --- a/gnulib/lib/dirent--.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Like dirent.h, but redefine some names to avoid glitches. - - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake. */ - -#include "dirent-safer.h" - -#undef opendir -#define opendir opendir_safer diff --git a/gnulib/lib/dirent-safer.h b/gnulib/lib/dirent-safer.h deleted file mode 100644 index 1a0499e..0000000 --- a/gnulib/lib/dirent-safer.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Invoke dirent-like functions, but avoid some glitches. - - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake. */ - -#include - -DIR *opendir_safer (const char *name); diff --git a/gnulib/lib/dirent.in.h b/gnulib/lib/dirent.in.h deleted file mode 100644 index e1e734f..0000000 --- a/gnulib/lib/dirent.in.h +++ /dev/null @@ -1,172 +0,0 @@ -/* A GNU-like . - Copyright (C) 2006-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_DIRENT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_DIRENT_H@ - -#ifndef _GL_DIRENT_H -#define _GL_DIRENT_H - -/* Get ino_t. Needed on some systems, including glibc 2.8. */ -#include - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Declare overridden functions. */ - -#if @REPLACE_CLOSEDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define closedir rpl_closedir -# endif -_GL_FUNCDECL_RPL (closedir, int, (DIR *) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (closedir, int, (DIR *)); -#else -_GL_CXXALIAS_SYS (closedir, int, (DIR *)); -#endif -_GL_CXXALIASWARN (closedir); - -#if @GNULIB_DIRFD@ -/* Return the file descriptor associated with the given directory stream, - or -1 if none exists. */ -# if @REPLACE_DIRFD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef dirfd -# define dirfd rpl_dirfd -# endif -_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (dirfd, int, (DIR *)); -# else -# if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd - /* dirfd is defined as a macro and not as a function. - Turn it into a function and get rid of the macro. */ -static inline int (dirfd) (DIR *dp) { return dirfd (dp); } -# undef dirfd -# endif -# if !(@HAVE_DECL_DIRFD@ || defined dirfd) -_GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (dirfd, int, (DIR *)); -# endif -_GL_CXXALIASWARN (dirfd); -#elif defined GNULIB_POSIXCHECK -# undef dirfd -# if HAVE_RAW_DECL_DIRFD -_GL_WARN_ON_USE (dirfd, "dirfd is unportable - " - "use gnulib module dirfd for portability"); -# endif -#endif - -#if @GNULIB_FDOPENDIR@ -/* Open a directory stream visiting the given directory file - descriptor. Return NULL and set errno if fd is not visiting a - directory. On success, this function consumes fd (it will be - implicitly closed either by this function or by a subsequent - closedir). */ -# if @REPLACE_FDOPENDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopendir -# define fdopendir rpl_fdopendir -# endif -_GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd)); -_GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd)); -# else -# if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@ -_GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd)); -# endif -_GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd)); -# endif -_GL_CXXALIASWARN (fdopendir); -#elif defined GNULIB_POSIXCHECK -# undef fdopendir -# if HAVE_RAW_DECL_FDOPENDIR -_GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - " - "use gnulib module fdopendir for portability"); -# endif -#endif - -#if @REPLACE_OPENDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define opendir rpl_opendir -# endif -_GL_FUNCDECL_RPL (opendir, DIR *, (const char *) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (opendir, DIR *, (const char *)); -#else -_GL_CXXALIAS_SYS (opendir, DIR *, (const char *)); -#endif -_GL_CXXALIASWARN (opendir); - -#if @GNULIB_SCANDIR@ -/* Scan the directory DIR, calling FILTER on each directory entry. - Entries for which FILTER returns nonzero are individually malloc'd, - sorted using qsort with CMP, and collected in a malloc'd array in - *NAMELIST. Returns the number of entries selected, or -1 on error. */ -# if !@HAVE_SCANDIR@ -_GL_FUNCDECL_SYS (scandir, int, - (const char *dir, struct dirent ***namelist, - int (*filter) (const struct dirent *), - int (*cmp) (const struct dirent **, const struct dirent **)) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -/* Need to cast, because on glibc systems, the fourth parameter is - int (*cmp) (const void *, const void *). */ -_GL_CXXALIAS_SYS_CAST (scandir, int, - (const char *dir, struct dirent ***namelist, - int (*filter) (const struct dirent *), - int (*cmp) (const struct dirent **, const struct dirent **))); -_GL_CXXALIASWARN (scandir); -#elif defined GNULIB_POSIXCHECK -# undef scandir -# if HAVE_RAW_DECL_SCANDIR -_GL_WARN_ON_USE (scandir, "scandir is unportable - " - "use gnulib module scandir for portability"); -# endif -#endif - -#if @GNULIB_ALPHASORT@ -/* Compare two 'struct dirent' entries alphabetically. */ -# if !@HAVE_ALPHASORT@ -_GL_FUNCDECL_SYS (alphasort, int, - (const struct dirent **, const struct dirent **) - _GL_ARG_NONNULL ((1, 2))); -# endif -/* Need to cast, because on glibc systems, the parameters are - (const void *, const void *). */ -_GL_CXXALIAS_SYS_CAST (alphasort, int, - (const struct dirent **, const struct dirent **)); -_GL_CXXALIASWARN (alphasort); -#elif defined GNULIB_POSIXCHECK -# undef alphasort -# if HAVE_RAW_DECL_ALPHASORT -_GL_WARN_ON_USE (alphasort, "alphasort is unportable - " - "use gnulib module alphasort for portability"); -# endif -#endif - - -#endif /* _GL_DIRENT_H */ -#endif /* _GL_DIRENT_H */ diff --git a/gnulib/lib/dirfd.c b/gnulib/lib/dirfd.c deleted file mode 100644 index 5f1a70e..0000000 --- a/gnulib/lib/dirfd.c +++ /dev/null @@ -1,32 +0,0 @@ -/* dirfd.c -- return the file descriptor associated with an open DIR* - - Copyright (C) 2001, 2006, 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -#include -#include - -int -dirfd (DIR *dir_p) -{ - int fd = DIR_TO_FD (dir_p); - if (fd == -1) - errno = ENOTSUP; - return fd; -} diff --git a/gnulib/lib/dirname-lgpl.c b/gnulib/lib/dirname-lgpl.c deleted file mode 100644 index f5b0c0f..0000000 --- a/gnulib/lib/dirname-lgpl.c +++ /dev/null @@ -1,86 +0,0 @@ -/* dirname.c -- return all but the last element in a file name - - Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "dirname.h" - -#include -#include - -/* Return the length of the prefix of FILE that will be used by - dir_name. If FILE is in the working directory, this returns zero - even though `dir_name (FILE)' will return ".". Works properly even - if there are trailing slashes (by effectively ignoring them). */ - -size_t -dir_len (char const *file) -{ - size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file); - size_t length; - - /* Advance prefix_length beyond important leading slashes. */ - prefix_length += (prefix_length != 0 - ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE - && ISSLASH (file[prefix_length])) - : (ISSLASH (file[0]) - ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT - && ISSLASH (file[1]) && ! ISSLASH (file[2]) - ? 2 : 1)) - : 0)); - - /* Strip the basename and any redundant slashes before it. */ - for (length = last_component (file) - file; - prefix_length < length; length--) - if (! ISSLASH (file[length - 1])) - break; - return length; -} - - -/* In general, we can't use the builtin `dirname' function if available, - since it has different meanings in different environments. - In some environments the builtin `dirname' modifies its argument. - - Return the leading directories part of FILE, allocated with malloc. - Works properly even if there are trailing slashes (by effectively - ignoring them). Return NULL on failure. - - If lstat (FILE) would succeed, then { chdir (dir_name (FILE)); - lstat (base_name (FILE)); } will access the same file. Likewise, - if the sequence { chdir (dir_name (FILE)); - rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE - to "foo" in the same directory FILE was in. */ - -char * -mdir_name (char const *file) -{ - size_t length = dir_len (file); - bool append_dot = (length == 0 - || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE - && length == FILE_SYSTEM_PREFIX_LEN (file) - && file[2] != '\0' && ! ISSLASH (file[2]))); - char *dir = malloc (length + append_dot + 1); - if (!dir) - return NULL; - memcpy (dir, file, length); - if (append_dot) - dir[length++] = '.'; - dir[length] = '\0'; - return dir; -} diff --git a/gnulib/lib/dirname.c b/gnulib/lib/dirname.c deleted file mode 100644 index 411ded3..0000000 --- a/gnulib/lib/dirname.c +++ /dev/null @@ -1,38 +0,0 @@ -/* dirname.c -- return all but the last element in a file name - - Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "dirname.h" - -#include -#include -#include "xalloc.h" - -/* Just like mdir_name (dirname-lgpl.c), except, rather than - returning NULL upon malloc failure, here, we report the - "memory exhausted" condition and exit. */ - -char * -dir_name (char const *file) -{ - char *result = mdir_name (file); - if (!result) - xalloc_die (); - return result; -} diff --git a/gnulib/lib/dirname.h b/gnulib/lib/dirname.h deleted file mode 100644 index 2ef9882..0000000 --- a/gnulib/lib/dirname.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Take file names apart into directory and base names. - - Copyright (C) 1998, 2001, 2003-2006, 2009-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef DIRNAME_H_ -# define DIRNAME_H_ 1 - -# include -# include -# include "dosname.h" - -# ifndef DIRECTORY_SEPARATOR -# define DIRECTORY_SEPARATOR '/' -# endif - -# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT -# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 -# endif - -# if GNULIB_DIRNAME -char *base_name (char const *file); -char *dir_name (char const *file); -# endif - -char *mdir_name (char const *file); -size_t base_len (char const *file); -size_t dir_len (char const *file); -char *last_component (char const *file); - -bool strip_trailing_slashes (char *file); - -#endif /* not DIRNAME_H_ */ diff --git a/gnulib/lib/dosname.h b/gnulib/lib/dosname.h deleted file mode 100644 index acdd03b..0000000 --- a/gnulib/lib/dosname.h +++ /dev/null @@ -1,53 +0,0 @@ -/* File names on MS-DOS/Windows systems. - - Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - - From Paul Eggert and Jim Meyering. */ - -#ifndef _DOSNAME_H -#define _DOSNAME_H - -#if (defined _WIN32 || defined __WIN32__ || \ - defined __MSDOS__ || defined __CYGWIN__ || \ - defined __EMX__ || defined __DJGPP__) - /* This internal macro assumes ASCII, but all hosts that support drive - letters use ASCII. */ -# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ - <= 'z' - 'a') -# define FILE_SYSTEM_PREFIX_LEN(Filename) \ - (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) -# ifndef __CYGWIN__ -# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 -# endif -# define ISSLASH(C) ((C) == '/' || (C) == '\\') -#else -# define FILE_SYSTEM_PREFIX_LEN(Filename) 0 -# define ISSLASH(C) ((C) == '/') -#endif - -#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE -# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 -#endif - -#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE -# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) -# else -# define IS_ABSOLUTE_FILE_NAME(F) \ - (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0) -#endif -#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) - -#endif /* DOSNAME_H_ */ diff --git a/gnulib/lib/dup-safer.c b/gnulib/lib/dup-safer.c deleted file mode 100644 index 5441b96..0000000 --- a/gnulib/lib/dup-safer.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Invoke dup, but avoid some glitches. - - Copyright (C) 2001, 2004-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include - -#include "unistd-safer.h" - -#include -#include - -/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or - STDERR_FILENO. */ - -int -dup_safer (int fd) -{ - return fcntl (fd, F_DUPFD, STDERR_FILENO + 1); -} diff --git a/gnulib/lib/dup2.c b/gnulib/lib/dup2.c deleted file mode 100644 index e00dc7b..0000000 --- a/gnulib/lib/dup2.c +++ /dev/null @@ -1,132 +0,0 @@ -/* Duplicate an open file descriptor to a specified file descriptor. - - Copyright (C) 1999, 2004-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Paul Eggert */ - -#include - -/* Specification. */ -#include - -#include -#include - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ -# define WIN32_LEAN_AND_MEAN -# include -#endif - -#if HAVE_DUP2 - -# undef dup2 - -int -rpl_dup2 (int fd, int desired_fd) -{ - int result; -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open, - dup2 (fd, fd) returns 0, but all further attempts to use fd in - future dup2 calls will hang. */ - if (fd == desired_fd) - { - if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE) - { - errno = EBADF; - return -1; - } - return fd; - } - /* Wine 1.0.1 return 0 when desired_fd is negative but not -1: - http://bugs.winehq.org/show_bug.cgi?id=21289 */ - if (desired_fd < 0) - { - errno = EBADF; - return -1; - } -# elif !defined __linux__ - /* On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */ - if (fd == desired_fd) - return fcntl (fd, F_GETFL) == -1 ? -1 : fd; -# endif - result = dup2 (fd, desired_fd); -# ifdef __linux__ - /* Correct a Linux return value. - - */ - if (fd == desired_fd && result == (unsigned int) -EBADF) - { - errno = EBADF; - result = -1; - } -# endif - if (result == 0) - result = desired_fd; - /* Correct a cygwin 1.5.x errno value. */ - else if (result == -1 && errno == EMFILE) - errno = EBADF; -# if REPLACE_FCHDIR - if (fd != desired_fd && result != -1) - result = _gl_register_dup (fd, result); -# endif - return result; -} - -#else /* !HAVE_DUP2 */ - -/* On older platforms, dup2 did not exist. */ - -# ifndef F_DUPFD -static int -dupfd (int fd, int desired_fd) -{ - int duplicated_fd = dup (fd); - if (duplicated_fd < 0 || duplicated_fd == desired_fd) - return duplicated_fd; - else - { - int r = dupfd (fd, desired_fd); - int e = errno; - close (duplicated_fd); - errno = e; - return r; - } -} -# endif - -int -dup2 (int fd, int desired_fd) -{ - int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; - if (result == -1 || fd == desired_fd) - return result; - close (desired_fd); -# ifdef F_DUPFD - result = fcntl (fd, F_DUPFD, desired_fd); -# if REPLACE_FCHDIR - if (0 <= result) - result = _gl_register_dup (fd, result); -# endif -# else - result = dupfd (fd, desired_fd); -# endif - if (result == -1 && (errno == EMFILE || errno == EINVAL)) - errno = EBADF; - return result; -} -#endif /* !HAVE_DUP2 */ diff --git a/gnulib/lib/errno.in.h b/gnulib/lib/errno.in.h deleted file mode 100644 index a91f591..0000000 --- a/gnulib/lib/errno.in.h +++ /dev/null @@ -1,167 +0,0 @@ -/* A POSIX-like . - - Copyright (C) 2008-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GL_ERRNO_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_ERRNO_H@ - -#ifndef _GL_ERRNO_H -#define _GL_ERRNO_H - - -/* On native Windows platforms, many macros are not defined. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -/* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */ -# define EWOULDBLOCK EAGAIN - -/* Values >= 100 seem safe to use. */ -# define ETXTBSY 100 -# define GNULIB_defined_ETXTBSY 1 - -/* These are intentionally the same values as the WSA* error numbers, defined - in . */ -# define EINPROGRESS 10036 -# define EALREADY 10037 -# define ENOTSOCK 10038 -# define EDESTADDRREQ 10039 -# define EMSGSIZE 10040 -# define EPROTOTYPE 10041 -# define ENOPROTOOPT 10042 -# define EPROTONOSUPPORT 10043 -# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ -# define EOPNOTSUPP 10045 -# define EPFNOSUPPORT 10046 /* not required by POSIX */ -# define EAFNOSUPPORT 10047 -# define EADDRINUSE 10048 -# define EADDRNOTAVAIL 10049 -# define ENETDOWN 10050 -# define ENETUNREACH 10051 -# define ENETRESET 10052 -# define ECONNABORTED 10053 -# define ECONNRESET 10054 -# define ENOBUFS 10055 -# define EISCONN 10056 -# define ENOTCONN 10057 -# define ESHUTDOWN 10058 /* not required by POSIX */ -# define ETOOMANYREFS 10059 /* not required by POSIX */ -# define ETIMEDOUT 10060 -# define ECONNREFUSED 10061 -# define ELOOP 10062 -# define EHOSTDOWN 10064 /* not required by POSIX */ -# define EHOSTUNREACH 10065 -# define EPROCLIM 10067 /* not required by POSIX */ -# define EUSERS 10068 /* not required by POSIX */ -# define EDQUOT 10069 -# define ESTALE 10070 -# define EREMOTE 10071 /* not required by POSIX */ -# define GNULIB_defined_ESOCK 1 - -# endif - - -/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros - EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ -# if @EMULTIHOP_HIDDEN@ -# define EMULTIHOP @EMULTIHOP_VALUE@ -# define GNULIB_defined_EMULTIHOP 1 -# endif -# if @ENOLINK_HIDDEN@ -# define ENOLINK @ENOLINK_VALUE@ -# define GNULIB_defined_ENOLINK 1 -# endif -# if @EOVERFLOW_HIDDEN@ -# define EOVERFLOW @EOVERFLOW_VALUE@ -# define GNULIB_defined_EOVERFLOW 1 -# endif - - -/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, - EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. - Likewise, on NonStop Kernel, EDQUOT is not defined. - Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, - HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. - - Note: When one of these systems defines some of these macros some day, - binaries will have to be recompiled so that they recognizes the new - errno values from the system. */ - -# ifndef ENOMSG -# define ENOMSG 2000 -# define GNULIB_defined_ENOMSG 1 -# endif - -# ifndef EIDRM -# define EIDRM 2001 -# define GNULIB_defined_EIDRM 1 -# endif - -# ifndef ENOLINK -# define ENOLINK 2002 -# define GNULIB_defined_ENOLINK 1 -# endif - -# ifndef EPROTO -# define EPROTO 2003 -# define GNULIB_defined_EPROTO 1 -# endif - -# ifndef EMULTIHOP -# define EMULTIHOP 2004 -# define GNULIB_defined_EMULTIHOP 1 -# endif - -# ifndef EBADMSG -# define EBADMSG 2005 -# define GNULIB_defined_EBADMSG 1 -# endif - -# ifndef EOVERFLOW -# define EOVERFLOW 2006 -# define GNULIB_defined_EOVERFLOW 1 -# endif - -# ifndef ENOTSUP -# define ENOTSUP 2007 -# define GNULIB_defined_ENOTSUP 1 -# endif - -# ifndef ESTALE -# define ESTALE 2009 -# define GNULIB_defined_ESTALE 1 -# endif - -# ifndef EDQUOT -# define EDQUOT 2010 -# define GNULIB_defined_EDQUOT 1 -# endif - -# ifndef ECANCELED -# define ECANCELED 2008 -# define GNULIB_defined_ECANCELED 1 -# endif - - -#endif /* _GL_ERRNO_H */ -#endif /* _GL_ERRNO_H */ diff --git a/gnulib/lib/error.c b/gnulib/lib/error.c deleted file mode 100644 index a2d1c1b..0000000 --- a/gnulib/lib/error.c +++ /dev/null @@ -1,394 +0,0 @@ -/* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2007, 2009-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by David MacKenzie . */ - -#if !_LIBC -# include -#endif - -#include "error.h" - -#include -#include -#include -#include - -#if !_LIBC && ENABLE_NLS -# include "gettext.h" -# define _(msgid) gettext (msgid) -#endif - -#ifdef _LIBC -# include -# include -# include -# include -# define mbsrtowcs __mbsrtowcs -#endif - -#if USE_UNLOCKED_IO -# include "unlocked-io.h" -#endif - -#ifndef _ -# define _(String) String -#endif - -/* If NULL, error will flush stdout, then print on stderr the program - name, a colon and a space. Otherwise, error will call this - function without parameters instead. */ -void (*error_print_progname) (void); - -/* This variable is incremented each time `error' is called. */ -unsigned int error_message_count; - -#ifdef _LIBC -/* In the GNU C library, there is a predefined variable for this. */ - -# define program_name program_invocation_name -# include -# include -# include - -/* In GNU libc we want do not want to use the common name `error' directly. - Instead make it a weak alias. */ -extern void __error (int status, int errnum, const char *message, ...) - __attribute__ ((__format__ (__printf__, 3, 4))); -extern void __error_at_line (int status, int errnum, const char *file_name, - unsigned int line_number, const char *message, - ...) - __attribute__ ((__format__ (__printf__, 5, 6)));; -# define error __error -# define error_at_line __error_at_line - -# include -# define fflush(s) INTUSE(_IO_fflush) (s) -# undef putc -# define putc(c, fp) INTUSE(_IO_putc) (c, fp) - -# include - -#else /* not _LIBC */ - -# include -# include - -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ -# define WIN32_LEAN_AND_MEAN -# include -# endif - -/* The gnulib override of fcntl is not needed in this file. */ -# undef fcntl - -# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P -# ifndef HAVE_DECL_STRERROR_R -"this configure-time declaration test was not run" -# endif -char *strerror_r (); -# endif - -/* The calling program should define program_name and set it to the - name of the executing program. */ -extern char *program_name; - -# if HAVE_STRERROR_R || defined strerror_r -# define __strerror_r strerror_r -# endif /* HAVE_STRERROR_R || defined strerror_r */ -#endif /* not _LIBC */ - -#if !_LIBC -/* Return non-zero if FD is open. */ -static inline int -is_open (int fd) -{ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32: The initial state of unassigned standard file descriptors is - that they are open but point to an INVALID_HANDLE_VALUE. There is no - fcntl, and the gnulib replacement fcntl does not support F_GETFL. */ - return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; -# else -# ifndef F_GETFL -# error Please port fcntl to your platform -# endif - return 0 <= fcntl (fd, F_GETFL); -# endif -} -#endif - -static inline void -flush_stdout (void) -{ -#if !_LIBC - int stdout_fd; - -# if GNULIB_FREOPEN_SAFER - /* Use of gnulib's freopen-safer module normally ensures that - fileno (stdout) == 1 - whenever stdout is open. */ - stdout_fd = STDOUT_FILENO; -# else - /* POSIX states that fileno (stdout) after fclose is unspecified. But in - practice it is not a problem, because stdout is statically allocated and - the fd of a FILE stream is stored as a field in its allocated memory. */ - stdout_fd = fileno (stdout); -# endif - /* POSIX states that fflush (stdout) after fclose is unspecified; it - is safe in glibc, but not on all other platforms. fflush (NULL) - is always defined, but too draconian. */ - if (0 <= stdout_fd && is_open (stdout_fd)) -#endif - fflush (stdout); -} - -static void -print_errno_message (int errnum) -{ - char const *s; - -#if defined HAVE_STRERROR_R || _LIBC - char errbuf[1024]; -# if STRERROR_R_CHAR_P || _LIBC - s = __strerror_r (errnum, errbuf, sizeof errbuf); -# else - if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) - s = errbuf; - else - s = 0; -# endif -#else - s = strerror (errnum); -#endif - -#if !_LIBC - if (! s) - s = _("Unknown system error"); -#endif - -#if _LIBC - __fxprintf (NULL, ": %s", s); -#else - fprintf (stderr, ": %s", s); -#endif -} - -static void -error_tail (int status, int errnum, const char *message, va_list args) -{ -#if _LIBC - if (_IO_fwide (stderr, 0) > 0) - { -# define ALLOCA_LIMIT 2000 - size_t len = strlen (message) + 1; - wchar_t *wmessage = NULL; - mbstate_t st; - size_t res; - const char *tmp; - bool use_malloc = false; - - while (1) - { - if (__libc_use_alloca (len * sizeof (wchar_t))) - wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); - else - { - if (!use_malloc) - wmessage = NULL; - - wchar_t *p = (wchar_t *) realloc (wmessage, - len * sizeof (wchar_t)); - if (p == NULL) - { - free (wmessage); - fputws_unlocked (L"out of memory\n", stderr); - return; - } - wmessage = p; - use_malloc = true; - } - - memset (&st, '\0', sizeof (st)); - tmp = message; - - res = mbsrtowcs (wmessage, &tmp, len, &st); - if (res != len) - break; - - if (__builtin_expect (len >= SIZE_MAX / 2, 0)) - { - /* This really should not happen if everything is fine. */ - res = (size_t) -1; - break; - } - - len *= 2; - } - - if (res == (size_t) -1) - { - /* The string cannot be converted. */ - if (use_malloc) - { - free (wmessage); - use_malloc = false; - } - wmessage = (wchar_t *) L"???"; - } - - __vfwprintf (stderr, wmessage, args); - - if (use_malloc) - free (wmessage); - } - else -#endif - vfprintf (stderr, message, args); - va_end (args); - - ++error_message_count; - if (errnum) - print_errno_message (errnum); -#if _LIBC - __fxprintf (NULL, "\n"); -#else - putc ('\n', stderr); -#endif - fflush (stderr); - if (status) - exit (status); -} - - -/* Print the program name and error message MESSAGE, which is a printf-style - format string with optional args. - If ERRNUM is nonzero, print its corresponding system error message. - Exit with status STATUS if it is nonzero. */ -void -error (int status, int errnum, const char *message, ...) -{ - va_list args; - -#if defined _LIBC && defined __libc_ptf_call - /* We do not want this call to be cut short by a thread - cancellation. Therefore disable cancellation for now. */ - int state = PTHREAD_CANCEL_ENABLE; - __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), - 0); -#endif - - flush_stdout (); -#ifdef _LIBC - _IO_flockfile (stderr); -#endif - if (error_print_progname) - (*error_print_progname) (); - else - { -#if _LIBC - __fxprintf (NULL, "%s: ", program_name); -#else - fprintf (stderr, "%s: ", program_name); -#endif - } - - va_start (args, message); - error_tail (status, errnum, message, args); - -#ifdef _LIBC - _IO_funlockfile (stderr); -# ifdef __libc_ptf_call - __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); -# endif -#endif -} - -/* Sometimes we want to have at most one error per line. This - variable controls whether this mode is selected or not. */ -int error_one_per_line; - -void -error_at_line (int status, int errnum, const char *file_name, - unsigned int line_number, const char *message, ...) -{ - va_list args; - - if (error_one_per_line) - { - static const char *old_file_name; - static unsigned int old_line_number; - - if (old_line_number == line_number - && (file_name == old_file_name - || strcmp (old_file_name, file_name) == 0)) - /* Simply return and print nothing. */ - return; - - old_file_name = file_name; - old_line_number = line_number; - } - -#if defined _LIBC && defined __libc_ptf_call - /* We do not want this call to be cut short by a thread - cancellation. Therefore disable cancellation for now. */ - int state = PTHREAD_CANCEL_ENABLE; - __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), - 0); -#endif - - flush_stdout (); -#ifdef _LIBC - _IO_flockfile (stderr); -#endif - if (error_print_progname) - (*error_print_progname) (); - else - { -#if _LIBC - __fxprintf (NULL, "%s:", program_name); -#else - fprintf (stderr, "%s:", program_name); -#endif - } - -#if _LIBC - __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", - file_name, line_number); -#else - fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", - file_name, line_number); -#endif - - va_start (args, message); - error_tail (status, errnum, message, args); - -#ifdef _LIBC - _IO_funlockfile (stderr); -# ifdef __libc_ptf_call - __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); -# endif -#endif -} - -#ifdef _LIBC -/* Make the weak alias. */ -# undef error -# undef error_at_line -weak_alias (__error, error) -weak_alias (__error_at_line, error_at_line) -#endif diff --git a/gnulib/lib/error.h b/gnulib/lib/error.h deleted file mode 100644 index 80f81bc..0000000 --- a/gnulib/lib/error.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Declaration for error-reporting function - Copyright (C) 1995-1997, 2003, 2006, 2008-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _ERROR_H -#define _ERROR_H 1 - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Print a message with `fprintf (stderr, FORMAT, ...)'; - if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). - If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ - -extern void error (int __status, int __errnum, const char *__format, ...) - _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); - -extern void error_at_line (int __status, int __errnum, const char *__fname, - unsigned int __lineno, const char *__format, ...) - _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6)); - -/* If NULL, error will flush stdout, then print on stderr the program - name, a colon and a space. Otherwise, error will call this - function without parameters instead. */ -extern void (*error_print_progname) (void); - -/* This variable is incremented each time `error' is called. */ -extern unsigned int error_message_count; - -/* Sometimes we want to have at most one error per line. This - variable controls whether this mode is selected or not. */ -extern int error_one_per_line; - -#ifdef __cplusplus -} -#endif - -#endif /* error.h */ diff --git a/gnulib/lib/euidaccess.c b/gnulib/lib/euidaccess.c deleted file mode 100644 index 101f975..0000000 --- a/gnulib/lib/euidaccess.c +++ /dev/null @@ -1,222 +0,0 @@ -/* euidaccess -- check if effective user id can access file - - Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by David MacKenzie and Torbjorn Granlund. - Adapted for GNU C library by Roland McGrath. */ - -#ifndef _LIBC -# include -#endif - -#include -#include -#include -#include - -#if HAVE_LIBGEN_H -# include -#endif - -#include -#ifndef __set_errno -# define __set_errno(val) errno = (val) -#endif - -#if defined EACCES && !defined EACCESS -# define EACCESS EACCES -#endif - -#ifndef F_OK -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 -#endif - - -#ifdef _LIBC - -# define access __access -# define getuid __getuid -# define getgid __getgid -# define geteuid __geteuid -# define getegid __getegid -# define group_member __group_member -# define euidaccess __euidaccess -# undef stat -# define stat stat64 - -#else - -# include "group-member.h" - -#endif - -/* Return 0 if the user has permission of type MODE on FILE; - otherwise, return -1 and set `errno'. - Like access, except that it uses the effective user and group - id's instead of the real ones, and it does not always check for read-only - file system, text busy, etc. */ - -int -euidaccess (const char *file, int mode) -{ -#if HAVE_FACCESSAT /* glibc */ - return faccessat (AT_FDCWD, file, mode, AT_EACCESS); -#elif defined EFF_ONLY_OK /* IRIX, OSF/1, Interix */ - return access (file, mode | EFF_ONLY_OK); -#elif defined ACC_SELF /* AIX */ - return accessx (file, mode, ACC_SELF); -#elif HAVE_EACCESS /* FreeBSD */ - return eaccess (file, mode); -#else /* MacOS X, NetBSD, OpenBSD, HP-UX, Solaris, Cygwin, mingw, BeOS */ - - uid_t uid = getuid (); - gid_t gid = getgid (); - uid_t euid = geteuid (); - gid_t egid = getegid (); - struct stat stats; - -# if HAVE_DECL_SETREGID && PREFER_NONREENTRANT_EUIDACCESS - - /* Define PREFER_NONREENTRANT_EUIDACCESS if you prefer euidaccess to - return the correct result even if this would make it - nonreentrant. Define this only if your entire application is - safe even if the uid or gid might temporarily change. If your - application uses signal handlers or threads it is probably not - safe. */ - - if (mode == F_OK) - return stat (file, &stats); - else - { - int result; - int saved_errno; - - if (uid != euid) - setreuid (euid, uid); - if (gid != egid) - setregid (egid, gid); - - result = access (file, mode); - saved_errno = errno; - - /* Restore them. */ - if (uid != euid) - setreuid (uid, euid); - if (gid != egid) - setregid (gid, egid); - - errno = saved_errno; - return result; - } - -# else - - /* The following code assumes the traditional Unix model, and is not - correct on systems that have ACLs or the like. However, it's - better than nothing, and it is reentrant. */ - - unsigned int granted; - if (uid == euid && gid == egid) - /* If we are not set-uid or set-gid, access does the same. */ - return access (file, mode); - - if (stat (file, &stats) != 0) - return -1; - - /* The super-user can read and write any file, and execute any file - that anyone can execute. */ - if (euid == 0 && ((mode & X_OK) == 0 - || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))) - return 0; - - /* Convert the mode to traditional form, clearing any bogus bits. */ - if (R_OK == 4 && W_OK == 2 && X_OK == 1 && F_OK == 0) - mode &= 7; - else - mode = ((mode & R_OK ? 4 : 0) - + (mode & W_OK ? 2 : 0) - + (mode & X_OK ? 1 : 0)); - - if (mode == 0) - return 0; /* The file exists. */ - - /* Convert the file's permission bits to traditional form. */ - if (S_IRUSR == (4 << 6) && S_IWUSR == (2 << 6) && S_IXUSR == (1 << 6) - && S_IRGRP == (4 << 3) && S_IWGRP == (2 << 3) && S_IXGRP == (1 << 3) - && S_IROTH == (4 << 0) && S_IWOTH == (2 << 0) && S_IXOTH == (1 << 0)) - granted = stats.st_mode; - else - granted = ((stats.st_mode & S_IRUSR ? 4 << 6 : 0) - + (stats.st_mode & S_IWUSR ? 2 << 6 : 0) - + (stats.st_mode & S_IXUSR ? 1 << 6 : 0) - + (stats.st_mode & S_IRGRP ? 4 << 3 : 0) - + (stats.st_mode & S_IWGRP ? 2 << 3 : 0) - + (stats.st_mode & S_IXGRP ? 1 << 3 : 0) - + (stats.st_mode & S_IROTH ? 4 << 0 : 0) - + (stats.st_mode & S_IWOTH ? 2 << 0 : 0) - + (stats.st_mode & S_IXOTH ? 1 << 0 : 0)); - - if (euid == stats.st_uid) - granted >>= 6; - else if (egid == stats.st_gid || group_member (stats.st_gid)) - granted >>= 3; - - if ((mode & ~granted) == 0) - return 0; - __set_errno (EACCESS); - return -1; - -# endif -#endif -} -#undef euidaccess -#ifdef weak_alias -weak_alias (__euidaccess, euidaccess) -#endif - -#ifdef TEST -# include -# include -# include - -char *program_name; - -int -main (int argc, char **argv) -{ - char *file; - int mode; - int err; - - program_name = argv[0]; - if (argc < 3) - abort (); - file = argv[1]; - mode = atoi (argv[2]); - - err = euidaccess (file, mode); - printf ("%d\n", err); - if (err != 0) - error (0, errno, "%s", file); - exit (0); -} -#endif diff --git a/gnulib/lib/exitfail.c b/gnulib/lib/exitfail.c deleted file mode 100644 index 953aa02..0000000 --- a/gnulib/lib/exitfail.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Failure exit status - - Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "exitfail.h" - -#include - -int volatile exit_failure = EXIT_FAILURE; diff --git a/gnulib/lib/exitfail.h b/gnulib/lib/exitfail.h deleted file mode 100644 index 6d01d4f..0000000 --- a/gnulib/lib/exitfail.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Failure exit status - - Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -extern int volatile exit_failure; diff --git a/gnulib/lib/faccessat.c b/gnulib/lib/faccessat.c deleted file mode 100644 index 3ba9fee..0000000 --- a/gnulib/lib/faccessat.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Check the access rights of a file relative to an open directory. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Eric Blake */ - -#include - -#include - -#ifndef HAVE_ACCESS -/* Mingw lacks access, but it also lacks real vs. effective ids, so - the gnulib euidaccess module is good enough. */ -# undef access -# define access euidaccess -#endif - -/* Invoke access or euidaccess on file, FILE, using mode MODE, in the directory - open on descriptor FD. If possible, do it without changing the - working directory. Otherwise, resort to using save_cwd/fchdir, then - (access|euidaccess)/restore_cwd. If either the save_cwd or the - restore_cwd fails, then give a diagnostic and exit nonzero. - Note that this implementation only supports AT_EACCESS, although some - native versions also support AT_SYMLINK_NOFOLLOW. */ - -#define AT_FUNC_NAME faccessat -#define AT_FUNC_F1 euidaccess -#define AT_FUNC_F2 access -#define AT_FUNC_USE_F1_COND AT_EACCESS -#define AT_FUNC_POST_FILE_PARAM_DECLS , int mode, int flag -#define AT_FUNC_POST_FILE_ARGS , mode -#include "at-func.c" diff --git a/gnulib/lib/fchdir.c b/gnulib/lib/fchdir.c deleted file mode 100644 index 94c4e71..0000000 --- a/gnulib/lib/fchdir.c +++ /dev/null @@ -1,287 +0,0 @@ -/* fchdir replacement. - Copyright (C) 2006-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef REPLACE_OPEN_DIRECTORY -# define REPLACE_OPEN_DIRECTORY 0 -#endif - -#ifndef HAVE_CANONICALIZE_FILE_NAME -# if GNULIB_CANONICALIZE || GNULIB_CANONICALIZE_LGPL -# define HAVE_CANONICALIZE_FILE_NAME 1 -# else -# define HAVE_CANONICALIZE_FILE_NAME 0 -# define canonicalize_file_name(name) NULL -# endif -#endif - -/* This replacement assumes that a directory is not renamed while opened - through a file descriptor. - - FIXME: On mingw, this would be possible to enforce if we were to - also open a HANDLE to each directory currently visited by a file - descriptor, since mingw refuses to rename any in-use file system - object. */ - -/* Array of file descriptors opened. If REPLACE_OPEN_DIRECTORY or if it points - to a directory, it stores info about this directory. */ -typedef struct -{ - char *name; /* Absolute name of the directory, or NULL. */ - /* FIXME - add a DIR* member to make dirfd possible on mingw? */ -} dir_info_t; -static dir_info_t *dirs; -static size_t dirs_allocated; - -/* Try to ensure dirs has enough room for a slot at index fd; free any - contents already in that slot. Return false and set errno to - ENOMEM on allocation failure. */ -static bool -ensure_dirs_slot (size_t fd) -{ - if (fd < dirs_allocated) - free (dirs[fd].name); - else - { - size_t new_allocated; - dir_info_t *new_dirs; - - new_allocated = 2 * dirs_allocated + 1; - if (new_allocated <= fd) - new_allocated = fd + 1; - new_dirs = - (dirs != NULL - ? (dir_info_t *) realloc (dirs, new_allocated * sizeof *dirs) - : (dir_info_t *) malloc (new_allocated * sizeof *dirs)); - if (new_dirs == NULL) - return false; - memset (new_dirs + dirs_allocated, 0, - (new_allocated - dirs_allocated) * sizeof *dirs); - dirs = new_dirs; - dirs_allocated = new_allocated; - } - return true; -} - -/* Return the canonical name of DIR in malloc'd storage. */ -static char * -get_name (char const *dir) -{ - char *result; - if (REPLACE_OPEN_DIRECTORY || !HAVE_CANONICALIZE_FILE_NAME) - { - /* The function canonicalize_file_name has not yet been ported - to mingw, with all its drive letter and backslash quirks. - Fortunately, getcwd is reliable in this case, but we ensure - we can get back to where we started before using it. Treat - "." as a special case, as it is frequently encountered. */ - char *cwd = getcwd (NULL, 0); - int saved_errno; - if (dir[0] == '.' && dir[1] == '\0') - return cwd; - if (chdir (cwd)) - return NULL; - result = chdir (dir) ? NULL : getcwd (NULL, 0); - saved_errno = errno; - if (chdir (cwd)) - abort (); - free (cwd); - errno = saved_errno; - } - else - { - /* Avoid changing the directory. */ - result = canonicalize_file_name (dir); - } - return result; -} - -/* Hook into the gnulib replacements for open() and close() to keep track - of the open file descriptors. */ - -/* Close FD, cleaning up any fd to name mapping if fd was visiting a - directory. */ -void -_gl_unregister_fd (int fd) -{ - if (fd >= 0 && fd < dirs_allocated) - { - free (dirs[fd].name); - dirs[fd].name = NULL; - } -} - -/* Mark FD as visiting FILENAME. FD must be non-negative, and refer - to an open file descriptor. If REPLACE_OPEN_DIRECTORY is non-zero, - this should only be called if FD is visiting a directory. Close FD - and return -1 if there is insufficient memory to track the - directory name; otherwise return FD. */ -int -_gl_register_fd (int fd, const char *filename) -{ - struct stat statbuf; - - assert (0 <= fd); - if (REPLACE_OPEN_DIRECTORY - || (fstat (fd, &statbuf) == 0 && S_ISDIR (statbuf.st_mode))) - { - if (!ensure_dirs_slot (fd) - || (dirs[fd].name = get_name (filename)) == NULL) - { - int saved_errno = errno; - close (fd); - errno = saved_errno; - return -1; - } - } - return fd; -} - -/* Mark NEWFD as a duplicate of OLDFD; useful from dup, dup2, dup3, - and fcntl. Both arguments must be valid and distinct file - descriptors. Close NEWFD and return -1 if OLDFD is tracking a - directory, but there is insufficient memory to track the same - directory in NEWFD; otherwise return NEWFD. */ -int -_gl_register_dup (int oldfd, int newfd) -{ - assert (0 <= oldfd && 0 <= newfd && oldfd != newfd); - if (oldfd < dirs_allocated && dirs[oldfd].name) - { - /* Duplicated a directory; must ensure newfd is allocated. */ - if (!ensure_dirs_slot (newfd) - || (dirs[newfd].name = strdup (dirs[oldfd].name)) == NULL) - { - int saved_errno = errno; - close (newfd); - errno = saved_errno; - newfd = -1; - } - } - else if (newfd < dirs_allocated) - { - /* Duplicated a non-directory; ensure newfd is cleared. */ - free (dirs[newfd].name); - dirs[newfd].name = NULL; - } - return newfd; -} - -/* If FD is currently visiting a directory, then return the name of - that directory. Otherwise, return NULL and set errno. */ -const char * -_gl_directory_name (int fd) -{ - if (0 <= fd && fd < dirs_allocated && dirs[fd].name != NULL) - return dirs[fd].name; - /* At this point, fd is either invalid, or open but not a directory. - If dup2 fails, errno is correctly EBADF. */ - if (0 <= fd) - { - if (dup2 (fd, fd) == fd) - errno = ENOTDIR; - } - else - errno = EBADF; - return NULL; -} - -#if REPLACE_OPEN_DIRECTORY -/* Return stat information about FD in STATBUF. Needed when - rpl_open() used a dummy file to work around an open() that can't - normally visit directories. */ -# undef fstat -int -rpl_fstat (int fd, struct stat *statbuf) -{ - if (0 <= fd && fd < dirs_allocated && dirs[fd].name != NULL) - return stat (dirs[fd].name, statbuf); - return fstat (fd, statbuf); -} -#endif - -/* Override opendir() and closedir(), to keep track of the open file - descriptors. Needed because there is a function dirfd(). */ - -int -rpl_closedir (DIR *dp) -#undef closedir -{ - int fd = dirfd (dp); - int retval = closedir (dp); - - if (retval >= 0) - _gl_unregister_fd (fd); - return retval; -} - -DIR * -rpl_opendir (const char *filename) -#undef opendir -{ - DIR *dp; - - dp = opendir (filename); - if (dp != NULL) - { - int fd = dirfd (dp); - if (0 <= fd && _gl_register_fd (fd, filename) != fd) - { - int saved_errno = errno; - closedir (dp); - errno = saved_errno; - return NULL; - } - } - return dp; -} - -/* Override dup(), to keep track of open file descriptors. */ - -int -rpl_dup (int oldfd) -#undef dup -{ - int newfd = dup (oldfd); - - if (0 <= newfd) - newfd = _gl_register_dup (oldfd, newfd); - return newfd; -} - - -/* Implement fchdir() in terms of chdir(). */ - -int -fchdir (int fd) -{ - const char *name = _gl_directory_name (fd); - return name ? chdir (name) : -1; -} diff --git a/gnulib/lib/fchmodat.c b/gnulib/lib/fchmodat.c deleted file mode 100644 index 18fc4df..0000000 --- a/gnulib/lib/fchmodat.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Change the protections of file relative to an open directory. - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include - -#include - -#ifndef HAVE_LCHMOD -/* Use a different name, to avoid conflicting with any - system-supplied declaration. */ -# undef lchmod -# define lchmod lchmod_rpl -static int -lchmod (char const *f _GL_UNUSED, mode_t m _GL_UNUSED) -{ - errno = ENOSYS; - return -1; -} -#endif - -/* Solaris 10 has no function like this. - Invoke chmod or lchmod on file, FILE, using mode MODE, in the directory - open on descriptor FD. If possible, do it without changing the - working directory. Otherwise, resort to using save_cwd/fchdir, - then (chmod|lchmod)/restore_cwd. If either the save_cwd or the - restore_cwd fails, then give a diagnostic and exit nonzero. - Note that an attempt to use a FLAG value of AT_SYMLINK_NOFOLLOW - on a system without lchmod support causes this function to fail. */ - -#define AT_FUNC_NAME fchmodat -#define AT_FUNC_F1 lchmod -#define AT_FUNC_F2 chmod -#define AT_FUNC_USE_F1_COND AT_SYMLINK_NOFOLLOW -#define AT_FUNC_POST_FILE_PARAM_DECLS , mode_t mode, int flag -#define AT_FUNC_POST_FILE_ARGS , mode -#include "at-func.c" diff --git a/gnulib/lib/fchown-stub.c b/gnulib/lib/fchown-stub.c deleted file mode 100644 index 6be750b..0000000 --- a/gnulib/lib/fchown-stub.c +++ /dev/null @@ -1,16 +0,0 @@ -#include - -#include -#include - -/* A trivial substitute for `fchown'. - - DJGPP 2.03 and earlier (and perhaps later) don't have `fchown', - so we pretend no-one has permission for this operation. */ - -int -fchown (int fd, uid_t uid, gid_t gid) -{ - errno = EPERM; - return -1; -} diff --git a/gnulib/lib/fchownat.c b/gnulib/lib/fchownat.c deleted file mode 100644 index 303d0fd..0000000 --- a/gnulib/lib/fchownat.c +++ /dev/null @@ -1,114 +0,0 @@ -/* This function serves as replacement for a missing fchownat function, - as well as a work around for the fchownat bug in glibc-2.4: - - when the buggy fchownat-with-AT_SYMLINK_NOFOLLOW operates on a symlink, it - mistakenly affects the symlink referent, rather than the symlink itself. - - Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include - -#include -#include - -#include "openat.h" - -#if !HAVE_FCHOWNAT - -/* Replacement for Solaris' function by the same name. - Invoke chown or lchown on file, FILE, using OWNER and GROUP, in the - directory open on descriptor FD. If FLAG is AT_SYMLINK_NOFOLLOW, then - use lchown, otherwise, use chown. If possible, do it without changing - the working directory. Otherwise, resort to using save_cwd/fchdir, - then (chown|lchown)/restore_cwd. If either the save_cwd or the - restore_cwd fails, then give a diagnostic and exit nonzero. */ - -# define AT_FUNC_NAME fchownat -# define AT_FUNC_F1 lchown -# define AT_FUNC_F2 chown -# define AT_FUNC_USE_F1_COND AT_SYMLINK_NOFOLLOW -# define AT_FUNC_POST_FILE_PARAM_DECLS , uid_t owner, gid_t group, int flag -# define AT_FUNC_POST_FILE_ARGS , owner, group -# include "at-func.c" -# undef AT_FUNC_NAME -# undef AT_FUNC_F1 -# undef AT_FUNC_F2 -# undef AT_FUNC_USE_F1_COND -# undef AT_FUNC_POST_FILE_PARAM_DECLS -# undef AT_FUNC_POST_FILE_ARGS - -#else /* HAVE_FCHOWNAT */ - -# undef fchownat - -# if FCHOWNAT_NOFOLLOW_BUG - -/* Failure to handle AT_SYMLINK_NOFOLLOW requires the /proc/self/fd or - fchdir workaround to call lchown for lchownat, but there is no need - to penalize chownat. */ -static int -local_lchownat (int fd, char const *file, uid_t owner, gid_t group); - -# define AT_FUNC_NAME local_lchownat -# define AT_FUNC_F1 lchown -# define AT_FUNC_POST_FILE_PARAM_DECLS , uid_t owner, gid_t group -# define AT_FUNC_POST_FILE_ARGS , owner, group -# include "at-func.c" -# undef AT_FUNC_NAME -# undef AT_FUNC_F1 -# undef AT_FUNC_POST_FILE_PARAM_DECLS -# undef AT_FUNC_POST_FILE_ARGS - -# endif - -/* Work around bugs with trailing slash, using the same workarounds as - chown and lchown. */ - -int -rpl_fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag) -{ -# if FCHOWNAT_NOFOLLOW_BUG - if (flag == AT_SYMLINK_NOFOLLOW) - return local_lchownat (fd, file, owner, group); -# endif -# if FCHOWNAT_EMPTY_FILENAME_BUG - if (file[0] == '\0') - { - errno = ENOENT; - return -1; - } -# endif -# if CHOWN_TRAILING_SLASH_BUG - { - size_t len = strlen (file); - struct stat st; - if (len && file[len - 1] == '/') - { - if (statat (fd, file, &st)) - return -1; - if (flag == AT_SYMLINK_NOFOLLOW) - return fchownat (fd, file, owner, group, 0); - } - } -# endif - return fchownat (fd, file, owner, group, flag); -} - -#endif /* HAVE_FCHOWNAT */ diff --git a/gnulib/lib/fclose.c b/gnulib/lib/fclose.c deleted file mode 100644 index 1d7e85b..0000000 --- a/gnulib/lib/fclose.c +++ /dev/null @@ -1,47 +0,0 @@ -/* fclose replacement. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include - -/* Override fclose() to call the overridden close(). */ - -int -rpl_fclose (FILE *fp) -#undef fclose -{ - int saved_errno = 0; - - if (fflush (fp)) - saved_errno = errno; - - if (close (fileno (fp)) < 0 && saved_errno == 0) - saved_errno = errno; - - fclose (fp); /* will fail with errno = EBADF */ - - if (saved_errno != 0) - { - errno = saved_errno; - return EOF; - } - return 0; -} diff --git a/gnulib/lib/fcntl--.h b/gnulib/lib/fcntl--.h deleted file mode 100644 index ad696c9..0000000 --- a/gnulib/lib/fcntl--.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Like fcntl.h, but redefine some names to avoid glitches. - - Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include -#include "fcntl-safer.h" - -#undef open -#define open open_safer - -#undef creat -#define creat creat_safer - -#if GNULIB_OPENAT_SAFER -# undef openat -# define openat openat_safer -#endif diff --git a/gnulib/lib/fcntl-safer.h b/gnulib/lib/fcntl-safer.h deleted file mode 100644 index 2aaf17e..0000000 --- a/gnulib/lib/fcntl-safer.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Invoke fcntl-like functions, but avoid some glitches. - - Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include - -int open_safer (char const *, int, ...); -int creat_safer (char const *, mode_t); - -#if GNULIB_OPENAT_SAFER -int openat_safer (int, char const *, int, ...); -#endif diff --git a/gnulib/lib/fcntl.c b/gnulib/lib/fcntl.c deleted file mode 100644 index d6a328c..0000000 --- a/gnulib/lib/fcntl.c +++ /dev/null @@ -1,308 +0,0 @@ -/* Provide file descriptor control. - - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake . */ - -#include - -/* Specification. */ -#include - -#include -#include -#include -#include - -#if !HAVE_FCNTL -# define rpl_fcntl fcntl -#endif -#undef fcntl - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ -# define WIN32_LEAN_AND_MEAN -# include - -/* Upper bound on getdtablesize(). See lib/getdtablesize.c. */ -# define OPEN_MAX_MAX 0x10000 - -/* Duplicate OLDFD into the first available slot of at least NEWFD, - which must be positive, with FLAGS determining whether the duplicate - will be inheritable. */ -static int -dupfd (int oldfd, int newfd, int flags) -{ - /* Mingw has no way to create an arbitrary fd. Iterate until all - file descriptors less than newfd are filled up. */ - HANDLE curr_process = GetCurrentProcess (); - HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd); - unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT]; - unsigned int fds_to_close_bound = 0; - int result; - BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE; - int mode; - - if (newfd < 0 || getdtablesize () <= newfd) - { - errno = EINVAL; - return -1; - } - if (old_handle == INVALID_HANDLE_VALUE - || (mode = setmode (oldfd, O_BINARY)) == -1) - { - /* oldfd is not open, or is an unassigned standard file - descriptor. */ - errno = EBADF; - return -1; - } - setmode (oldfd, mode); - flags |= mode; - - for (;;) - { - HANDLE new_handle; - int duplicated_fd; - unsigned int index; - - if (!DuplicateHandle (curr_process, /* SourceProcessHandle */ - old_handle, /* SourceHandle */ - curr_process, /* TargetProcessHandle */ - (PHANDLE) &new_handle, /* TargetHandle */ - (DWORD) 0, /* DesiredAccess */ - inherit, /* InheritHandle */ - DUPLICATE_SAME_ACCESS)) /* Options */ - { - /* TODO: Translate GetLastError () into errno. */ - errno = EMFILE; - result = -1; - break; - } - duplicated_fd = _open_osfhandle ((long) new_handle, flags); - if (duplicated_fd < 0) - { - CloseHandle (new_handle); - errno = EMFILE; - result = -1; - break; - } - if (newfd <= duplicated_fd) - { - result = duplicated_fd; - break; - } - - /* Set the bit duplicated_fd in fds_to_close[]. */ - index = (unsigned int) duplicated_fd / CHAR_BIT; - if (fds_to_close_bound <= index) - { - if (sizeof fds_to_close <= index) - /* Need to increase OPEN_MAX_MAX. */ - abort (); - memset (fds_to_close + fds_to_close_bound, '\0', - index + 1 - fds_to_close_bound); - fds_to_close_bound = index + 1; - } - fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT); - } - - /* Close the previous fds that turned out to be too small. */ - { - int saved_errno = errno; - unsigned int duplicated_fd; - - for (duplicated_fd = 0; - duplicated_fd < fds_to_close_bound * CHAR_BIT; - duplicated_fd++) - if ((fds_to_close[duplicated_fd / CHAR_BIT] - >> (duplicated_fd % CHAR_BIT)) - & 1) - close (duplicated_fd); - - errno = saved_errno; - } - -# if REPLACE_FCHDIR - if (0 <= result) - result = _gl_register_dup (oldfd, result); -# endif - return result; -} -#endif /* W32 */ - -/* Perform the specified ACTION on the file descriptor FD, possibly - using the argument ARG further described below. This replacement - handles the following actions, and forwards all others on to the - native fcntl. An unrecognized ACTION returns -1 with errno set to - EINVAL. - - F_DUPFD - duplicate FD, with int ARG being the minimum target fd. - If successful, return the duplicate, which will be inheritable; - otherwise return -1 and set errno. - - F_DUPFD_CLOEXEC - duplicate FD, with int ARG being the minimum - target fd. If successful, return the duplicate, which will not be - inheritable; otherwise return -1 and set errno. - - F_GETFD - ARG need not be present. If successful, return a - non-negative value containing the descriptor flags of FD (only - FD_CLOEXEC is portable, but other flags may be present); otherwise - return -1 and set errno. */ - -int -rpl_fcntl (int fd, int action, /* arg */...) -{ - va_list arg; - int result = -1; - va_start (arg, action); - switch (action) - { - -#if !HAVE_FCNTL - case F_DUPFD: - { - int target = va_arg (arg, int); - result = dupfd (fd, target, 0); - break; - } -#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR - case F_DUPFD: - { - int target = va_arg (arg, int); - /* Detect invalid target; needed for cygwin 1.5.x. */ - if (target < 0 || getdtablesize () <= target) - errno = EINVAL; - else - { - /* Haiku alpha 2 loses fd flags on original. */ - int flags = fcntl (fd, F_GETFD); - if (flags < 0) - { - result = -1; - break; - } - result = fcntl (fd, action, target); - if (0 <= result && fcntl (fd, F_SETFD, flags) == -1) - { - int saved_errno = errno; - close (result); - result = -1; - errno = saved_errno; - } -# if REPLACE_FCHDIR - if (0 <= result) - result = _gl_register_dup (fd, result); -# endif - } - break; - } /* F_DUPFD */ -#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */ - - case F_DUPFD_CLOEXEC: - { - int target = va_arg (arg, int); - -#if !HAVE_FCNTL - result = dupfd (fd, target, O_CLOEXEC); - break; -#else /* HAVE_FCNTL */ - /* Try the system call first, if the headers claim it exists - (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we - may be running with a glibc that has the macro but with an - older kernel that does not support it. Cache the - information on whether the system call really works, but - avoid caching failure if the corresponding F_DUPFD fails - for any reason. 0 = unknown, 1 = yes, -1 = no. */ - static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0; - if (0 <= have_dupfd_cloexec) - { - result = fcntl (fd, action, target); - if (0 <= result || errno != EINVAL) - { - have_dupfd_cloexec = 1; -# if REPLACE_FCHDIR - if (0 <= result) - result = _gl_register_dup (fd, result); -# endif - } - else - { - result = rpl_fcntl (fd, F_DUPFD, target); - if (result < 0) - break; - have_dupfd_cloexec = -1; - } - } - else - result = rpl_fcntl (fd, F_DUPFD, target); - if (0 <= result && have_dupfd_cloexec == -1) - { - int flags = fcntl (result, F_GETFD); - if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1) - { - int saved_errno = errno; - close (result); - errno = saved_errno; - result = -1; - } - } - break; -#endif /* HAVE_FCNTL */ - } /* F_DUPFD_CLOEXEC */ - -#if !HAVE_FCNTL - case F_GETFD: - { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - HANDLE handle = (HANDLE) _get_osfhandle (fd); - DWORD flags; - if (handle == INVALID_HANDLE_VALUE - || GetHandleInformation (handle, &flags) == 0) - errno = EBADF; - else - result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC; -# else /* !W32 */ - /* Use dup2 to reject invalid file descriptors. No way to - access this information, so punt. */ - if (0 <= dup2 (fd, fd)) - result = 0; -# endif /* !W32 */ - break; - } /* F_GETFD */ -#endif /* !HAVE_FCNTL */ - - /* Implementing F_SETFD on mingw is not trivial - there is no - API for changing the O_NOINHERIT bit on an fd, and merely - changing the HANDLE_FLAG_INHERIT bit on the underlying handle - can lead to odd state. It may be possible by duplicating the - handle, using _open_osfhandle with the right flags, then - using dup2 to move the duplicate onto the original, but that - is not supported for now. */ - - default: - { -#if HAVE_FCNTL - void *p = va_arg (arg, void *); - result = fcntl (fd, action, p); -#else - errno = EINVAL; -#endif - break; - } - } - va_end (arg); - return result; -} diff --git a/gnulib/lib/fcntl.in.h b/gnulib/lib/fcntl.in.h deleted file mode 100644 index 18cac45..0000000 --- a/gnulib/lib/fcntl.in.h +++ /dev/null @@ -1,308 +0,0 @@ -/* Like , but with non-working flags defined to 0. - - Copyright (C) 2006-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Paul Eggert */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_system_fcntl_h -/* Special invocation convention. */ - -#include -/* On some systems other than glibc, is a prerequisite of - . On glibc systems, we would like to avoid namespace pollution. - But on glibc systems, includes inside an - extern "C" { ... } block, which leads to errors in C++ mode with the - overridden from gnulib. These errors are known to be gone - with g++ version >= 4.3. */ -#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) -# include -#endif -#@INCLUDE_NEXT@ @NEXT_FCNTL_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _GL_FCNTL_H - -#include -/* On some systems other than glibc, is a prerequisite of - . On glibc systems, we would like to avoid namespace pollution. - But on glibc systems, includes inside an - extern "C" { ... } block, which leads to errors in C++ mode with the - overridden from gnulib. These errors are known to be gone - with g++ version >= 4.3. */ -#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) -# include -#endif -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_FCNTL_H@ - -#ifndef _GL_FCNTL_H -#define _GL_FCNTL_H - -#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Declare overridden functions. */ - -#if @GNULIB_FCNTL@ -# if @REPLACE_FCNTL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fcntl -# define fcntl rpl_fcntl -# endif -_GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...)); -_GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...)); -# else -# if !@HAVE_FCNTL@ -_GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...)); -# endif -_GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...)); -# endif -_GL_CXXALIASWARN (fcntl); -#elif defined GNULIB_POSIXCHECK -# undef fcntl -# if HAVE_RAW_DECL_FCNTL -_GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " - "use gnulib module fcntl for portability"); -# endif -#endif - -#if @GNULIB_OPEN@ -# if @REPLACE_OPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef open -# define open rpl_open -# endif -_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); -# else -_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); -# endif -/* On HP-UX 11, in C++ mode, open() is defined as an inline function with a - default argument. _GL_CXXALIASWARN does not work in this case. */ -# if !defined __hpux -_GL_CXXALIASWARN (open); -# endif -#elif defined GNULIB_POSIXCHECK -# undef open -/* Assume open is always declared. */ -_GL_WARN_ON_USE (open, "open is not always POSIX compliant - " - "use gnulib module open for portability"); -#endif - -#if @GNULIB_OPENAT@ -# if @REPLACE_OPENAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef openat -# define openat rpl_openat -# endif -_GL_FUNCDECL_RPL (openat, int, - (int fd, char const *file, int flags, /* mode_t mode */ ...) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (openat, int, - (int fd, char const *file, int flags, /* mode_t mode */ ...)); -# else -# if !@HAVE_OPENAT@ -_GL_FUNCDECL_SYS (openat, int, - (int fd, char const *file, int flags, /* mode_t mode */ ...) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (openat, int, - (int fd, char const *file, int flags, /* mode_t mode */ ...)); -# endif -_GL_CXXALIASWARN (openat); -#elif defined GNULIB_POSIXCHECK -# undef openat -# if HAVE_RAW_DECL_OPENAT -_GL_WARN_ON_USE (openat, "openat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -/* Fix up the FD_* macros, only known to be missing on mingw. */ - -#ifndef FD_CLOEXEC -# define FD_CLOEXEC 1 -#endif - -/* Fix up the supported F_* macros. Intentionally leave other F_* - macros undefined. Only known to be missing on mingw. */ - -#ifndef F_DUPFD_CLOEXEC -# define F_DUPFD_CLOEXEC 0x40000000 -/* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */ -# define GNULIB_defined_F_DUPFD_CLOEXEC 1 -#else -# define GNULIB_defined_F_DUPFD_CLOEXEC 0 -#endif - -#ifndef F_DUPFD -# define F_DUPFD 1 -#endif - -#ifndef F_GETFD -# define F_GETFD 2 -#endif - -/* Fix up the O_* macros. */ - -#if !defined O_DIRECT && defined O_DIRECTIO -/* Tru64 spells it `O_DIRECTIO'. */ -# define O_DIRECT O_DIRECTIO -#endif - -#if !defined O_CLOEXEC && defined O_NOINHERIT -/* Mingw spells it `O_NOINHERIT'. Intentionally leave it - undefined if not available. */ -# define O_CLOEXEC O_NOINHERIT -#endif - -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - -#ifndef O_DIRECT -# define O_DIRECT 0 -#endif - -#ifndef O_DIRECTORY -# define O_DIRECTORY 0 -#endif - -#ifndef O_DSYNC -# define O_DSYNC 0 -#endif - -#ifndef O_EXEC -# define O_EXEC O_RDONLY /* This is often close enough in older systems. */ -#endif - -#ifndef O_NDELAY -# define O_NDELAY 0 -#endif - -#ifndef O_NOATIME -# define O_NOATIME 0 -#endif - -#ifndef O_NONBLOCK -# define O_NONBLOCK O_NDELAY -#endif - -#ifndef O_NOCTTY -# define O_NOCTTY 0 -#endif - -#ifndef O_NOFOLLOW -# define O_NOFOLLOW 0 -#endif - -#ifndef O_NOLINKS -# define O_NOLINKS 0 -#endif - -#ifndef O_RSYNC -# define O_RSYNC 0 -#endif - -#ifndef O_SEARCH -# define O_SEARCH O_RDONLY /* This is often close enough in older systems. */ -#endif - -#ifndef O_SYNC -# define O_SYNC 0 -#endif - -#ifndef O_TTY_INIT -# define O_TTY_INIT 0 -#endif - -/* For systems that distinguish between text and binary I/O. - O_BINARY is usually declared in fcntl.h */ -#if !defined O_BINARY && defined _O_BINARY - /* For MSC-compatible compilers. */ -# define O_BINARY _O_BINARY -# define O_TEXT _O_TEXT -#endif - -#if defined __BEOS__ || defined __HAIKU__ - /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */ -# undef O_BINARY -# undef O_TEXT -#endif - -#ifndef O_BINARY -# define O_BINARY 0 -# define O_TEXT 0 -#endif - -/* Fix up the AT_* macros. */ - -/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its - value exceeds INT_MAX, so its use as an int doesn't conform to the - C standard, and GCC and Sun C complain in some cases. If the bug - is present, undef AT_FDCWD here, so it can be redefined below. */ -#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 -# undef AT_FDCWD -#endif - -/* Use the same bit pattern as Solaris 9, but with the proper - signedness. The bit pattern is important, in case this actually is - Solaris with the above workaround. */ -#ifndef AT_FDCWD -# define AT_FDCWD (-3041965) -#endif - -/* Use the same values as Solaris 9. This shouldn't matter, but - there's no real reason to differ. */ -#ifndef AT_SYMLINK_NOFOLLOW -# define AT_SYMLINK_NOFOLLOW 4096 -#endif - -#ifndef AT_REMOVEDIR -# define AT_REMOVEDIR 1 -#endif - -/* Solaris 9 lacks these two, so just pick unique values. */ -#ifndef AT_SYMLINK_FOLLOW -# define AT_SYMLINK_FOLLOW 2 -#endif - -#ifndef AT_EACCESS -# define AT_EACCESS 4 -#endif - - -#endif /* _GL_FCNTL_H */ -#endif /* _GL_FCNTL_H */ -#endif diff --git a/gnulib/lib/fd-safer.c b/gnulib/lib/fd-safer.c deleted file mode 100644 index 910fa4c..0000000 --- a/gnulib/lib/fd-safer.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Return a safer copy of a file descriptor. - - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include - -#include "unistd-safer.h" - -#include -#include - -/* Return FD, unless FD would be a copy of standard input, output, or - error; in that case, return a duplicate of FD, closing FD. On - failure to duplicate, close FD, set errno, and return -1. Preserve - errno if FD is negative, so that the caller can always inspect - errno when the returned value is negative. - - This function is usefully wrapped around functions that return file - descriptors, e.g., fd_safer (open ("file", O_RDONLY)). */ - -int -fd_safer (int fd) -{ - if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) - { - int f = dup_safer (fd); - int e = errno; - close (fd); - errno = e; - fd = f; - } - - return fd; -} diff --git a/gnulib/lib/fdopendir.c b/gnulib/lib/fdopendir.c deleted file mode 100644 index 0853e59..0000000 --- a/gnulib/lib/fdopendir.c +++ /dev/null @@ -1,204 +0,0 @@ -/* provide a replacement fdopendir function - Copyright (C) 2004-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include - -#include -#include - -#if !HAVE_FDOPENDIR - -# include "openat.h" -# include "openat-priv.h" -# include "save-cwd.h" - -# if GNULIB_DIRENT_SAFER -# include "dirent--.h" -# endif - -# ifndef REPLACE_FCHDIR -# define REPLACE_FCHDIR 0 -# endif - -static DIR *fdopendir_with_dup (int, int, struct saved_cwd const *); -static DIR *fd_clone_opendir (int, struct saved_cwd const *); - -/* Replacement for POSIX fdopendir. - - First, try to simulate it via opendir ("/proc/self/fd/..."). Failing - that, simulate it by using fchdir metadata, or by doing - save_cwd/fchdir/opendir(".")/restore_cwd. - If either the save_cwd or the restore_cwd fails (relatively unlikely), - then give a diagnostic and exit nonzero. - - If successful, the resulting stream is based on FD in - implementations where streams are based on file descriptors and in - applications where no other thread or signal handler allocates or - frees file descriptors. In other cases, consult dirfd on the result - to find out whether FD is still being used. - - Otherwise, this function works just like POSIX fdopendir. - - W A R N I N G: - - Unlike other fd-related functions, this one places constraints on FD. - If this function returns successfully, FD is under control of the - dirent.h system, and the caller should not close or modify the state of - FD other than by the dirent.h functions. */ -DIR * -fdopendir (int fd) -{ - DIR *dir = fdopendir_with_dup (fd, -1, NULL); - - if (! REPLACE_FCHDIR && ! dir) - { - int saved_errno = errno; - if (EXPECTED_ERRNO (saved_errno)) - { - struct saved_cwd cwd; - if (save_cwd (&cwd) != 0) - openat_save_fail (errno); - dir = fdopendir_with_dup (fd, -1, &cwd); - saved_errno = errno; - free_cwd (&cwd); - errno = saved_errno; - } - } - - return dir; -} - -/* Like fdopendir, except that if OLDER_DUPFD is not -1, it is known - to be a dup of FD which is less than FD - 1 and which will be - closed by the caller and not otherwise used by the caller. This - function makes sure that FD is closed and all file descriptors less - than FD are open, and then calls fd_clone_opendir on a dup of FD. - That way, barring race conditions, fd_clone_opendir returns a - stream whose file descriptor is FD. - - If REPLACE_CHDIR or CWD is null, use opendir ("/proc/self/fd/...", - falling back on fchdir metadata. Otherwise, CWD is a saved version - of the working directory; use fchdir/opendir(".")/restore_cwd(CWD). */ -static DIR * -fdopendir_with_dup (int fd, int older_dupfd, struct saved_cwd const *cwd) -{ - int dupfd = dup (fd); - if (dupfd < 0 && errno == EMFILE) - dupfd = older_dupfd; - if (dupfd < 0) - return NULL; - else - { - DIR *dir; - int saved_errno; - if (dupfd < fd - 1 && dupfd != older_dupfd) - { - dir = fdopendir_with_dup (fd, dupfd, cwd); - saved_errno = errno; - } - else - { - close (fd); - dir = fd_clone_opendir (dupfd, cwd); - saved_errno = errno; - if (! dir) - { - int fd1 = dup (dupfd); - if (fd1 != fd) - openat_save_fail (fd1 < 0 ? errno : EBADF); - } - } - - if (dupfd != older_dupfd) - close (dupfd); - errno = saved_errno; - return dir; - } -} - -/* Like fdopendir, except the result controls a clone of FD. It is - the caller's responsibility both to close FD and (if the result is - not null) to closedir the result. */ -static DIR * -fd_clone_opendir (int fd, struct saved_cwd const *cwd) -{ - if (REPLACE_FCHDIR || ! cwd) - { - DIR *dir = NULL; - int saved_errno = EOPNOTSUPP; - char buf[OPENAT_BUFFER_SIZE]; - char *proc_file = openat_proc_name (buf, fd, "."); - if (proc_file) - { - dir = opendir (proc_file); - saved_errno = errno; - if (proc_file != buf) - free (proc_file); - } -# if REPLACE_FCHDIR - if (! dir && EXPECTED_ERRNO (saved_errno)) - { - char const *name = _gl_directory_name (fd); - return (name ? opendir (name) : NULL); - } -# endif - errno = saved_errno; - return dir; - } - else - { - if (fchdir (fd) != 0) - return NULL; - else - { - DIR *dir = opendir ("."); - int saved_errno = errno; - if (restore_cwd (cwd) != 0) - openat_restore_fail (errno); - errno = saved_errno; - return dir; - } - } -} - -#else /* HAVE_FDOPENDIR */ - -# include -# include - -# undef fdopendir - -/* Like fdopendir, but work around GNU/Hurd bug by validating FD. */ - -DIR * -rpl_fdopendir (int fd) -{ - struct stat st; - if (fstat (fd, &st)) - return NULL; - if (!S_ISDIR (st.st_mode)) - { - errno = ENOTDIR; - return NULL; - } - return fdopendir (fd); -} - -#endif /* HAVE_FDOPENDIR */ diff --git a/gnulib/lib/fflush.c b/gnulib/lib/fflush.c deleted file mode 100644 index 437e310..0000000 --- a/gnulib/lib/fflush.c +++ /dev/null @@ -1,218 +0,0 @@ -/* fflush.c -- allow flushing input streams - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake. */ - -#include - -/* Specification. */ -#include - -#include -#include - -#include "freading.h" - -#include "stdio-impl.h" - -#undef fflush - - -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - -/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ -static inline void -clear_ungetc_buffer_preserving_position (FILE *fp) -{ - if (fp->_flags & _IO_IN_BACKUP) - /* _IO_free_backup_area is a bit complicated. Simply call fseek. */ - fseeko (fp, 0, SEEK_CUR); -} - -#else - -/* Clear the stream's ungetc buffer. May modify the value of ftello (fp). */ -static inline void -clear_ungetc_buffer (FILE *fp) -{ -# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - if (HASUB (fp)) - { - fp_->_p += fp_->_r; - fp_->_r = 0; - } -# elif defined __EMX__ /* emx+gcc */ - if (fp->_ungetc_count > 0) - { - fp->_ungetc_count = 0; - fp->_rcount = - fp->_rcount; - } -# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ - /* Nothing to do. */ -# else /* other implementations */ - fseeko (fp, 0, SEEK_CUR); -# endif -} - -#endif - -#if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - -static inline int -disable_seek_optimization (FILE *fp) -{ - int saved_flags = fp_->_flags & (__SOPT | __SNPT); - fp_->_flags = (fp_->_flags & ~__SOPT) | __SNPT; - return saved_flags; -} - -static inline void -restore_seek_optimization (FILE *fp, int saved_flags) -{ - fp_->_flags = (fp_->_flags & ~(__SOPT | __SNPT)) | saved_flags; -} - -#endif - -static inline void -update_fpos_cache (FILE *fp, off_t pos) -{ -#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ -# if defined __CYGWIN__ - /* fp_->_offset is typed as an integer. */ - fp_->_offset = pos; -# else - /* fp_->_offset is an fpos_t. */ - /* Use a union, since on NetBSD, the compilation flags determine - whether fpos_t is typedef'd to off_t or a struct containing a - single off_t member. */ - union - { - fpos_t f; - off_t o; - } u; - u.o = pos; - fp_->_offset = u.f; -# endif - fp_->_flags |= __SOFF; -#endif -} - -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. */ -int -rpl_fflush (FILE *stream) -{ - /* When stream is NULL, POSIX and C99 only require flushing of "output - streams and update streams in which the most recent operation was not - input", and all implementations do this. - - When stream is "an output stream or an update stream in which the most - recent operation was not input", POSIX and C99 requires that fflush - writes out any buffered data, and all implementations do this. - - When stream is, however, an input stream or an update stream in - which the most recent operation was input, C99 specifies nothing, - and POSIX only specifies behavior if the stream is seekable. - mingw, in particular, drops the input buffer, leaving the file - descriptor positioned at the end of the input buffer. I.e. ftell - (stream) is lost. We don't want to call the implementation's - fflush in this case. - - We test ! freading (stream) here, rather than fwriting (stream), because - what we need to know is whether the stream holds a "read buffer", and on - mingw this is indicated by _IOREAD, regardless of _IOWRT. */ - if (stream == NULL || ! freading (stream)) - return fflush (stream); - -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - clear_ungetc_buffer_preserving_position (stream); - - return fflush (stream); - -#else - { - /* Notes about the file-position indicator: - 1) The file position indicator is incremented by fgetc() and decremented - by ungetc(): - - "... the fgetc() function shall ... advance the associated file - position indicator for the stream ..." - - "The file-position indicator is decremented by each successful - call to ungetc()..." - 2) says: - "The value of the file-position indicator for the stream after - reading or discarding all pushed-back bytes shall be the same - as it was before the bytes were pushed back." - Here we are discarding all pushed-back bytes. But more specifically, - 3) says: - "[After fflush(),] the file offset of the underlying open file - description shall be set to the file position of the stream, and - any characters pushed back onto the stream by ungetc() ... shall - be discarded." */ - - /* POSIX does not specify fflush behavior for non-seekable input - streams. Some implementations purge unread data, some return - EBADF, some do nothing. */ - off_t pos = ftello (stream); - if (pos == -1) - { - errno = EBADF; - return EOF; - } - - /* Clear the ungetc buffer. */ - clear_ungetc_buffer (stream); - - /* To get here, we must be flushing a seekable input stream, so the - semantics of fpurge are now appropriate to clear the buffer. To - avoid losing data, the lseek is also necessary. */ - { - int result = fpurge (stream); - if (result != 0) - return result; - } - -# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - - { - /* Disable seek optimization for the next fseeko call. This tells the - following fseeko call to seek to the desired position directly, rather - than to seek to a block-aligned boundary. */ - int saved_flags = disable_seek_optimization (stream); - int result = fseeko (stream, pos, SEEK_SET); - - restore_seek_optimization (stream, saved_flags); - return result; - } - -# else - - pos = lseek (fileno (stream), pos, SEEK_SET); - if (pos == -1) - return EOF; - /* After a successful lseek, update the file descriptor's position cache - in the stream. */ - update_fpos_cache (stream, pos); - - return 0; - -# endif - } -#endif -} diff --git a/gnulib/lib/file-set.c b/gnulib/lib/file-set.c deleted file mode 100644 index 0126556..0000000 --- a/gnulib/lib/file-set.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Specialized functions to manipulate a set of files. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include -#include "file-set.h" - -#include "hash-triple.h" -#include "xalloc.h" - -/* Record file, FILE, and dev/ino from *STATS, in the hash table, HT. - If HT is NULL, return immediately. - If memory allocation fails, exit immediately. */ -void -record_file (Hash_table *ht, char const *file, struct stat const *stats) -{ - struct F_triple *ent; - - if (ht == NULL) - return; - - ent = xmalloc (sizeof *ent); - ent->name = xstrdup (file); - ent->st_ino = stats->st_ino; - ent->st_dev = stats->st_dev; - - { - struct F_triple *ent_from_table = hash_insert (ht, ent); - if (ent_from_table == NULL) - { - /* Insertion failed due to lack of memory. */ - xalloc_die (); - } - - if (ent_from_table != ent) - { - /* There was alread a matching entry in the table, so ENT was - not inserted. Free it. */ - triple_free (ent); - } - } -} - -/* Return true if there is an entry in hash table, HT, - for the file described by FILE and STATS. */ -bool -seen_file (Hash_table const *ht, char const *file, - struct stat const *stats) -{ - struct F_triple new_ent; - - if (ht == NULL) - return false; - - new_ent.name = (char *) file; - new_ent.st_ino = stats->st_ino; - new_ent.st_dev = stats->st_dev; - - return !!hash_lookup (ht, &new_ent); -} diff --git a/gnulib/lib/file-set.h b/gnulib/lib/file-set.h deleted file mode 100644 index 28d42fe..0000000 --- a/gnulib/lib/file-set.h +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include -#include - -#include "hash.h" - -extern void record_file (Hash_table *ht, char const *file, - struct stat const *stats) - __attribute__ ((nonnull (2, 3))); - -extern bool seen_file (Hash_table const *ht, char const *file, - struct stat const *stats); diff --git a/gnulib/lib/fileblocks.c b/gnulib/lib/fileblocks.c deleted file mode 100644 index 993ec97..0000000 --- a/gnulib/lib/fileblocks.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Convert file size to number of blocks on System V-like machines. - - Copyright (C) 1990, 1997-1999, 2004-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Brian L. Matthews, blm@6sceng.UUCP. */ - -#include - -#include - -#if HAVE_SYS_PARAM_H -# include -#endif - -#if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE - -# include - -# ifndef NINDIR - -# if defined __DJGPP__ -typedef long daddr_t; /* for disk address */ -# endif - -/* Some SysV's, like Irix, seem to lack this. Hope it's correct. */ -/* Number of inode pointers per indirect block. */ -# define NINDIR (BSIZE / sizeof (daddr_t)) -# endif /* !NINDIR */ - -/* Number of direct block addresses in an inode. */ -# define NDIR 10 - -/* Return the number of 512-byte blocks in a file of SIZE bytes. */ - -off_t -st_blocks (off_t size) -{ - off_t datablks = size / 512 + (size % 512 != 0); - off_t indrblks = 0; - - if (datablks > NDIR) - { - indrblks = (datablks - NDIR - 1) / NINDIR + 1; - - if (datablks > NDIR + NINDIR) - { - indrblks += (datablks - NDIR - NINDIR - 1) / (NINDIR * NINDIR) + 1; - - if (datablks > NDIR + NINDIR + NINDIR * NINDIR) - indrblks++; - } - } - - return datablks + indrblks; -} -#else -/* This declaration is solely to ensure that after preprocessing - this file is never empty. */ -typedef int textutils_fileblocks_unused; -#endif diff --git a/gnulib/lib/filemode.c b/gnulib/lib/filemode.c deleted file mode 100644 index 0f6641a..0000000 --- a/gnulib/lib/filemode.c +++ /dev/null @@ -1,180 +0,0 @@ -/* filemode.c -- make a string describing file modes - - Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2011 Free - Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "filemode.h" - -/* The following is for Cray DMF (Data Migration Facility), which is a - HSM file system. A migrated file has a `st_dm_mode' that is - different from the normal `st_mode', so any tests for migrated - files should use the former. */ -#if HAVE_ST_DM_MODE -# define IS_MIGRATED_FILE(statp) \ - (S_ISOFD (statp->st_dm_mode) || S_ISOFL (statp->st_dm_mode)) -#else -# define IS_MIGRATED_FILE(statp) 0 -#endif - -#if ! HAVE_DECL_STRMODE - -/* Return a character indicating the type of file described by - file mode BITS: - '-' regular file - 'b' block special file - 'c' character special file - 'C' high performance ("contiguous data") file - 'd' directory - 'D' door - 'l' symbolic link - 'm' multiplexed file (7th edition Unix; obsolete) - 'n' network special file (HP-UX) - 'p' fifo (named pipe) - 'P' port - 's' socket - 'w' whiteout (4.4BSD) - '?' some other file type */ - -static char -ftypelet (mode_t bits) -{ - /* These are the most common, so test for them first. */ - if (S_ISREG (bits)) - return '-'; - if (S_ISDIR (bits)) - return 'd'; - - /* Other letters standardized by POSIX 1003.1-2004. */ - if (S_ISBLK (bits)) - return 'b'; - if (S_ISCHR (bits)) - return 'c'; - if (S_ISLNK (bits)) - return 'l'; - if (S_ISFIFO (bits)) - return 'p'; - - /* Other file types (though not letters) standardized by POSIX. */ - if (S_ISSOCK (bits)) - return 's'; - - /* Nonstandard file types. */ - if (S_ISCTG (bits)) - return 'C'; - if (S_ISDOOR (bits)) - return 'D'; - if (S_ISMPB (bits) || S_ISMPC (bits)) - return 'm'; - if (S_ISNWK (bits)) - return 'n'; - if (S_ISPORT (bits)) - return 'P'; - if (S_ISWHT (bits)) - return 'w'; - - return '?'; -} - -/* Like filemodestring, but rely only on MODE. */ - -void -strmode (mode_t mode, char *str) -{ - str[0] = ftypelet (mode); - str[1] = mode & S_IRUSR ? 'r' : '-'; - str[2] = mode & S_IWUSR ? 'w' : '-'; - str[3] = (mode & S_ISUID - ? (mode & S_IXUSR ? 's' : 'S') - : (mode & S_IXUSR ? 'x' : '-')); - str[4] = mode & S_IRGRP ? 'r' : '-'; - str[5] = mode & S_IWGRP ? 'w' : '-'; - str[6] = (mode & S_ISGID - ? (mode & S_IXGRP ? 's' : 'S') - : (mode & S_IXGRP ? 'x' : '-')); - str[7] = mode & S_IROTH ? 'r' : '-'; - str[8] = mode & S_IWOTH ? 'w' : '-'; - str[9] = (mode & S_ISVTX - ? (mode & S_IXOTH ? 't' : 'T') - : (mode & S_IXOTH ? 'x' : '-')); - str[10] = ' '; - str[11] = '\0'; -} - -#endif /* ! HAVE_DECL_STRMODE */ - -/* filemodestring - fill in string STR with an ls-style ASCII - representation of the st_mode field of file stats block STATP. - 12 characters are stored in STR. - The characters stored in STR are: - - 0 File type, as in ftypelet above, except that other letters are used - for files whose type cannot be determined solely from st_mode: - - 'F' semaphore - 'M' migrated file (Cray DMF) - 'Q' message queue - 'S' shared memory object - 'T' typed memory object - - 1 'r' if the owner may read, '-' otherwise. - - 2 'w' if the owner may write, '-' otherwise. - - 3 'x' if the owner may execute, 's' if the file is - set-user-id, '-' otherwise. - 'S' if the file is set-user-id, but the execute - bit isn't set. - - 4 'r' if group members may read, '-' otherwise. - - 5 'w' if group members may write, '-' otherwise. - - 6 'x' if group members may execute, 's' if the file is - set-group-id, '-' otherwise. - 'S' if it is set-group-id but not executable. - - 7 'r' if any user may read, '-' otherwise. - - 8 'w' if any user may write, '-' otherwise. - - 9 'x' if any user may execute, 't' if the file is "sticky" - (will be retained in swap space after execution), '-' - otherwise. - 'T' if the file is sticky but not executable. - - 10 ' ' for compatibility with 4.4BSD strmode, - since this interface does not support ACLs. - - 11 '\0'. */ - -void -filemodestring (struct stat const *statp, char *str) -{ - strmode (statp->st_mode, str); - - if (S_TYPEISSEM (statp)) - str[0] = 'F'; - else if (IS_MIGRATED_FILE (statp)) - str[0] = 'M'; - else if (S_TYPEISMQ (statp)) - str[0] = 'Q'; - else if (S_TYPEISSHM (statp)) - str[0] = 'S'; - else if (S_TYPEISTMO (statp)) - str[0] = 'T'; -} diff --git a/gnulib/lib/filemode.h b/gnulib/lib/filemode.h deleted file mode 100644 index 1a50302..0000000 --- a/gnulib/lib/filemode.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Make a string describing file modes. - - Copyright (C) 1998-1999, 2003, 2006, 2009-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef FILEMODE_H_ - -# include -# include - -/* Get the declaration of strmode. */ -# if HAVE_DECL_STRMODE -# include /* MacOS X, FreeBSD, OpenBSD */ -# include /* NetBSD */ -# endif - -# ifdef __cplusplus -extern "C" { -# endif - -# if !HAVE_DECL_STRMODE -extern void strmode (mode_t mode, char *str); -# endif - -extern void filemodestring (struct stat const *statp, char *str); - -# ifdef __cplusplus -} -# endif - -#endif diff --git a/gnulib/lib/float+.h b/gnulib/lib/float+.h deleted file mode 100644 index 2e84489..0000000 --- a/gnulib/lib/float+.h +++ /dev/null @@ -1,148 +0,0 @@ -/* Supplemental information about the floating-point formats. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2007. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _FLOATPLUS_H -#define _FLOATPLUS_H - -#include -#include - -/* Number of bits in the mantissa of a floating-point number, including the - "hidden bit". */ -#if FLT_RADIX == 2 -# define FLT_MANT_BIT FLT_MANT_DIG -# define DBL_MANT_BIT DBL_MANT_DIG -# define LDBL_MANT_BIT LDBL_MANT_DIG -#elif FLT_RADIX == 4 -# define FLT_MANT_BIT (FLT_MANT_DIG * 2) -# define DBL_MANT_BIT (DBL_MANT_DIG * 2) -# define LDBL_MANT_BIT (LDBL_MANT_DIG * 2) -#elif FLT_RADIX == 16 -# define FLT_MANT_BIT (FLT_MANT_DIG * 4) -# define DBL_MANT_BIT (DBL_MANT_DIG * 4) -# define LDBL_MANT_BIT (LDBL_MANT_DIG * 4) -#endif - -/* Bit mask that can be used to mask the exponent, as an unsigned number. */ -#define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7) -#define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) -#define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7) - -/* Number of bits used for the exponent of a floating-point number, including - the exponent's sign. */ -#define FLT_EXP_BIT \ - (FLT_EXP_MASK < 0x100 ? 8 : \ - FLT_EXP_MASK < 0x200 ? 9 : \ - FLT_EXP_MASK < 0x400 ? 10 : \ - FLT_EXP_MASK < 0x800 ? 11 : \ - FLT_EXP_MASK < 0x1000 ? 12 : \ - FLT_EXP_MASK < 0x2000 ? 13 : \ - FLT_EXP_MASK < 0x4000 ? 14 : \ - FLT_EXP_MASK < 0x8000 ? 15 : \ - FLT_EXP_MASK < 0x10000 ? 16 : \ - FLT_EXP_MASK < 0x20000 ? 17 : \ - FLT_EXP_MASK < 0x40000 ? 18 : \ - FLT_EXP_MASK < 0x80000 ? 19 : \ - FLT_EXP_MASK < 0x100000 ? 20 : \ - FLT_EXP_MASK < 0x200000 ? 21 : \ - FLT_EXP_MASK < 0x400000 ? 22 : \ - FLT_EXP_MASK < 0x800000 ? 23 : \ - FLT_EXP_MASK < 0x1000000 ? 24 : \ - FLT_EXP_MASK < 0x2000000 ? 25 : \ - FLT_EXP_MASK < 0x4000000 ? 26 : \ - FLT_EXP_MASK < 0x8000000 ? 27 : \ - FLT_EXP_MASK < 0x10000000 ? 28 : \ - FLT_EXP_MASK < 0x20000000 ? 29 : \ - FLT_EXP_MASK < 0x40000000 ? 30 : \ - FLT_EXP_MASK <= 0x7fffffff ? 31 : \ - 32) -#define DBL_EXP_BIT \ - (DBL_EXP_MASK < 0x100 ? 8 : \ - DBL_EXP_MASK < 0x200 ? 9 : \ - DBL_EXP_MASK < 0x400 ? 10 : \ - DBL_EXP_MASK < 0x800 ? 11 : \ - DBL_EXP_MASK < 0x1000 ? 12 : \ - DBL_EXP_MASK < 0x2000 ? 13 : \ - DBL_EXP_MASK < 0x4000 ? 14 : \ - DBL_EXP_MASK < 0x8000 ? 15 : \ - DBL_EXP_MASK < 0x10000 ? 16 : \ - DBL_EXP_MASK < 0x20000 ? 17 : \ - DBL_EXP_MASK < 0x40000 ? 18 : \ - DBL_EXP_MASK < 0x80000 ? 19 : \ - DBL_EXP_MASK < 0x100000 ? 20 : \ - DBL_EXP_MASK < 0x200000 ? 21 : \ - DBL_EXP_MASK < 0x400000 ? 22 : \ - DBL_EXP_MASK < 0x800000 ? 23 : \ - DBL_EXP_MASK < 0x1000000 ? 24 : \ - DBL_EXP_MASK < 0x2000000 ? 25 : \ - DBL_EXP_MASK < 0x4000000 ? 26 : \ - DBL_EXP_MASK < 0x8000000 ? 27 : \ - DBL_EXP_MASK < 0x10000000 ? 28 : \ - DBL_EXP_MASK < 0x20000000 ? 29 : \ - DBL_EXP_MASK < 0x40000000 ? 30 : \ - DBL_EXP_MASK <= 0x7fffffff ? 31 : \ - 32) -#define LDBL_EXP_BIT \ - (LDBL_EXP_MASK < 0x100 ? 8 : \ - LDBL_EXP_MASK < 0x200 ? 9 : \ - LDBL_EXP_MASK < 0x400 ? 10 : \ - LDBL_EXP_MASK < 0x800 ? 11 : \ - LDBL_EXP_MASK < 0x1000 ? 12 : \ - LDBL_EXP_MASK < 0x2000 ? 13 : \ - LDBL_EXP_MASK < 0x4000 ? 14 : \ - LDBL_EXP_MASK < 0x8000 ? 15 : \ - LDBL_EXP_MASK < 0x10000 ? 16 : \ - LDBL_EXP_MASK < 0x20000 ? 17 : \ - LDBL_EXP_MASK < 0x40000 ? 18 : \ - LDBL_EXP_MASK < 0x80000 ? 19 : \ - LDBL_EXP_MASK < 0x100000 ? 20 : \ - LDBL_EXP_MASK < 0x200000 ? 21 : \ - LDBL_EXP_MASK < 0x400000 ? 22 : \ - LDBL_EXP_MASK < 0x800000 ? 23 : \ - LDBL_EXP_MASK < 0x1000000 ? 24 : \ - LDBL_EXP_MASK < 0x2000000 ? 25 : \ - LDBL_EXP_MASK < 0x4000000 ? 26 : \ - LDBL_EXP_MASK < 0x8000000 ? 27 : \ - LDBL_EXP_MASK < 0x10000000 ? 28 : \ - LDBL_EXP_MASK < 0x20000000 ? 29 : \ - LDBL_EXP_MASK < 0x40000000 ? 30 : \ - LDBL_EXP_MASK <= 0x7fffffff ? 31 : \ - 32) - -/* Number of bits used for a floating-point number: the mantissa (not - counting the "hidden bit", since it may or may not be explicit), the - exponent, and the sign. */ -#define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1) -#define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1) -#define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1) - -/* Number of bytes used for a floating-point number. - This can be smaller than the 'sizeof'. For example, on i386 systems, - 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence - LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but - sizeof (long double) = 12 or = 16. */ -#define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) -#define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) -#define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) - -/* Verify that SIZEOF_FLT <= sizeof (float) etc. */ -typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1]; -typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1]; -typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1]; - -#endif /* _FLOATPLUS_H */ diff --git a/gnulib/lib/float.in.h b/gnulib/lib/float.in.h deleted file mode 100644 index d32f20e..0000000 --- a/gnulib/lib/float.in.h +++ /dev/null @@ -1,63 +0,0 @@ -/* A correct . - - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_FLOAT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_FLOAT_H@ - -#ifndef _GL_FLOAT_H -#define _GL_FLOAT_H - -/* 'long double' properties. */ -#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) -/* Number of mantissa units, in base FLT_RADIX. */ -# undef LDBL_MANT_DIG -# define LDBL_MANT_DIG 64 -/* Number of decimal digits that is sufficient for representing a number. */ -# undef LDBL_DIG -# define LDBL_DIG 18 -/* x-1 where x is the smallest representable number > 1. */ -# undef LDBL_EPSILON -# define LDBL_EPSILON 1.0842021724855044340E-19L -/* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP (-16381) -/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ -# undef LDBL_MAX_EXP -# define LDBL_MAX_EXP 16384 -/* Minimum positive normalized number. */ -# undef LDBL_MIN -# define LDBL_MIN 3.3621031431120935063E-4932L -/* Maximum representable finite number. */ -# undef LDBL_MAX -# define LDBL_MAX 1.1897314953572317650E+4932L -/* Minimum e such that 10^e is in the range of normalized numbers. */ -# undef LDBL_MIN_10_EXP -# define LDBL_MIN_10_EXP (-4931) -/* Maximum e such that 10^e is in the range of representable finite numbers. */ -# undef LDBL_MAX_10_EXP -# define LDBL_MAX_10_EXP 4932 -#endif - -#endif /* _GL_FLOAT_H */ -#endif /* _GL_FLOAT_H */ diff --git a/gnulib/lib/fnmatch.c b/gnulib/lib/fnmatch.c deleted file mode 100644 index 7b57c2e..0000000 --- a/gnulib/lib/fnmatch.c +++ /dev/null @@ -1,353 +0,0 @@ -/* Copyright (C) 1991-1993, 1996-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _LIBC -# include -#endif - -/* Enable GNU extensions in fnmatch.h. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif - -#if ! defined __builtin_expect && __GNUC__ < 3 -# define __builtin_expect(expr, expected) (expr) -#endif - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#define WIDE_CHAR_SUPPORT \ - (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \ - && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY)) - -/* For platform which support the ISO C amendement 1 functionality we - support user defined character classes. */ -#if defined _LIBC || WIDE_CHAR_SUPPORT -# include -# include -#endif - -/* We need some of the locale data (the collation sequence information) - but there is no interface to get this information in general. Therefore - we support a correct implementation only in glibc. */ -#ifdef _LIBC -# include "../locale/localeinfo.h" -# include "../locale/elem-hash.h" -# include "../locale/coll-lookup.h" -# include - -# define CONCAT(a,b) __CONCAT(a,b) -# define mbsrtowcs __mbsrtowcs -# define fnmatch __fnmatch -extern int fnmatch (const char *pattern, const char *string, int flags); -#endif - -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif - -/* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */ -#define NO_LEADING_PERIOD(flags) \ - ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD)) - -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself, and have not detected a bug - in the library. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand `configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU - - -# if ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) -# define isblank(c) ((c) == ' ' || (c) == '\t') -# endif - -# define STREQ(s1, s2) (strcmp (s1, s2) == 0) - -# if defined _LIBC || WIDE_CHAR_SUPPORT -/* The GNU C library provides support for user-defined character classes - and the functions from ISO C amendement 1. */ -# ifdef CHARCLASS_NAME_MAX -# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX -# else -/* This shouldn't happen but some implementation might still have this - problem. Use a reasonable default value. */ -# define CHAR_CLASS_MAX_LENGTH 256 -# endif - -# ifdef _LIBC -# define IS_CHAR_CLASS(string) __wctype (string) -# else -# define IS_CHAR_CLASS(string) wctype (string) -# endif - -# ifdef _LIBC -# define ISWCTYPE(WC, WT) __iswctype (WC, WT) -# else -# define ISWCTYPE(WC, WT) iswctype (WC, WT) -# endif - -# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC -/* In this case we are implementing the multibyte character handling. */ -# define HANDLE_MULTIBYTE 1 -# endif - -# else -# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ - -# define IS_CHAR_CLASS(string) \ - (STREQ (string, "alpha") || STREQ (string, "upper") \ - || STREQ (string, "lower") || STREQ (string, "digit") \ - || STREQ (string, "alnum") || STREQ (string, "xdigit") \ - || STREQ (string, "space") || STREQ (string, "print") \ - || STREQ (string, "punct") || STREQ (string, "graph") \ - || STREQ (string, "cntrl") || STREQ (string, "blank")) -# endif - -/* Avoid depending on library functions or files - whose names are inconsistent. */ - -/* Global variable. */ -static int posixly_correct; - -# ifndef internal_function -/* Inside GNU libc we mark some function in a special way. In other - environments simply ignore the marking. */ -# define internal_function -# endif - -/* Note that this evaluates C many times. */ -# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c)) -# define CHAR char -# define UCHAR unsigned char -# define INT int -# define FCT internal_fnmatch -# define EXT ext_match -# define END end_pattern -# define L_(CS) CS -# ifdef _LIBC -# define BTOWC(C) __btowc (C) -# else -# define BTOWC(C) btowc (C) -# endif -# define STRLEN(S) strlen (S) -# define STRCAT(D, S) strcat (D, S) -# ifdef _LIBC -# define MEMPCPY(D, S, N) __mempcpy (D, S, N) -# else -# if HAVE_MEMPCPY -# define MEMPCPY(D, S, N) mempcpy (D, S, N) -# else -# define MEMPCPY(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) -# endif -# endif -# define MEMCHR(S, C, N) memchr (S, C, N) -# define STRCOLL(S1, S2) strcoll (S1, S2) -# include "fnmatch_loop.c" - - -# if HANDLE_MULTIBYTE -# define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c)) -# define CHAR wchar_t -# define UCHAR wint_t -# define INT wint_t -# define FCT internal_fnwmatch -# define EXT ext_wmatch -# define END end_wpattern -# define L_(CS) L##CS -# define BTOWC(C) (C) -# ifdef _LIBC -# define STRLEN(S) __wcslen (S) -# define STRCAT(D, S) __wcscat (D, S) -# define MEMPCPY(D, S, N) __wmempcpy (D, S, N) -# else -# define STRLEN(S) wcslen (S) -# define STRCAT(D, S) wcscat (D, S) -# if HAVE_WMEMPCPY -# define MEMPCPY(D, S, N) wmempcpy (D, S, N) -# else -# define MEMPCPY(D, S, N) (wmemcpy (D, S, N) + (N)) -# endif -# endif -# define MEMCHR(S, C, N) wmemchr (S, C, N) -# define STRCOLL(S1, S2) wcscoll (S1, S2) -# define WIDE_CHAR_VERSION 1 - -# undef IS_CHAR_CLASS -/* We have to convert the wide character string in a multibyte string. But - we know that the character class names consist of alphanumeric characters - from the portable character set, and since the wide character encoding - for a member of the portable character set is the same code point as - its single-byte encoding, we can use a simplified method to convert the - string to a multibyte character string. */ -static wctype_t -is_char_class (const wchar_t *wcs) -{ - char s[CHAR_CLASS_MAX_LENGTH + 1]; - char *cp = s; - - do - { - /* Test for a printable character from the portable character set. */ -# ifdef _LIBC - if (*wcs < 0x20 || *wcs > 0x7e - || *wcs == 0x24 || *wcs == 0x40 || *wcs == 0x60) - return (wctype_t) 0; -# else - switch (*wcs) - { - case L' ': case L'!': case L'"': case L'#': case L'%': - case L'&': case L'\'': case L'(': case L')': case L'*': - case L'+': case L',': case L'-': case L'.': case L'/': - case L'0': case L'1': case L'2': case L'3': case L'4': - case L'5': case L'6': case L'7': case L'8': case L'9': - case L':': case L';': case L'<': case L'=': case L'>': - case L'?': - case L'A': case L'B': case L'C': case L'D': case L'E': - case L'F': case L'G': case L'H': case L'I': case L'J': - case L'K': case L'L': case L'M': case L'N': case L'O': - case L'P': case L'Q': case L'R': case L'S': case L'T': - case L'U': case L'V': case L'W': case L'X': case L'Y': - case L'Z': - case L'[': case L'\\': case L']': case L'^': case L'_': - case L'a': case L'b': case L'c': case L'd': case L'e': - case L'f': case L'g': case L'h': case L'i': case L'j': - case L'k': case L'l': case L'm': case L'n': case L'o': - case L'p': case L'q': case L'r': case L's': case L't': - case L'u': case L'v': case L'w': case L'x': case L'y': - case L'z': case L'{': case L'|': case L'}': case L'~': - break; - default: - return (wctype_t) 0; - } -# endif - - /* Avoid overrunning the buffer. */ - if (cp == s + CHAR_CLASS_MAX_LENGTH) - return (wctype_t) 0; - - *cp++ = (char) *wcs++; - } - while (*wcs != L'\0'); - - *cp = '\0'; - -# ifdef _LIBC - return __wctype (s); -# else - return wctype (s); -# endif -} -# define IS_CHAR_CLASS(string) is_char_class (string) - -# include "fnmatch_loop.c" -# endif - - -int -fnmatch (const char *pattern, const char *string, int flags) -{ -# if HANDLE_MULTIBYTE -# define ALLOCA_LIMIT 2000 - if (__builtin_expect (MB_CUR_MAX, 1) != 1) - { - mbstate_t ps; - size_t patsize; - size_t strsize; - size_t totsize; - wchar_t *wpattern; - wchar_t *wstring; - int res; - - /* Calculate the size needed to convert the strings to - wide characters. */ - memset (&ps, '\0', sizeof (ps)); - patsize = mbsrtowcs (NULL, &pattern, 0, &ps) + 1; - if (__builtin_expect (patsize != 0, 1)) - { - assert (mbsinit (&ps)); - strsize = mbsrtowcs (NULL, &string, 0, &ps) + 1; - if (__builtin_expect (strsize != 0, 1)) - { - assert (mbsinit (&ps)); - totsize = patsize + strsize; - if (__builtin_expect (! (patsize <= totsize - && totsize <= SIZE_MAX / sizeof (wchar_t)), - 0)) - { - errno = ENOMEM; - return -1; - } - - /* Allocate room for the wide characters. */ - if (__builtin_expect (totsize < ALLOCA_LIMIT, 1)) - wpattern = (wchar_t *) alloca (totsize * sizeof (wchar_t)); - else - { - wpattern = malloc (totsize * sizeof (wchar_t)); - if (__builtin_expect (! wpattern, 0)) - { - errno = ENOMEM; - return -1; - } - } - wstring = wpattern + patsize; - - /* Convert the strings into wide characters. */ - mbsrtowcs (wpattern, &pattern, patsize, &ps); - assert (mbsinit (&ps)); - mbsrtowcs (wstring, &string, strsize, &ps); - - res = internal_fnwmatch (wpattern, wstring, wstring + strsize - 1, - flags & FNM_PERIOD, flags); - - if (__builtin_expect (! (totsize < ALLOCA_LIMIT), 0)) - free (wpattern); - return res; - } - } - } - -# endif /* HANDLE_MULTIBYTE */ - - return internal_fnmatch (pattern, string, string + strlen (string), - flags & FNM_PERIOD, flags); -} - -# ifdef _LIBC -# undef fnmatch -versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3); -# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3) -strong_alias (__fnmatch, __fnmatch_old) -compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0); -# endif -libc_hidden_ver (__fnmatch, fnmatch) -# endif - -#endif /* _LIBC or not __GNU_LIBRARY__. */ diff --git a/gnulib/lib/fnmatch.in.h b/gnulib/lib/fnmatch.in.h deleted file mode 100644 index 5e0fdd4..0000000 --- a/gnulib/lib/fnmatch.in.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _FNMATCH_H -#define _FNMATCH_H 1 - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* We #undef these before defining them because some losing systems - (HP-UX A.08.07 for example) define these in . */ -#undef FNM_PATHNAME -#undef FNM_NOESCAPE -#undef FNM_PERIOD - -/* Bits set in the FLAGS argument to `fnmatch'. */ -#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ -#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ -#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ - -#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE -# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ -# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ -# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ -# define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */ -#endif - -/* Value returned by `fnmatch' if STRING does not match PATTERN. */ -#define FNM_NOMATCH 1 - -/* This value is returned if the implementation does not support - `fnmatch'. Since this is not the case here it will never be - returned but the conformance test suites still require the symbol - to be defined. */ -#ifdef _XOPEN_SOURCE -# define FNM_NOSYS (-1) -#endif - -/* Match NAME against the file name pattern PATTERN, - returning zero if it matches, FNM_NOMATCH if not. */ -extern int fnmatch (const char *__pattern, const char *__name, - int __flags) - _GL_ARG_NONNULL ((1, 2)); - -#ifdef __cplusplus -} -#endif - -#endif /* fnmatch.h */ diff --git a/gnulib/lib/fnmatch_loop.c b/gnulib/lib/fnmatch_loop.c deleted file mode 100644 index 2235838..0000000 --- a/gnulib/lib/fnmatch_loop.c +++ /dev/null @@ -1,1214 +0,0 @@ -/* Copyright (C) 1991-1993, 1996-2006, 2009-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Match STRING against the file name pattern PATTERN, returning zero if - it matches, nonzero if not. */ -static int EXT (INT opt, const CHAR *pattern, const CHAR *string, - const CHAR *string_end, bool no_leading_period, int flags) - internal_function; -static const CHAR *END (const CHAR *patternp) internal_function; - -static int -internal_function -FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, - bool no_leading_period, int flags) -{ - register const CHAR *p = pattern, *n = string; - register UCHAR c; -#ifdef _LIBC -# if WIDE_CHAR_VERSION - const char *collseq = (const char *) - _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC); -# else - const UCHAR *collseq = (const UCHAR *) - _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQMB); -# endif -#endif - - while ((c = *p++) != L_('\0')) - { - bool new_no_leading_period = false; - c = FOLD (c); - - switch (c) - { - case L_('?'): - if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') - { - int res; - - res = EXT (c, p, n, string_end, no_leading_period, - flags); - if (res != -1) - return res; - } - - if (n == string_end) - return FNM_NOMATCH; - else if (*n == L_('/') && (flags & FNM_FILE_NAME)) - return FNM_NOMATCH; - else if (*n == L_('.') && no_leading_period) - return FNM_NOMATCH; - break; - - case L_('\\'): - if (!(flags & FNM_NOESCAPE)) - { - c = *p++; - if (c == L_('\0')) - /* Trailing \ loses. */ - return FNM_NOMATCH; - c = FOLD (c); - } - if (n == string_end || FOLD ((UCHAR) *n) != c) - return FNM_NOMATCH; - break; - - case L_('*'): - if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') - { - int res; - - res = EXT (c, p, n, string_end, no_leading_period, - flags); - if (res != -1) - return res; - } - - if (n != string_end && *n == L_('.') && no_leading_period) - return FNM_NOMATCH; - - for (c = *p++; c == L_('?') || c == L_('*'); c = *p++) - { - if (*p == L_('(') && (flags & FNM_EXTMATCH) != 0) - { - const CHAR *endp = END (p); - if (endp != p) - { - /* This is a pattern. Skip over it. */ - p = endp; - continue; - } - } - - if (c == L_('?')) - { - /* A ? needs to match one character. */ - if (n == string_end) - /* There isn't another character; no match. */ - return FNM_NOMATCH; - else if (*n == L_('/') - && __builtin_expect (flags & FNM_FILE_NAME, 0)) - /* A slash does not match a wildcard under - FNM_FILE_NAME. */ - return FNM_NOMATCH; - else - /* One character of the string is consumed in matching - this ? wildcard, so *??? won't match if there are - less than three characters. */ - ++n; - } - } - - if (c == L_('\0')) - /* The wildcard(s) is/are the last element of the pattern. - If the name is a file name and contains another slash - this means it cannot match, unless the FNM_LEADING_DIR - flag is set. */ - { - int result = (flags & FNM_FILE_NAME) == 0 ? 0 : FNM_NOMATCH; - - if (flags & FNM_FILE_NAME) - { - if (flags & FNM_LEADING_DIR) - result = 0; - else - { - if (MEMCHR (n, L_('/'), string_end - n) == NULL) - result = 0; - } - } - - return result; - } - else - { - const CHAR *endp; - - endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L_('/') : L_('\0'), - string_end - n); - if (endp == NULL) - endp = string_end; - - if (c == L_('[') - || (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0 - && (c == L_('@') || c == L_('+') || c == L_('!')) - && *p == L_('('))) - { - int flags2 = ((flags & FNM_FILE_NAME) - ? flags : (flags & ~FNM_PERIOD)); - bool no_leading_period2 = no_leading_period; - - for (--p; n < endp; ++n, no_leading_period2 = false) - if (FCT (p, n, string_end, no_leading_period2, flags2) - == 0) - return 0; - } - else if (c == L_('/') && (flags & FNM_FILE_NAME)) - { - while (n < string_end && *n != L_('/')) - ++n; - if (n < string_end && *n == L_('/') - && (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags) - == 0)) - return 0; - } - else - { - int flags2 = ((flags & FNM_FILE_NAME) - ? flags : (flags & ~FNM_PERIOD)); - int no_leading_period2 = no_leading_period; - - if (c == L_('\\') && !(flags & FNM_NOESCAPE)) - c = *p; - c = FOLD (c); - for (--p; n < endp; ++n, no_leading_period2 = false) - if (FOLD ((UCHAR) *n) == c - && (FCT (p, n, string_end, no_leading_period2, flags2) - == 0)) - return 0; - } - } - - /* If we come here no match is possible with the wildcard. */ - return FNM_NOMATCH; - - case L_('['): - { - /* Nonzero if the sense of the character class is inverted. */ - register bool not; - CHAR cold; - UCHAR fn; - - if (posixly_correct == 0) - posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; - - if (n == string_end) - return FNM_NOMATCH; - - if (*n == L_('.') && no_leading_period) - return FNM_NOMATCH; - - if (*n == L_('/') && (flags & FNM_FILE_NAME)) - /* `/' cannot be matched. */ - return FNM_NOMATCH; - - not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^'))); - if (not) - ++p; - - fn = FOLD ((UCHAR) *n); - - c = *p++; - for (;;) - { - if (!(flags & FNM_NOESCAPE) && c == L_('\\')) - { - if (*p == L_('\0')) - return FNM_NOMATCH; - c = FOLD ((UCHAR) *p); - ++p; - - goto normal_bracket; - } - else if (c == L_('[') && *p == L_(':')) - { - /* Leave room for the null. */ - CHAR str[CHAR_CLASS_MAX_LENGTH + 1]; - size_t c1 = 0; -#if defined _LIBC || WIDE_CHAR_SUPPORT - wctype_t wt; -#endif - const CHAR *startp = p; - - for (;;) - { - if (c1 == CHAR_CLASS_MAX_LENGTH) - /* The name is too long and therefore the pattern - is ill-formed. */ - return FNM_NOMATCH; - - c = *++p; - if (c == L_(':') && p[1] == L_(']')) - { - p += 2; - break; - } - if (c < L_('a') || c >= L_('z')) - { - /* This cannot possibly be a character class name. - Match it as a normal range. */ - p = startp; - c = L_('['); - goto normal_bracket; - } - str[c1++] = c; - } - str[c1] = L_('\0'); - -#if defined _LIBC || WIDE_CHAR_SUPPORT - wt = IS_CHAR_CLASS (str); - if (wt == 0) - /* Invalid character class name. */ - return FNM_NOMATCH; - -# if defined _LIBC && ! WIDE_CHAR_VERSION - /* The following code is glibc specific but does - there a good job in speeding up the code since - we can avoid the btowc() call. */ - if (_ISCTYPE ((UCHAR) *n, wt)) - goto matched; -# else - if (ISWCTYPE (BTOWC ((UCHAR) *n), wt)) - goto matched; -# endif -#else - if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n)) - || (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n)) - || (STREQ (str, L_("blank")) && isblank ((UCHAR) *n)) - || (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n)) - || (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n)) - || (STREQ (str, L_("graph")) && isgraph ((UCHAR) *n)) - || (STREQ (str, L_("lower")) && islower ((UCHAR) *n)) - || (STREQ (str, L_("print")) && isprint ((UCHAR) *n)) - || (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n)) - || (STREQ (str, L_("space")) && isspace ((UCHAR) *n)) - || (STREQ (str, L_("upper")) && isupper ((UCHAR) *n)) - || (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n))) - goto matched; -#endif - c = *p++; - } -#ifdef _LIBC - else if (c == L_('[') && *p == L_('=')) - { - UCHAR str[1]; - uint32_t nrules = - _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - const CHAR *startp = p; - - c = *++p; - if (c == L_('\0')) - { - p = startp; - c = L_('['); - goto normal_bracket; - } - str[0] = c; - - c = *++p; - if (c != L_('=') || p[1] != L_(']')) - { - p = startp; - c = L_('['); - goto normal_bracket; - } - p += 2; - - if (nrules == 0) - { - if ((UCHAR) *n == str[0]) - goto matched; - } - else - { - const int32_t *table; -# if WIDE_CHAR_VERSION - const int32_t *weights; - const int32_t *extra; -# else - const unsigned char *weights; - const unsigned char *extra; -# endif - const int32_t *indirect; - int32_t idx; - const UCHAR *cp = (const UCHAR *) str; - - /* This #include defines a local function! */ -# if WIDE_CHAR_VERSION -# include -# else -# include -# endif - -# if WIDE_CHAR_VERSION - table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC); - weights = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC); - extra = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC); - indirect = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC); -# else - table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - weights = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); - indirect = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); -# endif - - idx = findidx (&cp); - if (idx != 0) - { - /* We found a table entry. Now see whether the - character we are currently at has the same - equivalance class value. */ - int len = weights[idx & 0xffffff]; - int32_t idx2; - const UCHAR *np = (const UCHAR *) n; - - idx2 = findidx (&np); - if (idx2 != 0 - && (idx >> 24) == (idx2 >> 24) - && len == weights[idx2 & 0xffffff]) - { - int cnt = 0; - - idx &= 0xffffff; - idx2 &= 0xffffff; - - while (cnt < len - && (weights[idx + 1 + cnt] - == weights[idx2 + 1 + cnt])) - ++cnt; - - if (cnt == len) - goto matched; - } - } - } - - c = *p++; - } -#endif - else if (c == L_('\0')) - /* [ (unterminated) loses. */ - return FNM_NOMATCH; - else - { - bool is_range = false; - -#ifdef _LIBC - bool is_seqval = false; - - if (c == L_('[') && *p == L_('.')) - { - uint32_t nrules = - _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - const CHAR *startp = p; - size_t c1 = 0; - - while (1) - { - c = *++p; - if (c == L_('.') && p[1] == L_(']')) - { - p += 2; - break; - } - if (c == '\0') - return FNM_NOMATCH; - ++c1; - } - - /* We have to handling the symbols differently in - ranges since then the collation sequence is - important. */ - is_range = *p == L_('-') && p[1] != L_('\0'); - - if (nrules == 0) - { - /* There are no names defined in the collation - data. Therefore we only accept the trivial - names consisting of the character itself. */ - if (c1 != 1) - return FNM_NOMATCH; - - if (!is_range && *n == startp[1]) - goto matched; - - cold = startp[1]; - c = *p++; - } - else - { - int32_t table_size; - const int32_t *symb_table; -# ifdef WIDE_CHAR_VERSION - char str[c1]; - size_t strcnt; -# else -# define str (startp + 1) -# endif - const unsigned char *extra; - int32_t idx; - int32_t elem; - int32_t second; - int32_t hash; - -# ifdef WIDE_CHAR_VERSION - /* We have to convert the name to a single-byte - string. This is possible since the names - consist of ASCII characters and the internal - representation is UCS4. */ - for (strcnt = 0; strcnt < c1; ++strcnt) - str[strcnt] = startp[1 + strcnt]; -# endif - - table_size = - _NL_CURRENT_WORD (LC_COLLATE, - _NL_COLLATE_SYMB_HASH_SIZEMB); - symb_table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_TABLEMB); - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_EXTRAMB); - - /* Locate the character in the hashing table. */ - hash = elem_hash (str, c1); - - idx = 0; - elem = hash % table_size; - if (symb_table[2 * elem] != 0) - { - second = hash % (table_size - 2) + 1; - - do - { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - && (c1 - == extra[symb_table[2 * elem + 1]]) - && memcmp (str, - &extra[symb_table[2 * elem - + 1] - + 1], c1) == 0) - { - /* Yep, this is the entry. */ - idx = symb_table[2 * elem + 1]; - idx += 1 + extra[idx]; - break; - } - - /* Next entry. */ - elem += second; - } - while (symb_table[2 * elem] != 0); - } - - if (symb_table[2 * elem] != 0) - { - /* Compare the byte sequence but only if - this is not part of a range. */ -# ifdef WIDE_CHAR_VERSION - int32_t *wextra; - - idx += 1 + extra[idx]; - /* Adjust for the alignment. */ - idx = (idx + 3) & ~3; - - wextra = (int32_t *) &extra[idx + 4]; -# endif - - if (! is_range) - { -# ifdef WIDE_CHAR_VERSION - for (c1 = 0; - (int32_t) c1 < wextra[idx]; - ++c1) - if (n[c1] != wextra[1 + c1]) - break; - - if ((int32_t) c1 == wextra[idx]) - goto matched; -# else - for (c1 = 0; c1 < extra[idx]; ++c1) - if (n[c1] != extra[1 + c1]) - break; - - if (c1 == extra[idx]) - goto matched; -# endif - } - - /* Get the collation sequence value. */ - is_seqval = true; -# ifdef WIDE_CHAR_VERSION - cold = wextra[1 + wextra[idx]]; -# else - /* Adjust for the alignment. */ - idx += 1 + extra[idx]; - idx = (idx + 3) & ~4; - cold = *((int32_t *) &extra[idx]); -# endif - - c = *p++; - } - else if (c1 == 1) - { - /* No valid character. Match it as a - single byte. */ - if (!is_range && *n == str[0]) - goto matched; - - cold = str[0]; - c = *p++; - } - else - return FNM_NOMATCH; - } - } - else -# undef str -#endif - { - c = FOLD (c); - normal_bracket: - - /* We have to handling the symbols differently in - ranges since then the collation sequence is - important. */ - is_range = (*p == L_('-') && p[1] != L_('\0') - && p[1] != L_(']')); - - if (!is_range && c == fn) - goto matched; - -#if _LIBC - /* This is needed if we goto normal_bracket; from - outside of is_seqval's scope. */ - is_seqval = false; -#endif - - cold = c; - c = *p++; - } - - if (c == L_('-') && *p != L_(']')) - { -#if _LIBC - /* We have to find the collation sequence - value for C. Collation sequence is nothing - we can regularly access. The sequence - value is defined by the order in which the - definitions of the collation values for the - various characters appear in the source - file. A strange concept, nowhere - documented. */ - uint32_t fcollseq; - uint32_t lcollseq; - UCHAR cend = *p++; - -# ifdef WIDE_CHAR_VERSION - /* Search in the `names' array for the characters. */ - fcollseq = __collseq_table_lookup (collseq, fn); - if (fcollseq == ~((uint32_t) 0)) - /* XXX We don't know anything about the character - we are supposed to match. This means we are - failing. */ - goto range_not_matched; - - if (is_seqval) - lcollseq = cold; - else - lcollseq = __collseq_table_lookup (collseq, cold); -# else - fcollseq = collseq[fn]; - lcollseq = is_seqval ? cold : collseq[(UCHAR) cold]; -# endif - - is_seqval = false; - if (cend == L_('[') && *p == L_('.')) - { - uint32_t nrules = - _NL_CURRENT_WORD (LC_COLLATE, - _NL_COLLATE_NRULES); - const CHAR *startp = p; - size_t c1 = 0; - - while (1) - { - c = *++p; - if (c == L_('.') && p[1] == L_(']')) - { - p += 2; - break; - } - if (c == '\0') - return FNM_NOMATCH; - ++c1; - } - - if (nrules == 0) - { - /* There are no names defined in the - collation data. Therefore we only - accept the trivial names consisting - of the character itself. */ - if (c1 != 1) - return FNM_NOMATCH; - - cend = startp[1]; - } - else - { - int32_t table_size; - const int32_t *symb_table; -# ifdef WIDE_CHAR_VERSION - char str[c1]; - size_t strcnt; -# else -# define str (startp + 1) -# endif - const unsigned char *extra; - int32_t idx; - int32_t elem; - int32_t second; - int32_t hash; - -# ifdef WIDE_CHAR_VERSION - /* We have to convert the name to a single-byte - string. This is possible since the names - consist of ASCII characters and the internal - representation is UCS4. */ - for (strcnt = 0; strcnt < c1; ++strcnt) - str[strcnt] = startp[1 + strcnt]; -# endif - - table_size = - _NL_CURRENT_WORD (LC_COLLATE, - _NL_COLLATE_SYMB_HASH_SIZEMB); - symb_table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_TABLEMB); - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_EXTRAMB); - - /* Locate the character in the hashing - table. */ - hash = elem_hash (str, c1); - - idx = 0; - elem = hash % table_size; - if (symb_table[2 * elem] != 0) - { - second = hash % (table_size - 2) + 1; - - do - { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - && (c1 - == extra[symb_table[2 * elem + 1]]) - && memcmp (str, - &extra[symb_table[2 * elem + 1] - + 1], c1) == 0) - { - /* Yep, this is the entry. */ - idx = symb_table[2 * elem + 1]; - idx += 1 + extra[idx]; - break; - } - - /* Next entry. */ - elem += second; - } - while (symb_table[2 * elem] != 0); - } - - if (symb_table[2 * elem] != 0) - { - /* Compare the byte sequence but only if - this is not part of a range. */ -# ifdef WIDE_CHAR_VERSION - int32_t *wextra; - - idx += 1 + extra[idx]; - /* Adjust for the alignment. */ - idx = (idx + 3) & ~4; - - wextra = (int32_t *) &extra[idx + 4]; -# endif - /* Get the collation sequence value. */ - is_seqval = true; -# ifdef WIDE_CHAR_VERSION - cend = wextra[1 + wextra[idx]]; -# else - /* Adjust for the alignment. */ - idx += 1 + extra[idx]; - idx = (idx + 3) & ~4; - cend = *((int32_t *) &extra[idx]); -# endif - } - else if (symb_table[2 * elem] != 0 && c1 == 1) - { - cend = str[0]; - c = *p++; - } - else - return FNM_NOMATCH; - } -# undef str - } - else - { - if (!(flags & FNM_NOESCAPE) && cend == L_('\\')) - cend = *p++; - if (cend == L_('\0')) - return FNM_NOMATCH; - cend = FOLD (cend); - } - - /* XXX It is not entirely clear to me how to handle - characters which are not mentioned in the - collation specification. */ - if ( -# ifdef WIDE_CHAR_VERSION - lcollseq == 0xffffffff || -# endif - lcollseq <= fcollseq) - { - /* We have to look at the upper bound. */ - uint32_t hcollseq; - - if (is_seqval) - hcollseq = cend; - else - { -# ifdef WIDE_CHAR_VERSION - hcollseq = - __collseq_table_lookup (collseq, cend); - if (hcollseq == ~((uint32_t) 0)) - { - /* Hum, no information about the upper - bound. The matching succeeds if the - lower bound is matched exactly. */ - if (lcollseq != fcollseq) - goto range_not_matched; - - goto matched; - } -# else - hcollseq = collseq[cend]; -# endif - } - - if (lcollseq <= hcollseq && fcollseq <= hcollseq) - goto matched; - } -# ifdef WIDE_CHAR_VERSION - range_not_matched: -# endif -#else - /* We use a boring value comparison of the character - values. This is better than comparing using - `strcoll' since the latter would have surprising - and sometimes fatal consequences. */ - UCHAR cend = *p++; - - if (!(flags & FNM_NOESCAPE) && cend == L_('\\')) - cend = *p++; - if (cend == L_('\0')) - return FNM_NOMATCH; - - /* It is a range. */ - if (cold <= fn && fn <= cend) - goto matched; -#endif - - c = *p++; - } - } - - if (c == L_(']')) - break; - } - - if (!not) - return FNM_NOMATCH; - break; - - matched: - /* Skip the rest of the [...] that already matched. */ - do - { - ignore_next: - c = *p++; - - if (c == L_('\0')) - /* [... (unterminated) loses. */ - return FNM_NOMATCH; - - if (!(flags & FNM_NOESCAPE) && c == L_('\\')) - { - if (*p == L_('\0')) - return FNM_NOMATCH; - /* XXX 1003.2d11 is unclear if this is right. */ - ++p; - } - else if (c == L_('[') && *p == L_(':')) - { - int c1 = 0; - const CHAR *startp = p; - - while (1) - { - c = *++p; - if (++c1 == CHAR_CLASS_MAX_LENGTH) - return FNM_NOMATCH; - - if (*p == L_(':') && p[1] == L_(']')) - break; - - if (c < L_('a') || c >= L_('z')) - { - p = startp; - goto ignore_next; - } - } - p += 2; - c = *p++; - } - else if (c == L_('[') && *p == L_('=')) - { - c = *++p; - if (c == L_('\0')) - return FNM_NOMATCH; - c = *++p; - if (c != L_('=') || p[1] != L_(']')) - return FNM_NOMATCH; - p += 2; - c = *p++; - } - else if (c == L_('[') && *p == L_('.')) - { - ++p; - while (1) - { - c = *++p; - if (c == '\0') - return FNM_NOMATCH; - - if (*p == L_('.') && p[1] == L_(']')) - break; - } - p += 2; - c = *p++; - } - } - while (c != L_(']')); - if (not) - return FNM_NOMATCH; - } - break; - - case L_('+'): - case L_('@'): - case L_('!'): - if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') - { - int res; - - res = EXT (c, p, n, string_end, no_leading_period, flags); - if (res != -1) - return res; - } - goto normal_match; - - case L_('/'): - if (NO_LEADING_PERIOD (flags)) - { - if (n == string_end || c != (UCHAR) *n) - return FNM_NOMATCH; - - new_no_leading_period = true; - break; - } - /* FALLTHROUGH */ - default: - normal_match: - if (n == string_end || c != FOLD ((UCHAR) *n)) - return FNM_NOMATCH; - } - - no_leading_period = new_no_leading_period; - ++n; - } - - if (n == string_end) - return 0; - - if ((flags & FNM_LEADING_DIR) && n != string_end && *n == L_('/')) - /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */ - return 0; - - return FNM_NOMATCH; -} - - -static const CHAR * -internal_function -END (const CHAR *pattern) -{ - const CHAR *p = pattern; - - while (1) - if (*++p == L_('\0')) - /* This is an invalid pattern. */ - return pattern; - else if (*p == L_('[')) - { - /* Handle brackets special. */ - if (posixly_correct == 0) - posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; - - /* Skip the not sign. We have to recognize it because of a possibly - following ']'. */ - if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^'))) - ++p; - /* A leading ']' is recognized as such. */ - if (*p == L_(']')) - ++p; - /* Skip over all characters of the list. */ - while (*p != L_(']')) - if (*p++ == L_('\0')) - /* This is no valid pattern. */ - return pattern; - } - else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@') - || *p == L_('!')) && p[1] == L_('(')) - p = END (p + 1); - else if (*p == L_(')')) - break; - - return p + 1; -} - - -static int -internal_function -EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, - bool no_leading_period, int flags) -{ - const CHAR *startp; - size_t level; - struct patternlist - { - struct patternlist *next; - CHAR str[1]; - } *list = NULL; - struct patternlist **lastp = &list; - size_t pattern_len = STRLEN (pattern); - const CHAR *p; - const CHAR *rs; - enum { ALLOCA_LIMIT = 8000 }; - - /* Parse the pattern. Store the individual parts in the list. */ - level = 0; - for (startp = p = pattern + 1; ; ++p) - if (*p == L_('\0')) - /* This is an invalid pattern. */ - return -1; - else if (*p == L_('[')) - { - /* Handle brackets special. */ - if (posixly_correct == 0) - posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; - - /* Skip the not sign. We have to recognize it because of a possibly - following ']'. */ - if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^'))) - ++p; - /* A leading ']' is recognized as such. */ - if (*p == L_(']')) - ++p; - /* Skip over all characters of the list. */ - while (*p != L_(']')) - if (*p++ == L_('\0')) - /* This is no valid pattern. */ - return -1; - } - else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@') - || *p == L_('!')) && p[1] == L_('(')) - /* Remember the nesting level. */ - ++level; - else if (*p == L_(')')) - { - if (level-- == 0) - { - /* This means we found the end of the pattern. */ -#define NEW_PATTERN \ - struct patternlist *newp; \ - size_t plen; \ - size_t plensize; \ - size_t newpsize; \ - \ - plen = (opt == L_('?') || opt == L_('@') \ - ? pattern_len \ - : p - startp + 1UL); \ - plensize = plen * sizeof (CHAR); \ - newpsize = offsetof (struct patternlist, str) + plensize; \ - if ((size_t) -1 / sizeof (CHAR) < plen \ - || newpsize < offsetof (struct patternlist, str) \ - || ALLOCA_LIMIT <= newpsize) \ - return -1; \ - newp = (struct patternlist *) alloca (newpsize); \ - *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0'); \ - newp->next = NULL; \ - *lastp = newp; \ - lastp = &newp->next - NEW_PATTERN; - break; - } - } - else if (*p == L_('|')) - { - if (level == 0) - { - NEW_PATTERN; - startp = p + 1; - } - } - assert (list != NULL); - assert (p[-1] == L_(')')); -#undef NEW_PATTERN - - switch (opt) - { - case L_('*'): - if (FCT (p, string, string_end, no_leading_period, flags) == 0) - return 0; - /* FALLTHROUGH */ - - case L_('+'): - do - { - for (rs = string; rs <= string_end; ++rs) - /* First match the prefix with the current pattern with the - current pattern. */ - if (FCT (list->str, string, rs, no_leading_period, - flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0 - /* This was successful. Now match the rest with the rest - of the pattern. */ - && (FCT (p, rs, string_end, - rs == string - ? no_leading_period - : rs[-1] == '/' && NO_LEADING_PERIOD (flags), - flags & FNM_FILE_NAME - ? flags : flags & ~FNM_PERIOD) == 0 - /* This didn't work. Try the whole pattern. */ - || (rs != string - && FCT (pattern - 1, rs, string_end, - rs == string - ? no_leading_period - : rs[-1] == '/' && NO_LEADING_PERIOD (flags), - flags & FNM_FILE_NAME - ? flags : flags & ~FNM_PERIOD) == 0))) - /* It worked. Signal success. */ - return 0; - } - while ((list = list->next) != NULL); - - /* None of the patterns lead to a match. */ - return FNM_NOMATCH; - - case L_('?'): - if (FCT (p, string, string_end, no_leading_period, flags) == 0) - return 0; - /* FALLTHROUGH */ - - case L_('@'): - do - /* I cannot believe it but `strcat' is actually acceptable - here. Match the entire string with the prefix from the - pattern list and the rest of the pattern following the - pattern list. */ - if (FCT (STRCAT (list->str, p), string, string_end, - no_leading_period, - flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0) - /* It worked. Signal success. */ - return 0; - while ((list = list->next) != NULL); - - /* None of the patterns lead to a match. */ - return FNM_NOMATCH; - - case L_('!'): - for (rs = string; rs <= string_end; ++rs) - { - struct patternlist *runp; - - for (runp = list; runp != NULL; runp = runp->next) - if (FCT (runp->str, string, rs, no_leading_period, - flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0) - break; - - /* If none of the patterns matched see whether the rest does. */ - if (runp == NULL - && (FCT (p, rs, string_end, - rs == string - ? no_leading_period - : rs[-1] == '/' && NO_LEADING_PERIOD (flags), - flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) - == 0)) - /* This is successful. */ - return 0; - } - - /* None of the patterns together with the rest of the pattern - lead to a match. */ - return FNM_NOMATCH; - - default: - assert (! "Invalid extended matching operator"); - break; - } - - return -1; -} - - -#undef FOLD -#undef CHAR -#undef UCHAR -#undef INT -#undef FCT -#undef EXT -#undef END -#undef MEMPCPY -#undef MEMCHR -#undef STRCOLL -#undef STRLEN -#undef STRCAT -#undef L_ -#undef BTOWC diff --git a/gnulib/lib/fopen-safer.c b/gnulib/lib/fopen-safer.c deleted file mode 100644 index c0a1f16..0000000 --- a/gnulib/lib/fopen-safer.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Invoke fopen, but avoid some glitches. - - Copyright (C) 2001, 2004-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include - -#include "stdio-safer.h" - -#include -#include -#include "unistd-safer.h" - -/* Like fopen, but do not return stdin, stdout, or stderr. */ - -FILE * -fopen_safer (char const *file, char const *mode) -{ - FILE *fp = fopen (file, mode); - - if (fp) - { - int fd = fileno (fp); - - if (0 <= fd && fd <= STDERR_FILENO) - { - int f = dup_safer (fd); - - if (f < 0) - { - int e = errno; - fclose (fp); - errno = e; - return NULL; - } - - if (fclose (fp) != 0 - || ! (fp = fdopen (f, mode))) - { - int e = errno; - close (f); - errno = e; - return NULL; - } - } - } - - return fp; -} diff --git a/gnulib/lib/fopen.c b/gnulib/lib/fopen.c deleted file mode 100644 index 81c8617..0000000 --- a/gnulib/lib/fopen.c +++ /dev/null @@ -1,105 +0,0 @@ -/* Open a stream to a file. - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2007. */ - -#include - -/* Get the original definition of fopen. It might be defined as a macro. */ -#define __need_FILE -#include -#undef __need_FILE - -static inline FILE * -orig_fopen (const char *filename, const char *mode) -{ - return fopen (filename, mode); -} - -/* Specification. */ -#include - -#include -#include -#include -#include -#include -#include - -FILE * -rpl_fopen (const char *filename, const char *mode) -{ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - if (strcmp (filename, "/dev/null") == 0) - filename = "NUL"; -#endif - -#if FOPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and a mode that requires write access is - specified, then fail. - Rationale: POSIX - says that - "A pathname that contains at least one non-slash character and that - ends with one or more trailing slashes shall be resolved as if a - single dot character ( '.' ) were appended to the pathname." - and - "The special filename dot shall refer to the directory specified by - its predecessor." - If the named file already exists as a directory, then if a mode that - requires write access is specified, fopen() must fail because POSIX - says that it - fails with errno = EISDIR in this case. - If the named file does not exist or does not name a directory, then - fopen() must fail since the file does not contain a '.' directory. */ - { - size_t len = strlen (filename); - if (len > 0 && filename[len - 1] == '/') - { - int fd; - struct stat statbuf; - FILE *fp; - - if (mode[0] == 'w' || mode[0] == 'a') - { - errno = EISDIR; - return NULL; - } - - fd = open (filename, O_RDONLY); - if (fd < 0) - return NULL; - - if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) - { - close (fd); - errno = ENOTDIR; - return NULL; - } - - fp = fdopen (fd, mode); - if (fp == NULL) - { - int saved_errno = errno; - close (fd); - errno = saved_errno; - } - return fp; - } - } -# endif - - return orig_fopen (filename, mode); -} diff --git a/gnulib/lib/fpending.c b/gnulib/lib/fpending.c deleted file mode 100644 index 5ec38cb..0000000 --- a/gnulib/lib/fpending.c +++ /dev/null @@ -1,30 +0,0 @@ -/* fpending.c -- return the number of pending output bytes on a stream - Copyright (C) 2000, 2004, 2006-2007, 2009-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -#include "fpending.h" - -/* Return the number of pending (aka buffered, unflushed) - bytes on the stream, FP, that is open for writing. */ -size_t -__fpending (FILE *fp) -{ - return PENDING_OUTPUT_N_BYTES; -} diff --git a/gnulib/lib/fpending.h b/gnulib/lib/fpending.h deleted file mode 100644 index d7994f7..0000000 --- a/gnulib/lib/fpending.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Declare __fpending. - - Copyright (C) 2000, 2003, 2005-2006, 2009-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - - Written by Jim Meyering. */ - -#include -#include - -#ifndef HAVE_DECL___FPENDING -"this configure-time declaration test was not run" -#endif - -#if HAVE_DECL___FPENDING -# if HAVE_STDIO_EXT_H -# include -# endif -#else -size_t __fpending (FILE *); -#endif diff --git a/gnulib/lib/fpurge.c b/gnulib/lib/fpurge.c deleted file mode 100644 index 7e69fb4..0000000 --- a/gnulib/lib/fpurge.c +++ /dev/null @@ -1,137 +0,0 @@ -/* Flushing buffers of a FILE stream. - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */ -# include -#endif -#include - -#include "stdio-impl.h" - -int -fpurge (FILE *fp) -{ -#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */ - - __fpurge (fp); - /* The __fpurge function does not have a return value. */ - return 0; - -#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin 1.7 */ - - /* Call the system's fpurge function. */ -# undef fpurge -# if !HAVE_DECL_FPURGE - extern int fpurge (FILE *); -# endif - int result = fpurge (fp); -# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - if (result == 0) - /* Correct the invariants that fpurge broke. - on BSD systems says: - "The following always hold: if _flags & __SRD, _w is 0." - If this invariant is not fulfilled and the stream is read-write but - currently reading, subsequent putc or fputc calls will write directly - into the buffer, although they shouldn't be allowed to. */ - if ((fp_->_flags & __SRD) != 0) - fp_->_w = 0; -# endif - return result; - -#else - - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ -# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_IO_read_end = fp->_IO_read_ptr; - fp->_IO_write_ptr = fp->_IO_write_base; - /* Avoid memory leak when there is an active ungetc buffer. */ - if (fp->_IO_save_base != NULL) - { - free (fp->_IO_save_base); - fp->_IO_save_base = NULL; - } - return 0; -# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - fp_->_p = fp_->_bf._base; - fp_->_r = 0; - fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ - ? fp_->_bf._size - : 0); - /* Avoid memory leak when there is an active ungetc buffer. */ - if (fp_ub._base != NULL) - { - if (fp_ub._base != fp_->_ubuf) - free (fp_ub._base); - fp_ub._base = NULL; - } - return 0; -# elif defined __EMX__ /* emx+gcc */ - fp->_ptr = fp->_buffer; - fp->_rcount = 0; - fp->_wcount = 0; - fp->_ungetc_count = 0; - return 0; -# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ - fp->_ptr = fp->_base; - if (fp->_ptr != NULL) - fp->_cnt = 0; - return 0; -# elif defined __UCLIBC__ /* uClibc */ -# ifdef __STDIO_BUFFERS - if (fp->__modeflags & __FLAG_WRITING) - fp->__bufpos = fp->__bufstart; - else if (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) - fp->__bufpos = fp->__bufread; -# endif - return 0; -# elif defined __QNX__ /* QNX */ - fp->_Rback = fp->_Back + sizeof (fp->_Back); - fp->_Rsave = NULL; - if (fp->_Mode & 0x2000 /* _MWRITE */) - /* fp->_Buf <= fp->_Next <= fp->_Wend */ - fp->_Next = fp->_Buf; - else - /* fp->_Buf <= fp->_Next <= fp->_Rend */ - fp->_Rend = fp->_Next; - return 0; -# elif defined __MINT__ /* Atari FreeMiNT */ - if (fp->__pushed_back) - { - fp->__bufp = fp->__pushback_bufp; - fp->__pushed_back = 0; - } - /* Preserve the current file position. */ - if (fp->__target != -1) - fp->__target += fp->__bufp - fp->__buffer; - fp->__bufp = fp->__buffer; - /* Nothing in the buffer, next getc is nontrivial. */ - fp->__get_limit = fp->__bufp; - /* Nothing in the buffer, next putc is nontrivial. */ - fp->__put_limit = fp->__buffer; - return 0; -# else -# error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib." -# endif - -#endif -} diff --git a/gnulib/lib/freadahead.c b/gnulib/lib/freadahead.c deleted file mode 100644 index 27f5c95..0000000 --- a/gnulib/lib/freadahead.c +++ /dev/null @@ -1,85 +0,0 @@ -/* Retrieve information about a FILE stream. - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include "freadahead.h" - -#include -#include "stdio-impl.h" - -size_t -freadahead (FILE *fp) -{ -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_write_ptr > fp->_IO_write_base) - return 0; - return (fp->_IO_read_end - fp->_IO_read_ptr) - + (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base : - 0); -#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0) - return 0; -# if defined __DragonFly__ - return __sreadahead (fp); -# else - return fp_->_r - + (HASUB (fp) ? fp_->_ur : 0); -# endif -#elif defined __EMX__ /* emx+gcc */ - if ((fp->_flags & _IOWRT) != 0) - return 0; - /* Note: fp->_ungetc_count > 0 implies fp->_rcount <= 0, - fp->_ungetc_count = 0 implies fp->_rcount >= 0. */ - /* equivalent to - (fp->_ungetc_count == 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount) */ - return (fp->_rcount > 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount); -#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ - if ((fp_->_flag & _IOWRT) != 0) - return 0; - return fp_->_cnt; -#elif defined __UCLIBC__ /* uClibc */ -# ifdef __STDIO_BUFFERS - if (fp->__modeflags & __FLAG_WRITING) - return 0; - return (fp->__bufread - fp->__bufpos) - + (fp->__modeflags & __FLAG_UNGOT ? 1 : 0); -# else - return 0; -# endif -#elif defined __QNX__ /* QNX */ - if ((fp->_Mode & 0x2000 /* _MWRITE */) != 0) - return 0; - /* fp->_Buf <= fp->_Next <= fp->_Rend, - and fp->_Rend may be overridden by fp->_Rsave. */ - return ((fp->_Rsave ? fp->_Rsave : fp->_Rend) - fp->_Next) - + (fp->_Mode & 0x4000 /* _MBYTE */ - ? (fp->_Back + sizeof (fp->_Back)) - fp->_Rback - : 0); -#elif defined __MINT__ /* Atari FreeMiNT */ - if (!fp->__mode.__read) - return 0; - return (fp->__pushed_back - ? fp->__get_limit - fp->__pushback_bufp + 1 - : fp->__get_limit - fp->__bufp); -#elif defined SLOW_BUT_NO_HACKS /* users can define this */ - abort (); - return 0; -#else - #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib." -#endif -} diff --git a/gnulib/lib/freadahead.h b/gnulib/lib/freadahead.h deleted file mode 100644 index af03b89..0000000 --- a/gnulib/lib/freadahead.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Retrieve information about a FILE stream. - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Assuming the stream STREAM is open for reading: - Return the number of bytes waiting in the input buffer of STREAM. - This includes both the bytes that have been read from the underlying input - source and the bytes that have been pushed back through 'ungetc'. - - If this number is 0 and the stream is not currently writing, - fflush (STREAM) is known to be a no-op. - - STREAM must not be wide-character oriented. */ - -extern size_t freadahead (FILE *stream); - -#ifdef __cplusplus -} -#endif diff --git a/gnulib/lib/freading.c b/gnulib/lib/freading.c deleted file mode 100644 index 51aed0e..0000000 --- a/gnulib/lib/freading.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Retrieve information about a FILE stream. - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include "freading.h" - -#include "stdio-impl.h" - -/* Don't use glibc's __freading function in glibc < 2.7, see - */ -#if !(HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))) - -bool -freading (FILE *fp) -{ - /* Most systems provide FILE as a struct and the necessary bitmask in - , because they need it for implementing getc() and putc() as - fast macros. */ -# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - return ((fp->_flags & _IO_NO_WRITES) != 0 - || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 - && fp->_IO_read_base != NULL)); -# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - return (fp_->_flags & __SRD) != 0; -# elif defined __EMX__ /* emx+gcc */ - return (fp->_flags & _IOREAD) != 0; -# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ -# if defined __sun /* Solaris */ - return (fp->_flag & _IOREAD) != 0 && (fp->_flag & _IOWRT) == 0; -# else - return (fp->_flag & _IOREAD) != 0; -# endif -# elif defined __UCLIBC__ /* uClibc */ - return (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) != 0; -# elif defined __QNX__ /* QNX */ - return ((fp->_Mode & 0x2 /* _MOPENW */) == 0 - || (fp->_Mode & 0x1000 /* _MREAD */) != 0); -# elif defined __MINT__ /* Atari FreeMiNT */ - if (!fp->__mode.__write) - return 1; - if (!fp->__mode.__read) - return 0; -# ifdef _IO_CURRENTLY_GETTING /* Flag added on 2009-02-28 */ - return (fp->__flags & _IO_CURRENTLY_GETTING) != 0; -# else - return (fp->__buffer < fp->__get_limit /*|| fp->__bufp == fp->__put_limit ??*/); -# endif -# else -# error "Please port gnulib freading.c to your platform!" -# endif -} - -#endif diff --git a/gnulib/lib/freading.h b/gnulib/lib/freading.h deleted file mode 100644 index a19aea6..0000000 --- a/gnulib/lib/freading.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Retrieve information about a FILE stream. - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include -#include - -/* Return true if the stream STREAM is opened read-only, or if the - last operation on the stream was a read operation. Return false if - the stream is opened write-only or append-only, or if it supports - writing and there is no current read operation (such as fgetc). - - freading and fwriting will never both be true. If STREAM supports - both reads and writes, then: - - both freading and fwriting might be false when the stream is first - opened, after read encounters EOF, or after fflush, - - freading might be false or true and fwriting might be false - after repositioning (such as fseek, fsetpos, or rewind), - depending on the underlying implementation. - - STREAM must not be wide-character oriented. */ - -#if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) -/* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7 */ - -# include -# define freading(stream) (__freading (stream) != 0) - -#else - -# ifdef __cplusplus -extern "C" { -# endif - -extern bool freading (FILE *stream); - -# ifdef __cplusplus -} -# endif - -#endif diff --git a/gnulib/lib/fseeko.c b/gnulib/lib/fseeko.c deleted file mode 100644 index 2dd4cdc..0000000 --- a/gnulib/lib/fseeko.c +++ /dev/null @@ -1,146 +0,0 @@ -/* An fseeko() function that, together with fflush(), is POSIX compliant. - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include - -/* Get off_t and lseek. */ -#include - -#include "stdio-impl.h" - -int -fseeko (FILE *fp, off_t offset, int whence) -#undef fseeko -#if !HAVE_FSEEKO -# undef fseek -# define fseeko fseek -#endif -{ -#if LSEEK_PIPE_BROKEN - /* mingw gives bogus answers rather than failure on non-seekable files. */ - if (lseek (fileno (fp), 0, SEEK_CUR) == -1) - return EOF; -#endif - - /* These tests are based on fpurge.c. */ -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - 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 */ -# if defined __SL64 && defined __SCLE /* Cygwin */ - if ((fp->_flags & __SL64) == 0) - { - /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit - mode; but has an fseeko that requires 64-bit mode. */ - FILE *tmp = fopen ("/dev/null", "r"); - if (!tmp) - return -1; - fp->_flags |= __SL64; - fp->_seek64 = tmp->_seek64; - fclose (tmp); - } -# endif - if (fp_->_p == fp_->_bf._base - && fp_->_r == 0 - && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */ - ? fp_->_bf._size - : 0) - && fp_ub._base == NULL) -#elif defined __EMX__ /* emx+gcc */ - if (fp->_ptr == fp->_buffer - && fp->_rcount == 0 - && fp->_wcount == 0 - && fp->_ungetc_count == 0) -#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ - if (fp_->_ptr == fp_->_base - && (fp_->_ptr == NULL || fp_->_cnt == 0)) -#elif defined __UCLIBC__ /* uClibc */ - if (((fp->__modeflags & __FLAG_WRITING) == 0 - || fp->__bufpos == fp->__bufstart) - && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0 - || fp->__bufpos == fp->__bufread)) -#elif defined __QNX__ /* QNX */ - if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend) - && fp->_Rback == fp->_Back + sizeof (fp->_Back) - && fp->_Rsave == NULL) -#elif defined __MINT__ /* Atari FreeMiNT */ - if (fp->__bufp == fp->__buffer - && fp->__get_limit == fp->__bufp - && fp->__put_limit == fp->__bufp - && !fp->__pushed_back) -#else - #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib." -#endif - { - /* We get here when an fflush() call immediately preceded this one. We - know there are no buffers. - POSIX requires us to modify the file descriptor's position. - But we cannot position beyond end of file here. */ - off_t pos = - lseek (fileno (fp), - whence == SEEK_END && offset > 0 ? 0 : offset, - whence); - if (pos == -1) - { -#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - fp_->_flags &= ~__SOFF; -#endif - return -1; - } - -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags &= ~_IO_EOF_SEEN; -#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ -# if defined __CYGWIN__ - /* fp_->_offset is typed as an integer. */ - fp_->_offset = pos; -# else - /* fp_->_offset is an fpos_t. */ - { - /* Use a union, since on NetBSD, the compilation flags - determine whether fpos_t is typedef'd to off_t or a struct - containing a single off_t member. */ - union - { - fpos_t f; - off_t o; - } u; - u.o = pos; - fp_->_offset = u.f; - } -# endif - fp_->_flags |= __SOFF; - fp_->_flags &= ~__SEOF; -#elif defined __EMX__ /* emx+gcc */ - fp->_flags &= ~_IOEOF; -#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ - fp->_flag &= ~_IOEOF; -#elif defined __MINT__ /* Atari FreeMiNT */ - fp->__offset = pos; - fp->__eof = 0; -#endif - /* If we were not requested to position beyond end of file, we're - done. */ - if (!(whence == SEEK_END && offset > 0)) - return 0; - } - return fseeko (fp, offset, whence); -} diff --git a/gnulib/lib/fstatat.c b/gnulib/lib/fstatat.c deleted file mode 100644 index 16d60f6..0000000 --- a/gnulib/lib/fstatat.c +++ /dev/null @@ -1,110 +0,0 @@ -/* Work around an fstatat bug on Solaris 9. - - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert and Jim Meyering. */ - -#include - -#include - -#include -#include -#include - -#if HAVE_FSTATAT - -# undef fstatat - -/* fstatat should always follow symbolic links that end in /, but on - Solaris 9 it doesn't if AT_SYMLINK_NOFOLLOW is specified. - Likewise, trailing slash on a non-directory should be an error. - These are the same problems that lstat.c and stat.c address, so - solve it in a similar way. */ - -int -rpl_fstatat (int fd, char const *file, struct stat *st, int flag) -{ - int result = fstatat (fd, file, st, flag); - size_t len; - - if (result != 0) - return result; - len = strlen (file); - if (flag & AT_SYMLINK_NOFOLLOW) - { - /* Fix lstat behavior. */ - if (file[len - 1] != '/' || S_ISDIR (st->st_mode)) - return 0; - if (!S_ISLNK (st->st_mode)) - { - errno = ENOTDIR; - return -1; - } - result = fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW); - } - /* Fix stat behavior. */ - if (result == 0 && !S_ISDIR (st->st_mode) && file[len - 1] == '/') - { - errno = ENOTDIR; - return -1; - } - return result; -} - -#else /* !HAVE_FSTATAT */ - -/* On mingw, the gnulib defines `stat' as a function-like - macro; but using it in AT_FUNC_F2 causes compilation failure - because the preprocessor sees a use of a macro that requires two - arguments but is only given one. Hence, we need an inline - forwarder to get past the preprocessor. */ -static inline int -stat_func (char const *name, struct stat *st) -{ - return stat (name, st); -} - -/* Likewise, if there is no native `lstat', then the gnulib - defined it as stat, which also needs adjustment. */ -# if !HAVE_LSTAT -# undef lstat -# define lstat stat_func -# endif - -/* Replacement for Solaris' function by the same name. - - First, try to simulate it via l?stat ("/proc/self/fd/FD/FILE"). - Failing that, simulate it via save_cwd/fchdir/(stat|lstat)/restore_cwd. - If either the save_cwd or the restore_cwd fails (relatively unlikely), - then give a diagnostic and exit nonzero. - Otherwise, this function works just like Solaris' fstatat. */ - -# define AT_FUNC_NAME fstatat -# define AT_FUNC_F1 lstat -# define AT_FUNC_F2 stat_func -# define AT_FUNC_USE_F1_COND AT_SYMLINK_NOFOLLOW -# define AT_FUNC_POST_FILE_PARAM_DECLS , struct stat *st, int flag -# define AT_FUNC_POST_FILE_ARGS , st -# include "at-func.c" -# undef AT_FUNC_NAME -# undef AT_FUNC_F1 -# undef AT_FUNC_F2 -# undef AT_FUNC_USE_F1_COND -# undef AT_FUNC_POST_FILE_PARAM_DECLS -# undef AT_FUNC_POST_FILE_ARGS - -#endif /* !HAVE_FSTATAT */ diff --git a/gnulib/lib/ftello.c b/gnulib/lib/ftello.c deleted file mode 100644 index fbdc44f..0000000 --- a/gnulib/lib/ftello.c +++ /dev/null @@ -1,77 +0,0 @@ -/* An ftello() function that works around platform bugs. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -/* Get lseek. */ -#include - -#include "stdio-impl.h" - -off_t -ftello (FILE *fp) -#undef ftello -#if !HAVE_FTELLO -# undef ftell -# define ftello ftell -#endif -{ -#if LSEEK_PIPE_BROKEN - /* mingw gives bogus answers rather than failure on non-seekable files. */ - if (lseek (fileno (fp), 0, SEEK_CUR) == -1) - return -1; -#endif - -#if FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE /* Solaris */ - /* The Solaris stdio leaves the _IOREAD flag set after reading from a file - reaches EOF and the program then starts writing to the file. ftello - gets confused by this. */ - if (fp_->_flag & _IOWRT) - { - off_t pos; - - /* Call ftello nevertheless, for the side effects that it does on fp. */ - ftello (fp); - - /* Compute the file position ourselves. */ - pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR); - if (pos >= 0) - { - if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL) - pos += fp_->_ptr - fp_->_base; - } - return pos; - } -#endif - -#if defined __SL64 && defined __SCLE /* Cygwin */ - if ((fp->_flags & __SL64) == 0) - { - /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit - mode; but has an ftello that requires 64-bit mode. */ - FILE *tmp = fopen ("/dev/null", "r"); - if (!tmp) - return -1; - fp->_flags |= __SL64; - fp->_seek64 = tmp->_seek64; - fclose (tmp); - } -#endif - return ftello (fp); -} diff --git a/gnulib/lib/fts-cycle.c b/gnulib/lib/fts-cycle.c deleted file mode 100644 index 6dc60f0..0000000 --- a/gnulib/lib/fts-cycle.c +++ /dev/null @@ -1,160 +0,0 @@ -/* Detect cycles in file tree walks. - - Copyright (C) 2003-2006, 2009-2011 Free Software Foundation, Inc. - - Written by Jim Meyering. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include "cycle-check.h" -#include "hash.h" - -/* Use each of these to map a device/inode pair to an FTSENT. */ -struct Active_dir -{ - dev_t dev; - ino_t ino; - FTSENT *fts_ent; -}; - -static bool -AD_compare (void const *x, void const *y) -{ - struct Active_dir const *ax = x; - struct Active_dir const *ay = y; - return ax->ino == ay->ino - && ax->dev == ay->dev; -} - -static size_t -AD_hash (void const *x, size_t table_size) -{ - struct Active_dir const *ax = x; - return (uintmax_t) ax->ino % table_size; -} - -/* Set up the cycle-detection machinery. */ - -static bool -setup_dir (FTS *fts) -{ - if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) - { - enum { HT_INITIAL_SIZE = 31 }; - fts->fts_cycle.ht = hash_initialize (HT_INITIAL_SIZE, NULL, AD_hash, - AD_compare, free); - if (! fts->fts_cycle.ht) - return false; - } - else - { - fts->fts_cycle.state = malloc (sizeof *fts->fts_cycle.state); - if (! fts->fts_cycle.state) - return false; - cycle_check_init (fts->fts_cycle.state); - } - - return true; -} - -/* Enter a directory during a file tree walk. */ - -static bool -enter_dir (FTS *fts, FTSENT *ent) -{ - if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) - { - struct stat const *st = ent->fts_statp; - struct Active_dir *ad = malloc (sizeof *ad); - struct Active_dir *ad_from_table; - - if (!ad) - return false; - - ad->dev = st->st_dev; - ad->ino = st->st_ino; - ad->fts_ent = ent; - - /* See if we've already encountered this directory. - This can happen when following symlinks as well as - with a corrupted directory hierarchy. */ - ad_from_table = hash_insert (fts->fts_cycle.ht, ad); - - if (ad_from_table != ad) - { - free (ad); - if (!ad_from_table) - return false; - - /* There was an entry with matching dev/inode already in the table. - Record the fact that we've found a cycle. */ - ent->fts_cycle = ad_from_table->fts_ent; - ent->fts_info = FTS_DC; - } - } - else - { - if (cycle_check (fts->fts_cycle.state, ent->fts_statp)) - { - /* FIXME: setting fts_cycle like this isn't proper. - To do what the documentation requires, we'd have to - go around the cycle again and find the right entry. - But no callers in coreutils use the fts_cycle member. */ - ent->fts_cycle = ent; - ent->fts_info = FTS_DC; - } - } - - return true; -} - -/* Leave a directory during a file tree walk. */ - -static void -leave_dir (FTS *fts, FTSENT *ent) -{ - struct stat const *st = ent->fts_statp; - if (fts->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) - { - struct Active_dir obj; - void *found; - obj.dev = st->st_dev; - obj.ino = st->st_ino; - found = hash_delete (fts->fts_cycle.ht, &obj); - if (!found) - abort (); - free (found); - } - else - { - FTSENT *parent = ent->fts_parent; - if (parent != NULL && 0 <= parent->fts_level) - CYCLE_CHECK_REFLECT_CHDIR_UP (fts->fts_cycle.state, - *(parent->fts_statp), *st); - } -} - -/* Free any memory used for cycle detection. */ - -static void -free_dir (FTS *sp) -{ - if (sp->fts_options & (FTS_TIGHT_CYCLE_CHECK | FTS_LOGICAL)) - { - if (sp->fts_cycle.ht) - hash_free (sp->fts_cycle.ht); - } - else - free (sp->fts_cycle.state); -} diff --git a/gnulib/lib/fts.c b/gnulib/lib/fts.c deleted file mode 100644 index ad762dd..0000000 --- a/gnulib/lib/fts.c +++ /dev/null @@ -1,2013 +0,0 @@ -/* Traverse a file hierarchy. - - Copyright (C) 2004-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/*- - * Copyright (c) 1990, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; -#endif /* LIBC_SCCS and not lint */ - -#include "fts_.h" - -#if HAVE_SYS_PARAM_H || defined _LIBC -# include -#endif -#ifdef _LIBC -# include -#else -# include -#endif -#include -#include -#include -#include -#include -#include - -#if ! _LIBC -# include "fcntl--.h" -# include "dirent--.h" -# include "unistd--.h" -/* FIXME - use fcntl(F_DUPFD_CLOEXEC)/openat(O_CLOEXEC) once they are - supported. */ -# include "cloexec.h" -# include "openat.h" -# include "same-inode.h" -#endif - -#include -#ifndef _D_EXACT_NAMLEN -# define _D_EXACT_NAMLEN(dirent) strlen ((dirent)->d_name) -#endif - -#if HAVE_STRUCT_DIRENT_D_TYPE -/* True if the type of the directory entry D is known. */ -# define DT_IS_KNOWN(d) ((d)->d_type != DT_UNKNOWN) -/* True if the type of the directory entry D must be T. */ -# define DT_MUST_BE(d, t) ((d)->d_type == (t)) -# define D_TYPE(d) ((d)->d_type) -#else -# define DT_IS_KNOWN(d) false -# define DT_MUST_BE(d, t) false -# define D_TYPE(d) DT_UNKNOWN - -# undef DT_UNKNOWN -# define DT_UNKNOWN 0 - -/* Any nonzero values will do here, so long as they're distinct. - Undef any existing macros out of the way. */ -# undef DT_BLK -# undef DT_CHR -# undef DT_DIR -# undef DT_FIFO -# undef DT_LNK -# undef DT_REG -# undef DT_SOCK -# define DT_BLK 1 -# define DT_CHR 2 -# define DT_DIR 3 -# define DT_FIFO 4 -# define DT_LNK 5 -# define DT_REG 6 -# define DT_SOCK 7 -#endif - -#ifndef S_IFLNK -# define S_IFLNK 0 -#endif -#ifndef S_IFSOCK -# define S_IFSOCK 0 -#endif - -enum -{ - NOT_AN_INODE_NUMBER = 0 -}; - -#ifdef D_INO_IN_DIRENT -# define D_INO(dp) (dp)->d_ino -#else -/* Some systems don't have inodes, so fake them to avoid lots of ifdefs. */ -# define D_INO(dp) NOT_AN_INODE_NUMBER -#endif - -/* If there are more than this many entries in a directory, - and the conditions mentioned below are satisfied, then sort - the entries on inode number before any further processing. */ -#ifndef FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD -# define FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD 10000 -#endif -enum -{ - _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD = FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD -}; - -enum Fts_stat -{ - FTS_NO_STAT_REQUIRED = 1, - FTS_STAT_REQUIRED = 2 -}; - -#ifdef _LIBC -# undef close -# define close __close -# undef closedir -# define closedir __closedir -# undef fchdir -# define fchdir __fchdir -# undef open -# define open __open -# undef readdir -# define readdir __readdir -#else -# undef internal_function -# define internal_function /* empty */ -#endif - -#ifndef __set_errno -# define __set_errno(Val) errno = (Val) -#endif - -/* If this host provides the openat function, then we can avoid - attempting to open "." in some initialization code below. */ -#ifdef HAVE_OPENAT -# define HAVE_OPENAT_SUPPORT 1 -#else -# define HAVE_OPENAT_SUPPORT 0 -#endif - -#ifdef NDEBUG -# define fts_assert(expr) ((void) 0) -#else -# define fts_assert(expr) \ - do \ - { \ - if (!(expr)) \ - abort (); \ - } \ - while (false) -#endif - -static FTSENT *fts_alloc (FTS *, const char *, size_t) internal_function; -static FTSENT *fts_build (FTS *, int) internal_function; -static void fts_lfree (FTSENT *) internal_function; -static void fts_load (FTS *, FTSENT *) internal_function; -static size_t fts_maxarglen (char * const *) internal_function; -static void fts_padjust (FTS *, FTSENT *) internal_function; -static bool fts_palloc (FTS *, size_t) internal_function; -static FTSENT *fts_sort (FTS *, FTSENT *, size_t) internal_function; -static unsigned short int fts_stat (FTS *, FTSENT *, bool) internal_function; -static int fts_safe_changedir (FTS *, FTSENT *, int, const char *) - internal_function; - -#include "fts-cycle.c" - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif - -#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) -#define STREQ(a, b) (strcmp (a, b) == 0) - -#define CLR(opt) (sp->fts_options &= ~(opt)) -#define ISSET(opt) (sp->fts_options & (opt)) -#define SET(opt) (sp->fts_options |= (opt)) - -/* FIXME: make this a function */ -#define RESTORE_INITIAL_CWD(sp) \ - (fd_ring_clear (&((sp)->fts_fd_ring)), \ - FCHDIR ((sp), (ISSET (FTS_CWDFD) ? AT_FDCWD : (sp)->fts_rfd))) - -/* FIXME: FTS_NOCHDIR is now misnamed. - Call it FTS_USE_FULL_RELATIVE_FILE_NAMES instead. */ -#define FCHDIR(sp, fd) \ - (!ISSET(FTS_NOCHDIR) && (ISSET(FTS_CWDFD) \ - ? (cwd_advance_fd ((sp), (fd), true), 0) \ - : fchdir (fd))) - - -/* fts_build flags */ -/* FIXME: make this an enum */ -#define BCHILD 1 /* fts_children */ -#define BNAMES 2 /* fts_children, names only */ -#define BREAD 3 /* fts_read */ - -#if FTS_DEBUG -# include -# include -# include -# include "getcwdat.h" -bool fts_debug = false; -# define Dprintf(x) do { if (fts_debug) printf x; } while (false) -#else -# define Dprintf(x) -# define fd_ring_check(x) -# define fd_ring_print(a, b, c) -#endif - -#define LEAVE_DIR(Fts, Ent, Tag) \ - do \ - { \ - Dprintf ((" %s-leaving: %s\n", Tag, (Ent)->fts_path)); \ - leave_dir (Fts, Ent); \ - fd_ring_check (Fts); \ - } \ - while (false) - -static void -fd_ring_clear (I_ring *fd_ring) -{ - while ( ! i_ring_empty (fd_ring)) - { - int fd = i_ring_pop (fd_ring); - if (0 <= fd) - close (fd); - } -} - -/* Overload the fts_statp->st_size member (otherwise unused, when - fts_info is FTS_NSOK) to indicate whether fts_read should stat - this entry or not. */ -static void -fts_set_stat_required (FTSENT *p, bool required) -{ - fts_assert (p->fts_info == FTS_NSOK); - p->fts_statp->st_size = (required - ? FTS_STAT_REQUIRED - : FTS_NO_STAT_REQUIRED); -} - -/* file-descriptor-relative opendir. */ -/* FIXME: if others need this function, move it into lib/openat.c */ -static inline DIR * -internal_function -opendirat (int fd, char const *dir, int extra_flags, int *pdir_fd) -{ - int new_fd = openat (fd, dir, - (O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK - | extra_flags)); - DIR *dirp; - - if (new_fd < 0) - return NULL; - set_cloexec_flag (new_fd, true); - dirp = fdopendir (new_fd); - if (dirp) - *pdir_fd = new_fd; - else - { - int saved_errno = errno; - close (new_fd); - errno = saved_errno; - } - return dirp; -} - -/* Virtual fchdir. Advance SP's working directory file descriptor, - SP->fts_cwd_fd, to FD, and push the previous value onto the fd_ring. - CHDIR_DOWN_ONE is true if FD corresponds to an entry in the directory - open on sp->fts_cwd_fd; i.e., to move the working directory one level - down. */ -static void -internal_function -cwd_advance_fd (FTS *sp, int fd, bool chdir_down_one) -{ - int old = sp->fts_cwd_fd; - fts_assert (old != fd || old == AT_FDCWD); - - if (chdir_down_one) - { - /* Push "old" onto the ring. - If the displaced file descriptor is non-negative, close it. */ - int prev_fd_in_slot = i_ring_push (&sp->fts_fd_ring, old); - fd_ring_print (sp, stderr, "post-push"); - if (0 <= prev_fd_in_slot) - close (prev_fd_in_slot); /* ignore any close failure */ - } - else if ( ! ISSET (FTS_NOCHDIR)) - { - if (0 <= old) - close (old); /* ignore any close failure */ - } - - sp->fts_cwd_fd = fd; -} - -/* Open the directory DIR if possible, and return a file - descriptor. Return -1 and set errno on failure. It doesn't matter - whether the file descriptor has read or write access. */ - -static inline int -internal_function -diropen (FTS const *sp, char const *dir) -{ - int open_flags = (O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK - | (ISSET (FTS_PHYSICAL) ? O_NOFOLLOW : 0)); - - int fd = (ISSET (FTS_CWDFD) - ? openat (sp->fts_cwd_fd, dir, open_flags) - : open (dir, open_flags)); - if (0 <= fd) - set_cloexec_flag (fd, true); - return fd; -} - -FTS * -fts_open (char * const *argv, - register int options, - int (*compar) (FTSENT const **, FTSENT const **)) -{ - register FTS *sp; - register FTSENT *p, *root; - register size_t nitems; - FTSENT *parent = NULL; - FTSENT *tmp = NULL; /* pacify gcc */ - bool defer_stat; - - /* Options check. */ - if (options & ~FTS_OPTIONMASK) { - __set_errno (EINVAL); - return (NULL); - } - if ((options & FTS_NOCHDIR) && (options & FTS_CWDFD)) { - __set_errno (EINVAL); - return (NULL); - } - if ( ! (options & (FTS_LOGICAL | FTS_PHYSICAL))) { - __set_errno (EINVAL); - return (NULL); - } - - /* Allocate/initialize the stream */ - if ((sp = malloc(sizeof(FTS))) == NULL) - return (NULL); - memset(sp, 0, sizeof(FTS)); - sp->fts_compar = compar; - sp->fts_options = options; - - /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ - if (ISSET(FTS_LOGICAL)) { - SET(FTS_NOCHDIR); - CLR(FTS_CWDFD); - } - - /* Initialize fts_cwd_fd. */ - sp->fts_cwd_fd = AT_FDCWD; - if ( ISSET(FTS_CWDFD) && ! HAVE_OPENAT_SUPPORT) - { - /* While it isn't technically necessary to open "." this - early, doing it here saves us the trouble of ensuring - later (where it'd be messier) that "." can in fact - be opened. If not, revert to FTS_NOCHDIR mode. */ - int fd = open (".", O_SEARCH); - if (fd < 0) - { - /* Even if `.' is unreadable, don't revert to FTS_NOCHDIR mode - on systems like Linux+PROC_FS, where our openat emulation - is good enough. Note: on a system that emulates - openat via /proc, this technique can still fail, but - only in extreme conditions, e.g., when the working - directory cannot be saved (i.e. save_cwd fails) -- - and that happens on Linux only when "." is unreadable - and the CWD would be longer than PATH_MAX. - FIXME: once Linux kernel openat support is well established, - replace the above open call and this entire if/else block - with the body of the if-block below. */ - if ( openat_needs_fchdir ()) - { - SET(FTS_NOCHDIR); - CLR(FTS_CWDFD); - } - } - else - { - close (fd); - } - } - - /* - * Start out with 1K of file name space, and enough, in any case, - * to hold the user's file names. - */ -#ifndef MAXPATHLEN -# define MAXPATHLEN 1024 -#endif - { - size_t maxarglen = fts_maxarglen(argv); - if (! fts_palloc(sp, MAX(maxarglen, MAXPATHLEN))) - goto mem1; - } - - /* Allocate/initialize root's parent. */ - if (*argv != NULL) { - if ((parent = fts_alloc(sp, "", 0)) == NULL) - goto mem2; - parent->fts_level = FTS_ROOTPARENTLEVEL; - } - - /* The classic fts implementation would call fts_stat with - a new entry for each iteration of the loop below. - If the comparison function is not specified or if the - FTS_DEFER_STAT option is in effect, don't stat any entry - in this loop. This is an attempt to minimize the interval - between the initial stat/lstat/fstatat and the point at which - a directory argument is first opened. This matters for any - directory command line argument that resides on a file system - without genuine i-nodes. If you specify FTS_DEFER_STAT along - with a comparison function, that function must not access any - data via the fts_statp pointer. */ - defer_stat = (compar == NULL || ISSET(FTS_DEFER_STAT)); - - /* Allocate/initialize root(s). */ - for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { - /* *Do* allow zero-length file names. */ - size_t len = strlen(*argv); - if ((p = fts_alloc(sp, *argv, len)) == NULL) - goto mem3; - p->fts_level = FTS_ROOTLEVEL; - p->fts_parent = parent; - p->fts_accpath = p->fts_name; - /* Even when defer_stat is true, be sure to stat the first - command line argument, since fts_read (at least with - FTS_XDEV) requires that. */ - if (defer_stat && root != NULL) { - p->fts_info = FTS_NSOK; - fts_set_stat_required(p, true); - } else { - p->fts_info = fts_stat(sp, p, false); - } - - /* - * If comparison routine supplied, traverse in sorted - * order; otherwise traverse in the order specified. - */ - if (compar) { - p->fts_link = root; - root = p; - } else { - p->fts_link = NULL; - if (root == NULL) - tmp = root = p; - else { - tmp->fts_link = p; - tmp = p; - } - } - } - if (compar && nitems > 1) - root = fts_sort(sp, root, nitems); - - /* - * Allocate a dummy pointer and make fts_read think that we've just - * finished the node before the root(s); set p->fts_info to FTS_INIT - * so that everything about the "current" node is ignored. - */ - if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL) - goto mem3; - sp->fts_cur->fts_link = root; - sp->fts_cur->fts_info = FTS_INIT; - if (! setup_dir (sp)) - goto mem3; - - /* - * If using chdir(2), grab a file descriptor pointing to dot to ensure - * that we can get back here; this could be avoided for some file names, - * but almost certainly not worth the effort. Slashes, symbolic links, - * and ".." are all fairly nasty problems. Note, if we can't get the - * descriptor we run anyway, just more slowly. - */ - if (!ISSET(FTS_NOCHDIR) && !ISSET(FTS_CWDFD) - && (sp->fts_rfd = diropen (sp, ".")) < 0) - SET(FTS_NOCHDIR); - - i_ring_init (&sp->fts_fd_ring, -1); - return (sp); - -mem3: fts_lfree(root); - free(parent); -mem2: free(sp->fts_path); -mem1: free(sp); - return (NULL); -} - -static void -internal_function -fts_load (FTS *sp, register FTSENT *p) -{ - register size_t len; - register char *cp; - - /* - * Load the stream structure for the next traversal. Since we don't - * actually enter the directory until after the preorder visit, set - * the fts_accpath field specially so the chdir gets done to the right - * place and the user can access the first node. From fts_open it's - * known that the file name will fit. - */ - len = p->fts_pathlen = p->fts_namelen; - memmove(sp->fts_path, p->fts_name, len + 1); - if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { - len = strlen(++cp); - memmove(p->fts_name, cp, len + 1); - p->fts_namelen = len; - } - p->fts_accpath = p->fts_path = sp->fts_path; -} - -int -fts_close (FTS *sp) -{ - register FTSENT *freep, *p; - int saved_errno = 0; - - /* - * This still works if we haven't read anything -- the dummy structure - * points to the root list, so we step through to the end of the root - * list which has a valid parent pointer. - */ - if (sp->fts_cur) { - for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) { - freep = p; - p = p->fts_link != NULL ? p->fts_link : p->fts_parent; - free(freep); - } - free(p); - } - - /* Free up child linked list, sort array, file name buffer. */ - if (sp->fts_child) - fts_lfree(sp->fts_child); - free(sp->fts_array); - free(sp->fts_path); - - if (ISSET(FTS_CWDFD)) - { - if (0 <= sp->fts_cwd_fd) - if (close (sp->fts_cwd_fd)) - saved_errno = errno; - } - else if (!ISSET(FTS_NOCHDIR)) - { - /* Return to original directory, save errno if necessary. */ - if (fchdir(sp->fts_rfd)) - saved_errno = errno; - - /* If close fails, record errno only if saved_errno is zero, - so that we report the probably-more-meaningful fchdir errno. */ - if (close (sp->fts_rfd)) - if (saved_errno == 0) - saved_errno = errno; - } - - fd_ring_clear (&sp->fts_fd_ring); - - if (sp->fts_leaf_optimization_works_ht) - hash_free (sp->fts_leaf_optimization_works_ht); - - free_dir (sp); - - /* Free up the stream pointer. */ - free(sp); - - /* Set errno and return. */ - if (saved_errno) { - __set_errno (saved_errno); - return (-1); - } - - return (0); -} - -#if defined __linux__ \ - && HAVE_SYS_VFS_H && HAVE_FSTATFS && HAVE_STRUCT_STATFS_F_TYPE - -# include - -/* Linux-specific constants from coreutils' src/fs.h */ -# define S_MAGIC_TMPFS 0x1021994 -# define S_MAGIC_NFS 0x6969 -# define S_MAGIC_REISERFS 0x52654973 -# define S_MAGIC_PROC 0x9FA0 - -/* Return false if it is easy to determine the file system type of - the directory on which DIR_FD is open, and sorting dirents on - inode numbers is known not to improve traversal performance with - that type of file system. Otherwise, return true. */ -static bool -dirent_inode_sort_may_be_useful (int dir_fd) -{ - /* Skip the sort only if we can determine efficiently - that skipping it is the right thing to do. - The cost of performing an unnecessary sort is negligible, - while the cost of *not* performing it can be O(N^2) with - a very large constant. */ - struct statfs fs_buf; - - /* If fstatfs fails, assume sorting would be useful. */ - if (fstatfs (dir_fd, &fs_buf) != 0) - return true; - - /* FIXME: what about when f_type is not an integral type? - deal with that if/when it's encountered. */ - switch (fs_buf.f_type) - { - case S_MAGIC_TMPFS: - case S_MAGIC_NFS: - /* On a file system of any of these types, sorting - is unnecessary, and hence wasteful. */ - return false; - - default: - return true; - } -} - -/* Given a file descriptor DIR_FD open on a directory D, - return true if it is valid to apply the leaf-optimization - technique of counting directories in D via stat.st_nlink. */ -static bool -leaf_optimization_applies (int dir_fd) -{ - struct statfs fs_buf; - - /* If fstatfs fails, assume we can't use the optimization. */ - if (fstatfs (dir_fd, &fs_buf) != 0) - return false; - - /* FIXME: do we need to detect AFS mount points? I doubt it, - unless fstatfs can report S_MAGIC_REISERFS for such a directory. */ - - switch (fs_buf.f_type) - { - /* List here the file system types that lack useable dirent.d_type - info, yet for which the optimization does apply. */ - case S_MAGIC_REISERFS: - return true; - - case S_MAGIC_PROC: - /* Explicitly listing this or any other file system type for which - the optimization is not applicable is not necessary, but we leave - it here to document the risk. Per http://bugs.debian.org/143111, - /proc may have bogus stat.st_nlink values. */ - /* fall through */ - default: - return false; - } -} - -#else -static bool -dirent_inode_sort_may_be_useful (int dir_fd _GL_UNUSED) { return true; } -static bool -leaf_optimization_applies (int dir_fd _GL_UNUSED) { return false; } -#endif - -/* link-count-optimization entry: - map an stat.st_dev number to a boolean: leaf_optimization_works */ -struct LCO_ent -{ - dev_t st_dev; - bool opt_ok; -}; - -/* Use a tiny initial size. If a traversal encounters more than - a few devices, the cost of growing/rehashing this table will be - rendered negligible by the number of inodes processed. */ -enum { LCO_HT_INITIAL_SIZE = 13 }; - -static size_t -LCO_hash (void const *x, size_t table_size) -{ - struct LCO_ent const *ax = x; - return (uintmax_t) ax->st_dev % table_size; -} - -static bool -LCO_compare (void const *x, void const *y) -{ - struct LCO_ent const *ax = x; - struct LCO_ent const *ay = y; - return ax->st_dev == ay->st_dev; -} - -/* Ask the same question as leaf_optimization_applies, but query - the cache first (FTS.fts_leaf_optimization_works_ht), and if necessary, - update that cache. */ -static bool -link_count_optimize_ok (FTSENT const *p) -{ - FTS *sp = p->fts_fts; - Hash_table *h = sp->fts_leaf_optimization_works_ht; - struct LCO_ent tmp; - struct LCO_ent *ent; - bool opt_ok; - struct LCO_ent *t2; - - /* If we're not in CWDFD mode, don't bother with this optimization, - since the caller is not serious about performance. */ - if (!ISSET(FTS_CWDFD)) - return false; - - /* map st_dev to the boolean, leaf_optimization_works */ - if (h == NULL) - { - h = sp->fts_leaf_optimization_works_ht - = hash_initialize (LCO_HT_INITIAL_SIZE, NULL, LCO_hash, - LCO_compare, free); - if (h == NULL) - return false; - } - tmp.st_dev = p->fts_statp->st_dev; - ent = hash_lookup (h, &tmp); - if (ent) - return ent->opt_ok; - - /* Look-up failed. Query directly and cache the result. */ - t2 = malloc (sizeof *t2); - if (t2 == NULL) - return false; - - /* Is it ok to perform the optimization in the dir, FTS_CWD_FD? */ - opt_ok = leaf_optimization_applies (sp->fts_cwd_fd); - t2->opt_ok = opt_ok; - t2->st_dev = p->fts_statp->st_dev; - - ent = hash_insert (h, t2); - if (ent == NULL) - { - /* insertion failed */ - free (t2); - return false; - } - fts_assert (ent == t2); - - return opt_ok; -} - -/* - * Special case of "/" at the end of the file name so that slashes aren't - * appended which would cause file names to be written as "....//foo". - */ -#define NAPPEND(p) \ - (p->fts_path[p->fts_pathlen - 1] == '/' \ - ? p->fts_pathlen - 1 : p->fts_pathlen) - -FTSENT * -fts_read (register FTS *sp) -{ - register FTSENT *p, *tmp; - register unsigned short int instr; - register char *t; - - /* If finished or unrecoverable error, return NULL. */ - if (sp->fts_cur == NULL || ISSET(FTS_STOP)) - return (NULL); - - /* Set current node pointer. */ - p = sp->fts_cur; - - /* Save and zero out user instructions. */ - instr = p->fts_instr; - p->fts_instr = FTS_NOINSTR; - - /* Any type of file may be re-visited; re-stat and re-turn. */ - if (instr == FTS_AGAIN) { - p->fts_info = fts_stat(sp, p, false); - return (p); - } - Dprintf (("fts_read: p=%s\n", - p->fts_info == FTS_INIT ? "" : p->fts_path)); - - /* - * Following a symlink -- SLNONE test allows application to see - * SLNONE and recover. If indirecting through a symlink, have - * keep a pointer to current location. If unable to get that - * pointer, follow fails. - */ - if (instr == FTS_FOLLOW && - (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { - p->fts_info = fts_stat(sp, p, true); - if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { - if ((p->fts_symfd = diropen (sp, ".")) < 0) { - p->fts_errno = errno; - p->fts_info = FTS_ERR; - } else - p->fts_flags |= FTS_SYMFOLLOW; - } - goto check_for_dir; - } - - /* Directory in pre-order. */ - if (p->fts_info == FTS_D) { - /* If skipped or crossed mount point, do post-order visit. */ - if (instr == FTS_SKIP || - (ISSET(FTS_XDEV) && p->fts_statp->st_dev != sp->fts_dev)) { - if (p->fts_flags & FTS_SYMFOLLOW) - (void)close(p->fts_symfd); - if (sp->fts_child) { - fts_lfree(sp->fts_child); - sp->fts_child = NULL; - } - p->fts_info = FTS_DP; - LEAVE_DIR (sp, p, "1"); - return (p); - } - - /* Rebuild if only read the names and now traversing. */ - if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) { - CLR(FTS_NAMEONLY); - fts_lfree(sp->fts_child); - sp->fts_child = NULL; - } - - /* - * Cd to the subdirectory. - * - * If have already read and now fail to chdir, whack the list - * to make the names come out right, and set the parent errno - * so the application will eventually get an error condition. - * Set the FTS_DONTCHDIR flag so that when we logically change - * directories back to the parent we don't do a chdir. - * - * If haven't read do so. If the read fails, fts_build sets - * FTS_STOP or the fts_info field of the node. - */ - if (sp->fts_child != NULL) { - if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) { - p->fts_errno = errno; - p->fts_flags |= FTS_DONTCHDIR; - for (p = sp->fts_child; p != NULL; - p = p->fts_link) - p->fts_accpath = - p->fts_parent->fts_accpath; - } - } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) { - if (ISSET(FTS_STOP)) - return (NULL); - /* If fts_build's call to fts_safe_changedir failed - because it was not able to fchdir into a - subdirectory, tell the caller. */ - if (p->fts_errno && p->fts_info != FTS_DNR) - p->fts_info = FTS_ERR; - LEAVE_DIR (sp, p, "2"); - return (p); - } - p = sp->fts_child; - sp->fts_child = NULL; - goto name; - } - - /* Move to the next node on this level. */ -next: tmp = p; - if ((p = p->fts_link) != NULL) { - sp->fts_cur = p; - free(tmp); - - /* - * If reached the top, return to the original directory (or - * the root of the tree), and load the file names for the next - * root. - */ - if (p->fts_level == FTS_ROOTLEVEL) { - if (RESTORE_INITIAL_CWD(sp)) { - SET(FTS_STOP); - return (NULL); - } - free_dir(sp); - fts_load(sp, p); - setup_dir(sp); - goto check_for_dir; - } - - /* - * User may have called fts_set on the node. If skipped, - * ignore. If followed, get a file descriptor so we can - * get back if necessary. - */ - if (p->fts_instr == FTS_SKIP) - goto next; - if (p->fts_instr == FTS_FOLLOW) { - p->fts_info = fts_stat(sp, p, true); - if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { - if ((p->fts_symfd = diropen (sp, ".")) < 0) { - p->fts_errno = errno; - p->fts_info = FTS_ERR; - } else - p->fts_flags |= FTS_SYMFOLLOW; - } - p->fts_instr = FTS_NOINSTR; - } - -name: t = sp->fts_path + NAPPEND(p->fts_parent); - *t++ = '/'; - memmove(t, p->fts_name, p->fts_namelen + 1); -check_for_dir: - sp->fts_cur = p; - if (p->fts_info == FTS_NSOK) - { - if (p->fts_statp->st_size == FTS_STAT_REQUIRED) - { - FTSENT *parent = p->fts_parent; - if (FTS_ROOTLEVEL < p->fts_level - /* ->fts_n_dirs_remaining is not valid - for command-line-specified names. */ - && parent->fts_n_dirs_remaining == 0 - && ISSET(FTS_NOSTAT) - && ISSET(FTS_PHYSICAL) - && link_count_optimize_ok (parent)) - { - /* nothing more needed */ - } - else - { - p->fts_info = fts_stat(sp, p, false); - if (S_ISDIR(p->fts_statp->st_mode) - && p->fts_level != FTS_ROOTLEVEL - && parent->fts_n_dirs_remaining) - parent->fts_n_dirs_remaining--; - } - } - else - fts_assert (p->fts_statp->st_size == FTS_NO_STAT_REQUIRED); - } - - if (p->fts_info == FTS_D) - { - /* Now that P->fts_statp is guaranteed to be valid, - if this is a command-line directory, record its - device number, to be used for FTS_XDEV. */ - if (p->fts_level == FTS_ROOTLEVEL) - sp->fts_dev = p->fts_statp->st_dev; - Dprintf ((" entering: %s\n", p->fts_path)); - if (! enter_dir (sp, p)) - { - __set_errno (ENOMEM); - return NULL; - } - } - return p; - } - - /* Move up to the parent node. */ - p = tmp->fts_parent; - sp->fts_cur = p; - free(tmp); - - if (p->fts_level == FTS_ROOTPARENTLEVEL) { - /* - * Done; free everything up and set errno to 0 so the user - * can distinguish between error and EOF. - */ - free(p); - __set_errno (0); - return (sp->fts_cur = NULL); - } - - fts_assert (p->fts_info != FTS_NSOK); - - /* NUL terminate the file name. */ - sp->fts_path[p->fts_pathlen] = '\0'; - - /* - * Return to the parent directory. If at a root node, restore - * the initial working directory. If we came through a symlink, - * go back through the file descriptor. Otherwise, move up - * one level, via "..". - */ - if (p->fts_level == FTS_ROOTLEVEL) { - if (RESTORE_INITIAL_CWD(sp)) { - p->fts_errno = errno; - SET(FTS_STOP); - } - } else if (p->fts_flags & FTS_SYMFOLLOW) { - if (FCHDIR(sp, p->fts_symfd)) { - int saved_errno = errno; - (void)close(p->fts_symfd); - __set_errno (saved_errno); - p->fts_errno = errno; - SET(FTS_STOP); - } - (void)close(p->fts_symfd); - } else if (!(p->fts_flags & FTS_DONTCHDIR) && - fts_safe_changedir(sp, p->fts_parent, -1, "..")) { - p->fts_errno = errno; - SET(FTS_STOP); - } - p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; - if (p->fts_errno == 0) - LEAVE_DIR (sp, p, "3"); - return ISSET(FTS_STOP) ? NULL : p; -} - -/* - * Fts_set takes the stream as an argument although it's not used in this - * implementation; it would be necessary if anyone wanted to add global - * semantics to fts using fts_set. An error return is allowed for similar - * reasons. - */ -/* ARGSUSED */ -int -fts_set(FTS *sp _GL_UNUSED, FTSENT *p, int instr) -{ - if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && - instr != FTS_NOINSTR && instr != FTS_SKIP) { - __set_errno (EINVAL); - return (1); - } - p->fts_instr = instr; - return (0); -} - -FTSENT * -fts_children (register FTS *sp, int instr) -{ - register FTSENT *p; - int fd; - - if (instr != 0 && instr != FTS_NAMEONLY) { - __set_errno (EINVAL); - return (NULL); - } - - /* Set current node pointer. */ - p = sp->fts_cur; - - /* - * Errno set to 0 so user can distinguish empty directory from - * an error. - */ - __set_errno (0); - - /* Fatal errors stop here. */ - if (ISSET(FTS_STOP)) - return (NULL); - - /* Return logical hierarchy of user's arguments. */ - if (p->fts_info == FTS_INIT) - return (p->fts_link); - - /* - * If not a directory being visited in pre-order, stop here. Could - * allow FTS_DNR, assuming the user has fixed the problem, but the - * same effect is available with FTS_AGAIN. - */ - if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */) - return (NULL); - - /* Free up any previous child list. */ - if (sp->fts_child != NULL) - fts_lfree(sp->fts_child); - - if (instr == FTS_NAMEONLY) { - SET(FTS_NAMEONLY); - instr = BNAMES; - } else - instr = BCHILD; - - /* - * If using chdir on a relative file name and called BEFORE fts_read - * does its chdir to the root of a traversal, we can lose -- we need to - * chdir into the subdirectory, and we don't know where the current - * directory is, so we can't get back so that the upcoming chdir by - * fts_read will work. - */ - if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' || - ISSET(FTS_NOCHDIR)) - return (sp->fts_child = fts_build(sp, instr)); - - if ((fd = diropen (sp, ".")) < 0) - return (sp->fts_child = NULL); - sp->fts_child = fts_build(sp, instr); - if (ISSET(FTS_CWDFD)) - { - cwd_advance_fd (sp, fd, true); - } - else - { - if (fchdir(fd)) - { - int saved_errno = errno; - close (fd); - __set_errno (saved_errno); - return NULL; - } - close (fd); - } - return (sp->fts_child); -} - -/* A comparison function to sort on increasing inode number. - For some file system types, sorting either way makes a huge - performance difference for a directory with very many entries, - but sorting on increasing values is slightly better than sorting - on decreasing values. The difference is in the 5% range. */ -static int -fts_compare_ino (struct _ftsent const **a, struct _ftsent const **b) -{ - return (a[0]->fts_statp->st_ino < b[0]->fts_statp->st_ino ? -1 - : b[0]->fts_statp->st_ino < a[0]->fts_statp->st_ino ? 1 : 0); -} - -/* Map the dirent.d_type value, DTYPE, to the corresponding stat.st_mode - S_IF* bit and set ST.st_mode, thus clearing all other bits in that field. */ -static void -set_stat_type (struct stat *st, unsigned int dtype) -{ - mode_t type; - switch (dtype) - { - case DT_BLK: - type = S_IFBLK; - break; - case DT_CHR: - type = S_IFCHR; - break; - case DT_DIR: - type = S_IFDIR; - break; - case DT_FIFO: - type = S_IFIFO; - break; - case DT_LNK: - type = S_IFLNK; - break; - case DT_REG: - type = S_IFREG; - break; - case DT_SOCK: - type = S_IFSOCK; - break; - default: - type = 0; - } - st->st_mode = type; -} - -/* - * This is the tricky part -- do not casually change *anything* in here. The - * idea is to build the linked list of entries that are used by fts_children - * and fts_read. There are lots of special cases. - * - * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is - * set and it's a physical walk (so that symbolic links can't be directories), - * we can do things quickly. First, if it's a 4.4BSD file system, the type - * of the file is in the directory entry. Otherwise, we assume that the number - * of subdirectories in a node is equal to the number of links to the parent. - * The former skips all stat calls. The latter skips stat calls in any leaf - * directories and for any files after the subdirectories in the directory have - * been found, cutting the stat calls by about 2/3. - */ -static FTSENT * -internal_function -fts_build (register FTS *sp, int type) -{ - register struct dirent *dp; - register FTSENT *p, *head; - register size_t nitems; - FTSENT *cur, *tail; - DIR *dirp; - void *oldaddr; - int saved_errno; - bool descend; - bool doadjust; - ptrdiff_t level; - nlink_t nlinks; - bool nostat; - size_t len, maxlen, new_len; - char *cp; - int dir_fd; - - /* Set current node pointer. */ - cur = sp->fts_cur; - - /* - * Open the directory for reading. If this fails, we're done. - * If being called from fts_read, set the fts_info field. - */ -#if defined FTS_WHITEOUT && 0 - if (ISSET(FTS_WHITEOUT)) - oflag = DTF_NODUP|DTF_REWIND; - else - oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND; -#else -# define __opendir2(file, flag) \ - opendirat((! ISSET(FTS_NOCHDIR) && ISSET(FTS_CWDFD) \ - ? sp->fts_cwd_fd : AT_FDCWD), \ - file, \ - ((ISSET(FTS_PHYSICAL) \ - && ! (ISSET(FTS_COMFOLLOW) \ - && cur->fts_level == FTS_ROOTLEVEL)) \ - ? O_NOFOLLOW : 0), \ - &dir_fd) -#endif - if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) { - if (type == BREAD) { - cur->fts_info = FTS_DNR; - cur->fts_errno = errno; - } - return (NULL); - } - /* Rather than calling fts_stat for each and every entry encountered - in the readdir loop (below), stat each directory only right after - opening it. */ - if (cur->fts_info == FTS_NSOK) - cur->fts_info = fts_stat(sp, cur, false); - else if (sp->fts_options & FTS_TIGHT_CYCLE_CHECK) { - /* Now read the stat info again after opening a directory to - * reveal eventual changes caused by a submount triggered by - * the traversal. But do it only for utilities which use - * FTS_TIGHT_CYCLE_CHECK. Therefore, only find and du - * benefit/suffer from this feature for now. - */ - LEAVE_DIR (sp, cur, "4"); - fts_stat (sp, cur, false); - if (! enter_dir (sp, cur)) { - __set_errno (ENOMEM); - return NULL; - } - } - - /* - * Nlinks is the number of possible entries of type directory in the - * directory if we're cheating on stat calls, 0 if we're not doing - * any stat calls at all, (nlink_t) -1 if we're statting everything. - */ - if (type == BNAMES) { - nlinks = 0; - /* Be quiet about nostat, GCC. */ - nostat = false; - } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { - nlinks = (cur->fts_statp->st_nlink - - (ISSET(FTS_SEEDOT) ? 0 : 2)); - nostat = true; - } else { - nlinks = -1; - nostat = false; - } - - /* - * If we're going to need to stat anything or we want to descend - * and stay in the directory, chdir. If this fails we keep going, - * but set a flag so we don't chdir after the post-order visit. - * We won't be able to stat anything, but we can still return the - * names themselves. Note, that since fts_read won't be able to - * chdir into the directory, it will have to return different file - * names than before, i.e. "a/b" instead of "b". Since the node - * has already been visited in pre-order, have to wait until the - * post-order visit to return the error. There is a special case - * here, if there was nothing to stat then it's not an error to - * not be able to stat. This is all fairly nasty. If a program - * needed sorted entries or stat information, they had better be - * checking FTS_NS on the returned nodes. - */ - if (nlinks || type == BREAD) { - if (ISSET(FTS_CWDFD)) - { - dir_fd = dup (dir_fd); - if (0 <= dir_fd) - set_cloexec_flag (dir_fd, true); - } - if (dir_fd < 0 || fts_safe_changedir(sp, cur, dir_fd, NULL)) { - if (nlinks && type == BREAD) - cur->fts_errno = errno; - cur->fts_flags |= FTS_DONTCHDIR; - descend = false; - closedir(dirp); - if (ISSET(FTS_CWDFD) && 0 <= dir_fd) - close (dir_fd); - dirp = NULL; - } else - descend = true; - } else - descend = false; - - /* - * Figure out the max file name length that can be stored in the - * current buffer -- the inner loop allocates more space as necessary. - * We really wouldn't have to do the maxlen calculations here, we - * could do them in fts_read before returning the name, but it's a - * lot easier here since the length is part of the dirent structure. - * - * If not changing directories set a pointer so that can just append - * each new component into the file name. - */ - len = NAPPEND(cur); - if (ISSET(FTS_NOCHDIR)) { - cp = sp->fts_path + len; - *cp++ = '/'; - } else { - /* GCC, you're too verbose. */ - cp = NULL; - } - len++; - maxlen = sp->fts_pathlen - len; - - level = cur->fts_level + 1; - - /* Read the directory, attaching each entry to the `link' pointer. */ - doadjust = false; - for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) { - bool is_dir; - - if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) - continue; - - if ((p = fts_alloc (sp, dp->d_name, - _D_EXACT_NAMLEN (dp))) == NULL) - goto mem1; - if (_D_EXACT_NAMLEN (dp) >= maxlen) { - /* include space for NUL */ - oldaddr = sp->fts_path; - if (! fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) { - /* - * No more memory. Save - * errno, free up the current structure and the - * structures already allocated. - */ -mem1: saved_errno = errno; - free(p); - fts_lfree(head); - closedir(dirp); - cur->fts_info = FTS_ERR; - SET(FTS_STOP); - __set_errno (saved_errno); - return (NULL); - } - /* Did realloc() change the pointer? */ - if (oldaddr != sp->fts_path) { - doadjust = true; - if (ISSET(FTS_NOCHDIR)) - cp = sp->fts_path + len; - } - maxlen = sp->fts_pathlen - len; - } - - new_len = len + _D_EXACT_NAMLEN (dp); - if (new_len < len) { - /* - * In the unlikely event that we would end up - * with a file name longer than SIZE_MAX, free up - * the current structure and the structures already - * allocated, then error out with ENAMETOOLONG. - */ - free(p); - fts_lfree(head); - closedir(dirp); - cur->fts_info = FTS_ERR; - SET(FTS_STOP); - __set_errno (ENAMETOOLONG); - return (NULL); - } - p->fts_level = level; - p->fts_parent = sp->fts_cur; - p->fts_pathlen = new_len; - -#if defined FTS_WHITEOUT && 0 - if (dp->d_type == DT_WHT) - p->fts_flags |= FTS_ISW; -#endif - /* Store dirent.d_ino, in case we need to sort - entries before processing them. */ - p->fts_statp->st_ino = D_INO (dp); - - /* Build a file name for fts_stat to stat. */ - if (ISSET(FTS_NOCHDIR)) { - p->fts_accpath = p->fts_path; - memmove(cp, p->fts_name, p->fts_namelen + 1); - } else - p->fts_accpath = p->fts_name; - - if (sp->fts_compar == NULL || ISSET(FTS_DEFER_STAT)) { - /* Record what fts_read will have to do with this - entry. In many cases, it will simply fts_stat it, - but we can take advantage of any d_type information - to optimize away the unnecessary stat calls. I.e., - if FTS_NOSTAT is in effect and we're not following - symlinks (FTS_PHYSICAL) and d_type indicates this - is *not* a directory, then we won't have to stat it - at all. If it *is* a directory, then (currently) - we stat it regardless, in order to get device and - inode numbers. Some day we might optimize that - away, too, for directories where d_ino is known to - be valid. */ - bool skip_stat = (ISSET(FTS_PHYSICAL) - && ISSET(FTS_NOSTAT) - && DT_IS_KNOWN(dp) - && ! DT_MUST_BE(dp, DT_DIR)); - p->fts_info = FTS_NSOK; - /* Propagate dirent.d_type information back - to caller, when possible. */ - set_stat_type (p->fts_statp, D_TYPE (dp)); - fts_set_stat_required(p, !skip_stat); - is_dir = (ISSET(FTS_PHYSICAL) - && DT_MUST_BE(dp, DT_DIR)); - } else { - p->fts_info = fts_stat(sp, p, false); - is_dir = (p->fts_info == FTS_D - || p->fts_info == FTS_DC - || p->fts_info == FTS_DOT); - } - - /* Decrement link count if applicable. */ - if (nlinks > 0 && is_dir) - nlinks -= nostat; - - /* We walk in directory order so "ls -f" doesn't get upset. */ - p->fts_link = NULL; - if (head == NULL) - head = tail = p; - else { - tail->fts_link = p; - tail = p; - } - ++nitems; - } - if (dirp) - closedir(dirp); - - /* - * If realloc() changed the address of the file name, adjust the - * addresses for the rest of the tree and the dir list. - */ - if (doadjust) - fts_padjust(sp, head); - - /* - * If not changing directories, reset the file name back to original - * state. - */ - if (ISSET(FTS_NOCHDIR)) { - if (len == sp->fts_pathlen || nitems == 0) - --cp; - *cp = '\0'; - } - - /* - * If descended after called from fts_children or after called from - * fts_read and nothing found, get back. At the root level we use - * the saved fd; if one of fts_open()'s arguments is a relative name - * to an empty directory, we wind up here with no other way back. If - * can't get back, we're done. - */ - if (descend && (type == BCHILD || !nitems) && - (cur->fts_level == FTS_ROOTLEVEL - ? RESTORE_INITIAL_CWD(sp) - : fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) { - cur->fts_info = FTS_ERR; - SET(FTS_STOP); - fts_lfree(head); - return (NULL); - } - - /* If didn't find anything, return NULL. */ - if (!nitems) { - if (type == BREAD) - cur->fts_info = FTS_DP; - fts_lfree(head); - return (NULL); - } - - /* If there are many entries, no sorting function has been specified, - and this file system is of a type that may be slow with a large - number of entries, then sort the directory entries on increasing - inode numbers. */ - if (nitems > _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD - && !sp->fts_compar - && ISSET (FTS_CWDFD) - && dirent_inode_sort_may_be_useful (sp->fts_cwd_fd)) { - sp->fts_compar = fts_compare_ino; - head = fts_sort (sp, head, nitems); - sp->fts_compar = NULL; - } - - /* Sort the entries. */ - if (sp->fts_compar && nitems > 1) - head = fts_sort(sp, head, nitems); - return (head); -} - -#if FTS_DEBUG - -/* Walk ->fts_parent links starting at E_CURR, until the root of the - current hierarchy. There should be a directory with dev/inode - matching those of AD. If not, print a lot of diagnostics. */ -static void -find_matching_ancestor (FTSENT const *e_curr, struct Active_dir const *ad) -{ - FTSENT const *ent; - for (ent = e_curr; ent->fts_level >= FTS_ROOTLEVEL; ent = ent->fts_parent) - { - if (ad->ino == ent->fts_statp->st_ino - && ad->dev == ent->fts_statp->st_dev) - return; - } - printf ("ERROR: tree dir, %s, not active\n", ad->fts_ent->fts_accpath); - printf ("active dirs:\n"); - for (ent = e_curr; - ent->fts_level >= FTS_ROOTLEVEL; ent = ent->fts_parent) - printf (" %s(%"PRIuMAX"/%"PRIuMAX") to %s(%"PRIuMAX"/%"PRIuMAX")...\n", - ad->fts_ent->fts_accpath, - (uintmax_t) ad->dev, - (uintmax_t) ad->ino, - ent->fts_accpath, - (uintmax_t) ent->fts_statp->st_dev, - (uintmax_t) ent->fts_statp->st_ino); -} - -void -fts_cross_check (FTS const *sp) -{ - FTSENT const *ent = sp->fts_cur; - FTSENT const *t; - if ( ! ISSET (FTS_TIGHT_CYCLE_CHECK)) - return; - - Dprintf (("fts-cross-check cur=%s\n", ent->fts_path)); - /* Make sure every parent dir is in the tree. */ - for (t = ent->fts_parent; t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent) - { - struct Active_dir ad; - ad.ino = t->fts_statp->st_ino; - ad.dev = t->fts_statp->st_dev; - if ( ! hash_lookup (sp->fts_cycle.ht, &ad)) - printf ("ERROR: active dir, %s, not in tree\n", t->fts_path); - } - - /* Make sure every dir in the tree is an active dir. - But ENT is not necessarily a directory. If so, just skip this part. */ - if (ent->fts_parent->fts_level >= FTS_ROOTLEVEL - && (ent->fts_info == FTS_DP - || ent->fts_info == FTS_D)) - { - struct Active_dir *ad; - for (ad = hash_get_first (sp->fts_cycle.ht); ad != NULL; - ad = hash_get_next (sp->fts_cycle.ht, ad)) - { - find_matching_ancestor (ent, ad); - } - } -} - -static bool -same_fd (int fd1, int fd2) -{ - struct stat sb1, sb2; - return (fstat (fd1, &sb1) == 0 - && fstat (fd2, &sb2) == 0 - && SAME_INODE (sb1, sb2)); -} - -static void -fd_ring_print (FTS const *sp, FILE *stream, char const *msg) -{ - I_ring const *fd_ring = &sp->fts_fd_ring; - unsigned int i = fd_ring->fts_front; - char *cwd = getcwdat (sp->fts_cwd_fd, NULL, 0); - fprintf (stream, "=== %s ========== %s\n", msg, cwd); - free (cwd); - if (i_ring_empty (fd_ring)) - return; - - while (true) - { - int fd = fd_ring->fts_fd_ring[i]; - if (fd < 0) - fprintf (stream, "%d: %d:\n", i, fd); - else - { - char *wd = getcwdat (fd, NULL, 0); - fprintf (stream, "%d: %d: %s\n", i, fd, wd); - free (wd); - } - if (i == fd_ring->fts_back) - break; - i = (i + I_RING_SIZE - 1) % I_RING_SIZE; - } -} - -/* Ensure that each file descriptor on the fd_ring matches a - parent, grandparent, etc. of the current working directory. */ -static void -fd_ring_check (FTS const *sp) -{ - if (!fts_debug) - return; - - /* Make a writable copy. */ - I_ring fd_w = sp->fts_fd_ring; - - int cwd_fd = sp->fts_cwd_fd; - cwd_fd = dup (cwd_fd); - char *dot = getcwdat (cwd_fd, NULL, 0); - error (0, 0, "===== check ===== cwd: %s", dot); - free (dot); - while ( ! i_ring_empty (&fd_w)) - { - int fd = i_ring_pop (&fd_w); - if (0 <= fd) - { - int parent_fd = openat (cwd_fd, "..", O_SEARCH); - if (parent_fd < 0) - { - // Warn? - break; - } - if (!same_fd (fd, parent_fd)) - { - char *cwd = getcwdat (fd, NULL, 0); - error (0, errno, "ring : %s", cwd); - char *c2 = getcwdat (parent_fd, NULL, 0); - error (0, errno, "parent: %s", c2); - free (cwd); - free (c2); - fts_assert (0); - } - close (cwd_fd); - cwd_fd = parent_fd; - } - } - close (cwd_fd); -} -#endif - -static unsigned short int -internal_function -fts_stat(FTS *sp, register FTSENT *p, bool follow) -{ - struct stat *sbp = p->fts_statp; - int saved_errno; - - if (p->fts_level == FTS_ROOTLEVEL && ISSET(FTS_COMFOLLOW)) - follow = true; - -#if defined FTS_WHITEOUT && 0 - /* check for whiteout */ - if (p->fts_flags & FTS_ISW) { - memset(sbp, '\0', sizeof (*sbp)); - sbp->st_mode = S_IFWHT; - return (FTS_W); - } -#endif - - /* - * If doing a logical walk, or application requested FTS_FOLLOW, do - * a stat(2). If that fails, check for a non-existent symlink. If - * fail, set the errno from the stat call. - */ - if (ISSET(FTS_LOGICAL) || follow) { - if (stat(p->fts_accpath, sbp)) { - saved_errno = errno; - if (errno == ENOENT - && lstat(p->fts_accpath, sbp) == 0) { - __set_errno (0); - return (FTS_SLNONE); - } - p->fts_errno = saved_errno; - goto err; - } - } else if (fstatat(sp->fts_cwd_fd, p->fts_accpath, sbp, - AT_SYMLINK_NOFOLLOW)) { - p->fts_errno = errno; -err: memset(sbp, 0, sizeof(struct stat)); - return (FTS_NS); - } - - if (S_ISDIR(sbp->st_mode)) { - p->fts_n_dirs_remaining = (sbp->st_nlink - - (ISSET(FTS_SEEDOT) ? 0 : 2)); - if (ISDOT(p->fts_name)) { - /* Command-line "." and ".." are real directories. */ - return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : FTS_DOT); - } - - return (FTS_D); - } - if (S_ISLNK(sbp->st_mode)) - return (FTS_SL); - if (S_ISREG(sbp->st_mode)) - return (FTS_F); - return (FTS_DEFAULT); -} - -static int -fts_compar (void const *a, void const *b) -{ - /* Convert A and B to the correct types, to pacify the compiler, and - for portability to bizarre hosts where "void const *" and "FTSENT - const **" differ in runtime representation. The comparison - function cannot modify *a and *b, but there is no compile-time - check for this. */ - FTSENT const **pa = (FTSENT const **) a; - FTSENT const **pb = (FTSENT const **) b; - return pa[0]->fts_fts->fts_compar (pa, pb); -} - -static FTSENT * -internal_function -fts_sort (FTS *sp, FTSENT *head, register size_t nitems) -{ - register FTSENT **ap, *p; - - /* On most modern hosts, void * and FTSENT ** have the same - run-time representation, and one can convert sp->fts_compar to - the type qsort expects without problem. Use the heuristic that - this is OK if the two pointer types are the same size, and if - converting FTSENT ** to long int is the same as converting - FTSENT ** to void * and then to long int. This heuristic isn't - valid in general but we don't know of any counterexamples. */ - FTSENT *dummy; - int (*compare) (void const *, void const *) = - ((sizeof &dummy == sizeof (void *) - && (long int) &dummy == (long int) (void *) &dummy) - ? (int (*) (void const *, void const *)) sp->fts_compar - : fts_compar); - - /* - * Construct an array of pointers to the structures and call qsort(3). - * Reassemble the array in the order returned by qsort. If unable to - * sort for memory reasons, return the directory entries in their - * current order. Allocate enough space for the current needs plus - * 40 so don't realloc one entry at a time. - */ - if (nitems > sp->fts_nitems) { - FTSENT **a; - - sp->fts_nitems = nitems + 40; - if (SIZE_MAX / sizeof *a < sp->fts_nitems - || ! (a = realloc (sp->fts_array, - sp->fts_nitems * sizeof *a))) { - free(sp->fts_array); - sp->fts_array = NULL; - sp->fts_nitems = 0; - return (head); - } - sp->fts_array = a; - } - for (ap = sp->fts_array, p = head; p; p = p->fts_link) - *ap++ = p; - qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), compare); - for (head = *(ap = sp->fts_array); --nitems; ++ap) - ap[0]->fts_link = ap[1]; - ap[0]->fts_link = NULL; - return (head); -} - -static FTSENT * -internal_function -fts_alloc (FTS *sp, const char *name, register size_t namelen) -{ - register FTSENT *p; - size_t len; - - /* - * The file name is a variable length array. Allocate the FTSENT - * structure and the file name in one chunk. - */ - len = sizeof(FTSENT) + namelen; - if ((p = malloc(len)) == NULL) - return (NULL); - - /* Copy the name and guarantee NUL termination. */ - memmove(p->fts_name, name, namelen); - p->fts_name[namelen] = '\0'; - - p->fts_namelen = namelen; - p->fts_fts = sp; - p->fts_path = sp->fts_path; - p->fts_errno = 0; - p->fts_flags = 0; - p->fts_instr = FTS_NOINSTR; - p->fts_number = 0; - p->fts_pointer = NULL; - return (p); -} - -static void -internal_function -fts_lfree (register FTSENT *head) -{ - register FTSENT *p; - - /* Free a linked list of structures. */ - while ((p = head)) { - head = head->fts_link; - free(p); - } -} - -/* - * Allow essentially unlimited file name lengths; find, rm, ls should - * all work on any tree. Most systems will allow creation of file - * names much longer than MAXPATHLEN, even though the kernel won't - * resolve them. Add the size (not just what's needed) plus 256 bytes - * so don't realloc the file name 2 bytes at a time. - */ -static bool -internal_function -fts_palloc (FTS *sp, size_t more) -{ - char *p; - size_t new_len = sp->fts_pathlen + more + 256; - - /* - * See if fts_pathlen would overflow. - */ - if (new_len < sp->fts_pathlen) { - free(sp->fts_path); - sp->fts_path = NULL; - __set_errno (ENAMETOOLONG); - return false; - } - sp->fts_pathlen = new_len; - p = realloc(sp->fts_path, sp->fts_pathlen); - if (p == NULL) { - free(sp->fts_path); - sp->fts_path = NULL; - return false; - } - sp->fts_path = p; - return true; -} - -/* - * When the file name is realloc'd, have to fix all of the pointers in - * structures already returned. - */ -static void -internal_function -fts_padjust (FTS *sp, FTSENT *head) -{ - FTSENT *p; - char *addr = sp->fts_path; - -#define ADJUST(p) do { \ - if ((p)->fts_accpath != (p)->fts_name) { \ - (p)->fts_accpath = \ - (char *)addr + ((p)->fts_accpath - (p)->fts_path); \ - } \ - (p)->fts_path = addr; \ -} while (0) - /* Adjust the current set of children. */ - for (p = sp->fts_child; p; p = p->fts_link) - ADJUST(p); - - /* Adjust the rest of the tree, including the current level. */ - for (p = head; p->fts_level >= FTS_ROOTLEVEL;) { - ADJUST(p); - p = p->fts_link ? p->fts_link : p->fts_parent; - } -} - -static size_t -internal_function -fts_maxarglen (char * const *argv) -{ - size_t len, max; - - for (max = 0; *argv; ++argv) - if ((len = strlen(*argv)) > max) - max = len; - return (max + 1); -} - -/* - * Change to dir specified by fd or file name without getting - * tricked by someone changing the world out from underneath us. - * Assumes p->fts_statp->st_dev and p->fts_statp->st_ino are filled in. - * If FD is non-negative, expect it to be used after this function returns, - * and to be closed eventually. So don't pass e.g., `dirfd(dirp)' and then - * do closedir(dirp), because that would invalidate the saved FD. - * Upon failure, close FD immediately and return nonzero. - */ -static int -internal_function -fts_safe_changedir (FTS *sp, FTSENT *p, int fd, char const *dir) -{ - int ret; - bool is_dotdot = dir && STREQ (dir, ".."); - int newfd; - - /* This clause handles the unusual case in which FTS_NOCHDIR - is specified, along with FTS_CWDFD. In that case, there is - no need to change even the virtual cwd file descriptor. - However, if FD is non-negative, we do close it here. */ - if (ISSET (FTS_NOCHDIR)) - { - if (ISSET (FTS_CWDFD) && 0 <= fd) - close (fd); - return 0; - } - - if (fd < 0 && is_dotdot && ISSET (FTS_CWDFD)) - { - /* When possible, skip the diropen and subsequent fstat+dev/ino - comparison. I.e., when changing to parent directory - (chdir ("..")), use a file descriptor from the ring and - save the overhead of diropen+fstat, as well as avoiding - failure when we lack "x" access to the virtual cwd. */ - if ( ! i_ring_empty (&sp->fts_fd_ring)) - { - int parent_fd; - fd_ring_print (sp, stderr, "pre-pop"); - parent_fd = i_ring_pop (&sp->fts_fd_ring); - is_dotdot = true; - if (0 <= parent_fd) - { - fd = parent_fd; - dir = NULL; - } - } - } - - newfd = fd; - if (fd < 0 && (newfd = diropen (sp, dir)) < 0) - return -1; - - /* The following dev/inode check is necessary if we're doing a - `logical' traversal (through symlinks, a la chown -L), if the - system lacks O_NOFOLLOW support, or if we're changing to ".." - (but not via a popped file descriptor). When changing to the - name "..", O_NOFOLLOW can't help. In general, when the target is - not "..", diropen's use of O_NOFOLLOW ensures we don't mistakenly - follow a symlink, so we can avoid the expense of this fstat. */ - if (ISSET(FTS_LOGICAL) || ! HAVE_WORKING_O_NOFOLLOW - || (dir && STREQ (dir, ".."))) - { - struct stat sb; - if (fstat(newfd, &sb)) - { - ret = -1; - goto bail; - } - if (p->fts_statp->st_dev != sb.st_dev - || p->fts_statp->st_ino != sb.st_ino) - { - __set_errno (ENOENT); /* disinformation */ - ret = -1; - goto bail; - } - } - - if (ISSET(FTS_CWDFD)) - { - cwd_advance_fd (sp, newfd, ! is_dotdot); - return 0; - } - - ret = fchdir(newfd); -bail: - if (fd < 0) - { - int oerrno = errno; - (void)close(newfd); - __set_errno (oerrno); - } - return ret; -} diff --git a/gnulib/lib/fts_.h b/gnulib/lib/fts_.h deleted file mode 100644 index 6a22bec..0000000 --- a/gnulib/lib/fts_.h +++ /dev/null @@ -1,266 +0,0 @@ -/* Traverse a file hierarchy. - - Copyright (C) 2004-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)fts.h 8.3 (Berkeley) 8/14/94 - */ - -#ifndef _FTS_H -# define _FTS_H 1 - -# ifdef _LIBC -# include -# else -# undef __THROW -# define __THROW -# undef __BEGIN_DECLS -# undef __END_DECLS -# ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -# else -# define __BEGIN_DECLS -# define __END_DECLS -# endif -# endif - -# include -# include -# include -# include "i-ring.h" - -typedef struct { - struct _ftsent *fts_cur; /* current node */ - struct _ftsent *fts_child; /* linked list of children */ - struct _ftsent **fts_array; /* sort array */ - dev_t fts_dev; /* starting device # */ - char *fts_path; /* file name for this descent */ - int fts_rfd; /* fd for root */ - int fts_cwd_fd; /* the file descriptor on which the - virtual cwd is open, or AT_FDCWD */ - size_t fts_pathlen; /* sizeof(path) */ - size_t fts_nitems; /* elements in the sort array */ - int (*fts_compar) (struct _ftsent const **, struct _ftsent const **); - /* compare fn */ - -# define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ -# define FTS_LOGICAL 0x0002 /* logical walk */ -# define FTS_NOCHDIR 0x0004 /* don't change directories */ -# define FTS_NOSTAT 0x0008 /* don't get stat info */ -# define FTS_PHYSICAL 0x0010 /* physical walk */ -# define FTS_SEEDOT 0x0020 /* return dot and dot-dot */ -# define FTS_XDEV 0x0040 /* don't cross devices */ -# define FTS_WHITEOUT 0x0080 /* return whiteout information */ - - /* There are two ways to detect cycles. - The lazy way (which works only with FTS_PHYSICAL), - with which one may process a directory that is a - part of the cycle several times before detecting the cycle. - The `tight' way, whereby fts uses more memory (proportional - to number of `active' directories, aka distance from root - of current tree to current directory -- see active_dir_ht) - to detect any cycle right away. For example, du must use - this option to avoid counting disk space in a cycle multiple - times, but chown -R need not. - The default is to use the constant-memory lazy way, when possible - (see below). - - However, with FTS_LOGICAL (when following symlinks, e.g., chown -L) - using lazy cycle detection is inadequate. For example, traversing - a directory containing a symbolic link to a peer directory, it is - possible to encounter the same directory twice even though there - is no cycle: - dir - ... - slink -> dir - So, when FTS_LOGICAL is selected, we have to use a different - mode of cycle detection: FTS_TIGHT_CYCLE_CHECK. */ -# define FTS_TIGHT_CYCLE_CHECK 0x0100 - - /* Use this flag to enable semantics with which the parent - application may be made both more efficient and more robust. - Whereas the default is to visit each directory in a recursive - traversal (via chdir), using this flag makes it so the initial - working directory is never changed. Instead, these functions - perform the traversal via a virtual working directory, maintained - through the file descriptor member, fts_cwd_fd. */ -# define FTS_CWDFD 0x0200 - - /* Historically, for each directory that fts initially encounters, it would - open it, read all entries, and stat each entry, storing the results, and - then it would process the first entry. But that behavior is bad for - locality of reference, and also causes trouble with inode-simulating - file systems like FAT, CIFS, FUSE-based ones, etc., when entries from - their name/inode cache are flushed too early. - Use this flag to make fts_open and fts_read defer the stat/lstat/fststat - of each entry until it is actually processed. However, note that if you - use this option and also specify a comparison function, that function may - not examine any data via fts_statp. However, when fts_statp->st_mode is - nonzero, the S_IFMT type bits are valid, with mapped dirent.d_type data. - Of course, that happens only on file systems that provide useful - dirent.d_type data. */ -# define FTS_DEFER_STAT 0x0400 - -# define FTS_OPTIONMASK 0x07ff /* valid user option mask */ - -# define FTS_NAMEONLY 0x1000 /* (private) child names only */ -# define FTS_STOP 0x2000 /* (private) unrecoverable error */ - int fts_options; /* fts_open options, global flags */ - - /* Map a directory's device number to a boolean. The boolean is - true if for that file system (type determined by a single fstatfs - call per FS) st_nlink can be used to calculate the number of - sub-directory entries in a directory. - Using this table is an optimization that permits us to look up - file system type on a per-inode basis at the minimal cost of - calling fstatfs only once per traversed device. */ - struct hash_table *fts_leaf_optimization_works_ht; - - union { - /* This data structure is used if FTS_TIGHT_CYCLE_CHECK is - specified. It records the directories between a starting - point and the current directory. I.e., a directory is - recorded here IFF we have visited it once, but we have not - yet completed processing of all its entries. Every time we - visit a new directory, we add that directory to this set. - When we finish with a directory (usually by visiting it a - second time), we remove it from this set. Each entry in - this data structure is a device/inode pair. This data - structure is used to detect directory cycles efficiently and - promptly even when the depth of a hierarchy is in the tens - of thousands. */ - struct hash_table *ht; - - /* FIXME: rename these two members to have the fts_ prefix */ - /* This data structure uses a lazy cycle-detection algorithm, - as done by rm via cycle-check.c. It's the default, - but it's not appropriate for programs like du. */ - struct cycle_check_state *state; - } fts_cycle; - - /* A stack of the file descriptors corresponding to the - most-recently traversed parent directories. - Currently used only in FTS_CWDFD mode. */ - I_ring fts_fd_ring; -} FTS; - -typedef struct _ftsent { - struct _ftsent *fts_cycle; /* cycle node */ - struct _ftsent *fts_parent; /* parent directory */ - struct _ftsent *fts_link; /* next file in directory */ - long fts_number; /* local numeric value */ - void *fts_pointer; /* local address value */ - char *fts_accpath; /* access file name */ - char *fts_path; /* root name; == fts_fts->fts_path */ - int fts_errno; /* errno for this node */ - int fts_symfd; /* fd for symlink */ - size_t fts_pathlen; /* strlen(fts_path) */ - - FTS *fts_fts; /* the file hierarchy itself */ - -# define FTS_ROOTPARENTLEVEL (-1) -# define FTS_ROOTLEVEL 0 - ptrdiff_t fts_level; /* depth (-1 to N) */ - - size_t fts_namelen; /* strlen(fts_name) */ - nlink_t fts_n_dirs_remaining; /* count down from st_nlink */ - -# define FTS_D 1 /* preorder directory */ -# define FTS_DC 2 /* directory that causes cycles */ -# define FTS_DEFAULT 3 /* none of the above */ -# define FTS_DNR 4 /* unreadable directory */ -# define FTS_DOT 5 /* dot or dot-dot */ -# define FTS_DP 6 /* postorder directory */ -# define FTS_ERR 7 /* error; errno is set */ -# define FTS_F 8 /* regular file */ -# define FTS_INIT 9 /* initialized only */ -# define FTS_NS 10 /* stat(2) failed */ -# define FTS_NSOK 11 /* no stat(2) requested */ -# define FTS_SL 12 /* symbolic link */ -# define FTS_SLNONE 13 /* symbolic link without target */ -# define FTS_W 14 /* whiteout object */ - unsigned short int fts_info; /* user flags for FTSENT structure */ - -# define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ -# define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ - unsigned short int fts_flags; /* private flags for FTSENT structure */ - -# define FTS_AGAIN 1 /* read node again */ -# define FTS_FOLLOW 2 /* follow symbolic link */ -# define FTS_NOINSTR 3 /* no instructions */ -# define FTS_SKIP 4 /* discard node */ - unsigned short int fts_instr; /* fts_set() instructions */ - - struct stat fts_statp[1]; /* stat(2) information */ - char fts_name[1]; /* file name */ -} FTSENT; - -#ifndef __GNUC_PREREQ -# if defined __GNUC__ && defined __GNUC_MINOR__ -# define __GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -# else -# define __GNUC_PREREQ(maj, min) 0 -# endif -#endif - -#if __GNUC_PREREQ (3,4) -# undef __attribute_warn_unused_result__ -# define __attribute_warn_unused_result__ \ - __attribute__ ((__warn_unused_result__)) -#else -# define __attribute_warn_unused_result__ /* empty */ -#endif - -__BEGIN_DECLS -FTSENT *fts_children (FTS *, int) __THROW __attribute_warn_unused_result__; -int fts_close (FTS *) __THROW __attribute_warn_unused_result__; -FTS *fts_open (char * const *, int, - int (*)(const FTSENT **, const FTSENT **)) - __THROW __attribute_warn_unused_result__; -FTSENT *fts_read (FTS *) __THROW __attribute_warn_unused_result__; -int fts_set (FTS *, FTSENT *, int) __THROW; -__END_DECLS - -#endif /* fts.h */ diff --git a/gnulib/lib/getcwd.c b/gnulib/lib/getcwd.c deleted file mode 100644 index e52af18..0000000 --- a/gnulib/lib/getcwd.c +++ /dev/null @@ -1,438 +0,0 @@ -/* Copyright (C) 1991-1999, 2004-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if !_LIBC -# include -# include -#endif - -#include -#include -#include -#include -#include - -#include /* For AT_FDCWD on Solaris 9. */ - -/* If this host provides the openat function, then enable - code below to make getcwd more efficient and robust. */ -#ifdef HAVE_OPENAT -# define HAVE_OPENAT_SUPPORT 1 -#else -# define HAVE_OPENAT_SUPPORT 0 -#endif - -#ifndef __set_errno -# define __set_errno(val) (errno = (val)) -#endif - -#include -#ifndef _D_EXACT_NAMLEN -# define _D_EXACT_NAMLEN(d) strlen ((d)->d_name) -#endif -#ifndef _D_ALLOC_NAMLEN -# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1) -#endif - -#include -#include -#include - -#if _LIBC -# ifndef mempcpy -# define mempcpy __mempcpy -# endif -#endif - -#include - -#ifndef MAX -# define MAX(a, b) ((a) < (b) ? (b) : (a)) -#endif -#ifndef MIN -# define MIN(a, b) ((a) < (b) ? (a) : (b)) -#endif - -#ifndef PATH_MAX -# ifdef MAXPATHLEN -# define PATH_MAX MAXPATHLEN -# else -# define PATH_MAX 1024 -# endif -#endif - -#if D_INO_IN_DIRENT -# define MATCHING_INO(dp, ino) ((dp)->d_ino == (ino)) -#else -# define MATCHING_INO(dp, ino) true -#endif - -#if !_LIBC -# define __getcwd rpl_getcwd -# define __lstat lstat -# define __closedir closedir -# define __opendir opendir -# define __readdir readdir -#endif - -/* The results of opendir() in this file are not used with dirfd and fchdir, - and we do not leak fds to any single-threaded code that could use stdio, - therefore save some unnecessary recursion in fchdir.c. - FIXME - if the kernel ever adds support for multi-thread safety for - avoiding standard fds, then we should use opendir_safer and - openat_safer. */ -#undef opendir -#undef closedir - -/* Get the name of the current working directory, and put it in SIZE - bytes of BUF. Returns NULL if the directory couldn't be determined or - SIZE was too small. If successful, returns BUF. In GNU, if BUF is - NULL, an array is allocated with `malloc'; the array is SIZE bytes long, - unless SIZE == 0, in which case it is as big as necessary. */ - -char * -__getcwd (char *buf, size_t size) -{ - /* Lengths of big file name components and entire file names, and a - deep level of file name nesting. These numbers are not upper - bounds; they are merely large values suitable for initial - allocations, designed to be large enough for most real-world - uses. */ - enum - { - BIG_FILE_NAME_COMPONENT_LENGTH = 255, - BIG_FILE_NAME_LENGTH = MIN (4095, PATH_MAX - 1), - DEEP_NESTING = 100 - }; - -#if HAVE_OPENAT_SUPPORT - int fd = AT_FDCWD; - bool fd_needs_closing = false; -#else - char dots[DEEP_NESTING * sizeof ".." + BIG_FILE_NAME_COMPONENT_LENGTH + 1]; - char *dotlist = dots; - size_t dotsize = sizeof dots; - size_t dotlen = 0; -#endif - DIR *dirstream = NULL; - dev_t rootdev, thisdev; - ino_t rootino, thisino; - char *dir; - register char *dirp; - struct stat st; - size_t allocated = size; - size_t used; - -#if HAVE_RAW_DECL_GETCWD - /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and - this is much slower than the system getcwd (at least on - GNU/Linux). So trust the system getcwd's results unless they - look suspicious. - - Use the system getcwd even if we have openat support, since the - system getcwd works even when a parent is unreadable, while the - openat-based approach does not. */ - -# undef getcwd - dir = getcwd (buf, size); - if (dir) - return dir; - - /* Solaris getcwd (NULL, 0) fails with errno == EINVAL, but it has - internal magic that lets it work even if an ancestor directory is - inaccessible, which is better in many cases. So in this case try - again with a buffer that's almost always big enough. */ - if (errno == EINVAL && buf == NULL && size == 0) - { - char big_buffer[BIG_FILE_NAME_LENGTH + 1]; - dir = getcwd (big_buffer, sizeof big_buffer); - if (dir) - return strdup (dir); - } - -# if HAVE_PARTLY_WORKING_GETCWD - /* The system getcwd works, except it sometimes fails when it - shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT. */ - if (errno != ERANGE && errno != ENAMETOOLONG && errno != ENOENT) - return NULL; -# endif -#endif - - if (size == 0) - { - if (buf != NULL) - { - __set_errno (EINVAL); - return NULL; - } - - allocated = BIG_FILE_NAME_LENGTH + 1; - } - - if (buf == NULL) - { - dir = malloc (allocated); - if (dir == NULL) - return NULL; - } - else - dir = buf; - - dirp = dir + allocated; - *--dirp = '\0'; - - if (__lstat (".", &st) < 0) - goto lose; - thisdev = st.st_dev; - thisino = st.st_ino; - - if (__lstat ("/", &st) < 0) - goto lose; - rootdev = st.st_dev; - rootino = st.st_ino; - - while (!(thisdev == rootdev && thisino == rootino)) - { - struct dirent *d; - dev_t dotdev; - ino_t dotino; - bool mount_point; - int parent_status; - size_t dirroom; - size_t namlen; - bool use_d_ino = true; - - /* Look at the parent directory. */ -#if HAVE_OPENAT_SUPPORT - fd = openat (fd, "..", O_RDONLY); - if (fd < 0) - goto lose; - fd_needs_closing = true; - parent_status = fstat (fd, &st); -#else - dotlist[dotlen++] = '.'; - dotlist[dotlen++] = '.'; - dotlist[dotlen] = '\0'; - parent_status = __lstat (dotlist, &st); -#endif - if (parent_status != 0) - goto lose; - - if (dirstream && __closedir (dirstream) != 0) - { - dirstream = NULL; - goto lose; - } - - /* Figure out if this directory is a mount point. */ - dotdev = st.st_dev; - dotino = st.st_ino; - mount_point = dotdev != thisdev; - - /* Search for the last directory. */ -#if HAVE_OPENAT_SUPPORT - dirstream = fdopendir (fd); - if (dirstream == NULL) - goto lose; - fd_needs_closing = false; -#else - dirstream = __opendir (dotlist); - if (dirstream == NULL) - goto lose; - dotlist[dotlen++] = '/'; -#endif - for (;;) - { - /* Clear errno to distinguish EOF from error if readdir returns - NULL. */ - __set_errno (0); - d = __readdir (dirstream); - - /* When we've iterated through all directory entries without finding - one with a matching d_ino, rewind the stream and consider each - name again, but this time, using lstat. This is necessary in a - chroot on at least one system (glibc-2.3.6 + linux 2.6.12), where - .., ../.., ../../.., etc. all had the same device number, yet the - d_ino values for entries in / did not match those obtained - via lstat. */ - if (d == NULL && errno == 0 && use_d_ino) - { - use_d_ino = false; - rewinddir (dirstream); - d = __readdir (dirstream); - } - - if (d == NULL) - { - if (errno == 0) - /* EOF on dirstream, which can mean e.g., that the current - directory has been removed. */ - __set_errno (ENOENT); - goto lose; - } - if (d->d_name[0] == '.' && - (d->d_name[1] == '\0' || - (d->d_name[1] == '.' && d->d_name[2] == '\0'))) - continue; - - if (use_d_ino) - { - bool match = (MATCHING_INO (d, thisino) || mount_point); - if (! match) - continue; - } - - { - int entry_status; -#if HAVE_OPENAT_SUPPORT - entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW); -#else - /* Compute size needed for this file name, or for the file - name ".." in the same directory, whichever is larger. - Room for ".." might be needed the next time through - the outer loop. */ - size_t name_alloc = _D_ALLOC_NAMLEN (d); - size_t filesize = dotlen + MAX (sizeof "..", name_alloc); - - if (filesize < dotlen) - goto memory_exhausted; - - if (dotsize < filesize) - { - /* My, what a deep directory tree you have, Grandma. */ - size_t newsize = MAX (filesize, dotsize * 2); - size_t i; - if (newsize < dotsize) - goto memory_exhausted; - if (dotlist != dots) - free (dotlist); - dotlist = malloc (newsize); - if (dotlist == NULL) - goto lose; - dotsize = newsize; - - i = 0; - do - { - dotlist[i++] = '.'; - dotlist[i++] = '.'; - dotlist[i++] = '/'; - } - while (i < dotlen); - } - - memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d)); - entry_status = __lstat (dotlist, &st); -#endif - /* We don't fail here if we cannot stat() a directory entry. - This can happen when (network) file systems fail. If this - entry is in fact the one we are looking for we will find - out soon as we reach the end of the directory without - having found anything. */ - if (entry_status == 0 && S_ISDIR (st.st_mode) - && st.st_dev == thisdev && st.st_ino == thisino) - break; - } - } - - dirroom = dirp - dir; - namlen = _D_EXACT_NAMLEN (d); - - if (dirroom <= namlen) - { - if (size != 0) - { - __set_errno (ERANGE); - goto lose; - } - else - { - char *tmp; - size_t oldsize = allocated; - - allocated += MAX (allocated, namlen); - if (allocated < oldsize - || ! (tmp = realloc (dir, allocated))) - goto memory_exhausted; - - /* Move current contents up to the end of the buffer. - This is guaranteed to be non-overlapping. */ - dirp = memcpy (tmp + allocated - (oldsize - dirroom), - tmp + dirroom, - oldsize - dirroom); - dir = tmp; - } - } - dirp -= namlen; - memcpy (dirp, d->d_name, namlen); - *--dirp = '/'; - - thisdev = dotdev; - thisino = dotino; - } - - if (dirstream && __closedir (dirstream) != 0) - { - dirstream = NULL; - goto lose; - } - - if (dirp == &dir[allocated - 1]) - *--dirp = '/'; - -#if ! HAVE_OPENAT_SUPPORT - if (dotlist != dots) - free (dotlist); -#endif - - used = dir + allocated - dirp; - memmove (dir, dirp, used); - - if (size == 0) - /* Ensure that the buffer is only as large as necessary. */ - buf = realloc (dir, used); - - if (buf == NULL) - /* Either buf was NULL all along, or `realloc' failed but - we still have the original string. */ - buf = dir; - - return buf; - - memory_exhausted: - __set_errno (ENOMEM); - lose: - { - int save = errno; - if (dirstream) - __closedir (dirstream); -#if HAVE_OPENAT_SUPPORT - if (fd_needs_closing) - close (fd); -#else - if (dotlist != dots) - free (dotlist); -#endif - if (buf == NULL) - free (dir); - __set_errno (save); - } - return NULL; -} - -#ifdef weak_alias -weak_alias (__getcwd, getcwd) -#endif diff --git a/gnulib/lib/getdelim.c b/gnulib/lib/getdelim.c deleted file mode 100644 index 14a8bce..0000000 --- a/gnulib/lib/getdelim.c +++ /dev/null @@ -1,137 +0,0 @@ -/* getdelim.c --- Implementation of replacement getdelim function. - Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2011 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 3, or (at - your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ - -/* Ported from glibc by Simon Josefsson. */ - -#include - -/* 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 - -#include -#include -#include -#include - -#ifndef SSIZE_MAX -# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) -#endif - -#if USE_UNLOCKED_IO -# include "unlocked-io.h" -# define getc_maybe_unlocked(fp) getc(fp) -#elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED -# undef flockfile -# undef funlockfile -# define flockfile(x) ((void) 0) -# define funlockfile(x) ((void) 0) -# define getc_maybe_unlocked(fp) getc(fp) -#else -# define getc_maybe_unlocked(fp) getc_unlocked(fp) -#endif - -/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and - NUL-terminate it). *LINEPTR is a pointer returned from malloc (or - NULL), pointing to *N characters of space. It is realloc'ed as - necessary. Returns the number of characters read (not including - the null terminator), or -1 on error or EOF. */ - -ssize_t -getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) -{ - ssize_t result; - size_t cur_len = 0; - - if (lineptr == NULL || n == NULL || fp == NULL) - { - errno = EINVAL; - return -1; - } - - flockfile (fp); - - if (*lineptr == NULL || *n == 0) - { - char *new_lineptr; - *n = 120; - new_lineptr = (char *) realloc (*lineptr, *n); - if (new_lineptr == NULL) - { - result = -1; - goto unlock_return; - } - *lineptr = new_lineptr; - } - - for (;;) - { - int i; - - i = getc_maybe_unlocked (fp); - if (i == EOF) - { - result = -1; - break; - } - - /* Make enough space for len+1 (for final NUL) bytes. */ - if (cur_len + 1 >= *n) - { - size_t needed_max = - SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; - size_t needed = 2 * *n + 1; /* Be generous. */ - char *new_lineptr; - - if (needed_max < needed) - needed = needed_max; - if (cur_len + 1 >= needed) - { - result = -1; - errno = EOVERFLOW; - goto unlock_return; - } - - new_lineptr = (char *) realloc (*lineptr, needed); - if (new_lineptr == NULL) - { - result = -1; - goto unlock_return; - } - - *lineptr = new_lineptr; - *n = needed; - } - - (*lineptr)[cur_len] = i; - cur_len++; - - if (i == delimiter) - break; - } - (*lineptr)[cur_len] = '\0'; - result = cur_len ? cur_len : result; - - unlock_return: - funlockfile (fp); /* doesn't set errno */ - - return result; -} diff --git a/gnulib/lib/getdtablesize.c b/gnulib/lib/getdtablesize.c deleted file mode 100644 index 60e7f5a..0000000 --- a/gnulib/lib/getdtablesize.c +++ /dev/null @@ -1,63 +0,0 @@ -/* getdtablesize() function for platforms that don't have it. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -#include - -/* Cache for the previous getdtablesize () result. */ -static int dtablesize; - -int -getdtablesize (void) -{ - if (dtablesize == 0) - { - /* We are looking for the number N such that the valid file descriptors - are 0..N-1. It can be obtained through a loop as follows: - { - int fd; - for (fd = 3; fd < 65536; fd++) - if (dup2 (0, fd) == -1) - break; - return fd; - } - On Windows XP, the result is 2048. - The drawback of this loop is that it allocates memory for a libc - internal array that is never freed. - - The number N can also be obtained as the upper bound for - _getmaxstdio (). _getmaxstdio () returns the maximum number of open - FILE objects. The sanity check in _setmaxstdio reveals the maximum - number of file descriptors. This too allocates memory, but it is - freed when we call _setmaxstdio with the original value. */ - int orig_max_stdio = _getmaxstdio (); - unsigned int bound; - for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2) - ; - _setmaxstdio (orig_max_stdio); - dtablesize = bound; - } - return dtablesize; -} - -#endif diff --git a/gnulib/lib/getfilecon.c b/gnulib/lib/getfilecon.c deleted file mode 100644 index ccd9fa5..0000000 --- a/gnulib/lib/getfilecon.c +++ /dev/null @@ -1,87 +0,0 @@ -/* wrap getfilecon, lgetfilecon, and fgetfilecon - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* written by Jim Meyering */ - -#include - -#include - -#include -#include -#include - -/* FIXME: remove this once there is an errno-gnu module - that guarantees the definition of ENODATA. */ -#ifndef ENODATA -# define ENODATA ENOTSUP -#endif - -#undef getfilecon -#undef lgetfilecon -#undef fgetfilecon -int getfilecon (char const *file, security_context_t *con); -int lgetfilecon (char const *file, security_context_t *con); -int fgetfilecon (int fd, security_context_t *con); - -/* getfilecon, lgetfilecon, and fgetfilecon can all misbehave, be it - via an old version of libselinux where these would return 0 and set the - result context to NULL, or via a modern kernel+lib operating on a file - from a disk whose attributes were set by a kernel from around 2006. - In that latter case, the functions return a length of 10 for the - "unlabeled" context. Map both failures to a return value of -1, and - set errno to ENOTSUP in the first case, and ENODATA in the latter. */ - -static inline int -map_to_failure (int ret, security_context_t *con) -{ - if (ret == 0) - { - errno = ENOTSUP; - return -1; - } - - if (ret == 10 && strcmp (*con, "unlabeled") == 0) - { - freecon (*con); - errno = ENODATA; - return -1; - } - - return ret; -} - -int -rpl_getfilecon (char const *file, security_context_t *con) -{ - int ret = getfilecon (file, con); - return map_to_failure (ret, con); -} - -int -rpl_lgetfilecon (char const *file, security_context_t *con) -{ - int ret = lgetfilecon (file, con); - return map_to_failure (ret, con); -} - -int -rpl_fgetfilecon (int fd, security_context_t *con) -{ - int ret = fgetfilecon (fd, con); - return map_to_failure (ret, con); -} diff --git a/gnulib/lib/getgroups.c b/gnulib/lib/getgroups.c deleted file mode 100644 index 87e1679..0000000 --- a/gnulib/lib/getgroups.c +++ /dev/null @@ -1,116 +0,0 @@ -/* provide consistent interface to getgroups for systems that don't allow N==0 - - Copyright (C) 1996, 1999, 2003, 2006-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include - -#include -#include -#include - -#if !HAVE_GETGROUPS - -/* Provide a stub that fails with ENOSYS, since there is no group - information available on mingw. */ -int -getgroups (int n _GL_UNUSED, GETGROUPS_T *groups _GL_UNUSED) -{ - errno = ENOSYS; - return -1; -} - -#else /* HAVE_GETGROUPS */ - -# undef getgroups -# ifndef GETGROUPS_ZERO_BUG -# define GETGROUPS_ZERO_BUG 0 -# endif - -/* On at least Ultrix 4.3 and NextStep 3.2, getgroups (0, NULL) always - fails. On other systems, it returns the number of supplemental - groups for the process. This function handles that special case - and lets the system-provided function handle all others. However, - it can fail with ENOMEM if memory is tight. It is unspecified - whether the effective group id is included in the list. */ - -int -rpl_getgroups (int n, gid_t *group) -{ - int n_groups; - GETGROUPS_T *gbuf; - int saved_errno; - - if (n < 0) - { - errno = EINVAL; - return -1; - } - - if (n != 0 || !GETGROUPS_ZERO_BUG) - { - int result; - if (sizeof *group == sizeof *gbuf) - return getgroups (n, (GETGROUPS_T *) group); - - if (SIZE_MAX / sizeof *gbuf <= n) - { - errno = ENOMEM; - return -1; - } - gbuf = malloc (n * sizeof *gbuf); - if (!gbuf) - return -1; - result = getgroups (n, gbuf); - if (0 <= result) - { - n = result; - while (n--) - group[n] = gbuf[n]; - } - saved_errno = errno; - free (gbuf); - errno == saved_errno; - return result; - } - - n = 20; - while (1) - { - /* No need to worry about address arithmetic overflow here, - since the ancient systems that we're running on have low - limits on the number of secondary groups. */ - gbuf = malloc (n * sizeof *gbuf); - if (!gbuf) - return -1; - n_groups = getgroups (n, gbuf); - if (n_groups == -1 ? errno != EINVAL : n_groups < n) - break; - free (gbuf); - n *= 2; - } - - saved_errno = errno; - free (gbuf); - errno = saved_errno; - - return n_groups; -} - -#endif /* HAVE_GETGROUPS */ diff --git a/gnulib/lib/getline.c b/gnulib/lib/getline.c deleted file mode 100644 index e6e9187..0000000 --- a/gnulib/lib/getline.c +++ /dev/null @@ -1,29 +0,0 @@ -/* getline.c --- Implementation of replacement getline function. - Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 3, or (at - your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ - -/* Written by Simon Josefsson. */ - -#include - -#include - -ssize_t -getline (char **lineptr, size_t *n, FILE *stream) -{ - return getdelim (lineptr, n, '\n', stream); -} diff --git a/gnulib/lib/getopt.c b/gnulib/lib/getopt.c deleted file mode 100644 index c8b3013..0000000 --- a/gnulib/lib/getopt.c +++ /dev/null @@ -1,1192 +0,0 @@ -/* Getopt for GNU. - 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-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _LIBC -# include -#endif - -#include "getopt.h" - -#include -#include -#include -#include - -#ifdef _LIBC -# include -#else -# include "gettext.h" -# define _(msgid) gettext (msgid) -#endif - -#if defined _LIBC && defined USE_IN_LIBIO -# include -#endif - -/* This version of `getopt' appears to the caller like standard Unix `getopt' - but it behaves differently for the user, since it allows the user - to intersperse the options with the other arguments. - - As `getopt_long' works, it permutes the elements of ARGV so that, - when it is done, all the options precede everything else. Thus - all application programs are extended to handle flexible argument order. - - Using `getopt' or setting the environment variable POSIXLY_CORRECT - disables permutation. - Then the behavior is completely standard. - - GNU application programs can use a third alternative mode in which - they can distinguish the relative order of options and other arguments. */ - -#include "getopt_int.h" - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -/* 1003.2 says this must be 1 before any call. */ -int optind = 1; - -/* Callers store zero here to inhibit the error message - for unrecognized options. */ - -int opterr = 1; - -/* Set to an option character which was unrecognized. - This must be initialized on some systems to avoid linking in the - system's own getopt implementation. */ - -int optopt = '?'; - -/* Keep a global copy of all internal members of getopt_data. */ - -static struct _getopt_data getopt_data; - - -#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV -extern char *getenv (); -#endif - -#ifdef _LIBC -/* Stored original parameters. - XXX This is no good solution. We should rather copy the args so - that we can compare them later. But we must not use malloc(3). */ -extern int __libc_argc; -extern char **__libc_argv; - -/* Bash 2.0 gives us an environment variable containing flags - indicating ARGV elements that should not be considered arguments. */ - -# ifdef USE_NONOPTION_FLAGS -/* Defined in getopt_init.c */ -extern char *__getopt_nonoption_flags; -# endif - -# ifdef USE_NONOPTION_FLAGS -# define SWAP_FLAGS(ch1, ch2) \ - if (d->__nonoption_flags_len > 0) \ - { \ - char __tmp = __getopt_nonoption_flags[ch1]; \ - __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ - __getopt_nonoption_flags[ch2] = __tmp; \ - } -# else -# define SWAP_FLAGS(ch1, ch2) -# endif -#else /* !_LIBC */ -# define SWAP_FLAGS(ch1, ch2) -#endif /* _LIBC */ - -/* Exchange two adjacent subsequences of ARGV. - One subsequence is elements [first_nonopt,last_nonopt) - which contains all the non-options that have been skipped so far. - The other is elements [last_nonopt,optind), which contains all - the options processed since those non-options were skipped. - - `first_nonopt' and `last_nonopt' are relocated so that they describe - the new indices of the non-options in ARGV after they are moved. */ - -static void -exchange (char **argv, struct _getopt_data *d) -{ - int bottom = d->__first_nonopt; - int middle = d->__last_nonopt; - int top = d->optind; - char *tem; - - /* Exchange the shorter segment with the far end of the longer segment. - That puts the shorter segment into the right place. - It leaves the longer segment in the right place overall, - but it consists of two parts that need to be swapped next. */ - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - /* First make sure the handling of the `__getopt_nonoption_flags' - string can work normally. Our top argument must be in the range - of the string. */ - if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) - { - /* We must extend the array. The user plays games with us and - presents new arguments. */ - char *new_str = malloc (top + 1); - if (new_str == NULL) - d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; - else - { - memset (__mempcpy (new_str, __getopt_nonoption_flags, - d->__nonoption_flags_max_len), - '\0', top + 1 - d->__nonoption_flags_max_len); - d->__nonoption_flags_max_len = top + 1; - __getopt_nonoption_flags = new_str; - } - } -#endif - - while (top > middle && middle > bottom) - { - if (top - middle > middle - bottom) - { - /* Bottom segment is the short one. */ - int len = middle - bottom; - register int i; - - /* Swap it with the top part of the top segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[top - (middle - bottom) + i]; - argv[top - (middle - bottom) + i] = tem; - SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); - } - /* Exclude the moved bottom segment from further swapping. */ - top -= len; - } - else - { - /* Top segment is the short one. */ - int len = top - middle; - register int i; - - /* Swap it with the bottom part of the bottom segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[middle + i]; - argv[middle + i] = tem; - SWAP_FLAGS (bottom + i, middle + i); - } - /* Exclude the moved top segment from further swapping. */ - bottom += len; - } - } - - /* Update records for the slots the non-options now occupy. */ - - d->__first_nonopt += (d->optind - d->__last_nonopt); - d->__last_nonopt = d->optind; -} - -/* Initialize the internal data when the first call is made. */ - -static const char * -_getopt_initialize (int argc _GL_UNUSED, - char **argv _GL_UNUSED, const char *optstring, - struct _getopt_data *d, int posixly_correct) -{ - /* Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ - - d->__first_nonopt = d->__last_nonopt = d->optind; - - d->__nextchar = NULL; - - d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); - - /* Determine how to handle the ordering of options and nonoptions. */ - - if (optstring[0] == '-') - { - d->__ordering = RETURN_IN_ORDER; - ++optstring; - } - else if (optstring[0] == '+') - { - d->__ordering = REQUIRE_ORDER; - ++optstring; - } - else if (d->__posixly_correct) - d->__ordering = REQUIRE_ORDER; - else - d->__ordering = PERMUTE; - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - if (!d->__posixly_correct - && argc == __libc_argc && argv == __libc_argv) - { - if (d->__nonoption_flags_max_len == 0) - { - if (__getopt_nonoption_flags == NULL - || __getopt_nonoption_flags[0] == '\0') - d->__nonoption_flags_max_len = -1; - else - { - const char *orig_str = __getopt_nonoption_flags; - int len = d->__nonoption_flags_max_len = strlen (orig_str); - if (d->__nonoption_flags_max_len < argc) - d->__nonoption_flags_max_len = argc; - __getopt_nonoption_flags = - (char *) malloc (d->__nonoption_flags_max_len); - if (__getopt_nonoption_flags == NULL) - d->__nonoption_flags_max_len = -1; - else - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), - '\0', d->__nonoption_flags_max_len - len); - } - } - d->__nonoption_flags_len = d->__nonoption_flags_max_len; - } - else - d->__nonoption_flags_len = 0; -#endif - - return optstring; -} - -/* Scan elements of ARGV (whose length is ARGC) for option characters - given in OPTSTRING. - - If an element of ARGV starts with '-', and is not exactly "-" or "--", - then it is an option element. The characters of this element - (aside from the initial '-') are option characters. If `getopt' - is called repeatedly, it returns successively each of the option characters - from each of the option elements. - - If `getopt' finds another option character, it returns that character, - updating `optind' and `nextchar' so that the next call to `getopt' can - resume the scan with the following option character or ARGV-element. - - If there are no more option characters, `getopt' returns -1. - Then `optind' is the index in ARGV of the first ARGV-element - that is not an option. (The ARGV-elements have been permuted - so that those that are not options now come last.) - - OPTSTRING is a string containing the legitimate option characters. - If an option character is seen that is not listed in OPTSTRING, - return '?' after printing an error message. If you set `opterr' to - zero, the error message is suppressed but we still return '?'. - - If a char in OPTSTRING is followed by a colon, that means it wants an arg, - so the following text in the same ARGV-element, or the text of the following - ARGV-element, is returned in `optarg'. Two colons mean an option that - wants an optional arg; if there is text in the current ARGV-element, - it is returned in `optarg', otherwise `optarg' is set to zero. - - If OPTSTRING starts with `-' or `+', it requests different methods of - handling the non-option ARGV-elements. - See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. - - Long-named options begin with `--' instead of `-'. - Their names may be abbreviated as long as the abbreviation is unique - or is an exact match for some defined option. If they have an - argument, it follows the option name in the same ARGV-element, separated - from the option name by a `=', or else the in next ARGV-element. - When `getopt' finds a long-named option, it returns 0 if that option's - `flag' field is nonzero, the value of the option's `val' field - if the `flag' field is zero. - - The elements of ARGV aren't really const, because we permute them. - But we pretend they're const in the prototype to be compatible - with other systems. - - LONGOPTS is a vector of `struct option' terminated by an - element containing a name which is zero. - - LONGIND returns the index in LONGOPT of the long-named option found. - It is only valid when a long-named option has been found by the most - recent call. - - If LONG_ONLY is nonzero, '-' as well as '--' can introduce - long-named options. */ - -int -_getopt_internal_r (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, - int long_only, struct _getopt_data *d, int posixly_correct) -{ - int print_errors = d->opterr; - - if (argc < 1) - return -1; - - d->optarg = NULL; - - if (d->optind == 0 || !d->__initialized) - { - if (d->optind == 0) - d->optind = 1; /* Don't scan ARGV[0], the program name. */ - optstring = _getopt_initialize (argc, argv, optstring, d, - posixly_correct); - d->__initialized = 1; - } - else if (optstring[0] == '-' || optstring[0] == '+') - optstring++; - if (optstring[0] == ':') - print_errors = 0; - - /* Test whether ARGV[optind] points to a non-option argument. - Either it does not have option syntax, or there is an environment flag - from the shell indicating it is not an option. The later information - is only used when the used in the GNU libc. */ -#if defined _LIBC && defined USE_NONOPTION_FLAGS -# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ - || (d->optind < d->__nonoption_flags_len \ - && __getopt_nonoption_flags[d->optind] == '1')) -#else -# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') -#endif - - if (d->__nextchar == NULL || *d->__nextchar == '\0') - { - /* Advance to the next ARGV-element. */ - - /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been - moved back by the user (who may also have changed the arguments). */ - if (d->__last_nonopt > d->optind) - d->__last_nonopt = d->optind; - if (d->__first_nonopt > d->optind) - d->__first_nonopt = d->optind; - - if (d->__ordering == PERMUTE) - { - /* If we have just processed some options following some non-options, - exchange them so that the options come first. */ - - if (d->__first_nonopt != d->__last_nonopt - && d->__last_nonopt != d->optind) - exchange ((char **) argv, d); - else if (d->__last_nonopt != d->optind) - d->__first_nonopt = d->optind; - - /* Skip any additional non-options - and extend the range of non-options previously skipped. */ - - while (d->optind < argc && NONOPTION_P) - d->optind++; - d->__last_nonopt = d->optind; - } - - /* The special ARGV-element `--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ - - if (d->optind != argc && !strcmp (argv[d->optind], "--")) - { - d->optind++; - - if (d->__first_nonopt != d->__last_nonopt - && d->__last_nonopt != d->optind) - exchange ((char **) argv, d); - else if (d->__first_nonopt == d->__last_nonopt) - d->__first_nonopt = d->optind; - d->__last_nonopt = argc; - - d->optind = argc; - } - - /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ - - if (d->optind == argc) - { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ - if (d->__first_nonopt != d->__last_nonopt) - d->optind = d->__first_nonopt; - return -1; - } - - /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ - - if (NONOPTION_P) - { - if (d->__ordering == REQUIRE_ORDER) - return -1; - d->optarg = argv[d->optind++]; - return 1; - } - - /* We have found another option-ARGV-element. - Skip the initial punctuation. */ - - d->__nextchar = (argv[d->optind] + 1 - + (longopts != NULL && argv[d->optind][1] == '-')); - } - - /* Decode the current option-ARGV-element. */ - - /* Check whether the ARGV-element is a long option. - - If long_only and the ARGV-element has the form "-f", where f is - a valid short option, don't consider it an abbreviated form of - a long option that starts with f. Otherwise there would be no - way to give the -f short option. - - On the other hand, if there's a long option "fubar" and - the ARGV-element is "-fu", do consider that an abbreviation of - the long option, just like "--fu", and not "-f" with arg "u". - - This distinction seems to be the most useful approach. */ - - if (longopts != NULL - && (argv[d->optind][1] == '-' - || (long_only && (argv[d->optind][2] - || !strchr (optstring, argv[d->optind][1]))))) - { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound = -1; - int option_index; - - for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) - { - if ((unsigned int) (nameend - d->__nextchar) - == (unsigned int) strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else if (long_only - || pfound->has_arg != p->has_arg - || pfound->flag != p->flag - || pfound->val != p->val) - /* Second or later nonexact match found. */ - ambig = 1; - } - - if (ambig && !exact) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"), - argv[0], argv[d->optind]) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("%s: option '%s' is ambiguous\n"), - argv[0], argv[d->optind]); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optind++; - d->optopt = 0; - return '?'; - } - - if (pfound != NULL) - { - option_index = indfound; - d->optind++; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - d->optarg = nameend + 1; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (argv[d->optind - 1][1] == '-') - { - /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("\ -%s: option '--%s' doesn't allow an argument\n"), - argv[0], pfound->name); -#else - fprintf (stderr, _("\ -%s: option '--%s' doesn't allow an argument\n"), - argv[0], pfound->name); -#endif - } - else - { - /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("\ -%s: option '%c%s' doesn't allow an argument\n"), - argv[0], argv[d->optind - 1][0], - pfound->name); -#else - fprintf (stderr, _("\ -%s: option '%c%s' doesn't allow an argument\n"), - argv[0], argv[d->optind - 1][0], - pfound->name); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - - d->__nextchar += strlen (d->__nextchar); - - d->optopt = pfound->val; - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (d->optind < argc) - d->optarg = argv[d->optind++]; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '--%s' requires an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option '--%s' requires an argument\n"), - argv[0], pfound->name); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optopt = pfound->val; - return optstring[0] == ':' ? ':' : '?'; - } - } - d->__nextchar += strlen (d->__nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - /* Can't find it as a long option. If this is not getopt_long_only, - or the option starts with '--' or is not a valid short - option, then it's an error. - Otherwise interpret it as a short option. */ - if (!long_only || argv[d->optind][1] == '-' - || strchr (optstring, *d->__nextchar) == NULL) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (argv[d->optind][1] == '-') - { - /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), - argv[0], d->__nextchar); -#else - fprintf (stderr, _("%s: unrecognized option '--%s'\n"), - argv[0], d->__nextchar); -#endif - } - else - { - /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), - argv[0], argv[d->optind][0], d->__nextchar); -#else - fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), - argv[0], argv[d->optind][0], d->__nextchar); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - d->__nextchar = (char *) ""; - d->optind++; - d->optopt = 0; - return '?'; - } - } - - /* Look at and handle the next short option-character. */ - - { - char c = *d->__nextchar++; - const char *temp = strchr (optstring, c); - - /* Increment `optind' when we start to process its last character. */ - if (*d->__nextchar == '\0') - ++d->optind; - - if (temp == NULL || c == ':' || c == ';') - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), - argv[0], c); -#else - fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); -#endif - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - d->optopt = c; - return '?'; - } - /* Convenience. Treat POSIX -W foo same as long option --foo */ - if (temp[0] == 'W' && temp[1] == ';') - { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound = 0; - int option_index; - - /* This is an option that requires an argument. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - d->optind++; - } - else if (d->optind == argc) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c); -#endif - } - d->optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - return c; - } - else - /* We already incremented `d->optind' once; - increment it again when taking next ARGV-elt as argument. */ - d->optarg = argv[d->optind++]; - - /* optarg is now the argument, see if it's in the - table of longopts. */ - - for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; - nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) - { - if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else if (long_only - || pfound->has_arg != p->has_arg - || pfound->flag != p->flag - || pfound->val != p->val) - /* Second or later nonexact match found. */ - ambig = 1; - } - if (ambig && !exact) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), - argv[0], d->optarg) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), - argv[0], d->optarg); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optind++; - return '?'; - } - if (pfound != NULL) - { - option_index = indfound; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - d->optarg = nameend + 1; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '-W %s' doesn't allow an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("\ -%s: option '-W %s' doesn't allow an argument\n"), - argv[0], pfound->name); -#endif - } - - d->__nextchar += strlen (d->__nextchar); - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (d->optind < argc) - d->optarg = argv[d->optind++]; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '-W %s' requires an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("\ -%s: option '-W %s' requires an argument\n"), - argv[0], pfound->name); -#endif - } - d->__nextchar += strlen (d->__nextchar); - return optstring[0] == ':' ? ':' : '?'; - } - } - else - d->optarg = NULL; - d->__nextchar += strlen (d->__nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - d->__nextchar = NULL; - return 'W'; /* Let the application handle it. */ - } - if (temp[1] == ':') - { - if (temp[2] == ':') - { - /* This is an option that accepts an argument optionally. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - d->optind++; - } - else - d->optarg = NULL; - d->__nextchar = NULL; - } - else - { - /* This is an option that requires an argument. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - d->optind++; - } - else if (d->optind == argc) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option requires an argument -- '%c'\n"), - argv[0], c) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c); -#endif - } - d->optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - } - else - /* We already incremented `optind' once; - increment it again when taking next ARGV-elt as argument. */ - d->optarg = argv[d->optind++]; - d->__nextchar = NULL; - } - } - return c; - } -} - -int -_getopt_internal (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, int long_only, - int posixly_correct) -{ - int result; - - getopt_data.optind = optind; - getopt_data.opterr = opterr; - - result = _getopt_internal_r (argc, argv, optstring, longopts, - longind, long_only, &getopt_data, - posixly_correct); - - optind = getopt_data.optind; - optarg = getopt_data.optarg; - optopt = getopt_data.optopt; - - return result; -} - -/* glibc gets a LSB-compliant getopt. - Standalone applications get a POSIX-compliant getopt. */ -#if _LIBC -enum { POSIXLY_CORRECT = 0 }; -#else -enum { POSIXLY_CORRECT = 1 }; -#endif - -int -getopt (int argc, char *const *argv, const char *optstring) -{ - return _getopt_internal (argc, (char **) argv, optstring, - (const struct option *) 0, - (int *) 0, - 0, POSIXLY_CORRECT); -} - -#ifdef _LIBC -int -__posix_getopt (int argc, char *const *argv, const char *optstring) -{ - return _getopt_internal (argc, argv, optstring, - (const struct option *) 0, - (int *) 0, - 0, 1); -} -#endif - - -#ifdef TEST - -/* Compile with -DTEST to make an executable for use in testing - the above definition of `getopt'. */ - -int -main (int argc, char **argv) -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - - c = getopt (argc, argv, "abc:d:0123456789"); - if (c == -1) - break; - - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value '%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ diff --git a/gnulib/lib/getopt.in.h b/gnulib/lib/getopt.in.h deleted file mode 100644 index 82e2937..0000000 --- a/gnulib/lib/getopt.in.h +++ /dev/null @@ -1,253 +0,0 @@ -/* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_GETOPT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. We must - also inform the replacement unistd.h to not recursively use - ; our definitions will be present soon enough. */ -#if @HAVE_GETOPT_H@ -# define _GL_SYSTEM_GETOPT -# @INCLUDE_NEXT@ @NEXT_GETOPT_H@ -# undef _GL_SYSTEM_GETOPT -#endif - -#ifndef _GL_GETOPT_H - -#ifndef __need_getopt -# define _GL_GETOPT_H 1 -#endif - -/* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in this header. When this happens, include the - headers that might declare getopt so that they will not cause - confusion if included after this file (if the system had , - we have already included it). Then systematically rename - identifiers so that they do not collide with the system functions - and variables. Renaming avoids problems with some compilers and - linkers. */ -#if defined __GETOPT_PREFIX && !defined __need_getopt -# if !@HAVE_GETOPT_H@ -# include -# include -# include -# endif -# undef __need_getopt -# undef getopt -# undef getopt_long -# undef getopt_long_only -# undef optarg -# undef opterr -# undef optind -# undef optopt -# undef option -# define __GETOPT_CONCAT(x, y) x ## y -# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -# define getopt __GETOPT_ID (getopt) -# define getopt_long __GETOPT_ID (getopt_long) -# define getopt_long_only __GETOPT_ID (getopt_long_only) -# define optarg __GETOPT_ID (optarg) -# define opterr __GETOPT_ID (opterr) -# define optind __GETOPT_ID (optind) -# define optopt __GETOPT_ID (optopt) -# define option __GETOPT_ID (option) -# define _getopt_internal __GETOPT_ID (getopt_internal) -#endif - -/* Standalone applications get correct prototypes for getopt_long and - getopt_long_only; they declare "char **argv". libc uses prototypes - with "char *const *argv" that are incorrect because getopt_long and - getopt_long_only can permute argv; this is required for backward - compatibility (e.g., for LSB 2.0.1). - - This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', - but it caused redefinition warnings if both unistd.h and getopt.h were - included, since unistd.h includes getopt.h having previously defined - __need_getopt. - - The only place where __getopt_argv_const is used is in definitions - of getopt_long and getopt_long_only below, but these are visible - only if __need_getopt is not defined, so it is quite safe to rewrite - the conditional as follows: -*/ -#if !defined __need_getopt -# if defined __GETOPT_PREFIX -# define __getopt_argv_const /* empty */ -# else -# define __getopt_argv_const const -# endif -#endif - -/* If __GNU_LIBRARY__ is not already defined, either we are being used - standalone, or this is the first header included in the source file. - If we are being used with glibc, we need to include , but - that does not exist if we are standalone. So: if __GNU_LIBRARY__ is - not defined, include , which will pull in for us - if it's from glibc. (Why ctype.h? It's guaranteed to exist and it - doesn't flood the namespace with stuff the way some other headers do.) */ -#if !defined __GNU_LIBRARY__ -# include -#endif - -#ifndef __THROW -# ifndef __GNUC_PREREQ -# define __GNUC_PREREQ(maj, min) (0) -# endif -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW -# endif -#endif - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message `getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -#ifndef __need_getopt -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of `struct option' terminated by an element containing a name which is - zero. - - The field `has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field `flag' is not NULL, it points to a variable that is set - to the value given in the field `val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an `int' to - a compiled-in constant, such as set a value from `optarg', set the - option's `flag' field to zero and its `val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero `flag' field, `getopt' - returns the contents of the `val' field. */ - -# if !GNULIB_defined_struct_option -struct option -{ - const char *name; - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; -# define GNULIB_defined_struct_option 1 -# endif - -/* Names for the values of the `has_arg' field of `struct option'. */ - -# define no_argument 0 -# define required_argument 1 -# define optional_argument 2 -#endif /* need getopt */ - - -/* Get definitions and prototypes for functions to process the - arguments in ARGV (ARGC of them, minus the program name) for - options given in OPTS. - - Return the option character from OPTS just read. Return -1 when - there are no more options. For unrecognized options, or options - missing arguments, `optopt' is set to the option letter, and '?' is - returned. - - The OPTS string is a list of characters which are recognized option - letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in `optarg'. - - If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU `getopt'. - - The argument `--' causes premature termination of argument - scanning, explicitly telling `getopt' that there are no more - options. - - If OPTS begins with `-', then non-option arguments are treated as - arguments to the option '\1'. This behavior is specific to the GNU - `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in - the environment, then do not permute arguments. */ - -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#ifndef __need_getopt -extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); -extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#endif - -#ifdef __cplusplus -} -#endif - -/* Make sure we later can get all the definitions and declarations. */ -#undef __need_getopt - -#endif /* getopt.h */ -#endif /* getopt.h */ diff --git a/gnulib/lib/getopt1.c b/gnulib/lib/getopt1.c deleted file mode 100644 index 3656802..0000000 --- a/gnulib/lib/getopt1.c +++ /dev/null @@ -1,170 +0,0 @@ -/* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifdef _LIBC -# include -#else -# include -# include "getopt.h" -#endif -#include "getopt_int.h" - -#include - -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -#include -#endif - -#ifndef NULL -#define NULL 0 -#endif - -int -getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, - const struct option *long_options, int *opt_index) -{ - return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 0, 0); -} - -int -_getopt_long_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) -{ - return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 0, d, 0); -} - -/* Like getopt_long, but '-' as well as '--' can indicate a long option. - If an option that starts with '-' (not '--') doesn't match a long option, - but does match a short option, it is parsed as a short option - instead. */ - -int -getopt_long_only (int argc, char *__getopt_argv_const *argv, - const char *options, - const struct option *long_options, int *opt_index) -{ - return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 1, 0); -} - -int -_getopt_long_only_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) -{ - return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 1, d, 0); -} - - -#ifdef TEST - -#include - -int -main (int argc, char **argv) -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - int option_index = 0; - static const struct option long_options[] = - { - {"add", 1, 0, 0}, - {"append", 0, 0, 0}, - {"delete", 1, 0, 0}, - {"verbose", 0, 0, 0}, - {"create", 0, 0, 0}, - {"file", 1, 0, 0}, - {0, 0, 0, 0} - }; - - c = getopt_long (argc, argv, "abc:d:0123456789", - long_options, &option_index); - if (c == -1) - break; - - switch (c) - { - case 0: - printf ("option %s", long_options[option_index].name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value `%s'\n", optarg); - break; - - case 'd': - printf ("option d with value `%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ diff --git a/gnulib/lib/getopt_int.h b/gnulib/lib/getopt_int.h deleted file mode 100644 index 9f0c713..0000000 --- a/gnulib/lib/getopt_int.h +++ /dev/null @@ -1,135 +0,0 @@ -/* Internal declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GETOPT_INT_H -#define _GETOPT_INT_H 1 - -#include - -extern int _getopt_internal (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, int __posixly_correct); - - -/* Reentrant versions which can handle parsing multiple argument - vectors at the same time. */ - -/* Describe how to deal with options that follow non-option ARGV-elements. - - If the caller did not specify anything, - the default is REQUIRE_ORDER if the environment variable - POSIXLY_CORRECT is defined, PERMUTE otherwise. - - REQUIRE_ORDER means don't recognize them as options; - stop option processing when the first non-option is seen. - This is what Unix does. - This mode of operation is selected by either setting the environment - variable POSIXLY_CORRECT, or using `+' as the first character - of the list of option characters, or by calling getopt. - - PERMUTE is the default. We permute the contents of ARGV as we - scan, so that eventually all the non-options are at the end. - This allows options to be given in any order, even with programs - that were not written to expect this. - - RETURN_IN_ORDER is an option available to programs that were - written to expect options and other ARGV-elements in any order - and that care about the ordering of the two. We describe each - non-option ARGV-element as if it were the argument of an option - with character code 1. Using `-' as the first character of the - list of option characters selects this mode of operation. - - The special argument `--' forces an end of option-scanning regardless - of the value of `ordering'. In the case of RETURN_IN_ORDER, only - `--' can cause `getopt' to return -1 with `optind' != ARGC. */ - -enum __ord - { - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER - }; - -/* Data type for reentrant functions. */ -struct _getopt_data -{ - /* These have exactly the same meaning as the corresponding global - variables, except that they are used for the reentrant - versions of getopt. */ - int optind; - int opterr; - int optopt; - char *optarg; - - /* Internal members. */ - - /* True if the internal members have been initialized. */ - int __initialized; - - /* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - char *__nextchar; - - /* See __ord above. */ - enum __ord __ordering; - - /* If the POSIXLY_CORRECT environment variable is set - or getopt was called. */ - int __posixly_correct; - - - /* Handle permutation of arguments. */ - - /* Describe the part of ARGV that contains non-options that have - been skipped. `first_nonopt' is the index in ARGV of the first - of them; `last_nonopt' is the index after the last of them. */ - - int __first_nonopt; - int __last_nonopt; - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - int __nonoption_flags_max_len; - int __nonoption_flags_len; -#endif -}; - -/* The initializer is necessary to set OPTIND and OPTERR to their - default values and to clear the initialization flag. */ -#define _GETOPT_DATA_INITIALIZER { 1, 1 } - -extern int _getopt_internal_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, struct _getopt_data *__data, - int __posixly_correct); - -extern int _getopt_long_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - struct _getopt_data *__data); - -extern int _getopt_long_only_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, - int *__longind, - struct _getopt_data *__data); - -#endif /* getopt_int.h */ diff --git a/gnulib/lib/gettext.h b/gnulib/lib/gettext.h deleted file mode 100644 index 458e332..0000000 --- a/gnulib/lib/gettext.h +++ /dev/null @@ -1,286 +0,0 @@ -/* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H 1 - -/* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS - -/* Get declarations of GNU message catalog functions. */ -# include - -/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by - the gettext() and ngettext() macros. This is an alternative to calling - textdomain(), and is useful for libraries. */ -# ifdef DEFAULT_TEXT_DOMAIN -# undef gettext -# define gettext(Msgid) \ - dgettext (DEFAULT_TEXT_DOMAIN, Msgid) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) -# endif - -#else - -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of a NOP. We don't include - as well because people using "gettext.h" will not include , - and also including would fail on SunOS 4, whereas - is OK. */ -#if defined(__sun) -# include -#endif - -/* Many header files from the libstdc++ coming with g++ 3.3 or newer include - , which chokes if dcgettext is defined as a macro. So include - it now, to make later inclusions of a NOP. */ -#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) -# include -# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H -# include -# endif -#endif - -/* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. - On pre-ANSI systems without 'const', the config.h file is supposed to - contain "#define const". */ -# undef gettext -# define gettext(Msgid) ((const char *) (Msgid)) -# undef dgettext -# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) -# undef dcgettext -# define dcgettext(Domainname, Msgid, Category) \ - ((void) (Category), dgettext (Domainname, Msgid)) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 \ - ? ((void) (Msgid2), (const char *) (Msgid1)) \ - : ((void) (Msgid1), (const char *) (Msgid2))) -# undef dngettext -# define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) -# undef dcngettext -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) -# undef textdomain -# define textdomain(Domainname) ((const char *) (Domainname)) -# undef bindtextdomain -# define bindtextdomain(Domainname, Dirname) \ - ((void) (Domainname), (const char *) (Dirname)) -# undef bind_textdomain_codeset -# define bind_textdomain_codeset(Domainname, Codeset) \ - ((void) (Domainname), (const char *) (Codeset)) - -#endif - -/* Prefer gnulib's setlocale override over libintl's setlocale override. */ -#ifdef GNULIB_defined_setlocale -# undef setlocale -# define setlocale rpl_setlocale -#endif - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char[]' or 'const char[]' variables. */ -#define gettext_noop(String) String - -/* The separator between msgctxt and msgid in a .mo file. */ -#define GETTEXT_CONTEXT_GLUE "\004" - -/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a - MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be - short and rarely need to change. - The letter 'p' stands for 'particular' or 'special'. */ -#ifdef DEFAULT_TEXT_DOMAIN -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#else -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#endif -#define dpgettext(Domainname, Msgctxt, Msgid) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) -#ifdef DEFAULT_TEXT_DOMAIN -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#else -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#endif -#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -pgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - int category) -{ - const char *translation = dcgettext (domain, msg_ctxt_id, category); - if (translation == msg_ctxt_id) - return msgid; - else - return translation; -} - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -npgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) -{ - const char *translation = - dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); - if (translation == msg_ctxt_id || translation == msgid_plural) - return (n == 1 ? msgid : msgid_plural); - else - return translation; -} - -/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID - can be arbitrary expressions. But for string literals these macros are - less efficient than those above. */ - -#include - -#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ - /* || __STDC_VERSION__ >= 199901L */ ) - -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS -#include -#endif - -#define pgettext_expr(Msgctxt, Msgid) \ - dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) -#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ - dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -dcpgettext_expr (const char *domain, - const char *msgctxt, const char *msgid, - int category) -{ - size_t msgctxt_len = strlen (msgctxt) + 1; - size_t msgid_len = strlen (msgid) + 1; - const char *translation; -#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - char msg_ctxt_id[msgctxt_len + msgid_len]; -#else - char buf[1024]; - char *msg_ctxt_id = - (msgctxt_len + msgid_len <= sizeof (buf) - ? buf - : (char *) malloc (msgctxt_len + msgid_len)); - if (msg_ctxt_id != NULL) -#endif - { - memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); - msg_ctxt_id[msgctxt_len - 1] = '\004'; - memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); - translation = dcgettext (domain, msg_ctxt_id, category); -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - if (msg_ctxt_id != buf) - free (msg_ctxt_id); -#endif - if (translation != msg_ctxt_id) - return translation; - } - return msgid; -} - -#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ - dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) -#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ - dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -dcnpgettext_expr (const char *domain, - const char *msgctxt, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) -{ - size_t msgctxt_len = strlen (msgctxt) + 1; - size_t msgid_len = strlen (msgid) + 1; - const char *translation; -#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - char msg_ctxt_id[msgctxt_len + msgid_len]; -#else - char buf[1024]; - char *msg_ctxt_id = - (msgctxt_len + msgid_len <= sizeof (buf) - ? buf - : (char *) malloc (msgctxt_len + msgid_len)); - if (msg_ctxt_id != NULL) -#endif - { - memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); - msg_ctxt_id[msgctxt_len - 1] = '\004'; - memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); - translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - if (msg_ctxt_id != buf) - free (msg_ctxt_id); -#endif - if (!(translation == msg_ctxt_id || translation == msgid_plural)) - return translation; - } - return (n == 1 ? msgid : msgid_plural); -} - -#endif /* _LIBGETTEXT_H */ diff --git a/gnulib/lib/gettime.c b/gnulib/lib/gettime.c deleted file mode 100644 index 6dbb457..0000000 --- a/gnulib/lib/gettime.c +++ /dev/null @@ -1,48 +0,0 @@ -/* gettime -- get the system clock - - Copyright (C) 2002, 2004-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include - -#include "timespec.h" - -#include - -/* Get the system time into *TS. */ - -void -gettime (struct timespec *ts) -{ -#if HAVE_NANOTIME - nanotime (ts); -#else - -# if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME - if (clock_gettime (CLOCK_REALTIME, ts) == 0) - return; -# endif - - { - struct timeval tv; - gettimeofday (&tv, NULL); - ts->tv_sec = tv.tv_sec; - ts->tv_nsec = tv.tv_usec * 1000; - } - -#endif -} diff --git a/gnulib/lib/gettimeofday.c b/gnulib/lib/gettimeofday.c deleted file mode 100644 index adfb51f..0000000 --- a/gnulib/lib/gettimeofday.c +++ /dev/null @@ -1,144 +0,0 @@ -/* Provide gettimeofday for systems that don't have it or for which it's broken. - - Copyright (C) 2001-2003, 2005-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* written by Jim Meyering */ - -#include - -/* Specification. */ -#include - -#include - -#if HAVE_SYS_TIMEB_H -# include -#endif - -#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME - -/* Work around the bug in some systems whereby gettimeofday clobbers - the static buffer that localtime uses for its return value. The - gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has - this problem. The tzset replacement is necessary for at least - Solaris 2.5, 2.5.1, and 2.6. */ - -static struct tm tm_zero_buffer; -static struct tm *localtime_buffer_addr = &tm_zero_buffer; - -# undef localtime -extern struct tm *localtime (time_t const *); - -# undef gmtime -extern struct tm *gmtime (time_t const *); - -/* This is a wrapper for localtime. It is used only on systems for which - gettimeofday clobbers the static buffer used for localtime's result. - - On the first call, record the address of the static buffer that - localtime uses for its result. */ - -struct tm * -rpl_localtime (time_t const *timep) -{ - struct tm *tm = localtime (timep); - - if (localtime_buffer_addr == &tm_zero_buffer) - localtime_buffer_addr = tm; - - return tm; -} - -/* Same as above, since gmtime and localtime use the same buffer. */ -struct tm * -rpl_gmtime (time_t const *timep) -{ - struct tm *tm = gmtime (timep); - - if (localtime_buffer_addr == &tm_zero_buffer) - localtime_buffer_addr = tm; - - return tm; -} - -#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */ - -#if TZSET_CLOBBERS_LOCALTIME - -# undef tzset -extern void tzset (void); - -/* This is a wrapper for tzset, for systems on which tzset may clobber - the static buffer used for localtime's result. */ -void -rpl_tzset (void) -{ - /* Save and restore the contents of the buffer used for localtime's - result around the call to tzset. */ - struct tm save = *localtime_buffer_addr; - tzset (); - *localtime_buffer_addr = save; -} -#endif - -/* This is a wrapper for gettimeofday. It is used only on systems - that lack this function, or whose implementation of this function - causes problems. */ - -int -gettimeofday (struct timeval *restrict tv, void *restrict tz) -{ -#undef gettimeofday -#if HAVE_GETTIMEOFDAY -# if GETTIMEOFDAY_CLOBBERS_LOCALTIME - /* Save and restore the contents of the buffer used for localtime's - result around the call to gettimeofday. */ - struct tm save = *localtime_buffer_addr; -# endif - - int result = gettimeofday (tv, (struct timezone *) tz); - -# if GETTIMEOFDAY_CLOBBERS_LOCALTIME - *localtime_buffer_addr = save; -# endif - - return result; - -#else - -# if HAVE__FTIME - - struct _timeb timebuf; - _ftime (&timebuf); - tv->tv_sec = timebuf.time; - tv->tv_usec = timebuf.millitm * 1000; - -# else - -# if !defined OK_TO_USE_1S_CLOCK -# error "Only 1-second nominal clock resolution found. Is that intended?" \ - "If so, compile with the -DOK_TO_USE_1S_CLOCK option." -# endif - tv->tv_sec = time (NULL); - tv->tv_usec = 0; - -# endif - - return 0; - -#endif -} diff --git a/gnulib/lib/group-member.c b/gnulib/lib/group-member.c deleted file mode 100644 index 6d1cd66..0000000 --- a/gnulib/lib/group-member.c +++ /dev/null @@ -1,125 +0,0 @@ -/* group-member.c -- determine whether group id is in calling user's group list - - Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "group-member.h" - -#include -#include -#include -#include - -#include - -#include "xalloc.h" - -struct group_info - { - int n_groups; - gid_t *group; - }; - -static void -free_group_info (struct group_info const *g) -{ - free (g->group); -} - -static bool -get_group_info (struct group_info *gi) -{ - int n_groups; - int n_group_slots = getgroups (0, NULL); - gid_t *group; - - if (n_group_slots < 0) - return false; - - /* Avoid xnmalloc, as it goes awry when SIZE_MAX < n_group_slots. */ - if (xalloc_oversized (n_group_slots, sizeof *group)) - xalloc_die (); - group = xmalloc (n_group_slots * sizeof *group); - n_groups = getgroups (n_group_slots, group); - - /* In case of error, the user loses. */ - if (n_groups < 0) - { - free (group); - return false; - } - - gi->n_groups = n_groups; - gi->group = group; - - return true; -} - -/* Return non-zero if GID is one that we have in our groups list. - Note that the groups list is not guaranteed to contain the current - or effective group ID, so they should generally be checked - separately. */ - -int -group_member (gid_t gid) -{ - int i; - int found; - struct group_info gi; - - if (! get_group_info (&gi)) - return 0; - - /* Search through the list looking for GID. */ - found = 0; - for (i = 0; i < gi.n_groups; i++) - { - if (gid == gi.group[i]) - { - found = 1; - break; - } - } - - free_group_info (&gi); - - return found; -} - -#ifdef TEST - -char *program_name; - -int -main (int argc, char **argv) -{ - int i; - - program_name = argv[0]; - - for (i = 1; i < argc; i++) - { - gid_t gid; - - gid = atoi (argv[i]); - printf ("%d: %s\n", gid, group_member (gid) ? "yes" : "no"); - } - exit (0); -} - -#endif /* TEST */ diff --git a/gnulib/lib/group-member.h b/gnulib/lib/group-member.h deleted file mode 100644 index cb89ee3..0000000 --- a/gnulib/lib/group-member.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Determine whether group id is in calling user's group list. - - Copyright (C) 1994, 1997, 2003, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef GROUP_MEMBER_H_ -# define GROUP_MEMBER_H_ 1 - -# include - -int group_member (gid_t); - -#endif /* GROUP_MEMBER_H_ */ diff --git a/gnulib/lib/hash-pjw.c b/gnulib/lib/hash-pjw.c deleted file mode 100644 index 743bb57..0000000 --- a/gnulib/lib/hash-pjw.c +++ /dev/null @@ -1,40 +0,0 @@ -/* hash-pjw.c -- compute a hash value from a NUL-terminated string. - - Copyright (C) 2001, 2003, 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "hash-pjw.h" - -#include - -#define SIZE_BITS (sizeof (size_t) * CHAR_BIT) - -/* A hash function for NUL-terminated char* strings using - the method described by Bruno Haible. - See http://www.haible.de/bruno/hashfunc.html. */ - -size_t -hash_pjw (const void *x, size_t tablesize) -{ - const char *s; - size_t h = 0; - - for (s = x; *s; s++) - h = *s + ((h << 9) | (h >> (SIZE_BITS - 9))); - - return h % tablesize; -} diff --git a/gnulib/lib/hash-pjw.h b/gnulib/lib/hash-pjw.h deleted file mode 100644 index 80c1838..0000000 --- a/gnulib/lib/hash-pjw.h +++ /dev/null @@ -1,23 +0,0 @@ -/* hash-pjw.h -- declaration for a simple hash function - Copyright (C) 2001, 2003, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Compute a hash code for a NUL-terminated string starting at X, - and return the hash code modulo TABLESIZE. - The result is platform dependent: it depends on the size of the 'size_t' - type and on the signedness of the 'char' type. */ -extern size_t hash_pjw (void const *x, size_t tablesize); diff --git a/gnulib/lib/hash-triple.c b/gnulib/lib/hash-triple.c deleted file mode 100644 index 1649377..0000000 --- a/gnulib/lib/hash-triple.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Hash functions for file-related triples: name, device, inode. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include "hash-triple.h" - -#include -#include - -#include "hash-pjw.h" -#include "same.h" -#include "same-inode.h" - -#define STREQ(a, b) (strcmp (a, b) == 0) - -/* Hash an F_triple, and *do* consider the file name. */ -size_t -triple_hash (void const *x, size_t table_size) -{ - struct F_triple const *p = x; - size_t tmp = hash_pjw (p->name, table_size); - - /* Ignoring the device number here should be fine. */ - return (tmp ^ p->st_ino) % table_size; -} - -/* Hash an F_triple, without considering the file name. */ -size_t -triple_hash_no_name (void const *x, size_t table_size) -{ - struct F_triple const *p = x; - - /* Ignoring the device number here should be fine. */ - return p->st_ino % table_size; -} - -/* Compare two F_triple structs. */ -bool -triple_compare (void const *x, void const *y) -{ - struct F_triple const *a = x; - struct F_triple const *b = y; - return (SAME_INODE (*a, *b) && same_name (a->name, b->name)) ? true : false; -} - -bool -triple_compare_ino_str (void const *x, void const *y) -{ - struct F_triple const *a = x; - struct F_triple const *b = y; - return (SAME_INODE (*a, *b) && STREQ (a->name, b->name)) ? true : false; -} - -/* Free an F_triple. */ -void -triple_free (void *x) -{ - struct F_triple *a = x; - free (a->name); - free (a); -} diff --git a/gnulib/lib/hash-triple.h b/gnulib/lib/hash-triple.h deleted file mode 100644 index 51863c9..0000000 --- a/gnulib/lib/hash-triple.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef HASH_TRIPLE_H -#define HASH_TRIPLE_H - -#include -#include -#include - -/* Describe a just-created or just-renamed destination file. */ -struct F_triple -{ - char *name; - ino_t st_ino; - dev_t st_dev; -}; - -extern size_t triple_hash (void const *x, size_t table_size); -extern size_t triple_hash_no_name (void const *x, size_t table_size); -extern bool triple_compare (void const *x, void const *y); -extern bool triple_compare_ino_str (void const *x, void const *y); -extern void triple_free (void *x); - -#endif diff --git a/gnulib/lib/hash.c b/gnulib/lib/hash.c deleted file mode 100644 index f3de2aa..0000000 --- a/gnulib/lib/hash.c +++ /dev/null @@ -1,1222 +0,0 @@ -/* hash - hashing table processing. - - Copyright (C) 1998-2004, 2006-2007, 2009-2011 Free Software Foundation, Inc. - - Written by Jim Meyering, 1992. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* A generic hash table package. */ - -/* Define USE_OBSTACK to 1 if you want the allocator to use obstacks instead - of malloc. If you change USE_OBSTACK, you have to recompile! */ - -#include - -#include "hash.h" - -#include "bitrotate.h" -#include "xalloc.h" - -#include -#include -#include - -#if USE_OBSTACK -# include "obstack.h" -# ifndef obstack_chunk_alloc -# define obstack_chunk_alloc malloc -# endif -# ifndef obstack_chunk_free -# define obstack_chunk_free free -# endif -#endif - -struct hash_entry - { - void *data; - struct hash_entry *next; - }; - -struct hash_table - { - /* The array of buckets starts at BUCKET and extends to BUCKET_LIMIT-1, - for a possibility of N_BUCKETS. Among those, N_BUCKETS_USED buckets - are not empty, there are N_ENTRIES active entries in the table. */ - struct hash_entry *bucket; - struct hash_entry const *bucket_limit; - size_t n_buckets; - size_t n_buckets_used; - size_t n_entries; - - /* Tuning arguments, kept in a physically separate structure. */ - const Hash_tuning *tuning; - - /* Three functions are given to `hash_initialize', see the documentation - block for this function. In a word, HASHER randomizes a user entry - into a number up from 0 up to some maximum minus 1; COMPARATOR returns - true if two user entries compare equally; and DATA_FREER is the cleanup - function for a user entry. */ - Hash_hasher hasher; - Hash_comparator comparator; - Hash_data_freer data_freer; - - /* A linked list of freed struct hash_entry structs. */ - struct hash_entry *free_entry_list; - -#if USE_OBSTACK - /* Whenever obstacks are used, it is possible to allocate all overflowed - entries into a single stack, so they all can be freed in a single - operation. It is not clear if the speedup is worth the trouble. */ - struct obstack entry_stack; -#endif - }; - -/* A hash table contains many internal entries, each holding a pointer to - some user-provided data (also called a user entry). An entry indistinctly - refers to both the internal entry and its associated user entry. A user - entry contents may be hashed by a randomization function (the hashing - function, or just `hasher' for short) into a number (or `slot') between 0 - and the current table size. At each slot position in the hash table, - starts a linked chain of entries for which the user data all hash to this - slot. A bucket is the collection of all entries hashing to the same slot. - - A good `hasher' function will distribute entries rather evenly in buckets. - In the ideal case, the length of each bucket is roughly the number of - entries divided by the table size. Finding the slot for a data is usually - done in constant time by the `hasher', and the later finding of a precise - entry is linear in time with the size of the bucket. Consequently, a - larger hash table size (that is, a larger number of buckets) is prone to - yielding shorter chains, *given* the `hasher' function behaves properly. - - Long buckets slow down the lookup algorithm. One might use big hash table - sizes in hope to reduce the average length of buckets, but this might - become inordinate, as unused slots in the hash table take some space. The - best bet is to make sure you are using a good `hasher' function (beware - that those are not that easy to write! :-), and to use a table size - larger than the actual number of entries. */ - -/* If an insertion makes the ratio of nonempty buckets to table size larger - than the growth threshold (a number between 0.0 and 1.0), then increase - the table size by multiplying by the growth factor (a number greater than - 1.0). The growth threshold defaults to 0.8, and the growth factor - defaults to 1.414, meaning that the table will have doubled its size - every second time 80% of the buckets get used. */ -#define DEFAULT_GROWTH_THRESHOLD 0.8 -#define DEFAULT_GROWTH_FACTOR 1.414 - -/* If a deletion empties a bucket and causes the ratio of used buckets to - table size to become smaller than the shrink threshold (a number between - 0.0 and 1.0), then shrink the table by multiplying by the shrink factor (a - number greater than the shrink threshold but smaller than 1.0). The shrink - threshold and factor default to 0.0 and 1.0, meaning that the table never - shrinks. */ -#define DEFAULT_SHRINK_THRESHOLD 0.0 -#define DEFAULT_SHRINK_FACTOR 1.0 - -/* Use this to initialize or reset a TUNING structure to - some sensible values. */ -static const Hash_tuning default_tuning = - { - DEFAULT_SHRINK_THRESHOLD, - DEFAULT_SHRINK_FACTOR, - DEFAULT_GROWTH_THRESHOLD, - DEFAULT_GROWTH_FACTOR, - false - }; - -/* Information and lookup. */ - -/* The following few functions provide information about the overall hash - table organization: the number of entries, number of buckets and maximum - length of buckets. */ - -/* Return the number of buckets in the hash table. The table size, the total - number of buckets (used plus unused), or the maximum number of slots, are - the same quantity. */ - -size_t -hash_get_n_buckets (const Hash_table *table) -{ - return table->n_buckets; -} - -/* Return the number of slots in use (non-empty buckets). */ - -size_t -hash_get_n_buckets_used (const Hash_table *table) -{ - return table->n_buckets_used; -} - -/* Return the number of active entries. */ - -size_t -hash_get_n_entries (const Hash_table *table) -{ - return table->n_entries; -} - -/* Return the length of the longest chain (bucket). */ - -size_t -hash_get_max_bucket_length (const Hash_table *table) -{ - struct hash_entry const *bucket; - size_t max_bucket_length = 0; - - for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) - { - if (bucket->data) - { - struct hash_entry const *cursor = bucket; - size_t bucket_length = 1; - - while (cursor = cursor->next, cursor) - bucket_length++; - - if (bucket_length > max_bucket_length) - max_bucket_length = bucket_length; - } - } - - return max_bucket_length; -} - -/* Do a mild validation of a hash table, by traversing it and checking two - statistics. */ - -bool -hash_table_ok (const Hash_table *table) -{ - struct hash_entry const *bucket; - size_t n_buckets_used = 0; - size_t n_entries = 0; - - for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) - { - if (bucket->data) - { - struct hash_entry const *cursor = bucket; - - /* Count bucket head. */ - n_buckets_used++; - n_entries++; - - /* Count bucket overflow. */ - while (cursor = cursor->next, cursor) - n_entries++; - } - } - - if (n_buckets_used == table->n_buckets_used && n_entries == table->n_entries) - return true; - - return false; -} - -void -hash_print_statistics (const Hash_table *table, FILE *stream) -{ - size_t n_entries = hash_get_n_entries (table); - size_t n_buckets = hash_get_n_buckets (table); - size_t n_buckets_used = hash_get_n_buckets_used (table); - size_t max_bucket_length = hash_get_max_bucket_length (table); - - fprintf (stream, "# entries: %lu\n", (unsigned long int) n_entries); - fprintf (stream, "# buckets: %lu\n", (unsigned long int) n_buckets); - fprintf (stream, "# buckets used: %lu (%.2f%%)\n", - (unsigned long int) n_buckets_used, - (100.0 * n_buckets_used) / n_buckets); - fprintf (stream, "max bucket length: %lu\n", - (unsigned long int) max_bucket_length); -} - -/* Hash KEY and return a pointer to the selected bucket. - If TABLE->hasher misbehaves, abort. */ -static struct hash_entry * -safe_hasher (const Hash_table *table, const void *key) -{ - size_t n = table->hasher (key, table->n_buckets); - if (! (n < table->n_buckets)) - abort (); - return table->bucket + n; -} - -/* If ENTRY matches an entry already in the hash table, return the - entry from the table. Otherwise, return NULL. */ - -void * -hash_lookup (const Hash_table *table, const void *entry) -{ - struct hash_entry const *bucket = safe_hasher (table, entry); - struct hash_entry const *cursor; - - if (bucket->data == NULL) - return NULL; - - for (cursor = bucket; cursor; cursor = cursor->next) - if (entry == cursor->data || table->comparator (entry, cursor->data)) - return cursor->data; - - return NULL; -} - -/* Walking. */ - -/* The functions in this page traverse the hash table and process the - contained entries. For the traversal to work properly, the hash table - should not be resized nor modified while any particular entry is being - processed. In particular, entries should not be added, and an entry - may be removed only if there is no shrink threshold and the entry being - removed has already been passed to hash_get_next. */ - -/* Return the first data in the table, or NULL if the table is empty. */ - -void * -hash_get_first (const Hash_table *table) -{ - struct hash_entry const *bucket; - - if (table->n_entries == 0) - return NULL; - - for (bucket = table->bucket; ; bucket++) - if (! (bucket < table->bucket_limit)) - abort (); - else if (bucket->data) - return bucket->data; -} - -/* Return the user data for the entry following ENTRY, where ENTRY has been - returned by a previous call to either `hash_get_first' or `hash_get_next'. - Return NULL if there are no more entries. */ - -void * -hash_get_next (const Hash_table *table, const void *entry) -{ - struct hash_entry const *bucket = safe_hasher (table, entry); - struct hash_entry const *cursor; - - /* Find next entry in the same bucket. */ - cursor = bucket; - do - { - if (cursor->data == entry && cursor->next) - return cursor->next->data; - cursor = cursor->next; - } - while (cursor != NULL); - - /* Find first entry in any subsequent bucket. */ - while (++bucket < table->bucket_limit) - if (bucket->data) - return bucket->data; - - /* None found. */ - return NULL; -} - -/* Fill BUFFER with pointers to active user entries in the hash table, then - return the number of pointers copied. Do not copy more than BUFFER_SIZE - pointers. */ - -size_t -hash_get_entries (const Hash_table *table, void **buffer, - size_t buffer_size) -{ - size_t counter = 0; - struct hash_entry const *bucket; - struct hash_entry const *cursor; - - for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) - { - if (bucket->data) - { - for (cursor = bucket; cursor; cursor = cursor->next) - { - if (counter >= buffer_size) - return counter; - buffer[counter++] = cursor->data; - } - } - } - - return counter; -} - -/* Call a PROCESSOR function for each entry of a hash table, and return the - number of entries for which the processor function returned success. A - pointer to some PROCESSOR_DATA which will be made available to each call to - the processor function. The PROCESSOR accepts two arguments: the first is - the user entry being walked into, the second is the value of PROCESSOR_DATA - as received. The walking continue for as long as the PROCESSOR function - returns nonzero. When it returns zero, the walking is interrupted. */ - -size_t -hash_do_for_each (const Hash_table *table, Hash_processor processor, - void *processor_data) -{ - size_t counter = 0; - struct hash_entry const *bucket; - struct hash_entry const *cursor; - - for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) - { - if (bucket->data) - { - for (cursor = bucket; cursor; cursor = cursor->next) - { - if (! processor (cursor->data, processor_data)) - return counter; - counter++; - } - } - } - - return counter; -} - -/* Allocation and clean-up. */ - -/* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1. - This is a convenience routine for constructing other hashing functions. */ - -#if USE_DIFF_HASH - -/* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see - B. J. McKenzie, R. Harries & T. Bell, Selecting a hashing algorithm, - Software--practice & experience 20, 2 (Feb 1990), 209-224. Good hash - algorithms tend to be domain-specific, so what's good for [diffutils'] io.c - may not be good for your application." */ - -size_t -hash_string (const char *string, size_t n_buckets) -{ -# define HASH_ONE_CHAR(Value, Byte) \ - ((Byte) + rotl_sz (Value, 7)) - - size_t value = 0; - unsigned char ch; - - for (; (ch = *string); string++) - value = HASH_ONE_CHAR (value, ch); - return value % n_buckets; - -# undef HASH_ONE_CHAR -} - -#else /* not USE_DIFF_HASH */ - -/* This one comes from `recode', and performs a bit better than the above as - per a few experiments. It is inspired from a hashing routine found in the - very old Cyber `snoop', itself written in typical Greg Mansfield style. - (By the way, what happened to this excellent man? Is he still alive?) */ - -size_t -hash_string (const char *string, size_t n_buckets) -{ - size_t value = 0; - unsigned char ch; - - for (; (ch = *string); string++) - value = (value * 31 + ch) % n_buckets; - return value; -} - -#endif /* not USE_DIFF_HASH */ - -/* Return true if CANDIDATE is a prime number. CANDIDATE should be an odd - number at least equal to 11. */ - -static bool -is_prime (size_t candidate) -{ - size_t divisor = 3; - size_t square = divisor * divisor; - - while (square < candidate && (candidate % divisor)) - { - divisor++; - square += 4 * divisor; - divisor++; - } - - return (candidate % divisor ? true : false); -} - -/* Round a given CANDIDATE number up to the nearest prime, and return that - prime. Primes lower than 10 are merely skipped. */ - -static size_t -next_prime (size_t candidate) -{ - /* Skip small primes. */ - if (candidate < 10) - candidate = 10; - - /* Make it definitely odd. */ - candidate |= 1; - - while (SIZE_MAX != candidate && !is_prime (candidate)) - candidate += 2; - - return candidate; -} - -void -hash_reset_tuning (Hash_tuning *tuning) -{ - *tuning = default_tuning; -} - -/* If the user passes a NULL hasher, we hash the raw pointer. */ -static size_t -raw_hasher (const void *data, size_t n) -{ - /* When hashing unique pointers, it is often the case that they were - generated by malloc and thus have the property that the low-order - bits are 0. As this tends to give poorer performance with small - tables, we rotate the pointer value before performing division, - in an attempt to improve hash quality. */ - size_t val = rotr_sz ((size_t) data, 3); - return val % n; -} - -/* If the user passes a NULL comparator, we use pointer comparison. */ -static bool -raw_comparator (const void *a, const void *b) -{ - return a == b; -} - - -/* For the given hash TABLE, check the user supplied tuning structure for - reasonable values, and return true if there is no gross error with it. - Otherwise, definitively reset the TUNING field to some acceptable default - in the hash table (that is, the user loses the right of further modifying - tuning arguments), and return false. */ - -static bool -check_tuning (Hash_table *table) -{ - const Hash_tuning *tuning = table->tuning; - float epsilon; - if (tuning == &default_tuning) - return true; - - /* Be a bit stricter than mathematics would require, so that - rounding errors in size calculations do not cause allocations to - fail to grow or shrink as they should. The smallest allocation - is 11 (due to next_prime's algorithm), so an epsilon of 0.1 - should be good enough. */ - epsilon = 0.1f; - - if (epsilon < tuning->growth_threshold - && tuning->growth_threshold < 1 - epsilon - && 1 + epsilon < tuning->growth_factor - && 0 <= tuning->shrink_threshold - && tuning->shrink_threshold + epsilon < tuning->shrink_factor - && tuning->shrink_factor <= 1 - && tuning->shrink_threshold + epsilon < tuning->growth_threshold) - return true; - - table->tuning = &default_tuning; - return false; -} - -/* Compute the size of the bucket array for the given CANDIDATE and - TUNING, or return 0 if there is no possible way to allocate that - many entries. */ - -static size_t -compute_bucket_size (size_t candidate, const Hash_tuning *tuning) -{ - if (!tuning->is_n_buckets) - { - float new_candidate = candidate / tuning->growth_threshold; - if (SIZE_MAX <= new_candidate) - return 0; - candidate = new_candidate; - } - candidate = next_prime (candidate); - if (xalloc_oversized (candidate, sizeof (struct hash_entry *))) - return 0; - return candidate; -} - -/* Allocate and return a new hash table, or NULL upon failure. The initial - number of buckets is automatically selected so as to _guarantee_ that you - may insert at least CANDIDATE different user entries before any growth of - the hash table size occurs. So, if have a reasonably tight a-priori upper - bound on the number of entries you intend to insert in the hash table, you - may save some table memory and insertion time, by specifying it here. If - the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE - argument has its meaning changed to the wanted number of buckets. - - TUNING points to a structure of user-supplied values, in case some fine - tuning is wanted over the default behavior of the hasher. If TUNING is - NULL, the default tuning parameters are used instead. If TUNING is - provided but the values requested are out of bounds or might cause - rounding errors, return NULL. - - The user-supplied HASHER function, when not NULL, accepts two - arguments ENTRY and TABLE_SIZE. It computes, by hashing ENTRY contents, a - slot number for that entry which should be in the range 0..TABLE_SIZE-1. - This slot number is then returned. - - The user-supplied COMPARATOR function, when not NULL, accepts two - arguments pointing to user data, it then returns true for a pair of entries - that compare equal, or false otherwise. This function is internally called - on entries which are already known to hash to the same bucket index, - but which are distinct pointers. - - The user-supplied DATA_FREER function, when not NULL, may be later called - with the user data as an argument, just before the entry containing the - data gets freed. This happens from within `hash_free' or `hash_clear'. - You should specify this function only if you want these functions to free - all of your `data' data. This is typically the case when your data is - simply an auxiliary struct that you have malloc'd to aggregate several - values. */ - -Hash_table * -hash_initialize (size_t candidate, const Hash_tuning *tuning, - Hash_hasher hasher, Hash_comparator comparator, - Hash_data_freer data_freer) -{ - Hash_table *table; - - if (hasher == NULL) - hasher = raw_hasher; - if (comparator == NULL) - comparator = raw_comparator; - - table = malloc (sizeof *table); - if (table == NULL) - return NULL; - - if (!tuning) - tuning = &default_tuning; - table->tuning = tuning; - if (!check_tuning (table)) - { - /* Fail if the tuning options are invalid. This is the only occasion - when the user gets some feedback about it. Once the table is created, - if the user provides invalid tuning options, we silently revert to - using the defaults, and ignore further request to change the tuning - options. */ - goto fail; - } - - table->n_buckets = compute_bucket_size (candidate, tuning); - if (!table->n_buckets) - goto fail; - - table->bucket = calloc (table->n_buckets, sizeof *table->bucket); - if (table->bucket == NULL) - goto fail; - table->bucket_limit = table->bucket + table->n_buckets; - table->n_buckets_used = 0; - table->n_entries = 0; - - table->hasher = hasher; - table->comparator = comparator; - table->data_freer = data_freer; - - table->free_entry_list = NULL; -#if USE_OBSTACK - obstack_init (&table->entry_stack); -#endif - return table; - - fail: - free (table); - return NULL; -} - -/* Make all buckets empty, placing any chained entries on the free list. - Apply the user-specified function data_freer (if any) to the datas of any - affected entries. */ - -void -hash_clear (Hash_table *table) -{ - struct hash_entry *bucket; - - for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) - { - if (bucket->data) - { - struct hash_entry *cursor; - struct hash_entry *next; - - /* Free the bucket overflow. */ - for (cursor = bucket->next; cursor; cursor = next) - { - if (table->data_freer) - table->data_freer (cursor->data); - cursor->data = NULL; - - next = cursor->next; - /* Relinking is done one entry at a time, as it is to be expected - that overflows are either rare or short. */ - cursor->next = table->free_entry_list; - table->free_entry_list = cursor; - } - - /* Free the bucket head. */ - if (table->data_freer) - table->data_freer (bucket->data); - bucket->data = NULL; - bucket->next = NULL; - } - } - - table->n_buckets_used = 0; - table->n_entries = 0; -} - -/* Reclaim all storage associated with a hash table. If a data_freer - function has been supplied by the user when the hash table was created, - this function applies it to the data of each entry before freeing that - entry. */ - -void -hash_free (Hash_table *table) -{ - struct hash_entry *bucket; - struct hash_entry *cursor; - struct hash_entry *next; - - /* Call the user data_freer function. */ - if (table->data_freer && table->n_entries) - { - for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) - { - if (bucket->data) - { - for (cursor = bucket; cursor; cursor = cursor->next) - table->data_freer (cursor->data); - } - } - } - -#if USE_OBSTACK - - obstack_free (&table->entry_stack, NULL); - -#else - - /* Free all bucket overflowed entries. */ - for (bucket = table->bucket; bucket < table->bucket_limit; bucket++) - { - for (cursor = bucket->next; cursor; cursor = next) - { - next = cursor->next; - free (cursor); - } - } - - /* Also reclaim the internal list of previously freed entries. */ - for (cursor = table->free_entry_list; cursor; cursor = next) - { - next = cursor->next; - free (cursor); - } - -#endif - - /* Free the remainder of the hash table structure. */ - free (table->bucket); - free (table); -} - -/* Insertion and deletion. */ - -/* Get a new hash entry for a bucket overflow, possibly by recycling a - previously freed one. If this is not possible, allocate a new one. */ - -static struct hash_entry * -allocate_entry (Hash_table *table) -{ - struct hash_entry *new; - - if (table->free_entry_list) - { - new = table->free_entry_list; - table->free_entry_list = new->next; - } - else - { -#if USE_OBSTACK - new = obstack_alloc (&table->entry_stack, sizeof *new); -#else - new = malloc (sizeof *new); -#endif - } - - return new; -} - -/* Free a hash entry which was part of some bucket overflow, - saving it for later recycling. */ - -static void -free_entry (Hash_table *table, struct hash_entry *entry) -{ - entry->data = NULL; - entry->next = table->free_entry_list; - table->free_entry_list = entry; -} - -/* This private function is used to help with insertion and deletion. When - ENTRY matches an entry in the table, return a pointer to the corresponding - user data and set *BUCKET_HEAD to the head of the selected bucket. - Otherwise, return NULL. When DELETE is true and ENTRY matches an entry in - the table, unlink the matching entry. */ - -static void * -hash_find_entry (Hash_table *table, const void *entry, - struct hash_entry **bucket_head, bool delete) -{ - struct hash_entry *bucket = safe_hasher (table, entry); - struct hash_entry *cursor; - - *bucket_head = bucket; - - /* Test for empty bucket. */ - if (bucket->data == NULL) - return NULL; - - /* See if the entry is the first in the bucket. */ - if (entry == bucket->data || table->comparator (entry, bucket->data)) - { - void *data = bucket->data; - - if (delete) - { - if (bucket->next) - { - struct hash_entry *next = bucket->next; - - /* Bump the first overflow entry into the bucket head, then save - the previous first overflow entry for later recycling. */ - *bucket = *next; - free_entry (table, next); - } - else - { - bucket->data = NULL; - } - } - - return data; - } - - /* Scan the bucket overflow. */ - for (cursor = bucket; cursor->next; cursor = cursor->next) - { - if (entry == cursor->next->data - || table->comparator (entry, cursor->next->data)) - { - void *data = cursor->next->data; - - if (delete) - { - struct hash_entry *next = cursor->next; - - /* Unlink the entry to delete, then save the freed entry for later - recycling. */ - cursor->next = next->next; - free_entry (table, next); - } - - return data; - } - } - - /* No entry found. */ - return NULL; -} - -/* Internal helper, to move entries from SRC to DST. Both tables must - share the same free entry list. If SAFE, only move overflow - entries, saving bucket heads for later, so that no allocations will - occur. Return false if the free entry list is exhausted and an - allocation fails. */ - -static bool -transfer_entries (Hash_table *dst, Hash_table *src, bool safe) -{ - struct hash_entry *bucket; - struct hash_entry *cursor; - struct hash_entry *next; - for (bucket = src->bucket; bucket < src->bucket_limit; bucket++) - if (bucket->data) - { - void *data; - struct hash_entry *new_bucket; - - /* Within each bucket, transfer overflow entries first and - then the bucket head, to minimize memory pressure. After - all, the only time we might allocate is when moving the - bucket head, but moving overflow entries first may create - free entries that can be recycled by the time we finally - get to the bucket head. */ - for (cursor = bucket->next; cursor; cursor = next) - { - data = cursor->data; - new_bucket = safe_hasher (dst, data); - - next = cursor->next; - - if (new_bucket->data) - { - /* Merely relink an existing entry, when moving from a - bucket overflow into a bucket overflow. */ - cursor->next = new_bucket->next; - new_bucket->next = cursor; - } - else - { - /* Free an existing entry, when moving from a bucket - overflow into a bucket header. */ - new_bucket->data = data; - dst->n_buckets_used++; - free_entry (dst, cursor); - } - } - /* Now move the bucket head. Be sure that if we fail due to - allocation failure that the src table is in a consistent - state. */ - data = bucket->data; - bucket->next = NULL; - if (safe) - continue; - new_bucket = safe_hasher (dst, data); - - if (new_bucket->data) - { - /* Allocate or recycle an entry, when moving from a bucket - header into a bucket overflow. */ - struct hash_entry *new_entry = allocate_entry (dst); - - if (new_entry == NULL) - return false; - - new_entry->data = data; - new_entry->next = new_bucket->next; - new_bucket->next = new_entry; - } - else - { - /* Move from one bucket header to another. */ - new_bucket->data = data; - dst->n_buckets_used++; - } - bucket->data = NULL; - src->n_buckets_used--; - } - return true; -} - -/* For an already existing hash table, change the number of buckets through - specifying CANDIDATE. The contents of the hash table are preserved. The - new number of buckets is automatically selected so as to _guarantee_ that - the table may receive at least CANDIDATE different user entries, including - those already in the table, before any other growth of the hash table size - occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the - exact number of buckets desired. Return true iff the rehash succeeded. */ - -bool -hash_rehash (Hash_table *table, size_t candidate) -{ - Hash_table storage; - Hash_table *new_table; - size_t new_size = compute_bucket_size (candidate, table->tuning); - - if (!new_size) - return false; - if (new_size == table->n_buckets) - return true; - new_table = &storage; - new_table->bucket = calloc (new_size, sizeof *new_table->bucket); - if (new_table->bucket == NULL) - return false; - new_table->n_buckets = new_size; - new_table->bucket_limit = new_table->bucket + new_size; - new_table->n_buckets_used = 0; - new_table->n_entries = 0; - new_table->tuning = table->tuning; - new_table->hasher = table->hasher; - new_table->comparator = table->comparator; - new_table->data_freer = table->data_freer; - - /* In order for the transfer to successfully complete, we need - additional overflow entries when distinct buckets in the old - table collide into a common bucket in the new table. The worst - case possible is a hasher that gives a good spread with the old - size, but returns a constant with the new size; if we were to - guarantee table->n_buckets_used-1 free entries in advance, then - the transfer would be guaranteed to not allocate memory. - However, for large tables, a guarantee of no further allocation - introduces a lot of extra memory pressure, all for an unlikely - corner case (most rehashes reduce, rather than increase, the - number of overflow entries needed). So, we instead ensure that - the transfer process can be reversed if we hit a memory - allocation failure mid-transfer. */ - - /* Merely reuse the extra old space into the new table. */ -#if USE_OBSTACK - new_table->entry_stack = table->entry_stack; -#endif - new_table->free_entry_list = table->free_entry_list; - - if (transfer_entries (new_table, table, false)) - { - /* Entries transferred successfully; tie up the loose ends. */ - free (table->bucket); - table->bucket = new_table->bucket; - table->bucket_limit = new_table->bucket_limit; - table->n_buckets = new_table->n_buckets; - table->n_buckets_used = new_table->n_buckets_used; - table->free_entry_list = new_table->free_entry_list; - /* table->n_entries and table->entry_stack already hold their value. */ - return true; - } - - /* We've allocated new_table->bucket (and possibly some entries), - exhausted the free list, and moved some but not all entries into - new_table. We must undo the partial move before returning - failure. The only way to get into this situation is if new_table - uses fewer buckets than the old table, so we will reclaim some - free entries as overflows in the new table are put back into - distinct buckets in the old table. - - There are some pathological cases where a single pass through the - table requires more intermediate overflow entries than using two - passes. Two passes give worse cache performance and takes - longer, but at this point, we're already out of memory, so slow - and safe is better than failure. */ - table->free_entry_list = new_table->free_entry_list; - if (! (transfer_entries (table, new_table, true) - && transfer_entries (table, new_table, false))) - abort (); - /* table->n_entries already holds its value. */ - free (new_table->bucket); - return false; -} - -/* Return -1 upon memory allocation failure. - Return 1 if insertion succeeded. - Return 0 if there is already a matching entry in the table, - and in that case, if MATCHED_ENT is non-NULL, set *MATCHED_ENT - to that entry. - - This interface is easier to use than hash_insert when you must - distinguish between the latter two cases. More importantly, - hash_insert is unusable for some types of ENTRY values. When using - hash_insert, the only way to distinguish those cases is to compare - the return value and ENTRY. That works only when you can have two - different ENTRY values that point to data that compares "equal". Thus, - when the ENTRY value is a simple scalar, you must use hash_insert0. - ENTRY must not be NULL. */ -int -hash_insert0 (Hash_table *table, void const *entry, void const **matched_ent) -{ - void *data; - struct hash_entry *bucket; - - /* The caller cannot insert a NULL entry, since hash_lookup returns NULL - to indicate "not found", and hash_find_entry uses "bucket->data == NULL" - to indicate an empty bucket. */ - if (! entry) - abort (); - - /* If there's a matching entry already in the table, return that. */ - if ((data = hash_find_entry (table, entry, &bucket, false)) != NULL) - { - if (matched_ent) - *matched_ent = data; - return 0; - } - - /* If the growth threshold of the buckets in use has been reached, increase - the table size and rehash. There's no point in checking the number of - entries: if the hashing function is ill-conditioned, rehashing is not - likely to improve it. */ - - if (table->n_buckets_used - > table->tuning->growth_threshold * table->n_buckets) - { - /* Check more fully, before starting real work. If tuning arguments - became invalid, the second check will rely on proper defaults. */ - check_tuning (table); - if (table->n_buckets_used - > table->tuning->growth_threshold * table->n_buckets) - { - const Hash_tuning *tuning = table->tuning; - float candidate = - (tuning->is_n_buckets - ? (table->n_buckets * tuning->growth_factor) - : (table->n_buckets * tuning->growth_factor - * tuning->growth_threshold)); - - if (SIZE_MAX <= candidate) - return -1; - - /* If the rehash fails, arrange to return NULL. */ - if (!hash_rehash (table, candidate)) - return -1; - - /* Update the bucket we are interested in. */ - if (hash_find_entry (table, entry, &bucket, false) != NULL) - abort (); - } - } - - /* ENTRY is not matched, it should be inserted. */ - - if (bucket->data) - { - struct hash_entry *new_entry = allocate_entry (table); - - if (new_entry == NULL) - return -1; - - /* Add ENTRY in the overflow of the bucket. */ - - new_entry->data = (void *) entry; - new_entry->next = bucket->next; - bucket->next = new_entry; - table->n_entries++; - return 1; - } - - /* Add ENTRY right in the bucket head. */ - - bucket->data = (void *) entry; - table->n_entries++; - table->n_buckets_used++; - - return 1; -} - -/* If ENTRY matches an entry already in the hash table, return the pointer - to the entry from the table. Otherwise, insert ENTRY and return ENTRY. - Return NULL if the storage required for insertion cannot be allocated. - This implementation does not support duplicate entries or insertion of - NULL. */ - -void * -hash_insert (Hash_table *table, void const *entry) -{ - void const *matched_ent; - int err = hash_insert0 (table, entry, &matched_ent); - return (err == -1 - ? NULL - : (void *) (err == 0 ? matched_ent : entry)); -} - -/* If ENTRY is already in the table, remove it and return the just-deleted - data (the user may want to deallocate its storage). If ENTRY is not in the - table, don't modify the table and return NULL. */ - -void * -hash_delete (Hash_table *table, const void *entry) -{ - void *data; - struct hash_entry *bucket; - - data = hash_find_entry (table, entry, &bucket, true); - if (!data) - return NULL; - - table->n_entries--; - if (!bucket->data) - { - table->n_buckets_used--; - - /* If the shrink threshold of the buckets in use has been reached, - rehash into a smaller table. */ - - if (table->n_buckets_used - < table->tuning->shrink_threshold * table->n_buckets) - { - /* Check more fully, before starting real work. If tuning arguments - became invalid, the second check will rely on proper defaults. */ - check_tuning (table); - if (table->n_buckets_used - < table->tuning->shrink_threshold * table->n_buckets) - { - const Hash_tuning *tuning = table->tuning; - size_t candidate = - (tuning->is_n_buckets - ? table->n_buckets * tuning->shrink_factor - : (table->n_buckets * tuning->shrink_factor - * tuning->growth_threshold)); - - if (!hash_rehash (table, candidate)) - { - /* Failure to allocate memory in an attempt to - shrink the table is not fatal. But since memory - is low, we can at least be kind and free any - spare entries, rather than keeping them tied up - in the free entry list. */ -#if ! USE_OBSTACK - struct hash_entry *cursor = table->free_entry_list; - struct hash_entry *next; - while (cursor) - { - next = cursor->next; - free (cursor); - cursor = next; - } - table->free_entry_list = NULL; -#endif - } - } - } - } - - return data; -} - -/* Testing. */ - -#if TESTING - -void -hash_print (const Hash_table *table) -{ - struct hash_entry *bucket = (struct hash_entry *) table->bucket; - - for ( ; bucket < table->bucket_limit; bucket++) - { - struct hash_entry *cursor; - - if (bucket) - printf ("%lu:\n", (unsigned long int) (bucket - table->bucket)); - - for (cursor = bucket; cursor; cursor = cursor->next) - { - char const *s = cursor->data; - /* FIXME */ - if (s) - printf (" %s\n", s); - } - } -} - -#endif /* TESTING */ diff --git a/gnulib/lib/hash.h b/gnulib/lib/hash.h deleted file mode 100644 index 9f694be..0000000 --- a/gnulib/lib/hash.h +++ /dev/null @@ -1,92 +0,0 @@ -/* hash - hashing table processing. - Copyright (C) 1998-1999, 2001, 2003, 2009-2011 Free Software Foundation, - Inc. - Written by Jim Meyering , 1998. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* A generic hash table package. */ - -/* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use - obstacks instead of malloc, and recompile `hash.c' with same setting. */ - -#ifndef HASH_H_ -# define HASH_H_ - -# include -# include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The warn_unused_result attribute appeared first in gcc-3.4.0. */ -# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_WUR __attribute__ ((__warn_unused_result__)) -# else -# define _GL_ATTRIBUTE_WUR /* empty */ -# endif - -typedef size_t (*Hash_hasher) (const void *, size_t); -typedef bool (*Hash_comparator) (const void *, const void *); -typedef void (*Hash_data_freer) (void *); -typedef bool (*Hash_processor) (void *, void *); - -struct hash_tuning - { - /* This structure is mainly used for `hash_initialize', see the block - documentation of `hash_reset_tuning' for more complete comments. */ - - float shrink_threshold; /* ratio of used buckets to trigger a shrink */ - float shrink_factor; /* ratio of new smaller size to original size */ - float growth_threshold; /* ratio of used buckets to trigger a growth */ - float growth_factor; /* ratio of new bigger size to original size */ - bool is_n_buckets; /* if CANDIDATE really means table size */ - }; - -typedef struct hash_tuning Hash_tuning; - -struct hash_table; - -typedef struct hash_table Hash_table; - -/* Information and lookup. */ -size_t hash_get_n_buckets (const Hash_table *); -size_t hash_get_n_buckets_used (const Hash_table *); -size_t hash_get_n_entries (const Hash_table *); -size_t hash_get_max_bucket_length (const Hash_table *); -bool hash_table_ok (const Hash_table *); -void hash_print_statistics (const Hash_table *, FILE *); -void *hash_lookup (const Hash_table *, const void *); - -/* Walking. */ -void *hash_get_first (const Hash_table *); -void *hash_get_next (const Hash_table *, const void *); -size_t hash_get_entries (const Hash_table *, void **, size_t); -size_t hash_do_for_each (const Hash_table *, Hash_processor, void *); - -/* Allocation and clean-up. */ -size_t hash_string (const char *, size_t); -void hash_reset_tuning (Hash_tuning *); -Hash_table *hash_initialize (size_t, const Hash_tuning *, - Hash_hasher, Hash_comparator, - Hash_data_freer) _GL_ATTRIBUTE_WUR; -void hash_clear (Hash_table *); -void hash_free (Hash_table *); - -/* Insertion and deletion. */ -bool hash_rehash (Hash_table *, size_t) _GL_ATTRIBUTE_WUR; -void *hash_insert (Hash_table *, const void *) _GL_ATTRIBUTE_WUR; -int hash_insert0 (Hash_table *table, const void *entry, - const void **matched_ent); -void *hash_delete (Hash_table *, const void *); - -#endif diff --git a/gnulib/lib/human.c b/gnulib/lib/human.c deleted file mode 100644 index 4c261da..0000000 --- a/gnulib/lib/human.c +++ /dev/null @@ -1,470 +0,0 @@ -/* human.c -- print human readable file size - - Copyright (C) 1996-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert and Larry McVoy. */ - -#include - -#include "human.h" - -#include -#include -#include -#include - -#include -#include -#include - -/* The maximum length of a suffix like "KiB". */ -#define HUMAN_READABLE_SUFFIX_LENGTH_MAX 3 - -static const char power_letter[] = -{ - 0, /* not used */ - 'K', /* kibi ('k' for kilo is a special case) */ - 'M', /* mega or mebi */ - 'G', /* giga or gibi */ - 'T', /* tera or tebi */ - 'P', /* peta or pebi */ - 'E', /* exa or exbi */ - 'Z', /* zetta or 2**70 */ - 'Y' /* yotta or 2**80 */ -}; - - -/* If INEXACT_STYLE is not human_round_to_nearest, and if easily - possible, adjust VALUE according to the style. */ - -static long double -adjust_value (int inexact_style, long double value) -{ - /* Do not use the floorl or ceill functions, as that would mean - checking for their presence and possibly linking with the - standard math library, which is a porting pain. So leave the - value alone if it is too large to easily round. */ - if (inexact_style != human_round_to_nearest && value < UINTMAX_MAX) - { - uintmax_t u = value; - value = u + (inexact_style == human_ceiling && u != value); - } - - return value; -} - -/* Group the digits of NUMBER according to the grouping rules of the - current locale. NUMBER contains NUMBERLEN digits. Modify the - bytes pointed to by NUMBER in place, subtracting 1 from NUMBER for - each byte inserted. Return the starting address of the modified - number. - - To group the digits, use GROUPING and THOUSANDS_SEP as in `struct - lconv' from . */ - -static char * -group_number (char *number, size_t numberlen, - char const *grouping, char const *thousands_sep) -{ - register char *d; - size_t grouplen = SIZE_MAX; - size_t thousands_seplen = strlen (thousands_sep); - size_t i = numberlen; - - /* The maximum possible value for NUMBERLEN is the number of digits - in the square of the largest uintmax_t, so double the size needed. */ - char buf[2 * INT_STRLEN_BOUND (uintmax_t) + 1]; - - memcpy (buf, number, numberlen); - d = number + numberlen; - - for (;;) - { - unsigned char g = *grouping; - - if (g) - { - grouplen = g < CHAR_MAX ? g : i; - grouping++; - } - - if (i < grouplen) - grouplen = i; - - d -= grouplen; - i -= grouplen; - memcpy (d, buf + i, grouplen); - if (i == 0) - return d; - - d -= thousands_seplen; - memcpy (d, thousands_sep, thousands_seplen); - } -} - -/* Convert N to a human readable format in BUF, using the options OPTS. - - N is expressed in units of FROM_BLOCK_SIZE. FROM_BLOCK_SIZE must - be nonnegative. - - Use units of TO_BLOCK_SIZE in the output number. TO_BLOCK_SIZE - must be positive. - - Use (OPTS & (human_round_to_nearest | human_floor | human_ceiling)) - to determine whether to take the ceiling or floor of any result - that cannot be expressed exactly. - - If (OPTS & human_group_digits), group the thousands digits - according to the locale, e.g., `1,000,000' in an American English - locale. - - If (OPTS & human_autoscale), deduce the output block size - automatically; TO_BLOCK_SIZE must be 1 but it has no effect on the - output. Use powers of 1024 if (OPTS & human_base_1024), and powers - of 1000 otherwise. For example, assuming powers of 1024, 8500 - would be converted to 8.3, 133456345 to 127, 56990456345 to 53, and - so on. Numbers smaller than the power aren't modified. - human_autoscale is normally used together with human_SI. - - If (OPTS & human_space_before_unit), use a space to separate the - number from any suffix that is appended as described below. - - If (OPTS & human_SI), append an SI prefix indicating which power is - being used. If in addition (OPTS & human_B), append "B" (if base - 1000) or "iB" (if base 1024) to the SI prefix. When ((OPTS & - human_SI) && ! (OPTS & human_autoscale)), TO_BLOCK_SIZE must be a - power of 1024 or of 1000, depending on (OPTS & - human_base_1024). */ - -char * -human_readable (uintmax_t n, char *buf, int opts, - uintmax_t from_block_size, uintmax_t to_block_size) -{ - int inexact_style = - opts & (human_round_to_nearest | human_floor | human_ceiling); - unsigned int base = opts & human_base_1024 ? 1024 : 1000; - uintmax_t amt; - int tenths; - int exponent = -1; - int exponent_max = sizeof power_letter - 1; - char *p; - char *psuffix; - char const *integerlim; - - /* 0 means adjusted N == AMT.TENTHS; - 1 means AMT.TENTHS < adjusted N < AMT.TENTHS + 0.05; - 2 means adjusted N == AMT.TENTHS + 0.05; - 3 means AMT.TENTHS + 0.05 < adjusted N < AMT.TENTHS + 0.1. */ - int rounding; - - char const *decimal_point = "."; - size_t decimal_pointlen = 1; - char const *grouping = ""; - char const *thousands_sep = ""; - struct lconv const *l = localeconv (); - size_t pointlen = strlen (l->decimal_point); - if (0 < pointlen && pointlen <= MB_LEN_MAX) - { - decimal_point = l->decimal_point; - decimal_pointlen = pointlen; - } - grouping = l->grouping; - if (strlen (l->thousands_sep) <= MB_LEN_MAX) - thousands_sep = l->thousands_sep; - - psuffix = buf + LONGEST_HUMAN_READABLE - HUMAN_READABLE_SUFFIX_LENGTH_MAX; - p = psuffix; - - /* Adjust AMT out of FROM_BLOCK_SIZE units and into TO_BLOCK_SIZE - units. If this can be done exactly with integer arithmetic, do - not use floating point operations. */ - if (to_block_size <= from_block_size) - { - if (from_block_size % to_block_size == 0) - { - uintmax_t multiplier = from_block_size / to_block_size; - amt = n * multiplier; - if (amt / multiplier == n) - { - tenths = 0; - rounding = 0; - goto use_integer_arithmetic; - } - } - } - else if (from_block_size != 0 && to_block_size % from_block_size == 0) - { - uintmax_t divisor = to_block_size / from_block_size; - uintmax_t r10 = (n % divisor) * 10; - uintmax_t r2 = (r10 % divisor) * 2; - amt = n / divisor; - tenths = r10 / divisor; - rounding = r2 < divisor ? 0 < r2 : 2 + (divisor < r2); - goto use_integer_arithmetic; - } - - { - /* Either the result cannot be computed easily using uintmax_t, - or from_block_size is zero. Fall back on floating point. - FIXME: This can yield answers that are slightly off. */ - - long double dto_block_size = to_block_size; - long double damt = n * (from_block_size / dto_block_size); - size_t buflen; - size_t nonintegerlen; - - if (! (opts & human_autoscale)) - { - sprintf (buf, "%.0Lf", adjust_value (inexact_style, damt)); - buflen = strlen (buf); - nonintegerlen = 0; - } - else - { - long double e = 1; - exponent = 0; - - do - { - e *= base; - exponent++; - } - while (e * base <= damt && exponent < exponent_max); - - damt /= e; - - sprintf (buf, "%.1Lf", adjust_value (inexact_style, damt)); - buflen = strlen (buf); - nonintegerlen = decimal_pointlen + 1; - - if (1 + nonintegerlen + ! (opts & human_base_1024) < buflen - || ((opts & human_suppress_point_zero) - && buf[buflen - 1] == '0')) - { - sprintf (buf, "%.0Lf", - adjust_value (inexact_style, damt * 10) / 10); - buflen = strlen (buf); - nonintegerlen = 0; - } - } - - p = psuffix - buflen; - memmove (p, buf, buflen); - integerlim = p + buflen - nonintegerlen; - } - goto do_grouping; - - use_integer_arithmetic: - { - /* The computation can be done exactly, with integer arithmetic. - - Use power of BASE notation if requested and if adjusted AMT is - large enough. */ - - if (opts & human_autoscale) - { - exponent = 0; - - if (base <= amt) - { - do - { - unsigned int r10 = (amt % base) * 10 + tenths; - unsigned int r2 = (r10 % base) * 2 + (rounding >> 1); - amt /= base; - tenths = r10 / base; - rounding = (r2 < base - ? (r2 + rounding) != 0 - : 2 + (base < r2 + rounding)); - exponent++; - } - while (base <= amt && exponent < exponent_max); - - if (amt < 10) - { - if (inexact_style == human_round_to_nearest - ? 2 < rounding + (tenths & 1) - : inexact_style == human_ceiling && 0 < rounding) - { - tenths++; - rounding = 0; - - if (tenths == 10) - { - amt++; - tenths = 0; - } - } - - if (amt < 10 - && (tenths || ! (opts & human_suppress_point_zero))) - { - *--p = '0' + tenths; - p -= decimal_pointlen; - memcpy (p, decimal_point, decimal_pointlen); - tenths = rounding = 0; - } - } - } - } - - if (inexact_style == human_round_to_nearest - ? 5 < tenths + (0 < rounding + (amt & 1)) - : inexact_style == human_ceiling && 0 < tenths + rounding) - { - amt++; - - if ((opts & human_autoscale) - && amt == base && exponent < exponent_max) - { - exponent++; - if (! (opts & human_suppress_point_zero)) - { - *--p = '0'; - p -= decimal_pointlen; - memcpy (p, decimal_point, decimal_pointlen); - } - amt = 1; - } - } - - integerlim = p; - - do - { - int digit = amt % 10; - *--p = digit + '0'; - } - while ((amt /= 10) != 0); - } - - do_grouping: - if (opts & human_group_digits) - p = group_number (p, integerlim - p, grouping, thousands_sep); - - if (opts & human_SI) - { - if (exponent < 0) - { - uintmax_t power; - exponent = 0; - for (power = 1; power < to_block_size; power *= base) - if (++exponent == exponent_max) - break; - } - - if ((exponent | (opts & human_B)) && (opts & human_space_before_unit)) - *psuffix++ = ' '; - - if (exponent) - *psuffix++ = (! (opts & human_base_1024) && exponent == 1 - ? 'k' - : power_letter[exponent]); - - if (opts & human_B) - { - if ((opts & human_base_1024) && exponent) - *psuffix++ = 'i'; - *psuffix++ = 'B'; - } - } - - *psuffix = '\0'; - - return p; -} - - -/* The default block size used for output. This number may change in - the future as disks get larger. */ -#ifndef DEFAULT_BLOCK_SIZE -# define DEFAULT_BLOCK_SIZE 1024 -#endif - -static char const *const block_size_args[] = { "human-readable", "si", 0 }; -static int const block_size_opts[] = - { - human_autoscale + human_SI + human_base_1024, - human_autoscale + human_SI - }; - -static uintmax_t -default_block_size (void) -{ - return getenv ("POSIXLY_CORRECT") ? 512 : DEFAULT_BLOCK_SIZE; -} - -static strtol_error -humblock (char const *spec, uintmax_t *block_size, int *options) -{ - int i; - int opts = 0; - - if (! spec - && ! (spec = getenv ("BLOCK_SIZE")) - && ! (spec = getenv ("BLOCKSIZE"))) - *block_size = default_block_size (); - else - { - if (*spec == '\'') - { - opts |= human_group_digits; - spec++; - } - - if (0 <= (i = ARGMATCH (spec, block_size_args, block_size_opts))) - { - opts |= block_size_opts[i]; - *block_size = 1; - } - else - { - char *ptr; - strtol_error e = xstrtoumax (spec, &ptr, 0, block_size, - "eEgGkKmMpPtTyYzZ0"); - if (e != LONGINT_OK) - { - *options = 0; - return e; - } - for (; ! ('0' <= *spec && *spec <= '9'); spec++) - if (spec == ptr) - { - opts |= human_SI; - if (ptr[-1] == 'B') - opts |= human_B; - if (ptr[-1] != 'B' || ptr[-2] == 'i') - opts |= human_base_1024; - break; - } - } - } - - *options = opts; - return LONGINT_OK; -} - -enum strtol_error -human_options (char const *spec, int *opts, uintmax_t *block_size) -{ - strtol_error e = humblock (spec, block_size, opts); - if (*block_size == 0) - { - *block_size = default_block_size (); - e = LONGINT_INVALID; - } - return e; -} diff --git a/gnulib/lib/human.h b/gnulib/lib/human.h deleted file mode 100644 index fb8a089..0000000 --- a/gnulib/lib/human.h +++ /dev/null @@ -1,83 +0,0 @@ -/* human.h -- print human readable file size - - Copyright (C) 1996-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert and Larry McVoy. */ - -#ifndef HUMAN_H_ -# define HUMAN_H_ 1 - -# include -# include -# include -# include - -# include - -/* A conservative bound on the maximum length of a human-readable string. - The output can be the square of the largest uintmax_t, so double - its size before converting to a bound. - log10 (2.0) < 146/485. Add 1 for integer division truncation. - Also, the output can have a thousands separator between every digit, - so multiply by MB_LEN_MAX + 1 and then subtract MB_LEN_MAX. - Append 1 for a space before the suffix. - Finally, append 3, the maximum length of a suffix. */ -# define LONGEST_HUMAN_READABLE \ - ((2 * sizeof (uintmax_t) * CHAR_BIT * 146 / 485 + 1) * (MB_LEN_MAX + 1) \ - - MB_LEN_MAX + 1 + 3) - -/* Options for human_readable. */ -enum -{ - /* Unless otherwise specified these options may be ORed together. */ - - /* The following three options are mutually exclusive. */ - /* Round to plus infinity (default). */ - human_ceiling = 0, - /* Round to nearest, ties to even. */ - human_round_to_nearest = 1, - /* Round to minus infinity. */ - human_floor = 2, - - /* Group digits together, e.g. `1,000,000'. This uses the - locale-defined grouping; the traditional C locale does not group, - so this has effect only if some other locale is in use. */ - human_group_digits = 4, - - /* When autoscaling, suppress ".0" at end. */ - human_suppress_point_zero = 8, - - /* Scale output and use SI-style units, ignoring the output block size. */ - human_autoscale = 16, - - /* Prefer base 1024 to base 1000. */ - human_base_1024 = 32, - - /* Prepend " " before unit symbol. */ - human_space_before_unit = 64, - - /* Append SI prefix, e.g. "k" or "M". */ - human_SI = 128, - - /* Append "B" (if base 1000) or "iB" (if base 1024) to SI prefix. */ - human_B = 256 -}; - -char *human_readable (uintmax_t, char *, int, uintmax_t, uintmax_t); - -enum strtol_error human_options (char const *, int *, uintmax_t *); - -#endif /* HUMAN_H_ */ diff --git a/gnulib/lib/i-ring.c b/gnulib/lib/i-ring.c deleted file mode 100644 index b603b0b..0000000 --- a/gnulib/lib/i-ring.c +++ /dev/null @@ -1,68 +0,0 @@ -/* a simple ring buffer - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include -#include "i-ring.h" - -#include - -void -i_ring_init (I_ring *ir, int default_val) -{ - int i; - ir->ir_empty = true; - ir->ir_front = 0; - ir->ir_back = 0; - for (i = 0; i < I_RING_SIZE; i++) - ir->ir_data[i] = default_val; - ir->ir_default_val = default_val; -} - -bool -i_ring_empty (I_ring const *ir) -{ - return ir->ir_empty; -} - -int -i_ring_push (I_ring *ir, int val) -{ - unsigned int dest_idx = (ir->ir_front + !ir->ir_empty) % I_RING_SIZE; - int old_val = ir->ir_data[dest_idx]; - ir->ir_data[dest_idx] = val; - ir->ir_front = dest_idx; - if (dest_idx == ir->ir_back) - ir->ir_back = (ir->ir_back + !ir->ir_empty) % I_RING_SIZE; - ir->ir_empty = false; - return old_val; -} - -int -i_ring_pop (I_ring *ir) -{ - int top_val; - if (i_ring_empty (ir)) - abort (); - top_val = ir->ir_data[ir->ir_front]; - ir->ir_data[ir->ir_front] = ir->ir_default_val; - if (ir->ir_front == ir->ir_back) - ir->ir_empty = true; - else - ir->ir_front = ((ir->ir_front + I_RING_SIZE - 1) % I_RING_SIZE); - return top_val; -} diff --git a/gnulib/lib/i-ring.h b/gnulib/lib/i-ring.h deleted file mode 100644 index f0700b6..0000000 --- a/gnulib/lib/i-ring.h +++ /dev/null @@ -1,44 +0,0 @@ -/* definitions for a simple ring buffer - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include -#include "verify.h" - -enum { I_RING_SIZE = 4 }; -verify (1 <= I_RING_SIZE); - -/* When ir_empty is true, the ring is empty. - Otherwise, ir_data[B..F] are defined, where B..F is the contiguous - range of indices, modulo I_RING_SIZE, from back to front, inclusive. - Undefined elements of ir_data are always set to ir_default_val. - Popping from an empty ring aborts. - Pushing onto a full ring returns the displaced value. - An empty ring has F==B and ir_empty == true. - A ring with one entry still has F==B, but now ir_empty == false. */ -struct I_ring -{ - int ir_data[I_RING_SIZE]; - int ir_default_val; - unsigned int ir_front; - unsigned int ir_back; - bool ir_empty; -}; -typedef struct I_ring I_ring; - -void i_ring_init (I_ring *ir, int ir_default_val); -int i_ring_push (I_ring *ir, int val); -int i_ring_pop (I_ring *ir); -bool i_ring_empty (I_ring const *ir); diff --git a/gnulib/lib/idcache.c b/gnulib/lib/idcache.c deleted file mode 100644 index 9065cc8..0000000 --- a/gnulib/lib/idcache.c +++ /dev/null @@ -1,227 +0,0 @@ -/* idcache.c -- map user and group IDs, cached for speed - - Copyright (C) 1985, 1988-1990, 1997-1998, 2003, 2005-2007, 2009-2011 Free - Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "idcache.h" -#include -#include -#include -#include -#include - -#include - -#include "xalloc.h" - -#ifdef __DJGPP__ -static char digits[] = "0123456789"; -#endif - -struct userid -{ - union - { - uid_t u; - gid_t g; - } id; - struct userid *next; - char name[FLEXIBLE_ARRAY_MEMBER]; -}; - -/* FIXME: provide a function to free any malloc'd storage and reset lists, - so that an application can use code like this just before exiting: - #ifdef lint - idcache_clear (); - #endif -*/ - -static struct userid *user_alist; - -/* Each entry on list is a user name for which the first lookup failed. */ -static struct userid *nouser_alist; - -/* Use the same struct as for userids. */ -static struct userid *group_alist; - -/* Each entry on list is a group name for which the first lookup failed. */ -static struct userid *nogroup_alist; - -/* Translate UID to a login name, with cache, or NULL if unresolved. */ - -char * -getuser (uid_t uid) -{ - struct userid *tail; - struct userid *match = NULL; - - for (tail = user_alist; tail; tail = tail->next) - { - if (tail->id.u == uid) - { - match = tail; - break; - } - } - - if (match == NULL) - { - struct passwd *pwent = getpwuid (uid); - char const *name = pwent ? pwent->pw_name : ""; - match = xmalloc (offsetof (struct userid, name) + strlen (name) + 1); - match->id.u = uid; - strcpy (match->name, name); - - /* Add to the head of the list, so most recently used is first. */ - match->next = user_alist; - user_alist = match; - } - - return match->name[0] ? match->name : NULL; -} - -/* Translate USER to a UID, with cache. - Return NULL if there is no such user. - (We also cache which user names have no passwd entry, - so we don't keep looking them up.) */ - -uid_t * -getuidbyname (const char *user) -{ - struct userid *tail; - struct passwd *pwent; - - for (tail = user_alist; tail; tail = tail->next) - /* Avoid a function call for the most common case. */ - if (*tail->name == *user && !strcmp (tail->name, user)) - return &tail->id.u; - - for (tail = nouser_alist; tail; tail = tail->next) - /* Avoid a function call for the most common case. */ - if (*tail->name == *user && !strcmp (tail->name, user)) - return NULL; - - pwent = getpwnam (user); -#ifdef __DJGPP__ - /* We need to pretend to be the user USER, to make - pwd functions know about an arbitrary user name. */ - if (!pwent && strspn (user, digits) < strlen (user)) - { - setenv ("USER", user, 1); - pwent = getpwnam (user); /* now it will succeed */ - } -#endif - - tail = xmalloc (offsetof (struct userid, name) + strlen (user) + 1); - strcpy (tail->name, user); - - /* Add to the head of the list, so most recently used is first. */ - if (pwent) - { - tail->id.u = pwent->pw_uid; - tail->next = user_alist; - user_alist = tail; - return &tail->id.u; - } - - tail->next = nouser_alist; - nouser_alist = tail; - return NULL; -} - -/* Translate GID to a group name, with cache, or NULL if unresolved. */ - -char * -getgroup (gid_t gid) -{ - struct userid *tail; - struct userid *match = NULL; - - for (tail = group_alist; tail; tail = tail->next) - { - if (tail->id.g == gid) - { - match = tail; - break; - } - } - - if (match == NULL) - { - struct group *grent = getgrgid (gid); - char const *name = grent ? grent->gr_name : ""; - match = xmalloc (offsetof (struct userid, name) + strlen (name) + 1); - match->id.g = gid; - strcpy (match->name, name); - - /* Add to the head of the list, so most recently used is first. */ - match->next = group_alist; - group_alist = match; - } - - return match->name[0] ? match->name : NULL; -} - -/* Translate GROUP to a GID, with cache. - Return NULL if there is no such group. - (We also cache which group names have no group entry, - so we don't keep looking them up.) */ - -gid_t * -getgidbyname (const char *group) -{ - struct userid *tail; - struct group *grent; - - for (tail = group_alist; tail; tail = tail->next) - /* Avoid a function call for the most common case. */ - if (*tail->name == *group && !strcmp (tail->name, group)) - return &tail->id.g; - - for (tail = nogroup_alist; tail; tail = tail->next) - /* Avoid a function call for the most common case. */ - if (*tail->name == *group && !strcmp (tail->name, group)) - return NULL; - - grent = getgrnam (group); -#ifdef __DJGPP__ - /* We need to pretend to belong to group GROUP, to make - grp functions know about an arbitrary group name. */ - if (!grent && strspn (group, digits) < strlen (group)) - { - setenv ("GROUP", group, 1); - grent = getgrnam (group); /* now it will succeed */ - } -#endif - - tail = xmalloc (offsetof (struct userid, name) + strlen (group) + 1); - strcpy (tail->name, group); - - /* Add to the head of the list, so most recently used is first. */ - if (grent) - { - tail->id.g = grent->gr_gid; - tail->next = group_alist; - group_alist = tail; - return &tail->id.g; - } - - tail->next = nogroup_alist; - nogroup_alist = tail; - return NULL; -} diff --git a/gnulib/lib/intprops.h b/gnulib/lib/intprops.h deleted file mode 100644 index 58b1b3f..0000000 --- a/gnulib/lib/intprops.h +++ /dev/null @@ -1,86 +0,0 @@ -/* intprops.h -- properties of integer types - - Copyright (C) 2001-2005, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#ifndef GL_INTPROPS_H -# define GL_INTPROPS_H - -# include - -/* The extra casts in the following macros work around compiler bugs, - e.g., in Cray C 5.0.3.0. */ - -/* True if the arithmetic type T is an integer type. bool counts as - an integer. */ -# define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) - -/* True if negative values of the signed integer type T use two's - complement, ones' complement, or signed magnitude representation, - respectively. Much GNU code assumes two's complement, but some - people like to be portable to all possible C hosts. */ -# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) -# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) -# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) - -/* True if the arithmetic type T is signed. */ -# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - -/* The maximum and minimum values for the integer type T. These - macros have undefined behavior if T is signed and has padding bits. - If this is a problem for you, please let us know how to fix it for - your host. */ -# define TYPE_MINIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) 0 \ - : TYPE_SIGNED_MAGNITUDE (t) \ - ? ~ (t) 0 \ - : ~ TYPE_MAXIMUM (t))) -# define TYPE_MAXIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) - -/* Return zero if T can be determined to be an unsigned type. - Otherwise, return 1. - When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a - tighter bound. Otherwise, it overestimates the true bound by one byte - when applied to unsigned types of size 2, 4, 16, ... bytes. - The symbol signed_type_or_expr__ is private to this header file. */ -# if __GNUC__ >= 2 -# define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t)) -# else -# define signed_type_or_expr__(t) 1 -# endif - -/* Bound on length of the string representing an unsigned integer - value representable in B bits. log10 (2.0) < 146/485. The - smallest value of B where this bound is not tight is 2621. */ -# define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485) - -/* Bound on length of the string representing an integer type or expression T. - Subtract 1 for the sign bit if T is signed, and then add 1 more for - a minus sign if needed. */ -# define INT_STRLEN_BOUND(t) \ - (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \ - + signed_type_or_expr__ (t)) - -/* Bound on buffer size needed to represent an integer type or expression T, - including the terminating null. */ -# define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) - -#endif /* GL_INTPROPS_H */ diff --git a/gnulib/lib/inttypes.in.h b/gnulib/lib/inttypes.in.h deleted file mode 100644 index 6a8f46d..0000000 --- a/gnulib/lib/inttypes.in.h +++ /dev/null @@ -1,1108 +0,0 @@ -/* Copyright (C) 2006-2011 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Derek Price. - This file is part of gnulib. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* Include the original if it exists, and if this file - has not been included yet or if this file includes gnulib stdint.h - which in turn includes this file. - The include_next requires a split double-inclusion guard. */ -#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H -# if @HAVE_INTTYPES_H@ -# @INCLUDE_NEXT@ @NEXT_INTTYPES_H@ -# endif -#endif - -#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H -#define INTTYPES_H - -/* Include or the gnulib replacement. - But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -# include -#endif -/* Get CHAR_BIT. */ -#include - -#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) -# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." -#endif - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* 7.8.1 Macros for format specifiers */ - -#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS - -# if defined _TNS_R_TARGET - /* Tandem NonStop R series and compatible platforms released before - July 2005 support %Ld but not %lld. */ -# define _LONG_LONG_FORMAT_PREFIX "L" -# else -# define _LONG_LONG_FORMAT_PREFIX "ll" -# endif - -# if !defined PRId8 || @PRI_MACROS_BROKEN@ -# undef PRId8 -# ifdef INT8_MAX -# define PRId8 "d" -# endif -# endif -# if !defined PRIi8 || @PRI_MACROS_BROKEN@ -# undef PRIi8 -# ifdef INT8_MAX -# define PRIi8 "i" -# endif -# endif -# if !defined PRIo8 || @PRI_MACROS_BROKEN@ -# undef PRIo8 -# ifdef UINT8_MAX -# define PRIo8 "o" -# endif -# endif -# if !defined PRIu8 || @PRI_MACROS_BROKEN@ -# undef PRIu8 -# ifdef UINT8_MAX -# define PRIu8 "u" -# endif -# endif -# if !defined PRIx8 || @PRI_MACROS_BROKEN@ -# undef PRIx8 -# ifdef UINT8_MAX -# define PRIx8 "x" -# endif -# endif -# if !defined PRIX8 || @PRI_MACROS_BROKEN@ -# undef PRIX8 -# ifdef UINT8_MAX -# define PRIX8 "X" -# endif -# endif -# if !defined PRId16 || @PRI_MACROS_BROKEN@ -# undef PRId16 -# ifdef INT16_MAX -# define PRId16 "d" -# endif -# endif -# if !defined PRIi16 || @PRI_MACROS_BROKEN@ -# undef PRIi16 -# ifdef INT16_MAX -# define PRIi16 "i" -# endif -# endif -# if !defined PRIo16 || @PRI_MACROS_BROKEN@ -# undef PRIo16 -# ifdef UINT16_MAX -# define PRIo16 "o" -# endif -# endif -# if !defined PRIu16 || @PRI_MACROS_BROKEN@ -# undef PRIu16 -# ifdef UINT16_MAX -# define PRIu16 "u" -# endif -# endif -# if !defined PRIx16 || @PRI_MACROS_BROKEN@ -# undef PRIx16 -# ifdef UINT16_MAX -# define PRIx16 "x" -# endif -# endif -# if !defined PRIX16 || @PRI_MACROS_BROKEN@ -# undef PRIX16 -# ifdef UINT16_MAX -# define PRIX16 "X" -# endif -# endif -# if !defined PRId32 || @PRI_MACROS_BROKEN@ -# undef PRId32 -# ifdef INT32_MAX -# define PRId32 "d" -# endif -# endif -# if !defined PRIi32 || @PRI_MACROS_BROKEN@ -# undef PRIi32 -# ifdef INT32_MAX -# define PRIi32 "i" -# endif -# endif -# if !defined PRIo32 || @PRI_MACROS_BROKEN@ -# undef PRIo32 -# ifdef UINT32_MAX -# define PRIo32 "o" -# endif -# endif -# if !defined PRIu32 || @PRI_MACROS_BROKEN@ -# undef PRIu32 -# ifdef UINT32_MAX -# define PRIu32 "u" -# endif -# endif -# if !defined PRIx32 || @PRI_MACROS_BROKEN@ -# undef PRIx32 -# ifdef UINT32_MAX -# define PRIx32 "x" -# endif -# endif -# if !defined PRIX32 || @PRI_MACROS_BROKEN@ -# undef PRIX32 -# ifdef UINT32_MAX -# define PRIX32 "X" -# endif -# endif -# ifdef INT64_MAX -# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) -# define _PRI64_PREFIX "l" -# elif defined _MSC_VER || defined __MINGW32__ -# define _PRI64_PREFIX "I64" -# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX -# endif -# if !defined PRId64 || @PRI_MACROS_BROKEN@ -# undef PRId64 -# define PRId64 _PRI64_PREFIX "d" -# endif -# if !defined PRIi64 || @PRI_MACROS_BROKEN@ -# undef PRIi64 -# define PRIi64 _PRI64_PREFIX "i" -# endif -# endif -# ifdef UINT64_MAX -# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) -# define _PRIu64_PREFIX "l" -# elif defined _MSC_VER || defined __MINGW32__ -# define _PRIu64_PREFIX "I64" -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX -# endif -# if !defined PRIo64 || @PRI_MACROS_BROKEN@ -# undef PRIo64 -# define PRIo64 _PRIu64_PREFIX "o" -# endif -# if !defined PRIu64 || @PRI_MACROS_BROKEN@ -# undef PRIu64 -# define PRIu64 _PRIu64_PREFIX "u" -# endif -# if !defined PRIx64 || @PRI_MACROS_BROKEN@ -# undef PRIx64 -# define PRIx64 _PRIu64_PREFIX "x" -# endif -# if !defined PRIX64 || @PRI_MACROS_BROKEN@ -# undef PRIX64 -# define PRIX64 _PRIu64_PREFIX "X" -# endif -# endif - -# if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIdLEAST8 -# define PRIdLEAST8 "d" -# endif -# if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIiLEAST8 -# define PRIiLEAST8 "i" -# endif -# if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIoLEAST8 -# define PRIoLEAST8 "o" -# endif -# if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIuLEAST8 -# define PRIuLEAST8 "u" -# endif -# if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIxLEAST8 -# define PRIxLEAST8 "x" -# endif -# if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@ -# undef PRIXLEAST8 -# define PRIXLEAST8 "X" -# endif -# if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIdLEAST16 -# define PRIdLEAST16 "d" -# endif -# if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIiLEAST16 -# define PRIiLEAST16 "i" -# endif -# if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIoLEAST16 -# define PRIoLEAST16 "o" -# endif -# if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIuLEAST16 -# define PRIuLEAST16 "u" -# endif -# if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIxLEAST16 -# define PRIxLEAST16 "x" -# endif -# if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@ -# undef PRIXLEAST16 -# define PRIXLEAST16 "X" -# endif -# if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIdLEAST32 -# define PRIdLEAST32 "d" -# endif -# if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIiLEAST32 -# define PRIiLEAST32 "i" -# endif -# if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIoLEAST32 -# define PRIoLEAST32 "o" -# endif -# if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIuLEAST32 -# define PRIuLEAST32 "u" -# endif -# if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIxLEAST32 -# define PRIxLEAST32 "x" -# endif -# if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@ -# undef PRIXLEAST32 -# define PRIXLEAST32 "X" -# endif -# ifdef INT64_MAX -# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIdLEAST64 -# define PRIdLEAST64 PRId64 -# endif -# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIiLEAST64 -# define PRIiLEAST64 PRIi64 -# endif -# endif -# ifdef UINT64_MAX -# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIoLEAST64 -# define PRIoLEAST64 PRIo64 -# endif -# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIuLEAST64 -# define PRIuLEAST64 PRIu64 -# endif -# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIxLEAST64 -# define PRIxLEAST64 PRIx64 -# endif -# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@ -# undef PRIXLEAST64 -# define PRIXLEAST64 PRIX64 -# endif -# endif - -# if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIdFAST8 -# if INT_FAST8_MAX > INT32_MAX -# define PRIdFAST8 PRId64 -# else -# define PRIdFAST8 "d" -# endif -# endif -# if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIiFAST8 -# if INT_FAST8_MAX > INT32_MAX -# define PRIiFAST8 PRIi64 -# else -# define PRIiFAST8 "i" -# endif -# endif -# if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIoFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define PRIoFAST8 PRIo64 -# else -# define PRIoFAST8 "o" -# endif -# endif -# if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIuFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define PRIuFAST8 PRIu64 -# else -# define PRIuFAST8 "u" -# endif -# endif -# if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIxFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define PRIxFAST8 PRIx64 -# else -# define PRIxFAST8 "x" -# endif -# endif -# if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@ -# undef PRIXFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define PRIXFAST8 PRIX64 -# else -# define PRIXFAST8 "X" -# endif -# endif -# if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIdFAST16 -# if INT_FAST16_MAX > INT32_MAX -# define PRIdFAST16 PRId64 -# else -# define PRIdFAST16 "d" -# endif -# endif -# if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIiFAST16 -# if INT_FAST16_MAX > INT32_MAX -# define PRIiFAST16 PRIi64 -# else -# define PRIiFAST16 "i" -# endif -# endif -# if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIoFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define PRIoFAST16 PRIo64 -# else -# define PRIoFAST16 "o" -# endif -# endif -# if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIuFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define PRIuFAST16 PRIu64 -# else -# define PRIuFAST16 "u" -# endif -# endif -# if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIxFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define PRIxFAST16 PRIx64 -# else -# define PRIxFAST16 "x" -# endif -# endif -# if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@ -# undef PRIXFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define PRIXFAST16 PRIX64 -# else -# define PRIXFAST16 "X" -# endif -# endif -# if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIdFAST32 -# if INT_FAST32_MAX > INT32_MAX -# define PRIdFAST32 PRId64 -# else -# define PRIdFAST32 "d" -# endif -# endif -# if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIiFAST32 -# if INT_FAST32_MAX > INT32_MAX -# define PRIiFAST32 PRIi64 -# else -# define PRIiFAST32 "i" -# endif -# endif -# if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIoFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define PRIoFAST32 PRIo64 -# else -# define PRIoFAST32 "o" -# endif -# endif -# if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIuFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define PRIuFAST32 PRIu64 -# else -# define PRIuFAST32 "u" -# endif -# endif -# if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIxFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define PRIxFAST32 PRIx64 -# else -# define PRIxFAST32 "x" -# endif -# endif -# if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@ -# undef PRIXFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define PRIXFAST32 PRIX64 -# else -# define PRIXFAST32 "X" -# endif -# endif -# ifdef INT64_MAX -# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIdFAST64 -# define PRIdFAST64 PRId64 -# endif -# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIiFAST64 -# define PRIiFAST64 PRIi64 -# endif -# endif -# ifdef UINT64_MAX -# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIoFAST64 -# define PRIoFAST64 PRIo64 -# endif -# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIuFAST64 -# define PRIuFAST64 PRIu64 -# endif -# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIxFAST64 -# define PRIxFAST64 PRIx64 -# endif -# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@ -# undef PRIXFAST64 -# define PRIXFAST64 PRIX64 -# endif -# endif - -# if !defined PRIdMAX || @PRI_MACROS_BROKEN@ -# undef PRIdMAX -# if @INT32_MAX_LT_INTMAX_MAX@ -# define PRIdMAX PRId64 -# else -# define PRIdMAX "ld" -# endif -# endif -# if !defined PRIiMAX || @PRI_MACROS_BROKEN@ -# undef PRIiMAX -# if @INT32_MAX_LT_INTMAX_MAX@ -# define PRIiMAX PRIi64 -# else -# define PRIiMAX "li" -# endif -# endif -# if !defined PRIoMAX || @PRI_MACROS_BROKEN@ -# undef PRIoMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define PRIoMAX PRIo64 -# else -# define PRIoMAX "lo" -# endif -# endif -# if !defined PRIuMAX || @PRI_MACROS_BROKEN@ -# undef PRIuMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define PRIuMAX PRIu64 -# else -# define PRIuMAX "lu" -# endif -# endif -# if !defined PRIxMAX || @PRI_MACROS_BROKEN@ -# undef PRIxMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define PRIxMAX PRIx64 -# else -# define PRIxMAX "lx" -# endif -# endif -# if !defined PRIXMAX || @PRI_MACROS_BROKEN@ -# undef PRIXMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define PRIXMAX PRIX64 -# else -# define PRIXMAX "lX" -# endif -# endif - -# if !defined PRIdPTR || @PRI_MACROS_BROKEN@ -# undef PRIdPTR -# ifdef INTPTR_MAX -# define PRIdPTR @PRIPTR_PREFIX@ "d" -# endif -# endif -# if !defined PRIiPTR || @PRI_MACROS_BROKEN@ -# undef PRIiPTR -# ifdef INTPTR_MAX -# define PRIiPTR @PRIPTR_PREFIX@ "i" -# endif -# endif -# if !defined PRIoPTR || @PRI_MACROS_BROKEN@ -# undef PRIoPTR -# ifdef UINTPTR_MAX -# define PRIoPTR @PRIPTR_PREFIX@ "o" -# endif -# endif -# if !defined PRIuPTR || @PRI_MACROS_BROKEN@ -# undef PRIuPTR -# ifdef UINTPTR_MAX -# define PRIuPTR @PRIPTR_PREFIX@ "u" -# endif -# endif -# if !defined PRIxPTR || @PRI_MACROS_BROKEN@ -# undef PRIxPTR -# ifdef UINTPTR_MAX -# define PRIxPTR @PRIPTR_PREFIX@ "x" -# endif -# endif -# if !defined PRIXPTR || @PRI_MACROS_BROKEN@ -# undef PRIXPTR -# ifdef UINTPTR_MAX -# define PRIXPTR @PRIPTR_PREFIX@ "X" -# endif -# endif - -# if !defined SCNd8 || @PRI_MACROS_BROKEN@ -# undef SCNd8 -# ifdef INT8_MAX -# define SCNd8 "hhd" -# endif -# endif -# if !defined SCNi8 || @PRI_MACROS_BROKEN@ -# undef SCNi8 -# ifdef INT8_MAX -# define SCNi8 "hhi" -# endif -# endif -# if !defined SCNo8 || @PRI_MACROS_BROKEN@ -# undef SCNo8 -# ifdef UINT8_MAX -# define SCNo8 "hho" -# endif -# endif -# if !defined SCNu8 || @PRI_MACROS_BROKEN@ -# undef SCNu8 -# ifdef UINT8_MAX -# define SCNu8 "hhu" -# endif -# endif -# if !defined SCNx8 || @PRI_MACROS_BROKEN@ -# undef SCNx8 -# ifdef UINT8_MAX -# define SCNx8 "hhx" -# endif -# endif -# if !defined SCNd16 || @PRI_MACROS_BROKEN@ -# undef SCNd16 -# ifdef INT16_MAX -# define SCNd16 "hd" -# endif -# endif -# if !defined SCNi16 || @PRI_MACROS_BROKEN@ -# undef SCNi16 -# ifdef INT16_MAX -# define SCNi16 "hi" -# endif -# endif -# if !defined SCNo16 || @PRI_MACROS_BROKEN@ -# undef SCNo16 -# ifdef UINT16_MAX -# define SCNo16 "ho" -# endif -# endif -# if !defined SCNu16 || @PRI_MACROS_BROKEN@ -# undef SCNu16 -# ifdef UINT16_MAX -# define SCNu16 "hu" -# endif -# endif -# if !defined SCNx16 || @PRI_MACROS_BROKEN@ -# undef SCNx16 -# ifdef UINT16_MAX -# define SCNx16 "hx" -# endif -# endif -# if !defined SCNd32 || @PRI_MACROS_BROKEN@ -# undef SCNd32 -# ifdef INT32_MAX -# define SCNd32 "d" -# endif -# endif -# if !defined SCNi32 || @PRI_MACROS_BROKEN@ -# undef SCNi32 -# ifdef INT32_MAX -# define SCNi32 "i" -# endif -# endif -# if !defined SCNo32 || @PRI_MACROS_BROKEN@ -# undef SCNo32 -# ifdef UINT32_MAX -# define SCNo32 "o" -# endif -# endif -# if !defined SCNu32 || @PRI_MACROS_BROKEN@ -# undef SCNu32 -# ifdef UINT32_MAX -# define SCNu32 "u" -# endif -# endif -# if !defined SCNx32 || @PRI_MACROS_BROKEN@ -# undef SCNx32 -# ifdef UINT32_MAX -# define SCNx32 "x" -# endif -# endif -# ifdef INT64_MAX -# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@) -# define _SCN64_PREFIX "l" -# elif defined _MSC_VER || defined __MINGW32__ -# define _SCN64_PREFIX "I64" -# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX -# endif -# if !defined SCNd64 || @PRI_MACROS_BROKEN@ -# undef SCNd64 -# define SCNd64 _SCN64_PREFIX "d" -# endif -# if !defined SCNi64 || @PRI_MACROS_BROKEN@ -# undef SCNi64 -# define SCNi64 _SCN64_PREFIX "i" -# endif -# endif -# ifdef UINT64_MAX -# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@) -# define _SCNu64_PREFIX "l" -# elif defined _MSC_VER || defined __MINGW32__ -# define _SCNu64_PREFIX "I64" -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX -# endif -# if !defined SCNo64 || @PRI_MACROS_BROKEN@ -# undef SCNo64 -# define SCNo64 _SCNu64_PREFIX "o" -# endif -# if !defined SCNu64 || @PRI_MACROS_BROKEN@ -# undef SCNu64 -# define SCNu64 _SCNu64_PREFIX "u" -# endif -# if !defined SCNx64 || @PRI_MACROS_BROKEN@ -# undef SCNx64 -# define SCNx64 _SCNu64_PREFIX "x" -# endif -# endif - -# if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@ -# undef SCNdLEAST8 -# define SCNdLEAST8 "hhd" -# endif -# if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@ -# undef SCNiLEAST8 -# define SCNiLEAST8 "hhi" -# endif -# if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@ -# undef SCNoLEAST8 -# define SCNoLEAST8 "hho" -# endif -# if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@ -# undef SCNuLEAST8 -# define SCNuLEAST8 "hhu" -# endif -# if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@ -# undef SCNxLEAST8 -# define SCNxLEAST8 "hhx" -# endif -# if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@ -# undef SCNdLEAST16 -# define SCNdLEAST16 "hd" -# endif -# if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@ -# undef SCNiLEAST16 -# define SCNiLEAST16 "hi" -# endif -# if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@ -# undef SCNoLEAST16 -# define SCNoLEAST16 "ho" -# endif -# if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@ -# undef SCNuLEAST16 -# define SCNuLEAST16 "hu" -# endif -# if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@ -# undef SCNxLEAST16 -# define SCNxLEAST16 "hx" -# endif -# if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@ -# undef SCNdLEAST32 -# define SCNdLEAST32 "d" -# endif -# if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@ -# undef SCNiLEAST32 -# define SCNiLEAST32 "i" -# endif -# if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@ -# undef SCNoLEAST32 -# define SCNoLEAST32 "o" -# endif -# if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@ -# undef SCNuLEAST32 -# define SCNuLEAST32 "u" -# endif -# if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@ -# undef SCNxLEAST32 -# define SCNxLEAST32 "x" -# endif -# ifdef INT64_MAX -# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@ -# undef SCNdLEAST64 -# define SCNdLEAST64 SCNd64 -# endif -# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@ -# undef SCNiLEAST64 -# define SCNiLEAST64 SCNi64 -# endif -# endif -# ifdef UINT64_MAX -# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@ -# undef SCNoLEAST64 -# define SCNoLEAST64 SCNo64 -# endif -# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@ -# undef SCNuLEAST64 -# define SCNuLEAST64 SCNu64 -# endif -# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@ -# undef SCNxLEAST64 -# define SCNxLEAST64 SCNx64 -# endif -# endif - -# if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@ -# undef SCNdFAST8 -# if INT_FAST8_MAX > INT32_MAX -# define SCNdFAST8 SCNd64 -# elif INT_FAST8_MAX == 0x7fff -# define SCNdFAST8 "hd" -# elif INT_FAST8_MAX == 0x7f -# define SCNdFAST8 "hhd" -# else -# define SCNdFAST8 "d" -# endif -# endif -# if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@ -# undef SCNiFAST8 -# if INT_FAST8_MAX > INT32_MAX -# define SCNiFAST8 SCNi64 -# elif INT_FAST8_MAX == 0x7fff -# define SCNiFAST8 "hi" -# elif INT_FAST8_MAX == 0x7f -# define SCNiFAST8 "hhi" -# else -# define SCNiFAST8 "i" -# endif -# endif -# if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@ -# undef SCNoFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define SCNoFAST8 SCNo64 -# elif UINT_FAST8_MAX == 0xffff -# define SCNoFAST8 "ho" -# elif UINT_FAST8_MAX == 0xff -# define SCNoFAST8 "hho" -# else -# define SCNoFAST8 "o" -# endif -# endif -# if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@ -# undef SCNuFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define SCNuFAST8 SCNu64 -# elif UINT_FAST8_MAX == 0xffff -# define SCNuFAST8 "hu" -# elif UINT_FAST8_MAX == 0xff -# define SCNuFAST8 "hhu" -# else -# define SCNuFAST8 "u" -# endif -# endif -# if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@ -# undef SCNxFAST8 -# if UINT_FAST8_MAX > UINT32_MAX -# define SCNxFAST8 SCNx64 -# elif UINT_FAST8_MAX == 0xffff -# define SCNxFAST8 "hx" -# elif UINT_FAST8_MAX == 0xff -# define SCNxFAST8 "hhx" -# else -# define SCNxFAST8 "x" -# endif -# endif -# if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@ -# undef SCNdFAST16 -# if INT_FAST16_MAX > INT32_MAX -# define SCNdFAST16 SCNd64 -# elif INT_FAST16_MAX == 0x7fff -# define SCNdFAST16 "hd" -# else -# define SCNdFAST16 "d" -# endif -# endif -# if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@ -# undef SCNiFAST16 -# if INT_FAST16_MAX > INT32_MAX -# define SCNiFAST16 SCNi64 -# elif INT_FAST16_MAX == 0x7fff -# define SCNiFAST16 "hi" -# else -# define SCNiFAST16 "i" -# endif -# endif -# if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@ -# undef SCNoFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define SCNoFAST16 SCNo64 -# elif UINT_FAST16_MAX == 0xffff -# define SCNoFAST16 "ho" -# else -# define SCNoFAST16 "o" -# endif -# endif -# if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@ -# undef SCNuFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define SCNuFAST16 SCNu64 -# elif UINT_FAST16_MAX == 0xffff -# define SCNuFAST16 "hu" -# else -# define SCNuFAST16 "u" -# endif -# endif -# if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@ -# undef SCNxFAST16 -# if UINT_FAST16_MAX > UINT32_MAX -# define SCNxFAST16 SCNx64 -# elif UINT_FAST16_MAX == 0xffff -# define SCNxFAST16 "hx" -# else -# define SCNxFAST16 "x" -# endif -# endif -# if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@ -# undef SCNdFAST32 -# if INT_FAST32_MAX > INT32_MAX -# define SCNdFAST32 SCNd64 -# else -# define SCNdFAST32 "d" -# endif -# endif -# if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@ -# undef SCNiFAST32 -# if INT_FAST32_MAX > INT32_MAX -# define SCNiFAST32 SCNi64 -# else -# define SCNiFAST32 "i" -# endif -# endif -# if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@ -# undef SCNoFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define SCNoFAST32 SCNo64 -# else -# define SCNoFAST32 "o" -# endif -# endif -# if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@ -# undef SCNuFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define SCNuFAST32 SCNu64 -# else -# define SCNuFAST32 "u" -# endif -# endif -# if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@ -# undef SCNxFAST32 -# if UINT_FAST32_MAX > UINT32_MAX -# define SCNxFAST32 SCNx64 -# else -# define SCNxFAST32 "x" -# endif -# endif -# ifdef INT64_MAX -# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@ -# undef SCNdFAST64 -# define SCNdFAST64 SCNd64 -# endif -# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@ -# undef SCNiFAST64 -# define SCNiFAST64 SCNi64 -# endif -# endif -# ifdef UINT64_MAX -# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@ -# undef SCNoFAST64 -# define SCNoFAST64 SCNo64 -# endif -# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@ -# undef SCNuFAST64 -# define SCNuFAST64 SCNu64 -# endif -# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@ -# undef SCNxFAST64 -# define SCNxFAST64 SCNx64 -# endif -# endif - -# if !defined SCNdMAX || @PRI_MACROS_BROKEN@ -# undef SCNdMAX -# if @INT32_MAX_LT_INTMAX_MAX@ -# define SCNdMAX SCNd64 -# else -# define SCNdMAX "ld" -# endif -# endif -# if !defined SCNiMAX || @PRI_MACROS_BROKEN@ -# undef SCNiMAX -# if @INT32_MAX_LT_INTMAX_MAX@ -# define SCNiMAX SCNi64 -# else -# define SCNiMAX "li" -# endif -# endif -# if !defined SCNoMAX || @PRI_MACROS_BROKEN@ -# undef SCNoMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define SCNoMAX SCNo64 -# else -# define SCNoMAX "lo" -# endif -# endif -# if !defined SCNuMAX || @PRI_MACROS_BROKEN@ -# undef SCNuMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define SCNuMAX SCNu64 -# else -# define SCNuMAX "lu" -# endif -# endif -# if !defined SCNxMAX || @PRI_MACROS_BROKEN@ -# undef SCNxMAX -# if @UINT32_MAX_LT_UINTMAX_MAX@ -# define SCNxMAX SCNx64 -# else -# define SCNxMAX "lx" -# endif -# endif - -# if !defined SCNdPTR || @PRI_MACROS_BROKEN@ -# undef SCNdPTR -# ifdef INTPTR_MAX -# define SCNdPTR @PRIPTR_PREFIX@ "d" -# endif -# endif -# if !defined SCNiPTR || @PRI_MACROS_BROKEN@ -# undef SCNiPTR -# ifdef INTPTR_MAX -# define SCNiPTR @PRIPTR_PREFIX@ "i" -# endif -# endif -# if !defined SCNoPTR || @PRI_MACROS_BROKEN@ -# undef SCNoPTR -# ifdef UINTPTR_MAX -# define SCNoPTR @PRIPTR_PREFIX@ "o" -# endif -# endif -# if !defined SCNuPTR || @PRI_MACROS_BROKEN@ -# undef SCNuPTR -# ifdef UINTPTR_MAX -# define SCNuPTR @PRIPTR_PREFIX@ "u" -# endif -# endif -# if !defined SCNxPTR || @PRI_MACROS_BROKEN@ -# undef SCNxPTR -# ifdef UINTPTR_MAX -# define SCNxPTR @PRIPTR_PREFIX@ "x" -# endif -# endif - -#endif - -/* 7.8.2 Functions for greatest-width integer types */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if @GNULIB_IMAXABS@ -# if !@HAVE_DECL_IMAXABS@ -extern intmax_t imaxabs (intmax_t); -# endif -#elif defined GNULIB_POSIXCHECK -# undef imaxabs -# if HAVE_RAW_DECL_IMAXABS -_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " - "use gnulib module imaxabs for portability"); -# endif -#endif - -#if @GNULIB_IMAXDIV@ -# if !@HAVE_DECL_IMAXDIV@ -# if !GNULIB_defined_imaxdiv_t -typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; -# define GNULIB_defined_imaxdiv_t 1 -# endif -extern imaxdiv_t imaxdiv (intmax_t, intmax_t); -# endif -#elif defined GNULIB_POSIXCHECK -# undef imaxdiv -# if HAVE_RAW_DECL_IMAXDIV -_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - " - "use gnulib module imaxdiv for portability"); -# endif -#endif - -#if @GNULIB_STRTOIMAX@ -# if !@HAVE_DECL_STRTOIMAX@ -extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strtoimax -# if HAVE_RAW_DECL_STRTOIMAX -_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " - "use gnulib module strtoimax for portability"); -# endif -#endif - -#if @GNULIB_STRTOUMAX@ -# if !@HAVE_DECL_STRTOUMAX@ -extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strtoumax -# if HAVE_RAW_DECL_STRTOUMAX -_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - " - "use gnulib module strtoumax for portability"); -# endif -#endif - -/* Don't bother defining or declaring wcstoimax and wcstoumax, since - wide-character functions like this are hardly ever useful. */ - -#ifdef __cplusplus -} -#endif - -#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */ diff --git a/gnulib/lib/isblank.c b/gnulib/lib/isblank.c deleted file mode 100644 index 65cc54f..0000000 --- a/gnulib/lib/isblank.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Test whether a character is a blank. - - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -int -isblank (int c) -{ - /* On all known platforms, in all predefined locales, isblank(c) is likely - equivalent with (c == ' ' || c == '\t'). Look at the glibc definition - (in glibc/localedata/locales/i18n): The "blank" characters are '\t', ' ', - U+1680, U+180E, U+2000..U+2006, U+2008..U+200A, U+205F, U+3000, and none - except the first two is present in a common 8-bit encoding. Therefore - the substitute for other platforms is not more complicated than this. */ - return (c == ' ' || c == '\t'); -} diff --git a/gnulib/lib/iswblank.c b/gnulib/lib/iswblank.c deleted file mode 100644 index a476377..0000000 --- a/gnulib/lib/iswblank.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Test wide character for being blank. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include - -int -iswblank (wint_t wc) -{ - return wc == ' ' || wc == '\t'; -} diff --git a/gnulib/lib/langinfo.in.h b/gnulib/lib/langinfo.in.h deleted file mode 100644 index 02e1f26..0000000 --- a/gnulib/lib/langinfo.in.h +++ /dev/null @@ -1,177 +0,0 @@ -/* Substitute for and wrapper around . - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* - * POSIX for platforms that lack it or have an incomplete one. - * - */ - -#ifndef _GL_LANGINFO_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_LANGINFO_H@ -# @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ -#endif - -#ifndef _GL_LANGINFO_H -#define _GL_LANGINFO_H - - -#if !@HAVE_LANGINFO_H@ - -/* A platform that lacks . */ - -/* Assume that it also lacks and the nl_item type. */ -# if !GNULIB_defined_nl_item -typedef int nl_item; -# define GNULIB_defined_nl_item 1 -# endif - -/* nl_langinfo items of the LC_CTYPE category */ -# define CODESET 10000 -/* nl_langinfo items of the LC_NUMERIC category */ -# define RADIXCHAR 10001 -# define THOUSEP 10002 -/* nl_langinfo items of the LC_TIME category */ -# define D_T_FMT 10003 -# define D_FMT 10004 -# define T_FMT 10005 -# define T_FMT_AMPM 10006 -# define AM_STR 10007 -# define PM_STR 10008 -# define DAY_1 10009 -# define DAY_2 (DAY_1 + 1) -# define DAY_3 (DAY_1 + 2) -# define DAY_4 (DAY_1 + 3) -# define DAY_5 (DAY_1 + 4) -# define DAY_6 (DAY_1 + 5) -# define DAY_7 (DAY_1 + 6) -# define ABDAY_1 10016 -# define ABDAY_2 (ABDAY_1 + 1) -# define ABDAY_3 (ABDAY_1 + 2) -# define ABDAY_4 (ABDAY_1 + 3) -# define ABDAY_5 (ABDAY_1 + 4) -# define ABDAY_6 (ABDAY_1 + 5) -# define ABDAY_7 (ABDAY_1 + 6) -# define MON_1 10023 -# define MON_2 (MON_1 + 1) -# define MON_3 (MON_1 + 2) -# define MON_4 (MON_1 + 3) -# define MON_5 (MON_1 + 4) -# define MON_6 (MON_1 + 5) -# define MON_7 (MON_1 + 6) -# define MON_8 (MON_1 + 7) -# define MON_9 (MON_1 + 8) -# define MON_10 (MON_1 + 9) -# define MON_11 (MON_1 + 10) -# define MON_12 (MON_1 + 11) -# define ABMON_1 10035 -# define ABMON_2 (ABMON_1 + 1) -# define ABMON_3 (ABMON_1 + 2) -# define ABMON_4 (ABMON_1 + 3) -# define ABMON_5 (ABMON_1 + 4) -# define ABMON_6 (ABMON_1 + 5) -# define ABMON_7 (ABMON_1 + 6) -# define ABMON_8 (ABMON_1 + 7) -# define ABMON_9 (ABMON_1 + 8) -# define ABMON_10 (ABMON_1 + 9) -# define ABMON_11 (ABMON_1 + 10) -# define ABMON_12 (ABMON_1 + 11) -# define ERA 10047 -# define ERA_D_FMT 10048 -# define ERA_D_T_FMT 10049 -# define ERA_T_FMT 10050 -# define ALT_DIGITS 10051 -/* nl_langinfo items of the LC_MONETARY category */ -# define CRNCYSTR 10052 -/* nl_langinfo items of the LC_MESSAGES category */ -# define YESEXPR 10053 -# define NOEXPR 10054 - -#else - -/* A platform that has . */ - -# if !@HAVE_LANGINFO_CODESET@ -# define CODESET 10000 -# define GNULIB_defined_CODESET 1 -# endif - -# if !@HAVE_LANGINFO_T_FMT_AMPM@ -# define T_FMT_AMPM 10006 -# define GNULIB_defined_T_FMT_AMPM 1 -# endif - -# if !@HAVE_LANGINFO_ERA@ -# define ERA 10047 -# define ERA_D_FMT 10048 -# define ERA_D_T_FMT 10049 -# define ERA_T_FMT 10050 -# define ALT_DIGITS 10051 -# define GNULIB_defined_ERA 1 -# endif - -# if !@HAVE_LANGINFO_YESEXPR@ -# define YESEXPR 10053 -# define NOEXPR 10054 -# define GNULIB_defined_YESEXPR 1 -# endif - -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Declare overridden functions. */ - - -/* Return a piece of locale dependent information. - Note: The difference between nl_langinfo (CODESET) and locale_charset () - is that the latter normalizes the encoding names to GNU conventions. */ - -#if @GNULIB_NL_LANGINFO@ -# if @REPLACE_NL_LANGINFO@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef nl_langinfo -# define nl_langinfo rpl_nl_langinfo -# endif -_GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item)); -_GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item)); -# else -# if !@HAVE_NL_LANGINFO@ -_GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); -# endif -_GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); -# endif -_GL_CXXALIASWARN (nl_langinfo); -#elif defined GNULIB_POSIXCHECK -# undef nl_langinfo -# if HAVE_RAW_DECL_NL_LANGINFO -_GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " - "use gnulib module nl_langinfo for portability"); -# endif -#endif - - -#endif /* _GL_LANGINFO_H */ -#endif /* _GL_LANGINFO_H */ diff --git a/gnulib/lib/lchown.c b/gnulib/lib/lchown.c deleted file mode 100644 index 406b9c1..0000000 --- a/gnulib/lib/lchown.c +++ /dev/null @@ -1,117 +0,0 @@ -/* Provide a stub lchown function for systems that lack it. - - Copyright (C) 1998-1999, 2002, 2004, 2006-2007, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include - -#include -#include -#include -#include - -#if !HAVE_LCHOWN - -/* If the system chown does not follow symlinks, we don't want it - replaced by gnulib's chown, which does follow symlinks. */ -# if CHOWN_MODIFIES_SYMLINK -# undef chown -# endif - -/* Work just like chown, except when FILE is a symbolic link. - In that case, set errno to EOPNOTSUPP and return -1. - But if autoconf tests determined that chown modifies - symlinks, then just call chown. */ - -int -lchown (const char *file, uid_t uid, gid_t gid) -{ -# if HAVE_CHOWN -# if ! CHOWN_MODIFIES_SYMLINK - struct stat stats; - - if (lstat (file, &stats) == 0 && S_ISLNK (stats.st_mode)) - { - errno = EOPNOTSUPP; - return -1; - } -# endif - - return chown (file, uid, gid); - -# else /* !HAVE_CHOWN */ - errno = ENOSYS; - return -1; -# endif -} - -#else /* HAVE_LCHOWN */ - -# undef lchown - -/* Work around trailing slash bugs in lchown. */ -int -rpl_lchown (const char *file, uid_t uid, gid_t gid) -{ - bool stat_valid = false; - int result; - -# if CHOWN_CHANGE_TIME_BUG - struct stat st; - - if (gid != (gid_t) -1 || uid != (uid_t) -1) - { - if (lstat (file, &st)) - return -1; - stat_valid = true; - if (!S_ISLNK (st.st_mode)) - return chown (file, uid, gid); - } -# endif - -# if CHOWN_TRAILING_SLASH_BUG - if (!stat_valid) - { - size_t len = strlen (file); - if (len && file[len - 1] == '/') - return chown (file, uid, gid); - } -# endif - - result = lchown (file, uid, gid); - -# if CHOWN_CHANGE_TIME_BUG && HAVE_LCHMOD - if (result == 0 && stat_valid - && (uid == st.st_uid || uid == (uid_t) -1) - && (gid == st.st_gid || gid == (gid_t) -1)) - { - /* No change in ownership, but at least one argument was not -1, - so we are required to update ctime. Since lchown succeeded, - we assume that lchmod will do likewise. But if the system - lacks lchmod and lutimes, we are out of luck. Oh well. */ - result = lchmod (file, st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO - | S_ISUID | S_ISGID | S_ISVTX)); - } -# endif - - return result; -} - -#endif /* HAVE_LCHOWN */ diff --git a/gnulib/lib/localcharset.c b/gnulib/lib/localcharset.c deleted file mode 100644 index 96739c7..0000000 --- a/gnulib/lib/localcharset.c +++ /dev/null @@ -1,547 +0,0 @@ -/* Determine a canonical name for the current locale's character encoding. - - Copyright (C) 2000-2006, 2008-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Bruno Haible . */ - -#include - -/* Specification. */ -#include "localcharset.h" - -#include -#include -#include -#include -#include - -#if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET -# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */ -#endif - -#if defined _WIN32 || defined __WIN32__ -# define WIN32_NATIVE -#endif - -#if defined __EMX__ -/* Assume EMX program runs on OS/2, even if compiled under DOS. */ -# ifndef OS2 -# define OS2 -# endif -#endif - -#if !defined WIN32_NATIVE -# include -# if HAVE_LANGINFO_CODESET -# include -# else -# if 0 /* see comment below */ -# include -# endif -# endif -# ifdef __CYGWIN__ -# define WIN32_LEAN_AND_MEAN -# include -# endif -#elif defined WIN32_NATIVE -# define WIN32_LEAN_AND_MEAN -# include -#endif -#if defined OS2 -# define INCL_DOS -# include -#endif - -#if ENABLE_RELOCATABLE -# include "relocatable.h" -#else -# define relocate(pathname) (pathname) -#endif - -/* Get LIBDIR. */ -#ifndef LIBDIR -# include "configmake.h" -#endif - -/* Define O_NOFOLLOW to 0 on platforms where it does not exist. */ -#ifndef O_NOFOLLOW -# define O_NOFOLLOW 0 -#endif - -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Win32, Cygwin, OS/2, DOS */ -# define ISSLASH(C) ((C) == '/' || (C) == '\\') -#endif - -#ifndef DIRECTORY_SEPARATOR -# define DIRECTORY_SEPARATOR '/' -#endif - -#ifndef ISSLASH -# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) -#endif - -#if HAVE_DECL_GETC_UNLOCKED -# undef getc -# define getc getc_unlocked -#endif - -/* The following static variable is declared 'volatile' to avoid a - possible multithread problem in the function get_charset_aliases. If we - are running in a threaded environment, and if two threads initialize - 'charset_aliases' simultaneously, both will produce the same value, - and everything will be ok if the two assignments to 'charset_aliases' - are atomic. But I don't know what will happen if the two assignments mix. */ -#if __STDC__ != 1 -# define volatile /* empty */ -#endif -/* Pointer to the contents of the charset.alias file, if it has already been - read, else NULL. Its format is: - ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ -static const char * volatile charset_aliases; - -/* Return a pointer to the contents of the charset.alias file. */ -static const char * -get_charset_aliases (void) -{ - const char *cp; - - cp = charset_aliases; - if (cp == NULL) - { -#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) - const char *dir; - const char *base = "charset.alias"; - char *file_name; - - /* Make it possible to override the charset.alias location. This is - necessary for running the testsuite before "make install". */ - dir = getenv ("CHARSETALIASDIR"); - if (dir == NULL || dir[0] == '\0') - dir = relocate (LIBDIR); - - /* Concatenate dir and base into freshly allocated file_name. */ - { - size_t dir_len = strlen (dir); - size_t base_len = strlen (base); - int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); - file_name = (char *) malloc (dir_len + add_slash + base_len + 1); - if (file_name != NULL) - { - memcpy (file_name, dir, dir_len); - if (add_slash) - file_name[dir_len] = DIRECTORY_SEPARATOR; - memcpy (file_name + dir_len + add_slash, base, base_len + 1); - } - } - - if (file_name == NULL) - /* Out of memory. Treat the file as empty. */ - cp = ""; - else - { - int fd; - - /* Open the file. Reject symbolic links on platforms that support - O_NOFOLLOW. This is a security feature. Without it, an attacker - could retrieve parts of the contents (namely, the tail of the - first line that starts with "* ") of an arbitrary file by placing - a symbolic link to that file under the name "charset.alias" in - some writable directory and defining the environment variable - CHARSETALIASDIR to point to that directory. */ - fd = open (file_name, - O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0)); - if (fd < 0) - /* File not found. Treat it as empty. */ - cp = ""; - else - { - FILE *fp; - - fp = fdopen (fd, "r"); - if (fp == NULL) - { - /* Out of memory. Treat the file as empty. */ - close (fd); - cp = ""; - } - else - { - /* Parse the file's contents. */ - char *res_ptr = NULL; - size_t res_size = 0; - - for (;;) - { - int c; - char buf1[50+1]; - char buf2[50+1]; - size_t l1, l2; - char *old_res_ptr; - - c = getc (fp); - if (c == EOF) - break; - if (c == '\n' || c == ' ' || c == '\t') - continue; - if (c == '#') - { - /* Skip comment, to end of line. */ - do - c = getc (fp); - while (!(c == EOF || c == '\n')); - if (c == EOF) - break; - continue; - } - ungetc (c, fp); - if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) - break; - l1 = strlen (buf1); - l2 = strlen (buf2); - old_res_ptr = res_ptr; - if (res_size == 0) - { - res_size = l1 + 1 + l2 + 1; - res_ptr = (char *) malloc (res_size + 1); - } - else - { - res_size += l1 + 1 + l2 + 1; - res_ptr = (char *) realloc (res_ptr, res_size + 1); - } - if (res_ptr == NULL) - { - /* Out of memory. */ - res_size = 0; - free (old_res_ptr); - break; - } - strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); - strcpy (res_ptr + res_size - (l2 + 1), buf2); - } - fclose (fp); - if (res_size == 0) - cp = ""; - else - { - *(res_ptr + res_size) = '\0'; - cp = res_ptr; - } - } - } - - free (file_name); - } - -#else - -# if defined DARWIN7 - /* To avoid the trouble of installing a file that is shared by many - GNU packages -- many packaging systems have problems with this --, - simply inline the aliases here. */ - cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" - "ISO8859-2" "\0" "ISO-8859-2" "\0" - "ISO8859-4" "\0" "ISO-8859-4" "\0" - "ISO8859-5" "\0" "ISO-8859-5" "\0" - "ISO8859-7" "\0" "ISO-8859-7" "\0" - "ISO8859-9" "\0" "ISO-8859-9" "\0" - "ISO8859-13" "\0" "ISO-8859-13" "\0" - "ISO8859-15" "\0" "ISO-8859-15" "\0" - "KOI8-R" "\0" "KOI8-R" "\0" - "KOI8-U" "\0" "KOI8-U" "\0" - "CP866" "\0" "CP866" "\0" - "CP949" "\0" "CP949" "\0" - "CP1131" "\0" "CP1131" "\0" - "CP1251" "\0" "CP1251" "\0" - "eucCN" "\0" "GB2312" "\0" - "GB2312" "\0" "GB2312" "\0" - "eucJP" "\0" "EUC-JP" "\0" - "eucKR" "\0" "EUC-KR" "\0" - "Big5" "\0" "BIG5" "\0" - "Big5HKSCS" "\0" "BIG5-HKSCS" "\0" - "GBK" "\0" "GBK" "\0" - "GB18030" "\0" "GB18030" "\0" - "SJIS" "\0" "SHIFT_JIS" "\0" - "ARMSCII-8" "\0" "ARMSCII-8" "\0" - "PT154" "\0" "PT154" "\0" - /*"ISCII-DEV" "\0" "?" "\0"*/ - "*" "\0" "UTF-8" "\0"; -# endif - -# if defined VMS - /* To avoid the troubles of an extra file charset.alias_vms in the - sources of many GNU packages, simply inline the aliases here. */ - /* The list of encodings is taken from the OpenVMS 7.3-1 documentation - "Compaq C Run-Time Library Reference Manual for OpenVMS systems" - section 10.7 "Handling Different Character Sets". */ - cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" - "ISO8859-2" "\0" "ISO-8859-2" "\0" - "ISO8859-5" "\0" "ISO-8859-5" "\0" - "ISO8859-7" "\0" "ISO-8859-7" "\0" - "ISO8859-8" "\0" "ISO-8859-8" "\0" - "ISO8859-9" "\0" "ISO-8859-9" "\0" - /* Japanese */ - "eucJP" "\0" "EUC-JP" "\0" - "SJIS" "\0" "SHIFT_JIS" "\0" - "DECKANJI" "\0" "DEC-KANJI" "\0" - "SDECKANJI" "\0" "EUC-JP" "\0" - /* Chinese */ - "eucTW" "\0" "EUC-TW" "\0" - "DECHANYU" "\0" "DEC-HANYU" "\0" - "DECHANZI" "\0" "GB2312" "\0" - /* Korean */ - "DECKOREAN" "\0" "EUC-KR" "\0"; -# endif - -# if defined WIN32_NATIVE || defined __CYGWIN__ - /* To avoid the troubles of installing a separate file in the same - directory as the DLL and of retrieving the DLL's directory at - runtime, simply inline the aliases here. */ - - cp = "CP936" "\0" "GBK" "\0" - "CP1361" "\0" "JOHAB" "\0" - "CP20127" "\0" "ASCII" "\0" - "CP20866" "\0" "KOI8-R" "\0" - "CP20936" "\0" "GB2312" "\0" - "CP21866" "\0" "KOI8-RU" "\0" - "CP28591" "\0" "ISO-8859-1" "\0" - "CP28592" "\0" "ISO-8859-2" "\0" - "CP28593" "\0" "ISO-8859-3" "\0" - "CP28594" "\0" "ISO-8859-4" "\0" - "CP28595" "\0" "ISO-8859-5" "\0" - "CP28596" "\0" "ISO-8859-6" "\0" - "CP28597" "\0" "ISO-8859-7" "\0" - "CP28598" "\0" "ISO-8859-8" "\0" - "CP28599" "\0" "ISO-8859-9" "\0" - "CP28605" "\0" "ISO-8859-15" "\0" - "CP38598" "\0" "ISO-8859-8" "\0" - "CP51932" "\0" "EUC-JP" "\0" - "CP51936" "\0" "GB2312" "\0" - "CP51949" "\0" "EUC-KR" "\0" - "CP51950" "\0" "EUC-TW" "\0" - "CP54936" "\0" "GB18030" "\0" - "CP65001" "\0" "UTF-8" "\0"; -# endif -#endif - - charset_aliases = cp; - } - - return cp; -} - -/* Determine the current locale's character encoding, and canonicalize it - into one of the canonical names listed in config.charset. - The result must not be freed; it is statically allocated. - If the canonical name cannot be determined, the result is a non-canonical - name. */ - -#ifdef STATIC -STATIC -#endif -const char * -locale_charset (void) -{ - const char *codeset; - const char *aliases; - -#if !(defined WIN32_NATIVE || defined OS2) - -# if HAVE_LANGINFO_CODESET - - /* Most systems support nl_langinfo (CODESET) nowadays. */ - codeset = nl_langinfo (CODESET); - -# ifdef __CYGWIN__ - /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always - returns "US-ASCII". Return the suffix of the locale name from the - environment variables (if present) or the codepage as a number. */ - if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) - { - const char *locale; - static char buf[2 + 10 + 1]; - - locale = getenv ("LC_ALL"); - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_CTYPE"); - if (locale == NULL || locale[0] == '\0') - locale = getenv ("LANG"); - } - if (locale != NULL && locale[0] != '\0') - { - /* If the locale name contains an encoding after the dot, return - it. */ - const char *dot = strchr (locale, '.'); - - if (dot != NULL) - { - const char *modifier; - - dot++; - /* Look for the possible @... trailer and remove it, if any. */ - modifier = strchr (dot, '@'); - if (modifier == NULL) - return dot; - if (modifier - dot < sizeof (buf)) - { - memcpy (buf, dot, modifier - dot); - buf [modifier - dot] = '\0'; - return buf; - } - } - } - - /* Woe32 has a function returning the locale's codepage as a number: - GetACP(). This encoding is used by Cygwin, unless the user has set - the environment variable CYGWIN=codepage:oem (which very few people - do). - Output directed to console windows needs to be converted (to - GetOEMCP() if the console is using a raster font, or to - GetConsoleOutputCP() if it is using a TrueType font). Cygwin does - this conversion transparently (see winsup/cygwin/fhandler_console.cc), - converting to GetConsoleOutputCP(). This leads to correct results, - except when SetConsoleOutputCP has been called and a raster font is - in use. */ - sprintf (buf, "CP%u", GetACP ()); - codeset = buf; - } -# endif - -# else - - /* On old systems which lack it, use setlocale or getenv. */ - const char *locale = NULL; - - /* But most old systems don't have a complete set of locales. Some - (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't - use setlocale here; it would return "C" when it doesn't support the - locale name the user has set. */ -# if 0 - locale = setlocale (LC_CTYPE, NULL); -# endif - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_ALL"); - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_CTYPE"); - if (locale == NULL || locale[0] == '\0') - locale = getenv ("LANG"); - } - } - - /* On some old systems, one used to set locale = "iso8859_1". On others, - you set it to "language_COUNTRY.charset". In any case, we resolve it - through the charset.alias file. */ - codeset = locale; - -# endif - -#elif defined WIN32_NATIVE - - static char buf[2 + 10 + 1]; - - /* Woe32 has a function returning the locale's codepage as a number: - GetACP(). - When the output goes to a console window, it needs to be provided in - GetOEMCP() encoding if the console is using a raster font, or in - GetConsoleOutputCP() encoding if it is using a TrueType font. - But in GUI programs and for output sent to files and pipes, GetACP() - encoding is the best bet. */ - sprintf (buf, "CP%u", GetACP ()); - codeset = buf; - -#elif defined OS2 - - const char *locale; - static char buf[2 + 10 + 1]; - ULONG cp[3]; - ULONG cplen; - - /* Allow user to override the codeset, as set in the operating system, - with standard language environment variables. */ - locale = getenv ("LC_ALL"); - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_CTYPE"); - if (locale == NULL || locale[0] == '\0') - locale = getenv ("LANG"); - } - if (locale != NULL && locale[0] != '\0') - { - /* If the locale name contains an encoding after the dot, return it. */ - const char *dot = strchr (locale, '.'); - - if (dot != NULL) - { - const char *modifier; - - dot++; - /* Look for the possible @... trailer and remove it, if any. */ - modifier = strchr (dot, '@'); - if (modifier == NULL) - return dot; - if (modifier - dot < sizeof (buf)) - { - memcpy (buf, dot, modifier - dot); - buf [modifier - dot] = '\0'; - return buf; - } - } - - /* Resolve through the charset.alias file. */ - codeset = locale; - } - else - { - /* OS/2 has a function returning the locale's codepage as a number. */ - if (DosQueryCp (sizeof (cp), cp, &cplen)) - codeset = ""; - else - { - sprintf (buf, "CP%u", cp[0]); - codeset = buf; - } - } - -#endif - - if (codeset == NULL) - /* The canonical name cannot be determined. */ - codeset = ""; - - /* Resolve alias. */ - for (aliases = get_charset_aliases (); - *aliases != '\0'; - aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) - if (strcmp (codeset, aliases) == 0 - || (aliases[0] == '*' && aliases[1] == '\0')) - { - codeset = aliases + strlen (aliases) + 1; - break; - } - - /* Don't return an empty string. GNU libc and GNU libiconv interpret - the empty string as denoting "the locale's character encoding", - thus GNU libiconv would call this function a second time. */ - if (codeset[0] == '\0') - codeset = "ASCII"; - - return codeset; -} diff --git a/gnulib/lib/localcharset.h b/gnulib/lib/localcharset.h deleted file mode 100644 index edbb13b..0000000 --- a/gnulib/lib/localcharset.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2003, 2009-2011 Free Software Foundation, Inc. - This file is part of the GNU CHARSET Library. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _LOCALCHARSET_H -#define _LOCALCHARSET_H - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Determine the current locale's character encoding, and canonicalize it - into one of the canonical names listed in config.charset. - The result must not be freed; it is statically allocated. - If the canonical name cannot be determined, the result is a non-canonical - name. */ -extern const char * locale_charset (void); - - -#ifdef __cplusplus -} -#endif - - -#endif /* _LOCALCHARSET_H */ diff --git a/gnulib/lib/locale.in.h b/gnulib/lib/locale.in.h deleted file mode 100644 index 1f9bafd..0000000 --- a/gnulib/lib/locale.in.h +++ /dev/null @@ -1,96 +0,0 @@ -/* A POSIX . - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_LOCALE_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_LOCALE_H@ - -#ifndef _GL_LOCALE_H -#define _GL_LOCALE_H - -/* NetBSD 5.0 mis-defines NULL. */ -#include - -/* MacOS X 10.5 defines the locale_t type in . */ -#if @HAVE_XLOCALE_H@ -# include -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C. - On systems that don't define it, use the same value as GNU libintl. */ -#if !defined LC_MESSAGES -# define LC_MESSAGES 1729 -#endif - -#if @GNULIB_SETLOCALE@ -# if @REPLACE_SETLOCALE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef setlocale -# define setlocale rpl_setlocale -# define GNULIB_defined_setlocale 1 -# endif -_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale)); -_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale)); -# else -_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); -# endif -_GL_CXXALIASWARN (setlocale); -#elif defined GNULIB_POSIXCHECK -# undef setlocale -# if HAVE_RAW_DECL_SETLOCALE -_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " - "use gnulib module setlocale for portability"); -# endif -#endif - -#if @GNULIB_DUPLOCALE@ -# if @REPLACE_DUPLOCALE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef duplocale -# define duplocale rpl_duplocale -# endif -_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); -# else -# if @HAVE_DUPLOCALE@ -_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); -# endif -# endif -# if @HAVE_DUPLOCALE@ -_GL_CXXALIASWARN (duplocale); -# endif -#elif defined GNULIB_POSIXCHECK -# undef duplocale -# if HAVE_RAW_DECL_DUPLOCALE -_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " - "use gnulib module duplocale for portability"); -# endif -#endif - -#endif /* _GL_LOCALE_H */ -#endif /* _GL_LOCALE_H */ diff --git a/gnulib/lib/lseek.c b/gnulib/lib/lseek.c deleted file mode 100644 index 8339044..0000000 --- a/gnulib/lib/lseek.c +++ /dev/null @@ -1,62 +0,0 @@ -/* An lseek() function that detects pipes. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Windows platforms. */ -/* Get GetFileType. */ -# include -#else -# include -#endif -#include - -#undef lseek - -off_t -rpl_lseek (int fd, off_t offset, int whence) -{ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */ - HANDLE h = (HANDLE) _get_osfhandle (fd); - if (h == INVALID_HANDLE_VALUE) - { - errno = EBADF; - return -1; - } - if (GetFileType (h) != FILE_TYPE_DISK) - { - errno = ESPIPE; - return -1; - } -#else - /* BeOS lseek mistakenly succeeds on pipes... */ - struct stat statbuf; - if (fstat (fd, &statbuf) < 0) - return -1; - if (!S_ISREG (statbuf.st_mode)) - { - errno = ESPIPE; - return -1; - } -#endif - return lseek (fd, offset, whence); -} diff --git a/gnulib/lib/lstat.c b/gnulib/lib/lstat.c deleted file mode 100644 index b26065e..0000000 --- a/gnulib/lib/lstat.c +++ /dev/null @@ -1,91 +0,0 @@ -/* Work around a bug of lstat on some systems - - Copyright (C) 1997-2006, 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#if !HAVE_LSTAT -/* On systems that lack symlinks, our replacement already - defined lstat as stat, so there is nothing further to do other than - avoid an empty file. */ -typedef int dummy; -#else /* HAVE_LSTAT */ - -/* Get the original definition of lstat. It might be defined as a macro. */ -# define __need_system_sys_stat_h -# include -# include -# undef __need_system_sys_stat_h - -static inline int -orig_lstat (const char *filename, struct stat *buf) -{ - return lstat (filename, buf); -} - -/* Specification. */ -# include - -# include -# include - -/* lstat works differently on Linux and Solaris systems. POSIX (see - `pathname resolution' in the glossary) requires that programs like - `ls' take into consideration the fact that FILE has a trailing slash - when FILE is a symbolic link. On Linux and Solaris 10 systems, the - lstat function already has the desired semantics (in treating - `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)', - but on Solaris 9 and earlier it does not. - - If FILE has a trailing slash and specifies a symbolic link, - then use stat() to get more info on the referent of FILE. - If the referent is a non-directory, then set errno to ENOTDIR - and return -1. Otherwise, return stat's result. */ - -int -rpl_lstat (const char *file, struct stat *sbuf) -{ - size_t len; - int lstat_result = orig_lstat (file, sbuf); - - if (lstat_result != 0) - return lstat_result; - - /* This replacement file can blindly check against '/' rather than - using the ISSLASH macro, because all platforms with '\\' either - lack symlinks (mingw) or have working lstat (cygwin) and thus do - not compile this file. 0 len should have already been filtered - out above, with a failure return of ENOENT. */ - len = strlen (file); - if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode)) - return 0; - - /* At this point, a trailing slash is only permitted on - symlink-to-dir; but it should have found information on the - directory, not the symlink. Call stat() to get info about the - link's referent. Our replacement stat guarantees valid results, - even if the symlink is not pointing to a directory. */ - if (!S_ISLNK (sbuf->st_mode)) - { - errno = ENOTDIR; - return -1; - } - return stat (file, sbuf); -} - -#endif /* HAVE_LSTAT */ diff --git a/gnulib/lib/malloc.c b/gnulib/lib/malloc.c deleted file mode 100644 index a325d61..0000000 --- a/gnulib/lib/malloc.c +++ /dev/null @@ -1,60 +0,0 @@ -/* malloc() function that is glibc compatible. - - Copyright (C) 1997-1998, 2006-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* written by Jim Meyering and Bruno Haible */ - -#include -/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ -#ifdef malloc -# define NEED_MALLOC_GNU 1 -# undef malloc -/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ -#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU -# define NEED_MALLOC_GNU 1 -#endif - -/* Specification. */ -#include - -#include - -/* Call the system's malloc below. */ -#undef malloc - -/* Allocate an N-byte block of memory from the heap. - If N is zero, allocate a 1-byte block. */ - -void * -rpl_malloc (size_t n) -{ - void *result; - -#if NEED_MALLOC_GNU - if (n == 0) - n = 1; -#endif - - result = malloc (n); - -#if !HAVE_MALLOC_POSIX - if (result == NULL) - errno = ENOMEM; -#endif - - return result; -} diff --git a/gnulib/lib/malloca.c b/gnulib/lib/malloca.c deleted file mode 100644 index 47a8d7a..0000000 --- a/gnulib/lib/malloca.c +++ /dev/null @@ -1,141 +0,0 @@ -/* Safe automatic memory allocation. - Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2003. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include "malloca.h" - -#include "verify.h" - -/* Use the system functions, not the gnulib overrides in this file. */ -#undef malloc - -/* The speed critical point in this file is freea() applied to an alloca() - result: it must be fast, to match the speed of alloca(). The speed of - mmalloca() and freea() in the other case are not critical, because they - are only invoked for big memory sizes. */ - -#if HAVE_ALLOCA - -/* Store the mmalloca() results in a hash table. This is needed to reliably - distinguish a mmalloca() result and an alloca() result. - - Although it is possible that the same pointer is returned by alloca() and - by mmalloca() at different times in the same application, it does not lead - to a bug in freea(), because: - - Before a pointer returned by alloca() can point into malloc()ed memory, - the function must return, and once this has happened the programmer must - not call freea() on it anyway. - - Before a pointer returned by mmalloca() can point into the stack, it - must be freed. The only function that can free it is freea(), and - when freea() frees it, it also removes it from the hash table. */ - -#define MAGIC_NUMBER 0x1415fb4a -#define MAGIC_SIZE sizeof (int) -/* This is how the header info would look like without any alignment - considerations. */ -struct preliminary_header { void *next; char room[MAGIC_SIZE]; }; -/* But the header's size must be a multiple of sa_alignment_max. */ -#define HEADER_SIZE \ - (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max) -struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; }; -verify (HEADER_SIZE == sizeof (struct header)); -/* We make the hash table quite big, so that during lookups the probability - of empty hash buckets is quite high. There is no need to make the hash - table resizable, because when the hash table gets filled so much that the - lookup becomes slow, it means that the application has memory leaks. */ -#define HASH_TABLE_SIZE 257 -static void * mmalloca_results[HASH_TABLE_SIZE]; - -#endif - -void * -mmalloca (size_t n) -{ -#if HAVE_ALLOCA - /* Allocate one more word, that serves as an indicator for malloc()ed - memory, so that freea() of an alloca() result is fast. */ - size_t nplus = n + HEADER_SIZE; - - if (nplus >= n) - { - char *p = (char *) malloc (nplus); - - if (p != NULL) - { - size_t slot; - - p += HEADER_SIZE; - - /* Put a magic number into the indicator word. */ - ((int *) p)[-1] = MAGIC_NUMBER; - - /* Enter p into the hash table. */ - slot = (unsigned long) p % HASH_TABLE_SIZE; - ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot]; - mmalloca_results[slot] = p; - - return p; - } - } - /* Out of memory. */ - return NULL; -#else -# if !MALLOC_0_IS_NONNULL - if (n == 0) - n = 1; -# endif - return malloc (n); -#endif -} - -#if HAVE_ALLOCA -void -freea (void *p) -{ - /* mmalloca() may have returned NULL. */ - if (p != NULL) - { - /* Attempt to quickly distinguish the mmalloca() result - which has - a magic indicator word - and the alloca() result - which has an - uninitialized indicator word. It is for this test that sa_increment - additional bytes are allocated in the alloca() case. */ - if (((int *) p)[-1] == MAGIC_NUMBER) - { - /* Looks like a mmalloca() result. To see whether it really is one, - perform a lookup in the hash table. */ - size_t slot = (unsigned long) p % HASH_TABLE_SIZE; - void **chain = &mmalloca_results[slot]; - for (; *chain != NULL;) - { - if (*chain == p) - { - /* Found it. Remove it from the hash table and free it. */ - char *p_begin = (char *) p - HEADER_SIZE; - *chain = ((struct header *) p_begin)->next; - free (p_begin); - return; - } - chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next; - } - } - /* At this point, we know it was not a mmalloca() result. */ - } -} -#endif diff --git a/gnulib/lib/malloca.h b/gnulib/lib/malloca.h deleted file mode 100644 index 7083a58..0000000 --- a/gnulib/lib/malloca.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Safe automatic memory allocation. - Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2003. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _MALLOCA_H -#define _MALLOCA_H - -#include -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call - alloca(N); otherwise it returns NULL. It either returns N bytes of - memory allocated on the stack, that lasts until the function returns, - or NULL. - Use of safe_alloca should be avoided: - - inside arguments of function calls - undefined behaviour, - - in inline functions - the allocation may actually last until the - calling function returns. -*/ -#if HAVE_ALLOCA -/* The OS usually guarantees only one guard page at the bottom of the stack, - 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. */ -# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) -#else -# define safe_alloca(N) ((void) (N), NULL) -#endif - -/* malloca(N) is a safe variant of alloca(N). It allocates N bytes of - memory allocated on the stack, that must be freed using freea() before - the function returns. Upon failure, it returns NULL. */ -#if HAVE_ALLOCA -# define malloca(N) \ - ((N) < 4032 - sa_increment \ - ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ - : mmalloca (N)) -#else -# define malloca(N) \ - mmalloca (N) -#endif -extern void * mmalloca (size_t n); - -/* Free a block of memory allocated through malloca(). */ -#if HAVE_ALLOCA -extern void freea (void *p); -#else -# define freea free -#endif - -/* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). - It allocates an array of N objects, each with S bytes of memory, - on the stack. S must be positive and N must be nonnegative. - The array must be freed using freea() before the function returns. */ -#if 1 -/* Cf. the definition of xalloc_oversized. */ -# define nmalloca(n, s) \ - ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \ - ? NULL \ - : malloca ((n) * (s))) -#else -extern void * nmalloca (size_t n, size_t s); -#endif - - -#ifdef __cplusplus -} -#endif - - -/* ------------------- Auxiliary, non-public definitions ------------------- */ - -/* Determine the alignment of a type at compile time. */ -#if defined __GNUC__ -# define sa_alignof __alignof__ -#elif defined __cplusplus - template struct sa_alignof_helper { char __slot1; type __slot2; }; -# define sa_alignof(type) offsetof (sa_alignof_helper, __slot2) -#elif defined __hpux - /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof - values. */ -# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) -#elif defined _AIX - /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof - values. */ -# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) -#else -# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) -#endif - -enum -{ -/* The desired alignment of memory allocations is the maximum alignment - among all elementary types. */ - sa_alignment_long = sa_alignof (long), - sa_alignment_double = sa_alignof (double), -#if HAVE_LONG_LONG_INT - sa_alignment_longlong = sa_alignof (long long), -#endif - sa_alignment_longdouble = sa_alignof (long double), - sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1) -#if HAVE_LONG_LONG_INT - | (sa_alignment_longlong - 1) -#endif - | (sa_alignment_longdouble - 1) - ) + 1, -/* The increment that guarantees room for a magic word must be >= sizeof (int) - and a multiple of sa_alignment_max. */ - sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max -}; - -#endif /* _MALLOCA_H */ diff --git a/gnulib/lib/math.in.h b/gnulib/lib/math.in.h deleted file mode 100644 index 9ac38ba..0000000 --- a/gnulib/lib/math.in.h +++ /dev/null @@ -1,810 +0,0 @@ -/* A GNU-like . - - Copyright (C) 2002-2003, 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_MATH_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ - -#ifndef _GL_MATH_H -#define _GL_MATH_H - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Helper macros to define a portability warning for the - classification macro FUNC called with VALUE. POSIX declares the - 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 \ -rpl_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -static inline int \ -rpl_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -static inline int \ -rpl_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} \ -_GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \ - "use gnulib module " #func " for portability"); \ -_GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \ - "use gnulib module " #func " for portability"); \ -_GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \ - "use gnulib module " #func " for portability") -#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ - (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ - : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ - : rpl_ ## func ## l (value)) - - -/* POSIX allows platforms that don't support NAN. But all major - machines in the past 15 years have supported something close to - IEEE NaN, so we define this unconditionally. We also must define - it on platforms like Solaris 10, where NAN is present but defined - as a function pointer rather than a floating point constant. */ -#if !defined NAN || @REPLACE_NAN@ -# if !GNULIB_defined_NAN -# undef NAN - /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ -# ifdef __DECC -static float -_NaN () -{ - static float zero = 0.0f; - return zero / zero; -} -# define NAN (_NaN()) -# else -# define NAN (0.0f / 0.0f) -# endif -# define GNULIB_defined_NAN 1 -# endif -#endif - -/* Solaris 10 defines HUGE_VAL, but as a function pointer rather - than a floating point constant. */ -#if @REPLACE_HUGE_VAL@ -# undef HUGE_VAL -# define HUGE_VAL (1.0 / 0.0) -#endif - - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if @GNULIB_FREXP@ -# if @REPLACE_FREXP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define frexp rpl_frexp -# endif -_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); -# else -_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); -# endif -_GL_CXXALIASWARN (frexp); -#elif defined GNULIB_POSIXCHECK -# undef frexp -/* Assume frexp is always declared. */ -_GL_WARN_ON_USE (frexp, "frexp is unportable - " - "use gnulib module frexp for portability"); -#endif - - -#if @GNULIB_LOGB@ -# if !@HAVE_DECL_LOGB@ -_GL_EXTERN_C double logb (double x); -# endif -#elif defined GNULIB_POSIXCHECK -# undef logb -# if HAVE_RAW_DECL_LOGB -_GL_WARN_ON_USE (logb, "logb is unportable - " - "use gnulib module logb for portability"); -# endif -#endif - - -#if @GNULIB_ACOSL@ -# if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@ -_GL_FUNCDECL_SYS (acosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (acosl, long double, (long double x)); -_GL_CXXALIASWARN (acosl); -#elif defined GNULIB_POSIXCHECK -# undef acosl -# if HAVE_RAW_DECL_ACOSL -_GL_WARN_ON_USE (acosl, "acosl is unportable - " - "use gnulib module mathl for portability"); -# endif -#endif - - -#if @GNULIB_ASINL@ -# if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@ -_GL_FUNCDECL_SYS (asinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (asinl, long double, (long double x)); -_GL_CXXALIASWARN (asinl); -#elif defined GNULIB_POSIXCHECK -# undef asinl -# if HAVE_RAW_DECL_ASINL -_GL_WARN_ON_USE (asinl, "asinl is unportable - " - "use gnulib module mathl for portability"); -# endif -#endif - - -#if @GNULIB_ATANL@ -# if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@ -_GL_FUNCDECL_SYS (atanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (atanl, long double, (long double x)); -_GL_CXXALIASWARN (atanl); -#elif defined GNULIB_POSIXCHECK -# undef atanl -# if HAVE_RAW_DECL_ATANL -_GL_WARN_ON_USE (atanl, "atanl is unportable - " - "use gnulib module mathl for portability"); -# endif -#endif - - -#if @GNULIB_CEILF@ -# if @REPLACE_CEILF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define ceilf rpl_ceilf -# endif -_GL_FUNCDECL_RPL (ceilf, float, (float x)); -_GL_CXXALIAS_RPL (ceilf, float, (float x)); -# else -# if !@HAVE_DECL_CEILF@ -_GL_FUNCDECL_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (ceilf, float, (float x)); -# endif -_GL_CXXALIASWARN (ceilf); -#elif defined GNULIB_POSIXCHECK -# undef ceilf -# if HAVE_RAW_DECL_CEILF -_GL_WARN_ON_USE (ceilf, "ceilf is unportable - " - "use gnulib module ceilf for portability"); -# endif -#endif - -#if @GNULIB_CEIL@ -# if @REPLACE_CEIL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define ceil rpl_ceil -# endif -_GL_FUNCDECL_RPL (ceil, double, (double x)); -_GL_CXXALIAS_RPL (ceil, double, (double x)); -# else -_GL_CXXALIAS_SYS (ceil, double, (double x)); -# endif -_GL_CXXALIASWARN (ceil); -#endif - -#if @GNULIB_CEILL@ -# if @REPLACE_CEILL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define ceill rpl_ceill -# endif -_GL_FUNCDECL_RPL (ceill, long double, (long double x)); -_GL_CXXALIAS_RPL (ceill, long double, (long double x)); -# else -# if !@HAVE_DECL_CEILL@ -_GL_FUNCDECL_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (ceill, long double, (long double x)); -# endif -_GL_CXXALIASWARN (ceill); -#elif defined GNULIB_POSIXCHECK -# undef ceill -# if HAVE_RAW_DECL_CEILL -_GL_WARN_ON_USE (ceill, "ceill is unportable - " - "use gnulib module ceill for portability"); -# endif -#endif - - -#if @GNULIB_COSL@ -# if !@HAVE_COSL@ || !@HAVE_DECL_COSL@ -_GL_FUNCDECL_SYS (cosl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (cosl, long double, (long double x)); -_GL_CXXALIASWARN (cosl); -#elif defined GNULIB_POSIXCHECK -# undef cosl -# if HAVE_RAW_DECL_COSL -_GL_WARN_ON_USE (cosl, "cosl is unportable - " - "use gnulib module mathl for portability"); -# endif -#endif - - -#if @GNULIB_EXPL@ -# if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@ -_GL_FUNCDECL_SYS (expl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (expl, long double, (long double x)); -_GL_CXXALIASWARN (expl); -#elif defined GNULIB_POSIXCHECK -# undef expl -# if HAVE_RAW_DECL_EXPL -_GL_WARN_ON_USE (expl, "expl is unportable - " - "use gnulib module mathl for portability"); -# endif -#endif - - -#if @GNULIB_FLOORF@ -# if @REPLACE_FLOORF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define floorf rpl_floorf -# endif -_GL_FUNCDECL_RPL (floorf, float, (float x)); -_GL_CXXALIAS_RPL (floorf, float, (float x)); -# else -# if !@HAVE_DECL_FLOORF@ -_GL_FUNCDECL_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (floorf, float, (float x)); -# endif -_GL_CXXALIASWARN (floorf); -#elif defined GNULIB_POSIXCHECK -# undef floorf -# if HAVE_RAW_DECL_FLOORF -_GL_WARN_ON_USE (floorf, "floorf is unportable - " - "use gnulib module floorf for portability"); -# endif -#endif - -#if @GNULIB_FLOOR@ -# if @REPLACE_FLOOR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define floor rpl_floor -# endif -_GL_FUNCDECL_RPL (floor, double, (double x)); -_GL_CXXALIAS_RPL (floor, double, (double x)); -# else -_GL_CXXALIAS_SYS (floor, double, (double x)); -# endif -_GL_CXXALIASWARN (floor); -#endif - -#if @GNULIB_FLOORL@ -# if @REPLACE_FLOORL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define floorl rpl_floorl -# endif -_GL_FUNCDECL_RPL (floorl, long double, (long double x)); -_GL_CXXALIAS_RPL (floorl, long double, (long double x)); -# else -# if !@HAVE_DECL_FLOORL@ -_GL_FUNCDECL_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (floorl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (floorl); -#elif defined GNULIB_POSIXCHECK -# undef floorl -# if HAVE_RAW_DECL_FLOORL -_GL_WARN_ON_USE (floorl, "floorl is unportable - " - "use gnulib module floorl for portability"); -# endif -#endif - - -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define frexpl rpl_frexpl -# endif -_GL_FUNCDECL_RPL (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr)); -#else -# if !@HAVE_DECL_FREXPL@ -_GL_FUNCDECL_SYS (frexpl, long double, - (long double x, int *expptr) _GL_ARG_NONNULL ((2))); -# endif -# if @GNULIB_FREXPL@ -_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr)); -# endif -#endif -#if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@) -_GL_CXXALIASWARN (frexpl); -#endif -#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK -# undef frexpl -# if HAVE_RAW_DECL_FREXPL -_GL_WARN_ON_USE (frexpl, "frexpl is unportable - " - "use gnulib module frexpl for portability"); -# endif -#endif - - -/* Return x * 2^exp. */ -#if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define ldexpl rpl_ldexpl -# endif -_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp)); -_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp)); -#else -# if !@HAVE_DECL_LDEXPL@ -_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp)); -# endif -# if @GNULIB_LDEXPL@ -_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp)); -# endif -#endif -#if @GNULIB_LDEXPL@ -_GL_CXXALIASWARN (ldexpl); -#endif -#if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK -# undef ldexpl -# if HAVE_RAW_DECL_LDEXPL -_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - " - "use gnulib module ldexpl for portability"); -# endif -#endif - - -#if @GNULIB_LOGL@ -# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ -_GL_FUNCDECL_SYS (logl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (logl, long double, (long double x)); -_GL_CXXALIASWARN (logl); -#elif defined GNULIB_POSIXCHECK -# undef logl -# if HAVE_RAW_DECL_LOGL -_GL_WARN_ON_USE (logl, "logl is unportable - " - "use gnulib module mathl for portability"); -# endif -#endif - - -#if @GNULIB_ROUNDF@ -# if @REPLACE_ROUNDF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundf -# define roundf rpl_roundf -# endif -_GL_FUNCDECL_RPL (roundf, float, (float x)); -_GL_CXXALIAS_RPL (roundf, float, (float x)); -# else -# if !@HAVE_DECL_ROUNDF@ -_GL_FUNCDECL_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (roundf, float, (float x)); -# endif -_GL_CXXALIASWARN (roundf); -#elif defined GNULIB_POSIXCHECK -# undef roundf -# if HAVE_RAW_DECL_ROUNDF -_GL_WARN_ON_USE (roundf, "roundf is unportable - " - "use gnulib module roundf for portability"); -# endif -#endif - -#if @GNULIB_ROUND@ -# if @REPLACE_ROUND@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef round -# define round rpl_round -# endif -_GL_FUNCDECL_RPL (round, double, (double x)); -_GL_CXXALIAS_RPL (round, double, (double x)); -# else -# if !@HAVE_DECL_ROUND@ -_GL_FUNCDECL_SYS (round, double, (double x)); -# endif -_GL_CXXALIAS_SYS (round, double, (double x)); -# endif -_GL_CXXALIASWARN (round); -#elif defined GNULIB_POSIXCHECK -# undef round -# if HAVE_RAW_DECL_ROUND -_GL_WARN_ON_USE (round, "round is unportable - " - "use gnulib module round for portability"); -# endif -#endif - -#if @GNULIB_ROUNDL@ -# if @REPLACE_ROUNDL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef roundl -# define roundl rpl_roundl -# endif -_GL_FUNCDECL_RPL (roundl, long double, (long double x)); -_GL_CXXALIAS_RPL (roundl, long double, (long double x)); -# else -# if !@HAVE_DECL_ROUNDL@ -_GL_FUNCDECL_SYS (roundl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (roundl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (roundl); -#elif defined GNULIB_POSIXCHECK -# undef roundl -# if HAVE_RAW_DECL_ROUNDL -_GL_WARN_ON_USE (roundl, "roundl is unportable - " - "use gnulib module roundl for portability"); -# endif -#endif - - -#if @GNULIB_SINL@ -# if !@HAVE_SINL@ || !@HAVE_DECL_SINL@ -_GL_FUNCDECL_SYS (sinl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sinl, long double, (long double x)); -_GL_CXXALIASWARN (sinl); -#elif defined GNULIB_POSIXCHECK -# undef sinl -# if HAVE_RAW_DECL_SINL -_GL_WARN_ON_USE (sinl, "sinl is unportable - " - "use gnulib module mathl for portability"); -# endif -#endif - - -#if @GNULIB_SQRTL@ -# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@ -_GL_FUNCDECL_SYS (sqrtl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (sqrtl, long double, (long double x)); -_GL_CXXALIASWARN (sqrtl); -#elif defined GNULIB_POSIXCHECK -# undef sqrtl -# if HAVE_RAW_DECL_SQRTL -_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " - "use gnulib module mathl for portability"); -# endif -#endif - - -#if @GNULIB_TANL@ -# if !@HAVE_TANL@ || !@HAVE_DECL_TANL@ -_GL_FUNCDECL_SYS (tanl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (tanl, long double, (long double x)); -_GL_CXXALIASWARN (tanl); -#elif defined GNULIB_POSIXCHECK -# undef tanl -# if HAVE_RAW_DECL_TANL -_GL_WARN_ON_USE (tanl, "tanl is unportable - " - "use gnulib module mathl for portability"); -# endif -#endif - - -#if @GNULIB_TRUNCF@ -# if @REPLACE_TRUNCF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define truncf rpl_truncf -# endif -_GL_FUNCDECL_RPL (truncf, float, (float x)); -_GL_CXXALIAS_RPL (truncf, float, (float x)); -# else -# if !@HAVE_DECL_TRUNCF@ -_GL_FUNCDECL_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (truncf, float, (float x)); -# endif -_GL_CXXALIASWARN (truncf); -#elif defined GNULIB_POSIXCHECK -# undef truncf -# if HAVE_RAW_DECL_TRUNCF -_GL_WARN_ON_USE (truncf, "truncf is unportable - " - "use gnulib module truncf for portability"); -# endif -#endif - -#if @GNULIB_TRUNC@ -# if @REPLACE_TRUNC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define trunc rpl_trunc -# endif -_GL_FUNCDECL_RPL (trunc, double, (double x)); -_GL_CXXALIAS_RPL (trunc, double, (double x)); -# else -# if !@HAVE_DECL_TRUNC@ -_GL_FUNCDECL_SYS (trunc, double, (double x)); -# endif -_GL_CXXALIAS_SYS (trunc, double, (double x)); -# endif -_GL_CXXALIASWARN (trunc); -#elif defined GNULIB_POSIXCHECK -# undef trunc -# if HAVE_RAW_DECL_TRUNC -_GL_WARN_ON_USE (trunc, "trunc is unportable - " - "use gnulib module trunc for portability"); -# endif -#endif - -#if @GNULIB_TRUNCL@ -# if @REPLACE_TRUNCL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncl -# define truncl rpl_truncl -# endif -_GL_FUNCDECL_RPL (truncl, long double, (long double x)); -_GL_CXXALIAS_RPL (truncl, long double, (long double x)); -# else -# if !@HAVE_DECL_TRUNCL@ -_GL_FUNCDECL_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIAS_SYS (truncl, long double, (long double x)); -# endif -_GL_CXXALIASWARN (truncl); -#elif defined GNULIB_POSIXCHECK -# undef truncl -# if HAVE_RAW_DECL_TRUNCL -_GL_WARN_ON_USE (truncl, "truncl is unportable - " - "use gnulib module truncl for portability"); -# endif -#endif - - -#if @GNULIB_ISFINITE@ -# if @REPLACE_ISFINITE@ -_GL_EXTERN_C int gl_isfinitef (float x); -_GL_EXTERN_C int gl_isfinited (double x); -_GL_EXTERN_C int gl_isfinitel (long double x); -# undef isfinite -# define isfinite(x) \ - (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \ - sizeof (x) == sizeof (double) ? gl_isfinited (x) : \ - gl_isfinitef (x)) -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isfinite -_GL_WARN_REAL_FLOATING_DECL (isfinite); -# undef isfinite -# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x) -# endif -#endif - - -#if @GNULIB_ISINF@ -# if @REPLACE_ISINF@ -_GL_EXTERN_C int gl_isinff (float x); -_GL_EXTERN_C int gl_isinfd (double x); -_GL_EXTERN_C int gl_isinfl (long double x); -# undef isinf -# define isinf(x) \ - (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \ - sizeof (x) == sizeof (double) ? gl_isinfd (x) : \ - gl_isinff (x)) -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isinf -_GL_WARN_REAL_FLOATING_DECL (isinf); -# undef isinf -# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x) -# endif -#endif - - -#if @GNULIB_ISNANF@ -/* Test for NaN for 'float' numbers. */ -# if @HAVE_ISNANF@ -/* The original included above provides a declaration of isnan macro - or (older) isnanf function. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) -# elif defined isnan -# undef isnanf -# define isnanf(x) isnan ((float)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanf -# define isnanf rpl_isnanf -_GL_EXTERN_C int isnanf (float x); -# endif -#endif - -#if @GNULIB_ISNAND@ -/* Test for NaN for 'double' numbers. - This function is a gnulib extension, unlike isnan() which applied only - to 'double' numbers earlier but now is a type-generic macro. */ -# if @HAVE_ISNAND@ -/* The original included above provides a declaration of isnan - macro. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnand -# define isnand(x) __builtin_isnan ((double)(x)) -# else -# undef isnand -# define isnand(x) isnan ((double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnand -# define isnand rpl_isnand -_GL_EXTERN_C int isnand (double x); -# endif -#endif - -#if @GNULIB_ISNANL@ -/* Test for NaN for 'long double' numbers. */ -# if @HAVE_ISNANL@ -/* The original included above provides a declaration of isnan - macro or (older) isnanl function. */ -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanl -# define isnanl(x) __builtin_isnanl ((long double)(x)) -# elif defined isnan -# undef isnanl -# define isnanl(x) isnan ((long double)(x)) -# endif -# else -/* Test whether X is a NaN. */ -# undef isnanl -# define isnanl rpl_isnanl -_GL_EXTERN_C int isnanl (long double x); -# endif -#endif - -/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */ -#if @GNULIB_ISNAN@ -# if @REPLACE_ISNAN@ -/* We can't just use the isnanf macro (e.g.) as exposed by - isnanf.h (e.g.) here, because those may end up being macros - that recursively expand back to isnan. So use the gnulib - replacements for them directly. */ -# if @HAVE_ISNANF@ && __GNUC__ >= 4 -# define gl_isnan_f(x) __builtin_isnanf ((float)(x)) -# else -_GL_EXTERN_C int rpl_isnanf (float x); -# define gl_isnan_f(x) rpl_isnanf (x) -# endif -# if @HAVE_ISNAND@ && __GNUC__ >= 4 -# define gl_isnan_d(x) __builtin_isnan ((double)(x)) -# else -_GL_EXTERN_C int rpl_isnand (double x); -# define gl_isnan_d(x) rpl_isnand (x) -# endif -# if @HAVE_ISNANL@ && __GNUC__ >= 4 -# define gl_isnan_l(x) __builtin_isnanl ((long double)(x)) -# else -_GL_EXTERN_C int rpl_isnanl (long double x); -# define gl_isnan_l(x) rpl_isnanl (x) -# endif -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \ - sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \ - gl_isnan_f (x)) -# elif __GNUC__ >= 4 -# undef isnan -# define isnan(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \ - sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \ - __builtin_isnanf ((float)(x))) -# endif -/* Ensure isnan is a macro. */ -# ifndef isnan -# define isnan isnan -# endif -#elif defined GNULIB_POSIXCHECK -# if defined isnan -_GL_WARN_REAL_FLOATING_DECL (isnan); -# undef isnan -# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x) -# endif -#endif - - -#if @GNULIB_SIGNBIT@ -# if @REPLACE_SIGNBIT_USING_GCC@ -# undef signbit - /* GCC 4.0 and newer provides three built-ins for signbit. */ -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ - sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ - __builtin_signbitf (x)) -# endif -# if @REPLACE_SIGNBIT@ -# undef signbit -_GL_EXTERN_C int gl_signbitf (float arg); -_GL_EXTERN_C int gl_signbitd (double arg); -_GL_EXTERN_C int gl_signbitl (long double arg); -# if __GNUC__ >= 2 && !__STRICT_ANSI__ -# define _GL_NUM_UINT_WORDS(type) \ - ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) -# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf -# define gl_signbitf_OPTIMIZED_MACRO -# define gl_signbitf(arg) \ - ({ union { float _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd -# define gl_signbitd_OPTIMIZED_MACRO -# define gl_signbitd(arg) \ - ({ union { double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl -# define gl_signbitl_OPTIMIZED_MACRO -# define gl_signbitl(arg) \ - ({ union { long double _value; \ - unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ - } _m; \ - _m._value = (arg); \ - (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ - }) -# endif -# endif -# define signbit(x) \ - (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \ - sizeof (x) == sizeof (double) ? gl_signbitd (x) : \ - gl_signbitf (x)) -# endif -#elif defined GNULIB_POSIXCHECK -# if defined signbit -_GL_WARN_REAL_FLOATING_DECL (signbit); -# undef signbit -# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x) -# endif -#endif - - -#endif /* _GL_MATH_H */ -#endif /* _GL_MATH_H */ diff --git a/gnulib/lib/mbchar.c b/gnulib/lib/mbchar.c deleted file mode 100644 index c9b0dcd..0000000 --- a/gnulib/lib/mbchar.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 2001, 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - - -#include - -#include - -#include "mbchar.h" - -#if IS_BASIC_ASCII - -/* Bit table of characters in the ISO C "basic character set". */ -const unsigned int is_basic_table [UCHAR_MAX / 32 + 1] = -{ - 0x00001a00, /* '\t' '\v' '\f' */ - 0xffffffef, /* ' '...'#' '%'...'?' */ - 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */ - 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */ - /* The remaining bits are 0. */ -}; - -#endif /* IS_BASIC_ASCII */ diff --git a/gnulib/lib/mbchar.h b/gnulib/lib/mbchar.h deleted file mode 100644 index 6dcb6cf..0000000 --- a/gnulib/lib/mbchar.h +++ /dev/null @@ -1,350 +0,0 @@ -/* Multibyte character data type. - Copyright (C) 2001, 2005-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible . */ - -/* A multibyte character is a short subsequence of a char* string, - representing a single wide character. - - We use multibyte characters instead of wide characters because of - the following goals: - 1) correct multibyte handling, i.e. operate according to the LC_CTYPE - locale, - 2) ease of maintenance, i.e. the maintainer needs not know all details - of the ISO C 99 standard, - 3) don't fail grossly if the input is not in the encoding set by the - locale, because often different encodings are in use in the same - countries (ISO-8859-1/UTF-8, EUC-JP/Shift_JIS, ...), - 4) fast in the case of ASCII characters, - 5) portability, i.e. don't make unportable assumptions about wchar_t. - - Multibyte characters are only accessed through the mb* macros. - - mb_ptr (mbc) - return a pointer to the beginning of the multibyte sequence. - - mb_len (mbc) - returns the number of bytes occupied by the multibyte sequence. - Always > 0. - - mb_iseq (mbc, sc) - returns true if mbc is the standard ASCII character sc. - - mb_isnul (mbc) - returns true if mbc is the nul character. - - mb_cmp (mbc1, mbc2) - returns a positive, zero, or negative value depending on whether mbc1 - sorts after, same or before mbc2. - - mb_casecmp (mbc1, mbc2) - returns a positive, zero, or negative value depending on whether mbc1 - sorts after, same or before mbc2, modulo upper/lowercase conversion. - - mb_equal (mbc1, mbc2) - returns true if mbc1 and mbc2 are equal. - - mb_caseequal (mbc1, mbc2) - returns true if mbc1 and mbc2 are equal modulo upper/lowercase conversion. - - mb_isalnum (mbc) - returns true if mbc is alphanumeric. - - mb_isalpha (mbc) - returns true if mbc is alphabetic. - - mb_isascii(mbc) - returns true if mbc is plain ASCII. - - mb_isblank (mbc) - returns true if mbc is a blank. - - mb_iscntrl (mbc) - returns true if mbc is a control character. - - mb_isdigit (mbc) - returns true if mbc is a decimal digit. - - mb_isgraph (mbc) - returns true if mbc is a graphic character. - - mb_islower (mbc) - returns true if mbc is lowercase. - - mb_isprint (mbc) - returns true if mbc is a printable character. - - mb_ispunct (mbc) - returns true if mbc is a punctuation character. - - mb_isspace (mbc) - returns true if mbc is a space character. - - mb_isupper (mbc) - returns true if mbc is uppercase. - - mb_isxdigit (mbc) - returns true if mbc is a hexadecimal digit. - - mb_width (mbc) - returns the number of columns on the output device occupied by mbc. - Always >= 0. - - mb_putc (mbc, stream) - outputs mbc on stream, a byte oriented FILE stream opened for output. - - mb_setascii (&mbc, sc) - assigns the standard ASCII character sc to mbc. - - mb_copy (&destmbc, &srcmbc) - copies srcmbc to destmbc. - - Here are the function prototypes of the macros. - - extern const char * mb_ptr (const mbchar_t mbc); - extern size_t mb_len (const mbchar_t mbc); - extern bool mb_iseq (const mbchar_t mbc, char sc); - extern bool mb_isnul (const mbchar_t mbc); - extern int mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2); - extern int mb_casecmp (const mbchar_t mbc1, const mbchar_t mbc2); - extern bool mb_equal (const mbchar_t mbc1, const mbchar_t mbc2); - extern bool mb_caseequal (const mbchar_t mbc1, const mbchar_t mbc2); - extern bool mb_isalnum (const mbchar_t mbc); - extern bool mb_isalpha (const mbchar_t mbc); - extern bool mb_isascii (const mbchar_t mbc); - extern bool mb_isblank (const mbchar_t mbc); - extern bool mb_iscntrl (const mbchar_t mbc); - extern bool mb_isdigit (const mbchar_t mbc); - extern bool mb_isgraph (const mbchar_t mbc); - extern bool mb_islower (const mbchar_t mbc); - extern bool mb_isprint (const mbchar_t mbc); - extern bool mb_ispunct (const mbchar_t mbc); - extern bool mb_isspace (const mbchar_t mbc); - extern bool mb_isupper (const mbchar_t mbc); - extern bool mb_isxdigit (const mbchar_t mbc); - extern int mb_width (const mbchar_t mbc); - extern void mb_putc (const mbchar_t mbc, FILE *stream); - extern void mb_setascii (mbchar_t *new, char sc); - extern void mb_copy (mbchar_t *new, const mbchar_t *old); - */ - -#ifndef _MBCHAR_H -#define _MBCHAR_H 1 - -#include -#include - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.1 has a bug: and must be included before - . */ -#include -#include -#include -#include - -#define MBCHAR_BUF_SIZE 24 - -struct mbchar -{ - const char *ptr; /* pointer to current character */ - size_t bytes; /* number of bytes of current character, > 0 */ - bool wc_valid; /* true if wc is a valid wide character */ - wchar_t wc; /* if wc_valid: the current character */ - char buf[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */ -}; - -/* EOF (not a real character) is represented with bytes = 0 and - wc_valid = false. */ - -typedef struct mbchar mbchar_t; - -/* Access the current character. */ -#define mb_ptr(mbc) ((mbc).ptr) -#define mb_len(mbc) ((mbc).bytes) - -/* Comparison of characters. */ -#define mb_iseq(mbc, sc) ((mbc).wc_valid && (mbc).wc == (sc)) -#define mb_isnul(mbc) ((mbc).wc_valid && (mbc).wc == 0) -#define mb_cmp(mbc1, mbc2) \ - ((mbc1).wc_valid \ - ? ((mbc2).wc_valid \ - ? (int) (mbc1).wc - (int) (mbc2).wc \ - : -1) \ - : ((mbc2).wc_valid \ - ? 1 \ - : (mbc1).bytes == (mbc2).bytes \ - ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ - : (mbc1).bytes < (mbc2).bytes \ - ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ - : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) -#define mb_casecmp(mbc1, mbc2) \ - ((mbc1).wc_valid \ - ? ((mbc2).wc_valid \ - ? (int) towlower ((mbc1).wc) - (int) towlower ((mbc2).wc) \ - : -1) \ - : ((mbc2).wc_valid \ - ? 1 \ - : (mbc1).bytes == (mbc2).bytes \ - ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \ - : (mbc1).bytes < (mbc2).bytes \ - ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \ - : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1))) -#define mb_equal(mbc1, mbc2) \ - ((mbc1).wc_valid && (mbc2).wc_valid \ - ? (mbc1).wc == (mbc2).wc \ - : (mbc1).bytes == (mbc2).bytes \ - && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) -#define mb_caseequal(mbc1, mbc2) \ - ((mbc1).wc_valid && (mbc2).wc_valid \ - ? towlower ((mbc1).wc) == towlower ((mbc2).wc) \ - : (mbc1).bytes == (mbc2).bytes \ - && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0) - -/* , classification. */ -#define mb_isascii(mbc) \ - ((mbc).wc_valid && (mbc).wc >= 0 && (mbc).wc <= 127) -#define mb_isalnum(mbc) ((mbc).wc_valid && iswalnum ((mbc).wc)) -#define mb_isalpha(mbc) ((mbc).wc_valid && iswalpha ((mbc).wc)) -#define mb_isblank(mbc) ((mbc).wc_valid && iswblank ((mbc).wc)) -#define mb_iscntrl(mbc) ((mbc).wc_valid && iswcntrl ((mbc).wc)) -#define mb_isdigit(mbc) ((mbc).wc_valid && iswdigit ((mbc).wc)) -#define mb_isgraph(mbc) ((mbc).wc_valid && iswgraph ((mbc).wc)) -#define mb_islower(mbc) ((mbc).wc_valid && iswlower ((mbc).wc)) -#define mb_isprint(mbc) ((mbc).wc_valid && iswprint ((mbc).wc)) -#define mb_ispunct(mbc) ((mbc).wc_valid && iswpunct ((mbc).wc)) -#define mb_isspace(mbc) ((mbc).wc_valid && iswspace ((mbc).wc)) -#define mb_isupper(mbc) ((mbc).wc_valid && iswupper ((mbc).wc)) -#define mb_isxdigit(mbc) ((mbc).wc_valid && iswxdigit ((mbc).wc)) - -/* Extra function. */ - -/* Unprintable characters appear as a small box of width 1. */ -#define MB_UNPRINTABLE_WIDTH 1 - -static inline int -mb_width_aux (wint_t wc) -{ - int w = wcwidth (wc); - /* For unprintable characters, arbitrarily return 0 for control characters - and MB_UNPRINTABLE_WIDTH otherwise. */ - return (w >= 0 ? w : iswcntrl (wc) ? 0 : MB_UNPRINTABLE_WIDTH); -} - -#define mb_width(mbc) \ - ((mbc).wc_valid ? mb_width_aux ((mbc).wc) : MB_UNPRINTABLE_WIDTH) - -/* Output. */ -#define mb_putc(mbc, stream) fwrite ((mbc).ptr, 1, (mbc).bytes, (stream)) - -/* Assignment. */ -#define mb_setascii(mbc, sc) \ - ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \ - (mbc)->wc = (mbc)->buf[0] = (sc)) - -/* Copying a character. */ -static inline void -mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc) -{ - if (old_mbc->ptr == &old_mbc->buf[0]) - { - memcpy (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes); - new_mbc->ptr = &new_mbc->buf[0]; - } - else - new_mbc->ptr = old_mbc->ptr; - new_mbc->bytes = old_mbc->bytes; - if ((new_mbc->wc_valid = old_mbc->wc_valid)) - new_mbc->wc = old_mbc->wc; -} - - -/* is_basic(c) tests whether the single-byte character c is in the - ISO C "basic character set". - This is a convenience function, and is in this file only to share code - between mbiter_multi.h and mbfile_multi.h. */ -#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) -/* The character set is ISO-646, not EBCDIC. */ -# define IS_BASIC_ASCII 1 - -extern const unsigned int is_basic_table[]; - -static inline bool -is_basic (char c) -{ - return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31)) - & 1; -} - -#else - -static inline bool -is_basic (char c) -{ - switch (c) - { - case '\t': case '\v': case '\f': - case ' ': case '!': case '"': case '#': case '%': - case '&': case '\'': case '(': case ')': case '*': - case '+': case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': - case '?': - case 'A': case 'B': case 'C': case 'D': case 'E': - case 'F': case 'G': case 'H': case 'I': case 'J': - case 'K': case 'L': case 'M': case 'N': case 'O': - case 'P': case 'Q': case 'R': case 'S': case 'T': - case 'U': case 'V': case 'W': case 'X': case 'Y': - case 'Z': - case '[': case '\\': case ']': case '^': case '_': - case 'a': case 'b': case 'c': case 'd': case 'e': - case 'f': case 'g': case 'h': case 'i': case 'j': - case 'k': case 'l': case 'm': case 'n': case 'o': - case 'p': case 'q': case 'r': case 's': case 't': - case 'u': case 'v': case 'w': case 'x': case 'y': - case 'z': case '{': case '|': case '}': case '~': - return 1; - default: - return 0; - } -} - -#endif - -#endif /* _MBCHAR_H */ diff --git a/gnulib/lib/mbrtowc.c b/gnulib/lib/mbrtowc.c deleted file mode 100644 index d9c25cc..0000000 --- a/gnulib/lib/mbrtowc.c +++ /dev/null @@ -1,396 +0,0 @@ -/* Convert multibyte character to wide character. - Copyright (C) 1999-2002, 2005-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#if GNULIB_defined_mbstate_t -/* Implement mbrtowc() on top of mbtowc(). */ - -# include -# include - -# include "localcharset.h" -# include "streq.h" -# include "verify.h" - - -verify (sizeof (mbstate_t) >= 4); - -static char internal_state[4]; - -size_t -mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) -{ - char *pstate = (char *)ps; - - if (s == NULL) - { - pwc = NULL; - s = ""; - n = 1; - } - - if (n == 0) - return (size_t)(-2); - - /* Here n > 0. */ - - if (pstate == NULL) - pstate = internal_state; - - { - size_t nstate = pstate[0]; - char buf[4]; - const char *p; - size_t m; - - switch (nstate) - { - case 0: - p = s; - m = n; - break; - case 3: - buf[2] = pstate[3]; - /*FALLTHROUGH*/ - case 2: - buf[1] = pstate[2]; - /*FALLTHROUGH*/ - case 1: - buf[0] = pstate[1]; - p = buf; - m = nstate; - buf[m++] = s[0]; - if (n >= 2 && m < 4) - { - buf[m++] = s[1]; - if (n >= 3 && m < 4) - buf[m++] = s[2]; - } - break; - default: - errno = EINVAL; - return (size_t)(-1); - } - - /* Here m > 0. */ - -# if __GLIBC__ || defined __UCLIBC__ - /* Work around bug */ - mbtowc (NULL, NULL, 0); -# endif - { - int res = mbtowc (pwc, p, m); - - if (res >= 0) - { - if (pwc != NULL && ((*pwc == 0) != (res == 0))) - abort (); - if (nstate >= (res > 0 ? res : 1)) - abort (); - res -= nstate; - pstate[0] = 0; - return res; - } - - /* mbtowc does not distinguish between invalid and incomplete multibyte - sequences. But mbrtowc needs to make this distinction. - There are two possible approaches: - - Use iconv() and its return value. - - Use built-in knowledge about the possible encodings. - Given the low quality of implementation of iconv() on the systems that - lack mbrtowc(), we use the second approach. - The possible encodings are: - - 8-bit encodings, - - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS, - - UTF-8. - Use specialized code for each. */ - if (m >= 4 || m >= MB_CUR_MAX) - goto invalid; - /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ - { - const char *encoding = locale_charset (); - - if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) - { - /* Cf. unistr/u8-mblen.c. */ - unsigned char c = (unsigned char) p[0]; - - if (c >= 0xc2) - { - if (c < 0xe0) - { - if (m == 1) - goto incomplete; - } - else if (c < 0xf0) - { - if (m == 1) - goto incomplete; - if (m == 2) - { - unsigned char c2 = (unsigned char) p[1]; - - if ((c2 ^ 0x80) < 0x40 - && (c >= 0xe1 || c2 >= 0xa0) - && (c != 0xed || c2 < 0xa0)) - goto incomplete; - } - } - else if (c <= 0xf4) - { - if (m == 1) - goto incomplete; - else /* m == 2 || m == 3 */ - { - unsigned char c2 = (unsigned char) p[1]; - - if ((c2 ^ 0x80) < 0x40 - && (c >= 0xf1 || c2 >= 0x90) - && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) - { - if (m == 2) - goto incomplete; - else /* m == 3 */ - { - unsigned char c3 = (unsigned char) p[2]; - - if ((c3 ^ 0x80) < 0x40) - goto incomplete; - } - } - } - } - } - goto invalid; - } - - /* As a reference for this code, you can use the GNU libiconv - implementation. Look for uses of the RET_TOOFEW macro. */ - - if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f) - goto incomplete; - } - if (m == 2) - { - unsigned char c = (unsigned char) p[0]; - - if (c == 0x8f) - { - unsigned char c2 = (unsigned char) p[1]; - - if (c2 >= 0xa1 && c2 < 0xff) - goto incomplete; - } - } - goto invalid; - } - if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) - || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) - || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if (c >= 0xa1 && c < 0xff) - goto incomplete; - } - goto invalid; - } - if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0xa1 && c < 0xff) || c == 0x8e) - goto incomplete; - } - else /* m == 2 || m == 3 */ - { - unsigned char c = (unsigned char) p[0]; - - if (c == 0x8e) - goto incomplete; - } - goto invalid; - } - if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe)) - goto incomplete; - } - else /* m == 2 || m == 3 */ - { - unsigned char c = (unsigned char) p[0]; - - if (c >= 0x90 && c <= 0xe3) - { - unsigned char c2 = (unsigned char) p[1]; - - if (c2 >= 0x30 && c2 <= 0x39) - { - if (m == 2) - goto incomplete; - else /* m == 3 */ - { - unsigned char c3 = (unsigned char) p[2]; - - if (c3 >= 0x81 && c3 <= 0xfe) - goto incomplete; - } - } - } - } - goto invalid; - } - if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea) - || (c >= 0xf0 && c <= 0xf9)) - goto incomplete; - } - goto invalid; - } - - /* An unknown multibyte encoding. */ - goto incomplete; - } - - incomplete: - { - size_t k = nstate; - /* Here 0 <= k < m < 4. */ - pstate[++k] = s[0]; - if (k < m) - { - pstate[++k] = s[1]; - if (k < m) - pstate[++k] = s[2]; - } - if (k != m) - abort (); - } - pstate[0] = m; - return (size_t)(-2); - - invalid: - errno = EILSEQ; - /* The conversion state is undefined, says POSIX. */ - return (size_t)(-1); - } - } -} - -#else -/* Override the system's mbrtowc() function. */ - -# undef mbrtowc - -size_t -rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) -{ -# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG - if (s == NULL) - { - pwc = NULL; - s = ""; - n = 1; - } -# endif - -# if MBRTOWC_RETVAL_BUG - { - static mbstate_t internal_state; - - /* Override mbrtowc's internal state. We can not call mbsinit() on the - hidden internal state, but we can call it on our variable. */ - if (ps == NULL) - ps = &internal_state; - - if (!mbsinit (ps)) - { - /* Parse the rest of the multibyte character byte for byte. */ - size_t count = 0; - for (; n > 0; s++, n--) - { - wchar_t wc; - size_t ret = mbrtowc (&wc, s, 1, ps); - - if (ret == (size_t)(-1)) - return (size_t)(-1); - count++; - if (ret != (size_t)(-2)) - { - /* The multibyte character has been completed. */ - if (pwc != NULL) - *pwc = wc; - return (wc == 0 ? 0 : count); - } - } - return (size_t)(-2); - } - } -# endif - -# if MBRTOWC_NUL_RETVAL_BUG - { - wchar_t wc; - size_t ret = mbrtowc (&wc, s, n, ps); - - if (ret != (size_t)(-1) && ret != (size_t)(-2)) - { - if (pwc != NULL) - *pwc = wc; - if (wc == 0) - ret = 0; - } - return ret; - } -# else - { -# if MBRTOWC_NULL_ARG1_BUG - wchar_t dummy; - - if (pwc == NULL) - pwc = &dummy; -# endif - - return mbrtowc (pwc, s, n, ps); - } -# endif -} - -#endif diff --git a/gnulib/lib/mbscasestr.c b/gnulib/lib/mbscasestr.c deleted file mode 100644 index f013808..0000000 --- a/gnulib/lib/mbscasestr.c +++ /dev/null @@ -1,412 +0,0 @@ -/* Case-insensitive searching in a string. - Copyright (C) 2005-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2005. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include -#include /* for NULL, in case a nonstandard string.h lacks it */ - -#include "malloca.h" -#include "mbuiter.h" - -#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) - -/* Knuth-Morris-Pratt algorithm. */ -#define UNIT unsigned char -#define CANON_ELEMENT(c) TOLOWER (c) -#include "str-kmp.h" - -/* Knuth-Morris-Pratt algorithm. - See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm - Return a boolean indicating success: - Return true and set *RESULTP if the search was completed. - Return false if it was aborted because not enough memory was available. */ -static bool -knuth_morris_pratt_multibyte (const char *haystack, const char *needle, - const char **resultp) -{ - size_t m = mbslen (needle); - mbchar_t *needle_mbchars; - size_t *table; - - /* Allocate room for needle_mbchars and the table. */ - char *memory = (char *) nmalloca (m, sizeof (mbchar_t) + sizeof (size_t)); - if (memory == NULL) - return false; - needle_mbchars = (mbchar_t *) memory; - table = (size_t *) (memory + m * sizeof (mbchar_t)); - - /* Fill needle_mbchars. */ - { - mbui_iterator_t iter; - size_t j; - - j = 0; - for (mbui_init (iter, needle); mbui_avail (iter); mbui_advance (iter), j++) - { - mb_copy (&needle_mbchars[j], &mbui_cur (iter)); - if (needle_mbchars[j].wc_valid) - needle_mbchars[j].wc = towlower (needle_mbchars[j].wc); - } - } - - /* Fill the table. - For 0 < i < m: - 0 < table[i] <= i is defined such that - forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x], - and table[i] is as large as possible with this property. - This implies: - 1) For 0 < i < m: - If table[i] < i, - needle[table[i]..i-1] = needle[0..i-1-table[i]]. - 2) For 0 < i < m: - rhaystack[0..i-1] == needle[0..i-1] - and exists h, i <= h < m: rhaystack[h] != needle[h] - implies - forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1]. - table[0] remains uninitialized. */ - { - size_t i, j; - - /* i = 1: Nothing to verify for x = 0. */ - table[1] = 1; - j = 0; - - for (i = 2; i < m; i++) - { - /* Here: j = i-1 - table[i-1]. - The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold - for x < table[i-1], by induction. - Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ - mbchar_t *b = &needle_mbchars[i - 1]; - - for (;;) - { - /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x] - is known to hold for x < i-1-j. - Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ - if (mb_equal (*b, needle_mbchars[j])) - { - /* Set table[i] := i-1-j. */ - table[i] = i - ++j; - break; - } - /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds - for x = i-1-j, because - needle[i-1] != needle[j] = needle[i-1-x]. */ - if (j == 0) - { - /* The inequality holds for all possible x. */ - table[i] = i; - break; - } - /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds - for i-1-j < x < i-1-j+table[j], because for these x: - needle[x..i-2] - = needle[x-(i-1-j)..j-1] - != needle[0..j-1-(x-(i-1-j))] (by definition of table[j]) - = needle[0..i-2-x], - hence needle[x..i-1] != needle[0..i-1-x]. - Furthermore - needle[i-1-j+table[j]..i-2] - = needle[table[j]..j-1] - = needle[0..j-1-table[j]] (by definition of table[j]). */ - j = j - table[j]; - } - /* Here: j = i - table[i]. */ - } - } - - /* Search, using the table to accelerate the processing. */ - { - size_t j; - mbui_iterator_t rhaystack; - mbui_iterator_t phaystack; - - *resultp = NULL; - j = 0; - mbui_init (rhaystack, haystack); - mbui_init (phaystack, haystack); - /* Invariant: phaystack = rhaystack + j. */ - while (mbui_avail (phaystack)) - { - mbchar_t c; - - mb_copy (&c, &mbui_cur (phaystack)); - if (c.wc_valid) - c.wc = towlower (c.wc); - if (mb_equal (needle_mbchars[j], c)) - { - j++; - mbui_advance (phaystack); - if (j == m) - { - /* The entire needle has been found. */ - *resultp = mbui_cur_ptr (rhaystack); - break; - } - } - else if (j > 0) - { - /* Found a match of needle[0..j-1], mismatch at needle[j]. */ - size_t count = table[j]; - j -= count; - for (; count > 0; count--) - { - if (!mbui_avail (rhaystack)) - abort (); - mbui_advance (rhaystack); - } - } - else - { - /* Found a mismatch at needle[0] already. */ - if (!mbui_avail (rhaystack)) - abort (); - mbui_advance (rhaystack); - mbui_advance (phaystack); - } - } - } - - freea (memory); - return true; -} - -/* Find the first occurrence of the character string NEEDLE in the character - string HAYSTACK, using case-insensitive comparison. - Note: This function may, in multibyte locales, return success even if - strlen (haystack) < strlen (needle) ! */ -char * -mbscasestr (const char *haystack, const char *needle) -{ - /* Be careful not to look at the entire extent of haystack or needle - until needed. This is useful because of these two cases: - - haystack may be very long, and a match of needle found early, - - needle may be very long, and not even a short initial segment of - needle may be found in haystack. */ - if (MB_CUR_MAX > 1) - { - mbui_iterator_t iter_needle; - - mbui_init (iter_needle, needle); - if (mbui_avail (iter_needle)) - { - /* Minimizing the worst-case complexity: - Let n = mbslen(haystack), m = mbslen(needle). - The naïve algorithm is O(n*m) worst-case. - The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a - memory allocation. - To achieve linear complexity and yet amortize the cost of the - memory allocation, we activate the Knuth-Morris-Pratt algorithm - only once the naïve algorithm has already run for some time; more - precisely, when - - the outer loop count is >= 10, - - the average number of comparisons per outer loop is >= 5, - - the total number of comparisons is >= m. - But we try it only once. If the memory allocation attempt failed, - we don't retry it. */ - bool try_kmp = true; - size_t outer_loop_count = 0; - size_t comparison_count = 0; - size_t last_ccount = 0; /* last comparison count */ - mbui_iterator_t iter_needle_last_ccount; /* = needle + last_ccount */ - - mbchar_t b; - mbui_iterator_t iter_haystack; - - mbui_init (iter_needle_last_ccount, needle); - - mb_copy (&b, &mbui_cur (iter_needle)); - if (b.wc_valid) - b.wc = towlower (b.wc); - - mbui_init (iter_haystack, haystack); - for (;; mbui_advance (iter_haystack)) - { - mbchar_t c; - - if (!mbui_avail (iter_haystack)) - /* No match. */ - return NULL; - - /* See whether it's advisable to use an asymptotically faster - algorithm. */ - if (try_kmp - && outer_loop_count >= 10 - && comparison_count >= 5 * outer_loop_count) - { - /* See if needle + comparison_count now reaches the end of - needle. */ - size_t count = comparison_count - last_ccount; - for (; - count > 0 && mbui_avail (iter_needle_last_ccount); - count--) - mbui_advance (iter_needle_last_ccount); - last_ccount = comparison_count; - if (!mbui_avail (iter_needle_last_ccount)) - { - /* Try the Knuth-Morris-Pratt algorithm. */ - const char *result; - bool success = - knuth_morris_pratt_multibyte (haystack, needle, - &result); - if (success) - return (char *) result; - try_kmp = false; - } - } - - outer_loop_count++; - comparison_count++; - mb_copy (&c, &mbui_cur (iter_haystack)); - if (c.wc_valid) - c.wc = towlower (c.wc); - if (mb_equal (c, b)) - /* The first character matches. */ - { - mbui_iterator_t rhaystack; - mbui_iterator_t rneedle; - - memcpy (&rhaystack, &iter_haystack, sizeof (mbui_iterator_t)); - mbui_advance (rhaystack); - - mbui_init (rneedle, needle); - if (!mbui_avail (rneedle)) - abort (); - mbui_advance (rneedle); - - for (;; mbui_advance (rhaystack), mbui_advance (rneedle)) - { - if (!mbui_avail (rneedle)) - /* Found a match. */ - return (char *) mbui_cur_ptr (iter_haystack); - if (!mbui_avail (rhaystack)) - /* No match. */ - return NULL; - comparison_count++; - if (!mb_caseequal (mbui_cur (rhaystack), - mbui_cur (rneedle))) - /* Nothing in this round. */ - break; - } - } - } - } - else - return (char *) haystack; - } - else - { - if (*needle != '\0') - { - /* Minimizing the worst-case complexity: - Let n = strlen(haystack), m = strlen(needle). - The naïve algorithm is O(n*m) worst-case. - The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a - memory allocation. - To achieve linear complexity and yet amortize the cost of the - memory allocation, we activate the Knuth-Morris-Pratt algorithm - only once the naïve algorithm has already run for some time; more - precisely, when - - the outer loop count is >= 10, - - the average number of comparisons per outer loop is >= 5, - - the total number of comparisons is >= m. - But we try it only once. If the memory allocation attempt failed, - we don't retry it. */ - bool try_kmp = true; - size_t outer_loop_count = 0; - size_t comparison_count = 0; - size_t last_ccount = 0; /* last comparison count */ - const char *needle_last_ccount = needle; /* = needle + last_ccount */ - - /* Speed up the following searches of needle by caching its first - character. */ - unsigned char b = TOLOWER ((unsigned char) *needle); - - needle++; - for (;; haystack++) - { - if (*haystack == '\0') - /* No match. */ - return NULL; - - /* See whether it's advisable to use an asymptotically faster - algorithm. */ - if (try_kmp - && outer_loop_count >= 10 - && comparison_count >= 5 * outer_loop_count) - { - /* See if needle + comparison_count now reaches the end of - needle. */ - if (needle_last_ccount != NULL) - { - needle_last_ccount += - strnlen (needle_last_ccount, - comparison_count - last_ccount); - if (*needle_last_ccount == '\0') - needle_last_ccount = NULL; - last_ccount = comparison_count; - } - if (needle_last_ccount == NULL) - { - /* Try the Knuth-Morris-Pratt algorithm. */ - const unsigned char *result; - bool success = - knuth_morris_pratt ((const unsigned char *) haystack, - (const unsigned char *) (needle - 1), - strlen (needle - 1), - &result); - if (success) - return (char *) result; - try_kmp = false; - } - } - - outer_loop_count++; - comparison_count++; - if (TOLOWER ((unsigned char) *haystack) == b) - /* The first character matches. */ - { - const char *rhaystack = haystack + 1; - const char *rneedle = needle; - - for (;; rhaystack++, rneedle++) - { - if (*rneedle == '\0') - /* Found a match. */ - return (char *) haystack; - if (*rhaystack == '\0') - /* No match. */ - return NULL; - comparison_count++; - if (TOLOWER ((unsigned char) *rhaystack) - != TOLOWER ((unsigned char) *rneedle)) - /* Nothing in this round. */ - break; - } - } - } - } - else - return (char *) haystack; - } -} diff --git a/gnulib/lib/mbsinit.c b/gnulib/lib/mbsinit.c deleted file mode 100644 index 8ac2137..0000000 --- a/gnulib/lib/mbsinit.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Test for initial conversion state. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include "verify.h" - -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - -/* On native Windows, 'mbstate_t' is defined as 'int'. */ - -int -mbsinit (const mbstate_t *ps) -{ - return ps == NULL || *ps == 0; -} - -#else - -/* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() - and wcrtomb(), wcsrtombs(). - We assume that - - sizeof (mbstate_t) >= 4, - - only stateless encodings are supported (such as UTF-8 and EUC-JP, but - not ISO-2022 variants), - - for each encoding, the number of bytes for a wide character is <= 4. - (This maximum is attained for UTF-8, GB18030, EUC-TW.) - We define the meaning of mbstate_t as follows: - - In mb -> wc direction, mbstate_t's first byte contains the number of - buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. - - In wc -> mb direction, mbstate_t contains no information. In other - words, it is always in the initial state. */ - -verify (sizeof (mbstate_t) >= 4); - -int -mbsinit (const mbstate_t *ps) -{ - const char *pstate = (const char *)ps; - - return pstate == NULL || pstate[0] == 0; -} - -#endif diff --git a/gnulib/lib/mbslen.c b/gnulib/lib/mbslen.c deleted file mode 100644 index efddd52..0000000 --- a/gnulib/lib/mbslen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Counting the multibyte characters in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2007. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include - -#include "mbuiter.h" - -/* Return the number of multibyte characters in the character string STRING. */ -size_t -mbslen (const char *string) -{ - if (MB_CUR_MAX > 1) - { - size_t count; - mbui_iterator_t iter; - - count = 0; - for (mbui_init (iter, string); mbui_avail (iter); mbui_advance (iter)) - count++; - - return count; - } - else - return strlen (string); -} diff --git a/gnulib/lib/mbsrtowcs-impl.h b/gnulib/lib/mbsrtowcs-impl.h deleted file mode 100644 index e78bbfb..0000000 --- a/gnulib/lib/mbsrtowcs-impl.h +++ /dev/null @@ -1,122 +0,0 @@ -/* Convert string to wide string. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -size_t -mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) -{ - if (ps == NULL) - ps = &_gl_mbsrtowcs_state; - { - const char *src = *srcp; - - if (dest != NULL) - { - wchar_t *destptr = dest; - - for (; len > 0; destptr++, len--) - { - size_t src_avail; - size_t ret; - - /* An optimized variant of - src_avail = strnlen1 (src, MB_LEN_MAX); */ - if (src[0] == '\0') - src_avail = 1; - else if (src[1] == '\0') - src_avail = 2; - else if (src[2] == '\0') - src_avail = 3; - else if (MB_LEN_MAX <= 4 || src[3] == '\0') - src_avail = 4; - else - src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4); - - /* Parse the next multibyte character. */ - ret = mbrtowc (destptr, src, src_avail, ps); - - if (ret == (size_t)(-2)) - /* Encountered a multibyte character that extends past a '\0' byte - or that is longer than MB_LEN_MAX bytes. Cannot happen. */ - abort (); - - if (ret == (size_t)(-1)) - goto bad_input; - if (ret == 0) - { - src = NULL; - /* Here mbsinit (ps). */ - break; - } - src += ret; - } - - *srcp = src; - return destptr - dest; - } - else - { - /* Ignore dest and len, don't store *srcp at the end, and - don't clobber *ps. */ - mbstate_t state = *ps; - size_t totalcount = 0; - - for (;; totalcount++) - { - size_t src_avail; - size_t ret; - - /* An optimized variant of - src_avail = strnlen1 (src, MB_LEN_MAX); */ - if (src[0] == '\0') - src_avail = 1; - else if (src[1] == '\0') - src_avail = 2; - else if (src[2] == '\0') - src_avail = 3; - else if (MB_LEN_MAX <= 4 || src[3] == '\0') - src_avail = 4; - else - src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4); - - /* Parse the next multibyte character. */ - ret = mbrtowc (NULL, src, src_avail, &state); - - if (ret == (size_t)(-2)) - /* Encountered a multibyte character that extends past a '\0' byte - or that is longer than MB_LEN_MAX bytes. Cannot happen. */ - abort (); - - if (ret == (size_t)(-1)) - goto bad_input2; - if (ret == 0) - { - /* Here mbsinit (&state). */ - break; - } - src += ret; - } - - return totalcount; - } - - bad_input: - *srcp = src; - bad_input2: - errno = EILSEQ; - return (size_t)(-1); - } -} diff --git a/gnulib/lib/mbsrtowcs-state.c b/gnulib/lib/mbsrtowcs-state.c deleted file mode 100644 index 91073b5..0000000 --- a/gnulib/lib/mbsrtowcs-state.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Convert string to wide string. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include - -/* Internal state used by the functions mbsrtowcs() and mbsnrtowcs(). */ -mbstate_t _gl_mbsrtowcs_state -/* The state must initially be in the "initial state"; so, zero-initialize it. - On most systems, putting it into BSS is sufficient. Not so on MacOS X 10.3, - see . - When it needs an initializer, use 0 or {0} as initializer? 0 only works - when mbstate_t is a scalar type (such as when gnulib defines it, or on - AIX, IRIX, mingw). {0} works as an initializer in all cases: for a struct - or union type, but also for a scalar type (ISO C 99, 6.7.8.(11)). */ -#if defined __ELF__ - /* On ELF systems, variables in BSS behave well. */ -#else - /* Use braces, to be on the safe side. */ - = { 0 } -#endif - ; diff --git a/gnulib/lib/mbsrtowcs.c b/gnulib/lib/mbsrtowcs.c deleted file mode 100644 index 69e6dff..0000000 --- a/gnulib/lib/mbsrtowcs.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Convert string to wide string. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include -#include - -#include "strnlen1.h" - - -extern mbstate_t _gl_mbsrtowcs_state; - -#include "mbsrtowcs-impl.h" diff --git a/gnulib/lib/mbsstr.c b/gnulib/lib/mbsstr.c deleted file mode 100644 index 611000e..0000000 --- a/gnulib/lib/mbsstr.c +++ /dev/null @@ -1,382 +0,0 @@ -/* Searching in a string. - Copyright (C) 2005-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2005. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include /* for NULL, in case a nonstandard string.h lacks it */ - -#include "malloca.h" -#include "mbuiter.h" - -/* Knuth-Morris-Pratt algorithm. */ -#define UNIT unsigned char -#define CANON_ELEMENT(c) c -#include "str-kmp.h" - -/* Knuth-Morris-Pratt algorithm. - See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm - Return a boolean indicating success: - Return true and set *RESULTP if the search was completed. - Return false if it was aborted because not enough memory was available. */ -static bool -knuth_morris_pratt_multibyte (const char *haystack, const char *needle, - const char **resultp) -{ - size_t m = mbslen (needle); - mbchar_t *needle_mbchars; - size_t *table; - - /* Allocate room for needle_mbchars and the table. */ - char *memory = (char *) nmalloca (m, sizeof (mbchar_t) + sizeof (size_t)); - if (memory == NULL) - return false; - needle_mbchars = (mbchar_t *) memory; - table = (size_t *) (memory + m * sizeof (mbchar_t)); - - /* Fill needle_mbchars. */ - { - mbui_iterator_t iter; - size_t j; - - j = 0; - for (mbui_init (iter, needle); mbui_avail (iter); mbui_advance (iter), j++) - mb_copy (&needle_mbchars[j], &mbui_cur (iter)); - } - - /* Fill the table. - For 0 < i < m: - 0 < table[i] <= i is defined such that - forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x], - and table[i] is as large as possible with this property. - This implies: - 1) For 0 < i < m: - If table[i] < i, - needle[table[i]..i-1] = needle[0..i-1-table[i]]. - 2) For 0 < i < m: - rhaystack[0..i-1] == needle[0..i-1] - and exists h, i <= h < m: rhaystack[h] != needle[h] - implies - forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1]. - table[0] remains uninitialized. */ - { - size_t i, j; - - /* i = 1: Nothing to verify for x = 0. */ - table[1] = 1; - j = 0; - - for (i = 2; i < m; i++) - { - /* Here: j = i-1 - table[i-1]. - The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold - for x < table[i-1], by induction. - Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ - mbchar_t *b = &needle_mbchars[i - 1]; - - for (;;) - { - /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x] - is known to hold for x < i-1-j. - Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ - if (mb_equal (*b, needle_mbchars[j])) - { - /* Set table[i] := i-1-j. */ - table[i] = i - ++j; - break; - } - /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds - for x = i-1-j, because - needle[i-1] != needle[j] = needle[i-1-x]. */ - if (j == 0) - { - /* The inequality holds for all possible x. */ - table[i] = i; - break; - } - /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds - for i-1-j < x < i-1-j+table[j], because for these x: - needle[x..i-2] - = needle[x-(i-1-j)..j-1] - != needle[0..j-1-(x-(i-1-j))] (by definition of table[j]) - = needle[0..i-2-x], - hence needle[x..i-1] != needle[0..i-1-x]. - Furthermore - needle[i-1-j+table[j]..i-2] - = needle[table[j]..j-1] - = needle[0..j-1-table[j]] (by definition of table[j]). */ - j = j - table[j]; - } - /* Here: j = i - table[i]. */ - } - } - - /* Search, using the table to accelerate the processing. */ - { - size_t j; - mbui_iterator_t rhaystack; - mbui_iterator_t phaystack; - - *resultp = NULL; - j = 0; - mbui_init (rhaystack, haystack); - mbui_init (phaystack, haystack); - /* Invariant: phaystack = rhaystack + j. */ - while (mbui_avail (phaystack)) - if (mb_equal (needle_mbchars[j], mbui_cur (phaystack))) - { - j++; - mbui_advance (phaystack); - if (j == m) - { - /* The entire needle has been found. */ - *resultp = mbui_cur_ptr (rhaystack); - break; - } - } - else if (j > 0) - { - /* Found a match of needle[0..j-1], mismatch at needle[j]. */ - size_t count = table[j]; - j -= count; - for (; count > 0; count--) - { - if (!mbui_avail (rhaystack)) - abort (); - mbui_advance (rhaystack); - } - } - else - { - /* Found a mismatch at needle[0] already. */ - if (!mbui_avail (rhaystack)) - abort (); - mbui_advance (rhaystack); - mbui_advance (phaystack); - } - } - - freea (memory); - return true; -} - -/* Find the first occurrence of the character string NEEDLE in the character - string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. */ -char * -mbsstr (const char *haystack, const char *needle) -{ - /* Be careful not to look at the entire extent of haystack or needle - until needed. This is useful because of these two cases: - - haystack may be very long, and a match of needle found early, - - needle may be very long, and not even a short initial segment of - needle may be found in haystack. */ - if (MB_CUR_MAX > 1) - { - mbui_iterator_t iter_needle; - - mbui_init (iter_needle, needle); - if (mbui_avail (iter_needle)) - { - /* Minimizing the worst-case complexity: - Let n = mbslen(haystack), m = mbslen(needle). - The naïve algorithm is O(n*m) worst-case. - The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a - memory allocation. - To achieve linear complexity and yet amortize the cost of the - memory allocation, we activate the Knuth-Morris-Pratt algorithm - only once the naïve algorithm has already run for some time; more - precisely, when - - the outer loop count is >= 10, - - the average number of comparisons per outer loop is >= 5, - - the total number of comparisons is >= m. - But we try it only once. If the memory allocation attempt failed, - we don't retry it. */ - bool try_kmp = true; - size_t outer_loop_count = 0; - size_t comparison_count = 0; - size_t last_ccount = 0; /* last comparison count */ - mbui_iterator_t iter_needle_last_ccount; /* = needle + last_ccount */ - - mbui_iterator_t iter_haystack; - - mbui_init (iter_needle_last_ccount, needle); - mbui_init (iter_haystack, haystack); - for (;; mbui_advance (iter_haystack)) - { - if (!mbui_avail (iter_haystack)) - /* No match. */ - return NULL; - - /* See whether it's advisable to use an asymptotically faster - algorithm. */ - if (try_kmp - && outer_loop_count >= 10 - && comparison_count >= 5 * outer_loop_count) - { - /* See if needle + comparison_count now reaches the end of - needle. */ - size_t count = comparison_count - last_ccount; - for (; - count > 0 && mbui_avail (iter_needle_last_ccount); - count--) - mbui_advance (iter_needle_last_ccount); - last_ccount = comparison_count; - if (!mbui_avail (iter_needle_last_ccount)) - { - /* Try the Knuth-Morris-Pratt algorithm. */ - const char *result; - bool success = - knuth_morris_pratt_multibyte (haystack, needle, - &result); - if (success) - return (char *) result; - try_kmp = false; - } - } - - outer_loop_count++; - comparison_count++; - if (mb_equal (mbui_cur (iter_haystack), mbui_cur (iter_needle))) - /* The first character matches. */ - { - mbui_iterator_t rhaystack; - mbui_iterator_t rneedle; - - memcpy (&rhaystack, &iter_haystack, sizeof (mbui_iterator_t)); - mbui_advance (rhaystack); - - mbui_init (rneedle, needle); - if (!mbui_avail (rneedle)) - abort (); - mbui_advance (rneedle); - - for (;; mbui_advance (rhaystack), mbui_advance (rneedle)) - { - if (!mbui_avail (rneedle)) - /* Found a match. */ - return (char *) mbui_cur_ptr (iter_haystack); - if (!mbui_avail (rhaystack)) - /* No match. */ - return NULL; - comparison_count++; - if (!mb_equal (mbui_cur (rhaystack), mbui_cur (rneedle))) - /* Nothing in this round. */ - break; - } - } - } - } - else - return (char *) haystack; - } - else - { - if (*needle != '\0') - { - /* Minimizing the worst-case complexity: - Let n = strlen(haystack), m = strlen(needle). - The naïve algorithm is O(n*m) worst-case. - The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a - memory allocation. - To achieve linear complexity and yet amortize the cost of the - memory allocation, we activate the Knuth-Morris-Pratt algorithm - only once the naïve algorithm has already run for some time; more - precisely, when - - the outer loop count is >= 10, - - the average number of comparisons per outer loop is >= 5, - - the total number of comparisons is >= m. - But we try it only once. If the memory allocation attempt failed, - we don't retry it. */ - bool try_kmp = true; - size_t outer_loop_count = 0; - size_t comparison_count = 0; - size_t last_ccount = 0; /* last comparison count */ - const char *needle_last_ccount = needle; /* = needle + last_ccount */ - - /* Speed up the following searches of needle by caching its first - character. */ - char b = *needle++; - - for (;; haystack++) - { - if (*haystack == '\0') - /* No match. */ - return NULL; - - /* See whether it's advisable to use an asymptotically faster - algorithm. */ - if (try_kmp - && outer_loop_count >= 10 - && comparison_count >= 5 * outer_loop_count) - { - /* See if needle + comparison_count now reaches the end of - needle. */ - if (needle_last_ccount != NULL) - { - needle_last_ccount += - strnlen (needle_last_ccount, - comparison_count - last_ccount); - if (*needle_last_ccount == '\0') - needle_last_ccount = NULL; - last_ccount = comparison_count; - } - if (needle_last_ccount == NULL) - { - /* Try the Knuth-Morris-Pratt algorithm. */ - const unsigned char *result; - bool success = - knuth_morris_pratt ((const unsigned char *) haystack, - (const unsigned char *) (needle - 1), - strlen (needle - 1), - &result); - if (success) - return (char *) result; - try_kmp = false; - } - } - - outer_loop_count++; - comparison_count++; - if (*haystack == b) - /* The first character matches. */ - { - const char *rhaystack = haystack + 1; - const char *rneedle = needle; - - for (;; rhaystack++, rneedle++) - { - if (*rneedle == '\0') - /* Found a match. */ - return (char *) haystack; - if (*rhaystack == '\0') - /* No match. */ - return NULL; - comparison_count++; - if (*rhaystack != *rneedle) - /* Nothing in this round. */ - break; - } - } - } - } - else - return (char *) haystack; - } -} diff --git a/gnulib/lib/mbtowc-impl.h b/gnulib/lib/mbtowc-impl.h deleted file mode 100644 index 1645eb5..0000000 --- a/gnulib/lib/mbtowc-impl.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Convert multibyte character to wide character. - Copyright (C) 2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2011. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* We don't need a static internal state, because the encoding is not state - dependent, and when mbrtowc returns (size_t)(-2). we throw the result - away. */ - -int -mbtowc (wchar_t *pwc, const char *s, size_t n) -{ - if (s == NULL) - return 0; - else - { - mbstate_t state; - wchar_t wc; - size_t result; - - memset (&state, 0, sizeof (mbstate_t)); - result = mbrtowc (&wc, s, n, &state); - if (result == (size_t)-1 || result == (size_t)-2) - { - errno = EILSEQ; - return -1; - } - if (pwc != NULL) - *pwc = wc; - return (wc == 0 ? 0 : result); - } -} diff --git a/gnulib/lib/mbtowc.c b/gnulib/lib/mbtowc.c deleted file mode 100644 index b3848a1..0000000 --- a/gnulib/lib/mbtowc.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Convert multibyte character to wide character. - Copyright (C) 2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2011. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include - -#include -#include -#include - -#include "mbtowc-impl.h" diff --git a/gnulib/lib/mbuiter.h b/gnulib/lib/mbuiter.h deleted file mode 100644 index 178f36e..0000000 --- a/gnulib/lib/mbuiter.h +++ /dev/null @@ -1,222 +0,0 @@ -/* Iterating through multibyte strings: macros for multi-byte encodings. - Copyright (C) 2001, 2005, 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible . */ - -/* The macros in this file implement forward iteration through a - multi-byte string, without knowing its length a-priori. - - With these macros, an iteration loop that looks like - - char *iter; - for (iter = buf; *iter != '\0'; iter++) - { - do_something (*iter); - } - - becomes - - mbui_iterator_t iter; - for (mbui_init (iter, buf); mbui_avail (iter); mbui_advance (iter)) - { - do_something (mbui_cur_ptr (iter), mb_len (mbui_cur (iter))); - } - - The benefit of these macros over plain use of mbrtowc is: - - Handling of invalid multibyte sequences is possible without - making the code more complicated, while still preserving the - invalid multibyte sequences. - - Compared to mbiter.h, the macros here don't need to know the string's - length a-priori. The downside is that at each step, the look-ahead - that guards against overrunning the terminating '\0' is more expensive. - The mbui_* macros are therefore suitable when there is a high probability - that only the first few multibyte characters need to be inspected. - Whereas the mbi_* macros are better if usually the iteration runs - through the entire string. - - mbui_iterator_t - is a type usable for variable declarations. - - mbui_init (iter, startptr) - initializes the iterator, starting at startptr. - - mbui_avail (iter) - returns true if there are more multibyte chracters available before - the end of string is reached. In this case, mbui_cur (iter) is - initialized to the next multibyte chracter. - - mbui_advance (iter) - advances the iterator by one multibyte character. - - mbui_cur (iter) - returns the current multibyte character, of type mbchar_t. All the - macros defined in mbchar.h can be used on it. - - mbui_cur_ptr (iter) - return a pointer to the beginning of the current multibyte character. - - mbui_reloc (iter, ptrdiff) - relocates iterator when the string is moved by ptrdiff bytes. - - mbui_copy (&destiter, &srciter) - copies srciter to destiter. - - Here are the function prototypes of the macros. - - extern void mbui_init (mbui_iterator_t iter, const char *startptr); - extern bool mbui_avail (mbui_iterator_t iter); - extern void mbui_advance (mbui_iterator_t iter); - extern mbchar_t mbui_cur (mbui_iterator_t iter); - extern const char * mbui_cur_ptr (mbui_iterator_t iter); - extern void mbui_reloc (mbui_iterator_t iter, ptrdiff_t ptrdiff); - extern void mbui_copy (mbui_iterator_t *new, const mbui_iterator_t *old); - */ - -#ifndef _MBUITER_H -#define _MBUITER_H 1 - -#include -#include -#include -#include -#include - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.1 has a bug: and must be included before - . */ -#include -#include -#include - -#include "mbchar.h" -#include "strnlen1.h" - -struct mbuiter_multi -{ - bool in_shift; /* true if next byte may not be interpreted as ASCII */ - mbstate_t state; /* if in_shift: current shift state */ - bool next_done; /* true if mbui_avail has already filled the following */ - struct mbchar cur; /* the current character: - const char *cur.ptr pointer to current character - The following are only valid after mbui_avail. - size_t cur.bytes number of bytes of current character - bool cur.wc_valid true if wc is a valid wide character - wchar_t cur.wc if wc_valid: the current character - */ -}; - -static inline void -mbuiter_multi_next (struct mbuiter_multi *iter) -{ - if (iter->next_done) - return; - if (iter->in_shift) - goto with_shift; - /* Handle most ASCII characters quickly, without calling mbrtowc(). */ - if (is_basic (*iter->cur.ptr)) - { - /* These characters are part of the basic character set. ISO C 99 - guarantees that their wide character code is identical to their - char code. */ - iter->cur.bytes = 1; - iter->cur.wc = *iter->cur.ptr; - iter->cur.wc_valid = true; - } - else - { - assert (mbsinit (&iter->state)); - iter->in_shift = true; - with_shift: - iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr, - strnlen1 (iter->cur.ptr, MB_CUR_MAX), - &iter->state); - if (iter->cur.bytes == (size_t) -1) - { - /* An invalid multibyte sequence was encountered. */ - iter->cur.bytes = 1; - iter->cur.wc_valid = false; - /* Whether to set iter->in_shift = false and reset iter->state - or not is not very important; the string is bogus anyway. */ - } - else if (iter->cur.bytes == (size_t) -2) - { - /* An incomplete multibyte character at the end. */ - iter->cur.bytes = strlen (iter->cur.ptr); - iter->cur.wc_valid = false; - /* Whether to set iter->in_shift = false and reset iter->state - or not is not important; the string end is reached anyway. */ - } - else - { - if (iter->cur.bytes == 0) - { - /* A null wide character was encountered. */ - iter->cur.bytes = 1; - assert (*iter->cur.ptr == '\0'); - assert (iter->cur.wc == 0); - } - iter->cur.wc_valid = true; - - /* When in the initial state, we can go back treating ASCII - characters more quickly. */ - if (mbsinit (&iter->state)) - iter->in_shift = false; - } - } - iter->next_done = true; -} - -static inline void -mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff) -{ - iter->cur.ptr += ptrdiff; -} - -static inline void -mbuiter_multi_copy (struct mbuiter_multi *new_iter, const struct mbuiter_multi *old_iter) -{ - if ((new_iter->in_shift = old_iter->in_shift)) - memcpy (&new_iter->state, &old_iter->state, sizeof (mbstate_t)); - else - memset (&new_iter->state, 0, sizeof (mbstate_t)); - new_iter->next_done = old_iter->next_done; - mb_copy (&new_iter->cur, &old_iter->cur); -} - -/* Iteration macros. */ -typedef struct mbuiter_multi mbui_iterator_t; -#define mbui_init(iter, startptr) \ - ((iter).cur.ptr = (startptr), \ - (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \ - (iter).next_done = false) -#define mbui_avail(iter) \ - (mbuiter_multi_next (&(iter)), !mb_isnul ((iter).cur)) -#define mbui_advance(iter) \ - ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false) - -/* Access to the current character. */ -#define mbui_cur(iter) (iter).cur -#define mbui_cur_ptr(iter) (iter).cur.ptr - -/* Relocation. */ -#define mbui_reloc(iter, ptrdiff) mbuiter_multi_reloc (&iter, ptrdiff) - -/* Copying an iterator. */ -#define mbui_copy mbuiter_multi_copy - -#endif /* _MBUITER_H */ diff --git a/gnulib/lib/memchr.c b/gnulib/lib/memchr.c deleted file mode 100644 index 6d903b1..0000000 --- a/gnulib/lib/memchr.c +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2011 - Free Software Foundation, Inc. - - Based on strlen implementation by Torbjorn Granlund (tege@sics.se), - with help from Dan Sahlin (dan@sics.se) and - commentary by Jim Blandy (jimb@ai.mit.edu); - adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), - and implemented by Roland McGrath (roland@ai.mit.edu). - -NOTE: The canonical source of this file is maintained with the GNU C Library. -Bugs can be reported to bug-glibc@prep.ai.mit.edu. - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3 of the License, or any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . */ - -#ifndef _LIBC -# include -#endif - -#include - -#include - -#if defined _LIBC -# include -#else -# define reg_char char -#endif - -#include - -#if HAVE_BP_SYM_H || defined _LIBC -# include -#else -# define BP_SYM(sym) sym -#endif - -#undef __memchr -#ifdef _LIBC -# undef memchr -#endif - -#ifndef weak_alias -# define __memchr memchr -#endif - -/* Search no more than N bytes of S for C. */ -void * -__memchr (void const *s, int c_in, size_t n) -{ - /* On 32-bit hardware, choosing longword to be a 32-bit unsigned - long instead of a 64-bit uintmax_t tends to give better - performance. On 64-bit hardware, unsigned long is generally 64 - bits already. Change this typedef to experiment with - performance. */ - typedef unsigned long int longword; - - const unsigned char *char_ptr; - const longword *longword_ptr; - longword repeated_one; - longword repeated_c; - unsigned reg_char c; - - c = (unsigned char) c_in; - - /* Handle the first few bytes by reading one byte at a time. - Do this until CHAR_PTR is aligned on a longword boundary. */ - for (char_ptr = (const unsigned char *) s; - n > 0 && (size_t) char_ptr % sizeof (longword) != 0; - --n, ++char_ptr) - if (*char_ptr == c) - return (void *) char_ptr; - - longword_ptr = (const longword *) char_ptr; - - /* All these elucidatory comments refer to 4-byte longwords, - but the theory applies equally well to any size longwords. */ - - /* Compute auxiliary longword values: - repeated_one is a value which has a 1 in every byte. - repeated_c has c in every byte. */ - repeated_one = 0x01010101; - repeated_c = c | (c << 8); - repeated_c |= repeated_c << 16; - if (0xffffffffU < (longword) -1) - { - repeated_one |= repeated_one << 31 << 1; - repeated_c |= repeated_c << 31 << 1; - if (8 < sizeof (longword)) - { - size_t i; - - for (i = 64; i < sizeof (longword) * 8; i *= 2) - { - repeated_one |= repeated_one << i; - repeated_c |= repeated_c << i; - } - } - } - - /* Instead of the traditional loop which tests each byte, we will test a - longword at a time. The tricky part is testing if *any of the four* - bytes in the longword in question are equal to c. We first use an xor - with repeated_c. This reduces the task to testing whether *any of the - four* bytes in longword1 is zero. - - We compute tmp = - ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). - That is, we perform the following operations: - 1. Subtract repeated_one. - 2. & ~longword1. - 3. & a mask consisting of 0x80 in every byte. - Consider what happens in each byte: - - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, - and step 3 transforms it into 0x80. A carry can also be propagated - to more significant bytes. - - If a byte of longword1 is nonzero, let its lowest 1 bit be at - position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, - the byte ends in a single bit of value 0 and k bits of value 1. - After step 2, the result is just k bits of value 1: 2^k - 1. After - step 3, the result is 0. And no carry is produced. - So, if longword1 has only non-zero bytes, tmp is zero. - Whereas if longword1 has a zero byte, call j the position of the least - significant zero byte. Then the result has a zero at positions 0, ..., - j-1 and a 0x80 at position j. We cannot predict the result at the more - significant bytes (positions j+1..3), but it does not matter since we - already have a non-zero bit at position 8*j+7. - - So, the test whether any byte in longword1 is zero is equivalent to - testing whether tmp is nonzero. */ - - while (n >= sizeof (longword)) - { - longword longword1 = *longword_ptr ^ repeated_c; - - if ((((longword1 - repeated_one) & ~longword1) - & (repeated_one << 7)) != 0) - break; - longword_ptr++; - n -= sizeof (longword); - } - - char_ptr = (const unsigned char *) longword_ptr; - - /* At this point, we know that either n < sizeof (longword), or one of the - sizeof (longword) bytes starting at char_ptr is == c. On little-endian - machines, we could determine the first such byte without any further - memory accesses, just by looking at the tmp result from the last loop - iteration. But this does not work on big-endian machines. Choose code - that works in both cases. */ - - for (; n > 0; --n, ++char_ptr) - { - if (*char_ptr == c) - return (void *) char_ptr; - } - - return NULL; -} -#ifdef weak_alias -weak_alias (__memchr, BP_SYM (memchr)) -#endif diff --git a/gnulib/lib/mempcpy.c b/gnulib/lib/mempcpy.c deleted file mode 100644 index 6a148a9..0000000 --- a/gnulib/lib/mempcpy.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copy memory area and return pointer after last written byte. - Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include - -/* Copy N bytes of SRC to DEST, return pointer to bytes after the - last written byte. */ -void * -mempcpy (void *dest, const void *src, size_t n) -{ - return (char *) memcpy (dest, src, n) + n; -} diff --git a/gnulib/lib/memrchr.c b/gnulib/lib/memrchr.c deleted file mode 100644 index d7144d0..0000000 --- a/gnulib/lib/memrchr.c +++ /dev/null @@ -1,161 +0,0 @@ -/* memrchr -- find the last occurrence of a byte in a memory block - - Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2011 Free Software - Foundation, Inc. - - Based on strlen implementation by Torbjorn Granlund (tege@sics.se), - with help from Dan Sahlin (dan@sics.se) and - commentary by Jim Blandy (jimb@ai.mit.edu); - adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), - and implemented by Roland McGrath (roland@ai.mit.edu). - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if defined _LIBC -# include -#else -# include -# define reg_char char -#endif - -#include -#include - -#undef __memrchr -#ifdef _LIBC -# undef memrchr -#endif - -#ifndef weak_alias -# define __memrchr memrchr -#endif - -/* Search no more than N bytes of S for C. */ -void * -__memrchr (void const *s, int c_in, size_t n) -{ - /* On 32-bit hardware, choosing longword to be a 32-bit unsigned - long instead of a 64-bit uintmax_t tends to give better - performance. On 64-bit hardware, unsigned long is generally 64 - bits already. Change this typedef to experiment with - performance. */ - typedef unsigned long int longword; - - const unsigned char *char_ptr; - const longword *longword_ptr; - longword repeated_one; - longword repeated_c; - unsigned reg_char c; - - c = (unsigned char) c_in; - - /* Handle the last few bytes by reading one byte at a time. - Do this until CHAR_PTR is aligned on a longword boundary. */ - for (char_ptr = (const unsigned char *) s + n; - n > 0 && (size_t) char_ptr % sizeof (longword) != 0; - --n) - if (*--char_ptr == c) - return (void *) char_ptr; - - longword_ptr = (const longword *) char_ptr; - - /* All these elucidatory comments refer to 4-byte longwords, - but the theory applies equally well to any size longwords. */ - - /* Compute auxiliary longword values: - repeated_one is a value which has a 1 in every byte. - repeated_c has c in every byte. */ - repeated_one = 0x01010101; - repeated_c = c | (c << 8); - repeated_c |= repeated_c << 16; - if (0xffffffffU < (longword) -1) - { - repeated_one |= repeated_one << 31 << 1; - repeated_c |= repeated_c << 31 << 1; - if (8 < sizeof (longword)) - { - size_t i; - - for (i = 64; i < sizeof (longword) * 8; i *= 2) - { - repeated_one |= repeated_one << i; - repeated_c |= repeated_c << i; - } - } - } - - /* Instead of the traditional loop which tests each byte, we will test a - longword at a time. The tricky part is testing if *any of the four* - bytes in the longword in question are equal to c. We first use an xor - with repeated_c. This reduces the task to testing whether *any of the - four* bytes in longword1 is zero. - - We compute tmp = - ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). - That is, we perform the following operations: - 1. Subtract repeated_one. - 2. & ~longword1. - 3. & a mask consisting of 0x80 in every byte. - Consider what happens in each byte: - - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, - and step 3 transforms it into 0x80. A carry can also be propagated - to more significant bytes. - - If a byte of longword1 is nonzero, let its lowest 1 bit be at - position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, - the byte ends in a single bit of value 0 and k bits of value 1. - After step 2, the result is just k bits of value 1: 2^k - 1. After - step 3, the result is 0. And no carry is produced. - So, if longword1 has only non-zero bytes, tmp is zero. - Whereas if longword1 has a zero byte, call j the position of the least - significant zero byte. Then the result has a zero at positions 0, ..., - j-1 and a 0x80 at position j. We cannot predict the result at the more - significant bytes (positions j+1..3), but it does not matter since we - already have a non-zero bit at position 8*j+7. - - So, the test whether any byte in longword1 is zero is equivalent to - testing whether tmp is nonzero. */ - - while (n >= sizeof (longword)) - { - longword longword1 = *--longword_ptr ^ repeated_c; - - if ((((longword1 - repeated_one) & ~longword1) - & (repeated_one << 7)) != 0) - { - longword_ptr++; - break; - } - n -= sizeof (longword); - } - - char_ptr = (const unsigned char *) longword_ptr; - - /* At this point, we know that either n < sizeof (longword), or one of the - sizeof (longword) bytes starting at char_ptr is == c. On little-endian - machines, we could determine the first such byte without any further - memory accesses, just by looking at the tmp result from the last loop - iteration. But this does not work on big-endian machines. Choose code - that works in both cases. */ - - while (n-- > 0) - { - if (*--char_ptr == c) - return (void *) char_ptr; - } - - return NULL; -} -#ifdef weak_alias -weak_alias (__memrchr, memrchr) -#endif diff --git a/gnulib/lib/mkdir.c b/gnulib/lib/mkdir.c deleted file mode 100644 index 07f97b9..0000000 --- a/gnulib/lib/mkdir.c +++ /dev/null @@ -1,93 +0,0 @@ -/* On some systems, mkdir ("foo/", 0700) fails because of the trailing - slash. On those systems, this wrapper removes the trailing slash. - - Copyright (C) 2001, 2003, 2006, 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -/* Specification. */ -#include - -#include -#include -#include -#include - -#include "dirname.h" - -/* Disable the definition of mkdir to rpl_mkdir (from the - substitute) in this file. Otherwise, we'd get an endless recursion. */ -#undef mkdir - -/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. - Additionally, it declares _mkdir (and depending on compile flags, an - alias mkdir), only in the nonstandard includes and , - which are included in the override. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# define mkdir(name,mode) _mkdir (name) -# define maybe_unused _GL_UNUSED -#else -# define maybe_unused /* empty */ -#endif - -/* This function is required at least for NetBSD 1.5.2. */ - -int -rpl_mkdir (char const *dir, mode_t mode maybe_unused) -{ - int ret_val; - char *tmp_dir; - size_t len = strlen (dir); - - if (len && dir[len - 1] == '/') - { - tmp_dir = strdup (dir); - if (!tmp_dir) - { - /* Rather than rely on strdup-posix, we set errno ourselves. */ - errno = ENOMEM; - return -1; - } - strip_trailing_slashes (tmp_dir); - } - else - { - tmp_dir = (char *) dir; - } -#if FUNC_MKDIR_DOT_BUG - /* Additionally, cygwin 1.5 mistakenly creates a directory "d/./". */ - { - char *last = last_component (tmp_dir); - if (*last == '.' && (last[1] == '\0' - || (last[1] == '.' && last[2] == '\0'))) - { - struct stat st; - if (stat (tmp_dir, &st) == 0) - errno = EEXIST; - return -1; - } - } -#endif /* FUNC_MKDIR_DOT_BUG */ - - ret_val = mkdir (tmp_dir, mode); - - if (tmp_dir != dir) - free (tmp_dir); - - return ret_val; -} diff --git a/gnulib/lib/mkdirat.c b/gnulib/lib/mkdirat.c deleted file mode 100644 index ed7998d..0000000 --- a/gnulib/lib/mkdirat.c +++ /dev/null @@ -1,34 +0,0 @@ -/* fd-relative mkdir - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include - -/* Solaris 10 has no function like this. - Create a subdirectory, FILE, with mode MODE, in the directory - open on descriptor FD. If possible, do it without changing the - working directory. Otherwise, resort to using save_cwd/fchdir, - then mkdir/restore_cwd. If either the save_cwd or the restore_cwd - fails, then give a diagnostic and exit nonzero. */ - -#define AT_FUNC_NAME mkdirat -#define AT_FUNC_F1 mkdir -#define AT_FUNC_POST_FILE_PARAM_DECLS , mode_t mode -#define AT_FUNC_POST_FILE_ARGS , mode -#include "at-func.c" diff --git a/gnulib/lib/mktime.c b/gnulib/lib/mktime.c deleted file mode 100644 index c68ad9b..0000000 --- a/gnulib/lib/mktime.c +++ /dev/null @@ -1,737 +0,0 @@ -/* Convert a `struct tm' to a time_t value. - Copyright (C) 1993-1999, 2002-2007, 2009-2011 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Paul Eggert . - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Define this to have a standalone program to test this implementation of - mktime. */ -/* #define DEBUG 1 */ - -#ifndef _LIBC -# include -#endif - -/* Some of the code in this file assumes that signed integer overflow - silently wraps around. This assumption can't easily be programmed - around, nor can it be checked for portably at compile-time or - easily eliminated at run-time. - - Define WRAPV to 1 if the assumption is valid. Otherwise, define it - to 0; this forces the use of slower code that, while not guaranteed - by the C Standard, works on all production platforms that we know - about. */ -#ifndef WRAPV -# if (__GNUC__ == 4 && 4 <= __GNUC_MINOR__) || 4 < __GNUC__ -# pragma GCC optimize ("wrapv") -# define WRAPV 1 -# else -# define WRAPV 0 -# endif -#endif - -/* Assume that leap seconds are possible, unless told otherwise. - If the host has a `zic' command with a `-L leapsecondfilename' option, - then it supports leap seconds; otherwise it probably doesn't. */ -#ifndef LEAP_SECONDS_POSSIBLE -# define LEAP_SECONDS_POSSIBLE 1 -#endif - -#include - -#include - -#include /* For the real memcpy prototype. */ - -#if DEBUG -# include -# include -/* Make it work even if the system's libc has its own mktime routine. */ -# undef mktime -# define mktime my_mktime -#endif /* DEBUG */ - -/* Verify a requirement at compile-time (unlike assert, which is runtime). */ -#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } - -/* A signed type that is at least one bit wider than int. */ -#if INT_MAX <= LONG_MAX / 2 -typedef long int long_int; -#else -typedef long long int long_int; -#endif -verify (long_int_is_wide_enough, INT_MAX == INT_MAX * (long_int) 2 / 2); - -/* Shift A right by B bits portably, by dividing A by 2**B and - truncating towards minus infinity. A and B should be free of side - effects, and B should be in the range 0 <= B <= INT_BITS - 2, where - INT_BITS is the number of useful bits in an int. GNU code can - assume that INT_BITS is at least 32. - - ISO C99 says that A >> B is implementation-defined if A < 0. Some - implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift - right in the usual way when A < 0, so SHR falls back on division if - ordinary A >> B doesn't seem to be the usual signed shift. */ -#define SHR(a, b) \ - ((-1 >> 1 == -1 \ - && (long_int) -1 >> 1 == -1 \ - && ((time_t) -1 >> 1 == -1 || ! TYPE_SIGNED (time_t))) \ - ? (a) >> (b) \ - : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) - -/* The extra casts in the following macros work around compiler bugs, - e.g., in Cray C 5.0.3.0. */ - -/* True if the arithmetic type T is an integer type. bool counts as - an integer. */ -#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) - -/* True if negative values of the signed integer type T use two's - complement, or if T is an unsigned integer type. */ -#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) - -/* True if the arithmetic type T is signed. */ -#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - -/* The maximum and minimum values for the integer type T. These - macros have undefined behavior if T is signed and has padding bits. - If this is a problem for you, please let us know how to fix it for - your host. */ -#define TYPE_MINIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) 0 \ - : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) - -#ifndef TIME_T_MIN -# define TIME_T_MIN TYPE_MINIMUM (time_t) -#endif -#ifndef TIME_T_MAX -# define TIME_T_MAX TYPE_MAXIMUM (time_t) -#endif -#define TIME_T_MIDPOINT (SHR (TIME_T_MIN + TIME_T_MAX, 1) + 1) - -verify (time_t_is_integer, TYPE_IS_INTEGER (time_t)); -verify (twos_complement_arithmetic, - (TYPE_TWOS_COMPLEMENT (int) - && TYPE_TWOS_COMPLEMENT (long_int) - && TYPE_TWOS_COMPLEMENT (time_t))); - -#define EPOCH_YEAR 1970 -#define TM_YEAR_BASE 1900 -verify (base_year_is_a_multiple_of_100, TM_YEAR_BASE % 100 == 0); - -/* Return 1 if YEAR + TM_YEAR_BASE is a leap year. */ -static inline int -leapyear (long_int year) -{ - /* Don't add YEAR to TM_YEAR_BASE, as that might overflow. - Also, work even if YEAR is negative. */ - return - ((year & 3) == 0 - && (year % 100 != 0 - || ((year / 100) & 3) == (- (TM_YEAR_BASE / 100) & 3))); -} - -/* How many days come before each month (0-12). */ -#ifndef _LIBC -static -#endif -const unsigned short int __mon_yday[2][13] = - { - /* Normal years. */ - { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }, - /* Leap years. */ - { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 } - }; - - -#ifndef _LIBC -/* Portable standalone applications should supply a that - declares a POSIX-compliant localtime_r, for the benefit of older - implementations that lack localtime_r or have a nonstandard one. - See the gnulib time_r module for one way to implement this. */ -# undef __localtime_r -# define __localtime_r localtime_r -# define __mktime_internal mktime_internal -# include "mktime-internal.h" -#endif - -/* Return 1 if the values A and B differ according to the rules for - tm_isdst: A and B differ if one is zero and the other positive. */ -static int -isdst_differ (int a, int b) -{ - return (!a != !b) & (0 <= a) & (0 <= b); -} - -/* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) - - (YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks - were not adjusted between the time stamps. - - The YEAR values uses the same numbering as TP->tm_year. Values - need not be in the usual range. However, YEAR1 must not be less - than 2 * INT_MIN or greater than 2 * INT_MAX. - - The result may overflow. It is the caller's responsibility to - detect overflow. */ - -static inline time_t -ydhms_diff (long_int year1, long_int yday1, int hour1, int min1, int sec1, - int year0, int yday0, int hour0, int min0, int sec0) -{ - verify (C99_integer_division, -1 / 2 == 0); - - /* Compute intervening leap days correctly even if year is negative. - Take care to avoid integer overflow here. */ - int a4 = SHR (year1, 2) + SHR (TM_YEAR_BASE, 2) - ! (year1 & 3); - int b4 = SHR (year0, 2) + SHR (TM_YEAR_BASE, 2) - ! (year0 & 3); - int a100 = a4 / 25 - (a4 % 25 < 0); - int b100 = b4 / 25 - (b4 % 25 < 0); - int a400 = SHR (a100, 2); - int b400 = SHR (b100, 2); - int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); - - /* Compute the desired time in time_t precision. Overflow might - occur here. */ - time_t tyear1 = year1; - time_t years = tyear1 - year0; - time_t days = 365 * years + yday1 - yday0 + intervening_leap_days; - time_t hours = 24 * days + hour1 - hour0; - time_t minutes = 60 * hours + min1 - min0; - time_t seconds = 60 * minutes + sec1 - sec0; - return seconds; -} - -/* Return the average of A and B, even if A + B would overflow. */ -static time_t -time_t_avg (time_t a, time_t b) -{ - return SHR (a, 1) + SHR (b, 1) + (a & b & 1); -} - -/* Return 1 if A + B does not overflow. If time_t is unsigned and if - B's top bit is set, assume that the sum represents A - -B, and - return 1 if the subtraction does not wrap around. */ -static int -time_t_add_ok (time_t a, time_t b) -{ - if (! TYPE_SIGNED (time_t)) - { - time_t sum = a + b; - return (sum < a) == (TIME_T_MIDPOINT <= b); - } - else if (WRAPV) - { - time_t sum = a + b; - return (sum < a) == (b < 0); - } - else - { - time_t avg = time_t_avg (a, b); - return TIME_T_MIN / 2 <= avg && avg <= TIME_T_MAX / 2; - } -} - -/* Return 1 if A + B does not overflow. */ -static int -time_t_int_add_ok (time_t a, int b) -{ - verify (int_no_wider_than_time_t, INT_MAX <= TIME_T_MAX); - if (WRAPV) - { - time_t sum = a + b; - return (sum < a) == (b < 0); - } - else - { - int a_odd = a & 1; - time_t avg = SHR (a, 1) + (SHR (b, 1) + (a_odd & b)); - return TIME_T_MIN / 2 <= avg && avg <= TIME_T_MAX / 2; - } -} - -/* Return a time_t value corresponding to (YEAR-YDAY HOUR:MIN:SEC), - assuming that *T corresponds to *TP and that no clock adjustments - occurred between *TP and the desired time. - If TP is null, return a value not equal to *T; this avoids false matches. - If overflow occurs, yield the minimal or maximal value, except do not - yield a value equal to *T. */ -static time_t -guess_time_tm (long_int year, long_int yday, int hour, int min, int sec, - const time_t *t, const struct tm *tp) -{ - if (tp) - { - time_t d = ydhms_diff (year, yday, hour, min, sec, - tp->tm_year, tp->tm_yday, - tp->tm_hour, tp->tm_min, tp->tm_sec); - if (time_t_add_ok (*t, d)) - return *t + d; - } - - /* Overflow occurred one way or another. Return the nearest result - that is actually in range, except don't report a zero difference - if the actual difference is nonzero, as that would cause a false - match; and don't oscillate between two values, as that would - confuse the spring-forward gap detector. */ - return (*t < TIME_T_MIDPOINT - ? (*t <= TIME_T_MIN + 1 ? *t + 1 : TIME_T_MIN) - : (TIME_T_MAX - 1 <= *t ? *t - 1 : TIME_T_MAX)); -} - -/* Use CONVERT to convert *T to a broken down time in *TP. - If *T is out of range for conversion, adjust it so that - it is the nearest in-range value and then convert that. */ -static struct tm * -ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), - time_t *t, struct tm *tp) -{ - struct tm *r = convert (t, tp); - - if (!r && *t) - { - time_t bad = *t; - time_t ok = 0; - - /* BAD is a known unconvertible time_t, and OK is a known good one. - Use binary search to narrow the range between BAD and OK until - they differ by 1. */ - while (bad != ok + (bad < 0 ? -1 : 1)) - { - time_t mid = *t = time_t_avg (ok, bad); - r = convert (t, tp); - if (r) - ok = mid; - else - bad = mid; - } - - if (!r && ok) - { - /* The last conversion attempt failed; - revert to the most recent successful attempt. */ - *t = ok; - r = convert (t, tp); - } - } - - return r; -} - - -/* Convert *TP to a time_t value, inverting - the monotonic and mostly-unit-linear conversion function CONVERT. - Use *OFFSET to keep track of a guess at the offset of the result, - compared to what the result would be for UTC without leap seconds. - If *OFFSET's guess is correct, only one CONVERT call is needed. - This function is external because it is used also by timegm.c. */ -time_t -__mktime_internal (struct tm *tp, - struct tm *(*convert) (const time_t *, struct tm *), - time_t *offset) -{ - time_t t, gt, t0, t1, t2; - struct tm tm; - - /* The maximum number of probes (calls to CONVERT) should be enough - to handle any combinations of time zone rule changes, solar time, - leap seconds, and oscillations around a spring-forward gap. - POSIX.1 prohibits leap seconds, but some hosts have them anyway. */ - int remaining_probes = 6; - - /* Time requested. Copy it in case CONVERT modifies *TP; this can - occur if TP is localtime's returned value and CONVERT is localtime. */ - int sec = tp->tm_sec; - int min = tp->tm_min; - int hour = tp->tm_hour; - int mday = tp->tm_mday; - int mon = tp->tm_mon; - int year_requested = tp->tm_year; - int isdst = tp->tm_isdst; - - /* 1 if the previous probe was DST. */ - int dst2; - - /* Ensure that mon is in range, and set year accordingly. */ - int mon_remainder = mon % 12; - int negative_mon_remainder = mon_remainder < 0; - int mon_years = mon / 12 - negative_mon_remainder; - long_int lyear_requested = year_requested; - long_int year = lyear_requested + mon_years; - - /* The other values need not be in range: - the remaining code handles minor overflows correctly, - assuming int and time_t arithmetic wraps around. - Major overflows are caught at the end. */ - - /* Calculate day of year from year, month, and day of month. - The result need not be in range. */ - int mon_yday = ((__mon_yday[leapyear (year)] - [mon_remainder + 12 * negative_mon_remainder]) - - 1); - long_int lmday = mday; - long_int yday = mon_yday + lmday; - - time_t guessed_offset = *offset; - - int sec_requested = sec; - - if (LEAP_SECONDS_POSSIBLE) - { - /* Handle out-of-range seconds specially, - since ydhms_tm_diff assumes every minute has 60 seconds. */ - if (sec < 0) - sec = 0; - if (59 < sec) - sec = 59; - } - - /* Invert CONVERT by probing. First assume the same offset as last - time. */ - - t0 = ydhms_diff (year, yday, hour, min, sec, - EPOCH_YEAR - TM_YEAR_BASE, 0, 0, 0, - guessed_offset); - - if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3) - { - /* time_t isn't large enough to rule out overflows, so check - for major overflows. A gross check suffices, since if t0 - has overflowed, it is off by a multiple of TIME_T_MAX - - TIME_T_MIN + 1. So ignore any component of the difference - that is bounded by a small value. */ - - /* Approximate log base 2 of the number of time units per - biennium. A biennium is 2 years; use this unit instead of - years to avoid integer overflow. For example, 2 average - Gregorian years are 2 * 365.2425 * 24 * 60 * 60 seconds, - which is 63113904 seconds, and rint (log2 (63113904)) is - 26. */ - int ALOG2_SECONDS_PER_BIENNIUM = 26; - int ALOG2_MINUTES_PER_BIENNIUM = 20; - int ALOG2_HOURS_PER_BIENNIUM = 14; - int ALOG2_DAYS_PER_BIENNIUM = 10; - int LOG2_YEARS_PER_BIENNIUM = 1; - - int approx_requested_biennia = - (SHR (year_requested, LOG2_YEARS_PER_BIENNIUM) - - SHR (EPOCH_YEAR - TM_YEAR_BASE, LOG2_YEARS_PER_BIENNIUM) - + SHR (mday, ALOG2_DAYS_PER_BIENNIUM) - + SHR (hour, ALOG2_HOURS_PER_BIENNIUM) - + SHR (min, ALOG2_MINUTES_PER_BIENNIUM) - + (LEAP_SECONDS_POSSIBLE - ? 0 - : SHR (sec, ALOG2_SECONDS_PER_BIENNIUM))); - - int approx_biennia = SHR (t0, ALOG2_SECONDS_PER_BIENNIUM); - int diff = approx_biennia - approx_requested_biennia; - int abs_diff = diff < 0 ? -1 - diff : diff; - - /* IRIX 4.0.5 cc miscalculates TIME_T_MIN / 3: it erroneously - gives a positive value of 715827882. Setting a variable - first then doing math on it seems to work. - (ghazi@caip.rutgers.edu) */ - time_t time_t_max = TIME_T_MAX; - time_t time_t_min = TIME_T_MIN; - time_t overflow_threshold = - (time_t_max / 3 - time_t_min / 3) >> ALOG2_SECONDS_PER_BIENNIUM; - - if (overflow_threshold < abs_diff) - { - /* Overflow occurred. Try repairing it; this might work if - the time zone offset is enough to undo the overflow. */ - time_t repaired_t0 = -1 - t0; - approx_biennia = SHR (repaired_t0, ALOG2_SECONDS_PER_BIENNIUM); - diff = approx_biennia - approx_requested_biennia; - abs_diff = diff < 0 ? -1 - diff : diff; - if (overflow_threshold < abs_diff) - return -1; - guessed_offset += repaired_t0 - t0; - t0 = repaired_t0; - } - } - - /* Repeatedly use the error to improve the guess. */ - - for (t = t1 = t2 = t0, dst2 = 0; - (gt = guess_time_tm (year, yday, hour, min, sec, &t, - ranged_convert (convert, &t, &tm)), - t != gt); - t1 = t2, t2 = t, t = gt, dst2 = tm.tm_isdst != 0) - if (t == t1 && t != t2 - && (tm.tm_isdst < 0 - || (isdst < 0 - ? dst2 <= (tm.tm_isdst != 0) - : (isdst != 0) != (tm.tm_isdst != 0)))) - /* We can't possibly find a match, as we are oscillating - between two values. The requested time probably falls - within a spring-forward gap of size GT - T. Follow the common - practice in this case, which is to return a time that is GT - T - away from the requested time, preferring a time whose - tm_isdst differs from the requested value. (If no tm_isdst - was requested and only one of the two values has a nonzero - tm_isdst, prefer that value.) In practice, this is more - useful than returning -1. */ - goto offset_found; - else if (--remaining_probes == 0) - return -1; - - /* We have a match. Check whether tm.tm_isdst has the requested - value, if any. */ - if (isdst_differ (isdst, tm.tm_isdst)) - { - /* tm.tm_isdst has the wrong value. Look for a neighboring - time with the right value, and use its UTC offset. - - Heuristic: probe the adjacent timestamps in both directions, - looking for the desired isdst. This should work for all real - time zone histories in the tz database. */ - - /* Distance between probes when looking for a DST boundary. In - tzdata2003a, the shortest period of DST is 601200 seconds - (e.g., America/Recife starting 2000-10-08 01:00), and the - shortest period of non-DST surrounded by DST is 694800 - seconds (Africa/Tunis starting 1943-04-17 01:00). Use the - minimum of these two values, so we don't miss these short - periods when probing. */ - int stride = 601200; - - /* The longest period of DST in tzdata2003a is 536454000 seconds - (e.g., America/Jujuy starting 1946-10-01 01:00). The longest - period of non-DST is much longer, but it makes no real sense - to search for more than a year of non-DST, so use the DST - max. */ - int duration_max = 536454000; - - /* Search in both directions, so the maximum distance is half - the duration; add the stride to avoid off-by-1 problems. */ - int delta_bound = duration_max / 2 + stride; - - int delta, direction; - - for (delta = stride; delta < delta_bound; delta += stride) - for (direction = -1; direction <= 1; direction += 2) - if (time_t_int_add_ok (t, delta * direction)) - { - time_t ot = t + delta * direction; - struct tm otm; - ranged_convert (convert, &ot, &otm); - if (! isdst_differ (isdst, otm.tm_isdst)) - { - /* We found the desired tm_isdst. - Extrapolate back to the desired time. */ - t = guess_time_tm (year, yday, hour, min, sec, &ot, &otm); - ranged_convert (convert, &t, &tm); - goto offset_found; - } - } - } - - offset_found: - *offset = guessed_offset + t - t0; - - if (LEAP_SECONDS_POSSIBLE && sec_requested != tm.tm_sec) - { - /* Adjust time to reflect the tm_sec requested, not the normalized value. - Also, repair any damage from a false match due to a leap second. */ - int sec_adjustment = (sec == 0 && tm.tm_sec == 60) - sec; - if (! time_t_int_add_ok (t, sec_requested)) - return -1; - t1 = t + sec_requested; - if (! time_t_int_add_ok (t1, sec_adjustment)) - return -1; - t2 = t1 + sec_adjustment; - if (! convert (&t2, &tm)) - return -1; - t = t2; - } - - *tp = tm; - return t; -} - - -/* FIXME: This should use a signed type wide enough to hold any UTC - offset in seconds. 'int' should be good enough for GNU code. We - can't fix this unilaterally though, as other modules invoke - __mktime_internal. */ -static time_t localtime_offset; - -/* Convert *TP to a time_t value. */ -time_t -mktime (struct tm *tp) -{ -#ifdef _LIBC - /* POSIX.1 8.1.1 requires that whenever mktime() is called, the - time zone names contained in the external variable `tzname' shall - be set as if the tzset() function had been called. */ - __tzset (); -#endif - - return __mktime_internal (tp, __localtime_r, &localtime_offset); -} - -#ifdef weak_alias -weak_alias (mktime, timelocal) -#endif - -#ifdef _LIBC -libc_hidden_def (mktime) -libc_hidden_weak (timelocal) -#endif - -#if DEBUG - -static int -not_equal_tm (const struct tm *a, const struct tm *b) -{ - return ((a->tm_sec ^ b->tm_sec) - | (a->tm_min ^ b->tm_min) - | (a->tm_hour ^ b->tm_hour) - | (a->tm_mday ^ b->tm_mday) - | (a->tm_mon ^ b->tm_mon) - | (a->tm_year ^ b->tm_year) - | (a->tm_yday ^ b->tm_yday) - | isdst_differ (a->tm_isdst, b->tm_isdst)); -} - -static void -print_tm (const struct tm *tp) -{ - if (tp) - printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d", - tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday, - tp->tm_hour, tp->tm_min, tp->tm_sec, - tp->tm_yday, tp->tm_wday, tp->tm_isdst); - else - printf ("0"); -} - -static int -check_result (time_t tk, struct tm tmk, time_t tl, const struct tm *lt) -{ - if (tk != tl || !lt || not_equal_tm (&tmk, lt)) - { - printf ("mktime ("); - print_tm (lt); - printf (")\nyields ("); - print_tm (&tmk); - printf (") == %ld, should be %ld\n", (long int) tk, (long int) tl); - return 1; - } - - return 0; -} - -int -main (int argc, char **argv) -{ - int status = 0; - struct tm tm, tmk, tml; - struct tm *lt; - time_t tk, tl, tl1; - char trailer; - - if ((argc == 3 || argc == 4) - && (sscanf (argv[1], "%d-%d-%d%c", - &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer) - == 3) - && (sscanf (argv[2], "%d:%d:%d%c", - &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer) - == 3)) - { - tm.tm_year -= TM_YEAR_BASE; - tm.tm_mon--; - tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); - tmk = tm; - tl = mktime (&tmk); - lt = localtime (&tl); - if (lt) - { - tml = *lt; - lt = &tml; - } - printf ("mktime returns %ld == ", (long int) tl); - print_tm (&tmk); - printf ("\n"); - status = check_result (tl, tmk, tl, lt); - } - else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0)) - { - time_t from = atol (argv[1]); - time_t by = atol (argv[2]); - time_t to = atol (argv[3]); - - if (argc == 4) - for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) - { - lt = localtime (&tl); - if (lt) - { - tmk = tml = *lt; - tk = mktime (&tmk); - status |= check_result (tk, tmk, tl, &tml); - } - else - { - printf ("localtime (%ld) yields 0\n", (long int) tl); - status = 1; - } - tl1 = tl + by; - if ((tl1 < tl) != (by < 0)) - break; - } - else - for (tl = from; by < 0 ? to <= tl : tl <= to; tl = tl1) - { - /* Null benchmark. */ - lt = localtime (&tl); - if (lt) - { - tmk = tml = *lt; - tk = tl; - status |= check_result (tk, tmk, tl, &tml); - } - else - { - printf ("localtime (%ld) yields 0\n", (long int) tl); - status = 1; - } - tl1 = tl + by; - if ((tl1 < tl) != (by < 0)) - break; - } - } - else - printf ("Usage:\ -\t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\ -\t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\ -\t%s FROM BY TO - # Do not test those values (for benchmark).\n", - argv[0], argv[0], argv[0]); - - return status; -} - -#endif /* DEBUG */ - -/* -Local Variables: -compile-command: "gcc -DDEBUG -I. -Wall -W -O2 -g mktime.c -o mktime" -End: -*/ diff --git a/gnulib/lib/modechange.c b/gnulib/lib/modechange.c deleted file mode 100644 index 580a460..0000000 --- a/gnulib/lib/modechange.c +++ /dev/null @@ -1,385 +0,0 @@ -/* modechange.c -- file mode manipulation - - Copyright (C) 1989-1990, 1997-1999, 2001, 2003-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by David MacKenzie */ - -/* The ASCII mode string is compiled into an array of `struct - modechange', which can then be applied to each file to be changed. - We do this instead of re-parsing the ASCII string for each file - because the compiled form requires less computation to use; when - changing the mode of many files, this probably results in a - performance gain. */ - -#include - -#include "modechange.h" -#include -#include "stat-macros.h" -#include "xalloc.h" -#include - -/* The traditional octal values corresponding to each mode bit. */ -#define SUID 04000 -#define SGID 02000 -#define SVTX 01000 -#define RUSR 00400 -#define WUSR 00200 -#define XUSR 00100 -#define RGRP 00040 -#define WGRP 00020 -#define XGRP 00010 -#define ROTH 00004 -#define WOTH 00002 -#define XOTH 00001 -#define ALLM 07777 /* all octal mode bits */ - -/* Convert OCTAL, which uses one of the traditional octal values, to - an internal mode_t value. */ -static mode_t -octal_to_mode (unsigned int octal) -{ - /* Help the compiler optimize the usual case where mode_t uses - the traditional octal representation. */ - return ((S_ISUID == SUID && S_ISGID == SGID && S_ISVTX == SVTX - && S_IRUSR == RUSR && S_IWUSR == WUSR && S_IXUSR == XUSR - && S_IRGRP == RGRP && S_IWGRP == WGRP && S_IXGRP == XGRP - && S_IROTH == ROTH && S_IWOTH == WOTH && S_IXOTH == XOTH) - ? octal - : (mode_t) ((octal & SUID ? S_ISUID : 0) - | (octal & SGID ? S_ISGID : 0) - | (octal & SVTX ? S_ISVTX : 0) - | (octal & RUSR ? S_IRUSR : 0) - | (octal & WUSR ? S_IWUSR : 0) - | (octal & XUSR ? S_IXUSR : 0) - | (octal & RGRP ? S_IRGRP : 0) - | (octal & WGRP ? S_IWGRP : 0) - | (octal & XGRP ? S_IXGRP : 0) - | (octal & ROTH ? S_IROTH : 0) - | (octal & WOTH ? S_IWOTH : 0) - | (octal & XOTH ? S_IXOTH : 0))); -} - -/* Special operations flags. */ -enum - { - /* For the sentinel at the end of the mode changes array. */ - MODE_DONE, - - /* The typical case. */ - MODE_ORDINARY_CHANGE, - - /* In addition to the typical case, affect the execute bits if at - least one execute bit is set already, or if the file is a - directory. */ - MODE_X_IF_ANY_X, - - /* Instead of the typical case, copy some existing permissions for - u, g, or o onto the other two. Which of u, g, or o is copied - is determined by which bits are set in the `value' field. */ - MODE_COPY_EXISTING - }; - -/* Description of a mode change. */ -struct mode_change -{ - char op; /* One of "=+-". */ - char flag; /* Special operations flag. */ - mode_t affected; /* Set for u, g, o, or a. */ - mode_t value; /* Bits to add/remove. */ - mode_t mentioned; /* Bits explicitly mentioned. */ -}; - -/* Return a mode_change array with the specified `=ddd'-style - mode change operation, where NEW_MODE is `ddd' and MENTIONED - contains the bits explicitly mentioned in the mode are MENTIONED. */ - -static struct mode_change * -make_node_op_equals (mode_t new_mode, mode_t mentioned) -{ - struct mode_change *p = xmalloc (2 * sizeof *p); - p->op = '='; - p->flag = MODE_ORDINARY_CHANGE; - p->affected = CHMOD_MODE_BITS; - p->value = new_mode; - p->mentioned = mentioned; - p[1].flag = MODE_DONE; - return p; -} - -/* Return a pointer to an array of file mode change operations created from - MODE_STRING, an ASCII string that contains either an octal number - specifying an absolute mode, or symbolic mode change operations with - the form: - [ugoa...][[+-=][rwxXstugo...]...][,...] - - Return NULL if `mode_string' does not contain a valid - representation of file mode change operations. */ - -struct mode_change * -mode_compile (char const *mode_string) -{ - /* The array of mode-change directives to be returned. */ - struct mode_change *mc; - size_t used = 0; - - if ('0' <= *mode_string && *mode_string < '8') - { - unsigned int octal_mode = 0; - mode_t mode; - mode_t mentioned; - - do - { - octal_mode = 8 * octal_mode + *mode_string++ - '0'; - if (ALLM < octal_mode) - return NULL; - } - while ('0' <= *mode_string && *mode_string < '8'); - - if (*mode_string) - return NULL; - - mode = octal_to_mode (octal_mode); - mentioned = (mode & (S_ISUID | S_ISGID)) | S_ISVTX | S_IRWXUGO; - return make_node_op_equals (mode, mentioned); - } - - /* Allocate enough space to hold the result. */ - { - size_t needed = 1; - char const *p; - for (p = mode_string; *p; p++) - needed += (*p == '=' || *p == '+' || *p == '-'); - mc = xnmalloc (needed, sizeof *mc); - } - - /* One loop iteration for each `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'. */ - for (;; mode_string++) - { - /* Which bits in the mode are operated on. */ - mode_t affected = 0; - - /* Turn on all the bits in `affected' for each group given. */ - for (;; mode_string++) - switch (*mode_string) - { - default: - goto invalid; - case 'u': - affected |= S_ISUID | S_IRWXU; - break; - case 'g': - affected |= S_ISGID | S_IRWXG; - break; - case 'o': - affected |= S_ISVTX | S_IRWXO; - break; - case 'a': - affected |= CHMOD_MODE_BITS; - break; - case '=': case '+': case '-': - goto no_more_affected; - } - no_more_affected:; - - do - { - char op = *mode_string++; - mode_t value; - char flag = MODE_COPY_EXISTING; - struct mode_change *change; - - switch (*mode_string++) - { - case 'u': - /* Set the affected bits to the value of the `u' bits - on the same file. */ - value = S_IRWXU; - break; - case 'g': - /* Set the affected bits to the value of the `g' bits - on the same file. */ - value = S_IRWXG; - break; - case 'o': - /* Set the affected bits to the value of the `o' bits - on the same file. */ - value = S_IRWXO; - break; - - default: - value = 0; - flag = MODE_ORDINARY_CHANGE; - - for (mode_string--;; mode_string++) - switch (*mode_string) - { - case 'r': - value |= S_IRUSR | S_IRGRP | S_IROTH; - break; - case 'w': - value |= S_IWUSR | S_IWGRP | S_IWOTH; - break; - case 'x': - value |= S_IXUSR | S_IXGRP | S_IXOTH; - break; - case 'X': - flag = MODE_X_IF_ANY_X; - break; - case 's': - /* Set the setuid/gid bits if `u' or `g' is selected. */ - value |= S_ISUID | S_ISGID; - break; - case 't': - /* Set the "save text image" bit if `o' is selected. */ - value |= S_ISVTX; - break; - default: - goto no_more_values; - } - no_more_values:; - } - - change = &mc[used++]; - change->op = op; - change->flag = flag; - change->affected = affected; - change->value = value; - change->mentioned = (affected ? affected & value : value); - } - while (*mode_string == '=' || *mode_string == '+' - || *mode_string == '-'); - - if (*mode_string != ',') - break; - } - - if (*mode_string == 0) - { - mc[used].flag = MODE_DONE; - return mc; - } - -invalid: - free (mc); - return NULL; -} - -/* Return a file mode change operation that sets permissions to match those - of REF_FILE. Return NULL (setting errno) if REF_FILE can't be accessed. */ - -struct mode_change * -mode_create_from_ref (const char *ref_file) -{ - struct stat ref_stats; - - if (stat (ref_file, &ref_stats) != 0) - return NULL; - return make_node_op_equals (ref_stats.st_mode, CHMOD_MODE_BITS); -} - -/* Return the file mode bits of OLDMODE (which is the mode of a - directory if DIR), assuming the umask is UMASK_VALUE, adjusted as - indicated by the list of change operations CHANGES. If DIR, the - type 'X' change affects the returned value even if no execute bits - were set in OLDMODE, and set user and group ID bits are preserved - unless CHANGES mentioned them. If PMODE_BITS is not null, store into - *PMODE_BITS a mask denoting file mode bits that are affected by - CHANGES. - - The returned value and *PMODE_BITS contain only file mode bits. - For example, they have the S_IFMT bits cleared on a standard - Unix-like host. */ - -mode_t -mode_adjust (mode_t oldmode, bool dir, mode_t umask_value, - struct mode_change const *changes, mode_t *pmode_bits) -{ - /* The adjusted mode. */ - mode_t newmode = oldmode & CHMOD_MODE_BITS; - - /* File mode bits that CHANGES cares about. */ - mode_t mode_bits = 0; - - for (; changes->flag != MODE_DONE; changes++) - { - mode_t affected = changes->affected; - mode_t omit_change = - (dir ? S_ISUID | S_ISGID : 0) & ~ changes->mentioned; - mode_t value = changes->value; - - switch (changes->flag) - { - case MODE_ORDINARY_CHANGE: - break; - - case MODE_COPY_EXISTING: - /* Isolate in `value' the bits in `newmode' to copy. */ - value &= newmode; - - /* Copy the isolated bits to the other two parts. */ - value |= ((value & (S_IRUSR | S_IRGRP | S_IROTH) - ? S_IRUSR | S_IRGRP | S_IROTH : 0) - | (value & (S_IWUSR | S_IWGRP | S_IWOTH) - ? S_IWUSR | S_IWGRP | S_IWOTH : 0) - | (value & (S_IXUSR | S_IXGRP | S_IXOTH) - ? S_IXUSR | S_IXGRP | S_IXOTH : 0)); - break; - - case MODE_X_IF_ANY_X: - /* Affect the execute bits if execute bits are already set - or if the file is a directory. */ - if ((newmode & (S_IXUSR | S_IXGRP | S_IXOTH)) | dir) - value |= S_IXUSR | S_IXGRP | S_IXOTH; - break; - } - - /* If WHO was specified, limit the change to the affected bits. - Otherwise, apply the umask. Either way, omit changes as - requested. */ - value &= (affected ? affected : ~umask_value) & ~ omit_change; - - switch (changes->op) - { - case '=': - /* If WHO was specified, preserve the previous values of - bits that are not affected by this change operation. - Otherwise, clear all the bits. */ - { - mode_t preserved = (affected ? ~affected : 0) | omit_change; - mode_bits |= CHMOD_MODE_BITS & ~preserved; - newmode = (newmode & preserved) | value; - break; - } - - case '+': - mode_bits |= value; - newmode |= value; - break; - - case '-': - mode_bits |= value; - newmode &= ~value; - break; - } - } - - if (pmode_bits) - *pmode_bits = mode_bits; - return newmode; -} diff --git a/gnulib/lib/modechange.h b/gnulib/lib/modechange.h deleted file mode 100644 index a15aeca..0000000 --- a/gnulib/lib/modechange.h +++ /dev/null @@ -1,30 +0,0 @@ -/* modechange.h -- definitions for file mode manipulation - - Copyright (C) 1989-1990, 1997, 2003-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if ! defined MODECHANGE_H_ -# define MODECHANGE_H_ - -# include -# include - -struct mode_change *mode_compile (const char *); -struct mode_change *mode_create_from_ref (const char *); -mode_t mode_adjust (mode_t, bool, mode_t, struct mode_change const *, - mode_t *); - -#endif diff --git a/gnulib/lib/mountlist.c b/gnulib/lib/mountlist.c deleted file mode 100644 index 23437bc..0000000 --- a/gnulib/lib/mountlist.c +++ /dev/null @@ -1,951 +0,0 @@ -/* mountlist.c -- return a list of mounted file systems - - Copyright (C) 1991-1992, 1997-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "mountlist.h" - -#include -#include -#include -#include -#include - -#include "xalloc.h" - -#include - -#include - -#include - -#if HAVE_SYS_PARAM_H -# include -#endif - -#if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */ -# if HAVE_SYS_UCRED_H -# include /* needed on OSF V4.0 for definition of NGROUPS, - NGROUPS is used as an array dimension in ucred.h */ -# include /* needed by powerpc-apple-darwin1.3.7 */ -# endif -# if HAVE_SYS_MOUNT_H -# include -# endif -# if HAVE_SYS_FS_TYPES_H -# include /* needed by powerpc-apple-darwin1.3.7 */ -# endif -# if HAVE_STRUCT_FSSTAT_F_FSTYPENAME -# define FS_TYPE(Ent) ((Ent).f_fstypename) -# else -# define FS_TYPE(Ent) mnt_names[(Ent).f_type] -# endif -#endif /* MOUNTED_GETFSSTAT */ - -#ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ -# include -# if !defined MOUNTED -# if defined _PATH_MOUNTED /* GNU libc */ -# define MOUNTED _PATH_MOUNTED -# endif -# if defined MNT_MNTTAB /* HP-UX. */ -# define MOUNTED MNT_MNTTAB -# endif -# if defined MNTTABNAME /* Dynix. */ -# define MOUNTED MNTTABNAME -# endif -# endif -#endif - -#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ -# include -#endif - -#ifdef MOUNTED_GETMNTINFO2 /* NetBSD 3.0. */ -# include -#endif - -#ifdef MOUNTED_GETMNT /* Ultrix. */ -# include -# include -#endif - -#ifdef MOUNTED_FS_STAT_DEV /* BeOS. */ -# include -# include -#endif - -#ifdef MOUNTED_FREAD /* SVR2. */ -# include -#endif - -#ifdef MOUNTED_FREAD_FSTYP /* SVR3. */ -# include -# include -# include -#endif - -#ifdef MOUNTED_LISTMNTENT -# include -#endif - -#ifdef MOUNTED_GETMNTENT2 /* SVR4. */ -# include -#endif - -#ifdef MOUNTED_VMOUNT /* AIX. */ -# include -# include -#endif - -#ifdef MOUNTED_INTERIX_STATVFS /* Interix. */ -# include -# include -#endif - -#ifdef DOLPHIN -/* So special that it's not worth putting this in autoconf. */ -# undef MOUNTED_FREAD_FSTYP -# define MOUNTED_GETMNTTBL -#endif - -#if HAVE_SYS_MNTENT_H -/* This is to get MNTOPT_IGNORE on e.g. SVR4. */ -# include -#endif - -#undef MNT_IGNORE -#if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT -# define MNT_IGNORE(M) hasmntopt (M, MNTOPT_IGNORE) -#else -# define MNT_IGNORE(M) 0 -#endif - -#if USE_UNLOCKED_IO -# include "unlocked-io.h" -#endif - -/* The results of open() in this file are not used with fchdir, - therefore save some unnecessary work in fchdir.c. */ -#undef open -#undef close - -/* The results of opendir() in this file are not used with dirfd and fchdir, - therefore save some unnecessary work in fchdir.c. */ -#undef opendir -#undef closedir - -#ifndef ME_DUMMY -# define ME_DUMMY(Fs_name, Fs_type) \ - (strcmp (Fs_type, "autofs") == 0 \ - || strcmp (Fs_type, "none") == 0 \ - || strcmp (Fs_type, "proc") == 0 \ - || strcmp (Fs_type, "subfs") == 0 \ - /* for NetBSD 3.0 */ \ - || strcmp (Fs_type, "kernfs") == 0 \ - /* for Irix 6.5 */ \ - || strcmp (Fs_type, "ignore") == 0) -#endif - -#ifdef __CYGWIN__ -# include -# define ME_REMOTE me_remote -/* All cygwin mount points include `:' or start with `//'; so it - requires a native Windows call to determine remote disks. */ -static bool -me_remote (char const *fs_name, char const *fs_type _GL_UNUSED) -{ - if (fs_name[0] && fs_name[1] == ':') - { - char drive[4]; - sprintf (drive, "%c:\\", fs_name[0]); - switch (GetDriveType (drive)) - { - case DRIVE_REMOVABLE: - case DRIVE_FIXED: - case DRIVE_CDROM: - case DRIVE_RAMDISK: - return false; - } - } - return true; -} -#endif - -#ifndef ME_REMOTE -/* A file system is `remote' if its Fs_name contains a `:' - or if (it is of type (smbfs or cifs) and its Fs_name starts with `//'). */ -# define ME_REMOTE(Fs_name, Fs_type) \ - (strchr (Fs_name, ':') != NULL \ - || ((Fs_name)[0] == '/' \ - && (Fs_name)[1] == '/' \ - && (strcmp (Fs_type, "smbfs") == 0 \ - || strcmp (Fs_type, "cifs") == 0))) -#endif - -#if MOUNTED_GETMNTINFO - -# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME -static char * -fstype_to_string (short int t) -{ - switch (t) - { -# ifdef MOUNT_PC - case MOUNT_PC: - return "pc"; -# endif -# ifdef MOUNT_MFS - case MOUNT_MFS: - return "mfs"; -# endif -# ifdef MOUNT_LO - case MOUNT_LO: - return "lo"; -# endif -# ifdef MOUNT_TFS - case MOUNT_TFS: - return "tfs"; -# endif -# ifdef MOUNT_TMP - case MOUNT_TMP: - return "tmp"; -# endif -# ifdef MOUNT_UFS - case MOUNT_UFS: - return "ufs" ; -# endif -# ifdef MOUNT_NFS - case MOUNT_NFS: - return "nfs" ; -# endif -# ifdef MOUNT_MSDOS - case MOUNT_MSDOS: - return "msdos" ; -# endif -# ifdef MOUNT_LFS - case MOUNT_LFS: - return "lfs" ; -# endif -# ifdef MOUNT_LOFS - case MOUNT_LOFS: - return "lofs" ; -# endif -# ifdef MOUNT_FDESC - case MOUNT_FDESC: - return "fdesc" ; -# endif -# ifdef MOUNT_PORTAL - case MOUNT_PORTAL: - return "portal" ; -# endif -# ifdef MOUNT_NULL - case MOUNT_NULL: - return "null" ; -# endif -# ifdef MOUNT_UMAP - case MOUNT_UMAP: - return "umap" ; -# endif -# ifdef MOUNT_KERNFS - case MOUNT_KERNFS: - return "kernfs" ; -# endif -# ifdef MOUNT_PROCFS - case MOUNT_PROCFS: - return "procfs" ; -# endif -# ifdef MOUNT_AFS - case MOUNT_AFS: - return "afs" ; -# endif -# ifdef MOUNT_CD9660 - case MOUNT_CD9660: - return "cd9660" ; -# endif -# ifdef MOUNT_UNION - case MOUNT_UNION: - return "union" ; -# endif -# ifdef MOUNT_DEVFS - case MOUNT_DEVFS: - return "devfs" ; -# endif -# ifdef MOUNT_EXT2FS - case MOUNT_EXT2FS: - return "ext2fs" ; -# endif - default: - return "?"; - } -} -# endif - -static char * -fsp_to_string (const struct statfs *fsp) -{ -# if HAVE_STRUCT_STATFS_F_FSTYPENAME - return (char *) (fsp->f_fstypename); -# else - return fstype_to_string (fsp->f_type); -# endif -} - -#endif /* MOUNTED_GETMNTINFO */ - -#ifdef MOUNTED_VMOUNT /* AIX. */ -static char * -fstype_to_string (int t) -{ - struct vfs_ent *e; - - e = getvfsbytype (t); - if (!e || !e->vfsent_name) - return "none"; - else - return e->vfsent_name; -} -#endif /* MOUNTED_VMOUNT */ - - -#if defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2 - -/* Return the device number from MOUNT_OPTIONS, if possible. - Otherwise return (dev_t) -1. */ -static dev_t -dev_from_mount_options (char const *mount_options) -{ - /* GNU/Linux allows file system implementations to define their own - meaning for "dev=" mount options, so don't trust the meaning - here. */ -# ifndef __linux__ - - static char const dev_pattern[] = ",dev="; - char const *devopt = strstr (mount_options, dev_pattern); - - if (devopt) - { - char const *optval = devopt + sizeof dev_pattern - 1; - char *optvalend; - unsigned long int dev; - errno = 0; - dev = strtoul (optval, &optvalend, 16); - if (optval != optvalend - && (*optvalend == '\0' || *optvalend == ',') - && ! (dev == ULONG_MAX && errno == ERANGE) - && dev == (dev_t) dev) - return dev; - } - -# endif - (void) mount_options; - return -1; -} - -#endif - -/* Return a list of the currently mounted file systems, or NULL on error. - Add each entry to the tail of the list so that they stay in order. - If NEED_FS_TYPE is true, ensure that the file system type fields in - the returned list are valid. Otherwise, they might not be. */ - -struct mount_entry * -read_file_system_list (bool need_fs_type) -{ - struct mount_entry *mount_list; - struct mount_entry *me; - struct mount_entry **mtail = &mount_list; - (void) need_fs_type; - -#ifdef MOUNTED_LISTMNTENT - { - struct tabmntent *mntlist, *p; - struct mntent *mnt; - struct mount_entry *me; - - /* the third and fourth arguments could be used to filter mounts, - but Crays doesn't seem to have any mounts that we want to - remove. Specifically, automount create normal NFS mounts. - */ - - if (listmntent (&mntlist, KMTAB, NULL, NULL) < 0) - return NULL; - for (p = mntlist; p; p = p->next) - { - mnt = p->ment; - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (mnt->mnt_fsname); - me->me_mountdir = xstrdup (mnt->mnt_dir); - me->me_type = xstrdup (mnt->mnt_type); - me->me_type_malloced = 1; - me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); - me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - me->me_dev = -1; - *mtail = me; - mtail = &me->me_next; - } - freemntlist (mntlist); - } -#endif - -#ifdef MOUNTED_GETMNTENT1 /* GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ - { - struct mntent *mnt; - char const *table = MOUNTED; - FILE *fp; - - fp = setmntent (table, "r"); - if (fp == NULL) - return NULL; - - while ((mnt = getmntent (fp))) - { - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (mnt->mnt_fsname); - me->me_mountdir = xstrdup (mnt->mnt_dir); - me->me_type = xstrdup (mnt->mnt_type); - me->me_type_malloced = 1; - me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); - me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - me->me_dev = dev_from_mount_options (mnt->mnt_opts); - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - - if (endmntent (fp) == 0) - goto free_then_fail; - } -#endif /* MOUNTED_GETMNTENT1. */ - -#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ - { - struct statfs *fsp; - int entries; - - entries = getmntinfo (&fsp, MNT_NOWAIT); - if (entries < 0) - return NULL; - for (; entries-- > 0; fsp++) - { - char *fs_type = fsp_to_string (fsp); - - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (fsp->f_mntfromname); - me->me_mountdir = xstrdup (fsp->f_mntonname); - me->me_type = fs_type; - me->me_type_malloced = 0; - me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); - me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - } -#endif /* MOUNTED_GETMNTINFO */ - -#ifdef MOUNTED_GETMNTINFO2 /* NetBSD 3.0. */ - { - struct statvfs *fsp; - int entries; - - entries = getmntinfo (&fsp, MNT_NOWAIT); - if (entries < 0) - return NULL; - for (; entries-- > 0; fsp++) - { - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (fsp->f_mntfromname); - me->me_mountdir = xstrdup (fsp->f_mntonname); - me->me_type = xstrdup (fsp->f_fstypename); - me->me_type_malloced = 1; - me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); - me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - } -#endif /* MOUNTED_GETMNTINFO2 */ - -#ifdef MOUNTED_GETMNT /* Ultrix. */ - { - int offset = 0; - int val; - struct fs_data fsd; - - while (errno = 0, - 0 < (val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY, - (char *) 0))) - { - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (fsd.fd_req.devname); - me->me_mountdir = xstrdup (fsd.fd_req.path); - me->me_type = gt_names[fsd.fd_req.fstype]; - me->me_type_malloced = 0; - me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); - me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - me->me_dev = fsd.fd_req.dev; - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - if (val < 0) - goto free_then_fail; - } -#endif /* MOUNTED_GETMNT. */ - -#if defined MOUNTED_FS_STAT_DEV /* BeOS */ - { - /* The next_dev() and fs_stat_dev() system calls give the list of - all file systems, including the information returned by statvfs() - (fs type, total blocks, free blocks etc.), but without the mount - point. But on BeOS all file systems except / are mounted in the - rootfs, directly under /. - The directory name of the mount point is often, but not always, - identical to the volume name of the device. - We therefore get the list of subdirectories of /, and the list - of all file systems, and match the two lists. */ - - DIR *dirp; - struct rootdir_entry - { - char *name; - dev_t dev; - ino_t ino; - struct rootdir_entry *next; - }; - struct rootdir_entry *rootdir_list; - struct rootdir_entry **rootdir_tail; - int32 pos; - dev_t dev; - fs_info fi; - - /* All volumes are mounted in the rootfs, directly under /. */ - rootdir_list = NULL; - rootdir_tail = &rootdir_list; - dirp = opendir ("/"); - if (dirp) - { - struct dirent *d; - - while ((d = readdir (dirp)) != NULL) - { - char *name; - struct stat statbuf; - - if (strcmp (d->d_name, "..") == 0) - continue; - - if (strcmp (d->d_name, ".") == 0) - name = xstrdup ("/"); - else - { - name = xmalloc (1 + strlen (d->d_name) + 1); - name[0] = '/'; - strcpy (name + 1, d->d_name); - } - - if (lstat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode)) - { - struct rootdir_entry *re = xmalloc (sizeof *re); - re->name = name; - re->dev = statbuf.st_dev; - re->ino = statbuf.st_ino; - - /* Add to the linked list. */ - *rootdir_tail = re; - rootdir_tail = &re->next; - } - else - free (name); - } - closedir (dirp); - } - *rootdir_tail = NULL; - - for (pos = 0; (dev = next_dev (&pos)) >= 0; ) - if (fs_stat_dev (dev, &fi) >= 0) - { - /* Note: fi.dev == dev. */ - struct rootdir_entry *re; - - for (re = rootdir_list; re; re = re->next) - if (re->dev == fi.dev && re->ino == fi.root) - break; - - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (fi.device_name[0] != '\0' - ? fi.device_name : fi.fsh_name); - me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name); - me->me_type = xstrdup (fi.fsh_name); - me->me_type_malloced = 1; - me->me_dev = fi.dev; - me->me_dummy = 0; - me->me_remote = (fi.flags & B_FS_IS_SHARED) != 0; - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - *mtail = NULL; - - while (rootdir_list != NULL) - { - struct rootdir_entry *re = rootdir_list; - rootdir_list = re->next; - free (re->name); - free (re); - } - } -#endif /* MOUNTED_FS_STAT_DEV */ - -#if defined MOUNTED_GETFSSTAT /* __alpha running OSF_1 */ - { - int numsys, counter; - size_t bufsize; - struct statfs *stats; - - numsys = getfsstat (NULL, 0L, MNT_NOWAIT); - if (numsys < 0) - return NULL; - if (SIZE_MAX / sizeof *stats <= numsys) - xalloc_die (); - - bufsize = (1 + numsys) * sizeof *stats; - stats = xmalloc (bufsize); - numsys = getfsstat (stats, bufsize, MNT_NOWAIT); - - if (numsys < 0) - { - free (stats); - return NULL; - } - - for (counter = 0; counter < numsys; counter++) - { - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (stats[counter].f_mntfromname); - me->me_mountdir = xstrdup (stats[counter].f_mntonname); - me->me_type = xstrdup (FS_TYPE (stats[counter])); - me->me_type_malloced = 1; - me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); - me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - - free (stats); - } -#endif /* MOUNTED_GETFSSTAT */ - -#if defined MOUNTED_FREAD || defined MOUNTED_FREAD_FSTYP /* SVR[23]. */ - { - struct mnttab mnt; - char *table = "/etc/mnttab"; - FILE *fp; - - fp = fopen (table, "r"); - if (fp == NULL) - return NULL; - - while (fread (&mnt, sizeof mnt, 1, fp) > 0) - { - me = xmalloc (sizeof *me); -# ifdef GETFSTYP /* SVR3. */ - me->me_devname = xstrdup (mnt.mt_dev); -# else - me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6); - strcpy (me->me_devname, "/dev/"); - strcpy (me->me_devname + 5, mnt.mt_dev); -# endif - me->me_mountdir = xstrdup (mnt.mt_filsys); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - me->me_type = ""; - me->me_type_malloced = 0; -# ifdef GETFSTYP /* SVR3. */ - if (need_fs_type) - { - struct statfs fsd; - char typebuf[FSTYPSZ]; - - if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1 - && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1) - { - me->me_type = xstrdup (typebuf); - me->me_type_malloced = 1; - } - } -# endif - me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); - me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - - if (ferror (fp)) - { - /* The last fread() call must have failed. */ - int saved_errno = errno; - fclose (fp); - errno = saved_errno; - goto free_then_fail; - } - - if (fclose (fp) == EOF) - goto free_then_fail; - } -#endif /* MOUNTED_FREAD || MOUNTED_FREAD_FSTYP. */ - -#ifdef MOUNTED_GETMNTTBL /* DolphinOS goes its own way. */ - { - struct mntent **mnttbl = getmnttbl (), **ent; - for (ent = mnttbl; *ent; ent++) - { - me = xmalloc (sizeof *me); - me->me_devname = xstrdup ((*ent)->mt_resource); - me->me_mountdir = xstrdup ((*ent)->mt_directory); - me->me_type = xstrdup ((*ent)->mt_fstype); - me->me_type_malloced = 1; - me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); - me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - endmnttbl (); - } -#endif - -#ifdef MOUNTED_GETMNTENT2 /* SVR4. */ - { - struct mnttab mnt; - char *table = MNTTAB; - FILE *fp; - int ret; - int lockfd = -1; - -# if defined F_RDLCK && defined F_SETLKW - /* MNTTAB_LOCK is a macro name of our own invention; it's not present in - e.g. Solaris 2.6. If the SVR4 folks ever define a macro - for this file name, we should use their macro name instead. - (Why not just lock MNTTAB directly? We don't know.) */ -# ifndef MNTTAB_LOCK -# define MNTTAB_LOCK "/etc/.mnttab.lock" -# endif - lockfd = open (MNTTAB_LOCK, O_RDONLY); - if (0 <= lockfd) - { - struct flock flock; - flock.l_type = F_RDLCK; - flock.l_whence = SEEK_SET; - flock.l_start = 0; - flock.l_len = 0; - while (fcntl (lockfd, F_SETLKW, &flock) == -1) - if (errno != EINTR) - { - int saved_errno = errno; - close (lockfd); - errno = saved_errno; - return NULL; - } - } - else if (errno != ENOENT) - return NULL; -# endif - - errno = 0; - fp = fopen (table, "r"); - if (fp == NULL) - ret = errno; - else - { - while ((ret = getmntent (fp, &mnt)) == 0) - { - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (mnt.mnt_special); - me->me_mountdir = xstrdup (mnt.mnt_mountp); - me->me_type = xstrdup (mnt.mnt_fstype); - me->me_type_malloced = 1; - me->me_dummy = MNT_IGNORE (&mnt) != 0; - me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - me->me_dev = dev_from_mount_options (mnt.mnt_mntopts); - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - - ret = fclose (fp) == EOF ? errno : 0 < ret ? 0 : -1; - } - - if (0 <= lockfd && close (lockfd) != 0) - ret = errno; - - if (0 <= ret) - { - errno = ret; - goto free_then_fail; - } - } -#endif /* MOUNTED_GETMNTENT2. */ - -#ifdef MOUNTED_VMOUNT /* AIX. */ - { - int bufsize; - char *entries, *thisent; - struct vmount *vmp; - int n_entries; - int i; - - /* Ask how many bytes to allocate for the mounted file system info. */ - if (mntctl (MCTL_QUERY, sizeof bufsize, (struct vmount *) &bufsize) != 0) - return NULL; - entries = xmalloc (bufsize); - - /* Get the list of mounted file systems. */ - n_entries = mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries); - if (n_entries < 0) - { - int saved_errno = errno; - free (entries); - errno = saved_errno; - return NULL; - } - - for (i = 0, thisent = entries; - i < n_entries; - i++, thisent += vmp->vmt_length) - { - char *options, *ignore; - - vmp = (struct vmount *) thisent; - me = xmalloc (sizeof *me); - if (vmp->vmt_flags & MNT_REMOTE) - { - char *host, *dir; - - me->me_remote = 1; - /* Prepend the remote dirname. */ - host = thisent + vmp->vmt_data[VMT_HOSTNAME].vmt_off; - dir = thisent + vmp->vmt_data[VMT_OBJECT].vmt_off; - me->me_devname = xmalloc (strlen (host) + strlen (dir) + 2); - strcpy (me->me_devname, host); - strcat (me->me_devname, ":"); - strcat (me->me_devname, dir); - } - else - { - me->me_remote = 0; - me->me_devname = xstrdup (thisent + - vmp->vmt_data[VMT_OBJECT].vmt_off); - } - me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off); - me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype)); - me->me_type_malloced = 1; - options = thisent + vmp->vmt_data[VMT_ARGS].vmt_off; - ignore = strstr (options, "ignore"); - me->me_dummy = (ignore - && (ignore == options || ignore[-1] == ',') - && (ignore[sizeof "ignore" - 1] == ',' - || ignore[sizeof "ignore" - 1] == '\0')); - me->me_dev = (dev_t) -1; /* vmt_fsid might be the info we want. */ - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - free (entries); - } -#endif /* MOUNTED_VMOUNT. */ - -#ifdef MOUNTED_INTERIX_STATVFS - { - DIR *dirp = opendir ("/dev/fs"); - char node[9 + NAME_MAX]; - - if (!dirp) - goto free_then_fail; - - while (1) - { - struct statvfs dev; - struct dirent entry; - struct dirent *result; - - if (readdir_r (dirp, &entry, &result) || result == NULL) - break; - - strcpy (node, "/dev/fs/"); - strcat (node, entry.d_name); - - if (statvfs (node, &dev) == 0) - { - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (dev.f_mntfromname); - me->me_mountdir = xstrdup (dev.f_mntonname); - me->me_type = xstrdup (dev.f_fstypename); - me->me_type_malloced = 1; - me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); - me->me_remote = ME_REMOTE (me->me_devname, me->me_type); - me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - } - } -#endif /* MOUNTED_INTERIX_STATVFS */ - - *mtail = NULL; - return mount_list; - - - free_then_fail: - { - int saved_errno = errno; - *mtail = NULL; - - while (mount_list) - { - me = mount_list->me_next; - free (mount_list->me_devname); - free (mount_list->me_mountdir); - if (mount_list->me_type_malloced) - free (mount_list->me_type); - free (mount_list); - mount_list = me; - } - - errno = saved_errno; - return NULL; - } -} diff --git a/gnulib/lib/mountlist.h b/gnulib/lib/mountlist.h deleted file mode 100644 index 926bfdf..0000000 --- a/gnulib/lib/mountlist.h +++ /dev/null @@ -1,40 +0,0 @@ -/* mountlist.h -- declarations for list of mounted file systems - - Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef MOUNTLIST_H_ -# define MOUNTLIST_H_ - -# include -# include - -/* A mount table entry. */ -struct mount_entry -{ - char *me_devname; /* Device node name, including "/dev/". */ - char *me_mountdir; /* Mount point directory name. */ - char *me_type; /* "nfs", "4.2", etc. */ - dev_t me_dev; /* Device number of me_mountdir. */ - unsigned int me_dummy : 1; /* Nonzero for dummy file systems. */ - unsigned int me_remote : 1; /* Nonzero for remote fileystems. */ - unsigned int me_type_malloced : 1; /* Nonzero if me_type was malloced. */ - struct mount_entry *me_next; -}; - -struct mount_entry *read_file_system_list (bool need_fs_type); - -#endif diff --git a/gnulib/lib/nl_langinfo.c b/gnulib/lib/nl_langinfo.c deleted file mode 100644 index 8406ff1..0000000 --- a/gnulib/lib/nl_langinfo.c +++ /dev/null @@ -1,270 +0,0 @@ -/* nl_langinfo() replacement: query locale dependent information. - - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#if REPLACE_NL_LANGINFO - -/* Override nl_langinfo with support for added nl_item values. */ - -# include -# include - -# undef nl_langinfo - -char * -rpl_nl_langinfo (nl_item item) -{ - switch (item) - { -# if GNULIB_defined_CODESET - case CODESET: - { - const char *locale; - static char buf[2 + 10 + 1]; - - locale = setlocale (LC_CTYPE, NULL); - if (locale != NULL && locale[0] != '\0') - { - /* If the locale name contains an encoding after the dot, return - it. */ - const char *dot = strchr (locale, '.'); - - if (dot != NULL) - { - const char *modifier; - - dot++; - /* Look for the possible @... trailer and remove it, if any. */ - modifier = strchr (dot, '@'); - if (modifier == NULL) - return dot; - if (modifier - dot < sizeof (buf)) - { - memcpy (buf, dot, modifier - dot); - buf [modifier - dot] = '\0'; - return buf; - } - } - } - return ""; - } -# endif -# if GNULIB_defined_T_FMT_AMPM - case T_FMT_AMPM: - return "%I:%M:%S %p"; -# endif -# if GNULIB_defined_ERA - case ERA: - /* The format is not standardized. In glibc it is a sequence of strings - of the form "direction:offset:start_date:end_date:era_name:era_format" - with an empty string at the end. */ - return ""; - case ERA_D_FMT: - /* The %Ex conversion in strftime behaves like %x if the locale does not - have an alternative time format. */ - item = D_FMT; - break; - case ERA_D_T_FMT: - /* The %Ec conversion in strftime behaves like %c if the locale does not - have an alternative time format. */ - item = D_T_FMT; - break; - case ERA_T_FMT: - /* The %EX conversion in strftime behaves like %X if the locale does not - have an alternative time format. */ - item = T_FMT; - break; - case ALT_DIGITS: - /* The format is not standardized. In glibc it is a sequence of 10 - strings, appended in memory. */ - return "\0\0\0\0\0\0\0\0\0\0"; -# endif -# if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS - case YESEXPR: - return "^[yY]"; - case NOEXPR: - return "^[nN]"; -# endif - default: - break; - } - return nl_langinfo (item); -} - -#else - -/* Provide nl_langinfo from scratch. */ - -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -/* Native Windows platforms. */ - -# define WIN32_LEAN_AND_MEAN /* avoid including junk */ -# include - -# include - -# else - -/* An old Unix platform without locales, such as Linux libc5 or BeOS. */ - -# endif - -# include - -char * -nl_langinfo (nl_item item) -{ - switch (item) - { - /* nl_langinfo items of the LC_CTYPE category */ - case CODESET: -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - { - static char buf[2 + 10 + 1]; - - /* Woe32 has a function returning the locale's codepage as a number. */ - sprintf (buf, "CP%u", GetACP ()); - return buf; - } -# elif defined __BEOS__ - return "UTF-8"; -# else - return "ISO-8859-1"; -# endif - /* nl_langinfo items of the LC_NUMERIC category */ - case RADIXCHAR: - return localeconv () ->decimal_point; - case THOUSEP: - return localeconv () ->thousands_sep; - /* nl_langinfo items of the LC_TIME category. - TODO: Really use the locale. */ - case D_T_FMT: - case ERA_D_T_FMT: - return "%a %b %e %H:%M:%S %Y"; - case D_FMT: - case ERA_D_FMT: - return "%m/%d/%y"; - case T_FMT: - case ERA_T_FMT: - return "%H:%M:%S"; - case T_FMT_AMPM: - return "%I:%M:%S %p"; - case AM_STR: - return "AM"; - case PM_STR: - return "PM"; - case DAY_1: - return "Sunday"; - case DAY_2: - return "Monday"; - case DAY_3: - return "Tuesday"; - case DAY_4: - return "Wednesday"; - case DAY_5: - return "Thursday"; - case DAY_6: - return "Friday"; - case DAY_7: - return "Saturday"; - case ABDAY_1: - return "Sun"; - case ABDAY_2: - return "Mon"; - case ABDAY_3: - return "Tue"; - case ABDAY_4: - return "Wed"; - case ABDAY_5: - return "Thu"; - case ABDAY_6: - return "Fri"; - case ABDAY_7: - return "Sat"; - case MON_1: - return "January"; - case MON_2: - return "February"; - case MON_3: - return "March"; - case MON_4: - return "April"; - case MON_5: - return "May"; - case MON_6: - return "June"; - case MON_7: - return "July"; - case MON_8: - return "August"; - case MON_9: - return "September"; - case MON_10: - return "October"; - case MON_11: - return "November"; - case MON_12: - return "December"; - case ABMON_1: - return "Jan"; - case ABMON_2: - return "Feb"; - case ABMON_3: - return "Mar"; - case ABMON_4: - return "Apr"; - case ABMON_5: - return "May"; - case ABMON_6: - return "Jun"; - case ABMON_7: - return "Jul"; - case ABMON_8: - return "Aug"; - case ABMON_9: - return "Sep"; - case ABMON_10: - return "Oct"; - case ABMON_11: - return "Nov"; - case ABMON_12: - return "Dec"; - case ERA: - return ""; - case ALT_DIGITS: - return "\0\0\0\0\0\0\0\0\0\0"; - /* nl_langinfo items of the LC_MONETARY category - TODO: Really use the locale. */ - case CRNCYSTR: - return "-"; - /* nl_langinfo items of the LC_MESSAGES category - TODO: Really use the locale. */ - case YESEXPR: - return "^[yY]"; - case NOEXPR: - return "^[nN]"; - default: - return ""; - } -} - -#endif diff --git a/gnulib/lib/open-safer.c b/gnulib/lib/open-safer.c deleted file mode 100644 index e8c6a1f..0000000 --- a/gnulib/lib/open-safer.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Invoke open, but avoid some glitches. - - Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include - -#include "fcntl-safer.h" - -#include -#include -#include "unistd-safer.h" - -int -open_safer (char const *file, int flags, ...) -{ - mode_t mode = 0; - - if (flags & O_CREAT) - { - va_list ap; - va_start (ap, flags); - - /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 - creates crashing code when 'mode_t' is smaller than 'int'. */ - mode = va_arg (ap, PROMOTED_MODE_T); - - va_end (ap); - } - - return fd_safer (open (file, flags, mode)); -} diff --git a/gnulib/lib/open.c b/gnulib/lib/open.c deleted file mode 100644 index 2e2cc74..0000000 --- a/gnulib/lib/open.c +++ /dev/null @@ -1,167 +0,0 @@ -/* Open a descriptor to a file. - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2007. */ - -#include - -/* Get the original definition of open. It might be defined as a macro. */ -#define __need_system_fcntl_h -#include -#undef __need_system_fcntl_h -#include - -static inline int -orig_open (const char *filename, int flags, mode_t mode) -{ - return open (filename, flags, mode); -} - -/* Specification. */ -#include - -#include -#include -#include -#include -#include -#include - -#ifndef REPLACE_OPEN_DIRECTORY -# define REPLACE_OPEN_DIRECTORY 0 -#endif - -int -open (const char *filename, int flags, ...) -{ - mode_t mode; - int fd; - - mode = 0; - if (flags & O_CREAT) - { - va_list arg; - va_start (arg, flags); - - /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 - creates crashing code when 'mode_t' is smaller than 'int'. */ - mode = va_arg (arg, PROMOTED_MODE_T); - - va_end (arg); - } - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - if (strcmp (filename, "/dev/null") == 0) - filename = "NUL"; -#endif - -#if OPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR - is specified, then fail. - Rationale: POSIX - says that - "A pathname that contains at least one non-slash character and that - ends with one or more trailing slashes shall be resolved as if a - single dot character ( '.' ) were appended to the pathname." - and - "The special filename dot shall refer to the directory specified by - its predecessor." - If the named file already exists as a directory, then - - if O_CREAT is specified, open() must fail because of the semantics - of O_CREAT, - - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX - says that it - fails with errno = EISDIR in this case. - If the named file does not exist or does not name a directory, then - - if O_CREAT is specified, open() must fail since open() cannot create - directories, - - if O_WRONLY or O_RDWR is specified, open() must fail because the - file does not contain a '.' directory. */ - if (flags & (O_CREAT | O_WRONLY | O_RDWR)) - { - size_t len = strlen (filename); - if (len > 0 && filename[len - 1] == '/') - { - errno = EISDIR; - return -1; - } - } -#endif - - fd = orig_open (filename, flags, mode); - -#if REPLACE_FCHDIR - /* Implementing fchdir and fdopendir requires the ability to open a - directory file descriptor. If open doesn't support that (as on - mingw), we use a dummy file that behaves the same as directories - on Linux (ie. always reports EOF on attempts to read()), and - override fstat() in fchdir.c to hide the fact that we have a - dummy. */ - if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES - && ((flags & O_ACCMODE) == O_RDONLY - || (O_SEARCH != O_RDONLY && (flags & O_ACCMODE) == O_SEARCH))) - { - struct stat statbuf; - if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)) - { - /* Maximum recursion depth of 1. */ - fd = open ("/dev/null", flags, mode); - if (0 <= fd) - fd = _gl_register_fd (fd, filename); - } - else - errno = EACCES; - } -#endif - -#if OPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and fd does not refer to a directory, - then fail. - Rationale: POSIX - says that - "A pathname that contains at least one non-slash character and that - ends with one or more trailing slashes shall be resolved as if a - single dot character ( '.' ) were appended to the pathname." - and - "The special filename dot shall refer to the directory specified by - its predecessor." - If the named file without the slash is not a directory, open() must fail - with ENOTDIR. */ - if (fd >= 0) - { - /* We know len is positive, since open did not fail with ENOENT. */ - size_t len = strlen (filename); - if (filename[len - 1] == '/') - { - struct stat statbuf; - - if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) - { - close (fd); - errno = ENOTDIR; - return -1; - } - } - } -#endif - -#if REPLACE_FCHDIR - if (!REPLACE_OPEN_DIRECTORY && 0 <= fd) - fd = _gl_register_fd (fd, filename); -#endif - - return fd; -} diff --git a/gnulib/lib/openat-die.c b/gnulib/lib/openat-die.c deleted file mode 100644 index ea36dda..0000000 --- a/gnulib/lib/openat-die.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Report a save- or restore-cwd failure in our openat replacement and then exit. - - Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "openat.h" - -#include - -#ifndef GNULIB_LIBPOSIX -# include "error.h" -#endif - -#include "exitfail.h" - -#include "gettext.h" -#define _(msgid) gettext (msgid) - -void -openat_save_fail (int errnum) -{ -#ifndef GNULIB_LIBPOSIX - error (exit_failure, errnum, - _("unable to record current working directory")); -#endif - /* The `noreturn' attribute cannot be applied to error, since it returns - when its first argument is 0. To help compilers understand that this - function does not return, call abort. Also, the abort is a - safety feature if exit_failure is 0 (which shouldn't happen). */ - abort (); -} - - -/* Exit with an error about failure to restore the working directory - during an openat emulation. The caller must ensure that fd 2 is - not a just-opened fd, even when openat_safer is not in use. */ - -void -openat_restore_fail (int errnum) -{ -#ifndef GNULIB_LIBPOSIX - error (exit_failure, errnum, - _("failed to return to initial working directory")); -#endif - - /* As above. */ - abort (); -} diff --git a/gnulib/lib/openat-priv.h b/gnulib/lib/openat-priv.h deleted file mode 100644 index 948b220..0000000 --- a/gnulib/lib/openat-priv.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Internals for openat-like functions. - - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#ifndef _GL_HEADER_OPENAT_PRIV -#define _GL_HEADER_OPENAT_PRIV - -#include -#include -#include - -/* Maximum number of bytes that it is safe to allocate as a single - array on the stack, and that is known as a compile-time constant. - The assumption is that we'll touch the array very quickly, or a - temporary very near the array, provoking an out-of-memory trap. On - some operating systems, there is only one guard page for the stack, - and a page size can be as small as 4096 bytes. Subtract 64 in the - hope that this will let the compiler touch a nearby temporary and - provoke a trap. */ -#define SAFER_ALLOCA_MAX (4096 - 64) - -#define SAFER_ALLOCA(m) ((m) < SAFER_ALLOCA_MAX ? (m) : SAFER_ALLOCA_MAX) - -#if defined PATH_MAX -# define OPENAT_BUFFER_SIZE SAFER_ALLOCA (PATH_MAX) -#elif defined _XOPEN_PATH_MAX -# define OPENAT_BUFFER_SIZE SAFER_ALLOCA (_XOPEN_PATH_MAX) -#else -# define OPENAT_BUFFER_SIZE SAFER_ALLOCA (1024) -#endif - -char *openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file); - -/* Trying to access a BUILD_PROC_NAME file will fail on systems without - /proc support, and even on systems *with* ProcFS support. Return - nonzero if the failure may be legitimate, e.g., because /proc is not - readable, or the particular .../fd/N directory is not present. */ -#define EXPECTED_ERRNO(Errno) \ - ((Errno) == ENOTDIR || (Errno) == ENOENT \ - || (Errno) == EPERM || (Errno) == EACCES \ - || (Errno) == ENOSYS /* Solaris 8 */ \ - || (Errno) == EOPNOTSUPP /* FreeBSD */) - -/* Wrapper function shared among linkat and renameat. */ -int at_func2 (int fd1, char const *file1, - int fd2, char const *file2, - int (*func) (char const *file1, char const *file2)); - -#endif /* _GL_HEADER_OPENAT_PRIV */ diff --git a/gnulib/lib/openat-proc.c b/gnulib/lib/openat-proc.c deleted file mode 100644 index 4a470c5..0000000 --- a/gnulib/lib/openat-proc.c +++ /dev/null @@ -1,111 +0,0 @@ -/* Create /proc/self/fd-related names for subfiles of open directories. - - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include - -#include "openat-priv.h" - -#include -#include -#include - -#include -#include -#include -#include - -#include "intprops.h" -#include "same-inode.h" - -/* The results of open() in this file are not used with fchdir, - and we do not leak fds to any single-threaded code that could use stdio, - therefore save some unnecessary work in fchdir.c. - FIXME - if the kernel ever adds support for multi-thread safety for - avoiding standard fds, then we should use open_safer. */ -#undef open -#undef close - -#define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/%s" - -#define PROC_SELF_FD_NAME_SIZE_BOUND(len) \ - (sizeof PROC_SELF_FD_FORMAT - sizeof "%d%s" \ - + INT_STRLEN_BOUND (int) + (len) + 1) - - -/* Set BUF to the expansion of PROC_SELF_FD_FORMAT, using FD and FILE - respectively for %d and %s. If successful, return BUF if the - result fits in BUF, dynamically allocated memory otherwise. But - return NULL if /proc is not reliable, either because the operating - system support is lacking or because memory is low. */ -char * -openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file) -{ - static int proc_status = 0; - - /* Make sure the caller gets ENOENT when appropriate. */ - if (!*file) - { - buf[0] = '\0'; - return buf; - } - - if (! proc_status) - { - /* Set PROC_STATUS to a positive value if /proc/self/fd is - reliable, and a negative value otherwise. Solaris 10 - /proc/self/fd mishandles "..", and any file name might expand - to ".." after symbolic link expansion, so avoid /proc/self/fd - if it mishandles "..". Solaris 10 has openat, but this - problem is exhibited on code that built on Solaris 8 and - running on Solaris 10. */ - - int proc_self_fd = open ("/proc/self/fd", O_SEARCH); - if (proc_self_fd < 0) - proc_status = -1; - else - { - struct stat proc_self_fd_dotdot_st; - struct stat proc_self_st; - char dotdot_buf[PROC_SELF_FD_NAME_SIZE_BOUND (sizeof ".." - 1)]; - sprintf (dotdot_buf, PROC_SELF_FD_FORMAT, proc_self_fd, ".."); - proc_status = - ((stat (dotdot_buf, &proc_self_fd_dotdot_st) == 0 - && stat ("/proc/self", &proc_self_st) == 0 - && SAME_INODE (proc_self_fd_dotdot_st, proc_self_st)) - ? 1 : -1); - close (proc_self_fd); - } - } - - if (proc_status < 0) - return NULL; - else - { - size_t bufsize = PROC_SELF_FD_NAME_SIZE_BOUND (strlen (file)); - char *result = buf; - if (OPENAT_BUFFER_SIZE < bufsize) - { - result = malloc (bufsize); - if (! result) - return NULL; - } - sprintf (result, PROC_SELF_FD_FORMAT, fd, file); - return result; - } -} diff --git a/gnulib/lib/openat-safer.c b/gnulib/lib/openat-safer.c deleted file mode 100644 index 66f327b..0000000 --- a/gnulib/lib/openat-safer.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Invoke openat, but avoid some glitches. - - Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert for open, ported by Eric Blake for openat. */ - -#include - -#include "fcntl-safer.h" - -#include -#include -#include "unistd-safer.h" - -int -openat_safer (int fd, char const *file, int flags, ...) -{ - mode_t mode = 0; - - if (flags & O_CREAT) - { - va_list ap; - va_start (ap, flags); - - /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 - creates crashing code when 'mode_t' is smaller than 'int'. */ - mode = va_arg (ap, PROMOTED_MODE_T); - - va_end (ap); - } - - return fd_safer (openat (fd, file, flags, mode)); -} diff --git a/gnulib/lib/openat.c b/gnulib/lib/openat.c deleted file mode 100644 index 18491a6..0000000 --- a/gnulib/lib/openat.c +++ /dev/null @@ -1,265 +0,0 @@ -/* provide a replacement openat function - Copyright (C) 2004-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include "openat.h" - -#include -#include -#include -#include - -#include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ -#include "openat-priv.h" -#include "save-cwd.h" - -#if HAVE_OPENAT - -# undef openat - -/* Like openat, but work around Solaris 9 bugs with trailing slash. */ -int -rpl_openat (int dfd, char const *filename, int flags, ...) -{ - mode_t mode; - int fd; - - mode = 0; - if (flags & O_CREAT) - { - va_list arg; - va_start (arg, flags); - - /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 - creates crashing code when 'mode_t' is smaller than 'int'. */ - mode = va_arg (arg, PROMOTED_MODE_T); - - va_end (arg); - } - -# if OPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR - is specified, then fail. - Rationale: POSIX - says that - "A pathname that contains at least one non-slash character and that - ends with one or more trailing slashes shall be resolved as if a - single dot character ( '.' ) were appended to the pathname." - and - "The special filename dot shall refer to the directory specified by - its predecessor." - If the named file already exists as a directory, then - - if O_CREAT is specified, open() must fail because of the semantics - of O_CREAT, - - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX - says that it - fails with errno = EISDIR in this case. - If the named file does not exist or does not name a directory, then - - if O_CREAT is specified, open() must fail since open() cannot create - directories, - - if O_WRONLY or O_RDWR is specified, open() must fail because the - file does not contain a '.' directory. */ - if (flags & (O_CREAT | O_WRONLY | O_RDWR)) - { - size_t len = strlen (filename); - if (len > 0 && filename[len - 1] == '/') - { - errno = EISDIR; - return -1; - } - } -# endif - - fd = openat (dfd, filename, flags, mode); - -# if OPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and fd does not refer to a directory, - then fail. - Rationale: POSIX - says that - "A pathname that contains at least one non-slash character and that - ends with one or more trailing slashes shall be resolved as if a - single dot character ( '.' ) were appended to the pathname." - and - "The special filename dot shall refer to the directory specified by - its predecessor." - If the named file without the slash is not a directory, open() must fail - with ENOTDIR. */ - if (fd >= 0) - { - /* We know len is positive, since open did not fail with ENOENT. */ - size_t len = strlen (filename); - if (filename[len - 1] == '/') - { - struct stat statbuf; - - if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) - { - close (fd); - errno = ENOTDIR; - return -1; - } - } - } -# endif - - return fd; -} - -#else /* !HAVE_OPENAT */ - -/* Replacement for Solaris' openat function. - - First, try to simulate it via open ("/proc/self/fd/FD/FILE"). - Failing that, simulate it by doing save_cwd/fchdir/open/restore_cwd. - If either the save_cwd or the restore_cwd fails (relatively unlikely), - then give a diagnostic and exit nonzero. - Otherwise, upon failure, set errno and return -1, as openat does. - Upon successful completion, return a file descriptor. */ -int -openat (int fd, char const *file, int flags, ...) -{ - mode_t mode = 0; - - if (flags & O_CREAT) - { - va_list arg; - va_start (arg, flags); - - /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 - creates crashing code when 'mode_t' is smaller than 'int'. */ - mode = va_arg (arg, PROMOTED_MODE_T); - - va_end (arg); - } - - return openat_permissive (fd, file, flags, mode, NULL); -} - -/* Like openat (FD, FILE, FLAGS, MODE), but if CWD_ERRNO is - nonnull, set *CWD_ERRNO to an errno value if unable to save - or restore the initial working directory. This is needed only - the first time remove.c's remove_dir opens a command-line - directory argument. - - If a previous attempt to restore the current working directory - failed, then we must not even try to access a `.'-relative name. - It is the caller's responsibility not to call this function - in that case. */ - -int -openat_permissive (int fd, char const *file, int flags, mode_t mode, - int *cwd_errno) -{ - struct saved_cwd saved_cwd; - int saved_errno; - int err; - bool save_ok; - - if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file)) - return open (file, flags, mode); - - { - char buf[OPENAT_BUFFER_SIZE]; - char *proc_file = openat_proc_name (buf, fd, file); - if (proc_file) - { - int open_result = open (proc_file, flags, mode); - int open_errno = errno; - if (proc_file != buf) - free (proc_file); - /* If the syscall succeeds, or if it fails with an unexpected - errno value, then return right away. Otherwise, fall through - and resort to using save_cwd/restore_cwd. */ - if (0 <= open_result || ! EXPECTED_ERRNO (open_errno)) - { - errno = open_errno; - return open_result; - } - } - } - - save_ok = (save_cwd (&saved_cwd) == 0); - if (! save_ok) - { - if (! cwd_errno) - openat_save_fail (errno); - *cwd_errno = errno; - } - if (0 <= fd && fd == saved_cwd.desc) - { - /* If saving the working directory collides with the user's - requested fd, then the user's fd must have been closed to - begin with. */ - free_cwd (&saved_cwd); - errno = EBADF; - return -1; - } - - err = fchdir (fd); - saved_errno = errno; - - if (! err) - { - err = open (file, flags, mode); - saved_errno = errno; - if (save_ok && restore_cwd (&saved_cwd) != 0) - { - if (! cwd_errno) - { - /* Don't write a message to just-created fd 2. */ - saved_errno = errno; - if (err == STDERR_FILENO) - close (err); - openat_restore_fail (saved_errno); - } - *cwd_errno = errno; - } - } - - free_cwd (&saved_cwd); - errno = saved_errno; - return err; -} - -/* Return true if our openat implementation must resort to - using save_cwd and restore_cwd. */ -bool -openat_needs_fchdir (void) -{ - bool needs_fchdir = true; - int fd = open ("/", O_SEARCH); - - if (0 <= fd) - { - char buf[OPENAT_BUFFER_SIZE]; - char *proc_file = openat_proc_name (buf, fd, "."); - if (proc_file) - { - needs_fchdir = false; - if (proc_file != buf) - free (proc_file); - } - close (fd); - } - - return needs_fchdir; -} - -#endif /* !HAVE_OPENAT */ diff --git a/gnulib/lib/openat.h b/gnulib/lib/openat.h deleted file mode 100644 index 5cb1866..0000000 --- a/gnulib/lib/openat.h +++ /dev/null @@ -1,98 +0,0 @@ -/* provide a replacement openat function - Copyright (C) 2004-2006, 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#ifndef _GL_HEADER_OPENAT -#define _GL_HEADER_OPENAT - -#include - -#include -#include -#include -#include -#include - -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -#else -# define _GL_ATTRIBUTE_NORETURN /* empty */ -#endif - -#if !HAVE_OPENAT - -int openat_permissive (int fd, char const *file, int flags, mode_t mode, - int *cwd_errno); -bool openat_needs_fchdir (void); - -#else - -# define openat_permissive(Fd, File, Flags, Mode, Cwd_errno) \ - openat (Fd, File, Flags, Mode) -# define openat_needs_fchdir() false - -#endif - -void openat_restore_fail (int) _GL_ATTRIBUTE_NORETURN; -void openat_save_fail (int) _GL_ATTRIBUTE_NORETURN; - -/* Using these function names makes application code - slightly more readable than it would be with - fchownat (..., 0) or fchownat (..., AT_SYMLINK_NOFOLLOW). */ -static inline int -chownat (int fd, char const *file, uid_t owner, gid_t group) -{ - return fchownat (fd, file, owner, group, 0); -} - -static inline int -lchownat (int fd, char const *file, uid_t owner, gid_t group) -{ - return fchownat (fd, file, owner, group, AT_SYMLINK_NOFOLLOW); -} - -static inline int -chmodat (int fd, char const *file, mode_t mode) -{ - return fchmodat (fd, file, mode, 0); -} - -static inline int -lchmodat (int fd, char const *file, mode_t mode) -{ - return fchmodat (fd, file, mode, AT_SYMLINK_NOFOLLOW); -} - -static inline int -statat (int fd, char const *name, struct stat *st) -{ - return fstatat (fd, name, st, 0); -} - -static inline int -lstatat (int fd, char const *name, struct stat *st) -{ - return fstatat (fd, name, st, AT_SYMLINK_NOFOLLOW); -} - -/* For now, there are no wrappers named laccessat or leuidaccessat, - since gnulib doesn't support faccessat(,AT_SYMLINK_NOFOLLOW) and - since access rights on symlinks are of limited utility. Likewise, - wrappers are not provided for accessat or euidaccessat, so as to - avoid dragging in -lgen on some platforms. */ - -#endif /* _GL_HEADER_OPENAT */ diff --git a/gnulib/lib/opendir-safer.c b/gnulib/lib/opendir-safer.c deleted file mode 100644 index f1e5fb7..0000000 --- a/gnulib/lib/opendir-safer.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Invoke opendir, but avoid some glitches. - - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake. */ - -#include - -#include "dirent-safer.h" - -#include -#include -#include "unistd-safer.h" - -/* Like opendir, but do not clobber stdin, stdout, or stderr. */ - -DIR * -opendir_safer (char const *name) -{ - DIR *dp = opendir (name); - - if (dp) - { - int fd = dirfd (dp); - - if (0 <= fd && fd <= STDERR_FILENO) - { - /* If fdopendir is native (as on Linux), then it is safe to - assume dirfd(fdopendir(n))==n. If we are using the - gnulib module fdopendir, then this guarantee is not met, - but fdopendir recursively calls opendir_safer up to 3 - times to at least get a safe fd. If fdopendir is not - present but dirfd is accurate (as on cygwin 1.5.x), then - we recurse up to 3 times ourselves. Finally, if dirfd - always fails (as on mingw), then we are already safe. */ - DIR *newdp; - int e; -#if HAVE_FDOPENDIR || GNULIB_FDOPENDIR - int f = dup_safer (fd); - newdp = fdopendir (f); - e = errno; - if (! newdp) - close (f); -#else /* !FDOPENDIR */ - newdp = opendir_safer (name); - e = errno; -#endif - closedir (dp); - errno = e; - dp = newdp; - } - } - - return dp; -} diff --git a/gnulib/lib/parse-datetime.c b/gnulib/lib/parse-datetime.c deleted file mode 100644 index 94d6573..0000000 --- a/gnulib/lib/parse-datetime.c +++ /dev/null @@ -1,3505 +0,0 @@ - -/* A Bison parser, made by GNU Bison 2.4.1. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.4.1" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - - - -/* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ -#line 1 "parse-datetime.y" - -/* Parse a string into an internal time stamp. - - Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Originally written by Steven M. Bellovin while - at the University of North Carolina at Chapel Hill. Later tweaked by - a couple of people on Usenet. Completely overhauled by Rich $alz - and Jim Berets in August, 1990. - - Modified by Paul Eggert in August 1999 to do - the right thing about local DST. Also modified by Paul Eggert - in February 2004 to support - nanosecond-resolution time stamps, and in October 2004 to support - TZ strings in dates. */ - -/* FIXME: Check for arithmetic overflow in all cases, not just - some of them. */ - -#include - -#include "parse-datetime.h" - -#include "intprops.h" -#include "timespec.h" -#include "verify.h" - -/* There's no need to extend the stack, so there's no need to involve - alloca. */ -#define YYSTACK_USE_ALLOCA 0 - -/* Tell Bison how much stack space is needed. 20 should be plenty for - this grammar, which is not right recursive. Beware setting it too - high, since that might cause problems on machines whose - implementations have lame stack-overflow checking. */ -#define YYMAXDEPTH 20 -#define YYINITDEPTH YYMAXDEPTH - -/* Since the code of parse-datetime.y is not included in the Emacs executable - itself, there is no need to #define static in this file. Even if - the code were included in the Emacs executable, it probably - wouldn't do any harm to #undef it here; this will only cause - problems if we try to write to a static variable, which I don't - think this code needs to do. */ -#ifdef emacs -# undef static -#endif - -#include -#include -#include -#include -#include - -#include "xalloc.h" - -/* Bison's skeleton tests _STDLIB_H, while some stdlib.h headers - use _STDLIB_H_ as witness. Map the latter to the one bison uses. */ -/* FIXME: this is temporary. Remove when we have a mechanism to ensure - that the version we're using is fixed, too. */ -#ifdef _STDLIB_H_ -# undef _STDLIB_H -# define _STDLIB_H 1 -#endif - -/* ISDIGIT differs from isdigit, as follows: - - Its arg may be any int or unsigned int; it need not be an unsigned char - or EOF. - - It's typically faster. - POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to - isdigit unless it's important to use the locale's definition - of `digit' even when the host does not conform to POSIX. */ -#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) - -/* Shift A right by B bits portably, by dividing A by 2**B and - truncating towards minus infinity. A and B should be free of side - effects, and B should be in the range 0 <= B <= INT_BITS - 2, where - INT_BITS is the number of useful bits in an int. GNU code can - assume that INT_BITS is at least 32. - - ISO C99 says that A >> B is implementation-defined if A < 0. Some - implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift - right in the usual way when A < 0, so SHR falls back on division if - ordinary A >> B doesn't seem to be the usual signed shift. */ -#define SHR(a, b) \ - (-1 >> 1 == -1 \ - ? (a) >> (b) \ - : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) - -#define EPOCH_YEAR 1970 -#define TM_YEAR_BASE 1900 - -#define HOUR(x) ((x) * 60) - -/* long_time_t is a signed integer type that contains all time_t values. */ -verify (TYPE_IS_INTEGER (time_t)); -#if TIME_T_FITS_IN_LONG_INT -typedef long int long_time_t; -#else -typedef time_t long_time_t; -#endif - -/* Lots of this code assumes time_t and time_t-like values fit into - long_time_t. */ -verify (TYPE_MINIMUM (long_time_t) <= TYPE_MINIMUM (time_t) - && TYPE_MAXIMUM (time_t) <= TYPE_MAXIMUM (long_time_t)); - -/* FIXME: It also assumes that signed integer overflow silently wraps around, - but this is not true any more with recent versions of GCC 4. */ - -/* An integer value, and the number of digits in its textual - representation. */ -typedef struct -{ - bool negative; - long int value; - size_t digits; -} textint; - -/* An entry in the lexical lookup table. */ -typedef struct -{ - char const *name; - int type; - int value; -} table; - -/* Meridian: am, pm, or 24-hour style. */ -enum { MERam, MERpm, MER24 }; - -enum { BILLION = 1000000000, LOG10_BILLION = 9 }; - -/* Relative times. */ -typedef struct -{ - /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ - long int year; - long int month; - long int day; - long int hour; - long int minutes; - long_time_t seconds; - long int ns; -} relative_time; - -#if HAVE_COMPOUND_LITERALS -# define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 }) -#else -static relative_time const RELATIVE_TIME_0; -#endif - -/* Information passed to and from the parser. */ -typedef struct -{ - /* The input string remaining to be parsed. */ - const char *input; - - /* N, if this is the Nth Tuesday. */ - long int day_ordinal; - - /* Day of week; Sunday is 0. */ - int day_number; - - /* tm_isdst flag for the local zone. */ - int local_isdst; - - /* Time zone, in minutes east of UTC. */ - long int time_zone; - - /* Style used for time. */ - int meridian; - - /* Gregorian year, month, day, hour, minutes, seconds, and nanoseconds. */ - textint year; - long int month; - long int day; - long int hour; - long int minutes; - struct timespec seconds; /* includes nanoseconds */ - - /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ - relative_time rel; - - /* Presence or counts of nonterminals of various flavors parsed so far. */ - bool timespec_seen; - bool rels_seen; - size_t dates_seen; - size_t days_seen; - size_t local_zones_seen; - size_t dsts_seen; - size_t times_seen; - size_t zones_seen; - - /* Table of local time zone abbrevations, terminated by a null entry. */ - table local_time_zone_table[3]; -} parser_control; - -union YYSTYPE; -static int yylex (union YYSTYPE *, parser_control *); -static int yyerror (parser_control const *, char const *); -static long int time_zone_hhmm (parser_control *, textint, long int); - -/* Extract into *PC any date and time info from a string of digits - of the form e.g., YYYYMMDD, YYMMDD, HHMM, HH (and sometimes YYY, - YYYY, ...). */ -static void -digits_to_date_time (parser_control *pc, textint text_int) -{ - if (pc->dates_seen && ! pc->year.digits - && ! pc->rels_seen && (pc->times_seen || 2 < text_int.digits)) - pc->year = text_int; - else - { - if (4 < text_int.digits) - { - pc->dates_seen++; - pc->day = text_int.value % 100; - pc->month = (text_int.value / 100) % 100; - pc->year.value = text_int.value / 10000; - pc->year.digits = text_int.digits - 4; - } - else - { - pc->times_seen++; - if (text_int.digits <= 2) - { - pc->hour = text_int.value; - pc->minutes = 0; - } - else - { - pc->hour = text_int.value / 100; - pc->minutes = text_int.value % 100; - } - pc->seconds.tv_sec = 0; - pc->seconds.tv_nsec = 0; - pc->meridian = MER24; - } - } -} - -/* Increment PC->rel by FACTOR * REL (FACTOR is 1 or -1). */ -static void -apply_relative_time (parser_control *pc, relative_time rel, int factor) -{ - pc->rel.ns += factor * rel.ns; - pc->rel.seconds += factor * rel.seconds; - pc->rel.minutes += factor * rel.minutes; - pc->rel.hour += factor * rel.hour; - pc->rel.day += factor * rel.day; - pc->rel.month += factor * rel.month; - pc->rel.year += factor * rel.year; - pc->rels_seen = true; -} - -/* Set PC-> hour, minutes, seconds and nanoseconds members from arguments. */ -static void -set_hhmmss (parser_control *pc, long int hour, long int minutes, - time_t sec, long int nsec) -{ - pc->hour = hour; - pc->minutes = minutes; - pc->seconds.tv_sec = sec; - pc->seconds.tv_nsec = nsec; -} - - - -/* Line 189 of yacc.c */ -#line 355 "parse-datetime.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - tAGO = 258, - tDST = 259, - tYEAR_UNIT = 260, - tMONTH_UNIT = 261, - tHOUR_UNIT = 262, - tMINUTE_UNIT = 263, - tSEC_UNIT = 264, - tDAY_UNIT = 265, - tDAY_SHIFT = 266, - tDAY = 267, - tDAYZONE = 268, - tLOCAL_ZONE = 269, - tMERIDIAN = 270, - tMONTH = 271, - tORDINAL = 272, - tZONE = 273, - tSNUMBER = 274, - tUNUMBER = 275, - tSDECIMAL_NUMBER = 276, - tUDECIMAL_NUMBER = 277 - }; -#endif -/* Tokens. */ -#define tAGO 258 -#define tDST 259 -#define tYEAR_UNIT 260 -#define tMONTH_UNIT 261 -#define tHOUR_UNIT 262 -#define tMINUTE_UNIT 263 -#define tSEC_UNIT 264 -#define tDAY_UNIT 265 -#define tDAY_SHIFT 266 -#define tDAY 267 -#define tDAYZONE 268 -#define tLOCAL_ZONE 269 -#define tMERIDIAN 270 -#define tMONTH 271 -#define tORDINAL 272 -#define tZONE 273 -#define tSNUMBER 274 -#define tUNUMBER 275 -#define tSDECIMAL_NUMBER 276 -#define tUDECIMAL_NUMBER 277 - - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 214 of yacc.c */ -#line 292 "parse-datetime.y" - - long int intval; - textint textintval; - struct timespec timespec; - relative_time rel; - - - -/* Line 214 of yacc.c */ -#line 444 "parse-datetime.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Line 264 of yacc.c */ -#line 456 "parse-datetime.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 12 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 98 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 27 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 21 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 82 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 100 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 277 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 25, 2, 2, 26, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 24, 2, - 2, 2, 2, 2, 23, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 5, 7, 10, 11, 14, 16, 18, - 20, 22, 24, 26, 28, 30, 33, 38, 44, 51, - 59, 61, 64, 66, 69, 73, 75, 78, 80, 83, - 86, 89, 93, 99, 103, 107, 111, 114, 119, 122, - 126, 129, 131, 133, 136, 139, 141, 144, 147, 149, - 152, 155, 157, 160, 163, 165, 168, 171, 173, 176, - 179, 182, 185, 187, 189, 192, 195, 198, 201, 204, - 207, 209, 211, 213, 215, 217, 219, 221, 223, 226, - 227, 230, 231 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 28, 0, -1, 29, -1, 30, -1, 23, 41, -1, - -1, 30, 31, -1, 32, -1, 33, -1, 34, -1, - 36, -1, 35, -1, 37, -1, 44, -1, 45, -1, - 20, 15, -1, 20, 24, 20, 47, -1, 20, 24, - 20, 19, 46, -1, 20, 24, 20, 24, 43, 47, - -1, 20, 24, 20, 24, 43, 19, 46, -1, 14, - -1, 14, 4, -1, 18, -1, 18, 39, -1, 18, - 19, 46, -1, 13, -1, 18, 4, -1, 12, -1, - 12, 25, -1, 17, 12, -1, 20, 12, -1, 20, - 26, 20, -1, 20, 26, 20, 26, 20, -1, 20, - 19, 19, -1, 20, 16, 19, -1, 16, 19, 19, - -1, 16, 20, -1, 16, 20, 25, 20, -1, 20, - 16, -1, 20, 16, 20, -1, 38, 3, -1, 38, - -1, 40, -1, 17, 5, -1, 20, 5, -1, 5, - -1, 17, 6, -1, 20, 6, -1, 6, -1, 17, - 10, -1, 20, 10, -1, 10, -1, 17, 7, -1, - 20, 7, -1, 7, -1, 17, 8, -1, 20, 8, - -1, 8, -1, 17, 9, -1, 20, 9, -1, 21, - 9, -1, 22, 9, -1, 9, -1, 39, -1, 19, - 5, -1, 19, 6, -1, 19, 10, -1, 19, 7, - -1, 19, 8, -1, 19, 9, -1, 11, -1, 42, - -1, 43, -1, 21, -1, 19, -1, 22, -1, 20, - -1, 20, -1, 20, 39, -1, -1, 24, 20, -1, - -1, 15, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 318, 318, 319, 323, 330, 332, 336, 338, 340, - 342, 344, 346, 347, 348, 352, 357, 362, 369, 374, - 384, 389, 397, 399, 402, 404, 406, 411, 416, 421, - 426, 434, 439, 459, 466, 474, 482, 487, 493, 498, - 507, 509, 511, 516, 518, 520, 522, 524, 526, 528, - 530, 532, 534, 536, 538, 540, 542, 544, 546, 548, - 550, 552, 554, 556, 560, 562, 564, 566, 568, 570, - 575, 579, 579, 582, 583, 588, 589, 594, 599, 610, - 611, 617, 618 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "tAGO", "tDST", "tYEAR_UNIT", - "tMONTH_UNIT", "tHOUR_UNIT", "tMINUTE_UNIT", "tSEC_UNIT", "tDAY_UNIT", - "tDAY_SHIFT", "tDAY", "tDAYZONE", "tLOCAL_ZONE", "tMERIDIAN", "tMONTH", - "tORDINAL", "tZONE", "tSNUMBER", "tUNUMBER", "tSDECIMAL_NUMBER", - "tUDECIMAL_NUMBER", "'@'", "':'", "','", "'/'", "$accept", "spec", - "timespec", "items", "item", "time", "local_zone", "zone", "day", "date", - "rel", "relunit", "relunit_snumber", "dayshift", "seconds", - "signed_seconds", "unsigned_seconds", "number", "hybrid", - "o_colon_minutes", "o_merid", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 64, 58, 44, 47 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 27, 28, 28, 29, 30, 30, 31, 31, 31, - 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, - 33, 33, 34, 34, 34, 34, 34, 35, 35, 35, - 35, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 37, 37, 37, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, - 40, 41, 41, 42, 42, 43, 43, 44, 45, 46, - 46, 47, 47 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 2, 0, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 4, 5, 6, 7, - 1, 2, 1, 2, 3, 1, 2, 1, 2, 2, - 2, 3, 5, 3, 3, 3, 2, 4, 2, 3, - 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, - 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, - 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, - 2, 0, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 5, 0, 0, 2, 3, 74, 76, 73, 75, 4, - 71, 72, 1, 45, 48, 54, 57, 62, 51, 70, - 27, 25, 20, 0, 0, 22, 0, 77, 0, 0, - 6, 7, 8, 9, 11, 10, 12, 41, 63, 42, - 13, 14, 28, 21, 0, 36, 43, 46, 52, 55, - 58, 49, 29, 26, 79, 23, 64, 65, 67, 68, - 69, 66, 44, 47, 53, 56, 59, 50, 30, 15, - 38, 0, 0, 0, 78, 60, 61, 40, 35, 0, - 0, 24, 34, 39, 33, 81, 31, 37, 80, 82, - 79, 0, 16, 0, 17, 81, 32, 79, 18, 19 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 2, 3, 4, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 9, 10, 11, 40, 41, 81, - 92 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -82 -static const yytype_int8 yypact[] = -{ - -17, 56, 15, -82, 26, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - 36, -82, 68, 10, 50, 9, 59, -5, 72, 73, - -82, -82, -82, -82, -82, -82, -82, 80, -82, -82, - -82, -82, -82, -82, 65, 61, -82, -82, -82, -82, - -82, -82, -82, -82, 17, -82, -82, -82, -82, -82, - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - 60, 44, 67, 69, -82, -82, -82, -82, -82, 70, - 71, -82, -82, -82, -82, -7, 62, -82, -82, -82, - 74, -2, -82, 75, -82, 55, -82, 74, -82, -82 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -82, -82, -82, -82, -82, -82, -82, -82, -82, -82, - -82, -82, 46, -82, -82, -82, -6, -82, -82, -81, - -3 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const yytype_uint8 yytable[] = -{ - 62, 63, 64, 65, 66, 67, 1, 68, 89, 94, - 69, 70, 90, 53, 71, 12, 99, 91, 6, 72, - 8, 73, 56, 57, 58, 59, 60, 61, 54, 44, - 45, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 80, 23, 24, 25, 26, 27, 28, 29, 56, - 57, 58, 59, 60, 61, 46, 47, 48, 49, 50, - 51, 42, 52, 84, 56, 57, 58, 59, 60, 61, - 89, 55, 43, 74, 97, 5, 6, 7, 8, 82, - 83, 75, 76, 77, 78, 95, 79, 85, 93, 86, - 87, 88, 98, 0, 0, 96, 0, 0, 80 -}; - -static const yytype_int8 yycheck[] = -{ - 5, 6, 7, 8, 9, 10, 23, 12, 15, 90, - 15, 16, 19, 4, 19, 0, 97, 24, 20, 24, - 22, 26, 5, 6, 7, 8, 9, 10, 19, 19, - 20, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 24, 16, 17, 18, 19, 20, 21, 22, 5, - 6, 7, 8, 9, 10, 5, 6, 7, 8, 9, - 10, 25, 12, 19, 5, 6, 7, 8, 9, 10, - 15, 25, 4, 27, 19, 19, 20, 21, 22, 19, - 20, 9, 9, 3, 19, 91, 25, 20, 26, 20, - 20, 20, 95, -1, -1, 20, -1, -1, 24 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 23, 28, 29, 30, 19, 20, 21, 22, 41, - 42, 43, 0, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 44, 45, 25, 4, 19, 20, 5, 6, 7, 8, - 9, 10, 12, 4, 19, 39, 5, 6, 7, 8, - 9, 10, 5, 6, 7, 8, 9, 10, 12, 15, - 16, 19, 24, 26, 39, 9, 9, 3, 19, 25, - 24, 46, 19, 20, 19, 20, 20, 20, 20, 15, - 19, 24, 47, 26, 46, 43, 20, 19, 47, 46 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (pc, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, pc) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, pc); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - parser_control *pc; -#endif -{ - if (!yyvaluep) - return; - YYUSE (pc); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, parser_control *pc) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, pc) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - parser_control *pc; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep, pc); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule, parser_control *pc) -#else -static void -yy_reduce_print (yyvsp, yyrule, pc) - YYSTYPE *yyvsp; - int yyrule; - parser_control *pc; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , pc); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule, pc); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, parser_control *pc) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, pc) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - parser_control *pc; -#endif -{ - YYUSE (yyvaluep); - YYUSE (pc); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (parser_control *pc); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (parser_control *pc) -#else -int -yyparse (pc) - parser_control *pc; -#endif -#endif -{ -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 4: - -/* Line 1455 of yacc.c */ -#line 324 "parse-datetime.y" - { - pc->seconds = (yyvsp[(2) - (2)].timespec); - pc->timespec_seen = true; - } - break; - - case 7: - -/* Line 1455 of yacc.c */ -#line 337 "parse-datetime.y" - { pc->times_seen++; } - break; - - case 8: - -/* Line 1455 of yacc.c */ -#line 339 "parse-datetime.y" - { pc->local_zones_seen++; } - break; - - case 9: - -/* Line 1455 of yacc.c */ -#line 341 "parse-datetime.y" - { pc->zones_seen++; } - break; - - case 10: - -/* Line 1455 of yacc.c */ -#line 343 "parse-datetime.y" - { pc->dates_seen++; } - break; - - case 11: - -/* Line 1455 of yacc.c */ -#line 345 "parse-datetime.y" - { pc->days_seen++; } - break; - - case 15: - -/* Line 1455 of yacc.c */ -#line 353 "parse-datetime.y" - { - set_hhmmss (pc, (yyvsp[(1) - (2)].textintval).value, 0, 0, 0); - pc->meridian = (yyvsp[(2) - (2)].intval); - } - break; - - case 16: - -/* Line 1455 of yacc.c */ -#line 358 "parse-datetime.y" - { - set_hhmmss (pc, (yyvsp[(1) - (4)].textintval).value, (yyvsp[(3) - (4)].textintval).value, 0, 0); - pc->meridian = (yyvsp[(4) - (4)].intval); - } - break; - - case 17: - -/* Line 1455 of yacc.c */ -#line 363 "parse-datetime.y" - { - set_hhmmss (pc, (yyvsp[(1) - (5)].textintval).value, (yyvsp[(3) - (5)].textintval).value, 0, 0); - pc->meridian = MER24; - pc->zones_seen++; - pc->time_zone = time_zone_hhmm (pc, (yyvsp[(4) - (5)].textintval), (yyvsp[(5) - (5)].intval)); - } - break; - - case 18: - -/* Line 1455 of yacc.c */ -#line 370 "parse-datetime.y" - { - set_hhmmss (pc, (yyvsp[(1) - (6)].textintval).value, (yyvsp[(3) - (6)].textintval).value, (yyvsp[(5) - (6)].timespec).tv_sec, (yyvsp[(5) - (6)].timespec).tv_nsec); - pc->meridian = (yyvsp[(6) - (6)].intval); - } - break; - - case 19: - -/* Line 1455 of yacc.c */ -#line 375 "parse-datetime.y" - { - set_hhmmss (pc, (yyvsp[(1) - (7)].textintval).value, (yyvsp[(3) - (7)].textintval).value, (yyvsp[(5) - (7)].timespec).tv_sec, (yyvsp[(5) - (7)].timespec).tv_nsec); - pc->meridian = MER24; - pc->zones_seen++; - pc->time_zone = time_zone_hhmm (pc, (yyvsp[(6) - (7)].textintval), (yyvsp[(7) - (7)].intval)); - } - break; - - case 20: - -/* Line 1455 of yacc.c */ -#line 385 "parse-datetime.y" - { - pc->local_isdst = (yyvsp[(1) - (1)].intval); - pc->dsts_seen += (0 < (yyvsp[(1) - (1)].intval)); - } - break; - - case 21: - -/* Line 1455 of yacc.c */ -#line 390 "parse-datetime.y" - { - pc->local_isdst = 1; - pc->dsts_seen += (0 < (yyvsp[(1) - (2)].intval)) + 1; - } - break; - - case 22: - -/* Line 1455 of yacc.c */ -#line 398 "parse-datetime.y" - { pc->time_zone = (yyvsp[(1) - (1)].intval); } - break; - - case 23: - -/* Line 1455 of yacc.c */ -#line 400 "parse-datetime.y" - { pc->time_zone = (yyvsp[(1) - (2)].intval); - apply_relative_time (pc, (yyvsp[(2) - (2)].rel), 1); } - break; - - case 24: - -/* Line 1455 of yacc.c */ -#line 403 "parse-datetime.y" - { pc->time_zone = (yyvsp[(1) - (3)].intval) + time_zone_hhmm (pc, (yyvsp[(2) - (3)].textintval), (yyvsp[(3) - (3)].intval)); } - break; - - case 25: - -/* Line 1455 of yacc.c */ -#line 405 "parse-datetime.y" - { pc->time_zone = (yyvsp[(1) - (1)].intval) + 60; } - break; - - case 26: - -/* Line 1455 of yacc.c */ -#line 407 "parse-datetime.y" - { pc->time_zone = (yyvsp[(1) - (2)].intval) + 60; } - break; - - case 27: - -/* Line 1455 of yacc.c */ -#line 412 "parse-datetime.y" - { - pc->day_ordinal = 0; - pc->day_number = (yyvsp[(1) - (1)].intval); - } - break; - - case 28: - -/* Line 1455 of yacc.c */ -#line 417 "parse-datetime.y" - { - pc->day_ordinal = 0; - pc->day_number = (yyvsp[(1) - (2)].intval); - } - break; - - case 29: - -/* Line 1455 of yacc.c */ -#line 422 "parse-datetime.y" - { - pc->day_ordinal = (yyvsp[(1) - (2)].intval); - pc->day_number = (yyvsp[(2) - (2)].intval); - } - break; - - case 30: - -/* Line 1455 of yacc.c */ -#line 427 "parse-datetime.y" - { - pc->day_ordinal = (yyvsp[(1) - (2)].textintval).value; - pc->day_number = (yyvsp[(2) - (2)].intval); - } - break; - - case 31: - -/* Line 1455 of yacc.c */ -#line 435 "parse-datetime.y" - { - pc->month = (yyvsp[(1) - (3)].textintval).value; - pc->day = (yyvsp[(3) - (3)].textintval).value; - } - break; - - case 32: - -/* Line 1455 of yacc.c */ -#line 440 "parse-datetime.y" - { - /* Interpret as YYYY/MM/DD if the first value has 4 or more digits, - otherwise as MM/DD/YY. - The goal in recognizing YYYY/MM/DD is solely to support legacy - machine-generated dates like those in an RCS log listing. If - you want portability, use the ISO 8601 format. */ - if (4 <= (yyvsp[(1) - (5)].textintval).digits) - { - pc->year = (yyvsp[(1) - (5)].textintval); - pc->month = (yyvsp[(3) - (5)].textintval).value; - pc->day = (yyvsp[(5) - (5)].textintval).value; - } - else - { - pc->month = (yyvsp[(1) - (5)].textintval).value; - pc->day = (yyvsp[(3) - (5)].textintval).value; - pc->year = (yyvsp[(5) - (5)].textintval); - } - } - break; - - case 33: - -/* Line 1455 of yacc.c */ -#line 460 "parse-datetime.y" - { - /* ISO 8601 format. YYYY-MM-DD. */ - pc->year = (yyvsp[(1) - (3)].textintval); - pc->month = -(yyvsp[(2) - (3)].textintval).value; - pc->day = -(yyvsp[(3) - (3)].textintval).value; - } - break; - - case 34: - -/* Line 1455 of yacc.c */ -#line 467 "parse-datetime.y" - { - /* e.g. 17-JUN-1992. */ - pc->day = (yyvsp[(1) - (3)].textintval).value; - pc->month = (yyvsp[(2) - (3)].intval); - pc->year.value = -(yyvsp[(3) - (3)].textintval).value; - pc->year.digits = (yyvsp[(3) - (3)].textintval).digits; - } - break; - - case 35: - -/* Line 1455 of yacc.c */ -#line 475 "parse-datetime.y" - { - /* e.g. JUN-17-1992. */ - pc->month = (yyvsp[(1) - (3)].intval); - pc->day = -(yyvsp[(2) - (3)].textintval).value; - pc->year.value = -(yyvsp[(3) - (3)].textintval).value; - pc->year.digits = (yyvsp[(3) - (3)].textintval).digits; - } - break; - - case 36: - -/* Line 1455 of yacc.c */ -#line 483 "parse-datetime.y" - { - pc->month = (yyvsp[(1) - (2)].intval); - pc->day = (yyvsp[(2) - (2)].textintval).value; - } - break; - - case 37: - -/* Line 1455 of yacc.c */ -#line 488 "parse-datetime.y" - { - pc->month = (yyvsp[(1) - (4)].intval); - pc->day = (yyvsp[(2) - (4)].textintval).value; - pc->year = (yyvsp[(4) - (4)].textintval); - } - break; - - case 38: - -/* Line 1455 of yacc.c */ -#line 494 "parse-datetime.y" - { - pc->day = (yyvsp[(1) - (2)].textintval).value; - pc->month = (yyvsp[(2) - (2)].intval); - } - break; - - case 39: - -/* Line 1455 of yacc.c */ -#line 499 "parse-datetime.y" - { - pc->day = (yyvsp[(1) - (3)].textintval).value; - pc->month = (yyvsp[(2) - (3)].intval); - pc->year = (yyvsp[(3) - (3)].textintval); - } - break; - - case 40: - -/* Line 1455 of yacc.c */ -#line 508 "parse-datetime.y" - { apply_relative_time (pc, (yyvsp[(1) - (2)].rel), -1); } - break; - - case 41: - -/* Line 1455 of yacc.c */ -#line 510 "parse-datetime.y" - { apply_relative_time (pc, (yyvsp[(1) - (1)].rel), 1); } - break; - - case 42: - -/* Line 1455 of yacc.c */ -#line 512 "parse-datetime.y" - { apply_relative_time (pc, (yyvsp[(1) - (1)].rel), 1); } - break; - - case 43: - -/* Line 1455 of yacc.c */ -#line 517 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].intval); } - break; - - case 44: - -/* Line 1455 of yacc.c */ -#line 519 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; } - break; - - case 45: - -/* Line 1455 of yacc.c */ -#line 521 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = 1; } - break; - - case 46: - -/* Line 1455 of yacc.c */ -#line 523 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].intval); } - break; - - case 47: - -/* Line 1455 of yacc.c */ -#line 525 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; } - break; - - case 48: - -/* Line 1455 of yacc.c */ -#line 527 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = 1; } - break; - - case 49: - -/* Line 1455 of yacc.c */ -#line 529 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].intval) * (yyvsp[(2) - (2)].intval); } - break; - - case 50: - -/* Line 1455 of yacc.c */ -#line 531 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); } - break; - - case 51: - -/* Line 1455 of yacc.c */ -#line 533 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (1)].intval); } - break; - - case 52: - -/* Line 1455 of yacc.c */ -#line 535 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].intval); } - break; - - case 53: - -/* Line 1455 of yacc.c */ -#line 537 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; } - break; - - case 54: - -/* Line 1455 of yacc.c */ -#line 539 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = 1; } - break; - - case 55: - -/* Line 1455 of yacc.c */ -#line 541 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].intval); } - break; - - case 56: - -/* Line 1455 of yacc.c */ -#line 543 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; } - break; - - case 57: - -/* Line 1455 of yacc.c */ -#line 545 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = 1; } - break; - - case 58: - -/* Line 1455 of yacc.c */ -#line 547 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].intval); } - break; - - case 59: - -/* Line 1455 of yacc.c */ -#line 549 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; } - break; - - case 60: - -/* Line 1455 of yacc.c */ -#line 551 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; } - break; - - case 61: - -/* Line 1455 of yacc.c */ -#line 553 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].timespec).tv_sec; (yyval.rel).ns = (yyvsp[(1) - (2)].timespec).tv_nsec; } - break; - - case 62: - -/* Line 1455 of yacc.c */ -#line 555 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = 1; } - break; - - case 64: - -/* Line 1455 of yacc.c */ -#line 561 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[(1) - (2)].textintval).value; } - break; - - case 65: - -/* Line 1455 of yacc.c */ -#line 563 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[(1) - (2)].textintval).value; } - break; - - case 66: - -/* Line 1455 of yacc.c */ -#line 565 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (2)].textintval).value * (yyvsp[(2) - (2)].intval); } - break; - - case 67: - -/* Line 1455 of yacc.c */ -#line 567 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[(1) - (2)].textintval).value; } - break; - - case 68: - -/* Line 1455 of yacc.c */ -#line 569 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[(1) - (2)].textintval).value; } - break; - - case 69: - -/* Line 1455 of yacc.c */ -#line 571 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[(1) - (2)].textintval).value; } - break; - - case 70: - -/* Line 1455 of yacc.c */ -#line 576 "parse-datetime.y" - { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[(1) - (1)].intval); } - break; - - case 74: - -/* Line 1455 of yacc.c */ -#line 584 "parse-datetime.y" - { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; } - break; - - case 76: - -/* Line 1455 of yacc.c */ -#line 590 "parse-datetime.y" - { (yyval.timespec).tv_sec = (yyvsp[(1) - (1)].textintval).value; (yyval.timespec).tv_nsec = 0; } - break; - - case 77: - -/* Line 1455 of yacc.c */ -#line 595 "parse-datetime.y" - { digits_to_date_time (pc, (yyvsp[(1) - (1)].textintval)); } - break; - - case 78: - -/* Line 1455 of yacc.c */ -#line 600 "parse-datetime.y" - { - /* Hybrid all-digit and relative offset, so that we accept e.g., - "YYYYMMDD +N days" as well as "YYYYMMDD N days". */ - digits_to_date_time (pc, (yyvsp[(1) - (2)].textintval)); - apply_relative_time (pc, (yyvsp[(2) - (2)].rel), 1); - } - break; - - case 79: - -/* Line 1455 of yacc.c */ -#line 610 "parse-datetime.y" - { (yyval.intval) = -1; } - break; - - case 80: - -/* Line 1455 of yacc.c */ -#line 612 "parse-datetime.y" - { (yyval.intval) = (yyvsp[(2) - (2)].textintval).value; } - break; - - case 81: - -/* Line 1455 of yacc.c */ -#line 617 "parse-datetime.y" - { (yyval.intval) = MER24; } - break; - - case 82: - -/* Line 1455 of yacc.c */ -#line 619 "parse-datetime.y" - { (yyval.intval) = (yyvsp[(1) - (1)].intval); } - break; - - - -/* Line 1455 of yacc.c */ -#line 2334 "parse-datetime.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (pc, YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (pc, yymsg); - } - else - { - yyerror (pc, YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, pc); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp, pc); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (pc, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, pc); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, pc); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - -/* Line 1675 of yacc.c */ -#line 622 "parse-datetime.y" - - -static table const meridian_table[] = -{ - { "AM", tMERIDIAN, MERam }, - { "A.M.", tMERIDIAN, MERam }, - { "PM", tMERIDIAN, MERpm }, - { "P.M.", tMERIDIAN, MERpm }, - { NULL, 0, 0 } -}; - -static table const dst_table[] = -{ - { "DST", tDST, 0 } -}; - -static table const month_and_day_table[] = -{ - { "JANUARY", tMONTH, 1 }, - { "FEBRUARY", tMONTH, 2 }, - { "MARCH", tMONTH, 3 }, - { "APRIL", tMONTH, 4 }, - { "MAY", tMONTH, 5 }, - { "JUNE", tMONTH, 6 }, - { "JULY", tMONTH, 7 }, - { "AUGUST", tMONTH, 8 }, - { "SEPTEMBER",tMONTH, 9 }, - { "SEPT", tMONTH, 9 }, - { "OCTOBER", tMONTH, 10 }, - { "NOVEMBER", tMONTH, 11 }, - { "DECEMBER", tMONTH, 12 }, - { "SUNDAY", tDAY, 0 }, - { "MONDAY", tDAY, 1 }, - { "TUESDAY", tDAY, 2 }, - { "TUES", tDAY, 2 }, - { "WEDNESDAY",tDAY, 3 }, - { "WEDNES", tDAY, 3 }, - { "THURSDAY", tDAY, 4 }, - { "THUR", tDAY, 4 }, - { "THURS", tDAY, 4 }, - { "FRIDAY", tDAY, 5 }, - { "SATURDAY", tDAY, 6 }, - { NULL, 0, 0 } -}; - -static table const time_units_table[] = -{ - { "YEAR", tYEAR_UNIT, 1 }, - { "MONTH", tMONTH_UNIT, 1 }, - { "FORTNIGHT",tDAY_UNIT, 14 }, - { "WEEK", tDAY_UNIT, 7 }, - { "DAY", tDAY_UNIT, 1 }, - { "HOUR", tHOUR_UNIT, 1 }, - { "MINUTE", tMINUTE_UNIT, 1 }, - { "MIN", tMINUTE_UNIT, 1 }, - { "SECOND", tSEC_UNIT, 1 }, - { "SEC", tSEC_UNIT, 1 }, - { NULL, 0, 0 } -}; - -/* Assorted relative-time words. */ -static table const relative_time_table[] = -{ - { "TOMORROW", tDAY_SHIFT, 1 }, - { "YESTERDAY",tDAY_SHIFT, -1 }, - { "TODAY", tDAY_SHIFT, 0 }, - { "NOW", tDAY_SHIFT, 0 }, - { "LAST", tORDINAL, -1 }, - { "THIS", tORDINAL, 0 }, - { "NEXT", tORDINAL, 1 }, - { "FIRST", tORDINAL, 1 }, -/*{ "SECOND", tORDINAL, 2 }, */ - { "THIRD", tORDINAL, 3 }, - { "FOURTH", tORDINAL, 4 }, - { "FIFTH", tORDINAL, 5 }, - { "SIXTH", tORDINAL, 6 }, - { "SEVENTH", tORDINAL, 7 }, - { "EIGHTH", tORDINAL, 8 }, - { "NINTH", tORDINAL, 9 }, - { "TENTH", tORDINAL, 10 }, - { "ELEVENTH", tORDINAL, 11 }, - { "TWELFTH", tORDINAL, 12 }, - { "AGO", tAGO, 1 }, - { NULL, 0, 0 } -}; - -/* The universal time zone table. These labels can be used even for - time stamps that would not otherwise be valid, e.g., GMT time - stamps in London during summer. */ -static table const universal_time_zone_table[] = -{ - { "GMT", tZONE, HOUR ( 0) }, /* Greenwich Mean */ - { "UT", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ - { "UTC", tZONE, HOUR ( 0) }, - { NULL, 0, 0 } -}; - -/* The time zone table. This table is necessarily incomplete, as time - zone abbreviations are ambiguous; e.g. Australians interpret "EST" - as Eastern time in Australia, not as US Eastern Standard Time. - You cannot rely on parse_datetime to handle arbitrary time zone - abbreviations; use numeric abbreviations like `-0500' instead. */ -static table const time_zone_table[] = -{ - { "WET", tZONE, HOUR ( 0) }, /* Western European */ - { "WEST", tDAYZONE, HOUR ( 0) }, /* Western European Summer */ - { "BST", tDAYZONE, HOUR ( 0) }, /* British Summer */ - { "ART", tZONE, -HOUR ( 3) }, /* Argentina */ - { "BRT", tZONE, -HOUR ( 3) }, /* Brazil */ - { "BRST", tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */ - { "NST", tZONE, -(HOUR ( 3) + 30) }, /* Newfoundland Standard */ - { "NDT", tDAYZONE,-(HOUR ( 3) + 30) }, /* Newfoundland Daylight */ - { "AST", tZONE, -HOUR ( 4) }, /* Atlantic Standard */ - { "ADT", tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */ - { "CLT", tZONE, -HOUR ( 4) }, /* Chile */ - { "CLST", tDAYZONE, -HOUR ( 4) }, /* Chile Summer */ - { "EST", tZONE, -HOUR ( 5) }, /* Eastern Standard */ - { "EDT", tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */ - { "CST", tZONE, -HOUR ( 6) }, /* Central Standard */ - { "CDT", tDAYZONE, -HOUR ( 6) }, /* Central Daylight */ - { "MST", tZONE, -HOUR ( 7) }, /* Mountain Standard */ - { "MDT", tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */ - { "PST", tZONE, -HOUR ( 8) }, /* Pacific Standard */ - { "PDT", tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */ - { "AKST", tZONE, -HOUR ( 9) }, /* Alaska Standard */ - { "AKDT", tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */ - { "HST", tZONE, -HOUR (10) }, /* Hawaii Standard */ - { "HAST", tZONE, -HOUR (10) }, /* Hawaii-Aleutian Standard */ - { "HADT", tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */ - { "SST", tZONE, -HOUR (12) }, /* Samoa Standard */ - { "WAT", tZONE, HOUR ( 1) }, /* West Africa */ - { "CET", tZONE, HOUR ( 1) }, /* Central European */ - { "CEST", tDAYZONE, HOUR ( 1) }, /* Central European Summer */ - { "MET", tZONE, HOUR ( 1) }, /* Middle European */ - { "MEZ", tZONE, HOUR ( 1) }, /* Middle European */ - { "MEST", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ - { "MESZ", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ - { "EET", tZONE, HOUR ( 2) }, /* Eastern European */ - { "EEST", tDAYZONE, HOUR ( 2) }, /* Eastern European Summer */ - { "CAT", tZONE, HOUR ( 2) }, /* Central Africa */ - { "SAST", tZONE, HOUR ( 2) }, /* South Africa Standard */ - { "EAT", tZONE, HOUR ( 3) }, /* East Africa */ - { "MSK", tZONE, HOUR ( 3) }, /* Moscow */ - { "MSD", tDAYZONE, HOUR ( 3) }, /* Moscow Daylight */ - { "IST", tZONE, (HOUR ( 5) + 30) }, /* India Standard */ - { "SGT", tZONE, HOUR ( 8) }, /* Singapore */ - { "KST", tZONE, HOUR ( 9) }, /* Korea Standard */ - { "JST", tZONE, HOUR ( 9) }, /* Japan Standard */ - { "GST", tZONE, HOUR (10) }, /* Guam Standard */ - { "NZST", tZONE, HOUR (12) }, /* New Zealand Standard */ - { "NZDT", tDAYZONE, HOUR (12) }, /* New Zealand Daylight */ - { NULL, 0, 0 } -}; - -/* Military time zone table. */ -static table const military_table[] = -{ - { "A", tZONE, -HOUR ( 1) }, - { "B", tZONE, -HOUR ( 2) }, - { "C", tZONE, -HOUR ( 3) }, - { "D", tZONE, -HOUR ( 4) }, - { "E", tZONE, -HOUR ( 5) }, - { "F", tZONE, -HOUR ( 6) }, - { "G", tZONE, -HOUR ( 7) }, - { "H", tZONE, -HOUR ( 8) }, - { "I", tZONE, -HOUR ( 9) }, - { "K", tZONE, -HOUR (10) }, - { "L", tZONE, -HOUR (11) }, - { "M", tZONE, -HOUR (12) }, - { "N", tZONE, HOUR ( 1) }, - { "O", tZONE, HOUR ( 2) }, - { "P", tZONE, HOUR ( 3) }, - { "Q", tZONE, HOUR ( 4) }, - { "R", tZONE, HOUR ( 5) }, - { "S", tZONE, HOUR ( 6) }, - { "T", tZONE, HOUR ( 7) }, - { "U", tZONE, HOUR ( 8) }, - { "V", tZONE, HOUR ( 9) }, - { "W", tZONE, HOUR (10) }, - { "X", tZONE, HOUR (11) }, - { "Y", tZONE, HOUR (12) }, - { "Z", tZONE, HOUR ( 0) }, - { NULL, 0, 0 } -}; - - - -/* Convert a time zone expressed as HH:MM into an integer count of - minutes. If MM is negative, then S is of the form HHMM and needs - to be picked apart; otherwise, S is of the form HH. As specified in - http://www.opengroup.org/susv3xbd/xbd_chap08.html#tag_08_03, allow - only valid TZ range, and consider first two digits as hours, if no - minutes specified. */ - -static long int -time_zone_hhmm (parser_control *pc, textint s, long int mm) -{ - long int n_minutes; - - /* If the length of S is 1 or 2 and no minutes are specified, - interpret it as a number of hours. */ - if (s.digits <= 2 && mm < 0) - s.value *= 100; - - if (mm < 0) - n_minutes = (s.value / 100) * 60 + s.value % 100; - else - n_minutes = s.value * 60 + (s.negative ? -mm : mm); - - /* If the absolute number of minutes is larger than 24 hours, - arrange to reject it by incrementing pc->zones_seen. Thus, - we allow only values in the range UTC-24:00 to UTC+24:00. */ - if (24 * 60 < abs (n_minutes)) - pc->zones_seen++; - - return n_minutes; -} - -static int -to_hour (long int hours, int meridian) -{ - switch (meridian) - { - default: /* Pacify GCC. */ - case MER24: - return 0 <= hours && hours < 24 ? hours : -1; - case MERam: - return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1; - case MERpm: - return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1; - } -} - -static long int -to_year (textint textyear) -{ - long int year = textyear.value; - - if (year < 0) - year = -year; - - /* XPG4 suggests that years 00-68 map to 2000-2068, and - years 69-99 map to 1969-1999. */ - else if (textyear.digits == 2) - year += year < 69 ? 2000 : 1900; - - return year; -} - -static table const * -lookup_zone (parser_control const *pc, char const *name) -{ - table const *tp; - - for (tp = universal_time_zone_table; tp->name; tp++) - if (strcmp (name, tp->name) == 0) - return tp; - - /* Try local zone abbreviations before those in time_zone_table, as - the local ones are more likely to be right. */ - for (tp = pc->local_time_zone_table; tp->name; tp++) - if (strcmp (name, tp->name) == 0) - return tp; - - for (tp = time_zone_table; tp->name; tp++) - if (strcmp (name, tp->name) == 0) - return tp; - - return NULL; -} - -#if ! HAVE_TM_GMTOFF -/* Yield the difference between *A and *B, - measured in seconds, ignoring leap seconds. - The body of this function is taken directly from the GNU C Library; - see src/strftime.c. */ -static long int -tm_diff (struct tm const *a, struct tm const *b) -{ - /* Compute intervening leap days correctly even if year is negative. - Take care to avoid int overflow in leap day calculations. */ - int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); - int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); - int a100 = a4 / 25 - (a4 % 25 < 0); - int b100 = b4 / 25 - (b4 % 25 < 0); - int a400 = SHR (a100, 2); - int b400 = SHR (b100, 2); - int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); - long int ayear = a->tm_year; - long int years = ayear - b->tm_year; - long int days = (365 * years + intervening_leap_days - + (a->tm_yday - b->tm_yday)); - return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) - + (a->tm_min - b->tm_min)) - + (a->tm_sec - b->tm_sec)); -} -#endif /* ! HAVE_TM_GMTOFF */ - -static table const * -lookup_word (parser_control const *pc, char *word) -{ - char *p; - char *q; - size_t wordlen; - table const *tp; - bool period_found; - bool abbrev; - - /* Make it uppercase. */ - for (p = word; *p; p++) - { - unsigned char ch = *p; - *p = c_toupper (ch); - } - - for (tp = meridian_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - - /* See if we have an abbreviation for a month. */ - wordlen = strlen (word); - abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.'); - - for (tp = month_and_day_table; tp->name; tp++) - if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0) - return tp; - - if ((tp = lookup_zone (pc, word))) - return tp; - - if (strcmp (word, dst_table[0].name) == 0) - return dst_table; - - for (tp = time_units_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - - /* Strip off any plural and try the units table again. */ - if (word[wordlen - 1] == 'S') - { - word[wordlen - 1] = '\0'; - for (tp = time_units_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - word[wordlen - 1] = 'S'; /* For "this" in relative_time_table. */ - } - - for (tp = relative_time_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - - /* Military time zones. */ - if (wordlen == 1) - for (tp = military_table; tp->name; tp++) - if (word[0] == tp->name[0]) - return tp; - - /* Drop out any periods and try the time zone table again. */ - for (period_found = false, p = q = word; (*p = *q); q++) - if (*q == '.') - period_found = true; - else - p++; - if (period_found && (tp = lookup_zone (pc, word))) - return tp; - - return NULL; -} - -static int -yylex (YYSTYPE *lvalp, parser_control *pc) -{ - unsigned char c; - size_t count; - - for (;;) - { - while (c = *pc->input, c_isspace (c)) - pc->input++; - - if (ISDIGIT (c) || c == '-' || c == '+') - { - char const *p; - int sign; - unsigned long int value; - if (c == '-' || c == '+') - { - sign = c == '-' ? -1 : 1; - while (c = *++pc->input, c_isspace (c)) - continue; - if (! ISDIGIT (c)) - /* skip the '-' sign */ - continue; - } - else - sign = 0; - p = pc->input; - for (value = 0; ; value *= 10) - { - unsigned long int value1 = value + (c - '0'); - if (value1 < value) - return '?'; - value = value1; - c = *++p; - if (! ISDIGIT (c)) - break; - if (ULONG_MAX / 10 < value) - return '?'; - } - if ((c == '.' || c == ',') && ISDIGIT (p[1])) - { - time_t s; - int ns; - int digits; - unsigned long int value1; - - /* Check for overflow when converting value to time_t. */ - if (sign < 0) - { - s = - value; - if (0 < s) - return '?'; - value1 = -s; - } - else - { - s = value; - if (s < 0) - return '?'; - value1 = s; - } - if (value != value1) - return '?'; - - /* Accumulate fraction, to ns precision. */ - p++; - ns = *p++ - '0'; - for (digits = 2; digits <= LOG10_BILLION; digits++) - { - ns *= 10; - if (ISDIGIT (*p)) - ns += *p++ - '0'; - } - - /* Skip excess digits, truncating toward -Infinity. */ - if (sign < 0) - for (; ISDIGIT (*p); p++) - if (*p != '0') - { - ns++; - break; - } - while (ISDIGIT (*p)) - p++; - - /* Adjust to the timespec convention, which is that - tv_nsec is always a positive offset even if tv_sec is - negative. */ - if (sign < 0 && ns) - { - s--; - if (! (s < 0)) - return '?'; - ns = BILLION - ns; - } - - lvalp->timespec.tv_sec = s; - lvalp->timespec.tv_nsec = ns; - pc->input = p; - return sign ? tSDECIMAL_NUMBER : tUDECIMAL_NUMBER; - } - else - { - lvalp->textintval.negative = sign < 0; - if (sign < 0) - { - lvalp->textintval.value = - value; - if (0 < lvalp->textintval.value) - return '?'; - } - else - { - lvalp->textintval.value = value; - if (lvalp->textintval.value < 0) - return '?'; - } - lvalp->textintval.digits = p - pc->input; - pc->input = p; - return sign ? tSNUMBER : tUNUMBER; - } - } - - if (c_isalpha (c)) - { - char buff[20]; - char *p = buff; - table const *tp; - - do - { - if (p < buff + sizeof buff - 1) - *p++ = c; - c = *++pc->input; - } - while (c_isalpha (c) || c == '.'); - - *p = '\0'; - tp = lookup_word (pc, buff); - if (! tp) - return '?'; - lvalp->intval = tp->value; - return tp->type; - } - - if (c != '(') - return *pc->input++; - count = 0; - do - { - c = *pc->input++; - if (c == '\0') - return c; - if (c == '(') - count++; - else if (c == ')') - count--; - } - while (count != 0); - } -} - -/* Do nothing if the parser reports an error. */ -static int -yyerror (parser_control const *pc _GL_UNUSED, - char const *s _GL_UNUSED) -{ - return 0; -} - -/* If *TM0 is the old and *TM1 is the new value of a struct tm after - passing it to mktime, return true if it's OK that mktime returned T. - It's not OK if *TM0 has out-of-range members. */ - -static bool -mktime_ok (struct tm const *tm0, struct tm const *tm1, time_t t) -{ - if (t == (time_t) -1) - { - /* Guard against falsely reporting an error when parsing a time - stamp that happens to equal (time_t) -1, on a host that - supports such a time stamp. */ - tm1 = localtime (&t); - if (!tm1) - return false; - } - - return ! ((tm0->tm_sec ^ tm1->tm_sec) - | (tm0->tm_min ^ tm1->tm_min) - | (tm0->tm_hour ^ tm1->tm_hour) - | (tm0->tm_mday ^ tm1->tm_mday) - | (tm0->tm_mon ^ tm1->tm_mon) - | (tm0->tm_year ^ tm1->tm_year)); -} - -/* A reasonable upper bound for the size of ordinary TZ strings. - Use heap allocation if TZ's length exceeds this. */ -enum { TZBUFSIZE = 100 }; - -/* Return a copy of TZ, stored in TZBUF if it fits, and heap-allocated - otherwise. */ -static char * -get_tz (char tzbuf[TZBUFSIZE]) -{ - char *tz = getenv ("TZ"); - if (tz) - { - size_t tzsize = strlen (tz) + 1; - tz = (tzsize <= TZBUFSIZE - ? memcpy (tzbuf, tz, tzsize) - : xmemdup (tz, tzsize)); - } - return tz; -} - -/* Parse a date/time string, storing the resulting time value into *RESULT. - The string itself is pointed to by P. Return true if successful. - P can be an incomplete or relative time specification; if so, use - *NOW as the basis for the returned time. */ -bool -parse_datetime (struct timespec *result, char const *p, - struct timespec const *now) -{ - time_t Start; - long int Start_ns; - struct tm const *tmp; - struct tm tm; - struct tm tm0; - parser_control pc; - struct timespec gettime_buffer; - unsigned char c; - bool tz_was_altered = false; - char *tz0 = NULL; - char tz0buf[TZBUFSIZE]; - bool ok = true; - - if (! now) - { - gettime (&gettime_buffer); - now = &gettime_buffer; - } - - Start = now->tv_sec; - Start_ns = now->tv_nsec; - - tmp = localtime (&now->tv_sec); - if (! tmp) - return false; - - while (c = *p, c_isspace (c)) - p++; - - if (strncmp (p, "TZ=\"", 4) == 0) - { - char const *tzbase = p + 4; - size_t tzsize = 1; - char const *s; - - for (s = tzbase; *s; s++, tzsize++) - if (*s == '\\') - { - s++; - if (! (*s == '\\' || *s == '"')) - break; - } - else if (*s == '"') - { - char *z; - char *tz1; - char tz1buf[TZBUFSIZE]; - bool large_tz = TZBUFSIZE < tzsize; - bool setenv_ok; - /* Free tz0, in case this is the 2nd or subsequent time through. */ - free (tz0); - tz0 = get_tz (tz0buf); - z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf; - for (s = tzbase; *s != '"'; s++) - *z++ = *(s += *s == '\\'); - *z = '\0'; - setenv_ok = setenv ("TZ", tz1, 1) == 0; - if (large_tz) - free (tz1); - if (!setenv_ok) - goto fail; - tz_was_altered = true; - p = s + 1; - } - } - - /* As documented, be careful to treat the empty string just like - a date string of "0". Without this, an empty string would be - declared invalid when parsed during a DST transition. */ - if (*p == '\0') - p = "0"; - - pc.input = p; - pc.year.value = tmp->tm_year; - pc.year.value += TM_YEAR_BASE; - pc.year.digits = 0; - pc.month = tmp->tm_mon + 1; - pc.day = tmp->tm_mday; - pc.hour = tmp->tm_hour; - pc.minutes = tmp->tm_min; - pc.seconds.tv_sec = tmp->tm_sec; - pc.seconds.tv_nsec = Start_ns; - tm.tm_isdst = tmp->tm_isdst; - - pc.meridian = MER24; - pc.rel = RELATIVE_TIME_0; - pc.timespec_seen = false; - pc.rels_seen = false; - pc.dates_seen = 0; - pc.days_seen = 0; - pc.times_seen = 0; - pc.local_zones_seen = 0; - pc.dsts_seen = 0; - pc.zones_seen = 0; - -#if HAVE_STRUCT_TM_TM_ZONE - pc.local_time_zone_table[0].name = tmp->tm_zone; - pc.local_time_zone_table[0].type = tLOCAL_ZONE; - pc.local_time_zone_table[0].value = tmp->tm_isdst; - pc.local_time_zone_table[1].name = NULL; - - /* Probe the names used in the next three calendar quarters, looking - for a tm_isdst different from the one we already have. */ - { - int quarter; - for (quarter = 1; quarter <= 3; quarter++) - { - time_t probe = Start + quarter * (90 * 24 * 60 * 60); - struct tm const *probe_tm = localtime (&probe); - if (probe_tm && probe_tm->tm_zone - && probe_tm->tm_isdst != pc.local_time_zone_table[0].value) - { - { - pc.local_time_zone_table[1].name = probe_tm->tm_zone; - pc.local_time_zone_table[1].type = tLOCAL_ZONE; - pc.local_time_zone_table[1].value = probe_tm->tm_isdst; - pc.local_time_zone_table[2].name = NULL; - } - break; - } - } - } -#else -#if HAVE_TZNAME - { -# if !HAVE_DECL_TZNAME - extern char *tzname[]; -# endif - int i; - for (i = 0; i < 2; i++) - { - pc.local_time_zone_table[i].name = tzname[i]; - pc.local_time_zone_table[i].type = tLOCAL_ZONE; - pc.local_time_zone_table[i].value = i; - } - pc.local_time_zone_table[i].name = NULL; - } -#else - pc.local_time_zone_table[0].name = NULL; -#endif -#endif - - if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name - && ! strcmp (pc.local_time_zone_table[0].name, - pc.local_time_zone_table[1].name)) - { - /* This locale uses the same abbrevation for standard and - daylight times. So if we see that abbreviation, we don't - know whether it's daylight time. */ - pc.local_time_zone_table[0].value = -1; - pc.local_time_zone_table[1].name = NULL; - } - - if (yyparse (&pc) != 0) - goto fail; - - if (pc.timespec_seen) - *result = pc.seconds; - else - { - if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen - | (pc.local_zones_seen + pc.zones_seen))) - goto fail; - - tm.tm_year = to_year (pc.year) - TM_YEAR_BASE; - tm.tm_mon = pc.month - 1; - tm.tm_mday = pc.day; - if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen)) - { - tm.tm_hour = to_hour (pc.hour, pc.meridian); - if (tm.tm_hour < 0) - goto fail; - tm.tm_min = pc.minutes; - tm.tm_sec = pc.seconds.tv_sec; - } - else - { - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - pc.seconds.tv_nsec = 0; - } - - /* Let mktime deduce tm_isdst if we have an absolute time stamp. */ - if (pc.dates_seen | pc.days_seen | pc.times_seen) - tm.tm_isdst = -1; - - /* But if the input explicitly specifies local time with or without - DST, give mktime that information. */ - if (pc.local_zones_seen) - tm.tm_isdst = pc.local_isdst; - - tm0 = tm; - - Start = mktime (&tm); - - if (! mktime_ok (&tm0, &tm, Start)) - { - if (! pc.zones_seen) - goto fail; - else - { - /* Guard against falsely reporting errors near the time_t - boundaries when parsing times in other time zones. For - example, suppose the input string "1969-12-31 23:00:00 -0100", - the current time zone is 8 hours ahead of UTC, and the min - time_t value is 1970-01-01 00:00:00 UTC. Then the min - localtime value is 1970-01-01 08:00:00, and mktime will - therefore fail on 1969-12-31 23:00:00. To work around the - problem, set the time zone to 1 hour behind UTC temporarily - by setting TZ="XXX1:00" and try mktime again. */ - - long int time_zone = pc.time_zone; - long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone; - long int abs_time_zone_hour = abs_time_zone / 60; - int abs_time_zone_min = abs_time_zone % 60; - char tz1buf[sizeof "XXX+0:00" - + sizeof pc.time_zone * CHAR_BIT / 3]; - if (!tz_was_altered) - tz0 = get_tz (tz0buf); - sprintf (tz1buf, "XXX%s%ld:%02d", "-" + (time_zone < 0), - abs_time_zone_hour, abs_time_zone_min); - if (setenv ("TZ", tz1buf, 1) != 0) - goto fail; - tz_was_altered = true; - tm = tm0; - Start = mktime (&tm); - if (! mktime_ok (&tm0, &tm, Start)) - goto fail; - } - } - - if (pc.days_seen && ! pc.dates_seen) - { - tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7 - + 7 * (pc.day_ordinal - - (0 < pc.day_ordinal - && tm.tm_wday != pc.day_number))); - tm.tm_isdst = -1; - Start = mktime (&tm); - if (Start == (time_t) -1) - goto fail; - } - - /* Add relative date. */ - if (pc.rel.year | pc.rel.month | pc.rel.day) - { - int year = tm.tm_year + pc.rel.year; - int month = tm.tm_mon + pc.rel.month; - int day = tm.tm_mday + pc.rel.day; - if (((year < tm.tm_year) ^ (pc.rel.year < 0)) - | ((month < tm.tm_mon) ^ (pc.rel.month < 0)) - | ((day < tm.tm_mday) ^ (pc.rel.day < 0))) - goto fail; - tm.tm_year = year; - tm.tm_mon = month; - tm.tm_mday = day; - tm.tm_hour = tm0.tm_hour; - tm.tm_min = tm0.tm_min; - tm.tm_sec = tm0.tm_sec; - tm.tm_isdst = tm0.tm_isdst; - Start = mktime (&tm); - if (Start == (time_t) -1) - goto fail; - } - - /* The only "output" of this if-block is an updated Start value, - so this block must follow others that clobber Start. */ - if (pc.zones_seen) - { - long int delta = pc.time_zone * 60; - time_t t1; -#ifdef HAVE_TM_GMTOFF - delta -= tm.tm_gmtoff; -#else - time_t t = Start; - struct tm const *gmt = gmtime (&t); - if (! gmt) - goto fail; - delta -= tm_diff (&tm, gmt); -#endif - t1 = Start - delta; - if ((Start < t1) != (delta < 0)) - goto fail; /* time_t overflow */ - Start = t1; - } - - /* Add relative hours, minutes, and seconds. On hosts that support - leap seconds, ignore the possibility of leap seconds; e.g., - "+ 10 minutes" adds 600 seconds, even if one of them is a - leap second. Typically this is not what the user wants, but it's - too hard to do it the other way, because the time zone indicator - must be applied before relative times, and if mktime is applied - again the time zone will be lost. */ - { - long int sum_ns = pc.seconds.tv_nsec + pc.rel.ns; - long int normalized_ns = (sum_ns % BILLION + BILLION) % BILLION; - time_t t0 = Start; - long int d1 = 60 * 60 * pc.rel.hour; - time_t t1 = t0 + d1; - long int d2 = 60 * pc.rel.minutes; - time_t t2 = t1 + d2; - long_time_t d3 = pc.rel.seconds; - long_time_t t3 = t2 + d3; - long int d4 = (sum_ns - normalized_ns) / BILLION; - long_time_t t4 = t3 + d4; - time_t t5 = t4; - - if ((d1 / (60 * 60) ^ pc.rel.hour) - | (d2 / 60 ^ pc.rel.minutes) - | ((t1 < t0) ^ (d1 < 0)) - | ((t2 < t1) ^ (d2 < 0)) - | ((t3 < t2) ^ (d3 < 0)) - | ((t4 < t3) ^ (d4 < 0)) - | (t5 != t4)) - goto fail; - - result->tv_sec = t5; - result->tv_nsec = normalized_ns; - } - } - - goto done; - - fail: - ok = false; - done: - if (tz_was_altered) - ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0; - if (tz0 != tz0buf) - free (tz0); - return ok; -} - -#if TEST - -int -main (int ac, char **av) -{ - char buff[BUFSIZ]; - - printf ("Enter date, or blank line to exit.\n\t> "); - fflush (stdout); - - buff[BUFSIZ - 1] = '\0'; - while (fgets (buff, BUFSIZ - 1, stdin) && buff[0]) - { - struct timespec d; - struct tm const *tm; - if (! parse_datetime (&d, buff, NULL)) - printf ("Bad format - couldn't convert.\n"); - else if (! (tm = localtime (&d.tv_sec))) - { - long int sec = d.tv_sec; - printf ("localtime (%ld) failed\n", sec); - } - else - { - int ns = d.tv_nsec; - printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n", - tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec, ns); - } - printf ("\t> "); - fflush (stdout); - } - return 0; -} -#endif /* TEST */ - diff --git a/gnulib/lib/parse-datetime.h b/gnulib/lib/parse-datetime.h deleted file mode 100644 index e1df247..0000000 --- a/gnulib/lib/parse-datetime.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Parse a string into an internal time stamp. - - Copyright (C) 1995, 1997-1998, 2003-2004, 2007, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include -#include - -bool parse_datetime (struct timespec *, char const *, struct timespec const *); diff --git a/gnulib/lib/parse-datetime.y b/gnulib/lib/parse-datetime.y deleted file mode 100644 index d77955f..0000000 --- a/gnulib/lib/parse-datetime.y +++ /dev/null @@ -1,1580 +0,0 @@ -%{ -/* Parse a string into an internal time stamp. - - Copyright (C) 1999-2000, 2002-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Originally written by Steven M. Bellovin while - at the University of North Carolina at Chapel Hill. Later tweaked by - a couple of people on Usenet. Completely overhauled by Rich $alz - and Jim Berets in August, 1990. - - Modified by Paul Eggert in August 1999 to do - the right thing about local DST. Also modified by Paul Eggert - in February 2004 to support - nanosecond-resolution time stamps, and in October 2004 to support - TZ strings in dates. */ - -/* FIXME: Check for arithmetic overflow in all cases, not just - some of them. */ - -#include - -#include "parse-datetime.h" - -#include "intprops.h" -#include "timespec.h" -#include "verify.h" - -/* There's no need to extend the stack, so there's no need to involve - alloca. */ -#define YYSTACK_USE_ALLOCA 0 - -/* Tell Bison how much stack space is needed. 20 should be plenty for - this grammar, which is not right recursive. Beware setting it too - high, since that might cause problems on machines whose - implementations have lame stack-overflow checking. */ -#define YYMAXDEPTH 20 -#define YYINITDEPTH YYMAXDEPTH - -/* Since the code of parse-datetime.y is not included in the Emacs executable - itself, there is no need to #define static in this file. Even if - the code were included in the Emacs executable, it probably - wouldn't do any harm to #undef it here; this will only cause - problems if we try to write to a static variable, which I don't - think this code needs to do. */ -#ifdef emacs -# undef static -#endif - -#include -#include -#include -#include -#include - -#include "xalloc.h" - -/* Bison's skeleton tests _STDLIB_H, while some stdlib.h headers - use _STDLIB_H_ as witness. Map the latter to the one bison uses. */ -/* FIXME: this is temporary. Remove when we have a mechanism to ensure - that the version we're using is fixed, too. */ -#ifdef _STDLIB_H_ -# undef _STDLIB_H -# define _STDLIB_H 1 -#endif - -/* ISDIGIT differs from isdigit, as follows: - - Its arg may be any int or unsigned int; it need not be an unsigned char - or EOF. - - It's typically faster. - POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to - isdigit unless it's important to use the locale's definition - of `digit' even when the host does not conform to POSIX. */ -#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) - -/* Shift A right by B bits portably, by dividing A by 2**B and - truncating towards minus infinity. A and B should be free of side - effects, and B should be in the range 0 <= B <= INT_BITS - 2, where - INT_BITS is the number of useful bits in an int. GNU code can - assume that INT_BITS is at least 32. - - ISO C99 says that A >> B is implementation-defined if A < 0. Some - implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift - right in the usual way when A < 0, so SHR falls back on division if - ordinary A >> B doesn't seem to be the usual signed shift. */ -#define SHR(a, b) \ - (-1 >> 1 == -1 \ - ? (a) >> (b) \ - : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) - -#define EPOCH_YEAR 1970 -#define TM_YEAR_BASE 1900 - -#define HOUR(x) ((x) * 60) - -/* long_time_t is a signed integer type that contains all time_t values. */ -verify (TYPE_IS_INTEGER (time_t)); -#if TIME_T_FITS_IN_LONG_INT -typedef long int long_time_t; -#else -typedef time_t long_time_t; -#endif - -/* Lots of this code assumes time_t and time_t-like values fit into - long_time_t. */ -verify (TYPE_MINIMUM (long_time_t) <= TYPE_MINIMUM (time_t) - && TYPE_MAXIMUM (time_t) <= TYPE_MAXIMUM (long_time_t)); - -/* FIXME: It also assumes that signed integer overflow silently wraps around, - but this is not true any more with recent versions of GCC 4. */ - -/* An integer value, and the number of digits in its textual - representation. */ -typedef struct -{ - bool negative; - long int value; - size_t digits; -} textint; - -/* An entry in the lexical lookup table. */ -typedef struct -{ - char const *name; - int type; - int value; -} table; - -/* Meridian: am, pm, or 24-hour style. */ -enum { MERam, MERpm, MER24 }; - -enum { BILLION = 1000000000, LOG10_BILLION = 9 }; - -/* Relative times. */ -typedef struct -{ - /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ - long int year; - long int month; - long int day; - long int hour; - long int minutes; - long_time_t seconds; - long int ns; -} relative_time; - -#if HAVE_COMPOUND_LITERALS -# define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 }) -#else -static relative_time const RELATIVE_TIME_0; -#endif - -/* Information passed to and from the parser. */ -typedef struct -{ - /* The input string remaining to be parsed. */ - const char *input; - - /* N, if this is the Nth Tuesday. */ - long int day_ordinal; - - /* Day of week; Sunday is 0. */ - int day_number; - - /* tm_isdst flag for the local zone. */ - int local_isdst; - - /* Time zone, in minutes east of UTC. */ - long int time_zone; - - /* Style used for time. */ - int meridian; - - /* Gregorian year, month, day, hour, minutes, seconds, and nanoseconds. */ - textint year; - long int month; - long int day; - long int hour; - long int minutes; - struct timespec seconds; /* includes nanoseconds */ - - /* Relative year, month, day, hour, minutes, seconds, and nanoseconds. */ - relative_time rel; - - /* Presence or counts of nonterminals of various flavors parsed so far. */ - bool timespec_seen; - bool rels_seen; - size_t dates_seen; - size_t days_seen; - size_t local_zones_seen; - size_t dsts_seen; - size_t times_seen; - size_t zones_seen; - - /* Table of local time zone abbrevations, terminated by a null entry. */ - table local_time_zone_table[3]; -} parser_control; - -union YYSTYPE; -static int yylex (union YYSTYPE *, parser_control *); -static int yyerror (parser_control const *, char const *); -static long int time_zone_hhmm (parser_control *, textint, long int); - -/* Extract into *PC any date and time info from a string of digits - of the form e.g., YYYYMMDD, YYMMDD, HHMM, HH (and sometimes YYY, - YYYY, ...). */ -static void -digits_to_date_time (parser_control *pc, textint text_int) -{ - if (pc->dates_seen && ! pc->year.digits - && ! pc->rels_seen && (pc->times_seen || 2 < text_int.digits)) - pc->year = text_int; - else - { - if (4 < text_int.digits) - { - pc->dates_seen++; - pc->day = text_int.value % 100; - pc->month = (text_int.value / 100) % 100; - pc->year.value = text_int.value / 10000; - pc->year.digits = text_int.digits - 4; - } - else - { - pc->times_seen++; - if (text_int.digits <= 2) - { - pc->hour = text_int.value; - pc->minutes = 0; - } - else - { - pc->hour = text_int.value / 100; - pc->minutes = text_int.value % 100; - } - pc->seconds.tv_sec = 0; - pc->seconds.tv_nsec = 0; - pc->meridian = MER24; - } - } -} - -/* Increment PC->rel by FACTOR * REL (FACTOR is 1 or -1). */ -static void -apply_relative_time (parser_control *pc, relative_time rel, int factor) -{ - pc->rel.ns += factor * rel.ns; - pc->rel.seconds += factor * rel.seconds; - pc->rel.minutes += factor * rel.minutes; - pc->rel.hour += factor * rel.hour; - pc->rel.day += factor * rel.day; - pc->rel.month += factor * rel.month; - pc->rel.year += factor * rel.year; - pc->rels_seen = true; -} - -/* Set PC-> hour, minutes, seconds and nanoseconds members from arguments. */ -static void -set_hhmmss (parser_control *pc, long int hour, long int minutes, - time_t sec, long int nsec) -{ - pc->hour = hour; - pc->minutes = minutes; - pc->seconds.tv_sec = sec; - pc->seconds.tv_nsec = nsec; -} - -%} - -/* We want a reentrant parser, even if the TZ manipulation and the calls to - localtime and gmtime are not reentrant. */ -%pure-parser -%parse-param { parser_control *pc } -%lex-param { parser_control *pc } - -/* This grammar has 20 shift/reduce conflicts. */ -%expect 20 - -%union -{ - long int intval; - textint textintval; - struct timespec timespec; - relative_time rel; -} - -%token tAGO tDST - -%token tYEAR_UNIT tMONTH_UNIT tHOUR_UNIT tMINUTE_UNIT tSEC_UNIT -%token tDAY_UNIT tDAY_SHIFT - -%token tDAY tDAYZONE tLOCAL_ZONE tMERIDIAN -%token tMONTH tORDINAL tZONE - -%token tSNUMBER tUNUMBER -%token tSDECIMAL_NUMBER tUDECIMAL_NUMBER - -%type o_colon_minutes o_merid -%type seconds signed_seconds unsigned_seconds - -%type relunit relunit_snumber dayshift - -%% - -spec: - timespec - | items - ; - -timespec: - '@' seconds - { - pc->seconds = $2; - pc->timespec_seen = true; - } - ; - -items: - /* empty */ - | items item - ; - -item: - time - { pc->times_seen++; } - | local_zone - { pc->local_zones_seen++; } - | zone - { pc->zones_seen++; } - | date - { pc->dates_seen++; } - | day - { pc->days_seen++; } - | rel - | number - | hybrid - ; - -time: - tUNUMBER tMERIDIAN - { - set_hhmmss (pc, $1.value, 0, 0, 0); - pc->meridian = $2; - } - | tUNUMBER ':' tUNUMBER o_merid - { - set_hhmmss (pc, $1.value, $3.value, 0, 0); - pc->meridian = $4; - } - | tUNUMBER ':' tUNUMBER tSNUMBER o_colon_minutes - { - set_hhmmss (pc, $1.value, $3.value, 0, 0); - pc->meridian = MER24; - pc->zones_seen++; - pc->time_zone = time_zone_hhmm (pc, $4, $5); - } - | tUNUMBER ':' tUNUMBER ':' unsigned_seconds o_merid - { - set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); - pc->meridian = $6; - } - | tUNUMBER ':' tUNUMBER ':' unsigned_seconds tSNUMBER o_colon_minutes - { - set_hhmmss (pc, $1.value, $3.value, $5.tv_sec, $5.tv_nsec); - pc->meridian = MER24; - pc->zones_seen++; - pc->time_zone = time_zone_hhmm (pc, $6, $7); - } - ; - -local_zone: - tLOCAL_ZONE - { - pc->local_isdst = $1; - pc->dsts_seen += (0 < $1); - } - | tLOCAL_ZONE tDST - { - pc->local_isdst = 1; - pc->dsts_seen += (0 < $1) + 1; - } - ; - -zone: - tZONE - { pc->time_zone = $1; } - | tZONE relunit_snumber - { pc->time_zone = $1; - apply_relative_time (pc, $2, 1); } - | tZONE tSNUMBER o_colon_minutes - { pc->time_zone = $1 + time_zone_hhmm (pc, $2, $3); } - | tDAYZONE - { pc->time_zone = $1 + 60; } - | tZONE tDST - { pc->time_zone = $1 + 60; } - ; - -day: - tDAY - { - pc->day_ordinal = 0; - pc->day_number = $1; - } - | tDAY ',' - { - pc->day_ordinal = 0; - pc->day_number = $1; - } - | tORDINAL tDAY - { - pc->day_ordinal = $1; - pc->day_number = $2; - } - | tUNUMBER tDAY - { - pc->day_ordinal = $1.value; - pc->day_number = $2; - } - ; - -date: - tUNUMBER '/' tUNUMBER - { - pc->month = $1.value; - pc->day = $3.value; - } - | tUNUMBER '/' tUNUMBER '/' tUNUMBER - { - /* Interpret as YYYY/MM/DD if the first value has 4 or more digits, - otherwise as MM/DD/YY. - The goal in recognizing YYYY/MM/DD is solely to support legacy - machine-generated dates like those in an RCS log listing. If - you want portability, use the ISO 8601 format. */ - if (4 <= $1.digits) - { - pc->year = $1; - pc->month = $3.value; - pc->day = $5.value; - } - else - { - pc->month = $1.value; - pc->day = $3.value; - pc->year = $5; - } - } - | tUNUMBER tSNUMBER tSNUMBER - { - /* ISO 8601 format. YYYY-MM-DD. */ - pc->year = $1; - pc->month = -$2.value; - pc->day = -$3.value; - } - | tUNUMBER tMONTH tSNUMBER - { - /* e.g. 17-JUN-1992. */ - pc->day = $1.value; - pc->month = $2; - pc->year.value = -$3.value; - pc->year.digits = $3.digits; - } - | tMONTH tSNUMBER tSNUMBER - { - /* e.g. JUN-17-1992. */ - pc->month = $1; - pc->day = -$2.value; - pc->year.value = -$3.value; - pc->year.digits = $3.digits; - } - | tMONTH tUNUMBER - { - pc->month = $1; - pc->day = $2.value; - } - | tMONTH tUNUMBER ',' tUNUMBER - { - pc->month = $1; - pc->day = $2.value; - pc->year = $4; - } - | tUNUMBER tMONTH - { - pc->day = $1.value; - pc->month = $2; - } - | tUNUMBER tMONTH tUNUMBER - { - pc->day = $1.value; - pc->month = $2; - pc->year = $3; - } - ; - -rel: - relunit tAGO - { apply_relative_time (pc, $1, -1); } - | relunit - { apply_relative_time (pc, $1, 1); } - | dayshift - { apply_relative_time (pc, $1, 1); } - ; - -relunit: - tORDINAL tYEAR_UNIT - { $$ = RELATIVE_TIME_0; $$.year = $1; } - | tUNUMBER tYEAR_UNIT - { $$ = RELATIVE_TIME_0; $$.year = $1.value; } - | tYEAR_UNIT - { $$ = RELATIVE_TIME_0; $$.year = 1; } - | tORDINAL tMONTH_UNIT - { $$ = RELATIVE_TIME_0; $$.month = $1; } - | tUNUMBER tMONTH_UNIT - { $$ = RELATIVE_TIME_0; $$.month = $1.value; } - | tMONTH_UNIT - { $$ = RELATIVE_TIME_0; $$.month = 1; } - | tORDINAL tDAY_UNIT - { $$ = RELATIVE_TIME_0; $$.day = $1 * $2; } - | tUNUMBER tDAY_UNIT - { $$ = RELATIVE_TIME_0; $$.day = $1.value * $2; } - | tDAY_UNIT - { $$ = RELATIVE_TIME_0; $$.day = $1; } - | tORDINAL tHOUR_UNIT - { $$ = RELATIVE_TIME_0; $$.hour = $1; } - | tUNUMBER tHOUR_UNIT - { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } - | tHOUR_UNIT - { $$ = RELATIVE_TIME_0; $$.hour = 1; } - | tORDINAL tMINUTE_UNIT - { $$ = RELATIVE_TIME_0; $$.minutes = $1; } - | tUNUMBER tMINUTE_UNIT - { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } - | tMINUTE_UNIT - { $$ = RELATIVE_TIME_0; $$.minutes = 1; } - | tORDINAL tSEC_UNIT - { $$ = RELATIVE_TIME_0; $$.seconds = $1; } - | tUNUMBER tSEC_UNIT - { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } - | tSDECIMAL_NUMBER tSEC_UNIT - { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } - | tUDECIMAL_NUMBER tSEC_UNIT - { $$ = RELATIVE_TIME_0; $$.seconds = $1.tv_sec; $$.ns = $1.tv_nsec; } - | tSEC_UNIT - { $$ = RELATIVE_TIME_0; $$.seconds = 1; } - | relunit_snumber - ; - -relunit_snumber: - tSNUMBER tYEAR_UNIT - { $$ = RELATIVE_TIME_0; $$.year = $1.value; } - | tSNUMBER tMONTH_UNIT - { $$ = RELATIVE_TIME_0; $$.month = $1.value; } - | tSNUMBER tDAY_UNIT - { $$ = RELATIVE_TIME_0; $$.day = $1.value * $2; } - | tSNUMBER tHOUR_UNIT - { $$ = RELATIVE_TIME_0; $$.hour = $1.value; } - | tSNUMBER tMINUTE_UNIT - { $$ = RELATIVE_TIME_0; $$.minutes = $1.value; } - | tSNUMBER tSEC_UNIT - { $$ = RELATIVE_TIME_0; $$.seconds = $1.value; } - ; - -dayshift: - tDAY_SHIFT - { $$ = RELATIVE_TIME_0; $$.day = $1; } - ; - -seconds: signed_seconds | unsigned_seconds; - -signed_seconds: - tSDECIMAL_NUMBER - | tSNUMBER - { $$.tv_sec = $1.value; $$.tv_nsec = 0; } - ; - -unsigned_seconds: - tUDECIMAL_NUMBER - | tUNUMBER - { $$.tv_sec = $1.value; $$.tv_nsec = 0; } - ; - -number: - tUNUMBER - { digits_to_date_time (pc, $1); } - ; - -hybrid: - tUNUMBER relunit_snumber - { - /* Hybrid all-digit and relative offset, so that we accept e.g., - "YYYYMMDD +N days" as well as "YYYYMMDD N days". */ - digits_to_date_time (pc, $1); - apply_relative_time (pc, $2, 1); - } - ; - -o_colon_minutes: - /* empty */ - { $$ = -1; } - | ':' tUNUMBER - { $$ = $2.value; } - ; - -o_merid: - /* empty */ - { $$ = MER24; } - | tMERIDIAN - { $$ = $1; } - ; - -%% - -static table const meridian_table[] = -{ - { "AM", tMERIDIAN, MERam }, - { "A.M.", tMERIDIAN, MERam }, - { "PM", tMERIDIAN, MERpm }, - { "P.M.", tMERIDIAN, MERpm }, - { NULL, 0, 0 } -}; - -static table const dst_table[] = -{ - { "DST", tDST, 0 } -}; - -static table const month_and_day_table[] = -{ - { "JANUARY", tMONTH, 1 }, - { "FEBRUARY", tMONTH, 2 }, - { "MARCH", tMONTH, 3 }, - { "APRIL", tMONTH, 4 }, - { "MAY", tMONTH, 5 }, - { "JUNE", tMONTH, 6 }, - { "JULY", tMONTH, 7 }, - { "AUGUST", tMONTH, 8 }, - { "SEPTEMBER",tMONTH, 9 }, - { "SEPT", tMONTH, 9 }, - { "OCTOBER", tMONTH, 10 }, - { "NOVEMBER", tMONTH, 11 }, - { "DECEMBER", tMONTH, 12 }, - { "SUNDAY", tDAY, 0 }, - { "MONDAY", tDAY, 1 }, - { "TUESDAY", tDAY, 2 }, - { "TUES", tDAY, 2 }, - { "WEDNESDAY",tDAY, 3 }, - { "WEDNES", tDAY, 3 }, - { "THURSDAY", tDAY, 4 }, - { "THUR", tDAY, 4 }, - { "THURS", tDAY, 4 }, - { "FRIDAY", tDAY, 5 }, - { "SATURDAY", tDAY, 6 }, - { NULL, 0, 0 } -}; - -static table const time_units_table[] = -{ - { "YEAR", tYEAR_UNIT, 1 }, - { "MONTH", tMONTH_UNIT, 1 }, - { "FORTNIGHT",tDAY_UNIT, 14 }, - { "WEEK", tDAY_UNIT, 7 }, - { "DAY", tDAY_UNIT, 1 }, - { "HOUR", tHOUR_UNIT, 1 }, - { "MINUTE", tMINUTE_UNIT, 1 }, - { "MIN", tMINUTE_UNIT, 1 }, - { "SECOND", tSEC_UNIT, 1 }, - { "SEC", tSEC_UNIT, 1 }, - { NULL, 0, 0 } -}; - -/* Assorted relative-time words. */ -static table const relative_time_table[] = -{ - { "TOMORROW", tDAY_SHIFT, 1 }, - { "YESTERDAY",tDAY_SHIFT, -1 }, - { "TODAY", tDAY_SHIFT, 0 }, - { "NOW", tDAY_SHIFT, 0 }, - { "LAST", tORDINAL, -1 }, - { "THIS", tORDINAL, 0 }, - { "NEXT", tORDINAL, 1 }, - { "FIRST", tORDINAL, 1 }, -/*{ "SECOND", tORDINAL, 2 }, */ - { "THIRD", tORDINAL, 3 }, - { "FOURTH", tORDINAL, 4 }, - { "FIFTH", tORDINAL, 5 }, - { "SIXTH", tORDINAL, 6 }, - { "SEVENTH", tORDINAL, 7 }, - { "EIGHTH", tORDINAL, 8 }, - { "NINTH", tORDINAL, 9 }, - { "TENTH", tORDINAL, 10 }, - { "ELEVENTH", tORDINAL, 11 }, - { "TWELFTH", tORDINAL, 12 }, - { "AGO", tAGO, 1 }, - { NULL, 0, 0 } -}; - -/* The universal time zone table. These labels can be used even for - time stamps that would not otherwise be valid, e.g., GMT time - stamps in London during summer. */ -static table const universal_time_zone_table[] = -{ - { "GMT", tZONE, HOUR ( 0) }, /* Greenwich Mean */ - { "UT", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ - { "UTC", tZONE, HOUR ( 0) }, - { NULL, 0, 0 } -}; - -/* The time zone table. This table is necessarily incomplete, as time - zone abbreviations are ambiguous; e.g. Australians interpret "EST" - as Eastern time in Australia, not as US Eastern Standard Time. - You cannot rely on parse_datetime to handle arbitrary time zone - abbreviations; use numeric abbreviations like `-0500' instead. */ -static table const time_zone_table[] = -{ - { "WET", tZONE, HOUR ( 0) }, /* Western European */ - { "WEST", tDAYZONE, HOUR ( 0) }, /* Western European Summer */ - { "BST", tDAYZONE, HOUR ( 0) }, /* British Summer */ - { "ART", tZONE, -HOUR ( 3) }, /* Argentina */ - { "BRT", tZONE, -HOUR ( 3) }, /* Brazil */ - { "BRST", tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */ - { "NST", tZONE, -(HOUR ( 3) + 30) }, /* Newfoundland Standard */ - { "NDT", tDAYZONE,-(HOUR ( 3) + 30) }, /* Newfoundland Daylight */ - { "AST", tZONE, -HOUR ( 4) }, /* Atlantic Standard */ - { "ADT", tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */ - { "CLT", tZONE, -HOUR ( 4) }, /* Chile */ - { "CLST", tDAYZONE, -HOUR ( 4) }, /* Chile Summer */ - { "EST", tZONE, -HOUR ( 5) }, /* Eastern Standard */ - { "EDT", tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */ - { "CST", tZONE, -HOUR ( 6) }, /* Central Standard */ - { "CDT", tDAYZONE, -HOUR ( 6) }, /* Central Daylight */ - { "MST", tZONE, -HOUR ( 7) }, /* Mountain Standard */ - { "MDT", tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */ - { "PST", tZONE, -HOUR ( 8) }, /* Pacific Standard */ - { "PDT", tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */ - { "AKST", tZONE, -HOUR ( 9) }, /* Alaska Standard */ - { "AKDT", tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */ - { "HST", tZONE, -HOUR (10) }, /* Hawaii Standard */ - { "HAST", tZONE, -HOUR (10) }, /* Hawaii-Aleutian Standard */ - { "HADT", tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */ - { "SST", tZONE, -HOUR (12) }, /* Samoa Standard */ - { "WAT", tZONE, HOUR ( 1) }, /* West Africa */ - { "CET", tZONE, HOUR ( 1) }, /* Central European */ - { "CEST", tDAYZONE, HOUR ( 1) }, /* Central European Summer */ - { "MET", tZONE, HOUR ( 1) }, /* Middle European */ - { "MEZ", tZONE, HOUR ( 1) }, /* Middle European */ - { "MEST", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ - { "MESZ", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ - { "EET", tZONE, HOUR ( 2) }, /* Eastern European */ - { "EEST", tDAYZONE, HOUR ( 2) }, /* Eastern European Summer */ - { "CAT", tZONE, HOUR ( 2) }, /* Central Africa */ - { "SAST", tZONE, HOUR ( 2) }, /* South Africa Standard */ - { "EAT", tZONE, HOUR ( 3) }, /* East Africa */ - { "MSK", tZONE, HOUR ( 3) }, /* Moscow */ - { "MSD", tDAYZONE, HOUR ( 3) }, /* Moscow Daylight */ - { "IST", tZONE, (HOUR ( 5) + 30) }, /* India Standard */ - { "SGT", tZONE, HOUR ( 8) }, /* Singapore */ - { "KST", tZONE, HOUR ( 9) }, /* Korea Standard */ - { "JST", tZONE, HOUR ( 9) }, /* Japan Standard */ - { "GST", tZONE, HOUR (10) }, /* Guam Standard */ - { "NZST", tZONE, HOUR (12) }, /* New Zealand Standard */ - { "NZDT", tDAYZONE, HOUR (12) }, /* New Zealand Daylight */ - { NULL, 0, 0 } -}; - -/* Military time zone table. */ -static table const military_table[] = -{ - { "A", tZONE, -HOUR ( 1) }, - { "B", tZONE, -HOUR ( 2) }, - { "C", tZONE, -HOUR ( 3) }, - { "D", tZONE, -HOUR ( 4) }, - { "E", tZONE, -HOUR ( 5) }, - { "F", tZONE, -HOUR ( 6) }, - { "G", tZONE, -HOUR ( 7) }, - { "H", tZONE, -HOUR ( 8) }, - { "I", tZONE, -HOUR ( 9) }, - { "K", tZONE, -HOUR (10) }, - { "L", tZONE, -HOUR (11) }, - { "M", tZONE, -HOUR (12) }, - { "N", tZONE, HOUR ( 1) }, - { "O", tZONE, HOUR ( 2) }, - { "P", tZONE, HOUR ( 3) }, - { "Q", tZONE, HOUR ( 4) }, - { "R", tZONE, HOUR ( 5) }, - { "S", tZONE, HOUR ( 6) }, - { "T", tZONE, HOUR ( 7) }, - { "U", tZONE, HOUR ( 8) }, - { "V", tZONE, HOUR ( 9) }, - { "W", tZONE, HOUR (10) }, - { "X", tZONE, HOUR (11) }, - { "Y", tZONE, HOUR (12) }, - { "Z", tZONE, HOUR ( 0) }, - { NULL, 0, 0 } -}; - - - -/* Convert a time zone expressed as HH:MM into an integer count of - minutes. If MM is negative, then S is of the form HHMM and needs - to be picked apart; otherwise, S is of the form HH. As specified in - http://www.opengroup.org/susv3xbd/xbd_chap08.html#tag_08_03, allow - only valid TZ range, and consider first two digits as hours, if no - minutes specified. */ - -static long int -time_zone_hhmm (parser_control *pc, textint s, long int mm) -{ - long int n_minutes; - - /* If the length of S is 1 or 2 and no minutes are specified, - interpret it as a number of hours. */ - if (s.digits <= 2 && mm < 0) - s.value *= 100; - - if (mm < 0) - n_minutes = (s.value / 100) * 60 + s.value % 100; - else - n_minutes = s.value * 60 + (s.negative ? -mm : mm); - - /* If the absolute number of minutes is larger than 24 hours, - arrange to reject it by incrementing pc->zones_seen. Thus, - we allow only values in the range UTC-24:00 to UTC+24:00. */ - if (24 * 60 < abs (n_minutes)) - pc->zones_seen++; - - return n_minutes; -} - -static int -to_hour (long int hours, int meridian) -{ - switch (meridian) - { - default: /* Pacify GCC. */ - case MER24: - return 0 <= hours && hours < 24 ? hours : -1; - case MERam: - return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1; - case MERpm: - return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1; - } -} - -static long int -to_year (textint textyear) -{ - long int year = textyear.value; - - if (year < 0) - year = -year; - - /* XPG4 suggests that years 00-68 map to 2000-2068, and - years 69-99 map to 1969-1999. */ - else if (textyear.digits == 2) - year += year < 69 ? 2000 : 1900; - - return year; -} - -static table const * -lookup_zone (parser_control const *pc, char const *name) -{ - table const *tp; - - for (tp = universal_time_zone_table; tp->name; tp++) - if (strcmp (name, tp->name) == 0) - return tp; - - /* Try local zone abbreviations before those in time_zone_table, as - the local ones are more likely to be right. */ - for (tp = pc->local_time_zone_table; tp->name; tp++) - if (strcmp (name, tp->name) == 0) - return tp; - - for (tp = time_zone_table; tp->name; tp++) - if (strcmp (name, tp->name) == 0) - return tp; - - return NULL; -} - -#if ! HAVE_TM_GMTOFF -/* Yield the difference between *A and *B, - measured in seconds, ignoring leap seconds. - The body of this function is taken directly from the GNU C Library; - see src/strftime.c. */ -static long int -tm_diff (struct tm const *a, struct tm const *b) -{ - /* Compute intervening leap days correctly even if year is negative. - Take care to avoid int overflow in leap day calculations. */ - int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); - int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); - int a100 = a4 / 25 - (a4 % 25 < 0); - int b100 = b4 / 25 - (b4 % 25 < 0); - int a400 = SHR (a100, 2); - int b400 = SHR (b100, 2); - int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); - long int ayear = a->tm_year; - long int years = ayear - b->tm_year; - long int days = (365 * years + intervening_leap_days - + (a->tm_yday - b->tm_yday)); - return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) - + (a->tm_min - b->tm_min)) - + (a->tm_sec - b->tm_sec)); -} -#endif /* ! HAVE_TM_GMTOFF */ - -static table const * -lookup_word (parser_control const *pc, char *word) -{ - char *p; - char *q; - size_t wordlen; - table const *tp; - bool period_found; - bool abbrev; - - /* Make it uppercase. */ - for (p = word; *p; p++) - { - unsigned char ch = *p; - *p = c_toupper (ch); - } - - for (tp = meridian_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - - /* See if we have an abbreviation for a month. */ - wordlen = strlen (word); - abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.'); - - for (tp = month_and_day_table; tp->name; tp++) - if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0) - return tp; - - if ((tp = lookup_zone (pc, word))) - return tp; - - if (strcmp (word, dst_table[0].name) == 0) - return dst_table; - - for (tp = time_units_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - - /* Strip off any plural and try the units table again. */ - if (word[wordlen - 1] == 'S') - { - word[wordlen - 1] = '\0'; - for (tp = time_units_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - word[wordlen - 1] = 'S'; /* For "this" in relative_time_table. */ - } - - for (tp = relative_time_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - - /* Military time zones. */ - if (wordlen == 1) - for (tp = military_table; tp->name; tp++) - if (word[0] == tp->name[0]) - return tp; - - /* Drop out any periods and try the time zone table again. */ - for (period_found = false, p = q = word; (*p = *q); q++) - if (*q == '.') - period_found = true; - else - p++; - if (period_found && (tp = lookup_zone (pc, word))) - return tp; - - return NULL; -} - -static int -yylex (YYSTYPE *lvalp, parser_control *pc) -{ - unsigned char c; - size_t count; - - for (;;) - { - while (c = *pc->input, c_isspace (c)) - pc->input++; - - if (ISDIGIT (c) || c == '-' || c == '+') - { - char const *p; - int sign; - unsigned long int value; - if (c == '-' || c == '+') - { - sign = c == '-' ? -1 : 1; - while (c = *++pc->input, c_isspace (c)) - continue; - if (! ISDIGIT (c)) - /* skip the '-' sign */ - continue; - } - else - sign = 0; - p = pc->input; - for (value = 0; ; value *= 10) - { - unsigned long int value1 = value + (c - '0'); - if (value1 < value) - return '?'; - value = value1; - c = *++p; - if (! ISDIGIT (c)) - break; - if (ULONG_MAX / 10 < value) - return '?'; - } - if ((c == '.' || c == ',') && ISDIGIT (p[1])) - { - time_t s; - int ns; - int digits; - unsigned long int value1; - - /* Check for overflow when converting value to time_t. */ - if (sign < 0) - { - s = - value; - if (0 < s) - return '?'; - value1 = -s; - } - else - { - s = value; - if (s < 0) - return '?'; - value1 = s; - } - if (value != value1) - return '?'; - - /* Accumulate fraction, to ns precision. */ - p++; - ns = *p++ - '0'; - for (digits = 2; digits <= LOG10_BILLION; digits++) - { - ns *= 10; - if (ISDIGIT (*p)) - ns += *p++ - '0'; - } - - /* Skip excess digits, truncating toward -Infinity. */ - if (sign < 0) - for (; ISDIGIT (*p); p++) - if (*p != '0') - { - ns++; - break; - } - while (ISDIGIT (*p)) - p++; - - /* Adjust to the timespec convention, which is that - tv_nsec is always a positive offset even if tv_sec is - negative. */ - if (sign < 0 && ns) - { - s--; - if (! (s < 0)) - return '?'; - ns = BILLION - ns; - } - - lvalp->timespec.tv_sec = s; - lvalp->timespec.tv_nsec = ns; - pc->input = p; - return sign ? tSDECIMAL_NUMBER : tUDECIMAL_NUMBER; - } - else - { - lvalp->textintval.negative = sign < 0; - if (sign < 0) - { - lvalp->textintval.value = - value; - if (0 < lvalp->textintval.value) - return '?'; - } - else - { - lvalp->textintval.value = value; - if (lvalp->textintval.value < 0) - return '?'; - } - lvalp->textintval.digits = p - pc->input; - pc->input = p; - return sign ? tSNUMBER : tUNUMBER; - } - } - - if (c_isalpha (c)) - { - char buff[20]; - char *p = buff; - table const *tp; - - do - { - if (p < buff + sizeof buff - 1) - *p++ = c; - c = *++pc->input; - } - while (c_isalpha (c) || c == '.'); - - *p = '\0'; - tp = lookup_word (pc, buff); - if (! tp) - return '?'; - lvalp->intval = tp->value; - return tp->type; - } - - if (c != '(') - return *pc->input++; - count = 0; - do - { - c = *pc->input++; - if (c == '\0') - return c; - if (c == '(') - count++; - else if (c == ')') - count--; - } - while (count != 0); - } -} - -/* Do nothing if the parser reports an error. */ -static int -yyerror (parser_control const *pc _GL_UNUSED, - char const *s _GL_UNUSED) -{ - return 0; -} - -/* If *TM0 is the old and *TM1 is the new value of a struct tm after - passing it to mktime, return true if it's OK that mktime returned T. - It's not OK if *TM0 has out-of-range members. */ - -static bool -mktime_ok (struct tm const *tm0, struct tm const *tm1, time_t t) -{ - if (t == (time_t) -1) - { - /* Guard against falsely reporting an error when parsing a time - stamp that happens to equal (time_t) -1, on a host that - supports such a time stamp. */ - tm1 = localtime (&t); - if (!tm1) - return false; - } - - return ! ((tm0->tm_sec ^ tm1->tm_sec) - | (tm0->tm_min ^ tm1->tm_min) - | (tm0->tm_hour ^ tm1->tm_hour) - | (tm0->tm_mday ^ tm1->tm_mday) - | (tm0->tm_mon ^ tm1->tm_mon) - | (tm0->tm_year ^ tm1->tm_year)); -} - -/* A reasonable upper bound for the size of ordinary TZ strings. - Use heap allocation if TZ's length exceeds this. */ -enum { TZBUFSIZE = 100 }; - -/* Return a copy of TZ, stored in TZBUF if it fits, and heap-allocated - otherwise. */ -static char * -get_tz (char tzbuf[TZBUFSIZE]) -{ - char *tz = getenv ("TZ"); - if (tz) - { - size_t tzsize = strlen (tz) + 1; - tz = (tzsize <= TZBUFSIZE - ? memcpy (tzbuf, tz, tzsize) - : xmemdup (tz, tzsize)); - } - return tz; -} - -/* Parse a date/time string, storing the resulting time value into *RESULT. - The string itself is pointed to by P. Return true if successful. - P can be an incomplete or relative time specification; if so, use - *NOW as the basis for the returned time. */ -bool -parse_datetime (struct timespec *result, char const *p, - struct timespec const *now) -{ - time_t Start; - long int Start_ns; - struct tm const *tmp; - struct tm tm; - struct tm tm0; - parser_control pc; - struct timespec gettime_buffer; - unsigned char c; - bool tz_was_altered = false; - char *tz0 = NULL; - char tz0buf[TZBUFSIZE]; - bool ok = true; - - if (! now) - { - gettime (&gettime_buffer); - now = &gettime_buffer; - } - - Start = now->tv_sec; - Start_ns = now->tv_nsec; - - tmp = localtime (&now->tv_sec); - if (! tmp) - return false; - - while (c = *p, c_isspace (c)) - p++; - - if (strncmp (p, "TZ=\"", 4) == 0) - { - char const *tzbase = p + 4; - size_t tzsize = 1; - char const *s; - - for (s = tzbase; *s; s++, tzsize++) - if (*s == '\\') - { - s++; - if (! (*s == '\\' || *s == '"')) - break; - } - else if (*s == '"') - { - char *z; - char *tz1; - char tz1buf[TZBUFSIZE]; - bool large_tz = TZBUFSIZE < tzsize; - bool setenv_ok; - /* Free tz0, in case this is the 2nd or subsequent time through. */ - free (tz0); - tz0 = get_tz (tz0buf); - z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf; - for (s = tzbase; *s != '"'; s++) - *z++ = *(s += *s == '\\'); - *z = '\0'; - setenv_ok = setenv ("TZ", tz1, 1) == 0; - if (large_tz) - free (tz1); - if (!setenv_ok) - goto fail; - tz_was_altered = true; - p = s + 1; - } - } - - /* As documented, be careful to treat the empty string just like - a date string of "0". Without this, an empty string would be - declared invalid when parsed during a DST transition. */ - if (*p == '\0') - p = "0"; - - pc.input = p; - pc.year.value = tmp->tm_year; - pc.year.value += TM_YEAR_BASE; - pc.year.digits = 0; - pc.month = tmp->tm_mon + 1; - pc.day = tmp->tm_mday; - pc.hour = tmp->tm_hour; - pc.minutes = tmp->tm_min; - pc.seconds.tv_sec = tmp->tm_sec; - pc.seconds.tv_nsec = Start_ns; - tm.tm_isdst = tmp->tm_isdst; - - pc.meridian = MER24; - pc.rel = RELATIVE_TIME_0; - pc.timespec_seen = false; - pc.rels_seen = false; - pc.dates_seen = 0; - pc.days_seen = 0; - pc.times_seen = 0; - pc.local_zones_seen = 0; - pc.dsts_seen = 0; - pc.zones_seen = 0; - -#if HAVE_STRUCT_TM_TM_ZONE - pc.local_time_zone_table[0].name = tmp->tm_zone; - pc.local_time_zone_table[0].type = tLOCAL_ZONE; - pc.local_time_zone_table[0].value = tmp->tm_isdst; - pc.local_time_zone_table[1].name = NULL; - - /* Probe the names used in the next three calendar quarters, looking - for a tm_isdst different from the one we already have. */ - { - int quarter; - for (quarter = 1; quarter <= 3; quarter++) - { - time_t probe = Start + quarter * (90 * 24 * 60 * 60); - struct tm const *probe_tm = localtime (&probe); - if (probe_tm && probe_tm->tm_zone - && probe_tm->tm_isdst != pc.local_time_zone_table[0].value) - { - { - pc.local_time_zone_table[1].name = probe_tm->tm_zone; - pc.local_time_zone_table[1].type = tLOCAL_ZONE; - pc.local_time_zone_table[1].value = probe_tm->tm_isdst; - pc.local_time_zone_table[2].name = NULL; - } - break; - } - } - } -#else -#if HAVE_TZNAME - { -# if !HAVE_DECL_TZNAME - extern char *tzname[]; -# endif - int i; - for (i = 0; i < 2; i++) - { - pc.local_time_zone_table[i].name = tzname[i]; - pc.local_time_zone_table[i].type = tLOCAL_ZONE; - pc.local_time_zone_table[i].value = i; - } - pc.local_time_zone_table[i].name = NULL; - } -#else - pc.local_time_zone_table[0].name = NULL; -#endif -#endif - - if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name - && ! strcmp (pc.local_time_zone_table[0].name, - pc.local_time_zone_table[1].name)) - { - /* This locale uses the same abbrevation for standard and - daylight times. So if we see that abbreviation, we don't - know whether it's daylight time. */ - pc.local_time_zone_table[0].value = -1; - pc.local_time_zone_table[1].name = NULL; - } - - if (yyparse (&pc) != 0) - goto fail; - - if (pc.timespec_seen) - *result = pc.seconds; - else - { - if (1 < (pc.times_seen | pc.dates_seen | pc.days_seen | pc.dsts_seen - | (pc.local_zones_seen + pc.zones_seen))) - goto fail; - - tm.tm_year = to_year (pc.year) - TM_YEAR_BASE; - tm.tm_mon = pc.month - 1; - tm.tm_mday = pc.day; - if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen)) - { - tm.tm_hour = to_hour (pc.hour, pc.meridian); - if (tm.tm_hour < 0) - goto fail; - tm.tm_min = pc.minutes; - tm.tm_sec = pc.seconds.tv_sec; - } - else - { - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - pc.seconds.tv_nsec = 0; - } - - /* Let mktime deduce tm_isdst if we have an absolute time stamp. */ - if (pc.dates_seen | pc.days_seen | pc.times_seen) - tm.tm_isdst = -1; - - /* But if the input explicitly specifies local time with or without - DST, give mktime that information. */ - if (pc.local_zones_seen) - tm.tm_isdst = pc.local_isdst; - - tm0 = tm; - - Start = mktime (&tm); - - if (! mktime_ok (&tm0, &tm, Start)) - { - if (! pc.zones_seen) - goto fail; - else - { - /* Guard against falsely reporting errors near the time_t - boundaries when parsing times in other time zones. For - example, suppose the input string "1969-12-31 23:00:00 -0100", - the current time zone is 8 hours ahead of UTC, and the min - time_t value is 1970-01-01 00:00:00 UTC. Then the min - localtime value is 1970-01-01 08:00:00, and mktime will - therefore fail on 1969-12-31 23:00:00. To work around the - problem, set the time zone to 1 hour behind UTC temporarily - by setting TZ="XXX1:00" and try mktime again. */ - - long int time_zone = pc.time_zone; - long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone; - long int abs_time_zone_hour = abs_time_zone / 60; - int abs_time_zone_min = abs_time_zone % 60; - char tz1buf[sizeof "XXX+0:00" - + sizeof pc.time_zone * CHAR_BIT / 3]; - if (!tz_was_altered) - tz0 = get_tz (tz0buf); - sprintf (tz1buf, "XXX%s%ld:%02d", "-" + (time_zone < 0), - abs_time_zone_hour, abs_time_zone_min); - if (setenv ("TZ", tz1buf, 1) != 0) - goto fail; - tz_was_altered = true; - tm = tm0; - Start = mktime (&tm); - if (! mktime_ok (&tm0, &tm, Start)) - goto fail; - } - } - - if (pc.days_seen && ! pc.dates_seen) - { - tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7 - + 7 * (pc.day_ordinal - - (0 < pc.day_ordinal - && tm.tm_wday != pc.day_number))); - tm.tm_isdst = -1; - Start = mktime (&tm); - if (Start == (time_t) -1) - goto fail; - } - - /* Add relative date. */ - if (pc.rel.year | pc.rel.month | pc.rel.day) - { - int year = tm.tm_year + pc.rel.year; - int month = tm.tm_mon + pc.rel.month; - int day = tm.tm_mday + pc.rel.day; - if (((year < tm.tm_year) ^ (pc.rel.year < 0)) - | ((month < tm.tm_mon) ^ (pc.rel.month < 0)) - | ((day < tm.tm_mday) ^ (pc.rel.day < 0))) - goto fail; - tm.tm_year = year; - tm.tm_mon = month; - tm.tm_mday = day; - tm.tm_hour = tm0.tm_hour; - tm.tm_min = tm0.tm_min; - tm.tm_sec = tm0.tm_sec; - tm.tm_isdst = tm0.tm_isdst; - Start = mktime (&tm); - if (Start == (time_t) -1) - goto fail; - } - - /* The only "output" of this if-block is an updated Start value, - so this block must follow others that clobber Start. */ - if (pc.zones_seen) - { - long int delta = pc.time_zone * 60; - time_t t1; -#ifdef HAVE_TM_GMTOFF - delta -= tm.tm_gmtoff; -#else - time_t t = Start; - struct tm const *gmt = gmtime (&t); - if (! gmt) - goto fail; - delta -= tm_diff (&tm, gmt); -#endif - t1 = Start - delta; - if ((Start < t1) != (delta < 0)) - goto fail; /* time_t overflow */ - Start = t1; - } - - /* Add relative hours, minutes, and seconds. On hosts that support - leap seconds, ignore the possibility of leap seconds; e.g., - "+ 10 minutes" adds 600 seconds, even if one of them is a - leap second. Typically this is not what the user wants, but it's - too hard to do it the other way, because the time zone indicator - must be applied before relative times, and if mktime is applied - again the time zone will be lost. */ - { - long int sum_ns = pc.seconds.tv_nsec + pc.rel.ns; - long int normalized_ns = (sum_ns % BILLION + BILLION) % BILLION; - time_t t0 = Start; - long int d1 = 60 * 60 * pc.rel.hour; - time_t t1 = t0 + d1; - long int d2 = 60 * pc.rel.minutes; - time_t t2 = t1 + d2; - long_time_t d3 = pc.rel.seconds; - long_time_t t3 = t2 + d3; - long int d4 = (sum_ns - normalized_ns) / BILLION; - long_time_t t4 = t3 + d4; - time_t t5 = t4; - - if ((d1 / (60 * 60) ^ pc.rel.hour) - | (d2 / 60 ^ pc.rel.minutes) - | ((t1 < t0) ^ (d1 < 0)) - | ((t2 < t1) ^ (d2 < 0)) - | ((t3 < t2) ^ (d3 < 0)) - | ((t4 < t3) ^ (d4 < 0)) - | (t5 != t4)) - goto fail; - - result->tv_sec = t5; - result->tv_nsec = normalized_ns; - } - } - - goto done; - - fail: - ok = false; - done: - if (tz_was_altered) - ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0; - if (tz0 != tz0buf) - free (tz0); - return ok; -} - -#if TEST - -int -main (int ac, char **av) -{ - char buff[BUFSIZ]; - - printf ("Enter date, or blank line to exit.\n\t> "); - fflush (stdout); - - buff[BUFSIZ - 1] = '\0'; - while (fgets (buff, BUFSIZ - 1, stdin) && buff[0]) - { - struct timespec d; - struct tm const *tm; - if (! parse_datetime (&d, buff, NULL)) - printf ("Bad format - couldn't convert.\n"); - else if (! (tm = localtime (&d.tv_sec))) - { - long int sec = d.tv_sec; - printf ("localtime (%ld) failed\n", sec); - } - else - { - int ns = d.tv_nsec; - printf ("%04ld-%02d-%02d %02d:%02d:%02d.%09d\n", - tm->tm_year + 1900L, tm->tm_mon + 1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec, ns); - } - printf ("\t> "); - fflush (stdout); - } - return 0; -} -#endif /* TEST */ diff --git a/gnulib/lib/pathmax.h b/gnulib/lib/pathmax.h deleted file mode 100644 index d471240..0000000 --- a/gnulib/lib/pathmax.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Define PATH_MAX somehow. Requires sys/types.h. - Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _PATHMAX_H -# define _PATHMAX_H - -# include - -# include - -# ifndef _POSIX_PATH_MAX -# define _POSIX_PATH_MAX 256 -# endif - -# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF -# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \ - : pathconf ("/", _PC_PATH_MAX)) -# endif - -/* Don't include sys/param.h if it already has been. */ -# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN -# include -# endif - -# if !defined PATH_MAX && defined MAXPATHLEN -# define PATH_MAX MAXPATHLEN -# endif - -# ifndef PATH_MAX -# define PATH_MAX _POSIX_PATH_MAX -# endif - -#endif /* _PATHMAX_H */ diff --git a/gnulib/lib/perror.c b/gnulib/lib/perror.c deleted file mode 100644 index 2c13a89..0000000 --- a/gnulib/lib/perror.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Print a message describing error code. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - Written by Bruno Haible and Simon Josefsson. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include - -void -perror (const char *string) -{ - const char *errno_description = strerror (errno); - - if (string != NULL && *string != '\0') - fprintf (stderr, "%s: %s\n", string, errno_description); - else - fprintf (stderr, "%s\n", errno_description); -} diff --git a/gnulib/lib/pipe-safer.c b/gnulib/lib/pipe-safer.c deleted file mode 100644 index 928312b..0000000 --- a/gnulib/lib/pipe-safer.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Invoke pipe, but avoid some glitches. - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -#include "unistd-safer.h" - -#include -#include - -/* Like pipe, but ensure that neither of the file descriptors is - STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. Fail with ENOSYS on - platforms that lack pipe. */ - -int -pipe_safer (int fd[2]) -{ -#if HAVE_PIPE - if (pipe (fd) == 0) - { - int i; - for (i = 0; i < 2; i++) - { - fd[i] = fd_safer (fd[i]); - if (fd[i] < 0) - { - int e = errno; - close (fd[1 - i]); - errno = e; - return -1; - } - } - - return 0; - } -#else - errno = ENOSYS; -#endif - - return -1; -} diff --git a/gnulib/lib/printf-args.c b/gnulib/lib/printf-args.c deleted file mode 100644 index 8f3727b..0000000 --- a/gnulib/lib/printf-args.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2011 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This file can be parametrized with the following macros: - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. - PRINTF_FETCHARGS Name of the function to be defined. - STATIC Set to 'static' to declare the function static. */ - -#ifndef PRINTF_FETCHARGS -# include -#endif - -/* Specification. */ -#ifndef PRINTF_FETCHARGS -# include "printf-args.h" -#endif - -#ifdef STATIC -STATIC -#endif -int -PRINTF_FETCHARGS (va_list args, arguments *a) -{ - size_t i; - argument *ap; - - for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) - switch (ap->type) - { - case TYPE_SCHAR: - ap->a.a_schar = va_arg (args, /*signed char*/ int); - break; - case TYPE_UCHAR: - ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); - break; - case TYPE_SHORT: - ap->a.a_short = va_arg (args, /*short*/ int); - break; - case TYPE_USHORT: - ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); - break; - case TYPE_INT: - ap->a.a_int = va_arg (args, int); - break; - case TYPE_UINT: - ap->a.a_uint = va_arg (args, unsigned int); - break; - case TYPE_LONGINT: - ap->a.a_longint = va_arg (args, long int); - break; - case TYPE_ULONGINT: - ap->a.a_ulongint = va_arg (args, unsigned long int); - break; -#if HAVE_LONG_LONG_INT - case TYPE_LONGLONGINT: - ap->a.a_longlongint = va_arg (args, long long int); - break; - case TYPE_ULONGLONGINT: - ap->a.a_ulonglongint = va_arg (args, unsigned long long int); - break; -#endif - case TYPE_DOUBLE: - ap->a.a_double = va_arg (args, double); - break; - case TYPE_LONGDOUBLE: - ap->a.a_longdouble = va_arg (args, long double); - break; - case TYPE_CHAR: - ap->a.a_char = va_arg (args, int); - break; -#if HAVE_WINT_T - case TYPE_WIDE_CHAR: - /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by - default argument promotions", this is not the case in mingw32, - where wint_t is 'unsigned short'. */ - ap->a.a_wide_char = - (sizeof (wint_t) < sizeof (int) - ? (wint_t) va_arg (args, int) - : va_arg (args, wint_t)); - break; -#endif - case TYPE_STRING: - ap->a.a_string = va_arg (args, const char *); - /* A null pointer is an invalid argument for "%s", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_string == NULL) - ap->a.a_string = "(NULL)"; - break; -#if HAVE_WCHAR_T - case TYPE_WIDE_STRING: - ap->a.a_wide_string = va_arg (args, const wchar_t *); - /* A null pointer is an invalid argument for "%ls", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_wide_string == NULL) - { - static const wchar_t wide_null_string[] = - { - (wchar_t)'(', - (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', - (wchar_t)')', - (wchar_t)0 - }; - ap->a.a_wide_string = wide_null_string; - } - break; -#endif - case TYPE_POINTER: - ap->a.a_pointer = va_arg (args, void *); - break; - case TYPE_COUNT_SCHAR_POINTER: - ap->a.a_count_schar_pointer = va_arg (args, signed char *); - break; - case TYPE_COUNT_SHORT_POINTER: - ap->a.a_count_short_pointer = va_arg (args, short *); - break; - case TYPE_COUNT_INT_POINTER: - ap->a.a_count_int_pointer = va_arg (args, int *); - break; - case TYPE_COUNT_LONGINT_POINTER: - ap->a.a_count_longint_pointer = va_arg (args, long int *); - break; -#if HAVE_LONG_LONG_INT - case TYPE_COUNT_LONGLONGINT_POINTER: - ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); - break; -#endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - case TYPE_U8_STRING: - ap->a.a_u8_string = va_arg (args, const uint8_t *); - /* A null pointer is an invalid argument for "%U", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_u8_string == NULL) - { - static const uint8_t u8_null_string[] = - { '(', 'N', 'U', 'L', 'L', ')', 0 }; - ap->a.a_u8_string = u8_null_string; - } - break; - case TYPE_U16_STRING: - ap->a.a_u16_string = va_arg (args, const uint16_t *); - /* A null pointer is an invalid argument for "%lU", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_u16_string == NULL) - { - static const uint16_t u16_null_string[] = - { '(', 'N', 'U', 'L', 'L', ')', 0 }; - ap->a.a_u16_string = u16_null_string; - } - break; - case TYPE_U32_STRING: - ap->a.a_u32_string = va_arg (args, const uint32_t *); - /* A null pointer is an invalid argument for "%llU", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_u32_string == NULL) - { - static const uint32_t u32_null_string[] = - { '(', 'N', 'U', 'L', 'L', ')', 0 }; - ap->a.a_u32_string = u32_null_string; - } - break; -#endif - default: - /* Unknown type. */ - return -1; - } - return 0; -} diff --git a/gnulib/lib/printf-args.h b/gnulib/lib/printf-args.h deleted file mode 100644 index 70cca4f..0000000 --- a/gnulib/lib/printf-args.h +++ /dev/null @@ -1,159 +0,0 @@ -/* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2006-2007, 2011 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _PRINTF_ARGS_H -#define _PRINTF_ARGS_H - -/* This file can be parametrized with the following macros: - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. - PRINTF_FETCHARGS Name of the function to be declared. - STATIC Set to 'static' to declare the function static. */ - -/* Default parameters. */ -#ifndef PRINTF_FETCHARGS -# define PRINTF_FETCHARGS printf_fetchargs -#endif - -/* Get size_t. */ -#include - -/* Get wchar_t. */ -#if HAVE_WCHAR_T -# include -#endif - -/* Get wint_t. */ -#if HAVE_WINT_T -# include -#endif - -/* Get va_list. */ -#include - - -/* Argument types */ -typedef enum -{ - TYPE_NONE, - TYPE_SCHAR, - TYPE_UCHAR, - TYPE_SHORT, - TYPE_USHORT, - TYPE_INT, - TYPE_UINT, - TYPE_LONGINT, - TYPE_ULONGINT, -#if HAVE_LONG_LONG_INT - TYPE_LONGLONGINT, - TYPE_ULONGLONGINT, -#endif - TYPE_DOUBLE, - TYPE_LONGDOUBLE, - TYPE_CHAR, -#if HAVE_WINT_T - TYPE_WIDE_CHAR, -#endif - TYPE_STRING, -#if HAVE_WCHAR_T - TYPE_WIDE_STRING, -#endif - TYPE_POINTER, - TYPE_COUNT_SCHAR_POINTER, - TYPE_COUNT_SHORT_POINTER, - TYPE_COUNT_INT_POINTER, - TYPE_COUNT_LONGINT_POINTER -#if HAVE_LONG_LONG_INT -, TYPE_COUNT_LONGLONGINT_POINTER -#endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ -, TYPE_U8_STRING -, TYPE_U16_STRING -, TYPE_U32_STRING -#endif -} arg_type; - -/* Polymorphic argument */ -typedef struct -{ - arg_type type; - union - { - signed char a_schar; - unsigned char a_uchar; - short a_short; - unsigned short a_ushort; - int a_int; - unsigned int a_uint; - long int a_longint; - unsigned long int a_ulongint; -#if HAVE_LONG_LONG_INT - long long int a_longlongint; - unsigned long long int a_ulonglongint; -#endif - float a_float; - double a_double; - long double a_longdouble; - int a_char; -#if HAVE_WINT_T - wint_t a_wide_char; -#endif - const char* a_string; -#if HAVE_WCHAR_T - const wchar_t* a_wide_string; -#endif - void* a_pointer; - signed char * a_count_schar_pointer; - short * a_count_short_pointer; - int * a_count_int_pointer; - long int * a_count_longint_pointer; -#if HAVE_LONG_LONG_INT - long long int * a_count_longlongint_pointer; -#endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - const uint8_t * a_u8_string; - const uint16_t * a_u16_string; - const uint32_t * a_u32_string; -#endif - } - a; -} -argument; - -/* Number of directly allocated arguments (no malloc() needed). */ -#define N_DIRECT_ALLOC_ARGUMENTS 7 - -typedef struct -{ - size_t count; - argument *arg; - argument direct_alloc_arg[N_DIRECT_ALLOC_ARGUMENTS]; -} -arguments; - - -/* Fetch the arguments, putting them into a. */ -#ifdef STATIC -STATIC -#else -extern -#endif -int PRINTF_FETCHARGS (va_list args, arguments *a); - -#endif /* _PRINTF_ARGS_H */ diff --git a/gnulib/lib/printf-parse.c b/gnulib/lib/printf-parse.c deleted file mode 100644 index ff24ba4..0000000 --- a/gnulib/lib/printf-parse.c +++ /dev/null @@ -1,639 +0,0 @@ -/* Formatted output to strings. - Copyright (C) 1999-2000, 2002-2003, 2006-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This file can be parametrized with the following macros: - CHAR_T The element type of the format string. - CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters - in the format string are ASCII. - DIRECTIVE Structure denoting a format directive. - Depends on CHAR_T. - DIRECTIVES Structure denoting the set of format directives of a - format string. Depends on CHAR_T. - PRINTF_PARSE Function that parses a format string. - Depends on CHAR_T. - STATIC Set to 'static' to declare the function static. - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ - -#ifndef PRINTF_PARSE -# include -#endif - -/* Specification. */ -#ifndef PRINTF_PARSE -# include "printf-parse.h" -#endif - -/* Default parameters. */ -#ifndef PRINTF_PARSE -# define PRINTF_PARSE printf_parse -# define CHAR_T char -# define DIRECTIVE char_directive -# define DIRECTIVES char_directives -#endif - -/* Get size_t, NULL. */ -#include - -/* Get intmax_t. */ -#if defined IN_LIBINTL || defined IN_LIBASPRINTF -# if HAVE_STDINT_H_WITH_UINTMAX -# include -# endif -# if HAVE_INTTYPES_H_WITH_UINTMAX -# include -# endif -#else -# include -#endif - -/* malloc(), realloc(), free(). */ -#include - -/* memcpy(). */ -#include - -/* errno. */ -#include - -/* Checked size_t computations. */ -#include "xsize.h" - -#if CHAR_T_ONLY_ASCII -/* c_isascii(). */ -# include "c-ctype.h" -#endif - -#ifdef STATIC -STATIC -#endif -int -PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) -{ - const CHAR_T *cp = format; /* pointer into format */ - size_t arg_posn = 0; /* number of regular arguments consumed */ - size_t d_allocated; /* allocated elements of d->dir */ - size_t a_allocated; /* allocated elements of a->arg */ - size_t max_width_length = 0; - size_t max_precision_length = 0; - - d->count = 0; - d_allocated = N_DIRECT_ALLOC_DIRECTIVES; - d->dir = d->direct_alloc_dir; - - a->count = 0; - a_allocated = N_DIRECT_ALLOC_ARGUMENTS; - a->arg = a->direct_alloc_arg; - -#define REGISTER_ARG(_index_,_type_) \ - { \ - size_t n = (_index_); \ - if (n >= a_allocated) \ - { \ - size_t memory_size; \ - argument *memory; \ - \ - a_allocated = xtimes (a_allocated, 2); \ - if (a_allocated <= n) \ - a_allocated = xsum (n, 1); \ - memory_size = xtimes (a_allocated, sizeof (argument)); \ - if (size_overflow_p (memory_size)) \ - /* Overflow, would lead to out of memory. */ \ - goto out_of_memory; \ - memory = (argument *) (a->arg != a->direct_alloc_arg \ - ? realloc (a->arg, memory_size) \ - : malloc (memory_size)); \ - if (memory == NULL) \ - /* Out of memory. */ \ - goto out_of_memory; \ - if (a->arg == a->direct_alloc_arg) \ - memcpy (memory, a->arg, a->count * sizeof (argument)); \ - a->arg = memory; \ - } \ - while (a->count <= n) \ - a->arg[a->count++].type = TYPE_NONE; \ - if (a->arg[n].type == TYPE_NONE) \ - a->arg[n].type = (_type_); \ - else if (a->arg[n].type != (_type_)) \ - /* Ambiguous type for positional argument. */ \ - goto error; \ - } - - while (*cp != '\0') - { - CHAR_T c = *cp++; - if (c == '%') - { - size_t arg_index = ARG_NONE; - DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ - - /* Initialize the next directive. */ - dp->dir_start = cp - 1; - dp->flags = 0; - dp->width_start = NULL; - dp->width_end = NULL; - dp->width_arg_index = ARG_NONE; - dp->precision_start = NULL; - dp->precision_end = NULL; - dp->precision_arg_index = ARG_NONE; - dp->arg_index = ARG_NONE; - - /* Test for positional argument. */ - if (*cp >= '0' && *cp <= '9') - { - const CHAR_T *np; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - ; - if (*np == '$') - { - size_t n = 0; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - n = xsum (xtimes (n, 10), *np - '0'); - if (n == 0) - /* Positional argument 0. */ - goto error; - if (size_overflow_p (n)) - /* n too large, would lead to out of memory later. */ - goto error; - arg_index = n - 1; - cp = np + 1; - } - } - - /* Read the flags. */ - for (;;) - { - if (*cp == '\'') - { - dp->flags |= FLAG_GROUP; - cp++; - } - else if (*cp == '-') - { - dp->flags |= FLAG_LEFT; - cp++; - } - else if (*cp == '+') - { - dp->flags |= FLAG_SHOWSIGN; - cp++; - } - else if (*cp == ' ') - { - dp->flags |= FLAG_SPACE; - cp++; - } - else if (*cp == '#') - { - dp->flags |= FLAG_ALT; - cp++; - } - else if (*cp == '0') - { - dp->flags |= FLAG_ZERO; - cp++; - } -#if __GLIBC__ >= 2 && !defined __UCLIBC__ - else if (*cp == 'I') - { - dp->flags |= FLAG_LOCALIZED; - cp++; - } -#endif - else - break; - } - - /* Parse the field width. */ - if (*cp == '*') - { - dp->width_start = cp; - cp++; - dp->width_end = cp; - if (max_width_length < 1) - max_width_length = 1; - - /* Test for positional argument. */ - if (*cp >= '0' && *cp <= '9') - { - const CHAR_T *np; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - ; - if (*np == '$') - { - size_t n = 0; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - n = xsum (xtimes (n, 10), *np - '0'); - if (n == 0) - /* Positional argument 0. */ - goto error; - if (size_overflow_p (n)) - /* n too large, would lead to out of memory later. */ - goto error; - dp->width_arg_index = n - 1; - cp = np + 1; - } - } - if (dp->width_arg_index == ARG_NONE) - { - dp->width_arg_index = arg_posn++; - if (dp->width_arg_index == ARG_NONE) - /* arg_posn wrapped around. */ - goto error; - } - REGISTER_ARG (dp->width_arg_index, TYPE_INT); - } - else if (*cp >= '0' && *cp <= '9') - { - size_t width_length; - - dp->width_start = cp; - for (; *cp >= '0' && *cp <= '9'; cp++) - ; - dp->width_end = cp; - width_length = dp->width_end - dp->width_start; - if (max_width_length < width_length) - max_width_length = width_length; - } - - /* Parse the precision. */ - if (*cp == '.') - { - cp++; - if (*cp == '*') - { - dp->precision_start = cp - 1; - cp++; - dp->precision_end = cp; - if (max_precision_length < 2) - max_precision_length = 2; - - /* Test for positional argument. */ - if (*cp >= '0' && *cp <= '9') - { - const CHAR_T *np; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - ; - if (*np == '$') - { - size_t n = 0; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - n = xsum (xtimes (n, 10), *np - '0'); - if (n == 0) - /* Positional argument 0. */ - goto error; - if (size_overflow_p (n)) - /* n too large, would lead to out of memory - later. */ - goto error; - dp->precision_arg_index = n - 1; - cp = np + 1; - } - } - if (dp->precision_arg_index == ARG_NONE) - { - dp->precision_arg_index = arg_posn++; - if (dp->precision_arg_index == ARG_NONE) - /* arg_posn wrapped around. */ - goto error; - } - REGISTER_ARG (dp->precision_arg_index, TYPE_INT); - } - else - { - size_t precision_length; - - dp->precision_start = cp - 1; - for (; *cp >= '0' && *cp <= '9'; cp++) - ; - dp->precision_end = cp; - precision_length = dp->precision_end - dp->precision_start; - if (max_precision_length < precision_length) - max_precision_length = precision_length; - } - } - - { - arg_type type; - - /* Parse argument type/size specifiers. */ - { - int flags = 0; - - for (;;) - { - if (*cp == 'h') - { - flags |= (1 << (flags & 1)); - cp++; - } - else if (*cp == 'L') - { - flags |= 4; - cp++; - } - else if (*cp == 'l') - { - flags += 8; - cp++; - } - else if (*cp == 'j') - { - if (sizeof (intmax_t) > sizeof (long)) - { - /* intmax_t = long long */ - flags += 16; - } - else if (sizeof (intmax_t) > sizeof (int)) - { - /* intmax_t = long */ - flags += 8; - } - cp++; - } - else if (*cp == 'z' || *cp == 'Z') - { - /* 'z' is standardized in ISO C 99, but glibc uses 'Z' - because the warning facility in gcc-2.95.2 understands - only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ - if (sizeof (size_t) > sizeof (long)) - { - /* size_t = long long */ - flags += 16; - } - else if (sizeof (size_t) > sizeof (int)) - { - /* size_t = long */ - flags += 8; - } - cp++; - } - else if (*cp == 't') - { - if (sizeof (ptrdiff_t) > sizeof (long)) - { - /* ptrdiff_t = long long */ - flags += 16; - } - else if (sizeof (ptrdiff_t) > sizeof (int)) - { - /* ptrdiff_t = long */ - flags += 8; - } - cp++; - } -#if defined __APPLE__ && defined __MACH__ - /* On MacOS 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') - { - if (64 / 8 > sizeof (long)) - { - /* int64_t = long long */ - flags += 16; - } - else - { - /* int64_t = long */ - flags += 8; - } - cp++; - } -#endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On native Win32, PRIdMAX is defined as "I64d". - We cannot change it to "lld" because PRIdMAX must also - be understood by the system's printf routines. */ - else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') - { - if (64 / 8 > sizeof (long)) - { - /* __int64 = long long */ - flags += 16; - } - else - { - /* __int64 = long */ - flags += 8; - } - cp += 3; - } -#endif - else - break; - } - - /* Read the conversion character. */ - c = *cp++; - switch (c) - { - case 'd': case 'i': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ - if (flags >= 16 || (flags & 4)) - type = TYPE_LONGLONGINT; - else -#endif - /* If 'long long' exists and is the same as 'long', we parse - "lld" into TYPE_LONGINT. */ - if (flags >= 8) - type = TYPE_LONGINT; - else if (flags & 2) - type = TYPE_SCHAR; - else if (flags & 1) - type = TYPE_SHORT; - else - type = TYPE_INT; - break; - case 'o': case 'u': case 'x': case 'X': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ - if (flags >= 16 || (flags & 4)) - type = TYPE_ULONGLONGINT; - else -#endif - /* If 'unsigned long long' exists and is the same as - 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ - if (flags >= 8) - type = TYPE_ULONGINT; - else if (flags & 2) - type = TYPE_UCHAR; - else if (flags & 1) - type = TYPE_USHORT; - else - type = TYPE_UINT; - break; - case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': - case 'a': case 'A': - if (flags >= 16 || (flags & 4)) - type = TYPE_LONGDOUBLE; - else - type = TYPE_DOUBLE; - break; - case 'c': - if (flags >= 8) -#if HAVE_WINT_T - type = TYPE_WIDE_CHAR; -#else - goto error; -#endif - else - type = TYPE_CHAR; - break; -#if HAVE_WINT_T - case 'C': - type = TYPE_WIDE_CHAR; - c = 'c'; - break; -#endif - case 's': - if (flags >= 8) -#if HAVE_WCHAR_T - type = TYPE_WIDE_STRING; -#else - goto error; -#endif - else - type = TYPE_STRING; - break; -#if HAVE_WCHAR_T - case 'S': - type = TYPE_WIDE_STRING; - c = 's'; - break; -#endif - case 'p': - type = TYPE_POINTER; - break; - case 'n': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ - if (flags >= 16 || (flags & 4)) - type = TYPE_COUNT_LONGLONGINT_POINTER; - else -#endif - /* If 'long long' exists and is the same as 'long', we parse - "lln" into TYPE_COUNT_LONGINT_POINTER. */ - if (flags >= 8) - type = TYPE_COUNT_LONGINT_POINTER; - else if (flags & 2) - type = TYPE_COUNT_SCHAR_POINTER; - else if (flags & 1) - type = TYPE_COUNT_SHORT_POINTER; - else - type = TYPE_COUNT_INT_POINTER; - break; -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - case 'U': - if (flags >= 16) - type = TYPE_U32_STRING; - else if (flags >= 8) - type = TYPE_U16_STRING; - else - type = TYPE_U8_STRING; - break; -#endif - case '%': - type = TYPE_NONE; - break; - default: - /* Unknown conversion character. */ - goto error; - } - } - - if (type != TYPE_NONE) - { - dp->arg_index = arg_index; - if (dp->arg_index == ARG_NONE) - { - dp->arg_index = arg_posn++; - if (dp->arg_index == ARG_NONE) - /* arg_posn wrapped around. */ - goto error; - } - REGISTER_ARG (dp->arg_index, type); - } - dp->conversion = c; - dp->dir_end = cp; - } - - d->count++; - if (d->count >= d_allocated) - { - size_t memory_size; - DIRECTIVE *memory; - - d_allocated = xtimes (d_allocated, 2); - memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); - if (size_overflow_p (memory_size)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir - ? realloc (d->dir, memory_size) - : malloc (memory_size)); - if (memory == NULL) - /* Out of memory. */ - goto out_of_memory; - if (d->dir == d->direct_alloc_dir) - memcpy (memory, d->dir, d->count * sizeof (DIRECTIVE)); - d->dir = memory; - } - } -#if CHAR_T_ONLY_ASCII - else if (!c_isascii (c)) - { - /* Non-ASCII character. Not supported. */ - goto error; - } -#endif - } - d->dir[d->count].dir_start = cp; - - d->max_width_length = max_width_length; - d->max_precision_length = max_precision_length; - return 0; - -error: - if (a->arg != a->direct_alloc_arg) - free (a->arg); - if (d->dir != d->direct_alloc_dir) - free (d->dir); - errno = EINVAL; - return -1; - -out_of_memory: - if (a->arg != a->direct_alloc_arg) - free (a->arg); - if (d->dir != d->direct_alloc_dir) - free (d->dir); - errno = ENOMEM; - return -1; -} - -#undef PRINTF_PARSE -#undef DIRECTIVES -#undef DIRECTIVE -#undef CHAR_T_ONLY_ASCII -#undef CHAR_T diff --git a/gnulib/lib/printf-parse.h b/gnulib/lib/printf-parse.h deleted file mode 100644 index 76e5ba3..0000000 --- a/gnulib/lib/printf-parse.h +++ /dev/null @@ -1,194 +0,0 @@ -/* Parse printf format string. - Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2011 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _PRINTF_PARSE_H -#define _PRINTF_PARSE_H - -/* This file can be parametrized with the following macros: - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. - STATIC Set to 'static' to declare the function static. */ - -#if HAVE_FEATURES_H -# include /* for __GLIBC__, __UCLIBC__ */ -#endif - -#include "printf-args.h" - - -/* Flags */ -#define FLAG_GROUP 1 /* ' flag */ -#define FLAG_LEFT 2 /* - flag */ -#define FLAG_SHOWSIGN 4 /* + flag */ -#define FLAG_SPACE 8 /* space flag */ -#define FLAG_ALT 16 /* # flag */ -#define FLAG_ZERO 32 -#if __GLIBC__ >= 2 && !defined __UCLIBC__ -# define FLAG_LOCALIZED 64 /* I flag, uses localized digits */ -#endif - -/* arg_index value indicating that no argument is consumed. */ -#define ARG_NONE (~(size_t)0) - -/* xxx_directive: A parsed directive. - xxx_directives: A parsed format string. */ - -/* Number of directly allocated directives (no malloc() needed). */ -#define N_DIRECT_ALLOC_DIRECTIVES 7 - -/* A parsed directive. */ -typedef struct -{ - const char* dir_start; - const char* dir_end; - int flags; - const char* width_start; - const char* width_end; - size_t width_arg_index; - const char* precision_start; - const char* precision_end; - size_t precision_arg_index; - char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -char_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - char_directive *dir; - size_t max_width_length; - size_t max_precision_length; - char_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; -} -char_directives; - -#if ENABLE_UNISTDIO - -/* A parsed directive. */ -typedef struct -{ - const uint8_t* dir_start; - const uint8_t* dir_end; - int flags; - const uint8_t* width_start; - const uint8_t* width_end; - size_t width_arg_index; - const uint8_t* precision_start; - const uint8_t* precision_end; - size_t precision_arg_index; - uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -u8_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - u8_directive *dir; - size_t max_width_length; - size_t max_precision_length; - u8_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; -} -u8_directives; - -/* A parsed directive. */ -typedef struct -{ - const uint16_t* dir_start; - const uint16_t* dir_end; - int flags; - const uint16_t* width_start; - const uint16_t* width_end; - size_t width_arg_index; - const uint16_t* precision_start; - const uint16_t* precision_end; - size_t precision_arg_index; - uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -u16_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - u16_directive *dir; - size_t max_width_length; - size_t max_precision_length; - u16_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; -} -u16_directives; - -/* A parsed directive. */ -typedef struct -{ - const uint32_t* dir_start; - const uint32_t* dir_end; - int flags; - const uint32_t* width_start; - const uint32_t* width_end; - size_t width_arg_index; - const uint32_t* precision_start; - const uint32_t* precision_end; - size_t precision_arg_index; - uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -u32_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - u32_directive *dir; - size_t max_width_length; - size_t max_precision_length; - u32_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; -} -u32_directives; - -#endif - - -/* Parses the format string. Fills in the number N of directives, and fills - in directives[0], ..., directives[N-1], and sets directives[N].dir_start - to the end of the format string. Also fills in the arg_type fields of the - arguments and the needed count of arguments. */ -#if ENABLE_UNISTDIO -extern int - ulc_printf_parse (const char *format, char_directives *d, arguments *a); -extern int - u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a); -extern int - u16_printf_parse (const uint16_t *format, u16_directives *d, - arguments *a); -extern int - u32_printf_parse (const uint32_t *format, u32_directives *d, - arguments *a); -#else -# ifdef STATIC -STATIC -# else -extern -# endif -int printf_parse (const char *format, char_directives *d, arguments *a); -#endif - -#endif /* _PRINTF_PARSE_H */ diff --git a/gnulib/lib/progname.c b/gnulib/lib/progname.c deleted file mode 100644 index 2465748..0000000 --- a/gnulib/lib/progname.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Program name management. - Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2001. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - - -#include - -/* Specification. */ -#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */ -#include "progname.h" - -#include /* get program_invocation_name declaration */ -#include -#include -#include - - -/* String containing name the program is called with. - To be initialized by main(). */ -const char *program_name = NULL; - -/* Set program_name, based on argv[0]. - argv0 must be a string allocated with indefinite extent, and must not be - modified after this call. */ -void -set_program_name (const char *argv0) -{ - /* libtool creates a temporary executable whose name is sometimes prefixed - with "lt-" (depends on the platform). It also makes argv[0] absolute. - But the name of the temporary executable is a detail that should not be - visible to the end user and to the test suite. - Remove this "/.libs/" or "/.libs/lt-" prefix here. */ - const char *slash; - const char *base; - - /* Sanity check. POSIX requires the invoking process to pass a non-NULL - argv[0]. */ - if (argv0 == NULL) - { - /* It's a bug in the invoking program. Help diagnosing it. */ - fputs ("A NULL argv[0] was passed through an exec system call.\n", - stderr); - abort (); - } - - slash = strrchr (argv0, '/'); - base = (slash != NULL ? slash + 1 : argv0); - if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0) - { - argv0 = base; - if (strncmp (base, "lt-", 3) == 0) - { - argv0 = base + 3; - /* On glibc systems, remove the "lt-" prefix from the variable - program_invocation_short_name. */ -#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME - program_invocation_short_name = (char *) argv0; -#endif - } - } - - /* But don't strip off a leading / in general, because when the user - runs - /some/hidden/place/bin/cp foo foo - he should get the error message - /some/hidden/place/bin/cp: `foo' and `foo' are the same file - not - cp: `foo' and `foo' are the same file - */ - - program_name = argv0; - - /* On glibc systems, the error() function comes from libc and uses the - variable program_invocation_name, not program_name. So set this variable - as well. */ -#if HAVE_DECL_PROGRAM_INVOCATION_NAME - program_invocation_name = (char *) argv0; -#endif -} diff --git a/gnulib/lib/progname.h b/gnulib/lib/progname.h deleted file mode 100644 index 0844066..0000000 --- a/gnulib/lib/progname.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Program name management. - Copyright (C) 2001-2004, 2006, 2009-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2001. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _PROGNAME_H -#define _PROGNAME_H - -/* Programs using this file should do the following in main(): - set_program_name (argv[0]); - */ - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* String containing name the program is called with. */ -extern const char *program_name; - -/* Set program_name, based on argv[0]. - argv0 must be a string allocated with indefinite extent, and must not be - modified after this call. */ -extern void set_program_name (const char *argv0); - -#if ENABLE_RELOCATABLE - -/* Set program_name, based on argv[0], and original installation prefix and - directory, for relocatability. */ -extern void set_program_name_and_installdir (const char *argv0, - const char *orig_installprefix, - const char *orig_installdir); -#undef set_program_name -#define set_program_name(ARG0) \ - set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR) - -/* Return the full pathname of the current executable, based on the earlier - call to set_program_name_and_installdir. Return NULL if unknown. */ -extern char *get_full_program_name (void); - -#endif - - -#ifdef __cplusplus -} -#endif - - -#endif /* _PROGNAME_H */ diff --git a/gnulib/lib/quote.c b/gnulib/lib/quote.c deleted file mode 100644 index 1989c8c..0000000 --- a/gnulib/lib/quote.c +++ /dev/null @@ -1,40 +0,0 @@ -/* quote.c - quote arguments for output - - Copyright (C) 1998-2001, 2003, 2005-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert */ - -#include - -#include "quotearg.h" -#include "quote.h" - -/* Return an unambiguous printable representation of NAME, - allocated in slot N, suitable for diagnostics. */ -char const * -quote_n (int n, char const *name) -{ - return quotearg_n_style (n, locale_quoting_style, name); -} - -/* Return an unambiguous printable representation of NAME, - suitable for diagnostics. */ -char const * -quote (char const *name) -{ - return quote_n (0, name); -} diff --git a/gnulib/lib/quote.h b/gnulib/lib/quote.h deleted file mode 100644 index d0acb51..0000000 --- a/gnulib/lib/quote.h +++ /dev/null @@ -1,20 +0,0 @@ -/* quote.h - prototypes for quote.c - - Copyright (C) 1998-2001, 2003, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - - -char const *quote_n (int n, char const *name); -char const *quote (char const *name); diff --git a/gnulib/lib/quotearg.c b/gnulib/lib/quotearg.c deleted file mode 100644 index fb49559..0000000 --- a/gnulib/lib/quotearg.c +++ /dev/null @@ -1,888 +0,0 @@ -/* quotearg.c - quote arguments for output - - Copyright (C) 1998-2002, 2004-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert */ - -#include - -#include "quotearg.h" - -#include "xalloc.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "gettext.h" -#define _(msgid) gettext (msgid) -#define N_(msgid) msgid - -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif - -#define INT_BITS (sizeof (int) * CHAR_BIT) - -struct quoting_options -{ - /* Basic quoting style. */ - enum quoting_style style; - - /* Additional flags. Bitwise combination of enum quoting_flags. */ - int flags; - - /* Quote the characters indicated by this bit vector even if the - quoting style would not normally require them to be quoted. */ - unsigned int quote_these_too[(UCHAR_MAX / INT_BITS) + 1]; - - /* The left quote for custom_quoting_style. */ - char const *left_quote; - - /* The right quote for custom_quoting_style. */ - char const *right_quote; -}; - -/* Names of quoting styles. */ -char const *const quoting_style_args[] = -{ - "literal", - "shell", - "shell-always", - "c", - "c-maybe", - "escape", - "locale", - "clocale", - 0 -}; - -/* Correspondences to quoting style names. */ -enum quoting_style const quoting_style_vals[] = -{ - literal_quoting_style, - shell_quoting_style, - shell_always_quoting_style, - c_quoting_style, - c_maybe_quoting_style, - escape_quoting_style, - locale_quoting_style, - clocale_quoting_style -}; - -/* The default quoting options. */ -static struct quoting_options default_quoting_options; - -/* Allocate a new set of quoting options, with contents initially identical - to O if O is not null, or to the default if O is null. - It is the caller's responsibility to free the result. */ -struct quoting_options * -clone_quoting_options (struct quoting_options *o) -{ - int e = errno; - struct quoting_options *p = xmemdup (o ? o : &default_quoting_options, - sizeof *o); - errno = e; - return p; -} - -/* Get the value of O's quoting style. If O is null, use the default. */ -enum quoting_style -get_quoting_style (struct quoting_options *o) -{ - return (o ? o : &default_quoting_options)->style; -} - -/* In O (or in the default if O is null), - set the value of the quoting style to S. */ -void -set_quoting_style (struct quoting_options *o, enum quoting_style s) -{ - (o ? o : &default_quoting_options)->style = s; -} - -/* In O (or in the default if O is null), - set the value of the quoting options for character C to I. - Return the old value. Currently, the only values defined for I are - 0 (the default) and 1 (which means to quote the character even if - it would not otherwise be quoted). */ -int -set_char_quoting (struct quoting_options *o, char c, int i) -{ - unsigned char uc = c; - unsigned int *p = - (o ? o : &default_quoting_options)->quote_these_too + uc / INT_BITS; - int shift = uc % INT_BITS; - int r = (*p >> shift) & 1; - *p ^= ((i & 1) ^ r) << shift; - return r; -} - -/* In O (or in the default if O is null), - set the value of the quoting options flag to I, which can be a - bitwise combination of enum quoting_flags, or 0 for default - behavior. Return the old value. */ -int -set_quoting_flags (struct quoting_options *o, int i) -{ - int r; - if (!o) - o = &default_quoting_options; - r = o->flags; - o->flags = i; - return r; -} - -void -set_custom_quoting (struct quoting_options *o, - char const *left_quote, char const *right_quote) -{ - if (!o) - o = &default_quoting_options; - o->style = custom_quoting_style; - if (!left_quote || !right_quote) - abort (); - o->left_quote = left_quote; - o->right_quote = right_quote; -} - -/* Return quoting options for STYLE, with no extra quoting. */ -static struct quoting_options -quoting_options_from_style (enum quoting_style style) -{ - struct quoting_options o; - o.style = style; - o.flags = 0; - memset (o.quote_these_too, 0, sizeof o.quote_these_too); - return o; -} - -/* MSGID approximates a quotation mark. Return its translation if it - has one; otherwise, return either it or "\"", depending on S. */ -static char const * -gettext_quote (char const *msgid, enum quoting_style s) -{ - char const *translation = _(msgid); - if (translation == msgid && s == clocale_quoting_style) - translation = "\""; - return translation; -} - -/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of - argument ARG (of size ARGSIZE), using QUOTING_STYLE, FLAGS, and - QUOTE_THESE_TOO to control quoting. - Terminate the output with a null character, and return the written - size of the output, not counting the terminating null. - If BUFFERSIZE is too small to store the output string, return the - value that would have been returned had BUFFERSIZE been large enough. - If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE. - - This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG, - ARGSIZE, O), except it breaks O into its component pieces and is - not careful about errno. */ - -static size_t -quotearg_buffer_restyled (char *buffer, size_t buffersize, - char const *arg, size_t argsize, - enum quoting_style quoting_style, int flags, - unsigned int const *quote_these_too, - char const *left_quote, - char const *right_quote) -{ - size_t i; - size_t len = 0; - char const *quote_string = 0; - size_t quote_string_len = 0; - bool backslash_escapes = false; - bool unibyte_locale = MB_CUR_MAX == 1; - bool elide_outer_quotes = (flags & QA_ELIDE_OUTER_QUOTES) != 0; - -#define STORE(c) \ - do \ - { \ - if (len < buffersize) \ - buffer[len] = (c); \ - len++; \ - } \ - while (0) - - switch (quoting_style) - { - case c_maybe_quoting_style: - quoting_style = c_quoting_style; - elide_outer_quotes = true; - /* Fall through. */ - case c_quoting_style: - if (!elide_outer_quotes) - STORE ('"'); - backslash_escapes = true; - quote_string = "\""; - quote_string_len = 1; - break; - - case escape_quoting_style: - backslash_escapes = true; - elide_outer_quotes = false; - break; - - case locale_quoting_style: - case clocale_quoting_style: - case custom_quoting_style: - { - if (quoting_style != custom_quoting_style) - { - /* TRANSLATORS: - Get translations for open and closing quotation marks. - - The message catalog should translate "`" to a left - quotation mark suitable for the locale, and similarly for - "'". If the catalog has no translation, - locale_quoting_style quotes `like this', and - clocale_quoting_style quotes "like this". - - For example, an American English Unicode locale should - translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and - should translate "'" to U+201D (RIGHT DOUBLE QUOTATION - MARK). A British English Unicode locale should instead - translate these to U+2018 (LEFT SINGLE QUOTATION MARK) - and U+2019 (RIGHT SINGLE QUOTATION MARK), respectively. - - If you don't know what to put here, please see - - and use glyphs suitable for your language. */ - left_quote = gettext_quote (N_("`"), quoting_style); - right_quote = gettext_quote (N_("'"), quoting_style); - } - if (!elide_outer_quotes) - for (quote_string = left_quote; *quote_string; quote_string++) - STORE (*quote_string); - backslash_escapes = true; - quote_string = right_quote; - quote_string_len = strlen (quote_string); - } - break; - - case shell_quoting_style: - quoting_style = shell_always_quoting_style; - elide_outer_quotes = true; - /* Fall through. */ - case shell_always_quoting_style: - if (!elide_outer_quotes) - STORE ('\''); - quote_string = "'"; - quote_string_len = 1; - break; - - case literal_quoting_style: - elide_outer_quotes = false; - break; - - default: - abort (); - } - - for (i = 0; ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); i++) - { - unsigned char c; - unsigned char esc; - bool is_right_quote = false; - - if (backslash_escapes - && quote_string_len - && i + quote_string_len <= argsize - && memcmp (arg + i, quote_string, quote_string_len) == 0) - { - if (elide_outer_quotes) - goto force_outer_quoting_style; - is_right_quote = true; - } - - c = arg[i]; - switch (c) - { - case '\0': - if (backslash_escapes) - { - if (elide_outer_quotes) - goto force_outer_quoting_style; - STORE ('\\'); - /* If quote_string were to begin with digits, we'd need to - test for the end of the arg as well. However, it's - hard to imagine any locale that would use digits in - quotes, and set_custom_quoting is documented not to - accept them. */ - if (i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9') - { - STORE ('0'); - STORE ('0'); - } - c = '0'; - /* We don't have to worry that this last '0' will be - backslash-escaped because, again, quote_string should - not start with it and because quote_these_too is - documented as not accepting it. */ - } - else if (flags & QA_ELIDE_NULL_BYTES) - continue; - break; - - case '?': - switch (quoting_style) - { - case shell_always_quoting_style: - if (elide_outer_quotes) - goto force_outer_quoting_style; - break; - - case c_quoting_style: - if ((flags & QA_SPLIT_TRIGRAPHS) - && i + 2 < argsize && arg[i + 1] == '?') - switch (arg[i + 2]) - { - case '!': case '\'': - case '(': case ')': case '-': case '/': - case '<': case '=': case '>': - /* Escape the second '?' in what would otherwise be - a trigraph. */ - if (elide_outer_quotes) - goto force_outer_quoting_style; - c = arg[i + 2]; - i += 2; - STORE ('?'); - STORE ('"'); - STORE ('"'); - STORE ('?'); - break; - - default: - break; - } - break; - - default: - break; - } - break; - - case '\a': esc = 'a'; goto c_escape; - case '\b': esc = 'b'; goto c_escape; - case '\f': esc = 'f'; goto c_escape; - case '\n': esc = 'n'; goto c_and_shell_escape; - case '\r': esc = 'r'; goto c_and_shell_escape; - case '\t': esc = 't'; goto c_and_shell_escape; - case '\v': esc = 'v'; goto c_escape; - case '\\': esc = c; - /* No need to escape the escape if we are trying to elide - outer quotes and nothing else is problematic. */ - if (backslash_escapes && elide_outer_quotes && quote_string_len) - goto store_c; - - c_and_shell_escape: - if (quoting_style == shell_always_quoting_style - && elide_outer_quotes) - goto force_outer_quoting_style; - /* Fall through. */ - c_escape: - if (backslash_escapes) - { - c = esc; - goto store_escape; - } - break; - - case '{': case '}': /* sometimes special if isolated */ - if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1)) - break; - /* Fall through. */ - case '#': case '~': - if (i != 0) - break; - /* Fall through. */ - case ' ': - case '!': /* special in bash */ - case '"': case '$': case '&': - case '(': case ')': case '*': case ';': - case '<': - case '=': /* sometimes special in 0th or (with "set -k") later args */ - case '>': case '[': - case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */ - case '`': case '|': - /* A shell special character. In theory, '$' and '`' could - be the first bytes of multibyte characters, which means - we should check them with mbrtowc, but in practice this - doesn't happen so it's not worth worrying about. */ - if (quoting_style == shell_always_quoting_style - && elide_outer_quotes) - goto force_outer_quoting_style; - break; - - case '\'': - if (quoting_style == shell_always_quoting_style) - { - if (elide_outer_quotes) - goto force_outer_quoting_style; - STORE ('\''); - STORE ('\\'); - STORE ('\''); - } - break; - - case '%': case '+': case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': case ':': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': case ']': case '_': case 'a': case 'b': - case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': - case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': - case 'o': case 'p': case 'q': case 'r': case 's': case 't': - case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': - /* These characters don't cause problems, no matter what the - quoting style is. They cannot start multibyte sequences. - A digit or a special letter would cause trouble if it - appeared at the beginning of quote_string because we'd then - escape by prepending a backslash. However, it's hard to - imagine any locale that would use digits or letters as - quotes, and set_custom_quoting is documented not to accept - them. Also, a digit or a special letter would cause - trouble if it appeared in quote_these_too, but that's also - documented as not accepting them. */ - break; - - default: - /* If we have a multibyte sequence, copy it until we reach - its end, find an error, or come back to the initial shift - state. For C-like styles, if the sequence has - unprintable characters, escape the whole sequence, since - we can't easily escape single characters within it. */ - { - /* Length of multibyte sequence found so far. */ - size_t m; - - bool printable; - - if (unibyte_locale) - { - m = 1; - printable = isprint (c) != 0; - } - else - { - mbstate_t mbstate; - memset (&mbstate, 0, sizeof mbstate); - - m = 0; - printable = true; - if (argsize == SIZE_MAX) - argsize = strlen (arg); - - do - { - wchar_t w; - size_t bytes = mbrtowc (&w, &arg[i + m], - argsize - (i + m), &mbstate); - if (bytes == 0) - break; - else if (bytes == (size_t) -1) - { - printable = false; - break; - } - else if (bytes == (size_t) -2) - { - printable = false; - while (i + m < argsize && arg[i + m]) - m++; - break; - } - else - { - /* Work around a bug with older shells that "see" a '\' - that is really the 2nd byte of a multibyte character. - In practice the problem is limited to ASCII - chars >= '@' that are shell special chars. */ - if ('[' == 0x5b && elide_outer_quotes - && quoting_style == shell_always_quoting_style) - { - size_t j; - for (j = 1; j < bytes; j++) - switch (arg[i + m + j]) - { - case '[': case '\\': case '^': - case '`': case '|': - goto force_outer_quoting_style; - - default: - break; - } - } - - if (! iswprint (w)) - printable = false; - m += bytes; - } - } - while (! mbsinit (&mbstate)); - } - - if (1 < m || (backslash_escapes && ! printable)) - { - /* Output a multibyte sequence, or an escaped - unprintable unibyte character. */ - size_t ilim = i + m; - - for (;;) - { - if (backslash_escapes && ! printable) - { - if (elide_outer_quotes) - goto force_outer_quoting_style; - STORE ('\\'); - STORE ('0' + (c >> 6)); - STORE ('0' + ((c >> 3) & 7)); - c = '0' + (c & 7); - } - else if (is_right_quote) - { - STORE ('\\'); - is_right_quote = false; - } - if (ilim <= i + 1) - break; - STORE (c); - c = arg[++i]; - } - - goto store_c; - } - } - } - - if (! ((backslash_escapes || elide_outer_quotes) - && quote_these_too - && quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))) - && !is_right_quote) - goto store_c; - - store_escape: - if (elide_outer_quotes) - goto force_outer_quoting_style; - STORE ('\\'); - - store_c: - STORE (c); - } - - if (len == 0 && quoting_style == shell_always_quoting_style - && elide_outer_quotes) - goto force_outer_quoting_style; - - if (quote_string && !elide_outer_quotes) - for (; *quote_string; quote_string++) - STORE (*quote_string); - - if (len < buffersize) - buffer[len] = '\0'; - return len; - - force_outer_quoting_style: - /* Don't reuse quote_these_too, since the addition of outer quotes - sufficiently quotes the specified characters. */ - return quotearg_buffer_restyled (buffer, buffersize, arg, argsize, - quoting_style, - flags & ~QA_ELIDE_OUTER_QUOTES, NULL, - left_quote, right_quote); -} - -/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of - argument ARG (of size ARGSIZE), using O to control quoting. - If O is null, use the default. - Terminate the output with a null character, and return the written - size of the output, not counting the terminating null. - If BUFFERSIZE is too small to store the output string, return the - value that would have been returned had BUFFERSIZE been large enough. - If ARGSIZE is SIZE_MAX, use the string length of the argument for - ARGSIZE. */ -size_t -quotearg_buffer (char *buffer, size_t buffersize, - char const *arg, size_t argsize, - struct quoting_options const *o) -{ - struct quoting_options const *p = o ? o : &default_quoting_options; - int e = errno; - size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize, - p->style, p->flags, p->quote_these_too, - p->left_quote, p->right_quote); - errno = e; - return r; -} - -/* Equivalent to quotearg_alloc (ARG, ARGSIZE, NULL, O). */ -char * -quotearg_alloc (char const *arg, size_t argsize, - struct quoting_options const *o) -{ - return quotearg_alloc_mem (arg, argsize, NULL, o); -} - -/* Like quotearg_buffer (..., ARG, ARGSIZE, O), except return newly - allocated storage containing the quoted string, and store the - resulting size into *SIZE, if non-NULL. The result can contain - embedded null bytes only if ARGSIZE is not SIZE_MAX, SIZE is not - NULL, and set_quoting_flags has not set the null byte elision - flag. */ -char * -quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size, - struct quoting_options const *o) -{ - struct quoting_options const *p = o ? o : &default_quoting_options; - int e = errno; - /* Elide embedded null bytes if we can't return a size. */ - int flags = p->flags | (size ? 0 : QA_ELIDE_NULL_BYTES); - size_t bufsize = quotearg_buffer_restyled (0, 0, arg, argsize, p->style, - flags, p->quote_these_too, - p->left_quote, - p->right_quote) + 1; - char *buf = xcharalloc (bufsize); - quotearg_buffer_restyled (buf, bufsize, arg, argsize, p->style, flags, - p->quote_these_too, - p->left_quote, p->right_quote); - errno = e; - if (size) - *size = bufsize - 1; - return buf; -} - -/* A storage slot with size and pointer to a value. */ -struct slotvec -{ - size_t size; - char *val; -}; - -/* Preallocate a slot 0 buffer, so that the caller can always quote - one small component of a "memory exhausted" message in slot 0. */ -static char slot0[256]; -static unsigned int nslots = 1; -static struct slotvec slotvec0 = {sizeof slot0, slot0}; -static struct slotvec *slotvec = &slotvec0; - -void -quotearg_free (void) -{ - struct slotvec *sv = slotvec; - unsigned int i; - for (i = 1; i < nslots; i++) - free (sv[i].val); - if (sv[0].val != slot0) - { - free (sv[0].val); - slotvec0.size = sizeof slot0; - slotvec0.val = slot0; - } - if (sv != &slotvec0) - { - free (sv); - slotvec = &slotvec0; - } - nslots = 1; -} - -/* Use storage slot N to return a quoted version of argument ARG. - ARG is of size ARGSIZE, but if that is SIZE_MAX, ARG is a - null-terminated string. - OPTIONS specifies the quoting options. - The returned value points to static storage that can be - reused by the next call to this function with the same value of N. - N must be nonnegative. N is deliberately declared with type "int" - to allow for future extensions (using negative values). */ -static char * -quotearg_n_options (int n, char const *arg, size_t argsize, - struct quoting_options const *options) -{ - int e = errno; - - unsigned int n0 = n; - struct slotvec *sv = slotvec; - - if (n < 0) - abort (); - - if (nslots <= n0) - { - /* FIXME: technically, the type of n1 should be `unsigned int', - but that evokes an unsuppressible warning from gcc-4.0.1 and - older. If gcc ever provides an option to suppress that warning, - revert to the original type, so that the test in xalloc_oversized - is once again performed only at compile time. */ - size_t n1 = n0 + 1; - bool preallocated = (sv == &slotvec0); - - if (xalloc_oversized (n1, sizeof *sv)) - xalloc_die (); - - slotvec = sv = xrealloc (preallocated ? NULL : sv, n1 * sizeof *sv); - if (preallocated) - *sv = slotvec0; - memset (sv + nslots, 0, (n1 - nslots) * sizeof *sv); - nslots = n1; - } - - { - size_t size = sv[n].size; - char *val = sv[n].val; - /* Elide embedded null bytes since we don't return a size. */ - int flags = options->flags | QA_ELIDE_NULL_BYTES; - size_t qsize = quotearg_buffer_restyled (val, size, arg, argsize, - options->style, flags, - options->quote_these_too, - options->left_quote, - options->right_quote); - - if (size <= qsize) - { - sv[n].size = size = qsize + 1; - if (val != slot0) - free (val); - sv[n].val = val = xcharalloc (size); - quotearg_buffer_restyled (val, size, arg, argsize, options->style, - flags, options->quote_these_too, - options->left_quote, - options->right_quote); - } - - errno = e; - return val; - } -} - -char * -quotearg_n (int n, char const *arg) -{ - return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options); -} - -char * -quotearg_n_mem (int n, char const *arg, size_t argsize) -{ - return quotearg_n_options (n, arg, argsize, &default_quoting_options); -} - -char * -quotearg (char const *arg) -{ - return quotearg_n (0, arg); -} - -char * -quotearg_mem (char const *arg, size_t argsize) -{ - return quotearg_n_mem (0, arg, argsize); -} - -char * -quotearg_n_style (int n, enum quoting_style s, char const *arg) -{ - struct quoting_options const o = quoting_options_from_style (s); - return quotearg_n_options (n, arg, SIZE_MAX, &o); -} - -char * -quotearg_n_style_mem (int n, enum quoting_style s, - char const *arg, size_t argsize) -{ - struct quoting_options const o = quoting_options_from_style (s); - return quotearg_n_options (n, arg, argsize, &o); -} - -char * -quotearg_style (enum quoting_style s, char const *arg) -{ - return quotearg_n_style (0, s, arg); -} - -char * -quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize) -{ - return quotearg_n_style_mem (0, s, arg, argsize); -} - -char * -quotearg_char_mem (char const *arg, size_t argsize, char ch) -{ - struct quoting_options options; - options = default_quoting_options; - set_char_quoting (&options, ch, 1); - return quotearg_n_options (0, arg, argsize, &options); -} - -char * -quotearg_char (char const *arg, char ch) -{ - return quotearg_char_mem (arg, SIZE_MAX, ch); -} - -char * -quotearg_colon (char const *arg) -{ - return quotearg_char (arg, ':'); -} - -char * -quotearg_colon_mem (char const *arg, size_t argsize) -{ - return quotearg_char_mem (arg, argsize, ':'); -} - -char * -quotearg_n_custom (int n, char const *left_quote, - char const *right_quote, char const *arg) -{ - return quotearg_n_custom_mem (n, left_quote, right_quote, arg, - SIZE_MAX); -} - -char * -quotearg_n_custom_mem (int n, char const *left_quote, - char const *right_quote, - char const *arg, size_t argsize) -{ - struct quoting_options o = default_quoting_options; - set_custom_quoting (&o, left_quote, right_quote); - return quotearg_n_options (n, arg, argsize, &o); -} - -char * -quotearg_custom (char const *left_quote, char const *right_quote, - char const *arg) -{ - return quotearg_n_custom (0, left_quote, right_quote, arg); -} - -char * -quotearg_custom_mem (char const *left_quote, char const *right_quote, - char const *arg, size_t argsize) -{ - return quotearg_n_custom_mem (0, left_quote, right_quote, arg, - argsize); -} diff --git a/gnulib/lib/quotearg.h b/gnulib/lib/quotearg.h deleted file mode 100644 index 2756d76..0000000 --- a/gnulib/lib/quotearg.h +++ /dev/null @@ -1,389 +0,0 @@ -/* quotearg.h - quote arguments for output - - Copyright (C) 1998-2002, 2004, 2006, 2008-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert */ - -#ifndef QUOTEARG_H_ -# define QUOTEARG_H_ 1 - -# include - -/* Basic quoting styles. For each style, an example is given on the - input strings "simple", "\0 \t\n'\"\033?""?/\\", and "a:b", using - quotearg_buffer, quotearg_mem, and quotearg_colon_mem with that - style and the default flags and quoted characters. Note that the - examples are shown here as valid C strings rather than what - displays on a terminal (with "??/" as a trigraph for "\\"). */ -enum quoting_style - { - /* Output names as-is (ls --quoting-style=literal). Can result in - embedded null bytes if QA_ELIDE_NULL_BYTES is not in - effect. - - quotearg_buffer: - "simple", "\0 \t\n'\"\033??/\\", "a:b" - quotearg: - "simple", " \t\n'\"\033??/\\", "a:b" - quotearg_colon: - "simple", " \t\n'\"\033??/\\", "a:b" - */ - literal_quoting_style, - - /* Quote names for the shell if they contain shell metacharacters - or would cause ambiguous output (ls --quoting-style=shell). - Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not - in effect. - - quotearg_buffer: - "simple", "'\0 \t\n'\\''\"\033??/\\'", "a:b" - quotearg: - "simple", "' \t\n'\\''\"\033??/\\'", "a:b" - quotearg_colon: - "simple", "' \t\n'\\''\"\033??/\\'", "'a:b'" - */ - shell_quoting_style, - - /* Quote names for the shell, even if they would normally not - require quoting (ls --quoting-style=shell-always). Can result - in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect. - Behaves like shell_quoting_style if QA_ELIDE_OUTER_QUOTES is in - effect. - - quotearg_buffer: - "'simple'", "'\0 \t\n'\\''\"\033??/\\'", "'a:b'" - quotearg: - "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'" - quotearg_colon: - "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'" - */ - shell_always_quoting_style, - - /* Quote names as for a C language string (ls --quoting-style=c). - Behaves like c_maybe_quoting_style if QA_ELIDE_OUTER_QUOTES is - in effect. Split into consecutive strings if - QA_SPLIT_TRIGRAPHS. - - quotearg_buffer: - "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" - quotearg: - "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" - quotearg_colon: - "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\"" - */ - c_quoting_style, - - /* Like c_quoting_style except omit the surrounding double-quote - characters if no quoted characters are encountered. - - quotearg_buffer: - "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b" - quotearg: - "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b" - quotearg_colon: - "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" - */ - c_maybe_quoting_style, - - /* Like c_quoting_style except always omit the surrounding - double-quote characters and ignore QA_SPLIT_TRIGRAPHS - (ls --quoting-style=escape). - - quotearg_buffer: - "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b" - quotearg: - "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b" - quotearg_colon: - "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a\\:b" - */ - escape_quoting_style, - - /* Like clocale_quoting_style, but quote `like this' instead of - "like this" in the default C locale (ls --quoting-style=locale). - - LC_MESSAGES=C - quotearg_buffer: - "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'" - quotearg: - "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'" - quotearg_colon: - "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a\\:b'" - - LC_MESSAGES=pt_PT.utf8 - quotearg_buffer: - "\302\253simple\302\273", - "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" - quotearg: - "\302\253simple\302\273", - "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" - quotearg_colon: - "\302\253simple\302\273", - "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273" - */ - locale_quoting_style, - - /* Like c_quoting_style except use quotation marks appropriate for - the locale and ignore QA_SPLIT_TRIGRAPHS - (ls --quoting-style=clocale). - - LC_MESSAGES=C - quotearg_buffer: - "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" - quotearg: - "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\"" - quotearg_colon: - "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\"" - - LC_MESSAGES=pt_PT.utf8 - quotearg_buffer: - "\302\253simple\302\273", - "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" - quotearg: - "\302\253simple\302\273", - "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273" - quotearg_colon: - "\302\253simple\302\273", - "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273" - */ - clocale_quoting_style, - - /* Like clocale_quoting_style except use the custom quotation marks - set by set_custom_quoting. If custom quotation marks are not - set, the behavior is undefined. - - left_quote = right_quote = "'" - quotearg_buffer: - "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'" - quotearg: - "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'" - quotearg_colon: - "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a\\:b'" - - left_quote = "(" and right_quote = ")" - quotearg_buffer: - "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)" - quotearg: - "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)" - quotearg_colon: - "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a\\:b)" - - left_quote = ":" and right_quote = " " - quotearg_buffer: - ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b " - quotearg: - ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b " - quotearg_colon: - ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a\\:b " - - left_quote = "\"'" and right_quote = "'\"" - Notice that this is treated as a single level of quotes or two - levels where the outer quote need not be escaped within the inner - quotes. For two levels where the outer quote must be escaped - within the inner quotes, you must use separate quotearg - invocations. - quotearg_buffer: - "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\"" - quotearg: - "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\"" - quotearg_colon: - "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a\\:b'\"" - */ - custom_quoting_style - }; - -/* Flags for use in set_quoting_flags. */ -enum quoting_flags - { - /* Always elide null bytes from styles that do not quote them, - even when the length of the result is available to the - caller. */ - QA_ELIDE_NULL_BYTES = 0x01, - - /* Omit the surrounding quote characters if no escaped characters - are encountered. Note that if no other character needs - escaping, then neither does the escape character. */ - QA_ELIDE_OUTER_QUOTES = 0x02, - - /* In the c_quoting_style and c_maybe_quoting_style, split ANSI - trigraph sequences into concatenated strings (for example, - "?""?/" rather than "??/", which could be confused with - "\\"). */ - QA_SPLIT_TRIGRAPHS = 0x04 - }; - -/* For now, --quoting-style=literal is the default, but this may change. */ -# ifndef DEFAULT_QUOTING_STYLE -# define DEFAULT_QUOTING_STYLE literal_quoting_style -# endif - -/* Names of quoting styles and their corresponding values. */ -extern char const *const quoting_style_args[]; -extern enum quoting_style const quoting_style_vals[]; - -struct quoting_options; - -/* The functions listed below set and use a hidden variable - that contains the default quoting style options. */ - -/* Allocate a new set of quoting options, with contents initially identical - to O if O is not null, or to the default if O is null. - It is the caller's responsibility to free the result. */ -struct quoting_options *clone_quoting_options (struct quoting_options *o); - -/* Get the value of O's quoting style. If O is null, use the default. */ -enum quoting_style get_quoting_style (struct quoting_options *o); - -/* In O (or in the default if O is null), - set the value of the quoting style to S. */ -void set_quoting_style (struct quoting_options *o, enum quoting_style s); - -/* In O (or in the default if O is null), - set the value of the quoting options for character C to I. - Return the old value. Currently, the only values defined for I are - 0 (the default) and 1 (which means to quote the character even if - it would not otherwise be quoted). C must never be a digit or a - letter that has special meaning after a backslash (for example, "\t" - for tab). */ -int set_char_quoting (struct quoting_options *o, char c, int i); - -/* In O (or in the default if O is null), - set the value of the quoting options flag to I, which can be a - bitwise combination of enum quoting_flags, or 0 for default - behavior. Return the old value. */ -int set_quoting_flags (struct quoting_options *o, int i); - -/* In O (or in the default if O is null), - set the value of the quoting style to custom_quoting_style, - set the left quote to LEFT_QUOTE, and set the right quote to - RIGHT_QUOTE. Each of LEFT_QUOTE and RIGHT_QUOTE must be - null-terminated and can be the empty string. Because backslashes are - used for escaping, it does not make sense for RIGHT_QUOTE to contain - a backslash. RIGHT_QUOTE must not begin with a digit or a letter - that has special meaning after a backslash (for example, "\t" for - tab). */ -void set_custom_quoting (struct quoting_options *o, - char const *left_quote, - char const *right_quote); - -/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of - argument ARG (of size ARGSIZE), using O to control quoting. - If O is null, use the default. - Terminate the output with a null character, and return the written - size of the output, not counting the terminating null. - If BUFFERSIZE is too small to store the output string, return the - value that would have been returned had BUFFERSIZE been large enough. - If ARGSIZE is -1, use the string length of the argument for ARGSIZE. - On output, BUFFER might contain embedded null bytes if ARGSIZE was - not -1, the style of O does not use backslash escapes, and the - flags of O do not request elision of null bytes.*/ -size_t quotearg_buffer (char *buffer, size_t buffersize, - char const *arg, size_t argsize, - struct quoting_options const *o); - -/* Like quotearg_buffer, except return the result in a newly allocated - buffer. It is the caller's responsibility to free the result. The - result will not contain embedded null bytes. */ -char *quotearg_alloc (char const *arg, size_t argsize, - struct quoting_options const *o); - -/* Like quotearg_alloc, except that the length of the result, - excluding the terminating null byte, is stored into SIZE if it is - non-NULL. The result might contain embedded null bytes if ARGSIZE - was not -1, SIZE was not NULL, the style of O does not use - backslash escapes, and the flags of O do not request elision of - null bytes.*/ -char *quotearg_alloc_mem (char const *arg, size_t argsize, - size_t *size, struct quoting_options const *o); - -/* Use storage slot N to return a quoted version of the string ARG. - Use the default quoting options. - The returned value points to static storage that can be - reused by the next call to this function with the same value of N. - N must be nonnegative. The output of all functions in the - quotearg_n family are guaranteed to not contain embedded null - bytes.*/ -char *quotearg_n (int n, char const *arg); - -/* Equivalent to quotearg_n (0, ARG). */ -char *quotearg (char const *arg); - -/* Use storage slot N to return a quoted version of the argument ARG - of size ARGSIZE. This is like quotearg_n (N, ARG), except it can - quote null bytes. */ -char *quotearg_n_mem (int n, char const *arg, size_t argsize); - -/* Equivalent to quotearg_n_mem (0, ARG, ARGSIZE). */ -char *quotearg_mem (char const *arg, size_t argsize); - -/* Use style S and storage slot N to return a quoted version of the string ARG. - This is like quotearg_n (N, ARG), except that it uses S with no other - options to specify the quoting method. */ -char *quotearg_n_style (int n, enum quoting_style s, char const *arg); - -/* Use style S and storage slot N to return a quoted version of the - argument ARG of size ARGSIZE. This is like quotearg_n_style - (N, S, ARG), except it can quote null bytes. */ -char *quotearg_n_style_mem (int n, enum quoting_style s, - char const *arg, size_t argsize); - -/* Equivalent to quotearg_n_style (0, S, ARG). */ -char *quotearg_style (enum quoting_style s, char const *arg); - -/* Equivalent to quotearg_n_style_mem (0, S, ARG, ARGSIZE). */ -char *quotearg_style_mem (enum quoting_style s, - char const *arg, size_t argsize); - -/* Like quotearg (ARG), except also quote any instances of CH. - See set_char_quoting for a description of acceptable CH values. */ -char *quotearg_char (char const *arg, char ch); - -/* Like quotearg_char (ARG, CH), except it can quote null bytes. */ -char *quotearg_char_mem (char const *arg, size_t argsize, char ch); - -/* Equivalent to quotearg_char (ARG, ':'). */ -char *quotearg_colon (char const *arg); - -/* Like quotearg_colon (ARG), except it can quote null bytes. */ -char *quotearg_colon_mem (char const *arg, size_t argsize); - -/* Like quotearg_n_style (N, S, ARG) but with S as custom_quoting_style - with left quote as LEFT_QUOTE and right quote as RIGHT_QUOTE. See - set_custom_quoting for a description of acceptable LEFT_QUOTE and - RIGHT_QUOTE values. */ -char *quotearg_n_custom (int n, char const *left_quote, - char const *right_quote, char const *arg); - -/* Like quotearg_n_custom (N, LEFT_QUOTE, RIGHT_QUOTE, ARG) except it - can quote null bytes. */ -char *quotearg_n_custom_mem (int n, char const *left_quote, - char const *right_quote, - char const *arg, size_t argsize); - -/* Equivalent to quotearg_n_custom (0, LEFT_QUOTE, RIGHT_QUOTE, ARG). */ -char *quotearg_custom (char const *left_quote, char const *right_quote, - char const *arg); - -/* Equivalent to quotearg_n_custom_mem (0, LEFT_QUOTE, RIGHT_QUOTE, ARG, - ARGSIZE). */ -char *quotearg_custom_mem (char const *left_quote, - char const *right_quote, - char const *arg, size_t argsize); - -/* Free any dynamically allocated memory. */ -void quotearg_free (void); - -#endif /* !QUOTEARG_H_ */ diff --git a/gnulib/lib/readlink.c b/gnulib/lib/readlink.c deleted file mode 100644 index 35d045b..0000000 --- a/gnulib/lib/readlink.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Stub for readlink(). - Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include -#include - -#if !HAVE_READLINK - -/* readlink() substitute for systems that don't have a readlink() function, - such as DJGPP 2.03 and mingw32. */ - -ssize_t -readlink (const char *name, char *buf _GL_UNUSED, - size_t bufsize _GL_UNUSED) -{ - struct stat statbuf; - - /* In general we should use lstat() here, not stat(). But on platforms - without symbolic links, lstat() - if it exists - would be equivalent to - stat(), therefore we can use stat(). This saves us a configure check. */ - if (stat (name, &statbuf) >= 0) - errno = EINVAL; - return -1; -} - -#else /* HAVE_READLINK */ - -# undef readlink - -/* readlink() wrapper that uses correct types, for systems like cygwin - 1.5.x where readlink returns int, and which rejects trailing slash, - for Solaris 9. */ - -ssize_t -rpl_readlink (const char *name, char *buf, size_t bufsize) -{ -# if READLINK_TRAILING_SLASH_BUG - size_t len = strlen (name); - if (len && name[len - 1] == '/') - { - /* Even if name without the slash is a symlink to a directory, - both lstat() and stat() must resolve the trailing slash to - the directory rather than the symlink. We can therefore - safely use stat() to distinguish between EINVAL and - ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat(). */ - struct stat st; - if (stat (name, &st) == 0) - errno = EINVAL; - return -1; - } -# endif /* READLINK_TRAILING_SLASH_BUG */ - return readlink (name, buf, bufsize); -} - -#endif /* HAVE_READLINK */ diff --git a/gnulib/lib/readlinkat.c b/gnulib/lib/readlinkat.c deleted file mode 100644 index 63d0378..0000000 --- a/gnulib/lib/readlinkat.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Read a symlink relative to an open directory. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Eric Blake */ - -#include - -#include - -/* Gnulib provides a readlink stub for mingw; use it for distinction - between EINVAL and ENOENT, rather than always failing with ENOSYS. */ - -/* POSIX 2008 says that unlike readlink, readlinkat returns 0 for - success instead of the buffer length. But this would render - readlinkat worthless since readlink does not guarantee a - NUL-terminated buffer. Assume this was a bug in POSIX. */ - -/* Read the contents of symlink FILE into buffer BUF of size LEN, in the - directory open on descriptor FD. If possible, do it without changing - the working directory. Otherwise, resort to using save_cwd/fchdir, - then readlink/restore_cwd. If either the save_cwd or the restore_cwd - fails, then give a diagnostic and exit nonzero. */ - -#define AT_FUNC_NAME readlinkat -#define AT_FUNC_F1 readlink -#define AT_FUNC_POST_FILE_PARAM_DECLS , char *buf, size_t len -#define AT_FUNC_POST_FILE_ARGS , buf, len -#define AT_FUNC_RESULT ssize_t -#include "at-func.c" -#undef AT_FUNC_NAME -#undef AT_FUNC_F1 -#undef AT_FUNC_POST_FILE_PARAM_DECLS -#undef AT_FUNC_POST_FILE_ARGS -#undef AT_FUNC_RESULT diff --git a/gnulib/lib/realloc.c b/gnulib/lib/realloc.c deleted file mode 100644 index 6ef37e7..0000000 --- a/gnulib/lib/realloc.c +++ /dev/null @@ -1,91 +0,0 @@ -/* realloc() function that is glibc compatible. - - Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering and Bruno Haible */ - -#include - -/* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */ -#ifdef realloc -# define NEED_REALLOC_GNU 1 -/* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU. */ -#elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU -# define NEED_REALLOC_GNU 1 -#endif - -/* Infer the properties of the system's malloc function. - The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ -#if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU -# define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1 -#endif - -/* Below we want to call the system's malloc and realloc. - Undefine the symbols here so that including provides a - declaration of malloc(), not of rpl_malloc(), and likewise for realloc. */ -#undef malloc -#undef realloc - -/* Specification. */ -#include - -#include - -/* Below we want to call the system's malloc and realloc. - Undefine the symbols, if they were defined by gnulib's - replacement. */ -#undef malloc -#undef realloc - -/* Change the size of an allocated block of memory P to N bytes, - with error checking. If N is zero, change it to 1. If P is NULL, - use malloc. */ - -void * -rpl_realloc (void *p, size_t n) -{ - void *result; - -#if NEED_REALLOC_GNU - if (n == 0) - { - n = 1; - - /* In theory realloc might fail, so don't rely on it to free. */ - free (p); - p = NULL; - } -#endif - - if (p == NULL) - { -#if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE - if (n == 0) - n = 1; -#endif - result = malloc (n); - } - else - result = realloc (p, n); - -#if !HAVE_REALLOC_POSIX - if (result == NULL) - errno = ENOMEM; -#endif - - return result; -} diff --git a/gnulib/lib/ref-add.sin b/gnulib/lib/ref-add.sin deleted file mode 100644 index a57eaef..0000000 --- a/gnulib/lib/ref-add.sin +++ /dev/null @@ -1,30 +0,0 @@ -# Add this package to a list of references stored in a text file. -# -# Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Written by Bruno Haible . -# -/^# Packages using this file: / { - s/# Packages using this file:// - ta - :a - s/ @PACKAGE@ / @PACKAGE@ / - tb - s/ $/ @PACKAGE@ / - :b - s/^/# Packages using this file:/ -} diff --git a/gnulib/lib/ref-del.sin b/gnulib/lib/ref-del.sin deleted file mode 100644 index e23097d..0000000 --- a/gnulib/lib/ref-del.sin +++ /dev/null @@ -1,25 +0,0 @@ -# Remove this package from a list of references stored in a text file. -# -# Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Written by Bruno Haible . -# -/^# Packages using this file: / { - s/# Packages using this file:// - s/ @PACKAGE@ / / - s/^/# Packages using this file:/ -} diff --git a/gnulib/lib/regcomp.c b/gnulib/lib/regcomp.c deleted file mode 100644 index 747fa40..0000000 --- a/gnulib/lib/regcomp.c +++ /dev/null @@ -1,3876 +0,0 @@ -/* Extended regular expression matching and search library. - Copyright (C) 2002-2011 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, - size_t length, reg_syntax_t syntax); -static void re_compile_fastmap_iter (regex_t *bufp, - const re_dfastate_t *init_state, - char *fastmap); -static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); -#ifdef RE_ENABLE_I18N -static void free_charset (re_charset_t *cset); -#endif /* RE_ENABLE_I18N */ -static void free_workarea_compile (regex_t *preg); -static reg_errcode_t create_initial_state (re_dfa_t *dfa); -#ifdef RE_ENABLE_I18N -static void optimize_utf8 (re_dfa_t *dfa); -#endif -static reg_errcode_t analyze (regex_t *preg); -static reg_errcode_t preorder (bin_tree_t *root, - reg_errcode_t (fn (void *, bin_tree_t *)), - void *extra); -static reg_errcode_t postorder (bin_tree_t *root, - reg_errcode_t (fn (void *, bin_tree_t *)), - void *extra); -static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); -static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); -static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, - bin_tree_t *node); -static reg_errcode_t calc_first (void *extra, bin_tree_t *node); -static reg_errcode_t calc_next (void *extra, bin_tree_t *node); -static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); -static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint); -static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, - unsigned int constraint); -static reg_errcode_t calc_eclosure (re_dfa_t *dfa); -static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, - Idx node, bool root); -static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); -static Idx fetch_number (re_string_t *input, re_token_t *token, - reg_syntax_t syntax); -static int peek_token (re_token_t *token, re_string_t *input, - reg_syntax_t syntax) internal_function; -static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, - reg_syntax_t syntax, reg_errcode_t *err); -static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - Idx nest, reg_errcode_t *err); -static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - Idx nest, reg_errcode_t *err); -static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - Idx nest, reg_errcode_t *err); -static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - Idx nest, reg_errcode_t *err); -static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, - re_dfa_t *dfa, re_token_t *token, - reg_syntax_t syntax, reg_errcode_t *err); -static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, - re_token_t *token, reg_syntax_t syntax, - reg_errcode_t *err); -static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, - re_string_t *regexp, - re_token_t *token, int token_len, - re_dfa_t *dfa, - reg_syntax_t syntax, - bool accept_hyphen); -static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, - re_string_t *regexp, - re_token_t *token); -#ifdef RE_ENABLE_I18N -static reg_errcode_t build_equiv_class (bitset_t sbcset, - re_charset_t *mbcset, - Idx *equiv_class_alloc, - const unsigned char *name); -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, - bitset_t sbcset, - re_charset_t *mbcset, - Idx *char_class_alloc, - const unsigned char *class_name, - reg_syntax_t syntax); -#else /* not RE_ENABLE_I18N */ -static reg_errcode_t build_equiv_class (bitset_t sbcset, - const unsigned char *name); -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, - bitset_t sbcset, - const unsigned char *class_name, - reg_syntax_t syntax); -#endif /* not RE_ENABLE_I18N */ -static bin_tree_t *build_charclass_op (re_dfa_t *dfa, - RE_TRANSLATE_TYPE trans, - const unsigned char *class_name, - const unsigned char *extra, - bool non_match, reg_errcode_t *err); -static bin_tree_t *create_tree (re_dfa_t *dfa, - bin_tree_t *left, bin_tree_t *right, - re_token_type_t type); -static bin_tree_t *create_token_tree (re_dfa_t *dfa, - bin_tree_t *left, bin_tree_t *right, - const re_token_t *token); -static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); -static void free_token (re_token_t *node); -static reg_errcode_t free_tree (void *extra, bin_tree_t *node); -static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); - -/* This table gives an error message for each of the error codes listed - in regex.h. Obviously the order here has to be same as there. - POSIX doesn't require that we do anything for REG_NOERROR, - but why not be nice? */ - -static const char __re_error_msgid[] = - { -#define REG_NOERROR_IDX 0 - gettext_noop ("Success") /* REG_NOERROR */ - "\0" -#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") - gettext_noop ("No match") /* REG_NOMATCH */ - "\0" -#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") - gettext_noop ("Invalid regular expression") /* REG_BADPAT */ - "\0" -#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") - gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ - "\0" -#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") - gettext_noop ("Invalid character class name") /* REG_ECTYPE */ - "\0" -#define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") - gettext_noop ("Trailing backslash") /* REG_EESCAPE */ - "\0" -#define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") - gettext_noop ("Invalid back reference") /* REG_ESUBREG */ - "\0" -#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") - gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ - "\0" -#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") - gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ - "\0" -#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") - gettext_noop ("Unmatched \\{") /* REG_EBRACE */ - "\0" -#define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") - gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ - "\0" -#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") - gettext_noop ("Invalid range end") /* REG_ERANGE */ - "\0" -#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") - gettext_noop ("Memory exhausted") /* REG_ESPACE */ - "\0" -#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") - gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ - "\0" -#define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") - gettext_noop ("Premature end of regular expression") /* REG_EEND */ - "\0" -#define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") - gettext_noop ("Regular expression too big") /* REG_ESIZE */ - "\0" -#define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") - gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ - }; - -static const size_t __re_error_msgid_idx[] = - { - REG_NOERROR_IDX, - REG_NOMATCH_IDX, - REG_BADPAT_IDX, - REG_ECOLLATE_IDX, - REG_ECTYPE_IDX, - REG_EESCAPE_IDX, - REG_ESUBREG_IDX, - REG_EBRACK_IDX, - REG_EPAREN_IDX, - REG_EBRACE_IDX, - REG_BADBR_IDX, - REG_ERANGE_IDX, - REG_ESPACE_IDX, - REG_BADRPT_IDX, - REG_EEND_IDX, - REG_ESIZE_IDX, - REG_ERPAREN_IDX - }; - -/* Entry points for GNU code. */ - -/* re_compile_pattern is the GNU regular expression compiler: it - compiles PATTERN (of length LENGTH) and puts the result in BUFP. - Returns 0 if the pattern was valid, otherwise an error string. - - Assumes the `allocated' (and perhaps `buffer') and `translate' fields - are set in BUFP on entry. */ - -#ifdef _LIBC -const char * -re_compile_pattern (pattern, length, bufp) - const char *pattern; - size_t length; - struct re_pattern_buffer *bufp; -#else /* size_t might promote */ -const char * -re_compile_pattern (const char *pattern, size_t length, - struct re_pattern_buffer *bufp) -#endif -{ - reg_errcode_t ret; - - /* And GNU code determines whether or not to get register information - by passing null for the REGS argument to re_match, etc., not by - setting no_sub, unless RE_NO_SUB is set. */ - bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); - - /* Match anchors at newline. */ - bufp->newline_anchor = 1; - - ret = re_compile_internal (bufp, pattern, length, re_syntax_options); - - if (!ret) - return NULL; - return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); -} -#ifdef _LIBC -weak_alias (__re_compile_pattern, re_compile_pattern) -#endif - -/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can - also be assigned to arbitrarily: each pattern buffer stores its own - syntax, so it can be changed between regex compilations. */ -/* This has no initializer because initialized variables in Emacs - become read-only after dumping. */ -reg_syntax_t re_syntax_options; - - -/* Specify the precise syntax of regexps for compilation. This provides - for compatibility for various utilities which historically have - different, incompatible syntaxes. - - The argument SYNTAX is a bit mask comprised of the various bits - defined in regex.h. We return the old syntax. */ - -reg_syntax_t -re_set_syntax (syntax) - reg_syntax_t syntax; -{ - reg_syntax_t ret = re_syntax_options; - - re_syntax_options = syntax; - return ret; -} -#ifdef _LIBC -weak_alias (__re_set_syntax, re_set_syntax) -#endif - -int -re_compile_fastmap (bufp) - struct re_pattern_buffer *bufp; -{ - re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; - char *fastmap = bufp->fastmap; - - memset (fastmap, '\0', sizeof (char) * SBC_MAX); - re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); - if (dfa->init_state != dfa->init_state_word) - re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); - if (dfa->init_state != dfa->init_state_nl) - re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); - if (dfa->init_state != dfa->init_state_begbuf) - re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); - bufp->fastmap_accurate = 1; - return 0; -} -#ifdef _LIBC -weak_alias (__re_compile_fastmap, re_compile_fastmap) -#endif - -static inline void -__attribute ((always_inline)) -re_set_fastmap (char *fastmap, bool icase, int ch) -{ - fastmap[ch] = 1; - if (icase) - fastmap[tolower (ch)] = 1; -} - -/* Helper function for re_compile_fastmap. - Compile fastmap for the initial_state INIT_STATE. */ - -static void -re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, - char *fastmap) -{ - re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; - Idx node_cnt; - bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); - for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) - { - Idx node = init_state->nodes.elems[node_cnt]; - re_token_type_t type = dfa->nodes[node].type; - - if (type == CHARACTER) - { - re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); -#ifdef RE_ENABLE_I18N - if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) - { - unsigned char buf[MB_LEN_MAX]; - unsigned char *p; - wchar_t wc; - mbstate_t state; - - p = buf; - *p++ = dfa->nodes[node].opr.c; - while (++node < dfa->nodes_len - && dfa->nodes[node].type == CHARACTER - && dfa->nodes[node].mb_partial) - *p++ = dfa->nodes[node].opr.c; - memset (&state, '\0', sizeof (state)); - if (__mbrtowc (&wc, (const char *) buf, p - buf, - &state) == p - buf - && (__wcrtomb ((char *) buf, towlower (wc), &state) - != (size_t) -1)) - re_set_fastmap (fastmap, false, buf[0]); - } -#endif - } - else if (type == SIMPLE_BRACKET) - { - int i, ch; - for (i = 0, ch = 0; i < BITSET_WORDS; ++i) - { - int j; - bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; - for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) - if (w & ((bitset_word_t) 1 << j)) - re_set_fastmap (fastmap, icase, ch); - } - } -#ifdef RE_ENABLE_I18N - else if (type == COMPLEX_BRACKET) - { - re_charset_t *cset = dfa->nodes[node].opr.mbcset; - Idx i; - -# ifdef _LIBC - /* See if we have to try all bytes which start multiple collation - elements. - e.g. In da_DK, we want to catch 'a' since "aa" is a valid - collation element, and don't catch 'b' since 'b' is - the only collation element which starts from 'b' (and - it is caught by SIMPLE_BRACKET). */ - if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0 - && (cset->ncoll_syms || cset->nranges)) - { - const int32_t *table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - for (i = 0; i < SBC_MAX; ++i) - if (table[i] < 0) - re_set_fastmap (fastmap, icase, i); - } -# endif /* _LIBC */ - - /* See if we have to start the match at all multibyte characters, - i.e. where we would not find an invalid sequence. This only - applies to multibyte character sets; for single byte character - sets, the SIMPLE_BRACKET again suffices. */ - if (dfa->mb_cur_max > 1 - && (cset->nchar_classes || cset->non_match || cset->nranges -# ifdef _LIBC - || cset->nequiv_classes -# endif /* _LIBC */ - )) - { - unsigned char c = 0; - do - { - mbstate_t mbs; - memset (&mbs, 0, sizeof (mbs)); - if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2) - re_set_fastmap (fastmap, false, (int) c); - } - while (++c != 0); - } - - else - { - /* ... Else catch all bytes which can start the mbchars. */ - for (i = 0; i < cset->nmbchars; ++i) - { - char buf[256]; - mbstate_t state; - memset (&state, '\0', sizeof (state)); - if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) - re_set_fastmap (fastmap, icase, *(unsigned char *) buf); - if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) - { - if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) - != (size_t) -1) - re_set_fastmap (fastmap, false, *(unsigned char *) buf); - } - } - } - } -#endif /* RE_ENABLE_I18N */ - else if (type == OP_PERIOD -#ifdef RE_ENABLE_I18N - || type == OP_UTF8_PERIOD -#endif /* RE_ENABLE_I18N */ - || type == END_OF_RE) - { - memset (fastmap, '\1', sizeof (char) * SBC_MAX); - if (type == END_OF_RE) - bufp->can_be_null = 1; - return; - } - } -} - -/* Entry point for POSIX code. */ -/* regcomp takes a regular expression as a string and compiles it. - - PREG is a regex_t *. We do not expect any fields to be initialized, - since POSIX says we shouldn't. Thus, we set - - `buffer' to the compiled pattern; - `used' to the length of the compiled pattern; - `syntax' to RE_SYNTAX_POSIX_EXTENDED if the - REG_EXTENDED bit in CFLAGS is set; otherwise, to - RE_SYNTAX_POSIX_BASIC; - `newline_anchor' to REG_NEWLINE being set in CFLAGS; - `fastmap' to an allocated space for the fastmap; - `fastmap_accurate' to zero; - `re_nsub' to the number of subexpressions in PATTERN. - - PATTERN is the address of the pattern string. - - CFLAGS is a series of bits which affect compilation. - - If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we - use POSIX basic syntax. - - If REG_NEWLINE is set, then . and [^...] don't match newline. - Also, regexec will try a match beginning after every newline. - - If REG_ICASE is set, then we considers upper- and lowercase - versions of letters to be equivalent when matching. - - If REG_NOSUB is set, then when PREG is passed to regexec, that - routine will report only success or failure, and nothing about the - registers. - - It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for - the return codes and their meanings.) */ - -int -regcomp (preg, pattern, cflags) - regex_t *_Restrict_ preg; - const char *_Restrict_ pattern; - int cflags; -{ - reg_errcode_t ret; - reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED - : RE_SYNTAX_POSIX_BASIC); - - preg->buffer = NULL; - preg->allocated = 0; - preg->used = 0; - - /* Try to allocate space for the fastmap. */ - preg->fastmap = re_malloc (char, SBC_MAX); - if (BE (preg->fastmap == NULL, 0)) - return REG_ESPACE; - - syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; - - /* If REG_NEWLINE is set, newlines are treated differently. */ - if (cflags & REG_NEWLINE) - { /* REG_NEWLINE implies neither . nor [^...] match newline. */ - syntax &= ~RE_DOT_NEWLINE; - syntax |= RE_HAT_LISTS_NOT_NEWLINE; - /* It also changes the matching behavior. */ - preg->newline_anchor = 1; - } - else - preg->newline_anchor = 0; - preg->no_sub = !!(cflags & REG_NOSUB); - preg->translate = NULL; - - ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); - - /* POSIX doesn't distinguish between an unmatched open-group and an - unmatched close-group: both are REG_EPAREN. */ - if (ret == REG_ERPAREN) - ret = REG_EPAREN; - - /* We have already checked preg->fastmap != NULL. */ - if (BE (ret == REG_NOERROR, 1)) - /* Compute the fastmap now, since regexec cannot modify the pattern - buffer. This function never fails in this implementation. */ - (void) re_compile_fastmap (preg); - else - { - /* Some error occurred while compiling the expression. */ - re_free (preg->fastmap); - preg->fastmap = NULL; - } - - return (int) ret; -} -#ifdef _LIBC -weak_alias (__regcomp, regcomp) -#endif - -/* Returns a message corresponding to an error code, ERRCODE, returned - from either regcomp or regexec. We don't use PREG here. */ - -#ifdef _LIBC -size_t -regerror (errcode, preg, errbuf, errbuf_size) - int errcode; - const regex_t *_Restrict_ preg; - char *_Restrict_ errbuf; - size_t errbuf_size; -#else /* size_t might promote */ -size_t -regerror (int errcode, const regex_t *_Restrict_ preg, - char *_Restrict_ errbuf, size_t errbuf_size) -#endif -{ - const char *msg; - size_t msg_size; - - if (BE (errcode < 0 - || errcode >= (int) (sizeof (__re_error_msgid_idx) - / sizeof (__re_error_msgid_idx[0])), 0)) - /* Only error codes returned by the rest of the code should be passed - to this routine. If we are given anything else, or if other regex - code generates an invalid error code, then the program has a bug. - Dump core so we can fix it. */ - abort (); - - msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); - - msg_size = strlen (msg) + 1; /* Includes the null. */ - - if (BE (errbuf_size != 0, 1)) - { - size_t cpy_size = msg_size; - if (BE (msg_size > errbuf_size, 0)) - { - cpy_size = errbuf_size - 1; - errbuf[cpy_size] = '\0'; - } - memcpy (errbuf, msg, cpy_size); - } - - return msg_size; -} -#ifdef _LIBC -weak_alias (__regerror, regerror) -#endif - - -#ifdef RE_ENABLE_I18N -/* This static array is used for the map to single-byte characters when - UTF-8 is used. Otherwise we would allocate memory just to initialize - it the same all the time. UTF-8 is the preferred encoding so this is - a worthwhile optimization. */ -static const bitset_t utf8_sb_map = -{ - /* Set the first 128 bits. */ -# if 4 * BITSET_WORD_BITS < ASCII_CHARS -# error "bitset_word_t is narrower than 32 bits" -# elif 3 * BITSET_WORD_BITS < ASCII_CHARS - BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX, -# elif 2 * BITSET_WORD_BITS < ASCII_CHARS - BITSET_WORD_MAX, BITSET_WORD_MAX, -# elif 1 * BITSET_WORD_BITS < ASCII_CHARS - BITSET_WORD_MAX, -# endif - (BITSET_WORD_MAX - >> (SBC_MAX % BITSET_WORD_BITS == 0 - ? 0 - : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) -}; -#endif - - -static void -free_dfa_content (re_dfa_t *dfa) -{ - Idx i, j; - - if (dfa->nodes) - for (i = 0; i < dfa->nodes_len; ++i) - free_token (dfa->nodes + i); - re_free (dfa->nexts); - for (i = 0; i < dfa->nodes_len; ++i) - { - if (dfa->eclosures != NULL) - re_node_set_free (dfa->eclosures + i); - if (dfa->inveclosures != NULL) - re_node_set_free (dfa->inveclosures + i); - if (dfa->edests != NULL) - re_node_set_free (dfa->edests + i); - } - re_free (dfa->edests); - re_free (dfa->eclosures); - re_free (dfa->inveclosures); - re_free (dfa->nodes); - - if (dfa->state_table) - for (i = 0; i <= dfa->state_hash_mask; ++i) - { - struct re_state_table_entry *entry = dfa->state_table + i; - for (j = 0; j < entry->num; ++j) - { - re_dfastate_t *state = entry->array[j]; - free_state (state); - } - re_free (entry->array); - } - re_free (dfa->state_table); -#ifdef RE_ENABLE_I18N - if (dfa->sb_char != utf8_sb_map) - re_free (dfa->sb_char); -#endif - re_free (dfa->subexp_map); -#ifdef DEBUG - re_free (dfa->re_str); -#endif - - re_free (dfa); -} - - -/* Free dynamically allocated space used by PREG. */ - -void -regfree (preg) - regex_t *preg; -{ - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - if (BE (dfa != NULL, 1)) - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - - re_free (preg->fastmap); - preg->fastmap = NULL; - - re_free (preg->translate); - preg->translate = NULL; -} -#ifdef _LIBC -weak_alias (__regfree, regfree) -#endif - -/* Entry points compatible with 4.2 BSD regex library. We don't define - them unless specifically requested. */ - -#if defined _REGEX_RE_COMP || defined _LIBC - -/* BSD has one and only one pattern buffer. */ -static struct re_pattern_buffer re_comp_buf; - -char * -# ifdef _LIBC -/* Make these definitions weak in libc, so POSIX programs can redefine - these names if they don't use our functions, and still use - regcomp/regexec above without link errors. */ -weak_function -# endif -re_comp (s) - const char *s; -{ - reg_errcode_t ret; - char *fastmap; - - if (!s) - { - if (!re_comp_buf.buffer) - return gettext ("No previous regular expression"); - return 0; - } - - if (re_comp_buf.buffer) - { - fastmap = re_comp_buf.fastmap; - re_comp_buf.fastmap = NULL; - __regfree (&re_comp_buf); - memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); - re_comp_buf.fastmap = fastmap; - } - - if (re_comp_buf.fastmap == NULL) - { - re_comp_buf.fastmap = (char *) malloc (SBC_MAX); - if (re_comp_buf.fastmap == NULL) - return (char *) gettext (__re_error_msgid - + __re_error_msgid_idx[(int) REG_ESPACE]); - } - - /* Since `re_exec' always passes NULL for the `regs' argument, we - don't need to initialize the pattern buffer fields which affect it. */ - - /* Match anchors at newlines. */ - re_comp_buf.newline_anchor = 1; - - ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); - - if (!ret) - return NULL; - - /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */ - return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); -} - -#ifdef _LIBC -libc_freeres_fn (free_mem) -{ - __regfree (&re_comp_buf); -} -#endif - -#endif /* _REGEX_RE_COMP */ - -/* Internal entry point. - Compile the regular expression PATTERN, whose length is LENGTH. - SYNTAX indicate regular expression's syntax. */ - -static reg_errcode_t -re_compile_internal (regex_t *preg, const char * pattern, size_t length, - reg_syntax_t syntax) -{ - reg_errcode_t err = REG_NOERROR; - re_dfa_t *dfa; - re_string_t regexp; - - /* Initialize the pattern buffer. */ - preg->fastmap_accurate = 0; - preg->syntax = syntax; - preg->not_bol = preg->not_eol = 0; - preg->used = 0; - preg->re_nsub = 0; - preg->can_be_null = 0; - preg->regs_allocated = REGS_UNALLOCATED; - - /* Initialize the dfa. */ - dfa = (re_dfa_t *) preg->buffer; - if (BE (preg->allocated < sizeof (re_dfa_t), 0)) - { - /* If zero allocated, but buffer is non-null, try to realloc - enough space. This loses if buffer's address is bogus, but - that is the user's responsibility. If ->buffer is NULL this - is a simple allocation. */ - dfa = re_realloc (preg->buffer, re_dfa_t, 1); - if (dfa == NULL) - return REG_ESPACE; - preg->allocated = sizeof (re_dfa_t); - preg->buffer = (unsigned char *) dfa; - } - preg->used = sizeof (re_dfa_t); - - err = init_dfa (dfa, length); - if (BE (err != REG_NOERROR, 0)) - { - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - return err; - } -#ifdef DEBUG - /* Note: length+1 will not overflow since it is checked in init_dfa. */ - dfa->re_str = re_malloc (char, length + 1); - strncpy (dfa->re_str, pattern, length + 1); -#endif - - __libc_lock_init (dfa->lock); - - err = re_string_construct (®exp, pattern, length, preg->translate, - (syntax & RE_ICASE) != 0, dfa); - if (BE (err != REG_NOERROR, 0)) - { - re_compile_internal_free_return: - free_workarea_compile (preg); - re_string_destruct (®exp); - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - return err; - } - - /* Parse the regular expression, and build a structure tree. */ - preg->re_nsub = 0; - dfa->str_tree = parse (®exp, preg, syntax, &err); - if (BE (dfa->str_tree == NULL, 0)) - goto re_compile_internal_free_return; - - /* Analyze the tree and create the nfa. */ - err = analyze (preg); - if (BE (err != REG_NOERROR, 0)) - goto re_compile_internal_free_return; - -#ifdef RE_ENABLE_I18N - /* If possible, do searching in single byte encoding to speed things up. */ - if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) - optimize_utf8 (dfa); -#endif - - /* Then create the initial state of the dfa. */ - err = create_initial_state (dfa); - - /* Release work areas. */ - free_workarea_compile (preg); - re_string_destruct (®exp); - - if (BE (err != REG_NOERROR, 0)) - { - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - } - - return err; -} - -/* Initialize DFA. We use the length of the regular expression PAT_LEN - as the initial length of some arrays. */ - -static reg_errcode_t -init_dfa (re_dfa_t *dfa, size_t pat_len) -{ - __re_size_t table_size; -#ifndef _LIBC - char *codeset_name; -#endif -#ifdef RE_ENABLE_I18N - size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); -#else - size_t max_i18n_object_size = 0; -#endif - size_t max_object_size = - MAX (sizeof (struct re_state_table_entry), - MAX (sizeof (re_token_t), - MAX (sizeof (re_node_set), - MAX (sizeof (regmatch_t), - max_i18n_object_size)))); - - memset (dfa, '\0', sizeof (re_dfa_t)); - - /* Force allocation of str_tree_storage the first time. */ - dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; - - /* Avoid overflows. The extra "/ 2" is for the table_size doubling - calculation below, and for similar doubling calculations - elsewhere. And it's <= rather than <, because some of the - doubling calculations add 1 afterwards. */ - if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0)) - return REG_ESPACE; - - dfa->nodes_alloc = pat_len + 1; - dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); - - /* table_size = 2 ^ ceil(log pat_len) */ - for (table_size = 1; ; table_size <<= 1) - if (table_size > pat_len) - break; - - dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); - dfa->state_hash_mask = table_size - 1; - - dfa->mb_cur_max = MB_CUR_MAX; -#ifdef _LIBC - if (dfa->mb_cur_max == 6 - && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) - dfa->is_utf8 = 1; - dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) - != 0); -#else - codeset_name = nl_langinfo (CODESET); - if (strcasecmp (codeset_name, "UTF-8") == 0 - || strcasecmp (codeset_name, "UTF8") == 0) - dfa->is_utf8 = 1; - - /* We check exhaustively in the loop below if this charset is a - superset of ASCII. */ - dfa->map_notascii = 0; -#endif - -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - { - if (dfa->is_utf8) - dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; - else - { - int i, j, ch; - - dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); - if (BE (dfa->sb_char == NULL, 0)) - return REG_ESPACE; - - /* Set the bits corresponding to single byte chars. */ - for (i = 0, ch = 0; i < BITSET_WORDS; ++i) - for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) - { - wint_t wch = __btowc (ch); - if (wch != WEOF) - dfa->sb_char[i] |= (bitset_word_t) 1 << j; -# ifndef _LIBC - if (isascii (ch) && wch != ch) - dfa->map_notascii = 1; -# endif - } - } - } -#endif - - if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) - return REG_ESPACE; - return REG_NOERROR; -} - -/* Initialize WORD_CHAR table, which indicate which character is - "word". In this case "word" means that it is the word construction - character used by some operators like "\<", "\>", etc. */ - -static void -internal_function -init_word_char (re_dfa_t *dfa) -{ - int i, j, ch; - dfa->word_ops_used = 1; - for (i = 0, ch = 0; i < BITSET_WORDS; ++i) - for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) - if (isalnum (ch) || ch == '_') - dfa->word_char[i] |= (bitset_word_t) 1 << j; -} - -/* Free the work area which are only used while compiling. */ - -static void -free_workarea_compile (regex_t *preg) -{ - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - bin_tree_storage_t *storage, *next; - for (storage = dfa->str_tree_storage; storage; storage = next) - { - next = storage->next; - re_free (storage); - } - dfa->str_tree_storage = NULL; - dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; - dfa->str_tree = NULL; - re_free (dfa->org_indices); - dfa->org_indices = NULL; -} - -/* Create initial states for all contexts. */ - -static reg_errcode_t -create_initial_state (re_dfa_t *dfa) -{ - Idx first, i; - reg_errcode_t err; - re_node_set init_nodes; - - /* Initial states have the epsilon closure of the node which is - the first node of the regular expression. */ - first = dfa->str_tree->first->node_idx; - dfa->init_node = first; - err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); - if (BE (err != REG_NOERROR, 0)) - return err; - - /* The back-references which are in initial states can epsilon transit, - since in this case all of the subexpressions can be null. - Then we add epsilon closures of the nodes which are the next nodes of - the back-references. */ - if (dfa->nbackref > 0) - for (i = 0; i < init_nodes.nelem; ++i) - { - Idx node_idx = init_nodes.elems[i]; - re_token_type_t type = dfa->nodes[node_idx].type; - - Idx clexp_idx; - if (type != OP_BACK_REF) - continue; - for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) - { - re_token_t *clexp_node; - clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; - if (clexp_node->type == OP_CLOSE_SUBEXP - && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) - break; - } - if (clexp_idx == init_nodes.nelem) - continue; - - if (type == OP_BACK_REF) - { - Idx dest_idx = dfa->edests[node_idx].elems[0]; - if (!re_node_set_contains (&init_nodes, dest_idx)) - { - reg_errcode_t merge_err - = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); - if (merge_err != REG_NOERROR) - return merge_err; - i = 0; - } - } - } - - /* It must be the first time to invoke acquire_state. */ - dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); - /* We don't check ERR here, since the initial state must not be NULL. */ - if (BE (dfa->init_state == NULL, 0)) - return err; - if (dfa->init_state->has_constraint) - { - dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, - CONTEXT_WORD); - dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, - CONTEXT_NEWLINE); - dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, - &init_nodes, - CONTEXT_NEWLINE - | CONTEXT_BEGBUF); - if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL - || dfa->init_state_begbuf == NULL, 0)) - return err; - } - else - dfa->init_state_word = dfa->init_state_nl - = dfa->init_state_begbuf = dfa->init_state; - - re_node_set_free (&init_nodes); - return REG_NOERROR; -} - -#ifdef RE_ENABLE_I18N -/* If it is possible to do searching in single byte encoding instead of UTF-8 - to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change - DFA nodes where needed. */ - -static void -optimize_utf8 (re_dfa_t *dfa) -{ - Idx node; - int i; - bool mb_chars = false; - bool has_period = false; - - for (node = 0; node < dfa->nodes_len; ++node) - switch (dfa->nodes[node].type) - { - case CHARACTER: - if (dfa->nodes[node].opr.c >= ASCII_CHARS) - mb_chars = true; - break; - case ANCHOR: - switch (dfa->nodes[node].opr.ctx_type) - { - case LINE_FIRST: - case LINE_LAST: - case BUF_FIRST: - case BUF_LAST: - break; - default: - /* Word anchors etc. cannot be handled. It's okay to test - opr.ctx_type since constraints (for all DFA nodes) are - created by ORing one or more opr.ctx_type values. */ - return; - } - break; - case OP_PERIOD: - has_period = true; - break; - case OP_BACK_REF: - case OP_ALT: - case END_OF_RE: - case OP_DUP_ASTERISK: - case OP_OPEN_SUBEXP: - case OP_CLOSE_SUBEXP: - break; - case COMPLEX_BRACKET: - return; - case SIMPLE_BRACKET: - /* Just double check. */ - { - int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0 - ? 0 - : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS); - for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) - { - if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0) - return; - rshift = 0; - } - } - break; - default: - abort (); - } - - if (mb_chars || has_period) - for (node = 0; node < dfa->nodes_len; ++node) - { - if (dfa->nodes[node].type == CHARACTER - && dfa->nodes[node].opr.c >= ASCII_CHARS) - dfa->nodes[node].mb_partial = 0; - else if (dfa->nodes[node].type == OP_PERIOD) - dfa->nodes[node].type = OP_UTF8_PERIOD; - } - - /* The search can be in single byte locale. */ - dfa->mb_cur_max = 1; - dfa->is_utf8 = 0; - dfa->has_mb_node = dfa->nbackref > 0 || has_period; -} -#endif - -/* Analyze the structure tree, and calculate "first", "next", "edest", - "eclosure", and "inveclosure". */ - -static reg_errcode_t -analyze (regex_t *preg) -{ - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - reg_errcode_t ret; - - /* Allocate arrays. */ - dfa->nexts = re_malloc (Idx, dfa->nodes_alloc); - dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc); - dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); - dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); - if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL - || dfa->eclosures == NULL, 0)) - return REG_ESPACE; - - dfa->subexp_map = re_malloc (Idx, preg->re_nsub); - if (dfa->subexp_map != NULL) - { - Idx i; - for (i = 0; i < preg->re_nsub; i++) - dfa->subexp_map[i] = i; - preorder (dfa->str_tree, optimize_subexps, dfa); - for (i = 0; i < preg->re_nsub; i++) - if (dfa->subexp_map[i] != i) - break; - if (i == preg->re_nsub) - { - free (dfa->subexp_map); - dfa->subexp_map = NULL; - } - } - - ret = postorder (dfa->str_tree, lower_subexps, preg); - if (BE (ret != REG_NOERROR, 0)) - return ret; - ret = postorder (dfa->str_tree, calc_first, dfa); - if (BE (ret != REG_NOERROR, 0)) - return ret; - preorder (dfa->str_tree, calc_next, dfa); - ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); - if (BE (ret != REG_NOERROR, 0)) - return ret; - ret = calc_eclosure (dfa); - if (BE (ret != REG_NOERROR, 0)) - return ret; - - /* We only need this during the prune_impossible_nodes pass in regexec.c; - skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ - if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) - || dfa->nbackref) - { - dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); - if (BE (dfa->inveclosures == NULL, 0)) - return REG_ESPACE; - ret = calc_inveclosure (dfa); - } - - return ret; -} - -/* Our parse trees are very unbalanced, so we cannot use a stack to - implement parse tree visits. Instead, we use parent pointers and - some hairy code in these two functions. */ -static reg_errcode_t -postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), - void *extra) -{ - bin_tree_t *node, *prev; - - for (node = root; ; ) - { - /* Descend down the tree, preferably to the left (or to the right - if that's the only child). */ - while (node->left || node->right) - if (node->left) - node = node->left; - else - node = node->right; - - do - { - reg_errcode_t err = fn (extra, node); - if (BE (err != REG_NOERROR, 0)) - return err; - if (node->parent == NULL) - return REG_NOERROR; - prev = node; - node = node->parent; - } - /* Go up while we have a node that is reached from the right. */ - while (node->right == prev || node->right == NULL); - node = node->right; - } -} - -static reg_errcode_t -preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), - void *extra) -{ - bin_tree_t *node; - - for (node = root; ; ) - { - reg_errcode_t err = fn (extra, node); - if (BE (err != REG_NOERROR, 0)) - return err; - - /* Go to the left node, or up and to the right. */ - if (node->left) - node = node->left; - else - { - bin_tree_t *prev = NULL; - while (node->right == prev || node->right == NULL) - { - prev = node; - node = node->parent; - if (!node) - return REG_NOERROR; - } - node = node->right; - } - } -} - -/* Optimization pass: if a SUBEXP is entirely contained, strip it and tell - re_search_internal to map the inner one's opr.idx to this one's. Adjust - backreferences as well. Requires a preorder visit. */ -static reg_errcode_t -optimize_subexps (void *extra, bin_tree_t *node) -{ - re_dfa_t *dfa = (re_dfa_t *) extra; - - if (node->token.type == OP_BACK_REF && dfa->subexp_map) - { - int idx = node->token.opr.idx; - node->token.opr.idx = dfa->subexp_map[idx]; - dfa->used_bkref_map |= 1 << node->token.opr.idx; - } - - else if (node->token.type == SUBEXP - && node->left && node->left->token.type == SUBEXP) - { - Idx other_idx = node->left->token.opr.idx; - - node->left = node->left->left; - if (node->left) - node->left->parent = node; - - dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; - if (other_idx < BITSET_WORD_BITS) - dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); - } - - return REG_NOERROR; -} - -/* Lowering pass: Turn each SUBEXP node into the appropriate concatenation - of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */ -static reg_errcode_t -lower_subexps (void *extra, bin_tree_t *node) -{ - regex_t *preg = (regex_t *) extra; - reg_errcode_t err = REG_NOERROR; - - if (node->left && node->left->token.type == SUBEXP) - { - node->left = lower_subexp (&err, preg, node->left); - if (node->left) - node->left->parent = node; - } - if (node->right && node->right->token.type == SUBEXP) - { - node->right = lower_subexp (&err, preg, node->right); - if (node->right) - node->right->parent = node; - } - - return err; -} - -static bin_tree_t * -lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) -{ - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - bin_tree_t *body = node->left; - bin_tree_t *op, *cls, *tree1, *tree; - - if (preg->no_sub - /* We do not optimize empty subexpressions, because otherwise we may - have bad CONCAT nodes with NULL children. This is obviously not - very common, so we do not lose much. An example that triggers - this case is the sed "script" /\(\)/x. */ - && node->left != NULL - && (node->token.opr.idx >= BITSET_WORD_BITS - || !(dfa->used_bkref_map - & ((bitset_word_t) 1 << node->token.opr.idx)))) - return node->left; - - /* Convert the SUBEXP node to the concatenation of an - OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */ - op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP); - cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); - tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; - tree = create_tree (dfa, op, tree1, CONCAT); - if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - - op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; - op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; - return tree; -} - -/* Pass 1 in building the NFA: compute FIRST and create unlinked automaton - nodes. Requires a postorder visit. */ -static reg_errcode_t -calc_first (void *extra, bin_tree_t *node) -{ - re_dfa_t *dfa = (re_dfa_t *) extra; - if (node->token.type == CONCAT) - { - node->first = node->left->first; - node->node_idx = node->left->node_idx; - } - else - { - node->first = node; - node->node_idx = re_dfa_add_node (dfa, node->token); - if (BE (node->node_idx == REG_MISSING, 0)) - return REG_ESPACE; - if (node->token.type == ANCHOR) - dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type; - } - return REG_NOERROR; -} - -/* Pass 2: compute NEXT on the tree. Preorder visit. */ -static reg_errcode_t -calc_next (void *extra, bin_tree_t *node) -{ - switch (node->token.type) - { - case OP_DUP_ASTERISK: - node->left->next = node; - break; - case CONCAT: - node->left->next = node->right->first; - node->right->next = node->next; - break; - default: - if (node->left) - node->left->next = node->next; - if (node->right) - node->right->next = node->next; - break; - } - return REG_NOERROR; -} - -/* Pass 3: link all DFA nodes to their NEXT node (any order will do). */ -static reg_errcode_t -link_nfa_nodes (void *extra, bin_tree_t *node) -{ - re_dfa_t *dfa = (re_dfa_t *) extra; - Idx idx = node->node_idx; - reg_errcode_t err = REG_NOERROR; - - switch (node->token.type) - { - case CONCAT: - break; - - case END_OF_RE: - assert (node->next == NULL); - break; - - case OP_DUP_ASTERISK: - case OP_ALT: - { - Idx left, right; - dfa->has_plural_match = 1; - if (node->left != NULL) - left = node->left->first->node_idx; - else - left = node->next->node_idx; - if (node->right != NULL) - right = node->right->first->node_idx; - else - right = node->next->node_idx; - assert (REG_VALID_INDEX (left)); - assert (REG_VALID_INDEX (right)); - err = re_node_set_init_2 (dfa->edests + idx, left, right); - } - break; - - case ANCHOR: - case OP_OPEN_SUBEXP: - case OP_CLOSE_SUBEXP: - err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); - break; - - case OP_BACK_REF: - dfa->nexts[idx] = node->next->node_idx; - if (node->token.type == OP_BACK_REF) - err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); - break; - - default: - assert (!IS_EPSILON_NODE (node->token.type)); - dfa->nexts[idx] = node->next->node_idx; - break; - } - - return err; -} - -/* Duplicate the epsilon closure of the node ROOT_NODE. - Note that duplicated nodes have constraint INIT_CONSTRAINT in addition - to their own constraint. */ - -static reg_errcode_t -internal_function -duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node, - Idx root_node, unsigned int init_constraint) -{ - Idx org_node, clone_node; - bool ok; - unsigned int constraint = init_constraint; - for (org_node = top_org_node, clone_node = top_clone_node;;) - { - Idx org_dest, clone_dest; - if (dfa->nodes[org_node].type == OP_BACK_REF) - { - /* If the back reference epsilon-transit, its destination must - also have the constraint. Then duplicate the epsilon closure - of the destination of the back reference, and store it in - edests of the back reference. */ - org_dest = dfa->nexts[org_node]; - re_node_set_empty (dfa->edests + clone_node); - clone_dest = duplicate_node (dfa, org_dest, constraint); - if (BE (clone_dest == REG_MISSING, 0)) - return REG_ESPACE; - dfa->nexts[clone_node] = dfa->nexts[org_node]; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - } - else if (dfa->edests[org_node].nelem == 0) - { - /* In case of the node can't epsilon-transit, don't duplicate the - destination and store the original destination as the - destination of the node. */ - dfa->nexts[clone_node] = dfa->nexts[org_node]; - break; - } - else if (dfa->edests[org_node].nelem == 1) - { - /* In case of the node can epsilon-transit, and it has only one - destination. */ - org_dest = dfa->edests[org_node].elems[0]; - re_node_set_empty (dfa->edests + clone_node); - /* If the node is root_node itself, it means the epsilon closure - has a loop. Then tie it to the destination of the root_node. */ - if (org_node == root_node && clone_node != org_node) - { - ok = re_node_set_insert (dfa->edests + clone_node, org_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - break; - } - /* In case the node has another constraint, append it. */ - constraint |= dfa->nodes[org_node].constraint; - clone_dest = duplicate_node (dfa, org_dest, constraint); - if (BE (clone_dest == REG_MISSING, 0)) - return REG_ESPACE; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - } - else /* dfa->edests[org_node].nelem == 2 */ - { - /* In case of the node can epsilon-transit, and it has two - destinations. In the bin_tree_t and DFA, that's '|' and '*'. */ - org_dest = dfa->edests[org_node].elems[0]; - re_node_set_empty (dfa->edests + clone_node); - /* Search for a duplicated node which satisfies the constraint. */ - clone_dest = search_duplicated_node (dfa, org_dest, constraint); - if (clone_dest == REG_MISSING) - { - /* There is no such duplicated node, create a new one. */ - reg_errcode_t err; - clone_dest = duplicate_node (dfa, org_dest, constraint); - if (BE (clone_dest == REG_MISSING, 0)) - return REG_ESPACE; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - err = duplicate_node_closure (dfa, org_dest, clone_dest, - root_node, constraint); - if (BE (err != REG_NOERROR, 0)) - return err; - } - else - { - /* There is a duplicated node which satisfies the constraint, - use it to avoid infinite loop. */ - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - } - - org_dest = dfa->edests[org_node].elems[1]; - clone_dest = duplicate_node (dfa, org_dest, constraint); - if (BE (clone_dest == REG_MISSING, 0)) - return REG_ESPACE; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - } - org_node = org_dest; - clone_node = clone_dest; - } - return REG_NOERROR; -} - -/* Search for a node which is duplicated from the node ORG_NODE, and - satisfies the constraint CONSTRAINT. */ - -static Idx -search_duplicated_node (const re_dfa_t *dfa, Idx org_node, - unsigned int constraint) -{ - Idx idx; - for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) - { - if (org_node == dfa->org_indices[idx] - && constraint == dfa->nodes[idx].constraint) - return idx; /* Found. */ - } - return REG_MISSING; /* Not found. */ -} - -/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. - Return the index of the new node, or REG_MISSING if insufficient storage is - available. */ - -static Idx -duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint) -{ - Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); - if (BE (dup_idx != REG_MISSING, 1)) - { - dfa->nodes[dup_idx].constraint = constraint; - dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; - dfa->nodes[dup_idx].duplicated = 1; - - /* Store the index of the original node. */ - dfa->org_indices[dup_idx] = org_idx; - } - return dup_idx; -} - -static reg_errcode_t -calc_inveclosure (re_dfa_t *dfa) -{ - Idx src, idx; - bool ok; - for (idx = 0; idx < dfa->nodes_len; ++idx) - re_node_set_init_empty (dfa->inveclosures + idx); - - for (src = 0; src < dfa->nodes_len; ++src) - { - Idx *elems = dfa->eclosures[src].elems; - for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) - { - ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); - if (BE (! ok, 0)) - return REG_ESPACE; - } - } - - return REG_NOERROR; -} - -/* Calculate "eclosure" for all the node in DFA. */ - -static reg_errcode_t -calc_eclosure (re_dfa_t *dfa) -{ - Idx node_idx; - bool incomplete; -#ifdef DEBUG - assert (dfa->nodes_len > 0); -#endif - incomplete = false; - /* For each nodes, calculate epsilon closure. */ - for (node_idx = 0; ; ++node_idx) - { - reg_errcode_t err; - re_node_set eclosure_elem; - if (node_idx == dfa->nodes_len) - { - if (!incomplete) - break; - incomplete = false; - node_idx = 0; - } - -#ifdef DEBUG - assert (dfa->eclosures[node_idx].nelem != REG_MISSING); -#endif - - /* If we have already calculated, skip it. */ - if (dfa->eclosures[node_idx].nelem != 0) - continue; - /* Calculate epsilon closure of `node_idx'. */ - err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true); - if (BE (err != REG_NOERROR, 0)) - return err; - - if (dfa->eclosures[node_idx].nelem == 0) - { - incomplete = true; - re_node_set_free (&eclosure_elem); - } - } - return REG_NOERROR; -} - -/* Calculate epsilon closure of NODE. */ - -static reg_errcode_t -calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) -{ - reg_errcode_t err; - Idx i; - re_node_set eclosure; - bool ok; - bool incomplete = false; - err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); - if (BE (err != REG_NOERROR, 0)) - return err; - - /* This indicates that we are calculating this node now. - We reference this value to avoid infinite loop. */ - dfa->eclosures[node].nelem = REG_MISSING; - - /* If the current node has constraints, duplicate all nodes - since they must inherit the constraints. */ - if (dfa->nodes[node].constraint - && dfa->edests[node].nelem - && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) - { - err = duplicate_node_closure (dfa, node, node, node, - dfa->nodes[node].constraint); - if (BE (err != REG_NOERROR, 0)) - return err; - } - - /* Expand each epsilon destination nodes. */ - if (IS_EPSILON_NODE(dfa->nodes[node].type)) - for (i = 0; i < dfa->edests[node].nelem; ++i) - { - re_node_set eclosure_elem; - Idx edest = dfa->edests[node].elems[i]; - /* If calculating the epsilon closure of `edest' is in progress, - return intermediate result. */ - if (dfa->eclosures[edest].nelem == REG_MISSING) - { - incomplete = true; - continue; - } - /* If we haven't calculated the epsilon closure of `edest' yet, - calculate now. Otherwise use calculated epsilon closure. */ - if (dfa->eclosures[edest].nelem == 0) - { - err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false); - if (BE (err != REG_NOERROR, 0)) - return err; - } - else - eclosure_elem = dfa->eclosures[edest]; - /* Merge the epsilon closure of `edest'. */ - err = re_node_set_merge (&eclosure, &eclosure_elem); - if (BE (err != REG_NOERROR, 0)) - return err; - /* If the epsilon closure of `edest' is incomplete, - the epsilon closure of this node is also incomplete. */ - if (dfa->eclosures[edest].nelem == 0) - { - incomplete = true; - re_node_set_free (&eclosure_elem); - } - } - - /* An epsilon closure includes itself. */ - ok = re_node_set_insert (&eclosure, node); - if (BE (! ok, 0)) - return REG_ESPACE; - if (incomplete && !root) - dfa->eclosures[node].nelem = 0; - else - dfa->eclosures[node] = eclosure; - *new_set = eclosure; - return REG_NOERROR; -} - -/* Functions for token which are used in the parser. */ - -/* Fetch a token from INPUT. - We must not use this function inside bracket expressions. */ - -static void -internal_function -fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) -{ - re_string_skip_bytes (input, peek_token (result, input, syntax)); -} - -/* Peek a token from INPUT, and return the length of the token. - We must not use this function inside bracket expressions. */ - -static int -internal_function -peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) -{ - unsigned char c; - - if (re_string_eoi (input)) - { - token->type = END_OF_RE; - return 0; - } - - c = re_string_peek_byte (input, 0); - token->opr.c = c; - - token->word_char = 0; -#ifdef RE_ENABLE_I18N - token->mb_partial = 0; - if (input->mb_cur_max > 1 && - !re_string_first_byte (input, re_string_cur_idx (input))) - { - token->type = CHARACTER; - token->mb_partial = 1; - return 1; - } -#endif - if (c == '\\') - { - unsigned char c2; - if (re_string_cur_idx (input) + 1 >= re_string_length (input)) - { - token->type = BACK_SLASH; - return 1; - } - - c2 = re_string_peek_byte_case (input, 1); - token->opr.c = c2; - token->type = CHARACTER; -#ifdef RE_ENABLE_I18N - if (input->mb_cur_max > 1) - { - wint_t wc = re_string_wchar_at (input, - re_string_cur_idx (input) + 1); - token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; - } - else -#endif - token->word_char = IS_WORD_CHAR (c2) != 0; - - switch (c2) - { - case '|': - if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) - token->type = OP_ALT; - break; - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - if (!(syntax & RE_NO_BK_REFS)) - { - token->type = OP_BACK_REF; - token->opr.idx = c2 - '1'; - } - break; - case '<': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = WORD_FIRST; - } - break; - case '>': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = WORD_LAST; - } - break; - case 'b': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = WORD_DELIM; - } - break; - case 'B': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = NOT_WORD_DELIM; - } - break; - case 'w': - if (!(syntax & RE_NO_GNU_OPS)) - token->type = OP_WORD; - break; - case 'W': - if (!(syntax & RE_NO_GNU_OPS)) - token->type = OP_NOTWORD; - break; - case 's': - if (!(syntax & RE_NO_GNU_OPS)) - token->type = OP_SPACE; - break; - case 'S': - if (!(syntax & RE_NO_GNU_OPS)) - token->type = OP_NOTSPACE; - break; - case '`': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = BUF_FIRST; - } - break; - case '\'': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = BUF_LAST; - } - break; - case '(': - if (!(syntax & RE_NO_BK_PARENS)) - token->type = OP_OPEN_SUBEXP; - break; - case ')': - if (!(syntax & RE_NO_BK_PARENS)) - token->type = OP_CLOSE_SUBEXP; - break; - case '+': - if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) - token->type = OP_DUP_PLUS; - break; - case '?': - if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) - token->type = OP_DUP_QUESTION; - break; - case '{': - if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) - token->type = OP_OPEN_DUP_NUM; - break; - case '}': - if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) - token->type = OP_CLOSE_DUP_NUM; - break; - default: - break; - } - return 2; - } - - token->type = CHARACTER; -#ifdef RE_ENABLE_I18N - if (input->mb_cur_max > 1) - { - wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); - token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; - } - else -#endif - token->word_char = IS_WORD_CHAR (token->opr.c); - - switch (c) - { - case '\n': - if (syntax & RE_NEWLINE_ALT) - token->type = OP_ALT; - break; - case '|': - if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) - token->type = OP_ALT; - break; - case '*': - token->type = OP_DUP_ASTERISK; - break; - case '+': - if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) - token->type = OP_DUP_PLUS; - break; - case '?': - if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) - token->type = OP_DUP_QUESTION; - break; - case '{': - if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) - token->type = OP_OPEN_DUP_NUM; - break; - case '}': - if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) - token->type = OP_CLOSE_DUP_NUM; - break; - case '(': - if (syntax & RE_NO_BK_PARENS) - token->type = OP_OPEN_SUBEXP; - break; - case ')': - if (syntax & RE_NO_BK_PARENS) - token->type = OP_CLOSE_SUBEXP; - break; - case '[': - token->type = OP_OPEN_BRACKET; - break; - case '.': - token->type = OP_PERIOD; - break; - case '^': - if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && - re_string_cur_idx (input) != 0) - { - char prev = re_string_peek_byte (input, -1); - if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') - break; - } - token->type = ANCHOR; - token->opr.ctx_type = LINE_FIRST; - break; - case '$': - if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && - re_string_cur_idx (input) + 1 != re_string_length (input)) - { - re_token_t next; - re_string_skip_bytes (input, 1); - peek_token (&next, input, syntax); - re_string_skip_bytes (input, -1); - if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) - break; - } - token->type = ANCHOR; - token->opr.ctx_type = LINE_LAST; - break; - default: - break; - } - return 1; -} - -/* Peek a token from INPUT, and return the length of the token. - We must not use this function out of bracket expressions. */ - -static int -internal_function -peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) -{ - unsigned char c; - if (re_string_eoi (input)) - { - token->type = END_OF_RE; - return 0; - } - c = re_string_peek_byte (input, 0); - token->opr.c = c; - -#ifdef RE_ENABLE_I18N - if (input->mb_cur_max > 1 && - !re_string_first_byte (input, re_string_cur_idx (input))) - { - token->type = CHARACTER; - return 1; - } -#endif /* RE_ENABLE_I18N */ - - if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) - && re_string_cur_idx (input) + 1 < re_string_length (input)) - { - /* In this case, '\' escape a character. */ - unsigned char c2; - re_string_skip_bytes (input, 1); - c2 = re_string_peek_byte (input, 0); - token->opr.c = c2; - token->type = CHARACTER; - return 1; - } - if (c == '[') /* '[' is a special char in a bracket exps. */ - { - unsigned char c2; - int token_len; - if (re_string_cur_idx (input) + 1 < re_string_length (input)) - c2 = re_string_peek_byte (input, 1); - else - c2 = 0; - token->opr.c = c2; - token_len = 2; - switch (c2) - { - case '.': - token->type = OP_OPEN_COLL_ELEM; - break; - case '=': - token->type = OP_OPEN_EQUIV_CLASS; - break; - case ':': - if (syntax & RE_CHAR_CLASSES) - { - token->type = OP_OPEN_CHAR_CLASS; - break; - } - /* else fall through. */ - default: - token->type = CHARACTER; - token->opr.c = c; - token_len = 1; - break; - } - return token_len; - } - switch (c) - { - case '-': - token->type = OP_CHARSET_RANGE; - break; - case ']': - token->type = OP_CLOSE_BRACKET; - break; - case '^': - token->type = OP_NON_MATCH_LIST; - break; - default: - token->type = CHARACTER; - } - return 1; -} - -/* Functions for parser. */ - -/* Entry point of the parser. - Parse the regular expression REGEXP and return the structure tree. - If an error is occured, ERR is set by error code, and return NULL. - This function build the following tree, from regular expression : - CAT - / \ - / \ - EOR - - CAT means concatenation. - EOR means end of regular expression. */ - -static bin_tree_t * -parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, - reg_errcode_t *err) -{ - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - bin_tree_t *tree, *eor, *root; - re_token_t current_token; - dfa->syntax = syntax; - fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); - tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - eor = create_tree (dfa, NULL, NULL, END_OF_RE); - if (tree != NULL) - root = create_tree (dfa, tree, eor, CONCAT); - else - root = eor; - if (BE (eor == NULL || root == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - return root; -} - -/* This function build the following tree, from regular expression - |: - ALT - / \ - / \ - - - ALT means alternative, which represents the operator `|'. */ - -static bin_tree_t * -parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, - reg_syntax_t syntax, Idx nest, reg_errcode_t *err) -{ - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - bin_tree_t *tree, *branch = NULL; - tree = parse_branch (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - - while (token->type == OP_ALT) - { - fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); - if (token->type != OP_ALT && token->type != END_OF_RE - && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) - { - branch = parse_branch (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && branch == NULL, 0)) - return NULL; - } - else - branch = NULL; - tree = create_tree (dfa, tree, branch, OP_ALT); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - } - return tree; -} - -/* This function build the following tree, from regular expression - : - CAT - / \ - / \ - - - CAT means concatenation. */ - -static bin_tree_t * -parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, - reg_syntax_t syntax, Idx nest, reg_errcode_t *err) -{ - bin_tree_t *tree, *expr; - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - tree = parse_expression (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - - while (token->type != OP_ALT && token->type != END_OF_RE - && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) - { - expr = parse_expression (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && expr == NULL, 0)) - { - return NULL; - } - if (tree != NULL && expr != NULL) - { - tree = create_tree (dfa, tree, expr, CONCAT); - if (tree == NULL) - { - *err = REG_ESPACE; - return NULL; - } - } - else if (tree == NULL) - tree = expr; - /* Otherwise expr == NULL, we don't need to create new tree. */ - } - return tree; -} - -/* This function build the following tree, from regular expression a*: - * - | - a -*/ - -static bin_tree_t * -parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, - reg_syntax_t syntax, Idx nest, reg_errcode_t *err) -{ - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - bin_tree_t *tree; - switch (token->type) - { - case CHARACTER: - tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - { - while (!re_string_eoi (regexp) - && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) - { - bin_tree_t *mbc_remain; - fetch_token (token, regexp, syntax); - mbc_remain = create_token_tree (dfa, NULL, NULL, token); - tree = create_tree (dfa, tree, mbc_remain, CONCAT); - if (BE (mbc_remain == NULL || tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - } - } -#endif - break; - case OP_OPEN_SUBEXP: - tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - break; - case OP_OPEN_BRACKET: - tree = parse_bracket_exp (regexp, dfa, token, syntax, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - break; - case OP_BACK_REF: - if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) - { - *err = REG_ESUBREG; - return NULL; - } - dfa->used_bkref_map |= 1 << token->opr.idx; - tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - ++dfa->nbackref; - dfa->has_mb_node = 1; - break; - case OP_OPEN_DUP_NUM: - if (syntax & RE_CONTEXT_INVALID_DUP) - { - *err = REG_BADRPT; - return NULL; - } - /* FALLTHROUGH */ - case OP_DUP_ASTERISK: - case OP_DUP_PLUS: - case OP_DUP_QUESTION: - if (syntax & RE_CONTEXT_INVALID_OPS) - { - *err = REG_BADRPT; - return NULL; - } - else if (syntax & RE_CONTEXT_INDEP_OPS) - { - fetch_token (token, regexp, syntax); - return parse_expression (regexp, preg, token, syntax, nest, err); - } - /* else fall through */ - case OP_CLOSE_SUBEXP: - if ((token->type == OP_CLOSE_SUBEXP) && - !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) - { - *err = REG_ERPAREN; - return NULL; - } - /* else fall through */ - case OP_CLOSE_DUP_NUM: - /* We treat it as a normal character. */ - - /* Then we can these characters as normal characters. */ - token->type = CHARACTER; - /* mb_partial and word_char bits should be initialized already - by peek_token. */ - tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - break; - case ANCHOR: - if ((token->opr.ctx_type - & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) - && dfa->word_ops_used == 0) - init_word_char (dfa); - if (token->opr.ctx_type == WORD_DELIM - || token->opr.ctx_type == NOT_WORD_DELIM) - { - bin_tree_t *tree_first, *tree_last; - if (token->opr.ctx_type == WORD_DELIM) - { - token->opr.ctx_type = WORD_FIRST; - tree_first = create_token_tree (dfa, NULL, NULL, token); - token->opr.ctx_type = WORD_LAST; - } - else - { - token->opr.ctx_type = INSIDE_WORD; - tree_first = create_token_tree (dfa, NULL, NULL, token); - token->opr.ctx_type = INSIDE_NOTWORD; - } - tree_last = create_token_tree (dfa, NULL, NULL, token); - tree = create_tree (dfa, tree_first, tree_last, OP_ALT); - if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - } - else - { - tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - } - /* We must return here, since ANCHORs can't be followed - by repetition operators. - eg. RE"^*" is invalid or "", - it must not be "". */ - fetch_token (token, regexp, syntax); - return tree; - case OP_PERIOD: - tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - if (dfa->mb_cur_max > 1) - dfa->has_mb_node = 1; - break; - case OP_WORD: - case OP_NOTWORD: - tree = build_charclass_op (dfa, regexp->trans, - (const unsigned char *) "alnum", - (const unsigned char *) "_", - token->type == OP_NOTWORD, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - break; - case OP_SPACE: - case OP_NOTSPACE: - tree = build_charclass_op (dfa, regexp->trans, - (const unsigned char *) "space", - (const unsigned char *) "", - token->type == OP_NOTSPACE, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - break; - case OP_ALT: - case END_OF_RE: - return NULL; - case BACK_SLASH: - *err = REG_EESCAPE; - return NULL; - default: - /* Must not happen? */ -#ifdef DEBUG - assert (0); -#endif - return NULL; - } - fetch_token (token, regexp, syntax); - - while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS - || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) - { - tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - /* In BRE consecutive duplications are not allowed. */ - if ((syntax & RE_CONTEXT_INVALID_DUP) - && (token->type == OP_DUP_ASTERISK - || token->type == OP_OPEN_DUP_NUM)) - { - *err = REG_BADRPT; - return NULL; - } - } - - return tree; -} - -/* This function build the following tree, from regular expression - (): - SUBEXP - | - -*/ - -static bin_tree_t * -parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, - reg_syntax_t syntax, Idx nest, reg_errcode_t *err) -{ - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; - bin_tree_t *tree; - size_t cur_nsub; - cur_nsub = preg->re_nsub++; - - fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); - - /* The subexpression may be a null string. */ - if (token->type == OP_CLOSE_SUBEXP) - tree = NULL; - else - { - tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); - if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) - *err = REG_EPAREN; - if (BE (*err != REG_NOERROR, 0)) - return NULL; - } - - if (cur_nsub <= '9' - '1') - dfa->completed_bkref_map |= 1 << cur_nsub; - - tree = create_tree (dfa, tree, NULL, SUBEXP); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - tree->token.opr.idx = cur_nsub; - return tree; -} - -/* This function parse repetition operators like "*", "+", "{1,3}" etc. */ - -static bin_tree_t * -parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, - re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) -{ - bin_tree_t *tree = NULL, *old_tree = NULL; - Idx i, start, end, start_idx = re_string_cur_idx (regexp); - re_token_t start_token = *token; - - if (token->type == OP_OPEN_DUP_NUM) - { - end = 0; - start = fetch_number (regexp, token, syntax); - if (start == REG_MISSING) - { - if (token->type == CHARACTER && token->opr.c == ',') - start = 0; /* We treat "{,m}" as "{0,m}". */ - else - { - *err = REG_BADBR; /* {} is invalid. */ - return NULL; - } - } - if (BE (start != REG_ERROR, 1)) - { - /* We treat "{n}" as "{n,n}". */ - end = ((token->type == OP_CLOSE_DUP_NUM) ? start - : ((token->type == CHARACTER && token->opr.c == ',') - ? fetch_number (regexp, token, syntax) : REG_ERROR)); - } - if (BE (start == REG_ERROR || end == REG_ERROR, 0)) - { - /* Invalid sequence. */ - if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) - { - if (token->type == END_OF_RE) - *err = REG_EBRACE; - else - *err = REG_BADBR; - - return NULL; - } - - /* If the syntax bit is set, rollback. */ - re_string_set_index (regexp, start_idx); - *token = start_token; - token->type = CHARACTER; - /* mb_partial and word_char bits should be already initialized by - peek_token. */ - return elem; - } - - if (BE ((end != REG_MISSING && start > end) - || token->type != OP_CLOSE_DUP_NUM, 0)) - { - /* First number greater than second. */ - *err = REG_BADBR; - return NULL; - } - } - else - { - start = (token->type == OP_DUP_PLUS) ? 1 : 0; - end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING; - } - - fetch_token (token, regexp, syntax); - - if (BE (elem == NULL, 0)) - return NULL; - if (BE (start == 0 && end == 0, 0)) - { - postorder (elem, free_tree, NULL); - return NULL; - } - - /* Extract "{n,m}" to "...{0,}". */ - if (BE (start > 0, 0)) - { - tree = elem; - for (i = 2; i <= start; ++i) - { - elem = duplicate_tree (elem, dfa); - tree = create_tree (dfa, tree, elem, CONCAT); - if (BE (elem == NULL || tree == NULL, 0)) - goto parse_dup_op_espace; - } - - if (start == end) - return tree; - - /* Duplicate ELEM before it is marked optional. */ - elem = duplicate_tree (elem, dfa); - old_tree = tree; - } - else - old_tree = NULL; - - if (elem->token.type == SUBEXP) - postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx); - - tree = create_tree (dfa, elem, NULL, - (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT)); - if (BE (tree == NULL, 0)) - goto parse_dup_op_espace; - -/* From gnulib's "intprops.h": - True if the arithmetic type T is signed. */ -#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - - /* This loop is actually executed only when end != REG_MISSING, - to rewrite {0,n} as ((...?)?)?... We have - already created the start+1-th copy. */ - if (TYPE_SIGNED (Idx) || end != REG_MISSING) - for (i = start + 2; i <= end; ++i) - { - elem = duplicate_tree (elem, dfa); - tree = create_tree (dfa, tree, elem, CONCAT); - if (BE (elem == NULL || tree == NULL, 0)) - goto parse_dup_op_espace; - - tree = create_tree (dfa, tree, NULL, OP_ALT); - if (BE (tree == NULL, 0)) - goto parse_dup_op_espace; - } - - if (old_tree) - tree = create_tree (dfa, old_tree, tree, CONCAT); - - return tree; - - parse_dup_op_espace: - *err = REG_ESPACE; - return NULL; -} - -/* Size of the names for collating symbol/equivalence_class/character_class. - I'm not sure, but maybe enough. */ -#define BRACKET_NAME_BUF_SIZE 32 - -#ifndef _LIBC - /* Local function for parse_bracket_exp only used in case of NOT _LIBC. - Build the range expression which starts from START_ELEM, and ends - at END_ELEM. The result are written to MBCSET and SBCSET. - RANGE_ALLOC is the allocated size of mbcset->range_starts, and - mbcset->range_ends, is a pointer argument sinse we may - update it. */ - -static reg_errcode_t -internal_function -# ifdef RE_ENABLE_I18N -build_range_exp (const reg_syntax_t syntax, - bitset_t sbcset, - re_charset_t *mbcset, - Idx *range_alloc, - const bracket_elem_t *start_elem, - const bracket_elem_t *end_elem) -# else /* not RE_ENABLE_I18N */ -build_range_exp (const reg_syntax_t syntax, - bitset_t sbcset, - const bracket_elem_t *start_elem, - const bracket_elem_t *end_elem) -# endif /* not RE_ENABLE_I18N */ -{ - unsigned int start_ch, end_ch; - /* Equivalence Classes and Character Classes can't be a range start/end. */ - if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS - || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, - 0)) - return REG_ERANGE; - - /* We can handle no multi character collating elements without libc - support. */ - if (BE ((start_elem->type == COLL_SYM - && strlen ((char *) start_elem->opr.name) > 1) - || (end_elem->type == COLL_SYM - && strlen ((char *) end_elem->opr.name) > 1), 0)) - return REG_ECOLLATE; - -# ifdef RE_ENABLE_I18N - { - wchar_t wc; - wint_t start_wc; - wint_t end_wc; - wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; - - start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch - : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] - : 0)); - end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch - : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] - : 0)); - start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) - ? __btowc (start_ch) : start_elem->opr.wch); - end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) - ? __btowc (end_ch) : end_elem->opr.wch); - if (start_wc == WEOF || end_wc == WEOF) - return REG_ECOLLATE; - cmp_buf[0] = start_wc; - cmp_buf[4] = end_wc; - - if (BE ((syntax & RE_NO_EMPTY_RANGES) - && wcscoll (cmp_buf, cmp_buf + 4) > 0, 0)) - return REG_ERANGE; - - /* Got valid collation sequence values, add them as a new entry. - However, for !_LIBC we have no collation elements: if the - character set is single byte, the single byte character set - that we build below suffices. parse_bracket_exp passes - no MBCSET if dfa->mb_cur_max == 1. */ - if (mbcset) - { - /* Check the space of the arrays. */ - if (BE (*range_alloc == mbcset->nranges, 0)) - { - /* There is not enough space, need realloc. */ - wchar_t *new_array_start, *new_array_end; - Idx new_nranges; - - /* +1 in case of mbcset->nranges is 0. */ - new_nranges = 2 * mbcset->nranges + 1; - /* Use realloc since mbcset->range_starts and mbcset->range_ends - are NULL if *range_alloc == 0. */ - new_array_start = re_realloc (mbcset->range_starts, wchar_t, - new_nranges); - new_array_end = re_realloc (mbcset->range_ends, wchar_t, - new_nranges); - - if (BE (new_array_start == NULL || new_array_end == NULL, 0)) - return REG_ESPACE; - - mbcset->range_starts = new_array_start; - mbcset->range_ends = new_array_end; - *range_alloc = new_nranges; - } - - mbcset->range_starts[mbcset->nranges] = start_wc; - mbcset->range_ends[mbcset->nranges++] = end_wc; - } - - /* Build the table for single byte characters. */ - for (wc = 0; wc < SBC_MAX; ++wc) - { - cmp_buf[2] = wc; - if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 - && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) - bitset_set (sbcset, wc); - } - } -# else /* not RE_ENABLE_I18N */ - { - unsigned int ch; - start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch - : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] - : 0)); - end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch - : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] - : 0)); - if (start_ch > end_ch) - return REG_ERANGE; - /* Build the table for single byte characters. */ - for (ch = 0; ch < SBC_MAX; ++ch) - if (start_ch <= ch && ch <= end_ch) - bitset_set (sbcset, ch); - } -# endif /* not RE_ENABLE_I18N */ - return REG_NOERROR; -} -#endif /* not _LIBC */ - -#ifndef _LIBC -/* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. - Build the collating element which is represented by NAME. - The result are written to MBCSET and SBCSET. - COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a - pointer argument since we may update it. */ - -static reg_errcode_t -internal_function -build_collating_symbol (bitset_t sbcset, -# ifdef RE_ENABLE_I18N - re_charset_t *mbcset, Idx *coll_sym_alloc, -# endif - const unsigned char *name) -{ - size_t name_len = strlen ((const char *) name); - if (BE (name_len != 1, 0)) - return REG_ECOLLATE; - else - { - bitset_set (sbcset, name[0]); - return REG_NOERROR; - } -} -#endif /* not _LIBC */ - -/* This function parse bracket expression like "[abc]", "[a-c]", - "[[.a-a.]]" etc. */ - -static bin_tree_t * -parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, - reg_syntax_t syntax, reg_errcode_t *err) -{ -#ifdef _LIBC - const unsigned char *collseqmb; - const char *collseqwc; - uint32_t nrules; - int32_t table_size; - const int32_t *symb_table; - const unsigned char *extra; - - /* Local function for parse_bracket_exp used in _LIBC environement. - Seek the collating symbol entry correspondings to NAME. - Return the index of the symbol in the SYMB_TABLE. */ - - auto inline int32_t - __attribute ((always_inline)) - seek_collating_symbol_entry (name, name_len) - const unsigned char *name; - size_t name_len; - { - int32_t hash = elem_hash ((const char *) name, name_len); - int32_t elem = hash % table_size; - if (symb_table[2 * elem] != 0) - { - int32_t second = hash % (table_size - 2) + 1; - - do - { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - /* Compare the length of the name. */ - && name_len == extra[symb_table[2 * elem + 1]] - /* Compare the name. */ - && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], - name_len) == 0) - { - /* Yep, this is the entry. */ - break; - } - - /* Next entry. */ - elem += second; - } - while (symb_table[2 * elem] != 0); - } - return elem; - } - - /* Local function for parse_bracket_exp used in _LIBC environment. - Look up the collation sequence value of BR_ELEM. - Return the value if succeeded, UINT_MAX otherwise. */ - - auto inline unsigned int - __attribute ((always_inline)) - lookup_collation_sequence_value (br_elem) - bracket_elem_t *br_elem; - { - if (br_elem->type == SB_CHAR) - { - /* - if (MB_CUR_MAX == 1) - */ - if (nrules == 0) - return collseqmb[br_elem->opr.ch]; - else - { - wint_t wc = __btowc (br_elem->opr.ch); - return __collseq_table_lookup (collseqwc, wc); - } - } - else if (br_elem->type == MB_CHAR) - { - if (nrules != 0) - return __collseq_table_lookup (collseqwc, br_elem->opr.wch); - } - else if (br_elem->type == COLL_SYM) - { - size_t sym_name_len = strlen ((char *) br_elem->opr.name); - if (nrules != 0) - { - int32_t elem, idx; - elem = seek_collating_symbol_entry (br_elem->opr.name, - sym_name_len); - if (symb_table[2 * elem] != 0) - { - /* We found the entry. */ - idx = symb_table[2 * elem + 1]; - /* Skip the name of collating element name. */ - idx += 1 + extra[idx]; - /* Skip the byte sequence of the collating element. */ - idx += 1 + extra[idx]; - /* Adjust for the alignment. */ - idx = (idx + 3) & ~3; - /* Skip the multibyte collation sequence value. */ - idx += sizeof (unsigned int); - /* Skip the wide char sequence of the collating element. */ - idx += sizeof (unsigned int) * - (1 + *(unsigned int *) (extra + idx)); - /* Return the collation sequence value. */ - return *(unsigned int *) (extra + idx); - } - else if (symb_table[2 * elem] == 0 && sym_name_len == 1) - { - /* No valid character. Match it as a single byte - character. */ - return collseqmb[br_elem->opr.name[0]]; - } - } - else if (sym_name_len == 1) - return collseqmb[br_elem->opr.name[0]]; - } - return UINT_MAX; - } - - /* Local function for parse_bracket_exp used in _LIBC environement. - Build the range expression which starts from START_ELEM, and ends - at END_ELEM. The result are written to MBCSET and SBCSET. - RANGE_ALLOC is the allocated size of mbcset->range_starts, and - mbcset->range_ends, is a pointer argument sinse we may - update it. */ - - auto inline reg_errcode_t - __attribute ((always_inline)) - build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) - re_charset_t *mbcset; - Idx *range_alloc; - bitset_t sbcset; - bracket_elem_t *start_elem, *end_elem; - { - unsigned int ch; - uint32_t start_collseq; - uint32_t end_collseq; - - /* Equivalence Classes and Character Classes can't be a range - start/end. */ - if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS - || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, - 0)) - return REG_ERANGE; - - start_collseq = lookup_collation_sequence_value (start_elem); - end_collseq = lookup_collation_sequence_value (end_elem); - /* Check start/end collation sequence values. */ - if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) - return REG_ECOLLATE; - if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) - return REG_ERANGE; - - /* Got valid collation sequence values, add them as a new entry. - However, if we have no collation elements, and the character set - is single byte, the single byte character set that we - build below suffices. */ - if (nrules > 0 || dfa->mb_cur_max > 1) - { - /* Check the space of the arrays. */ - if (BE (*range_alloc == mbcset->nranges, 0)) - { - /* There is not enough space, need realloc. */ - uint32_t *new_array_start; - uint32_t *new_array_end; - Idx new_nranges; - - /* +1 in case of mbcset->nranges is 0. */ - new_nranges = 2 * mbcset->nranges + 1; - new_array_start = re_realloc (mbcset->range_starts, uint32_t, - new_nranges); - new_array_end = re_realloc (mbcset->range_ends, uint32_t, - new_nranges); - - if (BE (new_array_start == NULL || new_array_end == NULL, 0)) - return REG_ESPACE; - - mbcset->range_starts = new_array_start; - mbcset->range_ends = new_array_end; - *range_alloc = new_nranges; - } - - mbcset->range_starts[mbcset->nranges] = start_collseq; - mbcset->range_ends[mbcset->nranges++] = end_collseq; - } - - /* Build the table for single byte characters. */ - for (ch = 0; ch < SBC_MAX; ch++) - { - uint32_t ch_collseq; - /* - if (MB_CUR_MAX == 1) - */ - if (nrules == 0) - ch_collseq = collseqmb[ch]; - else - ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); - if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) - bitset_set (sbcset, ch); - } - return REG_NOERROR; - } - - /* Local function for parse_bracket_exp used in _LIBC environement. - Build the collating element which is represented by NAME. - The result are written to MBCSET and SBCSET. - COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a - pointer argument sinse we may update it. */ - - auto inline reg_errcode_t - __attribute ((always_inline)) - build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) - re_charset_t *mbcset; - Idx *coll_sym_alloc; - bitset_t sbcset; - const unsigned char *name; - { - int32_t elem, idx; - size_t name_len = strlen ((const char *) name); - if (nrules != 0) - { - elem = seek_collating_symbol_entry (name, name_len); - if (symb_table[2 * elem] != 0) - { - /* We found the entry. */ - idx = symb_table[2 * elem + 1]; - /* Skip the name of collating element name. */ - idx += 1 + extra[idx]; - } - else if (symb_table[2 * elem] == 0 && name_len == 1) - { - /* No valid character, treat it as a normal - character. */ - bitset_set (sbcset, name[0]); - return REG_NOERROR; - } - else - return REG_ECOLLATE; - - /* Got valid collation sequence, add it as a new entry. */ - /* Check the space of the arrays. */ - if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) - { - /* Not enough, realloc it. */ - /* +1 in case of mbcset->ncoll_syms is 0. */ - Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; - /* Use realloc since mbcset->coll_syms is NULL - if *alloc == 0. */ - int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, - new_coll_sym_alloc); - if (BE (new_coll_syms == NULL, 0)) - return REG_ESPACE; - mbcset->coll_syms = new_coll_syms; - *coll_sym_alloc = new_coll_sym_alloc; - } - mbcset->coll_syms[mbcset->ncoll_syms++] = idx; - return REG_NOERROR; - } - else - { - if (BE (name_len != 1, 0)) - return REG_ECOLLATE; - else - { - bitset_set (sbcset, name[0]); - return REG_NOERROR; - } - } - } -#endif - - re_token_t br_token; - re_bitset_ptr_t sbcset; -#ifdef RE_ENABLE_I18N - re_charset_t *mbcset; - Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; - Idx equiv_class_alloc = 0, char_class_alloc = 0; -#endif /* not RE_ENABLE_I18N */ - bool non_match = false; - bin_tree_t *work_tree; - int token_len; - bool first_round = true; -#ifdef _LIBC - collseqmb = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); - nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - if (nrules) - { - /* - if (MB_CUR_MAX > 1) - */ - collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); - table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); - symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_TABLEMB); - extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_EXTRAMB); - } -#endif - sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); -#ifdef RE_ENABLE_I18N - mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); -#endif /* RE_ENABLE_I18N */ -#ifdef RE_ENABLE_I18N - if (BE (sbcset == NULL || mbcset == NULL, 0)) -#else - if (BE (sbcset == NULL, 0)) -#endif /* RE_ENABLE_I18N */ - { - *err = REG_ESPACE; - return NULL; - } - - token_len = peek_token_bracket (token, regexp, syntax); - if (BE (token->type == END_OF_RE, 0)) - { - *err = REG_BADPAT; - goto parse_bracket_exp_free_return; - } - if (token->type == OP_NON_MATCH_LIST) - { -#ifdef RE_ENABLE_I18N - mbcset->non_match = 1; -#endif /* not RE_ENABLE_I18N */ - non_match = true; - if (syntax & RE_HAT_LISTS_NOT_NEWLINE) - bitset_set (sbcset, '\n'); - re_string_skip_bytes (regexp, token_len); /* Skip a token. */ - token_len = peek_token_bracket (token, regexp, syntax); - if (BE (token->type == END_OF_RE, 0)) - { - *err = REG_BADPAT; - goto parse_bracket_exp_free_return; - } - } - - /* We treat the first ']' as a normal character. */ - if (token->type == OP_CLOSE_BRACKET) - token->type = CHARACTER; - - while (1) - { - bracket_elem_t start_elem, end_elem; - unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; - unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; - reg_errcode_t ret; - int token_len2 = 0; - bool is_range_exp = false; - re_token_t token2; - - start_elem.opr.name = start_name_buf; - ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, - syntax, first_round); - if (BE (ret != REG_NOERROR, 0)) - { - *err = ret; - goto parse_bracket_exp_free_return; - } - first_round = false; - - /* Get information about the next token. We need it in any case. */ - token_len = peek_token_bracket (token, regexp, syntax); - - /* Do not check for ranges if we know they are not allowed. */ - if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) - { - if (BE (token->type == END_OF_RE, 0)) - { - *err = REG_EBRACK; - goto parse_bracket_exp_free_return; - } - if (token->type == OP_CHARSET_RANGE) - { - re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ - token_len2 = peek_token_bracket (&token2, regexp, syntax); - if (BE (token2.type == END_OF_RE, 0)) - { - *err = REG_EBRACK; - goto parse_bracket_exp_free_return; - } - if (token2.type == OP_CLOSE_BRACKET) - { - /* We treat the last '-' as a normal character. */ - re_string_skip_bytes (regexp, -token_len); - token->type = CHARACTER; - } - else - is_range_exp = true; - } - } - - if (is_range_exp == true) - { - end_elem.opr.name = end_name_buf; - ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, - dfa, syntax, true); - if (BE (ret != REG_NOERROR, 0)) - { - *err = ret; - goto parse_bracket_exp_free_return; - } - - token_len = peek_token_bracket (token, regexp, syntax); - -#ifdef _LIBC - *err = build_range_exp (sbcset, mbcset, &range_alloc, - &start_elem, &end_elem); -#else -# ifdef RE_ENABLE_I18N - *err = build_range_exp (syntax, sbcset, - dfa->mb_cur_max > 1 ? mbcset : NULL, - &range_alloc, &start_elem, &end_elem); -# else - *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem); -# endif -#endif /* RE_ENABLE_I18N */ - if (BE (*err != REG_NOERROR, 0)) - goto parse_bracket_exp_free_return; - } - else - { - switch (start_elem.type) - { - case SB_CHAR: - bitset_set (sbcset, start_elem.opr.ch); - break; -#ifdef RE_ENABLE_I18N - case MB_CHAR: - /* Check whether the array has enough space. */ - if (BE (mbchar_alloc == mbcset->nmbchars, 0)) - { - wchar_t *new_mbchars; - /* Not enough, realloc it. */ - /* +1 in case of mbcset->nmbchars is 0. */ - mbchar_alloc = 2 * mbcset->nmbchars + 1; - /* Use realloc since array is NULL if *alloc == 0. */ - new_mbchars = re_realloc (mbcset->mbchars, wchar_t, - mbchar_alloc); - if (BE (new_mbchars == NULL, 0)) - goto parse_bracket_exp_espace; - mbcset->mbchars = new_mbchars; - } - mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; - break; -#endif /* RE_ENABLE_I18N */ - case EQUIV_CLASS: - *err = build_equiv_class (sbcset, -#ifdef RE_ENABLE_I18N - mbcset, &equiv_class_alloc, -#endif /* RE_ENABLE_I18N */ - start_elem.opr.name); - if (BE (*err != REG_NOERROR, 0)) - goto parse_bracket_exp_free_return; - break; - case COLL_SYM: - *err = build_collating_symbol (sbcset, -#ifdef RE_ENABLE_I18N - mbcset, &coll_sym_alloc, -#endif /* RE_ENABLE_I18N */ - start_elem.opr.name); - if (BE (*err != REG_NOERROR, 0)) - goto parse_bracket_exp_free_return; - break; - case CHAR_CLASS: - *err = build_charclass (regexp->trans, sbcset, -#ifdef RE_ENABLE_I18N - mbcset, &char_class_alloc, -#endif /* RE_ENABLE_I18N */ - start_elem.opr.name, syntax); - if (BE (*err != REG_NOERROR, 0)) - goto parse_bracket_exp_free_return; - break; - default: - assert (0); - break; - } - } - if (BE (token->type == END_OF_RE, 0)) - { - *err = REG_EBRACK; - goto parse_bracket_exp_free_return; - } - if (token->type == OP_CLOSE_BRACKET) - break; - } - - re_string_skip_bytes (regexp, token_len); /* Skip a token. */ - - /* If it is non-matching list. */ - if (non_match) - bitset_not (sbcset); - -#ifdef RE_ENABLE_I18N - /* Ensure only single byte characters are set. */ - if (dfa->mb_cur_max > 1) - bitset_mask (sbcset, dfa->sb_char); - - if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes - || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes - || mbcset->non_match))) - { - bin_tree_t *mbc_tree; - int sbc_idx; - /* Build a tree for complex bracket. */ - dfa->has_mb_node = 1; - br_token.type = COMPLEX_BRACKET; - br_token.opr.mbcset = mbcset; - mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (mbc_tree == NULL, 0)) - goto parse_bracket_exp_espace; - for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) - if (sbcset[sbc_idx]) - break; - /* If there are no bits set in sbcset, there is no point - of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ - if (sbc_idx < BITSET_WORDS) - { - /* Build a tree for simple bracket. */ - br_token.type = SIMPLE_BRACKET; - br_token.opr.sbcset = sbcset; - work_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (work_tree == NULL, 0)) - goto parse_bracket_exp_espace; - - /* Then join them by ALT node. */ - work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); - if (BE (work_tree == NULL, 0)) - goto parse_bracket_exp_espace; - } - else - { - re_free (sbcset); - work_tree = mbc_tree; - } - } - else -#endif /* not RE_ENABLE_I18N */ - { -#ifdef RE_ENABLE_I18N - free_charset (mbcset); -#endif - /* Build a tree for simple bracket. */ - br_token.type = SIMPLE_BRACKET; - br_token.opr.sbcset = sbcset; - work_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (work_tree == NULL, 0)) - goto parse_bracket_exp_espace; - } - return work_tree; - - parse_bracket_exp_espace: - *err = REG_ESPACE; - parse_bracket_exp_free_return: - re_free (sbcset); -#ifdef RE_ENABLE_I18N - free_charset (mbcset); -#endif /* RE_ENABLE_I18N */ - return NULL; -} - -/* Parse an element in the bracket expression. */ - -static reg_errcode_t -parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, - re_token_t *token, int token_len, re_dfa_t *dfa, - reg_syntax_t syntax, bool accept_hyphen) -{ -#ifdef RE_ENABLE_I18N - int cur_char_size; - cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); - if (cur_char_size > 1) - { - elem->type = MB_CHAR; - elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); - re_string_skip_bytes (regexp, cur_char_size); - return REG_NOERROR; - } -#endif /* RE_ENABLE_I18N */ - re_string_skip_bytes (regexp, token_len); /* Skip a token. */ - if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS - || token->type == OP_OPEN_EQUIV_CLASS) - return parse_bracket_symbol (elem, regexp, token); - if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) - { - /* A '-' must only appear as anything but a range indicator before - the closing bracket. Everything else is an error. */ - re_token_t token2; - (void) peek_token_bracket (&token2, regexp, syntax); - if (token2.type != OP_CLOSE_BRACKET) - /* The actual error value is not standardized since this whole - case is undefined. But ERANGE makes good sense. */ - return REG_ERANGE; - } - elem->type = SB_CHAR; - elem->opr.ch = token->opr.c; - return REG_NOERROR; -} - -/* Parse a bracket symbol in the bracket expression. Bracket symbols are - such as [::], [..], and - [==]. */ - -static reg_errcode_t -parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, - re_token_t *token) -{ - unsigned char ch, delim = token->opr.c; - int i = 0; - if (re_string_eoi(regexp)) - return REG_EBRACK; - for (;; ++i) - { - if (i >= BRACKET_NAME_BUF_SIZE) - return REG_EBRACK; - if (token->type == OP_OPEN_CHAR_CLASS) - ch = re_string_fetch_byte_case (regexp); - else - ch = re_string_fetch_byte (regexp); - if (re_string_eoi(regexp)) - return REG_EBRACK; - if (ch == delim && re_string_peek_byte (regexp, 0) == ']') - break; - elem->opr.name[i] = ch; - } - re_string_skip_bytes (regexp, 1); - elem->opr.name[i] = '\0'; - switch (token->type) - { - case OP_OPEN_COLL_ELEM: - elem->type = COLL_SYM; - break; - case OP_OPEN_EQUIV_CLASS: - elem->type = EQUIV_CLASS; - break; - case OP_OPEN_CHAR_CLASS: - elem->type = CHAR_CLASS; - break; - default: - break; - } - return REG_NOERROR; -} - - /* Helper function for parse_bracket_exp. - Build the equivalence class which is represented by NAME. - The result are written to MBCSET and SBCSET. - EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, - is a pointer argument sinse we may update it. */ - -static reg_errcode_t -#ifdef RE_ENABLE_I18N -build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, - Idx *equiv_class_alloc, const unsigned char *name) -#else /* not RE_ENABLE_I18N */ -build_equiv_class (bitset_t sbcset, const unsigned char *name) -#endif /* not RE_ENABLE_I18N */ -{ -#ifdef _LIBC - uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - if (nrules != 0) - { - const int32_t *table, *indirect; - const unsigned char *weights, *extra, *cp; - unsigned char char_buf[2]; - int32_t idx1, idx2; - unsigned int ch; - size_t len; - /* This #include defines a local function! */ -# include - /* Calculate the index for equivalence class. */ - cp = name; - table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_WEIGHTMB); - extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_EXTRAMB); - indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_INDIRECTMB); - idx1 = findidx (&cp); - if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0)) - /* This isn't a valid character. */ - return REG_ECOLLATE; - - /* Build single byte matcing table for this equivalence class. */ - char_buf[1] = (unsigned char) '\0'; - len = weights[idx1 & 0xffffff]; - for (ch = 0; ch < SBC_MAX; ++ch) - { - char_buf[0] = ch; - cp = char_buf; - idx2 = findidx (&cp); -/* - idx2 = table[ch]; -*/ - if (idx2 == 0) - /* This isn't a valid character. */ - continue; - /* Compare only if the length matches and the collation rule - index is the same. */ - if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) - { - int cnt = 0; - - while (cnt <= len && - weights[(idx1 & 0xffffff) + 1 + cnt] - == weights[(idx2 & 0xffffff) + 1 + cnt]) - ++cnt; - - if (cnt > len) - bitset_set (sbcset, ch); - } - } - /* Check whether the array has enough space. */ - if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) - { - /* Not enough, realloc it. */ - /* +1 in case of mbcset->nequiv_classes is 0. */ - Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; - /* Use realloc since the array is NULL if *alloc == 0. */ - int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, - int32_t, - new_equiv_class_alloc); - if (BE (new_equiv_classes == NULL, 0)) - return REG_ESPACE; - mbcset->equiv_classes = new_equiv_classes; - *equiv_class_alloc = new_equiv_class_alloc; - } - mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; - } - else -#endif /* _LIBC */ - { - if (BE (strlen ((const char *) name) != 1, 0)) - return REG_ECOLLATE; - bitset_set (sbcset, *name); - } - return REG_NOERROR; -} - - /* Helper function for parse_bracket_exp. - Build the character class which is represented by NAME. - The result are written to MBCSET and SBCSET. - CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, - is a pointer argument sinse we may update it. */ - -static reg_errcode_t -#ifdef RE_ENABLE_I18N -build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, - re_charset_t *mbcset, Idx *char_class_alloc, - const unsigned char *class_name, reg_syntax_t syntax) -#else /* not RE_ENABLE_I18N */ -build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, - const unsigned char *class_name, reg_syntax_t syntax) -#endif /* not RE_ENABLE_I18N */ -{ - int i; - const char *name = (const char *) class_name; - - /* In case of REG_ICASE "upper" and "lower" match the both of - upper and lower cases. */ - if ((syntax & RE_ICASE) - && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) - name = "alpha"; - -#ifdef RE_ENABLE_I18N - /* Check the space of the arrays. */ - if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) - { - /* Not enough, realloc it. */ - /* +1 in case of mbcset->nchar_classes is 0. */ - Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1; - /* Use realloc since array is NULL if *alloc == 0. */ - wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, - new_char_class_alloc); - if (BE (new_char_classes == NULL, 0)) - return REG_ESPACE; - mbcset->char_classes = new_char_classes; - *char_class_alloc = new_char_class_alloc; - } - mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); -#endif /* RE_ENABLE_I18N */ - -#define BUILD_CHARCLASS_LOOP(ctype_func) \ - do { \ - if (BE (trans != NULL, 0)) \ - { \ - for (i = 0; i < SBC_MAX; ++i) \ - if (ctype_func (i)) \ - bitset_set (sbcset, trans[i]); \ - } \ - else \ - { \ - for (i = 0; i < SBC_MAX; ++i) \ - if (ctype_func (i)) \ - bitset_set (sbcset, i); \ - } \ - } while (0) - - if (strcmp (name, "alnum") == 0) - BUILD_CHARCLASS_LOOP (isalnum); - else if (strcmp (name, "cntrl") == 0) - BUILD_CHARCLASS_LOOP (iscntrl); - else if (strcmp (name, "lower") == 0) - BUILD_CHARCLASS_LOOP (islower); - else if (strcmp (name, "space") == 0) - BUILD_CHARCLASS_LOOP (isspace); - else if (strcmp (name, "alpha") == 0) - BUILD_CHARCLASS_LOOP (isalpha); - else if (strcmp (name, "digit") == 0) - BUILD_CHARCLASS_LOOP (isdigit); - else if (strcmp (name, "print") == 0) - BUILD_CHARCLASS_LOOP (isprint); - else if (strcmp (name, "upper") == 0) - BUILD_CHARCLASS_LOOP (isupper); - else if (strcmp (name, "blank") == 0) - BUILD_CHARCLASS_LOOP (isblank); - else if (strcmp (name, "graph") == 0) - BUILD_CHARCLASS_LOOP (isgraph); - else if (strcmp (name, "punct") == 0) - BUILD_CHARCLASS_LOOP (ispunct); - else if (strcmp (name, "xdigit") == 0) - BUILD_CHARCLASS_LOOP (isxdigit); - else - return REG_ECTYPE; - - return REG_NOERROR; -} - -static bin_tree_t * -build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, - const unsigned char *class_name, - const unsigned char *extra, bool non_match, - reg_errcode_t *err) -{ - re_bitset_ptr_t sbcset; -#ifdef RE_ENABLE_I18N - re_charset_t *mbcset; - Idx alloc = 0; -#endif /* not RE_ENABLE_I18N */ - reg_errcode_t ret; - re_token_t br_token; - bin_tree_t *tree; - - sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); -#ifdef RE_ENABLE_I18N - mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); -#endif /* RE_ENABLE_I18N */ - -#ifdef RE_ENABLE_I18N - if (BE (sbcset == NULL || mbcset == NULL, 0)) -#else /* not RE_ENABLE_I18N */ - if (BE (sbcset == NULL, 0)) -#endif /* not RE_ENABLE_I18N */ - { - *err = REG_ESPACE; - return NULL; - } - - if (non_match) - { -#ifdef RE_ENABLE_I18N - mbcset->non_match = 1; -#endif /* not RE_ENABLE_I18N */ - } - - /* We don't care the syntax in this case. */ - ret = build_charclass (trans, sbcset, -#ifdef RE_ENABLE_I18N - mbcset, &alloc, -#endif /* RE_ENABLE_I18N */ - class_name, 0); - - if (BE (ret != REG_NOERROR, 0)) - { - re_free (sbcset); -#ifdef RE_ENABLE_I18N - free_charset (mbcset); -#endif /* RE_ENABLE_I18N */ - *err = ret; - return NULL; - } - /* \w match '_' also. */ - for (; *extra; extra++) - bitset_set (sbcset, *extra); - - /* If it is non-matching list. */ - if (non_match) - bitset_not (sbcset); - -#ifdef RE_ENABLE_I18N - /* Ensure only single byte characters are set. */ - if (dfa->mb_cur_max > 1) - bitset_mask (sbcset, dfa->sb_char); -#endif - - /* Build a tree for simple bracket. */ - br_token.type = SIMPLE_BRACKET; - br_token.opr.sbcset = sbcset; - tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (tree == NULL, 0)) - goto build_word_op_espace; - -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - { - bin_tree_t *mbc_tree; - /* Build a tree for complex bracket. */ - br_token.type = COMPLEX_BRACKET; - br_token.opr.mbcset = mbcset; - dfa->has_mb_node = 1; - mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (mbc_tree == NULL, 0)) - goto build_word_op_espace; - /* Then join them by ALT node. */ - tree = create_tree (dfa, tree, mbc_tree, OP_ALT); - if (BE (mbc_tree != NULL, 1)) - return tree; - } - else - { - free_charset (mbcset); - return tree; - } -#else /* not RE_ENABLE_I18N */ - return tree; -#endif /* not RE_ENABLE_I18N */ - - build_word_op_espace: - re_free (sbcset); -#ifdef RE_ENABLE_I18N - free_charset (mbcset); -#endif /* RE_ENABLE_I18N */ - *err = REG_ESPACE; - return NULL; -} - -/* This is intended for the expressions like "a{1,3}". - Fetch a number from `input', and return the number. - Return REG_MISSING if the number field is empty like "{,1}". - Return REG_ERROR if an error occurred. */ - -static Idx -fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) -{ - Idx num = REG_MISSING; - unsigned char c; - while (1) - { - fetch_token (token, input, syntax); - c = token->opr.c; - if (BE (token->type == END_OF_RE, 0)) - return REG_ERROR; - if (token->type == OP_CLOSE_DUP_NUM || c == ',') - break; - num = ((token->type != CHARACTER || c < '0' || '9' < c - || num == REG_ERROR) - ? REG_ERROR - : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0')); - num = (num > RE_DUP_MAX) ? REG_ERROR : num; - } - return num; -} - -#ifdef RE_ENABLE_I18N -static void -free_charset (re_charset_t *cset) -{ - re_free (cset->mbchars); -# ifdef _LIBC - re_free (cset->coll_syms); - re_free (cset->equiv_classes); - re_free (cset->range_starts); - re_free (cset->range_ends); -# endif - re_free (cset->char_classes); - re_free (cset); -} -#endif /* RE_ENABLE_I18N */ - -/* Functions for binary tree operation. */ - -/* Create a tree node. */ - -static bin_tree_t * -create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, - re_token_type_t type) -{ - re_token_t t; - t.type = type; - return create_token_tree (dfa, left, right, &t); -} - -static bin_tree_t * -create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, - const re_token_t *token) -{ - bin_tree_t *tree; - if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) - { - bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); - - if (storage == NULL) - return NULL; - storage->next = dfa->str_tree_storage; - dfa->str_tree_storage = storage; - dfa->str_tree_storage_idx = 0; - } - tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; - - tree->parent = NULL; - tree->left = left; - tree->right = right; - tree->token = *token; - tree->token.duplicated = 0; - tree->token.opt_subexp = 0; - tree->first = NULL; - tree->next = NULL; - tree->node_idx = REG_MISSING; - - if (left != NULL) - left->parent = tree; - if (right != NULL) - right->parent = tree; - return tree; -} - -/* Mark the tree SRC as an optional subexpression. - To be called from preorder or postorder. */ - -static reg_errcode_t -mark_opt_subexp (void *extra, bin_tree_t *node) -{ - Idx idx = (Idx) (long) extra; - if (node->token.type == SUBEXP && node->token.opr.idx == idx) - node->token.opt_subexp = 1; - - return REG_NOERROR; -} - -/* Free the allocated memory inside NODE. */ - -static void -free_token (re_token_t *node) -{ -#ifdef RE_ENABLE_I18N - if (node->type == COMPLEX_BRACKET && node->duplicated == 0) - free_charset (node->opr.mbcset); - else -#endif /* RE_ENABLE_I18N */ - if (node->type == SIMPLE_BRACKET && node->duplicated == 0) - re_free (node->opr.sbcset); -} - -/* Worker function for tree walking. Free the allocated memory inside NODE - and its children. */ - -static reg_errcode_t -free_tree (void *extra, bin_tree_t *node) -{ - free_token (&node->token); - return REG_NOERROR; -} - - -/* Duplicate the node SRC, and return new node. This is a preorder - visit similar to the one implemented by the generic visitor, but - we need more infrastructure to maintain two parallel trees --- so, - it's easier to duplicate. */ - -static bin_tree_t * -duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) -{ - const bin_tree_t *node; - bin_tree_t *dup_root; - bin_tree_t **p_new = &dup_root, *dup_node = root->parent; - - for (node = root; ; ) - { - /* Create a new tree and link it back to the current parent. */ - *p_new = create_token_tree (dfa, NULL, NULL, &node->token); - if (*p_new == NULL) - return NULL; - (*p_new)->parent = dup_node; - (*p_new)->token.duplicated = 1; - dup_node = *p_new; - - /* Go to the left node, or up and to the right. */ - if (node->left) - { - node = node->left; - p_new = &dup_node->left; - } - else - { - const bin_tree_t *prev = NULL; - while (node->right == prev || node->right == NULL) - { - prev = node; - node = node->parent; - dup_node = dup_node->parent; - if (!node) - return dup_root; - } - node = node->right; - p_new = &dup_node->right; - } - } -} diff --git a/gnulib/lib/regex.c b/gnulib/lib/regex.c deleted file mode 100644 index b0aab90..0000000 --- a/gnulib/lib/regex.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Extended regular expression matching and search library. - Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Make sure noone compiles this code with a C++ compiler. */ -#if defined __cplusplus && defined _LIBC -# error "This is C code, use a C compiler" -#endif - -#ifdef _LIBC -/* We have to keep the namespace clean. */ -# define regfree(preg) __regfree (preg) -# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) -# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) -# define regerror(errcode, preg, errbuf, errbuf_size) \ - __regerror(errcode, preg, errbuf, errbuf_size) -# define re_set_registers(bu, re, nu, st, en) \ - __re_set_registers (bu, re, nu, st, en) -# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ - __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) -# define re_match(bufp, string, size, pos, regs) \ - __re_match (bufp, string, size, pos, regs) -# define re_search(bufp, string, size, startpos, range, regs) \ - __re_search (bufp, string, size, startpos, range, regs) -# define re_compile_pattern(pattern, length, bufp) \ - __re_compile_pattern (pattern, length, bufp) -# define re_set_syntax(syntax) __re_set_syntax (syntax) -# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ - __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) -# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) - -# include "../locale/localeinfo.h" -#endif - -/* On some systems, limits.h sets RE_DUP_MAX to a lower value than - GNU regex allows. Include it before , which correctly - #undefs RE_DUP_MAX and sets it to the right value. */ -#include - -#include -#include "regex_internal.h" - -#include "regex_internal.c" -#include "regcomp.c" -#include "regexec.c" - -/* Binary backward compatibility. */ -#if _LIBC -# include -# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) -link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") -int re_max_failures = 2000; -# endif -#endif diff --git a/gnulib/lib/regex.h b/gnulib/lib/regex.h deleted file mode 100644 index e99c8b8..0000000 --- a/gnulib/lib/regex.h +++ /dev/null @@ -1,675 +0,0 @@ -/* Definitions for data structures and routines for the regular - expression library. - Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2006, 2009-2011 - 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _REGEX_H -#define _REGEX_H 1 - -#include - -/* Allow the use in C++ code. */ -#ifdef __cplusplus -extern "C" { -#endif - -/* Define __USE_GNU_REGEX to declare GNU extensions that violate the - POSIX name space rules. */ -#undef __USE_GNU_REGEX -#if (defined _GNU_SOURCE \ - || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \ - && !defined _XOPEN_SOURCE)) -# define __USE_GNU_REGEX 1 -#endif - -#ifdef _REGEX_LARGE_OFFSETS - -/* Use types and values that are wide enough to represent signed and - unsigned byte offsets in memory. This currently works only when - the regex code is used outside of the GNU C library; it is not yet - supported within glibc itself, and glibc users should not define - _REGEX_LARGE_OFFSETS. */ - -/* The type of the offset of a byte within a string. - For historical reasons POSIX 1003.1-2004 requires that regoff_t be - at least as wide as off_t. However, many common POSIX platforms set - regoff_t to the more-sensible ssize_t and the Open Group has - signalled its intention to change the requirement to be that - regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN - 60 (2005-08-25). We don't know of any hosts where ssize_t or - ptrdiff_t is wider than ssize_t, so ssize_t is safe. */ -typedef ssize_t regoff_t; - -/* The type of nonnegative object indexes. Traditionally, GNU regex - uses 'int' for these. Code that uses __re_idx_t should work - regardless of whether the type is signed. */ -typedef size_t __re_idx_t; - -/* The type of object sizes. */ -typedef size_t __re_size_t; - -/* The type of object sizes, in places where the traditional code - uses unsigned long int. */ -typedef size_t __re_long_size_t; - -#else - -/* Use types that are binary-compatible with the traditional GNU regex - implementation, which mishandles strings longer than INT_MAX. */ - -typedef int regoff_t; -typedef int __re_idx_t; -typedef unsigned int __re_size_t; -typedef unsigned long int __re_long_size_t; - -#endif - -/* The following two types have to be signed and unsigned integer type - wide enough to hold a value of a pointer. For most ANSI compilers - ptrdiff_t and size_t should be likely OK. Still size of these two - types is 2 for Microsoft C. Ugh... */ -typedef long int s_reg_t; -typedef unsigned long int active_reg_t; - -/* The following bits are used to determine the regexp syntax we - recognize. The set/not-set meanings are chosen so that Emacs syntax - remains the value 0. The bits are given in alphabetical order, and - the definitions shifted by one from the previous bit; thus, when we - add or remove a bit, only one other definition need change. */ -typedef unsigned long int reg_syntax_t; - -#ifdef __USE_GNU_REGEX - -/* If this bit is not set, then \ inside a bracket expression is literal. - If set, then such a \ quotes the following character. */ -# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) - -/* If this bit is not set, then + and ? are operators, and \+ and \? are - literals. - If set, then \+ and \? are operators and + and ? are literals. */ -# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) - -/* If this bit is set, then character classes are supported. They are: - [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], - [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. - If not set, then character classes are not supported. */ -# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) - -/* If this bit is set, then ^ and $ are always anchors (outside bracket - expressions, of course). - If this bit is not set, then it depends: - ^ is an anchor if it is at the beginning of a regular - expression or after an open-group or an alternation operator; - $ is an anchor if it is at the end of a regular expression, or - before a close-group or an alternation operator. - - This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because - POSIX draft 11.2 says that * etc. in leading positions is undefined. - We already implemented a previous draft which made those constructs - invalid, though, so we haven't changed the code back. */ -# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) - -/* If this bit is set, then special characters are always special - regardless of where they are in the pattern. - If this bit is not set, then special characters are special only in - some contexts; otherwise they are ordinary. Specifically, - * + ? and intervals are only special when not after the beginning, - open-group, or alternation operator. */ -# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) - -/* If this bit is set, then *, +, ?, and { cannot be first in an re or - immediately after an alternation or begin-group operator. */ -# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) - -/* If this bit is set, then . matches newline. - If not set, then it doesn't. */ -# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) - -/* If this bit is set, then . doesn't match NUL. - If not set, then it does. */ -# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) - -/* If this bit is set, nonmatching lists [^...] do not match newline. - If not set, they do. */ -# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) - -/* If this bit is set, either \{...\} or {...} defines an - interval, depending on RE_NO_BK_BRACES. - If not set, \{, \}, {, and } are literals. */ -# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) - -/* If this bit is set, +, ? and | aren't recognized as operators. - If not set, they are. */ -# define RE_LIMITED_OPS (RE_INTERVALS << 1) - -/* If this bit is set, newline is an alternation operator. - If not set, newline is literal. */ -# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) - -/* If this bit is set, then `{...}' defines an interval, and \{ and \} - are literals. - If not set, then `\{...\}' defines an interval. */ -# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) - -/* If this bit is set, (...) defines a group, and \( and \) are literals. - If not set, \(...\) defines a group, and ( and ) are literals. */ -# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) - -/* If this bit is set, then \ matches . - If not set, then \ is a back-reference. */ -# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) - -/* If this bit is set, then | is an alternation operator, and \| is literal. - If not set, then \| is an alternation operator, and | is literal. */ -# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) - -/* If this bit is set, then an ending range point collating higher - than the starting range point, as in [z-a], is invalid. - If not set, then when ending range point collates higher than the - starting range point, the range is ignored. */ -# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) - -/* If this bit is set, then an unmatched ) is ordinary. - If not set, then an unmatched ) is invalid. */ -# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) - -/* If this bit is set, succeed as soon as we match the whole pattern, - without further backtracking. */ -# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) - -/* If this bit is set, do not process the GNU regex operators. - If not set, then the GNU regex operators are recognized. */ -# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) - -/* If this bit is set, turn on internal regex debugging. - If not set, and debugging was on, turn it off. - This only works if regex.c is compiled -DDEBUG. - We define this bit always, so that all that's needed to turn on - debugging is to recompile regex.c; the calling code can always have - this bit set, and it won't affect anything in the normal case. */ -# define RE_DEBUG (RE_NO_GNU_OPS << 1) - -/* If this bit is set, a syntactically invalid interval is treated as - a string of ordinary characters. For example, the ERE 'a{1' is - treated as 'a\{1'. */ -# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) - -/* If this bit is set, then ignore case when matching. - If not set, then case is significant. */ -# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) - -/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only - for ^, because it is difficult to scan the regex backwards to find - whether ^ should be special. */ -# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) - -/* If this bit is set, then \{ cannot be first in a regex or - immediately after an alternation, open-group or \} operator. */ -# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) - -/* If this bit is set, then no_sub will be set to 1 during - re_compile_pattern. */ -# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) - -#endif /* defined __USE_GNU_REGEX */ - -/* This global variable defines the particular regexp syntax to use (for - some interfaces). When a regexp is compiled, the syntax used is - stored in the pattern buffer, so changing this does not affect - already-compiled regexps. */ -extern reg_syntax_t re_syntax_options; - -#ifdef __USE_GNU_REGEX -/* Define combinations of the above bits for the standard possibilities. - (The [[[ comments delimit what gets put into the Texinfo file, so - don't delete them!) */ -/* [[[begin syntaxes]]] */ -# define RE_SYNTAX_EMACS 0 - -# define RE_SYNTAX_AWK \ - (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ - | RE_NO_BK_PARENS | RE_NO_BK_REFS \ - | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ - | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ - | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) - -# define RE_SYNTAX_GNU_AWK \ - ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \ - & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \ - | RE_CONTEXT_INVALID_OPS )) - -# define RE_SYNTAX_POSIX_AWK \ - (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ - | RE_INTERVALS | RE_NO_GNU_OPS) - -# define RE_SYNTAX_GREP \ - (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ - | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ - | RE_NEWLINE_ALT) - -# define RE_SYNTAX_EGREP \ - (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ - | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ - | RE_NO_BK_VBAR) - -# define RE_SYNTAX_POSIX_EGREP \ - (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ - | RE_INVALID_INTERVAL_ORD) - -/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ -# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC - -# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC - -/* Syntax bits common to both basic and extended POSIX regex syntax. */ -# define _RE_SYNTAX_POSIX_COMMON \ - (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ - | RE_INTERVALS | RE_NO_EMPTY_RANGES) - -# define RE_SYNTAX_POSIX_BASIC \ - (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) - -/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes - RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this - isn't minimal, since other operators, such as \`, aren't disabled. */ -# define RE_SYNTAX_POSIX_MINIMAL_BASIC \ - (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) - -# define RE_SYNTAX_POSIX_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ - | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) - -/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is - removed and RE_NO_BK_REFS is added. */ -# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_REFS \ - | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) -/* [[[end syntaxes]]] */ - -#endif /* defined __USE_GNU_REGEX */ - -#ifdef __USE_GNU_REGEX - -/* Maximum number of duplicates an interval can allow. POSIX-conforming - systems might define this in , but we want our - value, so remove any previous define. */ -# ifdef RE_DUP_MAX -# undef RE_DUP_MAX -# endif - -/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored - the counter as a 2-byte signed integer. This is no longer true, so - RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to - ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined. - However, there would be a huge performance problem if someone - actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains - its historical value. */ -# define RE_DUP_MAX (0x7fff) - -#endif /* defined __USE_GNU_REGEX */ - - -/* POSIX `cflags' bits (i.e., information for `regcomp'). */ - -/* If this bit is set, then use extended regular expression syntax. - If not set, then use basic regular expression syntax. */ -#define REG_EXTENDED 1 - -/* If this bit is set, then ignore case when matching. - If not set, then case is significant. */ -#define REG_ICASE (1 << 1) - -/* If this bit is set, then anchors do not match at newline - characters in the string. - If not set, then anchors do match at newlines. */ -#define REG_NEWLINE (1 << 2) - -/* If this bit is set, then report only success or fail in regexec. - If not set, then returns differ between not matching and errors. */ -#define REG_NOSUB (1 << 3) - - -/* POSIX `eflags' bits (i.e., information for regexec). */ - -/* If this bit is set, then the beginning-of-line operator doesn't match - the beginning of the string (presumably because it's not the - beginning of a line). - If not set, then the beginning-of-line operator does match the - beginning of the string. */ -#define REG_NOTBOL 1 - -/* Like REG_NOTBOL, except for the end-of-line. */ -#define REG_NOTEOL (1 << 1) - -/* Use PMATCH[0] to delimit the start and end of the search in the - buffer. */ -#define REG_STARTEND (1 << 2) - - -/* If any error codes are removed, changed, or added, update the - `__re_error_msgid' table in regcomp.c. */ - -typedef enum -{ - _REG_ENOSYS = -1, /* This will never happen for this implementation. */ - _REG_NOERROR = 0, /* Success. */ - _REG_NOMATCH, /* Didn't find a match (for regexec). */ - - /* POSIX regcomp return error codes. (In the order listed in the - standard.) */ - _REG_BADPAT, /* Invalid pattern. */ - _REG_ECOLLATE, /* Invalid collating element. */ - _REG_ECTYPE, /* Invalid character class name. */ - _REG_EESCAPE, /* Trailing backslash. */ - _REG_ESUBREG, /* Invalid back reference. */ - _REG_EBRACK, /* Unmatched left bracket. */ - _REG_EPAREN, /* Parenthesis imbalance. */ - _REG_EBRACE, /* Unmatched \{. */ - _REG_BADBR, /* Invalid contents of \{\}. */ - _REG_ERANGE, /* Invalid range end. */ - _REG_ESPACE, /* Ran out of memory. */ - _REG_BADRPT, /* No preceding re for repetition op. */ - - /* Error codes we've added. */ - _REG_EEND, /* Premature end. */ - _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ - _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ -} reg_errcode_t; - -#ifdef _XOPEN_SOURCE -# define REG_ENOSYS _REG_ENOSYS -#endif -#define REG_NOERROR _REG_NOERROR -#define REG_NOMATCH _REG_NOMATCH -#define REG_BADPAT _REG_BADPAT -#define REG_ECOLLATE _REG_ECOLLATE -#define REG_ECTYPE _REG_ECTYPE -#define REG_EESCAPE _REG_EESCAPE -#define REG_ESUBREG _REG_ESUBREG -#define REG_EBRACK _REG_EBRACK -#define REG_EPAREN _REG_EPAREN -#define REG_EBRACE _REG_EBRACE -#define REG_BADBR _REG_BADBR -#define REG_ERANGE _REG_ERANGE -#define REG_ESPACE _REG_ESPACE -#define REG_BADRPT _REG_BADRPT -#define REG_EEND _REG_EEND -#define REG_ESIZE _REG_ESIZE -#define REG_ERPAREN _REG_ERPAREN - -/* struct re_pattern_buffer normally uses member names like `buffer' - that POSIX does not allow. In POSIX mode these members have names - with leading `re_' (e.g., `re_buffer'). */ -#ifdef __USE_GNU_REGEX -# define _REG_RE_NAME(id) id -# define _REG_RM_NAME(id) id -#else -# define _REG_RE_NAME(id) re_##id -# define _REG_RM_NAME(id) rm_##id -#endif - -/* The user can specify the type of the re_translate member by - defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned - char *. This pollutes the POSIX name space, so in POSIX mode just - use unsigned char *. */ -#ifdef __USE_GNU_REGEX -# ifndef RE_TRANSLATE_TYPE -# define RE_TRANSLATE_TYPE unsigned char * -# endif -# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE -#else -# define REG_TRANSLATE_TYPE unsigned char * -#endif - -/* This data structure represents a compiled pattern. Before calling - the pattern compiler, the fields `buffer', `allocated', `fastmap', - `translate', and `no_sub' can be set. After the pattern has been - compiled, the `re_nsub' field is available. All other fields are - private to the regex routines. */ - -struct re_pattern_buffer -{ - /* Space that holds the compiled pattern. It is declared as - `unsigned char *' because its elements are sometimes used as - array indexes. */ - unsigned char *_REG_RE_NAME (buffer); - - /* Number of bytes to which `buffer' points. */ - __re_long_size_t _REG_RE_NAME (allocated); - - /* Number of bytes actually used in `buffer'. */ - __re_long_size_t _REG_RE_NAME (used); - - /* Syntax setting with which the pattern was compiled. */ - reg_syntax_t _REG_RE_NAME (syntax); - - /* Pointer to a fastmap, if any, otherwise zero. re_search uses the - fastmap, if there is one, to skip over impossible starting points - for matches. */ - char *_REG_RE_NAME (fastmap); - - /* Either a translate table to apply to all characters before - comparing them, or zero for no translation. The translation is - applied to a pattern when it is compiled and to a string when it - is matched. */ - REG_TRANSLATE_TYPE _REG_RE_NAME (translate); - - /* Number of subexpressions found by the compiler. */ - size_t re_nsub; - - /* Zero if this pattern cannot match the empty string, one else. - Well, in truth it's used only in `re_search_2', to see whether or - not we should use the fastmap, so we don't set this absolutely - perfectly; see `re_compile_fastmap' (the `duplicate' case). */ - unsigned int _REG_RE_NAME (can_be_null) : 1; - - /* If REGS_UNALLOCATED, allocate space in the `regs' structure - for `max (RE_NREGS, re_nsub + 1)' groups. - If REGS_REALLOCATE, reallocate space if necessary. - If REGS_FIXED, use what's there. */ -#ifdef __USE_GNU_REGEX -# define REGS_UNALLOCATED 0 -# define REGS_REALLOCATE 1 -# define REGS_FIXED 2 -#endif - unsigned int _REG_RE_NAME (regs_allocated) : 2; - - /* Set to zero when `re_compile_pattern' compiles a pattern; set to - one by `re_compile_fastmap' if it updates the fastmap. */ - unsigned int _REG_RE_NAME (fastmap_accurate) : 1; - - /* If set, `re_match_2' does not return information about - subexpressions. */ - unsigned int _REG_RE_NAME (no_sub) : 1; - - /* If set, a beginning-of-line anchor doesn't match at the beginning - of the string. */ - unsigned int _REG_RE_NAME (not_bol) : 1; - - /* Similarly for an end-of-line anchor. */ - unsigned int _REG_RE_NAME (not_eol) : 1; - - /* If true, an anchor at a newline matches. */ - unsigned int _REG_RE_NAME (newline_anchor) : 1; - -/* [[[end pattern_buffer]]] */ -}; - -typedef struct re_pattern_buffer regex_t; - -/* This is the structure we store register match data in. See - regex.texinfo for a full description of what registers match. */ -struct re_registers -{ - __re_size_t _REG_RM_NAME (num_regs); - regoff_t *_REG_RM_NAME (start); - regoff_t *_REG_RM_NAME (end); -}; - - -/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, - `re_match_2' returns information about at least this many registers - the first time a `regs' structure is passed. */ -#if !defined RE_NREGS && defined __USE_GNU_REGEX -# define RE_NREGS 30 -#endif - - -/* POSIX specification for registers. Aside from the different names than - `re_registers', POSIX uses an array of structures, instead of a - structure of arrays. */ -typedef struct -{ - regoff_t rm_so; /* Byte offset from string's start to substring's start. */ - regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ -} regmatch_t; - -/* Declarations for routines. */ - -/* Sets the current default syntax to SYNTAX, and return the old syntax. - You can also simply assign to the `re_syntax_options' variable. */ -extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); - -/* Compile the regular expression PATTERN, with length LENGTH - and syntax given by the global `re_syntax_options', into the buffer - BUFFER. Return NULL if successful, and an error string if not. */ -extern const char *re_compile_pattern (const char *__pattern, size_t __length, - struct re_pattern_buffer *__buffer); - - -/* Compile a fastmap for the compiled pattern in BUFFER; used to - accelerate searches. Return 0 if successful and -2 if was an - internal error. */ -extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); - - -/* Search in the string STRING (with length LENGTH) for the pattern - compiled into BUFFER. Start searching at position START, for RANGE - characters. Return the starting position of the match, -1 for no - match, or -2 for an internal error. Also return register - information in REGS (if REGS and BUFFER->no_sub are nonzero). */ -extern regoff_t re_search (struct re_pattern_buffer *__buffer, - const char *__string, __re_idx_t __length, - __re_idx_t __start, regoff_t __range, - struct re_registers *__regs); - - -/* Like `re_search', but search in the concatenation of STRING1 and - STRING2. Also, stop searching at index START + STOP. */ -extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, - const char *__string1, __re_idx_t __length1, - const char *__string2, __re_idx_t __length2, - __re_idx_t __start, regoff_t __range, - struct re_registers *__regs, - __re_idx_t __stop); - - -/* Like `re_search', but return how many characters in STRING the regexp - in BUFFER matched, starting at position START. */ -extern regoff_t re_match (struct re_pattern_buffer *__buffer, - const char *__string, __re_idx_t __length, - __re_idx_t __start, struct re_registers *__regs); - - -/* Relates to `re_match' as `re_search_2' relates to `re_search'. */ -extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer, - const char *__string1, __re_idx_t __length1, - const char *__string2, __re_idx_t __length2, - __re_idx_t __start, struct re_registers *__regs, - __re_idx_t __stop); - - -/* Set REGS to hold NUM_REGS registers, storing them in STARTS and - ENDS. Subsequent matches using BUFFER and REGS will use this memory - for recording register information. STARTS and ENDS must be - allocated with malloc, and must each be at least `NUM_REGS * sizeof - (regoff_t)' bytes long. - - If NUM_REGS == 0, then subsequent matches should allocate their own - register data. - - Unless this function is called, the first search or match using - BUFFER will allocate its own register data, without freeing the old - data. */ -extern void re_set_registers (struct re_pattern_buffer *__buffer, - struct re_registers *__regs, - __re_size_t __num_regs, - regoff_t *__starts, regoff_t *__ends); - -#if defined _REGEX_RE_COMP || defined _LIBC -# ifndef _CRAY -/* 4.2 bsd compatibility. */ -extern char *re_comp (const char *); -extern int re_exec (const char *); -# endif -#endif - -/* GCC 2.95 and later have "__restrict"; C99 compilers have - "restrict", and "configure" may have defined "restrict". - Other compilers use __restrict, __restrict__, and _Restrict, and - 'configure' might #define 'restrict' to those words, so pick a - different name. */ -#ifndef _Restrict_ -# if 199901L <= __STDC_VERSION__ -# define _Restrict_ restrict -# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) -# define _Restrict_ __restrict -# else -# define _Restrict_ -# endif -#endif -/* gcc 3.1 and up support the [restrict] syntax. Don't trust - sys/cdefs.h's definition of __restrict_arr, though, as it - mishandles gcc -ansi -pedantic. */ -#ifndef _Restrict_arr_ -# if ((199901L <= __STDC_VERSION__ \ - || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ - && !__STRICT_ANSI__)) \ - && !defined __GNUG__) -# define _Restrict_arr_ _Restrict_ -# else -# define _Restrict_arr_ -# endif -#endif - -/* POSIX compatibility. */ -extern int regcomp (regex_t *_Restrict_ __preg, - const char *_Restrict_ __pattern, - int __cflags); - -extern int regexec (const regex_t *_Restrict_ __preg, - const char *_Restrict_ __string, size_t __nmatch, - regmatch_t __pmatch[_Restrict_arr_], - int __eflags); - -extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg, - char *_Restrict_ __errbuf, size_t __errbuf_size); - -extern void regfree (regex_t *__preg); - - -#ifdef __cplusplus -} -#endif /* C++ */ - -#endif /* regex.h */ diff --git a/gnulib/lib/regex_internal.c b/gnulib/lib/regex_internal.c deleted file mode 100644 index c6b3bf2..0000000 --- a/gnulib/lib/regex_internal.c +++ /dev/null @@ -1,1741 +0,0 @@ -/* Extended regular expression matching and search library. - Copyright (C) 2002-2011 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -static void re_string_construct_common (const char *str, Idx len, - re_string_t *pstr, - RE_TRANSLATE_TYPE trans, bool icase, - const re_dfa_t *dfa) internal_function; -static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, - const re_node_set *nodes, - re_hashval_t hash) internal_function; -static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, - const re_node_set *nodes, - unsigned int context, - re_hashval_t hash) internal_function; - -/* Functions for string operation. */ - -/* This function allocate the buffers. It is necessary to call - re_string_reconstruct before using the object. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, - RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) -{ - reg_errcode_t ret; - Idx init_buf_len; - - /* Ensure at least one character fits into the buffers. */ - if (init_len < dfa->mb_cur_max) - init_len = dfa->mb_cur_max; - init_buf_len = (len + 1 < init_len) ? len + 1: init_len; - re_string_construct_common (str, len, pstr, trans, icase, dfa); - - ret = re_string_realloc_buffers (pstr, init_buf_len); - if (BE (ret != REG_NOERROR, 0)) - return ret; - - pstr->word_char = dfa->word_char; - pstr->word_ops_used = dfa->word_ops_used; - pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; - pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; - pstr->valid_raw_len = pstr->valid_len; - return REG_NOERROR; -} - -/* This function allocate the buffers, and initialize them. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_string_construct (re_string_t *pstr, const char *str, Idx len, - RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) -{ - reg_errcode_t ret; - memset (pstr, '\0', sizeof (re_string_t)); - re_string_construct_common (str, len, pstr, trans, icase, dfa); - - if (len > 0) - { - ret = re_string_realloc_buffers (pstr, len + 1); - if (BE (ret != REG_NOERROR, 0)) - return ret; - } - pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; - - if (icase) - { -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - { - while (1) - { - ret = build_wcs_upper_buffer (pstr); - if (BE (ret != REG_NOERROR, 0)) - return ret; - if (pstr->valid_raw_len >= len) - break; - if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) - break; - ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); - if (BE (ret != REG_NOERROR, 0)) - return ret; - } - } - else -#endif /* RE_ENABLE_I18N */ - build_upper_buffer (pstr); - } - else - { -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - build_wcs_buffer (pstr); - else -#endif /* RE_ENABLE_I18N */ - { - if (trans != NULL) - re_string_translate_buffer (pstr); - else - { - pstr->valid_len = pstr->bufs_len; - pstr->valid_raw_len = pstr->bufs_len; - } - } - } - - return REG_NOERROR; -} - -/* Helper functions for re_string_allocate, and re_string_construct. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) -{ -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - { - wint_t *new_wcs; - - /* Avoid overflow. */ - size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); - if (BE (SIZE_MAX / max_object_size < new_buf_len, 0)) - return REG_ESPACE; - - new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); - if (BE (new_wcs == NULL, 0)) - return REG_ESPACE; - pstr->wcs = new_wcs; - if (pstr->offsets != NULL) - { - Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); - if (BE (new_offsets == NULL, 0)) - return REG_ESPACE; - pstr->offsets = new_offsets; - } - } -#endif /* RE_ENABLE_I18N */ - if (pstr->mbs_allocated) - { - unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, - new_buf_len); - if (BE (new_mbs == NULL, 0)) - return REG_ESPACE; - pstr->mbs = new_mbs; - } - pstr->bufs_len = new_buf_len; - return REG_NOERROR; -} - - -static void -internal_function -re_string_construct_common (const char *str, Idx len, re_string_t *pstr, - RE_TRANSLATE_TYPE trans, bool icase, - const re_dfa_t *dfa) -{ - pstr->raw_mbs = (const unsigned char *) str; - pstr->len = len; - pstr->raw_len = len; - pstr->trans = trans; - pstr->icase = icase; - pstr->mbs_allocated = (trans != NULL || icase); - pstr->mb_cur_max = dfa->mb_cur_max; - pstr->is_utf8 = dfa->is_utf8; - pstr->map_notascii = dfa->map_notascii; - pstr->stop = pstr->len; - pstr->raw_stop = pstr->stop; -} - -#ifdef RE_ENABLE_I18N - -/* Build wide character buffer PSTR->WCS. - If the byte sequence of the string are: - (0), (1), (0), (1), - Then wide character buffer will be: - , WEOF , , WEOF , - We use WEOF for padding, they indicate that the position isn't - a first byte of a multibyte character. - - Note that this function assumes PSTR->VALID_LEN elements are already - built and starts from PSTR->VALID_LEN. */ - -static void -internal_function -build_wcs_buffer (re_string_t *pstr) -{ -#ifdef _LIBC - unsigned char buf[MB_LEN_MAX]; - assert (MB_LEN_MAX >= pstr->mb_cur_max); -#else - unsigned char buf[64]; -#endif - mbstate_t prev_st; - Idx byte_idx, end_idx, remain_len; - size_t mbclen; - - /* Build the buffers from pstr->valid_len to either pstr->len or - pstr->bufs_len. */ - end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; - for (byte_idx = pstr->valid_len; byte_idx < end_idx;) - { - wchar_t wc; - const char *p; - - remain_len = end_idx - byte_idx; - prev_st = pstr->cur_state; - /* Apply the translation if we need. */ - if (BE (pstr->trans != NULL, 0)) - { - int i, ch; - - for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) - { - ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; - buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; - } - p = (const char *) buf; - } - else - p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; - mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); - if (BE (mbclen == (size_t) -2, 0)) - { - /* The buffer doesn't have enough space, finish to build. */ - pstr->cur_state = prev_st; - break; - } - else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0)) - { - /* We treat these cases as a singlebyte character. */ - mbclen = 1; - wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; - if (BE (pstr->trans != NULL, 0)) - wc = pstr->trans[wc]; - pstr->cur_state = prev_st; - } - - /* Write wide character and padding. */ - pstr->wcs[byte_idx++] = wc; - /* Write paddings. */ - for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) - pstr->wcs[byte_idx++] = WEOF; - } - pstr->valid_len = byte_idx; - pstr->valid_raw_len = byte_idx; -} - -/* Build wide character buffer PSTR->WCS like build_wcs_buffer, - but for REG_ICASE. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -build_wcs_upper_buffer (re_string_t *pstr) -{ - mbstate_t prev_st; - Idx src_idx, byte_idx, end_idx, remain_len; - size_t mbclen; -#ifdef _LIBC - char buf[MB_LEN_MAX]; - assert (MB_LEN_MAX >= pstr->mb_cur_max); -#else - char buf[64]; -#endif - - byte_idx = pstr->valid_len; - end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; - - /* The following optimization assumes that ASCII characters can be - mapped to wide characters with a simple cast. */ - if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) - { - while (byte_idx < end_idx) - { - wchar_t wc; - - if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) - && mbsinit (&pstr->cur_state)) - { - /* In case of a singlebyte character. */ - pstr->mbs[byte_idx] - = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); - /* The next step uses the assumption that wchar_t is encoded - ASCII-safe: all ASCII values can be converted like this. */ - pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; - ++byte_idx; - continue; - } - - remain_len = end_idx - byte_idx; - prev_st = pstr->cur_state; - mbclen = __mbrtowc (&wc, - ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx - + byte_idx), remain_len, &pstr->cur_state); - if (BE (mbclen < (size_t) -2, 1)) - { - wchar_t wcu = wc; - if (iswlower (wc)) - { - size_t mbcdlen; - - wcu = towupper (wc); - mbcdlen = wcrtomb (buf, wcu, &prev_st); - if (BE (mbclen == mbcdlen, 1)) - memcpy (pstr->mbs + byte_idx, buf, mbclen); - else - { - src_idx = byte_idx; - goto offsets_needed; - } - } - else - memcpy (pstr->mbs + byte_idx, - pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); - pstr->wcs[byte_idx++] = wcu; - /* Write paddings. */ - for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) - pstr->wcs[byte_idx++] = WEOF; - } - else if (mbclen == (size_t) -1 || mbclen == 0) - { - /* It is an invalid character or '\0'. Just use the byte. */ - int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; - pstr->mbs[byte_idx] = ch; - /* And also cast it to wide char. */ - pstr->wcs[byte_idx++] = (wchar_t) ch; - if (BE (mbclen == (size_t) -1, 0)) - pstr->cur_state = prev_st; - } - else - { - /* The buffer doesn't have enough space, finish to build. */ - pstr->cur_state = prev_st; - break; - } - } - pstr->valid_len = byte_idx; - pstr->valid_raw_len = byte_idx; - return REG_NOERROR; - } - else - for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) - { - wchar_t wc; - const char *p; - offsets_needed: - remain_len = end_idx - byte_idx; - prev_st = pstr->cur_state; - if (BE (pstr->trans != NULL, 0)) - { - int i, ch; - - for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) - { - ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; - buf[i] = pstr->trans[ch]; - } - p = (const char *) buf; - } - else - p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; - mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); - if (BE (mbclen < (size_t) -2, 1)) - { - wchar_t wcu = wc; - if (iswlower (wc)) - { - size_t mbcdlen; - - wcu = towupper (wc); - mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); - if (BE (mbclen == mbcdlen, 1)) - memcpy (pstr->mbs + byte_idx, buf, mbclen); - else if (mbcdlen != (size_t) -1) - { - size_t i; - - if (byte_idx + mbcdlen > pstr->bufs_len) - { - pstr->cur_state = prev_st; - break; - } - - if (pstr->offsets == NULL) - { - pstr->offsets = re_malloc (Idx, pstr->bufs_len); - - if (pstr->offsets == NULL) - return REG_ESPACE; - } - if (!pstr->offsets_needed) - { - for (i = 0; i < (size_t) byte_idx; ++i) - pstr->offsets[i] = i; - pstr->offsets_needed = 1; - } - - memcpy (pstr->mbs + byte_idx, buf, mbcdlen); - pstr->wcs[byte_idx] = wcu; - pstr->offsets[byte_idx] = src_idx; - for (i = 1; i < mbcdlen; ++i) - { - pstr->offsets[byte_idx + i] - = src_idx + (i < mbclen ? i : mbclen - 1); - pstr->wcs[byte_idx + i] = WEOF; - } - pstr->len += mbcdlen - mbclen; - if (pstr->raw_stop > src_idx) - pstr->stop += mbcdlen - mbclen; - end_idx = (pstr->bufs_len > pstr->len) - ? pstr->len : pstr->bufs_len; - byte_idx += mbcdlen; - src_idx += mbclen; - continue; - } - else - memcpy (pstr->mbs + byte_idx, p, mbclen); - } - else - memcpy (pstr->mbs + byte_idx, p, mbclen); - - if (BE (pstr->offsets_needed != 0, 0)) - { - size_t i; - for (i = 0; i < mbclen; ++i) - pstr->offsets[byte_idx + i] = src_idx + i; - } - src_idx += mbclen; - - pstr->wcs[byte_idx++] = wcu; - /* Write paddings. */ - for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) - pstr->wcs[byte_idx++] = WEOF; - } - else if (mbclen == (size_t) -1 || mbclen == 0) - { - /* It is an invalid character or '\0'. Just use the byte. */ - int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; - - if (BE (pstr->trans != NULL, 0)) - ch = pstr->trans [ch]; - pstr->mbs[byte_idx] = ch; - - if (BE (pstr->offsets_needed != 0, 0)) - pstr->offsets[byte_idx] = src_idx; - ++src_idx; - - /* And also cast it to wide char. */ - pstr->wcs[byte_idx++] = (wchar_t) ch; - if (BE (mbclen == (size_t) -1, 0)) - pstr->cur_state = prev_st; - } - else - { - /* The buffer doesn't have enough space, finish to build. */ - pstr->cur_state = prev_st; - break; - } - } - pstr->valid_len = byte_idx; - pstr->valid_raw_len = src_idx; - return REG_NOERROR; -} - -/* Skip characters until the index becomes greater than NEW_RAW_IDX. - Return the index. */ - -static Idx -internal_function -re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) -{ - mbstate_t prev_st; - Idx rawbuf_idx; - size_t mbclen; - wint_t wc = WEOF; - - /* Skip the characters which are not necessary to check. */ - for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; - rawbuf_idx < new_raw_idx;) - { - wchar_t wc2; - Idx remain_len; - remain_len = pstr->len - rawbuf_idx; - prev_st = pstr->cur_state; - mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, - remain_len, &pstr->cur_state); - if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) - { - /* We treat these cases as a single byte character. */ - if (mbclen == 0 || remain_len == 0) - wc = L'\0'; - else - wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); - mbclen = 1; - pstr->cur_state = prev_st; - } - else - wc = wc2; - /* Then proceed the next character. */ - rawbuf_idx += mbclen; - } - *last_wc = wc; - return rawbuf_idx; -} -#endif /* RE_ENABLE_I18N */ - -/* Build the buffer PSTR->MBS, and apply the translation if we need. - This function is used in case of REG_ICASE. */ - -static void -internal_function -build_upper_buffer (re_string_t *pstr) -{ - Idx char_idx, end_idx; - end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; - - for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) - { - int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; - if (BE (pstr->trans != NULL, 0)) - ch = pstr->trans[ch]; - if (islower (ch)) - pstr->mbs[char_idx] = toupper (ch); - else - pstr->mbs[char_idx] = ch; - } - pstr->valid_len = char_idx; - pstr->valid_raw_len = char_idx; -} - -/* Apply TRANS to the buffer in PSTR. */ - -static void -internal_function -re_string_translate_buffer (re_string_t *pstr) -{ - Idx buf_idx, end_idx; - end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; - - for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) - { - int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; - pstr->mbs[buf_idx] = pstr->trans[ch]; - } - - pstr->valid_len = buf_idx; - pstr->valid_raw_len = buf_idx; -} - -/* This function re-construct the buffers. - Concretely, convert to wide character in case of pstr->mb_cur_max > 1, - convert to upper case in case of REG_ICASE, apply translation. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) -{ - Idx offset; - - if (BE (pstr->raw_mbs_idx <= idx, 0)) - offset = idx - pstr->raw_mbs_idx; - else - { - /* Reset buffer. */ -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); -#endif /* RE_ENABLE_I18N */ - pstr->len = pstr->raw_len; - pstr->stop = pstr->raw_stop; - pstr->valid_len = 0; - pstr->raw_mbs_idx = 0; - pstr->valid_raw_len = 0; - pstr->offsets_needed = 0; - pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF - : CONTEXT_NEWLINE | CONTEXT_BEGBUF); - if (!pstr->mbs_allocated) - pstr->mbs = (unsigned char *) pstr->raw_mbs; - offset = idx; - } - - if (BE (offset != 0, 1)) - { - /* Should the already checked characters be kept? */ - if (BE (offset < pstr->valid_raw_len, 1)) - { - /* Yes, move them to the front of the buffer. */ -#ifdef RE_ENABLE_I18N - if (BE (pstr->offsets_needed, 0)) - { - Idx low = 0, high = pstr->valid_len, mid; - do - { - mid = (high + low) / 2; - if (pstr->offsets[mid] > offset) - high = mid; - else if (pstr->offsets[mid] < offset) - low = mid + 1; - else - break; - } - while (low < high); - if (pstr->offsets[mid] < offset) - ++mid; - pstr->tip_context = re_string_context_at (pstr, mid - 1, - eflags); - /* This can be quite complicated, so handle specially - only the common and easy case where the character with - different length representation of lower and upper - case is present at or after offset. */ - if (pstr->valid_len > offset - && mid == offset && pstr->offsets[mid] == offset) - { - memmove (pstr->wcs, pstr->wcs + offset, - (pstr->valid_len - offset) * sizeof (wint_t)); - memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); - pstr->valid_len -= offset; - pstr->valid_raw_len -= offset; - for (low = 0; low < pstr->valid_len; low++) - pstr->offsets[low] = pstr->offsets[low + offset] - offset; - } - else - { - /* Otherwise, just find out how long the partial multibyte - character at offset is and fill it with WEOF/255. */ - pstr->len = pstr->raw_len - idx + offset; - pstr->stop = pstr->raw_stop - idx + offset; - pstr->offsets_needed = 0; - while (mid > 0 && pstr->offsets[mid - 1] == offset) - --mid; - while (mid < pstr->valid_len) - if (pstr->wcs[mid] != WEOF) - break; - else - ++mid; - if (mid == pstr->valid_len) - pstr->valid_len = 0; - else - { - pstr->valid_len = pstr->offsets[mid] - offset; - if (pstr->valid_len) - { - for (low = 0; low < pstr->valid_len; ++low) - pstr->wcs[low] = WEOF; - memset (pstr->mbs, 255, pstr->valid_len); - } - } - pstr->valid_raw_len = pstr->valid_len; - } - } - else -#endif - { - pstr->tip_context = re_string_context_at (pstr, offset - 1, - eflags); -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - memmove (pstr->wcs, pstr->wcs + offset, - (pstr->valid_len - offset) * sizeof (wint_t)); -#endif /* RE_ENABLE_I18N */ - if (BE (pstr->mbs_allocated, 0)) - memmove (pstr->mbs, pstr->mbs + offset, - pstr->valid_len - offset); - pstr->valid_len -= offset; - pstr->valid_raw_len -= offset; -#if DEBUG - assert (pstr->valid_len > 0); -#endif - } - } - else - { -#ifdef RE_ENABLE_I18N - /* No, skip all characters until IDX. */ - Idx prev_valid_len = pstr->valid_len; - - if (BE (pstr->offsets_needed, 0)) - { - pstr->len = pstr->raw_len - idx + offset; - pstr->stop = pstr->raw_stop - idx + offset; - pstr->offsets_needed = 0; - } -#endif - pstr->valid_len = 0; -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - { - Idx wcs_idx; - wint_t wc = WEOF; - - if (pstr->is_utf8) - { - const unsigned char *raw, *p, *end; - - /* Special case UTF-8. Multi-byte chars start with any - byte other than 0x80 - 0xbf. */ - raw = pstr->raw_mbs + pstr->raw_mbs_idx; - end = raw + (offset - pstr->mb_cur_max); - if (end < pstr->raw_mbs) - end = pstr->raw_mbs; - p = raw + offset - 1; -#ifdef _LIBC - /* We know the wchar_t encoding is UCS4, so for the simple - case, ASCII characters, skip the conversion step. */ - if (isascii (*p) && BE (pstr->trans == NULL, 1)) - { - memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); - /* pstr->valid_len = 0; */ - wc = (wchar_t) *p; - } - else -#endif - for (; p >= end; --p) - if ((*p & 0xc0) != 0x80) - { - mbstate_t cur_state; - wchar_t wc2; - Idx mlen = raw + pstr->len - p; - size_t mbclen; - -#if 0 /* dead code: buf is set but never used */ - unsigned char buf[6]; - if (BE (pstr->trans != NULL, 0)) - { - int i = mlen < 6 ? mlen : 6; - while (--i >= 0) - buf[i] = pstr->trans[p[i]]; - } -#endif - /* XXX Don't use mbrtowc, we know which conversion - to use (UTF-8 -> UCS4). */ - memset (&cur_state, 0, sizeof (cur_state)); - mbclen = __mbrtowc (&wc2, (const char *) p, mlen, - &cur_state); - if (raw + offset - p <= mbclen - && mbclen < (size_t) -2) - { - memset (&pstr->cur_state, '\0', - sizeof (mbstate_t)); - pstr->valid_len = mbclen - (raw + offset - p); - wc = wc2; - } - break; - } - } - - if (wc == WEOF) - pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; - if (wc == WEOF) - pstr->tip_context - = re_string_context_at (pstr, prev_valid_len - 1, eflags); - else - pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) - && IS_WIDE_WORD_CHAR (wc)) - ? CONTEXT_WORD - : ((IS_WIDE_NEWLINE (wc) - && pstr->newline_anchor) - ? CONTEXT_NEWLINE : 0)); - if (BE (pstr->valid_len, 0)) - { - for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) - pstr->wcs[wcs_idx] = WEOF; - if (pstr->mbs_allocated) - memset (pstr->mbs, 255, pstr->valid_len); - } - pstr->valid_raw_len = pstr->valid_len; - } - else -#endif /* RE_ENABLE_I18N */ - { - int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; - pstr->valid_raw_len = 0; - if (pstr->trans) - c = pstr->trans[c]; - pstr->tip_context = (bitset_contain (pstr->word_char, c) - ? CONTEXT_WORD - : ((IS_NEWLINE (c) && pstr->newline_anchor) - ? CONTEXT_NEWLINE : 0)); - } - } - if (!BE (pstr->mbs_allocated, 0)) - pstr->mbs += offset; - } - pstr->raw_mbs_idx = idx; - pstr->len -= offset; - pstr->stop -= offset; - - /* Then build the buffers. */ -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - { - if (pstr->icase) - { - reg_errcode_t ret = build_wcs_upper_buffer (pstr); - if (BE (ret != REG_NOERROR, 0)) - return ret; - } - else - build_wcs_buffer (pstr); - } - else -#endif /* RE_ENABLE_I18N */ - if (BE (pstr->mbs_allocated, 0)) - { - if (pstr->icase) - build_upper_buffer (pstr); - else if (pstr->trans != NULL) - re_string_translate_buffer (pstr); - } - else - pstr->valid_len = pstr->len; - - pstr->cur_idx = 0; - return REG_NOERROR; -} - -static unsigned char -internal_function __attribute ((pure)) -re_string_peek_byte_case (const re_string_t *pstr, Idx idx) -{ - int ch; - Idx off; - - /* Handle the common (easiest) cases first. */ - if (BE (!pstr->mbs_allocated, 1)) - return re_string_peek_byte (pstr, idx); - -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1 - && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) - return re_string_peek_byte (pstr, idx); -#endif - - off = pstr->cur_idx + idx; -#ifdef RE_ENABLE_I18N - if (pstr->offsets_needed) - off = pstr->offsets[off]; -#endif - - ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; - -#ifdef RE_ENABLE_I18N - /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I - this function returns CAPITAL LETTER I instead of first byte of - DOTLESS SMALL LETTER I. The latter would confuse the parser, - since peek_byte_case doesn't advance cur_idx in any way. */ - if (pstr->offsets_needed && !isascii (ch)) - return re_string_peek_byte (pstr, idx); -#endif - - return ch; -} - -static unsigned char -internal_function __attribute ((pure)) -re_string_fetch_byte_case (re_string_t *pstr) -{ - if (BE (!pstr->mbs_allocated, 1)) - return re_string_fetch_byte (pstr); - -#ifdef RE_ENABLE_I18N - if (pstr->offsets_needed) - { - Idx off; - int ch; - - /* For tr_TR.UTF-8 [[:islower:]] there is - [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip - in that case the whole multi-byte character and return - the original letter. On the other side, with - [[: DOTLESS SMALL LETTER I return [[:I, as doing - anything else would complicate things too much. */ - - if (!re_string_first_byte (pstr, pstr->cur_idx)) - return re_string_fetch_byte (pstr); - - off = pstr->offsets[pstr->cur_idx]; - ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; - - if (! isascii (ch)) - return re_string_fetch_byte (pstr); - - re_string_skip_bytes (pstr, - re_string_char_size_at (pstr, pstr->cur_idx)); - return ch; - } -#endif - - return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; -} - -static void -internal_function -re_string_destruct (re_string_t *pstr) -{ -#ifdef RE_ENABLE_I18N - re_free (pstr->wcs); - re_free (pstr->offsets); -#endif /* RE_ENABLE_I18N */ - if (pstr->mbs_allocated) - re_free (pstr->mbs); -} - -/* Return the context at IDX in INPUT. */ - -static unsigned int -internal_function -re_string_context_at (const re_string_t *input, Idx idx, int eflags) -{ - int c; - if (BE (! REG_VALID_INDEX (idx), 0)) - /* In this case, we use the value stored in input->tip_context, - since we can't know the character in input->mbs[-1] here. */ - return input->tip_context; - if (BE (idx == input->len, 0)) - return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF - : CONTEXT_NEWLINE | CONTEXT_ENDBUF); -#ifdef RE_ENABLE_I18N - if (input->mb_cur_max > 1) - { - wint_t wc; - Idx wc_idx = idx; - while(input->wcs[wc_idx] == WEOF) - { -#ifdef DEBUG - /* It must not happen. */ - assert (REG_VALID_INDEX (wc_idx)); -#endif - --wc_idx; - if (! REG_VALID_INDEX (wc_idx)) - return input->tip_context; - } - wc = input->wcs[wc_idx]; - if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) - return CONTEXT_WORD; - return (IS_WIDE_NEWLINE (wc) && input->newline_anchor - ? CONTEXT_NEWLINE : 0); - } - else -#endif - { - c = re_string_byte_at (input, idx); - if (bitset_contain (input->word_char, c)) - return CONTEXT_WORD; - return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; - } -} - -/* Functions for set operation. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_alloc (re_node_set *set, Idx size) -{ - set->alloc = size; - set->nelem = 0; - set->elems = re_malloc (Idx, size); - if (BE (set->elems == NULL, 0)) - return REG_ESPACE; - return REG_NOERROR; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_init_1 (re_node_set *set, Idx elem) -{ - set->alloc = 1; - set->nelem = 1; - set->elems = re_malloc (Idx, 1); - if (BE (set->elems == NULL, 0)) - { - set->alloc = set->nelem = 0; - return REG_ESPACE; - } - set->elems[0] = elem; - return REG_NOERROR; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2) -{ - set->alloc = 2; - set->elems = re_malloc (Idx, 2); - if (BE (set->elems == NULL, 0)) - return REG_ESPACE; - if (elem1 == elem2) - { - set->nelem = 1; - set->elems[0] = elem1; - } - else - { - set->nelem = 2; - if (elem1 < elem2) - { - set->elems[0] = elem1; - set->elems[1] = elem2; - } - else - { - set->elems[0] = elem2; - set->elems[1] = elem1; - } - } - return REG_NOERROR; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_init_copy (re_node_set *dest, const re_node_set *src) -{ - dest->nelem = src->nelem; - if (src->nelem > 0) - { - dest->alloc = dest->nelem; - dest->elems = re_malloc (Idx, dest->alloc); - if (BE (dest->elems == NULL, 0)) - { - dest->alloc = dest->nelem = 0; - return REG_ESPACE; - } - memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); - } - else - re_node_set_init_empty (dest); - return REG_NOERROR; -} - -/* Calculate the intersection of the sets SRC1 and SRC2. And merge it to - DEST. Return value indicate the error code or REG_NOERROR if succeeded. - Note: We assume dest->elems is NULL, when dest->alloc is 0. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, - const re_node_set *src2) -{ - Idx i1, i2, is, id, delta, sbase; - if (src1->nelem == 0 || src2->nelem == 0) - return REG_NOERROR; - - /* We need dest->nelem + 2 * elems_in_intersection; this is a - conservative estimate. */ - if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) - { - Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; - Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc); - if (BE (new_elems == NULL, 0)) - return REG_ESPACE; - dest->elems = new_elems; - dest->alloc = new_alloc; - } - - /* Find the items in the intersection of SRC1 and SRC2, and copy - into the top of DEST those that are not already in DEST itself. */ - sbase = dest->nelem + src1->nelem + src2->nelem; - i1 = src1->nelem - 1; - i2 = src2->nelem - 1; - id = dest->nelem - 1; - for (;;) - { - if (src1->elems[i1] == src2->elems[i2]) - { - /* Try to find the item in DEST. Maybe we could binary search? */ - while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1]) - --id; - - if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1]) - dest->elems[--sbase] = src1->elems[i1]; - - if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2)) - break; - } - - /* Lower the highest of the two items. */ - else if (src1->elems[i1] < src2->elems[i2]) - { - if (! REG_VALID_INDEX (--i2)) - break; - } - else - { - if (! REG_VALID_INDEX (--i1)) - break; - } - } - - id = dest->nelem - 1; - is = dest->nelem + src1->nelem + src2->nelem - 1; - delta = is - sbase + 1; - - /* Now copy. When DELTA becomes zero, the remaining - DEST elements are already in place; this is more or - less the same loop that is in re_node_set_merge. */ - dest->nelem += delta; - if (delta > 0 && REG_VALID_INDEX (id)) - for (;;) - { - if (dest->elems[is] > dest->elems[id]) - { - /* Copy from the top. */ - dest->elems[id + delta--] = dest->elems[is--]; - if (delta == 0) - break; - } - else - { - /* Slide from the bottom. */ - dest->elems[id + delta] = dest->elems[id]; - if (! REG_VALID_INDEX (--id)) - break; - } - } - - /* Copy remaining SRC elements. */ - memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); - - return REG_NOERROR; -} - -/* Calculate the union set of the sets SRC1 and SRC2. And store it to - DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_init_union (re_node_set *dest, const re_node_set *src1, - const re_node_set *src2) -{ - Idx i1, i2, id; - if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) - { - dest->alloc = src1->nelem + src2->nelem; - dest->elems = re_malloc (Idx, dest->alloc); - if (BE (dest->elems == NULL, 0)) - return REG_ESPACE; - } - else - { - if (src1 != NULL && src1->nelem > 0) - return re_node_set_init_copy (dest, src1); - else if (src2 != NULL && src2->nelem > 0) - return re_node_set_init_copy (dest, src2); - else - re_node_set_init_empty (dest); - return REG_NOERROR; - } - for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) - { - if (src1->elems[i1] > src2->elems[i2]) - { - dest->elems[id++] = src2->elems[i2++]; - continue; - } - if (src1->elems[i1] == src2->elems[i2]) - ++i2; - dest->elems[id++] = src1->elems[i1++]; - } - if (i1 < src1->nelem) - { - memcpy (dest->elems + id, src1->elems + i1, - (src1->nelem - i1) * sizeof (Idx)); - id += src1->nelem - i1; - } - else if (i2 < src2->nelem) - { - memcpy (dest->elems + id, src2->elems + i2, - (src2->nelem - i2) * sizeof (Idx)); - id += src2->nelem - i2; - } - dest->nelem = id; - return REG_NOERROR; -} - -/* Calculate the union set of the sets DEST and SRC. And store it to - DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_merge (re_node_set *dest, const re_node_set *src) -{ - Idx is, id, sbase, delta; - if (src == NULL || src->nelem == 0) - return REG_NOERROR; - if (dest->alloc < 2 * src->nelem + dest->nelem) - { - Idx new_alloc = 2 * (src->nelem + dest->alloc); - Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc); - if (BE (new_buffer == NULL, 0)) - return REG_ESPACE; - dest->elems = new_buffer; - dest->alloc = new_alloc; - } - - if (BE (dest->nelem == 0, 0)) - { - dest->nelem = src->nelem; - memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); - return REG_NOERROR; - } - - /* Copy into the top of DEST the items of SRC that are not - found in DEST. Maybe we could binary search in DEST? */ - for (sbase = dest->nelem + 2 * src->nelem, - is = src->nelem - 1, id = dest->nelem - 1; - REG_VALID_INDEX (is) && REG_VALID_INDEX (id); ) - { - if (dest->elems[id] == src->elems[is]) - is--, id--; - else if (dest->elems[id] < src->elems[is]) - dest->elems[--sbase] = src->elems[is--]; - else /* if (dest->elems[id] > src->elems[is]) */ - --id; - } - - if (REG_VALID_INDEX (is)) - { - /* If DEST is exhausted, the remaining items of SRC must be unique. */ - sbase -= is + 1; - memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx)); - } - - id = dest->nelem - 1; - is = dest->nelem + 2 * src->nelem - 1; - delta = is - sbase + 1; - if (delta == 0) - return REG_NOERROR; - - /* Now copy. When DELTA becomes zero, the remaining - DEST elements are already in place. */ - dest->nelem += delta; - for (;;) - { - if (dest->elems[is] > dest->elems[id]) - { - /* Copy from the top. */ - dest->elems[id + delta--] = dest->elems[is--]; - if (delta == 0) - break; - } - else - { - /* Slide from the bottom. */ - dest->elems[id + delta] = dest->elems[id]; - if (! REG_VALID_INDEX (--id)) - { - /* Copy remaining SRC elements. */ - memcpy (dest->elems, dest->elems + sbase, - delta * sizeof (Idx)); - break; - } - } - } - - return REG_NOERROR; -} - -/* Insert the new element ELEM to the re_node_set* SET. - SET should not already have ELEM. - Return true if successful. */ - -static bool -internal_function __attribute_warn_unused_result__ -re_node_set_insert (re_node_set *set, Idx elem) -{ - Idx idx; - /* In case the set is empty. */ - if (set->alloc == 0) - return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1); - - if (BE (set->nelem, 0) == 0) - { - /* We already guaranteed above that set->alloc != 0. */ - set->elems[0] = elem; - ++set->nelem; - return true; - } - - /* Realloc if we need. */ - if (set->alloc == set->nelem) - { - Idx *new_elems; - set->alloc = set->alloc * 2; - new_elems = re_realloc (set->elems, Idx, set->alloc); - if (BE (new_elems == NULL, 0)) - return false; - set->elems = new_elems; - } - - /* Move the elements which follows the new element. Test the - first element separately to skip a check in the inner loop. */ - if (elem < set->elems[0]) - { - idx = 0; - for (idx = set->nelem; idx > 0; idx--) - set->elems[idx] = set->elems[idx - 1]; - } - else - { - for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) - set->elems[idx] = set->elems[idx - 1]; - } - - /* Insert the new element. */ - set->elems[idx] = elem; - ++set->nelem; - return true; -} - -/* Insert the new element ELEM to the re_node_set* SET. - SET should not already have any element greater than or equal to ELEM. - Return true if successful. */ - -static bool -internal_function __attribute_warn_unused_result__ -re_node_set_insert_last (re_node_set *set, Idx elem) -{ - /* Realloc if we need. */ - if (set->alloc == set->nelem) - { - Idx *new_elems; - set->alloc = (set->alloc + 1) * 2; - new_elems = re_realloc (set->elems, Idx, set->alloc); - if (BE (new_elems == NULL, 0)) - return false; - set->elems = new_elems; - } - - /* Insert the new element. */ - set->elems[set->nelem++] = elem; - return true; -} - -/* Compare two node sets SET1 and SET2. - Return true if SET1 and SET2 are equivalent. */ - -static bool -internal_function __attribute ((pure)) -re_node_set_compare (const re_node_set *set1, const re_node_set *set2) -{ - Idx i; - if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) - return false; - for (i = set1->nelem ; REG_VALID_INDEX (--i) ; ) - if (set1->elems[i] != set2->elems[i]) - return false; - return true; -} - -/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ - -static Idx -internal_function __attribute ((pure)) -re_node_set_contains (const re_node_set *set, Idx elem) -{ - __re_size_t idx, right, mid; - if (! REG_VALID_NONZERO_INDEX (set->nelem)) - return 0; - - /* Binary search the element. */ - idx = 0; - right = set->nelem - 1; - while (idx < right) - { - mid = (idx + right) / 2; - if (set->elems[mid] < elem) - idx = mid + 1; - else - right = mid; - } - return set->elems[idx] == elem ? idx + 1 : 0; -} - -static void -internal_function -re_node_set_remove_at (re_node_set *set, Idx idx) -{ - if (idx < 0 || idx >= set->nelem) - return; - --set->nelem; - for (; idx < set->nelem; idx++) - set->elems[idx] = set->elems[idx + 1]; -} - - -/* Add the token TOKEN to dfa->nodes, and return the index of the token. - Or return REG_MISSING if an error occurred. */ - -static Idx -internal_function -re_dfa_add_node (re_dfa_t *dfa, re_token_t token) -{ - if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) - { - size_t new_nodes_alloc = dfa->nodes_alloc * 2; - Idx *new_nexts, *new_indices; - re_node_set *new_edests, *new_eclosures; - re_token_t *new_nodes; - size_t max_object_size = - MAX (sizeof (re_token_t), - MAX (sizeof (re_node_set), - sizeof (Idx))); - - /* Avoid overflows. */ - if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0)) - return REG_MISSING; - - new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); - if (BE (new_nodes == NULL, 0)) - return REG_MISSING; - dfa->nodes = new_nodes; - new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); - new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); - new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); - new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); - if (BE (new_nexts == NULL || new_indices == NULL - || new_edests == NULL || new_eclosures == NULL, 0)) - return REG_MISSING; - dfa->nexts = new_nexts; - dfa->org_indices = new_indices; - dfa->edests = new_edests; - dfa->eclosures = new_eclosures; - dfa->nodes_alloc = new_nodes_alloc; - } - dfa->nodes[dfa->nodes_len] = token; - dfa->nodes[dfa->nodes_len].constraint = 0; -#ifdef RE_ENABLE_I18N - { - int type = token.type; - dfa->nodes[dfa->nodes_len].accept_mb = - (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; - } -#endif - dfa->nexts[dfa->nodes_len] = REG_MISSING; - re_node_set_init_empty (dfa->edests + dfa->nodes_len); - re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); - return dfa->nodes_len++; -} - -static inline re_hashval_t -internal_function -calc_state_hash (const re_node_set *nodes, unsigned int context) -{ - re_hashval_t hash = nodes->nelem + context; - Idx i; - for (i = 0 ; i < nodes->nelem ; i++) - hash += nodes->elems[i]; - return hash; -} - -/* Search for the state whose node_set is equivalent to NODES. - Return the pointer to the state, if we found it in the DFA. - Otherwise create the new one and return it. In case of an error - return NULL and set the error code in ERR. - Note: - We assume NULL as the invalid state, then it is possible that - return value is NULL and ERR is REG_NOERROR. - - We never return non-NULL value in case of any errors, it is for - optimization. */ - -static re_dfastate_t * -internal_function __attribute_warn_unused_result__ -re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, - const re_node_set *nodes) -{ - re_hashval_t hash; - re_dfastate_t *new_state; - struct re_state_table_entry *spot; - Idx i; -#ifdef lint - /* Suppress bogus uninitialized-variable warnings. */ - *err = REG_NOERROR; -#endif - if (BE (nodes->nelem == 0, 0)) - { - *err = REG_NOERROR; - return NULL; - } - hash = calc_state_hash (nodes, 0); - spot = dfa->state_table + (hash & dfa->state_hash_mask); - - for (i = 0 ; i < spot->num ; i++) - { - re_dfastate_t *state = spot->array[i]; - if (hash != state->hash) - continue; - if (re_node_set_compare (&state->nodes, nodes)) - return state; - } - - /* There are no appropriate state in the dfa, create the new one. */ - new_state = create_ci_newstate (dfa, nodes, hash); - if (BE (new_state == NULL, 0)) - *err = REG_ESPACE; - - return new_state; -} - -/* Search for the state whose node_set is equivalent to NODES and - whose context is equivalent to CONTEXT. - Return the pointer to the state, if we found it in the DFA. - Otherwise create the new one and return it. In case of an error - return NULL and set the error code in ERR. - Note: - We assume NULL as the invalid state, then it is possible that - return value is NULL and ERR is REG_NOERROR. - - We never return non-NULL value in case of any errors, it is for - optimization. */ - -static re_dfastate_t * -internal_function __attribute_warn_unused_result__ -re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, - const re_node_set *nodes, unsigned int context) -{ - re_hashval_t hash; - re_dfastate_t *new_state; - struct re_state_table_entry *spot; - Idx i; -#ifdef lint - /* Suppress bogus uninitialized-variable warnings. */ - *err = REG_NOERROR; -#endif - if (nodes->nelem == 0) - { - *err = REG_NOERROR; - return NULL; - } - hash = calc_state_hash (nodes, context); - spot = dfa->state_table + (hash & dfa->state_hash_mask); - - for (i = 0 ; i < spot->num ; i++) - { - re_dfastate_t *state = spot->array[i]; - if (state->hash == hash - && state->context == context - && re_node_set_compare (state->entrance_nodes, nodes)) - return state; - } - /* There are no appropriate state in `dfa', create the new one. */ - new_state = create_cd_newstate (dfa, nodes, context, hash); - if (BE (new_state == NULL, 0)) - *err = REG_ESPACE; - - return new_state; -} - -/* Finish initialization of the new state NEWSTATE, and using its hash value - HASH put in the appropriate bucket of DFA's state table. Return value - indicates the error code if failed. */ - -static reg_errcode_t -__attribute_warn_unused_result__ -register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, - re_hashval_t hash) -{ - struct re_state_table_entry *spot; - reg_errcode_t err; - Idx i; - - newstate->hash = hash; - err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); - if (BE (err != REG_NOERROR, 0)) - return REG_ESPACE; - for (i = 0; i < newstate->nodes.nelem; i++) - { - Idx elem = newstate->nodes.elems[i]; - if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) - if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0)) - return REG_ESPACE; - } - - spot = dfa->state_table + (hash & dfa->state_hash_mask); - if (BE (spot->alloc <= spot->num, 0)) - { - Idx new_alloc = 2 * spot->num + 2; - re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, - new_alloc); - if (BE (new_array == NULL, 0)) - return REG_ESPACE; - spot->array = new_array; - spot->alloc = new_alloc; - } - spot->array[spot->num++] = newstate; - return REG_NOERROR; -} - -static void -free_state (re_dfastate_t *state) -{ - re_node_set_free (&state->non_eps_nodes); - re_node_set_free (&state->inveclosure); - if (state->entrance_nodes != &state->nodes) - { - re_node_set_free (state->entrance_nodes); - re_free (state->entrance_nodes); - } - re_node_set_free (&state->nodes); - re_free (state->word_trtable); - re_free (state->trtable); - re_free (state); -} - -/* Create the new state which is independ of contexts. - Return the new state if succeeded, otherwise return NULL. */ - -static re_dfastate_t * -internal_function __attribute_warn_unused_result__ -create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, - re_hashval_t hash) -{ - Idx i; - reg_errcode_t err; - re_dfastate_t *newstate; - - newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); - if (BE (newstate == NULL, 0)) - return NULL; - err = re_node_set_init_copy (&newstate->nodes, nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_free (newstate); - return NULL; - } - - newstate->entrance_nodes = &newstate->nodes; - for (i = 0 ; i < nodes->nelem ; i++) - { - re_token_t *node = dfa->nodes + nodes->elems[i]; - re_token_type_t type = node->type; - if (type == CHARACTER && !node->constraint) - continue; -#ifdef RE_ENABLE_I18N - newstate->accept_mb |= node->accept_mb; -#endif /* RE_ENABLE_I18N */ - - /* If the state has the halt node, the state is a halt state. */ - if (type == END_OF_RE) - newstate->halt = 1; - else if (type == OP_BACK_REF) - newstate->has_backref = 1; - else if (type == ANCHOR || node->constraint) - newstate->has_constraint = 1; - } - err = register_state (dfa, newstate, hash); - if (BE (err != REG_NOERROR, 0)) - { - free_state (newstate); - newstate = NULL; - } - return newstate; -} - -/* Create the new state which is depend on the context CONTEXT. - Return the new state if succeeded, otherwise return NULL. */ - -static re_dfastate_t * -internal_function __attribute_warn_unused_result__ -create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, - unsigned int context, re_hashval_t hash) -{ - Idx i, nctx_nodes = 0; - reg_errcode_t err; - re_dfastate_t *newstate; - - newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); - if (BE (newstate == NULL, 0)) - return NULL; - err = re_node_set_init_copy (&newstate->nodes, nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_free (newstate); - return NULL; - } - - newstate->context = context; - newstate->entrance_nodes = &newstate->nodes; - - for (i = 0 ; i < nodes->nelem ; i++) - { - re_token_t *node = dfa->nodes + nodes->elems[i]; - re_token_type_t type = node->type; - unsigned int constraint = node->constraint; - - if (type == CHARACTER && !constraint) - continue; -#ifdef RE_ENABLE_I18N - newstate->accept_mb |= node->accept_mb; -#endif /* RE_ENABLE_I18N */ - - /* If the state has the halt node, the state is a halt state. */ - if (type == END_OF_RE) - newstate->halt = 1; - else if (type == OP_BACK_REF) - newstate->has_backref = 1; - - if (constraint) - { - if (newstate->entrance_nodes == &newstate->nodes) - { - newstate->entrance_nodes = re_malloc (re_node_set, 1); - if (BE (newstate->entrance_nodes == NULL, 0)) - { - free_state (newstate); - return NULL; - } - if (re_node_set_init_copy (newstate->entrance_nodes, nodes) - != REG_NOERROR) - return NULL; - nctx_nodes = 0; - newstate->has_constraint = 1; - } - - if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) - { - re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); - ++nctx_nodes; - } - } - } - err = register_state (dfa, newstate, hash); - if (BE (err != REG_NOERROR, 0)) - { - free_state (newstate); - newstate = NULL; - } - return newstate; -} diff --git a/gnulib/lib/regex_internal.h b/gnulib/lib/regex_internal.h deleted file mode 100644 index df4a095..0000000 --- a/gnulib/lib/regex_internal.h +++ /dev/null @@ -1,870 +0,0 @@ -/* Extended regular expression matching and search library. - Copyright (C) 2002-2011 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _REGEX_INTERNAL_H -#define _REGEX_INTERNAL_H 1 - -#include -#include -#include -#include -#include -#include - -#include -#ifndef _LIBC -# include "localcharset.h" -#endif -#include - -#include -#include -#include -#if defined _LIBC -# include -#else -# define __libc_lock_init(NAME) do { } while (0) -# define __libc_lock_lock(NAME) do { } while (0) -# define __libc_lock_unlock(NAME) do { } while (0) -#endif - -/* In case that the system doesn't have isblank(). */ -#if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) -# define isblank(ch) ((ch) == ' ' || (ch) == '\t') -#endif - -#ifdef _LIBC -# ifndef _RE_DEFINE_LOCALE_FUNCTIONS -# define _RE_DEFINE_LOCALE_FUNCTIONS 1 -# include -# include -# include -# endif -#endif - -/* This is for other GNU distributions with internationalized messages. */ -#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC -# include -# ifdef _LIBC -# undef gettext -# define gettext(msgid) \ - INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES) -# endif -#else -# define gettext(msgid) (msgid) -#endif - -#ifndef gettext_noop -/* This define is so xgettext can find the internationalizable - strings. */ -# define gettext_noop(String) String -#endif - -/* For loser systems without the definition. */ -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif - -#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC -# define RE_ENABLE_I18N -#endif - -#if __GNUC__ >= 3 -# define BE(expr, val) __builtin_expect (expr, val) -#else -# define BE(expr, val) (expr) -# ifdef _LIBC -# define inline -# endif -#endif - -/* Number of ASCII characters. */ -#define ASCII_CHARS 0x80 - -/* Number of single byte characters. */ -#define SBC_MAX (UCHAR_MAX + 1) - -#define COLL_ELEM_LEN_MAX 8 - -/* The character which represents newline. */ -#define NEWLINE_CHAR '\n' -#define WIDE_NEWLINE_CHAR L'\n' - -/* Rename to standard API for using out of glibc. */ -#ifndef _LIBC -# define __wctype wctype -# define __iswctype iswctype -# define __btowc btowc -# define __wcrtomb wcrtomb -# define __mbrtowc mbrtowc -# define __regfree regfree -# define attribute_hidden -#endif /* not _LIBC */ - -#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) -# define __attribute(arg) __attribute__ (arg) -#else -# define __attribute(arg) -#endif - -typedef __re_idx_t Idx; - -/* Special return value for failure to match. */ -#define REG_MISSING ((Idx) -1) - -/* Special return value for internal error. */ -#define REG_ERROR ((Idx) -2) - -/* Test whether N is a valid index, and is not one of the above. */ -#ifdef _REGEX_LARGE_OFFSETS -# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR) -#else -# define REG_VALID_INDEX(n) (0 <= (n)) -#endif - -/* Test whether N is a valid nonzero index. */ -#ifdef _REGEX_LARGE_OFFSETS -# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1)) -#else -# define REG_VALID_NONZERO_INDEX(n) (0 < (n)) -#endif - -/* A hash value, suitable for computing hash tables. */ -typedef __re_size_t re_hashval_t; - -/* An integer used to represent a set of bits. It must be unsigned, - and must be at least as wide as unsigned int. */ -typedef unsigned long int bitset_word_t; -/* All bits set in a bitset_word_t. */ -#define BITSET_WORD_MAX ULONG_MAX - -/* Number of bits in a bitset_word_t. For portability to hosts with - padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)'; - instead, deduce it directly from BITSET_WORD_MAX. Avoid - greater-than-32-bit integers and unconditional shifts by more than - 31 bits, as they're not portable. */ -#if BITSET_WORD_MAX == 0xffffffffUL -# define BITSET_WORD_BITS 32 -#elif BITSET_WORD_MAX >> 31 >> 4 == 1 -# define BITSET_WORD_BITS 36 -#elif BITSET_WORD_MAX >> 31 >> 16 == 1 -# define BITSET_WORD_BITS 48 -#elif BITSET_WORD_MAX >> 31 >> 28 == 1 -# define BITSET_WORD_BITS 60 -#elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1 -# define BITSET_WORD_BITS 64 -#elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1 -# define BITSET_WORD_BITS 72 -#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1 -# define BITSET_WORD_BITS 128 -#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1 -# define BITSET_WORD_BITS 256 -#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1 -# define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */ -# if BITSET_WORD_BITS <= SBC_MAX -# error "Invalid SBC_MAX" -# endif -#else -# error "Add case for new bitset_word_t size" -#endif - -/* Number of bitset_word_t values in a bitset_t. */ -#define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS) - -typedef bitset_word_t bitset_t[BITSET_WORDS]; -typedef bitset_word_t *re_bitset_ptr_t; -typedef const bitset_word_t *re_const_bitset_ptr_t; - -#define PREV_WORD_CONSTRAINT 0x0001 -#define PREV_NOTWORD_CONSTRAINT 0x0002 -#define NEXT_WORD_CONSTRAINT 0x0004 -#define NEXT_NOTWORD_CONSTRAINT 0x0008 -#define PREV_NEWLINE_CONSTRAINT 0x0010 -#define NEXT_NEWLINE_CONSTRAINT 0x0020 -#define PREV_BEGBUF_CONSTRAINT 0x0040 -#define NEXT_ENDBUF_CONSTRAINT 0x0080 -#define WORD_DELIM_CONSTRAINT 0x0100 -#define NOT_WORD_DELIM_CONSTRAINT 0x0200 - -typedef enum -{ - INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, - WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, - WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, - INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, - LINE_FIRST = PREV_NEWLINE_CONSTRAINT, - LINE_LAST = NEXT_NEWLINE_CONSTRAINT, - BUF_FIRST = PREV_BEGBUF_CONSTRAINT, - BUF_LAST = NEXT_ENDBUF_CONSTRAINT, - WORD_DELIM = WORD_DELIM_CONSTRAINT, - NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT -} re_context_type; - -typedef struct -{ - Idx alloc; - Idx nelem; - Idx *elems; -} re_node_set; - -typedef enum -{ - NON_TYPE = 0, - - /* Node type, These are used by token, node, tree. */ - CHARACTER = 1, - END_OF_RE = 2, - SIMPLE_BRACKET = 3, - OP_BACK_REF = 4, - OP_PERIOD = 5, -#ifdef RE_ENABLE_I18N - COMPLEX_BRACKET = 6, - OP_UTF8_PERIOD = 7, -#endif /* RE_ENABLE_I18N */ - - /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used - when the debugger shows values of this enum type. */ -#define EPSILON_BIT 8 - OP_OPEN_SUBEXP = EPSILON_BIT | 0, - OP_CLOSE_SUBEXP = EPSILON_BIT | 1, - OP_ALT = EPSILON_BIT | 2, - OP_DUP_ASTERISK = EPSILON_BIT | 3, - ANCHOR = EPSILON_BIT | 4, - - /* Tree type, these are used only by tree. */ - CONCAT = 16, - SUBEXP = 17, - - /* Token type, these are used only by token. */ - OP_DUP_PLUS = 18, - OP_DUP_QUESTION, - OP_OPEN_BRACKET, - OP_CLOSE_BRACKET, - OP_CHARSET_RANGE, - OP_OPEN_DUP_NUM, - OP_CLOSE_DUP_NUM, - OP_NON_MATCH_LIST, - OP_OPEN_COLL_ELEM, - OP_CLOSE_COLL_ELEM, - OP_OPEN_EQUIV_CLASS, - OP_CLOSE_EQUIV_CLASS, - OP_OPEN_CHAR_CLASS, - OP_CLOSE_CHAR_CLASS, - OP_WORD, - OP_NOTWORD, - OP_SPACE, - OP_NOTSPACE, - BACK_SLASH - -} re_token_type_t; - -#ifdef RE_ENABLE_I18N -typedef struct -{ - /* Multibyte characters. */ - wchar_t *mbchars; - - /* Collating symbols. */ -# ifdef _LIBC - int32_t *coll_syms; -# endif - - /* Equivalence classes. */ -# ifdef _LIBC - int32_t *equiv_classes; -# endif - - /* Range expressions. */ -# ifdef _LIBC - uint32_t *range_starts; - uint32_t *range_ends; -# else /* not _LIBC */ - wchar_t *range_starts; - wchar_t *range_ends; -# endif /* not _LIBC */ - - /* Character classes. */ - wctype_t *char_classes; - - /* If this character set is the non-matching list. */ - unsigned int non_match : 1; - - /* # of multibyte characters. */ - Idx nmbchars; - - /* # of collating symbols. */ - Idx ncoll_syms; - - /* # of equivalence classes. */ - Idx nequiv_classes; - - /* # of range expressions. */ - Idx nranges; - - /* # of character classes. */ - Idx nchar_classes; -} re_charset_t; -#endif /* RE_ENABLE_I18N */ - -typedef struct -{ - union - { - unsigned char c; /* for CHARACTER */ - re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ -#ifdef RE_ENABLE_I18N - re_charset_t *mbcset; /* for COMPLEX_BRACKET */ -#endif /* RE_ENABLE_I18N */ - Idx idx; /* for BACK_REF */ - re_context_type ctx_type; /* for ANCHOR */ - } opr; -#if __GNUC__ >= 2 && !__STRICT_ANSI__ - re_token_type_t type : 8; -#else - re_token_type_t type; -#endif - unsigned int constraint : 10; /* context constraint */ - unsigned int duplicated : 1; - unsigned int opt_subexp : 1; -#ifdef RE_ENABLE_I18N - unsigned int accept_mb : 1; - /* These 2 bits can be moved into the union if needed (e.g. if running out - of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ - unsigned int mb_partial : 1; -#endif - unsigned int word_char : 1; -} re_token_t; - -#define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) - -struct re_string_t -{ - /* Indicate the raw buffer which is the original string passed as an - argument of regexec(), re_search(), etc.. */ - const unsigned char *raw_mbs; - /* Store the multibyte string. In case of "case insensitive mode" like - REG_ICASE, upper cases of the string are stored, otherwise MBS points - the same address that RAW_MBS points. */ - unsigned char *mbs; -#ifdef RE_ENABLE_I18N - /* Store the wide character string which is corresponding to MBS. */ - wint_t *wcs; - Idx *offsets; - mbstate_t cur_state; -#endif - /* Index in RAW_MBS. Each character mbs[i] corresponds to - raw_mbs[raw_mbs_idx + i]. */ - Idx raw_mbs_idx; - /* The length of the valid characters in the buffers. */ - Idx valid_len; - /* The corresponding number of bytes in raw_mbs array. */ - Idx valid_raw_len; - /* The length of the buffers MBS and WCS. */ - Idx bufs_len; - /* The index in MBS, which is updated by re_string_fetch_byte. */ - Idx cur_idx; - /* length of RAW_MBS array. */ - Idx raw_len; - /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ - Idx len; - /* End of the buffer may be shorter than its length in the cases such - as re_match_2, re_search_2. Then, we use STOP for end of the buffer - instead of LEN. */ - Idx raw_stop; - /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ - Idx stop; - - /* The context of mbs[0]. We store the context independently, since - the context of mbs[0] may be different from raw_mbs[0], which is - the beginning of the input string. */ - unsigned int tip_context; - /* The translation passed as a part of an argument of re_compile_pattern. */ - RE_TRANSLATE_TYPE trans; - /* Copy of re_dfa_t's word_char. */ - re_const_bitset_ptr_t word_char; - /* true if REG_ICASE. */ - unsigned char icase; - unsigned char is_utf8; - unsigned char map_notascii; - unsigned char mbs_allocated; - unsigned char offsets_needed; - unsigned char newline_anchor; - unsigned char word_ops_used; - int mb_cur_max; -}; -typedef struct re_string_t re_string_t; - - -struct re_dfa_t; -typedef struct re_dfa_t re_dfa_t; - -#ifndef _LIBC -# if defined __i386__ && !defined __EMX__ -# define internal_function __attribute ((regparm (3), stdcall)) -# else -# define internal_function -# endif -#endif - -static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, - Idx new_buf_len) - internal_function; -#ifdef RE_ENABLE_I18N -static void build_wcs_buffer (re_string_t *pstr) internal_function; -static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) - internal_function; -#endif /* RE_ENABLE_I18N */ -static void build_upper_buffer (re_string_t *pstr) internal_function; -static void re_string_translate_buffer (re_string_t *pstr) internal_function; -static unsigned int re_string_context_at (const re_string_t *input, Idx idx, - int eflags) - internal_function __attribute ((pure)); -#define re_string_peek_byte(pstr, offset) \ - ((pstr)->mbs[(pstr)->cur_idx + offset]) -#define re_string_fetch_byte(pstr) \ - ((pstr)->mbs[(pstr)->cur_idx++]) -#define re_string_first_byte(pstr, idx) \ - ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) -#define re_string_is_single_byte_char(pstr, idx) \ - ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ - || (pstr)->wcs[(idx) + 1] != WEOF)) -#define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) -#define re_string_cur_idx(pstr) ((pstr)->cur_idx) -#define re_string_get_buffer(pstr) ((pstr)->mbs) -#define re_string_length(pstr) ((pstr)->len) -#define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) -#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) -#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) - -#include - -#ifndef _LIBC -# if HAVE_ALLOCA -/* The OS usually guarantees only one guard page at the bottom of the stack, - 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. */ -# define __libc_use_alloca(n) ((n) < 4032) -# else -/* alloca is implemented with malloc, so just use malloc. */ -# define __libc_use_alloca(n) 0 -# undef alloca -# define alloca(n) malloc (n) -# endif -#endif - -#ifndef MAX -# define MAX(a,b) ((a) < (b) ? (b) : (a)) -#endif - -#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) -#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) -#define re_free(p) free (p) - -struct bin_tree_t -{ - struct bin_tree_t *parent; - struct bin_tree_t *left; - struct bin_tree_t *right; - struct bin_tree_t *first; - struct bin_tree_t *next; - - re_token_t token; - - /* `node_idx' is the index in dfa->nodes, if `type' == 0. - Otherwise `type' indicate the type of this node. */ - Idx node_idx; -}; -typedef struct bin_tree_t bin_tree_t; - -#define BIN_TREE_STORAGE_SIZE \ - ((1024 - sizeof (void *)) / sizeof (bin_tree_t)) - -struct bin_tree_storage_t -{ - struct bin_tree_storage_t *next; - bin_tree_t data[BIN_TREE_STORAGE_SIZE]; -}; -typedef struct bin_tree_storage_t bin_tree_storage_t; - -#define CONTEXT_WORD 1 -#define CONTEXT_NEWLINE (CONTEXT_WORD << 1) -#define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) -#define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) - -#define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) -#define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) -#define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) -#define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) -#define IS_ORDINARY_CONTEXT(c) ((c) == 0) - -#define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') -#define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) -#define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') -#define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) - -#define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ - ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ - || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ - || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ - || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) - -#define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ - ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ - || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ - || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ - || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) - -struct re_dfastate_t -{ - re_hashval_t hash; - re_node_set nodes; - re_node_set non_eps_nodes; - re_node_set inveclosure; - re_node_set *entrance_nodes; - struct re_dfastate_t **trtable, **word_trtable; - unsigned int context : 4; - unsigned int halt : 1; - /* If this state can accept `multi byte'. - Note that we refer to multibyte characters, and multi character - collating elements as `multi byte'. */ - unsigned int accept_mb : 1; - /* If this state has backreference node(s). */ - unsigned int has_backref : 1; - unsigned int has_constraint : 1; -}; -typedef struct re_dfastate_t re_dfastate_t; - -struct re_state_table_entry -{ - Idx num; - Idx alloc; - re_dfastate_t **array; -}; - -/* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ - -typedef struct -{ - Idx next_idx; - Idx alloc; - re_dfastate_t **array; -} state_array_t; - -/* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ - -typedef struct -{ - Idx node; - Idx str_idx; /* The position NODE match at. */ - state_array_t path; -} re_sub_match_last_t; - -/* Store information about the node NODE whose type is OP_OPEN_SUBEXP. - And information about the node, whose type is OP_CLOSE_SUBEXP, - corresponding to NODE is stored in LASTS. */ - -typedef struct -{ - Idx str_idx; - Idx node; - state_array_t *path; - Idx alasts; /* Allocation size of LASTS. */ - Idx nlasts; /* The number of LASTS. */ - re_sub_match_last_t **lasts; -} re_sub_match_top_t; - -struct re_backref_cache_entry -{ - Idx node; - Idx str_idx; - Idx subexp_from; - Idx subexp_to; - char more; - char unused; - unsigned short int eps_reachable_subexps_map; -}; - -typedef struct -{ - /* The string object corresponding to the input string. */ - re_string_t input; -#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) - const re_dfa_t *const dfa; -#else - const re_dfa_t *dfa; -#endif - /* EFLAGS of the argument of regexec. */ - int eflags; - /* Where the matching ends. */ - Idx match_last; - Idx last_node; - /* The state log used by the matcher. */ - re_dfastate_t **state_log; - Idx state_log_top; - /* Back reference cache. */ - Idx nbkref_ents; - Idx abkref_ents; - struct re_backref_cache_entry *bkref_ents; - int max_mb_elem_len; - Idx nsub_tops; - Idx asub_tops; - re_sub_match_top_t **sub_tops; -} re_match_context_t; - -typedef struct -{ - re_dfastate_t **sifted_states; - re_dfastate_t **limited_states; - Idx last_node; - Idx last_str_idx; - re_node_set limits; -} re_sift_context_t; - -struct re_fail_stack_ent_t -{ - Idx idx; - Idx node; - regmatch_t *regs; - re_node_set eps_via_nodes; -}; - -struct re_fail_stack_t -{ - Idx num; - Idx alloc; - struct re_fail_stack_ent_t *stack; -}; - -struct re_dfa_t -{ - re_token_t *nodes; - size_t nodes_alloc; - size_t nodes_len; - Idx *nexts; - Idx *org_indices; - re_node_set *edests; - re_node_set *eclosures; - re_node_set *inveclosures; - struct re_state_table_entry *state_table; - re_dfastate_t *init_state; - re_dfastate_t *init_state_word; - re_dfastate_t *init_state_nl; - re_dfastate_t *init_state_begbuf; - bin_tree_t *str_tree; - bin_tree_storage_t *str_tree_storage; - re_bitset_ptr_t sb_char; - int str_tree_storage_idx; - - /* number of subexpressions `re_nsub' is in regex_t. */ - re_hashval_t state_hash_mask; - Idx init_node; - Idx nbackref; /* The number of backreference in this dfa. */ - - /* Bitmap expressing which backreference is used. */ - bitset_word_t used_bkref_map; - bitset_word_t completed_bkref_map; - - unsigned int has_plural_match : 1; - /* If this dfa has "multibyte node", which is a backreference or - a node which can accept multibyte character or multi character - collating element. */ - unsigned int has_mb_node : 1; - unsigned int is_utf8 : 1; - unsigned int map_notascii : 1; - unsigned int word_ops_used : 1; - int mb_cur_max; - bitset_t word_char; - reg_syntax_t syntax; - Idx *subexp_map; -#ifdef DEBUG - char* re_str; -#endif -#ifdef _LIBC - __libc_lock_define (, lock) -#endif -}; - -#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) -#define re_node_set_remove(set,id) \ - (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) -#define re_node_set_empty(p) ((p)->nelem = 0) -#define re_node_set_free(set) re_free ((set)->elems) - - -typedef enum -{ - SB_CHAR, - MB_CHAR, - EQUIV_CLASS, - COLL_SYM, - CHAR_CLASS -} bracket_elem_type; - -typedef struct -{ - bracket_elem_type type; - union - { - unsigned char ch; - unsigned char *name; - wchar_t wch; - } opr; -} bracket_elem_t; - - -/* Inline functions for bitset_t operation. */ - -static inline void -bitset_set (bitset_t set, Idx i) -{ - set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS; -} - -static inline void -bitset_clear (bitset_t set, Idx i) -{ - set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS); -} - -static inline bool -bitset_contain (const bitset_t set, Idx i) -{ - return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1; -} - -static inline void -bitset_empty (bitset_t set) -{ - memset (set, '\0', sizeof (bitset_t)); -} - -static inline void -bitset_set_all (bitset_t set) -{ - memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS)); - if (SBC_MAX % BITSET_WORD_BITS != 0) - set[BITSET_WORDS - 1] = - ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; -} - -static inline void -bitset_copy (bitset_t dest, const bitset_t src) -{ - memcpy (dest, src, sizeof (bitset_t)); -} - -static inline void -bitset_not (bitset_t set) -{ - int bitset_i; - for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) - set[bitset_i] = ~set[bitset_i]; - if (SBC_MAX % BITSET_WORD_BITS != 0) - set[BITSET_WORDS - 1] = - ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1) - & ~set[BITSET_WORDS - 1]); -} - -static inline void -bitset_merge (bitset_t dest, const bitset_t src) -{ - int bitset_i; - for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) - dest[bitset_i] |= src[bitset_i]; -} - -static inline void -bitset_mask (bitset_t dest, const bitset_t src) -{ - int bitset_i; - for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) - dest[bitset_i] &= src[bitset_i]; -} - -#ifdef RE_ENABLE_I18N -/* Inline functions for re_string. */ -static inline int -internal_function __attribute ((pure)) -re_string_char_size_at (const re_string_t *pstr, Idx idx) -{ - int byte_idx; - if (pstr->mb_cur_max == 1) - return 1; - for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) - if (pstr->wcs[idx + byte_idx] != WEOF) - break; - return byte_idx; -} - -static inline wint_t -internal_function __attribute ((pure)) -re_string_wchar_at (const re_string_t *pstr, Idx idx) -{ - if (pstr->mb_cur_max == 1) - return (wint_t) pstr->mbs[idx]; - return (wint_t) pstr->wcs[idx]; -} - -static int -internal_function __attribute ((pure)) -re_string_elem_size_at (const re_string_t *pstr, Idx idx) -{ -# ifdef _LIBC - const unsigned char *p, *extra; - const int32_t *table, *indirect; - int32_t tmp; -# include - uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - - if (nrules != 0) - { - table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); - indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_INDIRECTMB); - p = pstr->mbs + idx; - tmp = findidx (&p); - return p - pstr->mbs - idx; - } - else -# endif /* _LIBC */ - return 1; -} -#endif /* RE_ENABLE_I18N */ - -#ifndef __GNUC_PREREQ -# if defined __GNUC__ && defined __GNUC_MINOR__ -# define __GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -# else -# define __GNUC_PREREQ(maj, min) 0 -# endif -#endif - -#if __GNUC_PREREQ (3,4) -# undef __attribute_warn_unused_result__ -# define __attribute_warn_unused_result__ \ - __attribute__ ((__warn_unused_result__)) -#else -# define __attribute_warn_unused_result__ /* empty */ -#endif - -#endif /* _REGEX_INTERNAL_H */ diff --git a/gnulib/lib/regexec.c b/gnulib/lib/regexec.c deleted file mode 100644 index a704c1b..0000000 --- a/gnulib/lib/regexec.c +++ /dev/null @@ -1,4417 +0,0 @@ -/* Extended regular expression matching and search library. - Copyright (C) 2002-2011 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, - Idx n) internal_function; -static void match_ctx_clean (re_match_context_t *mctx) internal_function; -static void match_ctx_free (re_match_context_t *cache) internal_function; -static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node, - Idx str_idx, Idx from, Idx to) - internal_function; -static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) - internal_function; -static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node, - Idx str_idx) internal_function; -static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, - Idx node, Idx str_idx) - internal_function; -static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, - re_dfastate_t **limited_sts, Idx last_node, - Idx last_str_idx) - internal_function; -static reg_errcode_t re_search_internal (const regex_t *preg, - const char *string, Idx length, - Idx start, Idx last_start, Idx stop, - size_t nmatch, regmatch_t pmatch[], - int eflags) internal_function; -static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp, - const char *string1, Idx length1, - const char *string2, Idx length2, - Idx start, regoff_t range, - struct re_registers *regs, - Idx stop, bool ret_len) internal_function; -static regoff_t re_search_stub (struct re_pattern_buffer *bufp, - const char *string, Idx length, Idx start, - regoff_t range, Idx stop, - struct re_registers *regs, - bool ret_len) internal_function; -static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, - Idx nregs, int regs_allocated) - internal_function; -static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) - internal_function; -static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, - Idx *p_match_first) internal_function; -static Idx check_halt_state_context (const re_match_context_t *mctx, - const re_dfastate_t *state, Idx idx) - internal_function; -static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, - regmatch_t *prev_idx_match, Idx cur_node, - Idx cur_idx, Idx nmatch) internal_function; -static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, - Idx str_idx, Idx dest_node, Idx nregs, - regmatch_t *regs, - re_node_set *eps_via_nodes) - internal_function; -static reg_errcode_t set_regs (const regex_t *preg, - const re_match_context_t *mctx, - size_t nmatch, regmatch_t *pmatch, - bool fl_backtrack) internal_function; -static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) - internal_function; - -#ifdef RE_ENABLE_I18N -static int sift_states_iter_mb (const re_match_context_t *mctx, - re_sift_context_t *sctx, - Idx node_idx, Idx str_idx, Idx max_str_idx) - internal_function; -#endif /* RE_ENABLE_I18N */ -static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, - re_sift_context_t *sctx) - internal_function; -static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, - re_sift_context_t *sctx, Idx str_idx, - re_node_set *cur_dest) - internal_function; -static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, - re_sift_context_t *sctx, - Idx str_idx, - re_node_set *dest_nodes) - internal_function; -static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, - re_node_set *dest_nodes, - const re_node_set *candidates) - internal_function; -static bool check_dst_limits (const re_match_context_t *mctx, - const re_node_set *limits, - Idx dst_node, Idx dst_idx, Idx src_node, - Idx src_idx) internal_function; -static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, - int boundaries, Idx subexp_idx, - Idx from_node, Idx bkref_idx) - internal_function; -static int check_dst_limits_calc_pos (const re_match_context_t *mctx, - Idx limit, Idx subexp_idx, - Idx node, Idx str_idx, - Idx bkref_idx) internal_function; -static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, - re_node_set *dest_nodes, - const re_node_set *candidates, - re_node_set *limits, - struct re_backref_cache_entry *bkref_ents, - Idx str_idx) internal_function; -static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, - re_sift_context_t *sctx, - Idx str_idx, const re_node_set *candidates) - internal_function; -static reg_errcode_t merge_state_array (const re_dfa_t *dfa, - re_dfastate_t **dst, - re_dfastate_t **src, Idx num) - internal_function; -static re_dfastate_t *find_recover_state (reg_errcode_t *err, - re_match_context_t *mctx) internal_function; -static re_dfastate_t *transit_state (reg_errcode_t *err, - re_match_context_t *mctx, - re_dfastate_t *state) internal_function; -static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, - re_match_context_t *mctx, - re_dfastate_t *next_state) - internal_function; -static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, - re_node_set *cur_nodes, - Idx str_idx) internal_function; -#if 0 -static re_dfastate_t *transit_state_sb (reg_errcode_t *err, - re_match_context_t *mctx, - re_dfastate_t *pstate) - internal_function; -#endif -#ifdef RE_ENABLE_I18N -static reg_errcode_t transit_state_mb (re_match_context_t *mctx, - re_dfastate_t *pstate) - internal_function; -#endif /* RE_ENABLE_I18N */ -static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, - const re_node_set *nodes) - internal_function; -static reg_errcode_t get_subexp (re_match_context_t *mctx, - Idx bkref_node, Idx bkref_str_idx) - internal_function; -static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, - const re_sub_match_top_t *sub_top, - re_sub_match_last_t *sub_last, - Idx bkref_node, Idx bkref_str) - internal_function; -static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, - Idx subexp_idx, int type) internal_function; -static reg_errcode_t check_arrival (re_match_context_t *mctx, - state_array_t *path, Idx top_node, - Idx top_str, Idx last_node, Idx last_str, - int type) internal_function; -static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, - Idx str_idx, - re_node_set *cur_nodes, - re_node_set *next_nodes) - internal_function; -static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, - re_node_set *cur_nodes, - Idx ex_subexp, int type) - internal_function; -static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, - re_node_set *dst_nodes, - Idx target, Idx ex_subexp, - int type) internal_function; -static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, - re_node_set *cur_nodes, Idx cur_str, - Idx subexp_num, int type) - internal_function; -static bool build_trtable (const re_dfa_t *dfa, - re_dfastate_t *state) internal_function; -#ifdef RE_ENABLE_I18N -static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, - const re_string_t *input, Idx idx) - internal_function; -# ifdef _LIBC -static unsigned int find_collation_sequence_value (const unsigned char *mbs, - size_t name_len) - internal_function; -# endif /* _LIBC */ -#endif /* RE_ENABLE_I18N */ -static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, - const re_dfastate_t *state, - re_node_set *states_node, - bitset_t *states_ch) internal_function; -static bool check_node_accept (const re_match_context_t *mctx, - const re_token_t *node, Idx idx) - internal_function; -static reg_errcode_t extend_buffers (re_match_context_t *mctx) - internal_function; - -/* Entry point for POSIX code. */ - -/* regexec searches for a given pattern, specified by PREG, in the - string STRING. - - If NMATCH is zero or REG_NOSUB was set in the cflags argument to - `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at - least NMATCH elements, and we set them to the offsets of the - corresponding matched substrings. - - EFLAGS specifies `execution flags' which affect matching: if - REG_NOTBOL is set, then ^ does not match at the beginning of the - string; if REG_NOTEOL is set, then $ does not match at the end. - - We return 0 if we find a match and REG_NOMATCH if not. */ - -int -regexec (preg, string, nmatch, pmatch, eflags) - const regex_t *_Restrict_ preg; - const char *_Restrict_ string; - size_t nmatch; - regmatch_t pmatch[_Restrict_arr_]; - int eflags; -{ - reg_errcode_t err; - Idx start, length; -#ifdef _LIBC - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; -#endif - - if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) - return REG_BADPAT; - - if (eflags & REG_STARTEND) - { - start = pmatch[0].rm_so; - length = pmatch[0].rm_eo; - } - else - { - start = 0; - length = strlen (string); - } - - __libc_lock_lock (dfa->lock); - if (preg->no_sub) - err = re_search_internal (preg, string, length, start, length, - length, 0, NULL, eflags); - else - err = re_search_internal (preg, string, length, start, length, - length, nmatch, pmatch, eflags); - __libc_lock_unlock (dfa->lock); - return err != REG_NOERROR; -} - -#ifdef _LIBC -# include -versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); - -# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) -__typeof__ (__regexec) __compat_regexec; - -int -attribute_compat_text_section -__compat_regexec (const regex_t *_Restrict_ preg, - const char *_Restrict_ string, size_t nmatch, - regmatch_t pmatch[], int eflags) -{ - return regexec (preg, string, nmatch, pmatch, - eflags & (REG_NOTBOL | REG_NOTEOL)); -} -compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); -# endif -#endif - -/* Entry points for GNU code. */ - -/* re_match, re_search, re_match_2, re_search_2 - - The former two functions operate on STRING with length LENGTH, - while the later two operate on concatenation of STRING1 and STRING2 - with lengths LENGTH1 and LENGTH2, respectively. - - re_match() matches the compiled pattern in BUFP against the string, - starting at index START. - - re_search() first tries matching at index START, then it tries to match - starting from index START + 1, and so on. The last start position tried - is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same - way as re_match().) - - The parameter STOP of re_{match,search}_2 specifies that no match exceeding - the first STOP characters of the concatenation of the strings should be - concerned. - - If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match - and all groups is stored in REGS. (For the "_2" variants, the offsets are - computed relative to the concatenation, not relative to the individual - strings.) - - On success, re_match* functions return the length of the match, re_search* - return the position of the start of the match. Return value -1 means no - match was found and -2 indicates an internal error. */ - -regoff_t -re_match (bufp, string, length, start, regs) - struct re_pattern_buffer *bufp; - const char *string; - Idx length, start; - struct re_registers *regs; -{ - return re_search_stub (bufp, string, length, start, 0, length, regs, true); -} -#ifdef _LIBC -weak_alias (__re_match, re_match) -#endif - -regoff_t -re_search (bufp, string, length, start, range, regs) - struct re_pattern_buffer *bufp; - const char *string; - Idx length, start; - regoff_t range; - struct re_registers *regs; -{ - return re_search_stub (bufp, string, length, start, range, length, regs, - false); -} -#ifdef _LIBC -weak_alias (__re_search, re_search) -#endif - -regoff_t -re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) - struct re_pattern_buffer *bufp; - const char *string1, *string2; - Idx length1, length2, start, stop; - struct re_registers *regs; -{ - return re_search_2_stub (bufp, string1, length1, string2, length2, - start, 0, regs, stop, true); -} -#ifdef _LIBC -weak_alias (__re_match_2, re_match_2) -#endif - -regoff_t -re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) - struct re_pattern_buffer *bufp; - const char *string1, *string2; - Idx length1, length2, start, stop; - regoff_t range; - struct re_registers *regs; -{ - return re_search_2_stub (bufp, string1, length1, string2, length2, - start, range, regs, stop, false); -} -#ifdef _LIBC -weak_alias (__re_search_2, re_search_2) -#endif - -static regoff_t -internal_function -re_search_2_stub (struct re_pattern_buffer *bufp, - const char *string1, Idx length1, - const char *string2, Idx length2, - Idx start, regoff_t range, struct re_registers *regs, - Idx stop, bool ret_len) -{ - const char *str; - regoff_t rval; - Idx len = length1 + length2; - char *s = NULL; - - if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) - return -2; - - /* Concatenate the strings. */ - if (length2 > 0) - if (length1 > 0) - { - s = re_malloc (char, len); - - if (BE (s == NULL, 0)) - return -2; -#ifdef _LIBC - memcpy (__mempcpy (s, string1, length1), string2, length2); -#else - memcpy (s, string1, length1); - memcpy (s + length1, string2, length2); -#endif - str = s; - } - else - str = string2; - else - str = string1; - - rval = re_search_stub (bufp, str, len, start, range, stop, regs, - ret_len); - re_free (s); - return rval; -} - -/* The parameters have the same meaning as those of re_search. - Additional parameters: - If RET_LEN is true the length of the match is returned (re_match style); - otherwise the position of the match is returned. */ - -static regoff_t -internal_function -re_search_stub (struct re_pattern_buffer *bufp, - const char *string, Idx length, - Idx start, regoff_t range, Idx stop, struct re_registers *regs, - bool ret_len) -{ - reg_errcode_t result; - regmatch_t *pmatch; - Idx nregs; - regoff_t rval; - int eflags = 0; -#ifdef _LIBC - re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; -#endif - Idx last_start = start + range; - - /* Check for out-of-range. */ - if (BE (start < 0 || start > length, 0)) - return -1; - if (BE (length < last_start || (0 <= range && last_start < start), 0)) - last_start = length; - else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0)) - last_start = 0; - - __libc_lock_lock (dfa->lock); - - eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; - eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; - - /* Compile fastmap if we haven't yet. */ - if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate) - re_compile_fastmap (bufp); - - if (BE (bufp->no_sub, 0)) - regs = NULL; - - /* We need at least 1 register. */ - if (regs == NULL) - nregs = 1; - else if (BE (bufp->regs_allocated == REGS_FIXED - && regs->num_regs <= bufp->re_nsub, 0)) - { - nregs = regs->num_regs; - if (BE (nregs < 1, 0)) - { - /* Nothing can be copied to regs. */ - regs = NULL; - nregs = 1; - } - } - else - nregs = bufp->re_nsub + 1; - pmatch = re_malloc (regmatch_t, nregs); - if (BE (pmatch == NULL, 0)) - { - rval = -2; - goto out; - } - - result = re_search_internal (bufp, string, length, start, last_start, stop, - nregs, pmatch, eflags); - - rval = 0; - - /* I hope we needn't fill ther regs with -1's when no match was found. */ - if (result != REG_NOERROR) - rval = -1; - else if (regs != NULL) - { - /* If caller wants register contents data back, copy them. */ - bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, - bufp->regs_allocated); - if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) - rval = -2; - } - - if (BE (rval == 0, 1)) - { - if (ret_len) - { - assert (pmatch[0].rm_so == start); - rval = pmatch[0].rm_eo - start; - } - else - rval = pmatch[0].rm_so; - } - re_free (pmatch); - out: - __libc_lock_unlock (dfa->lock); - return rval; -} - -static unsigned int -internal_function -re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, - int regs_allocated) -{ - int rval = REGS_REALLOCATE; - Idx i; - Idx need_regs = nregs + 1; - /* We need one extra element beyond `num_regs' for the `-1' marker GNU code - uses. */ - - /* Have the register data arrays been allocated? */ - if (regs_allocated == REGS_UNALLOCATED) - { /* No. So allocate them with malloc. */ - regs->start = re_malloc (regoff_t, need_regs); - if (BE (regs->start == NULL, 0)) - return REGS_UNALLOCATED; - regs->end = re_malloc (regoff_t, need_regs); - if (BE (regs->end == NULL, 0)) - { - re_free (regs->start); - return REGS_UNALLOCATED; - } - regs->num_regs = need_regs; - } - else if (regs_allocated == REGS_REALLOCATE) - { /* Yes. If we need more elements than were already - allocated, reallocate them. If we need fewer, just - leave it alone. */ - if (BE (need_regs > regs->num_regs, 0)) - { - regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); - regoff_t *new_end; - if (BE (new_start == NULL, 0)) - return REGS_UNALLOCATED; - new_end = re_realloc (regs->end, regoff_t, need_regs); - if (BE (new_end == NULL, 0)) - { - re_free (new_start); - return REGS_UNALLOCATED; - } - regs->start = new_start; - regs->end = new_end; - regs->num_regs = need_regs; - } - } - else - { - assert (regs_allocated == REGS_FIXED); - /* This function may not be called with REGS_FIXED and nregs too big. */ - assert (regs->num_regs >= nregs); - rval = REGS_FIXED; - } - - /* Copy the regs. */ - for (i = 0; i < nregs; ++i) - { - regs->start[i] = pmatch[i].rm_so; - regs->end[i] = pmatch[i].rm_eo; - } - for ( ; i < regs->num_regs; ++i) - regs->start[i] = regs->end[i] = -1; - - return rval; -} - -/* Set REGS to hold NUM_REGS registers, storing them in STARTS and - ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use - this memory for recording register information. STARTS and ENDS - must be allocated using the malloc library routine, and must each - be at least NUM_REGS * sizeof (regoff_t) bytes long. - - If NUM_REGS == 0, then subsequent matches should allocate their own - register data. - - Unless this function is called, the first search or match using - PATTERN_BUFFER will allocate its own register data, without - freeing the old data. */ - -void -re_set_registers (bufp, regs, num_regs, starts, ends) - struct re_pattern_buffer *bufp; - struct re_registers *regs; - __re_size_t num_regs; - regoff_t *starts, *ends; -{ - if (num_regs) - { - bufp->regs_allocated = REGS_REALLOCATE; - regs->num_regs = num_regs; - regs->start = starts; - regs->end = ends; - } - else - { - bufp->regs_allocated = REGS_UNALLOCATED; - regs->num_regs = 0; - regs->start = regs->end = NULL; - } -} -#ifdef _LIBC -weak_alias (__re_set_registers, re_set_registers) -#endif - -/* Entry points compatible with 4.2 BSD regex library. We don't define - them unless specifically requested. */ - -#if defined _REGEX_RE_COMP || defined _LIBC -int -# ifdef _LIBC -weak_function -# endif -re_exec (s) - const char *s; -{ - return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); -} -#endif /* _REGEX_RE_COMP */ - -/* Internal entry point. */ - -/* Searches for a compiled pattern PREG in the string STRING, whose - length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same - meaning as with regexec. LAST_START is START + RANGE, where - START and RANGE have the same meaning as with re_search. - Return REG_NOERROR if we find a match, and REG_NOMATCH if not, - otherwise return the error code. - Note: We assume front end functions already check ranges. - (0 <= LAST_START && LAST_START <= LENGTH) */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_search_internal (const regex_t *preg, - const char *string, Idx length, - Idx start, Idx last_start, Idx stop, - size_t nmatch, regmatch_t pmatch[], - int eflags) -{ - reg_errcode_t err; - const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; - Idx left_lim, right_lim; - int incr; - bool fl_longest_match; - int match_kind; - Idx match_first; - Idx match_last = REG_MISSING; - Idx extra_nmatch; - bool sb; - int ch; -#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) - re_match_context_t mctx = { .dfa = dfa }; -#else - re_match_context_t mctx; -#endif - char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate - && start != last_start && !preg->can_be_null) - ? preg->fastmap : NULL); - RE_TRANSLATE_TYPE t = preg->translate; - -#if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - memset (&mctx, '\0', sizeof (re_match_context_t)); - mctx.dfa = dfa; -#endif - - extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; - nmatch -= extra_nmatch; - - /* Check if the DFA haven't been compiled. */ - if (BE (preg->used == 0 || dfa->init_state == NULL - || dfa->init_state_word == NULL || dfa->init_state_nl == NULL - || dfa->init_state_begbuf == NULL, 0)) - return REG_NOMATCH; - -#ifdef DEBUG - /* We assume front-end functions already check them. */ - assert (0 <= last_start && last_start <= length); -#endif - - /* If initial states with non-begbuf contexts have no elements, - the regex must be anchored. If preg->newline_anchor is set, - we'll never use init_state_nl, so do not check it. */ - if (dfa->init_state->nodes.nelem == 0 - && dfa->init_state_word->nodes.nelem == 0 - && (dfa->init_state_nl->nodes.nelem == 0 - || !preg->newline_anchor)) - { - if (start != 0 && last_start != 0) - return REG_NOMATCH; - start = last_start = 0; - } - - /* We must check the longest matching, if nmatch > 0. */ - fl_longest_match = (nmatch != 0 || dfa->nbackref); - - err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, - preg->translate, (preg->syntax & RE_ICASE) != 0, - dfa); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - mctx.input.stop = stop; - mctx.input.raw_stop = stop; - mctx.input.newline_anchor = preg->newline_anchor; - - err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - - /* We will log all the DFA states through which the dfa pass, - if nmatch > 1, or this dfa has "multibyte node", which is a - back-reference or a node which can accept multibyte character or - multi character collating element. */ - if (nmatch > 1 || dfa->has_mb_node) - { - /* Avoid overflow. */ - if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0)) - { - err = REG_ESPACE; - goto free_return; - } - - mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); - if (BE (mctx.state_log == NULL, 0)) - { - err = REG_ESPACE; - goto free_return; - } - } - else - mctx.state_log = NULL; - - match_first = start; - mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF - : CONTEXT_NEWLINE | CONTEXT_BEGBUF; - - /* Check incrementally whether of not the input string match. */ - incr = (last_start < start) ? -1 : 1; - left_lim = (last_start < start) ? last_start : start; - right_lim = (last_start < start) ? start : last_start; - sb = dfa->mb_cur_max == 1; - match_kind = - (fastmap - ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) - | (start <= last_start ? 2 : 0) - | (t != NULL ? 1 : 0)) - : 8); - - for (;; match_first += incr) - { - err = REG_NOMATCH; - if (match_first < left_lim || right_lim < match_first) - goto free_return; - - /* Advance as rapidly as possible through the string, until we - find a plausible place to start matching. This may be done - with varying efficiency, so there are various possibilities: - only the most common of them are specialized, in order to - save on code size. We use a switch statement for speed. */ - switch (match_kind) - { - case 8: - /* No fastmap. */ - break; - - case 7: - /* Fastmap with single-byte translation, match forward. */ - while (BE (match_first < right_lim, 1) - && !fastmap[t[(unsigned char) string[match_first]]]) - ++match_first; - goto forward_match_found_start_or_reached_end; - - case 6: - /* Fastmap without translation, match forward. */ - while (BE (match_first < right_lim, 1) - && !fastmap[(unsigned char) string[match_first]]) - ++match_first; - - forward_match_found_start_or_reached_end: - if (BE (match_first == right_lim, 0)) - { - ch = match_first >= length - ? 0 : (unsigned char) string[match_first]; - if (!fastmap[t ? t[ch] : ch]) - goto free_return; - } - break; - - case 4: - case 5: - /* Fastmap without multi-byte translation, match backwards. */ - while (match_first >= left_lim) - { - ch = match_first >= length - ? 0 : (unsigned char) string[match_first]; - if (fastmap[t ? t[ch] : ch]) - break; - --match_first; - } - if (match_first < left_lim) - goto free_return; - break; - - default: - /* In this case, we can't determine easily the current byte, - since it might be a component byte of a multibyte - character. Then we use the constructed buffer instead. */ - for (;;) - { - /* If MATCH_FIRST is out of the valid range, reconstruct the - buffers. */ - __re_size_t offset = match_first - mctx.input.raw_mbs_idx; - if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0)) - { - err = re_string_reconstruct (&mctx.input, match_first, - eflags); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - - offset = match_first - mctx.input.raw_mbs_idx; - } - /* If MATCH_FIRST is out of the buffer, leave it as '\0'. - Note that MATCH_FIRST must not be smaller than 0. */ - ch = (match_first >= length - ? 0 : re_string_byte_at (&mctx.input, offset)); - if (fastmap[ch]) - break; - match_first += incr; - if (match_first < left_lim || match_first > right_lim) - { - err = REG_NOMATCH; - goto free_return; - } - } - break; - } - - /* Reconstruct the buffers so that the matcher can assume that - the matching starts from the beginning of the buffer. */ - err = re_string_reconstruct (&mctx.input, match_first, eflags); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - -#ifdef RE_ENABLE_I18N - /* Don't consider this char as a possible match start if it part, - yet isn't the head, of a multibyte character. */ - if (!sb && !re_string_first_byte (&mctx.input, 0)) - continue; -#endif - - /* It seems to be appropriate one, then use the matcher. */ - /* We assume that the matching starts from 0. */ - mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; - match_last = check_matching (&mctx, fl_longest_match, - start <= last_start ? &match_first : NULL); - if (match_last != REG_MISSING) - { - if (BE (match_last == REG_ERROR, 0)) - { - err = REG_ESPACE; - goto free_return; - } - else - { - mctx.match_last = match_last; - if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) - { - re_dfastate_t *pstate = mctx.state_log[match_last]; - mctx.last_node = check_halt_state_context (&mctx, pstate, - match_last); - } - if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) - || dfa->nbackref) - { - err = prune_impossible_nodes (&mctx); - if (err == REG_NOERROR) - break; - if (BE (err != REG_NOMATCH, 0)) - goto free_return; - match_last = REG_MISSING; - } - else - break; /* We found a match. */ - } - } - - match_ctx_clean (&mctx); - } - -#ifdef DEBUG - assert (match_last != REG_MISSING); - assert (err == REG_NOERROR); -#endif - - /* Set pmatch[] if we need. */ - if (nmatch > 0) - { - Idx reg_idx; - - /* Initialize registers. */ - for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) - pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; - - /* Set the points where matching start/end. */ - pmatch[0].rm_so = 0; - pmatch[0].rm_eo = mctx.match_last; - /* FIXME: This function should fail if mctx.match_last exceeds - the maximum possible regoff_t value. We need a new error - code REG_OVERFLOW. */ - - if (!preg->no_sub && nmatch > 1) - { - err = set_regs (preg, &mctx, nmatch, pmatch, - dfa->has_plural_match && dfa->nbackref > 0); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - - /* At last, add the offset to the each registers, since we slided - the buffers so that we could assume that the matching starts - from 0. */ - for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) - if (pmatch[reg_idx].rm_so != -1) - { -#ifdef RE_ENABLE_I18N - if (BE (mctx.input.offsets_needed != 0, 0)) - { - pmatch[reg_idx].rm_so = - (pmatch[reg_idx].rm_so == mctx.input.valid_len - ? mctx.input.valid_raw_len - : mctx.input.offsets[pmatch[reg_idx].rm_so]); - pmatch[reg_idx].rm_eo = - (pmatch[reg_idx].rm_eo == mctx.input.valid_len - ? mctx.input.valid_raw_len - : mctx.input.offsets[pmatch[reg_idx].rm_eo]); - } -#else - assert (mctx.input.offsets_needed == 0); -#endif - pmatch[reg_idx].rm_so += match_first; - pmatch[reg_idx].rm_eo += match_first; - } - for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) - { - pmatch[nmatch + reg_idx].rm_so = -1; - pmatch[nmatch + reg_idx].rm_eo = -1; - } - - if (dfa->subexp_map) - for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) - if (dfa->subexp_map[reg_idx] != reg_idx) - { - pmatch[reg_idx + 1].rm_so - = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; - pmatch[reg_idx + 1].rm_eo - = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; - } - } - - free_return: - re_free (mctx.state_log); - if (dfa->nbackref) - match_ctx_free (&mctx); - re_string_destruct (&mctx.input); - return err; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -prune_impossible_nodes (re_match_context_t *mctx) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx halt_node, match_last; - reg_errcode_t ret; - re_dfastate_t **sifted_states; - re_dfastate_t **lim_states = NULL; - re_sift_context_t sctx; -#ifdef DEBUG - assert (mctx->state_log != NULL); -#endif - match_last = mctx->match_last; - halt_node = mctx->last_node; - - /* Avoid overflow. */ - if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0)) - return REG_ESPACE; - - sifted_states = re_malloc (re_dfastate_t *, match_last + 1); - if (BE (sifted_states == NULL, 0)) - { - ret = REG_ESPACE; - goto free_return; - } - if (dfa->nbackref) - { - lim_states = re_malloc (re_dfastate_t *, match_last + 1); - if (BE (lim_states == NULL, 0)) - { - ret = REG_ESPACE; - goto free_return; - } - while (1) - { - memset (lim_states, '\0', - sizeof (re_dfastate_t *) * (match_last + 1)); - sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, - match_last); - ret = sift_states_backward (mctx, &sctx); - re_node_set_free (&sctx.limits); - if (BE (ret != REG_NOERROR, 0)) - goto free_return; - if (sifted_states[0] != NULL || lim_states[0] != NULL) - break; - do - { - --match_last; - if (! REG_VALID_INDEX (match_last)) - { - ret = REG_NOMATCH; - goto free_return; - } - } while (mctx->state_log[match_last] == NULL - || !mctx->state_log[match_last]->halt); - halt_node = check_halt_state_context (mctx, - mctx->state_log[match_last], - match_last); - } - ret = merge_state_array (dfa, sifted_states, lim_states, - match_last + 1); - re_free (lim_states); - lim_states = NULL; - if (BE (ret != REG_NOERROR, 0)) - goto free_return; - } - else - { - sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); - ret = sift_states_backward (mctx, &sctx); - re_node_set_free (&sctx.limits); - if (BE (ret != REG_NOERROR, 0)) - goto free_return; - if (sifted_states[0] == NULL) - { - ret = REG_NOMATCH; - goto free_return; - } - } - re_free (mctx->state_log); - mctx->state_log = sifted_states; - sifted_states = NULL; - mctx->last_node = halt_node; - mctx->match_last = match_last; - ret = REG_NOERROR; - free_return: - re_free (sifted_states); - re_free (lim_states); - return ret; -} - -/* Acquire an initial state and return it. - We must select appropriate initial state depending on the context, - since initial states may have constraints like "\<", "^", etc.. */ - -static inline re_dfastate_t * -__attribute ((always_inline)) internal_function -acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, - Idx idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - if (dfa->init_state->has_constraint) - { - unsigned int context; - context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); - if (IS_WORD_CONTEXT (context)) - return dfa->init_state_word; - else if (IS_ORDINARY_CONTEXT (context)) - return dfa->init_state; - else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) - return dfa->init_state_begbuf; - else if (IS_NEWLINE_CONTEXT (context)) - return dfa->init_state_nl; - else if (IS_BEGBUF_CONTEXT (context)) - { - /* It is relatively rare case, then calculate on demand. */ - return re_acquire_state_context (err, dfa, - dfa->init_state->entrance_nodes, - context); - } - else - /* Must not happen? */ - return dfa->init_state; - } - else - return dfa->init_state; -} - -/* Check whether the regular expression match input string INPUT or not, - and return the index where the matching end. Return REG_MISSING if - there is no match, and return REG_ERROR in case of an error. - FL_LONGEST_MATCH means we want the POSIX longest matching. - If P_MATCH_FIRST is not NULL, and the match fails, it is set to the - next place where we may want to try matching. - Note that the matcher assume that the maching starts from the current - index of the buffer. */ - -static Idx -internal_function __attribute_warn_unused_result__ -check_matching (re_match_context_t *mctx, bool fl_longest_match, - Idx *p_match_first) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx match = 0; - Idx match_last = REG_MISSING; - Idx cur_str_idx = re_string_cur_idx (&mctx->input); - re_dfastate_t *cur_state; - bool at_init_state = p_match_first != NULL; - Idx next_start_idx = cur_str_idx; - - err = REG_NOERROR; - cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); - /* An initial state must not be NULL (invalid). */ - if (BE (cur_state == NULL, 0)) - { - assert (err == REG_ESPACE); - return REG_ERROR; - } - - if (mctx->state_log != NULL) - { - mctx->state_log[cur_str_idx] = cur_state; - - /* Check OP_OPEN_SUBEXP in the initial state in case that we use them - later. E.g. Processing back references. */ - if (BE (dfa->nbackref, 0)) - { - at_init_state = false; - err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); - if (BE (err != REG_NOERROR, 0)) - return err; - - if (cur_state->has_backref) - { - err = transit_state_bkref (mctx, &cur_state->nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - } - } - } - - /* If the RE accepts NULL string. */ - if (BE (cur_state->halt, 0)) - { - if (!cur_state->has_constraint - || check_halt_state_context (mctx, cur_state, cur_str_idx)) - { - if (!fl_longest_match) - return cur_str_idx; - else - { - match_last = cur_str_idx; - match = 1; - } - } - } - - while (!re_string_eoi (&mctx->input)) - { - re_dfastate_t *old_state = cur_state; - Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; - - if (BE (next_char_idx >= mctx->input.bufs_len, 0) - || (BE (next_char_idx >= mctx->input.valid_len, 0) - && mctx->input.valid_len < mctx->input.len)) - { - err = extend_buffers (mctx); - if (BE (err != REG_NOERROR, 0)) - { - assert (err == REG_ESPACE); - return REG_ERROR; - } - } - - cur_state = transit_state (&err, mctx, cur_state); - if (mctx->state_log != NULL) - cur_state = merge_state_with_log (&err, mctx, cur_state); - - if (cur_state == NULL) - { - /* Reached the invalid state or an error. Try to recover a valid - state using the state log, if available and if we have not - already found a valid (even if not the longest) match. */ - if (BE (err != REG_NOERROR, 0)) - return REG_ERROR; - - if (mctx->state_log == NULL - || (match && !fl_longest_match) - || (cur_state = find_recover_state (&err, mctx)) == NULL) - break; - } - - if (BE (at_init_state, 0)) - { - if (old_state == cur_state) - next_start_idx = next_char_idx; - else - at_init_state = false; - } - - if (cur_state->halt) - { - /* Reached a halt state. - Check the halt state can satisfy the current context. */ - if (!cur_state->has_constraint - || check_halt_state_context (mctx, cur_state, - re_string_cur_idx (&mctx->input))) - { - /* We found an appropriate halt state. */ - match_last = re_string_cur_idx (&mctx->input); - match = 1; - - /* We found a match, do not modify match_first below. */ - p_match_first = NULL; - if (!fl_longest_match) - break; - } - } - } - - if (p_match_first) - *p_match_first += next_start_idx; - - return match_last; -} - -/* Check NODE match the current context. */ - -static bool -internal_function -check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) -{ - re_token_type_t type = dfa->nodes[node].type; - unsigned int constraint = dfa->nodes[node].constraint; - if (type != END_OF_RE) - return false; - if (!constraint) - return true; - if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) - return false; - return true; -} - -/* Check the halt state STATE match the current context. - Return 0 if not match, if the node, STATE has, is a halt node and - match the context, return the node. */ - -static Idx -internal_function -check_halt_state_context (const re_match_context_t *mctx, - const re_dfastate_t *state, Idx idx) -{ - Idx i; - unsigned int context; -#ifdef DEBUG - assert (state->halt); -#endif - context = re_string_context_at (&mctx->input, idx, mctx->eflags); - for (i = 0; i < state->nodes.nelem; ++i) - if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) - return state->nodes.elems[i]; - return 0; -} - -/* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA - corresponding to the DFA). - Return the destination node, and update EPS_VIA_NODES; - return REG_MISSING in case of errors. */ - -static Idx -internal_function -proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, - Idx *pidx, Idx node, re_node_set *eps_via_nodes, - struct re_fail_stack_t *fs) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx i; - bool ok; - if (IS_EPSILON_NODE (dfa->nodes[node].type)) - { - re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; - re_node_set *edests = &dfa->edests[node]; - Idx dest_node; - ok = re_node_set_insert (eps_via_nodes, node); - if (BE (! ok, 0)) - return REG_ERROR; - /* Pick up a valid destination, or return REG_MISSING if none - is found. */ - for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i) - { - Idx candidate = edests->elems[i]; - if (!re_node_set_contains (cur_nodes, candidate)) - continue; - if (dest_node == REG_MISSING) - dest_node = candidate; - - else - { - /* In order to avoid infinite loop like "(a*)*", return the second - epsilon-transition if the first was already considered. */ - if (re_node_set_contains (eps_via_nodes, dest_node)) - return candidate; - - /* Otherwise, push the second epsilon-transition on the fail stack. */ - else if (fs != NULL - && push_fail_stack (fs, *pidx, candidate, nregs, regs, - eps_via_nodes)) - return REG_ERROR; - - /* We know we are going to exit. */ - break; - } - } - return dest_node; - } - else - { - Idx naccepted = 0; - re_token_type_t type = dfa->nodes[node].type; - -#ifdef RE_ENABLE_I18N - if (dfa->nodes[node].accept_mb) - naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); - else -#endif /* RE_ENABLE_I18N */ - if (type == OP_BACK_REF) - { - Idx subexp_idx = dfa->nodes[node].opr.idx + 1; - naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; - if (fs != NULL) - { - if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) - return REG_MISSING; - else if (naccepted) - { - char *buf = (char *) re_string_get_buffer (&mctx->input); - if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, - naccepted) != 0) - return REG_MISSING; - } - } - - if (naccepted == 0) - { - Idx dest_node; - ok = re_node_set_insert (eps_via_nodes, node); - if (BE (! ok, 0)) - return REG_ERROR; - dest_node = dfa->edests[node].elems[0]; - if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, - dest_node)) - return dest_node; - } - } - - if (naccepted != 0 - || check_node_accept (mctx, dfa->nodes + node, *pidx)) - { - Idx dest_node = dfa->nexts[node]; - *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; - if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL - || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, - dest_node))) - return REG_MISSING; - re_node_set_empty (eps_via_nodes); - return dest_node; - } - } - return REG_MISSING; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, - Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) -{ - reg_errcode_t err; - Idx num = fs->num++; - if (fs->num == fs->alloc) - { - struct re_fail_stack_ent_t *new_array; - new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) - * fs->alloc * 2)); - if (new_array == NULL) - return REG_ESPACE; - fs->alloc *= 2; - fs->stack = new_array; - } - fs->stack[num].idx = str_idx; - fs->stack[num].node = dest_node; - fs->stack[num].regs = re_malloc (regmatch_t, nregs); - if (fs->stack[num].regs == NULL) - return REG_ESPACE; - memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); - err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); - return err; -} - -static Idx -internal_function -pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, - regmatch_t *regs, re_node_set *eps_via_nodes) -{ - Idx num = --fs->num; - assert (REG_VALID_INDEX (num)); - *pidx = fs->stack[num].idx; - memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); - re_node_set_free (eps_via_nodes); - re_free (fs->stack[num].regs); - *eps_via_nodes = fs->stack[num].eps_via_nodes; - return fs->stack[num].node; -} - -/* Set the positions where the subexpressions are starts/ends to registers - PMATCH. - Note: We assume that pmatch[0] is already set, and - pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, - regmatch_t *pmatch, bool fl_backtrack) -{ - const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; - Idx idx, cur_node; - re_node_set eps_via_nodes; - struct re_fail_stack_t *fs; - struct re_fail_stack_t fs_body = { 0, 2, NULL }; - regmatch_t *prev_idx_match; - bool prev_idx_match_malloced = false; - -#ifdef DEBUG - assert (nmatch > 1); - assert (mctx->state_log != NULL); -#endif - if (fl_backtrack) - { - fs = &fs_body; - fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); - if (fs->stack == NULL) - return REG_ESPACE; - } - else - fs = NULL; - - cur_node = dfa->init_node; - re_node_set_init_empty (&eps_via_nodes); - - if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) - prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); - else - { - prev_idx_match = re_malloc (regmatch_t, nmatch); - if (prev_idx_match == NULL) - { - free_fail_stack_return (fs); - return REG_ESPACE; - } - prev_idx_match_malloced = true; - } - memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); - - for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) - { - update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); - - if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) - { - Idx reg_idx; - if (fs) - { - for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) - if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) - break; - if (reg_idx == nmatch) - { - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) - re_free (prev_idx_match); - return free_fail_stack_return (fs); - } - cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, - &eps_via_nodes); - } - else - { - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) - re_free (prev_idx_match); - return REG_NOERROR; - } - } - - /* Proceed to next node. */ - cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, - &eps_via_nodes, fs); - - if (BE (! REG_VALID_INDEX (cur_node), 0)) - { - if (BE (cur_node == REG_ERROR, 0)) - { - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) - re_free (prev_idx_match); - free_fail_stack_return (fs); - return REG_ESPACE; - } - if (fs) - cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, - &eps_via_nodes); - else - { - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) - re_free (prev_idx_match); - return REG_NOMATCH; - } - } - } - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) - re_free (prev_idx_match); - return free_fail_stack_return (fs); -} - -static reg_errcode_t -internal_function -free_fail_stack_return (struct re_fail_stack_t *fs) -{ - if (fs) - { - Idx fs_idx; - for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) - { - re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); - re_free (fs->stack[fs_idx].regs); - } - re_free (fs->stack); - } - return REG_NOERROR; -} - -static void -internal_function -update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, - regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) -{ - int type = dfa->nodes[cur_node].type; - if (type == OP_OPEN_SUBEXP) - { - Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; - - /* We are at the first node of this sub expression. */ - if (reg_num < nmatch) - { - pmatch[reg_num].rm_so = cur_idx; - pmatch[reg_num].rm_eo = -1; - } - } - else if (type == OP_CLOSE_SUBEXP) - { - Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; - if (reg_num < nmatch) - { - /* We are at the last node of this sub expression. */ - if (pmatch[reg_num].rm_so < cur_idx) - { - pmatch[reg_num].rm_eo = cur_idx; - /* This is a non-empty match or we are not inside an optional - subexpression. Accept this right away. */ - memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); - } - else - { - if (dfa->nodes[cur_node].opt_subexp - && prev_idx_match[reg_num].rm_so != -1) - /* We transited through an empty match for an optional - subexpression, like (a?)*, and this is not the subexp's - first match. Copy back the old content of the registers - so that matches of an inner subexpression are undone as - well, like in ((a?))*. */ - memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); - else - /* We completed a subexpression, but it may be part of - an optional one, so do not update PREV_IDX_MATCH. */ - pmatch[reg_num].rm_eo = cur_idx; - } - } - } -} - -/* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 - and sift the nodes in each states according to the following rules. - Updated state_log will be wrote to STATE_LOG. - - Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if... - 1. When STR_IDX == MATCH_LAST(the last index in the state_log): - If `a' isn't the LAST_NODE and `a' can't epsilon transit to - the LAST_NODE, we throw away the node `a'. - 2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts - string `s' and transit to `b': - i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw - away the node `a'. - ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is - thrown away, we throw away the node `a'. - 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b': - i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the - node `a'. - ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, - we throw away the node `a'. */ - -#define STATE_NODE_CONTAINS(state,node) \ - ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) - -static reg_errcode_t -internal_function -sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) -{ - reg_errcode_t err; - int null_cnt = 0; - Idx str_idx = sctx->last_str_idx; - re_node_set cur_dest; - -#ifdef DEBUG - assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); -#endif - - /* Build sifted state_log[str_idx]. It has the nodes which can epsilon - transit to the last_node and the last_node itself. */ - err = re_node_set_init_1 (&cur_dest, sctx->last_node); - if (BE (err != REG_NOERROR, 0)) - return err; - err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - - /* Then check each states in the state_log. */ - while (str_idx > 0) - { - /* Update counters. */ - null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; - if (null_cnt > mctx->max_mb_elem_len) - { - memset (sctx->sifted_states, '\0', - sizeof (re_dfastate_t *) * str_idx); - re_node_set_free (&cur_dest); - return REG_NOERROR; - } - re_node_set_empty (&cur_dest); - --str_idx; - - if (mctx->state_log[str_idx]) - { - err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - - /* Add all the nodes which satisfy the following conditions: - - It can epsilon transit to a node in CUR_DEST. - - It is in CUR_SRC. - And update state_log. */ - err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - err = REG_NOERROR; - free_return: - re_node_set_free (&cur_dest); - return err; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, - Idx str_idx, re_node_set *cur_dest) -{ - const re_dfa_t *const dfa = mctx->dfa; - const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; - Idx i; - - /* Then build the next sifted state. - We build the next sifted state on `cur_dest', and update - `sifted_states[str_idx]' with `cur_dest'. - Note: - `cur_dest' is the sifted state from `state_log[str_idx + 1]'. - `cur_src' points the node_set of the old `state_log[str_idx]' - (with the epsilon nodes pre-filtered out). */ - for (i = 0; i < cur_src->nelem; i++) - { - Idx prev_node = cur_src->elems[i]; - int naccepted = 0; - bool ok; - -#ifdef DEBUG - re_token_type_t type = dfa->nodes[prev_node].type; - assert (!IS_EPSILON_NODE (type)); -#endif -#ifdef RE_ENABLE_I18N - /* If the node may accept `multi byte'. */ - if (dfa->nodes[prev_node].accept_mb) - naccepted = sift_states_iter_mb (mctx, sctx, prev_node, - str_idx, sctx->last_str_idx); -#endif /* RE_ENABLE_I18N */ - - /* We don't check backreferences here. - See update_cur_sifted_state(). */ - if (!naccepted - && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) - && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], - dfa->nexts[prev_node])) - naccepted = 1; - - if (naccepted == 0) - continue; - - if (sctx->limits.nelem) - { - Idx to_idx = str_idx + naccepted; - if (check_dst_limits (mctx, &sctx->limits, - dfa->nexts[prev_node], to_idx, - prev_node, str_idx)) - continue; - } - ok = re_node_set_insert (cur_dest, prev_node); - if (BE (! ok, 0)) - return REG_ESPACE; - } - - return REG_NOERROR; -} - -/* Helper functions. */ - -static reg_errcode_t -internal_function -clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) -{ - Idx top = mctx->state_log_top; - - if (next_state_log_idx >= mctx->input.bufs_len - || (next_state_log_idx >= mctx->input.valid_len - && mctx->input.valid_len < mctx->input.len)) - { - reg_errcode_t err; - err = extend_buffers (mctx); - if (BE (err != REG_NOERROR, 0)) - return err; - } - - if (top < next_state_log_idx) - { - memset (mctx->state_log + top + 1, '\0', - sizeof (re_dfastate_t *) * (next_state_log_idx - top)); - mctx->state_log_top = next_state_log_idx; - } - return REG_NOERROR; -} - -static reg_errcode_t -internal_function -merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, - re_dfastate_t **src, Idx num) -{ - Idx st_idx; - reg_errcode_t err; - for (st_idx = 0; st_idx < num; ++st_idx) - { - if (dst[st_idx] == NULL) - dst[st_idx] = src[st_idx]; - else if (src[st_idx] != NULL) - { - re_node_set merged_set; - err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, - &src[st_idx]->nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); - re_node_set_free (&merged_set); - if (BE (err != REG_NOERROR, 0)) - return err; - } - } - return REG_NOERROR; -} - -static reg_errcode_t -internal_function -update_cur_sifted_state (const re_match_context_t *mctx, - re_sift_context_t *sctx, Idx str_idx, - re_node_set *dest_nodes) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err = REG_NOERROR; - const re_node_set *candidates; - candidates = ((mctx->state_log[str_idx] == NULL) ? NULL - : &mctx->state_log[str_idx]->nodes); - - if (dest_nodes->nelem == 0) - sctx->sifted_states[str_idx] = NULL; - else - { - if (candidates) - { - /* At first, add the nodes which can epsilon transit to a node in - DEST_NODE. */ - err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); - if (BE (err != REG_NOERROR, 0)) - return err; - - /* Then, check the limitations in the current sift_context. */ - if (sctx->limits.nelem) - { - err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, - mctx->bkref_ents, str_idx); - if (BE (err != REG_NOERROR, 0)) - return err; - } - } - - sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - } - - if (candidates && mctx->state_log[str_idx]->has_backref) - { - err = sift_states_bkref (mctx, sctx, str_idx, candidates); - if (BE (err != REG_NOERROR, 0)) - return err; - } - return REG_NOERROR; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, - const re_node_set *candidates) -{ - reg_errcode_t err = REG_NOERROR; - Idx i; - - re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - - if (!state->inveclosure.alloc) - { - err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); - if (BE (err != REG_NOERROR, 0)) - return REG_ESPACE; - for (i = 0; i < dest_nodes->nelem; i++) - { - err = re_node_set_merge (&state->inveclosure, - dfa->inveclosures + dest_nodes->elems[i]); - if (BE (err != REG_NOERROR, 0)) - return REG_ESPACE; - } - } - return re_node_set_add_intersect (dest_nodes, candidates, - &state->inveclosure); -} - -static reg_errcode_t -internal_function -sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, - const re_node_set *candidates) -{ - Idx ecl_idx; - reg_errcode_t err; - re_node_set *inv_eclosure = dfa->inveclosures + node; - re_node_set except_nodes; - re_node_set_init_empty (&except_nodes); - for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) - { - Idx cur_node = inv_eclosure->elems[ecl_idx]; - if (cur_node == node) - continue; - if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) - { - Idx edst1 = dfa->edests[cur_node].elems[0]; - Idx edst2 = ((dfa->edests[cur_node].nelem > 1) - ? dfa->edests[cur_node].elems[1] : REG_MISSING); - if ((!re_node_set_contains (inv_eclosure, edst1) - && re_node_set_contains (dest_nodes, edst1)) - || (REG_VALID_NONZERO_INDEX (edst2) - && !re_node_set_contains (inv_eclosure, edst2) - && re_node_set_contains (dest_nodes, edst2))) - { - err = re_node_set_add_intersect (&except_nodes, candidates, - dfa->inveclosures + cur_node); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&except_nodes); - return err; - } - } - } - } - for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) - { - Idx cur_node = inv_eclosure->elems[ecl_idx]; - if (!re_node_set_contains (&except_nodes, cur_node)) - { - Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1; - re_node_set_remove_at (dest_nodes, idx); - } - } - re_node_set_free (&except_nodes); - return REG_NOERROR; -} - -static bool -internal_function -check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, - Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx lim_idx, src_pos, dst_pos; - - Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); - Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); - for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) - { - Idx subexp_idx; - struct re_backref_cache_entry *ent; - ent = mctx->bkref_ents + limits->elems[lim_idx]; - subexp_idx = dfa->nodes[ent->node].opr.idx; - - dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], - subexp_idx, dst_node, dst_idx, - dst_bkref_idx); - src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], - subexp_idx, src_node, src_idx, - src_bkref_idx); - - /* In case of: - ( ) - ( ) - ( ) */ - if (src_pos == dst_pos) - continue; /* This is unrelated limitation. */ - else - return true; - } - return false; -} - -static int -internal_function -check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, - Idx subexp_idx, Idx from_node, Idx bkref_idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - const re_node_set *eclosures = dfa->eclosures + from_node; - Idx node_idx; - - /* Else, we are on the boundary: examine the nodes on the epsilon - closure. */ - for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) - { - Idx node = eclosures->elems[node_idx]; - switch (dfa->nodes[node].type) - { - case OP_BACK_REF: - if (bkref_idx != REG_MISSING) - { - struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; - do - { - Idx dst; - int cpos; - - if (ent->node != node) - continue; - - if (subexp_idx < BITSET_WORD_BITS - && !(ent->eps_reachable_subexps_map - & ((bitset_word_t) 1 << subexp_idx))) - continue; - - /* Recurse trying to reach the OP_OPEN_SUBEXP and - OP_CLOSE_SUBEXP cases below. But, if the - destination node is the same node as the source - node, don't recurse because it would cause an - infinite loop: a regex that exhibits this behavior - is ()\1*\1* */ - dst = dfa->edests[node].elems[0]; - if (dst == from_node) - { - if (boundaries & 1) - return -1; - else /* if (boundaries & 2) */ - return 0; - } - - cpos = - check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, - dst, bkref_idx); - if (cpos == -1 /* && (boundaries & 1) */) - return -1; - if (cpos == 0 && (boundaries & 2)) - return 0; - - if (subexp_idx < BITSET_WORD_BITS) - ent->eps_reachable_subexps_map - &= ~((bitset_word_t) 1 << subexp_idx); - } - while (ent++->more); - } - break; - - case OP_OPEN_SUBEXP: - if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) - return -1; - break; - - case OP_CLOSE_SUBEXP: - if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) - return 0; - break; - - default: - break; - } - } - - return (boundaries & 2) ? 1 : 0; -} - -static int -internal_function -check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, - Idx subexp_idx, Idx from_node, Idx str_idx, - Idx bkref_idx) -{ - struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; - int boundaries; - - /* If we are outside the range of the subexpression, return -1 or 1. */ - if (str_idx < lim->subexp_from) - return -1; - - if (lim->subexp_to < str_idx) - return 1; - - /* If we are within the subexpression, return 0. */ - boundaries = (str_idx == lim->subexp_from); - boundaries |= (str_idx == lim->subexp_to) << 1; - if (boundaries == 0) - return 0; - - /* Else, examine epsilon closure. */ - return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, - from_node, bkref_idx); -} - -/* Check the limitations of sub expressions LIMITS, and remove the nodes - which are against limitations from DEST_NODES. */ - -static reg_errcode_t -internal_function -check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, - const re_node_set *candidates, re_node_set *limits, - struct re_backref_cache_entry *bkref_ents, Idx str_idx) -{ - reg_errcode_t err; - Idx node_idx, lim_idx; - - for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) - { - Idx subexp_idx; - struct re_backref_cache_entry *ent; - ent = bkref_ents + limits->elems[lim_idx]; - - if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) - continue; /* This is unrelated limitation. */ - - subexp_idx = dfa->nodes[ent->node].opr.idx; - if (ent->subexp_to == str_idx) - { - Idx ops_node = REG_MISSING; - Idx cls_node = REG_MISSING; - for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) - { - Idx node = dest_nodes->elems[node_idx]; - re_token_type_t type = dfa->nodes[node].type; - if (type == OP_OPEN_SUBEXP - && subexp_idx == dfa->nodes[node].opr.idx) - ops_node = node; - else if (type == OP_CLOSE_SUBEXP - && subexp_idx == dfa->nodes[node].opr.idx) - cls_node = node; - } - - /* Check the limitation of the open subexpression. */ - /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ - if (REG_VALID_INDEX (ops_node)) - { - err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, - candidates); - if (BE (err != REG_NOERROR, 0)) - return err; - } - - /* Check the limitation of the close subexpression. */ - if (REG_VALID_INDEX (cls_node)) - for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) - { - Idx node = dest_nodes->elems[node_idx]; - if (!re_node_set_contains (dfa->inveclosures + node, - cls_node) - && !re_node_set_contains (dfa->eclosures + node, - cls_node)) - { - /* It is against this limitation. - Remove it form the current sifted state. */ - err = sub_epsilon_src_nodes (dfa, node, dest_nodes, - candidates); - if (BE (err != REG_NOERROR, 0)) - return err; - --node_idx; - } - } - } - else /* (ent->subexp_to != str_idx) */ - { - for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) - { - Idx node = dest_nodes->elems[node_idx]; - re_token_type_t type = dfa->nodes[node].type; - if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) - { - if (subexp_idx != dfa->nodes[node].opr.idx) - continue; - /* It is against this limitation. - Remove it form the current sifted state. */ - err = sub_epsilon_src_nodes (dfa, node, dest_nodes, - candidates); - if (BE (err != REG_NOERROR, 0)) - return err; - } - } - } - } - return REG_NOERROR; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, - Idx str_idx, const re_node_set *candidates) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx node_idx, node; - re_sift_context_t local_sctx; - Idx first_idx = search_cur_bkref_entry (mctx, str_idx); - - if (first_idx == REG_MISSING) - return REG_NOERROR; - - local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ - - for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) - { - Idx enabled_idx; - re_token_type_t type; - struct re_backref_cache_entry *entry; - node = candidates->elems[node_idx]; - type = dfa->nodes[node].type; - /* Avoid infinite loop for the REs like "()\1+". */ - if (node == sctx->last_node && str_idx == sctx->last_str_idx) - continue; - if (type != OP_BACK_REF) - continue; - - entry = mctx->bkref_ents + first_idx; - enabled_idx = first_idx; - do - { - Idx subexp_len; - Idx to_idx; - Idx dst_node; - bool ok; - re_dfastate_t *cur_state; - - if (entry->node != node) - continue; - subexp_len = entry->subexp_to - entry->subexp_from; - to_idx = str_idx + subexp_len; - dst_node = (subexp_len ? dfa->nexts[node] - : dfa->edests[node].elems[0]); - - if (to_idx > sctx->last_str_idx - || sctx->sifted_states[to_idx] == NULL - || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) - || check_dst_limits (mctx, &sctx->limits, node, - str_idx, dst_node, to_idx)) - continue; - - if (local_sctx.sifted_states == NULL) - { - local_sctx = *sctx; - err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - local_sctx.last_node = node; - local_sctx.last_str_idx = str_idx; - ok = re_node_set_insert (&local_sctx.limits, enabled_idx); - if (BE (! ok, 0)) - { - err = REG_ESPACE; - goto free_return; - } - cur_state = local_sctx.sifted_states[str_idx]; - err = sift_states_backward (mctx, &local_sctx); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - if (sctx->limited_states != NULL) - { - err = merge_state_array (dfa, sctx->limited_states, - local_sctx.sifted_states, - str_idx + 1); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - local_sctx.sifted_states[str_idx] = cur_state; - re_node_set_remove (&local_sctx.limits, enabled_idx); - - /* mctx->bkref_ents may have changed, reload the pointer. */ - entry = mctx->bkref_ents + enabled_idx; - } - while (enabled_idx++, entry++->more); - } - err = REG_NOERROR; - free_return: - if (local_sctx.sifted_states != NULL) - { - re_node_set_free (&local_sctx.limits); - } - - return err; -} - - -#ifdef RE_ENABLE_I18N -static int -internal_function -sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, - Idx node_idx, Idx str_idx, Idx max_str_idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - int naccepted; - /* Check the node can accept `multi byte'. */ - naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); - if (naccepted > 0 && str_idx + naccepted <= max_str_idx && - !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], - dfa->nexts[node_idx])) - /* The node can't accept the `multi byte', or the - destination was already thrown away, then the node - could't accept the current input `multi byte'. */ - naccepted = 0; - /* Otherwise, it is sure that the node could accept - `naccepted' bytes input. */ - return naccepted; -} -#endif /* RE_ENABLE_I18N */ - - -/* Functions for state transition. */ - -/* Return the next state to which the current state STATE will transit by - accepting the current input byte, and update STATE_LOG if necessary. - If STATE can accept a multibyte char/collating element/back reference - update the destination of STATE_LOG. */ - -static re_dfastate_t * -internal_function __attribute_warn_unused_result__ -transit_state (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *state) -{ - re_dfastate_t **trtable; - unsigned char ch; - -#ifdef RE_ENABLE_I18N - /* If the current state can accept multibyte. */ - if (BE (state->accept_mb, 0)) - { - *err = transit_state_mb (mctx, state); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - } -#endif /* RE_ENABLE_I18N */ - - /* Then decide the next state with the single byte. */ -#if 0 - if (0) - /* don't use transition table */ - return transit_state_sb (err, mctx, state); -#endif - - /* Use transition table */ - ch = re_string_fetch_byte (&mctx->input); - for (;;) - { - trtable = state->trtable; - if (BE (trtable != NULL, 1)) - return trtable[ch]; - - trtable = state->word_trtable; - if (BE (trtable != NULL, 1)) - { - unsigned int context; - context - = re_string_context_at (&mctx->input, - re_string_cur_idx (&mctx->input) - 1, - mctx->eflags); - if (IS_WORD_CONTEXT (context)) - return trtable[ch + SBC_MAX]; - else - return trtable[ch]; - } - - if (!build_trtable (mctx->dfa, state)) - { - *err = REG_ESPACE; - return NULL; - } - - /* Retry, we now have a transition table. */ - } -} - -/* Update the state_log if we need */ -static re_dfastate_t * -internal_function -merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *next_state) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx cur_idx = re_string_cur_idx (&mctx->input); - - if (cur_idx > mctx->state_log_top) - { - mctx->state_log[cur_idx] = next_state; - mctx->state_log_top = cur_idx; - } - else if (mctx->state_log[cur_idx] == 0) - { - mctx->state_log[cur_idx] = next_state; - } - else - { - re_dfastate_t *pstate; - unsigned int context; - re_node_set next_nodes, *log_nodes, *table_nodes = NULL; - /* If (state_log[cur_idx] != 0), it implies that cur_idx is - the destination of a multibyte char/collating element/ - back reference. Then the next state is the union set of - these destinations and the results of the transition table. */ - pstate = mctx->state_log[cur_idx]; - log_nodes = pstate->entrance_nodes; - if (next_state != NULL) - { - table_nodes = next_state->entrance_nodes; - *err = re_node_set_init_union (&next_nodes, table_nodes, - log_nodes); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - } - else - next_nodes = *log_nodes; - /* Note: We already add the nodes of the initial state, - then we don't need to add them here. */ - - context = re_string_context_at (&mctx->input, - re_string_cur_idx (&mctx->input) - 1, - mctx->eflags); - next_state = mctx->state_log[cur_idx] - = re_acquire_state_context (err, dfa, &next_nodes, context); - /* We don't need to check errors here, since the return value of - this function is next_state and ERR is already set. */ - - if (table_nodes != NULL) - re_node_set_free (&next_nodes); - } - - if (BE (dfa->nbackref, 0) && next_state != NULL) - { - /* Check OP_OPEN_SUBEXP in the current state in case that we use them - later. We must check them here, since the back references in the - next state might use them. */ - *err = check_subexp_matching_top (mctx, &next_state->nodes, - cur_idx); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - - /* If the next state has back references. */ - if (next_state->has_backref) - { - *err = transit_state_bkref (mctx, &next_state->nodes); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - next_state = mctx->state_log[cur_idx]; - } - } - - return next_state; -} - -/* Skip bytes in the input that correspond to part of a - multi-byte match, then look in the log for a state - from which to restart matching. */ -static re_dfastate_t * -internal_function -find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) -{ - re_dfastate_t *cur_state; - do - { - Idx max = mctx->state_log_top; - Idx cur_str_idx = re_string_cur_idx (&mctx->input); - - do - { - if (++cur_str_idx > max) - return NULL; - re_string_skip_bytes (&mctx->input, 1); - } - while (mctx->state_log[cur_str_idx] == NULL); - - cur_state = merge_state_with_log (err, mctx, NULL); - } - while (*err == REG_NOERROR && cur_state == NULL); - return cur_state; -} - -/* Helper functions for transit_state. */ - -/* From the node set CUR_NODES, pick up the nodes whose types are - OP_OPEN_SUBEXP and which have corresponding back references in the regular - expression. And register them to use them later for evaluating the - correspoding back references. */ - -static reg_errcode_t -internal_function -check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, - Idx str_idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx node_idx; - reg_errcode_t err; - - /* TODO: This isn't efficient. - Because there might be more than one nodes whose types are - OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all - nodes. - E.g. RE: (a){2} */ - for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) - { - Idx node = cur_nodes->elems[node_idx]; - if (dfa->nodes[node].type == OP_OPEN_SUBEXP - && dfa->nodes[node].opr.idx < BITSET_WORD_BITS - && (dfa->used_bkref_map - & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) - { - err = match_ctx_add_subtop (mctx, node, str_idx); - if (BE (err != REG_NOERROR, 0)) - return err; - } - } - return REG_NOERROR; -} - -#if 0 -/* Return the next state to which the current state STATE will transit by - accepting the current input byte. */ - -static re_dfastate_t * -transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *state) -{ - const re_dfa_t *const dfa = mctx->dfa; - re_node_set next_nodes; - re_dfastate_t *next_state; - Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); - unsigned int context; - - *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) - { - Idx cur_node = state->nodes.elems[node_cnt]; - if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) - { - *err = re_node_set_merge (&next_nodes, - dfa->eclosures + dfa->nexts[cur_node]); - if (BE (*err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return NULL; - } - } - } - context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); - next_state = re_acquire_state_context (err, dfa, &next_nodes, context); - /* We don't need to check errors here, since the return value of - this function is next_state and ERR is already set. */ - - re_node_set_free (&next_nodes); - re_string_skip_bytes (&mctx->input, 1); - return next_state; -} -#endif - -#ifdef RE_ENABLE_I18N -static reg_errcode_t -internal_function -transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx i; - - for (i = 0; i < pstate->nodes.nelem; ++i) - { - re_node_set dest_nodes, *new_nodes; - Idx cur_node_idx = pstate->nodes.elems[i]; - int naccepted; - Idx dest_idx; - unsigned int context; - re_dfastate_t *dest_state; - - if (!dfa->nodes[cur_node_idx].accept_mb) - continue; - - if (dfa->nodes[cur_node_idx].constraint) - { - context = re_string_context_at (&mctx->input, - re_string_cur_idx (&mctx->input), - mctx->eflags); - if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, - context)) - continue; - } - - /* How many bytes the node can accept? */ - naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, - re_string_cur_idx (&mctx->input)); - if (naccepted == 0) - continue; - - /* The node can accepts `naccepted' bytes. */ - dest_idx = re_string_cur_idx (&mctx->input) + naccepted; - mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted - : mctx->max_mb_elem_len); - err = clean_state_log_if_needed (mctx, dest_idx); - if (BE (err != REG_NOERROR, 0)) - return err; -#ifdef DEBUG - assert (dfa->nexts[cur_node_idx] != REG_MISSING); -#endif - new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; - - dest_state = mctx->state_log[dest_idx]; - if (dest_state == NULL) - dest_nodes = *new_nodes; - else - { - err = re_node_set_init_union (&dest_nodes, - dest_state->entrance_nodes, new_nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - } - context = re_string_context_at (&mctx->input, dest_idx - 1, - mctx->eflags); - mctx->state_log[dest_idx] - = re_acquire_state_context (&err, dfa, &dest_nodes, context); - if (dest_state != NULL) - re_node_set_free (&dest_nodes); - if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) - return err; - } - return REG_NOERROR; -} -#endif /* RE_ENABLE_I18N */ - -static reg_errcode_t -internal_function -transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx i; - Idx cur_str_idx = re_string_cur_idx (&mctx->input); - - for (i = 0; i < nodes->nelem; ++i) - { - Idx dest_str_idx, prev_nelem, bkc_idx; - Idx node_idx = nodes->elems[i]; - unsigned int context; - const re_token_t *node = dfa->nodes + node_idx; - re_node_set *new_dest_nodes; - - /* Check whether `node' is a backreference or not. */ - if (node->type != OP_BACK_REF) - continue; - - if (node->constraint) - { - context = re_string_context_at (&mctx->input, cur_str_idx, - mctx->eflags); - if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) - continue; - } - - /* `node' is a backreference. - Check the substring which the substring matched. */ - bkc_idx = mctx->nbkref_ents; - err = get_subexp (mctx, node_idx, cur_str_idx); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - - /* And add the epsilon closures (which is `new_dest_nodes') of - the backreference to appropriate state_log. */ -#ifdef DEBUG - assert (dfa->nexts[node_idx] != REG_MISSING); -#endif - for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) - { - Idx subexp_len; - re_dfastate_t *dest_state; - struct re_backref_cache_entry *bkref_ent; - bkref_ent = mctx->bkref_ents + bkc_idx; - if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) - continue; - subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; - new_dest_nodes = (subexp_len == 0 - ? dfa->eclosures + dfa->edests[node_idx].elems[0] - : dfa->eclosures + dfa->nexts[node_idx]); - dest_str_idx = (cur_str_idx + bkref_ent->subexp_to - - bkref_ent->subexp_from); - context = re_string_context_at (&mctx->input, dest_str_idx - 1, - mctx->eflags); - dest_state = mctx->state_log[dest_str_idx]; - prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 - : mctx->state_log[cur_str_idx]->nodes.nelem); - /* Add `new_dest_node' to state_log. */ - if (dest_state == NULL) - { - mctx->state_log[dest_str_idx] - = re_acquire_state_context (&err, dfa, new_dest_nodes, - context); - if (BE (mctx->state_log[dest_str_idx] == NULL - && err != REG_NOERROR, 0)) - goto free_return; - } - else - { - re_node_set dest_nodes; - err = re_node_set_init_union (&dest_nodes, - dest_state->entrance_nodes, - new_dest_nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&dest_nodes); - goto free_return; - } - mctx->state_log[dest_str_idx] - = re_acquire_state_context (&err, dfa, &dest_nodes, context); - re_node_set_free (&dest_nodes); - if (BE (mctx->state_log[dest_str_idx] == NULL - && err != REG_NOERROR, 0)) - goto free_return; - } - /* We need to check recursively if the backreference can epsilon - transit. */ - if (subexp_len == 0 - && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) - { - err = check_subexp_matching_top (mctx, new_dest_nodes, - cur_str_idx); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - err = transit_state_bkref (mctx, new_dest_nodes); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - } - } - err = REG_NOERROR; - free_return: - return err; -} - -/* Enumerate all the candidates which the backreference BKREF_NODE can match - at BKREF_STR_IDX, and register them by match_ctx_add_entry(). - Note that we might collect inappropriate candidates here. - However, the cost of checking them strictly here is too high, then we - delay these checking for prune_impossible_nodes(). */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx subexp_num, sub_top_idx; - const char *buf = (const char *) re_string_get_buffer (&mctx->input); - /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ - Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); - if (cache_idx != REG_MISSING) - { - const struct re_backref_cache_entry *entry - = mctx->bkref_ents + cache_idx; - do - if (entry->node == bkref_node) - return REG_NOERROR; /* We already checked it. */ - while (entry++->more); - } - - subexp_num = dfa->nodes[bkref_node].opr.idx; - - /* For each sub expression */ - for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) - { - reg_errcode_t err; - re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; - re_sub_match_last_t *sub_last; - Idx sub_last_idx, sl_str, bkref_str_off; - - if (dfa->nodes[sub_top->node].opr.idx != subexp_num) - continue; /* It isn't related. */ - - sl_str = sub_top->str_idx; - bkref_str_off = bkref_str_idx; - /* At first, check the last node of sub expressions we already - evaluated. */ - for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) - { - regoff_t sl_str_diff; - sub_last = sub_top->lasts[sub_last_idx]; - sl_str_diff = sub_last->str_idx - sl_str; - /* The matched string by the sub expression match with the substring - at the back reference? */ - if (sl_str_diff > 0) - { - if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) - { - /* Not enough chars for a successful match. */ - if (bkref_str_off + sl_str_diff > mctx->input.len) - break; - - err = clean_state_log_if_needed (mctx, - bkref_str_off - + sl_str_diff); - if (BE (err != REG_NOERROR, 0)) - return err; - buf = (const char *) re_string_get_buffer (&mctx->input); - } - if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) - /* We don't need to search this sub expression any more. */ - break; - } - bkref_str_off += sl_str_diff; - sl_str += sl_str_diff; - err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, - bkref_str_idx); - - /* Reload buf, since the preceding call might have reallocated - the buffer. */ - buf = (const char *) re_string_get_buffer (&mctx->input); - - if (err == REG_NOMATCH) - continue; - if (BE (err != REG_NOERROR, 0)) - return err; - } - - if (sub_last_idx < sub_top->nlasts) - continue; - if (sub_last_idx > 0) - ++sl_str; - /* Then, search for the other last nodes of the sub expression. */ - for (; sl_str <= bkref_str_idx; ++sl_str) - { - Idx cls_node; - regoff_t sl_str_off; - const re_node_set *nodes; - sl_str_off = sl_str - sub_top->str_idx; - /* The matched string by the sub expression match with the substring - at the back reference? */ - if (sl_str_off > 0) - { - if (BE (bkref_str_off >= mctx->input.valid_len, 0)) - { - /* If we are at the end of the input, we cannot match. */ - if (bkref_str_off >= mctx->input.len) - break; - - err = extend_buffers (mctx); - if (BE (err != REG_NOERROR, 0)) - return err; - - buf = (const char *) re_string_get_buffer (&mctx->input); - } - if (buf [bkref_str_off++] != buf[sl_str - 1]) - break; /* We don't need to search this sub expression - any more. */ - } - if (mctx->state_log[sl_str] == NULL) - continue; - /* Does this state have a ')' of the sub expression? */ - nodes = &mctx->state_log[sl_str]->nodes; - cls_node = find_subexp_node (dfa, nodes, subexp_num, - OP_CLOSE_SUBEXP); - if (cls_node == REG_MISSING) - continue; /* No. */ - if (sub_top->path == NULL) - { - sub_top->path = calloc (sizeof (state_array_t), - sl_str - sub_top->str_idx + 1); - if (sub_top->path == NULL) - return REG_ESPACE; - } - /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node - in the current context? */ - err = check_arrival (mctx, sub_top->path, sub_top->node, - sub_top->str_idx, cls_node, sl_str, - OP_CLOSE_SUBEXP); - if (err == REG_NOMATCH) - continue; - if (BE (err != REG_NOERROR, 0)) - return err; - sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); - if (BE (sub_last == NULL, 0)) - return REG_ESPACE; - err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, - bkref_str_idx); - if (err == REG_NOMATCH) - continue; - } - } - return REG_NOERROR; -} - -/* Helper functions for get_subexp(). */ - -/* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. - If it can arrive, register the sub expression expressed with SUB_TOP - and SUB_LAST. */ - -static reg_errcode_t -internal_function -get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, - re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) -{ - reg_errcode_t err; - Idx to_idx; - /* Can the subexpression arrive the back reference? */ - err = check_arrival (mctx, &sub_last->path, sub_last->node, - sub_last->str_idx, bkref_node, bkref_str, - OP_OPEN_SUBEXP); - if (err != REG_NOERROR) - return err; - err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, - sub_last->str_idx); - if (BE (err != REG_NOERROR, 0)) - return err; - to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; - return clean_state_log_if_needed (mctx, to_idx); -} - -/* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. - Search '(' if FL_OPEN, or search ')' otherwise. - TODO: This function isn't efficient... - Because there might be more than one nodes whose types are - OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all - nodes. - E.g. RE: (a){2} */ - -static Idx -internal_function -find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, - Idx subexp_idx, int type) -{ - Idx cls_idx; - for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) - { - Idx cls_node = nodes->elems[cls_idx]; - const re_token_t *node = dfa->nodes + cls_node; - if (node->type == type - && node->opr.idx == subexp_idx) - return cls_node; - } - return REG_MISSING; -} - -/* Check whether the node TOP_NODE at TOP_STR can arrive to the node - LAST_NODE at LAST_STR. We record the path onto PATH since it will be - heavily reused. - Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, - Idx top_str, Idx last_node, Idx last_str, int type) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err = REG_NOERROR; - Idx subexp_num, backup_cur_idx, str_idx, null_cnt; - re_dfastate_t *cur_state = NULL; - re_node_set *cur_nodes, next_nodes; - re_dfastate_t **backup_state_log; - unsigned int context; - - subexp_num = dfa->nodes[top_node].opr.idx; - /* Extend the buffer if we need. */ - if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) - { - re_dfastate_t **new_array; - Idx old_alloc = path->alloc; - Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1; - if (BE (new_alloc < old_alloc, 0) - || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0)) - return REG_ESPACE; - new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); - if (BE (new_array == NULL, 0)) - return REG_ESPACE; - path->array = new_array; - path->alloc = new_alloc; - memset (new_array + old_alloc, '\0', - sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); - } - - str_idx = path->next_idx ? path->next_idx : top_str; - - /* Temporary modify MCTX. */ - backup_state_log = mctx->state_log; - backup_cur_idx = mctx->input.cur_idx; - mctx->state_log = path->array; - mctx->input.cur_idx = str_idx; - - /* Setup initial node set. */ - context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); - if (str_idx == top_str) - { - err = re_node_set_init_1 (&next_nodes, top_node); - if (BE (err != REG_NOERROR, 0)) - return err; - err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - } - else - { - cur_state = mctx->state_log[str_idx]; - if (cur_state && cur_state->has_backref) - { - err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - } - else - re_node_set_init_empty (&next_nodes); - } - if (str_idx == top_str || (cur_state && cur_state->has_backref)) - { - if (next_nodes.nelem) - { - err = expand_bkref_cache (mctx, &next_nodes, str_idx, - subexp_num, type); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - } - cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); - if (BE (cur_state == NULL && err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - mctx->state_log[str_idx] = cur_state; - } - - for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) - { - re_node_set_empty (&next_nodes); - if (mctx->state_log[str_idx + 1]) - { - err = re_node_set_merge (&next_nodes, - &mctx->state_log[str_idx + 1]->nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - } - if (cur_state) - { - err = check_arrival_add_next_nodes (mctx, str_idx, - &cur_state->non_eps_nodes, - &next_nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - } - ++str_idx; - if (next_nodes.nelem) - { - err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - err = expand_bkref_cache (mctx, &next_nodes, str_idx, - subexp_num, type); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - } - context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); - cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); - if (BE (cur_state == NULL && err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - mctx->state_log[str_idx] = cur_state; - null_cnt = cur_state == NULL ? null_cnt + 1 : 0; - } - re_node_set_free (&next_nodes); - cur_nodes = (mctx->state_log[last_str] == NULL ? NULL - : &mctx->state_log[last_str]->nodes); - path->next_idx = str_idx; - - /* Fix MCTX. */ - mctx->state_log = backup_state_log; - mctx->input.cur_idx = backup_cur_idx; - - /* Then check the current node set has the node LAST_NODE. */ - if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) - return REG_NOERROR; - - return REG_NOMATCH; -} - -/* Helper functions for check_arrival. */ - -/* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them - to NEXT_NODES. - TODO: This function is similar to the functions transit_state*(), - however this function has many additional works. - Can't we unify them? */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, - re_node_set *cur_nodes, re_node_set *next_nodes) -{ - const re_dfa_t *const dfa = mctx->dfa; - bool ok; - Idx cur_idx; -#ifdef RE_ENABLE_I18N - reg_errcode_t err = REG_NOERROR; -#endif - re_node_set union_set; - re_node_set_init_empty (&union_set); - for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) - { - int naccepted = 0; - Idx cur_node = cur_nodes->elems[cur_idx]; -#ifdef DEBUG - re_token_type_t type = dfa->nodes[cur_node].type; - assert (!IS_EPSILON_NODE (type)); -#endif -#ifdef RE_ENABLE_I18N - /* If the node may accept `multi byte'. */ - if (dfa->nodes[cur_node].accept_mb) - { - naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, - str_idx); - if (naccepted > 1) - { - re_dfastate_t *dest_state; - Idx next_node = dfa->nexts[cur_node]; - Idx next_idx = str_idx + naccepted; - dest_state = mctx->state_log[next_idx]; - re_node_set_empty (&union_set); - if (dest_state) - { - err = re_node_set_merge (&union_set, &dest_state->nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&union_set); - return err; - } - } - ok = re_node_set_insert (&union_set, next_node); - if (BE (! ok, 0)) - { - re_node_set_free (&union_set); - return REG_ESPACE; - } - mctx->state_log[next_idx] = re_acquire_state (&err, dfa, - &union_set); - if (BE (mctx->state_log[next_idx] == NULL - && err != REG_NOERROR, 0)) - { - re_node_set_free (&union_set); - return err; - } - } - } -#endif /* RE_ENABLE_I18N */ - if (naccepted - || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) - { - ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); - if (BE (! ok, 0)) - { - re_node_set_free (&union_set); - return REG_ESPACE; - } - } - } - re_node_set_free (&union_set); - return REG_NOERROR; -} - -/* For all the nodes in CUR_NODES, add the epsilon closures of them to - CUR_NODES, however exclude the nodes which are: - - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. - - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. -*/ - -static reg_errcode_t -internal_function -check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, - Idx ex_subexp, int type) -{ - reg_errcode_t err; - Idx idx, outside_node; - re_node_set new_nodes; -#ifdef DEBUG - assert (cur_nodes->nelem); -#endif - err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); - if (BE (err != REG_NOERROR, 0)) - return err; - /* Create a new node set NEW_NODES with the nodes which are epsilon - closures of the node in CUR_NODES. */ - - for (idx = 0; idx < cur_nodes->nelem; ++idx) - { - Idx cur_node = cur_nodes->elems[idx]; - const re_node_set *eclosure = dfa->eclosures + cur_node; - outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); - if (outside_node == REG_MISSING) - { - /* There are no problematic nodes, just merge them. */ - err = re_node_set_merge (&new_nodes, eclosure); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&new_nodes); - return err; - } - } - else - { - /* There are problematic nodes, re-calculate incrementally. */ - err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, - ex_subexp, type); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&new_nodes); - return err; - } - } - } - re_node_set_free (cur_nodes); - *cur_nodes = new_nodes; - return REG_NOERROR; -} - -/* Helper function for check_arrival_expand_ecl. - Check incrementally the epsilon closure of TARGET, and if it isn't - problematic append it to DST_NODES. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, - Idx target, Idx ex_subexp, int type) -{ - Idx cur_node; - for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) - { - bool ok; - - if (dfa->nodes[cur_node].type == type - && dfa->nodes[cur_node].opr.idx == ex_subexp) - { - if (type == OP_CLOSE_SUBEXP) - { - ok = re_node_set_insert (dst_nodes, cur_node); - if (BE (! ok, 0)) - return REG_ESPACE; - } - break; - } - ok = re_node_set_insert (dst_nodes, cur_node); - if (BE (! ok, 0)) - return REG_ESPACE; - if (dfa->edests[cur_node].nelem == 0) - break; - if (dfa->edests[cur_node].nelem == 2) - { - reg_errcode_t err; - err = check_arrival_expand_ecl_sub (dfa, dst_nodes, - dfa->edests[cur_node].elems[1], - ex_subexp, type); - if (BE (err != REG_NOERROR, 0)) - return err; - } - cur_node = dfa->edests[cur_node].elems[0]; - } - return REG_NOERROR; -} - - -/* For all the back references in the current state, calculate the - destination of the back references by the appropriate entry - in MCTX->BKREF_ENTS. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, - Idx cur_str, Idx subexp_num, int type) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); - struct re_backref_cache_entry *ent; - - if (cache_idx_start == REG_MISSING) - return REG_NOERROR; - - restart: - ent = mctx->bkref_ents + cache_idx_start; - do - { - Idx to_idx, next_node; - - /* Is this entry ENT is appropriate? */ - if (!re_node_set_contains (cur_nodes, ent->node)) - continue; /* No. */ - - to_idx = cur_str + ent->subexp_to - ent->subexp_from; - /* Calculate the destination of the back reference, and append it - to MCTX->STATE_LOG. */ - if (to_idx == cur_str) - { - /* The backreference did epsilon transit, we must re-check all the - node in the current state. */ - re_node_set new_dests; - reg_errcode_t err2, err3; - next_node = dfa->edests[ent->node].elems[0]; - if (re_node_set_contains (cur_nodes, next_node)) - continue; - err = re_node_set_init_1 (&new_dests, next_node); - err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); - err3 = re_node_set_merge (cur_nodes, &new_dests); - re_node_set_free (&new_dests); - if (BE (err != REG_NOERROR || err2 != REG_NOERROR - || err3 != REG_NOERROR, 0)) - { - err = (err != REG_NOERROR ? err - : (err2 != REG_NOERROR ? err2 : err3)); - return err; - } - /* TODO: It is still inefficient... */ - goto restart; - } - else - { - re_node_set union_set; - next_node = dfa->nexts[ent->node]; - if (mctx->state_log[to_idx]) - { - bool ok; - if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, - next_node)) - continue; - err = re_node_set_init_copy (&union_set, - &mctx->state_log[to_idx]->nodes); - ok = re_node_set_insert (&union_set, next_node); - if (BE (err != REG_NOERROR || ! ok, 0)) - { - re_node_set_free (&union_set); - err = err != REG_NOERROR ? err : REG_ESPACE; - return err; - } - } - else - { - err = re_node_set_init_1 (&union_set, next_node); - if (BE (err != REG_NOERROR, 0)) - return err; - } - mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); - re_node_set_free (&union_set); - if (BE (mctx->state_log[to_idx] == NULL - && err != REG_NOERROR, 0)) - return err; - } - } - while (ent++->more); - return REG_NOERROR; -} - -/* Build transition table for the state. - Return true if successful. */ - -static bool -internal_function -build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) -{ - reg_errcode_t err; - Idx i, j; - int ch; - bool need_word_trtable = false; - bitset_word_t elem, mask; - bool dests_node_malloced = false; - bool dest_states_malloced = false; - Idx ndests; /* Number of the destination states from `state'. */ - re_dfastate_t **trtable; - re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; - re_node_set follows, *dests_node; - bitset_t *dests_ch; - bitset_t acceptable; - - struct dests_alloc - { - re_node_set dests_node[SBC_MAX]; - bitset_t dests_ch[SBC_MAX]; - } *dests_alloc; - - /* We build DFA states which corresponds to the destination nodes - from `state'. `dests_node[i]' represents the nodes which i-th - destination state contains, and `dests_ch[i]' represents the - characters which i-th destination state accepts. */ - if (__libc_use_alloca (sizeof (struct dests_alloc))) - dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); - else - { - dests_alloc = re_malloc (struct dests_alloc, 1); - if (BE (dests_alloc == NULL, 0)) - return false; - dests_node_malloced = true; - } - dests_node = dests_alloc->dests_node; - dests_ch = dests_alloc->dests_ch; - - /* Initialize transiton table. */ - state->word_trtable = state->trtable = NULL; - - /* At first, group all nodes belonging to `state' into several - destinations. */ - ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); - if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0)) - { - if (dests_node_malloced) - free (dests_alloc); - if (ndests == 0) - { - state->trtable = (re_dfastate_t **) - calloc (sizeof (re_dfastate_t *), SBC_MAX); - if (BE (state->trtable == NULL, 0)) - return false; - return true; - } - return false; - } - - err = re_node_set_alloc (&follows, ndests + 1); - if (BE (err != REG_NOERROR, 0)) - goto out_free; - - /* Avoid arithmetic overflow in size calculation. */ - if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) - / (3 * sizeof (re_dfastate_t *))) - < ndests), - 0)) - goto out_free; - - if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX - + ndests * 3 * sizeof (re_dfastate_t *))) - dest_states = (re_dfastate_t **) - alloca (ndests * 3 * sizeof (re_dfastate_t *)); - else - { - dest_states = (re_dfastate_t **) - malloc (ndests * 3 * sizeof (re_dfastate_t *)); - if (BE (dest_states == NULL, 0)) - { -out_free: - if (dest_states_malloced) - free (dest_states); - re_node_set_free (&follows); - for (i = 0; i < ndests; ++i) - re_node_set_free (dests_node + i); - if (dests_node_malloced) - free (dests_alloc); - return false; - } - dest_states_malloced = true; - } - dest_states_word = dest_states + ndests; - dest_states_nl = dest_states_word + ndests; - bitset_empty (acceptable); - - /* Then build the states for all destinations. */ - for (i = 0; i < ndests; ++i) - { - Idx next_node; - re_node_set_empty (&follows); - /* Merge the follows of this destination states. */ - for (j = 0; j < dests_node[i].nelem; ++j) - { - next_node = dfa->nexts[dests_node[i].elems[j]]; - if (next_node != REG_MISSING) - { - err = re_node_set_merge (&follows, dfa->eclosures + next_node); - if (BE (err != REG_NOERROR, 0)) - goto out_free; - } - } - dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); - if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) - goto out_free; - /* If the new state has context constraint, - build appropriate states for these contexts. */ - if (dest_states[i]->has_constraint) - { - dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, - CONTEXT_WORD); - if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) - goto out_free; - - if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) - need_word_trtable = true; - - dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, - CONTEXT_NEWLINE); - if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) - goto out_free; - } - else - { - dest_states_word[i] = dest_states[i]; - dest_states_nl[i] = dest_states[i]; - } - bitset_merge (acceptable, dests_ch[i]); - } - - if (!BE (need_word_trtable, 0)) - { - /* We don't care about whether the following character is a word - character, or we are in a single-byte character set so we can - discern by looking at the character code: allocate a - 256-entry transition table. */ - trtable = state->trtable = - (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); - if (BE (trtable == NULL, 0)) - goto out_free; - - /* For all characters ch...: */ - for (i = 0; i < BITSET_WORDS; ++i) - for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; - elem; - mask <<= 1, elem >>= 1, ++ch) - if (BE (elem & 1, 0)) - { - /* There must be exactly one destination which accepts - character ch. See group_nodes_into_DFAstates. */ - for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) - ; - - /* j-th destination accepts the word character ch. */ - if (dfa->word_char[i] & mask) - trtable[ch] = dest_states_word[j]; - else - trtable[ch] = dest_states[j]; - } - } - else - { - /* We care about whether the following character is a word - character, and we are in a multi-byte character set: discern - by looking at the character code: build two 256-entry - transition tables, one starting at trtable[0] and one - starting at trtable[SBC_MAX]. */ - trtable = state->word_trtable = - (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); - if (BE (trtable == NULL, 0)) - goto out_free; - - /* For all characters ch...: */ - for (i = 0; i < BITSET_WORDS; ++i) - for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; - elem; - mask <<= 1, elem >>= 1, ++ch) - if (BE (elem & 1, 0)) - { - /* There must be exactly one destination which accepts - character ch. See group_nodes_into_DFAstates. */ - for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) - ; - - /* j-th destination accepts the word character ch. */ - trtable[ch] = dest_states[j]; - trtable[ch + SBC_MAX] = dest_states_word[j]; - } - } - - /* new line */ - if (bitset_contain (acceptable, NEWLINE_CHAR)) - { - /* The current state accepts newline character. */ - for (j = 0; j < ndests; ++j) - if (bitset_contain (dests_ch[j], NEWLINE_CHAR)) - { - /* k-th destination accepts newline character. */ - trtable[NEWLINE_CHAR] = dest_states_nl[j]; - if (need_word_trtable) - trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j]; - /* There must be only one destination which accepts - newline. See group_nodes_into_DFAstates. */ - break; - } - } - - if (dest_states_malloced) - free (dest_states); - - re_node_set_free (&follows); - for (i = 0; i < ndests; ++i) - re_node_set_free (dests_node + i); - - if (dests_node_malloced) - free (dests_alloc); - - return true; -} - -/* Group all nodes belonging to STATE into several destinations. - Then for all destinations, set the nodes belonging to the destination - to DESTS_NODE[i] and set the characters accepted by the destination - to DEST_CH[i]. This function return the number of destinations. */ - -static Idx -internal_function -group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, - re_node_set *dests_node, bitset_t *dests_ch) -{ - reg_errcode_t err; - bool ok; - Idx i, j, k; - Idx ndests; /* Number of the destinations from `state'. */ - bitset_t accepts; /* Characters a node can accept. */ - const re_node_set *cur_nodes = &state->nodes; - bitset_empty (accepts); - ndests = 0; - - /* For all the nodes belonging to `state', */ - for (i = 0; i < cur_nodes->nelem; ++i) - { - re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; - re_token_type_t type = node->type; - unsigned int constraint = node->constraint; - - /* Enumerate all single byte character this node can accept. */ - if (type == CHARACTER) - bitset_set (accepts, node->opr.c); - else if (type == SIMPLE_BRACKET) - { - bitset_merge (accepts, node->opr.sbcset); - } - else if (type == OP_PERIOD) - { -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - bitset_merge (accepts, dfa->sb_char); - else -#endif - bitset_set_all (accepts); - if (!(dfa->syntax & RE_DOT_NEWLINE)) - bitset_clear (accepts, '\n'); - if (dfa->syntax & RE_DOT_NOT_NULL) - bitset_clear (accepts, '\0'); - } -#ifdef RE_ENABLE_I18N - else if (type == OP_UTF8_PERIOD) - { - if (ASCII_CHARS % BITSET_WORD_BITS == 0) - memset (accepts, -1, ASCII_CHARS / CHAR_BIT); - else - bitset_merge (accepts, utf8_sb_map); - if (!(dfa->syntax & RE_DOT_NEWLINE)) - bitset_clear (accepts, '\n'); - if (dfa->syntax & RE_DOT_NOT_NULL) - bitset_clear (accepts, '\0'); - } -#endif - else - continue; - - /* Check the `accepts' and sift the characters which are not - match it the context. */ - if (constraint) - { - if (constraint & NEXT_NEWLINE_CONSTRAINT) - { - bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); - bitset_empty (accepts); - if (accepts_newline) - bitset_set (accepts, NEWLINE_CHAR); - else - continue; - } - if (constraint & NEXT_ENDBUF_CONSTRAINT) - { - bitset_empty (accepts); - continue; - } - - if (constraint & NEXT_WORD_CONSTRAINT) - { - bitset_word_t any_set = 0; - if (type == CHARACTER && !node->word_char) - { - bitset_empty (accepts); - continue; - } -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - for (j = 0; j < BITSET_WORDS; ++j) - any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); - else -#endif - for (j = 0; j < BITSET_WORDS; ++j) - any_set |= (accepts[j] &= dfa->word_char[j]); - if (!any_set) - continue; - } - if (constraint & NEXT_NOTWORD_CONSTRAINT) - { - bitset_word_t any_set = 0; - if (type == CHARACTER && node->word_char) - { - bitset_empty (accepts); - continue; - } -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - for (j = 0; j < BITSET_WORDS; ++j) - any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); - else -#endif - for (j = 0; j < BITSET_WORDS; ++j) - any_set |= (accepts[j] &= ~dfa->word_char[j]); - if (!any_set) - continue; - } - } - - /* Then divide `accepts' into DFA states, or create a new - state. Above, we make sure that accepts is not empty. */ - for (j = 0; j < ndests; ++j) - { - bitset_t intersec; /* Intersection sets, see below. */ - bitset_t remains; - /* Flags, see below. */ - bitset_word_t has_intersec, not_subset, not_consumed; - - /* Optimization, skip if this state doesn't accept the character. */ - if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) - continue; - - /* Enumerate the intersection set of this state and `accepts'. */ - has_intersec = 0; - for (k = 0; k < BITSET_WORDS; ++k) - has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; - /* And skip if the intersection set is empty. */ - if (!has_intersec) - continue; - - /* Then check if this state is a subset of `accepts'. */ - not_subset = not_consumed = 0; - for (k = 0; k < BITSET_WORDS; ++k) - { - not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; - not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; - } - - /* If this state isn't a subset of `accepts', create a - new group state, which has the `remains'. */ - if (not_subset) - { - bitset_copy (dests_ch[ndests], remains); - bitset_copy (dests_ch[j], intersec); - err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); - if (BE (err != REG_NOERROR, 0)) - goto error_return; - ++ndests; - } - - /* Put the position in the current group. */ - ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); - if (BE (! ok, 0)) - goto error_return; - - /* If all characters are consumed, go to next node. */ - if (!not_consumed) - break; - } - /* Some characters remain, create a new group. */ - if (j == ndests) - { - bitset_copy (dests_ch[ndests], accepts); - err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); - if (BE (err != REG_NOERROR, 0)) - goto error_return; - ++ndests; - bitset_empty (accepts); - } - } - return ndests; - error_return: - for (j = 0; j < ndests; ++j) - re_node_set_free (dests_node + j); - return REG_MISSING; -} - -#ifdef RE_ENABLE_I18N -/* Check how many bytes the node `dfa->nodes[node_idx]' accepts. - Return the number of the bytes the node accepts. - STR_IDX is the current index of the input string. - - This function handles the nodes which can accept one character, or - one collating element like '.', '[a-z]', opposite to the other nodes - can only accept one byte. */ - -static int -internal_function -check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, - const re_string_t *input, Idx str_idx) -{ - const re_token_t *node = dfa->nodes + node_idx; - int char_len, elem_len; - Idx i; - - if (BE (node->type == OP_UTF8_PERIOD, 0)) - { - unsigned char c = re_string_byte_at (input, str_idx), d; - if (BE (c < 0xc2, 1)) - return 0; - - if (str_idx + 2 > input->len) - return 0; - - d = re_string_byte_at (input, str_idx + 1); - if (c < 0xe0) - return (d < 0x80 || d > 0xbf) ? 0 : 2; - else if (c < 0xf0) - { - char_len = 3; - if (c == 0xe0 && d < 0xa0) - return 0; - } - else if (c < 0xf8) - { - char_len = 4; - if (c == 0xf0 && d < 0x90) - return 0; - } - else if (c < 0xfc) - { - char_len = 5; - if (c == 0xf8 && d < 0x88) - return 0; - } - else if (c < 0xfe) - { - char_len = 6; - if (c == 0xfc && d < 0x84) - return 0; - } - else - return 0; - - if (str_idx + char_len > input->len) - return 0; - - for (i = 1; i < char_len; ++i) - { - d = re_string_byte_at (input, str_idx + i); - if (d < 0x80 || d > 0xbf) - return 0; - } - return char_len; - } - - char_len = re_string_char_size_at (input, str_idx); - if (node->type == OP_PERIOD) - { - if (char_len <= 1) - return 0; - /* FIXME: I don't think this if is needed, as both '\n' - and '\0' are char_len == 1. */ - /* '.' accepts any one character except the following two cases. */ - if ((!(dfa->syntax & RE_DOT_NEWLINE) && - re_string_byte_at (input, str_idx) == '\n') || - ((dfa->syntax & RE_DOT_NOT_NULL) && - re_string_byte_at (input, str_idx) == '\0')) - return 0; - return char_len; - } - - elem_len = re_string_elem_size_at (input, str_idx); - if ((elem_len <= 1 && char_len <= 1) || char_len == 0) - return 0; - - if (node->type == COMPLEX_BRACKET) - { - const re_charset_t *cset = node->opr.mbcset; -# ifdef _LIBC - const unsigned char *pin - = ((const unsigned char *) re_string_get_buffer (input) + str_idx); - Idx j; - uint32_t nrules; -# endif /* _LIBC */ - int match_len = 0; - wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) - ? re_string_wchar_at (input, str_idx) : 0); - - /* match with multibyte character? */ - for (i = 0; i < cset->nmbchars; ++i) - if (wc == cset->mbchars[i]) - { - match_len = char_len; - goto check_node_accept_bytes_match; - } - /* match with character_class? */ - for (i = 0; i < cset->nchar_classes; ++i) - { - wctype_t wt = cset->char_classes[i]; - if (__iswctype (wc, wt)) - { - match_len = char_len; - goto check_node_accept_bytes_match; - } - } - -# ifdef _LIBC - nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - if (nrules != 0) - { - unsigned int in_collseq = 0; - const int32_t *table, *indirect; - const unsigned char *weights, *extra; - const char *collseqwc; - int32_t idx; - /* This #include defines a local function! */ -# include - - /* match with collating_symbol? */ - if (cset->ncoll_syms) - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); - for (i = 0; i < cset->ncoll_syms; ++i) - { - const unsigned char *coll_sym = extra + cset->coll_syms[i]; - /* Compare the length of input collating element and - the length of current collating element. */ - if (*coll_sym != elem_len) - continue; - /* Compare each bytes. */ - for (j = 0; j < *coll_sym; j++) - if (pin[j] != coll_sym[1 + j]) - break; - if (j == *coll_sym) - { - /* Match if every bytes is equal. */ - match_len = j; - goto check_node_accept_bytes_match; - } - } - - if (cset->nranges) - { - if (elem_len <= char_len) - { - collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); - in_collseq = __collseq_table_lookup (collseqwc, wc); - } - else - in_collseq = find_collation_sequence_value (pin, elem_len); - } - /* match with range expression? */ - for (i = 0; i < cset->nranges; ++i) - if (cset->range_starts[i] <= in_collseq - && in_collseq <= cset->range_ends[i]) - { - match_len = elem_len; - goto check_node_accept_bytes_match; - } - - /* match with equivalence_class? */ - if (cset->nequiv_classes) - { - const unsigned char *cp = pin; - table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - weights = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); - indirect = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); - int32_t idx = findidx (&cp); - if (idx > 0) - for (i = 0; i < cset->nequiv_classes; ++i) - { - int32_t equiv_class_idx = cset->equiv_classes[i]; - size_t weight_len = weights[idx & 0xffffff]; - if (weight_len == weights[equiv_class_idx & 0xffffff] - && (idx >> 24) == (equiv_class_idx >> 24)) - { - Idx cnt = 0; - - idx &= 0xffffff; - equiv_class_idx &= 0xffffff; - - while (cnt <= weight_len - && (weights[equiv_class_idx + 1 + cnt] - == weights[idx + 1 + cnt])) - ++cnt; - if (cnt > weight_len) - { - match_len = elem_len; - goto check_node_accept_bytes_match; - } - } - } - } - } - else -# endif /* _LIBC */ - { - /* match with range expression? */ -#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__) - wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; -#else - wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; - cmp_buf[2] = wc; -#endif - for (i = 0; i < cset->nranges; ++i) - { - cmp_buf[0] = cset->range_starts[i]; - cmp_buf[4] = cset->range_ends[i]; - if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 - && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) - { - match_len = char_len; - goto check_node_accept_bytes_match; - } - } - } - check_node_accept_bytes_match: - if (!cset->non_match) - return match_len; - else - { - if (match_len > 0) - return 0; - else - return (elem_len > char_len) ? elem_len : char_len; - } - } - return 0; -} - -# ifdef _LIBC -static unsigned int -internal_function -find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) -{ - uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - if (nrules == 0) - { - if (mbs_len == 1) - { - /* No valid character. Match it as a single byte character. */ - const unsigned char *collseq = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); - return collseq[mbs[0]]; - } - return UINT_MAX; - } - else - { - int32_t idx; - const unsigned char *extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); - int32_t extrasize = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; - - for (idx = 0; idx < extrasize;) - { - int mbs_cnt; - bool found = false; - int32_t elem_mbs_len; - /* Skip the name of collating element name. */ - idx = idx + extra[idx] + 1; - elem_mbs_len = extra[idx++]; - if (mbs_len == elem_mbs_len) - { - for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) - if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) - break; - if (mbs_cnt == elem_mbs_len) - /* Found the entry. */ - found = true; - } - /* Skip the byte sequence of the collating element. */ - idx += elem_mbs_len; - /* Adjust for the alignment. */ - idx = (idx + 3) & ~3; - /* Skip the collation sequence value. */ - idx += sizeof (uint32_t); - /* Skip the wide char sequence of the collating element. */ - idx = idx + sizeof (uint32_t) * (extra[idx] + 1); - /* If we found the entry, return the sequence value. */ - if (found) - return *(uint32_t *) (extra + idx); - /* Skip the collation sequence value. */ - idx += sizeof (uint32_t); - } - return UINT_MAX; - } -} -# endif /* _LIBC */ -#endif /* RE_ENABLE_I18N */ - -/* Check whether the node accepts the byte which is IDX-th - byte of the INPUT. */ - -static bool -internal_function -check_node_accept (const re_match_context_t *mctx, const re_token_t *node, - Idx idx) -{ - unsigned char ch; - ch = re_string_byte_at (&mctx->input, idx); - switch (node->type) - { - case CHARACTER: - if (node->opr.c != ch) - return false; - break; - - case SIMPLE_BRACKET: - if (!bitset_contain (node->opr.sbcset, ch)) - return false; - break; - -#ifdef RE_ENABLE_I18N - case OP_UTF8_PERIOD: - if (ch >= ASCII_CHARS) - return false; - /* FALLTHROUGH */ -#endif - case OP_PERIOD: - if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) - || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) - return false; - break; - - default: - return false; - } - - if (node->constraint) - { - /* The node has constraints. Check whether the current context - satisfies the constraints. */ - unsigned int context = re_string_context_at (&mctx->input, idx, - mctx->eflags); - if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) - return false; - } - - return true; -} - -/* Extend the buffers, if the buffers have run out. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -extend_buffers (re_match_context_t *mctx) -{ - reg_errcode_t ret; - re_string_t *pstr = &mctx->input; - - /* Avoid overflow. */ - if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0)) - return REG_ESPACE; - - /* Double the lengthes of the buffers. */ - ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); - if (BE (ret != REG_NOERROR, 0)) - return ret; - - if (mctx->state_log != NULL) - { - /* And double the length of state_log. */ - /* XXX We have no indication of the size of this buffer. If this - allocation fail we have no indication that the state_log array - does not have the right size. */ - re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, - pstr->bufs_len + 1); - if (BE (new_array == NULL, 0)) - return REG_ESPACE; - mctx->state_log = new_array; - } - - /* Then reconstruct the buffers. */ - if (pstr->icase) - { -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - { - ret = build_wcs_upper_buffer (pstr); - if (BE (ret != REG_NOERROR, 0)) - return ret; - } - else -#endif /* RE_ENABLE_I18N */ - build_upper_buffer (pstr); - } - else - { -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - build_wcs_buffer (pstr); - else -#endif /* RE_ENABLE_I18N */ - { - if (pstr->trans != NULL) - re_string_translate_buffer (pstr); - } - } - return REG_NOERROR; -} - - -/* Functions for matching context. */ - -/* Initialize MCTX. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) -{ - mctx->eflags = eflags; - mctx->match_last = REG_MISSING; - if (n > 0) - { - /* Avoid overflow. */ - size_t max_object_size = - MAX (sizeof (struct re_backref_cache_entry), - sizeof (re_sub_match_top_t *)); - if (BE (SIZE_MAX / max_object_size < n, 0)) - return REG_ESPACE; - - mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); - mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); - if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) - return REG_ESPACE; - } - /* Already zero-ed by the caller. - else - mctx->bkref_ents = NULL; - mctx->nbkref_ents = 0; - mctx->nsub_tops = 0; */ - mctx->abkref_ents = n; - mctx->max_mb_elem_len = 1; - mctx->asub_tops = n; - return REG_NOERROR; -} - -/* Clean the entries which depend on the current input in MCTX. - This function must be invoked when the matcher changes the start index - of the input, or changes the input string. */ - -static void -internal_function -match_ctx_clean (re_match_context_t *mctx) -{ - Idx st_idx; - for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) - { - Idx sl_idx; - re_sub_match_top_t *top = mctx->sub_tops[st_idx]; - for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) - { - re_sub_match_last_t *last = top->lasts[sl_idx]; - re_free (last->path.array); - re_free (last); - } - re_free (top->lasts); - if (top->path) - { - re_free (top->path->array); - re_free (top->path); - } - free (top); - } - - mctx->nsub_tops = 0; - mctx->nbkref_ents = 0; -} - -/* Free all the memory associated with MCTX. */ - -static void -internal_function -match_ctx_free (re_match_context_t *mctx) -{ - /* First, free all the memory associated with MCTX->SUB_TOPS. */ - match_ctx_clean (mctx); - re_free (mctx->sub_tops); - re_free (mctx->bkref_ents); -} - -/* Add a new backreference entry to MCTX. - Note that we assume that caller never call this function with duplicate - entry, and call with STR_IDX which isn't smaller than any existing entry. -*/ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, - Idx to) -{ - if (mctx->nbkref_ents >= mctx->abkref_ents) - { - struct re_backref_cache_entry* new_entry; - new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, - mctx->abkref_ents * 2); - if (BE (new_entry == NULL, 0)) - { - re_free (mctx->bkref_ents); - return REG_ESPACE; - } - mctx->bkref_ents = new_entry; - memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', - sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); - mctx->abkref_ents *= 2; - } - if (mctx->nbkref_ents > 0 - && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) - mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; - - mctx->bkref_ents[mctx->nbkref_ents].node = node; - mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; - mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; - mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; - - /* This is a cache that saves negative results of check_dst_limits_calc_pos. - If bit N is clear, means that this entry won't epsilon-transition to - an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If - it is set, check_dst_limits_calc_pos_1 will recurse and try to find one - such node. - - A backreference does not epsilon-transition unless it is empty, so set - to all zeros if FROM != TO. */ - mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map - = (from == to ? -1 : 0); - - mctx->bkref_ents[mctx->nbkref_ents++].more = 0; - if (mctx->max_mb_elem_len < to - from) - mctx->max_mb_elem_len = to - from; - return REG_NOERROR; -} - -/* Return the first entry with the same str_idx, or REG_MISSING if none is - found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ - -static Idx -internal_function -search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) -{ - Idx left, right, mid, last; - last = right = mctx->nbkref_ents; - for (left = 0; left < right;) - { - mid = (left + right) / 2; - if (mctx->bkref_ents[mid].str_idx < str_idx) - left = mid + 1; - else - right = mid; - } - if (left < last && mctx->bkref_ents[left].str_idx == str_idx) - return left; - else - return REG_MISSING; -} - -/* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches - at STR_IDX. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) -{ -#ifdef DEBUG - assert (mctx->sub_tops != NULL); - assert (mctx->asub_tops > 0); -#endif - if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) - { - Idx new_asub_tops = mctx->asub_tops * 2; - re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, - re_sub_match_top_t *, - new_asub_tops); - if (BE (new_array == NULL, 0)) - return REG_ESPACE; - mctx->sub_tops = new_array; - mctx->asub_tops = new_asub_tops; - } - mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); - if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) - return REG_ESPACE; - mctx->sub_tops[mctx->nsub_tops]->node = node; - mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; - return REG_NOERROR; -} - -/* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches - at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ - -static re_sub_match_last_t * -internal_function -match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) -{ - re_sub_match_last_t *new_entry; - if (BE (subtop->nlasts == subtop->alasts, 0)) - { - Idx new_alasts = 2 * subtop->alasts + 1; - re_sub_match_last_t **new_array = re_realloc (subtop->lasts, - re_sub_match_last_t *, - new_alasts); - if (BE (new_array == NULL, 0)) - return NULL; - subtop->lasts = new_array; - subtop->alasts = new_alasts; - } - new_entry = calloc (1, sizeof (re_sub_match_last_t)); - if (BE (new_entry != NULL, 1)) - { - subtop->lasts[subtop->nlasts] = new_entry; - new_entry->node = node; - new_entry->str_idx = str_idx; - ++subtop->nlasts; - } - return new_entry; -} - -static void -internal_function -sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, - re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) -{ - sctx->sifted_states = sifted_sts; - sctx->limited_states = limited_sts; - sctx->last_node = last_node; - sctx->last_str_idx = last_str_idx; - re_node_set_init_empty (&sctx->limits); -} diff --git a/gnulib/lib/rmdir.c b/gnulib/lib/rmdir.c deleted file mode 100644 index d7395a5..0000000 --- a/gnulib/lib/rmdir.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Work around rmdir bugs. - - Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include - -#include -#include - -#include "dosname.h" - -#undef rmdir - -/* Remove directory DIR. - Return 0 if successful, -1 if not. */ - -int -rpl_rmdir (char const *dir) -{ - /* Work around cygwin 1.5.x bug where rmdir("dir/./") succeeds. */ - size_t len = strlen (dir); - int result; - while (len && ISSLASH (dir[len - 1])) - len--; - if (len && dir[len - 1] == '.' && (1 == len || ISSLASH (dir[len - 2]))) - { - errno = EINVAL; - return -1; - } - result = rmdir (dir); - /* Work around mingw bug, where rmdir("file/") fails with EINVAL - instead of ENOTDIR. We've already filtered out trailing ., the - only reason allowed by POSIX for EINVAL. */ - if (result == -1 && errno == EINVAL) - errno = ENOTDIR; - return result; -} diff --git a/gnulib/lib/rpmatch.c b/gnulib/lib/rpmatch.c deleted file mode 100644 index ecc7917..0000000 --- a/gnulib/lib/rpmatch.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Determine whether string value is affirmation or negative response - according to current locale's data. - - Copyright (C) 1996, 1998, 2000, 2002-2003, 2006-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include - -#if ENABLE_NLS -# include -# include -# include -# if HAVE_LANGINFO_YESEXPR -# include -# endif -# include -# include "gettext.h" -# define _(msgid) gettext (msgid) -# define N_(msgid) gettext_noop (msgid) - -# if HAVE_LANGINFO_YESEXPR -/* Return the localized regular expression pattern corresponding to - ENGLISH_PATTERN. NL_INDEX can be used with nl_langinfo. - The resulting string may only be used until the next nl_langinfo call. */ -static const char * -localized_pattern (const char *english_pattern, nl_item nl_index, - bool posixly_correct) -{ - const char *translated_pattern; - - /* We prefer to get the patterns from a PO file. It would be possible to - always use nl_langinfo (YESEXPR) instead of _("^[yY]"), and - nl_langinfo (NOEXPR) instead of _("^[nN]"), if we could assume that the - system's locale support is good. But this is not the case e.g. on Cygwin. - The localizations of gnulib.pot are of better quality in general. - Also, if we use locale info from non-free systems that don't have a - 'localedef' command, we deprive the users of the freedom to localize - this pattern for their preferred language. - But some programs, such as 'cp', 'mv', 'rm', 'find', 'xargs', are - specified by POSIX to use nl_langinfo (YESEXPR). We implement this - behaviour if POSIXLY_CORRECT is set, for the sake of these programs. */ - - /* If the user wants strict POSIX compliance, use nl_langinfo. */ - if (posixly_correct) - { - translated_pattern = nl_langinfo (nl_index); - /* Check against a broken system return value. */ - if (translated_pattern != NULL && translated_pattern[0] != '\0') - return translated_pattern; - } - - /* Look in the gnulib message catalog. */ - translated_pattern = _(english_pattern); - if (translated_pattern == english_pattern) - { - /* The gnulib message catalog provides no translation. - Try the system's message catalog. */ - translated_pattern = nl_langinfo (nl_index); - /* Check against a broken system return value. */ - if (translated_pattern != NULL && translated_pattern[0] != '\0') - return translated_pattern; - /* Fall back to English. */ - translated_pattern = english_pattern; - } - return translated_pattern; -} -# else -# define localized_pattern(english_pattern,nl_index,posixly_correct) \ - _(english_pattern) -# endif - -static int -try (const char *response, const char *pattern, char **lastp, regex_t *re) -{ - if (*lastp == NULL || strcmp (pattern, *lastp) != 0) - { - char *safe_pattern; - - /* The pattern has changed. */ - if (*lastp != NULL) - { - /* Free the old compiled pattern. */ - regfree (re); - free (*lastp); - *lastp = NULL; - } - /* Put the PATTERN into safe memory before calling regcomp. - (regcomp may call nl_langinfo, overwriting PATTERN's storage. */ - safe_pattern = strdup (pattern); - if (safe_pattern == NULL) - return -1; - /* Compile the pattern and cache it for future runs. */ - if (regcomp (re, safe_pattern, REG_EXTENDED) != 0) - return -1; - *lastp = safe_pattern; - } - - /* See if the regular expression matches RESPONSE. */ - return regexec (re, response, 0, NULL, 0) == 0; -} -#endif - - -int -rpmatch (const char *response) -{ -#if ENABLE_NLS - /* Match against one of the response patterns, compiling the pattern - first if necessary. */ - - /* We cache the response patterns and compiled regexps here. */ - static char *last_yesexpr, *last_noexpr; - static regex_t cached_yesre, cached_nore; - -# if HAVE_LANGINFO_YESEXPR - bool posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL); -# endif - - const char *yesexpr, *noexpr; - int result; - - /* TRANSLATORS: A regular expression testing for an affirmative answer - (english: "yes"). Testing the first character may be sufficient. - Take care to consider upper and lower case. - To enquire the regular expression that your system uses for this - purpose, you can use the command - locale -k LC_MESSAGES | grep '^yesexpr=' */ - yesexpr = localized_pattern (N_("^[yY]"), YESEXPR, posixly_correct); - result = try (response, yesexpr, &last_yesexpr, &cached_yesre); - if (result < 0) - return -1; - if (result) - return 1; - - /* TRANSLATORS: A regular expression testing for a negative answer - (english: "no"). Testing the first character may be sufficient. - Take care to consider upper and lower case. - To enquire the regular expression that your system uses for this - purpose, you can use the command - locale -k LC_MESSAGES | grep '^noexpr=' */ - noexpr = localized_pattern (N_("^[nN]"), NOEXPR, posixly_correct); - result = try (response, noexpr, &last_noexpr, &cached_nore); - if (result < 0) - return -1; - if (result) - return 0; - - return -1; -#else - /* Test against "^[yY]" and "^[nN]", hardcoded to avoid requiring regex */ - return (*response == 'y' || *response == 'Y' ? 1 - : *response == 'n' || *response == 'N' ? 0 : -1); -#endif -} diff --git a/gnulib/lib/same-inode.h b/gnulib/lib/same-inode.h deleted file mode 100644 index d434b94..0000000 --- a/gnulib/lib/same-inode.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Determine whether two stat buffers refer to the same file. - - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef SAME_INODE_H -# define SAME_INODE_H 1 - -# define SAME_INODE(Stat_buf_1, Stat_buf_2) \ - ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ - && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) - -#endif diff --git a/gnulib/lib/same.c b/gnulib/lib/same.c deleted file mode 100644 index 3debcbf..0000000 --- a/gnulib/lib/same.c +++ /dev/null @@ -1,123 +0,0 @@ -/* Determine whether two file names refer to the same file. - - Copyright (C) 1997-2000, 2002-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#ifndef _POSIX_NAME_MAX -# define _POSIX_NAME_MAX 14 -#endif - -#include "same.h" -#include "dirname.h" -#include "error.h" -#include "same-inode.h" - -#ifndef MIN -# define MIN(a, b) ((a) < (b) ? (a) : (b)) -#endif - -/* Return nonzero if SOURCE and DEST point to the same name in the same - directory. */ - -bool -same_name (const char *source, const char *dest) -{ - /* Compare the basenames. */ - char const *source_basename = last_component (source); - char const *dest_basename = last_component (dest); - size_t source_baselen = base_len (source_basename); - size_t dest_baselen = base_len (dest_basename); - bool identical_basenames = - (source_baselen == dest_baselen - && memcmp (source_basename, dest_basename, dest_baselen) == 0); - bool compare_dirs = identical_basenames; - bool same = false; - -#if ! _POSIX_NO_TRUNC && HAVE_PATHCONF && defined _PC_NAME_MAX - /* This implementation silently truncates components of file names. If - the base names might be truncated, check whether the truncated - base names are the same, while checking the directories. */ - size_t slen_max = HAVE_LONG_FILE_NAMES ? 255 : _POSIX_NAME_MAX; - size_t min_baselen = MIN (source_baselen, dest_baselen); - if (slen_max <= min_baselen - && memcmp (source_basename, dest_basename, slen_max) == 0) - compare_dirs = true; -#endif - - if (compare_dirs) - { - struct stat source_dir_stats; - struct stat dest_dir_stats; - char *source_dirname, *dest_dirname; - - /* Compare the parent directories (via the device and inode numbers). */ - source_dirname = dir_name (source); - dest_dirname = dir_name (dest); - - if (stat (source_dirname, &source_dir_stats)) - { - /* Shouldn't happen. */ - error (1, errno, "%s", source_dirname); - } - - if (stat (dest_dirname, &dest_dir_stats)) - { - /* Shouldn't happen. */ - error (1, errno, "%s", dest_dirname); - } - - same = SAME_INODE (source_dir_stats, dest_dir_stats); - -#if ! _POSIX_NO_TRUNC && HAVE_PATHCONF && defined _PC_NAME_MAX - if (same && ! identical_basenames) - { - long name_max = (errno = 0, pathconf (dest_dirname, _PC_NAME_MAX)); - if (name_max < 0) - { - if (errno) - { - /* Shouldn't happen. */ - error (1, errno, "%s", dest_dirname); - } - same = false; - } - else - same = (name_max <= min_baselen - && memcmp (source_basename, dest_basename, name_max) == 0); - } -#endif - - free (source_dirname); - free (dest_dirname); - } - - return same; -} diff --git a/gnulib/lib/same.h b/gnulib/lib/same.h deleted file mode 100644 index 6206cba..0000000 --- a/gnulib/lib/same.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Determine whether two file names refer to the same file. - - Copyright (C) 1997-2000, 2003-2004, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef SAME_H_ -# define SAME_H_ 1 - -# include - -bool same_name (const char *source, const char *dest); - -#endif /* SAME_H_ */ diff --git a/gnulib/lib/save-cwd.c b/gnulib/lib/save-cwd.c deleted file mode 100644 index 16ffa2c..0000000 --- a/gnulib/lib/save-cwd.c +++ /dev/null @@ -1,98 +0,0 @@ -/* save-cwd.c -- Save and restore current working directory. - - Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -#include "save-cwd.h" - -#include -#include -#include -#include -#include - -#include "chdir-long.h" -#include "unistd--.h" -#include "cloexec.h" - -#if GNULIB_FCNTL_SAFER -# include "fcntl--.h" -#else -# define GNULIB_FCNTL_SAFER 0 -#endif - -/* Record the location of the current working directory in CWD so that - the program may change to other directories and later use restore_cwd - to return to the recorded location. This function may allocate - space using malloc (via getcwd) or leave a file descriptor open; - use free_cwd to perform the necessary free or close. Upon failure, - no memory is allocated, any locally opened file descriptors are - closed; return non-zero -- in that case, free_cwd need not be - called, but doing so is ok. Otherwise, return zero. - - The `raison d'etre' for this interface is that the working directory - is sometimes inaccessible, and getcwd is not robust or as efficient. - So, we prefer to use the open/fchdir approach, but fall back on - getcwd if necessary. - - Some systems lack fchdir altogether: e.g., OS/2, pre-2001 Cygwin, - SCO Xenix. Also, SunOS 4 and Irix 5.3 provide the function, yet it - doesn't work for partitions on which auditing is enabled. If - you're still using an obsolete system with these problems, please - send email to the maintainer of this code. */ - -int -save_cwd (struct saved_cwd *cwd) -{ - cwd->name = NULL; - - cwd->desc = open (".", O_SEARCH); - if (!GNULIB_FCNTL_SAFER) - cwd->desc = fd_safer (cwd->desc); - if (cwd->desc < 0) - { - cwd->name = getcwd (NULL, 0); - return cwd->name ? 0 : -1; - } - - set_cloexec_flag (cwd->desc, true); - return 0; -} - -/* Change to recorded location, CWD, in directory hierarchy. - Upon failure, return -1 (errno is set by chdir or fchdir). - Upon success, return zero. */ - -int -restore_cwd (const struct saved_cwd *cwd) -{ - if (0 <= cwd->desc) - return fchdir (cwd->desc); - else - return chdir_long (cwd->name); -} - -void -free_cwd (struct saved_cwd *cwd) -{ - if (cwd->desc >= 0) - close (cwd->desc); - free (cwd->name); -} diff --git a/gnulib/lib/save-cwd.h b/gnulib/lib/save-cwd.h deleted file mode 100644 index 983f890..0000000 --- a/gnulib/lib/save-cwd.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Save and restore current working directory. - - Copyright (C) 1995, 1997-1998, 2003, 2009-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#ifndef SAVE_CWD_H -# define SAVE_CWD_H 1 - -struct saved_cwd - { - int desc; - char *name; - }; - -int save_cwd (struct saved_cwd *cwd); -int restore_cwd (const struct saved_cwd *cwd); -void free_cwd (struct saved_cwd *cwd); - -#endif /* SAVE_CWD_H */ diff --git a/gnulib/lib/savedir.c b/gnulib/lib/savedir.c deleted file mode 100644 index 3e8762a..0000000 --- a/gnulib/lib/savedir.c +++ /dev/null @@ -1,145 +0,0 @@ -/* savedir.c -- save the list of files in a directory in a string - - Copyright (C) 1990, 1997-2001, 2003-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by David MacKenzie . */ - -#include - -#include "savedir.h" - -#include - -#include - -#include "dirent--.h" -#ifndef _D_EXACT_NAMLEN -# define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name) -#endif - -#include -#include -#include - -#include "xalloc.h" - -#ifndef NAME_SIZE_DEFAULT -# define NAME_SIZE_DEFAULT 512 -#endif - -/* Return a freshly allocated string containing the file names - in directory DIRP, separated by '\0' characters; - the end is marked by two '\0' characters in a row. - Return NULL (setting errno) if DIRP cannot be read. - If DIRP is NULL, return NULL without affecting errno. */ - -char * -streamsavedir (DIR *dirp) -{ - char *name_space; - size_t allocated = NAME_SIZE_DEFAULT; - size_t used = 0; - int save_errno; - - if (dirp == NULL) - return NULL; - - name_space = xmalloc (allocated); - - for (;;) - { - struct dirent const *dp; - char const *entry; - - errno = 0; - dp = readdir (dirp); - if (! dp) - break; - - /* Skip "", ".", and "..". "" is returned by at least one buggy - implementation: Solaris 2.4 readdir on NFS file systems. */ - entry = dp->d_name; - if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0') - { - size_t entry_size = _D_EXACT_NAMLEN (dp) + 1; - if (used + entry_size < used) - xalloc_die (); - if (allocated <= used + entry_size) - { - do - { - if (2 * allocated < allocated) - xalloc_die (); - allocated *= 2; - } - while (allocated <= used + entry_size); - - name_space = xrealloc (name_space, allocated); - } - memcpy (name_space + used, entry, entry_size); - used += entry_size; - } - } - name_space[used] = '\0'; - save_errno = errno; - if (save_errno != 0) - { - free (name_space); - errno = save_errno; - return NULL; - } - return name_space; -} - -/* Like savedirstreamp (DIRP), except also close DIRP. */ - -static char * -savedirstream (DIR *dirp) -{ - char *name_space = streamsavedir (dirp); - if (dirp && closedir (dirp) != 0) - { - int save_errno = errno; - free (name_space); - errno = save_errno; - return NULL; - } - return name_space; -} - -/* Return a freshly allocated string containing the file names - in directory DIR, separated by '\0' characters; - the end is marked by two '\0' characters in a row. - Return NULL (setting errno) if DIR cannot be opened, read, or closed. */ - -char * -savedir (char const *dir) -{ - return savedirstream (opendir (dir)); -} - -/* Return a freshly allocated string containing the file names - in directory FD, separated by '\0' characters; - the end is marked by two '\0' characters in a row. - Return NULL (setting errno) if FD cannot be read or closed. */ - -/* deprecated */ -char * -fdsavedir (int fd) -{ - return savedirstream (fdopendir (fd)); -} diff --git a/gnulib/lib/savedir.h b/gnulib/lib/savedir.h deleted file mode 100644 index d935b16..0000000 --- a/gnulib/lib/savedir.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Save the list of files in a directory in a string. - - Copyright (C) 1997, 1999, 2001, 2003, 2005, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by David MacKenzie . */ - -#ifndef _GL_SAVEDIR_H -#define _GL_SAVEDIR_H - -#include -char *streamsavedir (DIR *dirp); -char *savedir (char const *dir); -char *fdsavedir (int fd); /* deprecated */ - -#endif diff --git a/gnulib/lib/se-context.in.h b/gnulib/lib/se-context.in.h deleted file mode 100644 index cb7419a..0000000 --- a/gnulib/lib/se-context.in.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef SELINUX_CONTEXT_H -# define SELINUX_CONTEXT_H - -# include - -/* The definition of _GL_UNUSED_PARAMETER is copied here. */ - -typedef int context_t; -static inline context_t context_new (char const *s _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return 0; } -static inline char *context_str (context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return (void *) 0; } -static inline void context_free (context_t c _GL_UNUSED_PARAMETER) {} - -static inline int context_user_set (context_t sc _GL_UNUSED_PARAMETER, - char const *s _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int context_role_set (context_t sc _GL_UNUSED_PARAMETER, - char const *s _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int context_range_set (context_t sc _GL_UNUSED_PARAMETER, - char const *s _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int context_type_set (context_t sc _GL_UNUSED_PARAMETER, - char const *s _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } - -#endif diff --git a/gnulib/lib/se-selinux.in.h b/gnulib/lib/se-selinux.in.h deleted file mode 100644 index 39f5881..0000000 --- a/gnulib/lib/se-selinux.in.h +++ /dev/null @@ -1,97 +0,0 @@ -/* Replacement for platforms that lack it. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_SELINUX_SELINUX_H -# define _GL_SELINUX_SELINUX_H - -# if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -# endif -@PRAGMA_COLUMNS@ - -# if HAVE_SELINUX_SELINUX_H - -#@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@ - -# else - -# include -# include - -/* The definition of _GL_UNUSED_PARAMETER is copied here. */ - -# if !GNULIB_defined_security_types - -typedef unsigned short security_class_t; -# define security_context_t char* -# define is_selinux_enabled() 0 - -static inline int getcon (security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline void freecon (security_context_t con _GL_UNUSED_PARAMETER) {} - - -static inline int getfscreatecon (security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int setfscreatecon (security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int matchpathcon (char const *file _GL_UNUSED_PARAMETER, - mode_t m _GL_UNUSED_PARAMETER, - security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int getfilecon (char const *file _GL_UNUSED_PARAMETER, - security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int lgetfilecon (char const *file _GL_UNUSED_PARAMETER, - security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int fgetfilecon (int fd, - security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int setfilecon (char const *file _GL_UNUSED_PARAMETER, - security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int lsetfilecon (char const *file _GL_UNUSED_PARAMETER, - security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int fsetfilecon (int fd _GL_UNUSED_PARAMETER, - security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } - -static inline int security_check_context - (security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int security_check_context_raw - (security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int setexeccon (security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int security_compute_create - (security_context_t scon _GL_UNUSED_PARAMETER, - security_context_t tcon _GL_UNUSED_PARAMETER, - security_class_t tclass _GL_UNUSED_PARAMETER, - security_context_t *newcon _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int matchpathcon_init_prefix - (char const *path _GL_UNUSED_PARAMETER, - char const *prefix _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } - -# define GNULIB_defined_security_types 1 -# endif - -# endif -#endif /* _GL_SELINUX_SELINUX_H */ diff --git a/gnulib/lib/selinux-at.c b/gnulib/lib/selinux-at.c deleted file mode 100644 index 0aa918f..0000000 --- a/gnulib/lib/selinux-at.c +++ /dev/null @@ -1,72 +0,0 @@ -/* openat-style fd-relative functions for SE Linux - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Jim Meyering */ - -#include - -#include "selinux-at.h" -#include "openat.h" - -#include -#include -#include -#include - -#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ -#include "save-cwd.h" - -#include "openat-priv.h" - -#define AT_FUNC_NAME getfileconat -#define AT_FUNC_F1 getfilecon -#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t *con -#define AT_FUNC_POST_FILE_ARGS , con -#include "at-func.c" -#undef AT_FUNC_NAME -#undef AT_FUNC_F1 -#undef AT_FUNC_POST_FILE_PARAM_DECLS -#undef AT_FUNC_POST_FILE_ARGS - -#define AT_FUNC_NAME lgetfileconat -#define AT_FUNC_F1 lgetfilecon -#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t *con -#define AT_FUNC_POST_FILE_ARGS , con -#include "at-func.c" -#undef AT_FUNC_NAME -#undef AT_FUNC_F1 -#undef AT_FUNC_POST_FILE_PARAM_DECLS -#undef AT_FUNC_POST_FILE_ARGS - -#define AT_FUNC_NAME setfileconat -#define AT_FUNC_F1 setfilecon -#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t con -#define AT_FUNC_POST_FILE_ARGS , con -#include "at-func.c" -#undef AT_FUNC_NAME -#undef AT_FUNC_F1 -#undef AT_FUNC_POST_FILE_PARAM_DECLS -#undef AT_FUNC_POST_FILE_ARGS - -#define AT_FUNC_NAME lsetfileconat -#define AT_FUNC_F1 lsetfilecon -#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t con -#define AT_FUNC_POST_FILE_ARGS , con -#include "at-func.c" -#undef AT_FUNC_NAME -#undef AT_FUNC_F1 -#undef AT_FUNC_POST_FILE_PARAM_DECLS -#undef AT_FUNC_POST_FILE_ARGS diff --git a/gnulib/lib/selinux-at.h b/gnulib/lib/selinux-at.h deleted file mode 100644 index 5fa3333..0000000 --- a/gnulib/lib/selinux-at.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Prototypes for openat-style fd-relative SELinux functions - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include -#include - -/* These are the dir-fd-relative variants of the functions without the - "at" suffix. For example, getfileconat (AT_FDCWD, file, &c) is usually - equivalent to getfilecon (file, &c). The emulation is accomplished - by first attempting getfilecon ("/proc/self/fd/DIR_FD/FILE", &c). - Failing that, simulate it via save_cwd/fchdir/getfilecon/restore_cwd. - If either the save_cwd or the restore_cwd fails (relatively unlikely), - then give a diagnostic and exit nonzero. */ - -/* dir-fd-relative getfilecon. Set *CON to the SELinux security context - of the file specified by DIR_FD and FILE and return the length of *CON. - DIR_FD and FILE are interpreted as for fstatat[*]. A non-NULL *CON - must be freed with freecon. Upon error, set *CON to NULL, set errno - and return -1. - [*] with flags=0 here, with flags=AT_SYMLINK_NOFOLLOW for lgetfileconat */ -int getfileconat (int dir_fd, char const *file, security_context_t *con); - -/* dir-fd-relative lgetfilecon. This function is just like getfileconat, - except when DIR_FD and FILE specify a symlink: lgetfileconat operates on - the symlink, while getfileconat operates on the referent of the symlink. */ -int lgetfileconat (int dir_fd, char const *file, security_context_t *con); - -/* dir-fd-relative setfilecon. Set the SELinux security context of - the file specified by DIR_FD and FILE to CON. DIR_FD and FILE are - interpreted as for fstatat[*]. Upon success, return 0. - Otherwise, return -1 and set errno. */ -int setfileconat (int dir_fd, char const *file, security_context_t con); - -/* dir-fd-relative lsetfilecon. This function is just like setfileconat, - except that rather than dereferencing a symlink, this function affects it. */ -/* dir-fd-relative lsetfilecon. This function is just like setfileconat, - except when DIR_FD and FILE specify a symlink: lsetfileconat operates on - the symlink, while setfileconat operates on the referent of the symlink. */ -int lsetfileconat (int dir_fd, char const *file, security_context_t con); diff --git a/gnulib/lib/setenv.c b/gnulib/lib/setenv.c deleted file mode 100644 index 7c06192..0000000 --- a/gnulib/lib/setenv.c +++ /dev/null @@ -1,390 +0,0 @@ -/* Copyright (C) 1992, 1995-2003, 2005-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if !_LIBC -# include -#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 - -/* Specification. */ -#include - -#include -#ifndef __set_errno -# define __set_errno(ev) ((errno) = (ev)) -#endif - -#include -#if _LIBC || HAVE_UNISTD_H -# include -#endif - -#if !_LIBC -# include "malloca.h" -#endif - -#if _LIBC || !HAVE_SETENV - -#if !_LIBC -# define __environ environ -#endif - -#if _LIBC -/* This lock protects against simultaneous modifications of `environ'. */ -# include -__libc_lock_define_initialized (static, envlock) -# define LOCK __libc_lock_lock (envlock) -# define UNLOCK __libc_lock_unlock (envlock) -#else -# define LOCK -# define UNLOCK -#endif - -/* In the GNU C library we must keep the namespace clean. */ -#ifdef _LIBC -# define setenv __setenv -# define clearenv __clearenv -# define tfind __tfind -# define tsearch __tsearch -#else -/* Use the system functions, not the gnulib overrides in this file. */ -# undef malloc -# undef realloc -#endif - -/* In the GNU C library implementation we try to be more clever and - allow arbitrarily many changes of the environment given that the used - values are from a small set. Outside glibc this will eat up all - memory after a while. */ -#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \ - && defined __GNUC__) -# define USE_TSEARCH 1 -# include -typedef int (*compar_fn_t) (const void *, const void *); - -/* This is a pointer to the root of the search tree with the known - values. */ -static void *known_values; - -# define KNOWN_VALUE(Str) \ - ({ \ - void *value = tfind (Str, &known_values, (compar_fn_t) strcmp); \ - value != NULL ? *(char **) value : NULL; \ - }) -# define STORE_VALUE(Str) \ - tsearch (Str, &known_values, (compar_fn_t) strcmp) - -#else -# undef USE_TSEARCH - -# define KNOWN_VALUE(Str) NULL -# define STORE_VALUE(Str) do { } while (0) - -#endif - - -/* If this variable is not a null pointer we allocated the current - environment. */ -static char **last_environ; - - -/* This function is used by `setenv' and `putenv'. The difference between - the two functions is that for the former must create a new string which - is then placed in the environment, while the argument of `putenv' - must be used directly. This is all complicated by the fact that we try - to reuse values once generated for a `setenv' call since we can never - free the strings. */ -int -__add_to_environ (const char *name, const char *value, const char *combined, - int replace) -{ - char **ep; - size_t size; - const size_t namelen = strlen (name); - const size_t vallen = value != NULL ? strlen (value) + 1 : 0; - - LOCK; - - /* We have to get the pointer now that we have the lock and not earlier - since another thread might have created a new environment. */ - ep = __environ; - - size = 0; - if (ep != NULL) - { - for (; *ep != NULL; ++ep) - if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=') - break; - else - ++size; - } - - if (ep == NULL || *ep == NULL) - { - char **new_environ; -#ifdef USE_TSEARCH - char *new_value; -#endif - - /* We allocated this space; we can extend it. */ - new_environ = - (char **) (last_environ == NULL - ? malloc ((size + 2) * sizeof (char *)) - : realloc (last_environ, (size + 2) * sizeof (char *))); - if (new_environ == NULL) - { - /* It's easier to set errno to ENOMEM than to rely on the - 'malloc-posix' and 'realloc-posix' gnulib modules. */ - __set_errno (ENOMEM); - UNLOCK; - return -1; - } - - /* If the whole entry is given add it. */ - if (combined != NULL) - /* We must not add the string to the search tree since it belongs - to the user. */ - new_environ[size] = (char *) combined; - else - { - /* See whether the value is already known. */ -#ifdef USE_TSEARCH -# ifdef _LIBC - new_value = (char *) alloca (namelen + 1 + vallen); - __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), - value, vallen); -# else - new_value = (char *) malloca (namelen + 1 + vallen); - if (new_value == NULL) - { - __set_errno (ENOMEM); - UNLOCK; - return -1; - } - memcpy (new_value, name, namelen); - new_value[namelen] = '='; - memcpy (&new_value[namelen + 1], value, vallen); -# endif - - new_environ[size] = KNOWN_VALUE (new_value); - if (new_environ[size] == NULL) -#endif - { - new_environ[size] = (char *) malloc (namelen + 1 + vallen); - if (new_environ[size] == NULL) - { -#if defined USE_TSEARCH && !defined _LIBC - freea (new_value); -#endif - __set_errno (ENOMEM); - UNLOCK; - return -1; - } - -#ifdef USE_TSEARCH - memcpy (new_environ[size], new_value, namelen + 1 + vallen); -#else - memcpy (new_environ[size], name, namelen); - new_environ[size][namelen] = '='; - memcpy (&new_environ[size][namelen + 1], value, vallen); -#endif - /* And save the value now. We cannot do this when we remove - the string since then we cannot decide whether it is a - user string or not. */ - STORE_VALUE (new_environ[size]); - } -#if defined USE_TSEARCH && !defined _LIBC - freea (new_value); -#endif - } - - if (__environ != last_environ) - memcpy ((char *) new_environ, (char *) __environ, - size * sizeof (char *)); - - new_environ[size + 1] = NULL; - - last_environ = __environ = new_environ; - } - else if (replace) - { - char *np; - - /* Use the user string if given. */ - if (combined != NULL) - np = (char *) combined; - else - { -#ifdef USE_TSEARCH - char *new_value; -# ifdef _LIBC - new_value = alloca (namelen + 1 + vallen); - __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), - value, vallen); -# else - new_value = malloca (namelen + 1 + vallen); - if (new_value == NULL) - { - __set_errno (ENOMEM); - UNLOCK; - return -1; - } - memcpy (new_value, name, namelen); - new_value[namelen] = '='; - memcpy (&new_value[namelen + 1], value, vallen); -# endif - - np = KNOWN_VALUE (new_value); - if (np == NULL) -#endif - { - np = (char *) malloc (namelen + 1 + vallen); - if (np == NULL) - { -#if defined USE_TSEARCH && !defined _LIBC - freea (new_value); -#endif - __set_errno (ENOMEM); - UNLOCK; - return -1; - } - -#ifdef USE_TSEARCH - memcpy (np, new_value, namelen + 1 + vallen); -#else - memcpy (np, name, namelen); - np[namelen] = '='; - memcpy (&np[namelen + 1], value, vallen); -#endif - /* And remember the value. */ - STORE_VALUE (np); - } -#if defined USE_TSEARCH && !defined _LIBC - freea (new_value); -#endif - } - - *ep = np; - } - - UNLOCK; - - return 0; -} - -int -setenv (const char *name, const char *value, int replace) -{ - if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) - { - __set_errno (EINVAL); - return -1; - } - - return __add_to_environ (name, value, NULL, replace); -} - -/* The `clearenv' was planned to be added to POSIX.1 but probably - never made it. Nevertheless the POSIX.9 standard (POSIX bindings - for Fortran 77) requires this function. */ -int -clearenv (void) -{ - LOCK; - - if (__environ == last_environ && __environ != NULL) - { - /* We allocated this environment so we can free it. */ - free (__environ); - last_environ = NULL; - } - - /* Clear the environment pointer removes the whole environment. */ - __environ = NULL; - - UNLOCK; - - return 0; -} - -#ifdef _LIBC -static void -free_mem (void) -{ - /* Remove all traces. */ - clearenv (); - - /* Now remove the search tree. */ - __tdestroy (known_values, free); - known_values = NULL; -} -text_set_element (__libc_subfreeres, free_mem); - - -# undef setenv -# undef clearenv -weak_alias (__setenv, setenv) -weak_alias (__clearenv, clearenv) -#endif - -#endif /* _LIBC || !HAVE_SETENV */ - -/* The rest of this file is called into use when replacing an existing - but buggy setenv. Known bugs include failure to diagnose invalid - name, and consuming a leading '=' from value. */ -#if HAVE_SETENV - -# undef setenv -# define STREQ(a, b) (strcmp (a, b) == 0) - -int -rpl_setenv (const char *name, const char *value, int replace) -{ - int result; - if (!name || !*name || strchr (name, '=')) - { - errno = EINVAL; - return -1; - } - /* Call the real setenv even if replace is 0, in case implementation - has underlying data to update, such as when environ changes. */ - result = setenv (name, value, replace); - if (result == 0 && replace && *value == '=') - { - char *tmp = getenv (name); - if (!STREQ (tmp, value)) - { - int saved_errno; - size_t len = strlen (value); - tmp = malloca (len + 2); - /* Since leading '=' is eaten, double it up. */ - *tmp = '='; - memcpy (tmp + 1, value, len + 1); - result = setenv (name, tmp, replace); - saved_errno = errno; - freea (tmp); - errno = saved_errno; - } - } - return result; -} - -#endif /* HAVE_SETENV */ diff --git a/gnulib/lib/size_max.h b/gnulib/lib/size_max.h deleted file mode 100644 index d5f3152..0000000 --- a/gnulib/lib/size_max.h +++ /dev/null @@ -1,31 +0,0 @@ -/* size_max.h -- declare SIZE_MAX through system headers - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef GNULIB_SIZE_MAX_H -#define GNULIB_SIZE_MAX_H - -/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ -# include -/* Get SIZE_MAX declaration on systems like glibc 2. */ -# if HAVE_STDINT_H -# include -# endif -/* On systems where these include files don't define it, SIZE_MAX is defined - in config.h. */ - -#endif /* GNULIB_SIZE_MAX_H */ diff --git a/gnulib/lib/snprintf.c b/gnulib/lib/snprintf.c deleted file mode 100644 index 9db2379..0000000 --- a/gnulib/lib/snprintf.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Formatted output to strings. - Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc. - Written by Simon Josefsson and Paul Eggert. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include - -#include -#include -#include -#include -#include - -#include "vasnprintf.h" - -/* Print formatted output to string STR. Similar to sprintf, but - additional length SIZE limit how much is written into STR. Returns - string length of formatted string (which may be larger than SIZE). - STR may be NULL, in which case nothing will be written. On error, - return a negative value. */ -int -snprintf (char *str, size_t size, const char *format, ...) -{ - char *output; - size_t len; - size_t lenbuf = size; - va_list args; - - va_start (args, format); - output = vasnprintf (str, &lenbuf, format, args); - len = lenbuf; - va_end (args); - - if (!output) - return -1; - - if (output != str) - { - if (size) - { - size_t pruned_len = (len < size ? len : size - 1); - memcpy (str, output, pruned_len); - str[pruned_len] = '\0'; - } - - free (output); - } - - if (INT_MAX < len) - { - errno = EOVERFLOW; - return -1; - } - - return len; -} diff --git a/gnulib/lib/stat-time.h b/gnulib/lib/stat-time.h deleted file mode 100644 index 8a11978..0000000 --- a/gnulib/lib/stat-time.h +++ /dev/null @@ -1,187 +0,0 @@ -/* stat-related time functions. - - Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#ifndef STAT_TIME_H -#define STAT_TIME_H 1 - -#include -#include - -/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type - struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, - ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, - if available. ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim - for access, status change, data modification, or birth (creation) - time respectively. - - These macros are private to stat-time.h. */ -#if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC -# ifdef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC -# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) -# else -# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec) -# endif -#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC -# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec) -#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC -# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec) -#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC -# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec) -#endif - -/* Return the nanosecond component of *ST's access time. */ -static inline long int -get_stat_atime_ns (struct stat const *st) -{ -# if defined STAT_TIMESPEC - return STAT_TIMESPEC (st, st_atim).tv_nsec; -# elif defined STAT_TIMESPEC_NS - return STAT_TIMESPEC_NS (st, st_atim); -# else - return 0; -# endif -} - -/* Return the nanosecond component of *ST's status change time. */ -static inline long int -get_stat_ctime_ns (struct stat const *st) -{ -# if defined STAT_TIMESPEC - return STAT_TIMESPEC (st, st_ctim).tv_nsec; -# elif defined STAT_TIMESPEC_NS - return STAT_TIMESPEC_NS (st, st_ctim); -# else - return 0; -# endif -} - -/* Return the nanosecond component of *ST's data modification time. */ -static inline long int -get_stat_mtime_ns (struct stat const *st) -{ -# if defined STAT_TIMESPEC - return STAT_TIMESPEC (st, st_mtim).tv_nsec; -# elif defined STAT_TIMESPEC_NS - return STAT_TIMESPEC_NS (st, st_mtim); -# else - return 0; -# endif -} - -/* Return the nanosecond component of *ST's birth time. */ -static inline long int -get_stat_birthtime_ns (struct stat const *st) -{ -# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC - return STAT_TIMESPEC (st, st_birthtim).tv_nsec; -# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC - return STAT_TIMESPEC_NS (st, st_birthtim); -# else - /* Avoid a "parameter unused" warning. */ - (void) st; - return 0; -# endif -} - -/* Return *ST's access time. */ -static inline struct timespec -get_stat_atime (struct stat const *st) -{ -#ifdef STAT_TIMESPEC - return STAT_TIMESPEC (st, st_atim); -#else - struct timespec t; - t.tv_sec = st->st_atime; - t.tv_nsec = get_stat_atime_ns (st); - return t; -#endif -} - -/* Return *ST's status change time. */ -static inline struct timespec -get_stat_ctime (struct stat const *st) -{ -#ifdef STAT_TIMESPEC - return STAT_TIMESPEC (st, st_ctim); -#else - struct timespec t; - t.tv_sec = st->st_ctime; - t.tv_nsec = get_stat_ctime_ns (st); - return t; -#endif -} - -/* Return *ST's data modification time. */ -static inline struct timespec -get_stat_mtime (struct stat const *st) -{ -#ifdef STAT_TIMESPEC - return STAT_TIMESPEC (st, st_mtim); -#else - struct timespec t; - t.tv_sec = st->st_mtime; - t.tv_nsec = get_stat_mtime_ns (st); - return t; -#endif -} - -/* Return *ST's birth time, if available; otherwise return a value - with negative tv_nsec. */ -static inline struct timespec -get_stat_birthtime (struct stat const *st) -{ - struct timespec t; - -#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ - || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC) - t = STAT_TIMESPEC (st, st_birthtim); -#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC - t.tv_sec = st->st_birthtime; - t.tv_nsec = st->st_birthtimensec; -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* Woe32 native platforms (but not Cygwin) put the "file creation - time" in st_ctime (!). See - . */ - t.tv_sec = st->st_ctime; - t.tv_nsec = 0; -#else - /* Birth time is not supported. Set tv_sec to avoid undefined behavior. */ - t.tv_sec = -1; - t.tv_nsec = -1; - /* Avoid a "parameter unused" warning. */ - (void) st; -#endif - -#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ - || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \ - || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) - /* FreeBSD and NetBSD sometimes signal the absence of knowledge by - using zero. Attempt to work around this problem. Alas, this can - report failure even for valid time stamps. Also, NetBSD - sometimes returns junk in the birth time fields; work around this - bug if it it is detected. There's no need to detect negative - tv_nsec junk as negative tv_nsec already indicates an error. */ - if (t.tv_sec == 0 || 1000000000 <= t.tv_nsec) - t.tv_nsec = -1; -#endif - - return t; -} - -#endif diff --git a/gnulib/lib/stat.c b/gnulib/lib/stat.c deleted file mode 100644 index cbc9100..0000000 --- a/gnulib/lib/stat.c +++ /dev/null @@ -1,105 +0,0 @@ -/* Work around platform bugs in stat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Eric Blake */ - -#include - -/* Get the original definition of stat. It might be defined as a macro. */ -#define __need_system_sys_stat_h -#include -#include -#undef __need_system_sys_stat_h - -static inline int -orig_stat (const char *filename, struct stat *buf) -{ - return stat (filename, buf); -} - -/* Specification. */ -#include - -#include -#include -#include -#include -#include "dosname.h" - -/* Store information about NAME into ST. Work around bugs with - trailing slashes. Mingw has other bugs (such as st_ino always - being 0 on success) which this wrapper does not work around. But - at least this implementation provides the ability to emulate fchdir - correctly. */ - -int -rpl_stat (char const *name, struct stat *st) -{ - int result = orig_stat (name, st); -#if REPLACE_FUNC_STAT_FILE - /* Solaris 9 mistakenly succeeds when given a non-directory with a - trailing slash. */ - if (result == 0 && !S_ISDIR (st->st_mode)) - { - size_t len = strlen (name); - if (ISSLASH (name[len - 1])) - { - errno = ENOTDIR; - return -1; - } - } -#endif /* REPLACE_FUNC_STAT_FILE */ -#if REPLACE_FUNC_STAT_DIR - if (result == -1 && errno == ENOENT) - { - /* Due to mingw's oddities, there are some directories (like - c:\) where stat() only succeeds with a trailing slash, and - other directories (like c:\windows) where stat() only - succeeds without a trailing slash. But we want the two to be - synonymous, since chdir() manages either style. Likewise, Mingw also - reports ENOENT for names longer than PATH_MAX, when we want - ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR. - Fortunately, mingw PATH_MAX is small enough for stack - allocation. */ - char fixed_name[PATH_MAX + 1] = {0}; - size_t len = strlen (name); - bool check_dir = false; - if (PATH_MAX <= len) - errno = ENAMETOOLONG; - else if (len) - { - strcpy (fixed_name, name); - if (ISSLASH (fixed_name[len - 1])) - { - check_dir = true; - while (len && ISSLASH (fixed_name[len - 1])) - fixed_name[--len] = '\0'; - if (!len) - fixed_name[0] = '/'; - } - else - fixed_name[len++] = '/'; - result = orig_stat (fixed_name, st); - if (result == 0 && check_dir && !S_ISDIR (st->st_mode)) - { - result = -1; - errno = ENOTDIR; - } - } - } -#endif /* REPLACE_FUNC_STAT_DIR */ - return result; -} diff --git a/gnulib/lib/stdarg.in.h b/gnulib/lib/stdarg.in.h deleted file mode 100644 index 4469d54..0000000 --- a/gnulib/lib/stdarg.in.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Substitute for and wrapper around . - Copyright (C) 2008-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GL_STDARG_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDARG_H@ - -#ifndef _GL_STDARG_H -#define _GL_STDARG_H - -#ifndef va_copy -# define va_copy(a,b) ((a) = (b)) -#endif - -#endif /* _GL_STDARG_H */ -#endif /* _GL_STDARG_H */ diff --git a/gnulib/lib/stdbool.in.h b/gnulib/lib/stdbool.in.h deleted file mode 100644 index b64dc75..0000000 --- a/gnulib/lib/stdbool.in.h +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2001. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GL_STDBOOL_H -#define _GL_STDBOOL_H - -/* ISO C 99 for platforms that lack it. */ - -/* Usage suggestions: - - Programs that use should be aware of some limitations - and standards compliance issues. - - Standards compliance: - - - must be #included before 'bool', 'false', 'true' - can be used. - - - You cannot assume that sizeof (bool) == 1. - - - Programs should not undefine the macros bool, true, and false, - as C99 lists that as an "obsolescent feature". - - Limitations of this substitute, when used in a C89 environment: - - - must be #included before the '_Bool' type can be used. - - - You cannot assume that _Bool is a typedef; it might be a macro. - - - Bit-fields of type 'bool' are not supported. Portable code - should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - - - In C99, casts and automatic conversions to '_Bool' or 'bool' are - performed in such a way that every nonzero value gets converted - to 'true', and zero gets converted to 'false'. This doesn't work - with this substitute. With this substitute, only the values 0 and 1 - give the expected result when converted to _Bool' or 'bool'. - - - C99 allows the use of (_Bool)0.0 in constant expressions, but - this substitute cannot always provide this property. - - Also, it is suggested that programs use 'bool' rather than '_Bool'; - this isn't required, but 'bool' is more common. */ - - -/* 7.16. Boolean type and values */ - -/* BeOS already #defines false 0, true 1. We use the same - definitions below, but temporarily we have to #undef them. */ -#if defined __BEOS__ && !defined __HAIKU__ -# include /* defines bool but not _Bool */ -# undef false -# 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__) - /* 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@ -typedef bool _Bool; -# 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 - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - Similar bugs are likely with other compilers as well; this file - wouldn't be used if was working. - So we override the _Bool type. - If !@HAVE__BOOL@: - Need to define _Bool ourselves. As 'signed char' or as an enum type? - Use of a typedef, with SunPRO C, leads to a stupid - "warning: _Bool is a keyword in ISO C99". - Use of an enum type, with IRIX cc, leads to a stupid - "warning(1185): enumerated type mixed with another type". - Even the existence of an enum type, without a typedef, - "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 - /* With this compiler, trust the _Bool type if the compiler has it. */ -# if !@HAVE__BOOL@ -typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; -# endif -# endif -#endif -#define bool _Bool - -/* The other macros must be usable in preprocessor directives. */ -#define false 0 -#define true 1 -#define __bool_true_false_are_defined 1 - -#endif /* _GL_STDBOOL_H */ diff --git a/gnulib/lib/stddef.in.h b/gnulib/lib/stddef.in.h deleted file mode 100644 index 62a91a7..0000000 --- a/gnulib/lib/stddef.in.h +++ /dev/null @@ -1,87 +0,0 @@ -/* A substitute for POSIX 2008 , for platforms that have issues. - - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Eric Blake. */ - -/* - * POSIX 2008 for platforms that have issues. - * - */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_wchar_t || defined __need_size_t \ - || defined __need_ptrdiff_t || defined __need_NULL \ - || defined __need_wint_t -/* Special invocation convention inside gcc header files. In - particular, gcc provides a version of that blindly - redefines NULL even when __need_wint_t was defined, even though - wint_t is not normally provided by . Hence, we must - remember if special invocation has ever been used to obtain wint_t, - in which case we need to clean up NULL yet again. */ - -# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T) -# ifdef __need_wint_t -# undef _GL_STDDEF_H -# define _GL_STDDEF_WINT_T -# endif -# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ -# endif - -#else -/* Normal invocation convention. */ - -# ifndef _GL_STDDEF_H - -/* The include_next requires a split double-inclusion guard. */ - -# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ - -# ifndef _GL_STDDEF_H -# define _GL_STDDEF_H - -/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ -#if @REPLACE_NULL@ -# undef NULL -# ifdef __cplusplus - /* ISO C++ says that the macro NULL must expand to an integer constant - expression, hence '((void *) 0)' is not allowed in C++. */ -# if __GNUG__ >= 3 - /* GNU C++ has a __null macro that behaves like an integer ('int' or - 'long') but has the same size as a pointer. Use that, to avoid - warnings. */ -# define NULL __null -# else -# define NULL 0L -# endif -# else -# define NULL ((void *) 0) -# endif -#endif - -/* Some platforms lack wchar_t. */ -#if !@HAVE_WCHAR_T@ -# define wchar_t int -#endif - -# endif /* _GL_STDDEF_H */ -# endif /* _GL_STDDEF_H */ -#endif /* __need_XXX */ diff --git a/gnulib/lib/stdint.in.h b/gnulib/lib/stdint.in.h deleted file mode 100644 index b32227b..0000000 --- a/gnulib/lib/stdint.in.h +++ /dev/null @@ -1,592 +0,0 @@ -/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _GL_STDINT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Get those types that are already defined in other system include - files, so that we can "#define int8_t signed char" below without - worrying about a later system include file containing a "typedef - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if @HAVE_STDINT_H@ -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _GL_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# @INCLUDE_NEXT@ @NEXT_STDINT_H@ -#endif - -#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _GL_STDINT_H - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - MacOS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after @NEXT_STDINT_H@. */ -#if @HAVE_SYS_TYPES_H@ && ! defined _AIX -# include -#endif - -/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */ -#include - -#if @HAVE_INTTYPES_H@ - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -#elif @HAVE_SYS_INTTYPES_H@ - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -#endif - -#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -#endif - -#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for a integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -#define _STDINT_MIN(signed, bits, zero) \ - ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) - -#define _STDINT_MAX(signed, bits, zero) \ - ((signed) \ - ? ~ _STDINT_MIN (signed, bits, zero) \ - : /* The expression for the unsigned case. The subtraction of (signed) \ - is a nop in the unsigned case and avoids "signed integer overflow" \ - warnings in the signed case. */ \ - ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -#undef int8_t -#undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -#define int8_t gl_int8_t -#define uint8_t gl_uint8_t - -#undef int16_t -#undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -#define int16_t gl_int16_t -#define uint16_t gl_uint16_t - -#undef int32_t -#undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -#define int32_t gl_int32_t -#define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -#ifdef INT64_MAX -# define GL_INT64_T -#else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif @HAVE_LONG_LONG_INT@ -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -#endif - -#ifdef UINT64_MAX -# define GL_UINT64_T -#else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -#endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -#define _UINT8_T -#define _UINT32_T -#define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -#undef int_least8_t -#undef uint_least8_t -#undef int_least16_t -#undef uint_least16_t -#undef int_least32_t -#undef uint_least32_t -#undef int_least64_t -#undef uint_least64_t -#define int_least8_t int8_t -#define uint_least8_t uint8_t -#define int_least16_t int16_t -#define uint_least16_t uint16_t -#define int_least32_t int32_t -#define uint_least32_t uint32_t -#ifdef GL_INT64_T -# define int_least64_t int64_t -#endif -#ifdef GL_UINT64_T -# define uint_least64_t uint64_t -#endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. Assume that 'long int' - is fast enough for all narrower integers. */ - -#undef int_fast8_t -#undef uint_fast8_t -#undef int_fast16_t -#undef uint_fast16_t -#undef int_fast32_t -#undef uint_fast32_t -#undef int_fast64_t -#undef uint_fast64_t -typedef long int gl_int_fast8_t; -typedef unsigned long int gl_uint_fast8_t; -typedef long int gl_int_fast16_t; -typedef unsigned long int gl_uint_fast16_t; -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -#define int_fast8_t gl_int_fast8_t -#define uint_fast8_t gl_uint_fast8_t -#define int_fast16_t gl_int_fast16_t -#define uint_fast16_t gl_uint_fast16_t -#define int_fast32_t gl_int_fast32_t -#define uint_fast32_t gl_uint_fast32_t -#ifdef GL_INT64_T -# define int_fast64_t int64_t -#endif -#ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -#endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -#undef intptr_t -#undef uintptr_t -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -#define intptr_t gl_intptr_t -#define uintptr_t gl_uintptr_t - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -#undef intmax_t -#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -#elif defined GL_INT64_T -# define intmax_t int64_t -#else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -#endif - -#undef uintmax_t -#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -#elif defined GL_UINT64_T -# define uintmax_t uint64_t -#else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -#endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -#define GNULIB_defined_stdint_types 1 -#endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -#undef INT8_MIN -#undef INT8_MAX -#undef UINT8_MAX -#define INT8_MIN (~ INT8_MAX) -#define INT8_MAX 127 -#define UINT8_MAX 255 - -#undef INT16_MIN -#undef INT16_MAX -#undef UINT16_MAX -#define INT16_MIN (~ INT16_MAX) -#define INT16_MAX 32767 -#define UINT16_MAX 65535 - -#undef INT32_MIN -#undef INT32_MAX -#undef UINT32_MAX -#define INT32_MIN (~ INT32_MAX) -#define INT32_MAX 2147483647 -#define UINT32_MAX 4294967295U - -#if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -#endif - -#if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -#endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -#undef INT_LEAST8_MIN -#undef INT_LEAST8_MAX -#undef UINT_LEAST8_MAX -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST8_MAX INT8_MAX -#define UINT_LEAST8_MAX UINT8_MAX - -#undef INT_LEAST16_MIN -#undef INT_LEAST16_MAX -#undef UINT_LEAST16_MAX -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST16_MAX INT16_MAX -#define UINT_LEAST16_MAX UINT16_MAX - -#undef INT_LEAST32_MIN -#undef INT_LEAST32_MAX -#undef UINT_LEAST32_MAX -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST32_MAX INT32_MAX -#define UINT_LEAST32_MAX UINT32_MAX - -#undef INT_LEAST64_MIN -#undef INT_LEAST64_MAX -#ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -#endif - -#undef UINT_LEAST64_MAX -#ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -#endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -#undef INT_FAST8_MIN -#undef INT_FAST8_MAX -#undef UINT_FAST8_MAX -#define INT_FAST8_MIN LONG_MIN -#define INT_FAST8_MAX LONG_MAX -#define UINT_FAST8_MAX ULONG_MAX - -#undef INT_FAST16_MIN -#undef INT_FAST16_MAX -#undef UINT_FAST16_MAX -#define INT_FAST16_MIN LONG_MIN -#define INT_FAST16_MAX LONG_MAX -#define UINT_FAST16_MAX ULONG_MAX - -#undef INT_FAST32_MIN -#undef INT_FAST32_MAX -#undef UINT_FAST32_MAX -#define INT_FAST32_MIN LONG_MIN -#define INT_FAST32_MAX LONG_MAX -#define UINT_FAST32_MAX ULONG_MAX - -#undef INT_FAST64_MIN -#undef INT_FAST64_MAX -#ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -#endif - -#undef UINT_FAST64_MAX -#ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -#endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -#undef INTPTR_MIN -#undef INTPTR_MAX -#undef UINTPTR_MAX -#define INTPTR_MIN LONG_MIN -#define INTPTR_MAX LONG_MAX -#define UINTPTR_MAX ULONG_MAX - -/* 7.18.2.5. Limits of greatest-width integer types */ - -#undef INTMAX_MIN -#undef INTMAX_MAX -#ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -#else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -#endif - -#undef UINTMAX_MAX -#ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -#else -# define UINTMAX_MAX UINT32_MAX -#endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -#undef PTRDIFF_MIN -#undef PTRDIFF_MAX -#if @APPLE_UNIVERSAL_BUILD@ -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -#else -# define PTRDIFF_MIN \ - _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) -#endif - -/* sig_atomic_t limits */ -#undef SIG_ATOMIC_MIN -#undef SIG_ATOMIC_MAX -#define SIG_ATOMIC_MIN \ - _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) -#define SIG_ATOMIC_MAX \ - _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) - - -/* size_t limit */ -#undef SIZE_MAX -#if @APPLE_UNIVERSAL_BUILD@ -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -#else -# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) -#endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -#endif -#undef WCHAR_MIN -#undef WCHAR_MAX -#define WCHAR_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) -#define WCHAR_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) - -/* wint_t limits */ -#undef WINT_MIN -#undef WINT_MAX -#define WINT_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) -#define WINT_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) - -#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */ - -/* 7.18.4. Macros for integer constants */ - -#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -#undef INT8_C -#undef UINT8_C -#define INT8_C(x) x -#define UINT8_C(x) x - -#undef INT16_C -#undef UINT16_C -#define INT16_C(x) x -#define UINT16_C(x) x - -#undef INT32_C -#undef UINT32_C -#define INT32_C(x) x -#define UINT32_C(x) x ## U - -#undef INT64_C -#undef UINT64_C -#if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -#elif defined _MSC_VER -# define INT64_C(x) x##i64 -#elif @HAVE_LONG_LONG_INT@ -# define INT64_C(x) x##LL -#endif -#if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -#elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -#elif @HAVE_UNSIGNED_LONG_LONG_INT@ -# define UINT64_C(x) x##ULL -#endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -#undef INTMAX_C -#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -#elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -#else -# define INTMAX_C(x) x##L -#endif - -#undef UINTMAX_C -#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -#elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -#else -# define UINTMAX_C(x) x##UL -#endif - -#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ - -#endif /* _GL_STDINT_H */ -#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gnulib/lib/stdio--.h b/gnulib/lib/stdio--.h deleted file mode 100644 index adde0f9..0000000 --- a/gnulib/lib/stdio--.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Like stdio.h, but redefine some names to avoid glitches. - - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include -#include "stdio-safer.h" - -#if GNULIB_FOPEN_SAFER -# undef fopen -# define fopen fopen_safer -#endif - -#if GNULIB_FREOPEN_SAFER -# undef freopen -# define freopen freopen_safer -#endif - -#if GNULIB_TMPFILE_SAFER -# undef tmpfile -# define tmpfile tmpfile_safer -#endif - -#if GNULIB_POPEN_SAFER -# undef popen -# define popen popen_safer -#endif diff --git a/gnulib/lib/stdio-impl.h b/gnulib/lib/stdio-impl.h deleted file mode 100644 index d41c32f..0000000 --- a/gnulib/lib/stdio-impl.h +++ /dev/null @@ -1,110 +0,0 @@ -/* Implementation details of FILE streams. - Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Many stdio implementations have the same logic and therefore can share - the same implementation of stdio extension API, except that some fields - have different naming conventions, or their access requires some casts. */ - - -/* BSD stdio derived implementations. */ - -#if defined __NetBSD__ /* NetBSD */ -/* Get __NetBSD_Version__. */ -# include -#endif - -#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */ - -# if defined __DragonFly__ /* DragonFly */ - /* See . */ -# define fp_ ((struct { struct __FILE_public pub; \ - struct { unsigned char *_base; int _size; } _bf; \ - void *cookie; \ - void *_close; \ - void *_read; \ - void *_seek; \ - void *_write; \ - struct { unsigned char *_base; int _size; } _ub; \ - int _ur; \ - unsigned char _ubuf[3]; \ - unsigned char _nbuf[1]; \ - struct { unsigned char *_base; int _size; } _lb; \ - int _blksize; \ - fpos_t _offset; \ - /* More fields, not relevant here. */ \ - } *) fp) - /* See . */ -# define _p pub._p -# define _flags pub._flags -# define _r pub._r -# define _w pub._w -# else -# define fp_ fp -# endif - -# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */ - /* See - and */ - struct __sfileext - { - struct __sbuf _ub; /* ungetc buffer */ - /* More fields, not relevant here. */ - }; -# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub -# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */ -# define fp_ub fp_->_ub -# endif - -# define HASUB(fp) (fp_ub._base != NULL) - -#endif - - -/* SystemV derived implementations. */ - -#ifdef __TANDEM /* NonStop Kernel */ -# ifndef _IOERR -/* These values were determined by the program 'stdioext-flags' at - . */ -# define _IOERR 0x40 -# define _IOREAD 0x80 -# define _IOWRT 0x4 -# define _IORW 0x100 -# endif -#endif - -#if defined _IOERR - -# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */ -# define fp_ ((struct { unsigned char *_ptr; \ - unsigned char *_base; \ - unsigned char *_end; \ - long _cnt; \ - int _file; \ - unsigned int _flag; \ - } *) fp) -# else -# define fp_ fp -# endif - -# if defined _SCO_DS /* OpenServer */ -# define _cnt __cnt -# define _ptr __ptr -# define _base __base -# define _flag __flag -# endif - -#endif diff --git a/gnulib/lib/stdio-safer.h b/gnulib/lib/stdio-safer.h deleted file mode 100644 index 62fdf64..0000000 --- a/gnulib/lib/stdio-safer.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Invoke stdio functions, but avoid some glitches. - - Copyright (C) 2001, 2003, 2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include - -#if GNULIB_FOPEN_SAFER -FILE *fopen_safer (char const *, char const *); -#endif - -#if GNULIB_FREOPEN_SAFER -FILE *freopen_safer (char const *, char const *, FILE *); -#endif - -#if GNULIB_POPEN_SAFER -FILE *popen_safer (char const *, char const *); -#endif - -#if GNULIB_TMPFILE_SAFER -FILE *tmpfile_safer (void); -#endif diff --git a/gnulib/lib/stdio.in.h b/gnulib/lib/stdio.in.h deleted file mode 100644 index 57e93ba..0000000 --- a/gnulib/lib/stdio.in.h +++ /dev/null @@ -1,1163 +0,0 @@ -/* A GNU-like . - - Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#@INCLUDE_NEXT@ @NEXT_STDIO_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDIO_H@ - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _GL_STDIO_H -#define _GL_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) - -/* Solaris 10 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - - -#if @GNULIB_DPRINTF@ -# if @REPLACE_DPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); -# else -# if !@HAVE_DPRINTF@ -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if @GNULIB_FCLOSE@ -/* Close STREAM and its underlying file descriptor. */ -# if @REPLACE_FCLOSE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -_GL_CXXALIASWARN (fclose); -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if @GNULIB_FFLUSH@ -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if @REPLACE_FFLUSH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fflush); -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning. Assume it is - always declared, since it is required by C89. */ -#undef gets -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); - -#if @GNULIB_FOPEN@ -# if @REPLACE_FOPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); -# endif -_GL_CXXALIASWARN (fopen); -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " - "use gnulib module fopen for portability"); -#endif - -#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ -# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ - || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); -# endif -_GL_CXXALIASWARN (fprintf); -#endif -#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_FPURGE@ -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if @REPLACE_FPURGE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !@HAVE_DECL_FPURGE@ -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if @GNULIB_FPUTC@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -_GL_CXXALIASWARN (fputc); -#endif - -#if @GNULIB_FPUTS@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); -# endif -_GL_CXXALIASWARN (fputs); -#endif - -#if @GNULIB_FREOPEN@ -# if @REPLACE_FREOPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream)); -# endif -_GL_CXXALIASWARN (freopen); -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on Win32 platforms is not POSIX compatible - " - "use gnulib module freopen for portability"); -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if @GNULIB_FSEEK@ -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if @REPLACE_FSEEK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -_GL_CXXALIASWARN (fseek); -#endif - -#if @GNULIB_FSEEKO@ -# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if @REPLACE_FSEEKO@ -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! @HAVE_DECL_FSEEKO@ -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -# if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@ - /* Provide an fseek function that is consistent with fseeko. */ - /* In order to avoid that fseek gets defined as a macro here, the - developer can request the 'fseek' module. */ -# if !GNULIB_defined_fseek_function -# undef fseek -# define fseek rpl_fseek -static inline int _GL_ARG_NONNULL ((1)) -rpl_fseek (FILE *fp, long offset, int whence) -{ -# if @REPLACE_FSEEKO@ - return rpl_fseeko (fp, offset, whence); -# else - return fseeko (fp, offset, whence); -# endif -} -# define GNULIB_defined_fseek_function 1 -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if @GNULIB_FTELL@ -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if @REPLACE_FTELL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftell); -#endif - -#if @GNULIB_FTELLO@ -# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if @REPLACE_FTELLO@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! @HAVE_DECL_FTELLO@ -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@ - /* Provide an ftell function that is consistent with ftello. */ - /* In order to avoid that ftell gets defined as a macro here, the - developer can request the 'ftell' module. */ -# if !GNULIB_defined_ftell_function -# undef ftell -# define ftell rpl_ftell -static inline long _GL_ARG_NONNULL ((1)) -rpl_ftell (FILE *f) -{ -# if @REPLACE_FTELLO@ - return rpl_ftello (f); -# else - return ftello (f); -# endif -} -# define GNULIB_defined_ftell_function 1 -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if @GNULIB_FWRITE@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream)); - -/* Work around glibc bug 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; -} -# undef fwrite -# define fwrite rpl_fwrite -# endif -# endif -_GL_CXXALIASWARN (fwrite); -#endif - -#if @GNULIB_GETDELIM@ -/* Read input, up to (and including) the next occurrence of DELIMITER, from - STREAM, store it in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if @REPLACE_GETDELIM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream)); -# else -# if !@HAVE_DECL_GETDELIM@ -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if @GNULIB_GETLINE@ -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if @REPLACE_GETLINE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream)); -# else -# if !@HAVE_DECL_GETLINE@ -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream)); -# endif -# if @HAVE_DECL_GETLINE@ -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if @REPLACE_OBSTACK_PRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !@HAVE_DECL_OBSTACK_PRINTF@ -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if @REPLACE_OBSTACK_PRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !@HAVE_DECL_OBSTACK_PRINTF@ -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if @GNULIB_PERROR@ -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if @REPLACE_PERROR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -_GL_CXXALIASWARN (perror); -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if @GNULIB_POPEN@ -# if @REPLACE_POPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ -# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ - || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *format, ...) - __asm__ (@ASM_SYMBOL_PREFIX@ - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *format, ...) - __asm__ (@ASM_SYMBOL_PREFIX@ - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); -# endif -_GL_CXXALIASWARN (printf); -#endif -#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_PUTC@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -_GL_CXXALIASWARN (putc); -#endif - -#if @GNULIB_PUTCHAR@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -_GL_CXXALIASWARN (putchar); -#endif - -#if @GNULIB_PUTS@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -_GL_CXXALIASWARN (puts); -#endif - -#if @GNULIB_REMOVE@ -# if @REPLACE_REMOVE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -_GL_CXXALIASWARN (remove); -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if @GNULIB_RENAME@ -# if @REPLACE_RENAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -_GL_CXXALIASWARN (rename); -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if @GNULIB_RENAMEAT@ -# if @REPLACE_RENAMEAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !@HAVE_RENAMEAT@ -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if @GNULIB_SNPRINTF@ -# if @REPLACE_SNPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *str, size_t size, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *str, size_t size, const char *format, ...)); -# else -# if !@HAVE_DECL_SNPRINTF@ -_GL_FUNCDECL_SYS (snprintf, int, - (char *str, size_t size, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *str, size_t size, const char *format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that sprintf should be handled like gets - (for example, OpenBSD issues a link warning for both functions), - since both can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if @GNULIB_SPRINTF_POSIX@ -# if @REPLACE_SPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); -# endif -_GL_CXXALIASWARN (sprintf); -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_TMPFILE@ -# if @REPLACE_TMPFILE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -_GL_CXXALIASWARN (tmpfile); -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if @GNULIB_VASPRINTF@ -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if @REPLACE_VASPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !@HAVE_VASPRINTF@ -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if @REPLACE_VASPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !@HAVE_VASPRINTF@ -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if @GNULIB_VDPRINTF@ -# if @REPLACE_VDPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); -# else -# if !@HAVE_VDPRINTF@ -_GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vdprintf); -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ -# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ - || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *fp, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vfprintf); -#endif -#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ -# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ - || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vprintf); -#endif -#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_VSNPRINTF@ -# if @REPLACE_VSNPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args)); -# else -# if !@HAVE_DECL_VSNPRINTF@ -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if @GNULIB_VSPRINTF_POSIX@ -# if @REPLACE_VSPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *str, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *str, const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *str, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vsprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - - -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ -#endif diff --git a/gnulib/lib/stdlib.in.h b/gnulib/lib/stdlib.in.h deleted file mode 100644 index 2697a4b..0000000 --- a/gnulib/lib/stdlib.in.h +++ /dev/null @@ -1,759 +0,0 @@ -/* A GNU-like . - - Copyright (C) 1995, 2001-2004, 2006-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_malloc_and_calloc -/* Special invocation convention inside glibc header files. */ - -#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _GL_STDLIB_H - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ - -#ifndef _GL_STDLIB_H -#define _GL_STDLIB_H - -/* NetBSD 5.0 mis-defines NULL. */ -#include - -/* MirBSD 10 defines WEXITSTATUS in , not in . */ -#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS -# include -#endif - -/* Solaris declares getloadavg() in . */ -#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ -# include -#endif - -#if @GNULIB_RANDOM_R@ - -/* OSF/1 5.1 declares 'struct random_data' in , which is included - from if _REENTRANT is defined. Include it whenever we need - 'struct random_data'. */ -# if @HAVE_RANDOM_H@ -# include -# endif - -# if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@ -# include -# endif - -# if !@HAVE_STRUCT_RANDOM_DATA@ -/* Define 'struct random_data'. - But allow multiple gnulib generated replacements to coexist. */ -# if !GNULIB_defined_struct_random_data -struct random_data -{ - int32_t *fptr; /* Front pointer. */ - int32_t *rptr; /* Rear pointer. */ - int32_t *state; /* Array of state values. */ - int rand_type; /* Type of random number generator. */ - int rand_deg; /* Degree of random number generator. */ - int rand_sep; /* Distance between front and rear. */ - int32_t *end_ptr; /* Pointer behind state table. */ -}; -# define GNULIB_defined_struct_random_data 1 -# endif -# endif -#endif - -#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -/* On MacOS X 10.3, only declares mkstemp. */ -/* On Cygwin 1.7.1, only declares getsubopt. */ -/* But avoid namespace pollution on glibc systems and native Windows. */ -# include -#endif - -#if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__ -# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -#else -# define _GL_ATTRIBUTE_NORETURN -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere - with proper operation of xargs. */ -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#elif EXIT_FAILURE != 1 -# undef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif - - -#if @GNULIB__EXIT@ -/* Terminate the current process with the given return code, without running - the 'atexit' handlers. */ -# if !@HAVE__EXIT@ -_GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN); -# endif -_GL_CXXALIAS_SYS (_Exit, void, (int status)); -_GL_CXXALIASWARN (_Exit); -#elif defined GNULIB_POSIXCHECK -# undef _Exit -# if HAVE_RAW_DECL__EXIT -_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " - "use gnulib module _Exit for portability"); -# endif -#endif - - -#if @GNULIB_ATOLL@ -/* Parse a signed decimal integer. - Returns the value of the integer. Errors are not detected. */ -# if !@HAVE_ATOLL@ -_GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); -_GL_CXXALIASWARN (atoll); -#elif defined GNULIB_POSIXCHECK -# undef atoll -# if HAVE_RAW_DECL_ATOLL -_GL_WARN_ON_USE (atoll, "atoll is unportable - " - "use gnulib module atoll for portability"); -# endif -#endif - -#if @GNULIB_CALLOC_POSIX@ -# if @REPLACE_CALLOC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef calloc -# define calloc rpl_calloc -# endif -_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); -_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); -# else -_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); -# endif -_GL_CXXALIASWARN (calloc); -#elif defined GNULIB_POSIXCHECK -# undef calloc -/* Assume calloc is always declared. */ -_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " - "use gnulib module calloc-posix for portability"); -#endif - -#if @GNULIB_CANONICALIZE_FILE_NAME@ -# if @REPLACE_CANONICALIZE_FILE_NAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define canonicalize_file_name rpl_canonicalize_file_name -# endif -_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); -# else -# if !@HAVE_CANONICALIZE_FILE_NAME@ -_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); -# endif -_GL_CXXALIASWARN (canonicalize_file_name); -#elif defined GNULIB_POSIXCHECK -# undef canonicalize_file_name -# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME -_GL_WARN_ON_USE (canonicalize_file_name, - "canonicalize_file_name is unportable - " - "use gnulib module canonicalize-lgpl for portability"); -# endif -#endif - -#if @GNULIB_GETLOADAVG@ -/* Store max(NELEM,3) load average numbers in LOADAVG[]. - The three numbers are the load average of the last 1 minute, the last 5 - minutes, and the last 15 minutes, respectively. - LOADAVG is an array of NELEM numbers. */ -# if !@HAVE_DECL_GETLOADAVG@ -_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); -_GL_CXXALIASWARN (getloadavg); -#elif defined GNULIB_POSIXCHECK -# undef getloadavg -# if HAVE_RAW_DECL_GETLOADAVG -_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " - "use gnulib module getloadavg for portability"); -# endif -#endif - -#if @GNULIB_GETSUBOPT@ -/* Assuming *OPTIONP is a comma separated list of elements of the form - "token" or "token=value", getsubopt parses the first of these elements. - If the first element refers to a "token" that is member of the given - NULL-terminated array of tokens: - - It replaces the comma with a NUL byte, updates *OPTIONP to point past - the first option and the comma, sets *VALUEP to the value of the - element (or NULL if it doesn't contain an "=" sign), - - It returns the index of the "token" in the given array of tokens. - Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. - For more details see the POSIX:2001 specification. - http://www.opengroup.org/susv3xsh/getsubopt.html */ -# if !@HAVE_GETSUBOPT@ -_GL_FUNCDECL_SYS (getsubopt, int, - (char **optionp, char *const *tokens, char **valuep) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getsubopt, int, - (char **optionp, char *const *tokens, char **valuep)); -_GL_CXXALIASWARN (getsubopt); -#elif defined GNULIB_POSIXCHECK -# undef getsubopt -# if HAVE_RAW_DECL_GETSUBOPT -_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " - "use gnulib module getsubopt for portability"); -# endif -#endif - -#if @GNULIB_GRANTPT@ -/* Change the ownership and access permission of the slave side of the - pseudo-terminal whose master side is specified by FD. */ -# if !@HAVE_GRANTPT@ -_GL_FUNCDECL_SYS (grantpt, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (grantpt, int, (int fd)); -_GL_CXXALIASWARN (grantpt); -#elif defined GNULIB_POSIXCHECK -# undef grantpt -# if HAVE_RAW_DECL_GRANTPT -_GL_WARN_ON_USE (ptsname, "grantpt is not portable - " - "use gnulib module grantpt for portability"); -# endif -#endif - -#if @GNULIB_MALLOC_POSIX@ -# if @REPLACE_MALLOC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef malloc -# define malloc rpl_malloc -# endif -_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); -_GL_CXXALIAS_RPL (malloc, void *, (size_t size)); -# else -_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); -# endif -_GL_CXXALIASWARN (malloc); -#elif defined GNULIB_POSIXCHECK -# undef malloc -/* Assume malloc is always declared. */ -_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " - "use gnulib module malloc-posix for portability"); -#endif - -/* Convert a multibyte character to a wide character. */ -#if @GNULIB_MBTOWC@ -# if @REPLACE_MBTOWC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbtowc -# define mbtowc rpl_mbtowc -# endif -_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); -_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); -# else -_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); -# endif -_GL_CXXALIASWARN (mbtowc); -#endif - -#if @GNULIB_MKDTEMP@ -/* Create a unique temporary directory from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the directory name unique. - Returns TEMPLATE, or a null pointer if it cannot get a unique name. - The directory is created mode 700. */ -# if !@HAVE_MKDTEMP@ -_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); -_GL_CXXALIASWARN (mkdtemp); -#elif defined GNULIB_POSIXCHECK -# undef mkdtemp -# if HAVE_RAW_DECL_MKDTEMP -_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " - "use gnulib module mkdtemp for portability"); -# endif -#endif - -#if @GNULIB_MKOSTEMP@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - The file is then created, with the specified flags, ensuring it didn't exist - before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKOSTEMP@ -_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); -_GL_CXXALIASWARN (mkostemp); -#elif defined GNULIB_POSIXCHECK -# undef mkostemp -# if HAVE_RAW_DECL_MKOSTEMP -_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " - "use gnulib module mkostemp for portability"); -# endif -#endif - -#if @GNULIB_MKOSTEMPS@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE before a suffix of length - SUFFIXLEN must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - The file is then created, with the specified flags, ensuring it didn't exist - before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKOSTEMPS@ -_GL_FUNCDECL_SYS (mkostemps, int, - (char * /*template*/, int /*suffixlen*/, int /*flags*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkostemps, int, - (char * /*template*/, int /*suffixlen*/, int /*flags*/)); -_GL_CXXALIASWARN (mkostemps); -#elif defined GNULIB_POSIXCHECK -# undef mkostemps -# if HAVE_RAW_DECL_MKOSTEMPS -_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " - "use gnulib module mkostemps for portability"); -# endif -#endif - -#if @GNULIB_MKSTEMP@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The file is then created, ensuring it didn't exist before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if @REPLACE_MKSTEMP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mkstemp rpl_mkstemp -# endif -_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); -# else -# if ! @HAVE_MKSTEMP@ -_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); -# endif -_GL_CXXALIASWARN (mkstemp); -#elif defined GNULIB_POSIXCHECK -# undef mkstemp -# if HAVE_RAW_DECL_MKSTEMP -_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " - "use gnulib module mkstemp for portability"); -# endif -#endif - -#if @GNULIB_MKSTEMPS@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE prior to a suffix of length - SUFFIXLEN must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The file is then created, ensuring it didn't exist before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKSTEMPS@ -_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); -_GL_CXXALIASWARN (mkstemps); -#elif defined GNULIB_POSIXCHECK -# undef mkstemps -# if HAVE_RAW_DECL_MKSTEMPS -_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " - "use gnulib module mkstemps for portability"); -# endif -#endif - -#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@ -_GL_FUNCDECL_SYS (ptsname, char *, (int fd)); -# endif -_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); -_GL_CXXALIASWARN (ptsname); -#elif defined GNULIB_POSIXCHECK -# undef ptsname -# if HAVE_RAW_DECL_PTSNAME -_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " - "use gnulib module ptsname for portability"); -# endif -#endif - -#if @GNULIB_PUTENV@ -# if @REPLACE_PUTENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putenv -# define putenv rpl_putenv -# endif -_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (putenv, int, (char *string)); -# else -_GL_CXXALIAS_SYS (putenv, int, (char *string)); -# endif -_GL_CXXALIASWARN (putenv); -#endif - - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -# ifndef RAND_MAX -# define RAND_MAX 2147483647 -# endif -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); -_GL_CXXALIASWARN (random_r); -#elif defined GNULIB_POSIXCHECK -# undef random_r -# if HAVE_RAW_DECL_RANDOM_R -_GL_WARN_ON_USE (random_r, "random_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (srandom_r, int, - (unsigned int seed, struct random_data *rand_state) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (srandom_r, int, - (unsigned int seed, struct random_data *rand_state)); -_GL_CXXALIASWARN (srandom_r); -#elif defined GNULIB_POSIXCHECK -# undef srandom_r -# if HAVE_RAW_DECL_SRANDOM_R -_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state)); -_GL_CXXALIASWARN (initstate_r); -#elif defined GNULIB_POSIXCHECK -# undef initstate_r -# if HAVE_RAW_DECL_INITSTATE_R -_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (setstate_r, int, - (char *arg_state, struct random_data *rand_state) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (setstate_r, int, - (char *arg_state, struct random_data *rand_state)); -_GL_CXXALIASWARN (setstate_r); -#elif defined GNULIB_POSIXCHECK -# undef setstate_r -# if HAVE_RAW_DECL_SETSTATE_R -_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - - -#if @GNULIB_REALLOC_POSIX@ -# if @REPLACE_REALLOC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef realloc -# define realloc rpl_realloc -# endif -_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); -_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); -# else -_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); -# endif -_GL_CXXALIASWARN (realloc); -#elif defined GNULIB_POSIXCHECK -# undef realloc -/* Assume realloc is always declared. */ -_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " - "use gnulib module realloc-posix for portability"); -#endif - -#if @GNULIB_REALPATH@ -# if @REPLACE_REALPATH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define realpath rpl_realpath -# endif -_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); -# else -# if !@HAVE_REALPATH@ -_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); -# endif -_GL_CXXALIASWARN (realpath); -#elif defined GNULIB_POSIXCHECK -# undef realpath -# if HAVE_RAW_DECL_REALPATH -_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " - "canonicalize or canonicalize-lgpl for portability"); -# endif -#endif - -#if @GNULIB_RPMATCH@ -/* Test a user response to a question. - Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ -# if !@HAVE_RPMATCH@ -_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); -_GL_CXXALIASWARN (rpmatch); -#elif defined GNULIB_POSIXCHECK -# undef rpmatch -# if HAVE_RAW_DECL_RPMATCH -_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " - "use gnulib module rpmatch for portability"); -# endif -#endif - -#if @GNULIB_SETENV@ -/* Set NAME to VALUE in the environment. - If REPLACE is nonzero, overwrite an existing value. */ -# if @REPLACE_SETENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef setenv -# define setenv rpl_setenv -# endif -_GL_FUNCDECL_RPL (setenv, int, - (const char *name, const char *value, int replace) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (setenv, int, - (const char *name, const char *value, int replace)); -# else -# if !@HAVE_DECL_SETENV@ -_GL_FUNCDECL_SYS (setenv, int, - (const char *name, const char *value, int replace) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (setenv, int, - (const char *name, const char *value, int replace)); -# endif -# if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) -_GL_CXXALIASWARN (setenv); -# endif -#elif defined GNULIB_POSIXCHECK -# undef setenv -# if HAVE_RAW_DECL_SETENV -_GL_WARN_ON_USE (setenv, "setenv is unportable - " - "use gnulib module setenv for portability"); -# endif -#endif - -#if @GNULIB_STRTOD@ - /* Parse a double from STRING, updating ENDP if appropriate. */ -# if @REPLACE_STRTOD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strtod rpl_strtod -# endif -_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); -# else -# if !@HAVE_STRTOD@ -_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); -# endif -_GL_CXXALIASWARN (strtod); -#elif defined GNULIB_POSIXCHECK -# undef strtod -# if HAVE_RAW_DECL_STRTOD -_GL_WARN_ON_USE (strtod, "strtod is unportable - " - "use gnulib module strtod for portability"); -# endif -#endif - -#if @GNULIB_STRTOLL@ -/* Parse a signed integer whose textual representation starts at STRING. - The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, - it may be decimal or octal (with prefix "0") or hexadecimal (with prefix - "0x"). - If ENDPTR is not NULL, the address of the first byte after the integer is - stored in *ENDPTR. - Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set - to ERANGE. */ -# if !@HAVE_STRTOLL@ -_GL_FUNCDECL_SYS (strtoll, long long, - (const char *string, char **endptr, int base) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtoll, long long, - (const char *string, char **endptr, int base)); -_GL_CXXALIASWARN (strtoll); -#elif defined GNULIB_POSIXCHECK -# undef strtoll -# if HAVE_RAW_DECL_STRTOLL -_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " - "use gnulib module strtoll for portability"); -# endif -#endif - -#if @GNULIB_STRTOULL@ -/* Parse an unsigned integer whose textual representation starts at STRING. - The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, - it may be decimal or octal (with prefix "0") or hexadecimal (with prefix - "0x"). - If ENDPTR is not NULL, the address of the first byte after the integer is - stored in *ENDPTR. - Upon overflow, the return value is ULLONG_MAX, and errno is set to - ERANGE. */ -# if !@HAVE_STRTOULL@ -_GL_FUNCDECL_SYS (strtoull, unsigned long long, - (const char *string, char **endptr, int base) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtoull, unsigned long long, - (const char *string, char **endptr, int base)); -_GL_CXXALIASWARN (strtoull); -#elif defined GNULIB_POSIXCHECK -# undef strtoull -# if HAVE_RAW_DECL_STRTOULL -_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " - "use gnulib module strtoull for portability"); -# endif -#endif - -#if @GNULIB_UNLOCKPT@ -/* Unlock the slave side of the pseudo-terminal whose master side is specified - by FD, so that it can be opened. */ -# if !@HAVE_UNLOCKPT@ -_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); -_GL_CXXALIASWARN (unlockpt); -#elif defined GNULIB_POSIXCHECK -# undef unlockpt -# if HAVE_RAW_DECL_UNLOCKPT -_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " - "use gnulib module unlockpt for portability"); -# endif -#endif - -#if @GNULIB_UNSETENV@ -/* Remove the variable NAME from the environment. */ -# if @REPLACE_UNSETENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unsetenv -# define unsetenv rpl_unsetenv -# endif -_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); -# else -# if !@HAVE_DECL_UNSETENV@ -_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); -# endif -# if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) -_GL_CXXALIASWARN (unsetenv); -# endif -#elif defined GNULIB_POSIXCHECK -# undef unsetenv -# if HAVE_RAW_DECL_UNSETENV -_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " - "use gnulib module unsetenv for portability"); -# endif -#endif - -/* Convert a wide character to a multibyte character. */ -#if @GNULIB_WCTOMB@ -# if @REPLACE_WCTOMB@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wctomb -# define wctomb rpl_wctomb -# endif -_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); -_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); -# else -_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); -# endif -_GL_CXXALIASWARN (wctomb); -#endif - - -#endif /* _GL_STDLIB_H */ -#endif /* _GL_STDLIB_H */ -#endif diff --git a/gnulib/lib/stpcpy.c b/gnulib/lib/stpcpy.c deleted file mode 100644 index fa42af4..0000000 --- a/gnulib/lib/stpcpy.c +++ /dev/null @@ -1,49 +0,0 @@ -/* stpcpy.c -- copy a string and return pointer to end of new string - Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2011 Free Software - Foundation, Inc. - - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@prep.ai.mit.edu. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3 of the License, or any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include - -#undef __stpcpy -#ifdef _LIBC -# undef stpcpy -#endif - -#ifndef weak_alias -# define __stpcpy stpcpy -#endif - -/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ -char * -__stpcpy (char *dest, const char *src) -{ - register char *d = dest; - register const char *s = src; - - do - *d++ = *s; - while (*s++ != '\0'); - - return d - 1; -} -#ifdef weak_alias -weak_alias (__stpcpy, stpcpy) -#endif diff --git a/gnulib/lib/str-kmp.h b/gnulib/lib/str-kmp.h deleted file mode 100644 index b25f4d4..0000000 --- a/gnulib/lib/str-kmp.h +++ /dev/null @@ -1,154 +0,0 @@ -/* Substring search in a NUL terminated string of UNIT elements, - using the Knuth-Morris-Pratt algorithm. - Copyright (C) 2005-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2005. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Before including this file, you need to define: - UNIT The element type of the needle and haystack. - CANON_ELEMENT(c) A macro that canonicalizes an element right after - it has been fetched from needle or haystack. - The argument is of type UNIT; the result must be - of type UNIT as well. */ - -/* Knuth-Morris-Pratt algorithm. - See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm - HAYSTACK is the NUL terminated string in which to search for. - NEEDLE is the string to search for in HAYSTACK, consisting of NEEDLE_LEN - units. - Return a boolean indicating success: - Return true and set *RESULTP if the search was completed. - Return false if it was aborted because not enough memory was available. */ -static bool -knuth_morris_pratt (const UNIT *haystack, - const UNIT *needle, size_t needle_len, - const UNIT **resultp) -{ - size_t m = needle_len; - - /* Allocate the table. */ - size_t *table = (size_t *) nmalloca (m, sizeof (size_t)); - if (table == NULL) - return false; - /* Fill the table. - For 0 < i < m: - 0 < table[i] <= i is defined such that - forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x], - and table[i] is as large as possible with this property. - This implies: - 1) For 0 < i < m: - If table[i] < i, - needle[table[i]..i-1] = needle[0..i-1-table[i]]. - 2) For 0 < i < m: - rhaystack[0..i-1] == needle[0..i-1] - and exists h, i <= h < m: rhaystack[h] != needle[h] - implies - forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1]. - table[0] remains uninitialized. */ - { - size_t i, j; - - /* i = 1: Nothing to verify for x = 0. */ - table[1] = 1; - j = 0; - - for (i = 2; i < m; i++) - { - /* Here: j = i-1 - table[i-1]. - The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold - for x < table[i-1], by induction. - Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ - UNIT b = CANON_ELEMENT (needle[i - 1]); - - for (;;) - { - /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x] - is known to hold for x < i-1-j. - Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */ - if (b == CANON_ELEMENT (needle[j])) - { - /* Set table[i] := i-1-j. */ - table[i] = i - ++j; - break; - } - /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds - for x = i-1-j, because - needle[i-1] != needle[j] = needle[i-1-x]. */ - if (j == 0) - { - /* The inequality holds for all possible x. */ - table[i] = i; - break; - } - /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds - for i-1-j < x < i-1-j+table[j], because for these x: - needle[x..i-2] - = needle[x-(i-1-j)..j-1] - != needle[0..j-1-(x-(i-1-j))] (by definition of table[j]) - = needle[0..i-2-x], - hence needle[x..i-1] != needle[0..i-1-x]. - Furthermore - needle[i-1-j+table[j]..i-2] - = needle[table[j]..j-1] - = needle[0..j-1-table[j]] (by definition of table[j]). */ - j = j - table[j]; - } - /* Here: j = i - table[i]. */ - } - } - - /* Search, using the table to accelerate the processing. */ - { - size_t j; - const UNIT *rhaystack; - const UNIT *phaystack; - - *resultp = NULL; - j = 0; - rhaystack = haystack; - phaystack = haystack; - /* Invariant: phaystack = rhaystack + j. */ - while (*phaystack != 0) - if (CANON_ELEMENT (needle[j]) == CANON_ELEMENT (*phaystack)) - { - j++; - phaystack++; - if (j == m) - { - /* The entire needle has been found. */ - *resultp = rhaystack; - break; - } - } - else if (j > 0) - { - /* Found a match of needle[0..j-1], mismatch at needle[j]. */ - rhaystack += table[j]; - j -= table[j]; - } - else - { - /* Found a mismatch at needle[0] already. */ - rhaystack++; - phaystack++; - } - } - - freea (table); - return true; -} - -#undef CANON_ELEMENT diff --git a/gnulib/lib/str-two-way.h b/gnulib/lib/str-two-way.h deleted file mode 100644 index 08a6cd3..0000000 --- a/gnulib/lib/str-two-way.h +++ /dev/null @@ -1,453 +0,0 @@ -/* Byte-wise substring search, using the Two-Way algorithm. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Eric Blake , 2008. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Before including this file, you need to include and - , and define: - RESULT_TYPE A macro that expands to the return type. - AVAILABLE(h, h_l, j, n_l) - A macro that returns nonzero if there are - at least N_L bytes left starting at H[J]. - H is 'unsigned char *', H_L, J, and N_L - are 'size_t'; H_L is an lvalue. For - NUL-terminated searches, H_L can be - modified each iteration to avoid having - to compute the end of H up front. - - For case-insensitivity, you may optionally define: - CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L - characters of P1 and P2 are equal. - CANON_ELEMENT(c) A macro that canonicalizes an element right after - it has been fetched from one of the two strings. - The argument is an 'unsigned char'; the result - must be an 'unsigned char' as well. - - This file undefines the macros documented above, and defines - LONG_NEEDLE_THRESHOLD. -*/ - -#include -#include - -/* We use the Two-Way string matching algorithm (also known as - Chrochemore-Perrin), which guarantees linear complexity with - constant space. Additionally, for long needles, we also use a bad - character shift table similar to the Boyer-Moore algorithm to - achieve improved (potentially sub-linear) performance. - - See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, - http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, - http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf -*/ - -/* Point at which computing a bad-byte shift table is likely to be - worthwhile. Small needles should not compute a table, since it - adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a - speedup no greater than a factor of NEEDLE_LEN. The larger the - needle, the better the potential performance gain. On the other - hand, on non-POSIX systems with CHAR_BIT larger than eight, the - memory required for the table is prohibitive. */ -#if CHAR_BIT < 10 -# define LONG_NEEDLE_THRESHOLD 32U -#else -# define LONG_NEEDLE_THRESHOLD SIZE_MAX -#endif - -#ifndef MAX -# define MAX(a, b) ((a < b) ? (b) : (a)) -#endif - -#ifndef CANON_ELEMENT -# define CANON_ELEMENT(c) c -#endif -#ifndef CMP_FUNC -# define CMP_FUNC memcmp -#endif - -/* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. - Return the index of the first byte in the right half, and set - *PERIOD to the global period of the right half. - - The global period of a string is the smallest index (possibly its - length) at which all remaining bytes in the string are repetitions - of the prefix (the last repetition may be a subset of the prefix). - - When NEEDLE is factored into two halves, a local period is the - length of the smallest word that shares a suffix with the left half - and shares a prefix with the right half. All factorizations of a - non-empty NEEDLE have a local period of at least 1 and no greater - than NEEDLE_LEN. - - A critical factorization has the property that the local period - equals the global period. All strings have at least one critical - factorization with the left half smaller than the global period. - And while some strings have more than one critical factorization, - it is provable that with an ordered alphabet, at least one of the - critical factorizations corresponds to a maximal suffix. - - Given an ordered alphabet, a critical factorization can be computed - in linear time, with 2 * NEEDLE_LEN comparisons, by computing the - shorter of two ordered maximal suffixes. The ordered maximal - suffixes are determined by lexicographic comparison while tracking - periodicity. */ -static size_t -critical_factorization (const unsigned char *needle, size_t needle_len, - size_t *period) -{ - /* Index of last byte of left half, or SIZE_MAX. */ - size_t max_suffix, max_suffix_rev; - size_t j; /* Index into NEEDLE for current candidate suffix. */ - size_t k; /* Offset into current period. */ - size_t p; /* Intermediate period. */ - unsigned char a, b; /* Current comparison bytes. */ - - /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered - out 0-length needles. */ - if (needle_len < 3) - { - *period = 1; - return needle_len - 1; - } - - /* Invariants: - 0 <= j < NEEDLE_LEN - 1 - -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed) - min(max_suffix, max_suffix_rev) < global period of NEEDLE - 1 <= p <= global period of NEEDLE - p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j] - 1 <= k <= p - */ - - /* Perform lexicographic search. */ - max_suffix = SIZE_MAX; - j = 0; - k = p = 1; - while (j + k < needle_len) - { - a = CANON_ELEMENT (needle[j + k]); - b = CANON_ELEMENT (needle[max_suffix + k]); - if (a < b) - { - /* Suffix is smaller, period is entire prefix so far. */ - j += k; - k = 1; - p = j - max_suffix; - } - else if (a == b) - { - /* Advance through repetition of the current period. */ - if (k != p) - ++k; - else - { - j += p; - k = 1; - } - } - else /* b < a */ - { - /* Suffix is larger, start over from current location. */ - max_suffix = j++; - k = p = 1; - } - } - *period = p; - - /* Perform reverse lexicographic search. */ - max_suffix_rev = SIZE_MAX; - j = 0; - k = p = 1; - while (j + k < needle_len) - { - a = CANON_ELEMENT (needle[j + k]); - b = CANON_ELEMENT (needle[max_suffix_rev + k]); - if (b < a) - { - /* Suffix is smaller, period is entire prefix so far. */ - j += k; - k = 1; - p = j - max_suffix_rev; - } - else if (a == b) - { - /* Advance through repetition of the current period. */ - if (k != p) - ++k; - else - { - j += p; - k = 1; - } - } - else /* a < b */ - { - /* Suffix is larger, start over from current location. */ - max_suffix_rev = j++; - k = p = 1; - } - } - - /* Choose the shorter suffix. Return the index of the first byte of - the right half, rather than the last byte of the left half. - - For some examples, 'banana' has two critical factorizations, both - exposed by the two lexicographic extreme suffixes of 'anana' and - 'nana', where both suffixes have a period of 2. On the other - hand, with 'aab' and 'bba', both strings have a single critical - factorization of the last byte, with the suffix having a period - of 1. While the maximal lexicographic suffix of 'aab' is 'b', - the maximal lexicographic suffix of 'bba' is 'ba', which is not a - critical factorization. Conversely, the maximal reverse - lexicographic suffix of 'a' works for 'bba', but not 'ab' for - 'aab'. The shorter suffix of the two will always be a critical - factorization. */ - if (max_suffix_rev + 1 < max_suffix + 1) - return max_suffix + 1; - *period = p; - return max_suffix_rev + 1; -} - -/* Return the first location of non-empty NEEDLE within HAYSTACK, or - NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This - method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD. - Performance is guaranteed to be linear, with an initialization cost - of 2 * NEEDLE_LEN comparisons. - - If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at - most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. - If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * - HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ -static RETURN_TYPE -two_way_short_needle (const unsigned char *haystack, size_t haystack_len, - const unsigned char *needle, size_t needle_len) -{ - size_t i; /* Index into current byte of NEEDLE. */ - size_t j; /* Index into current window of HAYSTACK. */ - size_t period; /* The period of the right half of needle. */ - size_t suffix; /* The index of the right half of needle. */ - - /* Factor the needle into two halves, such that the left half is - smaller than the global period, and the right half is - periodic (with a period as large as NEEDLE_LEN - suffix). */ - suffix = critical_factorization (needle, needle_len, &period); - - /* Perform the search. Each iteration compares the right half - first. */ - if (CMP_FUNC (needle, needle + period, suffix) == 0) - { - /* Entire needle is periodic; a mismatch in the left half can - only advance by the period, so use memory to avoid rescanning - known occurrences of the period in the right half. */ - size_t memory = 0; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Scan for matches in right half. */ - i = MAX (suffix, memory); - while (i < needle_len && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (memory < i + 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i + 1 < memory + 1) - return (RETURN_TYPE) (haystack + j); - /* No match, so remember how many repetitions of period - on the right half were scanned. */ - j += period; - memory = needle_len - period; - } - else - { - j += i - suffix + 1; - memory = 0; - } - } - } - else - { - /* The two halves of needle are distinct; no extra memory is - required, and any mismatch results in a maximal shift. */ - period = MAX (suffix, needle_len - suffix) + 1; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Scan for matches in right half. */ - i = suffix; - while (i < needle_len && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i == SIZE_MAX) - return (RETURN_TYPE) (haystack + j); - j += period; - } - else - j += i - suffix + 1; - } - } - return NULL; -} - -/* Return the first location of non-empty NEEDLE within HAYSTACK, or - NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This - method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN. - Performance is guaranteed to be linear, with an initialization cost - of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations. - - If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at - most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, - and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible. - If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * - HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and - sublinear performance is not possible. */ -static RETURN_TYPE -two_way_long_needle (const unsigned char *haystack, size_t haystack_len, - const unsigned char *needle, size_t needle_len) -{ - size_t i; /* Index into current byte of NEEDLE. */ - size_t j; /* Index into current window of HAYSTACK. */ - size_t period; /* The period of the right half of needle. */ - size_t suffix; /* The index of the right half of needle. */ - size_t shift_table[1U << CHAR_BIT]; /* See below. */ - - /* Factor the needle into two halves, such that the left half is - smaller than the global period, and the right half is - periodic (with a period as large as NEEDLE_LEN - suffix). */ - suffix = critical_factorization (needle, needle_len, &period); - - /* Populate shift_table. For each possible byte value c, - shift_table[c] is the distance from the last occurrence of c to - the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. - shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ - for (i = 0; i < 1U << CHAR_BIT; i++) - shift_table[i] = needle_len; - for (i = 0; i < needle_len; i++) - shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; - - /* Perform the search. Each iteration compares the right half - first. */ - if (CMP_FUNC (needle, needle + period, suffix) == 0) - { - /* Entire needle is periodic; a mismatch in the left half can - only advance by the period, so use memory to avoid rescanning - known occurrences of the period in the right half. */ - size_t memory = 0; - size_t shift; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Check the last byte first; if it does not match, then - shift to the next possible match location. */ - shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; - if (0 < shift) - { - if (memory && shift < period) - { - /* Since needle is periodic, but the last period has - a byte out of place, there can be no match until - after the mismatch. */ - shift = needle_len - period; - } - memory = 0; - j += shift; - continue; - } - /* Scan for matches in right half. The last byte has - already been matched, by virtue of the shift table. */ - i = MAX (suffix, memory); - while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len - 1 <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (memory < i + 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i + 1 < memory + 1) - return (RETURN_TYPE) (haystack + j); - /* No match, so remember how many repetitions of period - on the right half were scanned. */ - j += period; - memory = needle_len - period; - } - else - { - j += i - suffix + 1; - memory = 0; - } - } - } - else - { - /* The two halves of needle are distinct; no extra memory is - required, and any mismatch results in a maximal shift. */ - size_t shift; - period = MAX (suffix, needle_len - suffix) + 1; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Check the last byte first; if it does not match, then - shift to the next possible match location. */ - shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; - if (0 < shift) - { - j += shift; - continue; - } - /* Scan for matches in right half. The last byte has - already been matched, by virtue of the shift table. */ - i = suffix; - while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len - 1 <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i == SIZE_MAX) - return (RETURN_TYPE) (haystack + j); - j += period; - } - else - j += i - suffix + 1; - } - } - return NULL; -} - -#undef AVAILABLE -#undef CANON_ELEMENT -#undef CMP_FUNC -#undef MAX -#undef RETURN_TYPE diff --git a/gnulib/lib/strcasecmp.c b/gnulib/lib/strcasecmp.c deleted file mode 100644 index 9a77bb5..0000000 --- a/gnulib/lib/strcasecmp.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Case-insensitive string comparison function. - Copyright (C) 1998-1999, 2005-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include - -#include -#include - -#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) - -/* Compare strings S1 and S2, ignoring case, returning less than, equal to or - greater than zero if S1 is lexicographically less than, equal to or greater - than S2. - Note: This function does not work with multibyte strings! */ - -int -strcasecmp (const char *s1, const char *s2) -{ - const unsigned char *p1 = (const unsigned char *) s1; - const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - - if (p1 == p2) - return 0; - - do - { - c1 = TOLOWER (*p1); - c2 = TOLOWER (*p2); - - if (c1 == '\0') - break; - - ++p1; - ++p2; - } - while (c1 == c2); - - if (UCHAR_MAX <= INT_MAX) - return c1 - c2; - else - /* On machines where 'char' and 'int' are types of the same size, the - difference of two 'unsigned char' values - including the sign bit - - doesn't fit in an 'int'. */ - return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); -} diff --git a/gnulib/lib/strcasestr.c b/gnulib/lib/strcasestr.c deleted file mode 100644 index 8f8fd97..0000000 --- a/gnulib/lib/strcasestr.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Case-insensitive searching in a string. - Copyright (C) 2005-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2005. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include - -#include -#include -#include - -#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) - -/* Two-Way algorithm. */ -#define RETURN_TYPE char * -#define AVAILABLE(h, h_l, j, n_l) \ - (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ - && ((h_l) = (j) + (n_l))) -#define CANON_ELEMENT(c) TOLOWER (c) -#define CMP_FUNC(p1, p2, l) \ - strncasecmp ((const char *) (p1), (const char *) (p2), l) -#include "str-two-way.h" - -/* Find the first occurrence of NEEDLE in HAYSTACK, using - case-insensitive comparison. This function gives unspecified - results in multibyte locales. */ -char * -strcasestr (const char *haystack_start, const char *needle_start) -{ - const char *haystack = haystack_start; - const char *needle = needle_start; - size_t needle_len; /* Length of NEEDLE. */ - size_t haystack_len; /* Known minimum length of HAYSTACK. */ - bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ - - /* Determine length of NEEDLE, and in the process, make sure - HAYSTACK is at least as long (no point processing all of a long - NEEDLE if HAYSTACK is too short). */ - while (*haystack && *needle) - { - ok &= (TOLOWER ((unsigned char) *haystack) - == TOLOWER ((unsigned char) *needle)); - haystack++; - needle++; - } - if (*needle) - return NULL; - if (ok) - return (char *) haystack_start; - needle_len = needle - needle_start; - haystack = haystack_start + 1; - haystack_len = needle_len - 1; - - /* Perform the search. Abstract memory is considered to be an array - of 'unsigned char' values, not an array of 'char' values. See - ISO C 99 section 6.2.6.1. */ - if (needle_len < LONG_NEEDLE_THRESHOLD) - return two_way_short_needle ((const unsigned char *) haystack, - haystack_len, - (const unsigned char *) needle_start, - needle_len); - return two_way_long_needle ((const unsigned char *) haystack, haystack_len, - (const unsigned char *) needle_start, - needle_len); -} - -#undef LONG_NEEDLE_THRESHOLD diff --git a/gnulib/lib/strdup.c b/gnulib/lib/strdup.c deleted file mode 100644 index ba7e76b..0000000 --- a/gnulib/lib/strdup.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _LIBC -# include -#endif - -/* Get specification. */ -#include - -#include - -#undef __strdup -#ifdef _LIBC -# undef strdup -#endif - -#ifndef weak_alias -# define __strdup strdup -#endif - -/* Duplicate S, returning an identical malloc'd string. */ -char * -__strdup (const char *s) -{ - size_t len = strlen (s) + 1; - void *new = malloc (len); - - if (new == NULL) - return NULL; - - return (char *) memcpy (new, s, len); -} -#ifdef libc_hidden_def -libc_hidden_def (__strdup) -#endif -#ifdef weak_alias -weak_alias (__strdup, strdup) -#endif diff --git a/gnulib/lib/streq.h b/gnulib/lib/streq.h deleted file mode 100644 index c7794f6..0000000 --- a/gnulib/lib/streq.h +++ /dev/null @@ -1,176 +0,0 @@ -/* Optimized string comparison. - Copyright (C) 2001-2002, 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible . */ - -#ifndef _GL_STREQ_H -#define _GL_STREQ_H - -#include - -/* STREQ allows to optimize string comparison with a small literal string. - STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) - is semantically equivalent to - strcmp (s, "EUC-KR") == 0 - just faster. */ - -/* Help GCC to generate good code for string comparisons with - immediate strings. */ -#if defined (__GNUC__) && defined (__OPTIMIZE__) - -static inline int -streq9 (const char *s1, const char *s2) -{ - return strcmp (s1 + 9, s2 + 9) == 0; -} - -static inline int -streq8 (const char *s1, const char *s2, char s28) -{ - if (s1[8] == s28) - { - if (s28 == 0) - return 1; - else - return streq9 (s1, s2); - } - else - return 0; -} - -static inline int -streq7 (const char *s1, const char *s2, char s27, char s28) -{ - if (s1[7] == s27) - { - if (s27 == 0) - return 1; - else - return streq8 (s1, s2, s28); - } - else - return 0; -} - -static inline int -streq6 (const char *s1, const char *s2, char s26, char s27, char s28) -{ - if (s1[6] == s26) - { - if (s26 == 0) - return 1; - else - return streq7 (s1, s2, s27, s28); - } - else - return 0; -} - -static inline int -streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28) -{ - if (s1[5] == s25) - { - if (s25 == 0) - return 1; - else - return streq6 (s1, s2, s26, s27, s28); - } - else - return 0; -} - -static inline int -streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28) -{ - if (s1[4] == s24) - { - if (s24 == 0) - return 1; - else - return streq5 (s1, s2, s25, s26, s27, s28); - } - else - return 0; -} - -static inline int -streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28) -{ - if (s1[3] == s23) - { - if (s23 == 0) - return 1; - else - return streq4 (s1, s2, s24, s25, s26, s27, s28); - } - else - return 0; -} - -static inline int -streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28) -{ - if (s1[2] == s22) - { - if (s22 == 0) - return 1; - else - return streq3 (s1, s2, s23, s24, s25, s26, s27, s28); - } - else - return 0; -} - -static inline int -streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) -{ - if (s1[1] == s21) - { - if (s21 == 0) - return 1; - else - return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28); - } - else - return 0; -} - -static inline int -streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) -{ - if (s1[0] == s20) - { - if (s20 == 0) - return 1; - else - return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28); - } - else - return 0; -} - -#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ - streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) - -#else - -#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ - (strcmp (s1, s2) == 0) - -#endif - -#endif /* _GL_STREQ_H */ diff --git a/gnulib/lib/strerror.c b/gnulib/lib/strerror.c deleted file mode 100644 index 5dae111..0000000 --- a/gnulib/lib/strerror.c +++ /dev/null @@ -1,356 +0,0 @@ -/* strerror.c --- POSIX compatible system error routine - - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include - -#if REPLACE_STRERROR - -# include -# include - -# if GNULIB_defined_ESOCK /* native Windows platforms */ -# if HAVE_WINSOCK2_H -# include -# endif -# endif - -# include "intprops.h" - -/* Use the system functions, not the gnulib overrides in this file. */ -# undef sprintf - -# undef strerror -# if ! HAVE_DECL_STRERROR -# define strerror(n) NULL -# endif - -char * -rpl_strerror (int n) -{ - char const *msg = NULL; - /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */ - switch (n) - { -# if GNULIB_defined_ETXTBSY - case ETXTBSY: - msg = "Text file busy"; - break; -# endif - -# if GNULIB_defined_ESOCK /* native Windows platforms */ - /* EWOULDBLOCK is the same as EAGAIN. */ - case EINPROGRESS: - msg = "Operation now in progress"; - break; - case EALREADY: - msg = "Operation already in progress"; - break; - case ENOTSOCK: - msg = "Socket operation on non-socket"; - break; - case EDESTADDRREQ: - msg = "Destination address required"; - break; - case EMSGSIZE: - msg = "Message too long"; - break; - case EPROTOTYPE: - msg = "Protocol wrong type for socket"; - break; - case ENOPROTOOPT: - msg = "Protocol not available"; - break; - case EPROTONOSUPPORT: - msg = "Protocol not supported"; - break; - case ESOCKTNOSUPPORT: - msg = "Socket type not supported"; - break; - case EOPNOTSUPP: - msg = "Operation not supported"; - break; - case EPFNOSUPPORT: - msg = "Protocol family not supported"; - break; - case EAFNOSUPPORT: - msg = "Address family not supported by protocol"; - break; - case EADDRINUSE: - msg = "Address already in use"; - break; - case EADDRNOTAVAIL: - msg = "Cannot assign requested address"; - break; - case ENETDOWN: - msg = "Network is down"; - break; - case ENETUNREACH: - msg = "Network is unreachable"; - break; - case ENETRESET: - msg = "Network dropped connection on reset"; - break; - case ECONNABORTED: - msg = "Software caused connection abort"; - break; - case ECONNRESET: - msg = "Connection reset by peer"; - break; - case ENOBUFS: - msg = "No buffer space available"; - break; - case EISCONN: - msg = "Transport endpoint is already connected"; - break; - case ENOTCONN: - msg = "Transport endpoint is not connected"; - break; - case ESHUTDOWN: - msg = "Cannot send after transport endpoint shutdown"; - break; - case ETOOMANYREFS: - msg = "Too many references: cannot splice"; - break; - case ETIMEDOUT: - msg = "Connection timed out"; - break; - case ECONNREFUSED: - msg = "Connection refused"; - break; - case ELOOP: - msg = "Too many levels of symbolic links"; - break; - case EHOSTDOWN: - msg = "Host is down"; - break; - case EHOSTUNREACH: - msg = "No route to host"; - break; - case EPROCLIM: - msg = "Too many processes"; - break; - case EUSERS: - msg = "Too many users"; - break; - case EDQUOT: - msg = "Disk quota exceeded"; - break; - case ESTALE: - msg = "Stale NFS file handle"; - break; - case EREMOTE: - msg = "Object is remote"; - break; -# if HAVE_WINSOCK2_H - /* WSA_INVALID_HANDLE maps to EBADF */ - /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */ - /* WSA_INVALID_PARAMETER maps to EINVAL */ - case WSA_OPERATION_ABORTED: - msg = "Overlapped operation aborted"; - break; - case WSA_IO_INCOMPLETE: - msg = "Overlapped I/O event object not in signaled state"; - break; - case WSA_IO_PENDING: - msg = "Overlapped operations will complete later"; - break; - /* WSAEINTR maps to EINTR */ - /* WSAEBADF maps to EBADF */ - /* WSAEACCES maps to EACCES */ - /* WSAEFAULT maps to EFAULT */ - /* WSAEINVAL maps to EINVAL */ - /* WSAEMFILE maps to EMFILE */ - /* WSAEWOULDBLOCK maps to EWOULDBLOCK */ - /* WSAEINPROGRESS is EINPROGRESS */ - /* WSAEALREADY is EALREADY */ - /* WSAENOTSOCK is ENOTSOCK */ - /* WSAEDESTADDRREQ is EDESTADDRREQ */ - /* WSAEMSGSIZE is EMSGSIZE */ - /* WSAEPROTOTYPE is EPROTOTYPE */ - /* WSAENOPROTOOPT is ENOPROTOOPT */ - /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */ - /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */ - /* WSAEOPNOTSUPP is EOPNOTSUPP */ - /* WSAEPFNOSUPPORT is EPFNOSUPPORT */ - /* WSAEAFNOSUPPORT is EAFNOSUPPORT */ - /* WSAEADDRINUSE is EADDRINUSE */ - /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */ - /* WSAENETDOWN is ENETDOWN */ - /* WSAENETUNREACH is ENETUNREACH */ - /* WSAENETRESET is ENETRESET */ - /* WSAECONNABORTED is ECONNABORTED */ - /* WSAECONNRESET is ECONNRESET */ - /* WSAENOBUFS is ENOBUFS */ - /* WSAEISCONN is EISCONN */ - /* WSAENOTCONN is ENOTCONN */ - /* WSAESHUTDOWN is ESHUTDOWN */ - /* WSAETOOMANYREFS is ETOOMANYREFS */ - /* WSAETIMEDOUT is ETIMEDOUT */ - /* WSAECONNREFUSED is ECONNREFUSED */ - /* WSAELOOP is ELOOP */ - /* WSAENAMETOOLONG maps to ENAMETOOLONG */ - /* WSAEHOSTDOWN is EHOSTDOWN */ - /* WSAEHOSTUNREACH is EHOSTUNREACH */ - /* WSAENOTEMPTY maps to ENOTEMPTY */ - /* WSAEPROCLIM is EPROCLIM */ - /* WSAEUSERS is EUSERS */ - /* WSAEDQUOT is EDQUOT */ - /* WSAESTALE is ESTALE */ - /* WSAEREMOTE is EREMOTE */ - case WSASYSNOTREADY: - msg = "Network subsystem is unavailable"; - break; - case WSAVERNOTSUPPORTED: - msg = "Winsock.dll version out of range"; - break; - case WSANOTINITIALISED: - msg = "Successful WSAStartup not yet performed"; - break; - case WSAEDISCON: - msg = "Graceful shutdown in progress"; - break; - case WSAENOMORE: case WSA_E_NO_MORE: - msg = "No more results"; - break; - case WSAECANCELLED: case WSA_E_CANCELLED: - msg = "Call was canceled"; - break; - case WSAEINVALIDPROCTABLE: - msg = "Procedure call table is invalid"; - break; - case WSAEINVALIDPROVIDER: - msg = "Service provider is invalid"; - break; - case WSAEPROVIDERFAILEDINIT: - msg = "Service provider failed to initialize"; - break; - case WSASYSCALLFAILURE: - msg = "System call failure"; - break; - case WSASERVICE_NOT_FOUND: - msg = "Service not found"; - break; - case WSATYPE_NOT_FOUND: - msg = "Class type not found"; - break; - case WSAEREFUSED: - msg = "Database query was refused"; - break; - case WSAHOST_NOT_FOUND: - msg = "Host not found"; - break; - case WSATRY_AGAIN: - msg = "Nonauthoritative host not found"; - break; - case WSANO_RECOVERY: - msg = "Nonrecoverable error"; - break; - case WSANO_DATA: - msg = "Valid name, no data record of requested type"; - break; - /* WSA_QOS_* omitted */ -# endif -# endif - -# if GNULIB_defined_ENOMSG - case ENOMSG: - msg = "No message of desired type"; - break; -# endif - -# if GNULIB_defined_EIDRM - case EIDRM: - msg = "Identifier removed"; - break; -# endif - -# if GNULIB_defined_ENOLINK - case ENOLINK: - msg = "Link has been severed"; - break; -# endif - -# if GNULIB_defined_EPROTO - case EPROTO: - msg = "Protocol error"; - break; -# endif - -# if GNULIB_defined_EMULTIHOP - case EMULTIHOP: - msg = "Multihop attempted"; - break; -# endif - -# if GNULIB_defined_EBADMSG - case EBADMSG: - msg = "Bad message"; - break; -# endif - -# if GNULIB_defined_EOVERFLOW - case EOVERFLOW: - msg = "Value too large for defined data type"; - break; -# endif - -# if GNULIB_defined_ENOTSUP - case ENOTSUP: - msg = "Not supported"; - break; -# endif - -# if GNULIB_defined_ESTALE - case ESTALE: - msg = "Stale NFS file handle"; - break; -# endif - -# if GNULIB_defined_EDQUOT - case EDQUOT: - msg = "Disk quota exceeded"; - break; -# endif - -# if GNULIB_defined_ECANCELED - case ECANCELED: - msg = "Operation canceled"; - break; -# endif - } - - if (msg) - return (char *) msg; - - { - char *result = strerror (n); - - if (result == NULL || result[0] == '\0') - { - static char const fmt[] = "Unknown error (%d)"; - static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)]; - sprintf (msg_buf, fmt, n); - return msg_buf; - } - - return result; - } -} - -#endif diff --git a/gnulib/lib/strftime.c b/gnulib/lib/strftime.c deleted file mode 100644 index acebc9a..0000000 --- a/gnulib/lib/strftime.c +++ /dev/null @@ -1,1469 +0,0 @@ -/* Copyright (C) 1991-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. - - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@prep.ai.mit.edu. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifdef _LIBC -# define HAVE_STRUCT_ERA_ENTRY 1 -# define HAVE_TM_GMTOFF 1 -# define HAVE_TM_ZONE 1 -# define HAVE_TZNAME 1 -# define HAVE_TZSET 1 -# include "../locale/localeinfo.h" -#else -# include -# if FPRINTFTIME -# include "ignore-value.h" -# include "fprintftime.h" -# else -# include "strftime.h" -# endif -#endif - -#include -#include - -#if HAVE_TZNAME && !HAVE_DECL_TZNAME -extern char *tzname[]; -#endif - -/* Do multibyte processing if multibytes are supported, unless - multibyte sequences are safe in formats. Multibyte sequences are - safe if they cannot contain byte sequences that look like format - conversion specifications. The multibyte encodings used by the - C library on the various platforms (UTF-8, GB2312, GBK, CP936, - GB18030, EUC-TW, BIG5, BIG5-HKSCS, CP950, EUC-JP, EUC-KR, CP949, - SHIFT_JIS, CP932, JOHAB) are safe for formats, because the byte '%' - cannot occur in a multibyte character except in the first byte. - - The DEC-HANYU encoding used on OSF/1 is not safe for formats, but - this encoding has never been seen in real-life use, so we ignore - it. */ -#if !(defined __osf__ && 0) -# define MULTIBYTE_IS_FORMAT_SAFE 1 -#endif -#define DO_MULTIBYTE (! MULTIBYTE_IS_FORMAT_SAFE) - -#if DO_MULTIBYTE -# include - static const mbstate_t mbstate_zero; -#endif - -#include -#include -#include -#include -#include - -#ifdef COMPILE_WIDE -# include -# define CHAR_T wchar_t -# define UCHAR_T unsigned int -# define L_(Str) L##Str -# define NLW(Sym) _NL_W##Sym - -# define MEMCPY(d, s, n) __wmemcpy (d, s, n) -# define STRLEN(s) __wcslen (s) - -#else -# define CHAR_T char -# define UCHAR_T unsigned char -# define L_(Str) Str -# define NLW(Sym) Sym - -# define MEMCPY(d, s, n) memcpy (d, s, n) -# define STRLEN(s) strlen (s) - -#endif - -/* Shift A right by B bits portably, by dividing A by 2**B and - truncating towards minus infinity. A and B should be free of side - effects, and B should be in the range 0 <= B <= INT_BITS - 2, where - INT_BITS is the number of useful bits in an int. GNU code can - assume that INT_BITS is at least 32. - - ISO C99 says that A >> B is implementation-defined if A < 0. Some - implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift - right in the usual way when A < 0, so SHR falls back on division if - ordinary A >> B doesn't seem to be the usual signed shift. */ -#define SHR(a, b) \ - (-1 >> 1 == -1 \ - ? (a) >> (b) \ - : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) - -/* Bound on length of the string representing an integer type or expression T. - Subtract 1 for the sign bit if t is signed; log10 (2.0) < 146/485; - add 1 for integer division truncation; add 1 more for a minus sign - if needed. */ -#define INT_STRLEN_BOUND(t) \ - ((sizeof (t) * CHAR_BIT - 1) * 146 / 485 + 2) - -#define TM_YEAR_BASE 1900 - -#ifndef __isleap -/* Nonzero if YEAR is a leap year (every 4 years, - except every 100th isn't, and every 400th is). */ -# define __isleap(year) \ - ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) -#endif - - -#ifdef _LIBC -# define tzname __tzname -# define tzset __tzset -#endif - -#if !HAVE_TM_GMTOFF -/* Portable standalone applications should supply a "time.h" that - declares a POSIX-compliant localtime_r, for the benefit of older - implementations that lack localtime_r or have a nonstandard one. - See the gnulib time_r module for one way to implement this. */ -# undef __gmtime_r -# undef __localtime_r -# define __gmtime_r gmtime_r -# define __localtime_r localtime_r -#endif - - -#ifndef FPRINTFTIME -# define FPRINTFTIME 0 -#endif - -#if FPRINTFTIME -# define STREAM_OR_CHAR_T FILE -# define STRFTIME_ARG(x) /* empty */ -#else -# define STREAM_OR_CHAR_T CHAR_T -# define STRFTIME_ARG(x) x, -#endif - -#if FPRINTFTIME -# define memset_byte(P, Len, Byte) \ - do { size_t _i; for (_i = 0; _i < Len; _i++) fputc (Byte, P); } while (0) -# define memset_space(P, Len) memset_byte (P, Len, ' ') -# define memset_zero(P, Len) memset_byte (P, Len, '0') -#elif defined COMPILE_WIDE -# define memset_space(P, Len) (wmemset (P, L' ', Len), (P) += (Len)) -# define memset_zero(P, Len) (wmemset (P, L'0', Len), (P) += (Len)) -#else -# define memset_space(P, Len) (memset (P, ' ', Len), (P) += (Len)) -# define memset_zero(P, Len) (memset (P, '0', Len), (P) += (Len)) -#endif - -#if FPRINTFTIME -# define advance(P, N) -#else -# define advance(P, N) ((P) += (N)) -#endif - -#define add(n, f) \ - do \ - { \ - size_t _n = (n); \ - size_t _w = (width < 0 ? 0 : width); \ - size_t _incr = _n < _w ? _w : _n; \ - if (_incr >= maxsize - i) \ - return 0; \ - if (p) \ - { \ - if (digits == 0 && _n < _w) \ - { \ - size_t _delta = width - _n; \ - if (pad == L_('0')) \ - memset_zero (p, _delta); \ - else \ - memset_space (p, _delta); \ - } \ - f; \ - advance (p, _n); \ - } \ - i += _incr; \ - } while (0) - -#if FPRINTFTIME -# define add1(C) add (1, fputc (C, p)) -#else -# define add1(C) add (1, *p = C) -#endif - -#if FPRINTFTIME -# define cpy(n, s) \ - add ((n), \ - do \ - { \ - if (to_lowcase) \ - fwrite_lowcase (p, (s), _n); \ - else if (to_uppcase) \ - fwrite_uppcase (p, (s), _n); \ - else \ - { \ - /* We are ignoring the value of fwrite here, in spite of the \ - fact that technically, that may not be valid: the fwrite \ - specification in POSIX 2008 defers to that of fputc, which \ - is intended to be consistent with the one from ISO C, \ - which permits failure due to ENOMEM *without* setting the \ - stream's error indicator. */ \ - ignore_value (fwrite ((s), _n, 1, p)); \ - } \ - } \ - while (0) \ - ) -#else -# define cpy(n, s) \ - add ((n), \ - if (to_lowcase) \ - memcpy_lowcase (p, (s), _n LOCALE_ARG); \ - else if (to_uppcase) \ - memcpy_uppcase (p, (s), _n LOCALE_ARG); \ - else \ - MEMCPY ((void *) p, (void const *) (s), _n)) -#endif - -#ifdef COMPILE_WIDE -# ifndef USE_IN_EXTENDED_LOCALE_MODEL -# undef __mbsrtowcs_l -# define __mbsrtowcs_l(d, s, l, st, loc) __mbsrtowcs (d, s, l, st) -# endif -# define widen(os, ws, l) \ - { \ - mbstate_t __st; \ - const char *__s = os; \ - memset (&__st, '\0', sizeof (__st)); \ - l = __mbsrtowcs_l (NULL, &__s, 0, &__st, loc); \ - ws = (wchar_t *) alloca ((l + 1) * sizeof (wchar_t)); \ - (void) __mbsrtowcs_l (ws, &__s, l, &__st, loc); \ - } -#endif - - -#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL -/* We use this code also for the extended locale handling where the - function gets as an additional argument the locale which has to be - used. To access the values we have to redefine the _NL_CURRENT - macro. */ -# define strftime __strftime_l -# define wcsftime __wcsftime_l -# undef _NL_CURRENT -# define _NL_CURRENT(category, item) \ - (current->values[_NL_ITEM_INDEX (item)].string) -# define LOCALE_ARG , loc -# define LOCALE_PARAM_PROTO , __locale_t loc -# define HELPER_LOCALE_ARG , current -#else -# define LOCALE_PARAM_PROTO -# define LOCALE_ARG -# ifdef _LIBC -# define HELPER_LOCALE_ARG , _NL_CURRENT_DATA (LC_TIME) -# else -# define HELPER_LOCALE_ARG -# endif -#endif - -#ifdef COMPILE_WIDE -# ifdef USE_IN_EXTENDED_LOCALE_MODEL -# define TOUPPER(Ch, L) __towupper_l (Ch, L) -# define TOLOWER(Ch, L) __towlower_l (Ch, L) -# else -# define TOUPPER(Ch, L) towupper (Ch) -# define TOLOWER(Ch, L) towlower (Ch) -# endif -#else -# ifdef USE_IN_EXTENDED_LOCALE_MODEL -# define TOUPPER(Ch, L) __toupper_l (Ch, L) -# define TOLOWER(Ch, L) __tolower_l (Ch, L) -# else -# define TOUPPER(Ch, L) toupper (Ch) -# define TOLOWER(Ch, L) tolower (Ch) -# endif -#endif -/* We don't use `isdigit' here since the locale dependent - interpretation is not what we want here. We only need to accept - the arabic digits in the ASCII range. One day there is perhaps a - more reliable way to accept other sets of digits. */ -#define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9) - -#if FPRINTFTIME -static void -fwrite_lowcase (FILE *fp, const CHAR_T *src, size_t len) -{ - while (len-- > 0) - { - fputc (TOLOWER ((UCHAR_T) *src, loc), fp); - ++src; - } -} - -static void -fwrite_uppcase (FILE *fp, const CHAR_T *src, size_t len) -{ - while (len-- > 0) - { - fputc (TOUPPER ((UCHAR_T) *src, loc), fp); - ++src; - } -} -#else -static CHAR_T * -memcpy_lowcase (CHAR_T *dest, const CHAR_T *src, - size_t len LOCALE_PARAM_PROTO) -{ - while (len-- > 0) - dest[len] = TOLOWER ((UCHAR_T) src[len], loc); - return dest; -} - -static CHAR_T * -memcpy_uppcase (CHAR_T *dest, const CHAR_T *src, - size_t len LOCALE_PARAM_PROTO) -{ - while (len-- > 0) - dest[len] = TOUPPER ((UCHAR_T) src[len], loc); - return dest; -} -#endif - - -#if ! HAVE_TM_GMTOFF -/* Yield the difference between *A and *B, - measured in seconds, ignoring leap seconds. */ -# define tm_diff ftime_tm_diff -static int -tm_diff (const struct tm *a, const struct tm *b) -{ - /* Compute intervening leap days correctly even if year is negative. - Take care to avoid int overflow in leap day calculations, - but it's OK to assume that A and B are close to each other. */ - int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); - int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); - int a100 = a4 / 25 - (a4 % 25 < 0); - int b100 = b4 / 25 - (b4 % 25 < 0); - int a400 = SHR (a100, 2); - int b400 = SHR (b100, 2); - int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); - int years = a->tm_year - b->tm_year; - int days = (365 * years + intervening_leap_days - + (a->tm_yday - b->tm_yday)); - return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) - + (a->tm_min - b->tm_min)) - + (a->tm_sec - b->tm_sec)); -} -#endif /* ! HAVE_TM_GMTOFF */ - - - -/* The number of days from the first day of the first ISO week of this - year to the year day YDAY with week day WDAY. ISO weeks start on - Monday; the first ISO week has the year's first Thursday. YDAY may - be as small as YDAY_MINIMUM. */ -#define ISO_WEEK_START_WDAY 1 /* Monday */ -#define ISO_WEEK1_WDAY 4 /* Thursday */ -#define YDAY_MINIMUM (-366) -#ifdef __GNUC__ -__inline__ -#endif -static int -iso_week_days (int yday, int wday) -{ - /* Add enough to the first operand of % to make it nonnegative. */ - int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7; - return (yday - - (yday - wday + ISO_WEEK1_WDAY + big_enough_multiple_of_7) % 7 - + ISO_WEEK1_WDAY - ISO_WEEK_START_WDAY); -} - - -/* When compiling this file, GNU applications can #define my_strftime - to a symbol (typically nstrftime) to get an extended strftime with - extra arguments UT and NS. Emacs is a special case for now, but - this Emacs-specific code can be removed once Emacs's config.h - defines my_strftime. */ -#if defined emacs && !defined my_strftime -# define my_strftime nstrftime -#endif - -#if FPRINTFTIME -# undef my_strftime -# define my_strftime fprintftime -#endif - -#ifdef my_strftime -# define extra_args , ut, ns -# define extra_args_spec , int ut, int ns -#else -# if defined COMPILE_WIDE -# define my_strftime wcsftime -# define nl_get_alt_digit _nl_get_walt_digit -# else -# define my_strftime strftime -# define nl_get_alt_digit _nl_get_alt_digit -# endif -# define extra_args -# define extra_args_spec -/* We don't have this information in general. */ -# define ut 0 -# define ns 0 -#endif - - -/* Just like my_strftime, below, but with one more parameter, UPCASE, - to indicate that the result should be converted to upper case. */ -static size_t -strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s, - STRFTIME_ARG (size_t maxsize) - const CHAR_T *format, - const struct tm *tp extra_args_spec LOCALE_PARAM_PROTO) -{ -#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL - struct locale_data *const current = loc->__locales[LC_TIME]; -#endif -#if FPRINTFTIME - size_t maxsize = (size_t) -1; -#endif - - int hour12 = tp->tm_hour; -#ifdef _NL_CURRENT - /* We cannot make the following values variables since we must delay - the evaluation of these values until really needed since some - expressions might not be valid in every situation. The `struct tm' - might be generated by a strptime() call that initialized - only a few elements. Dereference the pointers only if the format - requires this. Then it is ok to fail if the pointers are invalid. */ -# define a_wkday \ - ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday)) -# define f_wkday \ - ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday)) -# define a_month \ - ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon)) -# define f_month \ - ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)) -# define ampm \ - ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11 \ - ? NLW(PM_STR) : NLW(AM_STR))) - -# define aw_len STRLEN (a_wkday) -# define am_len STRLEN (a_month) -# define ap_len STRLEN (ampm) -#endif - const char *zone; - size_t i = 0; - STREAM_OR_CHAR_T *p = s; - const CHAR_T *f; -#if DO_MULTIBYTE && !defined COMPILE_WIDE - const char *format_end = NULL; -#endif - -#if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST - /* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned - by localtime. On such systems, we must either use the tzset and - localtime wrappers to work around the bug (which sets - HAVE_RUN_TZSET_TEST) or make a copy of the structure. */ - struct tm copy = *tp; - tp = © -#endif - - zone = NULL; -#if HAVE_TM_ZONE - /* The POSIX test suite assumes that setting - the environment variable TZ to a new value before calling strftime() - will influence the result (the %Z format) even if the information in - TP is computed with a totally different time zone. - This is bogus: though POSIX allows bad behavior like this, - POSIX does not require it. Do the right thing instead. */ - zone = (const char *) tp->tm_zone; -#endif -#if HAVE_TZNAME - if (ut) - { - if (! (zone && *zone)) - zone = "GMT"; - } - else - { - /* POSIX.1 requires that local time zone information be used as - though strftime called tzset. */ -# if HAVE_TZSET - tzset (); -# endif - } -#endif - - if (hour12 > 12) - hour12 -= 12; - else - if (hour12 == 0) - hour12 = 12; - - for (f = format; *f != '\0'; ++f) - { - int pad = 0; /* Padding for number ('-', '_', or 0). */ - int modifier; /* Field modifier ('E', 'O', or 0). */ - int digits = 0; /* Max digits for numeric format. */ - int number_value; /* Numeric value to be printed. */ - unsigned int u_number_value; /* (unsigned int) number_value. */ - bool negative_number; /* The number is negative. */ - bool always_output_a_sign; /* +/- should always be output. */ - int tz_colon_mask; /* Bitmask of where ':' should appear. */ - const CHAR_T *subfmt; - CHAR_T sign_char; - CHAR_T *bufp; - CHAR_T buf[1 - + 2 /* for the two colons in a %::z or %:::z time zone */ - + (sizeof (int) < sizeof (time_t) - ? INT_STRLEN_BOUND (time_t) - : INT_STRLEN_BOUND (int))]; - int width = -1; - bool to_lowcase = false; - bool to_uppcase = upcase; - size_t colons; - bool change_case = false; - int format_char; - -#if DO_MULTIBYTE && !defined COMPILE_WIDE - switch (*f) - { - case L_('%'): - break; - - case L_('\b'): case L_('\t'): case L_('\n'): - case L_('\v'): case L_('\f'): case L_('\r'): - case L_(' '): case L_('!'): case L_('"'): case L_('#'): case L_('&'): - case L_('\''): case L_('('): case L_(')'): case L_('*'): case L_('+'): - case L_(','): case L_('-'): case L_('.'): case L_('/'): case L_('0'): - case L_('1'): case L_('2'): case L_('3'): case L_('4'): case L_('5'): - case L_('6'): case L_('7'): case L_('8'): case L_('9'): case L_(':'): - case L_(';'): case L_('<'): case L_('='): case L_('>'): case L_('?'): - case L_('A'): case L_('B'): case L_('C'): case L_('D'): case L_('E'): - case L_('F'): case L_('G'): case L_('H'): case L_('I'): case L_('J'): - case L_('K'): case L_('L'): case L_('M'): case L_('N'): case L_('O'): - case L_('P'): case L_('Q'): case L_('R'): case L_('S'): case L_('T'): - case L_('U'): case L_('V'): case L_('W'): case L_('X'): case L_('Y'): - case L_('Z'): case L_('['): case L_('\\'): case L_(']'): case L_('^'): - case L_('_'): case L_('a'): case L_('b'): case L_('c'): case L_('d'): - case L_('e'): case L_('f'): case L_('g'): case L_('h'): case L_('i'): - case L_('j'): case L_('k'): case L_('l'): case L_('m'): case L_('n'): - case L_('o'): case L_('p'): case L_('q'): case L_('r'): case L_('s'): - case L_('t'): case L_('u'): case L_('v'): case L_('w'): case L_('x'): - case L_('y'): case L_('z'): case L_('{'): case L_('|'): case L_('}'): - case L_('~'): - /* The C Standard requires these 98 characters (plus '%') to - be in the basic execution character set. None of these - characters can start a multibyte sequence, so they need - not be analyzed further. */ - add1 (*f); - continue; - - default: - /* Copy this multibyte sequence until we reach its end, find - an error, or come back to the initial shift state. */ - { - mbstate_t mbstate = mbstate_zero; - size_t len = 0; - size_t fsize; - - if (! format_end) - format_end = f + strlen (f) + 1; - fsize = format_end - f; - - do - { - size_t bytes = mbrlen (f + len, fsize - len, &mbstate); - - if (bytes == 0) - break; - - if (bytes == (size_t) -2) - { - len += strlen (f + len); - break; - } - - if (bytes == (size_t) -1) - { - len++; - break; - } - - len += bytes; - } - while (! mbsinit (&mbstate)); - - cpy (len, f); - f += len - 1; - continue; - } - } - -#else /* ! DO_MULTIBYTE */ - - /* Either multibyte encodings are not supported, they are - safe for formats, so any non-'%' byte can be copied through, - or this is the wide character version. */ - if (*f != L_('%')) - { - add1 (*f); - continue; - } - -#endif /* ! DO_MULTIBYTE */ - - /* Check for flags that can modify a format. */ - while (1) - { - switch (*++f) - { - /* This influences the number formats. */ - case L_('_'): - case L_('-'): - case L_('0'): - pad = *f; - continue; - - /* This changes textual output. */ - case L_('^'): - to_uppcase = true; - continue; - case L_('#'): - change_case = true; - continue; - - default: - break; - } - break; - } - - /* As a GNU extension we allow to specify the field width. */ - if (ISDIGIT (*f)) - { - width = 0; - do - { - if (width > INT_MAX / 10 - || (width == INT_MAX / 10 && *f - L_('0') > INT_MAX % 10)) - /* Avoid overflow. */ - width = INT_MAX; - else - { - width *= 10; - width += *f - L_('0'); - } - ++f; - } - while (ISDIGIT (*f)); - } - - /* Check for modifiers. */ - switch (*f) - { - case L_('E'): - case L_('O'): - modifier = *f++; - break; - - default: - modifier = 0; - break; - } - - /* Now do the specified format. */ - format_char = *f; - switch (format_char) - { -#define DO_NUMBER(d, v) \ - digits = d; \ - number_value = v; goto do_number -#define DO_SIGNED_NUMBER(d, negative, v) \ - digits = d; \ - negative_number = negative; \ - u_number_value = v; goto do_signed_number - - /* The mask is not what you might think. - When the ordinal i'th bit is set, insert a colon - before the i'th digit of the time zone representation. */ -#define DO_TZ_OFFSET(d, negative, mask, v) \ - digits = d; \ - negative_number = negative; \ - tz_colon_mask = mask; \ - u_number_value = v; goto do_tz_offset -#define DO_NUMBER_SPACEPAD(d, v) \ - digits = d; \ - number_value = v; goto do_number_spacepad - - case L_('%'): - if (modifier != 0) - goto bad_format; - add1 (*f); - break; - - case L_('a'): - if (modifier != 0) - goto bad_format; - if (change_case) - { - to_uppcase = true; - to_lowcase = false; - } -#ifdef _NL_CURRENT - cpy (aw_len, a_wkday); - break; -#else - goto underlying_strftime; -#endif - - case 'A': - if (modifier != 0) - goto bad_format; - if (change_case) - { - to_uppcase = true; - to_lowcase = false; - } -#ifdef _NL_CURRENT - cpy (STRLEN (f_wkday), f_wkday); - break; -#else - goto underlying_strftime; -#endif - - case L_('b'): - case L_('h'): - if (change_case) - { - to_uppcase = true; - to_lowcase = false; - } - if (modifier != 0) - goto bad_format; -#ifdef _NL_CURRENT - cpy (am_len, a_month); - break; -#else - goto underlying_strftime; -#endif - - case L_('B'): - if (modifier != 0) - goto bad_format; - if (change_case) - { - to_uppcase = true; - to_lowcase = false; - } -#ifdef _NL_CURRENT - cpy (STRLEN (f_month), f_month); - break; -#else - goto underlying_strftime; -#endif - - case L_('c'): - if (modifier == L_('O')) - goto bad_format; -#ifdef _NL_CURRENT - if (! (modifier == 'E' - && (*(subfmt = - (const CHAR_T *) _NL_CURRENT (LC_TIME, - NLW(ERA_D_T_FMT))) - != '\0'))) - subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT)); -#else - goto underlying_strftime; -#endif - - subformat: - { - size_t len = strftime_case_ (to_uppcase, - NULL, STRFTIME_ARG ((size_t) -1) - subfmt, - tp extra_args LOCALE_ARG); - add (len, strftime_case_ (to_uppcase, p, - STRFTIME_ARG (maxsize - i) - subfmt, - tp extra_args LOCALE_ARG)); - } - break; - -#if !(defined _NL_CURRENT && HAVE_STRUCT_ERA_ENTRY) - underlying_strftime: - { - /* The relevant information is available only via the - underlying strftime implementation, so use that. */ - char ufmt[5]; - char *u = ufmt; - char ubuf[1024]; /* enough for any single format in practice */ - size_t len; - /* Make sure we're calling the actual underlying strftime. - In some cases, config.h contains something like - "#define strftime rpl_strftime". */ -# ifdef strftime -# undef strftime - size_t strftime (); -# endif - - /* The space helps distinguish strftime failure from empty - output. */ - *u++ = ' '; - *u++ = '%'; - if (modifier != 0) - *u++ = modifier; - *u++ = format_char; - *u = '\0'; - len = strftime (ubuf, sizeof ubuf, ufmt, tp); - if (len != 0) - cpy (len - 1, ubuf + 1); - } - break; -#endif - - case L_('C'): - if (modifier == L_('O')) - goto bad_format; - if (modifier == L_('E')) - { -#if HAVE_STRUCT_ERA_ENTRY - struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); - if (era) - { -# ifdef COMPILE_WIDE - size_t len = __wcslen (era->era_wname); - cpy (len, era->era_wname); -# else - size_t len = strlen (era->era_name); - cpy (len, era->era_name); -# endif - break; - } -#else - goto underlying_strftime; -#endif - } - - { - int century = tp->tm_year / 100 + TM_YEAR_BASE / 100; - century -= tp->tm_year % 100 < 0 && 0 < century; - DO_SIGNED_NUMBER (2, tp->tm_year < - TM_YEAR_BASE, century); - } - - case L_('x'): - if (modifier == L_('O')) - goto bad_format; -#ifdef _NL_CURRENT - if (! (modifier == L_('E') - && (*(subfmt = - (const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT))) - != L_('\0')))) - subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT)); - goto subformat; -#else - goto underlying_strftime; -#endif - case L_('D'): - if (modifier != 0) - goto bad_format; - subfmt = L_("%m/%d/%y"); - goto subformat; - - case L_('d'): - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER (2, tp->tm_mday); - - case L_('e'): - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER_SPACEPAD (2, tp->tm_mday); - - /* All numeric formats set DIGITS and NUMBER_VALUE (or U_NUMBER_VALUE) - and then jump to one of these labels. */ - - do_tz_offset: - always_output_a_sign = true; - goto do_number_body; - - do_number_spacepad: - /* Force `_' flag unless overridden by `0' or `-' flag. */ - if (pad != L_('0') && pad != L_('-')) - pad = L_('_'); - - do_number: - /* Format NUMBER_VALUE according to the MODIFIER flag. */ - negative_number = number_value < 0; - u_number_value = number_value; - - do_signed_number: - always_output_a_sign = false; - tz_colon_mask = 0; - - do_number_body: - /* Format U_NUMBER_VALUE according to the MODIFIER flag. - NEGATIVE_NUMBER is nonzero if the original number was - negative; in this case it was converted directly to - unsigned int (i.e., modulo (UINT_MAX + 1)) without - negating it. */ - if (modifier == L_('O') && !negative_number) - { -#ifdef _NL_CURRENT - /* Get the locale specific alternate representation of - the number. If none exist NULL is returned. */ - const CHAR_T *cp = nl_get_alt_digit (u_number_value - HELPER_LOCALE_ARG); - - if (cp != NULL) - { - size_t digitlen = STRLEN (cp); - if (digitlen != 0) - { - cpy (digitlen, cp); - break; - } - } -#else - goto underlying_strftime; -#endif - } - - bufp = buf + sizeof (buf) / sizeof (buf[0]); - - if (negative_number) - u_number_value = - u_number_value; - - do - { - if (tz_colon_mask & 1) - *--bufp = ':'; - tz_colon_mask >>= 1; - *--bufp = u_number_value % 10 + L_('0'); - u_number_value /= 10; - } - while (u_number_value != 0 || tz_colon_mask != 0); - - do_number_sign_and_padding: - if (digits < width) - digits = width; - - sign_char = (negative_number ? L_('-') - : always_output_a_sign ? L_('+') - : 0); - - if (pad == L_('-')) - { - if (sign_char) - add1 (sign_char); - } - else - { - int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0])) - - bufp) - !!sign_char; - - if (padding > 0) - { - if (pad == L_('_')) - { - if ((size_t) padding >= maxsize - i) - return 0; - - if (p) - memset_space (p, padding); - i += padding; - width = width > padding ? width - padding : 0; - if (sign_char) - add1 (sign_char); - } - else - { - if ((size_t) digits >= maxsize - i) - return 0; - - if (sign_char) - add1 (sign_char); - - if (p) - memset_zero (p, padding); - i += padding; - width = 0; - } - } - else - { - if (sign_char) - add1 (sign_char); - } - } - - cpy (buf + sizeof (buf) / sizeof (buf[0]) - bufp, bufp); - break; - - case L_('F'): - if (modifier != 0) - goto bad_format; - subfmt = L_("%Y-%m-%d"); - goto subformat; - - case L_('H'): - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER (2, tp->tm_hour); - - case L_('I'): - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER (2, hour12); - - case L_('k'): /* GNU extension. */ - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER_SPACEPAD (2, tp->tm_hour); - - case L_('l'): /* GNU extension. */ - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER_SPACEPAD (2, hour12); - - case L_('j'): - if (modifier == L_('E')) - goto bad_format; - - DO_SIGNED_NUMBER (3, tp->tm_yday < -1, tp->tm_yday + 1U); - - case L_('M'): - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER (2, tp->tm_min); - - case L_('m'): - if (modifier == L_('E')) - goto bad_format; - - DO_SIGNED_NUMBER (2, tp->tm_mon < -1, tp->tm_mon + 1U); - -#ifndef _LIBC - case L_('N'): /* GNU extension. */ - if (modifier == L_('E')) - goto bad_format; - - number_value = ns; - if (width == -1) - width = 9; - else - { - /* Take an explicit width less than 9 as a precision. */ - int j; - for (j = width; j < 9; j++) - number_value /= 10; - } - - DO_NUMBER (width, number_value); -#endif - - case L_('n'): - add1 (L_('\n')); - break; - - case L_('P'): - to_lowcase = true; -#ifndef _NL_CURRENT - format_char = L_('p'); -#endif - /* FALLTHROUGH */ - - case L_('p'): - if (change_case) - { - to_uppcase = false; - to_lowcase = true; - } -#ifdef _NL_CURRENT - cpy (ap_len, ampm); - break; -#else - goto underlying_strftime; -#endif - - case L_('R'): - subfmt = L_("%H:%M"); - goto subformat; - - case L_('r'): -#ifdef _NL_CURRENT - if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, - NLW(T_FMT_AMPM))) - == L_('\0')) - subfmt = L_("%I:%M:%S %p"); - goto subformat; -#else - goto underlying_strftime; -#endif - - case L_('S'): - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER (2, tp->tm_sec); - - case L_('s'): /* GNU extension. */ - { - struct tm ltm; - time_t t; - - ltm = *tp; - t = mktime (<m); - - /* Generate string value for T using time_t arithmetic; - this works even if sizeof (long) < sizeof (time_t). */ - - bufp = buf + sizeof (buf) / sizeof (buf[0]); - negative_number = t < 0; - - do - { - int d = t % 10; - t /= 10; - *--bufp = (negative_number ? -d : d) + L_('0'); - } - while (t != 0); - - digits = 1; - always_output_a_sign = false; - goto do_number_sign_and_padding; - } - - case L_('X'): - if (modifier == L_('O')) - goto bad_format; -#ifdef _NL_CURRENT - if (! (modifier == L_('E') - && (*(subfmt = - (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_T_FMT))) - != L_('\0')))) - subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT)); - goto subformat; -#else - goto underlying_strftime; -#endif - case L_('T'): - subfmt = L_("%H:%M:%S"); - goto subformat; - - case L_('t'): - add1 (L_('\t')); - break; - - case L_('u'): - DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1); - - case L_('U'): - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7); - - case L_('V'): - case L_('g'): - case L_('G'): - if (modifier == L_('E')) - goto bad_format; - { - /* YEAR is a leap year if and only if (tp->tm_year + TM_YEAR_BASE) - is a leap year, except that YEAR and YEAR - 1 both work - correctly even when (tp->tm_year + TM_YEAR_BASE) would - overflow. */ - int year = (tp->tm_year - + (tp->tm_year < 0 - ? TM_YEAR_BASE % 400 - : TM_YEAR_BASE % 400 - 400)); - int year_adjust = 0; - int days = iso_week_days (tp->tm_yday, tp->tm_wday); - - if (days < 0) - { - /* This ISO week belongs to the previous year. */ - year_adjust = -1; - days = iso_week_days (tp->tm_yday + (365 + __isleap (year - 1)), - tp->tm_wday); - } - else - { - int d = iso_week_days (tp->tm_yday - (365 + __isleap (year)), - tp->tm_wday); - if (0 <= d) - { - /* This ISO week belongs to the next year. */ - year_adjust = 1; - days = d; - } - } - - switch (*f) - { - case L_('g'): - { - int yy = (tp->tm_year % 100 + year_adjust) % 100; - DO_NUMBER (2, (0 <= yy - ? yy - : tp->tm_year < -TM_YEAR_BASE - year_adjust - ? -yy - : yy + 100)); - } - - case L_('G'): - DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE - year_adjust, - (tp->tm_year + (unsigned int) TM_YEAR_BASE - + year_adjust)); - - default: - DO_NUMBER (2, days / 7 + 1); - } - } - - case L_('W'): - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER (2, (tp->tm_yday - (tp->tm_wday - 1 + 7) % 7 + 7) / 7); - - case L_('w'): - if (modifier == L_('E')) - goto bad_format; - - DO_NUMBER (1, tp->tm_wday); - - case L_('Y'): - if (modifier == 'E') - { -#if HAVE_STRUCT_ERA_ENTRY - struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); - if (era) - { -# ifdef COMPILE_WIDE - subfmt = era->era_wformat; -# else - subfmt = era->era_format; -# endif - goto subformat; - } -#else - goto underlying_strftime; -#endif - } - if (modifier == L_('O')) - goto bad_format; - else - DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE, - tp->tm_year + (unsigned int) TM_YEAR_BASE); - - case L_('y'): - if (modifier == L_('E')) - { -#if HAVE_STRUCT_ERA_ENTRY - struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); - if (era) - { - int delta = tp->tm_year - era->start_date[0]; - DO_NUMBER (1, (era->offset - + delta * era->absolute_direction)); - } -#else - goto underlying_strftime; -#endif - } - - { - int yy = tp->tm_year % 100; - if (yy < 0) - yy = tp->tm_year < - TM_YEAR_BASE ? -yy : yy + 100; - DO_NUMBER (2, yy); - } - - case L_('Z'): - if (change_case) - { - to_uppcase = false; - to_lowcase = true; - } - -#if HAVE_TZNAME - /* The tzset() call might have changed the value. */ - if (!(zone && *zone) && tp->tm_isdst >= 0) - zone = tzname[tp->tm_isdst != 0]; -#endif - if (! zone) - zone = ""; - -#ifdef COMPILE_WIDE - { - /* The zone string is always given in multibyte form. We have - to transform it first. */ - wchar_t *wczone; - size_t len; - widen (zone, wczone, len); - cpy (len, wczone); - } -#else - cpy (strlen (zone), zone); -#endif - break; - - case L_(':'): - /* :, ::, and ::: are valid only just before 'z'. - :::: etc. are rejected later. */ - for (colons = 1; f[colons] == L_(':'); colons++) - continue; - if (f[colons] != L_('z')) - goto bad_format; - f += colons; - goto do_z_conversion; - - case L_('z'): - colons = 0; - - do_z_conversion: - if (tp->tm_isdst < 0) - break; - - { - int diff; - int hour_diff; - int min_diff; - int sec_diff; -#if HAVE_TM_GMTOFF - diff = tp->tm_gmtoff; -#else - if (ut) - diff = 0; - else - { - struct tm gtm; - struct tm ltm; - time_t lt; - - ltm = *tp; - lt = mktime (<m); - - if (lt == (time_t) -1) - { - /* mktime returns -1 for errors, but -1 is also a - valid time_t value. Check whether an error really - occurred. */ - struct tm tm; - - if (! __localtime_r (<, &tm) - || ((ltm.tm_sec ^ tm.tm_sec) - | (ltm.tm_min ^ tm.tm_min) - | (ltm.tm_hour ^ tm.tm_hour) - | (ltm.tm_mday ^ tm.tm_mday) - | (ltm.tm_mon ^ tm.tm_mon) - | (ltm.tm_year ^ tm.tm_year))) - break; - } - - if (! __gmtime_r (<, >m)) - break; - - diff = tm_diff (<m, >m); - } -#endif - - hour_diff = diff / 60 / 60; - min_diff = diff / 60 % 60; - sec_diff = diff % 60; - - switch (colons) - { - case 0: /* +hhmm */ - DO_TZ_OFFSET (5, diff < 0, 0, hour_diff * 100 + min_diff); - - case 1: tz_hh_mm: /* +hh:mm */ - DO_TZ_OFFSET (6, diff < 0, 04, hour_diff * 100 + min_diff); - - case 2: tz_hh_mm_ss: /* +hh:mm:ss */ - DO_TZ_OFFSET (9, diff < 0, 024, - hour_diff * 10000 + min_diff * 100 + sec_diff); - - case 3: /* +hh if possible, else +hh:mm, else +hh:mm:ss */ - if (sec_diff != 0) - goto tz_hh_mm_ss; - if (min_diff != 0) - goto tz_hh_mm; - DO_TZ_OFFSET (3, diff < 0, 0, hour_diff); - - default: - goto bad_format; - } - } - - case L_('\0'): /* GNU extension: % at end of format. */ - --f; - /* Fall through. */ - default: - /* Unknown format; output the format, including the '%', - since this is most likely the right thing to do if a - multibyte string has been misparsed. */ - bad_format: - { - int flen; - for (flen = 1; f[1 - flen] != L_('%'); flen++) - continue; - cpy (flen, &f[1 - flen]); - } - break; - } - } - -#if ! FPRINTFTIME - if (p && maxsize != 0) - *p = L_('\0'); -#endif - - return i; -} - -/* Write information from TP into S according to the format - string FORMAT, writing no more that MAXSIZE characters - (including the terminating '\0') and returning number of - characters written. If S is NULL, nothing will be written - anywhere, so to determine how many characters would be - written, use NULL for S and (size_t) -1 for MAXSIZE. */ -size_t -my_strftime (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize) - const CHAR_T *format, - const struct tm *tp extra_args_spec LOCALE_PARAM_PROTO) -{ - return strftime_case_ (false, s, STRFTIME_ARG (maxsize) - format, tp extra_args LOCALE_ARG); -} - -#if defined _LIBC && ! FPRINTFTIME -libc_hidden_def (my_strftime) -#endif - - -#if defined emacs && ! FPRINTFTIME -/* For Emacs we have a separate interface which corresponds to the normal - strftime function plus the ut argument, but without the ns argument. */ -size_t -emacs_strftimeu (char *s, size_t maxsize, const char *format, - const struct tm *tp, int ut) -{ - return my_strftime (s, maxsize, format, tp, ut, 0); -} -#endif diff --git a/gnulib/lib/strftime.h b/gnulib/lib/strftime.h deleted file mode 100644 index 3410568..0000000 --- a/gnulib/lib/strftime.h +++ /dev/null @@ -1,34 +0,0 @@ -/* declarations for strftime.c - - Copyright (C) 2002, 2004, 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Just like strftime, but with two more arguments: - POSIX requires that strftime use the local timezone information. - When __UTC is nonzero and tm->tm_zone is NULL or the empty string, - use UTC instead. Use __NS as the number of nanoseconds in the - %N directive. */ -size_t nstrftime (char *, size_t, char const *, struct tm const *, - int __utc, int __ns); - -#ifdef __cplusplus -} -#endif diff --git a/gnulib/lib/string.in.h b/gnulib/lib/string.in.h deleted file mode 100644 index 336e246..0000000 --- a/gnulib/lib/string.in.h +++ /dev/null @@ -1,970 +0,0 @@ -/* A GNU-like . - - Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GL_STRING_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STRING_H@ - -#ifndef _GL_STRING_H -#define _GL_STRING_H - -/* NetBSD 5.0 mis-defines NULL. */ -#include - -/* MirBSD defines mbslen as a macro. */ -#if @GNULIB_MBSLEN@ && defined __MirBSD__ -# include -#endif - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The attribute __pure__ was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* NetBSD 5.0 declares strsignal in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ - && ! defined __GLIBC__ -# include -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Return the first instance of C within N bytes of S, or NULL. */ -#if @GNULIB_MEMCHR@ -# if @REPLACE_MEMCHR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define memchr rpl_memchr -# endif -_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); -# else -# if ! @HAVE_MEMCHR@ -_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C" { const void * std::memchr (const void *, int, size_t); } - extern "C++" { void * std::memchr (void *, int, size_t); } */ -_GL_CXXALIAS_SYS_CAST2 (memchr, - void *, (void const *__s, int __c, size_t __n), - void const *, (void const *__s, int __c, size_t __n)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); -_GL_CXXALIASWARN1 (memchr, void const *, - (void const *__s, int __c, size_t __n)); -# else -_GL_CXXALIASWARN (memchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef memchr -/* Assume memchr is always declared. */ -_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " - "use gnulib module memchr for portability" ); -#endif - -/* Return the first occurrence of NEEDLE in HAYSTACK. */ -#if @GNULIB_MEMMEM@ -# if @REPLACE_MEMMEM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define memmem rpl_memmem -# endif -_GL_FUNCDECL_RPL (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len)); -# else -# if ! @HAVE_DECL_MEMMEM@ -_GL_FUNCDECL_SYS (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 3))); -# endif -_GL_CXXALIAS_SYS (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len)); -# endif -_GL_CXXALIASWARN (memmem); -#elif defined GNULIB_POSIXCHECK -# undef memmem -# if HAVE_RAW_DECL_MEMMEM -_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " - "use gnulib module memmem-simple for portability, " - "and module memmem for speed" ); -# endif -#endif - -/* Copy N bytes of SRC to DEST, return pointer to bytes after the - last written byte. */ -#if @GNULIB_MEMPCPY@ -# if ! @HAVE_MEMPCPY@ -_GL_FUNCDECL_SYS (mempcpy, void *, - (void *restrict __dest, void const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (mempcpy, void *, - (void *restrict __dest, void const *restrict __src, - size_t __n)); -_GL_CXXALIASWARN (mempcpy); -#elif defined GNULIB_POSIXCHECK -# undef mempcpy -# if HAVE_RAW_DECL_MEMPCPY -_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " - "use gnulib module mempcpy for portability"); -# endif -#endif - -/* Search backwards through a block for a byte (specified as an int). */ -#if @GNULIB_MEMRCHR@ -# if ! @HAVE_DECL_MEMRCHR@ -_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const void * std::memrchr (const void *, int, size_t); } - extern "C++" { void * std::memrchr (void *, int, size_t); } */ -_GL_CXXALIAS_SYS_CAST2 (memrchr, - void *, (void const *, int, size_t), - void const *, (void const *, int, size_t)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); -_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); -# else -_GL_CXXALIASWARN (memrchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef memrchr -# if HAVE_RAW_DECL_MEMRCHR -_GL_WARN_ON_USE (memrchr, "memrchr is unportable - " - "use gnulib module memrchr for portability"); -# endif -#endif - -/* Find the first occurrence of C in S. More efficient than - memchr(S,C,N), at the expense of undefined behavior if C does not - occur within N bytes. */ -#if @GNULIB_RAWMEMCHR@ -# if ! @HAVE_RAWMEMCHR@ -_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const void * std::rawmemchr (const void *, int); } - extern "C++" { void * std::rawmemchr (void *, int); } */ -_GL_CXXALIAS_SYS_CAST2 (rawmemchr, - void *, (void const *__s, int __c_in), - void const *, (void const *__s, int __c_in)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); -_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); -# else -_GL_CXXALIASWARN (rawmemchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rawmemchr -# if HAVE_RAW_DECL_RAWMEMCHR -_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " - "use gnulib module rawmemchr for portability"); -# endif -#endif - -/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ -#if @GNULIB_STPCPY@ -# if ! @HAVE_STPCPY@ -_GL_FUNCDECL_SYS (stpcpy, char *, - (char *restrict __dst, char const *restrict __src) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (stpcpy, char *, - (char *restrict __dst, char const *restrict __src)); -_GL_CXXALIASWARN (stpcpy); -#elif defined GNULIB_POSIXCHECK -# undef stpcpy -# if HAVE_RAW_DECL_STPCPY -_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " - "use gnulib module stpcpy for portability"); -# endif -#endif - -/* Copy no more than N bytes of SRC to DST, returning a pointer past the - last non-NUL byte written into DST. */ -#if @GNULIB_STPNCPY@ -# if @REPLACE_STPNCPY@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef stpncpy -# define stpncpy rpl_stpncpy -# endif -_GL_FUNCDECL_RPL (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n)); -# else -# if ! @HAVE_STPNCPY@ -_GL_FUNCDECL_SYS (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n)); -# endif -_GL_CXXALIASWARN (stpncpy); -#elif defined GNULIB_POSIXCHECK -# undef stpncpy -# if HAVE_RAW_DECL_STPNCPY -_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " - "use gnulib module stpncpy for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strchr() does not work with multibyte strings if the locale encoding is - GB18030 and the character to be searched is a digit. */ -# undef strchr -/* Assume strchr is always declared. */ -_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " - "in some multibyte locales - " - "use mbschr if you care about internationalization"); -#endif - -/* Find the first occurrence of C in S or the final NUL byte. */ -#if @GNULIB_STRCHRNUL@ -# if ! @HAVE_STRCHRNUL@ -_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * std::strchrnul (const char *, int); } - extern "C++" { char * std::strchrnul (char *, int); } */ -_GL_CXXALIAS_SYS_CAST2 (strchrnul, - char *, (char const *__s, int __c_in), - char const *, (char const *__s, int __c_in)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); -_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); -# else -_GL_CXXALIASWARN (strchrnul); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strchrnul -# if HAVE_RAW_DECL_STRCHRNUL -_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " - "use gnulib module strchrnul for portability"); -# endif -#endif - -/* Duplicate S, returning an identical malloc'd string. */ -#if @GNULIB_STRDUP@ -# if @REPLACE_STRDUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strdup -# define strdup rpl_strdup -# endif -_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); -# else -# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup - /* strdup exists as a function and as a macro. Get rid of the macro. */ -# undef strdup -# endif -# if !(@HAVE_DECL_STRDUP@ || defined strdup) -_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); -# endif -_GL_CXXALIASWARN (strdup); -#elif defined GNULIB_POSIXCHECK -# undef strdup -# if HAVE_RAW_DECL_STRDUP -_GL_WARN_ON_USE (strdup, "strdup is unportable - " - "use gnulib module strdup for portability"); -# endif -#endif - -/* Append no more than N characters from SRC onto DEST. */ -#if @GNULIB_STRNCAT@ -# if @REPLACE_STRNCAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strncat -# define strncat rpl_strncat -# endif -_GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); -# else -_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); -# endif -_GL_CXXALIASWARN (strncat); -#elif defined GNULIB_POSIXCHECK -# undef strncat -# if HAVE_RAW_DECL_STRNCAT -_GL_WARN_ON_USE (strncat, "strncat is unportable - " - "use gnulib module strncat for portability"); -# endif -#endif - -/* Return a newly allocated copy of at most N bytes of STRING. */ -#if @GNULIB_STRNDUP@ -# if @REPLACE_STRNDUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strndup -# define strndup rpl_strndup -# endif -_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n)); -# else -# if ! @HAVE_DECL_STRNDUP@ -_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n)); -# endif -_GL_CXXALIASWARN (strndup); -#elif defined GNULIB_POSIXCHECK -# undef strndup -# if HAVE_RAW_DECL_STRNDUP -_GL_WARN_ON_USE (strndup, "strndup is unportable - " - "use gnulib module strndup for portability"); -# endif -#endif - -/* Find the length (number of bytes) of STRING, but scan at most - MAXLEN bytes. If no '\0' terminator is found in that many bytes, - return MAXLEN. */ -#if @GNULIB_STRNLEN@ -# if @REPLACE_STRNLEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strnlen -# define strnlen rpl_strnlen -# endif -_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)); -# else -# if ! @HAVE_DECL_STRNLEN@ -_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)); -# endif -_GL_CXXALIASWARN (strnlen); -#elif defined GNULIB_POSIXCHECK -# undef strnlen -# if HAVE_RAW_DECL_STRNLEN -_GL_WARN_ON_USE (strnlen, "strnlen is unportable - " - "use gnulib module strnlen for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strcspn() assumes the second argument is a list of single-byte characters. - Even in this simple case, it does not work with multibyte strings if the - locale encoding is GB18030 and one of the characters to be searched is a - digit. */ -# undef strcspn -/* Assume strcspn is always declared. */ -_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " - "in multibyte locales - " - "use mbscspn if you care about internationalization"); -#endif - -/* Find the first occurrence in S of any character in ACCEPT. */ -#if @GNULIB_STRPBRK@ -# if ! @HAVE_STRPBRK@ -_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C" { const char * strpbrk (const char *, const char *); } - extern "C++" { char * strpbrk (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strpbrk, - char *, (char const *__s, char const *__accept), - const char *, (char const *__s, char const *__accept)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); -_GL_CXXALIASWARN1 (strpbrk, char const *, - (char const *__s, char const *__accept)); -# else -_GL_CXXALIASWARN (strpbrk); -# endif -# if defined GNULIB_POSIXCHECK -/* strpbrk() assumes the second argument is a list of single-byte characters. - Even in this simple case, it does not work with multibyte strings if the - locale encoding is GB18030 and one of the characters to be searched is a - digit. */ -# undef strpbrk -_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " - "in multibyte locales - " - "use mbspbrk if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strpbrk -# if HAVE_RAW_DECL_STRPBRK -_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " - "use gnulib module strpbrk for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strspn() assumes the second argument is a list of single-byte characters. - Even in this simple case, it cannot work with multibyte strings. */ -# undef strspn -/* Assume strspn is always declared. */ -_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " - "in multibyte locales - " - "use mbsspn if you care about internationalization"); -#endif - -#if defined GNULIB_POSIXCHECK -/* strrchr() does not work with multibyte strings if the locale encoding is - GB18030 and the character to be searched is a digit. */ -# undef strrchr -/* Assume strrchr is always declared. */ -_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " - "in some multibyte locales - " - "use mbsrchr if you care about internationalization"); -#endif - -/* Search the next delimiter (char listed in DELIM) starting at *STRINGP. - If one is found, overwrite it with a NUL, and advance *STRINGP - to point to the next char after it. Otherwise, set *STRINGP to NULL. - If *STRINGP was already NULL, nothing happens. - Return the old value of *STRINGP. - - This is a variant of strtok() that is multithread-safe and supports - empty fields. - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - Caveat: It doesn't work with multibyte strings unless all of the delimiter - characters are ASCII characters < 0x30. - - See also strtok_r(). */ -#if @GNULIB_STRSEP@ -# if ! @HAVE_STRSEP@ -_GL_FUNCDECL_SYS (strsep, char *, - (char **restrict __stringp, char const *restrict __delim) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (strsep, char *, - (char **restrict __stringp, char const *restrict __delim)); -_GL_CXXALIASWARN (strsep); -# if defined GNULIB_POSIXCHECK -# undef strsep -_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " - "in multibyte locales - " - "use mbssep if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strsep -# if HAVE_RAW_DECL_STRSEP -_GL_WARN_ON_USE (strsep, "strsep is unportable - " - "use gnulib module strsep for portability"); -# endif -#endif - -#if @GNULIB_STRSTR@ -# if @REPLACE_STRSTR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strstr rpl_strstr -# endif -_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); -# else - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * strstr (const char *, const char *); } - extern "C++" { char * strstr (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strstr, - char *, (const char *haystack, const char *needle), - const char *, (const char *haystack, const char *needle)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); -_GL_CXXALIASWARN1 (strstr, const char *, - (const char *haystack, const char *needle)); -# else -_GL_CXXALIASWARN (strstr); -# endif -#elif defined GNULIB_POSIXCHECK -/* strstr() does not work with multibyte strings if the locale encoding is - different from UTF-8: - POSIX says that it operates on "strings", and "string" in POSIX is defined - as a sequence of bytes, not of characters. */ -# undef strstr -/* Assume strstr is always declared. */ -_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " - "work correctly on character strings in most " - "multibyte locales - " - "use mbsstr if you care about internationalization, " - "or use strstr if you care about speed"); -#endif - -/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive - comparison. */ -#if @GNULIB_STRCASESTR@ -# if @REPLACE_STRCASESTR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strcasestr rpl_strcasestr -# endif -_GL_FUNCDECL_RPL (strcasestr, char *, - (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strcasestr, char *, - (const char *haystack, const char *needle)); -# else -# if ! @HAVE_STRCASESTR@ -_GL_FUNCDECL_SYS (strcasestr, char *, - (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * strcasestr (const char *, const char *); } - extern "C++" { char * strcasestr (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strcasestr, - char *, (const char *haystack, const char *needle), - const char *, (const char *haystack, const char *needle)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); -_GL_CXXALIASWARN1 (strcasestr, const char *, - (const char *haystack, const char *needle)); -# else -_GL_CXXALIASWARN (strcasestr); -# endif -#elif defined GNULIB_POSIXCHECK -/* strcasestr() does not work with multibyte strings: - It is a glibc extension, and glibc implements it only for unibyte - locales. */ -# undef strcasestr -# if HAVE_RAW_DECL_STRCASESTR -_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " - "strings in multibyte locales - " - "use mbscasestr if you care about " - "internationalization, or use c-strcasestr if you want " - "a locale independent function"); -# endif -#endif - -/* Parse S into tokens separated by characters in DELIM. - If S is NULL, the saved pointer in SAVE_PTR is used as - the next starting point. For example: - char s[] = "-abc-=-def"; - char *sp; - x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" - x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL - x = strtok_r(NULL, "=", &sp); // x = NULL - // s = "abc\0-def\0" - - This is a variant of strtok() that is multithread-safe. - - For the POSIX documentation for this function, see: - http://www.opengroup.org/susv3xsh/strtok.html - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - Caveat: It doesn't work with multibyte strings unless all of the delimiter - characters are ASCII characters < 0x30. - - See also strsep(). */ -#if @GNULIB_STRTOK_R@ -# if @REPLACE_STRTOK_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strtok_r -# define strtok_r rpl_strtok_r -# endif -_GL_FUNCDECL_RPL (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr)); -# else -# if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK -# undef strtok_r -# endif -# if ! @HAVE_DECL_STRTOK_R@ -_GL_FUNCDECL_SYS (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr)); -# endif -_GL_CXXALIASWARN (strtok_r); -# if defined GNULIB_POSIXCHECK -_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " - "strings in multibyte locales - " - "use mbstok_r if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strtok_r -# if HAVE_RAW_DECL_STRTOK_R -_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " - "use gnulib module strtok_r for portability"); -# endif -#endif - - -/* The following functions are not specified by POSIX. They are gnulib - extensions. */ - -#if @GNULIB_MBSLEN@ -/* Return the number of multibyte characters in the character string STRING. - This considers multibyte characters, unlike strlen, which counts bytes. */ -# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ -# undef mbslen -# endif -# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbslen rpl_mbslen -# endif -_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); -# else -_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); -# endif -_GL_CXXALIASWARN (mbslen); -#endif - -#if @GNULIB_MBSNLEN@ -/* Return the number of multibyte characters in the character string starting - at STRING and ending at STRING + LEN. */ -_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) - _GL_ARG_NONNULL ((1)); -#endif - -#if @GNULIB_MBSCHR@ -/* Locate the first single-byte character C in the character string STRING, - and return a pointer to it. Return NULL if C is not found in STRING. - Unlike strchr(), this function works correctly in multibyte locales with - encodings such as GB18030. */ -# if defined __hpux -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbschr rpl_mbschr /* avoid collision with HP-UX function */ -# endif -_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); -# else -_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); -# endif -_GL_CXXALIASWARN (mbschr); -#endif - -#if @GNULIB_MBSRCHR@ -/* Locate the last single-byte character C in the character string STRING, - and return a pointer to it. Return NULL if C is not found in STRING. - Unlike strrchr(), this function works correctly in multibyte locales with - encodings such as GB18030. */ -# if defined __hpux -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */ -# endif -_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); -# else -_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); -# endif -_GL_CXXALIASWARN (mbsrchr); -#endif - -#if @GNULIB_MBSSTR@ -/* Find the first occurrence of the character string NEEDLE in the character - string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. - Unlike strstr(), this function works correctly in multibyte locales with - encodings different from UTF-8. */ -_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCASECMP@ -/* Compare the character strings S1 and S2, ignoring case, returning less than, - equal to or greater than zero if S1 is lexicographically less than, equal to - or greater than S2. - Note: This function may, in multibyte locales, return 0 for strings of - different lengths! - Unlike strcasecmp(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSNCASECMP@ -/* Compare the initial segment of the character string S1 consisting of at most - N characters with the initial segment of the character string S2 consisting - of at most N characters, ignoring case, returning less than, equal to or - greater than zero if the initial segment of S1 is lexicographically less - than, equal to or greater than the initial segment of S2. - Note: This function may, in multibyte locales, return 0 for initial segments - of different lengths! - Unlike strncasecmp(), this function works correctly in multibyte locales. - But beware that N is not a byte count but a character count! */ -_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSPCASECMP@ -/* Compare the initial segment of the character string STRING consisting of - at most mbslen (PREFIX) characters with the character string PREFIX, - ignoring case. If the two match, return a pointer to the first byte - after this prefix in STRING. Otherwise, return NULL. - Note: This function may, in multibyte locales, return non-NULL if STRING - is of smaller length than PREFIX! - Unlike strncasecmp(), this function works correctly in multibyte - locales. */ -_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCASESTR@ -/* Find the first occurrence of the character string NEEDLE in the character - string HAYSTACK, using case-insensitive comparison. - Note: This function may, in multibyte locales, return success even if - strlen (haystack) < strlen (needle) ! - Unlike strcasestr(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCSPN@ -/* Find the first occurrence in the character string STRING of any character - in the character string ACCEPT. Return the number of bytes from the - beginning of the string to this occurrence, or to the end of the string - if none exists. - Unlike strcspn(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSPBRK@ -/* Find the first occurrence in the character string STRING of any character - in the character string ACCEPT. Return the pointer to it, or NULL if none - exists. - Unlike strpbrk(), this function works correctly in multibyte locales. */ -# if defined __hpux -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ -# endif -_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); -# else -_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); -# endif -_GL_CXXALIASWARN (mbspbrk); -#endif - -#if @GNULIB_MBSSPN@ -/* Find the first occurrence in the character string STRING of any character - not in the character string REJECT. Return the number of bytes from the - beginning of the string to this occurrence, or to the end of the string - if none exists. - Unlike strspn(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSSEP@ -/* Search the next delimiter (multibyte character listed in the character - string DELIM) starting at the character string *STRINGP. - If one is found, overwrite it with a NUL, and advance *STRINGP to point - to the next multibyte character after it. Otherwise, set *STRINGP to NULL. - If *STRINGP was already NULL, nothing happens. - Return the old value of *STRINGP. - - This is a variant of mbstok_r() that supports empty fields. - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - - See also mbstok_r(). */ -_GL_EXTERN_C char * mbssep (char **stringp, const char *delim) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSTOK_R@ -/* Parse the character string STRING into tokens separated by characters in - the character string DELIM. - If STRING is NULL, the saved pointer in SAVE_PTR is used as - the next starting point. For example: - char s[] = "-abc-=-def"; - char *sp; - x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" - x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL - x = mbstok_r(NULL, "=", &sp); // x = NULL - // s = "abc\0-def\0" - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - - See also mbssep(). */ -_GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr) - _GL_ARG_NONNULL ((2, 3)); -#endif - -/* Map any int, typically from errno, into an error message. */ -#if @GNULIB_STRERROR@ -# if @REPLACE_STRERROR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strerror -# define strerror rpl_strerror -# endif -_GL_FUNCDECL_RPL (strerror, char *, (int)); -_GL_CXXALIAS_RPL (strerror, char *, (int)); -# else -_GL_CXXALIAS_SYS (strerror, char *, (int)); -# endif -_GL_CXXALIASWARN (strerror); -#elif defined GNULIB_POSIXCHECK -# undef strerror -/* Assume strerror is always declared. */ -_GL_WARN_ON_USE (strerror, "strerror is unportable - " - "use gnulib module strerror to guarantee non-NULL result"); -#endif - -/* Map any int, typically from errno, into an error message. Multithread-safe. - Uses the POSIX declaration, not the glibc declaration. */ -#if @GNULIB_STRERROR_R@ -# if @REPLACE_STRERROR_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strerror_r -# define strerror_r rpl_strerror_r -# endif -_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); -# else -# if !@HAVE_DECL_STRERROR_R@ -_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); -# endif -# if @HAVE_DECL_STRERROR_R@ -_GL_CXXALIASWARN (strerror_r); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strerror_r -# if HAVE_RAW_DECL_STRERROR_R -_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " - "use gnulib module strerror_r-posix for portability"); -# endif -#endif - -#if @GNULIB_STRSIGNAL@ -# if @REPLACE_STRSIGNAL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strsignal rpl_strsignal -# endif -_GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); -_GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); -# else -# if ! @HAVE_DECL_STRSIGNAL@ -_GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); -# endif -/* Need to cast, because on Cygwin 1.5.x systems, the return type is - 'const char *'. */ -_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); -# endif -_GL_CXXALIASWARN (strsignal); -#elif defined GNULIB_POSIXCHECK -# undef strsignal -# if HAVE_RAW_DECL_STRSIGNAL -_GL_WARN_ON_USE (strsignal, "strsignal is unportable - " - "use gnulib module strsignal for portability"); -# endif -#endif - -#if @GNULIB_STRVERSCMP@ -# if !@HAVE_STRVERSCMP@ -_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); -_GL_CXXALIASWARN (strverscmp); -#elif defined GNULIB_POSIXCHECK -# undef strverscmp -# if HAVE_RAW_DECL_STRVERSCMP -_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " - "use gnulib module strverscmp for portability"); -# endif -#endif - - -#endif /* _GL_STRING_H */ -#endif /* _GL_STRING_H */ diff --git a/gnulib/lib/strings.in.h b/gnulib/lib/strings.in.h deleted file mode 100644 index 0709aae..0000000 --- a/gnulib/lib/strings.in.h +++ /dev/null @@ -1,94 +0,0 @@ -/* A substitute . - - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _GL_STRINGS_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STRINGS_H@ - -#ifndef _GL_STRINGS_H -#define _GL_STRINGS_H - - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Compare strings S1 and S2, ignoring case, returning less than, equal to or - greater than zero if S1 is lexicographically less than, equal to or greater - than S2. - Note: This function does not work in multibyte locales. */ -#if ! @HAVE_STRCASECMP@ -extern int strcasecmp (char const *s1, char const *s2) - _GL_ARG_NONNULL ((1, 2)); -#endif -#if defined GNULIB_POSIXCHECK -/* strcasecmp() does not work with multibyte strings: - POSIX says that it operates on "strings", and "string" in POSIX is defined - as a sequence of bytes, not of characters. */ -# undef strcasecmp -# if HAVE_RAW_DECL_STRCASECMP -_GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character " - "strings in multibyte locales - " - "use mbscasecmp if you care about " - "internationalization, or use c_strcasecmp , " - "gnulib module c-strcase) if you want a locale " - "independent function"); -# endif -#endif - -/* Compare no more than N bytes of strings S1 and S2, ignoring case, - returning less than, equal to or greater than zero if S1 is - lexicographically less than, equal to or greater than S2. - Note: This function cannot work correctly in multibyte locales. */ -#if ! @HAVE_DECL_STRNCASECMP@ -extern int strncasecmp (char const *s1, char const *s2, size_t n) - _GL_ARG_NONNULL ((1, 2)); -#endif -#if defined GNULIB_POSIXCHECK -/* strncasecmp() does not work with multibyte strings: - POSIX says that it operates on "strings", and "string" in POSIX is defined - as a sequence of bytes, not of characters. */ -# undef strncasecmp -# if HAVE_RAW_DECL_STRNCASECMP -_GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character " - "strings in multibyte locales - " - "use mbsncasecmp or mbspcasecmp if you care about " - "internationalization, or use c_strncasecmp , " - "gnulib module c-strcase) if you want a locale " - "independent function"); -# endif -#endif - - -#ifdef __cplusplus -} -#endif - -#endif /* _GL_STRING_H */ -#endif /* _GL_STRING_H */ diff --git a/gnulib/lib/stripslash.c b/gnulib/lib/stripslash.c deleted file mode 100644 index 1212440..0000000 --- a/gnulib/lib/stripslash.c +++ /dev/null @@ -1,45 +0,0 @@ -/* stripslash.c -- remove redundant trailing slashes from a file name - - Copyright (C) 1990, 2001, 2003-2006, 2009-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "dirname.h" - -/* Remove trailing slashes from FILE. Return true if a trailing slash - was removed. This is useful when using file name completion from a - shell that adds a "/" after directory names (such as tcsh and - bash), because on symlinks to directories, several system calls - have different semantics according to whether a trailing slash is - present. */ - -bool -strip_trailing_slashes (char *file) -{ - char *base = last_component (file); - char *base_lim; - bool had_slash; - - /* last_component returns "" for file system roots, but we need to turn - `///' into `/'. */ - if (! *base) - base = file; - base_lim = base + base_len (base); - had_slash = (*base_lim != '\0'); - *base_lim = '\0'; - return had_slash; -} diff --git a/gnulib/lib/strncasecmp.c b/gnulib/lib/strncasecmp.c deleted file mode 100644 index 1e0d75f..0000000 --- a/gnulib/lib/strncasecmp.c +++ /dev/null @@ -1,63 +0,0 @@ -/* strncasecmp.c -- case insensitive string comparator - Copyright (C) 1998-1999, 2005-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -/* Specification. */ -#include - -#include -#include - -#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) - -/* Compare no more than N bytes of strings S1 and S2, ignoring case, - returning less than, equal to or greater than zero if S1 is - lexicographically less than, equal to or greater than S2. - Note: This function cannot work correctly in multibyte locales. */ - -int -strncasecmp (const char *s1, const char *s2, size_t n) -{ - register const unsigned char *p1 = (const unsigned char *) s1; - register const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - - if (p1 == p2 || n == 0) - return 0; - - do - { - c1 = TOLOWER (*p1); - c2 = TOLOWER (*p2); - - if (--n == 0 || c1 == '\0') - break; - - ++p1; - ++p2; - } - while (c1 == c2); - - if (UCHAR_MAX <= INT_MAX) - return c1 - c2; - else - /* On machines where 'char' and 'int' are types of the same size, the - difference of two 'unsigned char' values - including the sign bit - - doesn't fit in an 'int'. */ - return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); -} diff --git a/gnulib/lib/strndup.c b/gnulib/lib/strndup.c deleted file mode 100644 index 4a3bece..0000000 --- a/gnulib/lib/strndup.c +++ /dev/null @@ -1,37 +0,0 @@ -/* A replacement function, for systems that lack strndup. - - Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2011 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -#include - -#include - -char * -strndup (char const *s, size_t n) -{ - size_t len = strnlen (s, n); - char *new = malloc (len + 1); - - if (new == NULL) - return NULL; - - new[len] = '\0'; - return memcpy (new, s, len); -} diff --git a/gnulib/lib/strnlen.c b/gnulib/lib/strnlen.c deleted file mode 100644 index 3cefa97..0000000 --- a/gnulib/lib/strnlen.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Find the length of STRING, but scan at most MAXLEN characters. - Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#include - -#include - -/* Find the length of STRING, but scan at most MAXLEN characters. - If no '\0' terminator is found in that many characters, return MAXLEN. */ - -size_t -strnlen (const char *string, size_t maxlen) -{ - const char *end = memchr (string, '\0', maxlen); - return end ? (size_t) (end - string) : maxlen; -} diff --git a/gnulib/lib/strnlen1.c b/gnulib/lib/strnlen1.c deleted file mode 100644 index f64ce10..0000000 --- a/gnulib/lib/strnlen1.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include "strnlen1.h" - -#include - -/* Find the length of STRING + 1, but scan at most MAXLEN bytes. - If no '\0' terminator is found in that many characters, return MAXLEN. */ -/* This is the same as strnlen (string, maxlen - 1) + 1. */ -size_t -strnlen1 (const char *string, size_t maxlen) -{ - const char *end = (const char *) memchr (string, '\0', maxlen); - if (end != NULL) - return end - string + 1; - else - return maxlen; -} diff --git a/gnulib/lib/strnlen1.h b/gnulib/lib/strnlen1.h deleted file mode 100644 index 1bb13de..0000000 --- a/gnulib/lib/strnlen1.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _STRNLEN1_H -#define _STRNLEN1_H - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Find the length of STRING + 1, but scan at most MAXLEN bytes. - If no '\0' terminator is found in that many characters, return MAXLEN. */ -/* This is the same as strnlen (string, maxlen - 1) + 1. */ -extern size_t strnlen1 (const char *string, size_t maxlen); - - -#ifdef __cplusplus -} -#endif - - -#endif /* _STRNLEN1_H */ diff --git a/gnulib/lib/strstr.c b/gnulib/lib/strstr.c deleted file mode 100644 index 433cad6..0000000 --- a/gnulib/lib/strstr.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This particular implementation was written by Eric Blake, 2008. */ - -#ifndef _LIBC -# include -#endif - -/* Specification of strstr. */ -#include - -#include - -#ifndef _LIBC -# define __builtin_expect(expr, val) (expr) -#endif - -#define RETURN_TYPE char * -#define AVAILABLE(h, h_l, j, n_l) \ - (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ - && ((h_l) = (j) + (n_l))) -#include "str-two-way.h" - -/* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK - if NEEDLE is empty, otherwise NULL if NEEDLE is not found in - HAYSTACK. */ -char * -strstr (const char *haystack_start, const char *needle_start) -{ - const char *haystack = haystack_start; - const char *needle = needle_start; - size_t needle_len; /* Length of NEEDLE. */ - size_t haystack_len; /* Known minimum length of HAYSTACK. */ - bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ - - /* Determine length of NEEDLE, and in the process, make sure - HAYSTACK is at least as long (no point processing all of a long - NEEDLE if HAYSTACK is too short). */ - while (*haystack && *needle) - ok &= *haystack++ == *needle++; - if (*needle) - return NULL; - if (ok) - return (char *) haystack_start; - - /* Reduce the size of haystack using strchr, since it has a smaller - linear coefficient than the Two-Way algorithm. */ - needle_len = needle - needle_start; - haystack = strchr (haystack_start + 1, *needle_start); - if (!haystack || __builtin_expect (needle_len == 1, 0)) - return (char *) haystack; - needle -= needle_len; - haystack_len = (haystack > haystack_start + needle_len ? 1 - : needle_len + haystack_start - haystack); - - /* Perform the search. Abstract memory is considered to be an array - of 'unsigned char' values, not an array of 'char' values. See - ISO C 99 section 6.2.6.1. */ - if (needle_len < LONG_NEEDLE_THRESHOLD) - return two_way_short_needle ((const unsigned char *) haystack, - haystack_len, - (const unsigned char *) needle, needle_len); - return two_way_long_needle ((const unsigned char *) haystack, haystack_len, - (const unsigned char *) needle, needle_len); -} - -#undef LONG_NEEDLE_THRESHOLD diff --git a/gnulib/lib/strtoimax.c b/gnulib/lib/strtoimax.c deleted file mode 100644 index 497d155..0000000 --- a/gnulib/lib/strtoimax.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Convert string representation of a number into an intmax_t value. - - Copyright (C) 1999, 2001-2004, 2006, 2009-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include - -/* Verify interface. */ -#include - -#include - -#include "verify.h" - -#ifdef UNSIGNED -# ifndef HAVE_DECL_STRTOULL -"this configure-time declaration test was not run" -# endif -# if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG_INT -unsigned long long int strtoull (char const *, char **, int); -# endif - -#else - -# ifndef HAVE_DECL_STRTOLL -"this configure-time declaration test was not run" -# endif -# if !HAVE_DECL_STRTOLL && HAVE_LONG_LONG_INT -long long int strtoll (char const *, char **, int); -# endif -#endif - -#ifdef UNSIGNED -# define Have_long_long HAVE_UNSIGNED_LONG_LONG_INT -# define Int uintmax_t -# define Unsigned unsigned -# define strtoimax strtoumax -# define strtol strtoul -# define strtoll strtoull -#else -# define Have_long_long HAVE_LONG_LONG_INT -# define Int intmax_t -# define Unsigned -#endif - -Int -strtoimax (char const *ptr, char **endptr, int base) -{ -#if Have_long_long - verify (sizeof (Int) == sizeof (Unsigned long int) - || sizeof (Int) == sizeof (Unsigned long long int)); - - if (sizeof (Int) != sizeof (Unsigned long int)) - return strtoll (ptr, endptr, base); -#else - verify (sizeof (Int) == sizeof (Unsigned long int)); -#endif - - return strtol (ptr, endptr, base); -} diff --git a/gnulib/lib/strtol.c b/gnulib/lib/strtol.c deleted file mode 100644 index b6a761e..0000000 --- a/gnulib/lib/strtol.c +++ /dev/null @@ -1,434 +0,0 @@ -/* Convert string representation of a number into an integer value. - - Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2011 Free Software - Foundation, Inc. - - NOTE: The canonical source of this file is maintained with the GNU C - Library. Bugs can be reported to bug-glibc@gnu.org. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3 of the License, or any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifdef _LIBC -# define USE_NUMBER_GROUPING -#else -# include -#endif - -#include -#include -#ifndef __set_errno -# define __set_errno(Val) errno = (Val) -#endif - -#include -#include -#include -#include - -#ifdef USE_NUMBER_GROUPING -# include "../locale/localeinfo.h" -#endif - -/* Nonzero if we are defining `strtoul' or `strtoull', operating on - unsigned integers. */ -#ifndef UNSIGNED -# define UNSIGNED 0 -# define INT LONG int -#else -# define INT unsigned LONG int -#endif - -/* Determine the name. */ -#ifdef USE_IN_EXTENDED_LOCALE_MODEL -# if UNSIGNED -# ifdef USE_WIDE_CHAR -# ifdef QUAD -# define strtol __wcstoull_l -# else -# define strtol __wcstoul_l -# endif -# else -# ifdef QUAD -# define strtol __strtoull_l -# else -# define strtol __strtoul_l -# endif -# endif -# else -# ifdef USE_WIDE_CHAR -# ifdef QUAD -# define strtol __wcstoll_l -# else -# define strtol __wcstol_l -# endif -# else -# ifdef QUAD -# define strtol __strtoll_l -# else -# define strtol __strtol_l -# endif -# endif -# endif -#else -# if UNSIGNED -# ifdef USE_WIDE_CHAR -# ifdef QUAD -# define strtol wcstoull -# else -# define strtol wcstoul -# endif -# else -# ifdef QUAD -# define strtol strtoull -# else -# define strtol strtoul -# endif -# endif -# else -# ifdef USE_WIDE_CHAR -# ifdef QUAD -# define strtol wcstoll -# else -# define strtol wcstol -# endif -# else -# ifdef QUAD -# define strtol strtoll -# endif -# endif -# endif -#endif - -/* If QUAD is defined, we are defining `strtoll' or `strtoull', - operating on `long long int's. */ -#ifdef QUAD -# define LONG long long -# define STRTOL_LONG_MIN LLONG_MIN -# define STRTOL_LONG_MAX LLONG_MAX -# define STRTOL_ULONG_MAX ULLONG_MAX - -/* The extra casts in the following macros work around compiler bugs, - e.g., in Cray C 5.0.3.0. */ - -/* True if negative values of the signed integer type T use two's - complement, ones' complement, or signed magnitude representation, - respectively. Much GNU code assumes two's complement, but some - people like to be portable to all possible C hosts. */ -# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) -# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) -# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) - -/* True if the arithmetic type T is signed. */ -# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - -/* The maximum and minimum values for the integer type T. These - macros have undefined behavior if T is signed and has padding bits. - If this is a problem for you, please let us know how to fix it for - your host. */ -# define TYPE_MINIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) 0 \ - : TYPE_SIGNED_MAGNITUDE (t) \ - ? ~ (t) 0 \ - : ~ TYPE_MAXIMUM (t))) -# define TYPE_MAXIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) - -# ifndef ULLONG_MAX -# define ULLONG_MAX TYPE_MAXIMUM (unsigned long long) -# endif -# ifndef LLONG_MAX -# define LLONG_MAX TYPE_MAXIMUM (long long int) -# endif -# ifndef LLONG_MIN -# define LLONG_MIN TYPE_MINIMUM (long long int) -# endif - -# if __GNUC__ == 2 && __GNUC_MINOR__ < 7 - /* Work around gcc bug with using this constant. */ - static const unsigned long long int maxquad = ULLONG_MAX; -# undef STRTOL_ULONG_MAX -# define STRTOL_ULONG_MAX maxquad -# endif -#else -# define LONG long -# define STRTOL_LONG_MIN LONG_MIN -# define STRTOL_LONG_MAX LONG_MAX -# define STRTOL_ULONG_MAX ULONG_MAX -#endif - - -/* We use this code also for the extended locale handling where the - function gets as an additional argument the locale which has to be - used. To access the values we have to redefine the _NL_CURRENT - macro. */ -#ifdef USE_IN_EXTENDED_LOCALE_MODEL -# undef _NL_CURRENT -# define _NL_CURRENT(category, item) \ - (current->values[_NL_ITEM_INDEX (item)].string) -# define LOCALE_PARAM , loc -# define LOCALE_PARAM_PROTO , __locale_t loc -#else -# define LOCALE_PARAM -# define LOCALE_PARAM_PROTO -#endif - -#include - -#ifdef USE_WIDE_CHAR -# include -# define L_(Ch) L##Ch -# define UCHAR_TYPE wint_t -# define STRING_TYPE wchar_t -# ifdef USE_IN_EXTENDED_LOCALE_MODEL -# define ISSPACE(Ch) __iswspace_l ((Ch), loc) -# define ISALPHA(Ch) __iswalpha_l ((Ch), loc) -# define TOUPPER(Ch) __towupper_l ((Ch), loc) -# else -# define ISSPACE(Ch) iswspace (Ch) -# define ISALPHA(Ch) iswalpha (Ch) -# define TOUPPER(Ch) towupper (Ch) -# endif -#else -# define L_(Ch) Ch -# define UCHAR_TYPE unsigned char -# define STRING_TYPE char -# ifdef USE_IN_EXTENDED_LOCALE_MODEL -# define ISSPACE(Ch) __isspace_l ((Ch), loc) -# define ISALPHA(Ch) __isalpha_l ((Ch), loc) -# define TOUPPER(Ch) __toupper_l ((Ch), loc) -# else -# define ISSPACE(Ch) isspace (Ch) -# define ISALPHA(Ch) isalpha (Ch) -# define TOUPPER(Ch) toupper (Ch) -# endif -#endif - -#define INTERNAL(X) INTERNAL1(X) -#define INTERNAL1(X) __##X##_internal -#define WEAKNAME(X) WEAKNAME1(X) - -#ifdef USE_NUMBER_GROUPING -/* This file defines a function to check for correct grouping. */ -# include "grouping.h" -#endif - - - -/* Convert NPTR to an `unsigned long int' or `long int' in base BASE. - If BASE is 0 the base is determined by the presence of a leading - zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal. - If BASE is < 2 or > 36, it is reset to 10. - If ENDPTR is not NULL, a pointer to the character after the last - one converted is stored in *ENDPTR. */ - -INT -INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr, - int base, int group LOCALE_PARAM_PROTO) -{ - int negative; - register unsigned LONG int cutoff; - register unsigned int cutlim; - register unsigned LONG int i; - register const STRING_TYPE *s; - register UCHAR_TYPE c; - const STRING_TYPE *save, *end; - int overflow; - -#ifdef USE_NUMBER_GROUPING -# ifdef USE_IN_EXTENDED_LOCALE_MODEL - struct locale_data *current = loc->__locales[LC_NUMERIC]; -# endif - /* The thousands character of the current locale. */ - wchar_t thousands = L'\0'; - /* The numeric grouping specification of the current locale, - in the format described in . */ - const char *grouping; - - if (group) - { - grouping = _NL_CURRENT (LC_NUMERIC, GROUPING); - if (*grouping <= 0 || *grouping == CHAR_MAX) - grouping = NULL; - else - { - /* Figure out the thousands separator character. */ -# if defined _LIBC || defined _HAVE_BTOWC - thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP)); - if (thousands == WEOF) - thousands = L'\0'; -# endif - if (thousands == L'\0') - grouping = NULL; - } - } - else - grouping = NULL; -#endif - - if (base < 0 || base == 1 || base > 36) - { - __set_errno (EINVAL); - return 0; - } - - save = s = nptr; - - /* Skip white space. */ - while (ISSPACE (*s)) - ++s; - if (*s == L_('\0')) - goto noconv; - - /* Check for a sign. */ - if (*s == L_('-')) - { - negative = 1; - ++s; - } - else if (*s == L_('+')) - { - negative = 0; - ++s; - } - else - negative = 0; - - /* Recognize number prefix and if BASE is zero, figure it out ourselves. */ - if (*s == L_('0')) - { - if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X')) - { - s += 2; - base = 16; - } - else if (base == 0) - base = 8; - } - else if (base == 0) - base = 10; - - /* Save the pointer so we can check later if anything happened. */ - save = s; - -#ifdef USE_NUMBER_GROUPING - if (group) - { - /* Find the end of the digit string and check its grouping. */ - end = s; - for (c = *end; c != L_('\0'); c = *++end) - if ((wchar_t) c != thousands - && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9')) - && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base)) - break; - if (*s == thousands) - end = s; - else - end = correctly_grouped_prefix (s, end, thousands, grouping); - } - else -#endif - end = NULL; - - cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base; - cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base; - - overflow = 0; - i = 0; - for (c = *s; c != L_('\0'); c = *++s) - { - if (s == end) - break; - if (c >= L_('0') && c <= L_('9')) - c -= L_('0'); - else if (ISALPHA (c)) - c = TOUPPER (c) - L_('A') + 10; - else - break; - if ((int) c >= base) - break; - /* Check for overflow. */ - if (i > cutoff || (i == cutoff && c > cutlim)) - overflow = 1; - else - { - i *= (unsigned LONG int) base; - i += c; - } - } - - /* Check if anything actually happened. */ - if (s == save) - goto noconv; - - /* Store in ENDPTR the address of one character - past the last character we converted. */ - if (endptr != NULL) - *endptr = (STRING_TYPE *) s; - -#if !UNSIGNED - /* Check for a value that is within the range of - `unsigned LONG int', but outside the range of `LONG int'. */ - if (overflow == 0 - && i > (negative - ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1 - : (unsigned LONG int) STRTOL_LONG_MAX)) - overflow = 1; -#endif - - if (overflow) - { - __set_errno (ERANGE); -#if UNSIGNED - return STRTOL_ULONG_MAX; -#else - return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX; -#endif - } - - /* Return the result of the appropriate sign. */ - return negative ? -i : i; - -noconv: - /* We must handle a special case here: the base is 0 or 16 and the - first two characters are '0' and 'x', but the rest are no - hexadecimal digits. This is no error case. We return 0 and - ENDPTR points to the `x`. */ - if (endptr != NULL) - { - if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X') - && save[-2] == L_('0')) - *endptr = (STRING_TYPE *) &save[-1]; - else - /* There was no number to convert. */ - *endptr = (STRING_TYPE *) nptr; - } - - return 0L; -} - -/* External user entry point. */ - - -INT -#ifdef weak_function -weak_function -#endif -strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr, - int base LOCALE_PARAM_PROTO) -{ - return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM); -} diff --git a/gnulib/lib/strtoll.c b/gnulib/lib/strtoll.c deleted file mode 100644 index 75afa4d..0000000 --- a/gnulib/lib/strtoll.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Function to parse a `long long int' from text. - Copyright (C) 1995-1997, 1999, 2001, 2009-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#define QUAD 1 - -#include - -#ifdef _LIBC -# ifdef SHARED -# include - -# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2) -compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0); -# endif - -# endif -weak_alias (strtoll, strtoq) -#endif diff --git a/gnulib/lib/strtoul.c b/gnulib/lib/strtoul.c deleted file mode 100644 index 6fa6d0c..0000000 --- a/gnulib/lib/strtoul.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1991, 1997, 2009-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#define UNSIGNED 1 - -#include "strtol.c" diff --git a/gnulib/lib/strtoull.c b/gnulib/lib/strtoull.c deleted file mode 100644 index bf25995..0000000 --- a/gnulib/lib/strtoull.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Function to parse an `unsigned long long int' from text. - Copyright (C) 1995-1997, 1999, 2009-2011 Free Software Foundation, Inc. - NOTE: The canonical source of this file is maintained with the GNU C - Library. Bugs can be reported to bug-glibc@gnu.org. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3 of the License, or any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#define QUAD 1 - -#include "strtoul.c" - -#ifdef _LIBC -strong_alias (__strtoull_internal, __strtouq_internal) -weak_alias (strtoull, strtouq) -#endif diff --git a/gnulib/lib/sys_stat.in.h b/gnulib/lib/sys_stat.in.h deleted file mode 100644 index 13fae7b..0000000 --- a/gnulib/lib/sys_stat.in.h +++ /dev/null @@ -1,658 +0,0 @@ -/* Provide a more complete sys/stat header file. - Copyright (C) 2005-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ - -/* This file is supposed to be used on platforms where is - incomplete. It is intended to provide definitions and prototypes - needed by an application. Start with what the system provides. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_system_sys_stat_h -/* Special invocation convention. */ - -#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _GL_SYS_STAT_H - -/* Get nlink_t. */ -#include - -/* Get struct timespec. */ -#include - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ - -#ifndef _GL_SYS_STAT_H -#define _GL_SYS_STAT_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Before doing "#define mkdir rpl_mkdir" below, we need to include all - headers that may declare mkdir(). */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include /* mingw32, mingw64 */ -# include /* mingw64 */ -#endif - -#ifndef S_IFMT -# define S_IFMT 0170000 -#endif - -#if STAT_MACROS_BROKEN -# undef S_ISBLK -# undef S_ISCHR -# undef S_ISDIR -# undef S_ISFIFO -# undef S_ISLNK -# undef S_ISNAM -# undef S_ISMPB -# undef S_ISMPC -# undef S_ISNWK -# undef S_ISREG -# undef S_ISSOCK -#endif - -#ifndef S_ISBLK -# ifdef S_IFBLK -# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) -# else -# define S_ISBLK(m) 0 -# endif -#endif - -#ifndef S_ISCHR -# ifdef S_IFCHR -# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) -# else -# define S_ISCHR(m) 0 -# endif -#endif - -#ifndef S_ISDIR -# ifdef S_IFDIR -# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -# else -# define S_ISDIR(m) 0 -# endif -#endif - -#ifndef S_ISDOOR /* Solaris 2.5 and up */ -# define S_ISDOOR(m) 0 -#endif - -#ifndef S_ISFIFO -# ifdef S_IFIFO -# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) -# else -# define S_ISFIFO(m) 0 -# endif -#endif - -#ifndef S_ISLNK -# ifdef S_IFLNK -# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) -# else -# define S_ISLNK(m) 0 -# endif -#endif - -#ifndef S_ISMPB /* V7 */ -# ifdef S_IFMPB -# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) -# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) -# else -# define S_ISMPB(m) 0 -# define S_ISMPC(m) 0 -# endif -#endif - -#ifndef S_ISNAM /* Xenix */ -# ifdef S_IFNAM -# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) -# else -# define S_ISNAM(m) 0 -# endif -#endif - -#ifndef S_ISNWK /* HP/UX */ -# ifdef S_IFNWK -# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) -# else -# define S_ISNWK(m) 0 -# endif -#endif - -#ifndef S_ISPORT /* Solaris 10 and up */ -# define S_ISPORT(m) 0 -#endif - -#ifndef S_ISREG -# ifdef S_IFREG -# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -# else -# define S_ISREG(m) 0 -# endif -#endif - -#ifndef S_ISSOCK -# ifdef S_IFSOCK -# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) -# else -# define S_ISSOCK(m) 0 -# endif -#endif - - -#ifndef S_TYPEISMQ -# define S_TYPEISMQ(p) 0 -#endif - -#ifndef S_TYPEISTMO -# define S_TYPEISTMO(p) 0 -#endif - - -#ifndef S_TYPEISSEM -# ifdef S_INSEM -# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) -# else -# define S_TYPEISSEM(p) 0 -# endif -#endif - -#ifndef S_TYPEISSHM -# ifdef S_INSHD -# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) -# else -# define S_TYPEISSHM(p) 0 -# endif -#endif - -/* high performance ("contiguous data") */ -#ifndef S_ISCTG -# define S_ISCTG(p) 0 -#endif - -/* Cray DMF (data migration facility): off line, with data */ -#ifndef S_ISOFD -# define S_ISOFD(p) 0 -#endif - -/* Cray DMF (data migration facility): off line, with no data */ -#ifndef S_ISOFL -# define S_ISOFL(p) 0 -#endif - -/* 4.4BSD whiteout */ -#ifndef S_ISWHT -# define S_ISWHT(m) 0 -#endif - -/* If any of the following are undefined, - define them to their de facto standard values. */ -#if !S_ISUID -# define S_ISUID 04000 -#endif -#if !S_ISGID -# define S_ISGID 02000 -#endif - -/* S_ISVTX is a common extension to POSIX. */ -#ifndef S_ISVTX -# define S_ISVTX 01000 -#endif - -#if !S_IRUSR && S_IREAD -# define S_IRUSR S_IREAD -#endif -#if !S_IRUSR -# define S_IRUSR 00400 -#endif -#if !S_IRGRP -# define S_IRGRP (S_IRUSR >> 3) -#endif -#if !S_IROTH -# define S_IROTH (S_IRUSR >> 6) -#endif - -#if !S_IWUSR && S_IWRITE -# define S_IWUSR S_IWRITE -#endif -#if !S_IWUSR -# define S_IWUSR 00200 -#endif -#if !S_IWGRP -# define S_IWGRP (S_IWUSR >> 3) -#endif -#if !S_IWOTH -# define S_IWOTH (S_IWUSR >> 6) -#endif - -#if !S_IXUSR && S_IEXEC -# define S_IXUSR S_IEXEC -#endif -#if !S_IXUSR -# define S_IXUSR 00100 -#endif -#if !S_IXGRP -# define S_IXGRP (S_IXUSR >> 3) -#endif -#if !S_IXOTH -# define S_IXOTH (S_IXUSR >> 6) -#endif - -#if !S_IRWXU -# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) -#endif -#if !S_IRWXG -# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) -#endif -#if !S_IRWXO -# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) -#endif - -/* S_IXUGO is a common extension to POSIX. */ -#if !S_IXUGO -# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) -#endif - -#ifndef S_IRWXUGO -# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) -#endif - -/* Macros for futimens and utimensat. */ -#ifndef UTIME_NOW -# define UTIME_NOW (-1) -# define UTIME_OMIT (-2) -#endif - - -#if @GNULIB_FCHMODAT@ -# if !@HAVE_FCHMODAT@ -_GL_FUNCDECL_SYS (fchmodat, int, - (int fd, char const *file, mode_t mode, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (fchmodat, int, - (int fd, char const *file, mode_t mode, int flag)); -_GL_CXXALIASWARN (fchmodat); -#elif defined GNULIB_POSIXCHECK -# undef fchmodat -# if HAVE_RAW_DECL_FCHMODAT -_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @REPLACE_FSTAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fstat rpl_fstat -# endif -_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); -#else -_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); -#endif -_GL_CXXALIASWARN (fstat); - - -#if @GNULIB_FSTATAT@ -# if @REPLACE_FSTATAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fstatat -# define fstatat rpl_fstatat -# endif -_GL_FUNCDECL_RPL (fstatat, int, - (int fd, char const *name, struct stat *st, int flags) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (fstatat, int, - (int fd, char const *name, struct stat *st, int flags)); -# else -# if !@HAVE_FSTATAT@ -_GL_FUNCDECL_SYS (fstatat, int, - (int fd, char const *name, struct stat *st, int flags) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (fstatat, int, - (int fd, char const *name, struct stat *st, int flags)); -# endif -_GL_CXXALIASWARN (fstatat); -#elif defined GNULIB_POSIXCHECK -# undef fstatat -# if HAVE_RAW_DECL_FSTATAT -_GL_WARN_ON_USE (fstatat, "fstatat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_FUTIMENS@ -/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens - implementation relies on futimesat, which on Solaris 10 makes an invocation - to futimens that is meant to invoke the libc's futimens(), not gnulib's - futimens(). */ -# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef futimens -# define futimens rpl_futimens -# endif -_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); -_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); -# else -# if !@HAVE_FUTIMENS@ -_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); -# endif -_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); -# endif -# if @HAVE_FUTIMENS@ -_GL_CXXALIASWARN (futimens); -# endif -#elif defined GNULIB_POSIXCHECK -# undef futimens -# if HAVE_RAW_DECL_FUTIMENS -_GL_WARN_ON_USE (futimens, "futimens is not portable - " - "use gnulib module futimens for portability"); -# endif -#endif - - -#if @GNULIB_LCHMOD@ -/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME - denotes a symbolic link. */ -# if !@HAVE_LCHMOD@ -/* The lchmod replacement follows symbolic links. Callers should take - this into account; lchmod should be applied only to arguments that - are known to not be symbolic links. On hosts that lack lchmod, - this can lead to race conditions between the check and the - invocation of lchmod, but we know of no workarounds that are - reliable in general. You might try requesting support for lchmod - from your operating system supplier. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lchmod chmod -# endif -/* Need to cast, because on mingw, the second parameter of chmod is - int mode. */ -_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, - (const char *filename, mode_t mode)); -# else -# if 0 /* assume already declared */ -_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); -# endif -# if @HAVE_LCHMOD@ -_GL_CXXALIASWARN (lchmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef lchmod -# if HAVE_RAW_DECL_LCHMOD -_GL_WARN_ON_USE (lchmod, "lchmod is unportable - " - "use gnulib module lchmod for portability"); -# endif -#endif - - -#if @GNULIB_LSTAT@ -# if ! @HAVE_LSTAT@ -/* mingw does not support symlinks, therefore it does not have lstat. But - without links, stat does just fine. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lstat stat -# endif -_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf)); -# elif @REPLACE_LSTAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lstat -# define lstat rpl_lstat -# endif -_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); -# else -_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); -# endif -# if @HAVE_LSTAT@ -_GL_CXXALIASWARN (lstat); -# endif -#elif defined GNULIB_POSIXCHECK -# undef lstat -# if HAVE_RAW_DECL_LSTAT -_GL_WARN_ON_USE (lstat, "lstat is unportable - " - "use gnulib module lstat for portability"); -# endif -#endif - - -#if @REPLACE_MKDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkdir -# define mkdir rpl_mkdir -# endif -_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -#else -/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. - Additionally, it declares _mkdir (and depending on compile flags, an - alias mkdir), only in the nonstandard includes and , - which are included above. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -# if !GNULIB_defined_rpl_mkdir -static inline int -rpl_mkdir (char const *name, mode_t mode) -{ - return _mkdir (name); -} -# define GNULIB_defined_rpl_mkdir 1 -# endif - -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mkdir rpl_mkdir -# endif -_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -# else -_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); -# endif -#endif -_GL_CXXALIASWARN (mkdir); - - -#if @GNULIB_MKDIRAT@ -# if !@HAVE_MKDIRAT@ -_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); -_GL_CXXALIASWARN (mkdirat); -#elif defined GNULIB_POSIXCHECK -# undef mkdirat -# if HAVE_RAW_DECL_MKDIRAT -_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_MKFIFO@ -# if @REPLACE_MKFIFO@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkfifo -# define mkfifo rpl_mkfifo -# endif -_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); -# else -# if !@HAVE_MKFIFO@ -_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); -# endif -_GL_CXXALIASWARN (mkfifo); -#elif defined GNULIB_POSIXCHECK -# undef mkfifo -# if HAVE_RAW_DECL_MKFIFO -_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " - "use gnulib module mkfifo for portability"); -# endif -#endif - - -#if @GNULIB_MKFIFOAT@ -# if !@HAVE_MKFIFOAT@ -_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); -_GL_CXXALIASWARN (mkfifoat); -#elif defined GNULIB_POSIXCHECK -# undef mkfifoat -# if HAVE_RAW_DECL_MKFIFOAT -_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " - "use gnulib module mkfifoat for portability"); -# endif -#endif - - -#if @GNULIB_MKNOD@ -# if @REPLACE_MKNOD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mknod -# define mknod rpl_mknod -# endif -_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); -# else -# if !@HAVE_MKNOD@ -_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ -_GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); -# endif -_GL_CXXALIASWARN (mknod); -#elif defined GNULIB_POSIXCHECK -# undef mknod -# if HAVE_RAW_DECL_MKNOD -_GL_WARN_ON_USE (mknod, "mknod is not portable - " - "use gnulib module mknod for portability"); -# endif -#endif - - -#if @GNULIB_MKNODAT@ -# if !@HAVE_MKNODAT@ -_GL_FUNCDECL_SYS (mknodat, int, - (int fd, char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mknodat, int, - (int fd, char const *file, mode_t mode, dev_t dev)); -_GL_CXXALIASWARN (mknodat); -#elif defined GNULIB_POSIXCHECK -# undef mknodat -# if HAVE_RAW_DECL_MKNODAT -_GL_WARN_ON_USE (mknodat, "mknodat is not portable - " - "use gnulib module mkfifoat for portability"); -# endif -#endif - - -#if @GNULIB_STAT@ -# if @REPLACE_STAT@ -/* We can't use the object-like #define stat rpl_stat, because of - struct stat. This means that rpl_stat will not be used if the user - does (stat)(a,b). Oh well. */ -# undef stat -# ifdef _LARGE_FILES - /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, - so we have to replace stat64() instead of stat(). */ -# define stat stat64 -# undef stat64 -# define stat64(name, st) rpl_stat (name, st) -# else /* !_LARGE_FILES */ -# define stat(name, st) rpl_stat (name, st) -# endif /* !_LARGE_FILES */ -_GL_EXTERN_C int stat (const char *name, struct stat *buf) - _GL_ARG_NONNULL ((1, 2)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef stat -# if HAVE_RAW_DECL_STAT -_GL_WARN_ON_USE (stat, "stat is unportable - " - "use gnulib module stat for portability"); -# endif -#endif - - -#if @GNULIB_UTIMENSAT@ -/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat - implementation relies on futimesat, which on Solaris 10 makes an invocation - to utimensat that is meant to invoke the libc's utimensat(), not gnulib's - utimensat(). */ -# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef utimensat -# define utimensat rpl_utimensat -# endif -_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag)); -# else -# if !@HAVE_UTIMENSAT@ -_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag)); -# endif -# if @HAVE_UTIMENSAT@ -_GL_CXXALIASWARN (utimensat); -# endif -#elif defined GNULIB_POSIXCHECK -# undef utimensat -# if HAVE_RAW_DECL_UTIMENSAT -_GL_WARN_ON_USE (utimensat, "utimensat is not portable - " - "use gnulib module utimensat for portability"); -# endif -#endif - - -#endif /* _GL_SYS_STAT_H */ -#endif /* _GL_SYS_STAT_H */ -#endif diff --git a/gnulib/lib/sys_time.in.h b/gnulib/lib/sys_time.in.h deleted file mode 100644 index d4319d2..0000000 --- a/gnulib/lib/sys_time.in.h +++ /dev/null @@ -1,101 +0,0 @@ -/* Provide a more complete sys/time.h. - - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Paul Eggert. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined _GL_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 - -# define _GL_SYS_TIME_H - -# if @HAVE_SYS_TIME_H@ -# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ -# else -# include -# endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -# ifdef __cplusplus -extern "C" { -# endif - -# if ! @HAVE_STRUCT_TIMEVAL@ - -# if !GNULIB_defined_struct_timeval -struct timeval -{ - time_t tv_sec; - long int tv_usec; -}; -# define GNULIB_defined_struct_timeval 1 -# endif - -# endif - -# ifdef __cplusplus -} -# 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@ -_GL_FUNCDECL_SYS (gettimeofday, int, - (struct timeval *restrict, void *restrict) - _GL_ARG_NONNULL ((1))); -# 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 -_GL_CXXALIASWARN (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 /* _GL_SYS_TIME_H */ diff --git a/gnulib/lib/sys_wait.in.h b/gnulib/lib/sys_wait.in.h deleted file mode 100644 index 8eabf6f..0000000 --- a/gnulib/lib/sys_wait.in.h +++ /dev/null @@ -1,130 +0,0 @@ -/* A POSIX-like . - Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - - -#ifndef _GL_SYS_WAIT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -# @INCLUDE_NEXT@ @NEXT_SYS_WAIT_H@ -#endif - -#ifndef _GL_SYS_WAIT_H -#define _GL_SYS_WAIT_H - -/* Get pid_t. */ -#include - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -/* Unix API. */ - -/* The following macros apply to an argument x, that is a status of a process, - as returned by waitpid(). - On nearly all systems, including Linux/x86, WEXITSTATUS are bits 15..8 and - WTERMSIG are bits 7..0, while BeOS uses the opposite. Therefore programs - have to use the abstract macros. */ - -/* For valid x, exactly one of WIFSIGNALED(x), WIFEXITED(x), WIFSTOPPED(x) - is true. */ -# ifndef WIFSIGNALED -# define WIFSIGNALED(x) (WTERMSIG (x) != 0 && WTERMSIG(x) != 0x7f) -# endif -# ifndef WIFEXITED -# define WIFEXITED(x) (WTERMSIG (x) == 0) -# endif -# ifndef WIFSTOPPED -# define WIFSTOPPED(x) (WTERMSIG (x) == 0x7f) -# endif - -/* The termination signal. Only to be accessed if WIFSIGNALED(x) is true. */ -# ifndef WTERMSIG -# define WTERMSIG(x) ((x) & 0x7f) -# endif - -/* The exit status. Only to be accessed if WIFEXITED(x) is true. */ -# ifndef WEXITSTATUS -# define WEXITSTATUS(x) (((x) >> 8) & 0xff) -# endif - -/* The stopping signal. Only to be accessed if WIFSTOPPED(x) is true. */ -# ifndef WSTOPSIG -# define WSTOPSIG(x) (((x) >> 8) & 0x7f) -# endif - -/* True if the process dumped core. Not standardized by POSIX. */ -# ifndef WCOREDUMP -# define WCOREDUMP(x) ((x) & 0x80) -# endif - -#else -/* Native Windows API. */ - -# include /* for SIGTERM */ - -/* The following macros apply to an argument x, that is a status of a process, - as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess(). - This value is simply an 'int', not composed of bit fields. */ - -/* When an unhandled fatal signal terminates a process, the exit code is 3. */ -# define WIFSIGNALED(x) ((x) == 3) -# define WIFEXITED(x) ((x) != 3) -# define WIFSTOPPED(x) 0 - -/* The signal that terminated a process is not known posthum. */ -# define WTERMSIG(x) SIGTERM - -# define WEXITSTATUS(x) (x) - -/* There are no stopping signals. */ -# define WSTOPSIG(x) 0 - -/* There are no core dumps. */ -# define WCOREDUMP(x) 0 - -#endif - - -/* Declarations of functions. */ - -#if @GNULIB_WAITPID@ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -_GL_FUNCDECL_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); -# endif -_GL_CXXALIAS_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); -_GL_CXXALIASWARN (waitpid); -#elif defined GNULIB_POSIXCHECK -# undef waitpid -# if HAVE_RAW_DECL_WAITPID -_GL_WARN_ON_USE (waitpid, "waitpid is unportable - " - "use gnulib module sys_wait for portability"); -# endif -#endif - - -#endif /* _GL_SYS_WAIT_H */ -#endif /* _GL_SYS_WAIT_H */ diff --git a/gnulib/lib/time.in.h b/gnulib/lib/time.in.h deleted file mode 100644 index cb533a4..0000000 --- a/gnulib/lib/time.in.h +++ /dev/null @@ -1,249 +0,0 @@ -/* A more-standard . - - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* Don't get in the way of glibc when it includes time.h merely to - declare a few standard symbols, rather than to declare all the - symbols. Also, Solaris 8 eventually includes itself - recursively; if that is happening, just include the system - without adding our own declarations. */ -#if (defined __need_time_t || defined __need_clock_t \ - || defined __need_timespec \ - || defined _GL_TIME_H) - -# @INCLUDE_NEXT@ @NEXT_TIME_H@ - -#else - -# define _GL_TIME_H - -# @INCLUDE_NEXT@ @NEXT_TIME_H@ - -/* NetBSD 5.0 mis-defines NULL. */ -# include - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). - Or they define it with the wrong member names or define it in - (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the - pthreads-win32 library defines it in . */ -# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ -# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -# include -# elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ -# include -/* The pthreads-win32 also defines a couple of broken macros. */ -# undef asctime_r -# undef ctime_r -# undef gmtime_r -# undef localtime_r -# undef rand_r -# undef strtok_r -# else - -# ifdef __cplusplus -extern "C" { -# endif - -# if !GNULIB_defined_struct_timespec -# undef timespec -# define timespec rpl_timespec -struct timespec -{ - time_t tv_sec; - long int tv_nsec; -}; -# define GNULIB_defined_struct_timespec 1 -# endif - -# ifdef __cplusplus -} -# endif - -# endif -# endif - -# if !GNULIB_defined_struct_time_t_must_be_integral -/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires - time_t to be an integer type, even though C99 permits floating - point. We don't know of any implementation that uses floating - point, and it is much easier to write code that doesn't have to - worry about that corner case, so we force the issue. */ -struct __time_t_must_be_integral { - unsigned int __floating_time_t_unsupported : (time_t) 1; -}; -# define GNULIB_defined_struct_time_t_must_be_integral 1 -# endif - -/* Sleep for at least RQTP seconds unless interrupted, If interrupted, - return -1 and store the remaining time into RMTP. See - . */ -# if @GNULIB_NANOSLEEP@ -# if @REPLACE_NANOSLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define nanosleep rpl_nanosleep -# endif -_GL_FUNCDECL_RPL (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp)); -# else -# if ! @HAVE_NANOSLEEP@ -_GL_FUNCDECL_SYS (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp)); -# endif -_GL_CXXALIASWARN (nanosleep); -# endif - -/* Return the 'time_t' representation of TP and normalize TP. */ -# if @GNULIB_MKTIME@ -# if @REPLACE_MKTIME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mktime rpl_mktime -# endif -_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); -# else -_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); -# endif -_GL_CXXALIASWARN (mktime); -# endif - -/* Convert TIMER to RESULT, assuming local time and UTC respectively. See - and - . */ -# if @GNULIB_TIME_R@ -# if @REPLACE_LOCALTIME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef localtime_r -# define localtime_r rpl_localtime_r -# endif -_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# else -# if ! @HAVE_DECL_LOCALTIME_R@ -_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# endif -# if @HAVE_DECL_LOCALTIME_R@ -_GL_CXXALIASWARN (localtime_r); -# endif -# if @REPLACE_LOCALTIME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gmtime_r -# define gmtime_r rpl_gmtime_r -# endif -_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# else -# if ! @HAVE_DECL_LOCALTIME_R@ -_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# endif -# if @HAVE_DECL_LOCALTIME_R@ -_GL_CXXALIASWARN (gmtime_r); -# endif -# endif - -/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store - the resulting broken-down time into TM. See - . */ -# if @GNULIB_STRPTIME@ -# if ! @HAVE_STRPTIME@ -_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, - char const *restrict __format, - struct tm *restrict __tm) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, - char const *restrict __format, - struct tm *restrict __tm)); -_GL_CXXALIASWARN (strptime); -# endif - -/* Convert TM to a time_t value, assuming UTC. */ -# if @GNULIB_TIMEGM@ -# if @REPLACE_TIMEGM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef timegm -# define timegm rpl_timegm -# endif -_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); -# else -# if ! @HAVE_TIMEGM@ -_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); -# endif -_GL_CXXALIASWARN (timegm); -# endif - -/* Encourage applications to avoid unsafe functions that can overrun - buffers when given outlandish struct tm values. Portable - applications should use strftime (or even sprintf) instead. */ -# if defined GNULIB_POSIXCHECK -# undef asctime -_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef asctime_r -_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef ctime -_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef ctime_r -_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif - -#endif diff --git a/gnulib/lib/time_r.c b/gnulib/lib/time_r.c deleted file mode 100644 index 31d010e..0000000 --- a/gnulib/lib/time_r.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Reentrant time functions like localtime_r. - - Copyright (C) 2003, 2006-2007, 2010-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Paul Eggert. */ - -#include - -#include - -static struct tm * -copy_tm_result (struct tm *dest, struct tm const *src) -{ - if (! src) - return 0; - *dest = *src; - return dest; -} - - -struct tm * -gmtime_r (time_t const * restrict t, struct tm * restrict tp) -{ - return copy_tm_result (tp, gmtime (t)); -} - -struct tm * -localtime_r (time_t const * restrict t, struct tm * restrict tp) -{ - return copy_tm_result (tp, localtime (t)); -} diff --git a/gnulib/lib/timespec.h b/gnulib/lib/timespec.h deleted file mode 100644 index 74d5749..0000000 --- a/gnulib/lib/timespec.h +++ /dev/null @@ -1,63 +0,0 @@ -/* timespec -- System time interface - - Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if ! defined TIMESPEC_H -# define TIMESPEC_H - -# include - -/* Return negative, zero, positive if A < B, A == B, A > B, respectively. - - For each time stamp T, this code assumes that either: - - * T.tv_nsec is in the range 0..999999999; or - * T.tv_sec corresponds to a valid leap second on a host that supports - leap seconds, and T.tv_nsec is in the range 1000000000..1999999999; or - * T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or - T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000. - This allows for special struct timespec values that are less or - greater than all possible valid time stamps. - - In all these cases, it is safe to subtract two tv_nsec values and - convert the result to integer without worrying about overflow on - any platform of interest to the GNU project, since all such - platforms have 32-bit int or wider. - - Replacing "(int) (a.tv_nsec - b.tv_nsec)" with something like - "a.tv_nsec < b.tv_nsec ? -1 : a.tv_nsec > b.tv_nsec" would cause - this function to work in some cases where the above assumption is - violated, but not in all cases (e.g., a.tv_sec==1, a.tv_nsec==-2, - b.tv_sec==0, b.tv_nsec==999999999) and is arguably not worth the - extra instructions. Using a subtraction has the advantage of - detecting some invalid cases on platforms that detect integer - overflow. - - The (int) cast avoids a gcc -Wconversion warning. */ - -static inline int -timespec_cmp (struct timespec a, struct timespec b) -{ - return (a.tv_sec < b.tv_sec ? -1 - : a.tv_sec > b.tv_sec ? 1 - : (int) (a.tv_nsec - b.tv_nsec)); -} - -void gettime (struct timespec *); -int settime (struct timespec const *); - -#endif diff --git a/gnulib/lib/unistd--.h b/gnulib/lib/unistd--.h deleted file mode 100644 index 27307c8..0000000 --- a/gnulib/lib/unistd--.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Like unistd.h, but redefine some names to avoid glitches. - - Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#include -#include "unistd-safer.h" - -#undef dup -#define dup dup_safer - -#undef pipe -#define pipe pipe_safer - -#if GNULIB_PIPE2_SAFER -# undef pipe2 -# define pipe2 pipe2_safer -#endif diff --git a/gnulib/lib/unistd-safer.h b/gnulib/lib/unistd-safer.h deleted file mode 100644 index 14f537f..0000000 --- a/gnulib/lib/unistd-safer.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Invoke unistd-like functions, but avoid some glitches. - - Copyright (C) 2001, 2003, 2005, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert and Eric Blake. */ - -int dup_safer (int); -int fd_safer (int); -int pipe_safer (int[2]); - -#if GNULIB_FD_SAFER_FLAG -int dup_safer_flag (int, int); -int fd_safer_flag (int, int); -#endif - -#if GNULIB_PIPE2_SAFER -int pipe2_safer (int[2], int); -#endif diff --git a/gnulib/lib/unistd.in.h b/gnulib/lib/unistd.in.h deleted file mode 100644 index 15893d7..0000000 --- a/gnulib/lib/unistd.in.h +++ /dev/null @@ -1,1381 +0,0 @@ -/* Substitute for and wrapper around . - Copyright (C) 2003-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* Special invocation convention: - - On mingw, several headers, including , include , - but we need to ensure that both the system and - are completely included before we replace gethostname. */ -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ - && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H -/* is being indirectly included for the first time from - ; 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 _GL_UNISTD_H - -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_UNISTD_H@ -# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ -#endif - -/* Get all possible declarations of gethostname(). */ -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ - && !defined _GL_INCLUDING_WINSOCK2_H -# define _GL_INCLUDING_WINSOCK2_H -# include -# undef _GL_INCLUDING_WINSOCK2_H -#endif - -#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H -#define _GL_UNISTD_H - -/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ -#include - -/* mingw doesn't define the SEEK_* or *_FILENO macros in . */ -/* Cygwin 1.7.1 declares symlinkat in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ - || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ - && defined __CYGWIN__)) \ - && ! defined __GLIBC__ -# include -#endif - -/* Cygwin 1.7.1 declares unlinkat in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ - && ! defined __GLIBC__ -# include -#endif - -/* mingw fails to declare _exit in . */ -/* mingw, BeOS, Haiku declare environ in , not in . */ -/* Solaris declares getcwd not only in but also in . */ -/* But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -# include -#endif - -/* mingw declares getcwd in , not in . */ -#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -# include -#endif - -/* AIX and OSF/1 5.1 declare getdomainname in , not in . - NonStop Kernel declares gethostname in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ - || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ - && !defined __GLIBC__ -# include -#endif - -#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ - || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) -/* Get ssize_t. */ -# include -#endif - -/* Get getopt(), optarg, optind, opterr, optopt. - But avoid namespace pollution on glibc systems. */ -#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT -# include -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -#if @GNULIB_GETHOSTNAME@ -/* Get all possible declarations of gethostname(). */ -# if @UNISTD_H_HAVE_WINSOCK2_H@ -# if !defined _GL_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 "); - _GL_WARN_ON_USE (connect, - "connect() used without including "); - _GL_WARN_ON_USE (accept, - "accept() used without including "); - _GL_WARN_ON_USE (bind, - "bind() used without including "); - _GL_WARN_ON_USE (getpeername, - "getpeername() used without including "); - _GL_WARN_ON_USE (getsockname, - "getsockname() used without including "); - _GL_WARN_ON_USE (getsockopt, - "getsockopt() used without including "); - _GL_WARN_ON_USE (listen, - "listen() used without including "); - _GL_WARN_ON_USE (recv, - "recv() used without including "); - _GL_WARN_ON_USE (send, - "send() used without including "); - _GL_WARN_ON_USE (recvfrom, - "recvfrom() used without including "); - _GL_WARN_ON_USE (sendto, - "sendto() used without including "); - _GL_WARN_ON_USE (setsockopt, - "setsockopt() used without including "); - _GL_WARN_ON_USE (shutdown, - "shutdown() used without including "); -# endif -# endif -# if !defined _GL_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 "); -# endif -# endif -# endif -#endif - - -/* OS/2 EMX lacks these macros. */ -#ifndef STDIN_FILENO -# define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -# define STDOUT_FILENO 1 -#endif -#ifndef STDERR_FILENO -# define STDERR_FILENO 2 -#endif - -/* Ensure *_OK macros exist. */ -#ifndef F_OK -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 -#endif - - -/* Declare overridden functions. */ - - -#if defined GNULIB_POSIXCHECK -/* The access() function is a security risk. */ -_GL_WARN_ON_USE (access, "the access function is a security risk - " - "use the gnulib module faccessat instead"); -#endif - - -#if @GNULIB_CHOWN@ -/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE - to GID (if GID is not -1). Follow symbolic links. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ -# if @REPLACE_CHOWN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef chown -# define chown rpl_chown -# endif -_GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); -# else -# if !@HAVE_CHOWN@ -_GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); -# endif -_GL_CXXALIASWARN (chown); -#elif defined GNULIB_POSIXCHECK -# undef chown -# if HAVE_RAW_DECL_CHOWN -_GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " - "doesn't treat a uid or gid of -1 on some systems - " - "use gnulib module chown for portability"); -# endif -#endif - - -#if @GNULIB_CLOSE@ -# if @REPLACE_CLOSE@ -/* Automatically included by modules that need a replacement for close. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef close -# define close rpl_close -# endif -_GL_FUNCDECL_RPL (close, int, (int fd)); -_GL_CXXALIAS_RPL (close, int, (int fd)); -# else -_GL_CXXALIAS_SYS (close, int, (int fd)); -# endif -_GL_CXXALIASWARN (close); -#elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ -# undef close -# define close close_used_without_requesting_gnulib_module_close -#elif defined GNULIB_POSIXCHECK -# undef close -/* Assume close is always declared. */ -_GL_WARN_ON_USE (close, "close does not portably work on sockets - " - "use gnulib module close for portability"); -#endif - - -#if @REPLACE_DUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup rpl_dup -# endif -_GL_FUNCDECL_RPL (dup, int, (int oldfd)); -_GL_CXXALIAS_RPL (dup, int, (int oldfd)); -#else -_GL_CXXALIAS_SYS (dup, int, (int oldfd)); -#endif -_GL_CXXALIASWARN (dup); - - -#if @GNULIB_DUP2@ -/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if - NEWFD = OLDFD, otherwise close NEWFD first if it is open. - Return newfd if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ -# if @REPLACE_DUP2@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup2 rpl_dup2 -# endif -_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); -_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); -# else -# if !@HAVE_DUP2@ -_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); -# endif -_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); -# endif -_GL_CXXALIASWARN (dup2); -#elif defined GNULIB_POSIXCHECK -# undef dup2 -# if HAVE_RAW_DECL_DUP2 -_GL_WARN_ON_USE (dup2, "dup2 is unportable - " - "use gnulib module dup2 for portability"); -# endif -#endif - - -#if @GNULIB_DUP3@ -/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the - specified flags. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - Close NEWFD first if it is open. - Return newfd if successful, otherwise -1 and errno set. - See the Linux man page at - . */ -# if @HAVE_DUP3@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup3 rpl_dup3 -# endif -_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); -_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); -# else -_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); -_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); -# endif -_GL_CXXALIASWARN (dup3); -#elif defined GNULIB_POSIXCHECK -# undef dup3 -# if HAVE_RAW_DECL_DUP3 -_GL_WARN_ON_USE (dup3, "dup3 is unportable - " - "use gnulib module dup3 for portability"); -# endif -#endif - - -#if @GNULIB_ENVIRON@ -# if !@HAVE_DECL_ENVIRON@ -/* Set of environment variables and values. An array of strings of the form - "VARIABLE=VALUE", terminated with a NULL. */ -# if defined __APPLE__ && defined __MACH__ -# include -# define environ (*_NSGetEnviron ()) -# else -# ifdef __cplusplus -extern "C" { -# endif -extern char **environ; -# ifdef __cplusplus -} -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if HAVE_RAW_DECL_ENVIRON -static inline char *** -rpl_environ (void) -{ - return &environ; -} -_GL_WARN_ON_USE (rpl_environ, "environ is unportable - " - "use gnulib module environ for portability"); -# undef environ -# define environ (*rpl_environ ()) -# endif -#endif - - -#if @GNULIB_EUIDACCESS@ -/* Like access(), except that it uses the effective user id and group id of - the current process. */ -# if !@HAVE_EUIDACCESS@ -_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); -_GL_CXXALIASWARN (euidaccess); -# if defined GNULIB_POSIXCHECK -/* Like access(), this function is a security risk. */ -_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " - "use the gnulib module faccessat instead"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef euidaccess -# if HAVE_RAW_DECL_EUIDACCESS -_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " - "use gnulib module euidaccess for portability"); -# endif -#endif - - -#if @GNULIB_FACCESSAT@ -# if !@HAVE_FACCESSAT@ -_GL_FUNCDECL_SYS (faccessat, int, - (int fd, char const *file, int mode, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (faccessat, int, - (int fd, char const *file, int mode, int flag)); -_GL_CXXALIASWARN (faccessat); -#elif defined GNULIB_POSIXCHECK -# undef faccessat -# if HAVE_RAW_DECL_FACCESSAT -_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " - "use gnulib module faccessat for portability"); -# endif -#endif - - -#if @GNULIB_FCHDIR@ -/* Change the process' current working directory to the directory on which - the given file descriptor is open. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ -# if ! @HAVE_FCHDIR@ -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); - -/* Gnulib internal hooks needed to maintain the fchdir metadata. */ -_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) - _GL_ARG_NONNULL ((2)); -_GL_EXTERN_C void _gl_unregister_fd (int fd); -_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); -_GL_EXTERN_C const char *_gl_directory_name (int fd); - -# else -# if !@HAVE_DECL_FCHDIR@ -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); -# endif -# endif -_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); -_GL_CXXALIASWARN (fchdir); -#elif defined GNULIB_POSIXCHECK -# undef fchdir -# if HAVE_RAW_DECL_FCHDIR -_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " - "use gnulib module fchdir for portability"); -# endif -#endif - - -#if @GNULIB_FCHOWNAT@ -# if @REPLACE_FCHOWNAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fchownat -# define fchownat rpl_fchownat -# endif -_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag)); -# else -# if !@HAVE_FCHOWNAT@ -_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag)); -# endif -_GL_CXXALIASWARN (fchownat); -#elif defined GNULIB_POSIXCHECK -# undef fchownat -# if HAVE_RAW_DECL_FCHOWNAT -_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_FSYNC@ -/* Synchronize changes to a file. - Return 0 if successful, otherwise -1 and errno set. - See POSIX:2001 specification - . */ -# if !@HAVE_FSYNC@ -_GL_FUNCDECL_SYS (fsync, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (fsync, int, (int fd)); -_GL_CXXALIASWARN (fsync); -#elif defined GNULIB_POSIXCHECK -# undef fsync -# if HAVE_RAW_DECL_FSYNC -_GL_WARN_ON_USE (fsync, "fsync is unportable - " - "use gnulib module fsync for portability"); -# endif -#endif - - -#if @GNULIB_FTRUNCATE@ -/* Change the size of the file to which FD is opened to become equal to LENGTH. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ -# if !@HAVE_FTRUNCATE@ -_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); -# endif -_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); -_GL_CXXALIASWARN (ftruncate); -#elif defined GNULIB_POSIXCHECK -# undef ftruncate -# if HAVE_RAW_DECL_FTRUNCATE -_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " - "use gnulib module ftruncate for portability"); -# endif -#endif - - -#if @GNULIB_GETCWD@ -/* Get the name of the current working directory, and put it in SIZE bytes - of BUF. - Return BUF if successful, or NULL if the directory couldn't be determined - or SIZE was too small. - See the POSIX:2001 specification - . - Additionally, the gnulib module 'getcwd' guarantees the following GNU - extension: If BUF is NULL, an array is allocated with 'malloc'; the array - is SIZE bytes long, unless SIZE == 0, in which case it is as big as - necessary. */ -# if @REPLACE_GETCWD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getcwd rpl_getcwd -# endif -_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); -_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); -# else -/* Need to cast, because on mingw, the second parameter is - int size. */ -_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); -# endif -_GL_CXXALIASWARN (getcwd); -#elif defined GNULIB_POSIXCHECK -# undef getcwd -# if HAVE_RAW_DECL_GETCWD -_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " - "use gnulib module getcwd for portability"); -# endif -#endif - - -#if @GNULIB_GETDOMAINNAME@ -/* Return the NIS domain name of the machine. - WARNING! The NIS domain name is unrelated to the fully qualified host name - of the machine. It is also unrelated to email addresses. - WARNING! The NIS domain name is usually the empty string or "(none)" when - not using NIS. - - Put up to LEN bytes of the NIS domain name into NAME. - Null terminate it if the name is shorter than LEN. - If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. - Return 0 if successful, otherwise set errno and return -1. */ -# if @REPLACE_GETDOMAINNAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdomainname -# define getdomainname rpl_getdomainname -# endif -_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); -# else -# if !@HAVE_DECL_GETDOMAINNAME@ -_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); -# endif -_GL_CXXALIASWARN (getdomainname); -#elif defined GNULIB_POSIXCHECK -# undef getdomainname -# if HAVE_RAW_DECL_GETDOMAINNAME -_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " - "use gnulib module getdomainname for portability"); -# endif -#endif - - -#if @GNULIB_GETDTABLESIZE@ -/* Return the maximum number of file descriptors in the current process. - In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ -# if !@HAVE_GETDTABLESIZE@ -_GL_FUNCDECL_SYS (getdtablesize, int, (void)); -# endif -_GL_CXXALIAS_SYS (getdtablesize, int, (void)); -_GL_CXXALIASWARN (getdtablesize); -#elif defined GNULIB_POSIXCHECK -# undef getdtablesize -# if HAVE_RAW_DECL_GETDTABLESIZE -_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " - "use gnulib module getdtablesize for portability"); -# endif -#endif - - -#if @GNULIB_GETGROUPS@ -/* Return the supplemental groups that the current process belongs to. - It is unspecified whether the effective group id is in the list. - If N is 0, return the group count; otherwise, N describes how many - entries are available in GROUPS. Return -1 and set errno if N is - not 0 and not large enough. Fails with ENOSYS on some systems. */ -# if @REPLACE_GETGROUPS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getgroups -# define getgroups rpl_getgroups -# endif -_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); -_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); -# else -# if !@HAVE_GETGROUPS@ -_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); -# endif -_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); -# endif -_GL_CXXALIASWARN (getgroups); -#elif defined GNULIB_POSIXCHECK -# undef getgroups -# if HAVE_RAW_DECL_GETGROUPS -_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " - "use gnulib module getgroups for portability"); -# endif -#endif - - -#if @GNULIB_GETHOSTNAME@ -/* Return the standard host name of the machine. - WARNING! The host name may or may not be fully qualified. - - Put up to LEN bytes of the host name into NAME. - Null terminate it if the name is shorter than LEN. - If the host name is longer than LEN, set errno = EINVAL and return -1. - Return 0 if successful, otherwise set errno and return -1. */ -# if @UNISTD_H_HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gethostname -# define gethostname rpl_gethostname -# endif -_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); -# else -# if !@HAVE_GETHOSTNAME@ -_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second - parameter is - int len. */ -_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); -# endif -_GL_CXXALIASWARN (gethostname); -#elif @UNISTD_H_HAVE_WINSOCK2_H@ -# undef gethostname -# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname -#elif defined GNULIB_POSIXCHECK -# undef gethostname -# if HAVE_RAW_DECL_GETHOSTNAME -_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " - "use gnulib module gethostname for portability"); -# endif -#endif - - -#if @GNULIB_GETLOGIN@ -/* Returns the user's login name, or NULL if it cannot be found. Upon error, - returns NULL with errno set. - - See . - - Most programs don't need to use this function, because the information is - available through environment variables: - ${LOGNAME-$USER} on Unix platforms, - $USERNAME on native Windows platforms. - */ -# if !@HAVE_GETLOGIN@ -_GL_FUNCDECL_SYS (getlogin, char *, (void)); -# endif -_GL_CXXALIAS_SYS (getlogin, char *, (void)); -_GL_CXXALIASWARN (getlogin); -#elif defined GNULIB_POSIXCHECK -# undef getlogin -# if HAVE_RAW_DECL_GETLOGIN -_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " - "use gnulib module getlogin for portability"); -# endif -#endif - - -#if @GNULIB_GETLOGIN_R@ -/* Copies the user's login name to NAME. - The array pointed to by NAME has room for SIZE bytes. - - Returns 0 if successful. Upon error, an error number is returned, or -1 in - the case that the login name cannot be found but no specific error is - provided (this case is hopefully rare but is left open by the POSIX spec). - - See . - - Most programs don't need to use this function, because the information is - available through environment variables: - ${LOGNAME-$USER} on Unix platforms, - $USERNAME on native Windows platforms. - */ -# if @REPLACE_GETLOGIN_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getlogin_r rpl_getlogin_r -# endif -_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); -# else -# if !@HAVE_DECL_GETLOGIN_R@ -_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on Solaris 10 systems, the second argument is - int size. */ -_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); -# endif -_GL_CXXALIASWARN (getlogin_r); -#elif defined GNULIB_POSIXCHECK -# undef getlogin_r -# if HAVE_RAW_DECL_GETLOGIN_R -_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " - "use gnulib module getlogin_r for portability"); -# endif -#endif - - -#if @GNULIB_GETPAGESIZE@ -# if @REPLACE_GETPAGESIZE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getpagesize rpl_getpagesize -# endif -_GL_FUNCDECL_RPL (getpagesize, int, (void)); -_GL_CXXALIAS_RPL (getpagesize, int, (void)); -# else -# if !@HAVE_GETPAGESIZE@ -# if !defined getpagesize -/* This is for POSIX systems. */ -# if !defined _gl_getpagesize && defined _SC_PAGESIZE -# if ! (defined __VMS && __VMS_VER < 70000000) -# define _gl_getpagesize() sysconf (_SC_PAGESIZE) -# endif -# endif -/* This is for older VMS. */ -# if !defined _gl_getpagesize && defined __VMS -# ifdef __ALPHA -# define _gl_getpagesize() 8192 -# else -# define _gl_getpagesize() 512 -# endif -# endif -/* This is for BeOS. */ -# if !defined _gl_getpagesize && @HAVE_OS_H@ -# include -# if defined B_PAGE_SIZE -# define _gl_getpagesize() B_PAGE_SIZE -# endif -# endif -/* This is for AmigaOS4.0. */ -# if !defined _gl_getpagesize && defined __amigaos4__ -# define _gl_getpagesize() 2048 -# endif -/* This is for older Unix systems. */ -# if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ -# include -# ifdef EXEC_PAGESIZE -# define _gl_getpagesize() EXEC_PAGESIZE -# else -# ifdef NBPG -# ifndef CLSIZE -# define CLSIZE 1 -# endif -# define _gl_getpagesize() (NBPG * CLSIZE) -# else -# ifdef NBPC -# define _gl_getpagesize() NBPC -# endif -# endif -# endif -# endif -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getpagesize() _gl_getpagesize () -# else -# if !GNULIB_defined_getpagesize_function -static inline int -getpagesize () -{ - return _gl_getpagesize (); -} -# define GNULIB_defined_getpagesize_function 1 -# endif -# endif -# endif -# endif -/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ -_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); -# endif -# if @HAVE_DECL_GETPAGESIZE@ -_GL_CXXALIASWARN (getpagesize); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getpagesize -# if HAVE_RAW_DECL_GETPAGESIZE -_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " - "use gnulib module getpagesize for portability"); -# endif -#endif - - -#if @GNULIB_GETUSERSHELL@ -/* Return the next valid login shell on the system, or NULL when the end of - the list has been reached. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (getusershell, char *, (void)); -# endif -_GL_CXXALIAS_SYS (getusershell, char *, (void)); -_GL_CXXALIASWARN (getusershell); -#elif defined GNULIB_POSIXCHECK -# undef getusershell -# if HAVE_RAW_DECL_GETUSERSHELL -_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - -#if @GNULIB_GETUSERSHELL@ -/* Rewind to pointer that is advanced at each getusershell() call. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (setusershell, void, (void)); -# endif -_GL_CXXALIAS_SYS (setusershell, void, (void)); -_GL_CXXALIASWARN (setusershell); -#elif defined GNULIB_POSIXCHECK -# undef setusershell -# if HAVE_RAW_DECL_SETUSERSHELL -_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - -#if @GNULIB_GETUSERSHELL@ -/* Free the pointer that is advanced at each getusershell() call and - associated resources. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (endusershell, void, (void)); -# endif -_GL_CXXALIAS_SYS (endusershell, void, (void)); -_GL_CXXALIASWARN (endusershell); -#elif defined GNULIB_POSIXCHECK -# undef endusershell -# if HAVE_RAW_DECL_ENDUSERSHELL -_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - - -#if @GNULIB_LCHOWN@ -/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE - to GID (if GID is not -1). Do not follow symbolic links. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ -# if @REPLACE_LCHOWN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lchown -# define lchown rpl_lchown -# endif -_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); -# else -# if !@HAVE_LCHOWN@ -_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); -# endif -_GL_CXXALIASWARN (lchown); -#elif defined GNULIB_POSIXCHECK -# undef lchown -# if HAVE_RAW_DECL_LCHOWN -_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " - "use gnulib module lchown for portability"); -# endif -#endif - - -#if @GNULIB_LINK@ -/* Create a new hard link for an existing file. - Return 0 if successful, otherwise -1 and errno set. - See POSIX:2001 specification - . */ -# if @REPLACE_LINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define link rpl_link -# endif -_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); -# else -# if !@HAVE_LINK@ -_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); -# endif -_GL_CXXALIASWARN (link); -#elif defined GNULIB_POSIXCHECK -# undef link -# if HAVE_RAW_DECL_LINK -_GL_WARN_ON_USE (link, "link is unportable - " - "use gnulib module link for portability"); -# endif -#endif - - -#if @GNULIB_LINKAT@ -/* Create a new hard link for an existing file, relative to two - directories. FLAG controls whether symlinks are followed. - Return 0 if successful, otherwise -1 and errno set. */ -# if @REPLACE_LINKAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef linkat -# define linkat rpl_linkat -# endif -_GL_FUNCDECL_RPL (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag)); -# else -# if !@HAVE_LINKAT@ -_GL_FUNCDECL_SYS (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag)); -# endif -_GL_CXXALIASWARN (linkat); -#elif defined GNULIB_POSIXCHECK -# undef linkat -# if HAVE_RAW_DECL_LINKAT -_GL_WARN_ON_USE (linkat, "linkat is unportable - " - "use gnulib module linkat for portability"); -# endif -#endif - - -#if @GNULIB_LSEEK@ -/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. - Return the new offset if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ -# if @REPLACE_LSEEK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lseek rpl_lseek -# endif -_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); -_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); -# else -_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (lseek); -#elif defined GNULIB_POSIXCHECK -# undef lseek -# if HAVE_RAW_DECL_LSEEK -_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " - "systems - use gnulib module lseek for portability"); -# endif -#endif - - -#if @GNULIB_PIPE@ -/* Create a pipe, defaulting to O_BINARY mode. - Store the read-end as fd[0] and the write-end as fd[1]. - Return 0 upon success, or -1 with errno set upon failure. */ -# if !@HAVE_PIPE@ -_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pipe, int, (int fd[2])); -_GL_CXXALIASWARN (pipe); -#elif defined GNULIB_POSIXCHECK -# undef pipe -# if HAVE_RAW_DECL_PIPE -_GL_WARN_ON_USE (pipe, "pipe is unportable - " - "use gnulib module pipe-posix for portability"); -# endif -#endif - - -#if @GNULIB_PIPE2@ -/* Create a pipe, applying the given flags when opening the read-end of the - pipe and the write-end of the pipe. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - Store the read-end as fd[0] and the write-end as fd[1]. - Return 0 upon success, or -1 with errno set upon failure. - See also the Linux man page at - . */ -# if @HAVE_PIPE2@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define pipe2 rpl_pipe2 -# endif -_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); -# else -_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); -# endif -_GL_CXXALIASWARN (pipe2); -#elif defined GNULIB_POSIXCHECK -# undef pipe2 -# if HAVE_RAW_DECL_PIPE2 -_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " - "use gnulib module pipe2 for portability"); -# endif -#endif - - -#if @GNULIB_PREAD@ -/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. - Return the number of bytes placed into BUF if successful, otherwise - set errno and return -1. 0 indicates EOF. See the POSIX:2001 - specification . */ -# if @REPLACE_PREAD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define pread rpl_pread -# endif -_GL_FUNCDECL_RPL (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset)); -# else -# if !@HAVE_PREAD@ -_GL_FUNCDECL_SYS (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset)); -# endif -_GL_CXXALIASWARN (pread); -#elif defined GNULIB_POSIXCHECK -# undef pread -# if HAVE_RAW_DECL_PREAD -_GL_WARN_ON_USE (pread, "pread is unportable - " - "use gnulib module pread for portability"); -# endif -#endif - - -#if @GNULIB_PWRITE@ -/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. - Return the number of bytes written if successful, otherwise - set errno and return -1. 0 indicates nothing written. See the - POSIX:2001 specification - . */ -# if @REPLACE_PWRITE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define pwrite rpl_pwrite -# endif -_GL_FUNCDECL_RPL (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset)); -# else -# if !@HAVE_PWRITE@ -_GL_FUNCDECL_SYS (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset)); -# endif -_GL_CXXALIASWARN (pwrite); -#elif defined GNULIB_POSIXCHECK -# undef pwrite -# if HAVE_RAW_DECL_PWRITE -_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " - "use gnulib module pwrite for portability"); -# endif -#endif - - -#if @GNULIB_READLINK@ -/* Read the contents of the symbolic link FILE and place the first BUFSIZE - bytes of it into BUF. Return the number of bytes placed into BUF if - successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ -# if @REPLACE_READLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define readlink rpl_readlink -# endif -_GL_FUNCDECL_RPL (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize)); -# else -# if !@HAVE_READLINK@ -_GL_FUNCDECL_SYS (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize)); -# endif -_GL_CXXALIASWARN (readlink); -#elif defined GNULIB_POSIXCHECK -# undef readlink -# if HAVE_RAW_DECL_READLINK -_GL_WARN_ON_USE (readlink, "readlink is unportable - " - "use gnulib module readlink for portability"); -# endif -#endif - - -#if @GNULIB_READLINKAT@ -# if !@HAVE_READLINKAT@ -_GL_FUNCDECL_SYS (readlinkat, ssize_t, - (int fd, char const *file, char *buf, size_t len) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (readlinkat, ssize_t, - (int fd, char const *file, char *buf, size_t len)); -_GL_CXXALIASWARN (readlinkat); -#elif defined GNULIB_POSIXCHECK -# undef readlinkat -# if HAVE_RAW_DECL_READLINKAT -_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " - "use gnulib module readlinkat for portability"); -# endif -#endif - - -#if @GNULIB_RMDIR@ -/* Remove the directory DIR. */ -# if @REPLACE_RMDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define rmdir rpl_rmdir -# endif -_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); -# else -_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); -# endif -_GL_CXXALIASWARN (rmdir); -#elif defined GNULIB_POSIXCHECK -# undef rmdir -# if HAVE_RAW_DECL_RMDIR -_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " - "use gnulib module rmdir for portability"); -# endif -#endif - - -#if @GNULIB_SLEEP@ -/* Pause the execution of the current thread for N seconds. - Returns the number of seconds left to sleep. - See the POSIX:2001 specification - . */ -# if @REPLACE_SLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sleep -# define sleep rpl_sleep -# endif -_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); -_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); -# else -# if !@HAVE_SLEEP@ -_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); -# endif -_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); -# endif -_GL_CXXALIASWARN (sleep); -#elif defined GNULIB_POSIXCHECK -# undef sleep -# if HAVE_RAW_DECL_SLEEP -_GL_WARN_ON_USE (sleep, "sleep is unportable - " - "use gnulib module sleep for portability"); -# endif -#endif - - -#if @GNULIB_SYMLINK@ -# if @REPLACE_SYMLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef symlink -# define symlink rpl_symlink -# endif -_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); -# else -# if !@HAVE_SYMLINK@ -_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); -# endif -_GL_CXXALIASWARN (symlink); -#elif defined GNULIB_POSIXCHECK -# undef symlink -# if HAVE_RAW_DECL_SYMLINK -_GL_WARN_ON_USE (symlink, "symlink is not portable - " - "use gnulib module symlink for portability"); -# endif -#endif - - -#if @GNULIB_SYMLINKAT@ -# if !@HAVE_SYMLINKAT@ -_GL_FUNCDECL_SYS (symlinkat, int, - (char const *contents, int fd, char const *file) - _GL_ARG_NONNULL ((1, 3))); -# endif -_GL_CXXALIAS_SYS (symlinkat, int, - (char const *contents, int fd, char const *file)); -_GL_CXXALIASWARN (symlinkat); -#elif defined GNULIB_POSIXCHECK -# undef symlinkat -# if HAVE_RAW_DECL_SYMLINKAT -_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " - "use gnulib module symlinkat for portability"); -# endif -#endif - - -#if @GNULIB_TTYNAME_R@ -/* Store at most BUFLEN characters of the pathname of the terminal FD is - open on in BUF. Return 0 on success, otherwise an error number. */ -# if @REPLACE_TTYNAME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ttyname_r -# define ttyname_r rpl_ttyname_r -# endif -_GL_FUNCDECL_RPL (ttyname_r, int, - (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (ttyname_r, int, - (int fd, char *buf, size_t buflen)); -# else -# if !@HAVE_DECL_TTYNAME_R@ -_GL_FUNCDECL_SYS (ttyname_r, int, - (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (ttyname_r, int, - (int fd, char *buf, size_t buflen)); -# endif -_GL_CXXALIASWARN (ttyname_r); -#elif defined GNULIB_POSIXCHECK -# undef ttyname_r -# if HAVE_RAW_DECL_TTYNAME_R -_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " - "use gnulib module ttyname_r for portability"); -# endif -#endif - - -#if @GNULIB_UNLINK@ -# if @REPLACE_UNLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unlink -# define unlink rpl_unlink -# endif -_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (unlink, int, (char const *file)); -# else -_GL_CXXALIAS_SYS (unlink, int, (char const *file)); -# endif -_GL_CXXALIASWARN (unlink); -#elif defined GNULIB_POSIXCHECK -# undef unlink -# if HAVE_RAW_DECL_UNLINK -_GL_WARN_ON_USE (unlink, "unlink is not portable - " - "use gnulib module unlink for portability"); -# endif -#endif - - -#if @GNULIB_UNLINKAT@ -# if @REPLACE_UNLINKAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unlinkat -# define unlinkat rpl_unlinkat -# endif -_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); -# else -# if !@HAVE_UNLINKAT@ -_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); -# endif -_GL_CXXALIASWARN (unlinkat); -#elif defined GNULIB_POSIXCHECK -# undef unlinkat -# if HAVE_RAW_DECL_UNLINKAT -_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_USLEEP@ -/* Pause the execution of the current thread for N microseconds. - Returns 0 on completion, or -1 on range error. - See the POSIX:2001 specification - . */ -# if @REPLACE_USLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef usleep -# define usleep rpl_usleep -# endif -_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); -_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); -# else -# if !@HAVE_USLEEP@ -_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); -# endif -_GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); -# endif -_GL_CXXALIASWARN (usleep); -#elif defined GNULIB_POSIXCHECK -# undef usleep -# if HAVE_RAW_DECL_USLEEP -_GL_WARN_ON_USE (usleep, "usleep is unportable - " - "use gnulib module usleep for portability"); -# endif -#endif - - -#if @GNULIB_WRITE@ -/* Write up to COUNT bytes starting at BUF to file descriptor FD. - See the POSIX:2001 specification - . */ -# if @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef write -# define write rpl_write -# endif -_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); -# else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); -# endif -_GL_CXXALIASWARN (write); -#endif - - -#endif /* _GL_UNISTD_H */ -#endif /* _GL_UNISTD_H */ diff --git a/gnulib/lib/unitypes.in.h b/gnulib/lib/unitypes.in.h deleted file mode 100644 index 20cbf45..0000000 --- a/gnulib/lib/unitypes.in.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Elementary types for the GNU UniString library. - Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _UNITYPES_H -#define _UNITYPES_H - -/* Get uint8_t, uint16_t, uint32_t. */ -#include - -/* Type representing a Unicode character. */ -typedef uint32_t ucs4_t; - -#endif /* _UNITYPES_H */ diff --git a/gnulib/lib/uniwidth.in.h b/gnulib/lib/uniwidth.in.h deleted file mode 100644 index 0331568..0000000 --- a/gnulib/lib/uniwidth.in.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Display width functions. - Copyright (C) 2001-2002, 2005, 2007, 2009-2011 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _UNIWIDTH_H -#define _UNIWIDTH_H - -#include "unitypes.h" - -/* Get size_t. */ -#include - -/* Get locale_charset() declaration. */ -#include "localcharset.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Display width. */ - -/* These functions are locale dependent. The encoding argument identifies - the encoding (e.g. "ISO-8859-2" for Polish). */ - -/* Determine number of column positions required for UC. */ -extern int - uc_width (ucs4_t uc, const char *encoding); - -/* Determine number of column positions required for first N units - (or fewer if S ends before this) in S. */ -extern int - u8_width (const uint8_t *s, size_t n, const char *encoding); -extern int - u16_width (const uint16_t *s, size_t n, const char *encoding); -extern int - u32_width (const uint32_t *s, size_t n, const char *encoding); - -/* Determine number of column positions required for S. */ -extern int - u8_strwidth (const uint8_t *s, const char *encoding); -extern int - u16_strwidth (const uint16_t *s, const char *encoding); -extern int - u32_strwidth (const uint32_t *s, const char *encoding); - - -#ifdef __cplusplus -} -#endif - -#endif /* _UNIWIDTH_H */ diff --git a/gnulib/lib/uniwidth/cjk.h b/gnulib/lib/uniwidth/cjk.h deleted file mode 100644 index 92d8752..0000000 --- a/gnulib/lib/uniwidth/cjk.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Test for CJK encoding. - Copyright (C) 2001-2002, 2005-2007, 2009-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2002. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include "streq.h" - -static int -is_cjk_encoding (const char *encoding) -{ - if (0 - /* Legacy Japanese encodings */ - || STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0) - /* Legacy Chinese encodings */ - || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) - || STREQ (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0) - || STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0) - || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0) - /* Legacy Korean encodings */ - || STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) - || STREQ (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0) - || STREQ (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0)) - return 1; - return 0; -} diff --git a/gnulib/lib/uniwidth/width.c b/gnulib/lib/uniwidth/width.c deleted file mode 100644 index 23958ba..0000000 --- a/gnulib/lib/uniwidth/width.c +++ /dev/null @@ -1,368 +0,0 @@ -/* Determine display width of Unicode character. - Copyright (C) 2001-2002, 2006-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2002. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include "uniwidth.h" - -#include "cjk.h" - -/* - * Non-spacing attribute table. - * Consists of: - * - Non-spacing characters; generated from PropList.txt or - * "grep '^[^;]*;[^;]*;[^;]*;[^;]*;NSM;' UnicodeData.txt" - * - Format control characters; generated from - * "grep '^[^;]*;[^;]*;Cf;' UnicodeData.txt" - * - Zero width characters; generated from - * "grep '^[^;]*;ZERO WIDTH ' UnicodeData.txt" - */ -static const unsigned char nonspacing_table_data[27*64] = { - /* 0x0000-0x01ff */ - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */ - 0xff, 0xff, 0xff, 0xff, 0x00, 0x20, 0x00, 0x00, /* 0x0080-0x00bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00c0-0x00ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0100-0x013f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0140-0x017f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0180-0x01bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x01c0-0x01ff */ - /* 0x0200-0x03ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0200-0x023f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0240-0x027f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0280-0x02bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x02c0-0x02ff */ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x0300-0x033f */ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, /* 0x0340-0x037f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0380-0x03bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x03c0-0x03ff */ - /* 0x0400-0x05ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0400-0x043f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0440-0x047f */ - 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0480-0x04bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x04c0-0x04ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0500-0x053f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0540-0x057f */ - 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, /* 0x0580-0x05bf */ - 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x05c0-0x05ff */ - /* 0x0600-0x07ff */ - 0x0f, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, /* 0x0600-0x063f */ - 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, /* 0x0640-0x067f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0680-0x06bf */ - 0x00, 0x00, 0xc0, 0xbf, 0x9f, 0x3d, 0x00, 0x00, /* 0x06c0-0x06ff */ - 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x0700-0x073f */ - 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0740-0x077f */ - 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, /* 0x0780-0x07bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x07c0-0x07ff */ - /* 0x0800-0x09ff */ - 0x00, 0x00, 0xc0, 0xfb, 0xef, 0x3e, 0x00, 0x00, /* 0x0800-0x083f */ - 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, /* 0x0840-0x087f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08c0-0x08ff */ - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, /* 0x0900-0x093f */ - 0xfe, 0x21, 0xfe, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0940-0x097f */ - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0980-0x09bf */ - 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x09c0-0x09ff */ - /* 0x0a00-0x0bff */ - 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a00-0x0a3f */ - 0x86, 0x39, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, /* 0x0a40-0x0a7f */ - 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a80-0x0abf */ - 0xbe, 0x21, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0ac0-0x0aff */ - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, /* 0x0b00-0x0b3f */ - 0x1e, 0x20, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0b40-0x0b7f */ - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0b80-0x0bbf */ - 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0bc0-0x0bff */ - /* 0x0c00-0x0dff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, /* 0x0c00-0x0c3f */ - 0xc1, 0x3d, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0c40-0x0c7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0c80-0x0cbf */ - 0x00, 0x30, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0cc0-0x0cff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d00-0x0d3f */ - 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0d40-0x0d7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d80-0x0dbf */ - 0x00, 0x04, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0dc0-0x0dff */ - /* 0x0e00-0x0fff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x07, /* 0x0e00-0x0e3f */ - 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0e40-0x0e7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x1b, /* 0x0e80-0x0ebf */ - 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0ec0-0x0eff */ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x02, /* 0x0f00-0x0f3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, /* 0x0f40-0x0f7f */ - 0xdf, 0xe0, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x1f, /* 0x0f80-0x0fbf */ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0fc0-0x0fff */ - /* 0x1000-0x11ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfd, 0x66, /* 0x1000-0x103f */ - 0x00, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x1e, 0x00, /* 0x1040-0x107f */ - 0x64, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x1080-0x10bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10c0-0x10ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1100-0x113f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1140-0x117f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1180-0x11bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11c0-0x11ff */ - /* 0x1200-0x13ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1200-0x123f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1240-0x127f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1280-0x12bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x12c0-0x12ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1300-0x133f */ - 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, /* 0x1340-0x137f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1380-0x13bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13c0-0x13ff */ - /* 0x1600-0x17ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1600-0x163f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1640-0x167f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1680-0x16bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16c0-0x16ff */ - 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, /* 0x1700-0x173f */ - 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, /* 0x1740-0x177f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x3f, /* 0x1780-0x17bf */ - 0x40, 0xfe, 0x0f, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x17c0-0x17ff */ - /* 0x1800-0x19ff */ - 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1800-0x183f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1840-0x187f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18c0-0x18ff */ - 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x04, 0x0e, /* 0x1900-0x193f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1940-0x197f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1980-0x19bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x19c0-0x19ff */ - /* 0x1a00-0x1bff */ - 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, /* 0x1a00-0x1a3f */ - 0x00, 0x00, 0x40, 0x7f, 0xe5, 0x1f, 0xf8, 0x9f, /* 0x1a40-0x1a7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1a80-0x1abf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1ac0-0x1aff */ - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x17, /* 0x1b00-0x1b3f */ - 0x04, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x1b40-0x1b7f */ - 0x03, 0x00, 0x00, 0x00, 0x3c, 0x03, 0x00, 0x00, /* 0x1b80-0x1bbf */ - 0x00, 0x00, 0x00, 0x00, 0x40, 0xa3, 0x03, 0x00, /* 0x1bc0-0x1bff */ - /* 0x1c00-0x1dff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xcf, 0x00, /* 0x1c00-0x1c3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c40-0x1c7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c80-0x1cbf */ - 0x00, 0x00, 0xf7, 0xff, 0xfd, 0x21, 0x00, 0x00, /* 0x1cc0-0x1cff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d00-0x1d3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d40-0x1d7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d80-0x1dbf */ - 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xf0, /* 0x1dc0-0x1dff */ - /* 0x2000-0x21ff */ - 0x00, 0xf8, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, /* 0x2000-0x203f */ - 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, /* 0x2040-0x207f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2080-0x20bf */ - 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, /* 0x20c0-0x20ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2100-0x213f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2140-0x217f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2180-0x21bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x21c0-0x21ff */ - /* 0x2c00-0x2dff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c00-0x2c3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c40-0x2c7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c80-0x2cbf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, /* 0x2cc0-0x2cff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d00-0x2d3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x2d40-0x2d7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d80-0x2dbf */ - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* 0x2dc0-0x2dff */ - /* 0x3000-0x31ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* 0x3000-0x303f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3040-0x307f */ - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, /* 0x3080-0x30bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30c0-0x30ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3100-0x313f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3140-0x317f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3180-0x31bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x31c0-0x31ff */ - /* 0xa600-0xa7ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa600-0xa63f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x30, /* 0xa640-0xa67f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa680-0xa6bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, /* 0xa6c0-0xa6ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa700-0xa73f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa740-0xa77f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa780-0xa7bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa7c0-0xa7ff */ - /* 0xa800-0xa9ff */ - 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, /* 0xa800-0xa83f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa840-0xa87f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa880-0xa8bf */ - 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, /* 0xa8c0-0xa8ff */ - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, /* 0xa900-0xa93f */ - 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa940-0xa97f */ - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x13, /* 0xa980-0xa9bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa9c0-0xa9ff */ - /* 0xaa00-0xabff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x00, /* 0xaa00-0xaa3f */ - 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaa40-0xaa7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0xc1, /* 0xaa80-0xaabf */ - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaac0-0xaaff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab00-0xab3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab40-0xab7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab80-0xabbf */ - 0x00, 0x00, 0x00, 0x00, 0x20, 0x21, 0x00, 0x00, /* 0xabc0-0xabff */ - /* 0xfa00-0xfbff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa00-0xfa3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa40-0xfa7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa80-0xfabf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfac0-0xfaff */ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* 0xfb00-0xfb3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb40-0xfb7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb80-0xfbbf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfbc0-0xfbff */ - /* 0xfe00-0xffff */ - 0xff, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, /* 0xfe00-0xfe3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe40-0xfe7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe80-0xfebf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0xfec0-0xfeff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff00-0xff3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff40-0xff7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff80-0xffbf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, /* 0xffc0-0xffff */ - /* 0x10000-0x101ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10000-0x1003f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10040-0x1007f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10080-0x100bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x100c0-0x100ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10100-0x1013f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10140-0x1017f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10180-0x101bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, /* 0x101c0-0x101ff */ - /* 0x10a00-0x10bff */ - 0x6e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, /* 0x10a00-0x10a3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a40-0x10a7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a80-0x10abf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10ac0-0x10aff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b00-0x10b3f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b40-0x10b7f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b80-0x10bbf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10bc0-0x10bff */ - /* 0x11000-0x111ff */ - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, /* 0x11000-0x1103f */ - 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11040-0x1107f */ - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x26, /* 0x11080-0x110bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x110c0-0x110ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11100-0x1113f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11140-0x1117f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11180-0x111bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x111c0-0x111ff */ - /* 0x1d000-0x1d1ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d000-0x1d03f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d040-0x1d07f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d080-0x1d0bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d0c0-0x1d0ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d100-0x1d13f */ - 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0xf8, 0xff, /* 0x1d140-0x1d17f */ - 0xe7, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, /* 0x1d180-0x1d1bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d1c0-0x1d1ff */ - /* 0x1d200-0x1d3ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d200-0x1d23f */ - 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d240-0x1d27f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d280-0x1d2bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d2c0-0x1d2ff */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d300-0x1d33f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d340-0x1d37f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d380-0x1d3bf */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0x1d3c0-0x1d3ff */ -}; -static const signed char nonspacing_table_ind[240] = { - 0, 1, 2, 3, 4, 5, 6, 7, /* 0x0000-0x0fff */ - 8, 9, -1, 10, 11, 12, 13, -1, /* 0x1000-0x1fff */ - 14, -1, -1, -1, -1, -1, 15, -1, /* 0x2000-0x2fff */ - 16, -1, -1, -1, -1, -1, -1, -1, /* 0x3000-0x3fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x4000-0x4fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x5000-0x5fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x6000-0x6fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x7000-0x7fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x8000-0x8fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x9000-0x9fff */ - -1, -1, -1, 17, 18, 19, -1, -1, /* 0xa000-0xafff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb000-0xbfff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc000-0xcfff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd000-0xdfff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe000-0xefff */ - -1, -1, -1, -1, -1, 20, -1, 21, /* 0xf000-0xffff */ - 22, -1, -1, -1, -1, 23, -1, -1, /* 0x10000-0x10fff */ - 24, -1, -1, -1, -1, -1, -1, -1, /* 0x11000-0x11fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x12000-0x12fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x13000-0x13fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x14000-0x14fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x15000-0x15fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x16000-0x16fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x17000-0x17fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x18000-0x18fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x19000-0x19fff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1a000-0x1afff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1b000-0x1bfff */ - -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1c000-0x1cfff */ - 25, 26, -1, -1, -1, -1, -1, -1 /* 0x1d000-0x1dfff */ -}; - -/* Determine number of column positions required for UC. */ -int -uc_width (ucs4_t uc, const char *encoding) -{ - /* Test for non-spacing or control character. */ - if ((uc >> 9) < 240) - { - int ind = nonspacing_table_ind[uc >> 9]; - if (ind >= 0) - if ((nonspacing_table_data[64*ind + ((uc >> 3) & 63)] >> (uc & 7)) & 1) - { - if (uc > 0 && uc < 0xa0) - return -1; - else - return 0; - } - } - else if ((uc >> 9) == (0xe0000 >> 9)) - { - if (uc >= 0xe0100) - { - if (uc <= 0xe01ef) - return 0; - } - else - { - if (uc >= 0xe0020 ? uc <= 0xe007f : uc == 0xe0001) - return 0; - } - } - /* Test for double-width character. - * Generated from "grep '^[^;]\{4,5\};[WF]' EastAsianWidth.txt" - * and "grep '^[^;]\{4,5\};[^WF]' EastAsianWidth.txt" - */ - if (uc >= 0x1100 - && ((uc < 0x1160) /* Hangul Jamo */ - || (uc >= 0x2329 && uc < 0x232b) /* Angle Brackets */ - || (uc >= 0x2e80 && uc < 0xa4d0 /* CJK ... Yi */ - && !(uc == 0x303f) && !(uc >= 0x4dc0 && uc < 0x4e00)) - || (uc >= 0xac00 && uc < 0xd7a4) /* Hangul Syllables */ - || (uc >= 0xf900 && uc < 0xfb00) /* CJK Compatibility Ideographs */ - || (uc >= 0xfe10 && uc < 0xfe20) /* Presentation Forms for Vertical */ - || (uc >= 0xfe30 && uc < 0xfe70) /* CJK Compatibility Forms */ - || (uc >= 0xff00 && uc < 0xff61) /* Fullwidth Forms */ - || (uc >= 0xffe0 && uc < 0xffe7) /* Fullwidth Signs */ - || (uc >= 0x20000 && uc <= 0x2ffff) /* Supplementary Ideographic Plane */ - || (uc >= 0x30000 && uc <= 0x3ffff) /* Tertiary Ideographic Plane */ - ) ) - return 2; - /* In ancient CJK encodings, Cyrillic and most other characters are - double-width as well. */ - if (uc >= 0x00A1 && uc < 0xFF61 && uc != 0x20A9 - && is_cjk_encoding (encoding)) - return 2; - return 1; -} diff --git a/gnulib/lib/unlink.c b/gnulib/lib/unlink.c deleted file mode 100644 index 677d584..0000000 --- a/gnulib/lib/unlink.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Work around unlink bugs. - - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include - -#include -#include -#include -#include - -#include "dosname.h" - -#undef unlink - -/* Remove file NAME. - Return 0 if successful, -1 if not. */ - -int -rpl_unlink (char const *name) -{ - /* Work around Solaris 9 bug where unlink("file/") succeeds. */ - size_t len = strlen (name); - int result = 0; - if (len && ISSLASH (name[len - 1])) - { - /* We can't unlink(2) something if it doesn't exist. If it does - exist, then it resolved to a directory, due to the trailing - slash, and POSIX requires that the unlink attempt to remove - that directory (which would leave the symlink dangling). - Unfortunately, Solaris 9 is one of the platforms where the - root user can unlink directories, and we don't want to - cripple this behavior on real directories, even if it is - seldom needed (at any rate, it's nicer to let coreutils' - unlink(1) give the correct errno for non-root users). But we - don't know whether name was an actual directory, or a symlink - to a directory; and due to the bug of ignoring trailing - slash, Solaris 9 would end up successfully unlinking the - symlink instead of the directory. Technically, we could use - realpath to find the canonical directory name to attempt - deletion on. But that is a lot of work for a corner case; so - we instead just use an lstat on the shortened name, and - reject symlinks with trailing slashes. The root user of - unlink(1) will just have to live with the rule that they - can't delete a directory via a symlink. */ - struct stat st; - result = lstat (name, &st); - if (result == 0) - { - /* Trailing NUL will overwrite the trailing slash. */ - char *short_name = malloc (len); - if (!short_name) - { - errno = EPERM; - return -1; - } - memcpy (short_name, name, len); - while (len && ISSLASH (short_name[len - 1])) - short_name[--len] = '\0'; - if (len && (lstat (short_name, &st) || S_ISLNK (st.st_mode))) - { - free (short_name); - errno = EPERM; - return -1; - } - free (short_name); - } - } - if (!result) - { -#if UNLINK_PARENT_BUG - if (len >= 2 && name[len - 1] == '.' && name[len - 2] == '.' - && (len == 2 || ISSLASH (name[len - 3]))) - { - errno = EISDIR; /* could also use EPERM */ - return -1; - } -#endif - result = unlink (name); - } - return result; -} diff --git a/gnulib/lib/unlinkat.c b/gnulib/lib/unlinkat.c deleted file mode 100644 index fd1c69e..0000000 --- a/gnulib/lib/unlinkat.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Work around unlinkat bugs on Solaris 9. - - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake. */ - -#include - -#include - -#include -#include -#include -#include - -#include "dosname.h" -#include "openat.h" - -#if HAVE_UNLINKAT - -# undef unlinkat - -/* unlinkat without AT_REMOVEDIR does not honor trailing / on Solaris - 9. Solve it in a similar manner to unlink. */ - -int -rpl_unlinkat (int fd, char const *name, int flag) -{ - size_t len; - int result = 0; - /* rmdir behavior has no problems with trailing slash. */ - if (flag & AT_REMOVEDIR) - return unlinkat (fd, name, flag); - - len = strlen (name); - if (len && ISSLASH (name[len - 1])) - { - /* See the lengthy comment in unlink.c why we disobey the POSIX - rule of letting unlink("link-to-dir/") attempt to unlink a - directory. */ - struct stat st; - result = lstatat (fd, name, &st); - if (result == 0) - { - /* Trailing NUL will overwrite the trailing slash. */ - char *short_name = malloc (len); - if (!short_name) - { - errno = EPERM; - return -1; - } - memcpy (short_name, name, len); - while (len && ISSLASH (short_name[len - 1])) - short_name[--len] = '\0'; - if (len && (lstatat (fd, short_name, &st) || S_ISLNK (st.st_mode))) - { - free (short_name); - errno = EPERM; - return -1; - } - free (short_name); - } - } - if (!result) - result = unlinkat (fd, name, flag); - return result; -} - -#else /* !HAVE_UNLINKAT */ - -/* Replacement for Solaris' function by the same name. - - First, try to simulate it via (unlink|rmdir) ("/proc/self/fd/FD/FILE"). - Failing that, simulate it via save_cwd/fchdir/(unlink|rmdir)/restore_cwd. - If either the save_cwd or the restore_cwd fails (relatively unlikely), - then give a diagnostic and exit nonzero. - Otherwise, this function works just like Solaris' unlinkat. */ - -# define AT_FUNC_NAME unlinkat -# define AT_FUNC_F1 rmdir -# define AT_FUNC_F2 unlink -# define AT_FUNC_USE_F1_COND AT_REMOVEDIR -# define AT_FUNC_POST_FILE_PARAM_DECLS , int flag -# define AT_FUNC_POST_FILE_ARGS /* empty */ -# include "at-func.c" -# undef AT_FUNC_NAME -# undef AT_FUNC_F1 -# undef AT_FUNC_F2 -# undef AT_FUNC_USE_F1_COND -# undef AT_FUNC_POST_FILE_PARAM_DECLS -# undef AT_FUNC_POST_FILE_ARGS - -#endif /* !HAVE_UNLINKAT */ diff --git a/gnulib/lib/unsetenv.c b/gnulib/lib/unsetenv.c deleted file mode 100644 index 215bba0..0000000 --- a/gnulib/lib/unsetenv.c +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (C) 1992, 1995-2002, 2005-2011 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 under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc - optimizes away the name == NULL test below. */ -#define _GL_ARG_NONNULL(params) - -/* Specification. */ -#include - -#include -#if !_LIBC -# define __set_errno(ev) ((errno) = (ev)) -#endif - -#include -#include - -#if !_LIBC -# define __environ environ -#endif - -#if _LIBC -/* This lock protects against simultaneous modifications of `environ'. */ -# include -__libc_lock_define_initialized (static, envlock) -# define LOCK __libc_lock_lock (envlock) -# define UNLOCK __libc_lock_unlock (envlock) -#else -# define LOCK -# define UNLOCK -#endif - -/* In the GNU C library we must keep the namespace clean. */ -#ifdef _LIBC -# define unsetenv __unsetenv -#endif - -#if _LIBC || !HAVE_UNSETENV - -int -unsetenv (const char *name) -{ - size_t len; - char **ep; - - if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) - { - __set_errno (EINVAL); - return -1; - } - - len = strlen (name); - - LOCK; - - ep = __environ; - while (*ep != NULL) - if (!strncmp (*ep, name, len) && (*ep)[len] == '=') - { - /* Found it. Remove this pointer by moving later ones back. */ - char **dp = ep; - - do - dp[0] = dp[1]; - while (*dp++); - /* Continue the loop in case NAME appears again. */ - } - else - ++ep; - - UNLOCK; - - return 0; -} - -#ifdef _LIBC -# undef unsetenv -weak_alias (__unsetenv, unsetenv) -#endif - -#else /* HAVE_UNSETENV */ - -# undef unsetenv - -/* Call the underlying unsetenv, in case there is hidden bookkeeping - that needs updating beyond just modifying environ. */ -int -rpl_unsetenv (const char *name) -{ - int result = 0; - if (!name || !*name || strchr (name, '=')) - { - errno = EINVAL; - return -1; - } - while (getenv (name)) -# if !VOID_UNSETENV - result = -# endif - unsetenv (name); - return result; -} - -#endif /* HAVE_UNSETENV */ diff --git a/gnulib/lib/vasnprintf.c b/gnulib/lib/vasnprintf.c deleted file mode 100644 index 3f2e91d..0000000 --- a/gnulib/lib/vasnprintf.c +++ /dev/null @@ -1,5578 +0,0 @@ -/* vsprintf with automatic memory allocation. - Copyright (C) 1999, 2002-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This file can be parametrized with the following macros: - VASNPRINTF The name of the function being defined. - FCHAR_T The element type of the format string. - DCHAR_T The element type of the destination (result) string. - FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters - in the format string are ASCII. MUST be set if - FCHAR_T and DCHAR_T are not the same type. - DIRECTIVE Structure denoting a format directive. - Depends on FCHAR_T. - DIRECTIVES Structure denoting the set of format directives of a - format string. Depends on FCHAR_T. - PRINTF_PARSE Function that parses a format string. - Depends on FCHAR_T. - DCHAR_CPY memcpy like function for DCHAR_T[] arrays. - DCHAR_SET memset like function for DCHAR_T[] arrays. - DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. - SNPRINTF The system's snprintf (or similar) function. - This may be either snprintf or swprintf. - TCHAR_T The element type of the argument and result string - of the said SNPRINTF function. This may be either - char or wchar_t. The code exploits that - sizeof (TCHAR_T) | sizeof (DCHAR_T) and - alignof (TCHAR_T) <= alignof (DCHAR_T). - DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. - DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. - DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. - DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. - DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ - -/* Tell glibc's to provide a prototype for snprintf(). - This must come before because may include - , and once has been included, it's too late. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif - -#ifndef VASNPRINTF -# include -#endif -#ifndef IN_LIBINTL -# include -#endif - -/* Specification. */ -#ifndef VASNPRINTF -# if WIDE_CHAR_VERSION -# include "vasnwprintf.h" -# else -# include "vasnprintf.h" -# endif -#endif - -#include /* localeconv() */ -#include /* snprintf(), sprintf() */ -#include /* abort(), malloc(), realloc(), free() */ -#include /* memcpy(), strlen() */ -#include /* errno */ -#include /* CHAR_BIT */ -#include /* DBL_MAX_EXP, LDBL_MAX_EXP */ -#if HAVE_NL_LANGINFO -# include -#endif -#ifndef VASNPRINTF -# if WIDE_CHAR_VERSION -# include "wprintf-parse.h" -# else -# include "printf-parse.h" -# endif -#endif - -/* Checked size_t computations. */ -#include "xsize.h" - -#include "verify.h" - -#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL -# include -# include "float+.h" -#endif - -#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL -# include -# include "isnand-nolibm.h" -#endif - -#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL -# include -# include "isnanl-nolibm.h" -# include "fpucw.h" -#endif - -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL -# include -# include "isnand-nolibm.h" -# include "printf-frexp.h" -#endif - -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL -# include -# include "isnanl-nolibm.h" -# include "printf-frexpl.h" -# include "fpucw.h" -#endif - -/* Default parameters. */ -#ifndef VASNPRINTF -# if WIDE_CHAR_VERSION -# define VASNPRINTF vasnwprintf -# define FCHAR_T wchar_t -# define DCHAR_T wchar_t -# define TCHAR_T wchar_t -# define DCHAR_IS_TCHAR 1 -# define DIRECTIVE wchar_t_directive -# define DIRECTIVES wchar_t_directives -# define PRINTF_PARSE wprintf_parse -# define DCHAR_CPY wmemcpy -# define DCHAR_SET wmemset -# else -# define VASNPRINTF vasnprintf -# define FCHAR_T char -# define DCHAR_T char -# define TCHAR_T char -# define DCHAR_IS_TCHAR 1 -# define DIRECTIVE char_directive -# define DIRECTIVES char_directives -# define PRINTF_PARSE printf_parse -# define DCHAR_CPY memcpy -# define DCHAR_SET memset -# endif -#endif -#if WIDE_CHAR_VERSION - /* TCHAR_T is wchar_t. */ -# define USE_SNPRINTF 1 -# if HAVE_DECL__SNWPRINTF - /* On Windows, the function swprintf() has a different signature than - on Unix; we use the function _snwprintf() or - on mingw - snwprintf() - instead. The mingw function snwprintf() has fewer bugs than the - MSVCRT function _snwprintf(), so prefer that. */ -# if defined __MINGW32__ -# define SNPRINTF snwprintf -# else -# define SNPRINTF _snwprintf -# endif -# else - /* Unix. */ -# define SNPRINTF swprintf -# endif -#else - /* TCHAR_T is char. */ - /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. - But don't use it on BeOS, since BeOS snprintf produces no output if the - size argument is >= 0x3000000. - Also don't use it on Linux libc5, since there snprintf with size = 1 - writes any output without bounds, like sprintf. */ -# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1) -# define USE_SNPRINTF 1 -# else -# define USE_SNPRINTF 0 -# endif -# if HAVE_DECL__SNPRINTF - /* Windows. The mingw function snprintf() has fewer bugs than the MSVCRT - function _snprintf(), so prefer that. */ -# if defined __MINGW32__ -# define SNPRINTF snprintf - /* Here we need to call the native snprintf, not rpl_snprintf. */ -# undef snprintf -# else -# define SNPRINTF _snprintf -# endif -# else - /* Unix. */ -# define SNPRINTF snprintf - /* Here we need to call the native snprintf, not rpl_snprintf. */ -# undef snprintf -# endif -#endif -/* Here we need to call the native sprintf, not rpl_sprintf. */ -#undef sprintf - -/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized" - warnings in this file. Use -Dlint to suppress them. */ -#ifdef lint -# define IF_LINT(Code) Code -#else -# define IF_LINT(Code) /* empty */ -#endif - -/* Avoid some warnings from "gcc -Wshadow". - This file doesn't use the exp() and remainder() functions. */ -#undef exp -#define exp expo -#undef remainder -#define remainder rem - -#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION -# if (HAVE_STRNLEN && !defined _AIX) -# define local_strnlen strnlen -# else -# ifndef local_strnlen_defined -# define local_strnlen_defined 1 -static size_t -local_strnlen (const char *string, size_t maxlen) -{ - const char *end = memchr (string, '\0', maxlen); - return end ? (size_t) (end - string) : maxlen; -} -# endif -# endif -#endif - -#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T -# if HAVE_WCSLEN -# define local_wcslen wcslen -# else - /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid - a dependency towards this library, here is a local substitute. - Define this substitute only once, even if this file is included - twice in the same compilation unit. */ -# ifndef local_wcslen_defined -# define local_wcslen_defined 1 -static size_t -local_wcslen (const wchar_t *s) -{ - const wchar_t *ptr; - - for (ptr = s; *ptr != (wchar_t) 0; ptr++) - ; - return ptr - s; -} -# endif -# endif -#endif - -#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T && WIDE_CHAR_VERSION -# if HAVE_WCSNLEN -# define local_wcsnlen wcsnlen -# else -# ifndef local_wcsnlen_defined -# define local_wcsnlen_defined 1 -static size_t -local_wcsnlen (const wchar_t *s, size_t maxlen) -{ - const wchar_t *ptr; - - for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--) - ; - return ptr - s; -} -# endif -# endif -#endif - -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL -/* Determine the decimal-point character according to the current locale. */ -# ifndef decimal_point_char_defined -# define decimal_point_char_defined 1 -static char -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 - 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__)) - point = nl_langinfo (RADIXCHAR); -# elif 1 - char pointbuf[5]; - sprintf (pointbuf, "%#.0f", 1.0); - point = &pointbuf[1]; -# else - point = localeconv () -> decimal_point; -# endif - /* The decimal point is always a single byte: either '.' or ','. */ - return (point[0] != '\0' ? point[0] : '.'); -} -# endif -#endif - -#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL - -/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ -static int -is_infinite_or_zero (double x) -{ - return isnand (x) || x + x == x; -} - -#endif - -#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL - -/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ -static int -is_infinite_or_zerol (long double x) -{ - return isnanl (x) || x + x == x; -} - -#endif - -#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL - -/* Converting 'long double' to decimal without rare rounding bugs requires - real bignums. We use the naming conventions of GNU gmp, but vastly simpler - (and slower) algorithms. */ - -typedef unsigned int mp_limb_t; -# define GMP_LIMB_BITS 32 -verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS); - -typedef unsigned long long mp_twolimb_t; -# define GMP_TWOLIMB_BITS 64 -verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS); - -/* Representation of a bignum >= 0. */ -typedef struct -{ - size_t nlimbs; - mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ -} mpn_t; - -/* Compute the product of two bignums >= 0. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -multiply (mpn_t src1, mpn_t src2, mpn_t *dest) -{ - const mp_limb_t *p1; - const mp_limb_t *p2; - size_t len1; - size_t len2; - - if (src1.nlimbs <= src2.nlimbs) - { - len1 = src1.nlimbs; - p1 = src1.limbs; - len2 = src2.nlimbs; - p2 = src2.limbs; - } - else - { - len1 = src2.nlimbs; - p1 = src2.limbs; - len2 = src1.nlimbs; - p2 = src1.limbs; - } - /* Now 0 <= len1 <= len2. */ - if (len1 == 0) - { - /* src1 or src2 is zero. */ - dest->nlimbs = 0; - dest->limbs = (mp_limb_t *) malloc (1); - } - else - { - /* Here 1 <= len1 <= len2. */ - size_t dlen; - mp_limb_t *dp; - size_t k, i, j; - - dlen = len1 + len2; - dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); - if (dp == NULL) - return NULL; - for (k = len2; k > 0; ) - dp[--k] = 0; - for (i = 0; i < len1; i++) - { - mp_limb_t digit1 = p1[i]; - mp_twolimb_t carry = 0; - for (j = 0; j < len2; j++) - { - mp_limb_t digit2 = p2[j]; - carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; - carry += dp[i + j]; - dp[i + j] = (mp_limb_t) carry; - carry = carry >> GMP_LIMB_BITS; - } - dp[i + len2] = (mp_limb_t) carry; - } - /* Normalise. */ - while (dlen > 0 && dp[dlen - 1] == 0) - dlen--; - dest->nlimbs = dlen; - dest->limbs = dp; - } - return dest->limbs; -} - -/* Compute the quotient of a bignum a >= 0 and a bignum b > 0. - a is written as a = q * b + r with 0 <= r < b. q is the quotient, r - the remainder. - Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, - q is incremented. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -divide (mpn_t a, mpn_t b, mpn_t *q) -{ - /* Algorithm: - First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] - with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). - If m=n=1, perform a single-precision division: - r:=0, j:=m, - while j>0 do - {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = - = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r=n>1, perform a multiple-precision division: - We have a/b < beta^(m-n+1). - s:=intDsize-1-(highest bit in b[n-1]), 0<=s=beta/2. - For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} - Compute q* : - q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). - In case of overflow (q* >= beta) set q* := beta-1. - Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] - and c3 := b[n-2] * q*. - {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow - occurred. Furthermore 0 <= c3 < beta^2. - If there was overflow and - r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, - the next test can be skipped.} - While c3 > c2, {Here 0 <= c2 < c3 < beta^2} - Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. - If q* > 0: - Put r := r - b * q* * beta^j. In detail: - [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. - hence: u:=0, for i:=0 to n-1 do - u := u + q* * b[i], - r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), - u:=u div beta (+ 1, if carry in subtraction) - r[n+j]:=r[n+j]-u. - {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 - < q* + 1 <= beta, - the carry u does not overflow.} - If a negative carry occurs, put q* := q* - 1 - and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. - Set q[j] := q*. - Normalise [q[m-n],..,q[0]]; this yields the quotient q. - Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the - rest r. - The room for q[j] can be allocated at the memory location of r[n+j]. - Finally, round-to-even: - Shift r left by 1 bit. - If r > b or if r = b and q[0] is odd, q := q+1. - */ - const mp_limb_t *a_ptr = a.limbs; - size_t a_len = a.nlimbs; - const mp_limb_t *b_ptr = b.limbs; - size_t b_len = b.nlimbs; - mp_limb_t *roomptr; - mp_limb_t *tmp_roomptr = NULL; - mp_limb_t *q_ptr; - size_t q_len; - mp_limb_t *r_ptr; - size_t r_len; - - /* Allocate room for a_len+2 digits. - (Need a_len+1 digits for the real division and 1 more digit for the - final rounding of q.) */ - roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); - if (roomptr == NULL) - return NULL; - - /* Normalise a. */ - while (a_len > 0 && a_ptr[a_len - 1] == 0) - a_len--; - - /* Normalise b. */ - for (;;) - { - if (b_len == 0) - /* Division by zero. */ - abort (); - if (b_ptr[b_len - 1] == 0) - b_len--; - else - break; - } - - /* Here m = a_len >= 0 and n = b_len > 0. */ - - if (a_len < b_len) - { - /* m beta^(m-2) <= a/b < beta^m */ - r_ptr = roomptr; - q_ptr = roomptr + 1; - { - mp_limb_t den = b_ptr[0]; - mp_limb_t remainder = 0; - const mp_limb_t *sourceptr = a_ptr + a_len; - mp_limb_t *destptr = q_ptr + a_len; - size_t count; - for (count = a_len; count > 0; count--) - { - mp_twolimb_t num = - ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; - *--destptr = num / den; - remainder = num % den; - } - /* Normalise and store r. */ - if (remainder > 0) - { - r_ptr[0] = remainder; - r_len = 1; - } - else - r_len = 0; - /* Normalise q. */ - q_len = a_len; - if (q_ptr[q_len - 1] == 0) - q_len--; - } - } - else - { - /* n>1: multiple precision division. - beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> - beta^(m-n-1) <= a/b < beta^(m-n+1). */ - /* Determine s. */ - size_t s; - { - mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ - s = 31; - if (msd >= 0x10000) - { - msd = msd >> 16; - s -= 16; - } - if (msd >= 0x100) - { - msd = msd >> 8; - s -= 8; - } - if (msd >= 0x10) - { - msd = msd >> 4; - s -= 4; - } - if (msd >= 0x4) - { - msd = msd >> 2; - s -= 2; - } - if (msd >= 0x2) - { - msd = msd >> 1; - s -= 1; - } - } - /* 0 <= s < GMP_LIMB_BITS. - Copy b, shifting it left by s bits. */ - if (s > 0) - { - tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); - if (tmp_roomptr == NULL) - { - free (roomptr); - return NULL; - } - { - const mp_limb_t *sourceptr = b_ptr; - mp_limb_t *destptr = tmp_roomptr; - mp_twolimb_t accu = 0; - size_t count; - for (count = b_len; count > 0; count--) - { - accu += (mp_twolimb_t) *sourceptr++ << s; - *destptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - /* accu must be zero, since that was how s was determined. */ - if (accu != 0) - abort (); - } - b_ptr = tmp_roomptr; - } - /* Copy a, shifting it left by s bits, yields r. - Memory layout: - At the beginning: r = roomptr[0..a_len], - at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ - r_ptr = roomptr; - if (s == 0) - { - memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); - r_ptr[a_len] = 0; - } - else - { - const mp_limb_t *sourceptr = a_ptr; - mp_limb_t *destptr = r_ptr; - mp_twolimb_t accu = 0; - size_t count; - for (count = a_len; count > 0; count--) - { - accu += (mp_twolimb_t) *sourceptr++ << s; - *destptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - *destptr++ = (mp_limb_t) accu; - } - q_ptr = roomptr + b_len; - q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ - { - size_t j = a_len - b_len; /* m-n */ - mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ - mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ - mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ - ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; - /* Division loop, traversed m-n+1 times. - j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ - for (;;) - { - mp_limb_t q_star; - mp_limb_t c1; - if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ - { - /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ - mp_twolimb_t num = - ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) - | r_ptr[j + b_len - 1]; - q_star = num / b_msd; - c1 = num % b_msd; - } - else - { - /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ - q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ - /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta - <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta - <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) - {<= beta !}. - If yes, jump directly to the subtraction loop. - (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta - <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ - if (r_ptr[j + b_len] > b_msd - || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) - /* r[j+n] >= b[n-1]+1 or - r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a - carry. */ - goto subtract; - } - /* q_star = q*, - c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, 0, decrease it by - b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 - this can happen only twice. */ - if (c3 > c2) - { - q_star = q_star - 1; /* q* := q* - 1 */ - if (c3 - c2 > b_msdd) - q_star = q_star - 1; /* q* := q* - 1 */ - } - } - if (q_star > 0) - subtract: - { - /* Subtract r := r - b * q* * beta^j. */ - mp_limb_t cr; - { - const mp_limb_t *sourceptr = b_ptr; - mp_limb_t *destptr = r_ptr + j; - mp_twolimb_t carry = 0; - size_t count; - for (count = b_len; count > 0; count--) - { - /* Here 0 <= carry <= q*. */ - carry = - carry - + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ - + (mp_limb_t) ~(*destptr); - /* Here 0 <= carry <= beta*q* + beta-1. */ - *destptr++ = ~(mp_limb_t) carry; - carry = carry >> GMP_LIMB_BITS; /* <= q* */ - } - cr = (mp_limb_t) carry; - } - /* Subtract cr from r_ptr[j + b_len], then forget about - r_ptr[j + b_len]. */ - if (cr > r_ptr[j + b_len]) - { - /* Subtraction gave a carry. */ - q_star = q_star - 1; /* q* := q* - 1 */ - /* Add b back. */ - { - const mp_limb_t *sourceptr = b_ptr; - mp_limb_t *destptr = r_ptr + j; - mp_limb_t carry = 0; - size_t count; - for (count = b_len; count > 0; count--) - { - mp_limb_t source1 = *sourceptr++; - mp_limb_t source2 = *destptr; - *destptr++ = source1 + source2 + carry; - carry = - (carry - ? source1 >= (mp_limb_t) ~source2 - : source1 > (mp_limb_t) ~source2); - } - } - /* Forget about the carry and about r[j+n]. */ - } - } - /* q* is determined. Store it as q[j]. */ - q_ptr[j] = q_star; - if (j == 0) - break; - j--; - } - } - r_len = b_len; - /* Normalise q. */ - if (q_ptr[q_len - 1] == 0) - q_len--; -# if 0 /* Not needed here, since we need r only to compare it with b/2, and - b is shifted left by s bits. */ - /* Shift r right by s bits. */ - if (s > 0) - { - mp_limb_t ptr = r_ptr + r_len; - mp_twolimb_t accu = 0; - size_t count; - for (count = r_len; count > 0; count--) - { - accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; - accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); - *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); - } - } -# endif - /* Normalise r. */ - while (r_len > 0 && r_ptr[r_len - 1] == 0) - r_len--; - } - /* Compare r << 1 with b. */ - if (r_len > b_len) - goto increment_q; - { - size_t i; - for (i = b_len;;) - { - mp_limb_t r_i = - (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) - | (i < r_len ? r_ptr[i] << 1 : 0); - mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); - if (r_i > b_i) - goto increment_q; - if (r_i < b_i) - goto keep_q; - if (i == 0) - break; - i--; - } - } - if (q_len > 0 && ((q_ptr[0] & 1) != 0)) - /* q is odd. */ - increment_q: - { - size_t i; - for (i = 0; i < q_len; i++) - if (++(q_ptr[i]) != 0) - goto keep_q; - q_ptr[q_len++] = 1; - } - keep_q: - if (tmp_roomptr != NULL) - free (tmp_roomptr); - q->limbs = q_ptr; - q->nlimbs = q_len; - return roomptr; -} - -/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal - representation. - Destroys the contents of a. - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -convert_to_decimal (mpn_t a, size_t extra_zeroes) -{ - mp_limb_t *a_ptr = a.limbs; - size_t a_len = a.nlimbs; - /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ - size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); - char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); - if (c_ptr != NULL) - { - char *d_ptr = c_ptr; - for (; extra_zeroes > 0; extra_zeroes--) - *d_ptr++ = '0'; - while (a_len > 0) - { - /* Divide a by 10^9, in-place. */ - mp_limb_t remainder = 0; - mp_limb_t *ptr = a_ptr + a_len; - size_t count; - for (count = a_len; count > 0; count--) - { - mp_twolimb_t num = - ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; - *ptr = num / 1000000000; - remainder = num % 1000000000; - } - /* Store the remainder as 9 decimal digits. */ - for (count = 9; count > 0; count--) - { - *d_ptr++ = '0' + (remainder % 10); - remainder = remainder / 10; - } - /* Normalize a. */ - if (a_ptr[a_len - 1] == 0) - a_len--; - } - /* Remove leading zeroes. */ - while (d_ptr > c_ptr && d_ptr[-1] == '0') - d_ptr--; - /* But keep at least one zero. */ - if (d_ptr == c_ptr) - *d_ptr++ = '0'; - /* Terminate the string. */ - *d_ptr = '\0'; - } - return c_ptr; -} - -# if NEED_PRINTF_LONG_DOUBLE - -/* Assuming x is finite and >= 0: - write x as x = 2^e * m, where m is a bignum. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -decode_long_double (long double x, int *ep, mpn_t *mp) -{ - mpn_t m; - int exp; - long double y; - size_t i; - - /* Allocate memory for result. */ - m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; - m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); - if (m.limbs == NULL) - return NULL; - /* Split into exponential part and mantissa. */ - y = frexpl (x, &exp); - if (!(y >= 0.0L && y < 1.0L)) - abort (); - /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the - latter is an integer. */ - /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs. - I'm not sure whether it's safe to cast a 'long double' value between - 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only - 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', - doesn't matter). */ -# if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 -# if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); - hi = (int) y; - y -= hi; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } -# else - { - mp_limb_t d; - y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); - d = (int) y; - y -= d; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; - } -# endif -# endif - for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - hi = (int) y; - y -= hi; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } -# if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess - precision. */ - if (!(y == 0.0L)) - abort (); -# endif - /* Normalise. */ - while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) - m.nlimbs--; - *mp = m; - *ep = exp - LDBL_MANT_BIT; - return m.limbs; -} - -# endif - -# if NEED_PRINTF_DOUBLE - -/* Assuming x is finite and >= 0: - write x as x = 2^e * m, where m is a bignum. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -decode_double (double x, int *ep, mpn_t *mp) -{ - mpn_t m; - int exp; - double y; - size_t i; - - /* Allocate memory for result. */ - m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; - m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); - if (m.limbs == NULL) - return NULL; - /* Split into exponential part and mantissa. */ - y = frexp (x, &exp); - if (!(y >= 0.0 && y < 1.0)) - abort (); - /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the - latter is an integer. */ - /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs. - I'm not sure whether it's safe to cast a 'double' value between - 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only - 'double' values between 0 and 2^16 (to 'unsigned int' or 'int', - doesn't matter). */ -# if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0 -# if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); - hi = (int) y; - y -= hi; - if (!(y >= 0.0 && y < 1.0)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0 && y < 1.0)) - abort (); - m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } -# else - { - mp_limb_t d; - y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); - d = (int) y; - y -= d; - if (!(y >= 0.0 && y < 1.0)) - abort (); - m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d; - } -# endif -# endif - for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - hi = (int) y; - y -= hi; - if (!(y >= 0.0 && y < 1.0)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0 && y < 1.0)) - abort (); - m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } - if (!(y == 0.0)) - abort (); - /* Normalise. */ - while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) - m.nlimbs--; - *mp = m; - *ep = exp - DBL_MANT_BIT; - return m.limbs; -} - -# endif - -/* Assuming x = 2^e * m is finite and >= 0, and n is an integer: - Returns the decimal representation of round (x * 10^n). - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) -{ - int s; - size_t extra_zeroes; - unsigned int abs_n; - unsigned int abs_s; - mp_limb_t *pow5_ptr; - size_t pow5_len; - unsigned int s_limbs; - unsigned int s_bits; - mpn_t pow5; - mpn_t z; - void *z_memory; - char *digits; - - if (memory == NULL) - return NULL; - /* x = 2^e * m, hence - y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) - = round (2^s * 5^n * m). */ - s = e + n; - extra_zeroes = 0; - /* Factor out a common power of 10 if possible. */ - if (s > 0 && n > 0) - { - extra_zeroes = (s < n ? s : n); - s -= extra_zeroes; - n -= extra_zeroes; - } - /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. - Before converting to decimal, we need to compute - z = round (2^s * 5^n * m). */ - /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same - sign. 2.322 is slightly larger than log(5)/log(2). */ - abs_n = (n >= 0 ? n : -n); - abs_s = (s >= 0 ? s : -s); - pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 - + abs_s / GMP_LIMB_BITS + 1) - * sizeof (mp_limb_t)); - if (pow5_ptr == NULL) - { - free (memory); - return NULL; - } - /* Initialize with 1. */ - pow5_ptr[0] = 1; - pow5_len = 1; - /* Multiply with 5^|n|. */ - if (abs_n > 0) - { - static mp_limb_t const small_pow5[13 + 1] = - { - 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, - 48828125, 244140625, 1220703125 - }; - unsigned int n13; - for (n13 = 0; n13 <= abs_n; n13 += 13) - { - mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; - size_t j; - mp_twolimb_t carry = 0; - for (j = 0; j < pow5_len; j++) - { - mp_limb_t digit2 = pow5_ptr[j]; - carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; - pow5_ptr[j] = (mp_limb_t) carry; - carry = carry >> GMP_LIMB_BITS; - } - if (carry > 0) - pow5_ptr[pow5_len++] = (mp_limb_t) carry; - } - } - s_limbs = abs_s / GMP_LIMB_BITS; - s_bits = abs_s % GMP_LIMB_BITS; - if (n >= 0 ? s >= 0 : s <= 0) - { - /* Multiply with 2^|s|. */ - if (s_bits > 0) - { - mp_limb_t *ptr = pow5_ptr; - mp_twolimb_t accu = 0; - size_t count; - for (count = pow5_len; count > 0; count--) - { - accu += (mp_twolimb_t) *ptr << s_bits; - *ptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - if (accu > 0) - { - *ptr = (mp_limb_t) accu; - pow5_len++; - } - } - if (s_limbs > 0) - { - size_t count; - for (count = pow5_len; count > 0;) - { - count--; - pow5_ptr[s_limbs + count] = pow5_ptr[count]; - } - for (count = s_limbs; count > 0;) - { - count--; - pow5_ptr[count] = 0; - } - pow5_len += s_limbs; - } - pow5.limbs = pow5_ptr; - pow5.nlimbs = pow5_len; - if (n >= 0) - { - /* Multiply m with pow5. No division needed. */ - z_memory = multiply (m, pow5, &z); - } - else - { - /* Divide m by pow5 and round. */ - z_memory = divide (m, pow5, &z); - } - } - else - { - pow5.limbs = pow5_ptr; - pow5.nlimbs = pow5_len; - if (n >= 0) - { - /* n >= 0, s < 0. - Multiply m with pow5, then divide by 2^|s|. */ - mpn_t numerator; - mpn_t denominator; - void *tmp_memory; - tmp_memory = multiply (m, pow5, &numerator); - if (tmp_memory == NULL) - { - free (pow5_ptr); - free (memory); - return NULL; - } - /* Construct 2^|s|. */ - { - mp_limb_t *ptr = pow5_ptr + pow5_len; - size_t i; - for (i = 0; i < s_limbs; i++) - ptr[i] = 0; - ptr[s_limbs] = (mp_limb_t) 1 << s_bits; - denominator.limbs = ptr; - denominator.nlimbs = s_limbs + 1; - } - z_memory = divide (numerator, denominator, &z); - free (tmp_memory); - } - else - { - /* n < 0, s > 0. - Multiply m with 2^s, then divide by pow5. */ - mpn_t numerator; - mp_limb_t *num_ptr; - num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) - * sizeof (mp_limb_t)); - if (num_ptr == NULL) - { - free (pow5_ptr); - free (memory); - return NULL; - } - { - mp_limb_t *destptr = num_ptr; - { - size_t i; - for (i = 0; i < s_limbs; i++) - *destptr++ = 0; - } - if (s_bits > 0) - { - const mp_limb_t *sourceptr = m.limbs; - mp_twolimb_t accu = 0; - size_t count; - for (count = m.nlimbs; count > 0; count--) - { - accu += (mp_twolimb_t) *sourceptr++ << s_bits; - *destptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - if (accu > 0) - *destptr++ = (mp_limb_t) accu; - } - else - { - const mp_limb_t *sourceptr = m.limbs; - size_t count; - for (count = m.nlimbs; count > 0; count--) - *destptr++ = *sourceptr++; - } - numerator.limbs = num_ptr; - numerator.nlimbs = destptr - num_ptr; - } - z_memory = divide (numerator, pow5, &z); - free (num_ptr); - } - } - free (pow5_ptr); - free (memory); - - /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ - - if (z_memory == NULL) - return NULL; - digits = convert_to_decimal (z, extra_zeroes); - free (z_memory); - return digits; -} - -# if NEED_PRINTF_LONG_DOUBLE - -/* Assuming x is finite and >= 0, and n is an integer: - Returns the decimal representation of round (x * 10^n). - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -scale10_round_decimal_long_double (long double x, int n) -{ - int e IF_LINT(= 0); - mpn_t m; - void *memory = decode_long_double (x, &e, &m); - return scale10_round_decimal_decoded (e, m, memory, n); -} - -# endif - -# if NEED_PRINTF_DOUBLE - -/* Assuming x is finite and >= 0, and n is an integer: - Returns the decimal representation of round (x * 10^n). - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -scale10_round_decimal_double (double x, int n) -{ - int e IF_LINT(= 0); - mpn_t m; - void *memory = decode_double (x, &e, &m); - return scale10_round_decimal_decoded (e, m, memory, n); -} - -# endif - -# if NEED_PRINTF_LONG_DOUBLE - -/* Assuming x is finite and > 0: - Return an approximation for n with 10^n <= x < 10^(n+1). - The approximation is usually the right n, but may be off by 1 sometimes. */ -static int -floorlog10l (long double x) -{ - int exp; - long double y; - double z; - double l; - - /* Split into exponential part and mantissa. */ - y = frexpl (x, &exp); - if (!(y >= 0.0L && y < 1.0L)) - abort (); - if (y == 0.0L) - return INT_MIN; - if (y < 0.5L) - { - while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) - { - y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); - exp -= GMP_LIMB_BITS; - } - if (y < (1.0L / (1 << 16))) - { - y *= 1.0L * (1 << 16); - exp -= 16; - } - if (y < (1.0L / (1 << 8))) - { - y *= 1.0L * (1 << 8); - exp -= 8; - } - if (y < (1.0L / (1 << 4))) - { - y *= 1.0L * (1 << 4); - exp -= 4; - } - if (y < (1.0L / (1 << 2))) - { - y *= 1.0L * (1 << 2); - exp -= 2; - } - if (y < (1.0L / (1 << 1))) - { - y *= 1.0L * (1 << 1); - exp -= 1; - } - } - if (!(y >= 0.5L && y < 1.0L)) - abort (); - /* Compute an approximation for l = log2(x) = exp + log2(y). */ - l = exp; - z = y; - if (z < 0.70710678118654752444) - { - z *= 1.4142135623730950488; - l -= 0.5; - } - if (z < 0.8408964152537145431) - { - z *= 1.1892071150027210667; - l -= 0.25; - } - if (z < 0.91700404320467123175) - { - z *= 1.0905077326652576592; - l -= 0.125; - } - if (z < 0.9576032806985736469) - { - z *= 1.0442737824274138403; - l -= 0.0625; - } - /* Now 0.95 <= z <= 1.01. */ - z = 1 - z; - /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) - Four terms are enough to get an approximation with error < 10^-7. */ - l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); - /* Finally multiply with log(2)/log(10), yields an approximation for - log10(x). */ - l *= 0.30102999566398119523; - /* Round down to the next integer. */ - return (int) l + (l < 0 ? -1 : 0); -} - -# endif - -# if NEED_PRINTF_DOUBLE - -/* Assuming x is finite and > 0: - Return an approximation for n with 10^n <= x < 10^(n+1). - The approximation is usually the right n, but may be off by 1 sometimes. */ -static int -floorlog10 (double x) -{ - int exp; - double y; - double z; - double l; - - /* Split into exponential part and mantissa. */ - y = frexp (x, &exp); - if (!(y >= 0.0 && y < 1.0)) - abort (); - if (y == 0.0) - return INT_MIN; - if (y < 0.5) - { - while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) - { - y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); - exp -= GMP_LIMB_BITS; - } - if (y < (1.0 / (1 << 16))) - { - y *= 1.0 * (1 << 16); - exp -= 16; - } - if (y < (1.0 / (1 << 8))) - { - y *= 1.0 * (1 << 8); - exp -= 8; - } - if (y < (1.0 / (1 << 4))) - { - y *= 1.0 * (1 << 4); - exp -= 4; - } - if (y < (1.0 / (1 << 2))) - { - y *= 1.0 * (1 << 2); - exp -= 2; - } - if (y < (1.0 / (1 << 1))) - { - y *= 1.0 * (1 << 1); - exp -= 1; - } - } - if (!(y >= 0.5 && y < 1.0)) - abort (); - /* Compute an approximation for l = log2(x) = exp + log2(y). */ - l = exp; - z = y; - if (z < 0.70710678118654752444) - { - z *= 1.4142135623730950488; - l -= 0.5; - } - if (z < 0.8408964152537145431) - { - z *= 1.1892071150027210667; - l -= 0.25; - } - if (z < 0.91700404320467123175) - { - z *= 1.0905077326652576592; - l -= 0.125; - } - if (z < 0.9576032806985736469) - { - z *= 1.0442737824274138403; - l -= 0.0625; - } - /* Now 0.95 <= z <= 1.01. */ - z = 1 - z; - /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) - Four terms are enough to get an approximation with error < 10^-7. */ - l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); - /* Finally multiply with log(2)/log(10), yields an approximation for - log10(x). */ - l *= 0.30102999566398119523; - /* Round down to the next integer. */ - return (int) l + (l < 0 ? -1 : 0); -} - -# endif - -/* Tests whether a string of digits consists of exactly PRECISION zeroes and - a single '1' digit. */ -static int -is_borderline (const char *digits, size_t precision) -{ - for (; precision > 0; precision--, digits++) - if (*digits != '0') - return 0; - if (*digits != '1') - return 0; - digits++; - return *digits == '\0'; -} - -#endif - -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 - -/* Use a different function name, to make it possible that the 'wchar_t' - parametrization and the 'char' parametrization get compiled in the same - translation unit. */ -# if WIDE_CHAR_VERSION -# define MAX_ROOM_NEEDED wmax_room_needed -# else -# define MAX_ROOM_NEEDED max_room_needed -# endif - -/* 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 -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) -{ - size_t tmp_length; - - switch (conversion) - { - case 'd': case 'i': case 'u': -# if HAVE_LONG_LONG_INT - if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long long) * CHAR_BIT - * 0.30103 /* binary -> decimal */ - ) - + 1; /* turn floor into ceil */ - else -# endif - if (type == TYPE_LONGINT || type == TYPE_ULONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long) * CHAR_BIT - * 0.30103 /* binary -> decimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (sizeof (unsigned int) * CHAR_BIT - * 0.30103 /* binary -> decimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Multiply by 2, as an estimate for FLAG_GROUP. */ - tmp_length = xsum (tmp_length, tmp_length); - /* Add 1, to account for a leading sign. */ - tmp_length = xsum (tmp_length, 1); - break; - - case 'o': -# if HAVE_LONG_LONG_INT - if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long long) * CHAR_BIT - * 0.333334 /* binary -> octal */ - ) - + 1; /* turn floor into ceil */ - else -# endif - if (type == TYPE_LONGINT || type == TYPE_ULONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long) * CHAR_BIT - * 0.333334 /* binary -> octal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (sizeof (unsigned int) * CHAR_BIT - * 0.333334 /* binary -> octal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Add 1, to account for a leading sign. */ - tmp_length = xsum (tmp_length, 1); - break; - - case 'x': case 'X': -# if HAVE_LONG_LONG_INT - if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long long) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else -# endif - if (type == TYPE_LONGINT || type == TYPE_ULONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (sizeof (unsigned int) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Add 2, to account for a leading sign or alternate form. */ - tmp_length = xsum (tmp_length, 2); - break; - - case 'f': case 'F': - if (type == TYPE_LONGDOUBLE) - tmp_length = - (unsigned int) (LDBL_MAX_EXP - * 0.30103 /* binary -> decimal */ - * 2 /* estimate for FLAG_GROUP */ - ) - + 1 /* turn floor into ceil */ - + 10; /* sign, decimal point etc. */ - else - tmp_length = - (unsigned int) (DBL_MAX_EXP - * 0.30103 /* binary -> decimal */ - * 2 /* estimate for FLAG_GROUP */ - ) - + 1 /* turn floor into ceil */ - + 10; /* sign, decimal point etc. */ - tmp_length = xsum (tmp_length, precision); - break; - - case 'e': case 'E': case 'g': case 'G': - tmp_length = - 12; /* sign, decimal point, exponent etc. */ - tmp_length = xsum (tmp_length, precision); - break; - - case 'a': case 'A': - if (type == TYPE_LONGDOUBLE) - tmp_length = - (unsigned int) (LDBL_DIG - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (DBL_DIG - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Account for sign, decimal point etc. */ - tmp_length = xsum (tmp_length, 12); - break; - - case 'c': -# if HAVE_WINT_T && !WIDE_CHAR_VERSION - if (type == TYPE_WIDE_CHAR) - tmp_length = MB_CUR_MAX; - else -# endif - tmp_length = 1; - break; - - case 's': -# if HAVE_WCHAR_T - if (type == TYPE_WIDE_STRING) - { -# if WIDE_CHAR_VERSION - /* ISO C says about %ls in fwprintf: - "If the precision is not specified or is greater than the size - of the array, the array shall contain a null wide character." - So if there is a precision, we must not use wcslen. */ - const wchar_t *arg = ap->arg[arg_index].a.a_wide_string; - - if (has_precision) - tmp_length = local_wcsnlen (arg, precision); - else - tmp_length = local_wcslen (arg); -# else - /* ISO C says about %ls in fprintf: - "If a precision is specified, no more than that many bytes are - written (including shift sequences, if any), and the array - shall contain a null wide character if, to equal the multibyte - character sequence length given by the precision, the function - would need to access a wide character one past the end of the - array." - So if there is a precision, we must not use wcslen. */ - /* This case has already been handled separately in VASNPRINTF. */ - abort (); -# endif - } - else -# endif - { -# if WIDE_CHAR_VERSION - /* ISO C says about %s in fwprintf: - "If the precision is not specified or is greater than the size - of the converted array, the converted array shall contain a - null wide character." - So if there is a precision, we must not use strlen. */ - /* This case has already been handled separately in VASNPRINTF. */ - abort (); -# else - /* ISO C says about %s in fprintf: - "If the precision is not specified or greater than the size of - the array, the array shall contain a null character." - So if there is a precision, we must not use strlen. */ - const char *arg = ap->arg[arg_index].a.a_string; - - if (has_precision) - tmp_length = local_strnlen (arg, precision); - else - tmp_length = strlen (arg); -# endif - } - break; - - case 'p': - tmp_length = - (unsigned int) (sizeof (void *) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1 /* turn floor into ceil */ - + 2; /* account for leading 0x */ - break; - - default: - abort (); - } - - if (!pad_ourselves) - { -# if ENABLE_UNISTDIO - /* Padding considers the number of characters, therefore the number of - elements after padding may be - > max (tmp_length, width) - but is certainly - <= tmp_length + width. */ - tmp_length = xsum (tmp_length, width); -# else - /* Padding considers the number of elements, says POSIX. */ - if (tmp_length < width) - tmp_length = width; -# endif - } - - tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ - - return tmp_length; -} - -#endif - -DCHAR_T * -VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, - const FCHAR_T *format, va_list args) -{ - DIRECTIVES d; - arguments a; - - if (PRINTF_PARSE (format, &d, &a) < 0) - /* errno is already set. */ - return NULL; - -#define CLEANUP() \ - if (d.dir != d.direct_alloc_dir) \ - free (d.dir); \ - if (a.arg != a.direct_alloc_arg) \ - free (a.arg); - - if (PRINTF_FETCHARGS (args, &a) < 0) - { - CLEANUP (); - errno = EINVAL; - return NULL; - } - - { - size_t buf_neededlength; - TCHAR_T *buf; - TCHAR_T *buf_malloced; - const FCHAR_T *cp; - size_t i; - DIRECTIVE *dp; - /* Output string accumulator. */ - DCHAR_T *result; - size_t allocated; - size_t length; - - /* Allocate a small buffer that will hold a directive passed to - sprintf or snprintf. */ - buf_neededlength = - xsum4 (7, d.max_width_length, d.max_precision_length, 6); -#if HAVE_ALLOCA - if (buf_neededlength < 4000 / sizeof (TCHAR_T)) - { - buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); - buf_malloced = NULL; - } - else -#endif - { - size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); - if (size_overflow_p (buf_memsize)) - goto out_of_memory_1; - buf = (TCHAR_T *) malloc (buf_memsize); - if (buf == NULL) - goto out_of_memory_1; - buf_malloced = buf; - } - - if (resultbuf != NULL) - { - result = resultbuf; - allocated = *lengthp; - } - else - { - result = NULL; - allocated = 0; - } - length = 0; - /* Invariants: - result is either == resultbuf or == NULL or malloc-allocated. - If length > 0, then result != NULL. */ - - /* Ensures that allocated >= needed. Aborts through a jump to - out_of_memory if needed is SIZE_MAX or otherwise too big. */ -#define ENSURE_ALLOCATION(needed) \ - if ((needed) > allocated) \ - { \ - size_t memory_size; \ - DCHAR_T *memory; \ - \ - allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ - if ((needed) > allocated) \ - allocated = (needed); \ - memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ - if (size_overflow_p (memory_size)) \ - goto out_of_memory; \ - if (result == resultbuf || result == NULL) \ - memory = (DCHAR_T *) malloc (memory_size); \ - else \ - memory = (DCHAR_T *) realloc (result, memory_size); \ - if (memory == NULL) \ - goto out_of_memory; \ - if (result == resultbuf && length > 0) \ - DCHAR_CPY (memory, result, length); \ - result = memory; \ - } - - for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) - { - if (cp != dp->dir_start) - { - size_t n = dp->dir_start - cp; - size_t augmented_length = xsum (length, n); - - ENSURE_ALLOCATION (augmented_length); - /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we - need that the format string contains only ASCII characters - if FCHAR_T and DCHAR_T are not the same type. */ - if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) - { - DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); - length = augmented_length; - } - else - { - do - result[length++] = (unsigned char) *cp++; - while (--n > 0); - } - } - if (i == d.count) - break; - - /* Execute a single directive. */ - if (dp->conversion == '%') - { - size_t augmented_length; - - if (!(dp->arg_index == ARG_NONE)) - abort (); - augmented_length = xsum (length, 1); - ENSURE_ALLOCATION (augmented_length); - result[length] = '%'; - length = augmented_length; - } - else - { - if (!(dp->arg_index != ARG_NONE)) - abort (); - - if (dp->conversion == 'n') - { - switch (a.arg[dp->arg_index].type) - { - case TYPE_COUNT_SCHAR_POINTER: - *a.arg[dp->arg_index].a.a_count_schar_pointer = length; - break; - case TYPE_COUNT_SHORT_POINTER: - *a.arg[dp->arg_index].a.a_count_short_pointer = length; - break; - case TYPE_COUNT_INT_POINTER: - *a.arg[dp->arg_index].a.a_count_int_pointer = length; - break; - case TYPE_COUNT_LONGINT_POINTER: - *a.arg[dp->arg_index].a.a_count_longint_pointer = length; - break; -#if HAVE_LONG_LONG_INT - case TYPE_COUNT_LONGLONGINT_POINTER: - *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; - break; -#endif - default: - abort (); - } - } -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - else if (dp->conversion == 'U') - { - arg_type type = a.arg[dp->arg_index].type; - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 0; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - - switch (type) - { - case TYPE_U8_STRING: - { - const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; - const uint8_t *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only PRECISION characters, from the left. */ - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count = u8_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of - characters. */ - arg_end = arg; - characters = 0; - for (;;) - { - int count = u8_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + u8_strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_UINT8_T - { - size_t n = arg_end - arg; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_CPY (result + length, arg, n); - length += n; - } -# else - { /* Convert. */ - DCHAR_T *converted = result + length; - size_t converted_len = allocated - length; -# if DCHAR_IS_TCHAR - /* Convert from UTF-8 to locale encoding. */ - converted = - u8_conv_to_encoding (locale_charset (), - iconveh_question_mark, - arg, arg_end - arg, NULL, - converted, &converted_len); -# else - /* Convert from UTF-8 to UTF-16/UTF-32. */ - converted = - U8_TO_DCHAR (arg, arg_end - arg, - converted, &converted_len); -# endif - if (converted == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - if (converted != result + length) - { - ENSURE_ALLOCATION (xsum (length, converted_len)); - DCHAR_CPY (result + length, converted, converted_len); - free (converted); - } - length += converted_len; - } -# endif - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } - break; - - case TYPE_U16_STRING: - { - const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; - const uint16_t *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only PRECISION characters, from the left. */ - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count = u16_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of - characters. */ - arg_end = arg; - characters = 0; - for (;;) - { - int count = u16_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + u16_strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_UINT16_T - { - size_t n = arg_end - arg; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_CPY (result + length, arg, n); - length += n; - } -# else - { /* Convert. */ - DCHAR_T *converted = result + length; - size_t converted_len = allocated - length; -# if DCHAR_IS_TCHAR - /* Convert from UTF-16 to locale encoding. */ - converted = - u16_conv_to_encoding (locale_charset (), - iconveh_question_mark, - arg, arg_end - arg, NULL, - converted, &converted_len); -# else - /* Convert from UTF-16 to UTF-8/UTF-32. */ - converted = - U16_TO_DCHAR (arg, arg_end - arg, - converted, &converted_len); -# endif - if (converted == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - if (converted != result + length) - { - ENSURE_ALLOCATION (xsum (length, converted_len)); - DCHAR_CPY (result + length, converted, converted_len); - free (converted); - } - length += converted_len; - } -# endif - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } - break; - - case TYPE_U32_STRING: - { - const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; - const uint32_t *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only PRECISION characters, from the left. */ - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count = u32_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of - characters. */ - arg_end = arg; - characters = 0; - for (;;) - { - int count = u32_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + u32_strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_UINT32_T - { - size_t n = arg_end - arg; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_CPY (result + length, arg, n); - length += n; - } -# else - { /* Convert. */ - DCHAR_T *converted = result + length; - size_t converted_len = allocated - length; -# if DCHAR_IS_TCHAR - /* Convert from UTF-32 to locale encoding. */ - converted = - u32_conv_to_encoding (locale_charset (), - iconveh_question_mark, - arg, arg_end - arg, NULL, - converted, &converted_len); -# else - /* Convert from UTF-32 to UTF-8/UTF-16. */ - converted = - U32_TO_DCHAR (arg, arg_end - arg, - converted, &converted_len); -# endif - if (converted == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - if (converted != result + length) - { - ENSURE_ALLOCATION (xsum (length, converted_len)); - DCHAR_CPY (result + length, converted, converted_len); - free (converted); - } - length += converted_len; - } -# endif - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } - break; - - default: - abort (); - } - } -#endif -#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T - else if (dp->conversion == 's' -# if WIDE_CHAR_VERSION - && a.arg[dp->arg_index].type != TYPE_WIDE_STRING -# else - && a.arg[dp->arg_index].type == TYPE_WIDE_STRING -# endif - ) - { - /* The normal handling of the 's' directive below requires - allocating a temporary buffer. The determination of its - length (tmp_length), in the case when a precision is - specified, below requires a conversion between a char[] - string and a wchar_t[] wide string. It could be done, but - we have no guarantee that the implementation of sprintf will - use the exactly same algorithm. Without this guarantee, it - is possible to have buffer overrun bugs. In order to avoid - such bugs, we implement the entire processing of the 's' - directive ourselves. */ - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 6; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - -# if WIDE_CHAR_VERSION - /* %s in vasnwprintf. See the specification of fwprintf. */ - { - const char *arg = a.arg[dp->arg_index].a.a_string; - const char *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only as many bytes as needed to produce PRECISION - wide characters, from the left. */ -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count; -# if HAVE_MBRTOWC - count = mbrlen (arg_end, MB_CUR_MAX, &state); -# else - count = mblen (arg_end, MB_CUR_MAX); -# endif - if (count == 0) - /* Found the terminating NUL. */ - break; - if (count < 0) - { - /* Invalid or incomplete multibyte character. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of wide - characters. */ -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - for (;;) - { - int count; -# if HAVE_MBRTOWC - count = mbrlen (arg_end, MB_CUR_MAX, &state); -# else - count = mblen (arg_end, MB_CUR_MAX); -# endif - if (count == 0) - /* Found the terminating NUL. */ - break; - if (count < 0) - { - /* Invalid or incomplete multibyte character. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - - if (has_precision || has_width) - { - /* We know the number of wide characters in advance. */ - size_t remaining; -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - ENSURE_ALLOCATION (xsum (length, characters)); - for (remaining = characters; remaining > 0; remaining--) - { - wchar_t wc; - int count; -# if HAVE_MBRTOWC - count = mbrtowc (&wc, arg, arg_end - arg, &state); -# else - count = mbtowc (&wc, arg, arg_end - arg); -# endif - if (count <= 0) - /* mbrtowc not consistent with mbrlen, or mbtowc - not consistent with mblen. */ - abort (); - result[length++] = wc; - arg += count; - } - if (!(arg == arg_end)) - abort (); - } - else - { -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - while (arg < arg_end) - { - wchar_t wc; - int count; -# if HAVE_MBRTOWC - count = mbrtowc (&wc, arg, arg_end - arg, &state); -# else - count = mbtowc (&wc, arg, arg_end - arg); -# endif - if (count <= 0) - /* mbrtowc not consistent with mbrlen, or mbtowc - not consistent with mblen. */ - abort (); - ENSURE_ALLOCATION (xsum (length, 1)); - result[length++] = wc; - arg += count; - } - } - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } -# else - /* %ls in vasnprintf. See the specification of fprintf. */ - { - const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; - const wchar_t *arg_end; - size_t characters; -# if !DCHAR_IS_TCHAR - /* This code assumes that TCHAR_T is 'char'. */ - verify (sizeof (TCHAR_T) == 1); - TCHAR_T *tmpsrc; - DCHAR_T *tmpdst; - size_t tmpdst_len; -# endif - size_t w; - - if (has_precision) - { - /* Use only as many wide characters as needed to produce - at most PRECISION bytes, from the left. */ -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - while (precision > 0) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg_end == 0) - /* Found the terminating null wide character. */ - break; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg_end, &state); -# else - count = wctomb (cbuf, *arg_end); -# endif - if (count < 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - if (precision < count) - break; - arg_end++; - characters += count; - precision -= count; - } - } -# if DCHAR_IS_TCHAR - else if (has_width) -# else - else -# endif - { - /* Use the entire string, and count the number of - bytes. */ -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - for (;;) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg_end == 0) - /* Found the terminating null wide character. */ - break; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg_end, &state); -# else - count = wctomb (cbuf, *arg_end); -# endif - if (count < 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end++; - characters += count; - } - } -# if DCHAR_IS_TCHAR - else - { - /* Use the entire string. */ - arg_end = arg + local_wcslen (arg); - /* The number of bytes doesn't matter. */ - characters = 0; - } -# endif - -# if !DCHAR_IS_TCHAR - /* Convert the string into a piece of temporary memory. */ - tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T)); - if (tmpsrc == NULL) - goto out_of_memory; - { - TCHAR_T *tmpptr = tmpsrc; - size_t remaining; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - for (remaining = characters; remaining > 0; ) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg == 0) - abort (); -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg, &state); -# else - count = wctomb (cbuf, *arg); -# endif - if (count <= 0) - /* Inconsistency. */ - abort (); - memcpy (tmpptr, cbuf, count); - tmpptr += count; - arg++; - remaining -= count; - } - if (!(arg == arg_end)) - abort (); - } - - /* Convert from TCHAR_T[] to DCHAR_T[]. */ - tmpdst = - DCHAR_CONV_FROM_ENCODING (locale_charset (), - iconveh_question_mark, - tmpsrc, characters, - NULL, - NULL, &tmpdst_len); - if (tmpdst == NULL) - { - int saved_errno = errno; - free (tmpsrc); - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - free (tmpsrc); -# endif - - if (has_width) - { -# if ENABLE_UNISTDIO - /* Outside POSIX, it's preferrable to compare the width - against the number of _characters_ of the converted - value. */ - w = DCHAR_MBSNLEN (result + length, characters); -# else - /* The width is compared against the number of _bytes_ - of the converted value, says POSIX. */ - w = characters; -# endif - } - else - /* w doesn't matter. */ - w = 0; - - if (has_width && width > w - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - w; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_TCHAR - if (has_precision || has_width) - { - /* We know the number of bytes in advance. */ - size_t remaining; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - ENSURE_ALLOCATION (xsum (length, characters)); - for (remaining = characters; remaining > 0; ) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg == 0) - abort (); -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg, &state); -# else - count = wctomb (cbuf, *arg); -# endif - if (count <= 0) - /* Inconsistency. */ - abort (); - memcpy (result + length, cbuf, count); - length += count; - arg++; - remaining -= count; - } - if (!(arg == arg_end)) - abort (); - } - else - { -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - while (arg < arg_end) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg == 0) - abort (); -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg, &state); -# else - count = wctomb (cbuf, *arg); -# endif - if (count <= 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - ENSURE_ALLOCATION (xsum (length, count)); - memcpy (result + length, cbuf, count); - length += count; - arg++; - } - } -# else - ENSURE_ALLOCATION (xsum (length, tmpdst_len)); - DCHAR_CPY (result + length, tmpdst, tmpdst_len); - free (tmpdst); - length += tmpdst_len; -# endif - - if (has_width && width > w - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - w; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } -# endif - } -#endif -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL - else if ((dp->conversion == 'a' || dp->conversion == 'A') -# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE)) - && (0 -# if NEED_PRINTF_DOUBLE - || a.arg[dp->arg_index].type == TYPE_DOUBLE -# endif -# if NEED_PRINTF_LONG_DOUBLE - || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE -# endif - ) -# endif - ) - { - arg_type type = a.arg[dp->arg_index].type; - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - size_t tmp_length; - DCHAR_T tmpbuf[700]; - DCHAR_T *tmp; - DCHAR_T *pad_ptr; - DCHAR_T *p; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 0; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - - /* Allocate a temporary buffer of sufficient size. */ - if (type == TYPE_LONGDOUBLE) - tmp_length = - (unsigned int) ((LDBL_DIG + 1) - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) ((DBL_DIG + 1) - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Account for sign, decimal point etc. */ - tmp_length = xsum (tmp_length, 12); - - if (tmp_length < width) - tmp_length = width; - - tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ - - if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) - tmp = tmpbuf; - else - { - size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); - - if (size_overflow_p (tmp_memsize)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - tmp = (DCHAR_T *) malloc (tmp_memsize); - if (tmp == NULL) - /* Out of memory. */ - goto out_of_memory; - } - - pad_ptr = NULL; - p = tmp; - if (type == TYPE_LONGDOUBLE) - { -# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE - long double arg = a.arg[dp->arg_index].a.a_longdouble; - - if (isnanl (arg)) - { - if (dp->conversion == 'A') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - DECL_LONG_DOUBLE_ROUNDING - - BEGIN_LONG_DOUBLE_ROUNDING (); - - if (signbit (arg)) /* arg < 0.0L or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0L && arg + arg == arg) - { - if (dp->conversion == 'A') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { - int exponent; - long double mantissa; - - if (arg > 0.0L) - mantissa = printf_frexpl (arg, &exponent); - else - { - exponent = 0; - mantissa = 0.0L; - } - - if (has_precision - && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) - { - /* Round the mantissa. */ - long double tail = mantissa; - size_t q; - - for (q = precision; ; q--) - { - int digit = (int) tail; - tail -= digit; - if (q == 0) - { - if (digit & 1 ? tail >= 0.5L : tail > 0.5L) - tail = 1 - tail; - else - tail = - tail; - break; - } - tail *= 16.0L; - } - if (tail != 0.0L) - for (q = precision; q > 0; q--) - tail *= 0.0625L; - mantissa += tail; - } - - *p++ = '0'; - *p++ = dp->conversion - 'A' + 'X'; - pad_ptr = p; - { - int digit; - - digit = (int) mantissa; - mantissa -= digit; - *p++ = '0' + digit; - if ((flags & FLAG_ALT) - || mantissa > 0.0L || precision > 0) - { - *p++ = decimal_point_char (); - /* This loop terminates because we assume - that FLT_RADIX is a power of 2. */ - while (mantissa > 0.0L) - { - mantissa *= 16.0L; - digit = (int) mantissa; - mantissa -= digit; - *p++ = digit - + (digit < 10 - ? '0' - : dp->conversion - 10); - if (precision > 0) - precision--; - } - while (precision > 0) - { - *p++ = '0'; - precision--; - } - } - } - *p++ = dp->conversion - 'A' + 'P'; -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - - END_LONG_DOUBLE_ROUNDING (); - } -# else - abort (); -# endif - } - else - { -# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE - double arg = a.arg[dp->arg_index].a.a_double; - - if (isnand (arg)) - { - if (dp->conversion == 'A') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - - if (signbit (arg)) /* arg < 0.0 or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0 && arg + arg == arg) - { - if (dp->conversion == 'A') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { - int exponent; - double mantissa; - - if (arg > 0.0) - mantissa = printf_frexp (arg, &exponent); - else - { - exponent = 0; - mantissa = 0.0; - } - - if (has_precision - && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) - { - /* Round the mantissa. */ - double tail = mantissa; - size_t q; - - for (q = precision; ; q--) - { - int digit = (int) tail; - tail -= digit; - if (q == 0) - { - if (digit & 1 ? tail >= 0.5 : tail > 0.5) - tail = 1 - tail; - else - tail = - tail; - break; - } - tail *= 16.0; - } - if (tail != 0.0) - for (q = precision; q > 0; q--) - tail *= 0.0625; - mantissa += tail; - } - - *p++ = '0'; - *p++ = dp->conversion - 'A' + 'X'; - pad_ptr = p; - { - int digit; - - digit = (int) mantissa; - mantissa -= digit; - *p++ = '0' + digit; - if ((flags & FLAG_ALT) - || mantissa > 0.0 || precision > 0) - { - *p++ = decimal_point_char (); - /* This loop terminates because we assume - that FLT_RADIX is a power of 2. */ - while (mantissa > 0.0) - { - mantissa *= 16.0; - digit = (int) mantissa; - mantissa -= digit; - *p++ = digit - + (digit < 10 - ? '0' - : dp->conversion - 10); - if (precision > 0) - precision--; - } - while (precision > 0) - { - *p++ = '0'; - precision--; - } - } - } - *p++ = dp->conversion - 'A' + 'P'; -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - } -# else - abort (); -# endif - } - /* The generated string now extends from tmp to p, with the - zero padding insertion point being at pad_ptr. */ - if (has_width && p - tmp < width) - { - size_t pad = width - (p - tmp); - DCHAR_T *end = p + pad; - - if (flags & FLAG_LEFT) - { - /* Pad with spaces on the right. */ - for (; pad > 0; pad--) - *p++ = ' '; - } - else if ((flags & FLAG_ZERO) && pad_ptr != NULL) - { - /* Pad with zeroes. */ - DCHAR_T *q = end; - - while (p > pad_ptr) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = '0'; - } - else - { - /* Pad with spaces on the left. */ - DCHAR_T *q = end; - - while (p > tmp) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = ' '; - } - - p = end; - } - - { - size_t count = p - tmp; - - if (count >= tmp_length) - /* tmp_length was incorrectly calculated - fix the - code above! */ - abort (); - - /* Make room for the result. */ - if (count >= allocated - length) - { - size_t n = xsum (length, count); - - ENSURE_ALLOCATION (n); - } - - /* Append the result. */ - memcpy (result + length, tmp, count * sizeof (DCHAR_T)); - if (tmp != tmpbuf) - free (tmp); - length += count; - } - } -#endif -#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL - else if ((dp->conversion == 'f' || dp->conversion == 'F' - || dp->conversion == 'e' || dp->conversion == 'E' - || dp->conversion == 'g' || dp->conversion == 'G' - || dp->conversion == 'a' || dp->conversion == 'A') - && (0 -# if NEED_PRINTF_DOUBLE - || a.arg[dp->arg_index].type == TYPE_DOUBLE -# elif NEED_PRINTF_INFINITE_DOUBLE - || (a.arg[dp->arg_index].type == TYPE_DOUBLE - /* The systems (mingw) which produce wrong output - for Inf, -Inf, and NaN also do so for -0.0. - Therefore we treat this case here as well. */ - && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) -# endif -# if NEED_PRINTF_LONG_DOUBLE - || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE -# elif NEED_PRINTF_INFINITE_LONG_DOUBLE - || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE - /* Some systems produce wrong output for Inf, - -Inf, and NaN. Some systems in this category - (IRIX 5.3) also do so for -0.0. Therefore we - treat this case here as well. */ - && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) -# endif - )) - { -# if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) - arg_type type = a.arg[dp->arg_index].type; -# endif - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - size_t tmp_length; - DCHAR_T tmpbuf[700]; - DCHAR_T *tmp; - DCHAR_T *pad_ptr; - DCHAR_T *p; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 0; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - - /* POSIX specifies the default precision to be 6 for %f, %F, - %e, %E, but not for %g, %G. Implementations appear to use - the same default precision also for %g, %G. But for %a, %A, - the default precision is 0. */ - if (!has_precision) - if (!(dp->conversion == 'a' || dp->conversion == 'A')) - precision = 6; - - /* Allocate a temporary buffer of sufficient size. */ -# if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE - tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); -# elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE - tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); -# elif NEED_PRINTF_LONG_DOUBLE - tmp_length = LDBL_DIG + 1; -# elif NEED_PRINTF_DOUBLE - tmp_length = DBL_DIG + 1; -# else - tmp_length = 0; -# endif - if (tmp_length < precision) - tmp_length = precision; -# if NEED_PRINTF_LONG_DOUBLE -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - if (type == TYPE_LONGDOUBLE) -# endif - if (dp->conversion == 'f' || dp->conversion == 'F') - { - long double arg = a.arg[dp->arg_index].a.a_longdouble; - if (!(isnanl (arg) || arg + arg == arg)) - { - /* arg is finite and nonzero. */ - int exponent = floorlog10l (arg < 0 ? -arg : arg); - if (exponent >= 0 && tmp_length < exponent + precision) - tmp_length = exponent + precision; - } - } -# endif -# if NEED_PRINTF_DOUBLE -# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE - if (type == TYPE_DOUBLE) -# endif - if (dp->conversion == 'f' || dp->conversion == 'F') - { - double arg = a.arg[dp->arg_index].a.a_double; - if (!(isnand (arg) || arg + arg == arg)) - { - /* arg is finite and nonzero. */ - int exponent = floorlog10 (arg < 0 ? -arg : arg); - if (exponent >= 0 && tmp_length < exponent + precision) - tmp_length = exponent + precision; - } - } -# endif - /* Account for sign, decimal point etc. */ - tmp_length = xsum (tmp_length, 12); - - if (tmp_length < width) - tmp_length = width; - - tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ - - if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) - tmp = tmpbuf; - else - { - size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); - - if (size_overflow_p (tmp_memsize)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - tmp = (DCHAR_T *) malloc (tmp_memsize); - if (tmp == NULL) - /* Out of memory. */ - goto out_of_memory; - } - - pad_ptr = NULL; - p = tmp; - -# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - if (type == TYPE_LONGDOUBLE) -# endif - { - long double arg = a.arg[dp->arg_index].a.a_longdouble; - - if (isnanl (arg)) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - DECL_LONG_DOUBLE_ROUNDING - - BEGIN_LONG_DOUBLE_ROUNDING (); - - if (signbit (arg)) /* arg < 0.0L or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0L && arg + arg == arg) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { -# if NEED_PRINTF_LONG_DOUBLE - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - char *digits; - size_t ndigits; - - digits = - scale10_round_decimal_long_double (arg, precision); - if (digits == NULL) - { - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - ndigits = strlen (digits); - - if (ndigits > precision) - do - { - --ndigits; - *p++ = digits[ndigits]; - } - while (ndigits > precision); - else - *p++ = '0'; - /* Here ndigits <= precision. */ - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > ndigits; precision--) - *p++ = '0'; - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - int exponent; - - if (arg == 0.0L) - { - exponent = 0; - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else - { - /* arg > 0.0L. */ - int adjusted; - char *digits; - size_t ndigits; - - exponent = floorlog10l (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_long_double (arg, - (int)precision - exponent); - if (digits == NULL) - { - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - ndigits = strlen (digits); - - if (ndigits == precision + 1) - break; - if (ndigits < precision - || ndigits > precision + 2) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits == precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision+1. */ - if (is_borderline (digits, precision)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_long_double (arg, - (int)precision - exponent + 1); - if (digits2 == NULL) - { - free (digits); - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - if (strlen (digits2) == precision + 1) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision+1. */ - - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - - *p++ = dp->conversion; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', '.', '2', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+.2d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+.2d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - if (precision == 0) - precision = 1; - /* precision >= 1. */ - - if (arg == 0.0L) - /* The exponent is 0, >= -4, < precision. - Use fixed-point notation. */ - { - size_t ndigits = precision; - /* Number of trailing zeroes that have to be - dropped. */ - size_t nzeroes = - (flags & FLAG_ALT ? 0 : precision - 1); - - --ndigits; - *p++ = '0'; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = '0'; - } - } - } - else - { - /* arg > 0.0L. */ - int exponent; - int adjusted; - char *digits; - size_t ndigits; - size_t nzeroes; - - exponent = floorlog10l (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_long_double (arg, - (int)(precision - 1) - exponent); - if (digits == NULL) - { - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - ndigits = strlen (digits); - - if (ndigits == precision) - break; - if (ndigits < precision - 1 - || ndigits > precision + 1) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits < precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision. */ - if (is_borderline (digits, precision - 1)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_long_double (arg, - (int)(precision - 1) - exponent + 1); - if (digits2 == NULL) - { - free (digits); - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - if (strlen (digits2) == precision) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision. */ - - /* Determine the number of trailing zeroes - that have to be dropped. */ - nzeroes = 0; - if ((flags & FLAG_ALT) == 0) - while (nzeroes < ndigits - && digits[nzeroes] == '0') - nzeroes++; - - /* The exponent is now determined. */ - if (exponent >= -4 - && exponent < (long)precision) - { - /* Fixed-point notation: - max(exponent,0)+1 digits, then the - decimal point, then the remaining - digits without trailing zeroes. */ - if (exponent >= 0) - { - size_t count = exponent + 1; - /* Note: count <= precision = ndigits. */ - for (; count > 0; count--) - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - size_t count = -exponent - 1; - *p++ = '0'; - *p++ = decimal_point_char (); - for (; count > 0; count--) - *p++ = '0'; - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - /* Exponential notation. */ - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', '.', '2', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+.2d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+.2d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - - free (digits); - } - } - else - abort (); -# else - /* arg is finite. */ - if (!(arg == 0.0L)) - abort (); - - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - *p++ = dp->conversion; /* 'e' or 'E' */ - *p++ = '+'; - *p++ = '0'; - *p++ = '0'; - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - *p++ = '0'; - if (flags & FLAG_ALT) - { - size_t ndigits = - (precision > 0 ? precision - 1 : 0); - *p++ = decimal_point_char (); - for (; ndigits > 0; --ndigits) - *p++ = '0'; - } - } - else if (dp->conversion == 'a' || dp->conversion == 'A') - { - *p++ = '0'; - *p++ = dp->conversion - 'A' + 'X'; - pad_ptr = p; - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - *p++ = dp->conversion - 'A' + 'P'; - *p++ = '+'; - *p++ = '0'; - } - else - abort (); -# endif - } - - END_LONG_DOUBLE_ROUNDING (); - } - } -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - else -# endif -# endif -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - { - double arg = a.arg[dp->arg_index].a.a_double; - - if (isnand (arg)) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - - if (signbit (arg)) /* arg < 0.0 or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0 && arg + arg == arg) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { -# if NEED_PRINTF_DOUBLE - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - char *digits; - size_t ndigits; - - digits = - scale10_round_decimal_double (arg, precision); - if (digits == NULL) - goto out_of_memory; - ndigits = strlen (digits); - - if (ndigits > precision) - do - { - --ndigits; - *p++ = digits[ndigits]; - } - while (ndigits > precision); - else - *p++ = '0'; - /* Here ndigits <= precision. */ - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > ndigits; precision--) - *p++ = '0'; - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - int exponent; - - if (arg == 0.0) - { - exponent = 0; - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else - { - /* arg > 0.0. */ - int adjusted; - char *digits; - size_t ndigits; - - exponent = floorlog10 (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_double (arg, - (int)precision - exponent); - if (digits == NULL) - goto out_of_memory; - ndigits = strlen (digits); - - if (ndigits == precision + 1) - break; - if (ndigits < precision - || ndigits > precision + 2) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits == precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision+1. */ - if (is_borderline (digits, precision)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_double (arg, - (int)precision - exponent + 1); - if (digits2 == NULL) - { - free (digits); - goto out_of_memory; - } - if (strlen (digits2) == precision + 1) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision+1. */ - - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - - *p++ = dp->conversion; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - { '%', '+', '.', '3', 'd', '\0' }; -# else - { '%', '+', '.', '2', 'd', '\0' }; -# endif - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - { - static const char decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - "%+.3d"; -# else - "%+.2d"; -# endif - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, decimal_format, exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, decimal_format, exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } - } -# endif - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - if (precision == 0) - precision = 1; - /* precision >= 1. */ - - if (arg == 0.0) - /* The exponent is 0, >= -4, < precision. - Use fixed-point notation. */ - { - size_t ndigits = precision; - /* Number of trailing zeroes that have to be - dropped. */ - size_t nzeroes = - (flags & FLAG_ALT ? 0 : precision - 1); - - --ndigits; - *p++ = '0'; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = '0'; - } - } - } - else - { - /* arg > 0.0. */ - int exponent; - int adjusted; - char *digits; - size_t ndigits; - size_t nzeroes; - - exponent = floorlog10 (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_double (arg, - (int)(precision - 1) - exponent); - if (digits == NULL) - goto out_of_memory; - ndigits = strlen (digits); - - if (ndigits == precision) - break; - if (ndigits < precision - 1 - || ndigits > precision + 1) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits < precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision. */ - if (is_borderline (digits, precision - 1)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_double (arg, - (int)(precision - 1) - exponent + 1); - if (digits2 == NULL) - { - free (digits); - goto out_of_memory; - } - if (strlen (digits2) == precision) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision. */ - - /* Determine the number of trailing zeroes - that have to be dropped. */ - nzeroes = 0; - if ((flags & FLAG_ALT) == 0) - while (nzeroes < ndigits - && digits[nzeroes] == '0') - nzeroes++; - - /* The exponent is now determined. */ - if (exponent >= -4 - && exponent < (long)precision) - { - /* Fixed-point notation: - max(exponent,0)+1 digits, then the - decimal point, then the remaining - digits without trailing zeroes. */ - if (exponent >= 0) - { - size_t count = exponent + 1; - /* Note: count <= precision = ndigits. */ - for (; count > 0; count--) - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - size_t count = -exponent - 1; - *p++ = '0'; - *p++ = decimal_point_char (); - for (; count > 0; count--) - *p++ = '0'; - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - /* Exponential notation. */ - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - { '%', '+', '.', '3', 'd', '\0' }; -# else - { '%', '+', '.', '2', 'd', '\0' }; -# endif - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - { - static const char decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - "%+.3d"; -# else - "%+.2d"; -# endif - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, decimal_format, exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, decimal_format, exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } - } -# endif - } - - free (digits); - } - } - else - abort (); -# else - /* arg is finite. */ - if (!(arg == 0.0)) - abort (); - - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - *p++ = dp->conversion; /* 'e' or 'E' */ - *p++ = '+'; - /* Produce the same number of exponent digits as - the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - *p++ = '0'; -# endif - *p++ = '0'; - *p++ = '0'; - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - *p++ = '0'; - if (flags & FLAG_ALT) - { - size_t ndigits = - (precision > 0 ? precision - 1 : 0); - *p++ = decimal_point_char (); - for (; ndigits > 0; --ndigits) - *p++ = '0'; - } - } - else - abort (); -# endif - } - } - } -# endif - - /* The generated string now extends from tmp to p, with the - zero padding insertion point being at pad_ptr. */ - if (has_width && p - tmp < width) - { - size_t pad = width - (p - tmp); - DCHAR_T *end = p + pad; - - if (flags & FLAG_LEFT) - { - /* Pad with spaces on the right. */ - for (; pad > 0; pad--) - *p++ = ' '; - } - else if ((flags & FLAG_ZERO) && pad_ptr != NULL) - { - /* Pad with zeroes. */ - DCHAR_T *q = end; - - while (p > pad_ptr) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = '0'; - } - else - { - /* Pad with spaces on the left. */ - DCHAR_T *q = end; - - while (p > tmp) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = ' '; - } - - p = end; - } - - { - size_t count = p - tmp; - - if (count >= tmp_length) - /* tmp_length was incorrectly calculated - fix the - code above! */ - abort (); - - /* Make room for the result. */ - if (count >= allocated - length) - { - size_t n = xsum (length, count); - - ENSURE_ALLOCATION (n); - } - - /* Append the result. */ - memcpy (result + length, tmp, count * sizeof (DCHAR_T)); - if (tmp != tmpbuf) - free (tmp); - length += count; - } - } -#endif - else - { - arg_type type = a.arg[dp->arg_index].type; - int flags = dp->flags; -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - int has_width; - size_t width; -#endif -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION - int has_precision; - size_t precision; -#endif -#if NEED_PRINTF_UNBOUNDED_PRECISION - int prec_ourselves; -#else -# define prec_ourselves 0 -#endif -#if NEED_PRINTF_FLAG_LEFTADJUST -# define pad_ourselves 1 -#elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - int pad_ourselves; -#else -# define pad_ourselves 0 -#endif - TCHAR_T *fbp; - unsigned int prefix_count; - int prefixes[2] IF_LINT (= { 0 }); - int orig_errno; -#if !USE_SNPRINTF - size_t tmp_length; - TCHAR_T tmpbuf[700]; - TCHAR_T *tmp; -#endif - -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } -#endif - -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION - has_precision = 0; - precision = 6; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } -#endif - - /* Decide whether to handle the precision ourselves. */ -#if NEED_PRINTF_UNBOUNDED_PRECISION - switch (dp->conversion) - { - case 'd': case 'i': case 'u': - case 'o': - case 'x': case 'X': case 'p': - prec_ourselves = has_precision && (precision > 0); - break; - default: - prec_ourselves = 0; - break; - } -#endif - - /* Decide whether to perform the padding ourselves. */ -#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION) - switch (dp->conversion) - { -# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO - /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need - to perform the padding after this conversion. Functions - with unistdio extensions perform the padding based on - character count rather than element count. */ - case 'c': case 's': -# endif -# if NEED_PRINTF_FLAG_ZERO - case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': - case 'a': case 'A': -# endif - pad_ourselves = 1; - break; - default: - pad_ourselves = prec_ourselves; - break; - } -#endif - -#if !USE_SNPRINTF - /* Allocate a temporary buffer of sufficient size for calling - sprintf. */ - tmp_length = - MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type, - flags, width, has_precision, precision, - pad_ourselves); - - if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) - tmp = tmpbuf; - else - { - size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); - - if (size_overflow_p (tmp_memsize)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - tmp = (TCHAR_T *) malloc (tmp_memsize); - if (tmp == NULL) - /* Out of memory. */ - goto out_of_memory; - } -#endif - - /* Construct the format string for calling snprintf or - sprintf. */ - fbp = buf; - *fbp++ = '%'; -#if NEED_PRINTF_FLAG_GROUPING - /* The underlying implementation doesn't support the ' flag. - Produce no grouping characters in this case; this is - acceptable because the grouping is locale dependent. */ -#else - if (flags & FLAG_GROUP) - *fbp++ = '\''; -#endif - if (flags & FLAG_LEFT) - *fbp++ = '-'; - if (flags & FLAG_SHOWSIGN) - *fbp++ = '+'; - if (flags & FLAG_SPACE) - *fbp++ = ' '; - if (flags & FLAG_ALT) - *fbp++ = '#'; -#if __GLIBC__ >= 2 && !defined __UCLIBC__ - if (flags & FLAG_LOCALIZED) - *fbp++ = 'I'; -#endif - if (!pad_ourselves) - { - if (flags & FLAG_ZERO) - *fbp++ = '0'; - if (dp->width_start != dp->width_end) - { - size_t n = dp->width_end - dp->width_start; - /* The width specification is known to consist only - of standard ASCII characters. */ - if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) - { - memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); - fbp += n; - } - else - { - const FCHAR_T *mp = dp->width_start; - do - *fbp++ = (unsigned char) *mp++; - while (--n > 0); - } - } - } - if (!prec_ourselves) - { - if (dp->precision_start != dp->precision_end) - { - size_t n = dp->precision_end - dp->precision_start; - /* The precision specification is known to consist only - of standard ASCII characters. */ - if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) - { - memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); - fbp += n; - } - else - { - const FCHAR_T *mp = dp->precision_start; - do - *fbp++ = (unsigned char) *mp++; - while (--n > 0); - } - } - } - - switch (type) - { -#if HAVE_LONG_LONG_INT - case TYPE_LONGLONGINT: - case TYPE_ULONGLONGINT: -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - *fbp++ = 'I'; - *fbp++ = '6'; - *fbp++ = '4'; - break; -# else - *fbp++ = 'l'; - /*FALLTHROUGH*/ -# endif -#endif - case TYPE_LONGINT: - case TYPE_ULONGINT: -#if HAVE_WINT_T - case TYPE_WIDE_CHAR: -#endif -#if HAVE_WCHAR_T - case TYPE_WIDE_STRING: -#endif - *fbp++ = 'l'; - break; - case TYPE_LONGDOUBLE: - *fbp++ = 'L'; - break; - default: - break; - } -#if NEED_PRINTF_DIRECTIVE_F - if (dp->conversion == 'F') - *fbp = 'f'; - else -#endif - *fbp = dp->conversion; -#if USE_SNPRINTF -# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) - fbp[1] = '%'; - fbp[2] = 'n'; - fbp[3] = '\0'; -# else - /* On glibc2 systems from glibc >= 2.3 - probably also older - ones - we know that snprintf's return value conforms to - ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and - gl_SNPRINTF_TRUNCATION_C99 pass. - Therefore we can avoid using %n in this situation. - On glibc2 systems from 2004-10-18 or newer, the use of %n - in format strings in writable memory may crash the program - (if compiled with _FORTIFY_SOURCE=2), so we should avoid it - in this situation. */ - /* On native Win32 systems (such as mingw), we can avoid using - %n because: - - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, - snprintf does not write more than the specified number - of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes - '4', '5', '6' into buf, not '4', '5', '\0'.) - - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf - allows us to recognize the case of an insufficient - buffer size: it returns -1 in this case. - On native Win32 systems (such as mingw) where the OS is - Windows Vista, the use of %n in format strings by default - crashes the program. See - and - - So we should avoid %n in this situation. */ - fbp[1] = '\0'; -# endif -#else - fbp[1] = '\0'; -#endif - - /* Construct the arguments for calling snprintf or sprintf. */ - prefix_count = 0; - if (!pad_ourselves && dp->width_arg_index != ARG_NONE) - { - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; - } - if (!prec_ourselves && dp->precision_arg_index != ARG_NONE) - { - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; - } - -#if USE_SNPRINTF - /* The SNPRINTF result is appended after result[0..length]. - The latter is an array of DCHAR_T; SNPRINTF appends an - array of TCHAR_T to it. This is possible because - sizeof (TCHAR_T) divides sizeof (DCHAR_T) and - alignof (TCHAR_T) <= alignof (DCHAR_T). */ -# define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) - /* Ensure that maxlen below will be >= 2. Needed on BeOS, - where an snprintf() with maxlen==1 acts like sprintf(). */ - ENSURE_ALLOCATION (xsum (length, - (2 + TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR)); - /* Prepare checking whether snprintf returns the count - via %n. */ - *(TCHAR_T *) (result + length) = '\0'; -#endif - - orig_errno = errno; - - for (;;) - { - int count = -1; - -#if USE_SNPRINTF - int retcount = 0; - size_t maxlen = allocated - length; - /* SNPRINTF can fail if its second argument is - > INT_MAX. */ - if (maxlen > INT_MAX / TCHARS_PER_DCHAR) - maxlen = INT_MAX / TCHARS_PER_DCHAR; - maxlen = maxlen * TCHARS_PER_DCHAR; -# define SNPRINTF_BUF(arg) \ - switch (prefix_count) \ - { \ - case 0: \ - retcount = SNPRINTF ((TCHAR_T *) (result + length), \ - maxlen, buf, \ - arg, &count); \ - break; \ - case 1: \ - retcount = SNPRINTF ((TCHAR_T *) (result + length), \ - maxlen, buf, \ - prefixes[0], arg, &count); \ - break; \ - case 2: \ - retcount = SNPRINTF ((TCHAR_T *) (result + length), \ - maxlen, buf, \ - prefixes[0], prefixes[1], arg, \ - &count); \ - break; \ - default: \ - abort (); \ - } -#else -# define SNPRINTF_BUF(arg) \ - switch (prefix_count) \ - { \ - case 0: \ - count = sprintf (tmp, buf, arg); \ - break; \ - case 1: \ - count = sprintf (tmp, buf, prefixes[0], arg); \ - break; \ - case 2: \ - count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ - arg); \ - break; \ - default: \ - abort (); \ - } -#endif - - errno = 0; - switch (type) - { - case TYPE_SCHAR: - { - int arg = a.arg[dp->arg_index].a.a_schar; - SNPRINTF_BUF (arg); - } - break; - case TYPE_UCHAR: - { - unsigned int arg = a.arg[dp->arg_index].a.a_uchar; - SNPRINTF_BUF (arg); - } - break; - case TYPE_SHORT: - { - int arg = a.arg[dp->arg_index].a.a_short; - SNPRINTF_BUF (arg); - } - break; - case TYPE_USHORT: - { - unsigned int arg = a.arg[dp->arg_index].a.a_ushort; - SNPRINTF_BUF (arg); - } - break; - case TYPE_INT: - { - int arg = a.arg[dp->arg_index].a.a_int; - SNPRINTF_BUF (arg); - } - break; - case TYPE_UINT: - { - unsigned int arg = a.arg[dp->arg_index].a.a_uint; - SNPRINTF_BUF (arg); - } - break; - case TYPE_LONGINT: - { - long int arg = a.arg[dp->arg_index].a.a_longint; - SNPRINTF_BUF (arg); - } - break; - case TYPE_ULONGINT: - { - unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; - SNPRINTF_BUF (arg); - } - break; -#if HAVE_LONG_LONG_INT - case TYPE_LONGLONGINT: - { - long long int arg = a.arg[dp->arg_index].a.a_longlongint; - SNPRINTF_BUF (arg); - } - break; - case TYPE_ULONGLONGINT: - { - unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; - SNPRINTF_BUF (arg); - } - break; -#endif - case TYPE_DOUBLE: - { - double arg = a.arg[dp->arg_index].a.a_double; - SNPRINTF_BUF (arg); - } - break; - case TYPE_LONGDOUBLE: - { - long double arg = a.arg[dp->arg_index].a.a_longdouble; - SNPRINTF_BUF (arg); - } - break; - case TYPE_CHAR: - { - int arg = a.arg[dp->arg_index].a.a_char; - SNPRINTF_BUF (arg); - } - break; -#if HAVE_WINT_T - case TYPE_WIDE_CHAR: - { - wint_t arg = a.arg[dp->arg_index].a.a_wide_char; - SNPRINTF_BUF (arg); - } - break; -#endif - case TYPE_STRING: - { - const char *arg = a.arg[dp->arg_index].a.a_string; - SNPRINTF_BUF (arg); - } - break; -#if HAVE_WCHAR_T - case TYPE_WIDE_STRING: - { - const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; - SNPRINTF_BUF (arg); - } - break; -#endif - case TYPE_POINTER: - { - void *arg = a.arg[dp->arg_index].a.a_pointer; - SNPRINTF_BUF (arg); - } - break; - default: - abort (); - } - -#if USE_SNPRINTF - /* Portability: Not all implementations of snprintf() - are ISO C 99 compliant. Determine the number of - bytes that snprintf() has produced or would have - produced. */ - if (count >= 0) - { - /* Verify that snprintf() has NUL-terminated its - result. */ - if (count < maxlen - && ((TCHAR_T *) (result + length)) [count] != '\0') - abort (); - /* Portability hack. */ - if (retcount > count) - count = retcount; - } - else - { - /* snprintf() doesn't understand the '%n' - directive. */ - if (fbp[1] != '\0') - { - /* Don't use the '%n' directive; instead, look - at the snprintf() return value. */ - fbp[1] = '\0'; - continue; - } - else - { - /* Look at the snprintf() return value. */ - if (retcount < 0) - { -# if !HAVE_SNPRINTF_RETVAL_C99 - /* HP-UX 10.20 snprintf() is doubly deficient: - It doesn't understand the '%n' directive, - *and* it returns -1 (rather than the length - that would have been required) when the - buffer is too small. - But a failure at this point can also come - from other reasons than a too small buffer, - such as an invalid wide string argument to - the %ls directive, or possibly an invalid - floating-point argument. */ - size_t tmp_length = - MAX_ROOM_NEEDED (&a, dp->arg_index, - dp->conversion, type, flags, - width, has_precision, - precision, pad_ourselves); - - if (maxlen < tmp_length) - { - /* Make more room. But try to do through - this reallocation only once. */ - size_t bigger_need = - xsum (length, - xsum (tmp_length, - TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR); - /* And always grow proportionally. - (There may be several arguments, each - needing a little more room than the - previous one.) */ - size_t bigger_need2 = - xsum (xtimes (allocated, 2), 12); - if (bigger_need < bigger_need2) - bigger_need = bigger_need2; - ENSURE_ALLOCATION (bigger_need); - continue; - } -# endif - } - else - count = retcount; - } - } -#endif - - /* Attempt to handle failure. */ - if (count < 0) - { - /* SNPRINTF or sprintf failed. Save and use the errno - that it has set, if any. */ - int saved_errno = errno; - - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = - (saved_errno != 0 - ? saved_errno - : (dp->conversion == 'c' || dp->conversion == 's' - ? EILSEQ - : EINVAL)); - return NULL; - } - -#if USE_SNPRINTF - /* Handle overflow of the allocated buffer. - If such an overflow occurs, a C99 compliant snprintf() - returns a count >= maxlen. However, a non-compliant - snprintf() function returns only count = maxlen - 1. To - cover both cases, test whether count >= maxlen - 1. */ - if ((unsigned int) count + 1 >= maxlen) - { - /* If maxlen already has attained its allowed maximum, - allocating more memory will not increase maxlen. - Instead of looping, bail out. */ - if (maxlen == INT_MAX / TCHARS_PER_DCHAR) - goto overflow; - else - { - /* Need at least (count + 1) * sizeof (TCHAR_T) - bytes. (The +1 is for the trailing NUL.) - But ask for (count + 2) * sizeof (TCHAR_T) - bytes, so that in the next round, we likely get - maxlen > (unsigned int) count + 1 - and so we don't get here again. - And allocate proportionally, to avoid looping - eternally if snprintf() reports a too small - count. */ - size_t n = - xmax (xsum (length, - ((unsigned int) count + 2 - + TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR), - xtimes (allocated, 2)); - - ENSURE_ALLOCATION (n); - continue; - } - } -#endif - -#if NEED_PRINTF_UNBOUNDED_PRECISION - if (prec_ourselves) - { - /* Handle the precision. */ - TCHAR_T *prec_ptr = -# if USE_SNPRINTF - (TCHAR_T *) (result + length); -# else - tmp; -# endif - size_t prefix_count; - size_t move; - - prefix_count = 0; - /* Put the additional zeroes after the sign. */ - if (count >= 1 - && (*prec_ptr == '-' || *prec_ptr == '+' - || *prec_ptr == ' ')) - prefix_count = 1; - /* Put the additional zeroes after the 0x prefix if - (flags & FLAG_ALT) || (dp->conversion == 'p'). */ - else if (count >= 2 - && prec_ptr[0] == '0' - && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X')) - prefix_count = 2; - - move = count - prefix_count; - if (precision > move) - { - /* Insert zeroes. */ - size_t insert = precision - move; - TCHAR_T *prec_end; - -# if USE_SNPRINTF - size_t n = - xsum (length, - (count + insert + TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR); - length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; - ENSURE_ALLOCATION (n); - length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; - prec_ptr = (TCHAR_T *) (result + length); -# endif - - prec_end = prec_ptr + count; - prec_ptr += prefix_count; - - while (prec_end > prec_ptr) - { - prec_end--; - prec_end[insert] = prec_end[0]; - } - - prec_end += insert; - do - *--prec_end = '0'; - while (prec_end > prec_ptr); - - count += insert; - } - } -#endif - -#if !USE_SNPRINTF - if (count >= tmp_length) - /* tmp_length was incorrectly calculated - fix the - code above! */ - abort (); -#endif - -#if !DCHAR_IS_TCHAR - /* Convert from TCHAR_T[] to DCHAR_T[]. */ - if (dp->conversion == 'c' || dp->conversion == 's') - { - /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING - TYPE_WIDE_STRING. - The result string is not certainly ASCII. */ - const TCHAR_T *tmpsrc; - DCHAR_T *tmpdst; - size_t tmpdst_len; - /* This code assumes that TCHAR_T is 'char'. */ - verify (sizeof (TCHAR_T) == 1); -# if USE_SNPRINTF - tmpsrc = (TCHAR_T *) (result + length); -# else - tmpsrc = tmp; -# endif - tmpdst = - DCHAR_CONV_FROM_ENCODING (locale_charset (), - iconveh_question_mark, - tmpsrc, count, - NULL, - NULL, &tmpdst_len); - if (tmpdst == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - ENSURE_ALLOCATION (xsum (length, tmpdst_len)); - DCHAR_CPY (result + length, tmpdst, tmpdst_len); - free (tmpdst); - count = tmpdst_len; - } - else - { - /* The result string is ASCII. - Simple 1:1 conversion. */ -# if USE_SNPRINTF - /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a - no-op conversion, in-place on the array starting - at (result + length). */ - if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) -# endif - { - const TCHAR_T *tmpsrc; - DCHAR_T *tmpdst; - size_t n; - -# if USE_SNPRINTF - if (result == resultbuf) - { - tmpsrc = (TCHAR_T *) (result + length); - /* ENSURE_ALLOCATION will not move tmpsrc - (because it's part of resultbuf). */ - ENSURE_ALLOCATION (xsum (length, count)); - } - else - { - /* ENSURE_ALLOCATION will move the array - (because it uses realloc(). */ - ENSURE_ALLOCATION (xsum (length, count)); - tmpsrc = (TCHAR_T *) (result + length); - } -# else - tmpsrc = tmp; - ENSURE_ALLOCATION (xsum (length, count)); -# endif - tmpdst = result + length; - /* Copy backwards, because of overlapping. */ - tmpsrc += count; - tmpdst += count; - for (n = count; n > 0; n--) - *--tmpdst = (unsigned char) *--tmpsrc; - } - } -#endif - -#if DCHAR_IS_TCHAR && !USE_SNPRINTF - /* Make room for the result. */ - if (count > allocated - length) - { - /* Need at least count elements. But allocate - proportionally. */ - size_t n = - xmax (xsum (length, count), xtimes (allocated, 2)); - - ENSURE_ALLOCATION (n); - } -#endif - - /* Here count <= allocated - length. */ - - /* Perform padding. */ -#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - if (pad_ourselves && has_width) - { - size_t w; -# if ENABLE_UNISTDIO - /* Outside POSIX, it's preferrable to compare the width - against the number of _characters_ of the converted - value. */ - w = DCHAR_MBSNLEN (result + length, count); -# else - /* The width is compared against the number of _bytes_ - of the converted value, says POSIX. */ - w = count; -# endif - if (w < width) - { - size_t pad = width - w; - - /* Make room for the result. */ - if (xsum (count, pad) > allocated - length) - { - /* Need at least count + pad elements. But - allocate proportionally. */ - size_t n = - xmax (xsum3 (length, count, pad), - xtimes (allocated, 2)); - -# if USE_SNPRINTF - length += count; - ENSURE_ALLOCATION (n); - length -= count; -# else - ENSURE_ALLOCATION (n); -# endif - } - /* Here count + pad <= allocated - length. */ - - { -# if !DCHAR_IS_TCHAR || USE_SNPRINTF - DCHAR_T * const rp = result + length; -# else - DCHAR_T * const rp = tmp; -# endif - DCHAR_T *p = rp + count; - DCHAR_T *end = p + pad; - DCHAR_T *pad_ptr; -# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO - if (dp->conversion == 'c' - || dp->conversion == 's') - /* No zero-padding for string directives. */ - pad_ptr = NULL; - else -# endif - { - pad_ptr = (*rp == '-' ? rp + 1 : rp); - /* No zero-padding of "inf" and "nan". */ - if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') - || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) - pad_ptr = NULL; - } - /* The generated string now extends from rp to p, - with the zero padding insertion point being at - pad_ptr. */ - - count = count + pad; /* = end - rp */ - - if (flags & FLAG_LEFT) - { - /* Pad with spaces on the right. */ - for (; pad > 0; pad--) - *p++ = ' '; - } - else if ((flags & FLAG_ZERO) && pad_ptr != NULL) - { - /* Pad with zeroes. */ - DCHAR_T *q = end; - - while (p > pad_ptr) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = '0'; - } - else - { - /* Pad with spaces on the left. */ - DCHAR_T *q = end; - - while (p > rp) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = ' '; - } - } - } - } -#endif - - /* Here still count <= allocated - length. */ - -#if !DCHAR_IS_TCHAR || USE_SNPRINTF - /* The snprintf() result did fit. */ -#else - /* Append the sprintf() result. */ - memcpy (result + length, tmp, count * sizeof (DCHAR_T)); -#endif -#if !USE_SNPRINTF - if (tmp != tmpbuf) - free (tmp); -#endif - -#if NEED_PRINTF_DIRECTIVE_F - if (dp->conversion == 'F') - { - /* Convert the %f result to upper case for %F. */ - DCHAR_T *rp = result + length; - size_t rc; - for (rc = count; rc > 0; rc--, rp++) - if (*rp >= 'a' && *rp <= 'z') - *rp = *rp - 'a' + 'A'; - } -#endif - - length += count; - break; - } - errno = orig_errno; -#undef pad_ourselves -#undef prec_ourselves - } - } - } - - /* Add the final NUL. */ - ENSURE_ALLOCATION (xsum (length, 1)); - result[length] = '\0'; - - if (result != resultbuf && length + 1 < allocated) - { - /* Shrink the allocated memory if possible. */ - DCHAR_T *memory; - - memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); - if (memory != NULL) - result = memory; - } - - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - *lengthp = length; - /* Note that we can produce a big string of a length > INT_MAX. POSIX - says that snprintf() fails with errno = EOVERFLOW in this case, but - that's only because snprintf() returns an 'int'. This function does - not have this limitation. */ - return result; - -#if USE_SNPRINTF - overflow: - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EOVERFLOW; - return NULL; -#endif - - out_of_memory: - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - out_of_memory_1: - CLEANUP (); - errno = ENOMEM; - return NULL; - } -} - -#undef MAX_ROOM_NEEDED -#undef TCHARS_PER_DCHAR -#undef SNPRINTF -#undef USE_SNPRINTF -#undef DCHAR_SET -#undef DCHAR_CPY -#undef PRINTF_PARSE -#undef DIRECTIVES -#undef DIRECTIVE -#undef DCHAR_IS_TCHAR -#undef TCHAR_T -#undef DCHAR_T -#undef FCHAR_T -#undef VASNPRINTF diff --git a/gnulib/lib/vasnprintf.h b/gnulib/lib/vasnprintf.h deleted file mode 100644 index c9f4c21..0000000 --- a/gnulib/lib/vasnprintf.h +++ /dev/null @@ -1,80 +0,0 @@ -/* vsprintf with automatic memory allocation. - Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _VASNPRINTF_H -#define _VASNPRINTF_H - -/* Get va_list. */ -#include - -/* Get size_t. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Write formatted output to a string dynamically allocated with malloc(). - You can pass a preallocated buffer for the result in RESULTBUF and its - size in *LENGTHP; otherwise you pass RESULTBUF = NULL. - If successful, return the address of the string (this may be = RESULTBUF - if no dynamic memory allocation was necessary) and set *LENGTHP to the - number of resulting bytes, excluding the trailing NUL. Upon error, set - errno and return NULL. - - When dynamic memory allocation occurs, the preallocated buffer is left - alone (with possibly modified contents). This makes it possible to use - a statically allocated or stack-allocated buffer, like this: - - char buf[100]; - size_t len = sizeof (buf); - char *output = vasnprintf (buf, &len, format, args); - if (output == NULL) - ... error handling ...; - else - { - ... use the output string ...; - if (output != buf) - free (output); - } - */ -#if REPLACE_VASNPRINTF -# define asnprintf rpl_asnprintf -# define vasnprintf rpl_vasnprintf -#endif -extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) - _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); -extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0)); - -#ifdef __cplusplus -} -#endif - -#endif /* _VASNPRINTF_H */ diff --git a/gnulib/lib/verify.h b/gnulib/lib/verify.h deleted file mode 100644 index 5e91abd..0000000 --- a/gnulib/lib/verify.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Compile-time assert-like macros. - - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ - -#ifndef VERIFY_H -# define VERIFY_H 1 - -/* Each of these macros verifies that its argument R is nonzero. To - be portable, R should be an integer constant expression. Unlike - assert (R), there is no run-time overhead. - - There are two macros, since no single macro can be used in all - contexts in C. verify_true (R) is for scalar contexts, including - integer constant expression contexts. verify (R) is for declaration - contexts, e.g., the top level. - - Symbols ending in "__" are private to this header. - - The code below uses several ideas. - - * The first step is ((R) ? 1 : -1). Given an expression R, of - integral or boolean or floating-point type, this yields an - expression of integral type, whose value is later verified to be - constant and nonnegative. - - * Next this expression W is wrapped in a type - struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }. - If W is negative, this yields a compile-time error. No compiler can - deal with a bit-field of negative size. - - One might think that an array size check would have the same - effect, that is, that the type struct { unsigned int dummy[W]; } - would work as well. However, inside a function, some compilers - (such as C++ compilers and GNU C) allow local parameters and - variables inside array size expressions. With these compilers, - an array size check would not properly diagnose this misuse of - the verify macro: - - void function (int n) { verify (n < 0); } - - * For the verify macro, the struct verify_type__ will need to - somehow be embedded into a declaration. To be portable, this - declaration must declare an object, a constant, a function, or a - typedef name. If the declared entity uses the type directly, - such as in - - struct dummy {...}; - typedef struct {...} dummy; - extern struct {...} *dummy; - extern void dummy (struct {...} *); - extern struct {...} *dummy (void); - - two uses of the verify macro would yield colliding declarations - if the entity names are not disambiguated. A workaround is to - attach the current line number to the entity name: - - #define _GL_CONCAT0(x, y) x##y - #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) - extern struct {...} * _GL_CONCAT (dummy, __LINE__); - - But this has the problem that two invocations of verify from - within the same macro would collide, since the __LINE__ value - would be the same for both invocations. (The GCC __COUNTER__ - macro solves this problem, but is not portable.) - - A solution is to use the sizeof operator. It yields a number, - getting rid of the identity of the type. Declarations like - - extern int dummy [sizeof (struct {...})]; - extern void dummy (int [sizeof (struct {...})]); - extern int (*dummy (void)) [sizeof (struct {...})]; - - can be repeated. - - * Should the implementation use a named struct or an unnamed struct? - Which of the following alternatives can be used? - - extern int dummy [sizeof (struct {...})]; - extern int dummy [sizeof (struct verify_type__ {...})]; - extern void dummy (int [sizeof (struct {...})]); - extern void dummy (int [sizeof (struct verify_type__ {...})]); - extern int (*dummy (void)) [sizeof (struct {...})]; - extern int (*dummy (void)) [sizeof (struct verify_type__ {...})]; - - In the second and sixth case, the struct type is exported to the - outer scope; two such declarations therefore collide. GCC warns - about the first, third, and fourth cases. So the only remaining - possibility is the fifth case: - - 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 - __COUNTER__ macro that can let us generate unique identifiers for - each dummy function, to suppress this warning. - - * This implementation exploits the fact that GCC does not warn about - the last declaration mentioned above. If a future version of GCC - introduces a warning for this, the problem could be worked around - by using code specialized to GCC, just as __COUNTER__ is already - being used if available. - - #if 4 <= __GNUC__ - # define verify(R) [another version to keep GCC happy] - #endif - - * In C++, any struct definition inside sizeof is invalid. - Use a template type to work around the problem. */ - -/* Concatenate two preprocessor tokens. */ -# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) -# define _GL_CONCAT0(x, y) x##y - -/* _GL_COUNTER is an integer, preferably one that changes each time we - use it. Use __COUNTER__ if it works, falling back on __LINE__ - otherwise. __LINE__ isn't perfect, but it's better than a - constant. */ -# if defined __COUNTER__ && __COUNTER__ != __COUNTER__ -# define _GL_COUNTER __COUNTER__ -# else -# define _GL_COUNTER __LINE__ -# endif - -/* Generate a symbol with the given prefix, making it unique if - possible. */ -# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) - -/* Verify requirement R at compile-time, as an integer constant expression. - Return 1. */ - -# ifdef __cplusplus -template - struct verify_type__ { unsigned int verify_error_if_negative_size__: w; }; -# define verify_true(R) \ - (!!sizeof (verify_type__<(R) ? 1 : -1>)) -# else -# define verify_true(R) \ - (!!sizeof \ - (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; })) -# endif - -/* Verify requirement R at compile-time, as a declaration without a - trailing ';'. */ - -# define verify(R) \ - extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)] - -#endif diff --git a/gnulib/lib/version-etc-fsf.c b/gnulib/lib/version-etc-fsf.c deleted file mode 100644 index c821583..0000000 --- a/gnulib/lib/version-etc-fsf.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Variable with FSF copyright information, for version-etc. - Copyright (C) 1999-2006, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -/* Specification. */ -#include "version-etc.h" - -/* Default copyright goes to the FSF. */ - -const char version_etc_copyright[] = - /* Do *not* mark this string for translation. %s is a copyright - symbol suitable for this locale, and %d is the copyright - year. */ - "Copyright %s %d Free Software Foundation, Inc."; diff --git a/gnulib/lib/version-etc.c b/gnulib/lib/version-etc.c deleted file mode 100644 index b8d4724..0000000 --- a/gnulib/lib/version-etc.c +++ /dev/null @@ -1,258 +0,0 @@ -/* Print --version and bug-reporting information in a consistent format. - Copyright (C) 1999-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -/* Specification. */ -#include "version-etc.h" - -#include -#include -#include - -#if USE_UNLOCKED_IO -# include "unlocked-io.h" -#endif - -#include "gettext.h" -#define _(msgid) gettext (msgid) - -/* If you use AM_INIT_AUTOMAKE's no-define option, - PACKAGE is not defined. Use PACKAGE_TARNAME instead. */ -#if ! defined PACKAGE && defined PACKAGE_TARNAME -# define PACKAGE PACKAGE_TARNAME -#endif - -enum { COPYRIGHT_YEAR = 2011 }; - -/* The three functions below display the --version information the - standard way. - - If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of - the program. The formats are therefore: - - PACKAGE VERSION - - or - - COMMAND_NAME (PACKAGE) VERSION. - - The functions differ in the way they are passed author names. */ - -/* Display the --version information the standard way. - - Author names are given in the array AUTHORS. N_AUTHORS is the - number of elements in the array. */ -void -version_etc_arn (FILE *stream, - const char *command_name, const char *package, - const char *version, - const char * const * authors, size_t n_authors) -{ - if (command_name) - fprintf (stream, "%s (%s) %s\n", command_name, package, version); - else - fprintf (stream, "%s %s\n", package, version); - -#ifdef PACKAGE_PACKAGER -# ifdef PACKAGE_PACKAGER_VERSION - fprintf (stream, _("Packaged by %s (%s)\n"), PACKAGE_PACKAGER, - PACKAGE_PACKAGER_VERSION); -# else - fprintf (stream, _("Packaged by %s\n"), PACKAGE_PACKAGER); -# endif -#endif - - /* TRANSLATORS: Translate "(C)" to the copyright symbol - (C-in-a-circle), if this symbol is available in the user's - locale. Otherwise, do not translate "(C)"; leave it as-is. */ - fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR); - - fputs (_("\ -\n\ -License GPLv3+: GNU GPL version 3 or later .\n\ -This is free software: you are free to change and redistribute it.\n\ -There is NO WARRANTY, to the extent permitted by law.\n\ -\n\ -"), - stream); - - switch (n_authors) - { - case 0: - /* The caller must provide at least one author name. */ - abort (); - case 1: - /* TRANSLATORS: %s denotes an author name. */ - fprintf (stream, _("Written by %s.\n"), authors[0]); - break; - case 2: - /* TRANSLATORS: Each %s denotes an author name. */ - fprintf (stream, _("Written by %s and %s.\n"), authors[0], authors[1]); - break; - case 3: - /* TRANSLATORS: Each %s denotes an author name. */ - fprintf (stream, _("Written by %s, %s, and %s.\n"), - authors[0], authors[1], authors[2]); - break; - case 4: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("Written by %s, %s, %s,\nand %s.\n"), - authors[0], authors[1], authors[2], authors[3]); - break; - case 5: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("Written by %s, %s, %s,\n%s, and %s.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4]); - break; - case 6: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, and %s.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4], - authors[5]); - break; - case 7: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4], - authors[5], authors[6]); - break; - case 8: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("\ -Written by %s, %s, %s,\n%s, %s, %s, %s,\nand %s.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4], - authors[5], authors[6], authors[7]); - break; - case 9: - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("\ -Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4], - authors[5], authors[6], authors[7], authors[8]); - break; - default: - /* 10 or more authors. Use an abbreviation, since the human reader - will probably not want to read the entire list anyway. */ - /* TRANSLATORS: Each %s denotes an author name. - You can use line breaks, estimating that each author name occupies - ca. 16 screen columns and that a screen line has ca. 80 columns. */ - fprintf (stream, _("\ -Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"), - authors[0], authors[1], authors[2], authors[3], authors[4], - authors[5], authors[6], authors[7], authors[8]); - break; - } -} - -/* Display the --version information the standard way. See the initial - comment to this module, for more information. - - Author names are given in the NULL-terminated array AUTHORS. */ -void -version_etc_ar (FILE *stream, - const char *command_name, const char *package, - const char *version, const char * const * authors) -{ - size_t n_authors; - - for (n_authors = 0; authors[n_authors]; n_authors++) - ; - version_etc_arn (stream, command_name, package, version, authors, n_authors); -} - -/* Display the --version information the standard way. See the initial - comment to this module, for more information. - - Author names are given in the NULL-terminated va_list AUTHORS. */ -void -version_etc_va (FILE *stream, - const char *command_name, const char *package, - const char *version, va_list authors) -{ - size_t n_authors; - const char *authtab[10]; - - for (n_authors = 0; - n_authors < 10 - && (authtab[n_authors] = va_arg (authors, const char *)) != NULL; - n_authors++) - ; - version_etc_arn (stream, command_name, package, version, - authtab, n_authors); -} - - -/* Display the --version information the standard way. - - If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of - the program. The formats are therefore: - - PACKAGE VERSION - - or - - COMMAND_NAME (PACKAGE) VERSION. - - The authors names are passed as separate arguments, with an additional - NULL argument at the end. */ -void -version_etc (FILE *stream, - const char *command_name, const char *package, - const char *version, /* const char *author1, ...*/ ...) -{ - va_list authors; - - va_start (authors, version); - version_etc_va (stream, command_name, package, version, authors); - va_end (authors); -} - -void -emit_bug_reporting_address (void) -{ - /* TRANSLATORS: The placeholder indicates the bug-reporting address - for this package. Please add _another line_ saying - "Report translation bugs to <...>\n" with the address for translation - bugs (typically your translation team's web or email address). */ - printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT); -#ifdef PACKAGE_PACKAGER_BUG_REPORTS - printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER, - PACKAGE_PACKAGER_BUG_REPORTS); -#endif -#ifdef PACKAGE_URL - printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); -#else - printf (_("%s home page: \n"), - PACKAGE_NAME, PACKAGE); -#endif - fputs (_("General help using GNU software: \n"), - stdout); -} diff --git a/gnulib/lib/version-etc.h b/gnulib/lib/version-etc.h deleted file mode 100644 index a9b313d..0000000 --- a/gnulib/lib/version-etc.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Print --version and bug-reporting information in a consistent format. - Copyright (C) 1999, 2003, 2005, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#ifndef VERSION_ETC_H -# define VERSION_ETC_H 1 - -# include -# include - -/* The `sentinel' attribute was added in gcc 4.0. */ -#ifndef _GL_ATTRIBUTE_SENTINEL -# if 4 <= __GNUC__ -# define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__)) -# else -# define _GL_ATTRIBUTE_SENTINEL /* empty */ -# endif -#endif - -extern const char version_etc_copyright[]; - -/* The three functions below display the --version information in the - standard way: command and package names, package version, followed - by a short GPLv3+ notice and a list of up to 10 author names. - - If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of - the program. The formats are therefore: - - PACKAGE VERSION - - or - - COMMAND_NAME (PACKAGE) VERSION. - - The functions differ in the way they are passed author names: */ - -/* N_AUTHORS names are supplied in array AUTHORS. */ -extern void version_etc_arn (FILE *stream, - const char *command_name, const char *package, - const char *version, - const char * const * authors, size_t n_authors); - -/* Names are passed in the NULL-terminated array AUTHORS. */ -extern void version_etc_ar (FILE *stream, - const char *command_name, const char *package, - const char *version, const char * const * authors); - -/* Names are passed in the NULL-terminated va_list. */ -extern void version_etc_va (FILE *stream, - const char *command_name, const char *package, - const char *version, va_list authors); - -/* Names are passed as separate arguments, with an additional - NULL argument at the end. */ -extern void version_etc (FILE *stream, - const char *command_name, const char *package, - const char *version, - /* const char *author1, ..., NULL */ ...) - _GL_ATTRIBUTE_SENTINEL; - -/* Display the usual `Report bugs to' stanza */ -extern void emit_bug_reporting_address (void); - -#endif /* VERSION_ETC_H */ diff --git a/gnulib/lib/wchar.in.h b/gnulib/lib/wchar.in.h deleted file mode 100644 index ab4c806..0000000 --- a/gnulib/lib/wchar.in.h +++ /dev/null @@ -1,990 +0,0 @@ -/* A substitute for ISO C99 , for platforms that have issues. - - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Eric Blake. */ - -/* - * ISO C 99 for platforms that have issues. - * - * - * For now, this just ensures proper prerequisite inclusion order and - * the declaration of wcwidth(). - */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H -/* Special invocation convention: - - Inside glibc and uClibc header files. - - On HP-UX 11.00 we have a sequence of nested includes - -> -> , and the latter includes , - once indirectly -> -> -> - and once directly. In both situations 'wint_t' is not yet defined, - therefore we cannot provide the function overrides; instead include only - the system's . - - On IRIX 6.5, similarly, we have an include -> , and - the latter includes . But here, we have no way to detect whether - is completely included or is still being included. */ - -#@INCLUDE_NEXT@ @NEXT_WCHAR_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _GL_WCHAR_H - -#define _GL_ALREADY_INCLUDING_WCHAR_H - -#if @HAVE_FEATURES_H@ -# include /* for __GLIBC__ */ -#endif - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . - But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -# include -# include -# include -#endif - -/* Include the original if it exists. - Some builds of uClibc lack it. */ -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_WCHAR_H@ -# @INCLUDE_NEXT@ @NEXT_WCHAR_H@ -#endif - -#undef _GL_ALREADY_INCLUDING_WCHAR_H - -#ifndef _GL_WCHAR_H -#define _GL_WCHAR_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Define wint_t and WEOF. (Also done in wctype.in.h.) */ -#if !@HAVE_WINT_T@ && !defined wint_t -# define wint_t int -# ifndef WEOF -# define WEOF -1 -# endif -#else -# ifndef WEOF -# define WEOF ((wint_t) -1) -# endif -#endif - - -/* Override mbstate_t if it is too small. - On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for - implementing mbrtowc for encodings like UTF-8. */ -#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ -# if !GNULIB_defined_mbstate_t -typedef int rpl_mbstate_t; -# undef mbstate_t -# define mbstate_t rpl_mbstate_t -# define GNULIB_defined_mbstate_t 1 -# endif -#endif - - -/* Convert a single-byte character to a wide character. */ -#if @GNULIB_BTOWC@ -# if @REPLACE_BTOWC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef btowc -# define btowc rpl_btowc -# endif -_GL_FUNCDECL_RPL (btowc, wint_t, (int c)); -_GL_CXXALIAS_RPL (btowc, wint_t, (int c)); -# else -# if !@HAVE_BTOWC@ -_GL_FUNCDECL_SYS (btowc, wint_t, (int c)); -# endif -_GL_CXXALIAS_SYS (btowc, wint_t, (int c)); -# endif -_GL_CXXALIASWARN (btowc); -#elif defined GNULIB_POSIXCHECK -# undef btowc -# if HAVE_RAW_DECL_BTOWC -_GL_WARN_ON_USE (btowc, "btowc is unportable - " - "use gnulib module btowc for portability"); -# endif -#endif - - -/* Convert a wide character to a single-byte character. */ -#if @GNULIB_WCTOB@ -# if @REPLACE_WCTOB@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wctob -# define wctob rpl_wctob -# endif -_GL_FUNCDECL_RPL (wctob, int, (wint_t wc)); -_GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); -# else -# if !defined wctob && !@HAVE_DECL_WCTOB@ -/* wctob is provided by gnulib, or wctob exists but is not declared. */ -_GL_FUNCDECL_SYS (wctob, int, (wint_t wc)); -# endif -_GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); -# endif -_GL_CXXALIASWARN (wctob); -#elif defined GNULIB_POSIXCHECK -# undef wctob -# if HAVE_RAW_DECL_WCTOB -_GL_WARN_ON_USE (wctob, "wctob is unportable - " - "use gnulib module wctob for portability"); -# endif -#endif - - -/* Test whether *PS is in the initial state. */ -#if @GNULIB_MBSINIT@ -# if @REPLACE_MBSINIT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbsinit -# define mbsinit rpl_mbsinit -# endif -_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); -_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); -# else -# if !@HAVE_MBSINIT@ -_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbsinit); -#elif defined GNULIB_POSIXCHECK -# undef mbsinit -# if HAVE_RAW_DECL_MBSINIT -_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " - "use gnulib module mbsinit for portability"); -# endif -#endif - - -/* Convert a multibyte character to a wide character. */ -#if @GNULIB_MBRTOWC@ -# if @REPLACE_MBRTOWC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbrtowc -# define mbrtowc rpl_mbrtowc -# endif -_GL_FUNCDECL_RPL (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -_GL_CXXALIAS_RPL (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -# else -# if !@HAVE_MBRTOWC@ -_GL_FUNCDECL_SYS (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbrtowc); -#elif defined GNULIB_POSIXCHECK -# undef mbrtowc -# if HAVE_RAW_DECL_MBRTOWC -_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " - "use gnulib module mbrtowc for portability"); -# endif -#endif - - -/* Recognize a multibyte character. */ -#if @GNULIB_MBRLEN@ -# if @REPLACE_MBRLEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbrlen -# define mbrlen rpl_mbrlen -# endif -_GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -_GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -# else -# if !@HAVE_MBRLEN@ -_GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbrlen); -#elif defined GNULIB_POSIXCHECK -# undef mbrlen -# if HAVE_RAW_DECL_MBRLEN -_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " - "use gnulib module mbrlen for portability"); -# endif -#endif - - -/* Convert a string to a wide string. */ -#if @GNULIB_MBSRTOWCS@ -# if @REPLACE_MBSRTOWCS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbsrtowcs -# define mbsrtowcs rpl_mbsrtowcs -# endif -_GL_FUNCDECL_RPL (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_MBSRTOWCS@ -_GL_FUNCDECL_SYS (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbsrtowcs); -#elif defined GNULIB_POSIXCHECK -# undef mbsrtowcs -# if HAVE_RAW_DECL_MBSRTOWCS -_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " - "use gnulib module mbsrtowcs for portability"); -# endif -#endif - - -/* Convert a string to a wide string. */ -#if @GNULIB_MBSNRTOWCS@ -# if @REPLACE_MBSNRTOWCS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbsnrtowcs -# define mbsnrtowcs rpl_mbsnrtowcs -# endif -_GL_FUNCDECL_RPL (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_MBSNRTOWCS@ -_GL_FUNCDECL_SYS (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbsnrtowcs); -#elif defined GNULIB_POSIXCHECK -# undef mbsnrtowcs -# if HAVE_RAW_DECL_MBSNRTOWCS -_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " - "use gnulib module mbsnrtowcs for portability"); -# endif -#endif - - -/* Convert a wide character to a multibyte character. */ -#if @GNULIB_WCRTOMB@ -# if @REPLACE_WCRTOMB@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcrtomb -# define wcrtomb rpl_wcrtomb -# endif -_GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -_GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -# else -# if !@HAVE_WCRTOMB@ -_GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (wcrtomb); -#elif defined GNULIB_POSIXCHECK -# undef wcrtomb -# if HAVE_RAW_DECL_WCRTOMB -_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " - "use gnulib module wcrtomb for portability"); -# endif -#endif - - -/* Convert a wide string to a string. */ -#if @GNULIB_WCSRTOMBS@ -# if @REPLACE_WCSRTOMBS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcsrtombs -# define wcsrtombs rpl_wcsrtombs -# endif -_GL_FUNCDECL_RPL (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_WCSRTOMBS@ -_GL_FUNCDECL_SYS (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (wcsrtombs); -#elif defined GNULIB_POSIXCHECK -# undef wcsrtombs -# if HAVE_RAW_DECL_WCSRTOMBS -_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " - "use gnulib module wcsrtombs for portability"); -# endif -#endif - - -/* Convert a wide string to a string. */ -#if @GNULIB_WCSNRTOMBS@ -# if @REPLACE_WCSNRTOMBS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcsnrtombs -# define wcsnrtombs rpl_wcsnrtombs -# endif -_GL_FUNCDECL_RPL (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_WCSNRTOMBS@ -_GL_FUNCDECL_SYS (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (wcsnrtombs); -#elif defined GNULIB_POSIXCHECK -# undef wcsnrtombs -# if HAVE_RAW_DECL_WCSNRTOMBS -_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " - "use gnulib module wcsnrtombs for portability"); -# endif -#endif - - -/* Return the number of screen columns needed for WC. */ -#if @GNULIB_WCWIDTH@ -# if @REPLACE_WCWIDTH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcwidth -# define wcwidth rpl_wcwidth -# endif -_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t)); -_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); -# else -# if !@HAVE_DECL_WCWIDTH@ -/* wcwidth exists but is not declared. */ -_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t)); -# endif -_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); -# endif -_GL_CXXALIASWARN (wcwidth); -#elif defined GNULIB_POSIXCHECK -# undef wcwidth -# if HAVE_RAW_DECL_WCWIDTH -_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " - "use gnulib module wcwidth for portability"); -# endif -#endif - - -/* Search N wide characters of S for C. */ -#if @GNULIB_WMEMCHR@ -# if !@HAVE_WMEMCHR@ -_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { - const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t); - wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t); - } */ -_GL_CXXALIAS_SYS_CAST2 (wmemchr, - wchar_t *, (const wchar_t *, wchar_t, size_t), - const wchar_t *, (const wchar_t *, wchar_t, size_t)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); -_GL_CXXALIASWARN1 (wmemchr, const wchar_t *, - (const wchar_t *s, wchar_t c, size_t n)); -# else -_GL_CXXALIASWARN (wmemchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef wmemchr -# if HAVE_RAW_DECL_WMEMCHR -_GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " - "use gnulib module wmemchr for portability"); -# endif -#endif - - -/* Compare N wide characters of S1 and S2. */ -#if @GNULIB_WMEMCMP@ -# if !@HAVE_WMEMCMP@ -_GL_FUNCDECL_SYS (wmemcmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); -# endif -_GL_CXXALIAS_SYS (wmemcmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); -_GL_CXXALIASWARN (wmemcmp); -#elif defined GNULIB_POSIXCHECK -# undef wmemcmp -# if HAVE_RAW_DECL_WMEMCMP -_GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " - "use gnulib module wmemcmp for portability"); -# endif -#endif - - -/* Copy N wide characters of SRC to DEST. */ -#if @GNULIB_WMEMCPY@ -# if !@HAVE_WMEMCPY@ -_GL_FUNCDECL_SYS (wmemcpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -# endif -_GL_CXXALIAS_SYS (wmemcpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -_GL_CXXALIASWARN (wmemcpy); -#elif defined GNULIB_POSIXCHECK -# undef wmemcpy -# if HAVE_RAW_DECL_WMEMCPY -_GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " - "use gnulib module wmemcpy for portability"); -# endif -#endif - - -/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for - overlapping memory areas. */ -#if @GNULIB_WMEMMOVE@ -# if !@HAVE_WMEMMOVE@ -_GL_FUNCDECL_SYS (wmemmove, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -# endif -_GL_CXXALIAS_SYS (wmemmove, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -_GL_CXXALIASWARN (wmemmove); -#elif defined GNULIB_POSIXCHECK -# undef wmemmove -# if HAVE_RAW_DECL_WMEMMOVE -_GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " - "use gnulib module wmemmove for portability"); -# endif -#endif - - -/* Set N wide characters of S to C. */ -#if @GNULIB_WMEMSET@ -# if !@HAVE_WMEMSET@ -_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); -# endif -_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); -_GL_CXXALIASWARN (wmemset); -#elif defined GNULIB_POSIXCHECK -# undef wmemset -# if HAVE_RAW_DECL_WMEMSET -_GL_WARN_ON_USE (wmemset, "wmemset is unportable - " - "use gnulib module wmemset for portability"); -# endif -#endif - - -/* Return the number of wide characters in S. */ -#if @GNULIB_WCSLEN@ -# if !@HAVE_WCSLEN@ -_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s)); -# endif -_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); -_GL_CXXALIASWARN (wcslen); -#elif defined GNULIB_POSIXCHECK -# undef wcslen -# if HAVE_RAW_DECL_WCSLEN -_GL_WARN_ON_USE (wcslen, "wcslen is unportable - " - "use gnulib module wcslen for portability"); -# endif -#endif - - -/* Return the number of wide characters in S, but at most MAXLEN. */ -#if @GNULIB_WCSNLEN@ -# if !@HAVE_WCSNLEN@ -_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); -# endif -_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); -_GL_CXXALIASWARN (wcsnlen); -#elif defined GNULIB_POSIXCHECK -# undef wcsnlen -# if HAVE_RAW_DECL_WCSNLEN -_GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " - "use gnulib module wcsnlen for portability"); -# endif -#endif - - -/* Copy SRC to DEST. */ -#if @GNULIB_WCSCPY@ -# if !@HAVE_WCSCPY@ -_GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); -# endif -_GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); -_GL_CXXALIASWARN (wcscpy); -#elif defined GNULIB_POSIXCHECK -# undef wcscpy -# if HAVE_RAW_DECL_WCSCPY -_GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " - "use gnulib module wcscpy for portability"); -# endif -#endif - - -/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ -#if @GNULIB_WCPCPY@ -# if !@HAVE_WCPCPY@ -_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); -# endif -_GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); -_GL_CXXALIASWARN (wcpcpy); -#elif defined GNULIB_POSIXCHECK -# undef wcpcpy -# if HAVE_RAW_DECL_WCPCPY -_GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " - "use gnulib module wcpcpy for portability"); -# endif -#endif - - -/* Copy no more than N wide characters of SRC to DEST. */ -#if @GNULIB_WCSNCPY@ -# if !@HAVE_WCSNCPY@ -_GL_FUNCDECL_SYS (wcsncpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcsncpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -_GL_CXXALIASWARN (wcsncpy); -#elif defined GNULIB_POSIXCHECK -# undef wcsncpy -# if HAVE_RAW_DECL_WCSNCPY -_GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " - "use gnulib module wcsncpy for portability"); -# endif -#endif - - -/* Copy no more than N characters of SRC to DEST, returning the address of - the last character written into DEST. */ -#if @GNULIB_WCPNCPY@ -# if !@HAVE_WCPNCPY@ -_GL_FUNCDECL_SYS (wcpncpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcpncpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -_GL_CXXALIASWARN (wcpncpy); -#elif defined GNULIB_POSIXCHECK -# undef wcpncpy -# if HAVE_RAW_DECL_WCPNCPY -_GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " - "use gnulib module wcpncpy for portability"); -# endif -#endif - - -/* Append SRC onto DEST. */ -#if @GNULIB_WCSCAT@ -# if !@HAVE_WCSCAT@ -_GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); -# endif -_GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); -_GL_CXXALIASWARN (wcscat); -#elif defined GNULIB_POSIXCHECK -# undef wcscat -# if HAVE_RAW_DECL_WCSCAT -_GL_WARN_ON_USE (wcscat, "wcscat is unportable - " - "use gnulib module wcscat for portability"); -# endif -#endif - - -/* Append no more than N wide characters of SRC onto DEST. */ -#if @GNULIB_WCSNCAT@ -# if !@HAVE_WCSNCAT@ -_GL_FUNCDECL_SYS (wcsncat, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcsncat, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -_GL_CXXALIASWARN (wcsncat); -#elif defined GNULIB_POSIXCHECK -# undef wcsncat -# if HAVE_RAW_DECL_WCSNCAT -_GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " - "use gnulib module wcsncat for portability"); -# endif -#endif - - -/* Compare S1 and S2. */ -#if @GNULIB_WCSCMP@ -# if !@HAVE_WCSCMP@ -_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); -# endif -_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); -_GL_CXXALIASWARN (wcscmp); -#elif defined GNULIB_POSIXCHECK -# undef wcscmp -# if HAVE_RAW_DECL_WCSCMP -_GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " - "use gnulib module wcscmp for portability"); -# endif -#endif - - -/* Compare no more than N wide characters of S1 and S2. */ -#if @GNULIB_WCSNCMP@ -# if !@HAVE_WCSNCMP@ -_GL_FUNCDECL_SYS (wcsncmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcsncmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); -_GL_CXXALIASWARN (wcsncmp); -#elif defined GNULIB_POSIXCHECK -# undef wcsncmp -# if HAVE_RAW_DECL_WCSNCMP -_GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " - "use gnulib module wcsncmp for portability"); -# endif -#endif - - -/* Compare S1 and S2, ignoring case. */ -#if @GNULIB_WCSCASECMP@ -# if !@HAVE_WCSCASECMP@ -_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); -# endif -_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); -_GL_CXXALIASWARN (wcscasecmp); -#elif defined GNULIB_POSIXCHECK -# undef wcscasecmp -# if HAVE_RAW_DECL_WCSCASECMP -_GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " - "use gnulib module wcscasecmp for portability"); -# endif -#endif - - -/* Compare no more than N chars of S1 and S2, ignoring case. */ -#if @GNULIB_WCSNCASECMP@ -# if !@HAVE_WCSNCASECMP@ -_GL_FUNCDECL_SYS (wcsncasecmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcsncasecmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); -_GL_CXXALIASWARN (wcsncasecmp); -#elif defined GNULIB_POSIXCHECK -# undef wcsncasecmp -# if HAVE_RAW_DECL_WCSNCASECMP -_GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " - "use gnulib module wcsncasecmp for portability"); -# endif -#endif - - -/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE - category of the current locale. */ -#if @GNULIB_WCSCOLL@ -# if !@HAVE_WCSCOLL@ -_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); -# endif -_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); -_GL_CXXALIASWARN (wcscoll); -#elif defined GNULIB_POSIXCHECK -# undef wcscoll -# if HAVE_RAW_DECL_WCSCOLL -_GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " - "use gnulib module wcscoll for portability"); -# endif -#endif - - -/* Transform S2 into array pointed to by S1 such that if wcscmp is applied - to two transformed strings the result is the as applying 'wcscoll' to the - original strings. */ -#if @GNULIB_WCSXFRM@ -# if !@HAVE_WCSXFRM@ -_GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); -_GL_CXXALIASWARN (wcsxfrm); -#elif defined GNULIB_POSIXCHECK -# undef wcsxfrm -# if HAVE_RAW_DECL_WCSXFRM -_GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " - "use gnulib module wcsxfrm for portability"); -# endif -#endif - - -/* Duplicate S, returning an identical malloc'd string. */ -#if @GNULIB_WCSDUP@ -# if !@HAVE_WCSDUP@ -_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s)); -# endif -_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); -_GL_CXXALIASWARN (wcsdup); -#elif defined GNULIB_POSIXCHECK -# undef wcsdup -# if HAVE_RAW_DECL_WCSDUP -_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " - "use gnulib module wcsdup for portability"); -# endif -#endif - - -/* Find the first occurrence of WC in WCS. */ -#if @GNULIB_WCSCHR@ -# if !@HAVE_WCSCHR@ -_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { - const wchar_t * std::wcschr (const wchar_t *, wchar_t); - wchar_t * std::wcschr (wchar_t *, wchar_t); - } */ -_GL_CXXALIAS_SYS_CAST2 (wcschr, - wchar_t *, (const wchar_t *, wchar_t), - const wchar_t *, (const wchar_t *, wchar_t)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc)); -_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); -# else -_GL_CXXALIASWARN (wcschr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef wcschr -# if HAVE_RAW_DECL_WCSCHR -_GL_WARN_ON_USE (wcschr, "wcschr is unportable - " - "use gnulib module wcschr for portability"); -# endif -#endif - - -/* Find the last occurrence of WC in WCS. */ -#if @GNULIB_WCSRCHR@ -# if !@HAVE_WCSRCHR@ -_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { - const wchar_t * std::wcsrchr (const wchar_t *, wchar_t); - wchar_t * std::wcsrchr (wchar_t *, wchar_t); - } */ -_GL_CXXALIAS_SYS_CAST2 (wcsrchr, - wchar_t *, (const wchar_t *, wchar_t), - const wchar_t *, (const wchar_t *, wchar_t)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc)); -_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); -# else -_GL_CXXALIASWARN (wcsrchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef wcsrchr -# if HAVE_RAW_DECL_WCSRCHR -_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " - "use gnulib module wcsrchr for portability"); -# endif -#endif - - -/* Return the length of the initial segmet of WCS which consists entirely - of wide characters not in REJECT. */ -#if @GNULIB_WCSCSPN@ -# if !@HAVE_WCSCSPN@ -_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); -# endif -_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); -_GL_CXXALIASWARN (wcscspn); -#elif defined GNULIB_POSIXCHECK -# undef wcscspn -# if HAVE_RAW_DECL_WCSCSPN -_GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " - "use gnulib module wcscspn for portability"); -# endif -#endif - - -/* Return the length of the initial segmet of WCS which consists entirely - of wide characters in ACCEPT. */ -#if @GNULIB_WCSSPN@ -# if !@HAVE_WCSSPN@ -_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); -# endif -_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); -_GL_CXXALIASWARN (wcsspn); -#elif defined GNULIB_POSIXCHECK -# undef wcsspn -# if HAVE_RAW_DECL_WCSSPN -_GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " - "use gnulib module wcsspn for portability"); -# endif -#endif - - -/* Find the first occurrence in WCS of any character in ACCEPT. */ -#if @GNULIB_WCSPBRK@ -# if !@HAVE_WCSPBRK@ -_GL_FUNCDECL_SYS (wcspbrk, wchar_t *, - (const wchar_t *wcs, const wchar_t *accept)); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { - const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *); - wchar_t * std::wcspbrk (wchar_t *, const wchar_t *); - } */ -_GL_CXXALIAS_SYS_CAST2 (wcspbrk, - wchar_t *, (const wchar_t *, const wchar_t *), - const wchar_t *, (const wchar_t *, const wchar_t *)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (wcspbrk, wchar_t *, - (wchar_t *wcs, const wchar_t *accept)); -_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, - (const wchar_t *wcs, const wchar_t *accept)); -# else -_GL_CXXALIASWARN (wcspbrk); -# endif -#elif defined GNULIB_POSIXCHECK -# undef wcspbrk -# if HAVE_RAW_DECL_WCSPBRK -_GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " - "use gnulib module wcspbrk for portability"); -# endif -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK. */ -#if @GNULIB_WCSSTR@ -# if !@HAVE_WCSSTR@ -_GL_FUNCDECL_SYS (wcsstr, wchar_t *, - (const wchar_t *haystack, const wchar_t *needle)); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { - const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); - wchar_t * std::wcsstr (wchar_t *, const wchar_t *); - } */ -_GL_CXXALIAS_SYS_CAST2 (wcsstr, - wchar_t *, (const wchar_t *, const wchar_t *), - const wchar_t *, (const wchar_t *, const wchar_t *)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (wcsstr, wchar_t *, - (wchar_t *haystack, const wchar_t *needle)); -_GL_CXXALIASWARN1 (wcsstr, const wchar_t *, - (const wchar_t *haystack, const wchar_t *needle)); -# else -_GL_CXXALIASWARN (wcsstr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef wcsstr -# if HAVE_RAW_DECL_WCSSTR -_GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " - "use gnulib module wcsstr for portability"); -# endif -#endif - - -/* Divide WCS into tokens separated by characters in DELIM. */ -#if @GNULIB_WCSTOK@ -# if !@HAVE_WCSTOK@ -_GL_FUNCDECL_SYS (wcstok, wchar_t *, - (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); -# endif -_GL_CXXALIAS_SYS (wcstok, wchar_t *, - (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); -_GL_CXXALIASWARN (wcstok); -#elif defined GNULIB_POSIXCHECK -# undef wcstok -# if HAVE_RAW_DECL_WCSTOK -_GL_WARN_ON_USE (wcstok, "wcstok is unportable - " - "use gnulib module wcstok for portability"); -# endif -#endif - - -/* Determine number of column positions required for first N wide - characters (or fewer if S ends before this) in S. */ -#if @GNULIB_WCSWIDTH@ -# if @REPLACE_WCSWIDTH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcswidth -# define wcswidth rpl_wcswidth -# endif -_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)); -_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); -# else -# if !@HAVE_WCSWIDTH@ -_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); -# endif -_GL_CXXALIASWARN (wcswidth); -#elif defined GNULIB_POSIXCHECK -# undef wcswidth -# if HAVE_RAW_DECL_WCSWIDTH -_GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " - "use gnulib module wcswidth for portability"); -# endif -#endif - - -#endif /* _GL_WCHAR_H */ -#endif /* _GL_WCHAR_H */ -#endif diff --git a/gnulib/lib/wcrtomb.c b/gnulib/lib/wcrtomb.c deleted file mode 100644 index 6632589..0000000 --- a/gnulib/lib/wcrtomb.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Convert wide character to multibyte character. - Copyright (C) 2008-2011 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -#include - - -size_t -wcrtomb (char *s, wchar_t wc, mbstate_t *ps) -{ - /* This implementation of wcrtomb on top of wctomb() supports only - stateless encodings. ps must be in the initial state. */ - if (ps != NULL && !mbsinit (ps)) - { - errno = EINVAL; - return (size_t)(-1); - } - - if (s == NULL) - /* We know the NUL wide character corresponds to the NUL character. */ - return 1; - else - { - int ret = wctomb (s, wc); - - if (ret >= 0) - return ret; - else - { - errno = EILSEQ; - return (size_t)(-1); - } - } -} diff --git a/gnulib/lib/wctype.in.h b/gnulib/lib/wctype.in.h deleted file mode 100644 index 65879aa..0000000 --- a/gnulib/lib/wctype.in.h +++ /dev/null @@ -1,470 +0,0 @@ -/* A substitute for ISO C99 , for platforms that lack it. - - Copyright (C) 2006-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Bruno Haible and Paul Eggert. */ - -/* - * ISO C 99 for platforms that lack it. - * - * - * iswctype, towctrans, towlower, towupper, wctrans, wctype, - * wctrans_t, and wctype_t are not yet implemented. - */ - -#ifndef _GL_WCTYPE_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if @HAVE_WINT_T@ -/* Solaris 2.5 has a bug: must be included before . - Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# include -#endif - -/* Include the original if it exists. - BeOS 5 has the functions but no . */ -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_WCTYPE_H@ -# @INCLUDE_NEXT@ @NEXT_WCTYPE_H@ -#endif - -#ifndef _GL_WCTYPE_H -#define _GL_WCTYPE_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Define wint_t and WEOF. (Also done in wchar.in.h.) */ -#if !@HAVE_WINT_T@ && !defined wint_t -# define wint_t int -# ifndef WEOF -# define WEOF -1 -# endif -#else -# ifndef WEOF -# define WEOF ((wint_t) -1) -# endif -#endif - - -#if !GNULIB_defined_wctype_functions - -/* FreeBSD 4.4 to 4.11 has but lacks the functions. - Linux libc5 has and the functions but they are broken. - Assume all 11 functions (all isw* except iswblank) are implemented the - same way, or not at all. */ -# if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@ - -/* IRIX 5.3 has macros but no functions, its isw* macros refer to an - undefined variable _ctmp_ and to macros like _P, and they - refer to system functions like _iswctype that are not in the - standard C library. Rather than try to get ancient buggy - implementations like this to work, just disable them. */ -# undef iswalnum -# undef iswalpha -# undef iswblank -# undef iswcntrl -# undef iswdigit -# undef iswgraph -# undef iswlower -# undef iswprint -# undef iswpunct -# undef iswspace -# undef iswupper -# undef iswxdigit -# undef towlower -# undef towupper - -/* Linux libc5 has and the functions but they are broken. */ -# if @REPLACE_ISWCNTRL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define iswalnum rpl_iswalnum -# define iswalpha rpl_iswalpha -# define iswblank rpl_iswblank -# define iswcntrl rpl_iswcntrl -# define iswdigit rpl_iswdigit -# define iswgraph rpl_iswgraph -# define iswlower rpl_iswlower -# define iswprint rpl_iswprint -# define iswpunct rpl_iswpunct -# define iswspace rpl_iswspace -# define iswupper rpl_iswupper -# define iswxdigit rpl_iswxdigit -# define towlower rpl_towlower -# define towupper rpl_towupper -# endif -# endif - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswalnum -# else -iswalnum -# endif - (wint_t wc) -{ - return ((wc >= '0' && wc <= '9') - || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswalpha -# else -iswalpha -# endif - (wint_t wc) -{ - return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswblank -# else -iswblank -# endif - (wint_t wc) -{ - return wc == ' ' || wc == '\t'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswcntrl -# else -iswcntrl -# endif - (wint_t wc) -{ - return (wc & ~0x1f) == 0 || wc == 0x7f; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswdigit -# else -iswdigit -# endif - (wint_t wc) -{ - return wc >= '0' && wc <= '9'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswgraph -# else -iswgraph -# endif - (wint_t wc) -{ - return wc >= '!' && wc <= '~'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswlower -# else -iswlower -# endif - (wint_t wc) -{ - return wc >= 'a' && wc <= 'z'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswprint -# else -iswprint -# endif - (wint_t wc) -{ - return wc >= ' ' && wc <= '~'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswpunct -# else -iswpunct -# endif - (wint_t wc) -{ - return (wc >= '!' && wc <= '~' - && !((wc >= '0' && wc <= '9') - || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswspace -# else -iswspace -# endif - (wint_t wc) -{ - return (wc == ' ' || wc == '\t' - || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswupper -# else -iswupper -# endif - (wint_t wc) -{ - return wc >= 'A' && wc <= 'Z'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswxdigit -# else -iswxdigit -# endif - (wint_t wc) -{ - return ((wc >= '0' && wc <= '9') - || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); -} - -static inline wint_t -# if @REPLACE_ISWCNTRL@ -rpl_towlower -# else -towlower -# endif - (wint_t wc) -{ - return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc); -} - -static inline wint_t -# if @REPLACE_ISWCNTRL@ -rpl_towupper -# else -towupper -# endif - (wint_t wc) -{ - return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc); -} - -# elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@) -/* Only the iswblank function is missing. */ - -# if @REPLACE_ISWBLANK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define iswblank rpl_iswblank -# endif -_GL_FUNCDECL_RPL (iswblank, int, (wint_t wc)); -# else -_GL_FUNCDECL_SYS (iswblank, int, (wint_t wc)); -# endif - -# endif - -# if defined __MINGW32__ - -/* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. - The functions towlower and towupper are implemented in the MSVCRT library - to take a wchar_t argument and return a wchar_t result. mingw declares - these functions to take a wint_t argument and return a wint_t result. - This means that: - 1. When the user passes an argument outside the range 0x0000..0xFFFF, the - function will look only at the lower 16 bits. This is allowed according - to POSIX. - 2. The return value is returned in the lower 16 bits of the result register. - The upper 16 bits are random: whatever happened to be in that part of the - result register. We need to fix this by adding a zero-extend from - wchar_t to wint_t after the call. */ - -static inline wint_t -rpl_towlower (wint_t wc) -{ - return (wint_t) (wchar_t) towlower (wc); -} -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define towlower rpl_towlower -# endif - -static inline wint_t -rpl_towupper (wint_t wc) -{ - return (wint_t) (wchar_t) towupper (wc); -} -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define towupper rpl_towupper -# endif - -# endif /* __MINGW32__ */ - -# define GNULIB_defined_wctype_functions 1 -#endif - -#if @REPLACE_ISWCNTRL@ -_GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc)); -#else -_GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswlower, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswprint, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswspace, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswupper, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc)); -#endif -_GL_CXXALIASWARN (iswalnum); -_GL_CXXALIASWARN (iswalpha); -_GL_CXXALIASWARN (iswcntrl); -_GL_CXXALIASWARN (iswdigit); -_GL_CXXALIASWARN (iswgraph); -_GL_CXXALIASWARN (iswlower); -_GL_CXXALIASWARN (iswprint); -_GL_CXXALIASWARN (iswpunct); -_GL_CXXALIASWARN (iswspace); -_GL_CXXALIASWARN (iswupper); -_GL_CXXALIASWARN (iswxdigit); - -#if @GNULIB_ISWBLANK@ -# if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@ -_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc)); -# else -_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc)); -# endif -_GL_CXXALIASWARN (iswblank); -#endif - -#if !@HAVE_WCTYPE_T@ -# if !GNULIB_defined_wctype_t -typedef void * wctype_t; -# define GNULIB_defined_wctype_t 1 -# endif -#endif - -/* Get a descriptor for a wide character property. */ -#if @GNULIB_WCTYPE@ -# if !@HAVE_WCTYPE_T@ -_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)); -# endif -_GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); -_GL_CXXALIASWARN (wctype); -#elif defined GNULIB_POSIXCHECK -# undef wctype -# if HAVE_RAW_DECL_WCTYPE -_GL_WARN_ON_USE (wctype, "wctype is unportable - " - "use gnulib module wctype for portability"); -# endif -#endif - -/* Test whether a wide character has a given property. - The argument WC must be either a wchar_t value or WEOF. - The argument DESC must have been returned by the wctype() function. */ -#if @GNULIB_ISWCTYPE@ -# if !@HAVE_WCTYPE_T@ -_GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc)); -# endif -_GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc)); -_GL_CXXALIASWARN (iswctype); -#elif defined GNULIB_POSIXCHECK -# undef iswctype -# if HAVE_RAW_DECL_ISWCTYPE -_GL_WARN_ON_USE (iswctype, "iswctype is unportable - " - "use gnulib module iswctype for portability"); -# endif -#endif - -#if @REPLACE_ISWCNTRL@ || defined __MINGW32__ -_GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc)); -_GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); -#else -_GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc)); -_GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc)); -#endif -_GL_CXXALIASWARN (towlower); -_GL_CXXALIASWARN (towupper); - -#if !@HAVE_WCTRANS_T@ -# if !GNULIB_defined_wctrans_t -typedef void * wctrans_t; -# define GNULIB_defined_wctrans_t 1 -# endif -#endif - -/* Get a descriptor for a wide character case conversion. */ -#if @GNULIB_WCTRANS@ -# if !@HAVE_WCTRANS_T@ -_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)); -# endif -_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); -_GL_CXXALIASWARN (wctrans); -#elif defined GNULIB_POSIXCHECK -# undef wctrans -# if HAVE_RAW_DECL_WCTRANS -_GL_WARN_ON_USE (wctrans, "wctrans is unportable - " - "use gnulib module wctrans for portability"); -# endif -#endif - -/* Perform a given case conversion on a wide character. - The argument WC must be either a wchar_t value or WEOF. - The argument DESC must have been returned by the wctrans() function. */ -#if @GNULIB_TOWCTRANS@ -# if !@HAVE_WCTRANS_T@ -_GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); -# endif -_GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); -_GL_CXXALIASWARN (towctrans); -#elif defined GNULIB_POSIXCHECK -# undef towctrans -# if HAVE_RAW_DECL_TOWCTRANS -_GL_WARN_ON_USE (towctrans, "towctrans is unportable - " - "use gnulib module towctrans for portability"); -# endif -#endif - - -#endif /* _GL_WCTYPE_H */ -#endif /* _GL_WCTYPE_H */ diff --git a/gnulib/lib/wcwidth.c b/gnulib/lib/wcwidth.c deleted file mode 100644 index a006ca7..0000000 --- a/gnulib/lib/wcwidth.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Determine the number of screen columns needed for a character. - Copyright (C) 2006-2007, 2010-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -/* Get iswprint. */ -#include - -#include "localcharset.h" -#include "streq.h" -#include "uniwidth.h" - -int -wcwidth (wchar_t wc) -#undef wcwidth -{ - /* In UTF-8 locales, use a Unicode aware width function. */ - const char *encoding = locale_charset (); - if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0)) - { - /* We assume that in a UTF-8 locale, a wide character is the same as a - Unicode character. */ - return uc_width (wc, encoding); - } - else - { - /* Otherwise, fall back to the system's wcwidth function. */ -#if HAVE_WCWIDTH - return wcwidth (wc); -#else - return wc == 0 ? 0 : iswprint (wc) ? 1 : -1; -#endif - } -} diff --git a/gnulib/lib/xalloc-die.c b/gnulib/lib/xalloc-die.c deleted file mode 100644 index aba4a06..0000000 --- a/gnulib/lib/xalloc-die.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Report a memory allocation failure and exit. - - Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "xalloc.h" - -#include - -#include "error.h" -#include "exitfail.h" - -#include "gettext.h" -#define _(msgid) gettext (msgid) - -void -xalloc_die (void) -{ - error (exit_failure, 0, "%s", _("memory exhausted")); - - /* The `noreturn' cannot be given to error, since it may return if - its first argument is 0. To help compilers understand the - xalloc_die does not return, call abort. Also, the abort is a - safety feature if exit_failure is 0 (which shouldn't happen). */ - abort (); -} diff --git a/gnulib/lib/xalloc.h b/gnulib/lib/xalloc.h deleted file mode 100644 index 86b9b3e..0000000 --- a/gnulib/lib/xalloc.h +++ /dev/null @@ -1,292 +0,0 @@ -/* xalloc.h -- malloc with out-of-memory checking - - Copyright (C) 1990-2000, 2003-2004, 2006-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef XALLOC_H_ -# define XALLOC_H_ - -# include - - -# ifdef __cplusplus -extern "C" { -# endif - - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -# else -# define _GL_ATTRIBUTE_NORETURN /* empty */ -# endif - -# if __GNUC__ >= 3 -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -# else -# define _GL_ATTRIBUTE_MALLOC -# endif - -# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) -# else -# define _GL_ATTRIBUTE_ALLOC_SIZE(args) -# endif - -/* This function is always triggered when memory is exhausted. - It must be defined by the application, either explicitly - or by using gnulib's xalloc-die module. This is the - function to call when one wants the program to die because of a - memory allocation failure. */ -extern void xalloc_die (void) _GL_ATTRIBUTE_NORETURN; - -void *xmalloc (size_t s) - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); -void *xzalloc (size_t s) - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); -void *xcalloc (size_t n, size_t s) - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); -void *xrealloc (void *p, size_t s) - _GL_ATTRIBUTE_ALLOC_SIZE ((2)); -void *x2realloc (void *p, size_t *pn); -void *xmemdup (void const *p, size_t s) - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((2)); -char *xstrdup (char const *str) - _GL_ATTRIBUTE_MALLOC; - -/* Return 1 if an array of N objects, each of size S, cannot exist due - to size arithmetic overflow. S must be positive and N must be - nonnegative. This is a macro, not an inline function, so that it - works correctly even when SIZE_MAX < N. - - By gnulib convention, SIZE_MAX represents overflow in size - calculations, so the conservative dividend to use here is - SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. - However, malloc (SIZE_MAX) fails on all known hosts where - sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for - exactly-SIZE_MAX allocations on such hosts; this avoids a test and - branch when S is known to be 1. */ -# define xalloc_oversized(n, s) \ - ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) - - -/* In the following macros, T must be an elementary or structure/union or - typedef'ed type, or a pointer to such a type. To apply one of the - following macros to a function pointer or array type, you need to typedef - it first and use the typedef name. */ - -/* Allocate an object of type T dynamically, with error checking. */ -/* extern t *XMALLOC (typename t); */ -# define XMALLOC(t) ((t *) xmalloc (sizeof (t))) - -/* Allocate memory for N elements of type T, with error checking. */ -/* extern t *XNMALLOC (size_t n, typename t); */ -# define XNMALLOC(n, t) \ - ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t)))) - -/* Allocate an object of type T dynamically, with error checking, - and zero it. */ -/* extern t *XZALLOC (typename t); */ -# define XZALLOC(t) ((t *) xzalloc (sizeof (t))) - -/* Allocate memory for N elements of type T, with error checking, - and zero it. */ -/* extern t *XCALLOC (size_t n, typename t); */ -# define XCALLOC(n, t) \ - ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t)))) - - -# if HAVE_INLINE -# define static_inline static inline -# else -void *xnmalloc (size_t n, size_t s) - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); -void *xnrealloc (void *p, size_t n, size_t s) - _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)); -void *x2nrealloc (void *p, size_t *pn, size_t s); -char *xcharalloc (size_t n) - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); -# endif - -# ifdef static_inline - -/* Allocate an array of N objects, each with S bytes of memory, - dynamically, with error checking. S must be nonzero. */ - -static_inline void *xnmalloc (size_t n, size_t s) - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)); -static_inline void * -xnmalloc (size_t n, size_t s) -{ - if (xalloc_oversized (n, s)) - xalloc_die (); - return xmalloc (n * s); -} - -/* Change the size of an allocated block of memory P to an array of N - objects each of S bytes, with error checking. S must be nonzero. */ - -static_inline void *xnrealloc (void *p, size_t n, size_t s) - _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)); -static_inline void * -xnrealloc (void *p, size_t n, size_t s) -{ - if (xalloc_oversized (n, s)) - xalloc_die (); - return xrealloc (p, n * s); -} - -/* If P is null, allocate a block of at least *PN such objects; - otherwise, reallocate P so that it contains more than *PN objects - each of S bytes. *PN must be nonzero unless P is null, and S must - be nonzero. Set *PN to the new number of objects, and return the - pointer to the new block. *PN is never set to zero, and the - returned pointer is never null. - - Repeated reallocations are guaranteed to make progress, either by - allocating an initial block with a nonzero size, or by allocating a - larger block. - - In the following implementation, nonzero sizes are increased by a - factor of approximately 1.5 so that repeated reallocations have - O(N) overall cost rather than O(N**2) cost, but the - specification for this function does not guarantee that rate. - - Here is an example of use: - - int *p = NULL; - size_t used = 0; - size_t allocated = 0; - - void - append_int (int value) - { - if (used == allocated) - p = x2nrealloc (p, &allocated, sizeof *p); - p[used++] = value; - } - - This causes x2nrealloc to allocate a block of some nonzero size the - first time it is called. - - To have finer-grained control over the initial size, set *PN to a - nonzero value before calling this function with P == NULL. For - example: - - int *p = NULL; - size_t used = 0; - size_t allocated = 0; - size_t allocated1 = 1000; - - void - append_int (int value) - { - if (used == allocated) - { - p = x2nrealloc (p, &allocated1, sizeof *p); - allocated = allocated1; - } - p[used++] = value; - } - - */ - -static_inline void * -x2nrealloc (void *p, size_t *pn, size_t s) -{ - size_t n = *pn; - - if (! p) - { - if (! n) - { - /* The approximate size to use for initial small allocation - requests, when the invoking code specifies an old size of - zero. 64 bytes is the largest "small" request for the - GNU C library malloc. */ - enum { DEFAULT_MXFAST = 64 }; - - n = DEFAULT_MXFAST / s; - n += !n; - } - } - else - { - /* Set N = ceil (1.5 * N) so that progress is made if N == 1. - Check for overflow, so that N * S stays in size_t range. - The check is slightly conservative, but an exact check isn't - worth the trouble. */ - if ((size_t) -1 / 3 * 2 / s <= n) - xalloc_die (); - n += (n + 1) / 2; - } - - *pn = n; - return xrealloc (p, n * s); -} - -/* Return a pointer to a new buffer of N bytes. This is like xmalloc, - except it returns char *. */ - -static_inline char *xcharalloc (size_t n) - _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1)); -static_inline char * -xcharalloc (size_t n) -{ - return XNMALLOC (n, char); -} - -# endif - -# ifdef __cplusplus -} - -/* C++ does not allow conversions from void * to other pointer types - without a cast. Use templates to work around the problem when - possible. */ - -template inline T * -xrealloc (T *p, size_t s) -{ - return (T *) xrealloc ((void *) p, s); -} - -template inline T * -xnrealloc (T *p, size_t n, size_t s) -{ - return (T *) xnrealloc ((void *) p, n, s); -} - -template inline T * -x2realloc (T *p, size_t *pn) -{ - return (T *) x2realloc ((void *) p, pn); -} - -template inline T * -x2nrealloc (T *p, size_t *pn, size_t s) -{ - return (T *) x2nrealloc ((void *) p, pn, s); -} - -template inline T * -xmemdup (T const *p, size_t s) -{ - return (T *) xmemdup ((void const *) p, s); -} - -# endif - - -#endif /* !XALLOC_H_ */ diff --git a/gnulib/lib/xgetcwd.c b/gnulib/lib/xgetcwd.c deleted file mode 100644 index 1cf8cf0..0000000 --- a/gnulib/lib/xgetcwd.c +++ /dev/null @@ -1,41 +0,0 @@ -/* xgetcwd.c -- return current directory with unlimited length - - Copyright (C) 2001, 2003-2004, 2006-2007, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -#include "xgetcwd.h" - -#include -#include - -#include "xalloc.h" - -/* Return the current directory, newly allocated. - Upon an out-of-memory error, call xalloc_die. - Upon any other type of error, return NULL. */ - -char * -xgetcwd (void) -{ - char *cwd = getcwd (NULL, 0); - if (! cwd && errno == ENOMEM) - xalloc_die (); - return cwd; -} diff --git a/gnulib/lib/xgetcwd.h b/gnulib/lib/xgetcwd.h deleted file mode 100644 index 18685f6..0000000 --- a/gnulib/lib/xgetcwd.h +++ /dev/null @@ -1,17 +0,0 @@ -/* prototype for xgetcwd - Copyright (C) 1995, 2001, 2003, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -extern char *xgetcwd (void); diff --git a/gnulib/lib/xmalloc.c b/gnulib/lib/xmalloc.c deleted file mode 100644 index 08c30fb..0000000 --- a/gnulib/lib/xmalloc.c +++ /dev/null @@ -1,124 +0,0 @@ -/* xmalloc.c -- malloc with out of memory checking - - Copyright (C) 1990-2000, 2002-2006, 2008-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#if ! HAVE_INLINE -# define static_inline -#endif -#include "xalloc.h" -#undef static_inline - -#include -#include - -/* 1 if calloc is known to be compatible with GNU calloc. This - matters if we are not also using the calloc module, which defines - HAVE_CALLOC_GNU and supports the GNU API even on non-GNU platforms. */ -#if defined HAVE_CALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__) -enum { HAVE_GNU_CALLOC = 1 }; -#else -enum { HAVE_GNU_CALLOC = 0 }; -#endif - -/* Allocate N bytes of memory dynamically, with error checking. */ - -void * -xmalloc (size_t n) -{ - void *p = malloc (n); - if (!p && n != 0) - xalloc_die (); - return p; -} - -/* Change the size of an allocated block of memory P to N bytes, - with error checking. */ - -void * -xrealloc (void *p, size_t n) -{ - if (!n && p) - { - /* The GNU and C99 realloc behaviors disagree here. Act like - GNU, even if the underlying realloc is C99. */ - free (p); - return NULL; - } - - p = realloc (p, n); - if (!p && n) - xalloc_die (); - return p; -} - -/* If P is null, allocate a block of at least *PN bytes; otherwise, - reallocate P so that it contains more than *PN bytes. *PN must be - nonzero unless P is null. Set *PN to the new block's size, and - return the pointer to the new block. *PN is never set to zero, and - the returned pointer is never null. */ - -void * -x2realloc (void *p, size_t *pn) -{ - return x2nrealloc (p, pn, 1); -} - -/* Allocate S bytes of zeroed memory dynamically, with error checking. - There's no need for xnzalloc (N, S), since it would be equivalent - to xcalloc (N, S). */ - -void * -xzalloc (size_t s) -{ - return memset (xmalloc (s), 0, s); -} - -/* Allocate zeroed memory for N elements of S bytes, with error - checking. S must be nonzero. */ - -void * -xcalloc (size_t n, size_t s) -{ - void *p; - /* Test for overflow, since some calloc implementations don't have - proper overflow checks. But omit overflow and size-zero tests if - HAVE_GNU_CALLOC, since GNU calloc catches overflow and never - returns NULL if successful. */ - if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s)) - || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0))) - xalloc_die (); - return p; -} - -/* Clone an object P of size S, with error checking. There's no need - for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any - need for an arithmetic overflow check. */ - -void * -xmemdup (void const *p, size_t s) -{ - return memcpy (xmalloc (s), p, s); -} - -/* Clone STRING. */ - -char * -xstrdup (char const *string) -{ - return xmemdup (string, strlen (string) + 1); -} diff --git a/gnulib/lib/xsize.h b/gnulib/lib/xsize.h deleted file mode 100644 index 6505c42..0000000 --- a/gnulib/lib/xsize.h +++ /dev/null @@ -1,108 +0,0 @@ -/* xsize.h -- Checked size_t computations. - - Copyright (C) 2003, 2008-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _XSIZE_H -#define _XSIZE_H - -/* Get size_t. */ -#include - -/* Get SIZE_MAX. */ -#include -#if HAVE_STDINT_H -# include -#endif - -/* The size of memory objects is often computed through expressions of - type size_t. Example: - void* p = malloc (header_size + n * element_size). - These computations can lead to overflow. When this happens, malloc() - returns a piece of memory that is way too small, and the program then - crashes while attempting to fill the memory. - To avoid this, the functions and macros in this file check for overflow. - The convention is that SIZE_MAX represents overflow. - malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc - implementation that uses mmap --, it's recommended to use size_overflow_p() - or size_in_bounds_p() before invoking malloc(). - The example thus becomes: - size_t size = xsum (header_size, xtimes (n, element_size)); - void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); -*/ - -/* Convert an arbitrary value >= 0 to type size_t. */ -#define xcast_size_t(N) \ - ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) - -/* Sum of two sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xsum (size_t size1, size_t size2) -{ - size_t sum = size1 + size2; - return (sum >= size1 ? sum : SIZE_MAX); -} - -/* Sum of three sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xsum3 (size_t size1, size_t size2, size_t size3) -{ - return xsum (xsum (size1, size2), size3); -} - -/* Sum of four sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) -{ - return xsum (xsum (xsum (size1, size2), size3), size4); -} - -/* Maximum of two sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xmax (size_t size1, size_t size2) -{ - /* No explicit check is needed here, because for any n: - max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ - return (size1 >= size2 ? size1 : 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 - 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) - -/* Check for overflow. */ -#define size_overflow_p(SIZE) \ - ((SIZE) == SIZE_MAX) -/* Check against overflow. */ -#define size_in_bounds_p(SIZE) \ - ((SIZE) != SIZE_MAX) - -#endif /* _XSIZE_H */ diff --git a/gnulib/lib/xstrndup.c b/gnulib/lib/xstrndup.c deleted file mode 100644 index d58302a..0000000 --- a/gnulib/lib/xstrndup.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Duplicate a bounded initial segment of a string, with out-of-memory - checking. - Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include "xstrndup.h" - -#include -#include "xalloc.h" - -/* Return a newly allocated copy of at most N bytes of STRING. - In other words, return a copy of the initial segment of length N of - STRING. */ -char * -xstrndup (const char *string, size_t n) -{ - char *s = strndup (string, n); - if (! s) - xalloc_die (); - return s; -} diff --git a/gnulib/lib/xstrndup.h b/gnulib/lib/xstrndup.h deleted file mode 100644 index f96a538..0000000 --- a/gnulib/lib/xstrndup.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Duplicate a bounded initial segment of a string, with out-of-memory - checking. - Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Return a newly allocated copy of at most N bytes of STRING. - In other words, return a copy of the initial segment of length N of - STRING. */ -extern char *xstrndup (const char *string, size_t n); diff --git a/gnulib/lib/xstrtod.c b/gnulib/lib/xstrtod.c deleted file mode 100644 index 1ecb638..0000000 --- a/gnulib/lib/xstrtod.c +++ /dev/null @@ -1,71 +0,0 @@ -/* error-checking interface to strtod-like functions - - Copyright (C) 1996, 1999-2000, 2003-2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#include - -#include "xstrtod.h" - -#include -#include -#include - -#if LONG -# define XSTRTOD xstrtold -# define DOUBLE long double -#else -# define XSTRTOD xstrtod -# define DOUBLE double -#endif - -/* An interface to a string-to-floating-point conversion function that - encapsulates all the error checking one should usually perform. - Like strtod/strtold, but upon successful - conversion put the result in *RESULT and return true. Return - false and don't modify *RESULT upon any failure. CONVERT - specifies the conversion function, e.g., strtod itself. */ - -bool -XSTRTOD (char const *str, char const **ptr, DOUBLE *result, - DOUBLE (*convert) (char const *, char **)) -{ - DOUBLE val; - char *terminator; - bool ok = true; - - errno = 0; - val = convert (str, &terminator); - - /* Having a non-zero terminator is an error only when PTR is NULL. */ - if (terminator == str || (ptr == NULL && *terminator != '\0')) - ok = false; - else - { - /* Allow underflow (in which case CONVERT returns zero), - but flag overflow as an error. */ - if (val != 0 && errno == ERANGE) - ok = false; - } - - if (ptr != NULL) - *ptr = terminator; - - *result = val; - return ok; -} diff --git a/gnulib/lib/xstrtod.h b/gnulib/lib/xstrtod.h deleted file mode 100644 index 6865776..0000000 --- a/gnulib/lib/xstrtod.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Error-checking interface to strtod-like functions. - - Copyright (C) 1996, 1998, 2003-2004, 2006, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#ifndef XSTRTOD_H -# define XSTRTOD_H 1 - -# include - -bool xstrtod (const char *str, const char **ptr, double *result, - double (*convert) (char const *, char **)); -bool xstrtold (const char *str, const char **ptr, long double *result, - long double (*convert) (char const *, char **)); - -#endif /* not XSTRTOD_H */ diff --git a/gnulib/lib/xstrtol-error.c b/gnulib/lib/xstrtol-error.c deleted file mode 100644 index 52e712c..0000000 --- a/gnulib/lib/xstrtol-error.c +++ /dev/null @@ -1,98 +0,0 @@ -/* A more useful interface to strtol. - - Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include -#include "xstrtol.h" - -#include - -#include "error.h" -#include "exitfail.h" -#include "gettext.h" - -#define N_(msgid) msgid - -/* Report an error for an invalid integer in an option argument. - - ERR is the error code returned by one of the xstrto* functions. - - Use OPT_IDX to decide whether to print the short option string "C" - or "-C" or a long option string derived from LONG_OPTION. OPT_IDX - is -2 if the short option "C" was used, without any leading "-"; it - is -1 if the short option "-C" was used; otherwise it is an index - into LONG_OPTIONS, which should have a name preceded by two '-' - characters. - - ARG is the option-argument containing the integer. - - After reporting an error, exit with status EXIT_STATUS if it is - nonzero. */ - -static void -xstrtol_error (enum strtol_error err, - int opt_idx, char c, struct option const *long_options, - char const *arg, - int exit_status) -{ - char const *hyphens = "--"; - char const *msgid; - char const *option; - char option_buffer[2]; - - switch (err) - { - default: - abort (); - - case LONGINT_INVALID: - msgid = N_("invalid %s%s argument `%s'"); - break; - - case LONGINT_INVALID_SUFFIX_CHAR: - case LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW: - msgid = N_("invalid suffix in %s%s argument `%s'"); - break; - - case LONGINT_OVERFLOW: - msgid = N_("%s%s argument `%s' too large"); - break; - } - - if (opt_idx < 0) - { - hyphens -= opt_idx; - option_buffer[0] = c; - option_buffer[1] = '\0'; - option = option_buffer; - } - else - option = long_options[opt_idx].name; - - error (exit_status, 0, gettext (msgid), hyphens, option, arg); -} - -/* Like xstrtol_error, except exit with a failure status. */ - -void -xstrtol_fatal (enum strtol_error err, - int opt_idx, char c, struct option const *long_options, - char const *arg) -{ - xstrtol_error (err, opt_idx, c, long_options, arg, exit_failure); - abort (); -} diff --git a/gnulib/lib/xstrtol.c b/gnulib/lib/xstrtol.c deleted file mode 100644 index 97ebd90..0000000 --- a/gnulib/lib/xstrtol.c +++ /dev/null @@ -1,228 +0,0 @@ -/* A more useful interface to strtol. - - Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Jim Meyering. */ - -#ifndef __strtol -# define __strtol strtol -# define __strtol_t long int -# define __xstrtol xstrtol -# define STRTOL_T_MINIMUM LONG_MIN -# define STRTOL_T_MAXIMUM LONG_MAX -#endif - -#include - -#include "xstrtol.h" - -/* Some pre-ANSI implementations (e.g. SunOS 4) - need stderr defined if assertion checking is enabled. */ -#include - -#include -#include -#include -#include -#include -#include - -#include "intprops.h" - -static strtol_error -bkm_scale (__strtol_t *x, int scale_factor) -{ - if (TYPE_SIGNED (__strtol_t) && *x < STRTOL_T_MINIMUM / scale_factor) - { - *x = STRTOL_T_MINIMUM; - return LONGINT_OVERFLOW; - } - if (STRTOL_T_MAXIMUM / scale_factor < *x) - { - *x = STRTOL_T_MAXIMUM; - return LONGINT_OVERFLOW; - } - *x *= scale_factor; - return LONGINT_OK; -} - -static strtol_error -bkm_scale_by_power (__strtol_t *x, int base, int power) -{ - strtol_error err = LONGINT_OK; - while (power--) - err |= bkm_scale (x, base); - return err; -} - -/* FIXME: comment. */ - -strtol_error -__xstrtol (const char *s, char **ptr, int strtol_base, - __strtol_t *val, const char *valid_suffixes) -{ - char *t_ptr; - char **p; - __strtol_t tmp; - strtol_error err = LONGINT_OK; - - assert (0 <= strtol_base && strtol_base <= 36); - - p = (ptr ? ptr : &t_ptr); - - if (! TYPE_SIGNED (__strtol_t)) - { - const char *q = s; - unsigned char ch = *q; - while (isspace (ch)) - ch = *++q; - if (ch == '-') - return LONGINT_INVALID; - } - - errno = 0; - tmp = __strtol (s, p, strtol_base); - - if (*p == s) - { - /* If there is no number but there is a valid suffix, assume the - number is 1. The string is invalid otherwise. */ - if (valid_suffixes && **p && strchr (valid_suffixes, **p)) - tmp = 1; - else - return LONGINT_INVALID; - } - else if (errno != 0) - { - if (errno != ERANGE) - return LONGINT_INVALID; - err = LONGINT_OVERFLOW; - } - - /* Let valid_suffixes == NULL mean `allow any suffix'. */ - /* FIXME: update all callers except the ones that allow suffixes - after the number, changing last parameter NULL to `""'. */ - if (!valid_suffixes) - { - *val = tmp; - return err; - } - - if (**p != '\0') - { - int base = 1024; - int suffixes = 1; - strtol_error overflow; - - if (!strchr (valid_suffixes, **p)) - { - *val = tmp; - return err | LONGINT_INVALID_SUFFIX_CHAR; - } - - if (strchr (valid_suffixes, '0')) - { - /* The ``valid suffix'' '0' is a special flag meaning that - an optional second suffix is allowed, which can change - the base. A suffix "B" (e.g. "100MB") stands for a power - of 1000, whereas a suffix "iB" (e.g. "100MiB") stands for - a power of 1024. If no suffix (e.g. "100M"), assume - power-of-1024. */ - - switch (p[0][1]) - { - case 'i': - if (p[0][2] == 'B') - suffixes += 2; - break; - - case 'B': - case 'D': /* 'D' is obsolescent */ - base = 1000; - suffixes++; - break; - } - } - - switch (**p) - { - case 'b': - overflow = bkm_scale (&tmp, 512); - break; - - case 'B': - overflow = bkm_scale (&tmp, 1024); - break; - - case 'c': - overflow = 0; - break; - - case 'E': /* exa or exbi */ - overflow = bkm_scale_by_power (&tmp, base, 6); - break; - - case 'G': /* giga or gibi */ - case 'g': /* 'g' is undocumented; for compatibility only */ - overflow = bkm_scale_by_power (&tmp, base, 3); - break; - - case 'k': /* kilo */ - case 'K': /* kibi */ - overflow = bkm_scale_by_power (&tmp, base, 1); - break; - - case 'M': /* mega or mebi */ - case 'm': /* 'm' is undocumented; for compatibility only */ - overflow = bkm_scale_by_power (&tmp, base, 2); - break; - - case 'P': /* peta or pebi */ - overflow = bkm_scale_by_power (&tmp, base, 5); - break; - - case 'T': /* tera or tebi */ - case 't': /* 't' is undocumented; for compatibility only */ - overflow = bkm_scale_by_power (&tmp, base, 4); - break; - - case 'w': - overflow = bkm_scale (&tmp, 2); - break; - - case 'Y': /* yotta or 2**80 */ - overflow = bkm_scale_by_power (&tmp, base, 8); - break; - - case 'Z': /* zetta or 2**70 */ - overflow = bkm_scale_by_power (&tmp, base, 7); - break; - - default: - *val = tmp; - return err | LONGINT_INVALID_SUFFIX_CHAR; - } - - err |= overflow; - *p += suffixes; - if (**p) - err |= LONGINT_INVALID_SUFFIX_CHAR; - } - - *val = tmp; - return err; -} diff --git a/gnulib/lib/xstrtol.h b/gnulib/lib/xstrtol.h deleted file mode 100644 index 716a94f..0000000 --- a/gnulib/lib/xstrtol.h +++ /dev/null @@ -1,79 +0,0 @@ -/* A more useful interface to strtol. - - Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2011 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef XSTRTOL_H_ -# define XSTRTOL_H_ 1 - -# include -# include - -# ifndef _STRTOL_ERROR -enum strtol_error - { - LONGINT_OK = 0, - - /* These two values can be ORed together, to indicate that both - errors occurred. */ - LONGINT_OVERFLOW = 1, - LONGINT_INVALID_SUFFIX_CHAR = 2, - - LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW = (LONGINT_INVALID_SUFFIX_CHAR - | LONGINT_OVERFLOW), - LONGINT_INVALID = 4 - }; -typedef enum strtol_error strtol_error; -# endif - -# define _DECLARE_XSTRTOL(name, type) \ - strtol_error name (const char *, char **, int, type *, const char *); -_DECLARE_XSTRTOL (xstrtol, long int) -_DECLARE_XSTRTOL (xstrtoul, unsigned long int) -_DECLARE_XSTRTOL (xstrtoimax, intmax_t) -_DECLARE_XSTRTOL (xstrtoumax, uintmax_t) - -#if HAVE_LONG_LONG_INT -_DECLARE_XSTRTOL (xstrtoll, long long int) -_DECLARE_XSTRTOL (xstrtoull, unsigned long long int) -#endif - -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -#else -# define _GL_ATTRIBUTE_NORETURN /* empty */ -#endif - -/* Report an error for an invalid integer in an option argument. - - ERR is the error code returned by one of the xstrto* functions. - - Use OPT_IDX to decide whether to print the short option string "C" - or "-C" or a long option string derived from LONG_OPTION. OPT_IDX - is -2 if the short option "C" was used, without any leading "-"; it - is -1 if the short option "-C" was used; otherwise it is an index - into LONG_OPTIONS, which should have a name preceded by two '-' - characters. - - ARG is the option-argument containing the integer. - - After reporting an error, exit with a failure status. */ - -void xstrtol_fatal (enum strtol_error, - int, char, struct option const *, - char const *) _GL_ATTRIBUTE_NORETURN; - -#endif /* not XSTRTOL_H_ */ diff --git a/gnulib/lib/yesno.c b/gnulib/lib/yesno.c deleted file mode 100644 index 6502538..0000000 --- a/gnulib/lib/yesno.c +++ /dev/null @@ -1,60 +0,0 @@ -/* yesno.c -- read a yes/no response from stdin - - Copyright (C) 1990, 1998, 2001, 2003-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include "yesno.h" - -#include -#include - -/* Return true if we read an affirmative line from standard input. - - Since this function uses stdin, it is suggested that the caller not - use STDIN_FILENO directly, and also that the line - atexit(close_stdin) be added to main(). */ - -bool -yesno (void) -{ - bool yes; - -#if ENABLE_NLS - char *response = NULL; - size_t response_size = 0; - ssize_t response_len = getline (&response, &response_size, stdin); - - if (response_len <= 0) - yes = false; - else - { - response[response_len - 1] = '\0'; - yes = (0 < rpmatch (response)); - } - - free (response); -#else - /* Test against "^[yY]", hardcoded to avoid requiring getline, - regex, and rpmatch. */ - int c = getchar (); - yes = (c == 'y' || c == 'Y'); - while (c != '\n' && c != EOF) - c = getchar (); -#endif - - return yes; -} diff --git a/gnulib/lib/yesno.h b/gnulib/lib/yesno.h deleted file mode 100644 index 36e624f..0000000 --- a/gnulib/lib/yesno.h +++ /dev/null @@ -1,24 +0,0 @@ -/* declare yesno - Copyright (C) 2004, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef YESNO_H_ -# define YESNO_H_ - -# include - -bool yesno (void); - -#endif diff --git a/gnulib/m4/00gnulib.m4 b/gnulib/m4/00gnulib.m4 deleted file mode 100644 index 7feed46..0000000 --- a/gnulib/m4/00gnulib.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# 00gnulib.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This file must be named something that sorts before all other -dnl gnulib-provided .m4 files. It is needed until such time as we can -dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. - -# AC_DEFUN_ONCE([NAME], VALUE) -# ---------------------------- -# Define NAME to expand to VALUE on the first use (whether by direct -# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. -# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This -# definition is slower than the version in Autoconf 2.64, because it -# can only use interfaces that existed since 2.59; but it achieves the -# same effect. Quoting is necessary to avoid confusing Automake. -m4_version_prereq([2.63.263], [], -[m4_define([AC][_DEFUN_ONCE], - [AC][_DEFUN([$1], - [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], - [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl -[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) - -# gl_00GNULIB -# ----------- -# Witness macro that this file has been included. Needed to force -# Automake to include this file prior to all other gnulib .m4 files. -AC_DEFUN([gl_00GNULIB]) diff --git a/gnulib/m4/alloca.m4 b/gnulib/m4/alloca.m4 deleted file mode 100644 index e2e8a05..0000000 --- a/gnulib/m4/alloca.m4 +++ /dev/null @@ -1,43 +0,0 @@ -# alloca.m4 serial 10 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_ALLOCA], -[ - AC_REQUIRE([AC_FUNC_ALLOCA]) - if test $ac_cv_func_alloca_works = no; then - gl_PREREQ_ALLOCA - fi - - # Define an additional variable used in the Makefile substitution. - if test $ac_cv_working_alloca_h = yes; then - AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ - AC_EGREP_CPP([Need own alloca], [ -#if defined __GNUC__ || defined _AIX || defined _MSC_VER - Need own alloca -#endif - ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) - ]) - if test $gl_cv_rpl_alloca = yes; then - dnl OK, alloca can be implemented through a compiler built-in. - AC_DEFINE([HAVE_ALLOCA], [1], - [Define to 1 if you have 'alloca' after including , - a header that may be supplied by this distribution.]) - ALLOCA_H=alloca.h - else - dnl alloca exists as a library function, i.e. it is slow and probably - dnl a memory leak. Don't define HAVE_ALLOCA in this case. - ALLOCA_H= - fi - else - ALLOCA_H=alloca.h - fi - AC_SUBST([ALLOCA_H]) -]) - -# Prerequisites of lib/alloca.c. -# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. -AC_DEFUN([gl_PREREQ_ALLOCA], [:]) diff --git a/gnulib/m4/argmatch.m4 b/gnulib/m4/argmatch.m4 deleted file mode 100644 index eddca3f..0000000 --- a/gnulib/m4/argmatch.m4 +++ /dev/null @@ -1,10 +0,0 @@ -#serial 3 -dnl Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_ARGMATCH], -[ - AC_LIBOBJ([argmatch]) -]) diff --git a/gnulib/m4/assert.m4 b/gnulib/m4/assert.m4 deleted file mode 100644 index 2de5ef5..0000000 --- a/gnulib/m4/assert.m4 +++ /dev/null @@ -1,24 +0,0 @@ -#serial 7 - -# Copyright (C) 1998-1999, 2001, 2004, 2008-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl based on code from Eleftherios Gkioulekas -dnl Autoconf 2.60 provides AC_HEADER_ASSERT for the same purpose, but -dnl it has broken semantics for --enable-assert until 2.64. -AC_DEFUN([gl_ASSERT], -[ - AC_MSG_CHECKING([whether to enable assertions]) - AC_ARG_ENABLE([assert], - [AS_HELP_STRING([--disable-assert], [turn off assertions])], - [AS_IF([test "x$enableval" = xno], - [AC_DEFINE([NDEBUG], [1], - [Define to 1 if assertions should be disabled.])], - [test "x$enableval" != xyes], - [AC_MSG_WARN([invalid argument supplied to --enable-assert]) - enable_assert=yes])], - [enable_assert=yes]) - AC_MSG_RESULT([$enable_assert]) -]) diff --git a/gnulib/m4/bison.m4 b/gnulib/m4/bison.m4 deleted file mode 100644 index 87c090e..0000000 --- a/gnulib/m4/bison.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# serial 6 - -# Copyright (C) 2002, 2005, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_BISON], -[ - # parse-datetime.y works with bison only. - : ${YACC='bison -y'} -dnl -dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB -dnl requires an Autoconf greater than 2.59c, but it will probably still be -dnl useful to override the description of YACC in the --help output, re -dnl parse-datetime.y assuming `bison -y'. - AC_ARG_VAR([YACC], -[The `Yet Another C Compiler' implementation to use. Defaults to `bison -y'. -Values other than `bison -y' will most likely break on most systems.])dnl - AC_ARG_VAR([YFLAGS], -[YFLAGS contains the list arguments that will be passed by default to Bison. -This script will default YFLAGS to the empty string to avoid a default value of -`-d' given by some make applications.])dnl -]) diff --git a/gnulib/m4/btowc.m4 b/gnulib/m4/btowc.m4 deleted file mode 100644 index 603298f..0000000 --- a/gnulib/m4/btowc.m4 +++ /dev/null @@ -1,121 +0,0 @@ -# btowc.m4 serial 8 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_BTOWC], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - dnl Check whether is usable at all, first. Otherwise the test - dnl program below may lead to an endless loop. See - dnl . - AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) - - AC_CHECK_FUNCS_ONCE([btowc]) - if test $ac_cv_func_btowc = no; then - HAVE_BTOWC=0 - else - - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - dnl Cygwin 1.7.2 btowc('\0') is WEOF, not 0. - AC_CACHE_CHECK([whether btowc(0) is correct], - [gl_cv_func_btowc_nul], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (btowc ('\0') != 0) - return 1; - return 0; -}]])], - [gl_cv_func_btowc_nul=yes], - [gl_cv_func_btowc_nul=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess no on Cygwin. - cygwin*) gl_cv_func_btowc_nul="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_nul="guessing yes" ;; - esac -changequote([,])dnl - ]) - ]) - - dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF. - AC_CACHE_CHECK([whether btowc(EOF) is correct], - [gl_cv_func_btowc_eof], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on IRIX. - irix*) gl_cv_func_btowc_eof="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_eof="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - if (btowc (EOF) != WEOF) - return 1; - } - return 0; -}]])], - [gl_cv_func_btowc_eof=yes], - [gl_cv_func_btowc_eof=no], - [:]) - fi - ]) - - case "$gl_cv_func_btowc_nul" in - *yes) ;; - *) REPLACE_BTOWC=1 ;; - esac - case "$gl_cv_func_btowc_eof" in - *yes) ;; - *) REPLACE_BTOWC=1 ;; - esac - fi - if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then - gl_REPLACE_WCHAR_H - AC_LIBOBJ([btowc]) - gl_PREREQ_BTOWC - fi -]) - -# Prerequisites of lib/btowc.c. -AC_DEFUN([gl_PREREQ_BTOWC], [ - : -]) diff --git a/gnulib/m4/canonicalize.m4 b/gnulib/m4/canonicalize.m4 deleted file mode 100644 index dcc6039..0000000 --- a/gnulib/m4/canonicalize.m4 +++ /dev/null @@ -1,94 +0,0 @@ -# canonicalize.m4 serial 17 - -dnl Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. - -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Provides canonicalize_file_name and canonicalize_filename_mode, but does -# not provide or fix realpath. -AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE], -[ - AC_LIBOBJ([canonicalize]) - - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([canonicalize_file_name]) - AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) - AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) - if test $ac_cv_func_canonicalize_file_name = no; then - HAVE_CANONICALIZE_FILE_NAME=0 - elif test "$gl_cv_func_realpath_works" != yes; then - REPLACE_CANONICALIZE_FILE_NAME=1 - fi -]) - -# Provides canonicalize_file_name and realpath. -AC_DEFUN([gl_CANONICALIZE_LGPL], -[ - AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE]) - if test $ac_cv_func_canonicalize_file_name = no; then - HAVE_CANONICALIZE_FILE_NAME=0 - AC_LIBOBJ([canonicalize-lgpl]) - if test $ac_cv_func_realpath = no; then - HAVE_REALPATH=0 - elif test "$gl_cv_func_realpath_works" != yes; then - REPLACE_REALPATH=1 - fi - elif test "$gl_cv_func_realpath_works" != yes; then - AC_LIBOBJ([canonicalize-lgpl]) - REPLACE_REALPATH=1 - REPLACE_CANONICALIZE_FILE_NAME=1 - fi -]) - -# Like gl_CANONICALIZE_LGPL, except prepare for separate compilation -# (no AC_LIBOBJ). -AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink]) - AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) - AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) - AC_CHECK_HEADERS_ONCE([sys/param.h]) -]) - -# Check whether realpath works. Assume that if a platform has both -# realpath and canonicalize_file_name, but the former is broken, then -# so is the latter. -AC_DEFUN([gl_FUNC_REALPATH_WORKS], -[ - AC_CHECK_FUNCS_ONCE([realpath]) - AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [ - touch conftest.a - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ - #include - ]], [[ - int result = 0; - { - char *name = realpath ("conftest.a", NULL); - if (!(name && *name == '/')) - result |= 1; - } - { - char *name = realpath ("conftest.b/../conftest.a", NULL); - if (name != NULL) - result |= 2; - } - { - char *name = realpath ("conftest.a/", NULL); - if (name != NULL) - result |= 4; - } - return result; - ]]) - ], [gl_cv_func_realpath_works=yes], [gl_cv_func_realpath_works=no], - [gl_cv_func_realpath_works="guessing no"]) - ]) - if test "$gl_cv_func_realpath_works" = yes; then - AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath() - can malloc memory, always gives an absolute path, and handles - trailing slash correctly.]) - fi -]) diff --git a/gnulib/m4/chdir-long.m4 b/gnulib/m4/chdir-long.m4 deleted file mode 100644 index 27c61d2..0000000 --- a/gnulib/m4/chdir-long.m4 +++ /dev/null @@ -1,39 +0,0 @@ -#serial 11 - -# Use Gnulib's robust chdir function. -# It can handle arbitrarily long directory names, which means -# that when it is given the name of an existing directory, it -# never fails with ENAMETOOLONG. -# Arrange to compile chdir-long.c only on systems that define PATH_MAX. - -dnl Copyright (C) 2004-2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Jim Meyering. - -AC_DEFUN([gl_FUNC_CHDIR_LONG], -[ - AC_CACHE_CHECK([whether this system has an arbitrary file name length limit], - gl_cv_have_arbitrary_file_name_length_limit, - [AC_EGREP_CPP([have_arbitrary_file_name_length_limit], - [#include -#include -#if defined PATH_MAX || defined MAXPATHLEN -have_arbitrary_file_name_length_limit -#endif], - gl_cv_have_arbitrary_file_name_length_limit=yes, - gl_cv_have_arbitrary_file_name_length_limit=no)]) - - if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then - AC_LIBOBJ([chdir-long]) - gl_PREREQ_CHDIR_LONG - fi -]) - -AC_DEFUN([gl_PREREQ_CHDIR_LONG], -[ - AC_REQUIRE([AC_C_INLINE]) - : -]) diff --git a/gnulib/m4/chown.m4 b/gnulib/m4/chown.m4 deleted file mode 100644 index f664e7c..0000000 --- a/gnulib/m4/chown.m4 +++ /dev/null @@ -1,144 +0,0 @@ -# serial 24 -# Determine whether we need the chown wrapper. - -dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2011 Free Software -dnl 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. - -# chown should accept arguments of -1 for uid and gid, and it should -# dereference symlinks. If it doesn't, arrange to use the replacement -# function. - -# From Jim Meyering. - -AC_DEFUN_ONCE([gl_FUNC_CHOWN], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_TYPE_UID_T]) - AC_REQUIRE([AC_FUNC_CHOWN]) - AC_REQUIRE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK]) - AC_CHECK_FUNCS_ONCE([chown fchown]) - - dnl mingw lacks chown altogether. - if test $ac_cv_func_chown = no; then - HAVE_CHOWN=0 - AC_LIBOBJ([chown]) - else - dnl Some old systems treated chown like lchown. - if test $gl_cv_func_chown_follows_symlink = no; then - REPLACE_CHOWN=1 - AC_LIBOBJ([chown]) - fi - - dnl Some old systems tried to use uid/gid -1 literally. - if test $ac_cv_func_chown_works = no; then - AC_DEFINE([CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE], [1], - [Define if chown is not POSIX compliant regarding IDs of -1.]) - REPLACE_CHOWN=1 - AC_LIBOBJ([chown]) - fi - - dnl Solaris 9 ignores trailing slash. - dnl FreeBSD 7.2 mishandles trailing slash on symlinks. - dnl Likewise for AIX 7.1. - AC_CACHE_CHECK([whether chown honors trailing slash], - [gl_cv_func_chown_slash_works], - [touch conftest.file && rm -f conftest.link - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -]], [[ if (symlink ("conftest.file", "conftest.link")) return 1; - if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2; - ]])], - [gl_cv_func_chown_slash_works=yes], - [gl_cv_func_chown_slash_works=no], - [gl_cv_func_chown_slash_works="guessing no"]) - rm -f conftest.link conftest.file]) - if test "$gl_cv_func_chown_slash_works" != yes; then - AC_DEFINE([CHOWN_TRAILING_SLASH_BUG], [1], - [Define to 1 if chown mishandles trailing slash.]) - REPLACE_CHOWN=1 - AC_LIBOBJ([chown]) - fi - - dnl OpenBSD fails to update ctime if ownership does not change. - AC_CACHE_CHECK([whether chown always updates ctime], - [gl_cv_func_chown_ctime_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -#include -#include -]], [[ struct stat st1, st2; - if (close (creat ("conftest.file", 0600))) return 1; - if (stat ("conftest.file", &st1)) return 2; - sleep (1); - if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3; - if (stat ("conftest.file", &st2)) return 4; - if (st2.st_ctime <= st1.st_ctime) return 5; - ]])], - [gl_cv_func_chown_ctime_works=yes], - [gl_cv_func_chown_ctime_works=no], - [gl_cv_func_chown_ctime_works="guessing no"]) - rm -f conftest.file]) - if test "$gl_cv_func_chown_ctime_works" != yes; then - AC_DEFINE([CHOWN_CHANGE_TIME_BUG], [1], [Define to 1 if chown fails - to change ctime when at least one argument was not -1.]) - REPLACE_CHOWN=1 - AC_LIBOBJ([chown]) - fi - - if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then - AC_LIBOBJ([fchown-stub]) - fi - fi -]) - -# Determine whether chown follows symlinks (it should). -AC_DEFUN_ONCE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK], -[ - AC_CACHE_CHECK( - [whether chown dereferences symlinks], - [gl_cv_func_chown_follows_symlink], - [ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#include - - int - main () - { - int result = 0; - char const *dangling_symlink = "conftest.dangle"; - - unlink (dangling_symlink); - if (symlink ("conftest.no-such", dangling_symlink)) - abort (); - - /* Exit successfully on a conforming system, - i.e., where chown must fail with ENOENT. */ - if (chown (dangling_symlink, getuid (), getgid ()) == 0) - result |= 1; - if (errno != ENOENT) - result |= 2; - return result; - } - ]])], - [gl_cv_func_chown_follows_symlink=yes], - [gl_cv_func_chown_follows_symlink=no], - [gl_cv_func_chown_follows_symlink=yes] - ) - ] - ) - - if test $gl_cv_func_chown_follows_symlink = no; then - AC_DEFINE([CHOWN_MODIFIES_SYMLINK], [1], - [Define if chown modifies symlinks.]) - fi -]) diff --git a/gnulib/m4/clock_time.m4 b/gnulib/m4/clock_time.m4 deleted file mode 100644 index 3c08512..0000000 --- a/gnulib/m4/clock_time.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# clock_time.m4 serial 10 -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME. -# For a program named, say foo, you should add a line like the following -# in the corresponding Makefile.am file: -# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) - -AC_DEFUN([gl_CLOCK_TIME], -[ - dnl Persuade glibc and Solaris to declare these functions. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. - # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - - # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - LIB_CLOCK_GETTIME= - AC_SUBST([LIB_CLOCK_GETTIME]) - gl_saved_libs=$LIBS - AC_SEARCH_LIBS([clock_gettime], [rt posix4], - [test "$ac_cv_search_clock_gettime" = "none required" || - LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) - AC_CHECK_FUNCS([clock_gettime clock_settime]) - LIBS=$gl_saved_libs -]) diff --git a/gnulib/m4/cloexec.m4 b/gnulib/m4/cloexec.m4 deleted file mode 100644 index c936f43..0000000 --- a/gnulib/m4/cloexec.m4 +++ /dev/null @@ -1,10 +0,0 @@ -#serial 6 -dnl Copyright (C) 2004-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CLOEXEC], -[ - AC_LIBOBJ([cloexec]) -]) diff --git a/gnulib/m4/close-stream.m4 b/gnulib/m4/close-stream.m4 deleted file mode 100644 index 2a7349c..0000000 --- a/gnulib/m4/close-stream.m4 +++ /dev/null @@ -1,13 +0,0 @@ -#serial 3 -dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CLOSE_STREAM], -[ - AC_LIBOBJ([close-stream]) - - dnl Prerequisites of lib/close-stream.c. - : -]) diff --git a/gnulib/m4/close.m4 b/gnulib/m4/close.m4 deleted file mode 100644 index fc13138..0000000 --- a/gnulib/m4/close.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# close.m4 serial 5 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_CLOSE], -[ - m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [ - gl_PREREQ_SYS_H_WINSOCK2 - if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then - dnl Even if the 'socket' module is not used here, another part of the - dnl application may use it and pass file descriptors that refer to - dnl sockets to the close() function. So enable the support for sockets. - gl_REPLACE_CLOSE - fi - ]) -]) - -AC_DEFUN([gl_REPLACE_CLOSE], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - REPLACE_CLOSE=1 - AC_LIBOBJ([close]) - gl_REPLACE_FCLOSE -]) diff --git a/gnulib/m4/closein.m4 b/gnulib/m4/closein.m4 deleted file mode 100644 index a5731ee..0000000 --- a/gnulib/m4/closein.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# closein.m4 serial 1 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CLOSEIN], -[ - AC_LIBOBJ([closein]) - - dnl Prerequisites of lib/closein.c. - : -]) diff --git a/gnulib/m4/closeout.m4 b/gnulib/m4/closeout.m4 deleted file mode 100644 index 0586b32..0000000 --- a/gnulib/m4/closeout.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# closeout.m4 serial 5 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CLOSEOUT], -[ - AC_LIBOBJ([closeout]) - - dnl Prerequisites of lib/closeout.c. - : -]) diff --git a/gnulib/m4/codeset.m4 b/gnulib/m4/codeset.m4 deleted file mode 100644 index da73552..0000000 --- a/gnulib/m4/codeset.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# codeset.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([AM_LANGINFO_CODESET], -[ - AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[char* cs = nl_langinfo(CODESET); return !cs;]])], - [am_cv_langinfo_codeset=yes], - [am_cv_langinfo_codeset=no]) - ]) - if test $am_cv_langinfo_codeset = yes; then - AC_DEFINE([HAVE_LANGINFO_CODESET], [1], - [Define if you have and nl_langinfo(CODESET).]) - fi -]) diff --git a/gnulib/m4/configmake.m4 b/gnulib/m4/configmake.m4 deleted file mode 100644 index a029823..0000000 --- a/gnulib/m4/configmake.m4 +++ /dev/null @@ -1,50 +0,0 @@ -# configmake.m4 serial 1 -dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_CONFIGMAKE_PREP -# ------------------ -# Guarantee all of the standard directory variables, even when used with -# autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake -# 1.9.6 (pkglibexecdir wasn't supported until 1.10b.). -AC_DEFUN([gl_CONFIGMAKE_PREP], -[ - dnl Technically, datadir should default to datarootdir. But if - dnl autoconf is too old to provide datarootdir, then reversing the - dnl definition is a reasonable compromise. Only AC_SUBST a variable - dnl if it was not already defined earlier by autoconf. - if test "x$datarootdir" = x; then - AC_SUBST([datarootdir], ['${datadir}']) - fi - dnl Copy the approach used in autoconf 2.60. - if test "x$docdir" = x; then - AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], - ['${datarootdir}/doc/${PACKAGE_TARNAME}'], - ['${datarootdir}/doc/${PACKAGE}'])]) - fi - dnl The remaining variables missing from autoconf 2.59 are easier. - if test "x$htmldir" = x; then - AC_SUBST([htmldir], ['${docdir}']) - fi - if test "x$dvidir" = x; then - AC_SUBST([dvidir], ['${docdir}']) - fi - if test "x$pdfdir" = x; then - AC_SUBST([pdfdir], ['${docdir}']) - fi - if test "x$psdir" = x; then - AC_SUBST([psdir], ['${docdir}']) - fi - if test "x$lispdir" = x; then - AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp']) - fi - if test "x$localedir" = x; then - AC_SUBST([localedir], ['${datarootdir}/locale']) - fi - - dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely - dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe. - AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}']) -]) diff --git a/gnulib/m4/ctype.m4 b/gnulib/m4/ctype.m4 deleted file mode 100644 index 4a86ba9..0000000 --- a/gnulib/m4/ctype.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# ctype_h.m4 serial 6 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CTYPE_H], -[ - AC_REQUIRE([gl_CTYPE_H_DEFAULTS]) - - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_NEXT_HEADERS([ctype.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [isblank]) -]) - -AC_DEFUN([gl_CTYPE_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_CTYPE_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_CTYPE_H_DEFAULTS], -[ - GNULIB_ISBLANK=0; AC_SUBST([GNULIB_ISBLANK]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK]) -]) diff --git a/gnulib/m4/cycle-check.m4 b/gnulib/m4/cycle-check.m4 deleted file mode 100644 index 42ad2ff..0000000 --- a/gnulib/m4/cycle-check.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 5 -dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CYCLE_CHECK], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_LIBOBJ([cycle-check]) -]) diff --git a/gnulib/m4/d-ino.m4 b/gnulib/m4/d-ino.m4 deleted file mode 100644 index baf0dcc..0000000 --- a/gnulib/m4/d-ino.m4 +++ /dev/null @@ -1,46 +0,0 @@ -# serial 12 - -dnl From Jim Meyering. -dnl -dnl Check whether struct dirent has a member named d_ino. -dnl - -# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2011 Free Software -# Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], - [AC_CACHE_CHECK([for d_ino member in directory struct], - gl_cv_struct_dirent_d_ino, - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - #include - ]], - [[DIR *dp = opendir ("."); - struct dirent *e; - struct stat st; - if (! dp) - return 1; - e = readdir (dp); - if (! e) - return 2; - if (stat (e->d_name, &st) != 0) - return 3; - if (e->d_ino != st.st_ino) - return 4; - return 0; - ]])], - [gl_cv_struct_dirent_d_ino=yes], - [gl_cv_struct_dirent_d_ino=no], - [gl_cv_struct_dirent_d_ino=no])]) - if test $gl_cv_struct_dirent_d_ino = yes; then - AC_DEFINE([D_INO_IN_DIRENT], [1], - [Define if struct dirent has a member d_ino that actually works.]) - fi - ] -) diff --git a/gnulib/m4/d-type.m4 b/gnulib/m4/d-type.m4 deleted file mode 100644 index f5e1105..0000000 --- a/gnulib/m4/d-type.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# serial 11 - -dnl From Jim Meyering. -dnl -dnl Check whether struct dirent has a member named d_type. -dnl - -# Copyright (C) 1997, 1999-2004, 2006, 2009-2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE], - [AC_CACHE_CHECK([for d_type member in directory struct], - gl_cv_struct_dirent_d_type, - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include -#include - ]], - [[struct dirent dp; dp.d_type = 0;]])], - [gl_cv_struct_dirent_d_type=yes], - [gl_cv_struct_dirent_d_type=no]) - ] - ) - if test $gl_cv_struct_dirent_d_type = yes; then - AC_DEFINE([HAVE_STRUCT_DIRENT_D_TYPE], [1], - [Define if there is a member named d_type in the struct describing - directory headers.]) - fi - ] -) diff --git a/gnulib/m4/dirent-safer.m4 b/gnulib/m4/dirent-safer.m4 deleted file mode 100644 index 0b557ca..0000000 --- a/gnulib/m4/dirent-safer.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 1 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_DIRENT_SAFER], -[ - AC_CHECK_FUNCS_ONCE([fdopendir]) - AC_LIBOBJ([opendir-safer]) -]) diff --git a/gnulib/m4/dirent_h.m4 b/gnulib/m4/dirent_h.m4 deleted file mode 100644 index 853ac7d..0000000 --- a/gnulib/m4/dirent_h.m4 +++ /dev/null @@ -1,57 +0,0 @@ -# dirent_h.m4 serial 13 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Bruno Haible. - -AC_DEFUN([gl_DIRENT_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_DIRENT_H_DEFAULTS]) - - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_CHECK_NEXT_HEADERS([dirent.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [alphasort dirfd fdopendir scandir]) -]) - -dnl Unconditionally enables the replacement of . -AC_DEFUN([gl_REPLACE_DIRENT_H], -[ - dnl This is a no-op, because is always overridden. - : -]) - -AC_DEFUN([gl_DIRENT_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_DIRENT_H_DEFAULTS], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR - GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD]) - GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR]) - GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR]) - GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD]) - HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR]) - HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR]) - HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR]) - HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT]) - REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR]) - REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD]) - REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR]) - REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR]) -]) diff --git a/gnulib/m4/dirfd.m4 b/gnulib/m4/dirfd.m4 deleted file mode 100644 index b8789c2..0000000 --- a/gnulib/m4/dirfd.m4 +++ /dev/null @@ -1,81 +0,0 @@ -# serial 19 -*- Autoconf -*- - -dnl Find out how to get the file descriptor associated with an open DIR*. - -# Copyright (C) 2001-2006, 2008-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering - -AC_DEFUN([gl_FUNC_DIRFD], -[ - AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) - gl_REPLACE_DIRENT_H - - dnl Persuade glibc to declare dirfd(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_FUNCS([dirfd]) - AC_CHECK_DECLS([dirfd], , , - [#include - #include ]) - if test $ac_cv_have_decl_dirfd = no; then - HAVE_DECL_DIRFD=0 - fi - - AC_CACHE_CHECK([whether dirfd is a macro], - gl_cv_func_dirfd_macro, - [AC_EGREP_CPP([dirent_header_defines_dirfd], [ -#include -#include -#ifdef dirfd - dirent_header_defines_dirfd -#endif], - gl_cv_func_dirfd_macro=yes, - gl_cv_func_dirfd_macro=no)]) - - # Use the replacement only if we have no function or macro with that name. - if test $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro = no,no; then - if test $ac_cv_have_decl_dirfd = yes; then - # If the system declares dirfd already, let's declare rpl_dirfd instead. - REPLACE_DIRFD=1 - fi - AC_LIBOBJ([dirfd]) - AC_CACHE_CHECK( - [how to get the file descriptor associated with an open DIR*], - gl_cv_sys_dir_fd_member_name, - [ - dirfd_save_CFLAGS=$CFLAGS - for ac_expr in d_fd dd_fd; do - - CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include ]], - [[DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;]])], - [dir_fd_found=yes] - ) - CFLAGS=$dirfd_save_CFLAGS - test "$dir_fd_found" = yes && break - done - test "$dir_fd_found" = yes || ac_expr=no_such_member - - gl_cv_sys_dir_fd_member_name=$ac_expr - ] - ) - if test $gl_cv_sys_dir_fd_member_name != no_such_member; then - AC_DEFINE_UNQUOTED([DIR_FD_MEMBER_NAME], - $gl_cv_sys_dir_fd_member_name, - [the name of the file descriptor member of DIR]) - fi - AH_VERBATIM(DIR_TO_FD, - [#ifdef DIR_FD_MEMBER_NAME -# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) -#else -# define DIR_TO_FD(Dir_p) -1 -#endif -]) - fi -]) diff --git a/gnulib/m4/dirname.m4 b/gnulib/m4/dirname.m4 deleted file mode 100644 index 9d5f40d..0000000 --- a/gnulib/m4/dirname.m4 +++ /dev/null @@ -1,25 +0,0 @@ -#serial 9 -*- autoconf -*- -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_DIRNAME], -[ - AC_REQUIRE([gl_DIRNAME_LGPL]) - AC_LIBOBJ([basename]) - AC_LIBOBJ([dirname]) -]) - -AC_DEFUN([gl_DIRNAME_LGPL], -[ - AC_LIBOBJ([basename-lgpl]) - AC_LIBOBJ([dirname-lgpl]) - AC_LIBOBJ([stripslash]) - - dnl Prerequisites of lib/dirname.h. - AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) - - dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c, - dnl lib/stripslash.c. -]) diff --git a/gnulib/m4/double-slash-root.m4 b/gnulib/m4/double-slash-root.m4 deleted file mode 100644 index 16a4e3e..0000000 --- a/gnulib/m4/double-slash-root.m4 +++ /dev/null @@ -1,38 +0,0 @@ -# double-slash-root.m4 serial 4 -*- Autoconf -*- -dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_DOUBLE_SLASH_ROOT], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root], - [ if test x"$cross_compiling" = xyes ; then - # When cross-compiling, there is no way to tell whether // is special - # short of a list of hosts. However, the only known hosts to date - # that have a distinct // are Apollo DomainOS (too old to port to), - # Cygwin, and z/OS. If anyone knows of another system for which // has - # special semantics and is distinct from /, please report it to - # . - case $host in - *-cygwin | i370-ibm-openedition) - gl_cv_double_slash_root=yes ;; - *) - # Be optimistic and assume that / and // are the same when we - # don't know. - gl_cv_double_slash_root='unknown, assuming no' ;; - esac - else - set x `ls -di / // 2>/dev/null` - if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then - gl_cv_double_slash_root=no - else - gl_cv_double_slash_root=yes - fi - fi]) - if test "$gl_cv_double_slash_root" = yes; then - AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1], - [Define to 1 if // is a file system root distinct from /.]) - fi -]) diff --git a/gnulib/m4/dup2.m4 b/gnulib/m4/dup2.m4 deleted file mode 100644 index def263b..0000000 --- a/gnulib/m4/dup2.m4 +++ /dev/null @@ -1,70 +0,0 @@ -#serial 12 -dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_DUP2], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS_ONCE([dup2 fcntl]) - if test $ac_cv_func_dup2 = no; then - HAVE_DUP2=0 - AC_LIBOBJ([dup2]) - else - AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works], - [AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[#include -#include -#include ]], - [int result = 0; -#if HAVE_FCNTL - if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) - result |= 1; -#endif HAVE_FCNTL - if (dup2 (1, 1) == 0) - result |= 2; -#if HAVE_FCNTL - if (fcntl (1, F_GETFD) != FD_CLOEXEC) - result |= 4; -#endif - close (0); - if (dup2 (0, 0) != -1) - result |= 8; - /* Many gnulib modules require POSIX conformance of EBADF. */ - if (dup2 (2, 1000000) == -1 && errno != EBADF) - result |= 16; - return result; - ]) - ], - [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], - [case "$host_os" in - mingw*) # on this platform, dup2 always returns 0 for success - gl_cv_func_dup2_works=no;; - cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works=no;; - linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a - # closed fd may yield -EBADF instead of -1 / errno=EBADF. - gl_cv_func_dup2_works=no;; - freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. - gl_cv_func_dup2_works=no;; - haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. - gl_cv_func_dup2_works=no;; - *) gl_cv_func_dup2_works=yes;; - esac]) - ]) - if test "$gl_cv_func_dup2_works" = no; then - gl_REPLACE_DUP2 - fi - fi -]) - -AC_DEFUN([gl_REPLACE_DUP2], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - if test $ac_cv_func_dup2 = yes; then - REPLACE_DUP2=1 - fi - AC_LIBOBJ([dup2]) -]) diff --git a/gnulib/m4/eealloc.m4 b/gnulib/m4/eealloc.m4 deleted file mode 100644 index 3006c48..0000000 --- a/gnulib/m4/eealloc.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# eealloc.m4 serial 2 -dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_EEALLOC], -[ - AC_REQUIRE([gl_EEMALLOC]) - AC_REQUIRE([gl_EEREALLOC]) - AC_REQUIRE([AC_C_INLINE]) -]) - -AC_DEFUN([gl_EEMALLOC], -[ - _AC_FUNC_MALLOC_IF( - [gl_cv_func_malloc_0_nonnull=1], - [gl_cv_func_malloc_0_nonnull=0]) - AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull], - [If malloc(0) is != NULL, define this to 1. Otherwise define this - to 0.]) -]) - -AC_DEFUN([gl_EEREALLOC], -[ - _AC_FUNC_REALLOC_IF( - [gl_cv_func_realloc_0_nonnull=1], - [gl_cv_func_realloc_0_nonnull=0]) - AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull], - [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this - to 0.]) -]) diff --git a/gnulib/m4/environ.m4 b/gnulib/m4/environ.m4 deleted file mode 100644 index 7457ad1..0000000 --- a/gnulib/m4/environ.m4 +++ /dev/null @@ -1,38 +0,0 @@ -# environ.m4 serial 5 -dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN_ONCE([gl_ENVIRON], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - dnl Persuade glibc to declare environ. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - gt_CHECK_VAR_DECL([#include ], environ) - if test $gt_cv_var_environ_declaration != yes; then - HAVE_DECL_ENVIRON=0 - fi -]) - -# Check if a variable is properly declared. -# gt_CHECK_VAR_DECL(includes,variable) -AC_DEFUN([gt_CHECK_VAR_DECL], -[ - define([gt_cv_var], [gt_cv_var_]$2[_declaration]) - AC_MSG_CHECKING([if $2 is properly declared]) - AC_CACHE_VAL([gt_cv_var], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[$1 - extern struct { int foo; } $2;]], - [[$2.foo = 1;]])], - [gt_cv_var=no], - [gt_cv_var=yes])]) - AC_MSG_RESULT([$gt_cv_var]) - if test $gt_cv_var = yes; then - AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1, - [Define if you have the declaration of $2.]) - fi - undefine([gt_cv_var]) -]) diff --git a/gnulib/m4/errno_h.m4 b/gnulib/m4/errno_h.m4 deleted file mode 100644 index 687baff..0000000 --- a/gnulib/m4/errno_h.m4 +++ /dev/null @@ -1,118 +0,0 @@ -# errno_h.m4 serial 8 -dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ - AC_EGREP_CPP([booboo],[ -#include -#if !defined ENOMSG -booboo -#endif -#if !defined EIDRM -booboo -#endif -#if !defined ENOLINK -booboo -#endif -#if !defined EPROTO -booboo -#endif -#if !defined EMULTIHOP -booboo -#endif -#if !defined EBADMSG -booboo -#endif -#if !defined EOVERFLOW -booboo -#endif -#if !defined ENOTSUP -booboo -#endif -#if !defined ESTALE -booboo -#endif -#if !defined EDQUOT -booboo -#endif -#if !defined ECANCELED -booboo -#endif - ], - [gl_cv_header_errno_h_complete=no], - [gl_cv_header_errno_h_complete=yes]) - ]) - if test $gl_cv_header_errno_h_complete = yes; then - ERRNO_H='' - else - gl_NEXT_HEADERS([errno.h]) - ERRNO_H='errno.h' - fi - AC_SUBST([ERRNO_H]) - gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) - gl_REPLACE_ERRNO_VALUE([ENOLINK]) - gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) -]) - -# Assuming $1 = EOVERFLOW. -# The EOVERFLOW errno value ought to be defined in , according to -# POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and -# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. -# Check for the value of EOVERFLOW. -# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. -AC_DEFUN([gl_REPLACE_ERRNO_VALUE], -[ - if test -n "$ERRNO_H"; then - AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ - AC_EGREP_CPP([yes],[ -#include -#ifdef ]$1[ -yes -#endif - ], - [gl_cv_header_errno_h_]$1[=yes], - [gl_cv_header_errno_h_]$1[=no]) - if test $gl_cv_header_errno_h_]$1[ = no; then - AC_EGREP_CPP([yes],[ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef ]$1[ -yes -#endif - ], [gl_cv_header_errno_h_]$1[=hidden]) - if test $gl_cv_header_errno_h_]$1[ = hidden; then - dnl The macro exists but is hidden. - dnl Define it to the same value. - AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -]) - fi - fi - ]) - case $gl_cv_header_errno_h_]$1[ in - yes | no) - ]$1[_HIDDEN=0; ]$1[_VALUE= - ;; - *) - ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" - ;; - esac - AC_SUBST($1[_HIDDEN]) - AC_SUBST($1[_VALUE]) - fi -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff --git a/gnulib/m4/error.m4 b/gnulib/m4/error.m4 deleted file mode 100644 index 6ea75ac..0000000 --- a/gnulib/m4/error.m4 +++ /dev/null @@ -1,39 +0,0 @@ -#serial 13 - -# Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_ERROR], -[ - AC_FUNC_ERROR_AT_LINE - dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]). - gl_PREREQ_ERROR -]) - -# Redefine AC_FUNC_ERROR_AT_LINE, because it is no longer maintained in -# Autoconf. -AC_DEFUN([AC_FUNC_ERROR_AT_LINE], -[ - AC_LIBSOURCES([error.h, error.c])dnl - AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[error_at_line (0, 0, "", 0, "an error occurred");]])], - [ac_cv_lib_error_at_line=yes], - [ac_cv_lib_error_at_line=no])]) - if test $ac_cv_lib_error_at_line = no; then - AC_LIBOBJ([error]) - fi -]) - -# Prerequisites of lib/error.c. -AC_DEFUN([gl_PREREQ_ERROR], -[ - AC_REQUIRE([AC_FUNC_STRERROR_R]) - AC_REQUIRE([AC_C_INLINE]) - : -]) diff --git a/gnulib/m4/euidaccess.m4 b/gnulib/m4/euidaccess.m4 deleted file mode 100644 index 5d0d68d..0000000 --- a/gnulib/m4/euidaccess.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# euidaccess.m4 serial 12 -dnl Copyright (C) 2002-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_NONREENTRANT_EUIDACCESS], -[ - AC_REQUIRE([gl_FUNC_EUIDACCESS]) - AC_DEFINE([PREFER_NONREENTRANT_EUIDACCESS], [1], - [Define this if you prefer euidaccess to return the correct result - even if this would make it nonreentrant. Define this only if your - entire application is safe even if the uid or gid might temporarily - change. If your application uses signal handlers or threads it - is probably not safe.]) -]) - -AC_DEFUN([gl_FUNC_EUIDACCESS], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - - dnl Persuade glibc to declare euidaccess(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REPLACE_FUNCS([euidaccess]) - if test $ac_cv_func_euidaccess = no; then - HAVE_EUIDACCESS=0 - gl_PREREQ_EUIDACCESS - fi -]) - -# Prerequisites of lib/euidaccess.c. -AC_DEFUN([gl_PREREQ_EUIDACCESS], [ - dnl Prefer POSIX faccessat over non-standard euidaccess. - AC_CHECK_FUNCS_ONCE([faccessat]) - dnl Try various other non-standard fallbacks. - AC_CHECK_HEADERS_ONCE([libgen.h]) - AC_CHECK_DECLS_ONCE([setregid]) - AC_REQUIRE([AC_FUNC_GETGROUPS]) - - # Solaris 9 needs -lgen to get the eaccess function. - # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all* - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - LIB_EACCESS= - AC_SUBST([LIB_EACCESS]) - gl_saved_libs=$LIBS - AC_SEARCH_LIBS([eaccess], [gen], - [test "$ac_cv_search_eaccess" = "none required" || - LIB_EACCESS=$ac_cv_search_eaccess]) - AC_CHECK_FUNCS([eaccess]) - LIBS=$gl_saved_libs -]) diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4 deleted file mode 100644 index 1330503..0000000 --- a/gnulib/m4/extensions.m4 +++ /dev/null @@ -1,118 +0,0 @@ -# serial 9 -*- Autoconf -*- -# Enable extensions on systems that normally disable them. - -# Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# 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 -# enough in this area it's likely we'll need to redefine -# AC_USE_SYSTEM_EXTENSIONS for quite some time. - -# If autoconf reports a warning -# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS -# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS -# the fix is -# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked -# but always AC_REQUIREd, -# 2) to ensure that for each occurrence of -# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -# or -# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) -# the corresponding gnulib module description has 'extensions' among -# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS -# invocation occurs in gl_EARLY, not in gl_INIT. - -# AC_USE_SYSTEM_EXTENSIONS -# ------------------------ -# 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 -# cause problems on some platforms (such as __EXTENSIONS__). -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], - [Define to 1 if you need to in order for `stat' and other - things to work.]) - AC_DEFINE([_POSIX_1_SOURCE], [2], - [Define to 2 if the system does not provide POSIX.1 features - except with this defined.]) - AC_DEFINE([_MINIX], [1], - [Define to 1 if on MINIX.]) - 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__], -[/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif -]) - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], - [ac_cv_safe_to_define___extensions__], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -# define __EXTENSIONS__ 1 - ]AC_INCLUDES_DEFAULT])], - [ac_cv_safe_to_define___extensions__=yes], - [ac_cv_safe_to_define___extensions__=no])]) - test $ac_cv_safe_to_define___extensions__ = yes && - AC_DEFINE([__EXTENSIONS__]) - AC_DEFINE([_ALL_SOURCE]) - AC_DEFINE([_GNU_SOURCE]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) - AC_DEFINE([_TANDEM_SOURCE]) -])# AC_USE_SYSTEM_EXTENSIONS - -# gl_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], -[ - dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. - dnl gnulib does not need it. But if it gets required by third-party macros - dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a - dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". - dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, - dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -]) diff --git a/gnulib/m4/faccessat.m4 b/gnulib/m4/faccessat.m4 deleted file mode 100644 index d7ba5ac..0000000 --- a/gnulib/m4/faccessat.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# serial 3 -# See if we need to provide faccessat replacement. - -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Eric Blake. - -AC_DEFUN([gl_FUNC_FACCESSAT], -[ - AC_REQUIRE([gl_FUNC_OPENAT]) - AC_REQUIRE([gl_FUNC_EUIDACCESS]) - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([access]) - AC_CHECK_FUNCS_ONCE([faccessat]) - if test $ac_cv_func_faccessat = no; then - HAVE_FACCESSAT=0 - AC_LIBOBJ([faccessat]) - fi -]) diff --git a/gnulib/m4/fchdir.m4 b/gnulib/m4/fchdir.m4 deleted file mode 100644 index 49d89d1..0000000 --- a/gnulib/m4/fchdir.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# fchdir.m4 serial 15 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FCHDIR], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - - AC_CHECK_DECLS_ONCE([fchdir]) - if test $ac_cv_have_decl_fchdir = no; then - HAVE_DECL_FCHDIR=0 - fi - - AC_CHECK_FUNCS_ONCE([fchdir]) - if test $ac_cv_func_fchdir = no; then - HAVE_FCHDIR=0 - AC_LIBOBJ([fchdir]) - gl_PREREQ_FCHDIR - AC_DEFINE([REPLACE_FCHDIR], [1], - [Define to 1 if gnulib's fchdir() replacement is used.]) - dnl We must also replace anything that can manipulate a directory fd, - dnl to keep our bookkeeping up-to-date. We don't have to replace - dnl fstatat, since no platform has fstatat but lacks fchdir. - REPLACE_OPENDIR=1 - REPLACE_CLOSEDIR=1 - REPLACE_DUP=1 - gl_REPLACE_OPEN - gl_REPLACE_CLOSE - gl_REPLACE_DUP2 - dnl dup3 is already unconditionally replaced - gl_REPLACE_FCNTL - gl_REPLACE_DIRENT_H - AC_CACHE_CHECK([whether open can visit directories], - [gl_cv_func_open_directory_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include -]], [return open(".", O_RDONLY) < 0;])], - [gl_cv_func_open_directory_works=yes], - [gl_cv_func_open_directory_works=no], - [gl_cv_func_open_directory_works="guessing no"])]) - if test "$gl_cv_func_open_directory_works" != yes; then - AC_DEFINE([REPLACE_OPEN_DIRECTORY], [1], [Define to 1 if open() should -work around the inability to open a directory.]) - REPLACE_FSTAT=1 - fi - fi -]) - -# Prerequisites of lib/fchdir.c. -AC_DEFUN([gl_PREREQ_FCHDIR], [:]) diff --git a/gnulib/m4/fclose.m4 b/gnulib/m4/fclose.m4 deleted file mode 100644 index 278859c..0000000 --- a/gnulib/m4/fclose.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# fclose.m4 serial 2 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FCLOSE], -[ -]) - -AC_DEFUN([gl_REPLACE_FCLOSE], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - REPLACE_FCLOSE=1 - AC_LIBOBJ([fclose]) -]) diff --git a/gnulib/m4/fcntl-o.m4 b/gnulib/m4/fcntl-o.m4 deleted file mode 100644 index 88db07e..0000000 --- a/gnulib/m4/fcntl-o.m4 +++ /dev/null @@ -1,112 +0,0 @@ -# fcntl-o.m4 serial 3 -dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -# Test whether the flags O_NOATIME and O_NOFOLLOW actually work. -# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. -# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. -AC_DEFUN([gl_FCNTL_O_FLAGS], -[ - dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes - dnl AC_GNU_SOURCE. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], - [AC_REQUIRE([AC_GNU_SOURCE])]) - AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - #include - #include - #ifndef O_NOATIME - #define O_NOATIME 0 - #endif - #ifndef O_NOFOLLOW - #define O_NOFOLLOW 0 - #endif - static int const constants[] = - { - O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, - O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY - }; - ]], - [[ - int result = !constants; - { - static char const sym[] = "conftest.sym"; - if (symlink (".", sym) != 0) - result |= 2; - else - { - int fd = open (sym, O_RDONLY | O_NOFOLLOW); - if (fd >= 0) - { - close (fd); - result |= 4; - } - } - unlink (sym); - } - { - static char const file[] = "confdefs.h"; - int fd = open (file, O_RDONLY | O_NOATIME); - if (fd < 0) - result |= 8; - else - { - struct stat st0; - if (fstat (fd, &st0) != 0) - result |= 16; - else - { - char c; - sleep (1); - if (read (fd, &c, 1) != 1) - result |= 24; - else - { - if (close (fd) != 0) - result |= 32; - else - { - struct stat st1; - if (stat (file, &st1) != 0) - result |= 40; - else - if (st0.st_atime != st1.st_atime) - result |= 64; - } - } - } - } - } - return result;]])], - [gl_cv_header_working_fcntl_h=yes], - [case $? in #( - 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( - 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( - 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( - *) gl_cv_header_working_fcntl_h='no';; - esac], - [gl_cv_header_working_fcntl_h=cross-compiling])]) - - case $gl_cv_header_working_fcntl_h in #( - *O_NOATIME* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], - [Define to 1 if O_NOATIME works.]) - - case $gl_cv_header_working_fcntl_h in #( - *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], - [Define to 1 if O_NOFOLLOW works.]) -]) diff --git a/gnulib/m4/fcntl-safer.m4 b/gnulib/m4/fcntl-safer.m4 deleted file mode 100644 index b120101..0000000 --- a/gnulib/m4/fcntl-safer.m4 +++ /dev/null @@ -1,19 +0,0 @@ -#serial 7 -dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FCNTL_SAFER], -[ - AC_LIBOBJ([open-safer]) - AC_LIBOBJ([creat-safer]) - # Prerequisites of lib/open-safer.c. - AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) -]) - -AC_DEFUN([gl_OPENAT_SAFER], -[ - AC_REQUIRE([gl_FCNTL_SAFER]) - AC_LIBOBJ([openat-safer]) -]) diff --git a/gnulib/m4/fcntl.m4 b/gnulib/m4/fcntl.m4 deleted file mode 100644 index a93ed85..0000000 --- a/gnulib/m4/fcntl.m4 +++ /dev/null @@ -1,88 +0,0 @@ -# fcntl.m4 serial 4 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# For now, this module ensures that fcntl() -# - supports F_DUPFD correctly -# - supports or emulates F_DUPFD_CLOEXEC -# - supports F_GETFD -# Still to be ported to mingw: -# - F_SETFD -# - F_GETFL, F_SETFL -# - F_GETOWN, F_SETOWN -# - F_GETLK, F_SETLK, F_SETLKW -AC_DEFUN([gl_FUNC_FCNTL], -[ - dnl Persuade glibc to expose F_DUPFD_CLOEXEC. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS_ONCE([fcntl]) - if test $ac_cv_func_fcntl = no; then - gl_REPLACE_FCNTL - else - dnl cygwin 1.5.x F_DUPFD has wrong errno, and allows negative target - dnl haiku alpha 2 F_DUPFD has wrong errno - AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly], - [gl_cv_func_fcntl_f_dupfd_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -]], [[int result = 0; - if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; - if (errno != EINVAL) result |= 2; - return result; - ]])], - [gl_cv_func_fcntl_f_dupfd_works=yes], - [gl_cv_func_fcntl_f_dupfd_works=no], - [# Guess that it works on glibc systems - case $host_os in #(( - *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; - *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; - esac])]) - case $gl_cv_func_fcntl_f_dupfd_works in - *yes) ;; - *) gl_REPLACE_FCNTL - AC_DEFINE([FCNTL_DUPFD_BUGGY], [1], [Define this to 1 if F_DUPFD - behavior does not match POSIX]) ;; - esac - - dnl Many systems lack F_DUPFD_CLOEXEC - AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC], - [gl_cv_func_fcntl_f_dupfd_cloexec], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#ifndef F_DUPFD_CLOEXEC -choke me -#endif - ]])], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#ifdef __linux__ -/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace - it to support the semantics on older kernels that failed with EINVAL. */ -choke me -#endif - ]])], - [gl_cv_func_fcntl_f_dupfd_cloexec=yes], - [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])], - [gl_cv_func_fcntl_f_dupfd_cloexec=no])]) - if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then - gl_REPLACE_FCNTL - dnl No witness macro needed for this bug. - fi - fi -]) - -AC_DEFUN([gl_REPLACE_FCNTL], -[ - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([fcntl]) - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else - REPLACE_FCNTL=1 - fi - AC_LIBOBJ([fcntl]) -]) diff --git a/gnulib/m4/fcntl_h.m4 b/gnulib/m4/fcntl_h.m4 deleted file mode 100644 index 1ef4f45..0000000 --- a/gnulib/m4/fcntl_h.m4 +++ /dev/null @@ -1,43 +0,0 @@ -# serial 13 -# Configure fcntl.h. -dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl_FCNTL_H], -[ - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - AC_REQUIRE([gl_FCNTL_O_FLAGS]) - gl_NEXT_HEADERS([fcntl.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, if it is not common - dnl enough to be declared everywhere. - gl_WARN_ON_USE_PREPARE([[#include - ]], [fcntl openat]) -]) - -AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_FCNTL_H_DEFAULTS], -[ - GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) - GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) - GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) - HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) - REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) - REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) - REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT]) -]) diff --git a/gnulib/m4/fdopendir.m4 b/gnulib/m4/fdopendir.m4 deleted file mode 100644 index f192a62..0000000 --- a/gnulib/m4/fdopendir.m4 +++ /dev/null @@ -1,49 +0,0 @@ -# serial 5 -# See if we need to provide fdopendir. - -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Eric Blake. - -AC_DEFUN([gl_FUNC_FDOPENDIR], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - dnl FreeBSD 7.3 has the function, but failed to declare it. - AC_CHECK_DECLS([fdopendir], [], [HAVE_DECL_FDOPENDIR=0], [[ -#include - ]]) - AC_CHECK_FUNCS_ONCE([fdopendir]) - if test $ac_cv_func_fdopendir = no; then - AC_LIBOBJ([openat-proc]) - AC_LIBOBJ([fdopendir]) - gl_REPLACE_DIRENT_H - HAVE_FDOPENDIR=0 - else - AC_CACHE_CHECK([whether fdopendir works], - [gl_cv_func_fdopendir_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -#if !HAVE_DECL_FDOPENDIR -extern DIR *fdopendir (int); -#endif -]], [int result = 0; - int fd = open ("conftest.c", O_RDONLY); - if (fd < 0) result |= 1; - if (fdopendir (fd)) result |= 2; - if (close (fd)) result |= 4; - return result;])], - [gl_cv_func_fdopendir_works=yes], - [gl_cv_func_fdopendir_works=no], - [gl_cv_func_fdopendir_works="guessing no"])]) - if test "$gl_cv_func_fdopendir_works" != yes; then - REPLACE_FDOPENDIR=1 - gl_REPLACE_DIRENT_H - AC_LIBOBJ([fdopendir]) - fi - fi -]) diff --git a/gnulib/m4/fflush.m4 b/gnulib/m4/fflush.m4 deleted file mode 100644 index f7645de..0000000 --- a/gnulib/m4/fflush.m4 +++ /dev/null @@ -1,81 +0,0 @@ -# fflush.m4 serial 8 - -# Copyright (C) 2007-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Eric Blake - -dnl Find out how to obey POSIX semantics of fflush(stdin) discarding -dnl unread input on seekable streams, rather than C99 undefined semantics. - -AC_DEFUN([gl_FUNC_FFLUSH], -[ - AC_CACHE_CHECK([whether fflush works on input streams], - [gl_cv_func_fflush_stdin], - [echo hello world > conftest.txt - AC_RUN_IFELSE([AC_LANG_PROGRAM( - [[ -#include -#include - ]], [[FILE *f = fopen ("conftest.txt", "r"); - char buffer[10]; - int fd; - int c; - if (f == NULL) - return 1; - fd = fileno (f); - if (fd < 0 || fread (buffer, 1, 5, f) != 5) - return 2; - /* For deterministic results, ensure f read a bigger buffer. */ - if (lseek (fd, 0, SEEK_CUR) == 5) - return 3; - /* POSIX requires fflush-fseek to set file offset of fd. This fails - on BSD systems and on mingw. */ - if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) - return 4; - if (lseek (fd, 0, SEEK_CUR) != 5) - return 5; - /* Verify behaviour of fflush after ungetc. See - */ - /* Verify behaviour of fflush after a backup ungetc. This fails on - mingw. */ - c = fgetc (f); - ungetc (c, f); - fflush (f); - if (fgetc (f) != c) - return 6; - /* Verify behaviour of fflush after a non-backup ungetc. This fails - on glibc 2.8 and on BSD systems. */ - c = fgetc (f); - ungetc ('@', f); - fflush (f); - if (fgetc (f) != c) - return 7; - return 0; - ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no], - [dnl Pessimistically assume fflush is broken. - gl_cv_func_fflush_stdin=no]) - rm conftest.txt - ]) - if test $gl_cv_func_fflush_stdin = no; then - gl_REPLACE_FFLUSH - fi -]) - -AC_DEFUN([gl_REPLACE_FFLUSH], -[ - AC_LIBOBJ([fflush]) - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - REPLACE_FFLUSH=1 - gl_PREREQ_FFLUSH - gl_REPLACE_FSEEKO -]) - -# Prerequisites of lib/fflush.c. -AC_DEFUN([gl_PREREQ_FFLUSH], -[ - AC_REQUIRE([AC_C_INLINE]) - : -]) diff --git a/gnulib/m4/fileblocks.m4 b/gnulib/m4/fileblocks.m4 deleted file mode 100644 index c8f9962..0000000 --- a/gnulib/m4/fileblocks.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# fileblocks.m4 serial 5 -dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FILEBLOCKS], -[ - AC_STRUCT_ST_BLOCKS - dnl Note: AC_STRUCT_ST_BLOCKS does AC_LIBOBJ([fileblocks]). - if test $ac_cv_member_struct_stat_st_blocks = no; then - gl_PREREQ_FILEBLOCKS - fi -]) - -# Prerequisites of lib/fileblocks.c. -AC_DEFUN([gl_PREREQ_FILEBLOCKS], [ - AC_CHECK_HEADERS_ONCE([sys/param.h]) - : -]) diff --git a/gnulib/m4/filemode.m4 b/gnulib/m4/filemode.m4 deleted file mode 100644 index 4147fd0..0000000 --- a/gnulib/m4/filemode.m4 +++ /dev/null @@ -1,12 +0,0 @@ -# filemode.m4 serial 7 -dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FILEMODE], -[ - AC_REQUIRE([AC_STRUCT_ST_DM_MODE]) - AC_LIBOBJ([filemode]) - AC_CHECK_DECLS_ONCE([strmode]) -]) diff --git a/gnulib/m4/flexmember.m4 b/gnulib/m4/flexmember.m4 deleted file mode 100644 index 8884cb1..0000000 --- a/gnulib/m4/flexmember.m4 +++ /dev/null @@ -1,41 +0,0 @@ -# serial 2 -# Check for flexible array member support. - -# Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], -[ - AC_CACHE_CHECK([for flexible array member], - ac_cv_c_flexmember, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - #include - struct s { int n; double d[]; };]], - [[int m = getchar (); - struct s *p = malloc (offsetof (struct s, d) - + m * sizeof (double)); - p->d[0] = 0.0; - return p->d != (double *) NULL;]])], - [ac_cv_c_flexmember=yes], - [ac_cv_c_flexmember=no])]) - if test $ac_cv_c_flexmember = yes; then - AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [], - [Define to nothing if C supports flexible array members, and to - 1 if it does not. That way, with a declaration like `struct s - { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack - can be used with pre-C99 compilers. - When computing the size of such an object, don't use 'sizeof (struct s)' - as it overestimates the size. Use 'offsetof (struct s, d)' instead. - Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with - MSVC and with C++ compilers.]) - else - AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1]) - fi -]) diff --git a/gnulib/m4/float_h.m4 b/gnulib/m4/float_h.m4 deleted file mode 100644 index 265a4c1..0000000 --- a/gnulib/m4/float_h.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# float_h.m4 serial 5 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FLOAT_H], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - FLOAT_H= - case "$host_os" in - beos* | openbsd* | mirbsd*) - FLOAT_H=float.h - gl_NEXT_HEADERS([float.h]) - ;; - esac - AC_SUBST([FLOAT_H]) -]) diff --git a/gnulib/m4/fnmatch.m4 b/gnulib/m4/fnmatch.m4 deleted file mode 100644 index 9b537a7..0000000 --- a/gnulib/m4/fnmatch.m4 +++ /dev/null @@ -1,150 +0,0 @@ -# Check for fnmatch - serial 5. - -# Copyright (C) 2000-2007, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Autoconf defines AC_FUNC_FNMATCH, but that is obsolescent. -# New applications should use the macros below instead. - -# Request a POSIX compliant fnmatch function. -AC_DEFUN([gl_FUNC_FNMATCH_POSIX], -[ - m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX]) - - dnl Persuade glibc to declare FNM_CASEFOLD etc. - dnl This is only needed if gl_fnmatch_required = GNU. It would be possible - dnl to avoid this dependency for gl_FUNC_FNMATCH_POSIX by putting - dnl gl_FUNC_FNMATCH_GNU into a separate .m4 file. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - FNMATCH_H= - gl_fnmatch_required_lowercase=` - echo $gl_fnmatch_required | tr '[[A-Z]]' '[[a-z]]' - ` - gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" - AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch], - [$gl_fnmatch_cache_var], - [dnl Some versions of Solaris, SCO, and the GNU C Library - dnl have a broken or incompatible fnmatch. - dnl So we run a test program. If we are cross-compiling, take no chance. - dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this - dnl test. - if test $gl_fnmatch_required = GNU; then - gl_fnmatch_gnu_start= - gl_fnmatch_gnu_end= - else - gl_fnmatch_gnu_start='#if 0' - gl_fnmatch_gnu_end='#endif' - fi - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - static int - y (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == 0; - } - static int - n (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == FNM_NOMATCH; - } - ]], - [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; - char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; - static char const A_1[] = { 'A' - 1, 0 }; - static char const A01[] = { 'A' + 1, 0 }; - static char const a_1[] = { 'a' - 1, 0 }; - static char const a01[] = { 'a' + 1, 0 }; - static char const bs_1[] = { '\\\\' - 1, 0 }; - static char const bs01[] = { '\\\\' + 1, 0 }; - int result = 0; - if (!n ("a*", "", 0)) - return 1; - if (!y ("a*", "abc", 0)) - return 1; - if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) - return 2; - if (!y ("a\\\\bc", "abc", 0)) - return 3; - if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) - return 3; - if (!y ("*x", ".x", 0)) - return 4; - if (!n ("*x", ".x", FNM_PERIOD)) - return 4; - if (!y (Apat, "\\\\", 0)) - return 5; - if (!y (Apat, "A", 0)) - return 5; - if (!y (apat, "\\\\", 0)) - return 5; - if (!y (apat, "a", 0)) - return 5; - if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, a01, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) - return 5; - $gl_fnmatch_gnu_start - if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) - result |= 8; - if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) - result |= 16; - if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) - result |= 32; - if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - $gl_fnmatch_gnu_end - return result; - ]])], - [eval "$gl_fnmatch_cache_var=yes"], - [eval "$gl_fnmatch_cache_var=no"], - [eval "$gl_fnmatch_cache_var=\"guessing no\""]) - ]) - eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" - if test "$gl_fnmatch_result" = yes; then - dnl Not strictly necessary. Only to avoid spurious leftover files if people - dnl don't do "make distclean". - rm -f "$gl_source_base/fnmatch.h" - else - FNMATCH_H=fnmatch.h - AC_LIBOBJ([fnmatch]) - dnl We must choose a different name for our function, since on ELF systems - dnl a broken fnmatch() in libc.so would override our fnmatch() if it is - dnl compiled into a shared library. - AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch], - [Define to a replacement function name for fnmatch().]) - dnl Prerequisites of lib/fnmatch.c. - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - AC_CHECK_DECLS([isblank], [], [], [#include ]) - AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy]) - AC_CHECK_HEADERS_ONCE([wctype.h]) - fi - AC_SUBST([FNMATCH_H]) -]) - -# Request a POSIX compliant fnmatch function with GNU extensions. -AC_DEFUN([gl_FUNC_FNMATCH_GNU], -[ - m4_divert_text([INIT_PREPARE], [gl_fnmatch_required=GNU]) - - AC_REQUIRE([gl_FUNC_FNMATCH_POSIX]) -]) diff --git a/gnulib/m4/fopen.m4 b/gnulib/m4/fopen.m4 deleted file mode 100644 index 8407ed4..0000000 --- a/gnulib/m4/fopen.m4 +++ /dev/null @@ -1,65 +0,0 @@ -# fopen.m4 serial 7 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FOPEN], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw* | pw*) - dnl Replace fopen, for handling of "/dev/null". - REPLACE_FOPEN=1 - dnl fopen on mingw also has the trailing slash bug. - gl_cv_func_fopen_slash="guessing no" - ;; - *) - dnl fopen("foo/", "w") should not create a file when the file name has a - dnl trailing slash. - AC_CACHE_CHECK([whether fopen recognizes a trailing slash], - [gl_cv_func_fopen_slash], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -int main () -{ - return fopen ("conftest.sl/", "w") != NULL; -}]])], - [gl_cv_func_fopen_slash=yes], - [gl_cv_func_fopen_slash=no], - [ -changequote(,)dnl - case "$host_os" in - aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) - gl_cv_func_fopen_slash="guessing no" ;; - *) - gl_cv_func_fopen_slash="guessing yes" ;; - esac -changequote([,])dnl - ]) - rm -f conftest.sl - ]) - ;; - esac - case "$gl_cv_func_fopen_slash" in - *no) - AC_DEFINE([FOPEN_TRAILING_SLASH_BUG], [1], - [Define to 1 if fopen() fails to recognize a trailing slash.]) - REPLACE_FOPEN=1 - ;; - esac - if test $REPLACE_FOPEN = 1; then - AC_LIBOBJ([fopen]) - gl_PREREQ_FOPEN - fi -]) - -# Prerequisites of lib/fopen.c. -AC_DEFUN([gl_PREREQ_FOPEN], -[ - AC_REQUIRE([AC_C_INLINE]) -]) diff --git a/gnulib/m4/fpending.m4 b/gnulib/m4/fpending.m4 deleted file mode 100644 index 314e003..0000000 --- a/gnulib/m4/fpending.m4 +++ /dev/null @@ -1,83 +0,0 @@ -# serial 15 - -# Copyright (C) 2000-2001, 2004-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering -dnl Using code from emacs, based on suggestions from Paul Eggert -dnl and Ulrich Drepper. - -dnl Find out how to determine the number of pending output bytes on a stream. -dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems, -dnl we have to grub around in the FILE struct. - -AC_DEFUN([gl_FUNC_FPENDING], -[ - AC_CHECK_HEADERS_ONCE([stdio_ext.h]) - AC_CHECK_FUNCS_ONCE([__fpending]) - fp_headers=' -# include -# if HAVE_STDIO_EXT_H -# include -# endif -' - AC_CHECK_DECLS([__fpending], , , $fp_headers) - if test $ac_cv_func___fpending = no; then - AC_CACHE_CHECK( - [how to determine the number of pending output bytes on a stream], - ac_cv_sys_pending_output_n_bytes, - [ - for ac_expr in \ - \ - '# glibc2' \ - 'fp->_IO_write_ptr - fp->_IO_write_base' \ - \ - '# traditional Unix' \ - 'fp->_ptr - fp->_base' \ - \ - '# BSD' \ - 'fp->_p - fp->_bf._base' \ - \ - '# SCO, Unixware' \ - '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ - \ - '# QNX' \ - '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ - \ - '# old glibc?' \ - 'fp->__bufp - fp->__buffer' \ - \ - '# old glibc iostream?' \ - 'fp->_pptr - fp->_pbase' \ - \ - '# emx+gcc' \ - 'fp->_ptr - fp->_buffer' \ - \ - '# VMS' \ - '(*fp)->_ptr - (*fp)->_base' \ - \ - '# e.g., DGUX R4.11; the info is not available' \ - 1 \ - ; do - - # Skip each embedded comment. - case "$ac_expr" in '#'*) continue;; esac - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[FILE *fp = stdin; (void) ($ac_expr);]])], - [fp_done=yes] - ) - test "$fp_done" = yes && break - done - - ac_cv_sys_pending_output_n_bytes=$ac_expr - ] - ) - AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES], - $ac_cv_sys_pending_output_n_bytes, - [the number of pending output bytes on stream `fp']) - AC_LIBOBJ([fpending]) - fi -]) diff --git a/gnulib/m4/fpurge.m4 b/gnulib/m4/fpurge.m4 deleted file mode 100644 index a62c2fe..0000000 --- a/gnulib/m4/fpurge.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# fpurge.m4 serial 6 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FPURGE], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([fpurge]) - AC_CHECK_FUNCS_ONCE([__fpurge]) - AC_CHECK_DECLS([fpurge], , , [[#include ]]) - if test "x$ac_cv_func_fpurge" = xyes; then - # Detect BSD bug. Only cygwin 1.7 is known to be immune. - AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include -]], [FILE *f = fopen ("conftest.txt", "w+"); - if (!f) return 1; - if (fputc ('a', f) != 'a') return 2; - rewind (f); - if (fgetc (f) != 'a') return 3; - if (fgetc (f) != EOF) return 4; - if (fpurge (f) != 0) return 5; - if (putc ('b', f) != 'b') return 6; - if (fclose (f) != 0) return 7; - if ((f = fopen ("conftest.txt", "r")) == NULL) return 8; - if (fgetc (f) != 'a') return 9; - if (fgetc (f) != 'b') return 10; - if (fgetc (f) != EOF) return 11; - if (fclose (f) != 0) return 12; - if (remove ("conftest.txt") != 0) return 13; - return 0;])], - [gl_cv_func_fpurge_works=yes], [gl_cv_func_fpurge_works=no], - [gl_cv_func_fpurge_works='guessing no'])]) - if test "x$gl_cv_func_fpurge_works" != xyes; then - REPLACE_FPURGE=1 - AC_LIBOBJ([fpurge]) - fi - else - AC_LIBOBJ([fpurge]) - fi - if test "x$ac_cv_have_decl_fpurge" = xno; then - HAVE_DECL_FPURGE=0 - fi -]) diff --git a/gnulib/m4/freading.m4 b/gnulib/m4/freading.m4 deleted file mode 100644 index 59d502e..0000000 --- a/gnulib/m4/freading.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# freading.m4 serial 1 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FREADING], -[ - AC_CHECK_FUNCS_ONCE([__freading]) -]) diff --git a/gnulib/m4/fseeko.m4 b/gnulib/m4/fseeko.m4 deleted file mode 100644 index 76507d1..0000000 --- a/gnulib/m4/fseeko.m4 +++ /dev/null @@ -1,75 +0,0 @@ -# fseeko.m4 serial 11 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FSEEKO], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([gl_HAVE_FSEEKO]) - AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) - - AC_CHECK_DECLS_ONCE([fseeko]) - if test $ac_cv_have_decl_fseeko = no; then - HAVE_DECL_FSEEKO=0 - fi - - if test $gl_cv_func_fseeko = no; then - HAVE_FSEEKO=0 - gl_REPLACE_FSEEKO - else - if test $gl_cv_var_stdin_large_offset = no; then - gl_REPLACE_FSEEKO - fi - fi -]) - -dnl Tests whether fseeko is available. -dnl Result is gl_cv_func_fseeko. -AC_DEFUN([gl_HAVE_FSEEKO], -[ - AC_REQUIRE([AC_PROG_CC]) - - dnl Persuade glibc to declare fseeko(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko], - [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include -]], [fseeko (stdin, 0, 0);])], - [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no]) - ]) -]) - -AC_DEFUN([gl_REPLACE_FSEEKO], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([gl_HAVE_FSEEKO]) - if test $gl_cv_func_fseeko = yes; then - REPLACE_FSEEKO=1 - fi - AC_LIBOBJ([fseeko]) - dnl If we are also using the fseek module, then fseek needs replacing, too. - m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK]) -]) - -dnl Code shared by fseeko and ftello. Determine if large files are supported, -dnl but stdin does not start as a large file by default. -AC_DEFUN([gl_STDIN_LARGE_OFFSET], - [ - AC_CACHE_CHECK([whether stdin defaults to large file offsets], - [gl_cv_var_stdin_large_offset], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], -[[#if defined __SL64 && defined __SCLE /* cygwin */ - /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making - fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and - it is easier to do a version check than building a runtime test. */ -# include -# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25) - choke me -# endif -#endif]])], - [gl_cv_var_stdin_large_offset=yes], - [gl_cv_var_stdin_large_offset=no])]) -]) diff --git a/gnulib/m4/fstypename.m4 b/gnulib/m4/fstypename.m4 deleted file mode 100644 index 20d2f05..0000000 --- a/gnulib/m4/fstypename.m4 +++ /dev/null @@ -1,23 +0,0 @@ -#serial 6 - -dnl From Jim Meyering. -dnl -dnl See if struct statfs has the f_fstypename member. -dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME. -dnl - -# Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2011 Free Software -# Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FSTYPENAME], -[ - AC_CHECK_MEMBERS([struct statfs.f_fstypename],,, - [ - #include - #include - #include - ]) -]) diff --git a/gnulib/m4/ftell.m4 b/gnulib/m4/ftell.m4 deleted file mode 100644 index 8d88485..0000000 --- a/gnulib/m4/ftell.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# ftell.m4 serial 1 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FTELL], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([gl_FUNC_FTELLO]) - dnl When ftello needs fixes, ftell needs them too. - if test $REPLACE_FTELLO != 0; then - AC_LIBOBJ([ftell]) - REPLACE_FTELL=1 - fi -]) diff --git a/gnulib/m4/ftello.m4 b/gnulib/m4/ftello.m4 deleted file mode 100644 index 599f8f2..0000000 --- a/gnulib/m4/ftello.m4 +++ /dev/null @@ -1,135 +0,0 @@ -# ftello.m4 serial 9 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FTELLO], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_STDIN_LARGE_OFFSET]) - - dnl Persuade glibc to declare ftello(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS_ONCE([ftello]) - if test $ac_cv_have_decl_ftello = no; then - HAVE_DECL_FTELLO=0 - fi - - AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello], - [ - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[ftello (stdin);]])], - [gl_cv_func_ftello=yes], - [gl_cv_func_ftello=no]) - ]) - if test $gl_cv_func_ftello = no; then - HAVE_FTELLO=0 - else - if test $gl_cv_var_stdin_large_offset = no; then - REPLACE_FTELLO=1 - else - dnl Detect bug on Solaris. - dnl ftell and ftello produce incorrect results after putc that followed a - dnl getc call that reached EOF on Solaris. This is because the _IOREAD - dnl flag does not get cleared in this case, even though _IOWRT gets set, - dnl and ftell and ftello look whether the _IOREAD flag is set. - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CACHE_CHECK([whether ftello works], - [gl_cv_func_ftello_works], - [ - dnl Initial guess, used when cross-compiling or when /dev/tty cannot - dnl be opened. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris. - solaris*) gl_cv_func_ftello_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_ftello_works="guessing yes" ;; - esac -changequote([,])dnl - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include -#define TESTFILE "conftest.tmp" -int -main (void) -{ - FILE *fp; - - /* Create a file with some contents. */ - fp = fopen (TESTFILE, "w"); - if (fp == NULL) - return 70; - if (fwrite ("foogarsh", 1, 8, fp) < 8) - return 71; - if (fclose (fp)) - return 72; - - /* The file's contents is now "foogarsh". */ - - /* Try writing after reading to EOF. */ - fp = fopen (TESTFILE, "r+"); - if (fp == NULL) - return 73; - if (fseek (fp, -1, SEEK_END)) - return 74; - if (!(getc (fp) == 'h')) - return 1; - if (!(getc (fp) == EOF)) - return 2; - if (!(ftell (fp) == 8)) - return 3; - if (!(ftell (fp) == 8)) - return 4; - if (!(putc ('!', fp) == '!')) - return 5; - if (!(ftell (fp) == 9)) - return 6; - if (!(fclose (fp) == 0)) - return 7; - fp = fopen (TESTFILE, "r"); - if (fp == NULL) - return 75; - { - char buf[10]; - if (!(fread (buf, 1, 10, fp) == 9)) - return 10; - if (!(memcmp (buf, "foogarsh!", 9) == 0)) - return 11; - } - if (!(fclose (fp) == 0)) - return 12; - - /* The file's contents is now "foogarsh!". */ - - return 0; -}]])], - [gl_cv_func_ftello_works=yes], - [gl_cv_func_ftello_works=no], [:]) - ]) - case "$gl_cv_func_ftello_works" in - *yes) ;; - *) - REPLACE_FTELLO=1 - AC_DEFINE([FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE], [1], - [Define to 1 if the system's ftello function has the Solaris bug.]) - ;; - esac - fi - fi - if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then - gl_REPLACE_FTELLO - fi -]) - -AC_DEFUN([gl_REPLACE_FTELLO], -[ - AC_LIBOBJ([ftello]) -]) diff --git a/gnulib/m4/fts.m4 b/gnulib/m4/fts.m4 deleted file mode 100644 index f69b5d9..0000000 --- a/gnulib/m4/fts.m4 +++ /dev/null @@ -1,27 +0,0 @@ -#serial 18 -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FTS], -[ - gl_FUNC_FTS_CORE -]) - -AC_DEFUN([gl_FUNC_FTS_CORE], -[ - dnl Use this version of fts unconditionally, since the GNU libc and - dnl NetBSD versions have bugs and/or unnecessary limitations. - AC_LIBOBJ([fts]) - - dnl Prerequisites of lib/fts.c. - AC_REQUIRE([AC_C_INLINE]) - gl_FUNC_OPENAT - - AC_CHECK_FUNCS_ONCE([fstatfs]) - AC_CHECK_HEADERS_ONCE([sys/param.h sys/vfs.h])dnl - AC_CHECK_MEMBERS([struct statfs.f_type],,, - [$ac_includes_default - #include ]) -]) diff --git a/gnulib/m4/getcwd-abort-bug.m4 b/gnulib/m4/getcwd-abort-bug.m4 deleted file mode 100644 index 21be828..0000000 --- a/gnulib/m4/getcwd-abort-bug.m4 +++ /dev/null @@ -1,106 +0,0 @@ -# serial 2 -# Determine whether getcwd aborts when the length of the working directory -# name is unusually large. Any length between 4k and 16k trigger the bug -# when using glibc-2.4.90-9 or older. - -# Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# From Jim Meyering - -# gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG], -[ - AC_CHECK_DECLS_ONCE([getcwd]) - AC_CHECK_FUNCS([getpagesize]) - AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k], - gl_cv_func_getcwd_abort_bug, - [# Remove any remnants of a previous test. - rm -rf confdir-14B--- - # Arrange for deletion of the temporary directory this test creates. - ac_clean_files="$ac_clean_files confdir-14B---" - AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [[ -#include -#include -#include -#include -#include - -/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ -#undef mkdir - -#ifndef S_IRWXU -# define S_IRWXU 0700 -#endif - -/* FIXME: skip the run-test altogether on systems without getpagesize. */ -#if ! HAVE_GETPAGESIZE -# define getpagesize() 0 -#endif - -/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than - the 16kB pagesize on ia64 linux. Those conditions make the code below - trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ -#define TARGET_LEN (5 * 1024) - -int -main () -{ - char const *dir_name = "confdir-14B---"; - char *cwd; - size_t initial_cwd_len; - int fail = 0; - size_t desired_depth; - size_t d; - - /* The bug is triggered when PATH_MAX < getpagesize (), so skip - this relative expensive and invasive test if that's not true. */ - if (getpagesize () <= PATH_MAX) - return 0; - - cwd = getcwd (NULL, 0); - if (cwd == NULL) - return 0; - - initial_cwd_len = strlen (cwd); - free (cwd); - desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) - / (1 + strlen (dir_name))); - for (d = 0; d < desired_depth; d++) - { - if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) - { - fail = 3; /* Unable to construct deep hierarchy. */ - break; - } - } - - /* If libc has the bug in question, this invocation of getcwd - results in a failed assertion. */ - cwd = getcwd (NULL, 0); - if (cwd == NULL) - fail = 4; /* getcwd failed. This is ok, and expected. */ - free (cwd); - - /* Call rmdir first, in case the above chdir failed. */ - rmdir (dir_name); - while (0 < d--) - { - if (chdir ("..") < 0) - break; - rmdir (dir_name); - } - - return 0; -} - ]])], - [gl_cv_func_getcwd_abort_bug=no], - [gl_cv_func_getcwd_abort_bug=yes], - [gl_cv_func_getcwd_abort_bug=yes]) - ]) - AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2]) -]) diff --git a/gnulib/m4/getcwd-path-max.m4 b/gnulib/m4/getcwd-path-max.m4 deleted file mode 100644 index 2ab2645..0000000 --- a/gnulib/m4/getcwd-path-max.m4 +++ /dev/null @@ -1,188 +0,0 @@ -# serial 15 -# Check for several getcwd bugs with long file names. -# If so, arrange to compile the wrapper function. - -# This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20. -# I've heard that this is due to a Linux kernel bug, and that it has -# been fixed between 2.4.21-pre3 and 2.4.21-pre4. */ - -# Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# From Jim Meyering - -AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX], -[ - AC_CHECK_DECLS_ONCE([getcwd]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CACHE_CHECK([whether getcwd handles long file names properly], - gl_cv_func_getcwd_path_max, - [# Arrange for deletion of the temporary directory this test creates. - ac_clean_files="$ac_clean_files confdir3" - AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [[ -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef AT_FDCWD -# define AT_FDCWD 0 -#endif -#ifdef ENAMETOOLONG -# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) -#else -# define is_ENAMETOOLONG(x) 0 -#endif - -/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ -#undef mkdir - -#ifndef S_IRWXU -# define S_IRWXU 0700 -#endif - -/* The length of this name must be 8. */ -#define DIR_NAME "confdir3" -#define DIR_NAME_LEN 8 -#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) - -/* The length of "../". */ -#define DOTDOTSLASH_LEN 3 - -/* Leftover bytes in the buffer, to work around library or OS bugs. */ -#define BUF_SLOP 20 - -int -main () -{ -#ifndef PATH_MAX - /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- - at least not on a local file system. And if we were to start worrying - about remote file systems, we'd have to enable the wrapper function - all of the time, just to be safe. That's not worth the cost. */ - exit (0); -#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ - - DIR_NAME_SIZE - BUF_SLOP) \ - <= PATH_MAX) - /* FIXME: Assuming there's a system for which this is true, - this should be done in a compile test. */ - exit (0); -#else - char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) - + DIR_NAME_SIZE + BUF_SLOP]; - char *cwd = getcwd (buf, PATH_MAX); - size_t initial_cwd_len; - size_t cwd_len; - int fail = 0; - size_t n_chdirs = 0; - - if (cwd == NULL) - exit (10); - - cwd_len = initial_cwd_len = strlen (cwd); - - while (1) - { - size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); - char *c = NULL; - - cwd_len += DIR_NAME_SIZE; - /* If mkdir or chdir fails, it could be that this system cannot create - any file with an absolute name longer than PATH_MAX, such as cygwin. - If so, leave fail as 0, because the current working directory can't - be too long for getcwd if it can't even be created. For other - errors, be pessimistic and consider that as a failure, too. */ - if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) - { - if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) - fail = 20; - break; - } - - if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) - { - c = getcwd (buf, PATH_MAX); - if (!c && errno == ENOENT) - { - fail = 11; - break; - } - if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno))) - { - fail = 21; - break; - } - } - - if (dotdot_max <= cwd_len - initial_cwd_len) - { - if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) - break; - c = getcwd (buf, cwd_len + 1); - if (!c) - { - if (! (errno == ERANGE || errno == ENOENT - || is_ENAMETOOLONG (errno))) - { - fail = 22; - break; - } - if (AT_FDCWD || errno == ERANGE || errno == ENOENT) - { - fail = 12; - break; - } - } - } - - if (c && strlen (c) != cwd_len) - { - fail = 23; - break; - } - ++n_chdirs; - } - - /* Leaving behind such a deep directory is not polite. - So clean up here, right away, even though the driving - shell script would also clean up. */ - { - size_t i; - - /* Try rmdir first, in case the chdir failed. */ - rmdir (DIR_NAME); - for (i = 0; i <= n_chdirs; i++) - { - if (chdir ("..") < 0) - break; - if (rmdir (DIR_NAME) != 0) - break; - } - } - - exit (fail); -#endif -} - ]])], - [gl_cv_func_getcwd_path_max=yes], - [case $? in - 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; - *) gl_cv_func_getcwd_path_max=no;; - esac], - [gl_cv_func_getcwd_path_max=no]) - ]) - case $gl_cv_func_getcwd_path_max in - no,*) - AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1], - [Define to 1 if getcwd works, except it sometimes fails when it shouldn't, - setting errno to ERANGE, ENAMETOOLONG, or ENOENT.]);; - esac -]) diff --git a/gnulib/m4/getcwd.m4 b/gnulib/m4/getcwd.m4 deleted file mode 100644 index 7098056..0000000 --- a/gnulib/m4/getcwd.m4 +++ /dev/null @@ -1,85 +0,0 @@ -# getcwd.m4 - check for working getcwd that is compatible with glibc - -# Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. -# serial 3 - -AC_DEFUN([gl_FUNC_GETCWD_NULL], - [ - AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result], - [gl_cv_func_getcwd_null], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -# include -# ifndef getcwd - char *getcwd (); -# endif -]], [[ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* mingw cwd does not start with '/', but getcwd does allocate. */ -#else - if (chdir ("/") != 0) - return 1; - else - { - char *f = getcwd (NULL, 0); - if (! f) - return 2; - if (f[0] != '/') - return 3; - if (f[1] != '\0') - return 4; - return 0; - } -#endif - ]])], - [gl_cv_func_getcwd_null=yes], - [gl_cv_func_getcwd_null=no], - [[ - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_getcwd_null="guessing yes";; - # Guess yes on Cygwin. - cygwin*) gl_cv_func_getcwd_null="guessing yes";; - # Guess yes on mingw. - mingw*) gl_cv_func_getcwd_null="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_getcwd_null="guessing no";; - esac - ]])]) -]) - -AC_DEFUN([gl_FUNC_GETCWD], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([gl_FUNC_GETCWD_NULL]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - gl_abort_bug=no - case $gl_cv_func_getcwd_null,$host_os in - *,mingw*) - gl_cv_func_getcwd_path_max=yes;; - yes,*) - gl_FUNC_GETCWD_PATH_MAX - gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]);; - esac - - case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in - *yes,yes,no) ;; - *) - REPLACE_GETCWD=1 - AC_LIBOBJ([getcwd]) - gl_PREREQ_GETCWD;; - esac -]) - -# Prerequisites of lib/getcwd.c. -AC_DEFUN([gl_PREREQ_GETCWD], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO]) - : -]) diff --git a/gnulib/m4/getdelim.m4 b/gnulib/m4/getdelim.m4 deleted file mode 100644 index ef12736..0000000 --- a/gnulib/m4/getdelim.m4 +++ /dev/null @@ -1,90 +0,0 @@ -# getdelim.m4 serial 8 - -dnl Copyright (C) 2005-2007, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_PREREQ([2.59]) - -AC_DEFUN([gl_FUNC_GETDELIM], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - - dnl Persuade glibc to declare getdelim(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS_ONCE([getdelim]) - - AC_CHECK_FUNCS_ONCE([getdelim]) - if test $ac_cv_func_getdelim = yes; then - dnl Found it in some library. Verify that it works. - AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim], - [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -# include -# include -# include - int main () - { - FILE *in = fopen ("./conftest.data", "r"); - if (!in) - return 1; - { - /* Test result for a NULL buffer and a zero size. - Based on a test program from Karl Heuer. */ - char *line = NULL; - size_t siz = 0; - int len = getdelim (&line, &siz, '\n', in); - if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) - return 2; - } - { - /* Test result for a NULL buffer and a non-zero size. - This crashes on FreeBSD 8.0. */ - char *line = NULL; - size_t siz = (size_t)(~0) / 4; - if (getdelim (&line, &siz, '\n', in) == -1) - return 3; - } - return 0; - } - ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works. - , [gl_cv_func_working_getdelim=no] dnl The library version does NOT work. - , dnl We're cross compiling. Assume it works on glibc2 systems. - [AC_EGREP_CPP([Lucky GNU user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif -#endif - ], - [gl_cv_func_working_getdelim=yes], - [gl_cv_func_working_getdelim=no])] - )]) - else - gl_cv_func_working_getdelim=no - fi - - if test $ac_cv_have_decl_getdelim = no; then - HAVE_DECL_GETDELIM=0 - fi - - if test $gl_cv_func_working_getdelim = no; then - if test $ac_cv_func_getdelim = yes; then - REPLACE_GETDELIM=1 - fi - AC_LIBOBJ([getdelim]) - gl_PREREQ_GETDELIM - fi -]) - -# Prerequisites of lib/getdelim.c. -AC_DEFUN([gl_PREREQ_GETDELIM], -[ - AC_CHECK_FUNCS([flockfile funlockfile]) - AC_CHECK_DECLS([getc_unlocked]) -]) diff --git a/gnulib/m4/getdtablesize.m4 b/gnulib/m4/getdtablesize.m4 deleted file mode 100644 index 55bda5a..0000000 --- a/gnulib/m4/getdtablesize.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# getdtablesize.m4 serial 1 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_GETDTABLESIZE], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([getdtablesize]) - if test $ac_cv_func_getdtablesize != yes; then - HAVE_GETDTABLESIZE=0 - AC_LIBOBJ([getdtablesize]) - fi -]) diff --git a/gnulib/m4/getgroups.m4 b/gnulib/m4/getgroups.m4 deleted file mode 100644 index 8a5547f..0000000 --- a/gnulib/m4/getgroups.m4 +++ /dev/null @@ -1,43 +0,0 @@ -# serial 15 - -dnl From Jim Meyering. -dnl A wrapper around AC_FUNC_GETGROUPS. - -# Copyright (C) 1996-1997, 1999-2004, 2008-2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_GETGROUPS], -[ - AC_REQUIRE([AC_FUNC_GETGROUPS]) - AC_REQUIRE([AC_TYPE_GETGROUPS]) - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - if test "$ac_cv_func_getgroups" != yes; then - AC_LIBOBJ([getgroups]) - HAVE_GETGROUPS=0 - elif test "$ac_cv_func_getgroups_works.$ac_cv_type_getgroups" != yes.gid_t - then - AC_LIBOBJ([getgroups]) - REPLACE_GETGROUPS=1 - AC_DEFINE([GETGROUPS_ZERO_BUG], [1], [Define this to 1 if - getgroups(0,NULL) does not return the number of groups.]) - else - dnl Detect FreeBSD bug; POSIX requires getgroups(-1,ptr) to fail. - AC_CACHE_CHECK([whether getgroups handles negative values], - [gl_cv_func_getgroups_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [[int size = getgroups (0, 0); - gid_t *list = malloc (size * sizeof *list); - return getgroups (-1, list) != -1;]])], - [gl_cv_func_getgroups_works=yes], - [gl_cv_func_getgroups_works=no], - [gl_cv_func_getgroups_works="guessing no"])]) - if test "$gl_cv_func_getgroups_works" != yes; then - AC_LIBOBJ([getgroups]) - REPLACE_GETGROUPS=1 - fi - fi - test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS" -]) diff --git a/gnulib/m4/getline.m4 b/gnulib/m4/getline.m4 deleted file mode 100644 index ec001b9..0000000 --- a/gnulib/m4/getline.m4 +++ /dev/null @@ -1,97 +0,0 @@ -# getline.m4 serial 23 - -dnl Copyright (C) 1998-2003, 2005-2007, 2009-2011 Free Software Foundation, -dnl Inc. -dnl -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_PREREQ([2.59]) - -dnl See if there's a working, system-supplied version of the getline function. -dnl We can't just do AC_REPLACE_FUNCS([getline]) because some systems -dnl have a function by that name in -linet that doesn't have anything -dnl to do with the function we need. -AC_DEFUN([gl_FUNC_GETLINE], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - - dnl Persuade glibc to declare getline(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS_ONCE([getline]) - - gl_getline_needs_run_time_check=no - AC_CHECK_FUNC([getline], - [dnl Found it in some library. Verify that it works. - gl_getline_needs_run_time_check=yes], - [am_cv_func_working_getline=no]) - if test $gl_getline_needs_run_time_check = yes; then - AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline], - [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -# include -# include -# include - int main () - { - FILE *in = fopen ("./conftest.data", "r"); - if (!in) - return 1; - { - /* Test result for a NULL buffer and a zero size. - Based on a test program from Karl Heuer. */ - char *line = NULL; - size_t siz = 0; - int len = getline (&line, &siz, in); - if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) - return 2; - } - { - /* Test result for a NULL buffer and a non-zero size. - This crashes on FreeBSD 8.0. */ - char *line = NULL; - size_t siz = (size_t)(~0) / 4; - if (getline (&line, &siz, in) == -1) - return 3; - } - return 0; - } - ]])], [am_cv_func_working_getline=yes] dnl The library version works. - , [am_cv_func_working_getline=no] dnl The library version does NOT work. - , dnl We're cross compiling. Assume it works on glibc2 systems. - [AC_EGREP_CPP([Lucky GNU user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif -#endif - ], - [am_cv_func_working_getline=yes], - [am_cv_func_working_getline=no])] - )]) - fi - - if test $ac_cv_have_decl_getline = no; then - HAVE_DECL_GETLINE=0 - fi - - if test $am_cv_func_working_getline = no; then - dnl Set REPLACE_GETLINE always: Even if we have not found the broken - dnl getline function among $LIBS, it may exist in libinet and the - dnl executable may be linked with -linet. - REPLACE_GETLINE=1 - AC_LIBOBJ([getline]) - - gl_PREREQ_GETLINE - fi -]) - -# Prerequisites of lib/getline.c. -AC_DEFUN([gl_PREREQ_GETLINE], -[ - gl_FUNC_GETDELIM -]) diff --git a/gnulib/m4/getopt.m4 b/gnulib/m4/getopt.m4 deleted file mode 100644 index 035a530..0000000 --- a/gnulib/m4/getopt.m4 +++ /dev/null @@ -1,321 +0,0 @@ -# getopt.m4 serial 34 -dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Request a POSIX compliant getopt function. -AC_DEFUN([gl_FUNC_GETOPT_POSIX], -[ - m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - gl_GETOPT_IFELSE([ - gl_REPLACE_GETOPT - ], - []) -]) - -# Request a POSIX compliant getopt function with GNU extensions (such as -# options with optional arguments) and the functions getopt_long, -# getopt_long_only. -AC_DEFUN([gl_FUNC_GETOPT_GNU], -[ - m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) - - AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) -]) - -# Request the gnulib implementation of the getopt functions unconditionally. -# argp.m4 uses this. -AC_DEFUN([gl_REPLACE_GETOPT], -[ - dnl Arrange for getopt.h to be created. - gl_GETOPT_SUBSTITUTE_HEADER - dnl Arrange for unistd.h to include getopt.h. - GNULIB_UNISTD_H_GETOPT=1 - dnl Arrange to compile the getopt implementation. - AC_LIBOBJ([getopt]) - AC_LIBOBJ([getopt1]) - gl_PREREQ_GETOPT -]) - -# 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], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON - - dnl Persuade Solaris to declare optarg, optind, opterr, optopt. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - gl_CHECK_NEXT_HEADERS([getopt.h]) - if test $ac_cv_header_getopt_h = yes; then - HAVE_GETOPT_H=1 - else - HAVE_GETOPT_H=0 - fi - AC_SUBST([HAVE_GETOPT_H]) - - gl_replace_getopt= - - dnl Test whether is available. - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) - fi - - dnl Test whether the function getopt_long is available. - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - 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 '+' - dnl behavior with getopt-gnu. - if test -z "$gl_replace_getopt"; then - AC_CACHE_CHECK([whether getopt is POSIX compatible], - [gl_cv_func_getopt_posix], - [ - dnl BSD getopt_long uses an incompatible method to reset - dnl option processing. Existence of the 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_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[int *p = &optreset; return optreset;]])], - [gl_optind_min=1], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[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([[ -#include -#include -#include - -int -main () -{ - { - int argc = 0; - char *argv[10]; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = OPTIND_MIN; - opterr = 0; - - c = getopt (argc, argv, "ab"); - if (!(c == 'a')) - return 1; - c = getopt (argc, argv, "ab"); - if (!(c == -1)) - return 2; - if (!(optind == 2)) - return 3; - } - /* Some internal state exists at this point. */ - { - int argc = 0; - char *argv[10]; - int c; - - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = OPTIND_MIN; - opterr = 0; - - c = getopt (argc, 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. */ - { - 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; - } - - 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 - ]) - case "$gl_cv_func_getopt_posix" in - *no) gl_replace_getopt=yes ;; - esac - fi - - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu], - [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the - # optstring is necessary for programs like m4 that have POSIX-mandated - # semantics for supporting options interspersed with files. - # Also, since getopt_long is a GNU extension, we require optind=0. - # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; - # so take care to revert to the correct (non-)export state. -dnl GNU Coding Standards currently allow awk but not env; besides, env -dnl is ambiguous with environment values that contain newlines. - gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' - case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" - #include - #include - ]], [[ - int result = 0; - /* 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, - OSF/1 5.1, Solaris 10. */ - { - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; - opterr = 0; - if (getopt (2, myargv, "+a") != '?') - 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, - IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ - { - char *argv[] = { "program", "-p", "foo", "bar", NULL }; - - optind = 1; - if (getopt (4, argv, "p::") != 'p') - result |= 2; - else if (optarg != NULL) - result |= 4; - else if (getopt (4, argv, "p::") != -1) - result |= 6; - else if (optind != 2) - result |= 8; - } - /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ - { - char *argv[] = { "program", "foo", "-p", NULL }; - optind = 0; - if (getopt (3, argv, "-p") != 1) - result |= 16; - else if (getopt (3, argv, "-p") != 'p') - result |= 32; - } - /* This code fails on glibc 2.11. */ - { - char *argv[] = { "program", "-b", "-a", NULL }; - optind = opterr = 0; - if (getopt (3, argv, "+:a:b") != 'b') - result |= 64; - else if (getopt (3, argv, "+:a:b") != ':') - 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 - ]) - case $gl_had_POSIXLY_CORRECT in - exported) ;; - yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;; - *) AS_UNSET([POSIXLY_CORRECT]) ;; - esac - ]) - if test "$gl_cv_func_getopt_gnu" = "no"; then - gl_replace_getopt=yes - fi - fi -]) - -# emacs' configure.in uses this. -AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], -[ - GETOPT_H=getopt.h - AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], - [Define to rpl_ if the getopt replacement functions and variables - should be used.]) - AC_SUBST([GETOPT_H]) -]) - -# Prerequisites of lib/getopt*. -# emacs' configure.in uses this. -AC_DEFUN([gl_PREREQ_GETOPT], -[ - AC_CHECK_DECLS_ONCE([getenv]) -]) diff --git a/gnulib/m4/getpagesize.m4 b/gnulib/m4/getpagesize.m4 deleted file mode 100644 index 79dfbbe..0000000 --- a/gnulib/m4/getpagesize.m4 +++ /dev/null @@ -1,33 +0,0 @@ -# getpagesize.m4 serial 8 -dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_GETPAGESIZE], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS([getpagesize]) - if test $ac_cv_func_getpagesize = no; then - HAVE_GETPAGESIZE=0 - AC_CHECK_HEADERS([OS.h]) - if test $ac_cv_header_OS_h = yes; then - HAVE_OS_H=1 - fi - AC_CHECK_HEADERS([sys/param.h]) - if test $ac_cv_header_sys_param_h = yes; then - HAVE_SYS_PARAM_H=1 - fi - fi - case "$host_os" in - mingw*) - REPLACE_GETPAGESIZE=1 - AC_LIBOBJ([getpagesize]) - ;; - esac - dnl Also check whether it's declared. - dnl mingw has getpagesize() in libgcc.a but doesn't declare it. - AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0]) -]) diff --git a/gnulib/m4/gettext.m4 b/gnulib/m4/gettext.m4 deleted file mode 100644 index cab4dfc..0000000 --- a/gnulib/m4/gettext.m4 +++ /dev/null @@ -1,401 +0,0 @@ -# gettext.m4 serial 64 (gettext-0.18.2) -dnl Copyright (C) 1995-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -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 Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2006, 2008-2010. - -dnl Macro to add for using GNU gettext. - -dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). -dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The -dnl default (if it is not specified or empty) is 'no-libtool'. -dnl INTLSYMBOL should be 'external' for packages with no intl directory, -dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. -dnl If INTLSYMBOL is 'use-libtool', then a libtool library -dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, -dnl depending on --{enable,disable}-{shared,static} and on the presence of -dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library -dnl $(top_builddir)/intl/libintl.a will be created. -dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext -dnl implementations (in libc or libintl) without the ngettext() function -dnl will be ignored. If NEEDSYMBOL is specified and is -dnl 'need-formatstring-macros', then GNU gettext implementations that don't -dnl support the ISO C 99 formatstring macros will be ignored. -dnl INTLDIR is used to find the intl libraries. If empty, -dnl the value `$(top_builddir)/intl/' is used. -dnl -dnl The result of the configuration is one of three cases: -dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled -dnl and used. -dnl Catalog format: GNU --> install in $(datadir) -dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 2) GNU gettext has been found in the system's C library. -dnl Catalog format: GNU --> install in $(datadir) -dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 3) No internationalization, always use English msgid. -dnl Catalog format: none -dnl Catalog extension: none -dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. -dnl The use of .gmo is historical (it was needed to avoid overwriting the -dnl GNU format catalogs when building on a platform with an X/Open gettext), -dnl but we keep it in order not to force irrelevant filename changes on the -dnl maintainers. -dnl -AC_DEFUN([AM_GNU_GETTEXT], -[ - dnl Argument checking. - ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , - [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT -])])])])]) - ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], - [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) - ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , - [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT -])])])]) - define([gt_included_intl], - ifelse([$1], [external], - ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), - [yes])) - define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) - gt_NEEDS_INIT - AM_GNU_GETTEXT_NEED([$2]) - - AC_REQUIRE([AM_PO_SUBDIRS])dnl - ifelse(gt_included_intl, yes, [ - AC_REQUIRE([AM_INTL_SUBDIR])dnl - ]) - - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - dnl Sometimes libintl requires libiconv, so first search for libiconv. - dnl Ideally we would do this search only after the - dnl if test "$USE_NLS" = "yes"; then - dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then - dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT - dnl the configure script would need to contain the same shell code - dnl again, outside any 'if'. There are two solutions: - dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. - dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. - dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not - dnl documented, we avoid it. - ifelse(gt_included_intl, yes, , [ - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - ]) - - dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. - gt_INTL_MACOSX - - dnl Set USE_NLS. - AC_REQUIRE([AM_NLS]) - - ifelse(gt_included_intl, yes, [ - BUILD_INCLUDED_LIBINTL=no - USE_INCLUDED_LIBINTL=no - ]) - LIBINTL= - LTLIBINTL= - POSUB= - - dnl Add a version number to the cache macros. - case " $gt_needs " in - *" need-formatstring-macros "*) gt_api_version=3 ;; - *" need-ngettext "*) gt_api_version=2 ;; - *) gt_api_version=1 ;; - esac - gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" - gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - gt_use_preinstalled_gnugettext=no - ifelse(gt_included_intl, yes, [ - AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH([included-gettext], - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - ]) - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If GNU gettext is available we use this. Else we have - dnl to fall back to GNU NLS library. - - if test $gt_api_version -ge 3; then - gt_revision_test_code=' -#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -changequote(,)dnl -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -changequote([,])dnl -' - else - gt_revision_test_code= - fi - if test $gt_api_version -ge 2; then - gt_expression_test_code=' + * ngettext ("", "", 0)' - else - gt_expression_test_code= - fi - - AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern int *_nl_domain_bindings; - ]], - [[ -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings - ]])], - [eval "$gt_func_gnugettext_libc=yes"], - [eval "$gt_func_gnugettext_libc=no"])]) - - if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then - dnl Sometimes libintl requires libiconv, so first search for libiconv. - ifelse(gt_included_intl, yes, , [ - AM_ICONV_LINK - ]) - dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL - dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) - dnl because that would add "-liconv" to LIBINTL and LTLIBINTL - dnl even if libiconv doesn't exist. - AC_LIB_LINKFLAGS_BODY([intl]) - AC_CACHE_CHECK([for GNU gettext in libintl], - [$gt_func_gnugettext_libintl], - [gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $INCINTL" - gt_save_LIBS="$LIBS" - LIBS="$LIBS $LIBINTL" - dnl Now see whether libintl exists and does not depend on libiconv. - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern -#ifdef __cplusplus -"C" -#endif -const char *_nl_expand_alias (const char *); - ]], - [[ -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") - ]])], - [eval "$gt_func_gnugettext_libintl=yes"], - [eval "$gt_func_gnugettext_libintl=no"]) - dnl Now see whether libintl exists and depends on libiconv. - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern -#ifdef __cplusplus -"C" -#endif -const char *_nl_expand_alias (const char *); - ]], - [[ -bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") - ]])], - [LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - eval "$gt_func_gnugettext_libintl=yes" - ]) - fi - CPPFLAGS="$gt_save_CPPFLAGS" - LIBS="$gt_save_LIBS"]) - fi - - dnl If an already present or preinstalled GNU gettext() is found, - dnl use it. But if this macro is used in GNU gettext, and GNU - dnl gettext is already preinstalled in libintl, we update this - dnl libintl. (Cf. the install rule in intl/Makefile.in.) - if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ - || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ - && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools; }; then - gt_use_preinstalled_gnugettext=yes - else - dnl Reset the values set by searching for libintl. - LIBINTL= - LTLIBINTL= - INCINTL= - fi - - ifelse(gt_included_intl, yes, [ - if test "$gt_use_preinstalled_gnugettext" != "yes"; then - dnl GNU gettext is not found in the C library. - dnl Fall back on included GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions used to generate GNU NLS library. - BUILD_INCLUDED_LIBINTL=yes - USE_INCLUDED_LIBINTL=yes - LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" - LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" - LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` - fi - - CATOBJEXT= - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions to use GNU gettext tools. - CATOBJEXT=.gmo - fi - ]) - - if test -n "$INTL_MACOSX_LIBS"; then - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Some extra flags are needed during linking. - LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" - LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" - fi - fi - - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - AC_DEFINE([ENABLE_NLS], [1], - [Define to 1 if translation of program messages to the user's native language - is requested.]) - else - USE_NLS=no - fi - fi - - AC_MSG_CHECKING([whether to use NLS]) - AC_MSG_RESULT([$USE_NLS]) - if test "$USE_NLS" = "yes"; then - AC_MSG_CHECKING([where the gettext function comes from]) - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - gt_source="external libintl" - else - gt_source="libc" - fi - else - gt_source="included intl directory" - fi - AC_MSG_RESULT([$gt_source]) - fi - - if test "$USE_NLS" = "yes"; then - - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - AC_MSG_CHECKING([how to link with libintl]) - AC_MSG_RESULT([$LIBINTL]) - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) - fi - - dnl For backward compatibility. Some packages may be using this. - AC_DEFINE([HAVE_GETTEXT], [1], - [Define if the GNU gettext() function is already present or preinstalled.]) - AC_DEFINE([HAVE_DCGETTEXT], [1], - [Define if the GNU dcgettext() function is already present or preinstalled.]) - fi - - dnl We need to process the po/ directory. - POSUB=po - fi - - ifelse(gt_included_intl, yes, [ - dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL - dnl to 'yes' because some of the testsuite requires it. - if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then - BUILD_INCLUDED_LIBINTL=yes - fi - - dnl Make all variables we use known to autoconf. - AC_SUBST([BUILD_INCLUDED_LIBINTL]) - AC_SUBST([USE_INCLUDED_LIBINTL]) - AC_SUBST([CATOBJEXT]) - - dnl For backward compatibility. Some configure.ins may be using this. - nls_cv_header_intl= - nls_cv_header_libgt= - - dnl For backward compatibility. Some Makefiles may be using this. - DATADIRNAME=share - AC_SUBST([DATADIRNAME]) - - dnl For backward compatibility. Some Makefiles may be using this. - INSTOBJEXT=.mo - AC_SUBST([INSTOBJEXT]) - - dnl For backward compatibility. Some Makefiles may be using this. - GENCAT=gencat - AC_SUBST([GENCAT]) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLOBJS= - if test "$USE_INCLUDED_LIBINTL" = yes; then - INTLOBJS="\$(GETTOBJS)" - fi - AC_SUBST([INTLOBJS]) - - dnl Enable libtool support if the surrounding package wishes it. - INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix - AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) - ]) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLLIBS="$LIBINTL" - AC_SUBST([INTLLIBS]) - - dnl Make all documented variables known to autoconf. - AC_SUBST([LIBINTL]) - AC_SUBST([LTLIBINTL]) - AC_SUBST([POSUB]) -]) - - -dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. -m4_define([gt_NEEDS_INIT], -[ - m4_divert_text([DEFAULTS], [gt_needs=]) - m4_define([gt_NEEDS_INIT], []) -]) - - -dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) -AC_DEFUN([AM_GNU_GETTEXT_NEED], -[ - m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) -]) - - -dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) -AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/gnulib/m4/gettime.m4 b/gnulib/m4/gettime.m4 deleted file mode 100644 index 2b148ab..0000000 --- a/gnulib/m4/gettime.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# gettime.m4 serial 7 -dnl Copyright (C) 2002, 2004-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_GETTIME], -[ - AC_LIBOBJ([gettime]) - - dnl Prerequisites of lib/gettime.c. - AC_REQUIRE([gl_CLOCK_TIME]) - AC_REQUIRE([gl_TIMESPEC]) - AC_CHECK_FUNCS_ONCE([gettimeofday nanotime]) -]) diff --git a/gnulib/m4/gettimeofday.m4 b/gnulib/m4/gettimeofday.m4 deleted file mode 100644 index 84acadf..0000000 --- a/gnulib/m4/gettimeofday.m4 +++ /dev/null @@ -1,120 +0,0 @@ -# serial 15 - -# Copyright (C) 2001-2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. - -AC_DEFUN([gl_FUNC_GETTIMEOFDAY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([gettimeofday]) - - gl_gettimeofday_timezone=void - if test $ac_cv_func_gettimeofday != yes; then - HAVE_GETTIMEOFDAY=0 - AC_LIBOBJ([gettimeofday]) - gl_PREREQ_GETTIMEOFDAY - else - gl_FUNC_GETTIMEOFDAY_CLOBBER - AC_CACHE_CHECK([for gettimeofday with POSIX signature], - [gl_cv_func_gettimeofday_posix_signature], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - struct timeval c; - int gettimeofday (struct timeval *restrict, void *restrict); - ]], - [[/* glibc uses struct timezone * rather than the POSIX void * - if _GNU_SOURCE is defined. However, since the only portable - use of gettimeofday uses NULL as the second parameter, and - since the glibc definition is actually more typesafe, it is - not worth wrapping this to get a compliant signature. */ - int (*f) (struct timeval *restrict, void *restrict) - = gettimeofday; - int x = f (&c, 0); - return !(x | c.tv_sec | c.tv_usec); - ]])], - [gl_cv_func_gettimeofday_posix_signature=yes], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include -int gettimeofday (struct timeval *restrict, struct timezone *restrict); - ]])], - [gl_cv_func_gettimeofday_posix_signature=almost], - [gl_cv_func_gettimeofday_posix_signature=no])])]) - if test $gl_cv_func_gettimeofday_posix_signature = almost; then - gl_gettimeofday_timezone='struct timezone' - elif test $gl_cv_func_gettimeofday_posix_signature != yes; then - REPLACE_GETTIMEOFDAY=1 - AC_LIBOBJ([gettimeofday]) - gl_PREREQ_GETTIMEOFDAY - fi - fi - AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone], - [Define this to 'void' or 'struct timezone' to match the system's - declaration of the second argument to gettimeofday.]) -]) - - -dnl See if gettimeofday clobbers the static buffer that localtime uses -dnl for its return value. The gettimeofday function from Mac OS X 10.0.4 -dnl (i.e., Darwin 1.3.7) has this problem. -dnl -dnl If it does, then arrange to use gettimeofday and localtime only via -dnl the wrapper functions that work around the problem. - -AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], -[ - AC_REQUIRE([gl_HEADER_SYS_TIME_H]) - - AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], - [gl_cv_func_gettimeofday_clobber], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - #include - #include - ]], - [[ - time_t t = 0; - struct tm *lt; - struct tm saved_lt; - struct timeval tv; - lt = localtime (&t); - saved_lt = *lt; - gettimeofday (&tv, NULL); - return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; - ]])], - [gl_cv_func_gettimeofday_clobber=no], - [gl_cv_func_gettimeofday_clobber=yes], - dnl When crosscompiling, assume it is broken. - [gl_cv_func_gettimeofday_clobber=yes])]) - - if test $gl_cv_func_gettimeofday_clobber = yes; then - REPLACE_GETTIMEOFDAY=1 - gl_GETTIMEOFDAY_REPLACE_LOCALTIME - AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1], - [Define if gettimeofday clobbers the localtime buffer.]) - fi -]) - -AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ - AC_LIBOBJ([gettimeofday]) - gl_PREREQ_GETTIMEOFDAY - AC_DEFINE([gmtime], [rpl_gmtime], - [Define to rpl_gmtime if the replacement function should be used.]) - AC_DEFINE([localtime], [rpl_localtime], - [Define to rpl_localtime if the replacement function should be used.]) -]) - -# Prerequisites of lib/gettimeofday.c. -AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [ - AC_CHECK_HEADERS([sys/timeb.h]) - AC_CHECK_FUNCS([_ftime]) -]) diff --git a/gnulib/m4/getugroups.m4 b/gnulib/m4/getugroups.m4 deleted file mode 100644 index 2483db6..0000000 --- a/gnulib/m4/getugroups.m4 +++ /dev/null @@ -1,12 +0,0 @@ -# getugroups.m4 serial 8 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_GETUGROUPS], -[ - AC_LIBOBJ([getugroups]) - AC_CHECK_HEADERS_ONCE([grp.h]) -]) diff --git a/gnulib/m4/glibc21.m4 b/gnulib/m4/glibc21.m4 deleted file mode 100644 index bc81c11..0000000 --- a/gnulib/m4/glibc21.m4 +++ /dev/null @@ -1,34 +0,0 @@ -# glibc21.m4 serial 5 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -# Test for the GNU C Library, version 2.1 or newer, or uClibc. -# From Bruno Haible. - -AC_DEFUN([gl_GLIBC21], - [ - AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], - [ac_cv_gnu_library_2_1], - [AC_EGREP_CPP([Lucky], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif -#ifdef __UCLIBC__ - Lucky user -#endif - ], - [ac_cv_gnu_library_2_1=yes], - [ac_cv_gnu_library_2_1=no]) - ] - ) - AC_SUBST([GLIBC21]) - GLIBC21="$ac_cv_gnu_library_2_1" - ] -) diff --git a/gnulib/m4/gnulib-cache.m4 b/gnulib/m4/gnulib-cache.m4 deleted file mode 100644 index c47e233..0000000 --- a/gnulib/m4/gnulib-cache.m4 +++ /dev/null @@ -1,135 +0,0 @@ -# Copyright (C) 2002-2011 Free Software Foundation, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# -# This file represents the specification of how gnulib-tool is used. -# It acts as a cache: It is written and read by gnulib-tool. -# In projects that use version control, this file is meant to be put under -# version control, like the configure.ac and various Makefile.am files. - - -# Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --no-libtool --macro-prefix=gl alloca areadlinkat argmatch assert c-strcasestr c-strstr canonicalize cloexec closein closeout ctype d-type dirent-safer dirname errno error faccessat fchdir fcntl fdl fdopendir fflush fileblocks filemode fnmatch-gnu fopen-safer fts getdelim getline getopt-gnu gettext gettimeofday gpl-3.0 hash human idcache inline inttypes isblank locale lstat maintainer-makefile malloc math mbrtowc mbscasestr mbsstr mktime modechange modf mountlist open parse-datetime pathmax perror progname quotearg readlink realloc regex rpmatch save-cwd savedir selinux-at snprintf stat stat-macros stat-time stdarg stdbool stddef stdint stdio stdlib stpcpy strcasestr strdup-posix strftime string strtol strtoul strtoull strtoumax sys_stat sys_time sys_wait timespec update-copyright verify version-etc version-etc-fsf warnings wchar wcwidth xalloc xalloc-die xgetcwd xstrtod xstrtol xstrtoumax yesno - -# Specification in the form of a few gnulib-tool.m4 macro invocations: -gl_LOCAL_DIR([gnulib-local]) -gl_MODULES([ - alloca - areadlinkat - argmatch - assert - c-strcasestr - c-strstr - canonicalize - cloexec - closein - closeout - ctype - d-type - dirent-safer - dirname - errno - error - faccessat - fchdir - fcntl - fdl - fdopendir - fflush - fileblocks - filemode - fnmatch-gnu - fopen-safer - fts - getdelim - getline - getopt-gnu - gettext - gettimeofday - gpl-3.0 - hash - human - idcache - inline - inttypes - isblank - locale - lstat - maintainer-makefile - malloc - math - mbrtowc - mbscasestr - mbsstr - mktime - modechange - modf - mountlist - open - parse-datetime - pathmax - perror - progname - quotearg - readlink - realloc - regex - rpmatch - save-cwd - savedir - selinux-at - snprintf - stat - stat-macros - stat-time - stdarg - stdbool - stddef - stdint - stdio - stdlib - stpcpy - strcasestr - strdup-posix - strftime - string - strtol - strtoul - strtoull - strtoumax - sys_stat - sys_time - sys_wait - timespec - update-copyright - verify - version-etc - version-etc-fsf - warnings - wchar - wcwidth - xalloc - xalloc-die - xgetcwd - xstrtod - xstrtol - xstrtoumax - yesno -]) -gl_AVOID([]) -gl_SOURCE_BASE([gnulib/lib]) -gl_M4_BASE([gnulib/m4]) -gl_PO_BASE([]) -gl_DOC_BASE([doc]) -gl_TESTS_BASE([tests]) -gl_WITH_TESTS -gl_LIB([libgnulib]) -gl_MAKEFILE_NAME([]) -gl_MACRO_PREFIX([gl]) -gl_PO_DOMAIN([]) diff --git a/gnulib/m4/gnulib-common.m4 b/gnulib/m4/gnulib-common.m4 deleted file mode 100644 index c4d7a20..0000000 --- a/gnulib/m4/gnulib-common.m4 +++ /dev/null @@ -1,235 +0,0 @@ -# gnulib-common.m4 serial 24 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_COMMON -# is expanded unconditionally through gnulib-tool magic. -AC_DEFUN([gl_COMMON], [ - dnl Use AC_REQUIRE here, so that the code is expanded once only. - AC_REQUIRE([gl_00GNULIB]) - AC_REQUIRE([gl_COMMON_BODY]) -]) -AC_DEFUN([gl_COMMON_BODY], [ - AH_VERBATIM([isoc99_inline], -[/* 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_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__ -# define __GNUC_STDC_INLINE__ 1 -#endif]) - AH_VERBATIM([unused_parameter], -[/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_UNUSED -#endif -/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name - is a misnomer outside of parameter lists. */ -#define _UNUSED_PARAMETER_ _GL_UNUSED -]) - dnl Preparation for running test programs: - dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not - dnl to /dev/tty, so they can be redirected to log files. Such diagnostics - dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. - LIBC_FATAL_STDERR_=1 - export LIBC_FATAL_STDERR_ -]) - -# gl_MODULE_INDICATOR_CONDITION -# expands to a C preprocessor expression that evaluates to 1 or 0, depending -# whether a gnulib module that has been requested shall be considered present -# or not. -AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1]) - -# gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) -# sets the shell variable that indicates the presence of the given module to -# a C preprocessor expression that will evaluate to 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], -[ - GNULIB_[]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION -]) - -# gl_MODULE_INDICATOR([modulename]) -# defines a C macro indicating the presence of the given module -# in a location where it can be used. -# | Value | Value | -# | in lib/ | in tests/ | -# --------------------------------------------+---------+-----------+ -# Module present among main modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module present among tests-related modules: | 0 | 1 | -# --------------------------------------------+---------+-----------+ -# Module not present at all: | 0 | 0 | -# --------------------------------------------+---------+-----------+ -AC_DEFUN([gl_MODULE_INDICATOR], -[ - AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), - [gl_MODULE_INDICATOR_CONDITION], - [Define to a C preprocessor expression that evaluates to 1 or 0, - depending whether the gnulib module $1 shall be considered present.]) -]) - -# gl_MODULE_INDICATOR_FOR_TESTS([modulename]) -# defines a C macro indicating the presence of the given module -# in lib or tests. This is useful to determine whether the module -# should be tested. -# | Value | Value | -# | in lib/ | in tests/ | -# --------------------------------------------+---------+-----------+ -# Module present among main modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module present among tests-related modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module not present at all: | 0 | 0 | -# --------------------------------------------+---------+-----------+ -AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], -[ - AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], - [Define to 1 when the gnulib module $1 should be tested.]) -]) - -# gl_ASSERT_NO_GNULIB_POSIXCHECK -# asserts that there will never be a need to #define GNULIB_POSIXCHECK. -# and thereby enables an optimization of configure and config.h. -# Used by Emacs. -AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], -[ - dnl Override gl_WARN_ON_USE_PREPARE. - dnl But hide this definition from 'aclocal'. - AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], []) -]) - -# gl_ASSERT_NO_GNULIB_TESTS -# asserts that there will be no gnulib tests in the scope of the configure.ac -# and thereby enables an optimization of config.h. -# Used by Emacs. -AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS], -[ - dnl Override gl_MODULE_INDICATOR_FOR_TESTS. - AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) -]) - -# Test whether exists. -# Set HAVE_FEATURES_H. -AC_DEFUN([gl_FEATURES_H], -[ - AC_CHECK_HEADERS_ONCE([features.h]) - if test $ac_cv_header_features_h = yes; then - HAVE_FEATURES_H=1 - else - HAVE_FEATURES_H=0 - fi - AC_SUBST([HAVE_FEATURES_H]) -]) - -# m4_foreach_w -# is a backport of autoconf-2.59c's m4_foreach_w. -# Remove this macro when we can assume autoconf >= 2.60. -m4_ifndef([m4_foreach_w], - [m4_define([m4_foreach_w], - [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) - -# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) -# ---------------------------------------------------- -# Backport of autoconf-2.63b's macro. -# Remove this macro when we can assume autoconf >= 2.64. -m4_ifndef([AS_VAR_IF], -[m4_define([AS_VAR_IF], -[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) - -# AC_PROG_MKDIR_P -# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix -# for interoperability with automake-1.9.6 from autoconf-2.62. -# Remove this macro when we can assume autoconf >= 2.62 or -# autoconf >= 2.60 && automake >= 1.10. -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], - m4_defn([AC_PROG_MKDIR_P])[ - AC_SUBST([MKDIR_P])])], [ - dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. - AC_DEFUN_ONCE([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_DEFUN([AC_C_RESTRICT], -[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], - [ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - }]], - [[int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t)]])], - [ac_cv_c_restrict=$ac_kw]) - test "$ac_cv_c_restrict" != no && break - done - ]) - AH_VERBATIM([restrict], -[/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict, even - though the corresponding Sun C compiler does, which causes - "#define restrict _Restrict" in the previous line. Perhaps some future - version of Sun C++ will work with _Restrict; if so, it'll probably - define __RESTRICT, just as Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -#endif]) - case $ac_cv_c_restrict in - restrict) ;; - no) AC_DEFINE([restrict], []) ;; - *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; - esac -]) -]) - -# gl_BIGENDIAN -# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. -# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some -# macros invoke AC_C_BIGENDIAN with arguments. -AC_DEFUN([gl_BIGENDIAN], -[ - AC_C_BIGENDIAN -]) - -# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) -# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not -# output a spurious "(cached)" mark in the midst of other configure output. -# This macro should be used instead of AC_CACHE_VAL when it is not surrounded -# by an AC_MSG_CHECKING/AC_MSG_RESULT pair. -AC_DEFUN([gl_CACHE_VAL_SILENT], -[ - saved_as_echo_n="$as_echo_n" - as_echo_n=':' - AC_CACHE_VAL([$1], [$2]) - as_echo_n="$saved_as_echo_n" -]) diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4 deleted file mode 100644 index 2886193..0000000 --- a/gnulib/m4/gnulib-comp.m4 +++ /dev/null @@ -1,1978 +0,0 @@ -# DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2011 Free Software Foundation, Inc. -# -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# -# This file represents the compiled summary of the specification in -# gnulib-cache.m4. It lists the computed macro invocations that need -# to be invoked from configure.ac. -# In projects that use version control, this file can be treated like -# other built files. - - -# This macro should be invoked from ./configure.ac, in the section -# "Checks for programs", right after AC_PROG_CC, and certainly before -# any checks for libraries, header files, types and library functions. -AC_DEFUN([gl_EARLY], -[ - m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace - m4_pattern_allow([^gl_ES$])dnl a valid locale name - m4_pattern_allow([^gl_LIBOBJS$])dnl a variable - m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable - AC_REQUIRE([AC_PROG_RANLIB]) - AC_REQUIRE([AM_PROG_CC_C_O]) - # Code from module alloca: - # Code from module alloca-opt: - # Code from module alloca-opt-tests: - # Code from module areadlink: - # Code from module areadlink-tests: - # Code from module areadlink-with-size: - # Code from module areadlink-with-size-tests: - # Code from module areadlinkat: - # Code from module areadlinkat-tests: - # Code from module arg-nonnull: - # Code from module argmatch: - # Code from module argmatch-tests: - # Code from module assert: - # Code from module binary-io: - # Code from module binary-io-tests: - # Code from module bitrotate: - # Code from module bitrotate-tests: - # Code from module btowc: - # Code from module btowc-tests: - # Code from module c++defs: - # Code from module c-ctype: - # Code from module c-ctype-tests: - # Code from module c-strcase: - # Code from module c-strcase-tests: - # Code from module c-strcasestr: - # Code from module c-strcasestr-tests: - # Code from module c-strstr: - # Code from module c-strstr-tests: - # Code from module canonicalize: - # Code from module canonicalize-tests: - # Code from module chdir-long: - # Code from module chown: - # Code from module chown-tests: - # Code from module clock-time: - # Code from module cloexec: - # Code from module cloexec-tests: - # Code from module close: - # Code from module close-hook: - # Code from module close-stream: - # Code from module closein: - # Code from module closein-tests: - # Code from module closeout: - # Code from module configmake: - # Code from module ctype: - # Code from module ctype-tests: - # Code from module cycle-check: - # Code from module d-ino: - # Code from module d-type: - # Code from module dev-ino: - # Code from module dirent: - # Code from module dirent-safer: - # Code from module dirent-safer-tests: - # Code from module dirent-tests: - # Code from module dirfd: - # Code from module dirname: - # Code from module dirname-lgpl: - # Code from module dirname-tests: - # Code from module dosname: - # Code from module double-slash-root: - # Code from module dup2: - # Code from module dup2-tests: - # Code from module environ: - # Code from module environ-tests: - # Code from module errno: - # Code from module errno-tests: - # Code from module error: - # Code from module euidaccess: - # Code from module exitfail: - # Code from module extensions: - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - # Code from module faccessat: - # Code from module fchdir: - # Code from module fchdir-tests: - # Code from module fclose: - # Code from module fcntl: - # Code from module fcntl-h: - # Code from module fcntl-h-tests: - # Code from module fcntl-safer: - # Code from module fcntl-safer-tests: - # Code from module fcntl-tests: - # Code from module fd-safer-flag: - # Code from module fdl: - # Code from module fdopendir: - # Code from module fdopendir-tests: - # Code from module fflush: - AC_REQUIRE([AC_FUNC_FSEEKO]) - # Code from module fflush-tests: - # Code from module file-set: - # Code from module fileblocks: - # Code from module filemode: - # Code from module flexmember: - # Code from module float: - # Code from module fnmatch: - # Code from module fnmatch-gnu: - # Code from module fnmatch-tests: - # Code from module fopen: - # Code from module fopen-safer: - # Code from module fopen-safer-tests: - # Code from module fopen-tests: - # Code from module fpending: - # Code from module fpending-tests: - # Code from module fpurge: - # Code from module fpurge-tests: - # Code from module freadahead: - # Code from module freadahead-tests: - # Code from module freading: - # Code from module freading-tests: - # Code from module fseeko: - AC_REQUIRE([AC_FUNC_FSEEKO]) - # Code from module fseeko-tests: - # Code from module ftell: - # Code from module ftell-tests: - # Code from module ftello: - AC_REQUIRE([AC_FUNC_FSEEKO]) - # Code from module ftello-tests: - # Code from module fts: - # Code from module getcwd: - # Code from module getcwd-tests: - # Code from module getdelim: - # Code from module getdelim-tests: - # Code from module getdtablesize: - # Code from module getdtablesize-tests: - # Code from module getgroups: - # Code from module getgroups-tests: - # Code from module getline: - # Code from module getline-tests: - # Code from module getopt-gnu: - # Code from module getopt-posix: - # Code from module getopt-posix-tests: - # Code from module getpagesize: - # Code from module gettext: - # Code from module gettext-h: - # Code from module gettime: - # Code from module gettimeofday: - # Code from module gettimeofday-tests: - # Code from module getugroups: - # Code from module gnumakefile: - # Code from module gpl-3.0: - # Code from module group-member: - # Code from module hash: - # Code from module hash-pjw: - # Code from module hash-tests: - # Code from module hash-triple: - # Code from module havelib: - # Code from module human: - # Code from module i-ring: - # Code from module i-ring-tests: - # Code from module idcache: - # Code from module ignore-value: - # Code from module ignore-value-tests: - # Code from module include_next: - # Code from module inline: - # Code from module intprops: - # Code from module inttostr: - # Code from module inttostr-tests: - # Code from module inttypes: - # Code from module inttypes-tests: - # Code from module isblank: - # Code from module isblank-tests: - # Code from module iswblank: - # Code from module iswblank-tests: - # Code from module langinfo: - # Code from module langinfo-tests: - # Code from module lchown: - # Code from module lchown-tests: - # Code from module localcharset: - # Code from module locale: - # Code from module locale-tests: - # Code from module localename: - # Code from module localename-tests: - # Code from module lock: - # Code from module lock-tests: - # Code from module lseek: - # Code from module lseek-tests: - # Code from module lstat: - # Code from module lstat-tests: - # Code from module maintainer-makefile: - # Code from module malloc: - # Code from module malloc-gnu: - # Code from module malloc-gnu-tests: - # Code from module malloc-posix: - # Code from module malloca: - # Code from module malloca-tests: - # Code from module math: - # Code from module math-tests: - # Code from module mbchar: - # Code from module mbrtowc: - # Code from module mbrtowc-tests: - # Code from module mbscasestr: - # Code from module mbscasestr-tests: - # Code from module mbsinit: - # Code from module mbsinit-tests: - # Code from module mbslen: - # Code from module mbsrtowcs: - # Code from module mbsrtowcs-tests: - # Code from module mbsstr: - # Code from module mbsstr-tests: - # Code from module mbtowc: - # Code from module mbuiter: - # Code from module memchr: - # Code from module memchr-tests: - # Code from module mempcpy: - # Code from module memrchr: - # Code from module memrchr-tests: - # Code from module mgetgroups: - # Code from module mkdir: - # Code from module mkdir-tests: - # Code from module mktime: - # Code from module modechange: - # Code from module modf: - # Code from module modf-tests: - # Code from module mountlist: - # Code from module multiarch: - # Code from module nl_langinfo: - # Code from module nl_langinfo-tests: - # Code from module open: - # Code from module open-tests: - # Code from module openat: - # Code from module openat-die: - # Code from module openat-safer: - # Code from module openat-safer-tests: - # Code from module openat-tests: - # Code from module parse-datetime: - # Code from module parse-datetime-tests: - # Code from module pathmax: - # Code from module perror: - # Code from module perror-tests: - # Code from module priv-set: - # Code from module priv-set-tests: - # Code from module progname: - # Code from module putenv: - # Code from module quote: - # Code from module quotearg: - # Code from module quotearg-simple: - # Code from module quotearg-simple-tests: - # Code from module readlink: - # Code from module readlink-tests: - # Code from module readlinkat: - # Code from module readlinkat-tests: - # Code from module realloc: - # Code from module realloc-gnu: - # Code from module realloc-gnu-tests: - # Code from module realloc-posix: - # Code from module regex: - # Code from module rmdir: - # Code from module rmdir-tests: - # Code from module rpmatch: - # Code from module same: - # Code from module same-inode: - # Code from module save-cwd: - # Code from module savedir: - # Code from module selinux-at: - # Code from module selinux-h: - # Code from module setenv: - # Code from module setenv-tests: - # Code from module setlocale: - # Code from module setlocale-tests: - # Code from module size_max: - # Code from module sleep: - # Code from module sleep-tests: - # Code from module snprintf: - # Code from module snprintf-tests: - # Code from module ssize_t: - # Code from module stat: - # Code from module stat-macros: - # Code from module stat-tests: - # Code from module stat-time: - # Code from module stat-time-tests: - # Code from module stdarg: - dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode - dnl for the builtin va_copy to work. With Autoconf 2.60 or later, - dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC - dnl shouldn't hurt, though installers are on their own to set c99 mode. - AC_REQUIRE([AC_PROG_CC_STDC]) - # Code from module stdbool: - # Code from module stdbool-tests: - # Code from module stddef: - # Code from module stddef-tests: - # Code from module stdint: - # Code from module stdint-tests: - # Code from module stdio: - # Code from module stdio-tests: - # Code from module stdlib: - # Code from module stdlib-tests: - # Code from module stpcpy: - # Code from module strcase: - # Code from module strcasestr: - # Code from module strcasestr-simple: - # Code from module strcasestr-tests: - # Code from module strdup-posix: - # Code from module streq: - # Code from module strerror: - # Code from module strerror-tests: - # Code from module strftime: - # Code from module strftime-tests: - # Code from module string: - # Code from module string-tests: - # Code from module strings: - # Code from module strings-tests: - # Code from module strndup: - # Code from module strnlen: - # Code from module strnlen-tests: - # Code from module strnlen1: - # Code from module strstr: - # Code from module strstr-simple: - # Code from module strstr-tests: - # Code from module strtoimax: - # Code from module strtol: - # Code from module strtoll: - # Code from module strtoul: - # Code from module strtoull: - # Code from module strtoumax: - # Code from module symlink: - # Code from module symlink-tests: - # Code from module symlinkat: - # Code from module symlinkat-tests: - # Code from module sys_stat: - # Code from module sys_stat-tests: - # Code from module sys_time: - # Code from module sys_time-tests: - # Code from module sys_wait: - # Code from module sys_wait-tests: - # Code from module thread: - # Code from module threadlib: - gl_THREADLIB_EARLY - # Code from module time: - # Code from module time-tests: - # Code from module time_r: - # Code from module timespec: - # Code from module unistd: - # Code from module unistd-safer: - # Code from module unistd-safer-tests: - # Code from module unistd-tests: - # Code from module unitypes: - # Code from module uniwidth/base: - # Code from module uniwidth/width: - # Code from module uniwidth/width-tests: - # Code from module unlink: - # Code from module unlink-tests: - # Code from module unlinkdir: - # Code from module unsetenv: - # Code from module unsetenv-tests: - # Code from module unused-parameter: - # Code from module update-copyright: - # Code from module update-copyright-tests: - # Code from module useless-if-before-free: - # Code from module usleep: - # Code from module usleep-tests: - # Code from module vasnprintf: - # Code from module vasnprintf-tests: - # Code from module vc-list-files: - # Code from module vc-list-files-tests: - # Code from module verify: - # Code from module verify-tests: - # Code from module version-etc: - # Code from module version-etc-fsf: - # Code from module version-etc-tests: - # Code from module warn-on-use: - # Code from module warnings: - # Code from module wchar: - # Code from module wchar-tests: - # Code from module wcrtomb: - # Code from module wcrtomb-tests: - # Code from module wctob: - # Code from module wctomb: - # Code from module wctype-h: - # Code from module wctype-h-tests: - # Code from module wcwidth: - # Code from module wcwidth-tests: - # Code from module xalloc: - # Code from module xalloc-die: - # Code from module xalloc-die-tests: - # Code from module xgetcwd: - # Code from module xsize: - # Code from module xstrndup: - # Code from module xstrtod: - # Code from module xstrtol: - # Code from module xstrtol-tests: - # Code from module xstrtoumax: - # Code from module xstrtoumax-tests: - # Code from module yesno: - # Code from module yesno-tests: - # Code from module yield: -]) - -# This macro should be invoked from ./configure.ac, in the section -# "Check for header files, types and library functions". -AC_DEFUN([gl_INIT], -[ - AM_CONDITIONAL([GL_COND_LIBTOOL], [false]) - gl_cond_libtool=false - gl_libdeps= - gl_ltlibdeps= - gl_m4_base='gnulib/m4' - m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) - m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) - m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) - m4_pushdef([gl_LIBSOURCES_LIST], []) - m4_pushdef([gl_LIBSOURCES_DIR], []) - gl_COMMON - gl_source_base='gnulib/lib' - # Code from module alloca: - # Code from module alloca-opt: - gl_FUNC_ALLOCA - # Code from module areadlink: - # Code from module areadlink-with-size: - # Code from module areadlinkat: - gl_MODULE_INDICATOR([areadlinkat]) - # Code from module arg-nonnull: - # Code from module argmatch: - gl_ARGMATCH - # Code from module assert: - gl_ASSERT - # Code from module bitrotate: - AC_REQUIRE([AC_C_INLINE]) - # Code from module btowc: - gl_FUNC_BTOWC - gl_WCHAR_MODULE_INDICATOR([btowc]) - # Code from module c++defs: - # Code from module c-ctype: - # Code from module c-strcase: - # Code from module c-strcasestr: - # Code from module c-strstr: - # Code from module canonicalize: - gl_FUNC_CANONICALIZE_FILENAME_MODE - gl_MODULE_INDICATOR([canonicalize]) - gl_MODULE_INDICATOR_FOR_TESTS([canonicalize]) - gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name]) - # Code from module chdir-long: - gl_FUNC_CHDIR_LONG - # Code from module chown: - gl_FUNC_CHOWN - gl_UNISTD_MODULE_INDICATOR([chown]) - # Code from module clock-time: - gl_CLOCK_TIME - # Code from module cloexec: - gl_CLOEXEC - gl_MODULE_INDICATOR_FOR_TESTS([cloexec]) - # Code from module close: - gl_FUNC_CLOSE - gl_UNISTD_MODULE_INDICATOR([close]) - # Code from module close-hook: - # Code from module close-stream: - gl_CLOSE_STREAM - gl_MODULE_INDICATOR([close-stream]) - # Code from module closein: - gl_CLOSEIN - # Code from module closeout: - gl_CLOSEOUT - # Code from module configmake: - gl_CONFIGMAKE_PREP - # Code from module ctype: - gl_CTYPE_H - # Code from module cycle-check: - gl_CYCLE_CHECK - # Code from module d-ino: - gl_CHECK_TYPE_STRUCT_DIRENT_D_INO - # Code from module d-type: - gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE - # Code from module dev-ino: - # Code from module dirent: - gl_DIRENT_H - # Code from module dirent-safer: - gl_DIRENT_SAFER - gl_MODULE_INDICATOR([dirent-safer]) - # Code from module dirfd: - gl_FUNC_DIRFD - gl_DIRENT_MODULE_INDICATOR([dirfd]) - # Code from module dirname: - gl_DIRNAME - gl_MODULE_INDICATOR([dirname]) - # Code from module dirname-lgpl: - gl_DIRNAME_LGPL - # Code from module dosname: - # Code from module double-slash-root: - gl_DOUBLE_SLASH_ROOT - # Code from module dup2: - gl_FUNC_DUP2 - gl_UNISTD_MODULE_INDICATOR([dup2]) - # Code from module environ: - gl_ENVIRON - gl_UNISTD_MODULE_INDICATOR([environ]) - # Code from module errno: - gl_HEADER_ERRNO_H - # Code from module error: - gl_ERROR - m4_ifdef([AM_XGETTEXT_OPTION], - [AM_][XGETTEXT_OPTION([--flag=error:3:c-format]) - AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])]) - # Code from module euidaccess: - gl_FUNC_EUIDACCESS - gl_UNISTD_MODULE_INDICATOR([euidaccess]) - # Code from module exitfail: - # Code from module extensions: - # Code from module faccessat: - gl_FUNC_FACCESSAT - gl_MODULE_INDICATOR([faccessat]) - gl_UNISTD_MODULE_INDICATOR([faccessat]) - # Code from module fchdir: - gl_FUNC_FCHDIR - gl_UNISTD_MODULE_INDICATOR([fchdir]) - # Code from module fclose: - gl_FUNC_FCLOSE - gl_STDIO_MODULE_INDICATOR([fclose]) - # Code from module fcntl: - gl_FUNC_FCNTL - gl_FCNTL_MODULE_INDICATOR([fcntl]) - # Code from module fcntl-h: - gl_FCNTL_H - # Code from module fcntl-safer: - gl_FCNTL_SAFER - gl_MODULE_INDICATOR([fcntl-safer]) - # Code from module fdl: - # Code from module fdopendir: - gl_FUNC_FDOPENDIR - gl_DIRENT_MODULE_INDICATOR([fdopendir]) - gl_MODULE_INDICATOR([fdopendir]) - # Code from module fflush: - gl_FUNC_FFLUSH - gl_STDIO_MODULE_INDICATOR([fflush]) - # Code from module file-set: - # Code from module fileblocks: - gl_FILEBLOCKS - # Code from module filemode: - gl_FILEMODE - # Code from module flexmember: - AC_C_FLEXIBLE_ARRAY_MEMBER - # Code from module float: - gl_FLOAT_H - # Code from module fnmatch: - gl_FUNC_FNMATCH_POSIX - # Code from module fnmatch-gnu: - gl_FUNC_FNMATCH_GNU - # Code from module fopen: - gl_FUNC_FOPEN - gl_STDIO_MODULE_INDICATOR([fopen]) - # Code from module fopen-safer: - gl_FOPEN_SAFER - gl_MODULE_INDICATOR([fopen-safer]) - # Code from module fpending: - gl_FUNC_FPENDING - # Code from module fpurge: - gl_FUNC_FPURGE - gl_STDIO_MODULE_INDICATOR([fpurge]) - # Code from module freadahead: - # Code from module freading: - gl_FUNC_FREADING - # Code from module fseeko: - gl_FUNC_FSEEKO - gl_STDIO_MODULE_INDICATOR([fseeko]) - # Code from module ftello: - gl_FUNC_FTELLO - gl_STDIO_MODULE_INDICATOR([ftello]) - # Code from module fts: - gl_FUNC_FTS - # Code from module getcwd: - gl_FUNC_GETCWD - gl_UNISTD_MODULE_INDICATOR([getcwd]) - # Code from module getdelim: - gl_FUNC_GETDELIM - gl_STDIO_MODULE_INDICATOR([getdelim]) - # Code from module getdtablesize: - gl_FUNC_GETDTABLESIZE - gl_UNISTD_MODULE_INDICATOR([getdtablesize]) - # Code from module getgroups: - gl_FUNC_GETGROUPS - gl_UNISTD_MODULE_INDICATOR([getgroups]) - # Code from module getline: - gl_FUNC_GETLINE - gl_STDIO_MODULE_INDICATOR([getline]) - # Code from module getopt-gnu: - gl_FUNC_GETOPT_GNU - gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) - # Code from module getopt-posix: - gl_FUNC_GETOPT_POSIX - # Code from module gettext: - dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac. - AM_GNU_GETTEXT_VERSION([0.18.1]) - # Code from module gettext-h: - AC_SUBST([LIBINTL]) - AC_SUBST([LTLIBINTL]) - # Code from module gettime: - gl_GETTIME - # Code from module gettimeofday: - gl_FUNC_GETTIMEOFDAY - gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) - # Code from module gnumakefile: - # 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])]) - # Code from module gpl-3.0: - # Code from module group-member: - gl_FUNC_GROUP_MEMBER - # Code from module hash: - gl_HASH - # Code from module hash-pjw: - # Code from module hash-triple: - # Code from module havelib: - # Code from module human: - gl_HUMAN - # Code from module i-ring: - gl_I_RING - # Code from module idcache: - gl_IDCACHE - # Code from module include_next: - # Code from module inline: - gl_INLINE - # Code from module intprops: - # Code from module inttypes: - gl_INTTYPES_H - # Code from module isblank: - gl_FUNC_ISBLANK - gl_CTYPE_MODULE_INDICATOR([isblank]) - # Code from module iswblank: - gl_FUNC_ISWBLANK - gl_WCTYPE_MODULE_INDICATOR([iswblank]) - # Code from module langinfo: - gl_LANGINFO_H - # Code from module lchown: - gl_FUNC_LCHOWN - gl_UNISTD_MODULE_INDICATOR([lchown]) - # Code from module localcharset: - gl_LOCALCHARSET - LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" - AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) - # Code from module locale: - gl_LOCALE_H - # Code from module lseek: - gl_FUNC_LSEEK - gl_UNISTD_MODULE_INDICATOR([lseek]) - # Code from module lstat: - gl_FUNC_LSTAT - gl_SYS_STAT_MODULE_INDICATOR([lstat]) - # Code from module maintainer-makefile: - AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER], - [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])]) - # Code from module malloc: - # Code from module malloc-gnu: - gl_FUNC_MALLOC_GNU - gl_MODULE_INDICATOR([malloc-gnu]) - # Code from module malloc-posix: - gl_FUNC_MALLOC_POSIX - gl_STDLIB_MODULE_INDICATOR([malloc-posix]) - # Code from module malloca: - gl_MALLOCA - # Code from module math: - gl_MATH_H - # Code from module mbchar: - gl_MBCHAR - # Code from module mbrtowc: - gl_FUNC_MBRTOWC - gl_WCHAR_MODULE_INDICATOR([mbrtowc]) - # Code from module mbscasestr: - gl_STRING_MODULE_INDICATOR([mbscasestr]) - # Code from module mbsinit: - gl_FUNC_MBSINIT - gl_WCHAR_MODULE_INDICATOR([mbsinit]) - # Code from module mbslen: - gl_FUNC_MBSLEN - gl_STRING_MODULE_INDICATOR([mbslen]) - # Code from module mbsrtowcs: - gl_FUNC_MBSRTOWCS - gl_WCHAR_MODULE_INDICATOR([mbsrtowcs]) - # Code from module mbsstr: - gl_STRING_MODULE_INDICATOR([mbsstr]) - # Code from module mbtowc: - gl_FUNC_MBTOWC - gl_STDLIB_MODULE_INDICATOR([mbtowc]) - # Code from module mbuiter: - gl_MBITER - # Code from module memchr: - gl_FUNC_MEMCHR - gl_STRING_MODULE_INDICATOR([memchr]) - # Code from module mempcpy: - gl_FUNC_MEMPCPY - gl_STRING_MODULE_INDICATOR([mempcpy]) - # Code from module memrchr: - gl_FUNC_MEMRCHR - gl_STRING_MODULE_INDICATOR([memrchr]) - # Code from module mkdir: - gl_FUNC_MKDIR - # Code from module mktime: - gl_FUNC_MKTIME - gl_TIME_MODULE_INDICATOR([mktime]) - # Code from module modechange: - gl_MODECHANGE - # Code from module modf: - gl_MATHFUNC([modf], [double], [(double, double *)]) - # Code from module mountlist: - gl_MOUNTLIST - # Code from module multiarch: - gl_MULTIARCH - # Code from module nl_langinfo: - gl_FUNC_NL_LANGINFO - gl_LANGINFO_MODULE_INDICATOR([nl_langinfo]) - # Code from module open: - gl_FUNC_OPEN - gl_FCNTL_MODULE_INDICATOR([open]) - # Code from module openat: - gl_FUNC_OPENAT - # Code from module openat-die: - # Code from module openat-safer: - gl_OPENAT_SAFER - gl_MODULE_INDICATOR([openat-safer]) - # Code from module parse-datetime: - gl_PARSE_DATETIME - # Code from module pathmax: - gl_PATHMAX - # Code from module perror: - gl_FUNC_PERROR - gl_STRING_MODULE_INDICATOR([perror]) - # Code from module progname: - AC_CHECK_DECLS([program_invocation_name], [], [], [#include ]) - AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include ]) - # Code from module quote: - gl_QUOTE - # Code from module quotearg: - gl_QUOTEARG - # Code from module quotearg-simple: - # Code from module readlink: - gl_FUNC_READLINK - gl_UNISTD_MODULE_INDICATOR([readlink]) - # Code from module readlinkat: - gl_FUNC_READLINKAT - gl_UNISTD_MODULE_INDICATOR([readlinkat]) - # Code from module realloc: - # Code from module realloc-gnu: - gl_FUNC_REALLOC_GNU - gl_MODULE_INDICATOR([realloc-gnu]) - # Code from module realloc-posix: - gl_FUNC_REALLOC_POSIX - gl_STDLIB_MODULE_INDICATOR([realloc-posix]) - # Code from module regex: - gl_REGEX - # Code from module rmdir: - gl_FUNC_RMDIR - gl_UNISTD_MODULE_INDICATOR([rmdir]) - # Code from module rpmatch: - gl_FUNC_RPMATCH - gl_STDLIB_MODULE_INDICATOR([rpmatch]) - # Code from module same: - gl_SAME - # Code from module same-inode: - # Code from module save-cwd: - gl_SAVE_CWD - # Code from module savedir: - gl_SAVEDIR - # Code from module selinux-at: - AC_CHECK_HEADERS([selinux/flask.h]) - AC_LIBOBJ([selinux-at]) - # Code from module selinux-h: - gl_HEADERS_SELINUX_SELINUX_H - gl_HEADERS_SELINUX_CONTEXT_H - AC_REQUIRE([AC_C_INLINE]) - # Code from module setenv: - gl_FUNC_SETENV - gl_STDLIB_MODULE_INDICATOR([setenv]) - # Code from module size_max: - gl_SIZE_MAX - # Code from module snprintf: - gl_FUNC_SNPRINTF - gl_STDIO_MODULE_INDICATOR([snprintf]) - gl_MODULE_INDICATOR([snprintf]) - # Code from module ssize_t: - gt_TYPE_SSIZE_T - # Code from module stat: - gl_FUNC_STAT - gl_SYS_STAT_MODULE_INDICATOR([stat]) - # Code from module stat-macros: - # Code from module stat-time: - gl_STAT_TIME - gl_STAT_BIRTHTIME - # Code from module stdarg: - gl_STDARG_H - # Code from module stdbool: - AM_STDBOOL_H - # Code from module stddef: - gl_STDDEF_H - # Code from module stdint: - gl_STDINT_H - # Code from module stdio: - gl_STDIO_H - # Code from module stdlib: - gl_STDLIB_H - # Code from module stpcpy: - gl_FUNC_STPCPY - gl_STRING_MODULE_INDICATOR([stpcpy]) - # Code from module strcase: - gl_STRCASE - # Code from module strcasestr: - gl_FUNC_STRCASESTR - # Code from module strcasestr-simple: - gl_FUNC_STRCASESTR_SIMPLE - gl_STRING_MODULE_INDICATOR([strcasestr]) - # Code from module strdup-posix: - gl_FUNC_STRDUP_POSIX - gl_STRING_MODULE_INDICATOR([strdup]) - # Code from module streq: - # Code from module strerror: - gl_FUNC_STRERROR - gl_STRING_MODULE_INDICATOR([strerror]) - # Code from module strftime: - gl_FUNC_GNU_STRFTIME - # Code from module string: - gl_HEADER_STRING_H - # Code from module strings: - gl_HEADER_STRINGS_H - # Code from module strndup: - gl_FUNC_STRNDUP - gl_STRING_MODULE_INDICATOR([strndup]) - # Code from module strnlen: - gl_FUNC_STRNLEN - gl_STRING_MODULE_INDICATOR([strnlen]) - # Code from module strnlen1: - # Code from module strstr: - gl_FUNC_STRSTR - # Code from module strstr-simple: - gl_FUNC_STRSTR_SIMPLE - gl_STRING_MODULE_INDICATOR([strstr]) - # Code from module strtoimax: - gl_FUNC_STRTOIMAX - gl_INTTYPES_MODULE_INDICATOR([strtoimax]) - # Code from module strtol: - gl_FUNC_STRTOL - # Code from module strtoll: - gl_FUNC_STRTOLL - gl_STDLIB_MODULE_INDICATOR([strtoll]) - # Code from module strtoul: - gl_FUNC_STRTOUL - # Code from module strtoull: - gl_FUNC_STRTOULL - gl_STDLIB_MODULE_INDICATOR([strtoull]) - # Code from module strtoumax: - gl_FUNC_STRTOUMAX - gl_INTTYPES_MODULE_INDICATOR([strtoumax]) - # Code from module sys_stat: - gl_HEADER_SYS_STAT_H - AC_PROG_MKDIR_P - # Code from module sys_time: - gl_HEADER_SYS_TIME_H - AC_PROG_MKDIR_P - # Code from module sys_wait: - gl_SYS_WAIT_H - AC_PROG_MKDIR_P - # Code from module time: - gl_HEADER_TIME_H - # Code from module time_r: - gl_TIME_R - gl_TIME_MODULE_INDICATOR([time_r]) - # Code from module timespec: - gl_TIMESPEC - # Code from module unistd: - gl_UNISTD_H - # Code from module unistd-safer: - gl_UNISTD_SAFER - # Code from module unitypes: - gl_LIBUNISTRING_LIBHEADER([0.9], [unitypes.h]) - # Code from module uniwidth/base: - gl_LIBUNISTRING_LIBHEADER([0.9], [uniwidth.h]) - # Code from module uniwidth/width: - gl_LIBUNISTRING_MODULE([0.9.4], [uniwidth/width]) - # Code from module unlink: - gl_FUNC_UNLINK - gl_UNISTD_MODULE_INDICATOR([unlink]) - # Code from module unsetenv: - gl_FUNC_UNSETENV - gl_STDLIB_MODULE_INDICATOR([unsetenv]) - # Code from module unused-parameter: - # Code from module update-copyright: - # Code from module useless-if-before-free: - # Code from module vasnprintf: - gl_FUNC_VASNPRINTF - # Code from module vc-list-files: - # Code from module verify: - # Code from module version-etc: - gl_VERSION_ETC - # Code from module version-etc-fsf: - # Code from module warn-on-use: - # Code from module warnings: - AC_SUBST([WARN_CFLAGS]) - # Code from module wchar: - gl_WCHAR_H - # Code from module wcrtomb: - gl_FUNC_WCRTOMB - gl_WCHAR_MODULE_INDICATOR([wcrtomb]) - # Code from module wctype-h: - gl_WCTYPE_H - # Code from module wcwidth: - gl_FUNC_WCWIDTH - gl_WCHAR_MODULE_INDICATOR([wcwidth]) - # Code from module xalloc: - gl_XALLOC - # Code from module xalloc-die: - # Code from module xgetcwd: - gl_XGETCWD - # Code from module xsize: - gl_XSIZE - # Code from module xstrndup: - gl_XSTRNDUP - # Code from module xstrtod: - gl_XSTRTOD - # Code from module xstrtol: - gl_XSTRTOL - # Code from module xstrtoumax: - # Code from module yesno: - gl_YESNO - # End of code from modules - m4_ifval(gl_LIBSOURCES_LIST, [ - m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || - for gl_file in ]gl_LIBSOURCES_LIST[ ; do - if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then - echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 - exit 1 - fi - done])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) - ]) - m4_popdef([gl_LIBSOURCES_DIR]) - m4_popdef([gl_LIBSOURCES_LIST]) - m4_popdef([AC_LIBSOURCES]) - m4_popdef([AC_REPLACE_FUNCS]) - m4_popdef([AC_LIBOBJ]) - AC_CONFIG_COMMANDS_PRE([ - gl_libobjs= - gl_ltlibobjs= - if test -n "$gl_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gl_libobjs="$gl_libobjs $i.$ac_objext" - gl_ltlibobjs="$gl_ltlibobjs $i.lo" - done - fi - AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) - AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) - ]) - gltests_libdeps= - gltests_ltlibdeps= - m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) - m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) - m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) - m4_pushdef([gltests_LIBSOURCES_LIST], []) - m4_pushdef([gltests_LIBSOURCES_DIR], []) - gl_COMMON - gl_source_base='tests' -changequote(,)dnl - gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS -changequote([, ])dnl - AC_SUBST([gltests_WITNESS]) - gl_module_indicator_condition=$gltests_WITNESS - m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) - gt_LOCALE_FR - gt_LOCALE_FR_UTF8 - gt_LOCALE_FR - gt_LOCALE_TR_UTF8 - AC_CHECK_FUNCS_ONCE([getegid]) - gl_MODULE_INDICATOR([fd-safer-flag]) - gl_FUNC_UNGETC_WORKS - gl_FUNC_FTELL - gl_STDIO_MODULE_INDICATOR([ftell]) - gl_FUNC_UNGETC_WORKS - gl_FUNC_UNGETC_WORKS - gl_FUNC_GETPAGESIZE - gl_UNISTD_MODULE_INDICATOR([getpagesize]) - gl_GETUGROUPS - AC_REQUIRE([AC_C_INLINE]) - gl_INTTOSTR - AC_CHECK_FUNCS_ONCE([getegid]) - AC_CHECK_FUNCS_ONCE([newlocale]) - gl_LOCALENAME - AC_CHECK_FUNCS_ONCE([newlocale]) - gl_LOCK - gt_LOCALE_FR - gt_LOCALE_FR_UTF8 - gt_LOCALE_JA - gt_LOCALE_ZH_CN - gt_LOCALE_FR_UTF8 - gt_LOCALE_TR_UTF8 - gt_LOCALE_ZH_CN - gt_LOCALE_FR_UTF8 - gt_LOCALE_FR - gt_LOCALE_FR_UTF8 - gt_LOCALE_JA - gt_LOCALE_ZH_CN - gt_LOCALE_FR_UTF8 - gt_LOCALE_ZH_CN - 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_MMAP_ANON - AC_CHECK_HEADERS_ONCE([sys/mman.h]) - AC_CHECK_FUNCS_ONCE([mprotect]) - gl_MGETGROUPS - gt_LOCALE_FR - gt_LOCALE_FR_UTF8 - AC_CHECK_FUNCS_ONCE([getegid]) - gl_PRIV_SET - gl_FUNC_PUTENV - gl_STDLIB_MODULE_INDICATOR([putenv]) - gl_FUNC_SETLOCALE - gl_LOCALE_MODULE_INDICATOR([setlocale]) - gt_LOCALE_FR - gt_LOCALE_FR_UTF8 - gt_LOCALE_JA - gt_LOCALE_ZH_CN - gl_FUNC_SLEEP - gl_UNISTD_MODULE_INDICATOR([sleep]) - AC_CHECK_DECLS_ONCE([alarm]) - gt_TYPE_WCHAR_T - gt_TYPE_WINT_T - AC_CHECK_DECLS_ONCE([alarm]) - 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_DECLS_ONCE([alarm]) - gl_FUNC_MMAP_ANON - AC_CHECK_HEADERS_ONCE([sys/mman.h]) - AC_CHECK_FUNCS_ONCE([mprotect]) - gl_FUNC_SYMLINK - gl_UNISTD_MODULE_INDICATOR([symlink]) - gl_FUNC_SYMLINKAT - gl_UNISTD_MODULE_INDICATOR([symlinkat]) - gl_THREAD - gl_THREADLIB - gl_UNLINKDIR - abs_aux_dir=`cd "$ac_aux_dir"; pwd` - AC_SUBST([abs_aux_dir]) - gl_FUNC_USLEEP - gl_UNISTD_MODULE_INDICATOR([usleep]) - abs_aux_dir=`cd "$ac_aux_dir"; pwd` - AC_SUBST([abs_aux_dir]) - gt_LOCALE_FR - gt_LOCALE_FR_UTF8 - gt_LOCALE_JA - gt_LOCALE_ZH_CN - gl_FUNC_WCTOB - gl_WCHAR_MODULE_INDICATOR([wctob]) - gl_FUNC_WCTOMB - gl_STDLIB_MODULE_INDICATOR([wctomb]) - gl_YIELD - m4_popdef([gl_MODULE_INDICATOR_CONDITION]) - m4_ifval(gltests_LIBSOURCES_LIST, [ - m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || - for gl_file in ]gltests_LIBSOURCES_LIST[ ; do - if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then - echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 - exit 1 - fi - done])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) - ]) - m4_popdef([gltests_LIBSOURCES_DIR]) - m4_popdef([gltests_LIBSOURCES_LIST]) - m4_popdef([AC_LIBSOURCES]) - m4_popdef([AC_REPLACE_FUNCS]) - m4_popdef([AC_LIBOBJ]) - AC_CONFIG_COMMANDS_PRE([ - gltests_libobjs= - gltests_ltlibobjs= - if test -n "$gltests_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gltests_libobjs="$gltests_libobjs $i.$ac_objext" - gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" - done - fi - AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) - AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) - ]) - LIBGNULIB_LIBDEPS="$gl_libdeps" - AC_SUBST([LIBGNULIB_LIBDEPS]) - LIBGNULIB_LTLIBDEPS="$gl_ltlibdeps" - AC_SUBST([LIBGNULIB_LTLIBDEPS]) - LIBTESTS_LIBDEPS="$gltests_libdeps" - AC_SUBST([LIBTESTS_LIBDEPS]) -]) - -# Like AC_LIBOBJ, except that the module name goes -# into gl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gl_LIBOBJ], [ - AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl - gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" -]) - -# Like AC_REPLACE_FUNCS, except that the module name goes -# into gl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gl_REPLACE_FUNCS], [ - m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl - AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) -]) - -# Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parameterization, -# and alloca is special cased (for the alloca-opt module). -# We could also entirely rely on EXTRA_lib..._SOURCES. -AC_DEFUN([gl_LIBSOURCES], [ - m4_foreach([_gl_NAME], [$1], [ - m4_if(_gl_NAME, [alloca.c], [], [ - m4_define([gl_LIBSOURCES_DIR], [gnulib/lib]) - m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) - ]) - ]) -]) - -# Like AC_LIBOBJ, except that the module name goes -# into gltests_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gltests_LIBOBJ], [ - AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl - gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" -]) - -# Like AC_REPLACE_FUNCS, except that the module name goes -# into gltests_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gltests_REPLACE_FUNCS], [ - m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl - AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) -]) - -# Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parameterization, -# and alloca is special cased (for the alloca-opt module). -# We could also entirely rely on EXTRA_lib..._SOURCES. -AC_DEFUN([gltests_LIBSOURCES], [ - m4_foreach([_gl_NAME], [$1], [ - m4_if(_gl_NAME, [alloca.c], [], [ - m4_define([gltests_LIBSOURCES_DIR], [tests]) - m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) - ]) - ]) -]) - -# This macro records the list of files which have been installed by -# gnulib-tool and may be removed by future gnulib-tool invocations. -AC_DEFUN([gl_FILE_LIST], [ - build-aux/arg-nonnull.h - build-aux/c++defs.h - build-aux/config.rpath - build-aux/unused-parameter.h - build-aux/update-copyright - build-aux/useless-if-before-free - build-aux/vc-list-files - build-aux/warn-on-use.h - doc/fdl.texi - doc/gpl-3.0.texi - doc/parse-datetime.texi - lib/alloca.c - lib/alloca.in.h - lib/areadlink-with-size.c - lib/areadlink.c - lib/areadlink.h - lib/areadlinkat.c - lib/argmatch.c - lib/argmatch.h - lib/asnprintf.c - lib/at-func.c - lib/basename-lgpl.c - lib/basename.c - lib/bitrotate.h - lib/btowc.c - lib/c-ctype.c - lib/c-ctype.h - lib/c-strcase.h - lib/c-strcasecmp.c - lib/c-strcasestr.c - lib/c-strcasestr.h - lib/c-strncasecmp.c - lib/c-strstr.c - lib/c-strstr.h - lib/canonicalize.c - lib/canonicalize.h - lib/chdir-long.c - lib/chdir-long.h - lib/chown.c - lib/cloexec.c - lib/cloexec.h - lib/close-hook.c - lib/close-hook.h - lib/close-stream.c - lib/close-stream.h - lib/close.c - lib/closein.c - lib/closein.h - lib/closeout.c - lib/closeout.h - lib/config.charset - lib/creat-safer.c - lib/ctype.in.h - lib/cycle-check.c - lib/cycle-check.h - lib/dev-ino.h - lib/dirent--.h - lib/dirent-safer.h - lib/dirent.in.h - lib/dirfd.c - lib/dirname-lgpl.c - lib/dirname.c - lib/dirname.h - lib/dosname.h - lib/dup-safer.c - lib/dup2.c - lib/errno.in.h - lib/error.c - lib/error.h - lib/euidaccess.c - lib/exitfail.c - lib/exitfail.h - lib/faccessat.c - lib/fchdir.c - lib/fchmodat.c - lib/fchown-stub.c - lib/fchownat.c - lib/fclose.c - lib/fcntl--.h - lib/fcntl-safer.h - lib/fcntl.c - lib/fcntl.in.h - lib/fd-safer.c - lib/fdopendir.c - lib/fflush.c - lib/file-set.c - lib/file-set.h - lib/fileblocks.c - lib/filemode.c - lib/filemode.h - lib/float+.h - lib/float.in.h - lib/fnmatch.c - lib/fnmatch.in.h - lib/fnmatch_loop.c - lib/fopen-safer.c - lib/fopen.c - lib/fpending.c - lib/fpending.h - lib/fpurge.c - lib/freadahead.c - lib/freadahead.h - lib/freading.c - lib/freading.h - lib/fseeko.c - lib/fstatat.c - lib/ftello.c - lib/fts-cycle.c - lib/fts.c - lib/fts_.h - lib/getcwd.c - lib/getdelim.c - lib/getdtablesize.c - lib/getfilecon.c - lib/getgroups.c - lib/getline.c - lib/getopt.c - lib/getopt.in.h - lib/getopt1.c - lib/getopt_int.h - lib/gettext.h - lib/gettime.c - lib/gettimeofday.c - lib/group-member.c - lib/group-member.h - lib/hash-pjw.c - lib/hash-pjw.h - lib/hash-triple.c - lib/hash-triple.h - lib/hash.c - lib/hash.h - lib/human.c - lib/human.h - lib/i-ring.c - lib/i-ring.h - lib/idcache.c - lib/idcache.h - lib/intprops.h - lib/inttypes.in.h - lib/isblank.c - lib/iswblank.c - lib/langinfo.in.h - lib/lchown.c - lib/localcharset.c - lib/localcharset.h - lib/locale.in.h - lib/lseek.c - lib/lstat.c - lib/malloc.c - lib/malloca.c - lib/malloca.h - lib/malloca.valgrind - lib/math.in.h - lib/mbchar.c - lib/mbchar.h - lib/mbrtowc.c - lib/mbscasestr.c - lib/mbsinit.c - lib/mbslen.c - lib/mbsrtowcs-impl.h - lib/mbsrtowcs-state.c - lib/mbsrtowcs.c - lib/mbsstr.c - lib/mbtowc-impl.h - lib/mbtowc.c - lib/mbuiter.h - lib/memchr.c - lib/memchr.valgrind - lib/mempcpy.c - lib/memrchr.c - lib/mkdir.c - lib/mkdirat.c - lib/mktime-internal.h - lib/mktime.c - lib/modechange.c - lib/modechange.h - lib/mountlist.c - lib/mountlist.h - lib/nl_langinfo.c - lib/open-safer.c - lib/open.c - lib/openat-die.c - lib/openat-priv.h - lib/openat-proc.c - lib/openat-safer.c - lib/openat.c - lib/openat.h - lib/opendir-safer.c - lib/parse-datetime.h - lib/parse-datetime.y - lib/pathmax.h - lib/perror.c - lib/pipe-safer.c - lib/printf-args.c - lib/printf-args.h - lib/printf-parse.c - lib/printf-parse.h - lib/progname.c - lib/progname.h - lib/quote.c - lib/quote.h - lib/quotearg.c - lib/quotearg.h - lib/readlink.c - lib/readlinkat.c - lib/realloc.c - lib/ref-add.sin - lib/ref-del.sin - lib/regcomp.c - lib/regex.c - lib/regex.h - lib/regex_internal.c - lib/regex_internal.h - lib/regexec.c - lib/rmdir.c - lib/rpmatch.c - lib/same-inode.h - lib/same.c - lib/same.h - lib/save-cwd.c - lib/save-cwd.h - lib/savedir.c - lib/savedir.h - lib/se-context.in.h - lib/se-selinux.in.h - lib/selinux-at.c - lib/selinux-at.h - lib/setenv.c - lib/size_max.h - lib/snprintf.c - lib/stat-macros.h - lib/stat-time.h - lib/stat.c - lib/stdarg.in.h - lib/stdbool.in.h - lib/stddef.in.h - lib/stdint.in.h - lib/stdio--.h - lib/stdio-impl.h - lib/stdio-safer.h - lib/stdio.in.h - lib/stdlib.in.h - lib/stpcpy.c - lib/str-kmp.h - lib/str-two-way.h - lib/strcasecmp.c - lib/strcasestr.c - lib/strdup.c - lib/streq.h - lib/strerror.c - lib/strftime.c - lib/strftime.h - lib/string.in.h - lib/strings.in.h - lib/stripslash.c - lib/strncasecmp.c - lib/strndup.c - lib/strnlen.c - lib/strnlen1.c - lib/strnlen1.h - lib/strstr.c - lib/strtoimax.c - lib/strtol.c - lib/strtoll.c - lib/strtoul.c - lib/strtoull.c - lib/strtoumax.c - lib/sys_stat.in.h - lib/sys_time.in.h - lib/sys_wait.in.h - lib/time.in.h - lib/time_r.c - lib/timespec.h - lib/unistd--.h - lib/unistd-safer.h - lib/unistd.in.h - lib/unitypes.in.h - lib/uniwidth.in.h - lib/uniwidth/cjk.h - lib/uniwidth/width.c - lib/unlink.c - lib/unlinkat.c - lib/unsetenv.c - lib/vasnprintf.c - lib/vasnprintf.h - lib/verify.h - lib/version-etc-fsf.c - lib/version-etc.c - lib/version-etc.h - lib/wchar.in.h - lib/wcrtomb.c - lib/wctype.in.h - lib/wcwidth.c - lib/xalloc-die.c - lib/xalloc.h - lib/xgetcwd.c - lib/xgetcwd.h - lib/xmalloc.c - lib/xsize.h - lib/xstrndup.c - lib/xstrndup.h - lib/xstrtod.c - lib/xstrtod.h - lib/xstrtol-error.c - lib/xstrtol.c - lib/xstrtol.h - lib/xstrtoul.c - lib/xstrtoumax.c - lib/yesno.c - lib/yesno.h - m4/00gnulib.m4 - m4/alloca.m4 - m4/argmatch.m4 - m4/assert.m4 - m4/bison.m4 - m4/btowc.m4 - m4/canonicalize.m4 - m4/chdir-long.m4 - m4/chown.m4 - m4/clock_time.m4 - m4/cloexec.m4 - m4/close-stream.m4 - m4/close.m4 - m4/closein.m4 - m4/closeout.m4 - m4/codeset.m4 - m4/configmake.m4 - m4/ctype.m4 - m4/cycle-check.m4 - m4/d-ino.m4 - m4/d-type.m4 - m4/dirent-safer.m4 - m4/dirent_h.m4 - m4/dirfd.m4 - m4/dirname.m4 - m4/double-slash-root.m4 - m4/dup2.m4 - m4/eealloc.m4 - m4/environ.m4 - m4/errno_h.m4 - m4/error.m4 - m4/euidaccess.m4 - m4/extensions.m4 - m4/faccessat.m4 - m4/fchdir.m4 - m4/fclose.m4 - m4/fcntl-o.m4 - m4/fcntl-safer.m4 - m4/fcntl.m4 - m4/fcntl_h.m4 - m4/fdopendir.m4 - m4/fflush.m4 - m4/fileblocks.m4 - m4/filemode.m4 - m4/flexmember.m4 - m4/float_h.m4 - m4/fnmatch.m4 - m4/fopen.m4 - m4/fpending.m4 - m4/fpurge.m4 - m4/freading.m4 - m4/fseeko.m4 - m4/fstypename.m4 - m4/ftell.m4 - m4/ftello.m4 - m4/fts.m4 - m4/getcwd-abort-bug.m4 - m4/getcwd-path-max.m4 - m4/getcwd.m4 - m4/getdelim.m4 - m4/getdtablesize.m4 - m4/getgroups.m4 - m4/getline.m4 - m4/getopt.m4 - m4/getpagesize.m4 - m4/gettext.m4 - m4/gettime.m4 - m4/gettimeofday.m4 - m4/getugroups.m4 - m4/glibc2.m4 - m4/glibc21.m4 - m4/gnulib-common.m4 - m4/group-member.m4 - m4/hash.m4 - m4/human.m4 - m4/i-ring.m4 - m4/iconv.m4 - m4/idcache.m4 - m4/include_next.m4 - m4/inline.m4 - m4/intdiv0.m4 - m4/intl.m4 - m4/intldir.m4 - m4/intlmacosx.m4 - m4/intmax.m4 - m4/intmax_t.m4 - m4/inttostr.m4 - m4/inttypes-pri.m4 - m4/inttypes.m4 - m4/inttypes_h.m4 - m4/isblank.m4 - m4/iswblank.m4 - m4/langinfo_h.m4 - m4/lchown.m4 - m4/lcmessage.m4 - m4/lib-ld.m4 - m4/lib-link.m4 - m4/lib-prefix.m4 - m4/libunistring-base.m4 - m4/localcharset.m4 - m4/locale-fr.m4 - m4/locale-ja.m4 - m4/locale-tr.m4 - m4/locale-zh.m4 - m4/locale_h.m4 - m4/localename.m4 - m4/lock.m4 - m4/longlong.m4 - m4/ls-mntd-fs.m4 - m4/lseek.m4 - m4/lstat.m4 - m4/malloc.m4 - m4/malloca.m4 - m4/math_h.m4 - m4/mathfunc.m4 - m4/mbchar.m4 - m4/mbiter.m4 - m4/mbrtowc.m4 - m4/mbsinit.m4 - m4/mbslen.m4 - m4/mbsrtowcs.m4 - m4/mbstate_t.m4 - m4/mbtowc.m4 - m4/memchr.m4 - m4/mempcpy.m4 - m4/memrchr.m4 - m4/mgetgroups.m4 - m4/mkdir.m4 - m4/mktime.m4 - m4/mmap-anon.m4 - m4/mode_t.m4 - m4/modechange.m4 - m4/mountlist.m4 - m4/multiarch.m4 - m4/nl_langinfo.m4 - m4/nls.m4 - m4/onceonly.m4 - m4/open.m4 - m4/openat.m4 - m4/parse-datetime.m4 - m4/pathmax.m4 - m4/perror.m4 - m4/po.m4 - m4/printf-posix.m4 - m4/printf.m4 - m4/priv-set.m4 - m4/progtest.m4 - m4/putenv.m4 - m4/quote.m4 - m4/quotearg.m4 - m4/readlink.m4 - m4/readlinkat.m4 - m4/realloc.m4 - m4/regex.m4 - m4/rmdir.m4 - m4/rpmatch.m4 - m4/same.m4 - m4/save-cwd.m4 - m4/savedir.m4 - m4/selinux-context-h.m4 - m4/selinux-selinux-h.m4 - m4/setenv.m4 - m4/setlocale.m4 - m4/size_max.m4 - m4/sleep.m4 - m4/snprintf.m4 - m4/ssize_t.m4 - m4/st_dm_mode.m4 - m4/stat-time.m4 - m4/stat.m4 - m4/stdarg.m4 - m4/stdbool.m4 - m4/stddef_h.m4 - m4/stdint.m4 - m4/stdint_h.m4 - m4/stdio-safer.m4 - m4/stdio_h.m4 - m4/stdlib_h.m4 - m4/stpcpy.m4 - m4/strcase.m4 - m4/strcasestr.m4 - m4/strdup.m4 - m4/strerror.m4 - m4/strftime.m4 - m4/string_h.m4 - m4/strings_h.m4 - m4/strndup.m4 - m4/strnlen.m4 - m4/strstr.m4 - m4/strtoimax.m4 - m4/strtol.m4 - m4/strtoll.m4 - m4/strtoul.m4 - m4/strtoull.m4 - m4/strtoumax.m4 - m4/symlink.m4 - m4/symlinkat.m4 - m4/sys_stat_h.m4 - m4/sys_time_h.m4 - m4/sys_wait_h.m4 - m4/thread.m4 - m4/threadlib.m4 - m4/time_h.m4 - m4/time_r.m4 - m4/timespec.m4 - m4/tm_gmtoff.m4 - m4/uintmax_t.m4 - m4/ungetc.m4 - m4/unistd-safer.m4 - m4/unistd_h.m4 - m4/unlink.m4 - m4/unlinkdir.m4 - m4/usleep.m4 - m4/vasnprintf.m4 - m4/version-etc.m4 - m4/visibility.m4 - m4/warn-on-use.m4 - m4/warnings.m4 - m4/wchar_h.m4 - m4/wchar_t.m4 - m4/wcrtomb.m4 - m4/wctob.m4 - m4/wctomb.m4 - m4/wctype_h.m4 - m4/wcwidth.m4 - m4/wint_t.m4 - m4/xalloc.m4 - m4/xgetcwd.m4 - m4/xsize.m4 - m4/xstrndup.m4 - m4/xstrtod.m4 - m4/xstrtol.m4 - m4/yesno.m4 - m4/yield.m4 - tests/init.sh - tests/macros.h - tests/nap.h - tests/signature.h - tests/test-alloca-opt.c - tests/test-areadlink-with-size.c - tests/test-areadlink.c - tests/test-areadlink.h - tests/test-areadlinkat.c - tests/test-argmatch.c - tests/test-binary-io.c - tests/test-binary-io.sh - tests/test-bitrotate.c - tests/test-btowc.c - tests/test-btowc1.sh - tests/test-btowc2.sh - tests/test-c-ctype.c - tests/test-c-strcase.sh - tests/test-c-strcasecmp.c - tests/test-c-strcasestr.c - tests/test-c-strncasecmp.c - tests/test-c-strstr.c - tests/test-canonicalize.c - tests/test-chown.c - tests/test-chown.h - tests/test-cloexec.c - tests/test-closein.c - tests/test-closein.sh - tests/test-ctype.c - tests/test-dirent-safer.c - tests/test-dirent.c - tests/test-dirname.c - tests/test-dup-safer.c - tests/test-dup2.c - tests/test-environ.c - tests/test-errno.c - tests/test-fchdir.c - tests/test-fchownat.c - tests/test-fcntl-h.c - tests/test-fcntl-safer.c - tests/test-fcntl.c - tests/test-fdopendir.c - tests/test-fflush.c - tests/test-fflush2.c - tests/test-fflush2.sh - tests/test-fnmatch.c - tests/test-fopen-safer.c - tests/test-fopen.c - tests/test-fopen.h - tests/test-fpending.c - tests/test-fpending.sh - tests/test-fpurge.c - tests/test-freadahead.c - tests/test-freadahead.sh - tests/test-freading.c - tests/test-fseeko.c - tests/test-fseeko.sh - tests/test-fseeko2.sh - tests/test-fstatat.c - tests/test-ftell.c - tests/test-ftell.sh - tests/test-ftell2.sh - tests/test-ftell3.c - tests/test-ftello.c - tests/test-ftello.sh - tests/test-ftello2.sh - tests/test-ftello3.c - tests/test-getcwd.c - tests/test-getdelim.c - tests/test-getdtablesize.c - tests/test-getgroups.c - tests/test-getline.c - tests/test-getopt.c - tests/test-getopt.h - tests/test-getopt_long.h - tests/test-gettimeofday.c - tests/test-hash.c - tests/test-i-ring.c - tests/test-ignore-value.c - tests/test-inttostr.c - tests/test-inttypes.c - tests/test-isblank.c - tests/test-iswblank.c - tests/test-langinfo.c - tests/test-lchown.c - tests/test-lchown.h - tests/test-locale.c - tests/test-localename.c - tests/test-lock.c - tests/test-lseek.c - tests/test-lseek.sh - tests/test-lstat.c - tests/test-lstat.h - tests/test-malloc-gnu.c - tests/test-malloca.c - tests/test-math.c - tests/test-mbrtowc-w32-1.sh - tests/test-mbrtowc-w32-2.sh - tests/test-mbrtowc-w32-3.sh - tests/test-mbrtowc-w32-4.sh - tests/test-mbrtowc-w32-5.sh - tests/test-mbrtowc-w32.c - tests/test-mbrtowc.c - tests/test-mbrtowc1.sh - tests/test-mbrtowc2.sh - tests/test-mbrtowc3.sh - tests/test-mbrtowc4.sh - tests/test-mbscasestr1.c - tests/test-mbscasestr2.c - tests/test-mbscasestr2.sh - tests/test-mbscasestr3.c - tests/test-mbscasestr3.sh - tests/test-mbscasestr4.c - tests/test-mbscasestr4.sh - tests/test-mbsinit.c - tests/test-mbsinit.sh - tests/test-mbsrtowcs.c - tests/test-mbsrtowcs1.sh - tests/test-mbsrtowcs2.sh - tests/test-mbsrtowcs3.sh - tests/test-mbsrtowcs4.sh - tests/test-mbsstr1.c - tests/test-mbsstr2.c - tests/test-mbsstr2.sh - tests/test-mbsstr3.c - tests/test-mbsstr3.sh - tests/test-memchr.c - tests/test-memrchr.c - tests/test-mkdir.c - tests/test-mkdir.h - tests/test-mkdirat.c - tests/test-modf.c - tests/test-nl_langinfo.c - tests/test-nl_langinfo.sh - tests/test-open.c - tests/test-open.h - tests/test-openat-safer.c - tests/test-openat.c - tests/test-parse-datetime.c - tests/test-perror.c - tests/test-perror.sh - tests/test-priv-set.c - tests/test-quotearg-simple.c - tests/test-quotearg.h - tests/test-readlink.c - tests/test-readlink.h - tests/test-readlinkat.c - tests/test-realloc-gnu.c - tests/test-rmdir.c - tests/test-rmdir.h - tests/test-setenv.c - tests/test-setlocale1.c - tests/test-setlocale1.sh - tests/test-setlocale2.c - tests/test-setlocale2.sh - tests/test-sleep.c - tests/test-snprintf.c - tests/test-stat-time.c - tests/test-stat.c - tests/test-stat.h - tests/test-stdbool.c - tests/test-stddef.c - tests/test-stdint.c - tests/test-stdio.c - tests/test-stdlib.c - tests/test-strcasestr.c - tests/test-strerror.c - tests/test-strftime.c - tests/test-string.c - tests/test-strings.c - tests/test-strnlen.c - tests/test-strstr.c - tests/test-symlink.c - tests/test-symlink.h - tests/test-symlinkat.c - tests/test-sys_stat.c - tests/test-sys_time.c - tests/test-sys_wait.c - tests/test-sys_wait.h - tests/test-time.c - tests/test-unistd.c - tests/test-unlink.c - tests/test-unlink.h - tests/test-unlinkat.c - tests/test-unsetenv.c - tests/test-update-copyright.sh - tests/test-usleep.c - tests/test-vasnprintf.c - tests/test-vc-list-files-cvs.sh - tests/test-vc-list-files-git.sh - tests/test-verify.c - tests/test-verify.sh - tests/test-version-etc.c - tests/test-version-etc.sh - tests/test-wchar.c - tests/test-wcrtomb-w32-1.sh - tests/test-wcrtomb-w32-2.sh - tests/test-wcrtomb-w32-3.sh - tests/test-wcrtomb-w32-4.sh - tests/test-wcrtomb-w32-5.sh - tests/test-wcrtomb-w32.c - tests/test-wcrtomb.c - tests/test-wcrtomb.sh - tests/test-wctype-h.c - tests/test-wcwidth.c - tests/test-xalloc-die.c - tests/test-xalloc-die.sh - tests/test-xstrtol.c - tests/test-xstrtol.sh - tests/test-xstrtoul.c - tests/test-xstrtoumax.c - tests/test-xstrtoumax.sh - tests/test-yesno.c - tests/test-yesno.sh - tests/uniwidth/test-uc_width.c - tests/uniwidth/test-uc_width2.c - tests/uniwidth/test-uc_width2.sh - tests/zerosize-ptr.h - tests=lib/anytostr.c - tests=lib/binary-io.h - tests=lib/dup-safer-flag.c - tests=lib/fd-safer-flag.c - tests=lib/ftell.c - tests=lib/getpagesize.c - tests=lib/getugroups.c - tests=lib/getugroups.h - tests=lib/glthread/lock.c - tests=lib/glthread/lock.h - tests=lib/glthread/thread.c - tests=lib/glthread/thread.h - tests=lib/glthread/threadlib.c - tests=lib/glthread/yield.h - tests=lib/ignore-value.h - tests=lib/imaxtostr.c - tests=lib/inttostr.c - tests=lib/inttostr.h - tests=lib/localename.c - tests=lib/localename.h - tests=lib/mgetgroups.c - tests=lib/mgetgroups.h - tests=lib/offtostr.c - tests=lib/priv-set.c - tests=lib/priv-set.h - tests=lib/putenv.c - tests=lib/setlocale.c - tests=lib/sleep.c - tests=lib/symlink.c - tests=lib/symlinkat.c - tests=lib/uinttostr.c - tests=lib/umaxtostr.c - tests=lib/unlinkdir.c - tests=lib/unlinkdir.h - tests=lib/usleep.c - tests=lib/wctob.c - tests=lib/wctomb-impl.h - tests=lib/wctomb.c - top/GNUmakefile - top/maint.mk -]) diff --git a/gnulib/m4/group-member.m4 b/gnulib/m4/group-member.m4 deleted file mode 100644 index 5f7aa8a..0000000 --- a/gnulib/m4/group-member.m4 +++ /dev/null @@ -1,28 +0,0 @@ -# serial 12 - -# Copyright (C) 1999-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl Written by Jim Meyering - -AC_DEFUN([gl_FUNC_GROUP_MEMBER], -[ - dnl Persuade glibc to declare group_member(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - dnl Do this replacement check manually because I want the hyphen - dnl (not the underscore) in the filename. - AC_CHECK_FUNC([group_member], , [ - AC_LIBOBJ([group-member]) - gl_PREREQ_GROUP_MEMBER - ]) -]) - -# Prerequisites of lib/group-member.c. -AC_DEFUN([gl_PREREQ_GROUP_MEMBER], -[ - AC_REQUIRE([AC_FUNC_GETGROUPS]) -]) diff --git a/gnulib/m4/hash.m4 b/gnulib/m4/hash.m4 deleted file mode 100644 index 167c083..0000000 --- a/gnulib/m4/hash.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# hash.m4 serial 6 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_HASH], -[ - AC_LIBOBJ([hash]) - - dnl Prerequisites of lib/hash.c. - AC_REQUIRE([AM_STDBOOL_H]) -]) diff --git a/gnulib/m4/human.m4 b/gnulib/m4/human.m4 deleted file mode 100644 index 21c12f5..0000000 --- a/gnulib/m4/human.m4 +++ /dev/null @@ -1,13 +0,0 @@ -#serial 10 -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_HUMAN], -[ - AC_LIBOBJ([human]) - - dnl Prerequisites of lib/human.c. - : -]) diff --git a/gnulib/m4/i-ring.m4 b/gnulib/m4/i-ring.m4 deleted file mode 100644 index 838ccbb..0000000 --- a/gnulib/m4/i-ring.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# serial 1 -dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_I_RING], -[ - AC_LIBOBJ([i-ring]) -]) diff --git a/gnulib/m4/iconv.m4 b/gnulib/m4/iconv.m4 deleted file mode 100644 index e2041b9..0000000 --- a/gnulib/m4/iconv.m4 +++ /dev/null @@ -1,214 +0,0 @@ -# iconv.m4 serial 11 (gettext-0.18.1) -dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], -[ - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([iconv]) -]) - -AC_DEFUN([AM_ICONV_LINK], -[ - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and - dnl those with the standalone portable GNU libiconv installed). - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - - dnl Add $INCICONV to CPPFLAGS before performing the following checks, - dnl because if the user has installed libiconv and not disabled its use - dnl via --without-libiconv-prefix, he wants to use it. The first - dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. - am_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) - - AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - AC_TRY_LINK([#include -#include ], - [iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], - [am_cv_func_iconv=yes]) - if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - AC_TRY_LINK([#include -#include ], - [iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], - [am_cv_lib_iconv=yes] - [am_cv_func_iconv=yes]) - LIBS="$am_save_LIBS" - fi - ]) - if test "$am_cv_func_iconv" = yes; then - AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ - dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. - am_save_LIBS="$LIBS" - if test $am_cv_lib_iconv = yes; then - LIBS="$LIBS $LIBICONV" - fi - AC_TRY_RUN([ -#include -#include -int main () -{ - /* Test against AIX 5.1 bug: Failures are not distinguishable from successful - returns. */ - { - iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); - if (cd_utf8_to_88591 != (iconv_t)(-1)) - { - static const char input[] = "\342\202\254"; /* EURO SIGN */ - char buf[10]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_utf8_to_88591, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - return 1; - } - } - /* Test against Solaris 10 bug: Failures are not distinguishable from - successful returns. */ - { - iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); - if (cd_ascii_to_88591 != (iconv_t)(-1)) - { - static const char input[] = "\263"; - char buf[10]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_ascii_to_88591, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - return 1; - } - } -#if 0 /* This bug could be worked around by the caller. */ - /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ - { - iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); - if (cd_88591_to_utf8 != (iconv_t)(-1)) - { - static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; - char buf[50]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if ((int)res > 0) - return 1; - } - } -#endif - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - return 1; - return 0; -}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], - [case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac]) - LIBS="$am_save_LIBS" - ]) - case "$am_cv_func_iconv_works" in - *no) am_func_iconv=no am_cv_lib_iconv=no ;; - *) am_func_iconv=yes ;; - esac - else - am_func_iconv=no am_cv_lib_iconv=no - fi - if test "$am_func_iconv" = yes; then - AC_DEFINE([HAVE_ICONV], [1], - [Define if you have the iconv() function and it works.]) - fi - if test "$am_cv_lib_iconv" = yes; then - AC_MSG_CHECKING([how to link with libiconv]) - AC_MSG_RESULT([$LIBICONV]) - else - dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV - dnl either. - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi - AC_SUBST([LIBICONV]) - AC_SUBST([LTLIBICONV]) -]) - -dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to -dnl avoid warnings like -dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". -dnl This is tricky because of the way 'aclocal' is implemented: -dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. -dnl Otherwise aclocal's initial scan pass would miss the macro definition. -dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. -dnl Otherwise aclocal would emit many "Use of uninitialized value $1" -dnl warnings. -m4_define([gl_iconv_AC_DEFUN], - m4_version_prereq([2.64], - [[AC_DEFUN_ONCE( - [$1], [$2])]], - [[AC_DEFUN( - [$1], [$2])]])) -gl_iconv_AC_DEFUN([AM_ICONV], -[ - AM_ICONV_LINK - if test "$am_cv_func_iconv" = yes; then - AC_MSG_CHECKING([for iconv declaration]) - AC_CACHE_VAL([am_cv_proto_iconv], [ - AC_TRY_COMPILE([ -#include -#include -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif -], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) - am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - AC_MSG_RESULT([ - $am_cv_proto_iconv]) - AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], - [Define as const if the declaration of iconv() needs const.]) - fi -]) diff --git a/gnulib/m4/idcache.m4 b/gnulib/m4/idcache.m4 deleted file mode 100644 index 0650f50..0000000 --- a/gnulib/m4/idcache.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# idcache.m4 serial 6 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_IDCACHE], -[ - AC_LIBOBJ([idcache]) -]) diff --git a/gnulib/m4/include_next.m4 b/gnulib/m4/include_next.m4 deleted file mode 100644 index b3c7849..0000000 --- a/gnulib/m4/include_next.m4 +++ /dev/null @@ -1,244 +0,0 @@ -# include_next.m4 serial 18 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert and Derek Price. - -dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. -dnl -dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to -dnl 'include' otherwise. -dnl -dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler -dnl supports it in the special case that it is the first include directive in -dnl the given file, or to 'include' otherwise. -dnl -dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, -dnl so as to avoid GCC warnings when the gcc option -pedantic is used. -dnl '#pragma GCC system_header' has the same effect as if the file was found -dnl through the include search path specified with '-isystem' options (as -dnl opposed to the search path specified with '-I' options). Namely, gcc -dnl does not warn about some things, and on some systems (Solaris and Interix) -dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side -dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead -dnl of plain '__STDC__'. -dnl -dnl PRAGMA_COLUMNS can be used in files that override system header files, so -dnl as to avoid compilation errors on HP NonStop systems when the gnulib file -dnl is included by a system header file that does a "#pragma COLUMNS 80" (which -dnl has the effect of truncating the lines of that file and all files that it -dnl includes to 80 columns) and the gnulib file has lines longer than 80 -dnl columns. - -AC_DEFUN([gl_INCLUDE_NEXT], -[ - AC_LANG_PREPROC_REQUIRE() - AC_CACHE_CHECK([whether the preprocessor supports include_next], - [gl_cv_have_include_next], - [rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on - dnl AIX 6.1 support include_next when used as first preprocessor directive - dnl in a file, but not when preceded by another include directive. Check - dnl for this bug by including . - dnl Additionally, with this same compiler, include_next is a no-op when - dnl used in a header file that was included by specifying its absolute - dnl file name. Despite these two bugs, include_next is used in the - dnl compiler's . By virtue of the second bug, we need to use - dnl include_next as well in this case. - cat < conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" -#endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" -dnl We intentionally avoid using AC_LANG_SOURCE here. - AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], - [gl_cv_have_include_next=yes], - [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], - [gl_cv_have_include_next=buggy], - [gl_cv_have_include_next=no]) - ]) - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 - ]) - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi - fi - AC_SUBST([INCLUDE_NEXT]) - AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) - AC_SUBST([PRAGMA_SYSTEM_HEADER]) - AC_CACHE_CHECK([whether system header files limit the line length], - [gl_cv_pragma_columns], - [dnl HP NonStop systems, which define __TANDEM, have this misfeature. - AC_EGREP_CPP([choke me], - [ -#ifdef __TANDEM -choke me -#endif - ], - [gl_cv_pragma_columns=yes], - [gl_cv_pragma_columns=no]) - ]) - if test $gl_cv_pragma_columns = yes; then - PRAGMA_COLUMNS="#pragma COLUMNS 10000" - else - PRAGMA_COLUMNS= - fi - AC_SUBST([PRAGMA_COLUMNS]) -]) - -# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) -# ------------------------------------------ -# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be -# ''; otherwise define it to be -# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. -# Also, if #include_next works as first preprocessing directive in a file, -# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to -# be -# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. -# That way, a header file with the following line: -# #@INCLUDE_NEXT@ @NEXT_FOO_H@ -# or -# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ -# behaves (after sed substitution) as if it contained -# #include_next -# even if the compiler does not support include_next. -# The three "///" are to pacify Sun C 5.8, which otherwise would say -# "warning: #include of /usr/include/... may be non-portable". -# Use `""', not `<>', so that the /// cannot be confused with a C99 comment. -# Note: This macro assumes that the header file is not empty after -# preprocessing, i.e. it does not only define preprocessor macros but also -# provides some type/enum definitions or function/variable declarations. -# -# This macro also checks whether each header exists, by invoking -# AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument. -AC_DEFUN([gl_CHECK_NEXT_HEADERS], -[ - gl_NEXT_HEADERS_INTERNAL([$1], [check]) -]) - -# gl_NEXT_HEADERS(HEADER1 HEADER2 ...) -# ------------------------------------ -# Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist. -# This is suitable for headers like that are standardized by C89 -# and therefore can be assumed to exist. -AC_DEFUN([gl_NEXT_HEADERS], -[ - gl_NEXT_HEADERS_INTERNAL([$1], [assume]) -]) - -# The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. -AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], -[ - AC_REQUIRE([gl_INCLUDE_NEXT]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - m4_if([$2], [check], - [AC_CHECK_HEADERS_ONCE([$1]) - ]) - - m4_foreach_w([gl_HEADER_NAME], [$1], - [AS_VAR_PUSHDEF([gl_next_header], - [gl_cv_next_]m4_defn([gl_HEADER_NAME])) - if test $gl_cv_have_include_next = yes; then - AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) - else - AC_CACHE_CHECK( - [absolute name of <]m4_defn([gl_HEADER_NAME])[>], - m4_defn([gl_next_header]), - [m4_if([$2], [check], - [AS_VAR_PUSHDEF([gl_header_exists], - [ac_cv_header_]m4_defn([gl_HEADER_NAME])) - if test AS_VAR_GET(gl_header_exists) = yes; then - AS_VAR_POPDEF([gl_header_exists]) - ]) - AC_LANG_CONFTEST( - [AC_LANG_SOURCE( - [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] - )]) - dnl AIX "xlc -E" and "cc -E" omit #line directives for header - dnl files that contain only a #include of other header files and - dnl no non-comment tokens of their own. This leads to a failure - dnl to detect the absolute name of , , - dnl and others. The workaround is to force preservation - dnl of comments through option -C. This ensures all necessary - dnl #line directives are present. GCC supports option -C as well. - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - dnl eval is necessary to expand gl_absname_cpp. - dnl Ultrix and Pyramid sh refuse to redirect output of eval, - dnl so use subshell. - AS_VAR_SET([gl_next_header], - ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | - sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ - s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"']) - m4_if([$2], [check], - [else - AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) - fi - ]) - ]) - fi - AC_SUBST( - AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), - [AS_VAR_GET([gl_next_header])]) - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'gl_HEADER_NAME'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=AS_VAR_GET([gl_next_header]) - fi - AC_SUBST( - AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), - [$gl_next_as_first_directive]) - AS_VAR_POPDEF([gl_next_header])]) -]) - -# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; -# this fallback is safe for all earlier autoconf versions. -m4_define_default([AC_LANG_DEFINES_PROVIDED]) diff --git a/gnulib/m4/inline.m4 b/gnulib/m4/inline.m4 deleted file mode 100644 index a459080..0000000 --- a/gnulib/m4/inline.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# inline.m4 serial 4 -dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Test for the 'inline' keyword or equivalent. -dnl Define 'inline' to a supported equivalent, or to nothing if not supported, -dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an -dnl equivalent is effectively supported, i.e. if the compiler is likely to -dnl drop unused 'static inline' functions. -AC_DEFUN([gl_INLINE], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_CACHE_CHECK([whether the compiler generally respects inline], - [gl_cv_c_inline_effective], - [if test $ac_cv_c_inline = no; then - gl_cv_c_inline_effective=no - else - dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is - dnl specified. - dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result - dnl depends on optimization flags, which can be in CFLAGS. - dnl (AC_EGREP_CPP looks only at the CPPFLAGS.) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[]], - [[#ifdef __NO_INLINE__ - #error "inline is not effective" - #endif]])], - [gl_cv_c_inline_effective=yes], - [gl_cv_c_inline_effective=no]) - fi - ]) - if test $gl_cv_c_inline_effective = yes; then - AC_DEFINE([HAVE_INLINE], [1], - [Define to 1 if the compiler supports one of the keywords - 'inline', '__inline__', '__inline' and effectively inlines - functions marked as such.]) - fi -]) diff --git a/gnulib/m4/intlmacosx.m4 b/gnulib/m4/intlmacosx.m4 deleted file mode 100644 index 51f8547..0000000 --- a/gnulib/m4/intlmacosx.m4 +++ /dev/null @@ -1,56 +0,0 @@ -# intlmacosx.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2004-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -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 Defines INTL_MACOSX_LIBS. -AC_DEFUN([gt_INTL_MACOSX], -[ - dnl Check for API introduced in MacOS X 10.2. - AC_CACHE_CHECK([for CFPreferencesCopyAppValue], - [gt_cv_func_CFPreferencesCopyAppValue], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[CFPreferencesCopyAppValue(NULL, NULL)]])], - [gt_cv_func_CFPreferencesCopyAppValue=yes], - [gt_cv_func_CFPreferencesCopyAppValue=no]) - 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.]) - fi - dnl Check for API introduced in MacOS X 10.3. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[CFLocaleCopyCurrent();]])], - [gt_cv_func_CFLocaleCopyCurrent=yes], - [gt_cv_func_CFLocaleCopyCurrent=no]) - 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.]) - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - AC_SUBST([INTL_MACOSX_LIBS]) -]) diff --git a/gnulib/m4/intmax_t.m4 b/gnulib/m4/intmax_t.m4 deleted file mode 100644 index 7341054..0000000 --- a/gnulib/m4/intmax_t.m4 +++ /dev/null @@ -1,67 +0,0 @@ -# intmax_t.m4 serial 8 -dnl Copyright (C) 1997-2004, 2006-2007, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -AC_PREREQ([2.53]) - -# Define intmax_t to 'long' or 'long long' -# if it is not already defined in or . - -AC_DEFUN([gl_AC_TYPE_INTMAX_T], -[ - dnl For simplicity, we assume that a header file defines 'intmax_t' if and - dnl only if it defines 'uintmax_t'. - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - test $ac_cv_type_long_long_int = yes \ - && ac_type='long long' \ - || ac_type='long' - AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], - [Define to long or long long if and don't define.]) - else - AC_DEFINE([HAVE_INTMAX_T], [1], - [Define if you have the 'intmax_t' type in or .]) - fi -]) - -dnl An alternative would be to explicitly test for 'intmax_t'. - -AC_DEFUN([gt_AC_TYPE_INTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include -#if HAVE_STDINT_H_WITH_UINTMAX -#include -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include -#endif - ]], - [[intmax_t x = -1; return !x;]])], - [gt_cv_c_intmax_t=yes], - [gt_cv_c_intmax_t=no])]) - if test $gt_cv_c_intmax_t = yes; then - AC_DEFINE([HAVE_INTMAX_T], [1], - [Define if you have the 'intmax_t' type in or .]) - else - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - test $ac_cv_type_long_long_int = yes \ - && ac_type='long long' \ - || ac_type='long' - AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], - [Define to long or long long if and don't define.]) - fi -]) diff --git a/gnulib/m4/inttostr.m4 b/gnulib/m4/inttostr.m4 deleted file mode 100644 index b9875c9..0000000 --- a/gnulib/m4/inttostr.m4 +++ /dev/null @@ -1,32 +0,0 @@ -#serial 8 -dnl Copyright (C) 2004-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_INTTOSTR], -[ - gl_PREREQ_INTTOSTR - gl_PREREQ_IMAXTOSTR - gl_PREREQ_OFFTOSTR - gl_PREREQ_UMAXTOSTR - gl_PREREQ_UINTTOSTR -]) - -# Prerequisites of lib/inttostr.h. -AC_DEFUN([gl_PREREQ_INTTOSTR], [ - AC_REQUIRE([AC_TYPE_OFF_T]) - : -]) - -# Prerequisites of lib/imaxtostr.c. -AC_DEFUN([gl_PREREQ_IMAXTOSTR], [:]) - -# Prerequisites of lib/offtostr.c. -AC_DEFUN([gl_PREREQ_OFFTOSTR], [:]) - -# Prerequisites of lib/umaxtostr.c. -AC_DEFUN([gl_PREREQ_UMAXTOSTR], [:]) - -# Prerequisites of lib/uinttostr.c. -AC_DEFUN([gl_PREREQ_UINTTOSTR], [:]) diff --git a/gnulib/m4/inttypes-pri.m4 b/gnulib/m4/inttypes-pri.m4 deleted file mode 100644 index e252b27..0000000 --- a/gnulib/m4/inttypes-pri.m4 +++ /dev/null @@ -1,42 +0,0 @@ -# inttypes-pri.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1997-2002, 2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_PREREQ([2.53]) - -# Define PRI_MACROS_BROKEN if exists and defines the PRI* -# macros to non-string values. This is the case on AIX 4.3.3. - -AC_DEFUN([gt_INTTYPES_PRI], -[ - AC_CHECK_HEADERS([inttypes.h]) - if test $ac_cv_header_inttypes_h = yes; then - AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], - [gt_cv_inttypes_pri_broken], - [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#ifdef PRId32 -char *p = PRId32; -#endif - ]], - [[]])], - [gt_cv_inttypes_pri_broken=no], - [gt_cv_inttypes_pri_broken=yes]) - ]) - fi - if test "$gt_cv_inttypes_pri_broken" = yes; then - AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], - [Define if exists and defines unusable PRI* macros.]) - PRI_MACROS_BROKEN=1 - else - PRI_MACROS_BROKEN=0 - fi - AC_SUBST([PRI_MACROS_BROKEN]) -]) diff --git a/gnulib/m4/inttypes.m4 b/gnulib/m4/inttypes.m4 deleted file mode 100644 index 92a4ac0..0000000 --- a/gnulib/m4/inttypes.m4 +++ /dev/null @@ -1,302 +0,0 @@ -# inttypes.m4 serial 18 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Derek Price, Bruno Haible. -dnl Test whether is supported or must be substituted. - -AC_DEFUN([gl_INTTYPES_H], -[ - AC_REQUIRE([gl_STDINT_H]) - AC_REQUIRE([gt_INTTYPES_PRI]) - AC_CHECK_HEADERS_ONCE([inttypes.h]) - AC_CHECK_DECLS_ONCE([imaxabs]) - AC_CHECK_DECLS_ONCE([imaxdiv]) - AC_CHECK_DECLS_ONCE([strtoimax]) - AC_CHECK_DECLS_ONCE([strtoumax]) - - dnl Now see if we need a substitute . - dnl A complete requires - dnl - a complete , - dnl - the existence of an , - dnl - that imaxabs, imaxdiv, strtoimax, strtoumax are declared, - dnl - some additional tests. - AC_CACHE_CHECK([whether inttypes.h conforms to C99], - [gl_cv_header_working_inttypes_h], - [gl_cv_header_working_inttypes_h=no - if test "$gl_cv_header_working_stdint_h" = yes \ - && test $ac_cv_header_inttypes_h = yes \ - && test "$ac_cv_have_decl_imaxabs" = yes \ - && test "$ac_cv_have_decl_imaxdiv" = yes \ - && test "$ac_cv_have_decl_strtoimax" = yes \ - && test "$ac_cv_have_decl_strtoumax" = yes; then - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#include -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */ -#include - -/* No need to duplicate the tests of stdint.m4; they are subsumed by - $gl_cv_header_working_stdint_h = yes. */ - -/* Tests for macros supposed to be defined in inttypes.h. */ - -const char *k = /* implicit string concatenation */ -#ifdef INT8_MAX - PRId8 PRIi8 -#endif -#ifdef UINT8_MAX - PRIo8 PRIu8 PRIx8 PRIX8 -#endif -#ifdef INT16_MAX - PRId16 PRIi16 -#endif -#ifdef UINT16_MAX - PRIo16 PRIu16 PRIx16 PRIX16 -#endif -#ifdef INT32_MAX - PRId32 PRIi32 -#endif -#ifdef UINT32_MAX - PRIo32 PRIu32 PRIx32 PRIX32 -#endif -#ifdef INT64_MAX - PRId64 PRIi64 -#endif -#ifdef UINT64_MAX - PRIo64 PRIu64 PRIx64 PRIX64 -#endif - PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8 - PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16 - PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32 - PRIdLEAST64 PRIiLEAST64 - PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64 - PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8 - PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16 - PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32 - PRIdFAST64 PRIiFAST64 - PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64 - PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX -#ifdef INTPTR_MAX - PRIdPTR PRIiPTR -#endif -#ifdef UINTPTR_MAX - PRIoPTR PRIuPTR PRIxPTR PRIXPTR -#endif - ; -const char *l = /* implicit string concatenation */ -#ifdef INT8_MAX - SCNd8 SCNi8 -#endif -#ifdef UINT8_MAX - SCNo8 SCNu8 SCNx8 -#endif -#ifdef INT16_MAX - SCNd16 SCNi16 -#endif -#ifdef UINT16_MAX - SCNo16 SCNu16 SCNx16 -#endif -#ifdef INT32_MAX - SCNd32 SCNi32 -#endif -#ifdef UINT32_MAX - SCNo32 SCNu32 SCNx32 -#endif -#ifdef INT64_MAX - SCNd64 SCNi64 -#endif -#ifdef UINT64_MAX - SCNo64 SCNu64 SCNx64 -#endif - SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8 - SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16 - SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32 - SCNdLEAST64 SCNiLEAST64 - SCNoLEAST64 SCNuLEAST64 SCNxLEAST64 - SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8 - SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16 - SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32 - SCNdFAST64 SCNiFAST64 - SCNoFAST64 SCNuFAST64 SCNxFAST64 - SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX -#ifdef INTPTR_MAX - SCNdPTR SCNiPTR -#endif -#ifdef UINTPTR_MAX - SCNoPTR SCNuPTR SCNxPTR -#endif - ; - ]])], - [gl_cv_header_working_inttypes_h=yes]) - fi]) - - dnl Override always, so that the portability warnings work. - AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) - gl_CHECK_NEXT_HEADERS([inttypes.h]) - - AC_REQUIRE([gl_MULTIARCH]) - - dnl Ensure that defines the limit macros, since gnulib's - dnl relies on them. This macro is only needed when a - dnl C++ compiler is in use; it has no effect for a C compiler. - dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's - dnl is going to be created, and to avoid redefinition warnings - dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS. - AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1], - [Define to make the limit macros in visible.]) - AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ], -[/* Ensure that defines the limit macros, since gnulib's - relies on them. */ -#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -#endif -]) - - PRIPTR_PREFIX= - if test -n "$STDINT_H"; then - dnl Using the gnulib . It always defines intptr_t to 'long'. - PRIPTR_PREFIX='"l"' - else - dnl Using the system's . - for glpfx in '' l ll I64; do - case $glpfx in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - I64) gltype1='__int64';; - esac - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include - extern intptr_t foo; - extern $gltype1 foo;]])], - [PRIPTR_PREFIX='"'$glpfx'"']) - test -n "$PRIPTR_PREFIX" && break - done - fi - AC_SUBST([PRIPTR_PREFIX]) - - if test "$ac_cv_have_decl_imaxabs" = yes; then - HAVE_DECL_IMAXABS=1 - else - HAVE_DECL_IMAXABS=0 - fi - - if test "$ac_cv_have_decl_imaxdiv" = yes; then - HAVE_DECL_IMAXDIV=1 - else - HAVE_DECL_IMAXDIV=0 - fi - - if test "$ac_cv_have_decl_strtoimax" = yes; then - HAVE_DECL_STRTOIMAX=1 - else - HAVE_DECL_STRTOIMAX=0 - fi - - if test "$ac_cv_have_decl_strtoumax" = yes; then - HAVE_DECL_STRTOUMAX=1 - else - HAVE_DECL_STRTOUMAX=0 - fi - - gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( - [INT32_MAX_LT_INTMAX_MAX], - [defined INT32_MAX && defined INTMAX_MAX], - [INT32_MAX < INTMAX_MAX], - [sizeof (int) < sizeof (long long int)]) - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( - [INT64_MAX_EQ_LONG_MAX], - [defined INT64_MAX], - [INT64_MAX == LONG_MAX], - [sizeof (long long int) == sizeof (long int)]) - else - INT64_MAX_EQ_LONG_MAX=-1 - fi - gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( - [UINT32_MAX_LT_UINTMAX_MAX], - [defined UINT32_MAX && defined UINTMAX_MAX], - [UINT32_MAX < UINTMAX_MAX], - [sizeof (unsigned int) < sizeof (unsigned long long int)]) - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION( - [UINT64_MAX_EQ_ULONG_MAX], - [defined UINT64_MAX], - [UINT64_MAX == ULONG_MAX], - [sizeof (unsigned long long int) == sizeof (unsigned long int)]) - else - UINT64_MAX_EQ_ULONG_MAX=-1 - fi - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [imaxabs imaxdiv strtoimax strtoumax]) -]) - -# Define the symbol $1 to be 1 if the condition is true, 0 otherwise. -# If $2 is true, the condition is $3; otherwise if long long int is supported -# approximate the condition with $4; otherwise, assume the condition is false. -# The condition should work on all C99 platforms; the approximations should be -# good enough to work on all practical pre-C99 platforms. -# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. -AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], -[ - AC_CACHE_CHECK([whether $3], - [gl_cv_test_$1], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[/* Work also in C++ mode. */ - #define __STDC_LIMIT_MACROS 1 - - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H - - #include - #if HAVE_STDINT_H - #include - #endif - - #if $2 - #define CONDITION ($3) - #elif HAVE_LONG_LONG_INT - #define CONDITION ($4) - #else - #define CONDITION 0 - #endif - int test[CONDITION ? 1 : -1];]])], - [gl_cv_test_$1=yes], - [gl_cv_test_$1=no])]) - if test $gl_cv_test_$1 = yes; then - $1=1; - else - $1=0; - fi - AC_SUBST([$1]) -]) - -AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_INTTYPES_H_DEFAULTS], -[ - GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS]) - GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV]) - GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX]) - GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS]) - HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) - HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) - HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) -]) diff --git a/gnulib/m4/inttypes_h.m4 b/gnulib/m4/inttypes_h.m4 deleted file mode 100644 index f10fd54..0000000 --- a/gnulib/m4/inttypes_h.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# inttypes_h.m4 serial 10 -dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, -# doesn't clash with , and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include - ]], - [[uintmax_t i = (uintmax_t) -1; return !i;]])], - [gl_cv_header_inttypes_h=yes], - [gl_cv_header_inttypes_h=no])]) - if test $gl_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], - [Define if exists, doesn't clash with , - and declares uintmax_t. ]) - fi -]) diff --git a/gnulib/m4/isblank.m4 b/gnulib/m4/isblank.m4 deleted file mode 100644 index 771deef..0000000 --- a/gnulib/m4/isblank.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# isblank.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_ISBLANK], -[ - dnl Persuade glibc to declare isblank(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gl_CTYPE_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([isblank]) - if test $ac_cv_func_isblank = no; then - HAVE_ISBLANK=0 - AC_LIBOBJ([isblank]) - fi -]) diff --git a/gnulib/m4/iswblank.m4 b/gnulib/m4/iswblank.m4 deleted file mode 100644 index 38641ff..0000000 --- a/gnulib/m4/iswblank.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# iswblank.m4 serial 2 -dnl Copyright (C) 2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_ISWBLANK], -[ - AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) - AC_REQUIRE([gl_WCTYPE_H]) - dnl Persuade glibc to declare iswblank(). - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([iswblank]) - AC_CHECK_DECLS_ONCE([iswblank]) - if test $ac_cv_func_iswblank = no; then - HAVE_ISWBLANK=0 - if test $ac_cv_have_decl_iswblank = yes; then - REPLACE_ISWBLANK=1 - fi - fi - if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then - dnl Redefine all of iswcntrl, ..., towupper in . - : - else - if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then - dnl Redefine only iswblank. - AC_LIBOBJ([iswblank]) - fi - fi - -]) diff --git a/gnulib/m4/langinfo_h.m4 b/gnulib/m4/langinfo_h.m4 deleted file mode 100644 index 4cced8a..0000000 --- a/gnulib/m4/langinfo_h.m4 +++ /dev/null @@ -1,105 +0,0 @@ -# langinfo_h.m4 serial 7 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_LANGINFO_H], -[ - AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) - - dnl Persuade glibc-2.0.6 to define CODESET. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_CHECK_NEXT_HEADERS([langinfo.h]) - - dnl Determine whether exists. It is missing on mingw and BeOS. - HAVE_LANGINFO_CODESET=0 - HAVE_LANGINFO_T_FMT_AMPM=0 - HAVE_LANGINFO_ERA=0 - HAVE_LANGINFO_YESEXPR=0 - AC_CHECK_HEADERS_ONCE([langinfo.h]) - if test $ac_cv_header_langinfo_h = yes; then - HAVE_LANGINFO_H=1 - dnl Determine what defines. CODESET and ERA etc. are missing - dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3. - AC_CACHE_CHECK([whether langinfo.h defines CODESET], - [gl_cv_header_langinfo_codeset], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include -int a = CODESET; -]])], - [gl_cv_header_langinfo_codeset=yes], - [gl_cv_header_langinfo_codeset=no]) - ]) - if test $gl_cv_header_langinfo_codeset = yes; then - HAVE_LANGINFO_CODESET=1 - fi - AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM], - [gl_cv_header_langinfo_t_fmt_ampm], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include -int a = T_FMT_AMPM; -]])], - [gl_cv_header_langinfo_t_fmt_ampm=yes], - [gl_cv_header_langinfo_t_fmt_ampm=no]) - ]) - if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then - HAVE_LANGINFO_T_FMT_AMPM=1 - fi - AC_CACHE_CHECK([whether langinfo.h defines ERA], - [gl_cv_header_langinfo_era], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include -int a = ERA; -]])], - [gl_cv_header_langinfo_era=yes], - [gl_cv_header_langinfo_era=no]) - ]) - if test $gl_cv_header_langinfo_era = yes; then - HAVE_LANGINFO_ERA=1 - fi - AC_CACHE_CHECK([whether langinfo.h defines YESEXPR], - [gl_cv_header_langinfo_yesexpr], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include -int a = YESEXPR; -]])], - [gl_cv_header_langinfo_yesexpr=yes], - [gl_cv_header_langinfo_yesexpr=no]) - ]) - if test $gl_cv_header_langinfo_yesexpr = yes; then - HAVE_LANGINFO_YESEXPR=1 - fi - else - HAVE_LANGINFO_H=0 - fi - AC_SUBST([HAVE_LANGINFO_H]) - AC_SUBST([HAVE_LANGINFO_CODESET]) - AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM]) - AC_SUBST([HAVE_LANGINFO_ERA]) - AC_SUBST([HAVE_LANGINFO_YESEXPR]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [nl_langinfo]) -]) - -AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_LANGINFO_H_DEFAULTS], -[ - GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO]) - REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO]) -]) diff --git a/gnulib/m4/lchown.m4 b/gnulib/m4/lchown.m4 deleted file mode 100644 index b567d81..0000000 --- a/gnulib/m4/lchown.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# serial 15 -# Determine whether we need the lchown wrapper. - -dnl Copyright (C) 1998, 2001, 2003-2007, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. -dnl Provide lchown on systems that lack it, and work around bugs -dnl on systems that have it. - -AC_DEFUN([gl_FUNC_LCHOWN], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([gl_FUNC_CHOWN]) - AC_CHECK_FUNCS_ONCE([lchmod]) - AC_REPLACE_FUNCS([lchown]) - if test $ac_cv_func_lchown = no; then - HAVE_LCHOWN=0 - elif test "$gl_cv_func_chown_slash_works" != yes \ - || test "$gl_cv_func_chown_ctime_works" != yes; then - dnl Trailing slash and ctime bugs in chown also occur in lchown. - AC_LIBOBJ([lchown]) - REPLACE_LCHOWN=1 - fi -]) diff --git a/gnulib/m4/lcmessage.m4 b/gnulib/m4/lcmessage.m4 deleted file mode 100644 index baf41c5..0000000 --- a/gnulib/m4/lcmessage.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# lcmessage.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1995-2002, 2004-2005, 2008-2011 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, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -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 Authors: -dnl Ulrich Drepper , 1995. - -# Check whether LC_MESSAGES is available in . - -AC_DEFUN([gt_LC_MESSAGES], -[ - AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[return LC_MESSAGES]])], - [gt_cv_val_LC_MESSAGES=yes], - [gt_cv_val_LC_MESSAGES=no])]) - if test $gt_cv_val_LC_MESSAGES = yes; then - AC_DEFINE([HAVE_LC_MESSAGES], [1], - [Define if your file defines LC_MESSAGES.]) - fi -]) diff --git a/gnulib/m4/lib-ld.m4 b/gnulib/m4/lib-ld.m4 deleted file mode 100644 index ae003f7..0000000 --- a/gnulib/m4/lib-ld.m4 +++ /dev/null @@ -1,109 +0,0 @@ -# lib-ld.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -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 From libtool-1.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. -case `$LD -v 2>&1 /dev/null 2>&1 \ - && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - || 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]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - 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 - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL([acl_cv_path_LD], -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - 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. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; - esac - fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$acl_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT([$LD]) -else - AC_MSG_RESULT([no]) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_LIB_PROG_LD_GNU -]) diff --git a/gnulib/m4/lib-link.m4 b/gnulib/m4/lib-link.m4 deleted file mode 100644 index e7c9ba9..0000000 --- a/gnulib/m4/lib-link.m4 +++ /dev/null @@ -1,777 +0,0 @@ -# lib-link.m4 serial 26 (gettext-0.18.2) -dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_PREREQ([2.54]) - -dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and -dnl augments the CPPFLAGS variable. -dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[m4_translit([$1],[./+-], [____])]) - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - ac_cv_lib[]Name[]_libs="$LIB[]NAME" - ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" - ac_cv_lib[]Name[]_cppflags="$INC[]NAME" - ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" - ]) - LIB[]NAME="$ac_cv_lib[]Name[]_libs" - LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" - INC[]NAME="$ac_cv_lib[]Name[]_cppflags" - LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - AC_SUBST([LIB]NAME[_PREFIX]) - dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the - dnl results of this search when this library appears as a dependency. - HAVE_LIB[]NAME=yes - popdef([NAME]) - popdef([Name]) -]) - -dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) -dnl searches for libname and the libraries corresponding to explicit and -dnl implicit dependencies, together with the specified include files and -dnl the ability to compile and link the specified testcode. The missing-message -dnl defaults to 'no' and may contain additional hints for the user. -dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} -dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and -dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs -dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. -dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[m4_translit([$1],[./+-], [____])]) - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - - dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - - dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, - dnl because if the user has installed lib[]Name and not disabled its use - dnl via --without-lib[]Name-prefix, he wants to use it. - ac_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - - AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ - ac_save_LIBS="$LIBS" - dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, - dnl because these -l options might require -L options that are present in - dnl LIBS. -l options benefit only from the -L options listed before it. - dnl Otherwise, add it to the front of LIBS, because it may be a static - dnl library that depends on another static library that is present in LIBS. - dnl Static libraries benefit only from the static libraries listed after - dnl it. - case " $LIB[]NAME" in - *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; - *) LIBS="$LIB[]NAME $LIBS" ;; - esac - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[$3]], [[$4]])], - [ac_cv_lib[]Name=yes], - [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) - LIBS="$ac_save_LIBS" - ]) - if test "$ac_cv_lib[]Name" = yes; then - HAVE_LIB[]NAME=yes - AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) - AC_MSG_CHECKING([how to link with lib[]$1]) - AC_MSG_RESULT([$LIB[]NAME]) - else - HAVE_LIB[]NAME=no - dnl If $LIB[]NAME didn't lead to a usable library, we don't need - dnl $INC[]NAME either. - CPPFLAGS="$ac_save_CPPFLAGS" - LIB[]NAME= - LTLIB[]NAME= - LIB[]NAME[]_PREFIX= - fi - AC_SUBST([HAVE_LIB]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - AC_SUBST([LIB]NAME[_PREFIX]) - popdef([NAME]) - popdef([Name]) -]) - -dnl Determine the platform dependent parameters needed to use rpath: -dnl acl_libext, -dnl acl_shlibext, -dnl acl_libname_spec, -dnl acl_library_names_spec, -dnl acl_hardcode_libdir_flag_spec, -dnl acl_hardcode_libdir_separator, -dnl acl_hardcode_direct, -dnl acl_hardcode_minus_L. -AC_DEFUN([AC_LIB_RPATH], -[ - dnl Tell automake >= 1.10 to complain if config.rpath is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) - AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS - AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld - AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host - AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir - AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - ]) - wl="$acl_cv_wl" - acl_libext="$acl_cv_libext" - acl_shlibext="$acl_cv_shlibext" - acl_libname_spec="$acl_cv_libname_spec" - acl_library_names_spec="$acl_cv_library_names_spec" - acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - acl_hardcode_direct="$acl_cv_hardcode_direct" - acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" - dnl Determine whether the user wants rpath handling at all. - AC_ARG_ENABLE([rpath], - [ --disable-rpath do not hardcode runtime library paths], - :, enable_rpath=yes) -]) - -dnl AC_LIB_FROMPACKAGE(name, package) -dnl declares that libname comes from the given package. The configure file -dnl will then not have a --with-libname-prefix option but a -dnl --with-package-prefix option. Several libraries can come from the same -dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar -dnl macro call that searches for libname. -AC_DEFUN([AC_LIB_FROMPACKAGE], -[ - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - define([acl_frompackage_]NAME, [$2]) - popdef([NAME]) - pushdef([PACK],[$2]) - pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - define([acl_libsinpackage_]PACKUP, - m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) - popdef([PACKUP]) - popdef([PACK]) -]) - -dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. -dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found -dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_LINKFLAGS_BODY], -[ - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) - pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) - dnl Autoconf >= 2.61 supports dots in --with options. - pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_ARG_WITH(P_A_C_K[-prefix], -[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi - fi - fi -]) - dnl Search the library and its dependencies in $additional_libdir and - dnl $LDFLAGS. Using breadth-first-seach. - LIB[]NAME= - LTLIB[]NAME= - INC[]NAME= - LIB[]NAME[]_PREFIX= - dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been - dnl computed. So it has to be reset here. - HAVE_LIB[]NAME= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='$1 $2' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - dnl See if it was already located by an earlier AC_LIB_LINKFLAGS - dnl or AC_LIB_HAVE_LINKFLAGS call. - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" - else - dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined - dnl that this library doesn't exist. So just drop it. - : - fi - else - dnl Search the library lib$name in $additional_libdir and $LDFLAGS - dnl and the already constructed $LIBNAME/$LTLIBNAME. - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - dnl The same code as in the loop below: - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - dnl Found the library. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - dnl Linking with a shared library. We attempt to hardcode its - dnl directory into the executable's runpath, unless it's the - dnl standard /usr/lib. - if test "$enable_rpath" = no \ - || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then - dnl No hardcoding is needed. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - dnl The hardcoding into $LIBNAME is system dependent. - if test "$acl_hardcode_direct" = yes; then - dnl Using DIR/libNAME.so during linking hardcodes DIR into the - dnl resulting binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - dnl Rely on "-L$found_dir". - dnl But don't add it if it's already contained in the LDFLAGS - dnl or the already constructed $LIBNAME - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH - dnl here, because this doesn't fit in flags passed to the - dnl compiler. So give up. No hardcoding. This affects only - dnl very old systems. - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - dnl Linking with a static library. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" - else - dnl We shouldn't come here, but anyway it's good to have a - dnl fallback. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" - fi - fi - dnl Assume the include files are nearby. - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - if test "$name" = '$1'; then - LIB[]NAME[]_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - */$acl_libdirstem2 | */$acl_libdirstem2/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - if test "$name" = '$1'; then - LIB[]NAME[]_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - dnl Potentially add $additional_includedir to $INCNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's /usr/local/include and we are using GCC on Linux, - dnl 3. if it's already present in $CPPFLAGS or the already - dnl constructed $INCNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INC[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $INCNAME. - INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - dnl Look for dependencies. - if test -n "$found_la"; then - dnl Read the .la file. It defines the variables - dnl dlname, library_names, old_library, dependency_libs, current, - dnl age, revision, installed, dlopen, dlpreopen, libdir. - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - dnl We use only dependency_libs. - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's /usr/local/lib and we are using GCC on Linux, - dnl 3. if it's already present in $LDFLAGS or the already - dnl constructed $LIBNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LIBNAME. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LTLIBNAME. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - dnl Handle this in the next round. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - dnl Handle this in the next round. Throw away the .la's - dnl directory; it is already contained in a preceding -L - dnl option. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - dnl Most likely an immediate library name. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" - ;; - esac - done - fi - else - dnl Didn't find the library; assume it is in the system directories - dnl known to the linker and runtime loader. (All the system - dnl directories known to the linker should also be known to the - dnl runtime loader, otherwise the system is severely misconfigured.) - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user must - dnl pass all path elements in one option. We can arrange that for a - dnl single library, but not when more than one $LIBNAMEs are used. - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - else - dnl The -rpath options are cumulative. - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - dnl When using libtool, the option that works for both libraries and - dnl executables is -R. The -R options are cumulative. - for found_dir in $ltrpathdirs; do - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" - done - fi - popdef([P_A_C_K]) - popdef([PACKLIBS]) - popdef([PACKUP]) - popdef([PACK]) - popdef([NAME]) -]) - -dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, -dnl unless already present in VAR. -dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes -dnl contains two or three consecutive elements that belong together. -AC_DEFUN([AC_LIB_APPENDTOVAR], -[ - for element in [$2]; do - haveit= - for x in $[$1]; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - [$1]="${[$1]}${[$1]:+ }$element" - fi - done -]) - -dnl For those cases where a variable contains several -L and -l options -dnl referring to unknown libraries and directories, this macro determines the -dnl necessary additional linker options for the runtime path. -dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) -dnl sets LDADDVAR to linker options needed together with LIBSVALUE. -dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, -dnl otherwise linking without libtool is assumed. -AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], -[ - AC_REQUIRE([AC_LIB_RPATH]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - $1= - if test "$enable_rpath" != no; then - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode directories into the resulting - dnl binary. - rpathdirs= - next= - for opt in $2; do - if test -n "$next"; then - dir="$next" - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then - rpathdirs="$rpathdirs $dir" - fi - next= - else - case $opt in - -L) next=yes ;; - -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then - rpathdirs="$rpathdirs $dir" - fi - next= ;; - *) next= ;; - esac - fi - done - if test "X$rpathdirs" != "X"; then - if test -n ""$3""; then - dnl libtool is used for linking. Use -R options. - for dir in $rpathdirs; do - $1="${$1}${$1:+ }-R$dir" - done - else - dnl The linker is used for linking directly. - if test -n "$acl_hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user - dnl must pass all path elements in one option. - alldirs= - for dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="$flag" - else - dnl The -rpath options are cumulative. - for dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="${$1}${$1:+ }$flag" - done - fi - fi - fi - fi - fi - AC_SUBST([$1]) -]) diff --git a/gnulib/m4/lib-prefix.m4 b/gnulib/m4/lib-prefix.m4 deleted file mode 100644 index 7e5f0bd..0000000 --- a/gnulib/m4/lib-prefix.m4 +++ /dev/null @@ -1,224 +0,0 @@ -# lib-prefix.m4 serial 7 (gettext-0.18) -dnl Copyright (C) 2001-2005, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and -dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't -dnl require excessive bracketing. -ifdef([AC_HELP_STRING], -[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) - -dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed -dnl to access previously installed libraries. The basic assumption is that -dnl a user will want packages to use other packages he previously installed -dnl with the same --prefix option. -dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate -dnl libraries, but is otherwise very convenient. -AC_DEFUN([AC_LIB_PREFIX], -[ - AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_LIB_ARG_WITH([lib-prefix], -[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib - --without-lib-prefix don't search for libraries in includedir and libdir], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - fi - fi -]) - if test $use_additional = yes; then - dnl Potentially add $additional_includedir to $CPPFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's already present in $CPPFLAGS, - dnl 3. if it's /usr/local/include and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - for x in $CPPFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $CPPFLAGS. - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" - fi - fi - fi - fi - dnl Potentially add $additional_libdir to $LDFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's already present in $LDFLAGS, - dnl 3. if it's /usr/local/lib and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then - haveit= - for x in $LDFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LDFLAGS. - LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" - fi - fi - fi - fi - fi -]) - -dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, -dnl acl_final_exec_prefix, containing the values to which $prefix and -dnl $exec_prefix will expand at the end of the configure script. -AC_DEFUN([AC_LIB_PREPARE_PREFIX], -[ - dnl Unfortunately, prefix and exec_prefix get only finally determined - dnl at the end of configure. - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the -dnl variables prefix and exec_prefix bound to the values they will have -dnl at the end of the configure script. -AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], -[ - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - $1 - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_PREPARE_MULTILIB creates -dnl - a variable acl_libdirstem, containing the basename of the libdir, either -dnl "lib" or "lib64" or "lib/64", -dnl - a variable acl_libdirstem2, as a secondary possible value for -dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or -dnl "lib/amd64". -AC_DEFUN([AC_LIB_PREPARE_MULTILIB], -[ - dnl There is no formal standard regarding lib and lib64. - dnl On glibc systems, the current practice is that on a system supporting - dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine - dnl the compiler's default mode by looking at the compiler's library search - dnl path. If at least one of its elements ends in /lib64 or points to a - dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. - dnl Otherwise we use the default, namely "lib". - dnl On Solaris systems, the current practice is that on a system supporting - dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or - dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. - AC_REQUIRE([AC_CANONICAL_HOST]) - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment - dnl . - dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." - dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the - dnl symlink is missing, so we set acl_libdirstem2 too. - AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], - [AC_EGREP_CPP([sixtyfour bits], [ -#ifdef _LP64 -sixtyfour bits -#endif - ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) - ]) - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" -]) diff --git a/gnulib/m4/libunistring-base.m4 b/gnulib/m4/libunistring-base.m4 deleted file mode 100644 index 9831448..0000000 --- a/gnulib/m4/libunistring-base.m4 +++ /dev/null @@ -1,141 +0,0 @@ -# libunistring-base.m4 serial 5 -dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paolo Bonzini and Bruno Haible. - -dnl gl_LIBUNISTRING_MODULE([VERSION], [Module]) -dnl Declares that the source files of Module should be compiled, unless we -dnl are linking with libunistring and its version is >= the given VERSION. -dnl Defines an automake conditional LIBUNISTRING_COMPILE_$MODULE that is -dnl true if the source files of Module should be compiled. -dnl This macro is to be used for public libunistring API, not for -dnl undocumented API. -dnl -dnl You have to bump the VERSION argument to the next projected version -dnl number each time you make a change that affects the behaviour of the -dnl functions defined in Module (even if the sources of Module itself do not -dnl change). - -AC_DEFUN([gl_LIBUNISTRING_MODULE], -[ - AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) - dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from - dnl gl_LIBUNISTRING_CORE if that macro has been run. - AM_CONDITIONAL(AS_TR_CPP([LIBUNISTRING_COMPILE_$2]), - [gl_LIBUNISTRING_VERSION_CMP([$1])]) -]) - -dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile]) -dnl Declares that HeaderFile should be created, unless we are linking -dnl with libunistring and its version is >= the given VERSION. -dnl HeaderFile should be relative to the lib directory and end in '.h'. -dnl Prepares for substituting LIBUNISTRING_HEADERFILE (to HeaderFile or empty). -dnl -dnl When we are linking with the already installed libunistring and its version -dnl is < VERSION, we create HeaderFile here, because we may compile functions -dnl (via gl_LIBUNISTRING_MODULE above) that are not contained in the installed -dnl version. -dnl When we are linking with the already installed libunistring and its version -dnl is > VERSION, we don't create HeaderFile here: it could cause compilation -dnl errors in other libunistring header files if some types are missing. -dnl -dnl You have to bump the VERSION argument to the next projected version -dnl number each time you make a non-comment change to the HeaderFile. - -AC_DEFUN([gl_LIBUNISTRING_LIBHEADER], -[ - AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) - dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from - dnl gl_LIBUNISTRING_CORE if that macro has been run. - if gl_LIBUNISTRING_VERSION_CMP([$1]); then - LIBUNISTRING_[]AS_TR_CPP([$2])='$2' - else - LIBUNISTRING_[]AS_TR_CPP([$2])= - fi - AC_SUBST([LIBUNISTRING_]AS_TR_CPP([$2])) -]) - -dnl Miscellaneous preparations/initializations. - -AC_DEFUN([gl_LIBUNISTRING_LIB_PREPARE], -[ - dnl Ensure that HAVE_LIBUNISTRING is fully determined at this point. - m4_ifdef([gl_LIBUNISTRING], [AC_REQUIRE([gl_LIBUNISTRING])]) - - AC_REQUIRE([AC_PROG_AWK]) - -dnl Sed expressions to extract the parts of a version number. -changequote(,) -gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} -i\ -0 -q -' -gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} -i\ -0 -q -' -gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} -i\ -0 -q -' -changequote([,]) - - if test "$HAVE_LIBUNISTRING" = yes; then - LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` - LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` - LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` - fi -]) - -dnl gl_LIBUNISTRING_VERSION_CMP([VERSION]) -dnl Expands to a shell statement that evaluates to true if LIBUNISTRING_VERSION -dnl is less than the VERSION argument. -AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP], -[ { test "$HAVE_LIBUNISTRING" != yes \ - || { - dnl AS_LITERAL_IF exists and works fine since autoconf-2.59 at least. - AS_LITERAL_IF([$1], - [dnl This is the optimized variant, that assumes the argument is a literal: - m4_pushdef([requested_version_major], - [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^\([0-9]*\).*], [\1]), [])]) - m4_pushdef([requested_version_minor], - [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.]\([0-9]*\).*], [\1]), [$1])]) - m4_pushdef([requested_version_subminor], - [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.][0-9]*[.]\([0-9]*\).*], [\1]), [$1])]) - test $LIBUNISTRING_VERSION_MAJOR -lt requested_version_major \ - || { test $LIBUNISTRING_VERSION_MAJOR -eq requested_version_major \ - && { test $LIBUNISTRING_VERSION_MINOR -lt requested_version_minor \ - || { test $LIBUNISTRING_VERSION_MINOR -eq requested_version_minor \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt requested_version_subminor - } - } - } - m4_popdef([requested_version_subminor]) - m4_popdef([requested_version_minor]) - m4_popdef([requested_version_major]) - ], - [dnl This is the unoptimized variant: - requested_version_major=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_major"` - requested_version_minor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_minor"` - requested_version_subminor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_subminor"` - test $LIBUNISTRING_VERSION_MAJOR -lt $requested_version_major \ - || { test $LIBUNISTRING_VERSION_MAJOR -eq $requested_version_major \ - && { test $LIBUNISTRING_VERSION_MINOR -lt $requested_version_minor \ - || { test $LIBUNISTRING_VERSION_MINOR -eq $requested_version_minor \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt $requested_version_subminor - } - } - } - ]) - } - }]) - -dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the -dnl same as ORIG, otherwise to 0. -m4_define([gl_LIBUNISTRING_ARG_OR_ZERO], [m4_if([$1], [$2], [0], [$1])]) diff --git a/gnulib/m4/localcharset.m4 b/gnulib/m4/localcharset.m4 deleted file mode 100644 index 6801ca9..0000000 --- a/gnulib/m4/localcharset.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# localcharset.m4 serial 7 -dnl Copyright (C) 2002, 2004, 2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_LOCALCHARSET], -[ - dnl Prerequisites of lib/localcharset.c. - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_REQUIRE([gl_FCNTL_O_FLAGS]) - AC_CHECK_DECLS_ONCE([getc_unlocked]) - - dnl Prerequisites of the lib/Makefile.am snippet. - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([gl_GLIBC21]) -]) diff --git a/gnulib/m4/locale-fr.m4 b/gnulib/m4/locale-fr.m4 deleted file mode 100644 index 3f4f954..0000000 --- a/gnulib/m4/locale-fr.m4 +++ /dev/null @@ -1,246 +0,0 @@ -# locale-fr.m4 serial 13 -dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl Determine the name of a french locale with traditional encoding. -AC_DEFUN([gt_LOCALE_FR], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [ - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -changequote(,)dnl -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only - one byte long. This excludes the UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; - return 0; -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the native Win32 locale name. - if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=French_France.1252 - else - # None found. - gt_cv_locale_fr=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.ISO-8859-1 - else - # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. - if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.ISO8859-1 - else - # Test for the HP-UX locale name. - if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.iso88591 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr - else - # None found. - gt_cv_locale_fr=none - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - ]) - LOCALE_FR=$gt_cv_locale_fr - AC_SUBST([LOCALE_FR]) -]) - -dnl Determine the name of a french locale with UTF-8 encoding. -AC_DEFUN([gt_LOCALE_FR_UTF8], -[ - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [ - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -changequote(,)dnl -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if !(defined __BEOS__ || defined __HAIKU__) - /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -# else - if (setlocale (LC_ALL, "") == NULL) return 1; -# endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -# if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -# endif -# ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') - return 1; -#endif - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; - return 0; -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Win32 locale name. - if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=French_France.65001 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr.UTF-8 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - ]) - LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 - AC_SUBST([LOCALE_FR_UTF8]) -]) diff --git a/gnulib/m4/locale-ja.m4 b/gnulib/m4/locale-ja.m4 deleted file mode 100644 index d44c2c8..0000000 --- a/gnulib/m4/locale-ja.m4 +++ /dev/null @@ -1,135 +0,0 @@ -# locale-ja.m4 serial 9 -dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl Determine the name of a japanese locale with EUC-JP encoding. -AC_DEFUN([gt_LOCALE_JA], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [ - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -changequote(,)dnl -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales - on Cygwin 1.5.x. */ - if (MB_CUR_MAX == 1) - return 1; - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - return 0; -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Note that on native Win32, the Japanese locale is Japanese_Japan.932, - # and CP932 is very different from EUC-JP, so we cannot use it here. - gt_cv_locale_ja=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP - else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC - else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja - else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP - else - # None found. - gt_cv_locale_ja=none - fi - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - ]) - LOCALE_JA=$gt_cv_locale_ja - AC_SUBST([LOCALE_JA]) -]) diff --git a/gnulib/m4/locale-tr.m4 b/gnulib/m4/locale-tr.m4 deleted file mode 100644 index 19ded1b..0000000 --- a/gnulib/m4/locale-tr.m4 +++ /dev/null @@ -1,127 +0,0 @@ -# locale-tr.m4 serial 7 -dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl Determine the name of a turkish locale with UTF-8 encoding. -AC_DEFUN([gt_LOCALE_TR_UTF8], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CACHE_CHECK([for a turkish Unicode locale], [gt_cv_locale_tr_utf8], [ - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -changequote(,)dnl -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* On BeOS, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. But BeOS does not - implement the Turkish upper-/lowercase mappings. Therefore, let this - program return 1 on BeOS. */ - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in the abbreviation of the eighth month, the second - character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) - return 1; - /* Check whether the upper-/lowercase mappings are as expected for - Turkish. */ - if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' - || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) - return 1; - return 0; -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Win32 locale name. - if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=Turkish_Turkey.65001 - else - # None found. - gt_cv_locale_tr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr_TR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr_TR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr.UTF-8 - else - # None found. - gt_cv_locale_tr_utf8=none - fi - fi - fi - ;; - esac - else - gt_cv_locale_tr_utf8=none - fi - rm -fr conftest* - ]) - LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 - AC_SUBST([LOCALE_TR_UTF8]) -]) diff --git a/gnulib/m4/locale-zh.m4 b/gnulib/m4/locale-zh.m4 deleted file mode 100644 index e03f91f..0000000 --- a/gnulib/m4/locale-zh.m4 +++ /dev/null @@ -1,124 +0,0 @@ -# locale-zh.m4 serial 8 -dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl Determine the name of a chinese locale with GB18030 encoding. -AC_DEFUN([gt_LOCALE_ZH_CN], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [ - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -changequote(,)dnl -#include -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Win32, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - /* Check whether a typical GB18030 multibyte sequence is recognized as a - single wide character. This excludes the GB2312 and GBK encodings. */ - if (mblen ("\203\062\332\066", 5) != 4) - return 1; - return 0; -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Win32 locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac - else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none - fi - rm -fr conftest* - ]) - LOCALE_ZH_CN=$gt_cv_locale_zh_CN - AC_SUBST([LOCALE_ZH_CN]) -]) diff --git a/gnulib/m4/locale_h.m4 b/gnulib/m4/locale_h.m4 deleted file mode 100644 index 4d0f894..0000000 --- a/gnulib/m4/locale_h.m4 +++ /dev/null @@ -1,101 +0,0 @@ -# locale_h.m4 serial 13 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_LOCALE_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_LOCALE_H_DEFAULTS]) - - dnl Persuade glibc to define locale_t. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - dnl If is replaced, then must also be replaced. - AC_REQUIRE([gl_STDDEF_H]) - - AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001], - [gl_cv_header_locale_h_posix2001], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - int x = LC_MESSAGES;]], - [[]])], - [gl_cv_header_locale_h_posix2001=yes], - [gl_cv_header_locale_h_posix2001=no])]) - - dnl Check for . - AC_CHECK_HEADERS_ONCE([xlocale.h]) - if test $ac_cv_header_xlocale_h = yes; then - HAVE_XLOCALE_H=1 - dnl Check whether use of locale_t requires inclusion of , - dnl e.g. on MacOS X 10.5. If does not define locale_t by - dnl itself, we assume that will do so. - AC_CACHE_CHECK([whether locale.h defines locale_t], - [gl_cv_header_locale_has_locale_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - locale_t x;]], - [[]])], - [gl_cv_header_locale_has_locale_t=yes], - [gl_cv_header_locale_has_locale_t=no]) - ]) - if test $gl_cv_header_locale_has_locale_t = yes; then - gl_cv_header_locale_h_needs_xlocale_h=no - else - gl_cv_header_locale_h_needs_xlocale_h=yes - fi - else - HAVE_XLOCALE_H=0 - gl_cv_header_locale_h_needs_xlocale_h=no - fi - AC_SUBST([HAVE_XLOCALE_H]) - - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_NEXT_HEADERS([locale.h]) - - if test -n "$STDDEF_H" \ - || test $gl_cv_header_locale_h_posix2001 = no \ - || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then - gl_REPLACE_LOCALE_H - fi - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include -/* Some systems provide declarations in a non-standard header. */ -#if HAVE_XLOCALE_H -# include -#endif - ]], - [setlocale duplocale]) -]) - -dnl Unconditionally enables the replacement of . -AC_DEFUN([gl_REPLACE_LOCALE_H], -[ - dnl This is a no-op, because is always overridden. - : -]) - -AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_LOCALE_H_DEFAULTS], -[ - GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE]) - GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE]) - REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE]) - REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE]) -]) diff --git a/gnulib/m4/localename.m4 b/gnulib/m4/localename.m4 deleted file mode 100644 index 926ada6..0000000 --- a/gnulib/m4/localename.m4 +++ /dev/null @@ -1,12 +0,0 @@ -# localename.m4 serial 2 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_LOCALENAME], -[ - AC_REQUIRE([gt_LC_MESSAGES]) - AC_REQUIRE([gt_INTL_MACOSX]) - AC_CHECK_FUNCS([setlocale uselocale]) -]) diff --git a/gnulib/m4/lock.m4 b/gnulib/m4/lock.m4 deleted file mode 100644 index 9686945..0000000 --- a/gnulib/m4/lock.m4 +++ /dev/null @@ -1,41 +0,0 @@ -# lock.m4 serial 11 (gettext-0.18.2) -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -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 - # pthread_rwlock_* functions. - AC_CHECK_TYPE([pthread_rwlock_t], - [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], - [Define if the POSIX multithreading library has read/write locks.])], - [], - [#include ]) - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [[#include ]], - [[ -#if __FreeBSD__ == 4 -error "No, in FreeBSD 4.0 recursive mutexes actually don't work." -#else -int x = (int)PTHREAD_MUTEX_RECURSIVE; -return !x; -#endif - ]])], - [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], - [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) - fi - gl_PREREQ_LOCK -]) - -# Prerequisites of lib/lock.c. -AC_DEFUN([gl_PREREQ_LOCK], [ - AC_REQUIRE([AC_C_INLINE]) -]) diff --git a/gnulib/m4/longlong.m4 b/gnulib/m4/longlong.m4 deleted file mode 100644 index aed816c..0000000 --- a/gnulib/m4/longlong.m4 +++ /dev/null @@ -1,113 +0,0 @@ -# longlong.m4 serial 16 -dnl Copyright (C) 1999-2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'long long int' exists but is only 32 bits large -# (as on some very old compilers), HAVE_LONG_LONG_INT will not be -# defined. In this case you can treat 'long long int' like 'long int'. - -AC_DEFUN([AC_TYPE_LONG_LONG_INT], -[ - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug is not important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [], - [ac_cv_type_long_long_int=no], - [:]) - fi - fi]) - if test $ac_cv_type_long_long_int = yes; then - AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `long long int'.]) - fi -]) - -# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'unsigned long long int' exists but is only 32 bits -# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT -# will not be defined. In this case you can treat 'unsigned long long int' -# like 'unsigned long int'. - -AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for unsigned long long int], - [ac_cv_type_unsigned_long_long_int], - [ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [], - [ac_cv_type_unsigned_long_long_int=no]) - fi]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `unsigned long long int'.]) - fi -]) - -# Expands to a C program that can be used to test for simultaneous support -# of 'long long' and 'unsigned long long'. We don't want to say that -# 'long long' is available if 'unsigned long long' is not, or vice versa, -# because too many programs rely on the symmetry between signed and unsigned -# integer types (excluding 'bool'). -AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], -[ - AC_LANG_PROGRAM( - [[/* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63;]], - [[/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull));]]) -]) diff --git a/gnulib/m4/ls-mntd-fs.m4 b/gnulib/m4/ls-mntd-fs.m4 deleted file mode 100644 index 72beaed..0000000 --- a/gnulib/m4/ls-mntd-fs.m4 +++ /dev/null @@ -1,353 +0,0 @@ -# serial 28 -# How to list mounted file systems. - -# Copyright (C) 1998-2004, 2006, 2009-2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. -dnl -dnl This is not pretty. I've just taken the autoconf code and wrapped -dnl it in an AC_DEFUN and made some other fixes. -dnl - -# Replace Autoconf's AC_FUNC_GETMNTENT to work around a bug in Autoconf -# through Autoconf 2.59. We can remove this once we assume Autoconf 2.60 -# or later. -AC_DEFUN([AC_FUNC_GETMNTENT], -[# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, -# -lseq on Dynix/PTX, -lgen on Unixware. -AC_SEARCH_LIBS([getmntent], [sun seq gen]) -AC_CHECK_FUNCS([getmntent]) -]) - -# gl_LIST_MOUNTED_FILE_SYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS], - [ -AC_CHECK_FUNCS([listmntent getmntinfo]) -AC_CHECK_HEADERS_ONCE([sys/param.h sys/statvfs.h]) - -# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses -# NGROUPS (as the array dimension for a struct member) without a definition. -AC_CHECK_HEADERS([sys/ucred.h], [], [], [#include ]) - -AC_CHECK_HEADERS([sys/mount.h], [], [], - [AC_INCLUDES_DEFAULT - [#if HAVE_SYS_PARAM_H - #include - #endif]]) - -AC_CHECK_HEADERS([mntent.h sys/fs_types.h]) - getfsstat_includes="\ -$ac_includes_default -#if HAVE_SYS_PARAM_H -# include /* needed by powerpc-apple-darwin1.3.7 */ -#endif -#if HAVE_SYS_UCRED_H -# include /* needed for definition of NGROUPS */ -# include /* needed by powerpc-apple-darwin1.3.7 */ -#endif -#if HAVE_SYS_MOUNT_H -# include -#endif -#if HAVE_SYS_FS_TYPES_H -# include /* needed by powerpc-apple-darwin1.3.7 */ -#endif -" -AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes]) - -# Determine how to get the list of mounted file systems. -ac_list_mounted_fs= - -# If the getmntent function is available but not in the standard library, -# make sure LIBS contains the appropriate -l option. -AC_FUNC_GETMNTENT - -# This test must precede the ones for getmntent because Unicos-9 is -# reported to have the getmntent function, but its support is incompatible -# with other getmntent implementations. - -# NOTE: Normally, I wouldn't use a check for system type as I've done for -# `CRAY' below since that goes against the whole autoconf philosophy. But -# I think there is too great a chance that some non-Cray system has a -# function named listmntent to risk the false positive. - -if test -z "$ac_list_mounted_fs"; then - # Cray UNICOS 9 - AC_MSG_CHECKING([for listmntent of Cray/Unicos-9]) - AC_CACHE_VAL([fu_cv_sys_mounted_cray_listmntent], - [fu_cv_sys_mounted_cray_listmntent=no - AC_EGREP_CPP([yes], - [#ifdef _CRAY -yes -#endif - ], [test $ac_cv_func_listmntent = yes \ - && fu_cv_sys_mounted_cray_listmntent=yes] - ) - ] - ) - AC_MSG_RESULT([$fu_cv_sys_mounted_cray_listmntent]) - if test $fu_cv_sys_mounted_cray_listmntent = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_LISTMNTENT], [1], - [Define if there is a function named listmntent that can be used to - list all mounted file systems. (UNICOS)]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # AIX. - AC_MSG_CHECKING([for mntctl function and struct vmount]) - AC_CACHE_VAL([fu_cv_sys_mounted_vmount], - [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], - [fu_cv_sys_mounted_vmount=yes], - [fu_cv_sys_mounted_vmount=no])]) - AC_MSG_RESULT([$fu_cv_sys_mounted_vmount]) - if test $fu_cv_sys_mounted_vmount = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_VMOUNT], [1], - [Define if there is a function named mntctl that can be used to read - the list of mounted file systems, and there is a system header file - that declares `struct vmount.' (AIX)]) - fi -fi - -if test $ac_cv_func_getmntent = yes; then - - # This system has the getmntent function. - # Determine whether it's the one-argument variant or the two-argument one. - - if test -z "$ac_list_mounted_fs"; then - # 4.3BSD, SunOS, HP-UX, Dynix, Irix - AC_MSG_CHECKING([for one-argument getmntent function]) - AC_CACHE_VAL([fu_cv_sys_mounted_getmntent1], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ -#include - -#include -#if !defined MOUNTED -# if defined _PATH_MOUNTED /* GNU libc */ -# define MOUNTED _PATH_MOUNTED -# endif -# if defined MNT_MNTTAB /* HP-UX. */ -# define MOUNTED MNT_MNTTAB -# endif -# if defined MNTTABNAME /* Dynix. */ -# define MOUNTED MNTTABNAME -# endif -#endif -]], - [[ struct mntent *mnt = 0; char *table = MOUNTED; - if (sizeof mnt && sizeof table) return 0;]])], - [fu_cv_sys_mounted_getmntent1=yes], - [fu_cv_sys_mounted_getmntent1=no])]) - AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent1]) - if test $fu_cv_sys_mounted_getmntent1 = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_GETMNTENT1], [1], - [Define if there is a function named getmntent for reading the list - of mounted file systems, and that function takes a single argument. - (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) - fi - fi - - if test -z "$ac_list_mounted_fs"; then - # SVR4 - AC_MSG_CHECKING([for two-argument getmntent function]) - AC_CACHE_VAL([fu_cv_sys_mounted_getmntent2], - [AC_EGREP_HEADER([getmntent], [sys/mnttab.h], - fu_cv_sys_mounted_getmntent2=yes, - fu_cv_sys_mounted_getmntent2=no)]) - AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent2]) - if test $fu_cv_sys_mounted_getmntent2 = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_GETMNTENT2], [1], - [Define if there is a function named getmntent for reading the list of - mounted file systems, and that function takes two arguments. (SVR4)]) - AC_CHECK_FUNCS([hasmntopt]) - fi - fi - -fi - -if test -z "$ac_list_mounted_fs"; then - # DEC Alpha running OSF/1, and Apple Darwin 1.3. - # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h - - AC_MSG_CHECKING([for getfsstat function]) - AC_CACHE_VAL([fu_cv_sys_mounted_getfsstat], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include -#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME -# define FS_TYPE(Ent) ((Ent).f_fstypename) -#else -# define FS_TYPE(Ent) mnt_names[(Ent).f_type] -#endif -$getfsstat_includes]] -, - [[struct statfs *stats; - int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); - char *t = FS_TYPE (*stats); ]])], - [fu_cv_sys_mounted_getfsstat=yes], - [fu_cv_sys_mounted_getfsstat=no])]) - AC_MSG_RESULT([$fu_cv_sys_mounted_getfsstat]) - if test $fu_cv_sys_mounted_getfsstat = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_GETFSSTAT], [1], - [Define if there is a function named getfsstat for reading the - list of mounted file systems. (DEC Alpha running OSF/1)]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # SVR3 - AC_MSG_CHECKING([for FIXME existence of three headers]) - AC_CACHE_VAL([fu_cv_sys_mounted_fread_fstyp], - [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#include ]])], - [fu_cv_sys_mounted_fread_fstyp=yes], - [fu_cv_sys_mounted_fread_fstyp=no])]) - AC_MSG_RESULT([$fu_cv_sys_mounted_fread_fstyp]) - if test $fu_cv_sys_mounted_fread_fstyp = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_FREAD_FSTYP], [1], - [Define if (like SVR2) there is no specific function for reading the - list of mounted file systems, and your system has these header files: - and . (SVR3)]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # 4.4BSD and DEC OSF/1. - AC_MSG_CHECKING([for getmntinfo function]) - AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo], - [ - test "$ac_cv_func_getmntinfo" = yes \ - && fu_cv_sys_mounted_getmntinfo=yes \ - || fu_cv_sys_mounted_getmntinfo=no - ]) - AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo]) - if test $fu_cv_sys_mounted_getmntinfo = yes; then - AC_MSG_CHECKING([whether getmntinfo returns statvfs structures]) - AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo2], - [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#if HAVE_SYS_PARAM_H -# include -#endif -#include -#if HAVE_SYS_MOUNT_H -# include -#endif -#if HAVE_SYS_STATVFS_H -# include -#endif -extern int getmntinfo (struct statfs **, int); - ]], [])], - [fu_cv_sys_mounted_getmntinfo2=no], - [fu_cv_sys_mounted_getmntinfo2=yes]) - ]) - AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo2]) - if test $fu_cv_sys_mounted_getmntinfo2 = no; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_GETMNTINFO], [1], - [Define if there is a function named getmntinfo for reading the - list of mounted file systems and it returns an array of - 'struct statfs'. (4.4BSD, Darwin)]) - else - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_GETMNTINFO2], [1], - [Define if there is a function named getmntinfo for reading the - list of mounted file systems and it returns an array of - 'struct statvfs'. (NetBSD 3.0)]) - fi - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # Ultrix - AC_MSG_CHECKING([for getmnt function]) - AC_CACHE_VAL([fu_cv_sys_mounted_getmnt], - [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ -#include -#include ]])], - [fu_cv_sys_mounted_getmnt=yes], - [fu_cv_sys_mounted_getmnt=no])]) - AC_MSG_RESULT([$fu_cv_sys_mounted_getmnt]) - if test $fu_cv_sys_mounted_getmnt = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_GETMNT], [1], - [Define if there is a function named getmnt for reading the list of - mounted file systems. (Ultrix)]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # BeOS - AC_CHECK_FUNCS([next_dev fs_stat_dev]) - AC_CHECK_HEADERS([fs_info.h]) - AC_MSG_CHECKING([for BEOS mounted file system support functions]) - if test $ac_cv_header_fs_info_h = yes \ - && test $ac_cv_func_next_dev = yes \ - && test $ac_cv_func_fs_stat_dev = yes; then - fu_result=yes - else - fu_result=no - fi - AC_MSG_RESULT([$fu_result]) - if test $fu_result = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_FS_STAT_DEV], [1], - [Define if there are functions named next_dev and fs_stat_dev for - reading the list of mounted file systems. (BeOS)]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # SVR2 - AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) - AC_CACHE_VAL([fu_cv_sys_mounted_fread], - [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], - [fu_cv_sys_mounted_fread=yes], - [fu_cv_sys_mounted_fread=no])]) - AC_MSG_RESULT([$fu_cv_sys_mounted_fread]) - if test $fu_cv_sys_mounted_fread = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_FREAD], [1], - [Define if there is no specific function for reading the list of - mounted file systems. fread will be used to read /etc/mnttab. - (SVR2) ]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # Interix / BSD alike statvfs - # the code is really interix specific, so make sure, we're on it. - case "$host" in - *-interix*) - AC_CHECK_FUNCS([statvfs]) - if test $ac_cv_func_statvfs = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_INTERIX_STATVFS], [1], - [Define if we are on interix, and ought to use statvfs plus - some special knowledge on where mounted filesystems can be - found. (Interix)]) - fi - ;; - esac -fi - -if test -z "$ac_list_mounted_fs"; then - AC_MSG_ERROR([could not determine how to read list of mounted file systems]) - # FIXME -- no need to abort building the whole package - # Can't build mountlist.c or anything that needs its functions -fi - -AS_IF([test $ac_list_mounted_fs = found], [$1], [$2]) - - ]) diff --git a/gnulib/m4/lseek.m4 b/gnulib/m4/lseek.m4 deleted file mode 100644 index f6452f6..0000000 --- a/gnulib/m4/lseek.m4 +++ /dev/null @@ -1,49 +0,0 @@ -# lseek.m4 serial 6 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_LSEEK], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe], - [if test $cross_compiling = no; then - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include /* for off_t */ -#include /* for SEEK_CUR */ -#include ]], [[ - /* Exit with success only if stdin is seekable. */ - return lseek (0, (off_t)0, SEEK_CUR) < 0; -]])], - [if test -s conftest$ac_exeext \ - && ./conftest$ac_exeext < conftest.$ac_ext \ - && test 1 = "`echo hi \ - | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then - gl_cv_func_lseek_pipe=yes - else - gl_cv_func_lseek_pipe=no - fi], - [gl_cv_func_lseek_pipe=no]) - else - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ -#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ -/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ - Choke me. -#endif]])], - [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no]) - fi]) - if test $gl_cv_func_lseek_pipe = no; then - gl_REPLACE_LSEEK - fi -]) - -AC_DEFUN([gl_REPLACE_LSEEK], -[ - AC_LIBOBJ([lseek]) - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - REPLACE_LSEEK=1 - AC_DEFINE([LSEEK_PIPE_BROKEN], [1], - [Define to 1 if lseek does not detect pipes.]) -]) diff --git a/gnulib/m4/lstat.m4 b/gnulib/m4/lstat.m4 deleted file mode 100644 index b9b22a6..0000000 --- a/gnulib/m4/lstat.m4 +++ /dev/null @@ -1,69 +0,0 @@ -# serial 21 - -# Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. - -AC_DEFUN([gl_FUNC_LSTAT], -[ - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - dnl If lstat does not exist, the replacement does - dnl "#define lstat stat", and lstat.c is a no-op. - AC_CHECK_FUNCS_ONCE([lstat]) - if test $ac_cv_func_lstat = yes; then - AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then - dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]). - REPLACE_LSTAT=1 - fi - # Prerequisites of lib/lstat.c. - AC_REQUIRE([AC_C_INLINE]) - else - HAVE_LSTAT=0 - fi -]) - -# Redefine AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, because it is no longer -# maintained in Autoconf. -AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], -[ - AC_CACHE_CHECK([whether lstat correctly handles trailing slash], - [ac_cv_func_lstat_dereferences_slashed_symlink], - [rm -f conftest.sym conftest.file - echo >conftest.file - if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT], - [[struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - ]])], - [ac_cv_func_lstat_dereferences_slashed_symlink=yes], - [ac_cv_func_lstat_dereferences_slashed_symlink=no], - [# When cross-compiling, be pessimistic so we will end up using the - # replacement version of lstat that checks for trailing slashes and - # calls lstat a second time when necessary. - ac_cv_func_lstat_dereferences_slashed_symlink=no - ]) - else - # If the 'ln -s' command failed, then we probably don't even - # have an lstat function. - ac_cv_func_lstat_dereferences_slashed_symlink=no - fi - rm -f conftest.sym conftest.file - ]) - test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && - AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1], - [Define to 1 if `lstat' dereferences a symlink specified - with a trailing slash.]) - if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then - AC_LIBOBJ([lstat]) - fi -]) diff --git a/gnulib/m4/malloc.m4 b/gnulib/m4/malloc.m4 deleted file mode 100644 index 8094444..0000000 --- a/gnulib/m4/malloc.m4 +++ /dev/null @@ -1,66 +0,0 @@ -# malloc.m4 serial 12 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_FUNC_MALLOC_GNU -# ------------------ -# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if -# it is not. -AC_DEFUN([gl_FUNC_MALLOC_GNU], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. - _AC_FUNC_MALLOC_IF( - [AC_DEFINE([HAVE_MALLOC_GNU], [1], - [Define to 1 if your system has a GNU libc compatible 'malloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_MALLOC_GNU], [0]) - gl_REPLACE_MALLOC - ]) -]) - -# gl_FUNC_MALLOC_POSIX -# -------------------- -# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it -# fails), and replace malloc if it is not. -AC_DEFUN([gl_FUNC_MALLOC_POSIX], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) - if test $gl_cv_func_malloc_posix = yes; then - AC_DEFINE([HAVE_MALLOC_POSIX], [1], - [Define if the 'malloc' function is POSIX compliant.]) - else - gl_REPLACE_MALLOC - fi -]) - -# Test whether malloc, realloc, calloc are POSIX compliant, -# Set gl_cv_func_malloc_posix to yes or no accordingly. -AC_DEFUN([gl_CHECK_MALLOC_POSIX], -[ - AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], - [gl_cv_func_malloc_posix], - [ - dnl It is too dangerous to try to allocate a large amount of memory: - dnl some systems go to their knees when you do that. So assume that - dnl all Unix implementations of the function are POSIX compliant. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[]], - [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - choke me - #endif - ]])], - [gl_cv_func_malloc_posix=yes], - [gl_cv_func_malloc_posix=no]) - ]) -]) - -AC_DEFUN([gl_REPLACE_MALLOC], -[ - AC_LIBOBJ([malloc]) - REPLACE_MALLOC=1 -]) diff --git a/gnulib/m4/malloca.m4 b/gnulib/m4/malloca.m4 deleted file mode 100644 index aec43f5..0000000 --- a/gnulib/m4/malloca.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# malloca.m4 serial 1 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MALLOCA], -[ - dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables - dnl @ALLOCA@ and @LTALLOCA@. - dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies. - AC_REQUIRE([gl_EEMALLOC]) - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) -]) diff --git a/gnulib/m4/math_h.m4 b/gnulib/m4/math_h.m4 deleted file mode 100644 index 7b46aee..0000000 --- a/gnulib/m4/math_h.m4 +++ /dev/null @@ -1,146 +0,0 @@ -# math_h.m4 serial 25 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -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 ]], - [[/* Solaris 10 has a broken definition of NAN. Other platforms - fail to provide NAN, or provide it only in C99 mode; this - test only needs to fail when NAN is provided but wrong. */ - float f = 1.0f; -#ifdef NAN - f = NAN; -#endif - return f == 0;]])], - [gl_cv_header_math_nan_works=yes], - [gl_cv_header_math_nan_works=no])]) - if test $gl_cv_header_math_nan_works = no; then - REPLACE_NAN=1 - fi - AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], - [[/* Solaris 10 has a broken definition of HUGE_VAL. */ - double d = HUGE_VAL; - return d == 0;]])], - [gl_cv_header_math_huge_val_works=yes], - [gl_cv_header_math_huge_val_works=no])]) - if test $gl_cv_header_math_huge_val_works = no; then - REPLACE_HUGE_VAL=1 - fi - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl - ldexpl logb logl round roundf roundl sinl sqrtl tanl trunc truncf truncl]) -]) - -AC_DEFUN([gl_MATH_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_MATH_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_MATH_H_DEFAULTS], -[ - GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) - GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) - GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) - GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL]) - GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) - GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) - GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) - GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) - GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR]) - GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) - GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) - GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) - GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) - GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) - GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) - GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) - GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) - GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) - GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) - GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) - GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) - GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) - GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) - GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) - GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) - GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) - GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) - GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) - GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) - GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) - GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) - GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) - HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) - HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) - HAVE_COSL=1; AC_SUBST([HAVE_COSL]) - HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) - HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) - HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) - HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) - HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) - HAVE_SINL=1; AC_SUBST([HAVE_SINL]) - HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) - HAVE_TANL=1; AC_SUBST([HAVE_TANL]) - HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) - HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) - HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) - HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) - HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) - HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) - HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) - HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) - HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) - HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) - HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) - HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) - HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) - HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND]) - HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF]) - HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL]) - HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) - HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) - HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) - HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) - HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) - HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) - REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL]) - REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) - REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) - REPLACE_FLOOR=0; AC_SUBST([REPLACE_FLOOR]) - REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) - REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) - REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) - REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) - REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) - REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) - REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) - REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) - REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) - REPLACE_NAN=0; AC_SUBST([REPLACE_NAN]) - REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) - REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) - REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) - REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) - REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) - REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC]) - REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF]) - REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) -]) diff --git a/gnulib/m4/mathfunc.m4 b/gnulib/m4/mathfunc.m4 deleted file mode 100644 index 40a27b4..0000000 --- a/gnulib/m4/mathfunc.m4 +++ /dev/null @@ -1,122 +0,0 @@ -# mathfunc.m4 serial 6 -dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_MATHFUNC(FUNC, RETTYPE, PARAMTYPES) -# -------------------------------------------------- -# tests whether the function FUNC is available in libc or libm. -# RETTYPE is the return type. PARAMTYPES is a parameter list, with parentheses. -# It sets FUNC_LIBM to empty or "-lm" accordingly. - -AC_DEFUN([gl_MATHFUNC], -[ - dnl We need the RETTYPE and PARAMTYPES in order to force linking with the - dnl function. With gcc >= 4.3 on glibc/x86_64, calls to the 'fabs' function - dnl are inlined by the compiler, therefore linking of these calls does not - dnl require -lm, but taking the function pointer of 'fabs' does. - m4_pushdef([func], [$1]) - m4_pushdef([FUNC], [m4_translit([$1],[abcdefghijklmnopqrstuvwxyz], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) - FUNC[]_LIBM= - AC_CACHE_CHECK([whether func() can be used without linking with libm], - [gl_cv_func_]func[_no_libm], - [ - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#ifndef __NO_MATH_INLINES - # define __NO_MATH_INLINES 1 /* for glibc */ - #endif - #include - $2 (*funcptr) $3 = ]func[; - double d_ret;]], - [[$2 y = funcptr ]m4_bpatsubst([m4_bpatsubst([m4_bpatsubst([$3], [int], [2])], [double \*], [&d_ret])], [double], [1.6180339887])[; - return y < 0.3 || y > 1.7; - ]])], - [gl_cv_func_]func[_no_libm=yes], - [gl_cv_func_]func[_no_libm=no]) - ]) - if test $gl_cv_func_[]func[]_no_libm = no; then - AC_CACHE_CHECK([whether func() can be used with libm], - [gl_cv_func_]func[_in_libm], - [ - save_LIBS="$LIBS" - LIBS="$LIBS -lm" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#ifndef __NO_MATH_INLINES - # define __NO_MATH_INLINES 1 /* for glibc */ - #endif - #include - $2 (*funcptr) $3 = ]func[; - double d_ret;]], - [[$2 y = funcptr ]m4_bpatsubst([m4_bpatsubst([m4_bpatsubst([$3], [int], [2])], [double \*], [&d_ret])], [double], [1.6180339887])[; - return y < 0.3 || y > 1.7; - ]])], - [gl_cv_func_]func[_in_libm=yes], - [gl_cv_func_]func[_in_libm=no]) - LIBS="$save_LIBS" - ]) - if test $gl_cv_func_[]func[]_in_libm = yes; then - FUNC[]_LIBM=-lm - fi - fi - AC_SUBST(FUNC[_LIBM]) - m4_popdef([FUNC]) - m4_popdef([func]) -]) - -# gl_COMMON_DOUBLE_MATHFUNC(FUNC) -# ------------------------------- -# tests whether the function FUNC is available in libc or libm. -# It sets FUNC_LIBM to empty or "-lm" accordingly. -# FUNC must be one of the following functions, that are present on all systems -# and provided by libm on all systems except MacOS X, BeOS, Haiku: -# acos asin atan atan2 cbrt cos cosh erf erfc exp fmod hypot j0 j1 jn lgamma -# log log10 log1p pow remainder sin sinh sqrt tan tanh y0 y1 yn - -AC_DEFUN([gl_COMMON_DOUBLE_MATHFUNC], -[ - AC_REQUIRE([gl_COMMON_DOUBLE_MATHFUNC_TEST]) - m4_pushdef([FUNC], [m4_translit([$1],[abcdefghijklmnopqrstuvwxyz], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ])]) - FUNC[]_LIBM="$POW_LIBM" - AC_SUBST(FUNC[_LIBM]) - m4_popdef([FUNC]) -]) - -AC_DEFUN([gl_COMMON_DOUBLE_MATHFUNC_TEST], -[ - dnl We could use any of the following: - dnl gl_MATHFUNC([acos], [double], [(double)]) - dnl gl_MATHFUNC([asin], [double], [(double)]) - dnl gl_MATHFUNC([atan], [double], [(double)]) - dnl gl_MATHFUNC([atan2], [double], [(double, double)]) - dnl gl_MATHFUNC([cbrt], [double], [(double)]) - dnl gl_MATHFUNC([cos], [double], [(double)]) - dnl gl_MATHFUNC([cosh], [double], [(double)]) - dnl gl_MATHFUNC([erf], [double], [(double)]) - dnl gl_MATHFUNC([erfc], [double], [(double)]) - dnl gl_MATHFUNC([exp], [double], [(double)]) - dnl gl_MATHFUNC([fmod], [double], [(double, double)]) - dnl gl_MATHFUNC([hypot], [double], [(double, double)]) - dnl gl_MATHFUNC([j0], [double], [(double)]) - dnl gl_MATHFUNC([j1], [double], [(double)]) - dnl gl_MATHFUNC([jn], [double], [(int, double)]) - dnl gl_MATHFUNC([lgamma], [double], [(double)]) - dnl gl_MATHFUNC([log], [double], [(double)]) - dnl gl_MATHFUNC([log10], [double], [(double)]) - dnl gl_MATHFUNC([log1p], [double], [(double)]) - dnl gl_MATHFUNC([pow], [double], [(double, double)]) - dnl gl_MATHFUNC([remainder], [double], [(double, double)]) - dnl gl_MATHFUNC([sin], [double], [(double)]) - dnl gl_MATHFUNC([sinh], [double], [(double)]) - dnl gl_MATHFUNC([sqrt], [double], [(double)]) - dnl gl_MATHFUNC([tan], [double], [(double)]) - dnl gl_MATHFUNC([tanh], [double], [(double)]) - dnl gl_MATHFUNC([y0], [double], [(double)]) - dnl gl_MATHFUNC([y1], [double], [(double)]) - dnl gl_MATHFUNC([yn], [double], [(int, double)]) - gl_MATHFUNC([pow], [double], [(double, double)]) -]) diff --git a/gnulib/m4/mbchar.m4 b/gnulib/m4/mbchar.m4 deleted file mode 100644 index 763dd81..0000000 --- a/gnulib/m4/mbchar.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# mbchar.m4 serial 8 -dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl autoconf tests required for use of mbchar.m4 -dnl From Bruno Haible. - -AC_DEFUN([gl_MBCHAR], -[ - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([AC_C_INLINE]) -]) diff --git a/gnulib/m4/mbiter.m4 b/gnulib/m4/mbiter.m4 deleted file mode 100644 index 8582b30..0000000 --- a/gnulib/m4/mbiter.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# mbiter.m4 serial 6 -dnl Copyright (C) 2005, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl autoconf tests required for use of mbiter.h -dnl From Bruno Haible. - -AC_DEFUN([gl_MBITER], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - : -]) diff --git a/gnulib/m4/mbrtowc.m4 b/gnulib/m4/mbrtowc.m4 deleted file mode 100644 index c353862..0000000 --- a/gnulib/m4/mbrtowc.m4 +++ /dev/null @@ -1,564 +0,0 @@ -# mbrtowc.m4 serial 22 -dnl Copyright (C) 2001-2002, 2004-2005, 2008-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MBRTOWC], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - gl_MBSTATE_T_BROKEN - - AC_CHECK_FUNCS_ONCE([mbrtowc]) - if test $ac_cv_func_mbrtowc = no; then - HAVE_MBRTOWC=0 - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBRTOWC=1 - else - gl_MBRTOWC_NULL_ARG1 - gl_MBRTOWC_NULL_ARG2 - gl_MBRTOWC_RETVAL - gl_MBRTOWC_NUL_RETVAL - case "$gl_cv_func_mbrtowc_null_arg1" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1], - [Define if the mbrtowc function has the NULL pwc argument bug.]) - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_null_arg2" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_NULL_ARG2_BUG], [1], - [Define if the mbrtowc function has the NULL string argument bug.]) - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_retval" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], - [Define if the mbrtowc function returns a wrong return value.]) - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_nul_retval" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1], - [Define if the mbrtowc function does not return 0 for a NUL character.]) - REPLACE_MBRTOWC=1 - ;; - esac - fi - fi - if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then - gl_REPLACE_WCHAR_H - AC_LIBOBJ([mbrtowc]) - gl_PREREQ_MBRTOWC - fi -]) - -dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that -dnl redefines the semantics of the given mbstate_t type. -dnl Result is REPLACE_MBSTATE_T. -dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to -dnl avoid inconsistencies. - -AC_DEFUN([gl_MBSTATE_T_BROKEN], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - AC_CHECK_FUNCS_ONCE([mbsinit]) - AC_CHECK_FUNCS_ONCE([mbrtowc]) - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - gl_MBRTOWC_INCOMPLETE_STATE - gl_MBRTOWC_SANITYCHECK - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 - fi - if test $REPLACE_MBSTATE_T = 1; then - gl_REPLACE_WCHAR_H - fi -]) - -dnl Test whether mbrtowc puts the state into non-initial state when parsing an -dnl incomplete multibyte character. -dnl Result is gl_cv_func_mbrtowc_incomplete_state. - -AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_JA]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbrtowc handles incomplete characters], - [gl_cv_func_mbrtowc_incomplete_state], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_JA != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 1; - } - return 0; -}]])], - [gl_cv_func_mbrtowc_incomplete_state=yes], - [gl_cv_func_mbrtowc_incomplete_state=no], - [:]) - fi - ]) -]) - -dnl Test whether mbrtowc works not worse than mbtowc. -dnl Result is gl_cv_func_mbrtowc_sanitycheck. - -AC_DEFUN([gl_MBRTOWC_SANITYCHECK], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_ZH_CN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc], - [gl_cv_func_mbrtowc_sanitycheck], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_ZH_CN != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 1; - } - return 0; -}]])], - [gl_cv_func_mbrtowc_sanitycheck=yes], - [gl_cv_func_mbrtowc_sanitycheck=no], - [:]) - fi - ]) -]) - -dnl Test whether mbrtowc supports a NULL pwc argument correctly. -dnl Result is gl_cv_func_mbrtowc_null_arg1. - -AC_DEFUN([gl_MBRTOWC_NULL_ARG1], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR_UTF8]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbrtowc handles a NULL pwc argument], - [gl_cv_func_mbrtowc_null_arg1], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris. - solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR_UTF8 != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - char input[] = "\303\237er"; - mbstate_t state; - wchar_t wc; - size_t ret; - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 5, &state); - if (ret != 2) - result |= 1; - if (!mbsinit (&state)) - result |= 2; - - memset (&state, '\0', sizeof (mbstate_t)); - ret = mbrtowc (NULL, input, 5, &state); - if (ret != 2) /* Solaris 7 fails here: ret is -1. */ - result |= 4; - if (!mbsinit (&state)) - result |= 8; - } - return result; -}]])], - [gl_cv_func_mbrtowc_null_arg1=yes], - [gl_cv_func_mbrtowc_null_arg1=no], - [:]) - fi - ]) -]) - -dnl Test whether mbrtowc supports a NULL string argument correctly. -dnl Result is gl_cv_func_mbrtowc_null_arg2. - -AC_DEFUN([gl_MBRTOWC_NULL_ARG2], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR_UTF8]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument], - [gl_cv_func_mbrtowc_null_arg2], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on OSF/1. - osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR_UTF8 != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - mbstate_t state; - wchar_t wc; - int ret; - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - mbrtowc (&wc, NULL, 5, &state); - /* Check that wc was not modified. */ - if (wc != (wchar_t) 0xBADFACE) - return 1; - } - return 0; -}]])], - [gl_cv_func_mbrtowc_null_arg2=yes], - [gl_cv_func_mbrtowc_null_arg2=no], - [:]) - fi - ]) -]) - -dnl Test whether mbrtowc, when parsing the end of a multibyte character, -dnl correctly returns the number of bytes that were needed to complete the -dnl character (not the total number of bytes of the multibyte character). -dnl Result is gl_cv_func_mbrtowc_retval. - -AC_DEFUN([gl_MBRTOWC_RETVAL], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR_UTF8]) - AC_REQUIRE([gt_LOCALE_JA]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CACHE_CHECK([whether mbrtowc has a correct return value], - [gl_cv_func_mbrtowc_retval], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on HP-UX, Solaris, native Windows. - hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_retval="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ - || { case "$host_os" in mingw*) true;; *) false;; esac; }; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - int found_some_locale = 0; - /* This fails on Solaris. */ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - char input[] = "B\303\274\303\237er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - { - input[1] = '\0'; - if (mbrtowc (&wc, input + 2, 5, &state) != 1) - result |= 1; - } - found_some_locale = 1; - } - /* This fails on HP-UX 11.11. */ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - { - input[1] = '\0'; - if (mbrtowc (&wc, input + 2, 5, &state) != 2) - result |= 2; - } - found_some_locale = 1; - } - /* This fails on native Windows. */ - if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) - { - char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 4; - } - found_some_locale = 1; - } - if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) - { - char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 8; - } - found_some_locale = 1; - } - if (setlocale (LC_ALL, "Chinese_China.936") != NULL) - { - char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 16; - } - found_some_locale = 1; - } - return (found_some_locale ? result : 77); -}]])], - [gl_cv_func_mbrtowc_retval=yes], - [if test $? != 77; then - gl_cv_func_mbrtowc_retval=no - fi - ], - [:]) - fi - ]) -]) - -dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0. -dnl Result is gl_cv_func_mbrtowc_nul_retval. - -AC_DEFUN([gl_MBRTOWC_NUL_RETVAL], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_ZH_CN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character], - [gl_cv_func_mbrtowc_nul_retval], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris 8 and 9. - solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_ZH_CN != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8 and 9. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, "", 1, &state) != 0) - return 1; - } - return 0; -}]])], - [gl_cv_func_mbrtowc_nul_retval=yes], - [gl_cv_func_mbrtowc_nul_retval=no], - [:]) - fi - ]) -]) - -# Prerequisites of lib/mbrtowc.c. -AC_DEFUN([gl_PREREQ_MBRTOWC], [ - : -]) - - -dnl From Paul Eggert - -dnl This is an override of an autoconf macro. - -AC_DEFUN([AC_FUNC_MBRTOWC], -[ - dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. - AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], - gl_cv_func_mbrtowc, - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include ]], - [[wchar_t wc; - char const s[] = ""; - size_t n = 1; - mbstate_t state; - return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], - gl_cv_func_mbrtowc=yes, - gl_cv_func_mbrtowc=no)]) - if test $gl_cv_func_mbrtowc = yes; then - AC_DEFINE([HAVE_MBRTOWC], [1], - [Define to 1 if mbrtowc and mbstate_t are properly declared.]) - fi -]) diff --git a/gnulib/m4/mbsinit.m4 b/gnulib/m4/mbsinit.m4 deleted file mode 100644 index 47e2d14..0000000 --- a/gnulib/m4/mbsinit.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# mbsinit.m4 serial 5 -dnl Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MBSINIT], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - gl_MBSTATE_T_BROKEN - - AC_CHECK_FUNCS_ONCE([mbsinit]) - if test $ac_cv_func_mbsinit = no; then - HAVE_MBSINIT=0 - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBSINIT=1 - else - dnl On mingw, mbsinit() always returns 1, which is inappropriate for - dnl states produced by mbrtowc() for an incomplete multibyte character - dnl in multibyte locales. - case "$host_os" in - mingw*) REPLACE_MBSINIT=1 ;; - esac - fi - fi - if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then - gl_REPLACE_WCHAR_H - AC_LIBOBJ([mbsinit]) - gl_PREREQ_MBSINIT - fi -]) - -# Prerequisites of lib/mbsinit.c. -AC_DEFUN([gl_PREREQ_MBSINIT], [ - : -]) diff --git a/gnulib/m4/mbslen.m4 b/gnulib/m4/mbslen.m4 deleted file mode 100644 index 1936050..0000000 --- a/gnulib/m4/mbslen.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# mbslen.m4 serial 2 -dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MBSLEN], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([mbslen]) - if test $ac_cv_func_mbslen = yes; then - HAVE_MBSLEN=1 - else - HAVE_MBSLEN=0 - fi -]) diff --git a/gnulib/m4/mbsrtowcs.m4 b/gnulib/m4/mbsrtowcs.m4 deleted file mode 100644 index 1fe8dcf..0000000 --- a/gnulib/m4/mbsrtowcs.m4 +++ /dev/null @@ -1,145 +0,0 @@ -# mbsrtowcs.m4 serial 10 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MBSRTOWCS], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - gl_MBSTATE_T_BROKEN - - AC_CHECK_FUNCS_ONCE([mbsrtowcs]) - if test $ac_cv_func_mbsrtowcs = no; then - HAVE_MBSRTOWCS=0 - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBSRTOWCS=1 - else - gl_MBSRTOWCS_WORKS - case "$gl_cv_func_mbsrtowcs_works" in - *yes) ;; - *) REPLACE_MBSRTOWCS=1 ;; - esac - fi - fi - if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then - gl_REPLACE_WCHAR_H - AC_LIBOBJ([mbsrtowcs]) - AC_LIBOBJ([mbsrtowcs-state]) - gl_PREREQ_MBSRTOWCS - fi -]) - -dnl Test whether mbsrtowcs works. -dnl Result is gl_cv_func_mbsrtowcs_works. - -AC_DEFUN([gl_MBSRTOWCS_WORKS], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR]) - AC_REQUIRE([gt_LOCALE_FR_UTF8]) - AC_REQUIRE([gt_LOCALE_JA]) - AC_REQUIRE([gt_LOCALE_ZH_CN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbsrtowcs works], - [gl_cv_func_mbsrtowcs_works], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on HP-UX, Solaris, mingw. - hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - /* Test whether the function supports a NULL destination argument. - This fails on native Windows. */ - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - const char input[] = "\337er"; - const char *src = input; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbsrtowcs (NULL, &src, 1, &state) != 3 - || src != input) - result |= 1; - } - /* Test whether the function works when started with a conversion state - in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - const char input[] = "B\303\274\303\237er"; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 2; - if (mbsrtowcs (NULL, &src, 10, &state) != 4) - result |= 2; - } - } - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "<\306\374\313\334\270\354>"; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 4; - if (mbsrtowcs (NULL, &src, 10, &state) != 3) - result |= 4; - } - } - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - const char input[] = "B\250\271\201\060\211\070er"; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 2; - if (mbsrtowcs (NULL, &src, 10, &state) != 4) - result |= 8; - } - } - return result; -}]])], - [gl_cv_func_mbsrtowcs_works=yes], - [gl_cv_func_mbsrtowcs_works=no], - [:]) - fi - ]) -]) - -# Prerequisites of lib/mbsrtowcs.c. -AC_DEFUN([gl_PREREQ_MBSRTOWCS], [ - : -]) diff --git a/gnulib/m4/mbstate_t.m4 b/gnulib/m4/mbstate_t.m4 deleted file mode 100644 index f7c46b8..0000000 --- a/gnulib/m4/mbstate_t.m4 +++ /dev/null @@ -1,41 +0,0 @@ -# mbstate_t.m4 serial 13 -dnl Copyright (C) 2000-2002, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# From Paul Eggert. - -# BeOS 5 has but does not define mbstate_t, -# so you can't declare an object of that type. -# Check for this incompatibility with Standard C. - -# AC_TYPE_MBSTATE_T -# ----------------- -AC_DEFUN([AC_TYPE_MBSTATE_T], -[ - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11 - - AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include ]], - [[mbstate_t x; return sizeof x;]])], - [ac_cv_type_mbstate_t=yes], - [ac_cv_type_mbstate_t=no])]) - if test $ac_cv_type_mbstate_t = yes; then - AC_DEFINE([HAVE_MBSTATE_T], [1], - [Define to 1 if declares mbstate_t.]) - else - AC_DEFINE([mbstate_t], [int], - [Define to a type if does not define.]) - fi -]) diff --git a/gnulib/m4/mbtowc.m4 b/gnulib/m4/mbtowc.m4 deleted file mode 100644 index 9215892..0000000 --- a/gnulib/m4/mbtowc.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# mbtowc.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MBTOWC], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - - if false; then - REPLACE_MBTOWC=1 - fi - if test $REPLACE_MBTOWC = 1; then - AC_LIBOBJ([mbtowc]) - gl_PREREQ_MBTOWC - fi -]) - -# Prerequisites of lib/mbtowc.c. -AC_DEFUN([gl_PREREQ_MBTOWC], [ - : -]) diff --git a/gnulib/m4/memchr.m4 b/gnulib/m4/memchr.m4 deleted file mode 100644 index 3c2b313..0000000 --- a/gnulib/m4/memchr.m4 +++ /dev/null @@ -1,88 +0,0 @@ -# memchr.m4 serial 10 -dnl Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN_ONCE([gl_FUNC_MEMCHR], -[ - dnl Check for prerequisites for memory fence checks. - gl_FUNC_MMAP_ANON - AC_CHECK_HEADERS_ONCE([sys/mman.h]) - AC_CHECK_FUNCS_ONCE([mprotect]) - - dnl These days, we assume memchr is present. But just in case... - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([memchr]) - if test $ac_cv_func_memchr = yes; then - # Detect platform-specific bugs in some versions of glibc: - # memchr should not dereference anything with length 0 - # http://bugzilla.redhat.com/499689 - # memchr should not dereference overestimated length after a match - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 - # Assume that memchr works on platforms that lack mprotect. - AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include -#if HAVE_SYS_MMAN_H -# include -# include -# include -# include -# ifndef MAP_FILE -# define MAP_FILE 0 -# endif -#endif -]], [[ - int result = 0; - char *fence = NULL; -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# if HAVE_MAP_ANONYMOUS - const int flags = MAP_ANONYMOUS | MAP_PRIVATE; - const int fd = -1; -# else /* !HAVE_MAP_ANONYMOUS */ - const int flags = MAP_FILE | MAP_PRIVATE; - int fd = open ("/dev/zero", O_RDONLY, 0666); - if (fd >= 0) -# endif - { - int pagesize = getpagesize (); - char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - fence = two_pages + pagesize; - } -#endif - if (fence) - { - if (memchr (fence, 0, 0)) - result |= 1; - strcpy (fence - 9, "12345678"); - if (memchr (fence - 9, 0, 79) != fence - 1) - result |= 2; - if (memchr (fence - 1, 0, 3) != fence - 1) - result |= 4; - } - return result; -]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], - [dnl Be pessimistic for now. - gl_cv_func_memchr_works="guessing no"])]) - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_MEMCHR=1 - fi - else - HAVE_MEMCHR=0 - fi - if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then - AC_LIBOBJ([memchr]) - gl_PREREQ_MEMCHR - fi -]) - -# Prerequisites of lib/memchr.c. -AC_DEFUN([gl_PREREQ_MEMCHR], [ - AC_CHECK_HEADERS([bp-sym.h]) -]) diff --git a/gnulib/m4/mempcpy.m4 b/gnulib/m4/mempcpy.m4 deleted file mode 100644 index cc36900..0000000 --- a/gnulib/m4/mempcpy.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# mempcpy.m4 serial 10 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MEMPCPY], -[ - dnl Persuade glibc to declare mempcpy(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'. - AC_REQUIRE([AC_C_RESTRICT]) - - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REPLACE_FUNCS([mempcpy]) - if test $ac_cv_func_mempcpy = no; then - HAVE_MEMPCPY=0 - gl_PREREQ_MEMPCPY - fi -]) - -# Prerequisites of lib/mempcpy.c. -AC_DEFUN([gl_PREREQ_MEMPCPY], [ - : -]) diff --git a/gnulib/m4/memrchr.m4 b/gnulib/m4/memrchr.m4 deleted file mode 100644 index 90a8944..0000000 --- a/gnulib/m4/memrchr.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# memrchr.m4 serial 9 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MEMRCHR], -[ - dnl Persuade glibc to declare memrchr(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_CHECK_DECLS_ONCE([memrchr]) - if test $ac_cv_have_decl_memrchr = no; then - HAVE_DECL_MEMRCHR=0 - fi - - AC_REPLACE_FUNCS([memrchr]) - if test $ac_cv_func_memrchr = no; then - gl_PREREQ_MEMRCHR - fi -]) - -# Prerequisites of lib/memrchr.c. -AC_DEFUN([gl_PREREQ_MEMRCHR], [:]) diff --git a/gnulib/m4/mgetgroups.m4 b/gnulib/m4/mgetgroups.m4 deleted file mode 100644 index fa8e9c2..0000000 --- a/gnulib/m4/mgetgroups.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 4 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MGETGROUPS], -[ - AC_CHECK_FUNCS_ONCE([getgrouplist]) - AC_LIBOBJ([mgetgroups]) -]) diff --git a/gnulib/m4/mkdir.m4 b/gnulib/m4/mkdir.m4 deleted file mode 100644 index b6fd09d..0000000 --- a/gnulib/m4/mkdir.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# serial 9 - -# Copyright (C) 2001, 2003-2004, 2006, 2008-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# On some systems, mkdir ("foo/", 0700) fails because of the trailing slash. -# On others, mkdir ("foo/./", 0700) mistakenly succeeds. -# On such systems, arrange to use a wrapper function. -AC_DEFUN([gl_FUNC_MKDIR], -[dnl - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - AC_CHECK_HEADERS_ONCE([unistd.h]) - AC_CACHE_CHECK([whether mkdir handles trailing slash], - [gl_cv_func_mkdir_trailing_slash_works], - [rm -rf conftest.dir - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -# include -# include -]], [return mkdir ("conftest.dir/", 0700);])], - [gl_cv_func_mkdir_trailing_slash_works=yes], - [gl_cv_func_mkdir_trailing_slash_works=no], - [gl_cv_func_mkdir_trailing_slash_works="guessing no"]) - rm -rf conftest.dir - ] - ) - if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then - REPLACE_MKDIR=1 - AC_LIBOBJ([mkdir]) - fi - - AC_CACHE_CHECK([whether mkdir handles trailing dot], - [gl_cv_func_mkdir_trailing_dot_works], - [rm -rf conftest.dir - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -# include -# include -]], [return !mkdir ("conftest.dir/./", 0700);])], - [gl_cv_func_mkdir_trailing_dot_works=yes], - [gl_cv_func_mkdir_trailing_dot_works=no], - [gl_cv_func_mkdir_trailing_dot_works="guessing no"]) - rm -rf conftest.dir - ] - ) - if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then - REPLACE_MKDIR=1 - AC_LIBOBJ([mkdir]) - AC_DEFINE([FUNC_MKDIR_DOT_BUG], [1], [Define to 1 if mkdir mistakenly - creates a directory given with a trailing dot component.]) - fi -]) diff --git a/gnulib/m4/mktime.m4 b/gnulib/m4/mktime.m4 deleted file mode 100644 index 56b2416..0000000 --- a/gnulib/m4/mktime.m4 +++ /dev/null @@ -1,241 +0,0 @@ -# serial 19 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. - -# Redefine AC_FUNC_MKTIME, because it is no longer maintained in Autoconf. -# AC_FUNC_MKTIME -# -------------- -AC_DEFUN([AC_FUNC_MKTIME], -[AC_CHECK_HEADERS_ONCE([unistd.h]) -AC_CHECK_FUNCS_ONCE([alarm]) -AC_REQUIRE([gl_MULTIARCH]) -if test $APPLE_UNIVERSAL_BUILD = 1; then - # A universal build on Apple MacOS X platforms. - # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. - # But we need a configuration result that is valid in both modes. - ac_cv_func_working_mktime=no -fi -AC_CACHE_CHECK([for working mktime], [ac_cv_func_working_mktime], -[AC_RUN_IFELSE([AC_LANG_SOURCE( -[[/* Test program from Paul Eggert and Tony Leneis. */ -#include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifndef HAVE_ALARM -# define alarm(X) /* empty */ -#endif - -/* Work around redefinition to rpl_putenv by other config tests. */ -#undef putenv - -static time_t time_t_max; -static time_t time_t_min; - -/* Values we'll use to set the TZ environment variable. */ -static char *tz_strings[] = { - (char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" -}; -#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) - -/* Return 0 if mktime fails to convert a date in the spring-forward gap. - Based on a problem report from Andreas Jaeger. */ -static int -spring_forward_gap () -{ - /* glibc (up to about 1998-10-07) failed this test. */ - struct tm tm; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - return mktime (&tm) != (time_t) -1; -} - -static int -mktime_test1 (time_t now) -{ - struct tm *lt; - return ! (lt = localtime (&now)) || mktime (lt) == now; -} - -static int -mktime_test (time_t now) -{ - return (mktime_test1 (now) - && mktime_test1 ((time_t) (time_t_max - now)) - && mktime_test1 ((time_t) (time_t_min + now))); -} - -static int -irix_6_4_bug () -{ - /* Based on code from Ariel Faigon. */ - struct tm tm; - tm.tm_year = 96; - tm.tm_mon = 3; - tm.tm_mday = 0; - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - mktime (&tm); - return tm.tm_mon == 2 && tm.tm_mday == 31; -} - -static int -bigtime_test (int j) -{ - struct tm tm; - time_t now; - tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; - now = mktime (&tm); - if (now != (time_t) -1) - { - struct tm *lt = localtime (&now); - if (! (lt - && lt->tm_year == tm.tm_year - && lt->tm_mon == tm.tm_mon - && lt->tm_mday == tm.tm_mday - && lt->tm_hour == tm.tm_hour - && lt->tm_min == tm.tm_min - && lt->tm_sec == tm.tm_sec - && lt->tm_yday == tm.tm_yday - && lt->tm_wday == tm.tm_wday - && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) - == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) - return 0; - } - return 1; -} - -static int -year_2050_test () -{ - /* The correct answer for 2050-02-01 00:00:00 in Pacific time, - ignoring leap seconds. */ - unsigned long int answer = 2527315200UL; - - struct tm tm; - time_t t; - tm.tm_year = 2050 - 1900; - tm.tm_mon = 2 - 1; - tm.tm_mday = 1; - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - tm.tm_isdst = -1; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - - t = mktime (&tm); - - /* Check that the result is either a failure, or close enough - to the correct answer that we can assume the discrepancy is - due to leap seconds. */ - return (t == (time_t) -1 - || (0 < t && answer - 120 <= t && t <= answer + 120)); -} - -int -main () -{ - int result = 0; - time_t t, delta; - int i, j; - int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; - int time_t_signed = ! ((time_t) 0 < (time_t) -1); - - /* This test makes some buggy mktime implementations loop. - Give up after 60 seconds; a mktime slower than that - isn't worth using anyway. */ - alarm (60); - - time_t_max = (! time_t_signed - ? (time_t) -1 - : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) - * 2 + 1)); - time_t_min = (! time_t_signed - ? (time_t) 0 - : time_t_signed_magnitude - ? ~ (time_t) 0 - : ~ time_t_max); - - delta = time_t_max / 997; /* a suitable prime number */ - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) - putenv (tz_strings[i]); - - for (t = 0; t <= time_t_max - delta; t += delta) - if (! mktime_test (t)) - result |= 1; - if (! (mktime_test ((time_t) 1) - && mktime_test ((time_t) (60 * 60)) - && mktime_test ((time_t) (60 * 60 * 24)))) - result |= 2; - - for (j = 1; ; j <<= 1) - if (! bigtime_test (j)) - result |= 4; - else if (INT_MAX / 2 < j) - break; - if (! bigtime_test (INT_MAX)) - result |= 8; - } - if (! irix_6_4_bug ()) - result |= 16; - if (! spring_forward_gap ()) - result |= 32; - if (! year_2050_test ()) - result |= 64; - return result; -}]])], - [ac_cv_func_working_mktime=yes], - [ac_cv_func_working_mktime=no], - [ac_cv_func_working_mktime=no])]) -if test $ac_cv_func_working_mktime = no; then - AC_LIBOBJ([mktime]) -fi -])# AC_FUNC_MKTIME - -AC_DEFUN([gl_FUNC_MKTIME], -[ - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - AC_FUNC_MKTIME - dnl Note: AC_FUNC_MKTIME does AC_LIBOBJ([mktime]). - if test $ac_cv_func_working_mktime = no; then - REPLACE_MKTIME=1 - gl_PREREQ_MKTIME - else - REPLACE_MKTIME=0 - fi -]) - -# Prerequisites of lib/mktime.c. -AC_DEFUN([gl_PREREQ_MKTIME], -[ - AC_REQUIRE([AC_C_INLINE]) -]) diff --git a/gnulib/m4/mmap-anon.m4 b/gnulib/m4/mmap-anon.m4 deleted file mode 100644 index 7ba7fd2..0000000 --- a/gnulib/m4/mmap-anon.m4 +++ /dev/null @@ -1,55 +0,0 @@ -# mmap-anon.m4 serial 9 -dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Detect how mmap can be used to create anonymous (not file-backed) memory -# mappings. -# - 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 IRIX, neither exists, and a file descriptor opened to /dev/zero must be -# used. - -AC_DEFUN([gl_FUNC_MMAP_ANON], -[ - dnl Persuade glibc to define MAP_ANONYMOUS. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it - # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is - # irrelevant for anonymous mappings. - AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no]) - - # Try to allow MAP_ANONYMOUS. - gl_have_mmap_anonymous=no - if test $gl_have_mmap = yes; then - AC_MSG_CHECKING([for MAP_ANONYMOUS]) - AC_EGREP_CPP([I cant identify this map.], [ -#include -#ifdef MAP_ANONYMOUS - I cant identify this map. -#endif -], - [gl_have_mmap_anonymous=yes]) - if test $gl_have_mmap_anonymous != yes; then - AC_EGREP_CPP([I cant identify this map.], [ -#include -#ifdef MAP_ANON - I cant identify this map. -#endif -], - [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], - [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.]) - gl_have_mmap_anonymous=yes]) - fi - AC_MSG_RESULT([$gl_have_mmap_anonymous]) - if test $gl_have_mmap_anonymous = yes; then - AC_DEFINE([HAVE_MAP_ANONYMOUS], [1], - [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and .]) - fi - fi -]) diff --git a/gnulib/m4/mode_t.m4 b/gnulib/m4/mode_t.m4 deleted file mode 100644 index f9cf704..0000000 --- a/gnulib/m4/mode_t.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# mode_t.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# For using mode_t, it's sufficient to use AC_TYPE_MODE_T and -# include . - -# Define PROMOTED_MODE_T to the type that is the result of "default argument -# promotion" (ISO C 6.5.2.2.(6)) of the type mode_t. -AC_DEFUN([gl_PROMOTED_TYPE_MODE_T], -[ - AC_REQUIRE([AC_TYPE_MODE_T]) - AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [ - dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int', - dnl and to itself otherwise. This assumption is not guaranteed by the ISO C - dnl standard, but we don't know of any real-world counterexamples. - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])], - [gl_cv_promoted_mode_t='int'], - [gl_cv_promoted_mode_t='mode_t']) - ]) - AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t], - [Define to the type that is the result of default argument promotions of type mode_t.]) -]) diff --git a/gnulib/m4/modechange.m4 b/gnulib/m4/modechange.m4 deleted file mode 100644 index 8661ade..0000000 --- a/gnulib/m4/modechange.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# modechange.m4 serial 6 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MODECHANGE], -[ - AC_LIBOBJ([modechange]) -]) diff --git a/gnulib/m4/mountlist.m4 b/gnulib/m4/mountlist.m4 deleted file mode 100644 index 12c9d0e..0000000 --- a/gnulib/m4/mountlist.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# serial 10 -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MOUNTLIST], -[ - gl_LIST_MOUNTED_FILE_SYSTEMS([gl_cv_list_mounted_fs=yes], - [gl_cv_list_mounted_fs=no]) - if test $gl_cv_list_mounted_fs = yes; then - AC_LIBOBJ([mountlist]) - gl_PREREQ_MOUNTLIST_EXTRA - fi -]) - -# Prerequisites of lib/mountlist.c not done by gl_LIST_MOUNTED_FILE_SYSTEMS. -AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA], -[ - dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h. - AC_CHECK_HEADERS([sys/mntent.h]) - gl_FSTYPENAME -]) diff --git a/gnulib/m4/multiarch.m4 b/gnulib/m4/multiarch.m4 deleted file mode 100644 index 691d892..0000000 --- a/gnulib/m4/multiarch.m4 +++ /dev/null @@ -1,62 +0,0 @@ -# multiarch.m4 serial 6 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# 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 -# 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 -# this: -# -# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ -# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ -# CPP="gcc -E" CXXCPP="g++ -E" -# -# Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly. - -AC_DEFUN_ONCE([gl_MULTIARCH], -[ - dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. - gl_cv_c_multiarch=no - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - ]])], - [ - dnl Check for potential -arch flags. It is not universal unless - dnl there are at least two -arch flags with different values. - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done - ]) - if test $gl_cv_c_multiarch = yes; then - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi - AC_SUBST([APPLE_UNIVERSAL_BUILD]) -]) diff --git a/gnulib/m4/nl_langinfo.m4 b/gnulib/m4/nl_langinfo.m4 deleted file mode 100644 index ca9d28d..0000000 --- a/gnulib/m4/nl_langinfo.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# nl_langinfo.m4 serial 4 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_NL_LANGINFO], -[ - AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) - AC_REQUIRE([gl_LANGINFO_H]) - AC_CHECK_FUNCS_ONCE([nl_langinfo]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - if test $ac_cv_func_nl_langinfo = yes; then - # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. - AC_CACHE_CHECK([whether YESEXPR works], - [gl_cv_func_nl_langinfo_yesexpr_works], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM([[#include -]], [[return !*nl_langinfo(YESEXPR); -]])], - [gl_cv_func_nl_langinfo_yesexpr_works=yes], - [gl_cv_func_nl_langinfo_yesexpr_works=no], - [ - case "$host_os" in - # Guess no on irix systems. - irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; - # Guess yes elsewhere. - *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; - esac - ]) - ]) - case $gl_cv_func_nl_langinfo_yesexpr_works in - *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; - *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; - esac - AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS], - [$FUNC_NL_LANGINFO_YESEXPR_WORKS], - [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.]) - if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ - && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then - : - else - REPLACE_NL_LANGINFO=1 - AC_DEFINE([REPLACE_NL_LANGINFO], [1], - [Define if nl_langinfo exists but is overridden by gnulib.]) - AC_LIBOBJ([nl_langinfo]) - fi - else - HAVE_NL_LANGINFO=0 - AC_LIBOBJ([nl_langinfo]) - fi -]) diff --git a/gnulib/m4/nls.m4 b/gnulib/m4/nls.m4 deleted file mode 100644 index 6a21216..0000000 --- a/gnulib/m4/nls.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2011 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, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -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 Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -AC_PREREQ([2.50]) - -AC_DEFUN([AM_NLS], -[ - AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE([nls], - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT([$USE_NLS]) - AC_SUBST([USE_NLS]) -]) diff --git a/gnulib/m4/onceonly.m4 b/gnulib/m4/onceonly.m4 deleted file mode 100644 index 223071a..0000000 --- a/gnulib/m4/onceonly.m4 +++ /dev/null @@ -1,91 +0,0 @@ -# onceonly.m4 serial 7 -dnl Copyright (C) 2002-2003, 2005-2006, 2008-2011 Free Software Foundation, -dnl Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -dnl This file defines some "once only" variants of standard autoconf macros. -dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS -dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS -dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS -dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL -dnl The advantage is that the check for each of the headers/functions/decls -dnl will be put only once into the 'configure' file. It keeps the size of -dnl the 'configure' file down, and avoids redundant output when 'configure' -dnl is run. -dnl The drawback is that the checks cannot be conditionalized. If you write -dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi -dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to -dnl empty, and the check will be inserted before the body of the AC_DEFUNed -dnl function. - -dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE -dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to -dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested -dnl headers at once, thus reducing the size of 'configure'. It is known to work -dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%. - -dnl Autoconf version 2.59 plus gnulib is required; this file is not needed -dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of -dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first -dnl argument! -AC_PREREQ([2.59]) - -# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of -# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). -AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ - : - m4_foreach_w([gl_HEADER_NAME], [$1], [ - AC_DEFUN([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME, - [./-], [___])), [ - m4_divert_text([INIT_PREPARE], - [gl_header_list="$gl_header_list gl_HEADER_NAME"]) - gl_HEADERS_EXPANSION - AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])), - [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.]) - ]) - AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME, - [./-], [___]))) - ]) -]) -m4_define([gl_HEADERS_EXPANSION], [ - m4_divert_text([DEFAULTS], [gl_header_list=]) - AC_CHECK_HEADERS([$gl_header_list]) - m4_define([gl_HEADERS_EXPANSION], []) -]) - -# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of -# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). -AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ - : - m4_foreach_w([gl_FUNC_NAME], [$1], [ - AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ - m4_divert_text([INIT_PREPARE], - [gl_func_list="$gl_func_list gl_FUNC_NAME"]) - gl_FUNCS_EXPANSION - AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])), - [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.]) - ]) - AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) - ]) -]) -m4_define([gl_FUNCS_EXPANSION], [ - m4_divert_text([DEFAULTS], [gl_func_list=]) - AC_CHECK_FUNCS([$gl_func_list]) - m4_define([gl_FUNCS_EXPANSION], []) -]) - -# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of -# AC_CHECK_DECLS(DECL1, DECL2, ...). -AC_DEFUN([AC_CHECK_DECLS_ONCE], [ - : - m4_foreach_w([gl_DECL_NAME], [$1], [ - AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ - AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) - ]) - AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) - ]) -]) diff --git a/gnulib/m4/open.m4 b/gnulib/m4/open.m4 deleted file mode 100644 index bfebdab..0000000 --- a/gnulib/m4/open.m4 +++ /dev/null @@ -1,81 +0,0 @@ -# open.m4 serial 11 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_OPEN], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw* | pw*) - gl_REPLACE_OPEN - ;; - *) - dnl open("foo/") should not create a file when the file name has a - dnl trailing slash. FreeBSD only has the problem on symlinks. - AC_CHECK_FUNCS_ONCE([lstat]) - AC_CACHE_CHECK([whether open recognizes a trailing slash], - [gl_cv_func_open_slash], - [# Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - touch conftest.tmp - ln -s conftest.tmp conftest.lnk - fi - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#if HAVE_UNISTD_H -# include -#endif -int main () -{ - int result = 0; -#if HAVE_LSTAT - if (open ("conftest.lnk/", O_RDONLY) != -1) - result |= 1; -#endif - if (open ("conftest.sl/", O_CREAT, 0600) >= 0) - result |= 2; - return result; -}]])], - [gl_cv_func_open_slash=yes], - [gl_cv_func_open_slash=no], - [ -changequote(,)dnl - case "$host_os" in - freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) - gl_cv_func_open_slash="guessing no" ;; - *) - gl_cv_func_open_slash="guessing yes" ;; - esac -changequote([,])dnl - ]) - rm -f conftest.sl conftest.tmp conftest.lnk - ]) - case "$gl_cv_func_open_slash" in - *no) - AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], - [Define to 1 if open() fails to recognize a trailing slash.]) - gl_REPLACE_OPEN - ;; - esac - ;; - esac -]) - -AC_DEFUN([gl_REPLACE_OPEN], -[ - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - REPLACE_OPEN=1 - AC_LIBOBJ([open]) - gl_PREREQ_OPEN -]) - -# 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/gnulib/m4/openat.m4 b/gnulib/m4/openat.m4 deleted file mode 100644 index 28c0e1d..0000000 --- a/gnulib/m4/openat.m4 +++ /dev/null @@ -1,171 +0,0 @@ -# serial 31 -# See if we need to use our replacement for Solaris' openat et al functions. - -dnl Copyright (C) 2004-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Jim Meyering. - -AC_DEFUN([gl_FUNC_OPENAT], -[ - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - GNULIB_OPENAT=1 - - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - GNULIB_FCHMODAT=1 - GNULIB_FSTATAT=1 - GNULIB_MKDIRAT=1 - - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - GNULIB_FCHOWNAT=1 - GNULIB_UNLINKAT=1 - - AC_LIBOBJ([openat-proc]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([lchmod]) - AC_REPLACE_FUNCS([fchmodat fstatat mkdirat openat unlinkat]) - AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - AC_REQUIRE([gl_FUNC_UNLINK]) - case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in - yes+yes) - # GNU/Hurd has unlinkat, but it has the same bug as unlink. - if test $REPLACE_UNLINK = 1; then - AC_LIBOBJ([unlinkat]) - REPLACE_UNLINKAT=1 - fi ;; - yes+*) - # Solaris 9 has *at functions, but uniformly mishandles trailing - # slash in all of them. - AC_LIBOBJ([openat]) - REPLACE_OPENAT=1 - AC_LIBOBJ([fstatat]) - REPLACE_FSTATAT=1 - AC_LIBOBJ([unlinkat]) - REPLACE_UNLINKAT=1 - ;; - *) - HAVE_OPENAT=0 - HAVE_UNLINKAT=0 # No known system with unlinkat but not openat - HAVE_FSTATAT=0 # No known system with fstatat but not openat - gl_PREREQ_OPENAT;; - esac - if test $ac_cv_func_fchmodat != yes; then - HAVE_FCHMODAT=0 - fi - if test $ac_cv_func_mkdirat != yes; then - HAVE_MKDIRAT=0 - fi - gl_FUNC_FCHOWNAT -]) - -# gl_FUNC_FCHOWNAT_DEREF_BUG([ACTION-IF-BUGGY[, ACTION-IF-NOT_BUGGY]]) -AC_DEFUN([gl_FUNC_FCHOWNAT_DEREF_BUG], -[ - dnl Persuade glibc's to declare fchownat(). - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_CACHE_CHECK([whether fchownat works with AT_SYMLINK_NOFOLLOW], - gl_cv_func_fchownat_nofollow_works, - [ - gl_dangle=conftest.dangle - # Remove any remnants of a previous test. - rm -f $gl_dangle - # Arrange for deletion of the temporary file this test creates. - ac_clean_files="$ac_clean_files $gl_dangle" - ln -s conftest.no-such $gl_dangle - AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [[ -#include -#include -#include -#include -#include -int -main () -{ - return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), - AT_SYMLINK_NOFOLLOW) != 0 - && errno == ENOENT); -} - ]])], - [gl_cv_func_fchownat_nofollow_works=yes], - [gl_cv_func_fchownat_nofollow_works=no], - [gl_cv_func_fchownat_nofollow_works=no], - ) - ]) - AS_IF([test $gl_cv_func_fchownat_nofollow_works = no], [$1], [$2]) -]) - -# gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG([ACTION-IF-BUGGY[, ACTION-IF-NOT_BUGGY]]) -AC_DEFUN([gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG], -[ - dnl Persuade glibc's to declare fchownat(). - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_CACHE_CHECK([whether fchownat works with an empty file name], - [gl_cv_func_fchownat_empty_filename_works], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - ]], - [[int fd; - int ret; - if (mkdir ("conftestdir", 0700) < 0) - return 2; - fd = open ("conftestdir", O_RDONLY); - if (fd < 0) - return 3; - ret = fchownat (fd, "", -1, -1, 0); - close (fd); - rmdir ("conftestdir"); - return ret == 0; - ]])], - [gl_cv_func_fchownat_empty_filename_works=yes], - [gl_cv_func_fchownat_empty_filename_works=no], - [gl_cv_func_fchownat_empty_filename_works="guessing no"]) - ]) - AS_IF([test "$gl_cv_func_fchownat_empty_filename_works" != yes], [$1], [$2]) -]) - -# If we have the fchownat function, and it has the bug (in glibc-2.4) -# that it dereferences symlinks even with AT_SYMLINK_NOFOLLOW, then -# use the replacement function. -# Also if the fchownat function, like chown, has the trailing slash bug, -# use the replacement function. -# Also use the replacement function if fchownat is simply not available. -AC_DEFUN([gl_FUNC_FCHOWNAT], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([gl_FUNC_CHOWN]) - AC_CHECK_FUNC([fchownat], - [gl_FUNC_FCHOWNAT_DEREF_BUG( - [REPLACE_FCHOWNAT=1 - AC_DEFINE([FCHOWNAT_NOFOLLOW_BUG], [1], - [Define to 1 if your platform has fchownat, but it cannot - perform lchown tasks.]) - ]) - gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG( - [REPLACE_FCHOWNAT=1 - AC_DEFINE([FCHOWNAT_EMPTY_FILENAME_BUG], [1], - [Define to 1 if your platform has fchownat, but it does - not reject an empty file name.]) - ]) - if test $REPLACE_CHOWN = 1; then - REPLACE_FCHOWNAT=1 - fi], - [HAVE_FCHOWNAT=0]) - if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then - AC_LIBOBJ([fchownat]) - fi -]) - -AC_DEFUN([gl_PREREQ_OPENAT], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) - : -]) diff --git a/gnulib/m4/parse-datetime.m4 b/gnulib/m4/parse-datetime.m4 deleted file mode 100644 index e665ef3..0000000 --- a/gnulib/m4/parse-datetime.m4 +++ /dev/null @@ -1,55 +0,0 @@ -# parse-datetime.m4 serial 19 -dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Define HAVE_COMPOUND_LITERALS if the C compiler supports compound literals -dnl as in ISO C99. -dnl Note that compound literals such as (struct s) { 3, 4 } can be used for -dnl initialization of stack-allocated variables, but are not constant -dnl expressions and therefore cannot be used as initializer for global or -dnl static variables (even though gcc supports this in pre-C99 mode). -AC_DEFUN([gl_C_COMPOUND_LITERALS], -[ - AC_CACHE_CHECK([for compound literals], [gl_cv_compound_literals], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[struct s { int i, j; };]], - [[struct s t = (struct s) { 3, 4 }; - if (t.i != 0) return 0;]])], - gl_cv_compound_literals=yes, - gl_cv_compound_literals=no)]) - if test $gl_cv_compound_literals = yes; then - AC_DEFINE([HAVE_COMPOUND_LITERALS], [1], - [Define if you have compound literals.]) - fi -]) - -AC_DEFUN([gl_PARSE_DATETIME], -[ - dnl Prerequisites of lib/parse-datetime.h. - AC_REQUIRE([AM_STDBOOL_H]) - AC_REQUIRE([gl_TIMESPEC]) - - dnl Prerequisites of lib/parse-datetime.y. - AC_REQUIRE([gl_BISON]) - AC_REQUIRE([gl_C_COMPOUND_LITERALS]) - AC_STRUCT_TIMEZONE - AC_REQUIRE([gl_CLOCK_TIME]) - AC_REQUIRE([gl_TM_GMTOFF]) - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE([[ -#include /* for time_t */ -#include /* for CHAR_BIT, LONG_MIN, LONG_MAX */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1]; -typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1]; - ]])], - [AC_DEFINE([TIME_T_FITS_IN_LONG_INT], [1], - [Define to 1 if all 'time_t' values fit in a 'long int'.]) - ]) -]) diff --git a/gnulib/m4/pathmax.m4 b/gnulib/m4/pathmax.m4 deleted file mode 100644 index 17b3d64..0000000 --- a/gnulib/m4/pathmax.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# pathmax.m4 serial 8 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_PATHMAX], -[ - dnl Prerequisites of lib/pathmax.h. - AC_CHECK_FUNCS_ONCE([pathconf]) - AC_CHECK_HEADERS_ONCE([sys/param.h]) -]) diff --git a/gnulib/m4/perror.m4 b/gnulib/m4/perror.m4 deleted file mode 100644 index 2a03e08..0000000 --- a/gnulib/m4/perror.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# perror.m4 serial 1 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_PERROR], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_REQUIRE([gl_HEADER_ERRNO_H]) - if test -n "$ERRNO_H"; then - dnl The system's perror() cannot know about the new errno values we add - dnl to . Replace it. - REPLACE_PERROR=1 - AC_LIBOBJ([perror]) - fi -]) diff --git a/gnulib/m4/po.m4 b/gnulib/m4/po.m4 deleted file mode 100644 index a3e99d6..0000000 --- a/gnulib/m4/po.m4 +++ /dev/null @@ -1,449 +0,0 @@ -# po.m4 serial 17 (gettext-0.18) -dnl Copyright (C) 1995-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -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 Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -AC_PREREQ([2.50]) - -dnl Checks for all prerequisites of the po subdirectory. -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([AM_NLS])dnl - - dnl Release version of the gettext macros. This is used to ensure that - dnl the gettext macros and po/Makefile.in.in are in sync. - AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) - - dnl Perform the following tests also if --disable-nls has been given, - dnl because they are needed for "make dist" to work. - - dnl Search for GNU msgfmt in the PATH. - dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. - dnl The second test excludes FreeBSD msgfmt. - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) - - dnl Test whether it is GNU msgfmt >= 0.15. -changequote(,)dnl - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([MSGFMT_015]) -changequote(,)dnl - case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; - *) GMSGFMT_015=$GMSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([GMSGFMT_015]) - - dnl Search for GNU xgettext 0.12 or newer in the PATH. - dnl The first test excludes Solaris xgettext and early GNU xgettext versions. - dnl The second test excludes FreeBSD xgettext. - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - - dnl Test whether it is GNU xgettext >= 0.15. -changequote(,)dnl - case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; - *) XGETTEXT_015=$XGETTEXT ;; - esac -changequote([,])dnl - AC_SUBST([XGETTEXT_015]) - - dnl Search for GNU msgmerge 0.11 or newer in the PATH. - AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, - [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - - dnl Installation directories. - dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we - dnl have to define it here, so that it can be used in po/Makefile. - test -n "$localedir" || localedir='${datadir}/locale' - AC_SUBST([localedir]) - - dnl Support for AM_XGETTEXT_OPTION. - test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= - AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) - - AC_CONFIG_COMMANDS([po-directories], [[ - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - esac - # PO directories have a Makefile.in generated from Makefile.in.in. - case "$ac_file" in */Makefile.in) - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - # Treat a directory as a PO directory if and only if it has a - # POTFILES.in file. This allows packages to have multiple PO - # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" - POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' - fi - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" - sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in - *.orig | *.bak | *~) ;; - *) cat "$f" >> "$ac_dir/Makefile" ;; - esac - fi - done - fi - ;; - esac - done]], - [# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="${LINGUAS-%UNSET%}" - ]) -]) - -dnl Postprocesses a Makefile in a directory containing PO files. -AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], -[ - # When this code is run, in config.status, two variables have already been - # set: - # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, - # - LINGUAS is the value of the environment variable LINGUAS at configure - # time. - -changequote(,)dnl - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - # Find a way to echo strings without interpreting backslash. - if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='echo' - else - if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='printf %s\n' - else - echo_func () { - cat < "$ac_file.tmp" - if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - cat >> "$ac_file.tmp" < /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - cat >> "$ac_file.tmp" <> "$ac_file.tmp" < -#include -#include -#include -#if HAVE_STDINT_H_WITH_UINTMAX -# include -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -# include -#endif -static char buf[100]; -int main () -{ - int result = 0; -#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX - buf[0] = '\0'; - if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 - || strcmp (buf, "12345671 33") != 0) - result |= 1; -#endif - buf[0] = '\0'; - if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 - || strcmp (buf, "12345672 33") != 0) - result |= 2; - buf[0] = '\0'; - if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 - || strcmp (buf, "12345673 33") != 0) - result |= 4; - buf[0] = '\0'; - if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 - || strcmp (buf, "1.5 33") != 0) - result |= 8; - return result; -}]])], - [gl_cv_func_printf_sizes_c99=yes], - [gl_cv_func_printf_sizes_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; - # 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. - 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. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_printf_sizes_c99="guessing no";; - openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on Solaris >= 2.10. - solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; - solaris*) gl_cv_func_printf_sizes_c99="guessing no";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_printf_sizes_c99="guessing no";; - netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_sizes_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports 'long double' -dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_long_double. - -AC_DEFUN([gl_PRINTF_LONG_DOUBLE], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports 'long double' arguments], - [gl_cv_func_printf_long_double], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[10000]; -int main () -{ - int result = 0; - buf[0] = '\0'; - if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 - || strcmp (buf, "1.750000 33") != 0) - result |= 1; - buf[0] = '\0'; - if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 - || strcmp (buf, "1.750000e+00 33") != 0) - result |= 2; - buf[0] = '\0'; - if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 - || strcmp (buf, "1.75 33") != 0) - result |= 4; - return result; -}]])], - [gl_cv_func_printf_long_double=yes], - [gl_cv_func_printf_long_double=no], - [ -changequote(,)dnl - case "$host_os" in - beos*) gl_cv_func_printf_long_double="guessing no";; - mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; - *) gl_cv_func_printf_long_double="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports infinite and NaN -dnl 'double' arguments and negative zero arguments in the %f, %e, %g -dnl directives. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_infinite. - -AC_DEFUN([gl_PRINTF_INFINITE], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports infinite 'double' arguments], - [gl_cv_func_printf_infinite], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static int -strisnan (const char *string, size_t start_index, size_t end_index) -{ - if (start_index < end_index) - { - if (string[start_index] == '-') - start_index++; - if (start_index + 3 <= end_index - && memcmp (string + start_index, "nan", 3) == 0) - { - start_index += 3; - if (start_index == end_index - || (string[start_index] == '(' && string[end_index - 1] == ')')) - return 1; - } - } - return 0; -} -static int -have_minus_zero () -{ - static double plus_zero = 0.0; - double minus_zero = - plus_zero; - return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; -} -static char buf[10000]; -static double zero = 0.0; -int main () -{ - int result = 0; - if (sprintf (buf, "%f", 1.0 / 0.0) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%f", -1.0 / 0.0) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%f", zero / zero) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%e", 1.0 / 0.0) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 4; - if (sprintf (buf, "%e", -1.0 / 0.0) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 4; - if (sprintf (buf, "%e", zero / zero) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - if (sprintf (buf, "%g", 1.0 / 0.0) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 16; - if (sprintf (buf, "%g", -1.0 / 0.0) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 16; - if (sprintf (buf, "%g", zero / zero) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - /* This test fails on HP-UX 10.20. */ - if (have_minus_zero ()) - if (sprintf (buf, "%g", - zero) < 0 - || strcmp (buf, "-0") != 0) - result |= 64; - return result; -}]])], - [gl_cv_func_printf_infinite=yes], - [gl_cv_func_printf_infinite=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_infinite="guessing yes";; - # 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. - darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; - darwin*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on HP-UX >= 11. - hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; - hpux*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_printf_infinite="guessing no";; - netbsd*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_infinite="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_infinite="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports infinite and NaN -dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_infinite_long_double. - -AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_BIGENDIAN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - dnl The user can set or unset the variable gl_printf_safe to indicate - dnl that he wishes a safe handling of non-IEEE-754 'long double' values. - if test -n "$gl_printf_safe"; then - AC_DEFINE([CHECK_PRINTF_SAFE], [1], - [Define if you wish *printf() functions that have a safe handling of - non-IEEE-754 'long double' values.]) - fi - case "$gl_cv_func_printf_long_double" in - *yes) - AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments], - [gl_cv_func_printf_infinite_long_double], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -]GL_NOCRASH[ -#include -#include -#include -static int -strisnan (const char *string, size_t start_index, size_t end_index) -{ - if (start_index < end_index) - { - if (string[start_index] == '-') - start_index++; - if (start_index + 3 <= end_index - && memcmp (string + start_index, "nan", 3) == 0) - { - start_index += 3; - if (start_index == end_index - || (string[start_index] == '(' && string[end_index - 1] == ')')) - return 1; - } - } - return 0; -} -static char buf[10000]; -static long double zeroL = 0.0L; -int main () -{ - int result = 0; - nocrash_init(); - if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 1; - if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Le", zeroL / zeroL) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 1; - if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 1; -#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) -/* Representation of an 80-bit 'long double' as an initializer for a sequence - of 'unsigned int' words. */ -# ifdef WORDS_BIGENDIAN -# define LDBL80_WORDS(exponent,manthi,mantlo) \ - { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ - (unsigned int) (mantlo) << 16 \ - } -# else -# define LDBL80_WORDS(exponent,manthi,mantlo) \ - { mantlo, manthi, exponent } -# endif - { /* Quiet NaN. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - } - { - /* Signalling NaN. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - } - { /* Pseudo-NaN. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 4; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 4; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 4; - } - { /* Pseudo-Infinity. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - } - { /* Pseudo-Zero. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 16; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 16; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 16; - } - { /* Unnormalized number. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - } - { /* Pseudo-Denormal. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 64; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 64; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 64; - } -#endif - return result; -}]])], - [gl_cv_func_printf_infinite_long_double=yes], - [gl_cv_func_printf_infinite_long_double=no], - [ -changequote(,)dnl - case "$host_cpu" in - # Guess no on ia64, x86_64, i386. - ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; - *) - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # Guess yes on FreeBSD >= 6. - freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # Guess yes on HP-UX >= 11. - hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; - hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_infinite_long_double="guessing no";; - esac - ;; - esac -changequote([,])dnl - ]) - ]) - ;; - *) - gl_cv_func_printf_infinite_long_double="irrelevant" - ;; - esac -]) - -dnl Test whether the *printf family of functions supports the 'a' and 'A' -dnl conversion specifier for hexadecimal output of floating-point numbers. -dnl (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_directive_a. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_A], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives], - [gl_cv_func_printf_directive_a], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -int main () -{ - int result = 0; - if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 - || (strcmp (buf, "0x1.922p+1 33") != 0 - && strcmp (buf, "0x3.244p+0 33") != 0 - && strcmp (buf, "0x6.488p-1 33") != 0 - && strcmp (buf, "0xc.91p-2 33") != 0)) - result |= 1; - if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 - || (strcmp (buf, "-0X1.922P+1 33") != 0 - && strcmp (buf, "-0X3.244P+0 33") != 0 - && strcmp (buf, "-0X6.488P-1 33") != 0 - && strcmp (buf, "-0XC.91P-2 33") != 0)) - result |= 2; - /* This catches a FreeBSD 6.1 bug: it doesn't round. */ - if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 - || (strcmp (buf, "0x1.83p+0 33") != 0 - && strcmp (buf, "0x3.05p-1 33") != 0 - && strcmp (buf, "0x6.0ap-2 33") != 0 - && strcmp (buf, "0xc.14p-3 33") != 0)) - result |= 4; - /* This catches a FreeBSD 6.1 bug. See - */ - if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0 - || buf[0] == '0') - result |= 8; - /* This catches a MacOS 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 - glibc 2.4 bug . */ - if (sprintf (buf, "%.1La", 1.999L) < 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 |= 32; - return result; -}]])], - [gl_cv_func_printf_directive_a=yes], - [gl_cv_func_printf_directive_a=no], - [ - case "$host_os" in - # Guess yes on glibc >= 2.5 systems. - *-gnu*) - AC_EGREP_CPP([BZ2908], [ - #include - #ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__ - BZ2908 - #endif - #endif - ], - [gl_cv_func_printf_directive_a="guessing yes"], - [gl_cv_func_printf_directive_a="guessing no"]) - ;; - # If we don't know, assume the worst. - *) gl_cv_func_printf_directive_a="guessing no";; - esac - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the %F format -dnl directive. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_directive_f. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_F], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'F' directive], - [gl_cv_func_printf_directive_f], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -int main () -{ - int result = 0; - if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 - || strcmp (buf, "1234567.000000 33") != 0) - result |= 1; - if (sprintf (buf, "%F", 1.0 / 0.0) < 0 - || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) - result |= 2; - /* This catches a Cygwin 1.5.x bug. */ - if (sprintf (buf, "%.F", 1234.0) < 0 - || strcmp (buf, "1234") != 0) - result |= 4; - return result; -}]])], - [gl_cv_func_printf_directive_f=yes], - [gl_cv_func_printf_directive_f=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; - # 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. - 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. - solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; - solaris*) gl_cv_func_printf_sizes_c99="guessing no";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_directive_f="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the %n format -dnl directive. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_directive_n. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_N], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'n' directive], - [gl_cv_func_printf_directive_n], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char fmtstring[10]; -static char buf[100]; -int main () -{ - int count = -1; - /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) - support %n in format strings in read-only memory but not in writable - memory. */ - strcpy (fmtstring, "%d %n"); - if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 - || strcmp (buf, "123 ") != 0 - || count != 4) - return 1; - return 0; -}]])], - [gl_cv_func_printf_directive_n=yes], - [gl_cv_func_printf_directive_n=no], - [ -changequote(,)dnl - case "$host_os" in - *) gl_cv_func_printf_directive_n="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the %ls format -dnl directive and in particular, when a precision is specified, whether -dnl the functions stop converting the wide string argument when the number -dnl of bytes that have been produced by this conversion equals or exceeds -dnl the precision. -dnl Result is gl_cv_func_printf_directive_ls. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_LS], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'ls' directive], - [gl_cv_func_printf_directive_ls], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -#include -int main () -{ - int result = 0; - char buf[100]; - /* Test whether %ls works at all. - This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on - Cygwin 1.5. */ - { - static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; - buf[0] = '\0'; - if (sprintf (buf, "%ls", wstring) < 0 - || strcmp (buf, "abc") != 0) - result |= 1; - } - /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an - assertion failure inside libc), but not on OpenBSD 4.0. */ - { - static const wchar_t wstring[] = { 'a', 0 }; - buf[0] = '\0'; - if (sprintf (buf, "%ls", wstring) < 0 - || strcmp (buf, "a") != 0) - result |= 2; - } - /* Test whether precisions in %ls are supported as specified in ISO C 99 - section 7.19.6.1: - "If a precision is specified, no more than that many bytes are written - (including shift sequences, if any), and the array shall contain a - null wide character if, to equal the multibyte character sequence - length given by the precision, the function would need to access a - wide character one past the end of the array." - This test fails on Solaris 10. */ - { - static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; - buf[0] = '\0'; - if (sprintf (buf, "%.2ls", wstring) < 0 - || strcmp (buf, "ab") != 0) - result |= 8; - } - return result; -}]])], - [gl_cv_func_printf_directive_ls=yes], - [gl_cv_func_printf_directive_ls=no], - [ -changequote(,)dnl - case "$host_os" in - openbsd*) gl_cv_func_printf_directive_ls="guessing no";; - irix*) gl_cv_func_printf_directive_ls="guessing no";; - solaris*) gl_cv_func_printf_directive_ls="guessing no";; - cygwin*) gl_cv_func_printf_directive_ls="guessing no";; - beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; - *) gl_cv_func_printf_directive_ls="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports POSIX/XSI format -dnl strings with positions. (POSIX:2001) -dnl Result is gl_cv_func_printf_positions. - -AC_DEFUN([gl_PRINTF_POSITIONS], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions], - [gl_cv_func_printf_positions], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* The string "%2$d %1$d", with dollar characters protected from the shell's - dollar expansion (possibly an autoconf bug). */ -static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -static char buf[100]; -int main () -{ - sprintf (buf, format, 33, 55); - return (strcmp (buf, "55 33") != 0); -}]])], - [gl_cv_func_printf_positions=yes], - [gl_cv_func_printf_positions=no], - [ -changequote(,)dnl - case "$host_os" in - netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) - gl_cv_func_printf_positions="guessing no";; - beos*) gl_cv_func_printf_positions="guessing no";; - mingw* | pw*) gl_cv_func_printf_positions="guessing no";; - *) gl_cv_func_printf_positions="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports POSIX/XSI format -dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001) -dnl Result is gl_cv_func_printf_flag_grouping. - -AC_DEFUN([gl_PRINTF_FLAG_GROUPING], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the grouping flag], - [gl_cv_func_printf_flag_grouping], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -int main () -{ - if (sprintf (buf, "%'d %d", 1234567, 99) < 0 - || buf[strlen (buf) - 1] != '9') - return 1; - return 0; -}]])], - [gl_cv_func_printf_flag_grouping=yes], - [gl_cv_func_printf_flag_grouping=no], - [ -changequote(,)dnl - case "$host_os" in - cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; - netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; - mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; - *) gl_cv_func_printf_flag_grouping="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the - flag correctly. -dnl (ISO C99.) See -dnl -dnl Result is gl_cv_func_printf_flag_leftadjust. - -AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly], - [gl_cv_func_printf_flag_leftadjust], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -int main () -{ - /* Check that a '-' flag is not annihilated by a negative width. */ - if (sprintf (buf, "a%-*sc", -3, "b") < 0 - || strcmp (buf, "ab c") != 0) - return 1; - return 0; -}]])], - [gl_cv_func_printf_flag_leftadjust=yes], - [gl_cv_func_printf_flag_leftadjust=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on HP-UX 11. - hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; - # Guess no on HP-UX 10 and older. - hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; - # Guess yes otherwise. - *) gl_cv_func_printf_flag_leftadjust="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports padding of non-finite -dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See -dnl -dnl Result is gl_cv_func_printf_flag_zero. - -AC_DEFUN([gl_PRINTF_FLAG_ZERO], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the zero flag correctly], - [gl_cv_func_printf_flag_zero], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -int main () -{ - if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0 - || (strcmp (buf, " inf") != 0 - && strcmp (buf, " infinity") != 0)) - return 1; - return 0; -}]])], - [gl_cv_func_printf_flag_zero=yes], - [gl_cv_func_printf_flag_zero=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_flag_zero="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_flag_zero="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports large precisions. -dnl On mingw, precisions larger than 512 are treated like 512, in integer, -dnl floating-point or pointer output. On Solaris 10/x86, precisions larger -dnl than 510 in floating-point output crash the program. On Solaris 10/SPARC, -dnl precisions larger than 510 in floating-point output yield wrong results. -dnl On BeOS, precisions larger than 1044 crash the program. -dnl Result is gl_cv_func_printf_precision. - -AC_DEFUN([gl_PRINTF_PRECISION], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports large precisions], - [gl_cv_func_printf_precision], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[5000]; -int main () -{ - int result = 0; -#ifdef __BEOS__ - /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ - return 1; -#endif - if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) - result |= 1; - if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5) - result |= 2; - if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5 - || buf[0] != '1') - result |= 4; - return result; -}]])], - [gl_cv_func_printf_precision=yes], - [gl_cv_func_printf_precision=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess no only on Solaris, native Win32, and BeOS systems. - solaris*) gl_cv_func_printf_precision="guessing no" ;; - mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; - beos*) gl_cv_func_printf_precision="guessing no" ;; - *) gl_cv_func_printf_precision="guessing yes" ;; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions recovers gracefully in case -dnl of an out-of-memory condition, or whether it crashes the entire program. -dnl Result is gl_cv_func_printf_enomem. - -AC_DEFUN([gl_PRINTF_ENOMEM], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_MULTIARCH]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf survives out-of-memory conditions], - [gl_cv_func_printf_enomem], - [ - gl_cv_func_printf_enomem="guessing no" - if test "$cross_compiling" = no; then - if test $APPLE_UNIVERSAL_BUILD = 0; then - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -]GL_NOCRASH[ -changequote(,)dnl -#include -#include -#include -#include -#include -int main() -{ - struct rlimit limit; - int ret; - nocrash_init (); - /* Some printf implementations allocate temporary space with malloc. */ - /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ -#ifdef RLIMIT_DATA - if (getrlimit (RLIMIT_DATA, &limit) < 0) - return 77; - if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) - limit.rlim_max = 5000000; - limit.rlim_cur = limit.rlim_max; - if (setrlimit (RLIMIT_DATA, &limit) < 0) - return 77; -#endif - /* On Linux systems, malloc() is limited by RLIMIT_AS. */ -#ifdef RLIMIT_AS - if (getrlimit (RLIMIT_AS, &limit) < 0) - return 77; - if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) - limit.rlim_max = 5000000; - limit.rlim_cur = limit.rlim_max; - if (setrlimit (RLIMIT_AS, &limit) < 0) - return 77; -#endif - /* Some printf implementations allocate temporary space on the stack. */ -#ifdef RLIMIT_STACK - if (getrlimit (RLIMIT_STACK, &limit) < 0) - return 77; - if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) - limit.rlim_max = 5000000; - limit.rlim_cur = limit.rlim_max; - if (setrlimit (RLIMIT_STACK, &limit) < 0) - return 77; -#endif - ret = printf ("%.5000000f", 1.0); - return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - (./conftest - result=$? - if test $result != 0 && test $result != 77; then result=1; fi - exit $result - ) >/dev/null 2>/dev/null - case $? in - 0) gl_cv_func_printf_enomem="yes" ;; - 77) gl_cv_func_printf_enomem="guessing no" ;; - *) gl_cv_func_printf_enomem="no" ;; - esac - else - gl_cv_func_printf_enomem="guessing no" - fi - rm -fr conftest* - else - dnl A universal build on Apple MacOS 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" - fi - fi - if test "$gl_cv_func_printf_enomem" = "guessing no"; then -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on Solaris. - solaris*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on AIX. - aix*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on HP-UX/hppa. - hpux*) case "$host_cpu" in - hppa*) gl_cv_func_printf_enomem="guessing yes";; - *) gl_cv_func_printf_enomem="guessing no";; - esac - ;; - # Guess yes on IRIX. - irix*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on OSF/1. - osf*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on Haiku. - haiku*) gl_cv_func_printf_enomem="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_enomem="guessing no";; - esac -changequote([,])dnl - fi - ]) -]) - -dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001) -dnl Result is ac_cv_func_snprintf. - -AC_DEFUN([gl_SNPRINTF_PRESENCE], -[ - AC_CHECK_FUNCS_ONCE([snprintf]) -]) - -dnl Test whether the string produced by the snprintf function is always NUL -dnl terminated. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_snprintf_truncation_c99. - -AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether snprintf truncates the result as in C99], - [gl_cv_func_snprintf_truncation_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -int main () -{ - strcpy (buf, "ABCDEF"); - snprintf (buf, 3, "%d %d", 4567, 89); - if (memcmp (buf, "45\0DEF", 6) != 0) - return 1; - return 0; -}]])], - [gl_cv_func_snprintf_truncation_c99=yes], - [gl_cv_func_snprintf_truncation_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # 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. - 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. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_snprintf_truncation_c99="guessing no";; - openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5] | solaris2.[0-5].*) - gl_cv_func_snprintf_truncation_c99="guessing no";; - solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; - aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on HP-UX >= 11. - hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; - hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on IRIX >= 6.5. - irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on OSF/1 >= 5. - osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; - osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_truncation_c99="guessing no";; - netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_truncation_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the return value of the snprintf function is the number -dnl of bytes (excluding the terminating NUL) that would have been produced -dnl if the buffer had been large enough. (ISO C99, POSIX:2001) -dnl For example, this test program fails on IRIX 6.5: -dnl --------------------------------------------------------------------- -dnl #include -dnl int main() -dnl { -dnl static char buf[8]; -dnl int retval = snprintf (buf, 3, "%d", 12345); -dnl return retval >= 0 && retval < 3; -dnl } -dnl --------------------------------------------------------------------- -dnl Result is gl_cv_func_snprintf_retval_c99. - -AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether snprintf returns a byte count as in C99], - [gl_cv_func_snprintf_retval_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -int main () -{ - strcpy (buf, "ABCDEF"); - if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) - return 1; - if (snprintf (buf, 0, "%d %d", 4567, 89) != 7) - return 2; - if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7) - return 3; - return 0; -}]])], - [gl_cv_func_snprintf_retval_c99=yes], - [gl_cv_func_snprintf_retval_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # 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. - 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. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_snprintf_retval_c99="guessing no";; - openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on Solaris >= 2.10. - solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; - solaris*) gl_cv_func_printf_sizes_c99="guessing no";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; - aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_retval_c99="guessing no";; - netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_retval_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the snprintf function supports the %n format directive -dnl also in truncated portions of the format string. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_snprintf_directive_n. - -AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive], - [gl_cv_func_snprintf_directive_n], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char fmtstring[10]; -static char buf[100]; -int main () -{ - int count = -1; - /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) - support %n in format strings in read-only memory but not in writable - memory. */ - strcpy (fmtstring, "%d %n"); - snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); - if (count != 6) - return 1; - return 0; -}]])], - [gl_cv_func_snprintf_directive_n=yes], - [gl_cv_func_snprintf_directive_n=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; - # 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. - 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. - solaris2.[0-5] | solaris2.[0-5].*) - gl_cv_func_snprintf_directive_n="guessing no";; - solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; - aix*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on IRIX >= 6.5. - irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on OSF/1 >= 5. - osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; - osf*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_directive_n="guessing no";; - netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_directive_n="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_directive_n="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the snprintf function, when passed a size = 1, writes any -dnl output without bounds in this case, behaving like sprintf. This is the -dnl case on Linux libc5. -dnl Result is gl_cv_func_snprintf_size1. - -AC_DEFUN([gl_SNPRINTF_SIZE1], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([whether snprintf respects a size of 1], - [gl_cv_func_snprintf_size1], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -int main() -{ - static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; - snprintf (buf, 1, "%d", 12345); - return buf[1] != 'E'; -}]])], - [gl_cv_func_snprintf_size1=yes], - [gl_cv_func_snprintf_size1=no], - [gl_cv_func_snprintf_size1="guessing yes"]) - ]) -]) - -dnl Test whether the vsnprintf function, when passed a zero size, produces no -dnl output. (ISO C99, POSIX:2001) -dnl For example, snprintf nevertheless writes a NUL byte in this case -dnl on OSF/1 5.1: -dnl --------------------------------------------------------------------- -dnl #include -dnl int main() -dnl { -dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; -dnl snprintf (buf, 0, "%d", 12345); -dnl return buf[0] != 'D'; -dnl } -dnl --------------------------------------------------------------------- -dnl And vsnprintf writes any output without bounds in this case, behaving like -dnl vsprintf, on HP-UX 11 and OSF/1 5.1: -dnl --------------------------------------------------------------------- -dnl #include -dnl #include -dnl static int my_snprintf (char *buf, int size, const char *format, ...) -dnl { -dnl va_list args; -dnl int ret; -dnl va_start (args, format); -dnl ret = vsnprintf (buf, size, format, args); -dnl va_end (args); -dnl return ret; -dnl } -dnl int main() -dnl { -dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; -dnl my_snprintf (buf, 0, "%d", 12345); -dnl return buf[0] != 'D'; -dnl } -dnl --------------------------------------------------------------------- -dnl Result is gl_cv_func_vsnprintf_zerosize_c99. - -AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99], - [gl_cv_func_vsnprintf_zerosize_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static int my_snprintf (char *buf, int size, const char *format, ...) -{ - va_list args; - int ret; - va_start (args, format); - ret = vsnprintf (buf, size, format, args); - va_end (args); - return ret; -} -int main() -{ - static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; - my_snprintf (buf, 0, "%d", 12345); - return buf[0] != 'D'; -}]])], - [gl_cv_func_vsnprintf_zerosize_c99=yes], - [gl_cv_func_vsnprintf_zerosize_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # 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. - darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Cygwin. - cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5] | solaris2.[0-5].*) - gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on IRIX >= 6.5. - irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on mingw. - mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl The results of these tests on various platforms are: -dnl -dnl 1 = gl_PRINTF_SIZES_C99 -dnl 2 = gl_PRINTF_LONG_DOUBLE -dnl 3 = gl_PRINTF_INFINITE -dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE -dnl 5 = gl_PRINTF_DIRECTIVE_A -dnl 6 = gl_PRINTF_DIRECTIVE_F -dnl 7 = gl_PRINTF_DIRECTIVE_N -dnl 8 = gl_PRINTF_DIRECTIVE_LS -dnl 9 = gl_PRINTF_POSITIONS -dnl 10 = gl_PRINTF_FLAG_GROUPING -dnl 11 = gl_PRINTF_FLAG_LEFTADJUST -dnl 12 = gl_PRINTF_FLAG_ZERO -dnl 13 = gl_PRINTF_PRECISION -dnl 14 = gl_PRINTF_ENOMEM -dnl 15 = gl_SNPRINTF_PRESENCE -dnl 16 = gl_SNPRINTF_TRUNCATION_C99 -dnl 17 = gl_SNPRINTF_RETVAL_C99 -dnl 18 = gl_SNPRINTF_DIRECTIVE_N -dnl 19 = gl_SNPRINTF_SIZE1 -dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99 -dnl -dnl 1 = checking whether printf supports size specifiers as in C99... -dnl 2 = checking whether printf supports 'long double' arguments... -dnl 3 = checking whether printf supports infinite 'double' arguments... -dnl 4 = checking whether printf supports infinite 'long double' arguments... -dnl 5 = checking whether printf supports the 'a' and 'A' directives... -dnl 6 = checking whether printf supports the 'F' directive... -dnl 7 = checking whether printf supports the 'n' directive... -dnl 8 = checking whether printf supports the 'ls' directive... -dnl 9 = checking whether printf supports POSIX/XSI format strings with positions... -dnl 10 = checking whether printf supports the grouping flag... -dnl 11 = checking whether printf supports the left-adjust flag correctly... -dnl 12 = checking whether printf supports the zero flag correctly... -dnl 13 = checking whether printf supports large precisions... -dnl 14 = checking whether printf survives out-of-memory conditions... -dnl 15 = checking for snprintf... -dnl 16 = checking whether snprintf truncates the result as in C99... -dnl 17 = checking whether snprintf returns a byte count as in C99... -dnl 18 = checking whether snprintf fully supports the 'n' directive... -dnl 19 = checking whether snprintf respects a size of 1... -dnl 20 = checking whether vsnprintf respects a zero size as in C99... -dnl -dnl . = yes, # = no. -dnl -dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -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 OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . . -dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . -dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . -dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . -dnl Solaris 11 2010-11 . . # # # . . # . . . # . . . . . . . . -dnl Solaris 10 . . # # # . . # . . . # # . . . . . . . -dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . . -dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # -dnl AIX 5.2, 7.1 . . # # # . . . . . . # . . . . . . . . -dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . # . . . -dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . . -dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . # -dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? # -dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . . -dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . # -dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # # -dnl NetBSD 5.0 . . . # # . . . . . . # . # . . . . . . -dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ? -dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . . -dnl Haiku . . . # # # . # . . . . . ? . . ? . . . -dnl BeOS # # . # # # . ? # . ? . # ? . . ? . . . -dnl mingw # # # # # # . . # # . # # ? . # # # . . diff --git a/gnulib/m4/priv-set.m4 b/gnulib/m4/priv-set.m4 deleted file mode 100644 index 1509ba6..0000000 --- a/gnulib/m4/priv-set.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# serial 7 - -# Copyright (C) 2009-2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by David Bartley. - -AC_DEFUN([gl_PRIV_SET], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_CHECK_FUNCS([getppriv]) - AC_CHECK_HEADERS_ONCE([priv.h]) -]) diff --git a/gnulib/m4/progtest.m4 b/gnulib/m4/progtest.m4 deleted file mode 100644 index 5130d56..0000000 --- a/gnulib/m4/progtest.m4 +++ /dev/null @@ -1,91 +0,0 @@ -# progtest.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2005, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -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 Authors: -dnl Ulrich Drepper , 1996. - -AC_PREREQ([2.50]) - -# Search path for a program which passes the given test. - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN([AM_PATH_PROG_WITH_TEST], -[ -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which - # contains only /bin. Note that ksh looks also at the FPATH variable, - # so we have to set that as well for the test. - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - || PATH_SEPARATOR=';' - } -fi - -# Find out how to test for executable files. Don't use a zero-byte file, -# as systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - ac_executable_p="test -x" -else - ac_executable_p="test -f" -fi -rm -f conf$$.file - -# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL([ac_cv_path_$1], -[case "[$]$1" in - [[\\/]]* | ?:[[\\/]]*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in ifelse([$5], , $PATH, [$5]); do - IFS="$ac_save_IFS" - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then - echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi - fi - done - done - IFS="$ac_save_IFS" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then - AC_MSG_RESULT([$][$1]) -else - AC_MSG_RESULT([no]) -fi -AC_SUBST([$1])dnl -]) diff --git a/gnulib/m4/putenv.m4 b/gnulib/m4/putenv.m4 deleted file mode 100644 index de3900b..0000000 --- a/gnulib/m4/putenv.m4 +++ /dev/null @@ -1,41 +0,0 @@ -# putenv.m4 serial 17 -dnl Copyright (C) 2002-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. -dnl -dnl Check whether putenv ("FOO") removes FOO from the environment. -dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that. - -AC_DEFUN([gl_FUNC_PUTENV], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_CACHE_CHECK([for putenv compatible with GNU and SVID], - [gl_cv_func_svid_putenv], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[ - /* Put it in env. */ - if (putenv ("CONFTEST_putenv=val")) - return 1; - - /* Try to remove it. */ - if (putenv ("CONFTEST_putenv")) - return 2; - - /* Make sure it was deleted. */ - if (getenv ("CONFTEST_putenv") != 0) - return 3; - - return 0; - ]])], - gl_cv_func_svid_putenv=yes, - gl_cv_func_svid_putenv=no, - dnl When crosscompiling, assume putenv is broken. - gl_cv_func_svid_putenv=no) - ]) - if test $gl_cv_func_svid_putenv = no; then - REPLACE_PUTENV=1 - AC_LIBOBJ([putenv]) - fi -]) diff --git a/gnulib/m4/quote.m4 b/gnulib/m4/quote.m4 deleted file mode 100644 index 2328684..0000000 --- a/gnulib/m4/quote.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# quote.m4 serial 5 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_QUOTE], -[ - AC_LIBOBJ([quote]) - - dnl Prerequisites of lib/quote.c. - dnl (none) -]) diff --git a/gnulib/m4/quotearg.m4 b/gnulib/m4/quotearg.m4 deleted file mode 100644 index ff4a2fa..0000000 --- a/gnulib/m4/quotearg.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# quotearg.m4 serial 8 -dnl Copyright (C) 2002, 2004-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_QUOTEARG], -[ - AC_LIBOBJ([quotearg]) -]) diff --git a/gnulib/m4/readlink.m4 b/gnulib/m4/readlink.m4 deleted file mode 100644 index a502ca5..0000000 --- a/gnulib/m4/readlink.m4 +++ /dev/null @@ -1,62 +0,0 @@ -# readlink.m4 serial 9 -dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_READLINK], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([readlink]) - if test $ac_cv_func_readlink = no; then - HAVE_READLINK=0 - AC_LIBOBJ([readlink]) - gl_PREREQ_READLINK - else - AC_CACHE_CHECK([whether readlink signature is correct], - [gl_cv_decl_readlink_works], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - /* Cause compilation failure if original declaration has wrong type. */ - ssize_t readlink (const char *, char *, size_t);]])], - [gl_cv_decl_readlink_works=yes], [gl_cv_decl_readlink_works=no])]) - dnl Solaris 9 ignores trailing slash. - dnl FreeBSD 7.2 dereferences only one level of links with trailing slash. - AC_CACHE_CHECK([whether readlink handles trailing slash correctly], - [gl_cv_func_readlink_works], - [# We have readlink, so assume ln -s works. - ln -s conftest.no-such conftest.link - ln -s conftest.link conftest.lnk2 - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include -]], [[char buf[20]; - return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])], - [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no], - [gl_cv_func_readlink_works="guessing no"]) - rm -f conftest.link conftest.lnk2]) - if test "$gl_cv_func_readlink_works" != yes; then - AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink - fails to recognize a trailing slash.]) - REPLACE_READLINK=1 - AC_LIBOBJ([readlink]) - elif test "$gl_cv_decl_readlink_works" != yes; then - REPLACE_READLINK=1 - AC_LIBOBJ([readlink]) - fi - fi -]) - -# Like gl_FUNC_READLINK, except prepare for separate compilation (no AC_LIBOBJ). -AC_DEFUN([gl_FUNC_READLINK_SEPARATE], -[ - AC_CHECK_FUNCS_ONCE([readlink]) - gl_PREREQ_READLINK -]) - -# Prerequisites of lib/readlink.c. -AC_DEFUN([gl_PREREQ_READLINK], -[ - : -]) diff --git a/gnulib/m4/readlinkat.m4 b/gnulib/m4/readlinkat.m4 deleted file mode 100644 index 8dc7d19..0000000 --- a/gnulib/m4/readlinkat.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# serial 1 -# See if we need to provide readlinkat replacement. - -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Eric Blake. - -AC_DEFUN([gl_FUNC_READLINKAT], -[ - AC_REQUIRE([gl_FUNC_OPENAT]) - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([readlinkat]) - if test $ac_cv_func_readlinkat = no; then - HAVE_READLINKAT=0 - AC_LIBOBJ([readlinkat]) - fi -]) diff --git a/gnulib/m4/realloc.m4 b/gnulib/m4/realloc.m4 deleted file mode 100644 index a403d9f..0000000 --- a/gnulib/m4/realloc.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# realloc.m4 serial 11 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_FUNC_REALLOC_GNU -# ------------------- -# Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace -# realloc if it is not. -AC_DEFUN([gl_FUNC_REALLOC_GNU], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - dnl _AC_FUNC_REALLOC_IF is defined in Autoconf. - _AC_FUNC_REALLOC_IF( - [AC_DEFINE([HAVE_REALLOC_GNU], [1], - [Define to 1 if your system has a GNU libc compatible 'realloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_REALLOC_GNU], [0]) - gl_REPLACE_REALLOC - ]) -])# gl_FUNC_REALLOC_GNU - -# gl_FUNC_REALLOC_POSIX -# --------------------- -# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it -# fails), and replace realloc if it is not. -AC_DEFUN([gl_FUNC_REALLOC_POSIX], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) - if test $gl_cv_func_malloc_posix = yes; then - AC_DEFINE([HAVE_REALLOC_POSIX], [1], - [Define if the 'realloc' function is POSIX compliant.]) - else - gl_REPLACE_REALLOC - fi -]) - -AC_DEFUN([gl_REPLACE_REALLOC], -[ - AC_LIBOBJ([realloc]) - REPLACE_REALLOC=1 -]) diff --git a/gnulib/m4/regex.m4 b/gnulib/m4/regex.m4 deleted file mode 100644 index 24198b5..0000000 --- a/gnulib/m4/regex.m4 +++ /dev/null @@ -1,225 +0,0 @@ -# serial 58 - -# Copyright (C) 1996-2001, 2003-2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl Initially derived from code in GNU grep. -dnl Mostly written by Jim Meyering. - -AC_PREREQ([2.50]) - -AC_DEFUN([gl_REGEX], -[ - AC_ARG_WITH([included-regex], - [AS_HELP_STRING([--without-included-regex], - [don't compile regex; this is the default on systems - with recent-enough versions of the GNU C Library - (use with caution on other systems).])]) - - case $with_included_regex in #( - yes|no) ac_use_included_regex=$with_included_regex - ;; - '') - # If the system regex support is good enough that it passes the - # following run test, then default to *not* using the included regex.c. - # If cross compiling, assume the test would fail and use the included - # regex.c. - AC_CACHE_CHECK([for working re_compile_pattern], - [gl_cv_func_re_compile_pattern_working], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT[ - #include - #include - #include - ]], - [[int result = 0; - static struct re_pattern_buffer regex; - unsigned char folded_chars[UCHAR_MAX + 1]; - int i; - const char *s; - struct re_registers regs; - - /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html - This test needs valgrind to catch the bug on Debian - GNU/Linux 3.1 x86, but it might catch the bug better - on other platforms and it shouldn't hurt to try the - test here. */ - if (setlocale (LC_ALL, "en_US.UTF-8")) - { - static char const pat[] = "insert into"; - static char const data[] = - "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; - re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE - | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern (pat, sizeof pat - 1, ®ex); - if (s) - result |= 1; - else if (re_search (®ex, data, sizeof data - 1, - 0, sizeof data - 1, ®s) - != -1) - result |= 1; - if (! setlocale (LC_ALL, "C")) - return 1; - } - - /* This test is from glibc bug 3957, reported by Andrew Mackey. */ - re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("a[^x]b", 6, ®ex); - if (s) - result |= 2; - /* This should fail, but succeeds for glibc-2.5. */ - else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) - result |= 2; - - /* This regular expression is from Spencer ere test number 75 - in grep-2.3. */ - re_set_syntax (RE_SYNTAX_POSIX_EGREP); - memset (®ex, 0, sizeof regex); - for (i = 0; i <= UCHAR_MAX; i++) - folded_chars[i] = i; - regex.translate = folded_chars; - s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); - /* This should fail with _Invalid character class name_ error. */ - if (!s) - result |= 4; - - /* Ensure that [b-a] is diagnosed as invalid, when - using RE_NO_EMPTY_RANGES. */ - re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("a[b-a]", 6, ®ex); - if (s == 0) - result |= 8; - - /* This should succeed, but does not for glibc-2.1.3. */ - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("{1", 2, ®ex); - if (s) - result |= 8; - - /* The following example is derived from a problem report - against gawk from Jorge Stolfi . */ - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("[an\371]*n", 7, ®ex); - if (s) - result |= 8; - /* This should match, but does not for glibc-2.2.1. */ - else if (re_match (®ex, "an", 2, 0, ®s) != 2) - result |= 8; - - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - result |= 8; - /* glibc-2.2.93 does not work with a negative RANGE argument. */ - else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) - result |= 8; - - /* The version of regex.c in older versions of gnulib - ignored RE_ICASE. Detect that problem too. */ - re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - result |= 16; - else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) - result |= 16; - - /* Catch a bug reported by Vin Shelton in - http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html - */ - re_set_syntax (RE_SYNTAX_POSIX_BASIC - & ~RE_CONTEXT_INVALID_DUP - & ~RE_NO_EMPTY_RANGES); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); - if (s) - result |= 32; - - /* REG_STARTEND was added to glibc on 2004-01-15. - Reject older versions. */ - if (! REG_STARTEND) - result |= 64; - -#if 0 - /* It would be nice to reject hosts whose regoff_t values are too - narrow (including glibc on hosts with 64-bit ptrdiff_t and - 32-bit int), but we should wait until glibc implements this - feature. Otherwise, support for equivalence classes and - multibyte collation symbols would always be broken except - when compiling --without-included-regex. */ - if (sizeof (regoff_t) < sizeof (ptrdiff_t) - || sizeof (regoff_t) < sizeof (ssize_t)) - result |= 64; -#endif - - return result; - ]])], - [gl_cv_func_re_compile_pattern_working=yes], - [gl_cv_func_re_compile_pattern_working=no], - dnl When crosscompiling, assume it is not working. - [gl_cv_func_re_compile_pattern_working=no])]) - case $gl_cv_func_re_compile_pattern_working in #( - yes) ac_use_included_regex=no;; #( - no) ac_use_included_regex=yes;; - esac - ;; - *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) - ;; - esac - - if test $ac_use_included_regex = yes; then - AC_DEFINE([_REGEX_LARGE_OFFSETS], [1], - [Define if you want regoff_t to be at least as wide POSIX requires.]) - AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], - [Define to rpl_re_syntax_options if the replacement should be used.]) - AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], - [Define to rpl_re_set_syntax if the replacement should be used.]) - AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern], - [Define to rpl_re_compile_pattern if the replacement should be used.]) - AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap], - [Define to rpl_re_compile_fastmap if the replacement should be used.]) - AC_DEFINE([re_search], [rpl_re_search], - [Define to rpl_re_search if the replacement should be used.]) - AC_DEFINE([re_search_2], [rpl_re_search_2], - [Define to rpl_re_search_2 if the replacement should be used.]) - AC_DEFINE([re_match], [rpl_re_match], - [Define to rpl_re_match if the replacement should be used.]) - AC_DEFINE([re_match_2], [rpl_re_match_2], - [Define to rpl_re_match_2 if the replacement should be used.]) - AC_DEFINE([re_set_registers], [rpl_re_set_registers], - [Define to rpl_re_set_registers if the replacement should be used.]) - AC_DEFINE([re_comp], [rpl_re_comp], - [Define to rpl_re_comp if the replacement should be used.]) - AC_DEFINE([re_exec], [rpl_re_exec], - [Define to rpl_re_exec if the replacement should be used.]) - AC_DEFINE([regcomp], [rpl_regcomp], - [Define to rpl_regcomp if the replacement should be used.]) - AC_DEFINE([regexec], [rpl_regexec], - [Define to rpl_regexec if the replacement should be used.]) - AC_DEFINE([regerror], [rpl_regerror], - [Define to rpl_regerror if the replacement should be used.]) - AC_DEFINE([regfree], [rpl_regfree], - [Define to rpl_regfree if the replacement should be used.]) - AC_LIBOBJ([regex]) - gl_PREREQ_REGEX - fi -]) - -# Prerequisites of lib/regex.c and lib/regex_internal.c. -AC_DEFUN([gl_PREREQ_REGEX], -[ - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - AC_CHECK_HEADERS([libintl.h]) - AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll]) - AC_CHECK_DECLS([isblank], [], [], [#include ]) -]) diff --git a/gnulib/m4/rmdir.m4 b/gnulib/m4/rmdir.m4 deleted file mode 100644 index 41705a1..0000000 --- a/gnulib/m4/rmdir.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# rmdir.m4 serial 10 -dnl Copyright (C) 2002, 2005, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_RMDIR], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - dnl Detect cygwin 1.5.x bug. - AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works], - [mkdir conftest.dir - touch conftest.file - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - #include -]], [[int result = 0; - if (!rmdir ("conftest.file/")) - result |= 1; - else if (errno != ENOTDIR) - result |= 2; - if (!rmdir ("conftest.dir/./")) - result |= 4; - return result; - ]])], - [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no], - [gl_cv_func_rmdir_works="guessing no"]) - rm -rf conftest.dir conftest.file]) - if test x"$gl_cv_func_rmdir_works" != xyes; then - REPLACE_RMDIR=1 - AC_LIBOBJ([rmdir]) - fi -]) diff --git a/gnulib/m4/rpmatch.m4 b/gnulib/m4/rpmatch.m4 deleted file mode 100644 index a8d0f10..0000000 --- a/gnulib/m4/rpmatch.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# rpmatch.m4 serial 9 -dnl Copyright (C) 2002-2003, 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_RPMATCH], -[ - dnl Persuade glibc to declare rpmatch(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REPLACE_FUNCS([rpmatch]) - if test $ac_cv_func_rpmatch = no; then - HAVE_RPMATCH=0 - gl_PREREQ_RPMATCH - fi -]) - -# Prerequisites of lib/rpmatch.c. -AC_DEFUN([gl_PREREQ_RPMATCH], [ - AC_CACHE_CHECK([for nl_langinfo and YESEXPR], [gl_cv_langinfo_yesexpr], - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[char* cs = nl_langinfo(YESEXPR); return !cs;]])], - [gl_cv_langinfo_yesexpr=yes], - [gl_cv_langinfo_yesexpr=no]) - ]) - if test $gl_cv_langinfo_yesexpr = yes; then - AC_DEFINE([HAVE_LANGINFO_YESEXPR], [1], - [Define if you have and nl_langinfo(YESEXPR).]) - fi -]) diff --git a/gnulib/m4/same.m4 b/gnulib/m4/same.m4 deleted file mode 100644 index 063dc65..0000000 --- a/gnulib/m4/same.m4 +++ /dev/null @@ -1,15 +0,0 @@ -#serial 8 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SAME], -[ - AC_LIBOBJ([same]) - - dnl Prerequisites of lib/same.c. - AC_REQUIRE([AC_SYS_LONG_FILE_NAMES]) - AC_CHECK_FUNCS_ONCE([pathconf]) -]) diff --git a/gnulib/m4/save-cwd.m4 b/gnulib/m4/save-cwd.m4 deleted file mode 100644 index 7437e05..0000000 --- a/gnulib/m4/save-cwd.m4 +++ /dev/null @@ -1,12 +0,0 @@ -# serial 9 -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SAVE_CWD], -[ - AC_LIBOBJ([save-cwd]) - dnl Prerequisites for lib/save-cwd.c. - AC_CHECK_FUNCS_ONCE([fchdir]) -]) diff --git a/gnulib/m4/savedir.m4 b/gnulib/m4/savedir.m4 deleted file mode 100644 index 94f3e89..0000000 --- a/gnulib/m4/savedir.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# savedir.m4 serial 9 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -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_SAVEDIR], -[ - AC_LIBOBJ([savedir]) -]) diff --git a/gnulib/m4/selinux-context-h.m4 b/gnulib/m4/selinux-context-h.m4 deleted file mode 100644 index 227ab6b..0000000 --- a/gnulib/m4/selinux-context-h.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# serial 2 -*- Autoconf -*- -# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# From Jim Meyering -# Provide , if necessary. - -AC_DEFUN([gl_HEADERS_SELINUX_CONTEXT_H], -[ - AC_REQUIRE([gl_LIBSELINUX]) - if test "$with_selinux" != no; then - AC_CHECK_HEADERS([selinux/context.h], - [SELINUX_CONTEXT_H=], - [SELINUX_CONTEXT_H=selinux/context.h]) - else - SELINUX_CONTEXT_H=selinux/context.h - fi - AC_SUBST([SELINUX_CONTEXT_H]) -]) diff --git a/gnulib/m4/selinux-selinux-h.m4 b/gnulib/m4/selinux-selinux-h.m4 deleted file mode 100644 index 7afd416..0000000 --- a/gnulib/m4/selinux-selinux-h.m4 +++ /dev/null @@ -1,70 +0,0 @@ -# serial 4 -*- Autoconf -*- -# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# From Jim Meyering -# Provide , if necessary. -# If it is already present, provide wrapper functions to guard against -# misbehavior from getfilecon, lgetfilecon, and fgetfilecon. - -AC_DEFUN([gl_HEADERS_SELINUX_SELINUX_H], -[ - AC_REQUIRE([gl_LIBSELINUX]) - if test "$with_selinux" != no; then - AC_CHECK_HEADERS([selinux/selinux.h]) - - if test "$ac_cv_header_selinux_selinux_h" = yes; then - # We do have , so do compile getfilecon.c - # and arrange to use its wrappers. - AC_LIBOBJ([getfilecon]) - gl_CHECK_NEXT_HEADERS([selinux/selinux.h]) - AC_DEFINE([getfilecon], [rpl_getfilecon], - [Always use our getfilecon wrapper.]) - AC_DEFINE([lgetfilecon], [rpl_lgetfilecon], - [Always use our lgetfilecon wrapper.]) - AC_DEFINE([fgetfilecon], [rpl_fgetfilecon], - [Always use our fgetfilecon wrapper.]) - fi - - case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in - no:*) # already warned - ;; - *:no) - AC_MSG_WARN([libselinux was found but selinux/selinux.h is missing.]) - AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.]) - esac - else - # Do as if does not exist, even if - # AC_CHECK_HEADERS_ONCE has already determined that it exists. - AC_DEFINE([HAVE_SELINUX_SELINUX_H], [0]) - fi -]) - -AC_DEFUN([gl_LIBSELINUX], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_CANONICAL_BUILD]) - - AC_ARG_WITH([selinux], - AS_HELP_STRING([--without-selinux], [do not use SELinux, even on systems with SELinux]), - [], [with_selinux=maybe]) - - LIB_SELINUX= - if test "$with_selinux" != no; then - gl_save_LIBS=$LIBS - AC_SEARCH_LIBS([setfilecon], [selinux], - [test "$ac_cv_search_setfilecon" = "none required" || - LIB_SELINUX=$ac_cv_search_setfilecon]) - LIBS=$gl_save_LIBS - fi - AC_SUBST([LIB_SELINUX]) - - # Warn if SELinux is found but libselinux is absent; - if test "$ac_cv_search_setfilecon" = no && - test "$host" = "$build" && test -d /selinux; then - AC_MSG_WARN([This system supports SELinux but libselinux is missing.]) - AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.]) - fi -]) diff --git a/gnulib/m4/setenv.m4 b/gnulib/m4/setenv.m4 deleted file mode 100644 index ba619b0..0000000 --- a/gnulib/m4/setenv.m4 +++ /dev/null @@ -1,149 +0,0 @@ -# setenv.m4 serial 21 -dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_SETENV], -[ - AC_REQUIRE([gl_FUNC_SETENV_SEPARATE]) - if test $HAVE_SETENV$REPLACE_SETENV != 10; then - AC_LIBOBJ([setenv]) - fi -]) - -# Like gl_FUNC_SETENV, except prepare for separate compilation (no AC_LIBOBJ). -AC_DEFUN([gl_FUNC_SETENV_SEPARATE], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_CHECK_DECLS_ONCE([setenv]) - if test $ac_cv_have_decl_setenv = no; then - HAVE_DECL_SETENV=0 - fi - AC_CHECK_FUNCS_ONCE([setenv]) - if test $ac_cv_func_setenv = no; then - HAVE_SETENV=0 - else - AC_CACHE_CHECK([whether setenv validates arguments], - [gl_cv_func_setenv_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - #include - ]], [[ - int result = 0; - { - if (setenv ("", "", 0) != -1) - result |= 1; - else if (errno != EINVAL) - result |= 2; - } - { - if (setenv ("a", "=", 1) != 0) - result |= 4; - else if (strcmp (getenv ("a"), "=") != 0) - result |= 8; - } - return result; - ]])], - [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no], - [gl_cv_func_setenv_works="guessing no"])]) - if test "$gl_cv_func_setenv_works" != yes; then - REPLACE_SETENV=1 - AC_LIBOBJ([setenv]) - fi - fi - gl_PREREQ_SETENV -]) - -AC_DEFUN([gl_FUNC_UNSETENV], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_CHECK_DECLS_ONCE([unsetenv]) - if test $ac_cv_have_decl_unsetenv = no; then - HAVE_DECL_UNSETENV=0 - fi - AC_CHECK_FUNCS([unsetenv]) - if test $ac_cv_func_unsetenv = no; then - AC_LIBOBJ([unsetenv]) - gl_PREREQ_UNSETENV - else - dnl Some BSDs return void, failing to do error checking. - AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#undef _BSD -#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */ -#include -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -int unsetenv (const char *name); -#else -int unsetenv(); -#endif - ]], - [[]])], - [gt_cv_func_unsetenv_ret='int'], - [gt_cv_func_unsetenv_ret='void'])]) - if test $gt_cv_func_unsetenv_ret = 'void'; then - AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void - instead of int.]) - REPLACE_UNSETENV=1 - AC_LIBOBJ([unsetenv]) - fi - - dnl Solaris 10 unsetenv does not remove all copies of a name. - dnl Haiku alpha 2 unsetenv gets confused by assignment to environ. - dnl OpenBSD 4.7 unsetenv("") does not fail. - AC_CACHE_CHECK([whether unsetenv obeys POSIX], - [gl_cv_func_unsetenv_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - extern char **environ; - ]], [[ - char entry1[] = "a=1"; - char entry2[] = "b=2"; - char *env[] = { entry1, entry2, NULL }; - if (putenv ((char *) "a=1")) return 1; - if (putenv (entry2)) return 2; - entry2[0] = 'a'; - unsetenv ("a"); - if (getenv ("a")) return 3; - if (!unsetenv ("") || errno != EINVAL) return 4; - entry2[0] = 'b'; - environ = env; - if (!getenv ("a")) return 5; - entry2[0] = 'a'; - unsetenv ("a"); - if (getenv ("a")) return 6; - ]])], - [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no], - [gl_cv_func_unsetenv_works="guessing no"])]) - if test "$gl_cv_func_unsetenv_works" != yes; then - REPLACE_UNSETENV=1 - AC_LIBOBJ([unsetenv]) - fi - fi -]) - -# Prerequisites of lib/setenv.c. -AC_DEFUN([gl_PREREQ_SETENV], -[ - AC_REQUIRE([AC_FUNC_ALLOCA]) - AC_REQUIRE([gl_ENVIRON]) - AC_CHECK_HEADERS_ONCE([unistd.h]) - AC_CHECK_HEADERS([search.h]) - AC_CHECK_FUNCS([tsearch]) -]) - -# Prerequisites of lib/unsetenv.c. -AC_DEFUN([gl_PREREQ_UNSETENV], -[ - AC_REQUIRE([gl_ENVIRON]) - AC_CHECK_HEADERS_ONCE([unistd.h]) -]) diff --git a/gnulib/m4/setlocale.m4 b/gnulib/m4/setlocale.m4 deleted file mode 100644 index 6672c34..0000000 --- a/gnulib/m4/setlocale.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# setlocale.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_SETLOCALE], -[ - AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - dnl On native Windows systems, setlocale(category,NULL) does not look at - dnl the environment variables LC_ALL, category, and LANG. - mingw*) REPLACE_SETLOCALE=1 ;; - esac - if test $REPLACE_SETLOCALE = 1; then - gl_REPLACE_LOCALE_H - AC_LIBOBJ([setlocale]) - gl_PREREQ_SETLOCALE - fi -]) - -# Prerequisites of lib/setlocale.c. -AC_DEFUN([gl_PREREQ_SETLOCALE], -[ - : -]) diff --git a/gnulib/m4/size_max.m4 b/gnulib/m4/size_max.m4 deleted file mode 100644 index e807098..0000000 --- a/gnulib/m4/size_max.m4 +++ /dev/null @@ -1,79 +0,0 @@ -# size_max.m4 serial 10 -dnl Copyright (C) 2003, 2005-2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([gl_SIZE_MAX], -[ - AC_CHECK_HEADERS([stdint.h]) - dnl First test whether the system already has SIZE_MAX. - AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ - gl_cv_size_max= - AC_EGREP_CPP([Found it], [ -#include -#if HAVE_STDINT_H -#include -#endif -#ifdef SIZE_MAX -Found it -#endif -], [gl_cv_size_max=yes]) - if test -z "$gl_cv_size_max"; then - dnl Define it ourselves. Here we assume that the type 'size_t' is not wider - dnl than the type 'unsigned long'. Try hard to find a definition that can - dnl be used in a preprocessor #if, i.e. doesn't contain a cast. - AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], - [#include -#include ], [size_t_bits_minus_1=]) - AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], - [#include ], [fits_in_uint=]) - if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then - if test $fits_in_uint = 1; then - dnl Even though SIZE_MAX fits in an unsigned int, it must be of type - dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - extern size_t foo; - extern unsigned long foo; - ]], - [[]])], - [fits_in_uint=0]) - fi - dnl We cannot use 'expr' to simplify this expression, because 'expr' - dnl works only with 'long' integers in the host environment, while we - dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. - if test $fits_in_uint = 1; then - gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" - else - gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" - fi - else - dnl Shouldn't happen, but who knows... - gl_cv_size_max='((size_t)~(size_t)0)' - fi - fi - ]) - if test "$gl_cv_size_max" != yes; then - AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], - [Define as the maximum value of type 'size_t', if the system doesn't define it.]) - fi - dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after - dnl . Remember that the #undef in AH_VERBATIM gets replaced with - dnl #define by AC_DEFINE_UNQUOTED. - AH_VERBATIM([SIZE_MAX], -[/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -# undef SIZE_MAX -#endif]) -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff --git a/gnulib/m4/sleep.m4 b/gnulib/m4/sleep.m4 deleted file mode 100644 index 4a251da..0000000 --- a/gnulib/m4/sleep.m4 +++ /dev/null @@ -1,54 +0,0 @@ -# sleep.m4 serial 4 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_SLEEP], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - dnl We expect to see the declaration of sleep() in a header file. - dnl Older versions of mingw have a sleep() function that is an alias to - dnl _sleep() in MSVCRT. It has a different signature than POSIX sleep(): - dnl it takes the number of milliseconds as argument and returns void. - dnl mingw does not declare this function. - AC_CHECK_DECLS([sleep], , , [#include ]) - AC_CHECK_FUNCS_ONCE([sleep]) - if test $ac_cv_have_decl_sleep != yes; then - HAVE_SLEEP=0 - AC_LIBOBJ([sleep]) - else - dnl Cygwin 1.5.x has a bug where sleep can't exceed 49.7 days. - AC_CACHE_CHECK([for working sleep], [gl_cv_func_sleep_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include -static void -handle_alarm (int sig) -{ - if (sig != SIGALRM) - _exit (2); -} -]], [[ - /* Failure to compile this test due to missing alarm is okay, - since all such platforms (mingw) also lack sleep. */ - unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */ - unsigned int remaining; - signal (SIGALRM, handle_alarm); - alarm (1); - remaining = sleep (pentecost); - if (remaining > pentecost) - return 3; - if (remaining <= pentecost - 10) - return 4; - return 0; - ]])], - [gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no], - [gl_cv_func_sleep_works="guessing no"])]) - if test "$gl_cv_func_sleep_works" != yes; then - REPLACE_SLEEP=1 - AC_LIBOBJ([sleep]) - fi - fi -]) diff --git a/gnulib/m4/snprintf.m4 b/gnulib/m4/snprintf.m4 deleted file mode 100644 index 8aa5dbe..0000000 --- a/gnulib/m4/snprintf.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# snprintf.m4 serial 5 -dnl Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_SNPRINTF], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - gl_cv_func_snprintf_usable=no - AC_CHECK_FUNCS([snprintf]) - if test $ac_cv_func_snprintf = yes; then - gl_SNPRINTF_SIZE1 - case "$gl_cv_func_snprintf_size1" in - *yes) - gl_SNPRINTF_RETVAL_C99 - case "$gl_cv_func_snprintf_retval_c99" in - *yes) - gl_cv_func_snprintf_usable=yes - ;; - esac - ;; - esac - fi - if test $gl_cv_func_snprintf_usable = no; then - gl_REPLACE_SNPRINTF - fi - AC_CHECK_DECLS_ONCE([snprintf]) - if test $ac_cv_have_decl_snprintf = no; then - HAVE_DECL_SNPRINTF=0 - fi -]) - -AC_DEFUN([gl_REPLACE_SNPRINTF], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - AC_LIBOBJ([snprintf]) - if test $ac_cv_func_snprintf = yes; then - REPLACE_SNPRINTF=1 - fi - gl_PREREQ_SNPRINTF -]) - -# Prerequisites of lib/snprintf.c. -AC_DEFUN([gl_PREREQ_SNPRINTF], [:]) diff --git a/gnulib/m4/ssize_t.m4 b/gnulib/m4/ssize_t.m4 deleted file mode 100644 index d712752..0000000 --- a/gnulib/m4/ssize_t.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether ssize_t is defined. - -AC_DEFUN([gt_TYPE_SSIZE_T], -[ - AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x;]])], - [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) - if test $gt_cv_ssize_t = no; then - AC_DEFINE([ssize_t], [int], - [Define as a signed type of the same size as size_t.]) - fi -]) diff --git a/gnulib/m4/st_dm_mode.m4 b/gnulib/m4/st_dm_mode.m4 deleted file mode 100644 index 84f7463..0000000 --- a/gnulib/m4/st_dm_mode.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# serial 6 - -# Copyright (C) 1998-1999, 2001, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Define HAVE_ST_DM_MODE if struct stat has an st_dm_mode member. - -AC_DEFUN([AC_STRUCT_ST_DM_MODE], - [AC_CACHE_CHECK([for st_dm_mode in struct stat], [ac_cv_struct_st_dm_mode], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include ]], [[struct stat s; s.st_dm_mode;]])], - [ac_cv_struct_st_dm_mode=yes], - [ac_cv_struct_st_dm_mode=no])]) - - if test $ac_cv_struct_st_dm_mode = yes; then - AC_DEFINE([HAVE_ST_DM_MODE], [1], - [Define if struct stat has an st_dm_mode member. ]) - fi - ] -) diff --git a/gnulib/m4/stat-time.m4 b/gnulib/m4/stat-time.m4 deleted file mode 100644 index 75ddbee..0000000 --- a/gnulib/m4/stat-time.m4 +++ /dev/null @@ -1,85 +0,0 @@ -# Checks for stat-related time functions. - -# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2011 Free Software -# Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# st_atim.tv_nsec - Linux, Solaris, Cygwin -# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE -# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE -# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) - -# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) -# st_birthtim - Cygwin 1.7.0+ - -AC_DEFUN([gl_STAT_TIME], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_HEADERS_ONCE([sys/time.h]) - - AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], - [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], - [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[ - #include - #include - #if HAVE_SYS_TIME_H - # include - #endif - #include - struct timespec ts; - struct stat st; - ]], - [[ - st.st_atim = ts; - ]])], - [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], - [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) - if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then - AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1], - [Define to 1 if the type of the st_atim member of a struct stat is - struct timespec.]) - fi], - [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [], - [AC_CHECK_MEMBERS([struct stat.st_atimensec], [], - [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [], - [#include - #include ])], - [#include - #include ])], - [#include - #include ])], - [#include - #include ]) -]) - -# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.) -# and NTFS (Cygwin). -# There was a time when this field was named st_createtime (21 June -# 2002 to 16 July 2002) But that window is very small and applied only -# to development code, so systems still using that configuration are -# not supported. See revisions 1.10 and 1.11 of FreeBSD's -# src/sys/ufs/ufs/dinode.h. -# -AC_DEFUN([gl_STAT_BIRTHTIME], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_HEADERS_ONCE([sys/time.h]) - AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [], - [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [], - [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [], - [#include - #include ])], - [#include - #include ])], - [#include - #include ]) -]) diff --git a/gnulib/m4/stat.m4 b/gnulib/m4/stat.m4 deleted file mode 100644 index 27f82d5..0000000 --- a/gnulib/m4/stat.m4 +++ /dev/null @@ -1,66 +0,0 @@ -# serial 7 - -# Copyright (C) 2009-2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STAT], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([lstat]) - dnl mingw is the only known platform where stat(".") and stat("./") differ - AC_CACHE_CHECK([whether stat handles trailing slashes on directories], - [gl_cv_func_stat_dir_slash], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include -]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])], - [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no], - [case $host_os in - mingw*) gl_cv_func_stat_dir_slash="guessing no";; - *) gl_cv_func_stat_dir_slash="guessing yes";; - esac])]) - dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/") - dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/") - AC_CACHE_CHECK([whether stat handles trailing slashes on files], - [gl_cv_func_stat_file_slash], - [touch conftest.tmp - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.tmp conftest.lnk - fi - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include -]], [[int result = 0; - struct stat st; - if (!stat ("conftest.tmp/", &st)) - result |= 1; -#if HAVE_LSTAT - if (!stat ("conftest.lnk/", &st)) - result |= 2; -#endif - return result; - ]])], - [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], - [gl_cv_func_stat_file_slash="guessing no"]) - rm -f conftest.tmp conftest.lnk]) - case $gl_cv_func_stat_dir_slash in - *no) REPLACE_STAT=1 - AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs - help when passed a directory name with a trailing slash]);; - esac - case $gl_cv_func_stat_file_slash in - *no) REPLACE_STAT=1 - AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs - help when passed a file name with a trailing slash]);; - esac - if test $REPLACE_STAT = 1; then - AC_LIBOBJ([stat]) - dnl Prerequisites of lib/stat.c. - AC_REQUIRE([AC_C_INLINE]) - fi -]) diff --git a/gnulib/m4/stdarg.m4 b/gnulib/m4/stdarg.m4 deleted file mode 100644 index a1ef178..0000000 --- a/gnulib/m4/stdarg.m4 +++ /dev/null @@ -1,75 +0,0 @@ -# stdarg.m4 serial 5 -dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Provide a working va_copy in combination with . - -AC_DEFUN([gl_STDARG_H], -[ - STDARG_H=''; AC_SUBST([STDARG_H]) - NEXT_STDARG_H=''; AC_SUBST([NEXT_STDARG_H]) - AC_MSG_CHECKING([for va_copy]) - AC_CACHE_VAL([gl_cv_func_va_copy], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[ -#ifndef va_copy -void (*func) (va_list, va_list) = va_copy; -#endif - ]])], - [gl_cv_func_va_copy=yes], - [gl_cv_func_va_copy=no])]) - AC_MSG_RESULT([$gl_cv_func_va_copy]) - if test $gl_cv_func_va_copy = no; then - dnl Provide a substitute. - dnl Usually a simple definition in is enough. Not so on AIX 5 - dnl with some versions of the /usr/vac/bin/cc compiler. It has an - dnl which does '#undef va_copy', leading to a missing va_copy symbol. For - dnl this platform, we use an substitute. But we cannot use this - dnl approach on other platforms, because often defines only - dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do - dnl not work in this situation. - AC_EGREP_CPP([vaccine], - [#if defined _AIX && !defined __GNUC__ - AIX vaccine - #endif - ], [gl_aixcc=yes], [gl_aixcc=no]) - if test $gl_aixcc = yes; then - dnl Provide a substitute file. - STDARG_H=stdarg.h - gl_NEXT_HEADERS([stdarg.h]) - dnl Fallback for the case when contains only macro definitions. - if test "$gl_cv_next_stdarg_h" = '""'; then - gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' - NEXT_STDARG_H="$gl_cv_next_stdarg_h" - fi - else - dnl Provide a substitute in , either __va_copy or as a simple - dnl assignment. - gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[ -#ifndef __va_copy -error, bail out -#endif - ]])], - [gl_cv_func___va_copy=yes], - [gl_cv_func___va_copy=no])]) - if test $gl_cv_func___va_copy = yes; then - AC_DEFINE([va_copy], [__va_copy], - [Define as a macro for copying va_list variables.]) - else - AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b))]) - AC_DEFINE([va_copy], [gl_va_copy], - [Define as a macro for copying va_list variables.]) - fi - fi - fi -]) diff --git a/gnulib/m4/stdbool.m4 b/gnulib/m4/stdbool.m4 deleted file mode 100644 index 838cf0f..0000000 --- a/gnulib/m4/stdbool.m4 +++ /dev/null @@ -1,99 +0,0 @@ -# Check for stdbool.h that conforms to C99. - -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -#serial 4 - -# Prepare for substituting if it is not supported. - -AC_DEFUN([AM_STDBOOL_H], -[ - AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) - - # Define two additional variables used in the Makefile substitution. - - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' - fi - AC_SUBST([STDBOOL_H]) - - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - AC_SUBST([HAVE__BOOL]) -]) - -# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. -AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) - -# This version of the macro is needed in autoconf <= 2.68. - -AC_DEFUN([AC_CHECK_HEADER_STDBOOL], - [AC_CACHE_CHECK([for stdbool.h that conforms to C99], - [ac_cv_header_stdbool_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ - #include - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - ]], - [[ - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - ]])], - [ac_cv_header_stdbool_h=yes], - [ac_cv_header_stdbool_h=no])]) - AC_CHECK_TYPES([_Bool]) -]) diff --git a/gnulib/m4/stddef_h.m4 b/gnulib/m4/stddef_h.m4 deleted file mode 100644 index 1942b6a..0000000 --- a/gnulib/m4/stddef_h.m4 +++ /dev/null @@ -1,45 +0,0 @@ -dnl A placeholder for POSIX 2008 , for platforms that have issues. -# stddef_h.m4 serial 3 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STDDEF_H], -[ - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], - [gl_cv_decl_null_works], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; -]])], - [gl_cv_decl_null_works=yes], - [gl_cv_decl_null_works=no])]) - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - fi - if test -n "$STDDEF_H"; then - gl_NEXT_HEADERS([stddef.h]) - fi -]) - -AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_STDDEF_H_DEFAULTS], -[ - dnl Assume proper GNU behavior unless another module says otherwise. - REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) - HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) - STDDEF_H=''; AC_SUBST([STDDEF_H]) -]) diff --git a/gnulib/m4/stdint.m4 b/gnulib/m4/stdint.m4 deleted file mode 100644 index e7d0d07..0000000 --- a/gnulib/m4/stdint.m4 +++ /dev/null @@ -1,479 +0,0 @@ -# stdint.m4 serial 39 -dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert and Bruno Haible. -dnl Test whether is supported or must be substituted. - -AC_DEFUN([gl_STDINT_H], -[ - AC_PREREQ([2.59])dnl - - dnl Check for long long int and unsigned long long int. - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_LONG_LONG_INT]) - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) - - dnl Check for , in the same way as gl_WCHAR_H does. - AC_CHECK_HEADERS_ONCE([wchar.h]) - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - AC_SUBST([HAVE_WCHAR_H]) - - dnl Check for . - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi - AC_SUBST([HAVE_INTTYPES_H]) - - dnl Check for . - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi - AC_SUBST([HAVE_SYS_TYPES_H]) - - gl_CHECK_NEXT_HEADERS([stdint.h]) - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 - else - HAVE_STDINT_H=0 - fi - AC_SUBST([HAVE_STDINT_H]) - - dnl Now see whether we need a substitute . - if test $ac_cv_header_stdint_h = yes; then - AC_CACHE_CHECK([whether stdint.h conforms to C99], - [gl_cv_header_working_stdint_h], - [gl_cv_header_working_stdint_h=no - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ -#if !(defined WCHAR_MIN && defined WCHAR_MAX) -#error "WCHAR_MIN, WCHAR_MAX not defined in " -#endif -] -gl_STDINT_INCLUDES -[ -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; - -#include /* for CHAR_BIT */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -struct s { - int check_PTRDIFF: - PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) - && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) - ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ - int check_SIG_ATOMIC: - SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) - && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) - ? 1 : -1; - int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; - int check_WCHAR: - WCHAR_MIN == TYPE_MINIMUM (wchar_t) - && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) - ? 1 : -1; - /* Detect bug in mingw. */ - int check_WINT: - WINT_MIN == TYPE_MINIMUM (wint_t) - && WINT_MAX == TYPE_MAXIMUM (wint_t) - ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - ]])], - [dnl Determine whether the various *_MIN, *_MAX macros are usable - dnl in preprocessor expression. We could do it by compiling a test - dnl program for each of these macros. It is faster to run a program - dnl that inspects the macro expansion. - dnl This detects a bug on HP-UX 11.23/ia64. - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -] -gl_STDINT_INCLUDES -[ -#include -#include -#define MVAL(macro) MVAL1(macro) -#define MVAL1(expression) #expression -static const char *macro_values[] = - { -#ifdef INT8_MAX - MVAL (INT8_MAX), -#endif -#ifdef INT16_MAX - MVAL (INT16_MAX), -#endif -#ifdef INT32_MAX - MVAL (INT32_MAX), -#endif -#ifdef INT64_MAX - MVAL (INT64_MAX), -#endif -#ifdef UINT8_MAX - MVAL (UINT8_MAX), -#endif -#ifdef UINT16_MAX - MVAL (UINT16_MAX), -#endif -#ifdef UINT32_MAX - MVAL (UINT32_MAX), -#endif -#ifdef UINT64_MAX - MVAL (UINT64_MAX), -#endif - NULL - }; -]], [[ - const char **mv; - for (mv = macro_values; *mv != NULL; mv++) - { - const char *value = *mv; - /* Test whether it looks like a cast expression. */ - if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 - || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 - || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 - || strncmp (value, "((int)"/*)*/, 6) == 0 - || strncmp (value, "((signed short)"/*)*/, 15) == 0 - || strncmp (value, "((signed char)"/*)*/, 14) == 0) - return mv - macro_values + 1; - } - return 0; -]])], - [gl_cv_header_working_stdint_h=yes], - [], - [dnl When cross-compiling, assume it works. - gl_cv_header_working_stdint_h=yes - ]) - ]) - ]) - fi - if test "$gl_cv_header_working_stdint_h" = yes; then - STDINT_H= - else - dnl Check for , and for - dnl (used in Linux libc4 >= 4.6.7 and libc5). - AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi - AC_SUBST([HAVE_SYS_INTTYPES_H]) - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi - AC_SUBST([HAVE_SYS_BITYPES_H]) - - gl_STDINT_TYPE_PROPERTIES - STDINT_H=stdint.h - fi - AC_SUBST([STDINT_H]) -]) - -dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) -dnl Determine the size of each of the given types in bits. -AC_DEFUN([gl_STDINT_BITSIZEOF], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to the number of bits in type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], - [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], - [$2 -#include ], [result=unknown]) - eval gl_cv_bitsizeof_${gltype}=\$result - ]) - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, - dnl do a syntax check even on unused #if conditions and give an error - dnl on valid C code like this: - dnl #if 0 - dnl # if > 32 - dnl # endif - dnl #endif - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) - eval BITSIZEOF_${GLTYPE}=\$result - done - m4_foreach_w([gltype], [$1], - [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) -dnl Determine the signedness of each of the given types. -dnl Define HAVE_SIGNED_TYPE if type is signed. -AC_DEFUN([gl_CHECK_TYPES_SIGNED], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to 1 if ']gltype[' is a signed integer type.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], - result=yes, result=no) - eval gl_cv_type_${gltype}_signed=\$result - ]) - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done - m4_foreach_w([gltype], [$1], - [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) -dnl Determine the suffix to use for integer constants of the given types. -dnl Define t_SUFFIX for each such type. -AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], - [Define to l, ll, u, ul, ull, etc., as suitable for - constants of type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for $gltype integer literal suffix], - [gl_cv_type_${gltype}_suffix], - [eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - extern $gltype foo; - extern $gltype1 foo;]])], - [eval gl_cv_type_${gltype}_suffix=\$glsuf]) - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done]) - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) - done - m4_foreach_w([gltype], [$1], - [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) -]) - -dnl gl_STDINT_INCLUDES -AC_DEFUN([gl_STDINT_INCLUDES], -[[ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif -]]) - -dnl gl_STDINT_TYPE_PROPERTIES -dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t -dnl of interest to stdint.in.h. -AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], -[ - AC_REQUIRE([gl_MULTIARCH]) - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_STDINT_BITSIZEOF([ptrdiff_t size_t], - [gl_STDINT_INCLUDES]) - fi - gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], - [gl_STDINT_INCLUDES]) - fi - gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) - -# Hey Emacs! -# Local Variables: -# indent-tabs-mode: nil -# End: diff --git a/gnulib/m4/stdint_h.m4 b/gnulib/m4/stdint_h.m4 deleted file mode 100644 index 356b14e..0000000 --- a/gnulib/m4/stdint_h.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# stdint_h.m4 serial 9 -dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_STDINT_H_WITH_UINTMAX if exists, -# doesn't clash with , and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_STDINT_H], -[ - AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include ]], - [[uintmax_t i = (uintmax_t) -1; return !i;]])], - [gl_cv_header_stdint_h=yes], - [gl_cv_header_stdint_h=no])]) - if test $gl_cv_header_stdint_h = yes; then - AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], - [Define if exists, doesn't clash with , - and declares uintmax_t. ]) - fi -]) diff --git a/gnulib/m4/stdio-safer.m4 b/gnulib/m4/stdio-safer.m4 deleted file mode 100644 index 0cf08c2..0000000 --- a/gnulib/m4/stdio-safer.m4 +++ /dev/null @@ -1,25 +0,0 @@ -#serial 12 -dnl Copyright (C) 2002, 2005-2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FOPEN_SAFER], -[ - AC_LIBOBJ([fopen-safer]) -]) - -AC_DEFUN([gl_FREOPEN_SAFER], -[ - AC_LIBOBJ([freopen-safer]) -]) - -AC_DEFUN([gl_POPEN_SAFER], -[ - AC_LIBOBJ([popen-safer]) -]) - -AC_DEFUN([gl_TMPFILE_SAFER], -[ - AC_LIBOBJ([tmpfile-safer]) -]) diff --git a/gnulib/m4/stdio_h.m4 b/gnulib/m4/stdio_h.m4 deleted file mode 100644 index 7f3ae56..0000000 --- a/gnulib/m4/stdio_h.m4 +++ /dev/null @@ -1,140 +0,0 @@ -# stdio_h.m4 serial 33 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -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 likely needs them. - GNULIB_FPRINTF=1 - GNULIB_PRINTF=1 - GNULIB_VFPRINTF=1 - GNULIB_VPRINTF=1 - GNULIB_FPUTC=1 - GNULIB_PUTC=1 - GNULIB_PUTCHAR=1 - GNULIB_FPUTS=1 - GNULIB_PUTS=1 - GNULIB_FWRITE=1 - dnl This ifdef is just an optimization, to avoid performing a configure - dnl check whose result is not used. It does not make the test of - dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant. - m4_ifdef([gl_SIGNAL_SIGPIPE], [ - gl_SIGNAL_SIGPIPE - if test $gl_cv_header_signal_h_SIGPIPE != yes; then - REPLACE_STDIO_WRITE_FUNCS=1 - AC_LIBOBJ([stdio-write]) - fi - ]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include - ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat - snprintf tmpfile vdprintf vsnprintf]) -]) - -AC_DEFUN([gl_STDIO_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_STDIO_H_DEFAULTS], -[ - GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) - GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) - GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) - GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) - GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) - GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) - GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) - GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) - GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) - GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) - GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) - GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) - GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) - GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) - GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) - GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) - GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) - GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) - GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) - GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) - GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) - GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) - GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) - GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) - GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) - GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) - GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) - GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) - GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) - GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) - GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) - GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) - GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) - GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) - GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) - GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) - GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) - GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) - GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) - GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) - GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) - HAVE_DECL_FSEEKO=1; AC_SUBST([HAVE_DECL_FSEEKO]) - HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) - HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) - HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) - HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) - HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) - HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) - HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) - HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) - HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO]) - HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) - HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) - HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) - REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) - REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) - REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) - REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) - REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) - REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) - REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) - REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) - REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) - REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) - REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) - REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) - REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) - REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) - REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) - REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) - REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) - REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) - REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) - REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) - REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) - REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) - REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) - REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE]) - REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) - REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) - REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) - REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) - REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) - REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) -]) diff --git a/gnulib/m4/stdlib_h.m4 b/gnulib/m4/stdlib_h.m4 deleted file mode 100644 index 25fdada..0000000 --- a/gnulib/m4/stdlib_h.m4 +++ /dev/null @@ -1,105 +0,0 @@ -# stdlib_h.m4 serial 37 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STDLIB_H], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - gl_NEXT_HEADERS([stdlib.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include -#if HAVE_SYS_LOADAVG_H -# include -#endif -#if HAVE_RANDOM_H -# include -#endif - ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp - mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r - setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt - unsetenv]) -]) - -AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_STDLIB_H_DEFAULTS], -[ - GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) - GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) - GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) - GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) - GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) - GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) - GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) - GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) - GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) - GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) - GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) - GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) - GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) - GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) - GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) - GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) - GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) - GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) - GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) - GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) - GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) - GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) - GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) - GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) - GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) - GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) - GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) - GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) - HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) - HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) - HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) - HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) - HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) - HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) - HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) - HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) - HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) - HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) - HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) - HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) - HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) - HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) - HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) - HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) - HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) - HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) - HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) - HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) - HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) - HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) - HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) - HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) - REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) - REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) - REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) - REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) - REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) - REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) - REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) - REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) - REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) - REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) - REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) - REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) -]) diff --git a/gnulib/m4/stpcpy.m4 b/gnulib/m4/stpcpy.m4 deleted file mode 100644 index c321d49..0000000 --- a/gnulib/m4/stpcpy.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# stpcpy.m4 serial 7 -dnl Copyright (C) 2002, 2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STPCPY], -[ - dnl Persuade glibc to declare stpcpy(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'. - AC_REQUIRE([AC_C_RESTRICT]) - - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REPLACE_FUNCS([stpcpy]) - if test $ac_cv_func_stpcpy = no; then - HAVE_STPCPY=0 - gl_PREREQ_STPCPY - fi -]) - -# Prerequisites of lib/stpcpy.c. -AC_DEFUN([gl_PREREQ_STPCPY], [ - : -]) diff --git a/gnulib/m4/strcase.m4 b/gnulib/m4/strcase.m4 deleted file mode 100644 index 1c553ff..0000000 --- a/gnulib/m4/strcase.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# strcase.m4 serial 10 -dnl Copyright (C) 2002, 2005-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STRCASE], -[ - gl_FUNC_STRCASECMP - gl_FUNC_STRNCASECMP -]) - -AC_DEFUN([gl_FUNC_STRCASECMP], -[ - AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) - AC_REPLACE_FUNCS([strcasecmp]) - if test $ac_cv_func_strcasecmp = no; then - HAVE_STRCASECMP=0 - gl_PREREQ_STRCASECMP - fi -]) - -AC_DEFUN([gl_FUNC_STRNCASECMP], -[ - AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) - AC_REPLACE_FUNCS([strncasecmp]) - if test $ac_cv_func_strncasecmp = no; then - gl_PREREQ_STRNCASECMP - fi - AC_CHECK_DECLS([strncasecmp]) - if test $ac_cv_have_decl_strncasecmp = no; then - HAVE_DECL_STRNCASECMP=0 - fi -]) - -# Prerequisites of lib/strcasecmp.c. -AC_DEFUN([gl_PREREQ_STRCASECMP], [ - : -]) - -# Prerequisites of lib/strncasecmp.c. -AC_DEFUN([gl_PREREQ_STRNCASECMP], [ - : -]) diff --git a/gnulib/m4/strcasestr.m4 b/gnulib/m4/strcasestr.m4 deleted file mode 100644 index 2ab7cf7..0000000 --- a/gnulib/m4/strcasestr.m4 +++ /dev/null @@ -1,143 +0,0 @@ -# strcasestr.m4 serial 19 -dnl Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Check that strcasestr is present and works. -AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - - dnl Persuade glibc to declare strcasestr(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gl_FUNC_MEMCHR]) - AC_CHECK_FUNCS([strcasestr]) - if test $ac_cv_func_strcasestr = no; then - HAVE_STRCASESTR=0 - else - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRCASESTR=1 - else - dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. - AC_CACHE_CHECK([whether strcasestr works], - [gl_cv_func_strcasestr_works_always], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include /* for strcasestr */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P -]], [[return !!strcasestr (HAYSTACK, NEEDLE); - ]])], - [gl_cv_func_strcasestr_works_always=yes], - [gl_cv_func_strcasestr_works_always=no], - [dnl glibc 2.12 and cygwin 1.7.7 have a known bug. uClibc is not - dnl affected, since it uses different source code for strcasestr - dnl than glibc. - dnl Assume that it works on all other platforms, even if it is not - dnl linear. - AC_EGREP_CPP([Lucky user], - [ -#ifdef __GNU_LIBRARY__ - #include - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - || defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user -#endif - ], - [gl_cv_func_strcasestr_works_always=yes], - [gl_cv_func_strcasestr_works_always="guessing no"]) - ]) - ]) - if test "$gl_cv_func_strcasestr_works_always" != yes; then - REPLACE_STRCASESTR=1 - AC_LIBOBJ([strcasestr]) - fi - fi - fi - if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then - AC_LIBOBJ([strcasestr]) - gl_PREREQ_STRCASESTR - fi -]) # gl_FUNC_STRCASESTR_SIMPLE - -dnl Additionally, check that strcasestr is efficient. -AC_DEFUN([gl_FUNC_STRCASESTR], -[ - AC_REQUIRE([gl_FUNC_STRCASESTR_SIMPLE]) - if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then - AC_CACHE_CHECK([whether strcasestr works in linear time], - [gl_cv_func_strcasestr_linear], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include /* for signal */ -#include /* for strcasestr */ -#include /* for malloc */ -#include /* for alarm */ -static void quit (int sig) { exit (sig + 128); } -]], [[ - int result = 0; - size_t m = 1000000; - char *haystack = (char *) malloc (2 * m + 2); - char *needle = (char *) malloc (m + 2); - /* Failure to compile this test due to missing alarm is okay, - since all such platforms (mingw) also lack strcasestr. */ - signal (SIGALRM, quit); - alarm (5); - /* Check for quadratic performance. */ - if (haystack && needle) - { - memset (haystack, 'A', 2 * m); - haystack[2 * m] = 'B'; - haystack[2 * m + 1] = 0; - memset (needle, 'A', m); - needle[m] = 'B'; - needle[m + 1] = 0; - if (!strcasestr (haystack, needle)) - result |= 1; - } - return result; - ]])], - [gl_cv_func_strcasestr_linear=yes], [gl_cv_func_strcasestr_linear=no], - [dnl Only glibc > 2.12 and cygwin > 1.7.7 are known to have a - dnl strcasestr that works in linear time. - AC_EGREP_CPP([Lucky user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ - Lucky user - #endif -#endif -#ifdef __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#endif - ], - [gl_cv_func_strcasestr_linear=yes], - [gl_cv_func_strcasestr_linear="guessing no"]) - ]) - ]) - if test "$gl_cv_func_strcasestr_linear" != yes; then - REPLACE_STRCASESTR=1 - AC_LIBOBJ([strcasestr]) - gl_PREREQ_STRCASESTR - fi - fi -]) # gl_FUNC_STRCASESTR - -# Prerequisites of lib/strcasestr.c. -AC_DEFUN([gl_PREREQ_STRCASESTR], [ - : -]) diff --git a/gnulib/m4/strdup.m4 b/gnulib/m4/strdup.m4 deleted file mode 100644 index 3fb36dd..0000000 --- a/gnulib/m4/strdup.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# strdup.m4 serial 12 - -dnl Copyright (C) 2002-2011 Free Software Foundation, Inc. - -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRDUP], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([strdup]) - if test $ac_cv_func_strdup != yes; then - AC_LIBOBJ([strdup]) - gl_PREREQ_STRDUP - fi - AC_CHECK_DECLS_ONCE([strdup]) - if test $ac_cv_have_decl_strdup = no; then - HAVE_DECL_STRDUP=0 - fi -]) - -AC_DEFUN([gl_FUNC_STRDUP_POSIX], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) - AC_CHECK_FUNCS_ONCE([strdup]) - if test $ac_cv_func_strdup = yes; then - if test $gl_cv_func_malloc_posix != yes; then - REPLACE_STRDUP=1 - AC_LIBOBJ([strdup]) - gl_PREREQ_STRDUP - fi - else - AC_LIBOBJ([strdup]) - gl_PREREQ_STRDUP - fi - AC_CHECK_DECLS_ONCE([strdup]) - if test $ac_cv_have_decl_strdup = no; then - HAVE_DECL_STRDUP=0 - fi -]) - -# Prerequisites of lib/strdup.c. -AC_DEFUN([gl_PREREQ_STRDUP], [:]) diff --git a/gnulib/m4/strerror.m4 b/gnulib/m4/strerror.m4 deleted file mode 100644 index 73d1d54..0000000 --- a/gnulib/m4/strerror.m4 +++ /dev/null @@ -1,68 +0,0 @@ -# strerror.m4 serial 9 -dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRERROR], -[ - AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE]) - if test $REPLACE_STRERROR = 1; then - AC_LIBOBJ([strerror]) - AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR], - [Define this to 1 if strerror is broken.]) - fi -]) - -# Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ). -AC_DEFUN([gl_FUNC_STRERROR_SEPARATE], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REQUIRE([gl_HEADER_ERRNO_H]) - if test -z "$ERRNO_H"; then - AC_CACHE_CHECK([for working strerror function], - [gl_cv_func_working_strerror], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[return !*strerror (-2);]])], - [gl_cv_func_working_strerror=yes], - [gl_cv_func_working_strerror=no], - [dnl Assume crossbuild works if it compiles. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[return !*strerror (-2);]])], - [gl_cv_func_working_strerror=yes], - [gl_cv_func_working_strerror=no]) - ]) - ]) - if test $gl_cv_func_working_strerror = no; then - dnl The system's strerror() fails to return a string for out-of-range - dnl integers. Replace it. - REPLACE_STRERROR=1 - fi - else - dnl The system's strerror() cannot know about the new errno values we add - dnl to . Replace it. - REPLACE_STRERROR=1 - fi - if test $REPLACE_STRERROR = 1; then - gl_PREREQ_STRERROR - fi -]) - -# Prerequisites of lib/strerror.c. -AC_DEFUN([gl_PREREQ_STRERROR], [ - AC_CHECK_DECLS([strerror]) - AC_CHECK_HEADERS_ONCE([sys/socket.h]) - if test $ac_cv_header_sys_socket_h != yes; then - dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make - dnl the check for those headers unconditional; yet cygwin reports - dnl that the headers are present but cannot be compiled (since on - dnl cygwin, all socket information should come from sys/socket.h). - AC_CHECK_HEADERS([winsock2.h]) - fi -]) diff --git a/gnulib/m4/strftime.m4 b/gnulib/m4/strftime.m4 deleted file mode 100644 index d9de341..0000000 --- a/gnulib/m4/strftime.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# serial 32 - -# Copyright (C) 1996-1997, 1999-2007, 2009-2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Jim Meyering and Paul Eggert. - -AC_DEFUN([gl_FUNC_GNU_STRFTIME], -[ - gl_FUNC_STRFTIME -]) - -# These are the prerequisite macros for GNU's strftime.c replacement. -AC_DEFUN([gl_FUNC_STRFTIME], -[ - AC_LIBOBJ([strftime]) - - # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. - AC_REQUIRE([AC_STRUCT_TIMEZONE]) - - AC_REQUIRE([gl_TM_GMTOFF]) - - AC_CHECK_FUNCS_ONCE([tzset]) - - AC_DEFINE([my_strftime], [nstrftime], - [Define to the name of the strftime replacement function.]) -]) diff --git a/gnulib/m4/string_h.m4 b/gnulib/m4/string_h.m4 deleted file mode 100644 index 30ddfbc..0000000 --- a/gnulib/m4/string_h.m4 +++ /dev/null @@ -1,115 +0,0 @@ -# Configure a GNU-like replacement for . - -# Copyright (C) 2007-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 19 - -# Written by Paul Eggert. - -AC_DEFUN([gl_HEADER_STRING_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_HEADER_STRING_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_STRING_H_BODY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - gl_NEXT_HEADERS([string.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include - ]], - [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup - strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r - strsignal strverscmp]) -]) - -AC_DEFUN([gl_STRING_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], -[ - GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) - GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) - GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) - GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) - GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) - GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) - GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) - GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) - GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) - GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) - GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) - GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) - GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) - GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) - GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) - GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) - GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) - GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) - GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) - GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) - GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) - GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) - GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) - GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) - GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) - GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) - GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) - GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) - GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) - GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) - GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) - GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) - GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) - GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) - GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) - HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) - HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) - HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) - HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) - HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) - HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) - HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) - HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) - HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) - HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) - HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) - HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) - HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) - HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) - HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) - HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) - HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) - HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) - REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) - REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) - REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) - REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) - REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) - REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) - REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) - REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) - REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) - REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) - REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) - REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) - REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) - UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) -]) diff --git a/gnulib/m4/strings_h.m4 b/gnulib/m4/strings_h.m4 deleted file mode 100644 index 71d284b..0000000 --- a/gnulib/m4/strings_h.m4 +++ /dev/null @@ -1,39 +0,0 @@ -# Configure a replacement for . -# serial 3 - -# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_HEADER_STRINGS_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_HEADER_STRINGS_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_STRINGS_H_BODY], -[ - AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) - gl_CHECK_NEXT_HEADERS([strings.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [strcasecmp strncasecmp]) -]) - -AC_DEFUN([gl_STRINGS_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS], -[ - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP]) - HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP]) -]) diff --git a/gnulib/m4/strndup.m4 b/gnulib/m4/strndup.m4 deleted file mode 100644 index d8f00ca..0000000 --- a/gnulib/m4/strndup.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# strndup.m4 serial 18 -dnl Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRNDUP], -[ - dnl Persuade glibc to declare strndup(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_CHECK_DECLS_ONCE([strndup]) - AC_CHECK_FUNCS_ONCE([strndup]) - if test $ac_cv_have_decl_strndup = no; then - HAVE_DECL_STRNDUP=0 - fi - - if test $ac_cv_func_strndup = yes; then - # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. - AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works], - [AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[#include - #include ]], [[ -#ifndef HAVE_DECL_STRNDUP - extern char *strndup (const char *, size_t); -#endif - char *s; - s = strndup ("some longer string", 15); - free (s); - s = strndup ("shorter string", 13); - return s[13] != '\0';]])], - [gl_cv_func_strndup_works=yes], - [gl_cv_func_strndup_works=no], - [ -changequote(,)dnl - case $host_os in - aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; - *) gl_cv_func_strndup_works="guessing yes";; - esac -changequote([,])dnl - ])]) - case $gl_cv_func_strndup_works in - *no) - REPLACE_STRNDUP=1 - AC_LIBOBJ([strndup]) - ;; - esac - else - AC_LIBOBJ([strndup]) - fi -]) diff --git a/gnulib/m4/strnlen.m4 b/gnulib/m4/strnlen.m4 deleted file mode 100644 index a1c59ac..0000000 --- a/gnulib/m4/strnlen.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# strnlen.m4 serial 12 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRNLEN], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - - dnl Persuade glibc to declare strnlen(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS_ONCE([strnlen]) - if test $ac_cv_have_decl_strnlen = no; then - HAVE_DECL_STRNLEN=0 - else - AC_FUNC_STRNLEN - dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]). - if test $ac_cv_func_strnlen_working = no; then - REPLACE_STRNLEN=1 - fi - fi - if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then - AC_LIBOBJ([strnlen]) - gl_PREREQ_STRNLEN - fi -]) - -# Prerequisites of lib/strnlen.c. -AC_DEFUN([gl_PREREQ_STRNLEN], [:]) diff --git a/gnulib/m4/strstr.m4 b/gnulib/m4/strstr.m4 deleted file mode 100644 index a42a1db..0000000 --- a/gnulib/m4/strstr.m4 +++ /dev/null @@ -1,127 +0,0 @@ -# strstr.m4 serial 13 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Check that strstr works. -AC_DEFUN([gl_FUNC_STRSTR_SIMPLE], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REQUIRE([gl_FUNC_MEMCHR]) - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRSTR=1 - AC_LIBOBJ([strstr]) - else - dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. - AC_CACHE_CHECK([whether strstr works], - [gl_cv_func_strstr_works_always], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include /* for strstr */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P -]], [[return !!strstr (HAYSTACK, NEEDLE); - ]])], - [gl_cv_func_strstr_works_always=yes], - [gl_cv_func_strstr_works_always=no], - [dnl glibc 2.12 and cygwin 1.7.7 have a known bug. uClibc is not - dnl affected, since it uses different source code for strstr than - dnl glibc. - dnl Assume that it works on all other platforms, even if it is not - dnl linear. - AC_EGREP_CPP([Lucky user], - [ -#ifdef __GNU_LIBRARY__ - #include - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - || defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user -#endif - ], - [gl_cv_func_strstr_works_always=yes], - [gl_cv_func_strstr_works_always="guessing no"]) - ]) - ]) - if test "$gl_cv_func_strstr_works_always" != yes; then - REPLACE_STRSTR=1 - AC_LIBOBJ([strstr]) - fi - fi -]) # gl_FUNC_STRSTR_SIMPLE - -dnl Additionally, check that strstr is efficient. -AC_DEFUN([gl_FUNC_STRSTR], -[ - AC_REQUIRE([gl_FUNC_STRSTR_SIMPLE]) - if test $REPLACE_STRSTR = 0; then - AC_CACHE_CHECK([whether strstr works in linear time], - [gl_cv_func_strstr_linear], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include /* for signal */ -#include /* for strstr */ -#include /* for malloc */ -#include /* for alarm */ -static void quit (int sig) { exit (sig + 128); } -]], [[ - int result = 0; - size_t m = 1000000; - char *haystack = (char *) malloc (2 * m + 2); - char *needle = (char *) malloc (m + 2); - /* Failure to compile this test due to missing alarm is okay, - since all such platforms (mingw) also have quadratic strstr. */ - signal (SIGALRM, quit); - alarm (5); - /* Check for quadratic performance. */ - if (haystack && needle) - { - memset (haystack, 'A', 2 * m); - haystack[2 * m] = 'B'; - haystack[2 * m + 1] = 0; - memset (needle, 'A', m); - needle[m] = 'B'; - needle[m + 1] = 0; - if (!strstr (haystack, needle)) - result |= 1; - } - return result; - ]])], - [gl_cv_func_strstr_linear=yes], [gl_cv_func_strstr_linear=no], - [dnl Only glibc > 2.12 and cygwin > 1.7.7 are known to have a - dnl bug-free strstr that works in linear time. - AC_EGREP_CPP([Lucky user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !defined __UCLIBC__ - Lucky user - #endif -#endif -#ifdef __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#endif - ], - [gl_cv_func_strstr_linear=yes], - [gl_cv_func_strstr_linear="guessing no"]) - ]) - ]) - if test "$gl_cv_func_strstr_linear" != yes; then - REPLACE_STRSTR=1 - fi - fi - if test $REPLACE_STRSTR = 1; then - AC_LIBOBJ([strstr]) - fi -]) # gl_FUNC_STRSTR diff --git a/gnulib/m4/strtoimax.m4 b/gnulib/m4/strtoimax.m4 deleted file mode 100644 index e82e7cd..0000000 --- a/gnulib/m4/strtoimax.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# strtoimax.m4 serial 8 -dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOIMAX], -[ - AC_CACHE_CHECK([whether defines strtoimax as a macro], - gl_cv_func_strtoimax_macro, - [AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include -#ifdef strtoimax - inttypes_h_defines_strtoimax -#endif], - gl_cv_func_strtoimax_macro=yes, - gl_cv_func_strtoimax_macro=no)]) - - if test "$gl_cv_func_strtoimax_macro" != yes; then - AC_REPLACE_FUNCS([strtoimax]) - if test $ac_cv_func_strtoimax = no; then - gl_PREREQ_STRTOIMAX - fi - fi -]) - -# Prerequisites of lib/strtoimax.c. -AC_DEFUN([gl_PREREQ_STRTOIMAX], [ - AC_CHECK_DECLS([strtoll]) - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) -]) diff --git a/gnulib/m4/strtol.m4 b/gnulib/m4/strtol.m4 deleted file mode 100644 index 10f0284..0000000 --- a/gnulib/m4/strtol.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# strtol.m4 serial 5 -dnl Copyright (C) 2002-2003, 2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOL], -[ - AC_REPLACE_FUNCS([strtol]) -]) diff --git a/gnulib/m4/strtoll.m4 b/gnulib/m4/strtoll.m4 deleted file mode 100644 index fd0a13d..0000000 --- a/gnulib/m4/strtoll.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# strtoll.m4 serial 6 -dnl Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOLL], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - dnl We don't need (and can't compile) the replacement strtoll - dnl unless the type 'long long int' exists. - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - if test "$ac_cv_type_long_long_int" = yes; then - AC_REPLACE_FUNCS([strtoll]) - if test $ac_cv_func_strtoll = no; then - HAVE_STRTOLL=0 - gl_PREREQ_STRTOLL - fi - fi -]) - -# Prerequisites of lib/strtoll.c. -AC_DEFUN([gl_PREREQ_STRTOLL], [ - : -]) diff --git a/gnulib/m4/strtoul.m4 b/gnulib/m4/strtoul.m4 deleted file mode 100644 index 06979d1..0000000 --- a/gnulib/m4/strtoul.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# strtoul.m4 serial 4 -dnl Copyright (C) 2002, 2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOUL], -[ - AC_REPLACE_FUNCS([strtoul]) -]) diff --git a/gnulib/m4/strtoull.m4 b/gnulib/m4/strtoull.m4 deleted file mode 100644 index abf607f..0000000 --- a/gnulib/m4/strtoull.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# strtoull.m4 serial 6 -dnl Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOULL], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - dnl We don't need (and can't compile) the replacement strtoull - dnl unless the type 'unsigned long long int' exists. - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - if test "$ac_cv_type_unsigned_long_long_int" = yes; then - AC_REPLACE_FUNCS([strtoull]) - if test $ac_cv_func_strtoull = no; then - HAVE_STRTOULL=0 - gl_PREREQ_STRTOULL - fi - fi -]) - -# Prerequisites of lib/strtoull.c. -AC_DEFUN([gl_PREREQ_STRTOULL], [ - : -]) diff --git a/gnulib/m4/strtoumax.m4 b/gnulib/m4/strtoumax.m4 deleted file mode 100644 index 448c4d9..0000000 --- a/gnulib/m4/strtoumax.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# strtoumax.m4 serial 8 -dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOUMAX], -[ - AC_CACHE_CHECK([whether defines strtoumax as a macro], - gl_cv_func_strtoumax_macro, - [AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include -#ifdef strtoumax - inttypes_h_defines_strtoumax -#endif], - gl_cv_func_strtoumax_macro=yes, - gl_cv_func_strtoumax_macro=no)]) - - if test "$gl_cv_func_strtoumax_macro" != yes; then - AC_REPLACE_FUNCS([strtoumax]) - if test $ac_cv_func_strtoumax = no; then - gl_PREREQ_STRTOUMAX - fi - fi -]) - -# Prerequisites of lib/strtoumax.c. -AC_DEFUN([gl_PREREQ_STRTOUMAX], [ - AC_CHECK_DECLS([strtoull]) - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) -]) diff --git a/gnulib/m4/symlink.m4 b/gnulib/m4/symlink.m4 deleted file mode 100644 index 917d5f0..0000000 --- a/gnulib/m4/symlink.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# serial 4 -# See if we need to provide symlink replacement. - -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Eric Blake. - -AC_DEFUN([gl_FUNC_SYMLINK], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([symlink]) - dnl The best we can do on mingw is provide a dummy that always fails, so - dnl that compilation can proceed with fewer ifdefs. On FreeBSD 7.2, AIX 7.1, - dnl and Solaris 9, we want to fix a bug with trailing slash handling. - if test $ac_cv_func_symlink = no; then - HAVE_SYMLINK=0 - AC_LIBOBJ([symlink]) - else - AC_CACHE_CHECK([whether symlink handles trailing slash correctly], - [gl_cv_func_symlink_works], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[int result = 0; - if (!symlink ("a", "conftest.link/")) - result |= 1; - if (symlink ("conftest.f", "conftest.lnk2")) - result |= 2; - else if (!symlink ("a", "conftest.lnk2/")) - result |= 4; - return result; - ]])], - [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no], - [gl_cv_func_symlink_works="guessing no"]) - rm -f conftest.f conftest.link conftest.lnk2]) - if test "$gl_cv_func_symlink_works" != yes; then - REPLACE_SYMLINK=1 - AC_LIBOBJ([symlink]) - fi - fi -]) diff --git a/gnulib/m4/symlinkat.m4 b/gnulib/m4/symlinkat.m4 deleted file mode 100644 index 4839568..0000000 --- a/gnulib/m4/symlinkat.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# serial 4 -# See if we need to provide symlinkat replacement. - -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Eric Blake. - -AC_DEFUN([gl_FUNC_SYMLINKAT], -[ - AC_REQUIRE([gl_FUNC_OPENAT]) - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([symlinkat]) - if test $ac_cv_func_symlinkat = no; then - HAVE_SYMLINKAT=0 - AC_LIBOBJ([symlinkat]) - fi -]) diff --git a/gnulib/m4/sys_stat_h.m4 b/gnulib/m4/sys_stat_h.m4 deleted file mode 100644 index fc41912..0000000 --- a/gnulib/m4/sys_stat_h.m4 +++ /dev/null @@ -1,82 +0,0 @@ -# sys_stat_h.m4 serial 24 -*- Autoconf -*- -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Eric Blake. -dnl Provide a GNU-like . - -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]) - - gl_CHECK_NEXT_HEADERS([sys/stat.h]) - - dnl Define types that are supposed to be defined in or - dnl . - AC_CHECK_TYPE([nlink_t], [], - [AC_DEFINE([nlink_t], [int], - [Define to the type of st_nlink in struct stat, or a supertype.])], - [#include - #include ]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat - mknod mknodat stat utimensat]) -]) # gl_HEADER_SYS_STAT_H - -AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR - GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) - GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) - GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) - GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) - GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) - GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) - GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) - GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) - GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) - GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) - GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) - GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) - HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) - HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) - HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) - HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) - HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) - HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) - HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) - HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) - HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) - HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) - REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) - REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) - REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) - REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) - REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) - REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) - REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) - REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) - REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) -]) diff --git a/gnulib/m4/sys_time_h.m4 b/gnulib/m4/sys_time_h.m4 deleted file mode 100644 index 3a3adc8..0000000 --- a/gnulib/m4/sys_time_h.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# Configure a replacement for . -# serial 6 - -# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert and Martin Lambers. - -AC_DEFUN([gl_HEADER_SYS_TIME_H], -[ - dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement - dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1 - dnl statements that occur in other macros. - AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) - AC_CHECK_HEADERS_ONCE([sys/time.h]) - gl_CHECK_NEXT_HEADERS([sys/time.h]) - - if test $ac_cv_header_sys_time_h != yes; then - HAVE_SYS_TIME_H=0 - fi - - AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#if HAVE_SYS_TIME_H - #include - #endif - #include - ]], - [[static struct timeval x; x.tv_sec = x.tv_usec;]])], - [gl_cv_sys_struct_timeval=yes], - [gl_cv_sys_struct_timeval=no])]) - if test $gl_cv_sys_struct_timeval != yes; then - HAVE_STRUCT_TIMEVAL=0 - fi - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -#if HAVE_SYS_TIME_H -# include -#endif -#include - ]], [gettimeofday]) -]) - -AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], -[ - GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY]) - dnl Assume POSIX behavior unless another module says otherwise. - HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY]) - HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) - HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H]) - REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY]) -]) diff --git a/gnulib/m4/sys_wait_h.m4 b/gnulib/m4/sys_wait_h.m4 deleted file mode 100644 index e3b147c..0000000 --- a/gnulib/m4/sys_wait_h.m4 +++ /dev/null @@ -1,33 +0,0 @@ -# sys_wait_h.m4 serial 5 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SYS_WAIT_H], -[ - AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS]) - - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_CHECK_NEXT_HEADERS([sys/wait.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include ]], - [waitpid]) -]) - -AC_DEFUN([gl_SYS_WAIT_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_SYS_WAIT_H_DEFAULTS], -[ - GNULIB_WAITPID=0; AC_SUBST([GNULIB_WAITPID]) - dnl Assume proper GNU behavior unless another module says otherwise. -]) diff --git a/gnulib/m4/thread.m4 b/gnulib/m4/thread.m4 deleted file mode 100644 index 49a4bc7..0000000 --- a/gnulib/m4/thread.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# thread.m4 serial 2 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_THREAD], -[ - AC_REQUIRE([gl_THREADLIB]) - AC_REQUIRE([AC_C_INLINE]) - - if test $gl_threads_api = posix; then - gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIBMULTITHREAD" - AC_CHECK_FUNCS([pthread_atfork]) - LIBS="$gl_save_LIBS" - fi -]) diff --git a/gnulib/m4/threadlib.m4 b/gnulib/m4/threadlib.m4 deleted file mode 100644 index 8a621fd..0000000 --- a/gnulib/m4/threadlib.m4 +++ /dev/null @@ -1,369 +0,0 @@ -# threadlib.m4 serial 8 (gettext-0.18.2) -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl gl_THREADLIB -dnl ------------ -dnl Tests for a multithreading library to be used. -dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO -dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the -dnl default is 'no', otherwise it is system dependent. In both cases, the user -dnl can change the choice through the options --enable-threads=choice or -dnl --disable-threads. -dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, -dnl USE_PTH_THREADS, USE_WIN32_THREADS -dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use -dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with -dnl libtool). -dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for -dnl programs that really need multithread functionality. The difference -dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak -dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". -dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for -dnl multithread-safe programs. - -AC_DEFUN([gl_THREADLIB_EARLY], -[ - AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) -]) - -dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. - -AC_DEFUN([gl_THREADLIB_EARLY_BODY], -[ - dnl Ordering constraints: This macro modifies CPPFLAGS in a way that - dnl influences the result of the autoconf tests that test for *_unlocked - dnl declarations, on AIX 5 at least. Therefore it must come early. - AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl - AC_BEFORE([$0], [gl_ARGP])dnl - - AC_REQUIRE([AC_CANONICAL_HOST]) - dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes - dnl AC_GNU_SOURCE. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], - [AC_REQUIRE([AC_GNU_SOURCE])]) - dnl Check for multithreading. - m4_ifdef([gl_THREADLIB_DEFAULT_NO], - [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], - [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) - AC_ARG_ENABLE([threads], -AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ -AC_HELP_STRING([--disable-threads], [build without multithread safety])]), - [gl_use_threads=$enableval], - [if test -n "$gl_use_threads_default"; then - gl_use_threads="$gl_use_threads_default" - else -changequote(,)dnl - case "$host_os" in - dnl Disable multithreading by default on OSF/1, because it interferes - dnl with fork()/exec(): When msgexec is linked with -lpthread, its - dnl child process gets an endless segmentation fault inside execvp(). - dnl Disable multithreading by default on Cygwin 1.5.x, because it has - dnl bugs that lead to endless loops or crashes. See - dnl . - osf*) gl_use_threads=no ;; - cygwin*) - case `uname -r` in - 1.[0-5].*) gl_use_threads=no ;; - *) gl_use_threads=yes ;; - esac - ;; - *) gl_use_threads=yes ;; - esac -changequote([,])dnl - fi - ]) - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # For using : - case "$host_os" in - osf*) - # On OSF/1, the compiler needs the flag -D_REENTRANT so that it - # groks . cc also understands the flag -pthread, but - # we don't use it because 1. gcc-2.95 doesn't understand -pthread, - # 2. putting a flag into CPPFLAGS that has an effect on the linker - # causes the AC_LINK_IFELSE test below to succeed unexpectedly, - # leading to wrong values of LIBTHREAD and LTLIBTHREAD. - CPPFLAGS="$CPPFLAGS -D_REENTRANT" - ;; - esac - # Some systems optimize for single-threaded programs by default, and - # need special flags to disable these optimizations. For example, the - # definition of 'errno' in . - case "$host_os" in - aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; - solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; - esac - fi -]) - -dnl The guts of gl_THREADLIB. Needs to be expanded only once. - -AC_DEFUN([gl_THREADLIB_BODY], -[ - AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) - gl_threads_api=none - LIBTHREAD= - LTLIBTHREAD= - LIBMULTITHREAD= - LTLIBMULTITHREAD= - if test "$gl_use_threads" != no; then - dnl Check whether the compiler and linker support weak declarations. - AC_CACHE_CHECK([whether imported symbols can be declared weak], - [gl_cv_have_weak], - [gl_cv_have_weak=no - dnl First, test whether the compiler accepts it syntactically. - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[extern void xyzzy (); -#pragma weak xyzzy]], - [[xyzzy();]])], - [gl_cv_have_weak=maybe]) - if test $gl_cv_have_weak = maybe; then - dnl Second, test whether it actually works. On Cygwin 1.7.2, with - dnl gcc 4.3, symbols declared weak always evaluate to the address 0. - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#pragma weak fputs -int main () -{ - return (fputs == NULL); -}]])], - [gl_cv_have_weak=yes], - [gl_cv_have_weak=no], - [dnl When cross-compiling, assume that only ELF platforms support - dnl weak symbols. - AC_EGREP_CPP([Extensible Linking Format], - [#ifdef __ELF__ - Extensible Linking Format - #endif - ], - [gl_cv_have_weak="guessing yes"], - [gl_cv_have_weak="guessing no"]) - ]) - fi - ]) - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. - AC_CHECK_HEADER([pthread.h], - [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[pthread_mutex_lock((pthread_mutex_t*)0); - pthread_mutexattr_init((pthread_mutexattr_t*)0);]])], - [gl_have_pthread=yes]) - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - AC_CHECK_LIB([pthread], [pthread_kill], - [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. - case "$host_os" in - solaris* | hpux*) - AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], - [Define if the pthread_in_use() detection is hard.]) - esac - ]) - else - # Some library is needed. Try libpthread and libc_r. - AC_CHECK_LIB([pthread], [pthread_kill], - [gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - AC_CHECK_LIB([c_r], [pthread_kill], - [gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) - fi - fi - if test -n "$gl_have_pthread"; then - gl_threads_api=posix - AC_DEFINE([USE_POSIX_THREADS], [1], - [Define if the POSIX multithreading library can be used.]) - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], - [Define if references to the POSIX multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then - gl_have_solaristhread= - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lthread" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include - ]], - [[thr_self();]])], - [gl_have_solaristhread=yes]) - LIBS="$gl_save_LIBS" - if test -n "$gl_have_solaristhread"; then - gl_threads_api=solaris - LIBTHREAD=-lthread - LTLIBTHREAD=-lthread - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - AC_DEFINE([USE_SOLARIS_THREADS], [1], - [Define if the old Solaris multithreading library can be used.]) - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], - [Define if references to the old Solaris multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - if test "$gl_use_threads" = pth; then - gl_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_LINKFLAGS([pth]) - gl_have_pth= - gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIBPTH" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[#include ]], [[pth_self();]])], - [gl_have_pth=yes]) - LIBS="$gl_save_LIBS" - if test -n "$gl_have_pth"; then - gl_threads_api=pth - LIBTHREAD="$LIBPTH" - LTLIBTHREAD="$LTLIBPTH" - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - AC_DEFINE([USE_PTH_THREADS], [1], - [Define if the GNU Pth multithreading library can be used.]) - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - AC_DEFINE([USE_PTH_THREADS_WEAK], [1], - [Define if references to the GNU Pth multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - else - CPPFLAGS="$gl_save_CPPFLAGS" - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=win32 - AC_DEFINE([USE_WIN32_THREADS], [1], - [Define if the Win32 multithreading API can be used.]) - fi - fi - fi - fi - AC_MSG_CHECKING([for multithread API to use]) - AC_MSG_RESULT([$gl_threads_api]) - AC_SUBST([LIBTHREAD]) - AC_SUBST([LTLIBTHREAD]) - AC_SUBST([LIBMULTITHREAD]) - AC_SUBST([LTLIBMULTITHREAD]) -]) - -AC_DEFUN([gl_THREADLIB], -[ - AC_REQUIRE([gl_THREADLIB_EARLY]) - AC_REQUIRE([gl_THREADLIB_BODY]) -]) - - -dnl gl_DISABLE_THREADS -dnl ------------------ -dnl Sets the gl_THREADLIB default so that threads are not used by default. -dnl The user can still override it at installation time, by using the -dnl configure option '--enable-threads'. - -AC_DEFUN([gl_DISABLE_THREADS], [ - m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) -]) - - -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 -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 -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 -dnl NetBSD 1.6 -- -dnl -dnl OpenBSD 3.4 posix -lpthread Y OK -dnl -dnl MacOS 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 -dnl HP-UX 11 posix -lpthread N (cc) OK -dnl Y (gcc) -dnl -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 -dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK -dnl -lpthread (gcc) Y -dnl -dnl Cygwin posix -lpthread Y OK -dnl -dnl Any of the above pth -lpth 0.0 -dnl -dnl Mingw win32 N OK -dnl -dnl BeOS 5 -- -dnl -dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is -dnl turned off: -dnl OK if all three tests terminate OK, -dnl 0.5 if the first test terminates OK but the second one loops endlessly, -dnl 0.0 if the first test already loops endlessly. diff --git a/gnulib/m4/time_h.m4 b/gnulib/m4/time_h.m4 deleted file mode 100644 index 615da1c..0000000 --- a/gnulib/m4/time_h.m4 +++ /dev/null @@ -1,109 +0,0 @@ -# Configure a more-standard replacement for . - -# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. - -# serial 4 - -# 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. - -# Written by Paul Eggert and Jim Meyering. - -AC_DEFUN([gl_HEADER_TIME_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_HEADER_TIME_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_TIME_H_BODY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - gl_NEXT_HEADERS([time.h]) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) -]) - -dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared -dnl in time.h, sys/time.h, or pthread.h. - -AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], -[ - AC_CHECK_HEADERS_ONCE([sys/time.h]) - AC_CACHE_CHECK([for struct timespec in ], - [gl_cv_sys_struct_timespec_in_time_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_time_h=yes], - [gl_cv_sys_struct_timespec_in_time_h=no])]) - - TIME_H_DEFINES_STRUCT_TIMESPEC=0 - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 - if test $gl_cv_sys_struct_timespec_in_time_h = yes; then - TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - AC_CACHE_CHECK([for struct timespec in ], - [gl_cv_sys_struct_timespec_in_sys_time_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_sys_time_h=yes], - [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) - if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - AC_CACHE_CHECK([for struct timespec in ], - [gl_cv_sys_struct_timespec_in_pthread_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_pthread_h=yes], - [gl_cv_sys_struct_timespec_in_pthread_h=no])]) - if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 - fi - fi - fi - AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) - AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) - AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) -]) - -AC_DEFUN([gl_TIME_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], -[ - GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) - GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) - GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) - GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) - GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) - HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) - HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) - HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) - dnl If another module says to replace or to not replace, do that. - dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; - dnl this lets maintainers check for portability. - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) - REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) - REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) -]) diff --git a/gnulib/m4/time_r.m4 b/gnulib/m4/time_r.m4 deleted file mode 100644 index 9bb2800..0000000 --- a/gnulib/m4/time_r.m4 +++ /dev/null @@ -1,62 +0,0 @@ -dnl Reentrant time functions: localtime_r, gmtime_r. - -dnl Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl_TIME_R], -[ - dnl Persuade glibc and Solaris to declare localtime_r. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - AC_REQUIRE([AC_C_RESTRICT]) - - dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is - dnl not defined. - AC_CHECK_DECLS_ONCE([localtime_r]) - if test $ac_cv_have_decl_localtime_r = no; then - HAVE_DECL_LOCALTIME_R=0 - fi - - AC_CHECK_FUNCS_ONCE([localtime_r]) - if test $ac_cv_func_localtime_r = yes; then - HAVE_LOCALTIME_R=1 - AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature], - [gl_cv_time_r_posix], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[/* We don't need to append 'restrict's to the argument types, - even though the POSIX signature has the 'restrict's, - since C99 says they can't affect type compatibility. */ - struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; - if (ptr) return 0; - /* Check the return type is a pointer. - On HP-UX 10 it is 'int'. */ - *localtime_r (0, 0);]]) - ], - [gl_cv_time_r_posix=yes], - [gl_cv_time_r_posix=no]) - ]) - if test $gl_cv_time_r_posix = yes; then - REPLACE_LOCALTIME_R=0 - else - REPLACE_LOCALTIME_R=1 - fi - else - HAVE_LOCALTIME_R=0 - fi - if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then - AC_LIBOBJ([time_r]) - gl_PREREQ_TIME_R - fi -]) - -# Prerequisites of lib/time_r.c. -AC_DEFUN([gl_PREREQ_TIME_R], [ - : -]) diff --git a/gnulib/m4/timespec.m4 b/gnulib/m4/timespec.m4 deleted file mode 100644 index 4a1c7ad..0000000 --- a/gnulib/m4/timespec.m4 +++ /dev/null @@ -1,15 +0,0 @@ -#serial 14 - -# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering - -AC_DEFUN([gl_TIMESPEC], -[ - dnl Prerequisites of lib/timespec.h. - AC_REQUIRE([AC_C_INLINE]) -]) diff --git a/gnulib/m4/tm_gmtoff.m4 b/gnulib/m4/tm_gmtoff.m4 deleted file mode 100644 index d65ddc0..0000000 --- a/gnulib/m4/tm_gmtoff.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# tm_gmtoff.m4 serial 3 -dnl Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_TM_GMTOFF], -[ - AC_CHECK_MEMBER([struct tm.tm_gmtoff], - [AC_DEFINE([HAVE_TM_GMTOFF], [1], - [Define if struct tm has the tm_gmtoff member.])], - , - [#include ]) -]) diff --git a/gnulib/m4/ungetc.m4 b/gnulib/m4/ungetc.m4 deleted file mode 100644 index 749f6bd..0000000 --- a/gnulib/m4/ungetc.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# ungetc.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS], -[ - AC_REQUIRE([AC_PROG_CC]) - - AC_CACHE_CHECK([whether ungetc works on arbitrary bytes], - [gl_cv_func_ungetc_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include - ]], [FILE *f; - if (!(f = fopen ("conftest.tmp", "w+"))) return 1; - if (fputs ("abc", f) < 0) return 2; - rewind (f); - if (fgetc (f) != 'a') return 3; - if (fgetc (f) != 'b') return 4; - if (ungetc ('d', f) != 'd') return 5; - if (ftell (f) != 1) return 6; - if (fgetc (f) != 'd') return 7; - if (ftell (f) != 2) return 8; - if (fseek (f, 0, SEEK_CUR) != 0) return 9; - if (ftell (f) != 2) return 10; - if (fgetc (f) != 'c') return 11; - fclose (f); remove ("conftest.tmp");])], - [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no], - [gl_cv_func_ungetc_works='guessing no']) - ]) - if test "$gl_cv_func_ungetc_works" != yes; then - AC_DEFINE([FUNC_UNGETC_BROKEN], [1], - [Define to 1 if ungetc is broken when used on arbitrary bytes.]) - fi -]) diff --git a/gnulib/m4/unistd-safer.m4 b/gnulib/m4/unistd-safer.m4 deleted file mode 100644 index 00ff1bd..0000000 --- a/gnulib/m4/unistd-safer.m4 +++ /dev/null @@ -1,13 +0,0 @@ -#serial 8 -dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_UNISTD_SAFER], -[ - AC_CHECK_FUNCS_ONCE([pipe]) - AC_LIBOBJ([dup-safer]) - AC_LIBOBJ([fd-safer]) - AC_LIBOBJ([pipe-safer]) -]) diff --git a/gnulib/m4/unistd_h.m4 b/gnulib/m4/unistd_h.m4 deleted file mode 100644 index c81a113..0000000 --- a/gnulib/m4/unistd_h.m4 +++ /dev/null @@ -1,162 +0,0 @@ -# unistd_h.m4 serial 53 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Simon Josefsson, Bruno Haible. - -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 - HAVE_UNISTD_H=1 - else - HAVE_UNISTD_H=0 - fi - AC_SUBST([HAVE_UNISTD_H]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include -/* Some systems declare various items in the wrong headers. */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include -# endif -#endif - ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat - fsync ftruncate getcwd getdomainname getdtablesize getgroups - gethostname getlogin getlogin_r getpagesize getusershell setusershell - endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink - readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat - usleep]) -]) - -AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_UNISTD_H_DEFAULTS], -[ - GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) - GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) - GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) - GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) - GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) - GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) - GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) - GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) - GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) - GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) - GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) - GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) - GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) - GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) - GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) - GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) - GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) - GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) - GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) - GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) - GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) - GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) - GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) - GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) - GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) - GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) - GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) - GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) - GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) - GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) - GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) - GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) - GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) - GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) - GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) - GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT]) - GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) - GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) - GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) - GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) - GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) - HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) - HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) - HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) - HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) - HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) - HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) - HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) - HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) - HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) - HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) - HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) - HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) - HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) - HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) - HAVE_LINK=1; AC_SUBST([HAVE_LINK]) - HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) - HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) - HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) - HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) - HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) - HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) - HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) - HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) - HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) - HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) - HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) - HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) - HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) - HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) - HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) - HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) - HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) - HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) - HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) - HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) - HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) - REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) - REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) - REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) - REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) - REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) - REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) - REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) - REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) - REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) - REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) - REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) - REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) - REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) - REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) - REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) - REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) - REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) - REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) - REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) - REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) - REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) - REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) - REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) - REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) - REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) - UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) - UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) -]) diff --git a/gnulib/m4/unlink.m4 b/gnulib/m4/unlink.m4 deleted file mode 100644 index a49a692..0000000 --- a/gnulib/m4/unlink.m4 +++ /dev/null @@ -1,113 +0,0 @@ -# unlink.m4 serial 7 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_UNLINK], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - dnl Detect FreeBSD 7.2, AIX 7.1, Solaris 9 bug. - AC_CACHE_CHECK([whether unlink honors trailing slashes], - [gl_cv_func_unlink_honors_slashes], - [touch conftest.file - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.file conftest.lnk - fi - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - ]], - [[int result = 0; - if (!unlink ("conftest.file/")) - result |= 1; - else if (errno != ENOTDIR) - result |= 2; -#if HAVE_LSTAT - if (!unlink ("conftest.lnk/")) - result |= 4; - else if (errno != ENOTDIR) - result |= 8; -#endif - return result; - ]])], - [gl_cv_func_unlink_honors_slashes=yes], - [gl_cv_func_unlink_honors_slashes=no], - [gl_cv_func_unlink_honors_slashes="guessing no"]) - rm -f conftest.file conftest.lnk]) - dnl Detect MacOS X 10.5.6 bug: On read-write HFS mounts, unlink("..") or - dnl unlink("../..") succeeds without doing anything. - AC_CACHE_CHECK([whether unlink of a parent directory fails as it should], - [gl_cv_func_unlink_parent_fails], - [case "$host_os" in - darwin*) - dnl Try to unlink a subdirectory of /tmp, because /tmp is usually on a - dnl HFS mount on MacOS X. Use a subdirectory, owned by the current - dnl user, because otherwise unlink() may fail due to permissions - dnl reasons, and because when running as root we don't want to risk - dnl destroying the entire /tmp. - if { - # Use the mktemp program if available. If not available, hide the error - # message. - tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" - } || - { - # Use a simple mkdir command. It is guaranteed to fail if the directory - # already exists. $RANDOM is bash specific and expands to empty in shells - # other than bash, ksh and zsh. Its use does not increase security; - # rather, it minimizes the probability of failure in a very cluttered /tmp - # directory. - tmp=/tmp/gt$$-$RANDOM - (umask 077 && mkdir "$tmp") - }; then - mkdir "$tmp/subdir" - GL_SUBDIR_FOR_UNLINK="$tmp/subdir" - export GL_SUBDIR_FOR_UNLINK - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ - #include - #include - int main () - { - int result = 0; - if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0) - result |= 1; - else if (unlink ("..") == 0) - result |= 2; - return result; - } - ]])], - [gl_cv_func_unlink_parent_fails=yes], - [gl_cv_func_unlink_parent_fails=no], - [gl_cv_func_unlink_parent_fails="guessing no"]) - unset GL_SUBDIR_FOR_UNLINK - rm -rf "$tmp" - else - gl_cv_func_unlink_parent_fails="guessing no" - fi - ;; - *) - gl_cv_func_unlink_parent_fails="guessing yes" - ;; - esac - ]) - case "$gl_cv_func_unlink_parent_fails" in - *no) - AC_DEFINE([UNLINK_PARENT_BUG], [1], - [Define to 1 if unlink() on a parent directory may succeed]) - ;; - esac - if test "$gl_cv_func_unlink_honors_slashes" != yes \ - || { case "$gl_cv_func_unlink_parent_fails" in - *yes) false;; - *no) true;; - esac - }; then - REPLACE_UNLINK=1 - AC_LIBOBJ([unlink]) - fi -]) diff --git a/gnulib/m4/unlinkdir.m4 b/gnulib/m4/unlinkdir.m4 deleted file mode 100644 index dabe5f4..0000000 --- a/gnulib/m4/unlinkdir.m4 +++ /dev/null @@ -1,34 +0,0 @@ -# serial 6 - -# Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_UNLINKDIR], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_HEADERS_ONCE([priv.h]) - - AC_LIBOBJ([unlinkdir]) - - # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later, - # Cygwin, and mingw never let anyone (even root) unlink directories. - # If anyone knows of another system for which unlink can never - # remove a directory, please report it to . - # Unfortunately this is difficult to test for, since it requires root access - # and might create garbage in the file system, - # so the code below simply relies on the kernel name and version number. - case $host_os in - gnu[[0-9]]* | \ - linux-* | linux | \ - freebsd2.2* | freebsd[[3-9]]* | freebsd[[1-9]][[0-9]]* | \ - cygwin | \ - mingw*) - AC_DEFINE([UNLINK_CANNOT_UNLINK_DIR], [1], - [Define to 1 if unlink (dir) cannot possibly succeed.]);; - esac -]) diff --git a/gnulib/m4/usleep.m4 b/gnulib/m4/usleep.m4 deleted file mode 100644 index a41cbb1..0000000 --- a/gnulib/m4/usleep.m4 +++ /dev/null @@ -1,37 +0,0 @@ -# usleep.m4 serial 1 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This macro intentionally does not check for select or nanosleep; -dnl both of those modules can require external libraries. -AC_DEFUN([gl_FUNC_USLEEP], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - dnl usleep was required in POSIX 2001, but dropped as obsolete in - dnl POSIX 2008; therefore, it is not always exposed in headers. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([usleep]) - AC_CHECK_TYPE([useconds_t], [], - [AC_DEFINE([useconds_t], [unsigned int], [Define to an unsigned 32-bit - type if lacks this type.])]) - if test $ac_cv_func_usleep = no; then - HAVE_USLEEP=0 - AC_LIBOBJ([usleep]) - else - dnl POSIX allows implementations to reject arguments larger than - dnl 999999, but GNU guarantees it will work. - AC_CACHE_CHECK([whether usleep allows large arguments], - [gl_cv_func_usleep_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include -]], [[return !!usleep (1000000);]])], - [gl_cv_func_usleep_works=yes], [gl_cv_func_usleep_works=no], - [gl_cv_func_usleep_works="guessing no"])]) - if test "$gl_cv_func_usleep_works" != yes; then - REPLACE_USLEEP=1 - AC_LIBOBJ([usleep]) - fi - fi -]) diff --git a/gnulib/m4/vasnprintf.m4 b/gnulib/m4/vasnprintf.m4 deleted file mode 100644 index 32ea985..0000000 --- a/gnulib/m4/vasnprintf.m4 +++ /dev/null @@ -1,289 +0,0 @@ -# vasnprintf.m4 serial 32 -dnl Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_VASNPRINTF], -[ - AC_CHECK_FUNCS_ONCE([vasnprintf]) - if test $ac_cv_func_vasnprintf = no; then - gl_REPLACE_VASNPRINTF - fi -]) - -AC_DEFUN([gl_REPLACE_VASNPRINTF], -[ - AC_CHECK_FUNCS_ONCE([vasnprintf]) - AC_LIBOBJ([vasnprintf]) - AC_LIBOBJ([printf-args]) - AC_LIBOBJ([printf-parse]) - AC_LIBOBJ([asnprintf]) - if test $ac_cv_func_vasnprintf = yes; then - AC_DEFINE([REPLACE_VASNPRINTF], [1], - [Define if vasnprintf exists but is overridden by gnulib.]) - fi - gl_PREREQ_PRINTF_ARGS - gl_PREREQ_PRINTF_PARSE - gl_PREREQ_VASNPRINTF - gl_PREREQ_ASNPRINTF -]) - -# Prequisites of lib/printf-args.h, lib/printf-args.c. -AC_DEFUN([gl_PREREQ_PRINTF_ARGS], -[ - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) -]) - -# Prequisites of lib/printf-parse.h, lib/printf-parse.c. -AC_DEFUN([gl_PREREQ_PRINTF_PARSE], -[ - AC_REQUIRE([gl_FEATURES_H]) - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) - AC_REQUIRE([AC_TYPE_SIZE_T]) - AC_CHECK_TYPE([ptrdiff_t], , - [AC_DEFINE([ptrdiff_t], [long], - [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) - ]) - AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) -]) - -# 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]) - AC_REQUIRE([gt_TYPE_WINT_T]) - AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) - dnl Use the _snprintf function only if it is declared (because on NetBSD it - dnl is defined as a weak alias of snprintf; we prefer to use the latter). - AC_CHECK_DECLS([_snprintf], , , [#include ]) - dnl We can avoid a lot of code by assuming that snprintf's return value - dnl conforms to ISO C99. So check that. - AC_REQUIRE([gl_SNPRINTF_RETVAL_C99]) - case "$gl_cv_func_snprintf_retval_c99" in - *yes) - AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1], - [Define if the return value of the snprintf function is the number of - of bytes (excluding the terminating NUL) that would have been produced - if the buffer had been large enough.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting 'long double' -# arguments. -AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) - case "$gl_cv_func_printf_long_double" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'long double' arguments.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double' -# arguments. -AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_INFINITE]) - case "$gl_cv_func_printf_infinite" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - infinite 'double' arguments.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double' -# arguments. -AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) - dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if - dnl NEED_PRINTF_LONG_DOUBLE is already set. - AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE]) - case "$gl_cv_func_printf_long_double" in - *yes) - case "$gl_cv_func_printf_infinite_long_double" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - infinite 'long double' arguments.]) - ;; - esac - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive. -AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], -[ - AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) - case "$gl_cv_func_printf_directive_a" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1], - [Define if the vasnprintf implementation needs special code for - the 'a' and 'A' directives.]) - AC_CHECK_FUNCS([nl_langinfo]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive. -AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F], -[ - AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) - case "$gl_cv_func_printf_directive_f" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1], - [Define if the vasnprintf implementation needs special code for - the 'F' directive.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive. -AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS], -[ - AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) - case "$gl_cv_func_printf_directive_ls" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1], - [Define if the vasnprintf implementation needs special code for - the 'ls' directive.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag. -AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING], -[ - AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) - case "$gl_cv_func_printf_flag_grouping" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1], - [Define if the vasnprintf implementation needs special code for the - ' flag.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag. -AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST], -[ - AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) - case "$gl_cv_func_printf_flag_leftadjust" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1], - [Define if the vasnprintf implementation needs special code for the - '-' flag.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag. -AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO], -[ - AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) - case "$gl_cv_func_printf_flag_zero" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1], - [Define if the vasnprintf implementation needs special code for the - 0 flag.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting large precisions. -AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION], -[ - AC_REQUIRE([gl_PRINTF_PRECISION]) - case "$gl_cv_func_printf_precision" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1], - [Define if the vasnprintf implementation needs special code for - supporting large precisions without arbitrary bounds.]) - AC_DEFINE([NEED_PRINTF_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'double' arguments.]) - AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'long double' arguments.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory -# conditions. -AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM], -[ - AC_REQUIRE([gl_PRINTF_ENOMEM]) - case "$gl_cv_func_printf_enomem" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_ENOMEM], [1], - [Define if the vasnprintf implementation needs special code for - surviving out-of-memory conditions.]) - AC_DEFINE([NEED_PRINTF_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'double' arguments.]) - AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'long double' arguments.]) - ;; - esac -]) - -# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance. -AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS], -[ - AC_REQUIRE([gl_PREREQ_VASNPRINTF]) - gl_PREREQ_VASNPRINTF_LONG_DOUBLE - gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE - gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE - gl_PREREQ_VASNPRINTF_DIRECTIVE_A - gl_PREREQ_VASNPRINTF_DIRECTIVE_F - gl_PREREQ_VASNPRINTF_DIRECTIVE_LS - gl_PREREQ_VASNPRINTF_FLAG_GROUPING - gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST - gl_PREREQ_VASNPRINTF_FLAG_ZERO - gl_PREREQ_VASNPRINTF_PRECISION - gl_PREREQ_VASNPRINTF_ENOMEM -]) - -# Prerequisites of lib/asnprintf.c. -AC_DEFUN([gl_PREREQ_ASNPRINTF], -[ -]) diff --git a/gnulib/m4/version-etc.m4 b/gnulib/m4/version-etc.m4 deleted file mode 100644 index 5032bf8..0000000 --- a/gnulib/m4/version-etc.m4 +++ /dev/null @@ -1,33 +0,0 @@ -# version-etc.m4 serial 1 -# Copyright (C) 2009-2011 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl $1 - configure flag and define name -dnl $2 - human readable description -m4_define([gl_VERSION_ETC_FLAG], -[dnl - AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])], - [dnl - case $withval in - yes|no) ;; - *) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;; - esac - ]) -]) - -AC_DEFUN([gl_VERSION_ETC], -[dnl - gl_VERSION_ETC_FLAG([packager], - [String identifying the packager of this software]) - gl_VERSION_ETC_FLAG([packager-version], - [Packager-specific version information]) - gl_VERSION_ETC_FLAG([packager-bug-reports], - [Packager info for bug reports (URL/e-mail/...)]) - if test "X$with_packager" = "X" && \ - test "X$with_packager_version$with_packager_bug_reports" != "X" - then - AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager]) - fi -]) diff --git a/gnulib/m4/warn-on-use.m4 b/gnulib/m4/warn-on-use.m4 deleted file mode 100644 index e0d0f27..0000000 --- a/gnulib/m4/warn-on-use.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# warn-on-use.m4 serial 2 -dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) -# --------------------------------------- -# For each whitespace-separated element in the list of NAMES, define -# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES -# even after being undefined as a macro. -# -# See warn-on-use.h for some hints on how to poison function names, as -# well as ideas on poisoning global variables and macros. NAMES may -# include global variables, but remember that only functions work with -# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single -# header, but if the replacement header pulls in other headers because -# some systems declare functions in the wrong header, then INCLUDES -# should do likewise. -# -# If you assume C89, then it is generally safe to assume declarations -# for functions declared in that standard (such as gets) without -# needing gl_WARN_ON_USE_PREPARE. -AC_DEFUN([gl_WARN_ON_USE_PREPARE], -[ - m4_foreach_w([gl_decl], [$2], - [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), - [Define to 1 if ]m4_defn([gl_decl])[ is declared even after - undefining macros.])])dnl - for gl_func in m4_flatten([$2]); do - AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl - AC_CACHE_CHECK([whether $gl_func is declared without a macro], - gl_Symbol, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], -[@%:@undef $gl_func - (void) $gl_func;])], - [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) - AS_VAR_IF(gl_Symbol, [yes], - [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) - dnl shortcut - if the raw declaration exists, then set a cache - dnl variable to allow skipping any later AC_CHECK_DECL efforts - eval ac_cv_have_decl_$gl_func=yes]) - AS_VAR_POPDEF([gl_Symbol])dnl - done -]) diff --git a/gnulib/m4/warnings.m4 b/gnulib/m4/warnings.m4 deleted file mode 100644 index a8f3466..0000000 --- a/gnulib/m4/warnings.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# warnings.m4 serial 2 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson - -# gl_AS_VAR_APPEND(VAR, VALUE) -# ---------------------------- -# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it. -m4_ifdef([AS_VAR_APPEND], -[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])], -[m4_define([gl_AS_VAR_APPEND], -[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])]) - -# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS]) -# ------------------------------------------------ -# Adds parameter to WARN_CFLAGS if the compiler supports it. For example, -# gl_WARN_ADD([-Wparentheses]). -AC_DEFUN([gl_WARN_ADD], -[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl -AC_CACHE_CHECK([whether compiler handles $1], [gl_Warn], [ - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="${CPPFLAGS} $1" - AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])], - [AS_VAR_SET([gl_Warn], [yes])], - [AS_VAR_SET([gl_Warn], [no])]) - CPPFLAGS="$save_CPPFLAGS" -]) -AS_VAR_PUSHDEF([gl_Flags], m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]))dnl -AS_VAR_IF([gl_Warn], [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])]) -AS_VAR_POPDEF([gl_Flags])dnl -AS_VAR_POPDEF([gl_Warn])dnl -m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl -]) diff --git a/gnulib/m4/wchar_h.m4 b/gnulib/m4/wchar_h.m4 deleted file mode 100644 index 6255ff3..0000000 --- a/gnulib/m4/wchar_h.m4 +++ /dev/null @@ -1,232 +0,0 @@ -dnl A placeholder for ISO C99 , for platforms that have issues. - -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Eric Blake. - -# wchar_h.m4 serial 38 - -AC_DEFUN([gl_WCHAR_H], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) - dnl Prepare for creating substitute . - dnl Check for (missing in Linux uClibc when built without wide - dnl character support). - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_CHECK_NEXT_HEADERS([wchar.h]) - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - AC_SUBST([HAVE_WCHAR_H]) - - AC_REQUIRE([gl_FEATURES_H]) - - AC_REQUIRE([gt_TYPE_WINT_T]) - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 - fi - AC_SUBST([HAVE_WINT_T]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -#endif -#include - ]], - [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb - wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset - wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp - wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr - wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth - ]) -]) - -dnl Check whether is usable at all. -AC_DEFUN([gl_WCHAR_H_INLINE_OK], -[ - dnl Test whether suffers due to the transition from '__inline' to - dnl 'gnu_inline'. See - dnl and . In summary, - dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and - dnl the option -std=c99 or -std=gnu99, leads to a broken . - AC_CACHE_CHECK([whether uses 'inline' correctly], - [gl_cv_header_wchar_h_correct_inline], - [gl_cv_header_wchar_h_correct_inline=yes - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([[#define wcstod renamed_wcstod -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -extern int zero (void); -int main () { return zero(); } -]])]) - if AC_TRY_EVAL([ac_compile]); then - mv conftest.$ac_objext conftest1.$ac_objext - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([[#define wcstod renamed_wcstod -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int zero (void) { return 0; } -]])]) - if AC_TRY_EVAL([ac_compile]); then - mv conftest.$ac_objext conftest2.$ac_objext - if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then - : - else - gl_cv_header_wchar_h_correct_inline=no - fi - fi - fi - rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext - ]) - if test $gl_cv_header_wchar_h_correct_inline = no; then - AC_MSG_ERROR([ cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). -This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in -C99 mode. You have four options: - - Add the flag -fgnu89-inline to CC and reconfigure, or - - Fix your include files, using parts of - , or - - Use a gcc version older than 4.3, or - - Don't use the flags -std=c99 or -std=gnu99. -Configuration aborted.]) - fi -]) - -dnl Unconditionally enables the replacement of . -AC_DEFUN([gl_REPLACE_WCHAR_H], -[ - dnl This is a no-op, because is always overridden. - : -]) - -AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_WCHAR_H_DEFAULTS], -[ - GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) - GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) - GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) - GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) - GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) - GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) - GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) - GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) - GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) - GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) - GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) - GNULIB_WMEMCHR=0; AC_SUBST([GNULIB_WMEMCHR]) - GNULIB_WMEMCMP=0; AC_SUBST([GNULIB_WMEMCMP]) - GNULIB_WMEMCPY=0; AC_SUBST([GNULIB_WMEMCPY]) - GNULIB_WMEMMOVE=0; AC_SUBST([GNULIB_WMEMMOVE]) - GNULIB_WMEMSET=0; AC_SUBST([GNULIB_WMEMSET]) - GNULIB_WCSLEN=0; AC_SUBST([GNULIB_WCSLEN]) - GNULIB_WCSNLEN=0; AC_SUBST([GNULIB_WCSNLEN]) - GNULIB_WCSCPY=0; AC_SUBST([GNULIB_WCSCPY]) - GNULIB_WCPCPY=0; AC_SUBST([GNULIB_WCPCPY]) - GNULIB_WCSNCPY=0; AC_SUBST([GNULIB_WCSNCPY]) - GNULIB_WCPNCPY=0; AC_SUBST([GNULIB_WCPNCPY]) - GNULIB_WCSCAT=0; AC_SUBST([GNULIB_WCSCAT]) - GNULIB_WCSNCAT=0; AC_SUBST([GNULIB_WCSNCAT]) - GNULIB_WCSCMP=0; AC_SUBST([GNULIB_WCSCMP]) - GNULIB_WCSNCMP=0; AC_SUBST([GNULIB_WCSNCMP]) - GNULIB_WCSCASECMP=0; AC_SUBST([GNULIB_WCSCASECMP]) - GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP]) - GNULIB_WCSCOLL=0; AC_SUBST([GNULIB_WCSCOLL]) - GNULIB_WCSXFRM=0; AC_SUBST([GNULIB_WCSXFRM]) - GNULIB_WCSDUP=0; AC_SUBST([GNULIB_WCSDUP]) - GNULIB_WCSCHR=0; AC_SUBST([GNULIB_WCSCHR]) - GNULIB_WCSRCHR=0; AC_SUBST([GNULIB_WCSRCHR]) - GNULIB_WCSCSPN=0; AC_SUBST([GNULIB_WCSCSPN]) - GNULIB_WCSSPN=0; AC_SUBST([GNULIB_WCSSPN]) - GNULIB_WCSPBRK=0; AC_SUBST([GNULIB_WCSPBRK]) - GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR]) - GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK]) - GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) - HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) - HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC]) - HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN]) - HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS]) - HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS]) - HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB]) - HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS]) - HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS]) - HAVE_WMEMCHR=1; AC_SUBST([HAVE_WMEMCHR]) - HAVE_WMEMCMP=1; AC_SUBST([HAVE_WMEMCMP]) - HAVE_WMEMCPY=1; AC_SUBST([HAVE_WMEMCPY]) - HAVE_WMEMMOVE=1; AC_SUBST([HAVE_WMEMMOVE]) - HAVE_WMEMSET=1; AC_SUBST([HAVE_WMEMSET]) - HAVE_WCSLEN=1; AC_SUBST([HAVE_WCSLEN]) - HAVE_WCSNLEN=1; AC_SUBST([HAVE_WCSNLEN]) - HAVE_WCSCPY=1; AC_SUBST([HAVE_WCSCPY]) - HAVE_WCPCPY=1; AC_SUBST([HAVE_WCPCPY]) - HAVE_WCSNCPY=1; AC_SUBST([HAVE_WCSNCPY]) - HAVE_WCPNCPY=1; AC_SUBST([HAVE_WCPNCPY]) - HAVE_WCSCAT=1; AC_SUBST([HAVE_WCSCAT]) - HAVE_WCSNCAT=1; AC_SUBST([HAVE_WCSNCAT]) - HAVE_WCSCMP=1; AC_SUBST([HAVE_WCSCMP]) - HAVE_WCSNCMP=1; AC_SUBST([HAVE_WCSNCMP]) - HAVE_WCSCASECMP=1; AC_SUBST([HAVE_WCSCASECMP]) - HAVE_WCSNCASECMP=1; AC_SUBST([HAVE_WCSNCASECMP]) - HAVE_WCSCOLL=1; AC_SUBST([HAVE_WCSCOLL]) - HAVE_WCSXFRM=1; AC_SUBST([HAVE_WCSXFRM]) - HAVE_WCSDUP=1; AC_SUBST([HAVE_WCSDUP]) - HAVE_WCSCHR=1; AC_SUBST([HAVE_WCSCHR]) - HAVE_WCSRCHR=1; AC_SUBST([HAVE_WCSRCHR]) - HAVE_WCSCSPN=1; AC_SUBST([HAVE_WCSCSPN]) - HAVE_WCSSPN=1; AC_SUBST([HAVE_WCSSPN]) - HAVE_WCSPBRK=1; AC_SUBST([HAVE_WCSPBRK]) - HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR]) - HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK]) - HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH]) - HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) - HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) - REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) - REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC]) - REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB]) - REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT]) - REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC]) - REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN]) - REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS]) - REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS]) - REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB]) - REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) - REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) - REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) - REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH]) -]) diff --git a/gnulib/m4/wchar_t.m4 b/gnulib/m4/wchar_t.m4 deleted file mode 100644 index d2c03c4..0000000 --- a/gnulib/m4/wchar_t.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether has the 'wchar_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WCHAR_T], -[ - AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - wchar_t foo = (wchar_t)'\0';]], - [[]])], - [gt_cv_c_wchar_t=yes], - [gt_cv_c_wchar_t=no])]) - if test $gt_cv_c_wchar_t = yes; then - AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) - fi -]) diff --git a/gnulib/m4/wcrtomb.m4 b/gnulib/m4/wcrtomb.m4 deleted file mode 100644 index 2905d9b..0000000 --- a/gnulib/m4/wcrtomb.m4 +++ /dev/null @@ -1,101 +0,0 @@ -# wcrtomb.m4 serial 8 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_WCRTOMB], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - gl_MBSTATE_T_BROKEN - - AC_CHECK_FUNCS_ONCE([wcrtomb]) - if test $ac_cv_func_wcrtomb = no; then - HAVE_WCRTOMB=0 - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_WCRTOMB=1 - else - dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes - dnl returns 0 instead of 1. - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR]) - AC_REQUIRE([gt_LOCALE_FR_UTF8]) - AC_REQUIRE([gt_LOCALE_JA]) - AC_REQUIRE([gt_LOCALE_ZH_CN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether wcrtomb return value is correct], - [gl_cv_func_wcrtomb_retval], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on AIX 4, OSF/1 and Solaris. - aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_wcrtomb_retval="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 1; - } - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 2; - } - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 4; - } - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 8; - } - return result; -}]])], - [gl_cv_func_wcrtomb_retval=yes], - [gl_cv_func_wcrtomb_retval=no], - [:]) - fi - ]) - case "$gl_cv_func_wcrtomb_retval" in - *yes) ;; - *) REPLACE_WCRTOMB=1 ;; - esac - fi - fi - if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then - gl_REPLACE_WCHAR_H - AC_LIBOBJ([wcrtomb]) - gl_PREREQ_WCRTOMB - fi -]) - -# Prerequisites of lib/wcrtomb.c. -AC_DEFUN([gl_PREREQ_WCRTOMB], [ - : -]) diff --git a/gnulib/m4/wctob.m4 b/gnulib/m4/wctob.m4 deleted file mode 100644 index 3b4633c..0000000 --- a/gnulib/m4/wctob.m4 +++ /dev/null @@ -1,133 +0,0 @@ -# wctob.m4 serial 7 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_WCTOB], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - AC_CHECK_FUNCS_ONCE([wctob]) - if test $ac_cv_func_wctob = no; then - HAVE_DECL_WCTOB=0 - gl_REPLACE_WCHAR_H - AC_LIBOBJ([wctob]) - gl_PREREQ_WCTOB - else - - dnl Solaris 9 has the wctob() function but it does not work. - dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned - dnl registers, see . - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether wctob works], - [gl_cv_func_wctob_works], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris <= 9 and Cygwin. - solaris2.[1-9] | solaris2.[1-9].* | cygwin*) - gl_cv_func_wctob_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_wctob_works="guessing yes" ;; - esac -changequote([,])dnl - case "$host_os" in - cygwin*) - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include - -register long global __asm__ ("%ebx"); - -int main () -{ - setlocale (LC_ALL, "en_US.UTF-8"); - - global = 0x12345678; - if (wctob (0x00FC) != -1) - return 1; - if (global != 0x12345678) - return 2; - return 0; -}]])], - [:], - [gl_cv_func_wctob_works=no], - [:]) - ;; - esac - if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - wchar_t wc; - - if (mbtowc (&wc, "\374", 1) == 1) - if (wctob (wc) != (unsigned char) '\374') - return 1; - } - return 0; -}]])], - [gl_cv_func_wctob_works=yes], - [gl_cv_func_wctob_works=no], - [:]) - fi - ]) - case "$gl_cv_func_wctob_works" in - *yes) ;; - *) REPLACE_WCTOB=1 ;; - esac - if test $REPLACE_WCTOB = 1; then - gl_REPLACE_WCHAR_H - AC_LIBOBJ([wctob]) - gl_PREREQ_WCTOB - else - - dnl IRIX 6.5 has the wctob() function but does not declare it. - AC_CHECK_DECLS([wctob], [], [], [ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include -]) - if test $ac_cv_have_decl_wctob != yes; then - HAVE_DECL_WCTOB=0 - gl_REPLACE_WCHAR_H - fi - fi - fi -]) - -# Prerequisites of lib/wctob.c. -AC_DEFUN([gl_PREREQ_WCTOB], [ - : -]) diff --git a/gnulib/m4/wctomb.m4 b/gnulib/m4/wctomb.m4 deleted file mode 100644 index bc21b5b..0000000 --- a/gnulib/m4/wctomb.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# wctomb.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_WCTOMB], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - - if false; then - REPLACE_WCTOMB=1 - fi - if test $REPLACE_WCTOMB = 1; then - AC_LIBOBJ([wctomb]) - gl_PREREQ_WCTOMB - fi -]) - -# Prerequisites of lib/wctomb.c. -AC_DEFUN([gl_PREREQ_WCTOMB], [ - : -]) diff --git a/gnulib/m4/wctype_h.m4 b/gnulib/m4/wctype_h.m4 deleted file mode 100644 index ef9fb04..0000000 --- a/gnulib/m4/wctype_h.m4 +++ /dev/null @@ -1,174 +0,0 @@ -# wctype_h.m4 serial 14 - -dnl A placeholder for ISO C99 , for platforms that lack it. - -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl_WCTYPE_H], -[ - AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS_ONCE([iswcntrl]) - if test $ac_cv_func_iswcntrl = yes; then - HAVE_ISWCNTRL=1 - else - HAVE_ISWCNTRL=0 - fi - AC_SUBST([HAVE_ISWCNTRL]) - - AC_REQUIRE([AC_C_INLINE]) - - AC_REQUIRE([gt_TYPE_WINT_T]) - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 - fi - AC_SUBST([HAVE_WINT_T]) - - gl_CHECK_NEXT_HEADERS([wctype.h]) - if test $ac_cv_header_wctype_h = yes; then - if test $ac_cv_func_iswcntrl = yes; then - dnl Linux libc5 has an iswprint function that returns 0 for all arguments. - dnl The other functions are likely broken in the same way. - AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ - /* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #include - int main () { return iswprint ('x') == 0; } - ]])], - [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #if __GNU_LIBRARY__ == 1 - Linux libc5 i18n is broken. - #endif]], [])], - [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no]) - ]) - ]) - fi - HAVE_WCTYPE_H=1 - else - HAVE_WCTYPE_H=0 - fi - AC_SUBST([HAVE_WCTYPE_H]) - - if test "$gl_cv_func_iswcntrl_works" = no; then - REPLACE_ISWCNTRL=1 - else - REPLACE_ISWCNTRL=0 - fi - AC_SUBST([REPLACE_ISWCNTRL]) - - if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then - dnl Redefine all of iswcntrl, ..., towupper in . - : - fi - - dnl We assume that the wctype() and iswctype() functions exist if and only - dnl if the type wctype_t is defined in or in if that - dnl exists. - dnl HP-UX 11.00 declares all these in and lacks . - AC_CACHE_CHECK([for wctype_t], [gl_cv_type_wctype_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #if HAVE_WCTYPE_H - # include - #endif - wctype_t a; - ]], - [[]])], - [gl_cv_type_wctype_t=yes], - [gl_cv_type_wctype_t=no]) - ]) - if test $gl_cv_type_wctype_t = no; then - HAVE_WCTYPE_T=0 - fi - - dnl We assume that the wctrans() and towctrans() functions exist if and only - dnl if the type wctrans_t is defined in . - AC_CACHE_CHECK([for wctrans_t], [gl_cv_type_wctrans_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #include - wctrans_t a; - ]], - [[]])], - [gl_cv_type_wctrans_t=yes], - [gl_cv_type_wctrans_t=no]) - ]) - if test $gl_cv_type_wctrans_t = no; then - HAVE_WCTRANS_T=0 - fi - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# include -#endif -#include - ]], - [wctype iswctype wctrans towctrans - ]) -]) - -AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_WCTYPE_H_DEFAULTS], -[ - GNULIB_ISWBLANK=0; AC_SUBST([GNULIB_ISWBLANK]) - GNULIB_WCTYPE=0; AC_SUBST([GNULIB_WCTYPE]) - GNULIB_ISWCTYPE=0; AC_SUBST([GNULIB_ISWCTYPE]) - GNULIB_WCTRANS=0; AC_SUBST([GNULIB_WCTRANS]) - GNULIB_TOWCTRANS=0; AC_SUBST([GNULIB_TOWCTRANS]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_ISWBLANK=1; AC_SUBST([HAVE_ISWBLANK]) - HAVE_WCTYPE_T=1; AC_SUBST([HAVE_WCTYPE_T]) - HAVE_WCTRANS_T=1; AC_SUBST([HAVE_WCTRANS_T]) - REPLACE_ISWBLANK=0; AC_SUBST([REPLACE_ISWBLANK]) -]) diff --git a/gnulib/m4/wcwidth.m4 b/gnulib/m4/wcwidth.m4 deleted file mode 100644 index bf39d1d..0000000 --- a/gnulib/m4/wcwidth.m4 +++ /dev/null @@ -1,102 +0,0 @@ -# wcwidth.m4 serial 18 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_WCWIDTH], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - dnl Persuade glibc to declare wcwidth(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) - - AC_CHECK_HEADERS_ONCE([wchar.h]) - AC_CHECK_FUNCS_ONCE([wcwidth]) - - AC_CHECK_DECLS([wcwidth], [], [], [ -/* AIX 3.2.5 declares wcwidth in . */ -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include -]) - if test $ac_cv_have_decl_wcwidth != yes; then - HAVE_DECL_WCWIDTH=0 - fi - - if test $ac_cv_func_wcwidth = yes; then - dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. - dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1. - dnl This leads to bugs in 'ls' (coreutils). - AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales], - [gl_cv_func_wcwidth_works], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -/* AIX 3.2.5 declares wcwidth in . */ -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include -#if !HAVE_DECL_WCWIDTH -extern -# ifdef __cplusplus -"C" -# endif -int wcwidth (int); -#endif -int main () -{ - int result = 0; - if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL) - { - if (wcwidth (0x0301) > 0) - result |= 1; - if (wcwidth (0x200B) > 0) - result |= 2; - } - return result; -}]])], - [gl_cv_func_wcwidth_works=yes], - [gl_cv_func_wcwidth_works=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc and AIX 7 systems. - *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; - *) gl_cv_func_wcwidth_works="guessing no";; - esac -changequote([,])dnl - ]) - ]) - case "$gl_cv_func_wcwidth_works" in - *yes) ;; - *no) REPLACE_WCWIDTH=1 ;; - esac - fi - if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1; then - AC_LIBOBJ([wcwidth]) - fi - if test $ac_cv_func_wcwidth != yes || test $REPLACE_WCWIDTH = 1 \ - || test $HAVE_DECL_WCWIDTH = 0; then - gl_REPLACE_WCHAR_H - fi - dnl We don't substitute HAVE_WCWIDTH. We assume that if the system does not - dnl have the wcwidth function, then it does not declare it. -]) diff --git a/gnulib/m4/wint_t.m4 b/gnulib/m4/wint_t.m4 deleted file mode 100644 index da1ce3d..0000000 --- a/gnulib/m4/wint_t.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# wint_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether has the 'wint_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WINT_T], -[ - AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0';]], - [[]])], - [gt_cv_c_wint_t=yes], - [gt_cv_c_wint_t=no])]) - if test $gt_cv_c_wint_t = yes; then - AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) - fi -]) diff --git a/gnulib/m4/xalloc.m4 b/gnulib/m4/xalloc.m4 deleted file mode 100644 index 4900820..0000000 --- a/gnulib/m4/xalloc.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# xalloc.m4 serial 16 -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XALLOC], -[ - AC_LIBOBJ([xmalloc]) - - gl_PREREQ_XALLOC - gl_PREREQ_XMALLOC -]) - -# Prerequisites of lib/xalloc.h. -AC_DEFUN([gl_PREREQ_XALLOC], [ - AC_REQUIRE([gl_INLINE]) - : -]) - -# Prerequisites of lib/xmalloc.c. -AC_DEFUN([gl_PREREQ_XMALLOC], [ - : -]) diff --git a/gnulib/m4/xgetcwd.m4 b/gnulib/m4/xgetcwd.m4 deleted file mode 100644 index 4ad788b..0000000 --- a/gnulib/m4/xgetcwd.m4 +++ /dev/null @@ -1,12 +0,0 @@ -#serial 6 -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XGETCWD], -[ - AC_LIBOBJ([xgetcwd]) - - AC_REQUIRE([gl_FUNC_GETCWD]) -]) diff --git a/gnulib/m4/xsize.m4 b/gnulib/m4/xsize.m4 deleted file mode 100644 index 8c693bc..0000000 --- a/gnulib/m4/xsize.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# xsize.m4 serial 4 -dnl Copyright (C) 2003-2004, 2008-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_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/gnulib/m4/xstrndup.m4 b/gnulib/m4/xstrndup.m4 deleted file mode 100644 index 1400b0f..0000000 --- a/gnulib/m4/xstrndup.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# xstrndup.m4 serial 2 -dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XSTRNDUP], -[ - gl_PREREQ_XSTRNDUP -]) - -# Prerequisites of lib/xstrndup.c. -AC_DEFUN([gl_PREREQ_XSTRNDUP], [ - : -]) diff --git a/gnulib/m4/xstrtod.m4 b/gnulib/m4/xstrtod.m4 deleted file mode 100644 index 6062179..0000000 --- a/gnulib/m4/xstrtod.m4 +++ /dev/null @@ -1,18 +0,0 @@ -#serial 6 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -# Prerequisites of lib/xstrtod.c. -AC_DEFUN([gl_XSTRTOD], -[ - AC_LIBOBJ([xstrtod]) -]) - -# Prerequisites of lib/xstrtold.c. -AC_DEFUN([gl_XSTRTOLD], -[ - AC_LIBOBJ([xstrtold]) -]) diff --git a/gnulib/m4/xstrtol.m4 b/gnulib/m4/xstrtol.m4 deleted file mode 100644 index 99b7db4..0000000 --- a/gnulib/m4/xstrtol.m4 +++ /dev/null @@ -1,12 +0,0 @@ -#serial 10 -dnl Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XSTRTOL], -[ - AC_LIBOBJ([xstrtol]) - AC_LIBOBJ([xstrtoul]) - AC_LIBOBJ([xstrtol-error]) -]) diff --git a/gnulib/m4/yesno.m4 b/gnulib/m4/yesno.m4 deleted file mode 100644 index 2cf0a77..0000000 --- a/gnulib/m4/yesno.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# yesno.m4 serial 5 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_YESNO], -[ - AC_LIBOBJ([yesno]) - - dnl No prerequisites of lib/yesno.c. - : -]) diff --git a/gnulib/m4/yield.m4 b/gnulib/m4/yield.m4 deleted file mode 100644 index 15d5ac2..0000000 --- a/gnulib/m4/yield.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# yield.m4 serial 2 -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_YIELD], -[ - AC_REQUIRE([gl_THREADLIB]) - dnl On some systems, sched_yield is in librt, rather than in libpthread. - YIELD_LIB= - if test $gl_threads_api = posix; then - dnl Solaris has sched_yield in librt, not in libpthread or libc. - AC_CHECK_LIB([rt], [sched_yield], [YIELD_LIB=-lrt], - [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt. - AC_CHECK_LIB([posix4], [sched_yield], [YIELD_LIB=-lposix4])]) - fi - AC_SUBST([YIELD_LIB]) -]) diff --git a/import-gnulib.config b/import-gnulib.config index 45d89fa..997e1a8 100644 --- a/import-gnulib.config +++ b/import-gnulib.config @@ -1,9 +1,5 @@ # findutils gnulib.config -*- sh -*- -# What version of gnulib to use? -gnulib_version="25d7f3a59bfdc7aaca4a016f687826883a55bef3" -destdir="gnulib" - # Random extra gnulib files needed for findutils. extra_files=' build-aux/config.guess @@ -12,7 +8,6 @@ build-aux/depcomp build-aux/install-sh build-aux/mdate-sh build-aux/mkinstalldirs -build-aux/missing build-aux/texinfo.tex ' @@ -32,7 +27,6 @@ update-copyright # consider using gnu-web-doc-update # consider using idprov-drop and privset for locate # consider using long-options -# consider using manywarnings # consider using nproc in xargs # consider using pmccabe2html # consider using selinux-h @@ -45,9 +39,6 @@ update-copyright # We have rpmatch, either use it for -ok and xargs or remove the dependency # use fileblocks, filemode properly. -# Things for later perhaps: -# consider using d-ino (we currently don't use dirent.d_ino) - # Considered, but no: # consider using autobuild (the information is not usually interesting for us) # consider using same-inode (we don't keep a full struct stat for the ref file) @@ -60,6 +51,7 @@ alloca areadlinkat argmatch assert +byteswap c-strcasestr c-strstr canonicalize @@ -67,6 +59,7 @@ cloexec closein closeout ctype +d-ino d-type dirent-safer dirname @@ -98,6 +91,7 @@ isblank locale lstat malloc +manywarnings math mbrtowc mbscasestr @@ -116,12 +110,14 @@ readlink realloc regex rpmatch +safe-read save-cwd savedir selinux-at snprintf stat stat-macros +stat-size stat-time stdarg stdbool @@ -134,6 +130,7 @@ strcasestr strdup-posix strftime string +strndup strtol strtoul strtoull @@ -142,6 +139,8 @@ sys_stat sys_time sys_wait timespec +uname +unlinkat verify version-etc version-etc-fsf diff --git a/import-gnulib.sh b/import-gnulib.sh index 8bf9a10..ff9c330 100755 --- a/import-gnulib.sh +++ b/import-gnulib.sh @@ -1,8 +1,8 @@ #! /bin/sh # # import-gnulib.sh -- imports a copy of gnulib into findutils -# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,10 +19,10 @@ # ########################################################################## # -# This script is intended to populate the "gnulib" directory +# This script is intended to populate the "gl" directory # with a subset of the gnulib code, as provided by "gnulib-tool". # -# To use it, just run this script with the top-level sourec directory +# To use it, just run this script with the top-level source directory # as your working directory. # If CDPATH is set, it will sometimes print the name of the directory @@ -31,11 +31,9 @@ unset CDPATH ## Defaults -# cvsdir=/doesnotexist -git_repo="git://git.savannah.gnu.org/gnulib.git" configfile="./import-gnulib.config" need_checkout=yes -gnulib_changed=false +gldest=gl # If $GIT_CLONE_DEPTH is not set, apply a default. : ${GIT_CLONE_DEPTH:=4} @@ -46,7 +44,7 @@ original_cmd_line_args="$@" usage() { cat >&2 <&2 - exit 1 - fi - - - if ! [ -d "$gitdir" ] ; then - if mkdir "$gitdir" ; then - echo "Created $gitdir" - else - echo "Failed to create $gitdir" >&2 - exit 1 +do_submodule () { + local sm_name="$1" + if test -f .gitmodules; then + if git config --file \ + .gitmodules "submodule.${sm_name}.url" >/dev/null; then + # Submodule config in .gitmodules is already in place. + # Copy the submodule config into .git. + git submodule init || exit $? + # Update the gnulib module. + git submodule update || exit $? + else + # .gitmodules should include gnulib. + cat >&2 <&2 + exit 1 fi - fi - - # Change directory unconditionally before issuing git commands, because - # we're dealing with two git repositories; the gnulib one and the - # findutils one. - - if ( cd $gitdir && test -d gnulib/.git ; ) ; then - echo "Git repository was already initialised." else - echo "Cloning the git repository..." - ( cd $gitdir && git clone --depth="${GIT_CLONE_DEPTH}" "$git_repo" ; ) - fi - - if ( cd $gitdir/gnulib && - git diff --name-only --exit-code "$gnulib_version" ; ) ; then - # We are already at the correct version. - # Nothing to do - gnulib_changed=false - echo "Already at gnulib version $gnulib_version; no change" - else - gnulib_changed=true - set -x - ( cd $gitdir/gnulib && - git fetch origin && - git checkout "$gnulib_version" ; ) - set +x + # findutils should have .gitmodules + cat >&2 <&2 + echo "Warning: directory ${gldest} already exists." >&2 else - mkdir gnulib + mkdir "${gldest}" fi set -x - if "$tool" --import --symlink --with-tests --dir=. --lib=libgnulib --source-base=gnulib/lib --m4-base=gnulib/m4 --local-dir=gnulib-local $modules + if "$tool" --import --symlink --with-tests \ + --dir=. --lib=libgnulib \ + --source-base="${gldest}"/lib \ + --m4-base="${gldest}"/m4 --local-dir=gnulib-local $modules then set +x else @@ -143,7 +131,7 @@ run_gnulib_tool() { # gnulib-tool does not remove broken symlinks leftover from previous runs; # this assumes GNU find, but should be a safe no-op if it is not - find -L gnulib -lname '*' -delete 2>/dev/null || : + find -L "${gldest}" -lname '*' -delete 2>/dev/null || : } rehack() { @@ -187,7 +175,8 @@ update_licenses() { hack_gnulib_tool_output() { local gnulibdir="${1}" - for file in $extra_files; do + for file in $extra_files + do case $file in */mdate-sh | */texinfo.tex) dest=doc;; *) dest=build-aux;; @@ -195,7 +184,7 @@ hack_gnulib_tool_output() { copyhack "${gnulibdir}"/"$file" "$dest" || exit done - cat > gnulib/Makefile.am < gl/Makefile.am <> .gitattributes " if [ -z "$DO_NOT_WANT_CHANGELOG_DRIVER" ] ; then @@ -313,27 +305,6 @@ Example: } -move_cvsdir() { - local cvs_git_root=":pserver:anonymous@pserver.git.sv.gnu.org:/gnulib.git" - - if test -d gnulib-cvs/gnulib/CVS - then - if test x"$(cat gnulib-cvs/gnulib/CVS/Root)" == x"$cvs_git_root"; then - # We cannot use the git-cvspserver interface because - # "update -D" doesn't work. - echo "WARNING: Migrating from git-cvs-pserver to native git..." >&2 - savedir=gnulib-cvs.before-nativegit-migration - else - # The old CVS repository is not updated any more. - echo "WARNING: Migrating from old CVS repository to native git" >&2 - savedir=gnulib-cvs.before-git-migration - fi - mv gnulib-cvs $savedir || exit 1 - echo "Please delete $savedir eventually" - fi -} - - record_config_change() { # $1: name of the import-gnulib.config file # $2: name of the last.config file @@ -345,6 +316,56 @@ record_config_change() { } +check_old_gnulib_dir_layout() { + # We used to keep the gnulib git repo in ./gnulib-git/ and use + # ./gnulib/ as the destination directory into which we installed + # (part of) the gnulib code. This changed and now ./gnulib/ + # contains the gnulib submodule and the destination directory is + # ./gl/. In other words, ./gnulib/ used to be the destination, + # but now it is the source. +fixmsg="\ +Findutils now manages the gnulib source code as a git submodule. + +If you are still using the directory layout in which the git tree for +gnulib lives in ./gnulib-git/, please fix this and re-run import-gnulib.sh. +The fix is very simple; please delete both ./gnulib/ and ./gnulib-git. + +This wasn't done automatically for you just in case you had any local changes. +" + + if test -d ./gl/; then + # Looks like we're already in the new directory layout. + true + elif test -d ./gnulib-git/; then + cat >&2 <&2 <&2 fi - ## If the config file changed since we last imported, or the gnulib - ## code itself changed, we will need to re-run gnulib-tool. - lastconfig="./gnulib/last.config" - config_changed=false - if "$gnulib_changed" ; then - echo "The gnulib code changed, we need to re-import it." - else - if test -e "$lastconfig" ; then - if cmp "$lastconfig" "$configfile" ; then - echo "Both gnulib and the import config are unchanged." - else - echo "The gnulib import config was changed." - echo "We need to re-run gnulib-tool." - config_changed=true - fi - else - echo "$lastconfig does not exist, we need to run gnulib-tool." - config_changed=true - fi - fi - - ## Invoke gnulib-tool to import the code. local tool="${gnulibdir}"/gnulib-tool - if $gnulib_changed || $config_changed ; then - if run_gnulib_tool "${tool}" && - hack_gnulib_tool_output "${gnulibdir}" && - refresh_output_files && - update_licenses && - update_version_file && - record_config_change "$configfile" "$lastconfig" - then - echo Done. - else - echo FAILED >&2 - exit 1 - fi + if run_gnulib_tool "${tool}" && + hack_gnulib_tool_output "${gnulibdir}" && + refresh_output_files && + update_licenses && + update_version_file "${gnulibdir}" + then + echo Done. else - echo "No change to the gnulib code or configuration." - echo "Therefore, no need to run gnulib-tool." + echo FAILED >&2 + exit 1 fi } diff --git a/lib/Makefile.am b/lib/Makefile.am index 79c431a..5bfa8ca 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -6,7 +6,7 @@ AM_CFLAGS = $(WARN_CFLAGS) noinst_LIBRARIES = libfind.a -check_PROGRAMS = regexprops +check_PROGRAMS = regexprops test_splitstring check_SCRIPTS = check-regexprops regexprops_SOURCES = regexprops.c regextype.c @@ -15,39 +15,44 @@ if CROSS_COMPILING # The regexprops program needs to be a native executable, so we # can't build it with a cross-compiler. else -TESTS += check-regexprops +TESTS += check-regexprops test_splitstring endif -libfind_a_SOURCES = gnulib-version.c findutils-version.c -EXTRA_DIST = extendbuf.h savedirinfo.h buildcmd.h \ - gnulib-version.h gnulib-version.c findutils-version.h \ +libfind_a_SOURCES = findutils-version.c +EXTRA_DIST = extendbuf.h buildcmd.h \ + findutils-version.h \ fdleak.h unused-result.h check-regexprops.sh -BUILT_SOURCES = gnulib-version.c SUFFIXES = MOSTLYCLEANFILES = -CLEANFILES = check-regexprops DISTCLEANFILES = MAINTAINERCLEANFILES = -INCLUDES = -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -LDADD = ../gnulib/lib/libgnulib.a $(LIBINTL) +AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/gl/lib +LDADD = ../gl/lib/libgnulib.a $(LIBINTL) -libfind_a_SOURCES += nextelem.h printquoted.h listfile.h \ - regextype.h dircallback.h safe-atoi.h arg-max.h -libfind_a_SOURCES += listfile.c nextelem.c extendbuf.c buildcmd.c savedirinfo.c \ +libfind_a_SOURCES += printquoted.h listfile.h \ + regextype.h dircallback.h safe-atoi.h splitstring.h +libfind_a_SOURCES += listfile.c extendbuf.c buildcmd.c \ forcefindlib.c qmark.c printquoted.c regextype.c dircallback.c fdleak.c \ - safe-atoi.c + safe-atoi.c splitstring.c + +CLEANFILES = check-regexprops + +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean EXTRA_DIST += waitpid.c forcefindlib.c TESTS_ENVIRONMENT = REGEXPROPS=regexprops$(EXEEXT) -libfind_a_LIBADD = @FINDLIBOBJS@ -libfind_a_DEPENDENCIES = @FINDLIBOBJS@ -# libfind_la_LIBADD = @LTFINDLIBOBJS@ - -# libfind_a_OBJECTS += @FINDLIBOBJS@ -# libfind_la_OBJECTS += @LTFINDLIBOBJS@ +libfind_a_LIBADD = $(FINDLIBOBJS) +libfind_a_DEPENDENCIES = $(FINDLIBOBJS) check-regexprops: check-regexprops.sh cp $(srcdir)/check-regexprops.sh check-regexprops chmod +x check-regexprops + +test_splitstring_SOURCES = test_splitstring.c splitstring.c diff --git a/lib/Makefile.in b/lib/Makefile.in index e08474f..1a25c08 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -33,243 +50,209 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -check_PROGRAMS = regexprops$(EXEEXT) +check_PROGRAMS = regexprops$(EXEEXT) test_splitstring$(EXEEXT) +TESTS = $(am__EXEEXT_1) # The regexprops program needs to be a native executable, so we # can't build it with a cross-compiler. -@CROSS_COMPILING_FALSE@am__append_1 = check-regexprops +@CROSS_COMPILING_FALSE@am__append_1 = check-regexprops test_splitstring subdir = lib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -277,21 +260,23 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar -ARFLAGS = cru libfind_a_AR = $(AR) $(ARFLAGS) -am_libfind_a_OBJECTS = gnulib-version.$(OBJEXT) \ - findutils-version.$(OBJEXT) listfile.$(OBJEXT) \ - nextelem.$(OBJEXT) extendbuf.$(OBJEXT) buildcmd.$(OBJEXT) \ - savedirinfo.$(OBJEXT) forcefindlib.$(OBJEXT) qmark.$(OBJEXT) \ - printquoted.$(OBJEXT) regextype.$(OBJEXT) \ - dircallback.$(OBJEXT) fdleak.$(OBJEXT) safe-atoi.$(OBJEXT) +am__DEPENDENCIES_1 = +am_libfind_a_OBJECTS = findutils-version.$(OBJEXT) listfile.$(OBJEXT) \ + extendbuf.$(OBJEXT) buildcmd.$(OBJEXT) forcefindlib.$(OBJEXT) \ + qmark.$(OBJEXT) printquoted.$(OBJEXT) regextype.$(OBJEXT) \ + dircallback.$(OBJEXT) fdleak.$(OBJEXT) safe-atoi.$(OBJEXT) \ + splitstring.$(OBJEXT) libfind_a_OBJECTS = $(am_libfind_a_OBJECTS) am_regexprops_OBJECTS = regexprops.$(OBJEXT) regextype.$(OBJEXT) regexprops_OBJECTS = $(am_regexprops_OBJECTS) regexprops_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -regexprops_DEPENDENCIES = ../gnulib/lib/libgnulib.a \ +regexprops_DEPENDENCIES = ../gl/lib/libgnulib.a $(am__DEPENDENCIES_1) +am_test_splitstring_OBJECTS = test_splitstring.$(OBJEXT) \ + splitstring.$(OBJEXT) +test_splitstring_OBJECTS = $(am_test_splitstring_OBJECTS) +test_splitstring_LDADD = $(LDADD) +test_splitstring_DEPENDENCIES = ../gl/lib/libgnulib.a \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp @@ -301,12 +286,21 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libfind_a_SOURCES) $(regexprops_SOURCES) -DIST_SOURCES = $(libfind_a_SOURCES) $(regexprops_SOURCES) +SOURCES = $(libfind_a_SOURCES) $(regexprops_SOURCES) \ + $(test_splitstring_SOURCES) +DIST_SOURCES = $(libfind_a_SOURCES) $(regexprops_SOURCES) \ + $(test_splitstring_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= +@CROSS_COMPILING_FALSE@am__EXEEXT_1 = check-regexprops \ +@CROSS_COMPILING_FALSE@ test_splitstring$(EXEEXT) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ @@ -314,6 +308,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -324,6 +320,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -346,59 +343,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -406,6 +450,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -417,12 +463,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -434,10 +495,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -477,49 +554,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -546,6 +663,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -555,7 +674,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -567,8 +687,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -611,26 +733,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -647,17 +791,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -679,19 +833,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -707,6 +877,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -721,8 +897,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -744,30 +929,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -775,6 +992,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -782,18 +1000,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -833,18 +1064,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = -I../gnulib/lib -I$(top_srcdir)/gnulib/lib INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -854,6 +1087,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -864,12 +1099,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -890,6 +1128,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -900,7 +1141,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -908,8 +1151,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -925,7 +1174,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -933,8 +1184,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -956,10 +1213,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -971,19 +1235,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -991,26 +1268,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -1028,6 +1335,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1040,11 +1350,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1052,6 +1372,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1059,10 +1380,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1072,10 +1396,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1099,6 +1428,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1106,14 +1436,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1123,6 +1456,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1135,7 +1470,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1176,9 +1513,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1193,27 +1535,24 @@ AM_CFLAGS = $(WARN_CFLAGS) noinst_LIBRARIES = libfind.a check_SCRIPTS = check-regexprops regexprops_SOURCES = regexprops.c regextype.c -TESTS = $(am__append_1) -libfind_a_SOURCES = gnulib-version.c findutils-version.c nextelem.h \ - printquoted.h listfile.h regextype.h dircallback.h safe-atoi.h \ - arg-max.h listfile.c nextelem.c extendbuf.c buildcmd.c \ - savedirinfo.c forcefindlib.c qmark.c printquoted.c regextype.c \ - dircallback.c fdleak.c safe-atoi.c -EXTRA_DIST = extendbuf.h savedirinfo.h buildcmd.h gnulib-version.h \ - gnulib-version.c findutils-version.h fdleak.h unused-result.h \ - check-regexprops.sh waitpid.c forcefindlib.c -BUILT_SOURCES = gnulib-version.c +libfind_a_SOURCES = findutils-version.c printquoted.h listfile.h \ + regextype.h dircallback.h safe-atoi.h splitstring.h listfile.c \ + extendbuf.c buildcmd.c forcefindlib.c qmark.c printquoted.c \ + regextype.c dircallback.c fdleak.c safe-atoi.c splitstring.c +EXTRA_DIST = extendbuf.h buildcmd.h findutils-version.h fdleak.h \ + unused-result.h check-regexprops.sh waitpid.c forcefindlib.c SUFFIXES = MOSTLYCLEANFILES = -CLEANFILES = check-regexprops DISTCLEANFILES = MAINTAINERCLEANFILES = -LDADD = ../gnulib/lib/libgnulib.a $(LIBINTL) +AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/gl/lib +LDADD = ../gl/lib/libgnulib.a $(LIBINTL) +CLEANFILES = check-regexprops TESTS_ENVIRONMENT = REGEXPROPS=regexprops$(EXEEXT) -libfind_a_LIBADD = @FINDLIBOBJS@ -libfind_a_DEPENDENCIES = @FINDLIBOBJS@ -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am +libfind_a_LIBADD = $(FINDLIBOBJS) +libfind_a_DEPENDENCIES = $(FINDLIBOBJS) +test_splitstring_SOURCES = test_splitstring.c splitstring.c +all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj @@ -1250,16 +1589,19 @@ $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libfind.a: $(libfind_a_OBJECTS) $(libfind_a_DEPENDENCIES) +libfind.a: $(libfind_a_OBJECTS) $(libfind_a_DEPENDENCIES) $(EXTRA_libfind_a_DEPENDENCIES) -rm -f libfind.a $(libfind_a_AR) libfind.a $(libfind_a_OBJECTS) $(libfind_a_LIBADD) $(RANLIB) libfind.a clean-checkPROGRAMS: -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) -regexprops$(EXEEXT): $(regexprops_OBJECTS) $(regexprops_DEPENDENCIES) +regexprops$(EXEEXT): $(regexprops_OBJECTS) $(regexprops_DEPENDENCIES) $(EXTRA_regexprops_DEPENDENCIES) @rm -f regexprops$(EXEEXT) $(LINK) $(regexprops_OBJECTS) $(regexprops_LDADD) $(LIBS) +test_splitstring$(EXEEXT): $(test_splitstring_OBJECTS) $(test_splitstring_DEPENDENCIES) $(EXTRA_test_splitstring_DEPENDENCIES) + @rm -f test_splitstring$(EXEEXT) + $(LINK) $(test_splitstring_OBJECTS) $(test_splitstring_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1273,15 +1615,14 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdleak.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findutils-version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/forcefindlib.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnulib-version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listfile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nextelem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printquoted.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qmark.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexprops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regextype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-atoi.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/savedirinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splitstring.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_splitstring.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -1430,14 +1771,15 @@ check-TESTS: $(TESTS) fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -1474,12 +1816,10 @@ distdir: $(DISTFILES) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am +check: check-am all-am: Makefile $(LIBRARIES) installdirs: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am +install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -1489,10 +1829,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) @@ -1507,12 +1852,11 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am -clean-am: clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \ - mostlyclean-am +clean-am: clean-checkPROGRAMS clean-generic clean-local \ + clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1579,25 +1923,29 @@ ps-am: uninstall-am: -.MAKE: all check check-am install install-am install-strip +.MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES ctags \ - distclean distclean-compile distclean-generic distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + clean-checkPROGRAMS clean-generic clean-local \ + clean-noinstLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + -# libfind_la_LIBADD = @LTFINDLIBOBJS@ +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov -# libfind_a_OBJECTS += @FINDLIBOBJS@ -# libfind_la_OBJECTS += @LTFINDLIBOBJS@ +clean-local: coverage-clean check-regexprops: check-regexprops.sh cp $(srcdir)/check-regexprops.sh check-regexprops diff --git a/lib/arg-max.h b/lib/arg-max.h deleted file mode 100644 index 1d4d412..0000000 --- a/lib/arg-max.h +++ /dev/null @@ -1,49 +0,0 @@ -/* arg-max.h -- ARG_MAX and _SC_ARG_MAX checks and manipulations - - Copyright (C) 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - - Written by James Youngman. -*/ -#ifndef INC_ARG_MAX_H -#define INC_ARG_MAX_H 1 - -#include /* for sysconf() */ - -#ifdef __INTERIX -/* On Interix, _SC_ARG_MAX yields a value that (according to - * http://lists.gnu.org/archive/html/bug-findutils/2010-10/msg00047.html) - * actually does not work (i.e. it is larger than the real limit). - * The value of ARG_MAX is reportedly smaller than the real limit. - * - * I considered a configure test for this which allocates an argument - * list longer than ARG_MAX but shorter than _SC_ARG_MAX and then - * tries to exec something, but this will not work for us when - * cross-compiling if the target is Interix. - * - * Although buildcmd has heuristics for dealing with the possibility - * that execve fails due to length limits in the implementation, it - * assumed that changes are only necessary if execve fails with errno - * set to E2BIG. On Interix, this failure mode of execve appears to - * set errno to ENOMEM. - * - * Since we may undefine _SC_ARG_MAX, we must include this header after - * unistd.h. - */ -# undef _SC_ARG_MAX -# define BC_SC_ARG_MAX_IS_UNRELIABLE 1 -#endif - -#endif diff --git a/lib/buildcmd.c b/lib/buildcmd.c index 44adb41..2616ed6 100644 --- a/lib/buildcmd.c +++ b/lib/buildcmd.c @@ -1,6 +1,6 @@ /* buildcmd.c -- build command lines from a list of arguments. - Copyright (C) 1990, 91, 92, 93, 94, 2000, 2003, 2005, 2006, - 2007, 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2005, 2006, + 2007, 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,14 +15,32 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - +/* config.h must be included first. */ #include +/* system headers. */ +#include +#include +#include +#include +#include +#include +#include #include #include +#ifndef _POSIX_SOURCE +# include +#endif +#include #include -#include -#include +#include + +/* gnulib headers. */ +#include "gettext.h" +#include "xstrtol.h" + +/* find headers. */ +#include "buildcmd.h" #if ENABLE_NLS # include @@ -39,44 +57,16 @@ # define N_(String) String #endif -#ifndef _POSIX_SOURCE -#include -#endif - -#ifdef HAVE_LIMITS_H -#include -#endif - -/* The presence of unistd.h is assumed by gnulib these days, so we - * might as well assume it too. - */ -/* for sysconf() */ -#include - -#include - /* COMPAT: SYSV version defaults size (and has a max value of) to 470. We try to make it as large as possible. See bc_get_arg_max() below. */ -#if !defined(ARG_MAX) && defined(NCARGS) -#error "You have an unusual system. Once you remove this error message from buildcmd.c, it should work, but please make sure that DejaGnu is installed on your system and that 'make check' passes before using the findutils programs" +#if defined NCARGS && !defined ARG_MAX +/* We include sys/param.h in order to detect this case. */ +#error "You have an unusual system. Once you remove this error message from buildcmd.c, it should work, but please make sure that DejaGnu is installed on your system and that 'make check' passes before using the findutils programs. Please mail bug-findutils@gnu.org to tell us about your system." #define ARG_MAX NCARGS #endif - -#include -#include -#include -#include - -#include "xstrtol.h" -#include "buildcmd.h" -#include "arg-max.h" /* must include after unistd.h. */ - - -extern char **environ; - -static char *special_terminating_arg = "do_not_care"; +static const char *special_terminating_arg = "do_not_care"; @@ -374,7 +364,7 @@ bc_push_arg (struct buildcmd_control *ctl, if (!terminate) { - if (state->cmd_argv_chars + len > ctl->arg_max) + if (state->cmd_argv_chars + len + pfxlen > ctl->arg_max) { if (initial_args || state->cmd_argc == ctl->initial_argc) error (EXIT_FAILURE, 0, @@ -461,10 +451,9 @@ bc_get_arg_max (void) */ #ifdef ARG_MAX val = ARG_MAX; -#endif - if (val > 0) return val; +#endif /* The value returned by this function bounds the * value applied as the ceiling for the -s option. @@ -646,9 +635,12 @@ exceeds (const char *env_var_name, size_t quantity) return 0; } -/* Return nonzero if the indicated argument list exceeds a testing limit. */ +/* Return nonzero if the indicated argument list exceeds a testing limit. + * NOTE: argv could be declared 'const char *const *argv', but it works as + * expected only with C++ compilers . + */ bool -bc_args_exceed_testing_limit (const char **argv) +bc_args_exceed_testing_limit (char **argv) { size_t chars, args; diff --git a/lib/buildcmd.h b/lib/buildcmd.h index 95dcd71..f32aeec 100644 --- a/lib/buildcmd.h +++ b/lib/buildcmd.h @@ -1,5 +1,5 @@ /* buildcmd.[ch] -- build command lines from a stream of arguments - Copyright (C) 2005, 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 2005, 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,13 +25,13 @@ struct buildcmd_state { /* Number of valid elements in `cmd_argv', including terminating NULL. */ - int cmd_argc; /* 0 */ + size_t cmd_argc; /* 0 */ /* The list of args being built. */ char **cmd_argv; /* NULL */ /* Number of elements allocated for `cmd_argv'. */ - int cmd_argv_alloc; + size_t cmd_argv_alloc; /* Storage for elements of `cmd_argv'. */ char *argbuf; @@ -52,8 +52,8 @@ struct buildcmd_state int dir_fd; /* Summary of what we think the argv limits are. */ - int largest_successful_arg_count; - int smallest_failed_arg_count; + size_t largest_successful_arg_count; + size_t smallest_failed_arg_count; }; struct buildcmd_control @@ -77,7 +77,7 @@ struct buildcmd_control * function returns a useful value even if ARG_MAX is not defined. * However, sometimes, max_arg_count is LONG_MAX! */ - long max_arg_count; + size_t max_arg_count; /* The length of `replace_pat'. */ @@ -87,20 +87,20 @@ struct buildcmd_control the end of the command argument list, they are each stuck into the initial args, replacing each occurrence of the `replace_pat' in the initial args. */ - char *replace_pat; + const char *replace_pat; /* Number of initial arguments given on the command line. */ - int initial_argc; /* 0 */ + size_t initial_argc; /* 0 */ /* exec callback. */ int (*exec_callback)(struct buildcmd_control *, void *usercontext, int argc, char **argv); /* If nonzero, the maximum number of nonblank lines from stdin to use per command line. */ - long lines_per_exec; /* 0 */ + unsigned long lines_per_exec; /* 0 */ /* The maximum number of arguments to use per command line. */ - long args_per_exec; + size_t args_per_exec; }; enum BC_INIT_STATUS @@ -138,7 +138,7 @@ extern size_t bc_get_arg_max(void); extern void bc_use_sensible_arg_max(struct buildcmd_control *ctl); extern void bc_clear_args(const struct buildcmd_control *ctl, struct buildcmd_state *state); -bool bc_args_exceed_testing_limit(const char **argv); +bool bc_args_exceed_testing_limit(char **argv); #endif diff --git a/lib/dircallback.c b/lib/dircallback.c index c1e4088..c982a0a 100644 --- a/lib/dircallback.c +++ b/lib/dircallback.c @@ -1,5 +1,6 @@ /* listfile.c -- run a function in a specific directory - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,20 +19,22 @@ /* This file was written by James Youngman, based on gnulib'c at-func.c. */ - +/* config.h must be included first. */ #include - -#include "openat.h" -#include -#include +/* system headers. */ #include -#include #include +#include +#include +/* gnulib headers. */ #include "fcntl--.h" +#include "openat.h" #include "save-cwd.h" +/* find headers. */ +#include "dircallback.h" int run_in_dir (const struct saved_cwd *there, diff --git a/lib/dircallback.h b/lib/dircallback.h index d2f74c4..1447a04 100644 --- a/lib/dircallback.h +++ b/lib/dircallback.h @@ -1,5 +1,5 @@ /* listfile.h -- display a long listing of a file - Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,6 @@ struct saved_cwd; int run_in_dirfd (int fd, int (*callback)(void*), void *usercontext); -int run_in_dir (struct saved_cwd*, int (*callback)(void*), void *usercontext); +int run_in_dir (const struct saved_cwd*, int (*callback)(void*), void *usercontext); #endif diff --git a/lib/extendbuf.c b/lib/extendbuf.c index 40ac8a5..e6e9103 100644 --- a/lib/extendbuf.c +++ b/lib/extendbuf.c @@ -1,6 +1,6 @@ /* extendbuf.c -- manage a dynamically-allocated buffer - Copyright 2004, 2010 Free Software Foundation, Inc. + Copyright 2004, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,15 +17,18 @@ */ /* Written by James Yougnman . */ +/* config.h must be included first. */ #include - -#include -#include +/* system headers. */ #include #include +#include +/* gnulib headers. */ #include "xalloc.h" + +/* find headers. */ #include "extendbuf.h" @@ -61,7 +64,7 @@ extendbuf (void* existing, size_t wanted, size_t *allocated) { int saved_errno; size_t newsize; - void *result; /* leave uninitialised to allow static code checkers to identify bugs */ + void *result; /* leave uninitialized to allow static code checkers to identify bugs */ saved_errno = errno; diff --git a/lib/extendbuf.h b/lib/extendbuf.h index 8d495a6..6727af1 100644 --- a/lib/extendbuf.h +++ b/lib/extendbuf.h @@ -1,6 +1,6 @@ /* extendbuf.h -- Manage a dynamically-alloicated buffer - Copyright (C) 2004, 2010 Free Software Foundation, Inc. + Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/fdleak.c b/lib/fdleak.c index ac8d8b0..c22d299 100644 --- a/lib/fdleak.c +++ b/lib/fdleak.c @@ -1,5 +1,5 @@ /* fdleak.c -- detect file descriptor leaks - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14,28 +14,34 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - +/* config.h must be included first. */ #include -#include -#include + +/* system headers. */ +#include #include -#if defined (HAVE_SYS_RESOURCE_H) -#include -#endif #include -#include -#include +#include #include -#include #include +#include +#include +#if defined HAVE_SYS_RESOURCE_H +# include +#endif +#include -#include "fcntl--.h" +/* gnulib headers. */ +#include "cloexec.h" #include "dirent-safer.h" +#include "error.h" +#include "fcntl--.h" +#include "gettext.h" + +/* find headers. */ #include "extendbuf.h" -#include "cloexec.h" -#include "safe-atoi.h" #include "fdleak.h" -#include "error.h" +#include "safe-atoi.h" #if ENABLE_NLS # include @@ -59,14 +65,10 @@ static int *non_cloexec_fds; static size_t num_cloexec_fds; -#if !defined(O_CLOEXEC) -#define O_CLOEXEC 0 -#endif - /* Determine the value of the largest open fd, on systems that * offer /proc/self/fd. */ static int -get_proc_max_fd () +get_proc_max_fd (void) { const char *path = "/proc/self/fd"; int maxfd = -1; @@ -118,7 +120,7 @@ get_max_fd (void) open_max = _POSIX_OPEN_MAX; /* underestimate */ /* We assume if RLIMIT_NOFILE is defined, all the related macros are, too. */ -#if defined (HAVE_GETRUSAGE) && defined (RLIMIT_NOFILE) +#if defined HAVE_GETRUSAGE && defined RLIMIT_NOFILE if (0 == getrlimit (RLIMIT_NOFILE, &fd_limit)) { if (fd_limit.rlim_cur == RLIM_INFINITY) @@ -160,12 +162,12 @@ visit_open_fds (int fd_min, int fd_max, } else { - int i; - for (i=0; i. */ +/* config.h must be included first. */ #include -#include "stdio-safer.h" -#include "version-etc.h" -#include "gnulib-version.h" +/* system headers would go here if we needed any. */ + +/* gnulib headers. */ +#include "gettext.h" +#include "version-etc.h" +/* find headers. */ +#include "findutils-version.h" #if ENABLE_NLS # include @@ -28,24 +33,14 @@ #else # define _(Text) Text #endif -#ifdef gettext_noop -# define N_(String) gettext_noop (String) -#else -/* See locate.c for explanation as to why not use (String) */ -# define N_(String) String -#endif - - #ifdef _LIBC /* In the GNU C library, there is a predefined variable for this. */ # define program_name program_invocation_name #endif - extern char *program_name; -char *version_string = VERSION; - +const char *version_string = VERSION; void display_findutils_version (const char *official_name) @@ -61,5 +56,4 @@ display_findutils_version (const char *official_name) _("James Youngman"), _("Kevin Dalley"), (const char*) NULL); - printf (_("Built using GNU gnulib version %s\n"), gnulib_version); } diff --git a/lib/findutils-version.h b/lib/findutils-version.h index 65006c2..e73df79 100644 --- a/lib/findutils-version.h +++ b/lib/findutils-version.h @@ -1,5 +1,5 @@ /* findutils-version.h -- show version information for findutils - Copyright (C) 2007, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/forcefindlib.c b/lib/forcefindlib.c index 63199c8..82999b6 100644 --- a/lib/forcefindlib.c +++ b/lib/forcefindlib.c @@ -1,5 +1,5 @@ /* Ensures that the FINDLIB_REPLACE_FUNCS macro in configure.in works - Copyright (C) 2004, 2010 Free Software Foundation, Inc. + Copyright (C) 2004, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/gnulib-version.c b/lib/gnulib-version.c deleted file mode 100644 index 7be8c28..0000000 --- a/lib/gnulib-version.c +++ /dev/null @@ -1,2 +0,0 @@ -/* This file is automatically generated by import-gnulib.sh and simply records which version of gnulib we used. */ -const char * const gnulib_version = "25d7f3a59bfdc7aaca4a016f687826883a55bef3"; diff --git a/lib/gnulib-version.h b/lib/gnulib-version.h deleted file mode 100644 index 73466c3..0000000 --- a/lib/gnulib-version.h +++ /dev/null @@ -1,18 +0,0 @@ -/* gnulib-version.h - Copyright (C) 2007, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -extern const char * const gnulib_version; diff --git a/lib/listfile.c b/lib/listfile.c index 2e18aae..8e7bd61 100644 --- a/lib/listfile.c +++ b/lib/listfile.c @@ -1,6 +1,6 @@ /* listfile.c -- display a long listing of a file - Copyright (C) 1991, 1993, 2000, 2004, 2005, 2007, - 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 1991, 1993, 2000, 2004, 2005, 2007, 2008, 2010, 2011 + Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,32 +15,36 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - +/* config.h must be included first. */ #include +/* system headers. */ #include - -#include -#include -#include -#include -#include -#include -#include #include #include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include #include /* for readlink() */ -#include -#include -#include "human.h" -#include "pathmax.h" +/* gnulib headers. */ +#include "areadlink.h" #include "error.h" #include "filemode.h" +#include "human.h" #include "idcache.h" -#include "areadlink.h" +#include "pathmax.h" +#include "stat-size.h" +#include "gettext.h" +/* find headers. */ #include "listfile.h" /* Since major is a function on SVR4, we can't use `ifndef major'. */ @@ -53,69 +57,6 @@ #define HAVE_MAJOR #endif - - -/* Get or fake the disk device blocksize. - Usually defined by sys/param.h (if at all). */ -#ifndef DEV_BSIZE -# ifdef BSIZE -# define DEV_BSIZE BSIZE -# else /* !BSIZE */ -# define DEV_BSIZE 4096 -# endif /* !BSIZE */ -#endif /* !DEV_BSIZE */ - -/* Extract or fake data from a `struct stat'. - ST_BLKSIZE: Preferred I/O blocksize for the file, in bytes. - ST_NBLOCKS: Number of blocks in the file, including indirect blocks. - ST_NBLOCKSIZE: Size of blocks used when calculating ST_NBLOCKS. */ -#ifndef HAVE_STRUCT_STAT_ST_BLOCKS -# define ST_BLKSIZE(statbuf) DEV_BSIZE -# if defined _POSIX_SOURCE || !defined BSIZE /* fileblocks.c uses BSIZE. */ -# define ST_NBLOCKS(statbuf) \ - (S_ISREG ((statbuf).st_mode) \ - || S_ISDIR ((statbuf).st_mode) \ - ? (statbuf).st_size / ST_NBLOCKSIZE + ((statbuf).st_size % ST_NBLOCKSIZE != 0) : 0) -# else /* !_POSIX_SOURCE && BSIZE */ -# define ST_NBLOCKS(statbuf) \ - (S_ISREG ((statbuf).st_mode) \ - || S_ISDIR ((statbuf).st_mode) \ - ? st_blocks ((statbuf).st_size) : 0) -# endif /* !_POSIX_SOURCE && BSIZE */ -#else /* HAVE_STRUCT_STAT_ST_BLOCKS */ -/* Some systems, like Sequents, return st_blksize of 0 on pipes. */ -# define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \ - ? (statbuf).st_blksize : DEV_BSIZE) -# if defined hpux || defined __hpux__ || defined __hpux -/* HP-UX counts st_blocks in 1024-byte units. - This loses when mixing HP-UX and BSD filesystems with NFS. */ -# define ST_NBLOCKSIZE 1024 -# else /* !hpux */ -# if defined _AIX && defined _I386 -/* AIX PS/2 counts st_blocks in 4K units. */ -# define ST_NBLOCKSIZE (4 * 1024) -# else /* not AIX PS/2 */ -# if defined _CRAY -# define ST_NBLOCKS(statbuf) \ - (S_ISREG ((statbuf).st_mode) \ - || S_ISDIR ((statbuf).st_mode) \ - ? (statbuf).st_blocks * ST_BLKSIZE(statbuf)/ST_NBLOCKSIZE : 0) -# endif /* _CRAY */ -# endif /* not AIX PS/2 */ -# endif /* !hpux */ -#endif /* HAVE_STRUCT_STAT_ST_BLOCKS */ - -#ifndef ST_NBLOCKS -# define ST_NBLOCKS(statbuf) \ - (S_ISREG ((statbuf).st_mode) \ - || S_ISDIR ((statbuf).st_mode) \ - ? (statbuf).st_blocks : 0) -#endif - -#ifndef ST_NBLOCKSIZE -# define ST_NBLOCKSIZE 512 -#endif - #ifdef major /* Might be defined in sys/types.h. */ #define HAVE_MAJOR #endif @@ -125,16 +66,20 @@ #endif #undef HAVE_MAJOR +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif -static void print_name (register const char *p, FILE *stream, int literal_control_chars); - - -size_t -file_blocksize (const struct stat *p) -{ - return ST_NBLOCKSIZE; -} - +static bool print_name (register const char *p, FILE *stream, int literal_control_chars); /* NAME is the name to print. @@ -160,6 +105,8 @@ list_file (const char *name, char const *user_name; char const *group_name; char hbuf[LONGEST_HUMAN_READABLE + 1]; + bool output_good = true; + int failed_at = 000; #if HAVE_ST_DM_MODE /* Cray DMF: look at the file's migrated, not real, status */ @@ -168,181 +115,301 @@ list_file (const char *name, strmode (statp->st_mode, modebuf); #endif - fprintf (stream, "%6s ", - human_readable ((uintmax_t) statp->st_ino, hbuf, - human_ceiling, - 1, 1)); - - fprintf (stream, "%4s ", - human_readable ((uintmax_t) ST_NBLOCKS (*statp), hbuf, - human_ceiling, - ST_NBLOCKSIZE, output_block_size)); + if (fprintf (stream, "%6s ", + human_readable ((uintmax_t) statp->st_ino, hbuf, + human_ceiling, + 1u, 1u)) < 0) + { + output_good = false; + failed_at = 100; + } + if (output_good) + { + if (fprintf (stream, "%4s ", + human_readable ((uintmax_t) ST_NBLOCKS (*statp), hbuf, + human_ceiling, + ST_NBLOCKSIZE, output_block_size)) < 0) + { + output_good = false; + failed_at = 200; + } + } - /* modebuf includes the space between the mode and the number of links, - as the POSIX "optional alternate access method flag". */ - fprintf (stream, "%s%3lu ", modebuf, (unsigned long) statp->st_nlink); + if (output_good) + { + /* modebuf includes the space between the mode and the number of links, + as the POSIX "optional alternate access method flag". */ + if (fprintf (stream, "%s%3lu ", modebuf, (unsigned long) statp->st_nlink) < 0) + { + output_good = false; + failed_at = 300; + } + } - user_name = getuser (statp->st_uid); - if (user_name) - fprintf (stream, "%-8s ", user_name); - else - fprintf (stream, "%-8lu ", (unsigned long) statp->st_uid); + if (output_good) + { + user_name = getuser (statp->st_uid); + if (user_name) + { + output_good = (fprintf (stream, "%-8s ", user_name) >= 0); + if (!output_good) + failed_at = 400; + } + else + { + output_good = (fprintf (stream, "%-8lu ", (unsigned long) statp->st_uid) >= 0); + if (!output_good) + failed_at = 450; + } + } - group_name = getgroup (statp->st_gid); - if (group_name) - fprintf (stream, "%-8s ", group_name); - else - fprintf (stream, "%-8lu ", (unsigned long) statp->st_gid); + if (output_good) + { + group_name = getgroup (statp->st_gid); + if (group_name) + { + output_good = (fprintf (stream, "%-8s ", group_name) >= 0); + if (!output_good) + failed_at = 500; + } + else + { + output_good = (fprintf (stream, "%-8lu ", (unsigned long) statp->st_gid) >= 0); + if (!output_good) + failed_at = 550; + } + } - if (S_ISCHR (statp->st_mode) || S_ISBLK (statp->st_mode)) -#ifdef HAVE_ST_RDEV - fprintf (stream, "%3lu, %3lu ", - (unsigned long) major (statp->st_rdev), - (unsigned long) minor (statp->st_rdev)); + if (output_good) + { + if (S_ISCHR (statp->st_mode) || S_ISBLK (statp->st_mode)) + { +#ifdef HAVE_STRUCT_STAT_ST_RDEV + if (fprintf (stream, "%3lu, %3lu ", + (unsigned long) major (statp->st_rdev), + (unsigned long) minor (statp->st_rdev)) < 0) + { + output_good = false; + failed_at = 600; + } #else - fprintf (stream, " "); + if (fprintf (stream, " ") < 0) + { + output_good = false; + failed_at = 700; + } #endif - else - fprintf (stream, "%8s ", - human_readable ((uintmax_t) statp->st_size, hbuf, - human_ceiling, - 1, - output_block_size < 0 ? output_block_size : 1)); - - if ((when_local = localtime (&statp->st_mtime))) - { - char init_bigbuf[256]; - char *buf = init_bigbuf; - size_t bufsize = sizeof init_bigbuf; - - /* Use strftime rather than ctime, because the former can produce - locale-dependent names for the month (%b). - - Output the year if the file is fairly old or in the future. - POSIX says the cutoff is 6 months old; - approximate this by 6*30 days. - Allow a 1 hour slop factor for what is considered "the future", - to allow for NFS server/client clock disagreement. */ - char const *fmt = - ((current_time - 6 * 30 * 24 * 60 * 60 <= statp->st_mtime - && statp->st_mtime <= current_time + 60 * 60) - ? "%b %e %H:%M" - : "%b %e %Y"); - - while (!strftime (buf, bufsize, fmt, when_local)) - buf = alloca (bufsize *= 2); - - fprintf (stream, "%s ", buf); + } + else + { + if (fprintf (stream, "%8s ", + human_readable ((uintmax_t) statp->st_size, hbuf, + human_ceiling, + 1, + output_block_size < 0 ? output_block_size : 1)) < 0) + { + output_good = false; + failed_at = 800; + } + } } - else - { - /* The time cannot be represented as a local time; - print it as a huge integer number of seconds. */ - int width = 12; - if (statp->st_mtime < 0) + if (output_good) + { + if ((when_local = localtime (&statp->st_mtime))) { - char const *num = human_readable (- (uintmax_t) statp->st_mtime, - hbuf, human_ceiling, 1, 1); - int sign_width = width - strlen (num); - fprintf (stream, "%*s%s ", - sign_width < 0 ? 0 : sign_width, "-", num); + char init_bigbuf[256]; + char *buf = init_bigbuf; + size_t bufsize = sizeof init_bigbuf; + + /* Use strftime rather than ctime, because the former can produce + locale-dependent names for the month (%b). + + Output the year if the file is fairly old or in the future. + POSIX says the cutoff is 6 months old; + approximate this by 6*30 days. + Allow a 1 hour slop factor for what is considered "the future", + to allow for NFS server/client clock disagreement. */ + char const *fmt = + ((current_time - 6 * 30 * 24 * 60 * 60 <= statp->st_mtime + && statp->st_mtime <= current_time + 60 * 60) + ? "%b %e %H:%M" + : "%b %e %Y"); + + while (!strftime (buf, bufsize, fmt, when_local)) + buf = alloca (bufsize *= 2); + + if (fprintf (stream, "%s ", buf) < 0) + { + output_good = false; + failed_at = 900; + } } else - fprintf (stream, "%*s ", width, - human_readable ((uintmax_t) statp->st_mtime, hbuf, - human_ceiling, - 1, 1)); + { + /* The time cannot be represented as a local time; + print it as a huge integer number of seconds. */ + int width = 12; + + if (statp->st_mtime < 0) + { + char const *num = human_readable (- (uintmax_t) statp->st_mtime, + hbuf, human_ceiling, 1, 1); + int sign_width = width - strlen (num); + if (fprintf (stream, "%*s%s ", + sign_width < 0 ? 0 : sign_width, "-", num) < 0) + { + output_good = false; + failed_at = 1000; + } + } + else + { + if (fprintf (stream, "%*s ", width, + human_readable ((uintmax_t) statp->st_mtime, hbuf, + human_ceiling, + 1, 1)) < 0) + { + output_good = false; + failed_at = 1100; + } + } + } } - print_name (name, stream, literal_control_chars); + if (output_good) + { + output_good = print_name (name, stream, literal_control_chars); + if (!output_good) + { + failed_at = 1200; + } + } - if (S_ISLNK (statp->st_mode)) + if (output_good) { - char *linkname = areadlinkat (dir_fd, relname); - if (linkname) + if (S_ISLNK (statp->st_mode)) { - fputs (" -> ", stream); - print_name (linkname, stream, literal_control_chars); + char *linkname = areadlinkat (dir_fd, relname); + if (linkname) + { + if (fputs (" -> ", stream) < 0) + { + output_good = false; + failed_at = 1300; + } + if (output_good) + { + output_good = print_name (linkname, stream, literal_control_chars); + if (!output_good) + { + failed_at = 1350; + } + } + } + else + { + /* POSIX requires in the case of find that if we issue a + * diagnostic we should have a nonzero status. However, + * this function doesn't have a way of telling the caller to + * do that. However, since this function is only used when + * processing "-ls", we're already using an extension. + */ + error (0, errno, "%s", name); + } + free (linkname); } - else + if (output_good) { - /* POSIX requires in the case of find that if we issue a - * diagnostic we should have a nonzero status. However, - * this function doesn't have a way of telling the caller to - * do that. However, since this function is only used when - * processing "-ls", we're already using an extension. - */ - error (0, errno, "%s", name); + if (EOF == putc ('\n', stream)) + { + output_good = false; + if (!output_good) + { + failed_at = 1400; + } + } } - free (linkname); } - putc ('\n', stream); + if (!output_good) + { + error (EXIT_FAILURE, errno, _("Failed to write output (at stage %d)"), failed_at); + } } -static void +static bool print_name_without_quoting (const char *p, FILE *stream) { - fprintf (stream, "%s", p); + return (fprintf (stream, "%s", p) >= 0); } -static void +static bool print_name_with_quoting (register const char *p, FILE *stream) { register unsigned char c; while ((c = *p++) != '\0') { + int fprintf_result = -1; switch (c) { case '\\': - fprintf (stream, "\\\\"); + fprintf_result = fprintf (stream, "\\\\"); break; case '\n': - fprintf (stream, "\\n"); + fprintf_result = fprintf (stream, "\\n"); break; case '\b': - fprintf (stream, "\\b"); + fprintf_result = fprintf (stream, "\\b"); break; case '\r': - fprintf (stream, "\\r"); + fprintf_result = fprintf (stream, "\\r"); break; case '\t': - fprintf (stream, "\\t"); + fprintf_result = fprintf (stream, "\\t"); break; case '\f': - fprintf (stream, "\\f"); + fprintf_result = fprintf (stream, "\\f"); break; case ' ': - fprintf (stream, "\\ "); + fprintf_result = fprintf (stream, "\\ "); break; case '"': - fprintf (stream, "\\\""); + fprintf_result = fprintf (stream, "\\\""); break; default: if (c > 040 && c < 0177) - putc (c, stream); + { + if (EOF == putc (c, stream)) + return false; + fprintf_result = 1; /* otherwise it's used uninitialized. */ + } else - fprintf (stream, "\\%03o", (unsigned int) c); + { + fprintf_result = fprintf (stream, "\\%03o", (unsigned int) c); + } } + if (fprintf_result < 0) + return false; } + return true; } -static void print_name (register const char *p, FILE *stream, int literal_control_chars) +static bool print_name (register const char *p, FILE *stream, int literal_control_chars) { if (literal_control_chars) - print_name_without_quoting (p, stream); + return print_name_without_quoting (p, stream); else - print_name_with_quoting (p, stream); + return print_name_with_quoting (p, stream); } diff --git a/lib/listfile.h b/lib/listfile.h index 4861930..9ee71a2 100644 --- a/lib/listfile.h +++ b/lib/listfile.h @@ -1,6 +1,6 @@ /* listfile.h -- display a long listing of a file - Copyright (C) 1991, 1993, 2000, 2008, 2010 Free Software Foundation, - Inc. + Copyright (C) 1991, 1993, 2000, 2008, 2010, 2011 Free Software + Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,9 +19,5 @@ #if !defined LISTFILE_H # define LISTFILE_H - void list_file (const char *name, int dir_fd, char *relname, const struct stat *statp, time_t current_time, int output_block_size, int literal_control_chars, FILE *stream); - -size_t file_blocksize(const struct stat *p); - #endif diff --git a/lib/nextelem.c b/lib/nextelem.c deleted file mode 100644 index 0840c28..0000000 --- a/lib/nextelem.c +++ /dev/null @@ -1,85 +0,0 @@ -/* Return the next element of a path. - Copyright (C) 1992, 2005, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -/* Written by David MacKenzie , - inspired by John P. Rouillard . */ - -#include - - -#include -#include -#include - - -#include "nextelem.h" - - -/* Return the next element of a colon-separated path. - A null entry in the path is equivalent to "." (the current directory). - - If NEW_PATH is non-NULL, set the path and return NULL. - If NEW_PATH is NULL, return the next item in the string, or - return NULL if there are no more elements. */ - -char * -next_element (const char *new_path, int curdir_ok) -{ - static char *path = NULL; /* Freshly allocated copy of NEW_PATH. */ - static char *end; /* Start of next element to return. */ - static int final_colon; /* If zero, path didn't end with a colon. */ - char *start; /* Start of path element to return. */ - - if (new_path) - { - free (path); - end = path = strdup (new_path); - final_colon = 0; - return NULL; - } - - if (*end == '\0') - { - if (final_colon) - { - final_colon = 0; - return curdir_ok ? "." : ""; - } - return NULL; - } - - start = end; - final_colon = 1; /* Maybe there will be one. */ - - end = strchr (start, ':'); - if (end == start) - { - /* An empty path element. */ - *end++ = '\0'; - return curdir_ok ? "." : ""; - } - else if (end == NULL) - { - /* The last path element. */ - end = strchr (start, '\0'); - final_colon = 0; - } - else - *end++ = '\0'; - - return start; -} diff --git a/lib/nextelem.h b/lib/nextelem.h deleted file mode 100644 index a7aeb14..0000000 --- a/lib/nextelem.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Return the next element of a path. - Copyright (C) 1992, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -/* Written by David MacKenzie , - inspired by John P. Rouillard . */ - -#ifndef INC_NEXTELEM_H -#define INC_NEXTELEM_H 1 - -char *next_element (const char *path, int curdir_ok); - -#endif diff --git a/lib/printquoted.c b/lib/printquoted.c index f2f11a4..ddc09e4 100644 --- a/lib/printquoted.c +++ b/lib/printquoted.c @@ -1,7 +1,7 @@ /* printquoted.c -- print a specified string with any necessary quoting. Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005, - 2007, 2009, 2010 Free Software Foundation, Inc. + 2007, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,18 +16,18 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - +/* config.h must be included first. */ #include - -#include -#include +/* system headers. */ #include +#include - +/* gnulib headers. */ #include "xalloc.h" -#include "printquoted.h" +/* find headers. */ +#include "printquoted.h" /* * Print S according to the format FORMAT, but if the destination is a tty, diff --git a/lib/printquoted.h b/lib/printquoted.h index d3c16b6..539de71 100644 --- a/lib/printquoted.h +++ b/lib/printquoted.h @@ -1,6 +1,6 @@ /* Print a string, appropriately quoted. - Copyright 1997, 1999, 2001, 2003, 2005, 2010 Free Software + Copyright 1997, 1999, 2001, 2003, 2005, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -20,13 +20,12 @@ #if !defined PRINTQUOTED_H # define PRINTQUOTED_H -#include "quote.h" -#include "quotearg.h" - - #include #include +#include "quote.h" +#include "quotearg.h" + size_t qmark_chars(char *buf, size_t len); int print_quoted (FILE *fp, const struct quoting_options *qopts, bool dest_is_tty, const char *format, const char *s); diff --git a/lib/qmark.c b/lib/qmark.c index 1ffd1d7..2e7cd89 100644 --- a/lib/qmark.c +++ b/lib/qmark.c @@ -1,6 +1,7 @@ /* qmark.c -- quote 'dangerous' filenames - Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009, 2010, 2011 Free Software Foundation, + Inc. Derived from courutils' ls.c: Copyright (C) 85, 88, 90, 91, 1995-2005 Free Software Foundation, Inc. @@ -17,15 +18,18 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - +/* config.h must be included first. */ #include -#include -#include +/* system headers. */ #include +#include #include #include +/* gnulib headers would go here if any needed to be included. */ + +/* find headers. */ #include "printquoted.h" @@ -51,21 +55,21 @@ outside the range -1 <= c <= 255. One is tempted to write isupper(c) with c being of type `char', but this is wrong if c is an 8-bit character >= 128 which gets sign-extended to a negative value. - The macro ISUPPER protects against this as well." */ + The macro ISUPPER protects against this as well." + (Actually that rule of ISUPPER is now taken by to_uchar). +*/ - - -/* ISPRINT is defined in on at least Solaris2.6 systems. */ -#undef ISPRINT -#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) - -#if STDC_HEADERS || (!defined (isascii) && !HAVE_ISASCII) +#if STDC_HEADERS # define IN_CTYPE_DOMAIN(c) 1 #else # define IN_CTYPE_DOMAIN(c) isascii(c) #endif +/* ISPRINT is defined in on at least Solaris2.6 systems. */ +#undef ISPRINT +#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) + diff --git a/lib/regexprops.c b/lib/regexprops.c index efef3ec..6270403 100644 --- a/lib/regexprops.c +++ b/lib/regexprops.c @@ -1,7 +1,7 @@ /* regexprops.c -- document the properties of the regular expressions understood by gnulib. - Copyright 2005, 2007, 2010 Free Software Foundation, Inc. + Copyright 2005, 2007, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,18 +26,21 @@ /* Written by James Youngman, . */ +/* config.h must be included first. */ #include - +/* system headers */ +#include +#include #include #include #include -#include -#include "regex.h" -#include "regextype.h" +/* gnulib headers */ #include "progname.h" +/* find headers */ +#include "regextype.h" static void output (const char *s, int escape) @@ -451,7 +454,7 @@ copying (void) static const char *copy_para[]= { "Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006," - ,"2007, 2009, 2010 Free Software Foundation, Inc." + ,"2007, 2009, 2010, 2011 Free Software Foundation, Inc." ,"" ,"Permission is granted to copy, distribute and/or modify this document" ,"under the terms of the GNU Free Documentation License, Version 1.3 or" diff --git a/lib/regextype.c b/lib/regextype.c index cc16b6e..352ffd4 100644 --- a/lib/regextype.c +++ b/lib/regextype.c @@ -2,7 +2,7 @@ /* regextype.c -- Decode the name of a regular expression syntax into am option name. - Copyright 2005, 2010 Free Software Foundation, Inc. + Copyright 2005, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,18 +19,21 @@ */ /* Written by James Youngman, . */ -# include +/* config.h must be included first. */ +#include +/* system headers. */ +#include #include #include -#include -#include -#include "regextype.h" -#include "regex.h" +/* gnulib headers. */ +#include "error.h" +#include "gettext.h" #include "quote.h" +#include "regex.h" +#include "regextype.h" #include "xalloc.h" -#include "error.h" #if ENABLE_NLS @@ -49,9 +52,9 @@ struct tagRegexTypeMap { - char *name; + const char *name; int context; - int option_val; + int option_val; }; struct tagRegexTypeMap regex_map[] = diff --git a/lib/regextype.h b/lib/regextype.h index 6ea101c..f5855e3 100644 --- a/lib/regextype.h +++ b/lib/regextype.h @@ -1,7 +1,7 @@ /* regextype.h -- Decode the name of a regular expression syntax into am option name. - Copyright 2005, 2010 Free Software Foundation, Inc. + Copyright 2005, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/safe-atoi.c b/lib/safe-atoi.c index 70350f7..45e64e9 100644 --- a/lib/safe-atoi.c +++ b/lib/safe-atoi.c @@ -1,5 +1,5 @@ /* safe-atoi.c -- checked string-to-int conversion. - Copyright (C) 2007, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14,16 +14,21 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - +/* config.h must be included first. */ #include + +/* system headers. */ +#include #include #include -#include -#include "safe-atoi.h" -#include "quotearg.h" +/* gnulib headers. */ #include "error.h" +#include "gettext.h" +#include "quotearg.h" +/* find headers. */ +#include "safe-atoi.h" #if ENABLE_NLS # include diff --git a/lib/safe-atoi.h b/lib/safe-atoi.h index d4c6ab6..4341a53 100644 --- a/lib/safe-atoi.h +++ b/lib/safe-atoi.h @@ -1,5 +1,5 @@ /* safe-atoi.h -- checked string-to-int conversion. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/lib/savedirinfo.c b/lib/savedirinfo.c deleted file mode 100644 index d9b6000..0000000 --- a/lib/savedirinfo.c +++ /dev/null @@ -1,281 +0,0 @@ -/* savedirinfo.c -- Save the list of files in a directory, with additional information. - - Copyright 1990, 1997, 1998, 1999, 2000, 2001, 2003, 2004, - 2005, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ -/* Written by James Youngman, . */ -/* Derived from savedir.c, written by David MacKenzie . */ - -#include - -#include - -#if HAVE_SYS_TYPES_H -# include -#endif - -/* The presence of unistd.h is assumed by gnulib these days, so we - * might as well assume it too. - */ -#include - -#include - -#if HAVE_DIRENT_H -# include -#else -# define dirent direct -# if HAVE_SYS_NDIR_H -# include -# endif -# if HAVE_SYS_DIR_H -# include -# endif -# if HAVE_NDIR_H -# include -# endif -#endif - -#ifdef CLOSEDIR_VOID -/* Fake a return value. */ -# define CLOSEDIR(d) (closedir (d), 0) -#else -# define CLOSEDIR(d) closedir (d) -#endif - -#include -#include -#include - -#include "xalloc.h" -#include "extendbuf.h" -#include "dirent-safer.h" -#include "savedirinfo.h" - -#if defined HAVE_STRUCT_DIRENT_D_TYPE -/* Convert the value of struct dirent.d_type into a value for - * struct stat.st_mode (at least the file type bits), or zero - * if the type is DT_UNKNOWN or is a value we don't know about. - */ -static mode_t -type_to_mode (unsigned type) -{ - switch (type) - { -#ifdef DT_FIFO - case DT_FIFO: return S_IFIFO; -#endif -#ifdef DT_CHR - case DT_CHR: return S_IFCHR; -#endif -#ifdef DT_DIR - case DT_DIR: return S_IFDIR; -#endif -#ifdef DT_BLK - case DT_BLK: return S_IFBLK; -#endif -#ifdef DT_REG - case DT_REG: return S_IFREG; -#endif -#ifdef DT_LNK - case DT_LNK: return S_IFLNK; -#endif -#ifdef DT_SOCK - case DT_SOCK: return S_IFSOCK; -#endif - default: - return 0; /* Unknown. */ - } -} -#endif - -struct new_savedir_direntry_internal -{ - int flags; /* from SaveDirDataFlags */ - mode_t type_info; - size_t buffer_offset; -}; - - - -static int -savedir_cmp (const void *p1, const void *p2) -{ - const struct savedir_direntry *de1, *de2; - de1 = p1; - de2 = p2; - return strcmp (de1->name, de2->name); /* POSIX order, not locale order. */ -} - - -static struct savedir_direntry* -convertentries (const struct savedir_dirinfo *info, - struct new_savedir_direntry_internal *internal) -{ - char *p = info->buffer; - struct savedir_direntry *result; - int n =info->size; - int i; - - - result = xmalloc (sizeof (*result) * info->size); - - for (i=0; ibuffer = NULL; - result->size = 0u; - result->entries = NULL; - internal = NULL; - - while ((dp = readdir (dirp)) != NULL) - { - /* Skip "", ".", and "..". "" is returned by at least one buggy - implementation: Solaris 2.4 readdir on NFS file systems. */ - char const *entry = dp->d_name; - if (entry[entry[0] != '.' ? 0 : entry[1] != '.' ? 1 : 2] != '\0') - { - /* Remember the name. */ - size_t entry_size = strlen (entry) + 1; - result->buffer = xextendbuf (result->buffer, namebuf_used+entry_size, &namebuf_allocated); - memcpy ((result->buffer) + namebuf_used, entry, entry_size); - - /* Remember the other stuff. */ - internal = xextendbuf (internal, (1+result->size)*sizeof (*internal), &entrybuf_allocated); - internal[result->size].flags = 0; - - internal[result->size].type_info = 0; -#if defined HAVE_STRUCT_DIRENT_D_TYPE - internal[result->size].type_info = type_to_mode (dp->d_type); - if (dp->d_type != DT_UNKNOWN) - internal[result->size].flags |= SavedirHaveFileType; -#endif - internal[result->size].buffer_offset = namebuf_used; - - /* Prepare for the next iteration */ - ++(result->size); - namebuf_used += entry_size; - } - } - - result->buffer = xextendbuf (result->buffer, namebuf_used+1, &namebuf_allocated); - result->buffer[namebuf_used] = '\0'; - - /* convert the result to its externally-usable form. */ - result->entries = convertentries (result, internal); - free (internal); - internal = NULL; - - - if (flags & SavedirSort) - { - qsort (result->entries, - result->size, sizeof (*result->entries), - savedir_cmp); - } - - - save_errno = errno; - if (CLOSEDIR (dirp) != 0) - save_errno = errno; - if (save_errno != 0) - { - free (result->buffer); - free (result); - errno = save_errno; - return NULL; - } - - return result; -} - -void free_dirinfo (struct savedir_dirinfo *p) -{ - free (p->entries); - p->entries = NULL; - free (p->buffer); - p->buffer = NULL; - free (p); -} - - - -char * -savedirinfo (const char *dir, struct savedir_extrainfo **extra) -{ - struct savedir_dirinfo *p = xsavedir (dir, SavedirSort); - char *buf, *s; - size_t bufbytes = 0; - unsigned int i; - - if (p) - { - struct savedir_extrainfo *pex = xmalloc (p->size * sizeof (*extra)); - for (i=0; isize; ++i) - { - bufbytes += strlen (p->entries[i].name); - ++bufbytes; /* the \0 */ - - pex[i].type_info = p->entries[i].type_info; - } - - s = buf = xmalloc (bufbytes+1); - for (i=0; isize; ++i) - { - size_t len = strlen (p->entries[i].name); - memcpy (s, p->entries[i].name, len); - s += len; - *s = 0; /* Place a NUL */ - ++s; /* Skip the NUL. */ - } - *s = 0; /* final (doubled) terminating NUL */ - - if (extra) - *extra = pex; - else - free (pex); - return buf; - } - else - { - return NULL; - } -} diff --git a/lib/savedirinfo.h b/lib/savedirinfo.h deleted file mode 100644 index 8e6c17d..0000000 --- a/lib/savedirinfo.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Save the list of files in a directory, with additional information. - - Copyright 1997, 1999, 2001, 2003, 2005, 2010 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ -/* Written by James Youngman . - * Based on savedir.h by David MacKenzie . - */ - -#if !defined SAVEDIRINFO_H_ -# define SAVEDIRINFO_H_ - - -typedef enum tagSaveDirControlFlags - { - SavedirSort = 1 - } -SaveDirControlFlags; - - -typedef enum tagSaveDirDataFlags - { - SavedirHaveFileType = 1 - } -SaveDirDataFlags; - - -/* We keep the name and the type in a structure together - * to allow us to sort them together. - */ -struct savedir_direntry -{ - int flags; /* from SaveDirDataFlags */ - char *name; /* the name of the directory entry */ - mode_t type_info; /* the type (or zero if unknown) */ -}; - -struct savedir_dirinfo -{ - char *buffer; /* The names are stored here. */ - size_t size; /* The total number of results. */ - struct savedir_direntry *entries; /* The results themselves */ -}; - - -struct savedir_extrainfo -{ - mode_t type_info; -}; - -/* savedirinfo() is the old interface. */ -char *savedirinfo (const char *dir, struct savedir_extrainfo **extra); - -/* savedir() is the 'new' interface, but the function has the same name - * as the function from findutils 4.1.7 and 4.1.20. - */ -struct savedir_dirinfo * xsavedir(const char *dir, int flags); -void free_dirinfo(struct savedir_dirinfo *p); - -#endif diff --git a/lib/splitstring.c b/lib/splitstring.c new file mode 100644 index 0000000..6874b33 --- /dev/null +++ b/lib/splitstring.c @@ -0,0 +1,65 @@ +/* splitstring.c -- split a const string into fields. + Copyright (C) 2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +/* + * Written by James Youngman. + */ +/* config.h must be included first. */ +#include + +/* system headers. */ +#include +#include + +/* gnulib headers would go here. */ + +/* find headers. */ +#include "splitstring.h" + +static size_t +field_length (const char *str, const char *separators) +{ + /* if there are no separators, the whole input is one field. */ + if (*separators) + { + const char *end = strpbrk (str, separators); + if (end) + return end - str; + } + return strlen (str); +} + + +bool +splitstring(const char *s, const char *separators, bool first, + size_t *pos, size_t *len) +{ + if (first) + { + *pos = 0u; + *len = 0u; + } + else + { + *pos += *len; /* advance to the next field. */ + if (s[*pos]) + ++*pos; /* skip the separator */ + else + return false; /* we reached the end. */ + } + *len = field_length (&s[*pos], separators); + return true; +} diff --git a/lib/splitstring.h b/lib/splitstring.h new file mode 100644 index 0000000..d977573 --- /dev/null +++ b/lib/splitstring.h @@ -0,0 +1,40 @@ +/* splitstring.h -- split a const string into fields. + Copyright (C) 2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +/* + * Written by James Youngman. + */ + +/* Split a string into fields. The string is never modified. + * + * A false return value indicates that there are no more fields. + * Otherwise the next field is at the poisition indicated by *POS and + * has length *LEN. + * + * Set FIRST to true only on the first call for any given value of s. + * *POS and *LEN do not need to be initialized in this case. + * On subsequent calls, these values should be left at the values + * set by the last call. + * + * Any character in SEPARATORS is taken to be a field separator. + * Consecutive field separators are taken to indicate the presence of + * an empty field. + */ +#include +#include + +bool splitstring(const char *s, const char *separators, + bool first, size_t *pos, size_t *len); diff --git a/lib/test_splitstring.c b/lib/test_splitstring.c new file mode 100644 index 0000000..639a5bf --- /dev/null +++ b/lib/test_splitstring.c @@ -0,0 +1,208 @@ +/* test_splitstring.c -- unit test for splitstring() + Copyright (C) 2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/* config.h must always be included first. */ +#include + +/* system headers. */ +#include +#include + +/* gnulib headers would go here. */ + +/* find headers. */ +#include "splitstring.h" + +static void +assertEqualFunc(const char *file, int line, const char *label, + size_t expected, size_t got) +{ + if (expected != got) + fprintf(stderr, "%s line %d: %s: expected %lu, got %lu\n", + file, line, label, (unsigned long)expected, (unsigned long)got); +} +#define ASSERT_EQUAL(expected,got) \ + do{ \ + assertEqualFunc(__FILE__,__LINE__,"ASSERT_EQUAL",expected,got); \ + assert (expected == got); \ + } while (0); + + +static void +test_empty (void) +{ + size_t len, pos; + bool result; + const char *empty = ""; + + result = splitstring (empty, ":", true, &pos, &len); + assert (result); + ASSERT_EQUAL (0, pos); + ASSERT_EQUAL (0, len); + result = splitstring (empty, ":", false, &pos, &len); + assert (!result); +} + +static void test_onefield (void) +{ + size_t len, pos; + bool result; + const char *input = "aaa"; + + result = splitstring (input, ":", true, &pos, &len); + assert (result); + ASSERT_EQUAL (0, pos); + ASSERT_EQUAL (3, len); + result = splitstring (input, ":", false, &pos, &len); + assert (!result); +} + +static void test_not_colon (void) +{ + size_t len, pos; + bool result; + const char *separators = "!"; + const char *input = "aa!b"; + + result = splitstring (input, separators, true, &pos, &len); + assert (result); + ASSERT_EQUAL (0, pos); + ASSERT_EQUAL (2, len); + + result = splitstring (input, separators, false, &pos, &len); + assert (result); + ASSERT_EQUAL (3, pos); + ASSERT_EQUAL (1, len); + + result = splitstring (input, separators, false, &pos, &len); + assert (!result); +} + +static void test_empty_back (void) +{ + size_t len, pos; + bool result; + const char *input = "aa:"; + + result = splitstring (input, ":", true, &pos, &len); + assert (result); + ASSERT_EQUAL (0, pos); + ASSERT_EQUAL (2, len); + result = splitstring (input, ":", false, &pos, &len); + assert (result); + ASSERT_EQUAL (3, pos); + ASSERT_EQUAL (0, len); + result = splitstring (input, ":", false, &pos, &len); + assert (!result); +} + +static void test_empty_front (void) +{ + size_t len, pos; + bool result; + const char *input = ":aaa"; + + result = splitstring (input, ":", true, &pos, &len); + assert (result); + ASSERT_EQUAL (0, pos); + ASSERT_EQUAL (0, len); + result = splitstring (input, ":", false, &pos, &len); + assert (result); + ASSERT_EQUAL (1, pos); + ASSERT_EQUAL (3, len); + result = splitstring (input, ":", false, &pos, &len); + assert (!result); +} + +static void test_twofields (void) +{ + size_t len, pos; + bool result; + const char *input = "aaa:bb"; + + result = splitstring (input, ":", true, &pos, &len); + assert (result); + ASSERT_EQUAL (0, pos); + ASSERT_EQUAL (3, len); + result = splitstring (input, ":", false, &pos, &len); + assert (result); + ASSERT_EQUAL (4, pos); + ASSERT_EQUAL (2, len); + result = splitstring (input, ":", false, &pos, &len); + assert (!result); +} + +static void test_twoseparators (void) +{ + size_t len, pos; + bool result; + const char *input = "a:bb!c"; + + result = splitstring (input, ":!", true, &pos, &len); + assert (result); + ASSERT_EQUAL (0, pos); + ASSERT_EQUAL (1, len); + result = splitstring (input, ":!", false, &pos, &len); + assert (result); + ASSERT_EQUAL (2, pos); + ASSERT_EQUAL (2, len); + result = splitstring (input, ":!", false, &pos, &len); + assert (result); + ASSERT_EQUAL (5, pos); + ASSERT_EQUAL (1, len); + result = splitstring (input, ":!", false, &pos, &len); + assert (!result); +} + +static void test_consecutive_empty (void) +{ + size_t len, pos; + bool result; + const char *input = "a::b"; + const char *separators = ":"; + + result = splitstring (input, separators, true, &pos, &len); + assert (result); + ASSERT_EQUAL (0, pos); + ASSERT_EQUAL (1, len); + + result = splitstring (input, separators, false, &pos, &len); + assert (result); + ASSERT_EQUAL (2, pos); + ASSERT_EQUAL (0, len); + + result = splitstring (input, separators, false, &pos, &len); + assert (result); + ASSERT_EQUAL (3, pos); + ASSERT_EQUAL (1, len); + + result = splitstring (input, separators, false, &pos, &len); + assert (!result); +} + +int main (int argc, char *argv[]) +{ + test_empty (); + test_onefield (); + test_not_colon (); + test_empty_back (); + test_empty_front (); + test_twofields (); + test_twoseparators (); + test_consecutive_empty (); + return 0; +} diff --git a/lib/unused-result.h b/lib/unused-result.h index 0aa05af..a49b279 100644 --- a/lib/unused-result.h +++ b/lib/unused-result.h @@ -1,5 +1,5 @@ /* unused-result.h -- macros for ensuring callers don't ignore return values - Copyright (C) 2010, Free Software Foundation, Inc. + Copyright (C) 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,8 +16,8 @@ */ /* Taken from coreutils' fts_.h */ -#ifndef _UNUSED_RESULT_H -# define _UNUSED_RESULT_H 1 +#ifndef INC_UNUSED_RESULT_H +# define INC_UNUSED_RESULT_H 1 # ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ diff --git a/lib/waitpid.c b/lib/waitpid.c index 1645812..1d63fbd 100644 --- a/lib/waitpid.c +++ b/lib/waitpid.c @@ -1,5 +1,6 @@ /* Emulate waitpid on systems that just have wait. - Copyright 1994, 1995, 1998, 1999, 2010 Free Software Foundation, Inc. + Copyright 1994, 1995, 1998, 1999, 2010, 2011 Free Software + Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14,15 +15,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include +/* config.h must always be included first. */ +#include +/* system headers. */ #include -#ifndef errno -extern int errno; -#endif +/* TODO: replace this with gnulib's waitpid. */ #if defined _MSC_VER || defined __MINGW32__ /* Native Woe32 API. */ #include diff --git a/locate/Makefile.am b/locate/Makefile.am index e3bb824..d57b5d8 100644 --- a/locate/Makefile.am +++ b/locate/Makefile.am @@ -15,16 +15,17 @@ man_MANS = locate.1 updatedb.1 locatedb.5 BUILT_SOURCES = dblocation.texi EXTRA_DIST = dblocation.texi locatedb.h updatedb.sh $(man_MANS) CLEANFILES = updatedb + DISTCLEANFILES = dblocation.texi locate_SOURCES = locate.c word_io.c code_SOURCES = code.c word_io.c locate_TEXINFOS = dblocation.texi -INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\" +AM_CPPFLAGS = -I$(top_srcdir)/lib -I../gl/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\" -LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) +LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) -$(PROGRAMS) $(LIBPROGRAMS): ../lib/libfind.a ../gnulib/lib/libgnulib.a +$(PROGRAMS) $(LIBPROGRAMS): ../lib/libfind.a ../gl/lib/libgnulib.a # We generate updatedb from the Makefile rather than with AC_OUTPUT in # configure.ac in order to allow the user better control of what goes @@ -39,8 +40,8 @@ updatedb: updatedb.sh Makefile -e "s,@""bindir""@,$(bindir)," \ -e "s,@""libexecdir""@,$(libexecdir)," \ -e "s,@""LOCATE_DB""@,$(LOCATE_DB)," \ - -e "s,@""VERSION""@,@VERSION@," \ - -e "s,@""PACKAGE_NAME""@,@PACKAGE_NAME@," \ + -e "s,@""VERSION""@,$(VERSION)," \ + -e "s,@""PACKAGE_NAME""@,$(PACKAGE_NAME)," \ -e "s,@""find""@,$${find}," \ -e "s,@""frcode""@,$${frcode}," \ -e "s,@""bigram""@,$${bigram}," \ @@ -56,9 +57,9 @@ install-data-hook: dblocation.texi: echo '@set LOCATE_DB $(LOCATE_DB)' > $@.tmp if test -f $@ && cmp $@.tmp $@ >/dev/null ; then \ - rm $@.tmp ; \ - else \ - mv $@.tmp $@ ; \ + rm $@.tmp ; \ + else \ + mv $@.tmp $@ ; \ fi .PHONY: dblocation.texi @@ -69,3 +70,9 @@ dist-hook: findutils-check-manpages findutils-check-manpages: $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean diff --git a/locate/Makefile.in b/locate/Makefile.in index 1c8dd7c..04b606c 100644 --- a/locate/Makefile.in +++ b/locate/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -42,233 +59,198 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -283,22 +265,22 @@ bigram_SOURCES = bigram.c bigram_OBJECTS = bigram.$(OBJEXT) bigram_LDADD = $(LDADD) am__DEPENDENCIES_1 = -bigram_DEPENDENCIES = ../lib/libfind.a ../gnulib/lib/libgnulib.a \ +bigram_DEPENDENCIES = ../lib/libfind.a ../gl/lib/libgnulib.a \ $(am__DEPENDENCIES_1) am_code_OBJECTS = code.$(OBJEXT) word_io.$(OBJEXT) code_OBJECTS = $(am_code_OBJECTS) code_LDADD = $(LDADD) -code_DEPENDENCIES = ../lib/libfind.a ../gnulib/lib/libgnulib.a \ +code_DEPENDENCIES = ../lib/libfind.a ../gl/lib/libgnulib.a \ $(am__DEPENDENCIES_1) frcode_SOURCES = frcode.c frcode_OBJECTS = frcode.$(OBJEXT) frcode_LDADD = $(LDADD) -frcode_DEPENDENCIES = ../lib/libfind.a ../gnulib/lib/libgnulib.a \ +frcode_DEPENDENCIES = ../lib/libfind.a ../gl/lib/libgnulib.a \ $(am__DEPENDENCIES_1) am_locate_OBJECTS = locate.$(OBJEXT) word_io.$(OBJEXT) locate_OBJECTS = $(am_locate_OBJECTS) locate_LDADD = $(LDADD) -locate_DEPENDENCIES = ../lib/libfind.a ../gnulib/lib/libgnulib.a \ +locate_DEPENDENCIES = ../lib/libfind.a ../gl/lib/libgnulib.a \ $(am__DEPENDENCIES_1) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -321,6 +303,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp @@ -339,6 +327,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac man1dir = $(mandir)/man1 man5dir = $(mandir)/man5 NROFF = nroff @@ -383,6 +376,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -393,6 +388,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -415,59 +411,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -475,6 +518,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -486,12 +531,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -503,10 +563,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -546,49 +622,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -615,6 +731,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -624,7 +742,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -636,8 +755,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -680,26 +801,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -716,17 +859,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -748,19 +901,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -776,6 +945,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -790,8 +965,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -813,30 +997,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -844,6 +1060,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -851,18 +1068,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -902,18 +1132,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = -I$(top_srcdir)/lib -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\" INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -923,6 +1155,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -933,12 +1167,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -959,6 +1196,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -969,7 +1209,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -977,8 +1219,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -994,7 +1242,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -1002,8 +1252,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -1025,10 +1281,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -1040,19 +1303,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -1060,26 +1336,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -1097,6 +1403,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1109,11 +1418,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1121,6 +1440,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1128,10 +1448,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1141,10 +1464,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1168,6 +1496,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1175,14 +1504,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1192,6 +1524,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1204,7 +1538,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1245,9 +1581,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1275,7 +1616,8 @@ DISTCLEANFILES = dblocation.texi locate_SOURCES = locate.c word_io.c code_SOURCES = code.c word_io.c locate_TEXINFOS = dblocation.texi -LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) +AM_CPPFLAGS = -I$(top_srcdir)/lib -I../gl/lib -I$(top_srcdir)/gl/lib -I../intl -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\" +LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) SUBDIRS = . testsuite all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -1314,8 +1656,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ @@ -1367,8 +1712,11 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) done; rm -f c$${pid}_.???; exit $$bad install-libexecPROGRAMS: $(libexec_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ @@ -1418,22 +1766,25 @@ installcheck-libexecPROGRAMS: $(libexec_PROGRAMS) else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad -bigram$(EXEEXT): $(bigram_OBJECTS) $(bigram_DEPENDENCIES) +bigram$(EXEEXT): $(bigram_OBJECTS) $(bigram_DEPENDENCIES) $(EXTRA_bigram_DEPENDENCIES) @rm -f bigram$(EXEEXT) $(LINK) $(bigram_OBJECTS) $(bigram_LDADD) $(LIBS) -code$(EXEEXT): $(code_OBJECTS) $(code_DEPENDENCIES) +code$(EXEEXT): $(code_OBJECTS) $(code_DEPENDENCIES) $(EXTRA_code_DEPENDENCIES) @rm -f code$(EXEEXT) $(LINK) $(code_OBJECTS) $(code_LDADD) $(LIBS) -frcode$(EXEEXT): $(frcode_OBJECTS) $(frcode_DEPENDENCIES) +frcode$(EXEEXT): $(frcode_OBJECTS) $(frcode_DEPENDENCIES) $(EXTRA_frcode_DEPENDENCIES) @rm -f frcode$(EXEEXT) $(LINK) $(frcode_OBJECTS) $(frcode_LDADD) $(LIBS) -locate$(EXEEXT): $(locate_OBJECTS) $(locate_DEPENDENCIES) +locate$(EXEEXT): $(locate_OBJECTS) $(locate_DEPENDENCIES) $(EXTRA_locate_DEPENDENCIES) @rm -f locate$(EXEEXT) $(LINK) $(locate_OBJECTS) $(locate_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ @@ -1461,9 +1812,7 @@ uninstall-binSCRIPTS: @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) installcheck-binSCRIPTS: $(bin_SCRIPTS) bad=0; pid=$$$$; list="$(bin_SCRIPTS)"; for p in $$list; do \ @@ -1507,11 +1856,18 @@ distclean-compile: @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1540,16 +1896,21 @@ uninstall-man1: sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-man5: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" - @list=''; test -n "$(man5dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man5dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.5[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1578,9 +1939,7 @@ uninstall-man5: sed -n '/\.5[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -1762,13 +2121,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -1811,10 +2167,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -1832,7 +2193,7 @@ maintainer-clean-generic: clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \ - mostlyclean-am + clean-local mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) @@ -1911,27 +2272,27 @@ uninstall-man: uninstall-man1 uninstall-man5 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libexecPROGRAMS ctags ctags-recursive \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-binPROGRAMS install-binSCRIPTS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libexecPROGRAMS install-man install-man1 install-man5 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am \ - installcheck-binPROGRAMS installcheck-binSCRIPTS \ - installcheck-libexecPROGRAMS installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-libexecPROGRAMS uninstall-man uninstall-man1 \ - uninstall-man5 - - -$(PROGRAMS) $(LIBPROGRAMS): ../lib/libfind.a ../gnulib/lib/libgnulib.a + clean-generic clean-libexecPROGRAMS clean-local ctags \ + ctags-recursive dist-hook distclean distclean-compile \ + distclean-generic distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am \ + install-data-hook install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-libexecPROGRAMS install-man \ + install-man1 install-man5 install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installcheck-binPROGRAMS \ + installcheck-binSCRIPTS installcheck-libexecPROGRAMS \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-binSCRIPTS uninstall-libexecPROGRAMS uninstall-man \ + uninstall-man1 uninstall-man5 + + +$(PROGRAMS) $(LIBPROGRAMS): ../lib/libfind.a ../gl/lib/libgnulib.a # We generate updatedb from the Makefile rather than with AC_OUTPUT in # configure.ac in order to allow the user better control of what goes @@ -1946,8 +2307,8 @@ updatedb: updatedb.sh Makefile -e "s,@""bindir""@,$(bindir)," \ -e "s,@""libexecdir""@,$(libexecdir)," \ -e "s,@""LOCATE_DB""@,$(LOCATE_DB)," \ - -e "s,@""VERSION""@,@VERSION@," \ - -e "s,@""PACKAGE_NAME""@,@PACKAGE_NAME@," \ + -e "s,@""VERSION""@,$(VERSION)," \ + -e "s,@""PACKAGE_NAME""@,$(PACKAGE_NAME)," \ -e "s,@""find""@,$${find}," \ -e "s,@""frcode""@,$${frcode}," \ -e "s,@""bigram""@,$${bigram}," \ @@ -1963,9 +2324,9 @@ install-data-hook: dblocation.texi: echo '@set LOCATE_DB $(LOCATE_DB)' > $@.tmp if test -f $@ && cmp $@.tmp $@ >/dev/null ; then \ - rm $@.tmp ; \ - else \ - mv $@.tmp $@ ; \ + rm $@.tmp ; \ + else \ + mv $@.tmp $@ ; \ fi .PHONY: dblocation.texi @@ -1974,6 +2335,13 @@ dist-hook: findutils-check-manpages findutils-check-manpages: $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/locate/bigram.c b/locate/bigram.c index 7aca021..e83e9b1 100644 --- a/locate/bigram.c +++ b/locate/bigram.c @@ -1,5 +1,6 @@ /* bigram -- list bigrams for locate - Copyright (C) 1994, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1994, 2007, 2009, 2010, 2011 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,17 +30,43 @@ Written by James A. Woods . Modified by David MacKenzie . */ +/* config.h must always be included first. */ #include -#include +/* system headers. */ +#include +#include +#include #include #include - #include -#include -#include "progname.h" +/* gnulib headers. */ #include "closeout.h" +#include "gettext.h" +#include "progname.h" +#include "xalloc.h" +#include "error.h" + +/* find headers would go here but we don't need any. */ + + +/* We use gettext because for example xmalloc may issue an error message. */ +#if ENABLE_NLS +# include +# define _(Text) gettext (Text) +#else +# define _(Text) Text +#define textdomain(Domain) +#define bindtextdomain(Package, Directory) +#endif +#ifdef gettext_noop +# define N_(String) gettext_noop(String) +#else +/* See locate.c for explanation as to why not use (String) */ +# define N_(String) String +#endif + /* Return the length of the longest common prefix of strings S1 and S2. */ @@ -66,8 +93,17 @@ main (int argc, char **argv) else set_program_name ("bigram"); +#ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + (void) argc; - atexit (close_stdout); + if (atexit (close_stdout)) + { + error (EXIT_FAILURE, errno, _("The atexit library function failed")); + } pathsize = oldpathsize = 1026; /* Increased as necessary by getline. */ path = xmalloc (pathsize); diff --git a/locate/code.c b/locate/code.c index 7d06a66..eae02ce 100644 --- a/locate/code.c +++ b/locate/code.c @@ -1,5 +1,6 @@ /* code -- bigram- and front-encode filenames for locate - Copyright (C) 1994, 2005, 2007, 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 1994, 2005, 2007, 2008, 2010, 2011 Free Software + Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -43,17 +44,27 @@ Written by James A. Woods . Modified by David MacKenzie . */ +/* config.h should always be included first. */ #include -#include -#include -#include + +/* system headers. */ #include #include +#include +#include +#include +#include +/* gnulib headers. */ +#include "closeout.h" +#include "error.h" +#include "gettext.h" +#include "progname.h" +#include "xalloc.h" -#ifdef STDC_HEADERS -#include -#endif +/* find headers. */ +#include "findutils-version.h" +#include "locatedb.h" #if ENABLE_NLS # include @@ -70,13 +81,6 @@ # define N_(String) String #endif -#include "locatedb.h" -#include "closeout.h" -#include "xalloc.h" -#include "gnulib-version.h" -#include "progname.h" -#include "error.h" -#include "findutils-version.h" #ifndef ATTRIBUTE_NORETURN # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) @@ -165,7 +169,10 @@ main (int argc, char **argv) int line_len; /* Length of input line. */ set_program_name (argv[0]); - atexit (close_stdout); + if (atexit (close_stdout)) + { + error (EXIT_FAILURE, errno, _("The atexit library function failed")); + } bigram[2] = '\0'; diff --git a/locate/frcode.c b/locate/frcode.c index 54fa8c5..475b69a 100644 --- a/locate/frcode.c +++ b/locate/frcode.c @@ -1,5 +1,6 @@ /* frcode -- front-compress a sorted list - Copyright (C) 1994, 2005, 2006, 2007, 2010 Free Software Foundation, Inc. + Copyright (C) 1994, 2005, 2006, 2007, 2010, 2011 Free Software + Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,18 +63,30 @@ Modified by James Youngman . */ +/* config.h must be included first. */ #include - -#include -#include +/* system headers. */ #include #include -#include +#include +#include #include -#include +#include #include +#include +#include +/* gnulib headers. */ +#include "closeout.h" +#include "error.h" +#include "gettext.h" +#include "progname.h" +#include "xalloc.h" + +/* find headers. */ +#include "findutils-version.h" +#include "locatedb.h" #if ENABLE_NLS # include @@ -97,16 +110,6 @@ #endif -#include "locatedb.h" -#include -#include "error.h" -#include "closeout.h" -#include "findutils-version.h" -#include "xalloc.h" -#include "progname.h" - - - /* Write out a 16-bit int, high byte first (network byte order). * Return true iff all went well. */ @@ -225,7 +228,10 @@ main (int argc, char **argv) else set_program_name ("frcode"); - atexit (close_stdout); + if (atexit (close_stdout)) + { + error (EXIT_FAILURE, errno, _("The atexit library function failed")); + } pathsize = oldpathsize = 1026; /* Increased as necessary by getline. */ path = xmalloc (pathsize); diff --git a/locate/locate.1 b/locate/locate.1 index cf0c52a..877d20f 100644 --- a/locate/locate.1 +++ b/locate/locate.1 @@ -3,11 +3,24 @@ locate \- list files in databases that match a pattern .SH SYNOPSIS .B locate -[\-d path | \-\-database=path] [\-e | \-E | \-\-[non\-]existing] [\-i -| \-\-ignore-case] [\-0 | \-\-null] [\-c | \-\-count] [\-w | \-\-wholename] -|\-b | \-\-basename] [\-l N | \-\-limit=N] [\-S | \-\-statistics] [\-r -| \-\-regex ] [\-\-max-database-age D] [\-P | \-H | \-\-nofollow] [\-L -| \-\-follow] [\-\-version] [\-A | \-\-all] [\-p | \-\-print] [\-\-help] pattern... +[\-d path | \-\-database=path] +[\-e | \-E | \-\-[non\-]existing] +[\-i | \-\-ignore-case] +[\-0 | \-\-null] +[\-c | \-\-count] +[\-w | \-\-wholename] +[\-b | \-\-basename] +[\-l N | \-\-limit=N] +[\-S | \-\-statistics] +[\-r | \-\-regex ] +[\-\-max-database-age D] +[\-P | \-H | \-\-nofollow] +[\-L | \-\-follow] +[\-\-version] +[\-A | \-\-all] +[\-p | \-\-print] +[\-\-help] +pattern... .SH DESCRIPTION This manual page documents the GNU version of @@ -172,7 +185,7 @@ Accepted but does nothing, for compatibility with BSD Print various statistics about each locate database and then exit without performing a search, unless non-option arguments are given. For compatibility with BSD, \-S is accepted as a synonym -for \-\-statistics. However, the ouptut of +for \-\-statistics. However, the output of .B locate \-S is different for the GNU and BSD implementations of .BR locate . @@ -195,8 +208,19 @@ results that vary between different versions of .SH "SEE ALSO" \fBfind\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1), \fBxargs\fP(1), -\fBglob\fP(3), -\fBFinding Files\fP (on-line in Info, or printed) +\fBglob\fP(3) + +The full documentation for +.B locate +is maintained as a Texinfo manual. If the +.B info +and +.B locate +programs are properly installed at your site, the command +.B info locate +should give you access to the complete manual. + + .SH "HISTORY" The .B locate diff --git a/locate/locate.c b/locate/locate.c index ffcbc2b..bf602bd 100644 --- a/locate/locate.c +++ b/locate/locate.c @@ -1,5 +1,6 @@ /* locate -- search databases for filenames that match patterns - Copyright (C) 1994, 1996, 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1998, 1999, 2000, 2003, 2004, 2005, 2006, + 2007, 2008, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,8 +26,8 @@ bigram coded, which reduces space by a further 20-25% and uses the following encoding of the database bytes: - 0-28 likeliest differential counts + offset (14) to make nonnegative - 30 escape code for out-of-range count to follow in next halfword + 0-28 likeliest differential counts + offset (14) to make nonnegative + 30 escape code for out-of-range count to follow in next halfword 128-255 bigram codes (the 128 most common, as determined by `updatedb') 32-127 single character (printable) ASCII remainder @@ -57,40 +58,46 @@ Additional work by James Youngman and Bas van Gompel. */ +/* config.h must be included first. */ #include -#include -#include +/* system headers. */ +#include #include -#include -#include /* for setgroups() */ -#include -#include -#include +#include +#include #include -#include - +#include /* for setgroups() */ +#include +#include +#include #include - -/* The presence of unistd.h is assumed by gnulib these days, so we - * might as well assume it too. - */ -/* We need for isatty(). */ -#include - -#include - -#define NDEBUG -#include +#include +#include #include +#include +#include +#include +#include +#include +/* gnulib headers. */ +#include "fnmatch.h" +#include "gettext.h" +#include "progname.h" +#include "xalloc.h" +#include "error.h" +#include "human.h" +#include "dirname.h" +#include "closeout.h" +#include "quotearg.h" +#include "regextype.h" -#ifdef STDC_HEADERS -#include -#endif - -#include -#include +/* find headers. */ +#include "findutils-version.h" +#include "locatedb.h" +#include "printquoted.h" +#include "splitstring.h" #if ENABLE_NLS @@ -115,20 +122,6 @@ # define N_(String) String #endif -#include "locatedb.h" -#include "progname.h" -#include "xalloc.h" -#include "error.h" -#include "human.h" -#include "dirname.h" -#include "closeout.h" -#include "nextelem.h" -#include "regex.h" -#include "quotearg.h" -#include "printquoted.h" -#include "regextype.h" -#include "findutils-version.h" - /* Note that this evaluates Ch many times. */ #ifdef _LIBC # define TOUPPER(Ch) toupper (Ch) @@ -149,16 +142,16 @@ static const char warn_name_units[] = N_("days"); enum visit_result { VISIT_CONTINUE = 1, /* please call the next visitor */ - VISIT_ACCEPTED = 2, /* accepted, call no futher callbacks for this file */ + VISIT_ACCEPTED = 2, /* accepted, call no further callbacks for this file */ VISIT_REJECTED = 4, /* rejected, process next file. */ VISIT_ABORT = 8 /* rejected, process no more files. */ }; enum ExistenceCheckType { - ACCEPT_EITHER, /* Corresponds to lack of -E/-e option */ - ACCEPT_EXISTING, /* Corresponds to option -e */ - ACCEPT_NON_EXISTING /* Corresponds to option -E */ + ACCEPT_EITHER, /* Corresponds to lack of -E/-e option */ + ACCEPT_EXISTING, /* Corresponds to option -e */ + ACCEPT_NON_EXISTING /* Corresponds to option -E */ }; /* Check for existence of files before printing them out? */ @@ -190,7 +183,7 @@ set_max_db_age (const char *s) if (0 == *s) { error (EXIT_FAILURE, 0, - _("The argument for option --max-database-age must not be empty")); + _("The argument for option --max-database-age must not be empty")); } @@ -206,15 +199,15 @@ set_max_db_age (const char *s) (0 == val && EINVAL == errno)) { error (EXIT_FAILURE, errno, - _("Invalid argument %s for option --max-database-age"), - quotearg_n_style (0, locale_quoting_style, s)); + _("Invalid argument %s for option --max-database-age"), + quotearg_n_style (0, locale_quoting_style, s)); } else if (*end) { /* errno wasn't set, don't print its message */ error (EXIT_FAILURE, 0, - _("Invalid argument %s for option --max-database-age"), - quotearg_n_style (0, locale_quoting_style, s)); + _("Invalid argument %s for option --max-database-age"), + quotearg_n_style (0, locale_quoting_style, s)); } else { @@ -279,20 +272,20 @@ locate_read_str (char **buf, size_t *siz, FILE *fp, int delimiter, int offs) needed = offs + nread + 1u; if (needed > (*siz)) - { - char *pnew = realloc (*buf, needed); - if (NULL == pnew) - { - return -1; /* FAIL */ - } - else - { - *siz = needed; - *buf = pnew; - } - } - memcpy ((*buf)+offs, p, nread); - free (p); + { + char *pnew = realloc (*buf, needed); + if (NULL == pnew) + { + return -1; /* FAIL */ + } + else + { + *siz = needed; + *buf = pnew; + } + } + memcpy((*buf)+offs, p, nread + 1); + free(p); } return nread; } @@ -326,16 +319,14 @@ struct regular_expression struct process_data { - int c; /* An input byte. */ - char itemcount; /* Indicates we're at the beginning of an slocate db. */ + int c; /* An input byte. */ int count; /* The length of the prefix shared with the previous database entry. */ int len; - char *original_filename; /* The current input database entry. */ - size_t pathsize; /* Amount allocated for it. */ - char *munged_filename; /* path or basename(path) */ - FILE *fp; /* The pathname database. */ - const char *dbfile; /* Its name, or "" */ - int slocatedb_format; /* Allows us to cope with slocate's format variant */ + char *original_filename; /* The current input database entry. */ + size_t pathsize; /* Amount allocated for it. */ + char *munged_filename; /* path or basename(path) */ + FILE *fp; /* The pathname database. */ + const char *dbfile; /* Its name, or "" */ GetwordEndianState endian_state; /* for the old database format, the first and second characters of the most common bigrams. */ @@ -345,7 +336,7 @@ struct process_data typedef int (*visitfunc)(struct process_data *procdata, - void *context); + void *context); struct visitor { @@ -360,9 +351,9 @@ static struct visitor *lastinspector = NULL; static struct visitor *past_pat_inspector = NULL; static inline int visit (const struct visitor *p, - int accept_flags, - struct process_data *procdata, - const struct visitor * const stop) + int accept_flags, + struct process_data *procdata, + const struct visitor * const stop) { register int result = accept_flags; while ( (accept_flags & result) && (stop != p) ) @@ -446,8 +437,8 @@ visit_justprint_quoted (struct process_data *procdata, void *context) { (void) context; print_quoted (stdout, quote_opts, stdout_is_a_tty, - "%s", - procdata->original_filename); + "%s", + procdata->original_filename); putchar (separator); return VISIT_CONTINUE; } @@ -465,9 +456,9 @@ static void toolong (struct process_data *procdata) { error (EXIT_FAILURE, 0, - _("locate database %s contains a " - "filename longer than locate can handle"), - procdata->dbfile); + _("locate database %s contains a " + "filename longer than locate can handle"), + procdata->dbfile); } static void @@ -482,8 +473,8 @@ extend (struct process_data *procdata, size_t siz1, size_t siz2) { procdata->pathsize = siz1+siz2; procdata->original_filename = x2nrealloc (procdata->original_filename, - &procdata->pathsize, - 1); + &procdata->pathsize, + 1); } } @@ -505,11 +496,11 @@ visit_old_format (struct process_data *procdata, void *context) procdata->count -= LOCATEDB_OLD_OFFSET; minval = (0 - procdata->count); if (procdata->count >= 0) - maxval = (procdata->len - procdata->count); + maxval = (procdata->len - procdata->count); else - maxval = (procdata->len - 0); + maxval = (procdata->len - 0); word = getword (procdata->fp, procdata->dbfile, - minval, maxval, &procdata->endian_state); + minval, maxval, &procdata->endian_state); procdata->count += word; assert (procdata->count >= 0); } @@ -526,22 +517,22 @@ visit_old_format (struct process_data *procdata, void *context) (procdata->c = getc (procdata->fp)) > LOCATEDB_OLD_ESCAPE;) { if (EOF == procdata->c) - break; + break; if (procdata->c < 0200) - { - /* An ordinary character. */ - extend (procdata, i, 1u); - procdata->original_filename[i++] = procdata->c; - } + { + /* An ordinary character. */ + extend (procdata, i, 1u); + procdata->original_filename[i++] = procdata->c; + } else - { - /* Bigram markers have the high bit set. */ - extend (procdata, i, 2u); - procdata->c &= 0177; - procdata->original_filename[i++] = procdata->bigram1[procdata->c]; - procdata->original_filename[i++] = procdata->bigram2[procdata->c]; - } + { + /* Bigram markers have the high bit set. */ + extend (procdata, i, 2u); + procdata->c &= 0177; + procdata->original_filename[i++] = procdata->bigram1[procdata->c]; + procdata->original_filename[i++] = procdata->bigram2[procdata->c]; + } } /* Consider the case where we executed the loop body zero times; we @@ -562,56 +553,42 @@ visit_locate02_format (struct process_data *procdata, void *context) int nread; (void) context; - if (procdata->slocatedb_format) - { - if (procdata->itemcount == 0) - { - ungetc (procdata->c, procdata->fp); - procdata->count = 0; - procdata->len = 0; - } - else if (procdata->itemcount == 1) - { - procdata->count = procdata->len-1; - } - else - { - if (procdata->c == LOCATEDB_ESCAPE) - procdata->count += (short)get_short (procdata->fp); - else if (procdata->c > 127) - procdata->count += procdata->c - 256; - else - procdata->count += procdata->c; - } - } + if (procdata->c == LOCATEDB_ESCAPE) + procdata->count += (short)get_short (procdata->fp); + else if (procdata->c > 127) + procdata->count += procdata->c - 256; else - { - if (procdata->c == LOCATEDB_ESCAPE) - procdata->count += (short)get_short (procdata->fp); - else if (procdata->c > 127) - procdata->count += procdata->c - 256; - else - procdata->count += procdata->c; - } + procdata->count += procdata->c; if (procdata->count > procdata->len || procdata->count < 0) { - /* This should not happen generally , but since we're + /* This should not happen generally, but since we're * reading in data which is outside our control, we * cannot prevent it. */ error (EXIT_FAILURE, 0, _("locate database %s is corrupt or invalid"), - quotearg_n_style (0, locale_quoting_style, procdata->dbfile)); + quotearg_n_style (0, locale_quoting_style, procdata->dbfile)); } /* Overlay the old path with the remainder of the new. */ nread = locate_read_str (&procdata->original_filename, - &procdata->pathsize, - procdata->fp, 0, procdata->count); - if (nread < 0) + &procdata->pathsize, + procdata->fp, 0, procdata->count); + if (nread < 1) return VISIT_ABORT; procdata->c = getc (procdata->fp); - procdata->len = procdata->count + nread; + procdata->len = procdata->count + nread - 1; /* Number of chars in path. */ + + if (procdata->len < 1) + { + /* This should not happen generally, but since we're + * reading in data which is outside our control, we + * cannot prevent it. + */ + error(1, 0, _("locate database %s is corrupt or invalid"), + quotearg_n_style(0, locale_quoting_style, procdata->dbfile)); + } + s = procdata->original_filename + procdata->len - 1; /* Move to the last char in path. */ assert (s[0] != '\0'); assert (s[1] == '\0'); /* Our terminator. */ @@ -619,16 +596,6 @@ visit_locate02_format (struct process_data *procdata, void *context) procdata->munged_filename = procdata->original_filename; - if (procdata->slocatedb_format) - { - /* Don't increment indefinitely, it might overflow. */ - if (procdata->itemcount < 6) - { - ++(procdata->itemcount); - } - } - - return VISIT_CONTINUE; } @@ -806,15 +773,15 @@ visit_regex (struct process_data *procdata, void *context) const size_t len = strlen (procdata->munged_filename); int rv = re_search (&p->regex, procdata->munged_filename, - len, 0, len, - (struct re_registers *) NULL); + len, 0, len, + (struct re_registers *) NULL); if (rv < 0) { - return VISIT_REJECTED; /* no match (-1), or internal error (-2) */ + return VISIT_REJECTED; /* no match (-1), or internal error (-2) */ } else { - return VISIT_ACCEPTED; /* match */ + return VISIT_ACCEPTED; /* match */ } } @@ -834,15 +801,15 @@ visit_stats (struct process_data *procdata, void *context) for (s=procdata->original_filename; *s; ++s) { if ( (int)(*s) & 128 ) - highbit = 1; + highbit = 1; if ('\n' == *s) - { - newline = whitespace = 1; - } + { + newline = whitespace = 1; + } else if (isspace ((unsigned char)*s)) - { - whitespace = 1; - } + { + whitespace = 1; + } } if (highbit) @@ -891,56 +858,56 @@ print_stats (int argc, size_t database_file_size) char hbuf4[LONGEST_HUMAN_READABLE + 1]; printf (ngettext ("Locate database size: %s byte\n", - "Locate database size: %s bytes\n", - database_file_size), - human_readable ((uintmax_t) database_file_size, - hbuf1, human_ceiling, 1, 1)); + "Locate database size: %s bytes\n", + database_file_size), + human_readable ((uintmax_t) database_file_size, + hbuf1, human_ceiling, 1, 1)); printf ( (results_were_filtered ? - _("Matching Filenames: %s\n") : - _("All Filenames: %s\n")), - human_readable (statistics.total_filename_count, - hbuf1, human_ceiling, 1, 1)); + _("Matching Filenames: %s\n") : + _("All Filenames: %s\n")), + human_readable (statistics.total_filename_count, + hbuf1, human_ceiling, 1, 1)); /* XXX: We would ideally use ngettext () here, but I don't know * how to use it to handle more than one possibly-plural thing/ */ printf (_("File names have a cumulative length of %s bytes.\n" - "Of those file names,\n" - "\n\t%s contain whitespace, " - "\n\t%s contain newline characters, " - "\n\tand %s contain characters with the high bit set.\n"), - human_readable (statistics.total_filename_length, hbuf1, human_ceiling, 1, 1), - human_readable (statistics.whitespace_count, hbuf2, human_ceiling, 1, 1), - human_readable (statistics.newline_count, hbuf3, human_ceiling, 1, 1), - human_readable (statistics.highbit_filename_count, hbuf4, human_ceiling, 1, 1)); + "Of those file names,\n" + "\n\t%s contain whitespace, " + "\n\t%s contain newline characters, " + "\n\tand %s contain characters with the high bit set.\n"), + human_readable (statistics.total_filename_length, hbuf1, human_ceiling, 1, 1), + human_readable (statistics.whitespace_count, hbuf2, human_ceiling, 1, 1), + human_readable (statistics.newline_count, hbuf3, human_ceiling, 1, 1), + human_readable (statistics.highbit_filename_count, hbuf4, human_ceiling, 1, 1)); if (!argc) { if (results_were_filtered) - { - printf (_("Some filenames may have been filtered out, " - "so we cannot compute the compression ratio.\n")); - } + { + printf (_("Some filenames may have been filtered out, " + "so we cannot compute the compression ratio.\n")); + } else - { - if (statistics.total_filename_length) - { - /* A negative compression ratio just means that the - * compressed database is larger than the list of - * filenames. This can happen for example for - * old-format databases containing a small list of short - * filenames, because the bigram list is 256 bytes. - */ - printf (_("Compression ratio %4.2f%% (higher is better)\n"), - 100.0 * ((double)statistics.total_filename_length - - (double) database_file_size) - / (double) statistics.total_filename_length); - } - else - { - printf (_("Compression ratio is undefined\n")); - } - } + { + if (statistics.total_filename_length) + { + /* A negative compression ratio just means that the + * compressed database is larger than the list of + * filenames. This can happen for example for + * old-format databases containing a small list of short + * filenames, because the bigram list is 256 bytes. + */ + printf (_("Compression ratio %4.2f%% (higher is better)\n"), + 100.0 * ((double)statistics.total_filename_length + - (double) database_file_size) + / (double) statistics.total_filename_length); + } + else + { + printf (_("Compression ratio is undefined\n")); + } + } } printf ("\n"); } @@ -955,7 +922,7 @@ looking_at_gnu_locatedb (const char *data, size_t len) if (len < sizeof (LOCATEDB_MAGIC)) return 0; else if (0 == memcmp (data, LOCATEDB_MAGIC, sizeof (LOCATEDB_MAGIC))) - return 1; /* We saw the magic byte sequence */ + return 1; /* We saw the magic byte sequence */ else return 0; } @@ -966,9 +933,9 @@ looking_at_gnu_locatedb (const char *data, size_t len) */ static int looking_at_slocate_locatedb (const char *filename, - const char *data, - size_t len, - int *seclevel) + const char *data, + size_t len, + int *seclevel) { assert (len <= 2); @@ -980,42 +947,42 @@ looking_at_slocate_locatedb (const char *filename, { /* Check that the magic number is a one-byte string */ if (0 == data[1]) - { - if (isdigit ((unsigned char)data[0])) - { - /* looks promising. */ - *seclevel = (data[0] - '0'); - - if (*seclevel > 1) - { - /* Hmm, well it's probably an slocate database - * of some awsomely huge security level, like 2. - * We don't know how to handle those. - */ - error (0, 0, - _("locate database %s looks like an slocate " - "database but it seems to have security level %c, " - "which GNU findutils does not currently support"), - quotearg_n_style (0, locale_quoting_style, filename), - data[1]); - return 1; - } - else - { - return 1; - } - } - else - { - /* Not a digit. */ - return 0; - } - } + { + if (isdigit ((unsigned char)data[0])) + { + /* looks promising. */ + *seclevel = (data[0] - '0'); + + if (*seclevel > 1) + { + /* Hmm, well it's probably an slocate database + * of some awsomely huge security level, like 2. + * We don't know how to handle those. + */ + error (0, 0, + _("locate database %s looks like an slocate " + "database but it seems to have security level %c, " + "which GNU findutils does not currently support"), + quotearg_n_style (0, locale_quoting_style, filename), + data[1]); + return 1; + } + else + { + return 1; + } + } + else + { + /* Not a digit. */ + return 0; + } + } else - { - /* Definitely not slocate. */ - return 0; - } + { + /* Definitely not slocate. */ + return 0; + } } } @@ -1042,26 +1009,27 @@ i_am_little_endian (void) static unsigned long search_one_database (int argc, - char **argv, - const char *dbfile, - FILE *fp, - off_t filesize, - int ignore_case, - int enable_print, - int basename_only, - int use_limit, - struct locate_limits *plimit, - int stats, - int op_and, - int regex, - int regex_options) + char **argv, + const char *dbfile, + FILE *fp, + off_t filesize, + int ignore_case, + int enable_print, + int basename_only, + int use_limit, + struct locate_limits *plimit, + int stats, + int op_and, + int regex, + int regex_options) { - char *pathpart; /* A pattern to consider. */ - int argn; /* Index to current pattern in argv. */ - int nread; /* number of bytes read from an entry. */ - struct process_data procdata; /* Storage for data shared with visitors. */ + char *pathpart; /* A pattern to consider. */ + int argn; /* Index to current pattern in argv. */ + int nread; /* number of bytes read from an entry. */ + struct process_data procdata; /* Storage for data shared with visitors. */ int slocate_seclevel; int oldformat; + int slocatedb_format; struct visitor* pvis; /* temp for determining past_pat_inspector. */ const char *format_name; enum ExistenceCheckType do_check_existence; @@ -1082,8 +1050,6 @@ search_one_database (int argc, oldformat = 0; procdata.endian_state = GetwordEndianStateInitial; procdata.len = procdata.count = 0; - procdata.slocatedb_format = 0; - procdata.itemcount = 0; procdata.dbfile = dbfile; procdata.fp = fp; @@ -1093,115 +1059,115 @@ search_one_database (int argc, lastinspector = NULL; past_pat_inspector = NULL; results_were_filtered = false; - procdata.pathsize = 128; /* Increased as necessary by locate_read_str. */ + procdata.pathsize = 128; /* Increased as necessary by locate_read_str. */ procdata.original_filename = xmalloc (procdata.pathsize); nread = fread (procdata.original_filename, 1, SLOCATE_DB_MAGIC_LEN, - procdata.fp); + procdata.fp); slocate_seclevel = 0; if (looking_at_slocate_locatedb (procdata.dbfile, - procdata.original_filename, - nread, - &slocate_seclevel)) + procdata.original_filename, + nread, + &slocate_seclevel)) { error (0, 0, - _("%s is an slocate database. " - "Support for these is new, expect problems for now."), - quotearg_n_style (0, locale_quoting_style, procdata.dbfile)); + _("%s is an slocate database. " + "Support for these is new, expect problems for now."), + quotearg_n_style (0, locale_quoting_style, procdata.dbfile)); /* slocate also uses frcode, but with a different header. * We handle the header here and then work with the data * in the normal way. */ if (slocate_seclevel > 1) - { - /* We don't know what those security levels mean, - * so do nothing further - */ - error (0, 0, - _("%s is an slocate database of unsupported security level %d; skipping it."), - quotearg_n_style (0, locale_quoting_style, procdata.dbfile), - slocate_seclevel); - return 0; - } + { + /* We don't know what those security levels mean, + * so do nothing further + */ + error (0, 0, + _("%s is an slocate database of unsupported security level %d; skipping it."), + quotearg_n_style (0, locale_quoting_style, procdata.dbfile), + slocate_seclevel); + return 0; + } else if (slocate_seclevel > 0) - { - /* Don't show the filenames to the user if they don't exist. - * Showing stats is safe since filenames are only counted - * after the existence check - */ - if (ACCEPT_NON_EXISTING == check_existence) - { - /* Do not allow the user to see a list of filenames that they - * cannot stat(). - */ - error (0, 0, - _("You specified the -E option, but that option " - "cannot be used with slocate-format databases " - "with a non-zero security level. No results will be " - "generated for this database.\n")); - return 0; - } - if (ACCEPT_EXISTING != do_check_existence) - { - if (enable_print || stats) - { - error (0, 0, - _("%s is an slocate database. " - "Turning on the '-e' option."), - quotearg_n_style (0, locale_quoting_style, procdata.dbfile)); - } - do_check_existence = ACCEPT_EXISTING; - } - } + { + /* Don't show the filenames to the user if they don't exist. + * Showing stats is safe since filenames are only counted + * after the existence check + */ + if (ACCEPT_NON_EXISTING == check_existence) + { + /* Do not allow the user to see a list of filenames that they + * cannot stat(). + */ + error (0, 0, + _("You specified the -E option, but that option " + "cannot be used with slocate-format databases " + "with a non-zero security level. No results will be " + "generated for this database.\n")); + return 0; + } + if (ACCEPT_EXISTING != do_check_existence) + { + if (enable_print || stats) + { + error (0, 0, + _("%s is an slocate database. " + "Turning on the '-e' option."), + quotearg_n_style (0, locale_quoting_style, procdata.dbfile)); + } + do_check_existence = ACCEPT_EXISTING; + } + } add_visitor (visit_locate02_format, NULL); format_name = "slocate"; - procdata.slocatedb_format = 1; + slocatedb_format = 1; } else { int nread2; - procdata.slocatedb_format = 0; + slocatedb_format = 0; extend (&procdata, sizeof (LOCATEDB_MAGIC), 0u); nread2 = fread (procdata.original_filename+nread, 1, sizeof (LOCATEDB_MAGIC)-nread, - procdata.fp); + procdata.fp); if (looking_at_gnu_locatedb (procdata.original_filename, nread+nread2)) - { - add_visitor (visit_locate02_format, NULL); - format_name = "GNU LOCATE02"; - } - else /* Use the old format */ - { - int i; - - nread += nread2; - extend (&procdata, 256u, 0u); - /* Read the list of the most common bigrams in the database. */ - if (nread < 256) - { - int more_read = fread (procdata.original_filename + nread, 1, - 256 - nread, procdata.fp); - if ( (more_read + nread) != 256 ) - { - error (EXIT_FAILURE, 0, - _("Old-format locate database %s is " - "too short to be valid"), - quotearg_n_style (0, locale_quoting_style, dbfile)); - - } - } - - for (i = 0; i < 128; i++) - { - procdata.bigram1[i] = procdata.original_filename[i << 1]; - procdata.bigram2[i] = procdata.original_filename[(i << 1) + 1]; - } - format_name = "old"; - oldformat = 1; - add_visitor (visit_old_format, NULL); - } + { + add_visitor (visit_locate02_format, NULL); + format_name = "GNU LOCATE02"; + } + else /* Use the old format */ + { + int i; + + nread += nread2; + extend (&procdata, 256u, 0u); + /* Read the list of the most common bigrams in the database. */ + if (nread < 256) + { + int more_read = fread (procdata.original_filename + nread, 1, + 256 - nread, procdata.fp); + if ( (more_read + nread) != 256 ) + { + error (EXIT_FAILURE, 0, + _("Old-format locate database %s is " + "too short to be valid"), + quotearg_n_style (0, locale_quoting_style, dbfile)); + + } + } + + for (i = 0; i < 128; i++) + { + procdata.bigram1[i] = procdata.original_filename[i << 1]; + procdata.bigram2[i] = procdata.original_filename[(i << 1) + 1]; + } + format_name = "old"; + oldformat = 1; + add_visitor (visit_old_format, NULL); + } } if (basename_only) @@ -1213,66 +1179,66 @@ search_one_database (int argc, results_were_filtered = true; pathpart = argv[argn]; if (regex) - { - struct regular_expression *p = xmalloc (sizeof (*p)); - const char *error_message = NULL; - - memset (&p->regex, 0, sizeof (p->regex)); - - re_set_syntax (regex_options); - p->regex.allocated = 100; - p->regex.buffer = xmalloc (p->regex.allocated); - p->regex.fastmap = NULL; - p->regex.syntax = regex_options; - p->regex.translate = NULL; - - error_message = re_compile_pattern (pathpart, strlen (pathpart), - &p->regex); - if (error_message) - { - error (EXIT_FAILURE, 0, "%s", error_message); - } - else - { - add_visitor (visit_regex, p); - } - } + { + struct regular_expression *p = xmalloc (sizeof (*p)); + const char *error_message = NULL; + + memset (&p->regex, 0, sizeof (p->regex)); + + re_set_syntax (regex_options); + p->regex.allocated = 100; + p->regex.buffer = xmalloc (p->regex.allocated); + p->regex.fastmap = NULL; + p->regex.syntax = regex_options; + p->regex.translate = NULL; + + error_message = re_compile_pattern (pathpart, strlen (pathpart), + &p->regex); + if (error_message) + { + error (EXIT_FAILURE, 0, "%s", error_message); + } + else + { + add_visitor (visit_regex, p); + } + } else if (contains_metacharacter (pathpart)) - { - if (ignore_case) - add_visitor (visit_globmatch_casefold, pathpart); - else - add_visitor (visit_globmatch_nofold, pathpart); - } + { + if (ignore_case) + add_visitor (visit_globmatch_casefold, pathpart); + else + add_visitor (visit_globmatch_nofold, pathpart); + } else - { - /* No glob characters used. Hence we match on - * _any part_ of the filename, not just the - * basename. This seems odd to me, but it is the - * traditional behaviour. - * James Youngman - */ - visitfunc matcher; - if (1 == MB_CUR_MAX) - { - /* As an optimisation, use a strstr () matcher if we are - * in a unibyte locale. This can give a x2 speedup in - * the C locale. Some light testing reveals that - * glibc's strstr () is somewhere around 40% faster than - * gnulib's, so we just use strstr (). - */ - matcher = ignore_case ? - visit_substring_match_casefold_narrow : - visit_substring_match_nocasefold_narrow; - } - else - { - matcher = ignore_case ? - visit_substring_match_casefold_wide : - visit_substring_match_nocasefold_wide; - } - add_visitor (matcher, pathpart); - } + { + /* No glob characters used. Hence we match on + * _any part_ of the filename, not just the + * basename. This seems odd to me, but it is the + * traditional behaviour. + * James Youngman + */ + visitfunc matcher; + if (1 == MB_CUR_MAX) + { + /* As an optimisation, use a strstr () matcher if we are + * in a unibyte locale. This can give a x2 speedup in + * the C locale. Some light testing reveals that + * glibc's strstr () is somewhere around 40% faster than + * gnulib's, so we just use strstr (). + */ + matcher = ignore_case ? + visit_substring_match_casefold_narrow : + visit_substring_match_nocasefold_narrow; + } + else + { + matcher = ignore_case ? + visit_substring_match_casefold_wide : + visit_substring_match_nocasefold_wide; + } + add_visitor (matcher, pathpart); + } } pvis = lastinspector; @@ -1283,24 +1249,24 @@ search_one_database (int argc, switch (do_check_existence) { case ACCEPT_EXISTING: - results_were_filtered = true; - if (follow_symlinks) /* -L, default */ - add_visitor (visit_existing_follow, NULL); - else /* -P */ - add_visitor (visit_existing_nofollow, NULL); - break; + results_were_filtered = true; + if (follow_symlinks) /* -L, default */ + add_visitor (visit_existing_follow, NULL); + else /* -P */ + add_visitor (visit_existing_nofollow, NULL); + break; case ACCEPT_NON_EXISTING: - results_were_filtered = true; - if (follow_symlinks) /* -L, default */ - add_visitor (visit_non_existing_follow, NULL); - else /* -P */ - add_visitor (visit_non_existing_nofollow, NULL); - break; - - case ACCEPT_EITHER: /* Default, neither -E nor -e */ - /* do nothing; no extra processing. */ - break; + results_were_filtered = true; + if (follow_symlinks) /* -L, default */ + add_visitor (visit_non_existing_follow, NULL); + else /* -P */ + add_visitor (visit_non_existing_nofollow, NULL); + break; + + case ACCEPT_EITHER: /* Default, neither -E nor -e */ + /* do nothing; no extra processing. */ + break; } /* Security issue: The stats visitor must be added immediately @@ -1313,9 +1279,9 @@ search_one_database (int argc, if (enable_print) { if (print_quoted_filename) - add_visitor (visit_justprint_quoted, NULL); + add_visitor (visit_justprint_quoted, NULL); else - add_visitor (visit_justprint_unquoted, NULL); + add_visitor (visit_justprint_unquoted, NULL); } @@ -1339,12 +1305,18 @@ search_one_database (int argc, if (stats) { printf (_("Database %s is in the %s format.\n"), - procdata.dbfile, - format_name); + procdata.dbfile, + format_name); } procdata.c = getc (procdata.fp); + if (slocatedb_format && (procdata.c != EOF)) + { + /* Make slocate database look like GNU locate database. */ + ungetc(procdata.c, procdata.fp); + procdata.c = 0; + } /* If we are searching for filename patterns, the inspector list * will contain an entry for each pattern for which we are searching. */ @@ -1357,35 +1329,35 @@ search_one_database (int argc, if (stats) { if (oldformat) - { - int host_little_endian = i_am_little_endian (); - const char *little = _("The database has little-endian " - "machine-word encoding.\n"); - const char *big = _("The database has big-endian " - "machine-word encoding.\n"); - - if (GetwordEndianStateNative == procdata.endian_state) - { - printf ("%s", (host_little_endian ? little : big)); - } - else if (GetwordEndianStateSwab == procdata.endian_state) - { - printf ("%s", (host_little_endian ? big : little)); - } - else - { - printf (_("The database machine-word encoding order " - "is not obvious.\n")); - } - } + { + int host_little_endian = i_am_little_endian (); + const char *little = _("The database has little-endian " + "machine-word encoding.\n"); + const char *big = _("The database has big-endian " + "machine-word encoding.\n"); + + if (GetwordEndianStateNative == procdata.endian_state) + { + printf ("%s", (host_little_endian ? little : big)); + } + else if (GetwordEndianStateSwab == procdata.endian_state) + { + printf ("%s", (host_little_endian ? big : little)); + } + else + { + printf (_("The database machine-word encoding order " + "is not obvious.\n")); + } + } if (filesize) - print_stats (argc, filesize); + print_stats (argc, filesize); } if (ferror (procdata.fp)) { error (0, errno, "%s", - quotearg_n_style (0, locale_quoting_style, procdata.dbfile)); + quotearg_n_style (0, locale_quoting_style, procdata.dbfile)); return 0; } return plimit->items_accepted; @@ -1405,7 +1377,7 @@ Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n\ [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n\ [--max-database-age D] [--version] [--help]\n\ pattern...\n"), - program_name); + program_name); fputs (_("\nReport bugs to .\n"), stream); } enum @@ -1459,10 +1431,10 @@ drop_privs (void) gid_t groups[1]; groups[0] = gid; if (0 != setgroups (1u, groups)) - { - what = _("failed to drop group privileges"); - goto fail; - } + { + what = _("failed to drop group privileges"); + goto fail; + } } #endif @@ -1470,40 +1442,40 @@ drop_privs (void) if (uid != orig_euid) { if (0 == uid) - { - /* We're really root anyway, but are setuid to something else. Leave it. */ - } + { + /* We're really root anyway, but are setuid to something else. Leave it. */ + } else - { - errno = 0; - if (0 != setuid (getuid ())) - { - what = _("failed to drop setuid privileges"); - goto fail; - } - - /* Defend against the case where the attacker runs us with the - * capability to call setuid () turned off, which on some systems - * will cause the above attempt to drop privileges fail (leaving us - * privileged). - */ - else - { - /* Check that we can no longer switch bask to root */ - if (0 == setuid (0)) - { - what = _("Failed to fully drop privileges"); - /* The errno value here is not interesting (since - * the system call we are complaining about - * succeeded when we wanted it to fail). Arrange - * for the call to error () not to print the errno - * value by setting errno=0. - */ - errno = 0; - goto fail; - } - } - } + { + errno = 0; + if (0 != setuid (getuid ())) + { + what = _("failed to drop setuid privileges"); + goto fail; + } + + /* Defend against the case where the attacker runs us with the + * capability to call setuid () turned off, which on some systems + * will cause the above attempt to drop privileges fail (leaving us + * privileged). + */ + else + { + /* Check that we can no longer switch bask to root */ + if (0 == setuid (0)) + { + what = _("Failed to fully drop privileges"); + /* The errno value here is not interesting (since + * the system call we are complaining about + * succeeded when we wanted it to fail). Arrange + * for the call to error () not to print the errno + * value by setting errno=0. + */ + errno = 0; + goto fail; + } + } + } } /* Drop any setgid privileges */ @@ -1519,7 +1491,7 @@ drop_privs (void) fail: error (EXIT_FAILURE, errno, "%s", - quotearg_n_style (0, locale_quoting_style, what)); + quotearg_n_style (0, locale_quoting_style, what)); abort (); kill (0, SIGKILL); _exit (1); @@ -1536,25 +1508,36 @@ opendb (const char *name) { int fd = open (name, O_RDONLY #if defined O_LARGEFILE - |O_LARGEFILE + |O_LARGEFILE #endif - ); + ); if (fd >= 0) { /* Make sure it won't survive an exec */ if (0 != fcntl (fd, F_SETFD, FD_CLOEXEC)) - { - close (fd); - fd = -1; - } + { + close (fd); + fd = -1; + } } return fd; } +static void +cleanup_quote_opts (void) +{ + free (quote_opts); +} + + int dolocate (int argc, char **argv, int secure_db_fd) { - char *dbpath; + char *path_element = NULL; + size_t path_element_pos, path_element_len; + const char *user_selected_locate_path; + const char *db_name; + const char *path_separators = ":"; unsigned long int found = 0uL; int ignore_case = 0; int print = 0; @@ -1565,10 +1548,8 @@ dolocate (int argc, char **argv, int secure_db_fd) int regex_options = RE_SYNTAX_EMACS; int stats = 0; int op_and = 0; - const char *e; FILE *fp; - int they_chose_db = 0; - bool did_stdin = false; /* Set to prevent rereading stdin. */ + bool did_stdin = false; /* Set to prevent rereading stdin. */ if (argv[0]) set_program_name (argv[0]); @@ -1580,23 +1561,23 @@ dolocate (int argc, char **argv, int secure_db_fd) #endif bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - atexit (close_stdout); + + quote_opts = clone_quoting_options (NULL); + if (atexit (close_stdout) || atexit (cleanup_quote_opts)) + { + error (EXIT_FAILURE, errno, _("The atexit library function failed")); + } limits.limit = 0; limits.items_accepted = 0; - quote_opts = clone_quoting_options (NULL); print_quoted_filename = true; /* We cannot simultaneously trust $LOCATE_PATH and use the * setuid-access-controlled database,, since that could cause a leak * of private data. */ - dbpath = getenv ("LOCATE_PATH"); - if (dbpath) - { - they_chose_db = 1; - } + user_selected_locate_path = getenv ("LOCATE_PATH"); check_existence = ACCEPT_EITHER; @@ -1604,128 +1585,128 @@ dolocate (int argc, char **argv, int secure_db_fd) { int opti = -1; int optc = getopt_long (argc, argv, "Abcd:eEil:prsm0SwHPL", longopts, - &opti); + &opti); if (optc == -1) - break; + break; switch (optc) - { - case '0': - separator = 0; - print_quoted_filename = false; /* print filename 'raw'. */ - break; - - case 'A': - op_and = 1; - break; - - case 'b': - basename_only = 1; - break; - - case 'c': - just_count = 1; - break; - - case 'd': - dbpath = optarg; - they_chose_db = 1; - break; - - case 'e': - check_existence = ACCEPT_EXISTING; - break; - - case 'E': - check_existence = ACCEPT_NON_EXISTING; - break; - - case 'i': - ignore_case = 1; - break; - - case 'h': - usage (stdout); - return 0; - - case MAX_DB_AGE: - /* XXX: nothing in the test suite for this option. */ - set_max_db_age (optarg); - break; - - case 'p': - print = 1; - break; - - case 'v': - display_findutils_version ("locate"); - return 0; - - case 'w': - basename_only = 0; - break; - - case 'r': - regex = 1; - break; - - case REGEXTYPE_OPTION: - regex_options = get_regex_type (optarg); - break; - - case 'S': - stats = 1; - break; - - case 'L': - follow_symlinks = 1; - break; - - /* In find, -P and -H differ in the way they handle paths - * given on the command line. This is not relevant for - * locate, but the -H option is supported because it is - * probably more intuitive to do so. - */ - case 'P': - case 'H': - follow_symlinks = 0; - break; - - case 'l': - { - char *end = optarg; - strtol_error err = xstrtoumax (optarg, &end, 10, &limits.limit, - NULL); - if (LONGINT_OK != err) - xstrtol_fatal (err, opti, optc, longopts, optarg); - use_limit = 1; - } - break; - - case 's': /* use stdio */ - case 'm': /* use mmap */ - /* These options are implemented simply for - * compatibility with FreeBSD - */ - break; - - default: - usage (stderr); - return 1; - } + { + case '0': + separator = 0; + print_quoted_filename = false; /* print filename 'raw'. */ + break; + + case 'A': + op_and = 1; + break; + + case 'b': + basename_only = 1; + break; + + case 'c': + just_count = 1; + break; + + case 'd': + user_selected_locate_path = optarg; + assert (optarg != NULL); + break; + + case 'e': + check_existence = ACCEPT_EXISTING; + break; + + case 'E': + check_existence = ACCEPT_NON_EXISTING; + break; + + case 'i': + ignore_case = 1; + break; + + case 'h': + usage (stdout); + return 0; + + case MAX_DB_AGE: + /* XXX: nothing in the test suite for this option. */ + set_max_db_age (optarg); + break; + + case 'p': + print = 1; + break; + + case 'v': + display_findutils_version ("locate"); + return 0; + + case 'w': + basename_only = 0; + break; + + case 'r': + regex = 1; + break; + + case REGEXTYPE_OPTION: + regex_options = get_regex_type (optarg); + break; + + case 'S': + stats = 1; + break; + + case 'L': + follow_symlinks = 1; + break; + + /* In find, -P and -H differ in the way they handle paths + * given on the command line. This is not relevant for + * locate, but the -H option is supported because it is + * probably more intuitive to do so. + */ + case 'P': + case 'H': + follow_symlinks = 0; + break; + + case 'l': + { + char *end = optarg; + strtol_error err = xstrtoumax (optarg, &end, 10, &limits.limit, + NULL); + if (LONGINT_OK != err) + xstrtol_fatal (err, opti, optc, longopts, optarg); + use_limit = 1; + } + break; + + case 's': /* use stdio */ + case 'm': /* use mmap */ + /* These options are implemented simply for + * compatibility with FreeBSD + */ + break; + + default: + usage (stderr); + return 1; + } } /* If the user gave the -d option or set LOCATE_PATH, * relinquish access to the secure database. */ - if (they_chose_db) + if (user_selected_locate_path) { if (secure_db_fd >= 0) - { - close (secure_db_fd); - secure_db_fd = -1; - } + { + close (secure_db_fd); + secure_db_fd = -1; + } } if (!just_count && !stats) @@ -1734,25 +1715,27 @@ dolocate (int argc, char **argv, int secure_db_fd) if (stats) { if (optind == argc) - use_limit = 0; + use_limit = 0; } else { if (!just_count && optind == argc) - { - usage (stderr); - return 1; - } + { + usage (stderr); + return 1; + } } - if (1 == isatty (STDOUT_FILENO)) stdout_is_a_tty = true; else stdout_is_a_tty = false; - if (they_chose_db) - next_element (dbpath, 0); /* Initialize. */ + if (user_selected_locate_path) + { + splitstring (user_selected_locate_path, path_separators, true, + &path_element_pos, &path_element_len); + } /* Bail out early if limit already reached. */ while (!use_limit || limits.limit > limits.items_accepted) @@ -1768,121 +1751,145 @@ dolocate (int argc, char **argv, int secure_db_fd) statistics.newline_count = statistics.highbit_filename_count = 0u; - if (they_chose_db) - { - /* Take the next element from the list of databases */ - e = next_element ((char *) NULL, 0); - if (NULL == e) - break; - - if (0 == strcmp (e, "-")) - { - if (did_stdin) - { - error (0, 0, - _("warning: the locate database can only be read from stdin once.")); - return 0; - } - else - { - e = ""; - fd = 0; - did_stdin = true; - } - } - else - { - if (0 == strlen (e) || 0 == strcmp (e, ".")) - { - e = LOCATE_DB; - } - - /* open the database */ - fd = opendb (e); - if (fd < 0) - { - error (0, errno, "%s", - quotearg_n_style (0, locale_quoting_style, e)); - return 0; - } - } - } + if (user_selected_locate_path) + { + /* Take the next element from the list of databases */ + if (1 == path_element_len + && '-' == user_selected_locate_path[path_element_pos]) + { + if (did_stdin) + { + error (0, 0, + _("warning: the locate database can only be read from stdin once.")); + return 0; + } + else + { + db_name = ""; + fd = 0; + did_stdin = true; + } + } + else + { + if (0 == path_element_len + || (1 == path_element_len + && '.' == user_selected_locate_path[path_element_pos])) + { + db_name = LOCATE_DB; + } + else + { + path_element = strndup (&user_selected_locate_path[path_element_pos], + path_element_len); + db_name = path_element; + } + + /* open the database */ + fd = opendb (db_name); + if (fd < 0) + { + error (0, errno, "%s", + quotearg_n_style (0, locale_quoting_style, db_name)); + return 0; + } + } + } else - { - if (-1 == secure_db_fd) - { - /* Already searched the database, it's time to exit the loop */ - break; - } - else - { - e = selected_secure_db; - fd = secure_db_fd; - secure_db_fd = -1; - } - } + { + if (-1 == secure_db_fd) + { + /* Already searched the database, it's time to exit the loop */ + break; + } + else + { + db_name = selected_secure_db; + fd = secure_db_fd; + secure_db_fd = -1; + } + } /* Check the database to see if it is old. */ if (fstat (fd, &st)) - { - error (0, errno, "%s", - quotearg_n_style (0, locale_quoting_style, e)); - /* continue anyway */ - filesize = (off_t)0; - } + { + error (0, errno, "%s", + quotearg_n_style (0, locale_quoting_style, db_name)); + /* continue anyway */ + filesize = (off_t)0; + } else - { - time_t now; - - filesize = st.st_size; - - if ((time_t)-1 == time (&now)) - { - /* If we can't tell the time, we don't know how old the - * database is. But since the message is just advisory, - * we continue anyway. - */ - error (0, errno, _("time system call failed")); - } - else - { - double age = difftime (now, st.st_mtime); - double warn_seconds = SECONDS_PER_UNIT * warn_number_units; - if (age > warn_seconds) - { - /* For example: - warning: database `fred' is more than 8 days old (actual age is 10 days)*/ - error (0, 0, - _("warning: database %s is more than %d %s old (actual age is %.1f %s)"), - quotearg_n_style (0, locale_quoting_style, e), - warn_number_units, _(warn_name_units), - (age/(double)SECONDS_PER_UNIT), _(warn_name_units)); - } - } - } + { + time_t now; + + filesize = st.st_size; + + if ((time_t)-1 == time (&now)) + { + /* If we can't tell the time, we don't know how old the + * database is. But since the message is just advisory, + * we continue anyway. + */ + error (0, errno, _("time system call failed")); + } + else + { + double age = difftime (now, st.st_mtime); + double warn_seconds = SECONDS_PER_UNIT * warn_number_units; + if (age > warn_seconds) + { + /* For example: + warning: database `fred' is more than 8 days old (actual age is 10 days)*/ + error (0, 0, + _("warning: database %s is more than %d %s old (actual age is %.1f %s)"), + quotearg_n_style (0, locale_quoting_style, db_name), + warn_number_units, _(warn_name_units), + (age/(double)SECONDS_PER_UNIT), _(warn_name_units)); + } + } + } fp = fdopen (fd, "r"); if (NULL == fp) - { - error (0, errno, "%s", - quotearg_n_style (0, locale_quoting_style, e)); - return 0; - } + { + error (0, errno, "%s", + quotearg_n_style (0, locale_quoting_style, db_name)); + return 0; + } /* Search this database for all patterns simultaneously */ found = search_one_database (argc - optind, &argv[optind], - e, fp, filesize, - ignore_case, print, basename_only, - use_limit, &limits, stats, - op_and, regex, regex_options); + db_name, fp, filesize, + ignore_case, print, basename_only, + use_limit, &limits, stats, + op_and, regex, regex_options); /* Close the databsase (even if it is stdin) */ if (fclose (fp) == EOF) - { - error (0, errno, "%s", - quotearg_n_style (0, locale_quoting_style, e)); - return 0; - } + { + error (0, errno, "%s", + quotearg_n_style (0, locale_quoting_style, db_name)); + return 0; + } + if (path_element) + { + free (path_element); + path_element = NULL; + } + + if (!user_selected_locate_path) + { + /* We're not actually iterating through the values in + $LOCATE_PATH so we don't want to check for the next + element in user_selected_locate_path (since we manually set db_name = + LOCATE_DB without using user_selected_locate_path). */ + break; + } + else if (!splitstring (user_selected_locate_path, path_separators, false, + &path_element_pos, &path_element_len)) + { + break; + } } if (just_count) @@ -1912,10 +1919,10 @@ open_secure_db (void) { fd = opendb (secure_db_list[i]); if (fd >= 0) - { - selected_secure_db = secure_db_list[i]; - return fd; - } + { + selected_secure_db = secure_db_list[i]; + return fd; + } } return -1; } diff --git a/locate/locatedb.5 b/locate/locatedb.5 index 65a8351..bb7584c 100644 --- a/locate/locatedb.5 +++ b/locate/locatedb.5 @@ -48,7 +48,7 @@ Every database begins with a dummy entry for a file called `LOCATE02', which \fBlocate\fP checks for to ensure that the database file has the correct format; it ignores the entry in doing the search. .P -Databases can not be concatenated together, even if the first +Databases cannot be concatenated together, even if the first (dummy) entry is trimmed from all but the first database. This is because the offset-differential count in the first entry of the second and following databases will be wrong. diff --git a/locate/locatedb.h b/locate/locatedb.h index a2d6644..048a2ea 100644 --- a/locate/locatedb.h +++ b/locate/locatedb.h @@ -1,5 +1,5 @@ /* locatedb.h -- declarations for the locate database - Copyright (C) 1994, 2010 Free Software Foundation, Inc. + Copyright (C) 1994, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +15,8 @@ along with this program. If not, see . */ -#ifndef _LOCATEDB_H -#define _LOCATEDB_H 1 +#ifndef INC_LOCATEDB_H +#define INC_LOCATEDB_H 1 /* The magic string at the start of a locate database, to make sure it's in the right format. The 02 is the database format version number. @@ -69,4 +69,4 @@ bool putword (FILE *fp, int word, #define SLOCATE_DB_MAGIC_LEN 2 -#endif /* !_LOCATEDB_H */ +#endif /* !INC_LOCATEDB_H */ diff --git a/locate/testsuite/Makefile.am b/locate/testsuite/Makefile.am index 75623bc..508cd62 100644 --- a/locate/testsuite/Makefile.am +++ b/locate/testsuite/Makefile.am @@ -17,10 +17,12 @@ locate.gnu/regex1.exp \ locate.gnu/exists1.exp \ locate.gnu/exists2.exp \ locate.gnu/exists3.exp \ +locate.gnu/slocate.exp \ locate.gnu/notexists1.exp \ locate.gnu/notexists2.exp \ locate.gnu/notexists3.exp \ locate.gnu/old_prefix.exp \ +locate.gnu/oldformat.exp \ locate.gnu/space1st.exp \ locate.gnu/sv-bug-14535.exp \ locate.gnu/exceedshort.exp @@ -38,10 +40,12 @@ locate.gnu/ignore_case3.xo \ locate.gnu/exists1.xo \ locate.gnu/exists2.xo \ locate.gnu/exists3.xo \ +locate.gnu/slocate.xo \ locate.gnu/notexists1.xo \ locate.gnu/notexists2.xo \ locate.gnu/notexists3.xo \ -locate.gnu/old_prefix.xo +locate.gnu/old_prefix.xo \ +locate.gnu/oldformat.xo EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_XI) diff --git a/locate/testsuite/Makefile.in b/locate/testsuite/Makefile.in index c7ad128..d09f8fb 100644 --- a/locate/testsuite/Makefile.in +++ b/locate/testsuite/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,233 +55,198 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -273,6 +255,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir EXPECT = expect RUNTEST = runtest @@ -283,6 +270,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -293,6 +282,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -315,59 +305,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -375,6 +412,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -386,12 +425,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -403,10 +457,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -446,49 +516,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -515,6 +625,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -524,7 +636,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -536,8 +649,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -580,26 +695,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -616,17 +753,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -648,19 +795,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -676,6 +839,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -690,8 +859,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -713,30 +891,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -744,6 +954,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -751,18 +962,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -802,18 +1026,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -823,6 +1049,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -833,12 +1061,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -859,6 +1090,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -869,7 +1103,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -877,8 +1113,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -894,7 +1136,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -902,8 +1146,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -925,10 +1175,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -940,19 +1197,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -960,26 +1230,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -997,6 +1297,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1009,11 +1312,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1021,6 +1334,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1028,10 +1342,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1041,10 +1358,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1068,6 +1390,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1075,14 +1398,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1092,6 +1418,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1104,7 +1432,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1145,9 +1475,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1174,10 +1509,12 @@ locate.gnu/regex1.exp \ locate.gnu/exists1.exp \ locate.gnu/exists2.exp \ locate.gnu/exists3.exp \ +locate.gnu/slocate.exp \ locate.gnu/notexists1.exp \ locate.gnu/notexists2.exp \ locate.gnu/notexists3.exp \ locate.gnu/old_prefix.exp \ +locate.gnu/oldformat.exp \ locate.gnu/space1st.exp \ locate.gnu/sv-bug-14535.exp \ locate.gnu/exceedshort.exp @@ -1195,10 +1532,12 @@ locate.gnu/ignore_case3.xo \ locate.gnu/exists1.xo \ locate.gnu/exists2.xo \ locate.gnu/exists3.xo \ +locate.gnu/slocate.xo \ locate.gnu/notexists1.xo \ locate.gnu/notexists2.xo \ locate.gnu/notexists3.xo \ -locate.gnu/old_prefix.xo +locate.gnu/old_prefix.xo \ +locate.gnu/oldformat.xo EXTRA_DIST = $(EXTRA_DIST_EXP) $(EXTRA_DIST_XO) $(EXTRA_DIST_XI) @@ -1245,7 +1584,7 @@ CTAGS: check-DEJAGNU: site.exp - srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + srcdir='$(srcdir)'; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ runtest=$(RUNTEST); \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ @@ -1256,20 +1595,27 @@ check-DEJAGNU: site.exp else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi; \ exit $$exit_status -site.exp: Makefile +site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG) @echo 'Making a new site.exp file...' @echo '## these variables are automatically generated by make ##' >site.tmp @echo '# Do not edit here. If you wish to override these values' >>site.tmp @echo '# edit the last section' >>site.tmp - @echo 'set srcdir $(srcdir)' >>site.tmp + @echo 'set srcdir "$(srcdir)"' >>site.tmp @echo "set objdir `pwd`" >>site.tmp @echo 'set build_alias "$(build_alias)"' >>site.tmp @echo 'set build_triplet $(build_triplet)' >>site.tmp @echo 'set host_alias "$(host_alias)"' >>site.tmp @echo 'set host_triplet $(host_triplet)' >>site.tmp - @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp - @test ! -f site.exp || \ - sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \ + echo "## Begin content included from file $$f. Do not modify. ##" \ + && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \ + && echo "## End content included from file $$f. ##" \ + || exit 1; \ + done >> site.tmp + @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp + @if test -f site.exp; then \ + sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \ + fi @-rm -f site.bak @test ! -f site.exp || mv site.exp site.bak @mv site.tmp site.exp @@ -1325,10 +1671,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/locate/testsuite/config/unix.exp b/locate/testsuite/config/unix.exp index dccffd1..2c0f015 100644 --- a/locate/testsuite/config/unix.exp +++ b/locate/testsuite/config/unix.exp @@ -1,18 +1,18 @@ # -*- TCL -*- # Test-specific TCL procedures required by DejaGNU. -# Copyright (C) 1994, 2003, 2004, 2005, 2006, 2007, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1994, 2003, 2004, 2005, 2006, 2007, 2010, 2011 Free +# Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program. If not, see . @@ -23,8 +23,8 @@ # use the local version of find for updatedb # -# We normalise (normalize for those over the water) pathnames -# because the updatedb shell script uses "cd", which means that +# We normalise (normalize for those over the water) pathnames +# because the updatedb shell script uses "cd", which means that # any relative paths no longer point where we thought they did. # Because "file normalize" requires tcl 8.4, we have a plan B # for normalising the name of a directory, but it is slower. @@ -41,7 +41,7 @@ set fulldir [ normalize_dir "../../find" ] set env{find} "$fulldir/find" # use the local help commands for updatedb -set env(LIBEXECDIR) [ normalize_dir .. ] +set env(LIBEXECDIR) [ normalize_dir .. ] # use our local version of find, too. # do not ignore any file systems for this test @@ -208,7 +208,7 @@ proc locate_start { passfail updatedb_options locate_options if $verbose>1 then { send_user "$comp_output\n" } - # If fail_good is set, that refers to the exit + # If fail_good is set, that refers to the exit # status of locate, not updatedb... fail "$testname: updatedb is supposed to be silent, $comp_output" return @@ -218,7 +218,7 @@ proc locate_start { passfail updatedb_options locate_options eval $between_hook - + set locate_cmd "$LOCATE $LOCATEFLAGS $locate_options < $locate_infile > locate.out" send_log "$locate_cmd\n" if $verbose>1 then { diff --git a/locate/testsuite/locate.gnu/bigendian.exp b/locate/testsuite/locate.gnu/bigendian.exp index 08a3cae..32f711d 100644 --- a/locate/testsuite/locate.gnu/bigendian.exp +++ b/locate/testsuite/locate.gnu/bigendian.exp @@ -1,2 +1,2 @@ # Make sure we can read a big-endian old-format database. -locate_from_db p "-r ." "locateddb.old.powerpc.xi" +locate_from_db p "-r ." "locateddb.old.powerpc.xi" diff --git a/locate/testsuite/locate.gnu/bigprefix1.exp b/locate/testsuite/locate.gnu/bigprefix1.exp index f9df434..f776d74 100644 --- a/locate/testsuite/locate.gnu/bigprefix1.exp +++ b/locate/testsuite/locate.gnu/bigprefix1.exp @@ -9,4 +9,4 @@ ________________________________________________________________________________ ________________________________________________________________________________________________________________________________________________________________________________________________________abcF\n" -locate_roundtrip 1 $text +locate_roundtrip 1 $text diff --git a/locate/testsuite/locate.gnu/exists2.exp b/locate/testsuite/locate.gnu/exists2.exp index ca02f17..a775543 100644 --- a/locate/testsuite/locate.gnu/exists2.exp +++ b/locate/testsuite/locate.gnu/exists2.exp @@ -5,4 +5,4 @@ exec mkdir $tmp exec mkdir $tmp/subdir exec touch $tmp/subdir/fred1 exec touch $tmp/subdir/fred2 -locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -e fred" {} {} { exec rm "tmp/subdir/fred2" } +locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -e fred" {} {} { exec rm "tmp/subdir/fred2" } diff --git a/locate/testsuite/locate.gnu/exists3.exp b/locate/testsuite/locate.gnu/exists3.exp index 022ad07..89c27a5 100644 --- a/locate/testsuite/locate.gnu/exists3.exp +++ b/locate/testsuite/locate.gnu/exists3.exp @@ -5,4 +5,4 @@ exec mkdir $tmp exec mkdir $tmp/subdir exec touch $tmp/subdir/fred1 exec touch $tmp/subdir/fred2 -locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -e fred" {} {} { exec rm "tmp/subdir/fred1" } +locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -e fred" {} {} { exec rm "tmp/subdir/fred1" } diff --git a/locate/testsuite/locate.gnu/littleendian.exp b/locate/testsuite/locate.gnu/littleendian.exp index 96f5055..9b73154 100644 --- a/locate/testsuite/locate.gnu/littleendian.exp +++ b/locate/testsuite/locate.gnu/littleendian.exp @@ -1,2 +1,2 @@ # Make sure we can read a little-endian old-format database. -locate_from_db p "-r ." "locateddb.old.x86.xi" +locate_from_db p "-r ." "locateddb.old.x86.xi" diff --git a/locate/testsuite/locate.gnu/notexists2.exp b/locate/testsuite/locate.gnu/notexists2.exp index 79d3c7c..1ff42f6 100644 --- a/locate/testsuite/locate.gnu/notexists2.exp +++ b/locate/testsuite/locate.gnu/notexists2.exp @@ -5,4 +5,4 @@ exec mkdir $tmp exec mkdir $tmp/subdir exec touch $tmp/subdir/fred1 exec touch $tmp/subdir/fred2 -locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -E fred" {} {} { exec rm "tmp/subdir/fred2" } +locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -E fred" {} {} { exec rm "tmp/subdir/fred2" } diff --git a/locate/testsuite/locate.gnu/notexists3.exp b/locate/testsuite/locate.gnu/notexists3.exp index a391e02..06652d1 100644 --- a/locate/testsuite/locate.gnu/notexists3.exp +++ b/locate/testsuite/locate.gnu/notexists3.exp @@ -5,4 +5,4 @@ exec mkdir $tmp exec mkdir $tmp/subdir exec touch $tmp/subdir/fred1 exec touch $tmp/subdir/fred2 -locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -E fred" {} {} { exec rm "tmp/subdir/fred1" } +locate_start p "--changecwd=. --output=$tmp/locatedb --localpaths=tmp/subdir/" "--database=$tmp/locatedb -E fred" {} {} { exec rm "tmp/subdir/fred1" } diff --git a/locate/testsuite/locate.gnu/oldformat.exp b/locate/testsuite/locate.gnu/oldformat.exp new file mode 100644 index 0000000..a85c8b9 --- /dev/null +++ b/locate/testsuite/locate.gnu/oldformat.exp @@ -0,0 +1,12 @@ +# A basic test for the old database format. We need this test because (among +# other reasons) the updatedb script only uses our mktemp replacement when +# it needs to run bigram/code. +set tmp "tmp" +exec rm -rf $tmp +exec mkdir $tmp +exec mkdir $tmp/subdir +exec touch $tmp/subdir/fred +# Redirect stderr to /dev/null to throw away the warning message about using +# the old format, because otherwise the presence of the error message would +# cause locate_start to signal a test case failure. +locate_start p "--changecwd=. --output=$tmp/locatedb --old-format --localpaths=tmp/subdir/ 2>/dev/null" "--database=$tmp/locatedb -e fred" {} diff --git a/locate/testsuite/locate.gnu/oldformat.xo b/locate/testsuite/locate.gnu/oldformat.xo new file mode 100644 index 0000000..fdda926 --- /dev/null +++ b/locate/testsuite/locate.gnu/oldformat.xo @@ -0,0 +1 @@ +tmp/subdir/fred diff --git a/locate/testsuite/locate.gnu/slocate.exp b/locate/testsuite/locate.gnu/slocate.exp new file mode 100644 index 0000000..c36d99d --- /dev/null +++ b/locate/testsuite/locate.gnu/slocate.exp @@ -0,0 +1,9 @@ +# tests an slocate database, string1 (tmp/subdia) is not prefix of string2 (tmp/subdir). +set tmp "tmp" +exec rm -rf $tmp +exec mkdir $tmp +exec touch $tmp/subdia +exec mkdir $tmp/subdir +exec touch $tmp/subdir/fred +locate_start p "--changecwd=. --output=$tmp/locatedb --dbformat=slocate --localpaths=$tmp/subdi*" "--database=$tmp/locatedb -e subdi 2>/dev/null" {} + diff --git a/locate/testsuite/locate.gnu/slocate.xo b/locate/testsuite/locate.gnu/slocate.xo new file mode 100644 index 0000000..ad0208c --- /dev/null +++ b/locate/testsuite/locate.gnu/slocate.xo @@ -0,0 +1,3 @@ +tmp/subdia +tmp/subdir +tmp/subdir/fred diff --git a/locate/testsuite/locate.gnu/sv-bug-14535.exp b/locate/testsuite/locate.gnu/sv-bug-14535.exp index 3d5d697..3f3056c 100644 --- a/locate/testsuite/locate.gnu/sv-bug-14535.exp +++ b/locate/testsuite/locate.gnu/sv-bug-14535.exp @@ -30,15 +30,15 @@ proc select_any_locale { patternlist } { # locales in which we want to perform part of this test. If we can # use any locale matching any of the patterns, we run an extra four # tests. Otherwise, we skip them and issue a warning message. -set localeoptions { +set localeoptions { "hu_HU.UTF-8" - "hu_*.UTF-8" + "hu_*.UTF-8" "en_IE.utf8" "en_GB.utf8" "en_US.utf8" "en_*.utf8" "*.utf8" -} +} diff --git a/locate/updatedb.1 b/locate/updatedb.1 index df33aa4..ebba3da 100644 --- a/locate/updatedb.1 +++ b/locate/updatedb.1 @@ -24,7 +24,7 @@ is then run for each filesystem on the fileserver where that filesystem is on a local disk, to prevent thrashing the network. Users can select which databases \fBlocate\fP searches using an environment variable or command line option; see \fBlocate\fP(1). -Databases can not be concatenated together. +Databases cannot be concatenated together. .P The file name database format changed starting with GNU .B find @@ -120,7 +120,17 @@ Print a summary of the options to and exit. .SH "SEE ALSO" \fBfind\fP(1), \fBlocate\fP(1), \fBlocatedb\fP(5), \fBxargs\fP(1) -\fBFinding Files\fP (on-line in Info, or printed) + +The full documentation for +.B updatedb +is maintained as a Texinfo manual. If the +.B info +and +.B updatedb +programs are properly installed at your site, the command +.B info updatedb +should give you access to the complete manual. + .SH "BUGS" .P The diff --git a/locate/updatedb.sh b/locate/updatedb.sh index ce88a61..16515c0 100644 --- a/locate/updatedb.sh +++ b/locate/updatedb.sh @@ -1,7 +1,7 @@ #! /bin/sh # updatedb -- build a locate pathname database # Copyright (C) 1994, 1996, 1997, 2000, 2001, 2003, 2004, 2005, 2006, -# 2010 Free Software Foundation, Inc. +# 2010, 2011 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ version=' updatedb (@PACKAGE_NAME@) @VERSION@ -Copyright (C) 2007 Free Software Foundation, Inc. +Copyright (C) 2007,2008,2009,2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. @@ -158,7 +158,15 @@ select_shell() { : ${NETPATHS=} # Directories to not put in the database, which would otherwise be. -: ${PRUNEPATHS="/tmp /usr/tmp /var/tmp /afs /amd /sfs /proc"} +: ${PRUNEPATHS=" +/afs +/amd +/proc +/sfs +/tmp +/usr/tmp +/var/tmp +"} # Trailing slashes result in regex items that are never matched, which # is not what the user will expect. Therefore we now reject such @@ -210,6 +218,26 @@ fi : ${bigram:=${LIBEXECDIR}/@bigram@} : ${code:=${LIBEXECDIR}/@code@} +make_tempdir () { + # This implementation is adapted from the GNU Autoconf manual. + { + tmp=` + (umask 077 && mktemp -d "$TMPDIR/updatedbXXXXXX") 2>/dev/null + ` && + test -n "$tmp" && test -d "$tmp" + } || { + # This method is less secure than mktemp -d, but it's a fallback. + # + # We use $$ as well as $RANDOM since $RANDOM may not be available. + # We also add a time-dependent suffix. This is actually somewhat + # predictable, but then so is $$. POSIX does not require date to + # support +%N. + ts=`date +%N%S || date +%S 2>/dev/null` + tmp="$TMPDIR"/updatedb"$$"-"${RANDOM:-}${ts}" + (umask 077 && mkdir "$tmp") + } + echo "$tmp" +} checkbinary () { if test -x "$1" ; then @@ -226,9 +254,26 @@ do done -PATH=/bin:/usr/bin:${BINDIR}; export PATH - -: ${PRUNEFS="nfs NFS proc afs smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs sysfs shfs"} +: ${PRUNEFS=" +9P +NFS +afs +autofs +cifs +coda +devfs +devpts +ftpfs +iso9660 +mfs +ncpfs +nfs +nfs4 +proc +shfs +smbfs +sysfs +"} if test -n "$PRUNEFS"; then prunefs_exp=`echo $PRUNEFS |sed -e 's/\([^ ][^ ]*\)/-o -fstype \1/g' \ @@ -298,18 +343,16 @@ fi else # old -if ! bigrams=`mktemp -t updatedbXXXXXXXXX`; then - echo mktemp failed >&2 - exit 1 -fi - -if ! filelist=`mktemp -t updatedbXXXXXXXXX`; then - echo mktemp failed >&2 +if temp_directory="`make_tempdir`"; then + bigrams="${temp_directory}"/bigrams + filelist="${temp_directory}"/filelist +else + echo "failed to create temporary directory" >&2 exit 1 fi rm -f $LOCATE_DB.n -trap 'rm -f $bigrams $filelist $LOCATE_DB.n; exit' HUP TERM +trap 'rm -f $LOCATE_DB.n; rm -rf "${temp_directory}"; exit' HUP TERM # Alphabetize subdirectories before file entries using tr. James Woods says: # "to get everything in monotonic collating sequence, to avoid some @@ -344,16 +387,16 @@ if test -n "$NETPATHS"; then exit $? fi fi -} | tr / '\001' | $sort -f | tr '\001' / > $filelist +} | tr / '\001' | $sort -f | tr '\001' / > "$filelist" # Compute the (at most 128) most common bigrams in the file list. $bigram $bigram_opts < $filelist | sort | uniq -c | sort -nr | - awk '{ if (NR <= 128) print $2 }' | tr -d '\012' > $bigrams + awk '{ if (NR <= 128) print $2 }' | tr -d '\012' > "$bigrams" # Code the file list. -$code $bigrams < $filelist > $LOCATE_DB.n +$code "$bigrams" < "$filelist" > $LOCATE_DB.n -rm -f $bigrams $filelist +rm -rf "${temp_directory}" # To reduce the chances of breaking locate while this script is running, # put the results in a temp file, then rename it atomically. diff --git a/locate/word_io.c b/locate/word_io.c index 575f26f..6e92f01 100644 --- a/locate/word_io.c +++ b/locate/word_io.c @@ -1,5 +1,5 @@ /* word_io.c -- word oriented I/O - Copyright (C) 2007, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,17 +15,24 @@ along with this program. If not, see . */ +/* config.h must be included first. */ #include -#include -#include +/* system headers. */ +#include #include #include /* for bool */ -#include +#include #include +#include +/* gnulib headers. */ +#include "byteswap.h" #include "error.h" +#include "gettext.h" #include "quotearg.h" + +/* find headers. */ #include "locatedb.h" #if ENABLE_NLS @@ -50,11 +57,6 @@ #endif -/* Swap bytes in 32 bit value. This code is taken from glibc-2.3.3. */ -#define bswap_32(x) \ - ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) - enum { WORDBYTES=4 }; static int diff --git a/m4/Makefile.in b/m4/Makefile.in index c0dfaf2..fe3c101 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,233 +55,198 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -273,6 +255,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ @@ -280,6 +267,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -290,6 +279,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -312,59 +302,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -372,6 +409,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -383,12 +422,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -400,10 +454,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -443,49 +513,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -512,6 +622,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -521,7 +633,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -533,8 +646,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -577,26 +692,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -613,17 +750,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -645,19 +792,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -673,6 +836,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -687,8 +856,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -710,30 +888,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -741,6 +951,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -748,18 +959,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -799,18 +1023,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -820,6 +1046,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -830,12 +1058,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -856,6 +1087,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -866,7 +1100,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -874,8 +1110,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -891,7 +1133,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -899,8 +1143,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -922,10 +1172,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -937,19 +1194,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -957,26 +1227,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -994,6 +1294,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1006,11 +1309,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1018,6 +1331,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1025,10 +1339,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1038,10 +1355,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1065,6 +1387,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1072,14 +1395,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1089,6 +1415,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1101,7 +1429,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1142,9 +1472,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1238,10 +1573,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/m4/noreturn.m4 b/m4/noreturn.m4 index 3344ec0..f930afc 100644 --- a/m4/noreturn.m4 +++ b/m4/noreturn.m4 @@ -1,4 +1,4 @@ -dnl Copyright (C) 2007, 2010 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/m4/nullsort.m4 b/m4/nullsort.m4 index 5f592f7..10a1a93 100644 --- a/m4/nullsort.m4 +++ b/m4/nullsort.m4 @@ -13,7 +13,7 @@ else # sort thinks there is more than one input line there. We have # to make sort -c do its thing with the input lines in the wrong # order to determine that (we can't do it in one shot because - # if sort returns nonzero we cant tell that it wasn't just + # if sort returns nonzero we can't tell that it wasn't just # complaining about this unknown -z option. if $SORT -z -c < "${srcdir:-.}/m4/order-bad.bin" 2>/dev/null >/dev/null then diff --git a/maint.mk b/maint.mk index 524b69f..b6cd5a2 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-2011 Free Software Foundation, Inc. +## Copyright (C) 2001-2014 Free Software Foundation, Inc. ## ## This 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,8 +21,34 @@ # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) ME := maint.mk -# Override this in cfg.mk if you use a non-standard build-aux directory. -build_aux ?= $(srcdir)/build-aux +# Diagnostic for continued use of deprecated variable. +# Remove in 2013 +ifneq ($(build_aux),) + $(error "$(ME): \ +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. @@ -33,9 +59,8 @@ GZIP_ENV = '--no-name --best $(gzip_rsyncable)' GIT = git VC = $(GIT) -VC-tag = git tag -s -m '$(VERSION)' 'v$(VERSION)' -u '$(gpg_key_ID)' -VC_LIST = $(build_aux)/vc-list-files -C $(srcdir) +VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir) # You can override this variable in cfg.mk to set your own regexp # matching files to ignore. @@ -49,18 +74,18 @@ _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)/||' \ + $(VC_LIST) | $(SED) 's|^$(_dot_escaped_srcdir)/||' \ | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \ else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \ | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \ @@ -75,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. @@ -121,17 +155,17 @@ 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' \ - $(srcdir)/$(ME) $(_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' $(srcdir)/$(ME) $(_cfg_mk))) .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 @@ -175,11 +209,20 @@ syntax-check: $(local-check) # Regular expression (ERE) denoting either a forbidden construct # or a required construct. Those arguments are exclusive. # +# exclude +# +# Regular expression (ERE) denoting lines to ignore that matched +# a prohibit construct. For example, this can be used to exclude +# comments that mention why the nearby code uses an alternative +# construct instead of the simpler prohibited construct. +# # 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 # @@ -209,6 +252,17 @@ syntax-check: $(local-check) # when filtering by name via in_files, we explicitly filter out matching # names here as well. +# Initialize each, so that envvar settings cannot interfere. +export require = +export prohibit = +export exclude = +export in_vc_files = +export in_files = +export containing = +export non_containing = +export halt = +export with_grep_options = + # By default, _sc_search_regexp does not ignore case. export ignore_case = _ignore_case = $$(test -n "$$ignore_case" && printf %s -i || :) @@ -218,15 +272,6 @@ define _sc_say_and_exit { printf '%s\n' "$(ME): $$msg" 1>&2; exit 1; }; endef -# _sc_search_regexp used to be named _prohibit_regexp. However, -# upgrading to the new definition and leaving the old name undefined -# would usually convert each custom rule using $(_prohibit_regexp) -# (usually defined in cfg.mk) into a no-op. This definition ensures -# that people know right away if they're still using the old name. -# FIXME: remove in 2012. -_prohibit_regexp = \ - $(error '*** you need to s/_prohibit_regexp/_sc_search_regexp/, and adapt') - define _sc_search_regexp dummy=; : so we do not need a semicolon before each use; \ \ @@ -237,6 +282,9 @@ define _sc_search_regexp test -z "$$prohibit" && test -z "$$require" \ && { msg='Should specify either prohibit or require' \ $(_sc_say_and_exit) } || :; \ + test -z "$$prohibit" && test -n "$$exclude" \ + && { msg='Use of exclude requires a prohibit pattern' \ + $(_sc_say_and_exit) } || :; \ test -n "$$in_vc_files" && test -n "$$in_files" \ && { msg='Cannot specify both in_vc_files and in_files' \ $(_sc_say_and_exit) } || :; \ @@ -246,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 \ @@ -264,6 +312,7 @@ define _sc_search_regexp if test -n "$$files"; then \ if test -n "$$prohibit"; then \ grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \ + | grep -vE "$${exclude:-^$$}" \ && { msg="$$halt" $(_sc_say_and_exit) } || :; \ else \ grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \ @@ -275,24 +324,24 @@ define _sc_search_regexp endef sc_avoid_if_before_free: - @$(build_aux)/useless-if-before-free \ + @$(srcdir)/$(_build-aux)/useless-if-before-free \ $(useless_free_options) \ $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \ { echo '$(ME): found useless "if" before "free" above' 1>&2; \ exit 1; } || : sc_cast_of_argument_to_free: - @prohibit='\&2; exit 1; } || : + @prohibit='! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)' \ + exclude='# *define STRN?EQ\(' \ + halt='replace strcmp calls above with STREQ/STRNEQ' \ + $(_sc_search_regexp) + +# Really. You don't want to use this function. +# It may fail to NUL-terminate the destination, +# and always NUL-pads out to the specified length. +sc_prohibit_strncpy: + @prohibit='\ /dev/null; then \ fail=0; \ for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \ - grep '^# *include\>' $$i | sed 1q \ + grep '^# *include\>' $$i | $(SED) 1q \ | grep -E '^# *include $(config_h_header)' > /dev/null \ || { echo $$i; fail=1; }; \ done; \ @@ -406,11 +464,11 @@ sc_prohibit_HAVE_MBRTOWC: $(_sc_search_regexp) # To use this "command" macro, you must first define two shell variables: -# h: the header, enclosed in <> or "" +# h: the header name, with no enclosing <> or "" # re: a regular expression that matches IFF something provided by $h is used. define _sc_header_without_use dummy=; : so we do not need a semicolon before each use; \ - h_esc=`echo "$$h"|sed 's/\./\\\\./g'`; \ + h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`; \ if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ files=$$(grep -l '^# *include '"$$h_esc" \ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \ @@ -423,42 +481,43 @@ endef # Prohibit the inclusion of assert.h without an actual use of assert. sc_prohibit_assert_without_use: - @h='' re='\ sc_prohibit_hash_without_use: - @h='"hash.h"' \ + @h='hash.h' \ re='$(_hash_fn)|$(_hash_struct)'\ $(_sc_header_without_use) +sc_prohibit_cloexec_without_use: + @h='cloexec.h' re='\<(set_cloexec_flag|dup_cloexec) *\(' \ + $(_sc_header_without_use) + +sc_prohibit_posixver_without_use: + @h='posixver.h' re='\' \ halt='do not use HAVE''_FCNTL_H or O'_NDELAY \ @@ -647,15 +750,10 @@ sc_require_test_exit_idiom: exit 1; } || :; \ fi -sc_the_the: - @prohibit='\' \ - ignore_case=1 \ - halt='found use of "the ''the";' \ - $(_sc_search_regexp) - 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 @@ -667,14 +765,17 @@ sc_two_space_separator_in_usage: halt='help2man requires at least two spaces between an option and its description'\ $(_sc_search_regexp) +# A regexp matching function names like "error" that may be used +# to emit translatable messages. +_gl_translatable_diag_func_re ?= error + # Look for diagnostics that aren't marked for translation. # This won't find any for which error's format string is on a separate line. sc_unmarked_diagnostics: - @grep -nE \ - '\&2; \ - exit 1; } || : + @prohibit='\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \ + exclude='(_|ngettext ?)\(' \ + halt='found unmarked diagnostic(s)' \ + $(_sc_search_regexp) # Avoid useless parentheses like those in this example: # #if defined (SYMBOL) || defined (SYM2) @@ -688,7 +789,7 @@ sc_useless_cpp_parens: # #if HAVE_HEADER_H that you remove, be sure that your project explicitly # requires the gnulib module that guarantees the usability of that header. gl_assured_headers_ = \ - cd $(gnulib_dir)/lib && echo *.in.h|sed 's/\.in\.h//g' + cd $(gnulib_dir)/lib && echo *.in.h|$(SED) 's/\.in\.h//g' # Convert the list of names to upper case, and replace each space with "|". az_ = abcdefghijklmnopqrstuvwxyz @@ -707,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='(#[ ]*ifn?def|\[ (]+HAVE_DECL_' \ + halt='HAVE_DECL macros are always defined' \ + $(_sc_search_regexp) + # ================================================================== gl_other_headers_ ?= \ intprops.h \ @@ -715,10 +821,13 @@ gl_other_headers_ ?= \ # Perl -lne code to extract "significant" cpp-defined symbols from a # gnulib header file, eliminating a few common false-positives. +# The exempted names below are defined only conditionally in gnulib, +# and hence sometimes must/may be defined in application code. gl_extract_significant_defines_ = \ /^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\ && $$2 !~ /(?:rpl_|_used_without_)/\ - && $$1 !~ /^(?:NSIG|ATTRIBUTE_NORETURN)$$/\ + && $$1 !~ /^(?:NSIG|ENODATA)$$/\ + && $$1 !~ /^(?:SA_RESETHAND|SA_RESTART)$$/\ and print $$1 # Create a list of regular expressions matching the names @@ -727,11 +836,11 @@ define def_sym_regex gen_h=$(gl_generated_headers_); \ (cd $(gnulib_dir)/lib; \ for f in *.in.h $(gl_other_headers_); do \ - perl -lne '$(gl_extract_significant_defines_)' $$f; \ + test -f $$f \ + && perl -lne '$(gl_extract_significant_defines_)' $$f; \ done; \ ) | sort -u \ - | grep -Ev '^ATTRIBUTE_NORETURN' \ - | sed 's/^/^ *# *(define|undef) */;s/$$/\\>/' + | $(SED) 's/^/^ *# *(define|undef) */;s/$$/\\>/' endef # Don't define macros that we already get from gnulib header files. @@ -796,7 +905,7 @@ sc_prohibit_cvs_keyword: # # This is a perl script that is expected to be the single-quoted argument # to a command-line "-le". The remaining arguments are file names. -# Print the name of each file that ends in exactly one newline byte. +# Print the name of each file that does not end in exactly one newline byte. # I.e., warn if there are blank lines (2 or more newlines), or if the # last byte is not a newline. However, currently we don't complain # about any file that contains exactly one byte. @@ -823,8 +932,8 @@ require_exactly_one_NL_at_EOF_ = \ END { exit defined $$fail } sc_prohibit_empty_lines_at_EOF: @perl -le '$(require_exactly_one_NL_at_EOF_)' $$($(VC_LIST_EXCEPT)) \ - || { echo '$(ME): empty line(s) or no newline at EOF' \ - 1>&2; exit 1; } || :; \ + || { echo '$(ME): empty line(s) or no newline at EOF' \ + 1>&2; exit 1; } || : # Make sure we don't use st_blocks. Use ST_NBLOCKS instead. # This is a bit of a kludge, since it prevents use of the string @@ -841,6 +950,57 @@ sc_prohibit_S_IS_definition: halt='do not define S_IS* macros; include ' \ $(_sc_search_regexp) +# Perl block to convert a match to FILE_NAME:LINENO:TEST, +# that is shared by two definitions below. +perl_filename_lineno_text_ = \ + -e ' {' \ + -e ' $$n = ($$` =~ tr/\n/\n/ + 1);' \ + -e ' ($$v = $$&) =~ s/\n/\\n/g;' \ + -e ' print "$$ARGV:$$n:$$v\n";' \ + -e ' }' + +prohibit_doubled_word_RE_ ?= \ + /\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims +prohibit_doubled_word_ = \ + -e 'while ($(prohibit_doubled_word_RE_))' \ + $(perl_filename_lineno_text_) + +# Define this to a regular expression that matches +# any filename:dd:match lines you want to ignore. +# The default is to ignore no matches. +ignore_doubled_word_match_RE_ ?= ^$$ + +sc_prohibit_doubled_word: + @perl -n -0777 $(prohibit_doubled_word_) $$($(VC_LIST_EXCEPT)) \ + | grep -vE '$(ignore_doubled_word_match_RE_)' \ + | grep . && { echo '$(ME): doubled words' 1>&2; exit 1; } || : + +# A regular expression matching undesirable combinations of words like +# "can not"; this matches them even when the two words appear on different +# lines, but not when there is an intervening delimiter like "#" or "*". +# Similarly undesirable, "See @xref{...}", since an @xref should start +# a sentence. Explicitly prohibit any prefix of "see" or "also". +# Also prohibit a prefix matching "\w+ +". +# @pxref gets the same see/also treatment and should be parenthesized; +# presume it must *not* start a sentence. +bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)\@xref\{ +bad_pxref_re_ ?= (?:[.!?]|(?:see|also))\s+\@pxref\{ +prohibit_undesirable_word_seq_RE_ ?= \ + /(?:\bcan\s+not\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims +prohibit_undesirable_word_seq_ = \ + -e 'while ($(prohibit_undesirable_word_seq_RE_))' \ + $(perl_filename_lineno_text_) +# Define this to a regular expression that matches +# any filename:dd:match lines you want to ignore. +# The default is to ignore no matches. +ignore_undesirable_word_sequence_RE_ ?= ^$$ + +sc_prohibit_undesirable_word_seq: + @perl -n -0777 $(prohibit_undesirable_word_seq_) \ + $$($(VC_LIST_EXCEPT)) \ + | grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \ + && { echo '$(ME): undesirable word sequence' >&2; exit 1; } || : + _ptm1 = use "test C1 && test C2", not "test C1 -''a C2" _ptm2 = use "test C1 || test C2", not "test C1 -''o C2" # Using test's -a and -o operators is not portable. @@ -888,18 +1048,18 @@ sc_redundant_const: $(_sc_search_regexp) sc_const_long_option: - @grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT)) \ - | grep -Ev 'const struct option|struct option const' && { \ - echo 1>&2 '$(ME): add "const" to the above declarations'; \ - exit 1; } || : + @prohibit='^ *static.*struct option ' \ + exclude='const struct option|struct option const' \ + halt='add "const" to the above declarations' \ + $(_sc_search_regexp) NEWS_hash = \ - $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \ + $$($(SED) -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \ $(srcdir)/NEWS \ | perl -0777 -pe \ 's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \ | md5sum - \ - | sed 's/ .*//') + | $(SED) 's/ .*//') # Ensure that we don't accidentally insert an entry into an old NEWS block. sc_immutable_NEWS: @@ -917,20 +1077,27 @@ update-NEWS-hash: NEWS # Ensure that we use only the standard $(VAR) notation, # not @...@ in Makefile.am, now that we can rely on automake # to emit a definition for each substituted variable. -# We use perl rather than "grep -nE ..." to exempt a single -# use of an @...@-delimited variable name in src/Makefile.am. +# However, there is still one case in which @VAR@ use is not just +# legitimate, but actually required: when augmenting an automake-defined +# variable with a prefix. For example, gettext uses this: +# MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@ +# otherwise, makeinfo would put German or French (current locale) +# navigation hints in the otherwise-English documentation. +# # Allow the package to add exceptions via a hook in cfg.mk; # for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by # setting this to ' && !/PRAGMA_SYSTEM_HEADER/'. _makefile_at_at_check_exceptions ?= sc_makefile_at_at_check: - @perl -ne '/\@[A-Z_0-9]+\@/'$(_makefile_at_at_check_exceptions) \ + @perl -ne '/\@\w+\@/' \ + -e ' && !/(\w+)\s+=.*\@\1\@$$/' \ + -e ''$(_makefile_at_at_check_exceptions) \ -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \ - $$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \ + $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \ && { 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 \ @@ -954,14 +1121,17 @@ 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) \ | grep -v '^src/false\.c$$' | sort > $@-1; \ files=; \ - for file in $$($(VC_LIST_EXCEPT)) $(srcdir)/lib/*.[ch]; do \ + for file in $$($(VC_LIST_EXCEPT)) $(generated_files); do \ test -r $$file || continue; \ case $$file in \ *.m4|*.mk) continue ;; \ @@ -975,8 +1145,8 @@ sc_po_check: esac; \ files="$$files $$file"; \ done; \ - grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \ - | sed 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \ + 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; }; \ rm -f $@-1 $@-2; \ @@ -984,24 +1154,28 @@ 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' +# path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'. +msg = 'Do not use ":" above; use $$(PATH_SEPARATOR) instead' sc_makefile_path_separator_check: @prohibit='PATH[=].*:' \ in_vc_files='akefile|\.mk$$' \ halt=$(msg) \ $(_sc_search_regexp) -# Check that `make alpha' will not fail at the end of the process. +# Check that 'make alpha' will not fail at the end of the process, +# 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 :; else \ - for file in $(distdir).tar.gz \ - $(release_archive_dir)/$(distdir).tar.gz; do \ - test -e $$file || continue; \ - test -w $$file \ - || { echo ERROR: $$file is not writable; fail=1; }; \ + $(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; \ + test -w $$p$$file \ + || { echo ERROR: $$p$$file is not writable; fail=1; }; \ + done; \ done; \ test "$$fail" && exit 1 || : ; \ + else :; \ fi v_etc_file = $(gnulib_dir)/lib/version-etc.c @@ -1018,7 +1192,7 @@ sc_copyright_check: in_vc_files=$(sample-test) \ halt='out of date copyright in $(sample-test); update it' \ $(_sc_search_regexp) - @require='Copyright @copyright\{\} .*'$$(date +%Y)' Free' \ + @require='Copyright @copyright\{\} .*'$$(date +%Y) \ in_vc_files=$(texi) \ halt='out of date copyright in $(texi); update it' \ $(_sc_search_regexp) @@ -1032,6 +1206,7 @@ sc_copyright_check: # the other init.sh-using tests also get it right. _hv_file ?= $(srcdir)/tests/help-version _hv_regex_weak ?= ^ *\. .*/init\.sh" +# Fix syntax-highlighters " _hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh" sc_cross_check_PATH_usage_in_tests: @if test -f $(_hv_file); then \ @@ -1049,6 +1224,16 @@ sc_cross_check_PATH_usage_in_tests: 1>&2; exit 1; } || :; \ fi +# BRE regex of file contents to identify a test script. +_test_script_regex ?= \ + +# In tests, use "compare expected actual", not the reverse. +sc_prohibit_reversed_compare_failure: + @prohibit='\ 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; \ @@ -1081,37 +1283,62 @@ vc-diff-check: rel-files = $(DIST_ARCHIVES) gnulib_dir ?= $(srcdir)/gnulib -gnulib-version = $$(cd $(gnulib_dir) && git describe) +gnulib-version = $$(cd $(gnulib_dir) \ + && { git describe || git rev-parse --short=10 HEAD; } ) bootstrap-tools ?= autoconf,automake,gnulib +gpgv = $$(gpgv2 --version >/dev/null && echo gpgv2 || echo gpgv) # 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) > .ann-sig \ - && gpgv .ann-sig - < /dev/null 2>&1 \ - | sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig) +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 -announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT) -announcement_mail_headers_ ?= \ -To: info-gnu@gnu.org \ -Cc: $(announcement_Cc_) \ -Mail-Followup-To: $(PACKAGE_BUGREPORT) +# Make info-gnu the default only for a stable release. +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) - @$(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) \ - --gnulib-version=$(gnulib-version) \ + $$(case ,$(bootstrap-tools), in (*,gnulib,*) \ + echo --gnulib-version=$(gnulib-version);; esac) \ --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. ## ## ---------------- ## @@ -1120,26 +1347,33 @@ 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 "$(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' 'post-release administrivia' '' \ - '* NEWS: Add header line for next release.' \ - '* .prev-version: Record previous version.' \ + printf '%s\n' 'maint: post-release administrivia' '' \ + '* NEWS: Add header line for next release.' \ + '* .prev-version: Record previous version.' \ '* cfg.mk (old_NEWS_hash): Auto-update.' 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; \ @@ -1157,10 +1391,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 \ @@ -1175,19 +1411,23 @@ 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 XZ_OPT=-9ev - $(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) _version + $(AM_V_GEN)$(MAKE) $(release-type) # Override this in cfg.mk if you follow different procedures. release-prep-hook ?= release-prep @@ -1195,19 +1435,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) -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. @@ -1215,14 +1455,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'; \ - $(SHELL) ../build-aux/gendocs.sh $(gendocs_options_) \ + $(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 @@ -1248,6 +1494,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) @@ -1259,7 +1530,8 @@ refresh-po: wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \ echo 'en@boldquot' > $(PODIR)/LINGUAS && \ echo 'en@quot' >> $(PODIR)/LINGUAS && \ - ls $(PODIR)/*.po | sed 's/\.po//' | sed 's,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS + ls $(PODIR)/*.po | $(SED) 's/\.po//;s,$(PODIR)/,,' | \ + sort >> $(PODIR)/LINGUAS # Running indent once is not idempotent, but running it twice is. INDENT_SOURCES ?= $(C_SOURCES) @@ -1281,6 +1553,108 @@ 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 $(build_aux)/$@ + | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@ + +# This tight_scope test is skipped with a warning if $(_gl_TS_headers) is not +# overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS. + +# NOTE: to override any _gl_TS_* default value, you must +# define the variable(s) using "export" in cfg.mk. +_gl_TS_dir ?= src + +ALL_RECURSIVE_TARGETS += sc_tight_scope +sc_tight_scope: tight-scope.mk + @fail=0; \ + if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk \ + > /dev/null \ + && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \ + > /dev/null 2>&1; then \ + echo '$(ME): skipping $@'; \ + else \ + $(MAKE) -s -C $(_gl_TS_dir) \ + -f Makefile \ + -f $(abs_top_srcdir)/cfg.mk \ + -f $(abs_top_builddir)/$< \ + _gl_tight_scope \ + || fail=1; \ + fi; \ + rm -f $<; \ + exit $$fail + +tight-scope.mk: $(ME) + @rm -f $@ $@-t + @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(srcdir)/$(ME) > $@-t + @chmod a=r $@-t && mv $@-t $@ + +ifeq (a,b) +# TS-start + +# Most functions should have static scope. +# Any that don't must be marked with 'extern', but 'main' +# and 'usage' are exceptions: they're always extern, but +# do not need to be marked. Symbols matching '__.*' are +# reserved by the compiler, so are automatically excluded below. +_gl_TS_unmarked_extern_functions ?= main usage +_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) *\(/ + +# If your project uses a macro like "XTERN", then put +# the following in cfg.mk to override this default: +# export _gl_TS_extern = extern|XTERN +_gl_TS_extern ?= extern + +# The second nm|grep checks for file-scope variables with 'extern' scope. +# Without gnulib's progname module, you might put program_name here. +# Symbols matching '__.*' are reserved by the compiler, +# so are automatically excluded below. +_gl_TS_unmarked_extern_vars ?= + +# NOTE: the _match variables are perl expressions -- not mere regular +# expressions -- so that you can extend them to match other patterns +# and easily extract matched variable names. +# For example, if your project declares some global variables via +# a macro like this: GLOBAL(type, var_name, initializer), then you +# can override this definition to automatically extract those names: +# export _gl_TS_var_match = \ +# /^(?:$(_gl_TS_extern)) .*?\**(\w+)(\[.*?\])?;/ || /\bGLOBAL\(.*?,\s*(.*?),/ +_gl_TS_var_match ?= /^(?:$(_gl_TS_extern)) .*?(\w+)(\[.*?\])?;/ + +# The names of object files in (or relative to) $(_gl_TS_dir). +_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) + t=exceptions-$$$$; \ + trap 's=$$?; rm -f $$t; exit $$s' 0; \ + for sig in 1 2 3 13 15; do \ + eval "trap 'v=`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \ + done; \ + src=`for f in $(SOURCES); do \ + test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ + hdr=`for f in $(_gl_TS_headers); do \ + test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ + ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_functions); \ + grep -h -A1 '^extern .*[^;]$$' $$src \ + | grep -vE '^(extern |--)' | $(SED) 's/ .*//'; \ + perl -lne \ + '$(_gl_TS_function_match) and print "^$$1\$$"' $$hdr; \ + ) | sort -u > $$t; \ + nm -e $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|grep -Ev -f $$t \ + && { 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 $(_gl_TS_other_headers) \ + ) | sort -u > $$t; \ + nm -e $(_gl_TS_obj_files) | $(SED) -n 's/.* [BCDGRS] //p' \ + | sort -u | grep -Ev -f $$t \ + && { echo the above variables should have static scope >&2; \ + exit 1; } || : +# TS-end +endif diff --git a/po/Makevars b/po/Makevars index 8ac3f44..e2b1e1d 100644 --- a/po/Makevars +++ b/po/Makevars @@ -38,4 +38,4 @@ MSGID_BUGS_ADDRESS = bug-findutils@gnu.org # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = +EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in index db624e0..859caa4 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,24 +1,56 @@ # List of source files containing translatable strings. -# Copyright (C) 2000, 2007, 2010 Free Software Foundation, Inc. +# Copyright (C) 2000, 2007, 2010, 2011 Free Software Foundation, Inc. # Copying and distribution of this file, with or without # modification, are permitted provided the copyright notice # and this notice are preserved. #Package source files +find/exec.c find/find.c +find/finddata.c find/fstype.c find/ftsfind.c find/parser.c find/pred.c +find/print.c find/tree.c find/util.c +gl/lib/argmatch.c +gl/lib/closein.c +gl/lib/closeout.c +gl/lib/error.c +gl/lib/fnmatch_loop.c +gl/lib/getopt.c +gl/lib/openat-die.c +gl/lib/parse-datetime.c +gl/lib/quotearg.c +gl/lib/rpmatch.c +gl/lib/strftime.c +gl/lib/version-etc.c +gl/lib/xalloc-die.c +gl/lib/xstrtol-error.c lib/buildcmd.c +lib/fdleak.c lib/findutils-version.c -lib/safe-atoi.c +lib/buildcmd.c +lib/dircallback.c +lib/extendbuf.c +lib/fdleak.c +lib/findutils-version.c +lib/forcefindlib.c +lib/listfile.c +lib/printquoted.c +lib/qmark.c +lib/regexprops.c lib/regextype.c +lib/safe-atoi.c +lib/splitstring.c +lib/test_splitstring.c +lib/waitpid.c +locate/bigram.c locate/code.c locate/frcode.c locate/locate.c locate/word_io.c -xargs/xargs.c +xargs/xargs.c \ No newline at end of file diff --git a/po/be.gmo b/po/be.gmo index 0da0c9f4723c93596eb475e710052ff0bf46b4b3..d53462b3aae4e073305a16cc1f5b758d7bf1d006 100644 GIT binary patch delta 919 zcmZY7J!n%=6u|M5m_)6uAN}%MpV2l{Of)rGE%jq^a1aEmh@`f~Akrp2GH~Jn4 zv5U5YR__t%z~87*^onf5rx?U4Zo#j(9e<*BZC)j^5nHhtLp6KQ&;9wDmr(o1u~j51 zSN~qfEnLToJnBG?(TC44fG=SX*r1u%^i0$|h_v0_rKWJkVO*DitJcbS?kwYHToI&mX1P@~o zkKiZlWPYhzBeD-qAcqWcT8~3`8gF9|7f};g#t8b?itNT19>fcH0PkW4zC^9m7t}<5 zU>|zws0#LDRx{JdNX8AucB6r_mi6CYsoiMdTu;+Mn`l~gEwPqeOTK}o!F+CL60DND zUns7-&-4ZRDkz({*s6DguBUDm-3KJ+u9r-Qy<=xX(&MycoJb_1oODh((wiDejf|z7 z%y?!rk#rL2^hjDR4h-M8<_x5--%KV_qZzIe-O_g@buP|%{Bm6S%N6g6ry&+T)D?~% zccRhm&aU!v-v>`N`2Q4U*1R(FwqPpet*M%lEjV_<=4g{P&x0lRk$GoIrfPF$(Y!Gw wF-4oV_jxm8C(IJP3y%B!JiRJ5r|IzFtR`e9&0L%sFyPem`#^hnA@JS%2WsP+M*si- delta 633 zcmZY6ze_?<6u|MLPqQCd=8ueiz9a>s_wp4&zbGMSl4yy9z_GQUA)>&w!7bX7AcBTQ zDH@|Ci24hXhS~y&mgc@kUJ-QQ___Ca-#zc1dmTTEmR};iVQJxQSZ$0@L__Hh$tTn!GfDc^t=W)DNm+jQVoVKtG_4C2Zgt7TQGI zTaYMoE!suu>9teZopw?~I~XFh#k$wuU>k|M54eS9w>VQX9BTcBw)ZEx8R-3K1WCHq w4CAQk-3`y1sU6d{ZDqk+G;1ZJ;R!ibHfK4GnVp%\n" "Language-Team: Belarusian \n" @@ -16,63 +16,99 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.0.2\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "немагчыма атрымаць бягучую тэчку" + +#: find/exec.c:256 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Cannot close standard input" msgstr "" -#: find/find.c:205 +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "немагчыма нарадзіць працэс" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "памылка чаканьня %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s завершаны сыгналам %d" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, c-format +msgid "The atexit library function failed" +msgstr "" + +#: find/find.c:263 #, fuzzy, c-format msgid "cannot stat current directory" msgstr "немагчыма атрымаць бягучую тэчку" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "" -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "" -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "немагчыма атрымаць бягучую тэчку" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -83,12 +119,12 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -98,12 +134,12 @@ msgid "" "searched." msgstr "" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "невядома" @@ -113,7 +149,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -123,12 +159,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "немагчыма атрымаць бягучую тэчку" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -136,7 +177,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -145,31 +186,31 @@ msgid "" "arguments.\n" msgstr "" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 #, fuzzy msgid "" "\n" @@ -182,7 +223,7 @@ msgstr "" "незаданыя):\n" " ( ВЫРАЗ ) ! ВЫРАЗ -not ВЫРАЗ ВЫРАЗ1 -a ВЫРАЗ2 ВЫРАЗ1 -and ВЫРАЗ2\n" -#: find/parser.c:1230 +#: find/parser.c:1225 #, fuzzy msgid "" "operators (decreasing precedence; -and is implicit where no others are " @@ -196,7 +237,7 @@ msgstr "" "незаданыя):\n" " ( ВЫРАЗ ) ! ВЫРАЗ -not ВЫРАЗ ВЫРАЗ1 -a ВЫРАЗ2 ВЫРАЗ1 -and ВЫРАЗ2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -205,7 +246,7 @@ msgid "" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -#: find/parser.c:1239 +#: find/parser.c:1234 #, fuzzy msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" @@ -218,10 +259,10 @@ msgstr "" " -ilname УЗОР -iname УЗОР -inum N -ipath УЗОР -iregex УЗОР\n" " -links N -lname УЗОР -mmin N -mtime N -name УЗОР -newer ФАЙЛ\n" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -230,11 +271,11 @@ msgstr "" " -size N[bckw] -true -type [bcdpfls] -uid N -used N -user НАЗВА\n" " -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -243,19 +284,19 @@ msgid "" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -265,47 +306,42 @@ msgid "" "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: выбар \"%s\" патрабуе довад\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, fuzzy, c-format msgid "invalid mode %s" msgstr "нерэчаісны рэжым \"%s\"" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -313,92 +349,100 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "нерэчаісны null-довад да -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "нерэчаісны від -size \"%c\"" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "нерэчаісны довад \"%s\" да \"%s\"" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "нерэчаісны довад \"%s\" да \"%s\"" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "увага: нераспазнаная службовая пасьлядоўнасьць \"\\%c\"" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "увага: нераспазнанае прадпісаньне фармату \"%%%c\"" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -406,329 +450,652 @@ msgid "" "entry from $PATH" msgstr "" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, fuzzy, c-format msgid "The environment is too large for exec()." msgstr "асяродзьдзе занадта вялікае для exec" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "немагчыма атрымаць бягучую тэчку" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 #, c-format -msgid "Cannot close standard input" +msgid "Failed to write prompt for -ok" msgstr "" -#: find/pred.c:2061 +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Failed to change directory" +msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:346 #, c-format -msgid "cannot fork" -msgstr "немагчыма нарадзіць працэс" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2123 +#: find/print.c:365 #, c-format -msgid "error waiting for %s" -msgstr "памылка чаканьня %s" +msgid "warning: unrecognized escape `\\%c'" +msgstr "увага: нераспазнаная службовая пасьлядоўнасьць \"\\%c\"" -#: find/pred.c:2132 +#: find/print.c:385 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s завершаны сыгналам %d" +msgid "error: %s at end of format string" +msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:409 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "увага: нераспазнанае прадпісаньне фармату \"%%%c\"" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "нерэчаісны выраз" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "" -#: find/tree.c:161 +#: find/tree.c:166 #, fuzzy, c-format msgid "invalid expression; you have too many ')'" msgstr "нерэчаісны выраз" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "" -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "" -#: find/tree.c:276 +#: find/tree.c:281 #, fuzzy, c-format msgid "oops -- invalid expression type (%d)!" msgstr "нерэчаісны выраз" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, fuzzy, c-format msgid "paths must precede expression: %s" msgstr "шлях мусіць папярэднічаць выразу" -#: find/tree.c:1297 +#: find/tree.c:1303 #, fuzzy, c-format msgid "unknown predicate `%s'" msgstr "нерэчаісны выказьнік \"%s\"" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "нерэчаісны выказьнік \"%s\"" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "нерэчаісны довад \"%s\" да \"%s\"" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "прапушчаны довад да \"%s\"" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "" -#: find/tree.c:1412 +#: find/tree.c:1418 #, fuzzy, c-format msgid "unexpected extra predicate '%s'" msgstr "нерэчаісны выказьнік \"%s\"" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "" -#: find/util.c:173 +#: find/util.c:177 #, fuzzy, c-format msgid "] [path...] [expression]\n" msgstr "Выкарыстаньне: %s [шлях...] [выраз]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "немагчыма атрымаць бягучую тэчку" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "немагчыма атрымаць бягучую тэчку" -#: find/util.c:816 +#: find/util.c:824 #, fuzzy, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "увага: нераспазнаная службовая пасьлядоўнасьць \"\\%c\"" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "нерэчаісны довад %s для \"%s\" " + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "неадназначны довад %s для \"%s\"" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Рэчаісныя довады:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Невядомая сыстэмная памылка" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: выбар \"%s\" ёсьць неадназначны\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: выбар \"--%s\" не дазваляе довад\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: выбар \"%c%s\" не дазваляе довад\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: выбар \"%s\" патрабуе довад\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: нераспазнаны выбар \"--%s\"\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: нераспазнаны выбар \"%c%s\"\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: нерэчаісны выбар -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: выбар патрабуе довад -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: выбар \"-W %s\" зьяўляецца неадназначным\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: выбар \"-W %s\" не дазваляе довад\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: выбар \"%s\" патрабуе довад\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "немагчыма атрымаць бягучую тэчку" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "немагчыма атрымаць бягучую тэчку" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "\"" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "\"" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[тТ]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[нН]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +#, fuzzy +msgid "memory exhausted" +msgstr "памяць вычарпаная" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "нерэчаісны довад %s для \"%s\" " + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "нерэчаісны довад %s для \"%s\" " + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "сьпіс довадаў занадта вялікі" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "загад занадта доўгі" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "сьпіс довадаў занадта вялікі" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU find вэрсыі %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "немагчыма атрымаць бягучую тэчку" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 #, c-format -msgid "Unexpected suffix %s on %s" +msgid "Unknown regular expression type %s; valid types are %s." msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:81 #, c-format -msgid "Expected an integer: %s" +msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/regextype.c:107 +#: lib/safe-atoi.c:87 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." +msgid "Expected an integer: %s" msgstr "" -#: locate/code.c:127 +#: locate/code.c:131 #, fuzzy, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" msgstr "Выкарыстаньне: %s most_common_bigrams < list > coded_list\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 #, fuzzy msgid "" "\n" @@ -737,83 +1104,78 @@ msgstr "" "\n" "Паведамляйце пра памылкі на ." -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "дзён" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, fuzzy, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "нерэчаісны довад %s для \"%s\" " -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "" msgstr[1] "" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -824,44 +1186,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -869,35 +1231,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -909,138 +1271,153 @@ msgid "" " pattern...\n" msgstr "" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, fuzzy, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "увага: база даньняў \"%s\" большая за %d %s" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "памылка чаканьня %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "асяродзьдзе занадта вялікае для exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1049,186 +1426,287 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "двайныя" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "адзінарныя" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "сьпіс довадаў занадта доўгі" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "немагчыма атрымаць бягучую тэчку" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: спынена сыгналам %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: пярэрвана сыгналам %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: нерэчаіснае значэньне для выбара -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, fuzzy, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: значэньне для выбара -%c мусіць быць >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, fuzzy, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: значэньне для выбара -%c мусіць быць < %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Выкарыстаньне: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-lines]]\n" -" [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-" -"str]]\n" -" [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n" -" [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n" -" [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n" -" [загад [пачатковыя довады]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "немагчыма атрымаць бягучую тэчку" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#, fuzzy -#~ msgid "invalid argument %s for %s" -#~ msgstr "нерэчаісны довад %s для \"%s\" " +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#, fuzzy -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "неадназначны довад %s для \"%s\"" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Рэчаісныя довады:" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Невядомая сыстэмная памылка" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: выбар \"%s\" ёсьць неадназначны\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: выбар \"--%s\" не дазваляе довад\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: выбар \"%c%s\" не дазваляе довад\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: выбар \"%s\" патрабуе довад\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: нераспазнаны выбар \"--%s\"\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: нераспазнаны выбар \"%c%s\"\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: нерэчаісны выбар -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: выбар патрабуе довад -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: выбар \"-W %s\" зьяўляецца неадназначным\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" #, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: выбар \"-W %s\" не дазваляе довад\n" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "GNU find вэрсыі %s\n" -#~ msgid "`" -#~ msgstr "\"" +#, fuzzy +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Выкарыстаньне: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-" +#~ "lines]]\n" +#~ " [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-" +#~ "str]]\n" +#~ " [--replace[=replace-str]] [--max-lines[=max-lines]] [--" +#~ "interactive]\n" +#~ " [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-" +#~ "procs]\n" +#~ " [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n" +#~ " [загад [пачатковыя довады]]\n" -#~ msgid "'" -#~ msgstr "\"" +#~ msgid "cannot get current directory" +#~ msgstr "немагчыма атрымаць бягучую тэчку" #~ msgid "Success" #~ msgstr "Пасьпяхова" @@ -1263,28 +1741,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "адсутнічае папярэдні сталы выраз" -#~ msgid "^[yY]" -#~ msgstr "^[тТ]" - -#~ msgid "^[nN]" -#~ msgstr "^[нН]" - -#, fuzzy -#~ msgid "memory exhausted" -#~ msgstr "памяць вычарпаная" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "нерэчаісны довад %s для \"%s\" " - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "нерэчаісны довад %s для \"%s\" " - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "сьпіс довадаў занадта вялікі" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: недапушчальны выбар -- %c\n" diff --git a/po/bg.gmo b/po/bg.gmo index 6b27f01fd8823d40f9c7975798462f1e86cfa5dd..ec04177e333f89e88c4c4d2d36a598417f61da7a 100644 GIT binary patch delta 3211 zcmZYB3rtmY9Ki7(4;572K0r_|3O-Oo5JeCa5b=S6ns3rT1q6kwJQCErsIy#_>8|D0 z(sJp_H}i^8CR%1Tn{-%i&00Q~Ix1adk7eoX`#a}WYyHRXe*XW%;eY;*-~U`re(iC! z)x&W;*!xwXY$PIxXm63DILwC+%FV7KNAMO7!R_5dwqi3*#?0;_dH5nG<24+FL4G3Z zF$MeJDU8N8?2o@;sE9+t{6)gKkcj$#JdDLU^uV_<5D#Dio|MOr~?Y7(@35#aa4l2Fdb8{5VhmiQ6JcXx-vgv8u|r^EWxR6kK$6= zfppSODfR)@8y z13iL+@hJY0>J@Gz#ZPE_R% zcETraJF)({HQi8G#t#{T#G>XvCZ=OOk|uH*bs!he8*gD}yc^E?>mJ?bf(|5r-gNJx zQLksCc2weS@5iCEKS90k0opK_-qn%F(+mH3Hq>|Ck zO1|T$H(W#VL}GagRY^si;R4j9U4^>zO{k~gImkzaprRwW$C=P289?Td*b<96fD|0UjZ;u(R2^;2d^>ibeGGMAr*Ix#!71Dy!_z0w zwhy#c%!RtOH*g%zBmwjoI(AUeW8=bGcnj~~1*WHacaSql{z((=qT|nSIu^1IySaXB z7@3Yabg~80hO^B05$b@J$Fq8P9*^Unn1F{znAaWh4V5%5gmRTZ%N*1Jt;140h~*fR zDB^|dF%TQD2zTOS{23Qw8b>7)cjHpLhT}0kNn{K@hokTmKBwpZ9+eC(lyh|k9!6GC z9-%%siv7`nyoCAq3+i#qPUanfb@%{7=w0oc!b=7p;zPW`^mWNEjkVsgotf<%+FP-m z=gV~}%kjf>j*=&P&)px>9+Sbc;bYYMT9}qTa9oyqW>`WyosF)*{m3N=&gMkn9E@hG zCQRfg(q5h;!eUFi+mK20`z9B%sW4c%je5NLv7R?^DxSlkQ%FoY`W`u{5|C@<#!$D( zs9Q4u^#PMm`>R78;0aufVbiPuZo@*_t<#v750&`oB7ASi7#xoik-U;E$l&D!YKOn$ z8cfU+A;07h>iySHw=RtRS%~Gh3@>6l#_~%Y*h17?+lG<&=?sVUZP&qt`CNEyCi}=t ze?S&Pyq@A44|B0UeueCkJVqVB*x4d`upH?^eAw8_xB%lYdalR{oP}(^v>@ptf8cDM zli=Wtu*&j0PcP!a=eU-30@Db@BN&BeQAd0OH*nt*)R}B}+FGGAsP}s;VzwBJS1}#G z^`yO6q?Y!hLXIz16Tw?rx`KPrUTnPy{Yym#^7}aC zvN;0~2|q#$J7FH5C?x-6 z0ii|nLuV4L4N4zklv%Uh^+D8o61pva7k1nHqU(X3iQ#dG7=&Ur^$R!~`rHtrH zBoLZRS~?M#X3hF0YgLm&i{^rsdO}Zz z7R~$#X3ffWJt>-0TCxe=KW4I$gXSw2%#!MMD(c>ASx$^FYu3qdtfQd`^9<3OC?vWN zS|W)`qJRh?iilN2IH9GAuxW*&IYWw=|Jjh-W*O>M6H||E1VNgaZ&8p8oj-|emX&-4 z5aq-i^U8leLTM(tFZIGKcU@1xAa`BiAecu~>s~~EVm(2=^1iqJ!;-EO>x!4w)|A;@ zo4UT|Ywe}=f9|ntD{%3XGrCWO8c5hTXlVPO>u>-xT?xt<;)E$b6yOO=rOlw zW!W-YQB`SeMR8?KHMQbY*Uj*Q9%*$bHM{n{SKV#owK4+ic$4%+1Xfv-Hud-8H7V2IaSVPFq|+e|uKs zTC+1w8oTWII>+{gy+Z4RcBS3$c}D;Kf8FWC8EK==+-FvYw{us@5YL!uXWsnYE{}Px GUVi~%T0py3qsq33_`w25%~rDQ)hl?8`4DHh8y7+c>jGO--pF; zKD-1M!>q0%li^x83cd;T%p@ED7k3jG0sSxw?u3~lF*!hIAQSIFRd5xKh3VZ9I1T2) zBB&dmg1UY$91c&y{_rxi;Vn26j_DyX3@(5c{5G5pe*o2>_u)|V%T+qPnCOJIDX>4( zgO@>7ydJ7&-h>aqv#<=N^mJJX%Nd`8_0Z<9!SEgU0Q?P9&!qGgse;qsB)AVAM!#I7 zQv!e32Y182!2;;*EAklJ3$MX1;Y9dJhI?>kKiA+Ta5VEf;BI&jz6NLG-`VgQRD-f{ zlLr>T^o}BLz?jDBDE(GeM9iS9`x(xi4?wmi}6UP3zza^!L`l&5#(}`fasR@p@!}n zEQVh}b@?I-WpF#xocagU?}M?1XiE^HQl1(Xb8ohX33b&WsII&THOsTeIJ_tOp&oPw zj)b2<3-%#V&ci&&7D*i;(xn4c0@aWl7ON+!AbBZ4s0M6?V_5fGjE-jG;rrbie*m@e zZa{VUm#_r(Bu)$1;D?2b6IiL9`T}amhGX4y_yWW>xd62qzJQnENJ{Fjurr%9WY;0- zB(a-xp6B2m<8T{%ja@JD;YPN|KjE|EMZO2?b3|T;opN1+-iA{dr%n+06)b>E$>&h# zhmomTEh`~+l$W6zbP86%>u`ijvdN3zP5(I5E$CV0JmOM_k2)a4qw1K~+3xnaFCm3f>D( zL!Ngz2f3{L9+F0qv7Fk6g-{jmfa~GAkhGF%xJlQqS%LpGHg7SZF}?*W;G>Uo!eLPN5S|YB-}Ej)UD$u;Bpl0hIn1BK1s4N9=}TDJB)X)c9XcP*L?>DLp8Vn zKE=9KP%rXPnd_N>WN4f7io(is%#>X zgLFd{A=)+}{Y=mOA%cRFjPdJWkvlCo$~02IR7Ed$i2rF^+GMaM%}hjHrHy=)38p84 zQ(7CBF$vWL_CP2A^ZaVe39V_v`3)l)2ApG_@q6II$ZEuGu6`5qXv-Y5k^7p*RG~>q za>``ACXzNULdBYYHm!p1BAS%iH0viLeGv`A21HvB(fsL&%s}-0G0)>5sE<%8(jOUs z6d>BjHS_0F3-gg&B!Fn%v^1?2ZG_+a(P)1#@&M8aDMKhClM5+OTOnfZZ_x=MBM{yS z^XN>2(~-`IHuBHZ_AHo(WFXo`Bcn{uO+@WZMSRF3I-o6fVcwGFuE8YDLoEX>p_0U( z)6S;EU+-R+HLK1ah+1_Kf3V7$w|IqB6|4*R%dB<2aKs-9S|cNAiBG#f*|}$VT{!Fu zMy(2e*jFA6g*V0<`)w}qS$E7^mElm0wJ}r|wnh}sTt43#9j*38Eq`R3753GH*7>Zg z>?|u3wgNtHg=(c64SW3o?U#oFp;65;IHxXJ>T?7(=4}n>^YV%RB1<|VO{F;v~QfhR!4n6s;-O_ei7jV_ufVbS&qS^0hKVi;jp77*s&+5;q-WB|FMaZ{%>?hj2*bFW8$U3FL&*hYv<(I zxw%%(l&N_SCZ>;_es8>fLNwzQr^z|toN|sh$DJd|dZ)oTX(hMBPe0T*H@VemvYeAn zLra#Mz7u!$IQzy~&OxU!S)bg(u3eh<;_Qh#Mg0<8C!X)o<>yYLb1bu{r1BeHIPqZ8=TJtu1+<+?wq)X2-|R%_zE3|7!M?`kz>?RmKK( zHeljO)NOS*(AaCCL`^=b^Okc6HBDHB-7LqhG2-lwr+YKvD+&t|Ifb93#OKUAmh-k|>Q$d?9gwZ(2V#c9BpL~|G9TTiSML@tud-&MEaJXEtgc-(KDA z501G$zkP$L`u|hWx1>h9Ow*^sE&O~mHCH~Bq$NwC68#3tW8BhO9rj&fQ5wH8FF&zx b{>L2?8y0?=8lSPeXZ*~h^u&SUeHs4-E$bs! diff --git a/po/bg.po b/po/bg.po index 1c73f8e..325b6e9 100644 --- a/po/bg.po +++ b/po/bg.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.3.7\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2007-06-25 14:40+0300\n" "Last-Translator: Anton Zinoviev \n" "Language-Team: Bulgarian \n" @@ -22,32 +22,68 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Неуспешна смяна на текущия каталог" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Не може да се затвори стандартният вход" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Неуспешна смяна на текущия каталог" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "не може да се създаде нов процес с fork" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "изчакване на грешка за %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s бе прекратен със сигнал %d" + +#: find/find.c:203 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to initialize shared-file hash table" msgstr "" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "проверката на библиотечната функция fnmatch() за правилност пропадна. " + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "не може да се прочетат атрибутите на текущия каталог" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "Внимание: файловата система %s бе размонтирана неотдавна." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "Внимание: файловата система %s бе монтирана неотдавна." -#: find/find.c:491 +#: find/find.c:550 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -56,7 +92,7 @@ msgstr "" "%s%s е изменен по време на изпълнението на %s (стар номер на устройство %ld, " "нов номер на устройство %ld, типът на файловата система е %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -65,17 +101,17 @@ msgstr "" "%s%s е изменен по време на изпълнението на %s (стар номер на i-възел %ld, " "нов номер на i-възел %ld, типът на файловата система е %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "Неуспешна смяна на текущия каталог" -#: find/find.c:980 +#: find/find.c:1038 #, fuzzy, c-format msgid "Failed to safely change directory into %s" msgstr "Неуспешна смяна на текущия каталог" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -84,7 +120,7 @@ msgstr "" "Символната връзка „%s“ е част от цикъл в йерархията на каталозите; соченият " "каталог вече е бил посещаван." -#: find/find.c:1097 +#: find/find.c:1157 #, fuzzy, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -99,12 +135,12 @@ msgstr[1] "" "Открит бе цикъл във файловата система; „%s“ има същия номер на устройство и " "i-възел като каталога, който е %d %s." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "внимание: символната връзка %s не се следва" -#: find/find.c:1386 +#: find/find.c:1480 #, fuzzy, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -119,12 +155,12 @@ msgstr "" "опцията „-noleaf“ на find. В предходните резултати може и да са били " "пропуснати по погрешка някои каталози." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "непознат" @@ -136,7 +172,7 @@ msgstr "" "Открит бе цикъл във файловата система; „%s“ има същия номер на устройство и " "i-възел като каталога, който е %d %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, fuzzy, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "Внимание: изглежда, че файлът %s има режим 0000" @@ -146,12 +182,17 @@ msgstr "Внимание: изглежда, че файлът %s има режи msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "Неуспешна смяна на текущия каталог" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -159,7 +200,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -172,7 +213,7 @@ msgstr "" "на тестовете след нея). Моля, задавайте опциите преди всички други " "аргументи.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -181,7 +222,7 @@ msgstr "" "внимание: опцията „-d“ е остаряла; моля, вместо нея използвайте „-depth“ тъй " "като тази опция е според стандарта POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -190,17 +231,17 @@ msgstr "" "%s не е име на съществуваща група и не изглежда като номер на група, защото " "има неочакван суфикс %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s не е име на съществуваща група" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "аргументът на -group е празен, а трябва да бъде име на група" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -211,7 +252,7 @@ msgstr "" "print“\n" "изразът се състои от оператори, опции, тестове и действия:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -224,7 +265,7 @@ msgstr "" "ИЗРАЗ2\n" " ИЗРАЗ1 -o ИЗРАЗ2 ИЗРАЗ1 -or ИЗРАЗ2 ИЗРАЗ1 , ИЗРАЗ2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -238,7 +279,7 @@ msgstr "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -253,10 +294,10 @@ msgstr "" "ОБРАЗЕЦ\n" " -links N -lname ОБРАЗЕЦ -mmin N -mtime N -name ОБРАЗЕЦ -newer ФАЙЛ" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -266,11 +307,11 @@ msgstr "" " -wholename ОБРАЗЕЦ -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user ИМЕ -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -284,7 +325,7 @@ msgstr "" " -exec КОМАНДА ; -exec КОМАНДА {} + -ok КОМАНДА ;\n" " -execdir КОМАНДА ; -execdir КОМАНДА {} + -okdir КОМАНДА ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -296,12 +337,12 @@ msgstr "" "чрез електронно писмо до . За грешки в\n" "българския превод съобщавайте на ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "проверката на библиотечната функция fnmatch() за правилност пропадна. " -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -317,48 +358,43 @@ msgstr "" "или може би тестът „-samefile“. Или пък ако е инсталирана версията на grep " "на ГНУ, може да използвате „find ... -print0 | grep -FzZ %s“." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" "Очаква се положително цяло десетично число като аргумент на %s, а не %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "Тази система не дава начин да се намери времето на раждане на файл." -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: опцията „%s“ изисква аргумент\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Не е ясно как %s може да се интерпретира като дата или време" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Не може да се получи времето на раждане на файла %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "неправилен режим %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -370,22 +406,22 @@ msgstr "" "-000, т.е. докато в миналото на него не пасваше нито един файл, в момента му " "пасват всички файлове." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "недопустим празен аргумент на -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "неправилен тип „%c“ на -size" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "неправилен аргумент „%s%c“ за -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -393,74 +429,82 @@ msgstr "" "Опцията -show-control-chars приема единствен аргумент, който трябва да бъде " "„literal“ или „safe“" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Недопустим аргумент %s за -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, fuzzy, c-format msgid "%s is not the name of a known user" msgstr "%s не е име на съществуваща група" -#: find/parser.c:2678 +#: find/parser.c:2614 #, fuzzy, c-format msgid "The argument to -user should not be empty" msgstr "Аргументите на -type трябва да съдържат само една буква" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Разрешени свойства:" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Аргументите на -type трябва да съдържат само една буква" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Непознат аргумент на -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "внимание: непозната обратно наклонена черта „\\%c“" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "грешка: %s в края на форматен низ" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "внимание: непозната форматна директива „%%%c“" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "грешка: форматната директива „%%%c“ е запазена за бъдеща употреба" +msgid "Unknown argument to -type: %c" +msgstr "Непознат аргумент на -type: %c" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Текущият каталог е включен в променливата от обкръжението PATH, което е " "несигурно при използване на действието %s на find. Моля, премахнете текущия " "каталог от $PATH (т.е. премахнете „.“ или началните или крайни двоеточия)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -471,7 +515,7 @@ msgstr "" "е несигурно при използване на действието %s на find. Моля, премахнете този " "елемент от $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -480,95 +524,101 @@ msgstr "" "Не може да използвате {} при името на команда за -execdir и -okdir, тъй като " "това създава проблем със сигурността." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "С -exec%s ... + е позволено само едно използване на {}" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Обкръжението е твърде голямо за exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, fuzzy, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "аритметично препълване при опит да се пресметне краят на днес" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "аритметично препълване при опит да се пресметне краят на днес" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "стандартна грешка" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "стандартен изход" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "Неуспешна смяна на текущия каталог" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "Внимание: не може да се намери времето на раждане на файла %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "стандартен изход" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Не може да се затвори стандартният вход" +msgid "getfilecon failed: %s" +msgstr "" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Неуспешна смяна на текущия каталог" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "не може да се създаде нов процес с fork" +msgid "warning: unrecognized escape `\\%c'" +msgstr "внимание: непозната обратно наклонена черта „\\%c“" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "изчакване на грешка за %s" +msgid "error: %s at end of format string" +msgstr "грешка: %s в края на форматен низ" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s бе прекратен със сигнал %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "грешка: форматната директива „%%%c“ е запазена за бъдеща употреба" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "внимание: непозната форматна директива „%%%c“" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "неправилен израз" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -576,22 +626,22 @@ msgid "" msgstr "" "неправилен израз; използвали сте двуместният оператор „%s“ с нищо преди него." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "между „%s“ и „)“ се очакваше израз" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "след „%s“ се очаква израз" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "неправилен израз; има твърде много „)“" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -600,12 +650,12 @@ msgstr "" "неправилен израз; очакваше се някъде да се срещне затваряща скоба „)“, но " "такава не бе открита. Вероятно след „%s“ има нужда от допълнителен предикат." -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "неправилен израз; не се позволяват празни скоби." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -614,114 +664,114 @@ msgstr "" "неправилен израз; очакваше се някъде да се срещне затваряща скоба „)“, но " "такава не бе открита." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "Опа! Неправилен тип на израза!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "Опа! Неправилен тип на израза (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "пътищата трябва да предхождат израза: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "непознат предикат „%s“" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "неправилен предикат „%s“" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "неправилен аргумент „%s“ за „%s“" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "липсващ аргумент за „%s“" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "има твърде много „)“" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "неочакван допълнителен предикат „%s“" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "неочакван допълнителен предикат" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "Опа! Неправилно вмъкване по подразбиране на оператор „И“!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Използване: %s [-H] [-L] [-P] [-Oниво] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [път...] [израз]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "не може да се установи текущият каталог" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "не може да се установи текущият каталог" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Пренебрегва се непознатият флаг за програмно тестване %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Празен аргумент за опцията -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "Опцията -O трябва непосредствено да се следва от десетично цяло число." -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Моля, задайте десетично цяло число непосредствено след -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Нреправилно ниво за оптимизация %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -730,7 +780,7 @@ msgstr "" "Нивото за оптимизация %lu е твърде високо. Ако желаете да намирате " "файловете много бързо, обмислете да използвате locate на ГНУ." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -739,64 +789,382 @@ msgstr "" "Променливата от обкръжението FIND_BLOCK_SIZE не се поддържа. Единственото " "нещо, което влияе на размера на блока, е променливата POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "недопустим аргумент %s за %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "двусмислен аргумент %s за %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Допустими аргументи са:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "грешка при запис" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Непозната системна грешка" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: опцията „%s“ е двусмислена\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: опцията „--%s“ не допуска аргумент\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: опцията „%c%s“ не допуска аргумент\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: опцията „%s“ изисква аргумент\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: непозната опция „--%s“\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: непозната опция „%c%s“\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: неправилна опция -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: опцията изисква аргумент -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: опцията „-W %s“ е двусмислена\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: опцията „-W %s“ не допуска аргумент\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: опцията „%s“ изисква аргумент\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "не може да се установи текущият каталог" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "не може да се установи текущият каталог" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "„" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "“" + +# Клавишът О (латинско) генерира "Д" според подредбата по БДС +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[дДoOyY]" + +# Клавишът K (латинско) генерира "Н" според подредбата по БДС +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[нНkKnN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "неправилен аргумент „%s“ за „%s“" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "неправилен аргумент „%s“ за „%s“" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "реда с аргументи е твърде дълъг" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, fuzzy, c-format msgid "argument list too long" msgstr "реда с аргументи е твърде дълъг" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "стандартен изход" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Компилиран с използването на gnulib на ГНУ, версия %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "" -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, fuzzy, c-format msgid "Unexpected suffix %s on %s" msgstr "неочакван допълнителен предикат „%s“" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "след „%s“ се очаква израз" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -805,8 +1173,8 @@ msgstr "" "Използване: %s [--version | --help]\n" "или %s най-чести_биграми < файлов-списък > база-данни-на-locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -815,85 +1183,80 @@ msgstr "" "Докладвайте за грешки на .\n" "За грешки в българския превод на .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "грешка при запис" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, fuzzy, c-format msgid "Failed to write to standard output" msgstr "стандартен изход" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "дена" -#: locate/locate.c:193 +#: locate/locate.c:186 #, fuzzy, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "Аргументът на опцията --max-database-age не трябва да бъде празен" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "недопустим аргумент %s за опцията --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "базата данни на locate (%s) съдържа файлово име, по-дълго от това, с което " "locate може да работи" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "базата данни %s на locate е повредена или грешна" -#: locate/locate.c:893 +#: locate/locate.c:860 #, fuzzy, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Размер на базата данни на locate: %s байта\n" msgstr[1] "Размер на базата данни на locate: %s байта\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, fuzzy, c-format msgid "Matching Filenames: %s\n" msgstr "Пасващи файлови имена: %s " -#: locate/locate.c:901 +#: locate/locate.c:868 #, fuzzy, c-format msgid "All Filenames: %s\n" msgstr "Всички файлови имена: %s " -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -904,7 +1267,7 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -913,17 +1276,17 @@ msgstr "" "Някои файлови имена може да са били филтрирани, поради което не може да се " "пресметне степента на компресия.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Степен на компресия %4.2f%% (по-голямото число е по-добре)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Степен на компресия: неопределена\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -932,7 +1295,7 @@ msgstr "" "базата данни на locate (%s) изглежда от тип slocate, но има ниво на " "сигурност %c, което в момента не се поддържа от GNU findutils" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -941,7 +1304,7 @@ msgstr "" "%s е база данни от тип slocate. Поддръжката за такъв тип е от скоро и е " "възможно да има проблеми." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -949,7 +1312,7 @@ msgstr "" "%s е база данни от тип slocate с неподдържано ниво на сигурност %d; пропуска " "се." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -960,36 +1323,36 @@ msgstr "" "slocate с ненулево ниво на сигурност. Няма да бъдат генерирани резултати от " "тази база данни.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s е база данни тип slocate. Включва се опцията „-e“." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "Старият формат на базата данни %s на locate е твърде къс, за да бъде валиден" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Форматът на базата данни %s е %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Базата данни е с кодиране на машинните думи тип little-endian.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "Базата данни е с кодиране на машинните думи тип big-endian.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Типа на кодиране на машинните думи в базата данни не е ясен.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, fuzzy, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1009,63 +1372,63 @@ msgstr "" " [--max-database-age D] [-version] [--help]\n" " образец...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "не може да се анулират груповите привилегии" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "не може да се анулират привилегиите на потребител (seguid)" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Привилегиите не може да се анулират напълно" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "не може да се анулират привилегиите за група (setgid)" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "внимание: базата данни на locate може да се чете от стандартния вход само " "веднъж." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "внимание: базата данни %s е по-стара от %d %s (точната възраст е %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, fuzzy, c-format msgid "unexpected EOF in %s" msgstr "неочакван допълнителен предикат „%s“" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "изчакване на грешка за %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" "Неправилна поредица с обратно наклонена черта %s в описанието на входния " "разделител." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1074,7 +1437,7 @@ msgstr "" "Неправилна поредица с обратно наклонена черта %s в описанието на входния " "разделител; стойностите на знаците не може да превишават %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1083,7 +1446,7 @@ msgstr "" "Неправилна поредица с обратно наклонена черта %s в описанието на входния " "разделител; стойностите на знаците не може да превишават %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1092,7 +1455,7 @@ msgstr "" "Неправилна поредица с обратно наклонена черта %s в описанието на входния " "разделител; крайните знаци %s не са познати." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1101,46 +1464,61 @@ msgstr "" "Неправилно описание на входния разделител %s: разделителят трябва да бъде " "или единичен знак, или поредица с обратно наклонена черта „\\“." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "обкръжението е твърде голямо за exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, fuzzy, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "внимание: стойността %ld за опцията -s е твърде голяма, вместо нея се " "използва %ld" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Не може да се отвори входният файл %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "Променливите на обкръжението заемат %lu байта\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" "Горна граница на дължината на аргументите според POSIX при тази система: " "%lu\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1149,17 +1527,17 @@ msgstr "" "Най-малка долна граница на дължината на ргументите при всички системи според " "POSIX: %lu\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Максимална дължина на командата, която може да се използва: %ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Размер на командния буфер, който действително се използва: %lu\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1172,7 +1550,7 @@ msgstr "" "четат командите. Ако това не е каквото искате да се случи, моля въведете " "управляващия код за край на файл (Control-D).\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1181,7 +1559,7 @@ msgstr "" "Внимание: %s ще се изпълни поне веднъж. Ако не искате това да се случва, " "натиснете управляващия символ за прекъсване (Control-C).\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1191,16 +1569,16 @@ msgstr "" "специални за xargs, освен ако използвате опцията -0" # CHECK: да се провери използва ли се другаде, освен в xargs/xargs.c -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "Двойна" # CHECK: да се провери използва ли се другаде, освен в xargs/xargs.c -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "Единична" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, fuzzy, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1210,159 +1588,257 @@ msgstr "" "предаден в списъка на аргументите. Може би ще искате да използвате опцията " "--null option." -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "реда с аргументи е твърде дълъг" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "стандартен изход" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "стандартен изход" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "грешка при очакване на дъщерен процес" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: завърши с код 255; прекратяване" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: спрян със сигнал %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: прекратен със сигнал %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: неправилно число за опцията -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: стойността на опцията -%c трябва да бъде не по-малка от %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: стойността на опцията -%c трябва да бъде по-малка от < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Използване: %s [-0prtx] [--interactive] [--null] [-d|--" -"delimiter=разделител]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=низ-за-край-на-файла]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=брой-редове]]\n" -" [-I replace-str] [-i[низ-за-замяна]] [--replace[=низ-за-замяна]]\n" -" [-n макс-брой-аргументи] [--max-args=макс-брой-аргументи]\n" -" [-s макс-брой-знаци] [--max-chars=макс-брой-знаци]\n" -" [-P макс-брой-процеси] [--max-procs=макс-брой-процеси] [--show-" -"limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=файл]\n" -" [--version] [--help] [команда [начални-аргументи]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "не може да се установи текущият каталог" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "недопустим аргумент %s за %s" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "двусмислен аргумент %s за %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Допустими аргументи са:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Непозната системна грешка" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: опцията „%s“ е двусмислена\n" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: опцията „--%s“ не допуска аргумент\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: опцията „%c%s“ не допуска аргумент\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: опцията „%s“ изисква аргумент\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: непозната опция „--%s“\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: непозната опция „%c%s“\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: неправилна опция -- %c\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: опцията изисква аргумент -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: опцията „-W %s“ е двусмислена\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: опцията „-W %s“ не допуска аргумент\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" -#~ msgid "`" -#~ msgstr "„" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" -#~ msgid "'" -#~ msgstr "“" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Компилиран с използването на gnulib на ГНУ, версия %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Използване: %s [-0prtx] [--interactive] [--null] [-d|--" +#~ "delimiter=разделител]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=низ-за-край-на-файла]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=брой-редове]]\n" +#~ " [-I replace-str] [-i[низ-за-замяна]] [--replace[=низ-за-замяна]]\n" +#~ " [-n макс-брой-аргументи] [--max-args=макс-брой-аргументи]\n" +#~ " [-s макс-брой-знаци] [--max-chars=макс-брой-знаци]\n" +#~ " [-P макс-брой-процеси] [--max-procs=макс-брой-процеси] [--show-" +#~ "limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=файл]\n" +#~ " [--version] [--help] [команда [начални-аргументи]]\n" + +#~ msgid "cannot get current directory" +#~ msgstr "не може да се установи текущият каталог" #, fuzzy #~ msgid "Invalid regular expression" @@ -1376,26 +1852,6 @@ msgstr "" #~ msgid "Invalid preceding regular expression" #~ msgstr "неправилен израз" -# Клавишът О (латинско) генерира "Д" според подредбата по БДС -#~ msgid "^[yY]" -#~ msgstr "^[дДoOyY]" - -# Клавишът K (латинско) генерира "Н" според подредбата по БДС -#~ msgid "^[nN]" -#~ msgstr "^[нНkKnN]" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "неправилен аргумент „%s“ за „%s“" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "неправилен аргумент „%s“ за „%s“" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "реда с аргументи е твърде дълъг" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: неправилна опция -- %c\n" diff --git a/po/ca.gmo b/po/ca.gmo index 9b8894f54d56a9f63004f18e559b9d650218189f..94ee0a1095f479053239435156dc94c8f6054ebd 100644 GIT binary patch delta 1850 zcmYk+Yitx%6u|MbeXzUqK}!KEwPn`QF0F3u)@mQpidAAvl&GyJHe1WAcPU6Xu0|AjK`p@7ll%Pl-?8f);1AH9k zmW!;y@+y&WY((v6a1Qq%bC*9$`l@w8IT1e%jXa2Ju)X9E@~n)Z&Uia&Qs$7LWG51V z+>1KUbGQ!Q!SnD0YNme1X7ty1fwtj|^!u@c@nsK<7A&An;B(Xge?m>^AE>Eps1<3$ zAvACbKg0VmNNz`0h+IxT#>+avC$NM22T&(+te#2W8N3zGVeUE}*hKy>;>N=bUaH>1 zVfq^gOV@T9Bl5680tj(Tgd-?G{(rkZjLWXeuX-r(-^|t=T7X9JkQ_wbk1j!;Id={oH06IzWa6;{?gGxEmL6k_S55y$S9Oi|ptA zhd6;Z@KP_nhPs5`;aZ+=AZ&2=69|vHMYE+DCG+m_b#LnV=lgC1dP5^NsFzW%q-sP% zRQ>0)iORCOX#=+ma}83k*sJyqA9J?$1f(i&(DwUzPRqHCuAe6(;{ z+!SBs_Ph&6*xgv#V^7Kml|$ebGAp%IU2iR#jREQvRNZ7fR6kXhS2L!CWVxkHcdMRR zEg=v0>}pewik=2N0h}ba=w8u{Hdv^vJmm9*3k%Cy%k%Fp-`8N>Wu@=73}@cSm?^`w z?X;aAsfw-I8lOofjJQ3WO_^54p=A!{4^}yy6XVvFm`se%Z;Q!xiKix$)7f-ZAMhSE z+8pD~v<>;X>Qlj`-pT48R+y=@J#U!z?1*O>FHtyBQyr-3jdb@#q60=WI@r@!IKFzZ ztZeaUVSi(^BL8~xW0BGDj<_*vrxV%Y;f#^Byh$1f)0s+J=5#hgbH;Fz8bCb1u_e>A zd1h%kjBgJoIna)>*{>1 rL}H~4{n`8Ce?KpMARi5_$=_`JR&ShE!bAA z)b%)w(r*lJz~i_P&tW^hkIhPz)HhUarQtG;V^2-&NzC&6E1tk3Nu`Fcg70Eutx`YZ zr+5nAsZ;6!++VNMG|uB@Y+4`Ng*2(#Q5JF+CYWD6NQJqTfwHnZUW?CQ8_wev{0LK6 zK~}DQ$5Bi+#5=tYxAFWK%EYgsMC84d-!I}$p0A+B^aiCaFu&SQrIxTaH!5`t&s$lZ zEa)(H(|$in$RBS~ieRXDya&(XL4N-SZ{+#lHSx}icpJ|@p`@mR-So=u_#@8Z!}L44 ziTL-^@FB~c!^i zzy!X8oJ;jG%EHbdf9e9acD&S9ibJ$fbMR;wK%$}^!FzEA`|u0w!oQI})k$yGphj>2 zCvg|fp`7;5a2fx=RFzU6lZU%`{(gI$+I~KrKH7&%RAk^u;>`h8&*P&whvU4E>WCM1 zqEo3CXkWmG@D4iNjPocd_zGKjznX1A6b(?da-$?;6lXR{rJNT@A^VTZAnfImMcl+i z1{8Be-}r8n!g-2zJA`te_HfDMk~;Z!ArX|q0gpB%bxDInl%o@UcBDQEJ^PYUiVm98 zYPckH|1AsOTVX>d`yLMzrb7 zSf1+?BWZb2V&i=N&QEu<^R8v#@HT4a}gn&FqJ)^MnPU-)#r7j~?#ge?sh%YQZ0B^&yCGlRYT{W`OI z&){&mdGq3$a-}7c*nYrXjg2K6C>pjl{b1>pC`wCZb`?&iwv-4_k2Y;REiWvclOX!$ zB#SmzQ`maSBdOMu#gD|^u)D+R)T!{3lpl_5E0q&%jaB7g MU0+o`(*AYwUl;H\n" "Language-Team: Catalan \n" @@ -16,32 +16,70 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "no es pot obtenir el directori actual" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "no es pot fer «fork»" + +# Suggerències? jm +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "error a l'esperar al procés %s" + +#: find/exec.c:352 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "%s terminated by signal %d" +msgstr "%s finalitzat pel senyal %d" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" msgstr "" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "" +"la comprovació de sanitat de la funció fnmatch() de la biblioteca ha fallat." + +#: find/find.c:263 #, fuzzy, c-format msgid "cannot stat current directory" msgstr "no es pot obtenir el directori actual" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "Avís: el sistema de fitxers %s ha estat desmuntat fa poc." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "Avís: el sistema de fitxers %s ha estat muntat fa poc." -#: find/find.c:491 +#: find/find.c:550 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -51,7 +89,7 @@ msgstr "" "%ld, el número del nou dispositiu és %ld, el tipus de sistema de fitxers és " "%s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -61,17 +99,17 @@ msgstr "" "el número del node-i nou és %ld, el tipus de sistema de fitxers és %s) [ref " "%ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "no es pot obtenir el directori actual" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, fuzzy, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -80,7 +118,7 @@ msgstr "" "L'enllaç simbòlic «%s» és part d'un bucle a la jerarquia del directori. Ja " "hem visitat el directori al qual apunta." -#: find/find.c:1097 +#: find/find.c:1157 #, fuzzy, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -95,12 +133,12 @@ msgstr[1] "" "S'ha detectat un bucle al sistema de fitxers; «%s» té el mateix número de " "dispositiu i node d'idenficació que un directori que és %d %s." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "avís: no es seguirà l'enllaç simbòlic %s" -#: find/find.c:1386 +#: find/find.c:1480 #, fuzzy, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -114,12 +152,12 @@ msgstr "" "automàticament l'opció -noleaf. Els resultats anteriors poden no haver " "inclós directoris que s'haurien d'haver cercat." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "desconegut" @@ -131,7 +169,7 @@ msgstr "" "S'ha detectat un bucle al sistema de fitxers; «%s» té el mateix número de " "dispositiu i node d'idenficació que un directori que és %d %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -141,12 +179,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "no es pot obtenir el directori actual" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -154,7 +197,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -167,7 +210,7 @@ msgstr "" "abans d'ella com també aquelles especificades després d'ella). Si us plau, " "especifiqueu les opcions abans d'altres arguments.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -176,24 +219,24 @@ msgstr "" "avís: l'opció -d està desaconsellada; si us plau, utilitzeu -depth en el seu " "lloc, ja que aquesta és una funcionalitat que compleix amb POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -204,7 +247,7 @@ msgstr "" "print\n" "l'expressió pot consistir d'operadors, opcions, avaluacions i accions:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -215,7 +258,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -229,7 +272,7 @@ msgstr "" " -depth -help -maxdepth NIVELLS -mindepth NIVELLS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -243,10 +286,10 @@ msgstr "" " -ilname PATRÓ -iname PATRÓ -inum N -iwholename PATRÓ -iregex PATRÓ\n" " -links N -lname PATRÓ -mmin N -mtime N -name PATRÓ -newer FITXER" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -255,11 +298,11 @@ msgstr "" " -wholename PATRÓ -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NOM -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -273,7 +316,7 @@ msgstr "" " -exec ORDRE ; -exec ORDRE {} + -ok ORDRE ;\n" " -execdir ORDRE ; -execdir ORDRE {} + -okdir ORDRE ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -284,13 +327,13 @@ msgstr "" "pàgina d'informes d'error de findutils en http://savannah.gnu.org/ o, si no\n" "teniu accés a la web, enviant correu a ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "" "la comprovació de sanitat de la funció fnmatch() de la biblioteca ha fallat." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -305,47 +348,42 @@ msgstr "" "«-samefile». Alternativament, si esteu utilitzant GNU grep, podeu utilitzar " "«find ... -print0 | grep -FzZ %s»." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: l'opció «%s» requereix un argument\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, fuzzy, c-format msgid "Cannot obtain birth time of file %s" msgstr "No s'ha pogut obrir el fitxer d'entrada «%s»" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, fuzzy, c-format msgid "invalid mode %s" msgstr "el mode «%s» no és vàlid" -#: find/parser.c:2058 +#: find/parser.c:2010 #, fuzzy, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -357,96 +395,104 @@ msgstr "" "perm -000; això vol dir, de moment no concorda amb cap fitxer, però prompte " "canviarà per a que concorde amb tots." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "l'argument nul no és vàlid per a -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "el tipus de -size «%c» no vàlid" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "l'argument «%s» no és vàlid per a «%s»" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "l'argument %s no és vàlid per a %s" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Funcionalitats habilitades: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "avís: seqüència d'escapament «\\%c» no reconegut" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "avís: directiva de format «%%%c» no reconeguda" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "El directori actual està inclós a la variable d'entorn PATH, el qual és " "insegur en combinació amb l'acció %s de find. Elimineu el directori actual " "del vostre $PATH (és a dir, elimineu «.» o els dos punts del principi o " "final)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, fuzzy, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -458,7 +504,7 @@ msgstr "" "del vostre $PATH (és a dir, elimineu «.» o els dos punts del principi o " "final)" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -467,96 +513,101 @@ msgstr "" "No pdeu utilitzar {} dins del nom de la utilitat per a -execdir i -okdir, ja " "que això és un problema de seguretat potencial." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Només es suporta una instància de {} amb -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, fuzzy, c-format msgid "The environment is too large for exec()." msgstr "l'entorn és massa gran per a l'execució" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "no es pot obtenir el directori actual" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "No s'ha pogut obrir el fitxer d'entrada «%s»" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ?" -#: find/pred.c:2032 +#: find/pred.c:784 #, c-format -msgid "Cannot close standard input" +msgid "Failed to write prompt for -ok" msgstr "" -#: find/pred.c:2061 +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Failed to change directory" +msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:346 #, c-format -msgid "cannot fork" -msgstr "no es pot fer «fork»" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -# Suggerències? jm -#: find/pred.c:2123 +#: find/print.c:365 #, c-format -msgid "error waiting for %s" -msgstr "error a l'esperar al procés %s" +msgid "warning: unrecognized escape `\\%c'" +msgstr "avís: seqüència d'escapament «\\%c» no reconegut" -#: find/pred.c:2132 +#: find/print.c:385 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s finalitzat pel senyal %d" +msgid "error: %s at end of format string" +msgstr "" + +#: find/print.c:409 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "avís: directiva de format «%%%c» no reconeguda" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "expressió no vàlida" -#: find/tree.c:135 +#: find/tree.c:140 #, fuzzy, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -565,22 +616,22 @@ msgstr "" "l'expressió no és vàlida; heu utilitzat un operador binari sense res davant " "d'ell." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, fuzzy, c-format msgid "expected an expression after '%s'" msgstr "s'ha trobat un predicat extra no esperat" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "l'expressió no és vàlida; teniu massa «)»" -#: find/tree.c:184 +#: find/tree.c:189 #, fuzzy, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -589,12 +640,12 @@ msgstr "" "l'expressió no és vàlida; s'esperava un «)» en algun lloc però no s'ha " "trobat cap." -#: find/tree.c:192 +#: find/tree.c:197 #, fuzzy, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "l'expressió no és vàlida; teniu massa «)»" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -603,121 +654,121 @@ msgstr "" "l'expressió no és vàlida; s'esperava un «)» en algun lloc però no s'ha " "trobat cap." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "ep -- el tipus d'expressió no és vàlid!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "ep -- el tipus d'expressió (%d) no és vàlid!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, fuzzy, c-format msgid "paths must precede expression: %s" msgstr "els camins han de precedir la expressió" -#: find/tree.c:1297 +#: find/tree.c:1303 #, fuzzy, c-format msgid "unknown predicate `%s'" msgstr "el predicat «%s» no és vàlid" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "el predicat «%s» no és vàlid" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "l'argument «%s» no és vàlid per a «%s»" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "manca un argument per a «%s»" -#: find/tree.c:1406 +#: find/tree.c:1412 #, fuzzy, c-format msgid "you have too many ')'" msgstr "l'expressió no és vàlida; teniu massa «)»" -#: find/tree.c:1412 +#: find/tree.c:1418 #, fuzzy, c-format msgid "unexpected extra predicate '%s'" msgstr "s'ha trobat un predicat extra no esperat" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "s'ha trobat un predicat extra no esperat" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "oops -- inserció per defecte d'«and» no vàlida!" -#: find/util.c:171 +#: find/util.c:175 #, fuzzy, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Forma d'ús: %s [-H] [-L] [-P] [camí...] [expressió]\n" -#: find/util.c:173 +#: find/util.c:177 #, fuzzy, c-format msgid "] [path...] [expression]\n" msgstr "Forma d'ús: %s [camí...] [expressió]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "no es pot obtenir el directori actual" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "no es pot obtenir el directori actual" -#: find/util.c:816 +#: find/util.c:824 #, fuzzy, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "avís: seqüència d'escapament «\\%c» no reconegut" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -726,65 +777,383 @@ msgstr "" "La variable d'entorn FIND_BLOCK_SIZE no està suportada, l'única cosa que " "afecta a la mida dels blocs és la variable d'entorn POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "l'argument %s no és vàlid per a %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "l'argument %s és ambigu per a %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Els arguments vàlids són:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "S'ha produït un error desconegut del sistema" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: l'opció «%s» és ambigu\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: l'opció «--%s» no accepta cap argument\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: l'opció «%c%s» no accepta cap argument\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: l'opció «%s» requereix un argument\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "" +"%s: opció «--%s» no reconeguda\n" +"\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: opció «%c%s» no reconeguda\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: opció no vàlida -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: l'opció requereix un argument -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: l'opció «-W %s» és ambigua\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: l'opció «-W %s» no accepta cap argument\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: l'opció «%s» requereix un argument\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "no es pot obtenir el directori actual" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "no es pot obtenir el directori actual" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "«" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "»" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[sS]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "memòria exhaurida" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "l'argument «%s» no és vàlid per a «%s»" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "l'argument «%s» no és vàlid per a «%s»" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "llista d'arguments massa llarga" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "ordre massa llarga" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" # Açò vol dir que de tots els arguments, només un no cap, no? jm -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "un argument no cap en el límit de mida de la llista d'arguments" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "llista d'arguments massa llarga" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU findutils versió %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "no es pot obtenir el directori actual" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "" + +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "s'ha trobat un predicat extra no esperat" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -793,8 +1162,8 @@ msgstr "" "Forma d'ús: %s [--version | --help]\n" " %s biagrames_més_comuns < llista-fitxers > base-de-dades-locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -802,85 +1171,80 @@ msgstr "" "\n" "Informeu dels errors a .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dies" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, fuzzy, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "l'argument %s no és vàlid per a %s" -#: locate/locate.c:468 +#: locate/locate.c:459 #, fuzzy, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "avís: el camí de la base de dades de locate «%s» té dos punts al principi, i " "això no és un nom de base de dades vàlid" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, fuzzy, c-format msgid "locate database %s is corrupt or invalid" msgstr "la base de dades de locate «%s» és corrupta o invàlida" -#: locate/locate.c:893 +#: locate/locate.c:860 #, fuzzy, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Mida de la base de dades de locate: %s octets\n" msgstr[1] "Mida de la base de dades de locate: %s octets\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, fuzzy, c-format msgid "Matching Filenames: %s\n" msgstr "Noms de fitxers: %s" -#: locate/locate.c:901 +#: locate/locate.c:868 #, fuzzy, c-format msgid "All Filenames: %s\n" msgstr "Noms de fitxers: %s" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -891,44 +1255,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, fuzzy, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "El ràtio de compressió és %4.2f%%\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, fuzzy, c-format msgid "Compression ratio is undefined\n" msgstr "El ràtio de compressió és %4.2f%%\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -936,35 +1300,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, fuzzy, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "la base de dades de locate «%s» és corrupta o invàlida" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "La base de dades %s és en el format %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, fuzzy, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -985,63 +1349,63 @@ msgstr "" " [--version] [--help]\n" " patró...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "avís: la base de dades de locate només es pot llegir una vegada des de " "l'entrada estàndard." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, fuzzy, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "avís: la base de dades «%s» té més de %d %s" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" # Suggerències? jm -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "error a l'esperar al procés %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" "La seqüència d'escapament %s és il·legal en una especificació de delimitació " "d'entrada." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1050,7 +1414,7 @@ msgstr "" "La seqüència d'escapament %s és il·legal en una especificació de delimitació " "d'entrada; els valors dels caràcters no han d'excedir %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1059,7 +1423,7 @@ msgstr "" "La seqüència d'escapament %s és il·legal en una especificació de delimitació " "d'entrada; els valors dels caràcters no han d'excedir %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1068,7 +1432,7 @@ msgstr "" "La seqüència d'escapament %s és il·legal en una especificació de delimitació " "d'entrada; no es reconeixen el caràcters finals %s." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1078,43 +1442,58 @@ msgstr "" "d'entrada: el delimitador ha de ser un únic caràcter o una seqüència " "d'escapament que comence amb \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "l'entorn és massa gran per a l'execució" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, fuzzy, c-format msgid "Cannot open input file %s" msgstr "No s'ha pogut obrir el fitxer d'entrada «%s»" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "Les vostres variables d'entorn utilitzen %ld octets\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" "límits inferior i superior POSIX per a la mida dels arguments: %ld, %ld\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1122,17 +1501,17 @@ msgid "" msgstr "" "límits inferior i superior POSIX per a la mida dels arguments: %ld, %ld\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "La mida màxima de l'ordre que podem utilitzar: %ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "La mida de la memòria intermèdia que s'està utilitzant: %ld\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1141,14 +1520,14 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1157,175 +1536,273 @@ msgstr "" "s'ha trobat una cometa %s no emparellada. Per defecte, les cometes són " "especials per a xargs a no ser que s'utilitze l'opció -O" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "doble" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "simple" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "línia d'arguments massa llarga" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "no es pot obtenir el directori actual" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "error a l'esperar al procés fill" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: ha acabat amb estat 255; avortant" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: interromput pel senyal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: terminat pel senyal %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: número no vàlid per a l'opció -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: el valor per a l'opció -%c ha de ser >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: el valor per a l'opció -%c ha de ser < %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Forma d'ús: %s [-0prtx] [--interactive] [--null] [-d|--deliminter=delim]\n" -" [-E cadena-eof] [-e[cadena-eof]] [--eof=[cadena-eof]]\n" -" [-L màx-línies] [-l[màx-línies] [--max-lines[=màx-línies]]\n" -" [-I cadena-de-reemplaçament] [-i[cadena-de-reemplaçament]]\n" -" [--replace=[cadena-de-reemplaçament]]\n" -" [-n màx-arguments] [--max-args=màx-arguments]\n" -" [-s màx-caràcters] [--max-chars=màx-caràcters]\n" -" [-P màx-processos] [--max-procs=màx-processos]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fitxer]\n" -" [--version] [--help] [ordre [arguments-inicials]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "no es pot obtenir el directori actual" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "l'argument %s no és vàlid per a %s" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "l'argument %s és ambigu per a %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Els arguments vàlids són:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "S'ha produït un error desconegut del sistema" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: l'opció «%s» és ambigu\n" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: l'opció «--%s» no accepta cap argument\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: l'opció «%c%s» no accepta cap argument\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: l'opció «%s» requereix un argument\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "" -#~ "%s: opció «--%s» no reconeguda\n" -#~ "\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: opció «%c%s» no reconeguda\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: opció no vàlida -- %c\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: l'opció requereix un argument -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: l'opció «-W %s» és ambigua\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" #, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: l'opció «-W %s» no accepta cap argument\n" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "GNU findutils versió %s\n" -#~ msgid "`" -#~ msgstr "«" +#, fuzzy +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Forma d'ús: %s [-0prtx] [--interactive] [--null] [-d|--deliminter=delim]\n" +#~ " [-E cadena-eof] [-e[cadena-eof]] [--eof=[cadena-eof]]\n" +#~ " [-L màx-línies] [-l[màx-línies] [--max-lines[=màx-línies]]\n" +#~ " [-I cadena-de-reemplaçament] [-i[cadena-de-reemplaçament]]\n" +#~ " [--replace=[cadena-de-reemplaçament]]\n" +#~ " [-n màx-arguments] [--max-args=màx-arguments]\n" +#~ " [-s màx-caràcters] [--max-chars=màx-caràcters]\n" +#~ " [-P màx-processos] [--max-procs=màx-processos]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fitxer]\n" +#~ " [--version] [--help] [ordre [arguments-inicials]]\n" -#~ msgid "'" -#~ msgstr "»" +#~ msgid "cannot get current directory" +#~ msgstr "no es pot obtenir el directori actual" #~ msgid "Success" #~ msgstr "Èxit" @@ -1381,27 +1858,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "No hi ha cap expressió regular prèvia" -#~ msgid "^[yY]" -#~ msgstr "^[sS]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "memòria exhaurida" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "l'argument «%s» no és vàlid per a «%s»" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "l'argument «%s» no és vàlid per a «%s»" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "llista d'arguments massa llarga" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: opció il·legal -- %c\n" diff --git a/po/cs.gmo b/po/cs.gmo index e09616060d302686adf518c6082ec85fd0252f59..8bddd561e18a7750ef0423f6b3438a328b65b043 100644 GIT binary patch delta 13972 zcmcJV378bsoxtA=o+CjN6!4-D5ryf20R$NY8HND{n1kU`5T&}iX1b@ltJ<#Wp2MT@ zj29-RH4!l!-k^kNZ!Qls4727^6E#K?W7c!C`C>L}zRk6|+26max_btc@!M~=KK}iy zdR6s~|MgzI;f`y|U)xunee1*{?kZDCeSl0wHXg0iTnfHCOerb9euPpKsoUTqh#Vh} zRO&JK2|O3>K1r#+!B^o;@Wqprs)1`qDb)%$=S}9IdbhOHRCAcG^Mt|ccC7Inab>!FQoNe+)m2 zK~0AAO)Z3?nT>D~yakFjzXdOY-+}FLRCc^~B8*V*uW&eQq4pD@4y&O9rQ(MmkEs0+ zC8-Y}|In$&36MUir9R^@!1e8rL93_z@;9Nzb@snGxqy?gXDfxt)g@3=7=vP?-B3op zA4&zkhBC5G;Cwg{H8B_!fzshy;n(0cn1?gZ@l5bLI1Clc;N{tr*P#{$l2uo6ay|t+ zp^WsG5Ob=blf53E3#EfgVGw@N=kH*M>&8l@Ho?asW>?b~t_-9F4uzLN8BiRG=^lkL zFs+Kt(Y`vLlUWp4upK@OXTam9U?;c`Ho}h~ZK|b&i8yNpu7$f{7c8gu(t#`Bg>Vae z6utp3f;UX_2J#jZ4W3FRf2Vy_&xuqxpH^o=2a1Xwg=kH^5AT4(&LaZg4!983^RSra z7AOrr2xTC>a3uUMxE>CtkU^_B#473@xE)jMhgmwWg0v^Q0|xGK*z)EN>0w;Bm_mJ*TR$Gw;})33;aljPOSHG`y41LKL91; z{Txcge}EI<=tbU0=fM}bz6?ruS1tB5)((#?Q|e|&2eT@-#52KZb;^1M6&&*b{oFaTxdnGdSq+t7mV!xiZHI5=yCXSzDL zpN20MQhwS>G9~S+-*9piH#%2&aenn`&&!9eQR;5)uY%lCA41Hh7BC#q#EtM}xDASm zFTY5sd*N=#;M8I~IRkU>_poA}Qa^=%fv>|KkQ}lPbF%XivJ-6B;N|L<;9Fdexzx*C ze}yPXt+>paEw@4Xs6K?^Om!Q*4%`XP;`#-jAHiF>9;JJ}azEU`_0v$E+Ym(mlQ_9H z=*@0>pd^YP!fN;~l!S9qNU0%k2@J#KFbN-rHawHU%i&kyaCnU2Ma39ME>g4LIA}v@ z?=CnVK4+l+shqq=!G-XoHZR;(`@9NDR6Gdfg*TuEKk={6X!m?)0hESsg{|;jcn17; zI2I0zc<)s~8CWxHf!Aa?5mmelPlkViTj8*%QcuF&umc+Wj4H=|a0=JIjeE{II^oR~ z3*ijPuZGfa9-a+fhV$XyAXTdx)8qY6>dg+dc!`rvcqaTa90tcEz3KBD$g}D^D7Jh6 zN{6SSZ~RfMhO^;gup52=nV;0g6n;^LNua~^FR_zERWldjthYeiAgg*gxsrkjX)liN zgR8iH20j8$#DzD(r{FwzL8mv;E8tKX_$Cz7J=5jg{{+sG=jhF3=)gPS4!8rJ*W;P& zH8@VVjF!A0j0jN*LfpvgA2Ic3$xPmk2q-V5^>>n@y&%P1;OT(*f^j^3RPU8CeP)787 zsKH_AQ#b|6i!D%|yBaQnyZq}v`aJa}&s2+`sM?02!3UrQpMs~tH*Z4q6FK=S1;e3s zvo~2(L-FF9Ar7yeh2!DWTkveS3Z4MJ1t-Agq2!4V;c0Ljp|T#%gEQbg@EZ6M906C{ z=5@fxax$BOYoJv06x86`@OQ9$vuCRhq1%Dmak4Tx041C{zvN9aPr#X6?}O5T|Af-e ziC@NXdH!rDCTzaL(?kM_lV`8zL>m4&6kGSgW8p_oD*6}_Icm&Tyv&t@w^3mqY^J=G z*jfkggJPObU@e?{mjpLH1ed`NA!b*zzv@N7v+x3WwhvyrzE2JhB&E|g=82Y%_|3E&C8;O9_A z-|JsXK6ueT|F%!TYGfSp5;6pdBj+GHkf#wjoS?Z|c{kBHgiAne`aB!0!)e~tVM!Ij*U4^(z1 zKOZ1JLl=gIkIYlcj9`te_Dj3PdOY!G}VB7ADMxihn#{GjyE~^F7lm10c=4YN2Vj|kXqyz zM2@47sMLCed&!Cx{sxgSS&4|(UyMve79uG`4*b*g{P&=ZJdemB8SgQqLN5H{Ik+3S z1Ccx<$H@pj?kyrR~*M7G30e5gcJ^wlY5X~AiqKaNCer0T#C#@rXgQP z3P+feHH8bG7s74GnAk;jndkXMo4BG>WmEWb`J-6MMz_y@;F+??wdO2Uvsa)R9Z0=<#v`BVRKjbJp_Xo;+lT9oZj=k4Yxja~i>lvI&#ZTOu+cx}^*3meS zXi$!05xKRDvKqIfRR0$#6YI!PX!BQ;i4V$AC_8O?zTyO@JR67@@uYU>5suo)xZbTf zk*KY?&*)}YGrFQqh4P*b1d=H$WY~7Vj$2M3qo?Msscq$+Z8(}?W}+#}Oc11tpWbx8QeP47J8ttWh2}-MUh^%j&2?_`sWc<)*SvSbHz7@OPuHAi z!jPJ>0bQ!nQ|*DaXxx~)s9|}1so|8Nhc)h{#k{uGma-C>JW;8cmZRAY3e{6#Z$NIp z!ctk-a7}2W=GHB#ZLO_aRqyII>KF-I+`=2b?NECnOZ5hhl+;tYV}!L}w^n?qa&W~+ zH+ZEpLgjW6^UTrkXYoN>yF6_<7y@Sw>YO?dXXSX#m`ry5CePN&n%#jgNx2>hk;s^&ZqN{)1w(&6SimP0` z#@82vW=Jr}&*B3($h4L*us_MnKAArzbUG>xMd z%;oma6b(!06Bu6Txf*oMc5vvscS-?7uose=AIp+|l2T#Rbc~c9a-tcdzXRZoi6lO5 zkj4y+&^E<0{e0ji)IdsJH?06S1JSmC!SmgPDj1FDGZJMuO|dJkFPU06Yq_B;Iis$* zv9Y#k;he#>=GKatt)wFv*!4$8Yp3hz#;*pCipS~qAhn78{e%@abP}dzhTOyyunTGq zMf8-XXUPn1igWXeKO<;XTR|VLPQ?+#g6_kv!5pcH2_a~am=8K)Ng~H7RA3hrZFCu- zv?HoUeF?XgE~!PP#e-^)OSjn5H7?p?Xy@35p#|)7MK?xQ$S}f2xFYxX$W!vyj(od3 zJ5dFk?xdkj2o;oPr;|x5CFZYFN}vvUcr;3l{IAaQdV%896ewX>Cz5Tqjc$ zPLU*qhf!hG;p@-34Xm_?B>ES&tknNgLvA~gRl=HWg<=L_Dg(;8v&aACh}?$k?nKav zM?>NUvBQn%^uy{d7aX-V_vWYv7wD$jPZl{V8y2r#*;h0yO2x#d!qJowa;#Lh_R8^rGb%%8- z<%^>6-1f0U^KXtlP}bO5N{HUvSn7l~ar*P7bTlEUxpd!MG`Z8GyU?kssK{?0cUKvv zj2p5bA;-&FH0@ZjE@g2MN8Ra^Nj^0-7Eehh;wg`1cbb_jY%wY0iEbx5BSzsNNgeo) z(bk4DRcTs7n&>PO>eBVy7jIA-m7WMj+tXHBe8F3$O8a8?33fg=WoFql61FVa_$nzr zA&VU}SGA=~Cf7>?}*{bxR``aSqrA5s(SeowKgI?QwJh9f-;)4VGzCZosA;%lI zXg8*hkSCdA@;{%suIzj-0+`fzI6=s}YiU`FyK7dRueo@doE3?NB83cMYa8cI%vYTs zD9b-Q`zK|i+>bp5iVs^M*6$i=hnDimIor!~)zd~#B-YY=0tO9C!ZV%t6B$AmZ1RI(&)Djtv1hN~)a)$^XpN*$%uu;Zmuap+{q z2oqTJ$B;n~WrRVwR-B*ik9X;tC5MyM`~apovG2LO|70Dm^wQ!Z3d?` z)AN6;9e>1UewX)H!Ia+9yNBF>hRxocNh@<;YdB37w_}!hU~}&tS(nK1DIe&3^fey1 zr>Uv;nn4#}Cd)28LqmmknpexGj_veqF~SsQ_V4gMij2^wd_Z|UDEuZZvRbTfZ>eXW z@ugoJUDiq%J%&j;Ceu^zu6Rsl3@hEY(>bu!?A;Zyv}E6w-aRqBCta$w@OfWo*Jq|X z*}JE2r=j&e8P+=t&Dy_%Cwrowrn8X6io46njbAjQY)bB;MUTi*yg_R^sLIkMk<&qk zv<^MSoK^V7n%m^A4iDWAXlPvB=)EkX*%zfdrqPk6&>TH7;FXMsbv3rfA?E!z?GXVF;LWCl63o1XnW zvmUfzu(Emeg687>iK!phEOVTni@P<}!rl|B*)uS>{A_nT($!XOMb}ALSEUE-C9G?z zT~;(kl1Zs=U#y#bo}$tc;?0qI1 z@7D?*5n$B1~R>p`8T5C`8z*a}B8`0txH9AHNXC!`E zRng6$l}a-a;(4Xrgk{ayruw=8pS}ZKuU=c$%oCMbhr#xfccJy@VY*iJ+3NLlw=`<% zF)R_3^}}^8}?>%dp7dG{7u3K^$U(Bm#H`X_;s;^rjS+6J4Jy_G8)6w%pG}qKM zI$NbRNkS3bG!6Eyr#7on0>%g@tyml-^zLL9WIMvMjJqEp@iJflo)(f;*b0`C0$D(h zXC=`6_6u=dXlAhP6jKH5m%@;^WYyO%R}_6-bMt@^b6v>an8=oPCQ4DR6>Bb4Tj*RN zTHS0iSPutJHrd1OXNa2nXDXuBPwzC(sKb`iyR&bfw+C>ztqs%QtDAh;;aR#ci0;a) z*3x%(@8)H->wG^SY)Hkt+0Sttw(i`S$6!Vg2lE50vRL_N)_RoZ8oAwJ%}Zp5?qrng zBC{V+Fv!FwS-xN`LeigL1Bct#aHqno%ryo5c6&Zf*65HWU2)XpI@f&;x4}_ZaTIcn z+h1KfCll=<-OEOY#7`_`9oTG`dWB+1$$V$$k6yfLNcNpg_m=h}+|a-qiM5oQO(phH zEE}-73{yTWdUqw#m0FAp73_|C8yx)gfJKVzFX6wE-%0f>`1;k;-EY%lKqFbnZvV?x zY;TW*j_&gJNj^`D0~?fl@cGA;v^v;qw=%k96>rnz^9^%gqy5@kFt{=cJ0~&Pw8AX4 z4r(&DZfPR-r=@Qju z(r>m*hAs z%gfiV^p}~%+-#So{l*4&+Lu}XVwv-8_8r^^U`E$af+(A_Vv2W@jVv_XIlm&;+%>Aa zsv^I2?SZmvZH$$b{0Yk4Ybk89uu{anWOAnV!WN6@+TUU^*)%i_SupnQETlMpSA^Hh zG}|k6kq|Y?nnF}(%j96iQcMhVlsrrdvsp7~=M?r=OfLL67hCpIx8Ht#!^O{*om{E) zgfmtL10la~;ur@u$GY>Utv_MN=q5v!W(j&MPFl(!xynoL%a74tD$Bax6|CL8Jr^`v z-_pCesrJBa8{XOUP;sKt))$snB`wPX6{-d29Oxk82sNsud0lgBjkZoUUr6WtdC5xZ zvIE12yze{rk^C1zdxumP_G9$g4GQN}M2UPxxGP7Aor2ZG?eQVDWu9uguB;LB^ITLc zSbRjHo$TV~n2dpw@#h_j-CX`moMxpTXN7J%QJ$gl1X1hzb>H6H+{o+W@l|he?rz<< zyKs^v*rei*Bf&Jg38~zq=<>6@@IP01TE#L^d;_<}m1Sw~XOH~V(I?9$B~uxROunbw z#lM{CVfGSPqHOUyN`@e0oZPIKo&6k-rzO!v9p&Xv$#~*B3BGm360RHJU$QbTq_?<* zPRT_&J&m)eL}o~lfyf($7nu&-7mqEzncEdxeoRr}Z^zaR8Ija!r0+q}3yC$AWUzX^ z#=5y|K|kM&db>gVVVX}B`4V#cWsj~!ER5>tlJfP4EV}q6(6IMhGEshia!FY}p89Lq zNSPk=xD}JA(EKLzx|1v~tIWNec{2BW*O_c?c5Cz{&Stf=Pz-qKQZd}+(<5dia@o!) zwS1&lshWX7R4)sRpwZ(_6zuo2VDLVNyr6Sr(@0Vn;l_5+p3XNg4*nJ+Ux{W-LjtS# z$2}9o{QfJ})wj3b3xv)b^jA(>eU|x%bY@ zojdpb?mXUqC8_@Ar1;ss9rw7DQb&n2;>$~va?$Wmcci}mQl&cM5j;i6F|-eLyd1~j zYxpBx#O?T(zDfBUpWV>b52GGr_&is^V8%Ka~(+;?VRT&YnMexTtp97?b9 zpec?XbW`7g!|`z(fp4LP-{4i)hnst00nWe@q)W9AQ}7v-7y1~bpC3>LJSa}9jA$0h zNOd%^7V~f-!|cU6)ZkR=+lJZ${x!-Qok#wu{+HVW$-q+TA;)*IjQZqZyaet=n$%!M zAp?$QQ|Liq9?Hm_S2MFiwiLmO+1QU;skt%>A4c$z#^2ltA%2e z2mcOp@oOyR`DzmLe-#beQKqB?zmf}3I{J|HkOA}@W6!`Glqube^>`5XLQeZe9!Cbz!4KUhewc8>I`OJ zXL^wtn1(Ykgduzit8qjs=g`2z_!hG4s*cXcSJfc$e07+DjPL~J;7>RkvzdRHflVmc z{3Nm~)p4i(CdwP0b?SddW?l6pF*@QT?1Y&p?bC5NmZ0R!(-=>t@HPdOSAB+ZVMkt1 z1~L|4dQ4J_lc?xCi|A3Mkqv>or<|8{)y^qr0*GRgk z%b0ErbF-NLwQlt`R%qaU6iJ#wiq0IET5I%~r^xqgs?4IKeu|)OTWUR$~UrHr>x3 zc91%cceuWAZ{f33HK+pvq8Yv;ieoe(#*` zvdCWhi8zYqt9%L!PE})Xd=U%rbsUDn^6ebR!Qs@Ss9^)jfS*NqvoBEAv_}Db;3!;& zXK`Q>%evV9j(C^aFHnz}JYOB7AP@Q$uf{$+y#fmzUqb0<^fJDBxEn`eujO_UrehE4 zS7Q+KQ3mufvLVzbxDp4le&nqR;s$&a<8r}B&dz4-i;)CY`^ZRH+tcX9-o^IMau_9> zzef60-B#H@Dr=BDROc`ghhNJw;&PNFSm?3O@5C(Xui*qtTFv}7P)J>ECrLBPQus>j zwQWL~^0zSuzs3-{ud}D}eq6xRzKIiQAH--Id6Bs|g8CPw{N`iVGW)^xC=Y%WGw`ov z%)cZ{ijSXQT!j(bhg-3?t`v!{_TVWzg9GqDx&1+T8OKupBhJO1Ywhcop}fewDE*$t zfjE|RO~x767nj8;q*5ry%W)5mLlZmV$Jhlwb=v=ge(L@CGYsP>OY#89KwdyMorn!j>5r}d|hz{_Q3~n3_gWy%eXpCVJHpVNnP?nrJy9yR=f#cz#%xDg`bK=C>_+J zhDY%Net`18W}ZIM#oD8ndbhBh)B)^H{UA<36Nk$Fzd)fM4V_u|6mA@XvJ`Wo_7|)a z<$)V96&tZDzJoIGk8lHikLg$)Q|b=-c^DT{PrJdM*)7Q9)Z@4iQ)@{=X{e)c6*l2A zynyF%2EBfVBkM>k9I(-z!qG_o*0tB;d_oSH9qC6B?OEau;sHXAe4@cB*$F>~vdl*O zm;7O%R#t-b&CZkp$EAd>`Q@_OZH~kYfgM6R}e&?G9PoF0$60 z+cn-w`4@!j9XZ%;)_xd`mk_&&&4hd{4iggz62;2QZOAUMe#Q>rbV4%DBzh2uV;_Yr z#BEkXoDVF8gTxa=Jwb+A-#@U9`yE$fj#IwNkzHW@E=x7TX%m`=n+d*nN+%vBt?XeFT8Dg9<#Vu|NGF~lo+Ek^PZDz6 zXVd!E=aj}{H^SR`MyVSqKkd}VIWBSxqD>CRT+kyJjM2t3+0eONZUo) z5|b<$CT$aVt@&~hN1`o8TOxB3ZI975$-b=hx{qj+b&*5%svMb;HPUhAW@B^m;KKJ9 zkIbeViBp}n*q;<>OY}dBwnAy(NVMI(#r|(d`?k|t%nQlUB%^9jPSOOo@x-7b=1aqW zN-~y=UO94B%pZtqv4}soR-0F_LR%Y*1^lI2jUJBpLqTm!q?>VI^dsi(G1FWl{6T-z z?+y4Px)!PMhIOC2+#k@j3U8!Bi+W1~x^aALl@Y!o-JG6Mkz|}1zrt8C@k(>sgp?#> zWa@yl{E$zlN6jD6f}yBZLsvfSh6+8XEm^!QuXxd_HM18N7S5f$T&@TOQ_ZZ@7MHmo zt-)pP$k^sGwaha~MxU%b@wBRNw6;X^xZVC>R1bU0qW&7)sx$h46nvZ9Zl50TSNb`h zW0gv}Y4+i9&(-u$xjPaK%cZ&}Q7O@+OKP5+)~2?b7HO5(-Tkjd)hZxeK-xCoPRshHi)1MBJTEv*IHw6%Y&q1J<)1y zyEbACxQvx*yVj~%7u)S^S1+-yt_p|BxLW2xy0)s;<<1G(BNfX+H!u%OZKU1Xxk;JQ zP{dvaz1APK-X|Dxhhssvzuc`?Rz){hZ4A>&oE*uXL=VQyP5m#|JY}KEN^j7od7NC6 zmy1>EK^|q^ll8jmvZ9%V1$hPYrfG{pk*F4B?bmCea&3&yJTY}^2eUe7vdj2nMx$|C zZh`q_?p-e9k(mpOwX<@~@wHRo9G%9*1bN~BN___b)Oas>a|sRS(GAK z86!)5(>3EjZi;!={5M_Zh6VeQjO+5#jo0#z7+n|lG`}m@p5)3hZd^LMXSzFWvO7Ip zOPe}va<=j2(jh(4+-aHav?*Ff#h}+kthmTe=xx{k(ag-0zx_7xb6O{;MO0T6bM6uzrIU@ijLE z^kDO`vI;E{ij{`KEl+3>Jy78dc#WPFQRCf;tIR|Gdpj8KR`xUMEAx!xP?nh;3?vz8 z)nl^qn@yi=%phGfY2;{>t|n^hbe5R`Rt00x(9id1s#;{cvoqOTS6!84E{-<4%$I78 zxy(Cj`*bj#-`Hr}m(~4$-lrj-@8o@fP>uKGu0&ptiF37`t59!87ZQPpM_SpVoFI#!fxwhNv9bFgnIYn;PRP!Hy`U@Zom0vmr=a+bpMmPqE>E}#>&g}a7@#~;h@(j+_tDoOJh{mqM>o- z$!#yXjK^*Z8~e8}G`rt^O$SrIW4p^tyK|mvoVD9)!p)6Qe;`DfhfeO&*EcuTc!Qys zRuS^?a}=}peC4+E&Q6zR&F&vv=B@RWNv>4mqVb~9b, 2008, 2009, 2010. +# Petr Pisar , 2008, 2009, 2010, 2012, 2013. # msgid "" msgstr "" -"Project-Id-Version: findutils 4.5.7\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2010-04-06 22:28+0200\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-09-24 20:38+0200\n" "Last-Translator: Petr Pisar \n" "Language-Team: Czech \n" "Language: cs\n" @@ -17,32 +17,68 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Uložení pracovního adresáře za účelem spuÅ¡tění příkazu nad %s selhal" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Standardní vstup nelze uzavřít" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Změna adresáře se nezdařila" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "nelze vykonat fork()" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "chyba při čekání na %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s ukončen signálem %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" msgstr "Inicializace hash tabulky sdílených souborů selhala" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "kontrola nezávadnosti knihovní funkce fnmatch() selhala." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "na současný adresář nelze provést stat(2)" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "Nelze načíst seznam připojených zařízení." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "POZOR: systém souborů %s byl nedávno odpojen." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "POZOR: systém souborů %s byl nedávno připojen." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -51,7 +87,7 @@ msgstr "" "během provádění %3$s změněn %1$s%2$s (staré číslo zařízení %4$ld, nové číslo " "zařízení %5$ld, druh souborového systému je %6$s) [odkaz %7$ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -60,17 +96,17 @@ msgstr "" "během provádění %3$s změněn %1$s%2$s (staré číslo i-uzlu %4$, nové " "číslo i-uzlu %5$, druh souborového systému je %6$s) [odkaz %7$ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "návrat do nadřazeného adresáře selhal" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Bezpečný přechod do adresáře %s se nezdařil" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -79,7 +115,7 @@ msgstr "" "Symbolický odkaz %s je součástí smyčky v hierarchii adresářů. Adresář, na " "který ukazuje, jsme již navÅ¡tívili." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -100,12 +136,12 @@ msgstr[2] "" "jako adresář, který se nachází o %d úrovní výše v hierarchii souborového " "systému" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "varování: nenásleduji symbolický odkaz %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -120,12 +156,12 @@ msgstr "" "noleaf. Dřívější výsledky mohou být ovlivněny chybou spočívající " "v nezahrnutí adresářů, které by měly být prohledány." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "Seznam připojených souborových systémů nemohl být načten" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "neznámý" @@ -137,7 +173,7 @@ msgstr "" "Odhalena smyčka souborových systémů: %s je součástí stejné smyčky " "souborových systémů jako %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "POZOR: zdá se, že soubor %s má mód 0000" @@ -147,13 +183,18 @@ msgstr "POZOR: zdá se, že soubor %s má mód 0000" msgid "cannot search %s" msgstr "%s nelze prohledat" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "návrat do prvotního pracovního adresáře po prohledání %s selhal" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Inicializace hash tabulky sdílených souborů selhala" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " @@ -163,7 +204,7 @@ msgstr "" "zapnut. Chcete-li přesto pokračovat, prostě explicitně použijte přepínač -" "depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -175,7 +216,7 @@ msgstr "" "přepínače nejsou poziční (%s ovlivňuje testy uvedené před ním zrovna tak " "jako ty po něm). Prosím, přepínače uvádějte před ostatními argumenty.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -184,7 +225,7 @@ msgstr "" "varování: přepínač -d se nedoporučuje, prosím, místo něj použijte -depth, " "protože tato druhá forma je podle POSIXU." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -193,17 +234,17 @@ msgstr "" "%s není jméno existující skupiny, a ani nevypadá jako číselný identifikátor " "skupiny, protože obsahuje neočekávanou příponu %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s není jméno existující skupiny" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "argument u -group je prázdný, měl by představovat jméno skupiny" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -213,7 +254,7 @@ msgstr "" "Implicitní cesta je současný adresář, implicitní výraz je -print\n" "Výraz se smí sestávat z: operátorů, přepínačů, testů a akcí:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -225,7 +266,7 @@ msgstr "" "VÝRAZ2\n" " VÝRAZ1 -o VÝRAZ2 VÝRAZ1 -or VÝRAZ2 VÝRAZ1 , VÝRAZ2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -239,7 +280,7 @@ msgstr "" " -depth --help -maxdepth ÚROVNĚ -mindepth ÚROVNĚ -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -254,23 +295,23 @@ msgstr "" " -ilname VZOR -iname VZOR -inum N -iwholename VZOR -iregex VZOR\n" " -links N -lname VZOR -mmin N -mtime N -name VZOR -newer SOUBOR" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path VZOR -perm [+-]MÓD -regex VZOR\n" +" -nouser -nogroup -path VZOR -perm [+/]MÓD -regex VZOR\n" " -readable -writable -executable\n" " -wholename VZOR -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user JMÉNO -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context KONTEXT\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -284,7 +325,7 @@ msgstr "" " -exec PŘÍKAZ ; -exec PŘÍKAZ {} + -ok PŘÍKAZ ;\n" " -execdir PŘÍKAZ ; -execdir PŘÍKAZ {} + -okdir PŘÍKAZ ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -297,12 +338,12 @@ msgstr "" "Připomínky\n" "k překladu zasílejte na (česky)." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "kontrola nezávadnosti knihovní funkce fnmatch() selhala." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -314,50 +355,45 @@ msgstr "" "varování: Unixové názvy souborů obvykle neobsahují lomítka (ačkoliv názvy " "cest ano). To znamená, že na tomto systému bude „%s %s“ pravděpodobně " "pokaždé vyhodnoceno jako nepravda. Možná by se vám více hodil test „-" -"wholename“ nebo spíše „-samefile“. Náhradní řeÅ¡ení. pokud používáte GNU " +"wholename“ nebo spíše „-samefile“. Náhradní řeÅ¡ení, pokud používáte GNU " "grep, spočívá v použití „find … -print0 | grep -FzZ %s“." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "U %s očekáván kladný desítkový celočíselný argument, avÅ¡ak obdrženo %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "Tento systém neposkytuje způsob, jak zjistit čas vytvoření souboru." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "Test %s vyžaduje argument" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Nevím, jak mám vyčíst datum nebo čas z %s" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Čas vytvoření souboru %s nelze získat." -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "pozor: -%s %s nic nenajde, protože končí na /." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Mód %s není platný, je-li zapnuto POSIXLY_CORRECT." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "neplatný mód %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -368,22 +404,22 @@ msgstr "" "perm /000 byl nyní pozměněn tak, aby byl jednotný s -perm -000. To jest, " "dříve se neshodoval s žádnými soubory, nyní se shoduje se vÅ¡emi." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "neplatný prázdný argument u -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "neplatný druh „%c“ u -size" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "Neplatný argument „%s%c“ u -size" +msgstr "Neplatný argument „%s%s“ u -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -391,74 +427,90 @@ msgstr "" "Přepínač -show-control-chars bere jediný argument, který musí být " "„literal“ (doslovný) nebo „safe“ (bezpečný)." -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Neplatný argument %s u -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "%s není jméno známého uživatele" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "Argument přepínače -user by neměl být prázdný" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Povolené vlastnosti: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "neplatný predikát -context: SELinux není zapnut." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Argumenty u -type by měly obsahovat pouze jedno písmeno." -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Neznámý argument u -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c není podporováno, protože na systému, kde byl find sestaven, nejsou " +"symbolické odkazy podporovány." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "varování: nerozpoznaný řídicí znak „\\%c“" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c není podporováno, protože na systému, kde byl find sestaven, nejsou " +"roury podporovány." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "chyba: na konci formátovací řetězce je %s" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c není podporováno, protože na systému, kde byl find sestaven, nejsou " +"pojmenované sockety podporovány." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "varování: nerozpoznaná formátovací direktiva „%%%c“" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c není podporováno, protože na systému, kde byl find sestaven, nejsou " +"solarisové doors podporovány." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "chyba: formátovací direktiva „%%%c“ je vyhrazena pro budoucí použití" +msgid "Unknown argument to -type: %c" +msgstr "Neznámý argument u -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Současný adresář je obsažen v proměnné prostředí PATH, což je nebezpečné ve " "spojení s akcí findu %s. Prosím, odstraňte současný adresář z vaší $PATH (to " -"jest, odeberte „.“ nebo úvodní nebo závěrečné dvojtečky)." +"jest, odeberte „.“, zdvojené dvojtečky nebo úvodní nebo závěrečné dvojtečky)." -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -468,7 +520,7 @@ msgstr "" "Relativní cesta %s je obsažena v proměnné prostředí PATH, což je nebezpečné " "ve spojení s akcí findu %s. Prosím, odstraňte tuto položku z $PATH." -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -477,95 +529,102 @@ msgstr "" "Neměli byste používat {} uvnitř názvu nástroje u -execdir a -okdir, protože " "to představuje možný bezpečnostní problém." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "U -exec%s … + je podporována jen jedna instance {}." -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "V %s se %s musí objevit samotné, ale vy jste zadali %s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Prostředí je příliÅ¡ veliké na exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "aritmetické přetečení při pokusu převést %s dnů na počet sekund" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "aritmetické přetečení při pokusu vypočítat konec dneÅ¡ního dne" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "standardní chybový výstup" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "standardní výstup" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "%s není možné smazat" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "návrat do prvotního pracovního adresáře po prohledání %s selhal" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "getfilecon selhala: %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "POZOR: čas vytvoření souboru %s není možné určit" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s … %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Zápis na standardní výstup selhal" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Standardní vstup nelze uzavřít" +msgid "getfilecon failed: %s" +msgstr "getfilecon selhala: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Změna adresáře se nezdařila" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "nelze vykonat fork()" +msgid "warning: unrecognized escape `\\%c'" +msgstr "varování: nerozpoznaný řídicí znak „\\%c“" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "chyba při čekání na %s" +msgid "error: %s at end of format string" +msgstr "chyba: na konci formátovací řetězce je %s" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s ukončen signálem %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "chyba: formátovací direktiva „%%%c“ je vyhrazena pro budoucí použití" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" +"varování: formátovací direktiva „%%%c“ by měla být následována dalším znakem" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "varování: nerozpoznaná formátovací direktiva „%%%c“" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "neplatný výraz" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -574,22 +633,22 @@ msgstr "" "neplatný výraz: použili jste binární operátor „%s“, aniž by mu cokoliv " "předcházelo." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "mezi „%s“ a „)“ očekáván výraz" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "po „%s“ očekáván výraz" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "neplatný výraz: máte moc „)“" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -598,12 +657,12 @@ msgstr "" "neplatný výraz: očekávána „)“, ale nenalezena ani jedna. Za „%s“ asi " "potřebujete další predikát" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "neplatný výraz: prázdné závorky nejsou povoleny." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -611,114 +670,116 @@ msgid "" msgstr "" "neplatný výraz: Čekal jsem, že někde naleznu „)“, ale nenaÅ¡el jsem ani jednu." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "ajaj – neplatný typ výrazu!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "ajaj – neplatný typ výrazu (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"varování: predikát %s nemá žádný záznam v tabulce obtížnosti vyhodnocování " +"predikátů. Prosím, nahlaste to jako chybu." -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "cesty musí předcházet výraz: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "neznámý predikát „%s“" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "neplatný predikát „%s“" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "neplatný argument „%s“ u „%s“" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "u „%s“ chybí argument" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "máte moc „)“" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "neočekávaný nadbytečný predikát „%s“" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "neočekávaný nadbytečný predikát" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "ajaj – neplatné implicitní vložení operátoru and!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Užití: %s [-H] [-L] [-P] [-Oúroveň] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [cesta…] [výraz]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "současný pracovní adresář nelze zaznamenat" +msgstr "prvotní pracovní adresář nelze uložit" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "současný pracovní adresář nelze zaznamenat" +msgstr "prvotní pracovní adresář nelze obnovit" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Ignoruji nerozpoznaný ladicí příznak %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Prázdný argument přepínače -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "Přepínač -D musí být bezprostředně následován desítkovým celým číslem." -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Prosím, zadejte desítkové číslo okamžitě po -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Neplatná úroveň optimalizace %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -727,7 +788,7 @@ msgstr "" "Úroveň optimalizace %lu je příliÅ¡ vysoká. Potřebujte-li hledat soubory velmi " "rychle, zvažte použití GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -736,65 +797,383 @@ msgstr "" "Proměnná prostředí FIND_BLOCK_SIZE není podporována. Jediná věc, která " "ovlivňuje velikost bloku je proměnná prostředí POSIXLY_CORRECT." -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "neplatný argument %s u %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "nejednoznačný argument %s u %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Platné argumenty jsou:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "chyba při zavírání souboru" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "chyba zápisu" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Neznámá chyba systému" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: přepínač „%s“ není jednoznačný\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: přepínač „--%s“ nepovoluje argument\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: přepínač „%c%s“ nepovoluje argument\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: přepínač „%s“ vyžaduje argument\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: nerozpoznaný přepínač „--%s“\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: nerozpoznaný přepínač „%c%s“\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: neplatný přepínač – %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: přepínač vyžaduje argument – %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: přepínač „-W %s“ není jednoznačný\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: přepínač „-W %s“ nepovoluje argument\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: přepínač „%s“ vyžaduje argument\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "prvotní pracovní adresář nelze obnovit" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "prvotní pracovní adresář nelze obnovit" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "„" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "“" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[aA]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "paměť vyčerpána" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "neplatný argument „%3$s“ u %1$s%2$s" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "neplatná přípona argument „%3$s“ u %1$s%2$s" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "příliÅ¡ dlouhý argument „%3$s“ u %1$s%2$s" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "příkaz je příliÅ¡ dlouhý" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "kvůli omezením velikosti argumentů není možné zavolat exec()" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -"s jediným argumentem se nemůžu vejít do limitu velikosti seznamu argumentů" +"s jediným argumentem se nelze vejít do limitu velikosti seznamu argumentů" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "seznam argumentů je příliÅ¡ dlouhý" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "Proměnná prostředí %s není nastavena na platné desítkové číslo" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Deskriptor souboru %d unikne. Prosím, ohlaste to jako chybu a nezapomeňte " +"uvést podrobný popis nejjednoduššího způsobu, jak tento problém vyvolat." + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Zápis na standardní výstup selhal" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Sestaveno za použití GNU gnulib verze %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Neznámý typ regulárního výrazu %s, platné typy jsou %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "Neočekávaná přípona %s u %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" msgstr "Očekáváno celé číslo: %s" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Neznámý typ regulárního výrazu %s, platné typy jsou %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -803,8 +1182,8 @@ msgstr "" "Užití: %s [--version | --help]\n" "nebo %s nejčastější_dvojhlásky < soubor_se_seznamem > databáze_locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -814,69 +1193,64 @@ msgstr "" "k překladu zasílejte na " "(česky).\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "chyba zápisu" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Užití: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "Úroveň zabezpečení je třeba zadat jako desítkové celé číslo." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Úroveň zabezpečení %s je mimo převoditelný rozsah." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "úroveň zabezpečení %s má neočekávanou příponu %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "Úroveň zabezpečení slocate %ld není podporována." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Zápis na standardní výstup selhal" # TODO: plural -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dnů" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "Argument přepínače --max-database-age nesmí být prázdný" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Neplatný argument %s přepínače -max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "locate databáze %s obsahuje delší název souboru, než s jakým může locate " "zacházet" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "locate databáze %s je poÅ¡kozena nebo není platná" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" @@ -884,18 +1258,18 @@ msgstr[0] "Velikost locate databáze: %s bajt\n" msgstr[1] "Velikost locate databáze: %s bajty\n" msgstr[2] "Velikost locate databáze: %s bajtů\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Odpovídající názvy souborů: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "VÅ¡echny názvy souborů: %s\n" # TODO: plural -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -912,7 +1286,7 @@ msgstr "" "\t%s obsahuje znak nového řádku, \n" "\ta %s obsahuje znaky s nastaveným horním bitem.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -921,17 +1295,17 @@ msgstr "" "Některé názvy souborů mohly být vynechány, takže nemůžeme spočítat kompresní " "poměr.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Kompresní poměr %4.2f %% (vyšší je lepší)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Kompresní poměr není definován\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -940,7 +1314,7 @@ msgstr "" "locate databáze %s vypadá jako slocate databáze, akorát má úroveň " "zabezpečení %c, což GNU findutils zatím nepodporuje." -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -948,14 +1322,14 @@ msgid "" msgstr "" "%s je databáze slocate. Jejich podpora je nová, zatím očekávejte problémy." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" "%s je slocate databáze s nepodporovanou úrovní zabezpečení %d, vynechávám ji." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -966,36 +1340,36 @@ msgstr "" "v slocate formátu a nenulovou úrovní zabezpečení. Pro tuto databázi nebudou " "vytvořeny žádné výsledky.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s je slocate databáze. Zapínám přepínač „-e“." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "Locate databáze %s ve starém formátu je příliÅ¡ krátká na to, aby byla platná." -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Databáze %s je ve formátu %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Databáze má strojová slova kódována v malé endianitě.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "Databáze má strojová slova kódována ve velké endianitě.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Kódování strojových slov databáze není zřejmé.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1014,59 +1388,59 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " VZOR…\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "zbavení se práv skupiny selhalo" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "zbavení se setuid práv selhalo" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Zbavení se vÅ¡ech práv selhalo" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "zbavení se setgid práv selhalo" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "varování: locate databázi lze ze standardního vstupu číst jen jednou." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "služba systému time selhala" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "varování: databáze %s je více jak %d %s stará (současný věk je %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "POZOR: locate databáze %s byla sestaveno v jiném pořadí bajtů" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "neočekávaný EOF v %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "chyba při čtení slova z %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "Neplatná escape posloupnost %s v zadání oddělovače vstupu." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1075,7 +1449,7 @@ msgstr "" "Neplatná escape posloupnost %s v zadání oddělovače vstupu, hodnoty znaků " "nesmí přesáhnout %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1084,7 +1458,7 @@ msgstr "" "Neplatná escape posloupnost %s v zadání oddělovače vstupu, hodnoty znaků " "nesmí přesáhnout %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1093,7 +1467,7 @@ msgstr "" "Neplatná escape posloupnost %s v zadání oddělovače vstupu, závěrečné znaky " "%s nebyly rozeznány." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1102,43 +1476,58 @@ msgstr "" "Neplatné určení oddělovače vstupu %s: oddělovač musí být buď jediný znak, " "nebo escape posloupnost začínající \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "prostředí je na exec() příliÅ¡ velké" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "pozor: hodnota %ld přepínače -s je příliÅ¡ velká, místo toho se použije %ld" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "přepínači --%s nesmí být zadána hodnota obsahující „=“" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "nepodařilo se zruÅ¡it proměnnou prostředí %s" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "pozor: přepínač -E je bez účinku, je-li použit -0 nebo -d.\n" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Nelze nastavit obsluhu signálu SIGUSR1" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Nelze nastavit obsluhu signálu SIGUSR2" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Vstupní soubor %s nelze otevřít." -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "VaÅ¡e proměnné prostředí zabírají %' bajtů\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "Horní mez délky argumentů dle POSIXU (tento sytém): %'\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1147,17 +1536,17 @@ msgstr "" "Nejmenší možná horní mez délky argumentů dle POSIXU (vÅ¡echny systémy): " "%'\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Maximální délka příkazu, který tedy můžeme použít: %'\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Velikost bufferu příkazu, který tedy používáme: %'\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1170,7 +1559,7 @@ msgstr "" "spouÅ¡tět příkazy. Pokud to není to, co chcete, aby se dělo, prosím, " "stiskněte klávesy konce souboru.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1180,7 +1569,7 @@ msgstr "" "stiskněte klávesy přeruÅ¡ení.\n" # XXX: unmatched {single|double} quote -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1189,15 +1578,15 @@ msgstr "" "neodpovídající %s uvozovka; implicitně jsou pro xargs uvozovky zvláštními " "znaky, dokud nepoužijete přepínač -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dvojitá" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "jednoduchá" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1206,158 +1595,418 @@ msgstr "" "POZOR: Na vstupu se objevil znak NULL. Není možné jej předat do seznamu " "argumentů. Nezamýšleli jste použít přepínač --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "řádka s argumenty je příliÅ¡ dlouhá" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Zápis na standardní výstup selhal" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "/dev/tty nebylo možné otevřít pro čtení" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Zápis na standardní výstup selhal" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "nelze alokovat paměť" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "nastavení proměnné prostředí %s selhalo" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "před fork() nebylo možné vyrobit rouru" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -"čtení bufferu errna selhalo v xargs_do_exec (pravděpodobně se jedná o chybu, " -"prosím, ohlaÅ¡te to)" +"volání safe_read nad errno-buffer selhalo v xargs_do_exec (pravděpodobně se " +"jedná o chybu, prosím, ohlaste to)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" "read vrátilo neočekávanou hodnotu %d; pravděpodobně se jedná o chybu, " -"prosím, ohlaÅ¡te to" +"prosím, ohlaste to" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "chyba při čekání na proces potomka" # TODO: plural -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "POZOR: Ztracena stopa %d potomků" +msgid "WARNING: Lost track of %lu child processes" +msgstr "POZOR: Ztracena stopa %lu potomků" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: ukončen s kódem 255, končím" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: pozastaven signálem %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: ukončen signálem %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: neplatné číslo u přepínače -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: hodnota přepínače -%c by měla být >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: hodnota přepínače -%c by měla být < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=oddělovač]\n" -" [-E řet-eof] [-e[řet-eof]] [--eof[=řet-eof]]\n" -" [-L max-řádků] [-l[max-řádků]] [--max-lines[=max-řádků]]\n" -" [-I řet-nahrazení] [-i[řet-nahrazení]] [--replace[=řet-nahrazení]]\n" -" [-n max-argumentů] [--max-args=max-argumentů]\n" -" [-s max-znaků] [--max-chars=max-znaků]\n" -" [-P max-procesů] [--max-procs=max-procesů] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=soubor]\n" -" [--version] [--help] [příkaz [zahajující-argumenty]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Použití: %s [PŘEPÍNAČ]… PŘÍKAZ [ÚVODNÍ_ARGUMENTY]…\n" -#~ msgid "cannot get current directory" -#~ msgstr "současný adresář nelze zjistit" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Spustí PŘÍKAZ s ÚVODNÍMI_ARGUMENTY následovanými dalšími argumenty " +"přečtenými\n" +"ze standardního vstupu.\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Povinné a volitelné argumenty dlouhých přepínačů jsou také povinné nebo\n" +"volitelné u odpovídajících krátkých přepínačů.\n" + +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null položky jsou odděleny nulovým bajtem, " +"nikoliv\n" +" bílým znakem. Vypne zpracování uvozovek,\n" +" zpětných lomítek a konce souboru.\n" -#~ msgid "invalid argument %s for %s" -#~ msgstr "neplatný argument %s u %s" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=SOUBOR načte argumenty ze SOUBORU, ne ze\n" +" standardního vstupu\n" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "nejednoznačný argument %s u %s" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=ZNAK položky ve vstupním proudu jsou odděleny " +"ZNAKEM,\n" +" nikoliv býlím místem. Vypne zpracování " +"uvozovek,\n" +" zpětných lomítek a konce souboru.\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E KONEC Nastaví značkou logického konce souboru.\n" +" Vyskytne-li se KONEC jako řádek ve vstupu,\n" +" zbytek vstupu bude ignorován. (Tento " +"přepínač\n" +" je potlačen přepínačem -0 nebo -d.)\n" -#~ msgid "Valid arguments are:" -#~ msgstr "Platné argumenty jsou:" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=KONEC] stejné jako -E KONEC, je-li KONEC zadán.\n" +" Jinak nebude rozpoznáván žádný řetězec " +"značící\n" +" konec souboru.\n" -#~ msgid "error closing file" -#~ msgstr "chyba při zavírání souboru" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I N stejné jako --replace=N\n" -#~ msgid "Unknown system error" -#~ msgstr "Neznámá chyba systému" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=N] nahradí N v ÚVODNÍCH_ARGUMENTECH názvy\n" +" načtenými ze standardního vstupu. Není-li N\n" +" zadáno, předpokládá se {}.\n" -#~ msgid "%s: option `%s' is ambiguous\n" -#~ msgstr "%s: přepínač „%s“ není jednoznačný\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=MAXIMUM použije nejvýše MAXIMUM neprázdných " +"vstupních\n" +" řádků na každé spuÅ¡tění příkazu\n" -#~ msgid "%s: option `--%s' doesn't allow an argument\n" -#~ msgstr "%s: přepínač „--%s“ nepovoluje argument\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[MAXIMUM] podobné jako -L, ale není-li MAXIMUM zadáno,\n" +" použije se nejvýše jeden neprázdný vstupní " +"řádek\n" -#~ msgid "%s: option `%c%s' doesn't allow an argument\n" -#~ msgstr "%s: přepínač „%c%s“ nepovoluje argument\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=MAXIMUM použije nejvýše MAXIMUM argumentů na\n" +" každé spuÅ¡tění příkazu\n" -#~ msgid "%s: option `%s' requires an argument\n" -#~ msgstr "%s: přepínač „%s“ vyžaduje argument\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=MAXIMUM spustí najednou nejvýše MAXIMUM procesů\n" -#~ msgid "%s: unrecognized option `--%s'\n" -#~ msgstr "%s: nerozpoznaný přepínač „--%s“\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive před spuÅ¡těním příkazů se dotáže\n" -#~ msgid "%s: unrecognized option `%c%s'\n" -#~ msgstr "%s: nerozpoznaný přepínač „%c%s“\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=PROMĚNNÁ\n" +" nastaví PROMĚNNOU prostředí v procesech\n" +" potomků\n" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: nedovolený přepínač – %c\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty neexistují-li argumenty, PŘÍKAZ nebude\n" +" spuÅ¡těn. Není-li tento přepínač zadán, " +"PŘÍKAZ\n" +" bude spuÅ¡těn alespoň jednou.\n" -#~ msgid "%s: invalid option -- %c\n" -#~ msgstr "%s: neplatný přepínač – %c\n" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=MAXIMUM omezí délku spouÅ¡těného příkazu na MAXIMUM " +"znaků\n" -#~ msgid "%s: option requires an argument -- %c\n" -#~ msgstr "%s: přepínač vyžaduje argument – %c\n" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits zobrazí omezení na délku spouÅ¡těného příkazu\n" -#~ msgid "%s: option `-W %s' is ambiguous\n" -#~ msgstr "%s: přepínač „-W %s“ není jednoznačný\n" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr " -t, --verbose vypíše příkazy před jejich spuÅ¡těním\n" -#~ msgid "%s: option `-W %s' doesn't allow an argument\n" -#~ msgstr "%s: přepínač „-W %s“ nepovoluje argument\n" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit skončí, je-li délka (vizte -s) překročena\n" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help zobrazí tuto nápovědu a skončí\n" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version vypíše údaje o verzi a skončí\n" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Mód %s není platný, je-li zapnuto POSIXLY_CORRECT." + +#~ msgid "" +#~ "\n" +#~ "Mandatory arguments to long options are mandatory for short options too.\n" +#~ "Non-mandatory arguments are indicated by [square brackets]\n" +#~ " -0, --null Items are separated by a null, not " +#~ "whitespace.\n" +#~ " Disables quote and backslash processing\n" +#~ " -a, --arg-file=FILE Read arguments from FILE, not standard " +#~ "input\n" +#~ " -d, --delimiter=CHARACTER Input items are separated by CHARACTER, " +#~ "not by\n" +#~ " blank space. Disables quote and backslash\n" +#~ " processing\n" +#~ " -E END If END occurs as a line of input, the rest " +#~ "of\n" +#~ " the input is ignored.\n" +#~ " -e [END], --eof[=END] Equivalent to -E END if END is specified.\n" +#~ " Otherwise, there is no end-of-file string\n" +#~ " --help Print a summary of the options to xargs.\n" +#~ " -I R same as --replace=R (R must be specified)\n" +#~ " -i,--replace=[R] Replace R in initial arguments with names\n" +#~ " read from standard input. If R is\n" +#~ " unspecified, assume {}\n" +#~ " -L,-l, --max-lines=MAX-LINES Use at most MAX-LINES nonblank input lines " +#~ "per\n" +#~ " command line\n" +#~ " -l Use at most one nonblank input line per\n" +#~ " command line\n" +#~ " -n, --max-args=MAX-ARGS Use at most MAX-ARGS arguments per " +#~ "command\n" +#~ " line\n" +#~ " -P, --max-procs=MAX-PROCS Run up to max-procs processes at a time\n" +#~ " -p, --interactive Prompt before running commands\n" +#~ " --process-slot-var=VAR Set environment variable VAR in child\n" +#~ " processes\n" +#~ " -r, --no-run-if-empty If there are no arguments, run no " +#~ "command.\n" +#~ " If this option is not given, COMMAND will " +#~ "be\n" +#~ " run at least once.\n" +#~ " -s, --max-chars=MAX-CHARS Limit commands to MAX-CHARS at most\n" +#~ " --show-limits Show limits on command-line length.\n" +#~ " -t, --verbose Print commands before executing them\n" +#~ " --version Print the version number\n" +#~ " -x, --exit Exit if the size (see -s) is exceeded\n" +#~ msgstr "" +#~ "\n" +#~ "Povinné argumenty u dlouhých přepínačů jsou rovněž povinné u krátkých " +#~ "variant.\n" +#~ "Nepovinné argumenty jsou vyznačeny [hranatými závorkami].\n" +#~ " -0, --null Položky jsou odděleny nulovým znakem,\n" +#~ " nikoliv bílým místem.\n" +#~ " Vypne zpracování uvozovek a zpětných " +#~ "lomítek.\n" +#~ " -a, --arg-file=SOUBOR Argumenty načte ze SOUBORU, ne ze " +#~ "standardního\n" +#~ " vstupu\n" +#~ " -d, --delimiter=ZNAK Vstupní položky jsou odděleny ZNAKEM, " +#~ "nikoliv\n" +#~ " bílým místem. Vypne zpracování uvozovek a\n" +#~ " zpětných lomítek\n" +#~ " -E KONEC Pokud KONEC představuje řádek vstupu, " +#~ "zbytek\n" +#~ " vstupu bude ignorován.\n" +#~ " -e [KONEC], --eof[=KONEC] Stejné jako -E KONEC, je-li KONEC zadán.\n" +#~ " Jinak neexistuje žádný řetězec pro konec\n" +#~ " souboru.\n" +#~ " --help Vypíše přehled přepínačů nástroje xargs.\n" +#~ " -I R Stejné jako --replace=R (R musí být " +#~ "uvedeno)\n" +#~ " -i,--replace=[R] Nahradí R v úvodních argumentech názvy\n" +#~ " přečtenými ze standardního vstupu. Není-li " +#~ "R\n" +#~ " uvedeno, předpokládá se „{}“.\n" +#~ " -L,-l, --max-lines=MAXIMUM Použije nejvýše MAXIMUM neprázdných " +#~ "vstupních\n" +#~ " řádků na jeden řádek příkazu.\n" +#~ " -l Použije nejvýše jeden neprázdný vstupní " +#~ "řádek\n" +#~ " na jeden řádek příkazu.\n" +#~ " -n, --max-args=MAXIMUM Použije nejvýše MAXIMUM argumentů na " +#~ "řádek\n" +#~ " příkazu\n" +#~ " -P, --max-procs=MAXIMUM Spustí nejvýše MAXIMUM procesů najednou\n" +#~ " -p, --interactive Před spuÅ¡těním příkazu se dotáže\n" +#~ " --process-slot-var=PROMĚNNÁ Nastaví proměnnou prostředí PROMĚNNÁ " +#~ "v procesu\n" +#~ " potomka\n" +#~ " -r, --no-run-if-empty Jestliže neexistují žádné argumenty, " +#~ "nespustí\n" +#~ " žádný příkaz.\n" +#~ " Není-li tento přepínač zadán, PŘÍKAZ bude\n" +#~ " spuÅ¡těn alespoň jednou.\n" +#~ " -s, --max-chars=MAXIMUM Omezí příkazy na MAXIMUM znaků\n" +#~ " --show-limits Zobrazí omezení na délku příkazového " +#~ "řádku\n" +#~ " -t, --verbose Před každým spuÅ¡těním příkazu jej vypíše\n" +#~ " --version Zobrazí číslo verze\n" +#~ " -x, --exit Skončí, pokud by velikost (vizte -s) byla\n" +#~ " překročena\n" -#~ msgid "`" -#~ msgstr "„" +#~ msgid "cannot get current directory" +#~ msgstr "současný adresář nelze zjistit" -#~ msgid "'" -#~ msgstr "“" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Sestaveno za použití GNU gnulib verze %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=oddělovač]\n" +#~ " [-E řet-eof] [-e[řet-eof]] [--eof[=řet-eof]]\n" +#~ " [-L max-řádků] [-l[max-řádků]] [--max-lines[=max-řádků]]\n" +#~ " [-I řet-nahrazení] [-i[řet-nahrazení]] [--replace[=řet-" +#~ "nahrazení]]\n" +#~ " [-n max-argumentů] [--max-args=max-argumentů]\n" +#~ " [-s max-znaků] [--max-chars=max-znaků]\n" +#~ " [-P max-procesů] [--max-procs=max-procesů] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=soubor]\n" +#~ " [--version] [--help] [příkaz [zahajující-argumenty]]\n" + +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: nedovolený přepínač – %c\n" #~ msgid "Success" #~ msgstr "Úspěch" @@ -1412,21 +2061,3 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Žádný předchozí regulární výraz" - -#~ msgid "^[yY]" -#~ msgstr "^[aA]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "paměť vyčerpána" - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "neplatný argument „%3$s“ u %1$s%2$s" - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "neplatná přípona argument „%3$s“ u %1$s%2$s" - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "příliÅ¡ dlouhý argument „%3$s“ u %1$s%2$s" diff --git a/po/da.gmo b/po/da.gmo index cf1094e67cf94abc9abbe21bb307bb1e9a9d3966..c042d6747e86d9c39b86aa7a6b427d48b6985006 100644 GIT binary patch delta 4820 zcmZA43s6+o8Nl(guz)WFWEI5+s{$esdH6u_0Y;;u#0RLL6m@|sAj_^Si-KC#_=*~h znhi0U)WoRK3dYCPNMcOln8rA5Oq-czoYtn*n9<2(9NKYOYmDvx+k4TBXZ-k`bN24N z=kc8j?)ZU3-4eiX4;e*gl?PisUcKep<^w6h_P}(Po=z=kMVdJVI*%`{zsDYTn0 z4lm(A{0{9H!YIaLB6i0zoQNLe5_Jk?B3Dqpe+y-xRvso38ICfrxjrg7m2%9*-h8V& zQz*r;v}+lzjI;%1247)6wD3a)FaS%j*z{v8qdl;{QtNON@=t{hFa{cr-DrCcg#~=61z$#X zQDw0_Avn);5%OHM6xkhBisYa2i9BDuMn#tVI8MOtaWW1bW-M_92C^Bu(%)*f+fY{E zirK!6tg^a~R*Yr(p%{nKpNNul(@_Rej6PY41}bc;+JSQ6ag>34WwyhI8+)FLa$Pan zagFJl$S$c1C|h|0*&WrJW#z=G2^fO~C|g&JGVsl*tiO!t5FK;y9Lfzk@g{O%HcGO* zhw}L~jKHBB1@cpkMM=UUlqKDcQ}7_NYw8Ye!6^1K689k|QMI7l_p=PvpZrjF>9C`X zyIsXmC@Wzl0Xkb)I+TH>jWU+B0s}7`>`wn)lz|<^p}M7B-kqXjpj?A>PUfqTr) zkD)B(b(HTtM9GPi=ZuxgL-J5HpnQG=6Yv_!b&oJk&VT=@#sepy?4=u74Aq2^EEiB_ z@(m8gc9a3yrWrS!iZQgEcpf(*V^KNNxsDlZ!kM(s!q&mg~O55)mIUoD}MgH5R6 zC#DH}tDN>rxE0$`j?L;kW1z2NH`+&#XR0$O19^yyQQ4k1-l)asqTP&=Bi32`LcAr$an?+grCtKvCufT_c4Ta_#)%HMkCKv zeX$?*#~92q%|}j}T8^?M?;?4o?jqZ-Mlu^o;wFs4-99SOR8CReTs5jJ4!P5C^4>^i?V{XD9P;GOC_Gl1=E`-Hws&9 z?9p(Pfvv_^JdE<-Pq8mvLm9w5j6mBGwgcla4OinbY{3E8W2vzc>Bz)=Y7Lb*KG=zw zcmi#B8`*yK5G6_HIQZ3!O(+BDTWV~9~*GFqJbXGZ~K~`9dDbjbC6Ik$3+DodzHrfBfCne#XMitQkjf@L>Z}#jFcH?q9l!mKj8_yjV;w2CG3f8*A6i=|l@LmS`l-5M7CmvfqC(JUX!9((?-8C5B4lsZvCH zoZ08c_lY{zT% zRI@V8wAM5SM-dGK$0|?~`S}L1ga{|1h>gSuLP}pEPhJ%rYc8G75(|hqL_Tqlm`lVG zGl|1~OGJ$C05vHIL_cCH!Hv{e;vCV9I7LYL4Y4IqGkz>J>q*#|C^6d|=w@YzX|AaY zWwYKA`kS3`DC?&)hkGP!WF)^Bi5y}cQAw;Nb`h<_7sPdB#>B}~{o}6k~Ho5Wd-TwWNvH8KZ#xBTZVdh7P^vPaI>A2T&`eqqjkNZBPZ_HDD z_iFVnQJaGNr)_=o^|l*9mLdMqm_q$}%-=2gtv;7S^y_gkR{d}BZ9#op)h_ocm%XmB z&a2hfHIK*bQS<8@6`KF*qFBE^WR*TH`6G*Mfx}rT5KYw~m^YrQ3&jgOe8* zyJnTB#l?*aOVm>3s41X()Xs%1`hU6rfCzO2fr>8H{M z1$BOM&BYPDf+MsVx2MsrHB>t48CJRe=h2&k^dn;jbP6Atl9rj0KGvR|o|TcQe?94L zuzq0bxL_vu*W4m~;S6h#zBO+|s3p(;r=`()R6&AO?_YF0C~AJS<|_A^(_E%4clxg^ zYStS|&RTj-Yjl=ZRcQ7V4v(Wo^LjK^Axke?axi$7s&9RD>${Vy&X3Q)^nsSMA75J7a5=K5W&F*0#)OwYL5Kd+#O@N2jkd{Q3U# z-}Cs-fBy3?2Y;7!<40M^H%AY?B}*yw6fz5W=Om@FFzh)M(%(B$sUh$nd;yV`pGzN} z1&iQI@Ne)qybgXaTB+0E);y(Nhd05c&>W*wEj$G0!K|?=sV1S!AFI?fxDj3kuY%)c zz&NEGm=CAG9Z<$U2~UTw!!zMupg1yuUC)MPa1?BT_@W$G0oW)g^sj&u;3IG%d=+Z=Av_=EGI<27g%`j^$dc+#I2}F#OVK=OX#ke_wd+37m>0h1iIs5}CC;BbqpBj6X=g4f>Oh4}PC~To$ zTEHRTZiq>Z#|v>dS%xwUWeF6|>!Em_f|3sh;9U3yoCou?QW3Ze&Vgz86nqDs1NRV~ zbKxs+9hB2`g9a!YzXlh=Kfwm}S2KzK`53N)5|SUocVz&Sg`uo}9WN#@)`sMkSps7ylGH@`*6Gx^(>4%}*?KM!w9fBGj_4!xGZK*MMD_2zpxiuAsykxZ# zo(3O+;_!2DG(2`L_rDV5uNY)vCGm{GOQBrBdr-cQDOGADG$0AA5|AlsCzMdW0OjuA zf|46kSnN7j19_q9=TO%B6C_>K8H8KIh4YC2t0fZ6ldeAxr{NYj9$o__a`(a^@P}|5d@+f#4&@kJ2+Md1 z)hyHvB?q449whWRyv;3eHk4<&mp{B9^;<~3sT?LRf^*=nVFJDl*I|^LDX;LZq8i@L z`b{v6J^9IEFKZuRx6d#X5J$=S{3`BtZHCvwdGI*= z5iD-@-u0iMggB?gV*xym{#+|0f)drB*a8`D(r>GRlY(C6pQp zk3)&nKOyV8(b@!;BGTk-%d?eh`Y!TK}%@Ktr zQQ!GN2{hP)@``R1`Vm zW@i(W?3Z>K!t-|P!&73QjrHK(w_H^Pvd*_jow&%?2SP$GO|I}BWR!H|{xfY6%Do8J z-q#kQNwQ?xIFzp=HzExPk3rpvNV@>}8ghel2DD}9CnG}!*sejp8JV`xH%g|;`^&u#Qrw2(R!;nn7Gxgf=yySkmk0Lt|63YE;1a7;_ zr+6W$EA87J6iMj*+(~z~ZxcL>T#2+I268_l?Kb2aNIODxR1YGwq&me@)Z;!^!CQQN z2D}~F;PiNzQ18#I~xu~LVaH-_vnZG zev!}RK4Va_@c}`BZ`4q7XG|CWJ0FQc*5)I#kV>Qhi6U1ZcOr+8SCC`KapdG&#xpk) zyD=;wP15Y2v>W)Ax%kYZdQsevkNZeC87NJh5Zh5~nE+?|wo?e#QW-?c*j8i9WKG6) zEjF&hZ5i8PZ1TvYWt^KR86%q&_oN;fHNGyq&AUt)BacWvU5jn87-*TbUdAS+Mq0*p z=B3^b{6O29OVi_Xug*?tw*_MHgl$+FMyzZI&|=yKx55{ z$|@bOjEK>l`8w2J!ZJePP;=DKfvuM5c$(2|v?N?TGiqyFJZi*39fmi3gRE|w+YDVB zY;M`wUbCc82OKNGDo#(Qp)rO#TcdU*=7bs6wV8ErmmWrOySAbRuev`sqcMGV-ly5A zJI1Y@v^Zf#9i6bvSVS+WU85thMAU57U4~_w@t7{Oho(OqcPwk788aO-6g6!_+ifAs z2nSkC&eImM+q8R#^b4o|^rTre@vy-pZQ42(cXSss!g_0)5z{MItgdcYzP{ zlV(iPaZ5*usd$a*SRpeidP_VSkJ&}(2Pb_$d$1jf7^zY9<5Rl}wBM`^Va@!!2BJ|5&%@4)*N*qgT44JFR#Nqa_ZqwA*!u`ya5| zZOQmn;y`Ha0jCR)WzBKhy9T4%blmgA;sGlW3z)3|qodR5ac#Ki=3BWW-3cp5p1OnD zjA$oHOT42a6btL1pR#h;L{5hhWAAj<)R(i0)>YKiR@W|BpqIyON0O(dUB_E>VOY1c znbEKo#|_&y?DVl|&Y*PioL90|;Z<{@wUq}YZ&|mJa6B?Irn@DCP2qTxyk|*P5}SXl z(abyV(IMTOh!pEi(v`Qv9mOrO*(pkI2u#XO-!^mbp!C7nS7k4Am$eKhVZ~TD5i`0w zjTQ%$H^h@K44yd*HIG*D8aXU$(wT9yu$e=z8)3tCO@uG-a!E3jpW-^BF@+hU^iNWo=ue7huNy+Q~ za1u$dp8!YutmZn_vt?U-P^5o|~*lk}Zf5h;=s($?klldpszILzn#dCF#7+Q{d zYQwRN#`L%Ad$UR_D%V!jt*%CJ2J zACz9OVOn-F+Plw|iy`~CCab?Fc9?dwhZhkxsD3Bb#IQl0%A2uyKz2_oYDT&!kvt{# zh;T2h#^z`-#WZY%I;B4LK4|g$V*D>e#@bGik`cNqo!r=-oz7_*J19N3d0Y18fi=_h dUnV7(Mcp)XSMNS6Y`T^6fA%2#X!!Es{{k;3dBp$# diff --git a/po/da.po b/po/da.po index 0197d8f..6c70036 100644 --- a/po/da.po +++ b/po/da.po @@ -17,7 +17,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.5.7\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2010-07-17 21:51+0200\n" "Last-Translator: Ask Hjorth Larsen \n" "Language-Team: Danish \n" @@ -27,32 +27,71 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "" +"kunne ikke vende tilbage til oprindeligt arbejdskatalog efter søgning i %s" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Kan ikke lukke standard-inddata" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Kunne ikke ændre katalog" + +# der er plads nok at tage af +#: find/exec.c:312 xargs/xargs.c:1229 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "cannot fork" +msgstr "kan ikke fraspalte en ny proces" + +# ditto, ingen grund til kryptiskhed +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "fejl i forbindelse med at vente pÃ¥ %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s afsluttet af signal %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" msgstr "Kunne ikke klargøre hashtabel som delt fil" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "fornuftighedstjek af biblioteksfunktionen fnmatch() mislykkedes." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "kan ikke køre stat() pÃ¥ aktuelle katalog" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "Kan ikke læse listen af monterede enheder." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "ADVARSEL: Filsystemet %s er blevet afmonteret for nylig." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "ADVARSEL: Filsystemet %s er blevet monteret for nylig." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -61,7 +100,7 @@ msgstr "" "%s%s ændrede sig under kørsel af %s (tidligere enhedsnummer %ld, nyt " "enhedsnummer %ld, filsystemtype er %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -70,17 +109,17 @@ msgstr "" "%s%s ændrede sig under kørsel af %s (tidligere inode-nummer %, nyt " "inode-nummer %, filsystemtype er %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "kunne ikke vende tilbage til ophavskatalog" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Kunne ikke pÃ¥ sikker vis skifte til kataloget %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -89,7 +128,7 @@ msgstr "" "Den symbolske lænke %s er del af en løkke i kataloghierarkiet; kataloget, " "den peger pÃ¥, er allerede blevet besøgt." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -104,12 +143,12 @@ msgstr[1] "" "Filsystemsløkke fundet; %s har det samme enhedsnummer og indekseringsknude " "(inode) som et katalog, der er %d niveauer højere oppe i filsystemhierarkiet" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "advarsel: kunne ikke følge det symbolske link %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -124,12 +163,12 @@ msgstr "" "noleaf til. Tidligere resultater kan fejlagtigt have udeladt kataloger som " "skulle have været gennemsøgt." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "Kan ikke læse listen af monterede filsystemer" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "ukendt" @@ -139,7 +178,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "Filsystemsløkke fundet; %s er del af samme filsystemsløkke som %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "ADVARSEL: Filen %s synes at have tilstand 0000" @@ -150,13 +189,18 @@ msgstr "ADVARSEL: Filen %s synes at have tilstand 0000" msgid "cannot search %s" msgstr "kan ikke søge i %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "" "kunne ikke vende tilbage til oprindeligt arbejdskatalog efter søgning i %s" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Kunne ikke klargøre hashtabel som delt fil" + +#: find/parser.c:452 #, fuzzy, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -167,7 +211,7 @@ msgstr "" "depth er givet. Hvis du alligevel vil fortsætte, sÃ¥ giv tilvalget -depth " "eksplicit." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -179,7 +223,7 @@ msgstr "" "tilvalg, men tilvalg er ikke positionsafhængige (tilvalget %s pÃ¥virker bÃ¥de " "test angivet før og efter det); angiv venligst tilvalg før andre parametre.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -188,7 +232,7 @@ msgstr "" "advarsel: tilvalget -d er forældet; benyt -depth i stedet som er i " "overenstemmelse med POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -197,17 +241,17 @@ msgstr "" "%s er ikke navnet pÃ¥ en eksisterende gruppe, og ligner heller ikke en " "numerisk gruppe-id pÃ¥ grund af det uventede suffiks %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s er ikke navnet pÃ¥ en eksisterende gruppe" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "parameteren til -group er tom, men bør være et gruppenavn" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -217,7 +261,7 @@ msgstr "" "hvis ikke andet angivet er stien det aktuelle katalog og udtrykket -print\n" "udtryk kan bestÃ¥ af: operatorer, tilvalg, test og handlinger:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -228,7 +272,7 @@ msgstr "" " ( UDTR ) ! UDTR -not UDTR UDTR1 -a UDTR2 UDTR1 -and UDTR2\n" " UDTR1 -o UDTR2 UDTR1 -or UDTR2 UDTR1 , UDTR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -242,7 +286,7 @@ msgstr "" " -depth --help -maxdepth NIVEAUER -mindepth NIVEAUER -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -256,9 +300,10 @@ msgstr "" "MØNSTER\n" " -links N -lname MØNSTER -mmin N -mtime N -name MØNSTER -newer FIL" -#: find/parser.c:1244 +#: find/parser.c:1239 +#, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -268,11 +313,11 @@ msgstr "" " -wholename MØNSTER -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAVN -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context KONTEKST\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -286,7 +331,7 @@ msgstr "" " -exec KOMMANDO ; -exec KOMMANDO {} + -ok KOMMANDO ;\n" " -execdir KOMMANDO ; -execdir KOMMANDO {} + -okdir KOMMANDO ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -296,12 +341,12 @@ msgstr "" "pÃ¥ http://savannah.gnu.org/ eller, hvis du ikke kan tilgÃ¥ denne, ved\n" "at sende et brev til ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "fornuftighedstjek af biblioteksfunktionen fnmatch() mislykkedes." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -316,49 +361,44 @@ msgstr "" "brugbar. Alternativt kan du hvis du bruger GNU grep, benytte 'find ... -" "print0 | grep -FzZ %s'." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "Forventede et positivt heltal som parameter til %s, men fik %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" "Dette system giver ikke mulighed for at finde en fils oprettelsestidspunkt." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "Testen %s kræver en parameter" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" "Jeg kan ikke finde ud af hvordan %s skal fortolkes som dato eller tidspunkt" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Kan ikke hente oprettelsestidspunkt for filen %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "advarsel: -%s %s vil ikke matche noget, da det slutter med /." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Tilstanden %s er ikke gyldig nÃ¥r POSIXLY_CORRECT er slÃ¥et til." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "ugyldig tilstand %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -370,22 +410,22 @@ msgstr "" "perm -000; dette vil sige, at mens det før ikke matchede nogen filer, " "matcher det nu alle filer." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "ugyldig tom parameter til -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "ugyldig -size type '%c'" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "Ugyldig parameter '%s%c' til -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -393,75 +433,83 @@ msgstr "" "Tilvalget -show-control-chars kræver en enkelt parameter som skal være " "'literal' eller 'safe'" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Ugyldig parameter %s til -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "%s er ikke navnet pÃ¥ en kendt bruger" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "Parameteren til -user bør ikke være tom" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Faciliteter aktiveret: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "ugyldigt prædikat -context: SELinix er ikke aktiveret." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Parameteren til -type bør indeholde kun ét tegn" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Ukendt parameter til -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "advarsel: ukendt undvigetegn '\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "fejl: formatstreng slutter med %s" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "advarsel: ukendt formatteringsdirektiv '%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "fejl: formatdirektivet '%%%c' er reserveret til fremtidig brug" +msgid "Unknown argument to -type: %c" +msgstr "Ukendt parameter til -type: %c" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Det aktuelle katalog er medtaget i miljøvariablen PATH hvilket er usikkert " "nÃ¥r det kombineres med handlingen %s til find. Fjern venligst det aktuelle " "katalog fra din $PATH (dvs. fjern \".\" eller begyndende og afsluttende " "koloner)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -472,7 +520,7 @@ msgstr "" "nÃ¥r det kombineres med handlingen %s til find. Fjern venligst det aktuelle " "katalog fra din $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -481,98 +529,101 @@ msgstr "" "Det kan ikke bruge {} i programnavnet for -execdir og -okdir fordi der er et " "potentielt sikkerhedsproblem." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Kun en forekomst af {} er understøttet med -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Miljøet er for stort til exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "aritmetisk overløb ved konvertering af %s dage til et antal sekunder" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "aritmetisk overløb ved forsøg pÃ¥ at udregne denne dags sluttidspunkt" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "standardfejl" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "standard-uddata" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "kan ikke slette %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "" -"kunne ikke vende tilbage til oprindeligt arbejdskatalog efter søgning i %s" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "getfilecon mislykkedes: %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "ADVARSEL: Kan ikke bestemme oprettelsestidspunkt for filen %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Kunne ikke skrive til standard-uddata" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Kan ikke lukke standard-inddata" +msgid "getfilecon failed: %s" +msgstr "getfilecon mislykkedes: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Kunne ikke ændre katalog" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -# der er plads nok at tage af -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "kan ikke fraspalte en ny proces" +msgid "warning: unrecognized escape `\\%c'" +msgstr "advarsel: ukendt undvigetegn '\\%c'" -# ditto, ingen grund til kryptiskhed -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "fejl i forbindelse med at vente pÃ¥ %s" +msgid "error: %s at end of format string" +msgstr "fejl: formatstreng slutter med %s" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s afsluttet af signal %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "fejl: formatdirektivet '%%%c' er reserveret til fremtidig brug" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "advarsel: ukendt formatteringsdirektiv '%%%c'" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "ugyldigt udtryk" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -580,22 +631,22 @@ msgid "" msgstr "" "ugyldigt udtryk; du har brugt den binære operator '%s' uden noget foran." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "forventede et udtryk mellem '%s' og ')'" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "forventede et udtryk efter '%s'" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "ugyldigt udtryk; for mange ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -604,12 +655,12 @@ msgstr "" "ugyldigt udtryk; forventede en ')', men fandt ingen. MÃ¥ske skal du bruge et " "ekstra udsagn efter '%s'" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "ugyldigt udtryk; tomme parenteser tillades ikke." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -618,114 +669,114 @@ msgstr "" "ugyldigt udtryk; jeg forventede at finde en ')' et eller andet sted, men " "fandt ingen." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "ups - ugyldig udtrykstype!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "ups - ugyldig udtrykstype (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "stier skal stÃ¥ før udtrykket: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "ukendt udsagn '%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "ugyldigt udsagn '%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "ugyldig parameter '%s' til '%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "manglende parameter til '%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "du har for mange ')'" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "uventet ekstra udsagn '%s'" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "uventet ekstra udsagn" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "ups - ugyldig automatisk indsættelse af 'and'!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Brug: %s [-H] [-L] [-P] [-Oniveau] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [sti...] [udtryk]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "kan ikke hente det aktuelle arbejdskatalog" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "kan ikke hente det aktuelle arbejdskatalog" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Ignorerer ukendt fejlsøgningsflag %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Tom parameter til -D-tilvalget." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "Tilvalget -O skal følges umiddelbart af et heltal" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Angiv venligst et heltal umiddelbart efter -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Ugyldigt optimeringsniveau %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -734,7 +785,7 @@ msgstr "" "Optimeringsniveauet %lu er for højt. Hvis du vil finde filer meget hurtigt, " "sÃ¥ overvej at bruge GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -743,65 +794,382 @@ msgstr "" "Miljøvariablen FIND_BLOCK_SIZE er ikke understøttet, det eneste der pÃ¥virker " "blokstørrelsen er miljøvariablen POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "ugyldig parameter %s til %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "tvetydig parameter %s til %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Gyldige parametre er:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "fejl ved lukning af fil" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "skrivefejl" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Ukendt systemfejl" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: tilvalget '%s' er tvetydigt\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: tilvalget '--%s' mÃ¥ ikke have en parameter\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: tilvalget '%c%s' mÃ¥ ikke have en parameter\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: tilvalget '%s' skal have en parameter\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: ukendt tilvalg '--%s'\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: ukendt tilvalg '%c%s'\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: ugyldigt tilvalg - %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: tilvalget skal have en parameter - %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: tilvalget '-W %s' er tvetydigt\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: tilvalget '-W %s' skal ikke have en parameter\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: tilvalget '%s' skal have en parameter\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "kan ikke hente det aktuelle arbejdskatalog" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "kan ikke hente det aktuelle arbejdskatalog" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "'" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +# tillad bÃ¥de 'j' eller 'J' sÃ¥vel som 'y' eller 'Y' til ja/nej-spørgsmÃ¥l +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yYjJ]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "løbet tør for hukommelse" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "ugyldig %s%s-parameter '%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "ugyldigt suffiks i %s%s-parameteren '%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "%s%s-parameteren '%s' er for stor" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "kommando for lang" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "kan ikke kalde exec() pÃ¥ grund af begrænsninger pÃ¥ argumentstørrelser" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "kan ikke indpasse enkelt parameter inden for parameterlistestørrelsen" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "parameterliste for lang" # decimal -- titalssystemet eller decimaltal? Lidt uklart, vælger den 'sikre', mindre informative formulering -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "Miljøvariablen %s er ikke sat til et gyldigt tal" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Kunne ikke skrive til standard-uddata" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Kompileret med GNU gnulib version %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Ukendt type af regulært udtryk %s; gyldige typer er %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "Uventet suffiks %s pÃ¥ %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" msgstr "Forventede et heltal: %s" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Ukendt type af regulært udtryk %s; gyldige typer er %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -810,8 +1178,8 @@ msgstr "" "Brug: %s [--version | --help]\n" "eller %s mest-brugte-bigrammer < fil-liste > locate-database\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -820,86 +1188,81 @@ msgstr "" "Rapportér programfejl til \n" "Rapportér oversættelsesfejl til \n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "skrivefejl" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Brug: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "Du skal angive et sikkerhedsniveau i form af et heltal." # convertible? Dette mÃ¥ være o.k. -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Sikkerhedsniveauet %s er uden for det meningsfulde interval." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "Sikkerhedsniveauet %s har uventet suffiks %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "Sikkerhedsniveauet %ld for slocate understøttes ikke." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Kunne ikke skrive til standard-uddata" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dage" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "Parameteren for tilvalget --max-database-age mÃ¥ ikke være tom" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Ugyldig parameter %s til tilvalget --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "locate-databasen %s indeholder et filnavn, der er længere end locate kan " "hÃ¥ndtere" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "locate-databasen %s er ødelagt eller ugyldig" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Locate-databasestørrelse: %s byte\n" msgstr[1] "Locate-databasestørrelse: %s byte\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Matchende filnavne: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Alle filnavne: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -916,7 +1279,7 @@ msgstr "" "\t%s indeholder linjeskiftstegn, \n" "\tog %s indeholder tegn med den høje bit givet.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -925,17 +1288,17 @@ msgstr "" "Visse filnavne kan være filtreret ud, sÃ¥ vi kan ikke beregne " "komprimeringsforholdet.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Komprimeringsforhold %4.2f%% (større er bedre)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Komprimeringsforholdet er udefineret\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -945,7 +1308,7 @@ msgstr "" "sikkerhedsniveau %c, hvilket GNU findutils ikke understøtter pÃ¥ nuværende " "tidspunkt" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -954,7 +1317,7 @@ msgstr "" "%s er en slocate-database. Understøttelse for disse er ny, sÃ¥ forvent " "problemer indtil videre." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -962,7 +1325,7 @@ msgstr "" "%s er en slocate-database med sikkerhedsniveauet %d, som ikke understøttes; " "springer over." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -973,35 +1336,35 @@ msgstr "" "formaterede databaser med sikkerhedsniveau forskelligt fra nul. Ingen " "resultater vil blive genereret for denne database.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s er en slocate-database. SlÃ¥r '-e'-tilvaget til." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "Locate-databasen %s med gammelt format er for kort til at være gyldig" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Database %s er i formatet %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Databasen bruger lille-endian kodning af maskinord.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "Databasen bruger stor-endian kodning af maskinord.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Databasens kodning af maskinord er ikke Ã¥benlys.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1020,59 +1383,59 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " mønster...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "kunne ikke afgive gruppeprivilegier" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "kunne ikke afgive setuid-privilegier" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Kunne ikke fuldt afgive privilegier" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "kunne ikke afgive setgid-privilegier" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "advarsel: locate-databasen kan kun læses fra standard-ind en gang." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "systemkaldet time() mislykkedes" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "advarsel: databasen %s er mere end %d %s gammel (faktisk alder er %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "ADVARSEL: locate-databasen %s blev bygget med en anden byte-orden" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "uventet EOF i %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "fejl ved læsning af ord fra %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "Ugyldig undvigesekvens %s i angivelse af skilletegn for inddata." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1081,7 +1444,7 @@ msgstr "" "Ugyldig undvigesekvens %s i angivelse af skilletegn for inddata; tegnværdier " "mÃ¥ ikke overstige %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1090,7 +1453,7 @@ msgstr "" "Ugyldig undvigesekvens %s i angivelse af skilletegn for inddata; tegnværdier " "mÃ¥ ikke overstige %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1099,7 +1462,7 @@ msgstr "" "Ugyldig undvigesekvens %s i angivelse af skilletegn for inddata; afsluttende " "tegn %s genkendes ikke." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1108,44 +1471,59 @@ msgstr "" "Ugyldig angivelse af skilletegn %s for inddata: skilletegnet skal være enten " "et enkelt tegn eller en undvigesekvens, der begynder med \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "miljø for stort til at eksekvere" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "advarsel: værdien %ld for tilvalget -s er for stor - bruger %ld i stedet" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Kan ikke Ã¥bne inddatafilen %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "Dine miljøvariable fylder % byte\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" "Øvre grænse pÃ¥ parameterlængde ifølge POSIX (dette system): %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1154,17 +1532,17 @@ msgstr "" "Mindste øvre grænse for parameterlængde tilladt af POSIX (alle systemer): " "%\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Maksimal længde af kommando der faktisk kunne bruges: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Størrelsen af kommandobufferen, som faktisk bruges: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1177,7 +1555,7 @@ msgstr "" "og køre kommandoer; hvis dette ikke er hvad du ønsker, sÃ¥ skriv et " "filsluttegn (end-of-file).\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1186,7 +1564,7 @@ msgstr "" "Advarsel: %s vil blive kørt mindst én gang. Hvis du ikke ønsker at dette " "skal ske, sÃ¥ skriv afbrydelsestegnet (interrupt).\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1195,15 +1573,15 @@ msgstr "" "uafbalanceret citationstegn %s; som standard er citationstegn specielle for " "xargs medmindre du bruger tilvalget -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dobbelt" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "enkelt" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1212,159 +1590,267 @@ msgstr "" "ADVARSEL: Der var et NUL-tegn i inddata. Dette kan ikke videregives gennem " "parameterlisten. Ønskede du at bruge tilvalget --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "parameterlinje for lang" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Kunne ikke skrive til standard-uddata" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "kunne ikke Ã¥bne /dev/tty til læsning" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Kunne ikke skrive til standard-uddata" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "kunne ikke oprette dataledning (pipe) før fork" -#: xargs/xargs.c:1184 -#, c-format +#: xargs/xargs.c:1289 +#, fuzzy, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" "læsning af errno-buffer mislykkedes i xargs_do_exec (dette er sandsynligvis " "en programfejl, indrapportér den venligst)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" "read returnerede den uventede værdi %d; dette er sandsynligvis en " "programfejl, indrapportér den venligst" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "fejl i forbindelse med at vente pÃ¥ afkomproces" -#: xargs/xargs.c:1362 -#, c-format -msgid "WARNING: Lost track of %d child processes" +#: xargs/xargs.c:1468 +#, fuzzy, c-format +msgid "WARNING: Lost track of %lu child processes" msgstr "ADVARSEL: Kunne ikke holde rede pÃ¥ %d underprocesser" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: stoppede med status 255; afbryder" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: standset af signal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: afsluttet af signal %d" # omvendt ordstilling for at undgÃ¥ sammensætningsproblem -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: ugyldig værdi til tilvalget -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: Værdien for tilvalget -%c skal være >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: Værdien for tilvalget -%c skal være < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Brug: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=skilletegn]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L makslinjer] [-l[makslinjer]] [--max-lines[=makslinjer]]\n" -" [-I erstatnings-str] [-i[erstatnings-str]] [--replace[=erstatnings-" -"str]]\n" -" [-n maks-param] [--max-args=maks-param]\n" -" [-s maks-tegn] [--max-chars=maks-tegn]\n" -" [-P maks-proc] [--max-procs=maks-proc] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fil]\n" -" [--version] [--help] [kommando [startparametre]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "kan ikke hente det aktuelle katalog" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "ugyldig parameter %s til %s" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "tvetydig parameter %s til %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Gyldige parametre er:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "error closing file" -#~ msgstr "fejl ved lukning af fil" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Ukendt systemfejl" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#~ msgid "%s: option `%s' is ambiguous\n" -#~ msgstr "%s: tilvalget '%s' er tvetydigt\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#~ msgid "%s: option `--%s' doesn't allow an argument\n" -#~ msgstr "%s: tilvalget '--%s' mÃ¥ ikke have en parameter\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#~ msgid "%s: option `%c%s' doesn't allow an argument\n" -#~ msgstr "%s: tilvalget '%c%s' mÃ¥ ikke have en parameter\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#~ msgid "%s: option `%s' requires an argument\n" -#~ msgstr "%s: tilvalget '%s' skal have en parameter\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#~ msgid "%s: unrecognized option `--%s'\n" -#~ msgstr "%s: ukendt tilvalg '--%s'\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#~ msgid "%s: unrecognized option `%c%s'\n" -#~ msgstr "%s: ukendt tilvalg '%c%s'\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: ugyldigt tilvalg - %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#~ msgid "%s: invalid option -- %c\n" -#~ msgstr "%s: ugyldigt tilvalg - %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" -#~ msgid "%s: option requires an argument -- %c\n" -#~ msgstr "%s: tilvalget skal have en parameter - %c\n" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" -#~ msgid "%s: option `-W %s' is ambiguous\n" -#~ msgstr "%s: tilvalget '-W %s' er tvetydigt\n" +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" -#~ msgid "%s: option `-W %s' doesn't allow an argument\n" -#~ msgstr "%s: tilvalget '-W %s' skal ikke have en parameter\n" +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Tilstanden %s er ikke gyldig nÃ¥r POSIXLY_CORRECT er slÃ¥et til." -#~ msgid "`" -#~ msgstr "'" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Kompileret med GNU gnulib version %s\n" -#~ msgid "'" -#~ msgstr "'" +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Brug: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=skilletegn]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L makslinjer] [-l[makslinjer]] [--max-lines[=makslinjer]]\n" +#~ " [-I erstatnings-str] [-i[erstatnings-str]] [--replace[=erstatnings-" +#~ "str]]\n" +#~ " [-n maks-param] [--max-args=maks-param]\n" +#~ " [-s maks-tegn] [--max-chars=maks-tegn]\n" +#~ " [-P maks-proc] [--max-procs=maks-proc] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fil]\n" +#~ " [--version] [--help] [kommando [startparametre]]\n" + +#~ msgid "cannot get current directory" +#~ msgstr "kan ikke hente det aktuelle katalog" + +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: ugyldigt tilvalg - %c\n" #~ msgid "Success" #~ msgstr "Succes" @@ -1420,25 +1906,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Intet foregÃ¥ende regulært udtryk" -# tillad bÃ¥de 'j' eller 'J' sÃ¥vel som 'y' eller 'Y' til ja/nej-spørgsmÃ¥l -#~ msgid "^[yY]" -#~ msgstr "^[yYjJ]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "løbet tør for hukommelse" - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "ugyldig %s%s-parameter '%s'" - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "ugyldigt suffiks i %s%s-parameteren '%s'" - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "%s%s-parameteren '%s' er for stor" - #~ msgid "block size" #~ msgstr "blokstørrelse" diff --git a/po/de.gmo b/po/de.gmo index 48e5322260d95685d7dfb07607ef73edead43b29..5003addb16f21602c2ca9480e6a6abab481c064c 100644 GIT binary patch literal 41158 zcmds=3z%J5Rp$?gA_X+qKm#Ijx|`}GbZ+HAH{Db^O;=Jk>7tWLNLBhB(zmKk-MU@3 z?k(;kl?0H7B8q@Q11dUzjy#5_hz`D@gW?kyVGu-6gaHGN=rUkK)`Tf`0`>-UhlQ{uFqfoh&MkhNs_Nnwo~qVWRmRW#*bZ=B)b0tPe>AO zC9eg(hoYbJPfU`Z2mT{)3-G;9N|OH#{1otqfFHXeNk)NpJUK}Y0pAGR1N;(jFL3xN zNy4v51Nd3sD}c`i-t*KXc`5KmffK;Tes_`_0Nw%oTj0+D-voU9(~{(az^lI}N!|wh zYoNaK%BLsE&A>keehTjWa`Q!=>c27X9E8ksQTZ@e+(hH7D(5UaiH*WAMjbg*8qjf4*-t?e+^g% zKKW{gF9R-c{WrkJ0}s>q<-i(n2e1cJyYB*0CHW8#6eV8)@(+YM90t;*~m-(|LXW#lYtQe-d~G_*vkc zz*p_`aeN*q{5_3E{tvJURC~AZQT3+>6n@SCL0R%;;2VIKT@UR8-vJy4R;jFcc@0qC zeJ4=k_&wkgf&T!!2l#kyGUTKQWJ;2^0^iO&deexdQYk;2wGUVii zqkjMOK)Rm%29Pc#e-9i3Ubze00cU|P0)7(6qom5DY5Xq-J{7oicanTNa9@B2fOI1{ z0@Qp@1FrzSD8L^A(#7QMK>j6v&VPG>Phv8Kue*Sc2fhxd@4XH9Xy9kV{VxNb&h>-g z`iV@+m0S-49|7DC{0`uOaDNJT7uS8D==kG6_3KMO;pd-#&j3F07H{V|p!#)txPB8* z^zo}e)%y}K1wI@k30@5py^jM`Zvprm;G2NY1b!5#`TiOZmQ0?y$LH&LKtyU%2R<42 zQs8$3-wf3FehH}lehhdR_(h=F-3hWNwy}((Z@cByM6~JEw z@-O)l{!@Q0uevyiDAuR8Ei4@;6C z2C9D#-0JxM2vBtQ3E*YG^Fa0Q(G#>!{igvn?&|ZMj*bB}A1grN;k7{F``y4t0{;l8 zaeN$j2k!`Q4?{?bY`qemM0^VP3ZTaO4?xwg zA`H#}pMEdj1U~#&lDrJ~OF%xIY=0rN2mC=GT})PvJDxrYJi+zj?n@G?CO-(|R&ov~ z{EXL}e!m}h4cG4hsy`nG?f|}U23iIF81PxZYi1q304Vx-Nw|I&a5vYV0E+$|H|O$U z8rb9dcHnD)9|fx4cV@^I;AeoM%e&^CF75|Dm+O}SOw*j}-oi6VM>U(bn z>i#DK{I&&u@7chu+@A-kpAP`91pYQ~FYpV%%YaumlH_jSPGAar9Z>E4B2e#t9;oj> z`hLgrZ9vh_&j6na{5bHVz`q5)ANYYqbPTZGL^lI}8L08Rf64LocR)mHaz%@|22KIh zuU7(xfjkK=kELrEUSr0oPYfg1nYf$Gl}fG-D5_FW!+94I{f zH{eeLQ;6*-@V9}t0H3hpa%dV@c^L8!IL-YtC!N1V>@}|M1l|DrP2k&r{}uQi;2TbR zz0nuDJbxqbD(=4zSOxwm@TtJ3yu|5xCvb%8Hv%^Ue;4?(eD|xs>$!g2_cl#Re#gV9UcST%k=|5no7O~d?j${6<+^qz|U~KotxhSeAM^5 zzPu*Dtw6ew>;$U+*8#s5ct?OIfV;SUGf@5d1n>~>JAc6C!ks|XKLfl6_z|GSdCjZ* zdq;t{aNPku8Tcze(cwpdj{sirgR}*F8c=wCCXgvg?ggs9p9BsAzXlXOuYh<&7u$i) z0?q*^fj8{k;LWhwG06w*xPK zjnn;J;M2K&HSlWSJAo; z_*URez~2Nu3HU#O!uw-i=kq)Pd=J+z1FD_PuXp_127E5p3qaxNXMrj3kAc4j{9E88 z@E3m6<;{8EBbe}Oe$4I9Yv17bKLy-My;lOS0KO0SIN%@ZKJ`Bhd?wf5_JGsxW}xu! z0-*5H2VMz$0Qe~22Y_nlgFw;or-4;q<4wq6+It^xitGRWW~YZ+-{RwZ0C+3+KMY&} zUjF0GXRiUm63Lf<&jQwd!u9KGfzw?7I`FZy``DjMlE35nX(+?XfRFqsmp@kkd2C~Z zb(2?6gs+cKG%o$5_CLM`@GmH$r!P`KRq|NM7K(mEhw`oI6gWz`lJarNw^5pu&6Iagev6`?-=ut!GDG>d6!F#vC?BPie|~|BCs6)%xOpQ` z^QND@l)t8YKjqUD{lG>huMy8?-;Dz6l($oUg(9BQ&nq1mEk2Fk|BCVn3gl<=07!m@ z@)gR5DX>v;mhy)b{Xk|WclG;A^dCQWIIM03T2J6UrY`ewOk`$}dq~K+%t6kNEikUGVd0$|B`6lvzsrY4OWjDSuA+ zOG<^ZKzTXkg_P$|c2fQoCH~Cu%kA+Zz~=$qM!9y?{axYu4&bLKE0p7u4^jFQ{Ty&$ z_J)4_Qn-FhfZGCmX@Ktr?xDPj^5$?);Iot`QqE9*fbv?(f1t#loB8G8lrK}Nlz&gr z&$m;aYrhr$9pTsaQGSy06v{7B{**FLc^75%&rRHT7Uef6OO$&l`nkpaAN=p9xO{TB zbrQIrBAUIL2fzOW=zwyb@^}XGOv;Uv1C;wHFQNPd<>x8CL-`ctKT)pb-5WxiT-whw z`Tw8zc`MI$hkH*7@WbKR2Y$MctLlU5f029QJ^ct@y7v?a;8wd++?(N^XhT1--dngA z=PTa(BkoOlHRC<~x{0E8?}BI!hiAgGe!fD{vvB(BB-c45;&1O2=ZuJ_iewMb{D_hfA zYc6f{{7J8KD($t?PFB;sZrW%q_j^{O({J(K(h{}1yVAyd+FNMwyh|IryHM+;r`r8= zrPk_Yb82Ftw!ECRwx-L?tk%ua-l=8&TgcL^HCJiRSLPedEM3e_b$gxmVm30A3?0dq z+nruI)2Elbe-pn@t2M^}n%!IKt^P>6Q@>d?YqJ_tcQmccWzDRYrIqDQqt)9U;C#C8 z(2;{<(`jYi?sGkHpqk&bd+AVWKcUKYuM)1pMYBr_{AX|TiGGVOy{O;l#dkB%o9;by z@Zi|wc)BaC3|znXrRlY4rM*~GD8Dw>=oAn9&GN1Ia{1maMn0F#*ZR#~x?Jlm2=_wh zY`@dVTD_FI*=(=fIkhW|)v}Yzovhmx0Z`eoG*r5|R68YF=r+1NC}cEkFK3+^O?0>N ztKoQS+RM5iET?OFO(={DQF z%86QM_w8dxXr!Clm&|uj|)#zb7V$PaCcIc4w((Y_(=s;;igskGY+k zuHHGFx7}*@yICi#wA%GfyT8m_Xa*0DO;1;kOmdZVmePAF+m0PPG+s?Bovfanj87xk zh$jsbm6cAT=f8>K`u2OQwX)D=Shb}rzMfXPjni2=dC$!3%HqNO$I?o#1Ls$aA-OrX z42_R-yWf~gCu1}8mMdD0-AH;yG~TA4^SW$XWR)rT5X$7mpi*=+X_VWV;z6t3s?0QNt;HaXG|N7x0hxXdnCE?0n_Xjzt=~*r9HI}@knp#4nnk3t8G9vGYiBF#O zMZ(>5zSCYZDYDgsWw!^})H(=Q30LdZoEk%ziF~up?!C8;9U0pTX{bf+EJ+ZD(IYUk z+EQBUWbn#z4Sr>&W=^H~J6kV~7KvnxmQe;bq_1RSzZ>1 zalGNr=6*HH+mnKI;PNQ53npGxdnkOA6_&t>tV~2u;?gqIogt*N6qas@D5K$G-RbD{ zR=dK(N@Ko~QU6qI!t5H+i}}YG^vyk_-WE=`YJ(MEG^lfoQ~2jPOL(Oo!)orQOBG^0GSA=#6aL z&`6q2c`GT@qR!JeeQ0G^#h6K$Qxac@MFg;FU@l*{x#@n#=nYGQ*3wOtY*VnL;(HRk zdSoh^fz;APT5U=7bwW?qRA~uiT`cx`YSzQ0)-zem6wI{|QEIi>#vW}p79sDnh5YC= zX1&F9Vw}mGt%)0XVFA6ZPGa#I7KG&f{CwkNI^5OA;k>0rD{7u@quxT;56|(4hY(<^ z&Kq+~3Ox?Q;XVkDH@C6h=CTuwS&-0Qnt{QGo9I7~zTR!~6S}ww*^>JZ%+D~Sa!)6l z*Neya=&0}`N-&9xfbI3W>CWq~-<8&8AQ5_Dl^QLS3r0@(swT8DJR9am^fsDydu_ZH z)2HQ8jb32HqnM~o464EAQtZw?1D(mzo77Ej{vtJR-tAR4C2pP3IZ-1MR}g!grF|3o z4t0Z+DnAdDhsD*SM@y+ZD7-SJ1-XdNHHXL;xrFwo+9(aaKG((__!fRgd;oQ|XBRUp zC6~J2it%($EzPu>&^xB!;@AHnCbOH4jEo4}oIWp2#&D zN?i5C4AQ2%d6?IIbJCp&yCd;+s}vuW`A#p!O7hR9CiWklI0ju5FPGgy{11iL$P}nw$yJF-B z16*+-izOh(YKjnT#o}Jdq&(D3KGtZ>Hv4nZYjYWlA~_e^4dE}%Jhm|5D9ol61t%2d zLcP!R(L~mI(DftUFSqO$YT%rk4jaFN;plK?Ihq2FExQh98 z8!d9XvuwE|3k|IL&g{aee}-;!4TlhQ5FP9HV`O5A`1Od7L@**ZFGN3@Xkq*{oMoEl1EQlPfgR|GX$>5RPWs z#K*hK?be*Ik0mBCXwhw?=D}Kzh%)yj^h!3|q2^r0%?O;PLGM!pug;+1tSvYMyc;tn zhoWKEXvvI&JrKAA^Le2#;mu32WC2admb^AOv<|YH{rDY8OMKOd`8>rUwlvFLBCD&= z^eF;&joHQKsjX5u-G+2^Uo?>JpFA4IFp?bhWQ+?E5Dfv9O`5c^gf-qkhG8t!<`Hgb zx^H@%6Ic~PrfzP1%TI&=R1#qH z_?3+w-&FWShzYF)DdT-bSgcfJ4R+eiilj1~GbxnzYK!o2F0mtu0!AZhHZ{R}r`9B( z)JZqVpxmf2_HK0G#k>$=&y zt&u#0UyIifXR>VEjN(W#(M>7}dC*LlP-LeB2@?_I7Dj&?3tY9<_Q%*2!O=;dY5myT zQ&PHt)CjL#HFDKf;u(E89|%cw3C}<#GSO6n^hK_u?eP{vQZ%BB;b$84iX;%Uyi}9w z$SQbCBsW{LZM6c&iSP&BVdi?x>><6jZrgNLVjUvY^t5MAG{`E350-PLRFHZifP=IZ zSttg#d5g1TxniDN-8V5getge?Lwj#KJ~eT7HGU%3Sr+~FumzqHO2u$nGd|&C40r}L zxrot0I9H$N&f!B-6L%iC>-gS7M~+nYPOnQBhO15%JS)qIGX2Jd|3Z`n$&i17&5fLl zlISEo3La4u9nyg(B+hHmnKXTDs2GUR)J&+4BuCeYrAn3zcX{M7;GC7kjfxv#JAKQFf07`7Pi55@Pkr(jOaw zR`kOhC5dy!-hC<>Nsdsa*DJqfDhX&f-o~qFnVTohpwUtiLm+W`{ z(m?H7_27X1JFNc>nYpRo#?yg%B>roJztnX6>~7sr)l9dm_Us;IvW~@=`LU2vxu?>w zrv$A~_LW&O33_kEZsuuo-I}pmN;OCqAB$^67>8w2c2DYgGo4i3DXXiPvm*4fUELcT z{H)cORnV>I%3_S~_|3K-s~W zHKmYiBRAc!n~AKt2aoPsCUa`$3(GKwp9IAfdqZ@%E5$!fv`;qZQihy|8*{~OBpnp@ z^NOy7_7!qbW(09KAOmF9iP7^>h8w}xm$-H-Ye~_Q?fk5&8h9AKl+j5r0U3q8VYXq2 z*p57eSNg5BFRkO|C~Yv)$Mg*5GX@_L-xeDw?&azzxua$|FB2*uiK)D+%={upSr}6x zgQ|sMu0?F@zE%wB*+Q_&vydQ_t=H-FN#~Xqis5{sdQX`S)V$zc$#w`csnuf21&VV` z_nD)GrD|R!>#_J1TQKChEbNDHSID*pP8;}*c{(u<2kMKmU^PvJ>y+1X=h$Oj!JP_L z>PVtji?EFbg^Y5$&n;3@q`?p@sFZQVY?jYUbVehSY9SwzkTf2m?sV3nV*~yP_?}dJ zv&(9+u;>rsuV*bS@S<&Zjv0Au5XOY%B}`#bek-)hv7zLJ_p~OD@&Bp2jwSacwIvin zAJZeZ=A|&yA|zhoB-p^r5PbIXZSl9PlY!e{w&E+J=#$x}j-HS>q3^Yjsno>M9HU># z5V$D@VP_sk0Sgo2L35jVLbSZroK?uy%|%Q$i+#4|YNs}MTRe(=ZhjdS4nv}@v8E+U zm8e7_fo38J-GsT?B)LNR$E_>!of>bNBfxASW`JcTzFtx9$Z!i@3&;vL<`u-H+jJm* zJCJmKZA#agG#!+`N~Avi-X&~EoV93IT4}AJoJgyiFCS+C-9)NVU7N+p17ph#B79*9 z1@pR?2os5$&PmyTWU|&;nh8wH@`@QU#^6kz%5nFnJuVNU+EUcxbM50oU5cSjJNy&F zks6S@XEFY;bTlLY8oe!Q88TCzOtUO08gA(Wx`j0+Yut=C5aIP#YGh+n-$``s%>fnT zFPS(qW6%hPS8*-LX(*l>Ylxl019yd$9=LCKczAY`hQr)vofCoC=KD&1NRcG4mIdbJ z4;O3};w_s9x^7g1%-D*e0jgu-Y}1xa$-H9~%Cq#3Gf^oCwCXv@f;!6Wf)%t9aNP=) zVBAL3e_Ia`D|80DmwF+JS1_f~0_lj;HMyj9>aM91kl_@qsbemSfe>)VxfipM)6iqi)xvkMcNRAP-KVIW{M*_gPDS5jOOnKVW{Oq z@zZ9jm1bGaP9eV;vgb`=^Bz(&dL@-ke zj^hx}w7y(kF(;y}a3>lZG+ddiu36BLuQJ*^Jh$bdwWts%hGk7e(h-K%FQ#plHEe|c z*%Tm63xbt-R+La?3am$5+m@(0C)rZKEu+Cv-JDkMJbWbGg0FR@|H`sy(TCkm4eX#{ z`(-D!bYD04l78J8+6lMYtLrhxRxN*XYj};}7?LU#1X47yF})=DK(Q@@z{m-aUeCC9 z)BARBN@O>Nyj&Q3Nwb+O^d%8(Efn*wfU;VXC@Pe~dh{*Y%)y1SQS7>~&~I1=FS$81 zgwL*}7wf%CKs>Gtjz){&w$z1gj@%HM^?*kz$JfHc>4EC))dN%9AmFHYadAVAyYP=Q zGaoRU2Q*j}k2Xvz9#b$g2VHcWBngIotG&+cp`=?wGiogc%SOy5l@-y#x|m(qyanc( zA^(kX?YGQo4EkgwaRV`liy>FD6$TtsR$3Ox8*!bv89c>hSdU>FJJQXQse}WweC?#T zzheJSYCdY6QIu{X{mYu|0*_1=@!TSW5tekK z$vymekq=*kacu$rE@e%k__I4MX^d0gBiPyZgY{b^5MAxcnKln~dtkFdhm zUXsW@ha^1}wPU_?6h|xgrrSn}_m8$%I~o-fWZLapj%KcHPE=SGXL}7YzWQ2-a2NQe%K~oi)%NN zJ^{a};&@aU9@(L#N?VHA*vMxoob7?!n`|KXKVL~uG$c~+s%B<_x`Abue6^@+loewi z7REvcdZta7B4{e<<5G<12l0rU`s`KQFxO5D2?>pgWs+Ik6r4oiF(&cIz2gp+qdctI zvXG_lQS;0MR+v<>!cg8R;r7G$uvOnkp8|hl42?x3OUcSEQG$J6Z@VM_@xf*$w2C8g8 z07Y%_5D`m=Nj)O)T;M+U_qPVBRxK@e0OdskxrJS*<{HFGbTh<`MZcT#g<*p`f3^_- zh2f_`nAlykh27?x;+Zp8*ngQ=`Rd{QcOARFi`7W^* zj4`OjqIxdRm@Tm~6?nv|d>3=bA4w2U4Gi>Rt9PFa) zD|^`3TbXW;+LDmm@Q)jNhYlZ_uIz=c)U(Psygi!k+`i+w%Jv&7JD!{F*fF~EhHJO) z*uI^Ll_M-WQa)**-m@z^x2HR{k6!;AuXlj`F_mdnSD;sL>PFLpL=D^Np5{3vFYpgr z=}k+zHNuuATXU>?x3I3M(HucI+&pvu!s;VME7R<_8%_7yTj@=xZfjE=fa;eJJGUr2 z*B$ASeV!FgS*)!kSKL-k)U8F-pTYN7dz|%7lSiq_6ySl*+o@0^ML) zce*E=&lVH|?RQW2^@*%ClJ0}|y6IFyt4-j<7Ar~NZ2SZ5oto>MXX$k-K2E2Z@~pMk zCO{ol70jO}VOs1shqQT0@UFBYK+na3e$eXo7Fkbr$eoWTl@Y z6s!RX15CR;JP6S+CXqol^bjZn40LiOk za1}SVhs%w2x9_R$tKNDb-`pN9Hp~l^FOq6EYRtmF0Pz zJs`YF(Jl7+$TzlsXPwg-lg}F3U97k-szWVvoj$IVUUBU*^iXit zMLCB|0_ry!Ch$(nfePasARL)X?v83hn|^}N=ojVxMVVQ8Yoj?Yf})$`S&X8kpP-?l z0j$&wHoc#AIy$;kXL)d|-p!+sVc+{v<-&OVv@uZ8qAe@3l)%8YcXgr%M`1>`M5uH~ zOGli=x;%w{n&-Grhl|FNSKl?#qjQ7P?$zwOYa?1DddbV^&D z2R6YU#T9pN&YwmCli_8S(j{(!k8NA#r8F4HaS8UwA+K-Br%3 zm;~_)56&(~qIGSHX1I+{<6^MV%oIurvef4^;A!;?mad_p0Wy$qUdhR{vTB3;*yP<~ z@W1~Q-EoQ!4>1LdDv@PAU~!wvZ;@7IaHqTroYZ-TJi6*Du~zZPJ%M)B5dR)-V!CHxsU?U??rpFB2PE&`ZqWz_$JB;3o5R zsoXa2SG86ZQw1DPj#rTxb@nCAAQ0CX;@~ZWIlDIzo}d#i9+Iy&W{8k?Sqh-_6?Z!> z*))j09ej12t5sHjjgk#!jO#)>|6R-X*6jR0da#OEn+&v}srh<|l!UyQKg_`-aRf-i z$9g0Z|3g9;evOPRl(P`sBFpQlr{c#0xcC^Hx->nv&>}9qz^nMroXt^Fp4-R`E0zmW zs|Di=`4`9cTERr$;ES>t3+x?7sP8zbm#Bi z{LP0F&e7&9kS65LWU^K+o}X~x_5)d+tz>7shq-PmcMrWZlP%(8GfF1A)kk{~FI^&Z z7RDeRAZ0(vwe3oqC2>h;2Y(kHN`WQbw9iV^@q)CA7#%5-4vKBOeQK+eYzKLw3={rX&m-S`I8UM&lAmNV{DlA5XjkmG|^tjZPi>blRdXO)EXoD9^Vv3_7 z%O5Vkp15T7)hvX8!dVmp^)37u`k8o*ot44&Hm-kLaqL7F-+19%vq#XWbW+8Gik3@z z&L|esLBDI7H+W6;!kHCfW@M0NRzq!>@@HD$a$+@&CGc(0TT+`CnAEgLCGxjKL#Nr^ z6vS+0oIM_E!bP;FPX_B6dS`CXX#0%uouuS1bpl@ z6L}J=19Z)2qpA!(1b1BcD^==ZzN)5+hD>9|w``G!@Q9o1N*SCF5NsW_1do&{R&^C6 zfa=8B_=&6(2~XQO6y38>19q!91M&>!AT1lDC~prhY(Pjr!@)*!m*Ib zV)-Zyyg{2T(Ll@M)=lAwA@n<4cCVp((>)dk_h7dffoO6hB@^s{@>pa3yn=`d#2ZEV zF&n0!GDb&7Gz?ittd~2DRVjy3O~ET6;?AjsygJW!t;#m$L@ede+fs2xHKeSdsyx z(|pV%rdt(4Xsj-LY1`Jtn$pS##u@CARc4>MK4C|2s5yNR1GEbI*u^Wc#mtroU9`{q z+{zSa>39P}{9E*SmLFc)_d(VG*NYJ86O3fm7_)__lmkJUTuwsdHQQk47-x{*7o=%P1X4jpusghS z;annZq*AvwuCDa+`ZdnVQ8?p`Dt29}MOIBGa8#!31dh{2UOtawo>Y^aw-4woq33u12}@lG0zlUFvm0>`q$s(4L*1BTk|<4J~w3ImyLd0It8VQ zxn`VQ#^*&)Pb0W3sF`Vnhr@(80U~BtKn=NxTPbD_cJr?r)r%@k`rM1nQEw=tg|oSe z4%}`ma4s`p33~5i3x@asByjNqJc`JKxj|CQsYGl%!DFN6n7fB&nvJ@W?G{)zKfG;; zHV$>o?FG;J3el}R4QC;)A%%uH+kp5((TcNuY$bO!!CF^qfKXvdu-(@0oc21Xw4vng zK7`Ni6Jf~&TG=Frt936ozc9SaJ_!qcq6sFEO-x{smQ9a47soJxtO8^eF3#NO@w=`!K*5U6Ow&A*CJ` zhkKY6Gh-HMCbxX?bk?trB(C1Ahh^iB6@zB|&#tb)I41OKs)sT&Vya?5A3Axsx=w*2`yde_}>I}|8o@zInZKIPwhUjw07B~rzyiKd5 zCQzUkNZLz1gPlSvjPqIuS=xLl%%Q|iX?T%gqZPHj@N0sCZB`v%aNq1c$6lGeysC~rnS~5{(#{!Lmx~bVzNowfpb2)haU2x z84Dslq-}}J)pdGhCx&Q;1!BdM;7&2L=W=Z6L6$4baxez{8`{8of!dfq*bIpyGY4d@ z_NpZwW;l~wyJIA#a)Txq7bSZm9xH;KL4URU$Rr^?9K+OBLg3BGJZ<>j~qzBCukx z48k!Ynkk5CQ4$tkJmfgSDnyHbibqGV$lNmJ5OA#|v+jgiEdMyyJ8c;lNkq$zu15@=YnfWstLAdj^kEK9w0h)A&8Eq?6=G}6ZU3$5nsdz_ug#MsIik%gQBi=eR< z-nffpNUffdkZ_JnI?Lf0Q?A>$$oO{jL*;fBh-tk6yn|R-N)NLVyT{eI&WUYS94y;S zN4e*{(L1KNYcmiHPSO`#71>LnHUi~A9+o84fMSYf{vOU7soHrX6)9m@0+naf8*l-s z+gdE7GArC@Q5NjVgIH$@A&7(uZ5JCofb8c$l5eoxhuj}?ap`8!A#spPqqfwwCafoB z2(kuk^dNCwOd(Z@C#vb?UHZ6dwMUV<;U^O)DpSJA9K;KX&eK3CS%o-9F(ot8+o zxmUnUL6zwFPe#DePJGoUgqCjbqI<}u>8Q2!&>SD%?b@0^TWQe z@eTO_>8iyWu}=@34dkKQ5(ri`vV9hZ8-=Z=uj`aRP>&qY;is5u@?L^Yzb2F@w_<0&+;o z0oxW*n9Q6G+@CMnA3P~!y<<`as$b}wl!1zKsgc&eK`FYUQ$7AaKPV+-j9Rg-vD;B8 zX>rcUC7zX{CRQDmQnayFOJ4Y_l!Mx{*s+sO%2QN2Dc|vifE0pcfJMacB5tDw(KTNzXyOF}vdLQSmYot}uT_ya9H3Gmq#`#;hpyyO zh-Vgjto7$npID$pG+uHFQ5SpTgl;z4D)S}1gH^f;^hxRJm1r~g87g$hmz{Bp3fqk6 zJsvW(HkKf8T%j+J_c4Qk$1>1@F`)PpWr)1;aM|7cdWX|Xx-w=F>FfvCE}dcVoznYe zms$fMdqy)J#wOcYL#@+bNOe4vx6CBB1j)c#4A*y=6aqs1_7BRm;cG}6_azmdo0D<` zrK?r1V$%IOLGBz8YDTMpF0@W#1V53CQkb9U7hL+{YKea(hRqE}Wls>8aIZ!ECTd^{ zy1V9lhX7ezAS_?Y4`X44n8-xSmfRAEgb^(x%cjyAZKlCz;i}|05p8HJwnZCqs0fst zx3rl0P_E`N5XBScJPT5C2V{Gj>#O%Y=2xcJ($Y10V=Ir0BP>i<%u`(25jiZf1GYuYGmOv1#L7kjLa3>L(DvYo|Gg&F0EwV<7=>^_(wV?_4xpg&*71ZSHAQ(I*# z6uFRdEqR4BCu<>M%8f;zSR^YFg;hNiNRPczoOyHD&%6;OgEm}0K4et1 z>ckt#5F1?-Xy`%?2R9k#VKd|mZ<;vEv=1eS$<~$_oil=WRi_V`kC}(=?BM}3?U`-9 zbqCvW;@YCYT4)T3Dd-UvA85Svgbrmg?G*^IZd<5ZR5eZS z6>2RFUB=5~55y1#h7H7_ZYj#0;)96IW!>UbVUJTVscf4J7PU?$mD#KzBSHxfgX2!|Yc8z-(w6(XgOrs8y|i^wK2$FwAD5rtsB z-a0LTV-FxJIwHNo6xkdMM|)yPZwERbNz`jak?R@3J4OBmgu@`$u1Uf_)R8fuRVjH~ z%=MN`3?P=bw0$jNVZUFl=iM{Lfj9dtg#$@Z6E4;Xu6Y~f^MM9rgSe(h5lVX~ehe$X z2x5Y>c8JWGQmSbqm3(yLJfmp5)Pk*BwmnlL349lq@L%%L>=Q;T~kggHA0NNy5w`rqEaL-|8@Sjw8N}5}I6u&asD)^MhpXM55aG ztuAY$VGiU=CM!J}&V@ybqGe$+(!|#AA}`ij^89tI=)jp#9v9!z=-|;p@=IGQ=SZN` zgBmX<=R`$xlrIG77Da|BBD2vST%KnZO)sMZOAKfnYRq*goIGS9?{E&ex-Y`L(Fhq!!KOn;R8LB<}1~L&{ZK3IAokZVBS85BLiylohDMJVG;a#VTrI)vw#Tqs; z6*a_P=5gj&5BZ=q=Mq)-R43VMRGdqc-}q*qOC;>GE|{ZANar=!ydon4Ngtx!c2_3_ zEOxo+@!#UuB8dSeMGT8q3AZp=TIrSHk@J7qvDHdy7u`G=48JFF#cRclU^=5PRDL^N zD+P$5Kk1Hy4lWV_R05ndS8<&ajKW^$3m;(=DqZvpql+J56!)I`2}Z>g77!C!I>0D@ zwBC-_RmT^_y6c}_6rcLxMK%;Wy{O_bZny}S(=F@)GbEV`cG93d!-mcbAzfZ%TngXY z!Yto7=sW5pc|3|AjEb^84#Z#9O(ks|`QG$YzD)%4BnJBjDior4vH0UI^3zQ^BXI3_ z05|V`>VxGWG%0q9>o?eFf-;e0+lJ60fnEyV>A)ll3i@jDBL4%Itvnd^ z?0NH33OCg4m|67AW|K8EOPou>FXq_!aMt1|knyZ*>k5nm!8XWY%MN1Bm91r>UG|+N zSQYHMVgnP}FH=TY zNmi|wRA0RWfy0zcBHGa#MxnB{Fm#5B&zlb()vf*nCoxHRYpdb_>tP$rnm^XGf)yaP!(*}SD=o4mdI&AG0J{cX0kF0SH$ zTtc9y^s3Hol3I$#Ix$>Z>X?f%&Saj)H3IM6wB(g-1u*{w`LE^Zn16~F>zNTq2^;Ii z{29K5F(5nGG!M6OyNnM+hYR7rN8muKfLNoJ8-vbLrGuSJNa}PaHrItE1uWBQue8~d z;f9U7j}lQP4)53U?YWw|g8=sheI|b`JeYq-25vMoV}BWZO$)cABUqk4kJ2X>nUp== zd1OT=Z{_9V1|c^ZVBP0V!k-pEixXiIZjh5YTXZ7B5t59qoWn zOw!KT*Qe~z+v2S1_=ibL9rJU@!eM(>UE3@nYOTT7g7CZ4!}X4&mZIX1clTNKV1HDP zCATJhxg-0=|IR!8t;KW3IOV0zS*Cu%x@R;&%W!PH;V>rgy&Q-ZsOIpC@4GF=t zbg*`^v4lw*KE*+8@qBsxjWRn~-p?cSzmH|_OzF=Am1>5g;x(a|2BqrY-(L7ew$0jp zh{|MX+pG&R+cdlGLr`g=!^bHnT!zCc@+}(~W0n;%J;PyIifKxfyL6Ulh1uETk1>Uv z9K~nW3-m>2Mdsh=JKf;mFg#{GpGUKwNj+CKLB*!Cv ze!|h_pf-!;OisBMY$mGORZW>*aVuD77DxJ*`(LslncLoJtQtgdy$s_(b+1mvfb U>*q=ul!UDLvZa#PHo!OjAN=Lqxc~qF delta 8023 zcmc(j3zSvWd4TuD5oM6~TX}3QjKc_bm;n?Rn1SK_oEc#da74I|bMHOOz31XN=Q1#Y z7lTn$RB%f`qY%^BhcWdrT32jhan;zgF|F1lu0~h1u9#M9vywE?wvv^8|2cPNz_hFF zYFE1#|NZvfXFvY^?|<)q53js5;Qm)4r5}x~I1y1wJ%H39uT?1Z2HZ19DXIU)WlCKH zUxu$ClKde`)xaYB7kCC9fe#K4z5yq|PoT^* zVw6%bc+IGiQd7vJsF(_GgBt!WWHIW`U=#cSl$DJc9cmtf(r*nE#j;Q)z8^A&dJgu$ zZ^O0lz!=8EoUg!zl)pbVRBTv@QAP8)a3ZweB=|Wf3VaEQ)t`i-$TuMW)TjK^!BLoL zK3oAa@Bo|#e+-|86Ik|E_&VGNYp}bF|7ExYmd=vdMn>$l7;J~KqA$P?;8{2WK8|+B z;T!NP&|;JouyS%}kya=J?}nn#5!eCGLNWD3%r$&~QtP1jLI>tP6Jh@klbKD$G&V~1 zb~BsJzM5?piKN8Y=oCrDYYDKgW@X>!@=-tP!#=o zP+wB&O)?c!{5>29{}G~-`X!Vt8G9uj4Cg|WS8Jer&qA5#u5$U?a3I|F< zUxZ?rU%(Y`5N4&TYJs?g>VkYy$6$#?su##;_%8fQ7-1Q*!q?!S2m?V;Z<5L4IWoc01xm4fDhcm}cR_Se6F9Ud;5sPfcOk}7BN{^IT@0l@2jvt!0%a?H z2#3R=i$cpxfpk^#pv>cx$jDxtfGDT_r2OGmPzIRDXmT3bAl6rhp|pPrPK7^&L*Y5t z4hQ3rSHN9RCO814-|s*f?=^_^RRw09084YpJWXaJ`wW$4w-aCC%0A-kwbtCTtopNEgb>sBK$vL-yv+hCM(5w2o> zb&AYRD&B#z!X<0*>H#PNXHdRnJ=Y}@{2oMUwQgg$!lO{O>{TeIV?awd(LyK-I0h%e zQLW+etShq>ibWh)&HUh95z(=#WiVtCmay8KDhjfKyOR{R)&7PTU-B#U`jJ?}c*C zPeS}oJpo0L58xg+6;Bis-wzo=JqM-zr3^X+PJ+^}aSQezL#CSwG08D_HGCC{=?1WI zVu2}8R(L(s@DTh{_$U;Gt*uI398tp=JuA$?(a(U$qN-d!NDBKUf1#uU(WJl;TcS5(NFKQckwmx%o?Z9AsZv3@ z55Z5>{Zc3=@g4D-yUS(S0!h0O)*tT00f_YibBYBd$qFw=WMz^@A#$eYNr7aLF+nc; z!K%TLI;;rKlNe_ewo>9lh7my^f0a=4^s#GU3 z8xd!fGz3|Oj6`lmYLR-xMdV~~8TKW7QH?mtPol4iBWLPIjVcYK=JUvH$o%qGQFT1h zj4UbF&4IXfkmQ87APr$LxOC;3szGc-UH~%@Nh=W_xl#({w5`m#UavS##Z|~<UGl@Ma_}U*hsd}0F|@d+q~5VqXt1! z;}mmtLhrR)&n`H+%BwVwO~2LLS9RR%xbl0(t*-A`G$T8}ynWRc(-8Aaw03OW#zM-X zrM5lo6nwomp0iWBD{DErt#$L-Z5y`lT;95A)5_)T(xTwh_BgfoMtUBvn-}T1YtH8* zM$enx^T9k68ZrMwscw(!@7tj}VlmtCEjOO@?Y&k|Mzfq`QU_wOl$EpdHs2eA+>S~e zrjFQ3Z57fn&v&J%)zMqnp=C%)9gTfe{hc=Ge0*OlXFFEOlYY65-mU$* z%W8UFTGlKBPWYcXh13Ue_&bxO##4?zLAmQ8Oo2w?NOSZ>XC;v#!3bu5v@%^JDF9 z-0^a8zu-3L7CYzZmUxjRIC`<;#EVNa`F*vH<(oyD-n(i;+{qN<8LL6Bwp`j&Zi}@Q ztd#A?mKTbS@9yWr%1s-aTeh1~o2Q!*?a9GP0$c z?X!})uj1x|dZvyQI{RxDl{Y(Rn6lmTzJ#4GsO#;2LFJ-KRk^})^=6+)CEhVeZ>nS6CD>-%e z`OS5{_>TD`8JqmsO5N0`t8yvrp=fQTX`MdC< zau;;t#%18tg-t(Br=7mh!``Bexgj%oV9xURWaeZKMznb>RNT`n9F>zE>sdMTmR%QF zZ-(uz8CR}h(9OxLYuO2I^>{IDzP7v3{88uT$ShNt+Y)iiuH1qNw8&X@T4F)13T)u* z_k1hwnX|dM5!-nACi6^gt2vUd8B|sSe|aHaJxr8dn{f)RZMl{%nve1m%pqs8DL75$ zU-v95X&KE)#GTHJ`|&#*Dr}qB?^~5>Lm|nh|M>g$Mc=j3Y0Du*1u8jlZWtM$Qi-<{ zyNaF+XM2P}Cvz_6+Zo+u;RgM|t2T^Y88*Q0_N6H{_H>u+rnFOZLn~uVx}_My+~jUF z-*g`_?cR)uX`4Dt4Ni*I&)9&M01UNidG>nM5%* z)s4H!tZmh5bZ5m@xLvZb<-Idc7o(S;eY@rP=Fy`QMl=`Gf&a!@%f4YM_Uh$a?A+_g z0vAsq7Yo8e`Lnj%biw6BaIzi0%aXHEos-BK&sA#zJ4G*^wyI4<*CQ=$&FyRSmVCxa zh`;ZRyLLR0!^<4M?0P6_TcI%%90BRxZx@Pzsn>@Wf5H5$t97)#t~|;tjis!-j@Cv^ z=e}n1$NP(BcK6t|;{VHXg=Dz(y1R%SaO-rg=y4wC#l}gS{_P5P>$lW2_jO0tlvj}W z&sX3wkA0!`t~g3_r(9R&=Ut=C;F~iQa;=!IoA0{+z<4v~z{CIT_scRX<62I)<(?NU z{|9fFl00JmOK+I#Ekd;Ozx{|Q1+SR@zeh|dc*XqRJz{!&S$8z^ddXWAT&_EMUOezu zk-K$PiNdXzxZ{=%JOuu9Mf@V&c$Kw z_@S}f4ZnYA?#y%{m!VY{%eXQfC%E(z!42f;US;HtGk4yaF@p|IGFuOKn|BY-Fyn4( zE(PI@Im6pN_c8G-h&EwN=#*&TXvZqb(_I3$=V{NEP{REj^eu-ZzVl4*xjE%X$21oj5cPV4o?Kp{+X!A3h2X$)igPTk){MD5Ha;q^n`l`n0xn@j^h%kZ-o9k0 z1gh|1Aa}SKa)&mn?-+9NdM*pkY`^< ztE;@~zPR|A2HjnDV27X)F(9R@YpTsPM^>4i+n1Znk&zb_?UZRbGGVB!W7D~0XQxFd zbj;d2*9am2iulomm-J5g=+WiG>-UdN8@`LSN}QA1Rf4D)f6pQut^J;vR|K(&skrU}w|4wc zZBaFS?~H-b7+V?bG51~(S->6NmX4?7MW*)_TwEfrH}l5pbR~?~#XLS_v7f>7qpjfa z*e^JqZZ&nsj+>e_yUonwlNY3&eB4iFXVmCrcEZlt1wU(bdg-DQ+_r(w5Pn&(j7j*F z2*Ac#=F>HLv_wBo&uG!|DAhAth+C!Mgk2u&OU- z^~OYLV6qP^8DC3iOIb|Ucb4@Q$KI#SHy>!{QDS+7y+mky?96Fq^Ws@I(9@Cq(RMzM zeWI)4IVz*_bdq4@iHU-@5r>&*`tNNif0E;gv94@^lf{AVjm9yL0)JkOq$a@$l^0WB zfLd+NoS0)C+c3@i^2F?g;;hZQ2i?GURkihL^s6~ zODmS@eMHopoMzUaoK&eh3;8{9pJ$-C>EtY&<@CvkgZA9rOCh%gydnmyKMN zWB>hda2>q?uQxkSjWK6VjaVO*;~Kp{4OefK_lLaN#f4+x`++MW;}+hTCI1&84=YQq zB41wb68ELG8T{bt3G$$yT~}A9e|%HX=D!|zi^zg8M&ZG{dF#QY(>8|>*L3jws#T1; z*S2`Ia6(kurnSY5&D%_V>Qz1MU%V$`jwR*}lOrK7X}#8w|Jg8uPEXXjr5Nm_yf&(4 zp@bVgC(HMEyBU!jW451OSmlZj(pTPvp1%_>a5@{SG*5lriRIhgG0&fFG#{UC8X9xh X-FUj!%*)QKH}{=sx8-GY diff --git a/po/de.po b/po/de.po index 3babe92..33caf29 100644 --- a/po/de.po +++ b/po/de.po @@ -2,87 +2,127 @@ # Copyright (C) 2009 Free Software Foundation, Inc. # This file is distributed under the same license as the findutils package. # Nils Naumann , 1996-2011. +# Mario Blättermann , 2014. +# msgid "" msgstr "" -"Project-Id-Version: findutils 4.5.7\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2011-02-08 21:07+0100\n" -"Last-Translator: Nils Naumann \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2014-03-20 10:56+0100\n" +"Last-Translator: Mario Blättermann \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Poedit-Language: German\n" -"X-Poedit-Country: GERMANY\n" "X-Poedit-SourceCharset: iso-8859-1\n" +"X-Generator: Poedit 1.5.4\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "" +"Arbeitsverzeichnis konnte nicht gespeichert werden, um einen Befehl in %s " +"auszuführen" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Die Standardeingabe kann nicht geschlossen werden." + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Das Verzeichnis konnte nicht gewechselt werden." + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "Es konnte kein neuer Prozess gestartet werden." + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "Fehler beim Warten auf %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "Prozess %s wurde durch das Signal %d abgebrochen." + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Initialisieren der dateiübergreifenden Hash-Tabelle ist fehlgeschlagen" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" msgstr "" +"Die Plausibilitätsprüfung der Bibiliotheksfunktion fnmatch() ist gescheitert." -#: find/find.c:205 +#: find/find.c:263 #, c-format msgid "cannot stat current directory" -msgstr "Kann nicht den Status des aktuellen Verzeichnis ermitteln." +msgstr "Status des aktuellen Verzeichnisses kann nicht ermittelt werden." -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "Kann nicht die Liste der eingehängten Geräte lesen." +msgstr "Liste der eingehängten Geräte kann nicht gelesen werden." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "Warnung: Das Dateisystem %s wurde gerade ausgehangen." +msgstr "Warnung: Das Dateisystem %s wurde gerade ausgehängt." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "Warnung: Das Deteisystem %s wurde grade eingehangen." +msgstr "Warnung: Das Dateisystem %s wurde gerade eingehängt." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -"%s%s wurde während des Ausführens von %s geändert (Die alte Gerätenummer ist " +"%s%s wurde während des Ausführens von %s geändert (die alte Gerätenummer ist " "%ld, die neue Gerätenummer ist %ld, der Dateisystemtyp ist %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -"%s%s wurde während des Ausführens von %s geändert (Die alte Inode Nummer ist " -"%, die neue Inode Nummer ist %, der Dateisystem Typ ist " -"%s) [ref %ld]" +"%s%s wurde während des Ausführens von %s geändert (die alte Inode-Nummer ist " +"%, die neue Inode-Nummer ist %, der Dateisystemtyp ist %s) " +"[ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" -msgstr "Konnte nicht zum übergeordneten Verzeichnis wechseln." +msgstr "zum übergeordneten Verzeichnis konnte nicht gewechselt werden" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "Konnte nicht sicher in das Verzeichnis %s wechseln." +msgstr "Es konnte nicht sicher in das Verzeichnis %s gewechselt werden." -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -"Der symbolische Verweis %s bildet eine Schleife in der " -"Verzeichnishirarchie. Das bezeichnete Verzeicnis wurde bereits durchsucht." +"Der symbolische Link %s bildet eine Schleife in der Verzeichnishierarchie. " +"Das bezeichnete Verzeichnis wurde bereits durchsucht." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -91,18 +131,18 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" -"Dateisystemsleife erkannt; %s hat die gleiche Gerätenummer und inode wie ein " -"%d Ebenen höheres Verzeichnis in der Hierarchie." +"Dateisystemschleife erkannt; %s hat die gleiche Gerätenummer und Inode wie " +"ein %d Ebene höheres Verzeichnis in der Hierarchie." msgstr[1] "" "Dateisystemschleife erkannt; %s hat die gleiche Gerätenummer und Inode wie " "ein %d Ebenen höheres Verzeichnis in der Hierarchie." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "Warnung: Dem symbolischen Verweis %s wird nicht gefolgt." +msgstr "Warnung: Dem symbolischen Link %s wird nicht gefolgt." -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -111,18 +151,18 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" -"Warnung: Die Anzahl der harten Links ist für %s falsch (Erkannte nur " -"st_nlink=% aber es wurden bereits % Unterverzeichnisse " -"erkannt): Das könnte durch ein Fehler im Dateisystemtreiber hervorgerufen " -"worden sein. Die -noleaf Option wurde automatisch aktiviert. Vorhergehende " -"Ergebnisse könnten Unterverzeinisse übergangen haben." +"Warnung: Die Anzahl der harten Links ist für %s falsch (Es wurden nur " +"st_nlink=% erkannt, aber bereits % Unterverzeichnisse " +"erkannt): Das könnte durch einen Fehler im Dateisystemtreiber hervorgerufen " +"worden sein. Die Option -noleaf wurde automatisch aktiviert. Vorhergehende " +"Ergebnisse könnten Unterverzeichnisse übergangen haben." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "" +msgstr "Liste der eingehängten Dateisysteme kann nicht gelesen werden" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "unbekannt" @@ -130,9 +170,10 @@ msgstr "unbekannt" #, c-format msgid "" "File system loop detected; %s is part of the same file system loop as %s." -msgstr "Dateisystemschleife erkannt; %s ist ein Teil der Schleife %s." +msgstr "" +"Dateisystemschleife erkannt; %s ist ein Teil der gleichen Schleife wie %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "Warnung: Die Datei %s scheint die Zugriffsrechte 0000 zu haben." @@ -140,27 +181,32 @@ msgstr "Warnung: Die Datei %s scheint die Zugriffsrechte 0000 zu haben." #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "" +msgstr "%s kann nicht gesucht werden" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "" -"Das Rückkehren zum Arbeitsverzeichnis war nach dem Suchen nach %s nicht mehr " +"Die Rückkehr zum Arbeitsverzeichnis war nach dem Suchen nach %s nicht mehr " "möglich." -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Initialisieren der dateiübergreifenden Hash-Tabelle ist fehlgeschlagen" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" -"Die -delete und -prune Option schließen sich aus, da die -delete Option -" -"depth aktiviert und -prune dann keinen Effekt hat. In diesem Fall muß -" -"depth zusätzlich angegeben werden." +"Die Option -delete aktiviert -depth automatisch, aber -prune ist " +"wirkungslos, wenn -depth aktiv ist. In diesem Fall muss -depth zusätzlich " +"angegeben werden." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -168,36 +214,40 @@ msgid "" "as those specified after it). Please specify options before other " "arguments.\n" msgstr "" +"Warnung: Sie haben die Option %s nach einem Argument %s angegeben, das keine " +"Option ist, weil Optionen nicht positional sind (%s beeinflusst sowohl Tests " +"davor als auch jene danach). Bitte geben Sie Optionen vor anderen Argumenten " +"an.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -"Warnung: Die -d Option soll nicht mehr verwendet werden. Statt dessen " -"steht das POSIX kompatibele -depth zur Verfügung." +"Warnung: Die Option -d soll nicht mehr verwendet werden. Statt dessen steht " +"das POSIX-kompatible -depth zur Verfügung." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -"%s ist kein exis." msgstr "" -"Fehler (und Informationen über deren deren Abarbeitungsstand) können\n" -"auf der findutils Fehlerberichtseite auf http://savannah.gnu.org/\n" -"eingegeben oder per Email an gesendet werden." +"Fehler (und Informationen über deren Abarbeitungsstand) können\n" +"auf der Fehlerberichtseite der findutils auf http://savannah.gnu.org/\n" +"eingegeben oder per E-Mail an gesendet werden." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "" -"Die Plausibilitätsprüfung der fnmatch() Bibiliotheksfunktion ist gescheitert." +"Die Plausibilitätsprüfung der Bibiliotheksfunktion fnmatch() ist gescheitert." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -304,57 +354,52 @@ msgid "" "perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -"Warnung: Unix Dateinamen enthalten gewöhnlich keine Schrägstriche (anders " -"als Pfadbezeichnungen). Deshalb wird '%s %s' wahrscheinlich immer \"Falsch" -"\" auf diesem System ergeben. Möglicherweise sind '-wholename' oder '-" -"samefile' bessere Tests. Alternativ kann auch GNU grep verwendet werden: " -"'find ... -print0 | grep -FzZ %s'." +"Warnung: Unix-Dateinamen enthalten gewöhnlich keine Schrägstriche (anders " +"als Pfadbezeichnungen). Deshalb wird »%s %s« wahrscheinlich immer »Falsch« " +"auf diesem System ergeben. Möglicherweise sind »-wholename« oder »-samefile« " +"bessere Tests. Alternativ kann auch GNU grep verwendet werden: »find ... -" +"print0 | grep -FzZ %s«." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" "Eine positive dezimale Ganzzahl wird als Argument von %s erwartet, aber %s " -"erhalten." +"wurde erhalten." -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -"Dieses System stellt keine Funktion zum Ermitteln der Erzeugungszeit der " +"Dieses System stellt keine Funktion zum Ermitteln der Erstellungszeit der " "Datei bereit." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" -msgstr "Der %s Test erfordert ein Argument." +msgstr "Der Test %s erfordert ein Argument." -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" -msgstr "Konnte %s nicht als Datum oder Zeit interpretieren." +msgstr "%s konnte nicht als Datum oder Zeit interpretiert werden." -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "Kann die Erzeugungszeit der Datei %s nicht ermitteln." +msgstr "Die Erstellungszeit der Datei %s konnte nicht ermittelt werden." -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "Warnung: -%s %s wird keine Übereinstimmung finden, da es auf /. endet." - -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Der Modus %s ist ungültig wenn POSIXLY_CORRECT gesetzt ist." +msgstr "Warnung: -%s %s wird keine Übereinstimmung finden, da es auf / endet." -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "Ungültiger Modus %s." -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -362,442 +407,793 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" "Warnung: Eine Bezeichnung für Zugriffsrechte %s wurde angegeben, die " -"mit /000 äquivalent ist. Die Bedeutung von -perm /000 wurde jetzt geändert, " -"um mit der Verwendung von -perm -000 konsistent zu sein. Deshalb trifft es " -"jetzt auf alle Dateien zu, vorher auf keine." +"gleichbedeutend mit /000 ist. Die Bedeutung von -perm /000 wurde jetzt " +"geändert, um mit der Verwendung von -perm -000 konsistent zu sein. Deshalb " +"trifft es jetzt auf alle Dateien zu, vorher auf keine." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" -msgstr "\"-size\" erfordert ein Argument." +msgstr "»-size« erfordert ein Argument." -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "Ungültige Einheit \"%c\" für \"-size\"." +msgstr "Ungültige Einheit »%c« für »-size«." -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "Ungültiges Argument `%s%c' für -size." +msgstr "Ungültiges Argument »%s%s« für -size." -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -"Die -show-control-chars Option erfordert entweder 'literal' oder 'safe' als " +"Die Option -show-control-chars erfordert entweder »literal« oder »safe« als " "Argument." -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Ungültiges Argument %s für -used." -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" -msgstr "%s ist ein unbekannter Nutzername." +msgstr "%s ist ein unbekannter Benutzername." -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "Die Option -user erfordert ein Argument." -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Aktivierte Eigenschaften:" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "Ungültige Eigenschaft -context: SELinux isn nicht aktiviert." +msgstr "Ungültige Eigenschaft -context: SELinux ist nicht aktiviert." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Das Argument von -type muss ein einzelner Buchstabe sein." -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Unbekanntes Argument von -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c wird nicht unterstützt, da symbolische Links auf der Plattform " +"nicht unterstützt werden, auf der find kompiliert wurde." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "Warnung: Unerkanntes Fluchtsymbol \"\\%c\"." +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c wird nicht unterstützt, da FIFOs auf der Plattform nicht " +"unterstützt werden, auf der find kompiliert wurde." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "Fehler: %s am Ende der Formatzeichenkette." +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c wird nicht unterstützt, da benannte Sockets auf der Plattform nicht " +"unterstützt werden, auf der find kompiliert wurde." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "Warnung: Unerkannte Formatanweisung \"%%%c\"." +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c wird nicht unterstützt, da das Doors-Subsystem von Solaris auf der " +"Plattform nicht unterstützt wird, auf der find kompiliert wurde." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" -"Fehler: Die Formatanweisung `%%%c' ist für zukünftige Anwendungen " -"reserviert." +msgid "Unknown argument to -type: %c" +msgstr "Unbekanntes Argument von -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -"Das aktuelle Verzeichnis ist in der PATH Umgebungsvariable enthalten. Dies " -"ist bei der Verwendung des %s Kommandos von find unsicher. Entfernen Sie " -"bitte das aktuelle Verzeichnis aus der $PATH Variable, indem \".\" oder " -"führende oder abschließende Doppelpunkte gelöscht werden." +"Das aktuelle Verzeichnis ist in der Umgebungsvariable PATH enthalten. Dies " +"ist bei der Kombination mit der Aktion %s von find unsicher. Entfernen Sie " +"bitte das aktuelle Verzeichnis aus der $PATH-Variable, indem Punkte, Doppel-" +"Doppelpunkte oder führende oder abschließende Doppelpunkte gelöscht werden." -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove that " "entry from $PATH" msgstr "" -"Der relative Pfad %s ist in der PATH Umbebungsvariable enthalten. Dies isr " -"bei Verwendung der %s Aktion von find unsicher. Entfernen Sie bitte diesen " +"Der relative Pfad %s ist in der Umgebungsvariable PFAD enthalten. Dies ist " +"bei Verwendung der Aktion %s von find unsicher. Entfernen Sie bitte diesen " "Eintrag aus $PATH." -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -"Innerhalb eines Kommandonames für -execdir und -okdir sollte {} nicht " +"Innerhalb eines Befehlsnamens für -execdir und -okdir sollte {} nicht " "verwendet werden, da es ein mögliches Sicherheitsrisiko ist." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "Es wird nur eine Verwendung von {} unterstützt mit -exec%s ... +" +msgstr "Es wird nur eine Instanz von {} unterstützt mit -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "In %s muss %s selbst erscheinen, aber Sie haben %s angegeben" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Der benötigte Umgebungsspeicher ist für exec() zu groß." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" -msgstr "Überlauf beim Konvertieren von %s Tagen in deren Sekundenanzahl." +msgstr "" +"Arithmetischer Überlauf beim Konvertieren von %s Tagen in deren " +"Sekundenanzahl." -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" -msgstr "Überlauf beim Berechnen des Tagesendes." +msgstr "Arithmetischer Überlauf beim Berechnen des Tagesendes." -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" -msgstr "standard error" +msgstr "Standard-Fehlerausgabe" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "standard output" +msgstr "Standardausgabe" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "Kann %s nicht löschen." +msgstr "%s kann nicht gelöscht werden." -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "" -"Das Rückkehren zum Arbeitsverzeichnis war nach dem Suchen nach %s nicht mehr " -"möglich." - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "Warnung: Die Entstehungszeit der Datei %s ist nicht zu ermitteln." +msgstr "Warnung: Die Erstellungszeit der Datei %s ist nicht zu ermitteln." -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Schreiben in die Standardausgabe gescheitert." + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Kann die Standardausgabe nicht schließen." +msgid "getfilecon failed: %s" +msgstr "getfilecon fehlgeschlagen: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Konnte das Verzeichnis nicht wechseln." +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "Konnte keinen neuen Prozess starten." +msgid "warning: unrecognized escape `\\%c'" +msgstr "Warnung: Unerkanntes Escape-Zeichen »\\%c«." -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "Fehler beim Warten auf das Prozeßende von %s." +msgid "error: %s at end of format string" +msgstr "Fehler: %s am Ende der Formatzeichenkette." -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "Prozeß %s wurde durch das Signal %d abgebrochen." +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" +"Fehler: Die Formatanweisung »%%%c« ist für zukünftige Anwendungen " +"reserviert." + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" +"Warnung: Auf die Formatanweisung »%%%c« sollte ein weiteres Zeichen folgen" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "Warnung: Unerkannte Formatanweisung »%%%c«." -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "Ungültiger Ausdruck." -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -"Ungültiger Ausdruck: Ein binärer Operator '%s' wurde ohne Argument davor " +"Ungültiger Ausdruck: Ein binärer Operator »%s« wurde ohne Argument davor " "benutzt." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "Erwarte eine Ausdruck zwischen '%s' und ')'." +msgstr "Ein Ausdruck wurde zwischen »%s« und »)« erwartet." -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" -msgstr "Erwarte eine Ausdruck nach '%s'." +msgstr "Ein Ausdruck wurde nach »%s« erwartet." -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" -msgstr "Ungültiger Ausdruck; zu viele ')'." +msgstr "Ungültiger Ausdruck; zu viele »)«." -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -"Ungültiger Ausdruck: Konnte ')' nicht finden. Möglicherweise wird für '%s' " -"ein zusätzliches Argument benötigt." +"Ungültiger Ausdruck: »)« konnte nicht gefunden werden. Möglicherweise wird " +"nach »%s« ein zusätzliches Argument benötigt." -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "ungültiger Ausdruck; leere Klammern sind nicht erlaubt." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." -msgstr "ungültiger Ausdruck; ')' wird erwartet, aber nicht gefunden." +msgstr "ungültiger Ausdruck; »)« wurde erwartet, aber nicht gefunden." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "Oops -- ungültiger Ausdruckstyp!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "Oops -- ungültiger Ausdruckstyp (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"Warnung: Es gibt keinen Eintrag in der »predicate evaluation cost table« für " +"Eigenschaft %s; bitte melden Sie dies als Fehler." -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" -msgstr "Der Pfad muß vor dem Suchkriterium stehen: %s" +msgstr "Der Pfad muss vor dem Ausdruck stehen: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" -msgstr "unbekannte Option `%s'" +msgstr "unbekannte Option »%s«" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" -msgstr "ungültige Option `%s'" +msgstr "ungültige Option »%s«" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" -msgstr "Ungültiges Argument %s für \"%s\"." +msgstr "Ungültiges Argument %s für »%s«." -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" -msgstr "Fehlendes Argument für \"%s\"." +msgstr "Fehlendes Argument für »%s«." -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "zu viele ')'" +msgstr "zu viele »)«" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" -msgstr "ungültige zusätzliche Option `%s'" +msgstr "ungültige zusätzliche Option »%s«" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "Ungültige zusätzliche Option." -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" -msgstr "Oops -- Das automatische Einfügen von \"-and\" ist ungültig!" +msgstr "Oops -- Das automatische Einfügen von »and« ist ungültig!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Aufruf: %s [-H] [-L] [-P] [-Olevel] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [Pfad...] [Suchkriterium]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "Konnte nicht zum übergeordneten Verzeichnis wechseln." +msgstr "Ursprüngliches Arbeitsverzeichnis konnte nicht gespeichert werden." -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "Konnte nicht zum übergeordneten Verzeichnis wechseln." +msgstr "" +"Ursprüngliches Arbeitsverzeichnis konnte nicht wiederhergestellt werden" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "Ignoriere unerkanntes Debugsymbol %s." +msgstr "Unerkanntes Debugsymbol %s wird ignoriert." -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." -msgstr "Fehlendes Argument zur -D Option." +msgstr "Fehlendes Argument zur Option -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "Auf die -O Option muss eine Ganzzahl folgen." +msgstr "Auf die Option -O muss eine Ganzzahl folgen." -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Bitte eine Dezimalzahl unmittelbar nach -O angeben." -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Ungültige Optimierungsstufe %s." -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -"Die Optimierungsstufe %lu ist zu hoch. Um schnell Dateien zu finden, ist " -"GNU locate das bessere Werkzeug." +"Die Optimierungsstufe %lu ist zu hoch. Um schnell Dateien zu finden, ist GNU " +"locate das bessere Werkzeug." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -"Die Umgebungsvariable FIND_BLOCK_SIZE wird nicht unterstützt. Die einzige " -"Variante die Blockgröße zu beeinflussen, ist die POSIXLY_CORRECT " -"Umgebungsvariable." +"Die Umgebungsvariable FIND_BLOCK_SIZE wird nicht unterstützt. Die einzige " +"Variante zur Beeinflussung der Blockgröße ist die Umgebungsvariable " +"POSIXLY_CORRECT." + +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "Ungültiges Argument %s für \"%s\"." + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "Mehrdeutiges Argument %s für \"%s\"." + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Gültige Argumente sind:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "Fehler beim Datei schließen." + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "Schreibfehler." + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Unbekannter Systemfehler." + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: Die Option \"%s\" ist mehrdeutig.\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: Die Option \"--%s\" erlaubt kein Argument.\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: Die Option \"%c%s\" erlaubt kein Argument.\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: Die Option \"%s\" erfordert ein Argument.\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: Unerkannte Option \"--%s\".\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: Unerkannte Option \"%c%s\".\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: Ungültige Option -- %c.\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: Die Option erfordert ein Argument -- %c.\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: Die Option \"-W %s\" ist mehrdeutig.\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: Die Option \"-W %s\" gestattet kein Argument.\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: Die Option \"%s\" erfordert ein Argument.\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "" +"Ursprüngliches Arbeitsverzeichnis konnte nicht wiederhergestellt werden" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "" +"Ursprüngliches Arbeitsverzeichnis konnte nicht wiederhergestellt werden" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "\"" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "\"" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" -#: lib/buildcmd.c:171 +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "Der Arbeitsspeicher ist erschöpft." + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "Ungültiges %s%s Argument `%s'." + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "Ungültiger Suffix im %s%s Argument `%s'." + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "%s%s Argument `%s' ist zu groß." + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" -msgstr "Das Kommando ist zu lang." +msgstr "Der Befehl ist zu lang." -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" +"exec() kann aufgrund von Einschränkungen der Argumentgröße nicht aufgerufen " +"werden" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" -msgstr "Kann ein Argument nicht innerhalb der Argumentliste einfügen." +msgstr "" +"Ein einzelnes Argument kann nicht innerhalb der Grenzen der Argumentliste " +"eingefügt werden." -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "Die Argumentliste ist zu lang." -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" +msgstr "Umgebungsvariable %s ist nicht auf eine gültige Dezimalzahl gesetzt" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." msgstr "" +"Dateideskriptor %d wird wird einen Überlauf verursachen. Bitte melden Sie " +"dies als Fehler. Bitte fügen Sie eine detaillierte Beschreibung hinzu, wie " +"dieser Fehler am einfachsten reproduziert werden kann." -#: lib/findutils-version.c:60 +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Schreiben in die Standardausgabe gescheitert." + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Erzeugt mit der GNU gnulib Version %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Unbekannter Typ %s für den regulären Ausdruck. Gültige Typen sind %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "Unerwartete Endung %s an %s." -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" -msgstr "Erwartete eine Ganzzahl: %s" - -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Unbekannter Typ %s für den regulären Ausdruck. Gültige Typen sind %s." +msgstr "Eine Ganzzahl wurde erwartet: %s" -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -806,93 +1202,89 @@ msgstr "" "Aufruf: %s [--version | --help]\n" "oder %s most_common_bigrams < Dateiliste > Locate-Datenbank\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" "\n" "Fehler bitte an melden.\n" -"Für die deutsche Übersetzung ist die Mailingliste zuständig.\n" - -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "Schreibfehler." +"Für die deutsche Übersetzung ist die Mailingliste\n" +" zuständig.\n" -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Aufruf: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." -msgstr "" +msgstr "Sie müssen eine Sicherheitsstufe als dezimale Ganzzahl angeben." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." -msgstr "" +msgstr "Sicherheitsstufe %s ist außerhalb des konvertierbaren Bereichs." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." -msgstr "" +msgstr "Sicherheitsstufe %s hat das unerwartete Suffix %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." -msgstr "" +msgstr "Sicherheitsstufe %ld wird nicht unterstützt." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" -msgstr "Schreiben auf die Standardausgabe gescheitert." +msgstr "Schreiben in die Standardausgabe gescheitert." -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "Tage" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "Das Argument der Option --max-database-age darf nicht leer sein." -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Ungültiges Argument %s für --max-database-age." -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" -msgstr "Die locate Datenbank %s enthält einen zu langen Dateinamen." +msgstr "Die locate-Datenbank %s enthält einen zu langen Dateinamen." -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" -msgstr "Die locate Datenbank %s ist beschädigt oder ungültig." +msgstr "Die locate-Datenbank %s ist beschädigt oder ungültig." -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" -msgstr[0] "Locate Datenbankgröße: %s byte\n" -msgstr[1] "Locate Datenbankgröße: %s byte\n" +msgstr[0] "Locate-Datenbankgröße: %s Byte\n" +msgstr[1] "Locate-Datenbankgröße: %s Bytes\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Zutreffende Dateinamen: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Alle Dateinamen: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -903,88 +1295,104 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" "Die Dateinamen haben eine gesamte Länge von %s Byte.\n" -"Von diesen Dateinamen enthalten,\n" +"Von diesen Dateinamen enthalten:\n" "\n" "\t%s Leerzeichen, \n" "\t%s Zeilenumbrüche, \n" -"\tund %s enthalten Zeichen mit gesetztem hohen Bit.\n" +"\tund %s enthalten Zeichen mit gesetztem hohem Bit.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -"Da einige Dateinamen ausgefiltert sein können, ist es nicht möglich, das " +"Da einige Dateinamen ausgefiltert sein können, ist es nicht möglich, das\n" "Kompressionsverhältnis zu berechnen.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Kompressionsverhältnis %4.2f%% (höher ist besser)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Das Kompressionsverhältnis ist undefiniert.\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" +"Die locate-Datenbank %s sieht wie eine slocate-Datenbank aus, scheint aber " +"Sicherheitsstufe %c zu haben, die durch die GNU findutils gegenwärtig nicht " +"unterstützt wird." -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" +"%s ist eine slocate-Datenbank. Die Unterstützung dafür ist neu, seien Sie " +"auf Probleme gefasst." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" +"%s ist eine slocate-Datenbank der nicht unterstützten Sicherheitsstufe %d, " +"wird übersprungen." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" +"Sie haben die Option -E angegeben, diese kann aber mit einer slocate-" +"formatierten Datenbank einer von Null verschiedenen Sicherheitsstufe nicht " +"verwendet werden. Für diese Datenbank werden keine Ergebnisse erstellt.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "" +msgstr "%s ist eine slocate-Datenbank. Die Option »-e« wird aktiviert." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" -msgstr "" +msgstr "Die Datenbank %s im alten locate-Format ist zu kurz, um gültig zu sein" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" -msgstr "Die Datenbank %s liegt im %s Format vor.\n" +msgstr "Die Datenbank %s liegt im %s-Format vor.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" +"Die Datenbank hat die Little-Endian-Bytereihenfolge der Kodierung der " +"Maschinenwörter.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" +"Die Datenbank hat die Big-Endian-Bytereihenfolge der Kodierung der " +"Maschinenwörter.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" +"Die Bytereihenfolge der Kodierung der Maschinenwörter in der Datenbank ist " +"nicht offensichtlich.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1004,141 +1412,176 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " Muster...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "Verzichten auf Gruppenprivilegien gescheitert." -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "Verzichten auf Setuidprivilegien gescheitert." +msgstr "Verzichten auf Setuid-Privilegien gescheitert." -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Verzichten auf alle Privilegien gescheitert." -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "Verzichten auf Setgid Privilegien gescheitert." +msgstr "Verzichten auf Setgid-Privilegien gescheitert." -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -"Warnung: Die Locate Datenbank kann nur einmalig von stdin gelesen werden." +"Warnung: Die Locate-Datenbank kann nur einmalig aus der Standardeingabe " +"gelesen werden." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "" +msgstr "time-Systemaufruf ist fehlgeschlagen" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" -msgstr "Warnung: Die Datenbank %s ist älter als %d %s (Das Alter ist %.1f %s)." +msgstr "" +"Warnung: Die Datenbank %s ist älter als %d %s (das tatsächliche Alter ist " +"%.1f %s)." -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -"Warnung: Die locate Datenbank %s wurde mit einer unterschiedlichen " -"Bytefolge erzeugt." +"Warnung: Die locate-Datenbank %s wurde mit einer unterschiedlichen " +"Bytereihenfolge erzeugt." -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" -msgstr "Unerwartetes EOF in %s." +msgstr "Unerwartetes Dateiende (EOF) in %s." -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "Fehler beim Lesen eines Worts von %s." -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." -msgstr "" +msgstr "Ungültige Escape-Sequenz %s in der Angabe des Eingabetrennzeichens." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" +"Ungültige Escape-Sequenz %s in der Angabe des Eingabetrennzeichens. " +"Zeichenwerte dürfen %lx nicht übersteigen." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" +"Ungültige Escape-Sequenz %s in der Angabe des Eingabetrennzeichens. " +"Zeichenwerte dürfen %lo nicht übersteigen." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" +"Ungültige Escape-Sequenz %s in der Angabe des Eingabetrennzeichens, " +"angehängte Zeichen %s werden nicht anerkannt." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" +"Ungültige Angabe des Eingabetrennzeichens %s: Das Trennzeichen muss entweder " +"ein einzelnes Zeichen oder eine mit \\ beginnende Escape-Sequenz sein." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" -msgstr "Der Umgebungsspeicher ist für \"exec\" nicht ausreichend." +msgstr "Der Umgebungsspeicher ist für »exec« nicht ausreichend." -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" -msgstr "Warnung: Der Wert %ld für -s ist zu groß, verwende statt dessen %ld." +msgstr "" +"Warnung: Der Wert %ld für die Option -s ist zu groß, stattdessen wird %ld " +"verwendet." -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 #, c-format -msgid "Cannot set SIGUSR1 signal handler" +msgid "option --%s may not be set to a value which includes `='" msgstr "" +"Die Option --%s darf nicht auf einen Wert gesetzt werden, der ein »=« " +"enthält." -#: xargs/xargs.c:635 +#: xargs/xargs.c:618 #, c-format -msgid "Cannot set SIGUSR2 signal handler" +msgid "failed to unset environment variable %s" +msgstr "Gesetzte Umgebungsvariable %s konnte nicht unwirksam gemacht werden" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" msgstr "" +"Warnung: Die Option -E ist wirkungslos, wenn -0 oder -d verwendet wird.\n" + +#: xargs/xargs.c:654 +#, c-format +msgid "Cannot set SIGUSR1 signal handler" +msgstr "Signalhandler SIGUSR1 kann nicht gesetzt werden" -#: xargs/xargs.c:651 +#: xargs/xargs.c:660 +#, c-format +msgid "Cannot set SIGUSR2 signal handler" +msgstr "SIGUSR2-Signalhandler kann nicht gesetzt werden" + +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "Kann die Eingabedatei %s nicht öffnen." +msgstr "Die Eingabedatei %s kann nicht geöffnet werden." -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" -msgstr "Die Umgebungsvariablen beanspruchen % byte.\n" +msgstr "Die Umgebungsvariablen beanspruchen % Bytes.\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" +"In POSIX erlaubte Obergrenze der Argumentlänge (für dieses System): " +"%\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" +"In POSIX erlaubte Obergrenze für die Argumentlänge (alle Systeme): " +"%\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "" +msgstr "Maximale tatsächlich nutzbare Befehlslänge: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "" +msgstr "Größe des tatsächlich verwendeten Befehlspuffers: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1146,183 +1589,374 @@ msgid "" "run commands; if this is not what you wanted to happen, please type the end-" "of-file keystroke.\n" msgstr "" +"\n" +"Ausführung von xargs wird nun fortgesetzt. Es wird versucht, dessen Eingabe " +"zu lesen und Befehle auszuführen. Falls Sie dies nicht wollen, drücken Sie " +"die Tastenkombination für end-of-file.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" +"Warnung: %s wird mindestens einmal ausgeführt. Wenn Sie dies nicht wollen, " +"drücken Sie die Tastenkombination zum Abbrechen.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" +"Fehlendes korrespondierendes Anführungszeichen %s; per Vorgabe sind " +"Anführungszeichen für xargs bestimmt, sofern Sie nicht die Option -O " +"verwenden" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "doppelte" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "einfache" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" +"WARNUNG: Ein NUL-Zeichen trat in der Eingabe auf. Es kann nicht in die " +"Argumentliste durchgegeben werden. Wollten Sie die Option --null verwenden?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "Die Argumentzeile ist zu lang." -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Schreiben in die Standardausgabe gescheitert." + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "" +msgstr "/dev/tty konnte nicht zum Lesen geöffnet werden" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Schreiben in die Standardausgabe gescheitert." + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "Speicher konnte nicht zugewiesen werden." + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "Umgebungsvariable %s konnte nicht gesetzt werden" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" +"Pipe vor dem Starten des Unterprozesses (fork) konnte nicht erzeugt werden" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" +"safe_read im errno-Puffer fehlgeschlagen in xargs_do_exec (dies ist " +"möglicherweise ein Fehler, den Sie melden sollten)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" +"Zurückgegebener unerwarteter Wert %d wurde gelesen. Dies ist möglicherweise " +"ein Fehler, den Sie melden sollten." -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" -msgstr "Fehler beim Warten auf das Ende des Kindsprozesses." +msgstr "Fehler beim Warten auf das Ende des Unterprozesses." -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "" +msgid "WARNING: Lost track of %lu child processes" +msgstr "WARNUNG: Verfolgung von %lu Kindprozessen ist verloren" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" -msgstr "Prozeß %s mit Rückgabewert 255 beendet. Abbruch!" +msgstr "%s: mit Rückgabewert 255 beendet, Abbruch." -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" -msgstr "Prozeß %s wurde durch das Signal %d angehalten." +msgstr "%s: wurde durch das Signal %d angehalten." -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" -msgstr "Prozeß %s wurde durch das Signal %d abgebrochen." +msgstr "%s: wurde durch das Signal %d abgebrochen." -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" -msgstr "%s: Ungültiger Wert für die \"-%c\" Option.\n" +msgstr "%s: Ungültiger Wert für die Option »-%c«.\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" -msgstr "%s: Der Wert für die \"-%c\" Option muß >= %ld sein.\n" +msgstr "%s: Der Wert für die Option »-%c« muss größer oder gleich %ld sein.\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" -msgstr "%s: Der Wert für die \"-%c\" Option muß kleiner als %ld sein.\n" - -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Aufruf: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=Begrenzer]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-Zeilen]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [Kommando [Argumente]]\n" +msgstr "%s: Der Wert für die Option »-%c« muss kleiner als %ld sein.\n" -#~ msgid "cannot get current directory" -#~ msgstr "Kann nicht in das aktuelle Verzeichnis wechseln." +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Aufruf: %s [OPTION]... BEFEHL [INITIAL-ARGUMENTE]...\n" + +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Der BEFEHL wird mit den INITIAL-ARGUMENTEN und weiteren aus der Eingabe " +"gelesenen Argumenten ausgeführt.\n" +"\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Obligatorische und optionale Argumente zu langen Optionen sind\n" +"ebenso obligatorisch oder optional für die entsprechenden\n" +"Kurzoptionen.\n" + +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null Objekte werden durch »null« und nicht durch " +"Leer-\n" +" zeichen getrennt; dies deaktiviert die " +"Verarbeitung\n" +" von Zitatzeichen, Backslashes und logischen " +"Dateienden\n" +" (EOF-Markierungen).\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=DATEI liest Argumente aus DATEI, nicht aus der\n" +" Standardeingabe\n" -#~ msgid "invalid argument %s for %s" -#~ msgstr "Ungültiges Argument %s für \"%s\"." +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=ZEICHEN Objekte in Eingabe-Datenströmen werden durch " +"ZEICHEN\n" +" getrennt und nicht durch Leerzeichen; dies " +"deaktiviert\n" +" die Verarbeitung von Zitatzeichen, " +"Backslashes und\n" +" logischen Dateienden (EOF-Markierungen).\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E ENDE Setzt die logische EOF-Zeichenkette " +"(Dateiende); falls\n" +" ENDE als eine Zeile in der Eingabe " +"auftritt, wird der Rest\n" +" ignoriert (dies wird wiederum ignoriert, " +"falls -0 oder\n" +" -d angegeben war)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=ENDE] gleichbedeutend mit -E ENDE, sofern ENDE " +"angegeben\n" +" ist; anderenfalls gibt es keine " +"Zeichenkette\n" +" für end-of-file (EOF)\n" + +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R gleichbedeutend mit --replace=R\n" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "Mehrdeutiges Argument %s für \"%s\"." +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] ersetzt R in INITIAL-ARGUMENTEN durch die aus " +"der\n" +" Standardeingabe gelesenen Namen; falls R " +"nicht angegeben\n" +" ist, wird {} angenommen\n" + +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=MAX-ZEILEN höchstens MAX-ZEILEN als nicht-leere " +"Eingabezeilen\n" +" pro Befehlszeile verwenden\n" -#~ msgid "Valid arguments are:" -#~ msgstr "Gültige Argumente sind:" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[MAX-ZEILEN] ähnlich wie -L, aber die Vorgabe ist " +"höchstens eine\n" +" leere Eingabezeile, wenn MAX-ZEILEN nicht " +"angegeben ist.\n" -#~ msgid "error closing file" -#~ msgstr "Fehler beim Datei schließen." +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -P, --max-args=ANZAHL höchstens diese ANZAHL Argumente in der\n" +" Befehlszeile verwenden\n" -#~ msgid "Unknown system error" -#~ msgstr "Unbekannter Systemfehler." +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=ANZAHL höchstens diese ANZAHL Prozesse zugleich " +"ausführen\n" -#~ msgid "%s: option `%s' is ambiguous\n" -#~ msgstr "%s: Die Option \"%s\" ist mehrdeutig.\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" +" -p, --interactive bittet vor der Ausführung von Befehlen um " +"Bestätigung\n" -#~ msgid "%s: option `--%s' doesn't allow an argument\n" -#~ msgstr "%s: Die Option \"--%s\" erlaubt kein Argument.\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=VAR setzt die Umgebungsvariable VAR in " +"Unterprozessen\n" -#~ msgid "%s: option `%c%s' doesn't allow an argument\n" -#~ msgstr "%s: Die Option \"%c%s\" erlaubt kein Argument.\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty falls keine Argumente angegeben sind, BEFEHL " +"nicht\n" +" ausführen; falls diese Option nicht " +"angegeben ist,\n" +" wird BEFEHL mindestens einmal ausgeführt\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=MAX-ZEICHEN begrenzt die Länge der Befehlszeile auf MAX-" +"ZEICHEN\n" -#~ msgid "%s: option `%s' requires an argument\n" -#~ msgstr "%s: Die Option \"%s\" erfordert ein Argument.\n" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits zeigt Begrenzungen der Befehlszeilenlänge an\n" -#~ msgid "%s: unrecognized option `--%s'\n" -#~ msgstr "%s: Unerkannte Option \"--%s\".\n" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr " -t, --verbose gibt Befehle vor der Ausführung aus\n" -#~ msgid "%s: unrecognized option `%c%s'\n" -#~ msgstr "%s: Unerkannte Option \"%c%s\".\n" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit beenden, falls die Größe überschritten ist\n" +" (siehe -s)\n" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: Unerlaubte Option -- %c\n" +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help diese Hilfe anzeigen und beenden\n" -#~ msgid "%s: invalid option -- %c\n" -#~ msgstr "%s: Ungültige Option -- %c.\n" +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" +" --version Versionsinformation anzeigen und beenden\n" -#~ msgid "%s: option requires an argument -- %c\n" -#~ msgstr "%s: Die Option erfordert ein Argument -- %c.\n" +#~ msgid "cannot get current directory" +#~ msgstr "Kann nicht in das aktuelle Verzeichnis wechseln." -#~ msgid "%s: option `-W %s' is ambiguous\n" -#~ msgstr "%s: Die Option \"-W %s\" ist mehrdeutig.\n" +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Der Modus %s ist ungültig wenn POSIXLY_CORRECT gesetzt ist." -#~ msgid "%s: option `-W %s' doesn't allow an argument\n" -#~ msgstr "%s: Die Option \"-W %s\" gestattet kein Argument.\n" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Erzeugt mit der GNU gnulib Version %s\n" -#~ msgid "`" -#~ msgstr "\"" +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Aufruf: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=Begrenzer]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-Zeilen]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [Kommando [Argumente]]\n" -#~ msgid "'" -#~ msgstr "\"" +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: Unerlaubte Option -- %c\n" #~ msgid "Success" #~ msgstr "Erfolg" @@ -1378,24 +2012,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Es fehlt ein vorhergehender regulärer Ausdruck." -#~ msgid "^[yY]" -#~ msgstr "^[yY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "Der Arbeitsspeicher ist erschöpft." - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "Ungültiges %s%s Argument `%s'." - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "Ungültiger Suffix im %s%s Argument `%s'." - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "%s%s Argument `%s' ist zu groß." - #~ msgid "%1$s terminated by signal %2$d" #~ msgstr "Der Prozeß %1$s wurde durch das Signal %2$d abgebrochen." diff --git a/po/el.gmo b/po/el.gmo index d618d9acd086c36469897e1f342015fb7c7bbd97..82de681923493d19303bb204ba55e88755c2757e 100644 GIT binary patch literal 49327 zcmeI537i~vb?3{3K$s99+-E2oCX%pvEXg(y$ugFuu`SSrBpVZB?4FsPnYMbmhwdI7 z96|C02HC`5#}EQGU?9P=jj)9*UrM|Lc9W&Y%O+vjkcDKEWs^@fn`{n9Hd*%jd+-0R zs_y9-jSVDOmiegkx~l%?yWji&tLncz^NBZ~lqAX5IaY8yKIv4)(r;T{Ch-M}Y3H%V3l-v`_Z{4LB{Ts&ei`b1H1%C)5-n-KMpK${skaY zNd8y2{>;H7NjX0Qcoy(N;M0Kb2c8Z57*KTiCQ$SJ4p8-<^|L;o(}Cx3eko9R`Y2H2 z{SDwPz~2Gh1FV5O;XPeS`zIyI6~Le4d>=^BJnjL$8u(S9=J^be1nH7<5ZJ4*}l*{3dWO@YM*6`acYO4R98C2k_}k>SEvn zK+WUXs~mr?2mS-+Zv(2m-TbHVdrjB`;zyHv%^RZwLM!a0BpdXF6Se9jJbP zAE;5uMwb&@oI4d7dV-vIJ2dHoun??K=TIDa*heJ*f&fK{Nzw;#9`cpq>*@b7?{ z|7tEi16T*Dy>|kC5_o^O{zc$RIR9!m|6Ab6oIeTTJ`uPS_#|KnsOx6{-w3=2_+sE^ zfzJkh87MyfBcRGX0b}sn-&LUaV?R*i_)XxufqwyfK5!2=5w+wOfg0caz!dmRU74z>_(D%6S|oF;}3*b>{hw=NeFa(gHpW_)(z7btiBcTz*zSjBWir2Zmz6&TieH$o#dD$lC$2S8Z zZSp8keEM{R_Y~kefs%)h1J40I3j9OhPj3O&z`q9mB=BonolbuOypMkWH}Dm}dtdMN z;v3uHH_iulFeczDcB12`_qq#_8Q^_Djeo~Q4(|X84?o7muK`~K)cF1ucsuZni&KGhAaDqemX;v|qRxDH4c$pIiNm;5PE^I19N_M`>e!}%wHPXoTBo+J!8 zSq@wVd_Pcn?m^%%@P7hfspL$UX9joxh-yr}4V0X&V6cA$Tn{||B+8)#Z{++PO|Crw zeuFsbZwHlOo#eNH8sCd{yZ>?(aES9qfrw=CUEqG;dMf=9@CyNcdM~<;^Y`pak{_p^ zk+-_vH2F54#~r|@a{qqddw^d8{v~kx+nvAGzavSm;rvQq8Tb>wfGz-D0Te!0yc2y- zyEg!D;QZnJj`z(6T<;tPewpj(mGCO?FMy{2|M)7u|KzKo3H5gaZ|3@E=nN7j=Ukg4 zZ_+vN0QaB#F1Mf8!Q9)p{#D@50heCq`gsKS*PK5H+)4S*GMV>t{^JL|+y{Ze*H?hB zLUPjeNpd-`1{B@C3|tP>ByOjE33x82UwNO8=Q+QK-sAc^flNL5AjCqnlIPLM6!0xT zNSJ&BsQa(~0JakNDDcmK2XAt}VGonMgY!QJz5w{aUvmEc9Po6`|2t50fAKBe&P~Ag za{jCjVyl6-0)H0xq7S*;p9?H;{w?5A;B!zO;`g(GF9%)&TnGFNZ~*w{0e&0!M$Vt` z;UxJq@J&F?_ldva_WOL`7S8toF9v=Q2#X~z{fNuUF9Fr=?*YZ{&;O`je=~3`=N|=L z0Q@>o^#^ZtIrs(OYdQZLpyd2Dx4~<`n}DMGw}3ANzW!s*_iq7i;`}#&F91I6<1Xh* zfuiGwfS(6G@e|Ik4*)@R@()1G|9!W6JNE)7Rqm5M&MBbE-3iUq8#ueK=JFRfKLN{ z8~AkKlkQ|3lz%SpRh(aRm-|yU0AIuTaiIGBE>QS<<=tMt4P4FnRlwf@J`8LFuluaq zxBmmAN^-&HoUY#n3a_``9gOrU&tl!)f`(np2nduLy`nFZ1(O9 z;5#|SIbeCC9U%G79KX)-1djN3dHfOJ$w2WCBsbZ6YPcSOdfZo(t9|Vvf22T=>mV}*#FpC;B_1uIiAPyOB}z!F~orw z*q?Z+#c>74H5{+x_yC9gp2H#9>JK)tzt{5r#T;MsQ=?7zY4#xgPWka4INrvANSF@< zFxw9alb_;%boMvM|6k#_lH+{4;{UBL{MOG8a{P9$hyxZj8wjw! z9sK_YhxDOzo&HYe_zVZ^X#NJk;xx%f@1OWxe}_39;yB3hR*nlf9^m*jj#V6!9Qyld zj-TOp2gfkSvpFgpPvN+p;~5;6aoo(Izt?g6s{QgD#hdwk8pnG%N*qt-cmu~p9R2=& zlZ#hz{20e*D6lTT*8rDre3Ij19RH5v6&%0FA$h5D=x-CpB^l6TaIUPyo=*!IX=aqzxy57 z|4-uouW?{nOb4C|yop19H#l&c%@l=>D z<#-`=U!}(Qg>9-hNKFC;rgA+hJ^#)1StmYmahGc-G$&ICSmF4?1m& z*Iv)HRl2}mEO!mp#MAnV*FMj+NV8M?mhp|+y$(T}cWf}*>qGfCwtwQ<&TuWZzXK+d zKG0vh_7_}h`lamJ$gjH$7Rx0A!+R^EGwo`lo;JqQz2)XaE8SDA)zZ;My6*0Eb^f+@q^G8(#;&|TvD#R*ncwi5#Y?er@!A?@K2{ko&(zxK zbh$k#+zX+jGtFkD-cBi78ErS3`_`nfSY_{Yv(jpb0VwQP8Yoc+OD+PoQp{!-UpI^ywYT)HtoN={vWHhrfalqEMjF;y|Ne7WmTt} zjZwx{YSkL;((ZC|?M3Uh(@3k*hDCN)n~nOEX2qRqc?4e3?J6udS*?wwp>m~_x7V6% z>?zf%Q{vjfpDw52GH3`KOhJfQtJEjjlX(-nD^0^yp}KxHX4(>hc(+;~Z#1XMCRTH% zCCRGnZA05FJBKgcnYCSS%(N=av{Y|QG#fM1&_Wd4wr=On;q6;Et2C$5OG>9*x_Rq{ z;k4AOOjP#9yOC`qlZJ`Xo@TY}zr=Af_B)o^GudET<*7=no|anGw^q_EmyC?=*|qun zOVd)jiR70|Ah|d;4Ucc&@=SFs-4dH&w48BKqu#P^GlSaORpZhmO-mb7k*xn;OJgX* zb<7547_F?`E^L%GE$7lyd9RV6wRZEmi%Xj}ZW-R8R_HB7kxVt<$NWaUQ7?_u%Jp4A z8;N$U6qJR*_V3@W26Dpy^@{brE%q)B^4_;?-@4va#Cibl~*RH={-S&0s zVGXs&l_@FWFnbhcr973En-yebx{SO+sgZqYR%iK%(IS;il|7TR-I|6rsEle$EY(Wi zGSfh#im^w^qq|zQa%=L$4F)7t>l0S9)|jY{mTT$o*7KsMa?55~(M&6i@k`bYZ-MK& z{wgTf-DTLfEdx**PAMWwW1y9`rYob>@oHsk&4~xpKr=S?R9keXUlli0UB(AQ#z9pz zsKBO|tli!D;xQ}fjX3&op=(xk|+XY zy*rxQIjL-TcmXc*@<2@D4Sz=aUXiyux#%F}QD^5uJgxRH_!uiZf!&oN6Tyj7({OhM zC0$7o>AILQIxaSxrmEK)C2p3gy06eP?{jUeEIHS8Zq?|0ea zgce~!Wy)g+=rahbT+*zJtKy|}x?1=VCzwV?!M0~w>8dl&T$7eZU=c=Pg{pOo3r!jt2UO-&Uusc7v$J>}hdUs~4E@YFyMB4pnz^DSqb+6CJ6fXK9$;{0T~)z1EAm zZ^qEXi;yj6^+==hHlDY&6?9bbe&9R&tv2JCN)?z*~*cT^0N!*SSB4`Ly;;jWlX-JC5M4$KMg8Y^6g(Ljq@~uSr?rs-@?F zSMvf^b9o?H7cGWaT=SU&FDN!B<3u#-wSD}j_@j*^CF{#|QF*i`h1=~O#Cweqt2t6_ z;&R9Zl@2t~Kp;bXg16`+_S`XdwB|t`&h?Ci=q`e-p;+At#hXQ`Q^ifBT5yp=B}yAIjXc~h&h+L??3gT-$`WwY z#u(n`6nf6pM=~tsdG1iUp#t+Zli{c+%jtBZRW-LH){v_*!Ssql8N^`A8JmFe&@itq z8d`C&Q*vI}q?Td0TFs;U!maU{8XPs&Y)oUWs=KK%Q7Kk!mB%X-=xsqAL4)p+cvE{C z&0W&mSwca`Z8XO!=0uwNk+~2koUR5Gnv&;fX!4+qWtxgjO4p?oC zHmlPl9WWrCgTk}fwI=3`aKDumvP=SctgQUda{TS7icE)wNoUpiXl-UpR&A_;ph(Zf zc0=+@l*bb$8HLldN2v)VxiIcyGuR<(Jy`l7AD8>}lV$KxCdD!}gG!aF={W<5AB-}x zkN9b5V5^d05?&J|xVioOc9^P6trG#N=u zI)bf6;NW$`WiXRi`Dq~n_k~zV4Iv*yipuer2v}&|CE}_9b_Y=hYH8kvqGMn!bQ^Jv zxms_C3L;a^Jj{L6l2y>xJ+vt8F0#deOjhyfo1>Ha{uzeRG91FxL3Q*W$HsKj)$@3D z0{&GpC{;?yxDI-u(ImiO(sEPfNur^XjT7~TG3ZR4#9U*dPBbdMgn`rXT6uz6$wrBf z(F8Cx18*v8O0-6FP9m#P8+R?C)M^$UdPP@CnM$F)JdhA#cqkAZ=2Cfr;RNreSc6F@ z!!tJb=H+tbmS~oiKFSIptz{CqEkgAQp@&8f`aDaV*^C|*Q_^jC81O=`S3Q(KX$$HrhEY6qbX8CmgNj_RV#U|B|F}T2Qk4qK=L}g_~C7XJJG(~nYVWuPp7QT(!v>E-O)blZaT)Eb23}{8d zYi9gUMG1p&G}<6L-kNUI$Ao=6F{wezZKE|em)qo%xh|zw@Zq-B#!Bu+5HfYgo?>_n z1`B6xAtB)1gfZC~9lL5>ZXDu)!X=eYh1`X=7{!(fXiC21smazp$ga)AexxmlR5y-i z3oH^#^X#RvT1rgsBW+h5-BsJSTqdVgm93r;52WXBxiHLODB0#qF|J5JGz?U9Y0~Nx z-gp%qhO(^5jrh+c^y;U9NPJw4GUA5-@uzBdj}Ur2tL155;4I z9H>koPr}1|%S6fcJVoQ&owHI`7Ekkr4)Z1_qKHJvj!92WGBcd_2^r zEDV6%5Lp6G)}dLuiXW6V6)aPyfln`Ty5FIN8NFz47Edx<^c?HN2j6C_0 z23{p@#7;`U;95N*w6BaIuw>UmY-D#!Tcfp#+N;Qap@y}PK z((+8Zp;a03&af}OX5AQ+ton3&(yeG%!;9$6H+vQ!zaHg>% ziULL>YL?W%d$U|4ozzU1$e~|i4QIs{H2&^d$Y#n$C@ku(3<2c_G-K9cPRTiIjE*bw zy5;uSytl2}c|qT`yXBERgkQ_nk!7;AxDjQMrWBBQB7uXp6M`F(AD;eRE^fjKwQcK zw$=^Qll}Idx=LT58=LgsHvPBNJWKuBkam@0g}+RuOHIda*XoLjR&;sT?p>lKt4m{Y z{L-*?a!ILbcgas-*Gr=;8K~YKyO^zy>(Yo_(wc(I?xk^42=lNdleJrPzm{%M*&S9^ z$z`SDM_anqJ^4{9F{=DpK9p^`c!AxiH{7VH<|ez6pHJC2yKAO(w`FIo_E@!%x3tbK zV%=0?+D>daMyE|XwQU1B^$i4Kh_yT4xNSIZ!xr8nMimyOtikpro3V$efZ3_zrgl+% z>$aU6w{E#q-fLXGx}@k->CQm%hIQMwY}|7G>U5LV^WAqusSo1X_Uz)wi9A)w(HpYr z$iogjhAK1lxt00^FIo&3nZcn9PBCsAdfYY;DVya+CV4~I*0D@~goR11rOJ8F*Bx^g zDXfZW^OxHOo4fD-LMPTymx>pp9_7I`n=>rY7B_zpQesf|nPn4Q2%6*(1WIZLnAZ0s zq-N19e8T^sOY{LuD%w+XkmqqQPv5FiY~ONBN~9QyvgyddSW{U6D9LJ}}8H6J+vgS#U*e=&bm0fku z4)4m+l#Q|SzIkd(@NlIqgu)p?fGBJ7W~-W7QAEvvJA(dJ0s)ptS+G*$jt~ozns1sR zz}yzl%6<^vSg1Pku|j}>kcSK7%C|CX29VVbe43q`(X=MbhGbPqs>k0gGJK>&^LAxb z=K8dWtg?mOkqX!r))Y0gQQ|Q$HeDqd7xp?p{#}VMk+_$e6n#C2HPvlsYrnat%qj^t#kPGfb{Pq;WD3cgG~*Jg67sRupge0VA%P4xJVaI6{_?@W!Or^5>A6o5e**KgU;*vV>s!DU{!Swse_9(QDRc(B7e*oWR+6Jy2k9upIcq$9%FZbh zkm2kr(m}R-A|%2Ix+PhxHE0i4mLMn;BImQXL1-PZ$iP{!($y#1Ko%%BQEAI4qX$wS zrr0Nm+W>rDq&d--!yDQ4Op-4T8F0buZq6EgF0Dy7+G@M=k}w1|EHWska0RKGsS4T; zI@mre2r60D?iZGWhx#_?yOSKF+MnVczN(?olpvX>TIA;L0fcU)5o51}*OexlwOi&K znMpJWz+aQu9wVWGqVaT~i9y6)j)^sS#!gBGowZNX?K>ZNV3txcbBO*R1E91D8@-go zbty7C$Q&)$4C+lgd1BY*QWZ$4@FUmAOxYJLV)1+$mV#k_?&@^M@FsS^@0CUnGQ+B5 z-bG%=$lu44QZ}bdJ_GG0E;Hvuwz8tcGbjvIFda--Yvf6vM(AD{YWYJ zg}pm{wnT}rwiu|bN+7^c-0eOPO~yowlEQhCHVbM)Rt3EtLjQy%0Lvn0GC|XZ4-$vk z+8alVsq~HM%I}cbMB*^P%=+Y{w`9&XzMp65;MlSgmZCsl5H=8zwMN0&xS-M~yTwSg zv;AJC5`1cvR~b3^8AuvAWZMktf@7QRmaPtv;?i{Z;%(d0Wdu7X`%g9~iyiE8YG5S| z+mBV0(sf;+C;eO%+6k8%z2zXO70YTa57n5CA*obS1Rfk;d?#r$P;6Tc@KQon)mOJ$ z>E&yeB=Y9M8d#Wo!CIMq^X&%>ZOQUpKv}s)#uCP0=l3!_Ho=Kjet5pY(yU>}xpd*c z070|1IrOVb@;UCojb4Z0wlIWNhTM<_^^8NR$kS4>>89a}hBxit0?9q)X7dY*oP~cv zjPZckETh2wb1Yn1@}S=Q6zt1oEJ)yf*BgB<4eJ5(q+if z2y4w4%$d5meZfWyCGO!Raob_96ybrvWrYoh)QCH}&9li*!`=sbgd$zKC6z9K%BOCT zu$S!rEuu#mT%_!_FS8v0_2CbkkZ2&>;p(W}jR+YnmSNyt#?3@&oE0(fG2Sw>rq~~E z9Wz5K?t*A5e{88*Go7_9K7@cKrm@25%#K;?d~X_ zP+|o_U~DeC+wEk=HjS8QVD-!*u>pkDLhiV+#i7$~bMS~=C|pF@7Y*40x6Jf#-?DKL z7EGY&J)&%}54|C{wpD(ORw$zSvn#G?Oj3{|#Mz&`nyIr`=T=rBuEmWjf|wJAphB_ecq5*!Hb$#3F^AGG}3Ec z);KF>BrLgv4fItlVT!D!w2x~sauQ?-GVZgggjQ~ym=YQq6AO{qNED(x;V~|lvCd71 zSIoVzL&|c7!bjOx0dTrxl9e19_g!EGEUU*}zesA*Hc6r@Js{NsG)jl+`Y4`qalndd z~?bOX&A@85G2bw9YRXQ;g*T~P) zwpPeXn8(2LeV|&s^9_^kH)Ip-ilVkP8&{B-C~X`oUF54Pt4)F0bFrl}hRz&Xxhgz7 zTiV>h+LzAd5!%wu#%kMsk@@-Y5!!)mTX&Y$BUc((X#=voI$gD5WY;sR#33Coh?3E(8VfH}h@ba{Cf9G)LSn5UhbL}{V_H*sN&Rw*4 zME4$|na;hPV_f}Q=TNvxOGi5oX#{t3<#^}b*@Ln7*rw{y(*ef!u(x!i^N>c!aPOSG z@{yw{Ez-oj-1L^zm3llpdkqz7aKBB5!Ppd;!IeH7o7IC1hwhiF*kMh_I(}gG2AX7k zj9yL~QZUfDQ7zA2OKS%@hlG=BDg8j_L8f!{>~-{RsL_Px+wr4T7$yTh(78vm0i{>| zfB1~}tT73b-wz64JCN}p)OiTz3p{c!7&^|yyNo#^Nsk9sn0=SwTcm;&4$;JMnm8_Y zSg7ecVf1T7W5`NRkUchhG&oxWy53XlL1Ul;Dh}T)5o3v?Bm^4z-TVstwtx2EYVoh# zFlK;55sx@e4brZ7w8ijY)4BYhr_=No!cspe{!g6;VZK9*9&yx=jn@%2IQxkBR--to zv(JHF*@N)@bqv4|V6qd( z?T_pmM*8r3sqZuUJ`IFMjheuV(Ixx2@sU~z<}<}qeXR58&dr?OWs}T-q;QND`r9IOMrW1Oe_oq2EdSmC8JGXakv0tAM0@?FNI@g37?TnV3y`Di~ z>(Mw|J!k@RO)8De-Mc%V4{9M-nd#i77x8p?VM5Frc|C$wxnDoUYd9ES{-{QR{*}U( znk}j_OfUM}-y{G6G@QrxG64p%-$)%=c}y=BFdEA5x!x?%g9wQ@2K~i)z1}Gx$~zO; z*_}|)+^Il+3NwvGpo?~-l8@oi$RfG7WaK{tw|b*wYqHngoZ!s^8Ww$vb<6@Ay4|b> zO@F-mMFdddNNS`%D56mJ@QI~TawAoqxsCm}hoYREe-uhOa>Tg;0N0@`qPsdF4^ysJR)O&X|(bjUbXvfS+^$$hxXnIY3C zAQQtb&3beZFGhe|k^@v+kG?C4s-Y`?T|(d$@tN@`N~8;MbS=;AxG9Z#e8ivCnC{mo zEU3%vjS5By#Q}jojBY|k&sc+Qp1q;-koDQ;RSS}II9)!Fw58$kSQMm8VIQL>j8f(s zWG&9~_60-CT+x9=X}Wjx1Qd}|L>!%EF^t;DbY$HZyP>1O9aOYv82>Fb8U-W?V z$m=s_U_J-!F}&>o>h-w7UF6J3FC&myK57+1UKc8PiZ=Y>iy`3c%vCmqbon!;R|F^h zab>#H9N{}b0sak7{^vS|m{nJqGujbcAw~Au2>poS6hzp=Vkji#jBjpzVDQ0iT<75u zTGZG{mRn)Acw7kmJf@brl0>Kf-Rf8ENSnl1RlO<<7#t&TrhrGh9>!>x7Rn4I@DK?n z?y8Rv&nWs?V2JSd^;Z0vI9f7Ioln{&jq)xV<-^9E+0-SNFocaxGjUx__~0`^$+`wq zm~j^u&2EH?1?P%c$l)4F7&HQJC^D_Mz<2{nHOQMmTG2JgqMR-9SFG(2AebEQK&NG7yp~Chtn>4Qg5!1ux@+w4Om`L&>gppTr z9~Q){M#X~lYru^(PEHUiaw-ZO$|sE2DY4=n18)%VcYAa3DH%ZC$sp6E(vgX|F?=+deif23& zOBkxnFI6r9*&y*G%LiXe@0wc+I~bwwA*Q{KUqx=`^th$ahw@jU%-?UHp?1F>W&W!F ziiWJ^-TX}}|4$4V2{T$>17VeFBf>)akSG%aD5gWwku#)P{OwA%534Pb2t=BXiF4+> z3#M~W%qV$8rK{5{7&C=pfzjRaIJ8S=AnDu+#}+;EjH{VdmxeKIXvVrrm?^a9;q7nKPT)jxTWkfXR)F1e{t z+#R_?*VBnDZUnCZ?H|)Lj?sHf(c+hyhP@}aNs>YZpmH!2GoWdQvB8#dhWA??O0?AR2lx~10=rh`#EO{@B zy{{sI)Z#>8Uq;{ZXWesf z$y4v4dDbwXP;8o>w1|eO?HsqLAtX+;#HVG6!yrfuS@1lm4gVv|#kyL4vyz~IPzNS| zmtNfmw(Ltb=aki;q3 z^KvN@b>&kP%1f1ppz(7?1JbMvz-VLPm6OSq2ZW!%PcmYpMWl0rY{T%z9zw7<$yy0M z!7&tFSZd5Wv2{lYBb0qV74Af3_8-ZKtZ5iXA)Gcw3rlIvb0H*$$l*O#0iphmE3t2; zJzalEx!X#)5N@6gLpKjkZiDnA)EJXaz*>qX%n^iLGy864f$F1(7zKr$nHX(hP;yH+ zl;Wg_8WxLMp@sZ~9})~P=^qq^JYwkehl@@H*ft8vGv1HxHi0vrSHUI`DD)A#UuR+_ z^~Xh5Y*KJ4VD`>Mkp>`U(zzD>WG<*A31V8E!(P&5BW4uC0;G!2wzjfK!O^PkJ22)? zI-d|**xm3$gGD@y$MVQusa$F9uJAhs49;0aV;`mt_sL$#0{#l4MdOtT?^8mD)%OYwy zdcJ~>6;%ej*R`pjz{c0U21qbkT#vM|yk4vb_jFTrBjN)105b+oF|rONCm z#t1==TF53$Q8_{8``|H#Wu8R{G|X$pIa<|1KA!jA^-_24dXIKAK0xm=)}%S+5Tg+E zMcwZg3N!}$%6T!>0n;PLZRw_K0163c>o{%p zbl#ot#+HFUkC=VA9|b3UuFJ4QaU6Fkp1+kl^X25|)7XNl-mNdym}(38x?5C6@gfC; z3b+%;%%iY{QVrqh26?_Yx2rp4KAdxfyDaPx%NL6lOzzQy^|YQP*=WIo2rwYgND+yt zao(g65N*bpTix~_@^!zAuyeD~XutEJk|+!EJ1=v|=0Zoom(|MOjq;8B>tUiBO8O>iRihHfNJCMz?yR06bD4{SgI#Q{mnP*0_}Zk;y`R( z>RQq-X`;5`5Gl57>%MK|_qQwXh{izB@$vUnrETCA!4RVvOW^8K*}~#wpS(v94w^OXd!=sx$Fh*nX#%Id z7Z%T~qD7P3SIoR$7wPVokq!xvd}h;u^J+SqllyE;n3YUxNz&pbjp;{pg9f3*)G(sV z9T*Ge7G!2CE-`*$EZUribY3T6mXm0%HF9joH|`1f1#utkp}NF>Jqct})!{k?vqX%L z(X;Loh}4@K6F}Ry1UPVsJS@9Ax)MS&s$qq;96Aa6eR^3DB-GB-$PWD@o2xoADrlKQXR`g+Ubs zS0)I=;hn<;yQB12-kFf#ZUuHjn`OhZGggQjO5)zjMep{yZ@t$4zo3K%1_Z$|3( z>7!rcx568s1l)O$+LL+{IgtS&4fIP4wCEzHG{4TR9pbATjjrUYG(7fx0aO?Lr5~in zJQ3^(0Za?ZO7+B?!Kic#hB5`n1J&&z<05Wc+@pQLVGy6*W{g|#P+ZyGZPU}PB>7Bg z5nhXv)(Mx;YdsT3cEKR()CU*dfht{Pc!0I#5|}nu2eww1_I)KPToYf3%1?Zk@ZR$9 zO4Jjqt2tLo2i*^WEN~0DAa4B1U!f{RkFYGTN_XPcx?ZkIgF7b+Z(n^(uTd4IbLJ_m z)fKs1{1M%Dt!Ok>>3J6S%ApFvlA|1*u zJW^vP;7ZN)?$r?g(TH3GTFVv)v38czH2o$loyaeC1*~LscN)AWxf`a1*Py*G#NVSm z#clLVMg(S1pbsUFZggJLrR+IF&4>$n!rw01CO`8ryuRq0TN+zj`ZP$Ae{j^2F8S+G z?Io-JR$FMNKX~|Yyg#?o+d=nxWc$5DcTSas-lRLH@Q+@ni(B)r>~*@mL?R--jYrBp zOq%Kgom=ePx?MqXpBL;>;bRonlV~>qZ{zq7kB@z#a|;>RcO#|>@$q}jVYr)fMXU1F z<-PViC_2lorWn)5JqtY0#6{lMn=IIq`L2@4e#u$A&ew82`D$$@-I6;-XphCoBf3cn z1Z_Jjv9>Hx*eBs;LOD{44x;Dk4HY(VrB+XISqMrx52@W>kz=1nDAE+_87*O9!CX)O zn2EoZZ%j+}3%Ts2!D|*q44G?!Tg55tNC{3GVXx-qV~l&(iBoJDMFi-leuJj&R=%c0 z7vKO@>eAQJR_+1PTl9zx1)Z4Y$lq1G0L86gaNlKpGP_{hWwxDZl1#EeW9yi>FV>r< zuPhU(GBG3G@Iq)@TyOLurcr1#U!T}7Gx{`mc)=d+DW3(r(mbKdI-%Sfp4I_|tq2Mc zAfv4!8mWT|gmYea!E)y|ja2MR*_aqGyKgoJWJzu*6W`1rG{8*rJsKo7ztJVwWGLia zjf0KE%-#3V!ui4fm_29#4@5AJ!-I_!JnDH6<)0W~bldc>x2KwL+Fec!*;&eAUP)3~ z$YK@@Ey-v^0WV0iv%H8xbjhP77Tq6-Z+phQwgq6ldX`tcxs^Yb`s<#lTp z2PR9q{II-Vy0{~$k6sp^%?YK5m9h=Fi?1Wm=*g5gZ-sZ>N!g2bB4NlRYjy6?Mfs))5}Kux6a1jI+_7EuBph4G)H$r^Wv;AEZH|)X-_$k*(K`D^PR-L;!OQT{|hvOPdRy~`8NjW-U z&hUkaoV|6D*D*t=UEbX;P-G9t$5Sj)l=P<@KbW1puFuRp5c@p$U8j5GGjFrXiQgce zSX7QlD3n=KP;3uNYb;?6GbTfj;5n?&->0!xmz&h-;bEFp`ihri?Me*C5=LlCk4zcb zBpRjI->FrI{L_Mb8+v+%1TADqa^CNLK2;-DH8{DjKlvfJq4=PHdWZdZPgnlJ^kBhy z-jPmQ(g{#PdV>+0nUUU6Mn9yiHHo`@uPo&y$i+OM*bhtOf*!ZmE=$Zjh1Er~hP0Q@ zN~AB0S*#}C!MM(mix6}*LC=m%v8s%)nQ1YmIo-MD8?=7Alm>P z-_S1aFj)V5n@Yei9Xuc_OueI~T7@-bkmM`VH!{QRE{_R5vG=DD^e_-b6G!RO9PW9_ zlNZ_0R6L{`CtlNLK$;;>k-UAD4%e>^PQky3AVW<=vp^4ew@qAZVDSJ6g6kUU(u# z0$2DseI#I!t?*7YUO4v{>mwJAB5Lzedtsp`P7+#spZCdLaPN~5o2poW<@*dn2Hj|6 zJaYg~UDaSA9qSesBUtri*L);>T1*w5rC;ww$i!PuyM?GnhHHF~WbD-ZqPM zV=rwzsf*}9UA;cZl9w(?aJNtNw)De$y!FQbg7vHOxU$pwzmMQ z*+QtPJ1IBRSBPum3*h~*2y1gj3S3A{&mc6W2XU9f77Owx9=V^mLz6&xEw(J;JRtq9 z-j%1etd6J{C(QuR`jk-Q70goS*!MoSz7vA^vbAQi_wO;8FfFkkO<`;B{BOZSh~F@) zHo9yT4s$cBh1!sacV;}4Dfts)h-n_8KAffb%HU{IQPA*t`i#bD!czxFxgN>R3^X;}}ksad`n!<@|m7EZM20tNW+%hF32hnKh_9dof;)slU z@<(jMl~$v$wQF>_@B#-#i^5M=KZWV&>Yr{#vLH6kkNavlw0`XCJUpo|eEuoMJjF`kdbc?)gj3A3krnAIKkKDno zMC}hLSeHzm^G|VPGA`RpXhY9}XPF;_(5)TK~Kk6|dz6(*z)A%VRm zN9qwSkBog7LspWADybu3R-Nm!M5C3%sft8}w$^M`fKj?%e=Pf6#lPIgKqQ(y3QwN_ zh%z{LJtRIZoNw5Z5fw-Kt3hN&AT+=OyeJrt+_6?M1GZR=6Qy7pl*$oz1WuC4&61sg zw-iowVOPop6WQf@#D{&06H%+t#LHcP!dN;Zf)Uk~h2lIs*%N-4#K^6{z?XTg@!sAR z>R`E~UFod+bxsm2yOharU<`Y>Qi%e+(l#tSX^8P1UST8JoR6D?RlM7PH+60-eB@-# zjXobcVUaSvH1%ZRu6^v17}9GIR~OOW`j5!zy#v z3>kJz`trFI>=mC|;r}0fZlzTC+=}cLGEvBU>5=U$Z3{OUS&EOD>eC*HDUPm{O^Hfj z^NQsDLF805VK;FII?kh93p-|&1CZXvL(FqPW>B-;B{4~)Xl#M{{)HDQ2XRo*6@Q%7 zqW_92$RE@^E^{@H#~E#S&T>6f`+YTr+27x5yv^GMcXUN?p^PC$P`PsR83@hX>q57i zkBm%9i)(ik1ugmjTH-4UDv!rk&0E$Jy9j0M-O93#mdcWzh?`uQ0eu(tIKm%=4Vx?Q zjf1;keMjfXRE@pUDhs7D>9*Jjxz5}gaRv{aVBloqY@qaM+o#PPVAgCq(CoeBkG^g* zZeOwazI@$gA@WH?7YJKKt(?QQpu7yfS&sMyALm+l z)?eymJexP3eMsj-!+mVYUhH3RDZ9KJ23dRz*k!;ROP>r@(9$HqW$d%hWkIP3W^Vpo zP=RrAUctYm@T3I#J?s#ALS*fE5Knm*ogfU|aFjg^x|At$6!g5?b1K`T5q&j)@-#UH z_*Rfir@j$%B2x4W0`s2r?y6ZSA70l25on+A%M5;W5Aj`sQyD)D5j-q2P}-4=&g029 zTLq)Os|M;E_pPT3E2a~0b__4)INGLO?Tt4!TI<(&!aqg?9+m1RY>{JmsPN62wtai> z2mW261&LCynQq5=ecv9IG$FLGpz!?rBX{t1BZ7tndny`Al*nU}%7t4tzVM*NT*l0< z^-aL`D5$xslNJJ?pxnr13ptVb=wiX)WFP4HVf)t7g47LiEYHE#$G~q!WimbEzO%szgZ zYivee!nU0jY@_n8uyWhp#Og1usn1O51L=dyQ{n)=CZ-RC<=6D-Exs(rSG}hE>#TEL z!up1F+qZ1oa{lV{0=;cYUwqW(_4o!DCHFM>{H=Y*OntV>d;BYIt@dSg6q% z<7>h-eb$Z7%u-~KkIjz6PeoTNd_UAb8>p|M@|7|B!ni)`i0n0avL+wjSd*{+H6h5l znRbKEit(Z18lSG!N2u*PW_UV&DHE1)(p%)Y8JlSXT|NKX#O>9eTVst8ezY0R#UaSi%%0yGg<8cRR7+(lLNF2#%e9T&&tQs!Y82Zb9N_cN#9lThJ;{R+FagS zo#F$Zp)0=n7QZ$Ref)!o{&7Q4%5z#)XNNw6RVW!g94~_MZL>mg@NX52HzTt@=GOl zDeg>Icw-XpOOi?!17tz?A$R@UljN$N`PDv=f}L`;s!MZaiAScDG00l6@LmobZ)2b< zSq*ZdL77|f9JM~1=Pfkc;;0rm4qA}rw;9gi#KSI};SC?2-tC?lITNZXPO!!Q{f0dY wY_c2}samkAoPXHMI48`Pldmj~kWDF*)wypK5nZBE2%;WLXx|2vA&!mxU$V0C!2kdN delta 1286 zcmYk*ZD?Cn7{Kv!*Urt^m)UOZ+O_LVx~x>qO>Udit(I)Hb!9Jor9;FD&APiRG`W|y ziCc#d`oT&!hv>sLEaKR3bLgN*M5iDQ+^712p!=vYWGc!;5bXy+{h!+j9&++K=k%W5 zbDrnP(pQ4@0p`!3-k3)AsFTP?75EC^JZ{3P z*n}TpEq;TI_y<;D^*W`t;SSXAc>?u;$FP<6t2_gfg$vk$H;}z*1@(>pMn0-;y;4tN z0H<&kbp(FFFjm~J)E(@?cZgze121F#HMeQU`m)vi1K7>{3R=8h{lq|rytbV1WB)xb zp^m@`M)-&8E0p@3`OZqxf{*Y=z3&X_7kq+YT*2)adQd6Op!VPM5I)6x93%K476usn z%wQ0A5w9Lxz&iXK_4<#fBlBprQjejFd3+0PG|9s(jv&EMpP_#K7IJ1)wppoV+=>_Q z2TbF94e{3}`i;b#;)eT4Ao!;zD1JeKpI07Hl!~A00JhLW^#3>R;n##to6b2k={GXs zH(k>@mAdJJDs^UWFHk)*hm^sfgGoG80mPDJ}NmR;riDo&_JuKULT1&@6GcEFL?}QPM zSl@23_BF1ZbiL!Qys+=Eqz+EY+x_Kow!c^E2dbrVa9REuG)vm74rvR8pe5%RxDGwc7YtuD|&`VF+G(UgqZNWN4|uP_nf2r@a2|MTxz4v-sR~*Z3E0 Cir&-! diff --git a/po/el.po b/po/el.po index d6b1b32..71e1278 100644 --- a/po/el.po +++ b/po/el.po @@ -1,49 +1,86 @@ -# translation of findutils-4.2.6.po to Greek -# This file is distributed under the same license as the findutils-4.2.6 package. -# Copyright (C) 2004, 2010 Free Software Foundation, Inc. +# translation of findutils to Greek +# This file is distributed under the same license as the findutils package. +# Copyright (C) 2004 Free Software Foundation, Inc. # Lefteris Dimitroulakis , 2004, 2005. +# Lefteris Dimitroulakis , 2013. msgid "" msgstr "" -"Project-Id-Version: findutils-4.2.6\n" +"Project-Id-Version: findutils-4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2005-01-02 13:54+0200\n" -"Last-Translator: Lefteris Dimitroulakis \n" -"Language-Team: Greek \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-12-18 07:43+0200\n" +"Last-Translator: Lefteris Dimitroulakis \n" +"Language-Team: Greek \n" "Language: el\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.3.1\n" +"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" -msgstr "" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Αποτυχία διάσωσης καταλόγου εργασίας ώστε να τρέξει εντολή σε %s" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Δεν μπορώ να κλείσω την τυπική είσοδο" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Αποτυχία αλλαγής καταλόγου" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "Δεν μπορώ να κλωνοποιήσω" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "σφάλμα περιμένοντας γιά %s" -#: find/find.c:205 +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s τερματίστηκε από το σήμα %d" + +#: find/find.c:203 #, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Αποτυχία ενεργοποίησης hash table" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "η συνάρτηση βιβλιοθήκης fnmatch(), δεν πέρασε τον έλεγχο ακεραιότητος." + +#: find/find.c:263 +#, c-format msgid "cannot stat current directory" msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "" +msgstr "Αδυναμία ανάγνωσης λίστας προσαρτημένων συσκευών." -#: find/find.c:385 -#, fuzzy, c-format +#: find/find.c:443 +#, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "Το σύστημα αρχείων %s αποπροσαρτήθηκε πρόσφατα." +msgstr "ΠΡΟΕΙΔΟΠΟΙΗΣΗ:το σύστημα αρχείων %s αποπροσαρτήθηκε πρόσφατα." -#: find/find.c:395 -#, fuzzy, c-format +#: find/find.c:453 +#, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "Το σύστημα αρχείων %s έχει προσφάτως προσαρτηθεί." +msgstr "ΠΡΟΕΙΔΟΠΟΙΗΣΗ:το σύστημα αρχείων %s προσαρτήθηκε προσφάτως." -#: find/find.c:491 -#, fuzzy, c-format +#: find/find.c:550 +#, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" @@ -51,33 +88,35 @@ msgstr "" "%s%s άλλαξε κατά την εκτέλεση του %s (old device number %ld, new device " "number %ld, filesystem type is %s) [ref %ld]" -#: find/find.c:528 -#, fuzzy, c-format +#: find/find.c:587 +#, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -"%s%s άλλαξε κατά την εκτέλεση του %s (παλαιός αριθμός inode %ld, νέος " -"αριθμός inode %ld, ο τύπος συστήματος αρχείων είναι %s) [ref %ld]" +"%s%s άλλαξε κατά την εκτέλεση του %s (παλαιός αριθμός inode % , " +"νέος αριθμός inode %, ο τύπος συστήματος αρχείων είναι %s) [ref %ld]" -#: find/find.c:693 -#, fuzzy, c-format +#: find/find.c:752 +#, c-format msgid "failed to return to parent directory" -msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο" +msgstr "Αποτυχία επιστροφής στο γονικό κατάλογο" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "" +msgstr "Αποτυχία ασφαλούς αλλαγής καταλόγου σε %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" +"Ο συμβολικός σύνδεσμος %s αποτελεί τμήμα ενός βρόχου στην ιεραρχία " +"καταλόγων· έχομε ήδη επισκευτεί το κατάλογο στον οποίο αναφέρεται." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -86,14 +125,20 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" +"Βρέθηκε βρόχος συστήματος αρχείων· %s έχει τον ίδιον αριθμό device και inode " +"με ένα κατάλογο που βρίσκεται %d επίπεδο υψηλότερα στην ιεραρχία του " +"συστήματος αρχείων" msgstr[1] "" +"Βρέθηκε βρόχος συστήματος αρχείων· %s έχει τον ίδιον αριθμό device και inode " +"με ένα κατάλογο που βρίσκεται %d επίπεδα υψηλότερα στην ιεραρχία του " +"συστήματος αρχείων" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "" +msgstr "προειδοποίηση: δεν ακολουθείται ο συμβολικός σύνδεσμος %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -102,13 +147,18 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" +"WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " +"we already saw % subdirectories): this may be a bug in your file " +"system driver. Automatically turning on find's -noleaf option. Earlier " +"results may have failed to include directories that should have been " +"searched." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "" +msgstr "Αδυναμία ανάγνωσης λίστας προσαρτημένου συστήματος αρχείων" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "άγνωστο" @@ -117,31 +167,41 @@ msgstr "άγνωστο" msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" +"Ανιχνεύτηκε βρόχος στο σύστημα αρχείων· %s αποτελεί μέρος του ιδίου βρόχου " +"με %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "" +msgstr "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: το αρχείο %s φαίνεται να έχει mode 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "" +msgstr "αδυναμία αναζήτησης %s" -#: find/ftsfind.c:599 -#, fuzzy, c-format +#: find/ftsfind.c:609 +#, c-format msgid "failed to restore working directory after searching %s" -msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο" +msgstr "αποτυχία αποκατάστασης καταλόγου εργασίας μετά την αναζήτηση %s" + +#: find/ftsfind.c:677 +#, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Αποτυχία ενεργοποίησης hash table" -#: find/parser.c:471 +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" +"Η ενέργεια -delete αυτομάτως ενεργοποεί την -depth, όμως η -prune δεν κάνει " +"τίποτα όταν η -depth είναι παρούσα. Αν θες όμως να προχωρήσεις όπωσδήποτε, " +"χρησιμοποίησε την επιλογή -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -154,7 +214,7 @@ msgstr "" "τόσο πριν όσο και μετά). Παρακαλώ καθόρισε επιλογές πριν από άλλα " "ορίσματα.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -163,54 +223,49 @@ msgstr "" "προειδοποίηση: η επιλογή -d έχει καταργηθεί, στη θέση της δώσε -depth που " "συμφωνεί με το POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" +"%s δεν αποτελεί όνομα υπάρχουσας ομάδας και δεν μιάζει με ένα αριθμητικό " +"group ID γιατί έχει τη μη αναμενόμενη κατάληξη %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" -msgstr "" +msgstr "%s δεν είναι όνομα υπάρχουσας ομάδας" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" -msgstr "" +msgstr "το όρισμα στο -group είναι κενό, αλλά θα έπρεπε να είναι όνομα ομάδας" -#: find/parser.c:1227 -#, fuzzy +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" -"προεπιλεγμένη διαδρομή είναι ο τρέχων κατάλογος,\n" -"προεπιλεγμένη έκφραση είναι η -print\n" -"η έκφραση μπορεί ν' αποτελείται από:\n" -"τελεστές (μειούμενης προτεραιότητας,\n" -"ο -and υπονοείται όταν δεν δείνονται άλλοι):\n" -" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2" +"\n" +"προεπιλεγμένη διαδρομή είναι ο τρέχων κατάλογος·προεπιλεγμένη έκφραση είναι " +"η -print\n" +"η έκφραση μπορεί ν' αποτελείται από: τελεστές, επιλογές, tests κι " +"ενέργειες:\n" -#: find/parser.c:1230 -#, fuzzy +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"προεπιλεγμένη διαδρομή είναι ο τρέχων κατάλογος,\n" -"προεπιλεγμένη έκφραση είναι η -print\n" -"η έκφραση μπορεί ν' αποτελείται από:\n" -"τελεστές (μειούμενης προτεραιότητας,\n" -"ο -and υπονοείται όταν δεν δείνονται άλλοι):\n" -" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2" +"τελεστές (φθίνουσα προτεραιότητα· -και εννούνται όταν δεν δίνονται άλλοι):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 -#, fuzzy +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -218,17 +273,13 @@ msgid "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -" EXPR1 -o EXPR2 EXPR1 -ή EXPR2 EXPR1 , EXPR2\n" -"επιλογές θέσεως (πάντοτε αληθής): -daystart -follow\n" -"κανονικές επιλογές (πάντοτε αληθής, οριζόμενη πριν από άλλες εκφράσεις): -" -"depth\n" -" --help -maxdepth ΕΠΙΠΕΔΑ -mindepth ΕΠΙΠΕΔΑ -mount -noleaf --version -" -"xdev\n" -" -ignore_readdir_race -noignore_readdir_race\n" -"tests (N μπορεί νάναι +N ή -N ή N): -amin N -anewer ΑΡΧΕΙΟ -atime N -cmin N" +"επιλογές θέσεως (πάντοτε αληθής): -daystart -follow -regextype\n" +"\n" +"κανονικές επιλογές (πάντοτε αληθής, οριζόμενη πριν από άλλες εκφράσεις):\n" +" -depth --help -maxdepth ΕΠΙΠΕΔΑ -mindepth ΕΠΙΠΕΔΑ -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 -#, fuzzy +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -236,29 +287,30 @@ msgid "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" -" -cnewer ΑΡΧΕΙΟ -ctime N -empty -false -fstype ΤΥΠΟΣ -gid N -group " -"ΟΝΟΜΑ\n" +"tests (N μπορεί να είναι +N ή -N ή N): -amin N -anewer FILE -atime N -cmin " +"N\n" +" -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" " -ilname PATTERN -iname PATTERN -inum N -iwholename PATTERN -iregex " "PATTERN\n" -" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer ΑΡΧΕΙΟ" +" -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" -#: find/parser.c:1244 -#, fuzzy +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" " -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" -" -used N -user ΟΝΟΜΑ -xtype [bcdpfls]" +" -used N -user NAME -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" -msgstr "" +msgstr " -context CONTEXT\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -266,8 +318,13 @@ msgid "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" +"\n" +"ενέργειες: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" +" -fprint0 FILE -fprint FILE -ls -fls FILE -prune -quit\n" +" -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" +" -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -278,12 +335,12 @@ msgstr "" "στο http://savannah.gnu.org/ ή, αν δεν έχεις πρόσβαση στο web,\n" "αποστέλοντας μήνυμα στη διεύθυνση ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "η συνάρτηση βιβλιοθήκης fnmatch(), δεν πέρασε τον έλεγχο ακεραιότητος." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -292,399 +349,449 @@ msgid "" "perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " "use 'find ... -print0 | grep -FzZ %s'." msgstr "" +"warning: Unix filenames usually don't contain slashes (though pathnames " +"do). That means that '%s %s' will probably evaluate to false all the time " +"on this system. You might find the '-wholename' test more useful, or " +"perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " +"use 'find ... -print0 | grep -FzZ %s'." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" -msgstr "" +msgstr "Ανάμενα ως όρισμα του %s ένα θετικό ακέραιο, αλλά έλαβα %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" +"Αυτό το σύστημα δεν διαθέτει τρόπο εύρεσης του χρόνου δημιουργίας ενός " +"αρχείου." -#: find/parser.c:1638 -#, fuzzy, c-format +#: find/parser.c:1633 +#, c-format msgid "The %s test needs an argument" -msgstr "%s: η επιλογή «%s» απαιτεί όρισμα\n" +msgstr "«%s» απαιτεί όρισμα" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" -msgstr "" +msgstr "δεν μπορώ να προσδιορίσω πώς να ερμηνεύσω %s ως ημερομηνία και ώρα" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "" +msgstr "Αδυναμία εύρεσης του χρόνου δημιουργίας του αρχείου %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "" +msgstr "προειδοποίηση: τίποτα δεν ταιριάζει με -%s %s γιατί τελειώνει με /." -#: find/parser.c:1956 +#: find/parser.c:1992 #, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 -#, fuzzy, c-format msgid "invalid mode %s" msgstr "άκυρη κατάσταση «%s»" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" +"προειδοποίηση: you have specified a mode pattern %s (which is equivalent " +"to /000). The meaning of -perm /000 has now been changed to be consistent " +"with -perm -000; that is, while it used to match no files, it now matches " +"all files." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "το όρισμα null είναι άκυρο για την επιλογή -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "Ο τύπος «%c» για την επιλογή -size είναι άκυρος" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" +"Η επιλογή -show-control-chars δέχεται ένα μοναδικό όρισμα που πρέπει να " +"είναι «literal» ή «safe»" -#: find/parser.c:2630 -#, fuzzy, c-format +#: find/parser.c:2566 +#, c-format msgid "Invalid argument %s to -used" -msgstr "Το όρισμα %s δεν είναι έγκυρο για την %s" +msgstr "Μη έγκυρο όρισμα %s για -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" -msgstr "" +msgstr "%s δεν είναι το όνομα γνωστού χρήστη" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" -msgstr "" +msgstr "Το όρισμα στην επιλογή -user δεν πρέπει να είναι κενό" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " -msgstr "" +msgstr "Features enabled: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "" +msgstr "μη έγκυρο κατηγόρημα -context: SELinux δεν είναι ενεργοποιημένο." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" -msgstr "" +msgstr "Ορίσματα στην επιλογή -type πρέπει να περιέχουν μόνο ένα γράμμα" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" +"-type %c δεν υποστηρίζεται γιατί οι συμβολικοί σύνδεσμοι δεν υποστηρίζονται " +"στην πλατφόρμα όπου μεταγλωτίστηκε το find." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "προειδοποίηση: μη αναγνωριζόμενη ακολουθία διαφυγής «\\%c»" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c δεν υποστηρίζεται γιατί FIFOs δεν υποστηρίζονται στην πλατφόρμα που " +"μεταγλωτίστηκε το find." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" +"-type %c δεν υποστηρίζεται γιατί named sockets δεν υποστηρίζονται στην " +"πλατφόρμα που μεταγλωτίστηκε το find." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "προειδοποίηση: άγνωστη οδηγία μορφοποίησης «%%%c»" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c δεν υποστηρίζεται γιατί Solaris doors δεν υποστηρίζονται στην " +"πλατφόρμα που μεταγλωτίστηκε το find." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" +msgid "Unknown argument to -type: %c" +msgstr "Άγνωστο όρισμα στην -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" +"Ο τρέχων κατάλογος περιλαμβάνεται στη μεταβλητή PATH, που σε συνδιασμό με " +"την ενέργεια %s του find είναι ανασφαλές. Παρακαλώ αφαίρέσατε τον τρέχοντα " +"κατάλογο από την $PATH (δηλαδή, αφαίρεση \".\", doubled colons, ή leading ή " +"trailing colons)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove that " "entry from $PATH" msgstr "" +"Η σχετική διαδρομή %s περιλαμβάνεται στη μεταβλητή περιβάλλοντος PATH, που " +"που δεν είναι ασφαλής όταν συνδιάζεται με την ενέργεια %s του find. Παρακαλώ " +"αφαιρέστε αυτή την καταχώρηση από τη $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" +"Δεν πρέπει να χρησιμοποιούνται {} μέσα στο όνομα του utility για -execdir " +"και -okdir γιατί αυτό δημιουργεί δυνητικά ένα πρόβλημα ασφαλείας." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "" +msgstr "Εμφάνιση μόνο μια φορά των {} υποστηρίζεται με -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "Στο %s, το %s πρέπει να εμφανίζεται μόνο του, αλλά ορίσατε %s" -#: find/parser.c:3435 -#, fuzzy, c-format +#: find/parser.c:3100 +#, c-format msgid "The environment is too large for exec()." msgstr "το περιβάλλον είναι πολύ μεγάλο γιά την εκτέλεση" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" +"αριθμητική υπερχείληση κατά την μετατροπή %s ημερών σε αριθμό δευτερολέπτων" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" -msgstr "" +msgstr "αριθμητική υπερχείληση όταν προσπαθώ να υπολογίσω το σημερινό πέρας" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" -msgstr "" +msgstr "standard error" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "" +msgstr "standard output" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "" - -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" +msgstr "αδυναμία διαγραφής %s" -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "" +msgstr "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: αδυναμία καθορισμού χρόνου δημιουργίας του αρχείου %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Αδυναμία εγγραφής στη standard output" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "" +msgid "getfilecon failed: %s" +msgstr "αποτυχία getfilecon: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" +msgid "warning: escape `\\' followed by nothing at all" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "Δεν μπορώ να κλωνοποιήσω" +msgid "warning: unrecognized escape `\\%c'" +msgstr "προειδοποίηση: μη αναγνωριζόμενη ακολουθία διαφυγής «\\%c»" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "σφάλμα περιμένοντας γιά %s" +msgid "error: %s at end of format string" +msgstr "error: %s στο τέλος του αλφαρηθμιτικού μορφοποίησης" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s τερματίστηκε από το σήμα %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "error: η οδηγία μορφοποίησης «%%%c» προορίζεται για μελλοντική χρήση" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" +"προειδοποίηση: η οδηγία μορφοποίησης «%%%c» θα πρέπει να ακολουθείται από " +"ένα άλλο χαρακτήρα" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "προειδοποίηση: άγνωστη οδηγία μορφοποίησης «%%%c»" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "άκυρη έκφραση" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" +"μη έγκυρη έκφραση· χρησιμοποιήσατε δυαδικό τελεστή «%s» χωρίς τίποτα μπροστά " +"του" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "" +msgstr "αναμενόταν expression μεταξύ «%s» και «)»" -#: find/tree.c:156 -#, fuzzy, c-format +#: find/tree.c:161 +#, c-format msgid "expected an expression after '%s'" -msgstr "μη αναμενόμενο extra κατηγόρημα" +msgstr "αναμενόταν μια έκφραση μετά το «%s»" -#: find/tree.c:161 -#, fuzzy, c-format +#: find/tree.c:166 +#, c-format msgid "invalid expression; you have too many ')'" -msgstr "άκυρη έκφραση" +msgstr "μη έγκυρη έκφραση· πάρα πολλές «)»" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" +"μη έγκυρη έκφραση· περίμενα να βρω μια «)» αλλά τίποτα. Ίσως απατείται ένα " +"έξτρα κατηγόρημα μετά «%s»" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." -msgstr "" +msgstr "μη έγκυρη έκφραση· ανοικτές παρενθέσεις δεν επιτρέπονται" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." -msgstr "" +msgstr "μη έγκυρη έκφραση· περίμενα να βρω κάπου μια «)» αλλά ματαίως." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "oops -- άκυρος τύπος έκφρασης!" -#: find/tree.c:276 -#, fuzzy, c-format +#: find/tree.c:281 +#, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "oops -- άκυρος τύπος έκφρασης!" +msgstr "oops -- άκυρος τύπος έκφρασης (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"warning: there is no entry in the predicate evaluation cost table for " +"predicate %s; please report this as a bug" -#: find/tree.c:1288 -#, fuzzy, c-format +#: find/tree.c:1294 +#, c-format msgid "paths must precede expression: %s" -msgstr "οι διαδρομές πρέπει να προηγούνται των εκφράσεων" +msgstr "οι διαδρομές πρέπει να προηγούνται της έκφρασης: %s" -#: find/tree.c:1297 -#, fuzzy, c-format +#: find/tree.c:1303 +#, c-format msgid "unknown predicate `%s'" -msgstr "το κατηγόρημα «%s» είναι άκυρο" +msgstr "το κατηγόρημα «%s» είναι άγνωστο" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" -msgstr "το κατηγόρημα «%s» είναι άκυρο" +msgstr "το κατηγόρημα «%s» δεν είναι έγκυρο" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" -msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο" +msgstr "Το όρισμα «%s» για την «%s» δεν είναι έγκυρο" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "Το όρισμα για την «%s» απουσιάζει" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "" +msgstr "πάρα πολλές «)»" -#: find/tree.c:1412 -#, fuzzy, c-format +#: find/tree.c:1418 +#, c-format msgid "unexpected extra predicate '%s'" -msgstr "μη αναμενόμενο extra κατηγόρημα" +msgstr "μη αναμενόμενο extra κατηγόρημα «%s»" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "μη αναμενόμενο extra κατηγόρημα" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "oops -- η παρεμβολή της προεπιλεγμένης παραμέτρου «and» είναι άκυρη!" -#: find/util.c:171 -#, fuzzy, c-format +#: find/util.c:175 +#, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " -msgstr "Χρήση: %s [-H] [-L] [-P] [διαδρομή...] έκφραση]\n" +msgstr "Χρήση: %s [-H] [-L] [-P] [-Olevel] [-D " -#: find/util.c:173 -#, fuzzy, c-format +#: find/util.c:177 +#, c-format msgid "] [path...] [expression]\n" -msgstr "Χρήση: %s [διαδρομή...] [έκφραση]\n" +msgstr "] [path...] [expression]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο" +msgstr "αποτυχία διάσωσης αρχικού καταλόγου εργασίας" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο" +msgstr "αποτυχία επαναφοράς αρχικού καταλόγου εργασίας" -#: find/util.c:816 -#, fuzzy, c-format +#: find/util.c:824 +#, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "προειδοποίηση: μη αναγνωριζόμενη ακολουθία διαφυγής «\\%c»" +msgstr "Άγνωστη σημαία αποσφαλμάτωσης %s, αγνοήθηκε" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." -msgstr "" +msgstr "Κενό όρισμα στην επιλογή -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "" +msgstr "Την επιλογή -O πρέπει αμέσως να ακολουθεί δεκαδικός ακέραιος" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" -msgstr "" +msgstr "Παρακαλώ ορίσατε ένα δεκαδικό αριθμό αμέσως μετά -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" -msgstr "" +msgstr "Μη έγκυρο επίπεδο βελτιστοποίησης %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" +"Επίπεδο βελτιστοποίησης %lu πολύ υψηλό. Αν θέλετε να βρείτε αρχεία πολύ " +"γρήγορα, εξετάστε τη χρήση του GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -693,162 +800,476 @@ msgstr "" "Η μεταβλητή περιβάλλοντος FIND_BLOCK_SIZE δεν υποστηρίζεται, αυτό που " "επιρρεάζει το μέγεθος μπλοκ είναι η μεταβλητή περιβάλλοντος POSIXLY_CORRECT" -#: lib/buildcmd.c:171 -#, c-format -msgid "command too long" -msgstr "διαταγή πολύ μεγάλη" - -#: lib/buildcmd.c:311 -#, c-format -msgid "can't call exec() due to argument size restrictions" -msgstr "" +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "Το όρισμα «%s» για την «%s» δεν είναι έγκυρο" -#: lib/buildcmd.c:381 +#: gl/lib/argmatch.c:134 #, fuzzy, c-format -msgid "cannot fit single argument within argument list size limit" +msgid "ambiguous argument %s for %s" +msgstr "Το όρισμα «%s» για την «%s» δεν είναι έγκυρο" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "Μη έγκυρο όρισμα %s για -used" + +#: gl/lib/closein.c:100 +msgid "error closing file" msgstr "" -"δεν μπορώ να περιλάβω μοναδικό όρισμα μέσα\n" -"στο περιορισμένο μέγεθος της λίστας ορισμάτων" -#: lib/buildcmd.c:387 +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 #, c-format -msgid "argument list too long" -msgstr "λίστα ορισμάτων πολύ μεγάλη" +msgid "write error" +msgstr "write error" -#: lib/buildcmd.c:640 -#, c-format -msgid "Environment variable %s is not set to a valid decimal number" +#: gl/lib/error.c:188 +msgid "Unknown system error" msgstr "" -#: lib/findutils-version.c:60 -msgid "Eric B. Decker" +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "" -#: lib/findutils-version.c:61 -msgid "James Youngman" +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" msgstr "" -#: lib/findutils-version.c:62 -msgid "Kevin Dalley" +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "" -#: lib/findutils-version.c:64 +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU findutils έκδοση %s\n" +msgid "%s: option '--%s' requires an argument\n" +msgstr "«%s» απαιτεί όρισμα" -#: lib/safe-atoi.c:76 +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 #, c-format -msgid "Unexpected suffix %s on %s" +msgid "%s: unrecognized option '--%s'\n" msgstr "" -#: lib/safe-atoi.c:82 +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 #, fuzzy, c-format -msgid "Expected an integer: %s" -msgstr "μη αναμενόμενο extra κατηγόρημα" +msgid "%s: unrecognized option '%c%s'\n" +msgstr "προειδοποίηση: μη αναγνωριζόμενη ακολουθία διαφυγής «\\%c»" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: άκυρος αριθμός γιά την επιλογή -%c\n" -#: locate/code.c:127 +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 #, c-format -msgid "" -"Usage: %s [--version | --help]\n" -"or %s most_common_bigrams < file-list > locate-database\n" -msgstr "" -"Χρήση: %s [--version | --help]\n" -"ή %s most_common_bigrams < file-list > locate-database\n" - -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 -msgid "" -"\n" -"Report bugs to .\n" +msgid "%s: option requires an argument -- '%c'\n" msgstr "" -"\n" -"Αναφορά σφαλμάτων στην .\n" -#: locate/code.c:149 locate/frcode.c:207 +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 #, c-format -msgid "write error" +msgid "%s: option '-W %s' is ambiguous\n" msgstr "" -#: locate/frcode.c:157 +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 #, c-format -msgid "Usage: %s [-0 | --null] [--version] [--help]\n" +msgid "%s: option '-W %s' doesn't allow an argument\n" msgstr "" -#: locate/frcode.c:177 -#, c-format -msgid "You need to specify a security level as a decimal integer." +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "«%s» απαιτεί όρισμα" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "αποτυχία επαναφοράς αρχικού καταλόγου εργασίας" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "αποτυχία επαναφοράς αρχικού καταλόγου εργασίας" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" msgstr "" -#: locate/frcode.c:185 +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 #, c-format -msgid "Security level %s is outside the convertible range." +msgid "Packaged by %s (%s)\n" msgstr "" -#: locate/frcode.c:193 +#: gl/lib/version-etc.c:77 #, c-format -msgid "Security level %s has unexpected suffix %s." +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" msgstr "" -#: locate/frcode.c:251 +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 #, c-format -msgid "slocate security level %ld is unsupported." +msgid "Written by %s.\n" msgstr "" -#: locate/frcode.c:289 +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 #, c-format -msgid "Failed to write to standard output" +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "Το όρισμα «%s» για την «%s» δεν είναι έγκυρο" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "Το όρισμα «%s» για την «%s» δεν είναι έγκυρο" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "λίστα ορισμάτων πολύ μεγάλη" + +#: lib/buildcmd.c:161 +#, c-format +msgid "command too long" +msgstr "διαταγή πολύ μεγάλη" + +#: lib/buildcmd.c:301 +#, c-format +msgid "can't call exec() due to argument size restrictions" +msgstr "αδυναμία κλήσης της exec() λόγω περιορισμών στο μέγεθος του ορίσματος" + +#: lib/buildcmd.c:371 +#, c-format +msgid "cannot fit single argument within argument list size limit" msgstr "" +"δεν μπορώ να περιλάβω μοναδικό όρισμα μέσα\n" +"στο περιορισμένο μέγεθος της λίστας ορισμάτων" -#: locate/locate.c:146 +#: lib/buildcmd.c:377 +#, c-format +msgid "argument list too long" +msgstr "λίστα ορισμάτων πολύ μεγάλη" + +#: lib/buildcmd.c:629 +#, c-format +msgid "Environment variable %s is not set to a valid decimal number" +msgstr "Η μεταβλητή περιβάλλοντος %s δε ρυθμίστηκε σε ένα δεκαδικό αριθμό" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Διαρροή περιγραφέα αρχείου %d· παρακαλώ αναφέρατέ το ως bug, εσωκλείοντας " +"λεπτομερή περιγραφή για τον απλούστερο τρόπο αναπαραγωγής." + +#: lib/findutils-version.c:55 +msgid "Eric B. Decker" +msgstr "Eric B. Decker" + +#: lib/findutils-version.c:56 +msgid "James Youngman" +msgstr "James Youngman" + +#: lib/findutils-version.c:57 +msgid "Kevin Dalley" +msgstr "Kevin Dalley" + +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Αδυναμία εγγραφής στη standard output" + +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Άγνωστος τύπος κανονικής έκφραδης %s; έκυροι τύποι είναι %s." + +#: lib/safe-atoi.c:81 +#, c-format +msgid "Unexpected suffix %s on %s" +msgstr "Μη αναμενόμενη κατάληξη %s στο %s" + +#: lib/safe-atoi.c:87 +#, c-format +msgid "Expected an integer: %s" +msgstr "Αναμενόταν ακέραιος: %s" + +#: locate/code.c:131 +#, c-format +msgid "" +"Usage: %s [--version | --help]\n" +"or %s most_common_bigrams < file-list > locate-database\n" +msgstr "" +"Χρήση: %s [--version | --help]\n" +"ή %s most_common_bigrams < file-list > locate-database\n" + +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 +msgid "" +"\n" +"Report bugs to .\n" +msgstr "" +"\n" +"Αναφορά σφαλμάτων στην .\n" + +#: locate/frcode.c:160 +#, c-format +msgid "Usage: %s [-0 | --null] [--version] [--help]\n" +msgstr "Χρήση: %s [-0 | --null] [--version] [--help]\n" + +#: locate/frcode.c:180 +#, c-format +msgid "You need to specify a security level as a decimal integer." +msgstr "Πρέπει να ορίσεις το επίπεδο ασφαλείας με ένα δεκαδικό ακέραιο." + +#: locate/frcode.c:188 +#, c-format +msgid "Security level %s is outside the convertible range." +msgstr "Το επίπεδο ασφαλείας %s βρίσκεται εκτός περιοχής μετατροπής." + +#: locate/frcode.c:196 +#, c-format +msgid "Security level %s has unexpected suffix %s." +msgstr "Το επίπεδο ασφαλείας %s έχει μη αναμενόμενη κατάληξη %s." + +#: locate/frcode.c:257 +#, c-format +msgid "slocate security level %ld is unsupported." +msgstr "επίπεδο ασφαλείας slocate %ld δεν υποστηρίζεται." + +#: locate/frcode.c:295 +#, c-format +msgid "Failed to write to standard output" +msgstr "Αδυναμία εγγραφής στη standard output" + +#: locate/locate.c:139 msgid "days" msgstr "μέρες" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "" +msgstr "Το όρισμα στην επολογή --max-database-age πρέπει να μην είναι κενό" -#: locate/locate.c:209 locate/locate.c:216 -#, fuzzy, c-format +#: locate/locate.c:202 locate/locate.c:209 +#, c-format msgid "Invalid argument %s for option --max-database-age" -msgstr "Το όρισμα %s δεν είναι έγκυρο για την %s" +msgstr "Μη έγκυρο όρισμα %s στην επιλογή --max-database-age" -#: locate/locate.c:468 -#, fuzzy, c-format +#: locate/locate.c:459 +#, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -"προειδοποίη: η διαδρομή «%s» της βάσεως δεδομένων locate περιέχει στην αρχή " -"της της ένα δίστιγμο που δεν αποτελεί έγκυρο όνομα της βάσεως" +"η βάση δεδομένων locate %s περιέχει όνομα αρχείου μεγαλύτερο από τις " +"δυνατότητές της" -#: locate/locate.c:603 -#, fuzzy, c-format +#: locate/locate.c:569 locate/locate.c:588 +#, c-format msgid "locate database %s is corrupt or invalid" msgstr "η βάση δεδομένων locate «%s» δεν είναι έγκυρη ή έχει υποστεί αλλοίωση" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Μέγεθος της βάσης δεδομένων locate: %s byte\n" +msgstr[1] "Μέγεθος της βάσης δεδομένων locate: %s bytes\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" -msgstr "" +msgstr "Ονόματα αρχείων που ταιριάζουν: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" -msgstr "" +msgstr "Όλα τα ονόματα αρχείων: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -858,81 +1279,100 @@ msgid "" "\t%s contain newline characters, \n" "\tand %s contain characters with the high bit set.\n" msgstr "" +"Τα ονόματα αρχείων έχουν ένα συνολικό μήκος %s bytes.\n" +"Από αυτά τα ονόματα,\n" +"\n" +"\t%s περιέχουν λευκό διάστημα, \n" +"\t%s περιέχουν χαρακτήρες νέας γραμμής, \n" +"\tκαι %s περιέχουν χαρακτήρες με το high bit set.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" +"Κάποια ονόματα αρχείων έχουν φιλτραριστεί και αφαιρεθεί, έτσι δεν μπορούμε " +"ωα υπολογίσουμε το βαθμό συμπίεσης.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" -msgstr "" +msgstr "Συντελεστής συμπίεσης %4.2f%% (μεγαλύτερος είναι καλύτερα)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" -msgstr "" +msgstr "Συντελεστής συμπίεσης απροσδιόριστος\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" +"η βάση δεδομένων locate %s μιάζει με μια slocate αλλά φαίνεται να έχει " +"επίπεδο ασφαλείας %c, το οποίο δεν υποστηρίζεται προς το παρόν από το GNU " +"findutils " -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" +"η %s αποτελεί βάση δεδομένων τύπου slocate. Υποστήριξη είναι πρόσφατη, " +"ανάμενε προβλήματα προς το παρόν." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" +"%s είναι μια βάση δεδομένων slocate με μη υποστηριζόμενο επίπεδο ασφαλείας " +"%d· παραλείπεται." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" +"You specified the -E option, but that option cannot be used with slocate-" +"format databases with a non-zero security level. No results will be " +"generated for this database.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "" +msgstr "%s σε μια βάση δεδομένων slocate. Ενεργοποίηση επιλογής «-e»." -#: locate/locate.c:1189 -#, fuzzy, c-format +#: locate/locate.c:1155 +#, c-format msgid "Old-format locate database %s is too short to be valid" -msgstr "η βάση δεδομένων locate «%s» δεν είναι έγκυρη ή έχει υποστεί αλλοίωση" +msgstr "" +"Η παλαιά μορφής βάση δεδομένων locate %s είναι πολύ μικρή για να είναι έγκυρη" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" -msgstr "" +msgstr "Η βάση δεδομένων %s είναι σε μορφή %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" -msgstr "" +msgstr "Η βάση δεδομένων έχει κωδικοποίηση little-endian.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" -msgstr "" +msgstr "Η βάση δεδομένων έχει κωδικοποίηση big-endian.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" -msgstr "" +msgstr "The database machine-word encoding order is not obvious.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -943,139 +1383,180 @@ msgid "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" msgstr "" +"Χρήση: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n" +" [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" pattern...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" -msgstr "" +msgstr "αποτυχία κατάργησης προνομίων ομάδας" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "" +msgstr "αποτυχία κατάργησης προνόμια setuid" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" -msgstr "" +msgstr "αποτυχία ολικής κατάργησης προνομίων" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "" +msgstr "αποτυχία κατάργησης προνομίων setgid" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" +"προειδοποίηση: η βάση δεδομένων locate μπορεί να διαβαστεί από stdin μια " +"φορά." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "" +msgstr "αποτυχία κλήσης συστήματος time" -#: locate/locate.c:1856 -#, fuzzy, c-format +#: locate/locate.c:1844 +#, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" -msgstr "προειδοποίηση: η βάση δεδομένων «%s» είναι περισσότερο από %d %s παλιά" +msgstr "" +"προειδοποίηση: η βάση δεδομένων %s είναι περισσότερο από %d %s παλιά " +"(πραγματική ηλικία είναι %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" +"ΠΡΟΕΙΔΟΠΟΙΗΣΗ: η βάση δεδομένων locate %s φτιάχτηκε με διαφορετικό byte order" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" -msgstr "" +msgstr "μη αναμενόμενο τέλος αρχείου στο %s" -#: locate/word_io.c:146 -#, fuzzy, c-format +#: locate/word_io.c:148 +#, c-format msgid "error reading a word from %s" -msgstr "σφάλμα περιμένοντας γιά %s" +msgstr "σφάλμα κατά την ανάγνωση λέξης από %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." -msgstr "" +msgstr "Μη έγκυρη ακολουθία διαφυγής %s στην προδιαγραφή του οριοθέτη εισόδου." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" +"Μη έγκυρη ακολουθία διαφυγής %s στην προδιαγραφή του οριοθέτη εισόδου· οι " +"τιμές των χαρακτήρων δεν πρέπει να υπερβαίνουν %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" +"Μη έγκυρη ακολουθία διαφυγής %s στην προδιαγραφή του οριοθέτη εισόδου· οι " +"τιμές των χαρακτήρων δεν πρέπει να υπερβαίνουν %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" +"Μη έγκυρη ακολουθία διαφυγής %s στην προδιαγραφή του οριοθέτη εισόδου· οι οι " +"χαρακήρες στο τέλος %s δεν αναγνωρίζονται" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" +"Μη έγκυρη προδιαγραφή οριοθέτη εισόδου %s: ο οριοθέτης πρέπει να είναι είτε " +"ένας μοναδικός χαρακτήρας ή μια ακολουθία διαφυγής που αρχίζει με \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "το περιβάλλον είναι πολύ μεγάλο γιά την εκτέλεση" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" +"προειδοποίηση: η τιμή %ld για την επιλογή -s είναι πολύ μεγάλη, οπότε χρήση " +"της %ld" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 #, c-format -msgid "Cannot set SIGUSR1 signal handler" +msgid "option --%s may not be set to a value which includes `='" +msgstr "η επιλογή --%s δεν μπορεί να ρυθμιστεί σε τιμή που περιέχει «=»" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "αποτυχία απενεργοποίησης της μεταβλητής περιβάλλοντος %s" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" msgstr "" +"προσοχή: η επιλογή -E δεν έχει αποτέλεσμα αν χρησιμοποιείται -0 ή -d.\n" -#: xargs/xargs.c:635 +#: xargs/xargs.c:654 +#, c-format +msgid "Cannot set SIGUSR1 signal handler" +msgstr "Αδυναμία ρύθμισης του SIGUSR1 signal handler" + +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Αδυναμία ρύθμισης του SIGUSR2 signal handler" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "" +msgstr "Αδυναμία ανοίγματος αρχείου εισόδου %s" -#: xargs/xargs.c:669 -#, fuzzy, c-format +#: xargs/xargs.c:695 +#, c-format msgid "Your environment variables take up % bytes\n" -msgstr "Οι μεταβλητές περιβάλλοντος καταλαμβάνουν %ld bytes\n" +msgstr "Οι μεταβλητές περιβάλλοντός σου φτάνουν τα % bytes\n" -#: xargs/xargs.c:672 -#, fuzzy, c-format +#: xargs/xargs.c:698 +#, c-format msgid "POSIX upper limit on argument length (this system): %\n" -msgstr "Άνω και κάτω όριο κατά POSIX για μήκος ορίσματος: %ld, %ld\n" +msgstr "Άνω όριο κατά POSIX στο μήκος ορίσματος (this system): %\n" -#: xargs/xargs.c:675 -#, fuzzy, c-format +#: xargs/xargs.c:701 +#, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" -msgstr "Άνω και κάτω όριο κατά POSIX για μήκος ορίσματος: %ld, %ld\n" +msgstr "" +"Κατά POSIX το μικρότερο επιτρεπόμενο άνω όριο στο μήκος ορίσματος (όλα τα " +"συστήματα): %\n" -#: xargs/xargs.c:678 -#, fuzzy, c-format +#: xargs/xargs.c:704 +#, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "Μέγιστο μήκος εντολής που θα μπορούσαμε να χρησιμοποιήσουμε: %ld\n" +msgstr "" +"Μέγιστο μήκος εντολής που θα μπορούσαμε να χρησιμοποιήσουμε: %\n" -#: xargs/xargs.c:681 -#, fuzzy, c-format +#: xargs/xargs.c:707 +#, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "Μέγεθος του buffer εντολών που χρησιμοποιούμε: %ld\n" +msgstr "Μέγεθος του command buffer που χρησιμοποιούμε: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1083,15 +1564,21 @@ msgid "" "run commands; if this is not what you wanted to happen, please type the end-" "of-file keystroke.\n" msgstr "" +"\n" +"Η εκτέλεση του xargs θα συνεχιστεί τώρα, και θα προσπαθήσει να διαβάσει την " +"είσοδό του και να τρέξει εντολές· αν δεν είναι αυτό που θέλεις να συμβεί, " +"παρακαλώ δώσε EOF.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" +"Προειδοποίηση: %s θα τρέξει τουλάχιστον άπαξ. Αν δεν θέλεις να συμβεί αυτό, " +"πάτησε το πλήκτρο διακοπής.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1100,329 +1587,294 @@ msgstr "" "unmatched %s quote; εκ προεπιλογής τα εισαγωγικά έχουν ειδική σημασία για το " "xargs εκτός κι αν χρησιμοπείτε την επιλογή -0." -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "διπλά" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "μονά" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" +"ΠΡΟΕΙΔΟΠΟΙΗΣΗ: ένας χαρακτήρας NUL βρέθηκε στην είσοδο. Δεν μπορεί να " +"περάσει στην στη λίστα ορισμάτων. Μήπως εννοείς να χρησιμοποιήσεις την " +"επιλογή --null;" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "γραμμή ορισμάτων πολύ μεγάλη" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Αδυναμία εγγραφής στη standard output" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "" +msgstr "αδυναμία ανοίγματος /dev/tty προς ανάγνωση" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Αδυναμία εγγραφής στη standard output" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "αδυναμία εκχώρησης μνήμης" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "αποτυχία ορισμού μεταβλητής περιβάλλοντος %s" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" -msgstr "" +msgstr "αδυναμία δημιουργίας pipe πριν από fork" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" +"αποτυχία ανάγνωσης του errno-buffer στο xargs_do_exec (πιθανόν πρόκειται " +"περί bug, παρακαλώ αναφέρατέ το)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" +"read επέστρεψε μη αναμενόμενη τιμή %d· πιθανότατα πρόκειται για bug, " +"παρακαλώ αναφέρατέ το" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "σφάλμα αναμένοντας τη θυγατρική διεργασία" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "" +msgid "WARNING: Lost track of %lu child processes" +msgstr "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: Έχασα τα ίχνη των θυγατρικών διεργασιών %lu" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: τερματίστηκε με ένδειξη 255, απότομο σταμάτημα" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: σταμάτησε από το σήμα %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: τερματίστηκε από το σήμα %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: άκυρος αριθμός γιά την επιλογή -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s:η τιμή για την επιλογή -%c πρέπει να είναι >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: η τιμή για την επιλογή -%c πρέπει να είναι < %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Χρήση: %s [ΕΠΙΛΟΓΗ]... ΕΝΤΟΛΗ [INITIAL-ARGS]...\n" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" msgstr "" -"Χρήση: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-lines]]\n" -" [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-" -"str]]\n" -" [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n" -" [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n" -" [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n" -" [command [initial-arguments]]\n" - -#~ msgid "cannot get current directory" -#~ msgstr "Δεν μπορώ να βρώ τον τρέχοντα κατάλογο" - -#~ msgid "invalid argument %s for %s" -#~ msgstr "Το όρισμα %s δεν είναι έγκυρο για την %s" - -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "Το όρισμα %s είναι ασαφές για την %s" - -#~ msgid "Valid arguments are:" -#~ msgstr "Έγκυρα ορίσματα είναι:" - -#~ msgid "Unknown system error" -#~ msgstr "Αγνωστο σφάλμα συστήματος" - -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: η επιλογή «%s» είναι ασαφής\n" - -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: η επιλογή «--%s» δεν επιτρέπει όρισμα\n" - -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: η επιλογή «%c%s» δεν επιτρέπει όρισμα\n" - -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: η επιλογή «%s» απαιτεί όρισμα\n" - -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: μη αναγνωριζόμενη επιλογή «--%s»\n" - -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: μη αναγνωριζόμενη επιλογή «%c%s»\n" - -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: άκυρη επιλογή -- %c\n" +"Τρέξε την ΕΝΤΟΛΗ με ορίσματα INITIAL-ARGS και περισσότερα ορίσματα από την " +"είσοδο.\n" +"\n" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: η επιλογή απαιτεί όρισμα -- %c\n" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Υποχρεωτικά και προαιρετικά ορίσματα σε μακρές επιλογές είναι επίσης\n" +"υποχρεωτικά ή προαιρετικά για την αντίστοιχη κοντή επιλογή.\n" +#: xargs/xargs.c:1626 #, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: η επιλογή «-W %s» είναι ασαφής\n" +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null items χωρίζονται από κενό, όχι λευκό " +"διάστημα,\n" +" απενεργοποιεί quote και backslash " +"processing όπως\n" +" και logical EOF processing.\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=FILE ανάγνωση ορισμάτων από το ΑΡΧΕΙΟ κι όχι απ' την " +"τυπική είσοδο\n" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=ΧΑΡΑΚΤΗΡΑΣ items στο ρεύμα εισόδου χωρίζονται από " +"ΧΑΡΑΚΤΗΡΑ,\n" +" όχι από λευκό διάστημα, απενεργοποιεί quote " +"και backslash\n" +" processing όπως και logical EOF processing\n" + +#: xargs/xargs.c:1633 #, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: η επιλογή «-W %s» δεν επιτρέπει όρισμα\n" - -#~ msgid "`" -#~ msgstr "«" - -#~ msgid "'" -#~ msgstr "»" - -#~ msgid "Success" -#~ msgstr "Επιτυχία" - -#~ msgid "No match" -#~ msgstr "Δεν υπάρχει ταίριασμα" - -#~ msgid "Invalid regular expression" -#~ msgstr "Άκυρη κανονική έκφραση" - -#~ msgid "Invalid collation character" -#~ msgstr "Άκυρος χαρακτήρας διαταξινόμησης" - -#~ msgid "Invalid character class name" -#~ msgstr "Άκυρο όνομα κλάσεως χαρακτήρα" - -#~ msgid "Trailing backslash" -#~ msgstr "Αντιπλαγία στο τέλος" - -#~ msgid "Invalid back reference" -#~ msgstr "Άκυρη παραπομπή προς τα πίσω" - -#~ msgid "Unmatched [ or [^" -#~ msgstr "Δε βρέθηκε [ ή [^" - -#~ msgid "Unmatched ( or \\(" -#~ msgstr "Δε βρέθηκε ( ή \\(" +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E END Set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" -#~ msgid "Unmatched \\{" -#~ msgstr "Δε βρέθηκε \\{" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=END] ισοδύναμο του -E END αν το END έχει οριστεί,\n" +" αλλιώς, δεν υπάρχει end-of-file string\n" -#~ msgid "Invalid content of \\{\\}" -#~ msgstr "Το περιεχόμενο του \\{\\} είναι άκυρο" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R το ίδιο με --replace=R\n" -#~ msgid "Invalid range end" -#~ msgstr "Ακυρο τέλος περιοχής" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] αντικατάσταση R στο INITIAL-ARGS με ονόματα\n" +" που διαβάζονται από την τυπική είσοδο, αν R " +"δεν έχει καθοριστεί\n" +" τότε υποθέτει {}\n" -#~ msgid "Memory exhausted" -#~ msgstr "Μνήμη εξαντλημένη" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=MAX-LINES χρήση το πολύ MAX-LINES μη κενές γραμμές ανά\n" +" γραμμή εντολής\n" -#~ msgid "Invalid preceding regular expression" -#~ msgstr "Η προηγούμενη κανονική έκφραση είναι άκυρη" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[MAX-LINES] αντίστοιχο του -L αλλά από προεπιλογή το πολύ " +"μια μη-\n" +" κενή γραμμή εισόδου αν MAX-LINES δεν είναι " +"καθορισμένο\n" -#~ msgid "Premature end of regular expression" -#~ msgstr "Πρόωρο τέλος κανονικής έκφρασης" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=MAX-ARGS χρήση το πολύ MAX-ARGS ορίσματα ανά γραμμή " +"εντολών\n" -#~ msgid "Regular expression too big" -#~ msgstr "Πολύ μεγάλη κανονική έκφραση" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=MAX-PROCS τρέξε συγχρόνως το πολύ MAX-PROCS διεργασίες\n" -#~ msgid "Unmatched ) or \\)" -#~ msgstr "Δε βρέθηκε ) ή \\)" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive ερώτηση πριν το τρέξιμο εντολών\n" -#~ msgid "No previous regular expression" -#~ msgstr "Δεν προηγήθηκε κανονική έκφραση" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=VAR ενεργοποίηση μεταβλητής περιβάλλοντος VAR στις " +"θυγατρικές διεργασίες\n" -#~ msgid "^[yY]" -#~ msgstr "^[yY]" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty αν δεν υπάρχουν ορίσματα, τότε μη τρέξεις την " +"ΕΝΤΟΛΗ,\n" +" αν δεν δίνεται αυτή η επιλογή, τότε η " +"ΕΝΤΟΛΗ θα τρέξει\n" +" τουλάχιστον άπαξ\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr " -s, --max-chars=MAX-CHARS όριο μήκους εντολής MAX-CHARS\n" -#~ msgid "^[nN]" -#~ msgstr "^[nN]" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr " --show-limits εμφάνιση ορίου μήκους εντολής\n" -#, fuzzy -#~ msgid "memory exhausted" -#~ msgstr "Μνήμη εξαντλημένη" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" +" -t, --verbose εμφάνιση εντολών πριν απ' την εκτέλεσή τους\n" -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr " -x, --exit έξοδος αν το μέγεθος (βλέπε -s) έχει ξεπεραστεί\n" -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "Το όρισμα «%s» για την «%s» είναι άκυρο" +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" +" --help εμφάνιση αυτής εδώ της βοήθειας κι έξοδος\n" -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "λίστα ορισμάτων πολύ μεγάλη" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: παράτυπη επιλογή -- %c\n" - -#~ msgid "block size" -#~ msgstr "μέγεθος μπλόκ" - -#~ msgid "Predicate List:\n" -#~ msgstr "Λίστα κατηγορημάτων:\n" - -#~ msgid "Eval Tree:\n" -#~ msgstr "Δέντρο αξιολόγησης:\n" - -#~ msgid "Optimized Eval Tree:\n" -#~ msgstr "Βελτιστοποιημένο δέντρο αξιολόγησης:\n" - -#~ msgid "virtual memory exhausted" -#~ msgstr "η εικονική μνήμη εξαντλήθηκε" - -#~ msgid "error in %s: %s" -#~ msgstr "σφάλμα στο %s: %s" - -#~ msgid "" -#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" -#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" -#~ "delete\n" -#~ " -quit\n" -#~ msgstr "" -#~ "ενέργειες: -exec ΕΝΤΟΛΗ ; -fprint ΑΡΧΕΙΟ -fprint0 ΑΡΧΕΙΟ -fprintf ΑΡΧΕΙΟ " -#~ "ΜΟΡΦΗ\n" -#~ " -fls ΑΡΧΕΙΟ -ok ΕΝΤΟΛΗ ; -print -print0 -printf ΜΟΡΦΗ -prune -ls -" -#~ "delete\n" -#~ " -quit\n" - -#~ msgid "" -#~ "warning: the predicate -ipath is deprecated; please use -iwholename " -#~ "instead." -#~ msgstr "" -#~ "προειδοποίηση: το κατηγόρημα -ipath είναι υπό κατάργηση· παρακαλώ " -#~ "χρησιμοποείστε στη θέση του το -iwholename." - -#~ msgid "GNU find version %s\n" -#~ msgstr "GNU find έκδοση %s\n" - -#~ msgid "inserting %s\n" -#~ msgstr "παρεμβολή του %s\n" - -#~ msgid " type: %s %s " -#~ msgstr " τύπος: %s %s " - -#~ msgid "left:\n" -#~ msgstr "αριστερό:\n" - -#~ msgid "right:\n" -#~ msgstr "δεξιό:\n" - -#~ msgid "Normalized Eval Tree:\n" -#~ msgstr "Κανονικοποιημένο δέντρο αξιολόγησης:\n" - -#~ msgid "" -#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" -#~ " [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n" -#~ " [--version] [--help] pattern...\n" -#~ msgstr "" -#~ "Χρήση: %s [-d διαδρομή | --database=διαδρομή] [-e | --existing]\n" -#~ " [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n" -#~ " [--version] [--help] pattern...\n" - -#~ msgid "" -#~ "warning: locate database path `%s' contains a trailing colon, which is " -#~ "not a valid database name" -#~ msgstr "" -#~ "προειδοποίη: η διαδρομή «%s» της βάσεως δεδομένων locate περιέχει στο " -#~ "τέλος της ένα δίστιγμο που δεν αποτελεί έγκυρο όνομα της βάσεως" - -#~ msgid "GNU locate version %s\n" -#~ msgstr "GNU locate έκδοση %s\n" - -#~ msgid "argument to --limit" -#~ msgstr "όρισμα επιλογής --limit" - -#~ msgid "GNU xargs version %s\n" -#~ msgstr "GNU xargs έκδοση %s\n" - -#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n" -#~ msgstr "Μείωση του arg_max (%ld) σε arg_size (%ld)\n" +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version πληροφορίες έκδοσης κι έξοδος\n" diff --git a/po/eo.gmo b/po/eo.gmo index 8574ce35afc539c698948bb4a9f87220b0f02c67..c17877493c6856f40afc8d6aaae54034ba9ab197 100644 GIT binary patch literal 38647 zcmeI5dz@WaRp$?HDWE~#?>dLC zDefaLKwAWD1W}+BbZ9_P1i{fk867}$Fg+?Fh&qGF00J@&AN|ZYj^js^d3=9s?S0O< zRX6DfqW{eOWM|!b&ffd%z4qGcwbwfJg~vYlM<0+R$yX@bDK|eXNv`3-iA$11*Y`dy zNw}2k2QE?c`N-pw318xN_KOsrJ4!j3=H}DNlOp;09lb)0$v%o{Z8-YIs+yne7 zkblY6Cnw2gfxCgv13v93N%BhIEN~k5d%*p`Cp|Suz6NXp?*Yy{ElGYI_!Z#Wf$w^{ zKj+40B*}IBeiQJIfS(4cpLai#c>wS z3gC|cd35r)%aWuIoB%!>_%5L8|2B{*B!2;9NXdh_D7>V==K^m5J^(lX9tWNRE&@Lj z;Psb-TYmp6@G-#0(D`G5mjQPGuL7#y1t3+DR{=py@@^pilHUmMt3Za3jBRo_4s7sy z2FMhXSA^?t1E&1`DDYa~7lABy^7Q98{;mLOeU^cm_p5+ve=kt;`ZeGUz&{5vg=7oJ z(s*wLz6JPF;4cCH7AXAx+!p!=0e=I$hTjhYDVoPF;0u8nQ1ko=AWNBi0+<572Gsb* zu1JzO;7tMk9B`iBj~Y*syMQkPvee0612vDwFzH7EF9nJo#(`S56`h=(Nz;<>HZslj|P4b_)Oq`2MT|e>~(zK2;^UKC;w?2 zZwKBD{4JpHdvMD6Sq4E&xct;2(EaXNo8PKA!tk;4kz0eTRIXoH(2$|A*f{3Va>#o+I90dYki= z45)SZg#iBssQq%y?W`T}Fi`9EJSO>S;3AMmB!3y;E||-IBv5_l505BPn+R{%c_6#u(v)yLli zYG1z>NY}}ifzJgV=zv4uX`r5Sn8ngM`~pzp`4Uj$dGea`r5^B7et#LL{vHU?2oF1f zCxD*^-Uz&|>-6%yz=wj5_W`fs`UiU6|DOYekEiq<53|76@OusT6TrU(YCdlqIKBNb zFy;5(0AB!n!b#^R2Y{lhIiSY^A3pqy%e~8icX9o8;PZi> z0g8?@&zDMPY%4?`OZgyAL94dflmbfGRS`j@OObcKKV58 z8NfdTJ{kBw0vvm#^Qp^$dj1^n2H=kauLS-H@Ug&0eYfkkDNyUZ0MzvXa2$9y@H>GY z1U?)1TR=VkFM$sQ{xwkR^>v`|^px*${`(r>llc8kU<&+Ip!UgUfm*+B0G|Q8{x07~ z$AFvo{c522#m@!!2S8o_d!X>2ey_{bL%`?o`$vGn>#v00{}s5E-;aKkcG zcp0z&YCdlSUJra1@EYJ(fRJqR3^sxKeI0Nb_yOSKf!_dXT;KU>r^{=A!gm*V0Qfqf zp8HuKOOQP1HU6BtfKTD~n}FI6?*~2`_!;1(z;6J*3VizaJ3T(|2mJZdz(+p-S^!RR z|E{}Tj(r%Y_4`er=JB_{M*zR$wakb5j|XbLM}E-9*8^(&uLnLA_>(~0{|N9qfS&_u zo&F4X0{9J}o_FkZtP}mc6}X$#qkw+Q}z@w*YT`13VG8L$^^r zN?D-jvy<{4D8EQ~Bt@UolzIE+bnzg*zmW16%5{`kiasx;e9pcl$@c)CO!-;LS;`YB z`W&NtkpcK!F5|m)b@C`(BD@N1t0M|BCVz%3YNAQ{pG*%kPFCABY!$uwMI! z&h&XKT}l($gg=Vrbfru+%z*W<++{3X7BA^iTM z0M7vLp*)k4QuKKv<@@cM|92elP|8nIeuVNLDR)rxc_8JTl>L-fQXWFNgmM$*2FlYY z|B3Pl%1=?^=c#;o3grsQA<9uo{Je=TAELa5a&5S{4Ezns$0*OH{3zvZl+RG~`S%V? zE{CrrcoN@sQGTqvg6!h^XDR=VGDCR@<@uB;iaxKRd>k%+>h)g8HO*I_IJT{PSHJJ$Uc|%W ztcLR?-TMNFzcgHXc&PtS5W6#6i{seCwFB#}y@_k<=kPmRi##N@O~$59=ktSptLUV~ zLV7yuF80z>t#&(|FFO5JXOO3z;?#JWb((3b?|1s$Gikp_yLqN-y|mR?8}zM4chI5T z>MFH+JJZ%e+FxpMzegXmUCR3DnPQNh$~yhLsVcu1G|r;jRm{T@9F(hLs2CaTNP%onmjyPvLQ{UzaE2%R5vyLqRdQa7LP7u_>E(^xG(z1GcpJrMwv9ZO@i zi>uig(L%4)>q8-vX|a}fGrH)F^VM)Xp7!%zpWh;qi1)E1Ag{5Mx7Ymp(ErU=Z>>$= zMj}>6&GXZsu57y2E#?_pqt`C_jgwh-*X_Fx(Md1wLn0?z-J-LqS#hV8%|R==-GT&{ zTJ2^U8t1*Lzur=Ds?lz(ifU^gT~5Pg&=4q?iY#V3?=1G0sxD6EUBgwaxxN;IzBWO; z+v+S7-PO#t)rM(lXXU5+tnJK^sXLC8eRqmMFYl&}PO;c625YQ^R`B5NBS)qV&G0Ml zuBJyD+m0QW-8+>wy7^*$I^Km`Fz(QVWY8soJ*_OXR8XzZV!nL4aqcv=c0SuLQ)>PDyN zH0Ih_XC-hWtz9n#Wnr+RpKn*gazg-}+@5|gK3x>#Pd|8Qc8@(>9IpO!zfqE!?qzAe zwdy@(>Is%=oNSlzh;kstKDjp#3HQ>4Zn0`yWZal#uMgQ|T^OvGs|~BE&R}LD-@LnP z&&|6J?cM`vs7J1>iV=s|!!Yw~HO;y?du1(Szp_$uXVS9G`2C|rESn~$mgu{;#@fI# zT0N0eFMZjdfTN1A=d$^gUOVe8-G7GxNv+PJwQLuQt@*5-PR;I%Ta{Zj(_Ayni-n`R zre>hJp-&ETJ()qieF=cZR7w>|8Uwwwx0cVh7Fv08=lu_;fHQVawR${G-*OjJL&66{ z#zD0-s6eJicO4oUR=5nMvjo#K(?_Ov?{Dlrbkku3CRN zccK=ke7d8#UoDjl4=upAyfhHo@rFNJ`}JGi?o?ZcT^@OMwTai%9|9j?g(h$^uM-iJ zxVi>)=P>C!WlMKNlu>c9;dIr!Q#82QXe~5y>Ys^Sm|i1#(f;ZbfUt>;jyh?xuq`ZB z5d{B55Mxx9T&6}GEi!U26ZHpE%;xg@Ux2`-q*fudJM+$t5Ydj~`K7GuNESyh#%63K zNIPkQb*?D7(DGSjLr-5lA?)S~xbeD=>rN4y5z8)xglG2Js&#T&ok-xX>p(y4vLhPm zL^f^dLt|e|O?$Z5dd7=c zf@T4WQm^d-eYD+LfxOcW{G;2N_a4*fy)5Q@rrk(`CFHgSiNPrtYIP7U zC^_M&TF}O(`LI5sx5>2EFR)rnp4MkId4U;EqN27@sD`^s(K`oBbS_V?)iAyL`>A=| zF0Z;daqW!3i5gkBirC{S?VH{=+Y4N(em_ti8dskYt){Y|u*z5#_#!q}6P7V?5&a)7 z5E?waSzr!)8=s?n0Cg4fD><5ybKP&pe0pbA=ZZG;jw-nF%|D36?4=VE69U(z*Qd#D z%;|mL)%1W#E{`Rv|ho6;>ytwr=S(fgd?Wb0V6 zXG3l74mzkWX!Go-y-^;p7Tf`^;#vF<;b(n31yd&4qYT$_s77ON$&;r>S(@IRZ967Q zqfA>I#?eIoT!qs)14*XDK5v{z_vR39H<^m8GE3KrUdt4d*h0$6BGao6WfLM>>ewPH z&l*`&U zw6>3}31D>qZOU(oy@q{`D=Tj=IG2!fwKNdDp);kDrO;kFNH8+o7>Fu!BU@xRLI0_@ zU=s52G&kNnA!Tl}W@!$jvI4s`!N2&i0%5RvPaV*Ycg= znpQxQ__G@eC{4w;{}HFZ#YgnJuqAP;ayr^=ZcUcNQ9a{=2&Ew^DLkM;xRDOpW{y(= ziq7D5okh57`7}`_#?<=dL)$P7+4;&#ssV_OR&ffMpEFoiz2p{icif2vvB*h4aw~d# zC*7O1+xeMf|2i{Gww*+nG0CwD-$rdZ0RNEl`HYz@PR0n^NUi3sXcr*RZ@CVawR^>w z&Lq5LN&hs|W)P0%3;g4~wW8A$_R++|2F<$-*F2E*@hEd$Os}TH&9<8jS0gZ*hOJK# zyat1Wv%c6N;N3Q3G8+}UR!3?a+XIG+GoJ>P3U5}59Tw1)bjd4{*%8QY58`vgEwNRn z7s?|RZA;Va#j<*GO`pMW*P35xpBb0P>9r)Q2cm)WrkUHq943;3ei-A71VlqXb(JP< zt)h*$;9)2W*#gWhZOkTzTmWwoe}{_aS7a0~N{>T_Wf-S<%2q$OIoZNP3eL-O8(o%X z&CRf}HTaPHs7w9++T^xvz3e2cHCvhpr#ssq(s4PI#O+M-;(|Gq&vEjgvjRBb85oZ( z-1|V{BYgyF>YO{0+~DlYf=1F0=pE#JM|z}f!e~!ne=1})s}(iaa9ABAqaUq zCIwn0YQzz0K;Sw*!nn_yY*_s3!8WqHjoB!zBKNA(-$K!D7pHg>i(V0GP>sEPIR5i< zsWcn(3!Tg0d4_z^H9JP2_|@0?OD;vjDPDAl*v>z-1cJSiHXQscUsynM+PLH9vo8A# zn$J3C&>+XtWyxz?B-oX$KF^fYBsmQdpB$2Q0k_erO`av9 zw_W%zL|Kpw=TB^NBPXLI2FZwmMHE?wWZ+4$^DG*ZCXWpjLq3|!nEFI=+X!E(c*&+7 zx7-I@Ze{I8`Hj$?=F7Vr3S)w5F-sqc`Ia^jj^U<&e!5yDGcNWT2A+4jMK`&vhXgjI z?5H{U?Y#RH`08~^e{2j|(T6qA8SHU6`istSXug}_0>9R#!oe+E@4BEP`guhu{<`{r8&E#qXx<1V=-2QdDuzHt{L5L zr!%U1*y_sXED!yBPuGSgKW{bW<#elta!?m{qYf zY!y{cyX_((Pc_!;hn>>sXV-pOG=YA4T!E-$*O5C9PE~!_d3?mEY{itL*^$d;6x1*)BQU8cP$h4 zzX>IHUBpLKHA`o1+g~?u=1nM+(#Tae^kzJ(Zown_);Kve^@T7D{3k(h#nIp$?n&_P z#oH$xbTx<1vl~mnZX_K9_x06KLjQ8P=wt+TIK%^_)@h@cvkVu4tuJ=%TGpz(C)@d~ zs~Yw&`%+3L&IEWA`iAL-!DBn|k7zRJY-}{b%+ayI+yK=xsLv>TaC{3klHbe4QSze9 z&b*ANghNc7yGqTk&L}HoDx9DyP|T%>&D~?g;GP{At1JsKQt5i#?ttUmdY~A_C!+U^ z$v~|O=9P4Zu#$=v(^;T)uE{<#w9r(|sw5tZujqo|tjpYfFn76Z`{1;N-B=zcmhM13 zQ5vk4sWP3)dTt!M&nuWyK}(%T)UhTg4>I>qo?IAXRDIi$u^~>7X(o2RegVTn`L@^rEOdT=d z$b?a6;fzvCN_WhAHHX!vsDj-EOaydG$Of5hiV1%5tUWJhtt*NsYv%PVn%SB2wASuK zGdGJ2-G(Vq*EXdclj?{PUIc>iA@mYfX|p&A2S2V?anh;zrX>PQ3j+59n0Tb3+DK&! z_6o=f7Z&8cW!Ma$Y#oTX{B7dax-{uiHpNFDzxQw$;$f}&l|0(0A}5mPX2r)28|AoL((aLGi&_xs z@n&&cs7q1N>4$&XY8(p4&@=CT2pSEp|5ksidWOu@n^qa6OG>xtXw2Ggp2|3M;bx%6 zjTeU`i8nH?Wjdcx2~DveIl7SBHrCLt4L984)hWPZo|31tq&&^Is@KoqY!z^XVU6`bhze*Bcl;@H`EEpaPrmCv6j_D@T+6P zYiDtEp`ftR-%zWB3+dtpp<~H90hhMV&@+iExj?EtJ% zjq-ZAlTQSPx?p*?B8?H3cBa#Ic<;0%41oLd@9y@-X;3GXBw2rP1^w|b&~B({4+2b z_b%Eti1@28v9odjipjvU&S<(L=OZ=EJX9t#;U72@@XMJ6nnquH*3y(u&( zKHBuI+EU7JsW>uI_A`)Jy_$x3bO`vJOb<`(C#3$gID(KF4mqnwRBdeeN2ptJ4rRDU z;BKNa(_kbkbNR7BVQ7NrV8S|bPeydY3J_b zv1@Z89Wb1+g~`{%moYpKZzvS>EJ$OsqyF-#T$ zW=rP;5$=e*wBh~%Q(O=@$2ssoY3~#xE{`R>4DqM93PM0k%ap3nL4}xK+On0+HOE;t z5_HfpJunE3iNsaDBnCFF-&Uw(P+2X+krpv#+_akNXNaw^B#m^-Oe*HUDqk_9-QTeP zXS5y}xJZfT&j>ewpLj|OJ`0Q_uFl)th>-bu9R}`oTy8WLIB^3X3q6x_awDL=BX{V< zbrK~D#GYDhV`2wmnggtv&T2mgt7_OPy)U(UBXb};c#9_MI$jOaTaBX~eo!@`#3}@H z+H`mqaLZ&7_s!cEVNE6)-@`T+ z`S3J0t_9=o)Covre|E(=jqMcn5!=~wy9ON&16}OOFg9y*d)Q{lsc5E)A@I*kb#Wql z9Gvt_l#XQ>D5g`eGq+7t?QiQ42O0$wWZE0pc}ue}vnWKkS>8YnUmz?-eiktmt%(8( zw_=oLNU)unmaG9m-afbiv{S91+;SlV|T zNfkFYO5!4zL1$5R)CYcunKJi3Y~Qq%%?-u0Xkwe`YPSyDbTmOoF(*CYOj7ZQ)u}3H zpoF4J0dYG@NZ)MQnOtC=ZY5u!>ZOf+XJ4!-)-V}uZ!HHK-Ueopev>V}0%f;w6as!z z`Q)gwX<~=Mjh|I4U=sw0ttS2Z;g)D4A9^3w)MrhxwOl$eB{(!9mPIB|DVTl2V?2=K937jl?y(^P%iNE` zN9LytXkik`aw#o%lvxeSdg6LTNo>-BFyWPMp(;g3o>g6+M|G|bSZ0p2x^OZ;9ral$ zbb(Bzlgyj@(vq`eH&u1yr60CxjdaaxgvnbyuZ$Hs3kwL*8Yf;Nd!iiDP?hr#Kvi3N z2=61rq!Hmnu5e#k@Z*81RZF1@puFm!)UYejoI$L3DuW+b^t+`D@*2+K*@iQd4SxiL zX}gQI(AzxWP4@!zoI+}0@LK_7^mET$AqDF?r<+uGqd~`*tce z4iQ46v!SZq^BOyLG`3%z?s)#>mCtKze;)Prlk3trLZk$81*2{<-AAq*o~k`u$M<>d zLcYLx&JDyQwb~OfgX?I~SscJM8%M~Nn@p!b7tNuoYmwI0jh+diuab>+gM4hgi5`c? z^Fkx>7@fRdbwYwcF?L}3z*L2w9TVHf_8{ya&c+cts#D(QHsbDE9S>PU)82L4k$sI9 zR`v8`JY$Wia9BKZ`YOL7`n4-ODDZ-SGr^C&apch zH@Od2NH|zvP509sEYMXX2k%3(m~Uk`*x8z{5j3;=e!kmUEZ|;)&Um_#EvM)1ZNZj` zlUyT8xTW9OG9Ich7FUYY#uRmwJL`8%e7mlw{L1%B(S zlE7!nEb#a{CUU3oLQEGck0r_*RTg->6dPlP)Y>zBW>KJXo-CG;NwyfEc?D9zfe_F= zST0C^2^9%{>$X;7T}Q%Lytr1J)M`4fZKZj;$^$Q!$HnMLx@_yK)F(j^i7kOrz4Qqd znE$B%&*?F)RHK`Ii!&je{X#YBfDPPjRUNSYqte0k?2b{90@IWyu556+P&zmQqt&D< zYkRg>u6naz8*`TrC4-0I=*A*_uuYs4m5WT|nw%{~)k!$CuFpr`LnodFPA{M~3=+RzMI@rCljZ#}HU@afrG$O}K)LVm9hzOSU$1G}qRgx^>~ zYGh%yk}!~fo%L&1`wiQvufDB&V?%m4Pf{AV+8JBiFb=yL2@sOPqFu!)i=@#?H-@vs zBOCEy82gQqy3me@j7QmU`pK?7_u70xyqW!M9j?n1Clv=`2_KFD=>i7!ou-Sb!-6~z25T)7S3GXi5BOCk|39<@`?4<2=1f+^-wE<{?eLexsM*mMigdIN;s zR(#Yrb2Bmyu*!UKaKw;_oSikzIeKMR&{ufT$Y2f~pKVHSXjphE(vEyWq|M>5KsCX{ z$5TXD5o`lpx-)U%ZZY5vTbIsQSV~y7sc;?iuyLYh@Vc2gOqeQ6!bA$m&ujQ3E;wE~ zo`Fz1Y+G zO2*!0aM0s@_adXkT9tRMRT->hN;}8Y=$cW&2@|(9E=3~1yLp<@&RZ)z=nD4}BZDKu zqq$>T)bmfZ65Qi1kLd6;d`d`RoGm=cCdjQVNG>554yIS85XQwQXla?}=eh1o-#iej zdhyFz6s8;V&!wco6rmXL{=$>bAr6f<)5s?!IxR|*`T4WOlxmBlTy)P8U&`8jpCs~d zXpWOL1Z=!V_XTqr(J!kk+(Kuqb?N9A(O^VYdPyMF?yzN4QhH;#qM!11R7;eWj+Kkt zZ*fopi?=b!`cQH@yKJILO+Vj5m>))|2sh@aZ>;%G`8S$@` zSl{ZyHl(VbyIai0soE3}9p+W(>O4=RnYt`Tje3E( zag=B4;yb!no(R3M5v^*dKxOkkgnf*5Y+Y234ko5=G+vG+7Agx9iKQ&}i>-KNvNy+F zxya!?UCh^W+n3?zZFnt+;hBDM8XQ>oP=z`!lx&F9R@5&n%9Xn{|5eqGm zPs!UwY`&ftM37olp|2z;5OVH=1P96}w=DP;60}~+g?N+{wXUS7_(idr73@f^VSEjD(p%}a=Ct(XE@5ZWJi(c{j59?W37WwQART_MJIWZl zH!~#zdR-|vJcw?!t~tzF^2cF&Ne#z-DqUyj$#!hXXcZQ<(ndK(A84^KeXJ$(R#@jW zmbHZ-ZRg8U^kL1&s1BaGGB2KuU^V;|ILhPo5gPMQLtbej_ZWPc;hW}P??vE-7@3j9ptt7Wzd1NIax_nknc!4L9B`9;f~4PI2$&a;((CD zXavYo#0vYU&IPbuSHP|WqE4Xt`HD<7%ar#mCUe=f!3^2&6c;rCZ)>Pmp2fv>TA}RnC=`W!Te@ z{Wzung(v=ZO^6J3>;qZiJv=)3sxu|_x?7#bln#^%Tg6uCV1s(KA$fwN;;8CvXsIN- z=Ew@1fa?IE4}1#1>q>eE2`284d+@7(2^# zNKU&c3QsFhwjTnYVQR+~E z{bCPx+N@(6b(V-RGnPbSWYt$=(0LthOeqS{kSx>cXK$OiiF1UQR=<1y{;4}d-n`6C9_( zMJ^U7)@Moj>wGjyn38}wk556V`Wsp}*`P|YLRwVig~;B4>*DDVhn!%Cwly>-1lNbC zl1B}l#+;dP^aa7YtIv=aj@q*J%78i1BY~x`5D6={8FVCi*lj>F0ky|{IHf`oG?z*h z&3KCqsy1(I!a$0_@=o^S+Tank(L{YHbBbZ` z*IuGxb3gI}2$K;Doiw0#5v*tv!7EfbJ+sTC`WI@509GK6y`vj)vh;l1$)%6VgM3{0 zhSdB8+%sA(T*Ht?i@AhIAZxW@KZXNt1UHH>4kr4NDoZN{kXO)3=9JUL#WtZBWBST4m=m&yT$`(S_4NcE62&c07x@}>h)GHZB>w} zWrZ+Va|jvF-p`!S4IfW5$1Uh9rDE`nQN3WLqAj~54v@pHI$iOc3FzG zaXk|k4eNpn#q9+SrwN?2{m*In3Zc33fiq_l?}XO7)sFh!wqt^*F9@EQGH~V{<;hV47rrSxefFaYsjo zbg)|1J~UnKi9pzs$?n^y4jq{#Zp{p8-Xkx5bl<&e1ELXN%?dr`O;+_dowA9WPs-v~ z>=-RwI7y)^5G&{2R@0hbKs~pK~PscC`~8BVs^ovK?$(@{p-sC zh?|-xJ2-*s{KCdg>%cSM4`s8Vt8y|e(~&Eh-5m9bQ%uj|kGSzZBF`$7x^o{yf(JkK zMA`cVD`)Ku^*y+GgUJLs;bX){5<%}MlU&bmX9dAkB)g^B62<8QQbeGI{!x9yF>q-I zF;kEWwXFBnYn?aiTe30^1#kcClVewm!E~1OL8d~q^yKj+dOGf?fkjL+#f0o3*e2bF!6;sNaO*qJo z`zPrBLs|SDoFO&EjQJ|P-;PgAe_3}UteR&5`O-*(b#%$*2xm%WI_UV9q^i{-Q9{4+ z`8mGeX>5Eyy;X!ND_>el=wgPsCH6A7JWsP=tyxWoy00ijS*tv0j;UZpib@pJny_ZR z^-mViMablbbg;YZ*d10B@e|ais!7mu;Rt0fS^M0*WHd_s#a`H8F4TGx0)rDLpNDmU zgR&PoUTIZ7Ie*aN)}P~Hhn%O$Ay8Mf1E12_Lb+-%0F;Yne1JGYH)kOR=+sQF3~TYn z8n%+A6!0u@HPx3<{ngzr>`UdwkIeKB$2H7%eX2jaLX*+%w0K4JZSU8oYmfV_Vu#}) z2h;2*_a8;cqNQ}Iagump*9gIj-_m)%>2pql8?U=}0wJWw&%+YDp>aMrK_Yc&gL3}J zrA}Fetr;#WGom}Nv%Srp{_pr54quov*kMhG*2C}*2ktd0!`9#5O(x%Yw-*A0Q;Ln6zm@toZ103WJm_uG2X?FDyRYsX~;-2 z)1cNbNV!nW`l|wbPl(tOTDim0j02+=OD&&d$w~34Zb#lzI4ua_Ml)57Kv1kR@j>|V#J}$0z~zalMmx#WJ?gV z@yX$_^x;odBseM)5^f4XEsZTo=@rtj&>K)Dkk)qYQ|*=!ts2_Ok5u!*DX3GvN+oVyuuxcRbV zW7V*C8W!f|Zw$C_rRs$NY>zFFkiwFr+krZk010j9KTc7+G98 zlb%8*PS|ERYvemFQ{8!wz~SmW0{R-?BjDe4*WV++7kiIDxS;n4=u!v)4fS}Bz;He2 zcK8bK5wK>7_+YS~KrU;~8aX8~6?6#&sz~&~g>5@T2UH9_V68UuRsm_G3fhX^0 z0d*wABV-&A9q_-!$y2;!R;f(}LoPqE_tX#NB5XohHu=tF8`Q3EeMA?*= z5v=rhXe9ub#fYiO!K^SD!-NJ%Q>pLF6*<49PpUuJi(*QhbUE+YI|+EAJW`ecf_DR< z!h|<#f{duNTihN;C&!zDxOMJCXVDZ7>xp)AJ9ecM9O+=@T=A1Og=5!VN+5YH>8Idt zISH)Ed0$2#bGk&R4wwBU1fZDRD8$hn_UuKxh9F|UbR95RQyw_M1<@!E#2ayGi#Ts; z$GR@O%9jwt9xh}dRYpGpFOLevaXomVTuC%X*30S`rG!ve#cPHzp4#K0bV$kkiDw;l zW=KE}?+)1R%*djPnTmO2mhp^?>><`-yNEiV3&^KQFj$PZldCEoLdM)4j{8f(bgW>2 z5YQ*3h67GWkmt$=WN$&P=oM6L(7Y60TVthuxUJJNW4ic46$Pe4NTp*`UHM~8cYw_0 zIDrW1pJ>5;(cn+zDMbK?>22|aGT6;Q2KAR_dZ)x= z6?nxaAx6plx&F3-i0fLN^O@0Qe?fuJTL{7!tA)1Mi+E;6f?VJ!s#|7U@p{O>QrHjC zedo$MR>gh64{p(5TeMJ$tKgX)MFz_WFDuyZwAorP{MFu7fJ&-fJjp;KWDPKQY`Mj< zhF(wrH?bwM9UIiZc=isH!yci9FQ0R-f?4qZY0u6FAt9=;1_O+(5i?`4BYtd7W-H-N z3>WK$NsPOV_3IX0RJrt)g1DJH)i(s1NfV8>k@$i}Xn+65NCUpd-BPa#4i4&wr^b_E zzg-Tu>dtkq(%RK7wfNMAd3F-kaf5|-@X+*tKUtYv^j{nFKT1T}h5fNXu*{ztTz^fk zgoy9>wpSamKErt)<;#0-*5B@xE}+-G@NNofoQUeq2Uz)f$@rJFY6J6^ZG<<i^oIAK$ae+Lfc-Djv!yJ=4 zA^6V=nWW~OhM|aSNvOj=gBysYtI=uj)p!t*+(b^L7Vw4~TJDHSVQrEOmC%A{d2fRR zkRm*Mz(KJ^&R{qYGv)bdWfYKmJk~3PfnX6^ron8c)j{;51=B*ylaT7cL2Jg8TLx{> z=EN+m25cgENDaZM?hdTm&C)~)mhl$LuBpPkG;@z)XZg_{g;GDfaSFy*EXlSZe+wyw z>r}u%xeBl+`d+Flt~2TOZ2Sv#*pK}g>qk#A13|{Gk+0{$hu0NI!Ur$ECfbo;bo4CX f=V9xeZCSIMJPWd{t(WxTScy$y<%~=<9`gSH-&7@l literal 2384 zcmZ{lOKclO7{`ZF9(8%OJX>C0023-S#!h3Ax}`)kp;RKGsw_?jWxPAtOuU}i&dfRq z_g)YOBm}2Q9JnBHf(sH?F5KaOP(hryao~c4R4V@8+ObWQtg`;aGv9o#nfd#->)Rqzq;6YyE^OYm{<2k>d|cknoP3w#DV1}7Y+33476!BgNmNZ^Mc z`~M2O2mA))yuSk__$&A^YCL+^sJ`nkCX9azJ`es3a!+o8T;B;e;r!bm=k?~8?}HEE z`*1ve4TMYa8HlCgI>_~W0dl_IgY54Yko)>KNZ_%1@q!EBJh%dKT{(CHyat{IKL@!V zKY~~){sQqQ{=o<5edx%j4=;i!uX-NE=Yx3JKi9$^^4KK&% zT(HGeENnqlGeS%ru7&%;&%=1{tNs(>evtdX4_c1H6)0*yFjhsKQg4@n$*jt$o?@y) zddKkiwuze*qKajpg?9Tash;!E*sL-#cBpcbk}U^4?Pjw2hP-t0_81xkLP!;Si_8iL%y3PNgprHy9|JPA5~f8${~L zUap0oY}JBd{(>sPFG&=T5*|j1-X)_>3OCXT zEI?HXYdbVhd8HGItQ+*aBW&GRC=%mFI3y7Vb88JG%Q6&P|R2_6h?8pFpBHRCj^ x8Zm1}UA4OJ@Ee3Z8bXM0hpqPGA@sVh3jSR}ewC2yV>40_7Lh(ggbS%e, 2004. +# Felipe Castro , 2013. # msgid "" msgstr "" -"Project-Id-Version: findutils 4.1.20\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2004-01-04 15:27-0500\n" -"Last-Translator: D. Dale Gulledge \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-11-05 16:23-0300\n" +"Last-Translator: Felipe Castro \n" "Language-Team: Esperanto \n" "Language: eo\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-3\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.5.4\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" -msgstr "" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Ni fiaskis konservi la rulantan dosierujon por lanĉi komandon en %s" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Ne eblas fermi la ĉefenigujon" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Ni fiaskis ŝanĝi la dosierujon" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "ne eblas forki" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "eraro dum atendo por %s" -#: find/find.c:205 +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s ĉesigita per signalo %d" + +#: find/find.c:203 #, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Ni fiaskis ekigi komun-dosieran haket-tabelon" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "purig-kontrolo de la biblioteka funkcio fnmatch() fiaskis." + +#: find/find.c:263 +#, c-format msgid "cannot stat current directory" -msgstr "ne povas preni aktualan dosierujon" +msgstr "ne eblas informiĝi pri la kuranta dosierujo" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "" +msgstr "Ne eblas legi liston da muntitaj aparatoj." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "" +msgstr "AVERTO: dosiersistemo %s estas ĵus malmuntita." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "" +msgstr "AVERTO: dosiersistemo %s estas ĵus muntita." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" +"%s%s ŝanĝis dum plenumo de %s (malnova aparat-numero %ld, nova aparat-numero " +"%ld, dosiersistema tipo estas %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" +"%s%s ŝanĝis dum plenumo de %s (malnova inod-numero %, nova inod-" +"numero %, dosiersistema tipo estas %s) [ref %ld]" -#: find/find.c:693 -#, fuzzy, c-format +#: find/find.c:752 +#, c-format msgid "failed to return to parent directory" -msgstr "ne povas preni aktualan dosierujon" +msgstr "ni fiaskis retroiri al patra dosierujo" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "" +msgstr "Ni fiaskis sekure ŝanĝi dosierujon al %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" +"Simbola ligo %s estas parto de ciklo en dosieruja hierarkio; ni jam vizitis " +"la dosierujon al kiu ĝi kondukas." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -80,14 +126,20 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" +"Dosiersistema ciklo estis detektata; %s havas la saman aparat-numeron kaj " +"inodon kiel dosierujo kiu estas %d nivelo pli alta en la dosiersistema " +"hierarkio" msgstr[1] "" +"Dosiersistema ciklo estis detektata; %s havas la saman aparat-numeron kaj " +"inodon kiel dosierujo kiu estas %d niveloj pli alta en la dosiersistema " +"hierarkio" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "" +msgstr "averto: ni ne sekvas la simbolan ligon %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -96,13 +148,18 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" +"AVERTO: rekta liga kalkulo malĝustas por %s (ni vidis nur st_nlink=" +"% sed ni jam vidis % subdosierujojn): tio ĉi povas estis " +"miso en via dosier-sistema pelilo. Ni aÅ­tomate ebligas la modifilon -noleaf " +"de 'find'. Pli fruaj rezultoj povas esti fiaskintaj inkluzivigi dosierujojn " +"kiu devus esti serĉataj." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "" +msgstr "Ne eblis legi muntitan dosiersisteman liston" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "nekonata" @@ -111,31 +168,41 @@ msgstr "nekonata" msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" +"Dosiersistema ciklo estis detektata; %s estas parto de sama dosiersistema " +"ciklo kiel %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "" +msgstr "AVERTO: la dosiero %s ŝajne havas reĝimon 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "" +msgstr "ne eblas serĉi %s" -#: find/ftsfind.c:599 -#, fuzzy, c-format +#: find/ftsfind.c:609 +#, c-format msgid "failed to restore working directory after searching %s" -msgstr "ne povas preni aktualan dosierujon" +msgstr "ni fiaskis restarigi la kurantan dosierujon post serĉo de %s" + +#: find/ftsfind.c:677 +#, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Ni fiaskis ekigi komun-dosieran haket-tabelon" -#: find/parser.c:471 +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" +"La ago -delete aÅ­tomate aktivigas -depth, sed -prune faras nenion kiam -" +"depth aktivas. Se vi volas daÅ­rigi iel ajn, simply uzu la modifilon -depth " +"malimplice." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -143,61 +210,62 @@ msgid "" "as those specified after it). Please specify options before other " "arguments.\n" msgstr "" +"averto: vi indikis la modifilon %s post ne-modifila argumento %s, sed " +"modifiloj ne estas poziciaj (%s influas testojn indikitajn antaÅ­ ol ĝi same " +"kiel tiujn indikitajn post ĝi). Bonvolu indiki modifilojn antaÅ­ aliaj " +"argumentoj.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" +"averto: la modifilo -d estas malrekomendinda; bonvolu uzi -depth anstataÅ­e, " +"ĉar ĝi estas trajto kiu akordas kun POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" +"%s ne estas nomo de ekzistanta grupo kaj ĝi ne ŝajnas numera grupa ID ĉar ĝi " +"havas la neatenditan sufikson %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" -msgstr "" +msgstr "%s ne estas la nomo de ekzistanta grupo" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" -msgstr "" +msgstr "argumento por -group estas vaka, sed ĝi devus estis grup-nomo" -#: find/parser.c:1227 -#, fuzzy +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" -"defaýlta pado estas la aktuala dosierujo; defaýlta esprimo estas -print\n" -"esprimo povas konsisti de:\n" -"operatoroj (en ordo de malpliiøanta antaýeco; -and estas implicita kie " -"neniuj\n" -"aliaj estas donitaj):\n" -" ( ESPR ) ! ESPR -not ESPR ESPR1 -a ESPR2 ESPR1 -and ESPR2\n" +"\n" +"apriora vojo estas la kuranta dosierujo; apriora esprimo estas -print\n" +"esprimo povas konsisti el: operatoroj, modifiloj, testoj, kaj agoj:\n" -#: find/parser.c:1230 -#, fuzzy +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"defaýlta pado estas la aktuala dosierujo; defaýlta esprimo estas -print\n" -"esprimo povas konsisti de:\n" -"operatoroj (en ordo de malpliiøanta antaýeco; -and estas implicita kie " -"neniuj\n" -"aliaj estas donitaj):\n" -" ( ESPR ) ! ESPR -not ESPR ESPR1 -a ESPR2 ESPR1 -and ESPR2\n" +"operatoroj (en ordo de malpliiĝanta antaÅ­eco; -and estas implicita kie " +"neniuj aliaj estas donitaj):\n" +" ( ESPR ) ! ESPR -not ESPR ESPR1 -a ESPR2 ESPR1 -and ESPR2\n" +" ESPR1 -o ESPR2 ESPR1 -or ESPR2 ESPR1 , ESPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -205,9 +273,13 @@ msgid "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" +"poziciaj modifiloj (ĉiam veraj): -daystart -follow -regextype\n" +"\n" +"normalaj modifiloj (ĉiam veraj, indikitaj antaÅ­ ol aliaj esprimoj):\n" +" -depth --help -maxdepth NIVELOJ -mindepth NIVELOJ -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 -#, fuzzy +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -215,28 +287,31 @@ msgid "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" +"tests (N povas esti +N aÅ­ -N aÅ­ N): -amin N -anewer DOSIERO -atime N -cmin " +"N\n" " -cnewer DOSIERO -ctime N -empty -false -fstype SPECO -gid N -group " "NOMO\n" -" -ilname ÞABLONO -iname ÞABLONO -inum N -ipath ÞABLONO -iregex ÞABLONO\n" -" -links N -lname ÞABLONO -mmin N -mtime N -name ÞABLONO -newer DOSIERO\n" +" -ilname ŜABLONO -iname ŜABLONO -inum N -iwholename ŜABLONO -iregex " +"ŜABLONO\n" +" -links N -lname ŜABLONO -mmin N -mtime N -name ŜABLONO -newer DOSIERO" -#: find/parser.c:1244 -#, fuzzy +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path ÞABLONO -perm [+-]REØIMO -regex ÞABLONO\n" -" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NOMO\n" -" -xtype [bcdpfls]\n" +" -nouser -nogroup -path ŜABLONO -perm [-/]REĜIMO -regex ŜABLONO\n" +" -readable -writable -executable\n" +" -wholename ŜABLONO -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NOMO -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" -msgstr "" +msgstr " -context KUNTEKSTO\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -244,20 +319,30 @@ msgid "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" +"\n" +"agoj: -delete -print0 -printf FORMO -fprintf DOSIERFORMO -print \n" +" -fprint0 DOSIERO -fprint DOSIERO -ls -fls DOSIERO -prune -quit\n" +" -exec KOMANDO ; -exec KOMANDO {} + -ok KOMANDO ;\n" +" -execdir KOMANDO ; -execdir KOMANDO {} + -okdir KOMANDO ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" +"Reporti (kaj sekvi progreson kaj riparon de) program-misojn per la program-" +"raporta\n" +"paĝo de findutils ĉe http://savannah.gnu.org/ aÅ­, se vi ne havas aliron al " +"la reto,\n" +"per sendo de mesaĝo al ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." -msgstr "" +msgstr "purig-kontrolo de la biblioteka funkcio fnmatch() fiaskis." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -266,556 +351,917 @@ msgid "" "perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " "use 'find ... -print0 | grep -FzZ %s'." msgstr "" +"averto: Uniksaj dosiernomoj ordinare ne enhavas suprenstrekojn (tamen vojojn " +"jes). Tio signifas ke '%s %s' estos probable rezulti falson ĉiam en tiu ĉi " +"sistemo. Vi eble trovos la teston '-wholename' pli utila, aŭ eble '-" +"samefile'. Alternative, se vi uzas GNU grep, vi povos apliki 'find ... -" +"print0 | grep -FzZ %s'." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" +"Ni atendis pozitivan dekuman entjeran argumenton por %s, sed ni ricevis %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." -msgstr "" +msgstr "Tiu ĉi sistemo ne provizas manieron trovi la naskiĝ-horo de dosiero." -#: find/parser.c:1638 -#, fuzzy, c-format +#: find/parser.c:1633 +#, c-format msgid "The %s test needs an argument" -msgstr "%s: opcio `%s' postulas argumenton\n" +msgstr "La testo %s postulas argumenton" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" -msgstr "" +msgstr "Mi ne trovas manieron interpreti %s kiel daton aŭ horon" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "" +msgstr "Ne eblas preni naskiĝ-horon de dosiero %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "" +msgstr "averto: -%s %s ne kongruos al io ajn ĉar ĝi finas per /." -#: find/parser.c:1956 +#: find/parser.c:1992 #, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 -#, fuzzy, c-format msgid "invalid mode %s" -msgstr "malvalida reøimo `%s'" +msgstr "malvalida reĝimo %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" +"averto: vi indikis reĝiman ŝablonon %s (kiu ekvivalentas al /000). La " +"signifo de -perm /000 nun ŝanĝis por esti akorda al -perm -000; tio estas, " +"se antaÅ­e ĝi kongruis al neniu dosiero, nun ĝi kongruas al ĉiuj." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "malvalida senvalora argumento por -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "malvalida -size speco `%c'" +msgstr "malvalida tipo por -size: '%c'" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "malvalida argumento `%s'por `%s'" +msgstr "Malvalida argumento '%s%s' por -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" +"La modifilo -show-control-chars prenas unu solan argumenton kiu devas esti " +"'literal' aŭ 'safe'" -#: find/parser.c:2630 -#, fuzzy, c-format +#: find/parser.c:2566 +#, c-format msgid "Invalid argument %s to -used" -msgstr "malvalida argumento %s por %s" +msgstr "Malvalida argumento %s por -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" -msgstr "" +msgstr "%s ne estas la nomo de konata uzanto" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" -msgstr "" +msgstr "La argumento por -user ne devus esti vaka" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " -msgstr "" +msgstr "Trajtoj ebligataj: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "" +msgstr "malvalida predikato -context: SELinux ne estas ebligata." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" -msgstr "" +msgstr "Argumentoj por -type devus enhavi nur unu literon" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" +"-type %c ne estas subtenata ĉar simbolaj ligoj ne estas subtenataj en la " +"platormo kie find estis kompilata." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "averto: nerekonata eskapsigno `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c ne estas subtenata ĉar FIFO-j ne estas subtenataj en la platormo " +"kie find estis kompilata." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" +"-type %c ne estas subtenata ĉar nomitaj ingoj ne estas subtenataj en la " +"platormo kie find estis kompilata." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "averto: nerekonata formatdirektivo `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c ne estas subtenata ĉar pordoj de Solaris ne estas subtenataj en la " +"platormo kie find estis kompilata." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" +msgid "Unknown argument to -type: %c" +msgstr "Nekonata argumento por -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" +"La kuranta dosierujo estas inkluzivita en la medivariablo PATH, kio estas " +"malsekura kiam kombinite kun la ago %s de find. Bonvolu forigi la kurantan " +"dosierujon el via $PATH (tio estas, forigu \".\", duobligitajn dupunktojn, " +"aÅ­ antaÅ­irajn aÅ­ vostajn dupunktojn)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove that " "entry from $PATH" msgstr "" +"La relativa vojo %sestas inkluzivita en la medivariablo PATH, kio estas " +"malsekura kiam kombinite kun la ago %s de find. Bonvolu forigi tiun eron el " +"$PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" +"Vi ne povas uzi {} ene de la utileca nomo por -execdir kaj -okdir, ĉar tio " +"ĉi estas latenta sekureca problemo." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "" +msgstr "Nur unu apero de {} estas subtenata ene de -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "En %s la %s devas aperi per si mem, sed vi indikis %s" -#: find/parser.c:3435 -#, fuzzy, c-format +#: find/parser.c:3100 +#, c-format msgid "The environment is too large for exec()." -msgstr "medio estas tro granda por exec" +msgstr "La medio tro grandas por exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" -msgstr "" +msgstr "aritmetika troigo dum konverto de %s tagoj al nombro da sekundoj" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" -msgstr "" +msgstr "aritmetika troigo dum provo kalkuli la fino de hodiaÅ­" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" -msgstr "" +msgstr "ĉefa erareligujo" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "" +msgstr "ĉefeligujo" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "" +msgstr "ne eblas forigi %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "ne povas preni aktualan dosierujon" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "" +msgstr "AVERTO: ne eblas difini naskiĝ-horon de la dosiero %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Ni fiaskis skribi al la ĉefeligujo" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "" +msgid "getfilecon failed: %s" +msgstr "getfilecon fiaskis: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" +msgid "warning: escape `\\' followed by nothing at all" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "ne povas forki" +msgid "warning: unrecognized escape `\\%c'" +msgstr "averto: nerekonata eskapsigno `\\%c'" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "eraro atendante por %s" +msgid "error: %s at end of format string" +msgstr "eraro: %s ĉe fino de formig-ĉeno" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s æesigita per signalo %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "eraro: la formig-instrukcio '%%%c' estas rezervata por estonta uzo" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "averto: la formig-instrukcio '%%%c' devus esti sekvata de alia signo" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "averto: nerekonata formig-instrukcio '%%%c'" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "malvalida esprimo" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." -msgstr "" +msgstr "malvalida esprimo; vi uzis duuman operatoron '%s' sen io ajn antaŭ ĝi." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "" +msgstr "ni atendis esprimon inter '%s' kaj ')'" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" -msgstr "" +msgstr "ni atendis esprimon post '%s'" -#: find/tree.c:161 -#, fuzzy, c-format +#: find/tree.c:166 +#, c-format msgid "invalid expression; you have too many ')'" -msgstr "malvalida esprimo" +msgstr "malvalida esprimo; vi havas tro da ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" +"malvalida esprimo; ni atendis trovi ')' sed ni ne vidis iun ajn. Eble vi " +"bezonas kroman predikaton post '%s'" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." -msgstr "" +msgstr "malvalida esprimo; malplenaj krampoj ne estas permesataj." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." -msgstr "" +msgstr "malvalida esprimo; ni atendis trovi ')' ie sed ni vidis neniun." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" -msgstr "up -- malvalida esprimospeco!" +msgstr "hoho -- malvalida esprimo-tipo!" -#: find/tree.c:276 -#, fuzzy, c-format +#: find/tree.c:281 +#, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "up -- malvalida esprimospeco!" +msgstr "hoho -- malvalida esprimo-tipo (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"averto: estas neniu enigo en la kosto-tabelo de predikato-taksado por la " +"predikato %s; bonvolu raporti tion ĉi kiel program-mison" -#: find/tree.c:1288 -#, fuzzy, c-format +#: find/tree.c:1294 +#, c-format msgid "paths must precede expression: %s" -msgstr "padoj devas esti antaý ol esprimo" +msgstr "vojoj devas esti antaÅ­ ol esprimo: %s" -#: find/tree.c:1297 -#, fuzzy, c-format +#: find/tree.c:1303 +#, c-format msgid "unknown predicate `%s'" -msgstr "malvalida predikato `%s'" +msgstr "nekonata predikato '%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" -msgstr "malvalida predikato `%s'" +msgstr "malvalida predikato '%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" -msgstr "malvalida argumento `%s'por `%s'" +msgstr "malvalida argumento '%s' por '%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" -msgstr "mankas argumento por `%s'" +msgstr "mankas argumento por '%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "" +msgstr "vi havas tro da ')'" -#: find/tree.c:1412 -#, fuzzy, c-format +#: find/tree.c:1418 +#, c-format msgid "unexpected extra predicate '%s'" -msgstr "malvalida predikato `%s'" +msgstr "malvalida kroma predikato '%s'" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" -msgstr "" +msgstr "neatendita kroma predikato" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" -msgstr "up -- malvalida defaýlta enþovado de ``and'' (kaj)!" +msgstr "hoho -- malvalida apriora enmeto de 'and'!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " -msgstr "" +msgstr "Uzmaniero: %s [-H] [-L] [-P] [-Olevel] [-D " -#: find/util.c:173 -#, fuzzy, c-format +#: find/util.c:177 +#, c-format msgid "] [path...] [expression]\n" -msgstr "Uzado: %s [pado...] [esprimo]\n" +msgstr "] [vojo...] [esprimo]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "ne povas preni aktualan dosierujon" +msgstr "ni fiaskis konservi komencan kurantan dosierujon" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "ne povas preni aktualan dosierujon" +msgstr "ni fiaskis restarigi komencan kurantan dosierujon" -#: find/util.c:816 -#, fuzzy, c-format +#: find/util.c:824 +#, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "averto: nerekonata eskapsigno `\\%c'" +msgstr "Ni preteratentas nerekonatan rafinigan flagon %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." -msgstr "" +msgstr "Vaka argumento por la modifilo -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "" +msgstr "La modifilo -O devas estis tuj sekvata de dekuma entjero" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" -msgstr "" +msgstr "Bonvolu indiki dekuman numeron tuj post -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" -msgstr "" +msgstr "Malvalida optimumiga nivelo %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" +"Optimumiga nivelo %lu tro altas. Se vi volas trovi dosierojn tre rapile, " +"konsideru aplikon de GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" +"La medi-variablo FIND_BLOCK_SIZE ne estas subtenata, la nura afero kiu " +"influas la blok-grandon estas la medi-variablo POSIXLY_CORRECT" + +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "malvalida argumento '%s' por '%s'" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "plursenca argumento %s por %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Validaj argumentoj estas:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" -#: lib/buildcmd.c:171 +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 #, c-format -msgid "command too long" -msgstr "ordono tro longa" +msgid "write error" +msgstr "skrib-eraro" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Nekonata sistemeraro" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: opcio `%s' estas plursenca\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: opcio `--%s' ne permesas argumenton\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: opcio `%c%s' ne permesas argumenton\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: opcio postulas argumenton -- %c\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: nerekonata opcio `--%s'\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: nerekonata opcio `%c%s'\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: malvalida opcio -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: opcio postulas argumenton -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: opcio `-W %s' estas plursenca\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: opcio `-W %s' malpermesas argumenton\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: opcio postulas argumenton -- %c\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "ni fiaskis restarigi komencan kurantan dosierujon" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "ni fiaskis restarigi komencan kurantan dosierujon" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[jJ]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" -#: lib/buildcmd.c:311 +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 #, c-format -msgid "can't call exec() due to argument size restrictions" +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" msgstr "" -#: lib/buildcmd.c:381 +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "memoro elĉerpita" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "malvalida argumento '%s' por '%s'" + +#: gl/lib/xstrtol-error.c:68 #, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "malvalida argumento '%s' por '%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "argumentlisto tro longas" + +#: lib/buildcmd.c:161 +#, c-format +msgid "command too long" +msgstr "tro longa komando" + +#: lib/buildcmd.c:301 +#, c-format +msgid "can't call exec() due to argument size restrictions" +msgstr "ne eblas voki exec() pro limojn en argument-grando" + +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" -msgstr "argumentlista grandecolimo estas tro malgranda por eæ sola argumento" +msgstr "ne eblas alĝustigi unusolan argumenton en argumentlista grandec-limo" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" -msgstr "argumentlisto tro longa" +msgstr "argumentlisto tro longas" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" +msgstr "Medi-variablo %s ne estas difinita kiel validan dekuman numeron" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." msgstr "" +"Dosier-priskribilo %d likos; bonvolu raporti tion kiel program-mison, " +"memorante inkluzivigi detalan priskribon de la plej simpla maniero " +"reprodukti la problemon." -#: lib/findutils-version.c:60 +#: lib/findutils-version.c:55 msgid "Eric B. Decker" -msgstr "" +msgstr "Eric B. DECKER" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" -msgstr "" +msgstr "James YOUNGMAN" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" -msgstr "" +msgstr "Kevin DALLEY" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU find versio %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "Ni fiaskis skribi al la ĉefeligujo" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Nekonata regul-esprima tipo %s; validaj tipoj estas %s." + +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" -msgstr "" +msgstr "Neatendita sufikso %s en %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" -msgstr "" +msgstr "Ni atendis entjeron: %s" -#: lib/regextype.c:107 +#: locate/code.c:131 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 -#, fuzzy, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" -msgstr "Uzado: %s plej_oftaj_dusigna¼oj < listo > kodita_listo\n" +msgstr "" +"Uzmaniero: %s [--version | --help]\n" +"aÅ­ %s plej_oftaj_dusignaĵoj < dosier-listo > locate-datumbazo\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 -#, fuzzy +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" "\n" -"Raportu cimoj al (bonvolu angle)." - -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" +"Raportu program-misojn al .\n" -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" -msgstr "" +msgstr "Uzmaniero: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." -msgstr "" +msgstr "Vi bezonas indiki sekurecan nivelon kiel dekuman entjeron." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." -msgstr "" +msgstr "Sekureca nivelo %s estas for de konvertebla intervalo." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." -msgstr "" +msgstr "Sekureca nivelo %s havas neatenditan sufikson %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." -msgstr "" +msgstr "Sekureca nivelo %ld de slocate ne estas subtenata." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" -msgstr "" +msgstr "Ni fiaskis skribi al la ĉefeligujo" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "tagoj" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "" +msgstr "La argumento por la modifilo --max-database-age ne devas esti vaka" -#: locate/locate.c:209 locate/locate.c:216 -#, fuzzy, c-format +#: locate/locate.c:202 locate/locate.c:209 +#, c-format msgid "Invalid argument %s for option --max-database-age" -msgstr "malvalida argumento %s por %s" +msgstr "Malvalida argumento %s por la modifilo --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" +"locate-datumbazo %s enhavas dosiernomon pli longa ol kion locate povas trakti" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" -msgstr "" +msgstr "locate-datumbazo %s fuŝas aÅ­ malvalidas" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Locate-datumbaza grando: %s bajto\n" +msgstr[1] "Locate-datumbaza grando: %s bajtoj\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" -msgstr "" +msgstr "Kongruantaj dosiernomoj: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" -msgstr "" +msgstr "Ĉiuj dosiernomoj: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -825,81 +1271,98 @@ msgid "" "\t%s contain newline characters, \n" "\tand %s contain characters with the high bit set.\n" msgstr "" +"Dosiernomoj havas akumulan kvanton da %s bajtoj.\n" +"El tiuj dosiernomoj,\n" +"\n" +"\t%s enhavas blankspacon, \n" +"\t%s enhavas novliniajn signojn, \n" +"\tkaj %s enhavas signojn kun la plej alta bito ŝaltita.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" +"Kelkaj dosiernomoj ebles estas forfiltritaj, do ni ne povas kalkuli la " +"densigan frakcion.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" -msgstr "" +msgstr "Densiga frakcio %4.2f%% (ju pli alte des pli bone)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" -msgstr "" +msgstr "Densiga frakcio estas nedifinita\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" +"locate-damumbazo %s ŝajnas slocate-datumbazo sed ĝi ŝajnas havi sekurecan " +"nivelon %c, kiun GNU findutils ne subtenas nune" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" +"%s estas datumbazo de slocate. Subteno por tiuj estas nova, atendu " +"problemojn dumtempe." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" +"%s estas datumbazo de slocate kun nesubtenata sekureca nivelo %d; ni " +"preterpasas ĝin." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" +"Vi indikis la modifilon -E, sed tiu modifilo ne povs esti uzata kun " +"datumbazoj laŭ formo de slocate kaj ne-nula sekureca nivelo. Neniu rezultoj " +"estos generataj por tiu ĉi datumbazo.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "" +msgstr "%s estas datumbazo de slocate. Ni aktivigas la modifilon '-e'." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" -msgstr "" +msgstr "Malnov-forma locate-datumbazo %s estas tro malgranda por esti valida" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" -msgstr "" +msgstr "Datubmazo %s estas laŭ la formo %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" -msgstr "" +msgstr "La datumbazo havas pezfinan bajtordan enkodigon.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" -msgstr "" +msgstr "La datumbazo havas pezkomencan bajtordan enkodigon.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" -msgstr "" +msgstr "La bajtorda enkodigo de la datumbazo ne estas klara.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -910,139 +1373,173 @@ msgid "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" msgstr "" +"Uzmaniero: %s [-d vojo | --database=vojo] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n" +" [-A | --all] [-p | --print] [-r | --regex] [--regextype=TIPO]\n" +" [--max-database-age D] [--version] [--help]\n" +" ŝablono...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" -msgstr "" +msgstr "ni fiaskis forĵeti grup-privilegiojn" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "" +msgstr "ni fiaskis forĵeti setuid-privilegiojn" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" -msgstr "" +msgstr "Ni fiaskis tute forĵeti privilegiojn" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "" +msgstr "ni fiaskis forĵeti setgid-privilegiojn" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" +"averto: la locate-datumbazo nur povas esti legata el ĉefenigujo unu foje." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "" +msgstr "alvoko de temp-sistemo fiaskis" -#: locate/locate.c:1856 -#, fuzzy, c-format +#: locate/locate.c:1844 +#, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" -msgstr "averto: datumbazo `%s'estas pli aøa ol %d %s" +msgstr "averto: datumbazo %s pli aĝas ol %d %s (vera aĝo estas %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" -msgstr "" +msgstr "AVERTO: locate-datumbazo %s estis konstruata per malsama bajtordo" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" -msgstr "" +msgstr "neatendita EOF en %s" -#: locate/word_io.c:146 -#, fuzzy, c-format +#: locate/word_io.c:148 +#, c-format msgid "error reading a word from %s" -msgstr "eraro atendante por %s" +msgstr "eraro legante vorton el %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." -msgstr "" +msgstr "Malvalida eskap-sekvo %s en indiko de enig-apartigilo." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" +"Malvalida eskap-sekvo %s en indiko de enig-apartigilo; signaj valoroj ne " +"povas troigi %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" +"Malvalida eskap-sekvo %s en indiko de enig-apartigilo; signaj valoroj ne " +"povas troigi %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" +"Malvalida eskap-sekvo %s en indiko de enig-apartigilo; vostaj signoj %s ne " +"estis rekonataj." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" +"Malvalida eskap-sekvo %s en indiko de enig-apartigilo: la apartigilo devas " +"esti aÅ­ unuopa signo aŭ eskap-sekvo komencanta per \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "medio estas tro granda por exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" +"averto: valoro %ld por la modifilo -s tro grandas, ni uzas %ld anstataÅ­e" + +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "la modifilo --%s ne povas esti difinata al valoro kiu inkluzivigas '='" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "ni fiaskis maldifini la medi-variablon %s" -#: xargs/xargs.c:629 +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "averto: la modifilo -E influas nenior se -0 aÅ­ -d estas uzataj.\n" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Ne eblas difini signal-traktilon SIGUSR1" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Ne eblas difini signal-traktilon SIGUSR2" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "" +msgstr "Ne eblas malfermi enig-dosieron %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" -msgstr "" +msgstr "Viaj medi-variabloj uzas ĝis % bajtoj\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" -msgstr "" +msgstr "Supra limo de POSIX pri argument-longo (tiu ĉi sistemo): %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" +"Plej eta permesebla supra limo de POSIX pri argumet-longo (ĉiuj sistemoj): " +"%\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "" +msgstr "Maksimuma longo de komando kiun ni povas fakte uzi: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "" +msgstr "Grando de komand-bufro kiun ni fakte uzas: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1050,194 +1547,334 @@ msgid "" "run commands; if this is not what you wanted to happen, please type the end-" "of-file keystroke.\n" msgstr "" +"\n" +"Funkciado de xargs daÅ­rigos nun, kaj ĝi provos legi ĝiajn enigan kaj lanĉan " +"komandojn; se tio ĉi ne estas kion vi volis ke okazu, bonvolu tajpi la " +"dosier-finan klavkomandon.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" +"Averto: %s estos lanĉata minimume unu foje. Se vi ne volas ke tio okazu, " +"premu la interrompan klavkomandon.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" +"nekongruaj citiloj %s; apriore citiloj estas specialaj por xargs krom se vi " +"uzas la modifilon -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "duobla" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "unuobla" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" +"AVERTO: signo NUL okazis en la enigo. Ĝi ne povas esti pasata per la " +"argument-listo. Ĉu vi ne volis uzi la modifilon --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" -msgstr "argumentlinio tro longa" +msgstr "argumentlinio tro longas" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Ni fiaskis skribi al la ĉefeligujo" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "" +msgstr "ni fiaskis malfermi /dev/tty por legi" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Ni fiaskis skribi al la ĉefeligujo" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "ne eblas rezervi memoron" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "ni fiaskis difini la medi-variablon %s" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" -msgstr "" +msgstr "ne eblis krei dukton antaÅ­ ol forki" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" +"errno-buffer safe_read fiaskis en xargs_do_exec (tio ĉi probable estat " +"program-miso, bonvolu raporti ĝin)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" +"read liveris neatenditan valoron %d; tio ĉi probable estas program-miso, " +"bonvolu raporti ĝin" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" -msgstr "eraro atendante ida proceso" +msgstr "eraro dum atenddo de ida procezo" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "" +msgid "WARNING: Lost track of %lu child processes" +msgstr "AVERTO: ni perdis la ŝpurojn de %lu idaj procezoj" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" -msgstr "%s: finis kun stato 255; æesanta" +msgstr "%s: finis kun stato 255; ni ĉesas" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" -msgstr "%s: haltigita per signalo %d" +msgstr "%s: haltigita de signalo %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" -msgstr "%s: æesigita per signalo %d" +msgstr "%s: ĉesigita de signalo %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" -msgstr "%s: malvalida nombro por -%c opcio\n" +msgstr "%s: malvalida numero por la modifilo -%c\n" -#: xargs/xargs.c:1476 -#, fuzzy, c-format +#: xargs/xargs.c:1584 +#, c-format msgid "%s: value for -%c option should be >= %ld\n" -msgstr "%s: valoro de -%c opcio devas esti >= %ld\n" +msgstr "%s: valoro por la modifilo -%c devas esti >= %ld\n" -#: xargs/xargs.c:1490 -#, fuzzy, c-format +#: xargs/xargs.c:1598 +#, c-format msgid "%s: value for -%c option should be < %ld\n" -msgstr "%s: valoro de -%c opcio devas esti < %ld\n" +msgstr "%s: valoro por la modifilo -%c devas esti < %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Uzmaniero: %s [MODIFILO]... KOMANDO [EK-ARGUMENTOJ]...\n" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Uzado: %s [-0prtx] [-e[dosierfina-æeno]] [-i[anstataýa-æeno]]\n" -" [-l[maksimumo-da-linioj]] [-n maksimumo-da-argumentoj]\n" -" [-s maksimumo-da-signoj] [-P maksimumo-da-procesoj] [--null]\n" -" [--eof[=dosierfina-æeno]] [--replace[=anstataýa-æeno]]\n" -" [--max-lines[=maksimumo-da-linioj]] [--interactive]\n" -" [--max-chars=maksimumo-da-signoj] [--verbose] [--exit]\n" -" [--max-procs=maksimumo-da-procesoj] [--max-args=maksimumo-da-" -"argumentoj]\n" -" [--no-run-if-empty] [--version] [--help] [ordono [komencaj-" -"argumentoj]]\n" - -#~ msgid "cannot get current directory" -#~ msgstr "ne povas preni aktualan dosierujon" - -#~ msgid "invalid argument %s for %s" -#~ msgstr "malvalida argumento %s por %s" - -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "plursenca argumento %s por %s" - -#~ msgid "Valid arguments are:" -#~ msgstr "Validaj argumentoj estas:" - -#~ msgid "Unknown system error" -#~ msgstr "Nekonata sistemeraro" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Lanĉi KOMANDOn kun argumentoj EK-ARGUMENTOJ kaj pli da argumentoj legataj el " +"la enigilo.\n" +"\n" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: opcio `%s' estas plursenca\n" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Nepraj kaj malnepraj argumentoj por longaj modifiloj ankaÅ­\n" +"estas nepraj kaj malnepraj por la koresponda mallonga modifilo.\n" +#: xargs/xargs.c:1626 #, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: opcio `--%s' ne permesas argumenton\n" +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null eroj estas apartitaj de nulo, ne blankspaco;\n" +" malebligas citilojn kaj procezado de " +"retroklino kaj\n" +" procezado de logika EOF.\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=DOSIERO legi argumentoj el DOSIERO, ne el la " +"ĉefenigujo\n" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=SIGNO eroj en la enig-fluo estas apartitaj de " +"SIGNO,\n" +" ne de blankspaco; malebligas citilojn kaj " +"procezado\n" +" de retroklino kaj procezado de logika EOF\n" + +#: xargs/xargs.c:1633 #, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: opcio `%c%s' ne permesas argumenton\n" +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E FINO Difini ĉenon por logika EOF; se FINO aperas " +"kiel\n" +" enig-linion, la resto de la enigo estas " +"preter-\n" +" atentata (ne efikas se -0 aÅ­ -d estis " +"indikataj)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=FINO] egalas al -E FINO se FINO estas indikita;\n" +" se ne, signifas neniu ĉeno por dosier-fino\n" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: opcio `%s' postulas argumenton\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R same ol --replace=R\n" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: nerekonata opcio `--%s'\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] anstataÅ­igi R en EK-ARGUMENTOJ per nomoj " +"legataj\n" +" el la cefenigujo; se R ne estas indikita,\n" +" konsideri {}\n" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: nerekonata opcio `%c%s'\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=MAKS-LINIOJ uzi maksimume MAKS-LINIOJ ne-blankajn enig-" +"liniojn\n" +" por komand-linio\n" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: malvalida opcio -- %c\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[MAKS-LINIOJ] simile al -L sed aprioras kiel maksimume unu " +"ne-\n" +" blanka enig-linio se MAKS-LINIOJ ne estas " +"indikita.\n" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: opcio postulas argumenton -- %c\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=MAKS-ARG uzi maksimume MAKS-ARG argumentoj por komand-" +"linio\n" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: opcio `-W %s' estas plursenca\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=MAKS-PROC lanĉi maksimume MAKS-PROC procezojn dum " +"momento\n" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: opcio `-W %s' malpermesas argumenton\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" +" -p, --interactive komand-inviti antaÅ­ ol lanĉi komandojn\n" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=VAR difini la medi-variablon VAR en idaj " +"procezoj\n" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty se estas neniu argumento, do ne lanĉi " +"KOMANDOn;\n" +" se tiu ĉi modifilo ne estas indikita, " +"KOMANDO estos\n" +" lanĉata minimume unu foje\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=MAKS-SIGNOJ limigi longon de komand-linio al MAKS-SIGNOJ\n" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr " --show-limits montri limigon de komand-linia longo\n" -#~ msgid "`" -#~ msgstr "`" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr " -t, --verbose montri komandoj antaŭ ol lanĉi ilin\n" -#~ msgid "'" -#~ msgstr "'" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr " -x, --exit eliri se la grando (vidu -s) troigas\n" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help montri ĉi tiun helpon kaj eliri\n" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version montri informon pri versio kaj eliri\n" + +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: malpermesata opcio -- %c\n" + +#~ msgid "block size" +#~ msgstr "blokgrandeco" #~ msgid "Success" #~ msgstr "Sukceso" #~ msgid "No match" -#~ msgstr "Neniu kongrua¼o" +#~ msgstr "Neniu kongruaĵo" #~ msgid "Invalid regular expression" #~ msgstr "Malvalida regula esprimo" @@ -1255,25 +1892,25 @@ msgstr "" #~ msgstr "Malvalida retroreferenco" #~ msgid "Unmatched [ or [^" -#~ msgstr "Senpara [ aý [^" +#~ msgstr "Senpara [ aÅ­ [^" #~ msgid "Unmatched ( or \\(" -#~ msgstr "Senpara ( aý \\(" +#~ msgstr "Senpara ( aÅ­ \\(" #~ msgid "Unmatched \\{" #~ msgstr "Senpara \\{" #~ msgid "Invalid content of \\{\\}" -#~ msgstr "Malvalida enhava¼o de \\{\\}" +#~ msgstr "Malvalida enhavaĵo de \\{\\}" #~ msgid "Invalid range end" #~ msgstr "Malvalida intervalofino" #~ msgid "Memory exhausted" -#~ msgstr "Memoro elæerpita" +#~ msgstr "Memoro elĉerpita" #~ msgid "Invalid preceding regular expression" -#~ msgstr "Malvalida antaýa regulesprimo" +#~ msgstr "Malvalida antaÅ­a regulesprimo" #~ msgid "Premature end of regular expression" #~ msgstr "Tro frua fino de regulesprimo" @@ -1282,37 +1919,10 @@ msgstr "" #~ msgstr "Regulesprimo tro granda" #~ msgid "Unmatched ) or \\)" -#~ msgstr "Senpara ) aý \\)" +#~ msgstr "Senpara ) aÅ­ \\)" #~ msgid "No previous regular expression" -#~ msgstr "Neniu antaýa regulesprimo" - -#~ msgid "^[yY]" -#~ msgstr "^[jJ]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "memoro elæerpita" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "malvalida argumento `%s'por `%s'" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "malvalida argumento `%s'por `%s'" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "argumentlisto tro longa" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: malpermesata opcio -- %c\n" - -#~ msgid "block size" -#~ msgstr "blokgrandeco" +#~ msgstr "Neniu antaÅ­a regulesprimo" #~ msgid "Predicate List:\n" #~ msgstr "Predikatolisto:\n" @@ -1323,17 +1933,8 @@ msgstr "" #~ msgid "Optimized Eval Tree:\n" #~ msgstr "Optimumigita Arbo de Elvalorado:\n" -#~ msgid "%s changed during execution of %s" -#~ msgstr "%s þanøis dum plumumado de %s" - #~ msgid "virtual memory exhausted" -#~ msgstr "virtuala memoro elæerpita" - -#~ msgid "%s/.. changed during execution of %s" -#~ msgstr "%s/.. þanøis dum plumumado de %s" - -#~ msgid "error in %s: %s" -#~ msgstr "eraro en %s: %s" +#~ msgstr "virtuala memoro elĉerpita" #~ msgid "" #~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" @@ -1342,9 +1943,9 @@ msgstr "" #~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" #~ msgstr "" #~ " ESPR1 -o ESPR2 ESPR1 -or ESPR2 ESPR1 , ESPR2\n" -#~ "opcioj (æiam vera): -daystart -depth -follow --help\n" +#~ "opcioj (ĉiam vera): -daystart -depth -follow --help\n" #~ " -maxdepth NIVELOJ -mindepth NIVELOJ -mount -noleaf --version -xdev\n" -#~ "provoj (N povas esti +N aý -N aý N): -amin N -anewer DOSIERO -atime N -" +#~ "provoj (N povas esti +N aÅ­ -N aÅ­ N): -amin N -anewer DOSIERO -atime N -" #~ "cmin N\n" #~ msgid "" @@ -1355,8 +1956,11 @@ msgstr "" #~ "FORMATO\n" #~ " -ok ORDONO ; -print -print0 -printf FORMATO -prune -ls\n" +#~ msgid "GNU find version %s\n" +#~ msgstr "GNU find versio %s\n" + #~ msgid "inserting %s\n" -#~ msgstr "enþovas %s\n" +#~ msgstr "enŝovas %s\n" #~ msgid " type: %s %s " #~ msgstr " speco: %s %s " @@ -1375,7 +1979,7 @@ msgstr "" #~ " [-i | --ignore-case] [--version] [--help] pattern...\n" #~ msgstr "" #~ "Uzado: %s [-d pado | --database=pado] [-e | --existing]\n" -#~ " [-i | --ignore-case] [--version] [--help] þablono...\n" +#~ " [-i | --ignore-case] [--version] [--help] ŝablono...\n" #~ msgid "GNU locate version %s\n" #~ msgstr "GNU locate versio %s\n" diff --git a/po/es.gmo b/po/es.gmo index a80ea458ade31f117949f19c38d93b21cd77ece4..7353850d941527d2c0995cede98a0759a5848e3b 100644 GIT binary patch delta 1334 zcmZA0T}YEr7{Kvo?jtpwAIoy7?VV|AHghIff&~q`NQoj!L?%t0HgbDw^Ycm~FoHfY zp{|08F6wd@LS00cQBX)w6a*4NNI@6fL?Qj3cT=GQufKE7JI{HZ=bU%3?o#8-mr}>P z(Dw3F^4zhBgs{NQA6mIXqyfFS9Ya`y{aB5cu^b;`1-?N2{b$^bPNxVXD@- zggw}W7x5uhv%i$(iv;ihF5@u9Nwu4FbpBaECgX3old-c}x}C$SxG;Sqd| zEF*4rrXt1ofw3R2;cuMLf1E86nZQS=XIMe~wDfIRJ5U!2p_aZAHIRXJizP)FblZK5WHZcn*)@ zP1MqVLjBzm>YezDam@9IT)_zp;;M)G>q5=kh)Pl%Ld{g02Bu8|)2e7@Bw#hoZmnqm z+B9(Xu`XGYPGp-_=KmI8!r*bSzvS=`kkvF>Ev=p}$8D9HQ?V`_MG&rr^{Il@G&?OZ zM`?X-db9PiHt=x2ge$P#y!2{$v@-hX>ZSB@S*=?Q)*0z%ucelBuia;})uksLVVfs$ zK4DHKjMQ{$EE+eW$)uT_TXcpGpNWjdhKxvZWIP^CjHT#B+oiuRaXif5>E5uMl}LOb zHZpFG>&wi~jM|hjY$jo@$@MXBeU$#?x@#|N4K%j}f(MOYu)U=%eJ{T&$M!t^wP4a# z)v4PWL(x$q71KB(^izXo!W@hZnRC7FsiWQI#x8UxmWU2hW@00%)TyvMm9GD7{~Ev-PN_sb$9KLTbjH6+iY9fHC9wYC`iJPAcQat(}Q5(p+lx!77v+{ zhhph0Qi%6KqC*h`b%+k-!9yew*(K<TU4^AV`*j;3^BD)kW;z8WNW_*E1@G~}H8RJ+VHam_TsCh1+ zK6nf}ncr@6kmSNDcH=ALS^I_R_&2gyqT1{#rtlWdqZ0UmS&Zy6+r_guLy9f?{p%0u zM#;X!R{Vr%{DVp6xAX!3i!Wjy=Tmqd*H8(3!)+|%3cjy3o5gDp|Aim+EMptj6Ln^X zupgD&FcPwj;0YW@CA5S^MYqm@e1jSMj*2eM?5D6D73~#NA~*32-op-jj)V9Gm0Tv~ z-`9mSX+t=JBX}R*VjeHY$zLy8V75jg+eC0((5(BRz)h~TQy2Qs6hjfVGyX5$>;4IS zq}H5&(iJP>O8>N$QpKuK<9?@#E5TsN+#0DXQg)>XlMK@RS2XI@UhAqTRq9k#&rk}4 zXboO0)Ew}-D#rq)Csm`R{_wV!t6mJ&=Cip%HlI)Cdix4J-s_r66<#zl8z?=kyW>qp Kd1N*AHTV}a^Hkjc diff --git a/po/es.po b/po/es.po index 8c422e8..dfc9507 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: GNU findutils 4.2.6\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2004-12-23 16:57+0100\n" "Last-Translator: Santiago Vila Doncel \n" "Language-Team: Spanish \n" @@ -16,32 +16,109 @@ msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8-bit\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "no se puede volver al directorio de partida" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "" + +#: find/exec.c:285 +#, fuzzy, c-format +msgid "Failed to change directory" +msgstr "no se puede volver al directorio de partida" + +# FIXME: ¿¿¿??? ¡¡¿¿Y cómo leches traduzco yo esto??!! IPG +# Después de que me hayan llamado de todo por intentar traducir +# una llamada al sistema ;) sigo pensando que este mensaje es +# más claro e informativo que el original (de hecho, es un +# pelín más largo y no exige saber tanto UNIX ...) IPG +# +# Esto me parece muy muy muy largo. +# Sugerencia: "No se puede ejecutar fork". sv +# E insisto: Si no eres experto en programación Unix lo mismo te da +# "duplicar un proceso" que "fork". +# De hecho, yo todavía no sé lo que es (ninguna de las dos cosas). sv +# +# ¡¡Otia!! Eso es grave ... fork() es la llamada al sistema que se usa +# para duplicar un programa en dos idénticos, pero con distinto PID. +# Una vez que vuelve, en el padre devuelve el PID del hijo, y en el +# hijo, cero. El hijo entonces lo detecta y una de dos, o sigue, o +# ejecuta otro programa con exec() (que solapa todo el espacio del +# proceso con el del nuevo programa). Prefiero dejar la explicación +# larga, en beneficio de gente como tú :) ipg +# +# Vale, pues ahora te digo: +# +# 1. Nada de lo anterior es evidente con la simple vista de +# la frase "se duplica el proceso". +# 2. Ahora que ya me lo has explicado, lo mismo me da que me pongas +# exclusivamente lo de fork() a que me pongas la larga parrafada que +# tienes en este momento. sv +# +# ¿Ves por qué no me acaba de gustar? sv +# +# Nota: Jim Meyering tenía en fileutils un mensaje parecido a este, que al +# final conseguimos (Ulises y yo) que lo cambiara por +# msgid "fork system call failed" +# que yo traduje así: +# msgstr "falló la llamada al sistema `fork'" +# ¿Qué te parece? +# +# Al fin y al cabo es la coletilla que tengo yo al final de mi +# comentario, ¿no? Me parece lo mismo, má o meno, pero por no meternos +# en darle caña y acabar ya esto de una vez :) ... +#: find/exec.c:312 xargs/xargs.c:1229 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "cannot fork" +msgstr "falló la llamada al sistema `fork()'" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "error esperando al proceso %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminado por la señal %d" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" msgstr "" +"la comprobación de adecuación de la función de biblioteca fnmatch() falló." -#: find/find.c:205 +#: find/find.c:263 #, fuzzy, c-format msgid "cannot stat current directory" msgstr "no se puede obtener el directorio actual" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "El sistema de ficheros %s ha sido desmontado recientemente." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "El sistema de ficheros %s ha sido montado recientemente." -#: find/find.c:491 +#: find/find.c:550 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -52,7 +129,7 @@ msgstr "" "número de dispositivo nuevo %ld, el tipo de sistema de ficheros es %s [ref " "%ld]" -#: find/find.c:528 +#: find/find.c:587 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -61,24 +138,24 @@ msgstr "" "%s%s ha cambiado durante la ejecución de %s (número de nodo-i antiguo %ld,\n" "número de nodo-i nuevo %ld, tipo de sistema de ficheros %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "no se puede volver al directorio de partida" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -89,12 +166,12 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -104,12 +181,12 @@ msgid "" "searched." msgstr "" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "desconocido" @@ -119,7 +196,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -129,12 +206,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "no se puede volver al directorio de partida" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -142,7 +224,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -155,7 +237,7 @@ msgstr "" "las evaluaciones especificadas antes de él como a las especificadas\n" "después). Por favor especifique las opciones antes de otros argumentos.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -164,19 +246,19 @@ msgstr "" "atención: la opción -d está obsoleta; por favor utilice -depth en su lugar,\n" "ya que se trata de una característica que cumple con POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" @@ -205,7 +287,7 @@ msgstr "" # o mejor "si no se da ninguno". sv # # Lo dejo así. ipg -#: find/parser.c:1227 +#: find/parser.c:1222 #, fuzzy msgid "" "\n" @@ -242,7 +324,7 @@ msgstr "" # o mejor "si no se da ninguno". sv # # Lo dejo así. ipg -#: find/parser.c:1230 +#: find/parser.c:1225 #, fuzzy msgid "" "operators (decreasing precedence; -and is implicit where no others are " @@ -256,7 +338,7 @@ msgstr "" "operadores (prioridad decreciente; se supone -and si no se dan):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2" -#: find/parser.c:1234 +#: find/parser.c:1229 #, fuzzy msgid "" "positional options (always true): -daystart -follow -regextype\n" @@ -285,7 +367,7 @@ msgstr "" # # También me han sugerido `patrón', pero prefiero EXPR-REG. IPG # -#: find/parser.c:1239 +#: find/parser.c:1234 #, fuzzy msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" @@ -299,10 +381,10 @@ msgstr "" " -iwholename EXPR-REG -iregex EXPR-REG -links N -lname EXPR-REG\n" " -mmin N -mtime N -name EXPR-REG -newer FICHERO" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -311,11 +393,11 @@ msgstr "" " -wholename EXPR-REG -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NOMBRE -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -324,7 +406,7 @@ msgid "" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -334,13 +416,13 @@ msgstr "" "página de comunicación de bichos en http://savannah.gnu.org/ o bien, si no\n" "tiene acceso a web, enviando un mensaje a ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "" "la comprobación de adecuación de la función de biblioteca fnmatch() falló." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -350,47 +432,42 @@ msgid "" "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: la opción `%s' necesita un argumento\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, fuzzy, c-format msgid "invalid mode %s" msgstr "modo inválido `%s'" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -408,92 +485,100 @@ msgstr "" # # find . -size "" # -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "argumento nulo inválido para la opción -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "tipo dado a -size inválido `%c'" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "argumento `%s' inválido para la opción `%s'" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "argumento %s inválido para %s" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "atención: secuencia de escape `\\%c' no reconocida" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "atención: directiva de formato `%%%c' no reconocida" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -501,176 +586,142 @@ msgid "" "entry from $PATH" msgstr "" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, fuzzy, c-format msgid "The environment is too large for exec()." msgstr "el entorno es demasiado grande para exec" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "no se puede volver al directorio de partida" +#: find/pred.c:718 +#, c-format +msgid "WARNING: cannot determine birth time of file %s" +msgstr "" -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:782 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:784 +#, c-format +msgid "Failed to write prompt for -ok" +msgstr "" + +#: find/pred.c:1208 find/print.c:1234 #, c-format msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:1507 +#: find/print.c:346 #, c-format -msgid "WARNING: cannot determine birth time of file %s" +msgid "warning: escape `\\' followed by nothing at all" msgstr "" -#: find/pred.c:1571 +#: find/print.c:365 #, c-format -msgid "< %s ... %s > ? " -msgstr "< %s ... %s > ? " +msgid "warning: unrecognized escape `\\%c'" +msgstr "atención: secuencia de escape `\\%c' no reconocida" -#: find/pred.c:2032 +#: find/print.c:385 #, c-format -msgid "Cannot close standard input" +msgid "error: %s at end of format string" msgstr "" -#: find/pred.c:2061 -#, fuzzy, c-format -msgid "Failed to change directory" -msgstr "no se puede volver al directorio de partida" - -# FIXME: ¿¿¿??? ¡¡¿¿Y cómo leches traduzco yo esto??!! IPG -# Después de que me hayan llamado de todo por intentar traducir -# una llamada al sistema ;) sigo pensando que este mensaje es -# más claro e informativo que el original (de hecho, es un -# pelín más largo y no exige saber tanto UNIX ...) IPG -# -# Esto me parece muy muy muy largo. -# Sugerencia: "No se puede ejecutar fork". sv -# E insisto: Si no eres experto en programación Unix lo mismo te da -# "duplicar un proceso" que "fork". -# De hecho, yo todavía no sé lo que es (ninguna de las dos cosas). sv -# -# ¡¡Otia!! Eso es grave ... fork() es la llamada al sistema que se usa -# para duplicar un programa en dos idénticos, pero con distinto PID. -# Una vez que vuelve, en el padre devuelve el PID del hijo, y en el -# hijo, cero. El hijo entonces lo detecta y una de dos, o sigue, o -# ejecuta otro programa con exec() (que solapa todo el espacio del -# proceso con el del nuevo programa). Prefiero dejar la explicación -# larga, en beneficio de gente como tú :) ipg -# -# Vale, pues ahora te digo: -# -# 1. Nada de lo anterior es evidente con la simple vista de -# la frase "se duplica el proceso". -# 2. Ahora que ya me lo has explicado, lo mismo me da que me pongas -# exclusivamente lo de fork() a que me pongas la larga parrafada que -# tienes en este momento. sv -# -# ¿Ves por qué no me acaba de gustar? sv -# -# Nota: Jim Meyering tenía en fileutils un mensaje parecido a este, que al -# final conseguimos (Ulises y yo) que lo cambiara por -# msgid "fork system call failed" -# que yo traduje así: -# msgstr "falló la llamada al sistema `fork'" -# ¿Qué te parece? -# -# Al fin y al cabo es la coletilla que tengo yo al final de mi -# comentario, ¿no? Me parece lo mismo, má o meno, pero por no meternos -# en darle caña y acabar ya esto de una vez :) ... -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:409 #, c-format -msgid "cannot fork" -msgstr "falló la llamada al sistema `fork()'" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" -#: find/pred.c:2123 +#: find/print.c:417 #, c-format -msgid "error waiting for %s" -msgstr "error esperando al proceso %s" +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" -#: find/pred.c:2132 +#: find/print.c:425 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s terminado por la señal %d" +msgid "warning: unrecognized format directive `%%%c'" +msgstr "atención: directiva de formato `%%%c' no reconocida" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "expresión inválida" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, fuzzy, c-format msgid "expected an expression after '%s'" msgstr "predicado extra inesperado" -#: find/tree.c:161 +#: find/tree.c:166 #, fuzzy, c-format msgid "invalid expression; you have too many ')'" msgstr "expresión inválida" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -711,7 +762,7 @@ msgstr "" # (Donde menos me pegan es en el "oh, oh", parece cosa de Papá Noel...). sv # # Será por las fechas ... ;) ok, claudico. ipg -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "oh, oh -- ¡tipo de expresión inválido!" @@ -750,59 +801,59 @@ msgstr "oh, oh -- # (Donde menos me pegan es en el "oh, oh", parece cosa de Papá Noel...). sv # # Será por las fechas ... ;) ok, claudico. ipg -#: find/tree.c:276 +#: find/tree.c:281 #, fuzzy, c-format msgid "oops -- invalid expression type (%d)!" msgstr "oh, oh -- ¡tipo de expresión inválido!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, fuzzy, c-format msgid "paths must precede expression: %s" msgstr "Las rutas-de-acceso deben preceder la expresión" -#: find/tree.c:1297 +#: find/tree.c:1303 #, fuzzy, c-format msgid "unknown predicate `%s'" msgstr "predicado inválido `%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "predicado inválido `%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "argumento `%s' inválido para la opción `%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "falta el argumento de `%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "" -#: find/tree.c:1412 +#: find/tree.c:1418 #, fuzzy, c-format msgid "unexpected extra predicate '%s'" msgstr "predicado extra inesperado" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "predicado extra inesperado" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "oh, oh -- ¡inserción por defecto de `and' inválida!" @@ -812,7 +863,7 @@ msgstr "oh, oh -- # ¡Olé! Gracias a tos los de es@li.org que me habeis dado "ruta de acceso". # No se qué significado tendría mi vida sin vuestra ayuda ;), snif ... :~) # IPG -#: find/util.c:171 +#: find/util.c:175 #, fuzzy, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Modo de empleo: %s [-H] [-L] [-P] [ruta-de-acceso...] [expresión]\n" @@ -822,54 +873,54 @@ msgstr "Modo de empleo: %s [-H] [-L] [-P] [ruta-de-acceso...] [expresi # ¡Olé! Gracias a tos los de es@li.org que me habeis dado "ruta de acceso". # No se qué significado tendría mi vida sin vuestra ayuda ;), snif ... :~) # IPG -#: find/util.c:173 +#: find/util.c:177 #, fuzzy, c-format msgid "] [path...] [expression]\n" msgstr "Modo de empleo: %s [ruta-de-acceso...] [expresión]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "no se puede obtener el directorio actual" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "no se puede obtener el directorio actual" -#: find/util.c:816 +#: find/util.c:824 #, fuzzy, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "atención: secuencia de escape `\\%c' no reconocida" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -878,65 +929,384 @@ msgstr "" "La variable de entorno FIND_BLOCK_SIZE no está soportada, lo único que\n" "afecta al tamaño del bloque es la variable de entorno POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argumento %s inválido para %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumento %s ambiguo para %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Los argumentos válidos son:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Error del sistema desconocido" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: la opción `%s' es ambigua\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: la opción `--%s' no admite ningún argumento\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: la opción `%c%s' no admite ningún argumento\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: la opción `%s' necesita un argumento\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: opción no reconocida `--%s'\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: opción no reconocida `%c%s'\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: opción inválida -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: la opción necesita un argumento -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: la opción `-W %s' es ambigua\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: la opción `-W %s' no admite ningún argumento\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: la opción `%s' necesita un argumento\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "no se puede obtener el directorio actual" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "no se puede obtener el directorio actual" + +# No ha habido ninguna queja en coreutils, pongamos aquí también los +# símbolos de cita tradicionales en español. +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "«" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "»" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[sS]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +#, fuzzy +msgid "memory exhausted" +msgstr "Memoria agotada" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "argumento `%s' inválido para la opción `%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "argumento `%s' inválido para la opción `%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "lista de argumentos demasiado larga" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "orden demasiado larga" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" "Un argumento no cabe dentro del tamaño límite de la lista de argumentos" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "lista de argumentos demasiado larga" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU findutils versión %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "no se puede volver al directorio de partida" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "" + +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "predicado extra inesperado" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -946,8 +1316,8 @@ msgstr "" "o bien %s bigramas_más_comunes < lista-de-ficheros > base-de-datos-de-" "locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -955,85 +1325,80 @@ msgstr "" "\n" "Comunicar bichos a .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "días" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, fuzzy, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "argumento %s inválido para %s" -#: locate/locate.c:468 +#: locate/locate.c:459 #, fuzzy, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "atención: la ruta de acceso de la base de datos de locate `%s' comienza\n" "por dos puntos, no es un nombre válido de base de datos" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, fuzzy, c-format msgid "locate database %s is corrupt or invalid" msgstr "la base de datos de locate `%s' está corrupta o es inválida" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "" msgstr[1] "" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -1044,44 +1409,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -1089,35 +1454,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, fuzzy, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "la base de datos de locate `%s' está corrupta o es inválida" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1129,122 +1494,137 @@ msgid "" " pattern...\n" msgstr "" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, fuzzy, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "atención: la base de datos `%s' tiene una antigüedad de más de %d %s" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "error esperando al proceso %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "el entorno es demasiado grande para exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "Las variables de entorno ocupan %ld bytes\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" "Límites POSIX inferior y superior sobre la longitud del argumento: %ld, %ld\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1252,17 +1632,17 @@ msgid "" msgstr "" "Límites POSIX inferior y superior sobre la longitud del argumento: %ld, %ld\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Máxima longitud de orden que se podría usar realmente: %ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Tamaño del búfer de órdenes que se está usando realmente: %ld\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1271,14 +1651,14 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1288,57 +1668,77 @@ msgstr "" "xargs\n" "a menos que utilice la opción -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "doble" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "simple" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "línea de argumentos demasiado larga" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "no se puede volver al directorio de partida" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "error esperando al proceso hijo" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" # Pregunta (no es por crear polémica): ¿"status" o "estado"? sv @@ -1358,22 +1758,22 @@ msgstr "" # Me quedo con la duda de cómo se llama eso en español. # Esperemos que lo vea otro. sv # -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: acabó con status 255; abortando" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: interrumpido por la señal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: terminado por la señal %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: número inválido para la opción -%c\n" @@ -1382,100 +1782,178 @@ msgstr "%s: n # queda mucho mejor. Si a alguien no le gusta, que me lo diga ;). IPG # Me parece acertado y lo digo :-) sv # falen ... :) ... ipg -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: el valor para la opción -%c debería ser mayor o igual que %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: el valor para la opción -%c debería ser menor que %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Modo de empleo: %s [-0prtx] [-e[cadena-eof]] [-i[cadena-de-reemplazo]]\n" -" [-l[máx-líneas]] [-n máx-argumentos] [-s máx-caracteres]\n" -" [-P máx-procesos] [--null] [--eof[=cadena-eof]]\n" -" [--replace[=cadena-de-reemplazo]] [--max-lines[=máx-líneas]]\n" -" [--interactive] [--max-chars=máx-caracteres] [--verbose] [--exit]\n" -" [--max-procs=máx-procesos] [--max-args=máx-argumentos]\n" -" [--no-run-if-empty] [--version] [--help]\n" -" [orden [argumentos-iniciales]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "no se puede obtener el directorio actual" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "argumento %s inválido para %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "argumento %s ambiguo para %s" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Los argumentos válidos son:" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Error del sistema desconocido" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: la opción `%s' es ambigua\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: la opción `--%s' no admite ningún argumento\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: la opción `%c%s' no admite ningún argumento\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: la opción `%s' necesita un argumento\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: opción no reconocida `--%s'\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: opción no reconocida `%c%s'\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: opción inválida -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: la opción necesita un argumento -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: la opción `-W %s' es ambigua\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" #, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: la opción `-W %s' no admite ningún argumento\n" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "GNU findutils versión %s\n" -# No ha habido ninguna queja en coreutils, pongamos aquí también los -# símbolos de cita tradicionales en español. -#~ msgid "`" -#~ msgstr "«" +#, fuzzy +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Modo de empleo: %s [-0prtx] [-e[cadena-eof]] [-i[cadena-de-reemplazo]]\n" +#~ " [-l[máx-líneas]] [-n máx-argumentos] [-s máx-caracteres]\n" +#~ " [-P máx-procesos] [--null] [--eof[=cadena-eof]]\n" +#~ " [--replace[=cadena-de-reemplazo]] [--max-lines[=máx-líneas]]\n" +#~ " [--interactive] [--max-chars=máx-caracteres] [--verbose] [--exit]\n" +#~ " [--max-procs=máx-procesos] [--max-args=máx-argumentos]\n" +#~ " [--no-run-if-empty] [--version] [--help]\n" +#~ " [orden [argumentos-iniciales]]\n" -#~ msgid "'" -#~ msgstr "»" +#~ msgid "cannot get current directory" +#~ msgstr "no se puede obtener el directorio actual" #~ msgid "Success" #~ msgstr "Éxito" @@ -1531,28 +2009,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "No hay ninguna expresión regular anterior" -#~ msgid "^[yY]" -#~ msgstr "^[sS]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#, fuzzy -#~ msgid "memory exhausted" -#~ msgstr "Memoria agotada" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "argumento `%s' inválido para la opción `%s'" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "argumento `%s' inválido para la opción `%s'" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "lista de argumentos demasiado larga" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: opción ilegal -- %c\n" diff --git a/po/et.gmo b/po/et.gmo index 92ba712acb8e9a42d5ebf61d44ea2f0276f43f57..54da531a37281088ac3bc7088358024a347bb3af 100644 GIT binary patch literal 37384 zcmd6w3!EiaUFR!oK*c_@oua991f`_Wx>-Gy~Oy5Hab zoKsb|`_2QDb?;|R|L?6jb?VeP|M#Qj%a>pJ=1Za|`a{}w+Ec$JimvCte}8fm>G(%4 zk0K65p8!5a)8~e#MbUeKHv+c+{}}i+;FF#nMXv=u;Tci13;4sp8Q^aL?*KmgnNhSC zcml}3=pFp|0`OOW*8|`9tSEXV@Hc^zz= z@K1rS0DfD{+<~tH_JHpKUJJbPYS;gEAXAPOfJ`ZR1yJkq7T^nkzX3c6{0ra`@DMi< zd<3`*e9rS(ci?M)TH+rA?f||AsPX;~$iL{T{9y^AtGK!D{~`~M0~tDcz{7U}YyAEM zkVlCA+8@7sG>T$=-vGP?cog_;z#j$P3Va7p`|=o2&-+!NuK$h~xaYYZcssvO0JTnU z2Wq~*4*W6TXMrC8Hd#Ead%T(PFNva4z!&p-jYZLOd;oYe@b`gw&Zn|SY+ZB*Fb19k zYJLv@=Yb#dFusm8=J$iZ2Y`PDWQ(Kat?oHq1AG#{-wf3Ayc4MX`U+6bb&N%M5wH!^ ze*ZL3`|u^;4Zw-9DEejK{lG)Oo!g>_TSN~4g`e*Qz7+Tv@C@)~2uAn+1>kMKPXm7z z_!J)MF5pLidXA^uK-!9=t?H@2H-y6!@$o2_W@si zquZBX1M0qC1nN1y20RYj!C*W}^m-s$5Pbyr6RiJ#0y4GeK^C2*jD89D1HeB5@+i?M zZm#1$4rFT4CxKdzuL8$`wOvuv0d|1*0sjcdzvv~q-Shq+@Ctt4%)>qdc*MgDsQEnr z+ynd&a4+zG0`>g6IQUdx8>sPK1-uOSVSoHnz~}J$_x)$eg^7DGkX0`+?ysC|A2_&nhIfidt=5B~}%yuJK( z*Y8C@mNc3NUJHCHQ2X|)Ku9L~GoaT0$>UMH{7c}ofTuYLsYO2m z)cigSjDe2&83XIyZsBlN|VMz_$Z6ulE7B(EnpV zJ?EbtaQN^KK&}53lMZjkfLh;4;I{xXpyq!c@TI`l0$J+lG2kTQ#oy`h<Pdp0k z0I> zKA+z|3e{gk{{)bwja~!f5u?unS%T<=_d5CgDxm26w}DRw zehH}S{|5Lx;FiSU?IbYfcNe%5_(tGOz)u0kfPe2{ZQkMYJwVO#H6FePsOR`y;BMf5 z0SZrFu;BRXjX>SM1B`*+3)Hyp^6+!Oz5Kqk?(pUS@N#~y0#o4k13v`(Z$Rz)yE!;| z3C{t%h2K{!Il4av+`;ef25tksA9yYBF`(%4@yqV{#(->Hlz8|tAX^??kwsAh*acn% z{4!9_@pr%{0Y})hJAlswelPH4K<(#aK<)cif%|~BF~|z=A>bz9-vU1dd`{Et&liE4 z`Mtg6=6N@8g5Tc{ z0t#>b7O4HWY|Y{AX5jPreE=wYYXbG$?*?i<{}uQhz~|lXj$aS_c7Cq{p9*{}a1{7f z;4^?92iAa}2R;FK>B}8|x(v9D-_Hc{NYR}@(apzzPXT@jsCoSb@VUT|SI`Hz1$ZU! zKA`sJ^*}xUF9Np$zwF^jQ2cyMbE2I#BEW7T`|c&jGIj zegz1MMSl;}`Sz>bem(@$bAAx0@xKWC1K{5QZv=k!d)$7FJjnenf%buV&OHyYX24b8 z3xKZ%YJc7h)cC&w9HalIfib`T9wN|upZ6Na566I-*A(z-U@EE_Bfct^J3S0s{{s-LiwSX_=_v?YX zfgb{X4fsERp8)>l>m0s);0GO^d=kiQP1gh%Zl2H=K5w9X(Y|5x0ktkOG(BgJ_AsqM z`*GS0G`1{Sr2QD}TADupk@jn}$I-&)-tfi4tAR&oKScvAjGqCDkNCnb(eymG(k`X_ zJnd1M_WU8*@6vvUrq5>Dv+Nso8}I|P&-mXgL-Z@O%V^K{$8PuVw}C9D*(utie@Xjw z+8FKaG=2KCoOX&PzV{;98)^CoFLv2CXAA4=cha=apVALLcROHzwQu1Q^X2zwFQ>he zCfe8M5!wf7Po{l{rjPi;f1rW7M$-WM>Rf@KcM{yOP$X=`%$;PWzmGR6bed`#!$^YuboE_7o52 zfWPX$KO6Xyv_rHXrgdrmigtkZ3R;tP4ejGJeLhY5QQ9r~!RKcjh#n7o9&MiX`?Sx~ zUQPQ1ZJPGWv^APO572I;)oJ?tChf3&bAMg~__wsnY2QbC0qtEheLn1f{e1#|zd(B% z?IzkCv^UZ8`5^~Prs(U>`QO_;6gcC*uX?xw{4DJX+I6&qrqBBwFg^3N{=2}-Xjjor z>j$5EXx~cv90>P+nEbQ81HME%K)Z*wLVJkz7TPb-9;N+f+E-~$0_kGfm$+8Xq7Ogq zb1i@WfzK4k7;yXP{+#eb=azV2_0val(6KjiOzW)A<7hheTO2!JN6KSQW8-(OJ9dC$ z+twXh<5*a~XZUl%O^y5KoO`i97UnJ5)w!?yh{GYB4s*Ng4NlJJSeV;1$Bya%pK$D_ zIkv+cDvtdD$Hvwji$*5SqznCC)@jF`#rRCpUCQIrS+f~0blSbF-B06o=k(S%Y1iYd z=g#!HYjLj=chf}2@;Ga+^n2E$+i!DSt3~g8cbqN8z2%JaIb(3`a?*>}I{o-`((a{o z4Y8c8tfcL&@k%pI@-*(Pt?*|#jnj6$)>*7AX3aEiq-%Mv+i9d@Bhko_bfwen#q)h; z$@RDJg?^bhCDEyN8SM{+T0(#^>VN zq8;b=xFAmmN(uzbLi0c^uBm^ zTpRfP@>j;!#kEeO>`=X|o^{I;?#k++aB=n6Zl1iJE++kEFJ4J{%UXLa=t95SP20Vg zzUe}*(_Pyghi>Vam2R5nLI66uRT`-rY$a>Lg*?l9V92hxvyyfbhRC<_)z)}x+)MKw zzl9`W-A5w7c(vuUx#GSL{H<_aH9)sz~ zW;WCIQg68&Vm0mBT2(IB*G|7DA_!-*_F|{oN{p;FJeDXcJ=0@vr{^Z_nk&X`clvqS zjce`BQn%AzVK20UhsWpUCXP(=EA6)8$jn~5yEt6+?(Rf^YC4z1y{zR%N;DEI)i~K6;}OL~jD2#hFBHz>#cro%Tx6>; z%e)8LBwZM+n5#{zuEAhtLf^EzXYYaWBjbBP4UNc=mKd>rdKhM!wBn?jLMtl?^vX`n zuf@eRTQ9sUV%c1BdYQ5F74`;}k>x_EJif2rfujns=aYp--c0i43lHcQDQhp;mCepl zwvaUAiJAR@R5@i&n(9f@&f@Vs6VqVbz$b;dt|p*wPXeGe5z|GI#y}qDE9pYEn5FgI z7oJcD&e%Pj<=jr+QYWYegbxcDCY5PY9!-z$IWjOUe;7<>3nr&0=O)LeYU4-loJC+l z!XmZYlI*&N(5TkfoKim8DByVR*(t*kY z&n}60MdKmx5msmdt7#R9z{J)H*qy?p(-@L&3n_!*V$FE|YeQhOhvai|YxJ zPP!zI0JZd2q%Xq!a%3P9ag8TjO`Gv(eRrHUvXvE0DC>=#d!Vs6o^_+dV2dWt;LM?& zq7|bip-zc?!4_e_>Vdj^{^92OUBfpt4MvMM)zVE~lM2^~_3D&~XdWbq8;shP=eOI%TBQ<$+w4rhaKdUFT; zt)8xC3oJsvH4lN0Hj#fU`mn=hC*+t3Y0KFV?9V8ua=e=^>cSJ;beGmgm|z?k2HWfB z@y;7>+#M(Lpa`?DPFWk_f|BF!stv7;F8KWszU_+hUI(kil9_x#v;U^B(Wew|dN{70Z6Y zCSz0JidbBA7{*w1;qhlXhz#yt?_dmk6YnD`0Jk~|jTAk}@!W65^WQ%cm%N?A*`;91P|tYHQYsM{gM0xi~r+ zZ(h!p(9(qO^R^~iMxwnNdULklMtMP(ho1HYX~14^hIJLk;)f7F>ES1sFu@)qxVA$* zYWoU~JTc79bi*0h@vvN!h`?bRb+peGe9p0tXhO{Mj& zq^d0Oc-5(lBCw^5EwS_LVR^as(7FqqqWy_cEz@vpwY2gprxyE7Fsk0|tRSwkRjyb{ ztC!}AP(fH)r%noVPO@Ef6i%PVA_1o&7Y|Ik+S?N%z$ zp=olnti90e*Co~JDTE?E7smC@FYP>s}D<+s_A?NB0msiehvF+Y-C2xFcGhjja|8QWaNo-2qa%xT3h3R6G%OCMM!Hy znZ*I24zj)~SC=Q9gww-_V&ZvZH3SE)+gf@tiIiW_LZH52D`_C;14~gp9wPxW%?C(a zSFpOHumg>B&VhnrU?U6)am_hvceD%IrV@F0_62iRvA<433)JpNwmOmJ44uBau)OyF zU>dotAxQ06$MAVf#tV);FJ?>Nube@#TuO#@>=ztO1neJLYN|9zICM0*)b1F9_S-n- zI!kS=QQ;*B94|JLC9aAlMLxDCfL0&el-Cq%4eK07R@z*2TtcqZ!aQ^rI;K>x6t0&B z;!O-^3Iv6@mMk$Hul-c7;34GUsc$@auT;5BdP;L26&;|~1V?U;sh(nbX!b0h^AZ>S zi!fERcF1q+A9L|;aVwD71yrWaH~$uA{*kxnbzw{5R>k9p+MF#}AV+zR z^DZbCqL9J^$^|#nLDx)iNr2G_yso_jcP;KFti+UBzkO&MrXM@La!)w{;ZX~hka;=1 zU6n`QY0i$j(IA$H14IYW;@k1Qq}fc@qN#O8nk+ksFk_M<=Rb|wbO`<-*YlbgEe?$l zwgFqsS<&pUfbNvj;gV+F8Bs*SU0L8i7m66PMhhLhPN!^M@)1*HmaHj0G` z7)rY2bwhXPwdE z*vLpUyUxde@IcHBvyaDy^aTNs8`>6+lWq2_m!Sv6T^Y+<(?O@#b~?R7ff-wY`4pv| z<7@`PgF&`pEwLy;D#@l4$GCN=3MBFetOW5_3hY7%@79f+3e?n^ zti`Jtsx1@I?aB+-1~26Cmvqo7Q6uK)0fH-fglV7FAy~ZY-ZrwcwV5ET0{5!o-(siP z?40ISYEa@q(?*J0NV?D&IG?oF&>*+QrzEd&kYHD4J?<&zi5A9>=DCcUE6n0_P1<0$ z)2xXrGdbfzaW82=!v)6)uV8xRbi^CMoorY~Z5%d4<1IEhIA~BV-m0 zUd#qc59kK3#fF|6VvKIBOzW1~XU~0jeD1)|*xlBE9$H`X*5PHcSlqn4NK(;_D{Aq; z8NZ?MPB9WT!t*VZ{tgX&8((Yl*xXY{I)iKY%dQ!_W-I=TzKjo;B(j8a zEG9hBM1$l-A*Ai}7F(pCL>a-)XG=A4AaJ>rNOYt%tR+I5?S+m;f#QVt1J|%~y=MA# zT{d)VCM&iMl4^T8^Q###MSsI;#FP#aPdISkwn7Ve;5Kh@Bw6iPgjV-YPVYN;$JET; zgC}PvUp5hLQOGRweLJ@WmJ&k6);2LZ;buJWJYuqe(t$Hqx97;=nc2y^rtUtucjm~E ziM?|}@xs=sn|jO2BBE@+QQ36j+C3;Hubp5{yZc$F>v$ zKAOas`dD;yh$mINWHjfL^8gp5ENYbB2<>U1I7>(v6I7d7_)yHZG)gjtGX?b1sYNp5 zj^+qk)4z_JH{Sx=ufQp7(y7~HL1eW(Sb z9vK*Wd#pj*cpy#?z*gKqce3y9P6NFU=){!%9M+#1(=7FEUp&x{2!Dd7OGAg-?$Hr- zO?7y}&K+0C>O^pkpYXAh`3{$WxvU;S<%_t ze&xM-)+t9Cw}VJG^;oeV7LL)+uKl#M0sV9d1VV^Cb9Wz}D95nCdstDKg)uSMq1$HY zp6tno>e)1zr&^jtY7b8Y4ya;lq<=*-GKw z&{!d^4ST&fzO9^!A773XMLS?}1C%XgP2^iVr9a>;crjt8JGJB!+0JKOSI<%)L8+3s z2;e+u5vK8ZKkV4oaY?_u@uDHdi-H03eH2Qs6r;w$$1Q#`ls27t)oFHUSLUYd)RVPyTrI*wl{OO!Wds7EuhE-DH5E~W&9HVD{dvR&Y!b5|QsWdM z0+V{)xL5#FTUb`|L0n>?u91%A4Gf6fA6S&Xm1#49;%bkl#cvauHl)dr;!>RI;d_pU z50_{;uB6IFoi>tGHnThI05_mYKQZeU7L1)n~me8W|Ns zqiL7XlB6Y@QpHodlcy7+B%Bo54m~&^B-};DkW5K4Ea6g2K4J~>vxXibNPohasB+ui zJ32bLut{@gqtouHCzr*(f)Wx15yW8*bJ?jSp?E*YCY+(?>OsWnw5)XXF^05h%cf}2 zEg@)TVHrm;mEg>}^EmOB5Krgrp!~d{9W3y-4R8Fm9!yfp>DRq73!%5199f%1haql= z@eJv^p^sk-hrZf6wyk^+9N`$zE?Ar`QDexV-SMPF+Z`@xg;))<43ZeE zz;)9~;ePCct*&)pf45~Yo`V4zZ!SO8n%LG=M^GB{%76fT{#g;DFhD)4o0`bUHS%!^#m z1Vh_;;5bxjZ!~QOJaW=Apfr5QmJI3$$CB>0?DCf4=6K?+!$;yR7&}+HuOui7 z9qe#yUZ03ueD9u3k+eA<1M?4GkyggvT>3#rDOv6=ELqaTV+mrA`MpJD6Z}x*hx!I{ zv-*s4@xqZ2jAo@d47(QRbI8FBT8FJ|WeRz*xZVxwJPxrePjkh_QxnG~re-;Sb5Fk6 z@_;O7tv@ElqF>ph7H&4gn z1?=*5(<1ho{hii+B&FST^}bVYKug~SdYcr z#F}h>v~|P`qc{~rsr+H2tZ6*!a41566Ej%lXTPNjv%+OkIXARI!6jF5$-04C{_$F2 zwu3h+A1Ja8-Y_G&2&nXi< zoHuV=fE5vFd=D#I=)>J0TuYVTtq4V6e|E%i8lx2G2y%9nSN%4@Iwxgi;+oyK-IG~# zIvCty2>dgnTb#&l2Pa(%!mvov#8UDWK#`lD^KG=n?>P4m9RL+Tx~f_w&=W%Z}< z1=3dJF%eVIo+#mO3ufk=eCP6$z%uj|xzD6Fxmgv;e~RC+Z+06>jv=0mEIpTPBQn73 z1-G4yYDPZ6%$`$;)Nxa-KrWIE6f3e&9P2|)ley<%`=*?1swwA054MS+#uX4#=zxS@ zA~8N@sQke)>Pd`}L~-dG&TP`6Z!%>}ek)fDB?q4R#kKwSzf6xq|s$`Y=_cOmIvZoQhA{NB5Gd_Bvf!+O{-+-22vWi zYuVQ@D|jT#xr7XKQ7x?$UQ2Nw$HnkT;3X)q&o0HZa?*)Mf*<=!lyp^YQ3;{FZ z+?aS(-wPR1<}=iKBrXbo(j}2B=g^|d0;{aD?zmnr5}ULnNqD6*NL4^1cc_jppea`; zEUQLJocG+*M`M=yn@3aWBn#$E--W?zm&kBBqL#w3(5LU=}>6QfU;l9A*hFoK9tCh$mX6ZlMaf`{VY2Gx=Dh+YH$? z(({zo%JyRBG4V1FRM9(^FzNJ$;z0+jsKedPDLfOk$$IUWi>~Z425NP&@eN})j_ug# zi)U+xa-@Cj4oYZibDdq5eo^T8p@eqi@XTCoFLb4u)%HQ#yW*YOcid3hep7A7i{l+T zcI~|By6ro*Z>MAJ2q``a=#>4guWf&EZRhn|vTOUz*KNO^ep6JU)aJ-!K(1iJ?TY6* zgyQpf7C`=cFBiPMm5#v(Zl!m7sSn4j%~8j;E1tkH(N;k97SxCSnOd6OE*Dxp2F8)v zn5N|wLVK*!GdVNHwsqHfJ$2m0xZn0X}QH+%Z(@JxAyE*KRKRX{LC* zY7;(cyDPrAMk?jV;bxx@du=}oFd0_u75ka**(u(jGkZ3-gr=uR}LD6#;_sOj%@I91GWD zNK}W2Mpl!oq4YQHhkP^fDOul`9}QL#OMFQ&*U*JcXtJ~F=9G$&aAfuDBN^M<>EvXr zC%(K|6p|q_IoTuKir6}Pgo+MIlxwdVDt)~1F=#ZM#>f;|}V$@!jLs=?|`L+iNt=mun z_cdgOx!{^^G^8r5WSMfDT%oIbCLbiOK99ba&*VC2-N{iJ`ap8NsLuM}40YBAXD?J} zedy?{s%fir)-(G;owYj|tRg8KrXgHpnROW2T>k&4D(lHZlix^{H9SI`qbOiKcb)Z- z$$dvz=SGslQR1^7WfKzufhzyAQxqTf(pvBAN0(W5&#_{VHSue+e#0uii*0XomV1en z01hv;p0kQXx*OXh=+H`%bcsyo-r$5NzNTw|mp06-(WXv)rTh5*d z-4T}!?5|+MHXg)Rt-78)`?f=O%!Dx^1gf_+R=7wMt{f~3gFdgdq?^}D{WqA zjr{17caCE*HhJd-)eA6()lLU%3F%^A!Z*{XV$|X{I z_7OxQLJhZ0WiXrB`RcBflu=J8yQU)e=pjnLDN$_W?Pz3O7@yzKZar*HcqvEq+17mr zMYM4mq@FG%PT(HdIJJu?zxE_FP<|~E8eCi5KgY1gt>f7}OQ07ZBuh!0rXbRMMUDh| zyznZ6d7zzP_7Gxq`xl7%!lMn}nzm>|uW7*byS`?77y}uo+s;ZcQ1XNGRc$xUeiUJw zwpl1~l7@kD~xC8FTql% zo9?rWPSHwn+-lPh8YFqblg~2YDhuQAQNEA zJz_ePU1tq)uDPRD1pO1`OgU)GoAOHv6K(Z4$5~U?%zbDwAWlxoCbSv!Xhh8S=2c z=-REb*x=}btBI!E$zjC$2ijFWEepEwtlu(~aD(i~C{=wk8q0_96YW0C(or@pYG%s5 z1l!bZEBqdMmGGNugi-p_t&1gv0gA$D&og@-oBiIYD%;6E$ju2n6q_dRBv3*2DrTkC zEI0}nE6cElk5;Y0{-+yN(oY%#JQBW&0`pHXRShc4kWcKw&%L3F`XGzlaF1xhSz)XZ zzdRMDo+lVqrjAJmgV3?@^)f6c4rLPe(rDI)V!U2pyqgOlq$V#VNTP`>Mj_z^LcM<6 z?CX%%R-hl$DbvJINC!LWzCj~4`e1_5fh1WnT6aW*MAqa@J+YC^B>?LSw<9UHxMYyX zV9C-=QW7IIr41JjOj>tK28*!a0wye|LP+6S=j`q)ve$Q?%Sgzo%T~+#@~efSY)=Z1 zzS0j`u=aI5{a#lYANB7A!#92LEkX~S!>xzcM{1r{Mgo#!uGRjjpoJ&c?9W&*FsqZt@5(!?Ys8r*8% zBC7|z^$%x2NO`9ZGYUH#86qn!+~?_}c;nE0CHU*kMO4LyXihTFL_zQ?=;qGe7=i@{ zCCCf)Lzv3b(En7T)PTx7c#7t#!~}?9lAsvAAP-iwd5UU!6Mn*3wrL~YP5EU;C<#BT zXj^qxqpIX>Wb-)2a9^`b-os?v4v*8S-c7@+|1cf#JGIz^RJjYeCZwC8`buoWSL;&c zP1BMfGu^0{P=qXB7fWaC!0TS3{YD3;f}VL^$zx+9)6!?Sq4nd7FS~~Lwc@%$3NmZi zXrx=M@Vase)yno!au7Vy3nF?WPsH?fdk{wO=TbRsVBliskVFI7u#{#k)nF@`M(7A; z+r+uTNl#N@di><}O{>J_N?BZv=M?>7>jM>cauz|-Mupf~gQANY3Y}KcAErGxs+0yB z*9&wWBCFX-o8av-c^fw%f}X@iWGAJB5t$jd8>P`$y4~fB?Qu^E3jcpOr9)U!a?{zm z37eFrOJE1>MV<@oWuxC;Ir}hSAScz?ie`dp)J|N9wmO2s5QA5_vS#1JfE0{U^OD+* zAeVl@m`=rDV{>fSUYemKn9`{7IL>U-u=vWXTiF zAbU2=$=L=PTE*Glw6Uqm{szYOTC3?2{t;Y6x5NUn>ilBo=UhsbjevytgIM8;;t3|8 zlfaVw0y(q`s|B082cPRwvI_IG^)K$FU=hr+>-<5YOYU(oMc0Lql@Ul=CcDjZ$fE4} zTphBJ=wN4=I>vs^YoTB(!WDS|G21Ig3-KwfvC$x`(9}cWzeZ_+8;%TiHxw8$OhevW zdClO|)e+#Evz>Wf{pbC56(#T(WLoMDQqf#GVpYk2r#3T*4?j3jBIvW}#7WxdwbSUZ z5*dw_=r&M%EnZ$|6Gp;d?SNuQlwc(xk3E!WuiGG$wqgQ~RgT36Vc{0Tff+R6y^i0@ z%6wQ-4v#o10ON2x0})wPY0G+55mqasUfYDLm(KKZOHNU?Y-Q@^!mDV6ssoXp%|giF z(nm1Bv$&#(Hj-?q#10YD)E`@QHq*rH9yw=a_UhT6Hvs~xg9*yJ!jPCss=xnRr*rOEq(EiO}VH^e_{RXYD*vvh>5nOLu2q*Q0QVw~Qj7#sLx zs+Fgp^Vrm5>pH@ZU0`LU(;<~5HR4AxVsynZ@F>in#8gZb1*>@>r>uV2iwepx(E)|J zFhQh8N+)A_)6QT*!;vf@s{y(1bpW)PAf+=Fn#2U`c8ME2#HeFZS$QWXR*ux6ppXX5 zL>YwO38q*wKNeX+4L4|?eWVWx1i6tF(y2hC3ipyK?Hv^1f{1hvd(W~DP>ImwJYh&H zx=!?_5|kiQCS7WX^KtruYYFHMOpVE*J}o7VK%k94BNjO2St=BfHCrrJPxhS~5iTit zjE`w!DK#hr~AwY0G!UoSl#asnJ3$qBKs9?s^vEF%^MVm|)Jl|~QT17;#;jEox; z2{v=1*+L%O0WFEtNN7a?M2pr|x6Jn5Qj$XGPxxS3Fx4tDalC<`!~$am-j;wFtPe>l zIq!gT0VyyTZ!Wu9=`(M(W0MF*lB0|^XbWRv2t2YM6|oq4ZK+su?rG=ad#)*qpzpZ` zd4rvVZHx^B50YM9&%~WhAws%_>!m>$hPVdgDNCZit}!Iw&UeF#|AE&kj8L zHhBMnLgQ>ZnMjB_ALS(5Daa2Qyc-SB9{HGq_0fhS^5TH73gv*<<`pG-?d&76q#z9E zn(+5vfkG&CU0w8r@CJ(H~?IY5TvvNv%Ch&G;tUPTG~jyh!&+Ywn-KUzt{7$oFnugu|F|jC zj#ZD%&nr*XiKOU2hj$$HG2WOK!7)oja2g~ETs2Bp=qXzGVJTVgP}wq0K|Dtu)-i7< z1;azhMyThmYB`9jz}^bw-#l97wo(x7V+^L>vFM6&NJEi^z?)hdRZTX8>=RZ)an#aB z%9_Bb=LWnL0Wl_=&cCVuWCkVh%Wul9Z-C6p3aJ73AEX$m+SS1>f9d5H8MJxnHrg zMXsft(HwXLr&kn7R9YgGe_YB=tqE%zF|u$J=0MIBaYL+(avYs1h#CKYoo3GN&E_Q+ zk?){yc8>D3h>Aw!tTv>FhN~?G>2E~B80MsEU3x*gZ5B!eM&iI_kXhbnI_HzK)onK{ zCT%xyPlBOk)>61%TaM07S7DKU61laDFg=OxTA0<;yRSpJiw5hND_SAzS9whEdT3#^ zy{H_7!#FXEhZ?E|Mz-FUwYAUjfbReFd~zLP(c)9pL*3 z%tm)<>7M;WL>(sxQmfXmT)TKb}=2}LY1e9HrN;;ZNXT#qJ?D_Z-rEQcr%e+ zm2&ASF$mcVC5`);My`5kbT+;2sp5Q2L$APEz&VPBDn0B#(aWLJx}UgIi4Mue^PaQd zH>C<`%cdZrxUc!3#@1a;Gtug z3Zay%(c3UD&-F|TRBg0(!Fy_9-sa@tuj7QmQRQ> zPtVzcA1~oH^h38G+rh2Ftx;^vxpyz@7rLU)vMsBn!8_e4n{(8VzD|?lAJSeL8dbb&R_-fN|%s-Uvko( zEHb>^;57@C%zk~zkS2l}+zRCu8DfY^%c|zV%`Obv!P4j9oqXl9%Nmb2Hxg=aP;1$A za|`tI!r9VIu#*)$R1&6PJ_U5R76a~B*>X{xyEz^|Ha@kF+UKkNH!FO02Pv@ANh^J} zZ>oJR4q+&}gWh}$Cp!Lcr7tB->#yG$E{>#ll8hoZ94wW^H{(W0pXlK(p9hZ$#!Z1b zDu6~KkeBxRh+KLTKeq_0B%Rs}$-NDuq^k1yp{{ z>w~+}84vJQ^tvz)h5avF3q3bJJ5i~G_CNor>!2%oPNn`?ZbqUbIeIHDM|(5npw>1P zDRwS59ubs4VHH}U8f^nVKti&Cyz7P70;$bQ(hvOspK)MEea*w>Y4a|5TZXb|Py!FH zhu?5%w3U-wpfuWC1nY~V$-wtGUGv4!A-mtzMwh=fltve)TxGQT83x0UK+P`-qeI`} zbMZT3wfhTYz)@5eD32omKF&OOA znP@o}?!HJG>?69Sh@}LdH;|nkEY3$+ba90(gvAwORY=2B#BZE;9?j0txw3O{*SidS z{#znuM3Sj79N!hDLy@06q)InaFlt`WM%IM~<^3*-v<2h9f*lqF4#^;m4nhV=Q}Q=e zB&%{-HO+G{C5mXsLNVKd2Np zU5v2NQjv$=8!Hx;l7L%6aaNGQvUJK_We@GF%gZI~#moAH;pOPw`J$p{$6J&`WSJby z)-X#iZ!=`;<8c_c5Kd%%X6Xj#V+dDsvJrc6MxI?B!c!z6XSm7Hkr~*W{56HTNpxDR zpy7Ho#bh3-JA+A!Y-xxeXs%|g$irUDu28pRyz`PAC6|edlMgHz1bs<4aN4g5!}Q-+ zr9J@8>RPq4*{MSlx61njQs;qPrid$bF6L33$A+hlhs=9oq*ZgX97>Bt2opzdA>5Ue ztJQJ}p2}-cE(R% z-y1}4RR7^8AqJ)r&>{nt7ak8hIXX^3x3UU6*74j>2b*cPtrbVz;O;RB`Mg0NQps}> zt3s2MN(uMFFX^exe)?Hkx|vcotiIXs2D&HRzqpI)Hcaab=7mCU(q}E(4}X&$ycw;x zfes&;>{HPYUG#q&=Kg;XpGrRJ{?D-W$5cHYUe{}HK>;}i|HH82jhzRis7N;J4H1;F z)AKa{?`(J_9se&~avH?a`;dAk+v>Py)ZX01Yta+`Ms#%<#oC+~>g&JX&7}6ZH(%(* zJ`~E^OY-z)66(9VR^1-vSLc80A<%$sz2W8MR*J7zzqjj~c+--5DUL5E=Yol(+ayI# zz8rfSq;6&Je3GC;VWmVr{HHjTiMhIb|MCgzKCildk_LGnpL(yPB00guCZ(aY&K=%p|mSr?tmJ?AVDb&Bk%<3&KG?HEo z;0DqHGt!~tOx8jX^S9!~1>uE>dOyCsD$%{4gAGK^LqQl4Mw&idO0 z7b>i%rdhHOAf@UmHXa=aa>xQXM_EM?6@fyXK-1J#wYJbCN(m~$61e0AM2VP=@Re;O z--)G)j9Qqfa5%AQ>!JrnqL#h5ZhCdzgbrqAxy6$pU~X7V^)R$VK6Vt|1X-d0QuH%&`F-`G1MQdC+HF-62mP5HN_gfh*%CV5G2i_^?Hz1JQ^5zQj z^~C}6kPLDyv)@{*4LVpA2N6WeB=CmV%f*f8W-gCkp_KE(4Le8ey!0>ABQuq!Wx#a$S(UT8Uj}GDoN$7ysGyI>jPy~TA>SV z9qmzi7)4;(C9Y@2ahhqT+jePnMthv0mDcp;oN2d?ZTESj^Zixz63{*~XU>^>-e2Fn zw{G3#|NndM|Bjr_eeZWU>30Woy(>p4^$b#h{N^g9a;SK)7o>c;uTtINdH7>Q((wM2 z;Rtvw{0aOc{5?DZe>Xs>!EpOPrQU&e!X?nmS864E0#1WDgH&3LCNq7IQYCOR+zk)F zVbb6lrEEAH7Qqux+CL44z;|E){1nPW`Y`HvSOxpRddOUq4J+YcDBnK^<-3c6(@KpY z^92<{;c$ADfu{PbfdR_<;7Is=I10W7HTW@{1^e@HAGi|EhP99`)%|cBd=koneh#Id zFQ80#NSa!i(REN}YQR?50++&4rr8HOq~LVQ2ZwtTegVpgK7jnxpb_3gCc-+(F`sY3 zddgD@Sp>WnQl*A53z=}bicD`Zi=oVXJ(QU{Q2gN>oC+_(X>g#XR3lslC&O0w4Ezn8 z03Sp>li(}x1}Lj*0h^!<{05u@KZ2VWUzMZ(SyUW>qLLTkZ>0g0j^4o@GJ(8ePXh~} zsB|wp0Uw5^;qn3rqsn*(9e57D1~I$ZNoV-0Iw@p) zb&ib8@B*xce}eO275Wzq?1tjak3n{&`hj1570L?V^~)KE)>R&k(G`}%Zg4V``k8P& ztcBt;Pr!6OnV*uuys8aK!>%k(CNdUEIS9qJhoH230&4J0pPxajrSh4rn5qh5H5G&G zWOWh_hG(Hn_yQaNFHOS!tI2#ug?zXGeMaFfC?@z2%KQ8&O7(>X#DP^3@`*YLMU_8> zV*B@?_(l<(9f2z#J5;?5rN56L?xKdGZVk?vhW=k8b2AmP(()>$dgLgz1}>vq!=B?C z^)M7wz6-?%ehK@)ei&FLHWFUTcjZu4dgDwc4Y$Ez@DLQuor2xr58yTMr8Jov$XtSR zU=>?oDIK*y@qr82K~&$3y}1oegtARf^I!+546E0ffnQ$>gGilX8Mx0_l#Q)R-5M`)0U_Y3*)Kg_4lmRC}cA#p6 zBjHI{0-yBD7oqf%fwHi&>pj~C;TXzy_kH7*bPPhfiLQ+sn_b9}=svSn*^tI@} zn9Lb6&%xK=ICx|oGlP#q*;bceJuGHc((zF!D?bJ0ocJjeRp)K+7BV0HBjqMI7nW}H zPRIzHO8HSZ5&mi;`VW&C$`&{Q4?*c@$R^KuR{Cs)vXVpaX7~b>4zwGYXs%N0p!mQo zHC#Zb`Yf!VysTEKINS}T{GU*quyBjFjpuDa|MDVCg{bJeFa$q<4RF;~&sI;v)0BS> z2f;1XC4*Fy^)fQ9f2*cT4QKH?K4J{LfCoYEoNOg#c+oFBsR@V9UROy>u^%v>lc z48zIrBor@w2}%ba!!fXz;T@snP@HcA@`IP4E>cnwf$cZ-N`3w0{iBI4{6S zvj2ZgMpj56T(75z5T>;h8d#2Vntx9%}F%cs2YJl-I*!RbNtM4PvAd+?uPjlfZ1Z#Ap zIpkzNXVW!gZbiO@a0a=N@ZC_-Y-B%jyA&=<%gBqrbib_b5c%UsNp^gk(zS6Byb8G! z*^69L73qy+)BR-jA&32nT=+2ZC?cn=jie{=$foc5 zna!};&wtye1&8|ii9Q8?gWQ5NAO`YRh@|fzw;>^<4tWHTBwJ9@;~vs#4Vk;Vf_v%w z1^Ju&@=~AI``qSpKAh&~9iQXiy+}RM2N{4IK&Bv)h9j$yuoV2XQ1<_g6xJgfk?$cJ z5ZUjmkkiO6W~brC&DlCHlZWvI(4Qrt-DCgDFzq!B4ww}-l{cVz1xr>@*<*3s^L z>dO2&*;A5A5V}o&wIb>5VyVoR2TA-^2A!MocD>YPC)Z5f9H}5>2R%ofc$TDW-Ivr= zcvT&B6>O@&6?Lr>^Mkq0nZeaPCIo6%tXi;83pmG@405^*Iqu9FIkdI+$Y10-hsJCi zeO=NF+gj2xqmA0)l^e9iXfkZpX(=ONnX#x=Z1r^heau77XGQ&6-!8f~XOtN=ZBq}M zmZ4cqdcp_>8qBbvHR)E9X6tof!}&vT+&MG0vUOWYQ?9dM`~atD{QTA<<7;vk+4W5_ z%pyLB>Jh`5A>FGLv7kXlGc7F|v$YhR2es`@MpRq9YTeRJ%WvE|f7RNx3+Jzw7O`kq zYb5YuPV2t%lR2&bPpOMUD6ftgxylB)dT`&)HV`&y=|rpx6FFNk_qk(1cFA` zjF`Nyc5}5oH80f!7HUSUAz;}FX=>DD3$>bbNvWo~qpI_xQRT@vvTRWJfk@F0XL=@GEMnuXxiriKt8>9ncev?i>O#kQCez z-P+E!mOJ5k?AF=VExC=o`p(v?-PZ9$te)1Q2kF`^y3PF;)LTvKV%yOJsvMl zi&>r-j26>&*AtBe63J-5YzP>UxV^)zW16lTRf{iWdvMky2aV8b>SK|J9t~_^R5`KL1-;#xiYZ#<)EN_ux9;lq+%wMx{Zkw4hZ9RemY0YhRC|RdPGnt^)tZSBG zXyKSqr&;W@XwbB5&5Sn0^=bsRfJ{ zqh4F)mv`;aCTM|Jhze)ax*_APY!);V-)QO8Il*;nN3?SsgkmuZ-RU#5Se)IZ+p&Zh zEY(u&&RgroIQ=$M=S~PXt2Uf!Jev^!zA@TePJb&2|h@*n@A#v#yh^9C8tkWS(#wAHb+y- z+Rc#Wd~oyhX_+S5K({>A!Y0>LmJ!xMx|Otb+x+H%8H+L>j?8g-5vy3Km+;)KFW~vS zJ|rjO{7fHlb$c{wSggmXsk3?UMqSwue}RT6%hSTiI^9kNwNSC)-HX9RP5wLTE&_;ejc4C;wssx91{6qm%BAv4j8DmsR7qQQ~QXTilx zdX`aiQzlY}|Jyx#;I=3i575IwJ;iRc+*gJ;QN#>~Q7V^Bs6EkWm=Uecv~6~Ptg)=8 zS|qEqd{2=ZK(nok^MWyWbcgp?nGj2lS!@n*2&*jnk#k3bsQpaC+M;aZCKCrvG?}{P zjTh0wf2R4MKik~t-&o$g%}C*Z?atE1(w^SAK%FlJPBZhb@NB^Bh7pKfPk2e+muWj;7zfEDU_BiJARO#GgR?4S$nxpz>Lg?95 zuIuY)>P7P|=Th^Ks%5AKpfq)T}w6J{UWhgP^{&C_pypDvmE_K)8a+1>x#~k6bg@h8fo4$z+gYt(n~yG~&$hf$%J+A~J)P zVfT3^QcbtNjui3Ci&hS6PqN9gN4$w*I|rzVj>$#Q-D496p|BE5Z!k*KJpVQji>!{7 z(94e4j|RGH*Tapjf<(RHcBdgeGp{|WvtR0TGiWm7$Kq4IQIkK|zmv#?S41eb zMQrAWAeVZ%z|B-zV3pB$bObbgW?j~9QQT!H&6OqKCWrsOucFI7POvnhGomZ~joOEepySR$ya zB{7p7?S|9Y=)h+ET()hFxqU6)KEHhp&wee1dG7AlxxqNRGtTUm!hH7(3oIyix(MuNT6NMsN-oP)cT(){&Z zE4tx=vXP5-ujR`fyKAU^d-nvMUG~VcVo&~Jzpp6Qr`LgHa3IPtpeyEvKkyGENiXrZ z5i~5>!~Q4yd(kbMcA8Ca^0#}2&**&7$brB;6^-hu(Xb^*t>+}Y>|S-R<&@c|Gee1G zj_r+MrT^L+;8~iU?&b>$wT;A5v2d6nl3`*yt~D92q}VEv1N3|8Q#qN|h5O2LSWIgF zjk$F6&-+ISzSuv8C6Bn}8K>v1Q~S!97}Un;VTnQPc4y74<=?0~aqIa-Zrp3>9Q!fu zXj~+F>3A`(#F#9@3`YoR_~XU&ONk}I$*7jlBP1P&JEUcBgRICvIicJGQ9KpZSIYH)$OyY+xRQX2`Z{~ zqx%R~BL78*?+B_x?V>I>a%J}g2(BYqprWE;ruz?oH6OUWcv7axAYgO#Ku}^X(cK_C$Gp>l;-@0=u*2p_P2c@h$E+JRb@oD5w z9WUqkCiNM|I8oFC^@rJYL?!c1, 2011. +# Toomas Soome , 2013. # msgid "" msgstr "" -"Project-Id-Version: findutils 4.5.7\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2011-05-05 16:28+0300\n" -"Last-Translator: Toomas Soome \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-09-23 20:08+0300\n" +"Last-Translator: Toomas Soome \n" "Language-Team: Estonian \n" "Language: et\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-15\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" -msgstr "Jagatud failide paisktabeli initisaliseerimine ebaõnnestus" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Käsu käivitamiseks %s jaoks ei õnnestu salvestada töökataloogi" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Standardsisendit ei saa sulgeda" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Kataloogi vahetamine ei õnnestu" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "fork ebaõnnestus" -#: find/find.c:205 +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "viga %s oodates" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s katkestati signaaliga %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Jagatud failide paisktabeli initisaliseerimine ebaõnnestus" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "funktsiooni fnmatch() korrektsuse kontroll ebaõnnestus." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" -msgstr "stat jooksval kataloogil ebaõnnestus" +msgstr "stat jooksval kataloogil ebaõnnestus" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "Haagitud seadmete nimekirja lugemine ebaõnnestus." +msgstr "Haagitud seadmete nimekirja lugemine ebaõnnestus." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "HOIATUS: failisüsteem %s on just lahti haagitud." +msgstr "HOIATUS: failisüsteem %s on just lahti haagitud." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "HOIATUS: failisüsteem %s on just haagitud." +msgstr "HOIATUS: failisüsteem %s on just haagitud." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -"%s%s muutus %s töö ajal (vana seadme number %ld, uus seadme number %ld, " -"failisüsteemi tüüp on %s) [viit %ld]" +"%s%s muutus %s töö ajal (vana seadme number %ld, uus seadme number %ld, " +"failisüsteemi tüüp on %s) [viit %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -"%s%s muutus %s töö ajal (vana i-kirje number %, uus i-kirje number " -"%, failisüsteemi tüüp on %s) [viit %ld]" +"%s%s muutus %s töö ajal (vana i-kirje number %, uus i-kirje number " +"%, failisüsteemi tüüp on %s) [viit %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" -msgstr "vanemkataloogi ei õnnestu tagasi minna" +msgstr "vanemkataloogi ei õnnestu tagasi minna" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "Turvaline kataloogi %s sisenemine ebaõnnestus" +msgstr "Turvaline kataloogi %s sisenemine ebaõnnestus" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -"Nimeviide %s on osa tsüklist kataloogipuus; me oleme juba külastanad " +"Nimeviide %s on osa tsüklist kataloogipuus; me oleme juba külastanad " "kataloogi, millele see viitab." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -88,18 +124,18 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" -"Failisüsteemis on tuvastatud tsükkel; %s omab sama seadme ja i-kirje " -"numbreid kui kataloog, mis on %d taset failisüsteemi hierarhias kõrgemal." +"Failisüsteemis on tuvastatud tsükkel; %s omab sama seadme ja i-kirje " +"numbreid kui kataloog, mis on %d taset failisüsteemi hierarhias kõrgemal." msgstr[1] "" -"Failisüsteemis on tuvastatud tsükkel; %s omab sama seadme ja i-kirje " -"numbreid kui kataloog, mis on %d taset failisüsteemi hierarhias kõrgemal." +"Failisüsteemis on tuvastatud tsükkel; %s omab sama seadme ja i-kirje " +"numbreid kui kataloog, mis on %d taset failisüsteemi hierarhias kõrgemal." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "hoiatus: ei järgi nimeviidet %s" +msgstr "hoiatus: ei järgi nimeviidet %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -108,17 +144,17 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" -"HOIATUS: %s viidete arv on vale (nägin ainult st_nlink=%, aga " -"leidsin juba % alamkataloogi): see võib olla viga teie " -"failisüsteemi draiveris. Kasutan automaatselt find'i -noleaf võtit. " -"Varasemad tulemused ei pruugi sisaldada kõiki katalooge." +"HOIATUS: %s viidete arv on vale (nägin ainult st_nlink=%, aga " +"leidsin juba % alamkataloogi): see võib olla viga teie " +"failisüsteemi draiveris. Kasutan automaatselt find'i -noleaf võtit. " +"Varasemad tulemused ei pruugi sisaldada kõiki katalooge." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "Haagitud failisüsteemide loetelu lugemine ebaõnnestus" +msgstr "Haagitud failisüsteemide loetelu lugemine ebaõnnestus" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "tundmatu" @@ -126,34 +162,39 @@ msgstr "tundmatu" #, c-format msgid "" "File system loop detected; %s is part of the same file system loop as %s." -msgstr "Failisüsteemis on tsükkel; %s on sama failisüsteemi tsükli osa kui %s." +msgstr "Failisüsteemis on tsükkel; %s on sama failisüsteemi tsükli osa kui %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "HOIATUS: failil %s on õigused 0000" +msgstr "HOIATUS: failil %s on õigused 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" msgstr "%s ei saa otsida" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" -msgstr "%s otsingu lõppedes ei õnnestu taastada töökataloogi" +msgstr "%s otsingu lõppedes ei õnnestu taastada töökataloogi" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Jagatud failide paisktabeli initisaliseerimine ebaõnnestus" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" -"-delete tegevus lülitab automaatselt sisse -depth, aga -prune ei toimi " -"sellega. Kui te soovite jätkata, kasutage ilmutatult -depth." +"-delete tegevus lülitab automaatselt sisse -depth, aga -prune ei toimi " +"sellega. Kui te soovite jätkata, kasutage ilmutatult -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -161,20 +202,20 @@ msgid "" "as those specified after it). Please specify options before other " "arguments.\n" msgstr "" -"hoiatus: te olete kasutanud võtit %s peale mitte-võtit %s, aga võtmed ei ole " -"positsioonilised (%s mõjutab eelnevalt ja järgnevalt määratud teste). Palun " -"andke võtmed enne muid argumente.\n" +"hoiatus: te olete kasutanud võtit %s peale mitte-võtit %s, aga võtmed ei ole " +"positsioonilised (%s mõjutab eelnevalt ja järgnevalt määratud teste). Palun " +"andke võtmed enne muid argumente.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -"hoiatus: võti -d on aegunud; kasutage palun võtit -depth, viimane on POSIX-" -"ühilduv." +"hoiatus: võti -d on aegunud; kasutage palun võtit -depth, viimane on POSIX-" +"ühilduv." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -183,17 +224,17 @@ msgstr "" "%s ei ole defineeritud grupi nimi ega ole grupi numbriline identifikaator, " "kuna omab ootamatut sufiksit %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "gruppi nimega %s ei ole" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "-group vajab argumendiks grupi nime" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -201,21 +242,21 @@ msgid "" msgstr "" "\n" "vaikimisi tee on jooksev kataloog; vaikimisi avaldis on -print\n" -"avaldis võib koosneda: operaatorid, võtmed, testid ja tegevused:\n" +"avaldis võib koosneda: operaatorid, võtmed, testid ja tegevused:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"operaatorid (kahanevas eelistusjärjekorras; kui muid pole, on operaator -" +"operaatorid (kahanevas eelistusjärjekorras; kui muid pole, on operaator -" "and):\n" " ( AVALD ) ! AVALD -not AVALD AVALD1 -a AVALD2 AVALD1 -and AVALD2\n" " AVALD1 -o AVALD2 AVALD1 -or AVALD2 AVALD1 , AVALD2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -223,12 +264,12 @@ msgid "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -"positsioonilised võtmed (alati tõesed): -daystart -follow -regextype\n" -"tavalised võtmed (alati tõesed, kasutatakse muude avaldiste ees):\n" +"positsioonilised võtmed (alati tõesed): -daystart -follow -regextype\n" +"tavalised võtmed (alati tõesed, kasutatakse muude avaldiste ees):\n" " -depth --help -maxdepth TASE -mindepth TASE -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -236,29 +277,29 @@ msgid "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" -"testid (N võib olla +N või -N või N): -amin N -anewer FILE -atime N -cmin N\n" -" -cnewer FAIL -ctime N -empty -false -fstype TÜÜP -gid N -group NIMI\n" +"testid (N võib olla +N või -N või N): -amin N -anewer FILE -atime N -cmin N\n" +" -cnewer FAIL -ctime N -empty -false -fstype TÜÜP -gid N -group NIMI\n" " -ilname MUSTER -iname MUSTER -inum N -iwholename MUSTER -iregex " "MUSTER\n" " -links N -lname MUSTER -mmin N -mtime N -name MUSTER -newer FAIL" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path MUSTER -perm [+-]MOOD -regex MUSTER\n" +" -nouser -nogroup -path MUSTER -perm [-/]MOOD -regex MUSTER\n" " -readable -writable -executable\n" " -wholename MUSTER -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NIMI -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context KONTEKST\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -269,25 +310,25 @@ msgstr "" "\n" "tegevused: -delete -print0 -printf VORMING -fprintf FAILI VORMING -print \n" " -fprint0 FAIL -fprint FAIL -ls -fls FAIL -prune -quit\n" -" -exec KÄSKLUS ; -exec KÄSKLUS {} + -ok KÄSKLUS ;\n" -" -execdir KÄSKLUS ; -execdir KÄSKLUS {} + -okdir KÄSKLUS ;\n" +" -exec KÄSKLUS ; -exec KÄSKLUS {} + -ok KÄSKLUS ;\n" +" -execdir KÄSKLUS ; -execdir KÄSKLUS {} + -okdir KÄSKLUS ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" -"Vigadest teatage (ja protsessi saab jälgida) findutils vea raporti lehel\n" -"http://savannah.gnu.org/ vï kui teil puudub juurdepääs veebile, saates\n" +"Vigadest teatage (ja protsessi saab jälgida) findutils vea raporti lehel\n" +"http://savannah.gnu.org/ vï kui teil puudub juurdepääs veebile, saates\n" "emaili aadressil ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." -msgstr "funktsiooni fnmatch() korrektsuse kontroll ebaõnnestus." +msgstr "funktsiooni fnmatch() korrektsuse kontroll ebaõnnestus." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -297,153 +338,161 @@ msgid "" "use 'find ... -print0 | grep -FzZ %s'." msgstr "" "hoiatus: failinimed Unixis ei sisalda tavaliselt kaldkriipse (kuigi teed " -"sisaldavad). See tähendab et '%s %s' saab ilmselt selles süsteemis kogu aeg " -"väärtuse 'false'. Tõenäoliselt on '-wholename' või siis '-samefile' test " -"märksa kasulikum. Alternatiivina, kui te kasutate GNU grep, võiks proovida " +"sisaldavad). See tähendab et '%s %s' saab ilmselt selles süsteemis kogu aeg " +"väärtuse 'false'. Tõenäoliselt on '-wholename' või siis '-samefile' test " +"märksa kasulikum. Alternatiivina, kui te kasutate GNU grep, võiks proovida " "'find ... -print0 | grep -FzZ %s'." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" -msgstr "%s eeldab argumendiks positiivset kümnendnumbrit, sai %s" +msgstr "%s eeldab argumendiks positiivset kümnendnumbrit, sai %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." -msgstr "See süsteem ei võimalda faili loomise aega tuvastada." +msgstr "See süsteem ei võimalda faili loomise aega tuvastada." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" -msgstr "test %s nõuab argumenti" +msgstr "test %s nõuab argumenti" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" -msgstr "Ma ei tea kuidas intepreteerida %s kuupäeva või kellaajana" +msgstr "Ma ei tea kuidas intepreteerida %s kuupäeva või kellaajana" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "Ei õnnestu lugeda faili %s loomise aega" +msgstr "Ei õnnestu lugeda faili %s loomise aega" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "hoiatus: -%s %s ei leia midagi, kuna lõpus on /." +msgstr "hoiatus: -%s %s ei leia midagi, kuna lõpus on /." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Kui on määratud POSIXLY_CORRECT, ei ole mood %s lubatud." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "vigane mood %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" -"hoiatus: te määrasite moodi mustri %s (mis on sama, kui /000). -perm /000 " -"tähendus on nüüd muudetud kooskõlla võtmega -perm -000; see tähendab, kui " -"enne seda kasutati mitte ühegi faili otsimise määramiseks, aga nüüd leiab " -"kõik failid. " +"hoiatus: te määrasite moodi mustri %s (mis on sama, kui /000). -perm /000 " +"tähendus on nüüd muudetud kooskõlla võtmega -perm -000; see tähendab, kui " +"enne seda kasutati mitte ühegi faili otsimise määramiseks, aga nüüd leiab " +"kõik failid. " -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" -msgstr "vigane tühi argument -size predikaadile" +msgstr "vigane tühi argument -size predikaadile" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "vigane tüüp `%c' -size predikaadile" +msgstr "vigane tüüp `%c' -size predikaadile" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "vigane argument `%s%c' predikaadil -size" +msgstr "Vigane argument `%s%s' predikaadil -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" -msgstr "Võti -show-control-chars vajab argumenti 'literal' või 'safe'" +msgstr "Võti -show-control-chars vajab argumenti 'literal' või 'safe'" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "vigane argument %s predikaadil -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "Kasutajat %s ei ole" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "-user vajab argumendiks kasutajanime" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Lubatud omadused: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "vigane predikaat -context: SELinux ei ole toetatud." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" -msgstr "-type argumendid saavad sisaldada ainult ühte tähte" +msgstr "-type argumendid saavad sisaldada ainult ühte tähte" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Tundmatu -type argument: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c ei ole toetatud, kuna nimeviited ei ole sellel platvormil toetatud." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "hoiatus: tundmatu paojada `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c ei ole toetatud, kuna FIFO failid ei ole sellel platvormil toetatud." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "viga: %s vormingu sõne lõpus" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c ei ole toetatud, kuna nimelised pistikud ei ole sellel platvormil " +"toetatud." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "hoiatus: tundmatu formaadidirektiiv `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c ei ole toetatud, kuna Solaris door failid ei ole sellel platvormil " +"toetatud." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" -"viga: vormingu direktiiv `%%%c' on reserveeritud tulevikus kasutamiseks" +msgid "Unknown argument to -type: %c" +msgstr "Tundmatu -type argument: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Keskkonnamuutuja PATH sisaldab jooksvat kataloogi, mis on find tegevuse %s " "korral ebaturvaline. Palun eemaldage jooksev kataloog PATH muutujast " -"(eemaldage \".\" või algavad või lõpetavad koolonid)" +"(eemaldage \".\", topeltkoolonid või algavad või lõpetavad koolonid)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -453,104 +502,111 @@ msgstr "" "Keskkonnamuutuja PATH sisaldab suhtelist kataloogi %s, mis on find tegevuse " "%s korral ebaturvaline. Palun eemaldage see kataloog PATH muutujast." -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -"Võtmetega -execdir ja -okdir ei ole lubatud programmi nimes kasutada {}, " -"kuna see võib olla turvarisk." +"Võtmetega -execdir ja -okdir ei ole lubatud programmi nimes kasutada {}, " +"kuna see võib olla turvarisk." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "Predikaadiga -exec%s ... + on lubatud kasutada ainult ühte {} paari" +msgstr "Predikaadiga -exec%s ... + on lubatud kasutada ainult ühte {} paari" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "%s korral peab %s olema üksi, teie kasutasite %s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "exec() funktsioonile antud keskkond on liiga suur." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" -msgstr "aritmeetiline ületäitumine %s päevade sekunditeks teisendamisel" +msgstr "aritmeetiline ületäitumine %s päevade sekunditeks teisendamisel" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" -msgstr "aritmeetiline ületäitumine tänase päeva lõpu arvutuses" +msgstr "aritmeetiline ületäitumine tänase päeva lõpu arvutuses" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "standard veavoog" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "standard väljundvoog" +msgstr "standard väljundvoog" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "%s ei saa kustutada" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "%s otsingu lõppedes ei õnnestu taastada töökataloogi" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "getfilecon ebaõnnestus: %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "HOIATUS: faili %s loomise aega ei õnnestu lugeda" +msgstr "HOIATUS: faili %s loomise aega ei õnnestu lugeda" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Standardväljundisse kirjutamine ebaõnnestus" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Standardsisendit ei saa sulgeda" +msgid "getfilecon failed: %s" +msgstr "getfilecon ebaõnnestus: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Kataloogi vahetamine ei õnnestu" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "fork ebaõnnestus" +msgid "warning: unrecognized escape `\\%c'" +msgstr "hoiatus: tundmatu paojada `\\%c'" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "viga %s oodates" +msgid "error: %s at end of format string" +msgstr "viga: %s vormingu sõne lõpus" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s katkestati signaaliga %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" +"viga: vormingu direktiiv `%%%c' on reserveeritud tulevikus kasutamiseks" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "hoiatus: vormingu direktiivile `%%%c' peab järgnema sümbol" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "hoiatus: tundmatu formaadidirektiiv `%%%c'" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "vigane avaldis" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -559,235 +615,556 @@ msgstr "" "vigane avaldis; te olete kasutanud binaarset operaatorit '%s', aga tema ees " "ei ole midagi." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "'%s' ja ')' vahel peab olema avaldis" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" -msgstr "'%s' järel oodati avaldist" +msgstr "'%s' järel oodati avaldist" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "vigane avaldis; liiga palju ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -"vigane avaldis; eeldasin leida sümbolit ')', aga see puudub. Võibolla tuleb " -"lisada '%s' järele predikaat" +"vigane avaldis; eeldasin leida sümbolit ')', aga see puudub. Võibolla tuleb " +"lisada '%s' järele predikaat" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." -msgstr "vigane avaldis; tühjad sulud pole lubatud." +msgstr "vigane avaldis; tühjad sulud pole lubatud." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." -msgstr "vigane avaldis: eeldasin leida sümbolit ')', aga see puudub." +msgstr "vigane avaldis: eeldasin leida sümbolit ')', aga see puudub." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" -msgstr "oops -- vigane avaldise tüüp!" +msgstr "oops -- vigane avaldise tüüp!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "oops -- vigane avaldise tüüp (%d)!" +msgstr "oops -- vigane avaldise tüüp (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"hoiatus: predikaatide hindamise kaalude tabelis pole infot predikaadile %s; " +"palun teatage sellest veast" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "teed peavad olema enne avaldist: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "tundmatu predikaat `%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "vigane predikaat `%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "vigane argument `%s' predikaadil `%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" -msgstr "`%s' nõuab argumenti" +msgstr "`%s' nõuab argumenti" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "liiga palju ')'" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" -msgstr "ootamatu täiendav predikaat '%s'" +msgstr "ootamatu täiendav predikaat '%s'" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" -msgstr "ootamatu täiendav predikaat" +msgstr "ootamatu täiendav predikaat" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "oops -- vigane konjunktsioonioperaatori lisamine!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Kasuta: %s [-H] [-L] [-P] [-Otase] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [tee...] [avaldis]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "vanemkataloogi ei õnnestu tagasi minna" +msgstr "algse töötakaloogi salvestamine ei õnnestu" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "vanemkataloogi ei õnnestu tagasi minna" +msgstr "algset töökataloogi ei õnnestu taastada" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "Ignoreerin tundmatut silumise võtit %s" +msgstr "Ignoreerin tundmatut silumise võtit %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." -msgstr "Võtmel -D puudub argument." +msgstr "Võtmel -D puudub argument." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "Võtme -O järel peab olema numbriline argument" +msgstr "Võtme -O järel peab olema numbriline argument" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" -msgstr "Palun kirjutage võtme -O järel number" +msgstr "Palun kirjutage võtme -O järel number" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Vigane optimeerimise tase %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -"Optimiseerimise tase %lu on liiga kõrge. Kui soovite leida faile väga " +"Optimiseerimise tase %lu on liiga kõrge. Kui soovite leida faile väga " "kiiresti, kasutage GNU locate programmi." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -"Keskkonnamuutujat FIND_BLOCK_SIZE ei toetata, bloki suurust mõjutab ainult " +"Keskkonnamuutujat FIND_BLOCK_SIZE ei toetata, bloki suurust mõjutab ainult " "keskkonna muutuja POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "vigane argument `%s' predikaadil `%s'" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "vigane argument `%s' predikaadil `%s'" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "vigane argument %s predikaadil -used" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "viga kirjutamisel" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "test %s nõuab argumenti" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "hoiatus: tundmatu paojada `\\%c'" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: vigane number võtmele -%c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "test %s nõuab argumenti" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "algset töökataloogi ei õnnestu taastada" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "algset töökataloogi ei õnnestu taastada" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "vigane argument `%s' predikaadil `%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "vigane argument `%s' predikaadil `%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "argumentide loend on liiga pikk" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" -msgstr "käsklus on liiga pikk" +msgstr "käsklus on liiga pikk" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "argumentide suuruse piirang ei lase exec() kasutada" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" -msgstr "argumenti ei õnnestu mahutada argumentide loendi mahu piirangusse" +msgstr "argumenti ei õnnestu mahutada argumentide loendi mahu piirangusse" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "argumentide loend on liiga pikk" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" -msgstr "Keskkonnamuutuja %s väärtus ei ole lubatud kümnendnumber" +msgstr "Keskkonnamuutuja %s väärtus ei ole lubatud kümnendnumber" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Fail %d lekib; palun teatage sellest veast, pidage meeles lisada kirjeldus, " +"kuidas seda viga korrata." -#: lib/findutils-version.c:60 +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Standardväljundisse kirjutamine ebaõnnestus" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Ehitamisel kasutati GNU gnulib versiooni %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Tundmatu regulaaravaldise tüüp %s; lubatud tüübid on %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "Ootamatu sufiks %s kohal %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" -msgstr "Ootasin täisarvu: %s" - -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Tundmatu regulaaravaldise tüüp %s; lubatud tüübid on %s." +msgstr "Ootasin täisarvu: %s" -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" msgstr "" "Kasuta: %s [--version | --help]\n" -"või %s enamus_bigram_koode < faili-loend > locate-andmebaas\n" +"või %s enamus_bigram_koode < faili-loend > locate-andmebaas\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -795,83 +1172,78 @@ msgstr "" "\n" "Vigadest teatage aadressil .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "viga kirjutamisel" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Kasutamine: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." -msgstr "Turvatase määratakase kümnendnumbrina." +msgstr "Turvatase määratakase kümnendnumbrina." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." -msgstr "Turvatase %s on väljaspool teisendamise piire." +msgstr "Turvatase %s on väljaspool teisendamise piire." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "Turvatase %s omab ootamatut sufiksit %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "slocate turvatase %ld ei ole toetatud." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" -msgstr "Standardväljundisse kirjutamine ebaõnnestus" +msgstr "Standardväljundisse kirjutamine ebaõnnestus" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" -msgstr "päeva" +msgstr "päeva" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "Argument võtmele --max-database-age ei tohi olla tühi" +msgstr "Argument võtmele --max-database-age ei tohi olla tühi" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" -msgstr "Võtme --max-database-age argument %s on vigane" +msgstr "Võtme --max-database-age argument %s on vigane" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "locate andmebaas %s sisaldab liiga pikka failinime" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "locate andmebaas %s on katki" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Locate andmebaasi maht: %s bait\n" msgstr[1] "Locate andmebaasi maht: %s baiti\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Sobivad failinimed: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" -msgstr "Kõik failinimed: %s\n" +msgstr "Kõik failinimed: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -884,28 +1256,28 @@ msgstr "" "Failide nimed kasutavad kokku %s baiti.\n" "Nendest nimedest,\n" "\n" -"\t%s sisaldavad tühemikke,\n" -"\t%s sisaldavad reavahetus sümbolit\n" -"\tja %s sisaldavad sümboleid, millel on kõrgeim bitt seatud.\n" +"\t%s sisaldavad tühemikke,\n" +"\t%s sisaldavad reavahetus sümbolit\n" +"\tja %s sisaldavad sümboleid, millel on kõrgeim bitt seatud.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" -msgstr "Osad failinimed filtreeriti välja, tihenduse suhet ei saa arvutada.\n" +msgstr "Osad failinimed filtreeriti välja, tihenduse suhet ei saa arvutada.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Tihenduse suhe %4.2f%% (suurem on parem)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Tihenduse suhe ei ole defineeritud\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -914,59 +1286,59 @@ msgstr "" "locate andmebaas %s tundub olema slocate andmebaas, aga sel on turvatase %c, " "mida GNU findutils praegu ei toeta" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." -msgstr "%s on slocate andmebaas. Selle tugi on uus, võib esineda probleeme." +msgstr "%s on slocate andmebaas. Selle tugi on uus, võib esineda probleeme." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." -msgstr "%s on slocate andmebaas mittetoetatud turvatasemega %d; jätan vahele." +msgstr "%s on slocate andmebaas mittetoetatud turvatasemega %d; jätan vahele." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" -"Te kasutasite võtit -E, aga seda võtit ei saa slocate vormingus nullist " +"Te kasutasite võtit -E, aga seda võtit ei saa slocate vormingus nullist " "erineva turvatasemega andmebaasiga kasutada. Selle andmebaasi jaoks tulemusi " -"ei väljastata.\n" +"ei väljastata.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "%s on slocate andmebaas. Lülitan sisse võtme '-e'." +msgstr "%s on slocate andmebaas. Lülitan sisse võtme '-e'." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" -msgstr "Vanas vormingus locate andmebaas %s on liiga lühike et olla korrektne" +msgstr "Vanas vormingus locate andmebaas %s on liiga lühike et olla korrektne" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Andmebaas %s kasutab %s vormingut.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" -msgstr "Andmebaas kasutab \"little-endian\" masina sõnade baidijärjekorda.\n" +msgstr "Andmebaas kasutab \"little-endian\" masina sõnade baidijärjekorda.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" -msgstr "Andmebaas kasutab \\\"big-endian\\\" masina sõnade baidijärjekorda.\n" +msgstr "Andmebaas kasutab \\\"big-endian\\\" masina sõnade baidijärjekorda.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" -msgstr "Andmebaasi masina sõnade baidijärjekord ei ole selge.\n" +msgstr "Andmebaasi masina sõnade baidijärjekord ei ole selge.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -982,153 +1354,168 @@ msgstr "" " [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" " [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" "stdio ]\n" -" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TÜÜP]\n" +" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=TÜÜP]\n" " [--max-database-age D] [--version] [--help]\n" " muster...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" -msgstr "grupi privileegide eemaldamine ebaõnnestus" +msgstr "grupi privileegide eemaldamine ebaõnnestus" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "setuid privileegide eemaldamine ebaõnnestus" +msgstr "setuid privileegide eemaldamine ebaõnnestus" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" -msgstr "Kõikide privileegide eemaldamine ebaõnnestus" +msgstr "Kõikide privileegide eemaldamine ebaõnnestus" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "setgid privileegide eemaldamine ebaõnnestus" +msgstr "setgid privileegide eemaldamine ebaõnnestus" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "hoiatus: locate andmebaasi saab standardsisendist ainult korra lugeda." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "süsteemifunktsioon time sai vea" +msgstr "süsteemifunktsioon time sai vea" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "hoiatus: andmebaas %s on rohkem kui %d %s vana (vanus on %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" -msgstr "HOIATUS: locate andmebaas %s loodi kasutades erinevat baidijärjekorda" +msgstr "HOIATUS: locate andmebaas %s loodi kasutades erinevat baidijärjekorda" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" -msgstr "ootamatu faililõpp failil %s" +msgstr "ootamatu faililõpp failil %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" -msgstr "viga failist %s sõna lugemisel" +msgstr "viga failist %s sõna lugemisel" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." -msgstr "Sisendi eraldaja määrangus on vigane paojada %s." +msgstr "Sisendi eraldaja määrangus on vigane paojada %s." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -"Sisendi eraldaja määrangus on vigane paojada %s; sümboli väärtus ei või " -"ületada %lx." +"Sisendi eraldaja määrangus on vigane paojada %s; sümboli väärtus ei või " +"ületada %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -"Sisendi eraldaja määrangus on vigane paojada %s; sümboli väärtus ei või " -"ületada %lo." +"Sisendi eraldaja määrangus on vigane paojada %s; sümboli väärtus ei või " +"ületada %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -"Sisendi eraldaja määrangus on vigane paojada %s; lõpetavad sümbolid %s on " +"Sisendi eraldaja määrangus on vigane paojada %s; lõpetavad sümbolid %s on " "tundmatud." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -"Vigane sisendi eraldaja määrang %s: eraldaja peab olema kas üks sümbol või " -"sümboliga \\ algav paojada." +"Vigane sisendi eraldaja määrang %s: eraldaja peab olema kas üks sümbol või " +"sümboliga \\ algav paojada." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "exec funktsioonile antud keskkond on liiga suur" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" -msgstr "hoiatus: võtme -s väärtus %ld on liiga suur, kasutan %ld" +msgstr "hoiatus: võtme -s väärtus %ld on liiga suur, kasutan %ld" + +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "võtmele --%s ei saa anda väärtust mis sisaldab `='" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "keskkonnamuutujat %s ei saa eemaldada" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "hoiatus: võtmete -0 või -d korral on võti -E kasutu.\n" -#: xargs/xargs.c:629 +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Ei õnnestu seada SIGUSR1 signaali käsitlejat" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Ei õnnestu seada SIGUSR2 signaali käsitlejat" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "Ei õnnestu avada sisendfaili %s" +msgstr "Ei õnnestu avada sisendfaili %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "Teie keskkonnamuutujad kasutavad % baiti\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" -"POSIX ülemine piirang argumendi pikkusele (selles süsteemis): %\n" +"POSIX ülemine piirang argumendi pikkusele (selles süsteemis): %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -"POSIX vähim lubatud ülemine piirang argumendi pikkusele (kõikides " -"süsteemides): %\n" +"POSIX vähim lubatud ülemine piirang argumendi pikkusele (kõikides " +"süsteemides): %\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "Tegelikult kasutatava käsu maksimum pikkus on: %\n" +msgstr "Tegelikult kasutatava käsu maksimum pikkus on: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "Tegelikult kasutatava käsupuhvri suurus on: %\n" +msgstr "Tegelikult kasutatava käsupuhvri suurus on: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1137,136 +1524,309 @@ msgid "" "of-file keystroke.\n" msgstr "" "\n" -"xargs käivitamine jätkub nüüd ja see loeb sisendist info ja käivitab käsud; " -"kui te ei soovi seda, vajutage faililõppu tähistavat klahvikombinatsiooni.\n" +"xargs käivitamine jätkub nüüd ja see loeb sisendist info ja käivitab käsud; " +"kui te ei soovi seda, vajutage faililõppu tähistavat klahvikombinatsiooni.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -"Hoiatus: %s käivitatakse vähemalt korra. Kui te ei soovi seda, vajutage " +"Hoiatus: %s käivitatakse vähemalt korra. Kui te ei soovi seda, vajutage " "katkestamise klahvikombinatsiooni.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" "puudub kvoot %s; vaikimisi kasutatab xargs omi kvoote, kui just pole " -"kasutatud võtit -O" +"kasutatud võtit -O" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dubleeritud" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" -msgstr "ühekordne" +msgstr "ühekordne" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -"HOIATUS: sisendis on sümbol NUL. Seda ei saa argumentide loendis kasutada. " -"Kas te soovite kasutada võtit --null?" +"HOIATUS: sisendis on sümbol NUL. Seda ei saa argumentide loendis kasutada. " +"Kas te soovite kasutada võtit --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "argumendi rida on liiga pikk" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Standardväljundisse kirjutamine ebaõnnestus" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "/dev/tty ei õnnestunud lugemiseks avada" +msgstr "/dev/tty ei õnnestunud lugemiseks avada" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Standardväljundisse kirjutamine ebaõnnestus" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "mälu on otsas" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "keskkonna muutujat %s ei saa seada" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" -msgstr "enne fork kasutamist ei õnnestunud toru luua" +msgstr "enne fork kasutamist ei õnnestunud toru luua" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -"xargs_do_exec funktsioonis ebaõnnestus errno-buffer lugemine (see on ilmselt " -"tarkvaraline viga, palun raporteerige)" +"xargs_do_exec funktsioonis ebaõnnestus errno-buffer safe_read (see on " +"ilmselt tarkvaraline viga, palun raporteerige)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" -msgstr "read sai ootamatu väärtuse %d; see on ilmselt viga, palun raporteerige" +"read returned unexpected value %zu; this is probably a bug, please report it" +msgstr "read sai ootamatu väärtuse %d; see on ilmselt viga, palun raporteerige" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "viga alamprotsessi ootamisel" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "HOIATUS: Ei tea enam palju %d omab alamprotsesse" +msgid "WARNING: Lost track of %lu child processes" +msgstr "HOIATUS: Ei tea enam palju %lu omab alamprotsesse" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" -msgstr "%s: lõpetas olekuga 255; katkestan" +msgstr "%s: lõpetas olekuga 255; katkestan" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: peatatud signaaliga %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: katkestatud signaaliga %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" -msgstr "%s: vigane number võtmele -%c\n" +msgstr "%s: vigane number võtmele -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" -msgstr "%s: võtme -%c väärtus peab olema suurem või võrdne kui %ld\n" +msgstr "%s: võtme -%c väärtus peab olema suurem või võrdne kui %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" -msgstr "%s: võtme -%c väärtus peab olema väiksem kui %ld\n" - -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Kasuta: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=eraldaja]\n" -" [-E eof-sõne] [-e[eof-sõne]] [--eof[=eof-sõne]]\n" -" [-L maks-ridu] [-l[maks-ridu]] [--max-lines[=maks-ridu]]\n" -" [-I asendus-sõne] [-i[asendus-sõne]] [--replace[=asendus-sõne]]\n" -" [-n maks-argumente] [--max-args=maks-argumente]\n" -" [-s maks-sümboleid] [--max-chars=maks-sümboleid]\n" -" [-P maks-protsesse] [--max-procs=maks-protsesse] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fail]\n" -" [--version] [--help] [käsk [argumendid]]\n" - -#~ msgid "cannot get current directory" -#~ msgstr "ei õnnestu leida jooksvat kataloogi" +msgstr "%s: võtme -%c väärtus peab olema väiksem kui %ld\n" + +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Kasutamine: %s [VÕTI]... KÄSKLUS [ARGUMENDID]...\n" + +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Käivita KÄSK argumentidega ARGUMENDID, täiendavad argumendid loetakse " +"sisendist.\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Kohustuslikud ja mittekohustuslikud argumendid pikkadel võtmetel on\n" +"kohustuslikud või mittekohustuslikud ka lühikestel võtmetel.\n" + +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null elemente eraldab tühiku asemel null;\n" +" blokeerib kvootimise ja langkriipsu " +"töötlemise\n" +" ja loogilise faili lõpu töötlemise.\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=FAIL loe argumendid failist, mitte " +"standadrsisendist\n" + +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=SÜMBOL elemendid sisendis on eraldatud tühikute " +"asemel\n" +" SÜMBOLIGA; blokeerib kvootimise ja " +"langkriipsu\n" +" ning loogilise faililõpu töötlemise\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E LÕPP Sea loogiline faililõpu sõne; kui LÕPP " +"leitakse\n" +" sisendist, ignoreeritakse järgnevat infot\n" +" (ignoreeritakse, kui kasutati -0 või -d)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=LÕPP] sama, kui -E LÕPP, kui LÕPP on määratud;\n" +" muidu, faili lõpu sõne ei ole määratud\n" + +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R sama, kui --replace=R\n" + +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] asenda R ARGUMENDID nimekirjas " +"standardsisendist\n" +" loetud nimedega; kui R ei ole määratud,\n" +" kasuta {}\n" + +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=MAX-RIDU kasuta ülimalt MAX-RIDU mitte-tühja sisendi " +"rida\n" +" käsurea kohta\n" + +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[MAX-RIDU] sarnane võtmele -L, aga eeldab vaikimisi " +"ülimalt\n" +" ühte mittetühja sisendi rida, kui MAX-RIDU\n" +" ei ole määratud\n" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=MAX-ARGS kasuta ülimalt MAX-ARGS argumenti käsurea " +"kohta\n" + +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=MAX-PROTS käivita samaaegselt ülimalt MAX-PROTS " +"protsessi\n" + +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive küsi enne käskude käivitamist\n" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=VAR sea alamprotsessidele keskkonnamuutuja VAR\n" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty kui argumendid puuduvad, ei käivita käsku;\n" +" kui seda võtit ei kasutata, käivitatakse\n" +" käsk vähemalt korra\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr " -s, --max-chars=MAX-CHARS sea käsurea pikkuseks MAX-CHARS\n" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr " --show-limits näita käsurea pikkuse piirangut\n" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr " -t, --verbose väljasta käsud enne nende täitmist\n" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit lõpeta töö kui suurus on ületatud (vaadake -" +"s)\n" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help väljasta see abiinfo ja lõpeta töö\n" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version väljasta versioon ja lõpeta töö\n" diff --git a/po/fi.gmo b/po/fi.gmo index 9d0232a72a8370472227c31eec4d7ad677306961..f244fd2707386be120e6925a1e8dfd46b0d41197 100644 GIT binary patch delta 14109 zcmcJU33weV{r>07&C-?keZKkn z&u`}3nX~-2v-EqHmB08{dHxrp54o{SDfJdogKYhXQuP#k=4hp){IW4hQKYVhcO!DW zKUS&x;6LDOc+YW4{T;pluYgaFQ))3hbG%aP;Pvn{_y%l*l@pZWR=E>YUcJoCB^1nu znUZVs`OS_s?WiSQ~o6Mh9=1b+f)TeVM9Du8J?1O5ui`-k&~ zF{rtazNr;ZG_w`XfmcG&<~QJZ@IlxO$LFV;8)2M+-@s9DJ++U9HmrpKl#1_!yrLe5 zC`r8q`G-yoDRc!)OhB>GJy1se zIFt&04rOHjfXm@b)Wl#^97>0;f;Yk2U=f}?%b4JI@Mu)9fR7hZ-iTTlNM2pc%_$Uo z0m?{!1~I1^IoI@XHk1yohMn+}A%6#>Jg==%Y6pA(Vs=%>aAhFt;YfHMlmR87nC@OE z1GB2>9PO)9xLHVn2fN{2Z~;7K9(IB&;9B@Tq)oM&FcD|%foH;d;C5I}@1+A5!c*Zb z@Lu>bJPTf4X9n^MC>lJTO5UY?)x?cdxSUo`h5-~6-3!s0dJ|p;kNzkT0B?sYU=uHk zX|9CQ@EuSF(htYN_uwWtib4jhk`Sw?Tj5Sj@i@%WdDTg4@<9QjeRVgy5Z$Qz|2XHDJyWCW?07}O;hR-)Z@sZt7-g^UDupBiB zr$Y(f6;R%b=eaqVn;YN^_#_mY|2HHu)x^_`%}#}6SJe&2!;9f0cq5b%-Vde2Ps8=_ zbtv`Lp{_J^p*Y=7q5NKs104hN?c7Y^CJIHRm%?#yH{_psia*k!(M=||FM*=+??TCV zFG8vK53mwWSZPMO3_i{Cc~HW;`gEhQZg@nQQlEl!Fs}-$j0t`S#rd9vN5l7_^zg`L z8sLNDp^Us~wQ;7+P)yPbMH5#;QTbi)Bk=oB2J#F%6TStpo?5nsghYKGgN+jZKVXKT zEj5xL7n^K=;!Kx7@#aS${-df}jhCn3i9G)tMxe|*%Rx1K9eVIhcm{et5-vQ$n643i zjfT&LU!r_uJC05J>V9rSCF?ts`Yg}qY%o3j6QnLxyU}?4B~Uu@1e9<(gke1or$ADI z`ZK%&&LZ2;hI#;stw-R|hf{wCypHG1=P30f_(z!E&CMfZ2~m-MF6xC(!dKw2o6!dR zJw#ioaSI^>uZ8%RdI_QgHR(L_oeO91{8cEv@B+LXz6+&;cqa{yzR=`}hp7E{%HM(W;HZmP zJ;UYjH25rB0LOmJL`ySV&-2Z21?{Wfa)W=UY96Rt-3aA_Q9H~kwh4~sdD0~&v(<%M z3`bCY8kF}}Lg~nba4NhBw!#Nt6Flrv!xkvMb3K%Gr+S*3Q{bQB3^@1W#u?YcdY-dz zEW969!zbVo@Ev#z{AXBxG!7E*Tn|rxUxU-(GjIz03p@#qzT8C5qRY|$Dhke}KumB4 zTnwLs;zUP%!i3F=kQYJe=-0#N-$Qx7@{^{*t#BdFABSSHhoSh&+fX!f;uR(_ErVjp z*cGUHJ~!7=a4hVH=fD@CR9y2Z7Mw5vMP+}1M4*~?rFs8WSjY2ya2b3J%1EbNWfrIP zP)zd$$l%pa;8AeX)kYI;o*QZCGjKM163&2sg|EO#pEgeUH#mpq#n&*BGNJ-5<@u6p zO}IV^EuNo(74Q#mB>X#^%ln7nk(E5x5sTs*XF=(Bemgf}t9zlm@B^qTfb!zs;dyZ4 z^=1y}gR*#hB7AmkFnQnsIG6X{gB@_@jjSc$MQ|1T021M9)n|=H9x=?TKXD@;oOF}v z>4i{6c-PHlWc|08oc$c6So_HZ@DfBi{6j=ECYPoEvI&7dLry|oM;y>NUPNay4Ipq@d%XJ(g-v4vt zSp-*7q#S+azX0As{u9CJ)x*g55V`Oj^*McKQmEXX6+Vl}wjy_j&ugIAS+1$bV+cN~ zzKql&k0RTU)rgH?UAgjVv$@fUBD@`d#IjrgBARMOzJn}4K8j32O4qC0d=q)FQ~=i_ z4Y>K<@==;0h#*$c2CE3FOz%N4}59C2@Zr zBGFU2zRk@&$aTm}M6PiNKCf0HYh_g5LJmP3M6OokQ^*tY!1W7c7xGKQLyktSMD9RJ z*A3iMhYvk)6!H}E1LTXyN09rGGZ48>M2KLOFUS+ukw^mhDH26WSDKq!k(ZEHkO&e- zb|71jlaV^)^GNB6akH`X5b{)b8!~rzd0wYgDLWH+0qI4~Lmo$Rh+HiOIu*<98{xBL zIJxE-=(8iay$d-Fxg5C>DP1pfGZwiQxeU2l?EhnKO4l-O%8@sbCgewmT!$iy^xfc} zHg3O)+=5I%zJff5bRl;ldtOT^n1eioq>ytF?bXZWW{>ONcpe{?ZHK2L;<@kA+IPp` z3&{J(D26iwIR$A!wjviHHzW5U-$q_Q{tGF`jtj#&dDK^a2Ka#Me15DC3ngL5B{@NU zyPDp}dvZx9r0koNNeId%8k4d=QnpH$43;e-frx*|ReCQ)S!lAE1BJIy*l6C<8B1>G zBU16~&lheRHL2|u9H=sUrPPn_QMNoRE7gDaP80f4Tq-+e#cJ7EN8nLR4DUyB$CN`QOEZqe$opfJ$AN!V?!Ii`A$$M z``B@LOCH^{6^*;em=(V4_=Dg3aj!R$bW?8N5AA>yTVb)s=UysB+q{@|tfZ6f4&sAV z^f+1H<)u9?FBfE{<^rqqvzzYnvMD=|S4-n4iaZ4HebOK*(hV`uHaiCLX}*1$(q2Um=A zgHL+nRPJXm&k_swwL6oj_WYa|U2CdL((87kcG7BE zx3c8N{G`X~$XFe(Yg2tw>x#|8YjMucxji;68(4v7MVc&LvD_{L-|{m~)a`Pe*pmF- zT^e4KWqCo|$@aQF?a7^E5teDsatI8sOIr;~WJ|qrrB|V^ZmMq^)~~P_cgG6Nt<4?H z4f&QxL)+=?R<9extu)T=TVnKs_e%T1a1U4_BcyKM%B2TJcn~9M{oB5ehglb1to54Q zG!QhydM|qMNf}8ytCiYfbrMD~r_0VIaZdDH@_LVSA>nrLQFP|_h)5a2K=Ve^IC{xk zx_@cWu!KH=VM0%9P@8Sf(AU2V1`xqsN@`&&Oa947g>E`rtV_Vi_}G}do*FQ{*i8SdO%%wt%mAGpsd$eoL#PA;8Z2qn+3rMhf#?=} zrF13Rr4pI;_NYJ}buns~!rM6I1&%e#cN{C?&laC?wnrT&=EN!r4~(5uymajA<@uQ^ z67*#pt1>#^RJlyX%j%rxL~U`LmCY;H`8pr!>^kr}GnX{O^b^QjW_7vbv|c79+#o~J zj-j;b1J|F|4YYg24*iRHUiSZ~A>EGTk(lLs(S$=_itFY7Nm)>wY?c)!uyihW55vY}=hC{l}R`l1^4N?)gUD9&Z%$6PA`0 zemyZh-?xe6UN4&vr;52*CmML!KFPdZHbx%6X|>~*ToEG{mQ6Y}A9MU@*3Iy;Rf(A; ziinKF66{ZakOLfX8$1F-;sZ8Wu)B)Vl#}XoWEzl~-E=gWi!u9=9|K$aNU2^~2zfd! zNH(QXg05GVd-TW2WXE{1T+}hulYE#-Q`N=ZN$K+WRwYRmKLn{9AK96VLn>zaWfkWn zyQ*|P?(=ek`LgiZ37aOAa*nmN(y#PqN<$F|nPTnaSb3fmgw~79(L}TWq>I${i4p^8{zS2z=c1|5x ze0Az~%ht9Hra&_r4tBy!mElY&9Zg9x9{gP|lk|kBmp0WE6~&#?ZY;x;Nk^6-WOZ46 z<^oR^qAVwps5_TUlR?uK%cV>ZH_BsOon!8bc}&B2qV8mG+$p^zsRRFUy1Ho7l(%y1}=*oyFo2o7S!GXkOR4 zxw^V~UHVEW@8q&NGPaL-lY=JG21RoNUnE^x z(s|oVCEu>O=TP77a?UGkt8E<_O?pxRi8kpJAE>>hY@(ZX0~g2KE1nAr=Wjl_%S0HC zt%H8QFRLLhnw`=ZIz6P6b(1L{L3yDtfB6xEL;KGBaU+g#@Vq`O8YlfRbrfGb`JA#- zjAJud@p6htmK@e8i)y|2v@I5*IZ{#FjmArf!MC>7&n#A-5-BU*wdhA><7LGxfr)E+ zQ5NDB*@TvgnI${R3$=9sVT#7foowOIWlO4>LdPO& znw6^dS6Nv_YDj)~pExqU7^|)*)Gm8CFLewqYXg%d#ZNO?Cq}%`A4djZc5zYdCA!CA z^}%;4{R1XR)oW*E^|YAfDcRWTPLqV#*!soymVKhUytb}zX+z^j7es0nMrs#XwY7`u z7S64yt*NP4zb?||^tiIyjI5wDi>%+DOeJZWq_p6yI$aaY%lD8|rlbuD+mu zmxZK&mtmdbSletXP!o1L^XzDuU| z^K8f+*Z1wg3iq?kE_EntZ)3@v@ML%AW!)Y(;|4jVjbw629i@%5>EyuQAV-kUE%S50 zUS=e2H!!HeJ573vy>#W>A7YDbTZtUuIk0j05S#2os8k1&qS*dj=^^WO$7Qt@-`2k? ziCgFWzW&|#CgYRG54GVQq7%IqJkWmI&!Iasu}4n^w%vIj!?+BQF*h;O4o&y~FoS&eF~q{qHo>SA9mhf#wsXjKf`n&=u@cIEJnx=iAvHd~q;d4(x~Uth+rwbn73<+9crMU*5{F zegE)A^8dQAgqwbuQf1qpaG2-CTMwwLqlRg#FmrWq(#D~)sKjD2;iPoZa#(43%r-2} z+`?O{XOC;w)21wP@FgsZeeE8*aK_rPWi5qkDG4Zt2@Yh;|iZ!^Nqs#md6SWYi~cb zgE7RhyW|>rAP$8Oka`Ak5=W*(Gm?|=U0gFRYYg8m{CKS^XA=o?HsQ+Q1nUSwonzl* zN{24)ujhJ?C4m&BIn8vlakECLw$|n(&9UwBWntDA=xDL}XeQ`$eQBvQXY{bW;XRi( zhz^#9ga}%4Cy_Jt_o+XA@igg6y~1MS6F(+k&}sJImiH|beYm~lRnfaJlfV& zeC3R@%Jb{(1Un@bDSA~bi8Y<3mpqn|H!C~xn=HGWftvJ#*JB42necnuoYCnQbOk)8 zFr`n4sK6|0lYQ~N;q@Fst<{Cvj_JkgI_k>vYh=01L~l0h8yi}hJKCGgc0J7Qd#*j2 zJ7mY+9xiT6FO~Z4(3-vXC$hF<%>BDc?=ePMi;R{TVd#prx}x~_#zI-X!{bDs-G>}W z=))3|){JYI6BC;ZC#G>N!qP11!)c0r%fRu8SznaqFAml9Ns6Qe&Sm+3#?Y_{PI(4j zirI4ZBDp%Ox_?)-CDUwN?>5EtSl`Jk#zrY&lYr@--plpisumH#(TezKsfVSiadUIV zQeEsg>#Jp>a~$3#>;#KgKZEBwPEag6XU>Sp9XZl4heGs#2+wX~m_$zhE*&<7Ih(&+ z{NmRBvJYduO?xaIn>);jONX7^h9Bys7j8Ag`4%g-kL#LQZZ5Xg*fAC;dMc4~m&m}T zQnoJX!quH$I%Qb)^ZU|4AN^zlxyN#HuLN4$8hxkyut5GZE-0MaRk>=*Ca1|9=p@$2 zk&euaC3nHdD{Iy=MzGq(#oY#kcX% zVf~84JF5BrUnbxoRp^Bwrx^(|5>{VBr=Yvz>qm9wI7P{Fz{DYyoHrH@b)9j{S=;EV zEeV?c(lyhQU5vU@%ctAPM2>}O|1NY!x*wkXGj@{T5`7ddO>8;vyJn`4cTd>I8HAY( z!-;8@KER5QolQ{h<9%b&!gGoE=)Emnn3jC6czo))@}p8RSGer+GMSuPeA~OGtg#eZ z=Aa9+$wZ)CTjoX7ki&*OtP^FK#Drny8Iwuyv3jJ~cmArfVx|95*+|oXB!jG;$cyg> zjU!HFza|-ieI0*fQ>&MtqC>pI$?<>GWM5p_lLP$(E3Y2XF%?%K`z98f`pS;@U!JjEasU7T delta 6686 zcmb`KdvsLQ)xggTC=%oy9`caOBM=^w2T2TxhVT@E5MBYIG2$e1lU!#qcQSJ)B!G@6 zXlkVvE=XI&S0h@XzHTdhyD+t@zUWh0Rw>mMS8Z3H&{}J4zwfv2ok=3vKfblTv)uWe zv(LHb?6c3_d+^N{{omW|Pn{h#@SsmAbsQ-`-n~RAABsnYK*rs}l^O((!S5r|CXHka zC&StBRrpW%H`oRLG)k#)aNB65PQ&})N@!#&RSlnqrO-D!KnpwE~m2sisdy>EVrS=!%=t@JOfMNXiceRcpWT;4m=Lug>&H} zxTgrd4!1zLT?eRza`2B}CHyn2<$RTo|F1#O1;r&V!{5mQC>x#TJ;Z>aIi3fWL2>DA za36dEcEhrnN-cwDAO zb?$*v=P?J5L8jChI3EsT7x6$jTntTU!slQcoSMfRwBb>B67uY7JDU-&>VS~*)loWP z;Y+XregK!k1^8b)uoFr&KMTo9bs{}}1Ii80rpF&bysm~47z1HGyc8Bg(O(T~U_F$W zc^;;+>HL5W&#TTsSvZjEi6Jwgj6+b~_AV&vo`)Lzahew(ucflFR-S4B&&O0fl_H41Y%94k%CXdnohSB}xs4IwXKq67q>U0L7Kxhw}En zf)X1u*sKe#fn=yU1!ccKL&8N}fx9(WS&IKp(zzLh+%$iIQiFX;t%uh!t|RC8Mm+(= zm1m*Ez&mgl9Ki#NVN>92zRQPl)9bIsXxIiPz`LM$?ol`ho`7TFD=9i#=)46h;Q~^j zij6v;#K23ugSh@uavAtz--AD4JmOl46g&s3;j9%(F{Rp}y!E$W4tyK# zfrD0hH{J{HW&C9*o-42NvQ39qO8)QlI_emdo4f||;6LFAn7hg|qztmR+6ZOc15kqL z6*vq27EXo3c{dV46+&K7HKh3foXPm7a0>hvoW}WT;%cwdE`;)?UGN5Y2uhlqha`p? zzQ&94#gK4OI+Q0m3M(09x5l$EC>JDKS6OQy&Q$x-<6pq-jK^=n z{}SCco%i9ZFc0=@_HKM0Ze=`!2o-~NLy6}1pxk_9Ewuq|f^ws8z!I5U-4;9Pj_2K>L1&WJh!5blL|NiDt6dn+5xWBd&$2mTf|!@2d|8{6=tU#aiH zIq2=1l{&(~-+^)wy+NtZ!UIqY%xUyWb`VxGzP}Ow^9<@86yo};xK0z?0k^|n!(v#^ zL!N^B;W%ipXd>JNr@+HdHvBeR4ll<_;Rd(}ehyB8r=fiJUYes)JZuGuJeUn5a2DJJ z2g5HxDKHLnp9acPoQKn4$navJ3(jQx1e^v>!j)7IFz@) z6>f!x;dSueQ2rfJ)$Wadx6O<8k`BDed=SdhoP))juL7OkjT>MM<3msk`2&=jjNjo| zUcA$bjinH^+KAkY$Y#>YkZTYL(61u*A`cmC+w(GK8T}zh>T~?TU^n=H`*T?= z9hw9lURBf`#bw-#_!Jy~97B#EWS(1;RzPXuIcdb5TNU$RHS#1P&-Vz@uWfdJR;Qxj zncONj9f~^#BGS05`|q}=;c-#W#&~c8RGwflvL&rs0I#(RM~_b3l-5ju4$UKC=QKOMP2jnurMW82wltT*(sbWWGZ%gyX+(x0qmbQ52_mg*5`Weq5gDc1 za(F!=dA1pO4B3QCMAjnR$PPDp$WFIO?U{^pA%)0SkQb1l$g_yF2R!ut4W)Z?U=|YW zouORNe?C2)o#yH^qfp%TxIl`cGz}q~RG3USH=GV}JP9d4mLauB1i2k~5cwMNI`S6s zH{`OBN+tL<=+2_c_m=gp8_rqsz|t}X6iL*`#$QO;w`EV*kVT^9xGVbXC`Gp@t;_7+ ziEiCRy4TPxyhu0X4(IpTmfwzzukgIjyU(_l>4R{QNuEV5hI~%iI!ko4+WZxh_1B+6D^t* zY>4RgiJ37wKC95VI=97dpP94C-ZZbs*)uoSZ%@k`Td>9q>FlT(2`y?`T02{Xv~4YV zR9m-pV^!_y>$fglyJ5rfr8Tm`jOIC|c`y5%RRsrp_PS)Y^U(Y@pQ9C@@!KOy52gxY zajTmtF_i(M<8NE^;AN>i_~StiF)_!-eFxuZ@0eRsa0BBk41uwdgf%K zuD`?(*~m`b5h{a~poZwTXVW3lKI9X2N?0y~D8F`$Ww^JQ)obO#!_%W_7wc z%yfgNLLw-$gZ;zpV|WFdEY8((xvjOSbA!j&cr_zUI4P%i;~yRn;rXwbf?A z(k$LSteH((PRMzwZ1(`Ct)j$dzrFBL`|iqW=iSQvKKsbxRd(}|O6SCqfdiaV%WHj3 z^NM-C>2W<6;ytWnJgSGZWK{2n>5Ud$A~Q*(hOXA^$18K4{VU(_Ii0H>^xHSBDYRc* zbIcyRcBpfqy36k?wQpU&bZB9qpd?UOs1=lzmn^W~SU+)SL7<>GFuz1AEGaK8bN;@5 zz(9M*7B~A=ZF$o9*-gs^*hd-@*KG)f^=MSLtfUt1>F%_wo^G^yWy&V$Jy;P*$|ezm zuZJcN>9@k})Q{VRP2ZWZDu^eenw35+>ehvT z6--9Z;?RVZOxP98SJ)pk9khSdT;DOk9!)%lqyXF=H{pF&+*Zx0q2=!db8Dz4gVjZXTt)g7V)N^`)Rxm~eu` ziW}`ltK2N!(=BI6srmSXn@qixMvBfStjS9CR=p}MY{uJz$;3x5VAOqF?QY#$i#}n# z&uFPg?zx#vwLW5cAl0u#{kL^}yGhM*S9vz}cY<4xGWF||*7WTnwai^X)k-Dw1U~Kc z=EbEgv+km0ZlU}CsB@zudPU~(GeITAZi0s2rLvh?T`&?(X52^Nbk1#m(`S#kb(}w> z*>i4vZY=pg@{_pUHAq_td3$wel9PSg1^;EudX%U&LiW&IInIt<<9(C8Y7tIaiDXdI zJM_lf*#XNWv^XzlAH8FGP4AvD(@0psAi>cRBJ, 2002. -# Jorma Karvonen , 2009, 2010. +# Jorma Karvonen , 2009, 2010, 2013. # msgid "" msgstr "" -"Project-Id-Version: findutils 4.5.7\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2010-04-25 15:49+0200\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-11-09 20:20+0200\n" "Last-Translator: Jorma Karvonen \n" "Language-Team: Finnish \n" "Language: fi\n" @@ -18,34 +18,71 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "" +"Työhakemiston tallentaminen komennon suorittamiseksi kohteessa %s epäonnistui" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Vakiosyötteen sulkeminen epäonnistui" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Hakemiston vaihtaminen epäonnistui" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "lapsiprosessin luominen epäonnistui" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "virhe odotettaessa kohdetta %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s keskeytettiin signaalilla %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" msgstr "Jaetun tiedoston hash-taulun alustus epäonnistui" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "kirjastofunktion fnmatch() järkevyystarkistus epäonnistui." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "komentoa ”stat” ei voi suorittaa nykyisessä hakemistossa" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "Ei voida lukea liitettyjen laitteiden luetteloa." +msgstr "Liitettyjen laitteiden luettelon lukeminen epäonnistui." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "" "VAROITUS: tiedostojärjestelmälle %s on äskettäin suoritettu unmount-komento." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "" "VAROITUS: tiedostojärjestelmälle %s on äskettäin suoritettu mount-komento." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -54,7 +91,7 @@ msgstr "" "%s%s vaihtunut ohjelman %s suorituksen aikana (vanha laitenumero %ld, uusi " "laitenumero %ld, tiedostojärjestelmän tyyppi on %s) [viite %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -64,17 +101,17 @@ msgstr "" "%, uusi inode-numero %, tiedostojärjestelmän tyyppi on %s) " "[viite %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "paluu ylähakemistoon epäonnistui" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Hakemiston turvallinen vaihtaminen päähakemistoon %s epäonnistui" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -83,7 +120,7 @@ msgstr "" "Symbolinen linkki %s on silmukkaosa hakemistohierarkiassa; olemme jo " "vierailleet hakemistossa, johon se osoittaa." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -100,12 +137,12 @@ msgstr[1] "" "inode hakemistona kuin on %d-tasoa korkeammalla " "tiedostojärjestelmähierarkiassa" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "varoitus: ei seurata symbolista linkkiä %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -120,12 +157,12 @@ msgstr "" "päälle find-ohjelman valitsin -noleaf. Aikaisemmat tulokset ovat saattaneet " "epäonnistua sisällyttää hakemistoja, joista olisi pitänyt etsiä." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "Ei voida lukea liitetyn tiedostojärjestelmän luetteloa" +msgstr "Liitetyn tiedostojärjestelmäluettelon lukeminen epäonnistui" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "tuntematon" @@ -137,7 +174,7 @@ msgstr "" "Tiedostojärjestelmäsilmukka havaittu; kohde %s on osa samaa " "tiedostojärjestelmäsilmukkaa kuin %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "VAROITUS: tiedosto %s näyttää olevan tilassa 0000" @@ -145,15 +182,20 @@ msgstr "VAROITUS: tiedosto %s näyttää olevan tilassa 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "ei voida etsiä kohdetta %s" +msgstr "kohteen %s etsiminen epäonnistui" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "työhakemiston palauttaminen haun %s jälkeen epäonnistui" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Jaetun tiedoston hash-taulun alustus epäonnistui" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " @@ -163,7 +205,7 @@ msgstr "" "valitsin -prune ei tee mitään, kun valitsin -depth on päällä. Jos haluat " "kuitenkin jatkaa, käytä vain eksplisiittisesti valitsinta -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -176,7 +218,7 @@ msgstr "" "on määritelty ennen sitä aivan kuin myös sen jälkeen määriteltyihin). " "Määrittele valitsimet ennen muita argumentteja.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -185,7 +227,7 @@ msgstr "" "varoitus: valitsin -d on vanhentunut; käytä sen sijaan valitsinta -depth, " "koska jälkimmäinen on POSIX-yhteensopiva ominaisuus." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -194,18 +236,18 @@ msgstr "" "%s ei ole olemassa olevan ryhmän nimi ja se ei näytä ryhmän numeeriselta " "tunnisteelta, koska siinä on odottamaton jälkiliite %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s ei ole olemassaolevan ryhmän nimi" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" "argumentti valitsimelle -group on tyhjä, mutta sen pitäisi olla ryhmän nimi" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -216,7 +258,7 @@ msgstr "" "lauseke saattaa koostua: operaattoreista, valitsimista, testeistä ja " "toiminnoista:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -228,7 +270,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -242,7 +284,7 @@ msgstr "" " -depth --help -maxdepth TASOT -mindepth TASOT -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -257,23 +299,23 @@ msgstr "" " -ilname MALLI -iname MALLI -inum N -ipath MALLI -iregex MALLI\n" " -links N -lname MALLI -mmin N -mtime N -name MALLI -newer TIEDOSTO" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path MALLI -perm [+-]TILA -regex MALLI\n" +" -nouser -nogroup -path MALLI -perm [-/]TILA -regex MALLI\n" " -readable -writable -executable\n" " -wholename MALLI -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NIMI -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context KONTEKSTI\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -287,7 +329,7 @@ msgstr "" " -exec KOMENTO ; -exec KOMENTO {} + -ok KOMENTO ;\n" " -execdir KOMENTO ; -execdir KOMENTO {} + -okdir KOMENTO ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -299,12 +341,12 @@ msgstr "" "pääsy webbiin,\n" "lähettämällä sähköpostiviesti osoitteeseen ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "kirjastofunktion fnmatch() järkevyystarkistus epäonnistui." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -320,49 +362,44 @@ msgstr "" "jos käytät GNU grep-ohjelmaa, voisit käyttää komentoa ”find ... -print0 | " "grep -FzZ %s”." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" "Odotettiin positiivinen desimaalikokonaislukuargumentti predikaattiin %s, " "mutta saatiin %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "Tämä järjestelmä ei tarjoa mitään tapaa löytää tiedoston syntymäaika." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "Testi %s vaatii argumentin" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Ei voi kuvitella, kuinka tulkita %s päivämääränä tai kellonaikana" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Ei voi saada tiedoston %s syntymäaikaa" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "varoitus: -%s %s ei täsmää minkään kanssa, koska se loppuu merkkiin /." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Tila %s ei ole kelvollinen kun POSIXLY_CORRECT on päällä." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "epäkelpo tila %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -374,22 +411,22 @@ msgstr "" "perm -000 kanssa; toisin sanoen, samalla kun sitä käytetään täsmäämään ”ei " "tiedostoja” kanssa, se nyt täsmää kaikkien tiedostojen kanssa." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "epäkelpo null-argumentti valitsimelle ”-size”" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "eläkelpo ”-size”-tyyppi ”%c”" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "Virheellinen argumentti ”%s%c” valitsimelle -size" +msgstr "Virheellinen argumentti ”%s%s” valitsimelle -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -397,75 +434,91 @@ msgstr "" "Valitsin -show-control-chars ottaa yhden argumentin, jonka täytyy olla " "”literal” tai ”safe”" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Virheellinen argumentti %s valitsimelle -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "%s ei ole tunnetun käyttäjän nimi" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "Argumentin valitsimelle -user ei pitäisi olla tyhjä" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Käytössä olevat ominaisuudet: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "virheellinen predikaatti -context: SELinux ei ole käytössä." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Argumentit valitsimelle -type pitäisi sisältää vain yhden kirjaimen" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Tuntematon argumentti valitsimelle -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c ei ole tuettu, koska symbolisia linkkejä ei tueta alustalla, jossa " +"find käännettiin." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "varoitus: tunnistamaton koodinvaihtomerkki ”\\%c”" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c ei ole tuettu, koska FIFO-puskureita ei tueta alustalla, jossa find " +"käännettiin." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "virhe: %s muotomerkkijonon lopussa" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c ei ole tuettu, koska named sockets-rakenteita ei tueta alustalla, " +"jossa find käännettiin." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "varoitus: tunnistamaton muotoilumäärite ”%%%c”" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c ei ole tuettu, koska Solaris doors-rakenteita ei tueta alustalla, " +"jossa find käännettiin." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "virhe: muotoilumäärite ”%%%c” on varattu tulevaa käyttöä varten" +msgid "Unknown argument to -type: %c" +msgstr "Tuntematon argumentti valitsimelle -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Nykyinen hakemisto on sisällytetty PATH-ympäristömuuttujaan, mikä on " "turvaton yhdessä find-ohjelman %s-toiminnon kanssa. Poista nykyinen " -"hakemisto $PATH-ympäristömuuttujastasi (toisin sanoen, poista ”.” tai " -"edeltävät ja jäljessä olevat kaksoispisteet)" +"hakemisto $PATH-ympäristömuuttujastasi (toisin sanoen, poista ”.” " +"tuplakaksoispisteet tai edeltävät ja jäljessä olevat kaksoispisteet)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -476,7 +529,7 @@ msgstr "" "turvaton yhdessä find-ohjelman %s-toiminnon kanssa. Poista tämä merkintä " "ympäristömuuttujasta $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -485,95 +538,101 @@ msgstr "" "Ei saa käyttää {} työkalun nimen sisällä valitsimille -execdir ja -okdir, " "koska tämä on potentiaalinen turvapulma." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Vain yksi {}-ilmentymä on tuettu valitsimella -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "Kohteessa %s alkion %s on esiinnyttävä itsestään, mutta määrittelit %s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Ympäristö on liian iso funktiolle exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "aritmeettinen ylivuoto kun muunnetaan %s päivää sekuntimääräksi" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "aritmeettinen ylivuoto kun yritetään laskea tämän päivän loppua" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "vakiovirhe" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "vakiotuloste" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "ei voida poistaa kohdetta %s" +msgstr "kohteen %s poistaminen epäonnistui" + +#: find/pred.c:718 +#, c-format +msgid "WARNING: cannot determine birth time of file %s" +msgstr "VAROITUS: tiedoston %s syntymäajan määritteleminen epäonnistui" + +#: find/pred.c:782 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " -#: find/pred.c:580 +#: find/pred.c:784 #, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "työhakemiston palauttaminen haun %s jälkeen epäonnistui" +msgid "Failed to write prompt for -ok" +msgstr "Vakiotulosteeseen kirjoittaminen epäonnistui" -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:1208 find/print.c:1234 #, c-format msgid "getfilecon failed: %s" msgstr "getfilecon epäonnistui: %s" -#: find/pred.c:1507 +#: find/print.c:346 #, c-format -msgid "WARNING: cannot determine birth time of file %s" -msgstr "VAROITUS: ei voida määritellä tiedoston %s syntymäaikaa" - -#: find/pred.c:1571 -#, c-format -msgid "< %s ... %s > ? " -msgstr "< %s ... %s > ? " +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2032 +#: find/print.c:365 #, c-format -msgid "Cannot close standard input" -msgstr "Ei voi sulkea vakiosyötettä" +msgid "warning: unrecognized escape `\\%c'" +msgstr "varoitus: tunnistamaton koodinvaihtomerkki ”\\%c”" -#: find/pred.c:2061 +#: find/print.c:385 #, c-format -msgid "Failed to change directory" -msgstr "Hakemiston vaihtaminen epäonnistui" +msgid "error: %s at end of format string" +msgstr "virhe: %s muotomerkkijonon lopussa" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:409 #, c-format -msgid "cannot fork" -msgstr "ei voi luoda lapsiprosessia" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "virhe: muotoilumäärite ”%%%c” on varattu tulevaa käyttöä varten" -#: find/pred.c:2123 +#: find/print.c:417 #, c-format -msgid "error waiting for %s" -msgstr "virhe odotettaessa kohdetta %s" +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "varoitus: jonkun muun merkin pitäisi seurata muotodirektiivia ”%%%c”" -#: find/pred.c:2132 +#: find/print.c:425 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s keskeytettiin signaalilla %d" +msgid "warning: unrecognized format directive `%%%c'" +msgstr "varoitus: tunnistamaton muotoilumäärite ”%%%c”" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "epäkelpo lauseke" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -582,36 +641,36 @@ msgstr "" "virheellinen lauseke; olet käyttänyt binäärioperaattoria ”%s” ilman että " "sitä ennen on mitään." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "odotettiin lauseke kohteiden ”%s” ja ”)” välissä" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "odotettiin lauseke kohteen ”%s” jälkeen" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "epäkelpo lauseke; sinulla on liian monia ”)”-merkkejä" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -"virheellinen lauseke; odotettin löytyvän ”)”, mutta yhtään ei näy. Ehkä " +"virheellinen lauseke; odotettiin löytyvän ”)”, mutta yhtään ei näy. Ehkä " "tarvitset lisäpredikaatin kohteen ”%s” jälkeen" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "virheellinen lauseke; tyhjät sulkeet eivät ole sallittu." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -620,114 +679,116 @@ msgstr "" "virheellinen lauseke; Odotin löytäväni kohteen ”)” jostain, mutta en näe " "yhtään." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "hupsista -- epäkelpo lauseketyyppi!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "hupsista -- epäkelpo lauseketyyppi (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"varoitus: predikaatille %s ei ole alkiota predikaatin " +"evalointivakiotaulussa; ilmoita tästä ohjelmointivirheestä" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "polkujen täytyy olla ennen lauseketta: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "tuntematon predikaatti ”%s”" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "epäkelpo predikaatti ”%s”" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "virheellinen argumentti ”%s” kohteelle ”%s”" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "puuttuva argumentti kohteelle ”%s”" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "sinulla on liian monta ”)”-merkkiä" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "odottamaton lisäpredikaatti ”%s”" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "odottamaton lisäpredikaatti" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "hupsista -- epäkelpo ”and”-operaattorin oletuslisäys" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Käyttö: %s [-H] [-L] [-P] [-Olevel] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [polku...] [lauseke]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "ei kyetä tallentamaan nykyistä työhakemistoa" +msgstr "alkuperäisen työhakemiston tallentaminen epäonnistui" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "ei kyetä tallentamaan nykyistä työhakemistoa" +msgstr "alkuperäisen työhakemiston palauttaminen epäonnistui" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Ei välitetä tunnistamattomasta virheenjäljityslipusta %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Tyhjä argumentti valitsimelle -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "Valitsinta -O täytyy välittömästi seurata desimaalikokonaisluku" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Määrittele desimaaliluku heti valitsimen -O jälkeen" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Virheellinen optimointitaso %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -736,7 +797,7 @@ msgstr "" "Optimointitaso %lu on liian korkea. Jos haluat löytää tiedostoja nopeasti, " "harkitse GNU locate-ohjelman käyttämistä." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -745,65 +806,384 @@ msgstr "" "Ympäristömuuttujaa FIND_BLOCK_SIZE ei tueta, ainoa asia, joka vaikuttaa " "lohkokokoon on POSIXLY_CORRECT-ympäristömuuttuja" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "virheellinen argumentti %s kontekstille %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumentti %s kontekstille %s ei ole yksiselitteinen" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Tarjolla olevat argumentit:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "virhe suljettaessa tiedostoa" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "kirjoitusvirhe" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Tuntematon järjestelmävirhe" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: valitsin ”%s” ei ole yksiselitteinen\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: valitsin ”--%s” ei salli argumenttia\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: valitsin ”%c%s” ei salli argumenttia\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: valitsin ”%s” vaatii argumentin\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: tunnistamaton valitsin ”--%s”\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: tunnistamaton valitsin ”%c%s”\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: epäkelpo valitsin -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: valitsin vaatii argumentin -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: valitsin ”-W %s” ei ole yksiselitteinen\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: valitsin ”-W %s” ei salli argumenttia\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: valitsin ”%s” vaatii argumentin\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "alkuperäisen työhakemiston palauttaminen epäonnistui" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "alkuperäisen työhakemiston palauttaminen epäonnistui" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "”" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "”" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[kKyY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[eEnN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "muisti loppui" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "virheellinen argumentti ”%s” kohteelle ”%s”" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "virheellinen argumentti ”%s” kohteelle ”%s”" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "liian pitkä argumenttiluettelo" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "liian pitkä komento" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" -msgstr "ei voi kutsua exec()-toimintoa argumenttikokorajoitteiden vuoksi" +msgstr "exec()-kutsu epäonnistui argumenttikokorajoitteiden vuoksi" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" msgstr "yksi argumentti ei sovi argumenttiluettelon kokorajoihin" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "liian pitkä argumenttiluettelo" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -"Ympäristömuuttuja %s ei ole asetettu kelvolliseen desimaalinumeroarvoon" +"Ympäristömuuttujaa %s ei ole asetettu kelvolliseen desimaalinumeroarvoon" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Tiedostodeskriptori %d vuotaa; ilmoita tästä ohjelmointivirheestä. Muista " +"sisällyttää yksityiskohtainen kuvaus siitä, kuinka virheen voi toistaa " +"yksinkertaisimmalla tavalla." -#: lib/findutils-version.c:60 +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Vakiotulosteeseen kirjoittaminen epäonnistui" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Rakennettu käyttäen GNU gnulib-versiota %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Tuntematon säännöllinen lauseketyyppi %s; oikeat tyypit ovat %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "Odottamaton loppuliite %s kohteessa %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" msgstr "Odotettiin kokonaislukua: %s" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Tuntematon säännöllinen lauseketyyppi %s; oikeat tyypit ovat %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -812,8 +1192,8 @@ msgstr "" "Käyttö: %s [--version | --help]\n" "tai %s most_common_bigrams < tiedostoluettelo > locate-tietokanta\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -823,85 +1203,80 @@ msgstr "" "Ilmoita käännösvirheistä osoitteeseen .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "kirjoitusvirhe" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Käyttö: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "Sinun on määriteltävä turvataso desimaalilukuna." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Turvataso %s on muunneltavan alueen ulkopuolella." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "Turvatasolla %s on odottamaton jälkiliite %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "slocate-turvatasoa %ld ei tueta." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Vakiotulosteeseen kirjoittaminen epäonnistui" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "päivää" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "Argumentin valitsimelle --max-database-age on oltava tyhjä" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Virheellinen argumentti %s valitsimelle -max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "locate-tietokanta %s sisältää pitempiä tiedostonimiä kuin mitä locate-" "ohjelma voi käsitellä" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "locate-tietokanta %s on rikkoutunut tai virheellinen" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Locate-tietokantakoko: %s tavu\n" msgstr[1] "Locate-tietokantakoko: %s tavua\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Täsmäävät tiedostonimet: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Kaikki tiedostonimet: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -918,7 +1293,7 @@ msgstr "" "\t%s sisältää rivinvaihtomerkkejä, \n" "\tja %s sisältää merkkejä, joiden ylimmäinen bitti on asetettu.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -927,17 +1302,17 @@ msgstr "" "Jotkut tiedostonimet saattavat olla poissuodatettuja, joten emme voi laskea " "tiivistyssuhdetta.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Tiivistyssuhde %4.2f%% (mitä korkeampi, sitä parempi)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Tiivistyssuhde on määrittelemätön\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -946,7 +1321,7 @@ msgstr "" "locate-tietokanta %s näyttää kuin slocate-tietokanta, mutta se tuntuu olevan " "turvatasolla %c, mitä GNU findutils ei nykyisin tue" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -954,13 +1329,13 @@ msgid "" msgstr "" "%s on slocate-tietokanta. Tuki niille on uusi, odota tästä lähtien pulmia." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "%s on slocate-tietokannan tukematon turvataso %d; hypätään yli." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -969,38 +1344,38 @@ msgid "" msgstr "" "Olet määritellyt valitsimen -E, mutta tuota valitsinta ei voida käyttää " "slocate-muotoisten tietokantojen kanssa silloin kun niillä on nollasta " -"poikkeava turvataso. Tähän tietokantaan ei generoida tuloksia.\n" +"poikkeava turvataso. Tähän tietokantaan ei tuoteta tuloksia.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s on slocate-tietokanta. Käännetään päälle valitsin ”-e”." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "Vanhanmuotoinen locate-tietokanta %s on liian lyhyt ollakseen kelvollinen" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Tietokanta %s on %s-muotoinen.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Tietokannassa on ”little-endian”-konesanakoodaus.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "Tietokannassa on ”big-endian”-konesanakoodaus.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Tietokannan konesanakoodausjärjestys ei ole itsestään selvä.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1019,59 +1394,59 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " malli...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "drop-käsky tietokannan ryhmäoikeuksille epäonnistui" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "drop setuid-käsky tietokannan oikeuksille epäonnistui" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Täysi drop-käsky tietokannan oikeuksille epäonnistui" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "drop setgid-käsky tietokannan oikeuksille epäonnistui" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "varoitus: locate-tietokanta voidaan lukea vakiosyötteestä vain kerran." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "järjestelmän aikakutsu epäonnistui" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "varoitus: tietokanta %s on vanhempi kuin %d %s (todellinen ikä on %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "VAROITUS: locate-tietokanta %s rakennettiin eri tavujärjestyksellä" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "odottamaton tiedoston loppumerkki EOF kohteessa %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "virhe luettaessa sanaa kohteesta %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "Virheellinen koodinvaihtosekvenssi %s syöterajoitinmäärittelyssä" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1080,7 +1455,7 @@ msgstr "" "Virheellinen koodinvaihtosekvenssi %s syöterajoitinmäärittelyssä; " "merkkiarvot eivät saa ylittää arvoa %lx" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1089,7 +1464,7 @@ msgstr "" "Virheellinen koodinvaihtosekvenssi %s syöterajoitinmäärittelyssä; " "merkkiarvot eivät saa ylittää arvoa %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1098,7 +1473,7 @@ msgstr "" "Virheellinen koodinvaihtosekvenssi %s syöterajoitinmäärittelyssä; " "jälkimerkkejä %s ei tunnistettu." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1107,44 +1482,61 @@ msgstr "" "Virheellinen syöterajoitinmäärittely %s: rajoittimen pitää olla joko " "yksittäismerkki tai koodinvaihtosekvenssi, joka alkaa merkeillä \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "ympäristö on liian iso komennolle ”exec”" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "Varoitus: arvo %ld valitsimelle -s on liian suuri, käytetään sen sijaan " "arvoa %ld" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 #, c-format -msgid "Cannot set SIGUSR1 signal handler" +msgid "option --%s may not be set to a value which includes `='" +msgstr "valitsin --%s ei voi olla asetettu arvoon, joka sisältää ”=”" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "unset-toiminto ympäristömuuttujalle %s epäonnistui" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" msgstr "" +"varoitus: valitsimella -E ei ole vaikutusta, jos käytetään valitsinta -0 tai " +"-d.\n" -#: xargs/xargs.c:635 +#: xargs/xargs.c:654 +#, c-format +msgid "Cannot set SIGUSR1 signal handler" +msgstr "SIGUSR1-signaalikäsittelijän asettaminen epäonnistui" + +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "SIGUSR2-signaalikäsittelijän asettaminen epäonnistui" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "Ei voida avata syötetiedostoa %s" +msgstr "Syötetiedoston %s avaaminen epäonnistui" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "Ympäristömuuttujasi vievät tilaa % tavua\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "POSIX-argumenttipituuden yläraja (tässä järjestelmässä): %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1153,17 +1545,17 @@ msgstr "" "Pienin sallittu POSIX-argumenttipituuden yläraja (kaikissa järjestelmissä): " "%\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Komennon maksimipituus, jota voisimme todella käyttää on: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Meidän todella käyttämämme komentopuskurin koko on: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1176,7 +1568,7 @@ msgstr "" "suorituskomennot; jos tämä on jotain, mitä et halua, kirjoita tiedoston " "loppumerkki.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1185,7 +1577,7 @@ msgstr "" "Varoitus: %s suoritetaan vähintään kerran. Jos et halua sen tapahtuvan, " "paina keskeytyspainiketta.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1194,15 +1586,15 @@ msgstr "" "pariton %s lainaus; oletuksen lainaukset ovat erityisiä xargs:lle, ellet " "käytä valitsinta -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "kaksinkertainen" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "yksinkertainen" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1211,161 +1603,420 @@ msgstr "" "VAROITUS: syötteessä oli NUL-merkki. Sitä ei voi välittää " "argumenttiluettelon lävitse. Oliko tarkoituksesi käyttää valitsinta --null ?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "liian pitkä argumenttirivi" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Vakiotulosteeseen kirjoittaminen epäonnistui" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "kohteen /dev/tty avaaminen lukemista varten epäonnistui" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Vakiotulosteeseen kirjoittaminen epäonnistui" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "muistin varaaminen epäonnistui" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "ympäristömuuttujan %s asettaminen epäonnistui" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" -msgstr "ei voitu luoda putkea ennen fork-kutsua" +msgstr "putken luominen ennen fork-kutsua epäonnistui" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -"errno-puskurin luku epäonnistui kohteessa xargs_do_exec (tämä on luultavasti " -"ohjelmointivirhe, ilmoita siitä)" +"errno-buffer safe_read epäonnistui kohteessa xargs_do_exec (tämä on " +"luultavasti ohjelmointivirhe, ilmoita siitä)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" "read-kutsu palautti odottamattoman arvon %d; tämä on luultavasti " "ohjelmointivirhe, ilmoita siitä" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "lapsiprosessin odotuksenaikainen virhe" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "VAROITUS: Kadotettiin %d lapsiprosessin jälki" +msgid "WARNING: Lost track of %lu child processes" +msgstr "VAROITUS: Kadotettiin %lu-lapsiprosessin jälki" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: poistumistilakoodi 255; keskeytetään" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: pysäytetty signaalilla %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: keskeytetty signaalilla %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: epäkelpo numero -%c -valitsimelle\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: valitsimen -%c arvon pitäisi olla >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: valitsimen -%c arvon pitäisi olla < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Käyttö: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=erotin]\n" -" [-E tiedostonloppumerkkijono] [-e[tiedostonloppumerkkijono]] [--eof" -"[=tiedostonloppumerkkijono]]\n" -" [-L maksimirivimäärä] [-l[maksimirivimäärä]] [--max-lines" -"[=maksimirivimäärä]]\n" -" [-I korvausmerkkijono] [-i[korvausmerkkijono]] [--replace" -"[=korvausmerkkijono]]\n" -" [-n maksimiargumenttimäärä] [--max-args=maksimiargumenttimäärä]\n" -" [-s maksimimerkkimäärä] [--max-chars=maksimimerkkimäärä]\n" -" [-P maksimiprosessimäärä] [--max-procs=maksimiprosessimäärä] [--show-" -"limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=tiedosto]\n" -" [--version] [--help] [komento [alkuargumentit]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Käyttö: %s [VALITSIN]... KOMENTO [ALUSTUSARGUMENTIT]...\n" -#~ msgid "cannot get current directory" -#~ msgstr "työhakemiston nouto ei onnistu" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Käyttö: %s [VALITSIN]... KOMENTO ALUSTUSARGUMENTIT...\n" +"Suorita KOMENTO argumenteilla ALUSTUSARGUMENTIT ja lisäargumentit luetaan " +"syötteestä.\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Pakolliset ja valinnaiset argumentit pitkille valitsimille ovat\n" +"pakollisia tai valinnaisia myös vastaaville lyhyille valitsimille.\n" -#~ msgid "invalid argument %s for %s" -#~ msgstr "virheellinen argumentti %s kontekstille %s" +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null alkiot erotellaan null-merkillä, ei " +"tyhjemerkillä;\n" +" ottaa pois käytöstä lainauksen ja " +"kenoviivan prosessoinnin\n" +" sekä loogisen EOF-prosessoinnin.\n" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "argumentti %s kontekstille %s ei ole yksiselitteinen" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=TIEDOSTO lue argumentit TIEDOSTOsta, ei " +"vakiosyötteestä\n" -#~ msgid "Valid arguments are:" -#~ msgstr "Tarjolla olevat argumentit:" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=CHARACTER alkiot syötevuossa on eroteltu merkillä " +"CHARACTER,\n" +" ei tyhjemerkillä; ottaa pois käytöstä " +"lainauksen ja kenoviivan\n" +" prosessoinnin sekä loogisen EOF-" +"prosessoinnin\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E END Aseta looginen EOF-merkkijono; jos END " +"esiintyy syöterivinä\n" +" loput syötteestä ohitetaan\n" +" (ohitetaan jos -0 tai -d määriteltiin)\n" -#~ msgid "error closing file" -#~ msgstr "virhe suljettaessa tiedostoa" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=END] sama kuin -E END jos END on määritelty;\n" +" muuten, eu ole end-of-file-merkkijonoa\n" -#~ msgid "Unknown system error" -#~ msgstr "Tuntematon järjestelmävirhe" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R sama kuin --replace=R\n" -#~ msgid "%s: option `%s' is ambiguous\n" -#~ msgstr "%s: valitsin ”%s” ei ole yksiselitteinen\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] korvaa R ALUSTUSARGUMENTEISSA " +"vakiosyötteestä\n" +" luetuilla nimillä; jos R on " +"määrittelemätön,\n" +" oleta {}\n" -#~ msgid "%s: option `--%s' doesn't allow an argument\n" -#~ msgstr "%s: valitsin ”--%s” ei salli argumenttia\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=MAX-LINES käytä enintään MAX-LINES ei-tyhjälle " +"syöteriville per\n" +" komentorivi\n" -#~ msgid "%s: option `%c%s' doesn't allow an argument\n" -#~ msgstr "%s: valitsin ”%c%s” ei salli argumenttia\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[MAX-LINES] samanlainen kuin -L mutta oletusarvot " +"enintään\n" +" yhdelle ei-tyhjälle syöteriville jos MAX-" +"LINES ei ole määritelty\n" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=MAX-ARGS käytä enintään MAX-ARGS argumenttia per " +"komentorivi\n" -#~ msgid "%s: option `%s' requires an argument\n" -#~ msgstr "%s: valitsin ”%s” vaatii argumentin\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=MAX-PROCS suorita enintään MAX-PROCS prosessia " +"kerrallaan\n" -#~ msgid "%s: unrecognized option `--%s'\n" -#~ msgstr "%s: tunnistamaton valitsin ”--%s”\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive kehote ennen komentojen suorittamista\n" -#~ msgid "%s: unrecognized option `%c%s'\n" -#~ msgstr "%s: tunnistamaton valitsin ”%c%s”\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=VAR aseta ympäristömuuttuja VAR " +"lapsiprosesseissa\n" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: kielletty valitsin -- %c\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty Jos ei ole argumentteja, niin älä suorita " +"KOMENTOa;\n" +" jos tätä valitsinta ei anneta, KOMENTO\n" +" suoritetaan ainakin kerran\n" -#~ msgid "%s: invalid option -- %c\n" -#~ msgstr "%s: epäkelpo valitsin -- %c\n" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=MAX-CHARS rajoita komentorivin pituus kokoon MAX-CHARS " +"merkkiä\n" -#~ msgid "%s: option requires an argument -- %c\n" -#~ msgstr "%s: valitsin vaatii argumentin -- %c\n" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr " --show-limits näytä rajat komentorivipituudella\n" -#~ msgid "%s: option `-W %s' is ambiguous\n" -#~ msgstr "%s: valitsin ”-W %s” ei ole yksiselitteinen\n" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" +" -t, --verbose tulosta komennot ennen niiden suorittamista\n" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr " -x, --exit poistu, jos koko (katso -s) ylitetään\n" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help näytä tämä opaste ja poistu\n" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version tulosta versiotiedot ja poistu\n" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Tila %s ei ole kelvollinen kun POSIXLY_CORRECT on päällä." + +#~ msgid "" +#~ "\n" +#~ "Mandatory arguments to long options are mandatory for short options too.\n" +#~ "Non-mandatory arguments are indicated by [square brackets]\n" +#~ " -0, --null Items are separated by a null, not " +#~ "whitespace.\n" +#~ " Disables quote and backslash processing\n" +#~ " -a, --arg-file=FILE Read arguments from FILE, not standard " +#~ "input\n" +#~ " -d, --delimiter=CHARACTER Input items are separated by CHARACTER, " +#~ "not by\n" +#~ " blank space. Disables quote and backslash\n" +#~ " processing\n" +#~ " -E END If END occurs as a line of input, the rest " +#~ "of\n" +#~ " the input is ignored.\n" +#~ " -e [END], --eof[=END] Equivalent to -E END if END is specified.\n" +#~ " Otherwise, there is no end-of-file string\n" +#~ " --help Print a summary of the options to xargs.\n" +#~ " -I R same as --replace=R (R must be specified)\n" +#~ " -i,--replace=[R] Replace R in initial arguments with names\n" +#~ " read from standard input. If R is\n" +#~ " unspecified, assume {}\n" +#~ " -L,-l, --max-lines=MAX-LINES Use at most MAX-LINES nonblank input lines " +#~ "per\n" +#~ " command line\n" +#~ " -l Use at most one nonblank input line per\n" +#~ " command line\n" +#~ " -n, --max-args=MAX-ARGS Use at most MAX-ARGS arguments per " +#~ "command\n" +#~ " line\n" +#~ " -P, --max-procs=MAX-PROCS Run up to max-procs processes at a time\n" +#~ " -p, --interactive Prompt before running commands\n" +#~ " --process-slot-var=VAR Set environment variable VAR in child\n" +#~ " processes\n" +#~ " -r, --no-run-if-empty If there are no arguments, run no " +#~ "command.\n" +#~ " If this option is not given, COMMAND will " +#~ "be\n" +#~ " run at least once.\n" +#~ " -s, --max-chars=MAX-CHARS Limit commands to MAX-CHARS at most\n" +#~ " --show-limits Show limits on command-line length.\n" +#~ " -t, --verbose Print commands before executing them\n" +#~ " --version Print the version number\n" +#~ " -x, --exit Exit if the size (see -s) is exceeded\n" +#~ msgstr "" +#~ "\n" +#~ "Pakolliset argumentit pitkille valitsimille ovat pakollisia myös lyhyille " +#~ "valitsimille.\n" +#~ "Ei-pakolliset argumentit indikoidaan [hakasuluilla]\n" +#~ " -0, --null Alkiot eroteltu null-merkillä, ei " +#~ "tyhjemerkillä.\n" +#~ " Poista lainausmerkki- ja " +#~ "kenoviivaprosessointi\n" +#~ " -a, --arg-file=FILE Lue argumentit tiedostosta FILE, ei " +#~ "vakiosyötteestä\n" +#~ " -d, --delimiter=CHARACTER Syötealkiot eroteltu merkillä CHARACTER, " +#~ "ei\n" +#~ " tyhjemerkeillä. Poistaa lainausmerkki- ja " +#~ "kenoviiva-\n" +#~ " prosessoinnin\n" +#~ " -E END Jos END tapahtuu syöterivillä, loput " +#~ "syötteestä\n" +#~ " ohitetaan.\n" +#~ " -e [END], --eof[=END] Sama kuin -E END jos END on määritelty.\n" +#~ " Muutoin ei ole tiedoston-loppu -" +#~ "merkkijonoa\n" +#~ " --help Tulostaa valitsimien yhteenvedon " +#~ "kohteeseen xargs.\n" +#~ " -I R sama kuin --replace=R (R on määriteltävä)\n" +#~ " -i,--replace=[R] Korvaa R alustusargumenteissa nimillä, " +#~ "jotka\n" +#~ " luetaan vakiosyötteestä. Jos R on\n" +#~ " määrittelemätön, otaksu {}\n" +#~ " -L,-l, --max-lines=MAX-LINES Käytä enintään MAX-LINES ei-tyhjää " +#~ "syöteriviä per\n" +#~ " komentorivi\n" +#~ " -l Käytä enimmillään yksi ei-tyhjä syöterivi " +#~ "per\n" +#~ " komentorivi\n" +#~ " -n, --max-args=MAX-ARGS Käytä enintään MAX-ARGS argumenttia per " +#~ "komento-\n" +#~ " rivi\n" +#~ " -P, --max-procs=MAX-PROCS Suorita aina enintään max-procs-prosessia " +#~ "kerrallaan\n" +#~ " -p, --interactive Kysy ennen komentojen suorittamista\n" +#~ " --process-slot-var=VAR Aseta ympäristömuuttuja VAR lapsi-\n" +#~ " prosesseissa\n" +#~ " -r, --no-run-if-empty Jos argumentteja ei ole, älä suorita " +#~ "komentoa.\n" +#~ " Jos tätä valitsinta ei ole annettu, " +#~ "KOMENTO suoritetaan\n" +#~ " vähintään kerran.\n" +#~ " -s, --max-chars=MAX-CHARS Rajoita komennot korkeintaan MAX-CHARS-" +#~ "merkkiin\n" +#~ " --show-limits Näytä rajat komentorivipituudessa.\n" +#~ " -t, --verbose Tulosta komennot ennen niiden suoritusta\n" +#~ " --version Tulosta versionumero\n" +#~ " -x, --exit Poistu, jos koko (katso -s) ylitetään\n" -#~ msgid "%s: option `-W %s' doesn't allow an argument\n" -#~ msgstr "%s: valitsin ”-W %s” ei salli argumenttia\n" +#~ msgid "cannot get current directory" +#~ msgstr "työhakemiston nouto ei onnistu" -#~ msgid "`" -#~ msgstr "”" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Rakennettu käyttäen GNU gnulib-versiota %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Käyttö: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=erotin]\n" +#~ " [-E tiedostonloppumerkkijono] [-e[tiedostonloppumerkkijono]] [--" +#~ "eof[=tiedostonloppumerkkijono]]\n" +#~ " [-L maksimirivimäärä] [-l[maksimirivimäärä]] [--max-lines" +#~ "[=maksimirivimäärä]]\n" +#~ " [-I korvausmerkkijono] [-i[korvausmerkkijono]] [--replace" +#~ "[=korvausmerkkijono]]\n" +#~ " [-n maksimiargumenttimäärä] [--max-args=maksimiargumenttimäärä]\n" +#~ " [-s maksimimerkkimäärä] [--max-chars=maksimimerkkimäärä]\n" +#~ " [-P maksimiprosessimäärä] [--max-procs=maksimiprosessimäärä] [--" +#~ "show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=tiedosto]\n" +#~ " [--version] [--help] [komento [alkuargumentit]]\n" -#~ msgid "'" -#~ msgstr "”" +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: kielletty valitsin -- %c\n" #~ msgid "Success" #~ msgstr "Onnistui" @@ -1420,12 +2071,3 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Ei edeltävää säännöllistä lauseketta" - -#~ msgid "^[yY]" -#~ msgstr "^[kKyY]" - -#~ msgid "^[nN]" -#~ msgstr "^[eEnN]" - -#~ msgid "memory exhausted" -#~ msgstr "muisti loppui" diff --git a/po/findutils.pot b/po/findutils.pot index c5b2c25..6fe2614 100644 --- a/po/findutils.pot +++ b/po/findutils.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: GNU findutils 4.5.10\n" +"Project-Id-Version: GNU findutils 4.5.14\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,63 +18,99 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, c-format +msgid "The atexit library function failed" msgstr "" -#: find/find.c:205 +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "" -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "" -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -85,12 +121,12 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -100,12 +136,12 @@ msgid "" "searched." msgstr "" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "" @@ -115,7 +151,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -125,12 +161,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -138,7 +179,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -147,38 +188,38 @@ msgid "" "arguments.\n" msgstr "" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -186,7 +227,7 @@ msgid "" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -195,7 +236,7 @@ msgid "" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -204,19 +245,19 @@ msgid "" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -225,19 +266,19 @@ msgid "" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -247,47 +288,42 @@ msgid "" "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -295,92 +331,100 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "" -#: find/parser.c:2334 +#: find/parser.c:2270 #, c-format msgid "Invalid argument `%s%s' to -size" msgstr "" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -388,411 +432,728 @@ msgid "" "entry from $PATH" msgstr "" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 +#: find/pred.c:718 #, c-format -msgid "Failed to save working directory in order to run a command on %s" +msgid "WARNING: cannot determine birth time of file %s" msgstr "" -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:782 #, c-format -msgid "getfilecon failed: %s" +msgid "< %s ... %s > ? " msgstr "" -#: find/pred.c:1507 +#: find/pred.c:784 #, c-format -msgid "WARNING: cannot determine birth time of file %s" +msgid "Failed to write prompt for -ok" msgstr "" -#: find/pred.c:1571 +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "< %s ... %s > ? " +msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:2032 +#: find/print.c:346 #, c-format -msgid "Cannot close standard input" +msgid "warning: escape `\\' followed by nothing at all" msgstr "" -#: find/pred.c:2061 +#: find/print.c:365 #, c-format -msgid "Failed to change directory" +msgid "warning: unrecognized escape `\\%c'" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:385 #, c-format -msgid "cannot fork" +msgid "error: %s at end of format string" msgstr "" -#: find/pred.c:2123 +#: find/print.c:409 #, c-format -msgid "error waiting for %s" +msgid "error: the format directive `%%%c' is reserved for future use" msgstr "" -#: find/pred.c:2132 +#: find/print.c:417 #, c-format -msgid "%s terminated by signal %d" +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "" -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "" -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "" -#: find/util.c:451 +#: find/util.c:459 #, c-format msgid "failed to save initial working directory" msgstr "" -#: find/util.c:468 +#: find/util.c:476 #, c-format msgid "failed to restore initial working directory" msgstr "" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "" + +#: gl/lib/openat-die.c:38 +#, c-format +msgid "unable to record current working directory" +msgstr "" + +#: gl/lib/openat-die.c:57 +#, c-format +msgid "failed to return to initial working directory" +msgstr "" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, c-format +msgid "invalid %s%s argument '%s'" +msgstr "" + +#: gl/lib/xstrtol-error.c:68 +#, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "" + +#: gl/lib/xstrtol-error.c:72 +#, c-format +msgid "%s%s argument '%s' too large" +msgstr "" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, c-format -msgid "Built using GNU gnulib version %s\n" +msgid "Failed to write output (at stage %d)" msgstr "" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 #, c-format -msgid "Unexpected suffix %s on %s" +msgid "Unknown regular expression type %s; valid types are %s." msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:81 #, c-format -msgid "Expected an integer: %s" +msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/regextype.c:107 +#: lib/safe-atoi.c:87 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." +msgid "Expected an integer: %s" msgstr "" -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" msgstr "" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "" msgstr[1] "" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -803,44 +1164,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -848,35 +1209,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -888,138 +1249,153 @@ msgid "" " pattern...\n" msgstr "" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1028,113 +1404,254 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, c-format +msgid "Failed to write to stderr" +msgstr "" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "" -#: xargs/xargs.c:1508 +#: xargs/xargs.c:1617 #, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" + +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" + +#: xargs/xargs.c:1630 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" + +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" + +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" + +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" + +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" + +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" + +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" + +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" msgstr "" diff --git a/po/fr.gmo b/po/fr.gmo index 1a9e15fca660ede754e6ecfef958b473a65ead7f..29f4d7314124914f191aa478e6a8ef0fb8d0e74d 100644 GIT binary patch literal 41657 zcmds=3zS?(dFL+#5*Q2tW1bFhZ9I$=tJ{*WF^nwRV`*fK8I6Qyz#++MvYUh?u;GzF7Ls5Bd2CM3Zj!S(*+AIe z|EsEdZ_o5dGURo(k4j(ny>;tWef8D%u9`o-@DXo&SQJHHr);Gh`<^J;$%P+%Tomd0 ztDhJ}T#DWZypN*KH!g~zp8ae0zU_QE$~xMj-pZEEl-J}{lGT^ZvZ|B z+yxwdY83G`Y5>0od?oO?z{5|AqPu}V0-OLo_UTbH3A_dPm%#S{-wJ%w#ZmNYz-ND7 z6x|E_Dp2ov)ia{#THt4Zp94POnXa9$19$U#>$9S09M}Wy1wH_r0zM*+qN{<^z)OK| z0FD4Z1bi9r4}iQnn!Y58y1*9jGT>K%s{bhdV+hgZK)M#~1`037fZq>%Jy5v(1>jNO zF9GL)PkFY3F9$C0`_F-o2OgmD3xNr68?XyhyYB~5B{~BHMbX!R`~#s54g={@bd!fo zV1?gr0y5O-SN!!a0b_puGw>SVvz`-0On3AWpzwDbsQLLIP~$!W)bn2kYFyt0UJo1r zNem@g0II)l0KOe~FYxDq&)eki|5w1rfq*M{_yt_w1yVGQyMfOKz6Ypr{t=L=j4rs` z^=~s!{ksV`3;ZDu{|Z>+_r5Jr^a|jIflPU{oxy4x2Y?phz7u#q z@Qc7(fv?%_#_`8M;qPJ^`Mdw&|JajXI_0{#>5F!1qQWXMqy$dp9y0=}DhI0K~X(JU`h{kH%?eRLo2^}x>p z8FKW}QFr}KK)N1%3`m!vzXpy0FWCX^fHmM9z|R7?6^%1#8viSRPXlh*8AXo-?(uLE zNH?N`K+X3I@X5eCJbW#XE=KPL@-O;B{@Vq75|b%>-3EL-@P~nV-@U-c0Ke$3e+~Ey ze*Yi;`ywXg5`GT@9|61(_}#!se|;Kw8^3!%(ebB&>equn;pbbxX8|v|-nDZjQ2n~u z|9&e_^zn;8)q4;a10N2O1fLBQz3&F9-U9G>z_$V~1O5(B^ZmboEXn9;H@Nw_4hTz) z=7CQE-VJ;@@NGbi@8^K(@27wVfL{Ts-R&T&1#AFCZ(jiF{=*@j?*&c+p9!o1h0j+3 zpA7s(ApfG@<3IK1!g0sXcL0U&-vElweIBTG{{}b=eCi%I&TE06;`dRY)^+tphp&0y zqaPMUuLG)oZ`tec|4E?e?)QO@1AYUj{yk=b_Njj{P~#rI$Bu^ zT>ldA6I}nR8O8{_?~s!Ze*=68zo%|?a_xSg@cvK0&j2rCaKi7O1Ah=0-|Fgp0CGD=_w)NJz)iplj-f9AuL25B9|yh{_!mIY)f*GX=YJpgOn!gYtgCk^ z@JfCk0A2-r4Uq0f4*-{dp8&1^t2KBm@IDVOt2??p1&q1=Vc_+^&j3e&PfQ&j*#T7h z8E_l$KH&3!f8^m4=G^bSz!z}+v15Y6x|8D82FpO z%Ya`6YW$B{aQ%56kg1QBfokuQK+*Nz12z8_G@wac2ZH+OEw?jwAmD!kHP1IS89VSE z;27{Dz#D*n54;3;^`e`H+ki}c^lIRnfnWA;sl^)S_jk3SN8k?vpAC#buEwz&cmZ%4 zxC}f7q)PM!;B$a`?|^3l+d!?8Ujn`s__sje@vcr3{ZHUWfRIRZZ|3Ilo4{-M{oJmT zze~V(@cU~(;o%2*j*jjFzK7p`4P4nCT|>-hbSlkWZ(fIInp zF~qSIcpLD2z}EwR7I?*-j=ui{sQKIs@d#ggfqQ_r1D^`~Fpw(ICxN2B@s~OIcNg&e zy!U?KcCH`%0oTrJfZO=}KH!f7{{T1+?7ZCJ=a+$M|L=f%fupZ*c)14%N}~sXZv#%h z($)J*;79nql}Wl7_*LK|f#34*k@vXu@EG9Jx&ByS4BP~K251-t>;5P;pHCSvw*(_Oo4v_)Hud}IEsD(*aKb&yzotK zoecv=`8@$ty;lQAfFA|^E$~agN#Lh{#J&IfeiT}N7`zua!Sx4z%;Eo$Z+88?0I2s* z0KXU50A5f172tFD{qeWB`S=R(5`I7Ytxli03|Qs&7;p%<5KXPWy2SJeIPfZSABn({^N721Ge6d z@%=vk`-Q;0{=3mW-!<2#DO$_FO1YhK6D6TQ3idhT;j=v~gRA`y(ca4`6O{i#xsq}f z<>{30`4V4#net2F0`LIk!<6SzUQ8LIJc^>vcT*aayYz$4Z&3b(@(ju}WrcDZWh+Ir z+@a_LNt-X>&wv@_H!1pvkNgZp>n41Doi87x{1`>+Ss(E~mW%QKeZWsp9zhYG&}WMB zI?8|54?cfPc^~CZDQ(K*D6gmdG$njkmbPy7`vm3jl;5NL7UicX-$VI1%8MxaTuOlz zL~qd#K98Xsr+k4@ql8b3FYluKA?1HiDwGAvD=06eJdd)S@{^SCsq^LL@WaFFfcH`^ zUvqtj|9uPabChMuQOX%gkD`zGo<2Y1K=h!87kGGuhj)AU0pJak*HGT(uL*pSauMZz z%Bv}Fr2KbE_*~1Ehf}^r8K?X%MW07fUSQvf{|@r?XDRQbJeBex%4aBZl=oBCey-ud z_ftMbS){y#qR;jAfB%0!&d;a#ODBOhQbe=A_Y=_Q6QKjjHz<#1FqcuDPno0~qr8mr z4$99^ex33;%3n}E&$CziHu-6v%lQ9We0DQ=JN>mMdHCD@-ccq^_4H96RR0ZJ)7sNV z_|mmAT-$3`ifb3V+tEh3-t}Ay^A(=GgKN9}vtit#GqwAV+!L<#VaWE8U8H-*-{bhL zE z;^juO8Q0paZll#p<5qilOPsXoaii<*bUQ0?w;gxVMAx#o(OT+ttwyKU;HB@x-SOpdrG31pP=2i5=oB~HljTd{;qtW| zjJ%%CCB0@hUP`(P!o3h$>vcM5s~b}{t##X-l^t=YmY!Vdq**2cpt8f#Q0d}gvLaf@ z8d(<#8I9XZX(yqHYztov$6MlVnsxatA_;gOiahcv3u$x7eee6f-pH1kv~46}b@X_8 z64d37E_K>9`c}!B?QZ2n(%E_Q*g+b}(k>)&qS0x$7BwpFG?H0pMYkJ};6kHWkNv}G zRrQ2cUS8PFYvAzV2@8)u^QIDrWGxU~UTvV^8#`e*vlYLJdiQ>325o^i@e=_wU zf$A6y#869j9uzhzlUum7n4GjJ$ad}c+r{C^Z+ACxQq#R8?lu-(ONm;7 zr5Y#OX*?qDh_O%Z^+dv1JlAP28W-7O%rfgjHc1BtE9Pq5s;e=WnaDTo?A*0??BLig zNJA}hWl@aSj~<4ZCW~>>Nm(mP3G0=anq7(WXSSRhEn?X`vb;ds*%EUD%V=aGsVu&u z*M_5tuxFFn@vNC-3+HaoBdO7vw{i#^d|SMrtP`IJIAM>y1q{e zb3KtjzFi4`%6Lo_Ng4xLoGqob##|$Kjd+Hl6sawFq)`j$FD)hB#FWav~wo$_RQ zc;~^sZu!elI#Vz)H8C?WHdz@vc;hqzlO?RBmYKXfcc+XF`e)xHDNSc_ua%GQJZ3P- zGKed_>uy78^Kiae`uZ;HX3$hK=@>>Qk*){|Cqzuj26}J94zL zl5UA8gW_V{>FDuRyTZ*%W3G}?e#NlU_(g1V)QanETf$-$Uhtm>F$QJH z$<%Ipc*o>`sX(vsv%oRl! znm(&+=;^8@gxzc#ZoKB>bf;qBU|-jY#0HX+S^ivO_e~iEP@Gr3j>K zvoMpMtfgr^tq(=Rrd=kj7!9EYmy7EOl1{oLLtwS^mZUGj{4!)95^;qQo=BVVaD7Ld z9d9fxsY8u!b>oJraXjr>iJ=yCp2q1zD@7|tO+uX#`+_aPfK>x^`RvWj^g2dwXd1K@ zk5tkTuStdH#CmnhL^K0Q;^Va1lIZLBp02CX63Q|(_W9Vfhx4sxyqGDdw_#Cgwb@1= zZ8nZW-f;{5(P`9Ni}A#6CbO1kHS)j$a$B85<25V@$-TL`#>sd%)5}?Ti;Y&0JXvGD z1+yQnbBmi0U~8Ty>P!kf_Qc_A5N>a3qrcVD6O9^3=q=8&z=xa2Kaf7?ve^k4WTqu5s#vxHc_bhn~Tvqdkl0ojjvHRUGwLtdF@VDbtH1y8J!a~ zGI0g5hgsS)v1fngxm5YSr#v*SE#Y_2*iqk10gPqz^oyuIGW9Qap! zkJbUy)vg^+(Uct5{nr>zwz4?eZbI*b>!fKe_F zMPor`n9Mb;*;9k8g9J6A-DHgH#{6~T4>Cpr-|NY4JVt2qFw81bGO$*eL;Drb9I$hwak0-Es`2g=;_XD^fmJ5)QafvyViKN^vNF%`%3T>oWJ?{JXXcs1;&IKPRTnu$ zdlFl1h{q?Cj@gPYPdV_EExRY1BvKNDBw7X0=XZ3AY0x z#Cf66ZI15pdiqweDqo)%DA1_6rI4NN}<&_F$<}Hl5c%%MU`CUBQB?4(*pa zOpDi+jXk+#Xz0;Y2ur@OwYJ24H;{YgjF8@jI*SWJ6=Z*vo-S@W8K=Q$#l*8nYZe@| zZn*S<5;?ylM4-T6EvX^a2ezWTJhlYPIPY8HdIIbY!w%Hah7ASPz*^`R@{;&F~3en3#;8N*>Xn~8ff*M+QQ1eK{qnPAw=z2$KZZU#5KpB=Nj|SuiQbg zoJvM@%oiL@3)l}@imG%;ICL~I-)b9y_FA~++Vd^!QPCv?9M3hAd7g?Uw0vw%0E<0n zQ+`wIHSBX-S!r|5aS1tBa|6*m=$KN@Qg~iEh&M8vF%VSdN-|G(y#7;ufoh@*pZHJfJ|hkq+8sic
    Xv-Xf; z67I>I{&`S~K{%?l@sDRq?N(jbM-vkpH19TCb6?WMqs(Mzge$1H3Fll-})56 zt20PAYl{^E-fb~P`-5WFXi1G@dBAXS=JPcTh=zd5Doxy2 zL>q6w!%!BIIhb2q*&iKr0(g`7J5*ddE~9u}dK@||-8jixHoLgZi3T20aGu9)bXlG? zXNC`Zl zP`b!^5*{`R6h#LMCyk@-f|UCFcpBHDyhX)*Q-#f4XX~&!G!#v*@iHJh5Oaep@c`4{g*+aU zHd-ZW#0)hcaK(=>?$bI87XP}pjqGk^e~?yzdzI;LuH9_5mw6SFUJ$BRjotG;{O96Q zankFy6_>&D4EdsKwv0gWt1opIoD}s@yx zPg*NzkXz#0C9iRjU{^M}yi@KIA;!1nxs2;8%woABZLrgBR>YO*oN=MJn;d5i=Nvnr z$YV61W~2$;J4q9VQYRjfLO)^+=he?D{GDncnJF0|v#9@JCQy1nC-^Pa)m#^4bht9D zTWX(;`@q=D-ht7(ErC3QU-Q@DXR>JAto%q)(Tyt#dC-iXPp2@~P@7D|5`4P3R> z_s5nijH44@X8qXIRZzMC*YJ;BTD^1&{*0cC511sfgnJ+po@k;$@*)?~c6+lSDJW64 z;Ab226>%VFc`=dbNGn)N1UFl?wpwAuiSYZLVdlEc^dUVqux&akwhobMdfKxm8blTS z3(GN6Do8xxz=7L}EaZdRwAn4ma>YEjx@Tf)_t6_B_wRb)(dmg7kB3*}GRwT*&TWCE zgitZuCbmv^83Ue0Oddz+z@4ktbLGJP>4{q>Z#%kc|G|UfyJiN`h2g4`ddtdUqD;T7 z!ha{qf@Fw4vCNH}jFRXiJ@OV&U>%ZyC&bQ^U`(1kHdOTaXcA-U)#%UwU#fV?aK+s>jzaUD1Q+-w_U za7!E^uB~u_-elk1oBC?+)s0F0cR>H`H+56rcE^472>d6wztnVi?M_`$)l`?q?cQNU zvW^6w`4JydIb3PjU7S`3`$~;Sf}UHpi+R{wmuBsfLJg9|M?$U$01BbYgVHsr(4mL1G>1^?zGxY(&@=byHfmKwBID%Ea`4$zp`$<(JopV zvx|s4)mXA07Nyb8j{UT30{wJ(1)`FjGq)WWFWRtpe88w|#hB3Sz-cq`&@3Q}TIjBQ zv%dep%*6hwBT{KYRO@hA)6$)x=w|b!1zInC}so1~MGGYJ2D8Xwo zK8mVIJauTYY~a*PDCE+}scz`acvhVSkL+6_a%$=eX&CrVyx4x58TYU(R^jhm58erxqY%tqH_4Mj93LhNbl8xl|a^fhuC9#;7F%=)g zRNPf+ei5TAlqnxURic=aA~trHD+c#$!B}Nkh>=Ry>vVdAbIXZh7@vsV6_bIQ7tAZ^ z4t^$;Ev8tYR<6lDGqliD&8j3Hi?8T{KGtP!KbX5*wq0=Az;4XLiMcyaZns#7M-(@gcahXx{$@Ei)9v?WN z?}?98YGP@Q(J!Vj+!%$hGl!voh6(W?xlKL6Tb?v)a@jg{5tYq+pY3|Gvcc0@qv+>m zm!aV>BcjU8w;_JkqFqU)^@?&NscyD>m<41Lp-OeF zhLH!xmKu2YdWd)MSTCZtFELzelW{DVsGg&G}ojvXR@+?$KMLk+? z9~J6i6m{C+pB5aU0hxQ|KHp4**p@>Ijll?7XERIs1yWRbDv9Esvv7`ZY*VXaJa1^bnV=jw< z;Bd#d*J2~4p=`0-5mBmyZ|VFxp?GDPrgNjH@0}!^oTc7;+7&Uv8e-Q?kxvv74qOJN zDeK3ejr@APxC{0f9?5SV^GFU4+U5b=LwvuF=k)g-nfAZ06@K_-9{to!pihqW;V&SJ9GR8C0x=hyE z;y@9UK2XP}16y()Nn0TSPX#7+6i!32BskoPhC6UPQtiyEWpWm7gA+oY9kR{jM|KO$ z1T14Td)G5Vr4xl$o32)xWf?mK|7OT8ZW5{&!!R!pNy4M?^!Oxc_$S3IgiIe8EnZPP zW79uCMUz7*!KDJ@69JmmBgvY|_YDgDBM2G>tT25vpb=g#C%F_Y2JbsOsG{$YI0%&!zxLS`e(rv%G{-Q&@WVwJk-}tt3kY+&t$-wX&6_WPr=k2WYJNABq;i=_JGSnQI;SXm5V{zi0P!#B3ft{ zwS`TaSzNQkzY(szmT8S%o>U{JAVwh>a_zE0frH9QX^}h;^2|-)DSrBV4BOZdZ<>n5 z9GK~26vtz3tWyE;y8ROX1%fseV& zM4(&`DEr7AT5;-%HW-AK8ckzj2g23}STl{4e)bmiU?ca~l$M0VIjiINaEW6;jXpD&LLEJI&W1nAU=>s4+$r1(O6X7-`=7~#oA)3|IJkpX6I zxap)-b0-jB?K&Mv6-O#LaghL__?3kR!4G*>7BYbCo3=7iQ67v2HbPTl3eqW@K^ijA zAs@$7PGb>?C2mUkx)cy+bqVPsrk%-c=C)|bf2ewKWzU^2)(}gW4EDOFg9UFLGf6*e zldt63O@vRtZ!A9^RfenEl&ZA3n2n8WmcrQXi@iw)V*Tft1Vuw41y|M7OiRu&g((Rg}agEpZcG>Fil;>ybBB*K4TG3|9#q=@6to^ zdMo=fB!1-vHuqL$+M|{hl2;9zdxs9}pQ-F(ZK-#a-K_7?c>C6ES5~%OUD@`6c-ywo z?N?vEb=%ghRID5%^+++LqTX{WTVGJw{=9hGRioRkynO3+>P@morZPi@1+oRhZZzK0 zSv_4}J*~{$ee#yUCa;-Wblm9J| z$a&3Cd`?6ACiaaN=-5`>I@7=-TZ+|(i@w{5dF2~UosCs$AVjo+-e zGxwi4Wy1cWg#ce^Gq|f& z><9P1i!I^)!Z~(@kFVVpKCW;@-@b6F1l3pGP|SxAJj);MyB41ByJ*vnSXw;|4R_m` zJqv_ntEa&|Q@VN@OPF~>mx1$@>!F4~b6uuxs5#>K)Y?a!T2hUPVV8_5w&2p_>Id17 zIwZE+ZFGC0k2=k;#8|#PB{S=%u^Yakgc&P?gz6(M%LAer)s``RyjA9Yl>dhjl0po9 z)Oa!>>|R-1J-uk-W&OtT`iS@bwMZ#vA!wsHx#N(l zH3BK8tvN7s?!D%DFSRJ#US8$>+3Vz#>46Z&jUB+1u~uGJh!9!hAo8g9c@P6zwaUM zMTcPEcqA-~q2xP#2X9E9oVbzQ=oR)vf^@ftpu40eMw`W@yEcVV@vxrRoep_gVx7m& z+UYC(9ys@vH9OO_`P_FxJ0^{vm-><4E~u2DLDqBah7oFI?f!Jfuv|BC_MXdpVqNG1 zu!cPot|9}50rx~)O%{mb{K2Cj8mg?_vu<0~S6_Q@T#L_T@e|vhq5J`ooH$9u67*I*i? zYR9`|pb$OD>Z#$;LlWN6Gv1q}=p>#4msan&$D|$yv8v5PWo}T6#&F#V+p$?;*-j9d zujMe3f~SPLS_y-B!`U{xGt0y}loyzgOf9)uaEm_W%=&elX#GSTZmzpDi?wr@51yyE)%O=^C&L)BsqQglf+F&^pSS;bAX1 z`kh!lFOe+r@sAqr&bBeWPdW#gjsfSUM9iavSZnQUJLFMja85F%U>)>mLmLz;tf9y$ zgGoc*bOQZH+vaVnywN5&unqFk_`RdpbbdmiH82#n;E!MozCa5ES{hmvS^_@Q!mr`F zlz4Mo^O9;bOut3;8#Ik=IbA$&RZ%XLp0tGoAPkCndS}J#0g&mns@dl1eR%cGqwO(q zbh8H4=UhG2@G7ZBW^J@a)I*UjNP;_=ishG?DWNiWT0ISAa8+|cOS8psz!Ey|ijpSa zC1WEZZ&n9P85X9U#xZB^CAN#o;*<9Tw=P*TWlvjJMhI3kl%gwAT6_(qt?KrYn}Ny)t0*6SXv0Z z#G|8=YI;U2XQ^WDeD$BWjiyvhd4c1oX6;6OS!x>(%BU1XG6`J_3pVhJ6v?>84gjWUds@$PMw@&+$| zs2E>&p1_QJCz2LYv&sufB&5>?Cb<_xF9wJ9JGj##9O-Etn8_zI*EAhdgU#kd1b5PC zVi7N6W?PT6Ug0nZn)Nz&UyGH7VfHf@TpO{lh3d5x7ww_QG?0kC_Job6eeGzr1*7%k)O@ z;#sRd>fqaZYx#N``S|5u@uQB7M-4EL!|HI540B zl2*u1SKGOZZrCwh1ibg}vkRa&je?z9R5p4kxaaPwTH4SRLW?Z1oWDxKNsDkimcF>X zgO1UzJr3c}`ijoGJ!eA=l1{o(DeV!lDBn1KNeei#S*mwp^>j4lUI}qy%y`A3=T=1D z)X-Ur2HF5zwUJ{_FUPg|i$Ic79PW$&4Au1qv} zEeoBBMcP-3*J6^M(1yjdR6yHkz#rJY*CP-bcd zT_UStwv8LB8c&UAA63J-c2T(O`~`U(p_lLy!!RO7+N%^+u)vt)u)qhe{_B^SiAs*~ zv`N@gM>5EI<86F*+9Grc-&@NQiMu(~H21FAISuY*L(EN^0}$AY7#~PbsA+J06QyGs z;P5T6PpPTSuaIrYk7_92WXj~q5TC+}M;-J)UgpvqaNIz)_o$poJ=@+Ms9X z63C_HdRtMxCDc}2JBV+S>5e~|S%uPkXUTWOBM}d(`r_(+s!tnhnEv|RK81eidHGlf zR2GVK-jMc**7HM-Y$)z2Pp7<)Fq2bE|7cy})QW$_ zE|t;3!~{Fmqu&!aOljKtHqSMsqOoG)%xE%3na{qhhTO<5UXQwFBE&DeY$L+Z3go<8 zo4QWSX%|!8BVsYC{J4vv4_Z%WJM&`3xn`VbTc?rfGI?Prr=}=7g~bacsd(nr`L>?z zw*orKpFn7ZgDqMqfl7(75a@UE(XH(=gCs(6ANx3xB~)i| ztZ=pljuN;o5eRKI)2?~tGD}Jq!>mR(rxtc7xHI(zXwN!B00kIf!mD)JhL45c8E;}f z$uyLrBwdeVy%at{C7QRoAjIYgU2l#95lsihG(<;I=sX*;1&R9%V%MOA$WG5IhFA_9 zD6kJVQOYO4UXenJvFr9 z2_55kTr2kg+l;Eeg^er!cpilSC#F>J@{q3*ONS&SOiLiQV|8T5B!YI3#}f)n)W^WD z%6>N~nj1bP>f_88TM4GTN|qzVu?*}i5028~o8{vVR8`RzQ1!_qQs~RpD_dC_`i=(B zWDF-zGs&Uvv(Vi}HX}_u!Rzcv7AHNHd!po>D65Q+ko-bsBe9x#P9Ozr=4P~61xu4la?@XG;PFb5mueRBlCj~475UcAp;I)^1HAOR!@sQ zS~_lUlBeyjH2AC;b>0N*iFUK6;1!I@=r5c-LXS7}Gp#*-qn%{|bb^{?I*KqX z1Buw1_EVb2#GDNpi5*B{w8t9krApf*xYHr!h~;=<=})fi!sfW8W{9?uPwpwpz5Ha+xgCBE=v0i?m2te za8{UmAVOBFn_F`{n^s$kl;MaHQQ?my#W-~lHCo;v42C$XIT9KBKJ?>UU`BQ>P&tP^)l zM|1pte%eXQ7?pOe(c5_^adBA5c^-J8CjRA4JhALGJHDiJf{s7$_RoJN7%F>zcLcYGmdIJf%{oZB4lmG$?Z6$ z^Z3D;iRtO_ePC56iIUK9t~&(8J;&(o?iMJ zyaZ*>K)Dt8t1LBCJg3tzziY*_9mFCdlw^f5Wm(AGZ+uw96=$U=!ny>R!t#X{K#jM5 z(dCK^Z7DI>la|sbe=ovS(RW^gg(#K2sCAuetzknefkSz(hw0&>wf*AW%urYJFo{<}HT(7gCvozk16FB;osF z!_k?pZ|Sk9W4 zapWDVgK5tv%DXj{p#kdxPrvIRSXEIT!z@!%`CUX3Ek}THcYEyM+N9HGHbdxIC-k(| zT>WUvtQ6~LWOEkvA4cPi5PQWS10+)1!Nq?$rNaeJ^K)rHBK)m5vBq@XHAmEl11a0x z=#!q>`83R;3y{)FmoJcZ?2H=YeF!a6$2F(m#w(gSJI3D*J&{uev1114Fn^3%I!U4c0Ly*`%{ z!;j!AOAEUiVQqj#i- z;TvERlB4{{5)@0p93$02XSKa3Mruabee!YbQ(&$Tjin$}nN+R$f^^HPplELJRawP3 znFs5eSiJIJ^eiay*#gy#8*sC>fJ+|UEXnJhmH*RRW<+uZKU^)nTl6VC!;*K2PP;Dn zDdQ&QLa8&H+tb5SrafR72YkgT3@_jt7v%b~qk9517P#49e63f^i+wlkn$NY%(TD;LvNdNw*xMAv0*l`0J& zu&BU7sbV+-NQ4?r0V>=?=D3ztJMh_J6k2H;nG@!wmNo?{ysqU%kPDzlud^f$uW+l? zB7Ehn#Ch2mooM4%a2y+_k6Xe+F}Sn!N)aNLE{#-Dj)b+Xcb9c!qq$s19~i=^S>N?w z-#J1iplH_n4WU6?+n|$pg%jRUzHt!VOT-8XR$ka_rMSbwVr$p({$4m*2)QRqh?e1n zeqW`hQ}Xy+2e|DbnP*O25`{;N8|h#n(_qVi2on`s>NsD2SY-ZuKb8w9B`E zzB_CPQ&29PMP%MgoqWJyMCnkIXcpUI60UDNA;_eWRwCMR2^?smjNbM*izA9;cA7FF{2>`}R?C+Um9bcI^vSnTumdko9L8O4 zUD&EmtX-EkVJ|ytLJ8n%xoQCf$69s7k=|KC;#rS7D!<5`e01Kguq|$!F2P_NTMq6T zu#yc0ty&f;EE?Mzti|wCi`xP2mbLx_>Irz*ae>0r8WWy+QPct}; zwb(k!FcqQz_DM?@vgWtz$ zUaY)MSvBzCicRU}(vu-(BI5C;Piaf)u-DSa@v~F_X*6ZoB1$S%_uD*>K^$*OHZ+mj zQ~oR`zPQbBrOcFqV{VO1rxPZ%cKne}ut~)`2q&AU1jXg#A9MqJ%Tmdtpj)>%)@gu; zRbyC_A!KJhanh4=k$8*OM=U#544XI2;-p4*z#78I!s;NecFviT8nb83I=*C=oPpx( zEOD24>QISYZ1NV7jKUZgFi}d5uR*Dk>w!(6D6}v`w9}L3r(sON9Zb{aH-rgDdqm}w zF=v_uCVif|P#gzkZ<7SI929x~a1OGF6-i|%I4ygPO06OMs)zaMP$fc*&_PX8!^8U4QPwJ9!+ zK`Sc?+bk#T^4_rV+|)#iB1lZK6PXVy_mR7r)%dnJQnQV&`%U<{*LIv+OQdKM!c>aEJjJ#3C)uxw2)MM~c@?D^M+CMmb#x-z*KIhV=t0EZ0Iylfi~JkTcPk zpi*#a7!D~skkZFNuV{CtVt-K9BonFKY1A(rk`DyZvq<+`^_7ac(81Cf%; zG0@0 zuWWBY3@@YFX!k~OP3M}KK-};TZ0CQqVsFCH>Qd}j_Bs?5ZnE5w8v))06P5s9c1Ps# zw_{qWxO3PJndXm(CI0V+smd^Nc-AdS98)QWv$``Gb>u7o0Qek#Ad~P8Cy#YdJc|C+ zaq?f9lH)iBmpHt3E;=tvjyOvsWG%PdZYT6t%Ixh@e;5@x(;5_2-~CJProI2~y!k2!ME`pZf@L0CU8FXSdfcCPn-*dI3L+e~aLNG1uOHMWx(c%58I8x8Y zW@7y{Ir|#`lJY!ff62_Anbse4D%JFd`fEbbcS_a4zdi7sY(&Ru6KxJds8Yn>I<^a` zxNII2{Levu6UXx`Na6hQUxi;M1SYj)-Q4omrUNB!j#GllS&J!!>};P234d=iiD=8GK4?tUc)vUI zl5rNE{6O4X4CK-4Gu`*$JFmDy1W2=Uj+lq~iTN`{l=5qi@X%<)0zq?OwuU}h!T z%j1ICHQ@PjZHRwsMCS9AdczuEV;d28B_Fs$wWJaB=Lfd=<2?L%aza`8{)b5y!^E!g z`2zlLhG|w^)S1OqM4VwS{4QzlGMR0KDF1tjL~0P}YwEph5up(KWM>H)1kTrni+M^$g)is z8?X&F!PsSv1ZS}cM>dcI5D7`h?mkG!h6Iu&c@W4NaFR`;VfTe3up0uK?0$cB&uDzG zk9}|Rwx3F0RdsiD)n9-8_5U^Bc%k^^J;j-~hV{F<$S{m&NR_1C^9`ejisKhS$`1`O zjQ;R(_&t(b6E2|)C&F_0efTH%KD-V7c9>y|hTDf5#vAYuTm|hBhS30@g7aa~NF!qe z$SfFX7^QG4yb<0C$H@bu3?l_6z-jO>l;^(&$G|t>c=!h>9U075XTWMW6hZ+{t%k*cW@EBgqH`y2Dk)n zgEVOzgJtk(CF}5gwbG;IP?9@q`*U z!{Mf3w85+39M}V&fxU1hJdSuSg)hO)P)64cwm|vtD{v`%7jEJE#w_H&h>F{wh~x#B zl?R|S^ak@G9T-&NN#JrQBE1P7hL6IB;DYIfaXEYoB0OU%3MC(00;S_yVG}$GWlDbs zhZbiHV-l^AH)f$Z46HW+6pI1HY;l=*KY^BxuQ;^oLQ4tGJB zf_I?YA2HW3hCmCVz(yMKig6T*D8C0~?%#%@8`Eg)Hn8xtQ7*J#wYvEOtn^<$aV>}8)ly5=NfnUMFa3~Wj9h(fxd2be!kzT!! zPQy+(4(@{@xf8HId=8F+FJ{PWCUXidh1D#DIvVPRq65z}4XES`>!yJb?~PUp&2t)dJ<`YBKl85nZmC@>3GR1rU|ZvGQeL$^wgMM zrGG|0_Mwje(a@u7)y)JK%Kq0F){EE)+@p8HV7@tGwlT z4P>^ALr|3OMJOHp4V;Yr8AI!_epFOKnbU5FP>lU>IQ%}8sdx)cg@M&xhp&L;lpRc_!`_rIZSJZ z;G0l7(!s;h;luD^cpSR$OHd>Gt7j@+_(|@4IhJ-!lRo! z%k@2&qjT_15{V(4_wJP^REJup3^u&70dja7r=C24x_xH`573-Tyl8 z{+GjsafJF`LV3Td#WQT*gqKnNpauCaBeNi481%u|1#f__!Mot{sHY1*fe%w2WqFRn zx8P*TuR~F)58zU{-|C5c6Rf3tH)J-Ae}>~=MVqHHE8$qmof$Hs3Q%-eou;Pu|J zmD;4JuEcmVzfoCNp8J&)%&3{w6v6lIh>_g_H?48cp#*iA*uFGRtO zdoi1r!+(Ppz$(X6@@hC%)_;u55N_;)OL*}fC=I{LTABhsgyZ1^hBX~l!-23Fj)vDm zzHQtLSHVBPeYCSMO-Cp{-{nbm>~?S2Er+O+@f?)>$C!>vBMReMxCPz|i)r9@@ZTxF zw}Vl^>`rgn{0MSe+luR;d{izG|00rf>Z_zXNPk0;Yc=Vp&UxlnBytfcb07ccs8&9p zZT=j|aEVlqqPAiT!r;5w4x9%cCp|)9t9Ogjq1YOnQbS*GLa~MNB5YjI`OWtA0vtuUh4g9C781+SxQ8Uy64D;hK`9hmSCPL^RJ(sc9Dw-w>{SfIU(sI&cBv~UUh~9zrLRNvc&0mBIN$7+Q6fTCj>lm5cr2V=g zgBFo_l=KzSVG^3Dtpm{4=X_#TwZkXHBYquPuNS@)XZv-6FOhC0wUR8-=SgziOOo|^ z1F41dw|rk;1AIQ|b1l5v&&z`SEa@7*T<7yjpPfEe!1;b&`7DE1(7xq$fyn z-R~j)KkDaZz=5Q2{*GaMiu_Z4x!h;H&o~sZJuH~ySDFxYG6wI$Lmxs0J)S_SBwbG0 zLW+@gla7(TPI`%Siu69|!b?zN-p$Ex1Wm{_jr3n!d%3q**Yqu{7o{6=^Ek^-9+XQu zA$2cNmlLvRnADxeuvW=KT)Dc{)a5iMSGR|{S>9v$=boZ&xnC#iO|A+NgETykMbW6M zy!9g4_xyVYc&N<3Ct4=YKTDlxi(I*n8oNDXSy;D`x}{RVm3!`<-F*Y=d4I(9#VR>w zaq-Nc`pTHcd!C*AVX^Q+$?bis)wgN z(sQV!rf7;Cw^MdFX1kW@wuc=n8f>*=mf0S5+s#zCC1$DTrYDtCTGg|#ti4#BoUu`D zthlsi@657d6$p*0T%Cwov}oF{8Be6lE}Dv(+uNe=pxqj@I+Cd!x{hvY#aS%cb4ClIbo!xoE0!b^Npy6C z<59E8*F70*`hpHC&bNE+o&STPv748zYp82jS!32G+?1I@8E!BWt!7EI=lKPzOFJ@H9I)F(yW?aGiUb9%BsrBf%RcG72M#2<8CaR zN;oxUgB?l4!mioqB)ViEi{eOJa+h_c!%@fX3Ly$LcU{N8y7g;<)zxzs1gq4e>(FfBn`*^)UAFmA8xtapGe>4i7-JN0V~I#OWd+P|mldJjjAIYNX_1M` z;2b-Z#p1+GH=Rr-910~-I$^iP6UZQBd~AE_y5wQ%e`i!tsdB%*FMq$*f~1+xgci${CARFu=4P^vB&#?ch_>I z6Hgn(nDgkiy1ixE5SdzYk@Rz*NL%VI)^$r3>q_-NbS8TBQgr3=6`}x6+U7$tndjb< zjJl3w!gX!-9Fb!yV-N){)mp78tzc1BHCr`v(C|Qs8#v=}G&QI1g<`~BvQ)C_rrbfSah-@awiK)lTo^C_B8ury`AFYHNHz1kkS zKx{>gsa~`z7}y`}gN?loHCb5*X*V>`Se{5nq;J$jQph@rJ(D%BRjfmII^WTSdM5P3 z^&Z1Wy`$c~e%#jo#oJ+Nz2hC4K8KcL%S43YWXPi6Ne7*bjZ-(>Q2N*YNCN`8E*9ed zU9pLS#HjFj<|f?HtNs#ex_Et-F2y5=q%^CJbWE+vMr=frpXX@S^HtJLpK%TuXTG)Q z6TBtXl}TdPveL{c!idm~2uprVeAK9H6x}O{CH{(Scc0yM@RRjB*U{EQAoEGy5RJ4<^!j|8NWDg~gFf`io<5wk4gCy-N0{ts(XM z&e3XKa>WQ)5r|aw8?1;oedvEz0DiN5M!Hbnpxb`Xu3%~5j-ZlYNDeB2}Y^v z2*=Fp)0j~+oOEbAxW-tA^w?Z!ri_)?8Wy(zLAz)jjXb^GY7sTZ zud!TLq%1Q;-yPeEnWqLWYDtTSh>^joa4#by2_>AiB_WaA**m)$kqY+rcX@SX>hh6U zHh5f1{2Tm)l=yTuhTzfE+J3SZsN(drNm(cCh+#j&3d+(Eqp>PIC6m4W6qYV)cG)iO zgZ_3(X5lfJ)Msh6GmRbBUH8^GTbxmk$D&Pla1EP6PXFwVj%?J%LD7a+3q%Y7gZ4#P z@SfX_bIt6i<6TonRxle9z=UG~QP_YRZpDxIeb<7bcT~mpx!$(g#iWX4=(n?dr8%u} z*@jh2uoywx>{Bq$5puKYXWM67B2#O{Q4VIy8}j(>@l)&&4xwKg20X;Y@9HTpXWcW{MSN(STs8HeXA{LGtAJy)z-g!I` z=^6EWq28S{X@BIdhE1|UBgO{pDdB)6ML)#@bFyuO#q54E`8ETO$J4%{6}Kw4d|h$j zQalqfHfo31HxNJF6&{1wg5Ihfc>2xG`E&mt1KQ>oZg9rxi)eKPWgUg(<5(Ti=5O^y zjdkKu{5EbiJH&T7^0u1_YeHT-`LOnkdwxS1;!PddHtP^J7kx@Wf={ou@1r`fZKkPn z1-8w3Q(qXJ>gcxF4`Ore>!N%hle?qC+yArZR=bX$B*2|65w1kGVj$dR&kam>b9ivN zsyr~itmlavA1ul&+pwXwVME=T22t3k#32zhl~@hCN5F>F6+KMGs39W$jd+l*QTWnn zTOx-hdS&9@+g({%>)vt+nRPK~ENKw}=$$lteIkubBoHjigr<30gZSM!s~42>7jtRB zr_`r1C7G=6=U^#3zm+9Y@QmKM`|g;o)gdl#xQozIN2JmPq7=OrU9*zQShlHl-G;jL z>uXmd2&BOC=khvPu3(B;Rd-MuNn*oe`ys(a7+4B-Zww|;>g5C5$G4EjyolI{X7Pzo10+b)X{Xvdvg+?{2@X3)^(J%Z78Z!#d{lvNMMEQ z;5i@kqI2(tqW9H5?yaD0IZ4t!lGSZRjI0-RiI)=L*vC>+_tgw_yOOwwZE@V^oxzw@ zt`6^u1-0X5GGk#BSRb{J^Gum^+S~pN%W-hIO%>Wdc37aKq$I+&$$p0$VmWwW;r+q> z_&(YPIktcNAjya%0_6cCOT0E|sKjaoLeQ0ibfs&h+U%(JSiUB$YnpB=o0uPola*+Z zh2n`$$9U?*ZR3agZkl5;W;`F65;getNz?Noqd2;vwry5Qj^)_lOi}zudm^1R)t_!J z58?Pk%x8^89n?rXU*LZGPLYdqvm8rSTr(ASvN+u%reZ9KTiCVSsWppbum4lfBkT!`g?IWuA*gLuMmZE2yoO z97hH1n5-Id^c+_vD#4d86+I&F5_F)bDW%MLFNs} z*|w!5QlX>jfW!!S-#noA8t+t1);MN@r6g8GmTss(SvbY*Os~=rl>{k%pVy?5t~mvd zN)BWS&I9!UBH|CQV)+Kr^x`9InSMhZyt8D0IVD$m_Rfh@CE_O9%FPGoWoVQ?30~x# zRYiy959`&ctK+U#dJ?zG)#^jHl=Cjjf|D>-V1nVx_NgaOJmf-GP}SX4H40BT#27fI zvdm}8%^J@)QD0m+Nj-Dd^pewV`_@i|uC>t*sZi;|rW&xyRBH~$HegSDD}?e9u}IId zVsE@S9tq`DUY}jc$)oJ*+Crj-L`)Ut8MaG(^RSsgoATD7i{rw+LkGS4w8`0M$nb(< zBya=@+vVOfmFb=ewZ|l4CB$T6V-QA$C2_8de}1?B!mg-{|)74 z&*Mi17vXh(OPR&J9Y>B%&-g2XmMy0>mhKyJpVG@$V_6xqUTS%vc!zwxUtVUF_q~zx z)qQ+hK=2jAD$k5l*EQ>`AZpIUmB*K@`hBwDPES=qf4CjEk=LT@#i zC7~*Q5pl~4oD%ioy_46R)m+|@i<+`^C0g7>te5bK9|PDIJ-deiZV^)Ff# zV!k8l_WMf9PkCn-XG#YT?To&vllP6wXw{J4SHvW_RvLGtHNggPN*W|?7aQ!RqIUf3 z_CDt5<}q`t>{GcY%{t4^i*hibe=w9iaL2tDO+Yu;tP5Y!YfYOYwfM8k))D0DyOSSus=IdtI z8F8=K#qj<+)1~@Ur#xhyeg+g(-N$B+&qgpB_)Eswdu7i{$6hGrv=2>@9bSjag}+<) z$Fn5`zgDQ{9vI8X(8&j8^b0mvH Sc_&)!dT?(4toV-ujsFH+_}Bmd diff --git a/po/fr.po b/po/fr.po index ea491ec..bb0e0a3 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,86 +1,125 @@ -# Messages français pour GNU concernant findutils. -# Copyright (C) 2010 Free Software Foundation, Inc. +# Messages français pour GNU concernant findutils. +# Copyright (C) 2013 Free Software Foundation, Inc. # This file is distributed under the same license as the findutils package. # Michel Robitaille , traducteur depuis/since 1996. # Nicolas Provost , 2010. -# +# Frédéric Marchal , 2013. msgid "" msgstr "" -"Project-Id-Version: GNU findutils 4.5.7\n" +"Project-Id-Version: GNU findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2010-12-20 17:42+0100\n" -"Last-Translator: Nicolas Provost \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-09-26 15:14+0200\n" +"Last-Translator: Frédéric Marchal \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" -msgstr "Echec d'initialisation de la table de hâchage des fichiers partagés" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "" +"Le répertoire de travail n'a pas pu être sauvé avant d'exécuter la commande " +"%s" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Impossible de fermer l'entrée standard" -#: find/find.c:205 +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Impossible de changer de répertoire" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "impossible de cloner le processus (fork)." + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "Erreur en attendant %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s a terminé son exécution par le signal %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Échec d'initialisation de la table de hachage des fichiers partagés" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "Fonction de librairie fnmatch() : échec de vérification d'intégrité." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" -msgstr "impossible d'atteindre le répertoire courant" +msgstr "impossible d'obtenir les « stat » du répertoire courant" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "Impossible de lister les périphériques montés." +msgstr "Impossible de lister les périphériques montés." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "AVERTISSEMENT : le système de fichier %s a été récemment démonté." +msgstr "AVERTISSEMENT : le système de fichier %s a été récemment démonté." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "AVERTISSEMENT : le système de fichiers %s a été récemment monté." +msgstr "AVERTISSEMENT : le système de fichiers %s a été récemment monté." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -"modification de %s%s l'exécution de %s (ancien n° de périphérique %ld, " -"nouveau n° de périphérique %ld, type du système de fichiers est %s) [ref %ld]" +"modification de %s%s durant l'exécution de %s (ancien n° de périphérique " +"%ld, nouveau n° de périphérique %ld, type du système de fichiers est %s) " +"[ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -"modification de %s%s durant l'exécution de %s (ancien n° d'inode %, " -"nouveau n° d'inode %, type du système de fichiers %s) [ref %ld]" +"modification de %s%s durant l'exécution de %s (ancien n° d'inode %, " +"nouveau n° d'inode %, type du système de fichiers %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" -msgstr "impossible de revenir au répertoire parent" +msgstr "impossible de revenir au répertoire parent" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "Echec de changement du répertoire vers %s" +msgstr "Impossible de changer vers le répertoire %s en toute sécurité" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -"Le lien symbolique \"%s\" fait partie d'une boucle dans la hiérarchie du " -"répertoire ; le répertoire sur lequel il pointe a déjà été visité." +"Le lien symbolique « %s » fait partie d'une boucle dans la hiérarchie du " +"répertoire ; le répertoire sur lequel il pointe a déjà été visité." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -89,20 +128,20 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" -"Boucle détectée dans le système de fichiers ; \"%s\" a le même n° de " -"périphérique et d'inode que le répertoire qui est %d niveau plus haut dans " +"Boucle détectée dans le système de fichiers ; « %s » a le même n° de " +"périphérique et d'inode que le répertoire qui est %d niveau plus haut dans " "l'arborescence" msgstr[1] "" -"Boucle détectée dans le système de fichiers ; \"%s\" a le même n° de " -"périphérique et d'inode que le répertoire qui est %d niveaux plus haut dans " +"Boucle détectée dans le système de fichiers ; « %s » a le même n° de " +"périphérique et d'inode que le répertoire qui est %d niveaux plus haut dans " "l'arborescence" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "Attention : lien symbolique non suivi %s" +msgstr "Attention : lien symbolique non suivi %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -111,18 +150,19 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" -"AVERTISSEMENT : lien direct (hard link) erroné pour %s (vus seulement " -"st_nlink=%, mais déjà vus % sous-répertoires). C'est peut-" -"être dû à une anomalie dans le pilote du système de fichiers. Option de " -"recherche -noleaf automatiquement activée. Les résultats antérieurs peuvent " -"ne pas inclure des répertoires qui auraient dû être recherchés." +"AVERTISSEMENT : Lien direct (hard link) erroné pour %s (vus seulement " +"st_nlink=%, mais déjà vus % sous-répertoires). C'est peut-" +"être dû à une anomalie dans le pilote du système de fichiers. Option de " +"recherche -noleaf de « find » automatiquement activée. Les résultats " +"antérieurs peuvent ne pas inclure des répertoires qui auraient dû être " +"parcourus." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "Impossible de lister les systèmes de fichiers montés" +msgstr "Impossible de lister les systèmes de fichiers montés" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "inconnu(e)" @@ -131,38 +171,43 @@ msgstr "inconnu(e)" msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -"Boucle détectée dans le système de fichiers ; \"%s\" est dans la même boucle " +"Boucle détectée dans le système de fichiers ; « %s » est dans la même boucle " "que %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "ATTENTION : le fichier %s semble avoir comme permissions 0000" +msgstr "ATTENTION : le fichier %s semble avoir la permission 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" msgstr "impossible de chercher %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "" -"échec de rétablissement du répertoire de travail initial après recherche de " -"%s" +"échec de rétablissement du répertoire de travail initial après recherche " +"dans %s" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Échec d'initialisation de la table de hachage des fichiers partagés" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" "L'action -delete active automatiquement -depth, mais -prune ne fait rien si -" -"depth est présente. Pour continuer, utilisez plutôt explicitement l'option -" +"depth est présente. Pour continuer, utilisez plutôt explicitement l'option -" "depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -170,63 +215,63 @@ msgid "" "as those specified after it). Please specify options before other " "arguments.\n" msgstr "" -"AVERTISSEMENT : vous avez spécifié l'option %s après un argument qui n'est " +"AVERTISSEMENT : vous avez spécifié l'option %s après un argument qui n'est " "pas une option %s mais les options sont positionnelles (%s affecte les tests " -"spécifiés avant aussi bien qu'après). SVP spécifiez des options avant les " +"spécifiés avant aussi bien qu'après). SVP spécifiez les options avant les " "autres arguments. \n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -"AVERTISSEMENT : l'option -d est obsolète ; svp utilisez -depth à la place, " -"parce celle-ci est est une option conforme à POSIX." +"AVERTISSEMENT : l'option -d est obsolète ; veuillez utiliser -depth à la " +"place, parce que celle-ci est est une option conforme à POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -"%s n'est pas le nom d'un groupe existant et ne semble pas être un n° de " -"groupe à cause du suffixe inattendu %s" +"%s n'est pas le nom d'un groupe existant et ne semble pas être un " +"identifiant numérique de groupe à cause du suffixe inattendu %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s n'est pas le nom d'un groupe existant" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" -msgstr "l'argument de -group est vide, et devrait être un nom de groupe" +msgstr "l'argument de -group est vide. Il devrait être un nom de groupe" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" "\n" -"Le répertoire utilisé par défaut est le répertoire courant ; l'\n" -"option par défaut est -print. Une expression peut être\n" -"constituée: d'opérateurs, d'options, de tests et d'actions :\n" +"Le répertoire utilisé par défaut est le répertoire courant ;\n" +"l'option par défaut est -print. Une expression peut être\n" +"constituée d'opérateurs, d'options, de tests et d'actions :\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"les opérateurs (par précédence décroissante; -and est implicite\n" -"lorsqu'aucun autre paramètre n'est fourni):\n" +"les opérateurs (par précédence décroissante; -and est implicite\n" +"lorsqu'aucun autre paramètre n'est fourni) :\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -234,15 +279,15 @@ msgid "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -"les options positionnelles (toujours vraies i.e. « true ») :\n" +"les options positionnelles (toujours vraies c.-à-d. « true ») :\n" " -daystart -follow -regextype\n" -"les options normales (toujours vraies i.e. « true » et devant être " -"spécifiées\n" -"avant les autres expressions):\n" +"les options normales (toujours vraies c.-à-d. « true » et devant être " +"spécifiées\n" +"avant les autres expressions) :\n" " -depth --help -maxdepth NIVEAUX -mindepth NIVEAUX -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -250,29 +295,29 @@ msgid "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" -"les options de tests (N peut être +N ou -N ou N) :\n" +"les options de tests (N peut être +N ou -N ou N) :\n" " -amin N -anewer FICHIER -atime N -cmin N\n" " -cnewer FICHIER -ctime N -empty -false -fstype TYPE -gid N -group NOM\n" " -ilname MOTIF -iname MOTIF -inum N -iwholename MOTIF -iregex MOTIF\n" " -links N -lname MOTIF -mmin N -mtime N -name MOTIF -newer FICHIER" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path MOTIF -perm [+-]MODE -regex MOTIF\n" +" -nouser -nogroup -path MOTIF -perm [-/]MODE -regex MOTIF\n" " -readable -writable -executable\n" " -wholename MOTIF -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NOM -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context CONTEXTE\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -281,28 +326,28 @@ msgid "" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" "\n" -"actions : -delete -print0 -printf FORMAT -fprintf FICHIER FORMAT -print \n" +"actions : -delete -print0 -printf FORMAT -fprintf FICHIER FORMAT -print \n" " -fprint0 FICHIER -fprint FICHIER -ls -fls FICHIER -prune -quit\n" " -exec COMMANDE ; -exec COMMANDE {} + -ok COMMANDE ;\n" " -execdir COMMANDE ; -execdir COMMANDE {} + -okdir COMMANDE ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" -"Rapporter (et faire le suivi du progrès de correctifs) toutes anomalies\n" +"Rapportez (et faire le suivi du progrès de correctifs) toutes anomalies\n" "en suivant les instructions se situant sur la page http://savannah.gnu.org\n" -"ou si vous n'avez pas d'accès web en adressant un courriel à\n" +"ou si vous n'avez pas d'accès web en adressant un courriel à\n" "." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." -msgstr "Fonction de librairie fnmatch() : échec de vérification d'intégrité." +msgstr "Fonction de librairie fnmatch() : échec de vérification d'intégrité." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -311,160 +356,170 @@ msgid "" "perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -"AVERTISSEMENT : les noms de fichiers Unix usuels ne contiennent pas de barre " -"obliques (sauf pour les chemins). Cela signifie que '%s %s' sera toujours " -"évalué comme étant faux sur ce système. Vous pouvez trouver que le test '-" -"wholename' est plus utile, ou encore celui-ci : '-samefile'. " -"Alternativement, si vous utilisez GNU grep, vous pourriez utiliser 'find ... " -"-print0 | grep -FzZ %s'." +"AVERTISSEMENT : les noms de fichiers Unix usuels ne contiennent pas de barre " +"obliques (sauf pour les chemins). Cela signifie que « %s %s » sera toujours " +"évalué comme étant faux sur ce système. Vous pouvez trouver que le test « -" +"wholename » est plus utile, ou encore celui-ci : « -samefile ». " +"Alternativement, si vous utilisez GNU grep, vous pourriez utiliser " +"« find ... -print0 | grep -FzZ %s »." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" -msgstr "Un décimal positif est attendu comme argument à %s, mais %s trouvé" +msgstr "" +"Un nombre décimal positif est attendu comme argument à %s, mais %s trouvé" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -"Le système ne permet pas de retrouver la date de création d'un fichier." +"Le système ne permet pas de retrouver la date de création d'un fichier." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" -msgstr "Le test « %s » requiert un paramètre" +msgstr "Le test « %s » requiert un paramètre" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" -msgstr "Impossible d'interpréter %s comme une date ou une heure" +msgstr "Impossible d'interpréter %s comme une date ou une heure" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "Impossible d'obtenir la date de création du fichier %s" +msgstr "Impossible d'obtenir la date de création du fichier %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "" -"attention : -%s %s ne donnera pas de correspondance car finissant par /." - -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Le mode %s n'est pas valide lorsque POSIXLY_CORRECT est actif." +msgstr "attention : -%s %s ne donnera pas de correspondance car il fini par /." -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" -msgstr "mode non valide « %s »" +msgstr "mode non valide « %s »" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" -"AVERTISSEMENT : vous avez spécifié un type de motif %s (équivalent à /000). " -"Le sens de -perm /000 a été modifié pour être consistant avec -perm -000 ; " -"c'est-à-dire qu'au lieu de n'avoir aucun fichier correspondant, tous les " -"fichiers correspondent dorénavant." +"AVERTISSEMENT : vous avez spécifié un motif de permission %s (équivalent " +"à /000). Le sens de -perm /000 a été modifié pour être consistant avec -perm " +"-000 ; c'est-à-dire qu'au lieu de n'avoir aucun fichier correspondant, tous " +"les fichiers correspondent dorénavant." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" -msgstr "Paramètre nul non valide pour l'option -size" +msgstr "Paramètre nul non valide pour l'option -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "type non valide pour l'option -size « %c »" +msgstr "type non valide pour l'option -size « %c »" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "Argument non valide \"%s%c\" pour -size" +msgstr "Argument non valide « %s%s » pour -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -"L'option -show-control-chars prend un unique argument, \"literal\" ou \"safe" -"\"" +"L'option -show-control-chars prend un unique argument qui doit être « " +"literal » ou « safe »" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Argument non valide %s pour -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "%s n'est pas le nom d'un utilisateur connu" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" -msgstr "L'argument de l'option -user ne devrait pas être vide" +msgstr "L'argument de l'option -user ne devrait pas être vide" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " -msgstr "Fonctions activées : " +msgstr "Fonctions activées : " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "prédicat non valide -context : SELinux n'est pas activé." +msgstr "prédicat non valide -context : SELinux n'est pas activé." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Les arguments pour -type devraient contenir seulement une lettre" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Argument inconnu pour -type : %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c n'est pas supporté car les liens symboliques ne sont pas supportés " +"sur la plate-forme où find a été compilé." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "AVERTISSEMENT : séquence d'échappement « \\%c » inconnue" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c n'est pas supporté car les FIFOs ne sont pas supportées sur la " +"plate-forme où find a été compilé." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "erreur : %s à la fin de la chaîne de format" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c n'est pas supporté car les sockets nommées ne sont pas supportées " +"sur la plate-forme où find a été compilé." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "AVERTISSEMENT : directive de formatage « %%%c » inconnue" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c n'est pas supporté car les portes Solaris ne sont pas supportées " +"sur la plate-forme où find a été compilé." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" -"erreur : la directive de format \"%%%c\" est réservée pour un usage futur" +msgid "Unknown argument to -type: %c" +msgstr "Argument inconnu pour -type : %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -"Le répertoire courant est inclus dans la variable d'environnement de chemin " -"$PATH, ce qui n'est pas sécurisé en combinaison avec l'action %s de find. " -"SVP enlever le répertoire courant de $PATH (i.e enlever \".\" ou les \":\" " -"en préfixe et suffixe)." +"Le répertoire courant est inclus dans la variable d'environnement de chemin " +"PATH, ce qui n'est pas sécurisé en combinaison avec l'action %s de find. " +"Veuillez enlever le répertoire courant de $PATH (c'est-à-dire, enlever " +"« . », les doubles « : » ou les « : » en préfixe et suffixe)." -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -472,439 +527,762 @@ msgid "" "entry from $PATH" msgstr "" "Le chemin relatif %s est inclus dans la variable d'environnement de chemin " -"$PATH ; ce n'est pas sécurisé sous l'action %s de find. SVP enlever cette " -"entrée dans $PATH." +"PATH ; ce n'est pas sécurisé avec l'action %s de find. Veuillez enlever " +"cette entrée dans $PATH." -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -"Vous ne pouvez utiliser {} à l'intérieur du nom de l'utilitaire pour --" -"execdir et -okdir, parce que cela pose un problème potentiel de sécurité." +"Vous ne pouvez utiliser {} à l'intérieur du nom de l'utilitaire pour --" +"execdir et -okdir, parce que cela pose un problème potentiel de sécurité." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "Une seule instance de {} est supportée avec -exec%s ... +" +msgstr "Une seule instance de {} est supportée avec -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "Dans %s, le %s doit apparaître seul mais vous avez spécifié %s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." -msgstr "L'environnement est trop lourd pour exec()." +msgstr "L'environnement est trop volumineux pour exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" -msgstr "dépassement arithmétique durant la conversion de %s jours en secondes" +msgstr "dépassement arithmétique durant la conversion de %s jours en secondes" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" -msgstr "dépassement arithmétique durant le calcul de la fin de ce jour" +msgstr "dépassement arithmétique durant le calcul de la fin de ce jour" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" -msgstr "sortie \"erreurs\" standard" +msgstr "sortie « erreurs » standard" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "sortie standard" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "impossible de supprimer %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "" -"échec de rétablissement du répertoire de travail initial après recherche de " -"%s" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "getfilecon a échoué : %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "ATTENTION : impossible de trouver la date de création du fichier %s" +msgstr "ATTENTION : impossible de trouver la date de création du fichier %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Échec d'écriture sur la sortie standard" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Impossible de fermer l'entrée standard" +msgid "getfilecon failed: %s" +msgstr "getfilecon a échoué : %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Impossible de changer de répertoire" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "Impossible de cloner le processus (fork)." +msgid "warning: unrecognized escape `\\%c'" +msgstr "AVERTISSEMENT : séquence d'échappement « \\%c » inconnue" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "Erreur en attendant %s" +msgid "error: %s at end of format string" +msgstr "erreur : %s à la fin de la chaîne de format" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s a terminé son exécution par le signal %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" +"erreur : la directive de format « %%%c » est réservée pour un usage futur" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" +"avertissement : la directive de formatage « %%%c » devrait être suivie par " +"un autre caractère" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "AVERTISSEMENT : directive de formatage « %%%c » inconnue" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "expression non valide" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -"expression non valide ; vous avez utilisé un opérateur binaire \"%s\" non " -"précédé d'une expression." +"expression non valide ; vous avez utilisé un opérateur binaire « %s » non " +"précédé d'une expression." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "expression attendue entre \"%s\" et \")\"" +msgstr "expression attendue entre « %s » et « ) »" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" -msgstr "expression attendue après \"%s\"" +msgstr "expression attendue après « %s »" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" -msgstr "expression non valide ; il y a trop de ')'" +msgstr "expression non valide ; il y a trop de « ) »" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -"expression non valide. ')' était attendue mais n'a pas été détectée. Peut-" -"être faut-il un autre prédicat après \"%s\"." +"expression non valide. « ) » était attendue mais n'a pas été détectée. Peut-" +"être faut-il un autre prédicat après « %s »." -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." -msgstr "expression non valide ; parenthèses vides non autorisées." +msgstr "expression non valide ; parenthèses vides non autorisées." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." -msgstr "expression non valide ; ')' attendue mais non détectée." +msgstr "expression non valide ; « ) » attendue mais non détectée." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" -msgstr "Oups ! type d'expression non valide." +msgstr "Oups -- type d'expression non valide !" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "Oups ! type (%d) de l'expression non valide !" +msgstr "Oups -- type (%d) de l'expression non valide !" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"avertissement : il n'y a pas d'entrée dans la table des coûts d'évaluation " +"des prédicats pour le prédicat %s. Merci de signaler ce bogue" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" -msgstr "les chemins doivent précéder l'expression : %s" +msgstr "les chemins doivent précéder l'expression : %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" -msgstr "prédicat inconnu « %s »" +msgstr "prédicat inconnu « %s »" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" -msgstr "prédicat non valide « %s »" +msgstr "prédicat non valide « %s »" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" -msgstr "Paramètre non valide « %s » pour « %s »" +msgstr "paramètre non valide « %s » pour « %s »" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" -msgstr "Paramètre manquant pour « %s »" +msgstr "paramètre manquant pour « %s »" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "il y a trop de ')'" +msgstr "il y a trop de « ) »" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" -msgstr "prédicat supplémentaire inattendu \"%s\"" +msgstr "prédicat supplémentaire inattendu « %s »" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" -msgstr "prédicat superflu inattendu" +msgstr "prédicat superflu inattendu" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" -msgstr "Oups ! instertion par défaut de \"and\" non valide." +msgstr "Oups -- insertion par défaut de « and » non valide !" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " -msgstr "Utilisation : %s [-H] [-L] [-P] [-Olevel] [-D " +msgstr "Utilisation : %s [-H] [-L] [-P] [-Olevel] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [chemin...] [expression]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "impossible d'enregistrer le répertoire de travail courant" +msgstr "échec d'enregistrer du répertoire de travail initial" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "impossible d'enregistrer le répertoire de travail courant" +msgstr "impossible de rétablir le répertoire de travail initial" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "Option de débogage non reconnue %s, ignorée." +msgstr "Option de débogage non reconnue %s, ignorée." -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Argument vide pour l'option -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "L'option -O doit être immédiatement suivie d'un décimal" +msgstr "L'option -O doit être immédiatement suivie par un nombre décimal" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" -msgstr "SVP spécifiez un nombre décimal juste après -O" +msgstr "Veuillez spécifier un nombre décimal juste après -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Niveau d'optimisation non valide %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -"Niveau d'optimisation %lu trop élevé. Si vous voulez trouver les fichiers " -"très rapidement, considérez d'utiliser GNU \"locate\"." +"Niveau d'optimisation %lu trop élevé. Si vous voulez trouver les fichiers " +"très rapidement, considérez d'utiliser GNU « locate »." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -"La variable d'environnement FIND_BLOCK_SIZE n'est pas supportée, la seule " +"La variable d'environnement FIND_BLOCK_SIZE n'est pas supportée, la seule " "chose qui peut affecter la taille de bloc est la variable d'environnement " "POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argument %s non valide pour %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argument %s ambigu pour %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Les paramètres valides sont :" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "erreur de fermeture du fichier" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "erreur d'écriture" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Erreur système inconnue" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: l'option « %s » est ambiguë\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: l'option « --%s » ne requiert pas de paramètre\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: l'option « %c%s » ne requiert pas de paramètre\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: l'option « %s » requiert un paramètre\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: option non reconnue « --%s »\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: option non reconnue « %c%s »\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: option non valide --%c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: l'option requiert un paramètre -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: l'option « -W %s » est ambiguë\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: l'option « -W %s » ne requiert pas de paramètre\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: l'option « %s » requiert un paramètre\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "impossible de rétablir le répertoire de travail initial" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "impossible de rétablir le répertoire de travail initial" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "\"" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "\"" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[oO]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "mémoire épuisée" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "argument %s%s non valide \"%s\"" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "suffixe non valide dans l'argument %s%s \"%s\"" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "%s%s argument \"%s\" trop grand" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "commande trop longue" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -"impossible d'invoquer exec() à cause de restrictions sur la taille des " +"impossible d'invoquer exec() à cause de restrictions sur la taille des " "arguments" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" "impossible d'inclure un argument simple compte tenu de la limite de taille " "de la liste d'arguments" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "liste d'arguments trop longue" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -"La variable d'environnement %s ne contient pas un nombre décimal valide" +"La variable d'environnement %s ne contient pas un nombre décimal valide" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Le descripteur de fichier %d va nous échapper. Merci de signaler ce bogue. " +"N'oubliez pas d'inclure une description détaillée de la procédure la plus " +"simple pour reproduire ce problème." + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Échec d'écriture sur la sortie standard" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Construit avec GNU gnulib version %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Type d'expression régulière %s inconnu ; les types valides sont %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "Suffixe %s non attendu dans %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" -msgstr "Entier attendu : %s" - -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Type d'expression régulière %s inconnu ; les types valides sont %s." +msgstr "Nombre entier attendu : %s" -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" msgstr "" -"Utilisation : %s [--version | --help]\n" -"ou %s bigrammes_les_plus_communs < liste_de_fichiers > base-de-données-" +"Utilisation : %s [--version | --help]\n" +"ou %s bigrammes_les_plus_communs < liste_de_fichiers > base-de-données-" "locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" "\n" -"Rapporter toute anomalie à .\n" +"Rapporter toute anomalie à .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "erreur d'écriture" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" -msgstr "Utilisation : %s [-0 | --null] [--version] [--help]\n" +msgstr "Utilisation : %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." -msgstr "Vous devez spécifier un niveau de sécurité avec un nombre décimal." +msgstr "Vous devez spécifier un niveau de sécurité avec un nombre décimal." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." -msgstr "Le niveau de sécurité %s est hors de la plage convertible." +msgstr "Le niveau de sécurité %s est hors de la plage convertible." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." -msgstr "Le niveau de sécurité %s a un suffixe inattendu %s." +msgstr "Le niveau de sécurité %s a un suffixe inattendu %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." -msgstr "niveau de sécurité pour \"slocate\" %ld non supporté." +msgstr "niveau de sécurité pour « slocate » %ld non supporté." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" -msgstr "Echec d'écriture sur la sortie standard" +msgstr "Échec d'écriture sur la sortie standard" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "jours" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "L'argument pour l'option --max-database-age ne doit pas être vide" +msgstr "L'argument pour l'option --max-database-age ne doit pas être vide" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" -msgstr "le paramètre %s pour l'option --max-database-age n'est pas valide" +msgstr "le paramètre %s pour l'option --max-database-age n'est pas valide" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "la base de localisation %s contient un nom de fichier plus long que ce que " -"\"locate\" peut gérer" +"« locate » peut gérer" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "base de localisation %s corrompue ou non valide" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" -msgstr[0] "Taille de la base de données de localisation : %s octets\n" -msgstr[1] "Taille de la base de données de localisation : %s octets\n" +msgstr[0] "Taille de la base de données de localisation : %s octets\n" +msgstr[1] "Taille de la base de données de localisation : %s octets\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" -msgstr "Noms de fichiers correspondants : %s\n" +msgstr "Noms de fichiers correspondants : %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" -msgstr "Tous les noms de fichiers : %s\n" +msgstr "Tous les noms de fichiers : %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -914,98 +1292,98 @@ msgid "" "\t%s contain newline characters, \n" "\tand %s contain characters with the high bit set.\n" msgstr "" -"Les noms de fichiers ont une longueur cumulée de\n" +"Les noms de fichiers ont une longueur cumulée de\n" "%s octets. Parmi ces noms de fichiers,\n" "\n" "\t%s contiennent des espaces,\n" "\t%s contiennent des sauts de ligne,\n" -"\tet %s contiennent des caractères étendus.\n" +"\tet %s contiennent des caractères étendus.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -"Certains noms de fichiers ont été filtrés et retirés, il devient impossible " +"Certains noms de fichiers ont été filtrés et retirés, il devient impossible " "de calculer le taux de compression.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Taux de compression %4.2f%% (le plus grand est le mieux)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" -msgstr "Taux de compression indéfini\n" +msgstr "Taux de compression indéfini\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -"La base de localisation %s semble une base \"slocate\" mais avec un niveau " -"de sécurité %c, que \"GNU findutils\" ne supporte pas actuellement." +"la base de localisation %s ressemble à une base « slocate » mais avec un " +"niveau de sécurité %c que « GNU findutils » ne supporte pas actuellement" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -"%s est une base \"slocate\". Son support est récent, attendez-vous à des " -"problèmes." +"%s est une base « slocate ». Son support est récent, attendez-vous à des " +"problèmes." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -"%s est une base \"slocate\" avec un niveau de sécurité non supporté %d ; " -"ignorée." +"%s est une base « slocate » avec un niveau de sécurité non supporté %d ; " +"ignorée." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" -"Option -E spécifiée, mais elle ne peut être utilisée avec les bases au " -"format \"slocate\" ayant un niveau de sécurité non nul. Aucun résultat " +"Option -E spécifiée, mais elle ne peut être utilisée avec les bases au " +"format « slocate » ayant un niveau de sécurité non nul. Aucun résultat " "produit avec cette base.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "%s est une base \"slocate\". Activation de l'option \"-e\"." +msgstr "%s est une base « slocate ». Activation de l'option « -e »." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" -msgstr "Vieux format de base \"locate\" %s trop court pour être valide" +msgstr "Vieux format de base « locate » %s est trop court pour être valide" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" -msgstr "La base de données %s est au format %s.\n" +msgstr "La base de données %s est au format %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" -msgstr "La base de données est encodée au format \"little-endian\".\n" +msgstr "La base de données est encodée au format « little-endian ».\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" -msgstr "La base de données est encodée au format \"big-endian\".\n" +msgstr "La base de données est encodée au format « big-endian ».\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" -msgstr "L'encodage (ordre des octets) de la base n'est pas évident.\n" +msgstr "L'encodage (ordre des octets) de la base n'est pas évident.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1025,161 +1403,176 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " MOTIF...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" -msgstr "échec de suppression des privilèges de groupe" +msgstr "échec de suppression des privilèges de groupe" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "échec de suppression des privilèges setuid" +msgstr "échec de suppression des privilèges setuid" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" -msgstr "Echec de suppression de tous les privilèges" +msgstr "Échec de suppression de tous les privilèges" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "échec de suppression des privilèges setgid" +msgstr "échec de suppression des privilèges setgid" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -"AVERTISSEMENT : la base de données des localisations peut être lue une seule " -"fois à partir de stdin." +"AVERTISSEMENT : la base de données des localisations peut être lue qu'une " +"seule fois à partir de stdin." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "échec d'obtention de l'heure système" +msgstr "échec d'obtention de l'heure système" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" -"AVERTISSEMENT : la base de données \"%s\" est plus vieille de %d %s (âge " +"AVERTISSEMENT : la base de données « %s » est plus vieille de %d %s (âge " "actuel %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -"ATTENTION : la base de localisation %s a été construite avec un ordre des " -"octets différent" +"ATTENTION : la base de localisation %s a été construite avec un ordre des " +"octets différent" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "fin de fichier inattendue dans %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "erreur de lecture d'un mot de %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -"Séquence d'échappement non valide %s dans la spécification de délimiteur en " -"entrée." +"Séquence d'échappement non valide %s dans la spécification de délimiteur en " +"entrée." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -"Séquence d'échappement non valide %s dans la spécification de délimiteur en " -"entrée ; les valeurs de caractères ne doivent pas excéder %lx." +"Séquence d'échappement %s non valide dans la spécification de délimiteur en " +"entrée ; les valeurs de caractères ne doivent pas excéder %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -"Séquence d'échappement non valide %s dans la spécification de délimiteur en " -"entrée ; les valeurs de caractères ne doivent pas excéder %lo." +"Séquence d'échappement %s non valide dans la spécification de délimiteur en " +"entrée ; les valeurs de caractères ne doivent pas excéder %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -"Séquence d'échappement non valide %s dans la spécification de délimiteur en " -"entrée ; caractères en suffixe %s non reconnus." +"Séquence d'échappement %s non valide dans la spécification de délimiteur en " +"entrée ; caractères en suffixe %s non reconnus." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -"Spécification de délimiteur en entrée non valide %s : le délimiteur doit " -"être un caractère simple ou une séquence d'échappement débutant par \\." +"Spécification de délimiteur en entrée %s non valide : le délimiteur doit " +"être un caractère simple ou une séquence d'échappement débutant par \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" -msgstr "environnement trop grand pour exec" +msgstr "environnement trop volumineux pour exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -"attention : la valeur %ld pour l'option -s est trop grande, %ld sera " -"utilisée à la place" +"attention : la valeur %ld pour l'option -s est trop grande, %ld sera " +"utilisée à la place" + +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "l'option --%s ne peut pas être assignée une valeur contenant des « = »" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "impossible d'annuler la variable d'environnement %s" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "attention: l'option -E n'a pas d'effet si -0 ou -d sont utilisées.\n" -#: xargs/xargs.c:629 +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Impossible d'activer le gestionnaire de signal SIGUSR1" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Impossible d'activer le gestionnaire de signal SIGUSR2" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "Impossible d'ouvrir le fichier en entrée \"%s\"" +msgstr "Impossible d'ouvrir le fichier en entrée « %s »" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "Vos variables d'environnement occupent % octets\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" -"Limite supérieure POSIX de longueur d'argument (sur ce système) : " +"Limite supérieure POSIX de longueur d'argument (sur ce système) : " "%\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -"Plus petite limite haute POSIX de longueur d'argument (tous systèmes) " -"autorisée : %\n" +"Plus petite limite haute POSIX de longueur d'argument autorisée (tous " +"systèmes) : %\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "" -"Longueur maximale de la commande qui pourrait être utilisée : %\n" +"Longueur maximale de la commande qui pourrait être utilisée : %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "Taille du tampon de commande actuellement utilisé : %\n" +msgstr "Taille du tampon de commande actuellement utilisé : %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1188,226 +1581,496 @@ msgid "" "of-file keystroke.\n" msgstr "" "\n" -"L'exécution de \"xargs\" va maintenant continuer, et tenter de lire les " -"données en entrée et exécuter les commandes ; si vous ne voulez pas, pressez " -" (EOF).\n" +"L'exécution de « xargs » va continuer maintenant et tenter de lire les " +"données en entrée et exécuter les commandes ; si vous ne le voulez pas, " +"pressez (EOF).\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -"Attention : %s va s'exécuter au moins une fois. Si vous ne voulez pas, " +"Attention : %s va s'exécuter au moins une fois. Si vous ne le voulez pas, " "pressez les touches d'interruption.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" -"guillemets %s non appairés ; par défaut les guillemets sont particuliers à " -"xargs à moins d'utiliser l'option -0" +"guillemets %s non appairés ; par défaut les guillemets sont particuliers à " +"xargs à moins d'utiliser l'option -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "double" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "simple" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -"ATTENTION : un caractère nul est arrivé en entrée. Il ne peut être ajouté à " -"la liste d'arguments. Vouliez-vous en fait spécifier l'option --null ?" +"ATTENTION : un caractère nul est arrivé en entrée. Il ne peut être ajouté à " +"la liste d'arguments. Vouliez-vous en fait spécifier l'option --null ?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" -msgstr "Ligne de paramètres trop longue" +msgstr "ligne de paramètres trop longue" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Échec d'écriture sur la sortie standard" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "échec d'ouverture de /dev/tty en lecture" +msgstr "échec d'ouverture de /dev/tty en lecture" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Échec d'écriture sur la sortie standard" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "impossible d'allouer la mémoire" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "la variable d'environnement %s n'a pas pu être définie" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" -msgstr "impossible d'ouvrir un tube (pipe) avant le clônage (fork)" +msgstr "impossible d'ouvrir un tube (pipe) avant le clônage (fork)" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -"échec de lecture de errno-buffer dans xargs_do_exec (probablement un bug, " -"svp signalez-le)" +"échec de lecture safe_read de errno-buffer dans xargs_do_exec (probablement " +"un bug, merci de le signaler)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -"la lecture a retourné la valeur inattendue %d ; probablement un bug, svp " -"signalez-le" +"la lecture a retourné la valeur inattendue %d ; probablement un bug, merci " +"de le signaler" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "erreur en attendant la fin du processus fils" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "ATTENTION : %d processus fils ne sont plus traçables" +msgid "WARNING: Lost track of %lu child processes" +msgstr "ATTENTION : On a perdu %lu processus fils de vue" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" -msgstr "%s : a terminé son exécution avec le statut 255 ; arrêt abrupt." +msgstr "%s : a terminé son exécution avec le statut 255 ; arrêt abrupt." -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" -msgstr "%s : stoppé par le signal %d" +msgstr "%s : stoppé par le signal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" -msgstr "%s a terminé son exécution par le signal %d" +msgstr "%s a terminé son exécution par le signal %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" -msgstr "%s : l'option -%c contient un nombre non valide\n" +msgstr "%s : l'option -%c contient un nombre non valide\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" -msgstr "%s : la valeur de l'option -%c devrait être >= %ld\n" +msgstr "%s : la valeur de l'option -%c devrait être >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" -msgstr "%s : la valeur de l'option -%c devrait être < %ld\n" - -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max_lignes] [-l[max_lignes]] [--max-lines[=max_lignes]]\n" -" [-I chaîne_rempl] [-i[chaîne_rempl.]] [--replace[=chaîne_rempl.]]\n" -" [-n max_args] [--max-args=max_args]\n" -" [-s max_chars] [--max-chars=max_caractères]\n" -" [-P max_procs] [--max-procs=max_procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fichier]\n" -" [--version] [--help] [command [arguments_initiaux]]\n" +msgstr "%s : la valeur de l'option -%c devrait être < %ld\n" -#~ msgid "cannot get current directory" -#~ msgstr "impossible de trouver le répertoire courant" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Usage: %s [OPTION]… COMMANDE [ARGS-INITIAUX]…\n" + +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Exécuter COMMANDE avec les arguments ARG-INITIAUX et plus d'arguments lus " +"depuis l'entrée.\n" +"\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Les arguments requis et optionnels des options longues le sont\n" +"aussi pour les options courtes correspondantes.\n" + +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null séparer les éléments par un NUL au lieu d'une " +"espace;\n" +" désactive le traitement des guillemets et " +"du backslash\n" +" ainsi que le traitement du EOF logique.\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=FICHIER lire les arguments dans le FICHIER au lieu de " +"l'entrée standard\n" + +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=CARACTÈRE séparer les éléments du flux d'entrée par " +"CARACTÈRE au lieu\n" +" d'une espace; désactive le traitement des " +"guillemets et du\n" +" backslash ainsi que le traitement du EOF " +"logique.\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E FIN Change la chaîne EOF logique. Si FIN est " +"rencontré sur\n" +" une ligne en entrée, le reste des entrées " +"est ignoré\n" +" (ignoré si -0 ou -D a été spécifié)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=FIN] équivalent à -E FIN si FIN est spécifié. " +"Sinon\n" +" il n'y a pas de chaîne de fin de fichier\n" + +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R identique à --replace=R\n" -#~ msgid "invalid argument %s for %s" -#~ msgstr "argument %s non valide pour %s" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] remplacer R dans les ARGS-INITIAUX par des " +"noms\n" +" lus sur l'entrée standard. Si R est " +"absent,\n" +" utilise {}\n" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "argument %s ambigu pour %s" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=LIGNES-MAX utiliser au plus LIGNES-MAX lignes non " +"blanches par\n" +" ligne de commande\n" -#~ msgid "Valid arguments are:" -#~ msgstr "Les paramètres valides sont :" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[LIGNES-MAX] similaire à -L excepté qu'une seule ligne non " +"blanche\n" +" est utilisée si LIGNES-MAX est absent\n" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=ARG-MAX utiliser au plus ARG-MAX par ligne de " +"commande\n" -#~ msgid "error closing file" -#~ msgstr "erreur de fermeture du fichier" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=PROC-MAX exécuter au plus PROC-MAX processus à la " +"fois\n" -#~ msgid "Unknown system error" -#~ msgstr "Erreur système inconnue" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" +" -p, --interactive demander avant d'exécuter les commandes\n" -#~ msgid "%s: option `%s' is ambiguous\n" -#~ msgstr "%s: l'option « %s » est ambiguë\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=VAR définir la variable d'environnement VAR des " +"processus enfants\n" -#~ msgid "%s: option `--%s' doesn't allow an argument\n" -#~ msgstr "%s: l'option « --%s » ne requiert pas de paramètre\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty ne pas exécuter la COMMANDE si il n'y a pas " +"d'argument.\n" +" Si cette option est absente, la COMMANDE " +"sera\n" +" exécutée au moins une fois\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=CAR-MAX limiter la longueur d'une ligne de commande à " +"CAR-MAX\n" -#~ msgid "%s: option `%c%s' doesn't allow an argument\n" -#~ msgstr "%s: l'option « %c%s » ne requiert pas de paramètre\n" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits afficher les limites sur la longueur d'une " +"ligne de commande\n" -#~ msgid "%s: option `%s' requires an argument\n" -#~ msgstr "%s: l'option « %s » requiert un paramètre\n" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" +" -t, --verbose afficher les commandes avant de les exécuter\n" -#~ msgid "%s: unrecognized option `--%s'\n" -#~ msgstr "%s: option non reconnue « --%s »\n" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit terminer si la taille est dépassée (voir -s)\n" -#~ msgid "%s: unrecognized option `%c%s'\n" -#~ msgstr "%s: option non reconnue « %c%s »\n" +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help afficher cet aide-mémoire et quitter\n" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: option illégale -- %c\n" +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" +" --version afficher les informations de version et " +"quitter\n" -#~ msgid "%s: invalid option -- %c\n" -#~ msgstr "%s: option non valide --%c\n" +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Le mode %s n'est pas valide lorsque POSIXLY_CORRECT est actif." -#~ msgid "%s: option requires an argument -- %c\n" -#~ msgstr "%s: l'option requiert un paramètre -- %c\n" +#~ msgid "" +#~ "\n" +#~ "Mandatory arguments to long options are mandatory for short options too.\n" +#~ "Non-mandatory arguments are indicated by [square brackets]\n" +#~ " -0, --null Items are separated by a null, not " +#~ "whitespace.\n" +#~ " Disables quote and backslash processing\n" +#~ " -a, --arg-file=FILE Read arguments from FILE, not standard " +#~ "input\n" +#~ " -d, --delimiter=CHARACTER Input items are separated by CHARACTER, " +#~ "not by\n" +#~ " blank space. Disables quote and backslash\n" +#~ " processing\n" +#~ " -E END If END occurs as a line of input, the rest " +#~ "of\n" +#~ " the input is ignored.\n" +#~ " -e [END], --eof[=END] Equivalent to -E END if END is specified.\n" +#~ " Otherwise, there is no end-of-file string\n" +#~ " --help Print a summary of the options to xargs.\n" +#~ " -I R same as --replace=R (R must be specified)\n" +#~ " -i,--replace=[R] Replace R in initial arguments with names\n" +#~ " read from standard input. If R is\n" +#~ " unspecified, assume {}\n" +#~ " -L,-l, --max-lines=MAX-LINES Use at most MAX-LINES nonblank input lines " +#~ "per\n" +#~ " command line\n" +#~ " -l Use at most one nonblank input line per\n" +#~ " command line\n" +#~ " -n, --max-args=MAX-ARGS Use at most MAX-ARGS arguments per " +#~ "command\n" +#~ " line\n" +#~ " -P, --max-procs=MAX-PROCS Run up to max-procs processes at a time\n" +#~ " -p, --interactive Prompt before running commands\n" +#~ " --process-slot-var=VAR Set environment variable VAR in child\n" +#~ " processes\n" +#~ " -r, --no-run-if-empty If there are no arguments, run no " +#~ "command.\n" +#~ " If this option is not given, COMMAND will " +#~ "be\n" +#~ " run at least once.\n" +#~ " -s, --max-chars=MAX-CHARS Limit commands to MAX-CHARS at most\n" +#~ " --show-limits Show limits on command-line length.\n" +#~ " -t, --verbose Print commands before executing them\n" +#~ " --version Print the version number\n" +#~ " -x, --exit Exit if the size (see -s) is exceeded\n" +#~ msgstr "" +#~ "\n" +#~ "Les arguments obligatoires pour les options longues sont également " +#~ "obligatoires pour les options courtes.\n" +#~ "Les arguments facultatifs sont indiqués entre [crochets]\n" +#~ " -0, --null Les éléments sont séparés par NUL au lieu " +#~ "d'un espace.\n" +#~ " Le traitement des apostrophes et de l'anti-" +#~ "slash sont désactivés\n" +#~ " -a, --arg-file=FICHIER Lis les arguments dans le FICHIER plutôt " +#~ "que sur l'entrée standard\n" +#~ " -d, --delimiter=CARACTÈRE Les éléments d'entrée sont séparés par " +#~ "CARACTÈRE plutôt que par\n" +#~ " un espace. Désactive le traitement des " +#~ "apostrophes et de l'anti-slash\n" +#~ " -E FIN Si FIN apparaît sur la ligne d'entrée, le " +#~ "reste de l'entrée est\n" +#~ " ignoré.\n" +#~ " -e [FIN], --eof[=FIN] Équivalent à -E FIN si FIN est spécifié. " +#~ "Sinon, il n'y a pas de\n" +#~ " chaîne de fin de fichier\n" +#~ " --help Affiche un résumé des options de xargs.\n" +#~ " -I R Identique à --replace=R (R doit être " +#~ "indiqué)\n" +#~ " -i,--replace=[R] Remplace R dans les arguments initiaux par " +#~ "des noms lus\n" +#~ " sur l'entrée standard. Si R n'est pas " +#~ "spécifié, {} est utilisé\n" +#~ " -L,-l, --max-lines=LIGNES-MAX Utilise au plus LIGNES-MAX lignes " +#~ "d'entrée non vides par\n" +#~ " ligne de commande\n" +#~ " -l Utilise au plus une ligne d'entrée non " +#~ "vide par ligne\n" +#~ " de commande\n" +#~ " -n, --max-args=ARG-MAX Utilise au plus ARG-MAX arguments par " +#~ "ligne de commande\n" +#~ " -P, --max-procs=PROC-MAX Exécute au plus PROC-MAX processus à la " +#~ "fois\n" +#~ " -p, --interactive Demande confirmation avant d'exécuter une " +#~ "commande\n" +#~ " --process-slot-var=VAR Définir la variable d'environnement VAR " +#~ "des processus\n" +#~ " enfants\n" +#~ " -r, --no-run-if-empty N'exécute pas la commande si il n'y a pas " +#~ "d'arguments.\n" +#~ " Si cette option n'est pas spécifiée, la " +#~ "COMMANDE sera exécutée\n" +#~ " au moins une fois.\n" +#~ " -s, --max-chars=CAR-MAX Limite les commandes à, au plus, CAR-MAX " +#~ "caractères\n" +#~ " --show-limits Afficher les limites sur la longueur de la " +#~ "ligne de commande\n" +#~ " -t, --verbose Afficher les commandes avant de les " +#~ "exécuter\n" +#~ " --version Afficher le numéro de version\n" +#~ " -x, --exit Terminer si la taille (voir -s) est " +#~ "dépassée\n" -#~ msgid "%s: option `-W %s' is ambiguous\n" -#~ msgstr "%s: l'option « -W %s » est ambiguë\n" +#~ msgid "cannot get current directory" +#~ msgstr "impossible de trouver le répertoire courant" -#~ msgid "%s: option `-W %s' doesn't allow an argument\n" -#~ msgstr "%s: l'option « -W %s » ne requiert pas de paramètre\n" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Construit avec GNU gnulib version %s\n" -#~ msgid "`" -#~ msgstr "\"" +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max_lignes] [-l[max_lignes]] [--max-lines[=max_lignes]]\n" +#~ " [-I chaîne_rempl] [-i[chaîne_rempl.]] [--replace[=chaîne_rempl.]]\n" +#~ " [-n max_args] [--max-args=max_args]\n" +#~ " [-s max_chars] [--max-chars=max_caractères]\n" +#~ " [-P max_procs] [--max-procs=max_procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fichier]\n" +#~ " [--version] [--help] [command [arguments_initiaux]]\n" -#~ msgid "'" -#~ msgstr "\"" +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: option illégale -- %c\n" #~ msgid "Success" -#~ msgstr "Succès" +#~ msgstr "Succès" #~ msgid "No match" #~ msgstr "Pas de concordance" #~ msgid "Invalid regular expression" -#~ msgstr "Expression régulière non valide" +#~ msgstr "Expression régulière non valide" #~ msgid "Invalid collation character" -#~ msgstr "Caractère de fusion non valide" +#~ msgstr "Caractère de fusion non valide" #~ msgid "Invalid character class name" -#~ msgstr "Nom de classe de caractères non valide" +#~ msgstr "Nom de classe de caractères non valide" #~ msgid "Trailing backslash" #~ msgstr "Barre oblique inverse en suffixe" #~ msgid "Invalid back reference" -#~ msgstr "Référence arrière non valide" +#~ msgstr "Référence arrière non valide" #~ msgid "Unmatched [ or [^" -#~ msgstr "[ ou [^ non appairée" +#~ msgstr "[ ou [^ non appairée" #~ msgid "Unmatched ( or \\(" -#~ msgstr "( ou \\( non appairée" +#~ msgstr "( ou \\( non appairée" #~ msgid "Unmatched \\{" -#~ msgstr "\\{ non appairée" +#~ msgstr "\\{ non appairée" #~ msgid "Invalid content of \\{\\}" #~ msgstr "Contenu de \\{\\} non valide" @@ -1416,59 +2079,41 @@ msgstr "" #~ msgstr "Fin de l'intervalle non valide" #~ msgid "Memory exhausted" -#~ msgstr "Mémoire épuisée" +#~ msgstr "Mémoire épuisée" #~ msgid "Invalid preceding regular expression" -#~ msgstr "expression précédant l'expression régulière non valide" +#~ msgstr "expression précédant l'expression régulière non valide" #~ msgid "Premature end of regular expression" -#~ msgstr "Fin prématurée de l'expression régulière" +#~ msgstr "Fin prématurée de l'expression régulière" #~ msgid "Regular expression too big" -#~ msgstr "Expression régulière trop grande" +#~ msgstr "Expression régulière trop grande" #~ msgid "Unmatched ) or \\)" -#~ msgstr ") ou \\) non appairée" +#~ msgstr ") ou \\) non appairée" #~ msgid "No previous regular expression" -#~ msgstr "Pas d'expression régulière précédente" - -#~ msgid "^[yY]" -#~ msgstr "^[oO]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "mémoire épuisée" - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "argument %s%s non valide \"%s\"" - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "suffixe non valide dans l'argument %s%s \"%s\"" - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "%s%s argument \"%s\" trop grand" +#~ msgstr "Pas d'expression régulière précédente" #~ msgid "block size" #~ msgstr "taille des blocs" #~ msgid "level higher in the filesystem hierarchy" -#~ msgstr "plus haut niveau dans la hiérarchie du système de fichiers" +#~ msgstr "plus haut niveau dans la hiérarchie du système de fichiers" #~ msgid "levels higher in the filesystem hierarchy" -#~ msgstr "plus haust niveaux dans la hiérarchie du système de fichiers" +#~ msgstr "plus haust niveaux dans la hiérarchie du système de fichiers" #~ msgid "" #~ "warning: the predicate -ipath is deprecated; please use -iwholename " #~ "instead." #~ msgstr "" -#~ "AVERTISSEMENT: le prédicat -ipath est obsolète; svp utilisez -iwholename " -#~ "à la place." +#~ "AVERTISSEMENT: le prédicat -ipath est obsolète; svp utilisez -iwholename " +#~ "à la place." #~ msgid "GNU find version %s\n" -#~ msgstr "« find » de GNU version %s\n" +#~ msgstr "« find » de GNU version %s\n" #~ msgid "oops -- invalid expression type in mark_stat!" #~ msgstr "oups -- type de l'expression est invalide dans mark_stat!" @@ -1491,14 +2136,14 @@ msgstr "" #~ "\t%s contain newline characters, " #~ msgstr "" #~ "\n" -#~ "\t%s contient des caractères de chariot (newline), " +#~ "\t%s contient des caractères de chariot (newline), " #~ msgid "" #~ "\n" #~ "\tand %s contain characters with the high bit set.\n" #~ msgstr "" #~ "\n" -#~ "\tet %s contient des caractères avec le bit du haut mis à un.\n" +#~ "\tet %s contient des caractères avec le bit du haut mis à un.\n" #~ msgid "old" #~ msgstr "ancien" @@ -1507,13 +2152,13 @@ msgstr "" #~ msgstr "GNU locate version %s\n" #~ msgid "argument to --limit" -#~ msgstr "argument à --limit" +#~ msgstr "argument à --limit" #~ msgid "GNU xargs version %s\n" #~ msgstr "GNU xargs version %s\n" #~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n" -#~ msgstr "Réduction de arg_max (%ld) à arg_size (%ld)\n" +#~ msgstr "Réduction de arg_max (%ld) à arg_size (%ld)\n" #~ msgid "" #~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" @@ -1528,19 +2173,19 @@ msgstr "" #~ " -quit\n" #~ msgid "Predicate List:\n" -#~ msgstr "Liste des prédicats:\n" +#~ msgstr "Liste des prédicats:\n" #~ msgid "Eval Tree:\n" -#~ msgstr "Arbre de l'évaluation:\n" +#~ msgstr "Arbre de l'évaluation:\n" #~ msgid "Optimized Eval Tree:\n" -#~ msgstr "Arbre optimisé de l'évalution:\n" +#~ msgstr "Arbre optimisé de l'évalution:\n" #~ msgid "Optimized command line:\n" -#~ msgstr "Ligne de commande optimisé:\n" +#~ msgstr "Ligne de commande optimisé:\n" #~ msgid "virtual memory exhausted" -#~ msgstr "Mémoire virtuelle épuisée." +#~ msgstr "Mémoire virtuelle épuisée." #~ msgid "inserting %s\n" #~ msgstr "Insertion de %s\n" @@ -1549,44 +2194,44 @@ msgstr "" #~ msgstr " type: %s %s " #~ msgid "left:\n" -#~ msgstr "laissé:\n" +#~ msgstr "laissé:\n" #~ msgid "right:\n" #~ msgstr "droit:\n" #~ msgid "[stat called here] " -#~ msgstr "[stat appelé ici]" +#~ msgstr "[stat appelé ici]" #~ msgid "[type needed here] " #~ msgstr "[type est attendu ici]" #~ msgid "Normalized Eval Tree:\n" -#~ msgstr "Évalution normalisée de l'arborescence:\n" +#~ msgstr "Évalution normalisée de l'arborescence:\n" #~ msgid "error in %s: %s" -#~ msgstr "Erreur rencontrée dans %s: %s" +#~ msgstr "Erreur rencontrée dans %s: %s" #~ msgid "" #~ "warning: locate database path `%s' contains a trailing colon, which is " #~ "not a valid database name" #~ msgstr "" -#~ "AVERTISSEMENT: le chemin de localisation de la base de données `%s' " -#~ "contient un ; de queue qui n'est valide dans un nom de base de données" +#~ "AVERTISSEMENT: le chemin de localisation de la base de données `%s' " +#~ "contient un ; de queue qui n'est valide dans un nom de base de données" #~ msgid "%s changed during execution of %s" -#~ msgstr "%s a été modifié durant l'exécution de %s" +#~ msgstr "%s a été modifié durant l'exécution de %s" #~ msgid "%s/.. changed during execution of %s" -#~ msgstr "%s/.. a été modifié durant l'exécution de %s" +#~ msgstr "%s/.. a été modifié durant l'exécution de %s" #~ msgid "unmatched %s quote" -#~ msgstr "Le paramètre %s n'est pas repérable par apostrophe." +#~ msgstr "Le paramètre %s n'est pas repérable par apostrophe." #~ msgid "cannot open current directory" -#~ msgstr "Ne peut ouvrir le répertoire courant." +#~ msgstr "Ne peut ouvrir le répertoire courant." #~ msgid "wait got pid %d, expected pid %d" #~ msgstr "obtenu le pid %d, s'attendait au pid %d" #~ msgid "%s stopped by signal %d" -#~ msgstr "%s stoppé par le signal %d" +#~ msgstr "%s stoppé par le signal %d" diff --git a/po/ga.gmo b/po/ga.gmo index 7d0f71ba5e3ed7fee7c4b011ad1af0f4ccf36f1c..060adee6899924bd1ec6a7812d7c0938e72d89b7 100644 GIT binary patch delta 3827 zcmY+`dvH|M9l-J5=GnZ=gFxQlLIP>RGZ+%{P{RA!L_+rs0kqSJ9Mfh8M1pkKFxIIOJ(nsfDibx@TgEMh@Dv97S%)u7a7wyCn979d+ z0`iDl#5DXAOYtV^bA?BamGK^q0zs3rjgTWhg?xvH&dNpG` z4&aNp1P#*MjP0n2zKVMPZPXW)kX0o*@%wlRpTals1>BS`vI75wT#{OrQ4?!J7AGhp zbXvIZ66)T>8dk9^MsAQ+^kV=Y#;aI`jqKY?cpRCWRI?w{t~A-UAUhyVBv)}Ei!1wV zN3nwU%gc1`7%22F@k#IBpP_tHgcA=w}r@VNeya3&8RQz$NTXx>Xv+jK1`Wy z6>AXn_h*okC*L5uA@Q6^tv@NIvjS^T_wXRUSdVkSEZ`t>n#o*XosuKSF3ayxYwg+s*8fj*vKMlO@!yz$ zS2?6p@j8CY2S+X9C^G&drLV;|QpOR)_tAw%7K`k{>$noVOj~Q<91h|IoPnz-{a*AS zyDL|MbVx=V_gFWS+HOQG%6`=IZ6bNdP1G&9g}MUKoIU-0F0%U4VtW8}rW3dt-?PV= zWY6|XHByff?4YB2aR@i#uzkaIWb!h#T7*@W)yVEhA7P0XkWU}(n z5-YKkTI-9a9w{d|fU9sE_v-ooyVa4vQmbme!ZB`WUuG>)1RJUe7GWZm<4s(S`hn$C z?hmjH$wkJo2fsunEt}YnYj^_ni)#;WXVK*q+@t6JFLWN|LKo|_2LFnUcsBz+Lk=Uk z$UC+ve8KArHzMUCV>pVJ@Ta(ao%K1X>#e2Ug7KnH$^2L1tO;@4P!x%KujM_s9d7|f<~o{m=Q z71Z(9s1Kx*_FZ@nM&fGJ7p=!aY(fKfq27NAbMSSXgC8RYL}DMX_Php*89#>eapD2i ze=eOXTu|d0EXz^9C|qdZlc+B|hiP~jsZaR=buVXb6!|f3L7nkuxCLX`$8_w#1-KJ+ z3tmJ$rf)T}{`vulO(JJ;1t#MS)C~WNvvK|=E1@RT588*H;Lq*x@n)W5?O#XAN#5ls z#o)9Dtrf__48{$Zgxj%{`v-z_^t=2l=}yPrp@CoGER1WhmV5!~(pKUgY{I>Kzz0aZ zN<*u48cyQlj3<$gmUV4b!Y`n1$z{ypIr*V=DuTJ~))K`z`Qw4>`KZ6&Pf+mTc7UI{ zD%yGpT@hUcEzYGxC813d-bt`4;n{;M)*rNEgeI^y~oqR%@-$H8fF=8vR zkkF#*C+;QE2o6BFrSmhJsIZ3eob9(T$?(_i6ZVB|_>kS-jU{^i`4?^}{2a9VZre`m zCJqyNLZS&RROdD}!%R&2^vV+j=N%;2Vda<1FX@^E#h5!6I zj=FE{gtiEa@L$dR7a(k>93eXF>pl1k5l`re(8ghqRKleLyFG#&0tr6Kk9h<~HT?a5 z0<~!oRS|mrwQ}!ll!!b_a5%!>Wcx6Spk~AW-PYkWLR%8CjL_N&5T!&JF+eQW#os_@ z9ife)m0`lG1KJP~Ni^%=jy6jFNurvlv9BM(Okx$W!oKzt*4zE5c$B!$9?!?`>6t2` zbDCI56cgIk5-mexi8;}G>75)ppO`UQkJ(J3i!cZtQl5boKYReSN+3+*M{-!Do(=wiaJqtF*NYKG;ezID0z0UH$%ky~DcKnAK}+ z^9R7pm{smbbanfCy}mAEo44C-u9|(+5%=8P>b=4m8a&=UKnYh{)WjZ%RN9M0|1_GfmP1Wc0_IZ5a zp5gL@%z)F|JLIlEJ2bb!m{#XBJR}%0y}rKCgwf&jc84aa%=Hbo9gDu3kaunG#_*)< zJB?0H=uC$v5SsA2JUTCzr{AX&t8F~tNOk#pJkCxdG^V$`=5uzMZ!{%D#NTn-FPoP} XCcFB*JszLi2u*a7pxeB)B{T7Vc2)(w delta 4896 zcmb`JdvH|c6~Mm@4|zo(h~Z`Y2n0#Uh9o6Qfbb9k2?>x!kjJvXW%nj~>F(WlcN5+$ zRcVo;V7HOcnO5j1GoX}?TL(*>wwl_poywqP#;P+|rCPOETL(L}KIrehr5;X4DXv41<-b41OOZ^3WCT;jGGE`ZzM!*CwV!`(Ho8H&SC!1v*MP}aSIcXHss z0`JB(a4Pmz_#iwAAA^;|eGz;WvLvM@XwSo0Fu;HV<&Dn45jjeI4kdYVdB`}df_K5k z;VhU>;yeMHA(v8LLV~Eq6nUHuB?60K4cr4Icbf9$bv zAS{5AD@Bk?t0j=P^@LKZX+8g~Zc_JD?=t`%uP5VNg*j42iNzLWw{cE`leaJjF+FKO92|ksj(8Owp&# zqHt;T7pUP7+&u@ULAmjN;9wuOF7+Il!ut%QKL}Z(!cda(5EMs#1dEyf6DSw^Q<)d3 ze?Y0G0n@!m=;_4&Iy&alAs*L3NxqG+o(;~xh1k9dFNC#F-u^B)7hZx=hJ}@0&eX!U zuoLhdxQfgi3TKn@RG?Y{-(cS$d>Xs@R^l&7^bzrW29}U1A$SSyfJ6AG*1?!>M4?^-w{R~nN>J2DQaTTtC*K?|jw?cxY9)P@}`ZeTLRq8{OF(_j> z{W(|(H^D3LbINbkJnzk$Z}%L$4-!4~A|x->7jQ8w;+^)uXqJD2Hue@W@ECjzN`!V2 zPI2%kVM1~Bp7Ukk_#ocSqK-v zNiYn><16Q!7vTw34RD=-t#au9_3vWNrs#| zy|*oc@}?nJ3{S!`cmbBee$=S2Jj);~!9D=xfTv*|d>xYT>O*)NoJvOC2RA{v;0J4n z|2mZ1wcZCJ0wr|2VF5e^NelG{C>!K4`6OHl#i38&6gWBHInV%QeFwY-jMG za16@DUI=<0uwfgB{|q`tZScNSbubru6Rco?4R69ey3zY${Ss>Ii?9e@g%aALP2LZV z=}?ld0q$Y_?;!cA>Nb1HeHeZh`x(fc)cjP)^Y{@cPw;y4Do2BnnlMkXKwka~p5azEd|Z3p>#IIGM54|!5)?Na}fP#O``p4N&+vb+C0 zx;rHSw{#nDJ|fvH&lW_a<#=#^s8pkqf9hU@G*SBy3;8}W1obyKT)X zyP$kLzKKw!>Hs3`+sJI>dL$p|+sIj!M%ob4ML9?*vKomZ(r)yiQj+b9kUYdj!Ww852EZx<{&lM&b@F9Qim)?q*Y07HhH@HQ|deD^Rjjs z9E9A096^>K#fY>9WKG(aJ6;}K{UALtH-E|2o9REWEwliY9e?!m?ZSlI5#(tKA;8HtP=4Nmy}P7bS*dCglyfu6$WM zY+`9Eq3w85cNkGCthYu?TQ{w^qkc`}+KmfWG&k2STq!f+c3Gxm?D>8pL+y@Z+DRR@ z95a-RJKNJ+3U;qH_1F4!ixZFO?eTU;Pi|VUvQAG;MvNqTm1@U~#XC%0SXQXxj*gl} zSbRlII))V$Jrs||?L=|rlL$YS|JiP}9@ZyQopejBS1#GE)gz7Y%gV ziJ*ISj~S@xQGt>>z3Q6pq_pKJyCcDQ?FI|4Od8R>Px7AI1E!)bMW@XJABxF@>3 zy>k<;!=Z@b^v-oHce2;tJG;r9-R8tY%$7LF)~@MJ&koR^h@|3Mi36cc^tqj%l-e9m zc+X&Nvy$$8?6}`)xBXU&-;A{-x4V6~>2I;3W{v#0W(P@1cT&WRwxNXLv6x|pb-=Q% zq-8|qvh4$7@BSFWnP@L&zFf5ozKbCPn|d+1hjrBhhE{f+it1QbCM+efnKbM=rR{dZ zaQ8f*JT~SD*U0X24CO6y+80H|lmH;U{2Jrfd=o^s(Ki?J15x zP2Zv3RIJxzfe|*kPRV>L&||sFdrG9Y+gr-{0l)1Y?^Xgof2t3XpCsz@Mp9$fR!H0lcb(M%?luDF>}1y| re=?phtky^{eP3fm=HZ7t-^dD diff --git a/po/ga.po b/po/ga.po index e001eba..e52c959 100644 --- a/po/ga.po +++ b/po/ga.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.4.0\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2008-03-20 05:47-0500\n" "Last-Translator: Kevin Scannell \n" "Language-Team: Irish \n" @@ -19,32 +19,69 @@ msgstr "" "Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : (n>2 && n<7) ? 2 :" "(n>6 && n<11) ? 3 : 4;\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "níorbh fhéidir dul ar ais go dtí an bunchomhadlann oibre" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Ní féidir an gnáth-ionchur a dhúnadh" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Theip ar an chomhadlann oibre a athrú" + +# "fork" not in standard refs/corpus. Maybe want a "gabhl*" word instead? -KPS +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "ní féidir forc a dhéanamh" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "earráid ag feitheamh le %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s: stopadh leis an chomhartha %d" + +#: find/find.c:203 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to initialize shared-file hash table" msgstr "" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "theip ar sheiceáil slánchéille don fheidhm leabharlainne fnmatch()." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "níl an chomhadlann reatha ar fáil" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "Rabhadh: bhí córas comhaid %s dífheistithe le gairid." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "Rabhadh: bhí córas comhaid %s feistithe le gairid." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -53,7 +90,7 @@ msgstr "" "Athraíodh %s%s le linn rith %s (seanuimhir ghléis %ld, uimhir nua gléis %ld, " "cineál córas comhad %s) [tag %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -62,17 +99,17 @@ msgstr "" "Athraíodh %s%s le linn rith %s (seanuimhir inode %, uimhir nua " "inode %, cineál córas comhad %s) [tag %ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "níorbh fhéidir dul ar ais go dtí an bunchomhadlann oibre" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Theip ar an gcomhadlann oibre a athrú go %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -81,7 +118,7 @@ msgstr "" "Tá an nasc siombalach %s cuid de lúb sa chóras chomhadlainne; thugamar " "cuairt cheana ar an gcomhadlann lena bhfuil sé nasctha." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -105,12 +142,12 @@ msgstr[4] "" "Braitheadh lúb sa chóras comhaid; tá an uimhir ghléis agus inode céanna ag " "%s agus comhadlann eile atá %d leibhéal níos airde sa chóras comhaid" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "rabhadh: ní leanfar nasc siombalach %s" -#: find/find.c:1386 +#: find/find.c:1480 #, fuzzy, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -125,12 +162,12 @@ msgstr "" "huathoibríoch. Is féidir gur fágadh roinnt comhadlanna ar lár sna torthaí " "roimhe seo." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "anaithnid" @@ -142,7 +179,7 @@ msgstr "" "Braitheadh lúb sa chóras comhaid; is cuid den lúb chéanna sa chóras comhaid " "iad %s agus %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, fuzzy, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "Rabhadh: dealraíonn sé go bhfuil mód 0000 ag comhad %s" @@ -152,12 +189,17 @@ msgstr "Rabhadh: dealraíonn sé go bhfuil mód 0000 ag comhad %s" msgid "cannot search %s" msgstr "ní féidir %s a chuardach" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "níorbh fhéidir dul ar ais go dtí an bunchomhadlann oibre" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, fuzzy, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -168,7 +210,7 @@ msgstr "" "dada nuair atá -depth i bhfeidhm. Más mian leat dul ar aghaidh mar sin féin, " "cuir an rogha -depth san áireamh." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -181,7 +223,7 @@ msgstr "" "bhfeidhm ar thrialacha ar gach taobh de). Tabhair na roghanna roimh na " "hargóintí eile.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -190,7 +232,7 @@ msgstr "" "rabhadh: tá an rogha -d as feidhm; bain úsáid as -depth ina ionad, ós rud é " "go bhfuil -depth oiriúnach leis an chaighdeán POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -199,17 +241,17 @@ msgstr "" "Níl grúpa ann darb ainm %s, agus ní cosúil le haitheantas uimhriúil grúpa é " "toisc go bhfuil an iarmhír ait %s air" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "Níl grúpa ann darb ainm %s" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "argóint fholamh i ndiaidh -group, ba chóir ainm grúpa a thabhairt" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -221,7 +263,7 @@ msgstr "" "is éard is féidir a bheith sa slonn:\n" "oibreoirí, roghanna, trialacha, agus gníomhartha:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -234,7 +276,7 @@ msgstr "" "SLONN2\n" " SLONN1 -o SLONN2 SLONN1 -or SLONN2 SLONN1 , SLONN2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -248,7 +290,7 @@ msgstr "" " -depth --help -maxdepth LEIBHÉIL -mindepth LEIBHÉIL -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -263,10 +305,10 @@ msgstr "" "PATRÚN\n" " -links N -lname PATRÚN -mmin N -mtime N -name PATRÚN -newer COMHAD" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -276,11 +318,11 @@ msgstr "" " -wholename PATRÚN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user AINM -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -295,7 +337,7 @@ msgstr "" " -exec ORDÚ ; -exec ORDÚ {} + -ok ORDÚ ;\n" " -execdir ORDÚ ; -execdir ORDÚ {} + -okdir ORDÚ ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -307,12 +349,12 @@ msgstr "" "bhfuil\n" " rochtain ar an nGréasán agat, seol r-phost chuig ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "theip ar sheiceáil slánchéille don fheidhm leabharlainne fnmatch()." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -327,49 +369,44 @@ msgstr "" "wholename' níos áisiúla, nó b'fhéidir '-samefile'. Nó, má tá GNU grep agat, " "is féidir 'find ... -print0 | grep -FzZ %s' a úsáid mar mhalairt." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" "Bhíothas ag súil le slánuimhir dheimhneach dheachúlach i ndiaidh %s, ach " "fuarthas %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "Ní thugann an córas seo slí ar bith chun breith-am comhaid a aimsiú." -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: tá argóint de dhíth i ndiaidh na rogha `%s'\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Ní féidir ciall a bhaint as %s mar dháta nó mar am" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Níl aon fháil ar bhreith-am comhaid %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Níl mód %s bailí nuair atá POSIXLY_CORRECT ann." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "mód neamhbhailí %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -381,22 +418,22 @@ msgstr "" "perm -000'; .i., níor chomhoiriúnaigh sé do chomhad ar bith roimhe seo, ach " "comhoiriúnaíonn sé gach uile chomhad anois." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "argóint nialasach neamhbhailí i ndiaidh -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "argóint neamhbhailí `%c' i ndiaidh -size" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "Argóint neamhbhailí `%s%c' tar éis -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -404,74 +441,82 @@ msgstr "" "Glacann rogha -show-control-chars le hargóint aonair, ceann de 'literal' nó " "'safe'" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Argóint neamhbhailí %s tar éis -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, fuzzy, c-format msgid "%s is not the name of a known user" msgstr "Níl grúpa ann darb ainm %s" -#: find/parser.c:2678 +#: find/parser.c:2614 #, fuzzy, c-format msgid "The argument to -user should not be empty" msgstr "Ní cheadaítear argóint fholamh i ndiaidh rogha --max-database-age" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Gnéithe arna gcumasú: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Ní cheadaítear ach litir amháin in argóint i ndiaidh -type" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Argóint anaithnid i ndiaidh -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "rabhadh: seicheamh éalúcháin anaithnid `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "earráid: %s ag deireadh an teaghráin fhormáidithe" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "rabhadh: treoir fhormáide anaithnid `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "earráid: tá treoir fhormáidithe `%%%c' in áirithe don am le teacht" +msgid "Unknown argument to -type: %c" +msgstr "Argóint anaithnid i ndiaidh -type: %c" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Tá an chomhadlann reatha san áireamh san athróg thimpeallachta PATH, agus is " "neamhdhaingean é seo in éineacht leis an ghníomh %s. Bain an chomhadlann " "reatha as $PATH (.i., bain \".\", nó idirstad ar dtús/i ndeireadh, amach)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -482,7 +527,7 @@ msgstr "" "is neamhdhaingean é seo in éineacht leis an ghníomh %s. Bain an chonair sin " "as $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -491,96 +536,101 @@ msgstr "" "Ní cheadaítear {} mar chuid d'ainm uirlise le -execdir nó -okdir, de bharr " "gur neamhdhaingean é seo." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Ní thacaítear ach aon phéire amháin {} le -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Tá an timpeallacht rómhór le haghaidh exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, fuzzy, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "róshreabhadh uimhríochta agus deireadh an lae á áireamh" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "róshreabhadh uimhríochta agus deireadh an lae á áireamh" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "gnáth-aschur earráide" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "gnáth-aschur" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "ní féidir %s a scriosadh" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "níorbh fhéidir dul ar ais go dtí an bunchomhadlann oibre" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "Rabhadh: ní féidir breith-am an chomhaid %s a aimsiú" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Níorbh fhéidir scríobh ar ghnáth-aschur" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Ní féidir an gnáth-ionchur a dhúnadh" +msgid "getfilecon failed: %s" +msgstr "" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Theip ar an chomhadlann oibre a athrú" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -# "fork" not in standard refs/corpus. Maybe want a "gabhl*" word instead? -KPS -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "ní féidir forc a dhéanamh" +msgid "warning: unrecognized escape `\\%c'" +msgstr "rabhadh: seicheamh éalúcháin anaithnid `\\%c'" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "earráid ag feitheamh le %s" +msgid "error: %s at end of format string" +msgstr "earráid: %s ag deireadh an teaghráin fhormáidithe" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s: stopadh leis an chomhartha %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "earráid: tá treoir fhormáidithe `%%%c' in áirithe don am le teacht" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "rabhadh: treoir fhormáide anaithnid `%%%c'" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "slonn neamhbhailí" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -589,22 +639,22 @@ msgstr "" "slonn neamhbhailí; tá oibreoir dénártha '%s' in úsáid agat agus níl aon rud " "roimhe." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "bhíothas ag súil le slonn idir '%s' agus ')'" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "bhíothas ag súil le slonn tar éis '%s'" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "slonn neamhbhailí; an iomarca ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -613,126 +663,126 @@ msgstr "" "slonn neamhbhailí; bhíothas ag súil le ')' ach ní fhaca mé é. B'fhéidir go " "bhfuil preideacáid bhreise de dhíth ort tar éis '%s'" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "slonn neamhbhailí; ní cheadaítear lúibíní folmha." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "slonn neamhbhailí; bhíothas ag súil le ')' áit éigin." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "úps! -- is neamhbhailí an cineál sloinn seo!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "úps! -- cineál neamhbhailí sloinn (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "caithfidh conairí a theacht roimh an slonn: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "preideacáid anaithnid `%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "preideacáid neamhbhailí `%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "argóint neamhbhailí `%s' chun `%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "tá argóint de dhíth i ndiaidh na rogha `%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "an iomarca ')' agat" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "preideacáid bhreise gan choinne '%s'" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "preideacáid bhreise gan choinne" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "úps! -- ionsá neamhbhailí de `and'!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Úsáid: %s [-H] [-L] [-P] [-Oleibhéal] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [conair...] [slonn]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "ní féidir an chomhadlann reatha a thaifeadadh" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "ní féidir an chomhadlann reatha a thaifeadadh" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Ag déanamh neamhshuim ar bhratach anaithnid dífhabhtaithe %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Argóint fholamh tar éis rogha -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "Ní mór slánuimhir dheachúlach a bheith go díreach tar éis rogha -O" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Sonraigh slánuimhir dheachúlach go díreach tar éis -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Leibhéal neamhbhailí optamaithe %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -741,7 +791,7 @@ msgstr "" "Leibhéal optamaithe %lu ró-ard. Más mian leat comhaid a aimsiú go tapa, déan " "breithniú ar \"GNU locate\"." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -750,65 +800,384 @@ msgstr "" "Níl an athróg thimpeallachta FIND_BLOCK_SIZE le fáil, níl aon rud ag dul i " "bhfeidhm ar an méid bloic ach an athróg thimpeallachta POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argóint neamhbhailí %s chun %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argóint dhébhríoch %s chun %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Na hargóintí bailí:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "earráid agus comhad á dhúnadh" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "earráid sa scríobh" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Earráid anaithnid an chórais" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: Tá an rogha `%s' débhríoch\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `--%s'\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `%c%s'\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: tá argóint de dhíth i ndiaidh na rogha `%s'\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: rogha anaithnid `--%s'\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: rogha anaithnid `%c%s'\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: rogha neamhbhailí -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: tá argóint de dhíth i ndiaidh na rogha -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: Tá an rogha `-W %s' débhríoch\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `-W %s'\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: tá argóint de dhíth i ndiaidh na rogha `%s'\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "ní féidir an chomhadlann reatha a thaifeadadh" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "ní féidir an chomhadlann reatha a thaifeadadh" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +# allow yes, but also 'i' as in 'is sea' or 's' for 'sea' -- KPS +# neither of these letters is near the 'N' on standard keyboard... +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yYiIsS]" + +# fortunately, 'n' for 'no' or 'ní hea' - KPS +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "cuimhne ídithe" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "argóint %s%s neamhbhailí `%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "iarmhír neamhbhailí tar éis argóint %s%s `%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "argóint %s%s `%s' rómhór" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "ordú rófhada" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "ní féidir argóint amháin a oiriúnú d'uasmhéid liosta na n-argóintí" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "tá liosta na n-argóintí rófhada" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Níorbh fhéidir scríobh ar ghnáth-aschur" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Tógtha le GNU gnulib, leagan %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "" +"Cineál anaithnid sloinn ionadaíochta %s; is iad seo na cineálacha bailí: %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, fuzzy, c-format msgid "Unexpected suffix %s on %s" msgstr "comhadchríoch gan choinne i %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "bhíothas ag súil le slonn tar éis '%s'" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" -"Cineál anaithnid sloinn ionadaíochta %s; is iad seo na cineálacha bailí: %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -817,8 +1186,8 @@ msgstr "" "Úsáid: %s [--version | --help]\n" "nó %s bigramanna_níos_coitianta < liosta > locate-bunachar-sonraí\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -826,67 +1195,62 @@ msgstr "" "\n" "Seol tuairiscí fabhtanna chuig .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "earráid sa scríobh" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Úsáid: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" "Caithfidh tú an leibhéal slándála a shonrú mar shlánuimhir dheachúlach." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Leibhéal slándála %s lasmuigh den raon intiontaithe." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "Iarmhír %s gan choinne ag leibhéal slándála %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "ní thacaítear le leibhéal slándála slocate %ld." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Níorbh fhéidir scríobh ar ghnáth-aschur" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "lá" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "Ní cheadaítear argóint fholamh i ndiaidh rogha --max-database-age" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Argóint neamhbhailí %s tar éis --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "tá ainm comhaid i mbunachar sonraí %s atá rófhada le láimhseáil" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "bunachar sonraí locate %s truaillithe nó neamhbhailí" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" @@ -896,17 +1260,17 @@ msgstr[2] "Méid an bhunachair sonraí `Locate': %s bheart\n" msgstr[3] "Méid an bhunachair sonraí `Locate': %s mbeart\n" msgstr[4] "Méid an bhunachair sonraí `Locate': %s beart\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Ainmneacha Comhaid Comhoiriúnacha: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Gach Ainm Comhaid: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -923,7 +1287,7 @@ msgstr "" "\ttá línte nua i %s acu, \n" "\tagus carachtair leis an ngiotán is airde socraithe i %s acu.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -932,17 +1296,17 @@ msgstr "" "Seans go ndearnadh scagadh ar roinnt ainmneacha comhaid, agus dá bhrí sin ní " "féidir an cóimheas comhbhrúite a aimsiú.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Cóimheas comhbhrúite %4.2f%% (tá cóimheas níos airde níos fearr)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Cóimheas comhbhrúite gan socrú\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -952,7 +1316,7 @@ msgstr "" "slándála %c air, agus ní thacaíonn GNU findutils leis an leibhéal sin faoi " "láthair" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -961,7 +1325,7 @@ msgstr "" "Is bunachar sonraí \"slocate\" é %s. Is formáid nua é seo, agus is dócha go " "mbeidh fadhbanna leis de thuras na huaire." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -969,7 +1333,7 @@ msgstr "" "Bunachar sonraí \"slocate\" é %s le leibhéal slándála %d nach dtacaítear " "leis; á ligean thart." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -980,37 +1344,37 @@ msgstr "" "a bhfuil leibhéal deimhneach slándála aige. Ní ghinfear aon torthaí le " "haghaidh an bhunachair sonraí seo.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "Is bunachar sonraí \"slocate\" é %s. Cuirfear rogha '-e' i ngníomh." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "Neamhbhailí é bunachar sonraí locate %s den seandéanamh; tá sé roghearr" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Bunachar sonraí %s san fhormáid %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Baineann an bunachar sonraí úsáid as ionchódú caolcheannach.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "Baineann an bunachar sonraí úsáid as ionchódú mórcheannach.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" "Nílim cinnte an bhfuil an bunachar sonraí mórcheannach nó caolcheannach.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, fuzzy, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1030,60 +1394,60 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " patrún...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "theip ar phribhléidí grúpa a ligean síos" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "theip ar phribhléidí setuid a ligean síos" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Theip ar phribhléidí a ligean síos go hiomlán" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "theip ar phribhléidí setgid a ligean síos" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "rabhadh: ní féidir an bunachar sonraí `locale' a léamh ó stdin ach aon uair " "amháin." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "theip ar ghlao córais 'time'" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "rabhadh: tá bunachar sonraí %s thar %d %s d'aois (fíoraois: %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, fuzzy, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "Rabhadh: tógadh bunachar sonraí locate %s le hord difriúil beart" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "comhadchríoch gan choinne i %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "earráid agus focal á léamh ó %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1092,7 +1456,7 @@ msgstr "" "Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha; ní " "cheadaítear carachtair le luach níos mó ná %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1101,7 +1465,7 @@ msgstr "" "Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha; ní " "cheadaítear carachtair le luach níos mó ná %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1110,7 +1474,7 @@ msgstr "" "Seicheamh neamhcheadaithe éalúcháin %s i dteormharcóir ionchurtha; " "carachtair anaithnid %s ag an gcríoch." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1120,42 +1484,57 @@ msgstr "" "teormharcóir a bheith ina charachtar aonair nó seicheamh éalúcháin le \\ ar " "tosach." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "Tá an timpeallacht rómhór á rith" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, fuzzy, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "Rabhadh: luach %ld tar éis rogha -s rómhór, úsáidfear %ld ina ionad" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Ní féidir inchomhad %s a oscailt" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "Líonann do chuid athróga timpeallachta %lu beart\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "Uasluach d'fhad na n-argóintí de réir POSIX (an córas seo): %lu\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1163,17 +1542,17 @@ msgid "" msgstr "" "Uasluach níos lú d'fhad na n-argóintí a cheadaíonn POSIX (gach córas): %lu\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Uasfhad d'ordú gur féidir linn a úsáid: %ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Méid an mhaoláin ordaithe atá in úsáid i ndáiríre: %lu\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1186,7 +1565,7 @@ msgstr "" "léamh agus orduithe a rith; mura bhfuil sé seo an rud atá uait, iontráil " "carachtar comhadchríche.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1195,7 +1574,7 @@ msgstr "" "Rabhadh: rithfear %s uair amháin ar a laghad. Mura mian leat é seo, déan " "idirbhriseadh anois.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1204,15 +1583,15 @@ msgstr "" "comhartha athfhriotail %s corr; caitheann xargs le comharthaí athfhriotail " "go speisialta mura bhfuil an rogha -0 tugtha agat" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dúbailte" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "singil" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, fuzzy, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1222,162 +1601,260 @@ msgstr "" "aghaidh trí liosta na n-argóintí. An raibh sé ar intinn agat an rogha --" "null a úsáid?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "tá líne na n-argóintí rófhada" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Níorbh fhéidir scríobh ar ghnáth-aschur" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Níorbh fhéidir scríobh ar ghnáth-aschur" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "earráid ag feitheamh le próiseas sleachta" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, fuzzy, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "Rabhadh: Cailleadh %d próiseas sleachta" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: stádas scortha 255; á thobscor" # does "stopped" have the implication of "temporarily"? # might then want to distinguish from following msgid... --KPS -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: stopadh leis an chomhartha %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: stopadh leis an chomhartha %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: uimhir neamhbhailí i ndiaidh na rogha -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: caithfidh an luach i ndiaidh na rogha -%c a bheith >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: caithfidh an luach i ndiaidh na rogha -%c a bheith < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Úsáid: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=tm]\n" -" [-E teaghrán-eof] [-e[teaghrán-eof]] [--eof[=teaghrán-eof]]\n" -" [-L uas-línte] [-l[uas-línte]] [--max-lines[=uas-línte]]\n" -" [-I ionadaí] [-i[ionadaí]] [--replace[=ionadaí]]\n" -" [-n uas-args] [--max-args=uas-args]\n" -" [-s uas-char] [--max-chars=uas-char]\n" -" [-P uas-próis] [--max-procs=uas-próis] [[--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=comhad]\n" -" [--version] [--help] [ordú [argóintí-tosaigh]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "níl an chomhadlann reatha ar fáil" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "argóint neamhbhailí %s chun %s" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "argóint dhébhríoch %s chun %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Na hargóintí bailí:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "error closing file" -#~ msgstr "earráid agus comhad á dhúnadh" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Earráid anaithnid an chórais" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: Tá an rogha `%s' débhríoch\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `--%s'\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `%c%s'\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: tá argóint de dhíth i ndiaidh na rogha `%s'\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: rogha anaithnid `--%s'\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: rogha anaithnid `%c%s'\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: rogha neamhbhailí -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: tá argóint de dhíth i ndiaidh na rogha -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: Tá an rogha `-W %s' débhríoch\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `-W %s'\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" -#~ msgid "`" -#~ msgstr "`" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" -#~ msgid "'" -#~ msgstr "'" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Níl mód %s bailí nuair atá POSIXLY_CORRECT ann." + +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Tógtha le GNU gnulib, leagan %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Úsáid: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=tm]\n" +#~ " [-E teaghrán-eof] [-e[teaghrán-eof]] [--eof[=teaghrán-eof]]\n" +#~ " [-L uas-línte] [-l[uas-línte]] [--max-lines[=uas-línte]]\n" +#~ " [-I ionadaí] [-i[ionadaí]] [--replace[=ionadaí]]\n" +#~ " [-n uas-args] [--max-args=uas-args]\n" +#~ " [-s uas-char] [--max-chars=uas-char]\n" +#~ " [-P uas-próis] [--max-procs=uas-próis] [[--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=comhad]\n" +#~ " [--version] [--help] [ordú [argóintí-tosaigh]]\n" + +#~ msgid "cannot get current directory" +#~ msgstr "níl an chomhadlann reatha ar fáil" #~ msgid "Success" #~ msgstr "D'éirigh leis" @@ -1434,27 +1911,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Níl aon slonn ionadaíochta roimhe seo" -# allow yes, but also 'i' as in 'is sea' or 's' for 'sea' -- KPS -# neither of these letters is near the 'N' on standard keyboard... -#~ msgid "^[yY]" -#~ msgstr "^[yYiIsS]" - -# fortunately, 'n' for 'no' or 'ní hea' - KPS -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "cuimhne ídithe" - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "argóint %s%s neamhbhailí `%s'" - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "iarmhír neamhbhailí tar éis argóint %s%s `%s'" - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "argóint %s%s `%s' rómhór" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: rogha neamhcheadaithe -- %c\n" diff --git a/po/gl.gmo b/po/gl.gmo index 19bcd91842cb0d21e5fb785515ba77a44b96df6a..33bcb10bb533e6be13e02b4f0083ff11cfed1287 100644 GIT binary patch literal 27751 zcmeI4eUKz)ec#)*Wb8!3lb80dRyJ?NsI1w&v&agBq8<8^zOE9 zrh7C!v$uB$48&jz36dei7zmaK*imHRqHrpdWK+p4B!seYV&ga|V^_sx2Pdf{!cNMG zNyYhmf6vq1GqbZN$q@UWOkLl1ru%t+e(%q(_YYov&c}Wr2!hXZ?csXt+#vXG-~}%Z z0^R@h^Ml|V@SETtaq08fmj=Nvfu94X!DAN$!T$mu20s99yetSV0sj)b6};r-L9hfq z0A2(BGWdG%+u$y6;zH_z`@l=}9PEK#2QLS2yvUVrg0JNFPk}!MJ_f4)Uj^R?{s&NF ze%UJ+KX@TX7s2J=Uho=F^%C$6;QPQ=flq+yXUpTCfHi)<*n!FPh! zfu9DoB)W>6Ym z25Q_N1z!z*6;!`}2-d;Z(TVWAU<3SP@ZI1dlY9;Mbx`B`6YxCn&q0mz92%p`-~jk$ z@E-6Q@FUg)|GtpT)Bat}e<~M& zA^0ATp8;8-U<=f~d>gzReCw^_ z8{kX#xb^x2@JF=~Fpb7D!KP~6=0TPsxD`Af%)ys}?**qR{}E90`&9;|_53C%di#%{ z*6SRI;zi))pvF4`-U%K6Zv;OHF4E5Lfd}|KN#`tKkbt6_kAXLUFM=2#+29Z;I!(Zv zz@G*GJ@{|I7lTh<>(>3BgP*3|Z-L^AcR+kBaqyD;LGTyg9QZhRHB6>;`d#o&@L4be zZ-ofd@0UPGIrwwX_LZ9&*8x!U`;Wm-fxiiAd@UxW@jn8p-Df~VNAOLMr3#(}wSRB8 z$yymN;ff9K#Exc_-j&wmTd!Aov&dg();)>q2yBR~ffUH;Ib8{af|9>1>z-v%y# zYVR@d$HA|F8rQ{d4T3Is8>n%A8T>8qFF;5p_>J4#I-SF0@8kCzsBwH848ik`Kucf^ zya()o8t=aXYv3zbG@1$yfZPf`3{o}t7O3@_US^NM+rf{6e+=?3co$6jYVaH2>%spF zYCq3s@LKO%zzD2^YUeAU=Km}xdcF9Vr>o=8EcbsC)VOY2arFBrILGf_10l)ae}YsA z-h4Z@1NhTm3I=yL{>s3o`T5JB==DK}oNj`j1U0_*gIeDwKu9?F4N&tq?=H9R_ktJm zdlOXsN5D6MPkG6)F--v+hr zd)V|n;M>7#z(+u}|1Ughv);n*w}5O#kb}FyGvF)0KLuX{{>Z&YfVAAx@lybR`0zh469 zz<&d3TrYdT$9mOm$DHjK=u268vSAL8=&g_4tPFzZo|oki@<9rKMC&R z{(Vh1uSda<-@gd%0>1`MfX{*&&v(HS;HzRckN1Ih(at{um$`rGnp^h=!Jp*!$H4{g zHS2Di4N&{?2q-%HHSjy&1qpKlfAB#^2N!`fYoCMs|0@6eQBeD&&*Kh)_k!nfX?*(p z6qjfz=lWT$f5fFZurVxU?UqxkQ&A;nF@8pU?3n;_4MQ zz%JJtxz6RvxL(Y~@|gUFjO`;Dc#I433I0CUIb3h%TIIT#OCQne2e@9Y9|Irln?8pe zl>bli?bTeOM}4$k`pk2El1qG3d~V^(JNyqw%5>YOLAKZSRgd1qwNGF8{2-V3G33(c zLtIyJJ<0WPF4))f;(g#}xK41rm8iuiqAX!7s*_*$Q$jomHBLxcB%iG|I$(eEW$8fL5EX4GBF z!;?v?6*jW8m!$nTOtX_SVU#w*r01UWx~IZk7Ix!E_wq1FJN=%O==M|UwcC`=_lL=9 z*jrC{p3??(*P~u|D(i(#>BQ+w*lER49*4bC9sXO7!#Hi$venvZ(u%_q z@u|Gm%}&I#6T!r>xRZ5zVZF~Nsec_`D3vyuKr6p#E$z={-L)H3GHPf}`CM3Q#;v#) zhqX>ONqc)du7-z}j~$s`32Uo%pWlmz7s{J_k;yuv#{j2Sz1}RYh@ysG>VAQFmGjzh@ELh zy{NAJhXDI&-tTCSA&?xx>?XZaVJqH`NJ=E+(bY2A6m!^V1)uJNSFrZ8d= zaw#`>Je9S07H=dC7NOs+$K7zU)tu3ykGpNWox|F3+wnd7Gnr3^_jKb`RlJW*=d?Z= z%*g~&&U;a>pNIRdzIuNc)gci^VTF=(BWfkhqE~HsZL;C_NAxyF-3&>yZB}zod`M9A2kky5^swtl)<5#xR&i(jG$0iEJ3>WIhqh zch}g$6v2vwtC>vnor;yB1VNp)PVrw1WAxav;6Rj$wi>OBZDyI$X4FMAODq@9vbxo* zCtX&umpB@=Jz(d3eK;E#V8VRliHZ7_lK^2m>zn*`d!5e~)vZwRaBzE7F*uO5OF4u5 zNV0J9s@Z+3lat}pda||-wLk!Mo6q#bn9@A$r^u`%jal@Ag~(tXdBU2A_xQnXwWA&i zV4>YXa-hy^Ewz*?Q9D?&?LxYdbhA_|%}#fd2yvhmXikfn$MACoKRMcJ#*L&6GdRi) z7Q|sU&xQx%#tAlHq2Q({>|}Y;OE!>dz6MGsUSoQLLzzTa*3p@3bj12s)wTXsT%-^j zil7Wrl#cf*@jdWpwcmmon%%5}OiMPXu@(odoGm?fWzR9N790h?nDj6KedV(_RHr7x5H4GyUpU*fJ z!-nJL)ntt|57~lnJv*sw5ovT`BGHVWwA80G91I;SuBDkt=6;Hj&(_i;hj^MXHd46S ziq^E*i(XWg#7IjLa88qlwOTvctQGpW7Om0hm>P_whDK?Y597QMVY=n~i+n4@@;)dZc7u`&C-RNgOg?qX`ts>$9wZ1=HG#JKThBWB){t?d7O7n|Q> z7ribVE@fIyM?7KEsJ5``!^!3y7LsJ^m=q6|3&okFQj<_B z5(+z-3YFPu#)jGHG$mbqWw1PE-mQMokJuWMb8)rwZq%vV5)*oPxDn$q;S@AZv`)=9 zW4g(H^tBz~ElaoiIm`w}ogd^F1?^QT5pPf>?RMNuV0r|4v?}VaEeGBwnvy_-pc*G+ z+pfu`m$`~@M=#UPW!gw0BazZ&((PK;oGMC9bl~_9FKxZo>&)%mokttUqG)~AJ65}) zml?Tr^5WJblw6vHC*wLse}nGOX&8<8ZfYuSL)u!0oqV+5_=tIrd_ zs|CyA_^Eb1YoY()+!H41a(peP?IN}k)#mMyN+*?iX1_YJVMHw%OsB$)1cQNr80!}9 znHJ9LF z!!jppGBdkbt0pnQDw~rR_M#K9^sE;lr2=uIEV|p(lBADXct_oEmrRdc)^J(;tjeYm z;u2ai;D#%+C^h+0g%K`sKUA{NTt-RtWUVG*WRcpDq)1#lnPC^Bp)!#uTd5Tts>ASm zt@s618{0P17l(UWGOKSSSwHt3#sh|@msBm*$9Wp^s-~vhUJn*5E!0DcO9$`2`S9|A z+wMQU__l?ji&A{yj58_o5D2~?UwR6=M60VPXBJ?Bi+kiFN1b^6|yH4&QzM zf#qYz77nbiLfcJaTdQu|LiWS=7F%$VHc1<;eiN$lM1ORC<<_w+%oG$Y)T`9J_HlV+1xWYUK-PBMJHYiijQaFr)MOB|UG2ODcQZ$|{PWm`fwqz2V6>tVBcpZ8emm zx_PTTNi!!xRr9djseZTZH=)mtp62!|?=_RGYH8kXVi&1I$9`CxQ9rx(6T*o%^%I@U zH&My;D|a7VsM^?Opoa&oyeAO*?zYW^-&k`5a*7!<5!_)>l7e)N{N{o?=Z`HdF5NN* zcP!n0c+fO#SkSQKYcoD&<`8Ib9txtj6XkL;dh3L*)^NIJ}tzFbPhqYzm`d}l`SkQW7w&T;LgY*jmG#E zhi8=)R!4}-IK-#MY^|)#W@g@kLh4Q=+T2}Koh44O1!V|owatC(_B*|ykUD0&nMTs3 z+83;0NnyW}imNLEEADcUFexZSoMmkix#lZopN}vW(SAiidaP+ez@!Y~`he?fpdMwu zXqzfaw=Cy^z0Ri}4xzZJ-itJt?(5-qaZANDV zFs&ZpEDPnUjwr#OnZRWJ1~WWSe9vJrA}rNI$<*yf41qrhswRSDC3LFx8`!>(d?z7l zP>*TcsOv<~j85f2GwWl<2ZL6~SUV{&MQP_yGIUVyGVjb9U~KN;$%tqi54A&MZ(V_;-=Z?cd%LE01*>Iz(87O?GzNlzBhLwGt|5uf zTA;sE0SgZACIq*;hdj`7%6-v_RK19jw3Y0`2`zf%|F{V{!qF49Vz3(PV~PPcO5xbD zUa%JTB;4^xLRVgU6BGgeni;WXT0OwRm-kCPdO)iM!3)c$6)%ptwLe_MN`$*?qcl{i zo4pu?EIFQHJ3dJ;1+pbD*VL&4!F0`?HcuOxgCfEM85+yi?{j7am_Y z%=z?Y;Q{&Bbk#*w$F_frM)v0^Y>1i5rsO1uV@Y$C&{shOVko3dWYU;M;Pyt=HN6T` z`1y@1s6)EkpVEyv{M5#BM8~FLzq0^l!3?V*e2l`0Qq-u5;*_qAKj+1m@eW}?xX!{% zB~Q?_tp{-mj(cmxh!Oej*jT<9ffP6n*Na(S7L1mxh})gqO-(kZpR*JNii6{Din9@< zhmDI}YQ#-NjX4~bQNem9?GEu3r5hNh5oCgp@PHr?v@Vi1ou2cq!c@3$*U@9)G}i8A z?rRv<#9MYdG}ueS_GKTXbYC~aP%#mbs9zFHvV?!(T04iXxOKsjnA zrrc3brZZG$l5j{GweUgN-)=viR&D}66l^7lz=AVjW%y4_;QZ*wXPukR=Dh&7gGV{T6bd6deEY^-x!CbBZ^nW8)!>r>OPM4dwzluAD}E5wWX*}%n` zf+9~~lo`<55X(Tu05yukPv=9IKm9?LlR+Qq&QX0{$J95M65-)B=U$) zA_ZJl2M#0FFLxXEv{;bFU>OGP%9vTkc1A6X>Dp>;+DSefrW@LVR-Bq%nm@8ow3M_= z^cFnq1{ImiRb`~%wx3?R80~OJ)r0~o;Qb`C zAf5UR2Ewxo%ZCsiAwqoM=7`og%OlehJhy;Kfdl%=gcPoohy*IfS$n9DSFvBw%R*M! z9VZryAK(_mn@eKqr<^M~l_Q4 z?4GUa-=2~@ArnO_2{Gn^?57G(fr|5kK_T|WQh(}zL`zqTdXKVC+8T! zpsy%t2DQtLN`4ckuBXCSCtcFyOwo~-EPKt%HVc7mE{NMSS~bs(qluogUsP~ctt27r zBE^y0ve#H2PLavy>4wN?vm|!abmXdu?V_o91+?&IlK11^tsPs0xW$nJrA zW%riUJXB-{_oONu|)`JR{z@r>VLmGVnaHBefDl`@LhID#%d?4-S% zD$nCN9Zu*|7Ct1ro45?bzrv!3^tEAVh8hIewr3WbA%zM#jo-srge4zQk(I)5Q$Ctn zGDFkVs?p+p$3Y2)QS{4U5LN`cXu$@@+gKAKYYOm4?K=s>7Q#*Tgf+KJ2&Y5JNe&st zN4wdBcyhJHX6+6ao1HT@vqZ%3s@bb&ukp!>wIex#zjiYzi?x+(&Q9D)%dJRRoH)9? zQab-QHWwadk#Q5lV+5yTGGD^$(C)f3iwdzjH*tKMv}PgU8zv63 z+>|#( z(~kYjuiqzr)syR|(#x*jJFO(hc`PA9IE`fMiz%G#b%G3je1@pI^*BN#>qevlA_vK; z(w!C>p98L~rz2c{rq={rGd#EO9PxW30zo2lk$gb@hxwt&NG->wX%89Fj>0ofqArRQ z)-%r#4w_g@#gICl4@FoK89N+}TK1}qoLQbdeRUZV!(zzFUp;W^!s4-IpTo)%dr*YL z2a;HQxhj#hxKSmu7I$_^Xk9*baG}g*wI4+`YUmynmPipU9ISx3=t>oJ${X6bh;V05 z5k!_8=fyS-?@I${K+O&>@l$RomCdObl_oRtB zL^5O@xBMKY(KXQk(uw_s?3CBKY>BOO*-zK;i8+zbPNUS=X}%OTY?DxKDm7|1VLV9v zbVQD&QB~9=QzmI<`!)66)>COSi!8zPx!RSEWT}h))E|@)2AnD1~fn zF0oeYpmFIKTG@3-|1UZYCbhO31xq}KklDknr|K{*PB%#rtd`bV`ayz8>9*TSl5i^y zBX^J0W$#k_W96E%r!qj?MvCA@yNK#tB+@_`Di`W#OmU~QbkJtq3=o`bXfzuuGh21? z)lVjx$4ITQG*;9ORw6iuQAoZZ9!=1e$-C{X$1#67btZ;@AxA{BOaAV-DsHVYeUMIM zIgiLl7{@Ipd*~zU;zu;+e6e%XXqn|QN?ZqLX-*juTaRmUHdI!+OG`AXeywTa3kpd7 zh~gzuN^4ND`C`u!zN#b4Ht4vsYD zo3MxxR%H{LMQ#V(;N-!25kgZ!M<&RC{tGa~#+9{fO9Hau1|R9)O!OV5H0LDlWx;dw z!vYQ{T7H=;0pChpF=x$UhbHh#x@e#-^j=bJ#Uuxi3QF4CdP*noI^#1v(v0%C;GiWC zlO|(xulE}m?`+^W(zG07u_ci+hDy9T&fDXQYR*PSFSvcFiK69-Ook-72H4C!2(j*E^1#t=%2OGZ%= z;_Y`ZeXCq-29i^1Fc-U^CT%KIP^kcCDI~l(q*QF8r1Arr2!IUAWS>dNE`0qdneS`J zHB_+@3~U>tF2>SkHm$NQ5`g^ZY&}k%w#k)bBv8N$odcmIID6;p>^|p0&KZ*SvaD=2 zg7rn`5~!J(P)>!(Rc549%NSd26ragtUuD=x+9UPr-FoG3vzz3)Z?{}! zP;%n57M*6wT89rMA=pTA$+7Gf(;~?laFw+?{z+dE957VK2+!Zu9T9>C;jZ`Du9D zeS0G=qr1>sBc(^Z1V?R%45e`ERU)r#73^r?IYoraYPcjsnqj6Y1Kf6fSbn~+riK#3 zzvtF8Tcnoq!Xp}67Wq4WWk{BJugXNI%i!AC(HYGPR~Mz2<<)Gr=UO-gp7KUnoCW2{V>*1 zhf@kq9c#wLi$)|I{W7Kj;}JzrS)|cGa`=jm=eQ&RbD|Y^SDv`?!Vw>e_+VnWuneM! zF)KTKLE$+@TDb`H;9_XE=Nu?7qAG9O(ujSAc;8ZhdHmcN;$jW4j>RkW#i@B^iWfZ$ zr%D&u00Rlf17%0E#LfRvQOgpiMK|cCqn)87aZ!^>{{JL#7U8ciNn8d1rq*bvY(o)3 zBgMI3{*J}t%X1vdB~l@UQEpk|u(;LdsY+UJ$~fIXT4 zg0qxzd<259?oW4^v0U1svqVeGW-9z}Gmpj`wfK<3s6jvAK4SBfBuIj}kKvh?@q}3! zo0^)|5*0OUUNAS)F?dJC*^k^BCNgGBTJQ#eLeD)kXwe};%aE3m&SmR5n@dLFa96A} z0#kAm2IgC(U@X_XrRa-@qU1Mz;G{*O9A!I3!5EfwWz3OtWw2;VYmvr$7L!x;-nN@@ zyDbw^)5LaHw{{8>jB+kv^tN%WvujjS3 zj=5F|yW{;Sdwp~W^*(Q{OZjel;woYHlGlz6Jnq~v@T^vNyKa$2yHJ*+7DEPW#4%Fo z{SUZ{Hnt{VKqbD{yK%ru!&j0gVG&nnA{>Q!0^nRbFkUPJ#dd&)!{MU(-V$a>bLufY z_t?(3+=<=xd*(&asQIXPSFOxynQ=kG3cCXlnkfq(`sJ?L@psGnJ!mf z3{r$-*&YZZD0w=3Ksj%W$QvC^Tc+QeS zOU2Bx?wGY%PZ%oIHo?@T)*!{7R|^K7IT_#*{h6TNQ(#tu1-2*q>!}kZ{^*Fm@=?_t zp`7_)MF}m6ynF;xE;su*sHzHQFC045WK8mjeKpf6n+!oK-^KkMR{KL;xPdCp#>uH% zVV1L+UbL-pH8`3n3{w-j!<|sBuqljgilVY%#~T=WaX^z8er-Tw@o`vIlgvspU<13Y zu&HRQ+&<5kfg;xj7hy-u=N!07qB5Zwbp#$EmW4p2gnugMrHE+-`ooZ z9FNMV6V2*8$4{keHd3{07N-wNhe-#}CKM1FQ_uyqp5My`WefJ!!ANb=--gwgj924!mGtg3bO%`V*X5}Kha_CrRTv3oBqsF$&w{kp$gChirzR4 zp)`?gc_XYO31(AE&Rmu4td|n{XMHK5$j*DN7ZZwd&+&4?;!%v8|8l zErjBof#T=5mlOQ6^5q2mE>Z%wzntJo@Az_pdtAJn;3hTJ(jg3Ceg%67l@^ZsnJ1MW zkENj(7Ho6OLZF0;-Bs$NQmBK)2K3AL0$v>kXyGC-SGDO?r9CTB-=IWu%8>Hv2rea+ zp47D_LTX5m!u-Ch#b7)ann9prHTR+eDc9!1OTH_6V!(IZGaE$C_xJBPs5^himnh}6 z)ZpILR`M!hQMY%Ob+LW6AH+cL_U?mwNy!w4O-5=pW}+OQ=%5SIwmyo3919lb35nl} z%A3`nn6x;)X(z1}N*c9cj7qAGYd7MooBS6AEnrD|v!=)-8(KPcw?)OPWiT)h&)kap=ypNqoV9sH`Twny}fjioG2OZ9juv)Xih@R3av$lw-^1TTyyMJ$Dx#At@ka`1ePFTJe#BBqXN@3ki8p4{! z+k@{*SpNFf6El!If!$n2pVceHgcB0%Twxw_>}i?8JaFj(Rze(UIhbWJulyJro4^|t za!|+mA4iWZ_K(cp6-++gKQo)y-+e6p%B=evv!nO)Do63Bfb1naY?|SmSzeG*Le}=b zb;MB&f9)#lcfv^vrP?2&+f3SMI^JGc<6TPLR6#JekpcFH!|d-GIKJdXEqDjNmp>Gy zKe04Wvd*8{Wi$8#V0v?Epg7K_RdDlv9vQ|a9FTiu_9CQaiD;9og>s0;J}GjFE7i!> zl)GgDW#|v^&ZBe)E-35AodmLi)R2U?+{&!c@9;`UxkiVxlt0(Y--40|+mydkaE!vz jB4_cl4$4hV4!9gP`{n8&l9zn?S}LkpoNY+vj@J9XMhJSN literal 2425 zcmaKsJ&YVR6vqu5glzb_@Er(whgcmb%x3oBq|4?AQ9^Vi;zWp6R4L9o*z6gE+J_G&$J_qiCkAVm86XGfG$dFC&5We3A zdA<$KfC_v7+yLjmYv2>$$KWyWbMR^KJMbv@3wRj(8+-wrg%jQ<204xu@D*?kB=9=O z{%?W@z%N0L`)e=)e*$-qmJg1rA9Am={=CmjDVkiZz^xZeXg z4i7#FUI*b?+yLQPdM2uFu8pG7TFNc+|Zy~2T7L$*sO)|}XDIf*HxGbeZh6tFT^jomb2Q#yl@7FEWn z#AXJGr=)x$Irl4^{Qf35qn<1&)mT>QK4(y8>r2jVU?jSbM(-=f#b{Aio3tu*?&nh=bVz9W%L$G)uM&C*^J`F zsM)0WWNUHhc-)L*7)F;>U-OP*yEtaM*J5hMt!DFhya2m*q%Whklg8(=w5~-LmA~WZ ztdo69-{gJi)DA6gbmW=BcI;LI_wY0pnXHnTirPx{TC{?PlW1vZIV-9>DxFNLB*D&S z5>++2x>2P`L;18@ny=r|=T$zDgJ=!$-)45ft4&}@+S zSUpH)(xt(hq@j3BjTJUWse*7=-0(cNqSOUTLNd=D2O2V|+*tDls=+4wwrR>@@L0L% z<3TyK3}O;ey36xWMv(SikL(Axyx`LssY>v{hN2p&3REPVby~q3n#-358iRLir$ZUq zhcprXbhv}-At5il0`ihVLF{dn;Km4vM~Ua{RZ=N~SHqc43k<$T#>jSHJd%}QJdher Kjuqx#=KlclE1C5G diff --git a/po/gl.po b/po/gl.po index 6260e4d..e5ca4aa 100644 --- a/po/gl.po +++ b/po/gl.po @@ -1,82 +1,131 @@ # Galician translation of findutils. -# Copyright (C) 2000, 2010 Free Software Foundation, Inc. -# Jesús Bravo Álvarez , 2000. +# Copyright (C) 2012 Free Software Foundation, Inc. +# This file is distributed under the same license as the findutils package. # -# Se desexas colaborar connosco na traducción de programas libres ó galego, -# vai mira-la páxina do noso grupo: http://www.ctv.es/USERS/jtarrio/trans +# Jesús Bravo Álvarez , 2000. +# Fran Dieguez , 2012. # -# First Version: 2000-02-16 23:49+0100 +# Proxecto Trasno - Adaptación do software libre á lingua galega: Se desexas +# colaborar connosco, podes atopar máis información en +# Leandro Regueiro , 2012. # msgid "" msgstr "" -"Project-Id-Version: findutils 4.1.5\n" +"Project-Id-Version: findutils 4.5.7\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2000-05-30 10:11+0200\n" -"Last-Translator: Jesús Bravo Álvarez \n" -"Language-Team: Galician \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2012-02-24 12:27+0100\n" +"Last-Translator: Leandro Regueiro \n" +"Language-Team: Galician \n" "Language: gl\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" -#: find/find.c:148 find/ftsfind.c:667 -#, c-format -msgid "Failed initialise shared-file hash table" +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" msgstr "" +"produciuse un fallo ao restaurar o directorio de traballo despois de buscar " +"%s" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Non é posíbel pechar a saída estándar" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Produciuse un fallo ao cambiar o directorio" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "non se pode facer fork" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "erro agardando a %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminado por sinal %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Produciuse un fallo ao inicializar a táboa de shared-file hash" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 #, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "fallou a comprobación de sanidade da función da biblioteca fnmatch()." + +#: find/find.c:263 +#, c-format msgid "cannot stat current directory" -msgstr "non se pode obte-lo directorio actual" +msgstr "non é posíbel facer «stat» no directorio actual" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "" +msgstr "Non é posíbel ler a lista de dispositivos montados." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "" +msgstr "AVISO: o sistema de ficheiros %s foi desmontado recentemente." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "" +msgstr "AVISO: o sistema de ficheiros %s foi montado recentemente." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" +"%s%s cambiou durante a execución de %s (número de dispositivo antigo %ld, " +"número de dispositivo novo %ld, o tipo de sistema de ficheiros é %s) [ref " +"%ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" +"%s%s cambiou durante a execución de %s (antigo número de nodo-i %, " +"novo número de nodo-i %, o tipo do sistema de ficheiros é %s) [ref " +"%ld]" -#: find/find.c:693 -#, fuzzy, c-format +#: find/find.c:752 +#, c-format msgid "failed to return to parent directory" -msgstr "non se pode voltar ó directorio inicial" +msgstr "produciuse un fallo ao volver ao directorio pai" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "" +msgstr "Produciuse un fallo ao cambiar de directorio de forma segura en %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" +"A ligazóns simbólica %s é poarte dun bucle na xerarquía de directorios, xa " +"visitamos o direcorio ao que apunta." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -85,14 +134,20 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" +"Detectouse un bucle no sistema de ficheiros; %s ten o mesmo número de " +"dispositivo e nodo-i como un directorio que está %d nivel por enriba na " +"xerarquía do sistema de ficheiros" msgstr[1] "" +"Detectouse un bucle no sistema de ficheiros; %s ten o mesmo número de " +"dispositivo e nodo-i como un directorio que está %d niveis por enriba na " +"xerarquía do sistema de ficheiros" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "" +msgstr "aviso: non se sigue a ligazóns simbólica %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -102,45 +157,57 @@ msgid "" "searched." msgstr "" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "" +msgstr "Non é pośibel ler a lista de sistema de ficheiros montados" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" -msgstr "descoñecido" +msgstr "descoecido" #: find/ftsfind.c:259 #, c-format msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" +"Detectouse un bucle no sistema de ficheiros; %s é parte do mesmo sistema de " +"ficheiros como %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "" +msgstr "AVISO: o ficheiro %s semella ter o modo 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" +msgstr "non é posíbel buscar %s" + +#: find/ftsfind.c:609 +#, c-format +msgid "failed to restore working directory after searching %s" msgstr "" +"produciuse un fallo ao restaurar o directorio de traballo despois de buscar " +"%s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:677 #, fuzzy, c-format -msgid "failed to restore working directory after searching %s" -msgstr "non se pode voltar ó directorio inicial" +msgid "Failed initialize shared-file hash table" +msgstr "Produciuse un fallo ao inicializar a táboa de shared-file hash" -#: find/parser.c:471 -#, c-format +#: find/parser.c:452 +#, fuzzy, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" +"A acción -delete activa automaticamente -depth, pero -prune non fai nada " +"cando -depth está activado. Desexa levala a cabo aínda así, use " +"explicitamente a opción -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -149,60 +216,58 @@ msgid "" "arguments.\n" msgstr "" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" +"aviso: a opción -d está obsoleta; use -depth non seu lugar, xa que a última " +"é unha característica de compatibilidade con POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" +"%s non é un nome dun grupo existente e non semella un ID de grupo numérico " +"xa que ten un sufixo non agardado %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" -msgstr "" +msgstr "%s non é o nome dun grupo existente" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" -msgstr "" +msgstr "o argumento de -group está baleiro, debe ser un nome de grupo" -#: find/parser.c:1227 -#, fuzzy +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" -"a rota por defecto é o directorio actual; a expresión por defecto é -print\n" -"expresión pode consistir en:\n" -"operadores (precedencia decrecente; -and está implícito cando non se " -"indican\n" -"outros):\n" -" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +"\n" +"a ruta por omisión está no directorio actual; a expresión por omisión\n" +"é a expresión -print que pode consistir en: operadores, opcións, tests e\n" +"accións:\n" -#: find/parser.c:1230 -#, fuzzy +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"a rota por defecto é o directorio actual; a expresión por defecto é -print\n" -"expresión pode consistir en:\n" -"operadores (precedencia decrecente; -and está implícito cando non se " -"indican\n" -"outros):\n" -" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +"operators (reducindo a precedencia; -and é implícita onde non se fornece " +"outra):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -210,9 +275,14 @@ msgid "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" +"opcións posicionais (sempre true): -daystart -follow -regextype\n" +"\n" +"opcións normais (sempre true, especificado antes de calquera outra " +"expresión):\n" +" -depth --help -maxdepth NIVEIS -mindepth NIVEIS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 -#, fuzzy +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -220,28 +290,31 @@ msgid "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" +"tests (N pode ser +N ou -N or N): -amin N -anewer FICHEIRO -atime N -cmin N\n" " -cnewer FICHEIRO -ctime N -empty -false -fstype TIPO -gid N -group " "NOME\n" -" -ilname PATRÓN -iname PATRÓN -inum N -ipath PATRÓN -iregex PATRÓN\n" -" -links N -lname PATRÓN -mmin N -mtime N -name PATRÓN -newer FICHEIRO\n" +" -ilname PATRÓN -iname PATRÓN -inum N -iwholename PATRÓN -iregex " +"PATRÓN\n" +" -links N -lname PATRÓN -mmin N -mtime N -name PATRÓN -newer FICHEIRO" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path PATRÓN -perm [+-]MODO -regex PATRÓN\n" -" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NOME\n" -" -xtype [bcdpfls]\n" +" -nouser -nogroup -path PATRÓN -perm [+-]MODO -regex PATRÓN\n" +" -readable -writable -executable\n" +" -wholename PATRÓN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NOME -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" -msgstr "" +msgstr " -context CONTEXTO\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -249,20 +322,29 @@ msgid "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" +"\n" +"accións: -delete -print0 -printf FORMATO -fprintf FICHEIRO FORMATO -print \n" +" -fprint0 FICHEIRO -fprint FICHEIRO -ls -fls FICHEIRO -prune -quit\n" +" -exec ORDE ; -exec ORDE {} + -ok ORDE ;\n" +" -execdir ORDE ; -execdir ORDE {} + -okdir ORDE ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" +"Informe (e siga o proceso de arranxo) de erros na páxina de informe de " +"erros\n" +"de findutils en http://savannah.gnu.org/ ou, se non ten acceso a internet,\n" +"enviando un correo electrónico a " -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." -msgstr "" +msgstr "fallou a comprobación de sanidade da función da biblioteca fnmatch()." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -271,554 +353,913 @@ msgid "" "perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " "use 'find ... -print0 | grep -FzZ %s'." msgstr "" +"aviso: os nomes de ficheiro de Unix normalmente non conteñen barras (con " +"nomes de ruta si). Isto significa que «%s %s» probabelmente avaliarase a " +"false todo o tempo no seu sistema. Pode atopar «-wholename» máis útil, ou " +"nese caso «-samefile». De forma alternativa, se está usando GNU grup, pode " +"usar «find ... -print0| grep -FzZ %s»" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" +"Agardábase un argumento enteiro decimal positivo para %s, pero obtívose %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" +"Este sistema non fornece unha forma de atopar a hora de nacemento dun " +"ficheiro." -#: find/parser.c:1638 -#, fuzzy, c-format +#: find/parser.c:1633 +#, c-format msgid "The %s test needs an argument" -msgstr "%s: a opción `%s' require un argumento\n" +msgstr "A proba %s necesita un argumento" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" -msgstr "" +msgstr "Non é posíbel adiviñar como interpretar %s como unha data ou hora" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "" +msgstr "Non é posíbel obter a hora de nacemento do ficheiro %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "" +msgstr "aviso: -%s %s non coincidirá con nada xa que remata con /." -#: find/parser.c:1956 +#: find/parser.c:1992 #, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 -#, fuzzy, c-format msgid "invalid mode %s" -msgstr "modo `%s' non válido" +msgstr "modo %s non válido" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" +"aviso: debe especificar un patrón de modo %s (que é o equivalente a /000). O " +"significado de -perm /000 cambiou para ser consistente con -perm -000; isto " +"é, foi usado para coincidir con non ficheiros, agora coincide con todos os " +"ficheiros." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" -msgstr "argumento nulo de -size non válido" +msgstr "argumento nuloo non válido para -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "tipo `%c' de -size non válido" +msgstr "tipo -size non válido «%c»" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "argumento `%s' de `%s' non válido" +msgstr "Argumento «%s%c» non válido para -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" +"A opción -show-control-chars toma un único argumento que debe ser «literal» " +"ou «safe»" -#: find/parser.c:2630 -#, fuzzy, c-format +#: find/parser.c:2566 +#, c-format msgid "Invalid argument %s to -used" -msgstr "argumento `%s' de `%s' non válido" +msgstr "Argumento %s non válido para -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" -msgstr "" +msgstr "%s non é o nome dun usuario coñecido" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" -msgstr "" +msgstr "O argumento para -user non debe estar baleiro" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " -msgstr "" +msgstr "Características activadas:" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "" +msgstr "predicado non válido -context: SELinux non está activado." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" -msgstr "" +msgstr "Os argumentos para -type non deben conter só unha letra" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 -#, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "aviso: secuencia de escape `\\%c' descoñecida" - -#: find/parser.c:3032 +#: find/parser.c:2820 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2831 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "aviso: directiva de formato `%%%c' descoñecida" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2842 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3260 +#: find/parser.c:2849 #, c-format +msgid "Unknown argument to -type: %c" +msgstr "Argumento descoñecido a -type: %c" + +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" +"O directorio actual está incluido na variábel de contoron PATH, que non é " +"seguro en combinación coa acción %s de find. Elimine o directorio actual do " +"seu $PATH (isto é, elimine «.» ou puntos e comas iniciais ou finais)." -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove that " "entry from $PATH" msgstr "" +"A ruta relativa %s está incluida na variábel de contorno PATH, que non é " +"segura en combinación coa acción %s de find. Elimine dita entradad e $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" +"Non debe usar {} nunha utilidade de nome para -execdir e -okdir, xa que é un " +"potencial problema de seguranza." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "" +msgstr "Só se admite unha instancia de {} con -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 -#, fuzzy, c-format +#: find/parser.c:3100 +#, c-format msgid "The environment is too large for exec()." -msgstr "o ambiente é grande de máis para exec" +msgstr "O contorno é demasiado grande para exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" -msgstr "" +msgstr "erro estándar" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "" +msgstr "saída estándar" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "" +msgstr "non é posíbel eliminar %s" -#: find/pred.c:580 +#: find/pred.c:718 +#, c-format +msgid "WARNING: cannot determine birth time of file %s" +msgstr "AVISO: non é posíbel determinar a hora de nacemento do ficheiro %s" + +#: find/pred.c:782 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:784 #, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "non se pode voltar ó directorio inicial" +msgid "Failed to write prompt for -ok" +msgstr "Produciuse un fallo ao escribir na entrada estándar" -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:1208 find/print.c:1234 #, c-format msgid "getfilecon failed: %s" -msgstr "" +msgstr "getfilecon fallou: %s" -#: find/pred.c:1507 +#: find/print.c:346 #, c-format -msgid "WARNING: cannot determine birth time of file %s" +msgid "warning: escape `\\' followed by nothing at all" msgstr "" -#: find/pred.c:1571 +#: find/print.c:365 #, c-format -msgid "< %s ... %s > ? " -msgstr "< %s ... %s > ? " +msgid "warning: unrecognized escape `\\%c'" +msgstr "aviso: secuencia de escape `\\%c' descoecida" -#: find/pred.c:2032 +#: find/print.c:385 #, c-format -msgid "Cannot close standard input" -msgstr "" - -#: find/pred.c:2061 -#, fuzzy, c-format -msgid "Failed to change directory" -msgstr "non se pode voltar ó directorio inicial" +msgid "error: %s at end of format string" +msgstr "erro: %s ao final dunha cadea de formato" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:409 #, c-format -msgid "cannot fork" -msgstr "non se pode facer fork" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "erro: a directiva de formato «%%%c» está reservada para un uso futuro" -#: find/pred.c:2123 +#: find/print.c:417 #, c-format -msgid "error waiting for %s" -msgstr "erro agardando a %s" +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" -#: find/pred.c:2132 +#: find/print.c:425 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s terminado por sinal %d" +msgid "warning: unrecognized format directive `%%%c'" +msgstr "aviso: directiva de formato `%%%c' descoecida" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" -msgstr "expresión non válida" +msgstr "expresión non válida" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." -msgstr "" +msgstr "expresión non válida; usou un operador binario «%s» con nada antes." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "" +msgstr "agardábase unha expresión entre «%s» e «)»" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" -msgstr "" +msgstr "agardábase unha expresión despois de «%s»" -#: find/tree.c:161 -#, fuzzy, c-format +#: find/tree.c:166 +#, c-format msgid "invalid expression; you have too many ')'" -msgstr "expresión non válida" +msgstr "expresión non válida; ten demasiados «)»" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" +"expresión non válida; agardaba atopar un «)» pero non vexo ningún. Quizais " +"precise un predicado adicional despois de «%s»" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." -msgstr "" +msgstr "expresión non válida; os parénteses baleiros non están permitidos." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "" +"expresión non válida; agardaba atopar un «)» nalgún lugar pero non vexo " +"ningún." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" -msgstr "ups -- tipo de expresión no válida" +msgstr "recoiro -- tipo de expresión non válida!" -#: find/tree.c:276 -#, fuzzy, c-format +#: find/tree.c:281 +#, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "ups -- tipo de expresión no válida" +msgstr "recoiro -- tipo de expresión non válida (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 -#, fuzzy, c-format +#: find/tree.c:1294 +#, c-format msgid "paths must precede expression: %s" -msgstr "os camiños teñen que preceder á expresión" +msgstr "as rutas deben preceder ás expresións: %s" -#: find/tree.c:1297 -#, fuzzy, c-format +#: find/tree.c:1303 +#, c-format msgid "unknown predicate `%s'" -msgstr "predicado `%s' non válido" +msgstr "predicado «%s» descoñecido" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" -msgstr "predicado `%s' non válido" +msgstr "predicado `%s' non vlido" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" -msgstr "argumento `%s' de `%s' non válido" +msgstr "argumento `%s' de `%s' non vlido" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "non atopado argumento de `%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "" +msgstr "ten demasiados «)»" -#: find/tree.c:1412 -#, fuzzy, c-format +#: find/tree.c:1418 +#, c-format msgid "unexpected extra predicate '%s'" -msgstr "predicado `%s' non válido" +msgstr "predicado adicional non agardado «%s»" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" -msgstr "" +msgstr "predicado adicional non agardado" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" -msgstr "ups -- inserción dun and por defecto non válida" +msgstr "recoiro -- inserción por omisión de «and» non válida!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " -msgstr "" +msgstr "Uso: %s [-H] [-L] [-P] [-Onivel] [-D " -#: find/util.c:173 -#, fuzzy, c-format +#: find/util.c:177 +#, c-format msgid "] [path...] [expression]\n" -msgstr "Uso: %s [camiño...] [expresión]\n" +msgstr "] [ruta...] [expresión]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" -msgstr "non se pode obte-lo directorio actual" +msgstr "produciuse un fallo ao volver ao directorio pai" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" -msgstr "non se pode obte-lo directorio actual" +msgstr "produciuse un fallo ao volver ao directorio pai" -#: find/util.c:816 -#, fuzzy, c-format +#: find/util.c:824 +#, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "aviso: secuencia de escape `\\%c' descoñecida" +msgstr "Ignorando o parámetro de depuración non recoñecido %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." -msgstr "" +msgstr "Argumento baleiro para a opción -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "" +msgstr "A opcións -O debe estar seguida inmediatamente por un enteiro decimal" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" -msgstr "" +msgstr "Especifique un número decimal inmediatamente despois de -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" -msgstr "" +msgstr "Nivel %s de optimización non válido" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" +"O nivel de optimización %lu é demasiado alto. Se quere atopar ficheiros moi " +"rápido, considere usar GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" +"A variábel de contorno FIND_BLOCK_SIZE non se admite, a única cousa que " +"afecta o tamaño de bloque é a variábel de contorno POSIXLY_CORRECT" + +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "argumento `%s' de `%s' non vlido" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumento %s de `%s' non vlido" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Os argumentos vlidos son:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "erro de escritura" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Erro de sistema descoecido" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: a opcin `%s' ambigua\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: a opcin `--%s' non permite ningn argumento\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: a opcin `%c%s' non permite ningn argumento\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: a opcin require un argumento -- %c\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: opcin `--%s' descoecida\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: opcin `%c%s' descoecida\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: opcin non vlida -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: a opcin require un argumento -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: a opcin `-W %s' ambigua\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: a opcin `-W %s' non permite ningn argumento\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: a opcin require un argumento -- %c\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "produciuse un fallo ao volver ao directorio pai" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "produciuse un fallo ao volver ao directorio pai" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" -#: lib/buildcmd.c:171 +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +#, fuzzy +msgid "memory exhausted" +msgstr "Memoria esgotada" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "argumento `%s' de `%s' non vlido" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "argumento `%s' de `%s' non vlido" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "lista de argumentos demasiado longa" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" -msgstr "comando longo de máis" +msgstr "orde demasiado longa" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" +"non é posíbel chamar a exec() debido ás restricións de tamaño de argumento" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -"non se pode encaixar o argumento no límite de tamaño da lista de argumentos" +"non é posíbel encaixar un único argumento no límite de tamaño da lista de " +"argumentos" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" -msgstr "lista de argumentos longa de máis" +msgstr "lista de argumentos demasiado longa" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" +"A variábel de contorno %s non está estabelecida a un número decimal válido" -#: lib/findutils-version.c:60 -msgid "Eric B. Decker" +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:55 +msgid "Eric B. Decker" +msgstr "Eric B. Decker" + +#: lib/findutils-version.c:56 msgid "James Youngman" -msgstr "" +msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" -msgstr "" +msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU find versión %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "Produciuse un fallo ao escribir na entrada estándar" + +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Tipo de expresión regular %s; os tipos válidos son %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" -msgstr "" +msgstr "Sufixo %s non agardado en %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" -msgstr "" +msgstr "Agardábase un enteiro: %s" -#: lib/regextype.c:107 +#: locate/code.c:131 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 -#, fuzzy, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" -msgstr "Uso: %s bigramas_máis_comúns < lista > lista_codificada\n" +msgstr "" +"Uso: %s [--version | --help]\n" +"ou %s most_common_bigrams < file-list > base-de-datos-de-locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" +"\n" +"Informe de erros a \n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" -msgstr "" +msgstr "Uso: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." -msgstr "" +msgstr "Debe especificar un nivel de seguranza como un número decimal." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." -msgstr "" +msgstr "O nivel de seguranza %s está for rango convertíbel." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." -msgstr "" +msgstr "O nivel de seguranza %s ten un sufixo %s non agardado." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." -msgstr "" +msgstr "Nivel de seguranza %ld de slocate non admitido." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" -msgstr "" +msgstr "Produciuse un fallo ao escribir na entrada estándar" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" -msgstr "días" +msgstr "días" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "" +msgstr "O argumento para a opción --max-database-age non debe estar baleiro" -#: locate/locate.c:209 locate/locate.c:216 -#, fuzzy, c-format +#: locate/locate.c:202 locate/locate.c:209 +#, c-format msgid "Invalid argument %s for option --max-database-age" -msgstr "argumento %s de `%s' non válido" +msgstr "Argumento %s non válido para a opción --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" +"A base de datos %s de locate contén un nome de ficheiro máis grande do que " +"locate pode xestionar" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" -msgstr "" +msgstr "A base de datos %s de locate está corrompida ou non válida" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Tamaño de base de datos de locate: %s byte\n" +msgstr[1] "Tamaño de base de datos de locate: %s bytes\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" -msgstr "" +msgstr "Nomes de ficheiro coincidentes: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" -msgstr "" +msgstr "Todos os nomes de ficheiro: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -829,80 +1270,97 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" +"Algúns nomes de ficheiro foron filtrados, polo que non pode computar a taxa " +"de compresión.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" -msgstr "" +msgstr "Taxa de compresión %4.2f%% (máis grande mellor)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" -msgstr "" +msgstr "Taxa de compresión non definida\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" +"A base de datos de locate %s semella unha base de datos de slocate pero " +"semella ter un nivel de seguranza %c, que GNU findutils non admite " +"actualmente" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" +"%s é unha base de datos de slocate. A compatibilidade para estas é moi " +"nova, pode ver algún erro por agora." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" +"%s é unha base de datos de slocate dun nivel de seguranza %d non admitido; " +"omitíndoa." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" +"Especificou a opción -E, pero dita opción non pode usarse coa base de datos " +"de formato slocate con un nivel de seguranza non cero. Non se xerarán " +"resultados para esta base de datos.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "" +msgstr "%s é unha base de datos slocate. Activando a opción «-e»." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" +"Base de datos de locate %s de formato antigo é demasiado antiga para ser " +"válida" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" -msgstr "" +msgstr "A base de datos %s están no formato %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" +"A base de datos ten unha codificación de palabra-de-máquina little-endian.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" +"A base de datos ten unha codificación de palabra-de-máquina big-endian.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" +"A base de datos ten unha codificación de palabra-de-máquina non é obvia.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -913,139 +1371,175 @@ msgid "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" msgstr "" +"Uso: %s [-d ruta | --database=ruta] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n" +" [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" +" patrón...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" -msgstr "" +msgstr "produciuse un fallo ao eliminar os privilexios de grupo" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "" +msgstr "produciuse un fallo ao eliminar os privilexios de setuid" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" -msgstr "" +msgstr "produciuse un fallo ao eliminar os privilexios por completo" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "" +msgstr "produciuse un fallo ao eliminar os privilexios de setgid" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." -msgstr "" +msgstr "aviso: a base de datos de locate só pode lerse desde stdin unha vez." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "" +msgstr "produciuse un fallo na chamada do sistema «time»" -#: locate/locate.c:1856 -#, fuzzy, c-format +#: locate/locate.c:1844 +#, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" -msgstr "aviso: a base de datos `%s' ten máis de %d %s" +msgstr "" +"aviso: a base de datos %s é máis antiga que %d %s (a idade actual é %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" +"AVISO: a base de datos %s de locale foi construido con unha orde de byte " +"diferente" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" -msgstr "" +msgstr "EOF non agardado en %s" -#: locate/word_io.c:146 -#, fuzzy, c-format +#: locate/word_io.c:148 +#, c-format msgid "error reading a word from %s" -msgstr "erro agardando a %s" +msgstr "produciuse un erro ao ler a palabra desde %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." -msgstr "" +msgstr "Secuencia de escape %s na especificación do delimitador de entrada." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" +"Secuencia de escape %s na especificación do delimitador de entrada; os " +"valores de caracteres non deben esceder %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" +"Secuencia de escape %s na especificación do delimitador de entrada os " +"valores de caracteres non deben exceder %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" +"Secuencia de escape %s na especificación do delimitador de entrada; os " +"caracteres finais %s non se recoñecen." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" +"Especificación de delimitador de entrada %s non vaĺida: o delimitador debe " +"ser ou un só caractér ou unha secuencia de escape que comece por \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" -msgstr "o ambiente é grande de máis para exec" +msgstr "o ambiente grande de mis para exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" +"aviso: o valor %ld para a opción -s é demasiado longo, usando %ld non seu " +"lugar." + +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "" +msgstr "Non é posíbel abrir o ficheiro de entrada %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" -msgstr "" +msgstr "As súas variábeis de contorno ocupan % bytes\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "" +"Lonxitude máxida para a orde que podemos usar actualmente: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "" +msgstr "O tamaño do bufer de orde está usando actualmente: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1053,209 +1547,324 @@ msgid "" "run commands; if this is not what you wanted to happen, please type the end-" "of-file keystroke.\n" msgstr "" +"\n" +"A execución de xargs continuará agora, e tentará ler a súa entrada e " +"executar ordes; se non quere que isto aconteza, prema «end-of-file».\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" +"Aviso: %s execuratase cando menos unha vez. Se non quere que isto se " +"produza, prema a combinación de interrupción.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" +"comiña %s non emparellada; por omisión as comiñas son especiais para xargs a " +"menos que use a opción -0." -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dobre" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "simple" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" +"AVISO: hai un caracter NUL na entrada. Non pode pasarse mediante unha lista " +"de argumentos. Desexa usar a opcións --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" -msgstr "liña de argumentos longa de máis" +msgstr "liña de argumento demasaido longa" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Produciuse un fallo ao escribir na entrada estándar" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" +msgstr "produciuse un fallo ao abrir /dev/tty para a súa lectura" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Produciuse un fallo ao escribir na entrada estándar" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1131 #, c-format -msgid "could not create pipe before fork" +msgid "failed to set environment variable %s" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1218 +#, c-format +msgid "could not create pipe before fork" +msgstr "non é posíbel crear unha canalización despois de fork" + +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "erro agardando polo proceso fillo" -#: xargs/xargs.c:1362 -#, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "" +#: xargs/xargs.c:1468 +#, fuzzy, c-format +msgid "WARNING: Lost track of %lu child processes" +msgstr "AVISO: Pista perdida para os %d procesos fillo" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" -msgstr "%s: saíu con estado 255; abortando" +msgstr "%s: saíu co estado 255; abortando" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" -msgstr "%s: parado por sinal %d" +msgstr "%s: parado polo sinal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" -msgstr "%s: terminado por sinal %d" +msgstr "%s: terminado polo sinal %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" -msgstr "%s: número para a opción -%c non válido\n" +msgstr "%s: número non válido para a opción -%c\n" -#: xargs/xargs.c:1476 -#, fuzzy, c-format +#: xargs/xargs.c:1584 +#, c-format msgid "%s: value for -%c option should be >= %ld\n" -msgstr "%s: o valor para a opción -%c ten que ser >= %ld\n" +msgstr "%s: o valor para a opción -%c debería ser >= %ld\n" -#: xargs/xargs.c:1490 -#, fuzzy, c-format +#: xargs/xargs.c:1598 +#, c-format msgid "%s: value for -%c option should be < %ld\n" -msgstr "%s: o valor para a opción -%c ten que ser < %ld\n" +msgstr "%s: o valor para a opción -%c debería ser < %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Uso: %s [-0prtx] [-e[cadea-eof]] [-i[remprazar-cadea]] [-l[máx-liñas]]\n" -" [-n máx-args] [-s máx-cars] [-P máx-procs] [--null] [--eof[=cadea-" -"eof]]\n" -" [--replace[=remprazar-cadea]] [--max-lines[=máx-liñas]] [--" -"interactive]\n" -" [--max-chars=máx-cars] [--verbose] [--exit] [--max-procs=máx-procs]\n" -" [--max-args=máx-args] [--no-run-if-empty] [--version] [--help]\n" -" [comando [argumentos-iniciais]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "non se pode obte-lo directorio actual" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#, fuzzy -#~ msgid "invalid argument %s for %s" -#~ msgstr "argumento %s de `%s' non válido" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#, fuzzy -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "argumento %s de `%s' non válido" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Os argumentos válidos son:" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Erro de sistema descoñecido" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: a opción `%s' é ambigua\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: a opción `--%s' non permite ningún argumento\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: a opción `%c%s' non permite ningún argumento\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: a opción `%s' require un argumento\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: opción `--%s' descoñecida\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: opción `%c%s' descoñecida\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: opción non válida -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: a opción require un argumento -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: a opción `-W %s' é ambigua\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: a opción `-W %s' non permite ningún argumento\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" -#~ msgid "`" -#~ msgstr "`" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" -#~ msgid "'" -#~ msgstr "'" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "O modo %s non é válido cando POSIXLY_CORRECT está activado." + +#~ msgid "cannot get current directory" +#~ msgstr "non se pode obte-lo directorio actual" + +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Construído empregando a versión %s de GNU gnulib\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Uso: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L liñas-max] [-l[liñas-max]] [--max-lines[=liñas-max]]\n" +#~ " [-I str-remprazo] [-i[str-remprazo]] [--replace[=str-remprazo]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-carac] [--max-chars=max-carac]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=ficheiro]\n" +#~ " [--version] [--help] [orde [argumentos-iniciais]]\n" + +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: opcin ilegal -- %c\n" + +#~ msgid "block size" +#~ msgstr "tamao do bloque" #~ msgid "Success" -#~ msgstr "Éxito" +#~ msgstr "xito" #~ msgid "No match" -#~ msgstr "O patrón non encaixa" +#~ msgstr "O patrn non encaixa" #~ msgid "Invalid regular expression" -#~ msgstr "Expresión regular non válida" +#~ msgstr "Expresin regular non vlida" #~ msgid "Invalid collation character" -#~ msgstr "Carácter de ordenación non válido" +#~ msgstr "Carcter de ordenacin non vlido" #~ msgid "Invalid character class name" -#~ msgstr "Nome de clase de caracteres non válido" +#~ msgstr "Nome de clase de caracteres non vlido" #~ msgid "Trailing backslash" #~ msgstr "Barra invertida final" #~ msgid "Invalid back reference" -#~ msgstr "Referencia anterior non válida" +#~ msgstr "Referencia anterior non vlida" #~ msgid "Unmatched [ or [^" #~ msgstr "[ ou [^ desemparellado" @@ -1267,59 +1876,34 @@ msgstr "" #~ msgstr "\\{ desemparellado" #~ msgid "Invalid content of \\{\\}" -#~ msgstr "Contido de \\{\\} non válido" +#~ msgstr "Contido de \\{\\} non vlido" #~ msgid "Invalid range end" -#~ msgstr "Final de rango non válido" - -#~ msgid "Memory exhausted" -#~ msgstr "Memoria esgotada" +#~ msgstr "Final de rango non vlido" #~ msgid "Invalid preceding regular expression" -#~ msgstr "Expresión regular precedente non válida" +#~ msgstr "Expresin regular precedente non vlida" #~ msgid "Premature end of regular expression" -#~ msgstr "Fin prematura da expresión regular" +#~ msgstr "Fin prematura da expresin regular" #~ msgid "Regular expression too big" -#~ msgstr "Expresión regular longa de máis" +#~ msgstr "Expresin regular longa de mis" #~ msgid "Unmatched ) or \\)" #~ msgstr ") ou \\) desemparellado" #~ msgid "No previous regular expression" -#~ msgstr "Non hai unha expresión regular anterior" - -#, fuzzy -#~ msgid "memory exhausted" -#~ msgstr "Memoria esgotada" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "argumento %s de `%s' non válido" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "argumento %s de `%s' non válido" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "lista de argumentos longa de máis" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: opción ilegal -- %c\n" - -#~ msgid "block size" -#~ msgstr "tamaño do bloque" +#~ msgstr "Non hai unha expresin regular anterior" #~ msgid "Predicate List:\n" #~ msgstr "Lista de Predicados:\n" #~ msgid "Eval Tree:\n" -#~ msgstr "Árbore de Evaluación:\n" +#~ msgstr "rbore de Evaluacin:\n" #~ msgid "Optimized Eval Tree:\n" -#~ msgstr "Árbore de Evaluación Optimizado:\n" +#~ msgstr "rbore de Evaluacin Optimizado:\n" #~ msgid "cannot open current directory" #~ msgstr "non se pode abri-lo directorio actual" @@ -1337,7 +1921,7 @@ msgstr "" #~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" #~ msgstr "" #~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#~ "opcións (sempre certas): -daystart -depth -follow --help\n" +#~ "opcins (sempre certas): -daystart -depth -follow --help\n" #~ " -maxdepth NIVEIS -mindepth NIVEIS -mount -noleaf --version -xdev\n" #~ "tests (N pode ser +N ou -N ou N): -amin N -anewer FICHEIRO -atime N -cmin " #~ "N\n" @@ -1346,7 +1930,7 @@ msgstr "" #~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" #~ " -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n" #~ msgstr "" -#~ "accións: -exec COMANDO ; -fprint FICHEIRO -fprint0 FICHEIRO\n" +#~ "accins: -exec COMANDO ; -fprint FICHEIRO -fprint0 FICHEIRO\n" #~ " -fprint FICHEIRO FORMATO ; -ok COMANDO ; -print -print0\n" #~ " -printf FORMATO -prune -ls\n" @@ -1363,20 +1947,20 @@ msgstr "" #~ msgstr "dereita:\n" #~ msgid "Normalized Eval Tree:\n" -#~ msgstr "Árbore de Evaluación Normalizado:\n" +#~ msgstr "rbore de Evaluacin Normalizado:\n" #~ msgid "" #~ "Usage: %s [-d path | --database=path] [--version] [--help]\n" #~ " [-e | --existing] pattern...\n" #~ msgstr "" -#~ "Uso: %s [-d camiño | --database=camiño] [--version] [--help]\n" -#~ " [-e | --existing] patrón...\n" +#~ "Uso: %s [-d camio | --database=camio] [--version] [--help]\n" +#~ " [-e | --existing] patrn...\n" #~ msgid "GNU locate version %s\n" -#~ msgstr "GNU locate versión %s\n" +#~ msgstr "GNU locate versin %s\n" #~ msgid "GNU xargs version %s\n" -#~ msgstr "GNU xargs versión %s\n" +#~ msgstr "GNU xargs versin %s\n" #~ msgid "unmatched %s quote" -#~ msgstr "comiña %s desemparellada" +#~ msgstr "comia %s desemparellada" diff --git a/po/hr.gmo b/po/hr.gmo index 6baa1b711f02ca16212dac1b989061c3e61426f5..f79bccef34f9e741259217f6d4d14e964fe2a9b0 100644 GIT binary patch literal 29150 zcmeI4dyr&Tec!J@7;6w93jyMN1sd%v+MbSLDu1MF&V2jcd*0`Fey{Vp{U0yA@BqX&Vla* zuLb`T_UMFM^kI{RQw<;2(l&|6AZ2!I!va=!$=0sK7p3h>{9YUjHiFQ@Yjt`C8)1KZ#g;Ln30_-XJ4 z@T=g9z!%V|8^KqC+zRdiHI9ctmH!1${d@w{xc>xHzrGKC4!oF7%z|G8U&N%3QTTeU zUqNTp&(om#zYe|{{7q2p|0{42d@eVIOJEcHGWZDCcuf%S7kq|)>gQL$i@~ph>hGU} z>hG@C2Em)bo4{+qHE4HF9d%b{1Na|{{HWPkV5cBpvL_dpy=^= zOpeNpgKGa)fBmx{O$VOgRt2 zMdueV$tS_fK$VNZ6#OVCdU(NXd;hrq9bZv!>%lT>=q1wqgU)t|Sp*qXP`fue(d2EGXVGf@5c zpWtrtUwDlh-z0@D?4}K7Q8Tc5e{qcEF`{9Kw`YiRF0JYv9y3Wn_ z*TILmemo9xe+g>5SKJZ= z?*eZCwf;|m8vi#zSW<8igVTD9gPPA9LD5wLUI2aoyafCZD0=xM$P@%$1g`+U4??QJ zt61zefVY9FrvtJS!G}OS{|fke@cW?3y?Vy=??zDbcn_#`{4mI0@Cp9C0{k|pa?d~J z=;V!{=IJDO75E6K_4@?)Pr)a_yTReDLGarQ;Hw~09K4mu)3|;ggfxTy2CBc8GnsTL zxB={eZ}a#aFyXp+2fQ5ox1jnxbKLcF8N8V5HSn$A+d(~l&IxD@yb^?jgEkn0kAZ6c z!a29zQ=rE2KS1Ss-Mpi}Q=t0sDNy5j)k(*1_k#~|-2oxV;49!8!3%%f(d%B2B@Ht0 zX7ID1*7>{O5PZq0AovLQZtx~>{IpyD7}Wf}4TMC4Ujs!q{~2t7KLDq|hZbCW?*l)< zy#8}gblker=>r>}=<$2to51~d1p!+ySOV4GkAf5lz6P#=yIG{O;ID!z_lkR*+*$x% z&h^FjI{thmsD1iIkY*8L6lF?R4F@KSK#uipjk z;rb)~`d@<@=YIe%1YdYRdjq@_R6DN*HBZ-ruLSQ0uLRdYt;0t_&HtCc*MegYxcj?7 zJ75T2z8C~g zgV%!%@UOs&FW`IA^=rE2_}p1g&))%RAAc59|GxqrApf6&ui^UACC8tqK=o?|yb4?d ze-wN-sQG?B$P@*i1`mQSSPp_aspnQu<9%$!?XPcvEPZe}n-|gza!~#M5~%)s8)VA` zuUd6-W)=JsuCH%9`Eg0d?Yj`9di!J^1#BPFbAH#~`v@p{*5`#Jmc``UBj8&|_0P}v z3rK9_^P61tNxx2dzkk9ojE`#$G%u5+Pm%P|JZSIfbG-wT(eLEDXkDLwjBqa=M^M7oId0n$~Zmyv#jq&@v1(yK_Y#^9$(VC?LKpMOw%@puFH<0SFH1yWAZUejlt^l{P=(uYa!BK&9Cn5NnO9|_tvZmxVOf=Eq&YOUNAOuHf|0F zNtTA$Qg}A%FX!QU(&>cFEFC22Fb>mfeNPyrtuPt5CxiaEaFB)lIMTg5Ow!(PU^)83 zlycoJx$}czvJ?(h5}xPOLD`jP5T471;d+z~;+CpdiF&;_-4pgYag@j5;9QS?D{&a7 ztwy%gSV}r^*pAQTgMQYIC&z-ZQ*kfr55mPEy`=mNd?8obVgQ}|=H+xane~@%RL-cW zG3C=?qZN1JK^!)E{UjYsd0YyQ&7V4Pcp+>o*?q2OkI$4h?Or$*+Q(;^a#{S9zv$%D zz&|TZ6T_629v&uxqHN6chDYX4oH#spG&~qKMy`MIr^2hlM%Jz})Qh!}e)YhWtlugM z*Y6!<R@FB+_9?lqy!VZR@zgOI#&bCC7V9Sn8_p{t)0W&4)d$F$9uBnEhmMF6_i>aVH#a9Srk!((5JZGITe&b48P3 zc-qwxE@gd90F{dhVSWMRCuzrF6sE&&+)tXW z#&Gs%xEMDhdZF#R5;<~!N^KT2$-||k+lCDLaq*b)4C2x#3{rZUBrYW1j zX|{}N`aC0^4yhIPH(FhouVh08x)_HysGF|(XUKWuA(wSmK$$$8oSYQg7~T{HhvBrx zU~?iH`Z=DD1&8~~EMW>`g~K(BC;CRUm7)Yjop#RgFJ@y5ShCn$lL( zhc$~W7tgXqE4i5TnaM%oXw=q#mG|Y@+3)~k=9``vtM51t5O%Yn@o%@*`D9VtG8GT& z%d3LHk*r(t8Tdz%h2sY%_b-i)hZ8Hw@(R=f0W8{hc8_h7o2SDRo|U9AlYX>d8O$S3 zm=odrcyZ?N6T$HlddKGEY(c2()}cY9jFGX(`4o``#EDj zIofK)&7{j_aFiX)XouZ086J(BZ5Cjr*iBK`%kpH9tijcM34~6(%<$@68HZUeA~Tn1 zi21LIYyK^}NFg{DK^Z0}-QKI%ckR*Aumd%;`dJU2maI`?Ij$GYqotS(n`=-*tU*2J zI?NXNn^h!~4F{s3V=+4qA%R@hEVZV?Ks0N-E{CZw+6WQT9d=k)E+FS+$P9MQd@i0t zI!unuOBoP-8f6%{?-?7rhztc)udmR2-iw;?o^a#=9HhgtYY2VBODxedc9Dclt#tL! zaSN@s2rFEK@3EMWg!S3895`l=B^n?KV&n=HvF^PH-GW}LY%V@NLd7Zp{~U+nRnv|Y z6-?G@7-fj+bCPB)<|}8)N@j9r?0QF55(IF+xpMCBp&P8O-<;>` z$86Yi9B3(7hE77rCS1wZMM@&)J{wY4UGU_+Ul9PO{`-cZg0UW)q)n#*BNsll|Q{arST6 z#GnsXk^)fMam<~DQ7vKBhLa~dOem9%2xhlc&uvbSt}!B?`H#>-(q(u}*_vnv<#F@! zA@)ooaJ&EhsskdEZj##q7Mf%p+%9<=-h(Jx###yPKyOLIqfw_5p9_v}QcLq>BNjh4 zRyKD2$H?y!(V)4a2@;p6$@Te8tKq~`xLNTP?Md9jdRJuMK&(uGNuFT75cWwb(GI1; zq0s#)P^rqMAen7JRnjl64(7KRcV}3%qiv0vJiAm{WNK8VlrgtFl3tT&bd9# z0BEruLoG*m>)aVXhRNWhv)$ZALE@Hz&ntmRw;Q(-Ha$WpTGF0s%m?0%n-D{Upqg#z zkw|Ig>2{-Uh9J4ddhGZR%W`Ef=uPk4n@4N#qG)B(8-shH zmpw8?WqF#YO0#f1Uc^vo(j0OaMHhQhRmELMTl27!T^XF-WRghwNio@~PET%=mnDNW z<_Y{?M33NOmIsLxkG^zk%4A;Z7~O=jy{ylRF{&9tfa!xzP|2P!*Dwmki_wjsE~?$6 zX(9SfpX)AW9ds6UZrfO0CG8@X64B;$s7fZ4a^|2Ka#Fq{CGT9gmZ0R&5!omkBm}N6e!$H)JC1*VgDFuk@WzpQOjyQeP!J_MjyQD7dvWm;>=M^>;6BpBx z(m7g~NomLiEDQ(n$&s9eSMEWM<2Z9`23MO z9y~pJ?@ZA|$-ZzPFetNXa2UZ~267ceOG{{H&<@WQ;h1gKal`C*-8ngbdiL()_dIxH z{?w_NBMZ#XR(0OG-jBUjYW@(%X_K_s8MdG*PxL1bFWk0m4SNcTmU3YJ2s&Usu0`3& za+(viM5Z;%r~P;t^}UZOQkrRIdXD4B zb0&~386x_fRN$gk-|@KL&-%fc9A<2y^1em`-ez8X;;4Kp)u^x~z|>&8avo(ffIiskb_ShZx|T}vamZ_|V0`gctjhShM$~S=xA@@Z3D$J$Cms5_^izBAj?|3KkoWE`e+9-7nhPB^E$r!B8MAMz75bKM&qeA99?Ws_H3IjNhs z*^@MLEL0_r+nwsVYuC7IdwQDNRX%7XSyj_vyNO<;96h@*->5G8b_wCcXLX58=9{SG z(84_@XR123DCpr)%kK%qzPn{}E<@%VhMc0tj0Ja^XQv=tBfsh3uEVG1X6J65W_Qe; zIbK%{o95^&_q8dXQgd*QI12^V+lz7;8G{vEZrF#O1r$vnA@c!6j^a>~%FvDB#q1b) z(6s#=*?9?bQ`Hq;zf4N`&|q03`_v3LHe=a!ebO6n{?USsVp=e?7Fl9ycCCf;_wqV{>OXmLUz&&_~2O>pv*j%V*Ao($BY)E6yN zrRkRWoP*lg^rLPcSJYdPMs<+Tj3*!G1Tv}MHI|A>WvjYL_ipmSb|_erj%jeR;P8bV zZNz;#Hlmy|-*Y;o$vF$~M>;Iaa-7P2Pue>^8Qd7#=&1ZO|S8_8@`BWqCw$|EF9Ruvf@VyY} z*xmO2vE}!GIn*RDX){;n`lnvzR6nAxgAQ&ZB^*qC>m@h^4jh*&$+zTNN;8` z;|MEYId+M4;G}g*4$g0lH!MeLDhZQ3z#(XdAu1!f^rud2d4GfXZWrHkwmklx>Y+IN z)ykFAyLz*oJURXY@ z=6#!62g6x(R`$2~#MM=boAw%oOgVOIH)aG|7I4wCs*Qt=RmeNb z&~%pPv``geXUaOt*R+5aYwCbWX$Fc06THWAYKILKe+~)XL3v14P9qTdyrcaFuMJ%4eq>~S; z@+p;ump>^-wesd^fb-CtUge&kYMT$dCLEYIiXOxA-NCyoMcg{BtWq;>$%jpNfm9skGwJs5_AnW4r{VH~kg&%f5Oe@I zZMu8f8!i*!%-ttXg}c$cuW(<(u%W$Ww?l({RBT`NlS}t?gO>DlzpuyN&Nk;`NiADh za*r<-NY(I8a6g6`M>jU*4%0H7LOTVCW9F!XMa=s4hw*MjcW@!sFJTzwDhewzWNZvm zOow*cmBoSPT>FR^zq@RTYF)_7IUPrqyYT-LENC|hH19V?Xe(_Qt7nK6%HIt$C30*k*dv=iQR08 zMUI3JD#O&Y5YOr-1Lye)ib#vin*q5EvD9KNC{Y|AJBz-&^hbdf=@CxMp%kUeTX^-H zyk-siKd1GGn2T^usoIJd+Fms9=FjOk5T@Je{n3RTi?U|Xa#dT4k{G_>xY^u2H zhu1B7JK9h+pujSCtIae>Cw_yPvv_9y7|bJtiPvtznd?&LJdaFH@Z8)x1=i%1F)0i^ z5eZa|uKVy18|R>WsRggHJB}^beqgu2-dq^iFy)lfi9}ghQrK`lxXl!-7dBsmdigWE zPi(`QgYBIwBv%=If;Q-lmc5fz`7z}SNa-uyJhTUJbD}lZ7FtEe`*cRXyIKvcpkt(_xiR8=)6qed*9ZcO%Q@Sr4jzasVuCqQ z_aS{6gXf+)zk=1(O>aU4%-5s7M9!s)b|Tp&-@uX!JE)CNEpApI#E8swET;qYJM%?u zEZxWNP<6OGWZqyq_yfd;?w8(MQu9cb9n6y|x9ACXC=)An9uHbI7iRsUG7!w*R#>_G z6jT+InqVc2A{Gu8kavPpK3Bi)0Jva<3YEB5{|}b7jqdcf>kuvhuhm|6C!Ie@JRJL z4#N_%o9sz#&bJw%R*_-(xpG>yb7K^@im06;PR8ALY)TYb(+ei3sXQrQKjKQ?EZ6BJ z_Q-lH{aF0LqNK`9uKi>nHnQm~vuJiiKPc2d9gVn%87C>rfsUyEC;Qndrx=adR^v|R z51%$>Vgak+fyrwouk}H#jT1TIt#J#Xt&N3j+D;e9XmO{&^Q8_OTBCyWvfkx z`=|CDXiQz(*mr%nZ{PI(YpRpO7!6k`4wT3?>OrYWRknDp{ z&z^cTk&i#j*Rs_Rht`J6fWZr)Pz)P%5y2g`QRLTfpC&Ysu@9eqobCMdlZ2}bU^HEh zc)KCGgidF}Z#?o?yC1FUECZ?Ej=%B9uY?n*9J|AI)|JW0;tY{|y>4AB-g3AMwl1!Vc1#MPPGp6{ zo=O*RjXZ{9pQoxb?au1(sYi#a1P0rXhoa<$$k&P*?aNf?W$>p#whTGd_+PIL#+$VxM z!B#+vcLUpq#0QYLE`FMG-Xek;4!|sQS;dt2*8#{*q}7sdMAQ;a$evBYMI=Xv*Ym0O zMbH%51EJKM32%3QtxpjJ1+dSbdNgH9aw5whAkFjEplbLsjED0AA|phxOtb}6v)t{Z z6?GX0Y%ospUSHhIwdkl%fz>YLc_XqWI*eu0K&K&sZD)XpYW6|gg3dS+GHSL!Z4_1c zz@YYeNcA&hJx@&aX$B5~up>R|i{wnG0;|im&9cn39wU1Wy**>*=%;qhS{BTqU}eig z#x+=j*2Jg1mCW*sTbDWVNHm$afkLDG?5X#~;t2&4rXywMtf);@q{AZ5u%4$7485#p zDm@2O2)$&bq>Rb3x*fBYgh4S+7{Temu*cF%6lj-g3d(rwwFL4N=@2rs8Y9}a$!y!q z!m-t#vEY^w*5WpT20|PO?m=0z~c7)g%e0l@P)k=|IZOCuf zSw&OR+%HC}h?t0|ZPb3KW^_0CxNRqc3T_^ZbbMmqG9Z!M0MAn zONlv`Ui^JT0Tg^VxHn1(?(Exs zM(v?RKLN{r$p$-oVgS9P% z+{qJ(aQerlVQ;n8Pymo2;`C)hf89z5<|+kiVr{U`rTa(>4%y2@%ZXvSSoFW&28m4n zTWJu6gdX&+Vt7UtyjWnPbL*Z|Es29VUx3X&Vn)JvyZL9aP;JE3DuqQf1_wp1*#lkH zSEik@pgkB(BAYM|2}>_VNV}$KBl9d!+iYbCzVn8r--#qrZHn2oGf7l>X~IxE)FSa@ zyqmbGXO}U0);S@Qv0%Qn3}RFwU$)n=s&3UR4MY^?uu}z0#T7G0Sh7x#I12Y7>@`9B zJMvDW;B=vasTR!ANHIPtT+lyupn0 z6qPt;jJ>a&SnS`OsD7LU;usamUd$^2I{7!-p z(+E{h5%0r2WB7GU-H#i+4A;SVP5j{WthWhEN@cD$SwEHWL+pBCL)P;%``9<^4>4&e z&!!JVd5=RqZ3f0Ns$5Vb`|If^p$c4yM2s*C5P|V1Gmp{DWh`SMnx?JMjViJz4W|~zLM;P)*U~?G3IXT*_O6+gZ|;H7Hj)kvLB& zq^w^RZ^CL80pstI=SRcfj>6lyEMGF+S*#U8L6MB~Qd(Y=ZY_s&>u;ZR)Fcq$(0&!* zu1>WHYG-{}8olC=KE4u4I>F&s#BIwnqAJ+^8LK!Iw=y@;Wm8g^N1K9U)_AD*t;v|8 z5A$Y^IPJ5qx6olCY)B4?UC8@Z%Vl${yBSI)+rowyMLH%vR9HLpi4HIjh69aUul;Pc zhBn2z2d7*}yC~4RoFF|Wap+tp&R8m{8J0#B$Dz0FaV|qL%S&h*91Wy$2x8j8{BSGD zZGmcDxG}|-;GT~C(N4y3G|UX;1^W!+0bRyLv!6D%fG7h099}FjSp*h(8BD1%k7Kh& zwwT9a3DV1Dzu{LXJS&BS+uvNgh#Xq~qWo<9}FlpNdx0?lDIAbH; z{&u3W3^m8psW+mdRz;$pH^{wSps_j3-KiIfu2!7;NLE7FJmIJbDGv%qKjd$!$p4Rb zXA+)uy!)M}PA?q(>j%6KH=wR|5$}#tQ28a~UYrijoSeUR{?yFe?K9IB@ovf{dzkIX z_QJ!&9+uuZWQ!Jd(lXqE{e^;q;w$gbu-G;%H~DTyWO16Bpi7v4!@Q`@KOxyO^t5-= zNaJi7^Ms*>IpJm21dgtJAiZ$2r>ov?uV$J4S9i1`=p`FC^mJkGTgzbTYZ}C9#FLD7 zwW2jxCa;f}KaAH=YBS_o+PM@0c-wN@>aMOqI*iJ}L?b?=92x^BXaLtnAz@&c-fg1I z#){(i6Hm(RfJd(1tnJTp7CF!9itVSkIGjq##1>j96GCpzbz0dn@{wQ1k-dwjf#s6c zoV0M#R2;iH!eQmjnMuBCG0~fc93pX$=k%;z)`cj<4uaj% zhXuwfS4ZnmXn9fz>?c$vgAbS4hHl~G>0-;nT-oit{6E@ik7DOyh; zyBQQ%Zs{1o$c=d!8Ieq!4IQl&W{*s0zjn^sh@7c9!MYeHbm$h2?~og;Rc|HS%Os#% zQ>iwJm?3;WwSxoGd?0NtCdV!D2C?+`8Bh!qDeqXQ3zj$GQj3#s9d(iN&<6&iPOjY# zQHa!8#MW?Gp1F45{JQ?B)}#KgC{!wGF7U}VzO*sUf=u7EZnC^~QsLs}6*g~&7u1I* zY>j$liQ17P6YKS7?N^-<$_Pt26o6uhIp%AC4l>xj4(ai>)y-3=%$k1=dGLn?1%F@z z*zuK*n%`KI`NtNLtI_=7g$_hit)H2wEbP?_+3n>$maxUyC>x=?g?;q&lTuA<+1y!* zZo(}Hl5odxG+t@&v}4DqwW&tH;~yxUx@jagvns(;yoLwUBEFe*>x6U01U5@_32k!N zP6Fq+-d<4*+<~eZl(&$RUeUH!bfq~lfYB^$6(fJsdbWMU-Xq+eb;Cl52T@Vp_zf$f zMa8=-QxrbAEMF5;E?0alD|P5l!QGZ}uHbv=)Ea8cD`LKn>kBl)bVi=f; zX3jKsZs|;3)sV}$*!(!z=yHr@=XjQZ(>C(%R@VBwqm_9Nxen|grNU9ZeI_4_|BRUw zkiT7~^7y5U$!DZ~d7$JPL9EHS2subG-ee5Q)Hgyjsum?$IT*M*ASjAryJ!7WuHVws ztcT{Cm0%^bf{=LO32{-}UYXSdYk|t=b?dK~eXUpVy`IrlYRip-?u52HF7fN)STJ

    KHs?PF4H280s3o%FQ)Tn(b-=f0v~%9JWNVlgz*rmtpe5GK z^ov14#zY>OalPYE(ek|qgfJK#X!+*0>5`Y0UJh9_J`EK|@8xXD3XwC9(+n9ra06Tz zwE;?n*{(azbS@d456rI>EQho;G~WmVk?l@&Mw%;2m2K{%z!XO=5)obv;|s?&T&jm}c5~yMW4z#M7u5X1R2EXib2GzpFF}xS?ykl=t($*YRhdSzU`(>HJtaPg% zPK?Cu?~tpC+fTxY9sxW(nw19?9T1721Lb%y^s)Q2T*U6PWtL&@>?x)IjYPe2Juc(Y zC&Jl#i_m?2^O5`REB`HSA5_@Bza(m3H+<-eyP4UoG7qO&^)h>0fxziIG5}1tn9^a6 zP@Oa~5Ov))g|RR+0GyYrIet}dq)!aj$Rpn;?~^g+XBoXOIpAUiHdi2L3VztCc`biO z$CcKNa+Y?A-amEt-q|^#$_eRq(fj3%zwPLKB<-3`|H6$HnuQKAiPUc!omD~ni~JBs zVv$;Itq}((%CHzS6uh2M?4WY5RL)l7OGlkelL7N#zXb<3vttPqL_)jJZ?`-NTvQPh zI_KGet?$)ydlcNSt-f7!e-(^{fP}daFW+P~!?_}|%18KD`OY8ZZ+7&iFn^*1i`smY z{~2uI!-ST(Aph!WON@W{$c6a3%c8PP5&lKq?F0Oar!Ky~7*1e=7NxIw`_yk!ljJa@ z%9W*1e>+{Q-K@znNhoQdRSC{6xrgmgu=x?GPMdhY$?v|DndUZ1eWQd|M?xeuAL+la>4IIEVQWrMXDFf@{PSo_`k{G5qp=`p5Y|`nj4+g zQTgg5H@rZ8Wf{KieE{OjFyt7mp1?Y#_LnaN)E5{I>`yD0l=5U{sFM{V>3ZJ6ozPNk zcC6kP6FbPb6q{O&*fV9$EYu};tmxhVP=AbT4MzvHjdnxFB#)%MnBp$G&&K1p9)^#+ zV%&*1&hh@15&A1OP{ALWYu*Q7KDW)qHrw7}8p&N9u-lsfG+%f&%y-3pcIOCtirK)^ z4(}dzR~6Wa-yzUMgIrMc7Xr9q z2o`{ddaghTnReJJ{IG5(Y5_jCdl3MhK}aaXTJ(+l5QDiKP1eX0<@YV&KkP=HDSm)B z=1S8XUB%jP{InQOcJ&7yMD-~%cRb4)%wDZvi*#>rE&!xM+^4xaUo z=(=BsEPg{5Er(yw-F#24Srk7SWMPaL@}rTS}uaJ_X3OmQHkp3)7-oBdRhD)^|1cq2s$g%FPn0J%TI=doR>2L`rT5( z7WF$*+~KVnCXpY7WU5N)4B2z~rBhx@V^-aJV@%60^sjG!&tV!?CxQaBv z)N~>`n{-iad{eyPQ~WA~e*VpV55m3F#guXwYh_OBhq7up7x|HA`mY7$jk8*I-Wjq2 zMw{@`f;(_f{%pdNeGDA?)q>#QO7$S+?VkP+p~`ia{w;`awZU;6`n?_L!&lk*aI{i_ zPwyynq(Bm>5D}PMHd?Wb1JTdWI>~ML$oZ^m871e-g(%T(~ zKpZ3HGTjn-U6H%uRQ<`Uxjj7FD~R3KrEmxLlVOt5a>dph&ekU}U%6MDT~O93$5b^4 z=}OEAf95wKpapqTcuEy%D^G~XUGcWih>y1=ntKEGh0hSecfp?p4V&Le2ce2a!Qp68 zq9P>c(2n@wZvxc3wp1tnG+OP7FIN5_YLOG{yp`pIxVy8S#8oyIt!m|pmYD=|-`YSE mw^#`GLa|7UobU7}>>Mk}@yKa!+|>&Lqh)=WE-zcL&;Bpv+Eujx literal 2388 zcmZ{l%WoVt9LEhUk8XLjP#)#=D`Hzg((lh2vs=328p53VD^5GX~H3(ySCw}r|6ITjpo z;|oV1?!x5!W`lF&^Wt$Y<{iy1A?^fGx@K@)L_1KWePOJsbV7sc6ijMWPVEF+ebQTo z*EdbIL7`Gr9jLdwe45n2`O4U|5i)k9a+8p)i-GpE?mWqMOs=eqv#mxXRIV)da`1o7 z&k!Q(bUKW)^gIdW)4I^MqTEO1wtaTNKl8M+Ag|f+FGf~%rNL)S0 zwa|8Cyt9pEgIcg%*wjrHdP~Pbdyj-RmEnAw<#yO(G2SqFLZx@H4nfRHB7+$t+UupJ zwRU`BzCI6otsPFlD|W+TS8tUbR#3gUg01tM=2}o_EYG(gpO_eDI5AWhXd~L)3XKQn z%0N=mEWSjqt2(dn9yAWrS#s-yVjUCzm0ZNsq;pKL0~D~fnRT01Y$|WD(x=*b9lO*b z@q~1U73cmYC%?A{&ZtloB?fAh8F2<}mcHWM5G(RhBHz%Si_xcbW0Sfvd7!0ExASc4 zsxI*z%F7`&iF~0>gIsle8q}$rOP)(@-Elr`U3q;~p7&aDmhwfEs!zSB+m+F>>~<+S z)n8sY8Fixwg7T^!8TL4ri+VCzlD!^9y?(TGlAlrQRTV0^>Xi+-s+{lBML$B!^qR?n ziRsLSZGN2F(uIlx2XPiUHmy~v<*HUipU!)SfRv>(xyx{g#ws>Lbq?Qnz17+93;8~6 z_}1l1moF@e(d|U7^UhYd6mk_`SRXfet9qu)m9eKO-cUa1>NyjfTv=H@C3_2D4tZUB zdBMgmX%1~g4ot;Yb=nOKM5e946|-i5=(d%kpr)+=J54hvoi*E)8mR&X`ed~UrN^tK z0nU)d3atQX)!Y>(?O?2Gbdym&)HiyWbc7oMxS=7SMkp19`A2RFh5M(II#oNF5~V9~ zp{F-MRf|2933QOcr8R}-o@Y1$VHH#d3n^Ggl*MD@Lgnks2$#9sY!eO`UPd}M8K>6t zh}7%tjCBp|=uBDUY89bROgA7m@@A+DJ>6HlpA7ZR&`f&y-NA&<-FMhGMO{7{hk(m-AsgP9@CANn;v9s!0T;(zT3yB(ZUc(B1N|QzN??$qh Rh~m~fYa|&OiJCQ%e*kh-j*tKV diff --git a/po/hr.po b/po/hr.po index b8603a0..09a7667 100644 --- a/po/hr.po +++ b/po/hr.po @@ -1,77 +1,124 @@ # Translation of GNU findutils. -# Copyright (C) 2002, 2010 Free Software Foundation, Inc. +# Copyright (C) 2002, 2012 Free Software Foundation, Inc. +# This file is distributed under the same license as the findutils package. # Hrvoje Niksic , 2002. +# Tomislav Krznar , 2012. # msgid "" msgstr "" -"Project-Id-Version: findutils 4.1.7\n" +"Project-Id-Version: findutils 4.5.7\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2002-04-22 02:04+02:00\n" -"Last-Translator: Hrvoje Niksic \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2012-04-16 02:19+0200\n" +"Last-Translator: Tomislav Krznar \n" "Language-Team: Croatian \n" "Language: hr\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-2\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "nisam uspio vratiti radni direktorij nakon traženja %s" + +#: find/exec.c:256 #, c-format -msgid "Failed initialise shared-file hash table" -msgstr "" +msgid "Cannot close standard input" +msgstr "Ne mogu zatvoriti standardni ulaz" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Nisam uspio promijeniti direktorij" -#: find/find.c:205 +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "ne mogu razdvojiti" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "greÅ¡ka pri čekanju na %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s je zavrÅ¡en signalom %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Nisam uspio inicijalizirati tablicu rasprÅ¡ivanja dijeljenih datoteka" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 #, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "provjera zdravlja funkcije fnmatch() biblioteke nije uspjela." + +#: find/find.c:263 +#, c-format msgid "cannot stat current directory" -msgstr "ne mogu saznati trenutni direktorij" +msgstr "ne mogu izvrÅ¡iti stat trenutnog direktorija" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "" +msgstr "Ne mogu čitati popis montiranih uređaja." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "" +msgstr "UPOZORENJE: datotečni sustav %s je nedavno odmontiran." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "" +msgstr "UPOZORENJE: datotečni sustav %s je nedavno montiran." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" +"%s%s se promijenio tijekom izvrÅ¡avanja %s (stari broj uređaja %ld, novi broj " +"uređaja %ld, vrsta datotečnog sustava je %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" +"%s%s se promijenio tijekom izvrÅ¡avanja %s (stari broj indeksnog čvora " +"%, novi broj indeksnog čvora %, vrsta datotečnog sustava " +"je %s) [ref %ld]" -#: find/find.c:693 -#, fuzzy, c-format +#: find/find.c:752 +#, c-format msgid "failed to return to parent directory" -msgstr "ne mogu saznati trenutni direktorij" +msgstr "nisam se uspio vratiti u gornji direktorij" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "" +msgstr "Nisam uspio sigurno promijeniti direktorij u %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" +"Simbolička veza %s je dio petlje u hijerarhiji direktorija; već smo " +"posjetili direktorij na koji ona pokazuje." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -80,14 +127,21 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" +"Uočena petlja datotečnog sustava; %s ima isti broj uređaja i indeksni čvor " +"kao direktorij %d razinu iznad u hijerarhiji datotečnog sustava" msgstr[1] "" +"Uočena petlja datotečnog sustava; %s ima isti broj uređaja i indeksni čvor " +"kao direktorij %d razine iznad u hijerarhiji datotečnog sustava" +msgstr[2] "" +"Uočena petlja datotečnog sustava; %s ima isti broj uređaja i indeksni čvor " +"kao direktorij %d razina iznad u hijerarhiji datotečnog sustava" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "" +msgstr "upozorenje: ne slijedim simboličku vezu %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -96,13 +150,18 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" +"UPOZORENJE: Broj čvrstih veza za %s je netočan (vidio sam samo st_nlink=" +"% ali već smo vidjeli % poddirektorija): ovo može biti " +"greÅ¡ka u upravljačkom programu vaÅ¡eg datotečnog sustava. Automatski " +"uključujem opciju -noleaf programa find. PrijaÅ¡nji rezultati možda nisu " +"uspjeli uključiti direktorije koje je trebalo pretražiti." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "" +msgstr "Ne mogu čitati popis montiranih datotečnih sustava" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "nepoznat" @@ -111,31 +170,41 @@ msgstr "nepoznat" msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" +"Uočena je petlja datotečnog sustava; %s je dio iste petlje datotečnog " +"sustava kao %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "" +msgstr "UPOZORENJE: datoteka %s izgleda kao da ima mod 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "" +msgstr "ne mogu tražiti %s" -#: find/ftsfind.c:599 -#, fuzzy, c-format +#: find/ftsfind.c:609 +#, c-format msgid "failed to restore working directory after searching %s" -msgstr "ne mogu saznati trenutni direktorij" +msgstr "nisam uspio vratiti radni direktorij nakon traženja %s" -#: find/parser.c:471 -#, c-format +#: find/ftsfind.c:677 +#, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Nisam uspio inicijalizirati tablicu rasprÅ¡ivanja dijeljenih datoteka" + +#: find/parser.c:452 +#, fuzzy, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" +"Radnja -delete automatski uključuje -depth, ali -prune ne radi niÅ¡ta kad je " +"važeći -depth. Ako svejedno želite nastaviti, eksplicitno navedite opciju -" +"depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -143,61 +212,61 @@ msgid "" "as those specified after it). Please specify options before other " "arguments.\n" msgstr "" +"upozorenje: naveli ste opciju %s nakon neopcijskog argumenta %s, ali opcije " +"nisu pozicijske (%s utječe na testove navedene prije, kao i na one navedene " +"nakon nje). Molim navedite opcije prije ostalih argumenata.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" +"upozorenje: opcija -d je zastarjela; molim koristite -depth koja odgovara " +"POSIX standardu." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" +"%s nije ime postojeće grupe i ne izgleda kao numerički grupni ID jer ima " +"neočekivani sufiks %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" -msgstr "" +msgstr "%s nije ime postojeće grupe" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" -msgstr "" +msgstr "argument opcije -group je prazan, treba biti ime grupe" -#: find/parser.c:1227 -#, fuzzy +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" -"podrazumijevana staza je trenutni direktorij; podrazumijevan izraz je -" -"print\n" -"izrazi se mogu sastojati od:\n" -"operatora (po opadajuæem prioritetu; -and je implicitan gdje drugi\n" -"nisu navedeni):\n" -" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +"\n" +"uobičajena putanja je trenutni direktorij; uobičajeni izraz je -print\n" +"izraz može sadržavati operatore, opcije, testove i radnje:\n" -#: find/parser.c:1230 -#, fuzzy +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"podrazumijevana staza je trenutni direktorij; podrazumijevan izraz je -" -"print\n" -"izrazi se mogu sastojati od:\n" -"operatora (po opadajuæem prioritetu; -and je implicitan gdje drugi\n" -"nisu navedeni):\n" -" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +"operatori (po opadajućem prioritetu; -and je implicitan gdje niÅ¡ta nije " +"zadano):\n" +" ( IZR ) ! IZR -not IZR IZR1 -a IZR2 IZR1 -and IZR2\n" +" IZR1 -o IZR2 IZR1 -or IZR2 IZR1 , IZR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -205,9 +274,13 @@ msgid "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" +"pozicijske opcije (uvijek istinite): -daystart -follow -regextype\n" +"\n" +"normalne opcije (uvijek istinite, navedene prije ostalih izraza):\n" +" -depth --help -maxdepth RAZINE -mindepth RAZINE -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 -#, fuzzy +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -215,27 +288,32 @@ msgid "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" -" -cnewer SPIS -ctime N -empty -false -fstype TIP -gid N -group IME\n" -" -ilname UZORAK -iname UZORAK -inum N -ipath UZORAK -iregex UZORAK\n" -" -links N -lname UZORAK -mmin N -mtime N -name UZORAK -newer SPIS\n" +"testovi (N može biti +N, -N ili N): -amin N -anewer DATOTEKA -atime N -cmin " +"N\n" +" -cnewer DATOTEKA -ctime N -empty -false -fstype VRSTA -gid N -group " +"IME\n" +" -ilname UZORAK -iname UZORAK -inum N -iwholename UZORAK -iregex " +"UZORAK\n" +" -links N -lname UZORAK -mmin N -mtime N -name UZORAK -newer DATOTEKA" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" " -nouser -nogroup -path UZORAK -perm [+-]MOD -regex UZORAK\n" -" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user IME\n" -" -xtype [bcdpfls]\n" +" -readable -writable -executable\n" +" -wholename UZORAK -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user IME -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" -msgstr "" +msgstr " -context KONTEKST\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -243,20 +321,28 @@ msgid "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" +"\n" +"radnje: -delete -print0 -printf OBLIK -fprintf DATOTEKA OBLIK -print\n" +" -fprint0 DATOTEKA -fprint DATOTEKA -ls -fls DATOTEKA -prune -quit\n" +" -exec NAREDBA ; -exec NAREDBA {} + -ok NAREDBA ;\n" +" -execdir NAREDBA ; -execdir NAREDBA {} + -okdir NAREDBA ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" +"Prijavite (i pratite tijek ispravljanja) greÅ¡ke na findutils stranici za\n" +"prijavu greÅ¡aka http://savannah.gnu.org/ ili, ako nemate pristup webu,\n" +"slanjem e-poÅ¡te na ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." -msgstr "" +msgstr "provjera zdravlja funkcije fnmatch() biblioteke nije uspjela." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -265,557 +351,904 @@ msgid "" "perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " "use 'find ... -print0 | grep -FzZ %s'." msgstr "" +"upozorenje: Unix imena datoteka obično se sadrže kose crte (iako putanje " +"sadrže). To znači da će „%s %s” vjerojatno uvijek vraćati netočan rezultat " +"na ovom sustavu. Možda će test „-wholename” ili „-samefile” biti " +"korisniji. Alternativno, ako koristite GNU grep, možete koristiti „find ... " +"-print0 | grep -FzZ %s”." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" -msgstr "" +msgstr "Očekivao sam pozitivni dekadski cjelobrojni argument za %s, dobio %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." -msgstr "" +msgstr "Sustav ne pruža način kako saznati vremena rođenja datoteke." -#: find/parser.c:1638 -#, fuzzy, c-format +#: find/parser.c:1633 +#, c-format msgid "The %s test needs an argument" -msgstr "%s: opcija `%s' tra~i argument\n" +msgstr "Test %s treba argument" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" -msgstr "" +msgstr "Ne mogu otkriti kako interpretirati %s kao datum ili vrijeme" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "" +msgstr "Ne mogu saznati vrijeme rođenja datoteke %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "" +msgstr "upozorenje: -%s %s neće pronaći niÅ¡ta jer zavrÅ¡ava s /." -#: find/parser.c:1956 +#: find/parser.c:1992 #, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 -#, fuzzy, c-format msgid "invalid mode %s" -msgstr "neispravan mod `%s'" +msgstr "neispravan mod „%s”" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" +"upozorenje: naveli ste uzorak moda %s (Å¡to je ekvivalentno /000). Značenje -" +"perm /000 je promijenjeno da bude u skladu s -perm -000; odnosno, umjesto da " +"ne nađe nijednu datoteku, sad nalazi sve datoteke." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "neispravan prazan argument -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "neispravan -size tip `%c'" +msgstr "neispravna -size vrsta „%c”" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "neispravan argument `%s' `%s'-u" +msgstr "Neispravan argument „%s%c” opcije -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" +"Opcija -show-control-chars prihvaća jedan argument koji mora biti „literal” " +"ili „safe”" -#: find/parser.c:2630 -#, fuzzy, c-format +#: find/parser.c:2566 +#, c-format msgid "Invalid argument %s to -used" -msgstr "neispravan argument `%s' `%s'-u" +msgstr "Neispravan argument %s opcije -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" -msgstr "" +msgstr "%s nije ime poznatog korisnika" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" -msgstr "" +msgstr "Argument opcije -user ne smije biti prazan" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " -msgstr "" +msgstr "Omogućene značajke: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "" +msgstr "neispravan predikat -context: SELinux nije omogućen." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" -msgstr "" +msgstr "Argument opcije -type smije sadržavati samo jedno slovo" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 -#, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "upozorenje: nepoznati escape `\\%c'" - -#: find/parser.c:3032 +#: find/parser.c:2820 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2831 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "upozorenje: nepoznata format direktiva `%%%c'" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2842 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3260 +#: find/parser.c:2849 #, c-format +msgid "Unknown argument to -type: %c" +msgstr "Nepoznat argument opcije -type: %c" + +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" +"Trenutni direktorij je uključen u PATH varijablu okoline, Å¡to je nesigurno u " +"kombinaciji s radnjom %s programa find. Molim uklonite trenutni direktorij " +"iz vaÅ¡e $PATH (odnosno, uklonite „.” ili vodeće/prateće dvotočke)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove that " "entry from $PATH" msgstr "" +"Relativna putanja %s je uključena u varijablu okoline PATH, Å¡to je nesigurno " +"u kombinaciji s radnjom %s programa find. Molim uklonite tu stavku iz $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" +"Ne smijete koristiti {} unutar imena pomoćnog alata opcija -execdir i -okdir " +"jer je to potencijalni sigurnosni problem." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "" +msgstr "Samo jedna pojava {} je podržana uz -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 -#, fuzzy, c-format +#: find/parser.c:3100 +#, c-format msgid "The environment is too large for exec()." -msgstr "okoli¹ je prevelik za exec" +msgstr "Okolina je prevelika za exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" -msgstr "" +msgstr "aritmetički preljev pri pretvaranju %s dana u sekunde" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" -msgstr "" +msgstr "aritmetički preljev pri pokuÅ¡aju računanja kraja danaÅ¡njeg dana" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" -msgstr "" +msgstr "standardni izlaz greÅ¡aka" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "" +msgstr "standardni izlaz" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "" - -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "ne mogu saznati trenutni direktorij" +msgstr "ne mogu ukloniti %s" -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "" +msgstr "UPOZORENJE: ne mogu odrediti vrijeme stvaranja datoteke %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Nisam uspio pisati na standardni izlaz" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "" +msgid "getfilecon failed: %s" +msgstr "getfilecon nije uspio: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" +msgid "warning: escape `\\' followed by nothing at all" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "ne mogu se forkati" +msgid "warning: unrecognized escape `\\%c'" +msgstr "upozorenje: nepoznati izlaz „\\%c”" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "gre¹ka pri èekanju na %s" +msgid "error: %s at end of format string" +msgstr "greÅ¡ka: %s na kraju znakovnog niza oblika" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s terminiran signalom %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "greÅ¡ka: propis oblika „%%%c” je rezerviran za buduću uporabu" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "upozorenje: nepoznat propis oblika „%%%c”" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "neispravan izraz" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" +"neispravan izraz; koristili ste binarni operator „%s” na početku izraza." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "" +msgstr "očekujem izraz između „%s” i „)”" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" -msgstr "" +msgstr "očekujem izraz nakon „%s”" -#: find/tree.c:161 -#, fuzzy, c-format +#: find/tree.c:166 +#, c-format msgid "invalid expression; you have too many ')'" -msgstr "neispravan izraz" +msgstr "neispravan izraz; imate previÅ¡e „)”" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" +"neispravan izraz; očekujem „)”, ali je nisam naÅ¡ao. Možda trebate dodatni " +"predikat nakon „%s”" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." -msgstr "" +msgstr "neispravan izraz; prazne zagrade nisu dozvoljene." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." -msgstr "" +msgstr "neispravan izraz; očekivao sam „)”, ali je nisam naÅ¡ao." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" -msgstr "oops -- neispravan tip izraza!" +msgstr "oops -- neispravna vrsta izraza!" -#: find/tree.c:276 -#, fuzzy, c-format +#: find/tree.c:281 +#, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "oops -- neispravan tip izraza!" +msgstr "oops -- neispravna vrsta izraza (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 -#, fuzzy, c-format +#: find/tree.c:1294 +#, c-format msgid "paths must precede expression: %s" -msgstr "staze moraju biti navedene prije izraza" +msgstr "putanje moraju biti navedene prije izraza: %s" -#: find/tree.c:1297 -#, fuzzy, c-format +#: find/tree.c:1303 +#, c-format msgid "unknown predicate `%s'" -msgstr "neispravan predikat `%s'" +msgstr "nepoznat predikat „%s”" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" -msgstr "neispravan predikat `%s'" +msgstr "neispravan predikat „%s”" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" -msgstr "neispravan argument `%s' `%s'-u" +msgstr "neispravan argument „%s” za „%s”" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" -msgstr "nedostaje argument `%s'-u" +msgstr "nedostaje argument za „%s”" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "" +msgstr "imate previÅ¡e „)”" -#: find/tree.c:1412 -#, fuzzy, c-format +#: find/tree.c:1418 +#, c-format msgid "unexpected extra predicate '%s'" -msgstr "neispravan predikat `%s'" +msgstr "neočekivani viÅ¡ak predikata „%s”" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" -msgstr "" +msgstr "neočekivani predikat viÅ¡ka" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" -msgstr "oops -- neispravno podrazumijevano ubacivanje and-a!" +msgstr "oops -- neispravno zadano ubacivanje operacije and!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " -msgstr "" +msgstr "Uporaba: %s [-H] [-L] [-P] [-Orazina] [-D " -#: find/util.c:173 -#, fuzzy, c-format +#: find/util.c:177 +#, c-format msgid "] [path...] [expression]\n" -msgstr "Uporaba: %s [staza...] [izraz]\n" +msgstr "] [putanja...] [izraz]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" -msgstr "ne mogu saznati trenutni direktorij" +msgstr "nisam se uspio vratiti u gornji direktorij" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" -msgstr "ne mogu saznati trenutni direktorij" +msgstr "nisam se uspio vratiti u gornji direktorij" -#: find/util.c:816 -#, fuzzy, c-format +#: find/util.c:824 +#, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "upozorenje: nepoznati escape `\\%c'" +msgstr "Zanemarujem neprepoznatu debug zastavicu %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." -msgstr "" +msgstr "Prazan argument opcije -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "" +msgstr "Nakon opcije -O mora odmah slijediti dekadski cijeli broj" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" -msgstr "" +msgstr "Molim navedite dekadski broj odmah nakon -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" -msgstr "" +msgstr "Neispravna razina optimizacije %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" +"Razina optimizacije %lu je prevelika. Ako želite naći datoteke vrlo brzo, " +"razmislite o GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" +"Varijabla okoline FIND_BLOCK_SIZE nije podržana, na veličinu bloka jedino " +"utječe varijabla okoline POSIXLY_CORRECT" + +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "neispravan argument „%s” za „%s”" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "dvosmislen argument %s za `%s'" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Valjani argumenti su:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" -#: lib/buildcmd.c:171 +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "greÅ¡ka pisanja" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Nepoznata sistemska gre~ka" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: opcija `%s' je dvosmislena\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: uz opciju `--%s' ne ide argument\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: uz opciju `%c%s' ne ide argument\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: opcija tra~i argument -- %c\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: nepoznata opcija `--%s'\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: nepoznata opcija `%c%s'\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: neispravna opcija -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: opcija tra~i argument -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: opcija `-W %s' je dvosmislena\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: opcija `-W %s' ne dopu~ta argument\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: opcija tra~i argument -- %c\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "nisam se uspio vratiti u gornji direktorij" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "nisam se uspio vratiti u gornji direktorij" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[dDyY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +#, fuzzy +msgid "memory exhausted" +msgstr "Memorija iscrpljena" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "neispravan argument „%s” za „%s”" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "neispravan argument „%s” za „%s”" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "popis argumenata predugačak" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" -msgstr "naredba predugaèka" +msgstr "naredba predugačka" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" -msgstr "" +msgstr "ne mogu pozvati exec() zbog ograničenja veličine argumenta" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -"ne mo¾e stati u jedan argument unutar ogranièenja na duljinu liste argumenata" +"ne može stati u nijedan argument unutar granica veličine popisa argumenata" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" -msgstr "popis argumenata predugaèak" +msgstr "popis argumenata predugačak" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" +msgstr "Varijabla okoline %s nije postavljena u ispravan dekadski broj" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." msgstr "" -#: lib/findutils-version.c:60 +#: lib/findutils-version.c:55 msgid "Eric B. Decker" -msgstr "" +msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" -msgstr "" +msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" -msgstr "" +msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU find verzija %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "Nisam uspio pisati na standardni izlaz" + +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Nepoznata vrsta regularnog izraza %s; ispravne vrste su %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" -msgstr "" +msgstr "Neočekivan sufiks %s na %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" -msgstr "" +msgstr "Očekujem cijeli broj: %s" -#: lib/regextype.c:107 +#: locate/code.c:131 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 -#, fuzzy, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" -msgstr "Uporaba: %s most_common_bigrams < lista > kodirana_lista\n" +msgstr "" +"Uporaba: %s [--version | --help]\n" +"ili %s most_common_bigrams < popis-datoteka > locate-database\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 -#, fuzzy +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" "\n" -"Prijavljujte gre¹ke na adresu ." - -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" +"Prijavite greÅ¡ke na .\n" -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" -msgstr "" +msgstr "Uporaba: %s [ -0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." -msgstr "" +msgstr "Morate navesti sigurnosnu razinu kao dekadski cijeli broj." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." -msgstr "" +msgstr "Sigurnosna razina %s je izvan pretvorivog raspona." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." -msgstr "" +msgstr "SIgurnosna razina %s ima neočekivan sufiks %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." -msgstr "" +msgstr "slocate sigurnosna razina %ld nije podržana." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" -msgstr "" +msgstr "Nisam uspio pisati na standardni izlaz" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dana" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "" +msgstr "Argument opcije --max-database-age ne smije biti prazan" -#: locate/locate.c:209 locate/locate.c:216 -#, fuzzy, c-format +#: locate/locate.c:202 locate/locate.c:209 +#, c-format msgid "Invalid argument %s for option --max-database-age" -msgstr "neispravan argument %s za `%s'" +msgstr "Neispravan argument %s opcije --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" -msgstr "" +msgstr "locate baza podataka %s sadrži ime datoteke dulje nego može koristiti" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" -msgstr "" +msgstr "locate baza podataka %s je oÅ¡tećena ili neispravna" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Veličina locate baze podataka: %s bajt\n" +msgstr[1] "Veličina locate baze podataka: %s bajta\n" +msgstr[2] "Veličina locate baze podataka: %s bajtova\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" -msgstr "" +msgstr "Odgovarajuća imena datoteka: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" -msgstr "" +msgstr "Sva imena datoteka: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -825,81 +1258,96 @@ msgid "" "\t%s contain newline characters, \n" "\tand %s contain characters with the high bit set.\n" msgstr "" +"Imena datoteka imaju zajedničku duljinu %s bajtova.\n" +"Od tih imena datoteka,\n" +"\n" +"\t%s sadrži prazninu, \n" +"\t%s sadrži znak novog retka \n" +"\ti %s sadrži znakove s postavljenim visokim bitom.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" +"Neka imena datoteka su možda filtrirana pa ne možemo izračunati stupanj " +"kompresije.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" -msgstr "" +msgstr "Stupanj kompresije %4.2f%% (viÅ¡e je bolje)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" -msgstr "" +msgstr "Stupanj kompresije nije definiran\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" +"locate baza podataka %s izgleda kao slocate baza podataka ali ima sigurnosnu " +"razinu %c, Å¡to GNU findutils trenutno ne podržava" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" +"%s je slocate baza podataka. PodrÅ¡ka za nju je nova, očekujte probleme." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" +"%s je slocate baza podataka nepodržane sigurnosne razine %d; preskačem." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" +"Naveli ste opciju -E, ali nju ne možete koristiti s bazama podataka u " +"slocate obliku sa sigurnosnom razinom različitom od nule. Za ovu bazu " +"podataka neće biti stvoreni rezultati.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "" +msgstr "%s je slocate baza podataka. Uključujem opciju „-e”." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" -msgstr "" +msgstr "locate baza podataka starog oblika %s je prekratka da bi bila ispravna" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" -msgstr "" +msgstr "Baza podataka %s je u %s obliku.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" -msgstr "" +msgstr "Baza podataka ima „little-endian” kodiranje strojnih riječi.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" -msgstr "" +msgstr "Baza podataka ima „big-endian” kodiranje strojnih riječi.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" -msgstr "" +msgstr "Redoslijed kodiranja strojnih riječi baze podataka nije očit.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -910,139 +1358,178 @@ msgid "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" msgstr "" +"Uporaba: %s [-d putanja | --database=putanja] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n" +" [-A | --all] [-p | --print] [-r | --regex] [--regextype=VRSTA]\n" +" [--max-database-age D] [--version] [--help]\n" +" uzorak...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" -msgstr "" +msgstr "nisam uspio ispustiti grupne ovlasti" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "" +msgstr "nisam uspio ispustiti setuid ovlasti" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" -msgstr "" +msgstr "Nisam uspio potpuno ispustiti ovlasti" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "" +msgstr "nisam uspio ispustiti setgid ovlasti" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" +"upozorenje: locate baza podatake se može čitati sa standardnog ulaza samo " +"jednom." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "" +msgstr "time poziv sustava nije uspio" -#: locate/locate.c:1856 -#, fuzzy, c-format +#: locate/locate.c:1844 +#, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" -msgstr "upozorenje: baza `%s' starija je od %d %s" +msgstr "" +"upozorenje: baza podataka %s je starija od %d %s (stvarna starost je %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" +"UPOZORENJE: locate baza podataka %s je izgrađena s različitim redoslijedom " +"bajtova" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" -msgstr "" +msgstr "neočekivan EOF u %s" -#: locate/word_io.c:146 -#, fuzzy, c-format +#: locate/word_io.c:148 +#, c-format msgid "error reading a word from %s" -msgstr "gre¹ka pri èekanju na %s" +msgstr "greÅ¡ka pri čitanju riječi iz %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." -msgstr "" +msgstr "Neispravan izlazni niz %s u specifikaciji ulaznog znaka razdvajanja." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" +"Neispravan izlazni niz %s u specifikaciji ulaznog znaka razdvajanja; " +"vrijednosti znakova ne smiju prelaziti %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" +"Neispravan izlazni niz %s u specifikaciji ulaznog znaka razdvajanja; " +"vrijednosti znakova ne smiju prelaziti %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" +"Neispravan izlazni niz %s u specifikaciji ulaznog znaka razdvajanja; prateći " +"znakovi %s nisu prepoznati." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" +"Neispravna specifikacija ulaznog znaka razdvajanja %s: znak mora biti ili " +"jedan znak ili izlazni niz koji počinje s \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" -msgstr "okoli¹ je prevelik za exec" +msgstr "okolina je prevelika za exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" +"upozorenje: vrijednost %ld za opciju -s je prevelika, koristim %ld umjesto " +"nje" + +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "" +msgstr "Ne mogu otvoriti ulaznu datoteku %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" -msgstr "" +msgstr "VaÅ¡e varijable okoline zauzimaju % bajtova\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" -msgstr "" +msgstr "POSIX gornja granica duljine argumenta (ovaj sustav): %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" +"POSIX najmanja dozvoljena gornja granica duljine argumenta (svi sustavi): " +"%\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "" +msgstr "Najveća duljina naredbe koji možemo koristiti: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "" +msgstr "Veličina međuspremnika naredbe koji koristimo: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1050,188 +1537,309 @@ msgid "" "run commands; if this is not what you wanted to happen, please type the end-" "of-file keystroke.\n" msgstr "" +"\n" +"IzvrÅ¡avanje programa xargs će se nastaviti i pokuÅ¡at će čitati svoj ulaz i " +"pokrenuti naredbe; ako ovo nije ono Å¡to želite, molim unesite „kraj-" +"datoteke” (EOF) kombinaciju tipki.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" +"Upozorenje: %s će se pokrenuti barem jednom. Ako ne želite da se to dogodi, " +"pritisnite prekidnu kombinaciju tipki.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" +"nespareni %s navodnik; uobičajeno su navodnici posebni za xargs osim ako " +"koristite opciju -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dvostruki" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "jednostruki" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" +"UPOZORENJE: NUL znak je pronađen u ulazu. Ne mogu ga proći u popisu " +"argumenata. Jeste li htjeli koristiti opciju --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" -msgstr "linija s argumentima predugaèka" +msgstr "redak s argumentima predugačak" + +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Nisam uspio pisati na standardni izlaz" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" +msgstr "nisam uspio otvoriti /dev/tty za čitanje" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Nisam uspio pisati na standardni izlaz" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1131 #, c-format -msgid "could not create pipe before fork" +msgid "failed to set environment variable %s" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1218 #, c-format +msgid "could not create pipe before fork" +msgstr "nisam uspio napraviti cjevovod prije razdvajanja" + +#: xargs/xargs.c:1289 +#, fuzzy, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" +"errno-buffer čitanje nije uspjelo u xargs_do_exec (ovo je vjerojatno greÅ¡ka, " +"molim prijavite)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" +"čitanje je vratilo neočekivanu vrijednost %d; ovo je vjerojatno greÅ¡ka, " +"molim prijavite" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" -msgstr "gre¹ka za vrijeme èekanja na djeèji proces" +msgstr "greÅ¡ka pri čekanju procesa djeteta" -#: xargs/xargs.c:1362 -#, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "" +#: xargs/xargs.c:1468 +#, fuzzy, c-format +msgid "WARNING: Lost track of %lu child processes" +msgstr "UPOZORENJE: Prestao sam pratiti %d proces dijete" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" -msgstr "%s: iza¹ao sa statusom 255; poni¹tavam" +msgstr "%s: izaÅ¡ao sa stanjem 255; prekidam" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: zaustavljen signalom %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" -msgstr "%s: terminiran signalom %d" +msgstr "%s: zavrÅ¡en signalom %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" -msgstr "%s: neispravan broj za opciju -%c\n" +msgstr "%s: neispravan broj opcije -%c\n" -#: xargs/xargs.c:1476 -#, fuzzy, c-format +#: xargs/xargs.c:1584 +#, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: vrijednost opcije -%c mora biti >= %ld\n" -#: xargs/xargs.c:1490 -#, fuzzy, c-format +#: xargs/xargs.c:1598 +#, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: vrijednost opcije -%c mora biti < %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Uporaba: %s [-0prtx] [-e[eof-niz]] [-i[zamjenski-niz]] [-l[maks-redaka]]\n" -" [-n maks-argumenata] [-s maks-znakova] [-P maks-procesa] [--null]\n" -" [--eof[=eof-niz]] [--replace[=zamjenski-niz]] [--max-lines[=maks-" -"redaka]]\n" -" [--interactive] [--max-chars=maks-znakova] [--verbose] [--exit]\n" -" [--max-procs=maks-procesa] [--max-args=maks-argumenata]\n" -" [--no-run-if-empty] [--version] [--help]\n" -" [naredba [poèetni-argumenti]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "ne mogu saznati trenutni direktorij" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#, fuzzy -#~ msgid "invalid argument %s for %s" -#~ msgstr "neispravan argument %s za `%s'" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#, fuzzy -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "dvosmislen argument %s za `%s'" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Valjani argumenti su:" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Nepoznata sistemska gre~ka" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: opcija `%s' je dvosmislena\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: uz opciju `--%s' ne ide argument\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: uz opciju `%c%s' ne ide argument\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: opcija `%s' tra~i argument\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: nepoznata opcija `--%s'\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: nepoznata opcija `%c%s'\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: neispravna opcija -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: opcija tra~i argument -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: opcija `-W %s' je dvosmislena\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: opcija `-W %s' ne dopu~ta argument\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Mod %s nije ispravan kad je uključen POSIXLY_CORRECT." -#~ msgid "`" -#~ msgstr "`" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Izgrađeno koriÅ¡tenjem GNU gnulib inačice %s\n" -#~ msgid "'" -#~ msgstr "'" +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Uporaba: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=znak]\n" +#~ " [-E eof-niz] [-e[eof-niz]] [--eof[=eof-niz]]\n" +#~ " [-L maks-redaka] [-l[maks-redaka]] [--max-lines[=maks-redaka]]\n" +#~ " [-I zamjenski-niz] [-i[zamjenski-niz]] [--replace[=zamjenski-" +#~ "niz]]\n" +#~ " [-n maks-argumenata] [--max-args=maks-argumenata]\n" +#~ " [-s maks-znakova] [--max-chars=maks-znakova]\n" +#~ " [-P maks-procesa] [--max-procs=maks-procesa] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=datoteka]\n" +#~ " [--version] [--help] [naredba [početni-argumenti]]\n" + +#~ msgid "cannot get current directory" +#~ msgstr "ne mogu saznati trenutni direktorij" + +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: nedopu~tena opcija -- %c\n" + +#~ msgid "block size" +#~ msgstr "veli~ina bloka" #~ msgid "Success" #~ msgstr "Uspjeh" @@ -1264,14 +1872,11 @@ msgstr "" #~ msgstr "Nesparena \\{" #~ msgid "Invalid content of \\{\\}" -#~ msgstr "Neispravan sadr¾aj \\{\\}" +#~ msgstr "Neispravan sadržaj \\{\\}" #~ msgid "Invalid range end" #~ msgstr "Neispravan kraj raspona" -#~ msgid "Memory exhausted" -#~ msgstr "Memorija iscrpljena" - #~ msgid "Invalid preceding regular expression" #~ msgstr "Neispravan prethodni regularni izraz" @@ -1287,34 +1892,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Nedostaje prethodni regularni izraz" -#~ msgid "^[yY]" -#~ msgstr "^[dDyY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#, fuzzy -#~ msgid "memory exhausted" -#~ msgstr "Memorija iscrpljena" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "neispravan argument %s za `%s'" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "neispravan argument %s za `%s'" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "popis argumenata predugaèak" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: nedopu~tena opcija -- %c\n" - -#~ msgid "block size" -#~ msgstr "veli~ina bloka" - #~ msgid "Predicate List:\n" #~ msgstr "Popis Predikata:\n" @@ -1325,16 +1902,16 @@ msgstr "" #~ msgstr "Optimirano Stablo Evaluacije:\n" #~ msgid "%s changed during execution of %s" -#~ msgstr "%s se promijenio dok se izvr¹avao %s" +#~ msgstr "%s se promijenio dok se izvrÅ¡avao %s" #~ msgid "virtual memory exhausted" #~ msgstr "virtualna memorija iscrpljena" #~ msgid "%s/.. changed during execution of %s" -#~ msgstr "%s/.. se promijenio dok se izvr¹avao %s" +#~ msgstr "%s/.. se promijenio dok se izvrÅ¡avao %s" #~ msgid "error in %s: %s" -#~ msgstr "gre¹ka u %s: %s" +#~ msgstr "greÅ¡ka u %s: %s" #~ msgid "" #~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" @@ -1345,7 +1922,7 @@ msgstr "" #~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" #~ "opcije (uvijek istinite): -daystart -depth -follow --help\n" #~ " -maxdepth NIVOA -mindepth NIVOA -mount -noleaf --version -xdev\n" -#~ "testovi (N mo¾e biti +N ili -N ili N): -amin N -anewer SPIS -atime N -" +#~ "testovi (N može biti +N ili -N ili N): -amin N -anewer SPIS -atime N -" #~ "cmin N\n" #~ msgid "" @@ -1356,7 +1933,7 @@ msgstr "" #~ " -ok NAREDBA ; -print -print0 -printf FORMAT -prune -ls\n" #~ msgid "inserting %s\n" -#~ msgstr "umeæem %s\n" +#~ msgstr "umećem %s\n" #~ msgid " type: %s %s " #~ msgstr " tip: %s %s " diff --git a/po/hu.gmo b/po/hu.gmo index 7746bc31238958e6c51ec8d88efbf40750461df5..6b949b866311fcdf982c5e624251a8b0009e6539 100644 GIT binary patch delta 4028 zcmYk;dvH|M9l-J5E`jh!AR)no1jvODNC=Pw6CMeWL>>}?KtKqOf^3qT5VH^1-2fZF zMHEdf?*&7v0fI~!tJvygKtX9^no_3@v`(=d+d)Cm+L_8f>NwTT^!wYpAZPg9&pCJR z^fZx~Sb}xv zk9i&IX-{VwcHxUS5=Sx&?O+)u;6l`n)*`pa^Eee>!)bUMn{XtfD8@Z_0mB!md8ti=y-8&05i`ofp69J_H9Iyk8vUV}Ol9jNzrqrUhXoPiTZiR5A<9>N278b>pY zb9uk~feP2kAj9ry9x{94!nL>sHCG>?E*{O3{+^3IoQ0e5ES6#x3+EMFgA7{wk$Bd$ z7%|78gZ4xm!TV)06|x}JG3!vLEQGW0b=1Xm2M3|9P;Domc6?;4U50VA7hylFLHZ=C zP}fEqGI_EObpXG@EZ#4_rJ@&pjQT=Hj@>RtO^pkgB-w`so{f1G(`es8vMBN6><*1V zePIPI#pS3eIgMWY2WrX|GM!<)AV`HRD!oX0I5pPAEnZp>5Z=iPkBG%$xu!{ThCX39W9VoD8^aARd`LuxfpG{>&p}mif zAos`xyotB*HeO+~YVOZY5n(IKTX=;BU&C(N9mV!)UtJ>dOWF}^#8QU20lRPkI$2m` zS*md~ZVFR*n#y6+#gsOkJYxy!jP#(cfv=ERmkjolw&x&&5FgSZsm$(SF=|RyB0q_V2A)KnsczJc-HEl+ z`6%ef=Ht7#5gRa{m2Emi4x+yATc(|#!ZNa8FChXf?r|>&abe&ff3qUD(&{b zhwK-hLhaz6P``v9;UoA3W?~76UxqcPsXmQQ;-|Pk_rE!puM#I-L%m@3JYI@Bu^xYq zA$$jir?ZG ztX?R>z2e0*JdZBCimW#&thU!cJx-u~0H4N-_ym?OvcDsjv77b}sB7yoz3z+u#CW`g z;XYLUO@%?qSEv^jFSfVUGOVEON1h=Trl2gbbDWCFG^gT3T!6a$T2Y_77xhI4Q3rMm zGw>4X^&c)_{4Su?Rw;&9OO`dH&IiQTx0*)T#A!u?~eH!%%yz;*=Z6_!dYB0 z8`E(+@{=4vvMirtC+06_{&hRNx15!VPV%55Xu$_@H)>AL<4XJpb&(dW5P1$gn2O(_ zUYE#4`r;y-j9%p9C!Kf^ui#YNUCZKhX#T0_1Fx^*(}>Bd?RF+=?rTw}+=m(5@D%D) z9$#aBs=HBF`6rlzKj1(dv)10GlTa7iVm!zFe?$Js-gP1mVfbHEwo}Pp&sPx7pib@o zP)Cyg7=O!gBlhP3>o?dhXmZ(KGCy)U`nSFuwJ@pC&X2+hf^{2RsQvITq2+O+RWCge zZQ6%tKo_Ex(S$A@H}P{KgV;qB5xWU3I`vvM6SD|SrRG_4{sdtV(FKc75t<6taI^$C zc4}9ddD%)N5u`Wz@u@^jhik}d2`x?=`+q#tUnDfI!Pt4_F(QG`G*uBDgywWOp~XvRuC=rgIEh94C$tJG4Rhg^g^&=LkMt!qO4eTeJ-2=pv>NKP8?ebVofv z>?d?L3?cFfExHRR;pm@9tv#X#N?#(2(0xCK(4yaj`^(R0%(?#rbv_aIN@A?G0dt9? zM2Ki1bdl?VuO}j!|D9BHi%cW>6C;SbWhIq|i7j_e;7EeaA$y1?iBh7O(8BJFmNJfW ziA6**ae&ZLViP@Pay+It%)alWFIFFh%ZR-r6)gEza6Js?(X`ZSnfHdW}FR5Hvl8>G%8mk%ZA5 zk#pH2Qdhd%%?*aj-_+_cy}ty}f(CT%vL0q1?=B8F(t6pJW zYvcrsMxP(7H*%&r66)Q)K(n{WXl!qg$m+#sB7JKzCsei>JumyW^t|j1nLqZl)#Gb1Tt-XJ z`7LI!#cb<6)KY3?)nq$U?vAm!N=JEX*Ku)0-l-SPc}AekRoBzy x4h3CqS0t-8J@R&Co|RpDs86ctZuB*Ue8C_+^q8I=%irvZT&f&yy}!nn@P9)fC8z)Z delta 5017 zcmbuBeQ;FO6~J#o0F4kZf*1jLBmoj&Lx4m+G<+mM62TC@g0e<=*?mc#+1(f4dmEAz zT@P%~Y=e^BGZU1R| zXU_i4x%a+%&pr2?o9sK4_1fvI#E1Dg`?Hi%2a$3_4Oi;7;LPPpN&lqLK8s-qA}tJ` zg$68z`FTq1f;YlCcnUVayfI2GfX%QF?uRqrD{vb;H%2AYwK8F>QZDR<#qc7O5Av^6 z>Ka%HC&C6O8{P$H!hMjb>gO;Yo`G}W1t{N-r&GRL2#eqbSOB|W06vzVP-+Uw2|A|2 zb5MiXSK&P@f=l2$D30C@W&Um`jywxxqxT@6sxM&*jvA*_Jv;&P2xIPer50fqTS75hi zY!`AEwKHQMfjQVO!V&OQh%f2{BpB*EdNiPu7Jk9PU%->tCpeB|>-}Wl zQFt7-!q7r01HJ?6;4CJQU&@73;Q{ynd=1K#Eh7{6z&oHs-1bVMMB zQ%^#v+h4-5@JlET=2Bz$rZmW5)J8~tsa+6X)C-XGQ6EG3ek_?Lh%J6#bFDdnZ8btKng+4TpG?|XrS8Rk269WPm}8%WEpW2f>wQ+kDcD=!GPoVGw>k;0f_Zo`6&AuPVJ%F| zMrlHkGTQ-%!GmxlJOst#qfq9(o#Ef0I9#;R?{9+ms&+t0;WC+{$IQKElO3> z|0w(xd>0Z`)j;Y>D4&LMl6T?fa11qh8Q%{#{0;J2{fDUl((UCBdFQqJ_#KLd zfs`X{h?Iz&P?}d2kVARzy7VoOADVi=3464`6x_?2)i@=bLB$~{ZljSwV1ywXAAu_B!R zlab+4|573n+Ix`xCJ#q4W4Q3TjNT24ku}KunLfc?$TDOU(%%-MMEea`jc`j|C2fJy zvf1BjHouFJTI4~5>-O>@0{0_VAdeu@C(^fWY)Y@Y4h}oib8Mb3uF>RWYn>w0**~s!+tgwNlnT{5- zT&+uwm|<;eyAjhG*Q~Fn+5kn7)uc)rA zn-S4NR>X=qrKuB>pUO^d)%GXKJ8ieSSqlaNX3RBgJ>;5QhG%oSh$!K0fk4=Zm{F7Q zDo<<9)%+F=tk4XrHQ>0mOf`c2MzbbMVg;)Px&}X5twr_j01g=mN4|>$`)#M$+k3za zRt>1lLw2p_sGSi#Wc2TB28VWdYh*ftRsS+F=tNAMNCb4d&GR838;RlV==BcHbv%bd z?YccU*R#CIe*fU?MsIefZH1UEage1w)0>_dpx>9wEGpVixEW|QBSw|{d}9SkN^erT5$Qw;S<$E-3u{3$X1b;xk;BGE zM9Dd)Ir(>OR;p_1g{;)7qROmPvUq1!YX0;y*{N}*Q*%ep4U|^~=FZj17cH(_n5v%t z$cW_GMYqpemF{zT)5oa^eP}(9`S{;!rc+wG?)1jehahbyqv$I|cIfiWnI&`mQ&ETNv zeLYY&L;455_Nqowr++8Eg8GYQ$hrKQ$?W2lz+lBl@8Ft)_0qrSH>$7t%skd)dOQ&w@v5+Ix5{^gGDX&_jSmIHugQrN&v8p(AY*k@)s-j_c cR_cQ_v$Io6)*Ty`wLJOREfZ4HnygX(1h!t5Jpcdz diff --git a/po/hu.po b/po/hu.po index c48a603..4443e9b 100644 --- a/po/hu.po +++ b/po/hu.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.4.2\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2009-08-02 01:28+0200\n" "Last-Translator: Gabor Kelemen \n" "Language-Team: Hungarian \n" @@ -20,32 +20,68 @@ msgstr "" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "a visszatérés meghiúsult a kiinduló munkakönyvtárba" + +#: find/exec.c:256 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Cannot close standard input" +msgstr "A szabványos bemenet nem zárható le" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "A könyvtárváltás meghiúsult" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "fork() rendszerhívás sikertelen" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "hiba a következőre várakozás közben: %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s leállítva %d szignállal" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" msgstr "" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "az fnmatch() könyvtári függvény vizsgálata sikertelen." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "az aktuális könyvtár elérése sikertelen" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "Figyelmeztetés: a fájlrendszer (%s) nemrég le lett választva." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "Figyelmeztetés: a fájlrendszer (%s) nemrég csatlakoztatva lett." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -54,7 +90,7 @@ msgstr "" "A(z) %s%s megváltozott a(z) %s végrehajtása során (régi eszközszám: %ld, új " "eszközszám: %ld, a fájlrendszer típusa: %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -63,17 +99,17 @@ msgstr "" "A(z) %s%s megváltozott a(z) %s végrehajtása során (régi inode szám: " "%, új inode szám: %, fájlrendszer típusa: %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "a visszatérés meghiúsult a kiinduló munkakönyvtárba" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "A könyvtárváltás meghiúsult ide: %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -82,7 +118,7 @@ msgstr "" "A(z) %s szimbolikus link egy hurok része a könyvtárhierarchiában; a program " "már bejárta azt a pontot, ahová mutat." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -99,12 +135,12 @@ msgstr[1] "" "dal rendelkezik, mint egy, a fájlrendszer-hierarchiában %d szinttel feljebb " "lévő könyvtár." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "figyelmeztetés: a(z) %s szimbolikus linket a rendszer nem követi" -#: find/find.c:1386 +#: find/find.c:1480 #, fuzzy, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -119,12 +155,12 @@ msgstr "" "bekapcsolva. A korábbi próbálkozások meghiúsulhattak a keresendő könyvtárak " "felvételére." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "ismeretlen" @@ -136,7 +172,7 @@ msgstr "" "A rendszer fájlrendszerhurkot észlelt; a(z) %s ugyanannak a " "fájlrendszerhuroknak része, mint %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, fuzzy, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "Figyelmeztetés: úgy tűnik, a(z) %s fájl módja 0000" @@ -146,12 +182,17 @@ msgstr "Figyelmeztetés: úgy tűnik, a(z) %s fájl módja 0000" msgid "cannot search %s" msgstr "%s nem kereshető" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "a visszatérés meghiúsult a kiinduló munkakönyvtárba" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, fuzzy, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -162,7 +203,7 @@ msgstr "" "nem csinál semmit, ha a -depth be van kapcsolva. Ha mindenképp folytatni " "akarja, használja a -depth kapcsolót." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -175,7 +216,7 @@ msgstr "" "előtte, mind az utána található tesztekre). A kapcsolókat az egyéb " "argumentumok előtt kell megadni.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -184,7 +225,7 @@ msgstr "" "figyelmeztetés: a -d kapcsoló elavult; helyette a -depth kapcsoló " "használandó, mivel az utóbbi felel meg a POSIX-nak." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -193,17 +234,17 @@ msgstr "" "%s nem egy meglévő csoport neve és nem tűnik numerikus csoportazonosítónak, " "mivel a nem várt %s kiterjesztéssel rendelkezik." -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s nem egy meglévő csoport neve" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "a -group argumentuma üres, de egy csoportnévnek kellene lennie" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -214,7 +255,7 @@ msgstr "" "kifejezés -print, kifejezés lehet:\n" "operátorok, kapcsolók, tesztek és tevékenységek:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -226,7 +267,7 @@ msgstr "" " ( KIF ) ! KIF -not KIF KIF1 -a KIF2 KIF1 -and KIF2\n" " KIF1 -o KIF2 KIF1 -or KIF2 KIF1 , KIF2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -240,7 +281,7 @@ msgstr "" " -depth --help -maxdepth SZINTEK -mindepth SZINTEK -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -253,10 +294,10 @@ msgstr "" " -ilname MINTA -iname MINTA -inum N -ipath MINTA -iregex MINTA\n" " -links N -lname MINTA -mmin N -mtime N -name MINTA -newer FÁJL" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -266,11 +307,11 @@ msgstr "" " -wholename MINTA -size N[bcwkMG] -true -type [bcdpflsD]\n" " -uid N -used N -user NÉV -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -285,7 +326,7 @@ msgstr "" " -exec PARANCS; -exec PARANCS {} + -ok PARANCS ;\n" " -execdir PARANCS ; -execdir PARANCS {} + -okdir PARANCS ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -295,12 +336,12 @@ msgstr "" "http://savannah.gnu.org/ címen, vagy e-mailben a " "címen." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "az fnmatch() könyvtári függvény vizsgálata sikertelen." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -316,50 +357,43 @@ msgstr "" "a GNU grep-et használja, akkor használható a következő parancs: „find ... -" "print0 | grep -FzZ %s”." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "%s várt pozitív egész argumentuma helyett %s érkezett." -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" "A rendszer nem ad lehetőséget a fájl létrehozási idejének megállapítására." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "A teszthez (%s) argumentum szükséges" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "%s nem értelmezhető dátumként vagy időként" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "A(z) „%s” fájl létrehozási ideje nem kérhető le" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" -"A mód (%s) nem érvényes, ha a POSIXLY_CORRECT környezeti változó " -"engedélyezett." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "érvénytelen mód: %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -371,22 +405,22 @@ msgstr "" "míg korábban nem illeszkedett egyetlen fájlra sem, most az összes fájlra " "illeszkedik." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "érvénytelen null argumentum a -size kapcsolónál" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "a -size típusa („%c”) érvénytelen" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "A(z) „%s%c” argumentum érvénytelen a -size kapcsolóhoz" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -394,76 +428,83 @@ msgstr "" "A -show-control-chars kapcsoló egyetlen paramétert vár, amely a „literal” " "vagy „safe” egyike lehet" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "a(z) „%s” argumentum érvénytelen a -used kapcsolóhoz" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "%s nem egy ismert felhasználó neve" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "A -user argumentuma nem lehet üres" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Engedélyezett szolgáltatások: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "A -type argumentumai csak egy betűt tartalmazhatnak" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "A -type argumentuma ismeretlen: %c" - -#: find/parser.c:3015 -#, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "figyelmeztetés: ismeretlen escape: „\\%c”" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2820 #, c-format -msgid "error: %s at end of format string" -msgstr "hiba: %s a formátum-karaktersorozat végén" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2831 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "figyelmeztetés: ismeretlen formátum-előírás: „%%%c”" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2842 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." msgstr "" -"hiba: a „%%%c” formátumdirektíva fenn van tartva a jövőbeli használatra" -#: find/parser.c:3260 +#: find/parser.c:2849 #, c-format +msgid "Unknown argument to -type: %c" +msgstr "A -type argumentuma ismeretlen: %c" + +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Az aktuális könyvtárat tartalmazza a PATH környezeti változó, amely nem " "biztonságos kombináció a find %s műveletével. Távolítsa el az aktuális " "könyvtárat a $PATH változóból (azaz a pontot vagy a kezdő/záró " "pontosvesszőt)." -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -474,7 +515,7 @@ msgstr "" "biztonságos a find %s műveletével kombinálva. Távolítsa el ezt a bejegyzést " "a $PATH változóból." -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -483,95 +524,102 @@ msgstr "" "A {} jel nem használható a -execdir és -okdir segédprogramjának nevében, " "mivel ez egy lehetséges biztonsági probléma." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Csak egyetlen {} példány támogatott a -exec%s ... + esetén" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "A környezet túl nagy az exec() híváshoz." -#: find/parser.c:3603 +#: find/parser.c:3269 #, fuzzy, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "túlcsordulás a mai nap végének kiszámítására tett kísérlet közben" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "túlcsordulás a mai nap végének kiszámítására tett kísérlet közben" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "szabványos hibakimenet" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "szabványos kimenet" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "%s nem törölhető" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "a visszatérés meghiúsult a kiinduló munkakönyvtárba" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "Figyelmeztetés: a(z) %s fájl létrehozási dátuma nem állapítható meg" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Az írás meghiúsult a szabványos kimenetre" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "A szabványos bemenet nem zárható le" +msgid "getfilecon failed: %s" +msgstr "" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "A könyvtárváltás meghiúsult" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "fork() rendszerhívás sikertelen" +msgid "warning: unrecognized escape `\\%c'" +msgstr "figyelmeztetés: ismeretlen escape: „\\%c”" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "hiba a következőre várakozás közben: %s" +msgid "error: %s at end of format string" +msgstr "hiba: %s a formátum-karaktersorozat végén" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s leállítva %d szignállal" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" +"hiba: a „%%%c” formátumdirektíva fenn van tartva a jövőbeli használatra" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "figyelmeztetés: ismeretlen formátum-előírás: „%%%c”" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "érvénytelen kifejezés" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -580,22 +628,22 @@ msgstr "" "érvénytelen kifejezés; bináris operátort („%s”) használtál úgy, hogy semmi " "nem volt előtte." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "a program kifejezést várt a(z) „%s” és „)” között" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "a program kifejezést várt a(z) „%s” után" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "érvénytelen kifejezés; túl sok ) karaktert tartalmaz" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -604,12 +652,12 @@ msgstr "" "érvénytelen kifejezés; a program egy „)” jelre számított, de nem találta " "meg. Lehet, hogy egy további predikátum szükséges a(z) „%s” után." -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "érvénytelen kifejezés; az üres zárójelek nem engedélyezettek." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -617,115 +665,115 @@ msgid "" msgstr "" "érvénytelen kifejezés; a program egy ) jelre számított, de nem találta meg." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "hoppá -- érvénytelen kifejezéstípus!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "hoppá -- érvénytelen kifejezéstípus (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "az útvonalaknak meg kell előzniük a kifejezést: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "ismeretlen predikátum: „%s”" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "érvénytelen predikátum: „%s”" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "A(z) „%s” argumentum érvénytelen a következőhöz: %s" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "A(z) „%s” argumentuma hiányzik" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "túl sok „)” karaktert tartalmaz" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "váratlan extra predikátum: „%s”" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "váratlan extra predikátum" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "hoppá -- az and alapértelmezett beszúrása érvénytelen!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Használat: %s [-H] [-L] [-P][-Oszint] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [útvonal...] [kifejezés]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "az aktuális munkakönyvtár feljegyzése meghiúsult" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "az aktuális munkakönyvtár feljegyzése meghiúsult" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Az ismeretlen hibakereső jelző figyelmen kívül marad: %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "A -D kapcsoló paramétere üres." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" "A -O kapcsolót azonnal egy tízes számrendszerbeli egésznek kell követnie" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Közvetlenül a -O után adjon meg egy tízes számrendszerbeli egészet" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Érvénytelen optimalizálási szint: %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -734,7 +782,7 @@ msgstr "" "A(z) %lu optimalizálási szint túl nagy. Ha nagyon gyorsan akar fájlokat " "megtalálni, akkor használja a GNU locate programot." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -743,64 +791,380 @@ msgstr "" "A FIND_BLOCK_SIZE környezeti változó nem támogatott, egyedül a " "POSIXLY_CORRECT környezeti változó befolyásolja a blokkméretet." -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "az argumentum (%s) szabálytalan a következőhöz: %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "a(z) „%s” argumentum nem egyértelmű a következőhöz: „%s”" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Az érvényes argumentumok a következők:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "hiba a fájl lezárásakor" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "íráshiba" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Ismeretlen rendszerhiba" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: a(z) „%s” kapcsoló nem egyértelmű\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: a(z) „--%s” kapcsoló nem enged meg argumentumot\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: a(z) „%c%s” kapcsoló nem enged meg argumentumot\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: a(z) „%s” kapcsolóhoz argumentum szükséges\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: a(z) „--%s” kapcsoló ismeretlen\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: a(z) „%c%s” kapcsoló ismeretlen\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: érvénytelen kapcsoló -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: a kapcsoló egy argumentumot igényel -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: a „-W %s” kapcsoló nem egyértelmű\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: a „-W %s” kapcsoló nem enged meg argumentumot\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: a(z) „%s” kapcsolóhoz argumentum szükséges\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "az aktuális munkakönyvtár feljegyzése meghiúsult" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "az aktuális munkakönyvtár feljegyzése meghiúsult" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "„" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "”" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[iIyY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "elfogyott a memória" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "érvénytelen %s%s argumentum: „%s”" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "érvénytelen utótag a(z) %s%s argumentumban: „%s”" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "%s%s: a(z) „%s” argumentum túl nagy" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "a parancs túl hosszú" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "egy argumentum nem fér el az argumentumlista méretkorlátjába" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "az argumentumlista túl hosszú" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Az írás meghiúsult a szabványos kimenetre" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Készült a GNU gnulib %s verzió használatával\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Ismeretlen reguláriskifejezés-típus: %s; az érvényes típusok: %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, fuzzy, c-format msgid "Unexpected suffix %s on %s" msgstr "váratlan fájlvége ebben: %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "a program kifejezést várt a(z) „%s” után" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Ismeretlen reguláriskifejezés-típus: %s; az érvényes típusok: %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -809,8 +1173,8 @@ msgstr "" "Használat: %s [--version | --help]\n" "vagy %s most_common_bigrams < fájllista > locate-adatbázis\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -818,85 +1182,80 @@ msgstr "" "\n" "A hibák a címen jelenthetők.\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "íráshiba" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Használat: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "A biztonsági szintet tízes alapú egészként kell megadni." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "A biztonsági szint (%s) kívül esik az átalakítható tartományon." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "A biztonsági szint (%s) váratlan utótaggal rendelkezik: %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "a megadott slocate biztonsági szint (%ld) nem támogatott." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Az írás meghiúsult a szabványos kimenetre" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "nap" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "a --max-database-age kapcsoló argumentuma nem lehet üres" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "A(z) „%s” argumentum érvénytelen a --max-database-age kapcsolóhoz" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "a(z) %s locate adatbázis a locate által kezelhetőnél hosszabb fájlnevet " "tartalmaz" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "a(z) „%s” locate adatbázis sérült vagy érvénytelen" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "A locate adatbázis mérete: %s bájt\n" msgstr[1] "A locate adatbázis mérete: %s bájt\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Illeszkedő fájlnevek: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Minden fájlnév: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -913,7 +1272,7 @@ msgstr "" "\t%s tartalmaz új sor karaktert,\n" "\tés %s tartalmaz beállított magas bittel rendelkező karaktert.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -922,17 +1281,17 @@ msgstr "" "Egyes fájlnevek lehet, hogy ki lettek szűrve, így nem számítható ki a " "tömörítési arány.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Tömörítési arány: %4.2f%% (a nagyobb jobb)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "A tömörítési arány nincs megadva\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -941,7 +1300,7 @@ msgstr "" "a(z) „%s” locate adatbázis slocate adatbázisnak tűnik, azonban a biztonsági " "szintje %c, amit a GNU findutils jelenleg nem támogat" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -950,7 +1309,7 @@ msgstr "" "a(z) „%s” egy slocate adatbázis. Ezek támogatása új, jelenleg problémák " "lehetnek vele." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -958,7 +1317,7 @@ msgstr "" "a(z) „%s” egy nem támogatott biztonsági szintű (%d) slocate adatbázis; " "figyelmen kívül marad" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -969,36 +1328,36 @@ msgstr "" "nem nulla biztonsági szintű adatbázisokkal. Ebből az adatbázisból nem " "lesznek találatok előállítva.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "a(z) „%s” egy slocate adatbázis. A -e kapcsoló engedélyezve lesz." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "A régi formátumú %s locate adatbázis túl rövid ahhoz, hogy érvényes legyen" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "A(z) %s adatbázis %s formátumú.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Az adatbázis gépiszó-kódolása kis endian.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "Az adatbázis gépiszó-kódolása nagy endian.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Az adatbázis gépiszó-kódolási sorrendje nem nyilvánvaló.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, fuzzy, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1019,64 +1378,64 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " minta...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "a csoport jogosultságainak eldobása meghiúsult" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "a setuid jogosultságok eldobása meghiúsult" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "A jogosultságok teljes eldobása meghiúsult" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "a setgid jogosultságok eldobása meghiúsult" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "figyelmeztetés: a locate adatbázis csak egyszer olvasható a szabvány " "bemenetről." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "a time rendszerhívás meghiúsult" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "figyelmeztetés: a(z) „%s” adatbázis régebbi %d %s napnál (a tényleges kor " "%.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, fuzzy, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "Figyelmeztetés: a(z) %s locate adatbázis eltérő bájtsorrenddel készült" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "váratlan fájlvége ebben: %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "hiba szó olvasásakor a következőből: %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" "A(z) „%s” escape sorozat érvénytelen a bemenet elhatárolójának " "meghatározásában." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1085,7 +1444,7 @@ msgstr "" "A(z) „%s” escape sorozat érvénytelen a bemenet elhatárolójának " "meghatározásában; a karakterértékek nem léphetik túl a(z) %lx értéket." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1094,7 +1453,7 @@ msgstr "" "A(z) „%s” escape sorozat érvénytelen a bemenet elhatárolójának " "meghatározásában; a karakterértékek nem léphetik túl a(z) %lo értéket." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1103,7 +1462,7 @@ msgstr "" "A(z) „%s” escape sorozat érvénytelen a bemenet elhatárolójának " "meghatározásában ;a(z) %s záró karaktereket a program nem ismerte fel." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1112,45 +1471,60 @@ msgstr "" "A bemenet elhatárolójának „%s” meghatározása érvénytelen: az elhatároló vagy " "egy karakter, vagy egy \\ kezdetű escape sorozat kell legyen." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "a környezet túl nagy az exec-hez" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, fuzzy, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "Figyelmeztetés: a -s kapcsoló %ld értéke túl nagy, helyette a(z) %ld kerül " "felhasználásra" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "A bemeneti fájl (%s) nem nyitható meg" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "A környezeti változói %lu bájtot foglalnak\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" "A POSIX felső korlátja az argumentum hosszára (ezen a rendszeren): %lu\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1159,17 +1533,17 @@ msgstr "" "A POSIX által megengedhető legkisebb korlát az argumentum hosszára (minden " "rendszeren): %lu\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "A ténylegesen használható parancs maximális hossza: %ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "A ténylegesen használt parancspuffer hossza: %lu\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1182,7 +1556,7 @@ msgstr "" "és végrehajtani a parancsokat; ha nem ezt akarta, akkor nyomja meg a fájl " "vége billentyűkombinációt.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1191,7 +1565,7 @@ msgstr "" "Figyelmeztetés: %s legalább egyszer lefut. Ha nem akarja, hogy ez " "megtörténjen, akkor nyomja meg a megszakítás kombinációt.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1200,15 +1574,15 @@ msgstr "" "pár nélküli %s idézőjel; alapértelmezésben az idézőjelek speciálisak az " "xargs számára, hacsak nem használja a -0 kapcsolót" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "kettős" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "egyszeres" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, fuzzy, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1217,160 +1591,260 @@ msgstr "" "Figyelmeztetés: NULL karakter fordult elő a bemenetben. Az argumentumlistán " "keresztül ez nem adható át. Lehet, hogy a --null kapcsolót akarta használni?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "az argumentumsor túl hosszú" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Az írás meghiúsult a szabványos kimenetre" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Az írás meghiúsult a szabványos kimenetre" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "hiba a gyermekfolyamatra való várakozás közben" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, fuzzy, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "Figyelmeztetés: %d gyermekfolyamatnak nyoma veszett" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: kilépési értéke 255; megszakítás" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: %d szignállal leállítva (stopped)" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: %d szignállal leállítva (terminated)" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: érvénytelen szám a -%c kapcsolóhoz\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: a -%c kapcsoló értéke >= %ld kell legyen\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: a -%c kapcsoló értéke < %ld kell legyen\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Használat: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=elhat]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-sor] [-l[max-sor]] [--max-lines[=max-sor]]\n" -" [-I csere-kar] [-i[csere-kar]] [--replace[=csere-kar]]\n" -" [-n max-arg] [--max-args=max-arg]\n" -" [-s max-kar] [--max-chars=max-kar]\n" -" [-P max-proc] [--max-procs=max-proc] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fájl]\n" -" [--version] [--help] [parancs [induló-argumentumok]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "az aktuális könyvtár beolvasása sikertelen" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "az argumentum (%s) szabálytalan a következőhöz: %s" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "a(z) „%s” argumentum nem egyértelmű a következőhöz: „%s”" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Az érvényes argumentumok a következők:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "error closing file" -#~ msgstr "hiba a fájl lezárásakor" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Ismeretlen rendszerhiba" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: a(z) „%s” kapcsoló nem egyértelmű\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: a(z) „--%s” kapcsoló nem enged meg argumentumot\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: a(z) „%c%s” kapcsoló nem enged meg argumentumot\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: a(z) „%s” kapcsolóhoz argumentum szükséges\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: a(z) „--%s” kapcsoló ismeretlen\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: a(z) „%c%s” kapcsoló ismeretlen\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: érvénytelen kapcsoló -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: a kapcsoló egy argumentumot igényel -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: a „-W %s” kapcsoló nem egyértelmű\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: a „-W %s” kapcsoló nem enged meg argumentumot\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" -#~ msgid "`" -#~ msgstr "„" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "" +#~ "A mód (%s) nem érvényes, ha a POSIXLY_CORRECT környezeti változó " +#~ "engedélyezett." -#~ msgid "'" -#~ msgstr "”" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Készült a GNU gnulib %s verzió használatával\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Használat: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=elhat]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-sor] [-l[max-sor]] [--max-lines[=max-sor]]\n" +#~ " [-I csere-kar] [-i[csere-kar]] [--replace[=csere-kar]]\n" +#~ " [-n max-arg] [--max-args=max-arg]\n" +#~ " [-s max-kar] [--max-chars=max-kar]\n" +#~ " [-P max-proc] [--max-procs=max-proc] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fájl]\n" +#~ " [--version] [--help] [parancs [induló-argumentumok]]\n" + +#~ msgid "cannot get current directory" +#~ msgstr "az aktuális könyvtár beolvasása sikertelen" #~ msgid "Success" #~ msgstr "Sikerült" @@ -1426,23 +1900,5 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Nincs megelőző szabályos kifejezés" -#~ msgid "^[yY]" -#~ msgstr "^[iIyY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "elfogyott a memória" - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "érvénytelen %s%s argumentum: „%s”" - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "érvénytelen utótag a(z) %s%s argumentumban: „%s”" - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "%s%s: a(z) „%s” argumentum túl nagy" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: szabálytalan kapcsoló -- %c\n" diff --git a/po/id.gmo b/po/id.gmo index 7ce205c73f39fab826071d87c58ab384db8e02c6..973f25e7e4a7a0f65be689e0481ca4ceadddc748 100644 GIT binary patch delta 3836 zcmZA33s98T6~OVcJmnP-On50Sf+8R)1R;P?d@|^AT8Jqw2$q_>~5g8$76KRnm7g1tG^mtu@aW$?Zv>e7!9Kw8D_>jn6?8F+p zh4nZuQKTFXU>=^sLA;I`_;ix^rH{&GAu-$`ZjFGV_1q|jOG-UVb?F7Dx3{I+84{}%5ST-XoAP%IjvI&`7*=czc z%Xz=NL*;Q!{0TLga>7Igqukg>@Z zsMk%%HSa6KY~C+@RCFzlpk8&3CQUQR z>PJ2QJ!I#}U1T*RmOZKYC;3zsV>Rj;?m^wp@1V{=IS0uvsX@(t2l5Wthjx4qKf%vX zM|hlzVr(KGpmykE_G}bJFiPFNai~dLR>=HokCt#CpBvU-DsBG^Gj&H%M?8u;Gaq6! z{u#C7H&K%|io~hq{#IN>`|X)#Mz5jfOxi57OI|@%Sw2F|wQIAO|36U4n9Ux>`xu8~ zY|@AE2L6x-N0f+MrhSss*AW~n71@txa6Q({;p>Or!MT{su$g6Pz&*GPb;|GKF3e;L zkPb59r=nB(KI)qO4Rxe3kC_+cBaNXY_`9k>&VC@p6M>p7xz;kQRM_?;AMOX zZ{aR{wwCqBf8l4idYM`KyyfPLS8cfzZJe(|eNH`2LO1G*UqYSww~$B4U(ugN<M>1({bXH z=C5tplg$5Y4!psEZ{T@MLU*IN@EM#=`!MF=PjL!fMP2i8t4zlN7{=V6LK0nm!g@vH z9n_J^8j%DjLVbP}=5c+UpNg(g-&!+uui-@6Kfr7}kBN8<^}74G5i^?jFNO!~Kn5*$ z*O?bBdy46%y&V_fUr>{D#@Eb1SK&DB+l~4UivK{f>Dim>&A0sf$nj9(k$<7Go8Q_A zExm+3a2C-)EFdZfEjq>92_`4>y@$}2Qx6c&YK2llXg(d*jW)>Y8+0n9tDA0}1PpIg+3|Mtd9xYCy zlh{k>vP2TPo}|fF%4@WaSVy*@E|r#N2u)meTIlZpgo-9FDcVk4m?%n&%OoMl2;3TgMJzgH?YR_Y?E1_Dme7Um4xk zBg7ISpU_fEGzX5yXGT6p?O5Rb_*DIzhxUFu+6ivu0V2O3OV=kbBI4ruz=QaVu!Swb zjD*GrTVB93zA1Qhd~|ehQu;5$gTI+H5|-lic)PcI?Y#rNeXcIMtEZ>CC$QCiG?1P% zal%?hr`u_F^tAiBT;9H3YOcy)Y0e*Q1+C5A`W9(z9(bySWN>t~x!Zl+KE1+RYoFR{ z-`w2;!PKc`w)jn*-MwyayM42}(-mAgZNDw%e;52LZ!9d))z#fIV0ZO*IDB-(8T?j3 zPHaMH(d_b~;tG3lab-z)@YB+mD8}%4WoxjtDsf!!twoPT*xCYruPF?U)eMJaEqC=g zIvpJj2ICG5rqAtkc}{?dkE1tO*%-9Ned(^?=c~RMp5$?L TINIF3^s!4v><(^gnjiOXM+*Zv delta 4918 zcmc)MdvH`&9l-IkANj}2zfv-OZJ^@~{5v7Xi~^-z zz-p|(OSlII4pOQS593O_fV0p$Sg8qU;5OWkBQU>ErIbaZyiloe_+>1^S8zC9!jbq- zlm`_LQECz{LWWcri*P$m!-FW-{|M!}%QzN2oK%A4=*0#207i;ZN{ykhp8*ZOjZ9jd z!})j-Wu~P=oeO58Ok@MfgC0XpQBPwAzmH8A8OD8BzSB6H{?G1rCZay!OmrNMVtieS z#ylDcY{gTqLyMJaqrVk*;CUR4K9)r$*n_egdr&5N7&%4#7OU_Y&cxBY_AFe39k>r? z;0-*DsR~|iGL5(JlUTsIJ&2328;{}wEMmIru?1zq&*K$*2j#lgn4LVZU#auPwK$P} z7aqdn_zj%Sy4T_B$R#N?N^@p72YvhyN7K2Pnx?z(&Tf8n@sHoP)(A&hyxU zyp;M7SwuCw+;J+(3M|E1d=w>jet-jbzWS9r@Fp@Nb=B?XjaMp{ehK!&Qj}aNM_yVr zAls_~$jhi6_xGbH4|>_{zmKxQBY6usuK_je5P81ZL!%gsrOK-sqa*0CA6um z|9uQBWI$%zh?0Dpu!$R-#wGMU)0`!&N7?%=I3M3eDZ{eqPR`WhTl5on8P}4T18^=W zPX($5JjH$ec%J^CnXJFO!4=kb9}Xi^9>S+Ej344W4Am&bHmZ}j8-I3h#k0t2sq4rbRMn@Q^LlX@ z{WQwTokaN*zvBM>7tEzUu!WMtAvhL`UFTv-l4g@T(2Md$$FL56?2hNHR%#0UDJVDC zfaSQ|_3Jp2{x96$FQZJX{~BjSN>R3OFFr2kAqA&auVwuW`C%=~i0`4?ICq`%EuVy~ z^y{z+pTT4JhWmRLAB&0f58(uS3Cr*j%9izA?@ah0=6IC)E|TBs^af>rcW!QA{pHR6 z#Xtd0`ixVTH8_C_nozc4i_a;q12~HQb2tWnj)U~5_0S( zVL&za3OU~IxKiAYuw;`F??Y5_*B+iq>VWO0fL$X_rMZ|W3MYFf1Kguzm zC?VvH<&Z5MLDWcx<4eT-cFXz0;-u_llRb zA=}cIkP0DhRWFe}_R%=#cDA5wl^jW_|FJYEQEA>fI%tt&_CFrk!C5pO&USDiA=x~c zV0-N&$2Eqt3DQA*mS8vSub_!vAo7VP2>YQ_gBn6?CbCDD+t`Nk-KLZk#bIYP*dLI& zIEW~gfjbUTN~H-&w00s+NRm?&_CIQ1e=o$8WWCgS5fLS(5i^JcQBSNOvIoVW4iH9m z0Q=n0&NdIx*h9=CYTdydIGo_)s+JORR7-9)J8k=e@j2QH+RvFPoXv9cDu78ze`CuRq=S|P)>5T;=au&2^dJ9@|(`SdQ zD_fj2!{&5?(=qGX#}=;y#XU^MofOM zwOjst%{hGDdd-NndlOb%PBnblj$e~o((~2c8oGVaaxJ2Fdzp}tO2~C#U$&p{+t0q$ z_0`^L`tNvZ6R+AC*4vEilTF{91NJ@K0blK1zucZgR3?$~>hTVH4qkbXbnGYEqqomZ z*b{CG>has>+CBSZXZ-fr&Gy-y@mL#Y%R0!d?XG>g`vc>NU@F$dIxgq%zG)6=!dnYi}0C$poh+LL*8>~2pcSbi=i(=>5Re!(6Y9*?B#FlzIy#b3J)}qPDGR$OF4Pp})nto859nb%s99z}54oig zGAuKs-%}iV$THh2GuIc+&Mm5=C_)s4sU?h%9@nEC>7z?G1(Q)L8PeL#XrNMC5erg; zLA^7Xuxse<)3t!k#ZJAj2)Z`WIa5kSxAY{J=v@@*txhOt#xi5U6RVAM=dLH_i~#_5@xjmvT}=CUU|nSvGH@nkNp+}kJ9+cJN^ FzX8V>bP)gm diff --git a/po/id.po b/po/id.po index c1063ab..a167910 100644 --- a/po/id.po +++ b/po/id.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.4.0\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2008-11-09 12:30+0700\n" "Last-Translator: Arif E. Nugroho \n" "Language-Team: Indonesian \n" @@ -18,32 +18,68 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "gagal untuk kembali ke direktori kerja inisial" + +#: find/exec.c:256 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Cannot close standard input" +msgstr "Tidak dapat menutup standar masukan" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Gagal untuk berpindah direktori" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "tidak dapat mem-fork" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "Kesalahan waiting untuk %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s di-terminate oleh sinyal %d" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" msgstr "" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "pemeriksaan keadaan dari fungsi perpustakaan fnmatch() gagal." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "tidak dapat memperoleh statistik direktori saat ini" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "Peringatan: sistem berkas %s baru saja telah diunmount." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "Peringatan: sistem berkas %s barus seja telah dimount." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -52,7 +88,7 @@ msgstr "" "%s%s berubah selama eksekusi dari %s (nomor perangkat lama %ld, nomor " "perangkat baru %ld, tipe sistem berkas adalah %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -61,17 +97,17 @@ msgstr "" "%s%s berubah selama eksekusi dari %s (nomor inode lama %, nomor " "inode baru %, tipe sistem berkas adalah %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "gagal untuk kembali ke direktori kerja inisial" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Gagal untuk secara aman mengubah direktori kedalam %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -80,7 +116,7 @@ msgstr "" "Link simbolik %s adalah bagian dari sebuah loop dalam hierarki direktori; " "kita telah mengunjungi direktori yang telah ditunjuk." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -97,12 +133,12 @@ msgstr[1] "" "sebagai sebuah direktori yang memiliki %d tingkat lebih tinggi dalam " "hierarki sistem berkas" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "peringatan: tidak mengikuti link simbolik %s" -#: find/find.c:1386 +#: find/find.c:1480 #, fuzzy, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -117,12 +153,12 @@ msgstr "" "sebelumnya mungkin gagal untuk memasukan direktori yang seharusnya telah " "dicari." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "tidak diketahui" @@ -134,7 +170,7 @@ msgstr "" "Sistem berkas loop terdeteksi; %s adalah bagian dari sistem berkas loop yang " "sama seperti %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, fuzzy, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "Peringatan: berkas %s kelihatannya memiliki mode 0000" @@ -144,12 +180,17 @@ msgstr "Peringatan: berkas %s kelihatannya memiliki mode 0000" msgid "cannot search %s" msgstr "tidak dapat mencari %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "gagal untuk kembali ke direktori kerja inisial" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, fuzzy, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -160,7 +201,7 @@ msgstr "" "melakukan apapun ketika -depth dalam efek. Jika anda ingin tetap " "melanjutkan, hanya secara eksplisit gunakan opsi -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -173,7 +214,7 @@ msgstr "" "dispesifikasikan sebelumnya juga untuk yang dispesifikasikan sesudahnya). " "Mohon spesifikasikan opsi sebelum argumen yang lain.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -182,7 +223,7 @@ msgstr "" "peringatan: opsi -d sudah ditinggalkan; lebih baik gunakan -depth, karena " "ini adalah featur dari POSIX-komplian." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -191,17 +232,17 @@ msgstr "" "%s bukan nama dari grup yang sudah ada dan ini tidak seperti sebuah numerik " "grup ID karena ini memiliki akhiran %s yang tidak terduga" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s bukan nama dari grup yang sudah ada" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "argumen ke -grup adalah kosong, tetapi seharusnya sebuah nama grup" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -211,7 +252,7 @@ msgstr "" "Path default adalah direktori saat ini; ekspresi default adalah -print\n" "ekspresi boleh terdiri dari: opertors, options, tests, dan actions:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -221,7 +262,7 @@ msgstr "" "operator (urutan menurun; -and adalah implisit bila tidak ada yang lain):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -235,7 +276,7 @@ msgstr "" " -depth --help -maxdepth TINGKAT -mindept TINGKAT -mount -noleaf\n" " --version -xdev -ignore_readdir_rage -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -249,10 +290,10 @@ msgstr "" " -ilname POLA -iname POLA -inum N -iwholename POLA -iregex POLA\n" " -links N -lname POLA -mmin N -mtime N -name POLA -newer BERKAS" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -262,11 +303,11 @@ msgstr "" " -wholename POLA -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -280,7 +321,7 @@ msgstr "" " -exec PERINTAH; -exec PERINTAH {} + -ok PERINTAH ;\n" " -execdir PERINTAH ; -execdir PERINTAH {} + -okdir PERINTAH ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -290,12 +331,12 @@ msgstr "" "halaman pelaporan bugs di http://savannah.gnu.org/ atau, jika anda tidak \n" "akses web, dengan mengirimkan email ke ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "pemeriksaan keadaan dari fungsi perpustakaan fnmatch() gagal." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -311,52 +352,47 @@ msgstr "" "menggunakan GNU grep, anda dapat menggunakan 'find ... -print0 | grep -FzZ " "%s'." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" "Diduga sebuah argumen desimal integer positif ke %s, tetapi diperoleh %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" "Sistem ini tidak menyediakan sebuah cara untuk menemukan waktu pembuatan " "dari sebuah berkas." -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: opsi `%s' membutuhkan sebuah argumen\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" "Saya tidak dapat menemukan bagaimana menginterprestasikan %s sebagai sebuah " "tanggal atau waktu" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Tidak dapat memperoleh waktu pembuatan dari berkas %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Mode %s adalah tidak valid ketika POSIXLY_CORRECT aktif." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "mode %s tidak valid" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -368,22 +404,22 @@ msgstr "" "dengan -perm -000; yang artinya, ketika ini digunakan untuk mencocokan bukan " "berkas, sekarang ini cocok kesemua berkas." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "Null argument tidak valid untuk -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "Type `%c' -size tidak valid" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "argumen `%s%c' tidak valid untuk -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -391,74 +427,82 @@ msgstr "" "Opsi -show-control-chars mengambil sebuah argumen tunggal yang harus berupa " "'literal' atau 'safe'" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "argumen %s tidak valid untuk -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, fuzzy, c-format msgid "%s is not the name of a known user" msgstr "%s bukan nama dari grup yang sudah ada" -#: find/parser.c:2678 +#: find/parser.c:2614 #, fuzzy, c-format msgid "The argument to -user should not be empty" msgstr "Argumen untuk opsi --max-database-age tidak boleh kosong" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Featur aktif: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Argumen ke -type seharusnya hanya berisi satu kata" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Argumen ke -type: %c tidak diketahui" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "peringatan: escape `\\%c' tidak dikenal" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "error: %s diakhir dari format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "peringatan: format direktif `%%%c' tidak dikenal" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "error: format direktif `%%%c' direserve untuk penggunaan masa datang" +msgid "Unknown argument to -type: %c" +msgstr "Argumen ke -type: %c tidak diketahui" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Direktori sekarang dimasukan dalam variabel lingkungan PATH, yang mana tidak " "aman dalam kombinasi dengan %s aksi untuk find. Mohon hapus direktori " "sekarang dari $PATH anda (hapus \".\" atau diawali atau diakhir kolon)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -469,7 +513,7 @@ msgstr "" "aman dalam kombinasi dengan %s aksi dari find. Mohon hapus masukan itu dari " "$PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -478,97 +522,103 @@ msgstr "" "Anda tidak boleh menggunakan {} didalam nama utilitas untuk -execdir dan -" "okdir, karena ini ada potensial untuk masalah keamanan." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Hanya satu instance dari {} yang didukung dengan -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Lingkungan terlalu besar untuk exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, fuzzy, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" "aritmetik overflow ketika mencoba untuk mengkalkulasi akhir dari hari ini" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" "aritmetik overflow ketika mencoba untuk mengkalkulasi akhir dari hari ini" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "standar error" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "standar keluaran" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "tidak dapat menghapus %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "gagal untuk kembali ke direktori kerja inisial" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "Peringatan: tidak dapat menentukan waktu pembuatan dari berkas %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Gagal untuk menulis ke standar keluaran" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Tidak dapat menutup standar masukan" +msgid "getfilecon failed: %s" +msgstr "" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Gagal untuk berpindah direktori" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "tidak dapat mem-fork" +msgid "warning: unrecognized escape `\\%c'" +msgstr "peringatan: escape `\\%c' tidak dikenal" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "Kesalahan waiting untuk %s" +msgid "error: %s at end of format string" +msgstr "error: %s diakhir dari format string" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s di-terminate oleh sinyal %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "error: format direktif `%%%c' direserve untuk penggunaan masa datang" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "peringatan: format direktif `%%%c' tidak dikenal" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "ekspresi tidak valid" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -577,22 +627,22 @@ msgstr "" "ekspresi tidak valid; anda telah menggunakan sebuah operator binari '%s' " "dengan tidak ada sebelumnya." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "diduga sebuah akspresi diantara '%s' dan ')'" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "diduga sebuah ekspresi setelah '%s'" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "ekspresi tidak valid; anda memiliki terlalu banyak ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -601,12 +651,12 @@ msgstr "" "ekspresi tidak valid; diduga untuk menemukan sebuah ')' tetapi tidak melihat " "satu. Mungkin anda butuh sebuah predikate lebih setelah '%s'" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "ekspresi tidak valid; tanda kurung kosong tidak diperbolehkan." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -615,114 +665,114 @@ msgstr "" "ekspresi tidak valid; Saya menduga untuk menemukan sebuah ')' disuatu tempat " "tetapi tidak melihat satu pun." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "oops -- tipe ekspresi tidak valid!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "oops -- tipe ekspresi tidak valid (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "jalur harus mendahului ekspresi: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "predikat `%s' tidak diketahui" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "predikat `%s' tidak valid" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "argumen `%s' tidak valid untuk `%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "argumen hilang untuk `%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "anda memiliki terlalu banyak ')'" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "ekstra predikat `%s' tidak diduga" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "ekstra predikat tidak diduga" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "oops -- penyisipan and baku tidak valid!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Penggunaan: %s [-H] [-L] [-P] [-Otingkat] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [jalur...] [ekspresi]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "tidak dapat merekam direktori kerja sekarang" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "tidak dapat merekam direktori kerja sekarang" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Mengabaikan tanda debug %s tidak dikenal" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Argumen kosong ke opsi -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "Opsi -D harus secara langsung diikuti oleh sebuah integer desimal" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Mohon spesifikasikan sebuah nomor desimal setelah -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Tingkat optimisasi %s tidak valid" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -731,7 +781,7 @@ msgstr "" "Tingkat optimisasi %lu terlalu tinggi. Jika anda ingin menemukan berkas " "secara cepat, pertimbangkan menggunakan GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -740,64 +790,380 @@ msgstr "" "Variabel lingkungan FIND_BLOCK_SIZE tidak didukung, sesuatu yang hanya " "mempengaruhi ukuran blok adalah variabel lingkungan FIND_BLOCK_SIZE" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argumen %s untuk %s tidak valid" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumen %s untuk %s ambigu" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Argumen yang valid adalah:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "kesalahan menutup berkas" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "error menulis" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Kesalahan sistem tidak dikenal" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: opsi `%s' ambigu\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: opsi `--%s' tidak membolehkan sebuah argumen\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: opsi `--%c%s' tidak membolehkan sebuah argumen\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: opsi `%s' membutuhkan sebuah argumen\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: opsi tidak dikenal `--%s'\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: opsi tidak dikenal `%c%s'\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: opsi tidak valid -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: opsi membutuhkan sebuah argumen -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: opsi `-W %s' ambigu\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: opsi `-W %s' tidak membolehkan sebuah argumen\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: opsi `%s' membutuhkan sebuah argumen\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "tidak dapat merekam direktori kerja sekarang" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "tidak dapat merekam direktori kerja sekarang" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "kehabisan memori" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "tidak valid %s%s argumen `%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "akhiran tidak valid dalam %s%s argumen `%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "%s%s argumen `%s'terlalu besar" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "perintah terlalu panjang" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "tidak dapat memuat argumen dalam batasan daftar argumen" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "daftar argumen terlalu panjang" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Gagal untuk menulis ke standar keluaran" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Dibuat menggunakan GNU gnulib versi %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Tipe ekspresi regular %s tidak diketahui; tipe yang valid adalah %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, fuzzy, c-format msgid "Unexpected suffix %s on %s" msgstr "tidak terduga EOF dalam %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "diduga sebuah ekspresi setelah '%s'" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Tipe ekspresi regular %s tidak diketahui; tipe yang valid adalah %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -806,8 +1172,8 @@ msgstr "" "Penggunaan: %s [--version | --help]\n" "atau %s most_common_bigrams < daftar-berkas > lokasi-basis-data\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -815,87 +1181,82 @@ msgstr "" "\n" "Laporkan bug ke .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "error menulis" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Penggunaan: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" "Anda perlu menspesifikasikan sebuah tingkat keamanan sebagai sebuah desimal " "integer." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Tingkat keamanan %s diluar dari jangkauan covertible." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "Tingkat keamanan %s memiliki akhiran tidak diduga %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "tingkat keamanan slocate %ld tidak didukung." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Gagal untuk menulis ke standar keluaran" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "hari" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "Argumen untuk opsi --max-database-age tidak boleh kosong" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "argumen %s tidak valid untuk opsi --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "basis data locate %s berisi sebuah nama berkas lebih panjang dari yang dapat " "ditangani oleh locate" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "basis data locate %s terkorupsi atau tidak valid" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Ukuran basis data locate: %s byte\n" msgstr[1] "Ukuran basis data locate: %s byte\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Nama berkas cocok: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Seluruh nama berkas: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -912,7 +1273,7 @@ msgstr "" "\t%s berisi karakter baris-baru, \n" "\tdan %s berisi karakter dengan high bit set.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -921,17 +1282,17 @@ msgstr "" "Beberapa nama berkas mungkin telah difilter keluar, jadi kita tidak dapat " "menghitup rasio kompresi.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Rasio kompresi %4.2f%% (lebih tinggi lebih baik)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Rasio kompresi tidak didefinisikan\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -941,7 +1302,7 @@ msgstr "" "memiliki tingkat keamanan %c, yang mana GNU findutils saat ini belum " "mendukungnya" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -950,7 +1311,7 @@ msgstr "" "%s adalah sebuah basis data slocate. Dukungan untuk ini adalah baru, diduga " "akan ada masalah untuk sekarang." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -958,7 +1319,7 @@ msgstr "" "%s adalah sebuah basis data slocate yang tidak mendukung tingkat keamanan " "%d; melewatkannya." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -969,35 +1330,35 @@ msgstr "" "dengan format basis data slocate dengan sebuah tingkat keamanan yang tidak " "nol. Tidak akan ada hasil yang dibuat untuk basis data ini.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s adalah sebuah basis data slocate. Mengaktifkan opsi '-e'." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "Format lama basis data locate %s terlalu pendek untuk menjadi valid" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Basis data %s berada dalam format %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Basis data memiliki pengkodean bahasa mesin little-endian.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "basis data memiliki pengkodean bahasa mesin big-endian.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Pengkodean basis data pengurutan bahasa mesin tidak jelas.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, fuzzy, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1017,62 +1378,62 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " pola...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "gagal untuk mendrop kewenangan grup" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "gagal untuk mendrop kewenangan setuid" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "gagal untuk secara lengkap mendrop kewenangan" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "gagal untuk mendrop kewenangan setgid" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "peringatan: basis data locate hanya dapat dibaca dari stdin sekali." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "time pemanggilan sistem gagal" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "peringatan: basis data %s berumur lebih dari %d %s (umur aktual adalah %.1f " "%s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, fuzzy, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" "Peringatan: basis data locate %s telah dibuat dengan pengurutan byte yang " "berbeda" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "tidak terduga EOF dalam %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "error pembacaan sebuah kata dari %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "Escape sequence %s tidak valid dalam spesifikasi pembatas masukan." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1081,7 +1442,7 @@ msgstr "" "Escape sequence %s tidak valid dalam spesifikasi pembatas masukan; nilai " "karakter tidak boleh melebihi %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1090,7 +1451,7 @@ msgstr "" "Escape sequence %s tidak valid dalam spesifikasi pembatas masukan; nilai " "karakter tidak boleh melebihi %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1099,7 +1460,7 @@ msgstr "" "Escape sequence %s tidak valid dalam spesifikasi pembatas masukan; akhira " "karakter %s tidak dikenal." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1108,43 +1469,58 @@ msgstr "" "Spesifikasi pembatasi masukan %s tidak valid; pembatas harus baik sebuah " "karakter tunggal atau sebuah urutan escape dimulai dengan \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "lingkungan terlalu besar untuk exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, fuzzy, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "Peringatan: nilai %ld untuk opsi -s terlalu besar, lebih baik menggunakan %ld" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Tidak dapat membuka berkas masukan %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "Variabel lingkungan anda mengambil %lu byte\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "batas atas POSIX dalam panjang argumen (di sistem ini): %lu\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1153,17 +1529,17 @@ msgstr "" "batas atas yang paling kecil yang diperbolehkan POSIX dalam panjang argumen " "(di semua sistem): %lu\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Panjang maksimal dari perintah yang dapat kita gunakan: %ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Ukuran dari buffer perintah yang saat ini kita gunakan: %lu\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1176,7 +1552,7 @@ msgstr "" "dicoba untuk membaca masukannya dan menjalankan perintah; jika ini bukan " "yang anda inginkan untuk terjadi, mohon ketik tombol akhir-dari-berkas.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1185,7 +1561,7 @@ msgstr "" "Peringatan: %s akan dijalankan paling tidak sekali. Jika anda tidak ingin " "ini untuk terjadi, tekan tombol interupsi (biasanya CTRL-C).\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1194,15 +1570,15 @@ msgstr "" "quote %s tidak cocok; secara baku quote adalah spesial ke xargs kecuali anda " "menggunakan opsi -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "ganda" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "tunggal" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, fuzzy, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1212,160 +1588,259 @@ msgstr "" "dilewatkan melalui daftar argumen. Apakah yang anda maksu untuk menggunakan " "opsi --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "baris argumen terlalu panjang" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Gagal untuk menulis ke standar keluaran" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Gagal untuk menulis ke standar keluaran" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "kesalahan waiting untuk proses anak" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, fuzzy, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "Peringatan: Hilang jejak dari %d proses anak" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: keluar dengan status 255; batal" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: dihentikan oleh sinyal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: di-terminate oleh sinyal %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: kesalahan bilangan untuk pilihan -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: nilai untuk opsi -%c seharusnya >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: nilai untuk opsi -%c seharusnya < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Penggunaan: %s [-Oprtx] [--interactive] [--null] [-d|--delimiter=pembatas]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=berkas]\n" -" [--version] [--help] [perintah [argumen-inisial]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "tidak dapat mengetahui direktori saat ini" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "argumen %s untuk %s tidak valid" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "argumen %s untuk %s ambigu" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Argumen yang valid adalah:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "error closing file" -#~ msgstr "kesalahan menutup berkas" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Kesalahan sistem tidak dikenal" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: opsi `%s' ambigu\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: opsi `--%s' tidak membolehkan sebuah argumen\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: opsi `--%c%s' tidak membolehkan sebuah argumen\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: opsi `%s' membutuhkan sebuah argumen\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: opsi tidak dikenal `--%s'\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: opsi tidak dikenal `%c%s'\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: opsi tidak valid -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: opsi membutuhkan sebuah argumen -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: opsi `-W %s' ambigu\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: opsi `-W %s' tidak membolehkan sebuah argumen\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" -#~ msgid "`" -#~ msgstr "`" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Mode %s adalah tidak valid ketika POSIXLY_CORRECT aktif." + +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Dibuat menggunakan GNU gnulib versi %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Penggunaan: %s [-Oprtx] [--interactive] [--null] [-d|--" +#~ "delimiter=pembatas]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=berkas]\n" +#~ " [--version] [--help] [perintah [argumen-inisial]]\n" -#~ msgid "'" -#~ msgstr "'" +#~ msgid "cannot get current directory" +#~ msgstr "tidak dapat mengetahui direktori saat ini" #~ msgid "Success" #~ msgstr "Sukses" @@ -1421,24 +1896,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Tidak ada ekspresi reguler sebelumnya" -#~ msgid "^[yY]" -#~ msgstr "^[yY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "kehabisan memori" - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "tidak valid %s%s argumen `%s'" - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "akhiran tidak valid dalam %s%s argumen `%s'" - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "%s%s argumen `%s'terlalu besar" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: opsi ilegal -- %c\n" diff --git a/po/it.gmo b/po/it.gmo index 34d4a443ebe7975e72cd847c5bdc36be45bfd65b..501b67479f07aa698783a4a7a8bc4ea666a59982 100644 GIT binary patch delta 13300 zcmcJU3z!tum4NSz2yq1EC2yfn5P|8D8QyOO7+{nca0XBr5o@|@W(sP$ny%^@K;1@V z)s+x6tsyZ6)WjsdqNZ`9qQ-!En@BdUuF*s^iDoySZXREvd2HDK+*>^_dH7|s^>OB} zx?Oc2=bm%!J(oxRr|7r)i?cr)*z1lWrPS-l6r_J2rKVEwn|?}3`O^cHqDVatk05eQ z8?4kra5|g_--3UFea}+rCfIw3Qgh%fa25O>TntAHRcZ;`0Qslx8LG1CRc@Z-X)4SO zQ|cP{ZCDMfhAXua-U9y9dMM z`lPOgqM1*_N$?=t2;YUxu!cs2k7v1Q;pXgfQ9Zl?ikA1la`*t03SWo(Qy=gLC8$xf zE*+Q=u>n%I+7a`m9luA2Is--T5itZ=95rVcMp`gIRa(GA3&*K z(0OJ=Q{f_>H$c(UUML;@2HXQ*f_dnnK2g1OKJ^zVwF%DVc^hhxf#l&V+E=e|BO~pP zo|rzh7+P>6lpgMYjqsU>)@0Po^Yw5Cdr?yR>IgErF`haE$|JEd2cfk4Z3AhCQaUS{?mCm8G zKTJZYFbhwIPetY5f@kymO7#2(IF{$$OmHuFKI{!+P|Byl%iuaV3O))4!yiB~=C`1{ zSG*AYQfMt`H>5GWd)4n^fI z6dTzAr6b>jH^KMdFxbwIIGnl_N(Zw~abt0F1pW{fRcXIehv8VBPg{l*F_#Bvp;uZJ8Mes0uQ~ZBG zE$XJ=_waQ1>MAo=zl5?h{srbKzwKhBh#{(~&iHQ{-pzAsy;2yyI%AFL_=RvS&-X(5 ztUiFE`Xv;;3NMFK;EZ*+BJHbYZsf&ZL-}w9!~ZkMxM#R;w<@HDL~lH~bQYaN!1HGy7q7A_c$VMvP_P70f4`3rE67 zpcv2h;aIq4qf%wC4UT~K!BOxzDDmQ_a4PJ7rBW%l6mEl$!|m__8$*W=!2Ynb5&cU= z^BYZ|xfHT~sNHZn+#fyvSM)p}Zr)oS@#=_=!I`}OHk9v2C(N8zLFsr4#QxOHP>l7* z5c^bbC9=loCOO6nDxnxvBNSu#1Qb<24MkJ^nv6BignN0u7(NSs1DPfDNHZNNQtD$Z zW&n#^<0WlyHoxBkXTjH?bZl^TlL-(rpv=`3@LKq2#EQ-MEYJI44wic6{pX;J_j9y;_yZz;#d>cmc`)-hUOR>IxzYWO0& z9@!k#q%HGSKvHq#Z1(%;bM4UU`D7AU{J1DS%XnnZUeP>_aq zz&oK>{ggJd_j>_~kqt);=fW9q30x1agnOY(*-wBdVu7E8 zm&2v-zhO-Lf7(@MeQt#F`C%Vi3x5h}TTNy7!Uv$t;n-`?25f+%;pBfZMt32U4sL;q z;2lsJei<@SbsBA52rq`i;9YPL!Y0rJoIk?hJonvUJ~$5!<~a#V;q|aLd^FL% zpftP}&V}EBVl%yV8aJE|NAjG3=fd0IdGK*K1ilVM!@u8&{-<+O{m*7kmxbr>{ByV- z_P)Wajy9CJ4dD!U7ZgqX7+wnBg))F;HyZEBK(U$k;UqYiC^il*gfj93d^2=Jho|$r4vv70S#IzQbq%b9zlEEraOx+_=5yaIyiEDKP^Mt%t;R^RP|BZy)o}1_ z>^7XI=7E$j#@GYJ{pJPi8vp3vMy2Q<$kl(e11N|e*g1)Fry%ya+ z4P~xZA)<*8`2w;Txf7X&pj6d_>_J5Ba{UB(4k<-?3a zmWTa_7~KM-7xD;l81a#v$PbYpAab3Lh^xtU2+1QqmIp3oRy`?QmH7}Wm1~jyOW1^% zfL85L_$lNYNExyhk&8H`r*0F(UbSJORehbsUs1nY4;g5C5@Y>V^n966R3%rlf&Odp z_eY4#=e@`fM6Sn?e?|HsPatxM(fu289kLuLTuTZ!5kC#TAKmYZD2A`w{||1yhkOQk z7@3F^u6k|`B3qCLqr$210pzR5#Zg%~{8)6~6%tY9dJK66!6EcsU@bf#?cdK$1=51Z zH2@in5MA{GGZ;F^X~=G*Ke7?I1Ci?@4cBWADzXo|$ z9=JvzcOx~(El3*qEV2S&{ZSrr4)S$Gt{0I{BJ<>d>q`deR5%7{L|#E&My^GkM{1F; zA=?mXU+qAqBMC&VZzHSqo%wSE_zp4B%q1?!PfNV`06U5=%?(^e7v)$5^%$>yLS_nzCil zd!i+|3Y~jlPi}Aj5p{z;W0WU9^+EXRXcc8*VsaI#x}CBXQ`AxRH_B%BD4Ts}zGOgH zoQ<_OUdsCLm2iWUXK%B@7B{f;J9aW*Ia}SZM47i^u~gcRJ3$Z&JU@)J+3ES~D(mM*-cvU7S~Hy=HqPO1f3NIEq;5U=e$MT$HbJ)^ZMVpfjTwdyN`I#`4p)1j^ZnDWwx7wk5I zR@F-_nSf71tJM!etMiAXpNutnc5*Y?kzUHc0xO$x(j~`kx=U%K4E>F6es!UFQLt%# zb=|5Zy7_d5(ROLx{18neP4b&I`OHDzPARAr}|V@jGKS!B!sKk2bLGFHcLYM5VDyL3bMTAVEzx6Q_E zLo4*HSe3;qmfK_ySV78(yG^c>n4A4@m%7(vS$^2!q}$zq_TmR#~^a-fDNl7AuLd2bN6w$$O=3p}Pgl zl@U^RU}cgWBRt6@YW>?mfQ4CCU8D8tHFP*lx893h0>Xx8r?pa7T8+3-!fCQI9>$5D z3s&zFGQ{0ZK8nU{508`~bTn@?jiDE&OZP7+8Wz{bF^ubJ4eDv@>H7MYP6xu-3xO^2 zWr;s2snAV^PTG!#ZkyB905Hea6gKV<${Y*VPKsql@jwUFSXw?$`Z0ctxlJ*L_qP?Q zU^K>N#LF<6j;?51N?M7muU%PU#*$SvHI=nX=bl_^x>lyyPlXbNwLOMbGhIhFQ8ieU z=h5$z)F$&E1uW0837CE|t^-pnD5yE!VyBIsB{Jv`r{hbsDp-C~K_6PDVhA#W`ei*~ zq142p(C8DGdt94ScurWTASfu>+3LhIp{N@5wdz{7N-eT9_NYM~b+OSkCc53R&JP^N ziUkuzH_q0$<0PC!N$#=1Bl6b`ev|b$+?H~z@$rJ{f=nvqr*-^u;g-N6c;0Y91rcP2n>#yXUY;%&OpoJyHbJA)_&o?T1yphiin^%jMEt6gx^){!hq$Iy@>>Wi+rRT_Yga|LY(M;&e&Xlc%hq^QAB+)c!v2{v?Ek=24 zyfdt037;hyOVpigZ*dAQN$9|SoTes>sm!vfn=DaxyKS}{aXXEHNlVFX%xLKZYm>~A zvo(c_xFL;7l#wYkZ5A|=FFSWv(STB#%`n{w3=)+GrTHhvZ8;@Bchb{E7p)EKW@nDf ze8Z~MYpPe(ZYV1&>xlXdUG*csl&DK8>uRfOm(Q_Q%7!>(k=rarH{Q$S`DjQ$DL9|Jq zybK|t#f`TV95%47oIfF7HY-+?|I+LiiiYa!icw%Pew@v+g_jdW@~OG|igV=^!zN(b z8FH>h$7=F|vvVtr0Jcj|(8j_HphgTSbC6XAWCP zqNLxPBsh?f2Km1%xS_bXydrm9<&uhNu_-fS<+H8w@;MbVCr>G#GNokos#u-V=1Nu= zTS{ls@Tyf&o`1jc+EX?hFAbJVEp3x95dYAxi*s7KRkIb575=z+FkzFg zZOhAL*AL4|@|$$rj#Pp5x!H4N{~%W^cAVTd>VV7IMOy5#-g_QZW|GY<&i3sRxaB$R zHgoIBB0=EsJ8LZ@yw)t!PT?>8YE4lO^JY@v?Wo6TU()fcCNC2Ney5HCpRIe8BkLBI6uv)6b|o4R1=C5g5{#|OSH?=z@Uuy)`)EJHo6y&b6+qjecGF-J!O_TS8#iK03-n-n^GoE(}_X+t6` ziywBlzOk<;zL52jJFof(21<2$p|M$kB_5mF(bP2dutcAzCN?YSLwBEa4sw5M9AN_2 zvGQeoQj2o+vcf`e(lrGS)VXt|IpsW2<{T|9C^D*dyk50)TQBODueoS((b-Gv)<##Cb!PoC z{k1ZamHQ+OXs1W;b`WJ8Fc)xQ-ZwjYnHO>@YXAW?j~!zj7iFn!bx+((m!4 zX>w>pyb!-ICj@3t;z7~2Rv!&SX94UUb)+}7nJC2J0R8YVe!bsBg}kKqZUIM%WQ~qB znh45qM4Dp(QtCp*(aC^amcOxPU{P_x&3~?TZ_(`Pq)ZL}5)OwSXouq_Q8-R@=>Ae! zgE|~4I$xC)o)2T^G;8R$QD9Qv}R%^YnE-~Re8D~5C5kKT8A#_M-Yh}$(u+Pu!sUMzy ztA1c{eU;f~7NWQ84LVi|tJ}80u?TIP&PXRaU(q`Vy+N2zI5@~Xk{Xfkx9&$pS+;Hx z7v+Ce^dSP9jW(9bjza`-u|g)VRT~{1h^a*jl&->M&LnjxB>l_)v5vZkWmdf$0?A$+ zO);l39+@yqFqTPTM5VGmQ@~k@K10xsP3WFbSjWssLRtQ`OL9g1H$Gofw>Iz#hX?C9Jg6$19?0rxHFQ;!IX#ela;<)Ij!dJh6`Wg;$zqR~qnsiX z+nY{ZgyCnBZoG4SCWYf27JuIFSX*S)JZ}POO!6wjSlnxY8&=AWx z_@Ko7g9rGZn9xb;G`MRzg>OFAblYkAJVH)?^3}~%#bel7ZRbovcha-l{IndjM~=^? zE0=a>oS9KJRu*ZGKap(L=#gw;wE9imheK7FM(6Mrf{-&@WJ^959Gg-TwIiE zOwH*l6<}F9#^pbsdZK7#SB;wE3u@5E7jFKt^wHvC&(1Zpjj7h5B5GFKpTr{Fs%-07 zdF6iz@f}AAlG-cg=nl8J%#1|xjO=LL+`H>W=GrpD&a2YDwy^K#fP=6pn+^JgC37!F z9k>D~97o!R=5}ZHumvRMMjO30pF6WQve7Wpg3HU%24;k(aN5zSc-j7#gAfyLSYrwW f64YduFRM)VfZS~ufwLtyq3wwxJAb6@#XkQF*yi|$ delta 6240 zcmb`Jd303O9mns)NF+jpKv)9E3nYYXvOyp$0Rl-Nm_U?Oh6t0)OY&qglVm0#M(cnm zB5uG7v@We+6;Z6B&$XUoUFxY;#bT|;1rZfmYqe^nbvZ8m{N8($L~H+Q@5y&Q_jliY zclq7l@4kHcK*GJ>cw)y=6L))*QV*j%^#18ed1%;sCd9t&ETxj*-SAl?W#m9?I0{aH zzlUGKQ*aynd#X}H;l@Eqy$-L3i=Z)BsU`4!I30S@R7{PbG9yi?Y`7L)0xyT@(qV{F zQ8*H2!ktk1KLm%t*Wn2G4=4*sVb+PT2o8XCkhQ2N%!gM(dH+!;?;RZ)Q)(=gFK8GJ zM>48RG|iz_!GqA51=`8p+PSTZo$>7pe*EbwzC~( zOy(K98}djUg#|E)QN#l?VF?VwFuV`8z>FN8K@%Q?hatzVIvI?3Rb4{nR|l!c3ZH_- z@GH0g7U6&Kz$H+k`4A*4)swFMB9t8-bM3DoURV7Ij6|3V`@pGC+GoM#um(!Z+z(@e zsk}sm<5ef1bWCJ>vXF65>;ROr-3q1O{ZNB1yZj7tT52$>m7^+xoSF(lGFf%Oq3|v! z3w{cw!sAmo|7t3q(I79D;?EGg7|IcR0Ok4MLZ!}vIwXKq8{`$$1;v%mLOJ`lp~OZe zgKdLVkPKC?LK*L4NVursxLbpBr{n*_RMyiVJIyUps;@_>bKyDIK5~wC)E!V{QT;GS>Y=H$(()2cd$RPC|B;HgXUY-Z1!gpXBJPB9PC^1u9;v7W<>|*?N(4swd zYCe|?l>^N775o$23;%#W#dR%Z&KNO~5no-GZ2=kzvQ3n*4Uk_zRhv6jn z0TkB{sd79}3WsBd;Nx%`Tmu&_VF9@ORwxU7W2qBE1BmP*=2x?*h-;$oT(}2rhVQ$) zkj9PJA3_rb&T}rTFQ6<~TjpHhxlrDp4Q0IRU_Lwq8A`niiEA}wxl*k#2xGFMx2YV1 zX)Bx#r(g-Tcct?=4#O?jAHpoyOvDlnY7e{s9)*OFnzh>5*`@Fu>^mWGsIDe(X90-=y;{ILPnZ5Bs4P`)_bI9A1n6<)&L%s}!47U9cT~;L=~`d~{xeFVUVF za4w*Cp#+mhcNRDv&cm*R1@KxZJADEYhw6-aC!3bRH0&T80xyeE$)R!s91Nd@li^#i z4@_=wI1o<29tK&9nh!O&AIf{bgPHIslpT5+ogL@G(b!Qa&%2<^_o&O*`)*~Z;Y?f( z7t$dDWx~hc2zU~Xg`NwYoo7MWK_wK=)xkpeD3k?$49CD_8=Nd?hpE^{U^YAfr%C?z z3p#1D01_{%2FeN_f}7z!gd-!TvWVnO0kB{w_4 zS__k~55O7l5KNK$|A30z;a|c@yx6zJiSj~nL|p5GGEp;>iFd#=;e${vrYB(p9)%^a z8e;?F?1EL;-$tE8wjjYKf~Z3nx7 zuR$K$eb>W9NQ&%AqIxKL5M6_QfuzVny6l?sZ(S*M*+lGT{IC#vr@+4Rr%Ht)Uco8q zJj7a5C%OuqhVDlD5t*m1LlQGmvK%PF#SX+=xC9+QGtpkutHkUm&!7eGDPqwMvUM;K zNx1}Z4XAt2!$?Y+13SRvXiAWrwUi=MZr8s5BNvqvIkH>O05RnJ<7FO|eJC7nfOFBb zUiJ{`ThO&=HEKY6kd!%SGrC%gUgaF>XCMi_c-cy22g;7mPqwImNCND1bUnHh%|{2( zWJDO)ac~7B*zK?6U2qn<2wA8fikF+IY(iJM4GHiLbT8V8h)Wfl#815Z+^wvIaw|&N z<-m^c;cmUarQlcSGE|Rr^h+e=r)WFcfNIg5NJ?J^>OO}t`-`>PZOnl;qBX8v;c~G{ zGSe;#_?_<7O_$^04X6&Kpj31@DnwF7qG}Wr!!2cU{^w&XM=Q~-Xa$lRZz;MBU5tKM z$UwV{<98I=hVsz^=pob}9YRuWa?t%7aBCA`vYfxa`;k&Vp?<$>PjFf3G6bdn?dWW` zO@k6#@3Ep2XHg-nN1{AbidLf_+JtUKkDwROadZmxIb$H7!w&P?)bxZk7n$jU((Btg zoiJoDd+6^d`)G?hQo=~uUZZW1bfU!D#^9`Ybi~_M(w6IV>+W~u#paEJ(qqXax6gef z=OyJ0B*UMJE8@W^sUvM$XseP=l=$#3)7I!Tb+^qXb!PmaZ6j^dzTaj|8C;iOE?&{! zd~j%9-$~w@s->l6n%CU1D9zlzBF~&MY`r;q^l+=+=ywv#tz%b?ncrpvqgq?U2sLO6 zm#oklLTy2#R%_Q=BStu+Wkr(BH^=TbKg%3wy_z|}lVOC6sNoM95nYQk`djsYx84Zq zTBASGs73v?LEZd3tJyp-F5ha&ZcH#sC#IU26Bk(9Ci)V}qjilkO*t=w{7rgfrVOvD z!U3I%W<<15II6WXctG3OsE4%brOPT-SDwFa!P4{2D_gK!dW1tcR+IM`kF_bc%VRx} ze}%_dIi=;aSYC5$w4+AzdA&v`s<-;w^#-6*|^c8nkYkJLE zp|$GGL4TbdpV{#BZm`F28+^szd(yLrkSrqR^|vsQ2nk&C!eOHkN6JQL)5Qd<65zMQNinUtPGV$sY=6J~#4Yb8Ss}h^eecrakX5 zA1E5;30Q}V9!)f#D&A)`&N=Qeqw^M9g(Wv7T7AnWd&aiv{s5kiwzY=zfYuh$JDT;n zC{<#ujo1s!(#)-M##>VtzUZ+=RNS1ft1{mVR^DwMtm<#=uG*I1nQo4*UeG_^n^)+~ z&)4#1%q%Q2!_^~_^SpUey#@JNL4nm(z4F*>9b&YTh`X#??+Q}Bs4b4uy zx^O69v>Opje=ul7{pLJ9Em7*`1^PNOrM}eqw0?l+3>+y_<(T(0WLr6n5s&$%;WG<1 zR9p94cp$-ip=nG$sTh`243YVE9)>kW*MiyMW@jBg$jBV)qozR#2^B%}zAJ}XP0dF< z)<>;7Jl6K;!T(1}l8%yl5+b@UZuCmY?xvoYbyBj`XlRVtap$C@*!qvAr2C|2fC^1U zjf5k1v>Nubwq*xucQST&ibpGJv@=n{)9xDkVIubG>E@x|zHRKZ>Xn7G_AI9-2meb7 z+H*x3|1h>wFFf7+S8U>ltcWt2n!}NZQ7fO3dcG(e zfImvao2xeMObY5z($;T%x~VL|Y}t~Y5HQSZx6HEIE!q Z!ED))WxldwkNM}Fk9kV0TX(&b^lzE>pJo66 diff --git a/po/it.po b/po/it.po index 4e1af02..add5e03 100644 --- a/po/it.po +++ b/po/it.po @@ -1,16 +1,16 @@ # Italian messages for GNU findutils. -# Copyright © 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# Copyright © 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. # This file is distributed under the same license as the findutils package. # Marco d'Itri , 2001. # Giovanni Bortolozzo , 1997-2000. -# Giorgio Catanzaro , 2009, 2010. +# Giorgio Catanzaro , 2009-2013. # msgid "" msgstr "" -"Project-Id-Version: findutils 4.5.7\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2010-04-21 22:22+0200\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-10-07 21:22+0200\n" "Last-Translator: Giorgio Catanzaro \n" "Language-Team: Italian \n" "Language: it\n" @@ -19,32 +19,71 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" -msgstr "Inizializzazione della tabella hash dei file condivisi fallita" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "" +"Salvataggio della directory di lavoro per eseguire un comando su %s non " +"riuscito" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Impossibile chiudere lo standard input" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Cambio di directory non riuscito" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "impossibile fare fork" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "errore aspettando %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminato dal segnale %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Inizializzazione della tabella hash dei file condivisi non riuscita" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "" +"il controllo interno della funzione di libreria fnmatch() non è riuscito." -#: find/find.c:205 +#: find/find.c:263 #, c-format msgid "cannot stat current directory" -msgstr "impossibile fare stat della directory corrente" +msgstr "impossibile per «stat» ottenere informazioni sulla directory corrente" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "Impossibile leggere l'elenco dei dispositivi montati." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "ATTENZIONE: il file system %s è stato recentemente smontato." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "ATTENZIONE: il file system %s è stato recentemente montato." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -53,7 +92,7 @@ msgstr "" "%s%s è cambiato durante l'esecuzione di %s (vecchio numero di device %ld, " "nuovo numero di device %ld, tipo di file system %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -63,17 +102,17 @@ msgstr "" "%, nuovo numero di inode %, tipo di file system %s) [ref " "%ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "ritorno alla directory padre non riuscito" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Cambio di directory sicuro in %s non riuscito" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -82,7 +121,7 @@ msgstr "" "Il collegamento simbolico %s è parte di un ciclo nella gerarchia delle " "directory; la directory a cui punta è già stata visitata." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -99,12 +138,12 @@ msgstr[1] "" "inode di una directory che è %d livelli più alta nella gerarchia del file " "system" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "attenzione: non segue il link simbolico %s" +msgstr "attenzione: non viene seguito il collegamento simbolico %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -119,12 +158,12 @@ msgstr "" "dell'opzione -noleaf di find. I risultati precedenti potrebbero non aver " "incluso directory che dovevano essere analizzate." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "Impossibile leggere l'elenco dei file system" +msgstr "Impossibile leggere l'elenco dei file system montati" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "sconosciuto" @@ -134,9 +173,9 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" "Rilevato un ciclo nel file system; %s è parte dello stesso ciclo nel file " -"system come %s." +"system di %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "ATTENZIONE: il file %s sembra avere modo 0000" @@ -144,16 +183,21 @@ msgstr "ATTENZIONE: il file %s sembra avere modo 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "impossibile cercare %s" +msgstr "impossibile cercare in %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "" -"ripristino della directory di lavoro dopo la ricerca di %s non riuscito" +"ripristino della directory di lavoro dopo la ricerca in %s non riuscito" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Inizializzazione della tabella hash dei file condivisi non riuscita" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " @@ -163,7 +207,7 @@ msgstr "" "quando -depth è attivato. Se si vuole proseguire comunque, usare " "esplicitamente l'opzione -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -176,7 +220,7 @@ msgstr "" "indicati sia prima che dopo di essa). Usare le opzioni prima degli altri " "argomenti.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -185,7 +229,7 @@ msgstr "" "attenzione: l'opzione -d è deprecata; usare l'opzione -depth che è conforme " "a POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -194,17 +238,17 @@ msgstr "" "%s non è il nome di un gruppo esistente e non sembra un id di gruppo " "numerico perché ha il suffisso non atteso %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s non è il nome di un gruppo esistente" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "l'argomento di -group è vuoto, ma deve essere un nome di gruppo" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -215,7 +259,7 @@ msgstr "" "-print\n" "l'espressione può essere formata da: operatori, opzioni, test e azioni:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -227,7 +271,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -241,7 +285,7 @@ msgstr "" " -depth --help -maxdepth LIVELLI -mindepth LIVELLI -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -255,9 +299,9 @@ msgstr "" "MODELLO\n" " -links N -lname MODELLO -mmin N -mtime N -name MODELLO -newer FILE" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -267,11 +311,11 @@ msgstr "" " -wholename MODELLO -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NOME -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context CONTESTO\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -285,7 +329,7 @@ msgstr "" " -exec COMANDO ; -exec COMANDO {} + -ok COMANDO ;\n" " -execdir COMANDO ; -execdir COMANDO {} + -okdir COMANDO ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -297,12 +341,13 @@ msgstr "" "non\n" "si ha accesso al web inviando una mail a ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." -msgstr "il controllo interno della funzione di libreria fnmatch() è fallito." +msgstr "" +"il controllo interno della funzione di libreria fnmatch() non è riuscito." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -317,76 +362,71 @@ msgstr "" "wholename» o forse «-samefile». In alternativa, se viene usato GNU grep, è " "possibile utilizzare «find ... -print0 | grep -FzZ %s»." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" "Atteso un intero decimale positivo come argomento di %s, ma ottenuto %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" "Il sistema non fornisce un modo per trovare la data di creazione di un file." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "Il test %s ha bisogno di un argomento" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Impossibile capire se interpretare %s come data o ora" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Impossibile ottenere la data di creazione del file %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "attenzione: -%s %s non corrisponde a nulla perché termina con /." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Modo %s non valido con l'opzione POSIXLY_CORRECT." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "modo %s non valido" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" -"Attenzione: è stato specificato uno schema di modi %s (che equivale a /000). " +"attenzione: è stato specificato uno schema di modi %s (che equivale a /000). " "Il significato di -perm /000 è stato cambiato per essere coerente con -perm " "-000, cioè mentre precedentemente non corrispondeva ad alcun file, adesso " "corrisponde a tutti i file." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "-size non può avere un argomento nullo" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "il tipo di -size \"%c\" non è valido" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "Argomento «%s%c» non valido per -size" +msgstr "Argomento «%s%s» non valido per -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -394,74 +434,91 @@ msgstr "" "L'opzione -show-control-chars richiede un argomento singolo che deve essere " "\"literal\" o \"safe\"" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Argomento %s non valido per -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "%s non è il nome di un utente conosciuto" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "L'argomento di -user non deve essere vuoto" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Funzionalità abilitate: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "opzione -context non valida: SELinux non è abilitato." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "L'argomento di -type deve contenere solo una lettera" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Argomento sconosciuto per -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c non è supportato perché i collegamenti simbolici non sono " +"supportati nella piattaforma su cui find è stato compilato." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "attenzione: sequenza di escape «\\%c» non riconosciuta" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c non è supportato perché le FIFO non sono supportate nella " +"piattaforma su cui find è stato compilato." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "errore: %s alla fine della stringa di formato" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c non è supportato perché i socket con nome non sono supportati nella " +"piattaforma su cui find è stato compilato." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "attenzione: direttiva di formato «%%%c» non riconosciuta" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c non è supportato perché le porte Solaris non sono supportate nella " +"piattaforma su cui find è stato compilato." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "errore: la direttiva di formato «%%%c» è riservata per uso futuro" +msgid "Unknown argument to -type: %c" +msgstr "Argomento sconosciuto per -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "La directory corrente è inclusa nella variabile di ambiente PATH, il cui " "utilizzo è insicuro in combinazione con l'azione %s di find. Rimuovere la " -"directory corrente da $PATH (cioè rimuovere \".\" o i due punti prima o dopo)" +"directory corrente da $PATH (cioè rimuovere \".\", doppi punti o i due punti " +"prima o dopo)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -472,7 +529,7 @@ msgstr "" "insicura in combinazione con l'azione %s di ricerca. Rimuovere la voce da " "$PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -481,97 +538,104 @@ msgstr "" "Non è possibile utilizzare {} nel nome dell'utility per -execdir e -okdir a " "causa di possibili problemi di sicurezza." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Solo un'occorrenza di {} è supportata con -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "In %s %s deve apparire da sé, ma è stato specificato %s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "L'ambiente è troppo grande per exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" "overflow aritmetico nella conversione di %s giorni in numero di secondi" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "overflow aritmetico nel calcolo della fine di oggi" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "standard error" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "standard output" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "impossibile eliminare %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "" -"ripristino della directory di lavoro dopo la ricerca di %s non riuscito" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "getfilecon non riuscito: %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "ATTENZIONE: impossibile determinare la data di creazione del file %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Scrittura su standard output non riuscita" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Impossibile chiudere lo standard input" +msgid "getfilecon failed: %s" +msgstr "getfilecon non riuscito: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Cambio di directory fallito" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "impossibile fare fork" +msgid "warning: unrecognized escape `\\%c'" +msgstr "attenzione: sequenza di escape «\\%c» non riconosciuta" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "errore aspettando %s" +msgid "error: %s at end of format string" +msgstr "errore: %s alla fine della stringa di formato" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s terminato dal segnale %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "errore: la direttiva di formato «%%%c» è riservata per uso futuro" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" +"attenzione: la direttiva di formato «%%%c» deve essere seguita da un altro " +"carattere" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "attenzione: direttiva di formato «%%%c» non riconosciuta" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "espressione non valida" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -580,22 +644,22 @@ msgstr "" "espressione non valida; è stato usato un operatore binario «%s» senza " "anteporre niente." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "attesa un'espressione tra \"%s\" e \")\"" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "attesa un'espressione dopo \"%s\"" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "espressione non valida: troppe \")\"" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -604,12 +668,12 @@ msgstr "" "espressione non valida; attesa \")\" ma non trovata. Forse è necessario un " "altro predicato dopo \"%s\"" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "espressione non valida: parentesi vuote non permesse." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -618,114 +682,116 @@ msgstr "" "espressione non valida; attesa una \")\" da qualche parte ma non ne sono " "state trovate." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "tipo di espressione non valido." -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "tipo di espressione non valido (%d)." -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"attenzione: non ci sono voci nella tabella dei costi di valutazione dei " +"predicati per il predicato %s; segnalare questo bug" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "i percorsi devono precedere le espressioni: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "predicato sconosciuto \"%s\"" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "predicato \"%s\" non valido" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "argomento «%s» non valido per «%s»" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "manca l'argomento per «%s»" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "troppe \")\"" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "predicato aggiuntivo \"%s\" non atteso" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "predicato aggiuntivo non atteso" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "inserimento predefinito di and non valido." -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Uso: %s [-H] [-L] [-P] [-Olivello] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [percorso...] [espressione]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "ritorno alla directory padre non riuscito" +msgstr "salvataggio della directory iniziale di lavoro non riuscito" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "ritorno alla directory padre non riuscito" +msgstr "ripristino della directory iniziale di lavoro non riuscito" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Ignorato flag di debug %s non riconosciuto" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Argomento vuoto per l'opzione -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "L'opzione -O deve essere immediatamente seguita da un intero decimale" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Specificare un numero decimale immediatamente dopo -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Livello di ottimizzazione %s non valido" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -734,7 +800,7 @@ msgstr "" "Livello di ottimizzazione %lu troppo alto. Per trovare i file più " "rapidamente, si suggerisce di usare GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -743,66 +809,386 @@ msgstr "" "La variabile di ambiente FIND_BLOCK_SIZE non è supportata, la dimensione dei " "blocchi è influenzata solo dalla variabile di ambiente POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "argomento «%s» non valido per «%s»" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "argomento «%s» non valido per «%s»" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "Argomento %s non valido per -used" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "errore di scrittura" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "Il test %s ha bisogno di un argomento" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "attenzione: sequenza di escape «\\%c» non riconosciuta" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: il numero per l'opzione -%c non è valido\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "Il test %s ha bisogno di un argomento" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "ripristino della directory iniziale di lavoro non riuscito" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "ripristino della directory iniziale di lavoro non riuscito" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "argomento «%s» non valido per «%s»" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "argomento «%s» non valido per «%s»" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "elenco degli argomenti troppo lungo" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "comando troppo lungo" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" "impossibile chiamare exec() per restrizioni alla dimensione dell'argomento" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" msgstr "un unico argomento eccede le dimensioni dell'elenco di argomenti" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "elenco degli argomenti troppo lungo" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" "La variabile di ambiente %s non è impostata a un valore decimale valido" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Il descrittore di file %d causerà un leak; segnalare questo bug, includendo " +"una descrizione dettagliata del modo più semplice di riprodurre questo " +"problema." + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Scrittura su standard output non riuscita" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Compilato usando GNU gnulib versione %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Tipo sconosciuto di espressione regolare %s; i tipi validi sono %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "Suffisso %s non atteso su %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" msgstr "Atteso un intero: \"%s\"" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Tipo sconosciuto di espressione regolare %s; i tipi validi sono %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -811,8 +1197,8 @@ msgstr "" "Uso: %s [--version | --help]\n" " %s bigrammi_più_comuni < elenco-di-file > database-di-locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -820,85 +1206,80 @@ msgstr "" "\n" "Segnalare i bug a .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "errore di scrittura" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Uso: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "Specificare un livello di sicurezza come intero decimale." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Il livello di sicurezza %s è fuori dall'intervallo convertibile." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "Il livello di sicurezza %s ha il suffisso %s non atteso." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "Il livello di sicurezza %ld di slocate non è supportato." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Scrittura su standard output non riuscita" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "giorni" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "L'argomento per l'opzione --max-database-age non deve essere vuoto" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Argomento %s non valido per l'opzione --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "il database locate %s contiene un nome di file più lungo di quanto locate " "possa gestire" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "il database locate %s è corrotto o non valido" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Dimensione del database locate: %s byte\n" msgstr[1] "Dimensione del database locate: %s byte\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Nomi dei file corrispondenti: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Tutti i nomi dei file: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -915,7 +1296,7 @@ msgstr "" "\t%s contengono ritorni a capo \n" "\te %s contengono caratteri con il bit alto impostato.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -924,17 +1305,17 @@ msgstr "" "Alcuni nomi di file possono essere stati esclusi dal filtro, quindi non è " "possibile calcolare il rapporto di compressione.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Rapporto di compressione %4.2f%% (più alto è meglio)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Rapporto di compressione non definito\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -943,7 +1324,7 @@ msgstr "" "il database locate %s appare come un database slocate ma con livello di " "sicurezza %c, non attualmente supportato da GNU findutils" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -952,7 +1333,7 @@ msgstr "" "%s è un database slocate. Il supporto per questi è nuovo, è possibile che si " "verifichino problemi per il momento." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -960,7 +1341,7 @@ msgstr "" "%s è un database slocate con livello di sicurezza %d non supportato e sarà " "tralasciato." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -971,38 +1352,38 @@ msgstr "" "i database in formato slocate con livello di sicurezza diverso da zero. Non " "sarà generato alcun risultato per questo database.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s è un database slocate. Attivata l'opzione \"-e\"." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "Il database con il vecchio formato locate %s è troppo piccolo per essere " "valido" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Il database %s è nel formato %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Il database ha una codifica little-endian per le parole macchina.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "Il database ha una codifica big-endian per le parole macchina.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" "Il database ha un ordine di codifica per le parole macchina non ovvio.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1021,64 +1402,64 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " modello...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "rimozione dei privilegi di gruppo non riuscita" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "rimozione dei privilegi di setuid non riuscita" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Rimozione totale dei privilegi non riuscita" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "rimozione dei privilegi di setgid non riuscita" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "attenzione: il database locate può essere letto da stdin una sola volta." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "chiamata di sistema time non riuscita" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "attenzione: il database %s è più vecchio di %d %s (l'età reale è %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" "ATTENZIONE: il database locate %s è stato compilato con un differente ordine " "di byte" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "EOF non atteso in %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "errore leggendo una parola da %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" "Sequenza di protezione %s non valida nella specifica del delimitatore " "dell'input." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1087,7 +1468,7 @@ msgstr "" "Sequenza di protezione %s non valida nella specifica del delimitatore " "dell'input; i valori del carattere non devono superare %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1096,7 +1477,7 @@ msgstr "" "Sequenza di protezione %s non valida nella specifica del delimitatore " "dell'input; i valori del carattere non devono superare %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1105,7 +1486,7 @@ msgstr "" "Sequenza di protezione %s non valida nella specifica del delimitatore " "dell'input; caratteri finali %s non riconosciuti." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1114,46 +1495,61 @@ msgstr "" "Specifica del delimitatore dell'input %s non valida: il delimitatore deve " "essere un singolo carattere o una sequenza di protezione che inizi per \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "l'ambiente è troppo grande per fare exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "attenzione: il valore %ld per l'opzione -s è troppo grande, viene usato " "invece %ld" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "l'opzione --%s non può essere impostata a un valore che include «=»" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "azzeramento della variabile di ambiente %s non riuscito" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "attenzione: l'opzione -E non ha effetto se è usato -0 o -d.\n" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Impossibile impostare il gestore del segnale SIGUSR1" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Impossibile impostare il gestore del segnale SIGUSR2" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Impossibile aprire il file di input %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "Le proprie variabili di ambiente occupano % byte\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" "Limite superiore POSIX sulla lunghezza di un argomento (in questo sistema): " "%\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1162,17 +1558,17 @@ msgstr "" "Il più piccolo possibile limite superiore POSIX sulla lunghezza di un " "argomento (in tutti i sistemi): %\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Lunghezza massima di un comando effettivamente usabile: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Dimensione del buffer di comando attualmente in uso: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1185,7 +1581,7 @@ msgstr "" "eseguire i comandi; se questo non è ciò che si vuole, digitare la sequenza " "di tasti end-of-file.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1194,7 +1590,7 @@ msgstr "" "Attenzione: %s sarà eseguito almeno una volta. Se non è ciò che si vuole, " "digitare la sequenza di tasti interrupt.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1203,15 +1599,15 @@ msgstr "" "virgolette %s non accoppiate; le virgolette hanno un significato speciale " "per xargs, a meno che si usi l'opzione -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "doppie" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "singole" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1220,100 +1616,283 @@ msgstr "" "ATTENZIONE: un carattere NUL è presente nell'input. Non può essere passato " "attraverso l'elenco degli argomenti. Si vuole usare l'opzione --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "la riga dell'argomento è troppo lunga" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Scrittura su standard output non riuscita" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "apertura di /dev/tty in lettura non riuscita" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Scrittura su standard output non riuscita" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "impossibile allocare memoria" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "impostazione della variabile di ambiente %s non riuscita" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "impossibile creare una pipe prima di un fork" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -"lettura di errno-buffer in xargs_do_exec non riuscita (questo è " +"safe_read di errno-buffer in xargs_do_exec non riuscita (questo è " "probabilmente un bug da riportare)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" "read ha restituito il valore non atteso %d; questo è probabilmente un bug da " "riportare" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "errore aspettando il processo figlio" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "ATTENZIONE: perso il tracciamento di %d processi figlio" +msgid "WARNING: Lost track of %lu child processes" +msgstr "ATTENZIONE: perse le tracce di %lu processi figlio" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: uscito con stato 255; termina" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: fermato dal segnale %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: terminato dal segnale %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: il numero per l'opzione -%c non è valido\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: il valore per l'opzione -%c deve essere >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: il valore per l'opzione -%c deve essere < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Uso: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E str-eof] [-e[str-eof]] [--eof[=str-eof]]\n" -" [-L max-righe] [-l[max-righe]] [--max-lines[=max-righe]]\n" -" [-I str-sost] [-i[str-sost]] [--replace[=str-sost]]\n" -" [-n max-arg] [--max-args=max-arg]\n" -" [-s max-car] [--max-chars=max-car]\n" -" [-P max-proc] [--max-procs=max-pro] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [comando [argomenti-iniziali]]\n" - -#~ msgid "cannot get current directory" -#~ msgstr "impossibile determinare la directory corrente" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Uso: %s [OPZIONE]... COMANDO [ARG-INIZIALI]...\n" + +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Esegue COMANDO con argomenti ARG-INIZIALI e ulteriori argomenti letti " +"dall'input.\n" +"\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Gli argomenti obbligatori e opzionali per le opzioni lunghe\n" +"sono anche obbligatori e opzionali per le opzioni corte.\n" + +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null gli elementi sono separati da null, non da " +"spazi;\n" +" disabilita il quote e la gestione del " +"backslash\n" +" e la gestione dell'EOF logico.\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=FILE legge gli argomenti da FILE, non dallo " +"standard input\n" + +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=CARATTERE gli elementi nel flusso di input sono " +"separati da CARATTERE,\n" +" non da spazi; disabilita il quote e la " +"gestione del backslash\n" +" e la gestione dell'EOF logico\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E FINE Imposta la stringa logica EOF; se FINE " +"occorre come una riga\n" +" di input, il resto dell'input è ignorato\n" +" (ignorato se è specificato -0 o -d)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=FINE] equivalente a -E FINE se FINE è " +"specificato;\n" +" altrimenti, non c'è la stringa end-of-file\n" + +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R come --replace=R\n" + +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] sostituisce R in ARG-INIZIALI con i nomi " +"letti\n" +" dallo standard input; se R non è " +"specificato,\n" +" assume {}\n" + +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=MAX-RIGHE usa al più MAX-RIGHE righe di input non vuote " +"per\n" +" riga di comando\n" + +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[MAX-RIGHE] simile a -L ma predefinito ad al più una riga " +"di\n" +" input non vuota se MAX-RIGHE non è " +"specificato\n" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=MAX-ARG usa al più MAX-ARG argomenti per riga di " +"comando\n" + +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=MAX-PROC esegue al più MAX-PROC processi per volta\n" + +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive chiede prima di eseguire i comandi\n" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=VAR imposta la variabile di ambiente VAR nei " +"processi figli\n" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty se non ci sono argomenti, non esegue " +"COMANDO;\n" +" se questa opzione non è data, COMANDO sarà\n" +" eseguito almeno una volta\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=MAX-CAR limita la lunghezza della riga di comando a " +"MAX-CAR\n" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits mostra i limiti sulla lunghezza della riga di " +"comando\n" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr " -t, --verbose stampa i comandi prima di eseguirli\n" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit esce se la dimensione (consultare -s) è " +"superata\n" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help mostra questo aiuto ed esce\n" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" +" --version stampa le informazioni di versione ed esce\n" diff --git a/po/ja.gmo b/po/ja.gmo index 27b015a23b0262ead0b8a27dc86ab701b82e87d6..e8388426c8f128a851e81b16df5b9fe496b3dceb 100644 GIT binary patch delta 4603 zcmZwJ2~btn8Nl)HJwOyiP!U8EdEkN=5l|Gw4HU&)gDY+k6sc8q;#T8haRZ}8QPh;g z7~@WedgExKX>HP`%{1CfHBD2sR$nwW%QTZXW~`3s|9j`sVKP0#_kQOb?z{Ia-?{L` zZs+E5r~4lreRn%Vi70x4?Gj<773^F86End?`^v<{8-wIHfiFw$Bi5SW>&f-LT27O#212GO~<6>Nm=aE}VBFi-rGjR^?L>=%~s4LMY%KLq{ zWKz)wZ$h2%yVwVRz#Zsf`mf_@Ovl;mlP+xo>VwXr4)_x!T_muV$UKZf-NN;#Io62# z9V9R6b!BwckbhE5C60~|o~lWdjsvg|b>^>O8h(m}7|!sEu^LnG5uU)oe3{*o+vtan zZJjI^&z06ldP#t7Bqs5ENv1L!i*PhHp)T!rs9D^*9|?v@=*?=>na{A>CCI8u75d^K zY=y_|{!>Ug$Q9I?e~av*_^~{0{bDaFI)Dt+_D1B{as>6lE9k=SZA1E-q#T60by>*j zOD%E|p5Z{rXt;qE%3b!@mUorRhU z?_hhpgF2x57{m3xgUk&3^Q92_$D$_XJk%9iiT+rRq4)~wDLI29F_4TM&wVDlspy{X zNj6J<4U1{}a}-A48ss3zIb`+a8m3|!GVc~nz&qG)sL7FzoH5;k?s$|3B;t>>Z?L~} zRc`8_KbcW{PTQT5YGx9VX3l#OZsr&J@mY)>Wsc<<P(u@g}3nr z`b^+$hPUt{mQ6H&@yy+b76k$WorJNqQ1>0RP6zSTl#;VOEyOiHoSY z@&K8uM3ISltc&Ne{)?&9(vg7oQ7`Px3;ZB6$iz;xAIujyg#k=kXLtcMM;;@qFC!P4 z32em|Xy3pcIPW=50e*uliqtRSC5HDf9It1)&Aa+Rw*AgVo-58A^N)frM$&d6_mok{ zs>uOl8|8s*IV^y1@~Z2bbm^v7nR58!l<8_ zSLkS5MSDJu!K+w_U6+}ydKtO5{28CZ!9O<>n2sdARG_ZNW!#8gVj31L=dFsT(WU1< ze}y@p+fkS1Bh(j%Up_AxOvcd|Q^1?e!LdZm=Bh$-I89pmV) zFE%Ul0qV@3U|&7|Jxa_we+ue|XX49Pj3l%Km2zabQ66eL=6SQ!6}XA^uaP{JF)PjA zkOQb&@Hgby63j9V=ld0yh`(8F26}%De;atd1gtelN7efehN>l#c%67l8m2?{fXm*7EYLVS+%Z-q=g;u z&RmbCmO6v5rQYIiTW$MG)EsCc+7e;JE@GzreD7bpqjc!eX+`uQh7;q7*+e3tg%$H= zvE^-1a1<@dV*#w|D6Lx6%kFH~{}Ek#6Hq!XuzrwJ`HTE7N!|*tRE#3Bh%t8Gi#Uns zLaev@f^GF|YuQim3h@5nc@?XO<`PdOjTlGtB?b^KVl|M&cq7!*`npuO~-~CfJXZz5Gs3ke1E{`4IJY7Dq;})8f`qXy;8j zH3_xo5^G=RIy3T?eT(SRS+wliMPJ-c`hHK}M7ys!Z!|~rzBw=0|Gx9;I1=0;^9D<+ zNvuWlP_Jpj&ggb(X&z4+eY%obn)|l?pX=UtTLB$5I_pk{gjR09yxNu&Wk8bkm$X`6Ygoo9U&izG#8Rtr(qU)at^Ceb_0&>-D|vQc ztGe3@BdmQ3&---0+i?7g{f9giO`giLp31j9Rhv9juX-wvda90jsxH(`&pBcR#qm2AcHiB7(o^wfiWQjmjqgv!^>Fz)r5~mflMbvd~SH0KjD!2Ep<*h}$he33;mD|Uyb@kT%_Bj(kyH;1% z{j=+Si+z53@AIASvA?~)3EP@8KiZcWyVyT#UxrfZEHVYT+D)kp9EZLJu{-)I)dQY{ zKSHGC^uvb3VIKS!_y_n~*am;qU#TH*!vLk;gS+4Y=pU$51$+_CfEj~SOpQjFIY_BH z;A;2?+zf|FhrvokU=AD$_dx0Y5*!NOgI|ZghO&@8%z7s*fZ5OsS&NFme7FtD_pdBUR^fcYjh20EC!qadRdQuO<`!**Myugyf&$$I=1HK<{xLvVh*> zoCuUc3F%{S4?G4t;LPz#mBNdV;HfbrluS4W%EDJeH{1*5NUy={%$QOm7!6%bCUe>e z^$I8p`90g&0Y^>b9XttnrQU~k!5)kv5h#Sk(1a%JgzMp`NxXvzcmloyId=6hgORUl zuaNoG2^3l3o3IFe4(GuF;x7?+1WGoafmEe>BW?c}$__84?LR`Iu6mOgS#UD!4yQu# z&w`b(3QEqr2x9|L-bLYf)nzChv)G<2WIPnx2jy(HLh1J+)bK)@zk!^V8pvwps0tvb zrc6jBtG#dtJPu{SZ^HiY(%qc@5|rQIkPl0VXAo|Jas;11c|UNPQhlKTNnjO)e4_S3 z3FVKVoc#w-a$_umwZTP@3RV9BWxP)z>7s5Y+#1fELHyrAS%X7%I=MipTQihe3h&2u zQ*(TyjzJ0KMJPFtf_-2%2P_L43G?`FGL)UJn#H2wdN>Sjg%Y{Lum^kt4u)^VP*$K^ zf^%U3rBKd5O;B>+P0m3=-<{fA5AT9frX4(}AZ0=FO?Btvd*D>~A&kNlT!B+^rl{CC zigNfJ#;=B7;E(lWmWNP!62A;yc;RJiqs-aKefK(dcnw^OfA)N?QP=^O!ifu(f8vYEDR_c$i3Ko!P zl50=$cpCl+#^$1IXVzYv{acXJP(NLz6q`~bNsKmV!XLxWpw#&f-A-sffz8;nS1ZM4 z)Hx`T$Y!>wj8_WRVsHG0!w(^8pvtSABu-Qle_6=|9PhyTHA>aO*~DLx#zi>I_F5|)y15h?85OV z{tw|ESna1w;D1AoO+EchE-Cm6cssnb&iMo4b2tina6lJCuI^31`6AkoAtT7|Ms+;QjCoC?V?|a_;g)P?9bLHGB#Vg|EO3@B);w zyDv;h!rd?*4v08MS_X5lPeR$qTX3Q5<@YFG$59&PuN$}q7Q-v>RhZl8OlZL(>?~%J z2$jIQ;3jwto`!N`wl`5J3+qdN!xB!tR$2S`pf_x9zi9CZy zTZHVjH78$6(Z7bop5j5I?W_d$nNAgj))$clEklUDB4YMMB#C(vIf_&v|A0smOOqUt zCZU&emPl40QcZ=(A>^hOvqL!w5BVcyXO-AvnpxybaJ?7`@qhWZw=65&2kPa@LhAaUez zF>Y#7O+AqwH~AzFb|ZJh(oXIb)ejkqbVGI_g zA_nptB5gmi16haEAkQPxB`LDvLM3y7ZA`c=`*Nc%3WE1k$#@%AK@jQnkZAd=y zUF0RCH*yA%_Kyy(KYeNKPS{J%-*f$y^CR?P+RjUJVVXfG{f{6c(mo9(xiUzK%Y9Ku z>l|bXQi`lZ0!TA*5P2DS8@Yu17U|xzA7`>9@l4-gnN3>~ul5~Qn;<#IGLkeI`U~25 zd|iQ*G!ozc;9DS_XkEU0$hEHQ=<-GIO?J9n?{{QdqA+_{tc19gre8_OrR8Ke!=Kyk zRD}5ColN;LzUktibqzm?Ec@y**5UhVzvu9kIG=WXoBX%zNai$cH&@V%hK-PhYeQzV zLAx3}kvhGkxU#ZrSp}96s@LubuBt_gOUtw?F?ao-Sjh1BJT(DByEcUU5l1tc3~$ud zd!+~7P-g~=pr_urF<99Du%Rp5HQo*D7R|5Hu1F}#Ad!s?hQ{e@s11ZmaYy|=UC}iR ztHZ)6tE?zqRHn0CO<($?DzR(8u;iKnA7&=z4PHLFBgYX;0=-y<%U z&j|SI{k$)-wW@Ted0VCpv(^=kgruwC?lP*h42k6~y6(F1(L!DCX>ze3BNmqL0`4w5 zTxHLF-ECE!y#|*|B!)es z?Y+@AY%kc$q2K6hTXtv1f1~#jyLUs#^wL}6AVb@x-97yRf4J@ea|3Z8wBeg}=OXiJ z%&>C|Mw35c?%`uGYh8`B#+JBo%Q#0dp%P;KDoMhXIA2qve4ghd%5pDmN`AOrSrjvEmoXwUy!>Ge6;zn{o-y?J96+&x!xD( zkDfS_dbTyyvHi-vGklonT-liTz&o;U%MPd`>obfR?GLT7Bc(v)$`}Bo;^&ir#d>VmR(j08Am3PUG2$RtA3f4 z%&Iw?ng8V*Ftv4y6+fnpQ0T^$DMKAUWyQ~5eeDN4DXl>>b*>dp*dxA>>UcWUMiuV1 zS}2Hg*`yA2vOIgTqgH&E6+dLf_gV4HdC6COZ}qbOu%a$@UVgQWdbPV9=WVLFLpDSy oTs^\n" "Language-Team: Japanese \n" @@ -17,32 +17,68 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "%s の探索後に作業ディレクトリを復元できませんでした" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "標準出力を閉じることができません" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "ディレクトリの変更に失敗しました" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "fork できません" + +#: find/exec.c:343 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "error waiting for %s" +msgstr "%s を待機中にエラーが発生しました" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s はシグナル %d で終了しました" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" msgstr "共有ファイルハッシュテーブルの初期化に失敗しました" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "fnmatch() ライブラリ関数による精密な検査に失敗しました。" + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "カレントディレクトリの情報を取得 (stat) できません" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "マウントされたデバイスの一覧を読み込めません。" -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "警告: ファイルシステム %s は最近アンマウントされました。" -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "警告: ファイルシステム %s は最近マウントされました。" -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -51,7 +87,7 @@ msgstr "" "%s%s は %s の実行中に変更されました (古いデバイス番号 %ld、新しいデバイス番" "号 %ld、ファイルシステムの種類 %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -60,17 +96,17 @@ msgstr "" "%s%s は %s の実行中に変更されました (古い iノード番号 %、新しい i" "ノード番号 %、ファイルシステムの種類 %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "親ディレクトリに戻ることができませんでした" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "ディレクトリ %s に安全に移動できませんでした" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -79,7 +115,7 @@ msgstr "" "シンボリックリンク %s がディレクトリ階層内でループしています。シンボリックリ" "ンクが指している先のディレクトリは既に移動したことがあります。" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -91,12 +127,12 @@ msgstr[0] "" "ファイルシステムのループが検出されました。%s はファイルシステム内の %d 階層上" "ディレクトリと同じデバイス番号および iノード番号です。" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "警告: シンボリックリンク %s をたどれません" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -110,12 +146,12 @@ msgstr "" "もしれません。 find の -noleaf オプションが自動的に有効になります。以前の結果" "は探索すべきディレクトリを含んでいないかもしれません。" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "マウントされているファイルシステム一覧を読み込めません" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "不明" @@ -127,7 +163,7 @@ msgstr "" "ファイルシステムのループが検出されました。 %s は %s のファイルシステムのルー" "プの一部になっています。" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "警告: ファイル %s のモードが 0000 になっています" @@ -137,12 +173,17 @@ msgstr "警告: ファイル %s のモードが 0000 になっています" msgid "cannot search %s" msgstr "%s を探索できません" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "%s の探索後に作業ディレクトリを復元できませんでした" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "共有ファイルハッシュテーブルの初期化に失敗しました" + +#: find/parser.c:452 #, fuzzy, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -153,7 +194,7 @@ msgstr "" "depth が有効なときには何も行いません。それでもこのまま実行したい場合は、明示" "的に -depth オプションを使用してください。" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -165,7 +206,7 @@ msgstr "" "位置オプションではありません (%3$s は前に指定しても後に指定してもテストに影響" "を及ぼします)。オプションは他の引数の前に指定してください。\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -174,7 +215,7 @@ msgstr "" "警告: -d オプションは廃止されました。-depth を使用してください。 -depth は" "POSIX に適合しています。" -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -183,17 +224,17 @@ msgstr "" "%s は存在しているグループ名ではありません。また予期しない接尾辞 %s があるため" "数値で指定したグループ ID でも無いようです。" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s は存在しているグループ名ではありません" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "-group に引数がありません。グループ名を引数として指定してください" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -204,7 +245,7 @@ msgstr "" "は -print です。評価式は演算子、オプション、テストおよびアクションで構成され" "ます。\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -216,7 +257,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -230,7 +271,7 @@ msgstr "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -245,9 +286,10 @@ msgstr "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" -#: find/parser.c:1244 +#: find/parser.c:1239 +#, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -257,11 +299,11 @@ msgstr "" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context CONTEXT\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -275,7 +317,7 @@ msgstr "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -285,12 +327,12 @@ msgstr "" "使用して報告 (および修正の進捗を追跡) してください。Web を利用できない場合\n" "は に E-mail を送ってください。" -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "fnmatch() ライブラリ関数による精密な検査に失敗しました。" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -305,47 +347,42 @@ msgstr "" "ん。代替の方法として GNU grep woを使用しているなら 'find ... -print0 | grep -" "FzZ %s' を使用することもできます。" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "%s の引数としては正の十進整数が予期されますが、 %s が指定されました" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "このシステムではファイルの生成日時を見つける方法を提供していません。" -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "%s test には引数が必要です" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "%s を日付または時間として解釈することができません" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "ファイル %s の生成日を取得できません" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "警告: -%s %s は / で終了しているため何に対しても一致しません。" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "POSIXLY_CORRECT が有効な時には %s は無効です。" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "無効なモードです: %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -356,22 +393,22 @@ msgstr "" "perm /000 の意味は -perm -000 との一貫性を保つために変更されています。過去に" "はどのファイルにも一致しませんでしたが、今は全てのファイルに一致します。" -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "-size に対する無効な空の引数です" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "無効な -size タイプ `%c' です" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "`%s%c' は -size に対する無効な引数です" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -379,74 +416,82 @@ msgstr "" "-show-control-chars オプションは引数を一つだけ指定し、'literal' または " "'safe' でなければいけません" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "%s は -used に対する無効な引数です" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "%s は存在しているユーザ名ではありません" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "-user の引数は空であってはいけません" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "有効になっている機能: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "-context は無効な述語です: SELinux が有効ではありません。" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "-type の引数は単一の文字のみ含むことができます" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "-type に対する不明な引数です: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "警告: 認識できないエスケープ `\\%c' です" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "エラー: 書式文字列の最後に %s があります" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "警告: `%%%c' は認識できない書式指定です" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "エラー: 書式指定 `%%%c' は将来使用するために予約されています" +msgid "Unknown argument to -type: %c" +msgstr "-type に対する不明な引数です: %c" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "カレントディレクトリが PATH 環境変数に含まれています。これは %s アクションと" "組み合わせて使用すると安全ではありません。カレントディレクトリを $PATH から削" "除してください (\".\" または先頭、最後にある \":\" を削除します)。" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -456,7 +501,7 @@ msgstr "" "PATH 環境変数に相対パス %s が含まれています。これは %s アクションと組み合わせ" "て使用すると安全ではありません。 $PATH から要素を削除してください。" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -465,117 +510,123 @@ msgstr "" "-execdir および -okdir のユーティリティ名の中で {} を使用しないでください。潜" "在的なセキュリティの問題を引き起こします。" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "-exec%s ... + ではただ一つの {} インスタンスのみサポートされます" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "exec () を実行するには環境変数が大きすぎます" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "%s日を秒数に変換中に計算オーバーフローが発生しました" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "本日の終了時間を計算中に計算オーバーフローが発生しました" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "標準エラー出力" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "標準出力" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "%s を削除できません" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "%s の探索後に作業ディレクトリを復元できませんでした" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "getfilecon に失敗しました: %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "警告: ファイル %s の生成日時を決定できません" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "標準出力への書き込みに失敗しました" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "標準出力を閉じることができません" +msgid "getfilecon failed: %s" +msgstr "getfilecon に失敗しました: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "ディレクトリの変更に失敗しました" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "fork できません" +msgid "warning: unrecognized escape `\\%c'" +msgstr "警告: 認識できないエスケープ `\\%c' です" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "%s を待機中にエラーが発生しました" +msgid "error: %s at end of format string" +msgstr "エラー: 書式文字列の最後に %s があります" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s はシグナル %d で終了しました" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "エラー: 書式指定 `%%%c' は将来使用するために予約されています" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "警告: `%%%c' は認識できない書式指定です" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "無効な評価式です" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "無効な評価式です。二項演算子 '%s' を使用していますが、前項がありません" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "'%s' および ')' の間に評価式が予期されます" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "'%s' の後に評価式が予期されます" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "無効な評価式です。')' が多すぎます" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -584,12 +635,12 @@ msgstr "" "無効な評価式です。')' が予期されますが、存在しません。多分 '%s' の後に追加の" "述語が必要です" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "無効な評価式です。空の小括弧は使用できません。" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -598,114 +649,114 @@ msgstr "" "無効な評価式です。 ')' がどこかにあることが予期されますが、一つも見つかりませ" "ん。" -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "おおっと -- 無効な評価式の種類です!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "おおっと -- 無効な評価式の種類 (%d) です!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "パス名は評価式の前に置かなければいけません: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "不明な述語です: `%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "無効な述語です: `%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "不正な引数 `%s' から `%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "`%s' に引数がありません" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "')' が多すぎます" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "予期しない余分な述語です: '%s'" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "予期しない余分な述語です" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "おおっと -- 無効なデフォルトの AND 挿入です!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "使用法: %s [-H] [-L] [-P] [-Olevel] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [path...] [expression]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "親ディレクトリに戻ることができませんでした" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "親ディレクトリに戻ることができませんでした" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "認識できないデバッグフラグ %s を無視しています" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "-D オプションに引数がありません。" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "-O オプションには直後に十進整数を続けなければいけません" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "-O の後には直後に十進整数を指定してください" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "無効な最適化レベルです: %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -714,7 +765,7 @@ msgstr "" "最適化レベル %lu は高すぎます。ファイル等を非常に素早く探したい場合は、GNU " "locate の使用を検討してください。" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -723,64 +774,381 @@ msgstr "" "環境変数 FIND_BLOCK_SIZE はサポートされていません。ブロックサイズに影響するの" "は POSIXLY_CORRECT 環境変数だけです。" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "不正な引数 `%s' から `%s'" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "`%2$s' に対する不明瞭な引数 %1$s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "有効な引数は:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "書き込みエラー" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "未知のシステムエラー" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: オプション`%s'は曖昧です\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: オプション`--%s'は引数をとりません\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: オプション`%c%s'は引数をとりません\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: オプションには引数が必要です -- %c\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: 認識できないオプション`--%s'です\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: 認識できないオプション`%c%s'です\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: オプションが違います -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: オプションには引数が必要です -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: オプション `-W %s' が曖昧です\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: オプション`-W %s'は引数をとりません\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: オプションには引数が必要です -- %c\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "親ディレクトリに戻ることができませんでした" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "親ディレクトリに戻ることができませんでした" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +#, fuzzy +msgid "memory exhausted" +msgstr "メモリを使い尽しました" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "不正な引数 `%s' から `%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "不正な引数 `%s' から `%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "引数リストが長すぎます" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "コマンドが長すぎます" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "引数の長さ制限により exec() を呼び出すことができません" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "引数リストのサイズ制限内で単一引数として収まりません" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "引数リストが長すぎます" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "環境変数 %s が十進整数に設定されていません" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "標準出力への書き込みに失敗しました" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Built using GNU gnulib version %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "%s は不明な正規表現タイプです。有効なタイプは %sです。" -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "%2$s に予期しない接尾辞 %1$s があります" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" msgstr "整数が予期されます: %s" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "%s は不明な正規表現タイプです。有効なタイプは %sです。" - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -789,8 +1157,8 @@ msgstr "" "使用法: %s [--version | --help]\n" "または %s most_common_bigrams < file-list > locate-database\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -798,84 +1166,79 @@ msgstr "" "\n" "バグを発見した場合は まで報告してください。\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "書き込みエラー" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "使用法: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "セキュリティレベルを十進整数で指定する必要があります。" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "セキュリティレベル %s は変換できる範囲を超えています。" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "セキュリティレベル %s に不明な接尾辞 %s があります。" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "slocate セキュリティレベル %ld はサポートされていません。" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "標準出力への書き込みに失敗しました" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "日" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "--max-database-age オプションは引数を指定しなければいけません" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "オプション --max-database-age に対する無効な引数です: %s" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "locate データベース %s には locate が取り扱うことができる長さを超えるファイル" "名が含まれています" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "locate データベース %s が壊れているか、無効です" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Locate データベースの大きさ: %s バイト\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "一致したファイル名: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "全てのファイル名: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -892,7 +1255,7 @@ msgstr "" "\t%s は改行文字を含み、\n" "\tおよび %s 最上位ビットが立っている文字を含みます。\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -901,17 +1264,17 @@ msgstr "" "いくつかのファイル名がフィルタによって取り除かれたため、圧縮率を計算すること" "ができません。\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "圧縮率 %4.2f%% (高いほど良い)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "圧縮率が定義されていません\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -920,7 +1283,7 @@ msgstr "" "locate データベース %s は slocate データベースであり、そのセキュリティレベル" "は %c です。これは GNU findutils ではサポートされていません。" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -929,14 +1292,14 @@ msgstr "" "%s は slocate データベースです。これに対するサポートは新しく、現在は問題があ" "るかもしれません。" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" "%s は slocate データベースでセキュリティレベルは %d です。スキップします。" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -947,37 +1310,37 @@ msgstr "" "ベルが 0 でないの場合には使用できません。このデーターベースに対する結果は生成" "されません。\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s は slocate データベースです。 '-e' を有効にしてください。" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "古い形式の locate データベース %s は短すぎるため有効ではありません" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "データベース %s は %s 形式です。\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" "データベースは WORD をリトルエンディアンで扱う計算機用エンコードです。\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" "データベースは WORD をビッグエンディアンで扱う計算機用エンコードです。\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "データベースのエンディアンが明確ではありません。\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -996,60 +1359,60 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "グループ権限を取り除くことに失敗しました" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "setuid 権限を取り除くことに失敗しました" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "権限を完全に取り除くことに失敗しました" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "setgid 権限を取り除くことに失敗しました" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "警告: locate データベースは標準入力からは1個しか読み込めません。" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "time システムコールに失敗しました" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "警告: データベース %s は %d %s より古いです (実際の古さは %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" "警告: locate データベース %s は異なったバイト順 (エンディアン) の計算機で作成" "されています" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "%s 内で予期しないファイル終端 (EOF) です" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "%s からの単語読み取り中にエラーが発生しました" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "無効なエスケープ文字列 %s が入力区切り文字指定内にあります。" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1058,7 +1421,7 @@ msgstr "" "無効なエスケープ文字列 %s が入力区切り文字指定内にあります。文字は %lx を超え" "てはいけません。" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1067,7 +1430,7 @@ msgstr "" "無効なエスケープ文字列 %s が入力区切り文字指定内にあります。文字は %lo を超え" "てはいけません。" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1076,7 +1439,7 @@ msgstr "" "無効なエスケープ文字列 %s が入力区切り文字指定内にあります。後に続く文字 %s " "が認識できません。" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1085,61 +1448,76 @@ msgstr "" "無効なエスケープ文字列 %s が入力区切り文字指定内にあります。区切り文字は単一" "の文字か \\ で始まるエスケープ文字列でなければいけません。" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "実行するには環境が大きすぎます" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "警告: -s オプションに対する値 %ld が大きすぎます。 %ld を代わりに使用してい" "ます" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "入力ファイル %s を開けません" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "環境変数が % バイトを占めます\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "POSIX の引数の長さ上限 (このシステム): %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "POSIX の最小の引数の長さの上限 (すべてのシステム): %\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "実際に使用できるコマンド長の最大値: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "実際に使用しているコマンドバッファの大きさ: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1152,7 +1530,7 @@ msgstr "" "込もうと試みています。もしこれを望んでいないなら、ファイル終端 (EOF) のキー入" "力を行ってください。\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1161,7 +1539,7 @@ msgstr "" "警告: %s は最低1回は実行されます。もしこれを望んでいないなら、割り込みのキー" "入力を行ってください。\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1170,15 +1548,15 @@ msgstr "" "%sクオートが一致しません。デフォルトでは -O オプションを指定しない限り xargs " "でクォートは特別な意味を持ちます" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "ダブル" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "シングル" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1187,150 +1565,267 @@ msgstr "" "警告: NUL 文字が入力にあります。これは引数のリストとして渡すことができませ" "ん。 --null オプションを使おうとしているのですか?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "引数行が長すぎます" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "標準出力への書き込みに失敗しました" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "/dev/tty を読み込むために開けませんでした" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "標準出力への書き込みに失敗しました" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "fork の前にパイプを作成できませんでした" -#: xargs/xargs.c:1184 -#, c-format +#: xargs/xargs.c:1289 +#, fuzzy, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" "xargs_do_exec 内で errno-buffer の読み込みに失敗しました (これは多分バグで" "す。報告してください)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" "read が予期しない値 %d を返しました。これは多分バグです。報告してください" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "子プロセスを待機中にエラーが発生しました" -#: xargs/xargs.c:1362 -#, c-format -msgid "WARNING: Lost track of %d child processes" +#: xargs/xargs.c:1468 +#, fuzzy, c-format +msgid "WARNING: Lost track of %lu child processes" msgstr "警告: %d 個の子プロセスの追跡が失われました" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: 終了ステータス 255。中止しています" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: シグナル %d によって停止しました" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: シグナル %d によって終了しました" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: -%c オプションに対する不正な番号\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: -%c オプションに対する値は %ld 以上でなければいけません\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: -%c オプションに対する値は %ld 未満でなければいけません\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"使用法: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "カレントディレクトリを取得できません" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "ambiguous argument %s for `%s'" -#~ msgstr "`%2$s' に対する不明瞭な引数 %1$s" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "有効な引数は:" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "未知のシステムエラー" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "%s: option `%s' is ambiguous\n" -#~ msgstr "%s: オプション`%s'は曖昧です\n" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "%s: option `--%s' doesn't allow an argument\n" -#~ msgstr "%s: オプション`--%s'は引数をとりません\n" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#~ msgid "%s: option `%c%s' doesn't allow an argument\n" -#~ msgstr "%s: オプション`%c%s'は引数をとりません\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#~ msgid "%s: unrecognized option `--%s'\n" -#~ msgstr "%s: 認識できないオプション`--%s'です\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#~ msgid "%s: unrecognized option `%c%s'\n" -#~ msgstr "%s: 認識できないオプション`%c%s'です\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: 不正なオプションです -- %c\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#~ msgid "%s: invalid option -- %c\n" -#~ msgstr "%s: オプションが違います -- %c\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#~ msgid "%s: option requires an argument -- %c\n" -#~ msgstr "%s: オプションには引数が必要です -- %c\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#~ msgid "%s: option `-W %s' is ambiguous\n" -#~ msgstr "%s: オプション `-W %s' が曖昧です\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#~ msgid "%s: option `-W %s' doesn't allow an argument\n" -#~ msgstr "%s: オプション`-W %s'は引数をとりません\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#~ msgid "block size" -#~ msgstr "ブロックサイズ" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" -#~ msgid "`" -#~ msgstr "`" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "POSIXLY_CORRECT が有効な時には %s は無効です。" -#~ msgid "'" -#~ msgstr "'" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Built using GNU gnulib version %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "使用法: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" + +#~ msgid "cannot get current directory" +#~ msgstr "カレントディレクトリを取得できません" + +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: 不正なオプションです -- %c\n" + +#~ msgid "block size" +#~ msgstr "ブロックサイズ" #~ msgid "Success" #~ msgstr "成功です" @@ -1368,9 +1863,6 @@ msgstr "" #~ msgid "Invalid range end" #~ msgstr "無効な終端範囲です" -#~ msgid "Memory exhausted" -#~ msgstr "メモリを使い尽しました" - #~ msgid "Invalid preceding regular expression" #~ msgstr "無効な前述の正規表現です" @@ -1386,12 +1878,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "以前に正規表現が定義されていません" -#~ msgid "^[yY]" -#~ msgstr "^[yY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - #~ msgid "Predicate List:\n" #~ msgstr "述語リスト:\n" diff --git a/po/ko.gmo b/po/ko.gmo index 752d53419ef39eccc543b92c8e3f759c9f4c32d1..e230dc8cb5fb025a56fb9ed1cdc66d26cc986222 100644 GIT binary patch delta 26 hcmdnbzn_0YJqxdiu7SC(p{0VMp_P&O<{lPfW&md<2HF4s delta 26 hcmdnbzn_0YJqxd)u7Rnpp`n6-rIo40<{lPfW&mc(2G{@q diff --git a/po/ko.po b/po/ko.po index 14f0973..d9e2d08 100644 --- a/po/ko.po +++ b/po/ko.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.1\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 1996-10-07 22:13+0900\n" "Last-Translator: Bang Jun-Young \n" "Language-Team: Korean \n" @@ -15,63 +15,99 @@ msgstr "" "Content-Type: text/plain; charset=EUC-KR\n" "Content-Transfer-Encoding: 8-bit\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" + +#: find/exec.c:256 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Cannot close standard input" msgstr "" -#: find/find.c:205 +#: find/exec.c:285 +#, fuzzy, c-format +msgid "Failed to change directory" +msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "%s¸¦ ±â´Ù¸®´Â µµÁß ¿À·ù ¹ß»ý" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s°¡ ½ÅÈ£ %d¿¡ ÀÇÇØ Á¾·áµÊ" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, c-format +msgid "The atexit library function failed" +msgstr "" + +#: find/find.c:263 #, fuzzy, c-format msgid "cannot stat current directory" msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "" -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "" -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -82,12 +118,12 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -97,12 +133,12 @@ msgid "" "searched." msgstr "" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "¾Ë ¼ö ¾øÀ½" @@ -112,7 +148,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -122,12 +158,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -135,7 +176,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -144,31 +185,31 @@ msgid "" "arguments.\n" msgstr "" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 #, fuzzy msgid "" "\n" @@ -181,7 +222,7 @@ msgstr "" "µÊ)\n" " ( EXPR ) | EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" -#: find/parser.c:1230 +#: find/parser.c:1225 #, fuzzy msgid "" "operators (decreasing precedence; -and is implicit where no others are " @@ -195,7 +236,7 @@ msgstr "" "µÊ)\n" " ( EXPR ) | EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -204,7 +245,7 @@ msgid "" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -213,19 +254,19 @@ msgid "" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -234,19 +275,19 @@ msgid "" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -256,47 +297,42 @@ msgid "" "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, fuzzy, c-format msgid "invalid mode %s" msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -304,92 +340,100 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "ºÎÀûÀýÇÑ -size Çü `%c'" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â Çü½Ä Áö½ÃÀÚ `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -397,411 +441,730 @@ msgid "" "entry from $PATH" msgstr "" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, fuzzy, c-format msgid "The environment is too large for exec()." msgstr "ȯ°æÀÌ ½ÇÇà(exec)Çϱ⿡ ³Ê¹« Å®´Ï´Ù" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" +#: find/pred.c:718 +#, c-format +msgid "WARNING: cannot determine birth time of file %s" +msgstr "" -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:782 #, c-format -msgid "getfilecon failed: %s" +msgid "< %s ... %s > ? " msgstr "" -#: find/pred.c:1507 +#: find/pred.c:784 #, c-format -msgid "WARNING: cannot determine birth time of file %s" +msgid "Failed to write prompt for -ok" msgstr "" -#: find/pred.c:1571 +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "< %s ... %s > ? " +msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:2032 +#: find/print.c:346 #, c-format -msgid "Cannot close standard input" +msgid "warning: escape `\\' followed by nothing at all" msgstr "" -#: find/pred.c:2061 -#, fuzzy, c-format -msgid "Failed to change directory" -msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" +#: find/print.c:365 +#, c-format +msgid "warning: unrecognized escape `\\%c'" +msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:385 #, c-format -msgid "cannot fork" +msgid "error: %s at end of format string" msgstr "" -#: find/pred.c:2123 +#: find/print.c:409 #, c-format -msgid "error waiting for %s" -msgstr "%s¸¦ ±â´Ù¸®´Â µµÁß ¿À·ù ¹ß»ý" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" -#: find/pred.c:2132 +#: find/print.c:417 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s°¡ ½ÅÈ£ %d¿¡ ÀÇÇØ Á¾·áµÊ" +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â Çü½Ä Áö½ÃÀÚ `%%%c'" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "" -#: find/tree.c:161 +#: find/tree.c:166 #, fuzzy, c-format msgid "invalid expression; you have too many ')'" msgstr "ºÎÀûÀýÇÑ ¼ö½Ä" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "" -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "À¹ -- ºÎÀûÀýÇÑ ¼ö½Ä ÇüÀÔ´Ï´Ù!" -#: find/tree.c:276 +#: find/tree.c:281 #, fuzzy, c-format msgid "oops -- invalid expression type (%d)!" msgstr "À¹ -- ºÎÀûÀýÇÑ ¼ö½Ä ÇüÀÔ´Ï´Ù!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "" -#: find/tree.c:1317 +#: find/tree.c:1323 #, fuzzy, c-format msgid "invalid predicate `%s'" msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, fuzzy, c-format msgid "invalid argument `%s' to `%s'" msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" -#: find/tree.c:1330 +#: find/tree.c:1336 #, fuzzy, c-format msgid "missing argument to `%s'" msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "À¹ -- and¸¦ ³»Á¤Ä¡·Î ºÎÀûÀýÇÏ°Ô »ðÀÔÇß½À´Ï´Ù!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "" -#: find/util.c:173 +#: find/util.c:177 #, fuzzy, c-format msgid "] [path...] [expression]\n" msgstr "»ç¿ë¹ý: %s [°æ·Î...] [¼ö½Ä]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" -#: find/util.c:816 +#: find/util.c:824 #, fuzzy, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: -%c ¿É¼Ç¿¡ ºÎÀûÀýÇÑ ¼ýÀÚ°¡ ÁÖ¾îÁü\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +#, fuzzy +msgid "memory exhausted" +msgstr "°¡»ó ¸Þ¸ð¸®°¡ ¹Ù´Ú³µÀ½" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "Àμö ¸í´ÜÀÌ ³Ê¹« ±é´Ï´Ù" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "¸í·ÉÀÌ ³Ê¹« ±é´Ï´Ù" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "Àμö ¸í´Ü ±æÀÌ Á¦ÇÑ¿¡ ´ÜÀÏ Àμö¸¦ ¸ÂÃâ ¼ö ¾ø½À´Ï´Ù" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "Àμö ¸í´ÜÀÌ ³Ê¹« ±é´Ï´Ù" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU find ¹öÀü %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 #, c-format -msgid "Unexpected suffix %s on %s" +msgid "Unknown regular expression type %s; valid types are %s." msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:81 #, c-format -msgid "Expected an integer: %s" +msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/regextype.c:107 +#: lib/safe-atoi.c:87 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." +msgid "Expected an integer: %s" msgstr "" -#: locate/code.c:127 +#: locate/code.c:131 #, fuzzy, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" msgstr "»ç¿ë¹ý: %s most_common_bigrams < list > coded_list\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, fuzzy, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "»ç¿ë¹ý: %s [-d °æ·Î] [--database=°æ·Î] [--version] [--help] ÆÐÅÏ...\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "" msgstr[1] "" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -812,44 +1175,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -857,35 +1220,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -897,138 +1260,153 @@ msgid "" " pattern...\n" msgstr "" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, fuzzy, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "°æ°í: µ¥ÀÌÅͺ£À̽º `%s'´Â %s ÀÌ»ó ¿À·¡µÇ¾ú½À´Ï´Ù" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "%s¸¦ ±â´Ù¸®´Â µµÁß ¿À·ù ¹ß»ý" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "ȯ°æÀÌ ½ÇÇà(exec)Çϱ⿡ ³Ê¹« Å®´Ï´Ù" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1037,148 +1415,286 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "µÎ¹è" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "´ÜÀÏ" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "Àμö ÇàÀÌ ³Ê¹« ±é´Ï´Ù" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "ÀÚ½Ä ÇÁ·Î¼¼½º¸¦ ±â´Ù¸®´Â µµÁß ¿À·ù ¹ß»ý" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: »óÅ 255À» °¡Áö°í Á¾·áµÊ; Áß´ÜÇÔ" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: ½ÅÈ£ %d¿¡ ÀÇÇØ ÁßÁöµÊ" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: ½ÅÈ£ %d¿¡ ÀÇÇØ Á¾·áµÊ" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: -%c ¿É¼Ç¿¡ ºÎÀûÀýÇÑ ¼ýÀÚ°¡ ÁÖ¾îÁü\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, fuzzy, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: -%c ¿É¼ÇÀÇ °ªÀº %ldº¸´Ù Å©°Å³ª °°¾Æ¾ß ÇÕ´Ï´Ù\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, fuzzy, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: -%c ¿É¼ÇÀÇ °ªÀº %ldº¸´Ù ÀÛ¾Æ¾ß ÇÕ´Ï´Ù\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"»ç¿ë¹ý: %s [-0prtx] [-e[ÆÄÀϳ¡-¹®ÀÚ¿­]] [-i[´ëü-¹®ÀÚ¿­]] [-l[ÃÖ´ë-Çà]]\n" -" [-n ÃÖ´ë-Àμö] [-s ÃÖ´ë-¹®ÀÚ] [-P ÃÖ´ë-ÇÁ·Î¼¼½º] [--null] [--eof[=ÆÄÀÏ" -"³¡-¹®ÀÚ¿­]]\n" -" [--replace[=´ëü-¹®ÀÚ¿­]] [--max-lines[=ÃÖ´ë-Çà]] [--interactive]\n" -" [--max-chars=ÃÖ´ë-¹®ÀÚ] [--verbose] [--exit] [--max-procs=ÃÖ´ë-ÇÁ·Î¼¼" -"½º]\n" -" [--max-args=ÃÖ´ë-Àμö] [--no-run-if-empty] [--version] [--help]\n" -" [¸í·É [Ãʱâ-Àμö]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#, fuzzy -#~ msgid "cannot get current directory" -#~ msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#, fuzzy -#~ msgid "invalid argument %s for %s" -#~ msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#, fuzzy -#~ msgid "Valid arguments are:" -#~ msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" + +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" + +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" + +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" + +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" + +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" + +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" + +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" + +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" #, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "GNU find ¹öÀü %s\n" #, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "°æ°í: ÀνÄÇÒ ¼ö ¾ø´Â À̽ºÄÉÀÌÇÁ `\\%c'" +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "»ç¿ë¹ý: %s [-0prtx] [-e[ÆÄÀϳ¡-¹®ÀÚ¿­]] [-i[´ëü-¹®ÀÚ¿­]] [-l[ÃÖ´ë-Çà]]\n" +#~ " [-n ÃÖ´ë-Àμö] [-s ÃÖ´ë-¹®ÀÚ] [-P ÃÖ´ë-ÇÁ·Î¼¼½º] [--null] [--eof[=" +#~ "ÆÄÀϳ¡-¹®ÀÚ¿­]]\n" +#~ " [--replace[=´ëü-¹®ÀÚ¿­]] [--max-lines[=ÃÖ´ë-Çà]] [--interactive]\n" +#~ " [--max-chars=ÃÖ´ë-¹®ÀÚ] [--verbose] [--exit] [--max-procs=ÃÖ´ë-ÇÁ·Î" +#~ "¼¼½º]\n" +#~ " [--max-args=ÃÖ´ë-Àμö] [--no-run-if-empty] [--version] [--help]\n" +#~ " [¸í·É [Ãʱâ-Àμö]]\n" #, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: -%c ¿É¼Ç¿¡ ºÎÀûÀýÇÑ ¼ýÀÚ°¡ ÁÖ¾îÁü\n" +#~ msgid "cannot get current directory" +#~ msgstr "½ÃÀÛ µð·ºÅ丮·Î µ¹¾Æ°¥ ¼ö ¾ø½À´Ï´Ù" #, fuzzy #~ msgid "Invalid regular expression" @@ -1208,22 +1724,6 @@ msgstr "" #~ msgid "Unmatched ) or \\)" #~ msgstr "ÀÏÄ¡µÇÁö ¾Ê´Â %s µû¿ÈÇ¥" -#, fuzzy -#~ msgid "memory exhausted" -#~ msgstr "°¡»ó ¸Þ¸ð¸®°¡ ¹Ù´Ú³µÀ½" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "ºÎÀûÀýÇÑ ¸ðµå `%s'" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "-size¿¡ ºÎÀûÀýÇÑ ³Î Àμö°¡ ÁÖ¾îÁü" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "Àμö ¸í´ÜÀÌ ³Ê¹« ±é´Ï´Ù" - #~ msgid "error in %s: %s" #~ msgstr "%s¿¡ ¿À·ù: %s" diff --git a/po/lg.gmo b/po/lg.gmo index 4c05d13fe3698a7e1348c4cfd65fc29cba7d01c3..6bacd1e6f1efab11e8290992f6e7c42eb6a36934 100644 GIT binary patch delta 1189 zcmZwFPe@cj9Ki8eS5r&V{8w96qiGiDrea7^=28R|ND)O*O3!xMp6h!L-rI-nN-PB( z0x3d*kWNwO4topg+)aWGMgO2nm;PKMNc#SES0ZZId7qix+4uYXX68xj!&v@9Q{_EH z>!!EUk3^K(hcgvCXk$^OHe&+2@FI5Nb=-uHa0@;|{;J+!BfiBJ{8BbjsZ97Ac4EE4HIS0;X39X$_wX_k6Pfd2Jd1A-bV@a6u09tZp7~>iB}VKD|TWNj^Q>u zjcvqNJ_8AG3#FnZ+>Hg)_#P$T3RYtk6WM`!?8AP%O(~Pu&HO8i4q|hSQhV?e_TV*? z_dZ6Jt7U8?zIw?(<0q6CM{7%4wXp@g_k(Qn@rqK$;XH z_eu(2gNsd$X?<~YnC)gD+ulHz^OXuHTAM7)Kl5_k4BMnz57G@>8K>+)Tj8jHt;A?)U`H?D+|G zNm$wKF}?|mc0wK4flbPxN`$2ZY@O@zvbLMEw3iOk zUd{xT&e^{GPwuPh$uS*D-exMyS@eiiSg4+hwD48N6yIQ`X06hq#h*1dHl$LsmTRXi RJ!4N#hsmTV%-0S@egkR{syYAw delta 728 zcmZY7yDvjg9KiA4)fPpSde-w2k7)JkjWj_hg9MR~h{Vd!fyCQjkaUy?1~(QqlQ0O~ zOh$uABn$|H(O=*Z-(S__m!5ul&*?emcYfy{1<%To&jI(o5H*?hiOsY}gD+w!OQZ^y zu?e@a5zny_@30!*u?W2`k#elcXk$Ll!>Hqv=*9$QizH=^9}RRYV<|dVkH=Vn*I0`$ z7{G6=!(vv^jiRWD3}G8iqlsI{26Boyc!8SuB}VWGca0?3d45lPz`y$#xWX`gV=IQ3 ztqV_}o?rvDT07W|C#VbFqbBCb{oS|;y*!7p17oNMP2eDIqQ(AllNtEH5}s?BWuc8) z+G#Aq4IINg)D2&ekNERM3NVNx*n)9f!ptqE=lkg^rfKrJu2ws#ccY=D\n" "Language-Team: Luganda \n" @@ -17,63 +17,99 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.0.1\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "ekilagiro ekya sisitemu ekya`fork()' kigaanye" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "wazzewo kiremya nga nnindirira %s" + +#: find/exec.c:352 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "%s terminated by signal %d" +msgstr "omulimu %s guyimirizidwa ekiragiro %d" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, c-format +msgid "The atexit library function failed" msgstr "" -#: find/find.c:205 +#: find/find.c:263 #, fuzzy, c-format msgid "cannot stat current directory" msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "" -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "" -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -84,12 +120,12 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -99,12 +135,12 @@ msgid "" "searched." msgstr "" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "tekimanyidwa" @@ -114,7 +150,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -124,12 +160,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -137,7 +178,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -146,31 +187,31 @@ msgid "" "arguments.\n" msgstr "" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 #, fuzzy msgid "" "\n" @@ -186,7 +227,7 @@ msgstr "" "pulogulamu ekibala nti ekifuula \"-and\" kyo wekiri):\n" " ( EMBOZ ) ! EMBOZ -not EMBOZ EMBOZ1 -a EMBOZ2 EMBOZ1 -and EMBOZ2\n" -#: find/parser.c:1230 +#: find/parser.c:1225 #, fuzzy msgid "" "operators (decreasing precedence; -and is implicit where no others are " @@ -203,7 +244,7 @@ msgstr "" "pulogulamu ekibala nti ekifuula \"-and\" kyo wekiri):\n" " ( EMBOZ ) ! EMBOZ -not EMBOZ EMBOZ1 -a EMBOZ2 EMBOZ1 -and EMBOZ2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -212,7 +253,7 @@ msgid "" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -#: find/parser.c:1239 +#: find/parser.c:1234 #, fuzzy msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" @@ -226,10 +267,10 @@ msgstr "" " -ipath KIGAMBO -iregex KIGAMBO -links N -lname KIGAMBO\n" " -mmin N -mtime N -name KIGAMBO -newer FAYIRO\n" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -238,11 +279,11 @@ msgstr "" " -size N[bckw] -true -type [bcdpfls] -uid N -used N -user LINNYA\n" " -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -251,19 +292,19 @@ msgid "" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -273,47 +314,42 @@ msgid "" "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: akawayiro `%s' k'etaaga agumenti\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, fuzzy, c-format msgid "invalid mode %s" msgstr "enkola `%s' tekola wano" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -321,93 +357,100 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "towadde agumenti eyetaagibwa ku kawayiro -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr " -size eweereddwa ekika, `%c', ekitakola wano " -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "agumenti `%s' tekozesebwa ku` %s'" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "agumenti %s tekozesebwa ku %s" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." msgstr "" -"kulabula: akabonero akufuula enneyisa ya bunnaako, `\\%c', tekategeerekese" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "kulabula: ekiragiro ekifuga entereeza, `%%%c', tekitegeerekese" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -415,325 +458,648 @@ msgid "" "entry from $PATH" msgstr "" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, fuzzy, c-format msgid "The environment is too large for exec()." msgstr "exec esanze nga enviromenti esukkiridde obunene" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" +#: find/pred.c:718 +#, c-format +msgid "WARNING: cannot determine birth time of file %s" +msgstr "" -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:782 #, c-format -msgid "getfilecon failed: %s" +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:784 +#, c-format +msgid "Failed to write prompt for -ok" msgstr "" -#: find/pred.c:1507 +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "WARNING: cannot determine birth time of file %s" +msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:1571 +#: find/print.c:346 #, c-format -msgid "< %s ... %s > ? " -msgstr "< %s ... %s > ? " +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2032 +#: find/print.c:365 #, c-format -msgid "Cannot close standard input" +msgid "warning: unrecognized escape `\\%c'" msgstr "" +"kulabula: akabonero akufuula enneyisa ya bunnaako, `\\%c', tekategeerekese" -#: find/pred.c:2061 +#: find/print.c:385 #, c-format -msgid "Failed to change directory" +msgid "error: %s at end of format string" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:409 #, c-format -msgid "cannot fork" -msgstr "ekilagiro ekya sisitemu ekya`fork()' kigaanye" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" -#: find/pred.c:2123 +#: find/print.c:417 #, c-format -msgid "error waiting for %s" -msgstr "wazzewo kiremya nga nnindirira %s" +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" -#: find/pred.c:2132 +#: find/print.c:425 #, c-format -msgid "%s terminated by signal %d" -msgstr "omulimu %s guyimirizidwa ekiragiro %d" +msgid "warning: unrecognized format directive `%%%c'" +msgstr "kulabula: ekiragiro ekifuga entereeza, `%%%c', tekitegeerekese" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "emboozi tekola wano" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "" -#: find/tree.c:161 +#: find/tree.c:166 #, fuzzy, c-format msgid "invalid expression; you have too many ')'" msgstr "emboozi tekola wano" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "" -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "oops -- ekika eky'emboozi ekyo tekikola wano!" -#: find/tree.c:276 +#: find/tree.c:281 #, fuzzy, c-format msgid "oops -- invalid expression type (%d)!" msgstr "oops -- ekika eky'emboozi ekyo tekikola wano!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, fuzzy, c-format msgid "paths must precede expression: %s" msgstr "sooka okuteekawo amakubo olyoke ozeeko emboozi" -#: find/tree.c:1297 +#: find/tree.c:1303 #, fuzzy, c-format msgid "unknown predicate `%s'" msgstr "puledikato `%s' tekola wano" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "puledikato `%s' tekola wano" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "agumenti `%s' tekozesebwa ku` %s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "`%s' ebulako agumenti" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "" -#: find/tree.c:1412 +#: find/tree.c:1418 #, fuzzy, c-format msgid "unexpected extra predicate '%s'" msgstr "puledikato `%s' tekola wano" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "" "oops -- esonsesewo and! etakolerawo. Enkola eya bulijjo kwe kusonsekawo " "\"and!\"" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "" -#: find/util.c:173 +#: find/util.c:177 #, fuzzy, c-format msgid "] [path...] [expression]\n" msgstr "Nkozesa eri: %s [kubo...] [mboozi]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" -#: find/util.c:816 +#: find/util.c:824 #, fuzzy, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "" "kulabula: akabonero akufuula enneyisa ya bunnaako, `\\%c', tekategeerekese" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "agumenti %s tekozesebwa ku %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "agumenti %s ku %s ebuzabuza" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Augumenti z'oyinza okukozesa ziri:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Kiremya atategeerese mu sisitemu" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: akawayiro '%s' kabuzabuza\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: akawayiro '--%s' tekateekebwa ko agumenti\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: akawayiro `%c%s' tekateekebwa ko agumenti\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: akawayiro `%s' k'etaaga agumenti\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: akawayiro `--%s' tekamanyidwa\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: akawayiro `%c%s' tekamanyidwa\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: akawayiro --%c tekakola\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: akawayiro k'etaaga agumenti --%c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: akawayiro `-W %s' kabuzabuza\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: akawayiro `-W %s' tekateekebwa ko agumenti\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: akawayiro `%s' k'etaaga agumenti\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "ggwanika lijjudde" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "agumenti `%s' tekozesebwa ku` %s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "agumenti `%s' tekozesebwa ku` %s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "olukalala olwa agumenti luyitiridde obuwanvu" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "ekiragiro kiyitiridde obuwanvu" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" "agumenti eya sekinnomu tejja mu nkomo eziteekeddwa ku nkalala eza agumenti" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "olukalala olwa agumenti luyitiridde obuwanvu" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU find ey'omutindo %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 #, c-format -msgid "Unexpected suffix %s on %s" +msgid "Unknown regular expression type %s; valid types are %s." msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:81 #, c-format -msgid "Expected an integer: %s" +msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/regextype.c:107 +#: lib/safe-atoi.c:87 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." +msgid "Expected an integer: %s" msgstr "" -#: locate/code.c:127 +#: locate/code.c:131 #, fuzzy, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -742,8 +1108,8 @@ msgstr "" "Nkozesa eri: %s bigulamu_ezisinga_okusangibwa < lukalala > " "lukalala_olutegeke\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 #, fuzzy msgid "" "\n" @@ -753,83 +1119,78 @@ msgstr "" "Wereza embuulire ku biwuka by'osanze mu pulogulamu eri ba ." -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "ennaku" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, fuzzy, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "agumenti %s tekozesebwa ku %s" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "" msgstr[1] "" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -840,44 +1201,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -885,35 +1246,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -925,138 +1286,153 @@ msgid "" " pattern...\n" msgstr "" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, fuzzy, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "kulabula: olukalala `%s' emaze %d %s nga tezzibwanga buggya" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "wazzewo kiremya nga nnindirira %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "exec esanze nga enviromenti esukkiridde obunene" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1065,185 +1441,285 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "nakabirye" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "sekinnomu" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "agumenti eyitiridde obuwanvu" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "wazzewo kiremya nga nnindirira omulimu oguzaalukusiddwa mu gunnaagwo" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: omulimu gumaliddwa nga gulina embeera eya 255, mbivuddeko" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: omulimu guyimiriziddwa ekiragiro %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: omulimu gukomekkerezedwa ekiragiro %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: omuwendo guno tegukola ku kawayiro -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, fuzzy, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: akawayiro -%c kateekwa okubeera nga >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, fuzzy, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: akawayiro -%c kateekwa okubeera nga < %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Enkozesa eri: %s [-0prtx] [-e[kigambo-kya-eof]] [-i[kigambo-ekinaddawo]]\n" -" [-l[max-mboozi]] [-n max-agumenti] [-s max-nukuta]\n" -" [-P max-mirimu] [--null] [--eof[=kigambo-kya-eof]]\n" -" [--replace[=kigambo-ekinaddawo]] [--max-mboozi[=max-mboozi]]\n" -" [--interactive] [--max-chars=max-nukuta] [--verbose] [--exit]\n" -" [--max-procs=max-mirimu] [--max-args=max-agumenti]\n" -" [--no-run-if-empty] [--version] [--help]\n" -" [orden [agumenti-ezisooka]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "agumenti %s tekozesebwa ku %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "agumenti %s ku %s ebuzabuza" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Augumenti z'oyinza okukozesa ziri:" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Kiremya atategeerese mu sisitemu" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: akawayiro '%s' kabuzabuza\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: akawayiro '--%s' tekateekebwa ko agumenti\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: akawayiro `%c%s' tekateekebwa ko agumenti\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: akawayiro `%s' k'etaaga agumenti\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: akawayiro `--%s' tekamanyidwa\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: akawayiro `%c%s' tekamanyidwa\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: akawayiro --%c tekakola\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: akawayiro k'etaaga agumenti --%c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: akawayiro `-W %s' kabuzabuza\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" #, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: akawayiro `-W %s' tekateekebwa ko agumenti\n" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "GNU find ey'omutindo %s\n" -#~ msgid "`" -#~ msgstr "`" +#, fuzzy +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Enkozesa eri: %s [-0prtx] [-e[kigambo-kya-eof]] [-i[kigambo-ekinaddawo]]\n" +#~ " [-l[max-mboozi]] [-n max-agumenti] [-s max-nukuta]\n" +#~ " [-P max-mirimu] [--null] [--eof[=kigambo-kya-eof]]\n" +#~ " [--replace[=kigambo-ekinaddawo]] [--max-mboozi[=max-mboozi]]\n" +#~ " [--interactive] [--max-chars=max-nukuta] [--verbose] [--exit]\n" +#~ " [--max-procs=max-mirimu] [--max-args=max-agumenti]\n" +#~ " [--no-run-if-empty] [--version] [--help]\n" +#~ " [orden [agumenti-ezisooka]]\n" -#~ msgid "'" -#~ msgstr "'" +#~ msgid "cannot get current directory" +#~ msgstr "nemedwa okufuna etterekero ekiragiro mwe kiweereddwa" #~ msgid "Success" #~ msgstr "Omulimu gumalirizidwa bulungi" @@ -1301,27 +1777,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Emabega tewali yo mboozi enoonya ebifaanagana" -#~ msgid "^[yY]" -#~ msgstr "^[yY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "ggwanika lijjudde" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "agumenti `%s' tekozesebwa ku` %s'" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "agumenti `%s' tekozesebwa ku` %s'" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "olukalala olwa agumenti luyitiridde obuwanvu" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: akawayiro --%c tekakkirizibwa\n" diff --git a/po/lt.gmo b/po/lt.gmo index c6e47b624dee6fbc8fcbb03958bdd23c387e3e24..e407b1b79d1268aa0e7dce434cc936996d64f8ae 100644 GIT binary patch delta 1835 zcmZwHT}&KR7{>8KS*p-tVWF^;woFSYmJcn^O1nj{RihUMwJ9bof*oX_Bg}5y*+o#3 zZDMP%x0_00j4f(R6F-yHU^Kyxz(rd%jfo~2(^$0C8*5@>Qj%Wye}=_+;YrT^W@pdL zdEfV(v#0i)?Mhz?hfW#VKKgok(+Xn_Vn>J%+L;1lw&65R;sxx+11pVLhi~8(oW%(K zg4K8f^DuIYF(tST!`O)Wy%U>_Nt;7l)No@GH{n^l4bNjI{(zb&a;q^LunqP5qqrIm zqsDnyiSOVr&fyF;6&h2HzhW;gA`_dQB4g^A-@L$u2E2_`_&JiK`7!6us7$V+D)c*6 zV8N;-*P}9Q%XuHFcs;0$522p(Q1hHbC3+egncsZDg(Ck0m1zNK=|Kx0!8W`LkE532 zQ&a#~P!r!kmA<&xm^$2w7CwaEpof~UgR&KpNk6XP`w>3U+qf~#g(7>Mw^3~~gPPzo zBqsAcuEhmhWc+oE^8GKOoWkZZW1hfyR3LS{tO+|&35}pC`y%G!8RQk_&2s9m%s=8r zJ${XM;NMt_TbNaw>p>)FAC;MlT8c?jW>d)UAX^1; z4_!^c^H&lCwNE#4tr2s7ExMBqcI{6|J3VMxgXOl13rL|-O%3~>+UoC zy%Puf%wc1D1MYAtp3;D&p;n!54aF0Xxl;J}>L*9zz8f31hTKsn6D^t!|IfH@i!QBk zym(^5a>kF?DIyunzPD!%Vr#@~ delta 1339 zcmX}sPe@cz6vy$SGv=RhG;OkRv>YqT$*dW3bW%u=S_LK)VF;B$NJ&xj7hB9mDk3O& zSs}Hk3|fR01GVT6*2bu?pu(b%3X)c~3lxODzc=cI>*w7&Z|0qI?s?v8>2FSs7km4S zkzkfHzh{_j!y6v{Fur)rBKQ^0qbJL(4KHE{zu`*!he0e`z{Gl7i0xR6U9y%Y_m;JhUsxr+Ozz$Tvhp+}Op#pe{%Jd_);{-Nfqc2^- z!&t)lI;v6+u!`r~Yc9e#iKAFZdTvE9H-im7dyq%^5!NA8Ae-4FS=)vB;V$GS>@+UM zKAhtI0c>J@rO50WzQ;Y-O|(fxGQ!1L{DCUDe^I(b)u@WJqB7i$Dq#<EOTG=n7wyBj<3Cl2F&yiIy_m_rnLa5JjO z4$gWOm+3xK<}Xo!k0EVke^5R27s=85WL=5jAobS|wz8p2j-o2k&z}|?LX~b3*I-Jv%l!Bn|9J-0gasau_TRAZ{L#6LfDgpJHFQ`IKn-H<*Dsgh+fskTL#bA!IJ z^~~7Z2CCzEW8I-M)`&CJSo#N}>RIY$)|re{DEn=uGoAa$8O{qiS-wu^m~X(T&i|Y$ z@V9&YvD#?7HWmv\n" "Language-Team: Lithuanian \n" @@ -20,63 +20,99 @@ msgstr "" "%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: KBabel 1.11.4\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Nepavyko pakeisti aplanko" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Nepavyko užverti standartinio įvedimo" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Nepavyko pakeisti aplanko" + +#: find/exec.c:312 xargs/xargs.c:1229 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "cannot fork" msgstr "" -#: find/find.c:205 +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "klaida laukiant %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s nutrauktas signalo %d" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, c-format +msgid "The atexit library function failed" +msgstr "" + +#: find/find.c:263 #, fuzzy, c-format msgid "cannot stat current directory" msgstr "" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "Ä®spėjimas: failų sistema %s neseniai atjungta." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "Ä®spėjimas: failų sistema %s neseniai prijungta." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "Nepavyko pakeisti aplanko" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -88,12 +124,12 @@ msgstr[0] "" msgstr[1] "" msgstr[2] "" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -103,12 +139,12 @@ msgid "" "searched." msgstr "" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "nežinomas" @@ -118,7 +154,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -128,12 +164,17 @@ msgstr "" msgid "cannot search %s" msgstr "%s: nepavyko perskaityti: %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "Nepavyko pakeisti aplanko" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -141,7 +182,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -150,31 +191,31 @@ msgid "" "arguments.\n" msgstr "" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -184,7 +225,7 @@ msgstr "" "numatytasis kelias yra esamas aplankas; numatytoji iÅ¡raiÅ¡ka yra -print\n" "iÅ¡raiÅ¡ka gali bÅ«ti sudaryta iÅ¡ operatorių, opcijų, testų ir veiksmų:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -195,7 +236,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -209,7 +250,7 @@ msgstr "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -224,10 +265,10 @@ msgstr "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -237,11 +278,11 @@ msgstr "" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -255,7 +296,7 @@ msgstr "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -265,12 +306,12 @@ msgstr "" "praneÅ¡imo puslapį http://savannah.gnu.org/ arba, jei neturite prieigos prie\n" "žiniatinklio, iÅ¡siuntę el. laiÅ¡ką adresu ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -280,47 +321,42 @@ msgid "" "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "Tikėtasi teigiamo deÅ¡imtainio skaičiaus argumento %s, bet gauta %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: argumentas „%s“ reikalauja parametro" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -328,92 +364,100 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" -#: find/parser.c:2274 +#: find/parser.c:2210 #, fuzzy, c-format msgid "invalid null argument to -size" msgstr "netaisyklingas parametras %s argumentui %s" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "netaisyklingas -size tipas „%c“" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "Galimi argumentai:" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "Galimi argumentai:" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 -#, fuzzy, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "%s: neatpažintas argumentas „%c%s“\n" +#: find/parser.c:2842 +#, c-format +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -421,250 +465,256 @@ msgid "" "entry from $PATH" msgstr "" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "standartinis iÅ¡vedimas" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "nepavyko iÅ¡trinti %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "Nepavyko pakeisti aplanko" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "standartinis iÅ¡vedimas" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Nepavyko užverti standartinio įvedimo" +msgid "getfilecon failed: %s" +msgstr "" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Nepavyko pakeisti aplanko" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" +msgid "warning: unrecognized escape `\\%c'" msgstr "" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "klaida laukiant %s" +msgid "error: %s at end of format string" +msgstr "" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s nutrauktas signalo %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, fuzzy, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "%s: neatpažintas argumentas „%c%s“\n" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "netaisyklinga iÅ¡raiÅ¡ka" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "tikėtasi iÅ¡raiÅ¡kos tarp „%s“ ir „)“" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "tikėtasi iÅ¡raiÅ¡kos po „%s“" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "netaisyklinga iÅ¡raiÅ¡ka; per daug „)“" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "netaisyklinga iÅ¡raiÅ¡ka; tuÅ¡ti skliausteliai neleistini." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "netaisyklinga iÅ¡raiÅ¡ka; tikėtasi rasti, bet nerasta „)“." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "nežinomas iÅ¡raiÅ¡kos tipas!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "nežinomas iÅ¡raiÅ¡kos tipas (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "keliai turi bÅ«ti prieÅ¡ iÅ¡raiÅ¡ką: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "nežinomas predikatas „%s“" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "netaisyklingas predikatas „%s“" -#: find/tree.c:1322 +#: find/tree.c:1328 #, fuzzy, c-format msgid "invalid argument `%s' to `%s'" msgstr "„%s“ trÅ«ksta parametro" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "„%s“ trÅ«ksta parametro" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "per daug „)“" -#: find/tree.c:1412 +#: find/tree.c:1418 #, fuzzy, c-format msgid "unexpected extra predicate '%s'" msgstr "netikėta leksema „%s“, tikėtasi „)“" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Naudojimas: %s [-H] [-L] [-P] [-Olygmuo] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [kelias...] [iÅ¡raiÅ¡ka]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "Nepavyko pakeisti aplanko" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "Nepavyko pakeisti aplanko" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Netaisyklingas optimizacijos lygmuo %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -673,71 +723,387 @@ msgstr "" "Optimizacijos lygmuo %lu per aukÅ¡tas. Jei norite rasti failus labai " "greitai, iÅ¡bandykite GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "netaisyklingas argumentas %s %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "dviprasmis parametras %s argumentui %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Galimi argumentai:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "klaida užveriant failą" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "raÅ¡ymo klaida" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Nežinoma sistemos klaida" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: argumentas „%s“ dviprasmis\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: argumentas „--%s“ neleidžia parametro\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: argumentas „%c%s“ neleidžia parametro\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: parametrui „%s“ reikia argumento\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: neatpažintas argumentas „--%s“\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: neatpažintas argumentas „%c%s“\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: netaisyklingas argumentas -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: parametrui reikia argumento -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: parametras „-W %s“ dviprasmis\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: parametras „-W %s“ neleidžia argumento\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: parametrui „%s“ reikia argumento\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "Nepavyko pakeisti aplanko" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "Nepavyko pakeisti aplanko" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "„" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "“" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yYtT]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "baigėsi atmintis" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "„%s“ trÅ«ksta parametro" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "„%s“ trÅ«ksta parametro" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "argumentų sąraÅ¡as per ilgas" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "komanda per ilga" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "argumentų sąraÅ¡as per ilgas" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "standartinis iÅ¡vedimas" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" +msgid "Unknown regular expression type %s; valid types are %s." msgstr "" -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, fuzzy, c-format msgid "Unexpected suffix %s on %s" msgstr "netikėta failo pabaiga %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "tikėtasi iÅ¡raiÅ¡kos po „%s“" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -746,8 +1112,8 @@ msgstr "" "Naudojimas: %s [--version | --help]\n" "arba %s dažniausios_bigramos < failų_sąraÅ¡as > locate-db\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -755,66 +1121,61 @@ msgstr "" "\n" "PraneÅ¡kite apie klaidas adresu .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "raÅ¡ymo klaida" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Naudojimas: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, fuzzy, c-format msgid "Failed to write to standard output" msgstr "standartinis iÅ¡vedimas" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dienų" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" @@ -822,17 +1183,17 @@ msgstr[0] "Locate duomenų bazės dydis: %s baitas\n" msgstr[1] "Locate duomenų bazės dydis: %s baitai\n" msgstr[2] "Locate duomenų bazės dydis: %s baitų\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Atitinkantys failų vardai: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Visi failų vardai: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -843,31 +1204,31 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Suspaudimo laipsnis %4.2f%% (didesnis geriau)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Suspaudimo laipsnis neapibrėžtas\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -876,13 +1237,13 @@ msgstr "" "%s yra slocate duomenų bazė. Jų palaikymas atsirado neseniai, galite " "tikėtis nesklandumų." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -890,35 +1251,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Duomenų bazės %s formatas yra %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -930,138 +1291,153 @@ msgid "" " pattern...\n" msgstr "" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "netikėta failo pabaiga %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "klaida skaitant žodį iÅ¡ %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, fuzzy, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "įspėjimas: parametras -F gali neveikti taip, kaip tikitės" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, fuzzy, c-format msgid "Cannot open input file %s" msgstr "%s: nepavyko atverti laikinojo failo: %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1070,177 +1446,257 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "argumentų eilutė per ilga" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "standartinis iÅ¡vedimas" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "standartinis iÅ¡vedimas" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: grąžino klaidos kodą 255; nutraukiama" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: sustabdytas signalo %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: nutrauktas signalo %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, fuzzy, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: netaisyklingas argumentas" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "" -#: xargs/xargs.c:1508 +#: xargs/xargs.c:1617 #, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "netaisyklingas argumentas %s %s" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "dviprasmis parametras %s argumentui %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Galimi argumentai:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "error closing file" -#~ msgstr "klaida užveriant failą" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Nežinoma sistemos klaida" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: argumentas „%s“ dviprasmis\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: argumentas „--%s“ neleidžia parametro\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: argumentas „%c%s“ neleidžia parametro\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: parametrui „%s“ reikia argumento\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: neatpažintas argumentas „--%s“\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: neatpažintas argumentas „%c%s“\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: netaisyklingas argumentas -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: parametrui reikia argumento -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: parametras „-W %s“ dviprasmis\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: parametras „-W %s“ neleidžia argumento\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" -#~ msgid "`" -#~ msgstr "„" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" -#~ msgid "'" -#~ msgstr "“" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" #~ msgid "Success" #~ msgstr "Sėkmė" @@ -1254,15 +1710,6 @@ msgstr "" #~ msgid "Unmatched ) or \\)" #~ msgstr "Nesuderintas ) arba \\)" -#~ msgid "^[yY]" -#~ msgstr "^[yYtT]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "baigėsi atmintis" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: neleistinas argumentas -- %c\n" @@ -1373,9 +1820,6 @@ msgstr "" #~ msgid "%s: no completion specification" #~ msgstr "%s: nėra baigimo specifikacijos" -#~ msgid "warning: -F option may not work as you expect" -#~ msgstr "įspėjimas: parametras -F gali neveikti taip, kaip tikitės" - #~ msgid "warning: -C option may not work as you expect" #~ msgstr "įspėjimas: parametras -C gali neveikti taip, kaip tikitės" diff --git a/po/ms.gmo b/po/ms.gmo index aa028b5929d5449c07b54f6fc19dc5f5cacdb861..a7a5f0f1a50e5e910ee16248ce277b8933f461c3 100644 GIT binary patch delta 718 zcmZwDJxCl;5Ww+S@BBFR{ED9#@df;-T)ZfVB3cyL-wNa*f(( zCssCsU?ny-rb-%-bV5=F8|ySll`j9eJDZT<=6>_w?VEY;Tf;-L_}CUd6{3rLNq#5$ z$zzK@qOMA002A1aHumB?>XvnEK^NO`r{WP-vp%nQiMsy^JMp?~QSK=8fFBsgpIC#x zP!IfrI#5%rJfw|%tlyvxlt$gZhqbtm`*b?SSFBr^LLEc>ZV`2m5L=`ulBdv{A7Tey zAV2w3@iXcNcc?eNM?L5X^(GeGb?|Pi!#>p4972OL*n?}RgA`EvonbBg<(8ruzo0g1 zBN@JQ8<0j)2h(QsEFI3HNE4}1PbSD#T@X5qo~NM$Jx2qDzI2k*m(@tTC@VE52iEGl zVVO3Ap|NdSnK83Q7X7Thz3ZE>5Jv8naf4txkPlAIOB*NH$ZxrR6jHfUvbyXqtngo0 zT9J=8zpXhdIX*HvF_M}zsnpc#iJQ4tWWE1Si@?b_kqNz0gUCxeS(Em%ZscV0p1jR( WIvG=N{0$RQc0EjM delta 464 zcmZY5u}i~16vy$qG_kfZwu)4xil^A2U_*lxYAF^6{{z9z!GFOng3!f5!A&{|PELX@ zoy4)A&`ET65&R3>_4~6K1RuP7a*xZsmwSoc!ruF=-#5ezxkTQO^W=u*L7d?_p5p@E zV;P^Zh#y$Ouhh^R*VoXezKIjq#5wHX3hp6&dZx?EGKC9NgIm-GL(Jj`PdWS*S6T0K zsys%0cZC|{0X5htt$(5h^MmmqWt?Q~P(N5jM}M=!%OZtC)WIjHo47^|@Q4K*qD6%U z{2TN#Q)DJBsu9~wjtog=|GnX9)UXk$C}?Az%w7iGL9y*BM=p+IvF$o;aOdsXD5=#O WwIp%%tyZHs_|A0g|BX*U-u?i;3@Um6 diff --git a/po/ms.po b/po/ms.po index d6d238d..7928840 100644 --- a/po/ms.po +++ b/po/ms.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils-4.1.7\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2003-01-19 14:42+0800\n" "Last-Translator: Nik Ramadhan Nik Idris \n" "Language-Team: Malay \n" @@ -15,63 +15,99 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "ralat menunggu untuk %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, c-format +msgid "The atexit library function failed" msgstr "" -#: find/find.c:205 +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "" -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "" -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -82,12 +118,12 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -97,12 +133,12 @@ msgid "" "searched." msgstr "" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "tidak diketahui" @@ -112,7 +148,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -122,12 +158,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -135,7 +176,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -144,38 +185,38 @@ msgid "" "arguments.\n" msgstr "" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -183,7 +224,7 @@ msgid "" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -192,7 +233,7 @@ msgid "" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -201,19 +242,19 @@ msgid "" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -222,19 +263,19 @@ msgid "" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -244,47 +285,42 @@ msgid "" "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: pilihan `%s' memerlukan hujah\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, fuzzy, c-format msgid "invalid mode %s" msgstr "mod yang salah `%s'" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -292,92 +328,100 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "jenis saiz tidak sah `%c'" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "hujah yang salah `%s' kepada `%s'" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "hujah yang salah `%s' kepada `%s'" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -385,329 +429,652 @@ msgid "" "entry from $PATH" msgstr "" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 +#: find/pred.c:718 #, c-format -msgid "Failed to save working directory in order to run a command on %s" +msgid "WARNING: cannot determine birth time of file %s" msgstr "" -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:782 #, c-format -msgid "getfilecon failed: %s" +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:784 +#, c-format +msgid "Failed to write prompt for -ok" msgstr "" -#: find/pred.c:1507 +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "WARNING: cannot determine birth time of file %s" +msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:1571 +#: find/print.c:346 #, c-format -msgid "< %s ... %s > ? " -msgstr "< %s ... %s > ? " +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2032 +#: find/print.c:365 #, c-format -msgid "Cannot close standard input" +msgid "warning: unrecognized escape `\\%c'" msgstr "" -#: find/pred.c:2061 +#: find/print.c:385 #, c-format -msgid "Failed to change directory" +msgid "error: %s at end of format string" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:409 #, c-format -msgid "cannot fork" +msgid "error: the format directive `%%%c' is reserved for future use" msgstr "" -#: find/pred.c:2123 +#: find/print.c:417 #, c-format -msgid "error waiting for %s" -msgstr "ralat menunggu untuk %s" +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" -#: find/pred.c:2132 +#: find/print.c:425 #, c-format -msgid "%s terminated by signal %d" +msgid "warning: unrecognized format directive `%%%c'" msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "" -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "hujah yang salah `%s' kepada `%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "kehilangan hujah kepada `%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "" -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "" -#: find/util.c:451 +#: find/util.c:459 #, c-format msgid "failed to save initial working directory" msgstr "" -#: find/util.c:468 +#: find/util.c:476 #, c-format msgid "failed to restore initial working directory" msgstr "" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "hujah %s tidak sah untuk `%s'" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "hujah %s adalah kabur untuk `%s'" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Hujah yang sah ialah:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "ralat sistem tidak diketahui" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: pilihan `%s' adalah kabur\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: pilihan `--%s' tidak mengizinkan sebarang hujah\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: pilihan `%c%s' tidak mengizinkan sebarang hujah\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: pilihan `%s' memerlukan hujah\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: pilihan tidak dapat dikenal pasti `--%s'\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: pilihan tidak dapat dikenal pasti `%c%s'\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: pilihan yang tidak sah -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: pilihan memerlukan hujah -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: pilihan `-W %s' adalah kabur\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: pilihan `-W %s' tidak mengizinkan sebarang hujah\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: pilihan `%s' memerlukan hujah\n" + +#: gl/lib/openat-die.c:38 +#, c-format +msgid "unable to record current working directory" +msgstr "" + +#: gl/lib/openat-die.c:57 +#, c-format +msgid "failed to return to initial working directory" +msgstr "" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +#, fuzzy +msgid "memory exhausted" +msgstr "memori kehabisan" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "hujah %s tidak sah untuk `%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "hujah %s tidak sah untuk `%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "senarai hujag terlalu panjang" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "arahan terlalu panjang" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "senarai hujag terlalu panjang" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 -#, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "versi find GNU %s\n" +#: lib/listfile.c:337 +#, c-format +msgid "Failed to write output (at stage %d)" +msgstr "" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 #, c-format -msgid "Unexpected suffix %s on %s" +msgid "Unknown regular expression type %s; valid types are %s." msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:81 #, c-format -msgid "Expected an integer: %s" +msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/regextype.c:107 +#: lib/safe-atoi.c:87 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." +msgid "Expected an integer: %s" msgstr "" -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" msgstr "" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 #, fuzzy msgid "" "\n" @@ -716,83 +1083,78 @@ msgstr "" "\n" "Laporkan pepijat kepada ." -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "hari" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, fuzzy, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "hujah %s tidak sah untuk `%s'" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "" msgstr[1] "" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -803,44 +1165,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -848,35 +1210,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -888,138 +1250,153 @@ msgid "" " pattern...\n" msgstr "" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "ralat menunggu untuk %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1028,176 +1405,261 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "berganda" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "tunggal" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "baris hujah terlalu panjang" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, c-format +msgid "Failed to write to stderr" +msgstr "" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "ralat menunggu untuk proses anak" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: keluar dengan status; abaikan" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: di berhentikan oleh signal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: diputuskan oleh signal %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, fuzzy, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: nilai untuk pilihan -%c mesti >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, fuzzy, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s:nilai untuk pilihan -%c mesti < %ld\n" -#: xargs/xargs.c:1508 +#: xargs/xargs.c:1617 #, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" msgstr "" -#, fuzzy -#~ msgid "invalid argument %s for %s" -#~ msgstr "hujah %s tidak sah untuk `%s'" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#, fuzzy -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "hujah %s adalah kabur untuk `%s'" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Hujah yang sah ialah:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "ralat sistem tidak diketahui" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: pilihan `%s' adalah kabur\n" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: pilihan `--%s' tidak mengizinkan sebarang hujah\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: pilihan `%c%s' tidak mengizinkan sebarang hujah\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: pilihan `%s' memerlukan hujah\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: pilihan tidak dapat dikenal pasti `--%s'\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: pilihan tidak dapat dikenal pasti `%c%s'\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: pilihan yang tidak sah -- %c\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: pilihan memerlukan hujah -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: pilihan `-W %s' adalah kabur\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: pilihan `-W %s' tidak mengizinkan sebarang hujah\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" -#~ msgid "`" -#~ msgstr "`" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" -#~ msgid "'" -#~ msgstr "'" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#, fuzzy +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "versi find GNU %s\n" #~ msgid "Success" #~ msgstr "Berjaya" @@ -1220,28 +1682,6 @@ msgstr "" #~ msgid "Unmatched ) or \\)" #~ msgstr ") atau \\) tidak sesuai" -#~ msgid "^[yY]" -#~ msgstr "^[yY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#, fuzzy -#~ msgid "memory exhausted" -#~ msgstr "memori kehabisan" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "hujah %s tidak sah untuk `%s'" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "hujah %s tidak sah untuk `%s'" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "senarai hujag terlalu panjang" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: pilihan tidak dibenarkan -- %c\n" diff --git a/po/nl.gmo b/po/nl.gmo index 63bece304b028d4911dc52351039774002c460a8..0c9a84f45be6b8f525c1edf31e1bd73d17eb9ca6 100644 GIT binary patch delta 13211 zcmcJU3w%`7nZQpXJ{l2_hrHp6qyv}gM7Wu`$=qaS?lAXG!b5jZ ztkqg;>(p1b)oOiIE46m|^4S+vYpZ3eTWf18)^^=)f41)Wt4r1Wx&QB+J4pygy1#Aj zFW>ynJ@?%6_|Erz=bW48{-^AjVtM{I!w211rj&XanS~5HS*h7%ym^{ZlK9 znKVhMWiSC7;eNOhzBMVYR5OW%la-nWuZ2_K4`2lT8@v<_vFJU#76$MhI2DdR)0AHf z>9dMK`lK#}qM2LZ4ETMx4ZZ=};Tjqdej`sJL1N-rs2*MgMawtC8hAgH3SWl&sl)uB z1T}%yr32@L+ybdv?G1S+jByT+yi7GRYtKeYnZ-g?SJE2V3t562E z3ALO9({LW`tGh|aT>Ki&fsNHleGBe}Yhdk6rD#L#g<_-+z|HUw+zIF7HqwEI;Cb+; z@XK&0qq-123S}T8YmEjkfbVd>2hOH_)kUq+qx+$#=v9ce)OdRHX}ApD1%D2g!98=$ z)O;68!@q*_;9ubuSVLuuMO_D(1@$Prohf(?(l@may`xO^b!* zbOE`;U>Zt=d3Y*(B+P#jPUQZ@@cu9GOzux&f(OBA@FW<8l0OH21a5*8;8)>D_$(A- z{w#S)>QYmgILT;*GS^qa$?&Vtf(JwXClu=)zSxvI2clKg3a7$bp-kNq5XVuk zLz#lp8k8CZ=fcr&6_f$R@+5|nxE!v7pMg^0?_nBFSYnLkS}4!I0f)kq(BC9@1{4j> zg`#p7ijC}r(vcs+tKpyE7}(8298P@-N(b|gkg!M`g3rOSM(vmCAUu=%4=qQ^7%h~J z&0S$sorGd5J{$sXgVM46a6085hceRFR~nmmAIcPrZ8FAN4bgC3HIX=(2QHKm?0}o$ z)evo~L$HYot@Dl1bgVM5`zuhU>c64b%vr0AQCUUd+Pu@1$Dr@%ZEuecK~h6mxR z;{T^Nqi!-) z0Qeka@ap_6_%^%=?u5H9Hub#)>APC8RVfGF5b`i&Hq|AUpp{AzcavZ))Q@2r{t-@s z7j0wdg}b1r?nB#+mCu9YxxW}nxt(w>ycsTn&%!P^*jDPF;68XcEN@lnWAI8S?mjq% z{zsFT7&8H4F0{B$L22-l;r(NvGe$KNp3D6fC?mQNinYH0N5J>tLvTd97!hs;CE(nfz@5wR zBG=S2vctIBVn~ox9Z=l$i*O2jF;8MDiFaTw5~37!7>dTW`DRLPgKu+x5X#7(3QWE4!a3sqwK>z%c6b#9 zu7O233=7%_4?t1XxNZ}A>){gaZAe?{E;tL0#`MpEE8$a2K@!q{nzP$9?84i*|2&id z*6)$$%>OPDqMENj8S(3IJ)DHE?Sok;4ZRI#LiaMIegtoYqhSma9|!k@ya_Jn{vjwG zJq%?E>S#;u_d$8@Nw^+Szu{*htleuO;5sPQ+YU#-Pr*g-E_fn*4W0!50A-Hfgv^o} z&itGW_d)5?R=%-VLSTb0H5yG0rKdK`LGWMWsHJ z_r3(>z2~9W!h2Ar;%qE+JiHjndpqG|co&ob9e`)SUtEd)Mdk02u@uh!sHw0UipstK zhr@q|Q{cOB9-M@sOof}EyuSxZ!(W3pz}Mge*!3~f;R2NMPebX*8}Kc7+SRDOhD6yl zW(2e0*fQ30*g*cJA2%w00xsnK030dhuQd_u40s{sBe076y`L}vY(JdD{c}*_${XSR z$=4}$3ils|(xI7o5iE~UcLKWR=r8?Pt6lYb|afb<4j0wbR?yW$SGjr(We zE*Sl^@#}k`Oyy6Z)caR>2rfZAKZa)&%wm`SGl>yoybEbpHv)9tR!MO2uKJZuu~atEZ9>Ym{rT{#EKH5EIZR z81dDcknbU4<+mYn5vTOjbwKP=8zM^7*C>7$gy{!D$~0bxJQ?20dZAS%Y?q(#vf#fU z#36Mjat0#TH;`{4ry<`) z7M5rTc^-@)cO!QoKSE|8c$`=pnV{yb6<<_#5!{x={`$PL#x zfM6RDAHy{$6txOJLE7jcqFkL8O_Tw8o9XD*HnJr=emk#B?})FJ`)>} zXLn$sQcf=EgycO-o@iRGa^(H3WDdH?%x_O7dClb2N(PrMNZu9XiDk=G$}5uBXtK1H zBq;_;@%QU)F5EV3T+4UxeQ_wc7?ytYCV8bXm8zPK`!CU@daF;7SKTk~^S2f&P7liS z(S(!CSVv!R*Uu#FT~?5AeM^_I({an$=>`?bl#WI-Suf`Je$-ETLA1-x)^BQP;hFCQ zmXq#svtByoqyvj5uHBk+EP3pvtyscM#x3)5-go@o3jKuF9Zk9^H}L!RNV2Uk+v9yN zm7+5gOgmQ6Nw)`y-YUABtnX5&-{s|kOpdOEPu+BzmrdD$dn!ds11tQvaZ;f$Vp@50 zX5sM>59BQ?+GNRqj(z!d%CT(Uibk^zs){-FEz*tX>MF8Q_Dc-xNvyL6Nc$SkX_N}(8 zm$IZpm6i4a%MVbhosF9T>3+qfvbdwC(aF{?UD?pmuyjMC)~_2lDPK&(jNcEaJ(Z_= z2V=_ESvzpzR_iXS=cTHF6(il?mF@(U`x&OE&cdd}4t;A!&I_0b47$~hb^1x$PaIt# z^MB+O>d8&F>sOOryBo8UR^!^`p)vbB(qnaGtd7^VrM|Iw+14X#adza~E*rBAtiZFP zjTS{Lx6Qz}{EQQG+gvAJmp{5oN7iInUXXCI-L6l2l5#A3HSOVi@u=6PXN{T2mU`t% zuR>ehQr~h!zrt+HompsVZrae)kY62bXj!q|>UM*KmB!e8OD28bUTIr6(gNyagw*X@ zxpdD62be^yf7|!5Fl*0cTCd41Jx+5(??o>@VIyg0wNh7Gt+-L#X|r=lj1xVVtllGJ zh`S9uiq?ETkCY+wG;cJGp_ish_b)9P7T3oyjO%F)>S^om`ua()1L5qYz!v(l#Gi~* z=%xcFYsUh&%js(Xm}4q~jXQ)g$HKMKVwqt)&_OktmDkf=l!sBbE$UEySE&j{V{Ase z45R7kingV+70-Lxl_h2@UAtyYL-Vq_fwiVM`V_>z@b#xO}gGD8i^m~BX zWd6f|m2_+Zrk9TCz!ddMYK|rBtkJVX1|8ybdv)tSL_f>H&3Nzu+uCzcCD)u=C}YuPEa$kN!a2D#PQM%S3=ZpWJDJB}6gr;Bc! zoiWFWJMoIbLnFr(uNe6%>v6Cv<5-oklIr|iCgWvw{BvTq7}4^k_4m_+L4$Nw|pENVh zK>5G>h-k>)m1^~pZcL1zv((bD8ybHc-4$9#Z!Ww%`tBumTCZ_zbJjPl*tou>hM8?o zvlJv)Qj$(qE$v^TwqJ>2e$2wM!tcf=X8Sf?-R)&N#iHVF)`N&V6xf? zN_NO378Z>=FCTaOSk}!@*s5fj#iQ_&&N}8FXCWRqVm4R=6NwGjM8x(ga#K#K)sZDZ zYIf7HWG>E1NURKOZ6l?6#d~odu_z)dmEwTivLB>BP9{6Ti|1mFsh&W@s+y`Uc8^P! z&$cQFxV!~YIbO0e8HcdUQp~Q-Nw!t#*u2Zj^~TP^D-*ViDa9Xad!=9LN2H;sI83o- zV!S-hZbIut)@&17P*Fh-f(DE#@*^8NEqd@@y@Z1#XXi} zEKzr|JK>ZHN$9|SoVGTMsoJud+AL9bw{5l@F*}QaNlWQn%xG1_>X3PIc4lx9H=t38 zGBSmx&5}ln)n{E>c6t@f=9um{28qi3s^Y^_cbrhHoAFrLs*S$g?ktd*-?DbyhNiX6 zTdS+9d!qi9zWR|T6>4)sOLJ56iUrnc*$@XTa-CvymC0OjSk=RWYKf?_r{d^P(xTQm zgX_6Zy1c0atB(AI@6NjaMBi?6wiP>S4wa2{({A8mDo1%(VczVm`8H$on3{IO4=k+u z6#SsWO{L$b6uX?`lxuea*-^)epPOA6G~XB;D~Nau9;P?0vhmd$M4RJNGDnC=xUodZ zVSQ_ReWX}DKU!A2_uQY9jn=0tMuEwAF*eH5n6Wz^Jjhn4W6gV{yaYGL`;ugO}>Iv$Dfkz!s7y>9wZ`4xC8+ z;=7BkDlf08EnLyCbncw!ta;IzbFG@11-0|eo>enzR>iut(H5u6l~ZAK8J$^R)y}G! z9i4Sdbc!!J+R{DCK7hgCa~OJ)M6Q>>INB+iv)XYCQ%(y{}P>w}KNg;^Jk z%!eo6xED*H=F)*n&O3hKBsmQ9*75;o;8uqnqAU`$>}AXb$H6vwj>E*7b_YXuoNT+p zcB{9>E@$pB&%|`2J!^B8)~8}zzTe0=56>-|Stwh+U$&x6)}~Enq(}cIoM1PhT~?B$ zZ$)}e8TFesMXYIfbR_DMoUV6E{m#b?4b2-GR)=-6cXm@Y{u;;iZ2}g_wCm)9Xp+&f z@-Rf-`oA2EL$$O!t=XL0Y19(!cSatt3;Es|3#1EfN2e9f+O`|kcjQ5NN#ptr?3TkJ zl_C}MmSa$*he@o8Eir?W4J}eVgi42`iGRX4af!w9*K^Wl(c)H4&(ddod`2;PzXiBAJ}k3~cVh1Ml{@gAlon_fqUKgZhbrjwp$&QbXzkItJm_4EwIX+38hf`fPn z)iV1n{H@ryrm=a0Xv@i>Fj0f(c;KGNzF4MIn~3Pz&bRfqk2+b-)A;(p)wMg+M$dYc zQzgq`Jm6F^Rt0Pq`Q|#!()pgyW`}D0p{CHT8Lk>$cf*EdOY62 zTlB`Ft5w%$0K44|#*gB(S%ydDwPt#a{!zlQE*(PXf@!|a+Rb*B`s1=}$=*UAFPLqt zePClLwQHsH(!@}IaNiH^D_kEtJ+BR<-_g6z99bW{CIx(o>l4tm!~6{%YL>iEqe1>S zNA*5)(X;;bP8NDNdWMd7X1Ck?ByZ>m$Huds7X;3D%ae67mS9uE6GFwb-RL&rv#b^O zFW+-QMWl4LjueJmGD^8HO}5HjnH)oJ=D&z z(Md_9lrISS0|LfcUHr?Md&=iGrDZ^Ic2x4=R?-Y{H)kH%SjsyL%O*hTr6*^#+Z+?6 zOyRTZwijMpciIs7W*{4>i1}*p=DJUm=NlPUDZ~<5^%h1>xe1Q>Z8|uz^1GwYcY zJ@D0+zU#n=2Ivy6d0wX}Ame8CDc8yP0~uwf=+cz0u25@xp7IgCaLxKr#hkiqcTX>a#oOzct{yg4*P`Nw-~ggnpWD zuQ%)%RQ%;eJ~hZU24a@{ABIm3k)91+&sPWLR6pihLj?P*;sXjxeZ+imh_Hd7+v0b8 zV!>{tqOhdify!o4PKVVM4Lr?pqM*8PW0~YLa8yrWxEI%JUHH|(D8sB)rAn)dotr;e zR>d(C(|_5962wQyJzIPx;7$Cls&R_Up3cE6j#}fhA_5KSwm; z;#+$sVapMUmS^%kg0IL+S8m*_KT61F2;YvMxL!=qEQGR?WsJQ>m5~qAIuNzG?8n&V z%1+$vY?aTM;mV=SvUlz{J@`TK=WXLo7%CrF@dT-oBZX7=vpc5nN7p{56Fctr?3i&u z^@JR0Lr$6#87)Sea#_JT10|8l?GWS9n|3L2+7Ts+t2*u(RD&VPx&yQul;(ji5)mA( z-2}f#eT30<*{p@>;+yI7%Zm49=9EwLk{AU$4hkiloa~Z%RA6U|FJ)gVU+879qRyB{ zp-5$AWehvge$J-bOSZ?wyTjE`+e+GN*8xZG6AJrtbxWjks5RHE&;OCKux!Q*{jU^0o%IWK3rrPqq>>Fh{VaX3a60*1 nfs5K0UWF*9ur@hLY^u)UourHZ>L@BfEsU$^x_E!r)KmT!Ft0!W7>Y+(s8Bmn}1eYMGiPWmNj)9FsSJ0wQN20=td zWqF{Z;DUmnATAF@|Cr-|$B}WtBYNBh5l21ab_Nw^&~Y5+yYIbDA|C7H*I(W0dR6z` zy0dT~ZNJB*lsbVj(Ptf$axw5gH;8?pmr|YJQFt0j8{7vQ4uPZL%kT&I z9o!24*;lFlurX1o_uzIo2l|tgS^%GdlcB4him73Aru0)P9j<}v;bxdD6RuJ!3J1gC za3_@c&%gojJvaz{3&oM1>^cVKz}~O|;){yHEO-l)=bwY}+`0ZSrPAnp&%i)9m{nz? zNe(^GjlBV;z+*5Ko`D+t8cv6Oc(^BA0B68b$dYOw90iXT~TqZzS=snIu9OyB^jzA%lklqM)!b9)?oHA0W zLUtI=2E$ejBL^-3s?T;_GQ!PK#Q2aiI& zQs-bc?8GV(fvGSbhF}Oj3F~2M2H!yg9)V{d$F7=LjC@tQh3v16&=C($!Cd$sSO9Z~ zzeHd?lx%(iQkCkYW4{LF4bMCFe<4vKj3v=|oesyV zK7lf^J+CK@jD%wQpq%X%DD$3z8a(Up66Ca065h&DnNg&>uzcEkSgQ78_df_>qI z@tpr6I+qxb2MdX35Z(ag2)=;webPjwdO;nMz^VcAh}sP$l&7Jb{fAI;V>pX#g(Z** zRc}LC?;<2!)Ih?m!Mw@D{|ueA49J^~%TcO}OR2?h9=3;?;~8}bN+{1m$$?K{PuQCS z7ROTHXr3Df!h|-~{*)Y=ED_l?+PG!(E9Q&x&!R^?4pg20B z*v^fmaFEo06P=-au^V!H%7pTUpTpj8)Lh$9KFC<~u;Y&kdbSfxS= zLM?Ud%}}0u29AQ~VG8@JPV?RZ1cs(4?{%S8BIm_3fl-;-RI+(fG=3ZEa-Ej%O zjIa`lV_!mXxZ6_u3Qva1u+w2GTo1>?`yi*H&O-89B{OL)Tnb|nlH+u~faf52s9sub zXMMXBN_nxT!i{hrl%pC-#%91=SP27Aj_ge+q3^qjD8ND}4x|%?Nzel)z+F%rd}%fD z-$Lhe225CYty1i*hI{OYG{ZFPd*MuY5{6-W&Lvdb<6yauT7|n{f4GKHkh+dK+zzE0 z9)&aEH&8-8f$)gE9?EmiL%9LpfmgwQ#pp;jcCWINXCjnP7Q+s3E9?mGfD*DjunwMp zSHn@&wj;~n2<#A)JP(DmWW^2kZ;qg~Q;NaI(~Y&w#!0EGP@qKsnn7 z;V$?l91JUKZO1l2ar9Xzj(h+w!JnWc1nXl=GL?3lSx?1mTlvMz^AN=qP#^ zm7+V4oUt@XLTRLrbuCNvEI^0RRP+F9(_&V3r!qoxRW*`ilJK-g($*u&UL8XxkhFd_ ztVBwopO02LV>xh^({GF4Ifj(&{iwHPOZ=U74cw2&o0gVGZ&Hh8*X$ZK1ydS?4d~RE_F`B%vfrx1$@8TpmY|BqZrzo&U{{WVf!? zN1@zo*CP{kNAb3g&IWXgGmroep~ulqM1HE+)qKR;y-sHhlpi8#yKGn)E>$2c+lKY| z7@s$xN~EKQkhHtdHdKQo>mNbVy4X-p+Kj2iboMxd8Sox-tz#EEoa?aOVF8@%^bLoj z;N7SK^+bKqW;78=8;lmAfEZ3IlKNkbu?($152EErZoGx)0J;HP*{DFPjpS4A^Q|Zg z9Y@cg9_R@qZLf`%PoL8p1G`H8d0W2Xp9%U;IreCW^Bo4E%s+_aVv?pINv=c^;FDf- zNbA8U6BVLWD1bJgedt;AD!PEaLmfN!;cc%s{?|7-VcYdaa$<7j!Dc%RS4Cj6d}s)#Yk;Y01LE zBF$~=nA6W_H(-Y`J!PQTJ>{bWV@ukKVKW>2fvDCH@dvB4*$b9yRl$aUzg%0Vha>(_ zP#Y2HYWywjVdK*9KIYrQN4rw}L4VZm4frFv7OD1zb)UP^AJDaGZ=_m_ddma4ad||Y zad>2wS)X2=U=)t&YYZP#U~V1bNthL_sFrPJ@j%d9t4F5F@~R}{)9Gmbh!zY*wRJ4+ z(;BPwptfk?(&AO~SC)XXL>%!5d zQqALb`-4$E?5&9U*Xfqc`vj!pTkm%J^nkzC&-b}jue7UXH;=nW(?gZ+NHi={bx+(V z)nrL5Pj1Ul>qGOkT5pp(;1BAth&&hY#O+9_wRel@$!+PDw%N5<3+r_OZ-pM;+3#sP zV6EW{cyfR7O{)_@aU$mShN~)eRta0TbqI@hwS$@X~b>_yh>x^Sq1 z*%Aj?+A^)_&KHbFs+Wcui36dHw0S!>NmL$+*vFtZ`J>kR1Vip{L(uK7bnCTs(d(@- z+_cgtS8^%7f|1qKZ;0lp2-VhlgFemUWS+cSL#-ZUEA!b&ueglkIRjii^Gwcj?Tu5p z`_1YZ7hFd4nz`o0{JrhXF0;nE(!#peN2H?-;h^r*8iIOLon8^8ORhDLd%kI!v1P_6 zbHeP`T;`zSeF?kfXBmO{M~x#TJZtWc z0u41$BdKzu@m6J?`C`?<1mmIW%FOhdn-Yvc!C~VmwuXpPZJ}TlOZclaZy@rkTJy3g zD|@3E=JeoYmvNyk$$YlXaG5`bH@XINt@e5Y8ru)c7^a0PHD5zHuIZY2IQsZ+79%P2 z%OZ?aRO@~pS3)GJ*XY6c!Anh&Rd(UhE7FP<&MFJ*dX1fjx~J7{Q=lz_vDOl^Rw~w_ zdKtM$9INzTnYCBzYJSgeeS3vJErs}t`SwDs^}%fr(<4^Bml4CLH-P8FnHwQqS(a1Q z-EqYXd2QHcQB*Yh4&tB3yZ6$Y9IeB1X&oVO2vy z&}VdLP8;GWSXfe$zo2lT=ArV)v9kEp!8@5nO&49gSLWw0Sz0h>`O4x2v-vghna$0< z4rca-f$faOO>4|Gn-8`($KP7)%Aj^5p*kNwEY(rDN, 1996. # Ivo Timmermans , 2000. # Taco Witte , 2004. # Erwin Poeze , 2009. -# Benno Schulenberg , 2005, 2006, 2007, 2008, 2010. +# Benno Schulenberg , 2005, 2006, 2007, 2008, 2010, 2013. msgid "" msgstr "" -"Project-Id-Version: findutils-4.5.7\n" +"Project-Id-Version: findutils-4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2010-04-06 22:00+0200\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-09-24 11:24+0200\n" "Last-Translator: Benno Schulenberg \n" "Language-Team: Dutch \n" "Language: nl\n" @@ -22,32 +25,68 @@ msgstr "" "X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Kan werkmap niet opslaan (om een commando op %s uit te voeren)" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Kan standaardinvoer niet sluiten" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Kan niet van map wijzigen" + +#: find/exec.c:312 xargs/xargs.c:1229 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "cannot fork" +msgstr "kan geen nieuw proces starten" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "fout tijdens wachten op %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s: afgebroken door signaal %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" msgstr "Initialisatie van hash-tabel voor gedeelde bestanden is mislukt" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "de zinnigheidscontrole van de fnmatch()-systeemfunctie is mislukt" + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "kan status van huidige map niet opvragen" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "Kan lijst van aangekoppelde apparaten niet lezen." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "WAARSCHUWING: bestandssysteem %s is recent ontkoppeld." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "WAARSCHUWING: bestandssysteem %s is recent aangekoppeld." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -57,7 +96,7 @@ msgstr "" "(oud apparaatnummer is %ld, nieuw apparaatnummer is %ld,\n" "bestandssysteemsoort is %s) [regel %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -67,17 +106,17 @@ msgstr "" "(oud inode-nummer is %, nieuw inode-nummer is %,\n" "bestandssysteemsoort is %s) [regel %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "kan niet terugkeren naar bovenliggende map" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Het veilig wijzigen van de huidige map naar %s is mislukt" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -86,7 +125,7 @@ msgstr "" "Symbolische koppeling %s is deel van een oneindige lus in\n" "de mappenhiërarchie: de map waarnaar de koppeling wijst is al bezocht." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -101,12 +140,12 @@ msgstr[1] "" "Oneindige lus in bestandssysteem: %s heeft hetzelfde apparaatnummer\n" "en inode-nummer als een map %d niveaus hoger in de mappenhiërarchie." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "waarschuwing: symbolische koppeling %s wordt niet gevolgd" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -122,12 +161,12 @@ msgstr "" "Optie '-noleaf' wordt nu automatisch aangezet. In de tot nu toe gegeven\n" "resultaten kunnen mappen ontbreken die doorzocht hadden moeten worden." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "Kan lijst van aangekoppelde apparaten niet lezen" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "onbekend" @@ -139,7 +178,7 @@ msgstr "" "Oneindige lus in bestandssysteem: %s is onderdeel van dezelfde " "bestandssysteemlus als %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "WAARSCHUWING: bestand %s lijkt modus 0000 te hebben." @@ -149,13 +188,18 @@ msgstr "WAARSCHUWING: bestand %s lijkt modus 0000 te hebben." msgid "cannot search %s" msgstr "kan %s niet doorzoeken" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "kan werkmap niet herstellen na het doorzoeken van %s" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Initialisatie van hash-tabel voor gedeelde bestanden is mislukt" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " @@ -165,7 +209,7 @@ msgstr "" "maar '-prune' doet niets als '-depth' ingeschakeld is.\n" "Als u toch door wilt gaan, gebruik dan expliciet de optie '-depth'." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -177,7 +221,7 @@ msgstr "" "maar opties zijn niet positioneel: '%s' beïnvloedt zowel voorgaande\n" "als nakomende testen. Geef opties op vóór andere argumenten.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -186,7 +230,7 @@ msgstr "" "Waarschuwing: de optie '-d' wordt afgeraden;\n" "gebruik liever '-depth', want dat is een POSIX-optie." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -195,17 +239,17 @@ msgstr "" "%s is geen bestaande groepsnaam, en het lijkt niet op een numeriek ID\n" "vanwege het onverwachte achtervoegsel %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s is geen bestaande groepsnaam" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "het argument van '-group' is leeg, maar zou een groepsnaam moeten zijn" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -215,7 +259,7 @@ msgstr "" "Het standaardpad is de huidige map; de standaardexpressie is '-print';\n" "de expressie mag bestaan uit: operatoren, opties, testen, en acties:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -227,7 +271,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -241,7 +285,7 @@ msgstr "" " -depth --help -maxdepth NIVEAUS -mindepth NIVEAUS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -255,22 +299,22 @@ msgstr "" " -iregex PATROON -iwholename PATROON -links N -lname PATROON\n" " -mmin N -mtime N -name PATROON -newer BESTAND -nouser -nogroup" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -path PATROON -perm [+-]MODUS -regex PATROON -readable\n" +" -path PATROON -perm [+/]MODUS -regex PATROON -readable\n" " -writable -executable -size N[bcwkMG] -true -type [bcdpflsD]\n" " -uid N -used N -user NAAM -wholename PATROON -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context CONTEXT\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -285,7 +329,7 @@ msgstr "" " -execdir COMMANDO ; -execdir COMMANDO {} + -okdir COMMANDO ;\n" " -print -print0 -printf OPMAAK -delete -prune -quit\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -296,12 +340,12 @@ msgstr "" "een e-mail naar .\n" "Meld fouten in de vertaling aan ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "de zinnigheidscontrole van de fnmatch()-systeemfunctie is mislukt" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -316,52 +360,47 @@ msgstr "" "of misschien '-samefile'. Of anders, als u GNU grep hebt, kunt u\n" "'find ... -print0 | grep -FzZ %s' gebruiken." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" "Als argument van %s werd een tientallig positief geheel getal verwacht,\n" "maar %s werd gegeven" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" "Dit systeem kent niet de mogelijkheid om de ontstaanstijd van een bestand te " "bepalen." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "Test '%s' vereist een argument" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Kan %s niet als datum of tijd interpreteren" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Kan ontstaanstijd van bestand %s niet bepalen" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" "Waarschuwing: -%s %s zal met niets overeenkomen omdat het eindigt met /." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Modus %s is ongeldig als POSIXLY_CORRECT aan staat." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "ongeldige modus %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -373,22 +412,22 @@ msgstr "" "dus\n" "in plaats van met geen enkel bestand komt het nu overeen met alle bestanden." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "ongeldig leeg argument van '-size'" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "ongeldige aanduiding '%c' bij optie '-size'" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "Ongeldig argument '%s%c' van '-size'" +msgstr "Ongeldig argument '%s%s' van '-size'" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -396,75 +435,91 @@ msgstr "" "De optie '-show-control-chars' vereist als argument\n" "ofwel 'literal' (letterlijk) ofwel 'safe' (veilig)" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Ongeldig argument '%s' van '-used'" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "'%s' is geen bestaande gebruikersnaam" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "Het argument van optie '-user' mag niet leeg zijn" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Compilatie-opties: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "ongeldige test '-context': SELinux is niet ingeschakeld" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Argument van '-type' dient slechts één letter te zijn" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Onbekend argument van '-type': '%c'" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"'-type %c' wordt niet ondersteund omdat symbolische koppelingen niet " +"ondersteund worden op het platform waarop 'find' gecompileerd werd" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "waarschuwing: onbekende stuurcode '\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"'-type %c' wordt niet ondersteund omdat FIFO's niet ondersteund worden op " +"het platform waarop 'find' gecompileerd werd" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "fout: '%s' aan einde van opmaaktekenreeks" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"'-type %c' wordt niet ondersteund omdat sockets-met-namen niet ondersteund " +"worden op het platform waarop 'find' gecompileerd werd" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "waarschuwing: onbekende opmaakcode '%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"'-type %c' wordt niet ondersteund omdat Solaris-deuren niet ondersteund " +"worden op het platform waarop 'find' gecompileerd werd" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "fout: opmaakcode '%%%c' is gereserveerd voor toekomstig gebruik" +msgid "Unknown argument to -type: %c" +msgstr "Onbekend argument van '-type': '%c'" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "De huidige map komt voor in de omgevingsvariabele PATH;\n" "dit is onveilig in combinatie met de actie '%s' van 'find'.\n" -"Verwijder de huidige map uit uw PATH-variabele (oftewel:\n" -"haal de \".\" of dubbele punten aan begin en eind weg)." +"Verwijder de huidige map uit uw PATH-variabele (oftewel: haal \".\",\n" +"dubbele dubbelepunten, of dubbelepunten aan begin en eind weg)." -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -475,7 +530,7 @@ msgstr "" "dit is onveilig in combinatie met de actie '%s' van 'find'.\n" "Verwijder daarom dat relatieve pad uit uw PATH-variabele." -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -484,96 +539,103 @@ msgstr "" "Om veiligheidsredenen mag {} bij '-execdir' en '-okdir' niet gebruikt\n" "worden binnen de naam van het hulpprogramma." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Bij '-exec%s ... +' mag {} slechts één keer voorkomen." -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "In %s dient de %s op zichzelf te staan, maar u gaf %s op" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Omgeving is te groot voor exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" "rekenkundige overloop tijdens omzetting van %s dagen in aantal seconden" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "rekenkundige overloop tijdens berekening van het einde van vandaag" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "standaardfoutuitvoer" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "standaarduitvoer" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "kan %s niet verwijderen" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "kan werkmap niet herstellen na het doorzoeken van %s" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "getfilecon() is mislukt: %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "WAARSCHUWING: kan ontstaanstijd van bestand %s niet bepalen" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Schrijven naar standaarduitvoer is mislukt" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Kan standaardinvoer niet sluiten" +msgid "getfilecon failed: %s" +msgstr "getfilecon() is mislukt: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Kan niet van map wijzigen" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "kan geen nieuw proces starten" +msgid "warning: unrecognized escape `\\%c'" +msgstr "waarschuwing: onbekende stuurcode '\\%c'" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "fout tijdens wachten op %s" +msgid "error: %s at end of format string" +msgstr "fout: '%s' aan einde van opmaaktekenreeks" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s: afgebroken door signaal %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "fout: opmaakcode '%%%c' is gereserveerd voor toekomstig gebruik" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" +"waarschuwing: opmaakcode '%%%c' dient gevolgd te worden door nog een teken" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "waarschuwing: onbekende opmaakcode '%%%c'" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "ongeldige expressie" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -581,148 +643,150 @@ msgid "" msgstr "" "ongeldige expressie: binaire operator '%s' is gebruikt met niets ervoor" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "expressie werd verwacht tussen '%s' en ')'" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "expressie werd verwacht na '%s'" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "ongeldige expressie: er zijn te veel ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "ongeldige expressie: ontbrekend ')' -- of er ontbreekt iets na '%s'" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "ongeldige expressie: lege haakjes zijn niet toegestaan" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "ongeldige expressie: ontbrekend ')'" -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "oeps -- ongeldig expressietype!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "oeps -- ongeldig expressietype (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"**interne programmafout**: geen item in de evaluatiekostentabel\n" +"voor optie, test of actie %s; gelieve dit te rapporteren" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "padnamen moeten voorafgaan aan expressies (%s)" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "onbekende optie, test of actie: '%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "ongeldige optie, test of actie: '%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "ongeldig argument '%s' van '%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "ontbrekend argument van '%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "er zijn te veel ')'" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "onverwacht extra argument '%s'" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "onverwacht extra argument" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "oeps -- ongeldige standaardtussenvoeging van '-and'!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Gebruik: %s [-HLP] [-Oniveau] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [pad...] [expressie]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "kan niet terugkeren naar bovenliggende map" +msgstr "kan oorspronkelijke werkmap niet opslaan" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "kan niet terugkeren naar bovenliggende map" +msgstr "kan oorspronkelijke werkmap niet herstellen" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Onbekende debugvlag '%s' wordt genegeerd." -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Argument van optie '-D' is leeg" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "Direct na optie '-O' dient een cijfer te staan" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Geef direct na optie '-O' een cijfer op" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Ongeldig optimalisatieniveau %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -731,7 +795,7 @@ msgstr "" "Optimalisatieniveau %lu is te hoog.\n" "Als u bestanden heel vlug wilt vinden, gebruik dan 'locate'." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -740,66 +804,386 @@ msgstr "" "De omgevingsvariabele FIND_BLOCK_SIZE wordt niet ondersteund.\n" "Alleen de omgevingsvariabele POSIXLY_CORRECT beïnvloedt de blokgrootte." -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "ongeldig argument '%s' van '%s'" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "ongeldig argument '%s' van '%s'" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "Ongeldig argument '%s' van '-used'" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "schrijffout" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "Test '%s' vereist een argument" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "waarschuwing: onbekende stuurcode '\\%c'" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: ongeldig nummer bij optie '-%c'\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "Test '%s' vereist een argument" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "kan oorspronkelijke werkmap niet herstellen" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "kan oorspronkelijke werkmap niet herstellen" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "ongeldig argument '%s' van '%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "ongeldig argument '%s' van '%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "argumentenlijst is te lang" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "commando is te lang" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "kan exec() niet aanroepen wegens beperkingen aan de argumentlengte" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" "zelfs één enkel argument past niet binnen beschikbare grootte van " "argumentenlijst" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "argumentenlijst is te lang" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "Omgevingsvariable %s is niet ingesteld op een geldig decimaal getal" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Bestandsdescriptor %d zal lekken; rapporteer dit als een **programmafout**,\n" +"inclusief een gedetailleerde omschrijving plus een eenvoudige manier om het\n" +"probleem te reproduceren." + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Schrijven naar standaarduitvoer is mislukt" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Gecompileerd met GNU gnulib versie %s.\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Onbekend type (%s) van reguliere expressie; geldige types zijn %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "Onverwacht achtervoegsel %s bij %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" msgstr "Verwachtte een geheel getal: %s" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Onbekend type (%s) van reguliere expressie; geldige types zijn %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -809,8 +1193,8 @@ msgstr "" "gegevensbank\n" " of: %s [ --version | --help ]\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -819,83 +1203,78 @@ msgstr "" "Rapporteer gebreken in het programma aan ;\n" "meld fouten in de vertaling aan .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "schrijffout" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Gebruik: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "Een veiligheidsniveau dient een cijfer te zijn." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Veiligheidsniveau %s valt buiten het omzetbare bereik." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "Veiligheidsniveau %s heeft een onverwacht achtervoegsel %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "Veiligheidsniveau %ld wordt door 'slocate' niet ondersteund." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Schrijven naar standaarduitvoer is mislukt" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dagen" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "Het argument van optie '--max-database-age' mag niet leeg zijn" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Ongeldig argument %s van optie '--max-database-age'" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "locate-gegevensbank %s bevat een te lange bestandsnaam" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "locate-gegevensbank %s is beschadigd of ongeldig" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Grootte van locate-gegevensbank: %s byte\n" msgstr[1] "Grootte van locate-gegevensbank: %s bytes\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Overeenkomende bestandsnamen: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Alle bestandsnamen: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -911,7 +1290,7 @@ msgstr "" " %s bestandsnamen bevatten regeleindetekens,\n" " %s bestandsnamen bevatten tekens met het hoogste bit gezet.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -920,17 +1299,17 @@ msgstr "" "Er kunnen bestandsnamen uitgefilterd zijn,\n" "dus de compressieverhouding kan niet berekend worden.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Compressieverhouding is %4.2f%% (hoger is beter)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Compressieverhouding is ongedefinieerd\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -940,7 +1319,7 @@ msgstr "" "maar lijkt veiligheidsniveau %c te hebben.\n" "Dit niveau kan deze 'findutils' nog niet aan." -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -949,7 +1328,7 @@ msgstr "" "Bestand %s is een slocate-gegevensbank.\n" "Ondersteuning hiervoor is nieuw; houd rekening met problemen." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -957,7 +1336,7 @@ msgstr "" "Bestand %s wordt overgeslagen;\n" "het is een slocate-gegevensbank met een onbekend veiligheidsniveau %d." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -968,36 +1347,36 @@ msgstr "" "slocate-gegevensbanken met een veiligheidsniveau dat niet nul is.\n" "Voor deze gegevensbank zullen geen resultaten gegenereerd worden.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "Bestand %s is een slocate-gegevensbank; optie '-e' wordt ingeschakeld." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "Oude-stijl locate-gegevensbank %s is te klein om geldig te kunnen zijn." -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Gegevensbank '%s' is in de %s-indeling.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "De bytevolgorde van de gegevensbank is little-endian.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "De bytevolgorde van de gegevensbank is big-endian.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "De bytevolgorde van de gegevensbank is onduidelijk.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1016,63 +1395,63 @@ msgstr "" " [-r | --regex] [--regextype=SOORT] [--max-database-age D]\n" " [--version] [--help] PATROON...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "Wegnemen van groepsprivileges is mislukt" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "Wegnemen van SETUID-privileges is mislukt" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Volledig wegnemen van privileges is mislukt" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "Wegnemen van SETGID-privileges is mislukt" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "Waarschuwing: de locate-gegevensbank kan slechts één keer van " "standaardinvoer gelezen worden." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "Aanroep van systeemfunctie time() is mislukt" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "Waarschuwing: gegevensbank %s is meer dan %d %s oud: de leeftijd is %.1f %s." -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" "WAARSCHUWING: locate-gegevensbank %s werd met een andere bytevolgorde " "samengesteld." -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "onverwacht bestandseinde in %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "fout tijdens het lezen van een woord uit %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "Ongeldige stuurcode '%s' in specificatie van scheidingsteken." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1081,7 +1460,7 @@ msgstr "" "Ongeldige stuurcode '%s' in specificatie van scheidingsteken;\n" "tekenwaardes mogen niet groter zijn dan %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1090,7 +1469,7 @@ msgstr "" "Ongeldige stuurcode '%s' in specificatie van scheidingsteken;\n" "tekenwaardes mogen niet groter zijn dan %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1099,7 +1478,7 @@ msgstr "" "Ongeldige stuurcode '%s' in specificatie van scheidingsteken;\n" "onbegrepen nakomende tekens '%s'." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1108,43 +1487,58 @@ msgstr "" "Ongeldige specificatie '%s' van scheidingsteken; het scheidingsteken\n" "dient een enkel teken te zijn of een stuurcode beginnend met \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "Omgeving is te groot voor exec()." -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "Waarschuwing: waarde %ld voor optie '-s' is te groot; %ld wordt gebruikt" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "de waarde voor optie '--%s' mag geen '=' bevatten" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "verwijderen van omgevingsvariabele %s is mislukt" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "waarschuwing: optie '-E' heeft geen effect samen met '-0' of '-d'\n" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Kan geen signaalverwerker voor SIGUSR1 instellen" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Kan geen signaalverwerker voor SIGUSR2 instellen" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Kan invoerbestand %s niet openen" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "De omgevingsvariabelen nemen % bytes in beslag.\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "POSIX-bovengrens aan argumentlengte (op dit systeem): %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1152,17 +1546,17 @@ msgid "" msgstr "" "Minimale POSIX-bovengrens aan argumentlengte (op alle systemen): %\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Maximum lengte van een verwerkbaar commando: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Grootte van het gebruikte commandobuffer: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1174,7 +1568,7 @@ msgstr "" "'xargs' zal nu verdergaan; het zal de invoer lezen en opdrachten uitvoeren.\n" "Als u dit niet bedoelde, typ dan de onderbrekingstoets (meestal Ctrl-C).\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1183,7 +1577,7 @@ msgstr "" "Waarschuwing: '%s' zal minstens één keer uitgevoerd worden.\n" "Als u dit niet wilt, typ dan de onderbrekingstoets (meestal Ctrl-C).\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1192,15 +1586,15 @@ msgstr "" "Ongepaard %s aanhalingsteken; aanhalingstekens worden door 'xargs'\n" "speciaal behandeld tenzij u optie '-0' gebruikt." -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dubbel" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "enkel" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1210,102 +1604,324 @@ msgstr "" "Deze kan niet doorgegeven worden aan de argumentenlijst.\n" "Wilde u misschien de optie '--null' gebruiken?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "argumentenregel is te lang" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Schrijven naar standaarduitvoer is mislukt" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "kan /dev/tty niet openen om te lezen" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Schrijven naar standaarduitvoer is mislukt" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "onvoldoende geheugen beschikbaar" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "instellen van omgevingsvariabele %s is mislukt" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "kan geen pijp aanmaken vóór het starten van een nieuw proces" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" "bufferleesopdracht in xargs_do_exec() is mislukt;\n" "dit is waarschijnlijk een programmafout, gelieve dit te melden" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" "leesopdracht retouneerde onverwachte waarde %d;\n" "dit is waarschijnlijk een programmafout, gelieve dit te melden" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "fout tijdens wachten op dochterproces" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "WAARSCHUWING: %d dochterprocessen zijn zoekgeraakt" +msgid "WARNING: Lost track of %lu child processes" +msgstr "WAARSCHUWING: %lu dochterprocessen zijn zoekgeraakt" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: eindigde met afsluitwaarde 255 -- gestopt" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: gestopt door signaal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: afgebroken door signaal %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: ongeldig nummer bij optie '-%c'\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: waarde bij optie '-%c' moet groter of gelijk aan %ld zijn\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: waarde bij optie '-%c' moet kleiner dan %ld zijn\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Gebruik: %s [-0prtx] [--interactive] [-d|--delimiter=scheidingsteken]\n" -" [--null] [-E EOF_reeks] [-e[EOF_reeks]] [--eof[=EOF_reeks]]\n" -" [-I te_vervangen_tekenreeks] [-i[te_vervangen_tekenreeks]]\n" -" [--replace[=te_vervangen_reeks]] [--max-lines" -"[=max_aantal_regels]]\n" -" [-L max_aantal_regels] [-l[max_aantal_regels]] [--show-limits]\n" -" [-n max_aantal_argumenten] [--max-args=max_aantal_argumenten]\n" -" [-P max_aantal_processen] [--max-procs=max_aantal_processen]\n" -" [-s max_aantal_tekens] [--max-chars=max_aantal_tekens]\n" -" [--exit] [--no-run-if-empty] [--verbose] [--arg-file=bestand]\n" -" [--version] [--help] [COMMANDO [eerste_argumenten]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Gebruik: %s [OPTIE...] COMMANDO [STARTARGUMENT...]\n" + +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Voert COMMANDO uit met de eventueel gegeven STARTARGUMENTen en verdere\n" +"argumenten gelezen van standaardinvoer.\n" +"\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Een argument dat verplicht of optioneel is voor een lange optie,\n" +"is dat ook voor de overeenkomstige korte optie.\n" + +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null items worden gescheiden door een nul-bute en " +"niet\n" +" door witruimte; dit schakelt het verwerken " +"van\n" +" aanhalingen en backslashes en logische EOF " +"uit\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=BESTAND argumenten uit BESTAND lezen, niet van " +"standaardinvoer\n" + +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=TEKEN items worden gescheiden door dit teken en " +"niet\n" +" door witruimte; dit schakelt het verwerken " +"van\n" +" aanhalingen en backslashes en logische EOF " +"uit\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E EINDE te gebruiken tekenreeks voor logische EOF;\n" +" wanneer EINDE als invoerregel voorkomt,\n" +" wordt de rest van de invoer overgeslagen\n" +" (genegeerd als ook '-0' of '-d' gegeven " +"is)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=EINDE] hetzelfde als '-E EINDE' als EINDE gegeven " +"is\n" +" in het andere geval is de optie zinloos\n" + +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" +" -I VV hetzelfde als '--replace=VV' (of '-iVV')\n" + +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=VV] tekenreeks VV in STARTARGUMENTen vervangen " +"door\n" +" namen gelezen vanaf standaardinvoer; " +"wanneer\n" +" geen VV gegeven is, wordt {} aangenomen\n" + +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=AANTAL maximaal dit aantal niet-lege regels per\n" +" commandoregel gebruiken\n" + +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[AANTAL] als '-L', maar als geen AANTAL gegeven is, " +"dan\n" +" 1 aangenomen\n" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=AANTAL maximaal dit aantal argumenten per\n" +" commandoregel gebruiken\n" + +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=AANTAL maximaal dit aantal processen tegelijk " +"draaien\n" + +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" +" -p, --interactive vragen alvorens de commando's uit te voeren\n" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=VAR omgevingsvariabele VAR in dochterprocessen " +"instellen\n" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty als er geen argumenten zijn, dan het " +"COMMANDO\n" +" niet uitvoeren; zonder deze optie wordt " +"het\n" +" COMMANDO minstens één keer uitgevoerd\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=AANTAL lengte van commandoregel tot dit aantal " +"tekens\n" +" beperken\n" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits beperkingen op lengte van commandoregel " +"weergeven\n" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" +" -t, --verbose commando's weergeven alvorens ze uit te " +"voeren\n" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit afsluiten als grootte overschreden is (zie " +"'s')\n" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help deze hulptekst tonen en stoppen\n" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version programmaversie tonen en stoppen\n" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Modus %s is ongeldig als POSIXLY_CORRECT aan staat." #~ msgid "cannot get current directory" #~ msgstr "kan huidige map niet opvragen" + +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Gecompileerd met GNU gnulib versie %s.\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Gebruik: %s [-0prtx] [--interactive] [-d|--delimiter=scheidingsteken]\n" +#~ " [--null] [-E EOF_reeks] [-e[EOF_reeks]] [--eof[=EOF_reeks]]\n" +#~ " [-I te_vervangen_tekenreeks] [-i[te_vervangen_tekenreeks]]\n" +#~ " [--replace[=te_vervangen_reeks]] [--max-lines" +#~ "[=max_aantal_regels]]\n" +#~ " [-L max_aantal_regels] [-l[max_aantal_regels]] [--show-" +#~ "limits]\n" +#~ " [-n max_aantal_argumenten] [--max-args=max_aantal_argumenten]\n" +#~ " [-P max_aantal_processen] [--max-procs=max_aantal_processen]\n" +#~ " [-s max_aantal_tekens] [--max-chars=max_aantal_tekens]\n" +#~ " [--exit] [--no-run-if-empty] [--verbose] [--arg-" +#~ "file=bestand]\n" +#~ " [--version] [--help] [COMMANDO [eerste_argumenten]]\n" diff --git a/po/pl.gmo b/po/pl.gmo index ec1523e991b23ccdf95e3931eb059a43e9bfd2f3..eddf5419a01ea8b5b68c1de24967827f9835f96b 100644 GIT binary patch literal 39882 zcmds=37A}0b>|;}A)!Oq_x0HzB*m(>B->zGmT^mJTWw3-qSdmngpglXz3zV9RrSiX zs8j_^jIn`X34yQ~CL|%tgb)ZBvJl5)Lka^kAwV)@fGm(q!esJgG6|W#1R0h|TSJT(Xo0pAS#6X5Rv-v<1(rv90R-OAv(oz7}``@EGt>z_$W#1pXjU>+)rw#``xwJ^%RUx$#^ByoukZfSRZG z0@dGN0lpLXTfmP1>r9^JJ={k74+(-b;0yUZU{W-Wj{vU+{x(qKd<>Js(gpi~A@DR% z{kt2u1pJtX;Z@8rzh4c!8~9ZqOB}53aN~Fl@R9s}J5b|!A5iP{6`;m-JCpK!U=yhI z{t=+o;dg=80%sW(HKJs-UMU`f?oiBKlA^GK)M#Znn`CWgP#Vz9{Bq}h7zpt za$SEnkgf&iftruM0Zs!eQ$dgdQ{Y{|-v{z9c<~-L-ZuiD%J1tL?2~{C9wtEb?{45; z;75V`f&UYz@lSE_F~BBJ?R^*U+kp@G>%RtkCcl5%|NbAqEBO6z7WZMmZNP^ED?nYp z7I+8ncHlFB9|k@F`0GI7@gD$H?^{?bnhKr^)bAyr*7;uGvwBCqUuH-9Yu@Jn(hE{|0;tu+L3ME%+Xw z`u6}Z1b!L#Y2ZU<96f#pcm=;7aWmy1j1{PUU3ZI{=Q>b$(g8jS_+Fs;^+Div>VFKV zaenon!-xL^)cikn*5U0WQ1d$r{8nHBRR8Y+9tXY-$W#Yk2F}u6c&o#gwc8xO{t!^> z^w&V)%X1Dne0&*@r42p<6rMgB;=L01T|m*p`+zqAKLh*<@Ue5uHSlY|ZwG#1-mTLg z0soNq{x9GIT>t$SyLR8b5Cjk9`WJwr%ild31PnDu7vX8Zp94}g*mcawt5*Xx@1FsF z5%?!S(ZRXfgWx{k{|3@Ta1VnX0zVH_e_s5OAowis1t9U4fsZ&51n&U;S6~nLDu|pV z3H}=RIpB>ib#m{qr`&rZAYBYT1mu;$LtYjH{0olr-)`W~0(S!c1gLp=+G*MZ9t1ue z_$i?9=8u6}f$5!Y9^VPn{Re=etIq?k27V2w_MQ{Dc~}I#mfxQS-V3~aDG1&O{1Wgn zz}2dIegK@}_d9@E&(C`J_dwy-_8K?`Tm-7#>w%iT^B(@azkXdD1UtCi0zL=$eL(f^ zSAZ;a@Owbv>5k@P~k30Dc(w z%GDrXh{0rn%zOxR1=RDq*Bx92?&9~mfolIh07Ky40iO$edL3Q>ya_1$d83C9Zy*!+ zeK+u}z`q8Dz}Gk3I6eS;B)=a3wt=4jYQ3gXH|~!E5AplUz?*=TmXmKypyu!Mz=zS_ zN8RP*>f>qTgjtuDQqYn?t~>`Mm^Gy|)5i0DM32p}?;I9|8O$;3V+RfuLaUtXI2vdJRzh zct3Cl@Do7Q`zxU4`#JZz`vaip>YX0`D)1_P|CxtRz0cw43~(>kJHUOwp8{&W{|Yz- zd>)f}4KVWX?Z7Me{Yl`Hfqx2oHt?aZWvzkF0p0|B0q{EDSs+UudKQz9V0=EEP3k-oD1b!0uX`sgQ zt~a=Ge+l^5haiLA=+^0}Z^CBa{xa}|z`KA~0zUwJ0`SwoUDW?W;8uP=@y+f%dx08n z)&G7qQ1{;t{5Ifcf$IMkfpy^5fWntMzlU|Az3&IUh~J-ni{l56daJ|J6Tm%Oe+zIO z`0GH?+Y7(f>A!CRekZ^G0=OIajJLUUn+N_SzuyG>IPmVbqk{ksyuFj zPU#CDx)6NHzB!z~p6~ONM^U~qVa349!B{|%4aAk0!f)pa}4+kl=oA1Q&uVZJeKk-$}1@|lqXPP$|ERmqCAFjn(}svKDSYR%)U7v z#mo49HRTPI3gufV$0@f{#(mCn@zs=vQmVefw1=WS(d&;;evtA>%6C#AOOyLepgxBv zCn^6?KT4mZ^!)(ezmGEEuRYqsMc^;`?@t5%0Oc^{&6GCfJ(PnKM3wP~D}ld6(dRcP zZ>8LzAAJ6e1Hr!lKAW;c`EAPQDX*fOqs&o$jxwO=b2sHWN{yn=Cn!hkoBQuIfPY7M z9Obo?=TUx?qR#^k*#8gb|1VJfHRT1AeU!IR^!aWFOa|%ehy3rI9txcG-_Lm10{#}| zsg$cI5k;R5J799{b^g1+35sMyUqAS~l=5wq)9*l^rt?pEJba0Akn&PWi*hgJU6h}u ze1`I$DStzGBuE!hR(Mup(TAV*c`pC|A3mSwUWVIG^!J1xy7w3FEO?&!pli>B05#A0 zd<#X_7P)rNt`yha%eCDbu6>Sc!fAc7XCDf&YL4}JiUY=H)$Xgfm$mz3e=qCX``_(k zpDqg*RsT1+HskAM?LQ5~6JG0+U0dba_3l!B?R{JmPUw@>3npgH#?@XoNtV|`~7xtrOH?FCP)u`2qn>)f*J&rnY*d4U^Z#53%X04JgSC*4{ z9InTMPPd(|$CDGm#6sLk+ud-fM=yE)2EI_MSz`e8&P^-L-elTdxluKvs>alr3M;j^ z9(Uug(rPEo?oJPv!<*+94o@$Jm1Vom@7Y5$`9-@HPK5UHRd%{6{+Itz@6ZDO+0(qD z*W^ui^^$J(Y|QkA`{xfIo}N1p?g=X+zhC~!@T#zqt``-`kJXZPal<`XzLY&&zP5*v z*W%@}F}Abg>Z)gbSUd z(*;AO!n75)Bbw;!;H%B?j<6edy8ITBWb-}|_{poR#`Tu_KJtGp>9p#!Z75=O^mu%h zsmmX2wbLqnt90sVw{j+G@4bC`fkrxU7Zf>@w9{roqvB2yErBb#oq&R?Nxc^OhvQDs zUS~D!SL#VaSX=t&a_BEJ4IYE3$YR#x=1O<9XyQ!Vwz(=juCHmYD^Mvzv6ZyJXyK=)ZzI9 zGhwA2uf%7wyBXSuCT%7v{dUrI--K~J`<~V6ucizuYQ)*&VWpD{<8bceQnkN+_?A;) zrQ3$`D@Kr9thK=L16=MUwQw$LhTigvi|X~<^kF)6cI1guK^RtMLoM0(Pe*--z&b_) zGF0Qe3!06}p&eXmL}zUYI(rXKzoc?#c5ddVTH$RWjHHo*kHw8<+N>#oE9!l8#WS6W-NJ;iy9F zrKq~zsYjjFOE>5zDQT|Qll62ZsYdm1X8z`kRJmm%jWyCZT|T*YW)7?y`NS~SGZE<9 zl>n&BgjA8FG0+J+t+<*jCvk1hr8|_u8QcA&!|U`dc7kd|_%M-KrxJC_qv^@L3nSg~ zm%((FV0LbHad!GpWqRS3qX?(cD(fCv zfFpTnAV%>vf424;N#5=hqyv>_Ji8#`mfAz$BdpK_&ctOT0uvi8useoH#~~!$6jEl2 zi*={1$D3(|o0Vj_5>tPWHDP*<@J001OaY#V4Ud{(Ej1DrtMG#VGLSJ-mYht@=4geU zGc%d~V2asNeCY-7Y)WbsQoC7o>Bq%Xq!I>8L^F^mT&LBhL|@zYbW@e4rmTa;z7m@DaJlu27qbMl6c(jc>nZwZJy{36 z!zTQrom5?m;p_nxvl@vSd0-W}txlrx+AL_2d&|qo*>FooFNg9PNi&l?on)m6v)@wV z7B@k_<_b^LSQL8fk;B;_+}@U=zt!S1NtH?HHI^XoEp_A{lRoaU*$ExYgt*~s2-ar{ zsB*F$FYCcmymU(QBTO)k41?|VI^pi?uGL+s;P^NcnTG@jzTrsT!`M;W1vfMc!Rp>n!iNN8~3`ZPB)`#!bO&?K=o{m zZl1k)zTja% zU60X|9MAn`jHfebETwg@9Yt{cAO0eivJ*~DP72%@z93UQG*_;_^f=ok-ogU08$vQhad&{w-3%g+5M)pv9tzL|x zsIhxf4RA0sM^RgoG~9CSNXA)e?p&FF~IY*uuXJ@+RjO-XJ4@Dwy*hUTQvjLxT>?4>F z^V~NX9*9BSb}*AM$|!85oy63V>o3y?WBd%0RiHCP-r&m zdosTf>bJZ?=1G8$Me+~rK;Le}5*_L$FH4%$daov_R*NAN@wu#B@BGrrqY2}TLTT#D zH6bS#!oAi*4q5A7(oed6IlX>0Vm=~VER7y4RjQ`*8HoHql%)ao)8xdwoM9qfBO7~i z$Hc@VsF0C-VQK9MM{XeX%oQQ64P_Pwgeu7TDm`7?bP`U35ygZ{$Z7}4FVqih;E-D#X?2q?u|Jv`hu^F!riB zt5{#Bp=H$WNVeRO)dZcsU0ogg6Lh0va|lv<)-k>xvtiY-=jCJt{FO5(luOC5j`f10 ziGcl}rKU=gghL0jE6vmpwAaKjm##FiMunFkaJXELR(L9y75Uhj02)1TQ(jZ7HLPYaS6FrbMw$W=$KN@Qg~h(h&M5uDUd15m1u?Tcnh7oAWZL?ML-6ccW!gRU9lk^rM4cwKV^?wY?%ScxgM zarw|TOh0yf<)uXjghvfrLgwZ4c2y_1)tnu7ph2t<2MBIMi*JSpqIx|Z1cx>lX|n7j z!i-5yT>Lg_(_#3BT+ahDS{xc9Y%^>%XGJ|_0^KdA!$tK@I-!V!doss=9uzTXj;bl% z@lGpk)-?NQVq$~l+lFf%j=K1hxh|$x(&6UowTe?CFquYePa(WIgM_oTpb+NWh%uPY z6uYD;H4gHC;o{2YfkK5h8^uBeG$mc~s$hQ1WY>Gyd&DiVRA-m-0E@`dG<&hEjvUhi z+;&NIy*}6>k<&>et9!zM@Rqq_ehibr5f_SajD(2>fyydPm^9GF6L=WPLbMEX3oG-% zf)l{o#NWZ<>bgwg73p#4uyo@rZ`tmmHfIw2qs)08wb5ny)tnJF(Si@ji@MtFwx+JW zx)Ys&wMMIxKDKi;NV-GrByl^Fyf|R`@e*+dMGD}A0~n7jYO` z0+IXytxWtC0y`JNd-Niw0@XDqgYZm(YD-7-y5a$r!3%l(B`I1ZYQ!QnKyXEmFzw?S z1dDgw+eUV`GM`DSjC+;wZ#k{k(>||a(F;WNsZGWT;bra+qx}9V6YMI9;NWNR@-mv!W{RsuZRiY~kD3EC$Q|LDCe zJLNpl#Q4@cmvMcCS@bK?2HR=9BCbs5j0=U`XdN2PId(QhenzvY*;;4b+ff~NQaju# zg?_6woL9f7@OP?(WTs?<%%ahUSwQIl?aXVjsph5_qnj(!x~2BnxQ|RP9vmCH+mWG% z=GVM+c$q8~wkgQ=UP9ubrq6M z;2Qq1D<`kqfj^@s;{zs%Ea4uL2~RZ9AbF7sX}i7MCMi>*jNq4&m5MkJxZH>&I^qh} z5~0mzHB~E6oDhHH8CI@akH4dmur2Tt!hG{670(?@4d%w(^~WtREAo!bIS387+h8yTJOG6uYam|REc zz?rMpbLGhV(b<aeyM%-> zLA98<55;^-TS&%mrhtArwMb^%u@1u4^skfV&9}hzD{#sy9Diy8w9tp?RLBRCq}7e5X6Y)VHA8Zph*&sz%}5u|s9ErE07`moZKuLmS3l>g;kPT8n6?DJ7&< z;1%)WD5oc(F;e6JK0IlbjTr6?jpgFnu-A*@7ZqLc?aPs(Xa`JggtDcqiG1@>`U~EI z7ZY~6Q$s$HoqRS_^(+Mvlq!jf0M3IJVH%(J!%lu3kMx?G9~xu4C>XHRL!tCaF=`xq z+!Bc7&2mB}I38IX%lL;6Oe&Tt<-LeI7AlgDiYocb$p#y{%m0EWHer{t7sMW=!L{2x zLbT=NFHA}V>cAwM)&-+U8i8L)Wq>KZCn7b8X66(6r`d|+Sn(AN&&RLKnFq_3Beu(& zCRl@ch%k5Z>5bA$wM>OUl-F}6uk&PiBgyNYlYt&BoG}^{?8s?zPR}&)=+(OdOBq)d zp>peznV1phJ-lDQdN7jv+N- z7-op>)?P-ZM;Qbo5VEF8;Mk7pRe4vPW`}lVZpyS44KDDs2oF`-OemBQ2#C5yZx+>5 zL=iT_++p;00v2Gam<5pu0!(dTTFD1-iG_MbI+iyuAaZ|US^ieKO$YL) zJ)Y*jO=wz^CPVT^ajIwEJ9zkTi5Bfjs%+M214(5wyR%h5wh&WP*Q(fK%vdYI8Rv5y zSpM}uGZ8o~Hz@0REY@bFFn|)tgIFT8%bdxmIPFYd=R$}2ENAp|Ej_KN3(=`*hkv3X zy!f)r%pLD@JiV_z>26ocs2FNZtBjT;E!mVRM(u9)BcdeS6xxoxI3gt6L&lIyNi!_r zQA|E!4f3;QHAIm9hBHy+w!d@BmMzt->N^V^x6gQTS?(z)AyE)O9Of{Womvoz_k(Q3 z8G4}_M6CL<(pAS8($?);gJm~`pqYhb9L1D^GaK&X#9u)?U9^Jo^Tt-Nz~9w)b(m*a!Zzb+ZD8mOr*G-{Mkfi~*yhu}`?*upU>p3Og={?|r`P~9F z#$4JH&RVqH;gV*E*)Yo>3c(6oH;owX$2wRZ77Hp`R`v_w;K{KKy6hx3qsmWl8onNb zqsc*XfyXjz9_@gCtvF)#R?O?TO|o{!lp_;~Mgiz+65BN#Dli)74m2{z=C7EEJ%z_k zOa`7c&~V3&M;e&9luR7LKkxv^twN%goVbpPOb#+eGd4YYQzlRLYE!97ODXfC;K&Tw z1ue4b#W2hTLw@d5cy#6v8SrPt5j2@TDp|auc*d50j3y;-PJ}-L?j|fV59!bA|g#g0j%TE{6to(Xf5lO)Xv51>U5uyL~(Ua=Nh|OKR2fCwKVA z7>-R+r6LR5E57JX;$}>-r5vE8c(1C9Zg;{v_ihcO&G{IZAACt#8Gm!>2dPrB+*_Ek zsE)@H#31u~yS7d6Ly;f$H<+8%XPk={PE24lE6ritvpAo#9NbLnu(>UDp_5OpcY`{Q zLnzDBT(RMyncHU$9pwVfJ^5yf3$mOw|Ckuder9uz0{Q1ixUk}kdec*oFQ*Aepnf;g zF_$NTPK2~m-UBHbrc_EZXreJxSGR44mX?S$BQSeSQ~SJ(m<*hT7i4LN8>t8l3@j@p zAo4_((QTSd@zdu%*cOU#+gvDKz$#xgCt|PI|8rW8h`9*KwvR{$fPJ_PCpa1~ceq-$ zyV-{vhP;%g@ zURb$#ctS%g&17apYdIiz>zE1lEw=bdW8Frmg82>QNTbS@$z4hd+Fq>2h3t^RS{{jW zN#%k5^Qe8%kWj%@HLa4V8%b&8twmkKtjr@}&Lw1^i)v}6@LG!dI4*`y0xv<1efB7( zm6J{k2@Z{jWsylF@>ZVaF$1f-#nU1C#jkv(zZ^?Oe*Tgi#}?^ z8tR(=2Mf1&U!Kb|ga!C)iaTE_^C9ojNR^nSGtCms= znDU~5T%j&Ra|E*DbM($z;qSIQ32StZ&DFRiA^1fmOyn-yLT_{1(R9yaPamm;g$rI< zW;ZO2l|ld2#z9$nrmwrFDm=BvaSa9EcrVTplrgZzd~J@Ov05T!DsYSZcgN=7KjI*E zr?kdnMyM5LSbnaYapL@D*(D!ork3+hx$BNKi^!=1GRmz;kA?3P43$5H_uiMcaZj#eQcqvET&VIev#|>*%sP~BlC-u{m_+q zRyhD|Plda8?z*n%ez>t9I_%xs!^O1yXzz&?)L&Q`z~#%I<5zUDr?T zzUHc(yQz1GohX$>G8vF7*l<(fthfC(w#Uw zdw8appIwtXC-x)kK+ejdh0?Su^J?*>^(kMPnA~COk%GtES6#&hXrQHJT5H#I*IIgf}7PJ40U6=Sx4LD>O80M(cFw{Jm9t1MDN|fxr{{&fh~< z2l)fTmGk#RouOXbjKZjf>*<17I@-*=UR?tNktmn7mHWt{+1oC$mD{RhTe;njY%90> zb)l`?N9GUB?4OyNoyj+I7gw?!*@(2fQl?1DIf^k-zEy1LF6w7ZY^bVj-DzXMx-ea~ zeCHorCy@#>a9!F3&Xjd>-Pu#gE=^w%({Rv^&OgYanlIaFGZUqYjg-6WgJLaeT8d7> zS`LdX-XH%6dz{i%b&b7`QoQ&L)@U)3Ded6W$D3~MNBRFgz3nG4X$|)Ncm*4~m2^m1 z1BDDfhPqR<0}hRD_C9e~?U6te(T*B9aTwT)*O&p4vQxHhuH)TW3;V(=o&_`gbeB7_ z;X47Jw9y<;HE?$-6-&G^PyEQX@X-<2ea%4a{5`#uREwaUB1uw^PSK(dac_7v3&IQ- z{rU~!%w(8ClI;#(E-*3jA!)n#ZS!mwzwPLy_KP1sF~4wPW`AkF_~ODH`?CGw{%(eq z(wt1yxy=3IdE*wm_{Z%RKXH8e>)tR9!lUA+%3uWZP|7d1Y5X?Z*l26eJOAK7Jg*t8 zv8oS(Gl!?S4N|qhFOb16rDu-OrO~KXCpB*K@>e!(9xwMo{5EYkWZuvfhrz2J>pKJL}6N!IAR+n(Clyq9?kH-Op*Q-%h(C^sooJVKUb>IS{Qjo)7H?-T={TrPy!|k`e zYb`hpYm%%hhU+Sj*yn^~ix?z|s=Im_+kC~Uh6IcI%|S!#AgZksV+J!D@b!Blq^3mj zWy}_0mibv@mc&_601|?4CU0#-$&P|NPL6I?hhNn|3@u-4G3 zdu^n&o&C0><%P=eQUgqvG^ykq=qw423&^G72on&gUB+b7l-PtLc!+UxN5xHS-kaGL zYrNswVO^sB@B&OI^P3AhbFOl!dC%1~d+WtEyAPw5mWFW)^J-4%^GvAWW!L$8t(l8$ zdS8l%g}#WISV+B*`Dk2nI!nXFEk>(dxUnf2CEaL<5w1R8Y8p&~WiZ+)DNKQ>Hh64} zl*^J%5SL};KjXu&)XIQMp7wYE3D#hoVFV3%z(Sia+1oeXc)(z#Y6XDeW*Lm*Nt z;V-67VnPgQoTxx5;b681!j2T%29tWx=8romkiuYvASkEWEN_o!$;>zr`#E=Cc>ckt z))XgXu?&jXx~PY+?MOoy|G*k$L`7Uu^`6n(hx)>N1dI&JbA|Vsx=P zi>Om~uuKmWwY0`zXkyiU^m4I$zN*7AjD`b@scyWEH$pwg)*p)xHy*oa&)>uD_H6$= z%MJpZzsF56Gm9+1_mCTitRfB_Xo%Q_ZQ=*}WWYJJ!AGQ1X6WGs?hzUA*{nU2DPm3F zz~(*m{XqwwLO(p;r;E0y-o&+BK}pPDa59+vm(306iT31Zp566s-}^A?G6xnH-Z0*& zi%rH)29lh{s&b#_Y6~>-azu0`?%pWU&GNl5g&~jrhph@XA_y*iWwf=jjK# z7o(w(z|h3CI{r^S88Qpc-6#Bm|M-n9L!`quurr%>_#f{KiIuK1T&E044TEG9X)X5p z698i2-LVP|H3#4|nq^z2cXv=^yHA_S7%GUz<=RaFu!yma)WMcGAE<@VVW=@eU@(`Fqe` zIR!|LE88E1HJ+b4kf5j|3fEa=mZ=feW5nee;`V}%I>Cg%U2n@ufQ3&4`$|$7-fUI+ zE(cA9De3qV!4cV_xhYp>X9p&O6Jq(WlCtl^*nG|(+9PgAa!_OMr#+p%ZE zO;BPs)y@_A;?mecD5oKa76E%bf~~;wu^XY!02wBbg74ZZ|uT! zPtKpfFYFY#9wcvOpr>L~8#F2mS{d=e!OUky-$1aXXidJv$%*42^T$6z%tyMac;}Qm z62bFD-W%cg-C?I8WY?sPqjS;OHRpigw$Z_81*{e3xsPQ4$ub)0LQrr+=OM%mhz)Og z8+St3Vq)s@VS9}SB=MuLV-bu{t2nu}B8)`VilWSG?!jctb8=2;d(CCO0X2{qgc=>A zj^P!o^v~Uoa(<7R^%S9FFr5Al9+*3;&p`!95>ke7NII^Xt8V`^J;4q1|4LURPcEx7 z;yg&;hNvY(M3OK-yjLR4A*vA(%ntOZ6ReUv4Nh1Zk))m(RhVF`1Ufvpp%WX#Xp@Lt zMRF?|?!#S<3+wsEPE8O7UE$n)Ezzm9&*o04g>q6LQq?R^xPS?|e`YT0aj!9N+MsjM z+6tsojpFNiGlxHXBj0QR5^3~~-Ld!@ zv$qrmGW;FZ#T#Br_}D2OEDqnjhht=Mz$8LE#T|#0W+kmSw~04oBg1`5~jV#Ls^m-5QTAR!b~0=88^r;d<^mV2PZD^sJW4e zwup`-?ocZo@vYMY#zS>g8XyY0DvY%x$||HL1ct$UAh%@ZbB>#GGNntJ$QrU!D|Ag0 zU?u%*37@*u6w{NUV7_n$`6mh!1P#aYD8nLRl5$VDa3yb4YSdN15%V80hLNR3Eh=7L zlM`k#oaXH*j@Ej7{sE{|(v=W3huaR(EQW)nb>cbR%+Ui>899)`Yd7MJ+%g?fOtz%W znhOhMiA?k+Cx*4~`pySON?MT*H9IfFAl#OqMYF}*;?<}ygbqWkXEQRM6=6GWx0xE^ zo@C=l+B|pvL>97^Vd)w&F;hyjpocD$4b@!m_zK8r$Am=zyz`#~Q$heWxz!OmD5$Tf==I zoub=D@%;3kqO$=&?Hai(CDk+1vnl^#0M8C6z3ijd59iap-;O95#9!5xb z;&M8Qf@vcAxG1tSGu&Yr(qdpL7$u-03*plGoW9}@%K#y5I?ey6WkaDM*@M)CK_7d^ zW=H+V9(F9jYKx?W+Da-ocRyZ9aft^9N*1SsIw#Jv1V0YT2A||K9BXaNi5cQlYYlY* zQHENb&5XkAxgJrRlp*QnkII=>O8D{@}&UJCPlcF>Fp^O8H0ZfDHIf|KlH7bEK5kOk8OmbDgEu?-8SD zttZ<@+#c|Qb){{*WUKn9#mu`%tLNXHr=M()cGBaKb~$Qi$7+ms-fTQmL-XQMg7>;e zjpbvZlhHEvU%v%gLpO)2PyrSD(XkrqJ@Ru1eT?-GZ8&5DTO?oNF?g1}ACxR78uf>S zH||Gu`C~UM;ATm}PRAlI*=kzy zmHYumEzt`7!SvYTLGKYL?9G(#@fh`dLa)NrGe z<%lgi>O;jT%be@9;eASEzxXj68=u&C6bF)+n4wOC;4F@fm22=V)K5!H(~Gj)_`UgM zJ^0N#nZw75|9?7|V`2WliRoMa;YV}yhxkY1s-3j4VY%jy?7wx|PUk3+4^L*vAa|71 z!Wnl^$Fbwnw@gokJ#ueJNK2(a^XGq1wRKd7)1gVf z4^$=wGd_`nW2c!F`KxI!_oV2Zh8#i#5L_pNm|f&kD7c2VC}9=g);Z^PXM+@}!<-Ew ztdo-Bv!cr68JKh`UkS|};pzt&A!i!1+jVGbV=6VX#GnY?6Yz4B?UOuQdWKNNg@4RD zf$yWs;UO|ppicQIEa{zLImXM3vW>w&$1ENqfBv zEu4+M+0iAOWsX8!jiu<>wM+b58Z4#LI>%3XqEPX%;u%%{5n7!Mm%xob^qaLdnyn+V)C`q|PbW zbv{MV-Mx7#tPR?@l4MDk*U(jnLVp5^k>Ze@lH$o?4iJrEedHAkNkan7wEFs~B)ure zyQmv}%YjJP?UudJU4QVPZW{vue-l_f<|t#m1t7&Sa)!e z?-w3iR0phlp3Gx0<9k%LKG5LklvfD77U+;s%ItXk&(3mj-f`H^=y5K7*BHGoMzDg@ zG*C1mUkWB5BOG*$HEjAYpViVXGvl zbfwxQ9O%%EyCb_4vBk3d-)zG`9z3Yfr~J5)ZQ=1d+)*x^<)W{A>?{}m9biYf0Ckc} zs5<^A7hUom26vG-&1fxBd`GYBu-_9wW{`pjnxv9nI7?A6(O=}H`b-wZe!x7P=#nYo z_)5VeE;`#7M-)6DpIbZ2)m|qZW;m!0aMFg`Xb$HQb0;@h(!ccSF6uBW4k3@U-~7C? zUNK{}Bf}9pcBNdmc|R~-@+tSH0Bkzp<;eVr+4;kFl#X~Qu6)DKc*#A4nipe3=IPb3 zF51ipGa~|oO(+|Jq}=@Y7cG~R!9w~>2D!RDxKIEqv(mH`Uo9B%~utadj?vTFj=yV%W#$ z38Ugqi^+Ehy3=AxKR2BgQ`~c>#rWS@gBwnZ$!m{4EhfM1PK(iig2IUKUSv)A=5-Bp zsjR0+lat`D%TMI;=cs~z0g0eHWH)90--fSq2pYf0Pa4*nb zUNMp}C~o85Td=>8oqHTm73VJIL}%i2mcl#(Q&ci@&t<33WUect{K9netZ*5pAt5L0 zgyr-)-&+zZO2)dA-im9{c1N3M(N3KiIfo{yFQF`z&zqScS<1FzE1ApkAFC#Gb#zRz zB}P6T5b83{nDNtvbrUdcXa9Y80ke+9JdtI;Je`E-;5y@1F$8N8kp}K zGtU=U8#^5z({VGS&(=J{ll4Qk%TP|=QsOHDM;l$~(^}y%%mUSg`wz#P@#5i%(ot~b zSZplE%<@!w<*kGR&g7FVtk7k_zhw<)`(IrO4SUb>HZ@HQS+Om-WccHxa1ub(NX<_%(vN_@%xOfowwv$MdPXBzy-XL@*&-m#qS7q@o z<^{-FFVqsrGj-E51h3aR&kifda{6_oV)nE*8+;%lw*eTi5ZAQRfm;+yq=Ju;kueDU znKLIu+@@KUj+-&Vk-bmO926hm^cI)j#3i!%rSuH_{&#oOjHaf{CHk~#+pE_MCmjP- zi*Pd2Bt>oBfA4*^*amp1bAE?Lh4({QTUot)$#YA|oW2Ybv)!Ac^2TvNNFfHLTmY8^ zW_k0lH>Y{&zO2QP4#!ia*soIq>_sqPbCy{?KFDDyJVps{$1LRU^fma7Ykx#*%PeJR z2(ojS1!W6i&Bx1{IVl>COKo)h+I?w{E# zS$=lK~oj?Zm}~|Ve^sy+cc`Og_A3n zvU6wI62akmc94^fSmekem?3|BjqNg=w9_VaqUc|Zznd7hb+Xu|KOTvp-K*>X;ghq~UO z9*#QzmmQn@#TclK!P?&+Buz_yYlADCm1d4%&Jryp$8bo;3a2c(!<(HjWLmalk9DxX zIEl%hCu;{rT&g7<(&QS_1k=*t=xowJ|MRcn2&wGoYSzb{zUEF!V*$ybv1g9zkA;+K z`ctU2pd6G`s?Pk|1BRO!gUGVSF1+>cCaVplj-oY*L^*0CIu^Dr*&XJRQK<06YpXv;aeg_7b)SNWg{>7Zue zb+*KbVkba`x-MGc-6h6gJyZ9XD@2Ya!{a%hlmY1?L%h;*>%^qIrUqjv`nAJvZlt%` ze<{W+4LbK*;`%z_5}i=y@;n-rl%xvswqSeUtlJ>s(XXNfSz*H@joB$Ia+F&v0V|HS zGY*E%%P~sKIZQQE=t@{@&5%=J8^mGXED26JcE4B{@bcRCn7odr!&4)@$YLFcL7$SS dwV{rL;vyex$$u%&a6EH%;5j zr>Eb%H*em&F{y* zB1x|5k>ueN*Z{u`{{Vjr55ZrLGK}#sJK8XQ0uRIW&>mwLo8eRNJXkT-C>YbZSv=M- z>fjD|0Nw~ENriES;lgS-6W#%(em9%|e*!1N-$3ceaK1VlHp3Ax4C#yE!ujxKDDOWH z<-OO&7Yt(tHy=fF?NdI zkp-}wyc6&h7$(1HDuaOcK#Gh>^g=pZXy)cjZq`BR`8Fs$*HGl)F?cR~4W0)_E5qo3 z7s7L32|f$ofpg%4OwU629oPzGbY0*wC?EblTmj#Om+^gLF7v;XfiIFWl7(IBPt7q zF_qT1H|8Qa4=~lOP&)EH!?_jKH1Z5S4tZp}1{c87X+>tB1+Ib)bYKzggEdV&gBm^t zUxqBZk*6`_)i@&L`^ID3NDp6t%izDm^Il!~V^Jn6_RDESDKwLJ)>-cwM) zR|57yR?8SeZ)K^PA**IMkezHCf#cy9p>+5KI10YGkoDinO&g(z(rsF|5KcE`k@5Z)4B#j`1jzseB!Z47?48!x1d7bZi=I;Jvv}Mtb=YIt};1 zN$?<)nR^JH4!;4%!EY6~Y31fkxB@n_6*kaN7Ze$Ifpw6nAHv?;2NyuurVsOv9b~)( zkvC%qFRz5>z@Nbkd>gh>C^EBbmA@1l;4f%@7kq;9!aBafV2t0vQ+P0!dAy1I!nOX? zJrDnd{44Nc_{0T_4jSvI3$B3Dfm@->%yaMnd<#y5yVo1W4KNScnZ}1u!P*Vp%oL0Z z{2RlB>@4E|lm@>5N5CJ!$?zS>DjBDK%rMwV#!^@Zqp$($ApbWIIX2#gvUKBFM|p2E zlzIo@4EQ9hM*fT+a6_kzV^G$#Wuw1MHb6!Ge#qn)J#Z>KWs@&t(;+*~xDYnN15noV z3-ELB>riHD&t`;?nf*GHj%`4q<-M!m9KLTn&W$wuW5}!-??YMZ6&Lv|!X)__%>N;H z1WNrWm-roC3eO~eA(ZzngCca_hSKr3A(LS=Z1ZKug(mqDEX?O->~^*wTn7<+W67ny zFuAau{4-EGIsr+QhCcVi3@*9{yvBt8+oPyc{HAdjLmo-$`Y=> zf@TkLlfA;9vJc@(@(;K9Q~x%sAwOh?-#|T#liv&H!5_lvg3!;*qc43k+lu7~o%58!ohYuMi%ufS)>pBeFm@dY@M{Odvf z1Gtp@7|S=?7eO|PaW9l5{Z}{|&feq8$Z{z8?FDY;aAU)<@GiIzJ_b*LZ@{7OEhzPV z1sSw4p~F`w8915zU2rxm!g}}`lmVT#*Vpx}P|9663w{RH!NT7MH@||?z!=*Xk`+*- z`WiS5J_edVeHIGwx$7l~Ni$&EDp zBD@5??msXV#C%1x7mla=*HC&q1Obo+nxK5(BKS?{KpEMh1S+|LS%RC%#~go2z6z_z zpGNP_gCk&#i1m7IWGy=3d|tc;&LscjK7Zu@3}=x49h47DO!-T)5=zH5KxW%8;S%^Q zIE{8rOZzif>-tL?fvleKDYzB>5jOCBV{68rx;$J={&DzococpGzO>)h;Rmxm?}W7P z&DL(Xo+OvND@!4rdWQ4~()}d4Hj$2acmB>xek>si-$+nA0Cb-th z{=b~eHqxb}&yu#2M5S&aJxscabmG+&6wHF6gbtDBlb$AZlg=VNNs{YcAN~I$!QE_F zCF^hYKQfG~xqm9iHw4@mFaf3h=SWk7G6hAr?ngL&el|CVbv0=oX$|QzQjByh=|0kP zr0k2&WavotaaMmgYEtFcEysI3M1|r`f_EpXcG)ps@V#tK{XQ-(xk(V;519vfop- zGN@nvXftY~tdh!Q*HI>mBv-lYY07H-qM)p_U`(V^e}4S3VRJ$|H*Hz7R)zHK>&NO- zCfu%!Kw|TqjNMvGmyV`H1(zcUOwdpGT>WoKp z-^`JvAI@y3sIe2aYnw4UZK?ELGi60Wd+eB{_L}Lv$~D_#mVUoBsXsq!eraFb-b%e@ z_9#7b_W7klv)d{!aKn4$GZ*ke!i-z#7HQttJz%gZySnA}7TghCN3X2)%wFZ1qpRw@5#3$0a_vnP~xQ&QDxD`$2pX_8#q zvi_ohmo}=n*%gY}39FEn_hN13e0rz%?fz`rvi{qhgTA^!rL1Jk3|r+d+iimjyf%V@ zwq?gX8R$epI#CFjsSd9XA^DJGyf1pC19j70hr_JhKwU5ARrbpVYH#&wCsR(C+A{xVoyw(E^2;e=9|M9AI~vf@cM=atb-Pn4F4 zJe|;jh@w|%uN6yj6L#WpGZ9g3fi%isGehE5f^V0eJNKmu{dDt$ib(0@=I2k~w)#$P%RwF0U`0 zv+lbUrO6xatGsjLd>z~PxPENYS*5!+9jdH2Pfy!={#o-w^A?5X&sXynw=8Pb&eq9i z%?r&tCp7O|HGgr-!o~WNTmQCd!zEin&CQDzhZg87F1jbu8_C<2iaH55m&iC-GhsC< zTeVAZuS%x++9^A#!ugyFvQ}qznCiC5q%tf|+@>(;#H_HDu+1f^)9Q}dDnX4-EA1-R z;bAIY)aJ$GR`jYYE0i^9_^8S!%qSl{7B*EfW=AtkRYuk7Qg0;3C!KV@SLHiOW;##n z2~(Mol$F-U#!M-_dhzKMRoyYlq#Hf@-Ak%3Cu^x}E@k%62TQ(*Ot9&y2Fl`24;ms` zG9xsYW?cCeTO6pZl^5&Ww_8(JyabS2-u7$6xw{uDEjgyi%sa zW`1&U29>v+I3H`b@=4nY=dELDH*0$9l;lCe?sc7}JFlFilUEKqkM~S}J`xPSQPCR) zAl+b+^1Q6lNk>*eCYs@+x8i+Sd3{NfYAqGRc_-m`ee6|rA*-&*Ktc7-al*`Ji>k+r zB&-fc=G9}SM~~PwX=L!A6K&=4MrTnk-!*C0M@qw1r|L*$k~zjM4QF#5v7)|y*PMzT z{pDTLXB?9*kuXbEoN>|xI+14%5_U<(qCePGUtNskMGjPLEYgVn%;r=g6SqvSKz)0{Zws9Gu? zsG$x<;{3BQAC1V_Pd#)5t(v-Pnd)1W%9Xnl(h`&g;$S{ z4ZQETS$0E?MHZ0{Ui2HOO%HnCi3HmX%jU8poJgGQDP7Km_j;4bJRfU1$s79q$mFvT zVfjE`)@V&9`$~GLr6%-7(+t%`c4HP2+u2YRJj_~CE4uY3tu6e2$7&ocvlPy^_bL%c z*40fE^_)EmYkDKau#7h1L`*~}s8&>AvlMl*wp-LU?WryJ_g1GEQ?GlOh*@&{EoZVV z!kvtQMZq@P;hY%ie5R9zJ5^S?D&LGDX^b)$flS_@HavMds-mWA#+;7K37^OoRMILX zY)|QA!l;={GG%6w=wm0;Ebm($1wuT~sA!y%^gd~)>A7s&fz@ZDc>2%?cIisCPRT?y zWgY&tC}T65lLhov1LM_MRI;5B#Ry6PdFDf^-Rwl`G*z{Br~34BSgu|-hOT6{rCm#u zjQ{!)sq1OgaK4w;i>RwkmBw}HR7qa3Kl+LaJG|6nwC19zoao|{wycXbiXzy#wz5On z-n>=PZ`c#q{Uf8*)9Kv*wTZE(<(Q-Ye=|dn>7X5U_T1={;oj7BqA(Ql*sFI$r&kx% zo|xHzhf=_rbhv7-2YV#{h{&R@L6u0Ny2VSXRc zuKFM2VF_2mf8R8=w5J1WUiMV_ z%>)XajaSqcC07@Ea!qO#FFTQh8MD6TD{e-M?$4vu^11e?Q?}=rk)xgwi8*1@Wm>oT zjtttHmH&uR^;`$1o0uhGigx+RY3)r8>!K! zQ~Ng0?oDP;&Z@PwwNXaEaG7};4(HuoWyP$hn{vFxEb4dn%^bPab72NKF#1rcd2Hau zVA)x?NTw6l1k?VbR865TWgWLnBHYMPo_)sfoCuCGAMoABtlb+9Hh_3KI5Y?mv*YP_ z5eiSBqE0-CU)O2l`>nx*6!QohAI!zu9eDw-Zb0J=^;KT7SKpSNfC_jtJ!5$A0xPRJ z@poQLPZ@bsiSsSKx3L=6%<0x=xYgr|Nlbya0_K2OGj*@K1fy4%SvdsnP$byNOdsXn zs$>TJVXVf-Eb2!y)2a7TCNx6ijh&HEdCx^G>NECF9NtU7ni034-K%}x{<_IzrZ-Jj zW~?1)vK=vgJICgTb*j!bvA{#>@6#=n;x$NyhsYv_DcS6yRw z%E4o?)0k^a#@1Ea*8AqfX}7}inmE+5&+{FzUTt=JtjY|fJ=@T%bq8m z``^aQgVfNV7;UX8na9EsBTJNKwe{x)#m?oj!r)mdx@We(t)ZHKT{~t zRA08gb~%C`crx&Y#L$!zW`voK!U;ii{}V5W{tLy>;=c@9ABn=tG4#Sv5JZ<_NK3Ve z$||}drCua0n>oiaiO6`uqQ8Fb_+~!>lM$~`{Z9fhiuB9!0mTsuzGAzXww8GUUV0#3 zsF<|9b=A66Eh^(;mnF99juC#NgKHx?cVK#fnt1181(F0eGP!E=_Ki&npFtu4Pg(eO z9mysx60?%G@~D_Jy0)x=aGTWm`CJcMl`t9WgNl)0!$l(!Z<_Q?j)GPgL2rDI0fjj% zu)*m2`B%?8vlubO?R2p;Jvw~#yffKUY!^@Smh?kcHymH^ZLrO#}XAO`(3X7#%B)AA*hT@xmQm^A~uKeewcq&*2MfX@BH_ zsl~>YLuCCxVZyLrjj#%TSGb_!m_Fm$nS~-t+F>Ou-%9xrGey`Uu|SAYpaGkjn#lAY z9w2#n%!U`li)z4~2uutCmaO>T0+nyixqfASyz(uPf4ZRbv)8Jz5SHIQg~Yk|G-nd;>KAlWyg&*$o#E0 zRu|-~O8n8d%|TmE)zzl!ID4sUs5@cGejqYN zs@%*+DwdBb^p!VNj|?JsmMfP{^$}O=@7~n3At?1r#Puu-0}>KphkFN7Mu+9f87gX4 zNtcs&AWp=8Ri>0F>(%ca93!#W(3`6l;?52}&6CH+6)aI$2P-P)aE|Jb^MY=D<;|0~ zeWaQ=aN@CMZ8Oa=6rU!3h&cJI!vO={`JdPD#Gz_6@`}>eAKW~x**{^#P{?|nqzO?J znI0aqj)Om-TMsRt;$}NqfIkNT6me5x{>3orQdbD}V#M8*);9h^rMP~%&1gET5zj;f;S%J$RZd6gX zPfxgYCUUy`*1CeDmNDjYh45t$(G89tYFy&+^$wv0iU`O7+%lTYqyd0Q}`S^`feXVUv9Ljio zQyh_C+v|@0@Z;MV(DqNvW#b+Egytj}Q=j*Q7Aa&n{qlr;@DCaNW86PWlNf1F<48~- zvhA%b4)NUELT$c`HyKH0Dw0bO_F$&u*!V=7miB#OIl3HJVy8bqWtExw@_8ep>g?8E zyA7wl^u}#16^w22;fX{1kLmWq^`~H{bn);QhWqeg(Ki2ZSn>athihs|ec2^!0dGO+ zuJ|>!3Ue^z*>3iSo_qUr>RxjD;xl_ZMTcgR`0w7^r*6jSAV!b!>zWKTFS3x5^Q=tN z>BfZexSmxEJTIFQzGy>}+QK(bvA*wO$*y6`*YV?mKKl+i25!1zMmhGn{EkHvh*!N| z{qT_ckI6l`{o)-f=-0p9F?*ap&yiw}7c0tslgLr$@2u6Y-Z^q^iIbQ>-E&yW*2i3N z+9__A_#*t?mUQ3fvF*wT1#|jo)+_R^0PPio}pCmpG#Sih8Fj`CK^HiTOy!bE~J{J!7O;)x60`X~y%JGCifs?|!E8wDJ!GwF|t%MZDA6 z<9;3(R4RJJKlsEwkYiK5@16;hc_Rql`IRLVk!kSOJ#QY6nR zfi3FGHnhkuLj7L5XZVS(Ii+$q7{&=X?rXU0t1_;GNteSzIn6EVb3d&L-jbxnzw-RW z;P68xHP{LL$H($>lB~UN>Jmf;;`Ym|d5)Es9zRfLuM7&vX-Cvrk>2~~!JLlC56&U^ z5v5~VUy6pj-!o-F%7@2g53^5K-n+E@f2fni-17T2!Cwx2JE)bi>xKmT9ru6ikd5cP Sa, 1996. -# Jakub Bogusz , 2003-2010. +# Paweł Krawczyk , 1996. +# Jakub Bogusz , 2003-2013. # msgid "" msgstr "" -"Project-Id-Version: findutils 4.5.7\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2010-04-06 19:39+0200\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-09-23 18:23+0200\n" "Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" "Language: pl\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" -msgstr "Nie uda³o siê zainicjowaæ tablicy haszuj±cej wspó³dzielonych plików" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "" +"Nie udało się zachować katalogu roboczego w celu uruchomienia poleceniana %s" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Nie można zamknąć standardowego wejścia" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Nie udało się zmienić katalogu" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "nie można wykonać fork" -#: find/find.c:205 +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "błąd podczas czekania na %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s zakończony sygnałem %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Nie udało się zainicjować tablicy haszującej współdzielonych plików" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "" +"sprawdzenie poprawności funkcji bibliotecznej fnmatch() nie powiodło się." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" -msgstr "nie mo¿na wykonaæ stat na bie¿±cym katalogu" +msgstr "nie można wykonać stat na bieżącym katalogu" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "Nie mo¿na odczytaæ listy podmontowanych urz±dzeñ." +msgstr "Nie można odczytać listy podmontowanych urządzeń." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "UWAGA: system plików %s zosta³ niedawno odmontowany." +msgstr "UWAGA: system plików %s został niedawno odmontowany." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "UWAGA: system plików %s zosta³ niedawno zamontowany." +msgstr "UWAGA: system plików %s został niedawno zamontowany." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -"%s%s zmieni³ siê podczas wykonywania %s (stary numer urz±dzenia %ld, nowy " -"numer urz±dzenia %ld, typ systemu plików to %s) [ref %ld]" +"%s%s zmienił się podczas wykonywania %s (stary numer urządzenia %ld, nowy " +"numer urządzenia %ld, typ systemu plików to %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -"%s%s zmieni³ siê podczas wykonywania %s (stary numer i-wêz³a %, " -"nowy numer i-wêz³a %, typ systemu plików %s) [ref %ld]" +"%s%s zmienił się podczas wykonywania %s (stary numer i-węzła %, " +"nowy numer i-węzła %, typ systemu plików %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" -msgstr "nie uda³o siê wróciæ do katalogu nadrzêdnego" +msgstr "nie udało się wrócić do katalogu nadrzędnego" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "Nie uda³o siê bezpiecznie zmieniæ katalogu na %s" +msgstr "Nie udało się bezpiecznie zmienić katalogu na %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -"Dowi±zanie symboliczne %s jest czê¶ci± pêtli w hierarchii katalogów; katalog " -"wskazywany przez to dowi±zanie by³ ju¿ odwiedzony." +"Dowiązanie symboliczne %s jest częścią pętli w hierarchii katalogów; katalog " +"wskazywany przez to dowiązanie był już odwiedzony." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -90,21 +128,21 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" -"Wykryto pêtlê w systemie plików; %s ma ten sam numer urz±dzenia i i-wêze³ co " -"katalog %d poziom wy¿ej w hierarchii systemu plików." +"Wykryto pętlę w systemie plików; %s ma ten sam numer urządzenia i i-węzeł co " +"katalog %d poziom wyżej w hierarchii systemu plików." msgstr[1] "" -"Wykryto pêtlê w systemie plików; %s ma ten sam numer urz±dzenia i i-wêze³ co " -"katalog %d poziomy wy¿ej w hierarchii systemu plików." +"Wykryto pętlę w systemie plików; %s ma ten sam numer urządzenia i i-węzeł co " +"katalog %d poziomy wyżej w hierarchii systemu plików." msgstr[2] "" -"Wykryto pêtlê w systemie plików; %s ma ten sam numer urz±dzenia i i-wêze³ co " -"katalog %d poziomów wy¿ej w hierarchii systemu plików." +"Wykryto pętlę w systemie plików; %s ma ten sam numer urządzenia i i-węzeł co " +"katalog %d poziomów wyżej w hierarchii systemu plików." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "uwaga: nie pod±¿anie za dowi±zaniem symbolicznym %s" +msgstr "uwaga: nie podążanie za dowiązaniem symbolicznym %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -113,18 +151,18 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" -"UWAGA: z³a liczba twardych dowi±zañ dla %s (widziano tylko st_nlink=" -"%, ale ju¿ znaleziono % podkatalogów): to mo¿e byæ b³±d w " -"sterowniku systemu plików. Automatyczne w³±czenie opcji -noleaf finda. " -"Wcze¶niejsze wyniki mog³y nie zawieraæ katalogów, które powinny byæ " +"UWAGA: zła liczba twardych dowiązań dla %s (widziano tylko st_nlink=" +"%, ale już znaleziono % podkatalogów): to może być błąd w " +"sterowniku systemu plików. Automatyczne włączenie opcji -noleaf finda. " +"Wcześniejsze wyniki mogły nie zawierać katalogów, które powinny być " "przeszukane." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "Nie mo¿na odczytaæ listy zamontowanych systemów plików" +msgstr "Nie można odczytać listy zamontowanych systemów plików" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "nieznany" @@ -133,36 +171,41 @@ msgstr "nieznany" msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -"Wykryto pêtlê w systemie plików; %s jest czê¶ci± tej samej pêtli w systemie " -"plików co %s." +"Wykryto pętlę w systemie plików; %s jest częścią tej samej pętli w systemie " +"plików co %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "UWAGA: wygl±da na to, ¿e plik %s ma uprawnienia 0000" +msgstr "UWAGA: wygląda na to, że plik %s ma uprawnienia 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "nie mo¿na szukaæ %s" +msgstr "nie można szukać %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" -msgstr "nie uda³o siê przywróciæ katalogu roboczego po przeszukaniu %s" +msgstr "nie udało się przywrócić katalogu roboczego po przeszukaniu %s" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Nie udało się zainicjować tablicy haszującej współdzielonych plików" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" -"Akcja -delete automatycznie w³±cza -depth, ale -prune nic nie wykonuje kiedy " -"aktywna jest opcja -depth. Aby wykonaæ tê akcjê, nale¿y explicite u¿yæ opcji " +"Akcja -delete automatycznie włącza -depth, ale -prune nic nie wykonuje kiedy " +"aktywna jest opcja -depth. Aby wykonać tę akcję, należy explicite użyć opcji " "-depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -170,60 +213,60 @@ msgid "" "as those specified after it). Please specify options before other " "arguments.\n" msgstr "" -"uwaga: podano opcjê %s po argumencie %s nie bêd±cym opcj±, ale opcje nie s± " -"pozycyjne (%s wp³ywa na testy podane przed ni± jak i po niej). Proszê " -"podawaæ opcje przed innymi argumentami.\n" +"uwaga: podano opcję %s po argumencie %s nie będącym opcją, ale opcje nie są " +"pozycyjne (%s wpływa na testy podane przed nią jak i po niej). Proszę " +"podawać opcje przed innymi argumentami.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -"uwaga: opcja -d jest przestarza³a; proszê zamiast niej u¿ywaæ -depth, " -"poniewa¿ ta jest zgodna z POSIX." +"uwaga: opcja -d jest przestarzała; proszę zamiast niej używać -depth, " +"ponieważ ta jest zgodna z POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -"%s nie jest nazw± ¿adnej istniej±cej grupy i nie wygl±da na liczbowy " -"identyfikator grupy, poniewa¿ ma nieznany przyrostek %s" +"%s nie jest nazwą żadnej istniejącej grupy i nie wygląda na liczbowy " +"identyfikator grupy, ponieważ ma nieznany przyrostek %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" -msgstr "%s nie jest nazw± ¿adnej istniej±cej grupy" +msgstr "%s nie jest nazwą żadnej istniejącej grupy" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" -msgstr "argument opcji -group jest pusty, a powinien byæ nazw± grupy" +msgstr "argument opcji -group jest pusty, a powinien być nazwą grupy" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" "\n" -"domy¶lna ¶cie¿ka to aktualny katalog; domy¶lne wyra¿enie to -print\n" -"wyra¿enie mo¿e sk³adaæ siê z: operatorów, opcji, testów i akcji:\n" +"domyślna ścieżka to aktualny katalog; domyślne wyrażenie to -print\n" +"wyrażenie może składać się z: operatorów, opcji, testów i akcji:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"operatory (malej±cy priorytet; je¶li nie ma ¿adnego, przyjmuje siê -and):\n" +"operatory (malejący priorytet; jeśli nie ma żadnego, przyjmuje się -and):\n" " ( WYR ) ! WYR -not WYR WYR1 -a WYR2 WYR1 -and WYR2\n" " WYR1 -o WYR2 WYR1 -or WYR2 WYR1 , WYR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -233,11 +276,11 @@ msgid "" msgstr "" "opcje pozycyjne (zawsze prawdziwe): -daystart -follow -regextype\n" "\n" -"opcje zwyk³e (zawsze prawdziwe, podawane przed innymi wyra¿eniami):\n" +"opcje zwykłe (zawsze prawdziwe, podawane przed innymi wyrażeniami):\n" " -depth --help -maxdepth POZIOMY -mindepth POZIOMY -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -252,23 +295,23 @@ msgstr "" "WZORZEC\n" " -links N -lname WZORZEC -mmin N -mtime N -name WZORZEC -newer PLIK" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path WZORZEC -perm [+-]TRYB -regex WZORZEC\n" +" -nouser -nogroup -path WZORZEC -perm [-/]TRYB -regex WZORZEC\n" " -readable -writable -executable\n" " -wholename WZORZEC -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAZWA -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context KONTEKST\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -282,24 +325,24 @@ msgstr "" " -exec POLECENIE ; -exec POLECENIE {} + -ok POLECENIE ;\n" " -execdir POLECENIE ; -execdir POLECENIE {} + -okdir POLECENIE ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" -"Proszê zg³aszaæ b³êdy (i ¶ledziæ proces ich naprawiania) poprzez stronê\n" -"zg³aszania b³êdów w findutils pod adresem http://savannah.gnu.org/ lub,\n" -"w przypadku braku dostêpu do WWW, wysy³aj±c pocztê elektroniczn± pod\n" +"Proszę zgłaszać błędy (i śledzić proces ich naprawiania) poprzez stronę\n" +"zgłaszania błędów w findutils pod adresem http://savannah.gnu.org/ lub,\n" +"w przypadku braku dostępu do WWW, wysyłając pocztę elektroniczną pod\n" "adres ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "" -"sprawdzenie poprawno¶ci funkcji bibliotecznej fnmatch() nie powiod³o siê." +"sprawdzenie poprawności funkcji bibliotecznej fnmatch() nie powiodło się." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -308,593 +351,928 @@ msgid "" "perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -"uwaga: uniksowe nazwy plików zwykle nie zawieraj± uko¶ników (ale ¶cie¿ki " -"tak). Oznacza to, ¿e '%s %s' bêdzie prawdopodobnie zawsze fa³szywe na tym " -"systemie. Przydatny mo¿e byæ test '-wholename' albo '-samefile'. " -"Ewentualnie, maj±c GNU grepa, mo¿na u¿yæ 'find ... -print0 | grep -FzZ %s'." +"uwaga: uniksowe nazwy plików zwykle nie zawierają ukośników (ale ścieżki " +"tak). Oznacza to, że '%s %s' będzie prawdopodobnie zawsze fałszywe na tym " +"systemie. Przydatny może być test '-wholename' albo '-samefile'. " +"Ewentualnie, mając GNU grepa, można użyć 'find ... -print0 | grep -FzZ %s'." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -"Dla opcji %s oczekiwano argumentu bêd±cego dodatni± liczb± ca³kowit±, a " +"Dla opcji %s oczekiwano argumentu będącego dodatnią liczbą całkowitą, a " "otrzymano %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." -msgstr "Ten system nie daje mo¿liwo¶ci sprawdzenia czasu narodzin pliku." +msgstr "Ten system nie daje możliwości sprawdzenia czasu narodzin pliku." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" -msgstr "Test %s musi mieæ argument" +msgstr "Test %s musi mieć argument" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" -msgstr "Nie wiem jak zinterpretowaæ %s jako datê lub czas" +msgstr "Nie wiem jak zinterpretować %s jako datę lub czas" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "Nie mo¿na uzyskaæ czasu narodzin pliku %s" +msgstr "Nie można uzyskać czasu narodzin pliku %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "uwaga: -%s %s nie pasuje do niczego, poniewa¿ koñczy siê /." +msgstr "uwaga: -%s %s nie pasuje do niczego, ponieważ kończy się /." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Uprawnienia %s nie s± poprawne kiedy w³±czone jest POSIXLY_CORRECT." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" -msgstr "niew³a¶ciwe uprawnienia %s" +msgstr "niewłaściwe uprawnienia %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" -"uwaga: podano wzorzec uprawnieñ %s (który jest równowa¿ny /000). Znaczenie -" -"perm /000 zmieni³o siê tak, by by³o spójne z -perm -000; oznacza to, ¿e " -"wcze¶niej nie pasowa³o do ¿adnych plików, ale teraz pasuje do wszystkich " -"plików." +"uwaga: podano wzorzec uprawnień %s (który jest równoważny /000). Znaczenie -" +"perm /000 zmieniło się tak, by było spójne z -perm -000; oznacza to, że " +"wcześniej nie pasowało do żadnych plików, ale teraz pasuje do wszystkich " +"plików." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" -msgstr "b³êdny zerowy argument opcji -size" +msgstr "błędny zerowy argument opcji -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "b³êdny typ -size `%c'" +msgstr "błędny typ -size `%c'" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "B³êdny argument `%s%c' opcji -size" +msgstr "Błędny argument `%s%s' opcji -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -"Opcja -show-control-chars przyjmuje jeden argument o warto¶ci 'literal' lub " +"Opcja -show-control-chars przyjmuje jeden argument o wartości 'literal' lub " "'safe'" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" -msgstr "B³êdny argument %s opcji -used" +msgstr "Błędny argument %s opcji -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" -msgstr "%s nie jest nazw± ¿adnego znanego u¿ytkownika" +msgstr "%s nie jest nazwą żadnego znanego użytkownika" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" -msgstr "Argument opcji -user nie mo¿e byæ pusty" +msgstr "Argument opcji -user nie może być pusty" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " -msgstr "W³±czone w³a¶ciwo¶ci: " +msgstr "Włączone właściwości: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "b³êdne wyra¿enie -context: SELinux nie jest w³±czony." +msgstr "błędne wyrażenie -context: SELinux nie jest włączony." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" -msgstr "Argumenty dla -type powinny zawieraæ tylko jedn± literê" +msgstr "Argumenty dla -type powinny zawierać tylko jedną literę" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Nieznany argument opcji -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c nie jest obsługiwane, ponieważ dowiązania symboliczne nie są " +"obsługiwane na platformie, dla której find został skompilowany." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "uwaga: nierozpoznany znak steruj±cy `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c nie jest obsługiwane, ponieważ FIFO nie są obsługiwane na " +"platformie, dla której find został skompilowany." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "b³±d: %s na koñcu ³añcucha formatuj±cego" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c nie jest obsługiwane, ponieważ gniazda nazwane nie są obsługiwane " +"na platformie, dla której find został skompilowany." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "uwaga: nierozpoznana dyrektywa formatuj±ca `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c nie jest obsługiwane, ponieważ solarisowe \"drzwi\" nie są " +"obsługiwane na platformie, dla której find został skompilowany." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" -"b³±d: dyrektywa formatuj±ca `%%%c' jest zarezerwowana do przysz³ego " -"wykorzystania" +msgid "Unknown argument to -type: %c" +msgstr "Nieznany argument opcji -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -"Bie¿±cy katalog jest obecny w zmiennej ¶rodowiskowej PATH, co jest " -"niebezpieczne w po³±czeniu z akcj± %s polecenia find. Proszê usun±æ bie¿±cy " -"katalog ze zmiennej $PATH (tzn. usun±æ \".\" albo wiod±ce lub koñcowe " +"Bieżący katalog jest obecny w zmiennej środowiskowej PATH, co jest " +"niebezpieczne w połączeniu z akcją %s polecenia find. Proszę usunąć bieżący " +"katalog ze zmiennej $PATH (tzn. usunąć \".\", podwójne, wiodące lub końcowe " "dwukropki)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove that " "entry from $PATH" msgstr "" -"W zmiennej ¶rodowiskowej PATH jest obecna ¶cie¿ka wzglêdna %s, co jest " -"niebezpieczne w po³±czeniu z akcj± %s polecenia find. Proszê usun±æ ten wpis " +"W zmiennej środowiskowej PATH jest obecna ścieżka względna %s, co jest " +"niebezpieczne w połączeniu z akcją %s polecenia find. Proszę usunąć ten wpis " "ze zmiennej $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -"Nie mo¿na u¿ywaæ {} wewn±trz nazwy narzêdzia dla opcji -execdir i -okdir, " -"poniewa¿ jest to potencjalny problem z bezpieczeñstwem." +"Nie można używać {} wewnątrz nazwy narzędzia dla opcji -execdir i -okdir, " +"ponieważ jest to potencjalny problem z bezpieczeństwem." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "Obs³ugiwane jest tylko jedno wyst±pienie {} przy -exec%s ... +" +msgstr "Obsługiwane jest tylko jedno wystąpienie {} przy -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "W %s %s musi wystąpić jako takie, ale podano %s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." -msgstr "¦rodowisko jest zbyt du¿e, aby wykonaæ exec()." +msgstr "Środowisko jest zbyt duże, aby wykonać exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" -msgstr "przepe³nienie arytmetyczne przy przeliczaniu %s z dni na liczbê sekund" +msgstr "przepełnienie arytmetyczne przy przeliczaniu %s z dni na liczbę sekund" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -"przepe³nienie arytmetyczne przy próbie obliczenia koñca dnia dzisiejszego" +"przepełnienie arytmetyczne przy próbie obliczenia końca dnia dzisiejszego" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" -msgstr "standardowe wyj¶cie diagnostyczne" +msgstr "standardowe wyjście diagnostyczne" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "standardowe wyj¶cie" +msgstr "standardowe wyjście" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "nie mo¿na usun±æ %s" +msgstr "nie można usunąć %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "nie uda³o siê przywróciæ katalogu roboczego po przeszukaniu %s" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "getfilecon nie powiod³o siê: %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "UWAGA: nie mo¿na okre¶liæ czasu narodzin pliku %s" +msgstr "UWAGA: nie można określić czasu narodzin pliku %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Nie udało się zapisać na standardowe wyjście" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Nie mo¿na zamkn±æ standardowego wej¶cia" +msgid "getfilecon failed: %s" +msgstr "getfilecon nie powiodło się: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Nie uda³o siê zmieniæ katalogu" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "nie mo¿na wykonaæ fork" +msgid "warning: unrecognized escape `\\%c'" +msgstr "uwaga: nierozpoznany znak sterujący `\\%c'" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "b³±d podczas czekania na %s" +msgid "error: %s at end of format string" +msgstr "błąd: %s na końcu łańcucha formatującego" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s zakoñczony sygna³em %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" +"błąd: dyrektywa formatująca `%%%c' jest zarezerwowana do przyszłego " +"wykorzystania" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" +"uwaga: dyrektywa formatująca `%%%c' powinna być poprzedzona innym znakiem" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "uwaga: nierozpoznana dyrektywa formatująca `%%%c'" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" -msgstr "b³êdne wyra¿enie" +msgstr "błędne wyrażenie" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." -msgstr "b³êdne wyra¿enie; podano operator binarny '%s' bez niczego przed nim." +msgstr "błędne wyrażenie; podano operator binarny '%s' bez niczego przed nim." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "oczekiwano wyra¿enia pomiêdzy '%s' i ')'" +msgstr "oczekiwano wyrażenia pomiędzy '%s' i ')'" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" -msgstr "oczekiwano wyra¿enia po '%s'" +msgstr "oczekiwano wyrażenia po '%s'" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" -msgstr "b³êdne wyra¿enie; za du¿o ')'" +msgstr "błędne wyrażenie; za dużo ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -"b³êdne wyra¿enie; oczekiwano gdzie¶ ')', ale nie znaleziono. Byæ mo¿e " -"potrzebne jest dodatkowe wyra¿enie po '%s'" +"błędne wyrażenie; oczekiwano gdzieś ')', ale nie znaleziono. Być może " +"potrzebne jest dodatkowe wyrażenie po '%s'" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." -msgstr "b³êdne wyra¿enie; puste nawiasy nie s± dozwolone." +msgstr "błędne wyrażenie; puste nawiasy nie są dozwolone." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." -msgstr "b³êdne wyra¿enie; oczekiwano gdzie¶ ')', ale nie znaleziono." +msgstr "błędne wyrażenie; oczekiwano gdzieś ')', ale nie znaleziono." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" -msgstr "ojej -- b³êdny typ wyra¿enia!" +msgstr "ojej -- błędny typ wyrażenia!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "ojej -- b³êdny typ wyra¿enia (%d)!" +msgstr "ojej -- błędny typ wyrażenia (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"uwaga: nie ma wpisu w tabeli kosztów wyrażeń dla wyrażenia %s; proszę " +"zgłosić to jako błąd" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" -msgstr "¶cie¿ki musz± poprzedzaæ wyra¿enie: %s" +msgstr "ścieżki muszą poprzedzać wyrażenie: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" -msgstr "nieznane wyra¿enie `%s'" +msgstr "nieznane wyrażenie `%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" -msgstr "b³êdne wyra¿enie `%s'" +msgstr "błędne wyrażenie `%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" -msgstr "b³êdny argument `%s' dla `%s'" +msgstr "błędny argument `%s' dla `%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "brak argumentu dla `%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "za du¿o ')'" +msgstr "za dużo ')'" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" -msgstr "nieoczekiwane dodatkowe wyra¿enie '%s'" +msgstr "nieoczekiwane dodatkowe wyrażenie '%s'" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" -msgstr "nie obs³ugiwane dodatkowe wyra¿enie" +msgstr "nie obsługiwane dodatkowe wyrażenie" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" -msgstr "ojej -- b³êdne domy¶lne wstawienie and!" +msgstr "ojej -- błędne domyślne wstawienie and!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " -msgstr "Sk³adnia: %s [-H] [-L] [-P] [-Opoziom] [-D " +msgstr "Składnia: %s [-H] [-L] [-P] [-Opoziom] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" -msgstr "] [¶cie¿ka...] [wyra¿enie]\n" +msgstr "] [ścieżka...] [wyrażenie]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "nie uda³o siê wróciæ do katalogu nadrzêdnego" +msgstr "nie udało się zachować początkowego katalogu roboczego" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "nie uda³o siê wróciæ do katalogu nadrzêdnego" +msgstr "nie udało się przywrócić początkowego katalogu roboczego" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "Zignorowano nierozpoznan± flagê diagnostyczn± %s" +msgstr "Zignorowano nierozpoznaną flagę diagnostyczną %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Pusty argument dla opcji -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "Bezpo¶rednio po opcji -O musi wyst±piæ liczba dziesiêtna" +msgstr "Bezpośrednio po opcji -O musi wystąpić liczba dziesiętna" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" -msgstr "Proszê podaæ liczbê dziesiêtn± bezpo¶rednio po -O" +msgstr "Proszę podać liczbę dziesiętną bezpośrednio po -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" -msgstr "B³êdny poziom optymalizacji %s" +msgstr "Błędny poziom optymalizacji %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -"Poziom optymalizacji %lu jest zbyt du¿y. Aby odnale¼æ pliki bardzo szybko, " -"mo¿na u¿yæ GNU locate." +"Poziom optymalizacji %lu jest zbyt duży. Aby odnaleźć pliki bardzo szybko, " +"można użyć GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -"Zmienna ¶rodowiskowa FIND_BLOCK_SIZE nie jest obs³ugiwana; jedyne, co wp³ywa " -"na rozmiar bloku, to zmienna ¶rodowiskowa POSIXLY_CORRECT" +"Zmienna środowiskowa FIND_BLOCK_SIZE nie jest obsługiwana; jedyne, co wpływa " +"na rozmiar bloku, to zmienna środowiskowa POSIXLY_CORRECT" + +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "błędny argument `%s' dla `%s'" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "błędny argument `%s' dla `%s'" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "Błędny argument %s opcji -used" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "błąd zapisu" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "Test %s musi mieć argument" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "uwaga: nierozpoznany znak sterujący `\\%c'" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: błędna liczba dla opcji -%c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "Test %s musi mieć argument" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "nie udało się przywrócić początkowego katalogu roboczego" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "nie udało się przywrócić początkowego katalogu roboczego" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" -#: lib/buildcmd.c:171 +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "błędny argument `%s' dla `%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "błędny argument `%s' dla `%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "lista argumentów zbyt długa" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" -msgstr "polecenie zbyt d³ugie" +msgstr "polecenie zbyt długie" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -"nie mo¿na wywo³aæ exec() ze wzglêdu na ograniczenia rozmiaru argumentów" +"nie można wywołać exec() ze względu na ograniczenia rozmiaru argumentów" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -"nie mo¿na zmie¶ciæ pojedynczego argumentu w limicie rozmiaru listy argumentów" +"nie można zmieścić pojedynczego argumentu w limicie rozmiaru listy argumentów" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" -msgstr "lista argumentów zbyt d³uga" +msgstr "lista argumentów zbyt długa" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -"Zmienna ¶rodowiskowa %s nie jest ustawiona na poprawn± liczbê dziesiêtn±" +"Zmienna środowiskowa %s nie jest ustawiona na poprawną liczbę dziesiętną" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Deskryptor pliku %d wycieknie; proszę zgłosić to jako błąd, pamiętając o " +"dołączeniu szczegółowego opisu najprostszego sposobu odtworzenia tego " +"problemu." -#: lib/findutils-version.c:60 +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Nie udało się zapisać na standardowe wyjście" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Zbudowano przy u¿yciu GNU gnuliba w wersji %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Nieznany rodzaj wyrażeń regularnych %s; poprawne rodzaje to %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" -msgstr "Nieoczekiwana koñcówka %s dla %s" +msgstr "Nieoczekiwana końcówka %s dla %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" -msgstr "Oczekiwano liczby ca³kowitej: %s" +msgstr "Oczekiwano liczby całkowitej: %s" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Nieznany rodzaj wyra¿eñ regularnych %s; poprawne rodzaje to %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" msgstr "" -"Sk³adnia: %s [--version | --help]\n" -"lub %s najpopularniejsze_bigramy < lista-plików > baza-danych-locate\n" +"Składnia: %s [--version | --help]\n" +"lub %s najpopularniejsze_bigramy < lista-plików > baza-danych-locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" "\n" -"B³êdy proszê zg³aszaæ na adres .\n" +"Błędy proszę zgłaszać na adres .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "b³±d zapisu" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" -msgstr "Sk³adnia: %s [-0 | --null] [--version] [--help]\n" +msgstr "Składnia: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." -msgstr "Nale¿y podaæ poziom bezpieczeñstwa jako liczbê ca³kowit±." +msgstr "Należy podać poziom bezpieczeństwa jako liczbę całkowitą." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." -msgstr "Poziom bezpieczeñstwa %s znajduje siê poza zakresem odwracalnym." +msgstr "Poziom bezpieczeństwa %s znajduje się poza zakresem odwracalnym." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." -msgstr "Poziom bezpieczeñstwa %s ma nieoczekiwany przyrostek %s." +msgstr "Poziom bezpieczeństwa %s ma nieoczekiwany przyrostek %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." -msgstr "Poziom bezpieczeñstwa slocate %ld nie jest obs³ugiwany." +msgstr "Poziom bezpieczeństwa slocate %ld nie jest obsługiwany." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" -msgstr "Nie uda³o siê zapisaæ na standardowe wyj¶cie" +msgstr "Nie udało się zapisać na standardowe wyjście" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dni" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "Argument opcji --max-database-age nie mo¿e byæ pusty" +msgstr "Argument opcji --max-database-age nie może być pusty" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" -msgstr "B³êdny argument %s opcji --max-database-age" +msgstr "Błędny argument %s opcji --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -"Baza danych locate %s zawiera nazwê pliku d³u¿sz± ni¿ locate jest w stanie " -"obs³u¿yæ" +"Baza danych locate %s zawiera nazwę pliku dłuższą niż locate jest w stanie " +"obsłużyć" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "Baza danych locate %s jest uszkodzona lub niepoprawna" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Rozmiar bazy danych locate: %s bajt\n" msgstr[1] "Rozmiar bazy danych locate: %s bajty\n" -msgstr[2] "Rozmiar bazy danych locate: %s bajtów\n" +msgstr[2] "Rozmiar bazy danych locate: %s bajtów\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" -msgstr "Pasuj±ce nazwy plików: %s\n" +msgstr "Pasujące nazwy plików: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" -msgstr "Wszystkie nazwy plików: %s\n" +msgstr "Wszystkie nazwy plików: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -904,101 +1282,101 @@ msgid "" "\t%s contain newline characters, \n" "\tand %s contain characters with the high bit set.\n" msgstr "" -"Nazwy plików maj± ³±czn± d³ugo¶æ %s bajtów.\n" -"W¶ród tych nazw:\n" +"Nazwy plików mają łączną długość %s bajtów.\n" +"Wśród tych nazw:\n" "\n" "\t%s zawiera spacje,\n" "\t%s zawiera znaki nowej linii,\n" "\ta %s zawiera znaki z ustawionym najstarszym bitem.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -"Niektóre nazwy plików mog³y zostaæ odfiltrowane, wiêc nie mo¿na obliczyæ " -"wspó³czynnika kompresji.\n" +"Niektóre nazwy plików mogły zostać odfiltrowane, więc nie można obliczyć " +"współczynnika kompresji.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" -msgstr "Wspó³czynnik kompresji %4.2f%% (im wiêkszy tym lepiej)\n" +msgstr "Współczynnik kompresji %4.2f%% (im większy tym lepiej)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" -msgstr "Wspó³czynnik kompresji jest nieokre¶lony\n" +msgstr "Współczynnik kompresji jest nieokreślony\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -"Baza danych locate %s wygl±da na bazê danych slocate, ale o poziomie " -"bezpieczeñstwa %c, którego GNU findutils aktualnie nie obs³uguje" +"Baza danych locate %s wygląda na bazę danych slocate, ale o poziomie " +"bezpieczeństwa %c, którego GNU findutils aktualnie nie obsługuje" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -"%s to baza danych slocate. Jej obs³uga jest nowa, mo¿na siê jeszcze " -"spodziewaæ problemów." +"%s to baza danych slocate. Jej obsługa jest nowa, można się jeszcze " +"spodziewać problemów." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -"%s to baza danych slocate o nieobs³ugiwanym poziomie bezpieczeñstwa %d; " -"pominiêto." +"%s to baza danych slocate o nieobsługiwanym poziomie bezpieczeństwa %d; " +"pominięto." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" -"Podano opcjê -E, ale ta opcja nie mo¿e byæ u¿yta z bazami danych w formacie " -"slocate o niezerowym poziomie bezpieczeñstwa. Dla tej bazy danych nie " -"zostan± wygenerowane ¿adne wyniki.\n" +"Podano opcję -E, ale ta opcja nie może być użyta z bazami danych w formacie " +"slocate o niezerowym poziomie bezpieczeństwa. Dla tej bazy danych nie " +"zostaną wygenerowane żadne wyniki.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "%s to baza danych slocate. W³±czono opcjê '-e'." +msgstr "%s to baza danych slocate. Włączono opcję '-e'." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" -"Baza danych locale %s w starym formacie jest zbyt krótka aby by³a poprawna" +"Baza danych locale %s w starym formacie jest zbyt krótka aby była poprawna" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Baza danych %s jest w formacie %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" -msgstr "Baza danych ma kodowanie ze s³owami maszynowymi little-endian.\n" +msgstr "Baza danych ma kodowanie ze słowami maszynowymi little-endian.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" -msgstr "Baza danych ma kodowanie ze s³owami maszynowymi big-endian.\n" +msgstr "Baza danych ma kodowanie ze słowami maszynowymi big-endian.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -"Baza danych ma kodowanie z nieoczywist± kolejno¶ci± bajtów w s³owie " +"Baza danych ma kodowanie z nieoczywistą kolejnością bajtów w słowie " "maszynowym.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1009,7 +1387,7 @@ msgid "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" msgstr "" -"Sk³adnia: %s [-d ¶cie¿ka | --database=¶cie¿ka] [-e | -E | --[non-]existing]\n" +"Składnia: %s [-d ścieżka | --database=ścieżka] [-e | -E | --[non-]existing]\n" " [-i | --ignore-case] [-w | --wholename] [-b | --basename]\n" " [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" " [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n" @@ -1017,154 +1395,169 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " wzorzec...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" -msgstr "nie uda³o siê porzuciæ uprawnieñ grupy" +msgstr "nie udało się porzucić uprawnień grupy" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "nie uda³o siê porzuciæ uprawnieñ setuid" +msgstr "nie udało się porzucić uprawnień setuid" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" -msgstr "Nie uda³o siê w pe³ni porzuciæ uprawnieñ" +msgstr "Nie udało się w pełni porzucić uprawnień" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "nie uda³o siê porzuciæ uprawnieñ setgid" +msgstr "nie udało się porzucić uprawnień setgid" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -"uwaga: baza danych locate mo¿e byæ odczytana ze standardowego wej¶cia tylko " +"uwaga: baza danych locate może być odczytana ze standardowego wejścia tylko " "raz." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "wywo³anie systemowe nie powiod³o siê" +msgstr "wywołanie systemowe nie powiodło się" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" -msgstr "uwaga: baza danych %s ma ju¿ ponad %d %s (jej wiek to %.1f %s)" +msgstr "uwaga: baza danych %s ma już ponad %d %s (jej wiek to %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -"UWAGA: baza danych locate %s zosta³a utworzona z inn± kolejno¶ci± bajtów w " -"s³owie" +"UWAGA: baza danych locate %s została utworzona z inną kolejnością bajtów w " +"słowie" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "nieoczekiwany koniec pliku w %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" -msgstr "b³±d podczas odczytu s³owa z %s" +msgstr "błąd podczas odczytu słowa z %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia." +"Nieprawidłowa sekwencja sterująca %s w określeniu ogranicznika wejścia." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia; " -"warto¶ci znaków nie mog± przekraczaæ %lx." +"Nieprawidłowa sekwencja sterująca %s w określeniu ogranicznika wejścia; " +"wartości znaków nie mogą przekraczać %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia; " -"warto¶ci znaków nie mog± przekraczaæ %lo." +"Nieprawidłowa sekwencja sterująca %s w określeniu ogranicznika wejścia; " +"wartości znaków nie mogą przekraczać %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -"Nieprawid³owa sekwencja steruj±ca %s w okre¶leniu ogranicznika wej¶cia; " -"koñcowe znaki %s nie zosta³y rozpoznane." +"Nieprawidłowa sekwencja sterująca %s w określeniu ogranicznika wejścia; " +"końcowe znaki %s nie zostały rozpoznane." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -"Nieprawid³owe okre¶lenie ogranicznika wej¶cia %s: ogranicznik musi byæ " -"pojedynczym znakiem lub sekwencj± steruj±c± zaczynaj±c± siê od \\." +"Nieprawidłowe określenie ogranicznika wejścia %s: ogranicznik musi być " +"pojedynczym znakiem lub sekwencją sterującą zaczynającą się od \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" -msgstr "¶rodowisko jest zbyt du¿e, aby wykonaæ exec" +msgstr "środowisko jest zbyt duże, aby wykonać exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" -msgstr "uwaga: warto¶æ %ld dla opcji -s jest zbyt du¿a, u¿yto %ld" +msgstr "uwaga: wartość %ld dla opcji -s jest zbyt duża, użyto %ld" + +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "opcja --%s nie może być ustawiona na wartość zawierającą `='" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "nie udało się usunąć zmiennej środowiskowej %s" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "uwaga: opcja -E nie ma znaczenia, jeśli użyto -0 lub -d.\n" -#: xargs/xargs.c:629 +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Nie można ustawić procedury obsługi sygnału SIGUSR1" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Nie można ustawić procedury obsługi sygnału SIGUSR2" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "Nie mo¿na otworzyæ pliku wej¶ciowego %s" +msgstr "Nie można otworzyć pliku wejściowego %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" -msgstr "Zmienne ¶rodowiskowe zajmuj± % bajtów\n" +msgstr "Zmienne środowiskowe zajmują % bajtów\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" -"POSIX-owy górny limit na d³ugo¶æ argumentów (na tym systemie): %\n" +"POSIX-owy górny limit na długość argumentów (na tym systemie): %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -"POSIX-owy najmniejszy dopuszczalny górny limit na d³ugo¶æ argumentów: " +"POSIX-owy najmniejszy dopuszczalny górny limit na długość argumentów: " "%\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "Maksymalna d³ugo¶æ polecenia, które mo¿na u¿yæ: %\n" +msgstr "Maksymalna długość polecenia, które można użyć: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "Rozmiar u¿ywanego bufora polecenia: %\n" +msgstr "Rozmiar używanego bufora polecenia: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1173,139 +1566,319 @@ msgid "" "of-file keystroke.\n" msgstr "" "\n" -"Wykonywanie xargs bêdzie kontynuowane, i bêdziê próbowaæ czytaæ wej¶cie i " -"uruchamiaæ polecenia; je¶li nie jest to porz±dane zachowanie, proszê " -"wprowadziæ znak koñca pliku.\n" +"Wykonywanie xargs będzie kontynuowane, i będzię próbować czytać wejście i " +"uruchamiać polecenia; jeśli nie jest to porządane zachowanie, proszę " +"wprowadzić znak końca pliku.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -"Uwaga: %s bêdzie uruchomione przynajmniej raz. Je¶li nie jest to porz±dane " -"zachowanie, proszê nacisn±æ klawisz przerwania.\n" +"Uwaga: %s będzie uruchomione przynajmniej raz. Jeśli nie jest to porządane " +"zachowanie, proszę nacisnąć klawisz przerwania.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" -"niedopasowany %s cudzys³ów; domy¶lnie znaki cytowania s± specjalnymi dla " -"xargs o ile nie u¿yto opcji -0" +"niedopasowany %s cudzysłów; domyślnie znaki cytowania są specjalnymi dla " +"xargs o ile nie użyto opcji -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" -msgstr "podwójny" +msgstr "podwójny" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "pojedynczy" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -"UWAGA: na wej¶ciu wyst±pi³ znak NUL. Nie mo¿e byæ przekazany poprzez listê " -"argumentów. Czy¿by mia³a byæ u¿yta opcja --null?" +"UWAGA: na wejściu wystąpił znak NUL. Nie może być przekazany poprzez listę " +"argumentów. Czyżby miała być użyta opcja --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" -msgstr "za d³uga linia argumentów" +msgstr "za długa linia argumentów" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Nie udało się zapisać na standardowe wyjście" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "nie uda³o siê otworzyæ /dev/tty do odczytu" +msgstr "nie udało się otworzyć /dev/tty do odczytu" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Nie udało się zapisać na standardowe wyjście" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "nie udało się przydzielić pamięci" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "nie udało się ustawić zmiennej środowiskowej %s" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" -msgstr "nie uda³o siê utworzyæ potoku przed wywo³aniem fork" +msgstr "nie udało się utworzyć potoku przed wywołaniem fork" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -"odczyt bufora errno w xargs_do_exec nie powiód³ siê (prawdopodobnie b³±d, " -"proszê to zg³osiæ)" +"safe_read bufora errno w xargs_do_exec nie powiódł się (prawdopodobnie błąd, " +"proszę to zgłosić)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -"read zwróci³o nieoczekiwan± warto¶æ %d; prawdopodobnie b³±d, proszê to " -"zg³osiæ" +"read zwróciło nieoczekiwaną wartość %d; prawdopodobnie błąd, proszę to " +"zgłosić" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" -msgstr "b³±d podczas oczekiwania na proces potomny" +msgstr "błąd podczas oczekiwania na proces potomny" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "UWAGA: utracono ¶lad po %d procesach potomnych" +msgid "WARNING: Lost track of %lu child processes" +msgstr "UWAGA: utracono ślad po %lu procesach potomnych" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" -msgstr "%s: wyszed³ ze stanem 255; zaniechanie" +msgstr "%s: wyszedł ze stanem 255; zaniechanie" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" -msgstr "%s: zatrzymany sygna³em %d" +msgstr "%s: zatrzymany sygnałem %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" -msgstr "%s: zakoñczony sygna³em %d" +msgstr "%s: zakończony sygnałem %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" -msgstr "%s: b³êdna liczba dla opcji -%c\n" +msgstr "%s: błędna liczba dla opcji -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" -msgstr "%s: warto¶æ dla opcji -%c powinna byæ >= %ld\n" +msgstr "%s: wartość dla opcji -%c powinna być >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" -msgstr "%s: warto¶æ dla opcji -%c powinna byæ < %ld\n" - -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Sk³adnia: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=ogranicznik]\n" -" [-E ³añc-eof] [-e[³añc-eof]] [--eof[=³añc-eof]]\n" -" [-L maks-linii] [-l[maks-linii]] [--max-lines[=maks-linii]]\n" -" [-I ³añc-zmienn] [-i[³añc-zmienn]] [--replace[=³añc-zmienn]]\n" -" [-n maks-arg] [--max-args=maks-arg]\n" -" [-s maks-znaków] [--max-chars=maks-znaków]\n" -" [-P maks-proc] [--max-procs=maks-proc] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=plik]\n" -" [--version] [--help] [polecenie [pocz±tkowe-argumenty]]\n" - -#~ msgid "cannot get current directory" -#~ msgstr "nie mo¿na uzyskaæ bie¿±cego katalogu" +msgstr "%s: wartość dla opcji -%c powinna być < %ld\n" + +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Składnia: %s [OPCJA]... POLECENIE [ARGUMENTY-POCZĄTKOWE]...\n" + +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Uruchamia POLECENIE z ARGUMENTAMI-POCZĄTKOWYMI i pozostałymi argumentami " +"czytanymi z wejścia.\n" +"\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Argumenty obowiązkowe i opcjonalne dla opcji długich są również\n" +"obowiązkowe i opcjonalne dla odpowiadających im opcji krótkich.\n" + +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null elementy oddzielone znakiem NULL zamiast " +"spacji;\n" +" wyłącza przetwarzanie cytowania, " +"odwrotnych\n" +" ukośników i logicznych EOF.\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=PLIK odczyt argumentów z PLIKU zamiast " +"standardowego\n" +" wejścia\n" + +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=ZNAK elementy wejścia oddzielane ZNAKIEM zamiast\n" +" odstępów; wyłącza przetwarzanie cytowania,\n" +" odwrotnych ukośników i logicznych EOF\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E KONIEC łańcuch logicznego EOF; jeśli KONIEC wystąpi\n" +" jako linia wejścia, reszta wejścia " +"zostanie\n" +" zignorowana (bez znaczenia z opcją -0 lub -" +"d)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=KONIEC] odpowiednik -E KONIEC, jeśli podano KONIEC;\n" +" w przeciwnym wypadku nie ma łańcucha\n" +" oznaczającego koniec pliku\n" + +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R to samo, co --replace=R\n" + +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i,--replace=[R] podmiana R w ARGUMENTACH-POCZĄTKOWYCH przez\n" +" nazwy czytane ze standardowego wejścia;\n" +" jeśli nie podano R, przyjmowane jest {}\n" + +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=MAKS użycie najwyżej MAKS niepustych linii " +"wejścia\n" +" dla linii polecenia\n" + +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[MAKS] podobnie do -L, ale domyślnie najwyżej jedna\n" +" niepusta linia, jeśli nie podano MAKS\n" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=MAKS użycie najwyżej MAKS argumentów dla linii\n" +" polecenia\n" + +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=MAKS uruchomienie najwyżej MAKS procesów " +"jednocześnie\n" + +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive zapytanie przed uruchomieniem poleceń\n" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=ZM ustawienie ZMiennej środowiskowej w " +"procesach\n" +" potomnych\n" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty bez uruchamiania polecenia, jeśli nie ma\n" +" argumentów; bez tej opcji POLECENIE zostanie\n" +" uruchomione przynajmniej raz\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=MAKS ograniczenie poleceń do najwyżej MAKS znaków\n" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits wyświetlenie limitów długości linii " +"polecenia\n" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" +" -t, --verbose wypisywanie poleceń przed ich uruchomieniem\n" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit zakończenie w wypadku przekroczenia rozmiaru " +"(-s)\n" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help wyświetlenie tego opisu i zakończenie\n" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" +" --version wypisanie informacji o wersji i zakończenie\n" diff --git a/po/pt.gmo b/po/pt.gmo index 2d97fcbff48c56484d8fd199d4f740125f7759a2..a3d54183b042350934d3dd00e705ed6a9bbba904 100644 GIT binary patch delta 3390 zcmZwJeQZ_r9mnzSZ42_$mWLKfz0lK++R;(5wbBPFlnSiK1h*-mg~FvhZSSD>z`dhFd5>4DyXWn6DYIhupR-MMA9{7Zc zhyTExxQ&f##7lS#i`WNk#hd($!^;^zM(ydRs1^JR(zi`yKcs_oSci9_huZt&NIKc+ zV%A?b&T&H{zLToq`0zIg`e-!oHVN{2&XRiN+TKW=R z(sQfP!EIsIUzI1h!Q|~Y(zl&Kb@T_k7eB{ExSUbO@DbE$_!RZ`g1HP5UF4tj^P?4b z7PTeEP+N5kHR0Keg2lDUBo#Gu7nWl$I+()u@io+p_HlD!$m~a`fxN;^t;{D_iJu_{ zz=}wD4Wt6+^L!m@Vi8haD>Z9bdC97dn%87Pdf*&Gn zTK+BRWU9eYuD77}w1vzfFKrF}igr5jRj$jJrP@1>&!R@XRp)=0N+Z{QN1nCYd1@ZE zp_XU}**<$7v+x9J34e~7*;&+a8bz%{;R3V8*o?Q~Al{0{Q8WHMGB^7t=IQ)9oC(c* zA#%@Fq8dsdld>0312}_P`cbUKB3jk;Jy?qSaV`EBzlVQAb#!21dTWm26s~`P8}KbG zrhhA8m}{{SwG!XOy?6$-5=&MASQ4Z@{V0aHRy1-Ir6p^zk^ZSgXeK2 zuB&I8@Gz>Kbq(q7M%>iWP4Fd_F~32QOD;B(xz3hJTuWnE%_i8;R~o! zbP{LbDCXdG9EV?`wls&t(DMsX{k1M;{q;f@H`MWCsB`*5ybIsOGR$wvoCZ{qwqvlj z8IR&@?!S*5al3*Ac+;KfPkK1xM%=;uAE5flO|rqOs4T*1IE2dnXHX+OiTC1%$U9cL zH2vIW40F8`NfUbtHPF{l1N$TX7RNWIJGy}7A+u}};_KX>-;zG|$(>Z{xiNrR+Mi(_ zp2bRD_#LXjZ1zDjs=#7w!V+AM%IaNsGww&d_aZ7s-d#aL;}^IFA15*9;d!Lrq+O?S ziW@ZyDf=t!rHe!g-@~iA2bX@sv1mzxn*`44_Z%W?^emT8CVPS(Z zHDd(zy-?n$tRvKa@cEQ+LdljzY$a6Kw*Qtb)JW{0uscDfk3(g?wr(PEV~J%h%26LU zC9raAJ&`F%`B&Zx94ibgL{e(&|V)Te_>IS8VXeRa(w-741!~|l1 zSWM^xrLvTW1~vVRwMKQ2P$n-Ul;L%R5>Z*dfZ!VxWPBrzm3>rneA|dl;%?#rqKnX} zQql3;5Y%q?nY3cJ+tJ?__5VC6k`<~*t;${RkK}sUe#f*Avi`hr)|OQ#!VLiD<0b>56W5{a5Df3r+t&PtGq{oR#PH zdhr3r-Q5%EXGDIa^vHzV+N#^?s;V2D>gvXtI)7T_rR=OXPNhDpYWL%}mgj_8QjygK z{?(eQ9DlU#awxolNjROZlZa|g5vqv}FV^FBL_59I>4sye{Y?vtG6VGz&O;+FF-_|40YO!yCg9KeA9 delta 4599 zcmc(gYitzP700h131A-K4K*QL%)=PGj?Kfy5c6^r`ImlktVmD_S>pKQ_Bisq?UWI6t&ciwnf3=;?E_eiX!Rv4(+&vM4C!qv(8~zbiOyWg2b#mx%Bb1Xp4d=m2@HqSo zJ`B5vQVwznM&ZX$GFrp^WX9$zWz&(nOOr+Rd*DeBspphUMUk*4Q0Fr@~5`v#+}p2KlP@bV&YzS1kQvOFpY=m_)GGPjjGT}1u4wT|qtiuJ5 zLCQhB2H8VhhH~;xprrP1P*T2(C`h7;L3#fWoC9Bh8eV}{;h!OY>MbgBL>~KO=u|WD zIVC9>m@%8^;9Mw0w-rhNdtn(bbU-=Di|j6$c>_xI{{j-bx(SED{JCMEMX-VQWISPWcuo+&3 zQZrR-CN-6S#H>z0$)8g^rx)pHQlLN(HBf8=z#uhs)s^SP6d%`BOy? zh9|CtqUSwu415yG6+H)uMZFAVpKDO|y#pnH5;m(A{jZ?2n2D5`Q0g3<$@m7`0t>2? z`WD;{#nCM&j)pA^zXy}yZpO2qT*VVv7f~opFb!A3-@td_WL}btT!+M_#w=B86H@)8Pgv>l`Q!yCHR| zz6LF#M_Cg8lIGhFFgzv+TGIYejt82NFJf%K>>loi5 z&%8C90ePoRQ*mU@A*)!ICJI^ zrM^k$3fv5LZ3s{H3KYk`gco7q#_&V*GdP~{HOM|@4N$|eP1qAMpmm2Zg^jXJeZ`>! zC-3KDkBa^e(2*2AhH)FJ2$MDfLpf>(CRZZ&KM5m2rp@P9C=OGm@;QoO+rkItgB;EE6VSu<<;ML;(~-~Kg#HOAn(J?TT$IK}VFA{J z^|t~#56Jb;rgI4UdUnsq&itM$qj#39NjZt6P6dwJs@H9PRJXdRgww3kwjVg2tLFqo z*_mTH3Mw~wahs8L0_}Q9owgEATpwt&UER24d&BOHdmgXfvTfVi`W>>ub1SmP#$7AO z#8SR*yGb2)d^?u({Dbn;abt;8+>X=H$u?UzuHLa;+iu$NJ-1y}r!C*HniF<84xCt9 z_)cK6nJw?cy!K|twUQFw0VmmJHX$@CW~RIr-Qu|M3auMk61ElC+PB-iv~8AsF`yRT zYu5+8l&@!-K;|XetRybW`(G=mDAAs;*(xqcqMP(BCn5cqm+;)6EE}ElPF~NFDbHsr zJN#rAM7$V|G2F9bA9b6ljfMaczKe*P6%;IoF)}9E-Yx8TTdk={Z!xixF;2Uw;20g z_KX-Omd`C*u|>CgETiUKneY3)PWSa9NKbdB2+I3{ChZ{E*J}il_A0WqmGy<04l77n zcrpUDb-2PvlMpQJT1JL_y=gn4k-mlIIGn9ZMJ1)>T722!+HnKBHRTWZ&dD=(3=6M) z-wUJH%$15ZODpucMugO2r9D3^}%`V195lLX_D-!3_~&UvFmc ziP7T!Op38KoBs^|RgTj{j-HN+4n>Auz&F^5IhKPUr`IgX?yDJ*pFLZ9A}_mX`RTl# S+bbtzi|f|rXFFG(9sV!kTzr85 diff --git a/po/pt.po b/po/pt.po index b7ed578..0d7d738 100644 --- a/po/pt.po +++ b/po/pt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.3.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2007-12-20 00:18+0100\n" "Last-Translator: Helder Correia \n" "Language-Team: Portuguese \n" @@ -17,32 +17,68 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "erro ao regressar à pasta de trabalho inicial" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Não é possível fechar a entrada padrão" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Erro ao mudar de pasta" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "não é possível bifurcar (fork)" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "erro ao aguardar por %s" + +#: find/exec.c:352 +#, fuzzy, c-format +msgid "%s terminated by signal %d" +msgstr "%s: terminado pelo sinal %d" + +#: find/find.c:203 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to initialize shared-file hash table" msgstr "" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "a verificação de sanidade da função de biblioteca fnmatch() falhou." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "não é possível analisar a pasta actual" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "Aviso: o sistema de ficheiros %s foi desmontado recentemente." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "Aviso: o sistema de ficheiros %s foi montado recentemente." -#: find/find.c:491 +#: find/find.c:550 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -51,7 +87,7 @@ msgstr "" "%1$s%2$s alterado durante execução de %3$s (número do disposito antigo " "%4$ld, novo número %5$ld, tipo do sistema de ficheiros é %6$s) [ref %7$ld]" -#: find/find.c:528 +#: find/find.c:587 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -60,17 +96,17 @@ msgstr "" "%1$s%2$s alterado durante execução de %3$s ('inode' antigo %4$ld, novo " "%5$ld, tipo do sistema de ficheiros é %5$s) [ref %7$ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "erro ao regressar à pasta de trabalho inicial" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Erro ao entrar de forma segura na pasta %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -79,7 +115,7 @@ msgstr "" "A ligação simbólica %s é parte de um ciclo na hierarquia de pastas; a pasta " "para a qual aponta já foi visitada." -#: find/find.c:1097 +#: find/find.c:1157 #, fuzzy, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -94,12 +130,12 @@ msgstr[1] "" "Detectado um ciclo no sistema de ficheiros; %1$s tem o mesmo número de " "dispositivo e 'inode' que uma pasta que é %2$d níveis acima na hierarquia." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "aviso: a não seguir a ligação simbólica %s" -#: find/find.c:1386 +#: find/find.c:1480 #, fuzzy, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -114,12 +150,12 @@ msgstr "" "'-noleaf'. Resultados anteriores podem ter falhado a inclusão de pastas que " "deveriam ter sido pesquisadas." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "desconhecido" @@ -131,7 +167,7 @@ msgstr "" "Detectado um ciclo no sistema de ficheiros; %1$s é parte do mesmo ciclo de " "%2$s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, fuzzy, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "Aviso: o ficheiro %s aparenta ter modo 0000" @@ -141,12 +177,17 @@ msgstr "Aviso: o ficheiro %s aparenta ter modo 0000" msgid "cannot search %s" msgstr "impossível pesquisar %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "erro ao regressar à pasta de trabalho inicial" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, fuzzy, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -157,7 +198,7 @@ msgstr "" "quando -depth está activa. Se deseja continulr de qualquer forma, utilzie " "explicitamente a opção -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, fuzzy, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -170,7 +211,7 @@ msgstr "" "como os especificados após). Por favor, especifique as opções antes dos " "outros argumentos.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -179,7 +220,7 @@ msgstr "" "aviso: a opção -d está obsoleta; por favor, use -depth em substituição, uma " "vez que esta é uma funcionalidade em conformidade POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, fuzzy, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -188,17 +229,17 @@ msgstr "" "%1$s não é nome de um grupo existente e não aparenta ser um identificador " "numérico de grupo porque tem o sufixo inesperado %2$s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s não é o nome de um grupo existente" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "o argumento para -group está vazio, mas deve ser o nome de um grupo" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -208,7 +249,7 @@ msgstr "" "o caminho padrão é a pasta corrente; a expressão predefinida é -print\n" "a expressão deve consistir em: operadores, opções, testes e acções:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -220,7 +261,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -235,7 +276,7 @@ msgstr "" " -depth --help -maxdepth NÍVEIS -mindepth NÍVEIS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -249,10 +290,10 @@ msgstr "" "PADRÃO\n" " -links N -lname PADRÃO -mmin N -mtime N -name PADRÃO -newer FICH" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -262,11 +303,11 @@ msgstr "" " -wholename PADRÃO -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NOME -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -280,7 +321,7 @@ msgstr "" " -exec COMANDO ; -exec COMANDO {} + -ok COMANDO ;\n" " -execdir COMANDO ; -execdir COMANDO {} + -okdir COMANDO ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -290,12 +331,12 @@ msgstr "" "http://savannah.gnu.org/ ou, caso não tenha acesso, enviando um\n" "correio electrónico para ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "a verificação de sanidade da função de biblioteca fnmatch() falhou." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -309,51 +350,46 @@ msgstr "" "'-wholename' mais útil, ou talvez '-samefile'. Alternativamente, se estiver " "a usar o GNU grep, pode usar 'find ... -print0 | grep -FzZ %s'." -#: find/parser.c:1452 +#: find/parser.c:1447 #, fuzzy, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" "Esperava-se um argumento inteiro decimal positivo para %1$s, mas obteve-se " "%2$s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" "Este sistema não providencia uma forma de descobrir a data de criação de um " "ficheiro." -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: a opção '%s' requere um argumento\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Não se sabe como interpretar %s como uma data ou hora" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Não é possível obter o tempo de criação do ficheiro %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "O modo %s não é válido quando POSIXLY_CORRECT está activo." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "modo %s inválido" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -364,22 +400,22 @@ msgstr "" "de -perm /000 foi alterado para ser consistente com -perm -000; isto é, " "agora combina com todos os ficheiros." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "argumento vazio para -size inválido" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "Tipo -size '%c' inválido" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "Argumento '%s%c' inválido para -size'" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -387,74 +423,82 @@ msgstr "" "A opção -show-control-chars requere um único parâmetro que deve ser " "'literal' ou 'seguro'" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Argumento %s inválido para -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, fuzzy, c-format msgid "%s is not the name of a known user" msgstr "%s não é o nome de um grupo existente" -#: find/parser.c:2678 +#: find/parser.c:2614 #, fuzzy, c-format msgid "The argument to -user should not be empty" msgstr "O argumento para a opção --max-database-age não pode ser vazio" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Funcionalidades activadas: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Argumentos para -type devem conter apenas uma letra" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Argumento desconhecido para -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "aviso: escape '\\%c' não reconhecido" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "erro: %s no fim de expressão de formato" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "aviso: directiva de formatação '%%%c' não reconhecida" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "erro: a directiva de formato '%%%c' está reservada para uso futuro" +msgid "Unknown argument to -type: %c" +msgstr "Argumento desconhecido para -type: %c" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "A pasta corrente está incluída na variável de ambiente 'PATH', o que é " "inseguro quando combinado com a acção %s do 'find'. Por favor, remova a " "pasta corrente do seu '$PATH' (isto é, remova \".\")" -#: find/parser.c:3272 +#: find/parser.c:2935 #, fuzzy, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -465,7 +509,7 @@ msgstr "" "inseguro quando combinado com a acção %2$s do find. Por favor, remova o " "caminho da variável $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -474,117 +518,123 @@ msgstr "" "Pode não usar {} no nome do utilitário para '-execdir' e '-okdir', uma vez " "que se trata de um potencial problema de segurança." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Apenas uma instância de {} é suportada com -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "O ambiente é demasiado grande para exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, fuzzy, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "transbordo aritmético ao tentar calcular o fim de hoje" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "transbordo aritmético ao tentar calcular o fim de hoje" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "saída padrão de erro" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "saída padrão" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "impossível remover %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "erro ao regressar à pasta de trabalho inicial" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "Aviso: não é possível determinar a data de criação do ficheiro %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Erro ao escrever para a saída padrão" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Não é possível fechar a entrada padrão" +msgid "getfilecon failed: %s" +msgstr "" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Erro ao mudar de pasta" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "não é possível bifurcar (fork)" +msgid "warning: unrecognized escape `\\%c'" +msgstr "aviso: escape '\\%c' não reconhecido" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "erro ao aguardar por %s" +msgid "error: %s at end of format string" +msgstr "erro: %s no fim de expressão de formato" -#: find/pred.c:2132 -#, fuzzy, c-format -msgid "%s terminated by signal %d" -msgstr "%s: terminado pelo sinal %d" +#: find/print.c:409 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "erro: a directiva de formato '%%%c' está reservada para uso futuro" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "aviso: directiva de formatação '%%%c' não reconhecida" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "expressão inválida" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "expressão inválida: utilizou um operador binário '%s' sem nada atrás." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "esperava-se uma expressão entre '%s' e ')'" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "esperada uma expressão após '%s'" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "expressão inválida; tem demasiados ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -593,126 +643,126 @@ msgstr "" "expressão inválida; esperava-se ')' mas não foi encontrado. Talvez necessite " "de um predicado extra após '%s'" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "expressão inválida; parêntesis vazios não são permitidos.'" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "expressão inválida; ')' esperado algures mas não encontrado." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "ops -- tipo de expressão inválido" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "tipo de expressão inválido (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "caminhos devem preceder a expressão: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "predicado desconhecido '%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "predicado inválido '%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, fuzzy, c-format msgid "invalid argument `%s' to `%s'" msgstr "argumento '%1$s' inválido para '%2$s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "argumento em falta para '%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "tem demasiados ')'" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "predicado extra '%s' inesperado" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "predicado extra inesperado" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "ops -- inserção por omissão de and inválida!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Utilização: %s [-H] [-L] [-P] [-Olevel] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [caminho...] [expressão]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "não é possível guardar a pasta de trabalho actual" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "não é possível guardar a pasta de trabalho actual" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "A ignorar opção de depuração %s não reconhecida" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Parâmetro vazio para o opção -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "A opção -O deve ser imediatamente seguida por um inteiro decimal" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Por favor especifique um number decimal imediatamente após -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Nível deoptimização %s inválido" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -721,7 +771,7 @@ msgstr "" "O nível de optimização %lu é muito elevado. Se deseja encontrar ficheiros " "rapidamente, considere a utilização do GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -730,66 +780,382 @@ msgstr "" "A variável de ambiente FIND_BLOCK_SIZE não é suportada, a única coisa que " "afecta o tamanho de bloco é a variável de ambiente POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argumento inválido %s para %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumento %s ambíguo para %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Argumentos válidos são:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "erro o fechar o ficheiro" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "erro de escrita" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Erro de sistema desconhecido" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: a opção '%s' é ambígua\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: a opção '--%s' não permite um argumento\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: a opção '%c%s' não permite um argumento\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: a opção '%s' requere um argumento\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: opção '--%s' desconhecida\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: opção '%c%s' não reconhecida\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: opção -- %c inválida\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: a opção -- %c requere um argumento\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: a opção '-W %s' é ambígua\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: a opção '-W %s' não permite um argumento\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: a opção '%s' requere um argumento\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "não é possível guardar a pasta de trabalho actual" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "não é possível guardar a pasta de trabalho actual" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "«" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "»" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "memória esgotada" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "argumento %s%s inválido '%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "sufixo inválido em %s%s argumento '%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "%s%s argumento '%s' demasiado grande" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "comando demasiado longo" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" "impossível aceitar único argumento dentro do limite de tamanho de lista de " "argumentos" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "lista de argumentos demasiado longa" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 -#, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Construído com GNU gnulib versão %s\n" +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Erro ao escrever para a saída padrão" + +#: lib/regextype.c:110 +#, fuzzy, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Tipo desconhecido de expressão regular %1$s; tipos válidos são %2$s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, fuzzy, c-format msgid "Unexpected suffix %s on %s" msgstr "EOF inesperado em %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "esperada uma expressão após '%s'" -#: lib/regextype.c:107 -#, fuzzy, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Tipo desconhecido de expressão regular %1$s; tipos válidos são %2$s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -799,8 +1165,8 @@ msgstr "" "ou %s bigramas_mais_comuns < lista-ficheiros > base-de-dados-" "locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -808,85 +1174,80 @@ msgstr "" "\n" "Envie erros para .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "erro de escrita" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Utilização: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "Necessita especificar um nível de segurança como um inteiro decimal." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Nível de segurança %s fora do intervalo convertível." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "O nível de segurança %s tem o sufixo inesperado %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "O nível de segurança %ld de slocate não é suportado." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Erro ao escrever para a saída padrão" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dias" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "O argumento para a opção --max-database-age não pode ser vazio" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Argumento %s inválido para opção --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "a base de dados locate %s contém um nome de ficheiro mais longo que o " "permitido" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "a base de dados %s do locate está corrompida ou é inválida" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Tamanho da base de dados 'locate': %s byte\n" msgstr[1] "Tamanho da base de dados 'locate': %s bytes\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Ficheiros Resultantes: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Todos os Ficheiros: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, fuzzy, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -903,7 +1264,7 @@ msgstr "" "\t%3$s contêm caracteres de nova linha \n" "\te %4$s contêm caracteres com o bit mais significativo activado.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -912,17 +1273,17 @@ msgstr "" "Alguns ficheiros podem ter sido deixados de fora, pelo que não é possível " "calcular a taxa de compressão.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Taxa de compressão %4.2f%% (maior é melhor)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Taxa de compressão indefinida\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, fuzzy, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -932,7 +1293,7 @@ msgstr "" "ter nível de segurança %2$c, o qual não é actualmente suportado por GNU " "findutils" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -941,7 +1302,7 @@ msgstr "" "%s é uma base de dados slocate. Suporte para este tipo é recente, espere " "problemas por enquanto." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, fuzzy, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -949,7 +1310,7 @@ msgstr "" "%1$s é uma base de dados slocate com nível de segurança %2$d não suportado; " "a ignorar." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -960,36 +1321,36 @@ msgstr "" "slocate-format com nível de segurança não zero. Não serão gerados resultados " "para esta base de dados.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s é uma base de dados slocate. A activar a opção '-e'." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "Base de dados locate %s de formato antigo é demasiado pequena para ser válida" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, fuzzy, c-format msgid "Database %s is in the %s format.\n" msgstr "A base de dados %1$s está no formato %2$s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "A base de dados tem codificação little-endian.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "A base de dados tem codificação big-endian.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "A ordem de codificação da palavra da máquina não é óbvia.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, fuzzy, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1009,64 +1370,64 @@ msgstr "" " [--max-database-age D] [-version] [--help]\n" " padrão...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "erro ao descartar privilégios de grupo" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "erro ao descartar privileges setuid" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Erro aos descartar privilégios por completo" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "erro ao descartar privileges setgid" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "aviso: a base de dados locate pode ser lida da entrada padrão apenas uma vez." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "erro na chamada de tempo de sistema" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, fuzzy, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "aviso: a base de dados %1$s tem mais de %2$d %3$s (idade actual é %4$.1f " "%5$s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, fuzzy, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" "Aviso: a base de dados %s do locate foi construída com uma ordem de bytes " "diferente" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "EOF inesperado em %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "erro ao ler uma palavra de %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" "Sequência de escape %s inválida na especificação de delimitador de entrada." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, fuzzy, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1075,7 +1436,7 @@ msgstr "" "Sequência de escape %1$s inválida na especificação de delimitador de " "entrada; os caracteres não devem exceder %2$lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, fuzzy, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1084,7 +1445,7 @@ msgstr "" "Sequência de escape %1$s inválida na especificação de delimitador de " "entrada; os caracteres não devem exceder %2$lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, fuzzy, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1093,7 +1454,7 @@ msgstr "" "Sequência de escape %1$s inválida na especificação de delimitador de " "entrada; caracteres finais %2$s não reconhecidos." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1102,44 +1463,59 @@ msgstr "" "Especificação de delimitador de entrada %s inválida: o delimitador deve ser " "um carácter simples ou uma sequência de escape iniciada por \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "o ambiente é demasiado grande para o exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, fuzzy, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "aviso: o valor %1$ld para a opção -s é demasiado grande, a usar %2$ld ao " "invés" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Não é possível abrir o ficheiro de entrada %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "As suas variáveis de ambiente ocupam %lu bytes\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "Limite superior POSIX de tamanho de argumento (neste sistema): %lu\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1148,17 +1524,17 @@ msgstr "" "Limite superior POSIX mais pequeno permitido de tamanho de argumento (todos " "os sistemas): %lu\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "tamanho máximo do comando possível de usar: %ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Tamanho da memória de comandos actualmente em uso: %lu\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1171,7 +1547,7 @@ msgstr "" "executar comandos; se isto não é o que desejado, por favor insira a " "sequência de fim-de-ficheiro.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1180,7 +1556,7 @@ msgstr "" "Aviso: %s será executado pelo menos uma vez. Se não o desejar, pressione a " "sequência de interrupção.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, fuzzy, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1189,15 +1565,15 @@ msgstr "" "plica não correspondida; por omissão, as citações são especiais para o " "xargs, a menos que use a opção -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "duplo" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "simples" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, fuzzy, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1206,160 +1582,258 @@ msgstr "" "aviso: ocorreu um carácter NUL na entrada. Não pode ser especificado na " "lista de argumentos. Pretendia usar a opção --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "linha de argumentos demasiado longa" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Erro ao escrever para a saída padrão" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Erro ao escrever para a saída padrão" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "erro ao esperar pelo processo filho" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: saída com estado 255; a abortar" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: parado pelo sinal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: terminado pelo sinal %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, fuzzy, c-format msgid "%s: invalid number for -%c option\n" msgstr "%1$s: número inválido para a opção -%2$c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, fuzzy, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%1$s: valor para a opção -%2$c deveria ser >= %3%ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, fuzzy, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%1$s: vaor para a opção -%2$c deveria ser < %3$ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Uso: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L máx-linhas] [-l[máx-linhas]] [--max-lines[=máx-linhas]]\n" -" [-I exp-subst] [-i[exp-subst]] [--replace[=exp-subst]]\n" -" [-n máx-args] [--max-args=máx-args]\n" -" [-s máx-cars] [--max-chars=máx-cars]\n" -" [-P máx-procs] [--max-procs=máx-procs] [[--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=ficheiro]\n" -" [--version] [--help] [comando [argumentos-iniciais]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "não é possível obter a pasta corrente" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "argumento inválido %s para %s" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "argumento %s ambíguo para %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Argumentos válidos são:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "error closing file" -#~ msgstr "erro o fechar o ficheiro" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Erro de sistema desconhecido" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: a opção '%s' é ambígua\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: a opção '--%s' não permite um argumento\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: a opção '%c%s' não permite um argumento\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: a opção '%s' requere um argumento\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: opção '--%s' desconhecida\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: opção '%c%s' não reconhecida\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: opção -- %c inválida\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: a opção -- %c requere um argumento\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: a opção '-W %s' é ambígua\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: a opção '-W %s' não permite um argumento\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" -#~ msgid "`" -#~ msgstr "«" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" -#~ msgid "'" -#~ msgstr "»" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "O modo %s não é válido quando POSIXLY_CORRECT está activo." + +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Construído com GNU gnulib versão %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Uso: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L máx-linhas] [-l[máx-linhas]] [--max-lines[=máx-linhas]]\n" +#~ " [-I exp-subst] [-i[exp-subst]] [--replace[=exp-subst]]\n" +#~ " [-n máx-args] [--max-args=máx-args]\n" +#~ " [-s máx-cars] [--max-chars=máx-cars]\n" +#~ " [-P máx-procs] [--max-procs=máx-procs] [[--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=ficheiro]\n" +#~ " [--version] [--help] [comando [argumentos-iniciais]]\n" + +#~ msgid "cannot get current directory" +#~ msgstr "não é possível obter a pasta corrente" #~ msgid "Success" #~ msgstr "Sucesso" @@ -1415,24 +1889,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Nenhuma expressão regular anterior" -#~ msgid "^[yY]" -#~ msgstr "^[yY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "memória esgotada" - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "argumento %s%s inválido '%s'" - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "sufixo inválido em %s%s argumento '%s'" - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "%s%s argumento '%s' demasiado grande" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: opção -- %c ilegal\n" diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo index 8260bc36fecaf0daea0f05bf43b8f598b8a0dfd6..f14c9c4f743b222ece44ece3a4f1a4b1e54b1266 100644 GIT binary patch literal 40188 zcmd6w3!G$EUFR>#f;3OV8xpt~($0*Ts(Bh0%|0H;3kMhQK1!AT_vk%L|6q~SJ(aMXVs4j?kd^u?|;s@ z_f~bygO_f7=FY$B-gC}9=YRg^|30VxyaKot_-DX>0zTpCQS?UOW1bO3Q^2x7Gr(T}UIzT3XGPJgfxiKq1iVgtZ0{kDq&jH^C{N!_@=vRP8pBqK* z0zUUb_nrrV*YJDdqA2<_a2BX`p7*>c+6P<#&Hz6MyaD(Rz&YU6&yS)jfo}$G04+Fm)_zB=~;NJk3fd_es z;75Qfz>8i0-htl@6pG&g+zGr7sP;Yw;3@1?;1!|zuC)!s?|Q-AIQ3O`=}f~x4bbmj+v`+z?I{6pYA;H$21 z^YW`ez4x;~jpLtyM}a$OjG;t#1DS&87lA(x{{I|E*P_>fbWj;R0DKehPk{_2x}BHn z{yTwmE&6q!@bM+!G_W=mMHw&yz7qJSK>kH9-R;KveZXh)`zi+e4B%l8TR`>iF5n*E z&ja@Y|2I(MpW^0IfL);4`!3+)fe-rop9EgS?}z>Ge*|94@5eB?j|Of5J_c9=>i*@x zTYxtKF9d!V_%z_}07b`t22{CkVzOu|x&)}-i$Klu>w(V)ei#@7AM)_;fTG(Au65m8okK+#DKd=l_oK=tc`z^#=37*ON< z%Nra$JOUK{pFQj7whk12XMv9ewt(vYD}gTqz7Ytjqt63pX)k`UqnF!X;`sH?05wlv z1d3i>aKO>yD}YRG^bk;V`eYXGCg67gwI1FBycYNn@C(3iodegve*iun_?dY(Pk#Y? znD_o);K#WC`!9_mSV#1Ohv_f(e;KHC`N<;=FE=lMTYkRr7E=a|FK-9V-+`a>X9qKjSu&jp?WvgD$_2WtMdA9wWma^S1@{aWC2fL{i_6Zq`g z9R3~vZszyHK&_`ofX@Y9n7DSX0%|@Qz!dlvU>Eq0z*S&#(ap~v0H4C|>l<$VZw894 zP61W_L%=EEXMsC_&uBV&ydJ1|y$kq4;IDZ2Pry3AFXN?}=SARF;2Zq!4*{9N==Xq6 z0&ZGzc-aYjCcjSsF9QAmQ1kmUz{`Q31wvZUQ@QXl5HM+O&#`y@a#_zp@DEb%R zD}gh>?4+a1j{sT9(U*anfwOCF9lR2FFTcN;mmLAVA1FF}1SmW`2W0F8UJC>@(d&Vi z0{;%E@m_QXdI$L52i(E$&q2)U#}h&34*_=r_X9r#RQYFsj28m;0IvqF0rlPofUgC9 z%XgxK0pAQ%e=qp1DEcqJW55f6+wWqX0uKP659|On&bxuTfWHqEo*wfWC;w-G7xDW& zK$ceYtH7;NJlM9q{jg>i?I3i@@i<&eJ9E>HK~- z@M7T40afmgfY$*Z0d4|b_j)H6QV+i$sD6CZ!!H0Y;rHX;;N;2+BQ2CjmbNyn^z70@V1P_7(@P1Ztcw2a0Yp zpyu^WK-IqwsQ!Nx$Wn_Q0=@`%-4DReY45ebef<6xgvyI`|E-R%-3{E!?_UB!(nid4 zfIA`TyMVt9+zveOHaA~)0Zikx2e>rP*Kj?W>qA@*ab;Yu=lWf)-{I0{3zu-L&pOxrT)(d$e3&Fy=*p24NhN4S2D>xo=H&!vy(`1iP8%cVIEAJIqk^TYi3ZGYp( zJ>2i%9|3=h>qodg$fY$BK1cZS2`{6;#%R-=Ucg+$MtHi8Lp>srCg8Wx|{1MT*tZI&ZW;wxPIEcIUmI< z_%7OiGgpo4v0N|Xx`}Jt=hwOUI<9Z#YWM=v9=-^;nd>LH?&11Pu5agJS(={H1?qEv z>nPVB=tt$#s(jza_aEb$@b{kV;R5iN{de(*cXJ)&dJ9*N>qoh6;JTBm&9#Z^SGe@~ z6xUn1#0&Mg*8!6W&*%Fh*TY&*r+6E8)`T!w#6-e53y^@N%vTxz_Z9&#heF!nNZa=s9%$Sx<#8aoxamE7vO5 z>$!fI>jAEZxc(d0m$;q)(ZyU>QCDNphoAPjg#RDmb1%;VZ9m;V6Mg8}Cs=GMr;qxe zdwC5gD&+t9ZKiB znhwHi*}fZa;0RiIrq^HSKPTSKDclr*Z%ED*vsdaoTOxvZdNm ztDVLt($jgrmz_xK6Vb%sbT#Ysp;WiY0NVMr%iTde>n&fSl1W2j%BSL5 zGi|5+G_I}oTHXE*50~Qo^M?;kFT}MayU*|012e@D_TCmY!PerFkv_ps>TzMCE2DIW1bq zTX`P}nToU3w3pCCzKySj<85(2&HMZokp#R?L>_sym9)L;z7PH1Y~`zM+BOogGOC`Q z0(C{z)n3-1Z?(Lg^=l`S-kzJL57S7V_92mztzOpcXjD9DC5zCC9=9ODl~%hM`^srv zwwJGDYqfT(BdV=@bUXI9L4&7Y3No4Pw7cA2DVsQ%_6%2*>iU`u`dS3xX{)=G^*V_y zs|~}_%1Tf5ncKOAnVT1iw!7INPkV8#n=SXU!76j189X$-urPCYj$di76CbT@KX!0_ z-%MQVrOWB5@HCK()}&#gw$^L)-8WI(z`lo4YbzPUN;+w%9@p~L9ceswbg{8^;^6hi z;#$AQ%CFgiTV%9E;+(HXCco#(#44A%W@` z4aCq$_Z${BY6rG)tCO6vDaiL6oW8ksV0Lcih+5%oF^r^>L67BwZq}_Wwv+A&&y6&9 zc?`;YXUD(a?)vG50J^EY{ZM$jD9FA2(Bb*L_I7c&>f7Ceg4FaZiTkaNYbjAnuvFt@ zdyGdE9WnOFvw=uBkC%E`$GFHgW0rXzvPpU{STR@YR#T0^%tXFvZ_nNvrVmf=g*4P6 zcRFIke)KTRH0i`iFJ-N)CahOxYVmYj)Y*1!w1{O>Wo?DF^Ht^smeI;ZQhEH!K?X+^ zVJ{|)6L~wySI*s_M^dZ1Y&F~2a;uTFbYhL&66{hEBEADNm+H_Z%MT zmcI?9GX=AAvkSA+2Wr!YuRnsoWC?4jpA z7T}h=G!R?yhCiG8(IszB%B9094?MeE#H(r#fse346F8Yxi3m#UtU}!>OgfEO(p?c{ zP+Y7#Jyq{!H6GSlOSP2pr$ZB_*N9%UzPcH}FJhykZrsdl35!*D!G9ja7?dR^Qv;5c z={cAQ`hzKEi|M&1z_Tf-RY>h_!?7bow8L>@CFwaNiz66gGq&QToixEJR}@`n`mC^_ zr>~X}c8eL@c;w@Br-03XWhaG%XVzNB8abs#B=AQX&`-PV5Dj%Ao3`XB0x91r%%rCp zY1&Mi6Vaq;mq|B9LukO|;%0)RlP<{+SS^E9>5DMG92tm2Jk1DCrtNsLxjW8Jv{qNu zp;o_s=7#EVe8ja9LoMn&jnjv2idKx8ggPbm1zUsxs|4!u*_&G!^o-unG-xf}TuV25 zO)AtA>(wI@(F`PsPta;tqOa$Bx}iu{D9h2?fN% z;vodsU8Y8pNukG{IGhc_<1HEbTQfb`YJh}6XORUy*+%|>^l`V%PRKD6(vGtsn4d{V zoUSb(RrNp`x}?sD_)1(K`nWbTN&uRySSq=O}s29#_=qW^_%o$h4KD9_DEO z?Ed-O^Qh``Pj~2BefrahWj|q)F)46GEUqRDqaK~R{UaG7gSR&`jDc_9d$bCmt*mh( zMNe`(_Zu;u{B&nAYeVfQf+xQE7crH2T(8#!u8Ch1N7ES7`@ySe0aM(bh^B+YFo|nA zv!?~w1_??;)@`5WKiMCBR#LP#>1vi6Z86+o^&mXU7Om!DtB1-V6;wRXmIe#b*T;AZ zI^xI^Q%Bp*$V0gvn2GL|U|tW^tx$MaU3ID$3duS(ACMV-9E3IX;G|~H_;biMXw0A>ko({SwFX-~Dr+q;hFc&-l zui{wz5aB0%`~)*5*nzu>&6A~+0;4VHMa;o)Nwlf8tan13yKpE7xmmB7ni6U1 zN1;N%aE2O?X^NjGE9ux-&(Z!AuFUMCg3HcmPQ{TH4p_|_z1AvD2Ly=oL7~~4*d6>v zsNeDmnI{20mdHP}4Sl5k-TIXQ1T=p)8)peyUH*%NeG{Ys(4eqaoh(x;n$_~LIRSJA(5AemSZi44II`0A zlH(F`trq5?tLT_g!BVI%4aA!m&J+j=b1hk>J6`*#)?g6w@H96*yiKayW{uL^M@0cv zYl0&;$5c--J=A;9=e)#){~~l1t)1mp|5_^V7T0ns!|7QbP2$haR6u3QzVWX(^)Bo+*+*)=(bkxBmWL{2hSLM-*&Dn7a8pJYjfaoP?@!fb|(r%}xqXQ#Gnk+ksFk_Mv zXMc>^bP)a_*YjyJS{xZ8Yy-8Lv!b1WK=;V$a7jDQCKQoyH4FNuq85X2)X4CT=c`$_ zDeR+(i4B@>8?JdU>Elo4zL;J`hnsIVYfg>8WE!?TMeynj63*IUg@AWkjM02h>{?x^ zaV!rQF0Onklq$U0C>AQ9De01zM)PBk-5!MZh+AT*&Mp-J7A;HD?8UNjIi^qJwre#` zv`=r7$jMuh)dSH$eEr;wehl^KkPF2)MgpQCpsGp}w>oI!EqEBpLb3#Ni)-`IVJCpM zh`&R{jT177m!-#{!_tjYyk)D4+MI0R9|h+{)JC`ES93<##43D9UeuL-e|2j6_B=TW zYfV<_KDM(RBHbo;lDM5oUK}uM=^}9lMGD}Ar(rxckrQc$^&~u;DNGa{E?qQ^x=T_T z^5SV+9r=pN=cWpqv(DCGePSXyGU8)Ecp&D+*~j%UWg!6MhNi{SWS2SXx6p&)o{VMc zWa#voPN#P$Fk={4Oi}8&&txDxXk;7K5=aSBNp{^p8kdp!h<*))AE_EX#;r?LAdx>{ zHHg1bU>8Dow_fB_ptf*wIzHJ#wWT9^U0H!?@IoGcNrqO58nHkL2wc%4O#8ISg2lV; zZ6kYHn-9_|aIY%;EoJR?w#KWN^pa4$YV7L!;Gc_1#mS(bDJp~C8S+Kf>>7dMRbTC| zI4SC5c)=ZFD}QYT1iM07aPYHqX$j3~7L2iq0m%PS7f?e6_^G-QW zgc#qN=Q6IZFpIUCw8381u8AwtIpaccKRLk~E;x2Tk;iC2&E__E?QGl9|rdckY4q2z`bqr;VH-BSB(+=r$YZWtT8+ZM<}_%&}G zUM7phEy{}|72UX^kO$59359oxkuVXSZ=v*OXy7Wfu|Kw4VH~~q66?p7zCzM1xQ4H` zslI6&{)~Z)511sfgl8ZVo@k;$@}dyZ_IRryDJW64;1^rVHE|$lxsynAq&2K1LYv)2 zrdC*SBK)B`%v`^nenr*BwoPZn)*(_&PquinMNHAZuo^L?fW#9H9JsB>LLRs+TiueZ z7A!)m`)B9&9l!3t{N9%wKQjCBned82W|{BXxh=4i5Gsb-#MTKfW5A1u$rC6YICJ%S z?i`vwGJErZTaNFYKYVy*@4{HRFkJOgZ&_JHl^ne)hbfQzN9)hNFa+Eb%=N=O(JRFhfw zP|UY9Niv2r1@zOYMKa@V%n`Pxe;qY%z6G}L#3`?E{ILnhLLbnrVC!*t^t0}9$h()| z>%Q80O@tN(ca2vcYJsRHhT7f{tI;kVh+_n>6*thE?7Mr@Q0W`=;DG)+r2pnkv(&eJ z@lZJ;{0W{eH632NM|V^-)$JL3c2ps&W5GFo%*RfS)>`%y{}gh))*xh{dTVyGh>z>m zqTNzVL1OnPGyf+Svi;Gif`n)H$3=;m1xMnR(9o(Zr)%|x|tJd zs(HZfl)pRno9voZJzlc=^MSsZ22B%ZtRK-Fw%7^^R2j8n+ahVhp=yBvwON;K4z5>hMhig-|!Z^n6T5G zI`WC^;4@OxvlNz~R7qR}a2~V>)A+m}w*D1V8FV*R8e_aD7_c}%q4Y{IY8-sr5{Tr@ zazZA0Sz>W4;~zdSsaUF%_cHESsz^R6s^l*x8*J<@{|lbjgec zFewqJr%keHUND-Z5%`%@2AJY|TBIh?%zQ%sG+U7zE54%P`S_JN^I+L>#P-2y3u~|l z5f)B9y-|9prl~ZDigM26b)GD5BzfJl9;s^SjM1QAM^2k_dZvj-uilkZ%D6&=%FRnK zF~fRPavn^N&>URtjq?F{Dlk!;I10 zdQ0f^D1%T0Le?}19NS5|A@8cw?9i^vO_?>5(`Tryg@-C_CKSpD3y89|-YlxAh$3tT z++p$8K zcf8N>^uGF5f2&$X#ZYUSWwaz|$);2>YWHw0AxgqSk?q)%waA&wOlCP53(6&=$T3o zv09Urt}@1uHgDY=EjbiIW)_xlE2a{h8F`Kqe;M&~)&k1U8(Y8vf7|iKZ|}n-g-(z6 zN-sp-a&ok~ARUIdA;vSN?1nNP8IF84bxd115FFtc-C9}18kECTI0!0*@cEoyClp7l z5^!Ox484;ykh7FqPWuwd@PXKMQ{)qcGys0uf$o7@YNsS!$3ihO3?Qdx=W$sVJ{Ja?&$cY50&W8PqKtOS;=SpJST1^(X zSA5Z(#LYmlr5vE8c(1C9Zs+lBdp1YX=6npy556L;jK8_`gG?z|?k%7!Y2&ekFv$Gg zs%;beP~?aG4d!O`8Rz1K6B8KCN^=-j7w2=x!3|o6;kMF+yg;sZgF25xEX&hevGIYK zn`RCi;Ren<`DV)-vYdr~OpGOu*}|hh{y7pZt~sOL^c3XFaRL&k-`#A??TIK)kao&@ zAVtHJN@)gNG=|2?maVL%MPkhe%t6=GJ})Eck<;*^kajq_iqOEIvPuFXH9|(WX*T6g zpZj22DB>-1v3LQqeCeDPd(Hlz(|jc0A|~5DAsqnr;WnJ$Xu#azZo{4igfyyU=(sE6 z#6)e0h#2@-%1x}v_D5Ss%+QKcL6piLT57e8XB`Tg5a7f#R{1&TsA8*dnN*&Q-J#%; ztEe*4aK{g?6M8%RqH;iy74U|!sq9W}M*~Y5v8933Gl@h32+=~GIAM!Ir)+cZh+L@L zgxOaG*;yW$=;66};{vRRK;wH@*&-j_#=^B!`Q3_81omfl9H+6B!a8C(yPa2qF2On{ zWo6=;-MGUqvuG_C++qm)GoxFa$X*90JspH$k)(;GI2K4JF42 zPezu;Wz&cZFnhsGC#{;1PcXCZR3a7JTq}r+WCO*DEEETR$Z0b7JZ#^Tlg%~doM>R1 zX=+*lF@+9D_$3nKV}{BfETf*pC`lBTzTwO!A$_wcWAaU$wW%6x{xN8+LYC|wfCatyTu&f#>ao%%J8MRsJZ=Ou0lQhf`X$}=0nk?p(1A>fU>mK5Pn36Nj<{zTjIVj*tdDARw<hcgN=7KjI+vq%y~2MyMHPSRPl- zIB|ZnaLY%UDdqfA?!IHqT1*u!X$vhC!7O-CWv5Zla_A+ru$Icq5KpvB-9i;|@5k){ zXY#R1HyN^Pq~|HEmFdOIqvK^BsG@f+VbbXh#XyIws6)N%c03cc*=Fq~7hRb$25S3a zh=%LDDlxVqh3UF@-G(KSzBu9b@|ujd4N8$v7j6Wz35wl)>7_K#n8c;evf z!I=_eJL@|p_9FkF*V=+b*R)Y{JE`)muFEn*`QCHm!v5M-WjVbR-&k$N$9JdVtH`;W zIMf~xi?8iRQzjLwyJ|o4J-ft2^kmPLE^)J+TX#>~T)W=+XN8tS8Rm39-pQ0*$!6Xe zZQfkJcm2IMiBhj5oJ?9;SlXRUurFE8z@E~JT1ZFCO@*uR)D5^vn3DaVJd|sWJ)pKv z3d1CWm4PZ-nE+DmzK+@CZye!^=mbDeSh2qR-E6TN$5@uQ1J{!o*?bv3RA4$O#g5xYZw&yEb zwrvadd^~;lr8myr!~=_Ug$P}-ZM%5vwtAPv!{+Uxz*+WhvweHMx_{e#hb`EOaJd3O zZx+I_J<10|`?rTG4;2Gx@^+&PugFK%>=m;kPg#Hc{vIjuWJxD&Hm(GdN@Xf#9U8(O zZsC;4YqB@Sb7Q*IWIda;+=SyO$6?hWpD4bF0_&O7q*(po!|3C^Jm)nz3=e)>qOU;t>63%hLt@H6elIfw3hSU`t2LHIK|)gGKO)P+WjRNYQ- zWP>_-ZoKUctrxx0__S4g{a)z46XQ8SBA&q=Wr)+rV9uSfhamX1070GIIeYWlB`CyUslm4I; zAJ#-@yL64zi@mecvq$Ju2O5wa&xWP*;j0^oZFhVmrD+?|Qr6O>7nnJZed(A~BOBAp z6+AL2L{i<(^dz%WAv)5mO_H(pgUDM=+u|nO^BK&b6PUd9o~CT++eB9xi67f}tb^*{ zZDzV*mo;mcP1YJ)bt}6}kYPSCw4L4aiNJ-}IWR=e1 zaSSu4i1fg>X~ML2wyp5cfg|i}0A*LW7EGbr7s)#`ySC%(+{5vjRM1c1^-@hjLkL-> zJ>2t+v7EJ!~5e=dC#mXz%|Z)lf2hLD!9gf zH#8IL_te8sXTY%LL`uiqoNCB&5z$`*aMd0wi7=6ehZiv9UxpW$LN)-v2E zeJ2$`N$+=vyQo5#&WRZnIvfW>;!p4#5^obqP!TeuiP);a?!-D@s3S< z_j6_{sOM-Ep0=+ZP4j4+b40?Np1O8TpOd6UQTK8ru*YxrqYZmb1t7H8SGEmI8)Hvo#+w8l}@aPXrOzl zUHIe~K=&?lZT)@AEiEN*FFwa&$vDSgq$v{@rG8RvIdrqElqYTQSb4cfh$Xm4s~+!i zkV#$gZc-4!8%%9L;xfjf17JpN*+OSSR@} zIE#Bh5b1qkjqdT!2@)vUxFSe3&5x+2PB*xN+NPET<%_jE%IawPB&ZP2amZn^oRwZ2 zd|-l;}Bpmb{+!jnn^}a0?W=-<zNClw39ov$#W{Tp&u;g?~V(4tfH zv2&1@V$XQQ)t;$;31pxUh%L<=aotlU2!I!muAFRk^n~y+;3L2zHr082 zvtV-8O{yA6h4~Rr7&ku!foWz5>x>lh1`MoY{lTux$+8O&tAs{AZhBctDVD!vjJPSs zKFk%4fsEXp)*ZfIRSG}r;SYuD1kOC-gU|*NC6GvMF!3=FeI=!bb#SqV<-~=`@mqU4AC4HLtaLC{F;Qa>XR)|_eK=mFvSMo}7i9fCffo?4)NBqPEpeua zWe*;&^%7L718$t*2r*`Zq%SFw=#S>1R@$k$*-KW@futbd-7)5kex=MSie|$HPLv8y zU`bxo1(6u^Q1lI*JmFf!o?5@3^kN-8VQSJA+zgCul~A7CVW={80EH7|Y)( z#^Ynsyu6bVQk4?7e$O%<6VA_enwN{U7DZVIMci7t{Fx7^7??NN1jB@9Y9{JQLzODW zX%+I0o@|*sPZ0y0QemWdrrr|NX@G}H%GsQ7&tnIRm=yS zfdN(>ea^oQw;1PSs-LBrGe*!eP317bET@VlA49lr%ma(2y-Zf@MoSvustC2zOOC*> z%pb@~cK48Xu&X&Q1qF{a z=zYeXGA1zymN+OV+qmSl;9cg4(~9xNw>sock>4YaqRXqdRX%{&X}lPqWpc}?E$)mt z@q&Y8%pUc^s=$H|Sc9h^#%Pi0lx=Lo z9eJU0xK~^yW4pd|l>jWu)2#wC$*>Fwe-K_6Yr-GmAPi}l;&o7?_C#RATi_Iu){Yma zp4w6mGYlblHdI&oQ)wu2=mn!4qDSivrSo(Uj=R7Nkk{QGcag;YxC==}CKZZq4pxad z2&c`gybH5yVPGId^+Y>auyD76s}V8oEgGp5I_Uy!xKv#Tj3XbUb`pUo4#;3}e$}lE z9hpHxkQHZNSRT@u-wr-TI&I9v&D#3?IxoZeRHUI4a@T1Kj!(-?pu;leq_kDtx9D`^ zXM5!I4CU?^feTY&3!(yum=#n8a@1G!0gIEIk&1>-&;XkucgP=^VanydB~fa11-T>Q zb?0Twh%E-Q)TSWQ26G}Iq8{h0fK^HzYNKh2w~z62dR}UZ2des*sEEjIGOxJW%zpG? z9d9ye8w5&OBU(^UYN&vOzdK9Aspsx^4J86A$bs?af)PGe<&M-a-&f_l1Uq%X9dqH* zJIKW-!^*7a@rP@ev$cr(U*pJ@O*x1};(}6^b=pFB+3+C~<4@QKWk=7~aJ~Z_@n8pR zgkl_kYo}2f9j*1w0GuyC%1WfC48%J6UpYfRrXdt{z;(zMrXNi*t^9cStX zim~aToCRqKb2@7y@}yPs;xy7V z$$`(@xf{ONSZA3OIQ77XDrBe2urcilea5}utTo{(=cqg)mL%y5b5QS=o@*gLeKRgu zh&%JQf>3c#x)n{MqPkUl?!I&00!zAP5udmIM*GOhp|KLNWvggs`$vkRTwY(4PsSdOrVrg-sCSt9T=n zmuO*Gs;BY?j0#*jgC`@*pgc0{4znEMvK`*(G(Tw-SYNQl(#s0|;jz%a(yc*!;lE;? zgh1c8hH-UT^af5f=CvWVQ#2tv)<_lhEW75nT_e(L!zN<+-nrYw$-Uq1!OZ5 zO>ET<9GT}OY6Kgfh2;6PJ4a*&DfKX7xBq|LUo zq-he8aWS|eQ0KfwX)SXnnutOb_Ld^MnzWOXa)?-*RQ1g5?m~BJ09=l_TTF;aXe(i! zQSk}cUb3p)c_wPvvkqU3m&qw1i@$spZ_?2wn|QgFAEe6ZCSpg%9b~5487EmJ_GWQp zb-tqcI$zr+!VG6DBBq}59wHHdt((pn-=%kcjfdE-RPQl?U<$J9hCNH?(62Jj2(Pp18(EkApBDn(%Mb9qs34mTwYuRiHYt@qNJNBezs5=m!K92Chpr5*F7{OL zo1roxKIKTLG^s*6NmQY>;^yvnhJ_ij3rb%zYY+<4l1*?YcH;J6IU!3`;kbf_hSKn& zL8pF(=IOUICY_jKGRal9#6uPWe`gIAOHg-w-_F>vv-TujAQ>UO!^aJsYGMM9uR2GC z{<`hx)ipN;VMNhPnN|R}BE}RsLp>v_66)159N%|WmzA#w5dJt*7C2EJKabMY-8z=^ zH}{}ty|^~(k!j3fhFrm@oO3kyDsfckq8wgXdE-edHhqpu6}b~6xs9uAq_n}EBk>-h zNoZRxGeGz;Ra3IqyajTR!+t3$&r7v}bV(F%f)~B$?5(?QN(+!`PE#PW7~47OitsQ& zr1j9bVbx4C=XF3wNxra8y%?*u>ev=H7TX)YhS=44vvCW}s6kWG}ftVdfP^ zhud&^ixf&r!43)cbdXvX7o$yd^okwzGQu1vSfRh+Q(Vqg)F0(yo73VgS|n++P_;PN zB{%!aALkBJnZfy6~V>gu9QaB{)_568MVY}&al3VS%NBN?RJ zHkYd6MYFaiC^1!3>U6<))1FNcCWKerWhN>w$KeQas>*HS*Jh8nJ%Bkf41Eeiiod4T zp^CPtDN~94x17m>|Nm@fz7!4F;VzCI92T`5QQ|yD{(Kp?&%DTQ5N|Pc0K-N6$n8h4 zKk{dOjqUYNe`5}WojBtTjjG5dlh5}_{;|0a()MW!OpwI2@r{DbsVx4j4(BJ#DvGYZ zEM`mA#)H5DCn%yr=9&gTwkD?qSSqQ_I92;{`pJzTB47_i8HxxVO5@5wgOrZ$;<%g2 zlV~_6o~1{ErF6MX#kn)ww&45vgQUTdFEL%5K@)Nz*z@6#@6-p}LXy7{%kC^1_fQ>B zz|nkWXj#fUus;Oi_I8gRNwcXy{fH_7T4V-WK7iZOp_wCLkOx~FgX4K|CXM*d6w`bb z6SC^Cae-;fNFy zY|l?|0@t_oQW{P7IQjqNo`vUzNG)9YHIgahATRNZZU@fseKo}E2z8~%&t3Joq4 zpsxfE6e4GlIMOaeQ-eP>VQPQDnEdjWhbPz;fpLtc7*mtc6e-35ms)lFH46Uxs>>qW z>U0&55fatnO`L4ADU{zxI7JA!l4a?<5uuLLaBL@0W$GN^S}u_bz3PA)TPrHbv}@s! zA)9AKJ7y0R`UlICX{)HLX1R#&eWnKUI=tuCA9OQc@)lMmc&;3E;||-9YY@%3;$hXK zf)W!k@G0Ym)w6Dj$a~sVt_9c@_bjCI+!T@B?voU4pXI$~u7rH9AXVMOZof&C| zQ*h=A)`N~Y1I?BGHTgr3X-`L`ZTP!5cFL3fs!+GN8OzR{x5$L(JRmB}B)v9&hR;VG zhzx|kMN}U3Yvu~mQt6mG^2wiTW~YzZkx_Z7qpo#I?JerzxD$PqrO96;9;`B03wKRK z#(24d?*b&^s{vI7b>o5UE^}<8JB`|%E(cmBL$#dKDXd6p2&Scj z2`5mnqWr5k6AKP1C%66SB|C-N9sTD1?2pwsqQ8DpDd~^Z)`Vh>Rf>aut6;R5XG=XK zlw&!b-{YG{66Nx&QjDw zm?tIOdY}W+P{Q6EwNSWrkm04O>uDH^z%L(A8Cr8q6&_HH>dcKgiR3Zum&V>o7s8P! qbcIF?@#5{4PiaY?%&^p4Blm@{y&gr%oj5q%Ye9os3dMcoOm*kn(mt3f}X0Ts(N?X zZ=ms{@!$tAG0}@2_2R*UH!q%y8VLvE!7pG8@&EM9^epUBN$+o`>Zzxmm#Y6C`*(dN zFrJxw|AB3MzukpD80FnU90ad|hry4*7r<}8C&6F9r@?=~N5DPz2=O?0aKbLQ7r);E zdA$$r0yTIaco{qdUIh<;pMuYWUxH77KY`DJe}enLo8WWcJ~-iX5|HC~6PyPxfdqa8 zvj4BZ-Qc$%$Ne2B!Qa8pk>lQb$N7B$V_yFOd=b0>a!qz)Gv{|01eg@%M`~tGSU%|(~n;_?V;Qn!5$3Xtw2RXkrkmL9e?9(?Y@`1avrUz`uun)||o>xi)GcsYjY;Cx&7p2Ej9 zMvDcG7ifWa2p^7U2Hz2mmj~B@W8(23KJEh#u8U{~irSBiRZ(X&xJJR`Ru$CFu+$^H zVR(Ms#8nDW#VXLk;^GNX1Lvc$d2M9unkr02wi*qzr=jyC+bOv+8fROzNrgy@s;qU9L%AYSHySCM%@#9tEr`rj zgF*{!*Nk_z_H0lK_6wi7&O&eKRA}#!(7H05Z#~@(J4~jlrpT!DF4ZB3X-Q--n~3&W zsp(QXJ<`lKVP9&8BRCbSVYaF_N)IonUbDegMM2FjY^Xgq%dpQ(iXM&~jSO}p+N~Sv z6PzmpNlDZAGCfpP5%D`{G}KvgLqf3*iQ6q_G1ciD5_|v(SlKJqty{6Kyv0n9D(iLX za*M<>(jirx`}>^y&L-&5NJYvFwnekX8MN8@f_IlOBhO{>J?*&|JsKLDRnZiIj&{18 zg`{;+m$-;>CFCZPr>i{3zU$GT%4K7^oZG77eBQcnzAw*stvF5jI%?IUg{0e+$)fCb zDLLL-TzV<#CJ7AXMZISD$i^-?Dw747EKzrNA__KdwA~~@#V5m z#-5;bRr#RfE9c%lFPD}UkIU}Nm=hanFVEW4Wp!(pktk&QC>kW{1nk?DX|t*IT)n8?PqwQaHiwOCbk zG}E`>0*xwz7sUFZL}8$7+^IXPTf~H#LlzxnRaxMbc|yeFhwf;OHD+#po@Ivf+v41b z%qS=gb~&L&1A`vamx6Vr;$;7xSm&s91~G!v;K`Jlf8q@2&O~c&n{7@Xnqt+7Xv!_c zWT6>XbgU6gVzYX)7K}~!KQVdR2x!s~)#$2&s-wZTc53W*qB#h(S*^VdRT1m>X9w5) ztrusq0>R-Dlq&N8HvqCTb)_2pxivSKHNmn3jmko!!jKtfS9OZJBotmQGyoIPJ3PX< iu?Ec(cao)PVmJ|{i8;#;-!=|ptVoKZ+u~VGh3S90K&, 2002, 2004. -# based on the previous translation to pt_BR (v4.1.5) by # Rodrigo Parra Novo , 1999, 2000. +# Alexandre Folle de Menezes , 2002, 2004. +# Rafael Ferreira , 2013. # msgid "" msgstr "" -"Project-Id-Version: findutils 4.1.20\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2004-02-08 18:00-0200\n" -"Last-Translator: Alexandre Folle de Menezes \n" -"Language-Team: Brazilian Portuguese \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-09-29 12:17-0300\n" +"Last-Translator: Rafael Ferreira \n" +"Language-Team: Brazilian Portuguese \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" -"Content-Transfer-Encoding: 8-bit\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 1.5.7\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" msgstr "" +"Falha ao salvar diretório de trabalho para poder executar um comando em %s" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Não foi possível fechar a entrada padrão" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Falha ao alterar o diretório" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "não consigo duplicar o processo (fork())" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "erro esperando por %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminado pelo sinal %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Falha ao inicializar tabela de hash de arquivo compartilhado" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 #, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "verificação de sanidade da função de biblioteca fnmatch() falhou." + +#: find/find.c:263 +#, c-format msgid "cannot stat current directory" -msgstr "não foi possível obter o diretório atual" +msgstr "não foi possível obter o estado diretório atual" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "" +msgstr "Não foi possível ler a lista de dispositivos montados." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "" +msgstr "AVISO: o sistema de arquivos %s foi desmontado recentemente." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "" +msgstr "AVISO: o sistema de arquivos %s foi montado recentemente." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" +"%s%s alterado durante a execução de %s (número antigo %ld do dispositivo, " +"número novo %ld do dispositivo, tipo de sistema de arquivos é %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" +"%s%s sofreu alteração durante a execução de %s (número antigo do inode " +"%, número novo do inode %, tipo de sistema de arquivos é " +"%s) [ref %ld]" -#: find/find.c:693 -#, fuzzy, c-format +#: find/find.c:752 +#, c-format msgid "failed to return to parent directory" -msgstr "não foi possível obter o diretório atual" +msgstr "falha ao retornar o diretório pai" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "" +msgstr "Falha ao alterar com segurança o diretório para %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" +"Link simbólico %s é parte de um loop na hierarquia de diretórios; nós já " +"visitamos o diretório ao qual ele aponta." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -84,14 +130,20 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" +"Loop de sistema de arquivos detectado; %s possui o mesmo número e inode de " +"dispositivo e que um diretório que tem %d nível acima na hierarquia do " +"sistema de arquivos" msgstr[1] "" +"Loop de sistema de arquivos detectado; %s possui o mesmo número e inode de " +"dispositivo e que um diretório que tem %d níveis acima na hierarquia do " +"sistema de arquivos" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "" +msgstr "aviso: não será seguido o link simbólico %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -100,13 +152,18 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" +"AVISO: Contagem de links rígidos está errado para %s (encontrado apenas " +"st_nlink=%, mas nós já encontramos % subdiretórios): isso " +"pode ser um erro no driver do seu sistema de arquivos. Ativando " +"automaticamente a opção -noleaf do find. Resultados anteriores podem ter " +"falhado em incluir sub-diretórios que deveriam ter sido pesquisados." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "" +msgstr "Não foi possível ler a lista de sistema de arquivos montados" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "desconhecido" @@ -115,31 +172,41 @@ msgstr "desconhecido" msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" +"Loop de sistema de arquivos detectado; %s é parte do mesmo loop de sistema " +"de arquivos que %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "" +msgstr "AVISO: arquivo %s parece ter modo 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "" +msgstr "não foi possível pesquisar %s" -#: find/ftsfind.c:599 -#, fuzzy, c-format +#: find/ftsfind.c:609 +#, c-format msgid "failed to restore working directory after searching %s" -msgstr "não foi possível obter o diretório atual" +msgstr "falha ao restaurar o diretório de trabalho após pesquisar %s" + +#: find/ftsfind.c:677 +#, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Falha ao inicializar tabela de hash de arquivo compartilhado" -#: find/parser.c:471 +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" +"A ação -delete automaticamente ativa -depth, mas -prune faz nada quando -" +"depth tiver efeito. Se você deseja continuar mesmo assim, basta explicitar o " +"uso da opção -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -147,59 +214,62 @@ msgid "" "as those specified after it). Please specify options before other " "arguments.\n" msgstr "" +"aviso: você especifico a opção %s após um argumento não-opção %s, mas as " +"opções não são posicionais (%s afeta testes especificados antes disso assim " +"como aqueles especificados após). Por favor, especifique opções antes de " +"outros argumentos.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" +"aviso: a opção -d é obsoleta; por favor, use -depth no seu lugar, pois esta " +"segunda é um recurso compatível com POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" +"%s não é o nome de um grupo existente e não se parece com um ID de grupo " +"numérico porque ele tem o sufixo inesperado %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" -msgstr "" +msgstr "%s não é o nome de um grupo existente" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" -msgstr "" +msgstr "argumento para -group está vazio, mas deveria ser o nome de um grupo" -#: find/parser.c:1227 -#, fuzzy +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" -"o caminho padrão é o diretório atual; a expressão padrão é -print\n" -"expressões poden consistir de:\n" -"operadores (precedência decrescente; -and é implícito onde nenhum outro é " -"explícitado):\n" -" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +"\n" +"o caminho padrão é o diretório atual; a expressão padrão é -print\n" +"expressões podem consistir de: operadores, opções, testes e ações:\n" -#: find/parser.c:1230 -#, fuzzy +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"o caminho padrão é o diretório atual; a expressão padrão é -print\n" -"expressões poden consistir de:\n" -"operadores (precedência decrescente; -and é implícito onde nenhum outro é " -"explícitado):\n" -" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +"operadores (precedência decrescente; -and é implícito onde nenhum outro for " +"fornecido):\n" +" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" +" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -207,9 +277,14 @@ msgid "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" +"opções posicionais (sempre verdadeiras): -daystart -follow -regextype\n" +"\n" +"opções normais (sempre verdadeiras, especificadas antes de outras " +"expressões):\n" +" -depth --help -maxdepth NÍVEIS -mindepth NÍVEIS -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 -#, fuzzy +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -217,28 +292,30 @@ msgid "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" +"testes (N pode ser +N ou -N or N): -amin N -anewer ARQUIVO -atime N -cmin N\n" " -cnewer ARQUIVO -ctime N -empty -false -fstype TIPO -gid N -group " "NOME\n" -" -ilname PADRÃO -iname PADRÃO -inum N -ipath PADRÃO -iregex PADRÃO\n" -" -links N -lname PADRÃO -mmin N -mtime N -name PADRÃO -newer ARQUIVO\n" +" -ilname PADRÃO -iname PADRÃO -inum N -iwholename PADRÃO -iregex " +"PADRÃO\n" +" -links N -lname PADRÃO -mmin N -mtime N -name PADRÃO -newer ARQUIVO" -#: find/parser.c:1244 -#, fuzzy +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path PADRÃO -perm [+-]MODO -regex PADRÃO\n" -" -size N[bckw] -true -type [bcdpfls] -uid N -used N -user NOME\n" -" -xtype [bcdpfls]\n" +" -nouser -nogroup -path PADRÃO -perm [-/]MODO -regex PADRÃO\n" +" -readable -writable -executable\n" +" -wholename PADRÃO -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user NOME -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" -msgstr "" +msgstr " -context CONTEXTO\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -246,20 +323,29 @@ msgid "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" +"\n" +"ações: -delete -print0 -printf FORMATO -fprintf FORMATO ARQUIVO -print \n" +" -fprint0 ARQUIVO -fprint ARQUIVO -ls -fls ARQUIVO -prune -quit\n" +" -exec COMANDO ; -exec COMANDO {} + -ok COMANDO ;\n" +" -execdir COMANDO ; -execdir COMANDO {} + -okdir COMANDO ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" +"Relate (e acompanhe o progresso de sua correção) de erros por meio da " +"página\n" +"de relatório de erros do findutils no http://savannah.gnu.org/ ou, se você\n" +"não possui acesso web, envie um e-mail para ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." -msgstr "" +msgstr "verificação de sanidade da função de biblioteca fnmatch() falhou." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -268,560 +354,936 @@ msgid "" "perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " "use 'find ... -print0 | grep -FzZ %s'." msgstr "" +"aviso: Nomes de arquivos Unix normalmente não contêm barras (apenas de nomes " +"de caminhos conterem). Isso significa que \"%s %s\" provavelmente vai " +"avaliar como falso todo o tempo neste sistema. Você pode encontrar o teste " +"\"-wholename\", ou talvez \"-samefile\", mais úteis. Alternativamente, se " +"você está usando GNU grep, você poderia usar o \"find ... -print0 | grep -" +"FzZ %s\"." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" -msgstr "" +msgstr "Esperava um argumento integral decimal positivo para %s, mas obteve %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" +"Este sistema não oferece uma forma de localizar a data de criação de um " +"arquivo." -#: find/parser.c:1638 -#, fuzzy, c-format +#: find/parser.c:1633 +#, c-format msgid "The %s test needs an argument" -msgstr "%s: opção `%s' requer um argumento\n" +msgstr "O teste %s precisa de um argumento" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" -msgstr "" +msgstr "Não consigo descobrir como interpretar %s como data e hora" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "" +msgstr "Não foi possível obter a data de criação do arquivo %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "" +msgstr "aviso: -%s %s vai corresponder a nada porque ele termina com /." -#: find/parser.c:1956 +#: find/parser.c:1992 #, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 -#, fuzzy, c-format msgid "invalid mode %s" -msgstr "modo inválido `%s'" +msgstr "modo inválido \"%s\"" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" +"aviso: você especificou um padrão de modo %s (o qual é equivalente a /000). " +"O significado de -perm /000 agora foi alterado para ser consistente com -" +"perm -000; isto é, enquanto ele correspondia a nenhum arquivo, agora " +"corresponde a todos os arquivos." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" -msgstr "argumento nulo inválido para -size" +msgstr "argumento nulo inválido para -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "tipo inválido `%c' para -size" +msgstr "tipo inválido \"%c\" para -size" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "argumento inválido `%s' para `%s'" +msgstr "argumento inválido \"%s%s\" para -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" +"A opção -show-control-chars tela um único argumento que deve ser \"literal\" " +"ou \"safe\"" # c-format -#: find/parser.c:2630 -#, fuzzy, c-format +#: find/parser.c:2566 +#, c-format msgid "Invalid argument %s to -used" -msgstr "argumento %s inválido para %s" +msgstr "argumento %s inválido para -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" -msgstr "" +msgstr "%s não é o nome de um usuário conhecido" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" -msgstr "" +msgstr "O argumento para -user deveria não ser vazio" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " -msgstr "" +msgstr "Funcionalidades habilitadas: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "" +msgstr "predicado inválido -context: SELinux não está habilitado." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" -msgstr "" +msgstr "Argumentos para -type deveriam conter apenas uma letra" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" +"Não há suporte a -type %c porque não há suporte a links simbólicos na " +"plataforma na qual find foi compilado." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "aviso: controle (escape) não reconhecido `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"Não há suporte a -type %c porque não há suporte a FIFOs na plataforma na " +"qual find foi compilado." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" +"Não há suporte a -type %c porque não há suporte a sockets nomeados na " +"plataforma na qual find foi compilado." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "aviso: diretiva de formatação desconhecida `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"Não há suporte a -type %c porque não há suporte a portas Solaris na " +"plataforma na qual find foi compilado." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" +msgid "Unknown argument to -type: %c" +msgstr "Argumento desconhecido para -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" +"O diretório atual está incluído na variável de ambiente PATH, o que é " +"inseguro em combinação com a ação %s do find. Por favor, remova o diretório " +"atual do seu $PATH (isto é, remova \".\", dois pontos duplos ou dois pontos " +"no início ou a final)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove that " "entry from $PATH" msgstr "" +"O caminho relativo %s está incluído na variável de ambiente PATH, o que é " +"inseguro em combinação com a ação %s do find. Por favor, remova esta entrada " +"do $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" +"Você não deveriam usar {} dentro do nome do utilitário para -execdir e -" +"okdir, pois este é um problema de segurança em potencial." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "" +msgstr "Há suporte a apenas uma instância de {} com -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "No %s, o %s deve aparecer por si próprio, mas você especificou %s" -#: find/parser.c:3435 -#, fuzzy, c-format +#: find/parser.c:3100 +#, c-format msgid "The environment is too large for exec()." -msgstr "ambiente de execução é muito grande" +msgstr "O ambiente é muito grande para exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" -msgstr "" +msgstr "fluxo aritmético ao converter %s dias para um número de segundos" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" -msgstr "" +msgstr "fluxo aritmético ao tentar calcular o fim de hoje" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" -msgstr "" +msgstr "erro padrão" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "" +msgstr "saída padrão" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "" - -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "não foi possível obter o diretório atual" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" +msgstr "não foi possível excluir %s" -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "" +msgstr "AVISO: não foi possível determinar a data de criação do arquivo %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Falha ao gravar para a saída padrão" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "" +msgid "getfilecon failed: %s" +msgstr "getfilecon falhou: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" +msgid "warning: escape `\\' followed by nothing at all" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "não consigo duplicar o processo (fork())" +msgid "warning: unrecognized escape `\\%c'" +msgstr "aviso: controle (escape) não reconhecido \"\\%c\"" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "erro esperando por %s" +msgid "error: %s at end of format string" +msgstr "erro: %s no final da string de formato" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s terminado pelo sinal %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "erro: a diretiva de formato \"%%%c\" está reservada para uso futuro" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" +"erro: a diretiva de formato \"%%%c\" deveria ser seguida por outro caractere" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "aviso: diretiva de formatação desconhecida \"%%%c\"" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" -msgstr "expressão inválida" +msgstr "expressão inválida" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" +"expressão inválida; você usou um operador binário \"%s\" com nada antes dele." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "" +msgstr "esperada uma expressão entre \"%s\" e \")\"" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" -msgstr "" +msgstr "esperada uma expressão após \"%s\"" -#: find/tree.c:161 -#, fuzzy, c-format +#: find/tree.c:166 +#, c-format msgid "invalid expression; you have too many ')'" -msgstr "expressão inválida" +msgstr "expressão inválida; você tem um número excessivo de \")\"" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" +"expressão inválida; esperava encontrar um \")\", mas não foi encontrado um. " +"Talvez você precise um predicado extra após \"%s\"" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." -msgstr "" +msgstr "expressão inválida; parenteses vazio não são permitidos." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "" +"expressão inválida; Eu esperava encontrar um \")\" em algum lugar, mas não " +"foi encontrado um." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" -msgstr "oops -- tipo inválido de expressão!" +msgstr "oops -- tipo inválido de expressão!" -#: find/tree.c:276 -#, fuzzy, c-format +#: find/tree.c:281 +#, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "oops -- tipo inválido de expressão!" +msgstr "ops -- tipo inválido de expressão (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"aviso: não há entrada no tabela de avaliação de custo de predicados para o " +"predicado %s; por favor, relate isto como um erro" -#: find/tree.c:1288 -#, fuzzy, c-format +#: find/tree.c:1294 +#, c-format msgid "paths must precede expression: %s" -msgstr "os caminhos devem preceder a expressão" +msgstr "os caminhos devem preceder a expressão: %s" -#: find/tree.c:1297 -#, fuzzy, c-format +#: find/tree.c:1303 +#, c-format msgid "unknown predicate `%s'" -msgstr "predicado inválido `%s'" +msgstr "predicado inválido \"%s\"" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" -msgstr "predicado inválido `%s'" +msgstr "predicado inválido \"%s\"" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" -msgstr "argumento inválido `%s' para `%s'" +msgstr "argumento inválido \"%s\" para \"%s\"" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" -msgstr "faltando argumento para `%s'" +msgstr "faltando argumento para \"%s\"" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "" +msgstr "você tem um número excessivo de \")\"" -#: find/tree.c:1412 -#, fuzzy, c-format +#: find/tree.c:1418 +#, c-format msgid "unexpected extra predicate '%s'" -msgstr "predicado inválido `%s'" +msgstr "predicado extra inesperado \"%s\"" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" -msgstr "" +msgstr "predicado extra inesperado" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" -msgstr "oops -- inserção padrão de and! inválida" +msgstr "ops -- inserção padrão de and! inválida!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " -msgstr "" +msgstr "Uso: %s [-H] [-L] [-P] [-Onível] [-D " -#: find/util.c:173 -#, fuzzy, c-format +#: find/util.c:177 +#, c-format msgid "] [path...] [expression]\n" -msgstr "Uso: %s [caminho...] [expressão]\n" +msgstr "] [caminho...] [expressão]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "não foi possível obter o diretório atual" +msgstr "falha ao salvar o diretório de trabalho inicial" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "não foi possível obter o diretório atual" +msgstr "falha ao restaurar o diretório de trabalho inicial" -#: find/util.c:816 -#, fuzzy, c-format +#: find/util.c:824 +#, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "aviso: controle (escape) não reconhecido `\\%c'" +msgstr "Ignorando a opção de depuração desconhecida %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." -msgstr "" +msgstr "Argumento vazio para a opção -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "" +msgstr "A opção -O deve ser imediatamente seguido por um inteiro decimal" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" -msgstr "" +msgstr "Por favor, especifique um número decimal imediatamente após -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" -msgstr "" +msgstr "Nível de otimização %s inválido" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" +"Nível de otimização %lu é alto demais. Se você deseja encontrar arquivos " +"muito rapidamente, considere usar o GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" +"Não há suporte à variável de ambiente FIND_BLOCK_SIZE; a única coisa que " +"afeta o tamanho do bloco é a variável de ambiente POSIXLY_CORRECT" + +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "argumento inválido \"%s\" para \"%s\"" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "argumento inválido \"%s\" para \"%s\"" + +# c-format +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "argumento %s inválido para -used" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "erro de gravação" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "O teste %s precisa de um argumento" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "aviso: controle (escape) não reconhecido \"\\%c\"" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: número inválido para opção -%c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "O teste %s precisa de um argumento" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "falha ao restaurar o diretório de trabalho inicial" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "falha ao restaurar o diretório de trabalho inicial" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" -#: lib/buildcmd.c:171 +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "argumento inválido \"%s\" para \"%s\"" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "argumento inválido \"%s\" para \"%s\"" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "lista de argumentos muito longa" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "comando muito longo" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" +"não foi possível chamar exec() em decorrência de restrições do tamanho de " +"argumento" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -"não foi possível incluir argumento simples devido ao limite de tamanho da " +"não foi possível incluir argumento simples devido ao limite de tamanho da " "lista de argumentos" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "lista de argumentos muito longa" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" +"A variável de ambiente %s ão está configurada com um número decimal válido" -#: lib/findutils-version.c:60 -msgid "Eric B. Decker" +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." msgstr "" +"O descritor de arquivo %d vai vazar; por favor, relate isso como um erro, " +"lembrando de incluir uma descrição detalhada da forma mais simples de " +"reproduzir este problema." + +#: lib/findutils-version.c:55 +msgid "Eric B. Decker" +msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" -msgstr "" +msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" -msgstr "" +msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU find versão %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "Falha ao gravar para a saída padrão" + +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Tipo desconhecido de expressão regular %s; tipos válidos são %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" -msgstr "" +msgstr "Sufixo inesperado %s em %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" -msgstr "" +msgstr "Esperava um inteiro: %s" -#: lib/regextype.c:107 +#: locate/code.c:131 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 -#, fuzzy, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" -msgstr "Uso: %s bigrams_mais_comuns < lista > lista_codificada\n" +msgstr "" +"Uso: %s [--version | --help]\n" +" or\n" +" %s most_common_bigrams < lista-arquivo > banco-dados-locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 -#, fuzzy +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" "\n" -"Reporte erros para ." - -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" +"Relate erros para .\n" -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" -msgstr "" +msgstr "Uso: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" +"Você precisa especificar um nível de segurança como um inteiro decimal." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." -msgstr "" +msgstr "O nível de segurança %s está fora do intervalo convertível." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." -msgstr "" +msgstr "O nível de segurança %s tem um sufixo inesperado %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." -msgstr "" +msgstr "Não há suporte ao nível de segurança %ld do slocate." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" -msgstr "" +msgstr "Falha ao gravar para a saída padrão" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dias" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "" +msgstr "O argumento para a opção --max-database-age não deve estar vazio" # c-format -#: locate/locate.c:209 locate/locate.c:216 -#, fuzzy, c-format +#: locate/locate.c:202 locate/locate.c:209 +#, c-format msgid "Invalid argument %s for option --max-database-age" -msgstr "argumento %s inválido para %s" +msgstr "argumento %s inválido para opção --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" +"o banco de dados %s do locate contém um nome de arquivo maior do que o " +"locate consegue lidar" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" -msgstr "" +msgstr "o banco de dados %s do locate está corrompido ou inválido" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "tamanho do banco de dados do locate: %s byte\n" +msgstr[1] "tamanho do banco de dados do locate: %s bytes\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" -msgstr "" +msgstr "Nomes de arquivos correspondentes: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" -msgstr "" +msgstr "Todos os nomes de arquivos: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -831,81 +1293,100 @@ msgid "" "\t%s contain newline characters, \n" "\tand %s contain characters with the high bit set.\n" msgstr "" +"Nomes de arquivos devem ter um comprimento cumulativo de %s bytes.\n" +"Destes nomes de arquivos,\n" +"\n" +"\t%s contém espaço em branco, \n" +"\t%s contém caracteres de nova linha, \n" +"\te %s contém caracteres com o bit alto definido.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" +"Alguns nomes de arquivos podem ter sido filtrados e, portanto, nós não " +"podemos computador a taxa de compressão.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" -msgstr "" +msgstr "Taxa de compressão %4.2f%% (maior é melhor)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" -msgstr "" +msgstr "Taxa de compressão é indefinida\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" +"o banco de dados %s do locate parece ser um banco de dados de slocate, mas " +"parece ter um nível de segurança %c, o que atualmente não há suporte no GNU " +"findutils" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" +"%s é um banco de dados de slocate. Suporte a este tipo é novo e, portanto, " +"problemas são esperados acontecer por hora." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" +"%s é um banco de dados de slocate de um nível de segurança %d sem suporte; " +"ignorando-o." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" +"Você especificou a opção -E, mas esta opção não pôde ser usada com os banco " +"de dados no formato do slocate com um nível de segurança não zero. Nenhum " +"resultado será gerado para este banco de dados.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "" +msgstr "%s é um banco de dados de slocate. Ativando a opção \"-e\"." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" +"O banco de dados %s de locate de formato antigo é muito curto para ser válido" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" -msgstr "" +msgstr "O banco de dados %s está no formato %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" -msgstr "" +msgstr "O banco de dados possui uma codificação de máquina em little-endian.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" -msgstr "" +msgstr "O banco de dados possui uma codificação de máquina em big-endian.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" -msgstr "" +msgstr "A ordem de codificação de máquina do banco de dados não está óbvio.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -916,139 +1397,177 @@ msgid "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" msgstr "" +"Uso: %s [-d caminho | --database=caminho] [-e | -E | --[non-]existing]\n" +" [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" +" [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n" +" [-A | --all] [-p | --print] [-r | --regex] [--regextype=TIPO]\n" +" [--max-database-age D] [--version] [--help]\n" +" padrão...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" -msgstr "" +msgstr "falha ao descartar privilégios de grupo" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "" +msgstr "falha ao descartar privilégios de setuid" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" -msgstr "" +msgstr "falha ao descartar privilégios por completo" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "" +msgstr "falha ao descartar privilégios de setgid" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" +"aviso: o banco de dados local pode apenas ser lido uma vez da entrada padrão." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "" +msgstr "chamada de sistema de tempo falhou" -#: locate/locate.c:1856 -#, fuzzy, c-format +#: locate/locate.c:1844 +#, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" -msgstr "aviso: banco de dados `%s' é mais antigo que %d %s" +msgstr "aviso: banco de dados %s é mais antigo que %d %s (idade é %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" +"AVISO: o banco de dados %s de locate foi compilado com uma ordem de bytes " +"diferente" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" -msgstr "" +msgstr "EOF inesperado em %s" -#: locate/word_io.c:146 -#, fuzzy, c-format +#: locate/word_io.c:148 +#, c-format msgid "error reading a word from %s" -msgstr "erro esperando por %s" +msgstr "erro ao ler uma palavra de %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" +"Sequência de escape inválida %s na especificação do delimitador de entrada." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" +"Sequência de escape inválida %s na especificação do delimitador de entrada; " +"valores de caracteres não pode exceder %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" +"Sequência de escape inválida %s na especificação do delimitador de entrada; " +"valores de caracteres não podem exceder %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" +"Sequência de escape inválida %s na especificação do delimitador de entrada; " +"caractere à direito %s não reconhecido." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" +"Especificação de delimitador de entrada inválida %s: o delimitador deve ser " +"um único caractere ou uma sequência de escape começando com \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" -msgstr "ambiente de execução é muito grande" +msgstr "ambiente de execução é muito grande" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" -msgstr "" +msgstr "aviso: valor %ld da opção -s é muito grande, usando %ld em vez disso" + +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "opção --%s pode não estar definido para um valor que inclui \"=\"" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "falha ao limpar a variável de ambiente %s" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "aviso: a opção -E possui nenhum efeito se -0 ou -d forem usados.\n" -#: xargs/xargs.c:629 +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Não foi possível definir o manipulador de sinal SIGUSR1" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Não foi possível definir o manipulador de sinal SIGUSR2" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "" +msgstr "Não foi possível abrir o arquivo de entrada %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" -msgstr "" +msgstr "Suas variáveis de ambiente usam % bytes\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "" +"limite superior de POSIX em comprimento de argumento (este sistema): " +"%\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" +"Menor limite superior POSIX permitido em comprimento de argumento (todos " +"sistemas): %\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "" +msgstr "Comprimento máximo de comando que nós podemos usar: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "" +msgstr "Tamanho do buffer de comando que nós estamos usando: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1056,337 +1575,327 @@ msgid "" "run commands; if this is not what you wanted to happen, please type the end-" "of-file keystroke.\n" msgstr "" +"\n" +"Execução de xargs vai continuar agora e vai tentar ler sua entrada e " +"executar comandos; se este não é o que você desejava acontecer, por favor " +"digite a tecla de fim de arquivo (EOF).\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" +"Aviso: %s será executado pelo menos uma vez. Se você não deseja que isso " +"aconteça, então pressione a tecla de interrupção.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" +"aspas não correspondentes %s; por padrão, as aspas são especiais para xargs " +"a menos que você use a opção -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "duplo" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "simples" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" +"AVISO: um caractere NUL ocorrido na entrada. Ele não pode ser passado por " +"meio da lista de argumento. Você quis dizer para usar a opção --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "linha com argumentos muito longa" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Falha ao gravar para a saída padrão" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "" +msgstr "falha ao abrir /dev/tty para leitura" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Falha ao gravar para a saída padrão" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "não foi possível alocar memória" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "falha ao definir uma variável de ambiente %s" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" -msgstr "" +msgstr "não foi possível criar um redirecionamento antes do fork." -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" +"errno-buffer safe_read falhou em xargs_do_exec (isso provavelmente é um " +"erro, por favor relate-o)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" +"a leitura retornou valor inesperado %d; isso provavelmente é um erro, por " +"favor relate-o" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "erro esperando por processo filho" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "" +msgid "WARNING: Lost track of %lu child processes" +msgstr "AVISO: Perdi a trilha de processos filhos %lu" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: saiu com status 255; abortando" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: desativado pelo sinal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: terminado pelo sinal %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" -msgstr "%s: número inválido para opção -%c\n" +msgstr "%s: número inválido para opção -%c\n" -#: xargs/xargs.c:1476 -#, fuzzy, c-format +#: xargs/xargs.c:1584 +#, c-format msgid "%s: value for -%c option should be >= %ld\n" -msgstr "%s: valor para opção -%c deve ser >= %ld\n" +msgstr "%s: valor para opção -%c deve ser >= %ld\n" -#: xargs/xargs.c:1490 -#, fuzzy, c-format +#: xargs/xargs.c:1598 +#, c-format msgid "%s: value for -%c option should be < %ld\n" -msgstr "%s: valor para opção -%c deve ser < que %ld\n" - -#: xargs/xargs.c:1508 -#, fuzzy, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Uso: %s [-0prtx] [-e[eof-str]] [-i[replace-str]] [-l[max-linhas]]\n" -" [-n max-args] [-s max-chars] [-P max-procs] [--null] [--eof[=eof-" -"str]]\n" -" [--replace[=replace-str]] [--max-lines[=max-lines]] [--interactive]\n" -" [--max-chars=max-chars] [--verbose] [--exit] [--max-procs=max-procs]\n" -" [--max-args=max-args] [--no-run-if-empty] [--version] [--help]\n" -" [command [argumentos iniciais]]\n" - -#~ msgid "cannot get current directory" -#~ msgstr "não foi possível obter o diretório atual" - -# c-format -#~ msgid "invalid argument %s for %s" -#~ msgstr "argumento %s inválido para %s" - -# c-format -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "argumento %s ambíguo para %s" - -#~ msgid "Valid arguments are:" -#~ msgstr "Argumentos válidos são:" - -#~ msgid "Unknown system error" -#~ msgstr "Erro de sistema desconhecido" - -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: opção `%s' é ambígua\n" - -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: opção `--%s' não permite um argumento\n" - -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: opção `%c%s' não permite um argumento\n" - -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: opção `%s' requer um argumento\n" - -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: a opção `--%s' não é conhecida\n" - -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: a opção `%c%s' não é conhecida\n" - -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: opção inválida -- %c\n" - -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: opção requer um argumento -- %c\n" - -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: opção `-W %s' é ambígua\n" - -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: opção `-W %s' não permite um argumento\n" - -#~ msgid "`" -#~ msgstr "`" - -#~ msgid "'" -#~ msgstr "'" +msgstr "%s: valor para opção -%c deve ser < %ld\n" -#~ msgid "Success" -#~ msgstr "Sucesso" - -#~ msgid "No match" -#~ msgstr "Não há associações" - -#~ msgid "Invalid regular expression" -#~ msgstr "expressão regularinválida" - -#~ msgid "Invalid collation character" -#~ msgstr "Caractere de colagem inválido" - -#~ msgid "Invalid character class name" -#~ msgstr "Nome da classe de caractere inválida" - -#~ msgid "Trailing backslash" -#~ msgstr "Contrabarra precedente" - -#~ msgid "Invalid back reference" -#~ msgstr "Referência reversa inválida" - -#~ msgid "Unmatched [ or [^" -#~ msgstr "[ ou ^[ não correspondido" - -#~ msgid "Unmatched ( or \\(" -#~ msgstr "( ou \\( não correspondido" - -#~ msgid "Unmatched \\{" -#~ msgstr "\\{ não correspondido" - -#~ msgid "Invalid content of \\{\\}" -#~ msgstr "Conteúdo de \\{\\} inválido" - -#~ msgid "Invalid range end" -#~ msgstr "Fim do comprimento inválido" - -#~ msgid "Memory exhausted" -#~ msgstr "memória exaurida" - -#~ msgid "Invalid preceding regular expression" -#~ msgstr "Expressão regular precedente inválida" - -#~ msgid "Premature end of regular expression" -#~ msgstr "Fim prematuro de expressão regular" - -#~ msgid "Regular expression too big" -#~ msgstr "Expressão regular muito comprida" - -#~ msgid "Unmatched ) or \\)" -#~ msgstr ") ou \\) não correspondido" - -#~ msgid "No previous regular expression" -#~ msgstr "Não há uma expressão regular prévia" - -#~ msgid "^[yY]" -#~ msgstr "^[sS]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Uso: %s [OPÇÃO]... COMANDO [ARGS-INICIAIS]...\n" -#~ msgid "memory exhausted" -#~ msgstr "memória exaurida" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Executa COMANDO com argumentos ARGS-INICIAIS e mais argumentos lidos da " +"entrada.\n" +"\n" -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "argumento inválido `%s' para `%s'" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Argumentos obrigatórios e opcionais para opções grandes também são\n" +"obrigatórios ou opcionais para a opção curta correspondente.\n" +#: xargs/xargs.c:1626 #, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "argumento inválido `%s' para `%s'" +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null os itens são separados por nulo, sem espaço\n" +" em branco; desabilita processamento de " +"aspas\n" +" e barra invertida e de EOF lógicos.\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=ARQUIVO lê argumentos de ARQUIVO, e não da entrada " +"padrão\n" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=CARACTERE os itens no fluxo de entrada são separados " +"por\n" +" CARACTERE, e não por espaço em branco;\n" +" desabilita processamento de aspas e barra\n" +" invertida e de EOF lógico\n" + +#: xargs/xargs.c:1633 #, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "lista de argumentos muito longa" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: opção ilegal -- %c\n" - -#~ msgid "block size" -#~ msgstr "tamanho do bloco" - -#~ msgid "Predicate List:\n" -#~ msgstr "Lista dos predicados:\n" - -#~ msgid "Eval Tree:\n" -#~ msgstr "Árvore de avaliação:\n" - -#~ msgid "Optimized Eval Tree:\n" -#~ msgstr "Árvore de avaliação otimizada:\n" - -#~ msgid "%s changed during execution of %s" -#~ msgstr "%s alterado durante a execução de %s" - -#~ msgid "virtual memory exhausted" -#~ msgstr "memória virtual exaurida" +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E FIM define a frase de EOF lógico; se o FIM " +"ocorre\n" +" como uma linha de entrada, o resto da\n" +" entrada é ignorada (ignorada se -0 ou -d\n" +" for especificada)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=FIM] equivalente a -E FIM, se FIM for " +"especificado;\n" +" do contrário, não haverá texto de\n" +" fim-de-arquivo (EOF)\n" -#~ msgid "%s/.. changed during execution of %s" -#~ msgstr "%s/.. alterado durante a execução de %s" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R o mesmo que --replace=R\n" -#~ msgid "error in %s: %s" -#~ msgstr "erro em %s: %s" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] substitui R em ARGS-INICIAIS com nomes lidos\n" +" da entrada padrão; Se R não foi " +"especificado,\n" +" presume {}\n" -#~ msgid "" -#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#~ "options (always true): -daystart -depth -follow --help\n" -#~ " -maxdepth LEVELS -mindepth LEVELS -mount -noleaf --version -xdev\n" -#~ "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" -#~ msgstr "" -#~ " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#~ "opções (sempre verdadeiras): -daystart -depth -follow --help\n" -#~ " -maxdepth NIVEIS -mindepth NIVEIS -mount -noleaf --version --xdev\n" -#~ "testes (N pode ser +N ou -N ou N): -amin N -anewer ARQUIVO -atime N -cmin " -#~ "N\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=MÁX-LINHAS usa o máximo de MÁX-LINHAS linhas de entrada\n" +" não vazias por linha de comando\n" -#~ msgid "" -#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" -#~ " -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls\n" -#~ msgstr "" -#~ "ações: -exec COMANDO ; -fprint ARQUIVO -fprint0 ARQUIVO -fprintf ARQUIVO " -#~ "FORMATO\n" -#~ " -ok COMANDO ; -print -print0 -printf FORMATO -prune -ls\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[MÁX-LINHAS] similar ao -L, mas tem como padrão pelo " +"menos\n" +" uma linha não em vazia, se MÁX-LINHAS não " +"for\n" +" especificado\n" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=MÁX-ARGS usa no máximo MÁX-ARGS argumentos por linha " +"de\n" +" comando\n" -#~ msgid "inserting %s\n" -#~ msgstr "inserindo %s\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=MÁX-PROCS executa no máximo MÁX-PROCS processos por " +"vez\n" -#~ msgid " type: %s %s " -#~ msgstr " tipo: %s %s " +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" +" -p, --interactive Solicita confirmação antes de executar os " +"comandos\n" -#~ msgid "left:\n" -#~ msgstr "esquerda:\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=VAR define a variável de ambiente VAR em " +"processos\n" +" filhos\n" -#~ msgid "right:\n" -#~ msgstr "direita:\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty Se não houver argumentos, então não executa " +"o\n" +" COMANDO; se esta opção não for passada,\n" +" COMANDO será executado pelo menos uma vez\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=MÁX-CHARS limita tamanho da linha de comando a MAX-" +"CHARS\n" -#~ msgid "Normalized Eval Tree:\n" -#~ msgstr "Árvore de avaliação normalizada:\n" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits mostra limites no tamanho da linha de " +"comando\n" -#~ msgid "" -#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" -#~ " [-i | --ignore-case] [--version] [--help] pattern...\n" -#~ msgstr "" -#~ "Uso: %s [-d caminho] [--database=caminho] [-e | --existing]\n" -#~ " [-i | --ignore-case] [--version] [--help] padrão...\n" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" +" -t, --verbose mostra os comandos antes de executá-los\n" -#~ msgid "GNU locate version %s\n" -#~ msgstr "GNU locate versão %s\n" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit sai se o tamanho (ver -s) for excedido\n" -#~ msgid "GNU xargs version %s\n" -#~ msgstr "GNU xargs versão %s\n" +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help exibe esta ajuda e sai\n" -#~ msgid "unmatched %s quote" -#~ msgstr "citação %s não encontrada" +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version exibe a informação da versão e sai\n" diff --git a/po/ro.gmo b/po/ro.gmo index 13adb4ea567eac7ea078f6f5240677450fb4912f..2e2ade612ad712f583e9f891a3a4f65b35a187cb 100644 GIT binary patch delta 1641 zcmZA1Pi$0G6vy#1ZKZt_u>Tx79VoBV0#m5cf*od{{0V7<#DWQ^DGh{Lp0%l+2lEH) zYC>X+L=q%}8wm@Agn$GSCTZD_xPiDZx^N+XMAX8lng&Scea=%`9)T3>uhNQf(H;Hk`&mJd5=;W=(hzhwx_ky2&v+#&ryd z#m<-g7`4!4)P}BL81IyQh_zh*fpx5Jwvb&zJrawBk;rU0YT<3T0{7!m%%U=I8kgf` z)CO+j%Xk-K7-N-I+=mJvjmpp|)csGeL+gLZz{TJ2D{Ne3=CFmIu$SxE#ihX7m+&C- zou~lzKTZ14$Jg)#?&kj2xR&ckeJMlzxRvW^RH^>NF5M^U{1XN*GPuEmU5#eXbNvI` zK8s`V7E!UyH~3bv(MM{yIzF@Z;spR=o|T3^EsyoJi(3@V_%!{q-FgCw&b zU<>(C%|68m`~vx|^+re=4xnoNZP|yYg=SEtc!J7IB_Fbt5B6jUREY*qr9O=M9j}G_ zYsceE@Mq`wP^43+g}+1n@bB1$^=y~y*#_K={kR&>pi(=HB**R}kJzuMQq;05-H)Sw z?*M*-Z|51bvW1tJ-O0o_Cq{?xGwfl03iZIxoIuW%Rl8;tpT{~T(8$8Dty)v<~K z`v_I4$Jm3l?Ph=BR^&0;Kv&Bvs&0BOeGNT9SJPsu>0F}{LE|h287f}}!Oo2ph_b<+ zEIBucI&3e{mHLfzWpE4K)%&j#%z>S6wTzTPwdYEhgDR6+oX!hilsfpw0`qM>BmLjv zUqo>5RP)Vry~fIdN~&z?5U!&~ZCmMpFb>{TrA!B-LK8IJz~J52=~q)t$zX66`Y=|! zP<1I3T3y_}U~{P8)tqTgji>w*DK|5j$$As6mrna>dnGeGT9}MP3k^fz8}6K9j91%t0cOx8W$f1hX*3>D%Bw zs23lGnyH2Q{yEqV&p`vP!cX80m_p6>*VNTrXsQR4yoY_PH^LU~m;LvOkgSZrqwpvk z=7aO_exCm#EzP`royf!Rb*Pem0lV}){0Z(R`ghpZv_YhY=PRW968r;dz)#;-FWGBw z7tim(vcC9{iPr2EJOGOs!BxngtROlKU@PQKIRx9_6OiO(77oLg z;cj>xszTb)%>)d8d&(R6v`X_cIfW`JuBoCs{mrt9@4UEDV8l&pX`!uCR!V6+1lV?)OErfuMR zMg4l(39NIx;C7msNt>Ij?Z$IZC)^4-Ra zju%{~>$YZ$hVG;MjuB zbAG}1O4-WVhEvIsGg0|8-CDWU@K7b23MwC@u2nBJe%;X2*VWtK)z@cw2L}5ORL^cm zC9CH)d5Q8POPWLlqnVMnTM9Kn)G3+Yyd@cI!7+K)6y3ayVyQY!&UGDz`u9_AU~^Hy zFPRSO)kVtc?j@BLt;_LfvuGpFH7b)SMAnR#>lz)YnIM{|71@$^r)ojyEZTp{^>1jT zzN`;2&c$QGSOg)p9H1~XYX64&#NL>?Wk^rUAiAEmv@W1CM_lP!rv JHPgB=^*6|CH>&^u diff --git a/po/ro.po b/po/ro.po index 2a0a272..f0dcd89 100644 --- a/po/ro.po +++ b/po/ro.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.2.24\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2005-08-01 12:00-0500\n" "Last-Translator: Laurentiu Buzdugan \n" "Language-Team: Romanian \n" @@ -19,32 +19,68 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "nu pot obþine directorul curent" + +#: find/exec.c:256 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Cannot close standard input" msgstr "" -#: find/find.c:205 +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "nu pot executa fork" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "eroare aºteptând pentru %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s terminat de semnal %d" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "verificarea corectitudinii funcþie de bibliotecã fnmatch() a eºuat." + +#: find/find.c:263 #, fuzzy, c-format msgid "cannot stat current directory" msgstr "nu pot obþine directorul curent" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "Avertisment: sistemul de fiºiere %s de fost demontat de curând." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "Avertisment: sistemul de fiºiere %s de fost montat de curând." -#: find/find.c:491 +#: find/find.c:550 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -53,7 +89,7 @@ msgstr "" "%s%s s-a schimbat în timpul execuþiei lui %s (vechiul nr. dispozitiv %ld, " "noul nr. dispozitiv %ld, tipul sistemului de fiºiere este %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -62,17 +98,17 @@ msgstr "" "%s%s s-a schimbat în timpul execuþiei lui %s (vechiul nr. inode %ld, noul " "nr. inode %ld, tipul sistemului de fiºiere este %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "nu pot obþine directorul curent" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, fuzzy, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -81,7 +117,7 @@ msgstr "" "Legãtura simbolicã `%s' este parte a unei bucle în ierarhia de directoare; " "am vizitat deja directorul cãtre care þinteºte." -#: find/find.c:1097 +#: find/find.c:1157 #, fuzzy, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -96,12 +132,12 @@ msgstr[1] "" "Am detectat o buclã în sistemul de fiºiere; `%s' are acelaºi numãr de " "unitate ºi inode ca ºi un director care este %d %s." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "avertisment: nu urmez legãtura simbolicã %s" -#: find/find.c:1386 +#: find/find.c:1480 #, fuzzy, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -115,12 +151,12 @@ msgstr "" "opþiunea -noleaf a lui find. Rezultatele precedente ar fi putut eºua sã " "includã directoare care ar fi trebuit cãutate." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "necunoscut" @@ -132,7 +168,7 @@ msgstr "" "Am detectat o buclã în sistemul de fiºiere; `%s' are acelaºi numãr de " "unitate ºi inode ca ºi un director care este %d %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -142,12 +178,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "nu pot obþine directorul curent" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -155,7 +196,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -168,7 +209,7 @@ msgstr "" "el ca ºi cele specificate dupã el). Vã rugãm specificaþi opþiunile înainte " "de alte argumente.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -177,24 +218,24 @@ msgstr "" "avertisment: opþiunea -d nu mai este validã; vã rugãm folosiþi -depth în " "locul lui, pentru cã aceasta din urmã respectã standardul POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -204,7 +245,7 @@ msgstr "" "calea implicitã este directorul curent; expresia implicitã este -print\n" "expresia poate fi compusã din: operatori opþiuni, teste ºi acþiuni:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -216,7 +257,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -231,7 +272,7 @@ msgstr "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -245,10 +286,10 @@ msgstr "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FIªIER" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -257,11 +298,11 @@ msgstr "" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NUME -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -275,7 +316,7 @@ msgstr "" " -exec COMANDà ; -exec COMANDà {} + -ok COMANDà ;\n" " -execdir COMANDà ; -execdir COMANDà {} + -okdir COMANDà ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -285,12 +326,12 @@ msgstr "" "raportare a bug-urilor din findutils de la http://savannah.gnu.org/ sau,\n" "dacã nu aveþi acces la internet, trimiþând email la ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "verificarea corectitudinii funcþie de bibliotecã fnmatch() a eºuat." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -305,47 +346,42 @@ msgstr "" "sau probabil '-samefile'. Alternativ, dacã folosiþi GNU grep, puteþi folosi " "'find ... -print0 | grep -FzZ %s'." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: opþiunea `%s' necesitã un argument\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, fuzzy, c-format msgid "Cannot obtain birth time of file %s" msgstr "Nu pot deschide fiºierul de intrare `%s'" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, fuzzy, c-format msgid "invalid mode %s" msgstr "mod invalid `%s'" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -353,96 +389,104 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "argument null invalid pentru -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "tip -size invalid `%c'" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "argument invalid `%s' pentru `%s'" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "argument invalid %s pentru %s" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Capabilitãþi activate: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "avertisment: escape nerecunoscut `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "avertisment: directivã format nerecunoscutã `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Directorul curent este inclus în variabila de mediu PATH, ceea ce este " "periculos (insecure) în combinaþie cu acþiune %s a lui find. Vã rugãm " "îndepãrtaþi directorul curent din $PATH (adicã îndepãrtaþi \".\" sau primul " "sau ultimul \":\")" -#: find/parser.c:3272 +#: find/parser.c:2935 #, fuzzy, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -454,7 +498,7 @@ msgstr "" "îndepãrtaþi directorul curent din $PATH (adicã îndepãrtaþi \".\" sau primul " "sau ultimul \":\")" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -463,117 +507,123 @@ msgstr "" "Nu puteþi folosi {} în cadrul numelui utilitarului pentru -execdir ºi -" "okdir, pentru cã aceasta este o potenþialã problemã de securitate." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Numai o singurã instanþã de {} este suportatã cu -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, fuzzy, c-format msgid "The environment is too large for exec()." msgstr "mediul (environment) este prea larg pentru exec" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "nu pot obþine directorul curent" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "Nu pot deschide fiºierul de intrare `%s'" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 #, c-format -msgid "Cannot close standard input" +msgid "Failed to write prompt for -ok" msgstr "" -#: find/pred.c:2061 +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Failed to change directory" +msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:346 #, c-format -msgid "cannot fork" -msgstr "nu pot executa fork" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2123 +#: find/print.c:365 #, c-format -msgid "error waiting for %s" -msgstr "eroare aºteptând pentru %s" +msgid "warning: unrecognized escape `\\%c'" +msgstr "avertisment: escape nerecunoscut `\\%c'" -#: find/pred.c:2132 +#: find/print.c:385 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s terminat de semnal %d" +msgid "error: %s at end of format string" +msgstr "" + +#: find/print.c:409 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "avertisment: directivã format nerecunoscutã `%%%c'" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "expresie invalidã" -#: find/tree.c:135 +#: find/tree.c:140 #, fuzzy, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "expresie invalidã; aþi folosit un operator binar cu nimic înaintea sa." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, fuzzy, c-format msgid "expected an expression after '%s'" msgstr "predicat adiþional neaºteptat" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "expresie invalidã; aveþi prea multe ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, fuzzy, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -581,12 +631,12 @@ msgid "" msgstr "" "expresie invalidã; aºteptam sã gãsesc o ')' pe undeva, dar nu am gãsit-o." -#: find/tree.c:192 +#: find/tree.c:197 #, fuzzy, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "expresie invalidã; aveþi prea multe ')'" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -594,121 +644,121 @@ msgid "" msgstr "" "expresie invalidã; aºteptam sã gãsesc o ')' pe undeva, dar nu am gãsit-o." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "hopa -- tip expresie invalid!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "hopa -- tip expresie invalid (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, fuzzy, c-format msgid "paths must precede expression: %s" msgstr "cãile trebuie specificate înaintea expresiei" -#: find/tree.c:1297 +#: find/tree.c:1303 #, fuzzy, c-format msgid "unknown predicate `%s'" msgstr "predicat invalid `%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "predicat invalid `%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "argument invalid `%s' pentru `%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "argument lipsã pentru `%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, fuzzy, c-format msgid "you have too many ')'" msgstr "expresie invalidã; aveþi prea multe ')'" -#: find/tree.c:1412 +#: find/tree.c:1418 #, fuzzy, c-format msgid "unexpected extra predicate '%s'" msgstr "predicat adiþional neaºteptat" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "predicat adiþional neaºteptat" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "hopa -- inserare implicitã invalidã de and!" -#: find/util.c:171 +#: find/util.c:175 #, fuzzy, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Folosire : %s [-H] [-L] [-P] [cale...] [expresie]\n" -#: find/util.c:173 +#: find/util.c:177 #, fuzzy, c-format msgid "] [path...] [expression]\n" msgstr "Folosire : %s [cale...] [expresie]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "nu pot obþine directorul curent" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "nu pot obþine directorul curent" -#: find/util.c:816 +#: find/util.c:824 #, fuzzy, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "avertisment: escape nerecunoscut `\\%c'" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -717,65 +767,382 @@ msgstr "" "Variabila de mediu FIND_BLOCK_SIZE nu este suportatã, singurul lucru care " "afecteazã dimensiunea blocului esre variabila de mediu POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "argument invalid %s pentru %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "argument ambiguu %s pentru %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Argumente valide sunt:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Eroare de sistem necunoscutã" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: opþiunea `%s' este ambiguã\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: opþiunea `--%s' nu permite un argument\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: opþiunea `%c%s' nu permite un argument\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: opþiunea `%s' necesitã un argument\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: opþiune nerecunoscutã `--%s'\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: opþiune nerecunoscutã `%c%s'\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: opþiune ilegalã -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: opþiunea necesitã un argument -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: opþiunea `-W %s' este ambiguã\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: opþiunea `-W %s' nu permite un argument\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: opþiunea `%s' necesitã un argument\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "nu pot obþine directorul curent" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "nu pot obþine directorul curent" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +#, fuzzy +msgid "memory exhausted" +msgstr "Memorie epuizatã" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "argument invalid `%s' pentru `%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "argument invalid `%s' pentru `%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "listã argumente prea lungã" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "comandã prea lungã" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" "nu pot potrivi un singur argument în limita dimensiunii listei de argumente" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "listã argumente prea lungã" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU findutils versiunea %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "nu pot obþine directorul curent" + +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "" -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "predicat adiþional neaºteptat" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -784,8 +1151,8 @@ msgstr "" "Folosire: %s [--version | --help]\n" "sau %s cele_mai_comune_bigrame < listã-fisiere > baza-de-date-locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -793,85 +1160,80 @@ msgstr "" "\n" "Raportaþi bug-uri la .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "zile" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, fuzzy, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "argument invalid %s pentru %s" -#: locate/locate.c:468 +#: locate/locate.c:459 #, fuzzy, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "avertisment: calea bazei de date locate `%s' conþine în faþa un caracter " "`:', care nu este un nume de bazã de date valid" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, fuzzy, c-format msgid "locate database %s is corrupt or invalid" msgstr "baza de date locate `%s' este coruptã sau invalidã" -#: locate/locate.c:893 +#: locate/locate.c:860 #, fuzzy, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Dimensiune baza de date locate: %s octeþi\n" msgstr[1] "Dimensiune baza de date locate: %s octeþi\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, fuzzy, c-format msgid "Matching Filenames: %s\n" msgstr "Nume fiºiere: %s " -#: locate/locate.c:901 +#: locate/locate.c:868 #, fuzzy, c-format msgid "All Filenames: %s\n" msgstr "Nume fiºiere: %s " -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -882,44 +1244,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, fuzzy, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Raport de compresie %4.2f%%\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, fuzzy, c-format msgid "Compression ratio is undefined\n" msgstr "Raport de compresie %4.2f%%\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -927,35 +1289,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, fuzzy, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "baza de date locate `%s' este coruptã sau invalidã" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Baza de date %s este în formatul %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, fuzzy, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -975,139 +1337,154 @@ msgstr "" " [--version] [--help]\n" " pattern...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "avertisment: baza de date locate poate fi doar cititã de la stdin o datã." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, fuzzy, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "avertisment: baza de date `%s' este mai veche de %d %s" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "eroare aºteptând pentru %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "mediul (environment) este prea larg pentru exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, fuzzy, c-format msgid "Cannot open input file %s" msgstr "Nu pot deschide fiºierul de intrare `%s'" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "Variabile dvs. de mediu ocupã %ld octeþi\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "limitele POSIX min ºi max pentru lungimea unui argument: %ld, %ld\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "limitele POSIX min ºi max pentru lungimea unui argument: %ld, %ld\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Lungimea mazimã a unei comenzi pe care o putem în fapt folosi: %ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Dimensiune unui bufer pe care o folosim de fapt: %ld\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1116,14 +1493,14 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1132,171 +1509,272 @@ msgstr "" "ghilimele %s fãrã pereche; în mod implicit ghilimelele sunt speciale pentru " "xargs, în afarã de cazul în care folosiþi opþiunea -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dublu" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "singur" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "linie argumente prea lungã" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "nu pot obþine directorul curent" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "eroare aºteptând pentru procese copil" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: a terminat cu starea 255; renunþ" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: oprit de semnalul %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: terminat de semnalul %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: numãr invalid pentru opþiunea -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: valoarea pentru opþiunea -%c ar trebui sã fie >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: valoarea pentru opþiunea -%c ar trebui sã fie < %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" msgstr "" -"Folosire: %s [-0prtx] [-e[ºir-eof]] [-i[ºir-înlocuire]] [-l[max-linii]]\n" -" [-n arg-max] [-s max-caractere] [-P max-procese] [--null] [--eof[=ºir-" -"eof]]\n" -" [--replace[=ºir-înlocuire]] [--max-lines[=linii-max]] [--interactive]\n" -" [--max-chars=max-caractere] [--verbose] [--exit] [--max-procs=max-" -"proc]\n" -" [--max-args=max-arg] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [argumente-iniþiale]]\n" -#~ msgid "cannot get current directory" -#~ msgstr "nu pot obþine directorul curent" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "argument invalid %s pentru %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "argument ambiguu %s pentru %s" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Argumente valide sunt:" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Eroare de sistem necunoscutã" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: opþiunea `%s' este ambiguã\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: opþiunea `--%s' nu permite un argument\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: opþiunea `%c%s' nu permite un argument\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: opþiunea `%s' necesitã un argument\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: opþiune nerecunoscutã `--%s'\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: opþiune nerecunoscutã `%c%s'\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: opþiune ilegalã -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: opþiunea necesitã un argument -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: opþiunea `-W %s' este ambiguã\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" #, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: opþiunea `-W %s' nu permite un argument\n" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "GNU findutils versiunea %s\n" -#~ msgid "`" -#~ msgstr "`" +#, fuzzy +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Folosire: %s [-0prtx] [-e[ºir-eof]] [-i[ºir-înlocuire]] [-l[max-linii]]\n" +#~ " [-n arg-max] [-s max-caractere] [-P max-procese] [--null] [--eof" +#~ "[=ºir-eof]]\n" +#~ " [--replace[=ºir-înlocuire]] [--max-lines[=linii-max]] [--" +#~ "interactive]\n" +#~ " [--max-chars=max-caractere] [--verbose] [--exit] [--max-procs=max-" +#~ "proc]\n" +#~ " [--max-args=max-arg] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [argumente-iniþiale]]\n" -#~ msgid "'" -#~ msgstr "'" +#~ msgid "cannot get current directory" +#~ msgstr "nu pot obþine directorul curent" #~ msgid "Success" #~ msgstr "Succes" @@ -1352,28 +1830,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Nici o expresie regularã anterioarã" -#~ msgid "^[yY]" -#~ msgstr "^[yY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#, fuzzy -#~ msgid "memory exhausted" -#~ msgstr "Memorie epuizatã" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "argument invalid `%s' pentru `%s'" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "argument invalid `%s' pentru `%s'" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "listã argumente prea lungã" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: opþiune ilegalã -- %c\n" diff --git a/po/ru.gmo b/po/ru.gmo index 860174e9a874f9bdbeb5938d0b557318fe753a29..3d3112f1ae878b324a53995cf4fabee2c7f84638 100644 GIT binary patch delta 15883 zcmchd33yaRw#O?0x1fUTn{pANfayqB1w;s|Q8roJfPqf>CTZw&hwcsm6*~|%jR)$amHn~Z#HM~IXW}X=lh+i?kpXIdEfVDuAcr^)va4~ z>TGqY!c(tj{^7xPv7dErzcWKA^)56N>U4op!)f@_B}z&A$<9jAq+SKzhvXU2RjKE} zk>FtPL-23l#od(J44&Uzsj=Wza5nfYa1z+NhfiuJ z8(;xAwU<&ez^&kKz<0qN;Oo7WIt?!DqtxSIpT1_IO5Z~9LJ;aL@d z@TBemMKZg=Az&l81pEV70?uR-!NV~Mr4%k7fat-Eph$TamTL?L z(oV<;^{Gjq1ug-F!z!>4Je5T28pKS!8mt0;4WedMnqwBS5xkiCPEZ!~1Sl%|0F;H@ zidaU0L2xwls{<577e56@fKzjoIs)DW&IE^Ds}ysnDo~8{dGI#yeQ*_c9d08G90VtT z-v?{Kj;!i-@B}Ce={n3v@D}jz)b9p|GrwBNsKU{6por)L5NWACaPts21$+wpAvguR zd!$j#%b-mB6L2*6H*g`C$6%~QZ2{4OIsxuQ1wRMjO;sazgsBdR{O_mm9t9SomNC1$ zcm#ww^%^J=`3%elJ!6#$fgx}O_#Vjr>Xvb4#SehJs9(o&yMuF+=m&+tDsVh_6r2qH z^?KwlA{|R>Col-gfHANGcs$wuI(Rwtx0Cfx!2Z#y`3kTexpF7stUn@;8#IW zT?2^Ys9%Gkf=lw1>IRMkdw@5CvY?_Eh0YY#f^)zfpbYp+FbMXYWQ?W;l=p|hj^O#o z?+UOxC=whAipc$-*hm#9jJyVJ20sFOf|b0);nX%z7>pgKU{QD<{2rJwRr{rK!T!`Q zng(UCT2L4pIo*gl0E(?dz)Qi$L1F9#a4`K(fwIzH-)L;&3s6+htH2m3C;bX7^_|9yjt6zd2G4VgZAo$x`hU%+1*uZkLtI0F6(oOQRsk@qN-px$>4-oZp4fn%tj2jfFP319=kW#F^mR`B=Wm?|^D zRcqPcsNW9W0sas8mekh~p23)>nvM)y1-?f^J#s?*YWoJISe*I{l!2FTWFrB)Z8Gs8 z0ajAa+KdPB{W|a|>O1aJ3j0)J?l&vl4KCyTZ$a!>EqK7}iuE88jj0Y>jE*b7Z_*(S zX7a(B2aS%ZwknlN`{&>YFlU>w0WZj6l?#gQ=R9O`I|uwa-@gN*ZneiTqQ7JZSrGM= zAX--bol4D<5q?Zz1r52#KML*xSAyMk5nR9rz&F74_>dUUjIUzpOppMxsekf_SwNph zl^RF=4sZdu6GVIJcOZ*brH`3;J_hAGdk;}lR!~DB4;=EiF~&vUeCqdtL%=t|@!8l>RsGGXZBMcq8>)U;+3(h!)k5{l?}Fg0YD-{Dy*vaL5zJ zeae#f6ett_1Y8XEdeYcNC3p+S!QA8rSSQC|-Z0FQu# z4E2)($lpt0^3&!(aR8h`eeN@e9oz+80S^3{$y_FbbErqbLEvlPdhjDqBoTQQb$|_^ zNc7NiCKCP%oIrghVj2r>0VOH@Ms3U($J@^v2~2!}6p9zsU2JD^3s4)tb1IiN^r1=t-t1*|b^lQlY9}0HHPk-=tH6fiW^b6l;H*tO3GRW>IVXt` z;76y-wj8_nw8?aKgS6}50;n#K=vd__w2LBCy#e7k zIyeF9$I#0VYioLz8V_!&>rgzGDt4vrg)VM>rAuY}A{gyvH-POSG@x841g(d@2YnZk zM{K00E)f$zgsa|6*6#<8iT`(?AXX{QME$GOcR&$)0n`I}7^+#x?ADtW{mQjbL;0f{}}dD>tAy`^FX>JkXG>nEGv z|Af{-({+pancSi*#of@ilWlvGI1SYE|A@l3AOf0BECz$AXC8${Xa!W8Y#a_g2VuK9 z4oGtzbfFZ|9*H0F9E7kr?bdgJ3m|MVrZ<;iR7xRvE`!A9*FaODu8>&%MbH+g6SM@{ z3CVLa^fg^Fml$86d@WQ1d7ulR+n`&awh!xnjn-H`HKd1gQhp&v-4#p7>Lod@Ir#G|@nh9-%!qB78jnF+%0J;)7 z4axI;XghShRCt~-pw0vPL50xU&<~-t(5uia=m@kLlKE8?G!pVb^1K1f(IxY<5%>nw z8QKJ01w9SPbKHRbJ)hrqpvR!m&?IOFB+r8eR8A6KG#Jw-(qx-HPD^=ZvY{M&3+e@3 z19>5N>I~>3)aGPa;7+J7R4EmnMbL%NQN;D%aNn~F0SdYiS_GAMVg2hV?1m0OF7ylN zGw5P0&w^g&V_A(nRP{5E-!FKsec9}g(%4OYc*I8J-A%7FM?Yag+E&sgl9neE`XWZ- z3pC!So05&ReM;M~w6<#+jb%%-{+ND?Xe&(i6Di3v5#rSsJ-%)Nl(hAiAD;ag=G_de zelqo&q_G1eA3Q>%R~mRy6MRlv%BWIpPru%5`Kh+#}l>@Q;|J>uCU;lkwa6Nca`QXGJa3IQ7R&Q61B=g zk*L-DA{YvK3IpEYawH=h%Az7xtlSP~oq6gOtw}-XZ}jwYQqzlY&Gd8T&YrBN4_C0# z7So#-Nfk0B@4QyjUuMflF^^Y<@`g)1#r}XjepBEd}IFH{K@mDYWe!3c3DKs!mK|MW%RNb!`m2A zxi{>M+CHmrwbk@d&bb96Z172CDT7DKQO`IFdlnmvSSu<*Q51nO7kZ19M*`kRY1;wO zf9oeHCx5U+e;Npt_=~&&YwGN2NkfkCO0U(Hwc4TLh2y8rnzFd{DE5j9|4J_=8?~Y# z%QMxYi{&pi5V0cVc9Fl>Z~Ml@+OpJoB+Cj#OYLx_Kf-)cvMu~H7{c*|5rs<8OG4zzWG=D*nu(&>sVO&p3P^&H7_4S)(2g2D?K`rUa z5`W5NKz}f5hrLBn|4O^10bq`0<=D7Q7_%*0J1CZ!j0ZZPdcyK~Fy!H-$6xHR>AyNP z1gkMNBVLBlG_j&>DQNj(A??Z%GbYcTIWvFOlyT>lnjRH3hsvW8fwetGtrA#AHpyYI zs6YU|&oP?lKN+wBwwHhz3Kr?W>F8m*kFMg^E-1&@vT65Dn_i zT47Nci4CDJL|{&PmY3r>(bNEul%VZZc2PxCM2+~$^eC%j6xkNjMv$s*HnPS<@3O5y z5!<#rk-;JxdsUHb`)ps9bFgdg_`0qiuop*Hm)ll$QA%`?it_SMSjRuR$SX!Ptzg=0 zLbcW!2H5l-al?_tRuq+u%_{a2-zwRlFo|*kxDNs5s&kCbUTn<^;YV=i3x&e}vWb{S zVv5g-go>8iIH_4s?Eig5OcYsNRu~HSi^K?)r)E0yM19U8JEyS6ZO*$r4ova}^&Urx zGp}I!f_ZcE&}>PNt)P@GC18iu1<`AX7MPzWcfJskFyXDY%v=w0!3m2 zULs;i4y|Q&S)nakf{g4B76mGN?1aS1s8`!aYFzPN+(#^m$jYENV5Q`O@MD*UyM%ld zMYb89K*X+EmK(3^9n2hVWfO4u3Mi}KBX4=RO;~0tCZn?h#W^}QuMSl-$4=+Hz6*P% z;*Yg7JCYr_S|;*{!^HD0_hrV&CbV2+&o;3Iai>1f5k3%NP3DzRu{RJ2Wl54~zC=(> zAL1XH$D&X;OmYwk`a~e4m`KcY%FR+Uy-~7M+Nb#g&fb0($KUPuYR1gD&Ee4OjLl4# zZ8N!R3ZrEbn4910lu2)nI?c(=%8KvpzcT|>25d=3i13n$RzyRRm6BQn5O+m5NHh&v zq)z40QX@Q)?h5uXUx+OkOVmtOmfERK5<0LSySNx*%C)S5VoStb=`|@wkvEKi$xOl3 zXf)?)YnkZDUR92Z_@hiJQASi~=1fT>o;#o>;&$x^rF&z)5;Yx-Dgh9tyMHo4_ublHK5 zc&D6W?S~OjC8y%pkdmU7Ig4wm2mE}g1FMew&dWoeJ1^obwwJ`0<-MQL%OCVd{g_G{ z4|7HjUmPnoHjk-kH~iAhszt{yJJ@7LTJ$2zIZMA1J1QA3FM#D2=dwhudoA6piIQDb#QTGg6kal__5*^#pb zFIDLcONKL+6p|z>vF)w{>3x<@UyK2hTyORRH`N){o{mma6x9SnMqLF?TUiLElM^QYy5V{({w>(7x# zS$f`v#6}jdmj7xz?rFDyX&YG6@s^W+$kwVjN+lgfmQA8EXb`N(?R3X))BFdK1bPA`> zmoxm)=?zQHafa7Yc*#ASV4pJ%LohsZZuDj`Yqe!LBi_W!87tLPZU% z{xHSnlY+c4D&X~D^!EV5sYz@&r`qZh8yF7BN$(btOUgMV+?bYbqB`+li#~~Jotd8P zGQi!A`C$n#e9G9A=&nI?ZY~B|8xB3|EyIu$F@VFO3zzv(i=M9ag@OB&yUqQo`)HFs zE%zDhWnI!Qv|q&&)q0Rq2(bp~yGN|lXKr1NCH92)vaH5^&7-81+EI5FKHMi(k4=cY z>NGED_YLlTcenePyWM@fi6I2gBw#d_*rHV@OETPOZ#}|*qO`4v2Vrq-0xNGZ67!u* zaT$Znvp;REz&(l1SoKNG`Ux2>*K!|6M#q`+L42!DhaEjH5kRwqk?9U~t>+uoc5)qu zh%(wokHctk2tL>D=)|`7h>7pW%yHw(@FSKL#}c^N(4w@hg>sLfPdVwA8tw~puV)GM zuqvjH>}2rd%?5K4b$D^qLet5x=$?|>j$FgOKIXS&U0To>5k;8CKbr#wHX$5h7m1CY z#CqmE#sst?7P?jI-*s4Mwa8Adz@O9X)eBqSe8enw7ei>Zi**vQC8%2N9<28n=u!81 z%C+tR50!nc<35QU?WE}m>IcMT&9^ef(R18suqN3A8d#Hd1Qu~I?k!(x<8N)pn8MDa z@L);%!I=e>YLz~%ORFg>$W68$d>(FkqU8Ucx44FEw&E<-Y!~_Q&!A|KrPUdQG zF1x>{bN8}d=e(-YjJ1f4jFj3Dvd^aQtFAMKEL6skn;z#YcXyZVGR7w;`{iPW~M1uGuEGOEX}eu zrB*C$V-II=V!n)*lGFB87ZE08RY_l$9lptiB~&6=o$+y~A>}yR1r_Vp$&-lPgaINB z6P_b!iZO%amBfkECjHM{W9e<)Y>Xzl>EM}k3)yo|v(}_t93{_aS~O`vvvFiCk#(Kz zqD#-Cv)Pu8Wde_EL7Qc;l$?l|^Rl#eZk_Y_j9ACCR_EI@FL(CM9C(KI>@?1WYPI%ci#(<8 z<(lu|gonQAJhZ%la~|E?=ikW7@N{09_BV1q9ZO}uVwYK~%~8%oHUDODjZS9~UYb)V zeIU`|C#p%>z=;P9;5owP;(w`Doj=ap;Iy05)p>K)u=90FcgWc`uV*}a_RNgf9vndY z@Ce4!;J$?M5Dqyc;?L%wNNbA(Phtb+sMi)3OB4G`T{tS@=l^lEK3_iEFsFRZ@OB?o z?Qjmv*^}-u@q%0Y8P14#4Ht{b6C1E(tl0V5x~qm0v?L!+MaiasA&sfi345;u8R7pB zH$zUwobJxY^VY|nqCwI&u`2C15^`}GhCj;oB>}xkZZ`E+CfOw$SK=WF%E*KikKUV@ zVs<0uK6cFaE)aU51v5PW$-mh*`=2K9LPzYYRqA zmxBm}-8fN`8?Tsu=)7gyP?s4{1Th2{)c1X7XXJ1LTcFpgzoX79%>^xK5y<20gT-7$7(AyXD z>HAuz|DuQEV-|kY{({F5@mBYU({Wd~F05SUVHJl(E~$2B$=%&zviS+O$vu!h=J=7m zos&Fi*^4Knjw?C>>pfA1&_b8P5$3{*MKhcNaQXX~R&*m~DN5yq7^rUQoVInib-B*K zr6V&Qa+dDs5r1vzq;>DwEpxkgOdg+paM;=Q;807p?^ql9jv?`9 zQLxnFAj~4=B$2YO=A%OTNufj2iI?&`*d$hlAa$zI>=ydG&~yupT_-Q0wH1q9YFVOQ(IW?DM%8i>qt<$# zC~DIg4|Q|1+%l^ZqlAyOiHA&%P%ma+$q7L7go`gm?m@-}NBQNQ(>^h~BDUuHQ!TWLAbXunLZ(sxALXS88(Z^g#;Z5ng#>X5-c@N|6a z-4A5uBHXmysvaBB!9)ZtX{#LLxa&hno1DCo9uq}+M?A8t$-9<$ZYtc-xvq5U7c;4vf|w~B{Fmf$H;N34U);ZFIkcX{B`q;zKyl+ZrouIf5;k~_TF+< zRQGgVysvY2Yf!dtaQ`#Cj=y+cc1E!dZB6Gf^EVFBrJSQA2ht%zU!WL!O55g$ffBHF zGC==i)+w1n6(3`RNN7AFaqnN0ek>p>9a%Hs46SQwei8re1D|I)8`pL2!-`F`YTET- zHhIDR;nwF<0^GiBVygJVZO^4|82nwtd3gsXmxm^0XgRZ;!qi{3Z@H9nOJ!+@f9%7b zx@oF$`d&hl{L3-<0}w6s&hpI0T4&$*e(f4hYmjK;M6>H{AxfVAWQ zC6{S(m7~+~l+WOBv{V@8Mf7 zXslhNz0cIUI7@eBH-`_=N$sw_ZGz?Zc8zGe(O&e(kZaNe4a?bF2ngqCZ?Mr>j~qIK Xjdpmn)Oc}x<)g2*4b%DiexCWiU7w!& delta 7410 zcmb7{33yahmVj?n0?59DERx4sfK(PX!xDCouq7bMQXmvbK}srBB$WgjkRq&MQJ^nw z4ag#hiaH^WKoAH6>P*{>Sk>d`=d_}>_O$IN`nCA!%=FjJf8MJ~f^E9FmTF)<`J_h9k`(`tjCEHGwa}Um{Yvw?&6{!2$4B z@IT=#SOIUgQ>rsu-Cn8p;2t;?`a38!3s%8p++Z+rT`?T2u+lfZL(;KM$qf`<)|7^``PYhAyx> zqsm0XF&aL1qI0i0;45<#n{_qTx4SfJ*obRD5_|6Dc zSGWu7TNb5X)@EIh4T>=v%wn3%(3xN1s6cRL8sQg$#zv&_i+l2Iip;>%k`A zQxKEt$|_{RkxVKrsN4%><#VB|TtkV6Q*bzZAKnAo8%nK!)8SBP!gKI5csD$PdxpSk za2}N1tpW3)OdNw_;a6}z^Q$!cKN>>?6qmdX|0oTh4D=r7Aq!~P*Y?09C@$Rq_ra6! zI2_SWsY&n##CfVW0VNZTfwJ&L&;$2FInu9T8)rnR9*jm^r4c!YarHbX3;B-i?1ViB z@eIBQd8FQlgJBa!5f6-n<6#Jf;AvO{d#3UXYIq7>ha9_F%V5N-+Am~&b&86t@G8uL z{{<()O#Ck%SPvzdD&LfPSsxc+B|*HudbBN?W_#&9SU`zSaUE`|~_RWQN2<)|_tr=~)Xo2>T3&hP~& z3%&~5!H_ue z{2sP~Z8%_ASPC3KzceU2T`-D8!y?!fZiC{vqp%6Q0z1JsB2?y4`3R1MnOucz23i9p z2Ci}r;`+wi%_2A$$~8UC4>w4C0*N=(n9k$iQ1~${g};aMFiOm1jkk{?8{TC6B`^ph zvzX;R8eGDE(=fE1%nIS6DYlF9@8zoSd@FnsmQ7XaIoLYey1%LhO8>UgY>)Zi8|bH@ z9K|}^_&azU$`Ng!VSDr%B+er$X{NoyA&@!L6386tBy0n}h7w$kS)3>A3mIF5;cQq7 z`BQCj?4Vr&^U)8%AaoKyY*rOPIZ6`}ChBvT#{9})lr0!?p{)2{;d=NN*b}asqf|LO z1SRNF*e>2x_d!{RhJJVhy5ZEhYy=OM!E@-f_w$p4{s5b!x_W^f)bGM<=2!g}+PSwA#ebDE@=iz#o0sAerk7hnRf&L<7 zPBq7?)Z3!N2%A#n%jm$sZ$lq?WBgYP15gJ15MF>gc*w<2lb73>ZUdBoZ%(73O-kAd!$R5eVYo)@ITMghZy)% zb61o1;jiI8!&leXv9arCd@wL@o3(ZV8MMyc!5lb>c6*^5^ED{3(~F;-@GvZb10S~g z9fWc;S7A?hD?(*1l};P%vs?+Y&>x3)z_(#5_yL>-zkpkyB(8z*A~fJ1pxl}}Hrhup z8%nzaa2Pbo?YHa$P&}vMa2Ro_G?J7}x}7!_S~J9J$#}p+zti{Q&F@e+8xe zP3VPlne{n%7EXXmw%VRJ2792px7ptnGaxrGq8_Hwj|bPGtoU0fJ6*e-I(!|b!3!1k z1pfg?qtD!7zcqJ4`9iu1Wx^PKpN`&Pm;DY{x|?i>{g1F6T=EESKv)b@<^D&lic&wo zB08o%Y7cZ|kL}t|;3PUE@3mc<4LhN0I0(J~P53V4_|>j`1g?`T`g8k}YutX@Ls#IN zJa;{&R5kn-ZeV_O>T!E#1E1jTqwj`?SV#tUD+J$q%KmT|d%%8uE`XS=w7V3_xl56p zAfD-r$OLRyJ&j12i7>xa()pDQHAfuwJi1KjKE@=w=}j6C;r$NP`lwUaLK^aAj2iB0;qTNk*h_gRJkim*F`v zP&(SM-he68$0PINwoEuBUT=s8<4RX}7-?ha;{SLV2ah75xGorrNc1O)oI8Q82o)=% zNs{68tTKk*a)h|MtxQL|18LI0N{lPQMY$65KZMd2>4P*vh&ic#Tfjs)NM$3!1+oe;sZJvQfDofr;)~o(B~cE=D~q5cAt?m0Rl@vs ziPs0mDR>Flge*sV$TNtPClGF;T8S(}o=2oKwV_Vij95vAn_!hxet&^1v{marAgNA^ z>qT)+g!jbjI?n!(i(>t^(+ajjwjje0DczA=Bp^z>OqTn<0A()n0CEhuAL)kVAjgq) z$dAjKxS=1s3#mXdkTb|xq$N^`Na42LR`TQ8K-f&q-`n8v!_=$d`hYlR#2JLr{sht^ zZZn_+*J@_@v^5pNx;v7NOhV=(0c0a`5UD|~As->Pkj8hkWzYlqFYUTIZywNH+jm{w zlrZSSNK$0zA1K4HB^)VXB(?yysnUp&u${%0h>nEqb8KmLv$}TOp4Pu;-!<~i(|pIp zAN7p$DTh6L(oy>hSj^24nQ}HZZ@gV%_%qlfs-+}si;vmg3k_{=Vw0n7U^9nw$aCuF zI%hS#+r4;Z&ZNnPTkoCPQ77HGSC3BVVzx;6*r~VmexTQcQh%VtC=L6AD~x+*-EXW2 zmInOGj51$w*dGcSeZ$T4Z+kzhzvoH=tQPn;_)LcvtC(EYl@+?clCVg6&r zR)_h(kfNkW`l{lRHH!_8+wBjQ_=>%GCH^v>rL&)aRPxum-TA(NztGR~EUUJ-nPC@? zd$QpREq8}YilwQ~lTa2LG9;QOtIky4X@*hgUE>b;gT6>u`UN}*J-pbOyH53F)m0Za zm^Ird_N@wd^L&Y!{ho#fYmB(TlXcsZ`b7j~5fQhyc!jkFw@f68HKS#%ZyUB2oX5G< zx3x5@v2Cw!oolsTRUFErwfI4Xwp6Qm`~miG!F{3C_yO038|=9|Lygaj><^6;7jd|0Z zcf0l7^K12$ydkD1Z=s`Qyp7><`&_Bo@VU%y@-I1?)zA`WZyN> zbJ0rCVvicJt+7X96>j`c89gn}V%uW73~NQ=Cn~ivKR#luJ8*~@tu#CPIBEo*TU z)#?$&Tg{KdRgLtJnj#V3jFW1+Iti$6|LsX9H> z%`7e-pJeK-4?7dS(J2-A&7P@Sq&~T$EW;I$MC1*)45q~shAZq{?sKW=UgkDqo1+(5 z+@;v2`d$ln<|YO-&+p7}B=t(|rCaWvqEGK0YF6w%m8{3@EBSwCLTjhza6`3q9z-b7 zxI1wPx%QI@7GiZH`+X%^Dalaotk3gTRx3$F>}>hh59{;F41>K@Mqi1QyBV>TX{(~O z?)n}we8BU6w6XF=T~hUAC7MV6#+VH@lzsb#Bs}BJ-X){@Z{OK%kF8njGIITr@k_j& zOAc*U!z3U4$?fXgLmhh6ZNf^}i7hnTfi#OWSUb`9lfIMC6*uBcZcyF0c5?r_y40Uf z?vLh(*au`?gIX?fHTy2Nr@>tf-U>f8&rkKTUKxM?8^is-zA_ToA>kx>ZDblAE3(8@ zmk8}jbg~{PmV^}BEhiMMc4N5hrg3cM-hHi{`sm|5^q~DIyj5oIPj=MZxuuV7ORiJC zeX6-5DK$0KOggaJsoy=`)*SovQb!9CyWAl1U$k1kc6ha!eWbOc@zTD1`{udy(xaP_ zU46qYU3s*>ZgZ?zb5XedhHHRJ2afgAImf=!$Di4yd!ERlAw9}Yq_RT_&=;Vq%=`#BBvK?^SBhRV9%^Nf|51bm~&=X!-&@_>AYxIjRjcuU) z`K3?CFtEHw;+cPsQSX@89!aJ0>=IdytSRpac6(|n;>d>Mv2UFTd(F+VUTIGW&DL;Tgh`jH_n_v(U>{mJPX z6wkI$Zp%4BRwgEy58~At=BrdbL0tNa>Xi, 1997, 1998, 1999, 2000. -# Yuri Kozlov , 2009, 2010. +# Yuri Kozlov , 2009, 2010, 2013. msgid "" msgstr "" -"Project-Id-Version: findutils 4.5.7\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2010-04-06 20:13+0400\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-09-26 10:36+0400\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" +"X-Generator: Lokalize 1.4\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Не удалось сохранить рабочий каталог для выполнения команды над %s" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Не удалось закрыть стандартный поток ввода" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Не удалось изменить каталог" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "не удалось создать процесс" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "ошибка ожидания %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s прерван по сигналу %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" msgstr "Не удалось выполнить инициализацию хэш-таблицы на основе общего файла" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "не прошла общая проверка на ошибки в библиотечной функции fnmatch()." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "не удалось выполнить stat для текущего каталога" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "Не удалось прочитать список смонтированных устройств." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "ПРЕДУПРЕЖДЕНИЕ: файловая система %s недавно была отмонтирована." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "ПРЕДУПРЕЖДЕНИЕ: файловая система %s недавно была cмонтирована." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -55,7 +91,7 @@ msgstr "" "%s%s изменилось во время выполнения %s (старый номер устройства %ld, новый " "номер устройства %ld, тип файловой системы %s) [ссылка %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -64,17 +100,17 @@ msgstr "" "%s%s изменилось во время выполнения %s (старый номер inode %, новый " "номер %, тип файловой системы %s) [ссылка %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "не удалось вернуться в родительский каталог" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Не удалось безопасно перейти в каталог %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -83,7 +119,7 @@ msgstr "" "Символическая ссылка %s зацикливает дерево каталогов; мы уже были в " "каталоге, на который она указывает." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -101,12 +137,12 @@ msgstr[2] "" "Обнаружено зацикливание в файловой системе; %s имеет тот же номер устройства " "и inode что и каталог, который на %d уровней выше в дереве каталогов" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "предупреждение: нет перехода по символической ссылке %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -118,15 +154,15 @@ msgstr "" "ПРЕДУПРЕЖДЕНИЕ: Неверное значение счётчика ссылок для %s (st_nlink=" "%, но мы уже обошли % подкаталогов): это может указывать " "на ошибку в драйвере файловой системы. Выполняется автоматическое включение " -"ключа -noleaf для find. Предыдущие результаты могут не учитывать каталоги, " -"которые должны быть пройдены при поиске." +"параметра -noleaf для find. Предыдущие результаты могут не учитывать " +"каталоги, которые должны быть пройдены при поиске." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "Не удалось прочитать список смонтированных файловых систем" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "неизвестный" @@ -138,7 +174,7 @@ msgstr "" "Обнаружено зацикливание в файловой системе; %s является частью той же петли " "файловой системы что и %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "ПРЕДУПРЕЖДЕНИЕ: файл %s имеет права доступа 0000" @@ -148,13 +184,18 @@ msgstr "ПРЕДУПРЕЖДЕНИЕ: файл %s имеет права дост msgid "cannot search %s" msgstr "не удалось найти %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "не удалось восстановить рабочий каталог после поиска %s" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Не удалось выполнить инициализацию хэш-таблицы на основе общего файла" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " @@ -162,9 +203,9 @@ msgid "" msgstr "" "Действие -delete автоматически включает -depth, а -prune ничего не делает " "при наличии -depth. Если вы всё равно хотите выполнить это, то явно укажите " -"ключ -depth." +"параметр -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -172,20 +213,20 @@ msgid "" "as those specified after it). Please specify options before other " "arguments.\n" msgstr "" -"предупреждение: вы указали ключ %s после аргумента без ключа %s, а ключи не " -"являются позиционными (%s влияет на тесты указанные как перед ним, так и " -"после него). Указывайте ключи перед другими аргументами.\n" +"предупреждение: вы указали параметр %s после аргумента без параметра %s, а " +"параметры не являются позиционными (%s влияет на тесты указанные как перед " +"ним, так и после него). Указывайте параметры перед другими аргументами.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -"предупреждение: не рекомендуется использовать ключ -d; вместо него " +"предупреждение: не рекомендуется использовать параметр -d; вместо него " "используйте -depth, так как он есть в составе POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -194,17 +235,17 @@ msgstr "" "%s не является именем существующей группы и не похоже на числовой ID группы, " "так как имеет неожидаемый суффикс %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s не является именем существующей группы" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "пустой аргумент у -group, а должно быть имя группы" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -213,9 +254,9 @@ msgstr "" "\n" "путём по умолчанию является текущий подкаталог; выражение по умолчанию: -" "print\n" -"выражение может состоять из операторов, ключей, тестов и действий:\n" +"выражение может состоять из операторов, параметров, тестов и действий:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -227,7 +268,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -235,13 +276,13 @@ msgid "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -"позиционные ключи (всегда): -daystart -follow -regextype\n" +"позиционные параметры (всегда): -daystart -follow -regextype\n" "\n" -"обычные ключи (всегда указываются раньше остальных выражений):\n" +"обычные параметры (всегда указываются раньше остальных выражений):\n" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -255,23 +296,23 @@ msgstr "" "ШАБЛОН\n" " -links N -lname ШАБЛОН -mmin N -mtime N -name ШАБЛОН -newer ФАЙЛ" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path ШАБЛОН -perm [+-]РЕЖИМ -regex ШАБЛОН\n" +" -nouser -nogroup -path ШАБЛОН -perm [-/]РЕЖИМ -regex ШАБЛОН\n" " -readable -writable -executable\n" " -wholename ШАБЛОН -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user ИМЯ -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context КОНТЕКСТ\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -285,7 +326,7 @@ msgstr "" " -exec КОМАНДА ; -exec КОМАНДА {} + -ok КОМАНДА ;\n" " -execdir КОМАНДА ; -execdir КОМАНДА {} + -okdir КОМАНДА ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -296,12 +337,12 @@ msgstr "" "к веб,\n" "пишите на адрес ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "не прошла общая проверка на ошибки в библиотечной функции fnmatch()." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -311,53 +352,48 @@ msgid "" "use 'find ... -print0 | grep -FzZ %s'." msgstr "" "предупреждение: в именах файлов в Unix, обычно, не содержится символ косой " -"черты (хотя он есть в именах путей). Это означает, что '%s %s', вероятно, " -"будет равно false всегда на этой системе. Вам может пригодиться тест '-" -"wholename', или, возможно, '-samefile'. Или же, если вы используете GNU " -"grep, то можете выполнять так: 'find ... -print0 | grep -FzZ %s'." +"черты (хотя он есть в именах путей). Это означает, что «%s %s», вероятно, " +"будет равно false всегда на этой системе. Вам может пригодиться тест «-" +"wholename», или, возможно, «-samefile». Или же, если вы используете GNU " +"grep, то можете выполнять так: «find ... -print0 | grep -FzZ %s»." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "Для %s ожидалось целое положительное значение аргумента, а получен %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "Эта система не позволяет осуществлять поиск по дате создания файла." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "Для теста %s требуется аргумент" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Не удалось понять чем считать %s -- датой или временем" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Не удалось получить время создания файла %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" "предупреждение: -%s %s ни с чем не совпадёт, так как заканчивается на /." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Недопустимые права %s при включённом POSIXLY_CORRECT." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "неверные права %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -369,98 +405,113 @@ msgstr "" "хотя он используется для проверки отсутствия файлов, теперь он совпадает со " "всеми файлами." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "отсутствует аргумент у -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "неверный тип '%c' для -size" +msgstr "неверный тип «%c» для -size" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "неверный аргумент `%s%c' для -size" +msgstr "Неверный аргумент «%s%s» для -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -"У ключа -show-control-chars имеется единственный аргумент, который должен " -"быть 'literal' или 'safe'" +"У параметра -show-control-chars имеется единственный аргумент, который " +"должен быть «literal» или «safe»" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" -msgstr "неверный аргумент %s для -used" +msgstr "Неверный аргумент %s для -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "%s не является именем известного пользователя" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" -msgstr "Аргумент ключа -user не должен быть пустым" +msgstr "Аргумент параметра -user не должен быть пустым" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Включённые возможности: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "неправильный предикат -context: SELinux не включён." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Аргументы -type должны быть односимвольными" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Неизвестный аргумент у -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c не поддерживается, так как символические ссылки не поддерживаются " +"на платформе, на которой был скомпилирован find." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "предупреждение: нераспознанная экранирующая последовательность `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c не поддерживается, так как FIFO не поддерживаются на платформе, на " +"которой был скомпилирован find." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "ошибка: указано %s в конце строки формата" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c не поддерживается, так как именованные сокеты не поддерживаются на " +"платформе, на которой был скомпилирован find." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "предупреждение: нераспознанный формат директивы '%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c не поддерживается, так как Solaris doors не поддерживаются на " +"платформе, на которой был скомпилирован find." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" -"ошибка: формат директивы `%%%c' зарезервирован для будущего использования" +msgid "Unknown argument to -type: %c" +msgstr "Неизвестный аргумент у -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Текущий каталог включён в переменную окружения PATH, что является " "небезопасным при использовании действия %s у find. Удалите текущий каталог " -"из $PATH (т.е., удалите \".\" или начальные или конечные двоеточия)" +"из $PATH (т.е., удалите «.» или начальные или конечные двоеточия)." -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -470,7 +521,7 @@ msgstr "" "Относительный путь %s включён в переменную окружения PATH, что является " "небезопасным при использовании действия %s у find. Удалите эту часть из $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -479,247 +530,257 @@ msgstr "" "Нельзя использовать {} при указании имени утилиты в -execdir и -okdir, так " "как это вызывает проблемы с безопасностью." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Только один экземпляр {} поддерживается с -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "В %s значение %s должно появляться как есть, но вы указали %s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Окружение слишком велико для exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" "арифметическое переполнение при преобразовании %s дней в количество секунд" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "арифметическое переполнение при вычислении конца сегодняшнего дня" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "стандартный поток ошибок" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "стандартный поток вывода" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "не удалось удалить %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "не удалось восстановить рабочий каталог после поиска %s" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "getfilecon завершилась неудачно: %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "ПРЕДУПРЕЖДЕНИЕ: не удалось определить время создания файла %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Не удалось осуществить запись в стандартный поток вывода" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Не удалось закрыть стандартный поток вывода" +msgid "getfilecon failed: %s" +msgstr "getfilecon завершилась неудачно: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Не удалось изменить каталог" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "не удалось создать процесс" +msgid "warning: unrecognized escape `\\%c'" +msgstr "предупреждение: нераспознанная экранирующая последовательность «\\%c»" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "ошибка ожидания %s" +msgid "error: %s at end of format string" +msgstr "ошибка: указано %s в конце строки формата" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s прерван по сигналу %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" +"ошибка: формат директивы «%%%c» зарезервирован для будущего использования" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" +"предупреждение: формат директивы «%%%c» должен следовать за другим символом" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "предупреждение: нераспознанный формат директивы «%%%c»" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "неверное выражение" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -"неверное выражение; вы указали бинарный оператор '%s' без операнда перед ним." +"неверное выражение; вы указали бинарный оператор «%s» без операнда перед ним." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "ожидается выражение между '%s' и ')'" +msgstr "ожидается выражение между «%s» и «)»" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" -msgstr "ожидается выражение после '%s'" +msgstr "ожидается выражение после «%s»" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" -msgstr "неверное выражение; слишком много ')'" +msgstr "неверное выражение; слишком много «)»" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -"неверное выражение; ожидается ')', но её нет. Возможно нужен дополнительный " -"предикат после '%s'" +"неверное выражение; ожидается «)», но её нет. Возможно нужен дополнительный " +"предикат после «%s»" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "неверное выражение; пустые круглые скобки запрещены." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." -msgstr "неверное выражение; ожидалось где-то найти ')', но её нет." +msgstr "неверное выражение; ожидалось где-то найти «)», но её нет." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" -msgstr "оопс -- неверный тип выражения!" +msgstr "эхтыж — неверный тип выражения!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "оопс -- неверный тип выражения (%d)!" +msgstr "эхтыж — неверный тип выражения (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"предупреждение: нет записи в таблице стоимости вычислений предиката для " +"предиката %s; сообщите об этой ошибке" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "пути должны быть перед выражением: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" -msgstr "неизвестный предикат `%s'" +msgstr "неизвестный предикат «%s»" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" -msgstr "неверный предикат `%s'" +msgstr "неверный предикат «%s»" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" -msgstr "неверный аргумент `%s' у `%s'" +msgstr "неверный аргумент «%s» у «%s»" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" -msgstr "отсутствует аргумент у `%s'" +msgstr "отсутствует аргумент у «%s»" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "слишком много ')'" +msgstr "слишком много «)»" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" -msgstr "неожидаемый дополнительный предикат `%s'" +msgstr "неожидаемый дополнительный предикат «%s»" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "неожидаемый дополнительный предикат" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" -msgstr "оопс -- неверная вставка по умолчанию оператора 'И' (and)" +msgstr "эхтыж — неверная вставка по умолчанию оператора «И» (and)" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Использование: %s [-H] [-L] [-P] [-Oуровень] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" -msgstr "] [путь...] [выражение]\n" +msgstr "] [путь…] [выражение]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "не удалось вернуться в родительский каталог" +msgstr "не удалось сохранить начальный рабочий каталог" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "не удалось вернуться в родительский каталог" +msgstr "не удалось восстановить начальный рабочий каталог" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Игнорируется нераспознанный флаг отладки %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." -msgstr "Пустой аргумент у ключа -D." +msgstr "Пустой аргумент у параметра -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "За ключом -O должно быть сразу указано десятичное целое число" +msgstr "За параметром -O должно быть сразу указано десятичное целое число" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Укажите десятичное целое число сразу после -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Неверный уровень оптимизации %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -728,7 +789,7 @@ msgstr "" "Уровень оптимизации %lu слишком большой. Если вы хотите искать файлы очень " "быстро, попробуйте воспользоваться GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -737,145 +798,462 @@ msgstr "" "Переменная окружения FIND_BLOCK_SIZE не поддерживается, на размер блока " "влияет только переменная окружения POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "неверный аргумент «%s» у «%s»" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "неверный аргумент «%s» у «%s»" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "Неверный аргумент %s для -used" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "ошибка записи" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "Для теста %s требуется аргумент" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "предупреждение: нераспознанная экранирующая последовательность «\\%c»" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: неверное число для параметра -%c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "Для теста %s требуется аргумент" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "не удалось восстановить начальный рабочий каталог" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "не удалось восстановить начальный рабочий каталог" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "неверный аргумент «%s» у «%s»" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "неверный аргумент «%s» у «%s»" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "список аргументов слишком велик" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "команда слишком велика" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "не удалось вызвать exec() из-за ограничений на размер аргументов" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" -msgstr "аргумент по размеру выходит за пределы списка аргументов" +msgstr "" +"невозможно вместить одиночный аргумент из-за ограничения на размер списка " +"аргументов" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "список аргументов слишком велик" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" "Значение переменной окружения %s не равно допустимому десятичному числу" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Файловой дескриптор %d приведёт к утечке; сообщите об этой ошибке, не " +"забудьте включить подробное описание простейшего способа воспроизведения " +"этой проблемы." + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Эрик Б. Декер (Eric B. Decker)" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "Джеймс Янгмен (James Youngman)" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Кэвин Дэлли (Kevin Dalley)" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Не удалось осуществить запись в стандартный поток вывода" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Собрана с использованием GNU gnulib версии %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Неизвестный тип регулярного выражения %s; допустимые типы: %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "Неожидаемый суффикс %s в %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" msgstr "Ожидается целое: %s" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Неизвестный тип регулярного выражения %s; допустимые типы: %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" msgstr "" "Использование: %s [--version | --help]\n" -"или %s most_common_bigrams < список > бд-locate\n" +"или %s most_common_bigrams < список-файлов > бд-locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" "\n" -"Посылайте отчёты об ошибках на .\n" +"Отправляйте сообщения об ошибках на .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "ошибка записи" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Использование: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" "Вам нужно указать уровень безопасности в виде десятичного целого числа." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Уровень безопасности %s лежит за пределам допустимых значений." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "Уровень безопасности %s содержит неожидаемый суффикс %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "Для slocate уровень безопасности %ld не поддерживается." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Не удалось осуществить запись в стандартный поток вывода" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "дней" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "Аргумент ключа --max-database-age не должен быть пустым" +msgstr "Аргумент параметра --max-database-age не должен быть пустым" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" -msgstr "Неверный аргумент %s для ключа --max-database-age" +msgstr "Неверный аргумент %s для параметра --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "База данных locate %s содержит имя файла длиннее, чем locate может " "обрабатывать" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "База данных locate %s повреждена или неверна" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" @@ -883,17 +1261,17 @@ msgstr[0] "Размер базы данных locate: %s байт\n" msgstr[1] "Размер базы данных locate: %s байта\n" msgstr[2] "Размер базы данных locate: %s байт\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Подходящие имена файлов: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Все имена файлов: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -910,7 +1288,7 @@ msgstr "" "\t%s содержат символы новой строки, \n" "\tи %s содержат символы с установленным старшим битом.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -919,17 +1297,17 @@ msgstr "" "Некоторые имена файлов были отфильтрованы, поэтому не получилось посчитать " "степень сжатия.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" -msgstr "Степень сжатия %4.2f%% (больше -- лучше)\n" +msgstr "Степень сжатия %4.2f%% (больше — лучше)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Степень сжатия не определена\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -939,7 +1317,7 @@ msgstr "" "уровень безопасности %c, который в данный момент GNU findutils не " "поддерживает" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -948,7 +1326,7 @@ msgstr "" "%s является базой данных slocate. Поддержка этого типа введена недавно, пока " "возникают проблемы." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -956,48 +1334,48 @@ msgstr "" "%s является базой данных slocate с неподдерживаемым уровнем безопасности%d; " "пропускаем." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" -"Вы указали ключ -E, но он не может быть использован с базами данных в " +"Вы указали параметр -E, но он не может быть использован с базами данных в " "slocate-формате с ненулевым уровнем безопасности. По этой базе не будут " "выданы результаты.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "%s является базой данных slocate. Используем ключ '-e'." +msgstr "%s является базой данных slocate. Используем параметр «-e»." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "База данных %s в старом формате имеет слишком маленький размер, чтобы быть " "работоспособной" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "База данных %s имеет формат %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "В базе данных используется прямой порядок байт.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "В базе данных используется обратный порядок байт.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Непонятно какой порядок байт используется в базы данных.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1016,64 +1394,64 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " шаблон...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "не удалось понизить групповые права" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "не удалось понизить setuid права" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Не удалось до конца понизить права" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "не удалось понизить setgid права" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "предупреждение: база данных locate может быть прочитана со стандартного " "потока ввода только один раз." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "не удалось получить системное время" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "предупреждение: база данных %s устарела более чем на %d %s (сейчас ей %.1f " "%s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "ПРЕДУПРЕЖДЕНИЕ: база данных locate %s создана с другим порядком байт" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "неожидаемый EOF в %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "ошибка чтения слова с %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" "Неверная экранирующая последовательность %s в спецификации входного " "разделителя." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1082,7 +1460,7 @@ msgstr "" "Неверная экранирующая последовательность %s в спецификации входного " "разделителя; символьные значения не должны превышать %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1091,7 +1469,7 @@ msgstr "" "Неверная экранирующая последовательность %s в спецификации входного " "разделителя; символьные значения не должны превышать %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1100,7 +1478,7 @@ msgstr "" "Неверная экранирующая последовательность %s в спецификации входного " "разделителя; не распознаны символы %s в конце." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1109,44 +1487,60 @@ msgstr "" "Неверная спецификация входного разделителя %s; разделитель должен быть, или " "одиночным символом, или экранирующей последовательностью, начинающейся с \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "окружение слишком велико для исполнения" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -"предупреждение: значение %ld для ключа -s слишком большое; вместо него будет " -"использовано %ld" +"предупреждение: значение %ld для параметра -s слишком большое; вместо него " +"будет использовано %ld" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 #, c-format -msgid "Cannot set SIGUSR1 signal handler" +msgid "option --%s may not be set to a value which includes `='" +msgstr "параметр --%s не может иметь значение, которое содержит «=»" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "не удалось удалить переменную окружения %s" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" msgstr "" +"предупреждение: параметр -E не действует, если используется -0 или -d.\n" -#: xargs/xargs.c:635 +#: xargs/xargs.c:654 +#, c-format +msgid "Cannot set SIGUSR1 signal handler" +msgstr "Невозможно задать обработчик сигнала SIGUSR1" + +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Невозможно задать обработчик сигнала SIGUSR2" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Не удалось открыть входной файл %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "Ваши переменные окружения занимают % байт\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "Верхняя граница аргумента длины по POSIX (эта система): %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1155,18 +1549,18 @@ msgstr "" "Самое маленькое разрешённое значение верхней границы аргумента длины по " "POSIX (все системы): %\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "" "Максимальная длина команды, которую мы можем использовать: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Размер буфера команды, который мы используем: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1179,7 +1573,7 @@ msgstr "" "входной поток и запустить команды; если это не то, что вы хотите, нажмите " "клавиатурную комбинацию, обозначающую конец файла.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1188,128 +1582,431 @@ msgstr "" "Предупреждение: %s будет выполнена, по крайней мере, один раз. Если это не " "то, что вы хотите, нажмите клавиатурную комбинацию прерывания.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" "непарные кавычки %s; по умолчанию, кавычки являются спецсимволами для xargs, " -"если вы не указали ключ -0" +"если вы не указали параметр -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "двойная" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "одинарная" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" "ПРЕДУПРЕЖДЕНИЕ: из входного потока получен символ NUL. Его невозможно " -"передать в списке аргументов. Может стоит указать ключ --null?" +"передать в списке аргументов. Может стоит указать параметр --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "строка аргументов слишком велика" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Не удалось осуществить запись в стандартный поток вывода" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "не удалось открыть /dev/tty на чтение" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Не удалось осуществить запись в стандартный поток вывода" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "не удалось выделить память" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "не удалось задать переменную окружения %s" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "не удалось создать канал перед fork" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -"чтение errno-buffer завершилось неудачно в xargs_do_exec (вероятно ошибка, " -"сообщите)" +"выполнение safe_read для errno-buffer завершилось неудачно в xargs_do_exec " +"(вероятно ошибка, сообщите об этом)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" "операция чтения вернула неожидаемое значение %d; вероятно ошибка, сообщите" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "ошибка при ожидании дочернего процесса" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "ПРЕДУПРЕЖДЕНИЕ: сбой слежения за %d дочерними процессами" +msgid "WARNING: Lost track of %lu child processes" +msgstr "ПРЕДУПРЕЖДЕНИЕ: сбой слежения за %lu дочерними процессами" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: завершен со статусом 255; прерываюсь" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: остановлен по сигналу %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: завершен по сигналу %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" -msgstr "%s: неверное число для опции -%c\n" +msgstr "%s: неверное число для параметра -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" -msgstr "%s: значение для ключа -%c должно быть >= %ld\n" +msgstr "%s: значение для параметра -%c должно быть >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" -msgstr "%s: значение для ключа -%c должно быть < %ld\n" - -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Использование: %s [-0prtx] [--interactive] [--null] [-d|--" -"delimiter=разделитель]\n" -" [-E строка-eof] [-e[строка-eof]] [--eof[=строка-eof]]\n" -" [-L макс-колво-строк] [-l[макс-колво-строк]] [--max-lines[=макс-колво-" -"строк]]\n" -" [-I строка-замены] [-i[строка-замены]] [--replace[=строка-замены]]\n" -" [-n макс-колво-аргументов] [--max-args=макс-колво-аргументов]\n" -" [-s макс-колво-символов] [--max-chars=макс-колво-символов]\n" -" [-P макс-колво-процессов] [--max-procs=макс-колво-процессов] [--show-" -"limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=файл]\n" -" [--version] [--help] [команда [начальные-аргументы]]\n" +msgstr "%s: значение для параметра -%c должно быть < %ld\n" + +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Использование: %s [ПАРАМЕТР]… КОМАНДА [НАЧАЛЬНЫЕ-АРГУМЕНТЫ]…\n" + +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Выполняет КОМАНДУ с аргументами НАЧАЛЬНЫЕ-АРГУМЕНТЫ и дополнительными\n" +"аргументами, прочитанными из стандартного ввода.\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Обязательность или необязательность аргументов для длинного параметра\n" +"аналогична и для соответствующего короткого параметра.\n" + +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null Элементы разделяются null, а не пробельным\n" +" символом. Отключается обработка кавычек,\n" +" обратной косой черты и логического EOF\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=ФАЙЛ Читать аргументы из ФАЙЛа, а не\n" +"   стандартного ввода\n" + +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=СИМВОЛ Входные элементы разделяются СИМВОЛом, а не\n" +" пробельным символом. Отключается обработка\n" +" кавычек, обратной косой черты и логического " +"EOF\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E END Задаёт логический EOF строки. Если в входных\n" +" данных встречается END в виде строки, то\n" +" оставшиеся входные данные игнорируются\n" +" (игнорируются, если указан -0 или -d)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e [END], --eof[=END] Эквивалентно -E END, если указан END.\n" +" Иначе, строка конец-файла отсутствует\n" + +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R тоже, что и --replace=R\n" + +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i,--replace=[R] Заменить R в НАЧАЛЬНЫХ-АРГУМЕНТАХ именами,\n" +" прочитанными из стандартного ввода. Если R " +"не\n" +" не указан, то предполагается {}\n" + +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L,-l, --max-lines=MAX-LINES Использовать не более MAX-LINES непробельных\n" +" входных строк на командную строку\n" + +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[MAX-LINES] Подобен -L, но по умолчанию используется\n" +" не более одной непробельной входной строки\n" +" на командную строку, если не указан MAX-" +"LINES\n" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=MAX-ARGS Использовать не более MAX-ARGS аргументов на\n" +" на командую строку\n" + +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=MAX-PROCS Выполнять до MAX-PROCS процессов " +"одновременно\n" + +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive Спрашивать перед выполнением команд\n" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=VAR Добавлять переменную окружения VAR в\n" +" процессы-потомки\n" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty Если аргументы не указаны, то КОМАНДУ не\n" +" выполнять. Если не указан этот параметр, то\n" +" КОМАНДА будет выполнена не менее одного " +"раза.\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=MAX-CHARS Ограничить длину командной строки до MAX-" +"CHARS\n" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits Показать ограничения на длину командной " +"строки\n" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr " -t, --verbose Выводить команды перед их выполнением\n" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr " -x, --exit Выйти, если превышен размер (см. -s)\n" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help Показать эту справку и выйти\n" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version Показать номер версии и выйти\n" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Недопустимые права %s при включённом POSIXLY_CORRECT." + +#~ msgid "" +#~ "\n" +#~ "Mandatory arguments to long options are mandatory for short options too.\n" +#~ "Non-mandatory arguments are indicated by [square brackets]\n" +#~ " -0, --null Items are separated by a null, not " +#~ "whitespace.\n" +#~ " Disables quote and backslash processing\n" +#~ " -a, --arg-file=FILE Read arguments from FILE, not standard " +#~ "input\n" +#~ " -d, --delimiter=CHARACTER Input items are separated by CHARACTER, " +#~ "not by\n" +#~ " blank space. Disables quote and backslash\n" +#~ " processing\n" +#~ " -E END If END occurs as a line of input, the rest " +#~ "of\n" +#~ " the input is ignored.\n" +#~ " -e [END], --eof[=END] Equivalent to -E END if END is specified.\n" +#~ " Otherwise, there is no end-of-file string\n" +#~ " --help Print a summary of the options to xargs.\n" +#~ " -I R same as --replace=R (R must be specified)\n" +#~ " -i,--replace=[R] Replace R in initial arguments with names\n" +#~ " read from standard input. If R is\n" +#~ " unspecified, assume {}\n" +#~ " -L,-l, --max-lines=MAX-LINES Use at most MAX-LINES nonblank input lines " +#~ "per\n" +#~ " command line\n" +#~ " -l Use at most one nonblank input line per\n" +#~ " command line\n" +#~ " -n, --max-args=MAX-ARGS Use at most MAX-ARGS arguments per " +#~ "command\n" +#~ " line\n" +#~ " -P, --max-procs=MAX-PROCS Run up to max-procs processes at a time\n" +#~ " -p, --interactive Prompt before running commands\n" +#~ " --process-slot-var=VAR Set environment variable VAR in child\n" +#~ " processes\n" +#~ " -r, --no-run-if-empty If there are no arguments, run no " +#~ "command.\n" +#~ " If this option is not given, COMMAND will " +#~ "be\n" +#~ " run at least once.\n" +#~ " -s, --max-chars=MAX-CHARS Limit commands to MAX-CHARS at most\n" +#~ " --show-limits Show limits on command-line length.\n" +#~ " -t, --verbose Print commands before executing them\n" +#~ " --version Print the version number\n" +#~ " -x, --exit Exit if the size (see -s) is exceeded\n" +#~ msgstr "" +#~ "\n" +#~ "Обязательные аргументы длинных параметров обязательны и для коротких.\n" +#~ "Необязательные аргументы [заключены в квадратные скобки]\n" +#~ " -0, --null Элементы разделяются null, а не " +#~ "пробельным\n" +#~ " символом. Отключается обработка кавычек\n" +#~ " и обратной косой черты\n" +#~ " -a, --arg-file=ФАЙЛ Читать аргументы из ФАЙЛа, а не\n" +#~ "   стандартного ввода\n" +#~ " -d, --delimiter=СИМВОЛ Входные элементы разделяются СИМВОЛОМ, а " +#~ "не\n" +#~ " пробельным символом. Отключается " +#~ "обработка\n" +#~ " кавычек и обратной косой черты\n" +#~ " -E END Если в строки встречается END, то " +#~ "оставшиеся\n" +#~ " входные данные игнорируются.\n" +#~ " -e [END], --eof[=END] Эквивалентно -E END, если указан END.\n" +#~ " Иначе, строка конец-файла отсутствует\n" +#~ " --help Показать список параметров xargs.\n" +#~ " -I R тоже, что и --replace=R (R должно быть " +#~ "задано)\n" +#~ " -i,--replace=[R] Заменить R в начальных аргументах " +#~ "именами,\n" +#~ " прочитанными из стандартного ввода. Если R " +#~ "не\n" +#~ " не указан, то предполагается {}\n" +#~ " -L,-l, --max-lines=MAX-LINES Использовать не более MAX-LINES " +#~ "непробельных\n" +#~ " входных строк на командную строку\n" +#~ " -l Использовать не более одной непробельной " +#~ "входной\n" +#~ " строки на командную строку\n" +#~ " -n, --max-args=MAX-ARGS Использовать не более MAX-ARGS аргументов " +#~ "на\n" +#~ " на командую строку\n" +#~ " -P, --max-procs=MAX-PROCS Выполнять до MAX-PROCS процессов " +#~ "одновременно\n" +#~ " -p, --interactive Спрашивать перед выполнением команд\n" +#~ " --process-slot-var=VAR Добавить переменную окружения VAR в\n" +#~ " процессы-потомки\n" +#~ " -r, --no-run-if-empty Если аргументы не указаны, то команду не\n" +#~ " выполнять. Если не указан этот параметр, " +#~ "то КОМАНДА\n" +#~ " будет выполнена не менее одного раза.\n" +#~ " -s, --max-chars=MAX-CHARS Ограничить команды до MAX-CHARS\n" +#~ " --show-limits Показать ограничения длины командной " +#~ "строки.\n" +#~ " -t, --verbose Выводить команды перед их выполнением\n" +#~ " --version Показать номер версии\n" +#~ " -x, --exit Выйти, если превышен размер (см. -s)\n" #~ msgid "cannot get current directory" #~ msgstr "не удалось получить текущий каталог" + +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Собрана с использованием GNU gnulib версии %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Использование: %s [-0prtx] [--interactive] [--null] [-d|--" +#~ "delimiter=разделитель]\n" +#~ " [-E строка-eof] [-e[строка-eof]] [--eof[=строка-eof]]\n" +#~ " [-L макс-колво-строк] [-l[макс-колво-строк]] [--max-lines[=макс-" +#~ "колво-строк]]\n" +#~ " [-I строка-замены] [-i[строка-замены]] [--replace[=строка-" +#~ "замены]]\n" +#~ " [-n макс-колво-аргументов] [--max-args=макс-колво-аргументов]\n" +#~ " [-s макс-колво-символов] [--max-chars=макс-колво-символов]\n" +#~ " [-P макс-колво-процессов] [--max-procs=макс-колво-процессов] [--" +#~ "show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=файл]\n" +#~ " [--version] [--help] [команда [начальные-аргументы]]\n" diff --git a/po/rw.gmo b/po/rw.gmo index 926e810da7471f4e65dc194e1ac75aff1338dcce..c5f373475ff6c754dcff07206acb3c00c26283a3 100644 GIT binary patch delta 170 zcmZo;nZ;6nPl#nI0}!wPu?!H~05K~N#{e-16aXr% C4-(t} diff --git a/po/rw.po b/po/rw.po index e08fc10..7207399 100644 --- a/po/rw.po +++ b/po/rw.po @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.2.6\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2005-04-04 10:55-0700\n" "Last-Translator: Steven Michael Murphy \n" "Language-Team: Kinyarwanda \n" @@ -25,32 +25,68 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Kubona KIGEZWEHO bushyinguro" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "" + +#: find/exec.c:285 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to change directory" msgstr "" -#: find/find.c:205 +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "" + +#: find/exec.c:343 +#, fuzzy, c-format +msgid "error waiting for %s" +msgstr "Ikosa Tegereza kugirango" + +#: find/exec.c:352 +#, fuzzy, c-format +msgid "%s terminated by signal %d" +msgstr "%sku" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "Kugenzura... Bya i Isomero Umumaro Byanze" + +#: find/find.c:263 #, fuzzy, c-format msgid "cannot stat current directory" msgstr "Kubona KIGEZWEHO bushyinguro" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "" -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "" -#: find/find.c:491 +#: find/find.c:550 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -59,7 +95,7 @@ msgstr "" "%s%sByahinduwe Bya ki/ bishaje APAREYE Umubare Gishya APAREYE Umubare Ubwoko " "ni indango" -#: find/find.c:528 +#: find/find.c:587 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -67,24 +103,24 @@ msgid "" msgstr "" "%s%sByahinduwe Bya ki/ bishaje Umubare Gishya Umubare Ubwoko ni indango" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "Kubona KIGEZWEHO bushyinguro" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -95,12 +131,12 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -110,12 +146,12 @@ msgid "" "searched." msgstr "" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "itazwi" @@ -125,7 +161,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -135,12 +171,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "Kubona KIGEZWEHO bushyinguro" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -148,7 +189,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, fuzzy, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -159,31 +200,31 @@ msgstr "" "Iburira i Ihitamo Nyuma a Ihitamo Amahitamo OYA Mbere Nka Nka Nyuma " "Amahitamo Mbere Ikindi ingingo" -#: find/parser.c:914 +#: find/parser.c:906 #, fuzzy, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "Iburira i D Ihitamo ni Bitemewe. Gukoresha Ubujyakuzimu i ni a" -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 #, fuzzy msgid "" "\n" @@ -193,7 +234,7 @@ msgstr "" "Mburabuzi Inzira ni i KIGEZWEHO bushyinguro Mburabuzi imvugo ni Gicurasi Bya " "Mukoresha Na ni Oya Ibindi OYA a Na" -#: find/parser.c:1230 +#: find/parser.c:1225 #, fuzzy msgid "" "operators (decreasing precedence; -and is implicit where no others are " @@ -204,7 +245,7 @@ msgstr "" "Mburabuzi Inzira ni i KIGEZWEHO bushyinguro Mburabuzi imvugo ni Gicurasi Bya " "Mukoresha Na ni Oya Ibindi OYA a Na" -#: find/parser.c:1234 +#: find/parser.c:1229 #, fuzzy msgid "" "positional options (always true): -daystart -follow -regextype\n" @@ -216,7 +257,7 @@ msgstr "" "o Cyangwa Amahitamo Buri gihe NIBYO Amahitamo Buri gihe NIBYO Mbere Ikindi " "Ifashayobora Verisiyo Cyangwa Cyangwa" -#: find/parser.c:1239 +#: find/parser.c:1234 #, fuzzy msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" @@ -226,20 +267,20 @@ msgid "" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "-ubusa SIBYO Itsinda amahuza Izina:" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "-Inzira Ingano NIBYO Ubwoko UID Ukoresha:" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -248,7 +289,7 @@ msgid "" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" -#: find/parser.c:1257 +#: find/parser.c:1252 #, fuzzy msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" @@ -256,12 +297,12 @@ msgid "" "email to ." msgstr "org." -#: find/parser.c:1312 +#: find/parser.c:1307 #, fuzzy, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "Kugenzura... Bya i Isomero Umumaro Byanze" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -271,47 +312,42 @@ msgid "" "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s:Ihitamo" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, fuzzy, c-format msgid "invalid mode %s" msgstr "Sibyo Ubwoko" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -319,92 +355,100 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" -#: find/parser.c:2274 +#: find/parser.c:2210 #, fuzzy, c-format msgid "invalid null argument to -size" msgstr "Sibyo NTAGIHARI Kuri Ingano" -#: find/parser.c:2324 +#: find/parser.c:2260 #, fuzzy, c-format msgid "invalid -size type `%c'" msgstr "Sibyo Ingano Ubwoko" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "Sibyo Kuri" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "Sibyo kugirango" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 -#, fuzzy, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "Iburira" +#: find/parser.c:2820 +#, c-format +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 -#, fuzzy, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "Iburira Imiterere" +#: find/parser.c:2842 +#, c-format +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -412,416 +456,738 @@ msgid "" "entry from $PATH" msgstr "" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, fuzzy, c-format msgid "The environment is too large for exec()." msgstr "ni Binini kugirango" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 +#: find/pred.c:718 +#, c-format +msgid "WARNING: cannot determine birth time of file %s" +msgstr "" + +#: find/pred.c:782 #, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "Kubona KIGEZWEHO bushyinguro" +msgid "< %s ... %s > ? " +msgstr "<%s...%s>CYOSE" -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:784 +#, c-format +msgid "Failed to write prompt for -ok" +msgstr "" + +#: find/pred.c:1208 find/print.c:1234 #, c-format msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:1507 +#: find/print.c:346 #, c-format -msgid "WARNING: cannot determine birth time of file %s" +msgid "warning: escape `\\' followed by nothing at all" msgstr "" -#: find/pred.c:1571 +#: find/print.c:365 #, fuzzy, c-format -msgid "< %s ... %s > ? " -msgstr "<%s...%s>CYOSE" +msgid "warning: unrecognized escape `\\%c'" +msgstr "Iburira" -#: find/pred.c:2032 +#: find/print.c:385 #, c-format -msgid "Cannot close standard input" +msgid "error: %s at end of format string" msgstr "" -#: find/pred.c:2061 +#: find/print.c:409 #, c-format -msgid "Failed to change directory" +msgid "error: the format directive `%%%c' is reserved for future use" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:417 #, c-format -msgid "cannot fork" +msgid "" +"warning: format directive `%%%c' should be followed by another character" msgstr "" -#: find/pred.c:2123 +#: find/print.c:425 #, fuzzy, c-format -msgid "error waiting for %s" -msgstr "Ikosa Tegereza kugirango" - -#: find/pred.c:2132 -#, fuzzy, c-format -msgid "%s terminated by signal %d" -msgstr "%sku" +msgid "warning: unrecognized format directive `%%%c'" +msgstr "Iburira Imiterere" # sc/source\ui\src\namedlg.src:RID_SCDLG_NAMES.STR_INVALIDSYMBOL.text -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, fuzzy, c-format msgid "invalid expression" msgstr "Imvugo itariyo" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, fuzzy, c-format msgid "expected an expression after '%s'" msgstr "Birenga" # sc/source\ui\src\namedlg.src:RID_SCDLG_NAMES.STR_INVALIDSYMBOL.text -#: find/tree.c:161 +#: find/tree.c:166 #, fuzzy, c-format msgid "invalid expression; you have too many ')'" msgstr "Imvugo itariyo" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "" -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, fuzzy, c-format msgid "oops -- invalid expression type!" msgstr "Sibyo imvugo Ubwoko" -#: find/tree.c:276 +#: find/tree.c:281 #, fuzzy, c-format msgid "oops -- invalid expression type (%d)!" msgstr "Sibyo imvugo Ubwoko" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, fuzzy, c-format msgid "paths must precede expression: %s" msgstr "Inzira imvugo" -#: find/tree.c:1297 +#: find/tree.c:1303 #, fuzzy, c-format msgid "unknown predicate `%s'" msgstr "Sibyo" -#: find/tree.c:1317 +#: find/tree.c:1323 #, fuzzy, c-format msgid "invalid predicate `%s'" msgstr "Sibyo" -#: find/tree.c:1322 +#: find/tree.c:1328 #, fuzzy, c-format msgid "invalid argument `%s' to `%s'" msgstr "Sibyo Kuri" -#: find/tree.c:1330 +#: find/tree.c:1336 #, fuzzy, c-format msgid "missing argument to `%s'" msgstr "Ibuze Kuri" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "" -#: find/tree.c:1412 +#: find/tree.c:1418 #, fuzzy, c-format msgid "unexpected extra predicate '%s'" msgstr "Birenga" -#: find/tree.c:1414 +#: find/tree.c:1420 #, fuzzy, c-format msgid "unexpected extra predicate" msgstr "Birenga" -#: find/tree.c:1547 +#: find/tree.c:1553 #, fuzzy, c-format msgid "oops -- invalid default insertion of and!" msgstr "Sibyo Mburabuzi Iyinjizamo Bya Na" -#: find/util.c:171 +#: find/util.c:175 #, fuzzy, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "H Inzira imvugo" -#: find/util.c:173 +#: find/util.c:177 #, fuzzy, c-format msgid "] [path...] [expression]\n" msgstr "Inzira imvugo" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "Kubona KIGEZWEHO bushyinguro" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "Kubona KIGEZWEHO bushyinguro" -#: find/util.c:816 +#: find/util.c:824 #, fuzzy, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Iburira" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, fuzzy, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "IMPINDURAGACIRO ni OYA i i Funga Ingano ni i IMPINDURAGACIRO" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "Sibyo kugirango" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "kugirango" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "ingingo" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +#, fuzzy +msgid "Unknown system error" +msgstr "Sisitemu Ikosa" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s:Ihitamo ni" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s:Ihitamo Kwemerera" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s:Ihitamo Kwemerera" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s:Ihitamo" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s:Ihitamo" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s:Ihitamo" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s:Sibyo Ihitamo" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s:Ihitamo" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s:Ihitamo ni" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s:Ihitamo Kwemerera" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s:Ihitamo" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "Kubona KIGEZWEHO bushyinguro" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "Kubona KIGEZWEHO bushyinguro" + +# basctl/source\basicide\basidesh.src:RID_IMGBTN_REMOVEWATCH.text +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +#, fuzzy +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +#, fuzzy +msgid "memory exhausted" +msgstr "Kitaboneka Ububiko" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "Sibyo Kuri" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "Sibyo Kuri" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "Urutonde" + +#: lib/buildcmd.c:161 #, fuzzy, c-format msgid "command too long" msgstr "Komandi:" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "OYA UMWE muri Urutonde Ingano" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, fuzzy, c-format msgid "argument list too long" msgstr "Urutonde" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Verisiyo" +msgid "Failed to write output (at stage %d)" +msgstr "Kubona KIGEZWEHO bushyinguro" + +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "" -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "Birenga" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 +#: locate/code.c:131 #, fuzzy, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" msgstr "Verisiyo Ifashayobora Cyangwa IDOSIYE Urutonde" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 #, fuzzy msgid "" "\n" "Report bugs to .\n" msgstr "org." -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "iminsi" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, fuzzy, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Sibyo kugirango" -#: locate/locate.c:468 +#: locate/locate.c:459 #, fuzzy, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "Iburira Ububikoshingiro Inzira Kirimo a Nyobora ni OYA a Byemewe " "Ububikoshingiro Izina:" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, fuzzy, c-format msgid "locate database %s is corrupt or invalid" msgstr "Ububikoshingiro ni Cyangwa Sibyo" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "" msgstr[1] "" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -832,44 +1198,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -877,35 +1243,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, fuzzy, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "Ububikoshingiro ni Cyangwa Sibyo" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -917,138 +1283,153 @@ msgid "" " pattern...\n" msgstr "" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, fuzzy, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "Iburira Ububikoshingiro ni Birenzeho ki/ bishaje" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "Ikosa Tegereza kugirango" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, fuzzy, c-format msgid "environment is too large for exec" msgstr "ni Binini kugirango" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "Ibihinduka Hejuru" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "Ntoya Na Nkuru Imbibi ku Uburebure" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "Ntoya Na Nkuru Imbibi ku Uburebure" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Uburebure Bya Komandi: Twebwe Gukoresha" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Bya Komandi: Twebwe ikoresha" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1057,14 +1438,14 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, fuzzy, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1076,7 +1457,7 @@ msgstr "" # officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.UnderLine..2.text # #-#-#-#-# officecfg.pot (PACKAGE VERSION) #-#-#-#-# # officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.Strikeout..2.text -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 #, fuzzy msgid "double" msgstr "MAHARAKUBIRI" @@ -1085,171 +1466,265 @@ msgstr "MAHARAKUBIRI" # officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.UnderLine..1.text # #-#-#-#-# officecfg.pot (PACKAGE VERSION) #-#-#-#-# # officecfg/registry\schema\org\openoffice\Office\Common.xcs:....Font.Strikeout..1.text -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 #, fuzzy msgid "single" msgstr "UMWE" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, fuzzy, c-format msgid "argument line too long" msgstr "Umurongo" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Kubona KIGEZWEHO bushyinguro" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, fuzzy, c-format msgid "error waiting for child process" msgstr "Ikosa Tegereza kugirango" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, fuzzy, c-format msgid "%s: exited with status 255; aborting" msgstr "%s:Na: Imimerere" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, fuzzy, c-format msgid "%s: stopped by signal %d" msgstr "%s:Kyahagariswe ku" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, fuzzy, c-format msgid "%s: terminated by signal %d" msgstr "%s:ku" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, fuzzy, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s:Sibyo Umubare kugirango" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, fuzzy, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s:Agaciro kugirango Ihitamo" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, fuzzy, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s:Agaciro kugirango Ihitamo" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" msgstr "" -"E i Gusimbura L KININI Imirongo N KININI S KININI KININI NTAGIHARI Gusimbura " -"Gusimbura KININI Imirongo KININI Imirongo Biganira KININI KININI Gusohoka " -"KININI KININI KININI KININI Oya Gukoresha NIBA ubusa Verisiyo Ifashayobora " -"Komandi: ingingo" -#, fuzzy -#~ msgid "cannot get current directory" -#~ msgstr "Kubona KIGEZWEHO bushyinguro" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#, fuzzy -#~ msgid "invalid argument %s for %s" -#~ msgstr "Sibyo kugirango" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#, fuzzy -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "kugirango" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#, fuzzy -#~ msgid "Valid arguments are:" -#~ msgstr "ingingo" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#, fuzzy -#~ msgid "Unknown system error" -#~ msgstr "Sisitemu Ikosa" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s:Ihitamo ni" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s:Ihitamo Kwemerera" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s:Ihitamo Kwemerera" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s:Ihitamo" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s:Ihitamo" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s:Ihitamo" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s:Sibyo Ihitamo" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s:Ihitamo" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s:Ihitamo ni" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" #, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s:Ihitamo Kwemerera" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Verisiyo" -# basctl/source\basicide\basidesh.src:RID_IMGBTN_REMOVEWATCH.text #, fuzzy -#~ msgid "`" -#~ msgstr "`" +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "E i Gusimbura L KININI Imirongo N KININI S KININI KININI NTAGIHARI " +#~ "Gusimbura Gusimbura KININI Imirongo KININI Imirongo Biganira KININI " +#~ "KININI Gusohoka KININI KININI KININI KININI Oya Gukoresha NIBA ubusa " +#~ "Verisiyo Ifashayobora Komandi: ingingo" -#~ msgid "'" -#~ msgstr "'" +#, fuzzy +#~ msgid "cannot get current directory" +#~ msgstr "Kubona KIGEZWEHO bushyinguro" #~ msgid "Success" #~ msgstr "Ibyatunganye" @@ -1311,22 +1786,6 @@ msgstr "" #~ msgstr "Ibanjirije Ibisanzwe imvugo" #, fuzzy -#~ msgid "memory exhausted" -#~ msgstr "Kitaboneka Ububiko" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "Sibyo Kuri" - -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "Sibyo Kuri" - -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "Urutonde" - -#, fuzzy #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s:Ihitamo" diff --git a/po/sk.gmo b/po/sk.gmo index 2528ec5ec3c68df015d94877a82b870ceebb13df..f089520f6e06f9df468413db4b981e347f93edd3 100644 GIT binary patch delta 1574 zcmYM!e`wTo9LMqZwKeb5S#7rMZp(dFsoQeq>DqL&hJ@rorhk|jYwFkbO_$#Hw!52S z13eWHQDVudM35oXA0va{0x?$*XZ=wU6_nr~f;bibs1UM-)pj0DoRfnrIT7m{WD~?4lkDQK?y%>)`Sr}jLR^FllU}V!Y6SWYp}k| ztQMD}p4))UxEGn)Ch$@G1RKn;~zM{bHA{Q?1v0=vF)RH z4Yg46@nXbBP!WHQI@8N{{R#K^zSbPn5Vz(uGX^x#_Dg3Wja7vLq-ME{}Ax|$pIBDSI4f-%&5@8dN*kF$yR z0|r;pKf^=X$SrJS{7#mJ!@xW~6mb_0;u_q_56+=d9b@(}?8eve0xrb{($Ik$@FtEU zj~PcCWQ02$6wR%|RSMn;Wn~F9tMn=5DvPLG-e6+wQae(*R!~*AXTi;9^TCDE!g1|EB zhtzg&0Cl}olq+s$@bBz7XgcF1950nhrgGnf`{r(RcMbGAZfg5*!t*m}T3$zPK_uP0x!3RMv(3Guul3nh za}(PJwht$V^@HM1o%w0!&14F4??yh0-0$VvX8s;7Z*5u9-V$Ho#N!=H+w<|t#u9?r zR5caKy%c>X+T)G+h0_T)2&XWSNbYu>H+GC}b928&2dmcaax;Em!Wnc^ZoB4@6=6i2>{eE)HcQ3r{7rwmrn5WR3L7pbUZ(~!6u-MC=s9hWR EAO3;Zg8%>k delta 1731 zcmZY8UuYaf9Ki8O(=@r5R!uZEjhac?m_J@(qSn|@tU)jh6bxvo(m=Yoop_sEcH-XV z>ILPjNQs0{>S;yr!D|oP!9p_L_op$n0l#ZfEAV zzxm~#!@rK@t~73cN6{Xo-%Gz(rPL@+RCA%dyj`gt%;FNR;vS6GD76nqu>(`M8_!@X zeuOfwjJ^0b-hnMUlxoLbY*Z?zj&L)?z$AWw@8Tc$Os!I9@j#tY$MG`0gk3SEn(;ln z4L?I-QWue_>Kl{|zQ?=pPi({Mcn`MKD|H_ZVI%viquh)$ki;JR3h&2Fl#RBri+ouN z%I^mk;vX+(!O6HuWqO(#;Q(sCi!EB9X4)JbsQR_rhB1zX)BbJ*@3Xk$o)K-)M z)>XUcl18a=Y1MR2Ky}lp-Kc4_|~+J{tj&e%~G!CzbLn1;CLyyPuP_8(>?iLYTwSkS$8~ttuDx) zi+x%=QU7z@&cVKc{e6Rjdf>qD{>O`BP2JVSbn|9aZe%uGC>2tERy%HB(xpP6XN*pl zE|gcC^!kT(LC+Jg@qIJHolS>Qe2l;toA)4Gp5YqyeY5vr8S+=vr$e;g@os6 zGBKO*ScjZsvdQu#$8~(q>DS||R?2-c7uVKh*-~MBDKxx%OFWAl!FnOue=Cx$\n" "Language-Team: Slovak \n" @@ -16,32 +16,68 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8-bit\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "nemôžem zistiÅ¥ aktuálny adresár" + +#: find/exec.c:256 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Cannot close standard input" msgstr "" -#: find/find.c:205 +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "nemôžem vykonaÅ¥ fork" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "chyba pri čakaní na %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s ukončený signálom %d" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "kontrola správnosti knižničnej funkcie fnmatch() zlyhala." + +#: find/find.c:263 #, fuzzy, c-format msgid "cannot stat current directory" msgstr "nemôžem zistiÅ¥ aktuálny adresár" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "Upozornenie: súborový systém %s bol nedávno odpojený." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "Upozornenie: súborový systém %s bol nedávno pripojený." -#: find/find.c:491 +#: find/find.c:550 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -50,7 +86,7 @@ msgstr "" "%s%s zmenený počas vykonávania %s (staré číslo zariadenia %ld, nové číslo " "zariadenia %ld, typ súborového systému je %s) [odk %ld]" -#: find/find.c:528 +#: find/find.c:587 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -59,17 +95,17 @@ msgstr "" "%s%s zmenený počas vykonávania %s (staré číslo i-uzla %ld, nové číslo i-uzla " "%ld, typ súborového systému je %s) [odk %ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "nemôžem zistiÅ¥ aktuálny adresár" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, fuzzy, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -78,7 +114,7 @@ msgstr "" "Symbolický odkaz `%s' je časÅ¥ou slučky v hierarchii adresárov; už sme " "navÅ¡tívili adresár, na ktorý ukazuje." -#: find/find.c:1097 +#: find/find.c:1157 #, fuzzy, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -93,12 +129,12 @@ msgstr[1] "" "Zdetekovaná slučka na súborovom systéme; `%s' má rovnaké číslo zariadenia a " "i-uzil ako adresár %d %s." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "upozornenie: nenasledujem symbolický odkaz %s" -#: find/find.c:1386 +#: find/find.c:1480 #, fuzzy, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -112,12 +148,12 @@ msgstr "" "find. Predchádzajúce výsledky mohli zlyhaÅ¥ pri vkladaní adresárov, ktoré " "mali byÅ¥ prehľadané." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "neznámy" @@ -129,7 +165,7 @@ msgstr "" "Zdetekovaná slučka na súborovom systéme; `%s' má rovnaké číslo zariadenia a " "i-uzil ako adresár %d %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -139,12 +175,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "nemôžem zistiÅ¥ aktuálny adresár" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -152,7 +193,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -164,7 +205,7 @@ msgstr "" "voľby nie sú pozičné (%s postihuje testy zadané predtým a tiež tie, ktoré sú " "zadané potom). Prosím, zadajte voľby pred ostatnými parametrami.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -173,24 +214,24 @@ msgstr "" "upozornenie: voľby -d je neodporúčaná; prosím použite namiesto nej -depth, " "pretože táto spĺňa požiadavky POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -200,7 +241,7 @@ msgstr "" "implicitná cesta je aktuálny adresár; implicitný výraz je -print\n" "výraz môže pozostávaÅ¥ z: operátorov, volieb, testov a akcií:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -211,7 +252,7 @@ msgstr "" " ( VÝRAZ ) ! VÝRAZ -not VÝRAZ VÝRAZ1 -a VÝRAZ2 VÝRAZ1 -and VÝRAZ2\n" " VÝRAZ1 -o VÝRAZ2 VÝRAZ1 - or VÝRAZ2 VÝRAZ1 , VÝRAZ2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -225,7 +266,7 @@ msgstr "" " -depth --help -maxdepth ÚROVNE -mindepth ÚROVNE -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -239,10 +280,10 @@ msgstr "" " -ilname VZOR -iname VZOR -inum N -iwholename VZOR -iregex VZOR\n" " -links N -lname VZOR -mmin N -mtime N -name VZOR -newer SÚBOR" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -251,11 +292,11 @@ msgstr "" " -wholename VZOR -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user MENO -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -269,7 +310,7 @@ msgstr "" " -exec PRÍKAZ ; -exec PRÍKAZ {} + -ok PRÍKAZ ;\n" " -execdir PRÍKAZ ; - execdir PRÍKAZ {} + -okdir PRÍKAZ ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -283,12 +324,12 @@ msgstr "" "Komentáre k slovenskému prekladu zasielajte na adresu ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "kontrola správnosti knižničnej funkcie fnmatch() zlyhala." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -303,47 +344,42 @@ msgstr "" "alebo možno '-samefile'. Alebo, ak používate GNU grep, môžete použiÅ¥ " "'find ... -print0 | grep -FzZ %s'." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: voľba `%s' vyžaduje parameter\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, fuzzy, c-format msgid "Cannot obtain birth time of file %s" msgstr "Nepodarilo sa otvoriÅ¥ vstupný súbor `%s'" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, fuzzy, c-format msgid "invalid mode %s" msgstr "neplatný mód `%s'" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -351,96 +387,104 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "neplatný prázdny parameter pre -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "neplatný typ -size `%c'" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "neplatný parameter `%s' pre `%s'" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "neplatný parameter %s pre %s" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Povolené vlastnosti: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "upozornenie: nerozlíšený prepínací znak `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "upozornenie: nerozpoznaná formátovacia direktíva '%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Aktuálny adresár je súčasÅ¥ou premennej prostredia PATH, čo nie je bezpečné v " "kombinácii s akciou %s vyhľadania. Prosím, odstráňte aktuálny adresár z " "vaÅ¡ej premennej $PATH (to znamená, že odstráňte \".\" alebo začiatočné alebo " "koncové dvojbodky)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, fuzzy, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -452,7 +496,7 @@ msgstr "" "vaÅ¡ej premennej $PATH (to znamená, že odstráňte \".\" alebo začiatočné alebo " "koncové dvojbodky)" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -461,250 +505,256 @@ msgstr "" "Nemôžete použiÅ¥ {} vo vnútri názvu nástroja pre -execdir a -okdir, pretože " "toto je potenciálny bezpečnostný problém." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Len jeden výskyt {} je podporovaný s -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, fuzzy, c-format msgid "The environment is too large for exec()." msgstr "prostredie je príliÅ¡ veľké na vykonanie" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "nemôžem zistiÅ¥ aktuálny adresár" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "Nepodarilo sa otvoriÅ¥ vstupný súbor `%s'" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 #, c-format -msgid "Cannot close standard input" +msgid "Failed to write prompt for -ok" msgstr "" -#: find/pred.c:2061 +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Failed to change directory" +msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:346 #, c-format -msgid "cannot fork" -msgstr "nemôžem vykonaÅ¥ fork" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2123 +#: find/print.c:365 #, c-format -msgid "error waiting for %s" -msgstr "chyba pri čakaní na %s" +msgid "warning: unrecognized escape `\\%c'" +msgstr "upozornenie: nerozlíšený prepínací znak `\\%c'" -#: find/pred.c:2132 +#: find/print.c:385 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s ukončený signálom %d" +msgid "error: %s at end of format string" +msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:409 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "upozornenie: nerozpoznaná formátovacia direktíva '%%%c'" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "neplatný výraz" -#: find/tree.c:135 +#: find/tree.c:140 #, fuzzy, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "neplatný výraz; použili ste binárny operátor bez operandu pred ním." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, fuzzy, c-format msgid "expected an expression after '%s'" msgstr "neočakávaný predikát navyÅ¡e" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "neplatný výraz; máte príliÅ¡ veľa ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, fuzzy, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "neplatný výraz; očakával som, že niekde nájdem ')', ale nenaÅ¡iel som." -#: find/tree.c:192 +#: find/tree.c:197 #, fuzzy, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "neplatný výraz; máte príliÅ¡ veľa ')'" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "neplatný výraz; očakával som, že niekde nájdem ')', ale nenaÅ¡iel som." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "ach -- neplatný typ výrazu!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "ach -- neplatný typ výrazu (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, fuzzy, c-format msgid "paths must precede expression: %s" msgstr "cesty musia byÅ¥ pred výrazom" -#: find/tree.c:1297 +#: find/tree.c:1303 #, fuzzy, c-format msgid "unknown predicate `%s'" msgstr "neplatný predikát `%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "neplatný predikát `%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "neplatný parameter `%s' pre `%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "chýbajúci parameter pre `%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, fuzzy, c-format msgid "you have too many ')'" msgstr "neplatný výraz; máte príliÅ¡ veľa ')'" -#: find/tree.c:1412 +#: find/tree.c:1418 #, fuzzy, c-format msgid "unexpected extra predicate '%s'" msgstr "neočakávaný predikát navyÅ¡e" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "neočakávaný predikát navyÅ¡e" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "chyba -- neplatné implicitné vloženie logického súčinu (and)!" -#: find/util.c:171 +#: find/util.c:175 #, fuzzy, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Použitie: %s [-H] [-L] [-P] [cesta...] [výraz]\n" -#: find/util.c:173 +#: find/util.c:177 #, fuzzy, c-format msgid "] [path...] [expression]\n" msgstr "Použitie: %s [cesta...] [výraz]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "nemôžem zistiÅ¥ aktuálny adresár" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "nemôžem zistiÅ¥ aktuálny adresár" -#: find/util.c:816 +#: find/util.c:824 #, fuzzy, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "upozornenie: nerozlíšený prepínací znak `\\%c'" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -713,64 +763,380 @@ msgstr "" "Premenná prostredia FIND_BLOCK_SIZE je nepodporovaná, jediná vec, ktorá " "ovplyvňuje veľkosÅ¥ bloku je premenná prostredia POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "neplatný parameter %s pre %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "nejednoznačný parameter %s pre %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Platné parametre sú:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Neznáma systémova chyba" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: voľba `%s' je nejednoznačná\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: voľba `--%s' neumožňuje parameter\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: voľba `%c%s' neumožňuje parameter\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: voľba `%s' vyžaduje parameter\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: nerozpoznaná voľba `--%s'\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: nerozpoznaná voľba `%c%s'\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: neplatná voľba -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: voľba vyžaduje parameter -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: voľba `-W %s' je nejednoznačná\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: voľba `-W %s' neumožňuje použiÅ¥ parameter\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: voľba `%s' vyžaduje parameter\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "nemôžem zistiÅ¥ aktuálny adresár" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "nemôžem zistiÅ¥ aktuálny adresár" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "`" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "'" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yYaAáÁ]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "neplatný parameter `%s' pre `%s'" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "neplatný parameter `%s' pre `%s'" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "riadok s parametrom je príliÅ¡ dlhý" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, fuzzy, c-format msgid "argument list too long" msgstr "riadok s parametrom je príliÅ¡ dlhý" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU findutils verzia %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "nemôžem zistiÅ¥ aktuálny adresár" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "" + +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "neočakávaný predikát navyÅ¡e" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -779,8 +1145,8 @@ msgstr "" "Použitie: %s [--version | --help]\n" "alebo %s most_common_bigrams < zoznam-súborov > databáza-umiestnení\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -791,83 +1157,78 @@ msgstr "" "Komentáre k slovenskému prekladu zasielajte na adresu .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dní" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, fuzzy, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "neplatný parameter %s pre %s" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, fuzzy, c-format msgid "locate database %s is corrupt or invalid" msgstr "databáza pre locate `%s' je poÅ¡kodená alebo neplatná" -#: locate/locate.c:893 +#: locate/locate.c:860 #, fuzzy, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "VeľkosÅ¥ databázy vyhľadávania: %s bajtov\n" msgstr[1] "VeľkosÅ¥ databázy vyhľadávania: %s bajtov\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, fuzzy, c-format msgid "Matching Filenames: %s\n" msgstr "Názvy súborov: %s " -#: locate/locate.c:901 +#: locate/locate.c:868 #, fuzzy, c-format msgid "All Filenames: %s\n" msgstr "Názvy súborov: %s " -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -878,44 +1239,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, fuzzy, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Kompresný pomer %4.2f%%\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, fuzzy, c-format msgid "Compression ratio is undefined\n" msgstr "Kompresný pomer %4.2f%%\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -923,35 +1284,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, fuzzy, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "databáza pre locate `%s' je poÅ¡kodená alebo neplatná" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Databáza %s je vo formáte %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, fuzzy, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -971,140 +1332,155 @@ msgstr "" " [--version] [--help]\n" " vzor...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "upozornenie: databáza umiestnení môže byÅ¥ načítaná len raz zo Å¡tandardného " "vstupu." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, fuzzy, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "upozornenie: databáza `%s' je starÅ¡ia ako %d %s" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "chyba pri čakaní na %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "prostredie je príliÅ¡ veľké na vykonanie" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, fuzzy, c-format msgid "Cannot open input file %s" msgstr "Nepodarilo sa otvoriÅ¥ vstupný súbor `%s'" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "VaÅ¡e premenné prostredia zaberajú %ld byjtov\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "Dolné a horné POSIX limity pre dĺžku parametrov: %ld, %ld\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "Dolné a horné POSIX limity pre dĺžku parametrov: %ld, %ld\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Maximálna dĺžka príkazu, ktorú môžeme momentálne používaÅ¥: %ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "VeľkosÅ¥ vyrovnávacej pamäte príkazov, ktorú práve používame: %ld\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1113,14 +1489,14 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1129,196 +1505,280 @@ msgstr "" "nezodpovedajúce úvodzovky %s; Å¡tandardne sú úvodzovky Å¡peciálne pre xargs, " "pokiaľ nepoužijete voľbu -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dvojitý" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "jednoduchý" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "riadok s parametrom je príliÅ¡ dlhý" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "nemôžem zistiÅ¥ aktuálny adresár" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "chyba pri zápise do procesu potomka" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: ukončený so stavom 255; preruÅ¡ujem" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: zastavený signálom %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: ukončený signálom %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: neplatné číslo pre voľbu -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: hodnota pre voľbu -%c by mala byÅ¥ >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: hodnota pre voľbu -%c by mala byÅ¥ < %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" msgstr "" -"Použitie: %s [-0prtx] [-e[eof-reÅ¥]] [-i[nahr-reÅ¥]] [-l[max-riadkov]]\n" -" [-n max-param] [-s max-znakov] [-P max-proc] [--null] [--eof[=eof-" -"reÅ¥]]\n" -" [--replace[=nahr-reÅ¥]] [--max-lines[=max-riadkov]] [--interactive]\n" -" [--max-chars=max-znakov] [--verbose] [--exit] [--max-procs=max-proc]\n" -" [--max-args=max-param] [--no-run-if-empty] [--arg-file=súbor]\n" -" [--version] [--help] [príkaz [počiatočné-parametre]]\n" -#~ msgid "cannot get current directory" -#~ msgstr "nemôžem zistiÅ¥ aktuálny adresár" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "neplatný parameter %s pre %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "nejednoznačný parameter %s pre %s" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Platné parametre sú:" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Neznáma systémova chyba" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: voľba `%s' je nejednoznačná\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: voľba `--%s' neumožňuje parameter\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: voľba `%c%s' neumožňuje parameter\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: voľba `%s' vyžaduje parameter\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: nerozpoznaná voľba `--%s'\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: nerozpoznaná voľba `%c%s'\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: neplatná voľba -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: voľba vyžaduje parameter -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: voľba `-W %s' je nejednoznačná\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: voľba `-W %s' neumožňuje použiÅ¥ parameter\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" -#~ msgid "`" -#~ msgstr "`" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" -#~ msgid "'" -#~ msgstr "'" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" -#, fuzzy -#~ msgid "Invalid regular expression" -#~ msgstr "neplatný výraz" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" -#, fuzzy -#~ msgid "Invalid preceding regular expression" -#~ msgstr "neplatný výraz" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" -#~ msgid "^[yY]" -#~ msgstr "^[yYaAáÁ]" +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" -#~ msgid "^[nN]" -#~ msgstr "^[nN]" +#, fuzzy +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "GNU findutils verzia %s\n" #, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "neplatný parameter `%s' pre `%s'" +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Použitie: %s [-0prtx] [-e[eof-reÅ¥]] [-i[nahr-reÅ¥]] [-l[max-riadkov]]\n" +#~ " [-n max-param] [-s max-znakov] [-P max-proc] [--null] [--eof[=eof-" +#~ "reÅ¥]]\n" +#~ " [--replace[=nahr-reÅ¥]] [--max-lines[=max-riadkov]] [--" +#~ "interactive]\n" +#~ " [--max-chars=max-znakov] [--verbose] [--exit] [--max-procs=max-" +#~ "proc]\n" +#~ " [--max-args=max-param] [--no-run-if-empty] [--arg-file=súbor]\n" +#~ " [--version] [--help] [príkaz [počiatočné-parametre]]\n" + +#~ msgid "cannot get current directory" +#~ msgstr "nemôžem zistiÅ¥ aktuálny adresár" #, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "neplatný parameter `%s' pre `%s'" +#~ msgid "Invalid regular expression" +#~ msgstr "neplatný výraz" #, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "riadok s parametrom je príliÅ¡ dlhý" +#~ msgid "Invalid preceding regular expression" +#~ msgstr "neplatný výraz" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: nepovolená voľba -- %c\n" diff --git a/po/sl.gmo b/po/sl.gmo index 6f488d44d84618759b25010eda92813b7aaaa048..23d8b96ec8cf13634007efecdb8b0c1eec96de89 100644 GIT binary patch delta 13682 zcmcJU3v^snxqx?4$|E2Y`Yu8b(6mr8X_G=*T2dOCgr=lPNJ58+90`(&lwhcCcS!e^!^wFIu4s#FL36g(5Y1y{i8X-e^^>}e{mUg6<# z3Kqbg=}KJ!Z-%Y#V>6U$gX`dL;1}UGc+=5JJql0wxKek*x1lt2#W6}PgU`Vi;E~4$ z^}Gw4$j_gtR5Q%Nm2l_Gyi)Bv9AGH52zJBc;SF#O{3^T{z65Dobswjc4;?rQz76I5 zgZaZ4)X9*(sU|3z*#zgp>!E1#n{Xri7VLvl^Ctuk!hQ;V4JW`(YCj5^unziAD*h7W z6}1bZB=s)jA36gTIuA2vD}~9`1yEF&fMTQV zP)5EBN(HY&8QF($Ih=!<7>w$N(%~E6?eI=mgbPm$Oz>NHI4U@Wk58j~1!`d+d36a7 ziz&Dp%1D0>F{e80?of&2oB29KtaKhwTy=0Pf4POA%{4@E^gAX-!Jz+2(rr!oWJ=V23U z=4CO>^-vnV2g*Rc4=2IDz#ce(LI$mp5UZ%q!n-iVE|{nDDoSheK>?zDbsxMQJ`WkR zx^PKQeiNkg>S0Kq)bC&;JZ>r4gE4p!d>-}@Sks`?c-RuMtpWYh5!FS3 z*nAC~0xt^rNk}KvU66n3W&W&ylQF1h?0h%@ZiUj|o$yfjN?865Jcj(A!u%xcavb?; zcmO=>4D^2>4{hNO-SB+!St#E8ER>GD1w})DgEQfzuno?FKY?QNKR{-tntofK%%}&;R>1m zPqM<$mO6|{E;czAiZfjf#hV|2_>Zb>54=1Dk0<{+j6hj=mV;XOCUoID@Er7fC|q<- zV7e9XcQkxH+(vmzw^G;8zIv61Kf&l4rH0`7=LXa21$Zg>DQkn(?KUVTdIyT?r!%Zq zVLdzr9!`|G1FnFyp7B1*cjxmg7e8g508TfYzk)0Y}ikJ1w0zw53hkw!dbAxME|pS z@Xg?Z&q49#Z$mM~OOUXxDx(OT2kE@3hcUPnCg2}oAKXBpIOh{^3VaDl$KHeDoX5t4 zfYt;h@5j-99S@(SU>ST0$_Iy90Z)gE$fuwI?}0Pm55oMLu$g>iZ{V~mVFUSfa3;JB zO8odHoDH7~`95qSZ{+EAH4he)9^U|Og;3?=2bE`Mt?G<#!4m$SiK+up3pJ=O= zLGg_tC=GuVO1;m(7WhAqe`;wm;JuKss{F)M5bHNXgMx8RFp^pDF!BrFwQxDS8a@dP z*zN}Fx(m-B|1jhy^*&q(`_pV@;9U^^R@Yt>X!=z+kNn3n+Bfp5fd{mqz66hzAG~1t z)xfWl?}PZKn&Ahg7=&}le+~W-{v1k!Ph|rQjLQW9YY`L;Y=WEMHSj+8Yq$j7GAIMV z{y*Vi76re93*nKQgXy&r;^@kR(&NYAiSQ3_JEoYvMX6KC?;Z+F_h-16{E?p^io#V; z8hRRv4;_4QV5;R%$}fiPw6DI!gEVyDB}$hBESZ;1O{0 zwsAy*5yJJ(P}K32%Z$D5gB~ zlR<~p=6MjO^WX_^J3JOX1K)t}!R3;_F6h7!*Aovaa3CnAvlG6{*JKV0a#7Jv+yAJzu^lX!j0r7(ft66u2X2CmiV3V)8wM&3l|gZdb95+X^QF-X||NS?kPW?zJdAm0!3 z4e*)p`Js>kR%X4@JqyPnN#sQ2^T;EJr0*clBT?iVNDuN& zBf@7$ID{zeFT*bt7Al^O5;T6OutB-Hvo1zd}6ZhlnJZUiTwak_ppea657Dq?EStP#b1)a02o)@+9&F zaCE6g`5}il92bpGm)#2+rl!z zE65~d2XYm1quBr7c_^i2JX9j@AkD~Ah@|nzY5HmSPZy70L+(JPAzwwFLwb=fA!F0& z6wE~)MpDQHi1zB`@-QZSj{MZHY%@Fy5zqB8^zMoH0`dVef#J+T79(xQCgft|GsykO zW5^50e;^lc3pOHBEm@uNv%ud-|H+RHVW9*JNfHy}w*zrkc~6pbLdxnXlPM@kG$v&> zWh-^ba9NQu@efI*_kK-TXtFuw!fCfFwOqdzs8b%rS)}66-CnqJ!i=uxJ`;p|`RS1G zCsDryKuM+gPp3@WNm8loHp<5K<41QCtB&+5*GBrSWZL*>irZc~X>Kw6e%mwjJEjvi ztj)GxrGmF3k#xq5S)Ld1lCB@gnVE*Qja~faS$^S-&6D$nWNpWY_1np~5x#7B!{2-T z?qDQor)=LF*#Rjw!eW=t-BgOUdC{?qq~-Ma{lit{tc+*#(wO9C{q)SNZ$@cVoPOYUg5hF@6Q`Xq}7nV?>Tv9$}&vPh(t0LT8UW=UDAa}TMb1ibF=Q7 z*RZz2# z%(%gC*_7pAsosp6GUSaK!*PAX^HHdoi3bDH{fbLvaZ8)f$~3H4+1S;%VokHwukBkY zPrM=+zvokXDo^zmev>vcrf-rc1 z-;J8FgqJkE{*P9O{YR%zPqx#iKTW!QcFar~%^fWzKjtSrR!hcexxGCN&FxJaM%Q9p zl(lmvF6$esXJnS)H07>nUvi9i-qllCV#bP&)vFuZo0jfhYr0mLDVHMk4cF%GsiDg;FT0@ZMI@rUsR3yQo5GSQj4sDV``ABE)H~!iw;@F ziJoN{5$`1NAZv5Xvf@^}s_@{X8O19my;+%`qayy6v}IJs$}W~or`?Q>fL6>DH)?5Z z>F{)P)UmewJL?#IGFXg!S=o$Un+P|^5`|Nw3E^>6SiA4~^SXg4v;5si>Q@W8wyheU0dted?|dow}~@+SGf_G#%Yf%Qw1P z&pNles}9@tIV=YKEGkJWqgIT4qkhaA#r(9>D+<4w-oL;znb(7ECLul*w=-7EcQacg z4!fB+Q30pb)1c&u7_qQy#u@pz<;5~~nwO1g%q(+?d6HO){h2OA1WViokHC=lfJsd3 ztD!VyrJ|NB3R1J}#FE)KYa!9nH?@zH>XmH~6G%LY*h-~L!9m&l(H|?Fndru|F)OH^ zP{g{Lsx1!Aa4HuV)r4HW0;wz?nd!7eU}iC9PiG~2Yjkwp;%0}VXW^G0@0nJLK*pwO zuiBd<4Mk+i6zh(OSLWGIXuZg)9Yhz@UHU}F_@v92f}a8tn@P{Dl5Jw}C5kG4$o$ZK zjJcT%+XL5$i$d6BqOstm+A6i$^x39T-eM;Ucg;Mk_}a|f6|1|317ff?4tFA0IKy>Q zI+~KuJp8-fH0kA0Z**#_s)~0VcUuLfOj@!bA;!yIH0!&vEoF0&MBUkpLp*g1Hcx54 zKTsaK>?|u;++|V56LlvC`>oPT5<2i7tG5?tsx^$(UPIJ9Xa<{(n3=)Bq$Oty7Ok0M z42Yeq&1t5H?bE1488KndW=SK(+7oW5II@OjvzR-ML!xr8ruguz*D5DE3CA6D3~!6a zX3nrO88=fX%(=a|bnYV+o6hyjK5L11L{CTOn%0i?4Yjqk<@KOvq~7G0Dz(;3+9UUu z#D*nmU1L{!Yx`MCj5gUn`>crx@zCmIwm6~Ys&R8K>~Y#Rs0(|xoWDVBQf4Y@_hsFz z_(HHvmG;H()n2hMZ(&6}0o%j8$zc;|gQB_e7fG9zbllbpOX0Ek+sAumueGr-P}hD~ zEa^%G1lpuke6a40is`mv`!+6Qim9@HmWhdLx-qup2GN9;is_|yRTk>%r_Ess zWjWYUZLiBagSZJ3-xMd69S#dNUT$Ry9$phxdsichooa8NK~fEx8QDuMVY5m! zcKaNH5XW4v_?KnZR94p27p`braq20N`HLcTrx|s1OX?S$Jil)K{Ho55NSBqfEY-nX351EPN zKz8?5TXq|g_HfGX?(Aw_-Q3=`s&(zzjRv2y0ngdS$l?yeO}NPcGjHU=1B<Dr<~+!(jn5hn)Q1qrhChi~9P*A!8XM?aJN35SwmM z2MDy`>doYs^LwdbIjT2zcdRw|y3ce5%mI3rAKSh1TaIZt3C_*B%F*Zerp7fLYnsJL zBrz*wH&BjvOs^qB7EIqta4wKzA3EI2R((Wq;aPujUbi;ppufJo@$8@}{>u3u@6#$_ zmGIpJn*i5Hy1Tbpj%^GX@^;7SQoAGSFIO@8!IJ@qgC^Y6(mZ{S+8L9jji}T|rMBTl zX_L9Mw;_zE&S8;BxH)sc%E_#AqZwzw!dKJo6L(uV2Y0Q}&g5s~_8xntPpst%<$hrI zR;*j@0yhOLZTRf){Xl!``Y|V2%Q5K$@r*C^aBR6G;Jq3HB^d*jJkzJR>5M&(jcz~a zh)1_G2D)|JD1+%Eve-i=A%&qhR;+Al-LHM!5bzl%_?)r6arceQYuZ~^ZsY`eE+J=4 z>q_huXT~pPPGdvvj~shHhkNOqxL(F|IJax(S*pj^MgR7w++aB2U*d^&nHnmwb3<0j z9=;+d&6r>^kJ2t$bED{0hXn5FIF)is71WWp@blad4$n54D-?JCy$GWKpUD(2PvgK) zqr0*HQHk-mv0zVtPJ&P{`Z}RhVM*;03-%tUM!e;i`yWa+k^e{}+Sla+^UfWzb6on# zvWlbTtavntXQpALEhQhXcPP{N#f@8uy2K#(huX!MSHQu5TRc<)a)S$V4;N zkip`w=Zj^~5&1Ic6`Nwm9N-jyP0JB+%ngF5HZKc+4nOEsFJGlqD-6@+MT`2%>p}2= z9`U~J66~S0{lwk2j`zWC#c&4fewVlus;;U-5g7J$lTh9Tl;S{+V49FUj)Xw#2{dLJ zC$ioS$n`>1@#&WTuFUV+F?`++RG!Yz(F8HUjmn3FJ64lya92Q7U=rwEf*2t#%b#94DrFj_8;5_Sk$tq04+oHTB`6WwW$WQfSSBp~LnGQp zV_{nymbq)tUYwg|4aw>LqoXQ3+Pc25eARm!yY;<+4$K)s8v87i5#A~AS+I=BLag_5 zzODBDLA|sy=7Zwgv(K(5JkXYCYPYgnR$@P|UxKdBBFD<;=5*6KWGC1s#JMK0jilM1 zaB%>+(g>VZe4dlWjMdBX>}=T_NLQ)AOAKE@FzwRWC+^<8)l9O#&TuqJ)ffZpLYbN2 zKFl%GtZuTp%H$v52M6mrvifrtV6)Fu#ZEF-#~NVSW-^s7mX9KO!(M!zm$Uxz}OE%<|H zW@?SyH(Ca9Eh!$9TfoIBZL!rb`98-PuZAx;pivmEgS@7ffKnf7i?^=ZTrrtZx$&G! zqg-?4=qa0evv|n)U#Ohcj-gD7J&p?e9~6^MyQo>%-g9U1_6vVdkv~_T1BZ82l5}dsJC!I??p!qnQ7UYuvV0g2gS#G zAF7x)WMVE~hmns26lqe29f>A6PSw6$$n~4~zw?_gRN1N&{s>wg9?Hm*19pxBN^qi; z(U)2>)reuTEh`1iksprdOQP9J{T&CF^)|ttI&NaxO*wXwAWU~T0g9g%XD7E*EDv`U z`s#%GE`jd+*I8@Spea<#)gDuJ2p! zaN9G%55EtjKj_(UPe3Vk1j$D}zd)$~h6gW!==-}V)fpawuOQNLd!WP1;N|cH{2qP- zx53jrmFf%E_fqOzxC73CW{y%7@GzVL1HDyR4W(1uTd7fSCEN%%!2vR%k5Va^3x~s< zQ06}e`@whNK=?J3i*)7GF|Y`Bht-g~s1z)KTcND~HI#KH`=*r|M&~;W{b4S<%0ZKT zMqmj2CO8;A0f)dhpa##tD_{>6cZC)3N>~NiQtgAI;WJP^=zS>rdd^aE;$arkO@#WdY5>}1-gvzJTME2OK*fb;iGUrEFP)U zEcgM$d1@F5B?n#!<>D)01n!0s(lfAoFs;-ecB8MxlQ|FI>PjdV`8S_)I~{?949WfvK<*#$g;j4cEaT;~0ZBJP6-_gk80=8TqPq3prmMq$4*x2E*_NI1?7( zfAPRZDB1iJq$<@>Uw<9S7k=RD|ABa2bs;f2!tt;ZoCw7}4K9IIP;%xlOy|(~GabUK zK7lf^BcCT183{#?LW%7bDDw_O4Zh{`EF@Yghucc1iXc%_aY!Yr-LNlw9Lj}{!JhEc z1meGt&RGnya2Ecw;07om_!7!^&LpL}K?9P&stK}0?S|sYSD?iHLnyg1oXxhu`H%`# zZ$sJdD@eMi{ABoOR=&eCdj5TpF%}1K<`Yo_h#(hDTu^_-dL?C7n~S1Qt;WavvhUBq&9*U<< zL!zrf#8ZO?bVK6mX<|Z$k5k8>#Pq^>UiSBegVC2l!m65}eBo12F7Ud~Z{P^@f%CnK zmcoPR%i%KE5qIsybb5H*A|x+ zL5XD@tbuRBL1HIk#Uqt)CENwY#b3cOa1;;wNw^qJhT~UwOk#(<_3kfwJ*!3_gyl4@0?7)oP_~fqS4_ zxS#IXuYuFh@6hqT47`ki@TlM#?|?-xf&LV{0uHP8V!9gkLcf%FNXRsp3#Y?bunH12 z^)M8dpM~P`u;IN6H^83gdwl(|G#&Yp7hyMe21-4PzdL|&uoEnVLt!ywidqTXrxf-_ zKLtm@AK-8}wATACR~Z!jE-2&A!jbTOI0B|S5@6|!fikcV7Q^+v{b?v)_>RwSplsN~ z^vZKG%tJ4O`7j07!UIrpp*sqBr>4OixC6@i{jiYp)vI&{VE7Ld*Yzd!#Upj_C-5F9 z7Z?@ue9^bK$jd;p$;zk_2$Z=meRffJB4QA6V1%XkCqB=exmI}QhMzB)svJBCXd z8DL>9l#R=HZ~MR+DEbXhJhcyYhR6Kz6L1y!NAN0GO5&8V&o(#@{Y26`uy4vM;~8)c z_D5j>=c_YxCcvRhUJ@>YN6-(z7hzSimo$Ucdrxu!WPjJKtD$TrO~NM0+822ixfA&r zB8|7meeb28kIX_YLDKi|hjZN60Qcu|qI7885S*bFBizCLUAPTOVje;sL8=f5QyC&n zJS2_qyNNs=N@YEUNTof9v}?=Um<+*!x7^1@Vk_?Kh)COrNF1L)#4FNzdvGgaF#S@b z(zo%;t*){Qdi6?Q=UXJZ9zeSLdIrmLU%#OOb)d0%Sk3!Ofl)deTNB^3rZY3Xo@z z=a4SQQ;4*mddU8b`n@smVnol5@Qlzu?CY2NoafVm;vR7;f>35856WhC_Kl-X>!I$sczPIO}^6g6UIgUNW< z?Nwc@c`Xu}tr_u}P%@Q}sYWEDRB5s$S|pq`wJn;bHRvs&m}wd5q^yfYGJ3MgJv*yL z!r5+ByHm@xgwYt&tBuUbW~9Br-NQFT!sm>%UBZ$}q(ge5*1bbW4id#Z(Y3bCO}ZDZ zCR%NCUCo{B+1q9>bZ0jv;?>L+Kgiau>Q46uuqW%%@%8ut*CyM2U5K<<6Hj_!Fj~x% z`#n}XlxVU-W=+UwXiQ!2+PJ2hJYmV8^LCKLb0^gqu|_)8@rDN7ifR!*|KwwvIyD#; zXFGeR{3+1CvUG7pc}3Y&ZC*T?(o!Tty%w+0Mns)s#hW@f>%x-)_D5GfWN$60a6T{D z6|f&Eoom<5C~=O?=-9z|d-n2xQ(Kl77?v>fC;>_}B`hPVHCaYWqfworOR6@Jy3uKx zeV}Btvun=l0q6R;`-1j$^9$?~^AFh zetpqEu@r;~3blfXQzzv+|626-4z^b5mgB0*C!O%BuY>mS>J=jwCX8kyYFKftwOu*p zX$ieGX1=uDtk&Ic!}DYIHqFcz`&b8K#2W-B`qK7Y7vzjF4A#v6=e$}&ToCo4_1JICg3 zm#udzecou>ZWgbYB?;FuPES z-$=^Rb03Dx+U$7S;vfAS%rL@HJrz$G^?JK-$~Nb}2~G8Ss}^Y`5e@Ng=A+Fj=btU_ z1neFgasp9j)P^TI98Na{?BCq_$lD-McjCu7y$%(sk>am&MJ4>Dy_Z4{I<^ef*8sD5W8{&By6~K>-wl?nE gb;p+h=icql2km?B8f$mj`Gj4$tBX^(>z&U32fCWK*8l(j diff --git a/po/sl.po b/po/sl.po index 7ae0aa0..003fc29 100644 --- a/po/sl.po +++ b/po/sl.po @@ -1,15 +1,15 @@ # -*- mode:po; coding:utf-8; -*- Slovenian messages for findutils. -# Copyright (C) 1996, 2000, 2001, 2005, 2006, 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 1996, 2000, 2001, 2005, 2006, 2009, 2011, 2013 Free Software Foundation, Inc. # This file is distributed under the same license as the findutils package. -# Primož Peterlin , 2000, 2001, 2005, 2006, 2009, 2011. -# $Id: findutils-4.5.7.sl.po,v 1.2 2011/01/12 13:50:29 peterlin Exp $ +# Primož Peterlin , 2000, 2001, 2005, 2006, 2009, 2011, 2013. +# $Id: findutils-4.5.12.sl.po,v 1.3 2013/12/11 21:56:03 peterlin Exp $ # msgid "" msgstr "" -"Project-Id-Version: findutils 4.5.7\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2011-01-12 14:50+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-12-11 22:55+0100\n" "Last-Translator: Primož Peterlin \n" "Language-Team: Slovenian \n" "Language: sl\n" @@ -19,32 +19,68 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n" "%100==4 ? 3 : 0);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Neuspela shranitev delovnega imenika, da bi lahko pognali ukaz na %s" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Standardnega vhoda ni mogoče zapreti" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Sprememba imenika ni mogoča" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "vejitev ni mogoča" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "napaka pri čakanju na %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s zaključen s signalom %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" msgstr "Inicializacija porazdeljene zgoščevalne tabele ni uspela" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "preizkus koherentnosti knjižnične funkcije fnmatch() ni uspel." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "statusa trenutnega imenika ni mogoče ugotoviti" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "Seznama priklopljenih naprav ni mogoče prebrati." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "OPOZORILO: datotečni sistem %s je bil nedavno odklopljen." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "OPOZORILO: datotečni sistem %s je bil nedavno priklopljen." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -53,7 +89,7 @@ msgstr "" "%s%s se je spremenila med izvajanjem %s (stara Å¡tevilka enote %ld, nova " "Å¡tevilka enote %ld, vrsta datotečnega sistema %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -62,17 +98,17 @@ msgstr "" "%s%s se je spremenila med izvajanjem %s (stara Å¡tevilka inoda %, " "nova Å¡tevilka inoda %, vrsta datotečnega sistema %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "vrnitev v nadrejeni imenik ni mogoča" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Varna zamenjava imenika v %s ni uspela" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -81,7 +117,7 @@ msgstr "" "Simbolna povezava »%s« je del zanke v drevesu imenikov; imenik, na katerega " "kaže, smo že obiskali." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -102,12 +138,12 @@ msgstr[3] "" "Odkrita zanka v datotečnem sistemu: %s ima isto Å¡tevilko enote in inoda kot " "imenik %d ravni viÅ¡je." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "opozorilo: simbolni povezavi %s ne sledimo" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -122,12 +158,12 @@ msgstr "" "noleaf. PrejÅ¡nji rezultati so lahko bili napačni, ker v iskanje niso bili " "vključeni vsi potrebni imeniki." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "Seznama priklopljenih datotečnih sistemov ni mogoče prebrati" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "neznano" @@ -139,7 +175,7 @@ msgstr "" "Odkrita zanka v datotečnem sistemu: %s je del iste zanke datotečnega sistema " "kot %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "OPOZORILO: videti je, da ima datoteka %s zaščito 0000" @@ -149,13 +185,18 @@ msgstr "OPOZORILO: videti je, da ima datoteka %s zaščito 0000" msgid "cannot search %s" msgstr "ni mogoče preiskati %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "povrnitev delovnega imenika po preiskovanju %s ni mogoča" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Inicializacija porazdeljene zgoščevalne tabele ni uspela" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " @@ -165,7 +206,7 @@ msgstr "" "vklopljeni izbiri -depth ne izvede ničesar. Če želite vseeno nadaljevati, " "izrecno uporabite izbiro -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -177,7 +218,7 @@ msgstr "" "niso pozicijske (%s vpliva na teste, navadene pred njo in za njo). Prosimo, " "navedite izbire pred drugimi argumenti.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -186,7 +227,7 @@ msgstr "" "opozorilo: raba izbire -d je odsvetovana; zaradi skladnosti s POSIX namesto " "nje priporočamo -depth." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -195,17 +236,17 @@ msgstr "" "%s ni niti ime obstoječe skupine, niti ni videti kot Å¡tevilčni GID, saj ima " "nepričakovano pripono %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s ni ime obstoječe skupine" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "argument k izbiri -group manjka; navedeno bi moralo biti ime skupine" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -215,7 +256,7 @@ msgstr "" "privzeta pot je trenutni imenik; privzeti izraz je -print\n" "izraz lahko sestavljajo: operatorji, izbire, testi in dejanja:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -228,7 +269,7 @@ msgstr "" "IZRAZ2\n" " IZRAZ1 -o IZRAZ2 IZRAZ1 -or IZRAZ2 IZRAZ1 , IZRAZ2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -243,7 +284,7 @@ msgstr "" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" "testi (N can be +N or -N or N): -amin N -anewer DATOTEKA -atime N -cmin N\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -257,23 +298,23 @@ msgstr "" "VZOREC\n" " -links N -lname VZOREC -mmin N -mtime N -name VZOREC -newer DATOTEKA" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path VZOREC -perm [+-]ZAŠČITA -regex VZOREC\n" +" -nouser -nogroup -path VZOREC -perm [-/]ZAŠČITA -regex VZOREC\n" " -readable -writable -executable\n" " -wholename VZOREC -size N[bcwkMG] -true -type [bcdpflsD] -uid N \n" " -used N -user IME -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context KONTEKST\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -287,7 +328,7 @@ msgstr "" " -exec UKAZ ; -exec UKAZ {} + -ok UKAZ ;\n" " -execdir UKAZ ; -execdir UKAZ {} + -okdir UKAZ ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -298,12 +339,12 @@ msgstr "" "za prijavljanje napak findutils, http://savannah.gnu.org/, ali, če nimate\n" "dostopa do spleta, po elektronski poÅ¡ti na naslov ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "preizkus koherentnosti knjižnične funkcije fnmatch() ni uspel." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -318,47 +359,42 @@ msgstr "" "uporabnejÅ¡a. Če uporabljate GNU grep, lahko uporabite tudi »find ... -print0 " "| grep -FzZ %s«." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "Izbira %s pričakuje pozitivni desetiÅ¡ki argument namesto %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "Ta sistem ne omogoča ugotavljanja časa nastanka datoteke" -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "Preizkus %s potrebuje argument" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Niza %s ni mogoče tolmačiti kot datum ali čas" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Časa nastanka datoteke %s ni mogoče ugotoviti" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "opozorilo: -%s %s se zaključi z /., zato se z njim ne bo ujemalo nič" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Način %s ni veljaven, kadar je v veljavi izbira POSIXLY_CORRECT." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "neveljaven način %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -369,22 +405,22 @@ msgstr "" "se je spremenil, tako da je skladen z -perm -000; prej se ni ujemal z nobeno " "datoteke, zdaj pa se z vsemi." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "neveljaven prazni argument pri -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "neveljaven tip -size: »%c«" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "Neveljaven argument »%s%c« za -size" +msgstr "Neveljaven argument »%s%s« za -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -392,74 +428,91 @@ msgstr "" "Izbira -show-control-chars zahteva en sam argument, ki je bodisi »literal« " "bodisi »safe«" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Neveljaven argument %s za -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "%s ni ime obstoječega uporabnika" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "Argument k izbiri -user ne sme biti prazen" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Omogočene možnosti: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "neveljaven predikat -context: SELinux ni omogočen" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Argument k izbiri -type lahko vsebuje le en znak" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Nepoznan argument k izbiri -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c ni podprt, ker ob prevajanju find za to okolje podpora za simbolne " +"povezave ni bila vključena" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "opozorilo: neprepoznano ubežno zaporedje »\\%c«" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c ni podprt, ker ob prevajanju find za to okolje podpora za FIFO ni " +"bila vključena" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "napaka: %s na koncu oblikovnega niza" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c ni podprt, ker ob prevajanju find za to okolje podpora za " +"poimenovane vtičnice ni bila vključena" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "opozorilo: neprepoznano formatno določilo »%%%c«" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c ni podprt, ker ob prevajanju find za to okolje podpora za vrata " +"Solaris ni bila vključena" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "napaka: formatno določilo »%%%c« je rezervirano za rabo v prihodnosti" +msgid "Unknown argument to -type: %c" +msgstr "Nepoznan argument k izbiri -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Trenutni imenik je naveden v spremenljivki PATH, kar je nevarno v " "kombinaciji z dejanjem %s programa find. Prosim, odstranite trenutni imenik " -"iz spremenljivke $PATH - odstranite ».« ter uvodna ali zaključna dvopičja." +"iz spremenljivke $PATH - odstranite ».«, podvojena dvopičja ter uvodna ali " +"zaključna dvopičja." -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -470,7 +523,7 @@ msgstr "" "kombinaciji z dejanjem %s programa find. Prosim, odstranite trenutni imenik " "iz spremenljivke $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -479,96 +532,102 @@ msgstr "" "Raba {} znotraj imena pomožnega programa za -execdir in -okdir zaradi " "mogočih varnostnih problemov ni dovoljena." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Podprta je le enkratna navedba {} v kombinaciji z -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "V %s se mora %s pojaviti samostojno, vi pa ste določili %s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Okolje je preobsežno za klic exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr " aritmetična prekoračitev obsega pri pretvorbi %s dni v Å¡tevilo sekund" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" " aritmetična prekoračitev obsega pri poskusu izračuna konca trenutnega datuma" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "standardni izhod za napake" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "standardni izhod" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "ni mogoče izbrisati %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "povrnitev delovnega imenika po preiskovanju %s ni mogoča" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "klic getfilecon ni uspel: %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "OPOZORILO: ni mogoče ugotoviti časa nastanka datoteke %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Pisanje na standardni izhod ni uspelo" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Standardnega vhoda ni mogoče zapreti" +msgid "getfilecon failed: %s" +msgstr "klic getfilecon ni uspel: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Sprememba imenika ni mogoča" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "vejitev ni mogoča" +msgid "warning: unrecognized escape `\\%c'" +msgstr "opozorilo: neprepoznano ubežno zaporedje »\\%c«" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "napaka pri čakanju na %s" +msgid "error: %s at end of format string" +msgstr "napaka: %s na koncu oblikovnega niza" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s zaključen s signalom %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "napaka: formatno določilo »%%%c« je rezervirano za rabo v prihodnosti" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "opozorilo: formatnemu določilu »%%%c« bi moral slediti drug znak" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "opozorilo: neprepoznano formatno določilo »%%%c«" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "neveljaven izraz" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -577,22 +636,22 @@ msgstr "" "neveljaven izraz: uporabili ste binarni operator »%s«, pred katerim ni " "argumenta" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "pričakuje se izraz med »%s« in »)«" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "pričakuje se izraz, ki sledi »%s«" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "neveljaven izraz; preveč zaklepajev »)«" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -601,126 +660,128 @@ msgstr "" "neveljaven izraz: pričakovali smo zaklepaj »)«, ki ga ni. Morda potrebujete " "dodatni predikat za »%s«" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "neveljaven izraz; prazni oklepaji niso dovoljeni" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "neveljaven izraz: manjkajoč zaklepaj »)«." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "opla -- neveljaven tip izraza!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "opla -- neveljaven tip izraza (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"opozorilo: v stroÅ¡kovni tabeli za vrednotenje predikatov ni vnosa za " +"predikat %s; prosimo, javite to kot napako" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "poti morajo biti navedene pred izrazom: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "neznan predikat »%s«" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "neveljaven predikat »%s«" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "neveljaven argument »%s« za »%s«" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "manjkajoč argument k »%s«" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "preveč zaklepajev »)«" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "nepričakovan dodatni predikat »%s«" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "nepričakovan dodatni predikat" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "opla - neveljavno privzeto vstavljanje logičnega ALI!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Uporaba: %s [-H] [-L] [-P] [-Oraven] [-D" -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [POT...] [IZRAZ]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "trenutnega imenika ni mogoče zabeležiti" +msgstr "začetnega delovnega imenika ni uspelo shraniti" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "trenutnega imenika ni mogoče zabeležiti" +msgstr "začetnega delovnega imenika ni uspelo povrniti" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "Ne upoÅ¡tevamo neprepoznanega stikala za odpravljanje napak %s" +msgstr "Ne upoÅ¡teva se neprepoznano stikala za odpravljanje napak %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Manjkajoč argument k izbiri -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "Izbiri -O mora neposredno slediti desetiÅ¡ko celo Å¡tevilo" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Prosimo, navedite desetiÅ¡ko Å¡tevilo neposredno za -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Neveljavna raven optimizacije %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -729,7 +790,7 @@ msgstr "" "Raven optimizacije %lu je previsoka. Če želite najti datoteke zares hitro, " "razmislite o uporabi GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -738,64 +799,382 @@ msgstr "" "Spremenljivka FIND_BLOCK_SIZE ni podprta; na velikost bloka vpliva " "spremenljivka POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "neveljaven argument %s za %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "dvoumen argument %s za %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Veljavni argumenti so:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "napaka pri zapiranju datoteke" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "napaka pri pisanju" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Neznana sistemska napaka" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: izbira »%s« je dvoumna\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: izbira »--%s« ne dovoljuje argumenta\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: izbira »%c%s« ne dovoljuje argumenta\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: izbira zahteva argument -- %c\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: neprepoznana izbira »--%s«\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: neprepoznana izbira »%c%s«\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: neveljavna izbira -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: izbira zahteva argument -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: izbira »-W %s« je dvoumna\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: izbira »-W %s« ne dovoljuje argumenta\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: izbira zahteva argument -- %c\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "začetnega delovnega imenika ni uspelo povrniti" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "začetnega delovnega imenika ni uspelo povrniti" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "»" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "«" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[DdJj]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[Nn]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "pomnilnik porabljen" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "neveljaven argument %s%s za »%s«" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "neveljavna pripona argumenta %s%s za »%s«" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "%s%s argument »%s« je preobsežen" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "ukaz je predolg" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "klic exec() ni mogoč zaradi omejitev glede velikosti argumenta" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" msgstr "posameznega argumenta ni mogoče umestiti v obseg seznama argumentov" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "seznam argumentov je predolg" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "Spremenljivka okolja %s ni nastavljena na veljavno decimalno Å¡tevilo" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Datotečni deskriptor %d bo puščal; prosim, javite to kot napako in podajte " +"natančen opis najenostavnejÅ¡e situacije, ki privede to te težave" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Pisanje na standardni izhod ni uspelo" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Prevedeno z GNU gnulib, različica %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Neznan tip regularnega izraza %s; veljavni tipi so %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "Nepričakovana pripona %s pri %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" msgstr "Pričakuje se celo Å¡tevilo: %s" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Neznan tip regularnega izraza %s; veljavni tipi so %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -804,8 +1183,8 @@ msgstr "" "Uporaba: %s [--version | --help]\n" "ali %s najpogostejÅ¡i_bigrami < seznam > kodiran_seznam\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -814,68 +1193,63 @@ msgstr "" "Napake v programu sporočite na .\n" "Napake v prevodu sporočite na .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "napaka pri pisanju" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Uporaba: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "Varnostno raven morate navesti kot desetiÅ¡ko celo Å¡tevilo." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Varnostna raven %s je zunaj dovoljenega obsega." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "Varnostna raven %s ima nepričakovano pripono %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "raven varnosti %ld pri slocate ni podprta." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Pisanje na standardni izhod ni uspelo" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dni" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "Argument k izbiri --max-database-age ne sme biti prazen" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Neveljaven argument %s za izbiro --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "zbirka locate %s vsebuje ime datoteke, ki je daljÅ¡e, kot ga lahko locate " "obdela" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "zbirka locate %s je poÅ¡kodovana ali neveljavna" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" @@ -884,17 +1258,17 @@ msgstr[1] "Velikost zbirke locate: %s bajt\n" msgstr[2] "Velikost zbirke locate: %s bajta\n" msgstr[3] "Velikost zbirke locate: %s bajti\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Ujemajoča se imena datotek: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Vsa imena datotek: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -911,7 +1285,7 @@ msgstr "" "\t%s vsebuje znak za novo vrstico,\n" "\tin %s vsebuje znake s postavljenim osmim bitom.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -920,17 +1294,17 @@ msgstr "" "Nekatere datoteke so bile pri filtriranju izpuščene, zato ni mogoče " "izračunati faktorja kompresije.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Faktor kompresije %4.2f%% (večja vrednost je boljÅ¡a)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Kompresijski faktor ni določen\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -939,7 +1313,7 @@ msgstr "" "zbirka locate %s je videti kot zbirka slocate, vendar je videti, da ima " "nastavljeno varnostno raven %c, ki je GNU findutils za zdaj ne podpira" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -947,13 +1321,13 @@ msgid "" msgstr "" "%s je zbirka slocate. Podpora za tovrstne zbirke je nova, mogoče so težave." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "%s je zbirka slocate z nepodprto varnostno ravnijo %d; preskočimo jo." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -964,36 +1338,36 @@ msgstr "" "oblike slocate, ki imajo varnostno raven, viÅ¡jo od 0. Za to zbirko ne bo " "ustvarjenih rezultatov.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s je zbirka slocate. Vklapljamo izbiro »-e«." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "Zbirka locate »%s« stare oblike je prekratka, da bi lahko bila veljavna" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Zbirka %s je v %s obliki.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Zbirka uporablja vrstni red zlogov »big-endian«.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "Zbirka uporablja vrstni red zlogov »little-endian«.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Vrstni red zlogov v zbirki ni razviden.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1012,61 +1386,61 @@ msgstr "" " [--max-database-age D] [--version] [--help] \n" " vzorec...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "ovržba privilegijev skupine ni uspela" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "ovržba privilegijev setuid ni uspela" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Celotna ovržba privilegijev ni uspela" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "ovržba privilegijev setgid ni uspela" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "opozorilo: zbirko locate lahko preberemo s standardnega vhoda le enkrat." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "sistemski klic time() ni uspel" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "opozorilo: zbirka »%s« je starejÅ¡a od %d %s (dejanska starost je %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" "OPOZORILO: zbirla locate %s je bila zgrajena z drugačnim vrstnim redom zlogov" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "nepričakovan EOF v %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "napaka pri branju besede z %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1075,7 +1449,7 @@ msgstr "" "Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika; " "vrednost znaka ne sme presegati %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1084,7 +1458,7 @@ msgstr "" "Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika; " "vrednost znaka ne sme presegati %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1093,7 +1467,7 @@ msgstr "" "Neveljavno ubežno zaporedje %s v specifikaciji vhodnega razmejilnika; " "neprepoznan sledilni znak %s." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1102,44 +1476,59 @@ msgstr "" "Neveljavno specifikacija vhodnega razmejilnika %s: razmejilnim mora biti " "bodisi en sam znak, bodisi ubežno zaporedje, ki se začenja z \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "okolje je preobsežno za klic exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "opozorilo: vrednost %ld za izbiro -s je previsoka, namesto nje uporabljamo " "%ld" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "izbire --%s ni dovoljeno nastaviti na vrednost, ki vsebuje »=«" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "ni mogoče odnastaviti spremenljivke %s" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "opozorilo: izbira -E nima vpliva, če sta uporabljena -0 ali -d.\n" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Signalnega ročnika SIGUSR1 ni mogoče nastaviti" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Signalnega ročnika SIGUSR2 ni mogoče nastaviti" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Vhodne datoteke %s ni mogoče odpreti" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "VaÅ¡e spremenljivke okolja zasedajo % bajtov\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "Zgornja meja POSIX za dolžino argumenta na tem sistemu: %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1148,18 +1537,18 @@ msgstr "" "NajmanjÅ¡a dovoljena zgornja meja POSIX za dolžino argumenta na kateremkoli " "sistemu: %\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Največja dolžina ukaza, ki ga lahko uporabimo: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "" "Velikost ukaznega medpomnilnika, ki ga dejansko uporabljamo: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1171,7 +1560,7 @@ msgstr "" "Izvajanje ukaza xargs se bo zdaj nadaljevalo, in skuÅ¡al bo prebrati vhod in " "izvesti ukaze; če tega ne želite, vtipkajte kodo za konec datoteke.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1180,7 +1569,7 @@ msgstr "" "Opozorilo: %s se bo izvedel najmanj enkrat. Če tega ne želite, vnesite kodo " "za prekinitev.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1189,15 +1578,15 @@ msgstr "" "%s narekovaj brez para; privzeto so narekovaji za xargs posebni, razen če " "vključite izbiro -O" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dvojni" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "enojni" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1206,155 +1595,320 @@ msgstr "" "OPOZORILO: na vhodu se je pojavil znak NUL. Ni ga mogoče prenesti v seznamu " "argumentov. Ste nameravali uporabiti izbiro --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "vrstica z argumenti je predolga" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Pisanje na standardni izhod ni uspelo" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "odpiranje /dev/tty za branje ni uspelo" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Pisanje na standardni izhod ni uspelo" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "pomnilnika ni mogoče dodeliti" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "nastavitev spremenljivke okolja %s ni uspela" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "ustvarjanje cevovoda pred vejitvijo ni uspelo" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -"branje medpomnilnika errno v xargs_do_exec ni uspelo (to je najverjetneje " -"napaka; prosimo, javite jo)" +"varno branje medpomnilnika errno v xargs_do_exec ni uspelo (to je " +"najverjetneje napaka; prosimo, javite jo)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" "branje je vrnilo nepričakovano vrednost %d; to je najverjetneje napaka, " "prosimo, javite jo" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "napaka pri čakanju na proces naslednik" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "OPOZORILO: Sled za %d procesi nasledniki se je izgubila" +msgid "WARNING: Lost track of %lu child processes" +msgstr "OPOZORILO: Sled za %lu procesi nasledniki se je izgubila" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: izhod s statusom 255; prekinjamo" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: ustavljeno s signalom %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: zaključeno s signalom %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: neveljavno Å¡tevilo za izbiro -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: vrednost za izbiro -%c mora biti >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: vrednost za izbiro -%c mora biti < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Uporaba: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=razmejilnik]\n" -" [-E eof-str] [-e[niz-eof]] [--eof[=niz-eof]]\n" -" [-L največ-vrstic] [-l[največ-vrstic]] [--max-lines[=največ-vrstic]]\n" -" [-I nadomestni-niz] [-i[nadomestni-niz]] [--replace[=nadomestni-" -"niz]]\n" -" [-n največ-argumentov] [--max-args=največ-argumentov]\n" -" [-s največ-znakov] [--max-chars=največ-znakov]\n" -" [-P največ-procesov] [--max-procs=največ-procesov]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=datoteka]\n" -" [--version] [--help] [ukaz [začetni-argumenti]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Uporaba: %s [IZBIRA]... UKAZ [ZAČETNI_ARGUMENTI]...\n" -#~ msgid "cannot get current directory" -#~ msgstr "trenutnega imenika ni mogoče ugotoviti" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Izvede se UKAZ z ZAČETNIMI_ARGUMENTI in dodatnimi argumenti, prebranimi z " +"vhoda.\n" +"\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Argumenti, ki so obvezni ali neobvezni pri dolgi obliki izbire,\n" +"so obvezni ali neobvezni tudi pri pripadajoči kratki obliki izbire.\n" + +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null deli so med seboj ločeni z znakom NUL, ne s\n" +" presledkom; izbira onemogoči obdelavo \n" +" narekovajev in obrnjene poÅ¡evnice, kot " +"tudi\n" +" logično obdelavo EOF.\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=DATOTEKA preberi argumente iz datoteke namesto \n" +" s standardnega vhoda\n" + +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=ZNAK deli v vhodnem toku so ločeni z ZNAKOM " +"namesto\n" +" s presledkom; izbira onemogoči obdelavo \n" +" narekovajev in obrnjene poÅ¡evnice, kot " +"tudi\n" +" logično obdelavo EOF.\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E NIZ Nastavi logični niz EOF, če se pojavi NIZ v\n" +" vhodni vrstici, se preostanka vhoda ne " +"upoÅ¡teva\n" +" (izbiri -0 in -d prevladata nad to izbiro)\n" -#~ msgid "invalid argument %s for %s" -#~ msgstr "neveljaven argument %s za %s" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=NIZ] enakovredno izbiri -E NIZ, če je NIZ podan;\n" +" sicer ni nobenega niza za konec datoteke\n" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "dvoumen argument %s za %s" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R isto kot --replace=R\n" -#~ msgid "Valid arguments are:" -#~ msgstr "Veljavni argumenti so:" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] niz R v ZAČETNIH_ARGUMENTIH nadomesti z " +"imeni,\n" +" prebranimi s standardnega vhoda; če R ni\n" +" določen, privzemi {}\n" -#~ msgid "error closing file" -#~ msgstr "napaka pri zapiranju datoteke" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=NAJVEČ_VRSTIC uporabi kvečjemu NAJVEČ_VRSTIC nepraznih\n" +" vhodnih vrstic na posamezno ukazno vrstico\n" -#~ msgid "Unknown system error" -#~ msgstr "Neznana sistemska napaka" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[NAJVEČ_VRSTIC] podobno kot -L, vendar privzeto vzame le eno\n" +" neprazno vhodno vrstico, če NAJVEČ_VRSTIC " +"ni\n" +" definirano\n" -#~ msgid "%s: option `%s' is ambiguous\n" -#~ msgstr "%s: izbira »%s« je dvoumna\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=NAJVEČ_ARGUMENTOV uporabi kvečjemu NAJVEČ_ARGUMENTOV na\n" +" ukazno vrstico\n" -#~ msgid "%s: option `--%s' doesn't allow an argument\n" -#~ msgstr "%s: izbira »--%s« ne dovoljuje argumenta\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=NAJVEČ_PROCESOV poganjaj kvečjemu NAJVEČ_PROCESOV " +"naenkrat\n" -#~ msgid "%s: option `%c%s' doesn't allow an argument\n" -#~ msgstr "%s: izbira »%c%s« ne dovoljuje argumenta\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive s pozivom pred izvedbo ukaza\n" -#~ msgid "%s: unrecognized option `--%s'\n" -#~ msgstr "%s: neprepoznana izbira »--%s«\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=SPREMENLJIVKA nastavi SPREMENLJIVKO okolja v " +"procesih\n" +" naslednikih\n" +"\n" -#~ msgid "%s: unrecognized option `%c%s'\n" -#~ msgstr "%s: neprepoznana izbira »%c%s«\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty če ni podan noben argument, ne poženi UKAZA;\n" +" brez te izbire bo UKAZ izveden najman " +"enkrat\n" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: nedovoljena izbira -- %c\n" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=NAJVEČ_ZNAKOV omeji dolžino ukazne vrstice na " +"NAJVEČ_ZNAKOV\n" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits prikaži omejitve glede dolžine ukazne " +"vrstice\n" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr " -t, --verbose izpiÅ¡i ukaze pred njihovo izvedbo\n" -#~ msgid "%s: invalid option -- %c\n" -#~ msgstr "%s: neveljavna izbira -- %c\n" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit zaključi če je velikost presežena (glej -s)\n" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help prikaži ta navodila in zaključi\n" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version različica programa\n" -#~ msgid "%s: option requires an argument -- %c\n" -#~ msgstr "%s: izbira zahteva argument -- %c\n" +#~ msgid "cannot get current directory" +#~ msgstr "trenutnega imenika ni mogoče ugotoviti" -#~ msgid "%s: option `-W %s' is ambiguous\n" -#~ msgstr "%s: izbira »-W %s« je dvoumna\n" +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Način %s ni veljaven, kadar je v veljavi izbira POSIXLY_CORRECT." -#~ msgid "%s: option `-W %s' doesn't allow an argument\n" -#~ msgstr "%s: izbira »-W %s« ne dovoljuje argumenta\n" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Prevedeno z GNU gnulib, različica %s\n" -#~ msgid "`" -#~ msgstr "»" +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Uporaba: %s [-0prtx] [--interactive] [--null] [-d|--" +#~ "delimiter=razmejilnik]\n" +#~ " [-E eof-str] [-e[niz-eof]] [--eof[=niz-eof]]\n" +#~ " [-L največ-vrstic] [-l[največ-vrstic]] [--max-lines[=največ-" +#~ "vrstic]]\n" +#~ " [-I nadomestni-niz] [-i[nadomestni-niz]] [--replace[=nadomestni-" +#~ "niz]]\n" +#~ " [-n največ-argumentov] [--max-args=največ-argumentov]\n" +#~ " [-s največ-znakov] [--max-chars=največ-znakov]\n" +#~ " [-P največ-procesov] [--max-procs=največ-procesov]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=datoteka]\n" +#~ " [--version] [--help] [ukaz [začetni-argumenti]]\n" -#~ msgid "'" -#~ msgstr "«" +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s: nedovoljena izbira -- %c\n" #~ msgid "Success" #~ msgstr "UspeÅ¡no" @@ -1410,24 +1964,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "PrejÅ¡nji regularni izraz manjka" -#~ msgid "^[yY]" -#~ msgstr "^[DdJj]" - -#~ msgid "^[nN]" -#~ msgstr "^[Nn]" - -#~ msgid "memory exhausted" -#~ msgstr "pomnilnik porabljen" - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "neveljaven argument %s%s za »%s«" - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "neveljavna pripona argumenta %s%s za »%s«" - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "%s%s argument »%s« je preobsežen" - #~ msgid "block size" #~ msgstr "velikost bloka" diff --git a/po/sr.gmo b/po/sr.gmo index 6d73e89602ef9f0fb549339592f9e61989535685..44f36bb8904353142528590dc56ef5357bfc8f91 100644 GIT binary patch literal 51385 zcmeI537i~vb?3{01v23@cYsg^21&7cEcpNe$jKOxAtmnt3NL$sKMDL*;AOzS1Wp3i(uv>!;5OiE zUJu@ZHvom=JAg}pp8~4AKLYYE`9A-Fg5=e7uKwQ?;1(cFCwl_CA6Vl2%Rr`({9U+y z;$V`boSzOn3wR;$`M_I&X9Mp8iY|`=YF8*^=ClM>zyFwO~5)(^!|CE=bt0^bV!UEnVQU%;d;27UpkdA#IQ z$KN}E|BLghfNF0C|7kp*0t!EW1_V{fs~F5Jz}3Ky0e>I38hF(iPM2Q+s^32ZY99Xx z+yY!mV@xIa86YG`z5u)j{QoB)Lrbm&>7X)s82AC;p8}amas{31`kg?AmV5;$e0(3c z5?ET6Bn@B#_-^2z0{NG`W4X`wr-85J{7feMGT_Dlt3Zu!4{!zWAaE7%AAp+wGA_Ol zSO==T_W^$lcqm-|D)2R&e>0r_J@6#Xp9OKB30w$#7O(`=_0xgx0=^UYYT$n0OMt%( z6d!*ZsB%97v1lrJ15oFqK+*X+;A?^Vfhn*P;NJqpw;O;V z{728@IDxqWHLf$xcRbgC;*%Ee`M`ZZjq5YOMU+1R)I7g?f%C(^0EPcojyT^A0fpZY z;In~MpvM1h;6=cjfS@{g3^+o2>D!!Nu6Voa>t6zjPX7}qetG>G=f|G{LfWJQ6ra8T z;e8$OeL%^>{lIg89pIkJDt7*{2u-O0C*|zuixS0S+glgDxCi` z@Xsm#cbi?_zIkDi`~v5vz0>W)9|O6ST*72h;4cIJ2e1PK70FjFh9ie*#4GlHrQu?;7BjI6nduU9YCluLC~~Tm_t&biVjJ5LK4^ z9Z>jx!#2Oa0SF5vw*fx|{1)&q@VY8v2ClpUUIRX7yUY2PfQvZ)I*?n*KLb|+t2L+p zF9I*%{25c&Cg2(%Lrd-lg8Jk+b%&P%Q8~$ep!C&W0M7-!w&8ko6nG`)cLQGzeEBpu z1D*m@|3`ru_kRJd1(r~1(i>L+Zv=h=_%`6yrt{G!fiD5yUjwcLKGuTgx&OKup43wNd_a<=9`J3oW^}h>*wUglwzysXh z2ZU9UT|e#cF(4>QF8CRz+hO2~DEEEftAPU_a(%VnX6MWOK=I#y2kro#atpEt{5bGT z;Ayv_lYlkgUsL~npvH0QZ7!F81N;H!YiJZsPnF;B$cA0iFo_E8y9{6Yh1qp95UN`QHLh z2EOh-Z)Y9w9L{e8z7O~f;OW2%?{_)-0C0r!-vSC>FMGgY8z_GNJ>X9PUjq}gf$src z2>e^1=zsptJ03pQ;w%k0AYpX_ko*%lfUSC@i1^H=U@M{-M@{X7c1i1QPU`25}l{2=4}8n6kx=uy`jzxgXZ zpFan3*?dia=@RjQ{%+xr4Cs$$Z9eOP&*x}!zygM=JAtQjh`%N{5FO)jK=L0seuaan zWq+4vzx>BZfQ=lmn#s&_{c`sI6u&gb0DlYkevT22mvf*Rk}q;dF86WhZ-%4AaRtZq9B<cm-1tl<0_8(IbO!0KiDFHC6ecHz!LU1$p62` zaSg}$cE$f&Rrsx+dpW)quH6&hc>(?b@HaU=!toi7MI7;O6F+{H|DWOz z&%VR1xSTyF{4RnO;p9OeY-f73Q4V@JJs)gUH`TbFjfpF~w0d58!4ZnXJcrV9Vjt_A( zIqu@Pfa5(JHICPDJj$WJ-{rWK<1C%<_X!8dzXQIOW0d2Y9KX+THOH4Z)^R+-v71AG zdpOSE80XO6uW@X!U;f_>fM4f0k>f^=H*$QOLw|=H*#FPs|8H^J&GBZAb2)C~(BIEG zNEQe9O93tkP+(X1y(7SB;MX}`$#F7AnL~g39ax-nQ}``#3CF8BcIt$`OF5py@vJW< z$^T~XuXr(fiQ@u}OF5=FuH)Ft@i0e+UnGk(K4e%GoR^wX4Z@l&oT&sAotlZXL zcib22CIiE}Dq}P4YNMVuCemHy=430~S*_L5u|~aJtsl+V)~9FMR-!pmr{2^QrCZC>>O|V!R^@(+HmJL;+)j5lX40MIdb={NCbpHQ zrz`cv>2$49ZdKCu?rHwpR!J-M@ls==G*PWp((RSqt#-4qy)rbA3~a1SH=6BqbcRt< z|15q`sy@yHYOQl7>oY@*=H%HbSsv4zTFcVXc%@cpSJKjSvs!O232-7kZ~ex#D>tX5 z3A@hu$eQ8oqFqY|Qu_-O2pyYgHY@dZ zO4-U-yV2aeJdMRFyQZ6!R!a;(VaL)y;o?+zw|JpdZMET$Wocu&(k#=$c}2WQJ>PRxKk~U!YjI6g$1`&YvXCCTxsR)wYD{OmTJ{0ac$vGm(y?= zGz1Q&AjGUy>XYqlc@sM-O~X~8x_&lh+7g0zw_2ZQG^ffYR&%B$$*SyXL)&$mhcDio zwOwz_v?|TCRBuc+8#B|;LKNJva`Wcljq5n8G^f%nrBk-9UB7xbEj25Xm0j^}WE;t( zVWPCNS#A3-aomjkj-_^PYcQ?yR3%nVORegam2};f(XpM|*Pg#MEw!6Se#r!qi{sPq z_-ZcCRL9eGu^C3o85cF`bt~60s9jw(wkBy>8c9X6{(mivp$ykC8<=6NvSOpKQChQ@ zOH<`tMuOIgwJR?!tr=N2yh*LlTZ$r?YQT^Aje4VA8m*P<+k-X|?OG`)3xn<7zg-RF zh5_mo>wQD)T^!`SZ`ingmGv$SSM1$yWUQup<+NR$@|MbK36*M^Y=!BFY#^pSxi=#g zZlx2=#*}H1#ilGy9Vc)h4KxsIo zh%AkPR@$1bj8!M9mGR}rA5a6$*xXrd(Vc!(+)#BH9}pP_Rn?#Zn{HXLv1?f2GMo+x zM%ImN9$C4jv~uJ5n=qJ&utcq8_VW0HGCt_0zFAV5ZlyEzY<`b}g5_2V=1Q-6uOYRz zC6kt}u?xE`c&b)z8b;S(T`?4HM9j)Yes7=-C1=Nk%tZge z9JA5N@d*&rl-w$;c74p%5hmJkJhrXebRJq_s8E<2*(PHfY{Rt1C9S|rR=c8ygkgY<7F(Jd`YH&w9HJ)Uqtz}uz^^_-OO-DrIrqkFHc+BtJBjOP_;cY ze?voQy2)Ef;T8>^#u-Dsf>(^2ggYhmg<3=bs|4=yv76gG(=>j=)1b96SH&9V(wbsBNtyQYBoG&*nO zy!EZ1ql)(f-{Ehy8P8Oz_=%VdqM#LtxW-W!L&@>m-_*cl(EE6UVBm+?kE8(JYK(2K z;3v7x{b9_fwR>u`QG?rY1h+r=jv!?#9U2-EI6Hl7nye(4J`cQ_7qE=W1Ify0G0ftc z&m4F`u|XLpqEWBy=0C+BZ6qmKRj!N5V>KzQ*S;EJ~d!#zKnDHjSKr;iipCQQao?Nc(s#pG98c z)Hx;K!5EI>wpJVI;ORrBP7DsF3%6A#@zTWaqlS}31Iem6rMWv($9ch*N1j$kYXB{{ z174-EI1%HQ+vEv`&9FxcE^??uX?3QNhx^5u-kgaYlciEw0*=}k$NQW@&$;?YhNV2u z9ZFYMVBTgj92I3boo=+M=9a`7a#bdoUU4Xc7;HIXlTaQS=G8?*D=v0Q&MTYLG7ML% zd6ZwcH8E3zqsE(!Y0Oo12Q?-u#j36HM1=yqEvO@C&|MO5YGCiCgtXdzd&5X;cjaLv9>ABc$NPda(c)}#3aGG{1 zHK8OI#(jJSJ7lc~OF!h}a=(6C8GMvUu}saNQsruT&OqV^qm1q*ei|BBuVk2n*TlwZ zE*=>8Q3^zn&m*nHY1a*`o~0t>wc*T?fKUNNUxnKFO}B8Gj3g!<#a1J5@VenLm`SYs zv=D*&Lad~QkPjk7<#gYd?k#x+}^F(zL{#7z4RZ7XY4tk-{ zB*0vgnx&u#8epWz}^s|QwxJ->7eiyr* zVi)ZuYDwBEn~tQ-W66v;@;;7o1gT4i^#rYA^KWG545 zN^;=Xw{e@+qCb>+-fcmPvoXdta;qgPY7G$Rx7>#-*IJDMtw?yyjQ^=9VGxeS8f3>? z(~bJLu#YDuHE6kQwC37!n|w0YrSu9u-1^#h$=wJ-rta8N46ngp;jAqr1iYItChMbP zSFOv9Lp)Hpr1GhdyYLpH*ir#a$(KAiS>FfQwVBwDv?Y=1$V9flBC#~jUMj1l#Pn{` zcGa=%wcU$la#~f{>KXAsdj7f#!yJZ^4ZalPiUdT%Kt-1(txn;MSJ7cO3*`xvTUuJ5 zY;*&>Q2HG%9^0;vcv5~GJ}kr7MK6nd)n-SP{3tljR&8`yc{LBh2By(N%A#&-x2Kn# za!RYb1JzpIHWb!&PJu}mE1e{5XO@=)%+AUv>ke8eKojmp@faZoDpSal@G##pQL-^l z(KvVKtkjjo)4ZmXE6VSiD{RR+lf$8bfn-xpjsfF=nd=uH5A`Vv17J5qmcWyBXx6Uc z2c=B~%hYM$(~F$$cW7b8FfdxdspmSxz+y?$8y^Hr&|JkxGyRffDX?2E5i zHwGoEKHc8tRy3^P#dL^C{?2V6*b7PE&}Ws22|TB{5;s@^7z z;>v29K9xKXVnS;{%lKGP7CTGw2AhpqNm`k~nHEahp6m#nDXPVB=WW z){=A;tr4odZs>K3$!E+c_&`ZwOSlIz(TQdnWG^x!ZMPR0lA;r30zX=vEJ*{w%Tr~U zj!KDWiKWf@SVOHKaboNyt-kEsHS1Ts{jyCXmkh@)GMi<&Z%EI!>cy;o)CWZe-oCV9U`h=Jp zI~gZ2NJbPQqNqA#19wQBmt!z#_SjI-m7^(}QXfh#?2}2AE*Wfb%QL{4C`%fZH^O@w z%kHuyOb9AsW;qngEe*06!$Sd`x?7|$?!p$v*8Hz6md&???e~zB*K+*U0oX!+pj(Tr zmnoy)s9y$qH_PO@&$3aoLW_bsJGc*}$kYQ}Z7)gHXq^niRu-_eZlIp*xA)Xl`U2fp zqyIMOzxC!>>euSDs~ju*WinlAI(EB4S5&m3%fohWiL?%*2i^e)GldFL1uSr+!Vq*Y{_KBI^D0O>r{4=l~rZR9Pjw2N3bm6)~@TaM9b(@t&M zfKGh_ff!=N=67uv&fBns_lQx2g(+*WeaU9*Au3>Y>bR+0RA0Yg^T_&jTjjmR<*O}4 zr%HDQl8aVuTsN}r{AKAHt>?S%h*BTKwe8u(kryqe>n>bV3|q!b)n_)w9WuOO@}(Y^ zW6`Er4K=5PtrcWNf;r0MNonR#k3L+?1k`w`&2QR`rzL19T@gg30|}q zFgk-n8JuF=IP|z}AW}BVjZAV;+19a4e}siet)w%tK`>5!(i*RieRci7-p@sYm&xB2yj^W#v5N^-NX>l7jC!l&ET+jM1b}NAAtJ zpK0bXxOX|1GOxHo<#dT5W|T*5&O_<3G>2BZveIN=T~P=4UZ<>OiydHLBOlB^S*dH& z7HxaT%gkeg$RN@!y@@>XE4Lk62aHx{ane5?>) zAmrh~gz~Knn*n6C1D|H+W;CryvmseklIrnyiwqwr(Y#$*mAO7`BCBj+cccQgg*8PD zZH#yfj7?Wb#)Z8Okbiq3OeF5*CPiNlV$F356C{y+5Th*Zf-?mbmwD*xDRiXI_KaRO z-ndMtOYx~`hkueHviOS3EFB;Ac!pekwY^9!<6@{aQ5i2uUa~n=%-V16EVD|&O|fm? zi(N*-E15zvC(XEos)T&3H7L&-OGqHY4G&S3w!eIEaBysa#txw?%^g8pCT6rKAybeb z9F{OwoSF+t$b&2(89HAHR;+d^N>>?ENDCG%NG2SGu$e8(xWp6|XL|0F#Gk}G9kYP; z=k+aM3xB7OjX$N0k`y`v-V37;dn?INt%GzF;+!>}K4s^W3CM8v73m;bJ`ob(1l^J> z)*7^jD@za*3X$`9e1p(BVv&KfV5O^1wt*a@++?LKql_L%eVAgOByI!neUauwUk-0% z*E31JJY>KHv%5KK^trS=9kJDR=OtkXY*=JaPT>ktH&Yd~A9S#NSP)dQtlcjx2M_ga z(03;}Mzuf1J$zL|qbWf$PqoO+-2({SN+ZTz39liDyt4s$e>pu-3?vK8?`5GSu>in0y#;zk=Gj(+Ycc`fQ03VQn!`Ta`e7 zp}5<9AexMc7$t@CByASdhO7#DJ%s)VO8}Nd&SZk74Id;9wY4{n7*pvR)0N*Lvx&rE zf|>P6NpH!VZG1n^!ol%H$1O#Hz#wcOB5RF;vvEPCF?NfQYG?bsOeOf#Dz7qf@-vV$ za>%wB)CI>j-7Q)cBE^O2@WmT8ri%!6PV%2@P!>Db<9Gk;wDQCA4VGpNJI_5lCr6mvQ z%}>F;T*iU~?svV>=kh?(Dr4=m?}05E=2XfvsN*q=ZCkhqSsG=n8G|`fH@7d?h@r$i zyd-Wr?3E%sFu1I+0g)PUN4I%4`DxhuV2@Cw3)iL61yK3qbrSZH{l8B1D1(cX-S%a+ z1E4+6XvJL+ZRL+GRcofR zHpGVz(8M%WIGveN#cGx^DctM(go1CbqDoK0Q(<~jakSkX0i!T!aM^XnKz*TkJz`2(E3F zU#=C3sQ&DVYZ{Xjkdu2I~v1m zlO~Z;h!{^9%IjZPXP0KQN3dyY#@0i|8x{qH9cZ?zzk*(1+ln$KQYxZ}HvBCj%-pQp zx$-2a4E@CJGpGeVs?7PXkawK1xD6-A7*9c#=4E8W23Wk{$GmyGx{k3rZPt zvDrXtMYa?Ne%RAw>3P(?IVTHB+H<0bEug8DS`gFH0ULfq3?)z;CKV8bt<& zmTFtjqMRD@#UXjL+_lanmk0UJR_*hK#0p;2yh>2lwWX0>^RmWSF(YBgC2XLtY6(+h zEv0>2i;%^4M(3n_=%toRRoR`)YDr;wIJ;5UOXiMx0U zzs(;<)4jkwJF!|sxbUUz>_(+Q8T?;8IH*X^{B^HYqSkWP8d`j#Uy>y_V{nb-+FYMO zEr~J(xW)c=S99neX%M?ppmCoWio#4Q;L3v&&zr?dVWpW;o}cpTu9_uG1utnKEoF;Y z=%B)rM$yY*l<>mNioy)(MBAyGxkBDQX%940SgUkmD6Wy8r){l}moSfk=lejldgmJ^ z-EYVy+7(4@Xg01OGf^5DFTK-OSC*LqwdZ2f(}&I&T6$`Dc($~*g|#o8%OkX<&5dQY z{UY=8<0G^K8`f_wtwOFeveIf~ds%wwlBK7Ymb|&N^eySqrOQrz^T|t=E?Gjs(nhxU zXhA10cUo!blG2hh()T`UIE&CiE#$yM#_H+!PEY7CI`s55+wX~UM z-3Zor8bxcaXDyV5gi9CYMcB0899TQDb~wk*(xD{-t1xx2W@)o6r0JQ=Q`i+>t^0;D z{OlDMZa%McW?oLiCk<8_4okVq(lgm!Ik2HN!?JtnJe*>7UDc=Uw6)?i=?mRiv9Lb4 zbjgYpOVc;LG1bo{C#_hzl)d3gQi^ka_KH*Et+Q5~uAf$8$yrM=KJW1=lv%QfI!mc@ z>LNYp+u7TBr1RO?J+n6nf1UlacXke>!XYT#4{9G0OlR-nD!=T%{hf!o)H%Zat7osV zY6pP_7pJ=XD9ArFd#&2DT2^@WM#w?YRLyrDqR3~}*0n~pM`%iYdXsx7@NnlrU3nyL zkE^P$>dWayBu=drz!BQstMW(rc{H89iIM<~jf&YFDS9M~?-1vdwYJra5(SABI>K@&cmAY{Ewh_KGxaSxfemWxpRO1AbQu;&TYC$vHLr>ckb-m z9(*0ZQWbD-(>$KG=}K9Md_?kXOl ziToM%-U9R9iA@s6&21GbNqxXMkVW)>PS-*m@fyq`#uBZJEAA4L!ZFZA7es9%DNJ)1 zwk)zS`giXdE5Bw-4EJ#?&;hM*WC@tKiYXen&wu>o?2T`bIg9kF|KhR2B}B5a1eb& zk5VIhz$~aSQuJ-jhGw%q=mO8+U636aAm;$sM6x^k^O4#nDO)w^dW1h`GwafW^o%^#X_kS%w=aY!oEuFhmsqk)qj)e5*px52;4FSc1F{+otY##38d`&>H z4bPiCrFR9G^xq+-dctoEh;(+A!Geh4kERmP_;B`$jgr!2?rQ|B+neCzz0BwKlA-E0 z@aL=@S{5C#P*C5yfNElfy{7nY5*?-6=4pkZ2TI0+NTG4l^-=ZZ%^&L*-O7YYpP|5_ zjdjypWYI9H$f5^qx;^hL=pCp_^vB_k`%IQynkA_Sg`9-rOtiaxmyBwx#{N=oseBTq zfljbtb-x5*j?pQiBl9&({2r2SHpOBF7h&o(X1BZFA|FJ0*Byub%tJ!AhyP_79x5Qx z2GsK+h0Yy@sXL1UDg2J=4z7^flQ*WeaXOf>42=5bKQkJ1{8?BC9n1j0Yv@4w^l?14 zU+6oPhPBywyJ$i&r&%m1o8aF>b%Xt|0if56m>Pv4L4NiAC&r0VS6`s|L#8z~K~4(I z2j58p6tWB6li@gjg#&u+UP;WHmkt!>8DuRJXF8We4@)UpWh5G0Xzr=d8fPb20moUf z$MKwfp;x0OR12(pjd9CiSPG2G=;()GSsjM?mio^2Snq}?c8JKq(6jPRHmY~*;=ax& zkjVRCL3DP>+@=qA9tei_eqBUZjky_(vQ=%Nd{+LGZXVZE}?mXSPgXA z=;)hEtrz;SrR3I2 zyYo{_g${Xw=!Iu;%};fy0$R$|1?=PuY+Th3Eypq~CRFwK{sxxXS}S^SB#%319Yqc1 zu{|MU)~}6jU2L+>Tp-|a4buGY;869bSj~@=6heY)Xjq7IYDwl|>}b;1a3I0X4Yp+7ydelh>n>lx)JSW{ zwV?w%4P#YnL#RBEDbmkT(Y+mjY{XHuLN12p^uPH+CUOVu?I%7ST2+f0jkCtkQy37L zO$?gpb#$o)ZBv;w0)+W#h=>Bbe$;wZ!bTi<*b$@%SQ#IzWT=dV5+0uFxE|>CmDFD* zj2L2h8x^Qf=tgLCn#kG)jU=buoE>perdbW+%s0nfUYYV@7v(pj&NI(&)^rPkWSZ~5 zQ>Y3{8!I?#KV5%!)9&#-AB`zDmbrHHfhSRj?LmAH%q zg+koxxInH^$TJpB$dNn7#HVERps-m&1@RA2Pli}Nb9@Vo7nVS}S7ff7q?Uf?h$&Q} z{e^Bdyo}sYW`>RB$AQ^fAq^=y9|P+krq9K0G?x{XxcWV1PAv&4+45jdj0fUeA;)xJ zXfV!_*UDIL*QptQvy9IJu?^YSgFpaC_Md^M8=xhUBYEU*|A*BSj=(HjPH> zrc>qD#$lTvb#W|jrSbR0WSw_4D^zM)bMe0H3DAgPc`TP{kB~Vn%8uTT1Kxs8iWaEw zMw=(yMts+eq|-Jl431eKkVz&I6*$$D-yBv(9X-IYw*-=mmqljW?(TYa2eLm3dm`NM zwdO*iSVS>7lK2>-nX)�$auCgW+ibC901nIn?`@i~5KAAzW}6gnj87Mxjaf8NA*3 zHy^yINQP*`7Aw0tmww1H@XF`SI}N+@Z#@kYn8TPLUxT_4EylP+=tusQhCb)zL7n?t ze`RJwT-l?aw4-Yv>D&yjWFDI^-eVEA6&HegW2yD!0%} zU*9^ikM~kw138IuNTtWFWmT|qk9bgx$T*83=Lj4%LX79_lvbNvu$o=#B;w=Vb&_l# z`6SF#K{%2VT%?ZuH^)&BZCOl`{~{|=@EwxQ?TnKdq@7!alt49+ncb6g_PGach%`UV zur_B_8UY?GOfQUw7^Azta4~o*8fDNuCQSHYo`RXR4vKPqq#(L|ha;nb@`;X+ZC(}a zjb#u)Tq%Umib#uDR1?t5aPjizS@JUm>eC35Wuh!2YNA24NpciG8-C>`NN!}R<;5M; z2-rHsoQUV1pz2$>st{a7t)__H@MR7o+o5Nk?Tn}z7R&>1EqEqlFBB;*Ka zgxSJcG$OYKAJsW6a^$hbVOmi93A)9deO15BTAcYv(#e7`>d04^z0UA`NEn`lN0z~x zLA44;aBi2L4hmlmS30XOYW4<;0E|Uh%auk|JB7u1vs+n2r1XU??ay8dZZMGa)y_$j1Ang7@|x{C>rga zlpnLviUK9gFqrzWu*9rKh$Z_t0b(nu&%L6YLVk_TZ5-pzGBfb9!YJeCz4WwyXaHP4 ztWJ$57#_7H=m=9c*7x(ivY1p;6NUaXRMivp83krWP4kwrdCFVKV1Uf?Gx}(y#@SE# zfrF2;wxmE#npA?~PRSHMQP?J_@T7+%%v37x8t&||35xgJ!*Nm2)IY0;%&Bl}BfC6P zT!G){%n}t0+-9$Efor5MWwFe>+Vy!tOa`uXOiD(HgWf-s(Hhy}DB=AWVwwo$K{O-j z94x`A<~n7f!_|2-s^>%YYObc{WdYa)3zFSX8;Q)6vrKk9SfZ5J2A9;&j*F!Kw-6G! z_Wz?KJD;YbwgSM zb(gThs|19}HvF8WG<8XBdYU#Q52X*Ni<&OFil)C@k47cL7^9^k!T>pOv{=yWw`ud3 zeUUC?=)rN}4CN}1CfLHv5tA&snKtb!duRFUtW}x&KIy1l-!Kly{k^XFaBJ=h24f^q zoUAaHN)2@R(%mhqF>MZ(#a{?2EXZWDAjV%xe9;pbu4miL^r~4sh3(A-9JqBRM4qQn z=`%JWxR#gq=OIfrU?;5dr|t!)2*}RDPBZS@mA#Dn1kB4(lDj|JorR(cDn3?f0#)o| zc{;krZR*MNsr_iD;Y3(jMoh-tTnsrzfw$#;DnPiEsoRSd`_JNsh`6V3^t{8d|LFg9 zXkZEeEu{@P5&yoDe?0t{sRMGxeHgY+ z);Fj|6ponRBs=g>rZta)NRw`P5vI75Y>`i_t9Y}@S;2Nv0CM(l^lm`i%3nU5F1(c2 zSM{fzI1e|*6|R{8$uKAj@rK1&9};JG4$F<#e(ED+&SCb>k%T=c2c$5irf%a7b|YcW zSoeaT9BP_$eXFT6Dp%T+SBAxc1?I9}A#CP<;QSpX$Uj9g%1-rSMMt8$dL z(9zAR@L@q*mOm<(?-V{0qfmw};&3%7`nGVz{?jjIiF+0T=2Sx08cSKAwc|LZ;%dvv^C3zBhvaq|3MKhY;EH zj$#WTHs)G=(#AQWyKvl#@B@pZu8~tCfe#IKS^Zg43YxZZ(9%sfY*JVGt4x^}`rvK~ zz)AAjL}jsZT$SfXF=u9c9D^aDO-(9IqI#x&)P8Bb;p-k7S67N5x@w2S;XyrTgX6+N zahgVKn%bwXrgh1c z1wEuDn8AE6R+SS3qCl3piAK@r(i)vKDD!%d=|_E8gf!7&1^}V-$OwL|PYcyZrcsyo zP}T%dozMFkR@*fYGEuRO;#QakoO9`-%SjYjX_ngiI@u<=K3nLRRtkO?WZK;XXK3kE z9-n^9?zQ2Ylw|%IX#>Rnqx5AKq$inYAw3%^SooIf{bW|n&1fCBb<-HOCQdgPBI6o{ zYtgw!6cPp3nE3tZ#^_E4PjP+~S6IsNR0)i#uA+A;9~-6+id@i5P01ky|MvWYV9;I~ zm?=WbOp3wn9xWIG4Nb~MNw~0v(#rSQX>rvJqPo$^V;)h^l!fJbV`9ZbZJum`3A(FT z*UbnCWTj)di^%?6BASg(tP0YYVF>N!&2f;db7utnsuk%8xn1{Y+A?C9&tx&t?Db+P z%2Bw7do5^mdbt}SCnjo`f@@XKM8Z4c)CL)P6~gCJU`gj*V@EJ-ZTefPB;tlf8Zo*U z`^uxSOjse!$)#A4w=YmH3mr8=drZjmg+&FZG#`)jlAhpVvRFi}F+Usa_o)V#AF z<@BO0FI3bxDm2eRFWi^8IyS>OuW?j!5ITl&`LIlxNIlT}Jgp051mH~{QZ&VS^osO+ zXTKS!<28IgIKvjq-sP;@e}O`nRj?cr?&zL^H8qF4m_Na2P`L1z(E}Z}y>>p(xfuot z4-=Z+VBVmb6;4ZYI=j0dYrWsn@qq~}4GH5KSEHhWSQgR-9)^To4~Tv5rj&ab8oE(b zvLMdWf5)FTBOs?B%dJhwVB20RYuKg%SGz(Dv+C1<E|93+~|~A_5U0MDJ-IH^7z73PlciFJd6(|=YyZ;@tJvVNL{dD?WOF)`2l(NOT`@~mM? zTng&O#_A4MSML&xUYy$gvj6)O4xX$gWwIk_ex#^TWbi~AiWHW(+%ho1%-krQXXp|7 zoJt|hYc8Iy3dK$!K?n*l3S%$q@0c z!6v6>ErnHMBmBui)J9pU74J;!rEFa+%B&x-$SB)>W%;1|^~&~=W`8R-eMvX_pOQu* z#9racQr`zJGs_jj--Eo78;WK-l6s$1+MmCrn|d|@RBHdh=#@9eeqr}K6?@;^ErP;r zNA&_}Uf(@WEmjGO(y6}Vi*;5M@2HjHo4tkU(pE#KG>+UZELi7Y;a%3f@8}jX`@H6x zYxBS7+umcP{iiEPu-)6auY<(fQ%J{u;WzE}edBkZmyc^)-EaK%u@>L@O_9E@{oWvY z&3%FRw2_hbf%39(=b|m8!W+WXWAUZnVYMD!)Tg&21^T@K+#6H<@Tz#ffQ{D{3fYSz z_IB_7^hN>Q)A=~t&~E~d%0VHCH-p&tc7ZL&jp+T|;k2&M{|*jS{y^vUW!l{Sh>7ik z*bH+XEoY46N&;&$(gbdrk>ap54B^#o7%nJLD?gDmTfesTjNT_jefZ#J9=mq!L%c#2 zxA<_Nl1#P%oE&FJva@##C-I{yLrfrz+2eeB7!Zbo&D2oP+C_2h(Qs%2yf`&`oAj3S zgjrqdLdu9Mc2#QEt?(WxDQdZ2N(Vjhf?kjbdfwW9?xxf<`h3eL{*91mX8&+O|NBVH z{xi&ex<6Bg{rhsaDOw71cY^zk_RSrqka2Jy(?(*61%HovKLUalM*(K4*B%vmks2|3 zDBPL*fX6EKuvo|J)e+Ohx|M4OF0FB4)5fFdN8Qfu6~BpGZZQ?v9)PyI-6Zcyd$A}i2E&t7 z!I0E5*9#=7A#n@~H|{UWtR5~T0F2A#1pkbchL!854Q-cF;vZ*|@I{`hak$Y(9aA{Q zUYT2GZUuoDofqH#qB`z-JS-QyD4?`Nm-EPu((AZa!J)*-l`oX-n$o<9E*PXaNVz8> zm!0>Rm7x+m4SEkLww_!Pw~Doqxd_ZC<|LKmAaC7 zpuC{p8hp5~Z3vR@JZ|f73G>d}!^d04BvyW~2V&Pq-2FYF;$w-ibDuesog-PE(2^vD z=L@u@RLoZp7F(g0b8<7KjWQl?(qR!58eQjyOq#e475=JdoHvZ}=g`1|Y zLnXS9#xrGvBGXSP_9KYeo%Ce;ccqt}O7|iJ<1QLKdFB+R}IfjTHTr*ot0n-IE#04y|yjyrDQ1hC-i_x9!u z(*|6$Cx=lZvIP=wIV6;ncVajbbqw1i9>rmyMsaLVL)Vp06k#(DWljaC3ZiZ6fJiMZ zk#kA0aUX*E@G5sopjF(pwsm(a_l$rVZipnhdMvm~URU0cb+5MMxE#{d;^T+r;rBE^ z87as;R$lvfKvH->CE!w8Ky%MMT|QM2r+StENRZ4P5F4wW2E8?gu*O~qxMO+ zeXw{GS}CQdQ}-s0CiM0T)?5Xh%ju0II3Qy%@+ zi%<=Md=({wBg6%Qd#}OceP=$cJaUf>M}UW~MM1 z7>qNE7nsiho=26O9b2)_Hx-Fa;fWgw|I>^ox#wD^3R+K*1X^YOC9fhb<{h;tE3Gah zJeB6<>}AX&13~Zk_fz0Ie>@ASn3joV&U8)8hq`w1=eWhBG;z#5xV?>`x>BaIr|8sV z9FfIZmM$><=o*Pt&Q#a&?vvKt7c{qA|k+ zGwssY%7-0$ice%-zCQXnZxIy=7G^zepw}!9F1l*u^c(b!3qBV-@4^$!;Cha!Iqu95 zCTkLm34Pj);Y*CLUbHpc4BO2nASaqdOP|Rr!LJZ<-VIsXjhz)`l4-;ZH0es_TM{r&mzSE<7ob3uDb_p+>^1 zD^2h__mP6dVYY}`Zw0ZzxW>RM^|t`Pjq}Vg;-c7o5aJN(TaF7?IA3&S2%Z)+(JJh{ z3dtDbVXzSsiI6M2rAUJl#TQb};^y9#Y|bV( zMn<@4ZZKdHz}B}he09kO$-}hsVIx1@1Uj0QnMFZO>Oxp9#5r-n_aqu=KqE=+PHSNq zRgoB>Y@dwSnoc0id`#{9BDW9r`}UsOoXSzqTqfwp&>|UC+QsavbdrYPr`Ayja5@KJ z?vs*Zw+W4M>n2osrg26*9dpc2H zAd)$P>?$MG+B<7e&i83Ce??dnH2rI2*SStjGlxX+!R*sL3$@mAN9W$o9pT$Z*=hJb zQsF%QwC^Ov6MZWw{tn+uil_0LNnHgRS!vbuzgU6#d>J90^}D}V6|w?kdu1czwlDj{ zl31-E_c3?pn1c-6PvFbN6n5YnVLi$KjGgT!zyu4U$mbPHXqNc(~*(MV)$3(HW z`5Q<2WtG*lyc)xy*$TN7Vn@?3awxLtuwN{GTq}P6$-diEe93kGDJatNdi(Ug&fdNs zb_$D@CHt^#{4f*?$njOp`6r}`4bAg0C=I{h;ATD^vlB8s5^}8(=q^{F=jnBK3Op*$ zO%Gg#7zasP^RT{%DegF+k5lDlF^UJ@siL%u2;Zs-zxsWzYR-FqOUM3p)!g#O z{*G0?G~e?zE69E`dI}zjtP;Ly#ZqqJ4ch);tKMsKzHZf1z&~+Sycj#_`Oa0b2%k0U z`?0I;GXBM@UNj^bsWUzeCe7BL#2OepIE8?O-^$D2Y`U_tP;#CGuzTLN^-DpDisAu5 zdaT0iwd%FsRvo1qr84GvT4=S9MWz+cn&mruV0$SSEun>2yvMtox4+|6%p7iSLDCR* z2Y?k zp@=j**Cj`wBCL)o_Eke*!2KCKW^Dto(BGmQRYK2q#U3Io<)Z1LWrkc@BJ*OywPgbh z8MWX`v;M6x`2lKf)|RD&1K*{pA_=A1=k?0J*yyJ#Bp!oXY5 zseoZNZDtIlLC@kUV6sCb;z5p@7aPTor&((hHS0ZxK%lX6Tkr>^b8Mxb| zi&v!B=i3(c1SznJ;lw1FUn$t+ZIbbeZv7Y^YAemX$8gVUYFv`SDy(U%n5fSZAx>}O zHH}+L8lCUJx}8J)h0OGYSj6fDUZelQqcs|Vd^N2&8_R>k{*7fy2IS~X>@-eOCQ5n) zT!?_rBi&6Tb5=9b@)5bfXeE6>t{-}!PVR+^2R&jjUPt9*=$2vPu^pNaHq|$RrWmcO z%ZzWbr%hlsF_z+RDp<27)j3Y(uuCSjUqb<_eNM)Dkm}Y1wae!|{D(U`_mw2UPn6|o zwtH_5bLhVbEadA!wK$C-QP4&W3(LZo@`y~x6*2anaIg54gZ`+F1azcAyhGqmlb3AB z*|fZt*ieu2A;(T%Q#nEBf$ttmEd-e<>$x86BaNBLp{bw@ObuqLGxJ38G5Yd{1}z!R ztT-&?)L}^bjRjyEKCU+}ANRIks4d8(W+0Qp?Bk?q)-{F8X8)1(27r>Lnz64VB;#yQ z%&tvmKF5*-(7Tf^?$Vghm{$7t7~?FXlVkw$6?R_rri=z%6<*y7uZklr{P7qF#-AfvE>seAzS=p( zhbFCSMB6pA^E+6Prx!O?c3~)VBBscE7-=UD3hD>MDJjr}5+j;D5}N4+8>r1t!cIQ$xY_&-8%Ji= zuDm!IY_S0+evNW`hE33ue1f_%#wQW|%j4W$s1LMO>-rF8eP(Ku&n^xwP6@o`T+`_HHINyz~Z`UVf`R*kpcQ*Ot zyM4P;eYVOw{mZ4T_GNVyTrtQ;82LbEg)dv`%S?P)og#yLV11PBf_&Do(X3YZX10GS zS6>3>%bI0d`h#bk0kF-+cQo7c4ytb47q?$ zv-?-H!}lktFkEidsvx0RY0cF5#HG5jkHq^Imi3w9s()uZEey;*>*m6ko|KZ|8Ho(@b`BH=p($NbF%AuAm%1;uPQ1 zgjm^^>mDCLPrtFwuB2Aa}M!;ofi-pWn<&IjF?JzUw z)*$oi3OX}37S%`3ThBZFw#VO67*Obi2}&dAfjFP8bZ!)GODxNIh@BA1g}5iUI_3az zHKd>Th$&WQyi**JI&vgwjA5|aU8DVvl|#1bJb=GJQ?7 z&*%O5JlD@8UsZzNXQiBFXr<`+=}ke=>`Q#C!^FcY7Pu2k!}u9c9Q1-X!-hdT zEQps0JOO5d?}CM33|tR>2Nr;Tf?1$pC1V@G5>VKw2Zh5OU>WSQL->#|F%DLOb0E&L zzd#Z3KOi2KyNa=Wpb2~)JOT;@eg$Q4%>#_x1npoaR4htmtOny_h^83)7_0_wfm^}S z)r@U{eb$AK67Ut!0ZxK-;NPH7;IVWVz=h4=Hy9sXgY6Zfcs z@QsauLW%RBaNvV`>$kyRJto$!W$Y1fA7}?pfkM)Ga2t3FRKOzKVg*~lHZTN=NWKO= zV5VU~;vrDXzY1cB&4Ux*x8O(M3&>k7Xv=~AC;~Q^0~HYA7a*V)7=qUe3efW^a)(mU z9W#NY=t9<|4Swo1A<`ytj+)dPGNLz8(;}6k31t}TUGNZgSuQ$Krb{T&0k!oeicdm^ z>h~Lz({nHW7*TAZiJ}z^LF)B`tmuU%=IE#F%}K?63YrS2(DZqxT`KlVilPWqOEnT5 zQLZPq_ql1#mO~x3VX{_s&>p*z-|bRWEgrphHhca8e zNi3C~3rQ(F#=~?cJ5PwSrLT;Fp2Kw4Ba_^B$^2iD7#~lJ@TtTbJj_1?kMRh-6{^{L z6|<4Vi+q|#BtDx6i3J{&5~GP@SP8=f=CARvSiFBe5lZd#sy&AS-hRKt7q1B866_OB zeWn;`$MK57#3-NP;lw%pP9Bl@EKHB`=;FRR*}2K^jQHtI89N)A>pFKdIvu+^+Zy)Q zQ`hO&GFqH%4No>c)#-5V*;DUmr-`u*6gx9Wf1Jg^iPNcABI&&Humf z`#U-G%iD&HVG%E%+hQ*_uw zX&3FQVla!)WYV;COO|8r8R@G_(IgY2wks9ZUUk3~=e_`E+*jQOb&Bkuy@%3NvwWR>X(oMX)I@vJ=vUMk?b7CWiGBd`h1}d~s|R z8ODUj+>p!XL7L*QGsUBHbSj^e*HXNHw2UAk#;G32JAH{;(F@t`E)JSJhw Y2Wo!}xh=W_G_2x?t||za1tpJ^%m! diff --git a/po/sr.po b/po/sr.po index 68cf728..c6fb41c 100644 --- a/po/sr.po +++ b/po/sr.po @@ -1,81 +1,123 @@ # Serbian translation of findutils -# Copyright (C) 2003, 2010 Free Software Foundation, Inc. +# Copyright (C) 2012 Free Software Foundation, Inc. +# This file is distributed under the same license as the findutils package. # Danilo Segan , 2003. -# +# Мирослав Николић , 2012, 2013. msgid "" msgstr "" -"Project-Id-Version: findutils 4.2.6\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2004-11-24 14:16+0100\n" -"Last-Translator: Danilo Segan \n" -"Language-Team: Serbian \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-10-08 09:13+0200\n" +"Last-Translator: Мирослав Николић \n" +"Language-Team: Serbian <(nothing)>\n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" msgstr "" +"Нисам успео да сачувам радни директоријум да бих покренуо наредбу на „%s“" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Не могу да затворим стандардни улаз" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Нисам успео да променим директоријум" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "не могу да расцепим" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "грешка чекајући на „%s“" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s је окончан сигналом %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Нисам успео да покренем хеш табелу дељене датотеке" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 #, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "неуспела провера разумности функције библиотеке „fnmatch()“." + +#: find/find.c:263 +#, c-format msgid "cannot stat current directory" msgstr "не могу да сазнам текући директоријум" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "" +msgstr "Не могу да прочитам списак прикачених уређаја." -#: find/find.c:385 -#, fuzzy, c-format +#: find/find.c:443 +#, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "Систем датотека %s је недавно искључен." +msgstr "УПОЗОРЕЊЕ: систем датотека „%s“ је недавно откачен." -#: find/find.c:395 -#, fuzzy, c-format +#: find/find.c:453 +#, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "Систем датотека %s је недавно прикључен." +msgstr "УПОЗОРЕЊЕ: систем датотека „%s“ је недавно прикачен." -#: find/find.c:491 -#, fuzzy, c-format +#: find/find.c:550 +#, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -"%s%s је измењен при извршавању %s (стари број уређаја %ld, нови број %ld, " -"врста система датотека је %s) [реф %ld]" +"%s%s је измењен при извршавању %s (стари број уређаја је %ld, нови број је " +"%ld, врста система датотека је „%s“) [реф %ld]" -#: find/find.c:528 -#, fuzzy, c-format +#: find/find.c:587 +#, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -"%s%s је измењен при извршавању %s (стари број чвора %ld, нови број %ld, " -"врста система датотека је %s) [реф %ld]" +"%s%s је измењен при извршавању %s (стари број чвора је %, нови број " +"је %, врста система датотека је „%s“) [реф %ld]" -#: find/find.c:693 -#, fuzzy, c-format +#: find/find.c:752 +#, c-format msgid "failed to return to parent directory" -msgstr "не могу да сазнам текући директоријум" +msgstr "не могу да се вратим у родитељски директоријум" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "" +msgstr "Нисам успео да безбедно изменим директоријум у %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" +"Симболичка веза „%s“ је део петље у хијерархији директоријума; већ смо " +"посетили директоријум до кога води." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -84,14 +126,21 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" +"Откривено је понављање система датотека; „%s“ има исти број уређаја и и-чвор " +"као и директоријум који је за %d ниво виши у хијерархији система датотека" msgstr[1] "" +"Откривено је понављање система датотека; „%s“ има исти број уређаја и и-чвор " +"као и директоријум који је за %d нивоа виши у хијерархији система датотека" +msgstr[2] "" +"Откривено је понављање система датотека; „%s“ има исти број уређаја и и-чвор " +"као и директоријум који је за %d нивоа виши у хијерархији система датотека" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "" +msgstr "упозорење: не пратим симболичку везу „%s“" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -100,13 +149,18 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" +"УПОЗОРЕЊЕ: Број чврсте везе је погрешан за „%s“ (видим само „st_nlink=" +"%Е“ али смо већ видели „%“ садржаних директоријума): ово " +"може бити грешка управљачког програма у вашем систему датотека. Самосталним " +"укључивањем је пронађена опција „-noleaf“. Ранији резултати можда нису " +"успели да укључе директоријуме који су били тражени." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "" +msgstr "Не могу да прочитам списак прикачених система датотека" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "непознато" @@ -115,31 +169,41 @@ msgstr "непознато" msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" +"Откривено је понављање система датотека; „%s“ припада истој петљи система " +"датотека као и „%s“." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "" +msgstr "УПОЗОРЕЊЕ: датотека „%s“ изгледа да има режим 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "" +msgstr "не могу да претражим „%s“" -#: find/ftsfind.c:599 -#, fuzzy, c-format +#: find/ftsfind.c:609 +#, c-format msgid "failed to restore working directory after searching %s" -msgstr "не могу да сазнам текући директоријум" +msgstr "нисам успео да повратим радни директоријум након претраге „%s“" + +#: find/ftsfind.c:677 +#, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Нисам успео да покренем хеш табелу дељене датотеке" -#: find/parser.c:471 +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" +"Радња „-delete“ је самостално укључила „-depth“, али „-prune“ не ради ништа " +"када је „-depth“ у изведби. Ако ипак желите да извршите, само изричито " +"користите опцију „-depth“." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -147,65 +211,61 @@ msgid "" "as those specified after it). Please specify options before other " "arguments.\n" msgstr "" -"упозорење: навели сте опцију %s након аргумента %s који није опција, а " -"опције не зависе од положаја (%s утиче на провере наведене пре њега као и " +"упозорење: навели сте опцију „%s“ након аргумента „%s“ који није опција, а " +"опције не зависе од положаја („%s“ утиче на провере наведене пре њега као и " "после њега). Наведите опције пре осталих аргумената.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -"упозорење: опција -d је застарела; уместо ње користите -depth, пошто је ова " -"друга у сагласности са POSIX-ом." +"упозорење: опција „-d“ је застарела; уместо ње користите „-depth“, пошто је " +"ова друга у сагласности са ПОСИКС-ом." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" +"„%s“ није назив постојеће групе и не изгледа као бројевни ИБ групе зато што " +"садржи неочекивани суфикс „%s“" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" -msgstr "" +msgstr "„%s“ није назив постојеће групе" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" -msgstr "" +msgstr "аргумент „-group“ је празан, али треба да буде назив групе" -#: find/parser.c:1227 -#, fuzzy +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" -"подразумевана путања је текући директоријум; подразумевани израз је -print\n" -"израз се може састојати од:\n" -"оператора (према опадајућем првенству; -and је имплицитно када није дат неки " -"други):\n" -" ( ИЗРАЗ ) ! ИЗРАЗ -not ИЗРАЗ ИЗРАЗ1 -a ИЗРАЗ2 ИЗРАЗ1 -and ИЗРАЗ2" +"\n" +"основна путања је текући директоријум; основни израз је „-print“\n" +"израз може да се састоји од: оператора, опција, проба и радњи:\n" -#: find/parser.c:1230 -#, fuzzy +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"подразумевана путања је текући директоријум; подразумевани израз је -print\n" -"израз се може састојати од:\n" -"оператора (према опадајућем првенству; -and је имплицитно када није дат неки " +"оператори (опадајуће првенство; „-and“ се подразумева када није дат ниједан " "други):\n" -" ( ИЗРАЗ ) ! ИЗРАЗ -not ИЗРАЗ ИЗРАЗ1 -a ИЗРАЗ2 ИЗРАЗ1 -and ИЗРАЗ2" +" ( ИЗРЗ ) ! ИЗРЗ -not ИЗРЗ ИЗРЗ1 -a ИЗРЗ2 ИЗРЗ1 -and ИЗРЗ2\n" +" ИЗРЗ1 -o ИЗРЗ2 ИЗРЗ1 -or ИЗРЗ2 ИЗРЗ1 , ИЗРЗ2\n" -#: find/parser.c:1234 -#, fuzzy +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -213,13 +273,13 @@ msgid "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -" ИЗРАЗ1 -o ИЗРАЗ2 ИЗРАЗ1 -or ИЗРАЗ2 ИЗРАЗ1 , ИЗРАЗ2\n" -"опције (увек тачне): -daystart -depth -follow --help\n" -" -maxdepth НИВОА -mindepth НИВОА -mount -noleaf --version -xdev\n" -"провере (N може бити +N, -N или N): -amin N -anewer ДАТОТЕКА -atime N -cmin N" +"опције положаја (увек изабране): -daystart -follow -regextype\n" +"\n" +"уобичајене опције (увек изабране, наведене пре осталих израза):\n" +" -depth -xdev --help -maxdepth НИВОИ -ignore_readdir_race\n" +" -mount -noleaf --version -mindepth НИВОИ -noignore_readdir_race\n" -#: find/parser.c:1239 -#, fuzzy +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -227,29 +287,31 @@ msgid "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" +"пробе (N може бити +N или -N или N): -amin N -anewer ДАТОТЕКА -atime N -cmin " +"N\n" " -cnewer ДАТОТЕКА -ctime N -empty -false -fstype ВРСТА -gid N -group " -"ИМЕ\n" +"НАЗИВ\n" " -ilname ШАБЛОН -iname ШАБЛОН -inum N -iwholename ШАБЛОН -iregex " "ШАБЛОН\n" " -links N -lname ШАБЛОН -mmin N -mtime N -name ШАБЛОН -newer ДАТОТЕКА" -#: find/parser.c:1244 -#, fuzzy +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path ШАБЛОН -perm [+-]МОД -regex ШАБЛОН\n" -" -wholename ШАБЛОН -size N[bckwMG] -true -type [bcdpfls] -uid N\n" -" -used N -user ИМЕ -xtype [bcdpfls]" +" -nouser -nogroup -path ШАБЛОН -perm [-/]РЕЖИМ -regex ШАБЛОН\n" +" -readable -writable -executable\n" +" -wholename ШАБЛОН -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user НАЗИВ -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" -msgstr "" +msgstr " -context КОНТЕКСТ\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -257,23 +319,30 @@ msgid "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" +"\n" +"радње: -delete -print0 -printf ФОРМАТ -fprintf ФОРМАТ ДАТОТЕКЕ -print \n" +" -fprint0 ДАТОТЕКА -fprint ДАТОТЕКА -ls -fls ДАТОТЕКА -prune -quit\n" +" -exec НАРЕДБА ; -exec НАРЕДБА {} + -ok НАРЕДБА ;\n" +" -execdir НАРЕДБА ; -execdir НАРЕДБА {} + -okdir НАРЕДБА ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" -"Пријавите (и пратите напредак у исправљању) грешке путем стране за пријаву\n" -"findutils грешака на http://savannah.gnu.org/ или, ако немате приступ вебу,\n" -"слањем е-писма на ." +"Пријавите грешке у програму (и пратите напредак у исправљању) на страници " +"за\n" +"пријављивање грешака на „http://savannah.gnu.org/“ или, ако немате приступ " +"вебу,\n" +"пошаљите ел. поруку на ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." -msgstr "провера разумности функције fnmatch() библиотеке неуспешна." +msgstr "неуспела провера разумности функције библиотеке „fnmatch()“." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -282,466 +351,835 @@ msgid "" "perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " "use 'find ... -print0 | grep -FzZ %s'." msgstr "" +"упозорење: Јуникс називи датотека обично не садрже косе црте (иако називи " +"путања да). То значи да ће „%s %s“ вероватно да процени као нетачно сваки " +"пут на овом систему. Можете да увидите да је проба „-wholename“ (читав " +"назив) кориснија, или можда „-samefile“ (иста датотека). Другачије, ако " +"користите ГНУ греп, можете да употребите „find ... -print0 | grep -FzZ %s“." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" +"Очекиван је аргумент позитивног децималног броја за „%s“, али је добијен „%s“" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" +"Овај систем не обезбеђује начин за проналажење времена стварања датотеке." -#: find/parser.c:1638 -#, fuzzy, c-format +#: find/parser.c:1633 +#, c-format msgid "The %s test needs an argument" -msgstr "%s: опција „%s“ захтева аргумент\n" +msgstr "Проба „%s“ захтева аргумент" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" -msgstr "" +msgstr "Не могу да схватим да ли „%s“ да протумачим као датум или време" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "" +msgstr "Не могу да добијем време стварања датотеке „%s“" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" +"упозорење: „-%s %s“ неће поклопити ништа зато што се завршава косом цртом " +"(/)." -#: find/parser.c:1956 +#: find/parser.c:1992 #, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 -#, fuzzy, c-format msgid "invalid mode %s" msgstr "неисправан режим „%s“" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" +"упозорење: навели сте шаблон режима „%s“ (што је исто као и „/000“). Значење " +"„-perm /000“ је сада измењено да би било сагласно са „-perm -000“; тако је, " +"док се користи да поклопи ниједну датотеку, сада ће да поклопи све датотеке." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" -msgstr "неисправан нула-аргумент за -size" +msgstr "неисправан ништавни аргумент за „-size“ (величину)" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "неисправна врста „%c“ за -size" +msgstr "неисправна врста „%c“ за „-size“ (величину)" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "неисправан аргумент „%s“ за „%s“" +msgstr "Неисправан аргумент „%s%s“ за „-size“ (величину)" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" +"Опција „-show-control-chars“ садржи један аргумент који мора бити " +"„literal“ (дослован) или „safe“ (безбедан)" -#: find/parser.c:2630 -#, fuzzy, c-format +#: find/parser.c:2566 +#, c-format msgid "Invalid argument %s to -used" -msgstr "неисправан аргумент %s за %s" +msgstr "Неисправан аргумент „%s“ за „-used“ (коришћено)" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" -msgstr "" +msgstr "„%s“ није име познатог корисника" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" -msgstr "" +msgstr "Аргумент за „-user“ (корисника) не сме бити празан" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " -msgstr "" +msgstr "Укључене функције:" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "" +msgstr "неисправан предикат „-context“: СЕЛинукс није укључен." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" -msgstr "" +msgstr "Аргумент за „-type“ (врсту) треба да садржи само једно слово" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" +"„-type %c“ није подржано зато што симболичке везе нису подржане на платформи " +"на којој је преведен „find“." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "упозорење: непознато истицање „\\%c“" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"„-type %c“ није подржано зато што ПУПИ-ји нису подржани на платформи на " +"којој је преведен „find“." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" +"„-type %c“ није подржано зато што именоване прикључнице нису подржане на " +"платформи на којој је преведен „find“." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "упозорење: непозната директива форматирања „%%%c“" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"„-type %c“ није подржано зато што Соларисова врата нису подржана на " +"платформи на којој је преведен „find“." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" +msgid "Unknown argument to -type: %c" +msgstr "Непознат аргумент за „-type“ (врсту): %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" +"Текући директоријум је укључен у променљиву окружења ПУТАЊА, што је " +"несигурно у комбинацији са радњом „%s“ за тражење. Молим уклоните текући " +"директоријум из ваше „$PATH“ (тако је, уклоните тачку „.“ удвостручене " +"двотачке, или водећу или завршну двотачку „:“)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove that " "entry from $PATH" msgstr "" +"Релативна путања „%s“ је укључена у променљиву окружења ПУТАЊА, што је " +"несигурно у комбинацији са радњом „%s“ за тражење. Молим уклоните тај унос " +"из „$PATH“" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" +"Не можете да користите {} унутар назива помагала за „-execdir“ и „-okdir“, " +"зато што је то могући безбедносни проблем." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "" +msgstr "Само један примерак {} је подржан са „-exec%s ... +“" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "У „%s“ %s мора само да се појави, али ви сте навели „%s“" -#: find/parser.c:3435 -#, fuzzy, c-format +#: find/parser.c:3100 +#, c-format msgid "The environment is too large for exec()." -msgstr "окружење је превелико за извршење" +msgstr "Окружење је превелико за „exec()“." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" -msgstr "" +msgstr "аритметичко прекорачење приликом претварања %s дана у број секунди" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" -msgstr "" +msgstr "аритметичко прекорачење приликом покушаја прорачуна краја даншњице" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" -msgstr "" +msgstr "уобичајена грешка" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "" +msgstr "стандардни излаз" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "" - -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "не могу да сазнам текући директоријум" +msgstr "не могу да обришем %s" -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "" +msgstr "УПОЗОРЕЊЕ: не могу да одредим време стварања датотеке „%s“" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Нисам успео да пишем на стандардни излаз" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "" +msgid "getfilecon failed: %s" +msgstr "није успело „getfilecon“: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" +msgid "warning: escape `\\' followed by nothing at all" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "не могу да расцепим" +msgid "warning: unrecognized escape `\\%c'" +msgstr "упозорење: непознато истицање „\\%c“" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "грешка при чекању %s" +msgid "error: %s at end of format string" +msgstr "грешка: „%s“ на крају ниске формата" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s окончан сигналом %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "грешка: смерница обликовања „%%%c“ је резервисана за будуће коришћење" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "упозорење: смерницу записа „%%%c“ треба да прати други знак" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "упозорење: непозната смерница обликовања „%%%c“" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "неисправан израз" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" +"неисправан израз; користили сте бинарни оператор „%s“ без ичег испред њега." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "" +msgstr "очекиван је израз између „%s“ и „)“" -#: find/tree.c:156 -#, fuzzy, c-format +#: find/tree.c:161 +#, c-format msgid "expected an expression after '%s'" -msgstr "неочекивани допунски предикат" +msgstr "очекиван је израз након „%s“" -#: find/tree.c:161 -#, fuzzy, c-format +#: find/tree.c:166 +#, c-format msgid "invalid expression; you have too many ')'" -msgstr "неисправан израз" +msgstr "неисправан израз; имате превише „)“" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" +"неисправан израз; очекивах да пронађем „)“ али нисам видео ни једну. Можда " +"вам је потребан додатни предикат након „%s“" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." -msgstr "" +msgstr "неисправан израз; празне заграде нису допуштене." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "" +"неисправан израз; Очекивао сам да пронађем „)“ негде али нисам видео ни " +"једну." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "упс — неисправна врста израза!" -#: find/tree.c:276 -#, fuzzy, c-format +#: find/tree.c:281 +#, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "упс — неисправна врста израза!" +msgstr "упс — неисправна врста израза (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"упозорење: нема ставке у табели трошкова процене предиката за предикат %s; " +"пријавите ово као грешку" -#: find/tree.c:1288 -#, fuzzy, c-format +#: find/tree.c:1294 +#, c-format msgid "paths must precede expression: %s" -msgstr "путање морају претходити изразу" +msgstr "путање морају да претходе изразу: %s" -#: find/tree.c:1297 -#, fuzzy, c-format +#: find/tree.c:1303 +#, c-format msgid "unknown predicate `%s'" -msgstr "неисправан предикат „%s“" +msgstr "непознат предикат „%s“" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "неисправан предикат „%s“" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "неисправан аргумент „%s“ за „%s“" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "недостаје аргумент за „%s“" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "" +msgstr "имате превише „)“" -#: find/tree.c:1412 -#, fuzzy, c-format +#: find/tree.c:1418 +#, c-format msgid "unexpected extra predicate '%s'" -msgstr "неочекивани допунски предикат" +msgstr "неочекивани допунски предикат „%s“" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "неочекивани допунски предикат" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "упс — неисправно подразумевано уметање „и“!" -#: find/util.c:171 -#, fuzzy, c-format +#: find/util.c:175 +#, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " -msgstr "Употреба: %s [-H] [-L] [-P] [путања...] [израз]\n" +msgstr "Употреба: %s [-H] [-L] [-P] [-Oниво] [-D " -#: find/util.c:173 -#, fuzzy, c-format +#: find/util.c:177 +#, c-format msgid "] [path...] [expression]\n" -msgstr "Употреба: %s [путања...] [израз]\n" +msgstr "] [путања...] [израз]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "не могу да сазнам текући директоријум" +msgstr "нисам успео да сачувам почетни радни директоријум" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "не могу да сазнам текући директоријум" +msgstr "нисам успео да повратим почетни радни директоријум" -#: find/util.c:816 -#, fuzzy, c-format +#: find/util.c:824 +#, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "упозорење: непознато истицање „\\%c“" +msgstr "Занемарујем непрепознатљиву опцију исправљања грешака „%s“" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." -msgstr "" +msgstr "Празан аргумент за опцију „-D“." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "" +msgstr "За опцијом „-O“ мора одмах да следи децимални број" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" -msgstr "" +msgstr "Молим наведите децимални број одмах након „-O“" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" -msgstr "" +msgstr "Неисправан ниво оптимизације %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" +"Ниво оптимизације %lu је превисок. Ако желите на брзину да пронађете " +"датотеке, размотрите коришћење програма „GNU locate“." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -"Променљива окружења FIND_BLOCK_SIZE није подржана, једина ствар која утиче " -"на величину блока је променљива окружења POSIXLY_CORRECT" +"Променљива окружења „FIND_BLOCK_SIZE“ (пронађи величину блока) није " +"подржана, једина ствар која утиче на величину блока је променљива окружења " +"„POSIXLY_CORRECT“" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "неисправан аргумент „%s“ за „%s“" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "неисправан аргумент „%s“ за „%s“" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "Неисправан аргумент „%s“ за „-used“ (коришћено)" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 #, c-format -msgid "command too long" -msgstr "наредба предугачка" +msgid "write error" +msgstr "грешка писања" -#: lib/buildcmd.c:311 +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 #, c-format -msgid "can't call exec() due to argument size restrictions" +msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "" -#: lib/buildcmd.c:381 +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "Проба „%s“ захтева аргумент" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "упозорење: непознато истицање „\\%c“" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: неисправан број за опцију -%c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "Проба „%s“ захтева аргумент" + +#: gl/lib/openat-die.c:38 #, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "нисам успео да повратим почетни радни директоријум" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "нисам успео да повратим почетни радни директоријум" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "неисправан аргумент „%s“ за „%s“" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "неисправан аргумент „%s“ за „%s“" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "списак аргумената је предуг" + +#: lib/buildcmd.c:161 +#, c-format +msgid "command too long" +msgstr "наредба је предуга" + +#: lib/buildcmd.c:301 +#, c-format +msgid "can't call exec() due to argument size restrictions" +msgstr "не могу да позовем „exec()“ због ограничења величине аргумента" + +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" "не могу да углавим један аргумент у ограничење величине списка аргумената" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" -msgstr "списак аргумената предугачак" +msgstr "списак аргумената је предуг" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" +msgstr "Променљива окружења „%s“ није подешена на исправан децималан број" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." msgstr "" +"Описник датотеке „%d“ ће цурити; пријавите ово као грешку, и не заборавите " +"да укључите опширан опис најједноставнијег начина за добијање тог проблема." -#: lib/findutils-version.c:60 +#: lib/findutils-version.c:55 msgid "Eric B. Decker" -msgstr "" +msgstr "Ерик Б. Декер" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" -msgstr "" +msgstr "Џејмс Јангмен" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" -msgstr "" +msgstr "Кевин Дали" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "ГНУ findutils издање %s\n" +msgid "Failed to write output (at stage %d)" +msgstr "Нисам успео да пишем на стандардни излаз" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 #, c-format -msgid "Unexpected suffix %s on %s" -msgstr "" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Непозната врста регуларноиг израза „%s“; исправне врсте су „%s“." -#: lib/safe-atoi.c:82 -#, fuzzy, c-format -msgid "Expected an integer: %s" -msgstr "неочекивани допунски предикат" +#: lib/safe-atoi.c:81 +#, c-format +msgid "Unexpected suffix %s on %s" +msgstr "Неочекивани суфикс „%s“ на „%s“" -#: lib/regextype.c:107 +#: lib/safe-atoi.c:87 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "" +msgid "Expected an integer: %s" +msgstr "Очекиван је цео број: %s" -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -750,95 +1188,91 @@ msgstr "" "Употреба: %s [--version | --help]\n" "или %s најчешћи_биграми < списак-датотека > locate-база\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" "\n" -"Пријавите грешке на .\n" - -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" +"Грешке пријавите на .\n" -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" -msgstr "" +msgstr "Употреба: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." -msgstr "" +msgstr "Морате да наведете ниво безбедности као децимални цео број." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." -msgstr "" +msgstr "Ниво безбедности %s је изван претворљивог опсега." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." -msgstr "" +msgstr "Ниво безбедности %s садржи неочекивани суфикс „%s“." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." -msgstr "" +msgstr "ниво безбедности %ld слоцирња није подржан." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" -msgstr "" +msgstr "Нисам успео да пишем на стандардни излаз" # bug: plural-forms -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "дана" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "" +msgstr "Аргумент за опцију „--max-database-age“ не сме бити празан" -#: locate/locate.c:209 locate/locate.c:216 -#, fuzzy, c-format +#: locate/locate.c:202 locate/locate.c:209 +#, c-format msgid "Invalid argument %s for option --max-database-age" -msgstr "неисправан аргумент %s за %s" +msgstr "Неисправан аргумент „%s“ за опцију „--max-database-age“" -#: locate/locate.c:468 -#, fuzzy, c-format +#: locate/locate.c:459 +#, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -"упозорење: путања locate базе „%s“ садржи водећу двотачку, што није исправно " -"име базе" +"база лоцирања „%s“ садржи назив датотеке дужи него што лоцирање може да " +"обради" -#: locate/locate.c:603 -#, fuzzy, c-format +#: locate/locate.c:569 locate/locate.c:588 +#, c-format msgid "locate database %s is corrupt or invalid" -msgstr "locate база „%s“ је покварена или неисправна" +msgstr "база лоцирања „%s“ је оштећена или неисправна" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Величина базе података лоцирања: %s бајт\n" +msgstr[1] "Величина базе података лоцирања: %s бајта\n" +msgstr[2] "Величина базе података лоцирања: %s бајтова\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" -msgstr "" +msgstr "Поклапајући називи датотека: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" -msgstr "" +msgstr "Сви називи датотека: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -848,81 +1282,99 @@ msgid "" "\t%s contain newline characters, \n" "\tand %s contain characters with the high bit set.\n" msgstr "" +"Називи датотека имају збирну дужину од %s бајта.\n" +"Од тих назива датотека,\n" +"\n" +" %s имају празна места, \n" +" %s имају знакове новог реда, и \n" +" %s имају знакове са високим скупом бита.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" +"Неки називи датотека могу бити издвојени, тако да не можемо да прорачунамо " +"ниво сажимања.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" -msgstr "" +msgstr "Ниво сажимања %4.2f%% (виши је бољи)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" -msgstr "" +msgstr "Ниво сажимања није одређен\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" +"база података локатора „%s“ изгледа као база података слокатора али изгледа " +"да има ниво безбедности %c, који Гнуов алат проналажења тренутно не подржава" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" +"„%s“ је база података слокатора. Подршка за њих је нова, очекујем проблеме " +"за сада." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" +"„%s“ је база података слокатора неподржаног нивоа безбедности %d; прескачем " +"је." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" +"Навели сте опцију „-E“, али та опција не може бити коришћена са базама " +"података облика слокатора са не-нултим нивоом безбедности. Никакви " +"резултати неће бити створени за ту базу података.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "" +msgstr "„%s“ је база података слокатора. Укључујем опцију „-e“." -#: locate/locate.c:1189 -#, fuzzy, c-format +#: locate/locate.c:1155 +#, c-format msgid "Old-format locate database %s is too short to be valid" -msgstr "locate база „%s“ је покварена или неисправна" +msgstr "" +"База података локатора старог облика „%s“ је прекратка да би била исправна" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" -msgstr "" +msgstr "База података „%s“ је у „%s“ облику.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" -msgstr "" +msgstr "База података има машинско кодирање речи мање важности.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" -msgstr "" +msgstr "База података има машинско кодирање речи више важности.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" -msgstr "" +msgstr "Поредак машинског кодирања речи базе података није очигледан.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -933,141 +1385,182 @@ msgid "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" msgstr "" - -#: locate/locate.c:1463 +"Употреба: %s [-d путања | --database=путања] [-e | -E | --[не-]постојећи]\n" +" [--limit=N | -l N] [-w | --wholename] [-b | --basename] \n" +" [--regextype=ВРСТА] [-S | --statistics] [-0 | --null] [-c | --" +"count]\n" +" [-i | --ignore-case] [-L | --follow] [-m | --mmap] [-s | --" +"stdio]\n" +" [-P | -H | --nofollow] [-p | --print] [-A | --all] [-r | --" +"regex]\n" +" [--max-database-age D] [--version] [--help]\n" +" шаблон...\n" + +#: locate/locate.c:1435 msgid "failed to drop group privileges" -msgstr "" +msgstr "нисам успео да одбацим повластице групе" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "" +msgstr "нисам успео да одбацим повластице подешавања киб-а" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" -msgstr "" +msgstr "Нисам успео потпуно да одбацим повластице" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "" +msgstr "нисам успео да одбацим повластице подешавања гиб-а" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" +"упозорење: база података локатора може бити прочитана само једном са " +"стандардног улаза" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "" +msgstr "није успео позив системског времена" # bug: plural-forms -#: locate/locate.c:1856 -#, fuzzy, c-format +#: locate/locate.c:1844 +#, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" -msgstr "упозорење: база „%s“ је стара више од %d %s" +msgstr "" +"упозорење: база података „%s“ је стара више од %d %s (тренутна старост је " +"%.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" +"УПОЗОРЕЊЕ: база података локатора „%s“ је изграђена са другачијим поретком " +"бајта" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" -msgstr "" +msgstr "неочекивани крај датотеке у %s" -#: locate/word_io.c:146 -#, fuzzy, c-format +#: locate/word_io.c:148 +#, c-format msgid "error reading a word from %s" -msgstr "грешка при чекању %s" +msgstr "грешка читања речи са „%s“" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." -msgstr "" +msgstr "Неисправан низ истицања „%s“ у одредници улазног раздвојника." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" +"Неисправан низ истицања „%s“ у одредници улазног раздвојника; вредности " +"знака не смеју да превазиђу %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" +"Неисправан пребацивачки низ „%s“ у одредници улазног раздвојника; вредности " +"знака не смеју да превазиђу %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" +"Неисправан пребацивачки низ „%s“ у одредници улазног раздвојника; пратећи " +"знаци „%s“ нису препознати." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" +"Неисправна одредница улазног раздвојника „%s“: раздвојник мора бити или " +"један знак или пребацивачки низ који почиње контра косом цртом (\\)." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "окружење је превелико за извршење" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" -msgstr "" +msgstr "упозорење: вредност „%ld“ за опцију -s је превелика, користим %ld" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "опција --%s не може бити подешена на вредност која укључује „=“" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "нисам успео да расподесим променљиву окружења „%s“" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "упозорење: опција -E нема дејства ако се користе -0 или -d.\n" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Не могу да подесим руковаоца сигналом „SIGUSR1“" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Не могу да подесим руковаоца сигналом „SIGUSR2“" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" -msgstr "" +msgstr "Не могу да отворим улазну датотеку „%s“" # bug: plural-forms -#: xargs/xargs.c:669 -#, fuzzy, c-format +#: xargs/xargs.c:695 +#, c-format msgid "Your environment variables take up % bytes\n" -msgstr "Ваше променљиве окружења заузимају %ld бајтова\n" +msgstr "Променљиве окружења заузимају % бајтова\n" -#: xargs/xargs.c:672 -#, fuzzy, c-format +#: xargs/xargs.c:698 +#, c-format msgid "POSIX upper limit on argument length (this system): %\n" -msgstr "Горње и доње POSIX границе за дужину аргумента: %ld, %ld\n" +msgstr "Горња ПОСИКС граница за дужину аргумента (овај систем): %\n" -#: xargs/xargs.c:675 -#, fuzzy, c-format +#: xargs/xargs.c:701 +#, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" -msgstr "Горње и доње POSIX границе за дужину аргумента: %ld, %ld\n" +msgstr "" +"Најмања допустива горња ПОСИКС граница за дужину аргумента (сви системи): " +"%\n" -#: xargs/xargs.c:678 -#, fuzzy, c-format +#: xargs/xargs.c:704 +#, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "Највећа дужина наредбе коју заправо можемо користити: %ld\n" +msgstr "Највећа дужина наредбе коју заправо можемо користити: %\n" -#: xargs/xargs.c:681 -#, fuzzy, c-format +#: xargs/xargs.c:707 +#, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "Величина бафера наредби који заправо користимо: %ld\n" +msgstr "Величина бафера наредби који заправо користимо: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1075,355 +1568,332 @@ msgid "" "run commands; if this is not what you wanted to happen, please type the end-" "of-file keystroke.\n" msgstr "" +"\n" +"Извршавање иксаргса ће се сада наставити, а покушаће да чита његове улазне и " +"наредбе за покретање; ако ово није оно што сте желели да се догоди, молим " +"укуцајте кључни термин за крај датотеке.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" +"Упозорење: „%s“ ће бити покренуто барем једном. Ако не желите да се ово " +"догоди, онда притисните кључни термин за прекид.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" -"неупарен наводник %s; уобичајено су наводници нарочити за xargs осим ако " -"користите опцију -0" +"неупарен наводник %s; по основи наводници су нарочити за иксаргс осим ако не " +"користите опцију „-0“" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "двоструки" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "једноструки" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" +"УПОЗОРЕЊЕ: НИШТАВАН знак се појавио у улазу. Не може бити прослеђен кроз " +"списак аргумената. Да ли сте мислили да користите опцију „--null“?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" -msgstr "ред аргумената предугачак" +msgstr "ред аргумената је предуг" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Нисам успео да пишем на стандардни излаз" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "" +msgstr "нисам успео да отворим „/dev/tty“ за читање" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Нисам успео да пишем на стандардни излаз" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "не могу да доделим меморију" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "нисам успео да подесим променљиву окружења „%s“" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" -msgstr "" +msgstr "не могу да направим процесни ланац пре цепања" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" +"неуспело безбедно читање „errno-buffer“-а у „xargs_do_exec“-у (ово је " +"вероватно грешка, молим пријавите је)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" +"читање је вратило неочекивану вредност „%d“; ово је вероватно грешка, молим " +"пријавите је" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "грешка при чекању на подређени процес" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "" +msgid "WARNING: Lost track of %lu child processes" +msgstr "УПОЗОРЕЊЕ: Изгубљен траг „%lu“ подређених процеса" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" -msgstr "%s: завршио са стањем 255; обустављам" +msgstr "%s: је завршио са стањем 255; обустављам" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" -msgstr "%s: заустављен сигналом %d" +msgstr "%s: је заустављен сигналом %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" -msgstr "%s: окончан сигналом %d" +msgstr "%s: је окончан сигналом %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: неисправан број за опцију -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: вредност за опцију -%c мора бити >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: вредност за опцију -%c мора бити < %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Употреба: %s [-0prtx] [-e[ниска-краја]] [-i[ниска-замене]] [-l[макс-" -"редова]]\n" -" [-n макс-арг] [-s макс-знакова] [-P макс-проц] [--null] \n" -" [--eof[=ниска-краја]] [--replace[=ниска-замене]] \n" -" [--max-lines[=макс-редова]] [--interactive] [--max-chars=макс-" -"знакова] \n" -" [--verbose] [--exit] [--max-procs=макс-проц] [--max-args=макс-арг] \n" -" [--no-run-if-empty] [--version] [--help] [command [почетни-" -"аргументи]]\n" - -#~ msgid "cannot get current directory" -#~ msgstr "не могу да сазнам текући директоријум" - -#~ msgid "invalid argument %s for %s" -#~ msgstr "неисправан аргумент %s за %s" - -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "неједнозначан аргумент %s за %s" - -#~ msgid "Valid arguments are:" -#~ msgstr "Допуштени аргументи су:" - -#~ msgid "Unknown system error" -#~ msgstr "Непозната системска грешка" - -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: опција „%s“ је неједнозначна\n" - -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: опција „--%s“ не дозвољава аргумент\n" - -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: опција „%c%s“ не дозвољава аргумент\n" - -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: опција „%s“ захтева аргумент\n" - -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: непозната опција „--%s“\n" - -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: непозната опција „%c%s“\n" - -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: недозвољена опција — %c\n" - -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: опција захтева аргумент — %c\n" - -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: опција „-W %s“ је неједнозначна\n" - -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: опција „-W %s“ не дозвољава аргумент\n" - -#~ msgid "`" -#~ msgstr "„" - -#~ msgid "'" -#~ msgstr "“" - -#~ msgid "Success" -#~ msgstr "Успех" - -#~ msgid "No match" -#~ msgstr "Нема поклапања" - -#~ msgid "Invalid regular expression" -#~ msgstr "Неисправан регуларни израз" - -#~ msgid "Invalid collation character" -#~ msgstr "Неисправни знак за ређање" - -#~ msgid "Invalid character class name" -#~ msgstr "Неисправно име класе знака" - -#~ msgid "Trailing backslash" -#~ msgstr "Пратећа обрнута коса црта" - -#~ msgid "Invalid back reference" -#~ msgstr "Неисправно позивање" - -#~ msgid "Unmatched [ or [^" -#~ msgstr "Неупарени [ или [^" - -#~ msgid "Unmatched ( or \\(" -#~ msgstr "Неупарени ( или \\(" - -#~ msgid "Unmatched \\{" -#~ msgstr "Неупарени \\{" - -#~ msgid "Invalid content of \\{\\}" -#~ msgstr "Неисправан садржај \\{\\}" - -#~ msgid "Invalid range end" -#~ msgstr "Неисправан крај опсега" - -# исцрпљена? ;-) -#~ msgid "Memory exhausted" -#~ msgstr "Меморија истрошена" - -#~ msgid "Invalid preceding regular expression" -#~ msgstr "Неисправан претходни регуларни израз" - -#~ msgid "Premature end of regular expression" -#~ msgstr "Превремен крај регуларног израза" - -#~ msgid "Regular expression too big" -#~ msgstr "Регуларни израз превелик" - -#~ msgid "Unmatched ) or \\)" -#~ msgstr "Неупарени ) или \\)" - -#~ msgid "No previous regular expression" -#~ msgstr "Нема претходног регуларног израза" - -#~ msgid "^[yY]" -#~ msgstr "^[yYдДdD]" - -#~ msgid "^[nN]" -#~ msgstr "^[nNнН]" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Употреба: %s [ОПЦИЈА]... НАРЕДБА [ПОЧЕТНИ-АРГУМЕНТИ]...\n" -#~ msgid "memory exhausted" -#~ msgstr "меморија истрошена" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Покрените НАРЕДБУ са аргументима ПОЧЕТНИ-АРГУМЕНТИ и још аргумената читајте " +"са улаза.\n" +"\n" -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "неисправан аргумент „%s“ за „%s“" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Обавезни и опционални аргументи за дуге опције су такође\n" +"обавезни или опционални за одговарајућу кратку опцију.\n" +#: xargs/xargs.c:1626 #, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "неисправан аргумент „%s“ за „%s“" +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null ставке су раздвојене ничим, не " +"размаком;\n" +" искључује обраду наводника и " +"контра косе црте\n" +" и логичку обраду краја " +"датотеке.\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=ДАТОТЕКА чита аргументе из ДАТОТЕКЕ, а не са " +"стандардног улаза\n" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=ЗНАК ставке у улазном току су " +"раздвојене ЗНАКОМ,\n" +" а не размаком; искључује обраду " +"наводника\n" +" и логичку обраду краја " +"датотеке\n" + +#: xargs/xargs.c:1633 #, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "списак аргумената предугачак" - -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: неисправна опција — %c\n" - -#~ msgid "block size" -#~ msgstr "величина блока" - -#~ msgid "Predicate List:\n" -#~ msgstr "Списак предиката:\n" - -#~ msgid "Eval Tree:\n" -#~ msgstr "Стабло вредновања:\n" - -#~ msgid "Optimized Eval Tree:\n" -#~ msgstr "Оптимизовано стабло вредновања:\n" - -#~ msgid "virtual memory exhausted" -#~ msgstr "виртуелна меморија истрошена" - -#~ msgid "error in %s: %s" -#~ msgstr "грешка у %s: %s" - -#~ msgid "" -#~ "actions: -exec COMMAND ; -fprint FILE -fprint0 FILE -fprintf FILE FORMAT\n" -#~ " -fls FILE -ok COMMAND ; -print -print0 -printf FORMAT -prune -ls -" -#~ "delete\n" -#~ " -quit\n" -#~ msgstr "" -#~ "акције: -exec НАРЕДБА ; -fprint ДАТОТЕКА -fprint0 ДАТОТЕКА \n" -#~ " -fprintf ДАТОТЕКА ФОРМАТ -ok НАРЕДБА ; -print -print0 -printf " -#~ "ФОРМАТ \n" -#~ " -prune -ls -delete -quit\n" - -#~ msgid "" -#~ "warning: the predicate -ipath is deprecated; please use -iwholename " -#~ "instead." -#~ msgstr "" -#~ "упозорење: предикат -ipath је застарео; уместо њега користите -iwholename." - -#~ msgid "GNU find version %s\n" -#~ msgstr "ГНУ find издање %s\n" - -#~ msgid "inserting %s\n" -#~ msgstr "умећем %s\n" +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E КРАЈ Поставља логичку ниску краја " +"датотеке; ако се КРАЈ\n" +" јавља као ред улаза, остатак " +"улаза се занемарује\n" +" (занемарује се ако је наведено " +"-0 или -d)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=КРАЈ] исто као и „-E КРАЈ“ ако је " +"наведен КРАЈ;\n" +" у супротном, нема ниске крај-" +"датотеке\n" -#~ msgid " type: %s %s " -#~ msgstr " врста: %s %s " +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R исто као „--replace=R“\n" -#~ msgid "left:\n" -#~ msgstr "лево:\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] мења R у ПОЧЕТНИМ-АРГУМЕНТИМА " +"са називима\n" +" прочитаним са стандардног " +"улаза;\n" +" ако R није наведено, " +"подразумева {}\n" + +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=НАЈВИШЕ-РЕДОВА користи највише НАЈВИШЕ-РЕДОВА " +"не-празних\n" +" редова улаза по линији наредбе\n" -#~ msgid "right:\n" -#~ msgstr "десно:\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[НАЈВИШЕ-РЕДОВА] слично као -L али подразумева " +"највише један\n" +" не-празан ред улаза ако није " +"наведено НАЈВИШЕ-РЕДОВА\n" -#~ msgid "Normalized Eval Tree:\n" -#~ msgstr "Нормализовано стабло вредновања:\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=НАЈВИШЕ-АРГУМЕНАТА користи највише НАЈВИШЕ-АРГУМЕНАТА " +"аргумената по линији наредбе\n" -#~ msgid "" -#~ "Usage: %s [-d path | --database=path] [-e | --existing]\n" -#~ " [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n" -#~ " [--version] [--help] pattern...\n" -#~ msgstr "" -#~ "Употреба: %s [-d путања | --database=путања] [-e | --existing]\n" -#~ " [-i | --ignore-case] [--wholepath] [--basename] [--limit=N | -l N]\n" -#~ " [--version] [--help] шаблон...\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=НАЈВИШЕ-ПРОЦЕСА покреће највише НАЈВИШЕ-ПРОЦЕСА " +"процеса у исто време\n" -#~ msgid "" -#~ "warning: locate database path `%s' contains a trailing colon, which is " -#~ "not a valid database name" -#~ msgstr "" -#~ "упозорење: путања locate базе „%s“ садржи завршну двотачку, што није " -#~ "исправно име базе" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive поставља упит пре покретања наредби\n" -#~ msgid "GNU locate version %s\n" -#~ msgstr "ГНУ locate издање %s\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=ПРОМЕНЉИВА поставља променљиву окружења " +"ПРОМЕНЉИВА у проистеклим процесима\n" -#~ msgid "argument to --limit" -#~ msgstr "аргумент за --limit" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty ако нема аргумената, не покреће " +"НАРЕДБУ;\n" +" ако ова опција није дата, " +"НАРЕДБА\n" +" ће бити покрени барем једном\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=НАЈВИШЕ-ЗНАКОВА ограничава дужину линије наредби на " +"НАЈВИШЕ-ЗНАКОВА\n" -#~ msgid "GNU xargs version %s\n" -#~ msgstr "ГНУ xargs издање %s\n" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits приказује ограничења на дужину линије " +"наредби\n" -#~ msgid "Reducing arg_max (%ld) to arg_size (%ld)\n" -#~ msgstr "Умањујем arg_max (%ld) на arg_size (%ld)\n" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" +" -t, --verbose исписује наредбе пре њиховог " +"извршавања\n" -#~ msgid "%s changed during execution of %s" -#~ msgstr "%s измењен приликом извршавања %s" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit излази ако је величина (видите -s) " +"прекорачена\n" -#~ msgid "%s/.. changed during execution of %s" -#~ msgstr "%s/.. измењен приликом извршавања %s" +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help приказује ову помоћ и излази\n" -#~ msgid "unmatched %s quote" -#~ msgstr "неупарени %s наводник" +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version исписује издање и излази\n" diff --git a/po/sv.gmo b/po/sv.gmo index e58411ed9bfd43d3d8c49cc01632843b8a4c7829..c2be2623bcd681d01fffd3de08f22f1e85abe8e1 100644 GIT binary patch delta 3787 zcmY+`3vg7`8Nl&xm(4qY1QJ35fgAEb5?;ZOm_SKF!czz#LU^nREMyZGl3mzrNJ7yK zwP=)AaSb4fEi>u(AnNEHr`nlzD3nph6dmidBXzXRXmuPlrPE5K*6IJ-d#Uvd-~P_I zd-tB#cWyX-+41r#j_?N)U4sr0IY%rYro@Q+9wkvkudhw9+=yEUEsx?b4&rQFHeO@^ zJ8%{L6YFv51d(z)hO_Vr9>gy&8+WHlSVB||r;6m`O`M4{(ijLX!>Q;-?WhNf@I30^ zMv$M#Rh)<)VhR2o^>_JP%)@HT!d9G%_u&j2o){L%r82?=1HVKDFB2v)dYq0r(q_~j z^r8;r4C+8HAwQ9i(Zqk@Y8+1IIgIctte_n;*&0X{>Hv4)G#m_5SwiI{+=*khjhWm; z`(^CMES4h&&!P_S6->t0PzU-ha;r>Ynq^pwy7W7-9nWGZI+@KcupEmqJVxbqDpOgn z&A1+W@hPlAgJEvL9jF6+74`nFP&+DOR2AsK+wgHbiND1mY?>}ohyO+{Nj1x;18YGR zCoHF^xVdlvb#LMfD_IsHH%K!EFo^qb6f1Ef`*s0OAd{2D><76kn{3_44u}UCtL#D+ zSNd&FV>$iH^HhGo7k@=frhGCc2^XQZYfwktXt(#Gi}oRm#Rrfv$T8GhcmcJ;OQ;k0 z5Sg3&1NFZ2e5=1Q%%y(`QPI6Pg?i&9G;q{*T!FQ>`N(d`64U{0M(wa08*l)1OWs32 zrWRVs8b2O=LGDku$0JC$p*4VKwR=9!5RS&!etDITy(~s`xdOF{q#I*ML$Q)nJM$FQ}Qsf%kl;;@* z{05V7ltY?{=*tjrLDT{Qw>)WtH$V+=zP@@p8c{sHdZdY3oY0-~bMwP9%-g z@4-39;>u8%ijHUm^@cIzJqzam<$8EA4vy!eVO(CxPdKt{uh!lJ$!Kz`HduS6z;+` z$ROoO)IEJ4*+xlS&N~5DqAu}6s2vXD6PUMxw;o}S zG#e+cvXZV2kJ8?T_u(hVYD*i_{3V{pY`lAo^~USLINJ9j6P3f5gAbzS#Lw;aC0s)L z&&V!G&YcWm5|yn~bcs7r+Xpche}Y-~62{;NYDe$j47_H4e-ra*r?0i%6BVexZ$w^t z5<(V7&e-h_a1L$fI@VwJWIh|Jd)H!n0(I{%qR!xbH1KQGCCsk3marH#IgevMUc}q5 zW<8zbZq!rqE7SqKg_H3*>K4T}u>Lxd?G4Npk75$$Y_MiN8yC>7MV(;?b>@%ZyZ9>V zIX_Ns$qxQ3V-4*qBv35I@p91b$73?yf%^RAIFI``gsJEZ`!`v8e-8C{nW)#_M19bw zn2uxEjV^}2od+C1R$s1dW)-n;i*=fskhGFtV*$o)wVZ>0quq#~VYqf1%RptG+gh4( zs?q#XlM5jHADrWMLW`yq)V@Z*0RV#j^Vv_eIdGtNA>(aPDPK2 zmVia{7~W6)ZbFwofzVm&ahyny2GOD`q9;L*mzF0i{`a|^S}t+KzS4$!?fMU~NY6k2 zq9v8jKD+L_z+4JPt1p)V9Iox~X;k$8yELM}#6!LDe_`Zx%r zo`iqI$6TU;AXlQN0OUcUk{C~DLjHg8(0Gg>7iBlmPh=6KQuNO)r!acVKvIZhguYjT zL?{UU8e*DUB}2tjM0U&F05xadBo&)?4GuKjfTqPV(>Z2YUQQS6^4i+i7@% z!9Xyw&o~{)%A1znZ0bYG)wb7aul_={q@b#;_lnpOfq;nclz49 z1KoOub+1v-WwZr?U}hGSIg)pE1iF0wcB9SL;Wbwj9(5#qcf-Y5qs|H5&Oorw@b=#0 z>1H6U=Ff`q5>ra&E-0T{Qel*oR4yzx-!6@hbH+`& delta 4981 zcmbW(dvH|M9l-IkA@azhLIA@voP-1kvN1uTJPZ&>NMZpoyxj(J$=+<1?CyoTH-S)a zL8a0virq#>WgOc9I~7Li>~zrT^p&>L$7mUGrs}jRRHx!NQ)|_++Sm7Y@7+zR?H}!( z`Q>xYxvz82`TZ8Y_jKUip+M@jlKjDdQtCmXmUuf~sSEhnIHhF#-6GEq@MA)bg~dvp z!FsI5OL!EEzMxbq4&pj|4R65Ul}cTWCLX|JI1LNNtCVtRRE<}v5+BA2{2@-kOE?`r zMR`%_1f}L-BQm67Sb_(!4v(YU{}Yt^-on`!;G(Hmg+W}7voKzgQmUNBF$OfAMJBDz z<1&05Wu|2ly&D#zOk^9%i|#-!QIBH=pTRbaPvSW&-#J`N|L2pviKwf*iB{qa#y6*E z+(;vdJMp`|6HArqqTi2)@Kv0NA(llZIDoPnM^Pp^h+Lvx!diS6ug95u_6@iZBX|!k z#1HTsrmFe8YiL}=>#&%0+k%a_4m7>hrL|mt<-xc)pW(R-b(0e zS^qH%tYAQ9+=`NXJFtxhoWoW019jdKHlytQ9$bchKq`nT5EN zl&1n!3qH(qJMdNdAJ?<~7L5z6?-5)@rfkGtVi?O7dD(pj%1WI>S;C7bU$Sd48IDJg zT~dEXnNSs(Dd$^}0#aSbBB~U!i0U*-622@06KGt3+2I&An#B= zKzY!|sIiKgl)Yb#vK1z_po8W39P&--HDuA$Rb;5#pK7I1N}~@4@ffbf*{p9NOSK2( zK?j#BMIx)8A*-j}#aURs!ux$_#0dSvzL&9^{w0d_Kn%33i7ybx0V1TdT z8`UQKz0`l2hWvu-Z7Er*H}HSG6}&g4m1Ga1KR10~>KBZb!CF9YD5QJ%bbRLzKN9 zcZ=7bg5~t*<5XOSS6~m0!34^d^+mml2&*Wux%l`-)}Lpn-!L!%D>iu(S%{Jgn^BfJ zjxvFt;&J>l$`{_wNtwtAlrMT7TPY=Htz?la~tbl&4m#L z$VPQP7UH8=!wpZMY{e_LdOsi^VJZEhkT+h5qvcB(W*s#ek1;d=z%qkkIT!4o@_8jE*zdMk1qd9M00LB6@iZT!8`Zy&=sguEd7HJ=I;f&u=fleBxeWkSHVM==E@`;~;Go$6fw${`fMSN|49y zF_FKL(EM1s#{>MG?6-w4@qRb)R{DdIEO+?rew;@P_+o?`B zr}ks^kg}7!kz)@r({0ICvHz0sYY3XTL-vRqa&sX&C^fz-+rbsYSBYx~w$nZGd@Wo| zu>I;zf?ag~eTm}Ni2~wo!hI>p?`D6e4EV=h-vcN=9#o_v>DAW=ISvy`38{Zc$dL!B zqte7~qMNV@sh%xFjF96h50xsW(L|IG2}0_0A(15HH()K1JxG3aA7N$(aMXx)ws}8| zqr{CwgFko(<+rAlSWU=LFS)tiYrEz1723=Feho_IUrjtnNV!xKa!5&SO$Umn%Z96O zq|1v-=WL)=L39zCm`=$3-|po9kVU+lFFo6t-d;Q{ugu8oFK*9IA6_&meQCnVij{rQ zn4|lW(L_YItlOj`iN08Lr|viHWYkLNs$@ZCcFEW=wQH@gNl!&^g<1}q2Zg>=(w>j$b`&PQtpd|vi)R-`|eyf)R1d-jCgAs zpSn9{beY*VM?)hA+-LX$p@x4uGdzieOd=ID?1(#upu9*r?i=0F;cJubgu8kSd-z(n z=U(iM4`03By?VE8b#b+px|jPW7*FF z1?|2>Fxnk7MVY+|#*U^ew&|4vkw{p_&G3IKh*uUJAG2)D(8-ADNJ$Kxw6)}!j!;U`h@%rS z^4YSGvE4(bk};;})MR>A^yN>cdW>GD&y2+k-D@~T%!-(a^y1Z#&W(oNY1vNpboMM| zGIT0IIVG}XV#H!ja_H22?f7?4C-a$3%nY+mrsmnEt&RRa_9eCH%5QN9y*yw8g_1<$c$#q#>xAVR1l{lva4q3vx6h5$v>6K z-H_dNZuH8^Ho~S`jb2rGT{l~DrQ}tWe`Yvu+cZCALnj?4!B54A2}MJn8&5^NLd_M~ z=dR#_;U~MbmP^3gWJZ>oo0=nT@k-7yyL!z;?uJ~=rGoyM;dcyIotaF^3jF8F^G~|f z_x~5)6nXf_>dVetif@(<^?Jo;<*LsZ{`!ve8!eO4b6aO*Zf%{JmpOG)M<6p}&5MCd O;kuGhnd)1L3jYPo1ePlR diff --git a/po/sv.po b/po/sv.po index 4868c33..dad813c 100644 --- a/po/sv.po +++ b/po/sv.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.4.0\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2008-03-16 09:55+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -19,32 +19,69 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "misslyckades med att Ã¥tergÃ¥ till ursprunglig arbetskatalog" + +#: find/exec.c:256 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Cannot close standard input" +msgstr "Kan inte stänga standard in" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Misslyckades med att byta katalog" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "kan inte grena" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "fel vid väntande pÃ¥ %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s avslutades av signal %d" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" msgstr "" -#: find/find.c:205 +# Osäker... hur översätta "sanity check"? +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "funktionskontroll av biblioteksfunktionen fnmatch() misslyckades." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "kan inte läsa av aktuell katalog" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "Varning: filsystemet %s har nyligen avmonterats." -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "Varning: filsystemet %s har nyligen monterats." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -53,7 +90,7 @@ msgstr "" "%s%s ändrades under körning av %s (gammalt enhetsnummer %ld, nytt " "enhetsnummer %ld, filsystemstypen är %s) [ref %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -62,17 +99,17 @@ msgstr "" "%s%s ändrades under körning av %s (gammalt inodsnummer %, nytt " "inodsnummer %, filsystemstyp är %s) [ref %ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "misslyckades med att Ã¥tergÃ¥ till ursprunglig arbetskatalog" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "Misslyckades med att säkert byta katalog till %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -81,7 +118,7 @@ msgstr "" "Symboliska länken %s är en del av en slinga i kataloghierarkin; vi har redan " "besökt katalogen till vilken den pekar." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -96,12 +133,12 @@ msgstr[1] "" "Filsystemsslinga upptäcktes; %s har samma enhetsnummer och inod som en " "katalog vilken är %d nivÃ¥er högre upp i filsystemshierarkin" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "varning: följer inte den symboliska länken %s" -#: find/find.c:1386 +#: find/find.c:1480 #, fuzzy, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -116,12 +153,12 @@ msgstr "" "Tidigare resultat kan har misslyckats att inkludera kataloger som skulle ha " "sökts igenom." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "okänd" @@ -133,7 +170,7 @@ msgid "" msgstr "" "Filsystemsslinga upptäcktes; %s är en del av samma filsystemsslinga som %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, fuzzy, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "Varning: filen %s verkar ha läget 0000" @@ -143,12 +180,17 @@ msgstr "Varning: filen %s verkar ha läget 0000" msgid "cannot search %s" msgstr "kan inte söka i %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "misslyckades med att Ã¥tergÃ¥ till ursprunglig arbetskatalog" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, fuzzy, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -159,7 +201,7 @@ msgstr "" "depth är aktiverat. Om du vill fortsätta ändÃ¥ kan du uttryckligen använda " "flaggan -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -172,7 +214,7 @@ msgstr "" "före den, liksom de som är angivna efter den). Ange flaggor före andra " "argument.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -181,7 +223,7 @@ msgstr "" "varning: flaggan -d är förÃ¥ldrad; använd -depth istället, eftersom den " "senare stöds enligt POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -190,17 +232,17 @@ msgstr "" "%s är inte namnet pÃ¥ en befintlig grupp och det ser inte ut som ett " "numeriskt grupp-id därför att det har det oväntade ändelsen %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s är inte namnet pÃ¥ en befintlig grupp" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "argumentet till -group är tomt, men bör vara ett gruppnamn" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -210,7 +252,7 @@ msgstr "" "standardsökväg är aktuell katalog; standarduttryck är -print\n" "uttryck kan bestÃ¥ av: operatorer, flaggor, tester och Ã¥tgärder:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -222,7 +264,7 @@ msgstr "" " ( UTTR ) ! UTTR -not UTTR UTTR1 -a UTTR2 UTTR1 -and UTTR2\n" " UTTR1 -o UTTR2 UTTR1 -or UTTR2 UTTR1 , UTTR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -236,7 +278,7 @@ msgstr "" " -depth --help -maxdepth NIVÅER -mindepth NIVÅER -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -250,10 +292,10 @@ msgstr "" "MÖNSTER\n" " -links N -lname MÖNSTER -mmin N -mtime N -name MÖNSTER -newer FIL" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -263,11 +305,11 @@ msgstr "" " -wholename MÖNSTER -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAMN -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -282,7 +324,7 @@ msgstr "" " -execdir KOMMANDO ; -execdir KOMMANDO {} + -okdir KOMMANDO ;\n" # Lade till att man bör skriva felrapporten pÃ¥ engelska. -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -295,12 +337,12 @@ msgstr "" "Skicka synpunkter pÃ¥ översättningen till tp-sv@listor.tp-sv.se." # Osäker... hur översätta "sanity check"? -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "funktionskontroll av biblioteksfunktionen fnmatch() misslyckades." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -315,50 +357,45 @@ msgstr "" "användbart, eller kanske \"-samefile\". Alternativt, om du använder GNU " "grep, kunde du använda \"'find ... -print0 | grep -FzZ %s\"." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "Förväntade ett positivt decimalt heltalsargument till %s, men fick %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" "Det här systemet tillhandahÃ¥ller inte ett sätt att hitta födelsetiden för en " "fil." -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s: flaggan \"%s\" kräver ett argument\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" "Jag kan inte lista ut om jag ska tolka %s som ett datum eller klockslag" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Kan inte läsa av födelsetid för filen %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Läget %s är inte giltigt när POSIXLY_CORRECT är pÃ¥slaget." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "ogiltigt läge %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -370,22 +407,22 @@ msgstr "" "perm 000; alltsÃ¥, det brukade inte matcha nÃ¥gra fil men nu matchar det alla " "filer." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "tomt argument till -size ogiltigt" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "ogiltig typ \"%c\" för -size" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "Ogiltigt argument \"%s%c\" till -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -393,74 +430,82 @@ msgstr "" "Flaggan -show-control-chars tar ett argument som mÃ¥ste vara \"literal\" " "eller \"safe\"" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Ogiltigt argument %s till -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, fuzzy, c-format msgid "%s is not the name of a known user" msgstr "%s är inte namnet pÃ¥ en befintlig grupp" -#: find/parser.c:2678 +#: find/parser.c:2614 #, fuzzy, c-format msgid "The argument to -user should not be empty" msgstr "Argumentet för flaggan --max-database-age fÃ¥r inte vara tom" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Aktiverade funktioner: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Argument till -type bör endast innehÃ¥lla en bokstav" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Okänt argument till -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "varning: okänd kontrollsekvens \"\\%c\"" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "fel: %s pÃ¥ slutet av formatsträng" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "varning: okänt formatdirektiv \"%%%c\"" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "fel: formatdirektivet \"%%%c\" är reserverat för framtida användning" +msgid "Unknown argument to -type: %c" +msgstr "Okänt argument till -type: %c" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Den aktuella katalogen är inkluderad i miljövariabeln PATH, vilket är " "osäkert i kombination med Ã¥tgärden %s för find. Ta bort aktuell katalog frÃ¥n " "din $PATH (alltsÃ¥, ta bort \".\", inledande eller avslutande kolon)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -470,7 +515,7 @@ msgstr "" "Relativa sökvägen %s är inkluderad i miljövariabeln PATH, vilket är osäkert " "i kombination med Ã¥tgärden %s för find. Ta bort den posten frÃ¥n $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -479,95 +524,101 @@ msgstr "" "Du kan inte använda {} inom verktygsnamnet för -execdir och -okdir, pÃ¥ grund " "av att det innebär en möjlig säkerhetsrisk." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "Endast en instans av {} stöds med -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Miljön är för stor för exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, fuzzy, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "aritmiskt överflöde vid försök att beräkna dagens slut" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "aritmiskt överflöde vid försök att beräkna dagens slut" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "standard fel" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "standard ut" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "kan inte ta bort %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "misslyckades med att Ã¥tergÃ¥ till ursprunglig arbetskatalog" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "Varning: kan inte bestämma födelsetiden för filen %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Misslyckades med att skriva till standard ut" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Kan inte stänga standard in" +msgid "getfilecon failed: %s" +msgstr "" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Misslyckades med att byta katalog" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "kan inte grena" +msgid "warning: unrecognized escape `\\%c'" +msgstr "varning: okänd kontrollsekvens \"\\%c\"" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "fel vid väntande pÃ¥ %s" +msgid "error: %s at end of format string" +msgstr "fel: %s pÃ¥ slutet av formatsträng" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s avslutades av signal %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "fel: formatdirektivet \"%%%c\" är reserverat för framtida användning" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "varning: okänt formatdirektiv \"%%%c\"" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "ogiltigt uttryck" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -576,22 +627,22 @@ msgstr "" "ogiltigt uttryck; du har använt en binäroperator \"%s\" utan nÃ¥gonting före " "den." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "förväntade ett uttryck mellan \"%s\" och \")\"" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "förväntade ett uttryck efter \"%s\"" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "ogiltigt uttryck; du har för mÃ¥nga \")\"" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -600,12 +651,12 @@ msgstr "" "ogiltigt uttryck; förväntade att hitta ett \")\"-tecken men kunde inte se " "ett. Kanske behöver du ett extra predikat efter \"%s\"" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "ogiltigt uttryck; tomma paranteser tillÃ¥ts inte." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " @@ -614,114 +665,114 @@ msgstr "" "ogiltigt uttryck; Jag förväntade mig att hitta ett \")\"-tecken nÃ¥gonstans " "men kunde inte se ett." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "hoppsan -- ogiltig uttryckstyp!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "hoppsan -- ogiltig uttryckstyp (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "sökvägar mÃ¥ste komma före uttryck: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "okänt predikat \"%s\"" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "ogiltigt predikat \"%s\"" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "ogiltigt argument \"%s\" till \"%s\"" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "argument till \"%s\" saknas" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "du har för mÃ¥nga \")\"" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "oväntat extra predikat \"%s\"" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "oväntat extra predikat" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "hoppsan -- ogiltig standardinsättning av \"and\"!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Användning: %s [-H] [-L] [-P] [-OnivÃ¥] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [sökväg...] [uttryck]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "kunde inte spara aktuell arbetskatalog" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "kunde inte spara aktuell arbetskatalog" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Ignorerar okänd felsökningsflagga %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Tomt argument till flaggan -D." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "Flaggan -O mÃ¥ste omedelbart efterföljas av ett decimalt heltal" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Ange ett decimaltal omedelbart efter -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Ogiltig optimeringsnivÃ¥ %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -730,7 +781,7 @@ msgstr "" "OptimeringsnivÃ¥n %lu är för hög. Om du mycket snabbt vill hitta filer bör " "du överväga att använda GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -739,66 +790,382 @@ msgstr "" "Miljövariabeln FIND_BLOCK_SIZE stöds inte, det enda som pÃ¥verkar " "blockstorleken är miljövariabeln POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "ogiltigt argument %s för %s" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "tvetydigt argument %s för %s" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Giltiga argument är:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "fel vid stängning av fil" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "skrivfel" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Okänt systemfel" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: flaggan \"%s\" är tvetydig\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: flaggan \"--%s\" tar inget argument\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: flaggan \"%c%s\" tar inget argument\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: flaggan \"%s\" kräver ett argument\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: okänd flagga \"--%s\"\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: okänd flagga \"%c%s\"\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: ogiltig flagga -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: flaggan kräver ett argument -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: flaggan \"-W %s\" är tvetydig\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: flaggan \"-W %s\" tillÃ¥ter inget argument\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: flaggan \"%s\" kräver ett argument\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "kunde inte spara aktuell arbetskatalog" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "kunde inte spara aktuell arbetskatalog" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "\"" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "\"" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[jJyY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "minnet slut" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "ogiltigt %s%s-argument \"%s\"" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "ogiltigt suffix i %s%s-argument \"%s\"" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "%s%s-argumentet \"%s\" är för stort" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "kommandot är för lÃ¥ngt" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, fuzzy, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" "fÃ¥r inte plats med ett ensamt argument inom gränsen för argumentlistans " "storlek" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "argumentlistan är för lÃ¥ng" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Misslyckades med att skriva till standard ut" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Byggd med GNU gnulib version %s\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Okänd reguljärt uttryckstyp %s; giltiga typer är %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, fuzzy, c-format msgid "Unexpected suffix %s on %s" msgstr "oväntat filslut i %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, fuzzy, c-format msgid "Expected an integer: %s" msgstr "förväntade ett uttryck efter \"%s\"" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Okänd reguljärt uttryckstyp %s; giltiga typer är %s." - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -807,8 +1174,8 @@ msgstr "" "Användning: %s [--version | --help]\n" "eller %s vanligaste_bigram < fillista > locate-databas\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -817,85 +1184,80 @@ msgstr "" "Rapportera fel till \n" "och synpunkter pÃ¥ översättningen till .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "skrivfel" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "Användning: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "Du mÃ¥ste ange en säkerhetsnivÃ¥ som ett decimalt heltal." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "SäkerhetsnivÃ¥n %s är utanför konverteringsintervallet." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "SäkerhetsnivÃ¥n %s har oväntade suffixet %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "slocates säkerhetsnivÃ¥ %ld stöds inte." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Misslyckades med att skriva till standard ut" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "dagar" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "Argumentet för flaggan --max-database-age fÃ¥r inte vara tom" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Ogiltigt argument %s för flaggan --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "locate-databasen %s innehÃ¥ller ett filnamn som är längre än vad locate kan " "hantera" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "locate-databasen %s är skadad eller ogiltig" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Storlek pÃ¥ locate-databasen: %s byte\n" msgstr[1] "Storlek pÃ¥ locate-databasen: %s byte\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Matchande filnamn: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Alla filnamn: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -912,7 +1274,7 @@ msgstr "" "\t%s nyradstecken och \n" "\t%s tecken med den höga biten satt.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -921,17 +1283,17 @@ msgstr "" "NÃ¥gra filnamn kan har filtrerats bort, sÃ¥ vi kan inte beräkna " "komprimeringsförhÃ¥llandet.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "KomprimeringsförhÃ¥llande %4.2f% % (högre är bättre)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "KomprimeringsförhÃ¥llandet är odefinierat\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -940,7 +1302,7 @@ msgstr "" "locate-databasen %s ser ut som en slocate-databas men den verkar har " "säkerhetsnivÃ¥n %c, som GNU findutils för närvarande inte har stöd för" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -949,7 +1311,7 @@ msgstr "" "%s är en slocate-databas. Stödet för dessa är nytt sÃ¥ förvänta dig problem " "för tillfället." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -957,7 +1319,7 @@ msgstr "" "%s är en slocate-databas med säkerhetsnivÃ¥n %d som inte stöds; hoppar över " "den." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -968,35 +1330,35 @@ msgstr "" "slocate-format med en säkerhetsnivÃ¥ högre än 0. Inga resultat kommer att " "genereras för den här databasen.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s är en slocate-databas. SlÃ¥r pÃ¥ flaggan \"-e\"." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "locate-databasen %s med gammalt format är för kort för att vara giltig" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "Databasen %s är i formatet %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Databasen har ordkodning för little-endian-maskiner.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "Databasen har ordkodning för big-endian-maskiner.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Ordningen för databasens maskinordskodning är inte självklar.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, fuzzy, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1016,59 +1378,59 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " mönster...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "misslyckades med att släppa grupprättigheter" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "misslyckades med att släppa setuid-rättigheter" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Misslyckades med att fullständigt släppa rättigheter" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "misslyckades med att släppa setgid-rättigheter" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "varning: locate-databasen kan endast läsas en gÃ¥ng frÃ¥n standard in." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "tidsystemsanrop misslyckades" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "varning: databasen %s är mer än %d %s gammal (faktisk Ã¥lder är %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, fuzzy, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "Varning: locate-databasen %s byggdes med en annan byteordning" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "oväntat filslut i %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "fel vid läsning av ett ord frÃ¥n %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1077,7 +1439,7 @@ msgstr "" "Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen; teckenvärden " "fÃ¥r inte överstiga %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1086,7 +1448,7 @@ msgstr "" "Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen; teckenvärden " "fÃ¥r inte överstiga %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1095,7 +1457,7 @@ msgstr "" "Ogiltig specialsekvens %s i inmatningsavskiljarspecifikationen; " "efterföljande tecknen %s är okända." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1104,42 +1466,57 @@ msgstr "" "Ogiltig inmatningsavskiljarspecifikation %s: avskiljaren mÃ¥ste vara antingen " "ett enstaka tecken eller en specialsekvens som börjar med \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "miljön är för stor för exec" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, fuzzy, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "Varning: värdet %ld för flaggan -s är för stort, använder %ld istället" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Kan inte öppna inmatningsfilen %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "Dina miljövariabler tar upp %lu byte\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "Övre POSIX-gräns för argumentlängd (det här systemet): %lu\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " @@ -1147,17 +1524,17 @@ msgid "" msgstr "" "Minsta tillÃ¥tna övre POSIX-gräns för argumentlängd (alla system): %lu\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "Maximal längd pÃ¥ kommando som vi faktiskt kan använda: %ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "Storlek pÃ¥ kommandobufferten som vi faktiskt använder: %lu\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1170,7 +1547,7 @@ msgstr "" "dess inmatning och köra kommandon; om det här inte är vad du ville skulle " "hända kan du trycka pÃ¥ tangentkombinationen för filslut.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1179,7 +1556,7 @@ msgstr "" "Varning: %s kommer att köras minst en gÃ¥ng. Om du inte vill att det här ska " "hända kan du trycka pÃ¥ tangentkombinationen för avbrott.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1188,15 +1565,15 @@ msgstr "" "citattecknet %s är oavslutat; som standard är citattecken speciella för " "xargs sÃ¥vida du inte använder flaggan -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "dubbelt" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "enkelt" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, fuzzy, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1205,162 +1582,261 @@ msgstr "" "Varning: ett NUL-tecken förekommer i inmatningen. Det kan inte skickas " "vidare i argumentlistan. Tänkte du använda flaggan --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "argumentraden är för lÃ¥ng" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Misslyckades med att skriva till standard ut" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Misslyckades med att skriva till standard ut" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "fel vid väntande pÃ¥ barnprocess" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, fuzzy, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "Varning: Förlorade kontrollen över %d barnprocesser" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: avslutades med status 255; avbryter" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: stoppades av signal %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: avslutades av signal %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: ogiltigt tal för flaggan -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: värdet pÃ¥ flaggan -%c ska vara >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: värdet pÃ¥ flaggan -%c ska vara < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Användning: %s [-0prtx] [--interactive] [--null] [-d|--" -"delimiter=avgränsare]\n" -" [-E filslutssträng] [-e[filslutssträng]] [--eof[=filslutssträng]]\n" -" [-L max-rader] [-l[max-rader]] [--max-lines[=max-rader]]\n" -" [-I ersättningsträng] [-i[ersättningsträng]] [--replace" -"[=ersättningsträng]]\n" -" [-n max-argument] [--max-args=max-argument]\n" -" [-s max-tecken] [--max-chars=max-tecken]\n" -" [-P max-processer] [--max-procs=max-processer] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fil]\n" -" [--version] [--help] [kommando [initiala-argument]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "kan inte fÃ¥ tag i aktuell katalog" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "ogiltigt argument %s för %s" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "tvetydigt argument %s för %s" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "Giltiga argument är:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "error closing file" -#~ msgstr "fel vid stängning av fil" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "Okänt systemfel" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: flaggan \"%s\" är tvetydig\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: flaggan \"--%s\" tar inget argument\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: flaggan \"%c%s\" tar inget argument\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: flaggan \"%s\" kräver ett argument\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: okänd flagga \"--%s\"\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: okänd flagga \"%c%s\"\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: ogiltig flagga -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: flaggan kräver ett argument -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: flaggan \"-W %s\" är tvetydig\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: flaggan \"-W %s\" tillÃ¥ter inget argument\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" -#~ msgid "`" -#~ msgstr "\"" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Läget %s är inte giltigt när POSIXLY_CORRECT är pÃ¥slaget." + +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Byggd med GNU gnulib version %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Användning: %s [-0prtx] [--interactive] [--null] [-d|--" +#~ "delimiter=avgränsare]\n" +#~ " [-E filslutssträng] [-e[filslutssträng]] [--eof" +#~ "[=filslutssträng]]\n" +#~ " [-L max-rader] [-l[max-rader]] [--max-lines[=max-rader]]\n" +#~ " [-I ersättningsträng] [-i[ersättningsträng]] [--replace" +#~ "[=ersättningsträng]]\n" +#~ " [-n max-argument] [--max-args=max-argument]\n" +#~ " [-s max-tecken] [--max-chars=max-tecken]\n" +#~ " [-P max-processer] [--max-procs=max-processer] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=fil]\n" +#~ " [--version] [--help] [kommando [initiala-argument]]\n" -#~ msgid "'" -#~ msgstr "\"" +#~ msgid "cannot get current directory" +#~ msgstr "kan inte fÃ¥ tag i aktuell katalog" #~ msgid "Success" #~ msgstr "Lyckades" @@ -1416,24 +1892,6 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "Inget föregÃ¥ende reguljärt uttryck" -#~ msgid "^[yY]" -#~ msgstr "^[jJyY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "minnet slut" - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "ogiltigt %s%s-argument \"%s\"" - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "ogiltigt suffix i %s%s-argument \"%s\"" - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "%s%s-argumentet \"%s\" är för stort" - #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: otillÃ¥ten flagga -- %c\n" diff --git a/po/tr.gmo b/po/tr.gmo index 7c6b18b4d271b27b5518f70ab55951266effe8e3..b228060ae664c9c512b38c682650bd23272abca1 100644 GIT binary patch literal 39565 zcmdU&37lj}UFYA(T__+7*D%1FqpWJCvig7#=$@XL>h9{EqR;8>8D^%Z>3)^@sw&B= z$d}pOSsV*0&LCc#u88z1=%9i-BRU}VE@;)@1*ojLil|(xA8{2~#YLC>u;1T5BHnvh zRei{@``P?d)IZ;Q5%D7a@sIx*5&0KSeE3@~i=ycBq)ntlkBXufa%1svQKb7vpA<#h zitYxUA?fqc%cJN$z>fhp0GFN|MgIbP7w}%-JDw6nTY+OwjiQ6VS>O)fF9CM~zYOFr zdg0Te=ud&S0-p=K?&(qVO5h3L4Dio^`+#FtMA6>>d%!mXU-FD7`VjCRf$spm?@ITc z!_SPO8@c{z;2#1%15`Z^J}ZiL0i$O}(KKKhcnk3LzyrWP1U?^lO&mp61CIg6fUg3+ z0{F8)UL9R?6>R|C2)q{fKA`gd36L&C{|iWyqRY7{yletK2Y46oGT>{0CxG_==YfCi z;lXR7Xo2hZ1D^nlsr-q+&A`pTT|m`)3P_gdjX+QnJqYA4`h5?-45SIs6{8N`0IYER z5+GfSe$d~44>0EXq$Uj#DT(ZqK-{A~kje3pRf_ZxvK|6ZW_^)cYh!2b!P3(*Te zmfCv^_+!8}@O{8XjywE+5coI{@Nf#hko!*pDeA|5;0u5+1FD}t4`e8#PXS}#zW~*~ zE3SivfG_s&gTN}+&zy*&R|8)IWT>NWqqFKq4E%QBMxf~72B606;J*T&Ol7L?3A|M8*##7SUJe9h(XRmC0Q?K!yMT+=J34+cnKdqV z0rlQK@cF5lJ{$N4K;`=qQ0;lr&F=bEpy(n4 zD&JXP4E&IXp9YG~FPn1tMu7}TbSsdl8r=)jIKLOj6pa2DsB!u#5LOypyTj4zR^Sy} z9|o#lE#MP@uLm9iz5}RwzX)stzYAoE&fWsl^A7fEBLa z1H4(!fu8|B;~=yM{NF&)-RD5E#_Nl~U*o-xxD{ID`qvM`>w%3UQS{Hie+2#%@C!#B z9sS^KuHC-_)Hq#zyOWa{P&!rRw?%3nzw-M$#8e0|^~@W+80fxiWO81O5= z8t|(gCN!?W^+$jUz%5lb?|%X){JaOa3Ah4$7Vyi!Yk-$i$+Lkk0ID5#c=-LmF|L2v z!%qQWS<%B&cmHOf>RIsc9^g$}|19uvz`p_tPhSQ;19$h~-SNFwz0|=6fm1yHd!X9631o}|n?OWf z^cLVQ;BNrCz(+M5TmrVZ{yX5m10Lfd2L2gP{rD>I+kua5yK#OR@Fdp@z$<~j4b*%8 z3aI{!caU|!yMV&?9|6AzeB>fL3HZ;z=K*J4=GyrxAgGN#2vobC%|DID8-dFAOTZ5U z{~CA#`0gx<_5dH0=^zN z2UNNL0el|t+E=*pcLH_)Uf^!v2Z4}EblEG>{ebhpY2e=hKMZ{Ct6Y2j3HS)EAID$` zUJiU1@Cx9yz-IxU0o)0^0(b&=J#Yzl0C+!e2k>h^joXe_yK(+L;9joZ1RMeWCGc^; zF95Fw{tNK&z$;(l`1Azu;apdNYR3Xl^wtJKn$eE|M}e1pk895uQ0?0Zd^T_acq{N; zpz?hZcpWhMUN^5MfH9YQJ!}H6=K6<#TY&cicL6^KRDI*$=kR(9Q29;+Rqxw?!pDa_ z{1ot7uD=3|fzN!c>(`Ay)q4P_cDx3te!LfW4e+Vo&s+j-13m%xZs2o(zX}wce;)W0 z;FIq`hXzgnMJKNZz7zOCpy=Zz_qzA=fTLXB2aJIq1O6-U?}6KafAc!W566ChHeLp< zfEu69>)m+&8c=fiL%{C<{v+@^ftURt<3s)@0agEte#ptiMc`Fjzt&&h2Yfo$=YSgT zKL)D(p8?X;=qtc!;H!T)iW2Jk2yhSA<3H-!u?YMwuFv`F&jDY`^~N{2d~X9ny3uEW z8jq82bbRQ0fd{$1ANaSx=uOZO_5XL^cX0WoH#`3KH6XY1&jWl@yVR!-_`7YO#vV}? z{Wj^pke*4>=eJ0ZhVhgY;IEPxa?_3Hfx^XilFFaY`ism%wfj#=Ez*A={YTQHNcxPE zn2ON{NiQOS{^%jn=Sby`Xy7v>&7J3yL_>c-+Cb80inNRL7o9dXWo1|YNeLG1X*pkTyecwWQ7)gBT38WiI!nr=8%}?1k$M2uU_ji+EUpD@F zbe!~Q5+rAzoA|$<1W6e$v77vR4e8PTVlVLRq|cLHO?odWd{VxA)L;B^xC!j}?^`{5 zA`r5VVBJOwPXZn#O_0LpKlv{|0lbTpke)+&A?a--ea@0Dw{KB&JMia7KSSC{`WWfQ zN#)NqTzrHyLK02CnRF%T_euAX7D)R1xdX=c^!1Rx{#_vCZ~g_%@gMQ`$AJIYe-Gei z{TIZHeIDcCM&K`!euwljfA2lO9sc`n4+Wm*zs~~SPkJut<^G<)$4Ng#s_BByCrG!F z9wcodHAp{C(&r@U_edSmi%IVz>GQ*+I%$UV?@8fv3tx_q{*3ft((2EzaN{pY_mlp} zKO6wxLV6Y{Ch7A=()Zgp_wNMYk))p{y@B+{q&rCZd>iSfNc%{yBt3%kIMN={&7^0L z{wwLRq<50S=L)_&opc@PFzFa6eBQ*DbEMajZtyo>3jB4_GU-~ZLH0hs6kA{e^ zByA$?BQ20#LHbeByGS1(T|wFBt1>=Z+DC2w8lTtkOl{KV$qpEw)U$WdIpxzwZP2~n z=ic>p$KhP}9z};V=K5$HbnjN~ZLvGWz1MP2G^|g^_h6~4#z>#gw(Str^W81ujr#hx zB-P($f@<9Kc|1w?-paif+MS~QKj7Y-{@%lUz6wmBvMS%*+*{qYXk_|KTJ87hop#)r zi_aw8`7AzNZ#Ls=+>>5+5cfK9H%)Xei|g&he$R4r`)$g# zTI9~Q#r3(kw@~MKMje!0NP6+0(~nOl?Os|_6${DYV%naF7n^C4rEzbt$iIa&PTRFg zXRb0=Z>Di09b~<3r;$#ML?egO#ZI>u&-Q60eTayU+E^zUlm?-HS(J`}i!ITo!-jFPa%O z@Xt!~ihi3ny{upFg|aE=jdvd0zklk$u6SEq8M=P?E92|pN~cj|C>N{MyTt=nvV1EP zF5lZm&ui&i(r@Pv-^vq&6%`y=HnH`o!N;g}{ zK(vt6vmO+(HSR2?-GnN#3BDSRC*oe3^|%(11iX(#9(k38w7KZM5B;yzv&ANL8;MvR z6;IEAy1eLOw^OBUm8{w6RZb<{?YB=Irjjh}K_aK>-A=ouUh$-!%t9-AT!#b~>djj0 z3#VC8U$)RWU1`=^qT13&w_|@BG#*Kk!TuCJYbPm>@#t+(eo z-Bx1LYE8E^v(hs?#`eI`={t_*b+Pu;S;Mi>S zbYuUX<8h_eW#(6GLUOaV2#xRJcE4VW4}@xHEmz!Bs}D@=r%`8yN*s^kxH1!K$kzX4 zYC{6m(Hn@Nnr=TVY*hA5aI2M^u_4H|@1MG(vTx?V^bys<+hQ0=s{=h2589n}Wwx2L z8=f0!?6Me?`NppQe!J_38vJ?V=#}_Ctpc?zFdy!`WiesCGE%dHI4?7CakPkKQ{?mlb!Ur=4J@OciKMdl zW&I8uRfIj8R2x|{$rdhNp+{1^J#QtOo%wn-X~xqBcZaFUBkO6Zo~E6-W80?>Ky^c( z6y|y=fqZ)s0F~*OERr+^vN&5ztM$2hTHAK<26f9OsHhnnSYL+K2`%z>GsGgJF2Q-}8)L0~e4HPtecmlto8(ZTTOn!QA+>odpDjae7j`pfs+n{Rqx+Dq2nr`eOv(m&@4yZ<&o17H)iY58l)v4f zxmOI8H4iPoO?hb`HscL{HukHhygezV4zoP)>|zoxsy+lh!U|2`R9Yq?D6zE&b*C`t zG-gV-MU+8tvF3DDyxpnruu`9^q~srjDon2ty=Z>5I{-h4jgH!Jtz%PItilWaOCZLe zEIFAPa5PWL!A#H}Ofj2HFFpXCO-ZdnYPYM79U-C}j;jkv*CAOP!5Evd6))|i36{B{ z=t9G1nGHQX)r7E{?ZAy!eVpzTuo%8;Tx(e+XH#aF=`U(l-L(+5eBRrsLL0w?r6Vj^oFKE zZShzo9rK!0C@0pdM<$}_ND?=wwJp)t^(|eKr7e_YXzcT`X%Cm0&v-FIQ0u^=RBN+? zKH97|An&*h|LE4MuEuy~7lT<%G#e?ffZSFi(Rd9DLUMm@u6`yS&Gd3+UaQ^?k|(Rr zw_*09H6HO00&LGyqQ;=mVow~-2I28|2mP&Kb8{vYI+!)^!M^l*7yTPmJ0b98} z5={k}VKUdWW={>W4ieOePP;kapDd6bb1B-Hv^C1rrdaNlFrjRzBnTLAaHzVCm!fY}Ww@l$-dETjD$Rzvh$jqMGjvU?$^R|i4 ze6KZ&UKBaDtjPfl27?sEwcd$GpEtQ>ZgeyrU#QQcr-|NY4JR8$qMd7U^R(YaeLMIX>1FgBNTA?h0K=#A4}vRnn2@jr4k-$CNHbEtId8*a;=s!QN-s$z25z$kw+KC z9fjI-TFwc%xe)KQK9b04_p*M{waaPt3kmp0aI&=euv96V&TF9Q2cgUku%ISK4$2*- z$!pWbN=}T7JcbNm$``iQL_G8Wxo6G@>20X9xFD24_E)KN@zBXQbw)ELo<&+S;h=TH zr5BXQ`9&cD1qN$L6)``s73JlzDPYF=&=gk*usaGnP)+BpD5wTj!>|}vo9pe4MnS_= z5D$H?n!Aeebvjy@?QY7J8?sPGtM6792LBhDkr@slYR@{>Z^ukrb?kYrJ`erM9Tdx{ zWK_p^!O=8F&7juB|Tjccwm-^LylT|&U|Tr-)cR5YXMV`Bnn^`TAq zO|jRo&v9j?%{j*<U`^8apoI*MXw8661U2`quJ)H$(%TfcU%ym6htM32NVc5(m~ryaY{hZ3B0a74|mPq zCaT1kT0MMd8>S&UzH)cb0MStkr;zzMy=9d}FEV$>ooEpAL;|9{=<)4%SJG^zgJ|C> zGflRgM3^zjkqbXYZQ2k2kn?$9W{V?Zgl(W!b5}GwAkaN>I$YAsIwOinxRN>jQ&5vZ zII4E=k7tXWc1_qv6B8RW?>1a>f6~LF%zZJvk`8yUS*tiT0;6fz`V_&dF-SP8ix~pm zZ8Am&gJM^2OO0cCz;JQqQ=m}c%}TLg0aZztye>Mp4zip5@E&nXY}J{$Jj9}DX_~!Q zRwmc<0LNXu+Gq|YByzI4WOZLO5brr~oA1M9bjSr`93uhI5KvjAiR&%2@j5&VWg(e^ zxy6-((P1Zm$Hm{F;%Y-i@x1gnbXb~khPP~Rahp?hJfz?}kK5?BJZsJj8(D-8$&b3w z>n(2GxG_sk!CI4rNgv(W2$4?6p(Ji+k{1`u>2#LJgJK16!U2rO267~AF`tBo^972c z!-bQ^QFlQ~Lw-EsiQ?>*R$1kQ*8nPm^uN ztXD@5in}tGDbqox*Kj($L!lYNz-)?A&wU01;Xx%6SW6%!NF~{IeQ8`q>Z|l?DEvs- z@G)*(r~-*R0*gWX6#_dK!rSyBrvf#FlR@7Gc>Z5qUA!0NC^a2QWnKa?xXX)G=n$y}DS53OiGiW|(56~bd;+INZ z<08SXtoL}Q+$Tbeug!BA*H)Ot>58<$Zl_rhSEg~sh2mb)U=HUTJD|v8G@xdz3EsO& z6Ngea9+N^pW)7He{@i84A|nbs|}&-#66>gX-& zM(-v9c?iGeufxw|(YRUpk))yIk4-*j(rDr?mcm2=C0}Rid<%y_uIKGu#^xghTFvE2`{6= zvxvzCN(b&-y`DRV4j!4gW8a-8b{;%@czWm2b?L%z)lI!+Wie5P-)7EA(9H}!2-Jd}^Xe}elsVRS(vy+scJrkLS~qohYx@PU~Fd$z{=6#I8tChUI{C3w|}k0NUlAGmE_ z*}$oqP{^f`Q{B*;@vJ%v9@)1@&Y1EkhzqUXKzH@vMccI~vRmb@pM_^it6=P>h9N+-?)coh1E z>4x58JNa)Y(r>RVw2qmhu)%B})zhobD12~yTWlo1mlH?PixZ1^8B_5=OvPQL<`*%_ zLYeXrR4o*9QpEc1){4PB+b~vH7Gk8*^}5|Y;oR~d zd>@d1Gh?-wU-Sp@&!=rI@S<*K9MkhqArq4+FJ{UlQmKKZ zI(pwqVYo30VRsHg0Sy!4L2{dVg10LMze`93?fWN@C+nxp9FW|yJi&?WNP z)U;r!0+nzi(2OS`ix{gh@fE^9PP-!Bss6?}0!$ZT1XyO`)+?%v6gO|RfGmGwPEK5! zO#|}Mo}}|@6S`KV$)LO_p8D`T!)=J4wWwE8X|19hNvfMIA4UP$M5t0tt77DVvBf$b zKEH&5acxAxMC4TGsH{LTSZg)Sh)K)xidiDY;7pdv31?3`zdRGwmZF}hbxsI%F^W3% z@TUn!Xh7zk`S|_PQ6B)P_co|z$V|0qlu^B;dYh(3uieAb385DrdU{-Yb4Z@JLdLsH z^D`=;D0U_TCTwjq6NsWkkWL|g~zr~#L z&XqAdtmn%?80@r6f8{aWHMU_ansX?G%q-U9W=tvKv+6mKfq5j^1v6;b-?|wrnz#`c z|HdBtROs}0FSSDCEze244btJAYXV2>p$nkn*$!s-II+|o4jlh8(fKcC43uM9=< zM<>07yC9p7Uw#PrIiU-uaBf6z=yQq(Plmp=(lDw7fE zOs}tsR_83p#;qV4AFXY;Xf85%0%6G#UUGP!wTn@zvOW#hJ`4UOMZu?{%JKk81!1P) zv$o}@ZsOQ7zYSZx5jq}E-*M=0ya7AvD)*Ho(IN-C9UIt8#r9c8MR7`4iwuG2NW3Z#dXp2EIzq?ERs&>V{X3lB|&Da z&nYN#|j9PR3#`~skpWb(b8#oi?3odTRC>Q=QROUQpb7uuB-VuIr#rX?N zg+cV3AOM0A-|nn)dnC#d1fkYhuq4FvO(_j+l!@xX_y*?EEU|55X}@h6p%)*MkyHMn zu+VY!EJ8Vh%1TQfDG}C?n|@PV`n49eX(Jv#5Q`Tu%GVvxWUtu&0~(J6T*R#JPgs5c z`*2%a@L^yyakpwu1463hJT%eBC_r{c-t-B|}E#{)gs)}2_d#%vg;TIJhiY$XSuT7hGB0cKcA{Cn& zNIjECEI1)L$rC4R(e<>x9XuizN;hHlWkGghApE>2{xgOd(|FwB>Q zVnlhnbK_)D{8DthNc>_>*3;{ag>R5ke4-PA`%pECwBrfWJ(j}2B z7t@?ubymW%-nd#X5}UL|nea+yt7^-RJgvH4MN=*}SO$-jI3Fn>kLoP+H&3S0Nvh_~ zw9Q(wpo%>5+7H{eM!M!j!uT!Tm#-aKf(7{18z=9UWsx^&D9d>WpvbK`gf|jmQj2gZ z7r4)D`3XRwlhPQk(?g9g-SW6{#)(K5W4c{Ci~XIPS~sb>o` zo!*dlbjXT2)a|?!r$uF^R=M2;Znhc&wVk-}^CqvK+`Pqa*RAZ&koJ`wY}&0H?QFH> z9=V<$HtmiaI(W3QlX<0#Nnk~dPu=0crk(K`DEy>ODv1OAPA>^u%$Eu8W z+AE5(=XE}>_$yy-B)|jF0<`h#6k3A z`*=IPYJ0qSgSH4e(f`oddaG8Cm+woOD-S$$7KL9+C{D3)5aXqqHdrzg&)2)``onb- zcN%?itURE*jZUlIBhJWGDBW9m00mvoF?`a2%5RI)m9wB))3H`xIZG`|3_cn7E{(9c ze6Bag46b#uL6UXaeHLUqbe2uQD-X0+9$117NA66PRvw^vE#`bLu~+iweCv7Qq=vW2 z#a5aq;(Fuc$nrgqOSe8;1IsMKz}`HYHs{$S-nGr+YwJ)u(g7QM$a4Pu458_P#;Vp*14HK#h@wPDPj14oYR$szus&}`=L;34-3H)A& zc52OtyYbLj*5^~IK8t3AgQ1zs5{~I^9dX9=@`GLQj7^s=-v=c%+yxYoVE+-?hWzru z&^9uCyfx=8%KxFZ0lR4F0PUY&eh^Bu8kX-{d7x30MtL0GXTEECb1I7vK$0@aZ zu1jlZ3H=F=SgpoPF`zvRO z0vX{`1-C`!zQsj_K1N>dqQ0wv%ja6St(x<0ww|}I@(*eA`HrcTckG+mpI5#9=JUN% z`(_T6ww~`@xt~jCX4$hqT~dflgSo_w=e}YKR(vDd&R6a~Vsq}_xbZyS$-Dh8G zb;oh?7NQhDSV`M4d+$+TKZ?WxjNbF|iP(y1RwE{?)>XUJ_f8$2+Uqx~Tj4lqNa#T4 zwWNU%deAsw!& zX89iNU7w7Nuxlx!b9juthQYr$26O6w7~10W?5TlyTE9HQ>`7W2F8ZH33|zc!#M@lb zT}s`V2+d=G$~8e(Ay~7yz$KHT3N@7Te;u#Sr#Xu^;-Sgw*g31Lx|tLhk*%S;9X4Gv zm9p*r^@d-gf(tQ}@-(&*VK&Ak)^MSX?&sChG*gk)cqy}vYvzSEygM~6e>wD&!8A;7 zC{zJWw^niq)QU_FvR!-x;!l@!27}W>KyZSV2zDFk(#6RkC?a~hlo5tlUk&rvSmo{R z9`!kg0sX5uxfj1q_O8yZy{^ztE~4!f7upAZ3CJHLOPbWegBLSu&MGQgxWrbP}0L}Np*0pzh<*^mTpu_T-QJx>+8%bnrfE$ku=4#fMBb(9<)$lJ>6NOV7T2-0*Clx275yx>n+M zR&(4)Ia5ZPKc~Pz)NIg~p#SD~C}SfpTl1Me z$qF6KCoqdVf@A(JuKHUkh^3n7g3Wq# z#0As5>KlVtnQzSm!_twtQwm z4%anm#3pdl(^^c>Uh@%6&h#n&#-ZHhX}fOjVmrP#jMHET#G`qSOjerc`r-0vQ~pKr zp%ts061MQ54*n{2Y1H=W6AVul5-G=xObnJqa$MF2bx4Ih`$yI->-`J~p)A9I<|lkN zmr}yltOm>?wD@EyyGl$&%V}jwg|Rg8u*O7ZaifORi$d1u$@7JP6ax~4I9#~VTD5bZ zw>xSP17GYcv6g90;edXFv2Ixn`O9N%1n)x@wf+R!YJ*sn23xXAbg+XO@-j{~Xx>|x ze3x7)kTqBXxtdv!U#%Xk+|PYYEeaBGLgbi;=j*bH^Aen$+V)X=M;)it|-PNay_t!iPRx%0tg6Kf#+P{Tt@>; zfIH1^*NL^c(FU#GIf9rXNf(k~+ya)?mQrYSkrqPVAk@8Q=nX7ULUCm|1fFUb5>zS@ zDOgKTZ8b0~VPLe3G{ZP~pNLa|Y=(-IKvZq{+{#%51KrF~`2S5a8RfR{N=#caM*YbW zIE=?VjHKTZLuZaa#@bHa5)np6#i3!Yax@uHi|N?}D6vt|kePQpgI%c{cN~)Z2xJ&$ z$b6g4RLGKR(|WPuV5`o?rigQFu*kN)6sWnOUdh)^y2&*s$?6S z#Z6{o(^43j)*MyfFU_Z{$PBJ;&7^NayU+K^GvCTrnhV}J`oL=Fvvn4ZC9*VHyJ!bB zCiw_(5?2^NIhh_ho5JYXTJANt@D|-e?Y`StD)M>AN=CW{hQTTcIbaRJ)7XUrlev(n ztY%nq`JER$+kiM|Fsb3^SnMW4-y5d17wm;ui9ALJLze_EbS@W$y3Yc*uEADzM#mO`x3#@t9S z>xI4`bIoUEZ;ytKFK{+30UeC=)Jt;Qa)eWzJ~OaS3~J z7ZnnDDaFTZ>mtg2tks?pSj4)83N4q}Yr`tMX@wu->B9_@(GCrr(_&=oq30|upJS*w z)=0*j*&UKDR)Lg2wsaBYK#PXethIMQZp`ZU1nYjlID&4)tl<|!)~eoUTK#He#uOH( zahU>@t4x~QK7i-k2VUb|VpT*tUaDiJXzM{wT&!1bn60B_YA*0?D>)4BOm~!79AF%x zQ1-vjpCP)=jS)?76XfuRh}Befa5^tR1lGgqs-hyCNF8^YLc=-e#7tzfXdj&>r8`Lh zFRWWpD<__Di<*L+a#t-NuhkOIyBAvtj?FvO4S1DbihzXyZ-Lcy*=k#7Qv2G5+TpZ$ zxIyj;L_4pnbDTm^N)xR(FTu?^cVvR`GX~tD4~z$q66o1XIS{mVOKhonr;3O-6Md$( zB|2nQ9qLmNIbc3Sm6H21pEJDP3|cW+6G%(Z@;z?)6ebv}VsF9rX8cN(J97>Lv@H`< zv}7(Rr({{^+}Q&l9?Oee6iiY)#qz`v+Na2nY2``pJa4KmDF~R`qV0Gb^^zcy9iu?Q z=U6z7ils0doiMA)0uL}>V}vxWq#M-X8Et}933h3Q?~y^5r$W>&T>*M4-n3yzj50R| zZ1t02kBEisnR-e^tcSG7x>;n50xMy>$%k~5>vdQh`+9_nZ>S=@9}{rsg=!U)owrDa zuN$@|T*Ge=bX4Pp)I=%UF+l+buB|$KVa=#h75IX7sq-?Wo z^~nos>Jtl)>VtMK&EA%MoQDeJKKN$Qo5>O+fjggLO{?Gl!xR@`TRYRz@pWmFd@DKO zAe*2am>D64Gl1>twAjpCZbAFpF)Vptop|L-PLd(7p);)vsev!x!Kvcik;!HEO{(FH zfgQ304K`3X)VJlTnB9ZC^(rJ(QQG%Px&m|*?e#GZ8Y@pxY3sdh;CCk`oJwJ2?n9RK z&u1_b+YV@uc6%c(62b#IeIY2XBgMP?n}!c7Sns5UwXIuyUW3!8bz}esHmuFAz4T4% zNm${$og3l!0ZQrYhVz}?z~f6gw;{w6*B;;S^_<&K)K)&eA*M0wp4`Cw3mn~$SEkjr z^t0lQaG=no9^R1GFm#3kOGNCL2K|~sz-;B>r#Fbxt~{`4hcV=X<*4BZOHQT_Oz*Wb z99+=$*lMlNo#L=3cw55+LFw8W-FD~H;Tftzug@1(Rgq5UNW670>)b&ho7XK(VbM_z zxmlMq32ou%K);)er@W?_`@VC>CMrDw#bU#zUAO~BO6riLicPIy+km-iF;1LBH-)w^ zrEKyr9m{M6`AJsqF+;l0qVtvD$nmTEuX5AqIHE0fR z@rd-T%Cip?enU^BDN?e`?I~w*xkPEY6Ar}bz@mzVj7V|E49>R{BaK=0B1E?9tbRma zQY^_jhXU%k5YpewAz3ae$|1LD9-wr7+Lil}OY5%xEF#ds_1lRJ1U@RkXN8*?y*?ymk(Q$g`lvM zhB;m>jD|reT9?Q2LvY?%=*XCSM4e?Ub<1Hvh7IpvaIHr%0yEFcfIE#NXyRJmw0s}> z7dn?r0b9t+V8BC+^zTGPbca9KVop2vVc`~?`;bl_k3ReAw@0H}t_`7*(an4fbDvj9 z44Nt&g_}$o>4!WsWk)L^i)SI~RXhsEKMcDAr6=Q|78)5C3(Xrnc&|>xRtcM-T8tpC zzEl+^J6fh+`3#0=g!FQq8KEO1h+8#H36;UsBWOb9^c?d>k!WemREDNI072$8U&f>0 zqUD&AYpYsSMc#e4u!HH!ptJshQLe zDY(bn7&Bv>16LYgo}JgOoE2G!l{z&ja{Pj}EUBw-sXRDX!WYEpj9Oa>U;#wqdm)5` z?rDQb5tePMXT_2uNVA7dTQ_xxh>aXbhFT*1$_V=uf+MpZqI#8`a*_$&toPGwjfxx% z9~c2y=UrwW!+K{;l;cq>sv%a_>Mx)b%0XzPB-Lx82is`={9lKB?Knc$Q*g33K2o?h5@r3^ZJ;`|x%!zaLg;e`x=bt5K?GZc!tAkLQWc5nnN zX9H~7mU3$Slnb{y!gsMj5w786owCGRi?XXjp)z3IOB|0_{rsZsvIwgv-$KB&X^lC= z2>S57^>p1Vxy>AKS~{DeJO!lP;WN>O62I<8XH$4Ph1(b6?734uI;kC*fxp0dbe%h% zRf{91qCo!55gH4KpgB>NXWs+(fiZW9C^afF=vuGR(c$yQp;A}~&KG(j<Tj3_G{5UJZ*ImQqXGS>=> zVpcNRQobCvEh^!N(LAIQ>u68(02D~>`8}GeszNL-o`+iYtuYW7K2*z4x2zwV3Llzuvc4~dsH^y2&=hVgji{@qi%rtO>y zopj+Z<-M@eE=t$_nH_rJZih22+?7B4!ap+qNB*GW3+teaxTpxv==wEH$!lrNIV( zg=q~HKO_>L)ae*w9LIp)`x4H_IDZvv4PfA?*cdQxkRQz&6FX}JbyD%?e1N>4ea%T3 zyO!U6*YutH_~F6gu#ED(Z}xc^#n~9FrGv2wrL zCgl&;@Vl?v(HcYhxHx^tj@KxkuMu*WwtaD!hW$iReyWDgn~%S}u&Ws?$3;VYaTDfTsM2KNqn; zMo8=c>r#Wvnsa!v8B!~kMh4C|Slh?)D zR|l!@)Y!_fTg%Bp>4jLKDAepa!*!I`#p-?Ma!il3}j zEguKj+j3J|9!Yq-#i-)`fCX)RQA&H=*l!pvBEEs9*U|HGo}DjN$cn`%=C!oN3q~M$ zlQrW_{bkRe`JCJp<0nZ9x|ohAT})j(L4-Ql0o%#UJl6==n}mm=W0$h5G=IBa8f7dj zXbrJD)+6AwoJEd;^&A0teLASawVYtS#-IFc#iV`b%wF-UY_v(l#z2Jvh9Oagsi+S( z2n97JxxhdgeY!p_^NBW~a(R!G*qt?&(8z(3Pr9agjIL;bX6 z(55Xz1FS2M$B@JQEYKX7pJ!ktevF2d`#bUu1Xl;{LT7l;T~rE14A~+8n`Qr~XQA?) z49(#JUvl8eX2=mJI|fApe>;3eMw_G##8ccg1HpL_O4x8-OJ9$?+AbJ}Cat(6br}Yl z@wh6(u>@l&v^E&3t5AL#!>}EyP^co5cY$B==dfD3^fI(qrxAu`(*MFs=c{ZpgWd9N zsXkO5tz*_6Iy}?o2V#+sv@@K?f@e@Cx5$IZp&;(;Js#U{d%B+hbH9-nkGdcBTzyXm zu7nfy?cgw!w&9&f`BB-o&~QRO{Q9>Yp-wm;KFyEAhXY>u@z~_F7VC3_VDAJ0*>+?5 zDDr?KVo=%rkCrIQC`Sy=GN(D%gdgQfIW^857R7*qVonaim8`?OI1;662f~E*)%Za@ z&W}K*toeNrJG}(b@s!rd$Q!QNY5L2xY=eJ$iz6J*L!*nB&XR{oy&F@^WW{S1MM$q=lMit6|0>S<3C9oX zCv5ECVRxhz1IT({D|1ACs!~pWlCTC;c9@-jW!b^M75I9#&k_Byh2rH6bbkBX`i~qN z@@lQjUG%PDn)N}uBWMb2M`W54M_}QYlwKx>lQNoVn*HM?YL%5uM9GB$M-@3WJ%GE$ z5F20;Rjd4db{|;-s_-|WcuXdp4uRiDyvr6b@(y>dirx-yHQ_hO&s_N(Z2r*05~CYl z=Y`bMYN6$~;uXLzC9NAr0X9&2iWAUS=!x12`}W}lA2EQ-nTyTTO07>@ZKt(}1r)7` z4z60>r1FZbLB3jIgYl;|OZJPZZqZwQoQBqOI@&f*tQey;MZSI?EOqoZ6{5#^Q9lso zMKosylZ!vpXsOeU^Hj@#v!ulKPSQ%Kj?GScEw(JwB2W-#Et;NW^8}jU^_-$poc>`{ e>ayd=F4iu!`b$15p+Z1>AooZ`s87(bitF3m%=V-tG-pxa>Gwm7v z`<-+4od5jiKmY%S2Oi5h@xwss%}Lq&743FpI`Y{#rTXC;=klTTz)qSr;g^1a`qW@CX#0C*WnUexgzZ(1x?%Zg`1ODK$XnawcAca=wy3 zErXXrQG6qmgSSHQ%n`U8J`bDWxICY2u!Zppa61g5YzBN3mcf^ycxK#WrP^TyTm&D2 zPjJ3^jm}MQ&lKDZ{|2j}IaR5f;X!yBegaG3+tYl-mt5={ycW)7eka@ukHJH51^!(D zPeU=N1UE%s9n8&A>S36Yw|WYH#^6cV1sl2UBXAJ1M#b38nQA9o0)GH2;cJlRSJSTW z510kB8D9m@fh(arK^^2y%7yYYcV*@ux&r@;qT`u~ar|1$xDd+1Mm`4Y%5Wd#aw-iu zTfGG3=}yB2_!$(JuQ50b?tl_gA3*ti2G;P}%7q-Mw#`iWH~StF;;J7(aplKQqI?z+ zhxgPYP!tWpLijE;;1mMomvAv;i^?ugYC?c4fnrFA#o~!}NL(rxiUD`Pd8~UNMMt9X zi6Z~TuRzJX_o2A_6L=HMofQuo{P+d^geJ8^w;dP9E2PIZ!k!v$yIh+JHKndcQN8Z1mjwt*Sl()Zpv46uA zFwS^qhM&QxY~*3trv3;G*o3yL;Wo(S)U&V;z7OR>(WOeg2fq(n;qGO=-Vfj+QPftB zJK=-y3-~F#R)|%rU@cWg3ePS+`S1mpgs0&{a3d)sH_jpe#8Ycv2ke4JvoI8j%kRTV z3qA$!hWRyIDln`|n zEPw}~7(4_U;oGnfmaX)Icf(2?c?A>qGGV~}41W$q(do>1{55{s6hXp3l|kZG+0cgj z;cWN?bl_~LuwLyYb+FWFg*W-Uo8B)Kz zLPHFCjac?tSBAq_B%zecs1Lab(JxPVT_2csuf9M3ulgAyS06SW)Q`>lb?$PbFkzIG zlnAPfYD3o+l+LQ@wwviFR()9Y`mjdbYN`?ZuFZ8O8hOgGQEWBB# zr{(GSrH`fmS?Xlztz|Rx$+FF<&Umt?$%q7lwwtu#W=qoEVtHe1aHP|Edob8)Id;_M z_e!tVlw$&xwqTo4m6} zhLOsVZqt}kR~vDw(=l7D;gjvi*a=TZW+GDgrC&yka6KbZX1qNya;6Nt6TR8dwFz%+ z%Vsk^y4D+ci~af0)eYY2&Umba)#3-agE#b+XMSKlu{oC7iXU)oV$AJ=JbZI3;Xi}b zV<$cP+*mN)?FQ|(pcU;*_Ih)e8Ems1t5QB^XpqqH7HzhiPC6~IXw-CDjfm~qN!xUS zZ0?SZw_MKF?MsSvX~ikMZuxWi>PkcRR7THlFbE4t=~TUte4uPXDyJCZNk} z=B2mQ{3ejTd&T;!^yF(h0_h{GRt5CZ>wc0hy?%E<=d20qEo+YIef5p{oQBEiC2QXe zj4Lf!s^>MrURoRqheA0GYlAmfTWqm7xWY_Y<;KELXh~51Ei=O5 z@=&-qRLZ(KGm#9gi<@r3F_W=)xlwOB?SoIdMvdh}O{1n;23Fiy?lRx)Ue(;q*NT_8 zX4EQ4#;Z`^>NgsXPQ1RxY_=RDToMkKEJ}athFb&roplHG-i;sYS2xYjCpJB-1LlWk zC+lF#!UbazG%@&eeDLY0@ZrbxMR6d`}lzz{qL4mooyY~A6cvPhPLua zE0Z0zYYaZ#XE~1D;aKr>>VDTk-@{$sWA%b z471OS+QEdG92$s&-l2iS(0~M;6Zz_&#_aa8!m9z1%Kx$$MXPb=&;fjzwBu1L*qX|i zJDP2Fxv~^t>s5kBZKy zDjl(CcaoaobVxlR8BEtP<4roRccBj4@poOi?GJgwKNxAamrz}4ZMPwF}MMbrE5n;+00+`neL_s2?C@0z2XU2p3C2VPG< Zzx!A~5AB(&m+n2LH}7jqPtX&x{sT^+, 2001,...,2007. +# Volkan Gezer , 2013. msgid "" msgstr "" -"Project-Id-Version: findutils 4.3.8\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2007-07-09 11:01+0300\n" -"Last-Translator: Nilgün Belma Bugüner \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-11-07 21:02+0100\n" +"Last-Translator: Volkan Gezer \n" "Language-Team: Turkish \n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" +"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" msgstr "" +"%s üzerinde bir komut çalıştırmak için çalışma dizini kaydetme başarısız" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Standart girdi kapatılamıyor" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Dizin değiştirilemedi" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "ayrılamaz" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "%s beklenirken hata oluştu" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s, %d sinyali ile sonlandırıldı" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Paylaşılan dosya karma tablosu başlatılamadı" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "fnmatch() kütüphane işlevinin tutarlılık sınaması başarısız oldu." -#: find/find.c:205 +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "çalışılan dizin durumlanamadı" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "" +msgstr "Bağlanmış aygıtların listesi okunamıyor" -#: find/find.c:385 -#, fuzzy, c-format +#: find/find.c:443 +#, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "Uyarı: %s dosya sistemi zaten ayrılmıştı." +msgstr "UYARI: %s dosya sistemi yakın zamanda ayrıldı." -#: find/find.c:395 -#, fuzzy, c-format +#: find/find.c:453 +#, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "Uyarı: %s dosya sistemi zaten bağlanmıştı." +msgstr "UYARI: %s dosya sistemi zaten bağlanmıştı." -#: find/find.c:491 -#, fuzzy, c-format +#: find/find.c:550 +#, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -"%s%s, %s yürütülürken değişti (eski aygıt numarası: %ld, yeni aygıt " -"numarası: %ld, dosya sistemi türü: %s) [ref %ld]" +"%s%s, %s çalıştırma sırasında değişti (eski aygıt numarası %ld, yeni aygıt " +"numarası %ld, dosya sistemi türü %s) [ref %ld]" -#: find/find.c:528 -#, fuzzy, c-format +#: find/find.c:587 +#, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -"%s%s, %s yürütülürken değişti (eski dosya indisi: %ld, yeni dosya indisi: " -"%ld, dosya sistemi türü: %s) [ref %ld]" +"%s%s, %s çalıştırma sırasında değişti (eski düğüm numarası %, yeni " +"düğüm numarası %, dosya sistem türü %s) [ref %ld]" -#: find/find.c:693 -#, fuzzy, c-format +#: find/find.c:752 +#, c-format msgid "failed to return to parent directory" -msgstr "Dizin değiştirilemedi" +msgstr "üst dizine dönme başarısız" -#: find/find.c:980 -#, fuzzy, c-format +#: find/find.c:1038 +#, c-format msgid "Failed to safely change directory into %s" -msgstr "Dizin değiştirilemedi" +msgstr "Dizini güenlice %s ile değiştirme başarısız" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -79,8 +118,8 @@ msgstr "" "%s sembolik bağı dizin hiyerarşisinde bir döngünün parçası ve gösterdiği " "dizini zaten ziyaret etmiştik." -#: find/find.c:1097 -#, fuzzy, c-format +#: find/find.c:1157 +#, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d level higher in the file system hierarchy" @@ -88,19 +127,21 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" -"Dosya sisteminde döngü saptandı; %s, bir dizin gibi %d %s olarak aynı aygıt " -"ve düğüm numarasına sahip." +"Dosya sistemi döngüsü tespit edildi; %s, dosya sistemin hiyerarşisinde %d " +"daha yüksek seviye olan bir dizin olarak aynı aygıt sayısı ve düğümü " +"içeriyor." msgstr[1] "" -"Dosya sisteminde döngü saptandı; %s, bir dizin gibi %d %s olarak aynı aygıt " -"ve düğüm numarasına sahip." +"Dosya sistemi döngüsü tespit edildi; %s, dosya sistemin hiyerarşisinde %d " +"daha yüksek seviye olan bir dizin olarak aynı aygıt sayısı ve düğümü " +"içeriyor." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "uyarı: %s sembolik bağı izlenemiyor" -#: find/find.c:1386 -#, fuzzy, c-format +#: find/find.c:1480 +#, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " "we already saw % subdirectories): this may be a bug in your file " @@ -108,52 +149,60 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" -"UYARI: Sabit bağ sayısı %s için hatalı (st_nlink=%d ve biz zaten %d " -"altdizine baktık): bu dosya sistemi sürücünüzle ilgili bir yazılım hatası " -"olabilir. Find'in -noleaf seçeneği etkinleştiriliyor. Önceki sonuçlar " -"evvelce araştırılan dizinleri de içererek başarısız olmuş olabilir." +"UYARI: Sabit bağ sayısı %s için hatalı (st_nlink=% ve biz zaten " +"% altdizine baktık): bu dosya sistemi sürücünüzle ilgili bir " +"yazılım hatası olabilir. Find'ın -noleaf seçeneği etkinleştiriliyor. Önceki " +"sonuçlar evvelce araştırılan dizinleri de içererek başarısız olmuş olabilir." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "" +msgstr "Bağlanmış dosya sistem listesi okunamıyor" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "bilinmeyen" #: find/ftsfind.c:259 -#, fuzzy, c-format +#, c-format msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -"Dosya sisteminde döngü saptandı; %s, bir dizin gibi %d %s olarak aynı aygıt " -"ve düğüm numarasına sahip." +"Dosya sistemi döngüsü saptandı; %s, aynı dosya sistemi döngüsünün %s olarak " +"bir parçası." -#: find/ftsfind.c:444 find/util.c:214 -#, fuzzy, c-format +#: find/ftsfind.c:444 find/util.c:222 +#, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "Uyarı: %s dosyasının kipi 0000 olarak görünüyor" +msgstr "UYARI: %s dosyasının kipi 0000 olarak görünüyor" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "" +msgstr "%s aranamıyor" -#: find/ftsfind.c:599 -#, fuzzy, c-format +#: find/ftsfind.c:609 +#, c-format msgid "failed to restore working directory after searching %s" -msgstr "Dizin değiştirilemedi" +msgstr "%s aramasından sonra çalışma dizinini geri yükleme başarısız" + +#: find/ftsfind.c:677 +#, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Paylaşılan dosya karma tablosu başlatılamadı" -#: find/parser.c:471 +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" +"-delete işlemi -depth seçeneğini otomatik etkinleştirir ancak -prune, -depth " +"etkili olduğunda hiçbir şey yapmaz. Yine de devam etmek isterseniz, -depth " +"seçeneğini açıkça kullanın." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -166,7 +215,7 @@ msgstr "" "da belirtilse sınamaları etkiler). Lütfen seçenekleri diğer argümanlardan " "önce belirtin.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -175,7 +224,7 @@ msgstr "" "uyarı: -d seçeneği artık önerilmiyor; lütfen yerine POSIX uyumlu olan -depth " "seçeneğini kullanın." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -184,17 +233,17 @@ msgstr "" "%s mevcut bir grubun ismi değil ve bir sayısal grup kimliği gibi de " "görünmüyor, çünkü beklenmedik bir %s sonekine sahip" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s mevcut bir grubun ismi değil" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "-group için argüman boş, ama bir grup ismi olmalı" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -205,20 +254,19 @@ msgstr "" "ifade şundan ibaret olabilir:\n" "operatörler, seçenekler, sınamalar ve eylemler:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"operatörler (önceliği azaltan; -and başka bir şey verilmediğinden " -"örtüktür):\n" +"işleçler (önceliği azaltan; -ve başka bir şey verilmediğinde örtüktür):\n" " ( Ä°FADE ) ! Ä°FADE -not Ä°FADE Ä°FADE1 -a Ä°FADE2\n" " Ä°FADE1 -and Ä°FADE2 Ä°FADE1 -o Ä°FADE2 Ä°FADE1 -or Ä°FADE2\n" " Ä°FADE1 , Ä°FADE2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -227,11 +275,12 @@ msgid "" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" "konumsal seçenekler (daima `true'): -daystart -follow -regextype\n" +"\n" "normal seçenekler (daima `true', diğer ifadelerden önce belirtilirler):\n" " -depth --help -maxdepth DÜZEYLER -mindepth DÜZEYLER -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -239,32 +288,31 @@ msgid "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" -"sınamalar (N, +N veya -N ya da N olabilir): -amin N -anewer DOSYA -" -"atime N -cmin N -cnewer DOSYA -ctime N -empty\n" +"sınamalar (N, +N veya -N ya da N olabilir): -amin N -anewer DOSYA -atime N -" +"cmin N\n" +" -cnewer DOSYA -ctime N -empty\n" " -false -fstype TÜR -gid N -group Ä°SÄ°M -ilname KALIP -iname KALIP\n" " -inum N --iwholename KALIP -iregex KALIP -links N -lname KALIP -mmin " "N\n" " -mtime N -name KALIP -newer DOSYA" -#: find/parser.c:1244 -#, fuzzy +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path KALIP -perm [+-]KÄ°P -regex KALIP\n" +" -nouser -nogroup -path KALIP -perm [-/]KÄ°P -regex KALIP\n" " -readable -writable -executable\n" " -wholename KALIP -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" -" -used N -user Ä°SÄ°M -xtype [bcdpfls]\n" +" -used N -user Ä°SÄ°M -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" -msgstr "" +msgstr " -context BAĞLAM\n" -#: find/parser.c:1251 -#, fuzzy +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -272,12 +320,13 @@ msgid "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" +"\n" "eylemler: -delete -print0 -printf BİÇİM -fprintf DOSYA BİÇİM -print \n" " -fprint0 DOSYA -fprint DOSYA -ls -fls DOSYA -prune -quit\n" " -exec KOMUT ; -exec KOMUT {} + -ok KOMUT ;\n" " -execdir KOMUT ; -execdir KOMUT {} + -okdir KOMUT ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -288,12 +337,12 @@ msgstr "" "adresine raporlayınız.\n" "Çeviri hatalarını ise adresine bildiriniz." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "fnmatch() kütüphane işlevinin tutarlılık sınaması başarısız oldu." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -308,47 +357,42 @@ msgstr "" "bulabilirsiniz. Ayrıca, eğer GNU grep kullanıyorsanız, 'find ... -print0 | " "grep -FzZ %s' kullanabilirdiniz." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "%s için bir pozitif onluk tamsayı argüman umuluyordu, fakat %s alındı" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "Bu sistem dosyanın doğum tarihini bulmak için bir yöntem sağlamıyor." -#: find/parser.c:1638 -#, fuzzy, c-format +#: find/parser.c:1633 +#, c-format msgid "The %s test needs an argument" -msgstr "%s: `%s' seçeneği bir argümanla kullanılır\n" +msgstr "%s testine bir argüman gerekir" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "%s nasıl tarih ve saat olarak yorumlanacak, bilinmiyor" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "%s için doğum tarihi saptanamadı" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "" +msgstr "uyarı: -%s %s hiçbir şey eşleştirmeyecek çünkü / ile bitiyor." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "geçersiz kip %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -359,22 +403,22 @@ msgstr "" "olarak -perm -000 ile değiştirilmiş olacaktır; yani, hiçbir dosya ile " "eşleşmemek üzere kullanılmıştı, artık bütün dosyalarla eşleşecek." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "-size için boş (null) argüman geçersiz" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "-size türü `%c' geçersiz" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "-size için argüman olarak `%s%c' geçersiz" +msgstr "-size için argüman olarak `%s%s' geçersiz" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -382,76 +426,91 @@ msgstr "" "-show-control-chars seçeneği ya 'literal' ya da 'safe' olması gereken tek " "bir argüman alır" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "-used için argüman olarak %s geçersiz" -#: find/parser.c:2671 -#, fuzzy, c-format +#: find/parser.c:2607 +#, c-format msgid "%s is not the name of a known user" -msgstr "%s mevcut bir grubun ismi değil" +msgstr "%s bilinen kullanıcının adı değildir" -#: find/parser.c:2678 -#, fuzzy, c-format +#: find/parser.c:2614 +#, c-format msgid "The argument to -user should not be empty" -msgstr "-type için argümanlar tek bir harf içermemeli" +msgstr "-kullanıcı argümanı boş geçilemez" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Etkin özellikler:" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "" +msgstr "geçersiz koşul -context: SELinux etkin değil." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "-type için argümanlar tek bir harf içermemeli" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "-type için bilinmeyen argüman: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c desteklenmiyor, çünkü find'ın derlendiği platformda sembolik " +"bağlantılar desteklenmiyor." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "uyarı: tanınmayan öncelem `\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c desteklenmiyor, çünkü find'ın derlendiği platformda FIFO'lar (Ä°GİÇ) " +"desteklenmiyor." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "hata: biçim dizgesi sonunda %s" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c desteklenmiyor, çünkü find'ın derlendiği platformda isimlendirilmiş " +"soketler desteklenmiyor." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "uyarı: tanınmayan biçem yönergesi `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c desteklenmiyor, çünkü find'ın derlendiği platformda Solaris " +"kapıları desteklenmiyor." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" -"hata: biçem yönergesi `%%%c' gelecekte kullanmak üzere yedeğe ayrılmıştır" +msgid "Unknown argument to -type: %c" +msgstr "-type için bilinmeyen argüman: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Çalışma dizini PATH ortam değişkeninde bulunuyor ve find'in %s eylemi ile " "birlikte güvensiz oluyor. Lütfen bu dizini PATH ortam değişkeninizden " -"kaldırın (yani, \".\" ile bunun önündeki ve ardındaki iki nokta üstüste " -"işaretlerini kaldırın)" +"kaldırın (yani, \".\", çift tırnak ile bunun önündeki ve ardındaki iki nokta " +"üstüste işaretlerini kaldırın)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -462,7 +521,7 @@ msgstr "" "birlikte güvensiz oluyor. Lütfen bu girdiyi $PATH ortam değişkeninizden " "kaldırın" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -471,95 +530,102 @@ msgstr "" "-execdir ve -okdir seçeneklerinde uygulama ismi içinde {} kullanmamalısınız, " "çünkü bu potensiyel bir güvenlik açığıdır." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "-exec%s ... + ile sadece bir {} desteklenmektedir" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "%s içerisinde %s kendi başına görülmeli ancak %s belirttiniz" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "exec() için ortam çok geniş." -#: find/parser.c:3603 -#, fuzzy, c-format +#: find/parser.c:3269 +#, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" -msgstr "bugünün sonu bulunmaya çalışılırken aritmetiksel üstten taşma oluştu" +msgstr "%s gün saniyeye dönüştürülürken aritmetiksel taşma oluştu" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "bugünün sonu bulunmaya çalışılırken aritmetiksel üstten taşma oluştu" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "standart hata" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "standart çıktı" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "" +msgstr "%s silinemiyor" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "Dizin değiştirilemedi" - -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:718 #, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 -#, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "Uyarı: %s dosyasının doğum günü saptanamadı" +msgstr "UYARI: %s dosyasının doğum günü saptanamadı" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Standart çıktıyı yazma başarısız" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Standart girdi kapatılamıyor" +msgid "getfilecon failed: %s" +msgstr "getfilecon başarısız: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Dizin değiştirilemedi" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "ayrılamaz" +msgid "warning: unrecognized escape `\\%c'" +msgstr "uyarı: tanınmayan öncelem `\\%c'" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "%s beklenirken hata oluştu" +msgid "error: %s at end of format string" +msgstr "hata: biçim dizgesi sonunda %s" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s, %d sinyali ile sonlandırıldı" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" +"hata: biçem yönergesi `%%%c' gelecekte kullanmak üzere yedeğe ayrılmıştır" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "uyarı: `%%%c' dizin yönergesi ardından farklı bir karakter içermelidir" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "uyarı: tanınmayan biçem yönergesi `%%%c'" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "ifade geçersiz" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -568,22 +634,22 @@ msgstr "" "geçersiz ifade; öncesinde başka hiçbirşey olmaksızın bir iki terimli '%s' " "işleci kullanmalısınız" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "'%s' ile ')' arasında bir ifade umuluyordu" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "'%s' sonrasında bir ifade umuluyordu" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "geçersiz ifade; çok fazla ')' var" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -592,126 +658,128 @@ msgstr "" "geçersiz ifade; bir ')' umuluyordu ama yok. Belki de '%s' sonrasında ek bir " "dayanağa ihtiyacınız var" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "geçersiz ifade; boş parantezlere izin yok" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "geçersiz ifade; bir ')' olmalıydı ama hiç yok." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "hooop -- geçersiz ifade türü!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "hooop -- geçersiz ifade türü (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"uyarı: %s koşulu için koşul değerlendirme maliyet tablosunda bir girdi yok; " +"lütfen bunu bir hata kaydı olarak bildirin" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "dosya yolları ifadeyi öncelemelidir: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "geçersiz yüklem `%s'" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "geçersiz dayanak `%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "`%s' argümanı `%s'de geçersiz" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "`%s'de argüman eksik" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "çok fazla ')' var" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "umulmayan ek dayanak '%s'" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "umulmayan ek dayanak" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "Hoop -- öntanımlı `and' yerleştirme geçersiz!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Kullanımı: %s [-H] [-L] [-P] [-Oseviye] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [dosyaYolu...] [ifade]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "çalışılan dizin alınamadı" +msgstr "başlangıç çalışma dizinine kaydedilemedi" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "çalışılan dizin alınamadı" +msgstr "başlangıç çalışma dizinine geri yüklenemedi" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Tanınmayan hata ayıklama seçeneği %s yoksayılıyor" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "-D seçeneğine boş argüman." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "-O seçeneği ile bir ondalık tamsayı verilmelidir" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "-O'nun ardına lütfen bir ondalık sayı yazın" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "En iyileme seviyesi %s geçersiz" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -720,7 +788,7 @@ msgstr "" "En iyileme seviyesi %lu çok büyük. Dosyaları çabucak bulmak istiyorsanız, " "GNU locate kullanmayı düşünebilirsiniz" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -729,64 +797,383 @@ msgstr "" "FIND_BLOCK_SIZE ortam değişkeni destekenmiyor, blok boyunu etkileyen tek şey " "POSIXLY_CORRECT ortam değişkenidir" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 #, c-format -msgid "command too long" +msgid "invalid argument %s for %s" +msgstr "%2$s için %1$s argümanı geçersiz" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "%2$s için %1$s argümanı anlamsız" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "Geçerli argümanlar:" + +#: gl/lib/closein.c:100 +msgid "error closing file" msgstr "" -#: lib/buildcmd.c:311 +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 #, c-format -msgid "can't call exec() due to argument size restrictions" +msgid "write error" +msgstr "yazma hatası" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "Bilinmeyen sistem hatası" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s: `%s' seçeneği belirsiz\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s: `--%s' seçeneği argümansız kullanılır\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s: seçenek `%c%s' argümansız kullanılır\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s: seçenek bir argümanla kullanılır -- %c\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s: `--%s' seçeneği bilinmiyor\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s: `%c%s' seçeneği tanınmıyor\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: geçersiz seçenek -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s: seçenek bir argümanla kullanılır -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s: `-W %s' seçeneği belirsiz\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s: `-W %s' seçeneği argümansız kullanılır\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s: seçenek bir argümanla kullanılır -- %c\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "başlangıç çalışma dizinine geri yüklenemedi" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "başlangıç çalışma dizinine geri yüklenemedi" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "“" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "”" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[eE]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[hH]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" msgstr "" -#: lib/buildcmd.c:381 +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 #, c-format -msgid "cannot fit single argument within argument list size limit" +msgid "Written by %s.\n" msgstr "" -#: lib/buildcmd.c:387 -#, fuzzy, c-format -msgid "argument list too long" -msgstr "argüman satırı çok uzun" +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" -#: lib/buildcmd.c:640 +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 #, c-format -msgid "Environment variable %s is not set to a valid decimal number" +msgid "Written by %s, %s, and %s.\n" msgstr "" -#: lib/findutils-version.c:60 -msgid "Eric B. Decker" +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" msgstr "" -#: lib/findutils-version.c:61 -msgid "James Youngman" +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" msgstr "" -#: lib/findutils-version.c:62 -msgid "Kevin Dalley" +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" msgstr "" -#: lib/findutils-version.c:64 +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU gnulib sürüm %s kullanarak derlenmiş\n" +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" -#: lib/safe-atoi.c:76 +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 #, fuzzy, c-format -msgid "Unexpected suffix %s on %s" -msgstr "umulmayan ek dayanak '%s'" +msgid "invalid %s%s argument '%s'" +msgstr "`%s' argümanı `%s'de geçersiz" -#: lib/safe-atoi.c:82 +#: gl/lib/xstrtol-error.c:68 #, fuzzy, c-format -msgid "Expected an integer: %s" -msgstr "'%s' sonrasında bir ifade umuluyordu" +msgid "invalid suffix in %s%s argument '%s'" +msgstr "`%s' argümanı `%s'de geçersiz" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "argüman listesi çok uzun" -#: lib/regextype.c:107 +#: lib/buildcmd.c:161 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." +msgid "command too long" +msgstr "komut çok uzun" + +#: lib/buildcmd.c:301 +#, c-format +msgid "can't call exec() due to argument size restrictions" +msgstr "argüman boyut kısıtlamaları nedeniyle exec() çağrılamıyor" + +#: lib/buildcmd.c:371 +#, c-format +msgid "cannot fit single argument within argument list size limit" +msgstr "argüman liste boyut sınırı içerisinde tek argüman sığdırılamıyor" + +#: lib/buildcmd.c:377 +#, c-format +msgid "argument list too long" +msgstr "argüman listesi çok uzun" + +#: lib/buildcmd.c:629 +#, c-format +msgid "Environment variable %s is not set to a valid decimal number" +msgstr "%s ortam değişkeni geçerli bir ondalık sayıya ayarlanmadı" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." msgstr "" +"%d dosya tanımlayıcısı sızdırma yapacak. Lütfen bu sorunu yinelemek için en " +"kolay yolun ayrıntılı açıklamasını dahil ederek, bunu bir hata kaydı olarak " +"bildirin." + +#: lib/findutils-version.c:55 +msgid "Eric B. Decker" +msgstr "Eric B. Decker" + +#: lib/findutils-version.c:56 +msgid "James Youngman" +msgstr "James Youngman" + +#: lib/findutils-version.c:57 +msgid "Kevin Dalley" +msgstr "Kevin Dalley" + +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Standart çıktıyı yazma başarısız" -#: locate/code.c:127 +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Bilinmeyen düzenli anlatım türü %s; geçerli türler, %s." + +#: lib/safe-atoi.c:81 +#, c-format +msgid "Unexpected suffix %s on %s" +msgstr "Beklenmeyen %s eki, %s üzerinde" + +#: lib/safe-atoi.c:87 +#, c-format +msgid "Expected an integer: %s" +msgstr "Bir tamsayı bekleniyor: %s" + +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -795,8 +1182,8 @@ msgstr "" "Kullanımı: %s [--version | --help]\n" "veya %s most_common_bigrams < dosya-listesi > konum-veritabanı\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -805,85 +1192,80 @@ msgstr "" "Yazılım hatalarını adresine bildiriniz.\n" "Çeviri hatalarını ise adresine bildirin.\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "yazma hatası" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" -msgstr "" +msgstr "Kullanım: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." -msgstr "" +msgstr "Güvenlik düzeyini bir ondalık tamsayı olarak belirtmeniz gerekli." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." -msgstr "" +msgstr "Güvenlik düzeyi %s, değiştirilebilir erimin dışında." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." -msgstr "" +msgstr "Güvenlik düzeyi %s, beklenmeyen %s sonekine sahip." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." -msgstr "" +msgstr "tahsis edilen güvenlik düzeyi %ld desteklenmiyor." -#: locate/frcode.c:289 -#, fuzzy, c-format +#: locate/frcode.c:295 +#, c-format msgid "Failed to write to standard output" -msgstr "standart çıktı" +msgstr "Standart çıktıyı yazma başarısız" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "gün" -#: locate/locate.c:193 -#, fuzzy, c-format +#: locate/locate.c:186 +#, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "--max-database-age seçeneğinin argümanı boş olmamalı" +msgstr "--max-database-age seçeneği için bağımsız değişken boş olmalı" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "--max-database-age seçeneği için %s argümanı geçersiz" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "locate veritabanı %s locate'in artık çalışmadığı bir dosya türünün ismini " "içeriyor" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "locate veritabanı %s ya bozuk ya da geçersiz" -#: locate/locate.c:893 -#, fuzzy, c-format +#: locate/locate.c:860 +#, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" -msgstr[0] "Locate veritabanı boyu: %s bayt\n" -msgstr[1] "Locate veritabanı boyu: %s bayt\n" +msgstr[0] "Veritabanı boyutunu belirle: %s bayt\n" +msgstr[1] "Veritabanı boyutunu belirle: %s bayt\n" -#: locate/locate.c:900 -#, fuzzy, c-format +#: locate/locate.c:867 +#, c-format msgid "Matching Filenames: %s\n" -msgstr "Eşleşen Dosya isimleri: %s " +msgstr "Eşleşen Dosya adları: %s\n" -#: locate/locate.c:901 -#, fuzzy, c-format +#: locate/locate.c:868 +#, c-format msgid "All Filenames: %s\n" -msgstr "Tüm Dosya isimleri: %s " +msgstr "Tüm Dosya adları: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -893,8 +1275,14 @@ msgid "" "\t%s contain newline characters, \n" "\tand %s contain characters with the high bit set.\n" msgstr "" +"Dosya isimleri artan %s bayt içeriyor.\n" +"Bu dosya isimlerinin,\n" +"\n" +"\t%s tanesi boşluk içeriyor, \n" +"\t%s tanesi yeni satır karakteri içeriyor,\n" +"\tve %s tanesi yüksek bit seti ile karakter içeriyor.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -903,17 +1291,17 @@ msgstr "" "Bazı dosyalar süzülüp atılmış olabilir, bu nedenle sıkıştırma oranını " "hesaplayamayız.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Sıkıştırma oranı %%%4.2f (daha yükseği daha iyidir)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Sıkıştırma oranı tanımlanmamış\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -922,7 +1310,7 @@ msgstr "" "locate veritabanı %s bir slocate veritabanı gibi görünüyor ama GNU findutils " "tarafından desteklenmeyen %c güvenlik seviyesine de sahipmiş gibi görünüyor" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -931,14 +1319,14 @@ msgstr "" "%s bir slocate veritabanıdır. Henüz yeni yeni desteklenmektedir, şu an " "sorunları olabilir." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" "%s desteklenmeyen %d güvenlik seviyeli bir slocate veritabanıdır; atlanıyor" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -949,36 +1337,36 @@ msgstr "" "slocate biçimli veritabanları ile kullanılmamalıdır. Bu veritabanı için " "hiçbir sonuç üretilmeyecek.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s bir slocate veritabanıdır. '-e' seçeneği etkin kılınıyor." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "eski biçim locate veritabanı %s geçerli olmak için çok kısa" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "%s veritabanı %s biçiminde.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "Veritabanı kıymetsiz baytın başta olduğu bayt sıralamasına sahip\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "Veritabanı kıymetli baytın başta olduğu bayt sıralamasına sahip\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Veritabanın bayt sıralamasının ne olduğu belli değil.\n" -#: locate/locate.c:1400 -#, fuzzy, c-format +#: locate/locate.c:1372 +#, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" " [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" @@ -988,69 +1376,69 @@ msgid "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" msgstr "" -"Kullanımı: %s [-d DosyaYolu | --database=DosyaYolu]\n" +"Kullanımı: %s [-d yol | --database=yol]\n" " [-e | | -E | --[non-]existing] [-i | --ignore-case] [-w | --" "wholename]\n" " [-b | --basename] [--limit=N | -l N] [-S | --statistics] [-0 | --" "null]\n" " [-c | --count] [-P | -H | --nofollow] [-L | --follow] [-m | --" -"mmap ]\n" -" [ -s | --stdio ] [-A | --all] [-p | --print] [-r | --regex ]\n" +"mmap]\n" +" [ -s | --stdio] [-A | --all] [-p | --print] [-r | --regex]\n" " [--regextype=TÜR] [--max-database-age D] [--version] [--help]\n" -" KALIP...\n" +" kalıp...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "grup izinleri kaldırılamadı" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "setuid izinleri kaldırılamadı" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Ä°zinler tamamen kaldırılamadı" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "setgid izinleri kaldırılamadı" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "Uyarı: locate veritabanı standart girdiden sadece bir kere okunabilir" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "" +msgstr "sistem zaman çağrısı başarısız" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "uyarı: %s veritabanı %d den %s daha eski (aslında %.1f %s yaşında)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" -msgstr "" +msgstr "UYARI: %s veritabanı yeri farklı bir sekiz ikil düzeniyle yapıldı" -#: locate/word_io.c:143 -#, fuzzy, c-format +#: locate/word_io.c:145 +#, c-format msgid "unexpected EOF in %s" -msgstr "umulmayan ek dayanak '%s'" +msgstr "%s içinde beklenmeyen dosya sonu" -#: locate/word_io.c:146 -#, fuzzy, c-format +#: locate/word_io.c:148 +#, c-format msgid "error reading a word from %s" -msgstr "%s beklenirken hata oluştu" +msgstr "%s içinden bir kelime okunurken hata" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1059,7 +1447,7 @@ msgstr "" "Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz; karakter " "değerleri %lx değerini aşmamalı." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1068,7 +1456,7 @@ msgstr "" "Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz; karakter " "değerleri %lo değerini aşmamalı." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1077,7 +1465,7 @@ msgstr "" "Girdi sınırlayıcı belirtimindeki %s önceleme dizgesi geçersiz; ardındaki %s " "karakterleri tanınmıyor." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1086,61 +1474,76 @@ msgstr "" "Girdi sınırlayıcı belirtimi %s geçersiz: sınırlanan şey ya tek bir karakter " "ya da \\ ile öncelenmiş bir dizge olmalı." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "icra edilebilir olarak ortam çok geniş" -#: xargs/xargs.c:561 -#, fuzzy, c-format +#: xargs/xargs.c:559 +#, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "uyarı: %ld değeri -s seçeneği için çok büyük, yerine %ld kullanılıyor" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "option --%s, `=' simgesini dahil eden bir değere ayarlanamaz" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "%s ortam değişkeni kaldırılamadı" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "uyarı: -0 veya -d kullanıldığında -E seçeneğinin bir etkisi yoktur.\n" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "SIGUSR1 sinyal işleyici ayarlanamıyor" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "SIGUSR2 sinyal işleyici ayarlanamıyor" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Girdi dosyası %s açılamıyor" -#: xargs/xargs.c:669 -#, fuzzy, c-format +#: xargs/xargs.c:695 +#, c-format msgid "Your environment variables take up % bytes\n" -msgstr "Ortam değişkenleriniz %lu bayt tutuyor\n" +msgstr "Ortam değişkenleriniz % bayt tutuyor\n" -#: xargs/xargs.c:672 -#, fuzzy, c-format +#: xargs/xargs.c:698 +#, c-format msgid "POSIX upper limit on argument length (this system): %\n" -msgstr "Argüman uzunluğunun POSIX üst sınırı (bu sistem): %lu\n" +msgstr "Argüman uzunluğunun POSIX üst sınırı (bu sistem): %\n" -#: xargs/xargs.c:675 -#, fuzzy, c-format +#: xargs/xargs.c:701 +#, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" "Argüman uzunluğu için izin verilen en küçük POSIX üst sınırı (tüm sistemler: " -"%lu\n" +"%)\n" -#: xargs/xargs.c:678 -#, fuzzy, c-format +#: xargs/xargs.c:704 +#, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "Kullanabileceğimiz asgari komut uzunluğu: %ld\n" +msgstr "Kullanabileceğimiz asgari komut uzunluğu: %\n" -#: xargs/xargs.c:681 -#, fuzzy, c-format +#: xargs/xargs.c:707 +#, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "Kullanmakta olduğumuz komut tamponunun boyu: %lu\n" +msgstr "Kullanmakta olduğumuz komut tamponunun boyu: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1153,7 +1556,7 @@ msgstr "" "çalıştırmayı deneyecek; eğer istediğiniz bu değilse lütfen dosyasonu " "tuşlayınız.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1162,7 +1565,7 @@ msgstr "" "Uyarı: %s en azından bir kere çalışacak. Ä°stediğiniz bu değilse kesme " "tuşlarına basınız.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1171,205 +1574,294 @@ msgstr "" "%s karşılığı ile eşleşmiyor; -0 seçeneği ile belirtilmedikçe öntanımlı " "olarak sarmalayıcı karakterler xarg'lara özeldir" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "çift" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "tek" -#: xargs/xargs.c:936 -#, fuzzy, c-format +#: xargs/xargs.c:962 +#, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -"Uyarı: girdide bir NUL karakter algılandı. Argüman listesi üzerinden " +"UYARI: girdide bir NUL karakter algılandı. Argüman listesi üzerinden " "aktarılamaz. --null seçeneğini kullanmayı düşündünüz mü?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "argüman satırı çok uzun" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Standart çıktıyı yazma başarısız" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "" +msgstr "/dev/tty okumak için açılamadı" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Standart çıktıyı yazma başarısız" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "bellek ayrılamıyor" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "%s ortam değişkeni ayarlanamadı" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" -msgstr "" +msgstr "çatallamadan önce iletişim tüneli oluşturulamadı" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" +"xargs_do_exec içerisinde errno-buffer safe_read başarısız (bu, muhtemelen " +"bir hata, lütfen bildirin)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" +"read beklenmedik %d değerini döndürdü; bu, muhtemelen bir hata, lütfen " +"bildirin" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "ast süreç beklenirken hata oluştu" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "" +msgid "WARNING: Lost track of %lu child processes" +msgstr "UYARI: %lu alt sürecin izi kaybedildi" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: durum 255 ile çıkıldı; bırakılıyor" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: %d sinyali ile durduruldu" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: %d sinyali ile sonlandırıldı" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: -%c seçeneği için geçersiz sayı\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: -%c seçeneği için değer >= %ld olmalı\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: -%c seçeneği için değer < %ld olmalı\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Kullanımı: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=ayraç]\n" -" [-E eof-dizgesi] -e[eof-dizgesi]] [--eof[=eof-dizgesi]]\n" -" [-L azami-satır-sayısı] [-l[azami-satır-sayısı]]\n" -" [--max-lines[=azami-satır-sayısı]] [-I değiştirme-dizgesi]\n" -" [-i[değiştirme-dizgesi]] [--replace[=değiştirme-dizgesi]]\n" -" [-n azami-arg-sayısı] [--max-args=azami-arg-sayısı]\n" -" [-s azami-karakter-sayısı] [--max-chars=azami-karakter-sayısı]\n" -" [-P azami-işlem-sayısı] [--max-procs=azami-işlem-sayısı]\n" -" [--show-limits] [--verbose] [--exit] [--no-run-if-empty]\n" -" [--arg-file=dosya] [--version] [--help] [komut [ilk-argümanlar]]\n" - -#~ msgid "cannot get current directory" -#~ msgstr "çalışılan dizin alınamadı" - -#~ msgid "invalid argument %s for %s" -#~ msgstr "%2$s için %1$s argümanı geçersiz" - -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "%2$s için %1$s argümanı anlamsız" - -#~ msgid "Valid arguments are:" -#~ msgstr "Geçerli argümanlar:" - -#~ msgid "Unknown system error" -#~ msgstr "Bilinmeyen sistem hatası" - -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: `%s' seçeneği belirsiz\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Kullanım: %s [SEÇENEK]... KOMUT [BAŞLANGIÇ-ARG.]...\n" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: `--%s' seçeneği argümansız kullanılır\n" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"KOMUTu BAŞLANGIÇ-ARG. ve girdiden okunan sonraki argümanlar ile çalıştır.\n" +"\n" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: seçenek `%c%s' argümansız kullanılır\n" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Uzun seçeneklerdeki zorunlu ve isteğe bağlı argümanlar\n" +"kısa seçeneklerde de geçerlidir.\n" +#: xargs/xargs.c:1626 #, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: `%s' seçeneği bir argümanla kullanılır\n" +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null ögeler bir null karakteri ile ayrılır, " +"boşlukla değil;\n" +" tek tırnak ve ters bölü işleme ile " +"mantıksal EOF (dosya sonu)\n" +" işlemeyi devre dışı bırakır.\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=DOSYA argümanları standart girdiden değil, " +"DOSYAdan oku\n" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=KARAKTER girdi akışındaki ögeler KARAKTER ile ayrılır,\n" +" boşlukla değil; tırnak ve ters bölü\n" +" işleme ile mantıksal dosya sonu işlemeyi yü " +"devre dışı bırakır\n" + +#: xargs/xargs.c:1633 #, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: `--%s' seçeneği bilinmiyor\n" +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E SON Mantıksal dosya sonu dizgesini ayarla\n" +" bir girdi satırında SON gerçekleşirse, " +"girdinin\n" +" geri kalanı yoksayılır\n" +" (-0 veya -d belirtilmişse yoksayılır)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=SON] SON belirtilmişse -E SON ile aynıdır;\n" +" aksi halde, dosya sonu dizgesi yoktur\n" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: `%c%s' seçeneği tanınmıyor\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R --replace=R ile aynı\n" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: geçersiz seçenek -- %c\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] BAŞLANGIÇ-ARG. içindeki R'yi standart\n" +" girdiden okunan isimler ile değiştir; R " +"belirtilmemişse\n" +" {} farzet\n" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: seçenek bir argümanla kullanılır -- %c\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=AZAMÄ°-SATIR her komut satırı için en fazla AZAMÄ°-SATIR\n" +" boş olmayan girdi satırı kullan\n" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: `-W %s' seçeneği belirsiz\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[AZAMÄ°-SATIR] -L ile aynı ancak AZAMÄ°-SATIR " +"belirtilmemişse\n" +" en fazla bir boş olmayan satır varsayılır\n" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: `-W %s' seçeneği argümansız kullanılır\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=AZAMÄ°-ARG. her komut satırı için en çok AZAMÄ°-ARG. " +"argüman kullan\n" -#~ msgid "`" -#~ msgstr "“" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=AZAMÄ°-SÜREÇ aynı anda en çok AZAMÄ°-SÜREÇ süreç " +"çalıştır\n" -#~ msgid "'" -#~ msgstr "”" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive komutları çalıştırmadan önce sor\n" -#, fuzzy -#~ msgid "Invalid regular expression" -#~ msgstr "ifade geçersiz" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=DEĞŞ. alt süreçlerde DEĞŞ. ortam değişkenini " +"ayarla\n" -#, fuzzy -#~ msgid "Invalid range end" -#~ msgstr "-used için argüman olarak %s geçersiz" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty eğer argüman yoksa, KOMUTu çalıştırma;\n" +" bu seçenek girilmezse, KOMUT en az bir kez\n" +" çalıştırılacaktır\n" -#, fuzzy -#~ msgid "Invalid preceding regular expression" -#~ msgstr "ifade geçersiz" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=AZAMÄ°-KARAKTER komut satırı sınırını AZAMÄ°-KARAKTER " +"olarak sınırla\n" -#~ msgid "^[yY]" -#~ msgstr "^[eE]" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits komut satırı uzunluğu sınırlarını göster\n" -#~ msgid "^[nN]" -#~ msgstr "^[hH]" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr " -t, --verbose komutları çalıştırmadan önce yazdır\n" -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "`%s' argümanı `%s'de geçersiz" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr " -x, --exit boyut aşarsa (bkz. -s) çık\n" -#, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "`%s' argümanı `%s'de geçersiz" +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help bu yardımı göster ve çık\n" -#, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "argüman satırı çok uzun" +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version sürüm bilgisini göster ve çık\n" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s: kuraldışı seçenek -- %c\n" @@ -1377,6 +1869,9 @@ msgstr "" #~ msgid "block size" #~ msgstr "blok uzunluğu" +#~ msgid "cannot get current directory" +#~ msgstr "çalışılan dizin alınamadı" + #~ msgid "level higher in the filesystem hierarchy" #~ msgstr "seviye, dosya sistemi hiyerarşisinde daha yüksek" @@ -1393,6 +1888,9 @@ msgstr "" #~ msgid "GNU find version %s\n" #~ msgstr "GNU find sürüm %s\n" +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "GNU gnulib sürüm %s kullanarak derlenmiş\n" + #~ msgid "GNU findutils version %s\n" #~ msgstr "GNU findutils sürüm %s\n" @@ -1428,3 +1926,25 @@ msgstr "" #~ msgid "GNU xargs version %s\n" #~ msgstr "GNU xargs sürüm %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Kullanımı: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=ayraç]\n" +#~ " [-E eof-dizgesi] -e[eof-dizgesi]] [--eof[=eof-dizgesi]]\n" +#~ " [-L azami-satır-sayısı] [-l[azami-satır-sayısı]]\n" +#~ " [--max-lines[=azami-satır-sayısı]] [-I değiştirme-dizgesi]\n" +#~ " [-i[değiştirme-dizgesi]] [--replace[=değiştirme-dizgesi]]\n" +#~ " [-n azami-arg-sayısı] [--max-args=azami-arg-sayısı]\n" +#~ " [-s azami-karakter-sayısı] [--max-chars=azami-karakter-sayısı]\n" +#~ " [-P azami-işlem-sayısı] [--max-procs=azami-işlem-sayısı]\n" +#~ " [--show-limits] [--verbose] [--exit] [--no-run-if-empty]\n" +#~ " [--arg-file=dosya] [--version] [--help] [komut [ilk-argümanlar]]\n" diff --git a/po/uk.gmo b/po/uk.gmo index c7d289fb66f5f6ce2d816cf1502444344a4b2b1a..1075905e4cda96b101fb66829149d5a6e066d457 100644 GIT binary patch literal 51233 zcmeI536vdYb>|C0Aau+U_MI{yB*l7d$qN|CGL|jL7HC6~7ZApN-Tk`zS>5k7Z_#2* zkZo*C47M@CX7Nq}467_lmMm}VSqZN*5JEx{!i34m$s{Dh2_ci2GxPi3`+ZgQUcYX& z&2}a;eN?)ys=oE^_kLeh{pB;B@PWrAN%9?zr5sOxQj(m^g@1ZVlIZ$_&qxw3C0_=9 zmqUN2JS#~)4LlXN82CNlzX6YXc9L8ReByJGWI6B#;3nYj1J44!;JHb1Ht-@K|B}1- z@7uupfhPms|GXr5JMeda>ws&XpCs#nHvs<*_#NOr;8$OeB#!{Mzc5K|2fpw{-p^6s z8JrKiI7z+%TnAJ;FL_CltOkw)*8o2QJQw&w;6~u-FHMqH1Fr+V4EQDBLg0S|UJiU} z%GiO|0b9V20bc=p;qhMnOdvx}hJg$zxg03Gd=U8Sz%K$X2L1zZ47h<#1P=knfiHeJ zcn4ks6pC*FE(3lNsP?`C?0MrvbkO)I6UKk|14j7BB@~4Al7c0*8PP1(==y zjyb;yxEJ`hKuDa7FY$R?13ZrN4*)fvyMdzDUjsF-^Fhk1fHk1#{o6p%;V*!v0M`sA z$zkASzzx8YPD~QINcIB7pPvR^0Q@d+H}EtBM*ZIdd@bcBeit-!wm@-KPA3ZL(LfY0arG$#8T;FbWZK#gxNa3$~v@ND3ZfSUhuEU;<&I=>V6Qs91I3hV^<&p`3*GtTsKuL6S7WC-{Q;D>;s+rvOa zCiz>S@c)!mN%Cyqslev~Uk}uLhJnujUIE+;+y_*9-v`!!FFMQl1b$zr=~fx_=P z;FEw=pvM1J;03^IfuK71E^r;~rLS{-x%Bm}uRjYEo&FUletG$N=f}4IA#KtDicg=0 z@V*TA4xr@WZs3`~4)CvmzqS!v1AhqoRp7TbIi0=_eE#E;~`6qy@fZqgaUeB$%9e)$>yPThLX_EW^_-v4&`Tz2S%lW?nU(Wf!Br*yd1ik@y zH4suH-vYw2$t!C~!jzLsfi#)?9#C>{a^2xOfuhSdfvBG3geli!W5825zXjL={vq(G zz*Q)%cK|m7b-x2#2K?oQkN?#`SS`5>cscMZKuD6D)%5Y+2D})2e*t(Z@c6d-KNsvo z_J0XH?s7i7{jwy1HIk>l&GmT&xQX*SfUgGr0Qf54LOS7R@)qFNfPWU?C*F>3=6vUG zB*~uwPhik1flt`$^EeB5TmsI3e*t_8@R^L~^ecQmo3CUJT)z@{3GjabKLdQrRgT}| zVA>NYza97uu3rb!YJ8Vm=3Pnh$H4CcVcF!!wN9^JgQ+f{{y31KCZGRJ z=f^XybGm&PxSRWb2?WK-1@Cn_{2mZiNzS<5%Y7Vp59fam`~mQ`8{kdgdvAm%fIk3= zPA_>MJOJDZq{-xA;F-YJ-Q@gt9q+jv?_Wa+0zryw54|u;5Hz!Gh``-k@ zg2}nJxSl-(yp{7;d=Qxfej&iOeaQLX)DMGK+BpDxG57!GBTm=HQ%Q6=9jJCM1A?mL zAAlbNwr@)kSTA|e?QRF&3k0>vA>hft)9-NoGzA>u{Qba1z#oP4m)^w|;94V)jxB!_@+0tzn=0ha;)94P*N%Ew)9Rs)5fao~lz z5Bvh~lux+a{|NXQ&d>c%K93&(mvH{#Pr4kv4){vW?*PIg$yb4!f#-h;T?_m;@C4w< zr(Ire1fIe9-veI*{B;_a9v=Z-&iTY=lVmOM?||c6U-~)c>ksXBJpU6=dgXEVxW9A( zQ2cl;a2Mqd12vBm?{$58El~LV4p8NeJLvRX0TkWpz?T8{0%4)#qrhu`XB@%?Jsv#+ z6kmVqFuV&KKH~WLXW(ygJ_1wT4g3M{PT);P-F}?>0KNq0F9r!)fmPr>;6uQ>8RwRV z7&Gu+9`^o!`Yivw0L+opM(!toA{ zQ4U1Nd>}ybXB?mBU~1XlCD||kaXerP2dtO;2FGz6#lJ~TK$Gcp(eeo#kSXbK)H&YC z@kbnA?;sbB>y>_3x}Z2Z2Zf^wKD_!Lm+C*;*{qCQ4PkMqT}rx`fGDE zIWFZuRT^)`)b1b)CZVUADbsQIRd{rm>z0raFKUVmi@_U-&Z5*QSb2#(|J0$mU zJcZ*3hyE6D{4vLs9OrPvzq8|y06z%)gYX+QVt;D`{8QlXb9{*7GaQRK;@?(&e39d= z9G?moPX>OH;{eAS!nI|7Ea8=udo(ny|m`@c&ylBy-nslsKNmaRJBq9R2>j!o{mNeu-l^ z6j&ADYk>b&eZ3UdU17(BFEF?Hu3KN#Ux93LJ4k*R_)?A`j&E`N3C9&2 zU*_1zahPKdhyM0*oXRo6p}*hZ*lfT2ziR-$%kd13cX7Ou<6|89JL>BazXjgJ@gk00 zI^pll9KXWxN1soU|H$GIGD=9uDmC&vdl4svuj{)Xen9LK?QDaW5sS98%H zr}p;>{{P?nt@(o6cwKz9-EscVy-N@nmD8Wbplk2pn((Z@$8+e~m$-JWUCFOKt$Vj8i&eX%Qf+@{^Hoa z&$Y-S@!BOYN95^v?GL!N&8ud0lYuq6E5q$pwO&i>qv`H)W2~9(s!mL#!}VILT5DI* zT7B1&v|JlWt1Z9NYV1i{^|Vnb>sm9d)~4DmE754zs5d!D>E?>GI-0h|tK4tW26e~F zt#nVlo$e~vT9pwsFQE+6WVvXr4J%YY)~NV`r#jd02C5E>BA%m5EBLl9r|# z)mm$5fTQW!O2bwZBkgsTT=n;bfvo3;bub>7reur?7CV8JC+6t7bnYm#0$-8vjvAN zPwP{aMwup>OZaIxUXr#d%@*fkl8E<#Bp|OeUYVHk-(CNYRGU*1v~4V6WmLVg8`Nc0 zryBKP##U-h)LW&U<;KeMS8bt@W~Bv-?5sBGwMos2JJs?KyrSDxSa7^LF_MPLm1f>v zbG*K*G*O)t*B1VCISrRVL*QTvLd=OuZLBq(H?gzQFkBU?>u0^)k`TnZ)!JyiFCBZQIst*~nR?F_~^Jop{lP zO{>?WrAB3}vOC_5Y$KU8Oq6ytsxAK|j%(ZRSZddJooSUPE3tZ7YF00+q#L&n4e#2q z;hc-oQmcXFmrNkJI5Gu~ujX>QI+AXT%`jTdxTsNYT(yBg?e3~^QIe*mb*V_!|F5Yr zl;JvN12YU)R&EhCO6!+!X|lZANYGrlVbz7D_3JjS*{W9PEk%(`*5SweMy*~e4Na75 zJAyV6?V2el3xn<7zg-RFh5>37>wR;cu$jE!B@Cf(^*#SK-L@d1%> zP*n{ou<7=dTe^l7F2m`NVBN-b+t#gGUs|>0oUIs4L|CHMG<$jMK^Y%(Q{OBpO*hka zEt}swC|GVbVXpLTZ#Se)Y|o^nYwW^q6P}tVHw>fev91^jHzH|BVa)E)*OV}&QMvr=RtIB{|c z?yjJuD=8vf6H`XV#fH;R^;*5e%~Ex=RH6Ky*o65t;upzRtqur6YJOdj)%v~4M(yxf+;prE5X{y z6D(>)@rB4|g$+F|wS=)7s-um2{@izp*o;_qDlP}2>ke2q8{6&;s6B~#{+`|la zRwmK~BP-J8j_TBu22^bg&fd^qnr`)0Qn*Efr*XzmtKb#mCgDy=eW4anz$$^eJa=>3 z+7073JPle)7nUjugC`a1N%iWMnP?_bPIu61O{T9AMmnQNO(<*Pv5%$ZJ0(GQ zQb$Fp)rmU(=tOk~?48!oAC2m;x0tS54Katyl13_wW4AR(JYK_sklY>}t?o`2G}Sqh zH(9Mk%hRlm)ll{eM!3aI7_c@*jS+~#hy!zY48rY2b^N!H%FgOANN7(EA>a!puzw)E z-(`yvnuH0JNsl3*&jMIwd!sU{iWkx8a^XjuU>X?(+iEw{lTJN#MOq$$MHqz@s@5O?JOPm8l!KF5rg#$a;n_P5qC z8T39pRbAJ}|Y3`XEs!zb}ID$JKdqKI;{_Szt11$V%!G!`df{Bnyt!5TB{(SnN{Dp6XUY2-Ei;!JPO#E!{Q zsVo6UZH(Z3PNL^reI#q7JkJ_TS65)(MzSU<%5pkYZ&uAMi8bV^j4{39P!?dY<&2F% zd1#nd7Y(hr*eO|CHmPM8u2%CXzi?}`Jpo6JH0o2BtLjc_j8%$No8{381$tXhN6?_V zB;M4ndSiz)ca~5Pa_fzeiaC+yeq=5L3a6_9g{I_r>Ny{K^qj1%pp~IMF1X^1k>zP3 z!2zqy;YM|eqyq-Tb5M9TJ66QJ5$?CLLY7HDkCl}lT7thlS&`|`FzKvX8=h#7$f}K0 z5ESXT*ltLEiSl^DB%^Seb}2QXBp1egq>UZ2)`O)V^l`agKVAkOWl}7YZB(jUP0txf z{9u%!J;YCg1Dli#lkl3@Sj{B^15c(v6!|>TT9S6%!0K5lLS7rrEC~n|Q1n%(o!@i| zr^!fS(jja$0tc@fE`yoG%1;RqxG%&?Y6$rtQdEw|M8HDxE)iD^u)6?tpq6HBC^`n# zLbnmun5(tAs30=s%){J=Em;M9-9wAg?jlzA-$$=jSktrr{8#4yvR7IM$`Z zuAWD$WALw%L8($o#&ysOjV1vOla`w*PZABCtQ)J&?~x9%2W#V<$;6{!$X1SFqg_>3@3O$ z#TraP8J>}uH!qPZw@|aR^ifs-X)Tk;Z4#L_7lzQG{L5s67#x`=RB`YTCAkc5Q4_BUO z)(5mA;WabP|Gfx;z~Pleotw;08i3TR5c!cg7a+E zMwgXW^B`UgU)wfw{ro8_IT*7EpZSlc-fCS9U*lC+&!UJ@|7DnqP0Xr%y6 zxCg~!gdC_$B2U7@Y|BK+mOMq{+?}&hR~Aq6npCbRzi+OvCF@KM2L}d{tvxvgj0a|} zUwk~+rz{MB-4IyktFuK_g3umOx6h zN{Z{+^0Rf@0%hd`rlR@F4R&UPSEwU*fhL5LJ?YLWt}O#mcXJuetWd>(jC~cK@ zAj6r)jwlKkji^~T0p1(s3DQZ8bfFyjh1PIZd`{!&q^oF+Q0--dFIz%BqpjcrC5bKJ9>_!|nrV=|$c(hz zUTjE;PLv7!P<5;%4FoSwmSs9BC88ykHfzImwSvTn@w@6kxz>^n#m@TcYUAJ-d#b>SGboT2n-n#BhYho9f z&9dCLr!9z-Fe--IvdIaZG2tQ1Z#o&nB8S<Gg+QqPUqfD;*bQ?7*v?#bUg8NX4Og+%m_R>_1 z*2q9y!~(X~4b+qU_MW;*pQ{_|_1|Xwx5+$9{aT%Nm1Bj!Or}ds$8J~Zii%crd5zuM zt|hCBVsiYVuy(S&RJFV0r?Bg#VU`S3ZKytyVEgRQuJZE{jUhDbpJEGJV;M(@=;>e4Z z(~ak?FNQ6{rs^{r;|>|#F!@rC%du!vtcIFX!qy71BEcMG@+3CKimWDwC(m-Sg7!wn zGIMR*8_e-*^PzvgNEve6v}G3n7A+5_aEdQaO>O{Ph$KDg_agD@lp~ z&4U+V9$(1A4nB%1?b^&reS#M)1`M@vD1%ds8;2gZ4MfUjxsgdODBC)g>5s55skKx& z@A!Zh`x5g+wJb83N300j=x@@r{M5BOfaS7zlZ|Fsghj!)5?k?ZBtmxfxAs(ridpm85$7-6X?D zN;Gd*R%ND7o5(6#*d3{WZDCDOLmMU@17lNFl5t_L1LWV42os5Wxk=I2gIF`2!URcV zAH)z#yWmVg#l;@_dI}xsvpu61kJK*~>Qa1a+Tow1h%CM$GfT&ZJ)R*~Uu`W`%eWY7 zO;pB9l9y~w6|?r6yUMJRa8qpC_hOfk@JgnT%t7C?QjjARLx3SDcy)O2~sOBpEte30ACjDN0uvQ%DOJFHA-q zg|L||%ecf87H4|ylf)mxJk41^`}6u1u!X-9$;O}9LP-jp0q=!Th`p8MsMbI_3US67 zPoJ_g$^>LM`-*gsEuRR9aDr}07HbXK!<8in3Wdn|%x@4{M=UaM7OZsj$u^KV%8gZ8 zGRo+I)Q2hdN#ZsD-xq04^d;~{c0H5iOF{-*FuR+xMxRS7(sj1l?z|)nfenic$|+ny z>SnTn_Ja<#4-0}ymbLqZ<>0}-4f^gR$EfzFxQDN5Xf!2AW~mmrxqASiTWQ4DE8%se z!Dj8IIY(v^O#<-OWVT00sGw*(9cW?@@t0#_MV_&fl0j$f(RBOHM;@4^l*}BWKga+m zt-?kxC2?Jf%nmX~3pRs#(@vh)wYgLUQY!q&H8NB7MT=NGpN6Gi*q^&R-MVHyJK%Rq zBM6ycRWk1)uVduz<4Gx-QzoB*b`zJGb0S+=QQ{dChANm2Cag8`q)#JsuMD;PAtoON z+^?Xv?li;RojzNlL|9u4)K(=BU?}c(ABZMnB1TE!JV~1cwIQp5UJs#v!V-XGku#Z~ zX~PGJLv8JiBgRzv#&qR($ZR5Um|$joe9~JoXB*$ovuMG{;$xPgKwuCy5RtV;!P&T= z(lEQlNVT*5UZxU!YL!R-Y)}?E z*yYr~G8(oYCs9h*b%CDr^Q6#DxLofo2T841R&z;P~P@Nt=OU+j4-H z60)kky4_4KS-CKgHy75x!sH9q%JiFWKd5Ua!DDD z(gjfYgpCsRlKsC?^eBUil->4awgaF({DBh^4TL*f9k#m>A;ZNo4BX4OnJA62A_hK2 zn`YJ&`{S)+W@yD-5N+j;EmbE>XKjuTA)twAtZ>?%RK;qRGAZ2a`-FmTuA)j$!;@ip zlX0}&9pw{BtUw5i&1HAHowRM!h=~SP&nyxfKv*s0jvHGXI_)+GkJyF6MU;Kfkj-(+ zOb_=h8y8{01e)F>$`T;+n=J1vx^T{mH9#jm0{*vI=o6Zd@9~ zEZG$UZYc!*STohwg*%Fs{jK7(55qspBB3VFx2#cen_#&`;{G%q6~ zHo)QqCnv31kk4Xf%UvQBTv*DOi_HdFE3&0H@WY-aOV6YB%{f_E(w-AdY#~jp(t?c#ZloEI_y|6>da)!c3*;fH@x@3}-92)gqU*c{$tH>-2ke8MWkw=7?G$Jy;IqtK7eM#VImD1J%P@XrCIn=pnF2k(k97FO} z{JSXIgw_3w&55KX5%_H&OyVxy!f*4((R43x&n~PM5iWdbJG)V7PzL{34-P8QGk@J{ zm8iACwT2eo=$B*(&KO){xi;5lP)njr0dBGX-PIiWM;gTL6lmOMhN3Xj3b^v%#PeqH zQdnuGl;@}Xx~pahQ^8AGL`&IX7CNZ#q*3&87$v;0tD-PNI?;COX0DL;Puc^`6xJ%8 z7>aA;=V@CjDN%tGFiFQR%n;Z2@$xM{ijg-#!)s^L@K<&BM^pwF< z2bY}`9-b|2XkzV4XYmMaXKm z4A>Q7xaH{^+4`TJ&Hfl1Gxm6-r|)T#@Txb?Z0~3c)+((ts8Sniqc%(1c$jT@dfpC} zUTa!bJsopx?Wj{YeX`Wvai(%=&A}$CyTigG8z#CMS)R6c3~X4pVNH&pWrIrx&c@oo zouzHImZrxtPh?|!wdQ-uaJ5&Sw{30dw7i^pCKFa#6IOGVr>C*Qa$xgBo0a#{TKr-* zUe%`Tw7K#WsSMp&SzEbs8N0zxPPw~a*;1Xo@|E^;>G3O<>DJP4>x`8r#apMZJViej zsm9XNmtl!6_bQZGx|ll4sB_YafeTCLc!pPqU0>h9USw8TmkplEg?xuX!?fWYjp0JzN&Mub13aRGQF4k2RROO?&}<))Wb_stMj1MIoR2sPG1p$caEmCb3iRlUzO^%&a*LiSq&&Qeq=>DeM9Hy^t(F` zTgi0#n(6m&|6ZLxqygT;Fz%z9eN;Zg(A4}Pn!lO;-lL%%p)vLN0K;Yk57EL6>GV6P zc7NxA>8p^TfzBP8rHzupM>-EMK?Z%ebHJLps&l^@*9FGApT_rg4$<<%)7Q_se@Lxr z5Vy?!lzHd3I=6T3?A+S9v2%C+tT|V2?0l&6k+l0ZnL89^biMt-^rb4}h2xXw`GxrO zd46TKC(t_|W*i#DZJm9c8?y(|doIUE%F~|f@%goEO{MpK{&afJo!BCA*vv+g0WpL4 z#u()OboyGTb;I=4%L6lk{dd6uM>_Y59mQt*p&Oh5$8^_J15j*#=P9;q7{NpQe|2Es;-q_iyDHJd>0m!K5-(6H*&Zlc6zO_GU$>1%G-r(& zib6c~mr8GF2%_FS(D_iubeKr$qrMLYf{D5{nx-rT0|sxP90Wm0#8HGD3VxdZf9w&c zRYo8V(s)ImE2JPGrqSnK-I4mq`cj5aF9R^Sxvg_|=L7t@t8;f&p#NI|I-fw6-`DvF zQhi(D)c~D4seg0lgPmLB3j&G-qh^u6Y!2=`-x5%4!_%fe(W?Sr!CSw#_d}h}J?i%b zK=?!ANudxsU={-o$ezpY|M~zBdUxm3C2;dOl;4Nx{w8Q@#Ka6ikt4=ZhyVuhK#)o} zMurDTcwqWH2pK1Rno%jUdlJ6;=F9$(=V<(Zgz##992ARAUme)me`2vCe@e}mX2^`D z7^Kwms)9JgJDBV3osYo_ciC*EYv91EK%J{mgkk3V4(O&8g^k^iGI#YV{7CB<6T8^@ z*d=%rMoaIfZGPFPx?g*c8K+E;LOWf~!+z*+FZh@IKI8&^IJ4lAreFn8$DG*U4@>x? z0+TA=OFc;-ay<_nbP$3`QV+=#h#inurW3TRO{C|Q3t$t;!lAky)9rsb^@JZov)D=6 zCaUhE)<;y}XqZC@@+)qeWnlTTUzm`)U+&~Z0%7x z!R;~D$73@BN<(qsYAR!3r*AoS_q42u%88;45NL)OWhaZ>t6QC$y4^DBEFvApV|*}j z{>ldv(A!|$k99s>d{F^}IchjXLg~x6M4Kv#5vPCAsq2-u+SuZ_jP9oA@oM$S68V-ma8n zLPpaXkBI$2jEv8f`XyB&k6(l~i!+ZGMs((qC~2l{ftf{b!G{rhTTD{tf$kopGG>ih zF29-jNCA+I%4A;n`}uncEOePLZHiFmPV>h4;XT64Uh1PyY8!{*@nrGPq* zEU?nINP~9c0!}iCn(M_S#+I{3W+0!gIp-KJ|mc0s78uR0dB=7Xa}Mydm>W;8Li zq%lh&;#5+_k{uREnHh=8nVrMN&rlx6)a(g(cb0|^qEM;k?L4v?Tu^h$kwaLpPeK33H3>@mtl*nspjghA2 zN?qafml_b#+-A_hB15?Jy``YUMRKtA2AycQ$H4}_B`wdG6$p$bG90V)bo32X$5N~r zg*l~3y~9SRFy$!s{UNd%bmT9z=~gu`jImkn!@+ur_=E#{(Me3K^kAKjBbfwax*QQjWu)wD~x0>oZ7aW@KmSsqd-? zCQ<{m1Ol#Imth03;e}WIhyK_bJSpki1!l0RFs_Whkyj{1sdFf{&0dftM#sMn&Qh^f zNzs&&LUxxh;MlEN2XcywmXoHb`#zH@tW+L2$Qg70Et)KGCG19M7^#^@vBv8?QM4S| z%$-=Bu*T%h+N`Tk(bF}*Ctt+!WilKOMUXI*^1CyA7}+IpWS3LW`?{{qN68P-KtV~M zRMf96chRi*-GN0>6mr)k_wF(AQ)^W>a4JKr9xXtzgj42CVc0zfMS&bc51XXkZflO+ z-LU+pC`XO-j^B3ncJ83BxV|k;!IO^uL21^|&C6!~LFa^^`Y7x8@@qV!)>BToRQBHD2mz zis)5tx`GbIEhZKLWDNRcgWOCUG>rFCJcat!IrC5+9U(M|yGW{Ok$x{lj4q8PSn4?)7}lomuy34>b?nlcTxUoSs%dNKsqNet#g&>U45Av~dwtGTM>|z|KER)*Z7o&)(%Q}xs@g4&(gn(Po>wfRtSny`7ZWap5QYy58 z9Yd&0|J`QKtH$WPa|CUF3r*h3;n@LW9hwlT_GzNQUC4}`oQ3pzd-s{lD_z1C5nUS` zKsAtvv&?&_1ZHvl;*Jvv`ODp+^I)_H5~EQ|f{%pvy!Dh}URjn)qMN6Q3d>VUz=U;c zwG#AF@Ki!)y$vB2;u@tqh+w27Y=P4lN33cWvZ$5mazXkVtZA~MY(_cI9w!SGDT60rPX5y4q!MvG9LOxyFE2oC3Ml1QgNAss~ z@XX{f1ZA$&VvJb!W5>-Jgk)t*HMt_=4u(-44W@CXI|l;L3`Li;uOlo6b7qEZ##=ee z>3VeS>HSS3^RD;BPwD-RUwj}uC@D9-r@Q@OcY8?&9uyD=xB(qz8 z{2%i-a3^e!4VX5MBbz+yprQ;*X8nfzbLt!KDRO6YT4d%hjdJWXVOF8c6)J8pEZA(6 ze1UQ8J(RyVO#ako!z(X;p|b(=xrEE5F3<+e;4z}MJ}FZYcLv|wchDxXxh~46Jqwd& z+({?P`?7M3h-1hk&A|T5?lCGkAFlh8BD2fV^})d~VN>9P=ULRGhg06o*@qfZGTp8R zF19&Zim>tE6;R@I5PZ$`?#|AgFua9uTL19HLmWtje4h98Cv+5q`fZ$LoX5vdOG~(q zrJjWGvDKv3?V?TRfQ3y=(;{{;6j?;6G&4BaRk>=#w17NmIkr~x09L~?O(A*jQIZ8U zSS+Zg%5p7jr;ZI;i+>8q)hh}65R=@%IHXL2XYSn7JDPYmSPZ3_*n%5kBC$%452q3G z;TA}tvsirAfy(i}iNPH#wjpf9c&Bep)!CveH54A)x=(5C-6UodzUviJ-t# zX&7Nl+w8}rn%L~~zFCG5rsFg$xiWpd?6Od0sMQi!*V|KN(3uKdSjLp~p+ai5E1#=P z4QA&K^Z$d)UHj4ZveyWX6sd$XdGE7`5U;H=1cgCrK#EcoZr!i7?6@(?Msi3}1kYd} z@IJKpU9`3h;GA&P!-yQw7VJa{dI)4Osj>zPs`wgLwgOVSb05qQ!mfGbq6|$8IP9s& z(s7%T&RvlWh*?6P!AlZH=NTskdsX4dqeUXNG@iQ#N@W!vv(S8{o3#{}#g?517aJ0t zRdAQUyLJxVJTU7!VQBysanI4CL1hKtDN-~t5y4wSM8$p#f}IFKVnxw=U@@`vK?bV* zk70rXni+&p9){Ehno_EIJ`aWF<$LJ86_o@^NK2y?p zw|73yUhliD%1xbXF6N|r>(&Pu{`_>5yS2(aN(OCQ^sHHC$)nkJpGhBdNq`Io+eICr zrt|}rg>cjhREwEQd3Fk@k-K~WA6s>d_PX*0VltzEmTTB-05X*uF@bjFoTc4N6UVIq zGqOT*Hb784rMuC#_&Ybn}782Q4qFPW3pVH3dgKA6(Q z2R)`6QgOi+fj+~M?N~7Mo5qng2r@%!wrwxVeKFF#>P?Im)k)S} zl!UCXFxJ&Tc!nBOdQcf&PE2>;5=K^{&)7i^Lx_Pb6V}zH(ZwId9?b0z=x4gJ*4kr> zF_iu3UQc9TJp7|HCw&<=n$cyVwo+&M`auzy8Jk+o>7QAh{?pM=<0fA4V63U_Rp`2& z+4p%Pau9j#L}cJbO|>vXe>y_AMfxrjjZ&MxCt1D6HzoJ32hSjes5v7FpV7EzV~h`0 zKrV`)^WcoN=I|zEl@leb4pWE&?BB*6pjoD<{}XX843X1a<0>|di!QcM9UF+j4e#+d z7eqPNIC&qmQhH#H zk%J;S$p%W{Thj1?W>sTA{12xIQ^j`eZOw*5_LfkX zmBdH>NUoz0j3cZ~jE$}=?z`Tpl0BX)Q;_nKH<#_LQgA2c;~70L6%Ca1mk}NnD)E&w zlD{-sI{tn1ZN@H-u72u0cD-_1o!+gX^qIu5rhpbTx8HFeqd{>7(g{9^&}rG8Z^8+t zquWJKyAjl;`(9iWjpG7^G#uoljSQ3TyG+9HQ{Ft2s~k!kL9-Qd>V|=@nOd zSOG6RMp2eEkSiBQKC9@OpJK+*yl+z!!Hh&ZBPT&hHVn!gY}i6eluC6{YR zMWkjt)iDo8Qw~g6ST;2wR~hF~818WxBFE)#*0ywtbW2{zMYbURFey9MX*90+Vi3&- zqF1!xhnZl$3BhA|Z-Y{DV!?u~TuE)h<`nMoDlDOrzkbwetU80uB;>PA>rm?=rH|nGe~Ey#wEe_%Jt#&d#`cH+Jsi(BnsU zckZ;;g!cr++vgSg`fJ1~TCn4tY%zzu!?@iN$Y5_UG3=d)Sw6&qb9>vkBs_nJ-2^kZ zw&5vtU6PABOFt+X(`7PkcuulfVraH#NZTtTmx-BKH1mNy=h2-K*2~RN8y})0Qz&Lf zE&8M(3{4D)Jm|%X4~~MyCBCk9A5h5A0`tm$w;xsY~;J_E2i8|}? z$o)O&ubl%Cj1tp*z^0q+1(F94*HL_9h%5TJlsuD_+MX5TG$p;E&~hls|^hbc8u{v zo#F<_hb`!tjicf;X6>v`A5KU*6XQLq?t&8s8|RD~a<{@_*08utC$fm{=xSMX-*D-9XnFH|}fgEyshFz?QP{+q=WH3Q6%`jn$0EBhLgpzxn zPU{JK5zqMKrKsdX$iiTYGfZ*`dKA5g$TX~&;sLy4o6L;2%g9fVpKKwYq*M%F#D>vO z_%gZTttgti28}jCTPU$a4c|zN+&Lp>uUp|J!Do1fy%^TUA-_W@5ew1T;t6Fa2#ZSr zDH<|$0TLh>(j6SJLbPUkqHbaka<Yf_Xut$BeMWEc$4!+x7gD{6iroXE$8r=bBNEt zSw00luJ|o%1UGIWkT#D`+;3j|Uho!t7j;v35>6R^)R#NmqPP<#45nYaB!wnz1lvhR z>1i5EEQ)V%dhK2P(Z%ui^=lN)=e(~UYDuunto70O&T-k=M2xhUMPkw=ehhbAx>?AQ zw_orgp$NTo?TFR>PqCi(%o85{JnJ4yB7U~FjY4DNTVphBJ4BmwvtTABNX)$y^M}@K z96VqKeYDfl6Kcp{G>RQBetA1XB|yv93!kGji?dGnddZD2n;iD5a~PVSP*b95hjFK zaekLo)}}tGDpyS5>j#WZ8*gAh!;x?dX=CrSMdm`}&Z6aBreMG8Y#mw#M+%%7%f9z7 z7j`m+a=lC^^vyBA;@BKPk%MRRg^I(-JqoymVR{Ja11`FR&h@rVXVeg{xk~b6fr(W< zyF#quFcWBL{njM7!}oS0coX*Q-o z;DY@0RPIfP_>Q)D6%$^v5GYe~p5M11NZZ)Ey7SE*Vi%P{jTj><{6SBL?aAFf!ps)v zRR+wL`|Y{Zo*F!IWZ&hGiL!z$%>(6-i5gNyv|*V-G5h^SYj)x1n!48+Qzg^guux!W z`!I)3-*l#0w&f|2JQ&!-a*p@;=Lf`W_PvH&eY47ZFA_4u9o?HftooD*S*avZ^4g4sz zf(9bRD~Z%Snvh16;u3x3Mp9HNNVkGt*`@!)lR0|wjy!3HEE_UqYzhs@tC141(VD+X z?-?)HKuoWjo$cSga5&pU@HOSbnK+1v>>XO}6L)nw+t_;_cbS11^U89(%$!dDF>5TY zBXg{{4L57T3?n$242$~U!OfUZO?yZr#L5(Xo+j7A4%Pa1A%x~i zF#jxzbc{{Mbc}Y2C{9ww)vy3%S+!WG5BCH%^zV9zDf-r6a9s|pJ<%wAeu+KVIBT_n z8aQ?t@=o1~*mVh$&tplxev$<^W+_<#G&~yy(PJTZ#G=XU^A|dp4{;=2N`S-_=7oa} zv(09^y!|I- z1=c+ggj^NnA$mZr&ukho*<<~)vrKcy*&s$Q2Q^|y1VAlin$OrHi;gIw1k!92WKc27 zB?&TxC~;-t3LE+aX$V00o_3papkUBR>k=3ub+LgA zwJc#F4^;>ZLWh1BL!{GA~_TcdiAPIS<-erB_ z+BcVV0-4-48F!01E($?RD6z0}cjv~1d`_V@g3DZNx*wVgwjtMKV9~!M^jNDOua3J1 zc7&J2nBgSB0g2>rC>Lx>ElYEvE*K>E51HWn^>#U)^}!(LT-%S~Wa*Oim`FX8eLm+G z_iZAkY94o=w2r<`;-l|L&_&NcG)3CtX>b&R)FPSPBHm>)zxb(@Uwj~m88A6@3Z%nE z+JLO00xsy&%utF#?o=qF?3)Zx4q`z|fQnNOqjnU9-y)@8%83Gtqy`}2eN6ty{JxV! z4fTsxi)yk?dJzWy%xD(DE)ZTr%jdxul}wi#;r7P`nGU#+F~)4)RqEWScd(JI);nNy3l`Ke8TY1Hu`-IVgG}mLxU*D^YL=j9C~?C%{MIJ?)^As}H7aI$z`kz9Xk)Rn`)zs_1DkT2z4^Yy z3!#$fOvB^D-bj9-%WK!eglKM|2E5DrFm0&4_K%pLVl=|1vaHL3-i$9UHa#Iv$5&&p z3ldl@btw(0fDqf!LzH6}R8d%O_UC&?&JMW>$da0TPk^zRO$)BL*>~&BCo4YkUwC2Y z?%wq|n~>!Sv=UTst%{~iI86CSmvLp^VTj#m3dU4|%za&jEcP|8nMkt%22&~rSKhK} zTZo84anBkIXt?$mkOeV}<0vi-KB)LvhDckxF*RLH!RMrb@q5B19H?@&zHHO^n1~?z z>9S!6F@Gk09?Wy37AMkn_Ksf~wDINk)xQ>|cH**`jZj z9nHLFdxNL=`e^>qvN^^=mxiH?_Q9{y;&O47nD7i`Kt}hA4;bzyoD!D`XNQXqTGBegy zpfn@O58@;4v;>|Mk>!`8X(TH7fsK0IE1J8!k)Qis&Tof$V(U2jnw|gp2BnVg>cRY7usj+=HR^U zwoH!{gkRL|UhLuV3tQcpYkbj|#Ei0e>@XYs%=F*p=LcnWKZuOkL$@I|>R2~i=j`7d&32n5)|5TIGumq7Yc>HPF%sHjY=K;TP zh^uMS_U4?38)?e3!p9sea|SWmF?SDrn&K|>VVfM71rO6?&X3xkQ^j^XAXx ziDc$WVL3bs(;0(l6QQ8E(?yPTHX(2y^8(bsO6_y04*3LA^0H@|iAfZF#GHaYCP;@} zPZhYj!fh&25kD_)ImO3)kO=eInkzneX)Qx#- zH~CGNBRrK`m{i`Av^=~mv&D>hup%n>YobIheu8IubpEG!uIX-0G`J|A(*O6;n1s~~ zZT3uK$ii>lvaY>h)rE;(LXv$|a)gft^8HC|Q{mHw{snRQFZ$4`y@V;PwI_!vjda11 zlyGmxHGMXcucGor%1QsSxW34$w=6d*e3ex%R=!}>mW}H+p0hkXx7--v`_Hu<`ZO$` zWuxS-2A^)XZ*Z#5W_g!?fwbAWxTb(_}XQ82cOlQVzNVf_(bnOVvoOY zg-`Q>#7Vx539+&-#7|UeV|>(`PYZ)pCkJR*5UVx$wm7ZwJxxC3yvx2+b*z^3O;B%0 z2&SbC<=xduk`19NzF5i^W+(MgcIe|D`}Gg=f>K_KV|BLbtBHk@L+w#M^=Jg;yPSpM z@Ss&N-h{<*dZYw6-$bL@s13FNs?5(GcK?DMwq31RHf@`4EOAw zyR6oL@93QKJ>hd~pVolgfW$Q(q*gmP6ifrvg`AT6uwQ$vKNONSvb%c_Tw_XTLN;hi zf9Kv-E*H7hJV0}J=CW6;yE}Tk+Jb;NX%ACqwl2?b4nR;8i#EIJ~8q3-NNu6{K7X-fiP&mi3bHu<^#J%3$(pBkUfOlQs{#xb5j7S|){H zSy$gXxZh(0^M>dl`y^kFHKBi7PEl5;w||#wl8;BIZcWR@>RQp3-I>v!tyB1hhPk>8 zt`Z#KZ%~m@ic%K3zLi<_e5gb{7TcBxIYWUhoLzVJgw~$L5SKjf!K1AZ9GYV3+({!w eFMHVzXwEjT6`J?POq6JEr}Q6Ww;a$gm)weu@08O3Gh=m z38vj5#0a<$-U;_XwPqCdhLgGokpVq04Q_&|LWIR3I=3tq9DA4p<7+ zhby3(zYC_rX4ng!hdR6t`@w--h3F4UpavJfBDfK%4ZRQhVP9ONlgvOztc`-bpjvnu zRE8Hr<(Yl30KNm~KzowKN?3vZOSls1EY=6U0*Aw2L**HJHzBHEJ{$)3z$4ffXX(s> zn^SN%{2Y#kuI@rS0C&Ml@Ee!||I))+IJKv>;mL3SN<*c9vG2)Gj#!n2U@iynO~18MLk^f9m_ z90yehN+D+weyBpTCN{pOFaB2xy&W5{^Y$+EOsFPK;i18WF+L4BoG>7^#rsf&?h-76 z-$Lc`i5kY>V^HPPRjA(gVK+ou_#r06ivD5iWG^tFT-5}XE5C*+%hSj>yeArz) z?;lXP{2Mq6CK0C+KJdV?=mxt~p1KBA$kN$e5!?#doA?B(YPbf^!%Rx*0_?;`Dr8?k z(n*BBrt<^~cOA@2_#9u&;KiOS7J*;G_3-o%5(_?%O=Z9Yhn0+vz{BVgvXm$pYHhd{ z=AnN8l}B$Tb1@+t@NW1pyhqjlPC8VS_%oadzk(Cs{lkbq+yW=Ti%^|BH`m(WQkaka zA!KhN0e>?^)~`Y^E#c$43v$GWj9=geinWJr;oCj z#&Md^ufVhLXINLsyMjxh4xWIs;Rpr~z->@%{9fWR1kY}T4d`!=7UCnga0~}lJ1xc^ zkHY8RbSCy{g?JaT zwCH+2r4FaWm{5wR92k6?P9I)en`m7q-Pv{!eKK4N--JX(+=rXyz!mUjcpj?I{S7J? zUx(zYD5BP|Dcn#QJ^(ks%Ww#+n__Kr{}lYMK0L<&-WF+7EjpnCeG4Rf;vJX{zk@;8 zf0}hOZh>#0e*sxSygJ=-y={iIkyoKgx-&7|K2wON&<8>GB91BlpP-X4%gWyO;7`!M zf~uS*KVW%e6I9jl9>mKc@*p8W@5yA=5-XjSCw>dF(LaY-u-8NUe=u(XRQl`XmM1U6 zMD+CV!`4MI3~py&226@0$)Jj1oXa}#Cb%2jHizpM?uCR=jH|H9u^#Tm&;_^-u5(-W zKvI?Efnktgv)#s%e{(ZL;cnKLS-YysM$J&DzH*UjA%p{&IiOD01tC?;ww!0rSYH88 z3l1l0kwplpWwu9RBtm8~CtJG8f9vmaDI}52geg#iG!@gKW)DxqsNh2uBb|}1ND0y( zNkdflR8#q)a-|>QK~j+p$bHCc#A=p(u>eh#T1(UEB*YXI@3{yeH?v;FQ8gDrC7Slx>0!1}JVzkik-o?hL^VI6F1I9P3}W6?necXm>M{R5d%@nwXhbzq!Tj^7hJ}c# z3@^f!-r7`IsWu*2$}V z|0=)h*C6}!k0cgonISDJD@&nB8?DKG={afl)Ox%%T5ZVVuhPa(nxR$sYrUR1+9G!_ z#A_KSoS#E514Dj2AqXAylLBn-`qsl z6|4%i+Ej{Z(Hw1?8#3os%yR|X=9-#0*&1(~U1rX%4hAZit^A9l*`&*l_Z0w9Uqw~EBY{ri96Kpc85LOC8c%`m$`8 z*hOxgSZws3WQ()sWQ~;l%Eoqa=-Iit!=Yu5%F7)o17*F-vPbCZm!mmy@^W+U%FfBo zjxTkEYV_$rmp|ln)dYfh+CUg`6w>E5($?IpyH#V%0=bkvwp$VJEW&Or! ziDr+bS4TH$X<2E5jnpSc+hgw^+PqDs*E{5?`i3F@W0lH-%TvNF`9KDa(>TIYk*3JW z$T2-~jDt5vAJ?Ogv5%vX$O~&L4hd+G#C&XW@UD)mCpMH=OPW=1yQE+#GpLE#%M<*ZriG%wpF96BCqjTBXK%@!;02r)4JmK z=C!R>*0Nf7l^!|8CQn8mCxgjf<#qhg?lx*&@B0(2+v)$goO-JZ$GV+b60Id8)eV)W zIU~n7r^=3IGV>t%DK@(nZ>=`pG)AA%|I>9UYVoqUUX%Nu&M@BGw#a52-oDNzmpy-7 zcH7%s=Il&PXm@Ctv^Q0L=}VHwcNEAqJH2x7?i8cf?wmMT-;iQl`S~MuxwRotUU{*D zadf|7H!i)B8YlPr(q-MDEL)?o@6cMCty%tkb5EJsv{=q>ikB}n9W>4z-VrBnIT|wJ Vj}_bG$P+td;;CDWWzEy<{|0M(pceoD diff --git a/po/uk.po b/po/uk.po index 250af48..baccfad 100644 --- a/po/uk.po +++ b/po/uk.po @@ -1,75 +1,115 @@ # Ukrainian translation to findutils. -# Copyright (C) 2006, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006 Free Software Foundation, Inc. # This file is distributed under the same license as the findutils package. -# Maxim V. Dziumanenko , 2006,2007. # +# Maxim V. Dziumanenko , 2006,2007. +# Yuri Chornoivan , 2012, 2013. msgid "" msgstr "" -"Project-Id-Version: findutils 4.3.8\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2007-07-03 13:55+0300\n" -"Last-Translator: Maxim V. Dziumanenko \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-09-23 15:30+0300\n" +"Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Lokalize 1.5\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" -msgstr "" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Не вдалося зберегти робочий каталог з метою виконання команди над %s" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Не вдається закрити стандартний потік вводу" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Помилка при зміні каталогу" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "не вдається створити процес" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "помилка очікування %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s перерваний сигналом %d" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" +msgstr "Не вдалося ініціалізувати спільну таблицю хешів файлів" + +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "помилка перевірки бібліотечною функцією fnmatch()." -#: find/find.c:205 +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "не вдається отримати інформацію про поточний каталог" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." -msgstr "" +msgstr "Не вдалося прочитати список змонтованих пристроїв." -#: find/find.c:385 -#, fuzzy, c-format +#: find/find.c:443 +#, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "Попередження: файлову систему %s відключено." +msgstr "Попередження: файлову систему %s нещодавно було демонтовано." -#: find/find.c:395 -#, fuzzy, c-format +#: find/find.c:453 +#, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "Попередження: файлову систему %s підключено." +msgstr "Попередження: файлову систему %s було нещодавно змонтовано." -#: find/find.c:491 -#, fuzzy, c-format +#: find/find.c:550 +#, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -"%s%s змінено під час виконання %s (старий номер пристрою %ld, новий номер " -"пристрою %ld, файлова система %s) [посилань %ld]" +"%s%s змінено під час виконання %s (старий номер пристрою - %ld, новий номер " +"пристрою - %ld, файлова система - %s) [посилань %ld]" -#: find/find.c:528 -#, fuzzy, c-format +#: find/find.c:587 +#, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -"%s%s змінено під час виконання %s (старий inode %ld, новий inode %ld, " -"файлова система %s) [посилань %ld]" +"%s%s змінено під час виконання %s (старий inode - %, новий inode - " +"%, файлова система - %s) [посилань %ld]" -#: find/find.c:693 -#, fuzzy, c-format +#: find/find.c:752 +#, c-format msgid "failed to return to parent directory" -msgstr "Помилка при зміні каталогу" +msgstr "не вдалося повернутися до батьківського каталогу" -#: find/find.c:980 -#, fuzzy, c-format +#: find/find.c:1038 +#, c-format msgid "Failed to safely change directory into %s" -msgstr "Помилка при зміні каталогу" +msgstr "Не вдалося безпечно змінити каталог на %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -78,8 +118,8 @@ msgstr "" "Символічне посилання %s є частиною циклу в ієрархії каталогів; у каталозі на " "який воно вказує, пошук вже відбувався." -#: find/find.c:1097 -#, fuzzy, c-format +#: find/find.c:1157 +#, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d level higher in the file system hierarchy" @@ -87,19 +127,25 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" -"Зациклення у файловій системі; `%s' має той самий номер пристрою та inode, " -"що й каталог %d %s." +"Зациклення у файловій системі; %s має той самий номер пристрою та inode, що " +"і каталог на %d рівень вище у ієрархії файлової системи." msgstr[1] "" -"Зациклення у файловій системі; `%s' має той самий номер пристрою та inode, " -"що й каталог %d %s." +"Зациклення у файловій системі; %s має той самий номер пристрою та inode, що " +"і каталог на %d рівні вище у ієрархії файлової системи." +msgstr[2] "" +"Зациклення у файловій системі; %s має той самий номер пристрою та inode, що " +"і каталог на %d рівнів вище у ієрархії файлової системи." +msgstr[3] "" +"Зациклення у файловій системі; %s має той самий номер пристрою та inode, що " +"і каталог на %d рівень вище у ієрархії файлової системи." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "попередження: не відбувся перехід за символічним посиланням %s" -#: find/find.c:1386 -#, fuzzy, c-format +#: find/find.c:1480 +#, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " "we already saw % subdirectories): this may be a bug in your file " @@ -107,53 +153,61 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" -"ПОПЕРЕДЖЕННЯ: Некоректна кількість жорстких посилань %s (видно лише st_nlink=" -"%d але вже було видно %d підкаталогів): можливо, це помилка драйвера " -"файлової системи. Автоматично включено параметр -noleaf. У попередні " -"результати можуть не бути включені каталоги, у яких мав би бути проведений " -"пошук." +"Попередження: некоректна кількість жорстких посилань %s (видно лише st_nlink=" +"%, але вже було видно % підкаталогів): можливо, це помилка " +"драйвера файлової системи. Автоматично включено параметр -noleaf. У " +"попередні результати може бути не включено каталоги, у яких слід було " +"виконати пошук." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" -msgstr "" +msgstr "Не вдалося прочитати список змонтованих файлових систем." -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "невідомо" #: find/ftsfind.c:259 -#, fuzzy, c-format +#, c-format msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -"Зациклення у файловій системі; `%s' має той самий номер пристрою та inode, " -"що й каталог %d %s." +"Зациклення у файловій системі; %s належить до тієї самої частини циклу " +"файлової системи, що і %s." -#: find/ftsfind.c:444 find/util.c:214 -#, fuzzy, c-format +#: find/ftsfind.c:444 find/util.c:222 +#, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "Попередження: файл %s має режим 0000" +msgstr "Попередження: здається, для файла %s визначено режим доступу 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "" +msgstr "пошук %s неможливий" -#: find/ftsfind.c:599 -#, fuzzy, c-format +#: find/ftsfind.c:609 +#, c-format msgid "failed to restore working directory after searching %s" -msgstr "Помилка при зміні каталогу" +msgstr "не вдалося відновити робочий каталог після пошуку %s" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Не вдалося ініціалізувати спільну таблицю хешів файлів" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" +"Використання параметра -delete автоматично увімкне параметр -depth, але -" +"prune не діятиме, якщо увімкнено -depth. Якщо ви бажаєте тримати все це під " +"контролем, просто вкажіть параметр -depth явним чином." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -165,7 +219,7 @@ msgstr "" "є залежними від позиції (%s впливає на перевірки вказані перед ним, а також " "на ті, що вказані після). Вказуйте ключі перед іншими аргументами.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -174,7 +228,7 @@ msgstr "" "попередження: ключ -d застарів; натомість використовуйте -depth, оскільки " "він є POSIX-сумісним." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -183,17 +237,17 @@ msgstr "" "%s не є назвою існуючої групи та не схожа на ідентифікатор групи, оскільки " "має несподіваний суфікс %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s не є назвою існуючої групи" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "порожній аргумент параметра -group, потрібно вказати назву групи" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -203,7 +257,7 @@ msgstr "" "типовий шлях: поточний каталог; типовий вираз: -print\n" "вирази можуть складатись з: операторів, ключів, перевірок та дій:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -215,7 +269,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -229,7 +283,7 @@ msgstr "" " -depth --help -maxdepth РІВНІВ -mindepth РІВНІВ -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -244,25 +298,23 @@ msgstr "" "ШАБЛОН\n" " -links N -lname ШАБЛОН -mmin N -mtime N -name ШАБЛОН -newer ФАЙЛ" -#: find/parser.c:1244 -#, fuzzy +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -" -nouser -nogroup -path ШАБЛОН -perm [+-]РЕЖИМ -regex ШАБЛОН\n" +" -nouser -nogroup -path ШАБЛОН -perm [-/]РЕЖИМ -regex ШАБЛОН\n" " -readable -writable -executable\n" " -wholename ШАБЛОН -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" -" -used N -user НАЗВА -xtype [bcdpfls]\n" +" -used N -user ІМ’Я -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" -msgstr "" +msgstr " -context КОНТЕКСТ\n" -#: find/parser.c:1251 -#, fuzzy +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -270,12 +322,13 @@ msgid "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" +"\n" "дії: -delete -print0 -printf ФОРМАТ -fprintf ФАЙЛ ФОРМАТ -print \n" " -fprint0 ФАЙЛ -fprint ФАЙЛ -ls -fls ФАЙЛ -prune -quit\n" " -exec КОМАНДА ; -exec КОМАНДА {} + -ok КОМАНДА ;\n" " -execdir КОМАНДА ; -execdir КОМАНДА {} + -okdir КОМАНДА ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -286,12 +339,12 @@ msgstr "" "http://savannah.gnu.org/ або, якщо у вас немає доступу до веб, надсилайте\n" "поштою за адресою ." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "помилка перевірки бібліотечною функцією fnmatch()." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -306,48 +359,44 @@ msgstr "" "можливо, '-samefile'. Якщо ж ви користуєтесь GNU grep, можете " "використовувати 'find ... -print0 | grep -FzZ %s'." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" "У аргументі %s очікувалось додатне десяткове ціле число, але вказано %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "Система не підтримує пошук за часом створення файлу. " -#: find/parser.c:1638 -#, fuzzy, c-format +#: find/parser.c:1633 +#, c-format msgid "The %s test needs an argument" -msgstr "%s: для ключа `%s' потрібно вказати аргумент\n" +msgstr "Для виконання перевірки %s слід вказати аргумент" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Не вдається визначити, як інтерпретувати дату чи час у формі %s" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "Не вдається отримати час створення файлу %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" +"попередження: -%s %s нічому не відповідає, оскільки завершується символом /." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "неправильний режим %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -359,22 +408,22 @@ msgstr "" "зараз вираз не відповідає ніяким файлам, але скоро буде змінений, щоб " "відповідав усім файлам." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "відсутній аргумент у -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "неправильний тип '%c' для -size" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "Неправильний аргумент `%s%c' для -size" +msgstr "Некоректний аргумент «%s%s» -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" @@ -382,75 +431,90 @@ msgstr "" "Параметр -show-control-chars приймає один аргумент, який має бути 'literal' " "чи 'safe'" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "Некоректний аргумент %s для -used" -#: find/parser.c:2671 -#, fuzzy, c-format +#: find/parser.c:2607 +#, c-format msgid "%s is not the name of a known user" -msgstr "%s не є назвою існуючої групи" +msgstr "%s не є іменем відомого системі користувача" -#: find/parser.c:2678 -#, fuzzy, c-format +#: find/parser.c:2614 +#, c-format msgid "The argument to -user should not be empty" -msgstr "Аргументи до -type мають містити лише одну літеру" +msgstr "Аргумент -user повинен бути непорожнім" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Увімкнені функції: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "" +msgstr "некоректне визначення -context: SELinux не увімкнено." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "Аргументи до -type мають містити лише одну літеру" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Невідомий аргумент для -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"Підтримки -type %c не передбачено, оскільки підтримки символічних посилань " +"на платформі, для якої було зібрано find, також не передбачено." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "попередження: невідома послідовність '\\%c'" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"Підтримки -type %c не передбачено, оскільки підтримки черг FIFO на " +"платформі, для якої було зібрано find, також не передбачено." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "помилка: %s наприкінці рядка формату" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"Підтримки -type %c не передбачено, оскільки підтримки іменованих сокетів на " +"платформі, для якої було зібрано find, також не передбачено." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "попередження: невідомий формат директиви '%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"Підтримки -type %c не передбачено, оскільки підтримки дверей Solaris на " +"платформі, для якої було зібрано find, також не передбачено." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "" -"помилка: директива формату `%%%c' зарезервована для майбутнього використання" +msgid "Unknown argument to -type: %c" +msgstr "Невідомий аргумент для -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "Поточний каталог включений в змінну оточення PATH, що у комбінації з дією %s " -"створює небезпеку. Видаліть поточний каталог із змінної $PATH (тобто, " -"видаліть \".\", або двокрапку попереду чи позаду)" +"створює небезпеку. Вилучіть поточний каталог із змінної $PATH (тобто, " +"вилучіть \".\", подвійні двокрапик або двокрапку попереду чи позаду)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -458,9 +522,9 @@ msgid "" "entry from $PATH" msgstr "" "Відносний шлях %s включений в змінну оточення PATH, що у комбінації з дією " -"пошуку %s створює небезпеку. Видаліть цей шлях із змінної $PATH" +"пошуку %s створює небезпеку. Вилучіть цей шлях із змінної $PATH" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -469,97 +533,107 @@ msgstr "" "Не можна використовувати {} у назві утиліти для -execdir та -okdir, оскільки " "це - потенційна проблема безпеки." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "У виразі -exec%s ... + підтримується лише один екземпляр {}" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "У %s має бути сам %s, але вказано %s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "Оточення надто велике для виконання." -#: find/parser.c:3603 -#, fuzzy, c-format +#: find/parser.c:3269 +#, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -"арифметичне переповнення при спробі обчислення кінця сьогоднішнього дня" +"арифметичне переповнення під час спроби перетворення значення у %s днів у " +"кількість секунд" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" "арифметичне переповнення при спробі обчислення кінця сьогоднішнього дня" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "стандартний потік помилок" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "стандартний потів виводу" +msgstr "стандартний потік виводу" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" -msgstr "" - -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "Помилка при зміні каталогу" +msgstr "не вдалося вилучити %s" -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:718 #, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 -#, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" -msgstr "Попередження: не вдається визначити час створення файлу %s" +msgstr "Попередження: не вдалося визначити час створення файла %s" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "Не вдалося виконати запис до стандартного виводу" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "Не вдається закрити стандартний потік вводу" +msgid "getfilecon failed: %s" +msgstr "помилка getfilecon: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "Помилка при зміні каталогу" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "не вдається створити процес" +msgid "warning: unrecognized escape `\\%c'" +msgstr "попередження: невідома послідовність '\\%c'" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "помилка очікування %s" +msgid "error: %s at end of format string" +msgstr "помилка: %s наприкінці рядка формату" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s перерваний сигналом %d" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" +"помилка: директива формату `%%%c' зарезервована для майбутнього використання" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" +"попередження: за визначенням формату, «%%%c», має бути вказано ще якийсь " +"символ" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "попередження: невідомий формат директиви '%%%c'" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "неправильний вираз" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " @@ -568,22 +642,22 @@ msgstr "" "неправильний вираз; ви використовувати двійковий оператор '%s', але перед " "ним нічого не вказано." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "між '%s' та ')' очікувався вираз" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "після '%s' очікувався вираз" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "неправильний вираз: надто багато символів ')'" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " @@ -592,126 +666,128 @@ msgstr "" "неправильний вираз; очікувався символ ')' але він не знайдений. Можливо, " "потрібен додатковий ключ після '%s'" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "неправильний вираз: порожні дужки неприпустимі." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "неправильний вираз: очікувався символ ')', але він не знайдений." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "оопс -- неправильний тип виразу!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "оопс -- неправильний тип виразу (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"попередження: для ключа %s у таблиці визначення ваги ключів немає запису; " +"будь ласка, повідомте розробникам програми про цю ваду" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "шляхи треба вказувати перед виразом: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" -msgstr "невідомий ключ `%s'" +msgstr "невідомий ключ «%s»" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "неправильний ключ `%s'" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "неправильний аргумент `%s' у `%s'" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "відсутній аргумент у `%s'" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "надто багато символів ')'" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "неочікуваний зайвий ключ `%s'" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "неочікуваний зайвий ключ" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "оопс -- помилкова типова вставка оператора 'ТА' (and)" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "Використання: %s [-H] [-L] [-P] [-Oрівень] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [шлях...] [вираз]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "не вдається отримати поточний каталог" +msgstr "не вдалося зберегти початковий робочий каталог" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "не вдається отримати поточний каталог" +msgstr "не вдалося повернутися до початкового робочого каталогу" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "Невідома ознака налагодження %s проігнорована" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "Не вказаний аргумент ключа -D" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "За ключем -O одразу має йти десяткове ціле число" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "Вкажіть десяткове ціле число після ключа -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "Некоректний рівень оптимізації %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " @@ -720,7 +796,7 @@ msgstr "" "Рівень оптимізації %lu надто високий. Якщо треба дуже швидко шукати файли, " "скористайтесь GNU locate." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -729,64 +805,385 @@ msgstr "" "Змінна оточення FIND_BLOCK_SIZE не підтримується, на розмір блоку впливає " "лише змінна оточення POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "неправильний аргумент `%s' у `%s'" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "неправильний аргумент `%s' у `%s'" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "Некоректний аргумент %s для -used" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 #, c-format -msgid "command too long" +msgid "write error" +msgstr "помилка при записі" + +#: gl/lib/error.c:188 +msgid "Unknown system error" msgstr "" -#: lib/buildcmd.c:311 +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 #, c-format -msgid "can't call exec() due to argument size restrictions" +msgid "%s: option '%s' is ambiguous; possibilities:" msgstr "" -#: lib/buildcmd.c:381 +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 #, c-format -msgid "cannot fit single argument within argument list size limit" +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" msgstr "" -#: lib/buildcmd.c:387 +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 #, fuzzy, c-format -msgid "argument list too long" -msgstr "рядок аргументів надто великий" +msgid "%s: option '--%s' requires an argument\n" +msgstr "Для виконання перевірки %s слід вказати аргумент" -#: lib/buildcmd.c:640 +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 #, c-format -msgid "Environment variable %s is not set to a valid decimal number" +msgid "%s: unrecognized option '--%s'\n" msgstr "" -#: lib/findutils-version.c:60 -msgid "Eric B. Decker" +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "попередження: невідома послідовність '\\%c'" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: некоректне число для ключа -%c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" msgstr "" -#: lib/findutils-version.c:61 -msgid "James Youngman" +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" msgstr "" -#: lib/findutils-version.c:62 -msgid "Kevin Dalley" +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "Для виконання перевірки %s слід вказати аргумент" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "не вдалося повернутися до початкового робочого каталогу" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "не вдалося повернутися до початкового робочого каталогу" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" msgstr "" -#: lib/findutils-version.c:64 +#: gl/lib/version-etc.c:251 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Зібрано з використанням GNU gnulib версії %s\n" +msgid "%s home page: <%s>\n" +msgstr "" -#: lib/safe-atoi.c:76 +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 #, fuzzy, c-format -msgid "Unexpected suffix %s on %s" -msgstr "неочікуваний зайвий ключ `%s'" +msgid "invalid %s%s argument '%s'" +msgstr "неправильний аргумент `%s' у `%s'" -#: lib/safe-atoi.c:82 +#: gl/lib/xstrtol-error.c:68 #, fuzzy, c-format -msgid "Expected an integer: %s" -msgstr "після '%s' очікувався вираз" +msgid "invalid suffix in %s%s argument '%s'" +msgstr "неправильний аргумент `%s' у `%s'" -#: lib/regextype.c:107 +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "занадто довгий список аргументів" + +#: lib/buildcmd.c:161 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." +msgid "command too long" +msgstr "занадто довга команда" + +#: lib/buildcmd.c:301 +#, c-format +msgid "can't call exec() due to argument size restrictions" +msgstr "не вдалося викликати exec() через обмеження на розмір аргументу" + +#: lib/buildcmd.c:371 +#, c-format +msgid "cannot fit single argument within argument list size limit" msgstr "" +"не вдалося вмістити аргумент через обмеження розмірів списку аргументів" -#: locate/code.c:127 +#: lib/buildcmd.c:377 +#, c-format +msgid "argument list too long" +msgstr "занадто довгий список аргументів" + +#: lib/buildcmd.c:629 +#, c-format +msgid "Environment variable %s is not set to a valid decimal number" +msgstr "Змінну середовища %s не встановлено у коректне числове значення" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Дескриптор файла %d призведе до витоку пам’яті; будь ласка, повідомте " +"розробникам про цю ваду, не забудьте включити до повідомлення докладний опис " +"найпростішого способу відтворення проблеми." + +#: lib/findutils-version.c:55 +msgid "Eric B. Decker" +msgstr "Eric B. Decker" + +#: lib/findutils-version.c:56 +msgid "James Youngman" +msgstr "James Youngman" + +#: lib/findutils-version.c:57 +msgid "Kevin Dalley" +msgstr "Kevin Dalley" + +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Не вдалося виконати запис до стандартного виводу" + +#: lib/regextype.c:110 +#, c-format +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Невідомий тип формального виразу %s. Коректними типами є %s." + +#: lib/safe-atoi.c:81 +#, c-format +msgid "Unexpected suffix %s on %s" +msgstr "Неочікуваний суфікс %s у %s" + +#: lib/safe-atoi.c:87 +#, c-format +msgid "Expected an integer: %s" +msgstr "Очікувалося ціле значення: %s" + +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -795,8 +1192,8 @@ msgstr "" "Використання: %s [--version | --help]\n" "чи %s most_common_bigrams < список-файлів > база-даних-locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -804,85 +1201,83 @@ msgstr "" "\n" "Про помилки звітуйте за адресою .\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "помилка при записі" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" -msgstr "" +msgstr "Використання: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." -msgstr "" +msgstr "Вам слід вказати рівень захисту у форматі цілого десяткового числа." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" +"Рівень захисту %s лежить поза межами придатного до перетворення діапазону." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." -msgstr "" +msgstr "Рівень захисту %s має неочікуваний суфікс %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." -msgstr "" +msgstr "підтримки рівня захисту slocate %ld не передбачено." -#: locate/frcode.c:289 -#, fuzzy, c-format +#: locate/frcode.c:295 +#, c-format msgid "Failed to write to standard output" -msgstr "стандартний потів виводу" +msgstr "Не вдалося виконати запис до стандартного виводу" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "днів" -#: locate/locate.c:193 -#, fuzzy, c-format +#: locate/locate.c:186 +#, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "Аргумент для ключа --max-database-age не повинен бути порожнім" +msgstr "Аргумент параметра --max-database-age має бути непорожнім" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "Некоректний аргумент %s для ключа --max-database-age" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" "база даних locate %s містить назву файлу, яка довша, ніж може обробляти " "команда locate" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "база даних locate %s пошкоджена або неправильна" -#: locate/locate.c:893 -#, fuzzy, c-format +#: locate/locate.c:860 +#, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" -msgstr[0] "Розмір бази даних locate: %s байтів\n" -msgstr[1] "Розмір бази даних locate: %s байтів\n" +msgstr[0] "Розмір бази даних locate: %s байт\n" +msgstr[1] "Розмір бази даних locate: %s байти\n" +msgstr[2] "Розмір бази даних locate: %s байтів\n" +msgstr[3] "Розмір бази даних locate: %s байт\n" -#: locate/locate.c:900 -#, fuzzy, c-format +#: locate/locate.c:867 +#, c-format msgid "Matching Filenames: %s\n" -msgstr "Відповідні назви файлів: %s " +msgstr "Відповідні назви файлів: %s\n" -#: locate/locate.c:901 -#, fuzzy, c-format +#: locate/locate.c:868 +#, c-format msgid "All Filenames: %s\n" -msgstr "Усі назви файлів: %s " +msgstr "Усі назви файлів: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -892,8 +1287,14 @@ msgid "" "\t%s contain newline characters, \n" "\tand %s contain characters with the high bit set.\n" msgstr "" +"Загальний об’єм назв файлів — %s байтів.\n" +"У цих назвах файлів\n" +"\n" +"\t%s містять пробіли, \n" +"\t%s містять символи переведення рядка, \n" +"\tі %s містять символи з великими бітовими номерами.\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " @@ -902,17 +1303,17 @@ msgstr "" "Деякі назви файлів можуть бути відфільтровані, тож ступінь стиснення " "неможливо підрахувати.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Ступінь стиснення %4.2f%% (вищий ступінь - кращий)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "Ступінь стиснення невизначений\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -921,7 +1322,7 @@ msgstr "" "база даних locate %s схожа на базу даних slocate, але має рівень безпеки %c, " "який наразі не підтримується GNU findutils" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -930,7 +1331,7 @@ msgstr "" "%s - це база даних slocate. Код підтримки цієї функціональності новий, тож " "можливе виникнення проблем." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -938,7 +1339,7 @@ msgstr "" "%s - це база даних slocate з непідтримуваним рівнем безпеки %d, її буде " "пропущено." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -949,38 +1350,38 @@ msgstr "" "форматі slocate які мають не нульовий рівень безпеки. Пошук у цій базі " "даних не дасть результату.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s - це база даних slocate. Вмикається параметр '-e'." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "" "база даних locate `%s' у старому форматі некоректна, бо є надто короткою" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "База даних %s має формат %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" "База даних у форматі з кодуванням машинного слова типу little-endian.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "База даних у форматі з кодуванням машинного слова типу big-endian.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Тип кодування машинного слова у базі даних не очевидний.\n" -#: locate/locate.c:1400 -#, fuzzy, c-format +#: locate/locate.c:1372 +#, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" " [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" @@ -993,68 +1394,69 @@ msgstr "" "Використання: %s [-d шлях | --database=шлях] [-e | -E | --[non-]existing]\n" " [-i | --ignore-case] [-w | --wholename] [-b | --basename] \n" " [--limit=N | -l N] [-S | --statistics] [-0 | --null] [-c | --count]\n" -" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap ] [ -s | --" -"stdio ]\n" -" [-A | --all] [-p | --print] [-r | --regex ] [--regextype=ТИП]\n" -" [--max-database-age D] [-version] [--help]\n" +" [-P | -H | --nofollow] [-L | --follow] [-m | --mmap] [-s | --stdio]\n" +" [-A | --all] [-p | --print] [-r | --regex] [--regextype=TYPE]\n" +" [--max-database-age D] [--version] [--help]\n" " шаблон...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "не вдається позбутись групових прав" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "не вдається позбутись прав setuid" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "Не вдається повністю позбутись прав" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "не вдається позбутись прав setgid" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" "попередження: базу даних locate можна прочитати з стандартного потоку вводу " "лише один раз." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" -msgstr "" +msgstr "помилка під час виклику системи визначення часу" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "" "попередження: база даних '%s' застаріла більш ніж на %d %s (фактичний її вік " "%.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" +"Попередження: базу даних locate %s було побудовано з використанням іншого " +"порядку байтів" -#: locate/word_io.c:143 -#, fuzzy, c-format +#: locate/word_io.c:145 +#, c-format msgid "unexpected EOF in %s" -msgstr "неочікуваний зайвий ключ `%s'" +msgstr "неочікуваний символ EOF у %s" -#: locate/word_io.c:146 -#, fuzzy, c-format +#: locate/word_io.c:148 +#, c-format msgid "error reading a word from %s" -msgstr "помилка очікування %s" +msgstr "помилка під час читання слова з %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "Некоректна escape-послідовність %s у визначенні роздільника для входу." -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1063,7 +1465,7 @@ msgstr "" "Некоректна escape-послідовність %s у визначенні роздільника для входу; " "значення символів не можуть перевищувати %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " @@ -1072,7 +1474,7 @@ msgstr "" "Некоректна escape-послідовність %s у визначенні роздільника для входу; " "значення символів не можуть перевищувати %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " @@ -1081,7 +1483,7 @@ msgstr "" "Некоректна escape-послідовність %s у визначенні роздільника для входу; " "невідомі символи %s наприкінці." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1090,61 +1492,81 @@ msgstr "" "Некоректне визначення роздільника входу %s: роздільник має бути або символом " "або escape-послідовністю, що починається з \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "оточення надто велике для виконання" -#: xargs/xargs.c:561 -#, fuzzy, c-format +#: xargs/xargs.c:559 +#, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" "попередження: значення %ld для ключа -s надто велике, натомість " "використовується %ld" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 #, c-format -msgid "Cannot set SIGUSR1 signal handler" +msgid "option --%s may not be set to a value which includes `='" +msgstr "для параметра --%s не можна визначати значення, яке містить символ «=»" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "не вдалося скасувати визначення змінної середовища %s" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" msgstr "" +"попередження: параметр -E не працюватиме, якщо використано параметр -0 або -" +"d.\n" + +#: xargs/xargs.c:654 +#, c-format +msgid "Cannot set SIGUSR1 signal handler" +msgstr "Не вдалося встановити обробник сигналу SIGUSR1" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Не вдалося встановити обробник сигналу SIGUSR2" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Не вдається відкрити вхідний файл `%s'" -#: xargs/xargs.c:669 -#, fuzzy, c-format +#: xargs/xargs.c:695 +#, c-format msgid "Your environment variables take up % bytes\n" -msgstr "Змінні оточення займають %lu байтів\n" +msgstr "" +"Об’єм змінних середовища у вашій системі не перевищує % байтів\n" -#: xargs/xargs.c:672 -#, fuzzy, c-format +#: xargs/xargs.c:698 +#, c-format msgid "POSIX upper limit on argument length (this system): %\n" -msgstr "Верхня межа POSIX довжини аргументу (на цій системі): %lu\n" +msgstr "Верхня межа POSIX довжини аргументу (у цій системі): %\n" -#: xargs/xargs.c:675 -#, fuzzy, c-format +#: xargs/xargs.c:701 +#, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" -msgstr "Нижня допустима межа POSIX довжини аргументу (для всіх систем): %lu\n" +msgstr "" +"Нижня припустима межа POSIX для довжини аргументу (для всіх систем): " +"%\n" -#: xargs/xargs.c:678 -#, fuzzy, c-format +#: xargs/xargs.c:704 +#, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "Максимальна довжина команди, яку можна використовувати: %ld\n" +msgstr "Максимальна довжина команди, яку можна використовувати: %\n" -#: xargs/xargs.c:681 -#, fuzzy, c-format +#: xargs/xargs.c:707 +#, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "Розмір буфера команд, який використовується: %lu\n" +msgstr "Розмір буфера команд, який використовується: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1156,7 +1578,7 @@ msgstr "" "Виконання xargs буде продовжено, команда спробує прочитати потік вводу та " "виконати команди; якщо ви цього не бажаєте, введіть символ кінця файлу.\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " @@ -1165,7 +1587,7 @@ msgstr "" "Попередження: %s запуститься принаймні один раз. Якщо ви цього не бажаєте, " "введіть символ кінця файлу.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1174,260 +1596,307 @@ msgstr "" "непарні лапки %s quote; зазвичай лапки мають спеціальне значення, якщо не " "вказано ключ -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "подвійна" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "одинарна" -#: xargs/xargs.c:936 -#, fuzzy, c-format +#: xargs/xargs.c:962 +#, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -"попередження: у потоці вводу виявлено символ NUL. Він не може передаватись " -"у список аргументів. Ви забули вказати ключ --null ?" +"Попередження: у потоці введених даних виявлено символ NUL. Його не можна " +"передати за допомогою списку аргументів. Ви забули вказати параметр --null ?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "рядок аргументів надто великий" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Не вдалося виконати запис до стандартного виводу" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "" +msgstr "Не вдалося відкрити /dev/tty для читання" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Не вдалося виконати запис до стандартного виводу" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "не вдалося отримати потрібний об’єм пам’яті" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "не вдалося встановити змінну середовища %s" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" -msgstr "" +msgstr "не вдалося створити канал обробки після розгалуження" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" +"помилка під час читання safe_read errno-буфера до xargs_do_exec (причиною, " +"ймовірно, є вада у програмі; будь ласка, повідомте про неї)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" +"під час читання було повернуто неочікуване значення %d; причиною, ймовірно, " +"є вадою; будь ласка, повідомте про неї" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "помилка очікування дочірнього процесу" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "" +msgid "WARNING: Lost track of %lu child processes" +msgstr "Попередження: втрачено зв’язок з %lu дочірніми процесами" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: завершився зі статусом 255; переривання роботи" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: зупинено сигналом %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: завершений сигналом %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: некоректне число для ключа -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: значення для ключа -%c має бути >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: значення для ключа -%c має бути < %ld\n" -#: xargs/xargs.c:1508 +#: xargs/xargs.c:1617 #, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Користування: %s [ПАРАМЕТР]... КОМАНДА [ПОЧАТКОВІ_АРГУМЕНТИ]...\n" + +#: xargs/xargs.c:1622 msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" msgstr "" -"Використання: %s [-0prtx] [--interactive] [--null] [-d|--" -"delimiter=роздільник]\n" -" [-E рядок-кінц-файлу] [-e[рядок-кінц-файлу]] [--eof[=рядок-кінц-" -"файлу]]\n" -" [-L макс-рядків] [-l[макс-рядків]] [--max-lines[=макс-рядків]]\n" -" [-I рядок-заміни] [-i[рядок-заміни]] [--replace[=рядок-заміни]]\n" -" [-n макс-аргументів] [--max-args=макс-аргументів]\n" -" [-s макс-символів] [--max-chars=макс-символів]\n" -" [-P макс-процесів] [--max-procs=макс-процесів] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=файл]\n" -" [--version] [--help] [команда [початкові-аргументи]]\n" - -#~ msgid "cannot get current directory" -#~ msgstr "не вдається отримати поточний каталог" - -#~ msgid "invalid argument %s for %s" -#~ msgstr "некоректний аргумент %s для `%s'" - -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "некоректний аргумент %s для `%s'" - -#~ msgid "Valid arguments are:" -#~ msgstr "Припустимі аргументи:" - -#~ msgid "Unknown system error" -#~ msgstr "Невідома системна помилка" - -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s: ключ `%s' неоднозначний\n" +"Виконати команду КОМАНДА з аргументами ПОЧАТКОВІ_АРГУМЕНТИ, додаткові " +"аргументи прочитати з потоку вхідних даних.\n" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s: ключ `--%s' використовується без аргументів\n" - -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s: ключ `%c%s' використовується без аргументів\n" - -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s: для ключа `%s' потрібно вказати аргумент\n" - -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s: невідомий ключ `--%s'\n" - -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s: невідомий ключ `%c%s'\n" - -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s: некоректний ключ -- %c\n" - -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s: для ключа потрібно вказати аргумент -- %c\n" - -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s: ключ `-W %s' неоднозначний\n" - -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s: ключ `-W %s' використовується без аргументів\n" - -#~ msgid "`" -#~ msgstr "`" - -#~ msgid "'" -#~ msgstr "'" - -#, fuzzy -#~ msgid "Invalid regular expression" -#~ msgstr "неправильний вираз" - -#, fuzzy -#~ msgid "Invalid range end" -#~ msgstr "Некоректний аргумент %s для -used" - -#, fuzzy -#~ msgid "Invalid preceding regular expression" -#~ msgstr "неправильний вираз" - -#~ msgid "^[yY]" -#~ msgstr "^[yYтТ]" - -#~ msgid "^[nN]" -#~ msgstr "^[nNнН]" - -#, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "неправильний аргумент `%s' у `%s'" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Обов’язкові і додаткові аргументи до довгих форм запису параметрів\n" +"є також об’язовими або додатковими для всіх відповідних скорочених форм " +"запису.\n" +#: xargs/xargs.c:1626 #, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "неправильний аргумент `%s' у `%s'" +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null записи відокремлено нульовим байтом, а не " +"пробілом.\n" +" вимикає обробку лапок, зворотної похилої " +"риски\n" +" та логічного рядка кінця файла (EOF).\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=ФАЙЛ прочитати аргументи з файла ФАЙЛ, а не зі " +"стандартного\n" +" джерела введення\n" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=СИМВОЛ вхідні записи відокремлено символом СИМВОЛ, а " +"не\n" +" пробілом. Вимикає обробку лапок, зворотної " +"похилої\n" +" риски та логічного рядка кінця файла (EOF)\n" + +#: xargs/xargs.c:1633 #, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "рядок аргументів надто великий" +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E КІНЕЦЬ встановити значення рядка EOF; якщо у рядку " +"вхідних\n" +" даних трапиться символ КІНЕЦЬ, ігнорувати " +"решту рядка.\n" +" (буде проігноровано, якщо вказано -0 або -" +"d)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=КІНЕЦЬ] еквівалент -E КІНЕЦЬ, якщо вказано КІНЕЦЬ.\n" +" Якщо ж його не вказано, рядка завершення " +"файла не існує\n" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s: невідомий ключ -- %c\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R те саме, що і --replace=R\n" -#~ msgid "block size" -#~ msgstr "розмір блоку" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i,--replace=[R] замінити R у початкових параметрах назвами,\n" +" зі стандартного джерела вхідних даних. Якщо " +"R не\n" +" вказано, вважати його рівним {}\n" -#~ msgid "level higher in the filesystem hierarchy" -#~ msgstr "рівнем вище у ієрархії файлової системи" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=КТЬ-РЯДКІВ використовувати не більше КТЬ-РЯДКІВ " +"непорожніх\n" +" рядків вхідних даних на рядок команди\n" -#~ msgid "levels higher in the filesystem hierarchy" -#~ msgstr "рівнями вище у ієрархії файлової системи" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[К-ТЬ РЯДКІВ] подібне до -L, але типовим значенням є не " +"більше одного\n" +" непорожнього рядка у вхідних даних, якщо не " +"вказано К-ТЬ РЯДКІВ\n" -#~ msgid "" -#~ "warning: the predicate -ipath is deprecated; please use -iwholename " -#~ "instead." -#~ msgstr "" -#~ "попередження: ключ -ipath застарів; натомість користуйтесь -iwholename." +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=КТЬ-АРГУМЕНТІВ використовувати не більше КТЬ-АРГУМЕНТІВ на\n" +" рядок команди\n" -#~ msgid "GNU find version %s\n" -#~ msgstr "GNU find версії %s\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=КТЬ-ПРОЦЕСІВ запускати не більше вказано кількості " +"процесів одночасно\n" -#~ msgid "GNU findutils version %s\n" -#~ msgstr "GNU findutils версії %s\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive запитувати до виконання команди\n" -#~ msgid "with a cumulative length of %s bytes" -#~ msgstr "сукупна довжина: %s байтів" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=ЗМІННА встановити змінну середовища ЗМІННА у " +"дочірніх\n" +" процесах\n" -#~ msgid "" -#~ "\n" -#~ "\tof which %s contain whitespace, " -#~ msgstr "" -#~ "\n" -#~ "\tз яких %s - пробіли, " +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty якщо не вказано аргументів, не виконувати " +"команду.\n" +" Якщо не вказано цей параметр, команду " +"КОМАНДА буде\n" +" виконано принаймні один раз.\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" +" -s, --max-chars=КТЬ-СИМВОЛІВ обмежити максимальну кількість символів для " +"команди\n" -#~ msgid "" -#~ "\n" -#~ "\t%s contain newline characters, " -#~ msgstr "" -#~ "\n" -#~ "\t%s містять символи нового рядка, " +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits вивести дані щодо обмежень довжини " +"командного рядка.\n" -#~ msgid "" -#~ "\n" -#~ "\tand %s contain characters with the high bit set.\n" -#~ msgstr "" -#~ "\n" -#~ "\tта %s містять символи з встановленим старшим бітом.\n" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr " -t, --verbose виводити команди до їх виконання\n" -#~ msgid "GNU locate version %s\n" -#~ msgstr "GNU locate версії %s\n" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit завершити роботу, якщо перевищено вказану\n" +" кількість символів (див. -s)\n" -#~ msgid "argument to --limit" -#~ msgstr "аргумент для --limit" +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" +" --help показати це довідкове повідомлення і " +"завершити роботу\n" -#~ msgid "GNU xargs version %s\n" -#~ msgstr "GNU xargs версії %s\n" +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" +" --version вивести дані щодо номера версії програми\n" diff --git a/po/vi.gmo b/po/vi.gmo index 504b3b3f827ee58e7bc1c03462c1e7b0eceead0f..3d9322fb734e7ab70c631a25e2674d871f8c412b 100644 GIT binary patch literal 42296 zcmd6w34EM)dFNk_1*}q_;l9cn8ey4ux@PtY2rD=9JWPZ zNt%`bAx*;3kftGVOqzzoBq2#@tWw&_q<5jay(m2p+b(T)yPs~mP`byb`~5x7|2<|j zK7i8Q`RLU%@B9AG=l|UQWB&ZCXMX%?Q55|t*IKR@JUfcsz=Oa4!6?%6Upy;{codxg zevM0?^IjB14*|~yt^$4?_|L%SzBr0L0DRU$WP1danQcuf?&33wCmwZKK-O5lG6z6bcc zn6?9N0=9ua3p@w-%CkNFML?Pym4GxUdJj-|`2_Iwz+VOK2mT#!2DpPt1fKxT0$=?j z;2rpWpiq1}a2@c|K$Z8WK>ng{^A8k6ucC6*|Hc6K0x3GWF2H+%1@2D(=|c1m;rUsE zQ51839`FL-Wx(eFKLWfEcm$|%`5I9D{WehfU-&xj&l`Xjala2JJbec?ZiHv|6&sD8cxBr$Z+#lRT2AE@?S2b=_cKEU`~ zaLoM;!0UkD05ZhU>}v1F`+?8p{^LOP=U$-3YYC`+y#u7Y5m*Omyzc{Q9R3V=9&mIx ziarN?H*g1V{hBDEis(9^=<^}q<-o524+Gx}!>Im8fo}zV3HTuJ`E=?E-~v$nc+q;t z-`j!zllyCdD(@iw)SgcRg`XuLsES@mV{QX(0e%YjhrlhsYtQ#_`DLK${VGuX_-Ei= z;5rJUE78qBh9Fu1-VOf$6Og7wH-L0d89fgC5b!U6bS1im%JuxGfix}pB2f7FHgFTL zFcL)#U<3Fr;9mgwi{8G$`}<+w%ej9uoqY*#cYqb3+IJmrBk&i1n}Oc~s{bQAd;zcy zRC(_M{s8cJc>Wad)!hG4xc?^bZ0?`M;64*L1bh~-0MzsIfL8+F0eltk5#Wn}zXKE< ze;ufFPiL?wDmn+K`$?e2`Nx5;0X_nZfnN^rzXL_LXIrg@MXY5yoA-FTY+ldabOJm8t`|4PaAc9{4(%t z?pIvG^)&hlRJ+dK>UgdKMJFxb^MIcOs$Iu`t4RNOp!)fZZB7sW0u=sVKIU{g3>1FH zfX@b2fNKA{fR_V500h<1*MMV`7r)Kv<(f-fUVjFtar!5q=;cSYJ3am=kfDvf3>2L{ zALe~6@O?n>!@ar_E z+Vi$Ou6M4Q;5*M>aT&A*ECb&O{6!#DL@(!|=x+x2C%_*E!b;J8I;nE+08&)6@(P## z*8&GA|1W{R%=3Y(&=tVn0xkldgt_+t-%BN%fL{fw{jcVs>VL+MMiHowt^(@*UZD8& zpMf>tf&I`P@GHRcfP+^%om>S}xiuk<;4t@> z1J?lG4-~!qJW%+0YYANf`~%>}fQP1>&!1a%x_C8E?RXQg0IY`lp9T(c|0Uok@S8wL zA=)tQa^xoh{5(){>YG5-KQ!a;3g8g;9{@u7(W5}o={JE}fzO^-2Y}I>%a>0B)sHU$p9}nR;2VMe1^5x*YpLWF zz$bv?z%K)Z*Vi-_W}aFx;ll`ejd%Y|(~P!in(q|4C@-s}Cl9=QJ*QS>lS{d@lPE*JI!Z|44|fZKrQ z{Fw7!4R|s4_XE|wzXcY7YZy$m?=~Q$8vPw`0=S#O`QO0%fojjEe!}gs-v-9q|21#} zaK-z5d`E%nxjzWp4156iBH-Tv%fP4K=yW#=d?oj{051YQ2z&wXzXDa>{{j9x;9EZ6 z@U1|}-BBQ@j^@JsUjtvp{R=b}~18(E~ zckl52z4WKO-7Vldc>W*|l8>H#XB0uI(ffdty8js;=Q8k3+}{RNIllpX4&|P87dnjl zSAG)O1iticr^B;>ytY09q8D=Q(-%IVDEg{>LyrM9&cgNcxY}Hw;yS=ZldRA015R_% zCF>)=bloolpRSwmxjOk0;Mu_4Tt~V7J=b%&@*mN|<6IlKgv)1gJLmwW|A+!nCthruI0Ly>m^+JJi+zzT%w&{ z;L>N1>pyU5{KXT=NAe~A`2;t=6&^6m_PHd$KL-9L7i1P4<66a)eD?6=SGnHB^Z;KFjs?@N6CMIpKRANDk=pDA(t?V0F`BmjM^J9^hKfHOr;X4{`l4*L%4}xn9Io z<`SLW%=H4U{ahdC(&tjHpR;csqxez2ui?6htHAYauFJW^Fa17WsfC%OKJ>kqlE=Q_bP&hR3TtCaD&v6I#|5^P13Kt^AWX{FFk8$bq zlMbTQ0e&XHwE+qo4&M(3I0yWFu9tJ2%T?sk=Me|yCw(A%7r2V+Ra}R3!{?n`&*6IG z-RNi<|FRb%m$>&Ll1!Sy)Tm%09u>)Tw2K`<%o7f8leC zcL{C3IJ^^m=-sd1lgT`_LC^jN&xB`vp3bFb=R#E5>`C^l!?X20&mQ2JXj-2n@1O8& z)E}7)*4GVODtGo?m&JOPwC$h5yT3TIr<~^WEGfUtv$7uWNuK>S&wBgt z44C5$o-9ol4U8TxmpbiAqaHV=iNYBf@~HpG?bxIJ6peTy>4J6mkW^Nmh?s90~8r&Ppj zac-_$Umed?%f(hXZqLv0Z?+tl>r;isbYZ$uEyoAS^R0HXaiBar5Dn}u&o!Fuc(Ow) z$$tS~NL8Pr1J%|=Gxg4Jqd9Y-QWi_XD1m>Ln<_eWYI;|v(oXW0L2tZy=Z+nl#<#>9 z;zHN`weOA3jSGzfS%Q4FsY)|@;W_hkHD3+KtK)XL z)#hGAlHh$H3dk$WmaB9Az3cx}r8QTjY$Fj%qwM9wpf1fi*KCw%TcK5Lv#$ zY_;!7Y8M50?YnmG+-$W=!sToC7b&UfT`_J~YF<)NB_UExl5I2@kv7D{C+|8U;Z{7| zY}8DOtTtiUYC|@~CIVK%)tWV>!VqR6-*R)~=53pHZ`urLs6?LBB#1-r5t!v-EiN|8 z@XA~fer2R4=i@Zb>eHh|BAYCSW+}Th$Jih;DlL&zD}Gm}fkYKyPZmoDTGe7}_Vfh? zBvtA&mb2QJsg#P&2|Y?z`bkIHerb#Kf6?f`s|IT0pi>(&K6<_;aLuz$z$}L@O z7j|3FRJGVNjBZD}q9|O6n3hfGy@5CspPjxFy_~24N^5sCx3i(L=3xam%gX{WjyL?- z*!Qx$y~$VyE>C23#>8_f4~37i!V)-G&Jz)oSet{o%LwUm3`^HVl!@VD&1ouoy;0z0 zp)y@4lYTxa!t5H+i}ILV0Ddq>_9Ry?SLT znvN9X1C&~q>T8CUE=y7u%34_LGqG6@XPVArF+(ubKt!q3Y6E+;S~&oD$93dKvr_UB zR%ND+upgY_6)z#c`V2Xy z7!+C@h{JslUJo^}-=@k3DKX1miOZsqAf*rmmZ(xkxnSgkS~Z}B!BQ9>(c4JeYB%s&OrPd^ zHFAm`k6@x!F{rwWi?KU9bab*DU!Z1s@ux|7;YLsDwi!(mEi!BwsV8G}$=D@3TR}$U z-v_$G-fGjHS}gwwpNv64D&lcXAuxuc)0e-efy$uvsRqu#_pu&v0kqX99VlZbxy=23 z^rtmnn`~5}b_~G--+e_4Wh)*Y9u~MTerp_U!kNAVyqXm-!sCHxQ=&0U#N{zn^5iZ&PP8s$<|0=L^dNZvIjE$3vViOC@oR5H+51BMLwao!RevFDAM zqg8kEFs?i1qB{$=hLh};D0!LZI%P}}$vfLKw)L_-yVoJQjqTy~scP1XEXDd|DWJi` z9mQ;|G~&VYhSyII4#q>Xl^Luw(fg#~WYs{ld0A@ScIp@}*z)kxmP8vc7Q6wkl33h` z@QZEY1f!RBqR3eY|^E16TV>>!arlJ@eu`z}9Swqgb_=rX&JTD%Ox0E5? zW;B`z%3?g%XjRNCNpi?knW206rVOI6WsJ=*@{D1YU1Mm;MNZKrMdMnU;bJxO@^i1I zJ5?xZs@a%BT~!W}W2T(X+A2<$Nzhw@Dq;+}Q({dWYBUc>a;E_WA-B<-Dw`2$=0|Em zAaJ@0kZVeur;*XId(Y7&Wu!8rj|nb6V`?Oh#5iEJRccn|2s)rZJO+hjb6`UfH^Tf@ zRLCL;$g!g0L#wg3Yh|epHIvFJ^-{GnC9O79hEXKvl5#`vOCygZOfU+g>5xJb3UZ;` zr#k2%D?MoXVQ-h)^|M9rQ6$7t>mX8PYI@8-><6Jt&f`A~5A0MhOw4O+V>wq346GnQ z!t$A?wL0#4f!4E7gse7Gc@v4FYeT`aB~V0RF4pps5nP+}NZ3EfIuZLZWC8U+ngMm+SrWWg%N*DbV! z+nr_e4VkTA(>F`A^Zy3TXc-P6>L5D$w__|WxpUg7~O9(igt`=v=6^)5~Y)k;P4z#JLDc&01If1Nlb=swb zLaV8J=owuor6Ps=vOt21;jTbpFc*q5G$&X;`5bgY5uT~#FRzvhX zZQ-hyaXr*}(C1O&G=7mZ6{{Wg8~$E0Z;;e-&Tu;`ph@!CT?I_0#`nL9!{1{S?IvPL z(kktaxXpdZlsK|FPKi)5Vvr&OGK3rHU~85MNkGv>WL6+Fis>GG*9X_lLvyWY_ zyfbTn=%_|W$fBIVuWChavtY-SSP(PJ14Nf%#nl?}*(TI#!HQ}F1o|tt;fmE(V?Z+!o-?I?GKv|5qf&$Dcx$dvpAz=5 z#3TkSwvE)>QEU@W=DCDk&W77rohrB)fy>nGdy3%I7&M%f1&4rlW5#G_V%SycGUH$m z1TLX`GGr#a`6xD3KvA+K&y9BWL3Xv1)FWw$r#d#BPOykA&9axsYAG;1PuQ+fI#8Wo zEtS)%NLP161M$}J%R(Q9qg_4~8y<&E3W2F*uWfeNKw?;c6)AQ&6-y6AfmN6 zI~?YA)t;QtFE0 zsb4k4in8}+3R|$w_;7e&AllOtV?cSJ=KA@^!+p|10O$=3OQ6X*W7e)<2gOY}%j9Wb z(`z{0?$E@HVPLY1QO|P*1LZ*>tMQgVN}`qI*L7rZ8L9W!*HHMLyyIiiIx_`|iU-Uk z>Mv8+sS@6xirfUM3McdN!3w4=4N-Mj28JOhdEzAvtV+y?2~t4dnmxj`FHga+MAw6F zWN!;Q6K$19uRQ%tH>%afA*y1~GeQlfvF8tye?BV}7d!2SW@U&wL%!IWbt6!s>T~T` z*P>w#FA0Yj=O3B{!JbGAhde7!Ph&YP=eSa_371zTc_?4A5bt-rw z#DvmOq-MNQ2K`Da zI8A;^oI+OmvfqLLM{|1{B#TLBc=;xrNc+zyepQ&IdvgUBWw%iA*%rAbpW4X?wlOkdzov#_*GsnSvw`v|KAnb(9NuOH6In zOAVC*$BFQ}@-TAkYWX|L*0*dLE3podYIqux2P@1eh6?jDrX-MhB7lRm6Ha-qSB)lBq&mxD-yXKWQ$nd2Zi~hzR7Qsf zdYB4Z;EC0?7hSB$1;LVY;8tWP9WvShHuD~|xDtSoL++z9Kbl)hz37#CE7 znZ{5owlv6M40i=|>t>PMxXW57TeH9RS~TA#w%?3 zecKXurDKM_NTf?eC)IA$6D2L{@uj z`Efm(v`3m#klNjsEDE6?Hf6GLT<@##xYF*iv8~hiEsYn6n$3j?rz?Zf)6sZhZlP2x8;J zmAgi>GHl{K!KmEAm^s+K!)D~6Q9$j~F;lxnedn%;v7O`lWW6TSS9|kDmEH_Qmv7oV zJ~qB}B;Kz1e77AD>VufJJ*zmfq{Vprvh8`drDUQ$)iG|6VGR>6b-x^qHpgtJ86_;O zASx2nQOZvuW3CVSk#h$QmoYV&R4PD+}f!vK5GJ zgVPG$U^+#Z2KiK@>{1O=<`AXn+~xI1R&bJn?KvDNYZi=Arw~VO&AFXv>M@vi8I{tn zWQNMeC2=tme$?VTgdS6KNVRvDn>4J;>j2;5idwc<0TveWLHsl2x)yCww!6IaJSh+! zgu5j-;YYq@x?|r!lw%KQ+bjm$>-=Letqh5-$Dpg=OPHw0OiAx^nB$;9#W1C)(V{rI zR4XGeV{EtPG&ViPAQXX;HA{lPcClJgbk!|8tSbvsHl~X6C&?|w!<04`3S$HYBCYY8 z&1z~!5itYqaQa&j1F%xUf|(jOgqWCAf8!JZX10J<)`R%MLgkT-6&wthJUp0Iyp?9t zfHZfY)AZhyrWI*AB+W`tJ^9`u!beCnD_2@&xlJ2ME1TP$i~_oaIYl+Cgg*wx<|+i^ z!deH0|3D;6L~i9qd0UUcT5c3Za3bp=)`{Y--Bk zPh3P4U!IwT%#!d@WZU;)my+;ICXmcX zGb$k~E+2CZinAsu#E{{IyQm7=Up+WDSX!yJGtlMc!N4xl9ZgC|6+|$H18g`uAg4$-Q*KKsBL`w{rpPBsmI3&>NHe0ZhBngYDJNeYBH)7Q z+l(~&JlYVC*=)Phk}w1|%rhv)Pz9lzS{dobIM_NY22{MP)h|p35BDw5S0_0}wLZly zd}TwTDL`_PYzZ}YHy~6iiI~)idtGj_Si5D$k*P%E0PHoX?I{8(2pSIu8XF||%P_Ga zi`YrXAhYJx-M;;i1!f^7Q-{b8A^-}ju+U3ET<0RwgY?my%^=>ik|(L!Osd>a%KgYB zGF|pbizIp04GY1rK6fPEGrFA>@P{Q4gv>B2nN^YHvElDyNhz9BB%XnE6P1~9B3)Tl z;29K#ET|4TtU2cP~2@k;7ulh z7zKs1AZ_Z@hNud1J-Gf6Qveo4PI-c&4Icy!wX`>BF{;uRrYpWfWD|}<1=H)Zqu!Jm z+4y>%p~0zDr%gqIKp-q2B5I9*vvx5`C02_OYG?VqR3-S-EUzMRvNPZ`V#u}_)EUPX z-K`o4p5jnEdd05Y@hY61v;8Xzltm8qI5x13g6+$CQt7!KP?Nr{59Nf%jox$&sU=Hu zt`6Dgjv=W~kOv+NUu-8yGf-?x4zN-}RMlsxWd`?@LeDmc84K2y? zT0mK`O2iVvVCDBJZJXdmGe7KaurO;_aV}XnFo4snWe)xF5`0e9;3igw;WpQVR*KvZ z2K9(TEYH(IvGMlNcZ_b|!vlhQip^#ZM)}-vF?+%Ok83=N;38(VeUaq=h!5XzLZAV6 zho>cbn;@i=Pea2!jjM^mG&5r0W4dK(O};aw4P}s7Jx8Y z$QxI-7<5`~4j$19xrYe*ydpcrD^oqZw`g1fb1Kl}9$vP{huUCVTPnXnGZcyVvnMWT zj8otv*x7epb?Qvkxt5iSYkuR}z-G~*#Nn1e;Ln_HNg}HbNjje>!*r1*o>K4_*9>R* zFRQakGtozoX{%%NAyWVks7;y>)6@YAewm30bB0xr%85~}xWkIX5(KwkO zl6lKr^IS4{;Qw^iJ}XG1;7QG@1a)0Y8mTo)Ym}8lBrLdu4)j?qVT!1wq>oE6ViH6N zQtGp;xK^&6=n@hd70V#AkSKV0!ecUF#ymGJUOx813Mq>j3LizE1;FT%N>*@a+E;<) zu&f$;?IMXuTO^6Bbca+MXcP|B^AeVFzQOWpWWCX1@h8l}%EzK%{M*lADyJ zQ53z~i8a!-_zxa#R$sc7=iP{au$toPcglT8o79!$Bm|J977r0egqYMKBEK2#Q-^(Z zplYSk(gIMP6_6U#nQAUVti&8c@K*FYlrF;R-ea?dup|sW0m8)YqAlz;-;SntfqD+1 zweWDEOIz8ENMmHMf3)&0> zA%7%6>`iWr`}9yFOt%8A+&S^MS@I~%G?U8XQ~umVvzRGoB@IzhI+=wG%I!2ttQ=Yi zEgUM#&5%sAmAa`Z%->R!j2Z&zHl*HXbTgK5nFzd+WE;A+JRj= zCkmV4E48e!1>PQs*RNf7USaK<3hUkyuUj{={!QnuUAJ~E2@AVf;-d+jEZrLlYu{2> ze_p)qypi+Xa_-tUk#0LXQ3?~RWI(Ur!;Qof&86e_W6{hkE!b|%Pn|tGB6PFa; zoTXFEgv1J?VOn=2eltrgyBk}$ygaGJ5F_ygVLeN(!RSbhnRYC%QQOxXtPIb#Yt;(} zc2zq};}!M8`nwx=*`Bp8wRc@Z1te7aJj3258jT~G0x}n#%~LI3+O#QE?&HMKAx#8E!-8imX3cOMZ9$U3v+RMY2m&S?7MXQ$b7IyPTXc=Q(aoP zvCb|wULBi@4=&!5r1BTT@ujnik0TXoou!4_Bv}`aS>pSM>GQo7lkp4fLR;Ajg!AH| z&FyBjuw@mbJ+N)@sP+I`0h5bI2qiBq++K-?CYO#ss@RAc2i#PjT}8DgU&}Kvv8;@# zrG=Xap_1!6#D6q^4re9!;*rwH_m7{rb$H9t@q5O%W?RT7mX1HPt1vM(9_L=#{97_> zm~JJ{k|z7fb5D{@<+(>E+gZMSY2p3j+tQ8Y;WpVC9w)C8b6z1@T%z=OwyV4+XFd_5 zbmF$B9)VyOh^eLH53;af>G(Axl0SjSZ%QQq`Wo=w9fefvx^Tv!Q34) z`kY<7hi0jHchqM_wAoCb;AQ$v{=XW0gE#ml{NJU8qwvS#@wvFZc+Y&y{YNVlPUWZC zntt)v((zv!k5%jO&#{Qc2sf@RK2F|df<2b@q(sf*#fNAnIx=gatpT!0fvz3uT`d&v z-dPb>fsKPp3)g#3Zlk;bG!E-*tW0;1*eAMjwq0#iDbw zmBmlvh%OyJTJMhmg|@VdeSGWE!e;}xecTHd!RSsPnAOUEBDJ}LC_Iyvb+48ndLRz1pJVinR=8`3d(dH6IuF-p zuy}#(_%KrH3`T1a&D>l(h5~buE4|CN`#MO&<1~^6ORCUvy-}gi%jXr~u;Dn>9{ToE zk34mRhN zX!n4d2D4C6W*}GxPPN}2^(>=-yllDmQI-_Bb*x~Fb?LUHg-?z_702({892qLqAii; zlz93s7-i;Zu#H62suZKdfQhtA0YUNZGuW4pn0*MTUorkpcjxCtf_3G@t()>2^^-xP zU5_Fl(6)u`1{uiZ>Ug;%Iem{|nmd@0Gu4p{Aj(fd&1oV$O!Wmy@`$K=;U*g~6tV9q zVJ4t=3%|=Z+MW|CwvAuIkqU#R1}G=gavH2~stx^;mk*a{ia6rV5~G45&3dcbO!tSmld2dT-?4ea`5s(qfb9ni^p(@X$eZgN3Dvibn%EU z>!V;Rh&LKpp=i<36T^^HY^Hx|J}`f78pmu0$Cb>0d$3EC(^_bQd#WA(*b7P4{0I;p ziM^;2{2k8rIMt?qx3LmpGubDz(uQ>CFq^xz|9=v4iw~OUYZF~vJYuH+NL7}eIwGZV zH)1lA^#|x5)@Kr^H`xQ;=FGHV9ulX7Wk#-cQh5hA-)@9`R2vTKZV4^iLUjZX79Sgq zhz6WtjjVn%*?`7C_6K>AD?hYPx_t!glUTjT_|MG=tG8FaliHHDs#AGF`}%c1Qz(D^ zy1T5b(A%J<%y?H1U7y?~dqTDdBKxRYv2AttWSM3cAFFv<8h^$K@v6W00F`u?$^ip) zEAJru26Z39YmkuuaUUT_6SWtQF;D6`d~p3aEYTJV)HL1?u)%KKIV~DMTdnD)BgDlY zmjN!bTT&sTNzx5LEw?2F@5JAW-o{*(Qov#`jNOOfVgPTH0y5!p8iJ+Eb8b}kvaz`qD9Dy?d9pR(_RUS}8T}O=|ZWIwoWV+JM zk1{6}_!$DmBXzu{2PvDIyXklycT-lprRqZANt0%ho?gi_PMt419>F*ycZR{4Bwu!r zLFi~dCiHfRD*RA`QzXS^5-lUtigV?3RncyNl+vxb;K zfwOh27$*lIoFd=9RjZ(OJiy}*izS0~D3OCdYPQe+2Q93cUukBa`0DyvLf~nGbHeev zN87Sf7974l9TzC6>IH~ItrO?rS60f(Yq$J5kA;xLX10AW4l9xr{q=@e_ z-}-1`Y2kBbeK1}RFtMAQ7EvN>G>da1(fSaWTeyuqh1_#$L{FAprVtVo)vC|To_L^0 zjB;~7y8`u*n2Ab^XC^t$u8MAgYUAd}+hKI-I#$ADE*A6c>;sA}?i(Y@lx-kBQv>pL z&@x22h?7%XPzF)Y5fj8=2&$_K2}x6&6+jGqUerGoe7>#%yn(2n_`Q#kWUu%!^5Bf%oR(XBAre;0CN@g5VbY zMz}OUsPvPJ3GcF*fvXMAQs@}HjAI%XmB2rmaCsWQ!}##vIqQH8W9l|~PS!P*v3_M1 z3*tC2dJW(8A`7!}beAJ&1PVMvY)f%K_c%BW#=D*urN#_h&IG7I_*9|)Cxu{b92g#$ zFhh)T76^#+NMl-u4IIwIAO&K#H-wTLj1k@{L?Un4T~=^)CqV;0I-@6r2GN4DTIJnf zQ@8aMW@5n1pd^qQLZ%{ca`zE-c1(tw==ACi0xv>b$*g4`sMD7btTyew`rg`*uh!T! z*u`CfUXdX`ZzC9s8DBsKkJjYfKs|UvnYgqOaxvqt`XeLN87}GDix1U;w-D&fXhvLZ zbN~ee5m}#6P+b8WMNIEP{W85Lx#;c{Ce>Yv_aAZRC$SEKWSSBqi)4dwg93Dt(iARr z1fS+GF&bQB3dQop`7|b7e2fFcK!DYT*fF=l;shxBgzPCWZx2vpP!C`svA=sQU^!RI zHcjDdv2+GHK{EDrOr?@6z`Cld#^u#f{9sGPsa|ctojQ{YS(YwiU9s_Ki_f{4AF{kY z`W!-PVj5(e#7iIulO%cf+Qwz>U%$kW1n=rJl{3AQb1DuboS(!2?0k=Z^=^H~jo<{3 z?_VPV3!sS7?lV-f3!(7GSosX$p5b_jRhA9>h&Yt+a(<|DF#@SKsKEtY+5*=PUGJuH z)YTRB2tjjB5W%`Y<~RpPU-xUyDGw64)PxGM;z)nyO4u2(casbkQ$JX8Qe1kM7)KJ2 zdH(SBPP%wkyuf22%Ux}Ym&vpo@Ic0yXOzW*rDf(f#^OYmN5ZI}ndaOv>1%g}bx=tM zgHW}2g%%qUkoBUin>XYw#myA`K|M%9TRxP`6+63kpEt5>h}e-Si^QrxTMWmNlQ)1p z1b>}HKb$$2crVCVvouXJii9vpsSIB)wB9EvSz$gL+5Eo@-Ao31yYjXtS|n%v)@M*2 zts-U~GLFI%J2=)zV zxrRk&(jv_k%dM@U(?o8P|OzDHasCE-1}rhdFHP8Aq5fr!7|n-FHlC z6AM`4}EkQ-`-Gwj_piKin{oT^}!qeF-lDrb z@T(OEvX%Pgn-r1NXK*MgrudJ@(6`bYy-d~MWiY9yu6>+1>JIbbjj&Q$&85d&xJe{H z2YfO-4f-cGj_e4!m2)`Z;O)7HMzV;(&|z&irU^XYWS=(@o%8b6R_3~FpxuOE+p{MW zAIMp5petn<7RUJXJSX?$7D0ejoIPf%%y)5y$_=pa={(7V&v(UWa>-O6>nq~J7!q3T zX+N`IGz^X&O7V1v?bsJR|Nw6ox^$KVdCBB4qLs3Dbgy1A-EWN#!e}nB39GApQaRbRs)0G89Ap}i9Q3gv~+ z7LIK)N*ZKa1e2PK^L%_zdl<)>fV=IHo`G9 zoA+$lUT`DRt$iZ167iwF?z33>97HpqU7{;i93*I$xtjxF-Q0@&qPPJycg2d_YQcUL z_MT;9BdgO?ILk)PNUnJ+_Oji=WiC{^A6bM(>pI+~=jFb5s2^Xi8lWUU|3ise~;AkK=RKud0*h#+ok$J=&pS|d4Z++{g?Pt92|l&rKle!qu@ z@3(Y4N9lxQNhd5x@1Z&?hD7_xas^AW?2sMG5zj*x2NpkVNpj=7Vg*h>el#sX{umxo zm?Wv$n_a?r&sjVv9?))Pgj>q4<9V!*+{^5&o_HVcShqUM8ZD-=(MEU3YFN0_3dx<~ zV+qxgu;^_~Z^+p)w~#jz2%b+r*OP3A3a19qJ`~>R17K=o%8ax-&u3n^$p(DL;}3S& zn5B+m@q|^nqzJoM{FSBB;o#l;74Mx`yyHrK!(wUS!+tE$c3(Tack|-)n{5?pzx88& zOwndr-Wp%Lc>T_ic!wd~jRg!()(p5%)}ci`OC%e0ncA$34O#K}2`{J76P;t^3Me=3 z>3Vt>uo?_q(`To zo$TsXs*a>@aAGOJR;Wp_%TWG;>uf*as4FM+^og{q7!0Ndi$Nf=$kE~@$#ms+RD?MX z=np1VPF_eNgtRIkT_+l%6*R^?vD6^WFCTFGRrm@26iVW6|Mi;;)P3DhjH+Lj4Qqok5q62U~&yjXMbi4X_m6_yGOO#OM-Lh-GW zI+aPGhS8+3yaR?&UKlm2JOu0WFUciS%4fO2`3)I?c-Ot(eMeI~lAGB&?TRqi!Fu7< z4YTh^ID?jx`spc0E#Y{W40soF4ot%-WYcfHSbWQ{q5D%cu6XN%b%YiVyJRaTFZq;K zj;%fLrm!RD_b^UAx8FZO{%P3L?G7R*|JqpQ6UaI5}oa{3`Y_#X6X)4TYMgf6HHkM?hw40o~1e@kmelYKmut!L0w!0dal;Kot z5eO{YWMqsoJd_#;HJ4R2A|EY!8AH5Cr z1tAt%b2Aqv3>!O6=I=&$VcL^r9+?qE(sd)s6sK+$xh>hXI@T>ZZ+GMa32!}KiF!7y zEOYr_PYo0d8o4r~C0fUgSP+hhov}|bJ21)-+;c<}HE9c)k)rDf5X1UiiAL6>h$5}j z)o~WaOlQYeovdDu!N}tdIu$(kHjx^bUOefGt^w4>9O3!)iV5!}O|-cGt~KE5v^tzg zlq9X{_@If`n|e|x8l*F(6o_EZ7(bP8gS#l9(TShR-owb5wM#Tu+*`$HMldAsj)!C_ zQ7bFO7`SaB?T3q2vCSb$5s-aVzwxs`N!Q8@5%y!XWmxQ!kR68XDm}xLoKm$cC7rlC zP7kPZyy*YUrDaLcM7GT=?91xA)MFBTMs{rJ$TUr0kFKmKm*lt%+Dn&cyk%&w(yH(Gm0%O250Bo*>TBm7s(kf@fQ#L8yoSI%( zO{gL7PqMUV@mLqNF)$zJoF&;)(BhdQaYL8~RA`1!Y-rEvJK+s-J1X0132KpYVOBV4 z0@Rp>c4bT|UZ3h0TTLrjo|yg1hFL6>ryj?1GI~9<%r%g>PgjU`uP>F5XA6X^4PRU@%h-KI&wt9Y6_qgcf`GYc z6)02e;3iGr-a;{2K(nmT{maXjqhj(7T0c`YSjOr6j0PA#cfl01VwrjX-S$}igDeh! zD!R`NOPUBNvTi5Xk#r%%i6dXGv^*M_V&6oJ1TF3;r2H{Pb@As|N~z?ogHse>##4FktRcEH$om-+0-O*i8G3a7CTZzxfswieN*2hqdFk7}m^L0R^W$@bA2 zZ69FkjQaQ>Ln>R!M5q*iZOf(jig6e(j+D}~vxfL(v59R<3qQA+!^zIhZv1qz^j-4B z&L~T6l0(Uo`*2=aa?3Gh$yeSq(iX|s9Kf^gaz0Y>eU_p{d0n`I}hC2#zkHM>g+>N#aC zr0jpjT6pOvtfhU48znU~r?W&{N18SiISEAE@GeAJC>Xn$p51SqD9TrKhzg5p_0A;9Wb%ubjK^Ze;Sax6Y@SHPEVN&K;e z!bsTYTr%%IKOW8vJIo&rlXBBOZMA1WZYgF%V^4F!93AOFd|w+B0@J!bvoBf5&8;TF zwAe;;lO8nJHG-~wgv(O}Cv5qitu~Y2f!WD2YKWA@LaF1$U=!i)Dm$Swty0Tx^CF~y zG>4p|?Evs_SH3ReU^HPG8!GC6FKo`&2f#7el|u)R&9hR7=<3Of)zm7BGJ@Z30&GJP zcge5x@zX}(IW28WPZ`j<77b=@w@2F!tTG(gB84*{?Mz&M|(yP(#Mu zHo~||T~%YEAShGQGMs?7co&Ad_JqaG>bWEEtkmueOgIyu6g?+3=F+z7^g9dBiBTnc zHRPlY0}~?Go++DK1OM!46IG`uJ-mJ5YNqNYaQfEDasi9W!ke_tPZ!p!BaO0pI4bSiH6~j;N zDajy#qRHeq{YsfLmO(v*>EvimVzggj(9yRXAlS6y6O;B$@pI7SrVdP9_Um|d)}ww~ zus*etqrCmp<#1jh8AglEDnG`npG&Zx8&OqusCahZfAXu#xrRxuvg(vmWnpJaZU;yD zF9ztW`YYAKe&_l_HvAA?+?k`Z_Or?Zk;z`3a0Dz!tZ@h)M|h?uk#pku42MViZ&LUf zv!G=#$=2cwYYvzU$K=~dQ>QCQXHR-TLNF!mC?2lVFwH|%oQ#?LB8Pr}(fa5I!1|B> zS)M)m4YXX!@Z%a9P|knMB?teO;k!T8zzNf~2Xr51usR8iblFO&$Z!)v6w7G!9A&UM zzoNlr3Sm2~)yyk>L}c!O2jn9zbRt6V6by1=N~Epn6)v8$1IkS>yIh06dk#l2iCyL7$QW_XEMO`QLsAAaA4tV*z>ZL z9w+Okf_dyr!zi#KRR|$SY>~>m^c?D<3n9Si{iMaoqq`;1cUeIFG_|;<%Gc%9Y|gi< yw0JL@PuzND6wpm4IF~F#s40A7l-#}`_cPU{8==gQnTj5@X?<-P^>u**(f9({pw|-{0^5 zyxco?La3+hoILr>^F068-}~?P|No!)?rUEB*|VZ3dWvfu*Pr}o6rII`2YwvL{e!QJ zqL%_60sbbJe%|_O?two690mRs@c#n;7Whfv|9(vry#aXewNdnK;9bD&!0OpiG!FbK z@FL(@uZyC0051Wq2HphxAn;?rH|zcDqo@OXEAU+4VW7(YD)5cKZv)=~{A-}b@d`Tq zN#Mo6R{={vh7xsv>w$LwRsU(A>U{_JPT&uKZvwuRM%B-I0^AEMaQ_kD+ksyJo&)?H zU<~|A;HAJwdz=aXxU0`(}W@4=izi;oF!4@LnK~qBk=L zjrU^U%Yat_HSP(Z#(g(Xyl?{e9^iL?7Xe=zN6`%MYT&zpPXM0+{t56r-~%A%0^qlR z*8?@VLx3BA>i746?*;w^@CM*okbf!glR)9)8^G`DJy7j@8)B&cmk;~=w*rOF4*?GY zj{zS9Uh=Le+6w$G5Y$EQgqhUeWk8MlCg5J+JwVa(FM+RmQ53z6#`rZ_3)9>Wp05XL z9RG*Od>VMp8r}gP0rD#P4)A>7OKC*&-vHbUYyz9W$APy1&l%$#@NVD<;O_t-d2}m{ z!K%?c0iFPAd|wA{0{#PV3-Dr)ulauvC_a7+h&V>S5$=B*sQG<2-2WpGlt(XzDP9a* z3w#Oi-9SCx2%G@!1Bze13OpP5yFf@A{db_sy_m^q9Pa|^z6=yyKLJ#^uL5J>?+5rd zKu8sx&0s~Ri-C|VY621A=pNu3fDZ#T-me2+1N)CE!{x(6sc{w7d#|8GF?#kn;0N#HIZq8a^XpxXNjAgmI-31r8>_X2+h zcr#G*Tzhd8tvV};ehPRs_j?gGszk?t!sB;=qW>QQUjcj-#MQXo4jiT4TA=26<3`8p zEx;nH7cs&orFPkd1is{&C<2AiZvn+mufEptxg7|pqEo=12L1!^ z7lAiUIQ(5fct6h_4~a4k1{EZ<39o^8og}N@i`0pQ|^xgzXQDI<|u+iqFahi*RKH)<>=3W zkUDzDl-t85aE|+TmT31!s0X}&`)^N2(e2#7e8&0t@Xtiif8qJJfUs)x<^BHruYlr< zH8r2-0U%9AUjtTvZ?C&td>jbsqu~ZT3A`03`*5)7{=)shnEM5w=KUR@@b`8G2PvZK zfm?uI0iF%~YoPe%r6B+9z%{_jfjfb(0)7U#5%@*mj{^T7!0!Ps~}W8e>fYX41L z$J+(K%eij=HU5)8L^b+d;8no49B_Uw0fmo01JXn^cF@~93KU+R1*+a#4!OL}0L2%d z0qzEVANUyXlKG(jfqH-Tt&X2L;Cr}#1i1bz^k2At-3O!S11|!fzz^~M82{Y>eAkB^ zpC1NZ!u`jAZw5XCd<*aofM2HG-vfo``#4Vo$fY02rN*cq@qpy;$GLuq3$hts z0&G6-)-U|Ll537jx&jhLpx5O8M}UuT{W~s1JNkJp(Oo~o4x%csz_pf3I_Jw=8@L|e z%KyBCn{&8e-DsBUom`V#FXqw@Bs83S1^AR6@bfwcMw7Sm`)01|!?TNlSBBs7;HSfl z=zTxetMV`T{c^4&T!?P^^Im=ve$c0!~eDE@0 z^7DCq`3Tn?;lYc5$GA>%9p;iep2wB^d?EaD6A(AUett1P)P>2vZqE_s_7>DYy;lNHNo|Mt}k(2$0a?mo9jWYpXKWRITRke z3-}XUpX6H4^(5D?a=o1EF)sbw=OF#R9De&r;1E|aeG^4L$M0Va_oD&s46p(GFxNv| zZwt?2p!n+6JMq(B$uBVUTe;S8ZRNUwtH$*auFrG*d#-PBeUIyJxqj@`(2lwZF3+Y3 z{hZ77|M>YU-X(mH$lEu=yO$vVDyJWfLFF&zS%Poznw~Xzwq1qzNuE8;vxJ9|Xa9?5 zYrR-n?rlGx$#F6^wXb#`=EGwt|bwN{Hu%|@r%=vLxJ^Wd7e*eJ)< zj=$-&=HpH?ZdHnU){d)&^X*QnxxX?t6b)TdnQOK> z@l=;lQvXtZp;V*H1ZwTeXByqHW^3j$l`NJtr}l=pP_EP}ol0DoYgHSabpcMtSMI)M z*XD`1Fm2Dd-?4LB`p}-mL$UpYBI~?JxC=M6HZAa<)uxMXgPv~bRy#@E3h0fu?B2C& z^Z3?yV_fLD|Jk35&x;Gq{aJy0wQ{wUz3`g(M@i-UvyIHWT$wI*Yn^zm*qIgXh0s#B z)v7c)F=Z>IPO~+?F;0qA4$ZYH?Y06 z$7|wFrQP9POp@SzC<@3EA5{)@n92CWwi_nW=Z$8!U1`OIMsuds?9S1%#=B?p#Kg91 z#<{Ds>ha$53j22L-nuO=v??=|L&@6&N#elb6g*Nm*s6B?H{rKyzbB;*&Nge6MzLN= zs>g+P_0~!}zIUp0aR08W_Qi!x3qCIx`|+?m2SvB?xLYm9<4H4&mOCD5)Z?3XF{nd5 zHTFfr#_PpK+^#iCMR=}UWF+EjM626qcjv^tG}C5`jCek-RSr~Y@o;%#+}>ZEo2xcv zkf^bh8ybt_YrU0ty4ezGXk0gTM2~s^vz9lTMcy!`Nb%!3zgM@ zu1P(~u3i}mnMg6-PpgeshzKKHR;0mTU>G%Q)IHO3iJmDpE3PzZO{Ak%-Cv>GMz>yR zRZHGtykl!TRVfu2g%s0l(HR~2Gb{+n-RbG-p?J8h&O5MEwE<1a@zi|WuFf=y!aJ{c zS(+_2W_VMED2&)yC}>1pk2Gt%s~o77Kti`Z1^tI>65+HUm>Wf(g#g}X3AN8mrJF8o_@aZ7Y%5#|vgX%P_+ac7II zO4)q^q#aUf*hxXg>r$MVxZJDhZVk>Vx0-Wk$Lax^o~fjLP_4KYSnGasP?eCYM_aS5e>DpVnd0# zwibF-tHxYyG|S+t4a!oF1^=;HGKXfk9PDNyJuU+Ify`EMQd*_i`G0|7K;0n4ryIwP zxa6v8x;g`&#IQ{~+dL>%65qGb5E6(mX*mzF?`W%N$4sMXcB$LId27xzkOtW!eBXGw zR-B<$v?CabROo3*>fJrGxKOAU4;2z`q)?op)d4jai`<)X`m)k46>-Vim0P-%2G&n3 zkmyO=>S`TsY{hNdj_Pz3j|ZDM_QO=(nDMXMsCHcM;&)0bRSuOZ%zL=j{O9lD&=1)~ zr-k~G)yhd6xYIN;5@vn4;aLHpARS|lv}NxNC)nu<&I9-_;?Fc@&^2jq;vL-3e)6HS z%(rmqzbPAl*rZ-<8vzrav>m-qwmZHNn>Ry57hR19)QGnhYqiRJw6o8_l}9bbZK`bO z^sh17yNaFCtPmtEk@FFDN$$mEjx0Ao2WK(Pdv;&DkGYanH-Qx>`@KKMQ4^)fBQ)%q1#{^l5 zPbf7shl+>^*JnGOxeaUAwu=W)Ud7q55Mi%{!PY3gS2%CBt6DKQwbAP444-e4vW^#6V2elQ><73x!QEAkvO-K^D`2k8njWvmt4FRzct94yG|Xf7l#gK{&O*e>A(7{t49#u5TD1acntxCO# zr)ON*pMQy`Tg|$}rxl-T;~42EJyu0_LbZ2{y+gP|5lD>mYi3oNH4-wThLgmoo6JmA zX9^NK*r8sOf~^z|Hi?HY-c7Xv(~5U`>OiPYt@47Z4Q!hcN|%9WQKLC^ph|)#beKnS z(3Lef!9!4m+asgS)%k*HWOC(>@vW0r?A*QO>d9+&d|+GBMXIRDKQSo_9?3U?D??>* zdK$+SDdF7|dUZb>OV&r-^Q7OL4C>f$)v5%C-O^J~`(Klh;1FUqY>07>F%E-dM8VNc z(jo%W8I9pKuRPt8O0I-Yi7(83DSbx8k zmzIXQmK+-<5A0T4x5x^vucCwN+E^HK81@zlNkIQW9M#!MZEoKX+^!$cU2nEKlgcSK z8O0C+rE$?r2TDig|s#4YSpRiO>XwZ>YKa0o6<*FrJcy?AtuwPv{kLP zH@mg2)7!n9(qH%GI^BWBn5z*ICLLGFG-VI0jqqUark*$17^E)_6(F$+*_#HTauE^R;5rPVXS%w z?O~d|)}twVq>Qp$nSIFu1?V%(Z5r46T0E|@*IHS;+l~^kLjT@EuQZgbL`gZVY$$v5 zaJ#)}G~H29&7JlnyRX|lXq?mAw%xTmYVz>OIC?aX*D+V55xH$FV~|S;&PBpf zIEU>HRko7GmA724V4P8*%3DhxyK)N7)qAs{g!YwwQRW&O)}y#B*@1RWCm9~ZT2Yg? zMi=H?))i5$Y4+k^bTg) zmZp>ga~~qQzG!O_W*%%U5-e+J5%Z_G2=9W3Eeo{DO{$mZ@Vi=emxr4<7S z+oslA-MLQBvLYcaYHHqE5nTubHM~Gctu1P;Mk41qb9pRUb(0QZ^^RYOc*0slvf`<9 zXa}5ziZ-d6C8OFNT)ESX*Q7<3hUxe%wvl)uk8!~qPb7?y`b zEt+FW^$O}Q#uIN%6ZPQQ!x8vU<|vXiF4juQ$+|S+JX> zJZBMvk!Oy3RB5#^$5X7eF>zZ5nNCvozMEjO+?>?ZV zEfHRL)UIUx&BMdPrPUfcgsQX-1a_b9D&;R#9;LYorQI?g*mEtmzqpD;Bo#Cvq3YKXh?D=Sn>R?K<_5W1DRNO~ocP-(G8rfr^s*$ZPY5&^Pl zWu@HFc$WV&9vd`DIUVK+NO*C3=QZ7d^GQpZtw1gs-RavO{0vW8_)>dmzphe77&Uszd;4HN1+`yDGb>AA;Q}Fn)YOX z03$}PZ6%UUa!y+3&a$#;KpzrXD9w=eh{)I5!gwkZG;R1G@5nx$LNa3Pi0=ndDvQJ@ z5{G?a*5^e1B{SysjSC~g<Tt?7z9@WP1_jV5MsxXc-swou8BwS>(B9DW9=2{B){wJdK$L-^C^`)peOx$ zerP8=ZuXahq*g4gxh7PLLHlYNCMHOip(rgEHKL8eblWVQB44~)EDx=?$=5csq@`-j)YzV6 zgB;44#&Wmax++%FghB4zz}<6NwP>qKU&HkfMOGjLlIG&NDUWh|uxPV;1y>hR7Q)BU8dF`qANXM#4Vyk& zG5X%TlGO$6-_XQX)6`}yq-lACEsd;hhSfo7_H2EV)yTOu=FNBt_{(tjL@}X01?kTcDsFRfr ziX6l$G$7NL;UbL&*8~c)YY<^K6l4vgUS($3iV%*hR7lo|mLuur9=4iP=~K}HQo5GJ z70f>YQpEZq7|x4t4%RzMUa=b$JxvTn^4a!rQV~qy1ZvZ=S~92AYZa&^ql5%$v5kI- z=kZ9OqGe-Tw((5F))e5C+II~D36Umylf(Id8H$QbE8xmKbkD3LkCNSa$$mJ0?rKUL zn)5M6XenLILLOP}>Gu&BC9%!HihOP92ipyq7V`cHtdY{bodrp^J-$ZbQfm3mH@vx} zOefkCO6+Mhe}f3lq%^w&x)A zb(7uuLwj~l6t=+Ta#agk5w#8R`RmrNFRZ(;uzr2K?vf1`UVPrV_3PGAuy74~Qk31# z%B?G`dv{^oMe+KJHe9g&ymgmcux@B4DZ|19n*mUv-KA3xkz-m~I0oM@J~0+w zJ-hfM73z7`2YVio^ zr=^9@RcY}7ZTMVyQwddP7aw3e2dW!}RwZXZR*f8LE*=@>fvrTWOMaP-w=SJ}VEiiX zlj9&0OADXalRdWb@kq6y%3fw&Y-Q5>^p@iwBQ@cSEc4>SR)I%JVLv0nNEVOdUM?-% z*HH-_8CkVTwtw-6J+PG7P6jc)U5|5wQ1RSbWvl%ViI)y zn>Lm`0+Y`ke(o_i1nQNSPMu(_aOu=jB_sZwV7RvUK(5V%TS|*h;Dv#O+q=A7S~y-B zQ0?m{g3XV=zTn91twAGJ`Sy6K*o;#g8x|fUwm2-16uUcC8%H)=%Q(qe2J`@q-U<6w6D(JA^IZpjIW^D4+ zxV-o@`=^E|=FWLvvDw8Z>b#ZP7Vla*_3(8xG}4DTy-&`yY}vka>enZq{e`84Uy4T# zJbN5WA}x=0DdX;X+DIQx5E#nd(w(=G;RKBJWy0uP9)-BssTkhQ%vM2=rlMEQL4Hn# zmp%N|Q!I4_lR1ra79Vbi_NR``3oIN{Ykdc5R*f(flQTP6BaA+Kc=43bw`$oj8?bF` zqIY)U#wbuqIIBfWT?nsJ$%E(fWTOk@fn$X2wwBm`yPwU-CKiO9GpVo=fek1Iw zn7H)Z5p{V#T)uFUfD;Ms#y+<6M2|S4gld~ZbWa^6p@yUDu;n?!{&55gLXKonT{>yrzEI1{xA1iTB+S@>55u z(eV0nUuYf7shO$J6UGLSX_(?;Bxa);Bza}BxU&vtF--TCjOW&%JRXtNGK9*Yb)6R> z0!B>=)Yake`RD3%5uVJ_!kyAXryi<{dycam4MwVh!$(OmIw$G05i?O8M+i=+i_m8& z$a#zz5W{b>jIOwbFQDj%NkM3X;LR+h_xFwCoFq9{N0F>d&r9fVUo{@S&|U{7fo<+E zeR^0HoN1YvH3|;D=Ug385@t@8;^B*^=I4}*bZ(a71J)*ded>rBm|a9H?a-2O4XvXR z#OH<*8&ZOQB*D1x4pSM2t4ULt`qsfFKXPPqYoP2;(8*vlz5t9ZsB!K^n;>4@FnIc9N36U7YuX5iiF` z?z7PYPTO%ddgsg6;OW#uth$lHrAy~VU%eF=?ftpeq3x_x@EKEGSuWCO8xIouCqJ@> zi;erxWhWc%B90|}ou(D0If%>qn~HGAo-(f$l;et}XR=DT8ne&I#gHVThz_$4ntRS> z^;HSneMrOBfbfR!S+}HS1V1ZS5fKD+5(>$Uk_534u9q#a7@reyT+VWQDo)vo{*A5> z+3>&?pOnr>^-#ZlOtB03B;~G8oRNaAuormWUy?PKZSFtWC4NP}Ys?ATCdSb1a(CXi zT>6o7Rn}7ZxyQg%G6ShQ0tRE^pmR-Q?vk!kyELC06S0DJae<%+lko<6RBY<^hL=)RoWUVXkWb0~_*6KMC~T4Ev@Iku zX>40e>IXE#>)yM3F5J+j=6dQ_m;LC3HH!~-Q%T!m3~&Bi(W>LV=!buUNMkS6!im=K2)&kCX(G#8D4pX4r#ynH6h*6Ey;B;-b+0 z9q=a{rM?qVa@tHr-~Aak%ov~Bcz_QckpKLx1S=z+8~dThk?-0>Xpl)((BX&If~`z> zE^aKHdb}Pp7WSXPw{yZy&@)CU7a)H%7%8dpb4}h^e54+nD)1uxNgOYa3^o)$zzIRm zG-e=oEN{aieJl}q4YSndk>a?0LBZ7#_ZJiQEJ$qdl3?n*CZO@bXmyS>jNlJO9xy%x^mGUIt~Q;Z zuzax8Nw}5Gq4PUsfz68G@$}ja8RPrr+@IZoTs&iD{9ct`E}x2K`p;SP8aNKnr_NGN zyu$iNGNhozi0IVMEnTKhcp#rpC2p4q2}FvvFQtKZ-gkC|8LSV8C1r-dJD$}>;@|M9 z=e(ahu7T(u=Fp!F1SLKe%Tu}?6N^4>umr);^u&&>0WIz(L17rcJrr@vF{RNKZmTDY zJsv&dua8BR^OWzKB_r2~SO4LPs#l?=FqG>SK6=@T0Ti6Js~ zh9?qT_>60YK#{_lV9U(wvs|ULpz%Ty5UqHU&}k)CG0DupFzOS86T?e}rILE8#8!@Rg^GetdmT()|{R2GjSJhcP{*F)jSO1G$&QU0J-uO*Me>m=5hoTTm-Bn z_FQ>A#+Zvrh!1vJTo)4Lrtw7?Tz>$wQ(`CZle19XEpp3~_bjsH??!M+E~GR2?Cqpm zGCu`OE5hI-@fFw&YwROy!w20-G<~MI#fy z<08T15NcVsj;DcMxpfqnDR?_U+8UO5qU~M1NeQ!$Hh9zC%*4qJ(!y4F@sH_2lP*MBC|nyRvpm~(S%?NJ`f;p!-qK;Pzlf@HM_MySVF40Laz>NH;Iz!e%J z-8(P~!^HaC9Stj}v5-62!$)!sDY8j&H*g(GYMqcc2};zW-!zE>i%L{aBawYlXyUmh zFN%R=dDG|t?LZM!irRTW(zi_PP?issTyxI3p%9kus=B~oDDp9Vo^eWKW@IxI{kj(* zpD8Rq4@fR1!GlagFyDa%IS!hpkkAKyBgA+AGeH`9njY$yk498*V_v9pe^<;HYD$o}rF6AIfV|LO~sgve`PO^y3 z=eUsPNxYK#Cl%*RdPb7k=I>8J|2z4VfsA_3XnT(e4mfZ(q@CTXRvlP;G8dcv-_cyStUD>zy00p< z9ck>N)faF;*AEnqBniiXI}}D~@}GEoca^W}cs>pG3@Hy9{2|WsY9$xjBUkDfOETiy zYm8X%(;x4($@++LZk)s>8`qf}{8c;NOlmWG+Bmc0z-c448wKU)oB(S|A+}S5 z4JUXSR*Ov(aETuo_9EHt3b9ZB5n@}S_BAJ2cx>_Q8y1(|g=neA25ct)2WC?69Q)*<~XM=p1+yJH-tCi@TR9+Iu{k zu6o{PhqYs)gqBsrsdtl!S3X_N;eF~-`#VKGJIU>3JI-#ljO@!jm(_M&hF66huDp|sk61x{;?Z^-#aArewww5Yry$IOj{~yr!S!P2 zNU#25+frXuoC20mJa$bLu8y$xvs!Q-bF@r1*4&w>~SLf$OA& z#^NhvQ{^)}ZoH)2AukdyB36d~36t2*G|cfbi)|repBRK_@x6U>3*MU#Pb+i6j7FfI zR(2WX1oq-L)6Te2L;+N{ogkKrGE1pe@AX6Sy;VWYfW;|Iho$I%DLlfX*=P>swhFkH zFIqTq?k z)3<~9Jn-E-qPFuA5_*i>DtpA4c*qluMb6G8O)5$E^rm2WMc9(7Baziwx5R;YE?*5# z8a1*cjpcWrXq4M*gkngV%D<%66G)fV$P$T|BqIzgVjRD08pZ`a3zxYu zHaZ6%(jQ>4Pr;a4U@0b<-1c~JcFQ&@DO5A2vZoQ=C2RkLyX+CQOqH#vUww&U=?-6!<-}WHA31pnqrNmB z1(c(Z*+-O;JY-Dx)J5JE$!92Xm`K`iw$YYnX~l$=%#Othqv&$`(pyN;Id&F@M5_YJ z8u7hBHg;5()(#YK!k4$fKFKEIWYJ%P`9d`cZmlJUjKoQgHlTFA?noKeV7sJW$*T#O z?hrz`BaPX}&=^@D9QAF9d7kW(6h%+&=_)g&jE>b1p^_|p4{1%xHHV-;z2pc7Bht?w zj0P)%^g9bo-zTpBKU37Lom`EC7lhZ1u5MR(+!KNbg@JlsKJF=Rd+={zppnC^*+L zP`0&O9GqoCN0a$6#3cVkQKKp|Nu5L^w)XK*JzykPBNTKqrs~Q%LZ4n*FRS-_?>EZl zU_(pZrx4xE>4V2gXeK@qBXJ*l{c)r*r=!BxD#oH5WtI;uK}IytW6E53 zX-?J?gIZT^A`4$^ub=Hq_3ia?KHVqr`loH1jDV|Z4RchKF_EXcyJ*H%x!mSt5<0lO zd^>6;A5jhR2E)O8HUhYhD>fj^U9c6nWRLxF=Ne_AmBil9VI+8!>hon@>>2|O%SDmz z9qyX6CDB0-Q>0`N4|#Z9ivRE<_pq{W+LT29m$fk?f4(VMD59=DV}T}d>d5cGLF~uc zSY!(h@|wKqfr*M`)#4F8w((D_I~HYUqT-Rns96dqah))Tr;gTLH$D_g=KEIY!_>56 zWOPUdC5%wyN-)5qBc=4~6aQ*o=-8_dcf=z-ifWXpacVX>xaG@TJk+#oP8)S_eZ)7V zj1qOoD%)0N_c6ozSf6g{=|b*Mlt-HhJW;@-93?^>vW1#GxVXV!XjS$B5b{3m?V~r- z6Fj7kk`IF@X{1$Rp4hoB9SGprK(5Kwp+<*>@%ue(+ z;xcsmW{472lAU{rzrMt&v{m6VBYNJO<;p%hvSsPigL`ZUNj=n8x`ePQ`yk1R1tr0F zdg{(TD5#towmRAWujl^t61@m4TJs~F$r_d3^rh1fjqpN%uvgzk+2>;#SlbX7jqLV88p#zMd0gdmp*vuEcJ-26!jmpE;^$gLbVzn&6mwl=Q4Vk%V$vKw`2ssQKj+vqdC_{8CMR}`$E10+*z89}Ruz&D!%)|< zmSPwGMvS;?S##loF)KEgd_yMRoPSP6tzp(!fKV6y@ei>)K8`)`ugrMp39B zsS5rj8WZ;{xHm79(~M3Misl_yh@*0wvXP>OD)@2r_R!$_6#a~3`e*% zMV2Fc@_iiMrG&LlH53-cZ7G(6bhokq9U2 zh4fCZV{hLF%1|2m4xs?T@L3e^;_)V*S6h7A>$-AEciow83qB7AhH=@#zC@wVD1@Vq zTDHu7e^5I4H@8|j z){$$GEB##kFoikw+R&ZTUfMiHb^+c?w*~i)BkwB;j~2$5kv6XJJ7f+_u5vu{&5b(mpV}f(R7j6 zK`f?|tRb(K_)3-p%{vRd9)Wo;$!S_RiiIAfS=qQf5YxfZh2u|Ynj{>B1`T{w35uUd z<;3Y!ZX}ruYC`cl?daRG%NxphdvcHlY#C;)9unm8+(x{N3Sws|B&zof()rvhO8)F> zh-*>6Cv-$H%gBgBLu28COgqgmC7YjZqoo+bK5k*(WnyI3eoCbLNlf8@C5RA!<#lV? zh(6QA^!QSfImO~5*iD$$g6K6(b?y1RK2GxHW;&#*63%09FlD9 zt_dS&o7!!IrgE>EOOk3}L^{BnFGfx?&3q`Ik$)K`5JJyR_yB=%xkZ&DcK)BKue3k4 z*Tqdyoh&tqt?_P|V-ohk^=$9au)&7(rEP#tg2UXnCzC3Z%O}Xvo_pc+6P-SnxaXQ3 z-Cdh+h|c)0toqr>67?{3% zNy&q@ET?aoiL2YigZ^bT{>Vr}1vd@b_ka1@OvUhLnN(z$udYt9yv%2=_)~lpzQBp< zpfPh^I!E&{>lzj`NK{ze~1|j=+99OMW&&7f>eV<{?;F;%0A`GC))G}EHPam!oMd7 zT85KqZN6~I2h_s1knJywK3_}v7MC|91k=*4;-PAtpdfU`m*0}lnd^^q*@w*iV}GEO z^A1+$TK$oqT*>fdauJj-5$1}6f2&};>3T&5O!BJ+%>De2kNJvA{3T)oujO`QUZ(Ss^-O(^b`SHZ^{ zQpMnQ2pyZ_b`*6;%my4-m0=hu&33Tw2zq3OSIXEmKv=Ky?U{)-B6)~<@ADPYS+ltS z|5+o`4pmd`?i$FOl(zTnL|ThS0}uENO%N2u?Vg+OP`}zz1n$6swEODrUS)$0s7k*h zm7ky)&J;_zl{9woNTXY{yX+K, 2006-2010. +# Nguyễn Thái Ngọc Duy , 2012. +# Trần Ngọc Quân , 2012-2013. # msgid "" msgstr "" -"Project-Id-Version: findutils 4.5.7\n" +"Project-Id-Version: findutils 4.5.12\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2010-04-07 17:31+0930\n" -"Last-Translator: Clytie Siddall \n" -"Language-Team: Vietnamese \n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-09-24 14:49+0700\n" +"Last-Translator: Trần Ngọc Quân \n" +"Language-Team: Vietnamese \n" "Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language-Team-Website: \n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: LocFactoryEditor 1.8\n" +"X-Generator: Poedit 1.5.5\n" +"X-Poedit-SourceCharset: UTF-8\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "Gặp lỗi khi lÆ°u thÆ° mục làm việc để mà chạy lệnh %s trên đó" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "Không thể đóng đầu vào tiêu chuẩn" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "Gặp lỗi khi thay đổi thÆ° mục" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "không thể rẽ nhánh tiến trình" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "gặp lỗi khi chờ %s" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "tín hiệu %2$d chấm dứt %1$s" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" msgstr "Lỗi sÆ¡ khởi bảng chuỗi duy nhất tập tin dùng chung" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "thất bại kiểm tra đầu vào của thÆ° viện fnmatch()." + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "không thể lấy các thông tin về thÆ° mục hiện thời" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "Không đọc được danh sách các thiết bị đã gắn kết." -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." -msgstr "CẢNH BÁO : hệ thống tập tin %s vừa bị tháo gắn kết." +msgstr "CẢNH BÁO: hệ thống tập tin %s vừa bị tháo gắn kết." -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." -msgstr "CẢNH BÁO : hệ thống tập tin « %s » vừa được gắn kết." +msgstr "CẢNH BÁO: hệ thống tập tin %s vừa được gắn kết." -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " "number %ld, file system type is %s) [ref %ld]" msgstr "" -"%1$s%2$s đã thay đổi trong khi thì hành %3$s (số hiệu thiết bị cÅ© %4$ld, số " -"thiết bị mới %5$ld, kiểu hệ thống tập tin là %6$s) [nhắc %7$ld]" +"%s%s đã thay đổi trong khi thi hành %s (số hiệu thiết bị cÅ© %ld, số mới %ld, " +"kiểu hệ thống tập tin là %s) [tham chiếu %ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " "number %, file system type is %s) [ref %ld]" msgstr "" -"%s%s đã thay đổi trong khi thì hành %s (số hiệu inode cÅ© %, số " -"inode mới %, kiểu hệ thống tập tin là %s) [nhắc %ld]" +"%s%s đã thay đổi trong khi thi hành %s (số hiệu inode cÅ© %, số mới " +"%, kiểu hệ thống tập tin là %s) [tham chiếu %ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "lỗi trở về thÆ° mục mẹ" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" -msgstr "Lỗi thay đổi thÆ° mục một cách an toàn thành %s" +msgstr "Lỗi thay đổi thÆ° mục thành %s một cách an toàn" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -"Liên kết tượng trÆ°ng %s là phần của vòng lặp trong phân cấp thÆ° mục; đã thăm " -"thÆ° mục đến đó nó hướng." +"Liên kết biểu tượng %s là phần của vòng lặp trong phân cấp thÆ° mục; đã thăm " +"thÆ° mục nó chỉ đến rồi." -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -89,15 +129,15 @@ msgid_plural "" "Filesystem loop detected; %s has the same device number and inode as a " "directory which is %d levels higher in the file system hierarchy" msgstr[0] "" -"Mới phát hiện vòng lặp hệ thống tập tin; %1$s có cùng một số hiệu thiết bị " -"và inode với thÆ° mục nằm %2$d cấp cao hÆ¡n trong phân cấp hệ thống tập tin." +"Mới phát hiện vòng lặp hệ thống tập tin; %s có cùng một số hiệu thiết bị và " +"inode với thÆ° mục nằm %d cấp cao hÆ¡n trong phân cấp hệ thống tập tin." -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" -msgstr "cảnh báo : không đi theo liên kết tượng trÆ°ng %s." +msgstr "cảnh báo: không theo liên kết tượng trÆ°ng %s" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -106,56 +146,60 @@ msgid "" "results may have failed to include directories that should have been " "searched." msgstr "" -"CẢNH BÁO : số đếm liên kết cứng không đúng đối với %s (thấy được chỉ « " -"st_nlink=% » nhÆ°ng đã thấy % thÆ° mục con): có thể là lỗi " -"trong trình điều khiển hệ thống tập tin. Vì thế chức năng này tá»± động bật " -"tùy chọn « -noleaf » của find. Kết quả sớm hÆ¡n có thể không bao gồm thÆ° mục " -"nên được tìm kiếm." +"CẢNH BÁO: số đếm liên kết cứng không đúng đối với %s (thấy được chỉ st_nlink=" +"% nhÆ°ng đã thấy % thÆ° mục con): có thể là lỗi trong trình " +"điều khiển hệ thống tập tin. Vì thế chức năng này tá»± động bật tùy chọn -" +"noleaf. Kết quả sớm hÆ¡n có thể không bao gồm thÆ° mục nên được tìm kiếm." -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "Không đọc được danh sách hệ thống tập tin đã gắn kết" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" -msgstr "không rõ" +msgstr "không hiểu" #: find/ftsfind.c:259 #, c-format msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -"Mới phát hiện vòng lặp hệ thống tập tin; %1$s có thuộc về cùng một vòng lặp " -"hệ thống tập tin với %2$s." +"Mới phát hiện vòng lặp hệ thống tập tin; %s có thuộc về cùng một vòng lặp hệ " +"thống tập tin với %s." -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" -msgstr "CẢNH BÁO : tập tin %s hình nhÆ° có chế độ 0000" +msgstr "CẢNH BÁO: tập tin %s hình nhÆ° có chế độ 0000" #: find/ftsfind.c:559 #, c-format msgid "cannot search %s" -msgstr "không thể tìm kiếm qua %s" +msgstr "không thể tìm thấy %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "đã không phục hồi được thÆ° mục làm việc sau khi tìm kiếm qua %s" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "Lỗi sÆ¡ khởi bảng chuỗi duy nhất tập tin dùng chung" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" -"Hành động xoá thì tá»± động bật tùy chọn « -depth », nhÆ°ng « -prune » không " -"làm gì khi « -depth » hoạt động. Vẫn muốn tiếp tục thì chỉ dùng tùy chọn « -" -"depth » một cách dứt khoát." +"Hành động xoá -delete thì tá»± động bật tùy chọn -depth, nhÆ°ng -prune không " +"làm gì khi -depth bị ảnh hưởng. Nếu bạn vẫn muốn tiếp tục thì chỉ hãy chỉ " +"định dùng tùy chọn -depth." -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -163,63 +207,61 @@ msgid "" "as those specified after it). Please specify options before other " "arguments.\n" msgstr "" -"cảnh báo : bạn đã ghi ro tùy chọn %1$s sau đối số khác tùy chọn %2$s, nhÆ°ng " -"mà tùy chọn không phải thuộc vị trí (%3$s làm ảnh hướng đến điều thá»­ được " -"ghi rõ cả hai trước lẫn sau nó). Hãy ghi rõ tùy chọn _trước_ đối số khác.\n" +"cảnh báo: bạn đặt tùy chọn %s sau đối số không phải tùy chọn %s. Tuy nhiên " +"tùy chọn không phụ thuộc vị trí (%s tác động các phép thá»­ trước và sau nó). " +"Hãy ghi rõ tùy chọn trước đối số khác.\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " "latter is a POSIX-compliant feature." msgstr "" -"cảnh báo : tùy chọn « -d » bị phản đối nên hãy sá»­ dụng tùy chọn « -depth " -"» (độ sâu) thay thế, vì nó là tính năng tuân theo POSIX." +"cảnh báo: tùy chọn -d đã lỗi thời; dùng tùy chọn -depth để thay thế, đó tính " +"năng tuân theo POSIX." -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -"%1$s không phải là tên của nhóm tồn tại; cÅ©ng không hình nhÆ° mã nhận diện " -"nhóm thuộc số, vì nó có hậu số bất thường %2$s" +"%s không phải là tên nhóm đã có; cÅ©ng không phải ID nhóm vì hậu tố lạ %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" -msgstr "%s không phải là tên của nhóm tồn tại" +msgstr "%s không phải là tên nhóm đã có" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" -msgstr "đối số rỗng tới « -group » (nhóm): nên là tên nhóm" +msgstr "đối số -group rỗng, cần đối số là tên nhóm" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" "expression may consist of: operators, options, tests, and actions:\n" msgstr "" "\n" -"đường dẫn mặc định là thÆ° mục hiện có; biểu thức mặc định là « -print " -"» (in)\n" -"biểu thức có thể bao gồm: toán tá»­, tùy chọn, điều thá»­ và hành động:\n" +"đường dẫn mặc định là thÆ° mục hiện thời; biểu thức mặc định là -print\n" +"biểu thức có thể bao gồm: toán tá»­, tùy chọn, phép thá»­ và hành động:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" msgstr "" -"toán tá»­ (quyền đi trước giảm; ngụ ý tùy chọn « -and » (và)\n" -"khi không có điều khác):\n" -" ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" -" EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -"[EXPR (biểu thức); not (không phải); and (và); or (hoặc)]\n" +"các toán tá»­ (quyền Æ°u tiên giảm dần; ngầm định -and trừ khi không đưa ra cái " +"gì khác):\n" +" ( B.THỨC ) ! B.THỨC -not B.THỨC B.THỨC1 -a B.THỨC2\n" +" B.THỨC1 -and B.THỨC2 B.THỨC1 -o B.THỨC2 B.THỨC1 -or B.THỨC2\n" +" B.THỨC1 , B.THỨC2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -227,24 +269,13 @@ msgid "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" msgstr "" -"tùy chọn vị trí \t(đúng luôn):\n" -"\t-daystart \t\t(ngày bắt đầu)\n" -"\t-follow \t\t(theo)\n" -"\t-regextype\t\t(kiểu biểu thức chính quy)\n" +"tuỳ chọn phụ thuộc vị trí (luôn đúng): -daystart -follow -regextype\n" "\n" -"tùy chọn thường \t(đúng luôn, hãy ghi rõ trước các biểu thức khác):\n" -"\t-depth \t\t\t(độ sâu)\n" -"\t--help \t\t\t(trợ giúp)\n" -"\t-maxdepth CẤP \t(độ sâu tối đa)\n" -"\t-mindepth CẤP \t(độ sâu tối thiểu)\n" -"\t-mount \t\t(gắn kết)\n" -"\t-noleaf \t\t(không lá)\n" -"\t--version \t\t(phiên bản)\n" -"\t-xdev \t\t\t(chỉ thiết bị này)\n" -"\t-ignore_readdir_race \t\t(bỏ qua thÆ° mục đọc [race])\n" -"\t-noignore_readdir_race \t(đừng bỏ qua thÆ° mục đọc [race])\n" +"tuỳ chọn thường (luôn đúng, chỉ định trước các biểu thức khác):\n" +" -depth --help -maxdepth MỨC -mindepth MỨC -mount -noleaf\n" +" --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -252,59 +283,29 @@ msgid "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" msgstr "" -"điều thá»­ (N có thể là +N hay -N hay N: ba kiểu cÅ©ng được):\n" -"\t-amin N \t\t(tối thiểu)\n" -"\t-anewer TẬP_TIN (mới hÆ¡n)\n" -"\t-atime N \t\t(giờ)\n" -"\t-cmin N \t\t(tối thiểu)\n" -"\t-cnewer TẬP_TIN (mới hÆ¡n)\n" -"\t-ctime N \t\t(giờ)\n" -"\t-empty \t\t(trống)\n" -"\t-false \t\t\t(sai)\n" -"\t-fstype KIỂU \t(kiểu hệ thống tập tin)\n" -"\t-gid N \t\t\t(thông tin nhận biết nhóm)\n" -"\t-group TÊN \t\t(nhóm)\n" -"\t-ilname MẪU \t(tên)\n" -"\t-iname MẤU \t(tên)\n" -"\t-inum N \t\t(số)\n" -"\t-iwholename MẤU (tên đầy đủ)\n" -"\t-iregex MẤU \t(biểu thức chính quy)\n" -" \t-links N \t\t(liên kết)\n" -"\t-lname MẤU \t(tên)\n" -"\t-mmin N \t\t(tối thiểu)\n" -"\t-mtime N \t\t(giờ)\n" -"\t-name MẤÚ \t(tên)\n" -"\t-newer TẬP_TIN \t(mới hÆ¡n)" +"phép thá»­ (N có thể là +N or -N hoặc N):\n" +" -amin N -anewer TẬP-TIN -atime N -cmin N\n" +" -cnewer TẬP-TIN -ctime N -empty -false -fstype LOẠI -gid N -group TÊN\n" +" -ilname MẪU -iname MẪU -inum N -iwholename MẪU -iregex MẪU\n" +" -links N -lname MẪU -mmin N -mtime N -name MẪU -newer TẬP-TIN" -#: find/parser.c:1244 +#: find/parser.c:1239 msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" msgstr "" -"-nouser \t\t\t(không có người dùng)\n" -"-nogroup \t\t(không có nhóm)\n" -"-path MẪU \t\t(đường dẫn)\n" -"-perm [+-]CHẾ_ĐỘ (vÄ©nh cá»­u)\n" -"-regex MẪU \t\t(biểu thức chính quy)\n" -"-readable \t\t(đọc được)\n" -"-writable \t\t(ghi được)\n" -"\t-executable\t\t(thá»±c hiện được)\n" -"\t-wholename MẪU \t(tên đầy đủ)\n" -"\t-size N[bcwkMG] \t(cỡ)\n" -"\t-true \t\t\t(đúng)\n" -"\t-type [bcdpflsD] \t(kiểu)\n" -"\t-uid N \t\t\t(mã số ngÆ°Æ¡i dùng)\n" -"\t-used N \t\t\t(đã dùng)\n" -"\t-user TÊN \t\t(người dùng)\n" -"\t-xtype [bcdpfls] \t(kiểu)" - -#: find/parser.c:1249 +" -nouser -nogroup -path MẪU -perm [-/]CHẾ-ĐỘ -regex MẪU\n" +" -readable -writable -executable\n" +" -wholename MẪU -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" +" -used N -user TÊN -xtype [bcdpfls]" + +#: find/parser.c:1244 msgid " -context CONTEXT\n" -msgstr " -context NGá»®_CẢNH\n" +msgstr " -context NGá»®-CẢNH\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -313,40 +314,28 @@ msgid "" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" msgstr "" "\n" -"hành vi:\n" -"\t-delete \t(xoá)\n" -"\t-print0\n" -"\t-printf DẠNG\n" -"\t-fprintf TỆP DẠNG\n" -"\t-print (in)\n" -"\t-fprint0 TỆP\n" -"\t-fprint TỆP\n" -"\t-ls (liệt kê)\n" -"\t-fls TỆP\n" -"\t-prune \t(xén bớt)\n" -"\t-quit\t\t(thoát)\n" -"\t-exec LỆNH\t(thá»±c hiện)\n" -"\t-exec LỆNH {} + -ok LỆNH\n" -"\t-execdir LỆNH\t(thá»±c hiện thÆ° mục)\n" -"\t-execdir LỆNH {} + -okdir LỆNH\n" - -#: find/parser.c:1257 +"thao tác: -delete -print0 -printf Đ.DẠNG -fprintf TẬP-TIN Đ.DẠNG -print \n" +" -fprint0 TẬP-TIN -fprint TẬP-TIN -ls -fls TẬP-TIN -prune -quit\n" +" -exec LỆNH ; -exec LỆNH {} + -ok LỆNH ;\n" +" -execdir LỆNH ; -execdir LỆNH {} + -okdir LỆNH ;\n" + +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" "email to ." msgstr "" -"Hãy thông báo (và theo dõi cách sá»­a chữa) lỗi nào thông qua\n" +"Hãy thông báo (và theo dõi tiến trình sá»­a chữa) các lỗi thông qua\n" "trang thông báo lỗi findutils tại \n" -"hoặc, nếu không có cách truy cập Mạng,\n" -"bằng cách gởi thÆ° cho địa chỉ ." +"hoặc, nếu không thể truy cập web, thì gá»­i thÆ° cho chúng tôi theo địa chỉ\n" +" (vui lòng dùng tiếng Anh)." -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." -msgstr "việc kiểm tra sá»± đúng má»±c chức năng thÆ° viện « fnmatch() » bị lỗi." +msgstr "thất bại kiểm tra đầu vào của thÆ° viện fnmatch()." -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -355,597 +344,926 @@ msgid "" "perhaps '-samefile'. Alternatively, if you are using GNU grep, you could " "use 'find ... -print0 | grep -FzZ %s'." msgstr "" -"cảnh báo: tên tập tin Unix thường không chứa sổ chéo (dù tên đường dẫn có " -"phải). Có nghÄ©a là « %s%s » sẽ rất có thể có kết quả « Sai » luôn luôn trên " -"hệ thống này. Có lẽ việc thá»­ ra « -wholename » (tên đầy đủ) hữu ích hÆ¡n cho " -"bạn, hoặc có lẽ « -samefile » (cùng tập tin). Hoặc, nếu bạn có dùng công cụ " -"« grep » của GNU, bạn có thể dùng lệnh « find ... -print0 | grep -FzZ %s »." +"cảnh báo: tên tập tin Unix thường không chứa sổ chéo (dù tên đường dẫn thì " +"có). Nên “%s %s” sẽ rất có thể luôn cho kết quả “sai” trên hệ thống này. Bạn " +"có thể muốn dùng -wholename hoặc-samefile. Hoặc nếu bạn dùng công cụ grep " +"của GNU, bạn có thể dùng lệnh “find ... -print0 | grep -FzZ %s”." -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" -msgstr "Đợi đối số kiểu số nguyên thập phân dÆ°Æ¡ng tới %1$s, chỉ nhận %2$s" +msgstr "Cần đối số %s số nguyên dÆ°Æ¡ng thập phân nhÆ°ng nhận %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "Hệ thống này không cung cấp cách tìm giờ sinh của tập tin." -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" -msgstr "Hàm thá»­ %s yêu cầu một đối số" +msgstr "Phép thá»­ %s yêu cầu một đối số" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "Không thể tìm biết cách giải thích %s dạng ngày hay giờ" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" -msgstr "Không thể lấy giờ sinh của tập tin %s" +msgstr "Không thể lấy thời điểm tạo tập tin %s" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." -msgstr "" -"cảnh báo : -%s %s không tÆ°Æ¡ng ứng với gì vì nó kết thúc bằng dấu xuyệc « / »." +msgstr "cảnh báo: -%s %s không tÆ°Æ¡ng ứng với gì vì nó kết thúc bằng /." -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "Chế độ %s không hợp lệ khi POSIXLY_CORRECT hoạt động." - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "chế độ không hợp lệ %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " "The meaning of -perm /000 has now been changed to be consistent with -perm " "-000; that is, while it used to match no files, it now matches all files." msgstr "" -"cảnh báo : bạn đã xác định một mẫu chế độ %s (bằng /000). Lời nghÄ©a của « -" -"perm /000 » đã được thay đổi để tÆ°Æ¡ng ứng với « -perm -000 »; tức là nó đã " -"từng không khớp với tập tin nào, bây giờ nó khớp với mọi tập tin." +"cảnh báo: bạn đã chỉ định chế độ %s (tÆ°Æ¡ng đương /000). Ý nghÄ©a của -" +"perm /000 đã thay đổi thống nhất với -perm -000; tức là nó từng không khớp " +"với tập tin nào hết, nhÆ°ng giờ nó khớp với mọi tập tin." -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" -msgstr "đối số rỗng không hợp lệ đối với tùy chọn « -size » (kích cỡ)" +msgstr "đối số rỗng không hợp lệ cho -size" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" -msgstr "kiểu « -size » (kích cỡ) không hợp lệ « %c »" +msgstr "kiểu -size không hợp lệ “%c”" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "đối số không hợp lệ « %s%c » tới kích cỡ" +msgstr "Đối số không hợp lệ “%s%s” cho tùy chọn -size" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -"Tùy chọn « -show-control-chars » (hiển thị các ký tá»± điều khiển) chấp nhận " -"một đối số riêng lẻ phải là « literal » (nghÄ©a chữ) hay « safe » (an toàn)." +"Tùy chọn -show-control-chars chấp nhận một đối số đơn, “literal” hoặc “safe”." -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" -msgstr "Đối số không hợp lệ %s tới « -used » (đã dùng)" +msgstr "Đối số không hợp lệ “%s” cho -used" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" -msgstr "%s không phải là tên của một người dùng đã biết" +msgstr "%s không phải là tên người dùng đã biết" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" -msgstr "Đối số cho tùy chọn « --user » không thể là trống" +msgstr "Đối số cho --user không thể là rỗng" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "Các tính năng hoạt động: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." -msgstr "sai đặt ngữ cảnh (-context) vị ngữ : chÆ°a hiệu lá»±c SELinux." +msgstr "tiêu chí tìm kiếm -context không hợp lệ: chÆ°a bật SELinux." -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" -msgstr "Đối số tới « -type » (kiểu) nên chứa chỉ một chữ" +msgstr "Đối số -type chỉ nên chứa một chữ cái" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "Đối số không rõ tới « -type » (kiểu): %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c không được hỗ trợ bởi vì liên kết mềm không được hỗ trợ trên nền " +"tảng mà find được xây dá»±ng cho nó." -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "cảnh báo : không nhận diện ký tá»± thoát « \\%c »" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" +"-type %c không được hỗ trợ bởi vì FIFOs không được hỗ trợ trên nền tảng mà " +"find được xây dá»±ng cho nó." -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "lỗi: %s ở kết thúc của chuỗi định dạng" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c không được hỗ trợ bởi vì ổ cắm được đặt tên không được hỗ trợ trên " +"nền tảng mà find được xây dá»±ng cho nó." -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "cảnh báo : không nhận diện chỉ thị định dạng « %%%c »" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" +"-type %c không được hỗ trợ bởi vì các cá»­a Solaris không được hỗ trợ trên nền " +"tảng mà find được xây dá»±ng cho nó." -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "lỗĩ: chỉ thị định dạng « %%%c » dành để dùng trong tÆ°Æ¡ng lai" +msgid "Unknown argument to -type: %c" +msgstr "Không hiểu đối số cho -type: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" -"Gồm thÆ° mục hiện thời trong biến môi trường « PATH » (đường dẫn) mà không an " -"toàn khi được tổ hợp với hành động %s của trình find (tìm). Hãy gỡ bỏ thÆ° " -"mục hiện thời ra « $PATH » của bạn (tức là hãy gỡ bỏ dấu chấm « . » hay ký " -"tá»± hai chấm nào « : » nằm trước hay nằm theo)." +"ThÆ° mục hiện thời đã được bao gồm trong biến môi trường PATH, điều này là " +"không an toàn khi dùng chung với hành động tìm kiếm %s. Hãy bỏ thÆ° mục hiện " +"thời ra khỏi $PATH (tức là bỏ “.” hoặc dấu “:”, hoặc dấu hai chấm ở đầu hoặc " +"cuối)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove that " "entry from $PATH" msgstr "" -"Đường dẫn tÆ°Æ¡ng đối %1$s được gồm trong biến môi trường đường dẫn PATH, mà " -"không phải bảo mật cùng với hành động %2$s của find. Hãy gỡ bỏ mục nhập đó " -"khỏi $PATH." +"Đường dẫn tÆ°Æ¡ng đối %s nằm trong biến môi trường PATH, không an toàn khi " +"dùng chung với hành động %s. Hãy bỏ nó khỏi $PATH." -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "" -"Không cho phép bạn dùng ký tá»± « {} » bên trong tên tiện ích cho đối số « -" -"execdir » và « -okdir », vì có thể rủi ro bảo mật." +"Bạn không được dùng {} với -execdir và -okdir vì có thể rủi ro an ninh tiềm " +"ẩn." -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" -msgstr "Hỗ trợ chỉ một thể hiện « {} » với đối số « -exec%s ... + »" +msgstr "Chỉ hỗ trợ một {} trong -exec%s ... +" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "Trong %s, %s phải xuất bởi chính nó, nhÆ°ng bạn lại chỉ định %s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." -msgstr "Môi trường quá lớn đối với « exec() » (thì hành)" +msgstr "Môi trường quá lớn với exec()." -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" -msgstr "tràn vùng đệm tính toán trong khi chuyển đổi %s ngày sang số các giây" +msgstr "tràn số khi chuyển đổi %s ngày sang giây" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" -msgstr "tràn cộng khi thá»­ tính kết thúc của hôm nay" +msgstr "tràn số khi tính thời điểm cuối ngày" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" -msgstr "thiết bị lỗi chuẩn" +msgstr "đầu ra lỗi chuẩn" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" -msgstr "thiết bị xuất chuẩn" +msgstr "đầu ra chuẩn" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "không thể xoá %s" -#: find/pred.c:580 +#: find/pred.c:718 +#, c-format +msgid "WARNING: cannot determine birth time of file %s" +msgstr "CẢNH BÁO: không thể xác định thời điểm tạo tập tin %s" + +#: find/pred.c:782 +#, c-format +msgid "< %s ... %s > ? " +msgstr "< %s ... %s > ? " + +#: find/pred.c:784 #, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "đã không phục hồi được thÆ° mục làm việc sau khi tìm kiếm qua %s" +msgid "Failed to write prompt for -ok" +msgstr "Lỗi ghi vào đầu ra tiêu chuẩn" -#: find/pred.c:1183 find/pred.c:1992 +#: find/pred.c:1208 find/print.c:1234 #, c-format msgid "getfilecon failed: %s" msgstr "getfilecon bị lỗi: %s" -#: find/pred.c:1507 +#: find/print.c:346 #, c-format -msgid "WARNING: cannot determine birth time of file %s" -msgstr "CẢNH BÁO : không thể quyết định giờ sinh của tập tin %s" - -#: find/pred.c:1571 -#, c-format -msgid "< %s ... %s > ? " -msgstr "< %s ... %s > ? " +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2032 +#: find/print.c:365 #, c-format -msgid "Cannot close standard input" -msgstr "Không thể đóng thiết bị nhập chuẩn" +msgid "warning: unrecognized escape `\\%c'" +msgstr "cảnh báo: ký tá»± thoát lạ “\\%c”" -#: find/pred.c:2061 +#: find/print.c:385 #, c-format -msgid "Failed to change directory" -msgstr "Lỗi thay đổi thÆ° mục" +msgid "error: %s at end of format string" +msgstr "lỗi: %s ở cuối chuỗi định dạng" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:409 #, c-format -msgid "cannot fork" -msgstr "không thể tạo tiến trình con" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "lỗi: chỉ thị định dạng “%%%c” dành để dùng trong tÆ°Æ¡ng lai" -#: find/pred.c:2123 +#: find/print.c:417 #, c-format -msgid "error waiting for %s" -msgstr "gặp lỗi khi đời %s" +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "cảnh báo: chỉ thị định dạng “%%%c” nên theo sau bởi một ký tá»± khác" -#: find/pred.c:2132 +#: find/print.c:425 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s: bị chấm dứt bởi tín hiệu %d" +msgid "warning: unrecognized format directive `%%%c'" +msgstr "cảnh báo: chỉ thị định dạng lạ “%%%c”" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "biểu thức không hợp lệ" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -"biểu thức không hợp lệ; bạn đã dùng toán tá»­ nhị phân « %s » không có gì nằm " -"trước nó." +"biểu thức không hợp lệ; bạn dùng toán tá»­ nhị phân “%s” mà không có gì trước " +"nó." -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" -msgstr "đợi biểu thức giữa « %s » và « ) »" +msgstr "cần một biểu đứng thức giữa “%s” và “)”" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" -msgstr "đợi biểu thức sau « %s »" +msgstr "cần biểu thức sau “%s”" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" -msgstr "biểu thức không hợp lệ; có quá nhiều ký tá»± « ) »" +msgstr "biểu thức không hợp lệ; quá nhiều “)”" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "" -"biểu thức không hợp lệ; đợi ký tá»± « ) » nhÆ°ng chÆ°a gặp. Có thể bạn cần nhập " -"vị ngữ thêm sau « %s »" +"biểu thức không hợp lệ; cần một “)” nhÆ°ng không thấy. Có thể bạn cần tiêu " +"chí tìm kiếm bổ sung sau “%s”" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "biểu thức không hợp lệ; không cho phép dấu ngoặc rỗng." -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." -msgstr "biểu thức không hợp lệ; ngờ ký tá»± « ) » nhÆ°ng chÆ°a gặp." +msgstr "biểu thức không hợp lệ; cần ký tá»± “)” nhÆ°ng không thấy." -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" -msgstr "rõ tiếc — kiểu biểu thức không hợp lệ." +msgstr "ối trời — kiểu biểu thức không hợp lệ!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" -msgstr "rõ tiếc — kiểu biểu thức không hợp lệ (%d)." +msgstr "ối trời — kiểu biểu thức không hợp lệ (%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"cảnh báo: tiêu chí tìm kiếm %s không có trong bảng chi phí; hãy báo cáo lỗi " +"này" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "đương dẫn phải nằm trước biểu thức: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" -msgstr "vị ngữ lạ « %s »" +msgstr "tiêu chí tìm kiếm lạ “%s”" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" -msgstr "vị ngữ không hợp lệ « %s »" +msgstr "tiêu chí tìm kiếm không hợp lệ “%s”" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" -msgstr "đối số « %1$s » không hợp lệ đối với « %2$s »" +msgstr "đối số “%s” không hợp lệ cho “%s”" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" -msgstr "thiếu đối số đối với « %s »" +msgstr "thiếu đối số cho “%s”" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" -msgstr "quá nhiều ký tá»± « ) »" +msgstr "quá nhiều “)”" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" -msgstr "gặp vị ngữ thêm bất thường « %s »" +msgstr "tiêu chí tìm kiếm mở rộng không mong đợi “%s”" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" -msgstr "gặp vị ngữ thêm bất ngờ" +msgstr "tiêu chí tìm kiếm mở rộng" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" -msgstr "rỗ tiếc — việc chèn mặc định điều « and » một cách không hợp lệ." +msgstr "ối trời — chèn -and mặc định sai!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " -msgstr "Cách sá»­ dụng: %s [-H] [-L] [-P] [-Ocấp] [-D " +msgstr "Cách dùng: %s [-H] [-L] [-P] [-Ocấp] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [đường dẫn...] [biểu thức]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "lỗi trở về thÆ° mục mẹ" +msgstr "gặp lỗi khi lÆ°u thÆ° mục ban đầu" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "lỗi trở về thÆ° mục mẹ" +msgstr "gặp lỗi khi phục hồi thÆ° mục làm việc ban đầu" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" -msgstr "Đang bỏ qua cờ gỡ lỗi không nhận diện %s" +msgstr "Đang bỏ qua cờ gỡ lỗi không nhận diện được %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." -msgstr "Đối số rỗng tới tùy chọn « -D »" +msgstr "Đối số tuỳ chọn -D bị rỗng." -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" -msgstr "Tùy chọn « -O » phải có một số nguyên thập phân theo đúng sau" +msgstr "Cần một số nguyên thập phân ngay sau tuỳ chọn -O" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" -msgstr "Hãy ghi rõ một số thập phân đúng sau « -O »" +msgstr "Hãy chỉ định một số nguyên thập phân ngay sau tuỳ chọn -O" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" -msgstr "Cấp tối Æ°u hoá không hợp lệ %s" +msgstr "Cấp tối Æ°u %s không hợp lệ" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -"Cấp tối Æ°u hoá %lu quá cao. Để tìm nhanh tập tin, khuyên bạn dùng phần mềm " -"locate của GNU." +"Cấp tối Æ°u %lu là quá cao. Để tìm nhanh tập tin, nên dùng phần mềm locate " +"của GNU." -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " "that affects the block size is the POSIXLY_CORRECT environment variable" msgstr "" -"Không hỗ trợ biến môi trường « FIND_BLOCK_SIZE » (tim kích cỡ của khối) thì " -"chỉ một điều làm ảnh hướng đến kích cỡ của khối: biến môi trường « " -"POSIXLY_CORRECT » (đúng kiểu Posix)" +"Không hỗ trợ biến môi trường FIND_BLOCK_SIZE. Chỉ có biến môi trường " +"POSIXLY_CORRECT tác động đến kích thước khối" + +#: gl/lib/argmatch.c:133 +#, fuzzy, c-format +msgid "invalid argument %s for %s" +msgstr "đối số “%s” không hợp lệ cho “%s”" + +#: gl/lib/argmatch.c:134 +#, fuzzy, c-format +msgid "ambiguous argument %s for %s" +msgstr "đối số “%s” không hợp lệ cho “%s”" + +#: gl/lib/argmatch.c:153 +#, fuzzy +msgid "Valid arguments are:" +msgstr "Đối số không hợp lệ “%s” cho -used" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "lỗi ghi" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "Phép thá»­ %s yêu cầu một đối số" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "cảnh báo: ký tá»± thoát lạ “\\%c”" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s: số không hợp lệ đối với tùy chọn -%c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "Phép thá»­ %s yêu cầu một đối số" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "gặp lỗi khi phục hồi thÆ° mục làm việc ban đầu" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "gặp lỗi khi phục hồi thÆ° mục làm việc ban đầu" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" -#: lib/buildcmd.c:171 +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "đối số “%s” không hợp lệ cho “%s”" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "đối số “%s” không hợp lệ cho “%s”" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "danh sách đối số quá dài" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "lệnh quá dài" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "không gọi được exec() do giới hạn kích cỡ đối số" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" -msgstr "không thể vừa đối số đơn bên trong giới hạn kích cỡ danh sách đối số" +msgstr "" +"không thể khớp một đối số đơn bên trong giới hạn kích cỡ danh sách đối số" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "danh sách đối số quá dài" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" -msgstr "Biến môi trường %s không phải được lập thành một số thập phân đúng" +msgstr "Biến môi trường %s không chứa số thập phân hợp lệ" + +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"Bộ mô tả tập tin %d sẽ rò rỉ; hãy báo cáo đây là một lỗi, đừng quên bao gồm " +"cả các thông tin chi tiết cách mà nó nảy sinh vấn đề dưới định dạng đơn giản " +"nhất." # Name: don't translate/Tên: đừng dịch -#: lib/findutils-version.c:60 +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" # Name: don't translate/Tên: đừng dịch -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" # Name: don't translate/Tên: đừng dịch -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "Lỗi ghi vào đầu ra tiêu chuẩn" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "Xây dá»±ng dùng gnulib phiên bản %s của GNU\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "Kiểu biểu thức chính quy không thể hiểu nổi %s; kiểu hợp lệ là %s." -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" -msgstr "Gặp hậu tố không mong đợi %s trên %s" +msgstr "Gặp hậu tố không cần %s trên %s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" -msgstr "Mong đợi một số nguyên: %s" - -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "Không rõ kiểu biểu thức chính quy %1$s: kiểu hợp lệ là %2$s." +msgstr "Cần số nguyên: %s" -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" msgstr "" -"Cách sá»­ dụng: %s [--version | --help]\n" -"\t\t\t\t\t(phiên bản, trợ giúp)\n" -"hoặc\n" -"%s gần_hết_chữ_đôi_thường < danh_sách_tập_tin > cÆ¡_sở_dữ_liệu_định_vị\n" +"Cách dùng: %s [--version | --help]\n" +"hoặc %s bigram-thông-dụng < danh-mục-tập-tin > CSDL-locate\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" msgstr "" "\n" -"Hãy thông báo lỗi nào cho .\n" - -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "lỗi ghi" +"Hãy thông báo lỗi (bằng tiếng Anh) cho .\n" +"Thông báo lỗi dịch cho: \n" -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -"Sá»­ dụng: %s [-0 | --null] [--version] [--help]\n" +"Cách dùng: %s [-0 | --null] [--version] [--help]\n" "\n" "null\t\tvô giá trị\n" "version\tphiên bản\n" "help\t\ttrợ giúp\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "Bạn cần phải ghi rõ một cấp bảo mật dạng số nguyên thập phân." -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "Cấp bảo mật %s bên ngoài phạm vi có thể chuyển đổi." -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "Cấp bảo mật %s có hậu tố bất thường %s." -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "Cấp bảo mật slocate %ld không được hỗ trợ." -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "Lỗi ghi vào đầu ra tiêu chuẩn" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "ngày" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" -msgstr "Đối số cho tùy chọn « --max-database-age » không thể là rỗng" +msgstr "Đối số cho tùy chọn “--max-database-age” không thể là rỗng" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "" -"đối số %s không hợp lệ cho tùy chọn « --max-database-age » (tuổi cÆ¡ sở dữ " -"liệu tối đa)" +"Đối số %s không hợp lệ cho tùy chọn “--max-database-age” (tuổi cÆ¡ sở dữ liệu " +"tối đa)" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "cÆ¡ sở dữ liệu locate %s chứa một tên tập tin dài hÆ¡n ngưỡng của locate" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "cÆ¡ sở dữ liệu locate (định vị) %s bị hỏng hay không hợp lệ" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Kích cỡ cÆ¡ sở dữ liệu định vị: %s byte\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "Tên tập tin khớp: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "Mọi tên tập tin: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -962,24 +1280,24 @@ msgstr "" "\t%s chứa ký tá»± dòng mới, \n" "\t%s chứa ký tá»± đặt bit cao\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "Một số tập tin có thể bị lọc ra thì không thể tính tá»· lệ nén.\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "Tá»· lệ nén %4.2f%% (cao hÆ¡n thì tốt hÆ¡n)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" -msgstr "Tá»· lệ nén không xác định.\n" +msgstr "Tá»· lệ nén không được định nghÄ©a.\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -988,7 +1306,7 @@ msgstr "" "cÆ¡ sở dữ liệu định vị %s hình nhÆ° cÆ¡ sở dữ liệu slocate, nhÆ°ng có vẻ là nó " "có cấp bảo mật %c mà GNU findutils không hiện thời hỗ trợ" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -997,7 +1315,7 @@ msgstr "" "%s là cÆ¡ sở dữ liệu kiểu slocate. Chỉ bắt đầu hỗ trợ kiểu này: có thể gặp " "lỗi." -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." @@ -1005,46 +1323,46 @@ msgstr "" "%s là cÆ¡ sở dữ liệu kiểu slocate có cấp bảo mật không được hỗ trợ %d nên bỏ " "qua nó." -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" "format databases with a non-zero security level. No results will be " "generated for this database.\n" msgstr "" -"Bạn đã ghi rõ tùy chọn « -E », nhÆ°ng tùy chọn đó không thể được dùng với cÆ¡ " -"sở dữ liệu định dạng slocate có cấp bảo mật khác số không. Vi thế không tạo " -"ra kết quả cho cÆ¡ sở dữ liệu này.\n" +"Bạn đã ghi rõ tùy chọn “-E”, nhÆ°ng tùy chọn đó không thể được dùng với cÆ¡ sở " +"dữ liệu định dạng slocate có cấp bảo mật khác số không. Vi thế không tạo ra " +"kết quả cho cÆ¡ sở dữ liệu này.\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." -msgstr "%s là cÆ¡ sở dữ liệu kiểu slocate nên bật tùy chọn « -e »." +msgstr "%s là cÆ¡ sở dữ liệu kiểu slocate nên bật tùy chọn “-e”." -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "CÆ¡ sở dữ liệu locate định dạng cÅ© %s quá ngắn để hợp lệ" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" -msgstr "CÆ¡ sở dÆ° liệu %s có định dạng %s.\n" +msgstr "CÆ¡ sở dữ liệu %s có định dạng %s.\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "CÆ¡ sở dữ liệu này có mã hoá từ-máy về cuối nhỏ.\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "CÆ¡ sở dữ liệu này có mã hoá từ-máy về cuối lớn.\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "Thứ tá»± mã hoá từ-máy của cÆ¡ sở dữ liệu này không phải hiển nhiên.\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -1055,174 +1373,188 @@ msgid "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" msgstr "" -"Sá»­ dụng: %s [-d đường_dẫn | --database=đường_dẫn] (cÆ¡ sở dữ liệu)\n" -"\t[-e | -E| --[non-] existing] \t\t([không] tồn tại)\n" -"\t[-i | --ignore-case] \t(không phân biệt chữ hoa/thường)\n" -"\t[-w | --wholename] \t(tên đầy đủ)\n" -"\t[-b | --basename] \t\t(tên cÆ¡ sở)\n" -"\t[--limit=N | -l N] \t\t(giới hạn)\n" -"\t[-S | --statistics] \t\t(thống kê)\n" -"\t[-0 | --null] \t\t\t(vô giá trị)\n" -"\t[-c | --count] \t\t\t(đếm)\n" -"\t[-P | -H | --nofollow] \t(không đi theo)\n" -"\t[-L | --follow] \t\t(đi theo)\n" -"\t[-m | --mmap ] \t\t(sÆ¡ đồ vùng nhớ)\n" -"\t[ -s | --stdio ] \t\t(tđầu vào/ra tiêu chuẩn)\n" -"\t[-A | --all] \t\t\t(tất cả)\n" -"\t[-p | --print]\t\t\t(in)\n" -"\t[-r | --regex ] \t\t(biểu thức chính quy)\n" -"\t[--regextype=KIỂU]\t\tkiểu biểu thức chính quy\n" -"\t[--max-database-age D]\t\t(tuổi cÆ¡ sở dữ liệu tối đa)\n" -"\t[--version] \t\t\t(phiên bản)\n" -"\t[--help] mẫu... \t\t(trợ giúp)\n" -"\tpattern...\t\t\t\t(mẫu)\n" - -#: locate/locate.c:1463 +"Cách dùng: %s\t[-d đường_dẫn | --database=đường_dẫn] (cÆ¡ sở dữ liệu)\n" +"\t[-e | -E| --[non-]existing]\t([không] tồn tại)\n" +"\t[-i | --ignore-case]\t(không phân biệt HOA/thường)\n" +"\t[-w | --wholename]\t(tên đầy đủ)\n" +"\t[-b | --basename]\t(tên cÆ¡ sở)\n" +"\t[--limit=N | -l N]\t(giới hạn)\n" +"\t[-S | --statistics]\t(thống kê)\n" +"\t[-0 | --null]\t\t(vô giá trị)\n" +"\t[-c | --count]\t\t(đếm)\n" +"\t[-P | -H | --nofollow]\t(không đi theo)\n" +"\t[-L | --follow]\t\t(đi theo)\n" +"\t[-m | --mmap ]\t\t(ánh xạ bộ nhớ)\n" +"\t[-s | --stdio ]\t\t(đầu vào/ra tiêu chuẩn)\n" +"\t[-A | --all] \t\t(tất cả)\n" +"\t[-p | --print]\t\t(in)\n" +"\t[-r | --regex ]\t\t(biểu thức chính quy)\n" +"\t[--regextype=KIỂU]\t(KIỂU biểu thức chính quy)\n" +"\t[--max-database-age D]\t(tuổi cÆ¡ sở dữ liệu tối đa)\n" +"\t[--version]\t\t(phiên bản)\n" +"\t[--help] mẫu...\t\t(trợ giúp)\n" +"\tpattern...\t\t(mẫu)\n" + +#: locate/locate.c:1435 msgid "failed to drop group privileges" -msgstr "lỗi bỏ quyền hạn nhóm" +msgstr "gặp lỗi khi bỏ quyền hạn nhóm" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" -msgstr "lỗi bỏ quyền hạn setuid" +msgstr "gặp lỗi khi bỏ quyền hạn setuid" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" -msgstr "Lỗi bỏ hoàn toàn quyền hạn" +msgstr "Gặp lỗi khi bỏ hoàn toàn quyền hạn" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" -msgstr "lỗi bỏ quyền hạn setgid" +msgstr "gặp lỗi khi bỏ quyền hạn setgid" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "" -"cảnh báo : cÆ¡ sở dữ liệu định vị có thể được đọc từ thiết bị xuất chuẩn chỉ " +"cảnh báo: cÆ¡ sở dữ liệu định vị có thể được đọc từ thiết bị xuất chuẩn chỉ " "một lần thôi." -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "cuộc gọi hệ thống thời gian đã không thành công" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" -msgstr "cảnh báo : cÆ¡ sở dữ liệu %s cÅ© hÆ¡n %d %s (thật là %.1f %s)" +msgstr "cảnh báo: cÆ¡ sở dữ liệu %s cÅ© hÆ¡n %d %s (thật là %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -"CẢNH BÁO : cÆ¡ sở dữ liệu locate %s đã được xây dá»±ng với thứ tá»± byte khác" +"CẢNH BÁO: cÆ¡ sở dữ liệu locate %s đã được xây dá»±ng với thứ tá»± byte khác" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "gặp kết thúc tập tin bất thường trong %s" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "gặp lỗi khi đọc một từ trong %s" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." -msgstr "Gặp dãy thoát không hợp lệ « %s » trong đặc tả giới hạn dữ liệu nhập" +msgstr "Dãy thoát không hợp lệ %s trong đặc tả phân cách dữ liệu nhập" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "" -"Gặp dãy thoát không hợp lệ %s trong đặc tả giới hạn dữ liệu nhập: không cho " -"phép giá trị ký tá»± vượt trội %lx." +"Dãy thoát không hợp lệ %s trong đặc tả phân cách dữ liệu nhập: không cho " +"phép giá trị ký tá»± vượt %lx." -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "" -"Gặp dãy thoát không hợp lệ %s trong đặc tả giới hạn dữ liệu nhập: không cho " -"phép giá trị ký tá»± vượt trội %lo." +"Dãy thoát không hợp lệ %s trong đặc tả phân cách dữ liệu nhập: không cho " +"phép giá trị ký tá»± vượt %lo." -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "" -"Gặp dãy thoát không hợp lệ %s trong đặc tả giới hạn dữ liệu nhập: không nhận " -"ra ký tá»± %s nằm theo." +"Dãy thoát không hợp lệ %s trong đặc tả phân cách dữ liệu nhập: không nhận ra " +"ký tá»± %s ở chót." -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " "single character or an escape sequence starting with \\." msgstr "" -"Gặp đặc tả giới hận dữ liệu nhập không hợp lệ « %s »: dấu giới hạn phải là " -"hoặc một ký tá»± đơn hoặc một dãy thoát bắt đầu với « \\ »." +"Đặc tả phân cách dữ liệu nhập %s không hợp lệ: dấu phân cách phải là hoặc " +"một ký tá»± đơn hoặc một dãy thoát bắt đầu bằng \\." -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" -msgstr "môi trường quá lớn đối với « exec » (thì hành)" +msgstr "môi trường quá lớn với “exec”" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" -msgstr "" -"cảnh báo : giá trị %ld cho tùy chọn « -s » quá lớn nên thay thế bằng %ld" +msgstr "cảnh báo: giá trị %ld cho tùy chọn -s quá lớn nên dùng %ld" + +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "tùy chọn --%s không thể được đặt thành giá trị mà nó bao gồm “=”" -#: xargs/xargs.c:629 +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "gặp lỗi khi bỏ đặt được biến môi trường %s" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "cảnh báo: tùy chọn -E không có tác dụng nếu dùng tùy chọn -0 hay -d.\n" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" -msgstr "" +msgstr "Không thể đặt trình xá»­ lý tín hiệu SIGUSR1" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "Không thể đặt trình xá»­ lý tín hiệu SIGUSR2" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "Không thể mở tập tin nhập %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" -msgstr "Các biến môi trường của bạn đều chiếm % byte\n" +msgstr "Các biến môi trường của bạn chiếm % byte\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" -msgstr "Giới hạn POSIX trên về chiều dài đối số (hệ thống này): %\n" +msgstr "Giới hạn trên POSIX về chiều dài đối số (hệ thống này): %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "" -"Giới hạn POSIX trên nhỏ nhất cho phép về chiều dài đối số (mọi hệ thống): " +"Giới hạn trên POSIX nhỏ nhất cho phép về chiều dài đối số (mọi hệ thống): " "%\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" -msgstr "Chiều dài câu lệnh tối đa mà thật có thể dùng: %\n" +msgstr "Chiều dài câu lệnh tối đa có thể dùng: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" -msgstr "Kích cỡ vùng đệm lệnh thá»±c sá»± đang sá»­ dụng: %\n" +msgstr "Kích cỡ vùng đệm lệnh thá»±c sá»± dùng: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1231,148 +1563,438 @@ msgid "" "of-file keystroke.\n" msgstr "" "\n" -"Bây giờ sẽ tiếp tục thá»±c hiện xargs, cÅ©ng thá»­ đọc các lệnh nhập/xuất của nó. " -"Không muốn thì gõ phím kết thúc tập tin.\n" +"Bây giờ sẽ tiếp tục chạy xargs đọc lệnh nhập và chạy lệnh. Không muốn thí " +"nhấn phím hết-tập-tin (Ctrl-D).\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" -msgstr "" -"Cảnh báo : %s sẽ được chạy ít nhất một lần. Không muốn thì bấm phím ngắt.\n" +msgstr "Cảnh báo: %s sẽ chạy ít nhất một lần. Không muốn thì bấm phím ngắt.\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " "the -0 option" msgstr "" -"chÆ°a khớp dấu trích dẫn %s; mặc định là mọi dấu trích dẫn đơn là đặc biệt " -"với xargs nếu không dùng tùy chọn -0" +"dấu trích dẫn %s không khớp; mặc định xargs coi mọi dấu trích dẫn là đặc " +"biệt trừ khi dùng tuỳ chọn -0" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "đôi" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "đơn" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -"CẢNH BÁO : gặp một ký tá»± NUL (vô giá trị) trong đầu vào. Không thể gá»­i ký tá»± " -"này trong danh sách đối số. Bạn dá»± định sá»­ dụng tuỳ chọn « --null » (vô giá " -"trị) không?" +"CẢNH BÁO: gặp ký tá»± NUL trong đầu vào. Không thể gá»­i ký tá»± này trong danh " +"sách đối số. Bạn định dùng --null?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "dòng đối số quá dài" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "Lỗi ghi vào đầu ra tiêu chuẩn" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" -msgstr "đã không mở được « /dev/tty » để đọc" +msgstr "gặp lỗi khi mở /dev/tty để đọc" + +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "Lỗi ghi vào đầu ra tiêu chuẩn" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "không thể cấp phát vùng nhớ" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "gặp lỗi khi đặt được biến môi trường %s" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "không tạo được ống dẫn trước khi phân nhánh" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -"Gặp lỗi đọc vùng đệm số thứ tá»± lỗi (errno-buffer) trong « xargs_do_exec " -"» (rất có thể là một lỗi phần mềm: thông báo nhé)" +"gặp lỗi khi đọc errno-buffer trong xargs_do_exec (đây gần nhÆ° chắc chắn là " +"lỗi, vui lòng báo cáo)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" -msgstr "" -"chức năng đọc trả lại giá trị bất thường %d (rất có thể là một lỗi phần mềm: " -"thông báo nhé)" +"read returned unexpected value %zu; this is probably a bug, please report it" +msgstr "đọc giá trị trả về %d không mong đợi; có thể là lỗi, vui lòng báo cáo" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" -msgstr "gặp lỗi khi đời tiến trình con" +msgstr "gặp lỗi khi chờ tiến trình con" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "CẢNH BÁO : mất dấu vết của %d tiến trình con" +msgid "WARNING: Lost track of %lu child processes" +msgstr "CẢNH BÁO: Mất dấu vết của %lu tiến trình con" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" -msgstr "%s: đã thoát với trạng thái 255; nên hủy bỏ" +msgstr "%s: đã thoát với trạng thái 255; thoát" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: bị ngừng bởi tín hiệu %d" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: bị chấm dứt bởi tín hiệu %d" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: số không hợp lệ đối với tùy chọn -%c\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" -msgstr "%s: giá trị cho tùy chọn -%c nên ≥ %ld\n" +msgstr "%s: giá trị cho tùy chọn -%c nên >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: giá trị cho tùy chọn -%c nên < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"Cách sá»­ dụng: %s [-0prtx]\n" -"[--interactive]\t\ttÆ°Æ¡ng tác\n" -" [--null]\t\t\trỗng\n" -" [-d|--delimiter=dấu_giới_hạn]\n" -"[-E eof-str] [-e[eof-str]] [--eof[=eof-str]] (chuỗi kết thúc tập tin)\n" -"[-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -"\t(số dòng tối đa)\n" -"[-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -"\t(thay thế chuỗi)\n" -"[-n max-args] [--max-args=max-args] (số đối số tối đa)\n" -"[-s max-chars] [--max-chars=max-chars] (số ký tá»± tối đa)\n" -"[-P max-procs] [--max-procs=max-procs] (số tiến trình tối đa)\n" -"[--verbose]\t\t\t\t\t\t(xuất chi tiết)\n" -"[--exit] \t\t\t\t\t\t\t(thoát)\n" -"[--no-run-if-empty] \t\t(đừng chạy nếu trống)\n" -"[--arg-file=tập_tin]\t\t\t\t(tập tin đối số)\n" -"[--version]\t\t\t\t\t\t(phiên bản)\n" -"[--help]\t\t\t\t\t\t\t(trợ giúp)\n" -"[lệnh [các_đối_số_đầu]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "Cách dùng: %s [TÙY-CHỌN]... LỆNH [CÁC-ĐỐI-SỐ-KHỞI-TẠO]...\n" + +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"Chạy LỆNH với đối số Đ.SỐ-KHỞI-TẠO và các đối số khác được đọc vào từ đầu " +"vào.\n" +"\n" + +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" +"Các đối số và tùy chọn bắt buộc khi dùng với tùy chọn dài thì\n" +"cÅ©ng bắt buộc khi dùng với tùy chọn dạng ngắn.\n" + +#: xargs/xargs.c:1626 +#, fuzzy +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" +" -0, --null các mục được ngăn cách bằng null, chứ không " +"phải\n" +" khoảng trắng; tắt xá»­ lý trích dẫn và\n" +" dấu gạch ngược và xá»­ lý EOF\n" + +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" +" -a, --arg-file=TẬP-TIN đọc các đối số từ TẬP-TIN không từ đầu vào " +"chuẩn\n" + +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" +" -d, --delimiter=KÝ-Tá»° các mục trong dòng dữ liệu đầu vào được ngăn " +"cách\n" +" bằng KÝ-Tá»°,chứ không phải khoảng trắng; tắt " +"xá»­\n" +" lý trích dẫn và dấu gạch ngược và xá»­ lý " +"EOF\n" + +#: xargs/xargs.c:1633 +#, fuzzy +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" +" -E END đặt chuỗi lôgíc EOF; nếu END xuất hiện tại " +"dòng\n" +" của đầu vào thì phần còn lại sẽ bị bỏ qua\n" +" (bị bỏ qua nếu -0 hay -d được chỉ định)\n" + +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" +" -e, --eof[=END] tÆ°Æ¡ng đương với -E END nếu END được chỉ ra; " +"nếu\n" +" không thì ở đây không có chuỗi kết-thúc-tập-" +"tin\n" + +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr " -I R giống với --replace=R\n" + +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" +" -i, --replace[=R] thay thế R trong ĐỐI-SỐ-KHỞI-TẠO với các tên " +"đọc\n" +" từ đầu vào tiêu chuẩn; nếu không chỉ ra R,\n" +" thì coi là {}\n" + +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" +" -L, --max-lines=SỐ-DÒNG-TĐ dùng nhiều nhất là SỐ dòng này đối với mỗi " +"dòng\n" +" lệnh\n" + +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" +" -l[SỐ-DÒNG-TỐI-ĐA] tÆ°Æ¡ng tá»± nhÆ° -L nhÆ°ng mặc định là nhiều nhất " +"là\n" +" một dòng không trống nếu không đưa ra giá " +"trị\n" + +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" +" -n, --max-args=MAX-ARGS dùng tối đa MAX-ARGS đối số trên mỗi dòng " +"lệnh\n" + +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" +" -P, --max-procs=MAX-PROCS chạy tối đa MAX-PROCS tiến trình cùng lúc\n" + +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr " -p, --interactive nhắc trước khi chạy lệnh\n" + +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" +" --process-slot-var=BIẾN đặt biến môi trường trong tiến trình con\n" + +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" +" -r, --no-run-if-empty nếu không có đối số thì không chạy LỆNH;\n" +" nếu không có tùy chọn này thì LỆNH chạy\n" +" ít nhất một lần\n" + +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr " -s, --max-chars=SỐ-CHá»®-T.ĐA giới hạn chiều dài lệnh thành SỐ này\n" + +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" +" --show-limits hiển thị giới hạn về độ dài của dòng lệnh\n" + +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr " -t, --verbose in lệnh trước khi thi hành chúng\n" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" +" -x, --exit thoát nếu kích thước (xem -s) bị vượt quá\n" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr " --help hiển thị trợ giúp này rồi thoát\n" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr " --version đưa ra thông tin phiên bản rồi thoát\n" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "Chế độ %s không hợp lệ khi POSIXLY_CORRECT hoạt động." + +#~ msgid "" +#~ "\n" +#~ "Mandatory arguments to long options are mandatory for short options too.\n" +#~ "Non-mandatory arguments are indicated by [square brackets]\n" +#~ " -0, --null Items are separated by a null, not " +#~ "whitespace.\n" +#~ " Disables quote and backslash processing\n" +#~ " -a, --arg-file=FILE Read arguments from FILE, not standard " +#~ "input\n" +#~ " -d, --delimiter=CHARACTER Input items are separated by CHARACTER, " +#~ "not by\n" +#~ " blank space. Disables quote and backslash\n" +#~ " processing\n" +#~ " -E END If END occurs as a line of input, the rest " +#~ "of\n" +#~ " the input is ignored.\n" +#~ " -e [END], --eof[=END] Equivalent to -E END if END is specified.\n" +#~ " Otherwise, there is no end-of-file string\n" +#~ " --help Print a summary of the options to xargs.\n" +#~ " -I R same as --replace=R (R must be specified)\n" +#~ " -i,--replace=[R] Replace R in initial arguments with names\n" +#~ " read from standard input. If R is\n" +#~ " unspecified, assume {}\n" +#~ " -L,-l, --max-lines=MAX-LINES Use at most MAX-LINES nonblank input lines " +#~ "per\n" +#~ " command line\n" +#~ " -l Use at most one nonblank input line per\n" +#~ " command line\n" +#~ " -n, --max-args=MAX-ARGS Use at most MAX-ARGS arguments per " +#~ "command\n" +#~ " line\n" +#~ " -P, --max-procs=MAX-PROCS Run up to max-procs processes at a time\n" +#~ " -p, --interactive Prompt before running commands\n" +#~ " --process-slot-var=VAR Set environment variable VAR in child\n" +#~ " processes\n" +#~ " -r, --no-run-if-empty If there are no arguments, run no " +#~ "command.\n" +#~ " If this option is not given, COMMAND will " +#~ "be\n" +#~ " run at least once.\n" +#~ " -s, --max-chars=MAX-CHARS Limit commands to MAX-CHARS at most\n" +#~ " --show-limits Show limits on command-line length.\n" +#~ " -t, --verbose Print commands before executing them\n" +#~ " --version Print the version number\n" +#~ " -x, --exit Exit if the size (see -s) is exceeded\n" +#~ msgstr "" +#~ "\n" +#~ "Tùy chọn dài yêu cầu đối số thì tùy chọn dạng ngắn cÅ©ng vậy.\n" +#~ "Các đối số không cần tham số được biểu diễn bởi [dấu ngoặc vuông]\n" +#~ " -0, --null Các mục được ngăn cách bởi null, không " +#~ "phải khoảng trắng.\n" +#~ " Tắt xá»­ lý dấu trích dẫn và dấu gạch ngược\n" +#~ " -a, --arg-file=TẬP-TIN Đọc các đối số từ TẬP-TIN, không từ đầu " +#~ "vào tiêu chuẩn\n" +#~ " -d, --delimiter=KÝ-Tá»° Các mục được ngăn cách bởi, not by KÝ-Tá»°, " +#~ "không phải\n" +#~ " khoảng trắng. Tắt xá»­ lý dấu trích dẫn và " +#~ "dấu\n" +#~ " gạch ngược\n" +#~ " -E CUỐI Nếu CUỐI xảy ra nhÆ° là một dòng của đầu " +#~ "vào, điểm cuối của\n" +#~ " đầu vào bị bỏ qua.\n" +#~ " -e [CUỐI], --eof[=CUỐI] TÆ°Æ¡ng đương với -E CUỐI nếu CUỐI được đưa " +#~ "ra.\n" +#~ " Nếu không, ở đây không có chuỗi kết thúc " +#~ "tập tin\n" +#~ " --help Hiển thị dạng tổng quát các tùy chọn cho " +#~ "đối số.\n" +#~ " -I R giống với --replace=R (R phải được chỉ " +#~ "ra)\n" +#~ " -i,--replace=[R] Thay thế R trong các tham số khởi tạo với " +#~ "các tên\n" +#~ " đọc từ đầu vào tiêu chuẩn. Nếu R không " +#~ "được\n" +#~ " chỉ định, coi là {}\n" +#~ " -L,-l, --max-lines=MAX-LINES Dùng tối đa là MAX-LINES dòng không trống " +#~ "cho mỗi\n" +#~ " dòng lệnh\n" +#~ " -l Dùng tối đa là một dòng không trống cho " +#~ "mỗi\n" +#~ " dòng lệnh\n" +#~ " -n, --max-args=MAX-ARGS Dùng tối đa là MAX-ARGS tham số cho mỗi\n" +#~ " dòng lệnh\n" +#~ " -P, --max-procs=MAX-PROCS Chạy cùng lúc tối đa max-procs tiến trình\n" +#~ " -p, --interactive Hỏi trước khi chạy lệnh\n" +#~ " --process-slot-var=VAR Đặt biến môi trường VAR trong tiến\n" +#~ " trình con\n" +#~ " -r, --no-run-if-empty Nếu không có đối số nào, không chạy lệnh.\n" +#~ " Nếu tùy chọn này không được đưa ra, LỆNH " +#~ "sẽ chạy\n" +#~ " ít nhất một lần.\n" +#~ " -s, --max-chars=MAX-CHARS Giới hạn lệnh độ dài tối đa là MAX-CHARS\n" +#~ " --show-limits Hiển thị giới hạn độ dài dòng lệnh.\n" +#~ " -t, --verbose Hiển thị lệnh trước khi thá»±c thi nó\n" +#~ " --version Hiển thị phiên bản của phần mềm\n" +#~ " -x, --exit Thoát nếu kích thước (xem -s) bị vượt quá\n" #~ msgid "cannot get current directory" #~ msgstr "không thể lấy thÆ° mục hiện có" + +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "Xây dá»±ng dùng gnulib của GNU phiên bản %s\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "Cách dùng: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=phân-" +#~ "cách]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=chuỗi-eof]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=số-dòng-tối-đa]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=chuỗi-thay-thế]]\n" +#~ " [-n max-args] [--max-args=đối-số-tối-đa]\n" +#~ " [-s max-chars] [--max-chars=ký-tá»±-tối-đa]\n" +#~ " [-P max-procs] [--max-procs=số-tiến-trình-tối-đa] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=tập-tin]\n" +#~ " [--version] [--help] [lệnh [đối số khởi đầu]]\n" diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo index c8b17237a76a2b1a11d7bd09fd75474c4eefbe1c..8fb2c3b4aa56742095b5a90c77f3ff00ca0df426 100644 GIT binary patch delta 7277 zcmaKu33QZImd9TuD1+K8VGEmlEHNwzWMMO?Y$7{ikN~1UrSgT8RH|YviD=r2tO0>U z3JB0BYak*aflt;1QM=u@ZpSm8ar*R8J71+T?Z}MBGc#`E{BC_;gr@C&C;$B3yY=e5 z`|i8r7p3ob#@P9`B(4~N5t zx-0c9Tn{VZQ$3XG4LkN!Y9<^A=ffg69-fDT;nkihtWxPD^-`)F=D@x(0S4hma44L? zYVrjSOommkAFPAo!0+G)_!ShV`!K01><95trNK-%3Ci~#gG1o9)zoW>vro*LhAlzizk3)^|+wd;<@31pW@k_p62gUKX!gMCn z`5MXzvvE&6&Vx134Grk%uhcAf7Ix-{Kfya0cfQ>^$xJwbu?NaYYavtACs2dmz`I~i zcF%{oHp6G>xG*GZ+&wIZ1K^KPPSTI#lL~4Cya$ela-vc=4sM6z;p=b}{1J|UI;S}g z_rZ}cmw0Exr{H3E20pI1|67Q=Y`6|if`{OX@N>8XZcDK|k3tFAkUNz64$gzJ;7k%o z94Utq5d#i`{{f$cy%-#Yb?{y|k3|T!+5rc!zpAGrCwLcZSY zd887l$D7~)n?oS`tKm@Yb|j=g)J&Tzpd6$W-VIN|Y4A%Zk;))3y21h|`-NcmRyvLL z2hC8f;(dGk7sz$0A7BS~JICR9P(z^DN5CXF7m7nGphTt|l2+B^#F4a6GojpZF(fV2ZYWpO40&5r3+xTQgL2nN zW37Xw!z9LY-~zaOEb*6x8!&ib6p{vN5k{F1hF#$AAr+)PgZQF;g1uli@s^~T4aK1< zSP3sc3H20eG8yJVS$8!Qhj&2@HihYYKU+bV>_CxXbV>lXq3)A3m zN<)$>4@yW&pj5>+mAQ3Iq*8jkGegN_>ZC! z%(G5<1YTtP7EFO_DGAx24$209fD(ak;6rfG68;x}0uv97jE~$x7B9srQJXH>R z!i(@>_#u>i)55GG8!UrI$^P}QJLBQZ5(n;vZs>yP@O>x_d=Di;!yd8tFw9|G4OhT- zAwO#5a_jTWa1Z0lun){*(oHa2Vs}cRWOq4~lUBek@CZzT2AmAvfU?)nGcZ@jROkKq;F=P&R%H4utEWMCK@zg)YG1 z@DK1#_&po~$L3rA$S#Ev@-470JZQ5C4rcr>@OG*HZ|TStB)hDIr$8yYhoCsJ#^x?4 z3!b(=e-nyhQ8)zNTwtAa1e7Gqff9*LP#&n4q1<^2r9kDW2VocXSBL4yMrYu7_yOzz zZ{}O%q3Q=^13%mdcS8x`fK}F8KLUy)Q{f#jAEv;~@O9V#<$$3g>*UYF|6%+p3}@20 zNQNcCzd#AiRVW)I@k$5>!aN6w2PO3DR$EuI9}ZyL0LA`3)L<0e3_E%(2RlQ8r0#&z z;1)QY^*--wLHWW<@Gh9_vm&twN)?=hqu{4dLfnaB|5rE}UV(id zvmE~v_GjD**-vdpr%`Y88d@p$PbsTkBS|7@XDp~&;0e3WyAyAZ^IOX59<&KnBDtbB z&{`yI3(}-xx3O?C+KeO-4IjpKjzp`!DqZfm- zwjt4GhRwU-OK6Zi7D#lTN3wtXj|*28PqJO`1+*7QdliKcITZgJPzraVu1H!RGzkqv z3(*5eaza|Qh4}vs(&cvIuclm?BxHan)T$FDAQJZHR`+v{|BmP{ zu*Xsvm(V)owrw|J1cp@GcpE%o_uq!oP<;P=wo&jR+KqD1RCF9klNYfFRiO)LI=X^7 zAwQBP&-FaigswkWH^vvyMD!r)f;yx7+ozQ=kh(8N0n~sFqI~o)>W3;&2ecna+kl=z zJJ2xH9W6uB=A#HoLFuTyEv0i5Z9~a%<8^M{hhYV}HU5G1Ya@6C-HYBt($1ro(RdmB zLK}rm?z#hE33BvmbP~OSK1MP01L{h+(!%_ji5^BJXg%74Zu4K;KoUjTQ1lb+Nj{UB zme$jPlKYg;b`w6CCrz9X+iTdy#w}KEiS1i#GqL50T@p@=(@6C!G0@s=W!Oerrk`zf z*xF08zx|n9fvk}pifr%NH#d!UqObjt6={T1$=Z zx^75_9PZJ_@b~yU!I2ut?Y%hiUhmqePOsM&)B<`?TR3aRqJ_DcTEM-^>-1QjS*mMgKL2XBca>J)_Uo>o&%Z`(h&;u^NyM)PFN`Y49_INap?p!@lD**vr^Xnx(e^3h+xdWP$ zA1yz$Dh+F~UYxJ{WiwWGdtIJTfzGD|deG_i=mm7Fb=^KZDCGM(t{1atAgGl&*TntN zOZ?q^1tFJiEnnjI<$LtvQO2si-h^x|B@q7>C=T%@XGw|f^lSN?DHzZ_g=u&a)YkYy zTA)OCxeMKTLFB{!%aWb`RiR?t8`M^&1X2R2vQc`#{e*4|8t_Dd@!r5CiJaM^2l3Vw z6z`m&ps&~&bi14$4}OLG-T=YT(hKyGV3D;;dI_=9wE~|W(73W9Id)l*-abhqHUwHP zEF|iqG;LO4+^;exUa-B(>E|Y7C+`}Lo|dXTDhJXZFY<?jW0n2((1V+EeqDh-0IS z+lM^k=$6K|A>vZN&3Sy@K$`Kw&_5=0_pbK(%Dh@&O(3WjYr5a>^GDXD))*s4G&@G; zIX&(ItvwRlnqSXRi>KtypEZ9*jyBiF?m@rPwOVc_#S=P{wmxyh@@3xnkErF#)+~KQ ztyIq9eD|u5FC^c!!$IV6(d(Go6b_XMk z83((tg3IHRZ)$}kig74&ucMFK>khif`@hNGNNV;Y;X*5;h-5s;|L$aU-9&0i_m;Z- zK5sl1N}YbUlOW>#b+bZVslC59Z#($A+T@PLy!wNj@iLKn6v$GnVC6R<40y>W@Oy5;QsVn zz0@6GkMw)lGe^tH$jna9;AeuCnH8TmAtS^1Xi9aWvE;u0PDuQs;=Z}j#X0jwwOqJl?yr+~ zr{%(y*p=$op{?e#ms^^S#wxb9TzSr{-(#MyZMnR^^*5)?%ex|9&&eu?R#nBWG`5~R zCXZ*-SRZY!nyAGZ&a*&tORc<>SDUxSPBoe@*O(WMVQt&At#x~2?8@Gj3l(iOr`ith zY2CLzy1%0JR7G_6Mb5%7)^Mz~X=AM6rRbjRf38?-44C_dL$apjLOs9Rn)bv_9gQ`v zYu#BF+jJs!=|#3^xx6vDwl2DLlX+@i%cYHx&*shUAAj{U)-$WtMt3#Z@1ewFS7oGe z{$OLy{1%6?a>3UL?GK{4rH^u8!mMs!t@cN$tzvWAp^MgD=H*DcId=BEgk)!3 zwC0>aEDK5Yq^ixp8k_4%%}03X8O_YHcQm zU$Ahxqo+*XxPwcLR_-=8oHI9XGpn~7^$$)>=o#IAqV+&6r))KvTAL2E?c5t{Xo!53 zx6jzO^i{_lW_6_%R4WKvagK`BA2XlblB1bNPn+ADQ!p7dIPQm;cIOo0T=OLv`lS<7Q)3+umxk@*G#zRX4RgyO;z&hSznFrI2t`ydBbOs?EGm-c9K}s$V9=DbY+hWI_wrVn3Sxw&a zipBG=qS-i6*xzCFDf+V`$#Tf7+$hnBZ(@A!KAkW+da&7SuCfY`oJ~n_rE2D-ow0^m z?mTw>fLTQyRkU0H%sc0t_uLZp{hQNMVtnfMz15xcM%KOCgg9aueBsShxW^KsP>rHb$fPQp)zsIa=5Oy*Ff?!!g6 z5ra5V9>5?b4pV9rK92JI2^@}ZVKV*;%0RxtEX<(y0k{+yi*jQQu1ER)ODNyFd`DQR zd&u-qF#;25RXV!Ywg8=!>oFA%VH&=U8h(V+(7~7c<8+*kg-DZX8)o1!lo$FTN;^F$ z1HLs(t&C_K%1D=?i8Z(Y?_`+$S%)f|LOFD&HQ-j1H~I2NH{z!zaDHlZx(M>rrZ%rvk-oShR&rxO|i`HghIr{Jgd<+MURVoiR;VFC_S$6d(jj>NvlSuz+KN%U} zIn2k8aW-Z!|1tx$D7*Q2K^16eIqj+|iCgm>U` zC<8u+gYZY=S^r`(SE!IL<}#mNT#K>)4Q1`$MLBLm zXsj9YkrS%kM7D|gHEP(0>3#?Aoy7dh8~&b(+Z>E?vQh<<)7WV|tLjju@EFS4pThq5 zGn4^EFq7~79_0;Fr_wo2LfM3iP-d(e`{Gs{hTCxko(PkfLFOx5Ktt0x3bOXi%)dJlCYij)A1Fo1N9ziBa-8PRShOy%d-xy=2VfD(RF^(-IdKs? z98+)^zKZKGsn9y!TTt429l1Kx6&ykTYCw^-o3n5U<%ez0VhQC0My2B_9EzRTAK$}7 z>_XWSpQ3EKAsm@(ydUM1Jc9S(E-b|k%*EjkvHqvY6q3onFHjn~hfy$i^&r-xfzolp zQtMQVM0vx9a4f!v@@7B74*V0!(zG#pY4<~vcKh-rdGjn>jVqQh|69qNqhccFE$2+) zV>kl$A_qd9!!`H`N{5R$I|Jj`Y$zSHtm23|*t{qMDdjai*oaR27^UOkG%_CN+HP3G z{O3{eG8N_6gJn3MAM)S{+>5_J8BpM1>)f~CAj${v0el7J`A<;>m`-D22`1qt{2Cf| z`7p{}Y7LV~B=ddD!uK#9)gzV(m`w3jT#2JF75@PT<3W^$&SED10H@$*D5q(x%i0S| za46+XD0^g|ZTLJHS(|rJrt&{f8ceRRzL1M4loz5j=s|g-7L+}55GUftDEC8JrS;~` z$OcyzQJ(MPwq9f?PNJNHL*)0rhYZWAzKPPod$*x3mvQO2U)z)7|BWkP}EI@f~G0IH)ZNs?S5$10+GV;b(*fDqEf1#8|K5AVUH-131FYkFym{6W=1L2%R`WNcuMMB(avLAWjmJZnIFY*zzkz zJ!|L3O8@&PthOr_*e; zFUb2ZBO_PrV&W+A4dO3TgI#ei${o>6+H2>Gmp^^oTz$snYzk-FHF%Z8J>i`31Rhe)wH zhu`{NQ}4P7ey)rAqmSKqu!;xed`prwl$1e8!@u<#V+V~~@-drJjus%&?`gHeC(<9HNINi z>#EbOudkNY1D>zzT2X05<@&XS^U5@5&>y0e;D&l#qtabpRU4Q?b;#q^iel|BTuM~R zu#09EGOC7~zENhT4EmP1zS&`B-1nUu%S#VbvixXpze2720iQaXqiFRO2)m>>2&M0 zo;nYo=SOp8_N?&fTut{?IRinzJgS$*3T2u!NvSmddex0DEz;^-4bEDRR}Tl|d$pyp za-b~Q_w{0F{`G8GuU;2ue!afdRjJ2%_LTOnh_+!@l;+>`$&EpHWe{Pf%U>NGgHt+^ zLbS(d?Tu#x(E(SoKsTO^mZA?^^*5d_jy_%Q_f_(=%!4!?Ek+-=KcGHPv(&eqd0=V- zz245rPO0z(tYy#}Ji+MuczsTP$m{e}IrX~w;D%@&!;J2ieAzUy77WLlp?7JemA<+< zm)EV8+FMLsE>x#`>B>Bu^|r$Zj~VW8oBPHz#hdf9Cpe6@oIMZGNkyotiajpJORI9x zu3PhXwFa4ya<{Ksj+mAatYJ&>k9Voy=xxwkT1BXOj8F%l8-`by%*eITQ18#&xy59NB-V`}wVrty{YHT)4L9yg6;oj`&&sAbe*Osv{SUOO`UzrC<-Zu$RwX^p(P>tuKH#mJ79zrMQOp7(j2 z@#eyZw66B!y|1jRPc(NQI4yTf_o1dp`)mD-VFgFcFAGLFQX%ZcmtWxaaxqXPd7ye#_js@ucUSHE`;`{Gykhr`6#hS4X)9O%*fFr@Llaw z>d(wWHOY=8R?FQ+OV_0XJ)OHE`w!7M4PQHW=-QE{?gNJ-jU9~mlaBp=Yqw^br^{is Ru6-rW*yDZOJngIN``;p{oTdN( diff --git a/po/zh_CN.po b/po/zh_CN.po index 96e2574..6c852f0 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -2,13 +2,13 @@ # Copyright (C) 2002, 2008 Free Software Foundation, Inc. # This file is distributed under the same license as the findutils package. # Wang Li , 2002. -# Ji ZhengYu , 2008, 2009, 2010. +# Ji ZhengYu , 2008, 2009, 2010, 2011, 2012, 2013 msgid "" msgstr "" -"Project-Id-Version: findutils-4.5.7\n" +"Project-Id-Version: findutils-4.5.11\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" -"PO-Revision-Date: 2010-04-20 16:12中国标准时间\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" +"PO-Revision-Date: 2013-03-08 12:27+0800\n" "Last-Translator: Ji ZhengYu \n" "Language-Team: Chinese (simplified) \n" "Language: zh_CN\n" @@ -17,32 +17,68 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: Plural-Forms: nplurals=1; plural=0;\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "Failed to save working directory in order to run a command on %s" +msgstr "无法为在 %s 上运行命令而保存工作目录" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "无法关闭标准输入" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "无法更改目录" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "无法 fork" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "等待 %s 时出错" + +#: find/exec.c:352 +#, c-format +msgid "%s terminated by signal %d" +msgstr "%s 由于信号 %d 而终止" + +#: find/find.c:203 +#, fuzzy, c-format +msgid "Failed to initialize shared-file hash table" msgstr "无法初始化共享文件哈希表" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "fnmatch() 库函数的健全性检测失败了。" + +#: find/find.c:263 #, c-format msgid "cannot stat current directory" msgstr "无法 stat 当前目录" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "无法读取挂载设备列表。" -#: find/find.c:385 +#: find/find.c:443 #, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "警告: 文件系统 %s 最近已被卸载过了。" -#: find/find.c:395 +#: find/find.c:453 #, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "警告: 文件系统 %s 最近已被挂载过了。" -#: find/find.c:491 +#: find/find.c:550 #, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -51,7 +87,7 @@ msgstr "" "%3$s 执行期间 %1$s%2$s 改变了(原来的设备号 %4$ld,新的设备号 %5$ld,文件系统" "类型 %6$s) [ref %7$ld]" -#: find/find.c:528 +#: find/find.c:587 #, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -60,17 +96,17 @@ msgstr "" "%3$s 执行期间 %1$s%2$s 改变了(原来的索引节点号 %4$,新的索引节点号 " "%5$,文件系统类型 %6$s) [ref %7$ld]" -#: find/find.c:693 +#: find/find.c:752 #, c-format msgid "failed to return to parent directory" msgstr "无法回到上级目录" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "无法安全的更改目录至 %s" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " @@ -78,7 +114,7 @@ msgid "" msgstr "" "符号链接 %s 是目录层级体系中一个循环的一部分;我们已经浏览过它所指向的目录。" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -90,12 +126,12 @@ msgstr[0] "" "探测到文件系统循环;%s 拥有与文件系统体系中 %d 级深度的目录一样的设备号和索引" "节点" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "警告: 符号链接 %s 无法检索" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -108,12 +144,12 @@ msgstr "" "个子目录): 这可能是您文件系统驱动中的错误。find 的 -noleaf 选项是自动开启的。" "之前的查找结果可能无法包括应该已被找到的目录。" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "无法读取挂载文件系统列表" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "未知" @@ -123,7 +159,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "探测到文件系统循环;%s 是与 %s 相同的文件系统循环的一部分。" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "警告: 文件 %s 的权限看上去为 0000" @@ -133,22 +169,27 @@ msgstr "警告: 文件 %s 的权限看上去为 0000" msgid "cannot search %s" msgstr "无法查找 %s" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, c-format msgid "failed to restore working directory after searching %s" msgstr "无法在查寻 %s 后还原工作目录" -#: find/parser.c:471 +#: find/ftsfind.c:677 #, fuzzy, c-format +msgid "Failed initialize shared-file hash table" +msgstr "无法初始化共享文件哈希表" + +#: find/parser.c:452 +#, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " "when -depth is in effect. If you want to carry on anyway, just explicitly " "use the -depth option." msgstr "" -"-delete 动作自动开启了 -depth 选项,但当 -depth 起作用时 -prune 就没什么用" -"了。如果您真想继续运行,就请明确使用 -depth 选项。" +"-delete 动作自动开启了 -depth 选项,但当 -depth 起作用时 -prune 就无效。若您" +"真想继续运行,就请写明使用 -depth 选项。" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -159,7 +200,7 @@ msgstr "" "警告: 您在非选项参数 %2$s 后定义了 %1$s 选项,但选项不是位置选项 (%3$s 影响在" "它之前或之后的指定的比较测试)。请在其它参数之前指定选项。\n" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -167,7 +208,7 @@ msgid "" msgstr "" "警告: 不赞成使用 -d 选项;请使用 -depth 代替,因为后者更符合 POSIX 特性。" -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " @@ -176,17 +217,17 @@ msgstr "" "%s 不是已存在用户组的名称并且它看起来不像是个数字组 ID,因为它有个非预期的后" "缀 %s" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "%s 不是已存在用户组的名称" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "-group 的参数列表为空,但应该给出一个用户组名" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -196,7 +237,7 @@ msgstr "" "默认路径为当前目录;默认表达式为 -print\n" "表达式可能由下列成份组成:操作符、选项、测试表达式以及动作:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -207,7 +248,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -221,7 +262,7 @@ msgstr "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -235,9 +276,10 @@ msgstr "" "式\n" " -links N -lname 匹配模式 -mmin N -mtime N -name 匹配模式 -newer 文件" -#: find/parser.c:1244 +#: find/parser.c:1239 +#, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -247,11 +289,11 @@ msgstr "" " -wholename 匹配模式 -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user 用户名 -xtype [bcdpfls]" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr " -context 文本\n" -#: find/parser.c:1251 +#: find/parser.c:1246 msgid "" "\n" "actions: -delete -print0 -printf FORMAT -fprintf FILE FORMAT -print \n" @@ -265,7 +307,7 @@ msgstr "" " -exec 命令 ; -exec 命令 {} + -ok 命令 ;\n" " -execdir 命令 ; -execdir 命令 {} + -okdir 命令 ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -274,12 +316,12 @@ msgstr "" "通过 findutils 错误报告页 http://savannah.gnu.org/ 报告错误及跟踪修定过程。如" "果您无法浏览网页,请发电子邮件至 。" -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "fnmatch() 库函数的健全性检测失败了。" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -293,47 +335,42 @@ msgstr "" "samefile’。又或者,如果您使用 GNU grep,您可使用‘find ... -print0 | grep -" "FzZ %s’。" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "本应对 %s 使用一个十进制的正整数作为参数,但却使用了 %s" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "此系统未提供查找文件生成时间的方法。" -#: find/parser.c:1638 +#: find/parser.c:1633 #, c-format msgid "The %s test needs an argument" msgstr "%s 测试需要参数" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "我无法找到将 %s 解释为日期或时间的方法" -#: find/parser.c:1692 +#: find/parser.c:1687 #, c-format msgid "Cannot obtain birth time of file %s" msgstr "无法获得文件 %s 的生成时间" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "警告: -%s 由于 %s 以 / 结尾因此无法匹配任何内容。" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "当开启 POSIXLY_CORRECT 时模式 %s 无效。" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, c-format msgid "invalid mode %s" msgstr "非法权限 %s" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -344,94 +381,102 @@ msgstr "" "改至与 -perm 000 一致了;那即是说,以前它不匹配任何文件,而现在它匹配所有文" "件。" -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "-size 的 null 参数无效" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "无效的 -size 类型“%c”" -#: find/parser.c:2334 -#, fuzzy, c-format +#: find/parser.c:2270 +#, c-format msgid "Invalid argument `%s%s' to -size" -msgstr "-size 的参数‘%s%c’无效" +msgstr "-size 的参数 `%s%s'无效" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "-show-control-chars 选项仅带一个参数,它必须是‘literal’或‘safe’" -#: find/parser.c:2630 +#: find/parser.c:2566 #, c-format msgid "Invalid argument %s to -used" msgstr "-used 的参数 %s 无效" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "用户名 %s 未知" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "-user 选项的参数不可以为空" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "开启的特性: " -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "-context 中的文本内容非法: SELinux 未开启。" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "-type 的参数应当仅包含一个字母" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" -msgstr "-type 的参数未知: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "敬告:无法识别的转义字符“\\%c”" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" -msgstr "错误: %s 位于格式字符串的末尾" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" -msgstr "警告:不可识别的格式指令“%%%c”" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." +msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" -msgstr "错误: 格式指令‘%%%c’是留给将来使用的。" +msgid "Unknown argument to -type: %c" +msgstr "-type 的参数未知: %c" -#: find/parser.c:3260 +#: find/parser.c:2923 #, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "当前目录包含在了 PATH 环境变量中,与 find 的 %s 动作合用时不安全。请从您的 " -"$PATH 变量中删除当前目录(即删除“.”或冒号前面或后面的东西)" +"$PATH 变量中删除当前目录(即删除“.”,冒号或其前后的东西)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -441,257 +486,264 @@ msgstr "" "相对路径 %s 包含在了 PATH 环境变量中,与 find 的 %s 动作合用时不安全。请从 " "$PATH 变量中删除那个条目" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " "this is a potential security problem." msgstr "您不可以在 -execdir 和 -okdir 中使用 {},因为这会带来潜在的安全问题。" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "-exec%s ... + 仅支持一个 {} 实例" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" -msgstr "" +msgstr "%s 中%s 默认调用自身,但您指定了%s" -#: find/parser.c:3435 +#: find/parser.c:3100 #, c-format msgid "The environment is too large for exec()." msgstr "对 exec() 操作来说执行环境过大。" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "将 %s 天换算为秒数时出现算术溢出" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "尝试计算本日终止时刻时出现算术溢出" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "标准错误" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "标准输出" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "无法删除 %s" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "无法在查寻 %s 后还原工作目录" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "getfilecon 失败: %s" - -#: find/pred.c:1507 +#: find/pred.c:718 #, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "警告: 无法确定文件 %s 的生成时间" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 +#, fuzzy, c-format +msgid "Failed to write prompt for -ok" +msgstr "无法写入标准输出" + +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Cannot close standard input" -msgstr "无法关闭标准输入" +msgid "getfilecon failed: %s" +msgstr "getfilecon 失败: %s" -#: find/pred.c:2061 +#: find/print.c:346 #, c-format -msgid "Failed to change directory" -msgstr "无法更改目录" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:365 #, c-format -msgid "cannot fork" -msgstr "无法 fork" +msgid "warning: unrecognized escape `\\%c'" +msgstr "敬告:无法识别的转义字符“\\%c”" -#: find/pred.c:2123 +#: find/print.c:385 #, c-format -msgid "error waiting for %s" -msgstr "等待 %s 时出错" +msgid "error: %s at end of format string" +msgstr "错误: %s 位于格式字符串的末尾" -#: find/pred.c:2132 +#: find/print.c:409 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s 由于信号 %d 而终止" +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "错误: 格式指令‘%%%c’是留给将来使用的。" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "警告: 格式命令 `%%%c' 应该后跟另一个字符" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "警告:不可识别的格式指令“%%%c”" + +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "非法表达式" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "非法表达式;您在一个二元操作符‘%s’前未带任何东西。" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "在‘%s’和‘)’之间需要一个表达式" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "在‘%s’后需要一个表达式" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "非法表达式;您使用了太多的‘)’" -#: find/tree.c:184 +#: find/tree.c:189 #, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "非法表达式;需要一个‘)’但未找到。也许您需要在‘%s’后加上额外的判定" -#: find/tree.c:192 +#: find/tree.c:197 #, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "非法表达式;不允许使用空白的圆括号。" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "非法表达式;我原来希望能在某处找到‘)’,但未找到。" -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "哎呀 -- 无效的表达式类型!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "哎 -- 无效的表达式类型(%d)!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" +"警告: predicate %s 中没有predicate evaluation cost table 的项目; 请上报 bug" -#: find/tree.c:1288 +#: find/tree.c:1294 #, c-format msgid "paths must precede expression: %s" msgstr "路径必须在表达式之前: %s" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "未知的断言“%s”" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "无效断言“%s”" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "“%2$s”的无效参数“%1$s”" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "遗漏“%s”的参数" -#: find/tree.c:1406 +#: find/tree.c:1412 #, c-format msgid "you have too many ')'" msgstr "您使用了太多的‘)’" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "非预期的无效断言“%s”" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "非预期的无效断言" -#: find/tree.c:1547 -#, fuzzy, c-format +#: find/tree.c:1553 +#, c-format msgid "oops -- invalid default insertion of and!" msgstr "哎 -- 无效的默认插入!" -#: find/util.c:171 +#: find/util.c:175 #, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "用法: %s [-H] [-L] [-P] [-Olevel] [-D " -#: find/util.c:173 +#: find/util.c:177 #, c-format msgid "] [path...] [expression]\n" msgstr "] [path...] [expression]\n" -#: find/util.c:451 -#, fuzzy, c-format +#: find/util.c:459 +#, c-format msgid "failed to save initial working directory" -msgstr "无法获取当前工作目录" +msgstr "无法保存起始工作目录" -#: find/util.c:468 -#, fuzzy, c-format +#: find/util.c:476 +#, c-format msgid "failed to restore initial working directory" -msgstr "无法获取当前工作目录" +msgstr "无法还原起始工作目录" -#: find/util.c:816 +#: find/util.c:824 #, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "忽略不可识别的调试标记 %s" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "-D 选项的参数列表为空" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "-O 选项后面必须立即带上一个十进制整数" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "请在 -O 选项后面立即指定一个十进制数" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "无效的优化级 %s" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "优化级别 %lu 太高了。如果您想很快地找到文件,考虑使用 GNU locate。" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -699,64 +751,381 @@ msgid "" msgstr "" "不支持环境变量 FIND_BLOCK_SIZE,仅环境变量 POSIXLY_CORRECT 会影响块大小" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "“%2$s”的参数 %1$s 无效" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "“%2$s”的参数 %1$s 有歧义" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "合法的参数为:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "文件关闭错误" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "写入错误" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "未知的系统错误" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s:选项“%s”有歧义\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s:选项“--%s”不接受参数\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s:选项“%c%s”不接受参数\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s:选项“%s”需要一个参数\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s:无法识别的选项“--%s”\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s:无法识别的选项“%c%s”\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s:非法选项 -- %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s:选项需要一个参数 -- %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s:选项“-W %s”有二义性\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s:选项“-W %s”不接受参数\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s:选项“%s”需要一个参数\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "无法还原起始工作目录" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "无法还原起始工作目录" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "“" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "”" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "内存耗尽" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "无效的 %s%s 的参数“%s”" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "%s%s 的参数“%s”有无效后缀" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "%s%s 的参数“%s”过长" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "命令过长" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "由于参数数量限制,无法调用 exec()" -#: lib/buildcmd.c:381 -#, fuzzy, c-format +#: lib/buildcmd.c:371 +#, c-format msgid "cannot fit single argument within argument list size limit" -msgstr "无法使用合适的带参数列表大小限制的单一参数" +msgstr "无法在参数列表大小限制中适配单一参数" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, c-format msgid "argument list too long" msgstr "参数列表过长" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "环境变量 %s 未设为一个有效十进制数" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" +"文件描述符 %d 泄漏; 请上报 bug,记得带上重现这一问题的最简方法的详细说明。" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "Eric B. Decker" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "James Youngman" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "Kevin Dalley" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 +#, fuzzy, c-format +msgid "Failed to write output (at stage %d)" +msgstr "无法写入标准输出" + +#: lib/regextype.c:110 #, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "以 GNU gnulib 版本 %s 构建\n" +msgid "Unknown regular expression type %s; valid types are %s." +msgstr "未知的正则表达式类型 %s;合法的类型是 %s。" -#: lib/safe-atoi.c:76 +#: lib/safe-atoi.c:81 #, c-format msgid "Unexpected suffix %s on %s" msgstr "在 %2$s 中有非预期的后缀 %1$s" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:87 #, c-format msgid "Expected an integer: %s" msgstr "需要一个整数: %s" -#: lib/regextype.c:107 -#, c-format -msgid "Unknown regular expression type %s; valid types are %s." -msgstr "未知的正则表达式类型 %s;合法的类型是 %s。" - -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -765,8 +1134,8 @@ msgstr "" "用法: %s [--version | --help]\n" "or %s most_common_bigrams < file-list > locate-database\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -774,82 +1143,77 @@ msgstr "" "\n" "将错误报告发送到 。\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "写入错误" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "用法: %s [-0 | --null] [--version] [--help]\n" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "您需要以十进制整数指定一个安全级别" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "安全级 %s 超出可转换范围" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "安全级 %s 有非预期的后缀 %s。" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "不支持 slocate 安全级 %ld。" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "无法写入标准输出" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "天" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "--max-database-age 选项的参数不允为空" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "--max-database-age 选项的参数 %s 无效" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "locate 数据库 %s 包含一个比 locate 所能处理的文件名更长的文件名`" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, c-format msgid "locate database %s is corrupt or invalid" msgstr "locate 数据库 %s 损坏或无效" -#: locate/locate.c:893 +#: locate/locate.c:860 #, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "Locate 数据库大小: %s 字节\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, c-format msgid "Matching Filenames: %s\n" msgstr "正在匹配文件名: %s\n" -#: locate/locate.c:901 +#: locate/locate.c:868 #, c-format msgid "All Filenames: %s\n" msgstr "所有文件名: %s\n" -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -866,24 +1230,24 @@ msgstr "" "\t空行 %s 个,\n" "\t以及带有高字节位设置的字符 %s 个。\n" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "某些文件名可能被过滤掉了,因此我们无法计算压缩率。\n" -#: locate/locate.c:934 +#: locate/locate.c:901 #, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "压缩率 %4.2f%% (越高越好)\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, c-format msgid "Compression ratio is undefined\n" msgstr "压缩率未定义\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " @@ -892,7 +1256,7 @@ msgstr "" "locate 数据库 %s 看上去像是个 slocate 数据库,但它好像有安全级 %c,而目前 " "GNU findutils 不支持此安全级" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " @@ -900,13 +1264,13 @@ msgid "" msgstr "" "%s 是一个 slocate 数据库。这些支持都是新开发的,目前希望能提交错误报告。" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "%s 是一个不支持的安全级为 %d 的 slocate 数据库;跳过。" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -916,35 +1280,35 @@ msgstr "" "您指定了 -E 选项,但那个选项无法和带非零安全级的 slocate 格式的数据库一同使" "用。此数据库不会生成任何结果。\n" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "%s 是一个 slocate 数据库。开启‘-e’选项。" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "旧格式的 locate 数据库 %s 太短因而无效" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "数据库 %s 的格式为 %s。\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "数据库是 little-endian 编码的。\n" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "数据库是 big-endian 编码的。\n" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "数据库编码方式不明显。\n" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -964,79 +1328,79 @@ msgstr "" " [--max-database-age D] [--version] [--help]\n" " pattern...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "无法放弃组特权" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "无法放弃 setuid 特权" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "无法完全放弃特权" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "无法放弃 setgid 特权" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "警告: locate 数据库仅能从标准输入读取一次。" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "时间系统调用失败" -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "警告: 数据库“%s”比 %d %s 还陈旧(实际时间 %.1f %s)" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "警告: locate 数据库 %s 以不同的字节顺序构建" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "在 %s 中有非预期的 EOF" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, c-format msgid "error reading a word from %s" msgstr "从 %s 中读取单词时出错" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "在输入分隔定义中有无效转义序列 %s。" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "在输入分隔定义中有无效的转义序列 %s;字符值不能超过 %lx。" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "在输入分隔定义中有无效的转义序列 %s;字符值不能超过 %lo。" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "在输入分隔定义中有无效的转义序列 %s;不可识别后续字符 %s。" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1044,59 +1408,74 @@ msgid "" msgstr "" "无效的输入分隔定义 %s: 分隔符要么是单一字符要么是以 \\ 开始的转义序列。" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "对 exec 来说环境过大" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "警告: -s 选项的值 %ld 太大了,用 %ld 代替" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 #, c-format -msgid "Cannot set SIGUSR1 signal handler" +msgid "option --%s may not be set to a value which includes `='" +msgstr "选项 --%s 不要设置成带`=' 的值" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "无法撤消环境变量 %s" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:654 +#, c-format +msgid "Cannot set SIGUSR1 signal handler" +msgstr "无法设置 SIGUSR1 信号句柄" + +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" -msgstr "" +msgstr "无法设置 SIGUSR2 信号句柄" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, c-format msgid "Cannot open input file %s" msgstr "无法打开输入文件 %s" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, c-format msgid "Your environment variables take up % bytes\n" msgstr "您的环境变量占有 % 个字节\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "此系统的参数长度 POSIX 上限: %\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "所有系统中所允许的最小参数长度 POSIX 上限: %\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "我们实际能用的最大命令长度: %\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "我们实际能用的命令缓冲区的大小: %\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1108,14 +1487,14 @@ msgstr "" "xargs 中的命令现在将继续执行,并且它会尝试读取输入并运行命令;如果您不想它发" "生,请按下“文件结束”按键(ctrl-D)。\n" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "警告: %s 将至少运行一次。如果您不想它发生,请按下中断按键。(ctrl-C)\n" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1123,15 +1502,15 @@ msgid "" msgstr "" "未匹配的 %s 引用;默认情况下,引用是针对 xargs 的,除非您使用了 -0 选项" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "双" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "单" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " @@ -1139,153 +1518,349 @@ msgid "" msgstr "" "警告: 输入中有个 NUL 字符。它不能在参数列表中传送。您是想用 --null 选项吗?" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "参数行过长" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "无法写入标准输出" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "无法打开 /dev/tty 用于读取" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, fuzzy, c-format +msgid "Failed to read from stdin" +msgstr "无法写入标准输出" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "无法分配内存" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "无法设置环境变量 %s" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "无法在派生子进程之前创建管道" -#: xargs/xargs.c:1184 -#, c-format +#: xargs/xargs.c:1289 +#, fuzzy, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "xargs_do_exec 中的 errno-buffer 读取失败(这可能是个 bug,请报告给我们)" -#: xargs/xargs.c:1237 -#, c-format +#: xargs/xargs.c:1342 +#, fuzzy, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "读取操作返回的是非预期值 %d;这可能是个 bug,请报告给我们" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "等待子进程时出错" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" -msgstr "警告: 失去 %d 子进程的踪迹" +msgid "WARNING: Lost track of %lu child processes" +msgstr "警告: 失去 %lu 子进程的踪迹" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s:以状态 255 退出;中止" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s:因信号 %d 而停止" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s:因信号 %d 而终止" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s:选项 -%c 的数值无效\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: 选项 -%c 的值必须 >= %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: 选项 -%c 的值必须 < %ld\n" -#: xargs/xargs.c:1508 -#, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"用法: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "无法获取当前目录" +#: xargs/xargs.c:1622 +#, fuzzy +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" +"用法: %s [选项]... COMMAND INITIAL-ARGS...\n" +"以 INITIAL-ARGS及更多来自控制台的参数来运行 COMMAND。\n" -#~ msgid "invalid argument %s for %s" -#~ msgstr "“%2$s”的参数 %1$s 无效" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "“%2$s”的参数 %1$s 有歧义" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "合法的参数为:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "error closing file" -#~ msgstr "文件关闭错误" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "未知的系统错误" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#~ msgid "%s: option `%s' is ambiguous\n" -#~ msgstr "%s:选项“%s”有歧义\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#~ msgid "%s: option `--%s' doesn't allow an argument\n" -#~ msgstr "%s:选项“--%s”不接受参数\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#~ msgid "%s: option `%c%s' doesn't allow an argument\n" -#~ msgstr "%s:选项“%c%s”不接受参数\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#~ msgid "%s: option `%s' requires an argument\n" -#~ msgstr "%s:选项“%s”需要一个参数\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#~ msgid "%s: unrecognized option `--%s'\n" -#~ msgstr "%s:无法识别的选项“--%s”\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#~ msgid "%s: unrecognized option `%c%s'\n" -#~ msgstr "%s:无法识别的选项“%c%s”\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#~ msgid "%s: illegal option -- %c\n" -#~ msgstr "%s:非法选项 -- %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#~ msgid "%s: invalid option -- %c\n" -#~ msgstr "%s:非法选项 -- %c\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#~ msgid "%s: option requires an argument -- %c\n" -#~ msgstr "%s:选项需要一个参数 -- %c\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#~ msgid "%s: option `-W %s' is ambiguous\n" -#~ msgstr "%s:选项“-W %s”有二义性\n" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" -#~ msgid "%s: option `-W %s' doesn't allow an argument\n" -#~ msgstr "%s:选项“-W %s”不接受参数\n" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" -#~ msgid "`" -#~ msgstr "“" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" -#~ msgid "'" -#~ msgstr "”" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" + +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" + +#~ msgid "Mode %s is not valid when POSIXLY_CORRECT is on." +#~ msgstr "当开启 POSIXLY_CORRECT 时模式 %s 无效。" + +#~ msgid "" +#~ "\n" +#~ "Mandatory arguments to long options are mandatory for short options too.\n" +#~ "Non-mandatory arguments are indicated by [square brackets]\n" +#~ " -0, --null Items are separated by a null, not " +#~ "whitespace.\n" +#~ " Disables quote and backslash processing\n" +#~ " -a, --arg-file=FILE Read arguments from FILE, not standard " +#~ "input\n" +#~ " -d, --delimiter=CHARACTER Input items are separated by CHARACTER, " +#~ "not by\n" +#~ " blank space. Disables quote and backslash\n" +#~ " processing\n" +#~ " -E END If END occurs as a line of input, the rest " +#~ "of\n" +#~ " the input is ignored.\n" +#~ " -e [END], --eof[=END] Equivalent to -E END if END is specified.\n" +#~ " Otherwise, there is no end-of-file string\n" +#~ " --help Print a summary of the options to xargs.\n" +#~ " -I R same as --replace=R (R must be specified)\n" +#~ " -i,--replace=[R] Replace R in initial arguments with names\n" +#~ " read from standard input. If R is\n" +#~ " unspecified, assume {}\n" +#~ " -L,-l, --max-lines=MAX-LINES Use at most MAX-LINES nonblank input lines " +#~ "per\n" +#~ " command line\n" +#~ " -l Use at most one nonblank input line per\n" +#~ " command line\n" +#~ " -n, --max-args=MAX-ARGS Use at most MAX-ARGS arguments per " +#~ "command\n" +#~ " line\n" +#~ " -P, --max-procs=MAX-PROCS Run up to max-procs processes at a time\n" +#~ " -p, --interactive Prompt before running commands\n" +#~ " --process-slot-var=VAR Set environment variable VAR in child\n" +#~ " processes\n" +#~ " -r, --no-run-if-empty If there are no arguments, run no " +#~ "command.\n" +#~ " If this option is not given, COMMAND will " +#~ "be\n" +#~ " run at least once.\n" +#~ " -s, --max-chars=MAX-CHARS Limit commands to MAX-CHARS at most\n" +#~ " --show-limits Show limits on command-line length.\n" +#~ " -t, --verbose Print commands before executing them\n" +#~ " --version Print the version number\n" +#~ " -x, --exit Exit if the size (see -s) is exceeded\n" +#~ msgstr "" +#~ "\n" +#~ "选项完整形式可用的参数也适用于其缩写形式。\n" +#~ "可选参数被一对方括号括起\"[参数]\"\n" +#~ " -0, --null 条目以 null分隔,而非空格。\n" +#~ " 不处理引号和反斜杠\n" +#~ " -a, --arg-file=FILE 从 FILE中获取参数,而非标准输入\n" +#~ " -d, --delimiter=CHARACTER 输入项由 CHARACTER分隔,而非空格。\n" +#~ " 不处理引号反斜杠\n" +#~ "\n" +#~ " -E END 若以 END作为一行输入的结尾,余下输入均忽" +#~ "略。\n" +#~ " \n" +#~ " -e [END], --eof[=END] 若指定 END,则等同于 -E END。\n" +#~ " 否则无文件结尾字串。\n" +#~ " --help 打印 xargs选项的帮助说明。\n" +#~ " -I R 等同于 --replace=R (R 必须指定)\n" +#~ " -i,--replace=[R] 以标准输入所读取的名字代替起始参数中的 " +#~ "R。\n" +#~ " 若未定义 R,则假定{}\n" +#~ "\n" +#~ " -L,-l, --max-lines=MAX-LINES 每行命令最多用 MAX-LINES个非空输入\n" +#~ "\n" +#~ " -l 每行命令最多用一个非空输入\n" +#~ "\n" +#~ " -n, --max-args=MAX-ARGS 每行命令最多用 MAX-ARGS个参数\n" +#~ "\n" +#~ " -P, --max-procs=MAX-PROCS 一次最多运行 MAX-PROCS个进程\n" +#~ " -p, --interactive 交互式运行命令\n" +#~ " --process-slot-var=VAR 在子进程中设置环境变量 VAR。\n" +#~ "\n" +#~ " -r, --no-run-if-empty 若无参数则不运行命令。\n" +#~ " 若不指定此选项,COMMAND 将至少运行一次。\n" +#~ "\n" +#~ " -s, --max-chars=MAX-CHARS 最多 MAX-CHARS条命令\n" +#~ " --show-limits 在命令行中显示限制。\n" +#~ " -t, --verbose 在运行命令前打印\n" +#~ " --version 打印版本号\n" +#~ " -x, --exit 若超出 size(参看 -s)则退出\n" + +#~ msgid "cannot get current directory" +#~ msgstr "无法获取当前目录" + +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "以 GNU gnulib 版本 %s 构建\n" + +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "用法: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" + +#~ msgid "%s: illegal option -- %c\n" +#~ msgstr "%s:非法选项 -- %c\n" #~ msgid "Success" #~ msgstr "成功" @@ -1341,21 +1916,3 @@ msgstr "" #~ msgid "No previous regular expression" #~ msgstr "没有上一个常规表达式" - -#~ msgid "^[yY]" -#~ msgstr "^[yY]" - -#~ msgid "^[nN]" -#~ msgstr "^[nN]" - -#~ msgid "memory exhausted" -#~ msgstr "内存耗尽" - -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "无效的 %s%s 的参数“%s”" - -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "%s%s 的参数“%s”有无效后缀" - -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "%s%s 的参数“%s”过长" diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo index 6a275f3748e68eb6e0d79448dfc77ce8984aeb38..0e3c37dd774e0984a8499b69f0c864d8525e33a9 100644 GIT binary patch delta 1450 zcmZwGOGs2v7{KvwwA88W;bY7!yH;wNR%4cFnMMn%MGvtetZ=GHBpqocDIpxm78a)1 zAdDhHY7{~A7$SSo!w7JVuY0-f*zkBYzbIy0Z@7$+_{zC7Y zm zLK{X{MJD4MWDk;o5v(tZxgZi*j=IneoQu_%fGwyy?#DTJ4>jP|xCOss2CkhXl8gsY zGjR%2u@4P=g3s|YT8Z!`(X3#78Jwb#i2T9~9$2CYg7KoMA{!Vtq3-nAG?6t}ME*48 z4S0;_XK^XxWTHBbn=uiGPy_ygDL5(CES+fydKd9vFBglk6}9YlkvZi7>Ow;pk3Ucs znoOEr;A(8Z7#`~Lc77`Gyg7~{?;ggPKCt$434&!d`B$dAW~Tqi5y|FHK*g z9=2iBokdU=O|^k`EJ7{OAxy&-Bv}%`l{ko6qTi^QNTWV_NY~FK|2olrZfMP#_!-7- zOeD1ptfqhTGrLCo5bfN5jJmU*%u>v_nv>>ae2Lu@V=R-d!!qRYc+^qb1>Jgif>G*BvgQ>&`WJ4N%LKP3Me-4sSXdbUuR6*8nnuo@Ytx#JH7(CFy4Ep=KA-+?(*w-$5G#ElJ&dlOnWmX9HuNPx=nKo# z3tBD}dK=zrv7`qYC$6&i&PBE*x(>Q(kGKp^z2~sA#&EjbwQkwwaa1~e#kN_#(x}3? z?T+fI{f5I`Sy$t99rkeLEbz5Pc{2BuyEg5XJ>~T~cT0shYW7xD*45VO3x8iVQa#3j zS~r}rUa^i30zKA^k^cz)+zwv9`l;pe$BX^GeA~Xb?vtY(%{=(f)->8N5IlbC+np|7m#r@Q-*`qE{gRrq ez+;TRXr$U1n$z~)@=Z;+7WG(6jftwT-aGh*($uK%_>y$+{GoMThF_`F!4@M^K1!MHhMIY4f?{*lCCq4a~b9(PN zzwm`LD|tOxE*^@ zkjlILHHs zFhKv$Vx@ZUKJv2#FQP;|kCpfn$`KT8%DDsYrT-Y#VHBB4okTgBX)MLBQRa8>TP!C% z-Saelq47G-@zl%MKz?I*0@;MxK;9(P+mLIZYHsSsYWe|`K%Ya&oP|Mr3-7^e$flKp z^>_m%(}8mGFFSgXJj#VE#d-hAww5gMP8g|`x3}+7-akplz{!*;NA33 zp+SF&9B^OqgeQ00uJNUG(ZAeTqV&K&>wmf$3%QYv$}JLPVw zJgWSg{8UXP+isCd%N27oDaXSps}ebXxwT}(Ewa1S!u@j7%Dr*VQO4z*C6zm<71Z@q zIU>o16v^Id;g96rle=YL?Ox+m%Z}^j&bFA2Tl!%dwXJ6QSpJ|Vy|tjh(;e=#Z6g}j zEv9XR!|F2J$NnEs zt8I1Y16HT4tKC3q;*n6CCHzEGV2wFBH~$*9U6@yJ~|$9eAi=SADv)cq%Xb`KD()-R>&R$VZtoz01>YX2&is zT|S=~>dzkeaOu;-&e$iJ!C~jb^vY1*uUCfXuJjLQjt#h5(#|`5nvG_Y!%J6F*{Rc+ zD@U^vJ=s+6(%e}mJ?DIUAu~Og>7Q~&&p4x#S$@6r?vII{AOBR7mU<-oF7<#7olv diff --git a/po/zh_TW.po b/po/zh_TW.po index 964a94c..123ecb6 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: findutils 4.2.26\n" "Report-Msgid-Bugs-To: bug-findutils@gnu.org\n" -"POT-Creation-Date: 2011-05-11 09:58+0100\n" +"POT-Creation-Date: 2014-07-19 11:27+0100\n" "PO-Revision-Date: 2005-12-06 11:30+0800\n" "Last-Translator: Abel Cheung \n" "Language-Team: Chinese (traditional) \n" @@ -15,32 +15,68 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: find/find.c:148 find/ftsfind.c:667 +#: find/exec.c:136 +#, fuzzy, c-format +msgid "Failed to save working directory in order to run a command on %s" +msgstr "無法決定當前目錄位置" + +#: find/exec.c:256 +#, c-format +msgid "Cannot close standard input" +msgstr "" + +#: find/exec.c:285 +#, c-format +msgid "Failed to change directory" +msgstr "" + +#: find/exec.c:312 xargs/xargs.c:1229 +#, c-format +msgid "cannot fork" +msgstr "fork 失敗" + +#: find/exec.c:343 +#, c-format +msgid "error waiting for %s" +msgstr "等待 %s 時出現錯誤" + +#: find/exec.c:352 #, c-format -msgid "Failed initialise shared-file hash table" +msgid "%s terminated by signal %d" +msgstr "%s 因訊號 %d 而終止" + +#: find/find.c:203 +#, c-format +msgid "Failed to initialize shared-file hash table" msgstr "" -#: find/find.c:205 +#: find/find.c:219 find/ftsfind.c:693 locate/bigram.c:105 locate/code.c:174 +#: locate/frcode.c:233 locate/locate.c:1568 xargs/xargs.c:392 +#, fuzzy, c-format +msgid "The atexit library function failed" +msgstr "測試 fnmatch() 是否可用時出錯。" + +#: find/find.c:263 #, fuzzy, c-format msgid "cannot stat current directory" msgstr "無法決定當前目錄位置" -#: find/find.c:296 +#: find/find.c:354 #, c-format msgid "Cannot read list of mounted devices." msgstr "" -#: find/find.c:385 +#: find/find.c:443 #, fuzzy, c-format msgid "WARNING: file system %s has recently been unmounted." msgstr "警告︰檔案系統 %s 剛剛被卸載。" -#: find/find.c:395 +#: find/find.c:453 #, fuzzy, c-format msgid "WARNING: file system %s has recently been mounted." msgstr "警告︰檔案系統 %s 剛剛被掛載。" -#: find/find.c:491 +#: find/find.c:550 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old device number %ld, new device " @@ -49,7 +85,7 @@ msgstr "" "執行 %3$s 時 %1$s%2$s 有所更改 (舊裝置編號為 %4$ld,新裝置編號為 %5$ld,檔案" "系統類型為 %6$s) [ref %7$ld]" -#: find/find.c:528 +#: find/find.c:587 #, fuzzy, c-format msgid "" "%s%s changed during execution of %s (old inode number %, new inode " @@ -58,24 +94,24 @@ msgstr "" "執行 %3$s 時 %1$s%2$s 有所更改 (舊 inode 編號為 %4$ld,新 inode 編號為 " "%5$ld,檔案系統類型為 %6$s) [ref %7$ld]" -#: find/find.c:693 +#: find/find.c:752 #, fuzzy, c-format msgid "failed to return to parent directory" msgstr "無法決定當前目錄位置" -#: find/find.c:980 +#: find/find.c:1038 #, c-format msgid "Failed to safely change directory into %s" msgstr "" -#: find/find.c:1078 find/ftsfind.c:245 +#: find/find.c:1138 find/ftsfind.c:245 #, c-format msgid "" "Symbolic link %s is part of a loop in the directory hierarchy; we have " "already visited the directory to which it points." msgstr "" -#: find/find.c:1097 +#: find/find.c:1157 #, c-format msgid "" "Filesystem loop detected; %s has the same device number and inode as a " @@ -86,12 +122,12 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: find/find.c:1343 +#: find/find.c:1409 #, c-format msgid "warning: not following the symbolic link %s" msgstr "" -#: find/find.c:1386 +#: find/find.c:1480 #, c-format msgid "" "WARNING: Hard link count is wrong for %s (saw only st_nlink=% but " @@ -101,12 +137,12 @@ msgid "" "searched." msgstr "" -#: find/fstype.c:203 +#: find/fstype.c:185 #, c-format msgid "Cannot read mounted file system list" msgstr "" -#: find/fstype.c:250 +#: find/fstype.c:244 msgid "unknown" msgstr "" @@ -116,7 +152,7 @@ msgid "" "File system loop detected; %s is part of the same file system loop as %s." msgstr "" -#: find/ftsfind.c:444 find/util.c:214 +#: find/ftsfind.c:444 find/util.c:222 #, c-format msgid "WARNING: file %s appears to have mode 0000" msgstr "" @@ -126,12 +162,17 @@ msgstr "" msgid "cannot search %s" msgstr "" -#: find/ftsfind.c:599 +#: find/ftsfind.c:609 #, fuzzy, c-format msgid "failed to restore working directory after searching %s" msgstr "無法決定當前目錄位置" -#: find/parser.c:471 +#: find/ftsfind.c:677 +#, c-format +msgid "Failed initialize shared-file hash table" +msgstr "" + +#: find/parser.c:452 #, c-format msgid "" "The -delete action automatically turns on -depth, but -prune does nothing " @@ -139,7 +180,7 @@ msgid "" "use the -depth option." msgstr "" -#: find/parser.c:618 +#: find/parser.c:599 #, c-format msgid "" "warning: you have specified the %s option after a non-option argument %s, " @@ -148,7 +189,7 @@ msgid "" "arguments.\n" msgstr "" -#: find/parser.c:914 +#: find/parser.c:906 #, c-format msgid "" "warning: the -d option is deprecated; please use -depth instead, because the " @@ -156,24 +197,24 @@ msgid "" msgstr "" "警告:-d 選項已經過時,請改用 -depth,因為後者才是符合 POSIX 標準的選項。" -#: find/parser.c:1184 +#: find/parser.c:1179 #, c-format msgid "" "%s is not the name of an existing group and it does not look like a numeric " "group ID because it has the unexpected suffix %s" msgstr "" -#: find/parser.c:1199 +#: find/parser.c:1194 #, c-format msgid "%s is not the name of an existing group" msgstr "" -#: find/parser.c:1205 +#: find/parser.c:1200 #, c-format msgid "argument to -group is empty, but should be a group name" msgstr "" -#: find/parser.c:1227 +#: find/parser.c:1222 msgid "" "\n" "default path is the current directory; default expression is -print\n" @@ -183,7 +224,7 @@ msgstr "" "預設路徑為目前的目錄,預設的表達式是 -print\n" "表達式可以包括運算子、選項、測試和操作模式:\n" -#: find/parser.c:1230 +#: find/parser.c:1225 msgid "" "operators (decreasing precedence; -and is implicit where no others are " "given):\n" @@ -194,7 +235,7 @@ msgstr "" " ( EXPR ) ! EXPR -not EXPR EXPR1 -a EXPR2 EXPR1 -and EXPR2\n" " EXPR1 -o EXPR2 EXPR1 -or EXPR2 EXPR1 , EXPR2\n" -#: find/parser.c:1234 +#: find/parser.c:1229 msgid "" "positional options (always true): -daystart -follow -regextype\n" "\n" @@ -208,7 +249,7 @@ msgstr "" " -depth --help -maxdepth LEVELS -mindepth LEVELS -mount -noleaf\n" " --version -xdev -ignore_readdir_race -noignore_readdir_race\n" -#: find/parser.c:1239 +#: find/parser.c:1234 msgid "" "tests (N can be +N or -N or N): -amin N -anewer FILE -atime N -cmin N\n" " -cnewer FILE -ctime N -empty -false -fstype TYPE -gid N -group NAME\n" @@ -222,10 +263,10 @@ msgstr "" "PATTERN\n" " -links N -lname PATTERN -mmin N -mtime N -name PATTERN -newer FILE" -#: find/parser.c:1244 +#: find/parser.c:1239 #, fuzzy msgid "" -" -nouser -nogroup -path PATTERN -perm [+-]MODE -regex PATTERN\n" +" -nouser -nogroup -path PATTERN -perm [-/]MODE -regex PATTERN\n" " -readable -writable -executable\n" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]" @@ -234,11 +275,11 @@ msgstr "" " -wholename PATTERN -size N[bcwkMG] -true -type [bcdpflsD] -uid N\n" " -used N -user NAME -xtype [bcdpfls]\n" -#: find/parser.c:1249 +#: find/parser.c:1244 msgid " -context CONTEXT\n" msgstr "" -#: find/parser.c:1251 +#: find/parser.c:1246 #, fuzzy msgid "" "\n" @@ -252,7 +293,7 @@ msgstr "" " -exec COMMAND ; -exec COMMAND {} + -ok COMMAND ;\n" " -execdir COMMAND ; -execdir COMMAND {} + -okdir COMMAND ;\n" -#: find/parser.c:1257 +#: find/parser.c:1252 msgid "" "Report (and track progress on fixing) bugs via the findutils bug-reporting\n" "page at http://savannah.gnu.org/ or, if you have no web access, by sending\n" @@ -262,12 +303,12 @@ msgstr "" "問題修正的進度)。又或者如果您無法瀏覽網頁,可以選擇用電子郵件寄至\n" "。" -#: find/parser.c:1312 +#: find/parser.c:1307 #, c-format msgid "sanity check of the fnmatch() library function failed." msgstr "測試 fnmatch() 是否可用時出錯。" -#: find/parser.c:1326 +#: find/parser.c:1321 #, c-format msgid "" "warning: Unix filenames usually don't contain slashes (though pathnames " @@ -281,47 +322,42 @@ msgstr "" "有用。又或者,如果您使用 GNU grep,可以嘗試使用 'find ... -print0 | grep -" "FzZ %s'。" -#: find/parser.c:1452 +#: find/parser.c:1447 #, c-format msgid "Expected a positive decimal integer argument to %s, but got %s" msgstr "" -#: find/parser.c:1617 +#: find/parser.c:1612 #, c-format msgid "This system does not provide a way to find the birth time of a file." msgstr "" -#: find/parser.c:1638 +#: find/parser.c:1633 #, fuzzy, c-format msgid "The %s test needs an argument" msgstr "%s:選項 ‘%s’ 需要參數\n" -#: find/parser.c:1675 +#: find/parser.c:1670 #, c-format msgid "I cannot figure out how to interpret %s as a date or time" msgstr "" -#: find/parser.c:1692 +#: find/parser.c:1687 #, fuzzy, c-format msgid "Cannot obtain birth time of file %s" msgstr "無法開啟檔案 ‘%s’ 作為輸入資料" -#: find/parser.c:1900 +#: find/parser.c:1895 #, c-format msgid "warning: -%s %s will not match anything because it ends with /." msgstr "" -#: find/parser.c:1956 -#, c-format -msgid "Mode %s is not valid when POSIXLY_CORRECT is on." -msgstr "" - -#: find/parser.c:2039 +#: find/parser.c:1992 #, fuzzy, c-format msgid "invalid mode %s" msgstr "模式 ‘%s’ 無效" -#: find/parser.c:2058 +#: find/parser.c:2010 #, c-format msgid "" "warning: you have specified a mode pattern %s (which is equivalent to /000). " @@ -329,94 +365,102 @@ msgid "" "-000; that is, while it used to match no files, it now matches all files." msgstr "" -#: find/parser.c:2274 +#: find/parser.c:2210 #, c-format msgid "invalid null argument to -size" msgstr "-size 後是無效的空白參數" -#: find/parser.c:2324 +#: find/parser.c:2260 #, c-format msgid "invalid -size type `%c'" msgstr "-size 指定的檔案大小單位 ‘%c’ 無效" -#: find/parser.c:2334 +#: find/parser.c:2270 #, fuzzy, c-format msgid "Invalid argument `%s%s' to -size" msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效" -#: find/parser.c:2516 +#: find/parser.c:2452 msgid "" "The -show-control-chars option takes a single argument which must be " "'literal' or 'safe'" msgstr "" -#: find/parser.c:2630 +#: find/parser.c:2566 #, fuzzy, c-format msgid "Invalid argument %s to -used" msgstr "%2$s 的參數 %1$s 無效" -#: find/parser.c:2671 +#: find/parser.c:2607 #, c-format msgid "%s is not the name of a known user" msgstr "" -#: find/parser.c:2678 +#: find/parser.c:2614 #, c-format msgid "The argument to -user should not be empty" msgstr "" -#: find/parser.c:2703 +#: find/parser.c:2639 #, c-format msgid "Features enabled: " msgstr "啟用了的功能:" -#: find/parser.c:2780 +#: find/parser.c:2716 #, c-format msgid "invalid predicate -context: SELinux is not enabled." msgstr "" -#: find/parser.c:2844 +#: find/parser.c:2780 #, c-format msgid "Arguments to -type should contain only one letter" msgstr "" -#: find/parser.c:2893 +#: find/parser.c:2809 #, c-format -msgid "Unknown argument to -type: %c" +msgid "" +"-type %c is not supported because symbolic links are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3015 +#: find/parser.c:2820 #, c-format -msgid "warning: unrecognized escape `\\%c'" -msgstr "警告:無效辨認轉義控制序列 (escape sequence) ‘\\%c’" +msgid "" +"-type %c is not supported because FIFOs are not supported on the platform " +"find was compiled on." +msgstr "" -#: find/parser.c:3032 +#: find/parser.c:2831 #, c-format -msgid "error: %s at end of format string" +msgid "" +"-type %c is not supported because named sockets are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3071 +#: find/parser.c:2842 #, c-format -msgid "warning: unrecognized format directive `%%%c'" +msgid "" +"-type %c is not supported because Solaris doors are not supported on the " +"platform find was compiled on." msgstr "" -#: find/parser.c:3225 +#: find/parser.c:2849 #, c-format -msgid "error: the format directive `%%%c' is reserved for future use" +msgid "Unknown argument to -type: %c" msgstr "" -#: find/parser.c:3260 -#, c-format +#: find/parser.c:2923 +#, fuzzy, c-format msgid "" "The current directory is included in the PATH environment variable, which is " "insecure in combination with the %s action of find. Please remove the " -"current directory from your $PATH (that is, remove \".\" or leading or " -"trailing colons)" +"current directory from your $PATH (that is, remove \".\", doubled colons, or " +"leading or trailing colons)" msgstr "" "PATH 環境變數中包括了當前目錄,當配合 find 的 %s 操作模式時會令系統安全產生漏" "洞。請在 $PATH 變數中移除當前目錄 (即是 “.”,或者最前或最後的冒號)" -#: find/parser.c:3272 +#: find/parser.c:2935 #, fuzzy, c-format msgid "" "The relative path %s is included in the PATH environment variable, which is " @@ -426,7 +470,7 @@ msgstr "" "PATH 環境變數中包括了當前目錄,當配合 find 的 %s 操作模式時會令系統安全產生漏" "洞。請在 $PATH 變數中移除當前目錄 (即是 “.”,或者最前或最後的冒號)" -#: find/parser.c:3379 +#: find/parser.c:3044 #, c-format msgid "" "You may not use {} within the utility name for -execdir and -okdir, because " @@ -435,250 +479,256 @@ msgstr "" "您不應該在 -execdir 和 -okdir 中使用 {} 作為程式名稱,因為這樣做可能會造成安" "全漏洞。" -#: find/parser.c:3405 +#: find/parser.c:3070 #, c-format msgid "Only one instance of {} is supported with -exec%s ... +" msgstr "在 -exec%s ... + 裡面只可以使用一次 {}" -#: find/parser.c:3415 +#: find/parser.c:3080 #, c-format msgid "In %s the %s must appear by itself, but you specified %s" msgstr "" -#: find/parser.c:3435 +#: find/parser.c:3100 #, fuzzy, c-format msgid "The environment is too large for exec()." msgstr "執行 exec 時的環境變數太大" -#: find/parser.c:3603 +#: find/parser.c:3269 #, c-format msgid "arithmetic overflow while converting %s days to a number of seconds" msgstr "" -#: find/parser.c:3627 +#: find/parser.c:3293 #, c-format msgid "arithmetic overflow when trying to calculate the end of today" msgstr "" -#: find/parser.c:3786 +#: find/parser.c:3452 msgid "standard error" msgstr "" -#: find/parser.c:3791 +#: find/parser.c:3457 msgid "standard output" msgstr "" -#: find/pred.c:432 +#: find/pred.c:338 #, c-format msgid "cannot delete %s" msgstr "" -#: find/pred.c:580 -#, fuzzy, c-format -msgid "Failed to save working directory in order to run a command on %s" -msgstr "無法決定當前目錄位置" - -#: find/pred.c:1183 find/pred.c:1992 -#, c-format -msgid "getfilecon failed: %s" -msgstr "" - -#: find/pred.c:1507 +#: find/pred.c:718 #, fuzzy, c-format msgid "WARNING: cannot determine birth time of file %s" msgstr "無法開啟檔案 ‘%s’ 作為輸入資料" -#: find/pred.c:1571 +#: find/pred.c:782 #, c-format msgid "< %s ... %s > ? " msgstr "< %s ... %s > ? " -#: find/pred.c:2032 +#: find/pred.c:784 #, c-format -msgid "Cannot close standard input" +msgid "Failed to write prompt for -ok" msgstr "" -#: find/pred.c:2061 +#: find/pred.c:1208 find/print.c:1234 #, c-format -msgid "Failed to change directory" +msgid "getfilecon failed: %s" msgstr "" -#: find/pred.c:2092 xargs/xargs.c:1126 +#: find/print.c:346 #, c-format -msgid "cannot fork" -msgstr "fork 失敗" +msgid "warning: escape `\\' followed by nothing at all" +msgstr "" -#: find/pred.c:2123 +#: find/print.c:365 #, c-format -msgid "error waiting for %s" -msgstr "等待 %s 時出現錯誤" +msgid "warning: unrecognized escape `\\%c'" +msgstr "警告:無效辨認轉義控制序列 (escape sequence) ‘\\%c’" -#: find/pred.c:2132 +#: find/print.c:385 #, c-format -msgid "%s terminated by signal %d" -msgstr "%s 因訊號 %d 而終止" +msgid "error: %s at end of format string" +msgstr "" + +#: find/print.c:409 +#, c-format +msgid "error: the format directive `%%%c' is reserved for future use" +msgstr "" + +#: find/print.c:417 +#, c-format +msgid "" +"warning: format directive `%%%c' should be followed by another character" +msgstr "" + +#: find/print.c:425 +#, c-format +msgid "warning: unrecognized format directive `%%%c'" +msgstr "" -#: find/tree.c:124 find/tree.c:129 find/tree.c:219 find/tree.c:258 +#: find/tree.c:129 find/tree.c:134 find/tree.c:224 find/tree.c:263 #, c-format msgid "invalid expression" msgstr "表達式無效" -#: find/tree.c:135 +#: find/tree.c:140 #, c-format msgid "" "invalid expression; you have used a binary operator '%s' with nothing before " "it." msgstr "" -#: find/tree.c:146 +#: find/tree.c:151 #, c-format msgid "expected an expression between '%s' and ')'" msgstr "" -#: find/tree.c:156 +#: find/tree.c:161 #, c-format msgid "expected an expression after '%s'" msgstr "" -#: find/tree.c:161 +#: find/tree.c:166 #, c-format msgid "invalid expression; you have too many ')'" msgstr "表達式無效;出現太多的 ‘)’" -#: find/tree.c:184 +#: find/tree.c:189 #, fuzzy, c-format msgid "" "invalid expression; expected to find a ')' but didn't see one. Perhaps you " "need an extra predicate after '%s'" msgstr "表達式無效;‘)’ 本應出現但實際上沒有" -#: find/tree.c:192 +#: find/tree.c:197 #, fuzzy, c-format msgid "invalid expression; empty parentheses are not allowed." msgstr "表達式無效;出現太多的 ‘)’" -#: find/tree.c:198 +#: find/tree.c:203 #, c-format msgid "" "invalid expression; I was expecting to find a ')' somewhere but did not see " "one." msgstr "表達式無效;‘)’ 本應出現但實際上沒有" -#: find/tree.c:204 find/tree.c:827 +#: find/tree.c:209 find/tree.c:833 #, c-format msgid "oops -- invalid expression type!" msgstr "表達式類型無效!" -#: find/tree.c:276 +#: find/tree.c:281 #, c-format msgid "oops -- invalid expression type (%d)!" msgstr "表達式類型 (%d) 無效!" -#: find/tree.c:1114 +#: find/tree.c:1120 #, c-format msgid "" "warning: there is no entry in the predicate evaluation cost table for " "predicate %s; please report this as a bug" msgstr "" -#: find/tree.c:1288 +#: find/tree.c:1294 #, fuzzy, c-format msgid "paths must precede expression: %s" msgstr "路徑必須放在表達式之前" -#: find/tree.c:1297 +#: find/tree.c:1303 #, c-format msgid "unknown predicate `%s'" msgstr "" -#: find/tree.c:1317 +#: find/tree.c:1323 #, c-format msgid "invalid predicate `%s'" msgstr "" -#: find/tree.c:1322 +#: find/tree.c:1328 #, c-format msgid "invalid argument `%s' to `%s'" msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效" -#: find/tree.c:1330 +#: find/tree.c:1336 #, c-format msgid "missing argument to `%s'" msgstr "‘%s’ 後缺少了參數" -#: find/tree.c:1406 +#: find/tree.c:1412 #, fuzzy, c-format msgid "you have too many ')'" msgstr "表達式無效;出現太多的 ‘)’" -#: find/tree.c:1412 +#: find/tree.c:1418 #, c-format msgid "unexpected extra predicate '%s'" msgstr "" -#: find/tree.c:1414 +#: find/tree.c:1420 #, c-format msgid "unexpected extra predicate" msgstr "" -#: find/tree.c:1547 +#: find/tree.c:1553 #, c-format msgid "oops -- invalid default insertion of and!" msgstr "" -#: find/util.c:171 +#: find/util.c:175 #, fuzzy, c-format msgid "Usage: %s [-H] [-L] [-P] [-Olevel] [-D " msgstr "用法: %s [-H] [-L] [-P] [路徑...] [表達式]\n" -#: find/util.c:173 +#: find/util.c:177 #, fuzzy, c-format msgid "] [path...] [expression]\n" msgstr "用法:%s [路徑...] [表達式]\n" -#: find/util.c:451 +#: find/util.c:459 #, fuzzy, c-format msgid "failed to save initial working directory" msgstr "無法決定當前目錄位置" -#: find/util.c:468 +#: find/util.c:476 #, fuzzy, c-format msgid "failed to restore initial working directory" msgstr "無法決定當前目錄位置" -#: find/util.c:816 +#: find/util.c:824 #, fuzzy, c-format msgid "Ignoring unrecognised debug flag %s" msgstr "警告:無效辨認轉義控制序列 (escape sequence) ‘\\%c’" -#: find/util.c:823 +#: find/util.c:831 #, c-format msgid "Empty argument to the -D option." msgstr "" -#: find/util.c:839 +#: find/util.c:847 #, c-format msgid "The -O option must be immediately followed by a decimal integer" msgstr "" -#: find/util.c:849 find/util.c:860 +#: find/util.c:857 find/util.c:868 #, c-format msgid "Please specify a decimal number immediately after -O" msgstr "" -#: find/util.c:865 find/util.c:870 +#: find/util.c:873 find/util.c:878 #, c-format msgid "Invalid optimisation level %s" msgstr "" -#: find/util.c:878 +#: find/util.c:886 #, c-format msgid "" "Optimisation level %lu is too high. If you want to find files very quickly, " "consider using GNU locate." msgstr "" -#: find/util.c:1022 +#: find/util.c:1030 #, c-format msgid "" "The environment variable FIND_BLOCK_SIZE is not supported, the only thing " @@ -687,64 +737,380 @@ msgstr "" "環境變數 FIND_BLOCK_SIZE 已經不再支援,唯一一個能夠影響檔案區段大小的環境變數" "是 POSIXLY_CORRECT" -#: lib/buildcmd.c:171 +#: gl/lib/argmatch.c:133 +#, c-format +msgid "invalid argument %s for %s" +msgstr "%2$s 的參數 %1$s 無效" + +#: gl/lib/argmatch.c:134 +#, c-format +msgid "ambiguous argument %s for %s" +msgstr "%2$s 的參數 %1$s 不明確" + +#: gl/lib/argmatch.c:153 +msgid "Valid arguments are:" +msgstr "有效的參數為:" + +#: gl/lib/closein.c:100 +msgid "error closing file" +msgstr "" + +#: gl/lib/closeout.c:112 locate/code.c:153 locate/frcode.c:210 +#, c-format +msgid "write error" +msgstr "" + +#: gl/lib/error.c:188 +msgid "Unknown system error" +msgstr "不明的系統錯誤" + +#: gl/lib/getopt.c:547 gl/lib/getopt.c:576 +#, fuzzy, c-format +msgid "%s: option '%s' is ambiguous; possibilities:" +msgstr "%s:選項 ‘%s’ 不明確\n" + +#: gl/lib/getopt.c:624 gl/lib/getopt.c:628 +#, fuzzy, c-format +msgid "%s: option '--%s' doesn't allow an argument\n" +msgstr "%s:選項 ‘--%s’ 不可配合參數使用\n" + +#: gl/lib/getopt.c:637 gl/lib/getopt.c:642 +#, fuzzy, c-format +msgid "%s: option '%c%s' doesn't allow an argument\n" +msgstr "%s:選項 ‘%c%s’ 不可配合參數使用\n" + +#: gl/lib/getopt.c:685 gl/lib/getopt.c:704 +#, fuzzy, c-format +msgid "%s: option '--%s' requires an argument\n" +msgstr "%s:選項 ‘%s’ 需要參數\n" + +#: gl/lib/getopt.c:742 gl/lib/getopt.c:745 +#, fuzzy, c-format +msgid "%s: unrecognized option '--%s'\n" +msgstr "%s:‘--%s’ 選項無法辨識\n" + +#: gl/lib/getopt.c:753 gl/lib/getopt.c:756 +#, fuzzy, c-format +msgid "%s: unrecognized option '%c%s'\n" +msgstr "%s:‘%c%s’ 選項無法辨識\n" + +#: gl/lib/getopt.c:805 gl/lib/getopt.c:808 +#, fuzzy, c-format +msgid "%s: invalid option -- '%c'\n" +msgstr "%s:無效的選項 ─ %c\n" + +#: gl/lib/getopt.c:861 gl/lib/getopt.c:878 gl/lib/getopt.c:1088 +#: gl/lib/getopt.c:1106 +#, fuzzy, c-format +msgid "%s: option requires an argument -- '%c'\n" +msgstr "%s:選項需要參數 ─ %c\n" + +#: gl/lib/getopt.c:934 gl/lib/getopt.c:950 +#, fuzzy, c-format +msgid "%s: option '-W %s' is ambiguous\n" +msgstr "%s:選項 ‘-W %s’ 不明確\n" + +#: gl/lib/getopt.c:974 gl/lib/getopt.c:992 +#, fuzzy, c-format +msgid "%s: option '-W %s' doesn't allow an argument\n" +msgstr "%s:選項 ‘-W %s’ 不可配合參數使用\n" + +#: gl/lib/getopt.c:1013 gl/lib/getopt.c:1031 +#, fuzzy, c-format +msgid "%s: option '-W %s' requires an argument\n" +msgstr "%s:選項 ‘%s’ 需要參數\n" + +#: gl/lib/openat-die.c:38 +#, fuzzy, c-format +msgid "unable to record current working directory" +msgstr "無法決定當前目錄位置" + +#: gl/lib/openat-die.c:57 +#, fuzzy, c-format +msgid "failed to return to initial working directory" +msgstr "無法決定當前目錄位置" + +#. TRANSLATORS: +#. Get translations for open and closing quotation marks. +#. The message catalog should translate "`" to a left +#. quotation mark suitable for the locale, and similarly for +#. "'". For example, a French Unicode local should translate +#. these to U+00AB (LEFT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE +#. QUOTATION MARK), respectively. +#. +#. If the catalog has no translation, we will try to +#. use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and +#. Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the +#. current locale is not Unicode, locale_quoting_style +#. will quote 'like this', and clocale_quoting_style will +#. quote "like this". You should always include translations +#. for "`" and "'" even if U+2018 and U+2019 are appropriate +#. for your locale. +#. +#. If you don't know what to put here, please see +#. +#. and use glyphs suitable for your language. +#: gl/lib/quotearg.c:312 +msgid "`" +msgstr "‘" + +#: gl/lib/quotearg.c:313 +msgid "'" +msgstr "’" + +#. TRANSLATORS: A regular expression testing for an affirmative answer +#. (english: "yes"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^yesexpr=' +#: gl/lib/rpmatch.c:150 +msgid "^[yY]" +msgstr "^[yY]" + +#. TRANSLATORS: A regular expression testing for a negative answer +#. (english: "no"). Testing the first character may be sufficient. +#. Take care to consider upper and lower case. +#. To enquire the regular expression that your system uses for this +#. purpose, you can use the command +#. locale -k LC_MESSAGES | grep '^noexpr=' +#: gl/lib/rpmatch.c:163 +msgid "^[nN]" +msgstr "^[nN]" + +#: gl/lib/version-etc.c:74 +#, c-format +msgid "Packaged by %s (%s)\n" +msgstr "" + +#: gl/lib/version-etc.c:77 +#, c-format +msgid "Packaged by %s\n" +msgstr "" + +#. TRANSLATORS: Translate "(C)" to the copyright symbol +#. (C-in-a-circle), if this symbol is available in the user's +#. locale. Otherwise, do not translate "(C)"; leave it as-is. +#: gl/lib/version-etc.c:84 +msgid "(C)" +msgstr "" + +#: gl/lib/version-etc.c:86 +msgid "" +"\n" +"License GPLv3+: GNU GPL version 3 or later .\n" +"This is free software: you are free to change and redistribute it.\n" +"There is NO WARRANTY, to the extent permitted by law.\n" +"\n" +msgstr "" + +#. TRANSLATORS: %s denotes an author name. +#: gl/lib/version-etc.c:102 +#, c-format +msgid "Written by %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:106 +#, c-format +msgid "Written by %s and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#: gl/lib/version-etc.c:110 +#, c-format +msgid "Written by %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:117 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:124 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:131 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:139 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:147 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:156 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, and %s.\n" +msgstr "" + +#. TRANSLATORS: Each %s denotes an author name. +#. You can use line breaks, estimating that each author name occupies +#. ca. 16 screen columns and that a screen line has ca. 80 columns. +#: gl/lib/version-etc.c:167 +#, c-format +msgid "" +"Written by %s, %s, %s,\n" +"%s, %s, %s, %s,\n" +"%s, %s, and others.\n" +msgstr "" + +#. TRANSLATORS: The placeholder indicates the bug-reporting address +#. for this package. Please add _another line_ saying +#. "Report translation bugs to <...>\n" with the address for translation +#. bugs (typically your translation team's web or email address). +#: gl/lib/version-etc.c:245 +#, c-format +msgid "" +"\n" +"Report bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:247 +#, c-format +msgid "Report %s bugs to: %s\n" +msgstr "" + +#: gl/lib/version-etc.c:251 +#, c-format +msgid "%s home page: <%s>\n" +msgstr "" + +#: gl/lib/version-etc.c:253 +#, c-format +msgid "%s home page: \n" +msgstr "" + +#: gl/lib/version-etc.c:256 +msgid "General help using GNU software: \n" +msgstr "" + +#: gl/lib/xalloc-die.c:34 +msgid "memory exhausted" +msgstr "" + +#: gl/lib/xstrtol-error.c:63 +#, fuzzy, c-format +msgid "invalid %s%s argument '%s'" +msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效" + +#: gl/lib/xstrtol-error.c:68 +#, fuzzy, c-format +msgid "invalid suffix in %s%s argument '%s'" +msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效" + +#: gl/lib/xstrtol-error.c:72 +#, fuzzy, c-format +msgid "%s%s argument '%s' too large" +msgstr "參數太長" + +#: lib/buildcmd.c:161 #, c-format msgid "command too long" msgstr "" -#: lib/buildcmd.c:311 +#: lib/buildcmd.c:301 #, c-format msgid "can't call exec() due to argument size restrictions" msgstr "" -#: lib/buildcmd.c:381 +#: lib/buildcmd.c:371 #, c-format msgid "cannot fit single argument within argument list size limit" msgstr "" -#: lib/buildcmd.c:387 +#: lib/buildcmd.c:377 #, fuzzy, c-format msgid "argument list too long" msgstr "參數太長" -#: lib/buildcmd.c:640 +#: lib/buildcmd.c:629 #, c-format msgid "Environment variable %s is not set to a valid decimal number" msgstr "" -#: lib/findutils-version.c:60 +#: lib/fdleak.c:377 +#, c-format +msgid "" +"File descriptor %d will leak; please report this as a bug, remembering to " +"include a detailed description of the simplest way to reproduce this problem." +msgstr "" + +#: lib/findutils-version.c:55 msgid "Eric B. Decker" msgstr "" -#: lib/findutils-version.c:61 +#: lib/findutils-version.c:56 msgid "James Youngman" msgstr "" -#: lib/findutils-version.c:62 +#: lib/findutils-version.c:57 msgid "Kevin Dalley" msgstr "" -#: lib/findutils-version.c:64 +#: lib/listfile.c:337 #, fuzzy, c-format -msgid "Built using GNU gnulib version %s\n" -msgstr "GNU findutils %s 版本\n" +msgid "Failed to write output (at stage %d)" +msgstr "無法決定當前目錄位置" -#: lib/safe-atoi.c:76 +#: lib/regextype.c:110 #, c-format -msgid "Unexpected suffix %s on %s" +msgid "Unknown regular expression type %s; valid types are %s." msgstr "" -#: lib/safe-atoi.c:82 +#: lib/safe-atoi.c:81 #, c-format -msgid "Expected an integer: %s" +msgid "Unexpected suffix %s on %s" msgstr "" -#: lib/regextype.c:107 +#: lib/safe-atoi.c:87 #, c-format -msgid "Unknown regular expression type %s; valid types are %s." +msgid "Expected an integer: %s" msgstr "" -#: locate/code.c:127 +#: locate/code.c:131 #, c-format msgid "" "Usage: %s [--version | --help]\n" @@ -753,8 +1119,8 @@ msgstr "" "用法: %s [--version | --help]\n" "或 %s most_common_bigrams < 檔案清單 > locate資料庫\n" -#: locate/code.c:131 locate/frcode.c:159 locate/locate.c:1409 -#: xargs/xargs.c:1519 +#: locate/code.c:135 locate/frcode.c:162 locate/locate.c:1381 +#: xargs/xargs.c:1660 msgid "" "\n" "Report bugs to .\n" @@ -762,83 +1128,78 @@ msgstr "" "\n" "請向 報告錯誤。\n" -#: locate/code.c:149 locate/frcode.c:207 -#, c-format -msgid "write error" -msgstr "" - -#: locate/frcode.c:157 +#: locate/frcode.c:160 #, c-format msgid "Usage: %s [-0 | --null] [--version] [--help]\n" msgstr "" -#: locate/frcode.c:177 +#: locate/frcode.c:180 #, c-format msgid "You need to specify a security level as a decimal integer." msgstr "" -#: locate/frcode.c:185 +#: locate/frcode.c:188 #, c-format msgid "Security level %s is outside the convertible range." msgstr "" -#: locate/frcode.c:193 +#: locate/frcode.c:196 #, c-format msgid "Security level %s has unexpected suffix %s." msgstr "" -#: locate/frcode.c:251 +#: locate/frcode.c:257 #, c-format msgid "slocate security level %ld is unsupported." msgstr "" -#: locate/frcode.c:289 +#: locate/frcode.c:295 #, c-format msgid "Failed to write to standard output" msgstr "" -#: locate/locate.c:146 +#: locate/locate.c:139 msgid "days" msgstr "日" -#: locate/locate.c:193 +#: locate/locate.c:186 #, c-format msgid "The argument for option --max-database-age must not be empty" msgstr "" -#: locate/locate.c:209 locate/locate.c:216 +#: locate/locate.c:202 locate/locate.c:209 #, fuzzy, c-format msgid "Invalid argument %s for option --max-database-age" msgstr "%2$s 的參數 %1$s 無效" -#: locate/locate.c:468 +#: locate/locate.c:459 #, c-format msgid "locate database %s contains a filename longer than locate can handle" msgstr "" -#: locate/locate.c:603 +#: locate/locate.c:569 locate/locate.c:588 #, fuzzy, c-format msgid "locate database %s is corrupt or invalid" msgstr "locate 資料庫 ‘%s’ 內容已損壞或無效" -#: locate/locate.c:893 +#: locate/locate.c:860 #, fuzzy, c-format msgid "Locate database size: %s byte\n" msgid_plural "Locate database size: %s bytes\n" msgstr[0] "locate 資料庫大小:%s 位元組\n" msgstr[1] "locate 資料庫大小:%s 位元組\n" -#: locate/locate.c:900 +#: locate/locate.c:867 #, fuzzy, c-format msgid "Matching Filenames: %s\n" msgstr "檔案總數: %s," -#: locate/locate.c:901 +#: locate/locate.c:868 #, fuzzy, c-format msgid "All Filenames: %s\n" msgstr "檔案總數: %s," -#: locate/locate.c:907 +#: locate/locate.c:874 #, c-format msgid "" "File names have a cumulative length of %s bytes.\n" @@ -849,44 +1210,44 @@ msgid "" "\tand %s contain characters with the high bit set.\n" msgstr "" -#: locate/locate.c:921 +#: locate/locate.c:888 #, c-format msgid "" "Some filenames may have been filtered out, so we cannot compute the " "compression ratio.\n" msgstr "" -#: locate/locate.c:934 +#: locate/locate.c:901 #, fuzzy, c-format msgid "Compression ratio %4.2f%% (higher is better)\n" msgstr "壓縮比率 %4.2f%%\n" -#: locate/locate.c:941 +#: locate/locate.c:908 #, fuzzy, c-format msgid "Compression ratio is undefined\n" msgstr "壓縮比率 %4.2f%%\n" -#: locate/locate.c:996 +#: locate/locate.c:963 #, c-format msgid "" "locate database %s looks like an slocate database but it seems to have " "security level %c, which GNU findutils does not currently support" msgstr "" -#: locate/locate.c:1109 +#: locate/locate.c:1075 #, c-format msgid "" "%s is an slocate database. Support for these is new, expect problems for " "now." msgstr "" -#: locate/locate.c:1123 +#: locate/locate.c:1089 #, c-format msgid "" "%s is an slocate database of unsupported security level %d; skipping it." msgstr "" -#: locate/locate.c:1140 +#: locate/locate.c:1106 #, c-format msgid "" "You specified the -E option, but that option cannot be used with slocate-" @@ -894,35 +1255,35 @@ msgid "" "generated for this database.\n" msgstr "" -#: locate/locate.c:1151 +#: locate/locate.c:1117 #, c-format msgid "%s is an slocate database. Turning on the '-e' option." msgstr "" -#: locate/locate.c:1189 +#: locate/locate.c:1155 #, fuzzy, c-format msgid "Old-format locate database %s is too short to be valid" msgstr "locate 資料庫 ‘%s’ 內容已損壞或無效" -#: locate/locate.c:1341 +#: locate/locate.c:1307 #, c-format msgid "Database %s is in the %s format.\n" msgstr "資料庫 %s 使用了%s格式。\n" -#: locate/locate.c:1362 +#: locate/locate.c:1334 msgid "The database has little-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1364 +#: locate/locate.c:1336 msgid "The database has big-endian machine-word encoding.\n" msgstr "" -#: locate/locate.c:1377 +#: locate/locate.c:1349 #, c-format msgid "The database machine-word encoding order is not obvious.\n" msgstr "" -#: locate/locate.c:1400 +#: locate/locate.c:1372 #, fuzzy, c-format msgid "" "Usage: %s [-d path | --database=path] [-e | -E | --[non-]existing]\n" @@ -942,80 +1303,80 @@ msgstr "" " [-version] [--help]\n" " 檔案名稱樣式...\n" -#: locate/locate.c:1463 +#: locate/locate.c:1435 msgid "failed to drop group privileges" msgstr "" -#: locate/locate.c:1481 +#: locate/locate.c:1453 msgid "failed to drop setuid privileges" msgstr "" -#: locate/locate.c:1495 +#: locate/locate.c:1467 msgid "Failed to fully drop privileges" msgstr "" -#: locate/locate.c:1513 +#: locate/locate.c:1485 msgid "failed to drop setgid privileges" msgstr "" -#: locate/locate.c:1783 +#: locate/locate.c:1763 #, c-format msgid "warning: the locate database can only be read from stdin once." msgstr "警告:locate 資料庫只可以由標準輸入讀取一次。" -#: locate/locate.c:1845 +#: locate/locate.c:1833 #, c-format msgid "time system call failed" msgstr "" # e.g. database `%s' is more than 8 days old -#: locate/locate.c:1856 +#: locate/locate.c:1844 #, fuzzy, c-format msgid "warning: database %s is more than %d %s old (actual age is %.1f %s)" msgstr "警告:資料庫 ‘%s’ 是超過 %d %s前產生的" -#: locate/word_io.c:96 +#: locate/word_io.c:98 #, c-format msgid "WARNING: locate database %s was built with a different byte order" msgstr "" -#: locate/word_io.c:143 +#: locate/word_io.c:145 #, c-format msgid "unexpected EOF in %s" msgstr "" -#: locate/word_io.c:146 +#: locate/word_io.c:148 #, fuzzy, c-format msgid "error reading a word from %s" msgstr "等待 %s 時出現錯誤" -#: xargs/xargs.c:258 +#: xargs/xargs.c:252 #, fuzzy, c-format msgid "Invalid escape sequence %s in input delimiter specification." msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法。" -#: xargs/xargs.c:276 +#: xargs/xargs.c:270 #, fuzzy, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lx." msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法:字元值不可以超過 %lx。" -#: xargs/xargs.c:282 +#: xargs/xargs.c:276 #, fuzzy, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; character " "values must not exceed %lo." msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法:字元值不可以超過 %lo。" -#: xargs/xargs.c:291 +#: xargs/xargs.c:285 #, fuzzy, c-format msgid "" "Invalid escape sequence %s in input delimiter specification; trailing " "characters %s not recognised." msgstr "轉義控制序列 (escape sequence) ‘%s’ 不合法:無法辨認最後的字元 ‘%s’。" -#: xargs/xargs.c:336 +#: xargs/xargs.c:330 #, fuzzy, c-format msgid "" "Invalid input delimiter specification %s: the delimiter must be either a " @@ -1024,59 +1385,74 @@ msgstr "" "分隔字元 ‘%s’ 不合法:分隔字元必須是一個 ASCII 字元或以反斜號 \\ 開始的轉義控" "制序列 (escape sequence)。" -#: xargs/xargs.c:353 +#: xargs/xargs.c:347 #, c-format msgid "environment is too large for exec" msgstr "執行 exec 時的環境變數太大" -#: xargs/xargs.c:561 +#: xargs/xargs.c:559 #, c-format msgid "warning: value %ld for -s option is too large, using %ld instead" msgstr "" -#: xargs/xargs.c:629 +#: xargs/xargs.c:606 +#, c-format +msgid "option --%s may not be set to a value which includes `='" +msgstr "" + +#: xargs/xargs.c:618 +#, c-format +msgid "failed to unset environment variable %s" +msgstr "" + +#: xargs/xargs.c:632 +#, c-format +msgid "warning: the -E option has no effect if -0 or -d is used.\n" +msgstr "" + +#: xargs/xargs.c:654 #, c-format msgid "Cannot set SIGUSR1 signal handler" msgstr "" -#: xargs/xargs.c:635 +#: xargs/xargs.c:660 #, c-format msgid "Cannot set SIGUSR2 signal handler" msgstr "" -#: xargs/xargs.c:651 +#: xargs/xargs.c:676 #, fuzzy, c-format msgid "Cannot open input file %s" msgstr "無法開啟檔案 ‘%s’ 作為輸入資料" -#: xargs/xargs.c:669 +#: xargs/xargs.c:695 #, fuzzy, c-format msgid "Your environment variables take up % bytes\n" msgstr "環境變數總共用了 %ld 位元組\n" -#: xargs/xargs.c:672 +#: xargs/xargs.c:698 #, fuzzy, c-format msgid "POSIX upper limit on argument length (this system): %\n" msgstr "POSIX 標準中參數長度上下限為:%ld, %ld\n" -#: xargs/xargs.c:675 +#: xargs/xargs.c:701 #, fuzzy, c-format msgid "" "POSIX smallest allowable upper limit on argument length (all systems): " "%\n" msgstr "POSIX 標準中參數長度上下限為:%ld, %ld\n" -#: xargs/xargs.c:678 +#: xargs/xargs.c:704 #, fuzzy, c-format msgid "Maximum length of command we could actually use: %\n" msgstr "實際上可用的指令列長度上限:%ld\n" -#: xargs/xargs.c:681 +#: xargs/xargs.c:707 #, fuzzy, c-format msgid "Size of command buffer we are actually using: %\n" msgstr "實際上使用的指令列緩衝區大小:%ld\n" -#: xargs/xargs.c:687 +#: xargs/xargs.c:713 #, c-format msgid "" "\n" @@ -1085,14 +1461,14 @@ msgid "" "of-file keystroke.\n" msgstr "" -#: xargs/xargs.c:695 +#: xargs/xargs.c:721 #, c-format msgid "" "Warning: %s will be run at least once. If you do not want that to happen, " "then press the interrupt keystroke.\n" msgstr "" -#: xargs/xargs.c:823 xargs/xargs.c:916 +#: xargs/xargs.c:849 xargs/xargs.c:942 #, c-format msgid "" "unmatched %s quote; by default quotes are special to xargs unless you use " @@ -1101,198 +1477,280 @@ msgstr "" "%s引號不配合;除非使用 -0 選項,否則在預設模式下引號對於 xargs 來說是有特別意" "義的" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "double" msgstr "雙" -#: xargs/xargs.c:824 xargs/xargs.c:917 +#: xargs/xargs.c:850 xargs/xargs.c:943 msgid "single" msgstr "單" -#: xargs/xargs.c:936 +#: xargs/xargs.c:962 #, c-format msgid "" "WARNING: a NUL character occurred in the input. It cannot be passed through " "in the argument list. Did you mean to use the --null option?" msgstr "" -#: xargs/xargs.c:946 xargs/xargs.c:1003 +#: xargs/xargs.c:972 xargs/xargs.c:1037 #, c-format msgid "argument line too long" msgstr "參數太長" -#: xargs/xargs.c:1031 +#: xargs/xargs.c:1056 xargs/xargs.c:1073 +#, fuzzy, c-format +msgid "Failed to write to stderr" +msgstr "無法決定當前目錄位置" + +#: xargs/xargs.c:1069 #, c-format msgid "failed to open /dev/tty for reading" msgstr "" -#: xargs/xargs.c:1115 +#: xargs/xargs.c:1079 +#, c-format +msgid "Failed to read from stdin" +msgstr "" + +#: xargs/xargs.c:1116 +#, c-format +msgid "unable to allocate memory" +msgstr "" + +#: xargs/xargs.c:1131 +#, c-format +msgid "failed to set environment variable %s" +msgstr "" + +#: xargs/xargs.c:1218 #, c-format msgid "could not create pipe before fork" msgstr "" -#: xargs/xargs.c:1184 +#: xargs/xargs.c:1289 #, c-format msgid "" -"errno-buffer read failed in xargs_do_exec (this is probably a bug, please " -"report it)" +"errno-buffer safe_read failed in xargs_do_exec (this is probably a bug, " +"please report it)" msgstr "" -#: xargs/xargs.c:1237 +#: xargs/xargs.c:1342 #, c-format msgid "" -"read returned unexpected value %d; this is probably a bug, please report it" +"read returned unexpected value %zu; this is probably a bug, please report it" msgstr "" -#: xargs/xargs.c:1329 +#: xargs/xargs.c:1435 #, c-format msgid "error waiting for child process" msgstr "等待子進程時出現錯誤" -#: xargs/xargs.c:1362 +#: xargs/xargs.c:1468 #, c-format -msgid "WARNING: Lost track of %d child processes" +msgid "WARNING: Lost track of %lu child processes" msgstr "" -#: xargs/xargs.c:1381 +#: xargs/xargs.c:1487 #, c-format msgid "%s: exited with status 255; aborting" msgstr "%s: 回傳碼為 255;中止" -#: xargs/xargs.c:1384 +#: xargs/xargs.c:1490 #, c-format msgid "%s: stopped by signal %d" msgstr "%s: 因訊號 %d 而停止" -#: xargs/xargs.c:1387 +#: xargs/xargs.c:1493 #, c-format msgid "%s: terminated by signal %d" msgstr "%s: 因訊號 %d 而中止" -#: xargs/xargs.c:1469 +#: xargs/xargs.c:1577 #, c-format msgid "%s: invalid number for -%c option\n" msgstr "%s: -%c 選項後的數值無效\n" -#: xargs/xargs.c:1476 +#: xargs/xargs.c:1584 #, c-format msgid "%s: value for -%c option should be >= %ld\n" msgstr "%s: -%c 選項後的數值必須不小於 %ld\n" -#: xargs/xargs.c:1490 +#: xargs/xargs.c:1598 #, c-format msgid "%s: value for -%c option should be < %ld\n" msgstr "%s: -%c 選項後的數值必須小於 %ld\n" -#: xargs/xargs.c:1508 -#, fuzzy, c-format -msgid "" -"Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [command [initial-arguments]]\n" -msgstr "" -"用法: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" -" [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" -" [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" -" [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" -" [-n max-args] [--max-args=max-args]\n" -" [-s max-chars] [--max-chars=max-chars]\n" -" [-P max-procs] [--max-procs=max-procs]\n" -" [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" -" [--version] [--help] [指令 [指令的參數]]\n" +#: xargs/xargs.c:1617 +#, c-format +msgid "Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n" +msgstr "" -#~ msgid "cannot get current directory" -#~ msgstr "無法決定當前目錄位置" +#: xargs/xargs.c:1622 +msgid "" +"Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" +"\n" +msgstr "" -#~ msgid "invalid argument %s for %s" -#~ msgstr "%2$s 的參數 %1$s 無效" +#: xargs/xargs.c:1624 +msgid "" +"Mandatory and optional arguments to long options are also\n" +"mandatory or optional for the corresponding short option.\n" +msgstr "" -#~ msgid "ambiguous argument %s for %s" -#~ msgstr "%2$s 的參數 %1$s 不明確" +#: xargs/xargs.c:1626 +msgid "" +" -0, --null items are separated by a null, not " +"whitespace;\n" +" disables quote and backslash processing " +"and\n" +" logical EOF processing\n" +msgstr "" -#~ msgid "Valid arguments are:" -#~ msgstr "有效的參數為:" +#: xargs/xargs.c:1629 +msgid "" +" -a, --arg-file=FILE read arguments from FILE, not standard input\n" +msgstr "" -#~ msgid "Unknown system error" -#~ msgstr "不明的系統錯誤" +#: xargs/xargs.c:1630 +msgid "" +" -d, --delimiter=CHARACTER items in input stream are separated by " +"CHARACTER,\n" +" not by whitespace; disables quote and " +"backslash\n" +" processing and logical EOF processing\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' is ambiguous\n" -#~ msgstr "%s:選項 ‘%s’ 不明確\n" +#: xargs/xargs.c:1633 +msgid "" +" -E END set logical EOF string; if END occurs as a " +"line\n" +" of input, the rest of the input is ignored\n" +" (ignored if -0 or -d was specified)\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '--%s' doesn't allow an argument\n" -#~ msgstr "%s:選項 ‘--%s’ 不可配合參數使用\n" +#: xargs/xargs.c:1636 +msgid "" +" -e, --eof[=END] equivalent to -E END if END is specified;\n" +" otherwise, there is no end-of-file string\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%c%s' doesn't allow an argument\n" -#~ msgstr "%s:選項 ‘%c%s’ 不可配合參數使用\n" +#: xargs/xargs.c:1638 +msgid " -I R same as --replace=R\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '%s' requires an argument\n" -#~ msgstr "%s:選項 ‘%s’ 需要參數\n" +#: xargs/xargs.c:1639 +msgid "" +" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" +" from standard input; if R is unspecified,\n" +" assume {}\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '--%s'\n" -#~ msgstr "%s:‘--%s’ 選項無法辨識\n" +#: xargs/xargs.c:1642 +msgid "" +" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines " +"per\n" +" command line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: unrecognized option '%c%s'\n" -#~ msgstr "%s:‘%c%s’ 選項無法辨識\n" +#: xargs/xargs.c:1644 +msgid "" +" -l[MAX-LINES] similar to -L but defaults to at most one " +"non-\n" +" blank input line if MAX-LINES is not " +"specified\n" +msgstr "" -#, fuzzy -#~ msgid "%s: invalid option -- '%c'\n" -#~ msgstr "%s:無效的選項 ─ %c\n" +#: xargs/xargs.c:1646 +msgid "" +" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command " +"line\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option requires an argument -- '%c'\n" -#~ msgstr "%s:選項需要參數 ─ %c\n" +#: xargs/xargs.c:1647 +msgid "" +" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' is ambiguous\n" -#~ msgstr "%s:選項 ‘-W %s’ 不明確\n" +#: xargs/xargs.c:1648 +msgid " -p, --interactive prompt before running commands\n" +msgstr "" -#, fuzzy -#~ msgid "%s: option '-W %s' doesn't allow an argument\n" -#~ msgstr "%s:選項 ‘-W %s’ 不可配合參數使用\n" +#: xargs/xargs.c:1649 +msgid "" +" --process-slot-var=VAR set environment variable VAR in child " +"processes\n" +msgstr "" -#~ msgid "`" -#~ msgstr "‘" +#: xargs/xargs.c:1650 +msgid "" +" -r, --no-run-if-empty if there are no arguments, then do not run " +"COMMAND;\n" +" if this option is not given, COMMAND will " +"be\n" +" run at least once\n" +msgstr "" -#~ msgid "'" -#~ msgstr "’" +#: xargs/xargs.c:1653 +msgid "" +" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n" +msgstr "" -#, fuzzy -#~ msgid "Invalid regular expression" -#~ msgstr "表達式無效" +#: xargs/xargs.c:1654 +msgid " --show-limits show limits on command-line length\n" +msgstr "" -#, fuzzy -#~ msgid "Invalid preceding regular expression" -#~ msgstr "表達式無效" +#: xargs/xargs.c:1655 +msgid " -t, --verbose print commands before executing them\n" +msgstr "" -#~ msgid "^[yY]" -#~ msgstr "^[yY]" +#: xargs/xargs.c:1656 +msgid " -x, --exit exit if the size (see -s) is exceeded\n" +msgstr "" + +#: xargs/xargs.c:1658 +msgid " --help display this help and exit\n" +msgstr "" + +#: xargs/xargs.c:1659 +msgid " --version output version information and exit\n" +msgstr "" -#~ msgid "^[nN]" -#~ msgstr "^[nN]" +#, fuzzy +#~ msgid "Built using GNU gnulib version %s\n" +#~ msgstr "GNU findutils %s 版本\n" #, fuzzy -#~ msgid "invalid %s%s argument `%s'" -#~ msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效" +#~ msgid "" +#~ "Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs] [--show-limits]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [command [initial-arguments]]\n" +#~ msgstr "" +#~ "用法: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n" +#~ " [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n" +#~ " [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n" +#~ " [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n" +#~ " [-n max-args] [--max-args=max-args]\n" +#~ " [-s max-chars] [--max-chars=max-chars]\n" +#~ " [-P max-procs] [--max-procs=max-procs]\n" +#~ " [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n" +#~ " [--version] [--help] [指令 [指令的參數]]\n" + +#~ msgid "cannot get current directory" +#~ msgstr "無法決定當前目錄位置" #, fuzzy -#~ msgid "invalid suffix in %s%s argument `%s'" -#~ msgstr "‘%2$s’ 的參數 ‘%1$s’ 無效" +#~ msgid "Invalid regular expression" +#~ msgstr "表達式無效" #, fuzzy -#~ msgid "%s%s argument `%s' too large" -#~ msgstr "參數太長" +#~ msgid "Invalid preceding regular expression" +#~ msgstr "表達式無效" #~ msgid "%s: illegal option -- %c\n" #~ msgstr "%s:不合法的選項 ─ %c\n" diff --git a/tests/Makefile.am b/tests/Makefile.am index 7931bb3..e2328b2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,16 +1,28 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under +# 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . +# +# As a special exception to the GNU General Public License, +# this file may be distributed as part of a program that +# contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects +AUTOMAKE_OPTIONS = 1.9.6 foreign subdir-objects SUBDIRS = . TESTS = @@ -34,9 +46,9 @@ AM_CPPFLAGS = \ -D@gltests_WITNESS@=1 \ -I. -I$(srcdir) \ -I.. -I$(srcdir)/.. \ - -I../gnulib/lib -I$(srcdir)/../gnulib/lib + -I../gl/lib -I$(srcdir)/../gl/lib -LDADD = libtests.a ../gnulib/lib/libgnulib.a libtests.a $(LIBTESTS_LIBDEPS) +LDADD = libtests.a ../gl/lib/libgnulib.a libtests.a $(LIBTESTS_LIBDEPS) libtests_a_SOURCES = libtests_a_LIBADD = $(gltests_LIBOBJS) @@ -46,6 +58,24 @@ AM_LIBTOOLFLAGS = --preserve-dup-deps TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)' +## begin gnulib module accept + + +EXTRA_DIST += accept.c w32sock.h + +EXTRA_libtests_a_SOURCES += accept.c + +## end gnulib module accept + +## begin gnulib module accept-tests + +TESTS += test-accept +check_PROGRAMS += test-accept +test_accept_LDADD = $(LDADD) @LIBSOCKET@ +EXTRA_DIST += test-accept.c signature.h macros.h + +## end gnulib module accept-tests + ## begin gnulib module alloca-opt-tests TESTS += test-alloca-opt @@ -80,30 +110,6 @@ EXTRA_DIST += test-areadlink.h test-areadlinkat.c macros.h ## end gnulib module areadlinkat-tests -## begin gnulib module arg-nonnull - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += arg-nonnull.h -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/arg-nonnull.h, except that it has the copyright header cut off. -arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/build-aux/arg-nonnull.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t - -ARG_NONNULL_H=arg-nonnull.h - -EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h - -## end gnulib module arg-nonnull - ## begin gnulib module argmatch-tests TESTS += test-argmatch @@ -114,9 +120,53 @@ EXTRA_DIST += test-argmatch.c macros.h ## end gnulib module argmatch-tests +## begin gnulib module arpa_inet + +BUILT_SOURCES += arpa/inet.h + +# We need the following in order to create when the system +# doesn't have one. +arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_at)$(MKDIR_P) arpa + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ + -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \ + -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \ + -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \ + -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \ + -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \ + -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \ + -e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \ + -e 's|@''REPLACE_INET_PTON''@|$(REPLACE_INET_PTON)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/arpa_inet.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t +MOSTLYCLEANDIRS += arpa + +EXTRA_DIST += arpa_inet.in.h + +## end gnulib module arpa_inet + +## begin gnulib module arpa_inet-tests + +TESTS += test-arpa_inet +check_PROGRAMS += test-arpa_inet +EXTRA_DIST += test-arpa_inet.c + +## end gnulib module arpa_inet-tests + ## 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 @@ -129,6 +179,24 @@ EXTRA_DIST += test-binary-io.sh test-binary-io.c macros.h ## end gnulib module binary-io-tests +## begin gnulib module bind + + +EXTRA_DIST += bind.c w32sock.h + +EXTRA_libtests_a_SOURCES += bind.c + +## end gnulib module bind + +## begin gnulib module bind-tests + +TESTS += test-bind +check_PROGRAMS += test-bind +test_bind_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) +EXTRA_DIST += test-bind.c signature.h macros.h + +## end gnulib module bind-tests + ## begin gnulib module bitrotate-tests TESTS += test-bitrotate @@ -147,29 +215,13 @@ EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h ## end gnulib module btowc-tests -## begin gnulib module c++defs +## begin gnulib module byteswap-tests -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. +TESTS += test-byteswap +check_PROGRAMS += test-byteswap +EXTRA_DIST += test-byteswap.c macros.h -BUILT_SOURCES += c++defs.h -# The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/c++defs.h, except that it has the copyright header cut off. -c++defs.h: $(top_srcdir)/build-aux/c++defs.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/build-aux/c++defs.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += c++defs.h c++defs.h-t - -CXXDEFS_H=c++defs.h - -EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h - -## end gnulib module c++defs +## end gnulib module byteswap-tests ## begin gnulib module c-ctype-tests @@ -216,14 +268,13 @@ EXTRA_DIST += test-canonicalize.c macros.h ## end gnulib module canonicalize-tests -## begin gnulib module chown-tests +## begin gnulib module chdir-tests -TESTS += test-chown -check_PROGRAMS += test-chown -test_chown_LDADD = $(LDADD) @LIBINTL@ -EXTRA_DIST += nap.h test-chown.h test-chown.c signature.h macros.h +TESTS += test-chdir +check_PROGRAMS += test-chdir +EXTRA_DIST += test-chdir.c signature.h macros.h -## end gnulib module chown-tests +## end gnulib module chdir-tests ## begin gnulib module cloexec-tests @@ -233,6 +284,14 @@ EXTRA_DIST += test-cloexec.c macros.h ## end gnulib module cloexec-tests +## begin gnulib module close-tests + +TESTS += test-close +check_PROGRAMS += test-close +EXTRA_DIST += test-close.c signature.h macros.h + +## end gnulib module close-tests + ## begin gnulib module closein-tests TESTS += test-closein.sh @@ -242,6 +301,24 @@ EXTRA_DIST += test-closein.sh test-closein.c ## end gnulib module closein-tests +## begin gnulib module connect + + +EXTRA_DIST += connect.c w32sock.h + +EXTRA_libtests_a_SOURCES += connect.c + +## end gnulib module connect + +## begin gnulib module connect-tests + +TESTS += test-connect +check_PROGRAMS += test-connect +test_connect_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) +EXTRA_DIST += test-connect.c signature.h macros.h + +## end gnulib module connect-tests + ## begin gnulib module ctype-tests TESTS += test-ctype @@ -255,7 +332,7 @@ EXTRA_DIST += test-ctype.c TESTS += test-dirent-safer check_PROGRAMS += test-dirent-safer # Link with libintl when needed. dirent-safer uses fdopendir if it is present, -# and fdopendir indirectly depends on xgetcwd -> xalloc-die -> gettext-h. +# and fdopendir indirectly depends on openat-die -> gettext-h. test_dirent_safer_LDADD = $(LDADD) $(LIBINTL) EXTRA_DIST += test-dirent-safer.c macros.h @@ -278,6 +355,14 @@ EXTRA_DIST += test-dirname.c ## end gnulib module dirname-tests +## begin gnulib module dup-tests + +TESTS += test-dup +check_PROGRAMS += test-dup +EXTRA_DIST += test-dup.c signature.h macros.h + +## end gnulib module dup-tests + ## begin gnulib module dup2-tests TESTS += test-dup2 @@ -304,10 +389,20 @@ EXTRA_DIST += test-errno.c ## end gnulib module errno-tests +## begin gnulib module faccessat-tests + +TESTS += test-faccessat +check_PROGRAMS += test-faccessat +test_faccessat_LDADD = $(LDADD) $(LIB_EACCESS) @LIBINTL@ +EXTRA_DIST += test-faccessat.c signature.h macros.h + +## end gnulib module faccessat-tests + ## begin gnulib module fchdir-tests TESTS += test-fchdir check_PROGRAMS += test-fchdir +test_fchdir_LDADD = $(LDADD) $(LIBINTL) EXTRA_DIST += test-fchdir.c signature.h macros.h ## end gnulib module fchdir-tests @@ -342,6 +437,23 @@ libtests_a_SOURCES += fd-safer-flag.c dup-safer-flag.c ## end gnulib module fd-safer-flag +## begin gnulib module fdopen + + +EXTRA_DIST += fdopen.c + +EXTRA_libtests_a_SOURCES += fdopen.c + +## end gnulib module fdopen + +## begin gnulib module fdopen-tests + +TESTS += test-fdopen +check_PROGRAMS += test-fdopen +EXTRA_DIST += test-fdopen.c signature.h macros.h + +## end gnulib module fdopen-tests + ## begin gnulib module fdopendir-tests TESTS += test-fdopendir @@ -360,6 +472,22 @@ EXTRA_DIST += test-fflush.c test-fflush2.sh test-fflush2.c signature.h macros.h ## end gnulib module fflush-tests +## begin gnulib module fgetc-tests + +TESTS += test-fgetc +check_PROGRAMS += test-fgetc +EXTRA_DIST += test-fgetc.c signature.h macros.h + +## end gnulib module fgetc-tests + +## begin gnulib module float-tests + +TESTS += test-float +check_PROGRAMS += test-float +EXTRA_DIST += test-float.c macros.h + +## end gnulib module float-tests + ## begin gnulib module fnmatch-tests TESTS += test-fnmatch @@ -394,6 +522,13 @@ EXTRA_DIST += test-fpending.c test-fpending.sh macros.h ## end gnulib module fpending-tests +## begin gnulib module fpucw + + +EXTRA_DIST += fpucw.h + +## end gnulib module fpucw + ## begin gnulib module fpurge-tests TESTS += test-fpurge @@ -403,6 +538,22 @@ EXTRA_DIST += test-fpurge.c macros.h ## end gnulib module fpurge-tests +## begin gnulib module fputc-tests + +TESTS += test-fputc +check_PROGRAMS += test-fputc +EXTRA_DIST += test-fputc.c signature.h macros.h + +## end gnulib module fputc-tests + +## begin gnulib module fread-tests + +TESTS += test-fread +check_PROGRAMS += test-fread +EXTRA_DIST += test-fread.c signature.h macros.h + +## end gnulib module fread-tests + ## begin gnulib module freadahead-tests TESTS += test-freadahead.sh @@ -420,22 +571,38 @@ EXTRA_DIST += test-freading.c macros.h ## end gnulib module freading-tests +## begin gnulib module fseek-tests + +TESTS += test-fseek.sh test-fseek2.sh +check_PROGRAMS += test-fseek +EXTRA_DIST += test-fseek.c test-fseek.sh test-fseek2.sh signature.h macros.h + +## end gnulib module fseek-tests + ## begin gnulib module fseeko-tests -TESTS += test-fseeko.sh test-fseeko2.sh -check_PROGRAMS += test-fseeko -EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh signature.h macros.h +TESTS += test-fseeko.sh test-fseeko2.sh test-fseeko3.sh test-fseeko4.sh +check_PROGRAMS += test-fseeko test-fseeko3 test-fseeko4 +EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh test-fseeko3.c test-fseeko3.sh test-fseeko4.c test-fseeko4.sh signature.h macros.h ## end gnulib module fseeko-tests -## begin gnulib module ftell +## begin gnulib module fstat-tests + +TESTS += test-fstat +check_PROGRAMS += test-fstat +EXTRA_DIST += test-fstat.c signature.h macros.h +## end gnulib module fstat-tests -EXTRA_DIST += ftell.c +## begin gnulib module fstatat-tests -EXTRA_libtests_a_SOURCES += ftell.c +TESTS += test-fstatat +check_PROGRAMS += test-fstatat +test_fstatat_LDADD = $(LDADD) @LIBINTL@ +EXTRA_DIST += test-fstatat.c test-lstat.h test-stat.h signature.h macros.h -## end gnulib module ftell +## end gnulib module fstatat-tests ## begin gnulib module ftell-tests @@ -448,18 +615,53 @@ EXTRA_DIST += test-ftell.c test-ftell.sh test-ftell2.sh test-ftell3.c signature. ## begin gnulib module ftello-tests -TESTS += test-ftello.sh test-ftello2.sh test-ftello3 -check_PROGRAMS += test-ftello test-ftello3 +TESTS += test-ftello.sh test-ftello2.sh test-ftello3 test-ftello4.sh +check_PROGRAMS += test-ftello test-ftello3 test-ftello4 MOSTLYCLEANFILES += t-ftello3.tmp -EXTRA_DIST += test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c signature.h macros.h +EXTRA_DIST += test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c test-ftello4.c test-ftello4.sh signature.h macros.h ## end gnulib module ftello-tests +## begin gnulib module ftruncate + + +EXTRA_DIST += ftruncate.c + +EXTRA_libtests_a_SOURCES += ftruncate.c + +## end gnulib module ftruncate + +## begin gnulib module ftruncate-tests + +TESTS += test-ftruncate.sh +check_PROGRAMS += test-ftruncate +EXTRA_DIST += test-ftruncate.c test-ftruncate.sh signature.h macros.h + +## end gnulib module ftruncate-tests + +## begin gnulib module fwrite-tests + +TESTS += test-fwrite +check_PROGRAMS += test-fwrite +EXTRA_DIST += test-fwrite.c signature.h macros.h + +## end gnulib module fwrite-tests + +## begin gnulib module getcwd-lgpl-tests + +TESTS += test-getcwd-lgpl +check_PROGRAMS += test-getcwd-lgpl +test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL) +EXTRA_DIST += test-getcwd-lgpl.c signature.h macros.h + +## end gnulib module getcwd-lgpl-tests + ## begin gnulib module getcwd-tests -TESTS += test-getcwd +TESTS += test-getcwd.sh check_PROGRAMS += test-getcwd -EXTRA_DIST += test-getcwd.c signature.h macros.h +test_getcwd_LDADD = $(LDADD) @LIBINTL@ +EXTRA_DIST += test-getcwd.c test-getcwd.sh ## end gnulib module getcwd-tests @@ -488,6 +690,15 @@ EXTRA_DIST += test-getgroups.c signature.h macros.h ## end gnulib module getgroups-tests +## begin gnulib module gethostname-tests + +TESTS += test-gethostname +check_PROGRAMS += test-gethostname +test_gethostname_LDADD = $(LDADD) @GETHOSTNAME_LIB@ +EXTRA_DIST += signature.h test-gethostname.c + +## end gnulib module gethostname-tests + ## begin gnulib module getline-tests TESTS += test-getline @@ -524,20 +735,10 @@ EXTRA_DIST += signature.h test-gettimeofday.c ## end gnulib module gettimeofday-tests -## begin gnulib module getugroups - - -EXTRA_DIST += getugroups.c getugroups.h - -EXTRA_libtests_a_SOURCES += getugroups.c - -## end gnulib module getugroups - ## begin gnulib module hash-tests TESTS += test-hash check_PROGRAMS += test-hash -test_hash_LDADD = $(LDADD) @LIBINTL@ EXTRA_DIST += test-hash.c macros.h ## end gnulib module hash-tests @@ -552,7 +753,8 @@ EXTRA_DIST += test-i-ring.c macros.h ## begin gnulib module ignore-value -libtests_a_SOURCES += ignore-value.h + +EXTRA_DIST += ignore-value.h ## end gnulib module ignore-value @@ -564,6 +766,32 @@ EXTRA_DIST += test-ignore-value.c ## end gnulib module ignore-value-tests +## begin gnulib module inet_pton + + +EXTRA_DIST += inet_pton.c + +EXTRA_libtests_a_SOURCES += inet_pton.c + +## end gnulib module inet_pton + +## begin gnulib module inet_pton-tests + +TESTS += test-inet_pton +check_PROGRAMS += test-inet_pton +test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@ +EXTRA_DIST += test-inet_pton.c signature.h macros.h + +## end gnulib module inet_pton-tests + +## begin gnulib module intprops-tests + +TESTS += test-intprops +check_PROGRAMS += test-intprops +EXTRA_DIST += test-intprops.c macros.h + +## end gnulib module intprops-tests + ## begin gnulib module inttostr libtests_a_SOURCES += \ @@ -595,6 +823,23 @@ EXTRA_DIST += test-inttypes.c ## end gnulib module inttypes-tests +## begin gnulib module ioctl + + +EXTRA_DIST += ioctl.c w32sock.h + +EXTRA_libtests_a_SOURCES += ioctl.c + +## end gnulib module ioctl + +## begin gnulib module ioctl-tests + +TESTS += test-ioctl +check_PROGRAMS += test-ioctl +EXTRA_DIST += test-ioctl.c signature.h macros.h + +## end gnulib module ioctl-tests + ## begin gnulib module isblank-tests TESTS += test-isblank @@ -603,6 +848,51 @@ EXTRA_DIST += test-isblank.c signature.h macros.h ## end gnulib module isblank-tests +## begin gnulib module isfinite-tests + +TESTS += test-isfinite +check_PROGRAMS += test-isfinite +test_isfinite_LDADD = $(LDADD) @ISFINITE_LIBM@ +EXTRA_DIST += test-isfinite.c infinity.h macros.h + +## end gnulib module isfinite-tests + +## begin gnulib module isinf-tests + +TESTS += test-isinf +check_PROGRAMS += test-isinf +test_isinf_LDADD = $(LDADD) @ISINF_LIBM@ +EXTRA_DIST += test-isinf.c infinity.h macros.h + +## end gnulib module isinf-tests + +## begin gnulib module isnand-nolibm-tests + +TESTS += test-isnand-nolibm +check_PROGRAMS += test-isnand-nolibm + +EXTRA_DIST += test-isnand-nolibm.c test-isnand.h minus-zero.h infinity.h nan.h macros.h + +## end gnulib module isnand-nolibm-tests + +## begin gnulib module isnanf-nolibm-tests + +TESTS += test-isnanf-nolibm +check_PROGRAMS += test-isnanf-nolibm + +EXTRA_DIST += test-isnanf-nolibm.c test-isnanf.h minus-zero.h infinity.h nan.h macros.h + +## end gnulib module isnanf-nolibm-tests + +## begin gnulib module isnanl-nolibm-tests + +TESTS += test-isnanl-nolibm +check_PROGRAMS += test-isnanl-nolibm + +EXTRA_DIST += test-isnanl-nolibm.c test-isnanl.h minus-zero.h infinity.h nan.h macros.h + +## end gnulib module isnanl-nolibm-tests + ## begin gnulib module iswblank-tests TESTS += test-iswblank @@ -619,14 +909,23 @@ EXTRA_DIST += test-langinfo.c ## end gnulib module langinfo-tests -## begin gnulib module lchown-tests +## begin gnulib module listen + + +EXTRA_DIST += listen.c w32sock.h + +EXTRA_libtests_a_SOURCES += listen.c + +## end gnulib module listen -TESTS += test-lchown -check_PROGRAMS += test-lchown -test_lchown_LDADD = $(LDADD) @LIBINTL@ -EXTRA_DIST += nap.h test-lchown.h test-lchown.c signature.h macros.h +## begin gnulib module listen-tests -## end gnulib module lchown-tests +TESTS += test-listen +check_PROGRAMS += test-listen +test_listen_LDADD = $(LDADD) @LIBSOCKET@ +EXTRA_DIST += test-listen.c signature.h macros.h + +## end gnulib module listen-tests ## begin gnulib module locale-tests @@ -636,6 +935,14 @@ EXTRA_DIST += test-locale.c ## end gnulib module locale-tests +## begin gnulib module localeconv-tests + +TESTS += test-localeconv +check_PROGRAMS += test-localeconv +EXTRA_DIST += test-localeconv.c signature.h macros.h + +## end gnulib module localeconv-tests + ## begin gnulib module localename libtests_a_SOURCES += localename.c @@ -648,18 +955,12 @@ EXTRA_DIST += localename.h TESTS += test-localename check_PROGRAMS += test-localename -test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ +test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD) EXTRA_DIST += test-localename.c macros.h ## end gnulib module localename-tests -## begin gnulib module lock - -libtests_a_SOURCES += glthread/lock.h glthread/lock.c - -## end gnulib module lock - ## begin gnulib module lock-tests TESTS += test-lock @@ -706,7 +1007,7 @@ EXTRA_DIST += test-malloca.c TESTS += test-math check_PROGRAMS += test-math -EXTRA_DIST += test-math.c +EXTRA_DIST += test-math.c macros.h ## end gnulib module math-tests @@ -787,31 +1088,72 @@ EXTRA_DIST += test-memrchr.c zerosize-ptr.h signature.h macros.h ## end gnulib module memrchr-tests -## begin gnulib module mgetgroups +## begin gnulib module modf-tests +TESTS += test-modf +check_PROGRAMS += test-modf +test_modf_SOURCES = test-modf.c randomd.c +test_modf_LDADD = $(LDADD) @MODF_LIBM@ +EXTRA_DIST += test-modf.c test-modf.h signature.h macros.h randomd.c -EXTRA_DIST += mgetgroups.c mgetgroups.h +## end gnulib module modf-tests -EXTRA_libtests_a_SOURCES += mgetgroups.c +## begin gnulib module nanosleep -## end gnulib module mgetgroups -## begin gnulib module mkdir-tests +EXTRA_DIST += nanosleep.c -TESTS += test-mkdir -check_PROGRAMS += test-mkdir -EXTRA_DIST += test-mkdir.h test-mkdir.c signature.h macros.h +EXTRA_libtests_a_SOURCES += nanosleep.c -## end gnulib module mkdir-tests +## end gnulib module nanosleep -## begin gnulib module modf-tests +## begin gnulib module nanosleep-tests -TESTS += test-modf -check_PROGRAMS += test-modf -test_modf_LDADD = $(LDADD) @MODF_LIBM@ -EXTRA_DIST += test-modf.c signature.h macros.h +TESTS += test-nanosleep +check_PROGRAMS += test-nanosleep +test_nanosleep_LDADD = $(LDADD) $(LIB_NANOSLEEP) +EXTRA_DIST += test-nanosleep.c signature.h macros.h -## end gnulib module modf-tests +## end gnulib module nanosleep-tests + +## begin gnulib module netinet_in + +BUILT_SOURCES += $(NETINET_IN_H) + +# We need the following in order to create when the system +# doesn't have one. +if GL_GENERATE_NETINET_IN_H +netinet/in.h: netinet_in.in.h $(top_builddir)/config.status + $(AM_V_at)$(MKDIR_P) netinet + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ + -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ + < $(srcdir)/netinet_in.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +netinet/in.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t +MOSTLYCLEANDIRS += netinet + +EXTRA_DIST += netinet_in.in.h + +## end gnulib module netinet_in + +## begin gnulib module netinet_in-tests + +TESTS += test-netinet_in +check_PROGRAMS += test-netinet_in +EXTRA_DIST += test-netinet_in.c + +## end gnulib module netinet_in-tests ## begin gnulib module nl_langinfo-tests @@ -841,15 +1183,10 @@ EXTRA_DIST += test-openat-safer.c macros.h ## begin gnulib module openat-tests -TESTS += test-fchownat test-fstatat test-mkdirat test-openat test-unlinkat -check_PROGRAMS += test-fchownat test-fstatat test-mkdirat test-openat \ - test-unlinkat -test_fchownat_LDADD = $(LDADD) @LIBINTL@ -test_fstatat_LDADD = $(LDADD) @LIBINTL@ -test_mkdirat_LDADD = $(LDADD) @LIBINTL@ +TESTS += test-openat +check_PROGRAMS += test-openat test_openat_LDADD = $(LDADD) @LIBINTL@ -test_unlinkat_LDADD = $(LDADD) @LIBINTL@ -EXTRA_DIST += nap.h test-chown.h test-lchown.h test-lstat.h test-mkdir.h test-rmdir.h test-stat.h test-unlink.h test-fchownat.c test-fstatat.c test-mkdirat.c test-openat.c test-unlinkat.c signature.h macros.h +EXTRA_DIST += test-openat.c test-open.h signature.h macros.h ## end gnulib module openat-tests @@ -862,14 +1199,39 @@ EXTRA_DIST += test-parse-datetime.c macros.h ## end gnulib module parse-datetime-tests +## begin gnulib module pathmax-tests + +TESTS += test-pathmax +check_PROGRAMS += test-pathmax +EXTRA_DIST += test-pathmax.c + +## end gnulib module pathmax-tests + ## begin gnulib module perror-tests -TESTS += test-perror.sh -check_PROGRAMS += test-perror -EXTRA_DIST += signature.h test-perror.c test-perror.sh +TESTS += test-perror.sh test-perror2 +check_PROGRAMS += test-perror test-perror2 +EXTRA_DIST += macros.h signature.h test-perror.c test-perror2.c test-perror.sh ## end gnulib module perror-tests +## begin gnulib module pipe-posix + + +EXTRA_DIST += pipe.c + +EXTRA_libtests_a_SOURCES += pipe.c + +## end gnulib module pipe-posix + +## begin gnulib module pipe-posix-tests + +TESTS += test-pipe +check_PROGRAMS += test-pipe +EXTRA_DIST += test-pipe.c signature.h macros.h + +## end gnulib module pipe-posix-tests + ## begin gnulib module priv-set libtests_a_SOURCES += priv-set.c @@ -900,10 +1262,35 @@ EXTRA_libtests_a_SOURCES += putenv.c TESTS += test-quotearg-simple check_PROGRAMS += test-quotearg-simple test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ -EXTRA_DIST += test-quotearg-simple.c test-quotearg.h macros.h +EXTRA_DIST += test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h ## end gnulib module quotearg-simple-tests +## begin gnulib module raise + + +EXTRA_DIST += raise.c + +EXTRA_libtests_a_SOURCES += raise.c + +## end gnulib module raise + +## begin gnulib module raise-tests + +TESTS += test-raise +check_PROGRAMS += test-raise +EXTRA_DIST += test-raise.c signature.h macros.h + +## end gnulib module raise-tests + +## begin gnulib module read-tests + +TESTS += test-read +check_PROGRAMS += test-read +EXTRA_DIST += test-read.c signature.h macros.h + +## end gnulib module read-tests + ## begin gnulib module readlink-tests TESTS += test-readlink @@ -929,6 +1316,15 @@ EXTRA_DIST += test-realloc-gnu.c ## end gnulib module realloc-gnu-tests +## begin gnulib module regex-tests + +TESTS += test-regex +check_PROGRAMS += test-regex +test_regex_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) $(LIB_PTHREAD) +EXTRA_DIST += test-regex.c macros.h + +## end gnulib module regex-tests + ## begin gnulib module rmdir-tests TESTS += test-rmdir @@ -937,6 +1333,27 @@ EXTRA_DIST += test-rmdir.h test-rmdir.c signature.h macros.h ## end gnulib module rmdir-tests +## begin gnulib module select + + +EXTRA_DIST += select.c + +EXTRA_libtests_a_SOURCES += select.c + +## end gnulib module select + +## begin gnulib module select-tests + +TESTS += test-select test-select-in.sh test-select-out.sh +# test-select-stdin has to be run by hand. +check_PROGRAMS += test-select test-select-fd test-select-stdin +test_select_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ $(INET_PTON_LIB) +test_select_fd_LDADD = $(LDADD) @LIB_SELECT@ +test_select_stdin_LDADD = $(LDADD) @LIB_SELECT@ +EXTRA_DIST += macros.h signature.h test-select.c test-select.h test-select-fd.c test-select-in.sh test-select-out.sh test-select-stdin.c + +## end gnulib module select-tests + ## begin gnulib module setenv-tests TESTS += test-setenv @@ -967,6 +1384,109 @@ EXTRA_DIST += test-setlocale1.sh test-setlocale1.c test-setlocale2.sh test-setlo ## end gnulib module setlocale-tests +## begin gnulib module setsockopt + + +EXTRA_DIST += setsockopt.c w32sock.h + +EXTRA_libtests_a_SOURCES += setsockopt.c + +## end gnulib module setsockopt + +## begin gnulib module setsockopt-tests + +TESTS += test-setsockopt +check_PROGRAMS += test-setsockopt +test_setsockopt_LDADD = $(LDADD) @LIBSOCKET@ +EXTRA_DIST += test-setsockopt.c signature.h macros.h + +## end gnulib module setsockopt-tests + +## begin gnulib module sigaction + +libtests_a_SOURCES += sig-handler.c + +EXTRA_DIST += sig-handler.h sigaction.c + +EXTRA_libtests_a_SOURCES += sigaction.c + +## end gnulib module sigaction + +## begin gnulib module sigaction-tests + +TESTS += test-sigaction +check_PROGRAMS += test-sigaction +EXTRA_DIST += test-sigaction.c signature.h macros.h + +## end gnulib module sigaction-tests + +## begin gnulib module signal-h + +BUILT_SOURCES += signal.h + +# We need the following in order to create when the system +# doesn't have a complete one. +signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ + -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \ + -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \ + -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \ + -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ + -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ + -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ + -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \ + -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \ + -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ + -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ + -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ + -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ + -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ + -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \ + -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \ + -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/signal.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += signal.h signal.h-t + +EXTRA_DIST += signal.in.h + +## end gnulib module signal-h + +## begin gnulib module signal-h-tests + +TESTS += test-signal-h +check_PROGRAMS += test-signal-h +EXTRA_DIST += test-signal-h.c + +## end gnulib module signal-h-tests + +## begin gnulib module sigprocmask + + +EXTRA_DIST += sigprocmask.c + +EXTRA_libtests_a_SOURCES += sigprocmask.c + +## end gnulib module sigprocmask + +## begin gnulib module sigprocmask-tests + +TESTS += test-sigprocmask +check_PROGRAMS += test-sigprocmask +EXTRA_DIST += test-sigprocmask.c signature.h macros.h + +## end gnulib module sigprocmask-tests + ## begin gnulib module sleep @@ -984,6 +1504,112 @@ EXTRA_DIST += test-sleep.c signature.h macros.h ## end gnulib module sleep-tests +## begin gnulib module snippet/_Noreturn + +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all Makefile.am that +# need it. This is ensured by the applicability 'all' defined above. + +_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h + +EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h + +## end gnulib module snippet/_Noreturn + +## begin gnulib module snippet/arg-nonnull + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +BUILT_SOURCES += arg-nonnull.h +# The arg-nonnull.h that gets inserted into generated .h files is the same as +# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut +# off. +arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t + +ARG_NONNULL_H=arg-nonnull.h + +EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h + +## end gnulib module snippet/arg-nonnull + +## begin gnulib module snippet/c++defs + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +BUILT_SOURCES += c++defs.h +# The c++defs.h that gets inserted into generated .h files is the same as +# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. +c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/build-aux/snippet/c++defs.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += c++defs.h c++defs.h-t + +CXXDEFS_H=c++defs.h + +EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h + +## end gnulib module snippet/c++defs + +## begin gnulib module snippet/unused-parameter + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +BUILT_SOURCES += unused-parameter.h +# The unused-parameter.h that gets inserted into generated .h files is the same +# as build-aux/snippet/unused-parameter.h, except that it has the copyright +# header cut off. +unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ + < $(top_srcdir)/build-aux/snippet/unused-parameter.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t + +UNUSED_PARAMETER_H=unused-parameter.h + +EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h + +## end gnulib module snippet/unused-parameter + +## begin gnulib module snippet/warn-on-use + +BUILT_SOURCES += warn-on-use.h +# The warn-on-use.h that gets inserted into generated .h files is the same as +# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut +# off. +warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t + +WARN_ON_USE_H=warn-on-use.h + +EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h + +## end gnulib module snippet/warn-on-use + ## begin gnulib module snprintf-tests TESTS += test-snprintf @@ -993,10 +1619,29 @@ EXTRA_DIST += test-snprintf.c signature.h macros.h ## end gnulib module snprintf-tests +## begin gnulib module socket + + +EXTRA_DIST += socket.c w32sock.h + +EXTRA_libtests_a_SOURCES += socket.c + +## end gnulib module socket + +## begin gnulib module sockets-tests + +TESTS += test-sockets +check_PROGRAMS += test-sockets +test_sockets_LDADD = $(LDADD) @LIBSOCKET@ +EXTRA_DIST += test-sockets.c + +## end gnulib module sockets-tests + ## begin gnulib module stat-tests TESTS += test-stat check_PROGRAMS += test-stat +test_stat_LDADD = $(LDADD) $(LIBINTL) EXTRA_DIST += test-stat.h test-stat.c signature.h macros.h ## end gnulib module stat-tests @@ -1005,10 +1650,28 @@ EXTRA_DIST += test-stat.h test-stat.c signature.h macros.h TESTS += test-stat-time check_PROGRAMS += test-stat-time -EXTRA_DIST += test-stat-time.c macros.h +test_stat_time_LDADD = $(LDADD) $(LIB_NANOSLEEP) +EXTRA_DIST += test-stat-time.c macros.h nap.h ## end gnulib module stat-time-tests +## begin gnulib module statat-tests + +TESTS += test-statat +check_PROGRAMS += test-statat +test_statat_LDADD = $(LDADD) @LIBINTL@ +EXTRA_DIST += test-statat.c + +## end gnulib module statat-tests + +## begin gnulib module stdalign-tests + +TESTS += test-stdalign +check_PROGRAMS += test-stdalign +EXTRA_DIST += test-stdalign.c macros.h + +## end gnulib module stdalign-tests + ## begin gnulib module stdbool-tests TESTS += test-stdbool @@ -1066,6 +1729,14 @@ EXTRA_DIST += test-strerror.c signature.h macros.h ## end gnulib module strerror-tests +## begin gnulib module strerror_r-posix-tests + +TESTS += test-strerror_r +check_PROGRAMS += test-strerror_r +EXTRA_DIST += test-strerror_r.c signature.h macros.h + +## end gnulib module strerror_r-posix-tests + ## begin gnulib module strftime-tests TESTS += test-strftime @@ -1106,6 +1777,38 @@ EXTRA_DIST += test-strstr.c zerosize-ptr.h signature.h macros.h ## end gnulib module strstr-tests +## begin gnulib module strtol-tests + +TESTS += test-strtol +check_PROGRAMS += test-strtol +EXTRA_DIST += test-strtol.c signature.h macros.h + +## end gnulib module strtol-tests + +## begin gnulib module strtoul-tests + +TESTS += test-strtoul +check_PROGRAMS += test-strtoul +EXTRA_DIST += test-strtoul.c signature.h macros.h + +## end gnulib module strtoul-tests + +## begin gnulib module strtoull-tests + +TESTS += test-strtoull +check_PROGRAMS += test-strtoull +EXTRA_DIST += test-strtoull.c signature.h macros.h + +## end gnulib module strtoull-tests + +## begin gnulib module strtoumax-tests + +TESTS += test-strtoumax +check_PROGRAMS += test-strtoumax +EXTRA_DIST += test-strtoumax.c signature.h macros.h + +## end gnulib module strtoumax-tests + ## begin gnulib module symlink @@ -1126,9 +1829,9 @@ EXTRA_DIST += test-symlink.h test-symlink.c signature.h macros.h ## begin gnulib module symlinkat -EXTRA_DIST += symlinkat.c +EXTRA_DIST += at-func.c symlinkat.c -EXTRA_libtests_a_SOURCES += symlinkat.c +EXTRA_libtests_a_SOURCES += at-func.c symlinkat.c ## end gnulib module symlinkat @@ -1141,6 +1844,96 @@ EXTRA_DIST += test-symlink.h test-symlinkat.c signature.h macros.h ## end gnulib module symlinkat-tests +## begin gnulib module sys_ioctl + +BUILT_SOURCES += sys/ioctl.h + +# We need the following in order to create when the system +# does not have a complete one. +sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \ + -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \ + -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \ + -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ + -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_ioctl.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/ioctl.h sys/ioctl.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_ioctl.in.h + +## end gnulib module sys_ioctl + +## begin gnulib module sys_ioctl-tests + +TESTS += test-sys_ioctl +check_PROGRAMS += test-sys_ioctl +EXTRA_DIST += test-sys_ioctl.c + +## end gnulib module sys_ioctl-tests + +## begin gnulib module sys_select + +BUILT_SOURCES += sys/select.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ + -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ + -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \ + -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \ + -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \ + -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_select.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/select.h sys/select.h-t +MOSTLYCLEANDIRS += sys + +EXTRA_DIST += sys_select.in.h + +## end gnulib module sys_select + +## begin gnulib module sys_select-tests + +TESTS += test-sys_select +check_PROGRAMS += test-sys_select +EXTRA_DIST += test-sys_select.c signature.h + +## end gnulib module sys_select-tests + +## begin gnulib module sys_socket-tests + +TESTS += test-sys_socket +check_PROGRAMS += test-sys_socket +EXTRA_DIST += test-sys_socket.c + +## end gnulib module sys_socket-tests + ## begin gnulib module sys_stat-tests TESTS += test-sys_stat @@ -1157,6 +1950,30 @@ EXTRA_DIST += test-sys_time.c ## end gnulib module sys_time-tests +## begin gnulib module sys_types-tests + +TESTS += test-sys_types +check_PROGRAMS += test-sys_types +EXTRA_DIST += test-sys_types.c + +## end gnulib module sys_types-tests + +## begin gnulib module sys_uio-tests + +TESTS += test-sys_uio +check_PROGRAMS += test-sys_uio +EXTRA_DIST += test-sys_uio.c + +## end gnulib module sys_uio-tests + +## begin gnulib module sys_utsname-tests + +TESTS += test-sys_utsname +check_PROGRAMS += test-sys_utsname +EXTRA_DIST += test-sys_utsname.c + +## end gnulib module sys_utsname-tests + ## begin gnulib module sys_wait-tests TESTS += test-sys_wait @@ -1165,19 +1982,29 @@ EXTRA_DIST += test-sys_wait.c test-sys_wait.h ## end gnulib module sys_wait-tests +## begin gnulib module test-framework-sh-tests + +TESTS += test-init.sh +EXTRA_DIST += init.sh +EXTRA_DIST += test-init.sh + +## end gnulib module test-framework-sh-tests + ## begin gnulib module thread libtests_a_SOURCES += glthread/thread.h glthread/thread.c ## end gnulib module thread -## begin gnulib module threadlib - -libtests_a_SOURCES += glthread/threadlib.c +## begin gnulib module thread-tests -EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath +TESTS += test-thread_self test-thread_create +check_PROGRAMS += test-thread_self test-thread_create +test_thread_self_LDADD = $(LDADD) @LIBTHREAD@ +test_thread_create_LDADD = $(LDADD) @LIBMULTITHREAD@ +EXTRA_DIST += test-thread_self.c test-thread_create.c macros.h -## end gnulib module threadlib +## end gnulib module thread-tests ## begin gnulib module time-tests @@ -1187,6 +2014,25 @@ EXTRA_DIST += test-time.c ## end gnulib module time-tests +## begin gnulib module trunc-tests + +TESTS += test-trunc1 test-trunc2 +check_PROGRAMS += test-trunc1 test-trunc2 +test_trunc1_LDADD = $(LDADD) @TRUNC_LIBM@ +test_trunc2_LDADD = $(LDADD) @TRUNC_LIBM@ +EXTRA_DIST += test-trunc1.c test-trunc2.c minus-zero.h infinity.h nan.h signature.h macros.h + +## end gnulib module trunc-tests + +## begin gnulib module uname-tests + +TESTS += test-uname +check_PROGRAMS += test-uname +test_uname_LDADD = $(LDADD) @GETHOSTNAME_LIB@ +EXTRA_DIST += test-uname.c signature.h macros.h + +## end gnulib module uname-tests + ## begin gnulib module unistd-safer-tests TESTS += test-dup-safer @@ -1223,12 +2069,20 @@ EXTRA_DIST += test-unlink.h test-unlink.c signature.h macros.h ## end gnulib module unlink-tests -## begin gnulib module unlinkdir +## begin gnulib module unlinkat-tests +TESTS += test-unlinkat +check_PROGRAMS += test-unlinkat +test_unlinkat_LDADD = $(LDADD) @LIBINTL@ +EXTRA_DIST += test-unlinkat.c test-rmdir.h test-unlink.h signature.h macros.h -EXTRA_DIST += unlinkdir.c unlinkdir.h +## end gnulib module unlinkat-tests -EXTRA_libtests_a_SOURCES += unlinkdir.c +## begin gnulib module unlinkdir + +libtests_a_SOURCES += unlinkdir.c + +EXTRA_DIST += unlinkdir.h ## end gnulib module unlinkdir @@ -1240,31 +2094,6 @@ EXTRA_DIST += test-unsetenv.c signature.h macros.h ## end gnulib module unsetenv-tests -## begin gnulib module unused-parameter - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -BUILT_SOURCES += unused-parameter.h -# The unused-parameter.h that gets inserted into generated .h files is the same -# as build-aux/unused-parameter.h, except that it has the copyright header cut -# off. -unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ - < $(top_srcdir)/build-aux/unused-parameter.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t - -UNUSED_PARAMETER_H=unused-parameter.h - -EXTRA_DIST += $(top_srcdir)/build-aux/unused-parameter.h - -## end gnulib module unused-parameter - ## begin gnulib module update-copyright-tests TESTS += test-update-copyright.sh @@ -1273,23 +2102,6 @@ EXTRA_DIST += test-update-copyright.sh ## end gnulib module update-copyright-tests -## begin gnulib module usleep - - -EXTRA_DIST += usleep.c - -EXTRA_libtests_a_SOURCES += usleep.c - -## end gnulib module usleep - -## begin gnulib module usleep-tests - -TESTS += test-usleep -check_PROGRAMS += test-usleep -EXTRA_DIST += test-usleep.c signature.h macros.h - -## end gnulib module usleep-tests - ## begin gnulib module vasnprintf-tests TESTS += test-vasnprintf @@ -1304,7 +2116,7 @@ EXTRA_DIST += test-vasnprintf.c macros.h TESTS += test-vc-list-files-git.sh TESTS += test-vc-list-files-cvs.sh TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)' -EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh init.sh +EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh ## end gnulib module vc-list-files-tests @@ -1313,7 +2125,7 @@ EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh init.sh TESTS_ENVIRONMENT += MAKE='$(MAKE)' TESTS += test-verify test-verify.sh check_PROGRAMS += test-verify -EXTRA_DIST += test-verify.c test-verify.sh init.sh +EXTRA_DIST += test-verify.c test-verify.sh ## end gnulib module verify-tests @@ -1326,25 +2138,6 @@ EXTRA_DIST += test-version-etc.c test-version-etc.sh ## end gnulib module version-etc-tests -## begin gnulib module warn-on-use - -BUILT_SOURCES += warn-on-use.h -# The warn-on-use.h that gets inserted into generated .h files is the same as -# build-aux/warn-on-use.h, except that it has the copyright header cut off. -warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h - $(AM_V_GEN)rm -f $@-t $@ && \ - sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/warn-on-use.h \ - > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t - -WARN_ON_USE_H=warn-on-use.h - -EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h - -## end gnulib module warn-on-use - ## begin gnulib module wchar-tests TESTS += test-wchar @@ -1410,7 +2203,7 @@ EXTRA_DIST += test-wcwidth.c signature.h macros.h TESTS += test-xalloc-die.sh check_PROGRAMS += test-xalloc-die test_xalloc_die_LDADD = $(LDADD) @LIBINTL@ -EXTRA_DIST += test-xalloc-die.c test-xalloc-die.sh init.sh +EXTRA_DIST += test-xalloc-die.c test-xalloc-die.sh ## end gnulib module xalloc-die-tests @@ -1420,7 +2213,7 @@ TESTS += test-xstrtol.sh check_PROGRAMS += test-xstrtol test-xstrtoul test_xstrtol_LDADD = $(LDADD) @LIBINTL@ test_xstrtoul_LDADD = $(LDADD) @LIBINTL@ -EXTRA_DIST += init.sh test-xstrtol.c test-xstrtoul.c test-xstrtol.sh +EXTRA_DIST += test-xstrtol.c test-xstrtoul.c test-xstrtol.sh ## end gnulib module xstrtol-tests @@ -1429,7 +2222,7 @@ EXTRA_DIST += init.sh test-xstrtol.c test-xstrtoul.c test-xstrtol.sh TESTS += test-xstrtoumax.sh check_PROGRAMS += test-xstrtoumax test_xstrtoumax_LDADD = $(LDADD) @LIBINTL@ -EXTRA_DIST += init.sh test-xstrtoumax.c test-xstrtoumax.sh +EXTRA_DIST += test-xstrtoumax.c test-xstrtoumax.sh ## end gnulib module xstrtoumax-tests diff --git a/tests/Makefile.in b/tests/Makefile.in index fc71438..42922e4 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -15,12 +15,24 @@ @SET_MAKE@ -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # -# This file is free software, distributed under the terms of the GNU -# General Public License. As a special exception to the GNU General -# Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Autoconf, under +# 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this file. If not, see . +# +# As a special exception to the GNU General Public License, +# this file may be distributed as part of a program that +# contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. @@ -28,6 +40,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -45,33 +74,46 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -TESTS = test-alloca-opt$(EXEEXT) test-areadlink$(EXEEXT) \ - test-areadlink-with-size$(EXEEXT) test-areadlinkat$(EXEEXT) \ - test-argmatch$(EXEEXT) test-binary-io.sh \ +TESTS = test-accept$(EXEEXT) test-alloca-opt$(EXEEXT) \ + test-areadlink$(EXEEXT) test-areadlink-with-size$(EXEEXT) \ + test-areadlinkat$(EXEEXT) test-argmatch$(EXEEXT) \ + test-arpa_inet$(EXEEXT) test-binary-io.sh test-bind$(EXEEXT) \ test-bitrotate$(EXEEXT) test-btowc1.sh test-btowc2.sh \ - test-c-ctype$(EXEEXT) test-c-strcase.sh \ + test-byteswap$(EXEEXT) test-c-ctype$(EXEEXT) test-c-strcase.sh \ test-c-strcasestr$(EXEEXT) test-c-strstr$(EXEEXT) \ - test-canonicalize$(EXEEXT) test-chown$(EXEEXT) \ - test-cloexec$(EXEEXT) test-closein.sh test-ctype$(EXEEXT) \ + test-canonicalize$(EXEEXT) test-chdir$(EXEEXT) \ + test-cloexec$(EXEEXT) test-close$(EXEEXT) test-closein.sh \ + test-connect$(EXEEXT) test-ctype$(EXEEXT) \ test-dirent-safer$(EXEEXT) test-dirent$(EXEEXT) \ - test-dirname$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \ - test-errno$(EXEEXT) test-fchdir$(EXEEXT) test-fcntl-h$(EXEEXT) \ - test-fcntl-safer$(EXEEXT) test-fcntl$(EXEEXT) \ + test-dirname$(EXEEXT) test-dup$(EXEEXT) test-dup2$(EXEEXT) \ + test-environ$(EXEEXT) test-errno$(EXEEXT) \ + test-faccessat$(EXEEXT) test-fchdir$(EXEEXT) \ + test-fcntl-h$(EXEEXT) test-fcntl-safer$(EXEEXT) \ + test-fcntl$(EXEEXT) test-fdopen$(EXEEXT) \ test-fdopendir$(EXEEXT) test-fflush$(EXEEXT) test-fflush2.sh \ - test-fnmatch$(EXEEXT) test-fopen-safer$(EXEEXT) \ - test-fopen$(EXEEXT) test-fpending.sh test-fpurge$(EXEEXT) \ - test-freadahead.sh test-freading$(EXEEXT) test-fseeko.sh \ - test-fseeko2.sh test-ftell.sh test-ftell2.sh \ - test-ftell3$(EXEEXT) test-ftello.sh test-ftello2.sh \ - test-ftello3$(EXEEXT) test-getcwd$(EXEEXT) \ + test-fgetc$(EXEEXT) test-float$(EXEEXT) test-fnmatch$(EXEEXT) \ + test-fopen-safer$(EXEEXT) test-fopen$(EXEEXT) test-fpending.sh \ + test-fpurge$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \ + test-freadahead.sh test-freading$(EXEEXT) test-fseek.sh \ + test-fseek2.sh test-fseeko.sh test-fseeko2.sh test-fseeko3.sh \ + test-fseeko4.sh test-fstat$(EXEEXT) test-fstatat$(EXEEXT) \ + test-ftell.sh test-ftell2.sh test-ftell3$(EXEEXT) \ + test-ftello.sh test-ftello2.sh test-ftello3$(EXEEXT) \ + test-ftello4.sh test-ftruncate.sh test-fwrite$(EXEEXT) \ + test-getcwd-lgpl$(EXEEXT) test-getcwd.sh \ test-getdelim$(EXEEXT) test-getdtablesize$(EXEEXT) \ - test-getgroups$(EXEEXT) test-getline$(EXEEXT) \ - test-getopt$(EXEEXT) test-gettimeofday$(EXEEXT) \ - test-hash$(EXEEXT) test-i-ring$(EXEEXT) \ - test-ignore-value$(EXEEXT) test-inttostr$(EXEEXT) \ - test-inttypes$(EXEEXT) test-isblank$(EXEEXT) \ - test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \ - test-lchown$(EXEEXT) test-locale$(EXEEXT) \ + test-getgroups$(EXEEXT) test-gethostname$(EXEEXT) \ + test-getline$(EXEEXT) test-getopt$(EXEEXT) \ + test-gettimeofday$(EXEEXT) test-hash$(EXEEXT) \ + test-i-ring$(EXEEXT) test-ignore-value$(EXEEXT) \ + test-inet_pton$(EXEEXT) test-intprops$(EXEEXT) \ + test-inttostr$(EXEEXT) test-inttypes$(EXEEXT) \ + test-ioctl$(EXEEXT) test-isblank$(EXEEXT) \ + test-isfinite$(EXEEXT) test-isinf$(EXEEXT) \ + test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \ + test-isnanl-nolibm$(EXEEXT) test-iswblank$(EXEEXT) \ + test-langinfo$(EXEEXT) test-listen$(EXEEXT) \ + test-locale$(EXEEXT) test-localeconv$(EXEEXT) \ test-localename$(EXEEXT) test-lock$(EXEEXT) test-lseek.sh \ test-lstat$(EXEEXT) test-malloc-gnu$(EXEEXT) \ test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc1.sh \ @@ -83,30 +125,43 @@ TESTS = test-alloca-opt$(EXEEXT) test-areadlink$(EXEEXT) \ test-mbsinit.sh test-mbsrtowcs1.sh test-mbsrtowcs2.sh \ test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsstr1$(EXEEXT) \ test-mbsstr2.sh test-mbsstr3.sh test-memchr$(EXEEXT) \ - test-memrchr$(EXEEXT) test-mkdir$(EXEEXT) test-modf$(EXEEXT) \ + test-memrchr$(EXEEXT) test-modf$(EXEEXT) \ + test-nanosleep$(EXEEXT) test-netinet_in$(EXEEXT) \ test-nl_langinfo.sh test-open$(EXEEXT) \ - test-openat-safer$(EXEEXT) test-fchownat$(EXEEXT) \ - test-fstatat$(EXEEXT) test-mkdirat$(EXEEXT) \ - test-openat$(EXEEXT) test-unlinkat$(EXEEXT) \ - test-parse-datetime$(EXEEXT) test-perror.sh \ + test-openat-safer$(EXEEXT) test-openat$(EXEEXT) \ + test-parse-datetime$(EXEEXT) test-pathmax$(EXEEXT) \ + test-perror.sh test-perror2$(EXEEXT) test-pipe$(EXEEXT) \ test-priv-set$(EXEEXT) test-quotearg-simple$(EXEEXT) \ - test-readlink$(EXEEXT) test-readlinkat$(EXEEXT) \ - test-realloc-gnu$(EXEEXT) test-rmdir$(EXEEXT) \ - test-setenv$(EXEEXT) test-setlocale1.sh test-setlocale2.sh \ - test-sleep$(EXEEXT) test-snprintf$(EXEEXT) test-stat$(EXEEXT) \ - test-stat-time$(EXEEXT) test-stdbool$(EXEEXT) \ - test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \ - test-stdlib$(EXEEXT) test-strcasestr$(EXEEXT) \ - test-strerror$(EXEEXT) test-strftime$(EXEEXT) \ + test-raise$(EXEEXT) test-read$(EXEEXT) test-readlink$(EXEEXT) \ + test-readlinkat$(EXEEXT) test-realloc-gnu$(EXEEXT) \ + test-regex$(EXEEXT) test-rmdir$(EXEEXT) test-select$(EXEEXT) \ + test-select-in.sh test-select-out.sh test-setenv$(EXEEXT) \ + test-setlocale1.sh test-setlocale2.sh test-setsockopt$(EXEEXT) \ + test-sigaction$(EXEEXT) test-signal-h$(EXEEXT) \ + test-sigprocmask$(EXEEXT) test-sleep$(EXEEXT) \ + test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \ + test-stat$(EXEEXT) test-stat-time$(EXEEXT) \ + test-statat$(EXEEXT) test-stdalign$(EXEEXT) \ + test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ + test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ + test-strcasestr$(EXEEXT) test-strerror$(EXEEXT) \ + test-strerror_r$(EXEEXT) test-strftime$(EXEEXT) \ test-string$(EXEEXT) test-strings$(EXEEXT) \ test-strnlen$(EXEEXT) test-strstr$(EXEEXT) \ + test-strtol$(EXEEXT) test-strtoul$(EXEEXT) \ + test-strtoull$(EXEEXT) test-strtoumax$(EXEEXT) \ test-symlink$(EXEEXT) test-symlinkat$(EXEEXT) \ - test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \ - test-sys_wait$(EXEEXT) test-time$(EXEEXT) \ + test-sys_ioctl$(EXEEXT) test-sys_select$(EXEEXT) \ + test-sys_socket$(EXEEXT) test-sys_stat$(EXEEXT) \ + test-sys_time$(EXEEXT) test-sys_types$(EXEEXT) \ + test-sys_uio$(EXEEXT) test-sys_utsname$(EXEEXT) \ + test-sys_wait$(EXEEXT) test-init.sh test-thread_self$(EXEEXT) \ + test-thread_create$(EXEEXT) test-time$(EXEEXT) \ + test-trunc1$(EXEEXT) test-trunc2$(EXEEXT) test-uname$(EXEEXT) \ test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \ test-uc_width$(EXEEXT) uniwidth/test-uc_width2.sh \ - test-unlink$(EXEEXT) test-unsetenv$(EXEEXT) \ - test-update-copyright.sh test-usleep$(EXEEXT) \ + test-unlink$(EXEEXT) test-unlinkat$(EXEEXT) \ + test-unsetenv$(EXEEXT) test-update-copyright.sh \ test-vasnprintf$(EXEEXT) test-vc-list-files-git.sh \ test-vc-list-files-cvs.sh test-verify$(EXEEXT) test-verify.sh \ test-version-etc.sh test-wchar$(EXEEXT) test-wcrtomb.sh \ @@ -117,35 +172,49 @@ TESTS = test-alloca-opt$(EXEEXT) test-areadlink$(EXEEXT) \ test-xstrtoumax.sh test-yesno.sh XFAIL_TESTS = noinst_PROGRAMS = -check_PROGRAMS = test-alloca-opt$(EXEEXT) test-areadlink$(EXEEXT) \ - test-areadlink-with-size$(EXEEXT) test-areadlinkat$(EXEEXT) \ - test-argmatch$(EXEEXT) test-binary-io$(EXEEXT) \ - test-bitrotate$(EXEEXT) test-btowc$(EXEEXT) \ - test-c-ctype$(EXEEXT) test-c-strcasecmp$(EXEEXT) \ - test-c-strncasecmp$(EXEEXT) test-c-strcasestr$(EXEEXT) \ - test-c-strstr$(EXEEXT) test-canonicalize$(EXEEXT) \ - test-chown$(EXEEXT) test-cloexec$(EXEEXT) \ - test-closein$(EXEEXT) test-ctype$(EXEEXT) \ - test-dirent-safer$(EXEEXT) test-dirent$(EXEEXT) \ - test-dirname$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \ - test-errno$(EXEEXT) test-fchdir$(EXEEXT) test-fcntl-h$(EXEEXT) \ - test-fcntl-safer$(EXEEXT) test-fcntl$(EXEEXT) \ +check_PROGRAMS = test-accept$(EXEEXT) test-alloca-opt$(EXEEXT) \ + test-areadlink$(EXEEXT) test-areadlink-with-size$(EXEEXT) \ + test-areadlinkat$(EXEEXT) test-argmatch$(EXEEXT) \ + test-arpa_inet$(EXEEXT) test-binary-io$(EXEEXT) \ + test-bind$(EXEEXT) test-bitrotate$(EXEEXT) test-btowc$(EXEEXT) \ + test-byteswap$(EXEEXT) test-c-ctype$(EXEEXT) \ + test-c-strcasecmp$(EXEEXT) test-c-strncasecmp$(EXEEXT) \ + test-c-strcasestr$(EXEEXT) test-c-strstr$(EXEEXT) \ + test-canonicalize$(EXEEXT) test-chdir$(EXEEXT) \ + test-cloexec$(EXEEXT) test-close$(EXEEXT) \ + test-closein$(EXEEXT) test-connect$(EXEEXT) \ + test-ctype$(EXEEXT) test-dirent-safer$(EXEEXT) \ + test-dirent$(EXEEXT) test-dirname$(EXEEXT) test-dup$(EXEEXT) \ + test-dup2$(EXEEXT) test-environ$(EXEEXT) test-errno$(EXEEXT) \ + test-faccessat$(EXEEXT) test-fchdir$(EXEEXT) \ + test-fcntl-h$(EXEEXT) test-fcntl-safer$(EXEEXT) \ + test-fcntl$(EXEEXT) test-fdopen$(EXEEXT) \ test-fdopendir$(EXEEXT) test-fflush$(EXEEXT) \ - test-fflush2$(EXEEXT) test-fnmatch$(EXEEXT) \ - test-fopen-safer$(EXEEXT) test-fopen$(EXEEXT) \ - test-fpending$(EXEEXT) test-fpurge$(EXEEXT) \ + test-fflush2$(EXEEXT) test-fgetc$(EXEEXT) test-float$(EXEEXT) \ + test-fnmatch$(EXEEXT) test-fopen-safer$(EXEEXT) \ + test-fopen$(EXEEXT) test-fpending$(EXEEXT) \ + test-fpurge$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \ test-freadahead$(EXEEXT) test-freading$(EXEEXT) \ - test-fseeko$(EXEEXT) test-ftell$(EXEEXT) test-ftell3$(EXEEXT) \ + test-fseek$(EXEEXT) test-fseeko$(EXEEXT) test-fseeko3$(EXEEXT) \ + test-fseeko4$(EXEEXT) test-fstat$(EXEEXT) \ + test-fstatat$(EXEEXT) test-ftell$(EXEEXT) test-ftell3$(EXEEXT) \ test-ftello$(EXEEXT) test-ftello3$(EXEEXT) \ + test-ftello4$(EXEEXT) test-ftruncate$(EXEEXT) \ + test-fwrite$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \ test-getcwd$(EXEEXT) test-getdelim$(EXEEXT) \ test-getdtablesize$(EXEEXT) test-getgroups$(EXEEXT) \ - test-getline$(EXEEXT) test-getopt$(EXEEXT) \ - test-gettimeofday$(EXEEXT) test-hash$(EXEEXT) \ - test-i-ring$(EXEEXT) test-ignore-value$(EXEEXT) \ - test-inttostr$(EXEEXT) test-inttypes$(EXEEXT) \ - test-isblank$(EXEEXT) test-iswblank$(EXEEXT) \ - test-langinfo$(EXEEXT) test-lchown$(EXEEXT) \ - test-locale$(EXEEXT) test-localename$(EXEEXT) \ + test-gethostname$(EXEEXT) test-getline$(EXEEXT) \ + test-getopt$(EXEEXT) test-gettimeofday$(EXEEXT) \ + test-hash$(EXEEXT) test-i-ring$(EXEEXT) \ + test-ignore-value$(EXEEXT) test-inet_pton$(EXEEXT) \ + test-intprops$(EXEEXT) test-inttostr$(EXEEXT) \ + test-inttypes$(EXEEXT) test-ioctl$(EXEEXT) \ + test-isblank$(EXEEXT) test-isfinite$(EXEEXT) \ + test-isinf$(EXEEXT) test-isnand-nolibm$(EXEEXT) \ + test-isnanf-nolibm$(EXEEXT) test-isnanl-nolibm$(EXEEXT) \ + test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \ + test-listen$(EXEEXT) test-locale$(EXEEXT) \ + test-localeconv$(EXEEXT) test-localename$(EXEEXT) \ test-lock$(EXEEXT) test-lseek$(EXEEXT) test-lstat$(EXEEXT) \ test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \ test-math$(EXEEXT) test-mbrtowc$(EXEEXT) \ @@ -154,31 +223,44 @@ check_PROGRAMS = test-alloca-opt$(EXEEXT) test-areadlink$(EXEEXT) \ test-mbscasestr4$(EXEEXT) test-mbsinit$(EXEEXT) \ test-mbsrtowcs$(EXEEXT) test-mbsstr1$(EXEEXT) \ test-mbsstr2$(EXEEXT) test-mbsstr3$(EXEEXT) \ - test-memchr$(EXEEXT) test-memrchr$(EXEEXT) test-mkdir$(EXEEXT) \ - test-modf$(EXEEXT) test-nl_langinfo$(EXEEXT) \ - test-open$(EXEEXT) test-openat-safer$(EXEEXT) \ - test-fchownat$(EXEEXT) test-fstatat$(EXEEXT) \ - test-mkdirat$(EXEEXT) test-openat$(EXEEXT) \ - test-unlinkat$(EXEEXT) test-parse-datetime$(EXEEXT) \ - test-perror$(EXEEXT) test-priv-set$(EXEEXT) \ - test-quotearg-simple$(EXEEXT) test-readlink$(EXEEXT) \ + test-memchr$(EXEEXT) test-memrchr$(EXEEXT) test-modf$(EXEEXT) \ + test-nanosleep$(EXEEXT) test-netinet_in$(EXEEXT) \ + test-nl_langinfo$(EXEEXT) test-open$(EXEEXT) \ + test-openat-safer$(EXEEXT) test-openat$(EXEEXT) \ + test-parse-datetime$(EXEEXT) test-pathmax$(EXEEXT) \ + test-perror$(EXEEXT) test-perror2$(EXEEXT) test-pipe$(EXEEXT) \ + test-priv-set$(EXEEXT) test-quotearg-simple$(EXEEXT) \ + test-raise$(EXEEXT) test-read$(EXEEXT) test-readlink$(EXEEXT) \ test-readlinkat$(EXEEXT) test-realloc-gnu$(EXEEXT) \ - test-rmdir$(EXEEXT) test-setenv$(EXEEXT) \ - test-setlocale1$(EXEEXT) test-setlocale2$(EXEEXT) \ - test-sleep$(EXEEXT) test-snprintf$(EXEEXT) test-stat$(EXEEXT) \ - test-stat-time$(EXEEXT) test-stdbool$(EXEEXT) \ - test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \ - test-stdlib$(EXEEXT) test-strcasestr$(EXEEXT) \ - test-strerror$(EXEEXT) test-strftime$(EXEEXT) \ + test-regex$(EXEEXT) test-rmdir$(EXEEXT) test-select$(EXEEXT) \ + test-select-fd$(EXEEXT) test-select-stdin$(EXEEXT) \ + test-setenv$(EXEEXT) test-setlocale1$(EXEEXT) \ + test-setlocale2$(EXEEXT) test-setsockopt$(EXEEXT) \ + test-sigaction$(EXEEXT) test-signal-h$(EXEEXT) \ + test-sigprocmask$(EXEEXT) test-sleep$(EXEEXT) \ + test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \ + test-stat$(EXEEXT) test-stat-time$(EXEEXT) \ + test-statat$(EXEEXT) test-stdalign$(EXEEXT) \ + test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ + test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ + test-strcasestr$(EXEEXT) test-strerror$(EXEEXT) \ + test-strerror_r$(EXEEXT) test-strftime$(EXEEXT) \ test-string$(EXEEXT) test-strings$(EXEEXT) \ test-strnlen$(EXEEXT) test-strstr$(EXEEXT) \ + test-strtol$(EXEEXT) test-strtoul$(EXEEXT) \ + test-strtoull$(EXEEXT) test-strtoumax$(EXEEXT) \ test-symlink$(EXEEXT) test-symlinkat$(EXEEXT) \ - test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \ - test-sys_wait$(EXEEXT) test-time$(EXEEXT) \ + test-sys_ioctl$(EXEEXT) test-sys_select$(EXEEXT) \ + test-sys_socket$(EXEEXT) test-sys_stat$(EXEEXT) \ + test-sys_time$(EXEEXT) test-sys_types$(EXEEXT) \ + test-sys_uio$(EXEEXT) test-sys_utsname$(EXEEXT) \ + test-sys_wait$(EXEEXT) test-thread_self$(EXEEXT) \ + test-thread_create$(EXEEXT) test-time$(EXEEXT) \ + test-trunc1$(EXEEXT) test-trunc2$(EXEEXT) test-uname$(EXEEXT) \ test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \ test-uc_width$(EXEEXT) test-uc_width2$(EXEEXT) \ - test-unlink$(EXEEXT) test-unsetenv$(EXEEXT) \ - test-usleep$(EXEEXT) test-vasnprintf$(EXEEXT) \ + test-unlink$(EXEEXT) test-unlinkat$(EXEEXT) \ + test-unsetenv$(EXEEXT) test-vasnprintf$(EXEEXT) \ test-verify$(EXEEXT) test-version-etc$(EXEEXT) \ test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) \ test-wcrtomb-w32$(EXEEXT) test-wctype-h$(EXEEXT) \ @@ -192,233 +274,198 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -426,106 +473,131 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -AR = ar -ARFLAGS = cru libtests_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__dirstamp = $(am__leading_dot)dirstamp -am_libtests_a_OBJECTS = fd-safer-flag.$(OBJEXT) \ +am_libtests_a_OBJECTS = binary-io.$(OBJEXT) fd-safer-flag.$(OBJEXT) \ dup-safer-flag.$(OBJEXT) imaxtostr.$(OBJEXT) \ inttostr.$(OBJEXT) offtostr.$(OBJEXT) uinttostr.$(OBJEXT) \ - umaxtostr.$(OBJEXT) localename.$(OBJEXT) \ - glthread/lock.$(OBJEXT) priv-set.$(OBJEXT) \ - glthread/thread.$(OBJEXT) glthread/threadlib.$(OBJEXT) + umaxtostr.$(OBJEXT) localename.$(OBJEXT) priv-set.$(OBJEXT) \ + sig-handler.$(OBJEXT) glthread/thread.$(OBJEXT) \ + unlinkdir.$(OBJEXT) libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) +test_accept_SOURCES = test-accept.c +test_accept_OBJECTS = test-accept.$(OBJEXT) +am__DEPENDENCIES_2 = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_accept_DEPENDENCIES = $(am__DEPENDENCIES_2) test_alloca_opt_SOURCES = test-alloca-opt.c test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT) test_alloca_opt_LDADD = $(LDADD) -test_alloca_opt_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_alloca_opt_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_areadlink_SOURCES = test-areadlink.c test_areadlink_OBJECTS = test-areadlink.$(OBJEXT) test_areadlink_LDADD = $(LDADD) -test_areadlink_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_areadlink_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_areadlink_with_size_SOURCES = test-areadlink-with-size.c test_areadlink_with_size_OBJECTS = test-areadlink-with-size.$(OBJEXT) test_areadlink_with_size_LDADD = $(LDADD) test_areadlink_with_size_DEPENDENCIES = libtests.a \ - ../gnulib/lib/libgnulib.a libtests.a $(am__DEPENDENCIES_1) + ../gl/lib/libgnulib.a libtests.a $(am__DEPENDENCIES_1) test_areadlinkat_SOURCES = test-areadlinkat.c test_areadlinkat_OBJECTS = test-areadlinkat.$(OBJEXT) -am__DEPENDENCIES_2 = libtests.a ../gnulib/lib/libgnulib.a libtests.a \ - $(am__DEPENDENCIES_1) test_areadlinkat_DEPENDENCIES = $(am__DEPENDENCIES_2) test_argmatch_SOURCES = test-argmatch.c test_argmatch_OBJECTS = test-argmatch.$(OBJEXT) test_argmatch_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_arpa_inet_SOURCES = test-arpa_inet.c +test_arpa_inet_OBJECTS = test-arpa_inet.$(OBJEXT) +test_arpa_inet_LDADD = $(LDADD) +test_arpa_inet_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) test_binary_io_SOURCES = test-binary-io.c test_binary_io_OBJECTS = test-binary-io.$(OBJEXT) test_binary_io_LDADD = $(LDADD) -test_binary_io_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_binary_io_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_bind_SOURCES = test-bind.c +test_bind_OBJECTS = test-bind.$(OBJEXT) +test_bind_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_bitrotate_SOURCES = test-bitrotate.c test_bitrotate_OBJECTS = test-bitrotate.$(OBJEXT) test_bitrotate_LDADD = $(LDADD) -test_bitrotate_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_bitrotate_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_btowc_SOURCES = test-btowc.c test_btowc_OBJECTS = test-btowc.$(OBJEXT) test_btowc_LDADD = $(LDADD) -test_btowc_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_btowc_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_byteswap_SOURCES = test-byteswap.c +test_byteswap_OBJECTS = test-byteswap.$(OBJEXT) +test_byteswap_LDADD = $(LDADD) +test_byteswap_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_c_ctype_SOURCES = test-c-ctype.c test_c_ctype_OBJECTS = test-c-ctype.$(OBJEXT) test_c_ctype_LDADD = $(LDADD) -test_c_ctype_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_c_ctype_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_c_strcasecmp_SOURCES = test-c-strcasecmp.c test_c_strcasecmp_OBJECTS = test-c-strcasecmp.$(OBJEXT) test_c_strcasecmp_LDADD = $(LDADD) -test_c_strcasecmp_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_c_strcasecmp_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_c_strcasestr_SOURCES = test-c-strcasestr.c test_c_strcasestr_OBJECTS = test-c-strcasestr.$(OBJEXT) test_c_strcasestr_LDADD = $(LDADD) -test_c_strcasestr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_c_strcasestr_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_c_strncasecmp_SOURCES = test-c-strncasecmp.c test_c_strncasecmp_OBJECTS = test-c-strncasecmp.$(OBJEXT) test_c_strncasecmp_LDADD = $(LDADD) -test_c_strncasecmp_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_c_strncasecmp_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_c_strstr_SOURCES = test-c-strstr.c test_c_strstr_OBJECTS = test-c-strstr.$(OBJEXT) test_c_strstr_LDADD = $(LDADD) -test_c_strstr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_c_strstr_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_canonicalize_SOURCES = test-canonicalize.c test_canonicalize_OBJECTS = test-canonicalize.$(OBJEXT) test_canonicalize_DEPENDENCIES = $(am__DEPENDENCIES_2) -test_chown_SOURCES = test-chown.c -test_chown_OBJECTS = test-chown.$(OBJEXT) -test_chown_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_chdir_SOURCES = test-chdir.c +test_chdir_OBJECTS = test-chdir.$(OBJEXT) +test_chdir_LDADD = $(LDADD) +test_chdir_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_cloexec_SOURCES = test-cloexec.c test_cloexec_OBJECTS = test-cloexec.$(OBJEXT) test_cloexec_LDADD = $(LDADD) -test_cloexec_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_cloexec_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_close_SOURCES = test-close.c +test_close_OBJECTS = test-close.$(OBJEXT) +test_close_LDADD = $(LDADD) +test_close_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_closein_SOURCES = test-closein.c test_closein_OBJECTS = test-closein.$(OBJEXT) test_closein_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_connect_SOURCES = test-connect.c +test_connect_OBJECTS = test-connect.$(OBJEXT) +test_connect_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) test_ctype_SOURCES = test-ctype.c test_ctype_OBJECTS = test-ctype.$(OBJEXT) test_ctype_LDADD = $(LDADD) -test_ctype_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_ctype_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_dirent_SOURCES = test-dirent.c test_dirent_OBJECTS = test-dirent.$(OBJEXT) test_dirent_LDADD = $(LDADD) -test_dirent_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_dirent_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_dirent_safer_SOURCES = test-dirent-safer.c test_dirent_safer_OBJECTS = test-dirent-safer.$(OBJEXT) test_dirent_safer_DEPENDENCIES = $(am__DEPENDENCIES_2) \ @@ -533,149 +605,218 @@ test_dirent_safer_DEPENDENCIES = $(am__DEPENDENCIES_2) \ test_dirname_SOURCES = test-dirname.c test_dirname_OBJECTS = test-dirname.$(OBJEXT) test_dirname_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_dup_SOURCES = test-dup.c +test_dup_OBJECTS = test-dup.$(OBJEXT) +test_dup_LDADD = $(LDADD) +test_dup_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_dup_safer_SOURCES = test-dup-safer.c test_dup_safer_OBJECTS = test-dup-safer.$(OBJEXT) test_dup_safer_LDADD = $(LDADD) -test_dup_safer_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_dup_safer_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_dup2_SOURCES = test-dup2.c test_dup2_OBJECTS = test-dup2.$(OBJEXT) test_dup2_LDADD = $(LDADD) -test_dup2_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_dup2_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_environ_SOURCES = test-environ.c test_environ_OBJECTS = test-environ.$(OBJEXT) test_environ_LDADD = $(LDADD) -test_environ_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_environ_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_errno_SOURCES = test-errno.c test_errno_OBJECTS = test-errno.$(OBJEXT) test_errno_LDADD = $(LDADD) -test_errno_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_errno_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_faccessat_SOURCES = test-faccessat.c +test_faccessat_OBJECTS = test-faccessat.$(OBJEXT) +test_faccessat_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) test_fchdir_SOURCES = test-fchdir.c test_fchdir_OBJECTS = test-fchdir.$(OBJEXT) -test_fchdir_LDADD = $(LDADD) -test_fchdir_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) -test_fchownat_SOURCES = test-fchownat.c -test_fchownat_OBJECTS = test-fchownat.$(OBJEXT) -test_fchownat_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_fchdir_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_fcntl_SOURCES = test-fcntl.c test_fcntl_OBJECTS = test-fcntl.$(OBJEXT) test_fcntl_LDADD = $(LDADD) -test_fcntl_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_fcntl_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_fcntl_h_SOURCES = test-fcntl-h.c test_fcntl_h_OBJECTS = test-fcntl-h.$(OBJEXT) test_fcntl_h_LDADD = $(LDADD) -test_fcntl_h_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_fcntl_h_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_fcntl_safer_SOURCES = test-fcntl-safer.c test_fcntl_safer_OBJECTS = test-fcntl-safer.$(OBJEXT) test_fcntl_safer_LDADD = $(LDADD) -test_fcntl_safer_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_fcntl_safer_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_fdopen_SOURCES = test-fdopen.c +test_fdopen_OBJECTS = test-fdopen.$(OBJEXT) +test_fdopen_LDADD = $(LDADD) +test_fdopen_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_fdopendir_SOURCES = test-fdopendir.c test_fdopendir_OBJECTS = test-fdopendir.$(OBJEXT) test_fdopendir_DEPENDENCIES = $(am__DEPENDENCIES_2) test_fflush_SOURCES = test-fflush.c test_fflush_OBJECTS = test-fflush.$(OBJEXT) test_fflush_LDADD = $(LDADD) -test_fflush_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_fflush_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_fflush2_SOURCES = test-fflush2.c test_fflush2_OBJECTS = test-fflush2.$(OBJEXT) test_fflush2_LDADD = $(LDADD) -test_fflush2_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_fflush2_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_fgetc_SOURCES = test-fgetc.c +test_fgetc_OBJECTS = test-fgetc.$(OBJEXT) +test_fgetc_LDADD = $(LDADD) +test_fgetc_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_float_SOURCES = test-float.c +test_float_OBJECTS = test-float.$(OBJEXT) +test_float_LDADD = $(LDADD) +test_float_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_fnmatch_SOURCES = test-fnmatch.c test_fnmatch_OBJECTS = test-fnmatch.$(OBJEXT) test_fnmatch_LDADD = $(LDADD) -test_fnmatch_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_fnmatch_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_fopen_SOURCES = test-fopen.c test_fopen_OBJECTS = test-fopen.$(OBJEXT) test_fopen_LDADD = $(LDADD) -test_fopen_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_fopen_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_fopen_safer_SOURCES = test-fopen-safer.c test_fopen_safer_OBJECTS = test-fopen-safer.$(OBJEXT) test_fopen_safer_LDADD = $(LDADD) -test_fopen_safer_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_fopen_safer_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_fpending_SOURCES = test-fpending.c test_fpending_OBJECTS = test-fpending.$(OBJEXT) test_fpending_LDADD = $(LDADD) -test_fpending_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_fpending_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_fpurge_SOURCES = test-fpurge.c test_fpurge_OBJECTS = test-fpurge.$(OBJEXT) test_fpurge_LDADD = $(LDADD) -test_fpurge_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_fpurge_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_fputc_SOURCES = test-fputc.c +test_fputc_OBJECTS = test-fputc.$(OBJEXT) +test_fputc_LDADD = $(LDADD) +test_fputc_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_fread_SOURCES = test-fread.c +test_fread_OBJECTS = test-fread.$(OBJEXT) +test_fread_LDADD = $(LDADD) +test_fread_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_freadahead_SOURCES = test-freadahead.c test_freadahead_OBJECTS = test-freadahead.$(OBJEXT) test_freadahead_LDADD = $(LDADD) -test_freadahead_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_freadahead_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_freading_SOURCES = test-freading.c test_freading_OBJECTS = test-freading.$(OBJEXT) test_freading_LDADD = $(LDADD) -test_freading_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_freading_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_fseek_SOURCES = test-fseek.c +test_fseek_OBJECTS = test-fseek.$(OBJEXT) +test_fseek_LDADD = $(LDADD) +test_fseek_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_fseeko_SOURCES = test-fseeko.c test_fseeko_OBJECTS = test-fseeko.$(OBJEXT) test_fseeko_LDADD = $(LDADD) -test_fseeko_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_fseeko_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_fseeko3_SOURCES = test-fseeko3.c +test_fseeko3_OBJECTS = test-fseeko3.$(OBJEXT) +test_fseeko3_LDADD = $(LDADD) +test_fseeko3_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_fseeko4_SOURCES = test-fseeko4.c +test_fseeko4_OBJECTS = test-fseeko4.$(OBJEXT) +test_fseeko4_LDADD = $(LDADD) +test_fseeko4_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_fstat_SOURCES = test-fstat.c +test_fstat_OBJECTS = test-fstat.$(OBJEXT) +test_fstat_LDADD = $(LDADD) +test_fstat_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_fstatat_SOURCES = test-fstatat.c test_fstatat_OBJECTS = test-fstatat.$(OBJEXT) test_fstatat_DEPENDENCIES = $(am__DEPENDENCIES_2) test_ftell_SOURCES = test-ftell.c test_ftell_OBJECTS = test-ftell.$(OBJEXT) test_ftell_LDADD = $(LDADD) -test_ftell_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_ftell_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_ftell3_SOURCES = test-ftell3.c test_ftell3_OBJECTS = test-ftell3.$(OBJEXT) test_ftell3_LDADD = $(LDADD) -test_ftell3_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_ftell3_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_ftello_SOURCES = test-ftello.c test_ftello_OBJECTS = test-ftello.$(OBJEXT) test_ftello_LDADD = $(LDADD) -test_ftello_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_ftello_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_ftello3_SOURCES = test-ftello3.c test_ftello3_OBJECTS = test-ftello3.$(OBJEXT) test_ftello3_LDADD = $(LDADD) -test_ftello3_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_ftello3_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_ftello4_SOURCES = test-ftello4.c +test_ftello4_OBJECTS = test-ftello4.$(OBJEXT) +test_ftello4_LDADD = $(LDADD) +test_ftello4_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_ftruncate_SOURCES = test-ftruncate.c +test_ftruncate_OBJECTS = test-ftruncate.$(OBJEXT) +test_ftruncate_LDADD = $(LDADD) +test_ftruncate_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_fwrite_SOURCES = test-fwrite.c +test_fwrite_OBJECTS = test-fwrite.$(OBJEXT) +test_fwrite_LDADD = $(LDADD) +test_fwrite_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_getcwd_SOURCES = test-getcwd.c test_getcwd_OBJECTS = test-getcwd.$(OBJEXT) -test_getcwd_LDADD = $(LDADD) -test_getcwd_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_getcwd_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_getcwd_lgpl_SOURCES = test-getcwd-lgpl.c +test_getcwd_lgpl_OBJECTS = test-getcwd-lgpl.$(OBJEXT) +test_getcwd_lgpl_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) test_getdelim_SOURCES = test-getdelim.c test_getdelim_OBJECTS = test-getdelim.$(OBJEXT) test_getdelim_LDADD = $(LDADD) -test_getdelim_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_getdelim_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_getdtablesize_SOURCES = test-getdtablesize.c test_getdtablesize_OBJECTS = test-getdtablesize.$(OBJEXT) test_getdtablesize_LDADD = $(LDADD) -test_getdtablesize_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_getdtablesize_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_getgroups_SOURCES = test-getgroups.c test_getgroups_OBJECTS = test-getgroups.$(OBJEXT) test_getgroups_LDADD = $(LDADD) -test_getgroups_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_getgroups_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_gethostname_SOURCES = test-gethostname.c +test_gethostname_OBJECTS = test-gethostname.$(OBJEXT) +test_gethostname_DEPENDENCIES = $(am__DEPENDENCIES_2) test_getline_SOURCES = test-getline.c test_getline_OBJECTS = test-getline.$(OBJEXT) test_getline_LDADD = $(LDADD) -test_getline_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_getline_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_getopt_SOURCES = test-getopt.c test_getopt_OBJECTS = test-getopt.$(OBJEXT) @@ -683,171 +824,214 @@ test_getopt_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_gettimeofday_SOURCES = test-gettimeofday.c test_gettimeofday_OBJECTS = test-gettimeofday.$(OBJEXT) test_gettimeofday_LDADD = $(LDADD) -test_gettimeofday_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_gettimeofday_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_hash_SOURCES = test-hash.c test_hash_OBJECTS = test-hash.$(OBJEXT) -test_hash_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_hash_LDADD = $(LDADD) +test_hash_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_i_ring_SOURCES = test-i-ring.c test_i_ring_OBJECTS = test-i-ring.$(OBJEXT) test_i_ring_LDADD = $(LDADD) -test_i_ring_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_i_ring_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_ignore_value_SOURCES = test-ignore-value.c test_ignore_value_OBJECTS = test-ignore-value.$(OBJEXT) test_ignore_value_LDADD = $(LDADD) -test_ignore_value_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_ignore_value_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_inet_pton_SOURCES = test-inet_pton.c +test_inet_pton_OBJECTS = test-inet_pton.$(OBJEXT) +test_inet_pton_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_intprops_SOURCES = test-intprops.c +test_intprops_OBJECTS = test-intprops.$(OBJEXT) +test_intprops_LDADD = $(LDADD) +test_intprops_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_inttostr_SOURCES = test-inttostr.c test_inttostr_OBJECTS = test-inttostr.$(OBJEXT) test_inttostr_LDADD = $(LDADD) -test_inttostr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_inttostr_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_inttypes_SOURCES = test-inttypes.c test_inttypes_OBJECTS = test-inttypes.$(OBJEXT) test_inttypes_LDADD = $(LDADD) -test_inttypes_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_inttypes_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_ioctl_SOURCES = test-ioctl.c +test_ioctl_OBJECTS = test-ioctl.$(OBJEXT) +test_ioctl_LDADD = $(LDADD) +test_ioctl_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_isblank_SOURCES = test-isblank.c test_isblank_OBJECTS = test-isblank.$(OBJEXT) test_isblank_LDADD = $(LDADD) -test_isblank_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_isblank_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_isfinite_SOURCES = test-isfinite.c +test_isfinite_OBJECTS = test-isfinite.$(OBJEXT) +test_isfinite_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_isinf_SOURCES = test-isinf.c +test_isinf_OBJECTS = test-isinf.$(OBJEXT) +test_isinf_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_isnand_nolibm_SOURCES = test-isnand-nolibm.c +test_isnand_nolibm_OBJECTS = test-isnand-nolibm.$(OBJEXT) +test_isnand_nolibm_LDADD = $(LDADD) +test_isnand_nolibm_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_isnanf_nolibm_SOURCES = test-isnanf-nolibm.c +test_isnanf_nolibm_OBJECTS = test-isnanf-nolibm.$(OBJEXT) +test_isnanf_nolibm_LDADD = $(LDADD) +test_isnanf_nolibm_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_isnanl_nolibm_SOURCES = test-isnanl-nolibm.c +test_isnanl_nolibm_OBJECTS = test-isnanl-nolibm.$(OBJEXT) +test_isnanl_nolibm_LDADD = $(LDADD) +test_isnanl_nolibm_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_iswblank_SOURCES = test-iswblank.c test_iswblank_OBJECTS = test-iswblank.$(OBJEXT) test_iswblank_LDADD = $(LDADD) -test_iswblank_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_iswblank_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_langinfo_SOURCES = test-langinfo.c test_langinfo_OBJECTS = test-langinfo.$(OBJEXT) test_langinfo_LDADD = $(LDADD) -test_langinfo_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_langinfo_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) -test_lchown_SOURCES = test-lchown.c -test_lchown_OBJECTS = test-lchown.$(OBJEXT) -test_lchown_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_listen_SOURCES = test-listen.c +test_listen_OBJECTS = test-listen.$(OBJEXT) +test_listen_DEPENDENCIES = $(am__DEPENDENCIES_2) test_locale_SOURCES = test-locale.c test_locale_OBJECTS = test-locale.$(OBJEXT) test_locale_LDADD = $(LDADD) -test_locale_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_locale_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_localeconv_SOURCES = test-localeconv.c +test_localeconv_OBJECTS = test-localeconv.$(OBJEXT) +test_localeconv_LDADD = $(LDADD) +test_localeconv_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_localename_SOURCES = test-localename.c test_localename_OBJECTS = test-localename.$(OBJEXT) -test_localename_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_localename_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) test_lock_SOURCES = test-lock.c test_lock_OBJECTS = test-lock.$(OBJEXT) test_lock_DEPENDENCIES = $(am__DEPENDENCIES_2) test_lseek_SOURCES = test-lseek.c test_lseek_OBJECTS = test-lseek.$(OBJEXT) test_lseek_LDADD = $(LDADD) -test_lseek_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_lseek_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_lstat_SOURCES = test-lstat.c test_lstat_OBJECTS = test-lstat.$(OBJEXT) test_lstat_LDADD = $(LDADD) -test_lstat_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_lstat_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_malloc_gnu_SOURCES = test-malloc-gnu.c test_malloc_gnu_OBJECTS = test-malloc-gnu.$(OBJEXT) test_malloc_gnu_LDADD = $(LDADD) -test_malloc_gnu_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_malloc_gnu_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_malloca_SOURCES = test-malloca.c test_malloca_OBJECTS = test-malloca.$(OBJEXT) test_malloca_LDADD = $(LDADD) -test_malloca_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_malloca_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_math_SOURCES = test-math.c test_math_OBJECTS = test-math.$(OBJEXT) test_math_LDADD = $(LDADD) -test_math_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_math_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_mbrtowc_SOURCES = test-mbrtowc.c test_mbrtowc_OBJECTS = test-mbrtowc.$(OBJEXT) test_mbrtowc_LDADD = $(LDADD) -test_mbrtowc_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbrtowc_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_mbrtowc_w32_SOURCES = test-mbrtowc-w32.c test_mbrtowc_w32_OBJECTS = test-mbrtowc-w32.$(OBJEXT) test_mbrtowc_w32_LDADD = $(LDADD) -test_mbrtowc_w32_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbrtowc_w32_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_mbscasestr1_SOURCES = test-mbscasestr1.c test_mbscasestr1_OBJECTS = test-mbscasestr1.$(OBJEXT) test_mbscasestr1_LDADD = $(LDADD) -test_mbscasestr1_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbscasestr1_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_mbscasestr2_SOURCES = test-mbscasestr2.c test_mbscasestr2_OBJECTS = test-mbscasestr2.$(OBJEXT) test_mbscasestr2_LDADD = $(LDADD) -test_mbscasestr2_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbscasestr2_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_mbscasestr3_SOURCES = test-mbscasestr3.c test_mbscasestr3_OBJECTS = test-mbscasestr3.$(OBJEXT) test_mbscasestr3_LDADD = $(LDADD) -test_mbscasestr3_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbscasestr3_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_mbscasestr4_SOURCES = test-mbscasestr4.c test_mbscasestr4_OBJECTS = test-mbscasestr4.$(OBJEXT) test_mbscasestr4_LDADD = $(LDADD) -test_mbscasestr4_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbscasestr4_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_mbsinit_SOURCES = test-mbsinit.c test_mbsinit_OBJECTS = test-mbsinit.$(OBJEXT) test_mbsinit_LDADD = $(LDADD) -test_mbsinit_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbsinit_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_mbsrtowcs_SOURCES = test-mbsrtowcs.c test_mbsrtowcs_OBJECTS = test-mbsrtowcs.$(OBJEXT) test_mbsrtowcs_LDADD = $(LDADD) -test_mbsrtowcs_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbsrtowcs_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_mbsstr1_SOURCES = test-mbsstr1.c test_mbsstr1_OBJECTS = test-mbsstr1.$(OBJEXT) test_mbsstr1_LDADD = $(LDADD) -test_mbsstr1_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbsstr1_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_mbsstr2_SOURCES = test-mbsstr2.c test_mbsstr2_OBJECTS = test-mbsstr2.$(OBJEXT) test_mbsstr2_LDADD = $(LDADD) -test_mbsstr2_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbsstr2_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_mbsstr3_SOURCES = test-mbsstr3.c test_mbsstr3_OBJECTS = test-mbsstr3.$(OBJEXT) test_mbsstr3_LDADD = $(LDADD) -test_mbsstr3_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_mbsstr3_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_memchr_SOURCES = test-memchr.c test_memchr_OBJECTS = test-memchr.$(OBJEXT) test_memchr_LDADD = $(LDADD) -test_memchr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_memchr_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_memrchr_SOURCES = test-memrchr.c test_memrchr_OBJECTS = test-memrchr.$(OBJEXT) test_memrchr_LDADD = $(LDADD) -test_memrchr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) -test_mkdir_SOURCES = test-mkdir.c -test_mkdir_OBJECTS = test-mkdir.$(OBJEXT) -test_mkdir_LDADD = $(LDADD) -test_mkdir_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) -test_mkdirat_SOURCES = test-mkdirat.c -test_mkdirat_OBJECTS = test-mkdirat.$(OBJEXT) -test_mkdirat_DEPENDENCIES = $(am__DEPENDENCIES_2) -test_modf_SOURCES = test-modf.c -test_modf_OBJECTS = test-modf.$(OBJEXT) +test_memrchr_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +am_test_modf_OBJECTS = test-modf.$(OBJEXT) randomd.$(OBJEXT) +test_modf_OBJECTS = $(am_test_modf_OBJECTS) test_modf_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_nanosleep_SOURCES = test-nanosleep.c +test_nanosleep_OBJECTS = test-nanosleep.$(OBJEXT) +test_nanosleep_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) +test_netinet_in_SOURCES = test-netinet_in.c +test_netinet_in_OBJECTS = test-netinet_in.$(OBJEXT) +test_netinet_in_LDADD = $(LDADD) +test_netinet_in_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) test_nl_langinfo_SOURCES = test-nl_langinfo.c test_nl_langinfo_OBJECTS = test-nl_langinfo.$(OBJEXT) test_nl_langinfo_LDADD = $(LDADD) -test_nl_langinfo_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_nl_langinfo_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_open_SOURCES = test-open.c test_open_OBJECTS = test-open.$(OBJEXT) test_open_LDADD = $(LDADD) -test_open_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_open_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_openat_SOURCES = test-openat.c test_openat_OBJECTS = test-openat.$(OBJEXT) test_openat_DEPENDENCIES = $(am__DEPENDENCIES_2) @@ -858,23 +1042,48 @@ test_parse_datetime_SOURCES = test-parse-datetime.c test_parse_datetime_OBJECTS = test-parse-datetime.$(OBJEXT) test_parse_datetime_DEPENDENCIES = $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_1) +test_pathmax_SOURCES = test-pathmax.c +test_pathmax_OBJECTS = test-pathmax.$(OBJEXT) +test_pathmax_LDADD = $(LDADD) +test_pathmax_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) test_perror_SOURCES = test-perror.c test_perror_OBJECTS = test-perror.$(OBJEXT) test_perror_LDADD = $(LDADD) -test_perror_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_perror_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_perror2_SOURCES = test-perror2.c +test_perror2_OBJECTS = test-perror2.$(OBJEXT) +test_perror2_LDADD = $(LDADD) +test_perror2_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_pipe_SOURCES = test-pipe.c +test_pipe_OBJECTS = test-pipe.$(OBJEXT) +test_pipe_LDADD = $(LDADD) +test_pipe_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_priv_set_SOURCES = test-priv-set.c test_priv_set_OBJECTS = test-priv-set.$(OBJEXT) test_priv_set_LDADD = $(LDADD) -test_priv_set_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_priv_set_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_quotearg_simple_SOURCES = test-quotearg-simple.c test_quotearg_simple_OBJECTS = test-quotearg-simple.$(OBJEXT) test_quotearg_simple_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_raise_SOURCES = test-raise.c +test_raise_OBJECTS = test-raise.$(OBJEXT) +test_raise_LDADD = $(LDADD) +test_raise_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_read_SOURCES = test-read.c +test_read_OBJECTS = test-read.$(OBJEXT) +test_read_LDADD = $(LDADD) +test_read_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_readlink_SOURCES = test-readlink.c test_readlink_OBJECTS = test-readlink.$(OBJEXT) test_readlink_LDADD = $(LDADD) -test_readlink_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_readlink_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_readlinkat_SOURCES = test-readlinkat.c test_readlinkat_OBJECTS = test-readlinkat.$(OBJEXT) @@ -882,202 +1091,305 @@ test_readlinkat_DEPENDENCIES = $(am__DEPENDENCIES_2) test_realloc_gnu_SOURCES = test-realloc-gnu.c test_realloc_gnu_OBJECTS = test-realloc-gnu.$(OBJEXT) test_realloc_gnu_LDADD = $(LDADD) -test_realloc_gnu_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_realloc_gnu_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_regex_SOURCES = test-regex.c +test_regex_OBJECTS = test-regex.$(OBJEXT) +test_regex_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_rmdir_SOURCES = test-rmdir.c test_rmdir_OBJECTS = test-rmdir.$(OBJEXT) test_rmdir_LDADD = $(LDADD) -test_rmdir_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_rmdir_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_select_SOURCES = test-select.c +test_select_OBJECTS = test-select.$(OBJEXT) +test_select_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) +test_select_fd_SOURCES = test-select-fd.c +test_select_fd_OBJECTS = test-select-fd.$(OBJEXT) +test_select_fd_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_select_stdin_SOURCES = test-select-stdin.c +test_select_stdin_OBJECTS = test-select-stdin.$(OBJEXT) +test_select_stdin_DEPENDENCIES = $(am__DEPENDENCIES_2) test_setenv_SOURCES = test-setenv.c test_setenv_OBJECTS = test-setenv.$(OBJEXT) test_setenv_LDADD = $(LDADD) -test_setenv_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_setenv_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_setlocale1_SOURCES = test-setlocale1.c test_setlocale1_OBJECTS = test-setlocale1.$(OBJEXT) test_setlocale1_LDADD = $(LDADD) -test_setlocale1_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_setlocale1_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_setlocale2_SOURCES = test-setlocale2.c test_setlocale2_OBJECTS = test-setlocale2.$(OBJEXT) test_setlocale2_LDADD = $(LDADD) -test_setlocale2_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_setlocale2_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_setsockopt_SOURCES = test-setsockopt.c +test_setsockopt_OBJECTS = test-setsockopt.$(OBJEXT) +test_setsockopt_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_sigaction_SOURCES = test-sigaction.c +test_sigaction_OBJECTS = test-sigaction.$(OBJEXT) +test_sigaction_LDADD = $(LDADD) +test_sigaction_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_signal_h_SOURCES = test-signal-h.c +test_signal_h_OBJECTS = test-signal-h.$(OBJEXT) +test_signal_h_LDADD = $(LDADD) +test_signal_h_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_sigprocmask_SOURCES = test-sigprocmask.c +test_sigprocmask_OBJECTS = test-sigprocmask.$(OBJEXT) +test_sigprocmask_LDADD = $(LDADD) +test_sigprocmask_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_sleep_SOURCES = test-sleep.c test_sleep_OBJECTS = test-sleep.$(OBJEXT) test_sleep_LDADD = $(LDADD) -test_sleep_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_sleep_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_snprintf_SOURCES = test-snprintf.c test_snprintf_OBJECTS = test-snprintf.$(OBJEXT) test_snprintf_LDADD = $(LDADD) -test_snprintf_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_snprintf_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_sockets_SOURCES = test-sockets.c +test_sockets_OBJECTS = test-sockets.$(OBJEXT) +test_sockets_DEPENDENCIES = $(am__DEPENDENCIES_2) test_stat_SOURCES = test-stat.c test_stat_OBJECTS = test-stat.$(OBJEXT) -test_stat_LDADD = $(LDADD) -test_stat_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_stat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_stat_time_SOURCES = test-stat-time.c test_stat_time_OBJECTS = test-stat-time.$(OBJEXT) -test_stat_time_LDADD = $(LDADD) -test_stat_time_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_stat_time_DEPENDENCIES = $(am__DEPENDENCIES_2) \ + $(am__DEPENDENCIES_1) +test_statat_SOURCES = test-statat.c +test_statat_OBJECTS = test-statat.$(OBJEXT) +test_statat_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_stdalign_SOURCES = test-stdalign.c +test_stdalign_OBJECTS = test-stdalign.$(OBJEXT) +test_stdalign_LDADD = $(LDADD) +test_stdalign_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_stdbool_SOURCES = test-stdbool.c test_stdbool_OBJECTS = test-stdbool.$(OBJEXT) test_stdbool_LDADD = $(LDADD) -test_stdbool_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_stdbool_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_stddef_SOURCES = test-stddef.c test_stddef_OBJECTS = test-stddef.$(OBJEXT) test_stddef_LDADD = $(LDADD) -test_stddef_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_stddef_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_stdint_SOURCES = test-stdint.c test_stdint_OBJECTS = test-stdint.$(OBJEXT) test_stdint_LDADD = $(LDADD) -test_stdint_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_stdint_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_stdio_SOURCES = test-stdio.c test_stdio_OBJECTS = test-stdio.$(OBJEXT) test_stdio_LDADD = $(LDADD) -test_stdio_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_stdio_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_stdlib_SOURCES = test-stdlib.c test_stdlib_OBJECTS = test-stdlib.$(OBJEXT) test_stdlib_LDADD = $(LDADD) -test_stdlib_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_stdlib_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_strcasestr_SOURCES = test-strcasestr.c test_strcasestr_OBJECTS = test-strcasestr.$(OBJEXT) test_strcasestr_LDADD = $(LDADD) -test_strcasestr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_strcasestr_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_strerror_SOURCES = test-strerror.c test_strerror_OBJECTS = test-strerror.$(OBJEXT) test_strerror_LDADD = $(LDADD) -test_strerror_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_strerror_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_strerror_r_SOURCES = test-strerror_r.c +test_strerror_r_OBJECTS = test-strerror_r.$(OBJEXT) +test_strerror_r_LDADD = $(LDADD) +test_strerror_r_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_strftime_SOURCES = test-strftime.c test_strftime_OBJECTS = test-strftime.$(OBJEXT) test_strftime_LDADD = $(LDADD) -test_strftime_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_strftime_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_string_SOURCES = test-string.c test_string_OBJECTS = test-string.$(OBJEXT) test_string_LDADD = $(LDADD) -test_string_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_string_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_strings_SOURCES = test-strings.c test_strings_OBJECTS = test-strings.$(OBJEXT) test_strings_LDADD = $(LDADD) -test_strings_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_strings_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_strnlen_SOURCES = test-strnlen.c test_strnlen_OBJECTS = test-strnlen.$(OBJEXT) test_strnlen_LDADD = $(LDADD) -test_strnlen_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_strnlen_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_strstr_SOURCES = test-strstr.c test_strstr_OBJECTS = test-strstr.$(OBJEXT) test_strstr_LDADD = $(LDADD) -test_strstr_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_strstr_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_strtol_SOURCES = test-strtol.c +test_strtol_OBJECTS = test-strtol.$(OBJEXT) +test_strtol_LDADD = $(LDADD) +test_strtol_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_strtoul_SOURCES = test-strtoul.c +test_strtoul_OBJECTS = test-strtoul.$(OBJEXT) +test_strtoul_LDADD = $(LDADD) +test_strtoul_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_strtoull_SOURCES = test-strtoull.c +test_strtoull_OBJECTS = test-strtoull.$(OBJEXT) +test_strtoull_LDADD = $(LDADD) +test_strtoull_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_strtoumax_SOURCES = test-strtoumax.c +test_strtoumax_OBJECTS = test-strtoumax.$(OBJEXT) +test_strtoumax_LDADD = $(LDADD) +test_strtoumax_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_symlink_SOURCES = test-symlink.c test_symlink_OBJECTS = test-symlink.$(OBJEXT) test_symlink_LDADD = $(LDADD) -test_symlink_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_symlink_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_symlinkat_SOURCES = test-symlinkat.c test_symlinkat_OBJECTS = test-symlinkat.$(OBJEXT) test_symlinkat_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_sys_ioctl_SOURCES = test-sys_ioctl.c +test_sys_ioctl_OBJECTS = test-sys_ioctl.$(OBJEXT) +test_sys_ioctl_LDADD = $(LDADD) +test_sys_ioctl_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_sys_select_SOURCES = test-sys_select.c +test_sys_select_OBJECTS = test-sys_select.$(OBJEXT) +test_sys_select_LDADD = $(LDADD) +test_sys_select_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_sys_socket_SOURCES = test-sys_socket.c +test_sys_socket_OBJECTS = test-sys_socket.$(OBJEXT) +test_sys_socket_LDADD = $(LDADD) +test_sys_socket_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) test_sys_stat_SOURCES = test-sys_stat.c test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT) test_sys_stat_LDADD = $(LDADD) -test_sys_stat_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_sys_stat_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_sys_time_SOURCES = test-sys_time.c test_sys_time_OBJECTS = test-sys_time.$(OBJEXT) test_sys_time_LDADD = $(LDADD) -test_sys_time_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_sys_time_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_sys_types_SOURCES = test-sys_types.c +test_sys_types_OBJECTS = test-sys_types.$(OBJEXT) +test_sys_types_LDADD = $(LDADD) +test_sys_types_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_sys_uio_SOURCES = test-sys_uio.c +test_sys_uio_OBJECTS = test-sys_uio.$(OBJEXT) +test_sys_uio_LDADD = $(LDADD) +test_sys_uio_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ + libtests.a $(am__DEPENDENCIES_1) +test_sys_utsname_SOURCES = test-sys_utsname.c +test_sys_utsname_OBJECTS = test-sys_utsname.$(OBJEXT) +test_sys_utsname_LDADD = $(LDADD) +test_sys_utsname_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_sys_wait_SOURCES = test-sys_wait.c test_sys_wait_OBJECTS = test-sys_wait.$(OBJEXT) test_sys_wait_LDADD = $(LDADD) -test_sys_wait_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_sys_wait_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) +test_thread_create_SOURCES = test-thread_create.c +test_thread_create_OBJECTS = test-thread_create.$(OBJEXT) +test_thread_create_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_thread_self_SOURCES = test-thread_self.c +test_thread_self_OBJECTS = test-thread_self.$(OBJEXT) +test_thread_self_DEPENDENCIES = $(am__DEPENDENCIES_2) test_time_SOURCES = test-time.c test_time_OBJECTS = test-time.$(OBJEXT) test_time_LDADD = $(LDADD) -test_time_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_time_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) +test_trunc1_SOURCES = test-trunc1.c +test_trunc1_OBJECTS = test-trunc1.$(OBJEXT) +test_trunc1_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_trunc2_SOURCES = test-trunc2.c +test_trunc2_OBJECTS = test-trunc2.$(OBJEXT) +test_trunc2_DEPENDENCIES = $(am__DEPENDENCIES_2) am_test_uc_width_OBJECTS = uniwidth/test-uc_width.$(OBJEXT) test_uc_width_OBJECTS = $(am_test_uc_width_OBJECTS) test_uc_width_DEPENDENCIES = $(am__DEPENDENCIES_2) am_test_uc_width2_OBJECTS = uniwidth/test-uc_width2.$(OBJEXT) test_uc_width2_OBJECTS = $(am_test_uc_width2_OBJECTS) test_uc_width2_DEPENDENCIES = $(am__DEPENDENCIES_2) +test_uname_SOURCES = test-uname.c +test_uname_OBJECTS = test-uname.$(OBJEXT) +test_uname_DEPENDENCIES = $(am__DEPENDENCIES_2) test_unistd_SOURCES = test-unistd.c test_unistd_OBJECTS = test-unistd.$(OBJEXT) test_unistd_LDADD = $(LDADD) -test_unistd_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_unistd_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_unlink_SOURCES = test-unlink.c test_unlink_OBJECTS = test-unlink.$(OBJEXT) test_unlink_LDADD = $(LDADD) -test_unlink_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_unlink_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_unlinkat_SOURCES = test-unlinkat.c test_unlinkat_OBJECTS = test-unlinkat.$(OBJEXT) test_unlinkat_DEPENDENCIES = $(am__DEPENDENCIES_2) test_unsetenv_SOURCES = test-unsetenv.c test_unsetenv_OBJECTS = test-unsetenv.$(OBJEXT) test_unsetenv_LDADD = $(LDADD) -test_unsetenv_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) -test_usleep_SOURCES = test-usleep.c -test_usleep_OBJECTS = test-usleep.$(OBJEXT) -test_usleep_LDADD = $(LDADD) -test_usleep_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_unsetenv_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_vasnprintf_SOURCES = test-vasnprintf.c test_vasnprintf_OBJECTS = test-vasnprintf.$(OBJEXT) test_vasnprintf_LDADD = $(LDADD) -test_vasnprintf_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_vasnprintf_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_verify_SOURCES = test-verify.c test_verify_OBJECTS = test-verify.$(OBJEXT) test_verify_LDADD = $(LDADD) -test_verify_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_verify_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_version_etc_SOURCES = test-version-etc.c test_version_etc_OBJECTS = test-version-etc.$(OBJEXT) test_version_etc_DEPENDENCIES = $(am__DEPENDENCIES_2) test_wchar_SOURCES = test-wchar.c test_wchar_OBJECTS = test-wchar.$(OBJEXT) test_wchar_LDADD = $(LDADD) -test_wchar_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ - libtests.a $(am__DEPENDENCIES_1) +test_wchar_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a libtests.a \ + $(am__DEPENDENCIES_1) test_wcrtomb_SOURCES = test-wcrtomb.c test_wcrtomb_OBJECTS = test-wcrtomb.$(OBJEXT) test_wcrtomb_LDADD = $(LDADD) -test_wcrtomb_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_wcrtomb_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_wcrtomb_w32_SOURCES = test-wcrtomb-w32.c test_wcrtomb_w32_OBJECTS = test-wcrtomb-w32.$(OBJEXT) test_wcrtomb_w32_LDADD = $(LDADD) -test_wcrtomb_w32_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_wcrtomb_w32_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_wctype_h_SOURCES = test-wctype-h.c test_wctype_h_OBJECTS = test-wctype-h.$(OBJEXT) test_wctype_h_LDADD = $(LDADD) -test_wctype_h_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_wctype_h_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_wcwidth_SOURCES = test-wcwidth.c test_wcwidth_OBJECTS = test-wcwidth.$(OBJEXT) test_wcwidth_LDADD = $(LDADD) -test_wcwidth_DEPENDENCIES = libtests.a ../gnulib/lib/libgnulib.a \ +test_wcwidth_DEPENDENCIES = libtests.a ../gl/lib/libgnulib.a \ libtests.a $(am__DEPENDENCIES_1) test_xalloc_die_SOURCES = test-xalloc-die.c test_xalloc_die_OBJECTS = test-xalloc-die.$(OBJEXT) @@ -1103,87 +1415,123 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ - test-alloca-opt.c test-areadlink.c test-areadlink-with-size.c \ - test-areadlinkat.c test-argmatch.c test-binary-io.c \ - test-bitrotate.c test-btowc.c test-c-ctype.c \ + test-accept.c test-alloca-opt.c test-areadlink.c \ + test-areadlink-with-size.c test-areadlinkat.c test-argmatch.c \ + test-arpa_inet.c test-binary-io.c test-bind.c test-bitrotate.c \ + test-btowc.c test-byteswap.c test-c-ctype.c \ test-c-strcasecmp.c test-c-strcasestr.c test-c-strncasecmp.c \ - test-c-strstr.c test-canonicalize.c test-chown.c \ - test-cloexec.c test-closein.c test-ctype.c test-dirent.c \ - test-dirent-safer.c test-dirname.c test-dup-safer.c \ - test-dup2.c test-environ.c test-errno.c test-fchdir.c \ - test-fchownat.c test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \ - test-fdopendir.c test-fflush.c test-fflush2.c test-fnmatch.c \ - test-fopen.c test-fopen-safer.c test-fpending.c test-fpurge.c \ - test-freadahead.c test-freading.c test-fseeko.c test-fstatat.c \ + test-c-strstr.c test-canonicalize.c test-chdir.c \ + test-cloexec.c test-close.c test-closein.c test-connect.c \ + test-ctype.c test-dirent.c test-dirent-safer.c test-dirname.c \ + test-dup.c test-dup-safer.c test-dup2.c test-environ.c \ + test-errno.c test-faccessat.c test-fchdir.c test-fcntl.c \ + test-fcntl-h.c test-fcntl-safer.c test-fdopen.c \ + test-fdopendir.c test-fflush.c test-fflush2.c test-fgetc.c \ + test-float.c test-fnmatch.c test-fopen.c test-fopen-safer.c \ + test-fpending.c test-fpurge.c test-fputc.c test-fread.c \ + test-freadahead.c test-freading.c test-fseek.c test-fseeko.c \ + test-fseeko3.c test-fseeko4.c test-fstat.c test-fstatat.c \ test-ftell.c test-ftell3.c test-ftello.c test-ftello3.c \ - test-getcwd.c test-getdelim.c test-getdtablesize.c \ - test-getgroups.c test-getline.c test-getopt.c \ - test-gettimeofday.c test-hash.c test-i-ring.c \ - test-ignore-value.c test-inttostr.c test-inttypes.c \ - test-isblank.c test-iswblank.c test-langinfo.c test-lchown.c \ - test-locale.c test-localename.c test-lock.c test-lseek.c \ - test-lstat.c test-malloc-gnu.c test-malloca.c test-math.c \ - test-mbrtowc.c test-mbrtowc-w32.c test-mbscasestr1.c \ - test-mbscasestr2.c test-mbscasestr3.c test-mbscasestr4.c \ - test-mbsinit.c test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c \ - test-mbsstr3.c test-memchr.c test-memrchr.c test-mkdir.c \ - test-mkdirat.c test-modf.c test-nl_langinfo.c test-open.c \ - test-openat.c test-openat-safer.c test-parse-datetime.c \ - test-perror.c test-priv-set.c test-quotearg-simple.c \ + test-ftello4.c test-ftruncate.c test-fwrite.c test-getcwd.c \ + test-getcwd-lgpl.c test-getdelim.c test-getdtablesize.c \ + test-getgroups.c test-gethostname.c test-getline.c \ + test-getopt.c test-gettimeofday.c test-hash.c test-i-ring.c \ + test-ignore-value.c test-inet_pton.c test-intprops.c \ + test-inttostr.c test-inttypes.c test-ioctl.c test-isblank.c \ + test-isfinite.c test-isinf.c test-isnand-nolibm.c \ + test-isnanf-nolibm.c test-isnanl-nolibm.c test-iswblank.c \ + test-langinfo.c test-listen.c test-locale.c test-localeconv.c \ + test-localename.c test-lock.c test-lseek.c test-lstat.c \ + test-malloc-gnu.c test-malloca.c test-math.c test-mbrtowc.c \ + test-mbrtowc-w32.c test-mbscasestr1.c test-mbscasestr2.c \ + test-mbscasestr3.c test-mbscasestr4.c test-mbsinit.c \ + test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c \ + test-memchr.c test-memrchr.c $(test_modf_SOURCES) \ + test-nanosleep.c test-netinet_in.c test-nl_langinfo.c \ + test-open.c test-openat.c test-openat-safer.c \ + test-parse-datetime.c test-pathmax.c test-perror.c \ + test-perror2.c test-pipe.c test-priv-set.c \ + test-quotearg-simple.c test-raise.c test-read.c \ test-readlink.c test-readlinkat.c test-realloc-gnu.c \ - test-rmdir.c test-setenv.c test-setlocale1.c test-setlocale2.c \ - test-sleep.c test-snprintf.c test-stat.c test-stat-time.c \ - test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \ - test-stdlib.c test-strcasestr.c test-strerror.c \ - test-strftime.c test-string.c test-strings.c test-strnlen.c \ - test-strstr.c test-symlink.c test-symlinkat.c test-sys_stat.c \ - test-sys_time.c test-sys_wait.c test-time.c \ + test-regex.c test-rmdir.c test-select.c test-select-fd.c \ + test-select-stdin.c test-setenv.c test-setlocale1.c \ + test-setlocale2.c test-setsockopt.c test-sigaction.c \ + test-signal-h.c test-sigprocmask.c test-sleep.c \ + test-snprintf.c test-sockets.c test-stat.c test-stat-time.c \ + test-statat.c test-stdalign.c test-stdbool.c test-stddef.c \ + test-stdint.c test-stdio.c test-stdlib.c test-strcasestr.c \ + test-strerror.c test-strerror_r.c test-strftime.c \ + test-string.c test-strings.c test-strnlen.c test-strstr.c \ + test-strtol.c test-strtoul.c test-strtoull.c test-strtoumax.c \ + test-symlink.c test-symlinkat.c test-sys_ioctl.c \ + test-sys_select.c test-sys_socket.c test-sys_stat.c \ + test-sys_time.c test-sys_types.c test-sys_uio.c \ + test-sys_utsname.c test-sys_wait.c test-thread_create.c \ + test-thread_self.c test-time.c test-trunc1.c test-trunc2.c \ $(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \ - test-unistd.c test-unlink.c test-unlinkat.c test-unsetenv.c \ - test-usleep.c test-vasnprintf.c test-verify.c \ + test-uname.c test-unistd.c test-unlink.c test-unlinkat.c \ + test-unsetenv.c test-vasnprintf.c test-verify.c \ test-version-etc.c test-wchar.c test-wcrtomb.c \ test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \ test-xalloc-die.c test-xstrtol.c test-xstrtoul.c \ test-xstrtoumax.c test-yesno.c DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ - test-alloca-opt.c test-areadlink.c test-areadlink-with-size.c \ - test-areadlinkat.c test-argmatch.c test-binary-io.c \ - test-bitrotate.c test-btowc.c test-c-ctype.c \ + test-accept.c test-alloca-opt.c test-areadlink.c \ + test-areadlink-with-size.c test-areadlinkat.c test-argmatch.c \ + test-arpa_inet.c test-binary-io.c test-bind.c test-bitrotate.c \ + test-btowc.c test-byteswap.c test-c-ctype.c \ test-c-strcasecmp.c test-c-strcasestr.c test-c-strncasecmp.c \ - test-c-strstr.c test-canonicalize.c test-chown.c \ - test-cloexec.c test-closein.c test-ctype.c test-dirent.c \ - test-dirent-safer.c test-dirname.c test-dup-safer.c \ - test-dup2.c test-environ.c test-errno.c test-fchdir.c \ - test-fchownat.c test-fcntl.c test-fcntl-h.c test-fcntl-safer.c \ - test-fdopendir.c test-fflush.c test-fflush2.c test-fnmatch.c \ - test-fopen.c test-fopen-safer.c test-fpending.c test-fpurge.c \ - test-freadahead.c test-freading.c test-fseeko.c test-fstatat.c \ + test-c-strstr.c test-canonicalize.c test-chdir.c \ + test-cloexec.c test-close.c test-closein.c test-connect.c \ + test-ctype.c test-dirent.c test-dirent-safer.c test-dirname.c \ + test-dup.c test-dup-safer.c test-dup2.c test-environ.c \ + test-errno.c test-faccessat.c test-fchdir.c test-fcntl.c \ + test-fcntl-h.c test-fcntl-safer.c test-fdopen.c \ + test-fdopendir.c test-fflush.c test-fflush2.c test-fgetc.c \ + test-float.c test-fnmatch.c test-fopen.c test-fopen-safer.c \ + test-fpending.c test-fpurge.c test-fputc.c test-fread.c \ + test-freadahead.c test-freading.c test-fseek.c test-fseeko.c \ + test-fseeko3.c test-fseeko4.c test-fstat.c test-fstatat.c \ test-ftell.c test-ftell3.c test-ftello.c test-ftello3.c \ - test-getcwd.c test-getdelim.c test-getdtablesize.c \ - test-getgroups.c test-getline.c test-getopt.c \ - test-gettimeofday.c test-hash.c test-i-ring.c \ - test-ignore-value.c test-inttostr.c test-inttypes.c \ - test-isblank.c test-iswblank.c test-langinfo.c test-lchown.c \ - test-locale.c test-localename.c test-lock.c test-lseek.c \ - test-lstat.c test-malloc-gnu.c test-malloca.c test-math.c \ - test-mbrtowc.c test-mbrtowc-w32.c test-mbscasestr1.c \ - test-mbscasestr2.c test-mbscasestr3.c test-mbscasestr4.c \ - test-mbsinit.c test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c \ - test-mbsstr3.c test-memchr.c test-memrchr.c test-mkdir.c \ - test-mkdirat.c test-modf.c test-nl_langinfo.c test-open.c \ - test-openat.c test-openat-safer.c test-parse-datetime.c \ - test-perror.c test-priv-set.c test-quotearg-simple.c \ + test-ftello4.c test-ftruncate.c test-fwrite.c test-getcwd.c \ + test-getcwd-lgpl.c test-getdelim.c test-getdtablesize.c \ + test-getgroups.c test-gethostname.c test-getline.c \ + test-getopt.c test-gettimeofday.c test-hash.c test-i-ring.c \ + test-ignore-value.c test-inet_pton.c test-intprops.c \ + test-inttostr.c test-inttypes.c test-ioctl.c test-isblank.c \ + test-isfinite.c test-isinf.c test-isnand-nolibm.c \ + test-isnanf-nolibm.c test-isnanl-nolibm.c test-iswblank.c \ + test-langinfo.c test-listen.c test-locale.c test-localeconv.c \ + test-localename.c test-lock.c test-lseek.c test-lstat.c \ + test-malloc-gnu.c test-malloca.c test-math.c test-mbrtowc.c \ + test-mbrtowc-w32.c test-mbscasestr1.c test-mbscasestr2.c \ + test-mbscasestr3.c test-mbscasestr4.c test-mbsinit.c \ + test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c \ + test-memchr.c test-memrchr.c $(test_modf_SOURCES) \ + test-nanosleep.c test-netinet_in.c test-nl_langinfo.c \ + test-open.c test-openat.c test-openat-safer.c \ + test-parse-datetime.c test-pathmax.c test-perror.c \ + test-perror2.c test-pipe.c test-priv-set.c \ + test-quotearg-simple.c test-raise.c test-read.c \ test-readlink.c test-readlinkat.c test-realloc-gnu.c \ - test-rmdir.c test-setenv.c test-setlocale1.c test-setlocale2.c \ - test-sleep.c test-snprintf.c test-stat.c test-stat-time.c \ - test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \ - test-stdlib.c test-strcasestr.c test-strerror.c \ - test-strftime.c test-string.c test-strings.c test-strnlen.c \ - test-strstr.c test-symlink.c test-symlinkat.c test-sys_stat.c \ - test-sys_time.c test-sys_wait.c test-time.c \ + test-regex.c test-rmdir.c test-select.c test-select-fd.c \ + test-select-stdin.c test-setenv.c test-setlocale1.c \ + test-setlocale2.c test-setsockopt.c test-sigaction.c \ + test-signal-h.c test-sigprocmask.c test-sleep.c \ + test-snprintf.c test-sockets.c test-stat.c test-stat-time.c \ + test-statat.c test-stdalign.c test-stdbool.c test-stddef.c \ + test-stdint.c test-stdio.c test-stdlib.c test-strcasestr.c \ + test-strerror.c test-strerror_r.c test-strftime.c \ + test-string.c test-strings.c test-strnlen.c test-strstr.c \ + test-strtol.c test-strtoul.c test-strtoull.c test-strtoumax.c \ + test-symlink.c test-symlinkat.c test-sys_ioctl.c \ + test-sys_select.c test-sys_socket.c test-sys_stat.c \ + test-sys_time.c test-sys_types.c test-sys_uio.c \ + test-sys_utsname.c test-sys_wait.c test-thread_create.c \ + test-thread_self.c test-time.c test-trunc1.c test-trunc2.c \ $(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \ - test-unistd.c test-unlink.c test-unlinkat.c test-unsetenv.c \ - test-usleep.c test-vasnprintf.c test-verify.c \ + test-uname.c test-unistd.c test-unlink.c test-unlinkat.c \ + test-unsetenv.c test-vasnprintf.c test-verify.c \ test-version-etc.c test-wchar.c test-wcrtomb.c \ test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \ test-xalloc-die.c test-xstrtol.c test-xstrtoul.c \ @@ -1195,6 +1543,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive @@ -1238,6 +1591,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -1248,6 +1603,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -1270,59 +1626,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -1330,6 +1733,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -1341,12 +1746,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -1358,10 +1778,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -1401,49 +1837,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -1470,6 +1946,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -1479,7 +1957,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -1491,8 +1970,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -1535,26 +2016,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -1571,17 +2074,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -1603,19 +2116,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -1631,6 +2160,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -1645,8 +2180,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -1668,30 +2212,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -1699,6 +2275,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -1706,18 +2283,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -1757,18 +2347,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -1778,6 +2370,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -1788,12 +2382,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -1814,6 +2411,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -1824,7 +2424,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -1832,8 +2434,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -1849,7 +2457,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -1857,8 +2467,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -1880,10 +2496,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -1895,19 +2518,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -1915,26 +2551,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -1952,6 +2618,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1964,11 +2633,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1976,6 +2655,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1983,10 +2663,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1996,10 +2679,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -2023,6 +2711,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -2030,14 +2719,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -2047,6 +2739,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -2059,7 +2753,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -2100,9 +2796,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -2111,7 +2812,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects +AUTOMAKE_OPTIONS = 1.9.6 foreign subdir-objects SUBDIRS = . TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ @@ -2135,49 +2836,72 @@ TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \ noinst_HEADERS = noinst_LIBRARIES = check_LIBRARIES = libtests.a -EXTRA_DIST = test-alloca-opt.c test-areadlink.h test-areadlink.c \ - macros.h test-areadlink.h test-areadlink-with-size.c macros.h \ - test-areadlink.h test-areadlinkat.c macros.h \ - $(top_srcdir)/build-aux/arg-nonnull.h test-argmatch.c macros.h \ - test-binary-io.sh test-binary-io.c macros.h test-bitrotate.c \ - macros.h test-btowc1.sh test-btowc2.sh test-btowc.c \ - signature.h macros.h $(top_srcdir)/build-aux/c++defs.h \ - test-c-ctype.c macros.h test-c-strcase.sh test-c-strcasecmp.c \ - test-c-strncasecmp.c macros.h test-c-strcasestr.c macros.h \ - test-c-strstr.c macros.h test-canonicalize.c macros.h nap.h \ - test-chown.h test-chown.c signature.h macros.h test-cloexec.c \ - macros.h test-closein.sh test-closein.c test-ctype.c \ +EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \ + test-alloca-opt.c test-areadlink.h test-areadlink.c macros.h \ + test-areadlink.h test-areadlink-with-size.c macros.h \ + test-areadlink.h test-areadlinkat.c macros.h test-argmatch.c \ + macros.h arpa_inet.in.h test-arpa_inet.c test-binary-io.sh \ + test-binary-io.c macros.h bind.c w32sock.h test-bind.c \ + signature.h macros.h test-bitrotate.c macros.h test-btowc1.sh \ + test-btowc2.sh test-btowc.c signature.h macros.h \ + test-byteswap.c macros.h test-c-ctype.c macros.h \ + test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c \ + macros.h test-c-strcasestr.c macros.h test-c-strstr.c macros.h \ + test-canonicalize.c macros.h test-chdir.c signature.h macros.h \ + test-cloexec.c macros.h test-close.c signature.h macros.h \ + test-closein.sh test-closein.c connect.c w32sock.h \ + test-connect.c signature.h macros.h test-ctype.c \ test-dirent-safer.c macros.h test-dirent.c test-dirname.c \ - test-dup2.c signature.h macros.h test-environ.c test-errno.c \ - test-fchdir.c signature.h macros.h test-fcntl-h.c test-open.h \ - test-fcntl-safer.c macros.h test-fcntl.c signature.h macros.h \ - test-fdopendir.c signature.h macros.h test-fflush.c \ - test-fflush2.sh test-fflush2.c signature.h macros.h \ - test-fnmatch.c signature.h macros.h test-fopen.h \ + test-dup.c signature.h macros.h test-dup2.c signature.h \ + macros.h test-environ.c test-errno.c test-faccessat.c \ + signature.h macros.h test-fchdir.c signature.h macros.h \ + test-fcntl-h.c test-open.h test-fcntl-safer.c macros.h \ + test-fcntl.c signature.h macros.h fdopen.c test-fdopen.c \ + signature.h macros.h test-fdopendir.c signature.h macros.h \ + test-fflush.c test-fflush2.sh test-fflush2.c signature.h \ + macros.h test-fgetc.c signature.h macros.h test-float.c \ + macros.h test-fnmatch.c signature.h macros.h test-fopen.h \ test-fopen-safer.c macros.h test-fopen.h test-fopen.c \ signature.h macros.h test-fpending.c test-fpending.sh macros.h \ - test-fpurge.c macros.h test-freadahead.c test-freadahead.sh \ - macros.h test-freading.c macros.h test-fseeko.c test-fseeko.sh \ - test-fseeko2.sh signature.h macros.h ftell.c test-ftell.c \ + fpucw.h test-fpurge.c macros.h test-fputc.c signature.h \ + macros.h test-fread.c signature.h macros.h test-freadahead.c \ + test-freadahead.sh macros.h test-freading.c macros.h \ + test-fseek.c test-fseek.sh test-fseek2.sh signature.h macros.h \ + test-fseeko.c test-fseeko.sh test-fseeko2.sh test-fseeko3.c \ + test-fseeko3.sh test-fseeko4.c test-fseeko4.sh signature.h \ + macros.h test-fstat.c signature.h macros.h test-fstatat.c \ + test-lstat.h test-stat.h signature.h macros.h test-ftell.c \ test-ftell.sh test-ftell2.sh test-ftell3.c signature.h \ macros.h test-ftello.c test-ftello.sh test-ftello2.sh \ - test-ftello3.c signature.h macros.h test-getcwd.c signature.h \ - macros.h test-getdelim.c signature.h macros.h \ + test-ftello3.c test-ftello4.c test-ftello4.sh signature.h \ + macros.h ftruncate.c test-ftruncate.c test-ftruncate.sh \ + signature.h macros.h test-fwrite.c signature.h macros.h \ + test-getcwd-lgpl.c signature.h macros.h test-getcwd.c \ + test-getcwd.sh test-getdelim.c signature.h macros.h \ test-getdtablesize.c signature.h macros.h test-getgroups.c \ - signature.h macros.h test-getline.c signature.h macros.h \ - macros.h signature.h test-getopt.c test-getopt.h \ - test-getopt_long.h getpagesize.c signature.h \ - test-gettimeofday.c getugroups.c getugroups.h test-hash.c \ - macros.h test-i-ring.c macros.h test-ignore-value.c anytostr.c \ - inttostr.h macros.h test-inttostr.c test-inttypes.c \ - test-isblank.c signature.h macros.h test-iswblank.c macros.h \ - test-langinfo.c nap.h test-lchown.h test-lchown.c signature.h \ - macros.h test-locale.c localename.h test-localename.c macros.h \ - test-lock.c test-lseek.c test-lseek.sh signature.h macros.h \ - test-lstat.h test-lstat.c signature.h macros.h \ - test-malloc-gnu.c test-malloca.c test-math.c test-mbrtowc1.sh \ - test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ - test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \ + signature.h macros.h signature.h test-gethostname.c \ + test-getline.c signature.h macros.h macros.h signature.h \ + test-getopt.c test-getopt.h test-getopt_long.h getpagesize.c \ + signature.h test-gettimeofday.c test-hash.c macros.h \ + test-i-ring.c macros.h ignore-value.h test-ignore-value.c \ + inet_pton.c test-inet_pton.c signature.h macros.h \ + test-intprops.c macros.h anytostr.c inttostr.h macros.h \ + test-inttostr.c test-inttypes.c ioctl.c w32sock.h test-ioctl.c \ + signature.h macros.h test-isblank.c signature.h macros.h \ + test-isfinite.c infinity.h macros.h test-isinf.c infinity.h \ + macros.h test-isnand-nolibm.c test-isnand.h minus-zero.h \ + infinity.h nan.h macros.h test-isnanf-nolibm.c test-isnanf.h \ + minus-zero.h infinity.h nan.h macros.h test-isnanl-nolibm.c \ + test-isnanl.h minus-zero.h infinity.h nan.h macros.h \ + test-iswblank.c macros.h test-langinfo.c listen.c w32sock.h \ + test-listen.c signature.h macros.h test-locale.c \ + test-localeconv.c signature.h macros.h localename.h \ + test-localename.c macros.h test-lock.c test-lseek.c \ + test-lseek.sh signature.h macros.h test-lstat.h test-lstat.c \ + signature.h macros.h test-malloc-gnu.c test-malloca.c \ + test-math.c macros.h test-mbrtowc1.sh test-mbrtowc2.sh \ + test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc.c \ + test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \ test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \ test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h \ test-mbscasestr1.c test-mbscasestr2.sh test-mbscasestr2.c \ @@ -2188,56 +2912,76 @@ EXTRA_DIST = test-alloca-opt.c test-areadlink.h test-areadlink.c \ signature.h macros.h test-mbsstr1.c test-mbsstr2.sh \ test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c macros.h \ test-memchr.c zerosize-ptr.h signature.h macros.h \ - test-memrchr.c zerosize-ptr.h signature.h macros.h \ - mgetgroups.c mgetgroups.h test-mkdir.h test-mkdir.c \ - signature.h macros.h test-modf.c signature.h macros.h \ - test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h \ - test-open.h test-open.c signature.h macros.h \ - test-openat-safer.c macros.h nap.h test-chown.h test-lchown.h \ - test-lstat.h test-mkdir.h test-rmdir.h test-stat.h \ - test-unlink.h test-fchownat.c test-fstatat.c test-mkdirat.c \ - test-openat.c test-unlinkat.c signature.h macros.h \ - test-parse-datetime.c macros.h signature.h test-perror.c \ - test-perror.sh priv-set.h test-priv-set.c macros.h putenv.c \ - test-quotearg-simple.c test-quotearg.h macros.h \ - test-readlink.h test-readlink.c signature.h macros.h \ - test-readlink.h test-readlinkat.c signature.h macros.h \ - test-realloc-gnu.c test-rmdir.h test-rmdir.c signature.h \ - macros.h test-setenv.c signature.h macros.h setlocale.c \ - test-setlocale1.sh test-setlocale1.c test-setlocale2.sh \ - test-setlocale2.c signature.h macros.h sleep.c test-sleep.c \ - signature.h macros.h test-snprintf.c signature.h macros.h \ + test-memrchr.c zerosize-ptr.h signature.h macros.h test-modf.c \ + test-modf.h signature.h macros.h randomd.c nanosleep.c \ + test-nanosleep.c signature.h macros.h netinet_in.in.h \ + test-netinet_in.c test-nl_langinfo.sh test-nl_langinfo.c \ + signature.h macros.h test-open.h test-open.c signature.h \ + macros.h test-openat-safer.c macros.h test-openat.c \ + test-open.h signature.h macros.h test-parse-datetime.c \ + macros.h test-pathmax.c macros.h signature.h test-perror.c \ + test-perror2.c test-perror.sh pipe.c test-pipe.c signature.h \ + macros.h priv-set.h test-priv-set.c macros.h putenv.c \ + test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h \ + raise.c test-raise.c signature.h macros.h test-read.c \ + signature.h macros.h test-readlink.h test-readlink.c \ + signature.h macros.h test-readlink.h test-readlinkat.c \ + signature.h macros.h test-realloc-gnu.c test-regex.c macros.h \ + test-rmdir.h test-rmdir.c signature.h macros.h select.c \ + macros.h signature.h test-select.c test-select.h \ + test-select-fd.c test-select-in.sh test-select-out.sh \ + test-select-stdin.c test-setenv.c signature.h macros.h \ + setlocale.c test-setlocale1.sh test-setlocale1.c \ + test-setlocale2.sh test-setlocale2.c signature.h macros.h \ + setsockopt.c w32sock.h test-setsockopt.c signature.h macros.h \ + sig-handler.h sigaction.c test-sigaction.c signature.h \ + macros.h signal.in.h test-signal-h.c sigprocmask.c \ + test-sigprocmask.c signature.h macros.h sleep.c test-sleep.c \ + signature.h macros.h \ + $(top_srcdir)/build-aux/snippet/_Noreturn.h \ + $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ + $(top_srcdir)/build-aux/snippet/c++defs.h \ + $(top_srcdir)/build-aux/snippet/unused-parameter.h \ + $(top_srcdir)/build-aux/snippet/warn-on-use.h test-snprintf.c \ + signature.h macros.h socket.c w32sock.h test-sockets.c \ test-stat.h test-stat.c signature.h macros.h test-stat-time.c \ - macros.h test-stdbool.c test-stddef.c test-stdint.c \ - test-stdio.c test-stdlib.c test-sys_wait.h test-strcasestr.c \ - signature.h macros.h test-strerror.c signature.h macros.h \ - test-strftime.c macros.h test-string.c test-strings.c \ - test-strnlen.c zerosize-ptr.h signature.h macros.h \ - test-strstr.c zerosize-ptr.h signature.h macros.h symlink.c \ - test-symlink.h test-symlink.c signature.h macros.h symlinkat.c \ - test-symlink.h test-symlinkat.c signature.h macros.h \ - test-sys_stat.c test-sys_time.c test-sys_wait.c \ - test-sys_wait.h $(top_srcdir)/build-aux/config.rpath \ - test-time.c test-dup-safer.c macros.h test-unistd.c \ + macros.h nap.h test-statat.c test-stdalign.c macros.h \ + test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \ + test-stdlib.c test-sys_wait.h test-strcasestr.c signature.h \ + macros.h test-strerror.c signature.h macros.h \ + test-strerror_r.c signature.h macros.h test-strftime.c \ + macros.h test-string.c test-strings.c test-strnlen.c \ + zerosize-ptr.h signature.h macros.h test-strstr.c \ + zerosize-ptr.h signature.h macros.h test-strtol.c signature.h \ + macros.h test-strtoul.c signature.h macros.h test-strtoull.c \ + signature.h macros.h test-strtoumax.c signature.h macros.h \ + symlink.c test-symlink.h test-symlink.c signature.h macros.h \ + at-func.c symlinkat.c test-symlink.h test-symlinkat.c \ + signature.h macros.h sys_ioctl.in.h test-sys_ioctl.c \ + sys_select.in.h test-sys_select.c signature.h \ + test-sys_socket.c test-sys_stat.c test-sys_time.c \ + test-sys_types.c test-sys_uio.c test-sys_utsname.c \ + test-sys_wait.c test-sys_wait.h init.sh test-init.sh \ + test-thread_self.c test-thread_create.c macros.h test-time.c \ + test-trunc1.c test-trunc2.c minus-zero.h infinity.h nan.h \ + signature.h macros.h test-uname.c signature.h macros.h \ + test-dup-safer.c macros.h test-unistd.c \ uniwidth/test-uc_width.c uniwidth/test-uc_width2.c \ uniwidth/test-uc_width2.sh macros.h test-unlink.h \ - test-unlink.c signature.h macros.h unlinkdir.c unlinkdir.h \ - test-unsetenv.c signature.h macros.h \ - $(top_srcdir)/build-aux/unused-parameter.h \ - test-update-copyright.sh usleep.c test-usleep.c signature.h \ - macros.h test-vasnprintf.c macros.h test-vc-list-files-git.sh \ - test-vc-list-files-cvs.sh init.sh test-verify.c test-verify.sh \ - init.sh test-version-etc.c test-version-etc.sh \ - $(top_srcdir)/build-aux/warn-on-use.h test-wchar.c \ + test-unlink.c signature.h macros.h test-unlinkat.c \ + test-rmdir.h test-unlink.h signature.h macros.h unlinkdir.h \ + test-unsetenv.c signature.h macros.h test-update-copyright.sh \ + test-vasnprintf.c macros.h test-vc-list-files-git.sh \ + test-vc-list-files-cvs.sh test-verify.c test-verify.sh \ + test-version-etc.c test-version-etc.sh test-wchar.c \ test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh \ test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh \ test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32.c \ signature.h macros.h wctob.c wctomb-impl.h wctomb.c \ test-wctype-h.c macros.h test-wcwidth.c signature.h macros.h \ - test-xalloc-die.c test-xalloc-die.sh init.sh init.sh \ - test-xstrtol.c test-xstrtoul.c test-xstrtol.sh init.sh \ - test-xstrtoumax.c test-xstrtoumax.sh test-yesno.c \ - test-yesno.sh + test-xalloc-die.c test-xalloc-die.sh test-xstrtol.c \ + test-xstrtoul.c test-xstrtol.sh test-xstrtoumax.c \ + test-xstrtoumax.sh test-yesno.c test-yesno.sh # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be @@ -2253,15 +2997,18 @@ EXTRA_DIST = test-alloca-opt.c test-areadlink.h test-areadlink.c \ # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. -BUILT_SOURCES = arg-nonnull.h c++defs.h unused-parameter.h \ - warn-on-use.h +BUILT_SOURCES = arpa/inet.h $(NETINET_IN_H) signal.h arg-nonnull.h \ + c++defs.h unused-parameter.h warn-on-use.h sys/ioctl.h \ + sys/select.h SUFFIXES = -MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ - c++defs.h c++defs.h-t test-fflush.txt test-fpending.t \ - t-fpurge.tmp t-freading.tmp t-ftell3.tmp t-ftello3.tmp \ - test-getdelim.txt test-getline.txt unused-parameter.h \ - unused-parameter.h-t warn-on-use.h warn-on-use.h-t -MOSTLYCLEANDIRS = +MOSTLYCLEANFILES = core *.stackdump arpa/inet.h arpa/inet.h-t \ + test-fflush.txt test-fpending.t t-fpurge.tmp t-freading.tmp \ + t-ftell3.tmp t-ftello3.tmp test-getdelim.txt test-getline.txt \ + netinet/in.h netinet/in.h-t signal.h signal.h-t arg-nonnull.h \ + arg-nonnull.h-t c++defs.h c++defs.h-t unused-parameter.h \ + unused-parameter.h-t warn-on-use.h warn-on-use.h-t sys/ioctl.h \ + sys/ioctl.h-t sys/select.h sys/select.h-t +MOSTLYCLEANDIRS = arpa netinet sys sys CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = @@ -2269,55 +3016,85 @@ AM_CPPFLAGS = \ -D@gltests_WITNESS@=1 \ -I. -I$(srcdir) \ -I.. -I$(srcdir)/.. \ - -I../gnulib/lib -I$(srcdir)/../gnulib/lib - -LDADD = libtests.a ../gnulib/lib/libgnulib.a libtests.a $(LIBTESTS_LIBDEPS) -libtests_a_SOURCES = binary-io.h fd-safer-flag.c dup-safer-flag.c \ - ignore-value.h imaxtostr.c inttostr.c offtostr.c uinttostr.c \ - umaxtostr.c localename.c glthread/lock.h glthread/lock.c \ - priv-set.c glthread/thread.h glthread/thread.c \ - glthread/threadlib.c glthread/yield.h + -I../gl/lib -I$(srcdir)/../gl/lib + +LDADD = libtests.a ../gl/lib/libgnulib.a libtests.a $(LIBTESTS_LIBDEPS) +libtests_a_SOURCES = binary-io.h binary-io.c fd-safer-flag.c \ + dup-safer-flag.c imaxtostr.c inttostr.c offtostr.c uinttostr.c \ + umaxtostr.c localename.c priv-set.c sig-handler.c \ + glthread/thread.h glthread/thread.c unlinkdir.c \ + glthread/yield.h libtests_a_LIBADD = $(gltests_LIBOBJS) libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) -EXTRA_libtests_a_SOURCES = ftell.c getpagesize.c getugroups.c \ - anytostr.c mgetgroups.c putenv.c setlocale.c sleep.c symlink.c \ - symlinkat.c unlinkdir.c usleep.c wctob.c wctomb.c +EXTRA_libtests_a_SOURCES = accept.c bind.c connect.c fdopen.c \ + ftruncate.c getpagesize.c inet_pton.c anytostr.c ioctl.c \ + listen.c nanosleep.c pipe.c putenv.c raise.c select.c \ + setlocale.c setsockopt.c sigaction.c sigprocmask.c sleep.c \ + socket.c symlink.c at-func.c symlinkat.c wctob.c wctomb.c AM_LIBTOOLFLAGS = --preserve-dup-deps +test_accept_LDADD = $(LDADD) @LIBSOCKET@ test_areadlinkat_LDADD = $(LDADD) @LIBINTL@ -ARG_NONNULL_H = arg-nonnull.h test_argmatch_LDADD = $(LDADD) @LIBINTL@ -CXXDEFS_H = c++defs.h +test_bind_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) test_canonicalize_LDADD = $(LDADD) @LIBINTL@ -test_chown_LDADD = $(LDADD) @LIBINTL@ test_closein_LDADD = $(LDADD) @LIBINTL@ +test_connect_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB) # Link with libintl when needed. dirent-safer uses fdopendir if it is present, -# and fdopendir indirectly depends on xgetcwd -> xalloc-die -> gettext-h. +# and fdopendir indirectly depends on openat-die -> gettext-h. test_dirent_safer_LDADD = $(LDADD) $(LIBINTL) test_dirname_LDADD = $(LDADD) @LIBINTL@ +test_faccessat_LDADD = $(LDADD) $(LIB_EACCESS) @LIBINTL@ +test_fchdir_LDADD = $(LDADD) $(LIBINTL) test_fdopendir_LDADD = $(LDADD) @LIBINTL@ +test_fstatat_LDADD = $(LDADD) @LIBINTL@ +test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL) +test_getcwd_LDADD = $(LDADD) @LIBINTL@ +test_gethostname_LDADD = $(LDADD) @GETHOSTNAME_LIB@ test_getopt_LDADD = $(LDADD) $(LIBINTL) -test_hash_LDADD = $(LDADD) @LIBINTL@ -test_lchown_LDADD = $(LDADD) @LIBINTL@ -test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ +test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@ +test_isfinite_LDADD = $(LDADD) @ISFINITE_LIBM@ +test_isinf_LDADD = $(LDADD) @ISINF_LIBM@ +test_listen_LDADD = $(LDADD) @LIBSOCKET@ +test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD) test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ +test_modf_SOURCES = test-modf.c randomd.c test_modf_LDADD = $(LDADD) @MODF_LIBM@ +test_nanosleep_LDADD = $(LDADD) $(LIB_NANOSLEEP) test_openat_safer_LDADD = $(LDADD) @LIBINTL@ -test_fchownat_LDADD = $(LDADD) @LIBINTL@ -test_fstatat_LDADD = $(LDADD) @LIBINTL@ -test_mkdirat_LDADD = $(LDADD) @LIBINTL@ test_openat_LDADD = $(LDADD) @LIBINTL@ -test_unlinkat_LDADD = $(LDADD) @LIBINTL@ test_parse_datetime_LDADD = $(LDADD) @LIBINTL@ $(LIB_CLOCK_GETTIME) test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ test_readlinkat_LDADD = $(LDADD) @LIBINTL@ +test_regex_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) $(LIB_PTHREAD) +test_select_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ $(INET_PTON_LIB) +test_select_fd_LDADD = $(LDADD) @LIB_SELECT@ +test_select_stdin_LDADD = $(LDADD) @LIB_SELECT@ +test_setsockopt_LDADD = $(LDADD) @LIBSOCKET@ + +# Because this Makefile snippet defines a variable used by other +# gnulib Makefile snippets, it must be present in all Makefile.am that +# need it. This is ensured by the applicability 'all' defined above. +_NORETURN_H = $(top_srcdir)/build-aux/snippet/_Noreturn.h +ARG_NONNULL_H = arg-nonnull.h +CXXDEFS_H = c++defs.h +UNUSED_PARAMETER_H = unused-parameter.h +WARN_ON_USE_H = warn-on-use.h +test_sockets_LDADD = $(LDADD) @LIBSOCKET@ +test_stat_LDADD = $(LDADD) $(LIBINTL) +test_stat_time_LDADD = $(LDADD) $(LIB_NANOSLEEP) +test_statat_LDADD = $(LDADD) @LIBINTL@ test_symlinkat_LDADD = $(LDADD) @LIBINTL@ +test_thread_self_LDADD = $(LDADD) @LIBTHREAD@ +test_thread_create_LDADD = $(LDADD) @LIBMULTITHREAD@ +test_trunc1_LDADD = $(LDADD) @TRUNC_LIBM@ +test_trunc2_LDADD = $(LDADD) @TRUNC_LIBM@ +test_uname_LDADD = $(LDADD) @GETHOSTNAME_LIB@ test_uc_width_SOURCES = uniwidth/test-uc_width.c test_uc_width_LDADD = $(LDADD) $(LIBUNISTRING) test_uc_width2_SOURCES = uniwidth/test-uc_width2.c test_uc_width2_LDADD = $(LDADD) $(LIBUNISTRING) -UNUSED_PARAMETER_H = unused-parameter.h +test_unlinkat_LDADD = $(LDADD) @LIBINTL@ test_version_etc_LDADD = $(LDADD) @LIBINTL@ -WARN_ON_USE_H = warn-on-use.h test_xalloc_die_LDADD = $(LDADD) @LIBINTL@ test_xstrtol_LDADD = $(LDADD) @LIBINTL@ test_xstrtoul_LDADD = $(LDADD) @LIBINTL@ @@ -2370,13 +3147,9 @@ glthread/$(am__dirstamp): glthread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) glthread/$(DEPDIR) @: > glthread/$(DEPDIR)/$(am__dirstamp) -glthread/lock.$(OBJEXT): glthread/$(am__dirstamp) \ - glthread/$(DEPDIR)/$(am__dirstamp) glthread/thread.$(OBJEXT): glthread/$(am__dirstamp) \ glthread/$(DEPDIR)/$(am__dirstamp) -glthread/threadlib.$(OBJEXT): glthread/$(am__dirstamp) \ - glthread/$(DEPDIR)/$(am__dirstamp) -libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) +libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) -rm -f libtests.a $(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) $(RANLIB) libtests.a @@ -2386,375 +3159,558 @@ clean-checkPROGRAMS: clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) -test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) +test-accept$(EXEEXT): $(test_accept_OBJECTS) $(test_accept_DEPENDENCIES) $(EXTRA_test_accept_DEPENDENCIES) + @rm -f test-accept$(EXEEXT) + $(LINK) $(test_accept_OBJECTS) $(test_accept_LDADD) $(LIBS) +test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) $(EXTRA_test_alloca_opt_DEPENDENCIES) @rm -f test-alloca-opt$(EXEEXT) $(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_LDADD) $(LIBS) -test-areadlink$(EXEEXT): $(test_areadlink_OBJECTS) $(test_areadlink_DEPENDENCIES) +test-areadlink$(EXEEXT): $(test_areadlink_OBJECTS) $(test_areadlink_DEPENDENCIES) $(EXTRA_test_areadlink_DEPENDENCIES) @rm -f test-areadlink$(EXEEXT) $(LINK) $(test_areadlink_OBJECTS) $(test_areadlink_LDADD) $(LIBS) -test-areadlink-with-size$(EXEEXT): $(test_areadlink_with_size_OBJECTS) $(test_areadlink_with_size_DEPENDENCIES) +test-areadlink-with-size$(EXEEXT): $(test_areadlink_with_size_OBJECTS) $(test_areadlink_with_size_DEPENDENCIES) $(EXTRA_test_areadlink_with_size_DEPENDENCIES) @rm -f test-areadlink-with-size$(EXEEXT) $(LINK) $(test_areadlink_with_size_OBJECTS) $(test_areadlink_with_size_LDADD) $(LIBS) -test-areadlinkat$(EXEEXT): $(test_areadlinkat_OBJECTS) $(test_areadlinkat_DEPENDENCIES) +test-areadlinkat$(EXEEXT): $(test_areadlinkat_OBJECTS) $(test_areadlinkat_DEPENDENCIES) $(EXTRA_test_areadlinkat_DEPENDENCIES) @rm -f test-areadlinkat$(EXEEXT) $(LINK) $(test_areadlinkat_OBJECTS) $(test_areadlinkat_LDADD) $(LIBS) -test-argmatch$(EXEEXT): $(test_argmatch_OBJECTS) $(test_argmatch_DEPENDENCIES) +test-argmatch$(EXEEXT): $(test_argmatch_OBJECTS) $(test_argmatch_DEPENDENCIES) $(EXTRA_test_argmatch_DEPENDENCIES) @rm -f test-argmatch$(EXEEXT) $(LINK) $(test_argmatch_OBJECTS) $(test_argmatch_LDADD) $(LIBS) -test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) +test-arpa_inet$(EXEEXT): $(test_arpa_inet_OBJECTS) $(test_arpa_inet_DEPENDENCIES) $(EXTRA_test_arpa_inet_DEPENDENCIES) + @rm -f test-arpa_inet$(EXEEXT) + $(LINK) $(test_arpa_inet_OBJECTS) $(test_arpa_inet_LDADD) $(LIBS) +test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) $(EXTRA_test_binary_io_DEPENDENCIES) @rm -f test-binary-io$(EXEEXT) $(LINK) $(test_binary_io_OBJECTS) $(test_binary_io_LDADD) $(LIBS) -test-bitrotate$(EXEEXT): $(test_bitrotate_OBJECTS) $(test_bitrotate_DEPENDENCIES) +test-bind$(EXEEXT): $(test_bind_OBJECTS) $(test_bind_DEPENDENCIES) $(EXTRA_test_bind_DEPENDENCIES) + @rm -f test-bind$(EXEEXT) + $(LINK) $(test_bind_OBJECTS) $(test_bind_LDADD) $(LIBS) +test-bitrotate$(EXEEXT): $(test_bitrotate_OBJECTS) $(test_bitrotate_DEPENDENCIES) $(EXTRA_test_bitrotate_DEPENDENCIES) @rm -f test-bitrotate$(EXEEXT) $(LINK) $(test_bitrotate_OBJECTS) $(test_bitrotate_LDADD) $(LIBS) -test-btowc$(EXEEXT): $(test_btowc_OBJECTS) $(test_btowc_DEPENDENCIES) +test-btowc$(EXEEXT): $(test_btowc_OBJECTS) $(test_btowc_DEPENDENCIES) $(EXTRA_test_btowc_DEPENDENCIES) @rm -f test-btowc$(EXEEXT) $(LINK) $(test_btowc_OBJECTS) $(test_btowc_LDADD) $(LIBS) -test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES) +test-byteswap$(EXEEXT): $(test_byteswap_OBJECTS) $(test_byteswap_DEPENDENCIES) $(EXTRA_test_byteswap_DEPENDENCIES) + @rm -f test-byteswap$(EXEEXT) + $(LINK) $(test_byteswap_OBJECTS) $(test_byteswap_LDADD) $(LIBS) +test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES) $(EXTRA_test_c_ctype_DEPENDENCIES) @rm -f test-c-ctype$(EXEEXT) $(LINK) $(test_c_ctype_OBJECTS) $(test_c_ctype_LDADD) $(LIBS) -test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEPENDENCIES) +test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEPENDENCIES) $(EXTRA_test_c_strcasecmp_DEPENDENCIES) @rm -f test-c-strcasecmp$(EXEEXT) $(LINK) $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_LDADD) $(LIBS) -test-c-strcasestr$(EXEEXT): $(test_c_strcasestr_OBJECTS) $(test_c_strcasestr_DEPENDENCIES) +test-c-strcasestr$(EXEEXT): $(test_c_strcasestr_OBJECTS) $(test_c_strcasestr_DEPENDENCIES) $(EXTRA_test_c_strcasestr_DEPENDENCIES) @rm -f test-c-strcasestr$(EXEEXT) $(LINK) $(test_c_strcasestr_OBJECTS) $(test_c_strcasestr_LDADD) $(LIBS) -test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_DEPENDENCIES) +test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_DEPENDENCIES) $(EXTRA_test_c_strncasecmp_DEPENDENCIES) @rm -f test-c-strncasecmp$(EXEEXT) $(LINK) $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_LDADD) $(LIBS) -test-c-strstr$(EXEEXT): $(test_c_strstr_OBJECTS) $(test_c_strstr_DEPENDENCIES) +test-c-strstr$(EXEEXT): $(test_c_strstr_OBJECTS) $(test_c_strstr_DEPENDENCIES) $(EXTRA_test_c_strstr_DEPENDENCIES) @rm -f test-c-strstr$(EXEEXT) $(LINK) $(test_c_strstr_OBJECTS) $(test_c_strstr_LDADD) $(LIBS) -test-canonicalize$(EXEEXT): $(test_canonicalize_OBJECTS) $(test_canonicalize_DEPENDENCIES) +test-canonicalize$(EXEEXT): $(test_canonicalize_OBJECTS) $(test_canonicalize_DEPENDENCIES) $(EXTRA_test_canonicalize_DEPENDENCIES) @rm -f test-canonicalize$(EXEEXT) $(LINK) $(test_canonicalize_OBJECTS) $(test_canonicalize_LDADD) $(LIBS) -test-chown$(EXEEXT): $(test_chown_OBJECTS) $(test_chown_DEPENDENCIES) - @rm -f test-chown$(EXEEXT) - $(LINK) $(test_chown_OBJECTS) $(test_chown_LDADD) $(LIBS) -test-cloexec$(EXEEXT): $(test_cloexec_OBJECTS) $(test_cloexec_DEPENDENCIES) +test-chdir$(EXEEXT): $(test_chdir_OBJECTS) $(test_chdir_DEPENDENCIES) $(EXTRA_test_chdir_DEPENDENCIES) + @rm -f test-chdir$(EXEEXT) + $(LINK) $(test_chdir_OBJECTS) $(test_chdir_LDADD) $(LIBS) +test-cloexec$(EXEEXT): $(test_cloexec_OBJECTS) $(test_cloexec_DEPENDENCIES) $(EXTRA_test_cloexec_DEPENDENCIES) @rm -f test-cloexec$(EXEEXT) $(LINK) $(test_cloexec_OBJECTS) $(test_cloexec_LDADD) $(LIBS) -test-closein$(EXEEXT): $(test_closein_OBJECTS) $(test_closein_DEPENDENCIES) +test-close$(EXEEXT): $(test_close_OBJECTS) $(test_close_DEPENDENCIES) $(EXTRA_test_close_DEPENDENCIES) + @rm -f test-close$(EXEEXT) + $(LINK) $(test_close_OBJECTS) $(test_close_LDADD) $(LIBS) +test-closein$(EXEEXT): $(test_closein_OBJECTS) $(test_closein_DEPENDENCIES) $(EXTRA_test_closein_DEPENDENCIES) @rm -f test-closein$(EXEEXT) $(LINK) $(test_closein_OBJECTS) $(test_closein_LDADD) $(LIBS) -test-ctype$(EXEEXT): $(test_ctype_OBJECTS) $(test_ctype_DEPENDENCIES) +test-connect$(EXEEXT): $(test_connect_OBJECTS) $(test_connect_DEPENDENCIES) $(EXTRA_test_connect_DEPENDENCIES) + @rm -f test-connect$(EXEEXT) + $(LINK) $(test_connect_OBJECTS) $(test_connect_LDADD) $(LIBS) +test-ctype$(EXEEXT): $(test_ctype_OBJECTS) $(test_ctype_DEPENDENCIES) $(EXTRA_test_ctype_DEPENDENCIES) @rm -f test-ctype$(EXEEXT) $(LINK) $(test_ctype_OBJECTS) $(test_ctype_LDADD) $(LIBS) -test-dirent$(EXEEXT): $(test_dirent_OBJECTS) $(test_dirent_DEPENDENCIES) +test-dirent$(EXEEXT): $(test_dirent_OBJECTS) $(test_dirent_DEPENDENCIES) $(EXTRA_test_dirent_DEPENDENCIES) @rm -f test-dirent$(EXEEXT) $(LINK) $(test_dirent_OBJECTS) $(test_dirent_LDADD) $(LIBS) -test-dirent-safer$(EXEEXT): $(test_dirent_safer_OBJECTS) $(test_dirent_safer_DEPENDENCIES) +test-dirent-safer$(EXEEXT): $(test_dirent_safer_OBJECTS) $(test_dirent_safer_DEPENDENCIES) $(EXTRA_test_dirent_safer_DEPENDENCIES) @rm -f test-dirent-safer$(EXEEXT) $(LINK) $(test_dirent_safer_OBJECTS) $(test_dirent_safer_LDADD) $(LIBS) -test-dirname$(EXEEXT): $(test_dirname_OBJECTS) $(test_dirname_DEPENDENCIES) +test-dirname$(EXEEXT): $(test_dirname_OBJECTS) $(test_dirname_DEPENDENCIES) $(EXTRA_test_dirname_DEPENDENCIES) @rm -f test-dirname$(EXEEXT) $(LINK) $(test_dirname_OBJECTS) $(test_dirname_LDADD) $(LIBS) -test-dup-safer$(EXEEXT): $(test_dup_safer_OBJECTS) $(test_dup_safer_DEPENDENCIES) +test-dup$(EXEEXT): $(test_dup_OBJECTS) $(test_dup_DEPENDENCIES) $(EXTRA_test_dup_DEPENDENCIES) + @rm -f test-dup$(EXEEXT) + $(LINK) $(test_dup_OBJECTS) $(test_dup_LDADD) $(LIBS) +test-dup-safer$(EXEEXT): $(test_dup_safer_OBJECTS) $(test_dup_safer_DEPENDENCIES) $(EXTRA_test_dup_safer_DEPENDENCIES) @rm -f test-dup-safer$(EXEEXT) $(LINK) $(test_dup_safer_OBJECTS) $(test_dup_safer_LDADD) $(LIBS) -test-dup2$(EXEEXT): $(test_dup2_OBJECTS) $(test_dup2_DEPENDENCIES) +test-dup2$(EXEEXT): $(test_dup2_OBJECTS) $(test_dup2_DEPENDENCIES) $(EXTRA_test_dup2_DEPENDENCIES) @rm -f test-dup2$(EXEEXT) $(LINK) $(test_dup2_OBJECTS) $(test_dup2_LDADD) $(LIBS) -test-environ$(EXEEXT): $(test_environ_OBJECTS) $(test_environ_DEPENDENCIES) +test-environ$(EXEEXT): $(test_environ_OBJECTS) $(test_environ_DEPENDENCIES) $(EXTRA_test_environ_DEPENDENCIES) @rm -f test-environ$(EXEEXT) $(LINK) $(test_environ_OBJECTS) $(test_environ_LDADD) $(LIBS) -test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES) +test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES) $(EXTRA_test_errno_DEPENDENCIES) @rm -f test-errno$(EXEEXT) $(LINK) $(test_errno_OBJECTS) $(test_errno_LDADD) $(LIBS) -test-fchdir$(EXEEXT): $(test_fchdir_OBJECTS) $(test_fchdir_DEPENDENCIES) +test-faccessat$(EXEEXT): $(test_faccessat_OBJECTS) $(test_faccessat_DEPENDENCIES) $(EXTRA_test_faccessat_DEPENDENCIES) + @rm -f test-faccessat$(EXEEXT) + $(LINK) $(test_faccessat_OBJECTS) $(test_faccessat_LDADD) $(LIBS) +test-fchdir$(EXEEXT): $(test_fchdir_OBJECTS) $(test_fchdir_DEPENDENCIES) $(EXTRA_test_fchdir_DEPENDENCIES) @rm -f test-fchdir$(EXEEXT) $(LINK) $(test_fchdir_OBJECTS) $(test_fchdir_LDADD) $(LIBS) -test-fchownat$(EXEEXT): $(test_fchownat_OBJECTS) $(test_fchownat_DEPENDENCIES) - @rm -f test-fchownat$(EXEEXT) - $(LINK) $(test_fchownat_OBJECTS) $(test_fchownat_LDADD) $(LIBS) -test-fcntl$(EXEEXT): $(test_fcntl_OBJECTS) $(test_fcntl_DEPENDENCIES) +test-fcntl$(EXEEXT): $(test_fcntl_OBJECTS) $(test_fcntl_DEPENDENCIES) $(EXTRA_test_fcntl_DEPENDENCIES) @rm -f test-fcntl$(EXEEXT) $(LINK) $(test_fcntl_OBJECTS) $(test_fcntl_LDADD) $(LIBS) -test-fcntl-h$(EXEEXT): $(test_fcntl_h_OBJECTS) $(test_fcntl_h_DEPENDENCIES) +test-fcntl-h$(EXEEXT): $(test_fcntl_h_OBJECTS) $(test_fcntl_h_DEPENDENCIES) $(EXTRA_test_fcntl_h_DEPENDENCIES) @rm -f test-fcntl-h$(EXEEXT) $(LINK) $(test_fcntl_h_OBJECTS) $(test_fcntl_h_LDADD) $(LIBS) -test-fcntl-safer$(EXEEXT): $(test_fcntl_safer_OBJECTS) $(test_fcntl_safer_DEPENDENCIES) +test-fcntl-safer$(EXEEXT): $(test_fcntl_safer_OBJECTS) $(test_fcntl_safer_DEPENDENCIES) $(EXTRA_test_fcntl_safer_DEPENDENCIES) @rm -f test-fcntl-safer$(EXEEXT) $(LINK) $(test_fcntl_safer_OBJECTS) $(test_fcntl_safer_LDADD) $(LIBS) -test-fdopendir$(EXEEXT): $(test_fdopendir_OBJECTS) $(test_fdopendir_DEPENDENCIES) +test-fdopen$(EXEEXT): $(test_fdopen_OBJECTS) $(test_fdopen_DEPENDENCIES) $(EXTRA_test_fdopen_DEPENDENCIES) + @rm -f test-fdopen$(EXEEXT) + $(LINK) $(test_fdopen_OBJECTS) $(test_fdopen_LDADD) $(LIBS) +test-fdopendir$(EXEEXT): $(test_fdopendir_OBJECTS) $(test_fdopendir_DEPENDENCIES) $(EXTRA_test_fdopendir_DEPENDENCIES) @rm -f test-fdopendir$(EXEEXT) $(LINK) $(test_fdopendir_OBJECTS) $(test_fdopendir_LDADD) $(LIBS) -test-fflush$(EXEEXT): $(test_fflush_OBJECTS) $(test_fflush_DEPENDENCIES) +test-fflush$(EXEEXT): $(test_fflush_OBJECTS) $(test_fflush_DEPENDENCIES) $(EXTRA_test_fflush_DEPENDENCIES) @rm -f test-fflush$(EXEEXT) $(LINK) $(test_fflush_OBJECTS) $(test_fflush_LDADD) $(LIBS) -test-fflush2$(EXEEXT): $(test_fflush2_OBJECTS) $(test_fflush2_DEPENDENCIES) +test-fflush2$(EXEEXT): $(test_fflush2_OBJECTS) $(test_fflush2_DEPENDENCIES) $(EXTRA_test_fflush2_DEPENDENCIES) @rm -f test-fflush2$(EXEEXT) $(LINK) $(test_fflush2_OBJECTS) $(test_fflush2_LDADD) $(LIBS) -test-fnmatch$(EXEEXT): $(test_fnmatch_OBJECTS) $(test_fnmatch_DEPENDENCIES) +test-fgetc$(EXEEXT): $(test_fgetc_OBJECTS) $(test_fgetc_DEPENDENCIES) $(EXTRA_test_fgetc_DEPENDENCIES) + @rm -f test-fgetc$(EXEEXT) + $(LINK) $(test_fgetc_OBJECTS) $(test_fgetc_LDADD) $(LIBS) +test-float$(EXEEXT): $(test_float_OBJECTS) $(test_float_DEPENDENCIES) $(EXTRA_test_float_DEPENDENCIES) + @rm -f test-float$(EXEEXT) + $(LINK) $(test_float_OBJECTS) $(test_float_LDADD) $(LIBS) +test-fnmatch$(EXEEXT): $(test_fnmatch_OBJECTS) $(test_fnmatch_DEPENDENCIES) $(EXTRA_test_fnmatch_DEPENDENCIES) @rm -f test-fnmatch$(EXEEXT) $(LINK) $(test_fnmatch_OBJECTS) $(test_fnmatch_LDADD) $(LIBS) -test-fopen$(EXEEXT): $(test_fopen_OBJECTS) $(test_fopen_DEPENDENCIES) +test-fopen$(EXEEXT): $(test_fopen_OBJECTS) $(test_fopen_DEPENDENCIES) $(EXTRA_test_fopen_DEPENDENCIES) @rm -f test-fopen$(EXEEXT) $(LINK) $(test_fopen_OBJECTS) $(test_fopen_LDADD) $(LIBS) -test-fopen-safer$(EXEEXT): $(test_fopen_safer_OBJECTS) $(test_fopen_safer_DEPENDENCIES) +test-fopen-safer$(EXEEXT): $(test_fopen_safer_OBJECTS) $(test_fopen_safer_DEPENDENCIES) $(EXTRA_test_fopen_safer_DEPENDENCIES) @rm -f test-fopen-safer$(EXEEXT) $(LINK) $(test_fopen_safer_OBJECTS) $(test_fopen_safer_LDADD) $(LIBS) -test-fpending$(EXEEXT): $(test_fpending_OBJECTS) $(test_fpending_DEPENDENCIES) +test-fpending$(EXEEXT): $(test_fpending_OBJECTS) $(test_fpending_DEPENDENCIES) $(EXTRA_test_fpending_DEPENDENCIES) @rm -f test-fpending$(EXEEXT) $(LINK) $(test_fpending_OBJECTS) $(test_fpending_LDADD) $(LIBS) -test-fpurge$(EXEEXT): $(test_fpurge_OBJECTS) $(test_fpurge_DEPENDENCIES) +test-fpurge$(EXEEXT): $(test_fpurge_OBJECTS) $(test_fpurge_DEPENDENCIES) $(EXTRA_test_fpurge_DEPENDENCIES) @rm -f test-fpurge$(EXEEXT) $(LINK) $(test_fpurge_OBJECTS) $(test_fpurge_LDADD) $(LIBS) -test-freadahead$(EXEEXT): $(test_freadahead_OBJECTS) $(test_freadahead_DEPENDENCIES) +test-fputc$(EXEEXT): $(test_fputc_OBJECTS) $(test_fputc_DEPENDENCIES) $(EXTRA_test_fputc_DEPENDENCIES) + @rm -f test-fputc$(EXEEXT) + $(LINK) $(test_fputc_OBJECTS) $(test_fputc_LDADD) $(LIBS) +test-fread$(EXEEXT): $(test_fread_OBJECTS) $(test_fread_DEPENDENCIES) $(EXTRA_test_fread_DEPENDENCIES) + @rm -f test-fread$(EXEEXT) + $(LINK) $(test_fread_OBJECTS) $(test_fread_LDADD) $(LIBS) +test-freadahead$(EXEEXT): $(test_freadahead_OBJECTS) $(test_freadahead_DEPENDENCIES) $(EXTRA_test_freadahead_DEPENDENCIES) @rm -f test-freadahead$(EXEEXT) $(LINK) $(test_freadahead_OBJECTS) $(test_freadahead_LDADD) $(LIBS) -test-freading$(EXEEXT): $(test_freading_OBJECTS) $(test_freading_DEPENDENCIES) +test-freading$(EXEEXT): $(test_freading_OBJECTS) $(test_freading_DEPENDENCIES) $(EXTRA_test_freading_DEPENDENCIES) @rm -f test-freading$(EXEEXT) $(LINK) $(test_freading_OBJECTS) $(test_freading_LDADD) $(LIBS) -test-fseeko$(EXEEXT): $(test_fseeko_OBJECTS) $(test_fseeko_DEPENDENCIES) +test-fseek$(EXEEXT): $(test_fseek_OBJECTS) $(test_fseek_DEPENDENCIES) $(EXTRA_test_fseek_DEPENDENCIES) + @rm -f test-fseek$(EXEEXT) + $(LINK) $(test_fseek_OBJECTS) $(test_fseek_LDADD) $(LIBS) +test-fseeko$(EXEEXT): $(test_fseeko_OBJECTS) $(test_fseeko_DEPENDENCIES) $(EXTRA_test_fseeko_DEPENDENCIES) @rm -f test-fseeko$(EXEEXT) $(LINK) $(test_fseeko_OBJECTS) $(test_fseeko_LDADD) $(LIBS) -test-fstatat$(EXEEXT): $(test_fstatat_OBJECTS) $(test_fstatat_DEPENDENCIES) +test-fseeko3$(EXEEXT): $(test_fseeko3_OBJECTS) $(test_fseeko3_DEPENDENCIES) $(EXTRA_test_fseeko3_DEPENDENCIES) + @rm -f test-fseeko3$(EXEEXT) + $(LINK) $(test_fseeko3_OBJECTS) $(test_fseeko3_LDADD) $(LIBS) +test-fseeko4$(EXEEXT): $(test_fseeko4_OBJECTS) $(test_fseeko4_DEPENDENCIES) $(EXTRA_test_fseeko4_DEPENDENCIES) + @rm -f test-fseeko4$(EXEEXT) + $(LINK) $(test_fseeko4_OBJECTS) $(test_fseeko4_LDADD) $(LIBS) +test-fstat$(EXEEXT): $(test_fstat_OBJECTS) $(test_fstat_DEPENDENCIES) $(EXTRA_test_fstat_DEPENDENCIES) + @rm -f test-fstat$(EXEEXT) + $(LINK) $(test_fstat_OBJECTS) $(test_fstat_LDADD) $(LIBS) +test-fstatat$(EXEEXT): $(test_fstatat_OBJECTS) $(test_fstatat_DEPENDENCIES) $(EXTRA_test_fstatat_DEPENDENCIES) @rm -f test-fstatat$(EXEEXT) $(LINK) $(test_fstatat_OBJECTS) $(test_fstatat_LDADD) $(LIBS) -test-ftell$(EXEEXT): $(test_ftell_OBJECTS) $(test_ftell_DEPENDENCIES) +test-ftell$(EXEEXT): $(test_ftell_OBJECTS) $(test_ftell_DEPENDENCIES) $(EXTRA_test_ftell_DEPENDENCIES) @rm -f test-ftell$(EXEEXT) $(LINK) $(test_ftell_OBJECTS) $(test_ftell_LDADD) $(LIBS) -test-ftell3$(EXEEXT): $(test_ftell3_OBJECTS) $(test_ftell3_DEPENDENCIES) +test-ftell3$(EXEEXT): $(test_ftell3_OBJECTS) $(test_ftell3_DEPENDENCIES) $(EXTRA_test_ftell3_DEPENDENCIES) @rm -f test-ftell3$(EXEEXT) $(LINK) $(test_ftell3_OBJECTS) $(test_ftell3_LDADD) $(LIBS) -test-ftello$(EXEEXT): $(test_ftello_OBJECTS) $(test_ftello_DEPENDENCIES) +test-ftello$(EXEEXT): $(test_ftello_OBJECTS) $(test_ftello_DEPENDENCIES) $(EXTRA_test_ftello_DEPENDENCIES) @rm -f test-ftello$(EXEEXT) $(LINK) $(test_ftello_OBJECTS) $(test_ftello_LDADD) $(LIBS) -test-ftello3$(EXEEXT): $(test_ftello3_OBJECTS) $(test_ftello3_DEPENDENCIES) +test-ftello3$(EXEEXT): $(test_ftello3_OBJECTS) $(test_ftello3_DEPENDENCIES) $(EXTRA_test_ftello3_DEPENDENCIES) @rm -f test-ftello3$(EXEEXT) $(LINK) $(test_ftello3_OBJECTS) $(test_ftello3_LDADD) $(LIBS) -test-getcwd$(EXEEXT): $(test_getcwd_OBJECTS) $(test_getcwd_DEPENDENCIES) +test-ftello4$(EXEEXT): $(test_ftello4_OBJECTS) $(test_ftello4_DEPENDENCIES) $(EXTRA_test_ftello4_DEPENDENCIES) + @rm -f test-ftello4$(EXEEXT) + $(LINK) $(test_ftello4_OBJECTS) $(test_ftello4_LDADD) $(LIBS) +test-ftruncate$(EXEEXT): $(test_ftruncate_OBJECTS) $(test_ftruncate_DEPENDENCIES) $(EXTRA_test_ftruncate_DEPENDENCIES) + @rm -f test-ftruncate$(EXEEXT) + $(LINK) $(test_ftruncate_OBJECTS) $(test_ftruncate_LDADD) $(LIBS) +test-fwrite$(EXEEXT): $(test_fwrite_OBJECTS) $(test_fwrite_DEPENDENCIES) $(EXTRA_test_fwrite_DEPENDENCIES) + @rm -f test-fwrite$(EXEEXT) + $(LINK) $(test_fwrite_OBJECTS) $(test_fwrite_LDADD) $(LIBS) +test-getcwd$(EXEEXT): $(test_getcwd_OBJECTS) $(test_getcwd_DEPENDENCIES) $(EXTRA_test_getcwd_DEPENDENCIES) @rm -f test-getcwd$(EXEEXT) $(LINK) $(test_getcwd_OBJECTS) $(test_getcwd_LDADD) $(LIBS) -test-getdelim$(EXEEXT): $(test_getdelim_OBJECTS) $(test_getdelim_DEPENDENCIES) +test-getcwd-lgpl$(EXEEXT): $(test_getcwd_lgpl_OBJECTS) $(test_getcwd_lgpl_DEPENDENCIES) $(EXTRA_test_getcwd_lgpl_DEPENDENCIES) + @rm -f test-getcwd-lgpl$(EXEEXT) + $(LINK) $(test_getcwd_lgpl_OBJECTS) $(test_getcwd_lgpl_LDADD) $(LIBS) +test-getdelim$(EXEEXT): $(test_getdelim_OBJECTS) $(test_getdelim_DEPENDENCIES) $(EXTRA_test_getdelim_DEPENDENCIES) @rm -f test-getdelim$(EXEEXT) $(LINK) $(test_getdelim_OBJECTS) $(test_getdelim_LDADD) $(LIBS) -test-getdtablesize$(EXEEXT): $(test_getdtablesize_OBJECTS) $(test_getdtablesize_DEPENDENCIES) +test-getdtablesize$(EXEEXT): $(test_getdtablesize_OBJECTS) $(test_getdtablesize_DEPENDENCIES) $(EXTRA_test_getdtablesize_DEPENDENCIES) @rm -f test-getdtablesize$(EXEEXT) $(LINK) $(test_getdtablesize_OBJECTS) $(test_getdtablesize_LDADD) $(LIBS) -test-getgroups$(EXEEXT): $(test_getgroups_OBJECTS) $(test_getgroups_DEPENDENCIES) +test-getgroups$(EXEEXT): $(test_getgroups_OBJECTS) $(test_getgroups_DEPENDENCIES) $(EXTRA_test_getgroups_DEPENDENCIES) @rm -f test-getgroups$(EXEEXT) $(LINK) $(test_getgroups_OBJECTS) $(test_getgroups_LDADD) $(LIBS) -test-getline$(EXEEXT): $(test_getline_OBJECTS) $(test_getline_DEPENDENCIES) +test-gethostname$(EXEEXT): $(test_gethostname_OBJECTS) $(test_gethostname_DEPENDENCIES) $(EXTRA_test_gethostname_DEPENDENCIES) + @rm -f test-gethostname$(EXEEXT) + $(LINK) $(test_gethostname_OBJECTS) $(test_gethostname_LDADD) $(LIBS) +test-getline$(EXEEXT): $(test_getline_OBJECTS) $(test_getline_DEPENDENCIES) $(EXTRA_test_getline_DEPENDENCIES) @rm -f test-getline$(EXEEXT) $(LINK) $(test_getline_OBJECTS) $(test_getline_LDADD) $(LIBS) -test-getopt$(EXEEXT): $(test_getopt_OBJECTS) $(test_getopt_DEPENDENCIES) +test-getopt$(EXEEXT): $(test_getopt_OBJECTS) $(test_getopt_DEPENDENCIES) $(EXTRA_test_getopt_DEPENDENCIES) @rm -f test-getopt$(EXEEXT) $(LINK) $(test_getopt_OBJECTS) $(test_getopt_LDADD) $(LIBS) -test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) +test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) $(EXTRA_test_gettimeofday_DEPENDENCIES) @rm -f test-gettimeofday$(EXEEXT) $(LINK) $(test_gettimeofday_OBJECTS) $(test_gettimeofday_LDADD) $(LIBS) -test-hash$(EXEEXT): $(test_hash_OBJECTS) $(test_hash_DEPENDENCIES) +test-hash$(EXEEXT): $(test_hash_OBJECTS) $(test_hash_DEPENDENCIES) $(EXTRA_test_hash_DEPENDENCIES) @rm -f test-hash$(EXEEXT) $(LINK) $(test_hash_OBJECTS) $(test_hash_LDADD) $(LIBS) -test-i-ring$(EXEEXT): $(test_i_ring_OBJECTS) $(test_i_ring_DEPENDENCIES) +test-i-ring$(EXEEXT): $(test_i_ring_OBJECTS) $(test_i_ring_DEPENDENCIES) $(EXTRA_test_i_ring_DEPENDENCIES) @rm -f test-i-ring$(EXEEXT) $(LINK) $(test_i_ring_OBJECTS) $(test_i_ring_LDADD) $(LIBS) -test-ignore-value$(EXEEXT): $(test_ignore_value_OBJECTS) $(test_ignore_value_DEPENDENCIES) +test-ignore-value$(EXEEXT): $(test_ignore_value_OBJECTS) $(test_ignore_value_DEPENDENCIES) $(EXTRA_test_ignore_value_DEPENDENCIES) @rm -f test-ignore-value$(EXEEXT) $(LINK) $(test_ignore_value_OBJECTS) $(test_ignore_value_LDADD) $(LIBS) -test-inttostr$(EXEEXT): $(test_inttostr_OBJECTS) $(test_inttostr_DEPENDENCIES) +test-inet_pton$(EXEEXT): $(test_inet_pton_OBJECTS) $(test_inet_pton_DEPENDENCIES) $(EXTRA_test_inet_pton_DEPENDENCIES) + @rm -f test-inet_pton$(EXEEXT) + $(LINK) $(test_inet_pton_OBJECTS) $(test_inet_pton_LDADD) $(LIBS) +test-intprops$(EXEEXT): $(test_intprops_OBJECTS) $(test_intprops_DEPENDENCIES) $(EXTRA_test_intprops_DEPENDENCIES) + @rm -f test-intprops$(EXEEXT) + $(LINK) $(test_intprops_OBJECTS) $(test_intprops_LDADD) $(LIBS) +test-inttostr$(EXEEXT): $(test_inttostr_OBJECTS) $(test_inttostr_DEPENDENCIES) $(EXTRA_test_inttostr_DEPENDENCIES) @rm -f test-inttostr$(EXEEXT) $(LINK) $(test_inttostr_OBJECTS) $(test_inttostr_LDADD) $(LIBS) -test-inttypes$(EXEEXT): $(test_inttypes_OBJECTS) $(test_inttypes_DEPENDENCIES) +test-inttypes$(EXEEXT): $(test_inttypes_OBJECTS) $(test_inttypes_DEPENDENCIES) $(EXTRA_test_inttypes_DEPENDENCIES) @rm -f test-inttypes$(EXEEXT) $(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_LDADD) $(LIBS) -test-isblank$(EXEEXT): $(test_isblank_OBJECTS) $(test_isblank_DEPENDENCIES) +test-ioctl$(EXEEXT): $(test_ioctl_OBJECTS) $(test_ioctl_DEPENDENCIES) $(EXTRA_test_ioctl_DEPENDENCIES) + @rm -f test-ioctl$(EXEEXT) + $(LINK) $(test_ioctl_OBJECTS) $(test_ioctl_LDADD) $(LIBS) +test-isblank$(EXEEXT): $(test_isblank_OBJECTS) $(test_isblank_DEPENDENCIES) $(EXTRA_test_isblank_DEPENDENCIES) @rm -f test-isblank$(EXEEXT) $(LINK) $(test_isblank_OBJECTS) $(test_isblank_LDADD) $(LIBS) -test-iswblank$(EXEEXT): $(test_iswblank_OBJECTS) $(test_iswblank_DEPENDENCIES) +test-isfinite$(EXEEXT): $(test_isfinite_OBJECTS) $(test_isfinite_DEPENDENCIES) $(EXTRA_test_isfinite_DEPENDENCIES) + @rm -f test-isfinite$(EXEEXT) + $(LINK) $(test_isfinite_OBJECTS) $(test_isfinite_LDADD) $(LIBS) +test-isinf$(EXEEXT): $(test_isinf_OBJECTS) $(test_isinf_DEPENDENCIES) $(EXTRA_test_isinf_DEPENDENCIES) + @rm -f test-isinf$(EXEEXT) + $(LINK) $(test_isinf_OBJECTS) $(test_isinf_LDADD) $(LIBS) +test-isnand-nolibm$(EXEEXT): $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_DEPENDENCIES) $(EXTRA_test_isnand_nolibm_DEPENDENCIES) + @rm -f test-isnand-nolibm$(EXEEXT) + $(LINK) $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_LDADD) $(LIBS) +test-isnanf-nolibm$(EXEEXT): $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_DEPENDENCIES) $(EXTRA_test_isnanf_nolibm_DEPENDENCIES) + @rm -f test-isnanf-nolibm$(EXEEXT) + $(LINK) $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_LDADD) $(LIBS) +test-isnanl-nolibm$(EXEEXT): $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_DEPENDENCIES) $(EXTRA_test_isnanl_nolibm_DEPENDENCIES) + @rm -f test-isnanl-nolibm$(EXEEXT) + $(LINK) $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_LDADD) $(LIBS) +test-iswblank$(EXEEXT): $(test_iswblank_OBJECTS) $(test_iswblank_DEPENDENCIES) $(EXTRA_test_iswblank_DEPENDENCIES) @rm -f test-iswblank$(EXEEXT) $(LINK) $(test_iswblank_OBJECTS) $(test_iswblank_LDADD) $(LIBS) -test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) +test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) $(EXTRA_test_langinfo_DEPENDENCIES) @rm -f test-langinfo$(EXEEXT) $(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS) -test-lchown$(EXEEXT): $(test_lchown_OBJECTS) $(test_lchown_DEPENDENCIES) - @rm -f test-lchown$(EXEEXT) - $(LINK) $(test_lchown_OBJECTS) $(test_lchown_LDADD) $(LIBS) -test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES) +test-listen$(EXEEXT): $(test_listen_OBJECTS) $(test_listen_DEPENDENCIES) $(EXTRA_test_listen_DEPENDENCIES) + @rm -f test-listen$(EXEEXT) + $(LINK) $(test_listen_OBJECTS) $(test_listen_LDADD) $(LIBS) +test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES) $(EXTRA_test_locale_DEPENDENCIES) @rm -f test-locale$(EXEEXT) $(LINK) $(test_locale_OBJECTS) $(test_locale_LDADD) $(LIBS) -test-localename$(EXEEXT): $(test_localename_OBJECTS) $(test_localename_DEPENDENCIES) +test-localeconv$(EXEEXT): $(test_localeconv_OBJECTS) $(test_localeconv_DEPENDENCIES) $(EXTRA_test_localeconv_DEPENDENCIES) + @rm -f test-localeconv$(EXEEXT) + $(LINK) $(test_localeconv_OBJECTS) $(test_localeconv_LDADD) $(LIBS) +test-localename$(EXEEXT): $(test_localename_OBJECTS) $(test_localename_DEPENDENCIES) $(EXTRA_test_localename_DEPENDENCIES) @rm -f test-localename$(EXEEXT) $(LINK) $(test_localename_OBJECTS) $(test_localename_LDADD) $(LIBS) -test-lock$(EXEEXT): $(test_lock_OBJECTS) $(test_lock_DEPENDENCIES) +test-lock$(EXEEXT): $(test_lock_OBJECTS) $(test_lock_DEPENDENCIES) $(EXTRA_test_lock_DEPENDENCIES) @rm -f test-lock$(EXEEXT) $(LINK) $(test_lock_OBJECTS) $(test_lock_LDADD) $(LIBS) -test-lseek$(EXEEXT): $(test_lseek_OBJECTS) $(test_lseek_DEPENDENCIES) +test-lseek$(EXEEXT): $(test_lseek_OBJECTS) $(test_lseek_DEPENDENCIES) $(EXTRA_test_lseek_DEPENDENCIES) @rm -f test-lseek$(EXEEXT) $(LINK) $(test_lseek_OBJECTS) $(test_lseek_LDADD) $(LIBS) -test-lstat$(EXEEXT): $(test_lstat_OBJECTS) $(test_lstat_DEPENDENCIES) +test-lstat$(EXEEXT): $(test_lstat_OBJECTS) $(test_lstat_DEPENDENCIES) $(EXTRA_test_lstat_DEPENDENCIES) @rm -f test-lstat$(EXEEXT) $(LINK) $(test_lstat_OBJECTS) $(test_lstat_LDADD) $(LIBS) -test-malloc-gnu$(EXEEXT): $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_DEPENDENCIES) +test-malloc-gnu$(EXEEXT): $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_DEPENDENCIES) $(EXTRA_test_malloc_gnu_DEPENDENCIES) @rm -f test-malloc-gnu$(EXEEXT) $(LINK) $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_LDADD) $(LIBS) -test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES) +test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES) $(EXTRA_test_malloca_DEPENDENCIES) @rm -f test-malloca$(EXEEXT) $(LINK) $(test_malloca_OBJECTS) $(test_malloca_LDADD) $(LIBS) -test-math$(EXEEXT): $(test_math_OBJECTS) $(test_math_DEPENDENCIES) +test-math$(EXEEXT): $(test_math_OBJECTS) $(test_math_DEPENDENCIES) $(EXTRA_test_math_DEPENDENCIES) @rm -f test-math$(EXEEXT) $(LINK) $(test_math_OBJECTS) $(test_math_LDADD) $(LIBS) -test-mbrtowc$(EXEEXT): $(test_mbrtowc_OBJECTS) $(test_mbrtowc_DEPENDENCIES) +test-mbrtowc$(EXEEXT): $(test_mbrtowc_OBJECTS) $(test_mbrtowc_DEPENDENCIES) $(EXTRA_test_mbrtowc_DEPENDENCIES) @rm -f test-mbrtowc$(EXEEXT) $(LINK) $(test_mbrtowc_OBJECTS) $(test_mbrtowc_LDADD) $(LIBS) -test-mbrtowc-w32$(EXEEXT): $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_DEPENDENCIES) +test-mbrtowc-w32$(EXEEXT): $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_DEPENDENCIES) $(EXTRA_test_mbrtowc_w32_DEPENDENCIES) @rm -f test-mbrtowc-w32$(EXEEXT) $(LINK) $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_LDADD) $(LIBS) -test-mbscasestr1$(EXEEXT): $(test_mbscasestr1_OBJECTS) $(test_mbscasestr1_DEPENDENCIES) +test-mbscasestr1$(EXEEXT): $(test_mbscasestr1_OBJECTS) $(test_mbscasestr1_DEPENDENCIES) $(EXTRA_test_mbscasestr1_DEPENDENCIES) @rm -f test-mbscasestr1$(EXEEXT) $(LINK) $(test_mbscasestr1_OBJECTS) $(test_mbscasestr1_LDADD) $(LIBS) -test-mbscasestr2$(EXEEXT): $(test_mbscasestr2_OBJECTS) $(test_mbscasestr2_DEPENDENCIES) +test-mbscasestr2$(EXEEXT): $(test_mbscasestr2_OBJECTS) $(test_mbscasestr2_DEPENDENCIES) $(EXTRA_test_mbscasestr2_DEPENDENCIES) @rm -f test-mbscasestr2$(EXEEXT) $(LINK) $(test_mbscasestr2_OBJECTS) $(test_mbscasestr2_LDADD) $(LIBS) -test-mbscasestr3$(EXEEXT): $(test_mbscasestr3_OBJECTS) $(test_mbscasestr3_DEPENDENCIES) +test-mbscasestr3$(EXEEXT): $(test_mbscasestr3_OBJECTS) $(test_mbscasestr3_DEPENDENCIES) $(EXTRA_test_mbscasestr3_DEPENDENCIES) @rm -f test-mbscasestr3$(EXEEXT) $(LINK) $(test_mbscasestr3_OBJECTS) $(test_mbscasestr3_LDADD) $(LIBS) -test-mbscasestr4$(EXEEXT): $(test_mbscasestr4_OBJECTS) $(test_mbscasestr4_DEPENDENCIES) +test-mbscasestr4$(EXEEXT): $(test_mbscasestr4_OBJECTS) $(test_mbscasestr4_DEPENDENCIES) $(EXTRA_test_mbscasestr4_DEPENDENCIES) @rm -f test-mbscasestr4$(EXEEXT) $(LINK) $(test_mbscasestr4_OBJECTS) $(test_mbscasestr4_LDADD) $(LIBS) -test-mbsinit$(EXEEXT): $(test_mbsinit_OBJECTS) $(test_mbsinit_DEPENDENCIES) +test-mbsinit$(EXEEXT): $(test_mbsinit_OBJECTS) $(test_mbsinit_DEPENDENCIES) $(EXTRA_test_mbsinit_DEPENDENCIES) @rm -f test-mbsinit$(EXEEXT) $(LINK) $(test_mbsinit_OBJECTS) $(test_mbsinit_LDADD) $(LIBS) -test-mbsrtowcs$(EXEEXT): $(test_mbsrtowcs_OBJECTS) $(test_mbsrtowcs_DEPENDENCIES) +test-mbsrtowcs$(EXEEXT): $(test_mbsrtowcs_OBJECTS) $(test_mbsrtowcs_DEPENDENCIES) $(EXTRA_test_mbsrtowcs_DEPENDENCIES) @rm -f test-mbsrtowcs$(EXEEXT) $(LINK) $(test_mbsrtowcs_OBJECTS) $(test_mbsrtowcs_LDADD) $(LIBS) -test-mbsstr1$(EXEEXT): $(test_mbsstr1_OBJECTS) $(test_mbsstr1_DEPENDENCIES) +test-mbsstr1$(EXEEXT): $(test_mbsstr1_OBJECTS) $(test_mbsstr1_DEPENDENCIES) $(EXTRA_test_mbsstr1_DEPENDENCIES) @rm -f test-mbsstr1$(EXEEXT) $(LINK) $(test_mbsstr1_OBJECTS) $(test_mbsstr1_LDADD) $(LIBS) -test-mbsstr2$(EXEEXT): $(test_mbsstr2_OBJECTS) $(test_mbsstr2_DEPENDENCIES) +test-mbsstr2$(EXEEXT): $(test_mbsstr2_OBJECTS) $(test_mbsstr2_DEPENDENCIES) $(EXTRA_test_mbsstr2_DEPENDENCIES) @rm -f test-mbsstr2$(EXEEXT) $(LINK) $(test_mbsstr2_OBJECTS) $(test_mbsstr2_LDADD) $(LIBS) -test-mbsstr3$(EXEEXT): $(test_mbsstr3_OBJECTS) $(test_mbsstr3_DEPENDENCIES) +test-mbsstr3$(EXEEXT): $(test_mbsstr3_OBJECTS) $(test_mbsstr3_DEPENDENCIES) $(EXTRA_test_mbsstr3_DEPENDENCIES) @rm -f test-mbsstr3$(EXEEXT) $(LINK) $(test_mbsstr3_OBJECTS) $(test_mbsstr3_LDADD) $(LIBS) -test-memchr$(EXEEXT): $(test_memchr_OBJECTS) $(test_memchr_DEPENDENCIES) +test-memchr$(EXEEXT): $(test_memchr_OBJECTS) $(test_memchr_DEPENDENCIES) $(EXTRA_test_memchr_DEPENDENCIES) @rm -f test-memchr$(EXEEXT) $(LINK) $(test_memchr_OBJECTS) $(test_memchr_LDADD) $(LIBS) -test-memrchr$(EXEEXT): $(test_memrchr_OBJECTS) $(test_memrchr_DEPENDENCIES) +test-memrchr$(EXEEXT): $(test_memrchr_OBJECTS) $(test_memrchr_DEPENDENCIES) $(EXTRA_test_memrchr_DEPENDENCIES) @rm -f test-memrchr$(EXEEXT) $(LINK) $(test_memrchr_OBJECTS) $(test_memrchr_LDADD) $(LIBS) -test-mkdir$(EXEEXT): $(test_mkdir_OBJECTS) $(test_mkdir_DEPENDENCIES) - @rm -f test-mkdir$(EXEEXT) - $(LINK) $(test_mkdir_OBJECTS) $(test_mkdir_LDADD) $(LIBS) -test-mkdirat$(EXEEXT): $(test_mkdirat_OBJECTS) $(test_mkdirat_DEPENDENCIES) - @rm -f test-mkdirat$(EXEEXT) - $(LINK) $(test_mkdirat_OBJECTS) $(test_mkdirat_LDADD) $(LIBS) -test-modf$(EXEEXT): $(test_modf_OBJECTS) $(test_modf_DEPENDENCIES) +test-modf$(EXEEXT): $(test_modf_OBJECTS) $(test_modf_DEPENDENCIES) $(EXTRA_test_modf_DEPENDENCIES) @rm -f test-modf$(EXEEXT) $(LINK) $(test_modf_OBJECTS) $(test_modf_LDADD) $(LIBS) -test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) +test-nanosleep$(EXEEXT): $(test_nanosleep_OBJECTS) $(test_nanosleep_DEPENDENCIES) $(EXTRA_test_nanosleep_DEPENDENCIES) + @rm -f test-nanosleep$(EXEEXT) + $(LINK) $(test_nanosleep_OBJECTS) $(test_nanosleep_LDADD) $(LIBS) +test-netinet_in$(EXEEXT): $(test_netinet_in_OBJECTS) $(test_netinet_in_DEPENDENCIES) $(EXTRA_test_netinet_in_DEPENDENCIES) + @rm -f test-netinet_in$(EXEEXT) + $(LINK) $(test_netinet_in_OBJECTS) $(test_netinet_in_LDADD) $(LIBS) +test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) $(EXTRA_test_nl_langinfo_DEPENDENCIES) @rm -f test-nl_langinfo$(EXEEXT) $(LINK) $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_LDADD) $(LIBS) -test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES) +test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES) $(EXTRA_test_open_DEPENDENCIES) @rm -f test-open$(EXEEXT) $(LINK) $(test_open_OBJECTS) $(test_open_LDADD) $(LIBS) -test-openat$(EXEEXT): $(test_openat_OBJECTS) $(test_openat_DEPENDENCIES) +test-openat$(EXEEXT): $(test_openat_OBJECTS) $(test_openat_DEPENDENCIES) $(EXTRA_test_openat_DEPENDENCIES) @rm -f test-openat$(EXEEXT) $(LINK) $(test_openat_OBJECTS) $(test_openat_LDADD) $(LIBS) -test-openat-safer$(EXEEXT): $(test_openat_safer_OBJECTS) $(test_openat_safer_DEPENDENCIES) +test-openat-safer$(EXEEXT): $(test_openat_safer_OBJECTS) $(test_openat_safer_DEPENDENCIES) $(EXTRA_test_openat_safer_DEPENDENCIES) @rm -f test-openat-safer$(EXEEXT) $(LINK) $(test_openat_safer_OBJECTS) $(test_openat_safer_LDADD) $(LIBS) -test-parse-datetime$(EXEEXT): $(test_parse_datetime_OBJECTS) $(test_parse_datetime_DEPENDENCIES) +test-parse-datetime$(EXEEXT): $(test_parse_datetime_OBJECTS) $(test_parse_datetime_DEPENDENCIES) $(EXTRA_test_parse_datetime_DEPENDENCIES) @rm -f test-parse-datetime$(EXEEXT) $(LINK) $(test_parse_datetime_OBJECTS) $(test_parse_datetime_LDADD) $(LIBS) -test-perror$(EXEEXT): $(test_perror_OBJECTS) $(test_perror_DEPENDENCIES) +test-pathmax$(EXEEXT): $(test_pathmax_OBJECTS) $(test_pathmax_DEPENDENCIES) $(EXTRA_test_pathmax_DEPENDENCIES) + @rm -f test-pathmax$(EXEEXT) + $(LINK) $(test_pathmax_OBJECTS) $(test_pathmax_LDADD) $(LIBS) +test-perror$(EXEEXT): $(test_perror_OBJECTS) $(test_perror_DEPENDENCIES) $(EXTRA_test_perror_DEPENDENCIES) @rm -f test-perror$(EXEEXT) $(LINK) $(test_perror_OBJECTS) $(test_perror_LDADD) $(LIBS) -test-priv-set$(EXEEXT): $(test_priv_set_OBJECTS) $(test_priv_set_DEPENDENCIES) +test-perror2$(EXEEXT): $(test_perror2_OBJECTS) $(test_perror2_DEPENDENCIES) $(EXTRA_test_perror2_DEPENDENCIES) + @rm -f test-perror2$(EXEEXT) + $(LINK) $(test_perror2_OBJECTS) $(test_perror2_LDADD) $(LIBS) +test-pipe$(EXEEXT): $(test_pipe_OBJECTS) $(test_pipe_DEPENDENCIES) $(EXTRA_test_pipe_DEPENDENCIES) + @rm -f test-pipe$(EXEEXT) + $(LINK) $(test_pipe_OBJECTS) $(test_pipe_LDADD) $(LIBS) +test-priv-set$(EXEEXT): $(test_priv_set_OBJECTS) $(test_priv_set_DEPENDENCIES) $(EXTRA_test_priv_set_DEPENDENCIES) @rm -f test-priv-set$(EXEEXT) $(LINK) $(test_priv_set_OBJECTS) $(test_priv_set_LDADD) $(LIBS) -test-quotearg-simple$(EXEEXT): $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_DEPENDENCIES) +test-quotearg-simple$(EXEEXT): $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_DEPENDENCIES) $(EXTRA_test_quotearg_simple_DEPENDENCIES) @rm -f test-quotearg-simple$(EXEEXT) $(LINK) $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_LDADD) $(LIBS) -test-readlink$(EXEEXT): $(test_readlink_OBJECTS) $(test_readlink_DEPENDENCIES) +test-raise$(EXEEXT): $(test_raise_OBJECTS) $(test_raise_DEPENDENCIES) $(EXTRA_test_raise_DEPENDENCIES) + @rm -f test-raise$(EXEEXT) + $(LINK) $(test_raise_OBJECTS) $(test_raise_LDADD) $(LIBS) +test-read$(EXEEXT): $(test_read_OBJECTS) $(test_read_DEPENDENCIES) $(EXTRA_test_read_DEPENDENCIES) + @rm -f test-read$(EXEEXT) + $(LINK) $(test_read_OBJECTS) $(test_read_LDADD) $(LIBS) +test-readlink$(EXEEXT): $(test_readlink_OBJECTS) $(test_readlink_DEPENDENCIES) $(EXTRA_test_readlink_DEPENDENCIES) @rm -f test-readlink$(EXEEXT) $(LINK) $(test_readlink_OBJECTS) $(test_readlink_LDADD) $(LIBS) -test-readlinkat$(EXEEXT): $(test_readlinkat_OBJECTS) $(test_readlinkat_DEPENDENCIES) +test-readlinkat$(EXEEXT): $(test_readlinkat_OBJECTS) $(test_readlinkat_DEPENDENCIES) $(EXTRA_test_readlinkat_DEPENDENCIES) @rm -f test-readlinkat$(EXEEXT) $(LINK) $(test_readlinkat_OBJECTS) $(test_readlinkat_LDADD) $(LIBS) -test-realloc-gnu$(EXEEXT): $(test_realloc_gnu_OBJECTS) $(test_realloc_gnu_DEPENDENCIES) +test-realloc-gnu$(EXEEXT): $(test_realloc_gnu_OBJECTS) $(test_realloc_gnu_DEPENDENCIES) $(EXTRA_test_realloc_gnu_DEPENDENCIES) @rm -f test-realloc-gnu$(EXEEXT) $(LINK) $(test_realloc_gnu_OBJECTS) $(test_realloc_gnu_LDADD) $(LIBS) -test-rmdir$(EXEEXT): $(test_rmdir_OBJECTS) $(test_rmdir_DEPENDENCIES) +test-regex$(EXEEXT): $(test_regex_OBJECTS) $(test_regex_DEPENDENCIES) $(EXTRA_test_regex_DEPENDENCIES) + @rm -f test-regex$(EXEEXT) + $(LINK) $(test_regex_OBJECTS) $(test_regex_LDADD) $(LIBS) +test-rmdir$(EXEEXT): $(test_rmdir_OBJECTS) $(test_rmdir_DEPENDENCIES) $(EXTRA_test_rmdir_DEPENDENCIES) @rm -f test-rmdir$(EXEEXT) $(LINK) $(test_rmdir_OBJECTS) $(test_rmdir_LDADD) $(LIBS) -test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES) +test-select$(EXEEXT): $(test_select_OBJECTS) $(test_select_DEPENDENCIES) $(EXTRA_test_select_DEPENDENCIES) + @rm -f test-select$(EXEEXT) + $(LINK) $(test_select_OBJECTS) $(test_select_LDADD) $(LIBS) +test-select-fd$(EXEEXT): $(test_select_fd_OBJECTS) $(test_select_fd_DEPENDENCIES) $(EXTRA_test_select_fd_DEPENDENCIES) + @rm -f test-select-fd$(EXEEXT) + $(LINK) $(test_select_fd_OBJECTS) $(test_select_fd_LDADD) $(LIBS) +test-select-stdin$(EXEEXT): $(test_select_stdin_OBJECTS) $(test_select_stdin_DEPENDENCIES) $(EXTRA_test_select_stdin_DEPENDENCIES) + @rm -f test-select-stdin$(EXEEXT) + $(LINK) $(test_select_stdin_OBJECTS) $(test_select_stdin_LDADD) $(LIBS) +test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES) $(EXTRA_test_setenv_DEPENDENCIES) @rm -f test-setenv$(EXEEXT) $(LINK) $(test_setenv_OBJECTS) $(test_setenv_LDADD) $(LIBS) -test-setlocale1$(EXEEXT): $(test_setlocale1_OBJECTS) $(test_setlocale1_DEPENDENCIES) +test-setlocale1$(EXEEXT): $(test_setlocale1_OBJECTS) $(test_setlocale1_DEPENDENCIES) $(EXTRA_test_setlocale1_DEPENDENCIES) @rm -f test-setlocale1$(EXEEXT) $(LINK) $(test_setlocale1_OBJECTS) $(test_setlocale1_LDADD) $(LIBS) -test-setlocale2$(EXEEXT): $(test_setlocale2_OBJECTS) $(test_setlocale2_DEPENDENCIES) +test-setlocale2$(EXEEXT): $(test_setlocale2_OBJECTS) $(test_setlocale2_DEPENDENCIES) $(EXTRA_test_setlocale2_DEPENDENCIES) @rm -f test-setlocale2$(EXEEXT) $(LINK) $(test_setlocale2_OBJECTS) $(test_setlocale2_LDADD) $(LIBS) -test-sleep$(EXEEXT): $(test_sleep_OBJECTS) $(test_sleep_DEPENDENCIES) +test-setsockopt$(EXEEXT): $(test_setsockopt_OBJECTS) $(test_setsockopt_DEPENDENCIES) $(EXTRA_test_setsockopt_DEPENDENCIES) + @rm -f test-setsockopt$(EXEEXT) + $(LINK) $(test_setsockopt_OBJECTS) $(test_setsockopt_LDADD) $(LIBS) +test-sigaction$(EXEEXT): $(test_sigaction_OBJECTS) $(test_sigaction_DEPENDENCIES) $(EXTRA_test_sigaction_DEPENDENCIES) + @rm -f test-sigaction$(EXEEXT) + $(LINK) $(test_sigaction_OBJECTS) $(test_sigaction_LDADD) $(LIBS) +test-signal-h$(EXEEXT): $(test_signal_h_OBJECTS) $(test_signal_h_DEPENDENCIES) $(EXTRA_test_signal_h_DEPENDENCIES) + @rm -f test-signal-h$(EXEEXT) + $(LINK) $(test_signal_h_OBJECTS) $(test_signal_h_LDADD) $(LIBS) +test-sigprocmask$(EXEEXT): $(test_sigprocmask_OBJECTS) $(test_sigprocmask_DEPENDENCIES) $(EXTRA_test_sigprocmask_DEPENDENCIES) + @rm -f test-sigprocmask$(EXEEXT) + $(LINK) $(test_sigprocmask_OBJECTS) $(test_sigprocmask_LDADD) $(LIBS) +test-sleep$(EXEEXT): $(test_sleep_OBJECTS) $(test_sleep_DEPENDENCIES) $(EXTRA_test_sleep_DEPENDENCIES) @rm -f test-sleep$(EXEEXT) $(LINK) $(test_sleep_OBJECTS) $(test_sleep_LDADD) $(LIBS) -test-snprintf$(EXEEXT): $(test_snprintf_OBJECTS) $(test_snprintf_DEPENDENCIES) +test-snprintf$(EXEEXT): $(test_snprintf_OBJECTS) $(test_snprintf_DEPENDENCIES) $(EXTRA_test_snprintf_DEPENDENCIES) @rm -f test-snprintf$(EXEEXT) $(LINK) $(test_snprintf_OBJECTS) $(test_snprintf_LDADD) $(LIBS) -test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES) +test-sockets$(EXEEXT): $(test_sockets_OBJECTS) $(test_sockets_DEPENDENCIES) $(EXTRA_test_sockets_DEPENDENCIES) + @rm -f test-sockets$(EXEEXT) + $(LINK) $(test_sockets_OBJECTS) $(test_sockets_LDADD) $(LIBS) +test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES) $(EXTRA_test_stat_DEPENDENCIES) @rm -f test-stat$(EXEEXT) $(LINK) $(test_stat_OBJECTS) $(test_stat_LDADD) $(LIBS) -test-stat-time$(EXEEXT): $(test_stat_time_OBJECTS) $(test_stat_time_DEPENDENCIES) +test-stat-time$(EXEEXT): $(test_stat_time_OBJECTS) $(test_stat_time_DEPENDENCIES) $(EXTRA_test_stat_time_DEPENDENCIES) @rm -f test-stat-time$(EXEEXT) $(LINK) $(test_stat_time_OBJECTS) $(test_stat_time_LDADD) $(LIBS) -test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) +test-statat$(EXEEXT): $(test_statat_OBJECTS) $(test_statat_DEPENDENCIES) $(EXTRA_test_statat_DEPENDENCIES) + @rm -f test-statat$(EXEEXT) + $(LINK) $(test_statat_OBJECTS) $(test_statat_LDADD) $(LIBS) +test-stdalign$(EXEEXT): $(test_stdalign_OBJECTS) $(test_stdalign_DEPENDENCIES) $(EXTRA_test_stdalign_DEPENDENCIES) + @rm -f test-stdalign$(EXEEXT) + $(LINK) $(test_stdalign_OBJECTS) $(test_stdalign_LDADD) $(LIBS) +test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) $(EXTRA_test_stdbool_DEPENDENCIES) @rm -f test-stdbool$(EXEEXT) $(LINK) $(test_stdbool_OBJECTS) $(test_stdbool_LDADD) $(LIBS) -test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES) +test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES) $(EXTRA_test_stddef_DEPENDENCIES) @rm -f test-stddef$(EXEEXT) $(LINK) $(test_stddef_OBJECTS) $(test_stddef_LDADD) $(LIBS) -test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES) +test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES) $(EXTRA_test_stdint_DEPENDENCIES) @rm -f test-stdint$(EXEEXT) $(LINK) $(test_stdint_OBJECTS) $(test_stdint_LDADD) $(LIBS) -test-stdio$(EXEEXT): $(test_stdio_OBJECTS) $(test_stdio_DEPENDENCIES) +test-stdio$(EXEEXT): $(test_stdio_OBJECTS) $(test_stdio_DEPENDENCIES) $(EXTRA_test_stdio_DEPENDENCIES) @rm -f test-stdio$(EXEEXT) $(LINK) $(test_stdio_OBJECTS) $(test_stdio_LDADD) $(LIBS) -test-stdlib$(EXEEXT): $(test_stdlib_OBJECTS) $(test_stdlib_DEPENDENCIES) +test-stdlib$(EXEEXT): $(test_stdlib_OBJECTS) $(test_stdlib_DEPENDENCIES) $(EXTRA_test_stdlib_DEPENDENCIES) @rm -f test-stdlib$(EXEEXT) $(LINK) $(test_stdlib_OBJECTS) $(test_stdlib_LDADD) $(LIBS) -test-strcasestr$(EXEEXT): $(test_strcasestr_OBJECTS) $(test_strcasestr_DEPENDENCIES) +test-strcasestr$(EXEEXT): $(test_strcasestr_OBJECTS) $(test_strcasestr_DEPENDENCIES) $(EXTRA_test_strcasestr_DEPENDENCIES) @rm -f test-strcasestr$(EXEEXT) $(LINK) $(test_strcasestr_OBJECTS) $(test_strcasestr_LDADD) $(LIBS) -test-strerror$(EXEEXT): $(test_strerror_OBJECTS) $(test_strerror_DEPENDENCIES) +test-strerror$(EXEEXT): $(test_strerror_OBJECTS) $(test_strerror_DEPENDENCIES) $(EXTRA_test_strerror_DEPENDENCIES) @rm -f test-strerror$(EXEEXT) $(LINK) $(test_strerror_OBJECTS) $(test_strerror_LDADD) $(LIBS) -test-strftime$(EXEEXT): $(test_strftime_OBJECTS) $(test_strftime_DEPENDENCIES) +test-strerror_r$(EXEEXT): $(test_strerror_r_OBJECTS) $(test_strerror_r_DEPENDENCIES) $(EXTRA_test_strerror_r_DEPENDENCIES) + @rm -f test-strerror_r$(EXEEXT) + $(LINK) $(test_strerror_r_OBJECTS) $(test_strerror_r_LDADD) $(LIBS) +test-strftime$(EXEEXT): $(test_strftime_OBJECTS) $(test_strftime_DEPENDENCIES) $(EXTRA_test_strftime_DEPENDENCIES) @rm -f test-strftime$(EXEEXT) $(LINK) $(test_strftime_OBJECTS) $(test_strftime_LDADD) $(LIBS) -test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) +test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) $(EXTRA_test_string_DEPENDENCIES) @rm -f test-string$(EXEEXT) $(LINK) $(test_string_OBJECTS) $(test_string_LDADD) $(LIBS) -test-strings$(EXEEXT): $(test_strings_OBJECTS) $(test_strings_DEPENDENCIES) +test-strings$(EXEEXT): $(test_strings_OBJECTS) $(test_strings_DEPENDENCIES) $(EXTRA_test_strings_DEPENDENCIES) @rm -f test-strings$(EXEEXT) $(LINK) $(test_strings_OBJECTS) $(test_strings_LDADD) $(LIBS) -test-strnlen$(EXEEXT): $(test_strnlen_OBJECTS) $(test_strnlen_DEPENDENCIES) +test-strnlen$(EXEEXT): $(test_strnlen_OBJECTS) $(test_strnlen_DEPENDENCIES) $(EXTRA_test_strnlen_DEPENDENCIES) @rm -f test-strnlen$(EXEEXT) $(LINK) $(test_strnlen_OBJECTS) $(test_strnlen_LDADD) $(LIBS) -test-strstr$(EXEEXT): $(test_strstr_OBJECTS) $(test_strstr_DEPENDENCIES) +test-strstr$(EXEEXT): $(test_strstr_OBJECTS) $(test_strstr_DEPENDENCIES) $(EXTRA_test_strstr_DEPENDENCIES) @rm -f test-strstr$(EXEEXT) $(LINK) $(test_strstr_OBJECTS) $(test_strstr_LDADD) $(LIBS) -test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) +test-strtol$(EXEEXT): $(test_strtol_OBJECTS) $(test_strtol_DEPENDENCIES) $(EXTRA_test_strtol_DEPENDENCIES) + @rm -f test-strtol$(EXEEXT) + $(LINK) $(test_strtol_OBJECTS) $(test_strtol_LDADD) $(LIBS) +test-strtoul$(EXEEXT): $(test_strtoul_OBJECTS) $(test_strtoul_DEPENDENCIES) $(EXTRA_test_strtoul_DEPENDENCIES) + @rm -f test-strtoul$(EXEEXT) + $(LINK) $(test_strtoul_OBJECTS) $(test_strtoul_LDADD) $(LIBS) +test-strtoull$(EXEEXT): $(test_strtoull_OBJECTS) $(test_strtoull_DEPENDENCIES) $(EXTRA_test_strtoull_DEPENDENCIES) + @rm -f test-strtoull$(EXEEXT) + $(LINK) $(test_strtoull_OBJECTS) $(test_strtoull_LDADD) $(LIBS) +test-strtoumax$(EXEEXT): $(test_strtoumax_OBJECTS) $(test_strtoumax_DEPENDENCIES) $(EXTRA_test_strtoumax_DEPENDENCIES) + @rm -f test-strtoumax$(EXEEXT) + $(LINK) $(test_strtoumax_OBJECTS) $(test_strtoumax_LDADD) $(LIBS) +test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) $(EXTRA_test_symlink_DEPENDENCIES) @rm -f test-symlink$(EXEEXT) $(LINK) $(test_symlink_OBJECTS) $(test_symlink_LDADD) $(LIBS) -test-symlinkat$(EXEEXT): $(test_symlinkat_OBJECTS) $(test_symlinkat_DEPENDENCIES) +test-symlinkat$(EXEEXT): $(test_symlinkat_OBJECTS) $(test_symlinkat_DEPENDENCIES) $(EXTRA_test_symlinkat_DEPENDENCIES) @rm -f test-symlinkat$(EXEEXT) $(LINK) $(test_symlinkat_OBJECTS) $(test_symlinkat_LDADD) $(LIBS) -test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) +test-sys_ioctl$(EXEEXT): $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_DEPENDENCIES) $(EXTRA_test_sys_ioctl_DEPENDENCIES) + @rm -f test-sys_ioctl$(EXEEXT) + $(LINK) $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_LDADD) $(LIBS) +test-sys_select$(EXEEXT): $(test_sys_select_OBJECTS) $(test_sys_select_DEPENDENCIES) $(EXTRA_test_sys_select_DEPENDENCIES) + @rm -f test-sys_select$(EXEEXT) + $(LINK) $(test_sys_select_OBJECTS) $(test_sys_select_LDADD) $(LIBS) +test-sys_socket$(EXEEXT): $(test_sys_socket_OBJECTS) $(test_sys_socket_DEPENDENCIES) $(EXTRA_test_sys_socket_DEPENDENCIES) + @rm -f test-sys_socket$(EXEEXT) + $(LINK) $(test_sys_socket_OBJECTS) $(test_sys_socket_LDADD) $(LIBS) +test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) $(EXTRA_test_sys_stat_DEPENDENCIES) @rm -f test-sys_stat$(EXEEXT) $(LINK) $(test_sys_stat_OBJECTS) $(test_sys_stat_LDADD) $(LIBS) -test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES) +test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES) $(EXTRA_test_sys_time_DEPENDENCIES) @rm -f test-sys_time$(EXEEXT) $(LINK) $(test_sys_time_OBJECTS) $(test_sys_time_LDADD) $(LIBS) -test-sys_wait$(EXEEXT): $(test_sys_wait_OBJECTS) $(test_sys_wait_DEPENDENCIES) +test-sys_types$(EXEEXT): $(test_sys_types_OBJECTS) $(test_sys_types_DEPENDENCIES) $(EXTRA_test_sys_types_DEPENDENCIES) + @rm -f test-sys_types$(EXEEXT) + $(LINK) $(test_sys_types_OBJECTS) $(test_sys_types_LDADD) $(LIBS) +test-sys_uio$(EXEEXT): $(test_sys_uio_OBJECTS) $(test_sys_uio_DEPENDENCIES) $(EXTRA_test_sys_uio_DEPENDENCIES) + @rm -f test-sys_uio$(EXEEXT) + $(LINK) $(test_sys_uio_OBJECTS) $(test_sys_uio_LDADD) $(LIBS) +test-sys_utsname$(EXEEXT): $(test_sys_utsname_OBJECTS) $(test_sys_utsname_DEPENDENCIES) $(EXTRA_test_sys_utsname_DEPENDENCIES) + @rm -f test-sys_utsname$(EXEEXT) + $(LINK) $(test_sys_utsname_OBJECTS) $(test_sys_utsname_LDADD) $(LIBS) +test-sys_wait$(EXEEXT): $(test_sys_wait_OBJECTS) $(test_sys_wait_DEPENDENCIES) $(EXTRA_test_sys_wait_DEPENDENCIES) @rm -f test-sys_wait$(EXEEXT) $(LINK) $(test_sys_wait_OBJECTS) $(test_sys_wait_LDADD) $(LIBS) -test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) +test-thread_create$(EXEEXT): $(test_thread_create_OBJECTS) $(test_thread_create_DEPENDENCIES) $(EXTRA_test_thread_create_DEPENDENCIES) + @rm -f test-thread_create$(EXEEXT) + $(LINK) $(test_thread_create_OBJECTS) $(test_thread_create_LDADD) $(LIBS) +test-thread_self$(EXEEXT): $(test_thread_self_OBJECTS) $(test_thread_self_DEPENDENCIES) $(EXTRA_test_thread_self_DEPENDENCIES) + @rm -f test-thread_self$(EXEEXT) + $(LINK) $(test_thread_self_OBJECTS) $(test_thread_self_LDADD) $(LIBS) +test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) $(EXTRA_test_time_DEPENDENCIES) @rm -f test-time$(EXEEXT) $(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS) +test-trunc1$(EXEEXT): $(test_trunc1_OBJECTS) $(test_trunc1_DEPENDENCIES) $(EXTRA_test_trunc1_DEPENDENCIES) + @rm -f test-trunc1$(EXEEXT) + $(LINK) $(test_trunc1_OBJECTS) $(test_trunc1_LDADD) $(LIBS) +test-trunc2$(EXEEXT): $(test_trunc2_OBJECTS) $(test_trunc2_DEPENDENCIES) $(EXTRA_test_trunc2_DEPENDENCIES) + @rm -f test-trunc2$(EXEEXT) + $(LINK) $(test_trunc2_OBJECTS) $(test_trunc2_LDADD) $(LIBS) uniwidth/$(am__dirstamp): @$(MKDIR_P) uniwidth @: > uniwidth/$(am__dirstamp) @@ -2763,160 +3719,205 @@ uniwidth/$(DEPDIR)/$(am__dirstamp): @: > uniwidth/$(DEPDIR)/$(am__dirstamp) uniwidth/test-uc_width.$(OBJEXT): uniwidth/$(am__dirstamp) \ uniwidth/$(DEPDIR)/$(am__dirstamp) -test-uc_width$(EXEEXT): $(test_uc_width_OBJECTS) $(test_uc_width_DEPENDENCIES) +test-uc_width$(EXEEXT): $(test_uc_width_OBJECTS) $(test_uc_width_DEPENDENCIES) $(EXTRA_test_uc_width_DEPENDENCIES) @rm -f test-uc_width$(EXEEXT) $(LINK) $(test_uc_width_OBJECTS) $(test_uc_width_LDADD) $(LIBS) uniwidth/test-uc_width2.$(OBJEXT): uniwidth/$(am__dirstamp) \ uniwidth/$(DEPDIR)/$(am__dirstamp) -test-uc_width2$(EXEEXT): $(test_uc_width2_OBJECTS) $(test_uc_width2_DEPENDENCIES) +test-uc_width2$(EXEEXT): $(test_uc_width2_OBJECTS) $(test_uc_width2_DEPENDENCIES) $(EXTRA_test_uc_width2_DEPENDENCIES) @rm -f test-uc_width2$(EXEEXT) $(LINK) $(test_uc_width2_OBJECTS) $(test_uc_width2_LDADD) $(LIBS) -test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES) +test-uname$(EXEEXT): $(test_uname_OBJECTS) $(test_uname_DEPENDENCIES) $(EXTRA_test_uname_DEPENDENCIES) + @rm -f test-uname$(EXEEXT) + $(LINK) $(test_uname_OBJECTS) $(test_uname_LDADD) $(LIBS) +test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES) $(EXTRA_test_unistd_DEPENDENCIES) @rm -f test-unistd$(EXEEXT) $(LINK) $(test_unistd_OBJECTS) $(test_unistd_LDADD) $(LIBS) -test-unlink$(EXEEXT): $(test_unlink_OBJECTS) $(test_unlink_DEPENDENCIES) +test-unlink$(EXEEXT): $(test_unlink_OBJECTS) $(test_unlink_DEPENDENCIES) $(EXTRA_test_unlink_DEPENDENCIES) @rm -f test-unlink$(EXEEXT) $(LINK) $(test_unlink_OBJECTS) $(test_unlink_LDADD) $(LIBS) -test-unlinkat$(EXEEXT): $(test_unlinkat_OBJECTS) $(test_unlinkat_DEPENDENCIES) +test-unlinkat$(EXEEXT): $(test_unlinkat_OBJECTS) $(test_unlinkat_DEPENDENCIES) $(EXTRA_test_unlinkat_DEPENDENCIES) @rm -f test-unlinkat$(EXEEXT) $(LINK) $(test_unlinkat_OBJECTS) $(test_unlinkat_LDADD) $(LIBS) -test-unsetenv$(EXEEXT): $(test_unsetenv_OBJECTS) $(test_unsetenv_DEPENDENCIES) +test-unsetenv$(EXEEXT): $(test_unsetenv_OBJECTS) $(test_unsetenv_DEPENDENCIES) $(EXTRA_test_unsetenv_DEPENDENCIES) @rm -f test-unsetenv$(EXEEXT) $(LINK) $(test_unsetenv_OBJECTS) $(test_unsetenv_LDADD) $(LIBS) -test-usleep$(EXEEXT): $(test_usleep_OBJECTS) $(test_usleep_DEPENDENCIES) - @rm -f test-usleep$(EXEEXT) - $(LINK) $(test_usleep_OBJECTS) $(test_usleep_LDADD) $(LIBS) -test-vasnprintf$(EXEEXT): $(test_vasnprintf_OBJECTS) $(test_vasnprintf_DEPENDENCIES) +test-vasnprintf$(EXEEXT): $(test_vasnprintf_OBJECTS) $(test_vasnprintf_DEPENDENCIES) $(EXTRA_test_vasnprintf_DEPENDENCIES) @rm -f test-vasnprintf$(EXEEXT) $(LINK) $(test_vasnprintf_OBJECTS) $(test_vasnprintf_LDADD) $(LIBS) -test-verify$(EXEEXT): $(test_verify_OBJECTS) $(test_verify_DEPENDENCIES) +test-verify$(EXEEXT): $(test_verify_OBJECTS) $(test_verify_DEPENDENCIES) $(EXTRA_test_verify_DEPENDENCIES) @rm -f test-verify$(EXEEXT) $(LINK) $(test_verify_OBJECTS) $(test_verify_LDADD) $(LIBS) -test-version-etc$(EXEEXT): $(test_version_etc_OBJECTS) $(test_version_etc_DEPENDENCIES) +test-version-etc$(EXEEXT): $(test_version_etc_OBJECTS) $(test_version_etc_DEPENDENCIES) $(EXTRA_test_version_etc_DEPENDENCIES) @rm -f test-version-etc$(EXEEXT) $(LINK) $(test_version_etc_OBJECTS) $(test_version_etc_LDADD) $(LIBS) -test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES) +test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES) $(EXTRA_test_wchar_DEPENDENCIES) @rm -f test-wchar$(EXEEXT) $(LINK) $(test_wchar_OBJECTS) $(test_wchar_LDADD) $(LIBS) -test-wcrtomb$(EXEEXT): $(test_wcrtomb_OBJECTS) $(test_wcrtomb_DEPENDENCIES) +test-wcrtomb$(EXEEXT): $(test_wcrtomb_OBJECTS) $(test_wcrtomb_DEPENDENCIES) $(EXTRA_test_wcrtomb_DEPENDENCIES) @rm -f test-wcrtomb$(EXEEXT) $(LINK) $(test_wcrtomb_OBJECTS) $(test_wcrtomb_LDADD) $(LIBS) -test-wcrtomb-w32$(EXEEXT): $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_DEPENDENCIES) +test-wcrtomb-w32$(EXEEXT): $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_DEPENDENCIES) $(EXTRA_test_wcrtomb_w32_DEPENDENCIES) @rm -f test-wcrtomb-w32$(EXEEXT) $(LINK) $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_LDADD) $(LIBS) -test-wctype-h$(EXEEXT): $(test_wctype_h_OBJECTS) $(test_wctype_h_DEPENDENCIES) +test-wctype-h$(EXEEXT): $(test_wctype_h_OBJECTS) $(test_wctype_h_DEPENDENCIES) $(EXTRA_test_wctype_h_DEPENDENCIES) @rm -f test-wctype-h$(EXEEXT) $(LINK) $(test_wctype_h_OBJECTS) $(test_wctype_h_LDADD) $(LIBS) -test-wcwidth$(EXEEXT): $(test_wcwidth_OBJECTS) $(test_wcwidth_DEPENDENCIES) +test-wcwidth$(EXEEXT): $(test_wcwidth_OBJECTS) $(test_wcwidth_DEPENDENCIES) $(EXTRA_test_wcwidth_DEPENDENCIES) @rm -f test-wcwidth$(EXEEXT) $(LINK) $(test_wcwidth_OBJECTS) $(test_wcwidth_LDADD) $(LIBS) -test-xalloc-die$(EXEEXT): $(test_xalloc_die_OBJECTS) $(test_xalloc_die_DEPENDENCIES) +test-xalloc-die$(EXEEXT): $(test_xalloc_die_OBJECTS) $(test_xalloc_die_DEPENDENCIES) $(EXTRA_test_xalloc_die_DEPENDENCIES) @rm -f test-xalloc-die$(EXEEXT) $(LINK) $(test_xalloc_die_OBJECTS) $(test_xalloc_die_LDADD) $(LIBS) -test-xstrtol$(EXEEXT): $(test_xstrtol_OBJECTS) $(test_xstrtol_DEPENDENCIES) +test-xstrtol$(EXEEXT): $(test_xstrtol_OBJECTS) $(test_xstrtol_DEPENDENCIES) $(EXTRA_test_xstrtol_DEPENDENCIES) @rm -f test-xstrtol$(EXEEXT) $(LINK) $(test_xstrtol_OBJECTS) $(test_xstrtol_LDADD) $(LIBS) -test-xstrtoul$(EXEEXT): $(test_xstrtoul_OBJECTS) $(test_xstrtoul_DEPENDENCIES) +test-xstrtoul$(EXEEXT): $(test_xstrtoul_OBJECTS) $(test_xstrtoul_DEPENDENCIES) $(EXTRA_test_xstrtoul_DEPENDENCIES) @rm -f test-xstrtoul$(EXEEXT) $(LINK) $(test_xstrtoul_OBJECTS) $(test_xstrtoul_LDADD) $(LIBS) -test-xstrtoumax$(EXEEXT): $(test_xstrtoumax_OBJECTS) $(test_xstrtoumax_DEPENDENCIES) +test-xstrtoumax$(EXEEXT): $(test_xstrtoumax_OBJECTS) $(test_xstrtoumax_DEPENDENCIES) $(EXTRA_test_xstrtoumax_DEPENDENCIES) @rm -f test-xstrtoumax$(EXEEXT) $(LINK) $(test_xstrtoumax_OBJECTS) $(test_xstrtoumax_LDADD) $(LIBS) -test-yesno$(EXEEXT): $(test_yesno_OBJECTS) $(test_yesno_DEPENDENCIES) +test-yesno$(EXEEXT): $(test_yesno_OBJECTS) $(test_yesno_DEPENDENCIES) $(EXTRA_test_yesno_DEPENDENCIES) @rm -f test-yesno$(EXEEXT) $(LINK) $(test_yesno_OBJECTS) $(test_yesno_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) - -rm -f glthread/lock.$(OBJEXT) -rm -f glthread/thread.$(OBJEXT) - -rm -f glthread/threadlib.$(OBJEXT) -rm -f uniwidth/test-uc_width.$(OBJEXT) -rm -f uniwidth/test-uc_width2.$(OBJEXT) distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anytostr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at-func.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary-io.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bind.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer-flag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer-flag.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftell.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpagesize.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getugroups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imaxtostr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inttostr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localename.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mgetgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/offtostr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/priv-set.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raise.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randomd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setsockopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig-handler.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-accept.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-areadlink-with-size.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-areadlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-areadlinkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-argmatch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-arpa_inet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-binary-io.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bind.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bitrotate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-btowc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-byteswap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-ctype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasestr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strstr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-canonicalize.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-chown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-chdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cloexec.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-close.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-closein.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-connect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ctype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirent-safer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup-safer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-environ.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-faccessat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fchdir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fchownat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-h.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-safer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fdopen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fdopendir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fgetc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-float.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fnmatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen-safer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpending.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpurge.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fputc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freadahead.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freading.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseek.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstatat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello3.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello4.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftruncate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fwrite.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getcwd-lgpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getcwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdelim.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdtablesize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getgroups.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gethostname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gettimeofday.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-hash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-i-ring.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ignore-value.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inet_pton.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-intprops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ioctl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isblank.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isfinite.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isinf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnand-nolibm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanf-nolibm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanl-nolibm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswblank.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lchown.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-listen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localeconv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lseek.Po@am__quote@ @@ -2937,28 +3938,44 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsstr3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memrchr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mkdir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mkdirat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-modf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nanosleep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-netinet_in.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-openat-safer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-openat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-parse-datetime.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pathmax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pipe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-priv-set.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-quotearg-simple.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-raise.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-read.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-readlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-readlinkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-realloc-gnu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-regex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rmdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select-fd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select-stdin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setsockopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigaction.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal-h.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigprocmask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sockets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-statat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdalign.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@ @@ -2966,22 +3983,37 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdlib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strcasestr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strerror.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strerror_r.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strftime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strnlen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strstr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtoul.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtoull.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtoumax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-symlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-symlinkat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_ioctl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_select.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_types.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_uio.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_utsname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_wait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-thread_create.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-thread_self.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-trunc1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-trunc2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-uname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unlinkat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unsetenv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-usleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-verify.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-version-etc.Po@am__quote@ @@ -2998,12 +4030,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uinttostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umaxtostr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlinkdir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usleep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctob.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctomb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/thread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/test-uc_width.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/test-uc_width2.Po@am__quote@ @@ -3239,14 +4268,15 @@ check-TESTS: $(TESTS) fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -3282,13 +4312,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -3327,10 +4354,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) @@ -3443,40 +4475,165 @@ uninstall-am: mostlyclean-local pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am + +# We need the following in order to create when the system +# doesn't have one. +arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) + $(AM_V_at)$(MKDIR_P) arpa + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ + -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \ + -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \ + -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \ + -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \ + -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \ + -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \ + -e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \ + -e 's|@''REPLACE_INET_PTON''@|$(REPLACE_INET_PTON)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/arpa_inet.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one. +@GL_GENERATE_NETINET_IN_H_TRUE@netinet/in.h: netinet_in.in.h $(top_builddir)/config.status +@GL_GENERATE_NETINET_IN_H_TRUE@ $(AM_V_at)$(MKDIR_P) netinet +@GL_GENERATE_NETINET_IN_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_NETINET_IN_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_NETINET_IN_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ +@GL_GENERATE_NETINET_IN_H_TRUE@ < $(srcdir)/netinet_in.in.h; \ +@GL_GENERATE_NETINET_IN_H_TRUE@ } > $@-t && \ +@GL_GENERATE_NETINET_IN_H_TRUE@ mv $@-t $@ +@GL_GENERATE_NETINET_IN_H_FALSE@netinet/in.h: $(top_builddir)/config.status +@GL_GENERATE_NETINET_IN_H_FALSE@ rm -f $@ + +# We need the following in order to create when the system +# doesn't have a complete one. +signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ + -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \ + -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \ + -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \ + -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ + -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ + -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \ + -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \ + -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \ + -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \ + -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \ + -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \ + -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \ + -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \ + -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \ + -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \ + -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/signal.in.h; \ + } > $@-t && \ + mv $@-t $@ # The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/arg-nonnull.h, except that it has the copyright header cut off. -arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h +# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut +# off. +arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_ARG_NONNULL/,$$p' \ - < $(top_srcdir)/build-aux/arg-nonnull.h \ + < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ > $@-t && \ mv $@-t $@ # The c++defs.h that gets inserted into generated .h files is the same as -# build-aux/c++defs.h, except that it has the copyright header cut off. -c++defs.h: $(top_srcdir)/build-aux/c++defs.h +# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. +c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/_GL_CXXDEFS/,$$p' \ - < $(top_srcdir)/build-aux/c++defs.h \ + < $(top_srcdir)/build-aux/snippet/c++defs.h \ > $@-t && \ mv $@-t $@ # The unused-parameter.h that gets inserted into generated .h files is the same -# as build-aux/unused-parameter.h, except that it has the copyright header cut -# off. -unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h +# as build-aux/snippet/unused-parameter.h, except that it has the copyright +# header cut off. +unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ - < $(top_srcdir)/build-aux/unused-parameter.h \ + < $(top_srcdir)/build-aux/snippet/unused-parameter.h \ > $@-t && \ mv $@-t $@ # The warn-on-use.h that gets inserted into generated .h files is the same as -# build-aux/warn-on-use.h, except that it has the copyright header cut off. -warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h +# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut +# off. +warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h $(AM_V_GEN)rm -f $@-t $@ && \ sed -n -e '/^.ifndef/,$$p' \ - < $(top_srcdir)/build-aux/warn-on-use.h \ + < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ > $@-t && \ mv $@-t $@ +# We need the following in order to create when the system +# does not have a complete one. +sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''HAVE_SYS_IOCTL_H''@|$(HAVE_SYS_IOCTL_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \ + -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \ + -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \ + -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ + -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_ioctl.in.h; \ + } > $@-t && \ + mv $@-t $@ + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) + $(AM_V_at)$(MKDIR_P) sys + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|GL|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ + -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ + -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \ + -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \ + -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \ + -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + < $(srcdir)/sys_select.in.h; \ + } > $@-t && \ + mv $@-t $@ + # Clean up after Solaris cc. clean-local: rm -rf SunWS_cache diff --git a/tests/accept.c b/tests/accept.c new file mode 100644 index 0000000..38ef59d --- /dev/null +++ b/tests/accept.c @@ -0,0 +1,52 @@ +/* accept.c --- wrappers for Windows accept function + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#undef accept + +int +rpl_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) +{ + SOCKET sock = FD_TO_SOCKET (fd); + + if (sock == INVALID_SOCKET) + { + errno = EBADF; + return -1; + } + else + { + SOCKET fh = accept (sock, addr, addrlen); + if (fh == INVALID_SOCKET) + { + set_winsock_errno (); + return -1; + } + else + return SOCKET_TO_FD (fh); + } +} diff --git a/tests/anytostr.c b/tests/anytostr.c index e23746a..011a31f 100644 --- a/tests/anytostr.c +++ b/tests/anytostr.c @@ -1,6 +1,6 @@ /* anytostr.c -- convert integers to printable strings - Copyright (C) 2001, 2006, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2001, 2006, 2008-2014 Free Software Foundation, Inc. This 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,6 +20,8 @@ /* Tell gcc not to warn about the (i < 0) test, below. */ #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ # pragma GCC diagnostic ignored "-Wtype-limits" +#elif defined __clang__ +# pragma clang diagnostic ignored "-Wtautological-compare" #endif #include diff --git a/tests/arpa_inet.in.h b/tests/arpa_inet.in.h new file mode 100644 index 0000000..b8c2e18 --- /dev/null +++ b/tests/arpa_inet.in.h @@ -0,0 +1,140 @@ +/* A GNU-like . + + Copyright (C) 2005-2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _@GUARD_PREFIX@_ARPA_INET_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if @HAVE_FEATURES_H@ +# include /* for __GLIBC__ */ +#endif + +/* Gnulib's sys/socket.h is responsible for defining socklen_t (used below) and + for pulling in winsock2.h etc. under MinGW. + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif + +/* On NonStop Kernel, inet_ntop and inet_pton are declared in . + But avoid namespace pollution on glibc systems. */ +#if defined __TANDEM && !defined __GLIBC__ +# include +#endif + +#if @HAVE_ARPA_INET_H@ + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@ + +#endif + +#ifndef _@GUARD_PREFIX@_ARPA_INET_H +#define _@GUARD_PREFIX@_ARPA_INET_H + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +#if @GNULIB_INET_NTOP@ +/* Converts an internet address from internal format to a printable, + presentable format. + AF is an internet address family, such as AF_INET or AF_INET6. + SRC points to a 'struct in_addr' (for AF_INET) or 'struct in6_addr' + (for AF_INET6). + DST points to a buffer having room for CNT bytes. + The printable representation of the address (in numeric form, not + surrounded by [...], no reverse DNS is done) is placed in DST, and + DST is returned. If an error occurs, the return value is NULL and + errno is set. If CNT bytes are not sufficient to hold the result, + the return value is NULL and errno is set to ENOSPC. A good value + for CNT is 46. + + For more details, see the POSIX:2001 specification + . */ +# if @REPLACE_INET_NTOP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef inet_ntop +# define inet_ntop rpl_inet_ntop +# endif +_GL_FUNCDECL_RPL (inet_ntop, const char *, + (int af, const void *restrict src, + char *restrict dst, socklen_t cnt) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (inet_ntop, const char *, + (int af, const void *restrict src, + char *restrict dst, socklen_t cnt)); +# else +# if !@HAVE_DECL_INET_NTOP@ +_GL_FUNCDECL_SYS (inet_ntop, const char *, + (int af, const void *restrict src, + char *restrict dst, socklen_t cnt) + _GL_ARG_NONNULL ((2, 3))); +# endif +/* Need to cast, because on NonStop Kernel, the fourth parameter is + size_t cnt. */ +_GL_CXXALIAS_SYS_CAST (inet_ntop, const char *, + (int af, const void *restrict src, + char *restrict dst, socklen_t cnt)); +# endif +_GL_CXXALIASWARN (inet_ntop); +#elif defined GNULIB_POSIXCHECK +# undef inet_ntop +# if HAVE_RAW_DECL_INET_NTOP +_GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - " + "use gnulib module inet_ntop for portability"); +# endif +#endif + +#if @GNULIB_INET_PTON@ +# if @REPLACE_INET_PTON@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef inet_pton +# define inet_pton rpl_inet_pton +# endif +_GL_FUNCDECL_RPL (inet_pton, int, + (int af, const char *restrict src, void *restrict dst) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (inet_pton, int, + (int af, const char *restrict src, void *restrict dst)); +# else +# if !@HAVE_DECL_INET_PTON@ +_GL_FUNCDECL_SYS (inet_pton, int, + (int af, const char *restrict src, void *restrict dst) + _GL_ARG_NONNULL ((2, 3))); +# endif +_GL_CXXALIAS_SYS (inet_pton, int, + (int af, const char *restrict src, void *restrict dst)); +# endif +_GL_CXXALIASWARN (inet_pton); +#elif defined GNULIB_POSIXCHECK +# undef inet_pton +# if HAVE_RAW_DECL_INET_PTON +_GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - " + "use gnulib module inet_pton for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_ARPA_INET_H */ +#endif /* _@GUARD_PREFIX@_ARPA_INET_H */ diff --git a/tests/at-func.c b/tests/at-func.c new file mode 100644 index 0000000..c8ee073 --- /dev/null +++ b/tests/at-func.c @@ -0,0 +1,146 @@ +/* Define at-style functions like fstatat, unlinkat, fchownat, etc. + Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering */ + +#include "dosname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ + +#ifdef GNULIB_SUPPORT_ONLY_AT_FDCWD +# include +# ifndef ENOTSUP +# define ENOTSUP EINVAL +# endif +#else +# include "openat.h" +# include "openat-priv.h" +# include "save-cwd.h" +#endif + +#ifdef AT_FUNC_USE_F1_COND +# define CALL_FUNC(F) \ + (flag == AT_FUNC_USE_F1_COND \ + ? AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS) \ + : AT_FUNC_F2 (F AT_FUNC_POST_FILE_ARGS)) +# define VALIDATE_FLAG(F) \ + if (flag & ~AT_FUNC_USE_F1_COND) \ + { \ + errno = EINVAL; \ + return FUNC_FAIL; \ + } +#else +# define CALL_FUNC(F) (AT_FUNC_F1 (F AT_FUNC_POST_FILE_ARGS)) +# define VALIDATE_FLAG(F) /* empty */ +#endif + +#ifdef AT_FUNC_RESULT +# define FUNC_RESULT AT_FUNC_RESULT +#else +# define FUNC_RESULT int +#endif + +#ifdef AT_FUNC_FAIL +# define FUNC_FAIL AT_FUNC_FAIL +#else +# define FUNC_FAIL -1 +#endif + +/* Call AT_FUNC_F1 to operate on FILE, which is in the directory + open on descriptor FD. If AT_FUNC_USE_F1_COND is defined to a value, + AT_FUNC_POST_FILE_PARAM_DECLS must include a parameter named flag; + call AT_FUNC_F2 if FLAG is 0 or fail if FLAG contains more bits than + AT_FUNC_USE_F1_COND. Return int and fail with -1 unless AT_FUNC_RESULT + or AT_FUNC_FAIL are defined. If possible, do it without changing the + working directory. Otherwise, resort to using save_cwd/fchdir, + then AT_FUNC_F?/restore_cwd. If either the save_cwd or the restore_cwd + fails, then give a diagnostic and exit nonzero. */ +FUNC_RESULT +AT_FUNC_NAME (int fd, char const *file AT_FUNC_POST_FILE_PARAM_DECLS) +{ + VALIDATE_FLAG (flag); + + if (fd == AT_FDCWD || IS_ABSOLUTE_FILE_NAME (file)) + return CALL_FUNC (file); + +#ifdef GNULIB_SUPPORT_ONLY_AT_FDCWD + errno = ENOTSUP; + return FUNC_FAIL; +#else + { + /* Be careful to choose names unlikely to conflict with + AT_FUNC_POST_FILE_PARAM_DECLS. */ + struct saved_cwd saved_cwd; + int saved_errno; + FUNC_RESULT err; + + { + char proc_buf[OPENAT_BUFFER_SIZE]; + char *proc_file = openat_proc_name (proc_buf, fd, file); + if (proc_file) + { + FUNC_RESULT proc_result = CALL_FUNC (proc_file); + int proc_errno = errno; + if (proc_file != proc_buf) + free (proc_file); + /* If the syscall succeeds, or if it fails with an unexpected + errno value, then return right away. Otherwise, fall through + and resort to using save_cwd/restore_cwd. */ + if (FUNC_FAIL != proc_result) + return proc_result; + if (! EXPECTED_ERRNO (proc_errno)) + { + errno = proc_errno; + return proc_result; + } + } + } + + if (save_cwd (&saved_cwd) != 0) + openat_save_fail (errno); + if (0 <= fd && fd == saved_cwd.desc) + { + /* If saving the working directory collides with the user's + requested fd, then the user's fd must have been closed to + begin with. */ + free_cwd (&saved_cwd); + errno = EBADF; + return FUNC_FAIL; + } + + if (fchdir (fd) != 0) + { + saved_errno = errno; + free_cwd (&saved_cwd); + errno = saved_errno; + return FUNC_FAIL; + } + + err = CALL_FUNC (file); + saved_errno = (err == FUNC_FAIL ? errno : 0); + + if (restore_cwd (&saved_cwd) != 0) + openat_restore_fail (errno); + + free_cwd (&saved_cwd); + + if (saved_errno) + errno = saved_errno; + return err; + } +#endif +} +#undef CALL_FUNC +#undef FUNC_RESULT +#undef FUNC_FAIL diff --git a/tests/binary-io.c b/tests/binary-io.c new file mode 100644 index 0000000..8bbdb44 --- /dev/null +++ b/tests/binary-io.c @@ -0,0 +1,3 @@ +#include +#define BINARY_IO_INLINE _GL_EXTERN_INLINE +#include "binary-io.h" diff --git a/tests/binary-io.h b/tests/binary-io.h index c09dbf5..7928f8c 100644 --- a/tests/binary-io.h +++ b/tests/binary-io.h @@ -1,5 +1,5 @@ /* Binary mode I/O. - Copyright (C) 2001, 2003, 2005, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2005, 2008-2014 Free Software Foundation, Inc. This 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,28 +25,51 @@ so we include it here first. */ #include -/* SET_BINARY (fd); - changes the file descriptor fd to perform binary I/O. */ +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_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. */ #if O_BINARY # if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__ # include /* declares setmode() */ +# define set_binary_mode setmode # else -# define setmode _setmode +# define set_binary_mode _setmode # undef fileno # define fileno _fileno # endif -# ifdef __DJGPP__ -# include /* declares isatty() */ - /* Avoid putting stdin/stdout in binary mode if it is connected to - the console, because that would make it impossible for the user - to interrupt the program through Ctrl-C or Ctrl-Break. */ -# define SET_BINARY(fd) ((void) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0)) -# else -# define SET_BINARY(fd) ((void) setmode (fd, O_BINARY)) -# endif #else - /* On reasonable systems, binary I/O is the default. */ -# define SET_BINARY(fd) /* do nothing */ ((void) 0) + /* On reasonable systems, binary I/O is the only choice. */ + /* Use a function rather than a macro, to avoid gcc warnings + "warning: statement with no effect". */ +BINARY_IO_INLINE int +set_binary_mode (int fd, int mode) +{ + (void) fd; + (void) mode; + return O_BINARY; +} #endif +/* SET_BINARY (fd); + changes the file descriptor fd to perform binary I/O. */ +#ifdef __DJGPP__ +# include /* declares isatty() */ + /* Avoid putting stdin/stdout in binary mode if it is connected to + the console, because that would make it impossible for the user + to interrupt the program through Ctrl-C or Ctrl-Break. */ +# define SET_BINARY(fd) ((void) (!isatty (fd) ? (set_binary_mode (fd, O_BINARY), 0) : 0)) +#else +# define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY)) +#endif + +_GL_INLINE_HEADER_END + #endif /* _BINARY_H */ diff --git a/tests/bind.c b/tests/bind.c new file mode 100644 index 0000000..aa5d344 --- /dev/null +++ b/tests/bind.c @@ -0,0 +1,49 @@ +/* bind.c --- wrappers for Windows bind function + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#undef bind + +int +rpl_bind (int fd, const struct sockaddr *sockaddr, socklen_t len) +{ + SOCKET sock = FD_TO_SOCKET (fd); + + if (sock == INVALID_SOCKET) + { + errno = EBADF; + return -1; + } + else + { + int r = bind (sock, sockaddr, len); + if (r < 0) + set_winsock_errno (); + + return r; + } +} diff --git a/tests/connect.c b/tests/connect.c new file mode 100644 index 0000000..8671278 --- /dev/null +++ b/tests/connect.c @@ -0,0 +1,56 @@ +/* connect.c --- wrappers for Windows connect function + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#undef connect + +int +rpl_connect (int fd, const struct sockaddr *sockaddr, socklen_t len) +{ + SOCKET sock = FD_TO_SOCKET (fd); + + if (sock == INVALID_SOCKET) + { + errno = EBADF; + return -1; + } + else + { + int r = connect (sock, sockaddr, len); + if (r < 0) + { + /* EINPROGRESS is not returned by WinSock 2.0; for backwards + compatibility, connect(2) uses EWOULDBLOCK. */ + if (WSAGetLastError () == WSAEWOULDBLOCK) + WSASetLastError (WSAEINPROGRESS); + + set_winsock_errno (); + } + + return r; + } +} diff --git a/tests/dup-safer-flag.c b/tests/dup-safer-flag.c index e922b91..2d860fb 100644 --- a/tests/dup-safer-flag.c +++ b/tests/dup-safer-flag.c @@ -1,7 +1,7 @@ /* Duplicate a file descriptor result, avoiding clobbering STD{IN,OUT,ERR}_FILENO, with specific flags. - Copyright (C) 2001, 2004-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2001, 2004-2006, 2009-2014 Free Software Foundation, Inc. This 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,8 +26,6 @@ #include #include -#include "cloexec.h" - /* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. If FLAG contains O_CLOEXEC, behave like fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD). */ diff --git a/tests/fd-safer-flag.c b/tests/fd-safer-flag.c index 2305b73..1701100 100644 --- a/tests/fd-safer-flag.c +++ b/tests/fd-safer-flag.c @@ -1,7 +1,7 @@ /* Adjust a file descriptor result so that it avoids clobbering STD{IN,OUT,ERR}_FILENO, with specific flags. - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. This 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/tests/fdopen.c b/tests/fdopen.c new file mode 100644 index 0000000..eded1a6 --- /dev/null +++ b/tests/fdopen.c @@ -0,0 +1,69 @@ +/* Open a stream with a given file descriptor. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +# include "msvc-inval.h" +#endif + +#undef fdopen + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static FILE * +fdopen_nothrow (int fd, const char *mode) +{ + FILE *result; + + TRY_MSVC_INVAL + { + result = fdopen (fd, mode); + } + CATCH_MSVC_INVAL + { + result = NULL; + } + DONE_MSVC_INVAL; + + return result; +} +#else +# define fdopen_nothrow fdopen +#endif + +FILE * +rpl_fdopen (int fd, const char *mode) +{ + int saved_errno = errno; + FILE *fp; + + errno = 0; + fp = fdopen_nothrow (fd, mode); + if (fp == NULL) + { + if (errno == 0) + errno = EBADF; + } + else + errno = saved_errno; + + return fp; +} diff --git a/tests/fpucw.h b/tests/fpucw.h new file mode 100644 index 0000000..9170c27 --- /dev/null +++ b/tests/fpucw.h @@ -0,0 +1,108 @@ +/* Manipulating the FPU control word. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2007. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _FPUCW_H +#define _FPUCW_H + +/* The i386 floating point hardware (the 387 compatible FPU, not the modern + SSE/SSE2 hardware) has a controllable rounding precision. It is specified + through the 'PC' bits in the FPU control word ('fctrl' register). (See + the GNU libc i386 header for details.) + + On some platforms, such as Linux or Solaris, the default precision setting + is set to "extended precision". This means that 'long double' instructions + operate correctly, but 'double' computations often produce slightly + different results as on strictly IEEE 754 conforming systems. + + On some platforms, such as NetBSD, the default precision is set to + "double precision". This means that 'long double' instructions will operate + only as 'double', i.e. lead to wrong results. Similarly on FreeBSD 6.4, at + least for the division of 'long double' numbers. + + The FPU control word is under control of the application, i.e. it is + not required to be set either way by the ABI. (In fact, the i386 ABI + http://refspecs.freestandards.org/elf/abi386-4.pdf page 3-12 = page 38 + is not clear about it. But in any case, gcc treats the control word + like a "preserved" register: it emits code that assumes that the control + word is preserved across calls, and it restores the control word at the + end of functions that modify it.) + + See Vincent Lefèvre's page http://www.vinc17.org/research/extended.en.html + for a good explanation. + See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for + some argumentation which setting should be the default. */ + +/* This header file provides the following facilities: + fpucw_t integral type holding the value of 'fctrl' + FPU_PC_MASK bit mask denoting the precision control + FPU_PC_DOUBLE precision control for 53 bits mantissa + FPU_PC_EXTENDED precision control for 64 bits mantissa + GET_FPUCW () yields the current FPU control word + SET_FPUCW (word) sets the FPU control word + DECL_LONG_DOUBLE_ROUNDING variable declaration for + BEGIN/END_LONG_DOUBLE_ROUNDING + BEGIN_LONG_DOUBLE_ROUNDING () starts a sequence of instructions with + 'long double' safe operation precision + END_LONG_DOUBLE_ROUNDING () ends a sequence of instructions with + 'long double' safe operation precision + */ + +/* Inline assembler like this works only with GNU C. */ +#if (defined __i386__ || defined __x86_64__) && defined __GNUC__ + +typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */ + +# define FPU_PC_MASK 0x0300 +# define FPU_PC_DOUBLE 0x200 /* glibc calls this _FPU_DOUBLE */ +# define FPU_PC_EXTENDED 0x300 /* glibc calls this _FPU_EXTENDED */ + +# define GET_FPUCW() \ + ({ fpucw_t _cw; \ + __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw)); \ + _cw; \ + }) +# define SET_FPUCW(word) \ + (void)({ fpucw_t _ncw = (word); \ + __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw)); \ + }) + +# define DECL_LONG_DOUBLE_ROUNDING \ + fpucw_t oldcw; +# define BEGIN_LONG_DOUBLE_ROUNDING() \ + (void)(oldcw = GET_FPUCW (), \ + SET_FPUCW ((oldcw & ~FPU_PC_MASK) | FPU_PC_EXTENDED)) +# define END_LONG_DOUBLE_ROUNDING() \ + SET_FPUCW (oldcw) + +#else + +typedef unsigned int fpucw_t; + +# define FPU_PC_MASK 0 +# define FPU_PC_DOUBLE 0 +# define FPU_PC_EXTENDED 0 + +# define GET_FPUCW() 0 +# define SET_FPUCW(word) (void)(word) + +# define DECL_LONG_DOUBLE_ROUNDING +# define BEGIN_LONG_DOUBLE_ROUNDING() +# define END_LONG_DOUBLE_ROUNDING() + +#endif + +#endif /* _FPUCW_H */ diff --git a/tests/ftell.c b/tests/ftell.c deleted file mode 100644 index 79083fb..0000000 --- a/tests/ftell.c +++ /dev/null @@ -1,38 +0,0 @@ -/* An ftell() function that works around platform bugs. - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include -/* Get off_t. */ -#include - -long -ftell (FILE *fp) -{ - /* Use the replacement ftello function with all its workarounds. */ - off_t offset = ftello (fp); - if (offset == (long)offset) - return (long)offset; - else - { - errno = EOVERFLOW; - return -1; - } -} diff --git a/tests/ftruncate.c b/tests/ftruncate.c new file mode 100644 index 0000000..d7a5f20 --- /dev/null +++ b/tests/ftruncate.c @@ -0,0 +1,188 @@ +/* ftruncate emulations for native Windows. + Copyright (C) 1992-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#include + +/* Specification. */ +#include + +#if HAVE_CHSIZE +/* A native Windows platform. */ + +# include + +# if _GL_WINDOWS_64_BIT_OFF_T + +/* Large File Support: off_t is 64-bit, but chsize() takes only a 32-bit + argument. So, define a 64-bit safe SetFileSize function ourselves. */ + +/* Ensure that declares GetFileSizeEx. */ +# undef _WIN32_WINNT +# define _WIN32_WINNT 0x500 + +/* Get declarations of the native Windows API functions. */ +# define WIN32_LEAN_AND_MEAN +# include + +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" + +static BOOL +SetFileSize (HANDLE h, LONGLONG size) +{ + LARGE_INTEGER old_size; + + if (!GetFileSizeEx (h, &old_size)) + return FALSE; + + if (size != old_size.QuadPart) + { + /* Duplicate the handle, so we are free to modify its file position. */ + HANDLE curr_process = GetCurrentProcess (); + HANDLE tmph; + + if (!DuplicateHandle (curr_process, /* SourceProcessHandle */ + h, /* SourceHandle */ + curr_process, /* TargetProcessHandle */ + (PHANDLE) &tmph, /* TargetHandle */ + (DWORD) 0, /* DesiredAccess */ + FALSE, /* InheritHandle */ + DUPLICATE_SAME_ACCESS)) /* Options */ + return FALSE; + + if (size < old_size.QuadPart) + { + /* Reduce the size. */ + LONG size_hi = (LONG) (size >> 32); + if (SetFilePointer (tmph, (LONG) size, &size_hi, FILE_BEGIN) + == INVALID_SET_FILE_POINTER + && GetLastError() != NO_ERROR) + { + CloseHandle (tmph); + return FALSE; + } + if (!SetEndOfFile (tmph)) + { + CloseHandle (tmph); + return FALSE; + } + } + else + { + /* Increase the size by adding zero bytes at the end. */ + static char zero_bytes[1024]; + LONG pos_hi = 0; + LONG pos_lo = SetFilePointer (tmph, (LONG) 0, &pos_hi, FILE_END); + LONGLONG pos; + if (pos_lo == INVALID_SET_FILE_POINTER + && GetLastError() != NO_ERROR) + { + CloseHandle (tmph); + return FALSE; + } + pos = ((LONGLONG) pos_hi << 32) | (ULONGLONG) (ULONG) pos_lo; + while (pos < size) + { + DWORD written; + LONGLONG count = size - pos; + if (count > sizeof (zero_bytes)) + count = sizeof (zero_bytes); + if (!WriteFile (tmph, zero_bytes, (DWORD) count, &written, NULL) + || written == 0) + { + CloseHandle (tmph); + return FALSE; + } + pos += (ULONGLONG) (ULONG) written; + } + } + /* Close the handle. */ + CloseHandle (tmph); + } + return TRUE; +} + +int +ftruncate (int fd, off_t length) +{ + HANDLE handle = (HANDLE) _get_osfhandle (fd); + + if (handle == INVALID_HANDLE_VALUE) + { + errno = EBADF; + return -1; + } + if (length < 0) + { + errno = EINVAL; + return -1; + } + if (!SetFileSize (handle, length)) + { + switch (GetLastError ()) + { + case ERROR_ACCESS_DENIED: + errno = EACCES; + break; + case ERROR_HANDLE_DISK_FULL: + case ERROR_DISK_FULL: + case ERROR_DISK_TOO_FRAGMENTED: + errno = ENOSPC; + break; + default: + errno = EIO; + break; + } + return -1; + } + return 0; +} + +# else + +# include + +# if HAVE_MSVC_INVALID_PARAMETER_HANDLER +# include "msvc-inval.h" +static int +chsize_nothrow (int fd, long length) +{ + int result; + + TRY_MSVC_INVAL + { + result = chsize (fd, length); + } + CATCH_MSVC_INVAL + { + result = -1; + errno = EBADF; + } + DONE_MSVC_INVAL; + + return result; +} +# define chsize chsize_nothrow +# endif + +int +ftruncate (int fd, off_t length) +{ + return chsize (fd, length); +} + +# endif +#endif diff --git a/tests/getpagesize.c b/tests/getpagesize.c index d7c1ba8..86e1271 100644 --- a/tests/getpagesize.c +++ b/tests/getpagesize.c @@ -1,6 +1,6 @@ /* getpagesize emulation for systems where it cannot be done in a C macro. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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,7 +22,7 @@ /* Specification. */ #include -/* This implementation is only for native Win32 systems. */ +/* This implementation is only for native Windows systems. */ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN diff --git a/tests/getugroups.c b/tests/getugroups.c deleted file mode 100644 index dc8089b..0000000 --- a/tests/getugroups.c +++ /dev/null @@ -1,125 +0,0 @@ -/* getugroups.c -- return a list of the groups a user is in - - Copyright (C) 1990-1991, 1998-2000, 2003-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by David MacKenzie. */ - -#include - -#include "getugroups.h" - -#include -#include -#include /* grp.h on alpha OSF1 V2.0 uses "FILE *". */ -#include -#include - -#if !HAVE_GRP_H - -/* Mingw lacks all things related to group management. The best we - can do is fail with ENOSYS. */ - -int -getugroups (int maxcount _GL_UNUSED, - gid_t *grouplist _GL_UNUSED, - char const *username _GL_UNUSED, - gid_t gid _GL_UNUSED) -{ - errno = ENOSYS; - return -1; -} - -#else /* HAVE_GRP_H */ -# include - -# define STREQ(a, b) (strcmp (a, b) == 0) - -/* Like `getgroups', but for user USERNAME instead of for the current - process. Store at most MAXCOUNT group IDs in the GROUPLIST array. - If GID is not -1, store it first (if possible). GID should be the - group ID (pw_gid) obtained from getpwuid, in case USERNAME is not - listed in /etc/groups. Upon failure, set errno and return -1. - Otherwise, return the number of IDs we've written into GROUPLIST. */ - -int -getugroups (int maxcount, gid_t *grouplist, char const *username, - gid_t gid) -{ - int count = 0; - - if (gid != (gid_t) -1) - { - if (maxcount != 0) - grouplist[count] = gid; - ++count; - } - - setgrent (); - while (1) - { - char **cp; - struct group *grp; - - errno = 0; - grp = getgrent (); - if (grp == NULL) - break; - - for (cp = grp->gr_mem; *cp; ++cp) - { - int n; - - if ( ! STREQ (username, *cp)) - continue; - - /* See if this group number is already on the list. */ - for (n = 0; n < count; ++n) - if (grouplist && grouplist[n] == grp->gr_gid) - break; - - /* If it's a new group number, then try to add it to the list. */ - if (n == count) - { - if (maxcount != 0) - { - if (count >= maxcount) - goto done; - grouplist[count] = grp->gr_gid; - } - if (count == INT_MAX) - { - errno = EOVERFLOW; - goto done; - } - count++; - } - } - } - - if (errno != 0) - count = -1; - - done: - { - int saved_errno = errno; - endgrent (); - errno = saved_errno; - } - - return count; -} - -#endif /* HAVE_GRP_H */ diff --git a/tests/getugroups.h b/tests/getugroups.h deleted file mode 100644 index 9df9952..0000000 --- a/tests/getugroups.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Get a list of group IDs associated with a specified user ID. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include -int getugroups (int maxcount, gid_t *grouplist, char const *username, - gid_t gid); diff --git a/tests/glthread/lock.c b/tests/glthread/lock.c deleted file mode 100644 index 64dbd3f..0000000 --- a/tests/glthread/lock.c +++ /dev/null @@ -1,1058 +0,0 @@ -/* Locking in multithreaded situations. - Copyright (C) 2005-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, - gthr-win32.h. */ - -#include - -#include "glthread/lock.h" - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -# if HAVE_PTHREAD_RWLOCK - -# if !defined PTHREAD_RWLOCK_INITIALIZER - -int -glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_rwlock_init (&lock->rwlock, NULL); - if (err != 0) - return err; - lock->initialized = 1; - return 0; -} - -int -glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) -{ - if (!lock->initialized) - { - int err; - - err = pthread_mutex_lock (&lock->guard); - if (err != 0) - return err; - if (!lock->initialized) - { - err = glthread_rwlock_init_multithreaded (lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->guard); - return err; - } - } - err = pthread_mutex_unlock (&lock->guard); - if (err != 0) - return err; - } - return pthread_rwlock_rdlock (&lock->rwlock); -} - -int -glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) -{ - if (!lock->initialized) - { - int err; - - err = pthread_mutex_lock (&lock->guard); - if (err != 0) - return err; - if (!lock->initialized) - { - err = glthread_rwlock_init_multithreaded (lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->guard); - return err; - } - } - err = pthread_mutex_unlock (&lock->guard); - if (err != 0) - return err; - } - return pthread_rwlock_wrlock (&lock->rwlock); -} - -int -glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) -{ - if (!lock->initialized) - return EINVAL; - return pthread_rwlock_unlock (&lock->rwlock); -} - -int -glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) -{ - int err; - - if (!lock->initialized) - return EINVAL; - err = pthread_rwlock_destroy (&lock->rwlock); - if (err != 0) - return err; - lock->initialized = 0; - return 0; -} - -# endif - -# else - -int -glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_init (&lock->lock, NULL); - if (err != 0) - return err; - err = pthread_cond_init (&lock->waiting_readers, NULL); - if (err != 0) - return err; - err = pthread_cond_init (&lock->waiting_writers, NULL); - if (err != 0) - return err; - lock->waiting_writers_count = 0; - lock->runcount = 0; - return 0; -} - -int -glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_lock (&lock->lock); - if (err != 0) - return err; - /* Test whether only readers are currently running, and whether the runcount - field will not overflow. */ - /* POSIX says: "It is implementation-defined whether the calling thread - acquires the lock when a writer does not hold the lock and there are - writers blocked on the lock." Let's say, no: give the writers a higher - priority. */ - while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_readers. */ - err = pthread_cond_wait (&lock->waiting_readers, &lock->lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->lock); - return err; - } - } - lock->runcount++; - return pthread_mutex_unlock (&lock->lock); -} - -int -glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_lock (&lock->lock); - if (err != 0) - return err; - /* Test whether no readers or writers are currently running. */ - while (!(lock->runcount == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_writers. */ - lock->waiting_writers_count++; - err = pthread_cond_wait (&lock->waiting_writers, &lock->lock); - if (err != 0) - { - lock->waiting_writers_count--; - pthread_mutex_unlock (&lock->lock); - return err; - } - lock->waiting_writers_count--; - } - lock->runcount--; /* runcount becomes -1 */ - return pthread_mutex_unlock (&lock->lock); -} - -int -glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_lock (&lock->lock); - if (err != 0) - return err; - if (lock->runcount < 0) - { - /* Drop a writer lock. */ - if (!(lock->runcount == -1)) - { - pthread_mutex_unlock (&lock->lock); - return EINVAL; - } - lock->runcount = 0; - } - else - { - /* Drop a reader lock. */ - if (!(lock->runcount > 0)) - { - pthread_mutex_unlock (&lock->lock); - return EINVAL; - } - lock->runcount--; - } - if (lock->runcount == 0) - { - /* POSIX recommends that "write locks shall take precedence over read - locks", to avoid "writer starvation". */ - if (lock->waiting_writers_count > 0) - { - /* Wake up one of the waiting writers. */ - err = pthread_cond_signal (&lock->waiting_writers); - if (err != 0) - { - pthread_mutex_unlock (&lock->lock); - return err; - } - } - else - { - /* Wake up all waiting readers. */ - err = pthread_cond_broadcast (&lock->waiting_readers); - if (err != 0) - { - pthread_mutex_unlock (&lock->lock); - return err; - } - } - } - return pthread_mutex_unlock (&lock->lock); -} - -int -glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_destroy (&lock->lock); - if (err != 0) - return err; - err = pthread_cond_destroy (&lock->waiting_readers); - if (err != 0) - return err; - err = pthread_cond_destroy (&lock->waiting_writers); - if (err != 0) - return err; - return 0; -} - -# endif - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -# if HAVE_PTHREAD_MUTEX_RECURSIVE - -# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - pthread_mutexattr_t attributes; - int err; - - err = pthread_mutexattr_init (&attributes); - if (err != 0) - return err; - err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutex_init (lock, &attributes); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutexattr_destroy (&attributes); - if (err != 0) - return err; - return 0; -} - -# else - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - pthread_mutexattr_t attributes; - int err; - - err = pthread_mutexattr_init (&attributes); - if (err != 0) - return err; - err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutex_init (&lock->recmutex, &attributes); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutexattr_destroy (&attributes); - if (err != 0) - return err; - lock->initialized = 1; - return 0; -} - -int -glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) -{ - if (!lock->initialized) - { - int err; - - err = pthread_mutex_lock (&lock->guard); - if (err != 0) - return err; - if (!lock->initialized) - { - err = glthread_recursive_lock_init_multithreaded (lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->guard); - return err; - } - } - err = pthread_mutex_unlock (&lock->guard); - if (err != 0) - return err; - } - return pthread_mutex_lock (&lock->recmutex); -} - -int -glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) -{ - if (!lock->initialized) - return EINVAL; - return pthread_mutex_unlock (&lock->recmutex); -} - -int -glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) -{ - int err; - - if (!lock->initialized) - return EINVAL; - err = pthread_mutex_destroy (&lock->recmutex); - if (err != 0) - return err; - lock->initialized = 0; - return 0; -} - -# endif - -# else - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - int err; - - err = pthread_mutex_init (&lock->mutex, NULL); - if (err != 0) - return err; - lock->owner = (pthread_t) 0; - lock->depth = 0; - return 0; -} - -int -glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) -{ - pthread_t self = pthread_self (); - if (lock->owner != self) - { - int err; - - err = pthread_mutex_lock (&lock->mutex); - if (err != 0) - return err; - lock->owner = self; - } - if (++(lock->depth) == 0) /* wraparound? */ - { - lock->depth--; - return EAGAIN; - } - return 0; -} - -int -glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) -{ - if (lock->owner != pthread_self ()) - return EPERM; - if (lock->depth == 0) - return EINVAL; - if (--(lock->depth) == 0) - { - lock->owner = (pthread_t) 0; - return pthread_mutex_unlock (&lock->mutex); - } - else - return 0; -} - -int -glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) -{ - if (lock->owner != (pthread_t) 0) - return EBUSY; - return pthread_mutex_destroy (&lock->mutex); -} - -# endif - -/* -------------------------- gl_once_t datatype -------------------------- */ - -static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT; - -int -glthread_once_singlethreaded (pthread_once_t *once_control) -{ - /* We don't know whether pthread_once_t is an integer type, a floating-point - type, a pointer type, or a structure type. */ - char *firstbyte = (char *)once_control; - if (*firstbyte == *(const char *)&fresh_once) - { - /* First time use of once_control. Invert the first byte. */ - *firstbyte = ~ *(const char *)&fresh_once; - return 1; - } - else - return 0; -} - -#endif - -/* ========================================================================= */ - -#if USE_PTH_THREADS - -/* Use the GNU Pth threads library. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -/* -------------------------- gl_once_t datatype -------------------------- */ - -static void -glthread_once_call (void *arg) -{ - void (**gl_once_temp_addr) (void) = (void (**) (void)) arg; - void (*initfunction) (void) = *gl_once_temp_addr; - initfunction (); -} - -int -glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)) -{ - void (*temp) (void) = initfunction; - return (!pth_once (once_control, glthread_once_call, &temp) ? errno : 0); -} - -int -glthread_once_singlethreaded (pth_once_t *once_control) -{ - /* We know that pth_once_t is an integer type. */ - if (*once_control == PTH_ONCE_INIT) - { - /* First time use of once_control. Invert the marker. */ - *once_control = ~ PTH_ONCE_INIT; - return 1; - } - else - return 0; -} - -#endif - -/* ========================================================================= */ - -#if USE_SOLARIS_THREADS - -/* Use the old Solaris threads library. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - int err; - - err = mutex_init (&lock->mutex, USYNC_THREAD, NULL); - if (err != 0) - return err; - lock->owner = (thread_t) 0; - lock->depth = 0; - return 0; -} - -int -glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) -{ - thread_t self = thr_self (); - if (lock->owner != self) - { - int err; - - err = mutex_lock (&lock->mutex); - if (err != 0) - return err; - lock->owner = self; - } - if (++(lock->depth) == 0) /* wraparound? */ - { - lock->depth--; - return EAGAIN; - } - return 0; -} - -int -glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) -{ - if (lock->owner != thr_self ()) - return EPERM; - if (lock->depth == 0) - return EINVAL; - if (--(lock->depth) == 0) - { - lock->owner = (thread_t) 0; - return mutex_unlock (&lock->mutex); - } - else - return 0; -} - -int -glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) -{ - if (lock->owner != (thread_t) 0) - return EBUSY; - return mutex_destroy (&lock->mutex); -} - -/* -------------------------- gl_once_t datatype -------------------------- */ - -int -glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)) -{ - if (!once_control->inited) - { - int err; - - /* Use the mutex to guarantee that if another thread is already calling - the initfunction, this thread waits until it's finished. */ - err = mutex_lock (&once_control->mutex); - if (err != 0) - return err; - if (!once_control->inited) - { - once_control->inited = 1; - initfunction (); - } - return mutex_unlock (&once_control->mutex); - } - else - return 0; -} - -int -glthread_once_singlethreaded (gl_once_t *once_control) -{ - /* We know that gl_once_t contains an integer type. */ - if (!once_control->inited) - { - /* First time use of once_control. Invert the marker. */ - once_control->inited = ~ 0; - return 1; - } - else - return 0; -} - -#endif - -/* ========================================================================= */ - -#if USE_WIN32_THREADS - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -void -glthread_lock_init_func (gl_lock_t *lock) -{ - InitializeCriticalSection (&lock->lock); - lock->guard.done = 1; -} - -int -glthread_lock_lock_func (gl_lock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glthread_lock_init (lock); - else - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - EnterCriticalSection (&lock->lock); - return 0; -} - -int -glthread_lock_unlock_func (gl_lock_t *lock) -{ - if (!lock->guard.done) - return EINVAL; - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glthread_lock_destroy_func (gl_lock_t *lock) -{ - if (!lock->guard.done) - return EINVAL; - DeleteCriticalSection (&lock->lock); - lock->guard.done = 0; - return 0; -} - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -/* In this file, the waitqueues are implemented as circular arrays. */ -#define gl_waitqueue_t gl_carray_waitqueue_t - -static inline void -gl_waitqueue_init (gl_waitqueue_t *wq) -{ - wq->array = NULL; - wq->count = 0; - wq->alloc = 0; - wq->offset = 0; -} - -/* Enqueues the current thread, represented by an event, in a wait queue. - Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */ -static HANDLE -gl_waitqueue_add (gl_waitqueue_t *wq) -{ - HANDLE event; - unsigned int index; - - if (wq->count == wq->alloc) - { - unsigned int new_alloc = 2 * wq->alloc + 1; - HANDLE *new_array = - (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE)); - if (new_array == NULL) - /* No more memory. */ - return INVALID_HANDLE_VALUE; - /* Now is a good opportunity to rotate the array so that its contents - starts at offset 0. */ - if (wq->offset > 0) - { - unsigned int old_count = wq->count; - unsigned int old_alloc = wq->alloc; - unsigned int old_offset = wq->offset; - unsigned int i; - if (old_offset + old_count > old_alloc) - { - unsigned int limit = old_offset + old_count - old_alloc; - for (i = 0; i < limit; i++) - new_array[old_alloc + i] = new_array[i]; - } - for (i = 0; i < old_count; i++) - new_array[i] = new_array[old_offset + i]; - wq->offset = 0; - } - wq->array = new_array; - wq->alloc = new_alloc; - } - /* Whether the created event is a manual-reset one or an auto-reset one, - does not matter, since we will wait on it only once. */ - event = CreateEvent (NULL, TRUE, FALSE, NULL); - if (event == INVALID_HANDLE_VALUE) - /* No way to allocate an event. */ - return INVALID_HANDLE_VALUE; - index = wq->offset + wq->count; - if (index >= wq->alloc) - index -= wq->alloc; - wq->array[index] = event; - wq->count++; - return event; -} - -/* Notifies the first thread from a wait queue and dequeues it. */ -static inline void -gl_waitqueue_notify_first (gl_waitqueue_t *wq) -{ - SetEvent (wq->array[wq->offset + 0]); - wq->offset++; - wq->count--; - if (wq->count == 0 || wq->offset == wq->alloc) - wq->offset = 0; -} - -/* Notifies all threads from a wait queue and dequeues them all. */ -static inline void -gl_waitqueue_notify_all (gl_waitqueue_t *wq) -{ - unsigned int i; - - for (i = 0; i < wq->count; i++) - { - unsigned int index = wq->offset + i; - if (index >= wq->alloc) - index -= wq->alloc; - SetEvent (wq->array[index]); - } - wq->count = 0; - wq->offset = 0; -} - -void -glthread_rwlock_init_func (gl_rwlock_t *lock) -{ - InitializeCriticalSection (&lock->lock); - gl_waitqueue_init (&lock->waiting_readers); - gl_waitqueue_init (&lock->waiting_writers); - lock->runcount = 0; - lock->guard.done = 1; -} - -int -glthread_rwlock_rdlock_func (gl_rwlock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glthread_rwlock_init (lock); - else - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - EnterCriticalSection (&lock->lock); - /* Test whether only readers are currently running, and whether the runcount - field will not overflow. */ - if (!(lock->runcount + 1 > 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_readers. */ - HANDLE event = gl_waitqueue_add (&lock->waiting_readers); - if (event != INVALID_HANDLE_VALUE) - { - DWORD result; - LeaveCriticalSection (&lock->lock); - /* Wait until another thread signals this event. */ - result = WaitForSingleObject (event, INFINITE); - if (result == WAIT_FAILED || result == WAIT_TIMEOUT) - abort (); - CloseHandle (event); - /* The thread which signalled the event already did the bookkeeping: - removed us from the waiting_readers, incremented lock->runcount. */ - if (!(lock->runcount > 0)) - abort (); - return 0; - } - else - { - /* Allocation failure. Weird. */ - do - { - LeaveCriticalSection (&lock->lock); - Sleep (1); - EnterCriticalSection (&lock->lock); - } - while (!(lock->runcount + 1 > 0)); - } - } - lock->runcount++; - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glthread_rwlock_wrlock_func (gl_rwlock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glthread_rwlock_init (lock); - else - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - EnterCriticalSection (&lock->lock); - /* Test whether no readers or writers are currently running. */ - if (!(lock->runcount == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_writers. */ - HANDLE event = gl_waitqueue_add (&lock->waiting_writers); - if (event != INVALID_HANDLE_VALUE) - { - DWORD result; - LeaveCriticalSection (&lock->lock); - /* Wait until another thread signals this event. */ - result = WaitForSingleObject (event, INFINITE); - if (result == WAIT_FAILED || result == WAIT_TIMEOUT) - abort (); - CloseHandle (event); - /* The thread which signalled the event already did the bookkeeping: - removed us from the waiting_writers, set lock->runcount = -1. */ - if (!(lock->runcount == -1)) - abort (); - return 0; - } - else - { - /* Allocation failure. Weird. */ - do - { - LeaveCriticalSection (&lock->lock); - Sleep (1); - EnterCriticalSection (&lock->lock); - } - while (!(lock->runcount == 0)); - } - } - lock->runcount--; /* runcount becomes -1 */ - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glthread_rwlock_unlock_func (gl_rwlock_t *lock) -{ - if (!lock->guard.done) - return EINVAL; - EnterCriticalSection (&lock->lock); - if (lock->runcount < 0) - { - /* Drop a writer lock. */ - if (!(lock->runcount == -1)) - abort (); - lock->runcount = 0; - } - else - { - /* Drop a reader lock. */ - if (!(lock->runcount > 0)) - { - LeaveCriticalSection (&lock->lock); - return EPERM; - } - lock->runcount--; - } - if (lock->runcount == 0) - { - /* POSIX recommends that "write locks shall take precedence over read - locks", to avoid "writer starvation". */ - if (lock->waiting_writers.count > 0) - { - /* Wake up one of the waiting writers. */ - lock->runcount--; - gl_waitqueue_notify_first (&lock->waiting_writers); - } - else - { - /* Wake up all waiting readers. */ - lock->runcount += lock->waiting_readers.count; - gl_waitqueue_notify_all (&lock->waiting_readers); - } - } - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glthread_rwlock_destroy_func (gl_rwlock_t *lock) -{ - if (!lock->guard.done) - return EINVAL; - if (lock->runcount != 0) - return EBUSY; - DeleteCriticalSection (&lock->lock); - if (lock->waiting_readers.array != NULL) - free (lock->waiting_readers.array); - if (lock->waiting_writers.array != NULL) - free (lock->waiting_writers.array); - lock->guard.done = 0; - return 0; -} - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -void -glthread_recursive_lock_init_func (gl_recursive_lock_t *lock) -{ - lock->owner = 0; - lock->depth = 0; - InitializeCriticalSection (&lock->lock); - lock->guard.done = 1; -} - -int -glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glthread_recursive_lock_init (lock); - else - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - { - DWORD self = GetCurrentThreadId (); - if (lock->owner != self) - { - EnterCriticalSection (&lock->lock); - lock->owner = self; - } - if (++(lock->depth) == 0) /* wraparound? */ - { - lock->depth--; - return EAGAIN; - } - } - return 0; -} - -int -glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock) -{ - if (lock->owner != GetCurrentThreadId ()) - return EPERM; - if (lock->depth == 0) - return EINVAL; - if (--(lock->depth) == 0) - { - lock->owner = 0; - LeaveCriticalSection (&lock->lock); - } - return 0; -} - -int -glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock) -{ - if (lock->owner != 0) - return EBUSY; - DeleteCriticalSection (&lock->lock); - lock->guard.done = 0; - return 0; -} - -/* -------------------------- gl_once_t datatype -------------------------- */ - -void -glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)) -{ - if (once_control->inited <= 0) - { - if (InterlockedIncrement (&once_control->started) == 0) - { - /* This thread is the first one to come to this once_control. */ - InitializeCriticalSection (&once_control->lock); - EnterCriticalSection (&once_control->lock); - once_control->inited = 0; - initfunction (); - once_control->inited = 1; - LeaveCriticalSection (&once_control->lock); - } - else - { - /* Undo last operation. */ - InterlockedDecrement (&once_control->started); - /* Some other thread has already started the initialization. - Yield the CPU while waiting for the other thread to finish - initializing and taking the lock. */ - while (once_control->inited < 0) - Sleep (0); - if (once_control->inited <= 0) - { - /* Take the lock. This blocks until the other thread has - finished calling the initfunction. */ - EnterCriticalSection (&once_control->lock); - LeaveCriticalSection (&once_control->lock); - if (!(once_control->inited > 0)) - abort (); - } - } - } -} - -#endif - -/* ========================================================================= */ diff --git a/tests/glthread/lock.h b/tests/glthread/lock.h deleted file mode 100644 index 6267500..0000000 --- a/tests/glthread/lock.h +++ /dev/null @@ -1,927 +0,0 @@ -/* Locking in multithreaded situations. - Copyright (C) 2005-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, - gthr-win32.h. */ - -/* This file contains locking primitives for use with a given thread library. - It does not contain primitives for creating threads or for other - synchronization primitives. - - Normal (non-recursive) locks: - Type: gl_lock_t - Declaration: gl_lock_define(extern, name) - Initializer: gl_lock_define_initialized(, name) - Initialization: gl_lock_init (name); - Taking the lock: gl_lock_lock (name); - Releasing the lock: gl_lock_unlock (name); - De-initialization: gl_lock_destroy (name); - Equivalent functions with control of error handling: - Initialization: err = glthread_lock_init (&name); - Taking the lock: err = glthread_lock_lock (&name); - Releasing the lock: err = glthread_lock_unlock (&name); - De-initialization: err = glthread_lock_destroy (&name); - - Read-Write (non-recursive) locks: - Type: gl_rwlock_t - Declaration: gl_rwlock_define(extern, name) - Initializer: gl_rwlock_define_initialized(, name) - Initialization: gl_rwlock_init (name); - Taking the lock: gl_rwlock_rdlock (name); - gl_rwlock_wrlock (name); - Releasing the lock: gl_rwlock_unlock (name); - De-initialization: gl_rwlock_destroy (name); - Equivalent functions with control of error handling: - Initialization: err = glthread_rwlock_init (&name); - Taking the lock: err = glthread_rwlock_rdlock (&name); - err = glthread_rwlock_wrlock (&name); - Releasing the lock: err = glthread_rwlock_unlock (&name); - De-initialization: err = glthread_rwlock_destroy (&name); - - Recursive locks: - Type: gl_recursive_lock_t - Declaration: gl_recursive_lock_define(extern, name) - Initializer: gl_recursive_lock_define_initialized(, name) - Initialization: gl_recursive_lock_init (name); - Taking the lock: gl_recursive_lock_lock (name); - Releasing the lock: gl_recursive_lock_unlock (name); - De-initialization: gl_recursive_lock_destroy (name); - Equivalent functions with control of error handling: - Initialization: err = glthread_recursive_lock_init (&name); - Taking the lock: err = glthread_recursive_lock_lock (&name); - Releasing the lock: err = glthread_recursive_lock_unlock (&name); - De-initialization: err = glthread_recursive_lock_destroy (&name); - - Once-only execution: - Type: gl_once_t - Initializer: gl_once_define(extern, name) - Execution: gl_once (name, initfunction); - Equivalent functions with control of error handling: - Execution: err = glthread_once (&name, initfunction); -*/ - - -#ifndef _LOCK_H -#define _LOCK_H - -#include -#include - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* Use the POSIX threads library. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# if PTHREAD_IN_USE_DETECTION_HARD - -/* The pthread_in_use() detection needs to be done at runtime. */ -# define pthread_in_use() \ - glthread_in_use () -extern int glthread_in_use (void); - -# endif - -# if USE_POSIX_THREADS_WEAK - -/* Use weak references to the POSIX threads library. */ - -/* Weak references avoid dragging in external libraries if the other parts - of the program don't use them. Here we use them, because we don't want - every program that uses libintl to depend on libpthread. This assumes - that libpthread would not be loaded after libintl; i.e. if libintl is - loaded first, by an executable that does not depend on libpthread, and - then a module is dynamically loaded that depends on libpthread, libintl - will not be multithread-safe. */ - -/* The way to test at runtime whether libpthread is present is to test - whether a function pointer's value, such as &pthread_mutex_init, is - non-NULL. However, some versions of GCC have a bug through which, in - PIC mode, &foo != NULL always evaluates to true if there is a direct - call to foo(...) in the same function. To avoid this, we test the - address of a function in libpthread that we don't use. */ - -# pragma weak pthread_mutex_init -# pragma weak pthread_mutex_lock -# pragma weak pthread_mutex_unlock -# pragma weak pthread_mutex_destroy -# pragma weak pthread_rwlock_init -# pragma weak pthread_rwlock_rdlock -# pragma weak pthread_rwlock_wrlock -# pragma weak pthread_rwlock_unlock -# pragma weak pthread_rwlock_destroy -# pragma weak pthread_once -# pragma weak pthread_cond_init -# pragma weak pthread_cond_wait -# pragma weak pthread_cond_signal -# pragma weak pthread_cond_broadcast -# pragma weak pthread_cond_destroy -# pragma weak pthread_mutexattr_init -# pragma weak pthread_mutexattr_settype -# pragma weak pthread_mutexattr_destroy -# ifndef pthread_self -# pragma weak pthread_self -# endif - -# if !PTHREAD_IN_USE_DETECTION_HARD -# pragma weak pthread_cancel -# define pthread_in_use() (pthread_cancel != NULL) -# endif - -# else - -# if !PTHREAD_IN_USE_DETECTION_HARD -# define pthread_in_use() 1 -# endif - -# endif - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef pthread_mutex_t gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME; -# define gl_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer; -# define gl_lock_initializer \ - PTHREAD_MUTEX_INITIALIZER -# define glthread_lock_init(LOCK) \ - (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0) -# define glthread_lock_lock(LOCK) \ - (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) -# define glthread_lock_unlock(LOCK) \ - (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) -# define glthread_lock_destroy(LOCK) \ - (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -# if HAVE_PTHREAD_RWLOCK - -# ifdef PTHREAD_RWLOCK_INITIALIZER - -typedef pthread_rwlock_t gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - PTHREAD_RWLOCK_INITIALIZER -# define glthread_rwlock_init(LOCK) \ - (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0) - -# else - -typedef struct - { - int initialized; - pthread_mutex_t guard; /* protects the initialization */ - pthread_rwlock_t rwlock; /* read-write lock */ - } - gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - { 0, PTHREAD_MUTEX_INITIALIZER } -# define glthread_rwlock_init(LOCK) \ - (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) -extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); - -# endif - -# else - -typedef struct - { - pthread_mutex_t lock; /* protects the remaining fields */ - pthread_cond_t waiting_readers; /* waiting readers */ - pthread_cond_t waiting_writers; /* waiting writers */ - unsigned int waiting_writers_count; /* number of waiting writers */ - int runcount; /* number of readers running, or -1 when a writer runs */ - } - gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } -# define glthread_rwlock_init(LOCK) \ - (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) -extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); - -# endif - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -# if HAVE_PTHREAD_MUTEX_RECURSIVE - -# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - -typedef pthread_mutex_t gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer; -# ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER -# define gl_recursive_lock_initializer \ - PTHREAD_RECURSIVE_MUTEX_INITIALIZER -# else -# define gl_recursive_lock_initializer \ - PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP -# endif -# define glthread_recursive_lock_init(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); - -# else - -typedef struct - { - pthread_mutex_t recmutex; /* recursive mutex */ - pthread_mutex_t guard; /* protects the initialization */ - int initialized; - } - gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 } -# define glthread_recursive_lock_init(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); - -# endif - -# else - -/* Old versions of POSIX threads on Solaris did not have recursive locks. - We have to implement them ourselves. */ - -typedef struct - { - pthread_mutex_t mutex; - pthread_t owner; - unsigned long depth; - } - gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 } -# define glthread_recursive_lock_init(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); - -# endif - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef pthread_once_t gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (pthread_in_use () \ - ? pthread_once (ONCE_CONTROL, INITFUNCTION) \ - : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) -extern int glthread_once_singlethreaded (pthread_once_t *once_control); - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_PTH_THREADS - -/* Use the GNU Pth threads library. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# if USE_PTH_THREADS_WEAK - -/* Use weak references to the GNU Pth threads library. */ - -# pragma weak pth_mutex_init -# pragma weak pth_mutex_acquire -# pragma weak pth_mutex_release -# pragma weak pth_rwlock_init -# pragma weak pth_rwlock_acquire -# pragma weak pth_rwlock_release -# pragma weak pth_once - -# pragma weak pth_cancel -# define pth_in_use() (pth_cancel != NULL) - -# else - -# define pth_in_use() 1 - -# endif - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef pth_mutex_t gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS pth_mutex_t NAME; -# define gl_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pth_mutex_t NAME = gl_lock_initializer; -# define gl_lock_initializer \ - PTH_MUTEX_INIT -# define glthread_lock_init(LOCK) \ - (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) -# define glthread_lock_lock(LOCK) \ - (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) -# define glthread_lock_unlock(LOCK) \ - (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) -# define glthread_lock_destroy(LOCK) \ - ((void)(LOCK), 0) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -typedef pth_rwlock_t gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS pth_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - PTH_RWLOCK_INIT -# define glthread_rwlock_init(LOCK) \ - (pth_in_use () && !pth_rwlock_init (LOCK) ? errno : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? errno : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? errno : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pth_in_use () && !pth_rwlock_release (LOCK) ? errno : 0) -# define glthread_rwlock_destroy(LOCK) \ - ((void)(LOCK), 0) - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -/* In Pth, mutexes are recursive by default. */ -typedef pth_mutex_t gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS pth_mutex_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - PTH_MUTEX_INIT -# define glthread_recursive_lock_init(LOCK) \ - (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - ((void)(LOCK), 0) - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef pth_once_t gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (pth_in_use () \ - ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ - : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) -extern int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)); -extern int glthread_once_singlethreaded (pth_once_t *once_control); - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_SOLARIS_THREADS - -/* Use the old Solaris threads library. */ - -# include -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# if USE_SOLARIS_THREADS_WEAK - -/* Use weak references to the old Solaris threads library. */ - -# pragma weak mutex_init -# pragma weak mutex_lock -# pragma weak mutex_unlock -# pragma weak mutex_destroy -# pragma weak rwlock_init -# pragma weak rw_rdlock -# pragma weak rw_wrlock -# pragma weak rw_unlock -# pragma weak rwlock_destroy -# pragma weak thr_self - -# pragma weak thr_suspend -# define thread_in_use() (thr_suspend != NULL) - -# else - -# define thread_in_use() 1 - -# endif - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef mutex_t gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS mutex_t NAME; -# define gl_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS mutex_t NAME = gl_lock_initializer; -# define gl_lock_initializer \ - DEFAULTMUTEX -# define glthread_lock_init(LOCK) \ - (thread_in_use () ? mutex_init (LOCK, USYNC_THREAD, NULL) : 0) -# define glthread_lock_lock(LOCK) \ - (thread_in_use () ? mutex_lock (LOCK) : 0) -# define glthread_lock_unlock(LOCK) \ - (thread_in_use () ? mutex_unlock (LOCK) : 0) -# define glthread_lock_destroy(LOCK) \ - (thread_in_use () ? mutex_destroy (LOCK) : 0) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -typedef rwlock_t gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - DEFAULTRWLOCK -# define glthread_rwlock_init(LOCK) \ - (thread_in_use () ? rwlock_init (LOCK, USYNC_THREAD, NULL) : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (thread_in_use () ? rw_rdlock (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (thread_in_use () ? rw_wrlock (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (thread_in_use () ? rw_unlock (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (thread_in_use () ? rwlock_destroy (LOCK) : 0) - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -/* Old Solaris threads did not have recursive locks. - We have to implement them ourselves. */ - -typedef struct - { - mutex_t mutex; - thread_t owner; - unsigned long depth; - } - gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - { DEFAULTMUTEX, (thread_t) 0, 0 } -# define glthread_recursive_lock_init(LOCK) \ - (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef struct - { - volatile int inited; - mutex_t mutex; - } - gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX }; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (thread_in_use () \ - ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ - : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) -extern int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)); -extern int glthread_once_singlethreaded (gl_once_t *once_control); - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_WIN32_THREADS - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -/* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex, - Semaphore types, because - - we need only to synchronize inside a single process (address space), - not inter-process locking, - - we don't need to support trylock operations. (TryEnterCriticalSection - does not work on Windows 95/98/ME. Packages that need trylock usually - define their own mutex type.) */ - -/* There is no way to statically initialize a CRITICAL_SECTION. It needs - to be done lazily, once only. For this we need spinlocks. */ - -typedef struct { volatile int done; volatile long started; } gl_spinlock_t; - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef struct - { - gl_spinlock_t guard; /* protects the initialization */ - CRITICAL_SECTION lock; - } - gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_lock_t NAME; -# define gl_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_lock_t NAME = gl_lock_initializer; -# define gl_lock_initializer \ - { { 0, -1 } } -# define glthread_lock_init(LOCK) \ - (glthread_lock_init_func (LOCK), 0) -# define glthread_lock_lock(LOCK) \ - glthread_lock_lock_func (LOCK) -# define glthread_lock_unlock(LOCK) \ - glthread_lock_unlock_func (LOCK) -# define glthread_lock_destroy(LOCK) \ - glthread_lock_destroy_func (LOCK) -extern void glthread_lock_init_func (gl_lock_t *lock); -extern int glthread_lock_lock_func (gl_lock_t *lock); -extern int glthread_lock_unlock_func (gl_lock_t *lock); -extern int glthread_lock_destroy_func (gl_lock_t *lock); - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -/* It is impossible to implement read-write locks using plain locks, without - introducing an extra thread dedicated to managing read-write locks. - Therefore here we need to use the low-level Event type. */ - -typedef struct - { - HANDLE *array; /* array of waiting threads, each represented by an event */ - unsigned int count; /* number of waiting threads */ - unsigned int alloc; /* length of allocated array */ - unsigned int offset; /* index of first waiting thread in array */ - } - gl_carray_waitqueue_t; -typedef struct - { - gl_spinlock_t guard; /* protects the initialization */ - CRITICAL_SECTION lock; /* protects the remaining fields */ - gl_carray_waitqueue_t waiting_readers; /* waiting readers */ - gl_carray_waitqueue_t waiting_writers; /* waiting writers */ - int runcount; /* number of readers running, or -1 when a writer runs */ - } - gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - { { 0, -1 } } -# define glthread_rwlock_init(LOCK) \ - (glthread_rwlock_init_func (LOCK), 0) -# define glthread_rwlock_rdlock(LOCK) \ - glthread_rwlock_rdlock_func (LOCK) -# define glthread_rwlock_wrlock(LOCK) \ - glthread_rwlock_wrlock_func (LOCK) -# define glthread_rwlock_unlock(LOCK) \ - glthread_rwlock_unlock_func (LOCK) -# define glthread_rwlock_destroy(LOCK) \ - glthread_rwlock_destroy_func (LOCK) -extern void glthread_rwlock_init_func (gl_rwlock_t *lock); -extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock); -extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock); -extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock); -extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock); - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -/* The Win32 documentation says that CRITICAL_SECTION already implements a - recursive lock. But we need not rely on it: It's easy to implement a - recursive lock without this assumption. */ - -typedef struct - { - gl_spinlock_t guard; /* protects the initialization */ - DWORD owner; - unsigned long depth; - CRITICAL_SECTION lock; - } - gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - { { 0, -1 }, 0, 0 } -# define glthread_recursive_lock_init(LOCK) \ - (glthread_recursive_lock_init_func (LOCK), 0) -# define glthread_recursive_lock_lock(LOCK) \ - glthread_recursive_lock_lock_func (LOCK) -# define glthread_recursive_lock_unlock(LOCK) \ - glthread_recursive_lock_unlock_func (LOCK) -# define glthread_recursive_lock_destroy(LOCK) \ - glthread_recursive_lock_destroy_func (LOCK) -extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock); - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef struct - { - volatile int inited; - volatile long started; - CRITICAL_SECTION lock; - } - gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_once_t NAME = { -1, -1 }; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (glthread_once_func (ONCE_CONTROL, INITFUNCTION), 0) -extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)); - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) - -/* Provide dummy implementation if threads are not supported. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef int gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) -# define gl_lock_define_initialized(STORAGECLASS, NAME) -# define glthread_lock_init(NAME) 0 -# define glthread_lock_lock(NAME) 0 -# define glthread_lock_unlock(NAME) 0 -# define glthread_lock_destroy(NAME) 0 - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -typedef int gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) -# define glthread_rwlock_init(NAME) 0 -# define glthread_rwlock_rdlock(NAME) 0 -# define glthread_rwlock_wrlock(NAME) 0 -# define glthread_rwlock_unlock(NAME) 0 -# define glthread_rwlock_destroy(NAME) 0 - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -typedef int gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) -# define glthread_recursive_lock_init(NAME) 0 -# define glthread_recursive_lock_lock(NAME) 0 -# define glthread_recursive_lock_unlock(NAME) 0 -# define glthread_recursive_lock_destroy(NAME) 0 - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef int gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_once_t NAME = 0; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0) - -#endif - -/* ========================================================================= */ - -/* Macros with built-in error handling. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -#define gl_lock_init(NAME) \ - do \ - { \ - if (glthread_lock_init (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_lock_lock(NAME) \ - do \ - { \ - if (glthread_lock_lock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_lock_unlock(NAME) \ - do \ - { \ - if (glthread_lock_unlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_lock_destroy(NAME) \ - do \ - { \ - if (glthread_lock_destroy (&NAME)) \ - abort (); \ - } \ - while (0) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -#define gl_rwlock_init(NAME) \ - do \ - { \ - if (glthread_rwlock_init (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_rdlock(NAME) \ - do \ - { \ - if (glthread_rwlock_rdlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_wrlock(NAME) \ - do \ - { \ - if (glthread_rwlock_wrlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_unlock(NAME) \ - do \ - { \ - if (glthread_rwlock_unlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_destroy(NAME) \ - do \ - { \ - if (glthread_rwlock_destroy (&NAME)) \ - abort (); \ - } \ - while (0) - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -#define gl_recursive_lock_init(NAME) \ - do \ - { \ - if (glthread_recursive_lock_init (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_recursive_lock_lock(NAME) \ - do \ - { \ - if (glthread_recursive_lock_lock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_recursive_lock_unlock(NAME) \ - do \ - { \ - if (glthread_recursive_lock_unlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_recursive_lock_destroy(NAME) \ - do \ - { \ - if (glthread_recursive_lock_destroy (&NAME)) \ - abort (); \ - } \ - while (0) - -/* -------------------------- gl_once_t datatype -------------------------- */ - -#define gl_once(NAME, INITFUNCTION) \ - do \ - { \ - if (glthread_once (&NAME, INITFUNCTION)) \ - abort (); \ - } \ - while (0) - -/* ========================================================================= */ - -#endif /* _LOCK_H */ diff --git a/tests/glthread/thread.c b/tests/glthread/thread.c index bb40092..cec0b7c 100644 --- a/tests/glthread/thread.c +++ b/tests/glthread/thread.c @@ -1,5 +1,5 @@ /* Creating and controlling threads. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, @@ -22,6 +21,7 @@ #include /* Specification. */ +# define _GLTHREAD_THREAD_INLINE _GL_EXTERN_INLINE #include "glthread/thread.h" #include @@ -29,7 +29,21 @@ /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_POSIX_THREADS + +#include + +#ifdef PTW32_VERSION + +const gl_thread_t gl_null_thread /* = { .p = NULL } */; + +#endif + +#endif + +/* ========================================================================= */ + +#if USE_WINDOWS_THREADS #include @@ -72,7 +86,7 @@ struct gl_thread_struct }; /* Return a real HANDLE object for the current thread. */ -static inline HANDLE +static HANDLE get_current_thread_handle (void) { HANDLE this_handle; diff --git a/tests/glthread/thread.h b/tests/glthread/thread.h index 370f09a..509db6b 100644 --- a/tests/glthread/thread.h +++ b/tests/glthread/thread.h @@ -1,5 +1,5 @@ /* Creating and controlling threads. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Bruno Haible , 2005. Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, @@ -47,9 +46,13 @@ current = gl_thread_self (); extern gl_thread_t gl_thread_self (void); + Getting a reference to the current thread as a pointer, for debugging: + ptr = gl_thread_self_pointer (); + extern void * gl_thread_self_pointer (void); + Terminating the current thread: gl_thread_exit (return_value); - extern void gl_thread_exit (void *return_value) __attribute__ ((noreturn)); + extern _Noreturn void gl_thread_exit (void *return_value); Requesting custom code to be executed at fork() time(not supported on all platforms): @@ -71,6 +74,14 @@ #include #include +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef _GLTHREAD_THREAD_INLINE +# define _GLTHREAD_THREAD_INLINE _GL_INLINE +#endif + /* ========================================================================= */ #if USE_POSIX_THREADS @@ -112,7 +123,13 @@ extern int glthread_in_use (void); address of a function in libpthread that we don't use. */ # pragma weak pthread_create + +# ifdef __clang__ + /* Without this, clang complains that pthread_sigmask is never declared. */ +# include +# endif # pragma weak pthread_sigmask + # pragma weak pthread_join # ifndef pthread_self # pragma weak pthread_self @@ -147,8 +164,20 @@ typedef pthread_t gl_thread_t; (pthread_in_use () ? pthread_sigmask (HOW, SET, OSET) : 0) # define glthread_join(THREAD, RETVALP) \ (pthread_in_use () ? pthread_join (THREAD, RETVALP) : 0) -# define gl_thread_self() \ - (pthread_in_use () ? (void *) pthread_self () : NULL) +# ifdef PTW32_VERSION + /* In pthreads-win32, pthread_t is a struct with a pointer field 'p' and + other fields. */ +# define gl_thread_self() \ + (pthread_in_use () ? pthread_self () : gl_null_thread) +# define gl_thread_self_pointer() \ + (pthread_in_use () ? pthread_self ().p : NULL) +extern const gl_thread_t gl_null_thread; +# else +# define gl_thread_self() \ + (pthread_in_use () ? pthread_self () : (pthread_t) NULL) +# define gl_thread_self_pointer() \ + (pthread_in_use () ? (void *) pthread_self () : NULL) +# endif # define gl_thread_exit(RETVAL) \ (pthread_in_use () ? pthread_exit (RETVAL) : 0) @@ -205,7 +234,9 @@ typedef pth_t gl_thread_t; # define glthread_join(THREAD, RETVALP) \ (pth_in_use () && !pth_join (THREAD, RETVALP) ? errno : 0) # define gl_thread_self() \ - (pth_in_use () ? (void *) pth_self () : 0) + (pth_in_use () ? (void *) pth_self () : NULL) +# define gl_thread_self_pointer() \ + gl_thread_self () # define gl_thread_exit(RETVAL) \ (pth_in_use () ? pth_exit (RETVAL) : 0) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 @@ -257,7 +288,9 @@ typedef thread_t gl_thread_t; # define glthread_join(THREAD, RETVALP) \ (thread_in_use () ? thr_join (THREAD, NULL, RETVALP) : 0) # define gl_thread_self() \ - (thread_in_use () ? (void *) thr_self () : 0) + (thread_in_use () ? (void *) thr_self () : NULL) +# define gl_thread_self_pointer() \ + gl_thread_self () # define gl_thread_exit(RETVAL) \ (thread_in_use () ? thr_exit (RETVAL) : 0) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 @@ -270,8 +303,9 @@ typedef thread_t gl_thread_t; /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # ifdef __cplusplus @@ -298,6 +332,8 @@ typedef struct gl_thread_struct *gl_thread_t; glthread_join_func (THREAD, RETVALP) # define gl_thread_self() \ gl_thread_self_func () +# define gl_thread_self_pointer() \ + gl_thread_self () # define gl_thread_exit(RETVAL) \ gl_thread_exit_func (RETVAL) # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 @@ -314,7 +350,7 @@ extern int gl_thread_exit_func (void *retval); /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ @@ -322,7 +358,9 @@ typedef int gl_thread_t; # define glthread_create(THREADP, FUNC, ARG) ENOSYS # define glthread_sigmask(HOW, SET, OSET) 0 # define glthread_join(THREAD, RETVALP) 0 -# define gl_thread_self() NULL +# define gl_thread_self() 0 +# define gl_thread_self_pointer() \ + ((void *) gl_thread_self ()) # define gl_thread_exit(RETVAL) 0 # define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 @@ -336,7 +374,7 @@ typedef int gl_thread_t; extern "C" { #endif -static inline gl_thread_t +_GLTHREAD_THREAD_INLINE gl_thread_t gl_thread_create (void *(*func) (void *arg), void *arg) { gl_thread_t thread; @@ -373,4 +411,6 @@ gl_thread_create (void *(*func) (void *arg), void *arg) } #endif +_GL_INLINE_HEADER_END + #endif /* _GLTHREAD_THREAD_H */ diff --git a/tests/glthread/threadlib.c b/tests/glthread/threadlib.c deleted file mode 100644 index 646defa..0000000 --- a/tests/glthread/threadlib.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Multithreading primitives. - Copyright (C) 2005-2011 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Bruno Haible , 2005. */ - -#include - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* Use the POSIX threads library. */ - -# include -# include - -# if PTHREAD_IN_USE_DETECTION_HARD - -/* The function to be executed by a dummy thread. */ -static void * -dummy_thread_func (void *arg) -{ - return arg; -} - -int -glthread_in_use (void) -{ - static int tested; - static int result; /* 1: linked with -lpthread, 0: only with libc */ - - if (!tested) - { - pthread_t thread; - - if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0) - /* Thread creation failed. */ - result = 0; - else - { - /* Thread creation works. */ - void *retval; - if (pthread_join (thread, &retval) != 0) - abort (); - result = 1; - } - tested = 1; - } - return result; -} - -# endif - -#endif - -/* ========================================================================= */ - -/* This declaration is solely to ensure that after preprocessing - this file is never empty. */ -typedef int dummy; diff --git a/tests/glthread/yield.h b/tests/glthread/yield.h index 4eb1cb8..b929224 100644 --- a/tests/glthread/yield.h +++ b/tests/glthread/yield.h @@ -1,5 +1,5 @@ /* Yielding the processor to other threads and processes. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* This file contains a primitive for yielding the processor to other threads. extern void gl_thread_yield (void); @@ -89,8 +88,9 @@ extern "C" { /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS +# define WIN32_LEAN_AND_MEAN /* avoid including junk */ # include # ifdef __cplusplus @@ -108,7 +108,7 @@ extern "C" { /* ========================================================================= */ -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS) +#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) /* Provide dummy implementation if threads are not supported. */ diff --git a/tests/ignore-value.h b/tests/ignore-value.h index f021a1a..4dd0946 100644 --- a/tests/ignore-value.h +++ b/tests/ignore-value.h @@ -1,6 +1,6 @@ /* ignore a function return without a compiler warning - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,30 +33,18 @@ declared with attribute warn_unused_result". */ #ifndef _GL_IGNORE_VALUE_H -# define _GL_IGNORE_VALUE_H - -# ifndef _GL_ATTRIBUTE_DEPRECATED -/* The __attribute__((__deprecated__)) feature - is available in gcc versions 3.1 and newer. */ -# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1) -# define _GL_ATTRIBUTE_DEPRECATED /* empty */ -# else -# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__)) -# endif -# endif - -/* The __attribute__((__warn_unused_result__)) feature - is available in gcc versions 3.4 and newer, - while the typeof feature has been available since 2.7 at least. */ -# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) -# define ignore_value(x) ((void) (x)) -# else -# define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) -# endif - -/* ignore_value works for scalars, pointers and aggregates; - deprecate ignore_ptr. */ -static inline void _GL_ATTRIBUTE_DEPRECATED -ignore_ptr (void *p) { (void) p; } /* deprecated: use ignore_value */ +#define _GL_IGNORE_VALUE_H + +/* Normally casting an expression to void discards its value, but GCC + versions 3.4 and newer have __attribute__ ((__warn_unused_result__)) + which may cause unwanted diagnostics in that case. Use __typeof__ + and __extension__ to work around the problem, if the workaround is + known to be needed. */ +#if 3 < __GNUC__ + (4 <= __GNUC_MINOR__) +# define ignore_value(x) \ + (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; })) +#else +# define ignore_value(x) ((void) (x)) +#endif #endif diff --git a/tests/inet_pton.c b/tests/inet_pton.c new file mode 100644 index 0000000..e9703a7 --- /dev/null +++ b/tests/inet_pton.c @@ -0,0 +1,268 @@ +/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form + + Copyright (C) 2006, 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* + * Copyright (c) 1996,1999 by Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#include + +/* Specification. */ +#include + +#if HAVE_DECL_INET_PTON + +# undef inet_pton + +int +rpl_inet_pton (int af, const char *restrict src, void *restrict dst) +{ + return inet_pton (af, src, dst); +} + +#else + +# include +# include +# include + +# define NS_INADDRSZ 4 +# define NS_IN6ADDRSZ 16 +# define NS_INT16SZ 2 + +/* + * WARNING: Don't even consider trying to compile this on a system where + * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. + */ + +static int inet_pton4 (const char *src, unsigned char *dst); +# if HAVE_IPV6 +static int inet_pton6 (const char *src, unsigned char *dst); +# endif + +/* int + * inet_pton(af, src, dst) + * convert from presentation format (which usually means ASCII printable) + * to network format (which is usually some kind of binary format). + * return: + * 1 if the address was valid for the specified address family + * 0 if the address wasn't valid ('dst' is untouched in this case) + * -1 if some other error occurred ('dst' is untouched in this case, too) + * author: + * Paul Vixie, 1996. + */ +int +inet_pton (int af, const char *restrict src, void *restrict dst) +{ + switch (af) + { + case AF_INET: + return (inet_pton4 (src, dst)); + +# if HAVE_IPV6 + case AF_INET6: + return (inet_pton6 (src, dst)); +# endif + + default: + errno = EAFNOSUPPORT; + return (-1); + } + /* NOTREACHED */ +} + +/* int + * inet_pton4(src, dst) + * like inet_aton() but without all the hexadecimal, octal (with the + * exception of 0) and shorthand. + * return: + * 1 if 'src' is a valid dotted quad, else 0. + * notice: + * does not touch 'dst' unless it's returning 1. + * author: + * Paul Vixie, 1996. + */ +static int +inet_pton4 (const char *restrict src, unsigned char *restrict dst) +{ + int saw_digit, octets, ch; + unsigned char tmp[NS_INADDRSZ], *tp; + + saw_digit = 0; + octets = 0; + *(tp = tmp) = 0; + while ((ch = *src++) != '\0') + { + + if (ch >= '0' && ch <= '9') + { + unsigned new = *tp * 10 + (ch - '0'); + + if (saw_digit && *tp == 0) + return (0); + if (new > 255) + return (0); + *tp = new; + if (!saw_digit) + { + if (++octets > 4) + return (0); + saw_digit = 1; + } + } + else if (ch == '.' && saw_digit) + { + if (octets == 4) + return (0); + *++tp = 0; + saw_digit = 0; + } + else + return (0); + } + if (octets < 4) + return (0); + memcpy (dst, tmp, NS_INADDRSZ); + return (1); +} + +# if HAVE_IPV6 + +/* int + * inet_pton6(src, dst) + * convert presentation level address to network order binary form. + * return: + * 1 if 'src' is a valid [RFC1884 2.2] address, else 0. + * notice: + * (1) does not touch 'dst' unless it's returning 1. + * (2) :: in a full address is silently ignored. + * credit: + * inspired by Mark Andrews. + * author: + * Paul Vixie, 1996. + */ +static int +inet_pton6 (const char *restrict src, unsigned char *restrict dst) +{ + static const char xdigits[] = "0123456789abcdef"; + unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; + const char *curtok; + int ch, saw_xdigit; + unsigned val; + + tp = memset (tmp, '\0', NS_IN6ADDRSZ); + endp = tp + NS_IN6ADDRSZ; + colonp = NULL; + /* Leading :: requires some special handling. */ + if (*src == ':') + if (*++src != ':') + return (0); + curtok = src; + saw_xdigit = 0; + val = 0; + while ((ch = c_tolower (*src++)) != '\0') + { + const char *pch; + + pch = strchr (xdigits, ch); + if (pch != NULL) + { + val <<= 4; + val |= (pch - xdigits); + if (val > 0xffff) + return (0); + saw_xdigit = 1; + continue; + } + if (ch == ':') + { + curtok = src; + if (!saw_xdigit) + { + if (colonp) + return (0); + colonp = tp; + continue; + } + else if (*src == '\0') + { + return (0); + } + if (tp + NS_INT16SZ > endp) + return (0); + *tp++ = (u_char) (val >> 8) & 0xff; + *tp++ = (u_char) val & 0xff; + saw_xdigit = 0; + val = 0; + continue; + } + if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && + inet_pton4 (curtok, tp) > 0) + { + tp += NS_INADDRSZ; + saw_xdigit = 0; + break; /* '\0' was seen by inet_pton4(). */ + } + return (0); + } + if (saw_xdigit) + { + if (tp + NS_INT16SZ > endp) + return (0); + *tp++ = (u_char) (val >> 8) & 0xff; + *tp++ = (u_char) val & 0xff; + } + if (colonp != NULL) + { + /* + * Since some memmove()'s erroneously fail to handle + * overlapping regions, we'll do the shift by hand. + */ + const int n = tp - colonp; + int i; + + if (tp == endp) + return (0); + for (i = 1; i <= n; i++) + { + endp[-i] = colonp[n - i]; + colonp[n - i] = 0; + } + tp = endp; + } + if (tp != endp) + return (0); + memcpy (dst, tmp, NS_IN6ADDRSZ); + return (1); +} + +# endif + +#endif diff --git a/tests/infinity.h b/tests/infinity.h new file mode 100644 index 0000000..ec9dba4 --- /dev/null +++ b/tests/infinity.h @@ -0,0 +1,60 @@ +/* Macros for infinity. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + +/* Infinityf () returns a 'float' +Infinity. */ + +/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */ +#if defined _MSC_VER +static float +Infinityf () +{ + static float zero = 0.0f; + return 1.0f / zero; +} +#else +# define Infinityf() (1.0f / 0.0f) +#endif + + +/* Infinityd () returns a 'double' +Infinity. */ + +/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */ +#if defined _MSC_VER +static double +Infinityd () +{ + static double zero = 0.0; + return 1.0 / zero; +} +#else +# define Infinityd() (1.0 / 0.0) +#endif + + +/* Infinityl () returns a 'long double' +Infinity. */ + +/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */ +#if defined _MSC_VER +static double +Infinityl () +{ + static long double zero = 0.0L; + return 1.0L / zero; +} +#else +# define Infinityl() (1.0L / 0.0L) +#endif diff --git a/tests/init.sh b/tests/init.sh index 71c6516..fbd293d 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -1,6 +1,6 @@ # source this file; set up for tests -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -61,22 +61,36 @@ ME_=`expr "./$0" : '.*/\(.*\)$'` # We use a trap below for cleanup. This requires us to go through # hoops to get the right exit status transported through the handler. -# So use `Exit STATUS' instead of `exit STATUS' inside of the tests. +# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests. # Turn off errexit here so that we don't trip the bug with OSF1/Tru64 # sh inside this function. Exit () { set +e; (exit $1); exit $1; } # Print warnings (e.g., about skipped and failed tests) to this file number. # Override by defining to say, 9, in init.cfg, and putting say, -# "export ...ENVVAR_SETTINGS...; exec 9>&2; $(SHELL)" in the definition -# of TESTS_ENVIRONMENT in your tests/Makefile.am file. +# export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2 +# in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file. # This is useful when using automake's parallel tests mode, to print # the reason for skip/failure to console, rather than to the .log files. : ${stderr_fileno_=2} -warn_ () { echo "$@" 1>&$stderr_fileno_; } +# Note that correct expansion of "$*" depends on IFS starting with ' '. +# Always write the full diagnostic to stderr. +# When stderr_fileno_ is not 2, also emit the first line of the +# diagnostic to that file descriptor. +warn_ () +{ + # If IFS does not start with ' ', set it and emit the warning in a subshell. + case $IFS in + ' '*) printf '%s\n' "$*" >&2 + test $stderr_fileno_ = 2 \ + || { printf '%s\n' "$*" | sed 1q >&$stderr_fileno_ ; } ;; + *) (IFS=' '; warn_ "$@");; + esac +} fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; } skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; } +fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; } framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; } # Sanitize this shell to POSIX mode, if possible. @@ -158,7 +172,7 @@ else if test "$re_shell_" = __current__; then # 'eval'ing this code makes Solaris 10's /bin/sh exit with # $? set to 2. It does not evaluate any of the code after the - # "unexpected" first `('. Thus, we must run it in a subshell. + # "unexpected" first '('. Thus, we must run it in a subshell. ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1 else "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null @@ -167,7 +181,10 @@ else st_=$? # $re_shell_ works just fine. Use it. - test $st_ = 10 && break + if test $st_ = 10; then + gl_set_x_corrupts_stderr_=false + break + fi # If this is our first marginally acceptable shell, remember it. if test "$st_:$marginal_" = 9: ; then @@ -184,12 +201,22 @@ else *x*) opts_=-x ;; *) opts_= ;; esac + re_shell=$re_shell_ + export re_shell exec "$re_shell_" $opts_ "$0" --no-reexec "$@" echo "$ME_: exec failed" 1>&2 exit 127 fi fi +# If this is bash, turn off all aliases. +test -n "$BASH_VERSION" && unalias -a + +# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to +# PROG_NAME.exe), we want to support hyphen-containing names like test-acos. +# That is part of the shell-selection test above. Why use aliases rather +# than functions? Because support for hyphen-containing aliases is more +# widespread than that for hyphen-containing function names. test -n "$EXEEXT" && shopt -s expand_aliases # Enable glibc's malloc-perturbing option. @@ -204,14 +231,105 @@ export MALLOC_PERTURB_ # a partition, or to undo any other global state changes. cleanup_ () { :; } -if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then - compare () { diff -u "$@"; } +# Emit a header similar to that from diff -u; Print the simulated "diff" +# command so that the order of arguments is clear. Don't bother with @@ lines. +emit_diff_u_header_ () +{ + printf '%s\n' "diff -u $*" \ + "--- $1 1970-01-01" \ + "+++ $2 1970-01-01" +} + +# Arrange not to let diff or cmp operate on /dev/null, +# since on some systems (at least OSF/1 5.1), that doesn't work. +# When there are not two arguments, or no argument is /dev/null, return 2. +# When one argument is /dev/null and the other is not empty, +# cat the nonempty file to stderr and return 1. +# Otherwise, return 0. +compare_dev_null_ () +{ + test $# = 2 || return 2 + + if test "x$1" = x/dev/null; then + test -s "$2" || return 0 + emit_diff_u_header_ "$@"; sed 's/^/+/' "$2" + return 1 + fi + + if test "x$2" = x/dev/null; then + test -s "$1" || return 0 + emit_diff_u_header_ "$@"; sed 's/^/-/' "$1" + return 1 + fi + + return 2 +} + +if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \ + && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then + # diff accepts the -u option and does not (like AIX 7 'diff') produce an + # extra space on column 1 of every content line. + if test -z "$diff_out_"; then + compare_ () { diff -u "$@"; } + else + compare_ () + { + if diff -u "$@" > diff.out; then + # No differences were found, but Solaris 'diff' produces output + # "No differences encountered". Hide this output. + rm -f diff.out + true + else + cat diff.out + rm -f diff.out + false + fi + } + fi +elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then + if test -z "$diff_out_"; then + compare_ () { diff -c "$@"; } + else + compare_ () + { + if diff -c "$@" > diff.out; then + # No differences were found, but AIX and HP-UX 'diff' produce output + # "No differences encountered" or "There are no differences between the + # files.". Hide this output. + rm -f diff.out + true + else + cat diff.out + rm -f diff.out + false + fi + } + fi elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then - compare () { cmp -s "$@"; } + compare_ () { cmp -s "$@"; } else - compare () { cmp "$@"; } + compare_ () { cmp "$@"; } fi +# Usage: compare EXPECTED ACTUAL +# +# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more. +# Otherwise, propagate $? to caller: any diffs have already been printed. +compare () +{ + # This looks like it can be factored to use a simple "case $?" + # after unchecked compare_dev_null_ invocation, but that would + # fail in a "set -e" environment. + if compare_dev_null_ "$@"; then + return 0 + else + case $? in + 1) return 1;; + *) compare_ "$@";; + esac + fi +} + # An arbitrary prefix to help distinguish test directories. testdir_prefix_ () { printf gt; } @@ -295,8 +413,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_'";; @@ -332,7 +449,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. @@ -400,7 +517,7 @@ mktempd_ () { case $# in 2);; - *) fail_ "Usage: $ME DIR TEMPLATE";; + *) fail_ "Usage: mktempd_ DIR TEMPLATE";; esac destdir_=$1 @@ -422,7 +539,7 @@ mktempd_ () esac # First, try to use mktemp. - d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \ + d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \ || fail=1 # The resulting name must be in the specified directory. diff --git a/tests/inttostr.h b/tests/inttostr.h index 1825f56..ff58c2b 100644 --- a/tests/inttostr.h +++ b/tests/inttostr.h @@ -1,6 +1,6 @@ /* inttostr.h -- convert integers to printable strings - Copyright (C) 2001-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2006, 2009-2014 Free Software Foundation, Inc. This 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/tests/ioctl.c b/tests/ioctl.c new file mode 100644 index 0000000..89afb4e --- /dev/null +++ b/tests/ioctl.c @@ -0,0 +1,88 @@ +/* ioctl.c --- wrappers for Windows ioctl function + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini */ + +#include + +#include + +#include + +#if HAVE_IOCTL + +/* Provide a wrapper with the POSIX prototype. */ +# undef ioctl +int +rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */) +{ + void *buf; + va_list args; + + va_start (args, request); + buf = va_arg (args, void *); + va_end (args); + + /* Cast 'request' so that when the system's ioctl function takes a 64-bit + request argument, the value gets zero-extended, not sign-extended. */ + return ioctl (fd, (unsigned int) request, buf); +} + +#else /* mingw */ + +# include + +/* Get HANDLE. */ +# define WIN32_LEAN_AND_MEAN +# include + +# include "fd-hook.h" +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" + +static int +primary_ioctl (int fd, int request, void *arg) +{ + /* We don't support FIONBIO on pipes here. If you want to make pipe + fds non-blocking, use the gnulib 'nonblocking' module, until + gnulib implements fcntl F_GETFL / F_SETFL with O_NONBLOCK. */ + + if ((HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE) + errno = ENOSYS; + else + errno = EBADF; + return -1; +} + +int +ioctl (int fd, int request, ... /* {void *,char *} arg */) +{ + void *arg; + va_list args; + + va_start (args, request); + arg = va_arg (args, void *); + va_end (args); + +# if WINDOWS_SOCKETS + return execute_all_ioctl_hooks (primary_ioctl, fd, request, arg); +# else + return primary_ioctl (fd, request, arg); +# endif +} + +#endif diff --git a/tests/listen.c b/tests/listen.c new file mode 100644 index 0000000..40b6b50 --- /dev/null +++ b/tests/listen.c @@ -0,0 +1,49 @@ +/* listen.c --- wrappers for Windows listen function + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#undef listen + +int +rpl_listen (int fd, int backlog) +{ + SOCKET sock = FD_TO_SOCKET (fd); + + if (sock == INVALID_SOCKET) + { + errno = EBADF; + return -1; + } + else + { + int r = listen (sock, backlog); + if (r < 0) + set_winsock_errno (); + + return r; + } +} diff --git a/tests/localename.c b/tests/localename.c index a5bfea7..9bd73e5 100644 --- a/tests/localename.c +++ b/tests/localename.c @@ -1,24 +1,22 @@ /* Determine name of the currently selected locale. - Copyright (C) 1995-2011 Free Software Foundation, Inc. + Copyright (C) 1995-2014 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your option) - any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ /* Written by Ulrich Drepper , 1995. */ -/* Win32 code written by Tor Lillqvist . */ -/* MacOS X code written by Bruno Haible . */ +/* Native Windows code written by Tor Lillqvist . */ +/* Mac OS X code written by Bruno Haible . */ #include @@ -36,7 +34,7 @@ #include #if HAVE_USELOCALE -/* MacOS X 10.5 defines the locale_t type in . */ +/* Mac OS X 10.5 defines the locale_t type in . */ # if defined __APPLE__ && defined __MACH__ # include # endif @@ -56,10 +54,10 @@ #endif #if defined _WIN32 || defined __WIN32__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE #endif -#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */ +#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ # define WIN32_LEAN_AND_MEAN # include /* List of language codes, sorted by value: @@ -1130,11 +1128,11 @@ #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE -/* MacOS X 10.2 or newer */ +/* Mac OS X 10.2 or newer */ -/* Canonicalize a MacOS X locale name to a Unix locale name. +/* Canonicalize a Mac OS X locale name to a Unix locale name. NAME is a sufficiently large buffer. - On input, it contains the MacOS X locale name. + On input, it contains the Mac OS X locale name. On output, it contains the Unix locale name. */ # if !defined IN_LIBINTL static @@ -1147,9 +1145,9 @@ gl_locale_name_canonicalize (char *name) http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */ /* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and - ISO 3166) names. Prior to MacOS X 10.3, there is no API for doing this. + ISO 3166) names. Prior to Mac OS X 10.3, there is no API for doing this. Therefore we do it ourselves, using a table based on the results of the - MacOS X 10.3.8 function + Mac OS X 10.3.8 function CFLocaleCreateCanonicalLocaleIdentifierFromString(). */ typedef struct { const char legacy[21+1]; const char unixy[5+1]; } legacy_entry; @@ -1292,26 +1290,26 @@ gl_locale_name_canonicalize (char *name) typedef struct { const char langtag[7+1]; const char unixy[12+1]; } langtag_entry; static const langtag_entry langtag_table[] = { - /* MacOS X has "az-Arab", "az-Cyrl", "az-Latn". + /* Mac OS X has "az-Arab", "az-Cyrl", "az-Latn". The default script for az on Unix is Latin. */ { "az-Latn", "az" }, - /* MacOS X has "ga-dots". Does not yet exist on Unix. */ + /* Mac OS X has "ga-dots". Does not yet exist on Unix. */ { "ga-dots", "ga" }, - /* MacOS X has "kk-Cyrl". Does not yet exist on Unix. */ - /* MacOS X has "mn-Cyrl", "mn-Mong". + /* Mac OS X has "kk-Cyrl". Does not yet exist on Unix. */ + /* Mac OS X has "mn-Cyrl", "mn-Mong". The default script for mn on Unix is Cyrillic. */ { "mn-Cyrl", "mn" }, - /* MacOS X has "ms-Arab", "ms-Latn". + /* Mac OS X has "ms-Arab", "ms-Latn". The default script for ms on Unix is Latin. */ { "ms-Latn", "ms" }, - /* MacOS X has "tg-Cyrl". + /* Mac OS X has "tg-Cyrl". The default script for tg on Unix is Cyrillic. */ { "tg-Cyrl", "tg" }, - /* MacOS X has "tk-Cyrl". Does not yet exist on Unix. */ - /* MacOS X has "tt-Cyrl". + /* Mac OS X has "tk-Cyrl". Does not yet exist on Unix. */ + /* Mac OS X has "tt-Cyrl". The default script for tt on Unix is Cyrillic. */ { "tt-Cyrl", "tt" }, - /* MacOS X has "zh-Hans", "zh-Hant". + /* Mac OS X has "zh-Hans", "zh-Hant". Country codes are used to distinguish these on Unix. */ { "zh-Hans", "zh_CN" }, { "zh-Hant", "zh_TW" } @@ -1407,11 +1405,11 @@ gl_locale_name_canonicalize (char *name) #endif -#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */ +#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ -/* Canonicalize a Win32 native locale name to a Unix locale name. +/* Canonicalize a Windows native locale name to a Unix locale name. NAME is a sufficiently large buffer. - On input, it contains the Win32 locale name. + On input, it contains the Windows locale name. On output, it contains the Unix locale name. */ # if !defined IN_LIBINTL static @@ -1467,9 +1465,9 @@ gl_locale_name_from_win32_LANGID (LANGID langid) } /* Internet Explorer has an LCID to RFC3066 name mapping stored in HKEY_CLASSES_ROOT\Mime\Database\Rfc1766. But we better don't use that - since IE's i18n subsystem is known to be inconsistent with the Win32 base - (e.g. they have different character conversion facilities that produce - different results). */ + since IE's i18n subsystem is known to be inconsistent with the native + Windows base (e.g. they have different character conversion facilities + that produce different results). */ /* Use our own table. */ { int primary, sub; @@ -2507,7 +2505,7 @@ gl_locale_name_from_win32_LCID (LCID lcid) #endif -#if HAVE_USELOCALE /* glibc or MacOS X */ +#if HAVE_USELOCALE /* glibc or Mac OS X */ /* Simple hash set of strings. We don't want to drag in lots of hash table code here. */ @@ -2618,133 +2616,34 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname) nl_langinfo (_NL_LOCALE_NAME (category)). */ name = thread_locale->__names[category]; return name; -# endif -# if defined __APPLE__ && defined __MACH__ /* MacOS X */ - /* The locale name is found deep in an undocumented data structure. - Since it's stored in a buffer of size 32 and newlocale() rejects - locale names of length > 31, we can assume that it is NUL terminated - in this buffer. But we need to make a copy of the locale name, of - indefinite extent. */ - struct _xlocale_part1_v0 /* used in MacOS X 10.5 */ - { - int32_t __refcount; - void (*__free_extra)(void *); - __darwin_mbstate_t __mbs[10]; - int64_t __magic; - }; - struct _xlocale_part1_v1 /* used in MacOS X >= 10.6.0 */ - { - int32_t __refcount; - void (*__free_extra)(void *); - __darwin_mbstate_t __mbs[10]; - /*pthread_lock_t*/ int __lock; - int64_t __magic; - }; - struct _xlocale_part2 - { - int64_t __magic; - unsigned char __collate_load_error; - unsigned char __collate_substitute_nontrivial; - unsigned char _messages_using_locale; - unsigned char _monetary_using_locale; - unsigned char _numeric_using_locale; - unsigned char _time_using_locale; - unsigned char __mlocale_changed; - unsigned char __nlocale_changed; - unsigned char __numeric_fp_cvt; - struct __xlocale_st_collate *__lc_collate; - struct __xlocale_st_runelocale *__lc_ctype; - struct __xlocale_st_messages *__lc_messages; - struct __xlocale_st_monetary *__lc_monetary; - struct __xlocale_st_numeric *__lc_numeric; - struct _xlocale *__lc_numeric_loc; - struct __xlocale_st_time *__lc_time; - /* more */ - }; - struct __xlocale_st_collate - { - int32_t __refcount; - void (*__free_extra)(void *); - char __encoding[32]; - /* more */ - }; - struct __xlocale_st_runelocale - { - int32_t __refcount; - void (*__free_extra)(void *); - char __ctype_encoding[32]; - /* more */ - }; - struct __xlocale_st_messages - { - int32_t __refcount; - void (*__free_extra)(void *); - char *_messages_locale_buf; - /* more */ - }; - struct __xlocale_st_monetary - { - int32_t __refcount; - void (*__free_extra)(void *); - char *_monetary_locale_buf; - /* more */ - }; - struct __xlocale_st_numeric { - int32_t __refcount; - void (*__free_extra)(void *); - char *_numeric_locale_buf; - /* more */ - }; - struct __xlocale_st_time { - int32_t __refcount; - void (*__free_extra)(void *); - char *_time_locale_buf; - /* more */ - }; - struct _xlocale_part2 *tlp; - if (((struct _xlocale_part1_v0 *) thread_locale)->__magic - == 0x786C6F63616C6530LL) - /* MacOS X 10.5 */ - tlp = - (struct _xlocale_part2 *) - &((struct _xlocale_part1_v0 *) thread_locale)->__magic; - else if (((struct _xlocale_part1_v1 *) thread_locale)->__magic - == 0x786C6F63616C6530LL) - /* MacOS X >= 10.6.0 */ - tlp = - (struct _xlocale_part2 *) - &((struct _xlocale_part1_v1 *) thread_locale)->__magic; - else - /* Unsupported version of MacOS X: The internals of 'struct _xlocale' - have changed again. */ - return ""; +# elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__) + /* FreeBSD, Mac OS X */ + int mask; + switch (category) { case LC_CTYPE: - return tlp->__lc_ctype->__ctype_encoding; + mask = LC_CTYPE_MASK; + break; case LC_NUMERIC: - return tlp->_numeric_using_locale - ? tlp->__lc_numeric->_numeric_locale_buf - : "C"; + mask = LC_NUMERIC_MASK; + break; case LC_TIME: - return tlp->_time_using_locale - ? tlp->__lc_time->_time_locale_buf - : "C"; + mask = LC_TIME_MASK; + break; case LC_COLLATE: - return !tlp->__collate_load_error - ? tlp->__lc_collate->__encoding - : "C"; + mask = LC_COLLATE_MASK; + break; case LC_MONETARY: - return tlp->_monetary_using_locale - ? tlp->__lc_monetary->_monetary_locale_buf - : "C"; + mask = LC_MONETARY_MASK; + break; case LC_MESSAGES: - return tlp->_messages_using_locale - ? tlp->__lc_messages->_messages_locale_buf - : "C"; + mask = LC_MESSAGES_MASK; + break; default: /* We shouldn't get here. */ return ""; } + return querylocale (mask, thread_locale); # endif } } @@ -2786,8 +2685,8 @@ gl_locale_name_posix (int category, const char *categoryname) /* On other systems we ignore what setlocale reports and instead look at the environment variables directly. This is necessary 1. on systems which have a facility for customizing the default locale - (MacOS X, native Windows, Cygwin) and where the system's setlocale() - function ignores this default locale (MacOS X, Cygwin), in two cases: + (Mac OS X, native Windows, Cygwin) and where the system's setlocale() + function ignores this default locale (Mac OS X, Cygwin), in two cases: a. when the user missed to use the setlocale() override from libintl (for example by not including ), b. when setlocale supports only the "C" locale, such as on Cygwin @@ -2822,7 +2721,7 @@ gl_locale_name_environ (int category, const char *categoryname) if (retval != NULL && retval[0] != '\0') { #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE - /* MacOS X 10.2 or newer. + /* Mac OS X 10.2 or newer. Ignore invalid LANG value set by the Terminal application. */ if (strcmp (retval, "UTF-8") != 0) #endif @@ -2849,10 +2748,10 @@ gl_locale_name_default (void) locale, customizing it for each location. POSIX:2001 does not require such a facility. - The systems with such a facility are MacOS X and Windows: They provide a + The systems with such a facility are Mac OS X and Windows: They provide a GUI that allows the user to choose a locale. - - On MacOS X, by default, none of LC_* or LANG are set. Starting with - MacOS X 10.4 or 10.5, LANG is set for processes launched by the + - On Mac OS X, by default, none of LC_* or LANG are set. Starting with + Mac OS X 10.4 or 10.5, LANG is set for processes launched by the 'Terminal' application (but sometimes to an incorrect value "UTF-8"). When no environment variable is set, setlocale (LC_ALL, "") uses the "C" locale. @@ -2868,7 +2767,7 @@ gl_locale_name_default (void) "C.UTF-8" locale, which operates in the same way as the "C" locale. */ -#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WIN32_NATIVE || defined __CYGWIN__) +#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE || defined __CYGWIN__) /* The system does not have a way of setting the locale, other than the POSIX specified environment variables. We use C as default locale. */ @@ -2882,7 +2781,7 @@ gl_locale_name_default (void) codeset. */ # if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE - /* MacOS X 10.2 or newer */ + /* Mac OS X 10.2 or newer */ { /* Cache the locale name, since CoreFoundation calls are expensive. */ static const char *cached_localename; @@ -2890,7 +2789,7 @@ gl_locale_name_default (void) if (cached_localename == NULL) { char namebuf[256]; -# if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */ +# if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.3 or newer */ CFLocaleRef locale = CFLocaleCopyCurrent (); CFStringRef name = CFLocaleGetIdentifier (locale); @@ -2901,7 +2800,7 @@ gl_locale_name_default (void) cached_localename = strdup (namebuf); } CFRelease (locale); -# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */ +# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.2 or newer */ CFTypeRef value = CFPreferencesCopyAppValue (CFSTR ("AppleLocale"), kCFPreferencesCurrentApplication); @@ -2923,11 +2822,11 @@ gl_locale_name_default (void) # endif -# if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */ +# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ { LCID lcid; - /* Use native Win32 API locale ID. */ + /* Use native Windows API locale ID. */ lcid = GetThreadLocale (); return gl_locale_name_from_win32_LCID (lcid); diff --git a/tests/localename.h b/tests/localename.h index e754853..d6e1b5d 100644 --- a/tests/localename.h +++ b/tests/localename.h @@ -1,20 +1,18 @@ /* Determine name of the currently selected locale. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your option) - any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ #ifndef _GL_LOCALENAME_H #define _GL_LOCALENAME_H diff --git a/tests/macros.h b/tests/macros.h index 8922675..0d7e378 100644 --- a/tests/macros.h +++ b/tests/macros.h @@ -1,5 +1,5 @@ /* Common macros used by gnulib tests. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -48,8 +48,8 @@ { \ if (!(expr)) \ { \ - fprintf (ASSERT_STREAM, "%s:%d: assertion failed\n", \ - __FILE__, __LINE__); \ + fprintf (ASSERT_STREAM, "%s:%d: assertion '%s' failed\n", \ + __FILE__, __LINE__, #expr); \ fflush (ASSERT_STREAM); \ abort (); \ } \ @@ -62,3 +62,12 @@ *not* work for function parameters of array type, because they are actually parameters of pointer type. */ #define SIZEOF(array) (sizeof (array) / sizeof (array[0])) + +/* STREQ (str1, str2) + Return true if two strings compare equal. */ +#define STREQ(a, b) (strcmp (a, b) == 0) + +/* Some numbers in the interval [0,1). */ +extern const float randomf[1000]; +extern const double randomd[1000]; +extern const long double randoml[1000]; diff --git a/tests/mgetgroups.c b/tests/mgetgroups.c deleted file mode 100644 index 5c79915..0000000 --- a/tests/mgetgroups.c +++ /dev/null @@ -1,206 +0,0 @@ -/* mgetgroups.c -- return a list of the groups a user or current process is in - - Copyright (C) 2007-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Extracted from coreutils' src/id.c. */ - -#include - -#include "mgetgroups.h" - -#include -#include -#include -#include -#include -#if HAVE_GETGROUPLIST -# include -#endif - -#include "getugroups.h" -#include "xalloc.h" - -static gid_t * -realloc_groupbuf (gid_t *g, size_t num) -{ - if (xalloc_oversized (num, sizeof *g)) - { - errno = ENOMEM; - return NULL; - } - - return realloc (g, num * sizeof *g); -} - -/* Like getugroups, but store the result in malloc'd storage. - Set *GROUPS to the malloc'd list of all group IDs of which USERNAME - is a member. If GID is not -1, store it first. GID should be the - group ID (pw_gid) obtained from getpwuid, in case USERNAME is not - listed in the groups database (e.g., /etc/groups). If USERNAME is - NULL, store the supplementary groups of the current process, and GID - should be -1 or the effective group ID (getegid). Upon failure, - don't modify *GROUPS, set errno, and return -1. Otherwise, return - the number of groups. The resulting list may contain duplicates, - but adjacent members will be distinct. */ - -int -mgetgroups (char const *username, gid_t gid, gid_t **groups) -{ - int max_n_groups; - int ng; - gid_t *g; - -#if HAVE_GETGROUPLIST - /* We prefer to use getgrouplist if available, because it has better - performance characteristics. - - In glibc 2.3.2, getgrouplist is buggy. If you pass a zero as the - length of the output buffer, getgrouplist will still write to the - buffer. Contrary to what some versions of the getgrouplist - manpage say, this doesn't happen with nonzero buffer sizes. - Therefore our usage here just avoids a zero sized buffer. */ - if (username) - { - enum { N_GROUPS_INIT = 10 }; - max_n_groups = N_GROUPS_INIT; - - g = realloc_groupbuf (NULL, max_n_groups); - if (g == NULL) - return -1; - - while (1) - { - gid_t *h; - int last_n_groups = max_n_groups; - - /* getgrouplist updates max_n_groups to num required. */ - ng = getgrouplist (username, gid, g, &max_n_groups); - - /* Some systems (like Darwin) have a bug where they - never increase max_n_groups. */ - if (ng < 0 && last_n_groups == max_n_groups) - max_n_groups *= 2; - - if ((h = realloc_groupbuf (g, max_n_groups)) == NULL) - { - int saved_errno = errno; - free (g); - errno = saved_errno; - return -1; - } - g = h; - - if (0 <= ng) - { - *groups = g; - /* On success some systems just return 0 from getgrouplist, - so return max_n_groups rather than ng. */ - return max_n_groups; - } - } - } - /* else no username, so fall through and use getgroups. */ -#endif - - max_n_groups = (username - ? getugroups (0, NULL, username, gid) - : getgroups (0, NULL)); - - /* If we failed to count groups because there is no supplemental - group support, then return an array containing just GID. - Otherwise, we fail for the same reason. */ - if (max_n_groups < 0) - { - if (errno == ENOSYS && (g = realloc_groupbuf (NULL, 1))) - { - *groups = g; - *g = gid; - return gid != (gid_t) -1; - } - return -1; - } - - if (!username && gid != (gid_t) -1) - max_n_groups++; - g = realloc_groupbuf (NULL, max_n_groups); - if (g == NULL) - return -1; - - ng = (username - ? getugroups (max_n_groups, g, username, gid) - : getgroups (max_n_groups - (gid != (gid_t) -1), - g + (gid != (gid_t) -1))); - - if (ng < 0) - { - /* Failure is unexpected, but handle it anyway. */ - int saved_errno = errno; - free (g); - errno = saved_errno; - return -1; - } - - if (!username && gid != (gid_t) -1) - { - *g = gid; - ng++; - } - *groups = g; - - /* Reduce the number of duplicates. On some systems, getgroups - returns the effective gid twice: once as the first element, and - once in its position within the supplementary groups. On other - systems, getgroups does not return the effective gid at all, - which is why we provide a GID argument. Meanwhile, the GID - argument, if provided, is typically any member of the - supplementary groups, and not necessarily the effective gid. So, - the most likely duplicates are the first element with an - arbitrary other element, or pair-wise duplication between the - first and second elements returned by getgroups. It is possible - that this O(n) pass will not remove all duplicates, but it is not - worth the effort to slow down to an O(n log n) algorithm that - sorts the array in place, nor the extra memory needed for - duplicate removal via an O(n) hash-table. Hence, this function - is only documented as guaranteeing no pair-wise duplicates, - rather than returning the minimal set. */ - if (1 < ng) - { - gid_t first = *g; - gid_t *next; - gid_t *groups_end = g + ng; - - for (next = g + 1; next < groups_end; next++) - { - if (*next == first || *next == *g) - ng--; - else - *++g = *next; - } - } - - return ng; -} - -/* Like mgetgroups, but call xalloc_die on allocation failure. */ - -int -xgetgroups (char const *username, gid_t gid, gid_t **groups) -{ - int result = mgetgroups (username, gid, groups); - if (result == -1 && errno == ENOMEM) - xalloc_die (); - return result; -} diff --git a/tests/mgetgroups.h b/tests/mgetgroups.h deleted file mode 100644 index a1fd040..0000000 --- a/tests/mgetgroups.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Get a list of all group IDs associated with a specified user ID. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -int mgetgroups (const char *username, gid_t gid, gid_t **groups); -int xgetgroups (const char *username, gid_t gid, gid_t **groups); diff --git a/tests/minus-zero.h b/tests/minus-zero.h new file mode 100644 index 0000000..be65edc --- /dev/null +++ b/tests/minus-zero.h @@ -0,0 +1,74 @@ +/* Macros for floating-point negative zero. + Copyright (C) 2010-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Keep in sync with m4/minus-zero.m4! */ + +#include + + +/* minus_zerof represents the value -0.0f. */ + +/* 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 Mac OS X 10.5. */ +#if defined __hpux || defined __sgi || defined __ICC +static float +compute_minus_zerof (void) +{ + return -FLT_MIN * FLT_MIN; +} +# define minus_zerof compute_minus_zerof () +#else +float minus_zerof = -0.0f; +#endif + + +/* minus_zerod represents the value -0.0. */ + +/* 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 Mac OS X 10.5. */ +#if defined __hpux || defined __sgi || defined __ICC +static double +compute_minus_zerod (void) +{ + return -DBL_MIN * DBL_MIN; +} +# define minus_zerod compute_minus_zerod () +#else +double minus_zerod = -0.0; +#endif + + +/* minus_zerol represents the value -0.0L. */ + +/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0L. + 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 Mac OS X 10.5. */ +#if defined __hpux || defined __sgi || defined __ICC +static long double +compute_minus_zerol (void) +{ + return -LDBL_MIN * LDBL_MIN; +} +# define minus_zerol compute_minus_zerol () +#else +long double minus_zerol = -0.0L; +#endif diff --git a/tests/nan.h b/tests/nan.h new file mode 100644 index 0000000..9da3684 --- /dev/null +++ b/tests/nan.h @@ -0,0 +1,70 @@ +/* Macros for not-a-number. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + +/* NaNf () returns a 'float' not-a-number. */ + +/* 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 +NaNf () +{ + static float zero = 0.0f; + return zero / zero; +} +#else +# define NaNf() (0.0f / 0.0f) +#endif + + +/* NaNd () returns a 'double' not-a-number. */ + +/* 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 double +NaNd () +{ + static double zero = 0.0; + return zero / zero; +} +#else +# define NaNd() (0.0 / 0.0) +#endif + + +/* NaNl () returns a 'long double' not-a-number. */ + +/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the + runtime type conversion. + The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L. */ +#ifdef __sgi +static long double NaNl () +{ + double zero = 0.0; + return zero / zero; +} +#elif defined _MSC_VER +static long double +NaNl () +{ + static long double zero = 0.0L; + return zero / zero; +} +#else +# define NaNl() (0.0L / 0.0L) +#endif diff --git a/tests/nanosleep.c b/tests/nanosleep.c new file mode 100644 index 0000000..d0b12e7 --- /dev/null +++ b/tests/nanosleep.c @@ -0,0 +1,274 @@ +/* Provide a replacement for the POSIX nanosleep function. + + Copyright (C) 1999-2000, 2002, 2004-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering + and Bruno Haible for the native Windows part */ + +#include + +#include + +#include "intprops.h" +#include "sig-handler.h" +#include "verify.h" + +#include +#include +#include +#include +#include + +#include +#include + +#include + + +enum { BILLION = 1000 * 1000 * 1000 }; + +#if HAVE_BUG_BIG_NANOSLEEP + +int +nanosleep (const struct timespec *requested_delay, + struct timespec *remaining_delay) +# undef nanosleep +{ + /* nanosleep mishandles large sleeps due to internal overflow problems. + The worst known case of this is Linux 2.6.9 with glibc 2.3.4, which + can't sleep more than 24.85 days (2^31 milliseconds). Similarly, + cygwin 1.5.x, which can't sleep more than 49.7 days (2^32 milliseconds). + Solve this by breaking the sleep up into smaller chunks. */ + + if (requested_delay->tv_nsec < 0 || BILLION <= requested_delay->tv_nsec) + { + errno = EINVAL; + return -1; + } + + { + /* Verify that time_t is large enough. */ + verify (TYPE_MAXIMUM (time_t) / 24 / 24 / 60 / 60); + const time_t limit = 24 * 24 * 60 * 60; + time_t seconds = requested_delay->tv_sec; + struct timespec intermediate; + intermediate.tv_nsec = requested_delay->tv_nsec; + + while (limit < seconds) + { + int result; + intermediate.tv_sec = limit; + result = nanosleep (&intermediate, remaining_delay); + seconds -= limit; + if (result) + { + if (remaining_delay) + remaining_delay->tv_sec += seconds; + return result; + } + intermediate.tv_nsec = 0; + } + intermediate.tv_sec = seconds; + return nanosleep (&intermediate, remaining_delay); + } +} + +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Native Windows platforms. */ + +# define WIN32_LEAN_AND_MEAN +# include + +/* The Windows API function Sleep() has a resolution of about 15 ms and takes + at least 5 ms to execute. We use this function for longer time periods. + Additionally, we use busy-looping over short time periods, to get a + resolution of about 0.01 ms. In order to measure such short timespans, + we use the QueryPerformanceCounter() function. */ + +int +nanosleep (const struct timespec *requested_delay, + struct timespec *remaining_delay) +{ + static bool initialized; + /* Number of performance counter increments per nanosecond, + or zero if it could not be determined. */ + static double ticks_per_nanosecond; + + if (requested_delay->tv_nsec < 0 || BILLION <= requested_delay->tv_nsec) + { + errno = EINVAL; + return -1; + } + + /* For requested delays of one second or more, 15ms resolution is + sufficient. */ + if (requested_delay->tv_sec == 0) + { + if (!initialized) + { + /* Initialize ticks_per_nanosecond. */ + LARGE_INTEGER ticks_per_second; + + if (QueryPerformanceFrequency (&ticks_per_second)) + ticks_per_nanosecond = + (double) ticks_per_second.QuadPart / 1000000000.0; + + initialized = true; + } + if (ticks_per_nanosecond) + { + /* QueryPerformanceFrequency worked. We can use + QueryPerformanceCounter. Use a combination of Sleep and + busy-looping. */ + /* Number of milliseconds to pass to the Sleep function. + Since Sleep can take up to 8 ms less or 8 ms more than requested + (or maybe more if the system is loaded), we subtract 10 ms. */ + int sleep_millis = (int) requested_delay->tv_nsec / 1000000 - 10; + /* Determine how many ticks to delay. */ + LONGLONG wait_ticks = requested_delay->tv_nsec * ticks_per_nanosecond; + /* Start. */ + LARGE_INTEGER counter_before; + if (QueryPerformanceCounter (&counter_before)) + { + /* Wait until the performance counter has reached this value. + We don't need to worry about overflow, because the performance + counter is reset at reboot, and with a frequency of 3.6E6 + ticks per second 63 bits suffice for over 80000 years. */ + LONGLONG wait_until = counter_before.QuadPart + wait_ticks; + /* Use Sleep for the longest part. */ + if (sleep_millis > 0) + Sleep (sleep_millis); + /* Busy-loop for the rest. */ + for (;;) + { + LARGE_INTEGER counter_after; + if (!QueryPerformanceCounter (&counter_after)) + /* QueryPerformanceCounter failed, but succeeded earlier. + Should not happen. */ + break; + if (counter_after.QuadPart >= wait_until) + /* The requested time has elapsed. */ + break; + } + goto done; + } + } + } + /* Implementation for long delays and as fallback. */ + Sleep (requested_delay->tv_sec * 1000 + requested_delay->tv_nsec / 1000000); + + done: + /* Sleep is not interruptible. So there is no remaining delay. */ + if (remaining_delay != NULL) + { + remaining_delay->tv_sec = 0; + remaining_delay->tv_nsec = 0; + } + return 0; +} + +#else +/* Unix platforms lacking nanosleep. */ + +/* Some systems (MSDOS) don't have SIGCONT. + Using SIGTERM here turns the signal-handling code below + into a no-op on such systems. */ +# ifndef SIGCONT +# define SIGCONT SIGTERM +# endif + +static sig_atomic_t volatile suspended; + +/* Handle SIGCONT. */ + +static void +sighandler (int sig) +{ + suspended = 1; +} + +/* Suspend execution for at least *TS_DELAY seconds. */ + +static void +my_usleep (const struct timespec *ts_delay) +{ + struct timeval tv_delay; + tv_delay.tv_sec = ts_delay->tv_sec; + tv_delay.tv_usec = (ts_delay->tv_nsec + 999) / 1000; + if (tv_delay.tv_usec == 1000000) + { + if (tv_delay.tv_sec == TYPE_MAXIMUM (time_t)) + tv_delay.tv_usec = 1000000 - 1; /* close enough */ + else + { + tv_delay.tv_sec++; + tv_delay.tv_usec = 0; + } + } + select (0, NULL, NULL, NULL, &tv_delay); +} + +/* Suspend execution for at least *REQUESTED_DELAY seconds. The + *REMAINING_DELAY part isn't implemented yet. */ + +int +nanosleep (const struct timespec *requested_delay, + struct timespec *remaining_delay) +{ + static bool initialized; + + if (requested_delay->tv_nsec < 0 || BILLION <= requested_delay->tv_nsec) + { + errno = EINVAL; + return -1; + } + + /* set up sig handler */ + if (! initialized) + { + struct sigaction oldact; + + sigaction (SIGCONT, NULL, &oldact); + if (get_handler (&oldact) != SIG_IGN) + { + struct sigaction newact; + + newact.sa_handler = sighandler; + sigemptyset (&newact.sa_mask); + newact.sa_flags = 0; + sigaction (SIGCONT, &newact, NULL); + } + initialized = true; + } + + suspended = 0; + + my_usleep (requested_delay); + + if (suspended) + { + /* Calculate time remaining. */ + /* FIXME: the code in sleep doesn't use this, so there's no + rush to implement it. */ + + errno = EINTR; + } + + /* FIXME: Restore sig handler? */ + + return suspended; +} +#endif diff --git a/tests/nap.h b/tests/nap.h index 40c1744..cc596d0 100644 --- a/tests/nap.h +++ b/tests/nap.h @@ -1,5 +1,5 @@ /* Assist in file system timestamp tests. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,49 +19,110 @@ #ifndef GLTEST_NAP_H # define GLTEST_NAP_H +# include +# include + +/* File descriptor used for the witness file. */ +static int nap_fd = -1; + +/* Return A - B, in ns. + Return 0 if the true result would be negative. + Return INT_MAX if the true result would be greater than INT_MAX. */ +static int +diff_timespec (struct timespec a, struct timespec b) +{ + time_t as = a.tv_sec; + time_t bs = b.tv_sec; + int ans = a.tv_nsec; + int bns = b.tv_nsec; + + if (! (bs < as || (bs == as && bns < ans))) + return 0; + if (as - bs <= INT_MAX / 1000000000) + { + int sdiff = (as - bs) * 1000000000; + int usdiff = ans - bns; + if (usdiff < INT_MAX - sdiff) + return sdiff + usdiff; + } + return INT_MAX; +} + +static void +get_stat (int fd, struct stat *st, int do_write) +{ + if (do_write) + ASSERT (write (fd, "\n", 1) == 1); + ASSERT (fstat (fd, st) == 0); +} + +/* Given a file whose descriptor is FD, see whether delaying by DELAY + nanoseconds causes a change in a file's ctime and mtime. + OLD_ST is the file's status, recently gotten. */ +static bool +nap_works (int fd, int delay, struct stat old_st) +{ + struct stat st; + struct timespec delay_spec; + delay_spec.tv_sec = delay / 1000000000; + delay_spec.tv_nsec = delay % 1000000000; + ASSERT (nanosleep (&delay_spec, 0) == 0); + get_stat (fd, &st, 1); + + if ( diff_timespec (get_stat_ctime (&st), get_stat_ctime (&old_st)) + && diff_timespec (get_stat_mtime (&st), get_stat_mtime (&old_st))) + return true; + + return false; +} + +#define TEMPFILE BASE "nap.tmp" + +static void +clear_temp_file (void) +{ + if (0 <= nap_fd) + { + ASSERT (close (nap_fd) != -1); + ASSERT (unlink (TEMPFILE) != -1); + } +} + /* Sleep long enough to notice a timestamp difference on the file - system in the current directory. Assumes that BASE is defined, - and requires that the test module depends on usleep. */ + system in the current directory. Use an adaptive approach, trying + to find the smallest delay which works on the current file system + to make the timestamp difference appear. Assert a maximum delay of + ~2 seconds, more precisely sum(2^n) from 0 to 30 = 2^31 - 1 = 2.1s. + Assumes that BASE is defined, and requires that the test module + depends on nanosleep. */ static void nap (void) { - static long delay; - if (!delay) + struct stat old_st; + static int delay = 1; + + if (-1 == nap_fd) + { + atexit (clear_temp_file); + ASSERT ((nap_fd = creat (TEMPFILE, 0600)) != -1); + get_stat (nap_fd, &old_st, 0); + } + else { - /* Initialize only once, by sleeping for 20 milliseconds (needed - since xfs has a quantization of about 10 milliseconds, even - though it has a granularity of 1 nanosecond, and since NTFS - has a default quantization of 15.25 milliseconds, even though - it has a granularity of 100 nanoseconds). If the seconds - differ, repeat the test one more time (in case we crossed a - quantization boundary on a file system with 1 second - resolution). If we can't observe a difference in only the - nanoseconds, then fall back to 1 second if the time is odd, - and 2 seconds (needed for FAT) if time is even. */ - struct stat st1; - struct stat st2; - ASSERT (close (creat (BASE "tmp", 0600)) == 0); - ASSERT (stat (BASE "tmp", &st1) == 0); - ASSERT (unlink (BASE "tmp") == 0); - delay = 20000; - usleep (delay); - ASSERT (close (creat (BASE "tmp", 0600)) == 0); - ASSERT (stat (BASE "tmp", &st2) == 0); - ASSERT (unlink (BASE "tmp") == 0); - if (st1.st_mtime != st2.st_mtime) - { - /* Seconds differ, give it one more shot. */ - st1 = st2; - usleep (delay); - ASSERT (close (creat (BASE "tmp", 0600)) == 0); - ASSERT (stat (BASE "tmp", &st2) == 0); - ASSERT (unlink (BASE "tmp") == 0); - } - if (! (st1.st_mtime == st2.st_mtime - && get_stat_mtime_ns (&st1) < get_stat_mtime_ns (&st2))) - delay = (st1.st_mtime & 1) ? 1000000 : 2000000; + ASSERT (0 <= nap_fd); + get_stat (nap_fd, &old_st, 1); } - usleep (delay); + + if (1 < delay) + delay = delay / 2; /* Try half of the previous delay. */ + ASSERT (0 < delay); + + for ( ; delay <= 2147483647; delay = delay * 2) + if (nap_works (nap_fd, delay, old_st)) + return; + + /* Bummer: even the highest nap delay didn't work. */ + ASSERT (0); } #endif /* GLTEST_NAP_H */ diff --git a/tests/netinet_in.in.h b/tests/netinet_in.in.h new file mode 100644 index 0000000..f0129df --- /dev/null +++ b/tests/netinet_in.in.h @@ -0,0 +1,47 @@ +/* Substitute for . + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _@GUARD_PREFIX@_NETINET_IN_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if @HAVE_NETINET_IN_H@ + +/* On many platforms, assumes prior inclusion of + . */ +# include + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_NETINET_IN_H@ + +#endif + +#ifndef _@GUARD_PREFIX@_NETINET_IN_H +#define _@GUARD_PREFIX@_NETINET_IN_H + +#if !@HAVE_NETINET_IN_H@ + +/* A platform that lacks . */ + +# include + +#endif + +#endif /* _@GUARD_PREFIX@_NETINET_IN_H */ +#endif /* _@GUARD_PREFIX@_NETINET_IN_H */ diff --git a/tests/pipe.c b/tests/pipe.c new file mode 100644 index 0000000..4db9041 --- /dev/null +++ b/tests/pipe.c @@ -0,0 +1,50 @@ +/* Create a pipe. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#include + +/* Specification. */ +#include + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Native Windows API. */ + +/* Get _pipe(). */ +# include + +/* Get _O_BINARY. */ +# include + +int +pipe (int fd[2]) +{ + /* Mingw changes fd to {-1,-1} on failure, but this violates + http://austingroupbugs.net/view.php?id=467 */ + int tmp[2]; + int result = _pipe (tmp, 4096, _O_BINARY); + if (!result) + { + fd[0] = tmp[0]; + fd[1] = tmp[1]; + } + return result; +} + +#else + +# error "This platform lacks a pipe function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib." + +#endif diff --git a/tests/priv-set.c b/tests/priv-set.c index 1b5429e..0884360 100644 --- a/tests/priv-set.c +++ b/tests/priv-set.c @@ -1,6 +1,6 @@ /* Query, remove, or restore a Solaris privilege. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,6 +18,9 @@ Written by David Bartley. */ #include + +#define PRIV_SET_INLINE _GL_EXTERN_INLINE + #include "priv-set.h" #if HAVE_GETPPRIV && HAVE_PRIV_H diff --git a/tests/priv-set.h b/tests/priv-set.h index dfdb2ca..ff5877c 100644 --- a/tests/priv-set.h +++ b/tests/priv-set.h @@ -1,6 +1,6 @@ /* Query, remove, or restore a Solaris privilege. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,6 +17,14 @@ Written by David Bartley. */ +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef PRIV_SET_INLINE +# define PRIV_SET_INLINE _GL_INLINE +#endif + #if HAVE_GETPPRIV && HAVE_PRIV_H # include @@ -25,26 +33,32 @@ int priv_set_ismember (const char *priv); int priv_set_remove (const char *priv); int priv_set_restore (const char *priv); -static inline int priv_set_remove_linkdir (void) +PRIV_SET_INLINE int +priv_set_remove_linkdir (void) { return priv_set_remove (PRIV_SYS_LINKDIR); } -static inline int priv_set_restore_linkdir (void) +PRIV_SET_INLINE int +priv_set_restore_linkdir (void) { return priv_set_restore (PRIV_SYS_LINKDIR); } #else -static inline int priv_set_remove_linkdir (void) +PRIV_SET_INLINE int +priv_set_remove_linkdir (void) { return -1; } -static inline int priv_set_restore_linkdir (void) +PRIV_SET_INLINE int +priv_set_restore_linkdir (void) { return -1; } #endif + +_GL_INLINE_HEADER_END diff --git a/tests/putenv.c b/tests/putenv.c index 68e5fec..b9f5079 100644 --- a/tests/putenv.c +++ b/tests/putenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2011 Free Software +/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2014 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C @@ -34,14 +34,21 @@ #include #include -#if HAVE_GNU_LD -# define environ __environ -#else +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# define WIN32_LEAN_AND_MEAN +# include +#endif + +#if _LIBC +# if HAVE_GNU_LD +# define environ __environ +# else extern char **environ; +# endif #endif #if _LIBC -/* This lock protects against simultaneous modifications of `environ'. */ +/* This lock protects against simultaneous modifications of 'environ'. */ # include __libc_lock_define_initialized (static, envlock) # define LOCK __libc_lock_lock (envlock) @@ -55,7 +62,9 @@ static int _unsetenv (const char *name) { size_t len; +#if !HAVE_DECL__PUTENV char **ep; +#endif if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) { @@ -65,6 +74,21 @@ _unsetenv (const char *name) len = strlen (name); +#if HAVE_DECL__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; @@ -85,17 +109,17 @@ _unsetenv (const char *name) UNLOCK; return 0; +#endif } /* Put STRING, which is of the form "NAME=VALUE", in the environment. - If STRING contains no `=', then remove STRING from the environment. */ + If STRING contains no '=', then remove STRING from the environment. */ 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) { @@ -103,30 +127,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_DECL__PUTENV + /* Rely on _putenv to allocate the new environment. If other + parts of the application use _putenv, the !HAVE_DECL__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; return 0; +#endif } diff --git a/tests/raise.c b/tests/raise.c new file mode 100644 index 0000000..cf58a7e --- /dev/null +++ b/tests/raise.c @@ -0,0 +1,79 @@ +/* Provide a non-threads replacement for the POSIX raise function. + + Copyright (C) 2002-2003, 2005-2006, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Jim Meyering and Bruno Haible */ + +#include + +/* Specification. */ +#include + +#if HAVE_RAISE +/* Native Windows platform. */ + +# include + +# include "msvc-inval.h" + +# undef raise + +# if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static int +raise_nothrow (int sig) +{ + int result; + + TRY_MSVC_INVAL + { + result = raise (sig); + } + CATCH_MSVC_INVAL + { + result = -1; + errno = EINVAL; + } + DONE_MSVC_INVAL; + + return result; +} +# else +# define raise_nothrow raise +# endif + +#else +/* An old Unix platform. */ + +# include + +# define rpl_raise raise + +#endif + +int +rpl_raise (int sig) +{ +#if GNULIB_defined_signal_blocking && GNULIB_defined_SIGPIPE + if (sig == SIGPIPE) + return _gl_raise_SIGPIPE (); +#endif + +#if HAVE_RAISE + return raise_nothrow (sig); +#else + return kill (getpid (), sig); +#endif +} diff --git a/tests/randomd.c b/tests/randomd.c new file mode 100644 index 0000000..85cd981 --- /dev/null +++ b/tests/randomd.c @@ -0,0 +1,1028 @@ +/* Some random 'double' numbers used by gnulib tests. + Copyright (C) 2012-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "macros.h" + +/* Some numbers in the interval [0,1). */ + +const double randomd[1000] = +{ + /* Some not so random numbers at the beginning. */ + 0.0, + /* Then some numbers generated by GNU clisp. */ + 0.89255299921822260894833866359, + 0.56160033401164667976788987953, + 0.51743003502243816003616725706, + 0.78419011286685927826225711525, + 0.64400370685467819470063888148, + 0.38151255107934048933308886009, + 0.279822118770531878839000163945, + 0.51983544681375980919751125922, + 0.314601557551148376372971500376, + 0.44551938964685651088492647794, + 0.44235192503793823441729544512, + 0.0040120762636767874958681841509, + 0.57608572759464216512285032474, + 0.69151953350396585566714564265, + 0.65634190642598148152780718322, + 0.68520459394253807590733184567, + 0.60728078832107635628786818115, + 0.376679934380311318950949959986, + 0.48893422455419005003224231708, + 0.59664228319132670346209747371, + 0.70162191594290728927555900075, + 0.70981089000005327192380201706, + 0.480574069305863387682360414433, + 0.369264627455974856929910550376, + 0.42224495444170593700839286742, + 0.96974027194201320964041066537, + 0.69950081092902694549973698004, + 0.366921803754944985368022837045, + 0.19460757354611588216534077527, + 0.046437559879825520495822908204, + 0.57694149138457596563075731094, + 0.49632733844850578203860859535, + 0.80735347459453553970910033766, + 0.210271595033975357161360058967, + 0.176539870249396534142059724214, + 0.75320267419158828905982021879, + 0.09535042912249636739069790414, + 0.41433965906065337672703334968, + 0.62189345390648146852641556292, + 0.322595610794052908153116342595, + 0.173860860827838938281708881865, + 0.55258425878412963601205794028, + 0.066559056629606284504735241978, + 0.0193835990781649263368095562556, + 0.127101629778251450428653553143, + 0.9603475517586241593077319367, + 0.68429794014738591042302507235, + 0.0139808909843634026741151214975, + 0.0036035679428138856395527711611, + 0.072656401341518399752950821809, + 0.229562863635014486626281702425, + 0.88337277579960676546469424767, + 0.88850212167800818244030104263, + 0.208063225990716089095767541316, + 0.268304917462565269805874454916, + 0.3195427196271617997151392088, + 0.59101407246003811289573881403, + 0.972093867752368095080492689, + 0.409246208960242309650511849637, + 0.84250639316418167849010246997, + 0.063842712141624332977179722113, + 0.96470327141354888687046060373, + 0.43109879978424216966175314888, + 0.14551248610248934836482236208, + 0.84819094513299136408788493212, + 0.41166757935215520377191731704, + 0.96020915727830366672170130175, + 0.55313106883839046701902022583, + 0.9796595451013758579218900134, + 0.74222694300533435700276764516, + 0.117294243075539310976051880564, + 0.32216824750097146958151447387, + 0.59090211400137031908131441, + 0.116841680533127258304897076543, + 0.83595865401141052310417569507, + 0.249488155772987988074361149176, + 0.67896015287499211280971531326, + 0.72256498621401843299673078876, + 0.327315362968271601258667297595, + 0.37438214921868498405279953481, + 0.76929694812658272272027330778, + 0.44282297788821568912463681727, + 0.59517407740270913902014268964, + 0.346217547960702024419571713567, + 0.68339868731911838904373225224, + 0.057507087039986776837238366719, + 0.1189343986186977384509521024, + 0.65646666532916174831489781194, + 0.80925124288745606089697795707, + 0.61302937875769552609444313984, + 0.64367434863387777107222872563, + 0.059228300879437554416166010005, + 0.76899237494115809397158171526, + 0.335797991302131791511629123206, + 0.72923178692628392090326699514, + 0.79300056654108221012876564405, + 0.58866760551158502690719665335, + 0.65249222174748700395779659047, + 0.79573528799715877963614353006, + 0.101363067664632247385474166088, + 0.392494669960902131436398643207, + 0.37323453200630776302168616197, + 0.29857554596542776498065634631, + 0.9796202149626312305197715787, + 0.58770219934833805722677794788, + 0.126574575737099431915356308504, + 0.51086682994362911961448609847, + 0.26221303911946316754295166201, + 0.87331402410090670707406246035, + 0.08604799064198292716037672196, + 0.77880380648915901962140523059, + 0.34131646312914811415381942246, + 0.422787222735822749759714960156, + 0.16550478231620269333824890372, + 0.84087065799129220871741135711, + 0.96561976597443996963329538915, + 0.059890627133354026356081805998, + 0.09359839900604706997291172522, + 0.61463026659668017286248279853, + 0.220582135665522265733252389516, + 0.30146695094150797543070759948, + 0.406591688270652513808216198946, + 0.206959751707199812083987569348, + 0.71382992952779021033600406503, + 0.98971690700151825984363090029, + 0.86339958328134745391858859595, + 0.70037828363249257457230217791, + 0.97380974339470107231135690474, + 0.9184635965630883290893011311, + 0.418605216026507942885819265225, + 0.61793227858714759711625818653, + 0.67394880797682685081908511723, + 0.98871101941805039780826467279, + 0.65973593853137069988371349845, + 0.93348525072186907424189028727, + 0.59164378220465485142298641014, + 0.95303768733773138214124075961, + 0.88667310242538944858141870801, + 0.83785319781204861623008709825, + 0.54026788227426708201242457367, + 0.74842599257855801522259951132, + 0.286624102305531463268442510375, + 0.41180484980938874161376712508, + 0.22754664620316922947541651384, + 0.62360609793949755240041318939, + 0.3311618194042077047850111557, + 0.315407885695867020730009836503, + 0.215221706711430951961780213436, + 0.168600630933631406101821024413, + 0.62661489373200405241464923618, + 0.95357070304277219756741072036, + 0.5186418766697788447635039428, + 0.70772930521061953327927296944, + 0.410376884797056150221504703145, + 0.39705302343406249619577860633, + 0.79215885822696034431481699125, + 0.157831717946112504384603002152, + 0.26892306298536012837855426922, + 0.15697088614321016223211167568, + 0.41395315712905823355235182393, + 0.043977876945327860015049914653, + 0.91453495544799358550673657283, + 0.46230093259088633973148827911, + 0.79479146768024434444120965094, + 0.1466704986407674407377422815, + 0.093614591443204076599999803382, + 0.66061870961706149406527099303, + 0.087462146328394574476138187113, + 0.79683664444310818297700615557, + 0.39732728185755441060070738751, + 0.141934473990413594291362391075, + 0.63111751995951919258061547632, + 0.78521985432793823024330967029, + 0.53307346282606806792796696141, + 0.61679109370763781010143645189, + 0.40696293619387120891515025426, + 0.68670343879278712242412028794, + 0.0115112936831136012901340526452, + 0.70866056737692430987650236649, + 0.75378980574358943122474800795, + 0.17133202766710894969283150847, + 0.36771201738922655520549864974, + 0.64614182581953931840374311331, + 0.354495602088990708111406368474, + 0.96418771817934443444348833491, + 0.51633426669933834634574104246, + 0.064671329812306055349433587193, + 0.084335079914541732137341401384, + 0.98578018340150609333535890283, + 0.32988119060114570391488875477, + 0.70568290443337103364762141207, + 0.7501960060851696034137148851, + 0.141312840936106004164373056114, + 0.60721022154106372815080238296, + 0.49179275887283771965744826261, + 0.85530668893284708999269819019, + 0.09730053915339358769067661488, + 0.48817911888023094845428570434, + 0.37116312252354470380676793579, + 0.61870369881699387959990992873, + 0.381874188039839457469043174076, + 0.68193837613090719561872304949, + 0.4773618313988618747215621251, + 0.152383599292709764750406667286, + 0.54317522808228983459963725598, + 0.363848788591302782268887022354, + 0.0105589810271147011378412305973, + 0.55582445068669939957392951111, + 0.99910376130213936748996659383, + 0.90286867348280161480903197439, + 0.48268382934936288156485037692, + 0.0976084557356802030533675394, + 0.29004949962481398455881920169, + 0.99169758897256717005011514856, + 0.20722895154834288274430061308, + 0.50294863638464584121275744208, + 0.71094033855350495714847377558, + 0.94078709219520224551350834268, + 0.48088262771516317628650315489, + 0.80538698628980761175811796611, + 0.83495029615293903361580945571, + 0.67996381940825251937974905761, + 0.57936805772275234468590364926, + 0.41778137764942046281708286844, + 0.161602687591454506771276482303, + 0.093910625156097743113739432334, + 0.45716763620641108625606409874, + 0.96455075374827233820027584808, + 0.5179966880512917274934448216, + 0.046797382046060065926143985952, + 0.83673567319931334127111064225, + 0.44224504444533247245974476514, + 0.73281179385894336737033582786, + 0.5642490153724193432309549673, + 0.83700200507325250303481208805, + 0.152714941779871552944298597052, + 0.38606607994977770238226473985, + 0.0155140917516105439042442246577, + 0.51621537013393688713546096688, + 0.311969390991657895966526156064, + 0.83890647777450698803932943984, + 0.54370750820133482930695388638, + 0.98636765788772465929756760473, + 0.77334255661128878905675504339, + 0.57070354296508751519811368688, + 0.8365252076669013372866223481, + 0.344601601940890721182485798794, + 0.92658930620470543221158939208, + 0.72724523363899270076210273102, + 0.413672082025645586061788451734, + 0.5132836422023222169840403333, + 0.82135610583961360173883281975, + 0.423835065039748889417547786563, + 0.87083598844595488941471761572, + 0.59009392451459866513886634656, + 0.206124826643305920436961792363, + 0.288685540685143988030522421633, + 0.7944357933456167153993184889, + 0.090945230657758780394996530608, + 0.52981750421369669363095418817, + 0.091368944984485824360107751981, + 0.81824925769562351657564377069, + 0.083315412912658535228751011063, + 0.59602276778799576464600065047, + 0.52258035262146456789454411102, + 0.394692074165738897132014378974, + 0.92031214264405188928824363967, + 0.32812665356161216265971156268, + 0.79754299890007289545033977389, + 0.3029021512227565310021437326, + 0.81425785760698537744367921928, + 0.85199399843570233736733560413, + 0.096629890212080240754541391968, + 0.60643798959967098211181910285, + 0.75368518979236587723780129098, + 0.451368813651510369666120626045, + 0.86189868235067352904955566961, + 0.239506411296874624231401913963, + 0.143392266376287906568670938457, + 0.035585084401323981008798496622, + 0.89407531932950775763701297226, + 0.56699767164913732414312190205, + 0.6107715946195223295493238966, + 0.980870588312723808697191463, + 0.37603666613089681502774907483, + 0.19565477083291620146833762404, + 0.70326913680165706368122461762, + 0.98247770640436619202690080984, + 0.54911931698472764719220618506, + 0.96749331150477343995263612791, + 0.9349501605275792139661332597, + 0.067704019779021886031495084945, + 0.52883185005352261786874768842, + 0.03879817199556086106868125058, + 0.011268895714104342862021635882, + 0.86781395233112768504418642287, + 0.73610697666830606371057497872, + 0.22595829849389174304359852447, + 0.95990840938724981323147621815, + 0.5938079875208820675776232526, + 0.78655922365792476391655372464, + 0.51099073264725007373467108776, + 0.66474884887866769539664215292, + 0.88640025828226102852258218854, + 0.39889893489572927635368967129, + 0.76340426725003756852384366924, + 0.485534753598641026618647825146, + 0.55957578573824837450384728978, + 0.50840543283094885180866842941, + 0.0102415845792896532313226969615, + 0.74666891036262398733922051708, + 0.49044748088989431070743849791, + 0.184017043174756439606592004597, + 0.0225210121470402648790231578307, + 0.096909683465740960387467976065, + 0.0521874432095560437920256545446, + 0.108114343037383115951564617563, + 0.77430486784405922952977031491, + 0.73286432949907824441702845144, + 0.083559249182272369453587951223, + 0.074541345541671560054508020717, + 0.55130541064331728019681677403, + 0.101450912226971008587146654246, + 0.74564503962660370005995595861, + 0.55903832180264925580029280922, + 0.86098138284846671753408133719, + 0.76146956314354797691373262733, + 0.5569854467166466965564479865, + 0.61138555623626762560168304163, + 0.93778268377974305185411499629, + 0.106728342608615813606903105742, + 0.51139895550624845300079248199, + 0.8826404150665399364200384063, + 0.79849755952621824621632991954, + 0.60058338183244813128378689372, + 0.57271235605091257806409062354, + 0.134476676178095582804914204515, + 0.62710051406343298533266304307, + 0.21517566131268423511744492316, + 0.87763268502269127056352092234, + 0.259516013975152388767641295316, + 0.54026961752737864438921779715, + 0.0321012344232942464157113655476, + 0.047765687217921465801489989111, + 0.17851281529041807770891682623, + 0.67864372391481596436180177405, + 0.27188630999531652193578141334, + 0.76570352378902765382129471855, + 0.55727605717645959087760838806, + 0.40035295538031700787360193533, + 0.65772683660586524086245866733, + 0.87515739410383285146563935658, + 0.51637173718066431535845791928, + 0.32843440805452173782945632394, + 0.46789250836790673252530282969, + 0.153916136058705475580104911632, + 0.38115724589238346986896925035, + 0.96911901452270741576104655076, + 0.327510878721849788805057952285, + 0.52921188196053063832762822112, + 0.357891066893689952162669812174, + 0.8109495999496825638917226258, + 0.87378695338223548954000159812, + 0.071735687760291841872657613394, + 0.22099818521305441851106524174, + 0.61319403424123059973018445501, + 0.49185069904977836269777464774, + 0.8465618819298531473261910176, + 0.88263955123256235889766657732, + 0.264605739218701311737446373095, + 0.157257748694727606809000832224, + 0.61172692557424578980817509135, + 0.89224381101792427145783648267, + 0.049436313890546252030141534714, + 0.78472068655126867546237630366, + 0.94890896727672958163705440614, + 0.61244719025309458330037069759, + 0.69652639673616920270100103049, + 0.82306805868313923466426022855, + 0.4619352653236511042512479492, + 0.248913888569715263431474781448, + 0.64972077945521993267494748532, + 0.058989138867897862567374093665, + 0.97969837050674699927934092348, + 0.112860503606029382332397067852, + 0.9148268966080465389473749031, + 0.80522292073416096202056634334, + 0.80810563925192214527344776336, + 0.082994810842601316055993203972, + 0.58154183958194788097113770541, + 0.91401321304178026032151961143, + 0.064162440925738934087179609749, + 0.15233762499249088696399602351, + 0.05051666992337641462246832006, + 0.138526581114846840617440323377, + 0.3330645447918149831766264793, + 0.217487368997014213919568641696, + 0.61893770768550649722673903221, + 0.48128956859001312165262121487, + 0.67074178502738313699688470847, + 0.74389636308055141796746779725, + 0.78623735396470085242463142878, + 0.74044466560335570728816983391, + 0.44977042205766449238521848558, + 0.04936658918716696558210777333, + 0.46898154881467544198433735515, + 0.86577421926732888331279455256, + 0.351697801257336354285066689416, + 0.44607679846684358775746123434, + 0.68542184287580537292736482205, + 0.044146424753083577398366558491, + 0.84496717026871403905274974765, + 0.20398318496314438897842101827, + 0.75107700174605698650069666924, + 0.178571061661964354577482608798, + 0.67178502534981979941629966218, + 0.90847842600882488644789391115, + 0.073076683947302775918335357377, + 0.33981323802799502107773228774, + 0.88205531070102240708858032672, + 0.52395959911163033140017417074, + 0.339537812421755656306362620887, + 0.54102447887624739438002987695, + 0.99615637434542139613844677579, + 0.91178029521112995461052949527, + 0.75825739605806537625994927603, + 0.20376049709427102495755901889, + 0.414724980644126108685694310425, + 0.33340705339227162790042902392, + 0.63442350111338002489027718102, + 0.79083735924049231993808201264, + 0.7022290803727963570326957922, + 0.073051026670174816217706335151, + 0.50842348505687696224462184336, + 0.32363091931107924009593033016, + 0.097074638787613630803324174721, + 0.79231345620836950165162896374, + 0.46134517653790366185204412042, + 0.87767180094474465071641454817, + 0.30504377737897498569142680272, + 0.96430402804903305707372788262, + 0.58722709934909516402891605024, + 0.36287829330987989626587492725, + 0.341369045118572012709880807167, + 0.18622546427505557603629823709, + 0.71794779555885705340742601105, + 0.098775720656078510422828040021, + 0.94170390436210924588938028149, + 0.6256516749208606216856038288, + 0.84990648194056707180867958453, + 0.24897158268824763099382644974, + 0.67126976686560821454618204853, + 0.18287142221906188751198231263, + 0.58301735289988287890086250316, + 0.39451451502323596545833498888, + 0.64778726863510310777659172018, + 0.344060647976610102257104623935, + 0.8543225374577925606075052273, + 0.41721025737118350088955048104, + 0.346301150923723212219486824146, + 0.430145349151890094004681136873, + 0.083653676599147505357408467754, + 0.89927285917733406113015320169, + 0.87717630249665962395834008139, + 0.114609060439245285884826496387, + 0.19079403943711412757743782207, + 0.095752662525740063245815699042, + 0.79249438764728213221559489213, + 0.36889557473162465630046043798, + 0.076691690566591062968137595944, + 0.82502767429905549906741868154, + 0.7665582347663079379259164121, + 0.40329445688627141530172819257, + 0.76025417855373928649612014969, + 0.67742016809536470259225177395, + 0.56458198627250149175789836481, + 0.78923506303765674533158921804, + 0.242546191857944356752822856477, + 0.5429792204847717222270173404, + 0.7269010821579782458839227112, + 0.68884017933657182784660476876, + 0.037868346502260087811459749823, + 0.5900507745679403546108564628, + 0.2867946536016681954708929644, + 0.47061390957475445523849010039, + 0.51289737877965767076806069599, + 0.422963220866519099525024712084, + 0.056516063514784913538055836342, + 0.77559606292381102490968685122, + 0.44812023547000818124896526252, + 0.8496368064876247362896528731, + 0.272242276648834925536741986616, + 0.21366791927514210787832263868, + 0.458126557153035507756298880855, + 0.59095285049337797286946531198, + 0.41387171106200290943847880691, + 0.040527832792286543640976926214, + 0.84749051864346812142321430329, + 0.6591922374100337646083630177, + 0.30504037894556796180304594549, + 0.69588062596190762407598122745, + 0.54615362946297678668402889519, + 0.27179536774730804380125320985, + 0.16312965572910266758089041195, + 0.60443803311418335000528681396, + 0.76221957063947757300487766314, + 0.0012561481228798307955579245318, + 0.38477311712200424042679172286, + 0.86336953839931184684851388121, + 0.85132017314817690655384788334, + 0.79741410166633177181313320738, + 0.81142674213295830272567127246, + 0.90095974521916505411272740187, + 0.461262866736651478343958282766, + 0.163149749038393754125992055513, + 0.079563568933303239293664877234, + 0.0076308467066608702534098522771, + 0.74020408989686798939059759005, + 0.68004244363120265645245845544, + 0.99423282025586676895879517721, + 0.256512790150101579655974619204, + 0.15841489307390214447222985222, + 0.53156533193583516285295078457, + 0.51195175518666885397864463638, + 0.2688502522458221215136352473, + 0.290743998007688539265414246556, + 0.375642431327791011131765421904, + 0.73366824563603699669790620984, + 0.89031055476039433366324605036, + 0.63269458446317741594059410575, + 0.79677646360837164675956632, + 0.91096051787867659208019728176, + 0.056411022047894420770349313174, + 0.7117937367428418076554349793, + 0.494496454398059649677550547185, + 0.9944698091905991687808626336, + 0.195654008095567563746040882677, + 0.33245249703376584453346565181, + 0.91671965905832444523554539619, + 0.104159073216349402499760928077, + 0.78250381705179599027513221262, + 0.82221952254403323129879405024, + 0.25404653774104883427079980313, + 0.89334850648967094099280368977, + 0.2721479244387740074938025269, + 0.58627710421889854554604323774, + 0.80740872172002770008164688167, + 0.295213737773499230779293451686, + 0.366266263469556210902410635735, + 0.72189449997560167388059780325, + 0.91339160960295327548014703572, + 0.27978723834100283634925494393, + 0.44312275285067091147157546317, + 0.88264479919648468925459438057, + 0.74860386620420068665117140949, + 0.97534502025842784289380076051, + 0.183653687608870314454061893335, + 0.14143760686328530307343938507, + 0.7794390875763962068165432699, + 0.79988123088296718350409621263, + 0.91344402454829897860268279997, + 0.3003753710559256572305330721, + 0.92236868180619898327118824659, + 0.85128995509445007265453349716, + 0.51226586850988855988005111668, + 0.59328586801467434659081264762, + 0.131543061349700789237108200816, + 0.97962864281984756641024957818, + 0.80003961712390827564285728721, + 0.07332191035039234849987853587, + 0.33710892945255754021249327366, + 0.237798240512212115424045579506, + 0.050628096786899757905464602857, + 0.36368141580193860149061967396, + 0.074547282281222729072803274018, + 0.32013351651022219595136046535, + 0.50087363542319392259892635316, + 0.95534128322832584718763016378, + 0.63089810554419660091974256912, + 0.45937043591639452731937380837, + 0.77794827072126710252068287081, + 0.5833967217973934570703322242, + 0.89948711130168823436943591707, + 0.88448792344727137087709578749, + 0.75774410588649351850782212564, + 0.51545850808454807305763364038, + 0.89535564141616759448334976604, + 0.433876155086630438489414332084, + 0.263145194001722566517185175524, + 0.094513715303174637696079970882, + 0.0067905149976316075236601623182, + 0.3746548325271489972742277758, + 0.81418012245523025207375976459, + 0.7382555515800124086679648947, + 0.71505454385778976492869269043, + 0.7698698840252614242858413632, + 0.53096667868591647121855295207, + 0.5913146508318579789498085478, + 0.82865413011200335887487636747, + 0.246477924915753655378269255135, + 0.7718625116939460952174295485, + 0.33088224685104582360581424038, + 0.077396220323469426942810035952, + 0.399851739373243384531661374094, + 0.74828949567652386217126904324, + 0.55533476993642340021791702209, + 0.475356366587838670689554086714, + 0.99199926249299355831492581518, + 0.60739053074816626181185925167, + 0.94570422855790142383862352906, + 0.67410117583869264525962136333, + 0.99340016295179621471645098914, + 0.30521664837678549625426072163, + 0.82786899862234431119578444516, + 0.0246054418785779831964997687095, + 0.33057040500642957115284791089, + 0.325865542252271051046671982904, + 0.116469964535698881624567000313, + 0.38792519202192930208550481713, + 0.147033252049062199325747990948, + 0.333360890210745561370686771174, + 0.267717098935309378552279527125, + 0.473606191830554736751491306975, + 0.69379726024488030302072707274, + 0.39866105325920152799379542147, + 0.075996151521605600512218326895, + 0.43692155239290098173990417979, + 0.63183509185797834489905365016, + 0.327726835190132824885685947736, + 0.82769389015654780671213364517, + 0.38036542617183448008870457384, + 0.06416363778906221378580326597, + 0.95989693996326393340364540321, + 0.77473792948077472252492320019, + 0.73353080354752465520384745159, + 0.79531316211939777703706647305, + 0.31887745411495362933791547194, + 0.5504233366621661345254817397, + 0.133841546560512334978343647306, + 0.93323316393590598213508657757, + 0.219534116905903225236593922786, + 0.352227557302752346568799070044, + 0.50699048681296139093781410327, + 0.56063256677949754339755086295, + 0.97859418495668224120337606178, + 0.43217748779939454097021337034, + 0.6118800794139137562939270606, + 0.8826339041571606455078384688, + 0.190654349423411314990846249777, + 0.0272323818569649486990095499454, + 0.13501820915175992368033644254, + 0.34430252524220055863712676536, + 0.135013324503164182485257894453, + 0.83301344777287732687815180326, + 0.71146270180847724757833953093, + 0.059584725284656364940760846576, + 0.124388342467555907606115942139, + 0.86760011350010388002288781466, + 0.43443235444248399222879725088, + 0.62257025564267773540408523682, + 0.42224480338939459869117553607, + 0.122203729563367693705179104655, + 0.86763329805228175173701751082, + 0.61852711996472568821866689006, + 0.9981036801779161471700405786, + 0.177126618334123901292041594724, + 0.37033568941002233661950847289, + 0.81720705981865203019383851894, + 0.194752883553301253160228353622, + 0.5399475493930702257701115294, + 0.21555050095259535717046390477, + 0.031480898918419061738395489394, + 0.0108626235742996694506893658131, + 0.29439861659506237876675916168, + 0.25969803792963051605662393213, + 0.64305111681301349941082616522, + 0.398301763391130971280749586885, + 0.82959279528518208376169366062, + 0.494452121232255582677051524076, + 0.032046850110252624668328949032, + 0.304808216164121089322038632124, + 0.43743086801077933536332835933, + 0.067635143022119684849606244687, + 0.062601171413915686472972559687, + 0.80704249768256597155262089974, + 0.049090587901867220876053770281, + 0.14290280489067737067786839775, + 0.85153414385190808252068833198, + 0.052035578866778404379096518691, + 0.84803461110488710482683367176, + 0.323391780352303842858779454674, + 0.52713499343541339922976296515, + 0.91034109375479019837692785976, + 0.106146556890642346491650008212, + 0.291532189474064930184344798145, + 0.330494959183718721493342551525, + 0.6236537208920888603043773443, + 0.89122121355780761549659392994, + 0.51799810738861013193016943087, + 0.249256177739037963581221438965, + 0.76322106809612787470242640888, + 0.97852511972383831461233976406, + 0.52255677693690499607690355455, + 0.4450034860583097087122794844, + 0.79114162250324775713725095404, + 0.94756217345536380876998110362, + 0.58677918818329126036021764787, + 0.84845252924877884299669190981, + 0.30081720041370757827674016113, + 0.27920525653128846538023076229, + 0.33471466998109052439193176801, + 0.77432114969973711331784009482, + 0.79975078898170550460312445454, + 0.90029380309155505829673878957, + 0.22735855793472972935624370264, + 0.83917898101167717908999667914, + 0.96001063929762371813642857618, + 0.80557845129235602137075744771, + 0.227828260252387705994553631692, + 0.45514459312672738783331856798, + 0.6996049090759249573037751274, + 0.76407211467383802388153449844, + 0.35750763601712374361686514082, + 0.090157662209549066428683554241, + 0.95043897530001474792481472865, + 0.97262166470012788338731033975, + 0.203045895422423613196589718133, + 0.217437635156560627036179586425, + 0.5222956932204809424910993278, + 0.52865060708104384493756729767, + 0.97715373213739469800445297208, + 0.5740174414400501666597490431, + 0.172348314420047937640907870932, + 0.57197038071649167881433868039, + 0.26289948915209002196358225729, + 0.177903112174726341611524884074, + 0.74917239660013094610681443816, + 0.59837085384984040836442442706, + 0.065070324689375259831989322427, + 0.44807493892928848916566949155, + 0.59027783360778386064107723777, + 0.122058971772529617939528531479, + 0.18965096763129552013799044806, + 0.179455202785822708296801760066, + 0.032170979041981235014758366854, + 0.297222966386620738492021519056, + 0.91323423393143490893801153646, + 0.75998869946268189685327906564, + 0.83934073246383862944110864099, + 0.17898779712956184324621175982, + 0.480986398855505957279379560397, + 0.60860751560721289727164165043, + 0.298927282590269088379100218673, + 0.77935020447343759584143119835, + 0.480545242963934573648858250607, + 0.85619790637736236353631524289, + 0.96488893882602300700764346564, + 0.36351865634843046736230405883, + 0.82895257550724293657223335349, + 0.79749691055514662573933190753, + 0.20106705267868388883102752272, + 0.33623918491977977623116871123, + 0.93256466340279772952587363977, + 0.88648669501682764515636262464, + 0.47662235152771500250187825963, + 0.52659238455883068245922982067, + 0.94111676559395948458425469814, + 0.323317713690175795284098362026, + 0.34796405933091263994264450729, + 0.52445433363119391822452105405, + 0.525140277317638922334264421, + 0.64469482443585357444532895759, + 0.33472685924872903603447879104, + 0.42400458791646499703641118014, + 0.8222662798441265944554029489, + 0.75524567154228028735673060411, + 0.90790601849806560799894333131, + 0.75164241313793249434488428193, + 0.38724602290468111557712203885, + 0.36352513950081020449187506395, + 0.078398790907179055722325452963, + 0.5003676822199407758422514133, + 0.86055044548361328714384972985, + 0.66748567445598821900669819042, + 0.95450644393912187127659765969, + 0.9536501355878008523425355652, + 0.56207573012593503802043957099, + 0.99057795680550440527031916411, + 0.056136908924222021770088579728, + 0.89322960593560085272815946927, + 0.19380351076299398770342941398, + 0.036881975481577328074706357897, + 0.38834900979665334617449710449, + 0.77196507761008668275581490587, + 0.87539115393397618421355963533, + 0.9131721846286054396553858461, + 0.62245648254908013430163665866, + 0.56021174819199355559539089633, + 0.86987294559046384230921358438, + 0.474584307464076041054198211805, + 0.37224942408757353492416873571, + 0.198307276357215222087716993615, + 0.81633548414328354008913860616, + 0.071192681637945014051745371309, + 0.227203421058334439883665388655, + 0.50527083273847576806586104904, + 0.25911353175247232791676189983, + 0.103567996992606824957067451526, + 0.98316826751311017109085781757, + 0.99206610065531611133123425907, + 0.63838444880264351660305680771, + 0.90013304139719692321619239255, + 0.541419881593941428911392944, + 0.434681681520065487913409442927, + 0.0277935905905462584654818408167, + 0.28736085880215502013374946299, + 0.204706679291990486471085620508, + 0.29639415300325412139805373353, + 0.316818074164048785111401123944, + 0.58068268044073033182148412246, + 0.137736206950094621238996907006, + 0.80907996549523150166492783923, + 0.73799561611209772635015717353, + 0.84013433924397440368969968592, + 0.46126521311414726401422152854, + 0.78013716447507497359555980298, + 0.83405708922951231042933175851, + 0.6366367969739079258896472192, + 0.77353748358406402598000037557, + 0.17489624725635947111471117775, + 0.80267952648428412026314875447, + 0.80437106861315296029137160672, + 0.62834462177566783487584779777, + 0.31539602345858033626133832055, + 0.50541890853061839219557074283, + 0.0195874476781850222509795360627, + 0.011676447193909007242643314705, + 0.85675479754070644130150816794, + 0.09391269154749661204040398199, + 0.369625667102334643216258483376, + 0.84311577046357953313746551837, + 0.66438426715728382263582851036, + 0.70530906415261448155650458603, + 0.446783684004800041373395690117, + 0.75627790284213576819810990131, + 0.57190285913753158265774292274, + 0.97785681370875218892539297465, + 0.0244503386494348881614690746194, + 0.48528430854909558202793141933, + 0.89436155397807056672243211894, + 0.40757489194485346255194449191, + 0.91772837786834838909335779229, + 0.28020326531649972709359017096, + 0.28847822326776188982020803144, + 0.93193769743225684077624356649, + 0.58336147304815741644785105161, + 0.4004241800179331174134885947, + 0.265790823692672203607418801725, + 0.4137092141145146388568879939, + 0.0255090449126572366852573357318, + 0.47601725598948555645487446626, + 0.69141516452580797436419291497, + 0.187709862166242786826507443003, + 0.31177816288567708916778389045, + 0.79635247302484103596788484137, + 0.14648403361265752358955335086, + 0.0088027047060531475573345163528, + 0.90053967411241805345616039474, + 0.373822238382428585287035417224, + 0.94303097002109978273901800507, + 0.037263906643698883423150604649, + 0.98416823398276433881119247311, + 0.257766562836474661728601317803, + 0.09336855716941364387765222813, + 0.057604551843195630210060755775, + 0.37732024813036636644231432449, + 0.437099108019093398068604946814, + 0.0298274889889844501626534131975, + 0.54161045457572229928359302347, + 0.354192069739745951755754451894, + 0.9952629304832433588789284291, + 0.61362350596285189174752077338, + 0.23176197923774029736185020682, + 0.259000332877923815426717028414, + 0.77171708810079063604185854121, + 0.87278431247491539306511051532, + 0.386310463821549823085972724515, + 0.19043920209178263945663905422, + 0.77200547833114724875436606573, + 0.2683024354984293205497398925, + 0.144270112550972640008446091075, + 0.36996280314557984925474224612, + 0.163548224543250866742712583905, + 0.54541238293503241055380526708, + 0.54270760938500008382580072956, + 0.7374073253240524865446763851, + 0.93470960326436177572863031654, + 0.71417607213823278615975270201, + 0.65837463356664939532769528292, + 0.433323451649582925271830911365, + 0.79664580661766246494864588315, + 0.392079017934601610514677836005, + 0.212454387416532999103471570235, + 0.198678082418012501322802116335, + 0.61525672800559338657275986197, + 0.99339589895181138684928419014, + 0.53563057949945927383392076793, + 0.68817192513245948798192690082, + 0.59671938169380086666866042956, + 0.5686075254645125832635026196, + 0.25860953535454698758704936914, + 0.60779864941995215785819783969, + 0.46515241662568547274625942204, + 0.8756966078479474164213834749, + 0.89153160343113076353740745469, + 0.57055911159151577684982200009, + 0.39366246576557783924065683256, + 0.53789676931469921495851209609, + 0.95842028586447684249630374944, + 0.25218284880717367924827402845, + 0.23718965807272971860203662735, + 0.334222632819004380754702693406, + 0.6370849366068287810411454729, + 0.722665796162802454203702773, + 0.50216248905279887048328225791, + 0.34529823309520970630714708672, + 0.45098892404492692601908443802, + 0.64640019115293913591196874603, + 0.137077316379736192931987264458, + 0.29368115076039970149731521521, + 0.20091822953913855557804069085, + 0.066267083813833718511605782276, + 0.88094596104423280074202839474, + 0.071730322265966936504743175424, + 0.69735904142296779896396736035, + 0.91352594564083795862432502567, + 0.13244220377041278512040316988, + 0.6283911312781029516331064494, + 0.34896540167805105781090114462, + 0.6795367801751911186206756471, + 0.74898526486791573083377925403, + 0.71700182398199203349731046015, + 0.121142833366516620257163901501, + 0.32678002036857151533698078636, + 0.327511655875027224450064555456, + 0.0079152053645354575349489795814, + 0.84748954479623021059675156738, + 0.75041561033954009809301550159, + 0.41101693712463238996746228193, + 0.90155864029338267639417046915, + 0.35464670537047753945618208157, + 0.68848712573944472430623590326, + 0.08893193373618063124738179594, + 0.58932830480784385636485098641, + 0.0501618828375381577588978271165, + 0.9451968329901169788400753848, + 0.074994725566097580721185016702, + 0.191860088196691871607965261685, + 0.67853841063536805868885844477, + 0.179445375284033906887325905976, + 0.84157620913886056000430779083, + 0.7377942162322144186341324232, + 0.231126715579023126062082806996, + 0.127662509645324778320005407937, + 0.63062414859560283674777403205, + 0.55283326072907470543330204975, + 0.81243486031688046850257374808, + 0.299095175225750536694802628506, + 0.34284433830834748530634854762, + 0.92098838107935607957057329632, + 0.6334432153537539286206936299, + 0.49203336326915182548719200464, + 0.70089872986754081776092540042, + 0.410346112246289262244008861334, + 0.689375704219352519232614571, + 0.53543492718830214408075484368, + 0.78985504761729292283075540625, + 0.66802245726332267870092702429, + 0.75600588548341120124374250114, + 0.83217485519464083512235296359, + 0.77758150309412736979136465746, + 0.067382141804836913185384124002, + 0.7289836962356747770023887674, + 0.453434776313686590560640460504, + 0.3160796148757468204057886796, + 0.0098933475787107681104048511314, + 0.3620064234142809735084479026, + 0.85993179373877360456391909506, + 0.90684883450763884954227285187, + 0.75959171037325548903969803948, + 0.91219881792279148536349496306, + 0.97175430264940118917041244436, + 0.292364544897748356834218017667, + 0.126096590956329503351026499397, + 0.058210669685805595156500555938, + 0.207143479048534791976348255132, + 0.202837039257860939456824357966, + 0.459137240079351948795601640776, + 0.65480905235794807223708347609 +}; diff --git a/tests/select.c b/tests/select.c new file mode 100644 index 0000000..b513025 --- /dev/null +++ b/tests/select.c @@ -0,0 +1,547 @@ +/* Emulation for select(2) + Contributed by Paolo Bonzini. + + Copyright 2008-2014 Free Software Foundation, Inc. + + This file is part of gnulib. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, see . */ + +#include +#include +#include + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Native Windows. */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +/* Get the overridden 'struct timeval'. */ +#include + +#include "msvc-nothrow.h" + +#undef select + +struct bitset { + unsigned char in[FD_SETSIZE / CHAR_BIT]; + unsigned char out[FD_SETSIZE / CHAR_BIT]; +}; + +/* Declare data structures for ntdll functions. */ +typedef struct _FILE_PIPE_LOCAL_INFORMATION { + ULONG NamedPipeType; + ULONG NamedPipeConfiguration; + ULONG MaximumInstances; + ULONG CurrentInstances; + ULONG InboundQuota; + ULONG ReadDataAvailable; + ULONG OutboundQuota; + ULONG WriteQuotaAvailable; + ULONG NamedPipeState; + ULONG NamedPipeEnd; +} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION; + +typedef struct _IO_STATUS_BLOCK +{ + union { + DWORD Status; + PVOID Pointer; + } u; + ULONG_PTR Information; +} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; + +typedef enum _FILE_INFORMATION_CLASS { + FilePipeLocalInformation = 24 +} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS; + +typedef DWORD (WINAPI *PNtQueryInformationFile) + (HANDLE, IO_STATUS_BLOCK *, VOID *, ULONG, FILE_INFORMATION_CLASS); + +#ifndef PIPE_BUF +#define PIPE_BUF 512 +#endif + +/* Optimized test whether a HANDLE refers to a console. + See . */ +#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3) + +static BOOL +IsSocketHandle (HANDLE h) +{ + WSANETWORKEVENTS ev; + + if (IsConsoleHandle (h)) + return FALSE; + + /* Under Wine, it seems that getsockopt returns 0 for pipes too. + WSAEnumNetworkEvents instead distinguishes the two correctly. */ + ev.lNetworkEvents = 0xDEADBEEF; + WSAEnumNetworkEvents ((SOCKET) h, NULL, &ev); + return ev.lNetworkEvents != 0xDEADBEEF; +} + +/* Compute output fd_sets for libc descriptor FD (whose Windows handle is + H). */ + +static int +windows_poll_handle (HANDLE h, int fd, + struct bitset *rbits, + struct bitset *wbits, + struct bitset *xbits) +{ + BOOL read, write, except; + int i, ret; + INPUT_RECORD *irbuffer; + DWORD avail, nbuffer; + BOOL bRet; + IO_STATUS_BLOCK iosb; + FILE_PIPE_LOCAL_INFORMATION fpli; + static PNtQueryInformationFile NtQueryInformationFile; + static BOOL once_only; + + read = write = except = FALSE; + switch (GetFileType (h)) + { + case FILE_TYPE_DISK: + read = TRUE; + write = TRUE; + break; + + case FILE_TYPE_PIPE: + if (!once_only) + { + NtQueryInformationFile = (PNtQueryInformationFile) + GetProcAddress (GetModuleHandle ("ntdll.dll"), + "NtQueryInformationFile"); + once_only = TRUE; + } + + if (PeekNamedPipe (h, NULL, 0, NULL, &avail, NULL) != 0) + { + if (avail) + read = TRUE; + } + else if (GetLastError () == ERROR_BROKEN_PIPE) + ; + + else + { + /* It was the write-end of the pipe. Check if it is writable. + If NtQueryInformationFile fails, optimistically assume the pipe is + writable. This could happen on Windows 9x, where + NtQueryInformationFile is not available, or if we inherit a pipe + that doesn't permit FILE_READ_ATTRIBUTES access on the write end + (I think this should not happen since Windows XP SP2; WINE seems + fine too). Otherwise, ensure that enough space is available for + atomic writes. */ + memset (&iosb, 0, sizeof (iosb)); + memset (&fpli, 0, sizeof (fpli)); + + if (!NtQueryInformationFile + || NtQueryInformationFile (h, &iosb, &fpli, sizeof (fpli), + FilePipeLocalInformation) + || fpli.WriteQuotaAvailable >= PIPE_BUF + || (fpli.OutboundQuota < PIPE_BUF && + fpli.WriteQuotaAvailable == fpli.OutboundQuota)) + write = TRUE; + } + break; + + case FILE_TYPE_CHAR: + write = TRUE; + if (!(rbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) + break; + + ret = WaitForSingleObject (h, 0); + if (ret == WAIT_OBJECT_0) + { + if (!IsConsoleHandle (h)) + { + read = TRUE; + break; + } + + nbuffer = avail = 0; + bRet = GetNumberOfConsoleInputEvents (h, &nbuffer); + + /* Screen buffers handles are filtered earlier. */ + assert (bRet); + if (nbuffer == 0) + { + except = TRUE; + break; + } + + irbuffer = (INPUT_RECORD *) alloca (nbuffer * sizeof (INPUT_RECORD)); + bRet = PeekConsoleInput (h, irbuffer, nbuffer, &avail); + if (!bRet || avail == 0) + { + except = TRUE; + break; + } + + for (i = 0; i < avail; i++) + if (irbuffer[i].EventType == KEY_EVENT) + read = TRUE; + } + break; + + default: + ret = WaitForSingleObject (h, 0); + write = TRUE; + if (ret == WAIT_OBJECT_0) + read = TRUE; + + break; + } + + ret = 0; + if (read && (rbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) + { + rbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); + ret++; + } + + if (write && (wbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) + { + wbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); + ret++; + } + + if (except && (xbits->in[fd / CHAR_BIT] & (1 << (fd & (CHAR_BIT - 1))))) + { + xbits->out[fd / CHAR_BIT] |= (1 << (fd & (CHAR_BIT - 1))); + ret++; + } + + return ret; +} + +int +rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds, + struct timeval *timeout) +#undef timeval +{ + static struct timeval tv0; + static HANDLE hEvent; + HANDLE h, handle_array[FD_SETSIZE + 2]; + fd_set handle_rfds, handle_wfds, handle_xfds; + struct bitset rbits, wbits, xbits; + unsigned char anyfds_in[FD_SETSIZE / CHAR_BIT]; + DWORD ret, wait_timeout, nhandles, nsock, nbuffer; + MSG msg; + int i, fd, rc; + + if (nfds > FD_SETSIZE) + nfds = FD_SETSIZE; + + if (!timeout) + wait_timeout = INFINITE; + else + { + wait_timeout = timeout->tv_sec * 1000 + timeout->tv_usec / 1000; + + /* select is also used as a portable usleep. */ + if (!rfds && !wfds && !xfds) + { + Sleep (wait_timeout); + return 0; + } + } + + if (!hEvent) + hEvent = CreateEvent (NULL, FALSE, FALSE, NULL); + + handle_array[0] = hEvent; + nhandles = 1; + nsock = 0; + + /* Copy descriptors to bitsets. At the same time, eliminate + bits in the "wrong" direction for console input buffers + and screen buffers, because screen buffers are waitable + and they will block until a character is available. */ + memset (&rbits, 0, sizeof (rbits)); + memset (&wbits, 0, sizeof (wbits)); + memset (&xbits, 0, sizeof (xbits)); + memset (anyfds_in, 0, sizeof (anyfds_in)); + if (rfds) + for (i = 0; i < rfds->fd_count; i++) + { + fd = rfds->fd_array[i]; + h = (HANDLE) _get_osfhandle (fd); + if (IsConsoleHandle (h) + && !GetNumberOfConsoleInputEvents (h, &nbuffer)) + continue; + + rbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + } + else + rfds = (fd_set *) alloca (sizeof (fd_set)); + + if (wfds) + for (i = 0; i < wfds->fd_count; i++) + { + fd = wfds->fd_array[i]; + h = (HANDLE) _get_osfhandle (fd); + if (IsConsoleHandle (h) + && GetNumberOfConsoleInputEvents (h, &nbuffer)) + continue; + + wbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + } + else + wfds = (fd_set *) alloca (sizeof (fd_set)); + + if (xfds) + for (i = 0; i < xfds->fd_count; i++) + { + fd = xfds->fd_array[i]; + xbits.in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + anyfds_in[fd / CHAR_BIT] |= 1 << (fd & (CHAR_BIT - 1)); + } + else + xfds = (fd_set *) alloca (sizeof (fd_set)); + + /* Zero all the fd_sets, including the application's. */ + FD_ZERO (rfds); + FD_ZERO (wfds); + FD_ZERO (xfds); + FD_ZERO (&handle_rfds); + FD_ZERO (&handle_wfds); + FD_ZERO (&handle_xfds); + + /* Classify handles. Create fd sets for sockets, poll the others. */ + for (i = 0; i < nfds; i++) + { + if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) + continue; + + h = (HANDLE) _get_osfhandle (i); + if (!h) + { + errno = EBADF; + return -1; + } + + if (IsSocketHandle (h)) + { + int requested = FD_CLOSE; + + /* See above; socket handles are mapped onto select, but we + need to map descriptors to handles. */ + if (rbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + { + requested |= FD_READ | FD_ACCEPT; + FD_SET ((SOCKET) h, rfds); + FD_SET ((SOCKET) h, &handle_rfds); + } + if (wbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + { + requested |= FD_WRITE | FD_CONNECT; + FD_SET ((SOCKET) h, wfds); + FD_SET ((SOCKET) h, &handle_wfds); + } + if (xbits.in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + { + requested |= FD_OOB; + FD_SET ((SOCKET) h, xfds); + FD_SET ((SOCKET) h, &handle_xfds); + } + + WSAEventSelect ((SOCKET) h, hEvent, requested); + nsock++; + } + else + { + handle_array[nhandles++] = h; + + /* Poll now. If we get an event, do not wait below. */ + if (wait_timeout != 0 + && windows_poll_handle (h, i, &rbits, &wbits, &xbits)) + wait_timeout = 0; + } + } + + /* Place a sentinel at the end of the array. */ + handle_array[nhandles] = NULL; + +restart: + if (wait_timeout == 0 || nsock == 0) + rc = 0; + else + { + /* See if we need to wait in the loop below. If any select is ready, + do MsgWaitForMultipleObjects anyway to dispatch messages, but + no need to call select again. */ + rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0); + if (rc == 0) + { + /* Restore the fd_sets for the other select we do below. */ + memcpy (&handle_rfds, rfds, sizeof (fd_set)); + memcpy (&handle_wfds, wfds, sizeof (fd_set)); + memcpy (&handle_xfds, xfds, sizeof (fd_set)); + } + else + wait_timeout = 0; + } + + for (;;) + { + ret = MsgWaitForMultipleObjects (nhandles, handle_array, FALSE, + wait_timeout, QS_ALLINPUT); + + if (ret == WAIT_OBJECT_0 + nhandles) + { + /* new input of some other kind */ + BOOL bRet; + while ((bRet = PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) != 0) + { + TranslateMessage (&msg); + DispatchMessage (&msg); + } + } + else + break; + } + + /* If we haven't done it yet, check the status of the sockets. */ + if (rc == 0 && nsock > 0) + rc = select (0, &handle_rfds, &handle_wfds, &handle_xfds, &tv0); + + if (nhandles > 1) + { + /* Count results that are not counted in the return value of select. */ + nhandles = 1; + for (i = 0; i < nfds; i++) + { + if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) + continue; + + h = (HANDLE) _get_osfhandle (i); + if (h == handle_array[nhandles]) + { + /* Not a socket. */ + nhandles++; + windows_poll_handle (h, i, &rbits, &wbits, &xbits); + if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))) + || wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1))) + || xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + rc++; + } + } + + if (rc == 0 && wait_timeout == INFINITE) + { + /* Sleep 1 millisecond to avoid busy wait and retry with the + original fd_sets. */ + memcpy (&handle_rfds, rfds, sizeof (fd_set)); + memcpy (&handle_wfds, wfds, sizeof (fd_set)); + memcpy (&handle_xfds, xfds, sizeof (fd_set)); + SleepEx (1, TRUE); + goto restart; + } + } + + /* Now fill in the results. */ + FD_ZERO (rfds); + FD_ZERO (wfds); + FD_ZERO (xfds); + nhandles = 1; + for (i = 0; i < nfds; i++) + { + if ((anyfds_in[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) == 0) + continue; + + h = (HANDLE) _get_osfhandle (i); + if (h != handle_array[nhandles]) + { + /* Perform handle->descriptor mapping. */ + WSAEventSelect ((SOCKET) h, NULL, 0); + if (FD_ISSET (h, &handle_rfds)) + FD_SET (i, rfds); + if (FD_ISSET (h, &handle_wfds)) + FD_SET (i, wfds); + if (FD_ISSET (h, &handle_xfds)) + FD_SET (i, xfds); + } + else + { + /* Not a socket. */ + nhandles++; + if (rbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + FD_SET (i, rfds); + if (wbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + FD_SET (i, wfds); + if (xbits.out[i / CHAR_BIT] & (1 << (i & (CHAR_BIT - 1)))) + FD_SET (i, xfds); + } + } + + return rc; +} + +#else /* ! Native Windows. */ + +#include +#include /* NULL */ +#include +#include + +#undef select + +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) + { + nfds = 1; + rfds = NULL; + wfds = NULL; + xfds = NULL; + } + return select (nfds, rfds, wfds, xfds, timeout); +} + +#endif diff --git a/tests/setlocale.c b/tests/setlocale.c index 0cef00f..3009d2c 100644 --- a/tests/setlocale.c +++ b/tests/setlocale.c @@ -1,5 +1,5 @@ /* Set the current locale. - Copyright (C) 2009, 2011 Free Software Foundation, Inc. + Copyright (C) 2009, 2011-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -74,7 +74,7 @@ category_to_name (int category) # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* The native Win32 setlocale() function expects locale names of the form +/* The native Windows setlocale() function expects locale names of the form "German" or "German_Germany" or "DEU", but not "de" or "de_DE". We need to convert the names from the form with ISO 639 language code and ISO 3166 country code to the form with English names or with three-letter identifier. diff --git a/tests/setsockopt.c b/tests/setsockopt.c new file mode 100644 index 0000000..08afdae --- /dev/null +++ b/tests/setsockopt.c @@ -0,0 +1,65 @@ +/* setsockopt.c --- wrappers for Windows setsockopt function + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get struct timeval. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#undef setsockopt + +int +rpl_setsockopt (int fd, int level, int optname, const void *optval, socklen_t optlen) +{ + SOCKET sock = FD_TO_SOCKET (fd); + int r; + + if (sock == INVALID_SOCKET) + { + errno = EBADF; + return -1; + } + else + { + if (level == SOL_SOCKET + && (optname == SO_RCVTIMEO || optname == SO_SNDTIMEO)) + { + const struct timeval *tv = optval; + int milliseconds = tv->tv_sec * 1000 + tv->tv_usec / 1000; + optval = &milliseconds; + r = setsockopt (sock, level, optname, optval, sizeof (int)); + } + else + { + r = setsockopt (sock, level, optname, optval, optlen); + } + + if (r < 0) + set_winsock_errno (); + + return r; + } +} diff --git a/tests/sig-handler.c b/tests/sig-handler.c new file mode 100644 index 0000000..52c3621 --- /dev/null +++ b/tests/sig-handler.c @@ -0,0 +1,3 @@ +#include +#define SIG_HANDLER_INLINE _GL_EXTERN_INLINE +#include "sig-handler.h" diff --git a/tests/sig-handler.h b/tests/sig-handler.h new file mode 100644 index 0000000..f4fe7ec --- /dev/null +++ b/tests/sig-handler.h @@ -0,0 +1,54 @@ +/* Convenience declarations when working with . + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _GL_SIG_HANDLER_H +#define _GL_SIG_HANDLER_H + +#include + +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif +_GL_INLINE_HEADER_BEGIN +#ifndef SIG_HANDLER_INLINE +# define SIG_HANDLER_INLINE _GL_INLINE +#endif + +/* Convenience type when working with signal handlers. */ +typedef void (*sa_handler_t) (int); + +/* Return the handler of a signal, as a sa_handler_t value regardless + of its true type. The resulting function can be compared to + special values like SIG_IGN but it is not portable to call it. */ +SIG_HANDLER_INLINE sa_handler_t +get_handler (struct sigaction const *a) +{ +#ifdef SA_SIGINFO + /* POSIX says that special values like SIG_IGN can only occur when + action.sa_flags does not contain SA_SIGINFO. But in Linux 2.4, + for example, sa_sigaction and sa_handler are aliases and a signal + is ignored if sa_sigaction (after casting) equals SIG_IGN. So + use (and cast) sa_sigaction in that case. */ + if (a->sa_flags & SA_SIGINFO) + return (sa_handler_t) a->sa_sigaction; +#endif + return a->sa_handler; +} + +_GL_INLINE_HEADER_END + +#endif /* _GL_SIG_HANDLER_H */ diff --git a/tests/sigaction.c b/tests/sigaction.c new file mode 100644 index 0000000..c56ca46 --- /dev/null +++ b/tests/sigaction.c @@ -0,0 +1,204 @@ +/* POSIX compatible signal blocking. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + Written by Eric Blake , 2008. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include + +/* This implementation of sigaction is tailored to native Windows behavior: + signal() has SysV semantics (ie. the handler is uninstalled before + it is invoked). This is an inherent data race if an asynchronous + signal is sent twice in a row before we can reinstall our handler, + but there's nothing we can do about it. Meanwhile, sigprocmask() + is not present, and while we can use the gnulib replacement to + provide critical sections, it too suffers from potential data races + in the face of an ill-timed asynchronous signal. And we compound + the situation by reading static storage in a signal handler, which + POSIX warns is not generically async-signal-safe. Oh well. + + Additionally: + - We don't implement SA_NOCLDSTOP or SA_NOCLDWAIT, because SIGCHLD + is not defined. + - We don't implement SA_ONSTACK, because sigaltstack() is not present. + - We ignore SA_RESTART, because blocking native Windows API calls are + not interrupted anyway when an asynchronous signal occurs, and the + MSVCRT runtime never sets errno to EINTR. + - We don't implement SA_SIGINFO because it is impossible to do so + portably. + + POSIX states that an application should not mix signal() and + sigaction(). We support the use of signal() within the gnulib + sigprocmask() substitute, but all other application code linked + with this module should stick with only sigaction(). */ + +/* Check some of our assumptions. */ +#if defined SIGCHLD || defined HAVE_SIGALTSTACK || defined HAVE_SIGINTERRUPT +# error "Revisit the assumptions made in the sigaction module" +#endif + +/* Out-of-range substitutes make a good fallback for uncatchable + signals. */ +#ifndef SIGKILL +# define SIGKILL (-1) +#endif +#ifndef SIGSTOP +# define SIGSTOP (-1) +#endif + +/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias + for the signal SIGABRT. Only one signal handler is stored for both + SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# undef SIGABRT_COMPAT +# define SIGABRT_COMPAT 6 +#endif + +/* A signal handler. */ +typedef void (*handler_t) (int signal); + +/* Set of current actions. If sa_handler for an entry is NULL, then + that signal is not currently handled by the sigaction handler. */ +static struct sigaction volatile action_array[NSIG] /* = 0 */; + +/* Signal handler that is installed for signals. */ +static void +sigaction_handler (int sig) +{ + handler_t handler; + sigset_t mask; + sigset_t oldmask; + int saved_errno = errno; + if (sig < 0 || NSIG <= sig || !action_array[sig].sa_handler) + { + /* Unexpected situation; be careful to avoid recursive abort. */ + if (sig == SIGABRT) + signal (SIGABRT, SIG_DFL); + abort (); + } + + /* Reinstall the signal handler when required; otherwise update the + bookkeeping so that the user's handler may call sigaction and get + accurate results. We know the signal isn't currently blocked, or + we wouldn't be in its handler, therefore we know that we are not + interrupting a sigaction() call. There is a race where any + asynchronous instance of the same signal occurring before we + reinstall the handler will trigger the default handler; oh + well. */ + handler = action_array[sig].sa_handler; + if ((action_array[sig].sa_flags & SA_RESETHAND) == 0) + signal (sig, sigaction_handler); + else + action_array[sig].sa_handler = NULL; + + /* Block appropriate signals. */ + mask = action_array[sig].sa_mask; + if ((action_array[sig].sa_flags & SA_NODEFER) == 0) + sigaddset (&mask, sig); + sigprocmask (SIG_BLOCK, &mask, &oldmask); + + /* Invoke the user's handler, then restore prior mask. */ + errno = saved_errno; + handler (sig); + saved_errno = errno; + sigprocmask (SIG_SETMASK, &oldmask, NULL); + errno = saved_errno; +} + +/* Change and/or query the action that will be taken on delivery of + signal SIG. If not NULL, ACT describes the new behavior. If not + NULL, OACT is set to the prior behavior. Return 0 on success, or + set errno and return -1 on failure. */ +int +sigaction (int sig, const struct sigaction *restrict act, + struct sigaction *restrict oact) +{ + sigset_t mask; + sigset_t oldmask; + int saved_errno; + + if (sig < 0 || NSIG <= sig || sig == SIGKILL || sig == SIGSTOP + || (act && act->sa_handler == SIG_ERR)) + { + errno = EINVAL; + return -1; + } + +#ifdef SIGABRT_COMPAT + if (sig == SIGABRT_COMPAT) + sig = SIGABRT; +#endif + + /* POSIX requires sigaction() to be async-signal-safe. In other + words, if an asynchronous signal can occur while we are anywhere + inside this function, the user's handler could then call + sigaction() recursively and expect consistent results. We meet + this rule by using sigprocmask to block all signals before + modifying any data structure that could be read from a signal + handler; this works since we know that the gnulib sigprocmask + replacement does not try to use sigaction() from its handler. */ + if (!act && !oact) + return 0; + sigfillset (&mask); + sigprocmask (SIG_BLOCK, &mask, &oldmask); + if (oact) + { + if (action_array[sig].sa_handler) + *oact = action_array[sig]; + else + { + /* Safe to change the handler at will here, since all + signals are currently blocked. */ + oact->sa_handler = signal (sig, SIG_DFL); + if (oact->sa_handler == SIG_ERR) + goto failure; + signal (sig, oact->sa_handler); + oact->sa_flags = SA_RESETHAND | SA_NODEFER; + sigemptyset (&oact->sa_mask); + } + } + + if (act) + { + /* Safe to install the handler before updating action_array, + since all signals are currently blocked. */ + if (act->sa_handler == SIG_DFL || act->sa_handler == SIG_IGN) + { + if (signal (sig, act->sa_handler) == SIG_ERR) + goto failure; + action_array[sig].sa_handler = NULL; + } + else + { + if (signal (sig, sigaction_handler) == SIG_ERR) + goto failure; + action_array[sig] = *act; + } + } + sigprocmask (SIG_SETMASK, &oldmask, NULL); + return 0; + + failure: + saved_errno = errno; + sigprocmask (SIG_SETMASK, &oldmask, NULL); + errno = saved_errno; + return -1; +} diff --git a/tests/signal.in.h b/tests/signal.in.h new file mode 100644 index 0000000..925e16f --- /dev/null +++ b/tests/signal.in.h @@ -0,0 +1,461 @@ +/* A GNU-like . + + Copyright (C) 2006-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T) +/* Special invocation convention: + - Inside glibc header files. + - On glibc systems we have a sequence of nested includes + -> -> . + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. + - On glibc systems with GCC 4.3 we have a sequence of nested includes + -> -> -> . + In this situation, some of the functions are not yet declared, therefore + we cannot provide the C++ aliases. */ + +# @INCLUDE_NEXT@ @NEXT_SIGNAL_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_SIGNAL_H + +#define _GL_ALREADY_INCLUDING_SIGNAL_H + +/* Define pid_t, uid_t. + Also, mingw defines sigset_t not in , but in . + On Solaris 10, includes , which eventually includes + us; so include now, before the second inclusion guard. */ +#include + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@ + +#undef _GL_ALREADY_INCLUDING_SIGNAL_H + +#ifndef _@GUARD_PREFIX@_SIGNAL_H +#define _@GUARD_PREFIX@_SIGNAL_H + +/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare + pthread_sigmask in , not in . + But avoid namespace pollution on glibc systems.*/ +#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \ + && ((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ || defined __sun) \ + && ! defined __GLIBC__ +# include +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + +/* On AIX, sig_atomic_t already includes volatile. C99 requires that + 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not. + Hence, redefine this to a non-volatile type as needed. */ +#if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +# if !GNULIB_defined_sig_atomic_t +typedef int rpl_sig_atomic_t; +# undef sig_atomic_t +# define sig_atomic_t rpl_sig_atomic_t +# define GNULIB_defined_sig_atomic_t 1 +# endif +#endif + +/* A set or mask of signals. */ +#if !@HAVE_SIGSET_T@ +# if !GNULIB_defined_sigset_t +typedef unsigned int sigset_t; +# define GNULIB_defined_sigset_t 1 +# endif +#endif + +/* Define sighandler_t, the type of signal handlers. A GNU extension. */ +#if !@HAVE_SIGHANDLER_T@ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_sighandler_t +typedef void (*sighandler_t) (int); +# define GNULIB_defined_sighandler_t 1 +# endif +# ifdef __cplusplus +} +# endif +#endif + + +#if @GNULIB_SIGNAL_H_SIGPIPE@ +# ifndef SIGPIPE +/* Define SIGPIPE to a value that does not overlap with other signals. */ +# define SIGPIPE 13 +# define GNULIB_defined_SIGPIPE 1 +/* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask', + 'write', 'stdio'. */ +# endif +#endif + + +/* Maximum signal number + 1. */ +#ifndef NSIG +# if defined __TANDEM +# define NSIG 32 +# endif +#endif + + +#if @GNULIB_PTHREAD_SIGMASK@ +# if @REPLACE_PTHREAD_SIGMASK@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pthread_sigmask +# define pthread_sigmask rpl_pthread_sigmask +# endif +_GL_FUNCDECL_RPL (pthread_sigmask, int, + (int how, const sigset_t *new_mask, sigset_t *old_mask)); +_GL_CXXALIAS_RPL (pthread_sigmask, int, + (int how, const sigset_t *new_mask, sigset_t *old_mask)); +# else +# if !@HAVE_PTHREAD_SIGMASK@ +_GL_FUNCDECL_SYS (pthread_sigmask, int, + (int how, const sigset_t *new_mask, sigset_t *old_mask)); +# endif +_GL_CXXALIAS_SYS (pthread_sigmask, int, + (int how, const sigset_t *new_mask, sigset_t *old_mask)); +# endif +_GL_CXXALIASWARN (pthread_sigmask); +#elif defined GNULIB_POSIXCHECK +# undef pthread_sigmask +# if HAVE_RAW_DECL_PTHREAD_SIGMASK +_GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - " + "use gnulib module pthread_sigmask for portability"); +# endif +#endif + + +#if @GNULIB_RAISE@ +# if @REPLACE_RAISE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef raise +# define raise rpl_raise +# endif +_GL_FUNCDECL_RPL (raise, int, (int sig)); +_GL_CXXALIAS_RPL (raise, int, (int sig)); +# else +# if !@HAVE_RAISE@ +_GL_FUNCDECL_SYS (raise, int, (int sig)); +# endif +_GL_CXXALIAS_SYS (raise, int, (int sig)); +# endif +_GL_CXXALIASWARN (raise); +#elif defined GNULIB_POSIXCHECK +# undef raise +/* Assume raise is always declared. */ +_GL_WARN_ON_USE (raise, "raise can crash on native Windows - " + "use gnulib module raise for portability"); +#endif + + +#if @GNULIB_SIGPROCMASK@ +# if !@HAVE_POSIX_SIGNALBLOCKING@ + +# ifndef GNULIB_defined_signal_blocking +# define GNULIB_defined_signal_blocking 1 +# endif + +/* Maximum signal number + 1. */ +# ifndef NSIG +# define NSIG 32 +# endif + +/* This code supports only 32 signals. */ +# if !GNULIB_defined_verify_NSIG_constraint +typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1]; +# define GNULIB_defined_verify_NSIG_constraint 1 +# endif + +# endif + +/* When also using extern inline, suppress the use of static inline in + standard headers of problematic Apple configurations, as Libc at + least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., + . + Perhaps Apple will fix this some day. */ +#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ + && (defined __i386__ || defined __x86_64__)) +# undef sigaddset +# undef sigdelset +# undef sigemptyset +# undef sigfillset +# undef sigismember +#endif + +/* Test whether a given signal is contained in a signal set. */ +# if @HAVE_POSIX_SIGNALBLOCKING@ +/* This function is defined as a macro on Mac OS X. */ +# if defined __cplusplus && defined GNULIB_NAMESPACE +# undef sigismember +# endif +# else +_GL_FUNCDECL_SYS (sigismember, int, (const sigset_t *set, int sig) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigismember, int, (const sigset_t *set, int sig)); +_GL_CXXALIASWARN (sigismember); + +/* Initialize a signal set to the empty set. */ +# if @HAVE_POSIX_SIGNALBLOCKING@ +/* This function is defined as a macro on Mac OS X. */ +# if defined __cplusplus && defined GNULIB_NAMESPACE +# undef sigemptyset +# endif +# else +_GL_FUNCDECL_SYS (sigemptyset, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigemptyset, int, (sigset_t *set)); +_GL_CXXALIASWARN (sigemptyset); + +/* Add a signal to a signal set. */ +# if @HAVE_POSIX_SIGNALBLOCKING@ +/* This function is defined as a macro on Mac OS X. */ +# if defined __cplusplus && defined GNULIB_NAMESPACE +# undef sigaddset +# endif +# else +_GL_FUNCDECL_SYS (sigaddset, int, (sigset_t *set, int sig) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigaddset, int, (sigset_t *set, int sig)); +_GL_CXXALIASWARN (sigaddset); + +/* Remove a signal from a signal set. */ +# if @HAVE_POSIX_SIGNALBLOCKING@ +/* This function is defined as a macro on Mac OS X. */ +# if defined __cplusplus && defined GNULIB_NAMESPACE +# undef sigdelset +# endif +# else +_GL_FUNCDECL_SYS (sigdelset, int, (sigset_t *set, int sig) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigdelset, int, (sigset_t *set, int sig)); +_GL_CXXALIASWARN (sigdelset); + +/* Fill a signal set with all possible signals. */ +# if @HAVE_POSIX_SIGNALBLOCKING@ +/* This function is defined as a macro on Mac OS X. */ +# if defined __cplusplus && defined GNULIB_NAMESPACE +# undef sigfillset +# endif +# else +_GL_FUNCDECL_SYS (sigfillset, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigfillset, int, (sigset_t *set)); +_GL_CXXALIASWARN (sigfillset); + +/* Return the set of those blocked signals that are pending. */ +# if !@HAVE_POSIX_SIGNALBLOCKING@ +_GL_FUNCDECL_SYS (sigpending, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (sigpending, int, (sigset_t *set)); +_GL_CXXALIASWARN (sigpending); + +/* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET. + Then, if SET is not NULL, affect the current set of blocked signals by + combining it with *SET as indicated in OPERATION. + In this implementation, you are not allowed to change a signal handler + while the signal is blocked. */ +# if !@HAVE_POSIX_SIGNALBLOCKING@ +# define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */ +# define SIG_SETMASK 1 /* blocked_set = *set; */ +# define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */ +_GL_FUNCDECL_SYS (sigprocmask, int, + (int operation, const sigset_t *set, sigset_t *old_set)); +# endif +_GL_CXXALIAS_SYS (sigprocmask, int, + (int operation, const sigset_t *set, sigset_t *old_set)); +_GL_CXXALIASWARN (sigprocmask); + +/* Install the handler FUNC for signal SIG, and return the previous + handler. */ +# ifdef __cplusplus +extern "C" { +# endif +# if !GNULIB_defined_function_taking_int_returning_void_t +typedef void (*_gl_function_taking_int_returning_void_t) (int); +# define GNULIB_defined_function_taking_int_returning_void_t 1 +# endif +# ifdef __cplusplus +} +# endif +# if !@HAVE_POSIX_SIGNALBLOCKING@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define signal rpl_signal +# endif +_GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t, + (int sig, _gl_function_taking_int_returning_void_t func)); +_GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, + (int sig, _gl_function_taking_int_returning_void_t func)); +# else +_GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, + (int sig, _gl_function_taking_int_returning_void_t func)); +# endif +_GL_CXXALIASWARN (signal); + +# if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE +/* Raise signal SIGPIPE. */ +_GL_EXTERN_C int _gl_raise_SIGPIPE (void); +# endif + +#elif defined GNULIB_POSIXCHECK +# undef sigaddset +# if HAVE_RAW_DECL_SIGADDSET +_GL_WARN_ON_USE (sigaddset, "sigaddset is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigdelset +# if HAVE_RAW_DECL_SIGDELSET +_GL_WARN_ON_USE (sigdelset, "sigdelset is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigemptyset +# if HAVE_RAW_DECL_SIGEMPTYSET +_GL_WARN_ON_USE (sigemptyset, "sigemptyset is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigfillset +# if HAVE_RAW_DECL_SIGFILLSET +_GL_WARN_ON_USE (sigfillset, "sigfillset is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigismember +# if HAVE_RAW_DECL_SIGISMEMBER +_GL_WARN_ON_USE (sigismember, "sigismember is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigpending +# if HAVE_RAW_DECL_SIGPENDING +_GL_WARN_ON_USE (sigpending, "sigpending is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +# undef sigprocmask +# if HAVE_RAW_DECL_SIGPROCMASK +_GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - " + "use the gnulib module sigprocmask for portability"); +# endif +#endif /* @GNULIB_SIGPROCMASK@ */ + + +#if @GNULIB_SIGACTION@ +# if !@HAVE_SIGACTION@ + +# if !@HAVE_SIGINFO_T@ + +# if !GNULIB_defined_siginfo_types + +/* Present to allow compilation, but unsupported by gnulib. */ +union sigval +{ + int sival_int; + void *sival_ptr; +}; + +/* Present to allow compilation, but unsupported by gnulib. */ +struct siginfo_t +{ + int si_signo; + int si_code; + int si_errno; + pid_t si_pid; + uid_t si_uid; + void *si_addr; + int si_status; + long si_band; + union sigval si_value; +}; +typedef struct siginfo_t siginfo_t; + +# define GNULIB_defined_siginfo_types 1 +# endif + +# endif /* !@HAVE_SIGINFO_T@ */ + +/* We assume that platforms which lack the sigaction() function also lack + the 'struct sigaction' type, and vice versa. */ + +# if !GNULIB_defined_struct_sigaction + +struct sigaction +{ + union + { + void (*_sa_handler) (int); + /* Present to allow compilation, but unsupported by gnulib. POSIX + says that implementations may, but not must, make sa_sigaction + overlap with sa_handler, but we know of no implementation where + they do not overlap. */ + void (*_sa_sigaction) (int, siginfo_t *, void *); + } _sa_func; + sigset_t sa_mask; + /* Not all POSIX flags are supported. */ + int sa_flags; +}; +# define sa_handler _sa_func._sa_handler +# define sa_sigaction _sa_func._sa_sigaction +/* Unsupported flags are not present. */ +# define SA_RESETHAND 1 +# define SA_NODEFER 2 +# define SA_RESTART 4 + +# define GNULIB_defined_struct_sigaction 1 +# endif + +_GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict, + struct sigaction *restrict)); + +# elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ + +# define sa_sigaction sa_handler + +# endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */ + +_GL_CXXALIAS_SYS (sigaction, int, (int, const struct sigaction *restrict, + struct sigaction *restrict)); +_GL_CXXALIASWARN (sigaction); + +#elif defined GNULIB_POSIXCHECK +# undef sigaction +# if HAVE_RAW_DECL_SIGACTION +_GL_WARN_ON_USE (sigaction, "sigaction is unportable - " + "use the gnulib module sigaction for portability"); +# endif +#endif + +/* Some systems don't have SA_NODEFER. */ +#ifndef SA_NODEFER +# define SA_NODEFER 0 +#endif + + +#endif /* _@GUARD_PREFIX@_SIGNAL_H */ +#endif /* _@GUARD_PREFIX@_SIGNAL_H */ +#endif diff --git a/tests/signature.h b/tests/signature.h index 8256989..0ae64e7 100644 --- a/tests/signature.h +++ b/tests/signature.h @@ -1,5 +1,5 @@ /* Macro for checking that a function declaration is compliant. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/sigprocmask.c b/tests/sigprocmask.c new file mode 100644 index 0000000..506a51f --- /dev/null +++ b/tests/sigprocmask.c @@ -0,0 +1,349 @@ +/* POSIX compatible signal blocking. + Copyright (C) 2006-2014 Free Software Foundation, Inc. + Written by Bruno Haible , 2006. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include +#include +#include + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +# include "msvc-inval.h" +#endif + +/* We assume that a platform without POSIX signal blocking functions + also does not have the POSIX sigaction() function, only the + signal() function. We also assume signal() has SysV semantics, + where any handler is uninstalled prior to being invoked. This is + true for native Windows platforms. */ + +/* We use raw signal(), but also provide a wrapper rpl_signal() so + that applications can query or change a blocked signal. */ +#undef signal + +/* Provide invalid signal numbers as fallbacks if the uncatchable + signals are not defined. */ +#ifndef SIGKILL +# define SIGKILL (-1) +#endif +#ifndef SIGSTOP +# define SIGSTOP (-1) +#endif + +/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias + for the signal SIGABRT. Only one signal handler is stored for both + SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# undef SIGABRT_COMPAT +# define SIGABRT_COMPAT 6 +#endif +#ifdef SIGABRT_COMPAT +# define SIGABRT_COMPAT_MASK (1U << SIGABRT_COMPAT) +#else +# define SIGABRT_COMPAT_MASK 0 +#endif + +typedef void (*handler_t) (int); + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static handler_t +signal_nothrow (int sig, handler_t handler) +{ + handler_t result; + + TRY_MSVC_INVAL + { + result = signal (sig, handler); + } + CATCH_MSVC_INVAL + { + result = SIG_ERR; + errno = EINVAL; + } + DONE_MSVC_INVAL; + + return result; +} +# define signal signal_nothrow +#endif + +/* Handling of gnulib defined signals. */ + +#if GNULIB_defined_SIGPIPE +static handler_t SIGPIPE_handler = SIG_DFL; +#endif + +#if GNULIB_defined_SIGPIPE +static handler_t +ext_signal (int sig, handler_t handler) +{ + switch (sig) + { + case SIGPIPE: + { + handler_t old_handler = SIGPIPE_handler; + SIGPIPE_handler = handler; + return old_handler; + } + default: /* System defined signal */ + return signal (sig, handler); + } +} +# undef signal +# define signal ext_signal +#endif + +int +sigismember (const sigset_t *set, int sig) +{ + if (sig >= 0 && sig < NSIG) + { + #ifdef SIGABRT_COMPAT + if (sig == SIGABRT_COMPAT) + sig = SIGABRT; + #endif + + return (*set >> sig) & 1; + } + else + return 0; +} + +int +sigemptyset (sigset_t *set) +{ + *set = 0; + return 0; +} + +int +sigaddset (sigset_t *set, int sig) +{ + if (sig >= 0 && sig < NSIG) + { + #ifdef SIGABRT_COMPAT + if (sig == SIGABRT_COMPAT) + sig = SIGABRT; + #endif + + *set |= 1U << sig; + return 0; + } + else + { + errno = EINVAL; + return -1; + } +} + +int +sigdelset (sigset_t *set, int sig) +{ + if (sig >= 0 && sig < NSIG) + { + #ifdef SIGABRT_COMPAT + if (sig == SIGABRT_COMPAT) + sig = SIGABRT; + #endif + + *set &= ~(1U << sig); + return 0; + } + else + { + errno = EINVAL; + return -1; + } +} + + +int +sigfillset (sigset_t *set) +{ + *set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK; + return 0; +} + +/* Set of currently blocked signals. */ +static volatile sigset_t blocked_set /* = 0 */; + +/* Set of currently blocked and pending signals. */ +static volatile sig_atomic_t pending_array[NSIG] /* = { 0 } */; + +/* Signal handler that is installed for blocked signals. */ +static void +blocked_handler (int sig) +{ + /* Reinstall the handler, in case the signal occurs multiple times + while blocked. There is an inherent race where an asynchronous + signal in between when the kernel uninstalled the handler and + when we reinstall it will trigger the default handler; oh + well. */ + signal (sig, blocked_handler); + if (sig >= 0 && sig < NSIG) + pending_array[sig] = 1; +} + +int +sigpending (sigset_t *set) +{ + sigset_t pending = 0; + int sig; + + for (sig = 0; sig < NSIG; sig++) + if (pending_array[sig]) + pending |= 1U << sig; + *set = pending; + return 0; +} + +/* The previous signal handlers. + Only the array elements corresponding to blocked signals are relevant. */ +static volatile handler_t old_handlers[NSIG]; + +int +sigprocmask (int operation, const sigset_t *set, sigset_t *old_set) +{ + if (old_set != NULL) + *old_set = blocked_set; + + if (set != NULL) + { + sigset_t new_blocked_set; + sigset_t to_unblock; + sigset_t to_block; + + switch (operation) + { + case SIG_BLOCK: + new_blocked_set = blocked_set | *set; + break; + case SIG_SETMASK: + new_blocked_set = *set; + break; + case SIG_UNBLOCK: + new_blocked_set = blocked_set & ~*set; + break; + default: + errno = EINVAL; + return -1; + } + to_unblock = blocked_set & ~new_blocked_set; + to_block = new_blocked_set & ~blocked_set; + + if (to_block != 0) + { + int sig; + + for (sig = 0; sig < NSIG; sig++) + if ((to_block >> sig) & 1) + { + pending_array[sig] = 0; + if ((old_handlers[sig] = signal (sig, blocked_handler)) != SIG_ERR) + blocked_set |= 1U << sig; + } + } + + if (to_unblock != 0) + { + sig_atomic_t received[NSIG]; + int sig; + + for (sig = 0; sig < NSIG; sig++) + if ((to_unblock >> sig) & 1) + { + if (signal (sig, old_handlers[sig]) != blocked_handler) + /* The application changed a signal handler while the signal + was blocked, bypassing our rpl_signal replacement. + We don't support this. */ + abort (); + received[sig] = pending_array[sig]; + blocked_set &= ~(1U << sig); + pending_array[sig] = 0; + } + else + received[sig] = 0; + + for (sig = 0; sig < NSIG; sig++) + if (received[sig]) + raise (sig); + } + } + return 0; +} + +/* Install the handler FUNC for signal SIG, and return the previous + handler. */ +handler_t +rpl_signal (int sig, handler_t handler) +{ + /* We must provide a wrapper, so that a user can query what handler + they installed even if that signal is currently blocked. */ + if (sig >= 0 && sig < NSIG && sig != SIGKILL && sig != SIGSTOP + && handler != SIG_ERR) + { + #ifdef SIGABRT_COMPAT + if (sig == SIGABRT_COMPAT) + sig = SIGABRT; + #endif + + if (blocked_set & (1U << sig)) + { + /* POSIX states that sigprocmask and signal are both + async-signal-safe. This is not true of our + implementation - there is a slight data race where an + asynchronous interrupt on signal A can occur after we + install blocked_handler but before we have updated + old_handlers for signal B, such that handler A can see + stale information if it calls signal(B). Oh well - + signal handlers really shouldn't try to manipulate the + installed handlers of unrelated signals. */ + handler_t result = old_handlers[sig]; + old_handlers[sig] = handler; + return result; + } + else + return signal (sig, handler); + } + else + { + errno = EINVAL; + return SIG_ERR; + } +} + +#if GNULIB_defined_SIGPIPE +/* Raise the signal SIGPIPE. */ +int +_gl_raise_SIGPIPE (void) +{ + if (blocked_set & (1U << SIGPIPE)) + pending_array[SIGPIPE] = 1; + else + { + handler_t handler = SIGPIPE_handler; + if (handler == SIG_DFL) + exit (128 + SIGPIPE); + else if (handler != SIG_IGN) + (*handler) (SIGPIPE); + } + return 0; +} +#endif diff --git a/tests/sleep.c b/tests/sleep.c index 45b9d80..2d86b7e 100644 --- a/tests/sleep.c +++ b/tests/sleep.c @@ -1,5 +1,5 @@ /* Pausing execution of the current thread. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software: you can redistribute it and/or modify @@ -35,7 +35,7 @@ sleep (unsigned int seconds) unsigned int remaining; /* Sleep for 1 second many times, because - 1. Sleep is not interruptiple by Ctrl-C, + 1. Sleep is not interruptible by Ctrl-C, 2. we want to avoid arithmetic overflow while multiplying with 1000. */ for (remaining = seconds; remaining > 0; remaining--) Sleep (1000); diff --git a/tests/socket.c b/tests/socket.c new file mode 100644 index 0000000..5707e7f --- /dev/null +++ b/tests/socket.c @@ -0,0 +1,49 @@ +/* socket.c --- wrappers for Windows socket function + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini */ + +#include + +#define WIN32_LEAN_AND_MEAN +/* Get winsock2.h. */ +#include + +/* Get set_winsock_errno, FD_TO_SOCKET etc. */ +#include "w32sock.h" + +#include "sockets.h" + +int +rpl_socket (int domain, int type, int protocol) +{ + SOCKET fh; + + gl_sockets_startup (SOCKETS_1_1); + + /* We have to use WSASocket() to create non-overlapped IO sockets. + Overlapped IO sockets cannot be used with read/write. */ + fh = WSASocket (domain, type, protocol, NULL, 0, 0); + + if (fh == INVALID_SOCKET) + { + set_winsock_errno (); + return -1; + } + else + return SOCKET_TO_FD (fh); +} diff --git a/tests/symlink.c b/tests/symlink.c index 2896cc9..0e3fae2 100644 --- a/tests/symlink.c +++ b/tests/symlink.c @@ -1,5 +1,5 @@ /* Stub for symlink(). - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/symlinkat.c b/tests/symlinkat.c index fc5bb52..26a88f9 100644 --- a/tests/symlinkat.c +++ b/tests/symlinkat.c @@ -1,5 +1,5 @@ /* Create a symlink relative to an open directory. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/sys_ioctl.in.h b/tests/sys_ioctl.in.h new file mode 100644 index 0000000..c13e317 --- /dev/null +++ b/tests/sys_ioctl.in.h @@ -0,0 +1,78 @@ +/* Substitute for and wrapper around . + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#ifndef _@GUARD_PREFIX@_SYS_IOCTL_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_SYS_IOCTL_H@ +# @INCLUDE_NEXT@ @NEXT_SYS_IOCTL_H@ +#endif + +#ifndef _@GUARD_PREFIX@_SYS_IOCTL_H +#define _@GUARD_PREFIX@_SYS_IOCTL_H + +/* AIX 5.1 and Solaris 10 declare ioctl() in and in , + but not in . + But avoid namespace pollution on glibc systems. */ +#ifndef __GLIBC__ +# include +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +/* Declare overridden functions. */ + +#if @GNULIB_IOCTL@ +# if @REPLACE_IOCTL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef ioctl +# define ioctl rpl_ioctl +# endif +_GL_FUNCDECL_RPL (ioctl, int, + (int fd, int request, ... /* {void *,char *} arg */)); +_GL_CXXALIAS_RPL (ioctl, int, + (int fd, int request, ... /* {void *,char *} arg */)); +# else +# if @SYS_IOCTL_H_HAVE_WINSOCK2_H@ || 1 +_GL_FUNCDECL_SYS (ioctl, int, + (int fd, int request, ... /* {void *,char *} arg */)); +# endif +_GL_CXXALIAS_SYS (ioctl, int, + (int fd, int request, ... /* {void *,char *} arg */)); +# endif +_GL_CXXALIASWARN (ioctl); +#elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ +# undef ioctl +# define ioctl ioctl_used_without_requesting_gnulib_module_ioctl +#elif defined GNULIB_POSIXCHECK +# undef ioctl +# if HAVE_RAW_DECL_IOCTL +_GL_WARN_ON_USE (ioctl, "ioctl does not portably work on sockets - " + "use gnulib module ioctl for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */ +#endif /* _@GUARD_PREFIX@_SYS_IOCTL_H */ diff --git a/tests/sys_select.in.h b/tests/sys_select.in.h new file mode 100644 index 0000000..a876b9c --- /dev/null +++ b/tests/sys_select.in.h @@ -0,0 +1,313 @@ +/* Substitute for . + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +# if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +# endif +@PRAGMA_COLUMNS@ + +/* On OSF/1 and Solaris 2.6, and + both include . + On Cygwin, includes . + 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_TIME_H \ + && defined _OSF_SOURCE) \ + || (defined __sun && defined _SYS_TYPES_H \ + && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \ + || defined __EXTENSIONS__)))) + +# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + +#elif (@HAVE_SYS_SELECT_H@ \ + && (defined _CYGWIN_SYS_TIME_H \ + || (defined __osf__ && defined _SYS_TIME_H_ \ + && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \ + && defined _OSF_SOURCE) \ + || (defined __sun && defined _SYS_TIME_H \ + && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \ + || defined __EXTENSIONS__)))) + +# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + +/* On IRIX 6.5, includes , which includes + , which includes . At this point we cannot + include , because that includes , which + gives a syntax error because has not been completely + processed. Simply delegate to the system's header in this case. */ +#elif @HAVE_SYS_SELECT_H@ && defined __sgi && (defined _SYS_BSD_TYPES_H && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H) + +# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + +/* On OpenBSD 5.0, includes , which includes + . At this point we cannot include , because that + includes gnulib's pthread.h override, which gives a syntax error because + /usr/include/pthread.h has not been completely processed. Simply delegate + to the system's header in this case. */ +#elif @HAVE_SYS_SELECT_H@ && defined __OpenBSD__ && (defined _PTHREAD_H_ && !defined PTHREAD_MUTEX_INITIALIZER) + +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + +#else + +#ifndef _@GUARD_PREFIX@_SYS_SELECT_H + +/* On many platforms, assumes prior inclusion of + . Also, mingw defines sigset_t there, instead of + in where it belongs. */ +#include + +#if @HAVE_SYS_SELECT_H@ + +/* On OSF/1 4.0, provides only a forward declaration + of 'struct timeval', and no definition of this type. + Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select() + in . + But avoid namespace pollution on glibc systems. */ +# ifndef __GLIBC__ +# include +# endif + +/* On AIX 7 and Solaris 10, provides an FD_ZERO implementation + that relies on memset(), but without including . + But in any case avoid namespace pollution on glibc systems. */ +# if (defined __OpenBSD__ || defined _AIX || defined __sun || defined __osf__ || defined __BEOS__) \ + && ! defined __GLIBC__ +# include +# endif + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + +#endif + +/* Get definition of 'sigset_t'. + But avoid namespace pollution on glibc systems. + Do this after the include_next (for the sake of OpenBSD 5.0) but before + the split double-inclusion guard (for the sake of Solaris). */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +#endif + +#ifndef _@GUARD_PREFIX@_SYS_SELECT_H +#define _@GUARD_PREFIX@_SYS_SELECT_H + +#if !@HAVE_SYS_SELECT_H@ +/* A platform that lacks . */ +/* Get the 'struct timeval' and 'fd_set' types and the FD_* macros + on most platforms. */ +# include +/* On HP-UX 11, provides an FD_ZERO implementation + that relies on memset(), but without including . */ +# if defined __hpux +# include +# endif +/* On native Windows platforms: + Get the 'fd_set' type. + Get the close() declaration before we override it. */ +# if @HAVE_WINSOCK2_H@ +# if !defined _GL_INCLUDING_WINSOCK2_H +# define _GL_INCLUDING_WINSOCK2_H +# include +# undef _GL_INCLUDING_WINSOCK2_H +# endif +# include +# endif +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + +/* Fix some definitions from . */ + +#if @HAVE_WINSOCK2_H@ + +# if !GNULIB_defined_rpl_fd_isset + +/* Re-define FD_ISSET to avoid a WSA call while we are not using + network sockets. */ +static int +rpl_fd_isset (SOCKET fd, fd_set * set) +{ + u_int i; + if (set == NULL) + return 0; + + for (i = 0; i < set->fd_count; i++) + if (set->fd_array[i] == fd) + return 1; + + return 0; +} + +# define GNULIB_defined_rpl_fd_isset 1 +# endif + +# undef FD_ISSET +# define FD_ISSET(fd, set) rpl_fd_isset(fd, set) + +#endif + +/* Hide some function declarations from . */ + +#if @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 "); +# 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 "); +# 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 + _GL_WARN_ON_USE (socket, + "socket() used without including "); + _GL_WARN_ON_USE (connect, + "connect() used without including "); + _GL_WARN_ON_USE (accept, + "accept() used without including "); + _GL_WARN_ON_USE (bind, + "bind() used without including "); + _GL_WARN_ON_USE (getpeername, + "getpeername() used without including "); + _GL_WARN_ON_USE (getsockname, + "getsockname() used without including "); + _GL_WARN_ON_USE (getsockopt, + "getsockopt() used without including "); + _GL_WARN_ON_USE (listen, + "listen() used without including "); + _GL_WARN_ON_USE (recv, + "recv() used without including "); + _GL_WARN_ON_USE (send, + "send() used without including "); + _GL_WARN_ON_USE (recvfrom, + "recvfrom() used without including "); + _GL_WARN_ON_USE (sendto, + "sendto() used without including "); + _GL_WARN_ON_USE (setsockopt, + "setsockopt() used without including "); + _GL_WARN_ON_USE (shutdown, + "shutdown() used without including "); +# endif +# endif +#endif + + +#if @GNULIB_PSELECT@ +# if @REPLACE_PSELECT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pselect +# define pselect rpl_pselect +# endif +_GL_FUNCDECL_RPL (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +_GL_CXXALIAS_RPL (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +# else +# if !@HAVE_PSELECT@ +_GL_FUNCDECL_SYS (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +# endif +_GL_CXXALIAS_SYS (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +# endif +_GL_CXXALIASWARN (pselect); +#elif defined GNULIB_POSIXCHECK +# undef pselect +# if HAVE_RAW_DECL_PSELECT +_GL_WARN_ON_USE (pselect, "pselect is not portable - " + "use gnulib module pselect for portability"); +# endif +#endif + +#if @GNULIB_SELECT@ +# if @REPLACE_SELECT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select rpl_select +# endif +_GL_FUNCDECL_RPL (select, int, + (int, fd_set *, fd_set *, fd_set *, struct timeval *)); +_GL_CXXALIAS_RPL (select, int, + (int, fd_set *, fd_set *, fd_set *, struct timeval *)); +# else +_GL_CXXALIAS_SYS (select, int, + (int, fd_set *, fd_set *, fd_set *, struct timeval *)); +# endif +_GL_CXXALIASWARN (select); +#elif @HAVE_WINSOCK2_H@ +# undef select +# define select select_used_without_requesting_gnulib_module_select +#elif defined GNULIB_POSIXCHECK +# undef select +# if HAVE_RAW_DECL_SELECT +_GL_WARN_ON_USE (select, "select is not always POSIX compliant - " + "use gnulib module select for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_SYS_SELECT_H */ +#endif /* _@GUARD_PREFIX@_SYS_SELECT_H */ +#endif /* OSF/1 */ diff --git a/tests/test-accept.c b/tests/test-accept.c new file mode 100644 index 0000000..58d796a --- /dev/null +++ b/tests/test-accept.c @@ -0,0 +1,56 @@ +/* Test accepting a connection to a server socket. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (accept, int, (int, struct sockaddr *, socklen_t *)); + +#include +#include +#include + +#include "sockets.h" +#include "macros.h" + +int +main (void) +{ + (void) gl_sockets_startup (SOCKETS_1_1); + + /* Test behaviour for invalid file descriptors. */ + { + struct sockaddr_in addr; + socklen_t addrlen = sizeof (addr); + + errno = 0; + ASSERT (accept (-1, (struct sockaddr *) &addr, &addrlen) == -1); + ASSERT (errno == EBADF); + } + { + struct sockaddr_in addr; + socklen_t addrlen = sizeof (addr); + + close (99); + errno = 0; + ASSERT (accept (99, (struct sockaddr *) &addr, &addrlen) == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff --git a/tests/test-alloca-opt.c b/tests/test-alloca-opt.c index 5aa1645..3d8acc4 100644 --- a/tests/test-alloca-opt.c +++ b/tests/test-alloca-opt.c @@ -1,5 +1,5 @@ /* Test of optional automatic memory allocation. - Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2014 Free Software Foundation, Inc. This 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/tests/test-areadlink-with-size.c b/tests/test-areadlink-with-size.c index 92e456a..6aaff67 100644 --- a/tests/test-areadlink-with-size.c +++ b/tests/test-areadlink-with-size.c @@ -1,5 +1,5 @@ /* Tests of areadlink_with_size. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-areadlink.c b/tests/test-areadlink.c index 8e950b1..b487d44 100644 --- a/tests/test-areadlink.c +++ b/tests/test-areadlink.c @@ -1,5 +1,5 @@ /* Tests of areadlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-areadlink.h b/tests/test-areadlink.h index 55b41c0..61bce29 100644 --- a/tests/test-areadlink.h +++ b/tests/test-areadlink.h @@ -1,5 +1,5 @@ /* Tests of areadlink and friends. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-areadlinkat.c b/tests/test-areadlinkat.c index 97a6215..b1c8b26 100644 --- a/tests/test-areadlinkat.c +++ b/tests/test-areadlinkat.c @@ -1,5 +1,5 @@ /* Tests of areadlinkat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-argmatch.c b/tests/test-argmatch.c index fa25a7c..735cb76 100644 --- a/tests/test-argmatch.c +++ b/tests/test-argmatch.c @@ -1,5 +1,5 @@ /* Test of exact or abbreviated match search. - Copyright (C) 1990, 1998-1999, 2001-2011 Free Software Foundation, Inc. + Copyright (C) 1990, 1998-1999, 2001-2014 Free Software Foundation, Inc. This 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,13 +30,7 @@ thus must link with a definition of that function. Provide it here. */ #ifdef ARGMATCH_DIE_DECL -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) -# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) -# else -# define _GL_ATTRIBUTE_NORETURN /* empty */ -# endif - -ARGMATCH_DIE_DECL _GL_ATTRIBUTE_NORETURN; +_Noreturn ARGMATCH_DIE_DECL; ARGMATCH_DIE_DECL { exit (1); } #endif diff --git a/tests/test-arpa_inet.c b/tests/test-arpa_inet.c new file mode 100644 index 0000000..df67608 --- /dev/null +++ b/tests/test-arpa_inet.c @@ -0,0 +1,27 @@ +/* Test of substitute. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +int +main (void) +{ + return 0; +} diff --git a/tests/test-binary-io.c b/tests/test-binary-io.c index 8e5d193..1b29fbd 100644 --- a/tests/test-binary-io.c +++ b/tests/test-binary-io.c @@ -1,5 +1,5 @@ /* Test of binary mode I/O. - Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2007-2014 Free Software Foundation, Inc. This 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,35 +30,40 @@ #include "macros.h" int -main () +main (int argc, char *argv[]) { /* Test the O_BINARY macro. */ { int fd = - open ("t-bin-out2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600); + open ("t-bin-out0.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600); if (write (fd, "Hello\n", 6) < 0) exit (1); close (fd); } { struct stat statbuf; - if (stat ("t-bin-out2.tmp", &statbuf) < 0) + if (stat ("t-bin-out0.tmp", &statbuf) < 0) exit (1); ASSERT (statbuf.st_size == 6); } - unlink ("t-bin-out2.tmp"); - /* Test the SET_BINARY macro. */ - SET_BINARY (1); - fputs ("Hello\n", stdout); - fclose (stdout); - fclose (stderr); - { - struct stat statbuf; - if (stat ("t-bin-out1.tmp", &statbuf) < 0) - exit (1); - ASSERT (statbuf.st_size == 6); - } + switch (argv[1][0]) + { + case '1': + /* Test the set_binary_mode() function. */ + set_binary_mode (1, O_BINARY); + fputs ("Hello\n", stdout); + break; + + case '2': + /* Test the SET_BINARY macro. */ + SET_BINARY (1); + fputs ("Hello\n", stdout); + break; + + default: + break; + } return 0; } diff --git a/tests/test-binary-io.sh b/tests/test-binary-io.sh index 33e128c..c4dd6e9 100755 --- a/tests/test-binary-io.sh +++ b/tests/test-binary-io.sh @@ -3,8 +3,11 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp" -./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1 +tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp t-bin-out2.tmp" +./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1 +cmp t-bin-out0.tmp t-bin-out1.tmp > /dev/null || exit 1 +./test-binary-io${EXEEXT} 2 > t-bin-out2.tmp || exit 1 +cmp t-bin-out0.tmp t-bin-out2.tmp > /dev/null || exit 1 rm -fr $tmpfiles diff --git a/tests/test-bind.c b/tests/test-bind.c new file mode 100644 index 0000000..4eeb59e --- /dev/null +++ b/tests/test-bind.c @@ -0,0 +1,58 @@ +/* Test binding a server socket to a port. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (bind, int, (int, const struct sockaddr *, socklen_t)); + +#include +#include +#include +#include + +#include "sockets.h" +#include "macros.h" + +int +main (void) +{ + (void) gl_sockets_startup (SOCKETS_1_1); + + /* Test behaviour for invalid file descriptors. */ + { + struct sockaddr_in addr; + + addr.sin_family = AF_INET; + inet_pton (AF_INET, "127.0.0.1", &addr.sin_addr); + addr.sin_port = htons (80); + { + errno = 0; + ASSERT (bind (-1, (const struct sockaddr *) &addr, sizeof (addr)) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (bind (99, (const struct sockaddr *) &addr, sizeof (addr)) == -1); + ASSERT (errno == EBADF); + } + } + + return 0; +} diff --git a/tests/test-bitrotate.c b/tests/test-bitrotate.c index 16fbbbb..c8545a2 100644 --- a/tests/test-bitrotate.c +++ b/tests/test-bitrotate.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-btowc.c b/tests/test-btowc.c index 7907cbe..b9df2f0 100644 --- a/tests/test-btowc.c +++ b/tests/test-btowc.c @@ -1,5 +1,5 @@ /* Test of conversion of unibyte character to wide character. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-byteswap.c b/tests/test-byteswap.c new file mode 100644 index 0000000..5f832b8 --- /dev/null +++ b/tests/test-byteswap.c @@ -0,0 +1,32 @@ +/* Test of substitute. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +#include "macros.h" + +int +main () +{ + ASSERT (bswap_16 (0xABCD) == 0xCDAB); + ASSERT (bswap_32 (0xDEADBEEF) == 0xEFBEADDE); + + return 0; +} diff --git a/tests/test-c-ctype.c b/tests/test-c-ctype.c index 9d748ff..80bf703 100644 --- a/tests/test-c-ctype.c +++ b/tests/test-c-ctype.c @@ -1,5 +1,5 @@ /* Test of character handling in C locale. - Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2007-2014 Free Software Foundation, Inc. This 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/tests/test-c-strcasecmp.c b/tests/test-c-strcasecmp.c index faa3001..03088ff 100644 --- a/tests/test-c-strcasecmp.c +++ b/tests/test-c-strcasecmp.c @@ -1,5 +1,5 @@ /* Test of case-insensitive string comparison function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-c-strcasestr.c b/tests/test-c-strcasestr.c index 7d0d635..88c905b 100644 --- a/tests/test-c-strcasestr.c +++ b/tests/test-c-strcasestr.c @@ -1,5 +1,5 @@ /* Test of case-insensitive searching in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-c-strncasecmp.c b/tests/test-c-strncasecmp.c index 6a225c7..0fba0e5 100644 --- a/tests/test-c-strncasecmp.c +++ b/tests/test-c-strncasecmp.c @@ -1,5 +1,5 @@ /* Test of case-insensitive string comparison function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-c-strstr.c b/tests/test-c-strstr.c index 8ec90ae..c27e0ef 100644 --- a/tests/test-c-strstr.c +++ b/tests/test-c-strstr.c @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-canonicalize.c b/tests/test-canonicalize.c index a095e0e..6da94e6 100644 --- a/tests/test-canonicalize.c +++ b/tests/test-canonicalize.c @@ -1,5 +1,5 @@ /* Test of execution of file name canonicalization. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -82,6 +82,9 @@ main (void) result2 = canonicalize_filename_mode (NULL, CAN_EXISTING); ASSERT (result2 == NULL); ASSERT (errno == EINVAL); + result2 = canonicalize_filename_mode (".", CAN_MISSING | CAN_ALL_BUT_LAST); + ASSERT (result2 == NULL); + ASSERT (errno == EINVAL); } /* Check that a non-directory with trailing slash yields NULL. */ @@ -134,6 +137,15 @@ main (void) ASSERT (symlink ("../s/2", BASE "/d/1") == 0); ASSERT (symlink ("//.//../..", BASE "/droot") == 0); + /* Check that symbolic links are not resolved, with CAN_NOLINKS. */ + { + char *result1 = canonicalize_filename_mode (BASE "/huk", CAN_NOLINKS); + ASSERT (result1 != NULL); + ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/huk"), + "/" BASE "/huk") == 0); + free (result1); + } + /* Check that the symbolic link to a file can be resolved. */ { char *result1 = canonicalize_file_name (BASE "/huk"); diff --git a/tests/test-chdir.c b/tests/test-chdir.c new file mode 100644 index 0000000..e17b660 --- /dev/null +++ b/tests/test-chdir.c @@ -0,0 +1,33 @@ +/* Test changing to a directory. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include "signature.h" +SIGNATURE_CHECK (chdir, int, (const char *)); + +#include "macros.h" + +int +main (void) +{ + ASSERT (chdir ("/") == 0); + + return 0; +} diff --git a/tests/test-chown.c b/tests/test-chown.c deleted file mode 100644 index b2b68c8..0000000 --- a/tests/test-chown.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Tests of chown. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (chown, int, (char const *, uid_t, gid_t)); - -#include -#include -#include -#include -#include -#include - -#include "mgetgroups.h" -#include "stat-time.h" -#include "ignore-value.h" -#include "macros.h" - -#define BASE "test-chown.t" - -#include "test-chown.h" - -int -main (void) -{ - /* Remove any leftovers from a previous partial run. */ - ignore_value (system ("rm -rf " BASE "*")); - - return test_chown (chown, true); -} diff --git a/tests/test-chown.h b/tests/test-chown.h deleted file mode 100644 index 7630de4..0000000 --- a/tests/test-chown.h +++ /dev/null @@ -1,209 +0,0 @@ -/* Tests of chown. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake , 2009. */ - -#include "nap.h" - -#if !HAVE_GETEGID -# define getegid() ((gid_t) -1) -#endif - -/* This file is designed to test chown(n,o,g) and - chownat(AT_FDCWD,n,o,g,0). FUNC is the function to test. Assumes - that BASE and ASSERT are already defined, and that appropriate - headers are already included. If PRINT, warn before skipping - symlink tests with status 77. */ - -static int -test_chown (int (*func) (char const *, uid_t, gid_t), bool print) -{ - struct stat st1; - struct stat st2; - gid_t *gids = NULL; - int gids_count; - int result; - - /* Solaris 8 is interesting - if the current process belongs to - multiple groups, the current directory is owned by a a group that - the current process belongs to but different than getegid(), and - the current directory does not have the S_ISGID bit, then regular - files created in the directory belong to the directory's group, - but symlinks belong to the current effective group id. If - S_ISGID is set, then both files and symlinks belong to the - directory's group. However, it is possible to run the testsuite - from within a directory owned by a group we don't belong to, in - which case all things that we create belong to the current - effective gid. So, work around the issues by creating a - subdirectory (we are guaranteed that the subdirectory will be - owned by one of our current groups), change ownership of that - directory to the current effective gid (which will thus succeed), - then create all other files within that directory (eliminating - questions on whether inheritance or current id triumphs, since - the two methods resolve to the same gid). */ - ASSERT (mkdir (BASE "dir", 0700) == 0); - ASSERT (stat (BASE "dir", &st1) == 0); - - /* Filter out mingw, which has no concept of groups. */ - result = func (BASE "dir", st1.st_uid, getegid ()); - if (result == -1 && errno == ENOSYS) - { - ASSERT (rmdir (BASE "dir") == 0); - if (print) - fputs ("skipping test: no support for ownership\n", stderr); - return 77; - } - ASSERT (result == 0); - - ASSERT (close (creat (BASE "dir/file", 0600)) == 0); - ASSERT (stat (BASE "dir/file", &st1) == 0); - ASSERT (st1.st_uid != (uid_t) -1); - ASSERT (st1.st_gid != (uid_t) -1); - ASSERT (st1.st_gid == getegid ()); - - /* Sanity check of error cases. */ - errno = 0; - ASSERT (func ("", -1, -1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("no_such", -1, -1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("no_such/", -1, -1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func (BASE "dir/file/", -1, -1) == -1); - ASSERT (errno == ENOTDIR); - - /* Check that -1 does not alter ownership. */ - ASSERT (func (BASE "dir/file", -1, st1.st_gid) == 0); - ASSERT (func (BASE "dir/file", st1.st_uid, -1) == 0); - ASSERT (func (BASE "dir/file", (uid_t) -1, (gid_t) -1) == 0); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - - /* Even if the values aren't changing, ctime is required to change - if at least one argument is not -1. */ - nap (); - ASSERT (func (BASE "dir/file", st1.st_uid, st1.st_gid) == 0); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_ctime < st2.st_ctime - || (st1.st_ctime == st2.st_ctime - && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2))); - - /* Test symlink behavior. */ - if (symlink ("link", BASE "dir/link2")) - { - ASSERT (unlink (BASE "dir/file") == 0); - ASSERT (rmdir (BASE "dir") == 0); - if (print) - fputs ("skipping test: symlinks not supported on this file system\n", - stderr); - return 77; - } - errno = 0; - ASSERT (func (BASE "dir/link2", -1, -1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func (BASE "dir/link2/", st1.st_uid, st1.st_gid) == -1); - ASSERT (errno == ENOENT); - ASSERT (symlink ("file", BASE "dir/link") == 0); - - /* For non-privileged users, chown can only portably succeed at - changing group ownership of a file we own. If we belong to at - least two groups, then verifying the correct change is simple. - But if we belong to only one group, then we fall back on the - other observable effect of chown: the ctime must be updated. */ - gids_count = mgetgroups (NULL, st1.st_gid, &gids); - if (1 < gids_count) - { - ASSERT (gids[1] != st1.st_gid); - ASSERT (gids[1] != (gid_t) -1); - ASSERT (lstat (BASE "dir/link", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/link2", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - - errno = 0; - ASSERT (func (BASE "dir/link2/", -1, gids[1]) == -1); - ASSERT (errno == ENOTDIR); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/link", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/link2", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - - ASSERT (func (BASE "dir/link2", -1, gids[1]) == 0); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (gids[1] == st2.st_gid); - ASSERT (lstat (BASE "dir/link", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/link2", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - } - else - { - struct stat l1; - struct stat l2; - ASSERT (stat (BASE "dir/file", &st1) == 0); - ASSERT (lstat (BASE "dir/link", &l1) == 0); - ASSERT (lstat (BASE "dir/link2", &l2) == 0); - - nap (); - errno = 0; - ASSERT (func (BASE "dir/link2/", -1, st1.st_gid) == -1); - ASSERT (errno == ENOTDIR); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&st1) == get_stat_ctime_ns (&st2)); - ASSERT (lstat (BASE "dir/link", &st2) == 0); - ASSERT (l1.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&l1) == get_stat_ctime_ns (&st2)); - ASSERT (lstat (BASE "dir/link2", &st2) == 0); - ASSERT (l2.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&l2) == get_stat_ctime_ns (&st2)); - - ASSERT (func (BASE "dir/link2", -1, st1.st_gid) == 0); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_ctime < st2.st_ctime - || (st1.st_ctime == st2.st_ctime - && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2))); - ASSERT (lstat (BASE "dir/link", &st2) == 0); - ASSERT (l1.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&l1) == get_stat_ctime_ns (&st2)); - ASSERT (lstat (BASE "dir/link2", &st2) == 0); - ASSERT (l2.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&l2) == get_stat_ctime_ns (&st2)); - } - - /* Cleanup. */ - free (gids); - ASSERT (unlink (BASE "dir/file") == 0); - ASSERT (unlink (BASE "dir/link") == 0); - ASSERT (unlink (BASE "dir/link2") == 0); - ASSERT (rmdir (BASE "dir") == 0); - return 0; -} diff --git a/tests/test-cloexec.c b/tests/test-cloexec.c index 374de30..116953d 100644 --- a/tests/test-cloexec.c +++ b/tests/test-cloexec.c @@ -1,5 +1,5 @@ /* Test duplicating non-inheritable file descriptors. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,9 +25,11 @@ #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" #endif #include "binary-io.h" @@ -38,7 +40,7 @@ static int is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); @@ -76,6 +78,7 @@ main (void) const char *file = "test-cloexec.tmp"; int fd = creat (file, 0600); int fd2; + int bad_fd = getdtablesize (); /* Assume std descriptors were provided by invoker. */ ASSERT (STDERR_FILENO < fd); @@ -118,7 +121,7 @@ main (void) ASSERT (set_cloexec_flag (-1, false) == -1); ASSERT (errno == EBADF); errno = 0; - ASSERT (set_cloexec_flag (10000000, false) == -1); + ASSERT (set_cloexec_flag (bad_fd, false) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (set_cloexec_flag (fd2, false) == -1); @@ -127,7 +130,7 @@ main (void) ASSERT (dup_cloexec (-1) == -1); ASSERT (errno == EBADF); errno = 0; - ASSERT (dup_cloexec (10000000) == -1); + ASSERT (dup_cloexec (bad_fd) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (dup_cloexec (fd2) == -1); diff --git a/tests/test-close.c b/tests/test-close.c new file mode 100644 index 0000000..44bce54 --- /dev/null +++ b/tests/test-close.c @@ -0,0 +1,45 @@ +/* Test closing a file or socket. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (close, int, (int)); + +#include + +#include "macros.h" + +int +main (void) +{ + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (close (-1) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (close (99) == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff --git a/tests/test-closein.c b/tests/test-closein.c index 0c29a6b..b177cf0 100644 --- a/tests/test-closein.c +++ b/tests/test-closein.c @@ -1,5 +1,5 @@ /* Test of closein module. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Eric Blake. */ diff --git a/tests/test-closein.sh b/tests/test-closein.sh index a75929a..9c5e851 100755 --- a/tests/test-closein.sh +++ b/tests/test-closein.sh @@ -1,38 +1,32 @@ #!/bin/sh +: ${srcdir=.} +. "$srcdir/init.sh"; path_prepend_ . -tmpfiles= -trap 'rm -fr $tmpfiles' 1 2 3 15 +echo Hello world > in.tmp +echo world > xout.tmp -p=t-closein- -tmpfiles="${p}in.tmp ${p}xout.tmp ${p}out1.tmp ${p}out2.tmp" +fail=0 +# Test with seekable stdin; follow-on process must see remaining data +(test-closein; cat) < in.tmp > out1.tmp || fail=1 +cmp out1.tmp in.tmp || fail=1 -echo Hello world > ${p}in.tmp -echo world > ${p}xout.tmp - -# Test with seekable stdin; followon process must see remaining data -(./test-closein${EXEEXT}; cat) < ${p}in.tmp > ${p}out1.tmp || exit 1 -cmp ${p}out1.tmp ${p}in.tmp || exit 1 - -(./test-closein${EXEEXT} consume; cat) < ${p}in.tmp > ${p}out2.tmp || exit 1 -cmp ${p}out2.tmp ${p}xout.tmp || exit 1 +(test-closein consume; cat) < in.tmp > out2.tmp || fail=1 +cmp out2.tmp xout.tmp || fail=1 # Test for lack of error on pipe. Ignore any EPIPE failures from cat. -cat ${p}in.tmp 2>/dev/null | ./test-closein${EXEEXT} || exit 1 +cat in.tmp 2>/dev/null | test-closein || fail=1 -cat ${p}in.tmp 2>/dev/null | ./test-closein${EXEEXT} consume || exit 1 +cat in.tmp 2>/dev/null | test-closein consume || fail=1 # Test for lack of error when nothing is read -./test-closein${EXEEXT} /dev/null && exit 1 - -# Cleanup -rm -fr $tmpfiles +test-closein consume close <&- 2>/dev/null && fail=1 -exit 0 +Exit $fail diff --git a/tests/test-connect.c b/tests/test-connect.c new file mode 100644 index 0000000..6142429 --- /dev/null +++ b/tests/test-connect.c @@ -0,0 +1,60 @@ +/* Test connecting a client socket. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (connect, int, (int, const struct sockaddr *, socklen_t)); + +#include +#include +#include +#include + +#include "sockets.h" +#include "macros.h" + +int +main (void) +{ + (void) gl_sockets_startup (SOCKETS_1_1); + + /* Test behaviour for invalid file descriptors. */ + { + struct sockaddr_in addr; + + addr.sin_family = AF_INET; + inet_pton (AF_INET, "127.0.0.1", &addr.sin_addr); + addr.sin_port = htons (80); + { + errno = 0; + ASSERT (connect (-1, (const struct sockaddr *) &addr, sizeof (addr)) + == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (connect (99, (const struct sockaddr *) &addr, sizeof (addr)) + == -1); + ASSERT (errno == EBADF); + } + } + + return 0; +} diff --git a/tests/test-ctype.c b/tests/test-ctype.c index 0a5cb19..8c79cd2 100644 --- a/tests/test-ctype.c +++ b/tests/test-ctype.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-dirent-safer.c b/tests/test-dirent-safer.c index 13bf02e..859194c 100644 --- a/tests/test-dirent-safer.c +++ b/tests/test-dirent-safer.c @@ -1,5 +1,5 @@ /* Test that directory streams leave standard fds alone. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-dirent.c b/tests/test-dirent.c index 212644a..7905a2a 100644 --- a/tests/test-dirent.c +++ b/tests/test-dirent.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-dirname.c b/tests/test-dirname.c index 1ddf229..1c6ee57 100644 --- a/tests/test-dirname.c +++ b/tests/test-dirname.c @@ -1,5 +1,5 @@ /* Test the gnulib dirname module. - Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -149,14 +149,15 @@ main (void) || (dirlen + 1 == strlen (dir) && dir[dirlen] == '.')))) { ok = false; - printf ("dir_name `%s': got `%s' len %d, expected `%s' len %ld\n", + printf ("dir_name '%s': got '%s' len %d," + " expected '%s' len %ld\n", t->name, dir, dirlen, t->dir, (unsigned long) strlen (t->dir)); } if (strcmp (last, t->last)) { ok = false; - printf ("last_component `%s': got `%s', expected `%s'\n", + printf ("last_component '%s': got '%s', expected '%s'\n", t->name, last, t->last); } if (! (strcmp (base, t->base) == 0 @@ -165,21 +166,22 @@ main (void) && ISSLASH (base[baselen]))))) { ok = false; - printf ("base_name `%s': got `%s' len %d, expected `%s' len %ld\n", + printf ("base_name '%s': got '%s' len %d," + " expected '%s' len %ld\n", t->name, base, baselen, t->base, (unsigned long) strlen (t->base)); } if (strcmp (stripped, t->stripped) || modified != t->modified) { ok = false; - printf ("strip_trailing_slashes `%s': got %s %s, expected %s %s\n", + printf ("strip_trailing_slashes '%s': got %s %s, expected %s %s\n", t->name, stripped, modified ? "changed" : "unchanged", t->stripped, t->modified ? "changed" : "unchanged"); } if (t->absolute != absolute) { ok = false; - printf ("`%s': got %s, expected %s\n", t->name, + printf ("'%s': got %s, expected %s\n", t->name, absolute ? "absolute" : "relative", t->absolute ? "absolute" : "relative"); } diff --git a/tests/test-dup-safer.c b/tests/test-dup-safer.c index 14cfaff..d11891e 100644 --- a/tests/test-dup-safer.c +++ b/tests/test-dup-safer.c @@ -1,5 +1,5 @@ /* Test that dup_safer leaves standard fds alone. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,14 +24,17 @@ #include #include #include +#include #include "binary-io.h" #include "cloexec.h" #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" #endif #if !O_BINARY @@ -54,7 +57,7 @@ static bool is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; @@ -71,7 +74,7 @@ static bool is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); @@ -105,6 +108,7 @@ main (void) { int i; int fd; + int bad_fd = getdtablesize (); /* We close fd 2 later, so save it in fd 10. */ if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO @@ -127,7 +131,7 @@ main (void) ASSERT (dup (-1) == -1); ASSERT (errno == EBADF); errno = 0; - ASSERT (dup (10000000) == -1); + ASSERT (dup (bad_fd) == -1); ASSERT (errno == EBADF); close (fd + 1); errno = 0; diff --git a/tests/test-dup.c b/tests/test-dup.c new file mode 100644 index 0000000..905275c --- /dev/null +++ b/tests/test-dup.c @@ -0,0 +1,45 @@ +/* Test duplicating a file descriptor. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (dup, int, (int)); + +#include + +#include "macros.h" + +int +main (void) +{ + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (dup (-1) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (dup (99) == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff --git a/tests/test-dup2.c b/tests/test-dup2.c index e2ad88b..c7cb965 100644 --- a/tests/test-dup2.c +++ b/tests/test-dup2.c @@ -1,5 +1,5 @@ /* Test duplicating file descriptors. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,10 @@ SIGNATURE_CHECK (dup2, int, (int, int)); #include #include +#if HAVE_SYS_RESOURCE_H +# include +#endif + #include "binary-io.h" #if GNULIB_TEST_CLOEXEC @@ -33,9 +37,11 @@ SIGNATURE_CHECK (dup2, int, (int, int)); #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" #endif #include "macros.h" @@ -45,7 +51,7 @@ static int is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; @@ -63,7 +69,7 @@ static int is_inheritable (int fd) { # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); @@ -101,6 +107,7 @@ main (void) { const char *file = "test-dup2.tmp"; char buffer[1]; + int bad_fd = getdtablesize (); int fd = open (file, O_CREAT | O_TRUNC | O_RDWR, 0600); /* Assume std descriptors were provided by invoker. */ @@ -120,6 +127,10 @@ main (void) errno = 0; ASSERT (dup2 (-1, fd) == -1); ASSERT (errno == EBADF); + close (99); + errno = 0; + ASSERT (dup2 (99, fd) == -1); + ASSERT (errno == EBADF); errno = 0; ASSERT (dup2 (AT_FDCWD, fd) == -1); ASSERT (errno == EBADF); @@ -139,8 +150,17 @@ main (void) errno = 0; ASSERT (dup2 (fd, -2) == -1); ASSERT (errno == EBADF); + if (bad_fd > 256) + { + ASSERT (dup2 (fd, 255) == 255); + ASSERT (dup2 (fd, 256) == 256); + ASSERT (close (255) == 0); + ASSERT (close (256) == 0); + } + ASSERT (dup2 (fd, bad_fd - 1) == bad_fd - 1); + ASSERT (close (bad_fd - 1) == 0); errno = 0; - ASSERT (dup2 (fd, 10000000) == -1); + ASSERT (dup2 (fd, bad_fd) == -1); ASSERT (errno == EBADF); /* Using dup2 can skip fds. */ diff --git a/tests/test-environ.c b/tests/test-environ.c index 11df789..46a2eab 100644 --- a/tests/test-environ.c +++ b/tests/test-environ.c @@ -1,5 +1,5 @@ /* Test of environ variable. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-errno.c b/tests/test-errno.c index 7851c22..495242b 100644 --- a/tests/test-errno.c +++ b/tests/test-errno.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -98,6 +98,8 @@ int e115 = EINPROGRESS; int e116 = ESTALE; int e122 = EDQUOT; int e125 = ECANCELED; +int e130 = EOWNERDEAD; +int e131 = ENOTRECOVERABLE; /* Don't verify that these errno values are all different, except for possibly EWOULDBLOCK == EAGAIN. Even Linux/x86 does not pass this check: it has diff --git a/tests/test-faccessat.c b/tests/test-faccessat.c new file mode 100644 index 0000000..400d448 --- /dev/null +++ b/tests/test-faccessat.c @@ -0,0 +1,46 @@ +/* Test checking user's permissions for a file. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (faccessat, int, (int, const char *, int, int)); + +#include +#include + +#include "macros.h" + +int +main (void) +{ + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (faccessat (-1, "foo", F_OK, 0) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (faccessat (99, "foo", F_OK, 0) == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff --git a/tests/test-fchdir.c b/tests/test-fchdir.c index 0375c31..b771223 100644 --- a/tests/test-fchdir.c +++ b/tests/test-fchdir.c @@ -1,5 +1,5 @@ /* Test changing to a directory named by a file descriptor. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -34,14 +34,30 @@ SIGNATURE_CHECK (fchdir, int, (int)); int main (void) { - char *cwd = getcwd (NULL, 0); - int fd = open (".", O_RDONLY); + char *cwd; + int fd; int i; + cwd = getcwd (NULL, 0); ASSERT (cwd); + + fd = open (".", O_RDONLY); ASSERT (0 <= fd); - /* Check for failure cases. */ + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (fchdir (-1) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (fchdir (99) == -1); + ASSERT (errno == EBADF); + } + + /* Check for other failure cases. */ { int bad_fd = open ("/dev/null", O_RDONLY); ASSERT (0 <= bad_fd); @@ -49,15 +65,12 @@ main (void) ASSERT (fchdir (bad_fd) == -1); ASSERT (errno == ENOTDIR); ASSERT (close (bad_fd) == 0); - errno = 0; - ASSERT (fchdir (-1) == -1); - ASSERT (errno == EBADF); } /* Repeat test twice, once in '.' and once in '..'. */ for (i = 0; i < 2; i++) { - ASSERT (chdir (".." + 1 - i) == 0); + ASSERT (chdir (&".."[1 - i]) == 0); ASSERT (fchdir (fd) == 0); { size_t len = strlen (cwd) + 1; diff --git a/tests/test-fchownat.c b/tests/test-fchownat.c deleted file mode 100644 index c09694c..0000000 --- a/tests/test-fchownat.c +++ /dev/null @@ -1,82 +0,0 @@ -/* Tests of fchownat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (fchownat, int, (int, char const *, uid_t, gid_t, int)); - -#include -#include -#include -#include -#include -#include - -#include "mgetgroups.h" -#include "openat.h" -#include "stat-time.h" -#include "ignore-value.h" -#include "macros.h" - -#define BASE "test-fchownat.t" - -#include "test-chown.h" -#include "test-lchown.h" - -static int dfd = AT_FDCWD; - -/* Wrapper around fchownat to test chown behavior. */ -static int -do_chown (char const *name, uid_t user, gid_t group) -{ - return chownat (dfd, name, user, group); -} - -/* Wrapper around fchownat to test lchown behavior. */ -static int -do_lchown (char const *name, uid_t user, gid_t group) -{ - return lchownat (dfd, name, user, group); -} - -int -main (void) -{ - int result1; /* Skip because of no chown/symlink support. */ - int result2; /* Skip because of no lchown support. */ - - /* Clean up any trash from prior testsuite runs. */ - ignore_value (system ("rm -rf " BASE "*")); - - /* Basic tests. */ - result1 = test_chown (do_chown, true); - result2 = test_lchown (do_lchown, result1 == 0); - dfd = open (".", O_RDONLY); - ASSERT (0 <= dfd); - ASSERT (test_chown (do_chown, false) == result1); - ASSERT (test_lchown (do_lchown, false) == result2); - /* We expect 0/0, 0/77, or 77/77, but not 77/0. */ - ASSERT (result1 <= result2); - ASSERT (close (dfd) == 0); - - /* FIXME - add additional tests of dfd not at current directory. */ - return result1 | result2; -} diff --git a/tests/test-fcntl-h.c b/tests/test-fcntl-h.c index dd20fbb..a86214e 100644 --- a/tests/test-fcntl-h.c +++ b/tests/test-fcntl-h.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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,18 +21,110 @@ #include /* 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 }; /* Check that the FD_* macros are defined. */ -int fd = FD_CLOEXEC; +int i = FD_CLOEXEC; + +/* Check that the types are all defined. */ +pid_t t1; +off_t t2; +mode_t t3; int main (void) { - return 0; + /* Ensure no overlap in SEEK_*. */ + switch (0) + { + case SEEK_CUR: + case SEEK_END: + case SEEK_SET: + ; + } + + /* Ensure no dangerous overlap in non-zero gnulib-defined replacements. */ + switch (O_RDONLY) + { + /* Access modes */ + case O_RDONLY: + case O_WRONLY: + case O_RDWR: +#if O_EXEC && O_EXEC != O_RDONLY + case O_EXEC: +#endif +#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)); + break; + + /* Everyone should have these */ + case O_CREAT: + case O_EXCL: + case O_TRUNC: + case O_APPEND: + break; + + /* These might be 0 or O_RDONLY, only test non-zero versions. */ +#if O_CLOEXEC + case O_CLOEXEC: +#endif +#if O_DIRECT + case O_DIRECT: +#endif +#if O_DIRECTORY + case O_DIRECTORY: +#endif +#if O_DSYNC + case O_DSYNC: +#endif +#if O_IGNORE_CTTY + case O_IGNORE_CTTY: +#endif +#if O_NOATIME + case O_NOATIME: +#endif +#if O_NONBLOCK + case O_NONBLOCK: +#endif +#if O_NOCTTY + case O_NOCTTY: +#endif +#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 +#if O_SYNC && O_SYNC != O_RSYNC + case O_SYNC: +#endif +#if O_TTY_INIT + case O_TTY_INIT: +#endif +#if O_BINARY + case O_BINARY: +#endif +#if O_TEXT + case O_TEXT: +#endif + ; + } + + return !i; } diff --git a/tests/test-fcntl-safer.c b/tests/test-fcntl-safer.c index 70a9f51..f58f5b8 100644 --- a/tests/test-fcntl-safer.c +++ b/tests/test-fcntl-safer.c @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-fcntl.c b/tests/test-fcntl.c index 23a0dba..23d74d8 100644 --- a/tests/test-fcntl.c +++ b/tests/test-fcntl.c @@ -1,5 +1,5 @@ /* Test of fcntl(2). - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,9 +31,11 @@ SIGNATURE_CHECK (fcntl, int, (int, int, ...)); #include #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the Win32 API functions. */ +/* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" #endif #include "binary-io.h" @@ -49,7 +51,7 @@ static bool is_open (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; @@ -66,7 +68,7 @@ static bool is_inheritable (int fd) { #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On Win32, the initial state of unassigned standard file + /* On native Windows, the initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE, and there is no fcntl. */ HANDLE h = (HANDLE) _get_osfhandle (fd); @@ -209,6 +211,7 @@ main (void) { const char *file = "test-fcntl.tmp"; int fd; + int bad_fd = getdtablesize (); /* Sanity check that rpl_fcntl is likely to work. */ ASSERT (func2 (1, 2) == 2); @@ -235,7 +238,7 @@ main (void) ASSERT (fcntl (fd + 1, F_DUPFD, 0) == -1); ASSERT (errno == EBADF); errno = 0; - ASSERT (fcntl (10000000, F_DUPFD, 0) == -1); + ASSERT (fcntl (bad_fd, F_DUPFD, 0) == -1); ASSERT (errno == EBADF); errno = 0; ASSERT (fcntl (-1, F_DUPFD_CLOEXEC, 0) == -1); @@ -244,23 +247,21 @@ main (void) ASSERT (fcntl (fd + 1, F_DUPFD_CLOEXEC, 0) == -1); ASSERT (errno == EBADF); errno = 0; - ASSERT (fcntl (10000000, F_DUPFD_CLOEXEC, 0) == -1); + ASSERT (fcntl (bad_fd, F_DUPFD_CLOEXEC, 0) == -1); ASSERT (errno == EBADF); /* For F_DUPFD*, the destination must be valid. */ - ASSERT (getdtablesize () < 10000000); errno = 0; ASSERT (fcntl (fd, F_DUPFD, -1) == -1); ASSERT (errno == EINVAL); errno = 0; - ASSERT (fcntl (fd, F_DUPFD, 10000000) == -1); + ASSERT (fcntl (fd, F_DUPFD, bad_fd) == -1); ASSERT (errno == EINVAL); - ASSERT (getdtablesize () < 10000000); errno = 0; ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, -1) == -1); ASSERT (errno == EINVAL); errno = 0; - ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, 10000000) == -1); + ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, bad_fd) == -1); ASSERT (errno == EINVAL); /* For F_DUPFD*, check for correct inheritance, as well as @@ -312,7 +313,7 @@ main (void) ASSERT (is_mode (fd + 2, O_TEXT)); ASSERT (close (fd + 2) == 0); - /* Test F_GETFD. */ + /* Test F_GETFD on invalid file descriptors. */ errno = 0; ASSERT (fcntl (-1, F_GETFD) == -1); ASSERT (errno == EBADF); @@ -320,8 +321,10 @@ main (void) ASSERT (fcntl (fd + 1, F_GETFD) == -1); ASSERT (errno == EBADF); errno = 0; - ASSERT (fcntl (10000000, F_GETFD) == -1); + ASSERT (fcntl (bad_fd, F_GETFD) == -1); ASSERT (errno == EBADF); + + /* Test F_GETFD, the FD_CLOEXEC bit. */ { int result = fcntl (fd, F_GETFD); ASSERT (0 <= result); @@ -333,6 +336,71 @@ main (void) ASSERT (close (fd + 1) == 0); } +#ifdef F_SETFD + /* Test F_SETFD on invalid file descriptors. */ + errno = 0; + ASSERT (fcntl (-1, F_SETFD, 0) == -1); + ASSERT (errno == EBADF); + errno = 0; + ASSERT (fcntl (fd + 1, F_SETFD, 0) == -1); + ASSERT (errno == EBADF); + errno = 0; + ASSERT (fcntl (bad_fd, F_SETFD, 0) == -1); + ASSERT (errno == EBADF); +#endif + +#ifdef F_GETFL + /* Test F_GETFL on invalid file descriptors. */ + errno = 0; + ASSERT (fcntl (-1, F_GETFL) == -1); + ASSERT (errno == EBADF); + errno = 0; + ASSERT (fcntl (fd + 1, F_GETFL) == -1); + ASSERT (errno == EBADF); + errno = 0; + ASSERT (fcntl (bad_fd, F_GETFL) == -1); + ASSERT (errno == EBADF); +#endif + +#ifdef F_SETFL + /* Test F_SETFL on invalid file descriptors. */ + errno = 0; + ASSERT (fcntl (-1, F_SETFL, 0) == -1); + ASSERT (errno == EBADF); + errno = 0; + ASSERT (fcntl (fd + 1, F_SETFL, 0) == -1); + ASSERT (errno == EBADF); + errno = 0; + ASSERT (fcntl (bad_fd, F_SETFL, 0) == -1); + ASSERT (errno == EBADF); +#endif + +#ifdef F_GETOWN + /* Test F_GETOWN on invalid file descriptors. */ + errno = 0; + ASSERT (fcntl (-1, F_GETOWN) == -1); + ASSERT (errno == EBADF); + errno = 0; + ASSERT (fcntl (fd + 1, F_GETOWN) == -1); + ASSERT (errno == EBADF); + errno = 0; + ASSERT (fcntl (bad_fd, F_GETOWN) == -1); + ASSERT (errno == EBADF); +#endif + +#ifdef F_SETOWN + /* Test F_SETFL on invalid file descriptors. */ + errno = 0; + ASSERT (fcntl (-1, F_SETOWN, 0) == -1); + ASSERT (errno == EBADF); + errno = 0; + ASSERT (fcntl (fd + 1, F_SETOWN, 0) == -1); + ASSERT (errno == EBADF); + errno = 0; + ASSERT (fcntl (bad_fd, F_SETOWN, 0) == -1); + ASSERT (errno == EBADF); +#endif + /* Cleanup. */ ASSERT (close (fd) == 0); ASSERT (unlink (file) == 0); diff --git a/tests/test-fdopen.c b/tests/test-fdopen.c new file mode 100644 index 0000000..743511e --- /dev/null +++ b/tests/test-fdopen.c @@ -0,0 +1,49 @@ +/* Test opening a stream with a file descriptor. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (fdopen, FILE *, (int, const char *)); + +#include +#include + +#include "macros.h" + +int +main (void) +{ + /* Test behavior on failure. POSIX makes it hard to check for + failure, since the behavior is not well-defined on invalid file + descriptors, so try fdopen 1000 times and if that's not enough to + fail due to EMFILE, so be it. */ + + int i; + for (i = 0; i < 1000; i++) + { + errno = 0; + if (! fdopen (STDOUT_FILENO, "w")) + { + ASSERT (errno != 0); + break; + } + } + + return 0; +} diff --git a/tests/test-fdopendir.c b/tests/test-fdopendir.c index 81e44a1..d780b62 100644 --- a/tests/test-fdopendir.c +++ b/tests/test-fdopendir.c @@ -1,5 +1,5 @@ /* Test opening a directory stream from a file descriptor. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,14 +27,17 @@ SIGNATURE_CHECK (fdopendir, DIR *, (int)); #include #include +#include "progname.h" #include "macros.h" int -main (void) +main (int argc _GL_UNUSED, char *argv[]) { DIR *d; int fd; + set_program_name (argv[0]); + /* A non-directory cannot be turned into a directory stream. */ fd = open ("test-fdopendir.tmp", O_RDONLY | O_CREAT, 0600); ASSERT (0 <= fd); @@ -45,9 +48,17 @@ main (void) ASSERT (unlink ("test-fdopendir.tmp") == 0); /* A bad fd cannot be turned into a stream. */ - errno = 0; - ASSERT (fdopendir (-1) == NULL); - ASSERT (errno == EBADF); + { + errno = 0; + ASSERT (fdopendir (-1) == NULL); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (fdopendir (99) == NULL); + ASSERT (errno == EBADF); + } /* This should work. */ fd = open (".", O_RDONLY); diff --git a/tests/test-fflush.c b/tests/test-fflush.c index 3c36ed9..6af2363 100644 --- a/tests/test-fflush.c +++ b/tests/test-fflush.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible fflush() function. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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,8 +26,11 @@ #include "signature.h" SIGNATURE_CHECK (fflush, int, (FILE *)); +#include #include +#include "macros.h" + int main (void) { @@ -46,11 +49,13 @@ main (void) /* Test fflush. */ f = fopen ("test-fflush.txt", "r"); + ASSERT (f != NULL); fd = fileno (f); if (!f || 0 > fd || fread (buffer, 1, 5, f) != 5) { fputs ("Failed initial read of sample file.\n", stderr); - fclose (f); + if (f) + fclose (f); unlink ("test-fflush.txt"); return 1; } @@ -140,6 +145,47 @@ main (void) return 1; } fclose (f); + + /* Test that fflush() sets errno if someone else closes the stream + fd behind the back of stdio. */ + { + FILE *fp = fopen ("test-fflush.txt", "w"); + ASSERT (fp != NULL); + fputc ('x', fp); + ASSERT (close (fileno (fp)) == 0); + errno = 0; + ASSERT (fflush (fp) == EOF); + ASSERT (errno == EBADF); + fclose (fp); + } + + /* Test that fflush() sets errno if the stream was constructed with + an invalid file descriptor. */ + { + FILE *fp = fdopen (-1, "w"); + if (fp != NULL) + { + fputc ('x', fp); + errno = 0; + ASSERT (fflush (fp) == EOF); + ASSERT (errno == EBADF); + } + } + { + FILE *fp; + close (99); + fp = fdopen (99, "w"); + if (fp != NULL) + { + fputc ('x', fp); + errno = 0; + ASSERT (fflush (fp) == EOF); + ASSERT (errno == EBADF); + } + } + + /* Clean up. */ unlink ("test-fflush.txt"); + return 0; } diff --git a/tests/test-fflush2.c b/tests/test-fflush2.c index ac2217d..d73309d 100644 --- a/tests/test-fflush2.c +++ b/tests/test-fflush2.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible fflush() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-fgetc.c b/tests/test-fgetc.c new file mode 100644 index 0000000..2534d4b --- /dev/null +++ b/tests/test-fgetc.c @@ -0,0 +1,97 @@ +/* Test of fgetc() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (fgetc, int, (FILE *)); + +#include +#include +#include + +#include "msvc-inval.h" + +#include "macros.h" + +int +main (int argc, char **argv) +{ + const char *filename = "test-fgetc.txt"; + + /* We don't have an fgetc() function that installs an invalid parameter + handler so far. So install that handler here, explicitly. */ +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ + && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING + gl_msvc_inval_ensure_handler (); +#endif + + /* Prepare a file. */ + { + const char text[] = "hello world"; + int fd = open (filename, O_RDWR | O_CREAT | O_TRUNC, 0600); + ASSERT (fd >= 0); + ASSERT (write (fd, text, sizeof (text)) == sizeof (text)); + ASSERT (close (fd) == 0); + } + + /* Test that fgetc() sets errno if someone else closes the stream + fd behind the back of stdio. */ + { + FILE *fp = fopen (filename, "r"); + ASSERT (fp != NULL); + ASSERT (close (fileno (fp)) == 0); + errno = 0; + ASSERT (fgetc (fp) == EOF); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + + /* Test that fgetc() sets errno if the stream was constructed with + an invalid file descriptor. */ + { + FILE *fp = fdopen (-1, "r"); + if (fp != NULL) + { + errno = 0; + ASSERT (fgetc (fp) == EOF); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + } + { + FILE *fp; + close (99); + fp = fdopen (99, "r"); + if (fp != NULL) + { + errno = 0; + ASSERT (fgetc (fp) == EOF); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + } + + /* Clean up. */ + unlink (filename); + + return 0; +} diff --git a/tests/test-float.c b/tests/test-float.c new file mode 100644 index 0000000..28a67bb --- /dev/null +++ b/tests/test-float.c @@ -0,0 +1,384 @@ +/* Test of substitute. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2011. */ + +#include + +#include + +#include "fpucw.h" +#include "macros.h" + +/* Check that FLT_RADIX is a constant expression. */ +int a[] = { FLT_RADIX }; + +#if FLT_RADIX == 2 + +/* Return 2^n. */ +static float +pow2f (int n) +{ + int k = n; + volatile float x = 1; + volatile float y = 2; + /* Invariant: 2^n == x * y^k. */ + if (k < 0) + { + y = 0.5f; + k = - k; + } + while (k > 0) + { + if (k != 2 * (k / 2)) + { + x = x * y; + k = k - 1; + } + if (k == 0) + break; + y = y * y; + k = k / 2; + } + /* Now k == 0, hence x == 2^n. */ + return x; +} + +/* Return 2^n. */ +static double +pow2d (int n) +{ + int k = n; + volatile double x = 1; + volatile double y = 2; + /* Invariant: 2^n == x * y^k. */ + if (k < 0) + { + y = 0.5; + k = - k; + } + while (k > 0) + { + if (k != 2 * (k / 2)) + { + x = x * y; + k = k - 1; + } + if (k == 0) + break; + y = y * y; + k = k / 2; + } + /* Now k == 0, hence x == 2^n. */ + return x; +} + +/* Return 2^n. */ +static long double +pow2l (int n) +{ + int k = n; + volatile long double x = 1; + volatile long double y = 2; + /* Invariant: 2^n == x * y^k. */ + if (k < 0) + { + y = 0.5L; + k = - k; + } + while (k > 0) + { + if (k != 2 * (k / 2)) + { + x = x * y; + k = k - 1; + } + if (k == 0) + break; + y = y * y; + k = k / 2; + } + /* Now k == 0, hence x == 2^n. */ + return x; +} + +/* ----------------------- Check macros for 'float' ----------------------- */ + +/* Check that the FLT_* macros expand to constant expressions. */ +int fb[] = + { + FLT_MANT_DIG, FLT_MIN_EXP, FLT_MAX_EXP, + FLT_DIG, FLT_MIN_10_EXP, FLT_MAX_10_EXP + }; +float fc[] = { FLT_EPSILON, FLT_MIN, FLT_MAX }; + +static void +test_float (void) +{ + /* Check that the value of FLT_MIN_EXP is well parenthesized. */ + ASSERT ((FLT_MIN_EXP % 101111) == (FLT_MIN_EXP) % 101111); + + /* Check that the value of DBL_MIN_10_EXP is well parenthesized. */ + ASSERT ((FLT_MIN_10_EXP % 101111) == (FLT_MIN_10_EXP) % 101111); + + /* Check that 'float' is as specified in IEEE 754. */ + ASSERT (FLT_MANT_DIG == 24); + ASSERT (FLT_MIN_EXP == -125); + ASSERT (FLT_MAX_EXP == 128); + + /* Check the value of FLT_MIN_10_EXP. */ + ASSERT (FLT_MIN_10_EXP == - (int) (- (FLT_MIN_EXP - 1) * 0.30103)); + + /* Check the value of FLT_DIG. */ + ASSERT (FLT_DIG == (int) ((FLT_MANT_DIG - 1) * 0.30103)); + + /* Check the value of FLT_MIN_10_EXP. */ + ASSERT (FLT_MIN_10_EXP == - (int) (- (FLT_MIN_EXP - 1) * 0.30103)); + + /* Check the value of FLT_MAX_10_EXP. */ + ASSERT (FLT_MAX_10_EXP == (int) (FLT_MAX_EXP * 0.30103)); + + /* Check the value of FLT_MAX. */ + { + volatile float m = FLT_MAX; + int n; + + ASSERT (m + m > m); + for (n = 0; n <= 2 * FLT_MANT_DIG; n++) + { + volatile float pow2_n = pow2f (n); /* 2^n */ + volatile float x = m + (m / pow2_n); + if (x > m) + ASSERT (x + x == x); + else + ASSERT (!(x + x == x)); + } + } + + /* Check the value of FLT_MIN. */ + { + volatile float m = FLT_MIN; + volatile float x = pow2f (FLT_MIN_EXP - 1); + ASSERT (m == x); + } + + /* Check the value of FLT_EPSILON. */ + { + volatile float e = FLT_EPSILON; + volatile float me; + int n; + + me = 1.0f + e; + ASSERT (me > 1.0f); + ASSERT (me - 1.0f == e); + for (n = 0; n <= 2 * FLT_MANT_DIG; n++) + { + volatile float half_n = pow2f (- n); /* 2^-n */ + volatile float x = me - half_n; + if (x < me) + ASSERT (x <= 1.0f); + } + } +} + +/* ----------------------- Check macros for 'double' ----------------------- */ + +/* Check that the DBL_* macros expand to constant expressions. */ +int db[] = + { + DBL_MANT_DIG, DBL_MIN_EXP, DBL_MAX_EXP, + DBL_DIG, DBL_MIN_10_EXP, DBL_MAX_10_EXP + }; +double dc[] = { DBL_EPSILON, DBL_MIN, DBL_MAX }; + +static void +test_double (void) +{ + /* Check that the value of DBL_MIN_EXP is well parenthesized. */ + ASSERT ((DBL_MIN_EXP % 101111) == (DBL_MIN_EXP) % 101111); + + /* Check that the value of DBL_MIN_10_EXP is well parenthesized. */ + ASSERT ((DBL_MIN_10_EXP % 101111) == (DBL_MIN_10_EXP) % 101111); + + /* Check that 'double' is as specified in IEEE 754. */ + ASSERT (DBL_MANT_DIG == 53); + ASSERT (DBL_MIN_EXP == -1021); + ASSERT (DBL_MAX_EXP == 1024); + + /* Check the value of DBL_MIN_10_EXP. */ + ASSERT (DBL_MIN_10_EXP == - (int) (- (DBL_MIN_EXP - 1) * 0.30103)); + + /* Check the value of DBL_DIG. */ + ASSERT (DBL_DIG == (int) ((DBL_MANT_DIG - 1) * 0.30103)); + + /* Check the value of DBL_MIN_10_EXP. */ + ASSERT (DBL_MIN_10_EXP == - (int) (- (DBL_MIN_EXP - 1) * 0.30103)); + + /* Check the value of DBL_MAX_10_EXP. */ + ASSERT (DBL_MAX_10_EXP == (int) (DBL_MAX_EXP * 0.30103)); + + /* Check the value of DBL_MAX. */ + { + volatile double m = DBL_MAX; + int n; + + ASSERT (m + m > m); + for (n = 0; n <= 2 * DBL_MANT_DIG; n++) + { + volatile double pow2_n = pow2d (n); /* 2^n */ + volatile double x = m + (m / pow2_n); + if (x > m) + ASSERT (x + x == x); + else + ASSERT (!(x + x == x)); + } + } + + /* Check the value of DBL_MIN. */ + { + volatile double m = DBL_MIN; + volatile double x = pow2d (DBL_MIN_EXP - 1); + ASSERT (m == x); + } + + /* Check the value of DBL_EPSILON. */ + { + volatile double e = DBL_EPSILON; + volatile double me; + int n; + + me = 1.0 + e; + ASSERT (me > 1.0); + ASSERT (me - 1.0 == e); + for (n = 0; n <= 2 * DBL_MANT_DIG; n++) + { + volatile double half_n = pow2d (- n); /* 2^-n */ + volatile double x = me - half_n; + if (x < me) + ASSERT (x <= 1.0); + } + } +} + +/* -------------------- Check macros for 'long double' -------------------- */ + +/* Check that the LDBL_* macros expand to constant expressions. */ +int lb[] = + { + LDBL_MANT_DIG, LDBL_MIN_EXP, LDBL_MAX_EXP, + LDBL_DIG, LDBL_MIN_10_EXP, LDBL_MAX_10_EXP + }; +long double lc1 = LDBL_EPSILON; +long double lc2 = LDBL_MIN; +#if 0 /* LDBL_MAX is not a constant expression on some platforms. */ +long double lc3 = LDBL_MAX; +#endif + +static void +test_long_double (void) +{ + /* Check that the value of LDBL_MIN_EXP is well parenthesized. */ + ASSERT ((LDBL_MIN_EXP % 101111) == (LDBL_MIN_EXP) % 101111); + + /* Check that the value of LDBL_MIN_10_EXP is well parenthesized. */ + ASSERT ((LDBL_MIN_10_EXP % 101111) == (LDBL_MIN_10_EXP) % 101111); + + /* Check that 'long double' is at least as wide as 'double'. */ + ASSERT (LDBL_MANT_DIG >= DBL_MANT_DIG); + ASSERT (LDBL_MIN_EXP - LDBL_MANT_DIG <= DBL_MIN_EXP - DBL_MANT_DIG); + ASSERT (LDBL_MAX_EXP >= DBL_MAX_EXP); + + /* Check the value of LDBL_DIG. */ + ASSERT (LDBL_DIG == (int)((LDBL_MANT_DIG - 1) * 0.30103)); + + /* Check the value of LDBL_MIN_10_EXP. */ + ASSERT (LDBL_MIN_10_EXP == - (int) (- (LDBL_MIN_EXP - 1) * 0.30103)); + + /* Check the value of LDBL_MAX_10_EXP. */ + ASSERT (LDBL_MAX_10_EXP == (int) (LDBL_MAX_EXP * 0.30103)); + + /* Check the value of LDBL_MAX. */ + { + volatile long double m = LDBL_MAX; + int n; + + ASSERT (m + m > m); + for (n = 0; n <= 2 * LDBL_MANT_DIG; n++) + { + volatile long double pow2_n = pow2l (n); /* 2^n */ + volatile long double x = m + (m / pow2_n); + if (x > m) + ASSERT (x + x == x); + else + ASSERT (!(x + x == x)); + } + } + + /* Check the value of LDBL_MIN. */ + { + volatile long double m = LDBL_MIN; + volatile long double x = pow2l (LDBL_MIN_EXP - 1); + ASSERT (m == x); + } + + /* Check the value of LDBL_EPSILON. */ + { + volatile long double e = LDBL_EPSILON; + volatile long double me; + int n; + + me = 1.0L + e; + ASSERT (me > 1.0L); + ASSERT (me - 1.0L == e); + for (n = 0; n <= 2 * LDBL_MANT_DIG; n++) + { + volatile long double half_n = pow2l (- n); /* 2^-n */ + volatile long double x = me - half_n; + if (x < me) + ASSERT (x <= 1.0L); + } + } +} + +int +main () +{ + test_float (); + test_double (); + + { + DECL_LONG_DOUBLE_ROUNDING + + BEGIN_LONG_DOUBLE_ROUNDING (); + + test_long_double (); + + END_LONG_DOUBLE_ROUNDING (); + } + + return 0; +} + +#else + +int +main () +{ + fprintf (stderr, "Skipping test: FLT_RADIX is not 2.\n"); + return 77; +} + +#endif diff --git a/tests/test-fnmatch.c b/tests/test-fnmatch.c index 66f9b1c..de94559 100644 --- a/tests/test-fnmatch.c +++ b/tests/test-fnmatch.c @@ -1,5 +1,5 @@ /* Test of fnmatch string matching function. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,5 +46,11 @@ main () ASSERT (res = fnmatch ("foo\\.txt", "foo.txt", 0) == 0); ASSERT (res = fnmatch ("foo\\.txt", "foo.txt", FNM_NOESCAPE) == FNM_NOMATCH); + /* Verify that an unmatched [ is treated as a literal, as POSIX + requires. This test ensures that glibc Bugzilla bug #12378 stays + fixed. + */ + ASSERT (res = fnmatch ("[/b", "[/b", 0) == 0); + return 0; } diff --git a/tests/test-fopen-safer.c b/tests/test-fopen-safer.c index 20a0c13..36f865a 100644 --- a/tests/test-fopen-safer.c +++ b/tests/test-fopen-safer.c @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-fopen.c b/tests/test-fopen.c index c36006a..e1cb123 100644 --- a/tests/test-fopen.c +++ b/tests/test-fopen.c @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-fopen.h b/tests/test-fopen.h index 49cbac1..f87bb2e 100644 --- a/tests/test-fopen.h +++ b/tests/test-fopen.h @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-fpending.c b/tests/test-fpending.c index edf1aa2..fc16be4 100644 --- a/tests/test-fpending.c +++ b/tests/test-fpending.c @@ -1,6 +1,6 @@ /* Ensure that __fpending works. - Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2014 Free Software Foundation, Inc. This 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/tests/test-fpurge.c b/tests/test-fpurge.c index 0f36221..3f5d15b 100644 --- a/tests/test-fpurge.c +++ b/tests/test-fpurge.c @@ -1,5 +1,5 @@ /* Test of fpurge() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-fputc.c b/tests/test-fputc.c new file mode 100644 index 0000000..befb582 --- /dev/null +++ b/tests/test-fputc.c @@ -0,0 +1,91 @@ +/* Test of fputc() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (fputc, int, (int, FILE *)); + +#include +#include +#include + +#include "msvc-inval.h" + +#include "macros.h" + +int +main (int argc, char **argv) +{ + const char *filename = "test-fputc.txt"; + + /* We don't have an fputc() function that installs an invalid parameter + handler so far. So install that handler here, explicitly. */ +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ + && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING + gl_msvc_inval_ensure_handler (); +#endif + + /* Test that fputc() on an unbuffered stream sets errno if someone else + closes the stream fd behind the back of stdio. */ + { + FILE *fp = fopen (filename, "w"); + ASSERT (fp != NULL); + setvbuf (fp, NULL, _IONBF, 0); + ASSERT (close (fileno (fp)) == 0); + errno = 0; + ASSERT (fputc ('x', fp) == EOF); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + + /* Test that fputc() on an unbuffered stream sets errno if the stream + was constructed with an invalid file descriptor. */ + { + FILE *fp = fdopen (-1, "w"); + if (fp != NULL) + { + setvbuf (fp, NULL, _IONBF, 0); + errno = 0; + ASSERT (fputc ('x', fp) == EOF); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + } + { + FILE *fp; + close (99); + fp = fdopen (99, "w"); + if (fp != NULL) + { + setvbuf (fp, NULL, _IONBF, 0); + errno = 0; + ASSERT (fputc ('x', fp) == EOF); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + } + + /* Clean up. */ + unlink (filename); + + return 0; +} diff --git a/tests/test-fread.c b/tests/test-fread.c new file mode 100644 index 0000000..72b93a9 --- /dev/null +++ b/tests/test-fread.c @@ -0,0 +1,100 @@ +/* Test of fread() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (fread, size_t, (void *, size_t, size_t, FILE *)); + +#include +#include +#include + +#include "msvc-inval.h" + +#include "macros.h" + +int +main (int argc, char **argv) +{ + const char *filename = "test-fread.txt"; + + /* We don't have an fread() function that installs an invalid parameter + handler so far. So install that handler here, explicitly. */ +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ + && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING + gl_msvc_inval_ensure_handler (); +#endif + + /* Prepare a file. */ + { + const char text[] = "hello world"; + int fd = open (filename, O_RDWR | O_CREAT | O_TRUNC, 0600); + ASSERT (fd >= 0); + ASSERT (write (fd, text, sizeof (text)) == sizeof (text)); + ASSERT (close (fd) == 0); + } + + /* Test that fread() sets errno if someone else closes the stream + fd behind the back of stdio. */ + { + FILE *fp = fopen (filename, "r"); + char buf[5]; + ASSERT (fp != NULL); + ASSERT (close (fileno (fp)) == 0); + errno = 0; + ASSERT (fread (buf, 1, sizeof (buf), fp) == 0); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + + /* Test that fread() sets errno if the stream was constructed with + an invalid file descriptor. */ + { + FILE *fp = fdopen (-1, "r"); + if (fp != NULL) + { + char buf[1]; + errno = 0; + ASSERT (fread (buf, 1, 1, fp) == 0); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + } + { + FILE *fp; + close (99); + fp = fdopen (99, "r"); + if (fp != NULL) + { + char buf[1]; + errno = 0; + ASSERT (fread (buf, 1, 1, fp) == 0); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + } + + /* Clean up. */ + unlink (filename); + + return 0; +} diff --git a/tests/test-freadahead.c b/tests/test-freadahead.c index 23dd21c..f50c54e 100644 --- a/tests/test-freadahead.c +++ b/tests/test-freadahead.c @@ -1,5 +1,5 @@ /* Test of freadahead() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-freading.c b/tests/test-freading.c index 723de4d..7ca26ed 100644 --- a/tests/test-freading.c +++ b/tests/test-freading.c @@ -1,5 +1,5 @@ /* Test of freading() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-fseek.c b/tests/test-fseek.c new file mode 100644 index 0000000..81ebb1c --- /dev/null +++ b/tests/test-fseek.c @@ -0,0 +1,70 @@ +/* Test of fseek() function. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +/* None of the files accessed by this test are large, so disable the + fseek link warning if the user requested GNULIB_POSIXCHECK. */ +#define _GL_NO_LARGE_FILES +#include + +#include "signature.h" +SIGNATURE_CHECK (fseek, int, (FILE *, long, int)); + +#include "macros.h" + +#ifndef FUNC_UNGETC_BROKEN +# define FUNC_UNGETC_BROKEN 0 +#endif + +int +main (int argc, char **argv) +{ + /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh' + iff argc > 1. */ + int expected = argc > 1 ? 0 : -1; + ASSERT (fseek (stdin, 0, SEEK_CUR) == expected); + if (argc > 1) + { + /* Test that fseek discards previously read ungetc data. */ + int ch = fgetc (stdin); + ASSERT (ch == '#'); + ASSERT (ungetc (ch, stdin) == ch); + ASSERT (fseek (stdin, 2, SEEK_SET) == 0); + ch = fgetc (stdin); + ASSERT (ch == '/'); + if (2 < argc) + { + if (FUNC_UNGETC_BROKEN) + { + fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n", + stderr); + return 77; + } + /* Test that fseek discards random ungetc data. */ + ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff)); + } + ASSERT (fseek (stdin, 0, SEEK_END) == 0); + ASSERT (fgetc (stdin) == EOF); + /* Test that fseek resets end-of-file marker. */ + ASSERT (feof (stdin)); + ASSERT (fseek (stdin, 0, SEEK_END) == 0); + ASSERT (!feof (stdin)); + } + return 0; +} diff --git a/tests/test-fseek.sh b/tests/test-fseek.sh new file mode 100755 index 0000000..bad6c08 --- /dev/null +++ b/tests/test-fseek.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +./test-fseek${EXEEXT} 1 < "$srcdir/test-fseek.sh" || exit 1 +echo hi | ./test-fseek${EXEEXT} || exit 1 +exit 0 diff --git a/tests/test-fseek2.sh b/tests/test-fseek2.sh new file mode 100755 index 0000000..a4c9cb7 --- /dev/null +++ b/tests/test-fseek2.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec ./test-fseek${EXEEXT} 1 2 < "$srcdir/test-fseek2.sh" diff --git a/tests/test-fseeko.c b/tests/test-fseeko.c index ad5eec8..ae9ccef 100644 --- a/tests/test-fseeko.c +++ b/tests/test-fseeko.c @@ -1,5 +1,5 @@ /* Test of fseeko() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-fseeko3.c b/tests/test-fseeko3.c new file mode 100644 index 0000000..e92c9a1 --- /dev/null +++ b/tests/test-fseeko3.c @@ -0,0 +1,51 @@ +/* Test of fseeko() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake , 2011. */ + +#include + +#include + +#include + +#include "macros.h" + +int +main (int argc, char **argv) +{ + int do_initial_ftell = atoi (argv[1]); + const char *filename = argv[2]; + FILE *fp = fopen (filename, "r"); + ASSERT (fp != NULL); + + if (do_initial_ftell) + { + off_t pos = ftell (fp); + ASSERT (pos == 0); + } + + ASSERT (fseeko (fp, 0, SEEK_END) == 0); + + { + off_t pos = ftell (fp); + ASSERT (pos > 0); + } + + ASSERT (fclose (fp) == 0); + + return 0; +} diff --git a/tests/test-fseeko3.sh b/tests/test-fseeko3.sh new file mode 100755 index 0000000..c50b4a2 --- /dev/null +++ b/tests/test-fseeko3.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +./test-fseeko3${EXEEXT} 0 "$srcdir/test-fseeko3.sh" || exit 1 + +./test-fseeko3${EXEEXT} 1 "$srcdir/test-fseeko3.sh" || exit 1 + +exit 0 diff --git a/tests/test-fseeko4.c b/tests/test-fseeko4.c new file mode 100644 index 0000000..6559ad9 --- /dev/null +++ b/tests/test-fseeko4.c @@ -0,0 +1,73 @@ +/* Test of fseeko() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include +#include + +#include "macros.h" + +int +main (int argc, char **argv) +{ + const char *filename = argv[1]; + + /* Test that fseeko() sets errno if someone else closes the stream + fd behind the back of stdio. */ + { + FILE *fp = fopen (filename, "r"); + ASSERT (fp != NULL); + setvbuf (fp, NULL, _IONBF, 0); + ASSERT (ftell (fp) == 0); + ASSERT (fseeko (fp, 0, SEEK_END) == 0); + ASSERT (ftell (fp) > 0); + ASSERT (close (fileno (fp)) == 0); + errno = 0; + ASSERT (fseeko (fp, 0, SEEK_SET) == -1); + ASSERT (errno == EBADF); + fclose (fp); + } + + /* Test that fseeko() sets errno if the stream was constructed with + an invalid file descriptor. */ + { + FILE *fp = fdopen (-1, "w"); + if (fp != NULL) + { + errno = 0; + ASSERT (fseeko (fp, 0, SEEK_END) == -1); + ASSERT (errno == EBADF); + fclose (fp); + } + } + { + FILE *fp; + close (99); + fp = fdopen (99, "w"); + if (fp != NULL) + { + errno = 0; + ASSERT (fseeko (fp, 0, SEEK_END) == -1); + ASSERT (errno == EBADF); + fclose (fp); + } + } + + return 0; +} diff --git a/tests/test-fseeko4.sh b/tests/test-fseeko4.sh new file mode 100755 index 0000000..e6464ae --- /dev/null +++ b/tests/test-fseeko4.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +./test-fseeko4${EXEEXT} "$srcdir/test-fseeko4.sh" || exit 1 + +exit 0 diff --git a/tests/test-fstat.c b/tests/test-fstat.c new file mode 100644 index 0000000..9b793c9 --- /dev/null +++ b/tests/test-fstat.c @@ -0,0 +1,50 @@ +/* Tests of fstat() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (fstat, int, (int, struct stat *)); + +#include +#include + +#include "macros.h" + +int +main (int argc, char *argv[]) +{ + /* Test behaviour for invalid file descriptors. */ + { + struct stat statbuf; + + errno = 0; + ASSERT (fstat (-1, &statbuf) == -1); + ASSERT (errno == EBADF); + } + { + struct stat statbuf; + + close (99); + errno = 0; + ASSERT (fstat (99, &statbuf) == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff --git a/tests/test-fstatat.c b/tests/test-fstatat.c index 839dad6..2b1acb7 100644 --- a/tests/test-fstatat.c +++ b/tests/test-fstatat.c @@ -1,5 +1,5 @@ /* Tests of fstatat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,12 +31,14 @@ SIGNATURE_CHECK (fstatat, int, (int, char const *, struct stat *, int)); #include #include "openat.h" -#include "pathmax.h" +#include "progname.h" #include "same-inode.h" #include "ignore-value.h" #include "macros.h" -#define BASE "test-fstatat.t" +#ifndef BASE +# define BASE "test-fstatat.t" +#endif #include "test-lstat.h" #include "test-stat.h" @@ -47,24 +49,51 @@ static int dfd = AT_FDCWD; static int do_stat (char const *name, struct stat *st) { +#ifdef TEST_STATAT return statat (dfd, name, st); +#else + return fstatat (dfd, name, st, 0); +#endif } /* Wrapper around fstatat to test lstat behavior. */ static int do_lstat (char const *name, struct stat *st) { +#ifdef TEST_STATAT return lstatat (dfd, name, st); +#else + return fstatat (dfd, name, st, AT_SYMLINK_NOFOLLOW); +#endif } int -main (void) +main (int argc _GL_UNUSED, char *argv[]) { int result; + set_program_name (argv[0]); + /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*")); + /* Test behaviour for invalid file descriptors. */ + { + struct stat statbuf; + + errno = 0; + ASSERT (fstatat (-1, "foo", &statbuf, 0) == -1); + ASSERT (errno == EBADF); + } + { + struct stat statbuf; + + close (99); + errno = 0; + ASSERT (fstatat (99, "foo", &statbuf, 0) == -1); + ASSERT (errno == EBADF); + } + result = test_stat_func (do_stat, false); ASSERT (test_lstat_func (do_lstat, false) == result); dfd = open (".", O_RDONLY); diff --git a/tests/test-ftell.c b/tests/test-ftell.c index 54ede05..2b7120d 100644 --- a/tests/test-ftell.c +++ b/tests/test-ftell.c @@ -1,5 +1,5 @@ /* Test of ftell() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-ftell3.c b/tests/test-ftell3.c index a5167ef..918c9e4 100644 --- a/tests/test-ftell3.c +++ b/tests/test-ftell3.c @@ -1,5 +1,5 @@ /* Test of ftell() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-ftello.c b/tests/test-ftello.c index 636da81..6f3597b 100644 --- a/tests/test-ftello.c +++ b/tests/test-ftello.c @@ -1,5 +1,5 @@ /* Test of ftello() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-ftello3.c b/tests/test-ftello3.c index 50d4b88..6918432 100644 --- a/tests/test-ftello3.c +++ b/tests/test-ftello3.c @@ -1,5 +1,5 @@ /* Test of ftello() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-ftello4.c b/tests/test-ftello4.c new file mode 100644 index 0000000..ef9e74b --- /dev/null +++ b/tests/test-ftello4.c @@ -0,0 +1,70 @@ +/* Test of ftello() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include +#include + +#include "macros.h" + +int +main (int argc, char **argv) +{ + const char *filename = argv[1]; + + /* Test that ftello() sets errno if someone else closes the stream + fd behind the back of stdio. */ + { + FILE *fp = fopen (filename, "r"); + ASSERT (fp != NULL); + setvbuf (fp, NULL, _IONBF, 0); + ASSERT (close (fileno (fp)) == 0); + errno = 0; + ASSERT (ftello (fp) == (off_t)-1); + ASSERT (errno == EBADF); + fclose (fp); + } + + /* Test that ftello() sets errno if the stream was constructed with + an invalid file descriptor. */ + { + FILE *fp = fdopen (-1, "w"); + if (fp != NULL) + { + errno = 0; + ASSERT (ftello (fp) == (off_t)-1); + ASSERT (errno == EBADF); + fclose (fp); + } + } + { + FILE *fp; + close (99); + fp = fdopen (99, "w"); + if (fp != NULL) + { + errno = 0; + ASSERT (ftello (fp) == (off_t)-1); + ASSERT (errno == EBADF); + fclose (fp); + } + } + + return 0; +} diff --git a/tests/test-ftello4.sh b/tests/test-ftello4.sh new file mode 100755 index 0000000..e3702bb --- /dev/null +++ b/tests/test-ftello4.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +./test-ftello4${EXEEXT} "$srcdir/test-ftello4.sh" || exit 1 + +exit 0 diff --git a/tests/test-ftruncate.c b/tests/test-ftruncate.c new file mode 100644 index 0000000..ae15411 --- /dev/null +++ b/tests/test-ftruncate.c @@ -0,0 +1,60 @@ +/* Test truncating a file. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (ftruncate, int, (int, off_t)); + +#include +#include + +#include "macros.h" + +int +main (int argc, char *argv[]) +{ + const char *filename = argv[1]; + + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (ftruncate (-1, 0) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (ftruncate (99, 0) == -1); + ASSERT (errno == EBADF); + } + + /* Test behaviour for read-only file descriptors. */ + { + int fd = open (filename, O_RDONLY); + ASSERT (fd >= 0); + errno = 0; + ASSERT (ftruncate (fd, 0) == -1); + ASSERT (errno == EBADF || errno == EINVAL + || errno == EACCES /* seen on mingw */ + ); + close (fd); + } + + return 0; +} diff --git a/tests/test-ftruncate.sh b/tests/test-ftruncate.sh new file mode 100755 index 0000000..d7394d2 --- /dev/null +++ b/tests/test-ftruncate.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec ./test-ftruncate${EXEEXT} "$srcdir/test-ftruncate.sh" diff --git a/tests/test-fwrite.c b/tests/test-fwrite.c new file mode 100644 index 0000000..e51b2ab --- /dev/null +++ b/tests/test-fwrite.c @@ -0,0 +1,94 @@ +/* Test of fwrite() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (fwrite, size_t, (const void *, size_t, size_t, FILE *)); + +#include +#include +#include + +#include "msvc-inval.h" + +#include "macros.h" + +int +main (int argc, char **argv) +{ + const char *filename = "test-fwrite.txt"; + + /* We don't have an fwrite() function that installs an invalid parameter + handler so far. So install that handler here, explicitly. */ +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \ + && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING + gl_msvc_inval_ensure_handler (); +#endif + + /* Test that fwrite() on an unbuffered stream sets errno if someone else + closes the stream fd behind the back of stdio. */ + { + FILE *fp = fopen (filename, "w"); + char buf[5] = "world"; + ASSERT (fp != NULL); + setvbuf (fp, NULL, _IONBF, 0); + ASSERT (close (fileno (fp)) == 0); + errno = 0; + ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + + /* Test that fwrite() on an unbuffered stream sets errno if the stream + was constructed with an invalid file descriptor. */ + { + FILE *fp = fdopen (-1, "w"); + if (fp != NULL) + { + char buf[5] = "world"; + setvbuf (fp, NULL, _IONBF, 0); + errno = 0; + ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + } + { + FILE *fp; + close (99); + fp = fdopen (99, "w"); + if (fp != NULL) + { + char buf[5] = "world"; + setvbuf (fp, NULL, _IONBF, 0); + errno = 0; + ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0); + ASSERT (errno == EBADF); + ASSERT (ferror (fp)); + fclose (fp); + } + } + + /* Clean up. */ + unlink (filename); + + return 0; +} diff --git a/tests/test-getcwd-lgpl.c b/tests/test-getcwd-lgpl.c new file mode 100644 index 0000000..371c8df --- /dev/null +++ b/tests/test-getcwd-lgpl.c @@ -0,0 +1,102 @@ +/* Test of getcwd() function. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (getcwd, char *, (char *, size_t)); + +#include +#include +#include +#include + +#include "macros.h" + +int +main (int argc, char **argv) +{ + char *pwd1; + char *pwd2; + /* If the user provides an argument, attempt to chdir there first. */ + if (1 < argc) + { + if (chdir (argv[1]) == 0) + printf ("changed to directory %s\n", argv[1]); + } + + pwd1 = getcwd (NULL, 0); + ASSERT (pwd1 && *pwd1); + if (1 < argc) + printf ("cwd=%s\n", pwd1); + + /* Make sure the result is usable. */ + ASSERT (chdir (pwd1) == 0); + ASSERT (chdir (".//./.") == 0); + + /* Make sure that result is normalized. */ + pwd2 = getcwd (NULL, 0); + ASSERT (pwd2); + ASSERT (strcmp (pwd1, pwd2) == 0); + free (pwd2); + { + size_t len = strlen (pwd1); + ssize_t i = len - 10; + if (i < 1) + i = 1; + pwd2 = getcwd (NULL, len + 1); + ASSERT (pwd2); + free (pwd2); + pwd2 = malloc (len + 2); + for ( ; i <= len; i++) + { + char *tmp; + errno = 0; + ASSERT (getcwd (pwd2, i) == NULL); + ASSERT (errno == ERANGE); + /* Allow either glibc or BSD behavior, since POSIX allows both. */ + errno = 0; + tmp = getcwd (NULL, i); + if (tmp) + { + ASSERT (strcmp (pwd1, tmp) == 0); + free (tmp); + } + else + { + ASSERT (errno == ERANGE); + } + } + ASSERT (getcwd (pwd2, len + 1) == pwd2); + pwd2[len] = '/'; + pwd2[len + 1] = '\0'; + } + ASSERT (strstr (pwd2, "/./") == NULL); + ASSERT (strstr (pwd2, "/../") == NULL); + ASSERT (strstr (pwd2 + 1 + (pwd2[1] == '/'), "//") == NULL); + + /* Validate a POSIX requirement on size. */ + errno = 0; + ASSERT (getcwd(pwd2, 0) == NULL); + ASSERT (errno == EINVAL); + + free (pwd1); + free (pwd2); + + return 0; +} diff --git a/tests/test-getcwd.c b/tests/test-getcwd.c index 18fc74f..2ddcd20 100644 --- a/tests/test-getcwd.c +++ b/tests/test-getcwd.c @@ -1,5 +1,5 @@ /* Test of getcwd() function. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,59 +18,229 @@ #include -#include "signature.h" -SIGNATURE_CHECK (getcwd, char *, (char *, size_t)); - +#include +#include +#include #include #include #include +#include +#include "pathmax.h" #include "macros.h" -int -main (int argc, char **argv) +#if ! HAVE_GETPAGESIZE +# define getpagesize() 0 +#endif + +/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than + the 16kB pagesize on ia64 linux. Those conditions make the code below + trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ +#define TARGET_LEN (5 * 1024) + +#if defined HAVE_OPENAT || (defined GNULIB_OPENAT && defined HAVE_FDOPENDIR) +# define HAVE_OPENAT_SUPPORT 1 +#else +# define HAVE_OPENAT_SUPPORT 0 +#endif + +/* Keep this test in sync with m4/getcwd-abort-bug.m4. */ +static int +test_abort_bug (void) { - char *pwd1; - char *pwd2; - /* If the user provides an argument, attempt to chdir there first. */ - if (1 < argc) + char *cwd; + size_t initial_cwd_len; + int fail = 0; + + /* The bug is triggered when PATH_MAX < getpagesize (), so skip + this relatively expensive and invasive test if that's not true. */ +#ifdef PATH_MAX + int bug_possible = PATH_MAX < getpagesize (); +#else + int bug_possible = 0; +#endif + if (! bug_possible) + return 0; + + cwd = getcwd (NULL, 0); + if (cwd == NULL) + return 2; + + initial_cwd_len = strlen (cwd); + free (cwd); + + if (HAVE_OPENAT_SUPPORT) { - if (chdir (argv[1]) == 0) - printf ("changed to directory %s\n", argv[1]); + static char const dir_name[] = "confdir-14B---"; + size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) + / sizeof dir_name); + size_t d; + for (d = 0; d < desired_depth; d++) + { + if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) + { + if (! (errno == ERANGE || errno == ENAMETOOLONG + || errno == ENOENT)) + fail = 3; /* Unable to construct deep hierarchy. */ + break; + } + } + + /* If libc has the bug in question, this invocation of getcwd + results in a failed assertion. */ + cwd = getcwd (NULL, 0); + if (cwd == NULL) + fail = 4; /* getcwd didn't assert, but it failed for a long name + where the answer could have been learned. */ + free (cwd); + + /* Call rmdir first, in case the above chdir failed. */ + rmdir (dir_name); + while (0 < d--) + { + if (chdir ("..") < 0) + { + fail = 5; + break; + } + rmdir (dir_name); + } } - pwd1 = getcwd (NULL, 0); - ASSERT (pwd1 && *pwd1); - if (1 < argc) - printf ("cwd=%s\n", pwd1); + return fail; +} + +/* The length of this name must be 8. */ +#define DIR_NAME "confdir3" +#define DIR_NAME_LEN 8 +#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) + +/* The length of "../". */ +#define DOTDOTSLASH_LEN 3 + +/* Leftover bytes in the buffer, to work around library or OS bugs. */ +#define BUF_SLOP 20 + +/* Keep this test in sync with m4/getcwd-path-max.m4. */ +static int +test_long_name (void) +{ +#ifndef PATH_MAX + /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- + at least not on a local file system. And if we were to start worrying + about remote file systems, we'd have to enable the wrapper function + all of the time, just to be safe. That's not worth the cost. */ + return 0; +#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ + - DIR_NAME_SIZE - BUF_SLOP) \ + <= PATH_MAX) + /* FIXME: Assuming there's a system for which this is true, + this should be done in a compile test. */ + return 0; +#else + char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) + + DIR_NAME_SIZE + BUF_SLOP]; + char *cwd = getcwd (buf, PATH_MAX); + size_t initial_cwd_len; + size_t cwd_len; + int fail = 0; + size_t n_chdirs = 0; + + if (cwd == NULL) + return 1; + + cwd_len = initial_cwd_len = strlen (cwd); + + while (1) + { + size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); + char *c = NULL; + + cwd_len += DIR_NAME_SIZE; + /* If mkdir or chdir fails, it could be that this system cannot create + any file with an absolute name longer than PATH_MAX, such as cygwin. + If so, leave fail as 0, because the current working directory can't + be too long for getcwd if it can't even be created. For other + errors, be pessimistic and consider that as a failure, too. */ + if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) + { + if (! (errno == ERANGE || errno == ENAMETOOLONG || errno == ENOENT)) + fail = 2; + break; + } + + if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) + { + c = getcwd (buf, PATH_MAX); + if (!c && errno == ENOENT) + { + fail = 3; + break; + } + if (c) + { + fail = 4; + break; + } + if (! (errno == ERANGE || errno == ENAMETOOLONG)) + { + fail = 5; + break; + } + } - /* Make sure the result is usable. */ - ASSERT (chdir (pwd1) == 0); - ASSERT (chdir ("././.") == 0); + if (dotdot_max <= cwd_len - initial_cwd_len) + { + if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) + break; + c = getcwd (buf, cwd_len + 1); + if (!c) + { + if (! (errno == ERANGE || errno == ENOENT + || errno == ENAMETOOLONG)) + { + fail = 6; + break; + } + if (AT_FDCWD || errno == ERANGE || errno == ENOENT) + { + fail = 7; + break; + } + } + } - /* Make sure that result is normalized. */ - pwd2 = getcwd (NULL, 0); - ASSERT (pwd2); - ASSERT (strcmp (pwd1, pwd2) == 0); - free (pwd2); + if (c && strlen (c) != cwd_len) + { + fail = 8; + break; + } + ++n_chdirs; + } + + /* Leaving behind such a deep directory is not polite. + So clean up here, right away, even though the driving + shell script would also clean up. */ { - size_t len = strlen (pwd1); - ssize_t i = len - 10; - if (i < 0) - i = 0; - pwd2 = malloc (len + 2); - for ( ; i < len; i++) - ASSERT (getcwd (pwd2, i) == NULL); - pwd2 = getcwd (pwd2, len + 1); - ASSERT (pwd2); - pwd2[len] = '/'; - pwd2[len + 1] = '\0'; + size_t i; + + /* Try rmdir first, in case the chdir failed. */ + rmdir (DIR_NAME); + for (i = 0; i <= n_chdirs; i++) + { + if (chdir ("..") < 0) + break; + if (rmdir (DIR_NAME) != 0) + break; + } } - ASSERT (strstr (pwd2, "/./") == NULL); - ASSERT (strstr (pwd2, "/../") == NULL); - free (pwd1); - free (pwd2); + return fail; +#endif +} - return 0; +int +main (int argc, char **argv) +{ + return test_abort_bug () * 10 + test_long_name (); } diff --git a/tests/test-getcwd.sh b/tests/test-getcwd.sh new file mode 100755 index 0000000..a886b6e --- /dev/null +++ b/tests/test-getcwd.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +. "${srcdir=.}/init.sh"; path_prepend_ . + +test-getcwd + +Exit $? diff --git a/tests/test-getdelim.c b/tests/test-getdelim.c index f4d1c9d..76aba82 100644 --- a/tests/test-getdelim.c +++ b/tests/test-getdelim.c @@ -1,5 +1,5 @@ /* Test of getdelim() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Eric Blake , 2007. */ diff --git a/tests/test-getdtablesize.c b/tests/test-getdtablesize.c index ae969a1..86a0b4f 100644 --- a/tests/test-getdtablesize.c +++ b/tests/test-getdtablesize.c @@ -1,5 +1,5 @@ /* Test of getdtablesize() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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,8 @@ int main (int argc, char *argv[]) { ASSERT (getdtablesize () >= 3); + ASSERT (dup2 (0, getdtablesize() - 1) == getdtablesize () - 1); + ASSERT (dup2 (0, getdtablesize()) == -1); return 0; } diff --git a/tests/test-getgroups.c b/tests/test-getgroups.c index 98f3dd5..0608b60 100644 --- a/tests/test-getgroups.c +++ b/tests/test-getgroups.c @@ -1,5 +1,5 @@ /* Tests of getgroups. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-gethostname.c b/tests/test-gethostname.c new file mode 100644 index 0000000..a6f3fda --- /dev/null +++ b/tests/test-gethostname.c @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2008-2014 Free Software Foundation, Inc. + * Written by Simon Josefsson. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + +#include + +/* Get gethostname() declaration. */ +#include + +#include "signature.h" +SIGNATURE_CHECK (gethostname, int, (char *, size_t)); + +/* Get HOST_NAME_MAX definition. */ +#include + +#include +#include +#include + +#define NOHOSTNAME "magic-gnulib-test-string" + +int +main (int argc, char *argv[] _GL_UNUSED) +{ + char buf[HOST_NAME_MAX]; + int rc; + + if (strlen (NOHOSTNAME) >= HOST_NAME_MAX) + { + printf ("HOST_NAME_MAX impossibly small?! %d\n", HOST_NAME_MAX); + return 2; + } + + strcpy (buf, NOHOSTNAME); + + rc = gethostname (buf, sizeof (buf)); + + if (rc != 0) + { + printf ("gethostname failed, rc %d errno %d\n", rc, errno); + return 1; + } + + if (strcmp (buf, NOHOSTNAME) == 0) + { + printf ("gethostname left buffer untouched.\n"); + return 1; + } + + if (argc > 1) + printf ("hostname: %s\n", buf); + + return 0; +} diff --git a/tests/test-getline.c b/tests/test-getline.c index bead4b6..4dbc485 100644 --- a/tests/test-getline.c +++ b/tests/test-getline.c @@ -1,5 +1,5 @@ /* Test of getline() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Eric Blake , 2007. */ diff --git a/tests/test-getopt.c b/tests/test-getopt.c index 69f2cfa..152efea 100644 --- a/tests/test-getopt.c +++ b/tests/test-getopt.c @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-getopt.h b/tests/test-getopt.h index 9c877b3..c982d57 100644 --- a/tests/test-getopt.h +++ b/tests/test-getopt.h @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1365,5 +1365,27 @@ test_getopt (void) ASSERT (optind == 3); ASSERT (!output); } + + /* Check that 'W' does not dump core: + http://sourceware.org/bugzilla/show_bug.cgi?id=12922 + Technically, POSIX says the presence of ';' in the opt-string + gives unspecified behavior, so we only test this when GNU compliance + is desired. */ + for (start = OPTIND_MIN; start <= 1; start++) + { + int argc = 0; + const char *argv[10]; + int pos = ftell (stderr); + + argv[argc++] = "program"; + argv[argc++] = "-W"; + argv[argc++] = "dummy"; + argv[argc] = NULL; + optind = start; + opterr = 1; + ASSERT (getopt (argc, (char **) argv, "W;") == 'W'); + ASSERT (ftell (stderr) == pos); + ASSERT (optind == 2); + } #endif /* GNULIB_TEST_GETOPT_GNU */ } diff --git a/tests/test-getopt_long.h b/tests/test-getopt_long.h index 7a74867..07ea4a2 100644 --- a/tests/test-getopt_long.h +++ b/tests/test-getopt_long.h @@ -1,5 +1,5 @@ /* Test of command line argument processing. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -314,6 +314,25 @@ test_getopt_long (void) } } + /* Test that 'W' does not dump core: + http://sourceware.org/bugzilla/show_bug.cgi?id=12922 */ + { + int argc = 0; + const char *argv[10]; + int option_index; + int c; + + argv[argc++] = "program"; + argv[argc++] = "-W"; + argv[argc++] = "dummy"; + argv[argc] = NULL; + optind = 1; + opterr = 0; + c = do_getopt_long (argc, argv, "W;", NULL, &option_index); + ASSERT (c == 'W'); + ASSERT (optind == 2); + } + /* Test processing of boolean short options. */ for (start = 0; start <= 1; start++) { diff --git a/tests/test-gettimeofday.c b/tests/test-gettimeofday.c index 7d09fc3..5abb872 100644 --- a/tests/test-gettimeofday.c +++ b/tests/test-gettimeofday.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. + * Copyright (C) 2005, 2007, 2009-2014 Free Software Foundation, Inc. * Written by Jim Meyering. * * This program is free software: you can redistribute it and/or modify diff --git a/tests/test-hash.c b/tests/test-hash.c index 108daef..dc80924 100644 --- a/tests/test-hash.c +++ b/tests/test-hash.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2011 Free Software Foundation, Inc. + * Copyright (C) 2009-2014 Free Software Foundation, Inc. * Written by Jim Meyering * * This program is free software: you can redistribute it and/or modify @@ -20,7 +20,6 @@ #include "hash.h" #include "hash-pjw.h" #include "inttostr.h" -#include "xalloc.h" #include #include @@ -114,8 +113,10 @@ main (int argc, char **argv) ASSERT (ht); insert_new (ht, "a"); { - char *str1 = xstrdup ("a"); - char *str2 = hash_insert (ht, str1); + char *str1 = strdup ("a"); + char *str2; + ASSERT (str1); + str2 = hash_insert (ht, str1); ASSERT (str1 != str2); ASSERT (STREQ (str1, str2)); free (str1); @@ -161,7 +162,8 @@ main (int argc, char **argv) ht = hash_initialize (sz, NULL, NULL, NULL, NULL); ASSERT (ht); { - char *str = xstrdup ("a"); + char *str = strdup ("a"); + ASSERT (str); insert_new (ht, "a"); insert_new (ht, str); ASSERT (hash_lookup (ht, str) == str); @@ -206,7 +208,9 @@ main (int argc, char **argv) { char buf[50]; char const *p = uinttostr (i, buf); - insert_new (ht, xstrdup (p)); + char *p_dup = strdup (p); + ASSERT (p_dup); + insert_new (ht, p_dup); } break; diff --git a/tests/test-i-ring.c b/tests/test-i-ring.c index 94f642b..fe64991 100644 --- a/tests/test-i-ring.c +++ b/tests/test-i-ring.c @@ -1,5 +1,5 @@ /* Test the simple ring buffer. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. This 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/tests/test-ignore-value.c b/tests/test-ignore-value.c index 6953f4c..3533d7c 100644 --- a/tests/test-ignore-value.c +++ b/tests/test-ignore-value.c @@ -1,6 +1,6 @@ /* Test the "ignore-value" module. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. This 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/tests/test-inet_pton.c b/tests/test-inet_pton.c new file mode 100644 index 0000000..e85da22 --- /dev/null +++ b/tests/test-inet_pton.c @@ -0,0 +1,58 @@ +/* Test of inet_pton function. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2009. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (inet_pton, int, (int, const char *, void *)); + +#include +#include + +#include "macros.h" + +int +main (void) +{ +#if defined AF_INET /* HAVE_IPV4 */ + { + /* This machine was for a long time known as + ma2s2.mathematik.uni-karlsruhe.de. */ + const char printable[] = "129.13.115.2"; + struct in_addr internal; + int ret; + + ret = inet_pton (AF_INET, printable, &internal); + ASSERT (ret == 1); + /* Verify that internal is filled in network byte order. */ + ASSERT (((unsigned char *) &internal)[0] == 0x81); + ASSERT (((unsigned char *) &internal)[1] == 0x0D); + ASSERT (((unsigned char *) &internal)[2] == 0x73); + ASSERT (((unsigned char *) &internal)[3] == 0x02); +# ifdef WORDS_BIGENDIAN + ASSERT (internal.s_addr == 0x810D7302); +# else + ASSERT (internal.s_addr == 0x02730D81); +# endif + } +#endif + + return 0; +} diff --git a/tests/test-init.sh b/tests/test-init.sh new file mode 100755 index 0000000..be447b3 --- /dev/null +++ b/tests/test-init.sh @@ -0,0 +1,73 @@ +#!/bin/sh +# Unit tests for init.sh +# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# This file is part of the GNUlib Library. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . */ + +: ${srcdir=.} +. "$srcdir/init.sh"; path_prepend_ . + +fail=0 + +test_compare() +{ + touch empty || fail=1 + echo xyz > in || fail=1 + + compare /dev/null /dev/null >out 2>err || fail=1 + test -s out && fail_ "out not empty: $(cat out)" + # "err" should be empty, too, but has "set -x" output when VERBOSE=yes + case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac + + compare /dev/null empty >out 2>err || fail=1 + test -s out && fail_ "out not empty: $(cat out)" + case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac + + compare in in >out 2>err || fail=1 + test -s out && fail_ "out not empty: $(cat out)" + case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac + + compare /dev/null in >out 2>err && fail=1 + cat <<\EOF > exp +diff -u /dev/null in +--- /dev/null 1970-01-01 ++++ in 1970-01-01 ++xyz +EOF + compare exp out || fail=1 + case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac + + compare empty in >out 2>err && fail=1 + # Compare against expected output only if compare is using diff -u. + if grep @ out >/dev/null; then + # Remove the TAB-date suffix on each --- and +++ line, + # for both the expected and the actual output files. + # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ: + # -@@ -0,0 +1 @@ + # +@@ -1,0 +1,1 @@ + sed 's/ .*//;/^@@/d' out > k && mv k out + cat <<\EOF > exp +--- empty ++++ in ++xyz +EOF + compare exp out || fail=1 + fi + case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac +} + +test_compare + +Exit $fail diff --git a/tests/test-intprops.c b/tests/test-intprops.c new file mode 100644 index 0000000..97553e7 --- /dev/null +++ b/tests/test-intprops.c @@ -0,0 +1,275 @@ +/* Test intprops.h. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert. */ + +/* Tell gcc not to warn about the many (X < 0) expressions that + the overflow macros expand to. */ +#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wtype-limits" +#endif + +#include + +#include "intprops.h" +#include "verify.h" + +#include +#include + +#include "macros.h" + +/* VERIFY (X) uses a static assertion for compilers that are known to work, + and falls back on a dynamic assertion for other compilers. + These tests should be checkable via 'verify' rather than 'ASSERT', but + using 'verify' would run into a bug with HP-UX 11.23 cc; see + . */ +#if __GNUC__ || __SUNPRO_C +# define VERIFY(x) do { verify (x); } while (0) +#else +# define VERIFY(x) ASSERT (x) +#endif + +int +main (void) +{ + /* Use VERIFY for tests that must be integer constant expressions, + ASSERT otherwise. */ + + /* TYPE_IS_INTEGER. */ + ASSERT (TYPE_IS_INTEGER (bool)); + ASSERT (TYPE_IS_INTEGER (char)); + ASSERT (TYPE_IS_INTEGER (signed char)); + ASSERT (TYPE_IS_INTEGER (unsigned char)); + ASSERT (TYPE_IS_INTEGER (short int)); + ASSERT (TYPE_IS_INTEGER (unsigned short int)); + ASSERT (TYPE_IS_INTEGER (int)); + ASSERT (TYPE_IS_INTEGER (unsigned int)); + ASSERT (TYPE_IS_INTEGER (long int)); + ASSERT (TYPE_IS_INTEGER (unsigned long int)); + ASSERT (TYPE_IS_INTEGER (intmax_t)); + ASSERT (TYPE_IS_INTEGER (uintmax_t)); + ASSERT (! TYPE_IS_INTEGER (float)); + ASSERT (! TYPE_IS_INTEGER (double)); + ASSERT (! TYPE_IS_INTEGER (long double)); + + /* TYPE_SIGNED. */ + /* VERIFY (! TYPE_SIGNED (bool)); // not guaranteed by gnulib substitute */ + VERIFY (TYPE_SIGNED (signed char)); + VERIFY (! TYPE_SIGNED (unsigned char)); + VERIFY (TYPE_SIGNED (short int)); + VERIFY (! TYPE_SIGNED (unsigned short int)); + VERIFY (TYPE_SIGNED (int)); + VERIFY (! TYPE_SIGNED (unsigned int)); + VERIFY (TYPE_SIGNED (long int)); + VERIFY (! TYPE_SIGNED (unsigned long int)); + VERIFY (TYPE_SIGNED (intmax_t)); + VERIFY (! TYPE_SIGNED (uintmax_t)); + ASSERT (TYPE_SIGNED (float)); + ASSERT (TYPE_SIGNED (double)); + ASSERT (TYPE_SIGNED (long double)); + + /* Integer representation. */ + VERIFY (INT_MIN + INT_MAX < 0 + ? (TYPE_TWOS_COMPLEMENT (int) + && ! TYPE_ONES_COMPLEMENT (int) && ! TYPE_SIGNED_MAGNITUDE (int)) + : (! TYPE_TWOS_COMPLEMENT (int) + && (TYPE_ONES_COMPLEMENT (int) || TYPE_SIGNED_MAGNITUDE (int)))); + + /* TYPE_MINIMUM, TYPE_MAXIMUM. */ + VERIFY (TYPE_MINIMUM (char) == CHAR_MIN); + VERIFY (TYPE_MAXIMUM (char) == CHAR_MAX); + VERIFY (TYPE_MINIMUM (unsigned char) == 0); + VERIFY (TYPE_MAXIMUM (unsigned char) == UCHAR_MAX); + VERIFY (TYPE_MINIMUM (signed char) == SCHAR_MIN); + VERIFY (TYPE_MAXIMUM (signed char) == SCHAR_MAX); + VERIFY (TYPE_MINIMUM (short int) == SHRT_MIN); + VERIFY (TYPE_MAXIMUM (short int) == SHRT_MAX); + VERIFY (TYPE_MINIMUM (unsigned short int) == 0); + VERIFY (TYPE_MAXIMUM (unsigned short int) == USHRT_MAX); + VERIFY (TYPE_MINIMUM (int) == INT_MIN); + VERIFY (TYPE_MAXIMUM (int) == INT_MAX); + VERIFY (TYPE_MINIMUM (unsigned int) == 0); + VERIFY (TYPE_MAXIMUM (unsigned int) == UINT_MAX); + VERIFY (TYPE_MINIMUM (long int) == LONG_MIN); + VERIFY (TYPE_MAXIMUM (long int) == LONG_MAX); + VERIFY (TYPE_MINIMUM (unsigned long int) == 0); + VERIFY (TYPE_MAXIMUM (unsigned long int) == ULONG_MAX); + VERIFY (TYPE_MINIMUM (intmax_t) == INTMAX_MIN); + VERIFY (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX); + VERIFY (TYPE_MINIMUM (uintmax_t) == 0); + VERIFY (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX); + + /* INT_BITS_STRLEN_BOUND. */ + VERIFY (INT_BITS_STRLEN_BOUND (1) == 1); + VERIFY (INT_BITS_STRLEN_BOUND (2620) == 789); + + /* INT_STRLEN_BOUND, INT_BUFSIZE_BOUND. */ + #ifdef INT32_MAX /* POSIX guarantees int32_t; this ports to non-POSIX. */ + VERIFY (INT_STRLEN_BOUND (int32_t) == sizeof ("-2147483648") - 1); + VERIFY (INT_BUFSIZE_BOUND (int32_t) == sizeof ("-2147483648")); + #endif + #ifdef INT64_MAX + VERIFY (INT_STRLEN_BOUND (int64_t) == sizeof ("-9223372036854775808") - 1); + VERIFY (INT_BUFSIZE_BOUND (int64_t) == sizeof ("-9223372036854775808")); + #endif + + /* All the INT__RANGE_OVERFLOW tests are equally valid as + INT__OVERFLOW tests, so define a single macro to do both. */ + #define CHECK_BINOP(op, a, b, min, max, overflow) \ + (INT_##op##_RANGE_OVERFLOW (a, b, min, max) == (overflow) \ + && INT_##op##_OVERFLOW (a, b) == (overflow)) + #define CHECK_UNOP(op, a, min, max, overflow) \ + (INT_##op##_RANGE_OVERFLOW (a, min, max) == (overflow) \ + && INT_##op##_OVERFLOW (a) == (overflow)) + + /* INT__RANGE_OVERFLOW, INT__OVERFLOW. */ + VERIFY (INT_ADD_RANGE_OVERFLOW (INT_MAX, 1, INT_MIN, INT_MAX)); + VERIFY (INT_ADD_OVERFLOW (INT_MAX, 1)); + VERIFY (CHECK_BINOP (ADD, INT_MAX, 1, INT_MIN, INT_MAX, true)); + VERIFY (CHECK_BINOP (ADD, INT_MAX, -1, INT_MIN, INT_MAX, false)); + VERIFY (CHECK_BINOP (ADD, INT_MIN, 1, INT_MIN, INT_MAX, false)); + VERIFY (CHECK_BINOP (ADD, INT_MIN, -1, INT_MIN, INT_MAX, true)); + VERIFY (CHECK_BINOP (ADD, UINT_MAX, 1u, 0u, UINT_MAX, true)); + VERIFY (CHECK_BINOP (ADD, 0u, 1u, 0u, UINT_MAX, false)); + + VERIFY (CHECK_BINOP (SUBTRACT, INT_MAX, 1, INT_MIN, INT_MAX, false)); + VERIFY (CHECK_BINOP (SUBTRACT, INT_MAX, -1, INT_MIN, INT_MAX, true)); + VERIFY (CHECK_BINOP (SUBTRACT, INT_MIN, 1, INT_MIN, INT_MAX, true)); + VERIFY (CHECK_BINOP (SUBTRACT, INT_MIN, -1, INT_MIN, INT_MAX, false)); + VERIFY (CHECK_BINOP (SUBTRACT, UINT_MAX, 1u, 0u, UINT_MAX, false)); + VERIFY (CHECK_BINOP (SUBTRACT, 0u, 1u, 0u, UINT_MAX, true)); + + VERIFY (CHECK_UNOP (NEGATE, INT_MIN, INT_MIN, INT_MAX, + TYPE_TWOS_COMPLEMENT (int))); + VERIFY (CHECK_UNOP (NEGATE, 0, INT_MIN, INT_MAX, false)); + VERIFY (CHECK_UNOP (NEGATE, INT_MAX, INT_MIN, INT_MAX, false)); + VERIFY (CHECK_UNOP (NEGATE, 0u, 0u, UINT_MAX, false)); + VERIFY (CHECK_UNOP (NEGATE, 1u, 0u, UINT_MAX, true)); + VERIFY (CHECK_UNOP (NEGATE, UINT_MAX, 0u, UINT_MAX, true)); + + VERIFY (CHECK_BINOP (MULTIPLY, INT_MAX, INT_MAX, INT_MIN, INT_MAX, true)); + VERIFY (CHECK_BINOP (MULTIPLY, INT_MAX, INT_MIN, INT_MIN, INT_MAX, true)); + VERIFY (CHECK_BINOP (MULTIPLY, INT_MIN, INT_MAX, INT_MIN, INT_MAX, true)); + VERIFY (CHECK_BINOP (MULTIPLY, INT_MIN, INT_MIN, INT_MIN, INT_MAX, true)); + VERIFY (CHECK_BINOP (MULTIPLY, -1, INT_MIN, INT_MIN, INT_MAX, + INT_NEGATE_OVERFLOW (INT_MIN))); + VERIFY (CHECK_BINOP (MULTIPLY, LONG_MIN / INT_MAX, (long int) INT_MAX, + LONG_MIN, LONG_MIN, false)); + + VERIFY (CHECK_BINOP (DIVIDE, INT_MIN, -1, INT_MIN, INT_MAX, + INT_NEGATE_OVERFLOW (INT_MIN))); + VERIFY (CHECK_BINOP (DIVIDE, INT_MAX, 1, INT_MIN, INT_MAX, false)); + VERIFY (CHECK_BINOP (DIVIDE, (unsigned int) INT_MIN, + -1u, 0u, UINT_MAX, false)); + + VERIFY (CHECK_BINOP (REMAINDER, INT_MIN, -1, INT_MIN, INT_MAX, + INT_NEGATE_OVERFLOW (INT_MIN))); + VERIFY (CHECK_BINOP (REMAINDER, INT_MAX, 1, INT_MIN, INT_MAX, false)); + VERIFY (CHECK_BINOP (REMAINDER, (unsigned int) INT_MIN, + -1u, 0u, UINT_MAX, false)); + + VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX, 1, 0u, UINT_MAX, true)); + VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX / 2 + 1, 1, 0u, UINT_MAX, true)); + VERIFY (CHECK_BINOP (LEFT_SHIFT, UINT_MAX / 2, 1, 0u, UINT_MAX, false)); + + /* INT__OVERFLOW with mixed types. */ + #define CHECK_SUM(a, b, overflow) \ + VERIFY (INT_ADD_OVERFLOW (a, b) == (overflow)); \ + VERIFY (INT_ADD_OVERFLOW (b, a) == (overflow)) + CHECK_SUM (-1, LONG_MIN, true); + CHECK_SUM (-1, UINT_MAX, false); + CHECK_SUM (-1L, INT_MIN, INT_MIN == LONG_MIN); + CHECK_SUM (0u, -1, true); + CHECK_SUM (0u, 0, false); + CHECK_SUM (0u, 1, false); + CHECK_SUM (1, LONG_MAX, true); + CHECK_SUM (1, UINT_MAX, true); + CHECK_SUM (1L, INT_MAX, INT_MAX == LONG_MAX); + CHECK_SUM (1u, INT_MAX, INT_MAX == UINT_MAX); + CHECK_SUM (1u, INT_MIN, true); + + VERIFY (! INT_SUBTRACT_OVERFLOW (INT_MAX, 1u)); + VERIFY (! INT_SUBTRACT_OVERFLOW (UINT_MAX, 1)); + VERIFY (! INT_SUBTRACT_OVERFLOW (0u, -1)); + VERIFY (INT_SUBTRACT_OVERFLOW (UINT_MAX, -1)); + VERIFY (INT_SUBTRACT_OVERFLOW (INT_MIN, 1u)); + VERIFY (INT_SUBTRACT_OVERFLOW (-1, 0u)); + + #define CHECK_PRODUCT(a, b, overflow) \ + VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (overflow)); \ + VERIFY (INT_MULTIPLY_OVERFLOW (b, a) == (overflow)) + + CHECK_PRODUCT (-1, 1u, true); + CHECK_PRODUCT (-1, INT_MIN, INT_NEGATE_OVERFLOW (INT_MIN)); + CHECK_PRODUCT (-1, UINT_MAX, true); + CHECK_PRODUCT (-12345, LONG_MAX / -12345 - 1, true); + CHECK_PRODUCT (-12345, LONG_MAX / -12345, false); + CHECK_PRODUCT (0, -1, false); + CHECK_PRODUCT (0, 0, false); + CHECK_PRODUCT (0, 0u, false); + CHECK_PRODUCT (0, 1, false); + CHECK_PRODUCT (0, INT_MAX, false); + CHECK_PRODUCT (0, INT_MIN, false); + CHECK_PRODUCT (0, UINT_MAX, false); + CHECK_PRODUCT (0u, -1, false); + CHECK_PRODUCT (0u, 0, false); + CHECK_PRODUCT (0u, 0u, false); + CHECK_PRODUCT (0u, 1, false); + CHECK_PRODUCT (0u, INT_MAX, false); + CHECK_PRODUCT (0u, INT_MIN, false); + CHECK_PRODUCT (0u, UINT_MAX, false); + CHECK_PRODUCT (1, INT_MAX, false); + CHECK_PRODUCT (1, INT_MIN, false); + CHECK_PRODUCT (1, UINT_MAX, false); + CHECK_PRODUCT (1u, INT_MIN, true); + CHECK_PRODUCT (1u, INT_MAX, UINT_MAX < INT_MAX); + CHECK_PRODUCT (INT_MAX, UINT_MAX, true); + CHECK_PRODUCT (INT_MAX, ULONG_MAX, true); + CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, true); + CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN, false); + CHECK_PRODUCT (INT_MIN, UINT_MAX, true); + CHECK_PRODUCT (INT_MIN, ULONG_MAX, true); + + VERIFY (INT_DIVIDE_OVERFLOW (INT_MIN, -1L) + == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN)); + VERIFY (! INT_DIVIDE_OVERFLOW (INT_MIN, UINT_MAX)); + VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINTMAX_MAX)); + VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINT_MAX)); + VERIFY (INT_DIVIDE_OVERFLOW (-11, 10u)); + VERIFY (INT_DIVIDE_OVERFLOW (-10, 10u)); + VERIFY (! INT_DIVIDE_OVERFLOW (-9, 10u)); + VERIFY (INT_DIVIDE_OVERFLOW (11u, -10)); + VERIFY (INT_DIVIDE_OVERFLOW (10u, -10)); + VERIFY (! INT_DIVIDE_OVERFLOW (9u, -10)); + + VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, -1L) + == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN)); + VERIFY (INT_REMAINDER_OVERFLOW (-1, UINT_MAX)); + VERIFY (INT_REMAINDER_OVERFLOW ((intmax_t) -1, UINTMAX_MAX)); + VERIFY (INT_REMAINDER_OVERFLOW (INTMAX_MIN, UINT_MAX) + == (INTMAX_MAX < UINT_MAX + && - (unsigned int) INTMAX_MIN % UINT_MAX != 0)); + VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, ULONG_MAX) + == (INT_MIN % ULONG_MAX != 1)); + VERIFY (! INT_REMAINDER_OVERFLOW (1u, -1)); + VERIFY (! INT_REMAINDER_OVERFLOW (37*39u, -39)); + VERIFY (INT_REMAINDER_OVERFLOW (37*39u + 1, -39)); + VERIFY (INT_REMAINDER_OVERFLOW (37*39u - 1, -39)); + VERIFY (! INT_REMAINDER_OVERFLOW (LONG_MAX, -INT_MAX)); + + return 0; +} diff --git a/tests/test-inttostr.c b/tests/test-inttostr.c index 9bed25e..ea5b295 100644 --- a/tests/test-inttostr.c +++ b/tests/test-inttostr.c @@ -1,5 +1,5 @@ /* Test inttostr functions, and incidentally, INT_BUFSIZE_BOUND - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,7 +32,7 @@ #define CAST_VAL(T,V) (TYPE_SIGNED (T) ? (intmax_t) (V) : (uintmax_t) (V)) #define V_min(T) (CAST_VAL (T, TYPE_MINIMUM (T))) #define V_max(T) (CAST_VAL (T, TYPE_MAXIMUM (T))) -#define IS_TIGHT(T) (signed_type_or_expr__(T) == TYPE_SIGNED (T)) +#define IS_TIGHT(T) (_GL_SIGNED_TYPE_OR_EXPR (T) == TYPE_SIGNED (T)) #define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9) /* Verify that an inttostr function works as advertised. diff --git a/tests/test-inttypes.c b/tests/test-inttypes.c index 5bf952c..35deeab 100644 --- a/tests/test-inttypes.c +++ b/tests/test-inttypes.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2007, 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,9 +18,6 @@ #include -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */ #include #include diff --git a/tests/test-ioctl.c b/tests/test-ioctl.c new file mode 100644 index 0000000..8f31b68 --- /dev/null +++ b/tests/test-ioctl.c @@ -0,0 +1,51 @@ +/* Test of ioctl() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +#include "signature.h" +SIGNATURE_CHECK (ioctl, int, (int, int, ...)); + +#include +#include + +#include "macros.h" + +int +main (void) +{ +#ifdef FIONREAD + /* Test behaviour for invalid file descriptors. */ + { + int value; + errno = 0; + ASSERT (ioctl (-1, FIONREAD, &value) == -1); + ASSERT (errno == EBADF); + } + { + int value; + close (99); + errno = 0; + ASSERT (ioctl (99, FIONREAD, &value) == -1); + ASSERT (errno == EBADF); + } +#endif + + return 0; +} diff --git a/tests/test-isblank.c b/tests/test-isblank.c index 229d8d6..3f4a041 100644 --- a/tests/test-isblank.c +++ b/tests/test-isblank.c @@ -1,5 +1,5 @@ /* Test of isblank() function. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-isfinite.c b/tests/test-isfinite.c new file mode 100644 index 0000000..fa2904a --- /dev/null +++ b/tests/test-isfinite.c @@ -0,0 +1,237 @@ +/* Test of isfinite() substitute. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Ben Pfaff, 2007, using Bruno Haible's code as a + template. */ + +#include + +#include + +/* isfinite must be a macro. */ +#ifndef isfinite +# error missing declaration +#endif + +#include +#include + +#include "infinity.h" +#include "macros.h" + +float zerof = 0.0f; +double zerod = 0.0; +long double zerol = 0.0L; + +static void +test_isfinitef () +{ + /* Zero. */ + ASSERT (isfinite (0.0f)); + /* Subnormal values. */ + ASSERT (isfinite (FLT_MIN / 2)); + ASSERT (isfinite (-FLT_MIN / 2)); + /* Finite values. */ + ASSERT (isfinite (3.141f)); + ASSERT (isfinite (3.141e30f)); + ASSERT (isfinite (3.141e-30f)); + ASSERT (isfinite (-2.718f)); + ASSERT (isfinite (-2.718e30f)); + ASSERT (isfinite (-2.718e-30f)); + /* Infinite values. */ + ASSERT (!isfinite (Infinityf ())); + ASSERT (!isfinite (- Infinityf ())); + /* Quiet NaN. */ + ASSERT (!isfinite (zerof / zerof)); +#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT + /* Signalling NaN. */ + { + #define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { float value; unsigned int word[NWORDS]; } memory_float; + memory_float m; + m.value = zerof / zerof; +# if FLT_EXPBIT0_BIT > 0 + m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1); +# else + m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + if (FLT_EXPBIT0_WORD < NWORDS / 2) + m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT; + else + m.word[0] |= (unsigned int) 1; + ASSERT (!isfinite (m.value)); + #undef NWORDS + } +#endif +} + +static void +test_isfinited () +{ + /* Zero. */ + ASSERT (isfinite (0.0)); + /* Subnormal values. */ + ASSERT (isfinite (DBL_MIN / 2)); + ASSERT (isfinite (-DBL_MIN / 2)); + /* Finite values. */ + ASSERT (isfinite (3.141)); + ASSERT (isfinite (3.141e30)); + ASSERT (isfinite (3.141e-30)); + ASSERT (isfinite (-2.718)); + ASSERT (isfinite (-2.718e30)); + ASSERT (isfinite (-2.718e-30)); + /* Infinite values. */ + ASSERT (!isfinite (Infinityd ())); + ASSERT (!isfinite (- Infinityd ())); + /* Quiet NaN. */ + ASSERT (!isfinite (zerod / zerod)); +#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT + /* Signalling NaN. */ + { + #define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { double value; unsigned int word[NWORDS]; } memory_double; + memory_double m; + m.value = zerod / zerod; +# if DBL_EXPBIT0_BIT > 0 + m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1); +# else + m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + |= (unsigned int) 1 << DBL_EXPBIT0_BIT; + ASSERT (!isfinite (m.value)); + #undef NWORDS + } +#endif +} + +static void +test_isfinitel () +{ + #define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { unsigned int word[NWORDS]; long double value; } + memory_long_double; + + /* Zero. */ + ASSERT (isfinite (0.0L)); + /* Subnormal values. */ + ASSERT (isfinite (LDBL_MIN / 2)); + ASSERT (isfinite (-LDBL_MIN / 2)); + /* Finite values. */ + ASSERT (isfinite (3.141L)); + ASSERT (isfinite (3.141e30L)); + ASSERT (isfinite (3.141e-30L)); + ASSERT (isfinite (-2.718L)); + ASSERT (isfinite (-2.718e30L)); + ASSERT (isfinite (-2.718e-30L)); + /* Infinite values. */ + ASSERT (!isfinite (Infinityl ())); + ASSERT (!isfinite (- Infinityl ())); + /* Quiet NaN. */ + ASSERT (!isfinite (zerol / zerol)); + +#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT + /* A bit pattern that is different from a Quiet NaN. With a bit of luck, + it's a Signalling NaN. */ + { + memory_long_double m; + m.value = zerol / zerol; +# if LDBL_EXPBIT0_BIT > 0 + m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1); +# else + m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + |= (unsigned int) 1 << LDBL_EXPBIT0_BIT; + ASSERT (!isfinite (m.value)); + } +#endif + +#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + ASSERT (!isfinite (x.value)); + } + { + /* Signalling NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + ASSERT (!isfinite (x.value)); + } + /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in + Intel IA-64 Architecture Software Developer's Manual, Volume 1: + Application Architecture. + Table 5-2 "Floating-Point Register Encodings" + Figure 5-6 "Memory to Floating-Point Register Data Translation" + */ + { /* Pseudo-NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + ASSERT (!isfinite (x.value)); + } + { /* Pseudo-Infinity. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + ASSERT (!isfinite (x.value)); + } + { /* Pseudo-Zero. */ + static memory_long_double x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + ASSERT (!isfinite (x.value)); + } + { /* Unnormalized number. */ + static memory_long_double x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + ASSERT (!isfinite (x.value)); + } + { /* Pseudo-Denormal. */ + static memory_long_double x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + ASSERT (!isfinite (x.value)); + } +#endif + + #undef NWORDS +} + +int +main () +{ + test_isfinitef (); + test_isfinited (); + test_isfinitel (); + return 0; +} diff --git a/tests/test-isinf.c b/tests/test-isinf.c new file mode 100644 index 0000000..0a13224 --- /dev/null +++ b/tests/test-isinf.c @@ -0,0 +1,243 @@ +/* Test of isinf() substitute. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Ben Pfaff, 2008, using Bruno Haible's code as a + template. */ + +#include + +#include + +/* isinf must be a macro. */ +#ifndef isinf +# error missing declaration +#endif + +#include +#include + +#include "infinity.h" +#include "macros.h" + +float zerof = 0.0f; +double zerod = 0.0; +long double zerol = 0.0L; + +static void +test_isinff () +{ + /* Zero. */ + ASSERT (!isinf (0.0f)); + /* Subnormal values. */ + ASSERT (!isinf (FLT_MIN / 2)); + ASSERT (!isinf (-FLT_MIN / 2)); + /* Finite values. */ + ASSERT (!isinf (3.141f)); + ASSERT (!isinf (3.141e30f)); + ASSERT (!isinf (3.141e-30f)); + ASSERT (!isinf (-2.718f)); + ASSERT (!isinf (-2.718e30f)); + ASSERT (!isinf (-2.718e-30f)); + ASSERT (!isinf (FLT_MAX)); + ASSERT (!isinf (-FLT_MAX)); + /* Infinite values. */ + ASSERT (isinf (Infinityf ())); + ASSERT (isinf (- Infinityf ())); + /* Quiet NaN. */ + ASSERT (!isinf (zerof / zerof)); +#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT + /* Signalling NaN. */ + { + #define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { float value; unsigned int word[NWORDS]; } memory_float; + memory_float m; + m.value = zerof / zerof; +# if FLT_EXPBIT0_BIT > 0 + m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1); +# else + m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + if (FLT_EXPBIT0_WORD < NWORDS / 2) + m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT; + else + m.word[0] |= (unsigned int) 1; + ASSERT (!isinf (m.value)); + #undef NWORDS + } +#endif +} + +static void +test_isinfd () +{ + /* Zero. */ + ASSERT (!isinf (0.0)); + /* Subnormal values. */ + ASSERT (!isinf (DBL_MIN / 2)); + ASSERT (!isinf (-DBL_MIN / 2)); + /* Finite values. */ + ASSERT (!isinf (3.141)); + ASSERT (!isinf (3.141e30)); + ASSERT (!isinf (3.141e-30)); + ASSERT (!isinf (-2.718)); + ASSERT (!isinf (-2.718e30)); + ASSERT (!isinf (-2.718e-30)); + ASSERT (!isinf (DBL_MAX)); + ASSERT (!isinf (-DBL_MAX)); + /* Infinite values. */ + ASSERT (isinf (Infinityd ())); + ASSERT (isinf (- Infinityd ())); + /* Quiet NaN. */ + ASSERT (!isinf (zerod / zerod)); +#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT + /* Signalling NaN. */ + { + #define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { double value; unsigned int word[NWORDS]; } memory_double; + memory_double m; + m.value = zerod / zerod; +# if DBL_EXPBIT0_BIT > 0 + m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1); +# else + m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + |= (unsigned int) 1 << DBL_EXPBIT0_BIT; + ASSERT (!isinf (m.value)); + #undef NWORDS + } +#endif +} + +static void +test_isinfl () +{ + #define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { unsigned int word[NWORDS]; long double value; } + memory_long_double; + + /* Zero. */ + ASSERT (!isinf (0.0L)); + /* Subnormal values. */ + ASSERT (!isinf (LDBL_MIN / 2)); + ASSERT (!isinf (-LDBL_MIN / 2)); + /* Finite values. */ + ASSERT (!isinf (3.141L)); + ASSERT (!isinf (3.141e30L)); + ASSERT (!isinf (3.141e-30L)); + ASSERT (!isinf (-2.718L)); + ASSERT (!isinf (-2.718e30L)); + ASSERT (!isinf (-2.718e-30L)); + ASSERT (!isinf (LDBL_MAX)); + ASSERT (!isinf (-LDBL_MAX)); + /* Infinite values. */ + ASSERT (isinf (Infinityl ())); + ASSERT (isinf (- Infinityl ())); + /* Quiet NaN. */ + ASSERT (!isinf (zerol / zerol)); + +#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT + /* A bit pattern that is different from a Quiet NaN. With a bit of luck, + it's a Signalling NaN. */ + { + memory_long_double m; + m.value = zerol / zerol; +# if LDBL_EXPBIT0_BIT > 0 + m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1); +# else + m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + |= (unsigned int) 1 << LDBL_EXPBIT0_BIT; + ASSERT (!isinf (m.value)); + } +#endif + +#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + ASSERT (!isinf (x.value)); + } + { + /* Signalling NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + ASSERT (!isinf (x.value)); + } + /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in + Intel IA-64 Architecture Software Developer's Manual, Volume 1: + Application Architecture. + Table 5-2 "Floating-Point Register Encodings" + Figure 5-6 "Memory to Floating-Point Register Data Translation" + */ + { /* Pseudo-NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + ASSERT (!isinf (x.value)); + } + { /* Pseudo-Infinity. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + ASSERT (!isinf (x.value)); + } + { /* Pseudo-Zero. */ + static memory_long_double x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + ASSERT (!isinf (x.value)); + } + { /* Unnormalized number. */ + static memory_long_double x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + ASSERT (!isinf (x.value)); + } + { /* Pseudo-Denormal. */ + static memory_long_double x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + ASSERT (!isinf (x.value)); + } +#endif + + #undef NWORDS +} + +int +main () +{ + test_isinff (); + test_isinfd (); + test_isinfl (); + return 0; +} diff --git a/tests/test-isnand-nolibm.c b/tests/test-isnand-nolibm.c new file mode 100644 index 0000000..d7b6405 --- /dev/null +++ b/tests/test-isnand-nolibm.c @@ -0,0 +1,21 @@ +/* Test of isnand() substitute. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "isnand-nolibm.h" + +#include "test-isnand.h" diff --git a/tests/test-isnand.h b/tests/test-isnand.h new file mode 100644 index 0000000..c6d216e --- /dev/null +++ b/tests/test-isnand.h @@ -0,0 +1,63 @@ +/* Test of isnand() substitute. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include "minus-zero.h" +#include "infinity.h" +#include "nan.h" +#include "macros.h" + +int +main () +{ + /* Finite values. */ + ASSERT (!isnand (3.141)); + ASSERT (!isnand (3.141e30)); + ASSERT (!isnand (3.141e-30)); + ASSERT (!isnand (-2.718)); + ASSERT (!isnand (-2.718e30)); + ASSERT (!isnand (-2.718e-30)); + ASSERT (!isnand (0.0)); + ASSERT (!isnand (minus_zerod)); + /* Infinite values. */ + ASSERT (!isnand (Infinityd ())); + ASSERT (!isnand (- Infinityd ())); + /* Quiet NaN. */ + ASSERT (isnand (NaNd ())); +#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT + /* Signalling NaN. */ + { + #define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { double value; unsigned int word[NWORDS]; } memory_double; + memory_double m; + m.value = NaNd (); +# if DBL_EXPBIT0_BIT > 0 + m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1); +# else + m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + |= (unsigned int) 1 << DBL_EXPBIT0_BIT; + ASSERT (isnand (m.value)); + } +#endif + return 0; +} diff --git a/tests/test-isnanf-nolibm.c b/tests/test-isnanf-nolibm.c new file mode 100644 index 0000000..222bde7 --- /dev/null +++ b/tests/test-isnanf-nolibm.c @@ -0,0 +1,21 @@ +/* Test of isnanf() substitute. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "isnanf-nolibm.h" + +#include "test-isnanf.h" diff --git a/tests/test-isnanf.h b/tests/test-isnanf.h new file mode 100644 index 0000000..463ac7e --- /dev/null +++ b/tests/test-isnanf.h @@ -0,0 +1,65 @@ +/* Test of isnanf() substitute. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include "minus-zero.h" +#include "infinity.h" +#include "nan.h" +#include "macros.h" + +int +main () +{ + /* Finite values. */ + ASSERT (!isnanf (3.141f)); + ASSERT (!isnanf (3.141e30f)); + ASSERT (!isnanf (3.141e-30f)); + ASSERT (!isnanf (-2.718f)); + ASSERT (!isnanf (-2.718e30f)); + ASSERT (!isnanf (-2.718e-30f)); + ASSERT (!isnanf (0.0f)); + ASSERT (!isnanf (minus_zerof)); + /* Infinite values. */ + ASSERT (!isnanf (Infinityf ())); + ASSERT (!isnanf (- Infinityf ())); + /* Quiet NaN. */ + ASSERT (isnanf (NaNf ())); +#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT + /* Signalling NaN. */ + { + #define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { float value; unsigned int word[NWORDS]; } memory_float; + memory_float m; + m.value = NaNf (); +# if FLT_EXPBIT0_BIT > 0 + m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1); +# else + m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + if (FLT_EXPBIT0_WORD < NWORDS / 2) + m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT; + else + m.word[0] |= (unsigned int) 1; + ASSERT (isnanf (m.value)); + } +#endif + return 0; +} diff --git a/tests/test-isnanl-nolibm.c b/tests/test-isnanl-nolibm.c new file mode 100644 index 0000000..15a32c5 --- /dev/null +++ b/tests/test-isnanl-nolibm.c @@ -0,0 +1,23 @@ +/* Test of isnanl() substitute. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include "isnanl-nolibm.h" + +#include "test-isnanl.h" diff --git a/tests/test-isnanl.h b/tests/test-isnanl.h new file mode 100644 index 0000000..eaf5da1 --- /dev/null +++ b/tests/test-isnanl.h @@ -0,0 +1,127 @@ +/* Test of isnanl() substitute. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include +#include + +#include "minus-zero.h" +#include "infinity.h" +#include "nan.h" +#include "macros.h" + +int +main () +{ + #define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { unsigned int word[NWORDS]; long double value; } + memory_long_double; + + /* Finite values. */ + ASSERT (!isnanl (3.141L)); + ASSERT (!isnanl (3.141e30L)); + ASSERT (!isnanl (3.141e-30L)); + ASSERT (!isnanl (-2.718L)); + ASSERT (!isnanl (-2.718e30L)); + ASSERT (!isnanl (-2.718e-30L)); + ASSERT (!isnanl (0.0L)); + ASSERT (!isnanl (minus_zerol)); + /* Infinite values. */ + ASSERT (!isnanl (Infinityl ())); + ASSERT (!isnanl (- Infinityl ())); + /* Quiet NaN. */ + ASSERT (isnanl (NaNl ())); + +#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT + /* A bit pattern that is different from a Quiet NaN. With a bit of luck, + it's a Signalling NaN. */ + { + memory_long_double m; + m.value = NaNl (); +# if LDBL_EXPBIT0_BIT > 0 + m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1); +# else + m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + |= (unsigned int) 1 << LDBL_EXPBIT0_BIT; + ASSERT (isnanl (m.value)); + } +#endif + +#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + ASSERT (isnanl (x.value)); + } + { + /* Signalling NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + ASSERT (isnanl (x.value)); + } + /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in + Intel IA-64 Architecture Software Developer's Manual, Volume 1: + Application Architecture. + Table 5-2 "Floating-Point Register Encodings" + Figure 5-6 "Memory to Floating-Point Register Data Translation" + */ + { /* Pseudo-NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + ASSERT (isnanl (x.value)); + } + { /* Pseudo-Infinity. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + ASSERT (isnanl (x.value)); + } + { /* Pseudo-Zero. */ + static memory_long_double x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + ASSERT (isnanl (x.value)); + } + { /* Unnormalized number. */ + static memory_long_double x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + ASSERT (isnanl (x.value)); + } + { /* Pseudo-Denormal. */ + static memory_long_double x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + ASSERT (isnanl (x.value)); + } +#endif + + return 0; +} diff --git a/tests/test-iswblank.c b/tests/test-iswblank.c index 5ed4f89..68ede5c 100644 --- a/tests/test-iswblank.c +++ b/tests/test-iswblank.c @@ -1,5 +1,5 @@ /* Test of iswblank() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-langinfo.c b/tests/test-langinfo.c index ade807c..f4aa5b8 100644 --- a/tests/test-langinfo.c +++ b/tests/test-langinfo.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-lchown.c b/tests/test-lchown.c deleted file mode 100644 index f39fa10..0000000 --- a/tests/test-lchown.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Tests of lchown. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (lchown, int, (char const *, uid_t, gid_t)); - -#include -#include -#include -#include -#include -#include - -#include "mgetgroups.h" -#include "stat-time.h" -#include "ignore-value.h" -#include "macros.h" - -#define BASE "test-lchown.t" - -#include "test-lchown.h" - -int -main (void) -{ - /* Remove any leftovers from a previous partial run. */ - ignore_value (system ("rm -rf " BASE "*")); - - return test_lchown (lchown, true); -} diff --git a/tests/test-lchown.h b/tests/test-lchown.h deleted file mode 100644 index aa10674..0000000 --- a/tests/test-lchown.h +++ /dev/null @@ -1,260 +0,0 @@ -/* Tests of lchown. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake , 2009. */ - -#include "nap.h" - -#if !HAVE_GETEGID -# define getegid() ((gid_t) -1) -#endif - -#ifndef HAVE_LCHMOD -# define HAVE_LCHMOD 0 -#endif - -#ifndef CHOWN_CHANGE_TIME_BUG -# define CHOWN_CHANGE_TIME_BUG 0 -#endif - -/* This file is designed to test lchown(n,o,g) and - chownat(AT_FDCWD,n,o,g,AT_SYMLINK_NOFOLLOW). FUNC is the function - to test. Assumes that BASE and ASSERT are already defined, and - that appropriate headers are already included. If PRINT, warn - before skipping symlink tests with status 77. */ - -static int -test_lchown (int (*func) (char const *, uid_t, gid_t), bool print) -{ - struct stat st1; - struct stat st2; - gid_t *gids = NULL; - int gids_count; - int result; - - /* Solaris 8 is interesting - if the current process belongs to - multiple groups, the current directory is owned by a a group that - the current process belongs to but different than getegid(), and - the current directory does not have the S_ISGID bit, then regular - files created in the directory belong to the directory's group, - but symlinks belong to the current effective group id. If - S_ISGID is set, then both files and symlinks belong to the - directory's group. However, it is possible to run the testsuite - from within a directory owned by a group we don't belong to, in - which case all things that we create belong to the current - effective gid. So, work around the issues by creating a - subdirectory (we are guaranteed that the subdirectory will be - owned by one of our current groups), change ownership of that - directory to the current effective gid (which will thus succeed), - then create all other files within that directory (eliminating - questions on whether inheritance or current id triumphs, since - the two methods resolve to the same gid). */ - ASSERT (mkdir (BASE "dir", 0700) == 0); - ASSERT (stat (BASE "dir", &st1) == 0); - - /* Filter out mingw, which has no concept of groups. */ - result = func (BASE "dir", st1.st_uid, getegid ()); - if (result == -1 && errno == ENOSYS) - { - ASSERT (rmdir (BASE "dir") == 0); - if (print) - fputs ("skipping test: no support for ownership\n", stderr); - return 77; - } - ASSERT (result == 0); - - ASSERT (close (creat (BASE "dir/file", 0600)) == 0); - ASSERT (stat (BASE "dir/file", &st1) == 0); - ASSERT (st1.st_uid != (uid_t) -1); - ASSERT (st1.st_gid != (gid_t) -1); - ASSERT (st1.st_gid == getegid ()); - - /* Sanity check of error cases. */ - errno = 0; - ASSERT (func ("", -1, -1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("no_such", -1, -1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("no_such/", -1, -1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func (BASE "dir/file/", -1, -1) == -1); - ASSERT (errno == ENOTDIR); - - /* Check that -1 does not alter ownership. */ - ASSERT (func (BASE "dir/file", -1, st1.st_gid) == 0); - ASSERT (func (BASE "dir/file", st1.st_uid, -1) == 0); - ASSERT (func (BASE "dir/file", (uid_t) -1, (gid_t) -1) == 0); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - - /* Even if the values aren't changing, ctime is required to change - if at least one argument is not -1. */ - nap (); - ASSERT (func (BASE "dir/file", st1.st_uid, st1.st_gid) == 0); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_ctime < st2.st_ctime - || (st1.st_ctime == st2.st_ctime - && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2))); - - /* Test symlink behavior. */ - if (symlink ("link", BASE "dir/link2")) - { - ASSERT (unlink (BASE "dir/file") == 0); - ASSERT (rmdir (BASE "dir") == 0); - if (print) - fputs ("skipping test: symlinks not supported on this file system\n", - stderr); - return 77; - } - result = func (BASE "dir/link2", -1, -1); - if (result == -1 && errno == ENOSYS) - { - ASSERT (unlink (BASE "dir/file") == 0); - ASSERT (unlink (BASE "dir/link2") == 0); - ASSERT (rmdir (BASE "dir") == 0); - if (print) - fputs ("skipping test: symlink ownership not supported\n", stderr); - return 77; - } - ASSERT (result == 0); - errno = 0; - ASSERT (func (BASE "dir/link2/", st1.st_uid, st1.st_gid) == -1); - ASSERT (errno == ENOENT); - ASSERT (symlink ("file", BASE "dir/link") == 0); - ASSERT (mkdir (BASE "dir/sub", 0700) == 0); - ASSERT (symlink ("sub", BASE "dir/link3") == 0); - - /* For non-privileged users, lchown can only portably succeed at - changing group ownership of a file we own. If we belong to at - least two groups, then verifying the correct change is simple. - But if we belong to only one group, then we fall back on the - other observable effect of lchown: the ctime must be updated. */ - gids_count = mgetgroups (NULL, st1.st_gid, &gids); - if (1 < gids_count) - { - ASSERT (gids[1] != st1.st_gid); - ASSERT (gids[1] != (gid_t) -1); - ASSERT (lstat (BASE "dir/link", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/link2", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - - errno = 0; - ASSERT (func (BASE "dir/link2/", -1, gids[1]) == -1); - ASSERT (errno == ENOTDIR); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/link", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/link2", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - - ASSERT (func (BASE "dir/link2", -1, gids[1]) == 0); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/link", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/link2", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (gids[1] == st2.st_gid); - - /* Trailing slash follows through to directory. */ - ASSERT (lstat (BASE "dir/link3", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/sub", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - - ASSERT (func (BASE "dir/link3/", -1, gids[1]) == 0); - ASSERT (lstat (BASE "dir/link3", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (st1.st_gid == st2.st_gid); - ASSERT (lstat (BASE "dir/sub", &st2) == 0); - ASSERT (st1.st_uid == st2.st_uid); - ASSERT (gids[1] == st2.st_gid); - } - else if (!CHOWN_CHANGE_TIME_BUG || HAVE_LCHMOD) - { - /* If we don't have lchmod, and lchown fails to change ctime, - then we can't test this part of lchown. */ - struct stat l1; - struct stat l2; - ASSERT (stat (BASE "dir/file", &st1) == 0); - ASSERT (lstat (BASE "dir/link", &l1) == 0); - ASSERT (lstat (BASE "dir/link2", &l2) == 0); - - nap (); - errno = 0; - ASSERT (func (BASE "dir/link2/", -1, st1.st_gid) == -1); - ASSERT (errno == ENOTDIR); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&st1) == get_stat_ctime_ns (&st2)); - ASSERT (lstat (BASE "dir/link", &st2) == 0); - ASSERT (l1.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&l1) == get_stat_ctime_ns (&st2)); - ASSERT (lstat (BASE "dir/link2", &st2) == 0); - ASSERT (l2.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&l2) == get_stat_ctime_ns (&st2)); - - ASSERT (func (BASE "dir/link2", -1, st1.st_gid) == 0); - ASSERT (stat (BASE "dir/file", &st2) == 0); - ASSERT (st1.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&st1) == get_stat_ctime_ns (&st2)); - ASSERT (lstat (BASE "dir/link", &st2) == 0); - ASSERT (l1.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&l1) == get_stat_ctime_ns (&st2)); - ASSERT (lstat (BASE "dir/link2", &st2) == 0); - ASSERT (l2.st_ctime < st2.st_ctime - || (l2.st_ctime == st2.st_ctime - && get_stat_ctime_ns (&l2) < get_stat_ctime_ns (&st2))); - - /* Trailing slash follows through to directory. */ - ASSERT (lstat (BASE "dir/sub", &st1) == 0); - ASSERT (lstat (BASE "dir/link3", &l1) == 0); - nap (); - ASSERT (func (BASE "dir/link3/", -1, st1.st_gid) == 0); - ASSERT (lstat (BASE "dir/link3", &st2) == 0); - ASSERT (l1.st_ctime == st2.st_ctime); - ASSERT (get_stat_ctime_ns (&l1) == get_stat_ctime_ns (&st2)); - ASSERT (lstat (BASE "dir/sub", &st2) == 0); - ASSERT (st1.st_ctime < st2.st_ctime - || (st1.st_ctime == st2.st_ctime - && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2))); - } - - /* Cleanup. */ - free (gids); - ASSERT (unlink (BASE "dir/file") == 0); - ASSERT (unlink (BASE "dir/link") == 0); - ASSERT (unlink (BASE "dir/link2") == 0); - ASSERT (unlink (BASE "dir/link3") == 0); - ASSERT (rmdir (BASE "dir/sub") == 0); - ASSERT (rmdir (BASE "dir") == 0); - return 0; -} diff --git a/tests/test-listen.c b/tests/test-listen.c new file mode 100644 index 0000000..f2e6c06 --- /dev/null +++ b/tests/test-listen.c @@ -0,0 +1,49 @@ +/* Test listen() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (listen, int, (int, int)); + +#include +#include + +#include "sockets.h" +#include "macros.h" + +int +main (void) +{ + (void) gl_sockets_startup (SOCKETS_1_1); + + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (listen (-1, 1) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (listen (99 ,1) == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff --git a/tests/test-locale.c b/tests/test-locale.c index 9b55e37..cf4e6e8 100644 --- a/tests/test-locale.c +++ b/tests/test-locale.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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,10 @@ int a[] = locale_t b = LC_GLOBAL_LOCALE; #endif +/* Check that the 'struct lconv' type is defined. */ +struct lconv l; +int ls; + /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ verify (sizeof NULL == sizeof (void *)); @@ -45,5 +49,31 @@ verify (sizeof NULL == sizeof (void *)); int main () { + /* Check that 'struct lconv' has the ISO C and POSIX specified members. */ + ls += sizeof (*l.decimal_point); + ls += sizeof (*l.thousands_sep); + ls += sizeof (*l.grouping); + ls += sizeof (*l.mon_decimal_point); + ls += sizeof (*l.mon_thousands_sep); + ls += sizeof (*l.mon_grouping); + ls += sizeof (*l.positive_sign); + ls += sizeof (*l.negative_sign); + ls += sizeof (*l.currency_symbol); + ls += sizeof (l.frac_digits); + ls += sizeof (l.p_cs_precedes); + ls += sizeof (l.p_sign_posn); + ls += sizeof (l.p_sep_by_space); + ls += sizeof (l.n_cs_precedes); + ls += sizeof (l.n_sign_posn); + ls += sizeof (l.n_sep_by_space); + ls += sizeof (*l.int_curr_symbol); + ls += sizeof (l.int_frac_digits); + ls += sizeof (l.int_p_cs_precedes); + ls += sizeof (l.int_p_sign_posn); + ls += sizeof (l.int_p_sep_by_space); + ls += sizeof (l.int_n_cs_precedes); + ls += sizeof (l.int_n_sign_posn); + ls += sizeof (l.int_n_sep_by_space); + return 0; } diff --git a/tests/test-localeconv.c b/tests/test-localeconv.c new file mode 100644 index 0000000..9cd22af --- /dev/null +++ b/tests/test-localeconv.c @@ -0,0 +1,72 @@ +/* Test of localeconv() function. + Copyright (C) 2012-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2012. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (localeconv, struct lconv *, (void)); + +#include +#include + +#include "macros.h" + +int +main () +{ + /* Test localeconv() result in the "C" locale. */ + { + struct lconv *l = localeconv (); + + ASSERT (STREQ (l->decimal_point, ".")); + ASSERT (STREQ (l->thousands_sep, "")); +#if !(defined __FreeBSD__ || defined __sun) + ASSERT (STREQ (l->grouping, "")); +#endif + + ASSERT (STREQ (l->mon_decimal_point, "")); + ASSERT (STREQ (l->mon_thousands_sep, "")); +#if !(defined __FreeBSD__ || defined __sun) + ASSERT (STREQ (l->mon_grouping, "")); +#endif + ASSERT (STREQ (l->positive_sign, "")); + ASSERT (STREQ (l->negative_sign, "")); + + ASSERT (STREQ (l->currency_symbol, "")); + ASSERT (l->frac_digits == CHAR_MAX); + ASSERT (l->p_cs_precedes == CHAR_MAX); + ASSERT (l->p_sign_posn == CHAR_MAX); + ASSERT (l->p_sep_by_space == CHAR_MAX); + ASSERT (l->n_cs_precedes == CHAR_MAX); + ASSERT (l->n_sign_posn == CHAR_MAX); + ASSERT (l->n_sep_by_space == CHAR_MAX); + + ASSERT (STREQ (l->int_curr_symbol, "")); + ASSERT (l->int_frac_digits == CHAR_MAX); + ASSERT (l->int_p_cs_precedes == CHAR_MAX); + ASSERT (l->int_p_sign_posn == CHAR_MAX); + ASSERT (l->int_p_sep_by_space == CHAR_MAX); + ASSERT (l->int_n_cs_precedes == CHAR_MAX); + ASSERT (l->int_n_sign_posn == CHAR_MAX); + ASSERT (l->int_n_sep_by_space == CHAR_MAX); + } + + return 0; +} diff --git a/tests/test-localename.c b/tests/test-localename.c index 09f002c..df6c1d6 100644 --- a/tests/test-localename.c +++ b/tests/test-localename.c @@ -1,5 +1,5 @@ /* Test of gl_locale_name function and its variants. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -715,7 +715,7 @@ test_locale_name_default (void) ASSERT (name != NULL); - /* Only MacOS X and Windows have a facility for the user to set the default + /* Only Mac OS X and Windows have a facility for the user to set the default locale. */ #if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)) ASSERT (strcmp (name, "C") == 0); diff --git a/tests/test-lock.c b/tests/test-lock.c index 04ce076..fd2ed26 100644 --- a/tests/test-lock.c +++ b/tests/test-lock.c @@ -1,5 +1,5 @@ /* Test of locking in multithreaded situations. - Copyright (C) 2005, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2008-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ #include -#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WIN32_THREADS +#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WINDOWS_THREADS #if USE_POSIX_THREADS # define TEST_POSIX_THREADS 1 @@ -29,8 +29,8 @@ #if USE_PTH_THREADS # define TEST_PTH_THREADS 1 #endif -#if USE_WIN32_THREADS -# define TEST_WIN32_THREADS 1 +#if USE_WINDOWS_THREADS +# define TEST_WINDOWS_THREADS 1 #endif /* Whether to enable locking. @@ -69,7 +69,7 @@ # undef USE_POSIX_THREADS # undef USE_SOLARIS_THREADS # undef USE_PTH_THREADS -# undef USE_WIN32_THREADS +# undef USE_WINDOWS_THREADS #endif #include "glthread/lock.h" @@ -83,8 +83,8 @@ # if TEST_PTH_THREADS # define USE_PTH_THREADS 1 # endif -# if TEST_WIN32_THREADS -# define USE_WIN32_THREADS 1 +# if TEST_WINDOWS_THREADS +# define USE_WINDOWS_THREADS 1 # endif #endif @@ -143,9 +143,9 @@ lock_mutator_thread (void *arg) { int i1, i2, value; - dbgprintf ("Mutator %p before lock\n", gl_thread_self ()); + dbgprintf ("Mutator %p before lock\n", gl_thread_self_pointer ()); gl_lock_lock (my_lock); - dbgprintf ("Mutator %p after lock\n", gl_thread_self ()); + dbgprintf ("Mutator %p after lock\n", gl_thread_self_pointer ()); i1 = random_account (); i2 = random_account (); @@ -153,20 +153,20 @@ lock_mutator_thread (void *arg) account[i1] += value; account[i2] -= value; - dbgprintf ("Mutator %p before unlock\n", gl_thread_self ()); + dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ()); gl_lock_unlock (my_lock); - dbgprintf ("Mutator %p after unlock\n", gl_thread_self ()); + dbgprintf ("Mutator %p after unlock\n", gl_thread_self_pointer ()); - dbgprintf ("Mutator %p before check lock\n", gl_thread_self ()); + dbgprintf ("Mutator %p before check lock\n", gl_thread_self_pointer ()); gl_lock_lock (my_lock); check_accounts (); gl_lock_unlock (my_lock); - dbgprintf ("Mutator %p after check unlock\n", gl_thread_self ()); + dbgprintf ("Mutator %p after check unlock\n", gl_thread_self_pointer ()); yield (); } - dbgprintf ("Mutator %p dying.\n", gl_thread_self ()); + dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ()); return NULL; } @@ -177,16 +177,16 @@ lock_checker_thread (void *arg) { while (!lock_checker_done) { - dbgprintf ("Checker %p before check lock\n", gl_thread_self ()); + dbgprintf ("Checker %p before check lock\n", gl_thread_self_pointer ()); gl_lock_lock (my_lock); check_accounts (); gl_lock_unlock (my_lock); - dbgprintf ("Checker %p after check unlock\n", gl_thread_self ()); + dbgprintf ("Checker %p after check unlock\n", gl_thread_self_pointer ()); yield (); } - dbgprintf ("Checker %p dying.\n", gl_thread_self ()); + dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ()); return NULL; } @@ -233,9 +233,9 @@ rwlock_mutator_thread (void *arg) { int i1, i2, value; - dbgprintf ("Mutator %p before wrlock\n", gl_thread_self ()); + dbgprintf ("Mutator %p before wrlock\n", gl_thread_self_pointer ()); gl_rwlock_wrlock (my_rwlock); - dbgprintf ("Mutator %p after wrlock\n", gl_thread_self ()); + dbgprintf ("Mutator %p after wrlock\n", gl_thread_self_pointer ()); i1 = random_account (); i2 = random_account (); @@ -243,14 +243,14 @@ rwlock_mutator_thread (void *arg) account[i1] += value; account[i2] -= value; - dbgprintf ("Mutator %p before unlock\n", gl_thread_self ()); + dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ()); gl_rwlock_unlock (my_rwlock); - dbgprintf ("Mutator %p after unlock\n", gl_thread_self ()); + dbgprintf ("Mutator %p after unlock\n", gl_thread_self_pointer ()); yield (); } - dbgprintf ("Mutator %p dying.\n", gl_thread_self ()); + dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ()); return NULL; } @@ -261,16 +261,16 @@ rwlock_checker_thread (void *arg) { while (!rwlock_checker_done) { - dbgprintf ("Checker %p before check rdlock\n", gl_thread_self ()); + dbgprintf ("Checker %p before check rdlock\n", gl_thread_self_pointer ()); gl_rwlock_rdlock (my_rwlock); check_accounts (); gl_rwlock_unlock (my_rwlock); - dbgprintf ("Checker %p after check unlock\n", gl_thread_self ()); + dbgprintf ("Checker %p after check unlock\n", gl_thread_self_pointer ()); yield (); } - dbgprintf ("Checker %p dying.\n", gl_thread_self ()); + dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ()); return NULL; } @@ -315,9 +315,9 @@ recshuffle (void) { int i1, i2, value; - dbgprintf ("Mutator %p before lock\n", gl_thread_self ()); + dbgprintf ("Mutator %p before lock\n", gl_thread_self_pointer ()); gl_recursive_lock_lock (my_reclock); - dbgprintf ("Mutator %p after lock\n", gl_thread_self ()); + dbgprintf ("Mutator %p after lock\n", gl_thread_self_pointer ()); i1 = random_account (); i2 = random_account (); @@ -329,9 +329,9 @@ recshuffle (void) if (((unsigned int) rand () >> 3) % 2) recshuffle (); - dbgprintf ("Mutator %p before unlock\n", gl_thread_self ()); + dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ()); gl_recursive_lock_unlock (my_reclock); - dbgprintf ("Mutator %p after unlock\n", gl_thread_self ()); + dbgprintf ("Mutator %p after unlock\n", gl_thread_self_pointer ()); } static void * @@ -343,16 +343,16 @@ reclock_mutator_thread (void *arg) { recshuffle (); - dbgprintf ("Mutator %p before check lock\n", gl_thread_self ()); + dbgprintf ("Mutator %p before check lock\n", gl_thread_self_pointer ()); gl_recursive_lock_lock (my_reclock); check_accounts (); gl_recursive_lock_unlock (my_reclock); - dbgprintf ("Mutator %p after check unlock\n", gl_thread_self ()); + dbgprintf ("Mutator %p after check unlock\n", gl_thread_self_pointer ()); yield (); } - dbgprintf ("Mutator %p dying.\n", gl_thread_self ()); + dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ()); return NULL; } @@ -363,16 +363,16 @@ reclock_checker_thread (void *arg) { while (!reclock_checker_done) { - dbgprintf ("Checker %p before check lock\n", gl_thread_self ()); + dbgprintf ("Checker %p before check lock\n", gl_thread_self_pointer ()); gl_recursive_lock_lock (my_reclock); check_accounts (); gl_recursive_lock_unlock (my_reclock); - dbgprintf ("Checker %p after check unlock\n", gl_thread_self ()); + dbgprintf ("Checker %p after check unlock\n", gl_thread_self_pointer ()); yield (); } - dbgprintf ("Checker %p dying.\n", gl_thread_self ()); + dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ()); return NULL; } @@ -444,7 +444,7 @@ once_contender_thread (void *arg) break; dbgprintf ("Contender %p waiting for signal for round %d\n", - gl_thread_self (), repeat); + gl_thread_self_pointer (), repeat); #if ENABLE_LOCKING /* Wait for the signal to go. */ gl_rwlock_rdlock (fire_signal[repeat]); @@ -456,7 +456,7 @@ once_contender_thread (void *arg) yield (); #endif dbgprintf ("Contender %p got the signal for round %d\n", - gl_thread_self (), repeat); + gl_thread_self_pointer (), repeat); /* Contend for execution. */ gl_once (once_control, once_execute); @@ -495,7 +495,7 @@ test_once (void) for (repeat = 0; repeat <= REPEAT_COUNT; repeat++) { /* Wait until every thread is ready. */ - dbgprintf ("Main thread before synchonizing for round %d\n", repeat); + dbgprintf ("Main thread before synchronizing for round %d\n", repeat); for (;;) { int ready_count = 0; @@ -509,7 +509,7 @@ test_once (void) break; yield (); } - dbgprintf ("Main thread after synchonizing for round %d\n", repeat); + dbgprintf ("Main thread after synchronizing for round %d\n", repeat); if (repeat > 0) { diff --git a/tests/test-lseek.c b/tests/test-lseek.c index ce2263c..fc37ec2 100644 --- a/tests/test-lseek.c +++ b/tests/test-lseek.c @@ -1,5 +1,5 @@ /* Test of lseek() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -81,12 +81,25 @@ main (int argc, char **argv) invoking shell are not enough on HP-UX. */ close (0); close (1); + errno = 0; ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == EBADF); + errno = 0; ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1); ASSERT (errno == EBADF); + + /* Test behaviour for invalid file descriptors. */ + errno = 0; + ASSERT (lseek (-1, (off_t)0, SEEK_CUR) == -1); + ASSERT (errno == EBADF); + + close (99); + errno = 0; + ASSERT (lseek (99, (off_t)0, SEEK_CUR) == -1); + ASSERT (errno == EBADF); + break; default: diff --git a/tests/test-lstat.c b/tests/test-lstat.c index 372e056..eab2ad4 100644 --- a/tests/test-lstat.c +++ b/tests/test-lstat.c @@ -1,5 +1,5 @@ /* Test of lstat() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-lstat.h b/tests/test-lstat.h index 883c4e8..45ca3bf 100644 --- a/tests/test-lstat.h +++ b/tests/test-lstat.h @@ -1,5 +1,5 @@ /* Test of lstat() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-malloc-gnu.c b/tests/test-malloc-gnu.c index c2a3d6b..773dee5 100644 --- a/tests/test-malloc-gnu.c +++ b/tests/test-malloc-gnu.c @@ -1,5 +1,5 @@ /* Test of malloc function. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2014 Free Software Foundation, Inc. This 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/tests/test-malloca.c b/tests/test-malloca.c index 92c86f2..6f94d0d 100644 --- a/tests/test-malloca.c +++ b/tests/test-malloca.c @@ -1,5 +1,5 @@ /* Test of safe automatic memory allocation. - Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2007, 2009-2014 Free Software Foundation, Inc. This 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/tests/test-math.c b/tests/test-math.c index 8565925..f3975ee 100644 --- a/tests/test-math.c +++ b/tests/test-math.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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,35 @@ choke me #endif +#ifndef HUGE_VALF +# error HUGE_VALF should be defined +choke me +#endif + +#ifndef HUGE_VAL +# error HUGE_VAL should be defined +choke me +#endif + +#ifndef HUGE_VALL +# error HUGE_VALL should be defined +choke me +#endif + +#ifndef FP_ILOGB0 +# error FP_ILOGB0 should be defined +choke me +#endif + +#ifndef FP_ILOGBNAN +# error FP_ILOGBNAN should be defined +choke me +#endif + +#include + +#include "macros.h" + #if 0 /* Check that NAN expands into a constant expression. */ static float n = NAN; @@ -34,7 +63,17 @@ static float n = NAN; This is a separate function because IRIX 6.5 "cc -O" miscompiles an 'x == x' test. */ static int -numeric_equal (double x, double y) +numeric_equalf (float x, float y) +{ + return x == y; +} +static int +numeric_equald (double x, double y) +{ + return x == y; +} +static int +numeric_equall (long double x, long double y) { return x == y; } @@ -44,10 +83,22 @@ main (void) { double d = NAN; double zero = 0.0; - if (numeric_equal (d, d)) - return 1; + ASSERT (!numeric_equald (d, d)); + d = HUGE_VAL; - if (!numeric_equal (d, 1.0 / zero)) - return 1; + ASSERT (numeric_equald (d, 1.0 / zero)); + + ASSERT (numeric_equalf (HUGE_VALF, HUGE_VALF + HUGE_VALF)); + + ASSERT (numeric_equald (HUGE_VAL, HUGE_VAL + HUGE_VAL)); + + ASSERT (numeric_equall (HUGE_VALL, HUGE_VALL + HUGE_VALL)); + + /* Check the value of FP_ILOGB0. */ + ASSERT (FP_ILOGB0 == INT_MIN || FP_ILOGB0 == - INT_MAX); + + /* Check the value of FP_ILOGBNAN. */ + ASSERT (FP_ILOGBNAN == INT_MIN || FP_ILOGBNAN == INT_MAX); + return 0; } diff --git a/tests/test-mbrtowc-w32.c b/tests/test-mbrtowc-w32.c index ee8caf9..06f07aa 100644 --- a/tests/test-mbrtowc-w32.c +++ b/tests/test-mbrtowc-w32.c @@ -1,5 +1,5 @@ /* Test of conversion of multibyte character to wide character. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-mbrtowc.c b/tests/test-mbrtowc.c index 727016a..f64af4f 100644 --- a/tests/test-mbrtowc.c +++ b/tests/test-mbrtowc.c @@ -1,5 +1,5 @@ /* Test of conversion of multibyte character to wide character. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-mbscasestr1.c b/tests/test-mbscasestr1.c index a1c476f..bc68746 100644 --- a/tests/test-mbscasestr1.c +++ b/tests/test-mbscasestr1.c @@ -1,5 +1,5 @@ /* Test of case-insensitive searching in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-mbscasestr2.c b/tests/test-mbscasestr2.c index f9e120c..44cd6e5 100644 --- a/tests/test-mbscasestr2.c +++ b/tests/test-mbscasestr2.c @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-mbscasestr3.c b/tests/test-mbscasestr3.c index 2585269..f2e39c6 100644 --- a/tests/test-mbscasestr3.c +++ b/tests/test-mbscasestr3.c @@ -1,5 +1,5 @@ /* Test of case-insensitive searching in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-mbscasestr4.c b/tests/test-mbscasestr4.c index 5cfaaa6..400cc5c 100644 --- a/tests/test-mbscasestr4.c +++ b/tests/test-mbscasestr4.c @@ -1,5 +1,5 @@ /* Test of case-insensitive searching in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-mbsinit.c b/tests/test-mbsinit.c index 2cc2924..56548db 100644 --- a/tests/test-mbsinit.c +++ b/tests/test-mbsinit.c @@ -1,5 +1,5 @@ /* Test of test for initial conversion state. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-mbsrtowcs.c b/tests/test-mbsrtowcs.c index 9a63ed9..079fa4c 100644 --- a/tests/test-mbsrtowcs.c +++ b/tests/test-mbsrtowcs.c @@ -1,5 +1,5 @@ /* Test of conversion of string to wide string. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-mbsstr1.c b/tests/test-mbsstr1.c index 8701d81..1e6f7e0 100644 --- a/tests/test-mbsstr1.c +++ b/tests/test-mbsstr1.c @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-mbsstr2.c b/tests/test-mbsstr2.c index 7eedc7e..2565128 100644 --- a/tests/test-mbsstr2.c +++ b/tests/test-mbsstr2.c @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-mbsstr3.c b/tests/test-mbsstr3.c index c7fa18b..e4d9a6d 100644 --- a/tests/test-mbsstr3.c +++ b/tests/test-mbsstr3.c @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-memchr.c b/tests/test-memchr.c index a11f6cd..223c8e7 100644 --- a/tests/test-memchr.c +++ b/tests/test-memchr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Free Software Foundation, Inc. + * Copyright (C) 2008-2014 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/tests/test-memrchr.c b/tests/test-memrchr.c index d6d36c0..16f0f80 100644 --- a/tests/test-memrchr.c +++ b/tests/test-memrchr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Free Software Foundation, Inc. + * Copyright (C) 2008-2014 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/tests/test-mkdir.c b/tests/test-mkdir.c deleted file mode 100644 index 86e6f8b..0000000 --- a/tests/test-mkdir.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Tests of mkdir. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (mkdir, int, (char const *, mode_t)); - -#include -#include -#include -#include -#include -#include - -#include "ignore-value.h" -#include "macros.h" - -#define BASE "test-mkdir.t" - -#include "test-mkdir.h" - -int -main (void) -{ - /* Clean up any trash from prior testsuite runs. */ - ignore_value (system ("rm -rf " BASE "*")); - - return test_mkdir (mkdir, true); -} diff --git a/tests/test-mkdir.h b/tests/test-mkdir.h deleted file mode 100644 index 62e8ec4..0000000 --- a/tests/test-mkdir.h +++ /dev/null @@ -1,98 +0,0 @@ -/* Test of mkdir() function. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* This file is designed to test both mkdir(a,b) and - mkdirat(AT_FDCWD,a,b). FUNC is the function to test. Assumes that - BASE and ASSERT are already defined, and that appropriate headers - are already included. If PRINT, warn before skipping tests with - status 77 when symlinks are unsupported. */ - -static int -test_mkdir (int (*func) (char const *, mode_t), bool print) -{ - /* Test basic error handling. */ - ASSERT (close (creat (BASE "file", 0600)) == 0); - errno = 0; - ASSERT (func (BASE "file", 0700) == -1); - ASSERT (errno == EEXIST); - errno = 0; - ASSERT (func (BASE "file/", 0700) == -1); - ASSERT (errno == ENOTDIR || errno == EEXIST); - errno = 0; - ASSERT (func (BASE "file/dir", 0700) == -1); - ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EOPNOTSUPP); - ASSERT (unlink (BASE "file") == 0); - errno = 0; - ASSERT (func ("", 0700) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func (BASE "dir/sub", 0700) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func (BASE "dir/.", 0700) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func (BASE "dir/.//", 0700) == -1); - ASSERT (errno == ENOENT); - - /* Test trailing slash handling. */ - ASSERT (func (BASE "dir", 0700) == 0); - errno = 0; - ASSERT (func (BASE "dir", 0700) == -1); - ASSERT (errno == EEXIST); - ASSERT (rmdir (BASE "dir") == 0); - ASSERT (func (BASE "dir/", 0700) == 0); - errno = 0; - ASSERT (func (BASE "dir/", 0700) == -1); - ASSERT (errno == EEXIST); - ASSERT (rmdir (BASE "dir") == 0); - - /* Test symlink behavior. POSIX requires the creation of - directories through a dangling symlink with trailing slash, but - GNU does not yet implement that, so we support either behavior - for now. */ - if (symlink (BASE "dir", BASE "link")) - { - if (print) - fputs ("skipping test: symlinks not supported on this file system\n", - stderr); - return 77; - } - errno = 0; - ASSERT (func (BASE "link", 0700) == -1); - ASSERT (errno == EEXIST); - { - int result; - errno = 0; - result = func (BASE "link/", 0700); - if (!result) - ASSERT (rmdir (BASE "dir") == 0); - else - { - ASSERT (result == -1); - ASSERT (errno == EEXIST); - errno = 0; - ASSERT (rmdir (BASE "dir") == -1); - ASSERT (errno == ENOENT); - } - } - errno = 0; - ASSERT (func (BASE "link/.", 0700) == -1); - ASSERT (errno == ENOENT); - ASSERT (unlink (BASE "link") == 0); - - return 0; -} diff --git a/tests/test-mkdirat.c b/tests/test-mkdirat.c deleted file mode 100644 index 89dfafc..0000000 --- a/tests/test-mkdirat.c +++ /dev/null @@ -1,85 +0,0 @@ -/* Tests of mkdirat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (mkdirat, int, (int, char const *, mode_t)); - -#include -#include -#include -#include -#include -#include - -#include "ignore-value.h" -#include "macros.h" - -#define BASE "test-mkdirat.t" - -#include "test-mkdir.h" - -static int dfd = AT_FDCWD; - -/* Wrapper to test mkdirat like mkdir. */ -static int -do_mkdir (char const *name, mode_t mode) -{ - return mkdirat (dfd, name, mode); -} - -int -main (void) -{ - int result; - - /* Clean up any trash from prior testsuite runs. */ - ignore_value (system ("rm -rf " BASE "*")); - - /* Test basic mkdir functionality. */ - result = test_mkdir (do_mkdir, false); - dfd = open (".", O_RDONLY); - ASSERT (0 <= dfd); - ASSERT (test_mkdir (do_mkdir, false) == result); - - /* Tests specific to mkdirat. */ - ASSERT (mkdirat (dfd, BASE "dir1", 0700) == 0); - ASSERT (chdir (BASE "dir1") == 0); - ASSERT (close (dfd) == 0); - dfd = open ("..", O_RDONLY); - ASSERT (0 <= dfd); - ASSERT (mkdirat (dfd, BASE "dir2", 0700) == 0); - ASSERT (close (dfd) == 0); - errno = 0; - ASSERT (mkdirat (dfd, BASE "dir3", 0700) == -1); - ASSERT (errno == EBADF); - dfd = open ("/dev/null", O_RDONLY); - ASSERT (0 <= dfd); - errno = 0; - ASSERT (mkdirat (dfd, "dir3", 0700) == -1); - ASSERT (errno == ENOTDIR); - ASSERT (close (dfd) == 0); - ASSERT (chdir ("..") == 0); - ASSERT (rmdir (BASE "dir1") == 0); - ASSERT (rmdir (BASE "dir2") == 0); - - return result; -} diff --git a/tests/test-modf.c b/tests/test-modf.c index c1b3cc1..de1ae3c 100644 --- a/tests/test-modf.c +++ b/tests/test-modf.c @@ -1,5 +1,5 @@ /* Test of modf() function. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2014 Free Software Foundation, Inc. This 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,11 +23,16 @@ #include "signature.h" SIGNATURE_CHECK (modf, double, (double, double *)); +#include + #include "macros.h" -volatile double x; -double y; -double z; +#define DOUBLE double +#define L_(literal) literal +#define MANT_DIG DBL_MANT_DIG +#define MODF modf +#define RANDOM randomd +#include "test-modf.h" int main () @@ -41,8 +46,10 @@ main () /* A particular negative value. */ x = -5.972406760; y = modf (x, &z); - ASSERT (y >= -0.972406761 && y <= 0.972406759); + ASSERT (y >= -0.972406761 && y <= -0.972406759); ASSERT (z == -5.0); + test_function (); + return 0; } diff --git a/tests/test-modf.h b/tests/test-modf.h new file mode 100644 index 0000000..750100f --- /dev/null +++ b/tests/test-modf.h @@ -0,0 +1,62 @@ +/* Test of modf*() function family. + Copyright (C) 2012-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +static void +test_function (void) +{ + int i; + const DOUBLE TWO_MANT_DIG = + /* Assume MANT_DIG <= 5 * 31. + Use the identity + n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5). */ + (DOUBLE) (1U << ((MANT_DIG - 1) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5)); + + /* Randomized tests. */ + for (i = 0; i < SIZEOF (RANDOM); i++) + { + DOUBLE x = RANDOM[i]; /* 0.0 <= x < 1.0 */ + DOUBLE y; + DOUBLE z; + + y = MODF (x, &z); + ASSERT (z == L_(0.0)); + ASSERT (y == x); + + y = MODF (- x, &z); + ASSERT (z == L_(0.0)); + ASSERT (y == - x); + + y = MODF (L_(1.0) + x, &z); + ASSERT (z == L_(1.0)); + y -= x; + ASSERT (y >= - L_(1.0) / TWO_MANT_DIG); + ASSERT (y <= L_(1.0) / TWO_MANT_DIG); + + y = MODF (- L_(1.0) - x, &z); + ASSERT (z == - L_(1.0)); + y -= - x; + ASSERT (y >= - L_(1.0) / TWO_MANT_DIG); + ASSERT (y <= L_(1.0) / TWO_MANT_DIG); + } +} + +volatile DOUBLE x; +DOUBLE y; +DOUBLE z; diff --git a/tests/test-nanosleep.c b/tests/test-nanosleep.c new file mode 100644 index 0000000..b775b85 --- /dev/null +++ b/tests/test-nanosleep.c @@ -0,0 +1,83 @@ +/* Test of nanosleep() function. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake , 2009. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (nanosleep, int, (struct timespec const *, struct timespec *)); + +#include +#include +#include + +#include "macros.h" + +#if HAVE_DECL_ALARM +static void +handle_alarm (int sig) +{ + if (sig != SIGALRM) + _exit (1); +} +#endif + +int +main (void) +{ + struct timespec ts; + + ts.tv_sec = 1000; + ts.tv_nsec = -1; + errno = 0; + ASSERT (nanosleep (&ts, NULL) == -1); + ASSERT (errno == EINVAL); + ts.tv_nsec = 1000000000; + errno = 0; + ASSERT (nanosleep (&ts, NULL) == -1); + ASSERT (errno == EINVAL); + + ts.tv_sec = 0; + ts.tv_nsec = 1; + ASSERT (nanosleep (&ts, &ts) == 0); + /* Remaining time is only defined on EINTR failure; but on success, + it is typically either 0 or unchanged from input. At any rate, + it shouldn't be randomly changed to unrelated values. */ + ASSERT (ts.tv_sec == 0); + ASSERT (ts.tv_nsec == 0 || ts.tv_nsec == 1); + ts.tv_nsec = 0; + ASSERT (nanosleep (&ts, NULL) == 0); + +#if HAVE_DECL_ALARM + { + const time_t pentecost = 50 * 24 * 60 * 60; /* 50 days. */ + signal (SIGALRM, handle_alarm); + alarm (1); + ts.tv_sec = pentecost; + ts.tv_nsec = 999999999; + errno = 0; + ASSERT (nanosleep (&ts, &ts) == -1); + ASSERT (errno == EINTR); + ASSERT (pentecost - 10 < ts.tv_sec && ts.tv_sec <= pentecost); + ASSERT (0 <= ts.tv_nsec && ts.tv_nsec <= 999999999); + } +#endif + + return 0; +} diff --git a/tests/test-netinet_in.c b/tests/test-netinet_in.c new file mode 100644 index 0000000..5a9754a --- /dev/null +++ b/tests/test-netinet_in.c @@ -0,0 +1,27 @@ +/* Test of substitute. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +int +main (void) +{ + return 0; +} diff --git a/tests/test-nl_langinfo.c b/tests/test-nl_langinfo.c index 964ea8d..06a4c9d 100644 --- a/tests/test-nl_langinfo.c +++ b/tests/test-nl_langinfo.c @@ -1,5 +1,5 @@ /* Test of nl_langinfo replacement. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-open.c b/tests/test-open.c index 3c5b2ab..985d901 100644 --- a/tests/test-open.c +++ b/tests/test-open.c @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-open.h b/tests/test-open.h index 3e5c5e1..d7bd5af 100644 --- a/tests/test-open.h +++ b/tests/test-open.h @@ -1,5 +1,5 @@ /* Test of opening a file descriptor. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,13 +16,22 @@ /* Written by Bruno Haible , 2007. */ +/* Make test_open always inline if we're using Fortify, which defines + __always_inline to do that. Do nothing otherwise. This works + around a glibc bug whereby 'open' cannot be used as a function + pointer when _FORTIFY_SOURCE is positive. */ + +#ifndef __always_inline +#define __always_inline +#endif + /* This file is designed to test both open(n,buf[,mode]) and openat(AT_FDCWD,n,buf[,mode]). FUNC is the function to test. Assumes that BASE and ASSERT are already defined, and that appropriate headers are already included. If PRINT, warn before skipping symlink tests with status 77. */ -static int +static __always_inline int test_open (int (*func) (char const *, int, ...), bool print) { int fd; @@ -63,6 +72,12 @@ test_open (int (*func) (char const *, int, ...), bool print) ASSERT (write (fd, "c", 1) == 1); ASSERT (close (fd) == 0); + /* Although O_NONBLOCK on regular files can be ignored, it must not + cause a failure. */ + fd = func (BASE "file", O_NONBLOCK | O_RDONLY); + ASSERT (0 <= fd); + ASSERT (close (fd) == 0); + /* Symlink handling, where supported. */ if (symlink (BASE "file", BASE "link") != 0) { diff --git a/tests/test-openat-safer.c b/tests/test-openat-safer.c index 1c6774f..9544b8b 100644 --- a/tests/test-openat-safer.c +++ b/tests/test-openat-safer.c @@ -1,5 +1,5 @@ /* Test that openat_safer leave standard fds alone. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-openat.c b/tests/test-openat.c index fd34638..ed50507 100644 --- a/tests/test-openat.c +++ b/tests/test-openat.c @@ -1,5 +1,5 @@ /* Test that openat works. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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 @@ SIGNATURE_CHECK (openat, int, (int, char const *, int, ...)); #include #include +#include "progname.h" #include "macros.h" #define BASE "test-openat.t" @@ -58,10 +59,25 @@ do_open (char const *name, int flags, ...) } int -main (void) +main (int argc _GL_UNUSED, char *argv[]) { int result; + set_program_name (argv[0]); + + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (openat (-1, "foo", O_RDONLY) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (openat (99, "foo", O_RDONLY) == -1); + ASSERT (errno == EBADF); + } + /* Basic checks. */ result = test_open (do_open, false); dfd = open (".", O_RDONLY); diff --git a/tests/test-parse-datetime.c b/tests/test-parse-datetime.c index 45dbae6..25385ca 100644 --- a/tests/test-parse-datetime.c +++ b/tests/test-parse-datetime.c @@ -1,5 +1,5 @@ /* Test of parse_datetime() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Simon Josefsson , 2008. */ @@ -30,13 +29,13 @@ #ifdef DEBUG #define LOG(str, now, res) \ - printf ("string `%s' diff %d %d\n", \ + printf ("string '%s' diff %d %d\n", \ str, res.tv_sec - now.tv_sec, res.tv_nsec - now.tv_nsec); #else #define LOG(str, now, res) (void) 0 #endif -static const char* const day_table[] = +static const char *const day_table[] = { "SUNDAY", "MONDAY", @@ -48,17 +47,175 @@ static const char* const day_table[] = NULL }; + +#if ! HAVE_TM_GMTOFF +/* Shift A right by B bits portably, by dividing A by 2**B and + truncating towards minus infinity. A and B should be free of side + effects, and B should be in the range 0 <= B <= INT_BITS - 2, where + INT_BITS is the number of useful bits in an int. GNU code can + assume that INT_BITS is at least 32. + + ISO C99 says that A >> B is implementation-defined if A < 0. Some + implementations (e.g., UNICOS 9.0 on a Cray Y-MP EL) don't shift + right in the usual way when A < 0, so SHR falls back on division if + ordinary A >> B doesn't seem to be the usual signed shift. */ +#define SHR(a, b) \ + (-1 >> 1 == -1 \ + ? (a) >> (b) \ + : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0)) + +#define TM_YEAR_BASE 1900 + +/* Yield the difference between *A and *B, + measured in seconds, ignoring leap seconds. + The body of this function is taken directly from the GNU C Library; + see src/strftime.c. */ +static long int +tm_diff (struct tm const *a, struct tm const *b) +{ + /* Compute intervening leap days correctly even if year is negative. + Take care to avoid int overflow in leap day calculations. */ + int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3); + int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3); + int a100 = a4 / 25 - (a4 % 25 < 0); + int b100 = b4 / 25 - (b4 % 25 < 0); + int a400 = SHR (a100, 2); + int b400 = SHR (b100, 2); + int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); + long int ayear = a->tm_year; + long int years = ayear - b->tm_year; + long int days = (365 * years + intervening_leap_days + + (a->tm_yday - b->tm_yday)); + return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) + + (a->tm_min - b->tm_min)) + + (a->tm_sec - b->tm_sec)); +} +#endif /* ! HAVE_TM_GMTOFF */ + +static long +gmt_offset (time_t s) +{ + long gmtoff; + +#if !HAVE_TM_GMTOFF + struct tm tm_local = *localtime (&s); + struct tm tm_gmt = *gmtime (&s); + + gmtoff = tm_diff (&tm_local, &tm_gmt); +#else + gmtoff = localtime (&s)->tm_gmtoff; +#endif + + return gmtoff; +} + int main (int argc _GL_UNUSED, char **argv) { struct timespec result; struct timespec result2; + struct timespec expected; struct timespec now; const char *p; int i; + long gmtoff; + time_t ref_time = 1304250918; set_program_name (argv[0]); + /* Set the time zone to US Eastern time with the 2012 rules. This + should disable any leap second support. Otherwise, there will be + a problem with glibc on sites that default to leap seconds; see + . */ + setenv ("TZ", "EST5EDT,M3.2.0,M11.1.0", 1); + + gmtoff = gmt_offset (ref_time); + + + /* ISO 8601 extended date and time of day representation, + 'T' separator, local time zone */ + p = "2011-05-01T11:55:18"; + expected.tv_sec = ref_time - gmtoff; + expected.tv_nsec = 0; + ASSERT (parse_datetime (&result, p, 0)); + LOG (p, expected, result); + ASSERT (expected.tv_sec == result.tv_sec + && expected.tv_nsec == result.tv_nsec); + + /* ISO 8601 extended date and time of day representation, + ' ' separator, local time zone */ + p = "2011-05-01 11:55:18"; + expected.tv_sec = ref_time - gmtoff; + expected.tv_nsec = 0; + ASSERT (parse_datetime (&result, p, 0)); + LOG (p, expected, result); + ASSERT (expected.tv_sec == result.tv_sec + && expected.tv_nsec == result.tv_nsec); + + + /* ISO 8601, extended date and time of day representation, + 'T' separator, UTC */ + p = "2011-05-01T11:55:18Z"; + expected.tv_sec = ref_time; + expected.tv_nsec = 0; + ASSERT (parse_datetime (&result, p, 0)); + LOG (p, expected, result); + ASSERT (expected.tv_sec == result.tv_sec + && expected.tv_nsec == result.tv_nsec); + + /* ISO 8601, extended date and time of day representation, + ' ' separator, UTC */ + p = "2011-05-01 11:55:18Z"; + expected.tv_sec = ref_time; + expected.tv_nsec = 0; + ASSERT (parse_datetime (&result, p, 0)); + LOG (p, expected, result); + ASSERT (expected.tv_sec == result.tv_sec + && expected.tv_nsec == result.tv_nsec); + + + /* ISO 8601 extended date and time of day representation, + 'T' separator, w/UTC offset */ + p = "2011-05-01T11:55:18-07:00"; + expected.tv_sec = 1304276118; + expected.tv_nsec = 0; + ASSERT (parse_datetime (&result, p, 0)); + LOG (p, expected, result); + ASSERT (expected.tv_sec == result.tv_sec + && expected.tv_nsec == result.tv_nsec); + + /* ISO 8601 extended date and time of day representation, + ' ' separator, w/UTC offset */ + p = "2011-05-01 11:55:18-07:00"; + expected.tv_sec = 1304276118; + expected.tv_nsec = 0; + ASSERT (parse_datetime (&result, p, 0)); + LOG (p, expected, result); + ASSERT (expected.tv_sec == result.tv_sec + && expected.tv_nsec == result.tv_nsec); + + + /* ISO 8601 extended date and time of day representation, + 'T' separator, w/hour only UTC offset */ + p = "2011-05-01T11:55:18-07"; + expected.tv_sec = 1304276118; + expected.tv_nsec = 0; + ASSERT (parse_datetime (&result, p, 0)); + LOG (p, expected, result); + ASSERT (expected.tv_sec == result.tv_sec + && expected.tv_nsec == result.tv_nsec); + + /* ISO 8601 extended date and time of day representation, + ' ' separator, w/hour only UTC offset */ + p = "2011-05-01 11:55:18-07"; + expected.tv_sec = 1304276118; + expected.tv_nsec = 0; + ASSERT (parse_datetime (&result, p, 0)); + LOG (p, expected, result); + ASSERT (expected.tv_sec == result.tv_sec + && expected.tv_nsec == result.tv_nsec); + + now.tv_sec = 4711; now.tv_nsec = 1267; p = "now"; @@ -173,6 +330,8 @@ main (int argc _GL_UNUSED, char **argv) ASSERT (!parse_datetime (&result, p, &now)); p = "UTC+4:00 tomorrow ago"; ASSERT (!parse_datetime (&result, p, &now)); + p = "UTC+4:00 tomorrow hence"; + ASSERT (!parse_datetime (&result, p, &now)); p = "UTC+4:00 40 now ago"; ASSERT (!parse_datetime (&result, p, &now)); p = "UTC+4:00 last tomorrow"; @@ -191,6 +350,11 @@ main (int argc _GL_UNUSED, char **argv) LOG (p, now, result2); ASSERT (result.tv_sec == result2.tv_sec && result.tv_nsec == result2.tv_nsec); + p = "UTC+400 1 day hence"; + ASSERT (parse_datetime (&result2, p, &now)); + LOG (p, now, result2); + ASSERT (result.tv_sec == result2.tv_sec + && result.tv_nsec == result2.tv_nsec); now.tv_sec = 4711; now.tv_nsec = 1267; p = "UTC+400 yesterday"; @@ -251,5 +415,25 @@ main (int argc _GL_UNUSED, char **argv) ASSERT (result.tv_sec == 24 * 3600 && result.tv_nsec == now.tv_nsec); + /* Exercise a sign-extension bug. Before July 2012, an input + starting with a high-bit-set byte would be treated like "0". */ + ASSERT ( ! parse_datetime (&result, "\xb0", &now)); + + /* Exercise TZ="" parsing code. */ + /* These two would infloop or segfault before Feb 2014. */ + ASSERT ( ! parse_datetime (&result, "TZ=\"\"\"", &now)); + ASSERT ( ! parse_datetime (&result, "TZ=\"\" \"", &now)); + /* Exercise invalid patterns. */ + ASSERT ( ! parse_datetime (&result, "TZ=\"", &now)); + ASSERT ( ! parse_datetime (&result, "TZ=\"\\\"", &now)); + ASSERT ( ! parse_datetime (&result, "TZ=\"\\n", &now)); + ASSERT ( ! parse_datetime (&result, "TZ=\"\\n\"", &now)); + /* Exercise valid patterns. */ + ASSERT ( parse_datetime (&result, "TZ=\"\"", &now)); + ASSERT ( parse_datetime (&result, "TZ=\"\" ", &now)); + ASSERT ( parse_datetime (&result, " TZ=\"\"", &now)); + ASSERT ( parse_datetime (&result, "TZ=\"\\\\\"", &now)); + ASSERT ( parse_datetime (&result, "TZ=\"\\\"\"", &now)); + return 0; } diff --git a/tests/test-pathmax.c b/tests/test-pathmax.c new file mode 100644 index 0000000..8bc7dbc --- /dev/null +++ b/tests/test-pathmax.c @@ -0,0 +1,32 @@ +/* Test of "pathmax.h". + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2011. */ + +#include + +#include "pathmax.h" + +/* Check that PATH_MAX is a constant if it is defined. */ +#ifdef PATH_MAX +int a = PATH_MAX; +#endif + +int +main (void) +{ + return 0; +} diff --git a/tests/test-perror.c b/tests/test-perror.c index d3751d8..c003faa 100644 --- a/tests/test-perror.c +++ b/tests/test-perror.c @@ -1,5 +1,5 @@ /* Test of perror() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #include diff --git a/tests/test-perror.sh b/tests/test-perror.sh index f2c8fdc..7274d32 100755 --- a/tests/test-perror.sh +++ b/tests/test-perror.sh @@ -1,27 +1,24 @@ #!/bin/sh - -tmpfiles="" -trap 'rm -fr $tmpfiles' 1 2 3 15 +: ${srcdir=.} +. "$srcdir/init.sh"; path_prepend_ . # Test NULL prefix. Result should not contain a number. -tmpfiles="$tmpfiles t-perror.tmp" -./test-perror${EXEEXT} 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp -if grep '[0-9]' t-perror.tmp > /dev/null; then - rm -fr $tmpfiles; exit 1 -fi +test-perror 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp +grep '[0-9]' t-perror.tmp > /dev/null \ + && fail_ "result should not contain a number" # Test empty prefix. Result should be the same. -tmpfiles="$tmpfiles t-perror1.tmp" -./test-perror${EXEEXT} '' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror1.tmp -diff t-perror.tmp t-perror1.tmp -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +test-perror '' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror1.tmp +diff t-perror.tmp t-perror1.tmp \ + || fail_ "empty prefix should behave like NULL argument" # Test non-empty prefix. -tmpfiles="$tmpfiles t-perror2.tmp t-perror3.tmp" -./test-perror${EXEEXT} 'foo' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror3.tmp +test-perror foo 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror3.tmp sed -e 's/^/foo: /' < t-perror.tmp > t-perror2.tmp -diff t-perror2.tmp t-perror3.tmp -test $? = 0 || { rm -fr $tmpfiles; exit 1; } +diff t-perror2.tmp t-perror3.tmp || fail_ "prefix applied incorrectly" + +# Test exit status. +test-perror >out 2>/dev/null || fail_ "unexpected exit status" +test -s out && fail_ "unexpected output" -rm -fr $tmpfiles -exit 0 +Exit 0 diff --git a/tests/test-perror2.c b/tests/test-perror2.c new file mode 100644 index 0000000..7e98126 --- /dev/null +++ b/tests/test-perror2.c @@ -0,0 +1,136 @@ +/* Test of perror() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +#include + +#include +#include +#include + +/* This test intentionally parses stderr. So, we arrange to have fd 10 + (outside the range of interesting fd's during the test) set up to + duplicate the original stderr. */ +#define BACKUP_STDERR_FILENO 10 +#define ASSERT_STREAM myerr +#include "macros.h" + +static FILE *myerr; + +#define BASE "test-perror2" + +int +main (void) +{ + /* We change fd 2 later, so save it in fd 10. */ + if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO + || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL) + return 2; + + ASSERT (freopen (BASE ".tmp", "w+", stderr) == stderr); + + /* Test that perror does not clobber strerror buffer. */ + { + const char *msg1; + const char *msg2; + const char *msg3; + const char *msg4; + char *str1; + char *str2; + char *str3; + char *str4; + + msg1 = strerror (ENOENT); + ASSERT (msg1); + str1 = strdup (msg1); + ASSERT (str1); + + msg2 = strerror (ERANGE); + ASSERT (msg2); + str2 = strdup (msg2); + ASSERT (str2); + + msg3 = strerror (-4); + ASSERT (msg3); + str3 = strdup (msg3); + ASSERT (str3); + + msg4 = strerror (1729576); + ASSERT (msg4); + str4 = strdup (msg4); + ASSERT (str4); + + errno = EACCES; + perror (""); + errno = -5; + perror (""); + ASSERT (!ferror (stderr)); + ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); + ASSERT (msg2 == msg4 || STREQ (msg2, str2)); + ASSERT (msg3 == msg4 || STREQ (msg3, str3)); + ASSERT (STREQ (msg4, str4)); + + free (str1); + free (str2); + free (str3); + free (str4); + } + + /* Test that perror uses the same message as strerror. */ + { + int errs[] = { EACCES, 0, -3, }; + int i; + for (i = 0; i < SIZEOF (errs); i++) + { + char buf[256]; + char *err = strerror (errs[i]); + + ASSERT (err); + ASSERT (strlen (err) < sizeof buf); + rewind (stderr); + ASSERT (ftruncate (fileno (stderr), 0) == 0); + errno = errs[i]; + perror (NULL); + ASSERT (!ferror (stderr)); + rewind (stderr); + ASSERT (fgets (buf, sizeof buf, stderr) == buf); + ASSERT (strstr (buf, err)); + } + } + + /* Test that perror reports write failure. */ + { + ASSERT (freopen (BASE ".tmp", "r", stderr) == stderr); + ASSERT (setvbuf (stderr, NULL, _IONBF, BUFSIZ) == 0); + errno = -1; + ASSERT (!ferror (stderr)); + perror (NULL); +#if 0 + /* Commented out until cygwin behaves: + http://sourceware.org/ml/newlib/2011/msg00228.html */ + ASSERT (errno > 0); + /* Commented out until glibc behaves: + http://sourceware.org/bugzilla/show_bug.cgi?id=12792 */ + ASSERT (ferror (stderr)); +#endif + } + + ASSERT (fclose (stderr) == 0); + ASSERT (remove (BASE ".tmp") == 0); + + return 0; +} diff --git a/tests/test-pipe.c b/tests/test-pipe.c new file mode 100644 index 0000000..c951d1d --- /dev/null +++ b/tests/test-pipe.c @@ -0,0 +1,104 @@ +/* Test of pipe. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (pipe, int, (int[2])); + +#include +#include + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Get declarations of the native Windows API functions. */ +# define WIN32_LEAN_AND_MEAN +# include +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" +#endif + +#include "binary-io.h" +#include "macros.h" + +/* Return true if FD is open. */ +static bool +is_open (int fd) +{ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* On native Windows, the initial state of unassigned standard file + descriptors is that they are open but point to an + INVALID_HANDLE_VALUE, and there is no fcntl. */ + return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; +#else +# ifndef F_GETFL +# error Please port fcntl to your platform +# endif + return 0 <= fcntl (fd, F_GETFL); +#endif +} + +/* Return true if FD is not inherited to child processes. */ +static bool +is_cloexec (int fd) +{ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + HANDLE h = (HANDLE) _get_osfhandle (fd); + DWORD flags; + ASSERT (GetHandleInformation (h, &flags)); + return (flags & HANDLE_FLAG_INHERIT) == 0; +#else + int flags; + ASSERT ((flags = fcntl (fd, F_GETFD)) >= 0); + return (flags & FD_CLOEXEC) != 0; +#endif +} + +/* Return true if FD is in non-blocking mode. */ +static bool +is_nonblocking (int fd) +{ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* We don't use the non-blocking mode for sockets here. */ + return 0; +#else + int flags; + ASSERT ((flags = fcntl (fd, F_GETFL)) >= 0); + return (flags & O_NONBLOCK) != 0; +#endif +} + +int +main () +{ + int fd[2]; + + fd[0] = -1; + fd[1] = -1; + ASSERT (pipe (fd) >= 0); + ASSERT (fd[0] >= 0); + ASSERT (fd[1] >= 0); + ASSERT (fd[0] != fd[1]); + ASSERT (is_open (fd[0])); + ASSERT (is_open (fd[1])); + ASSERT (!is_cloexec (fd[0])); + ASSERT (!is_cloexec (fd[1])); + ASSERT (!is_nonblocking (fd[0])); + ASSERT (!is_nonblocking (fd[1])); + + return 0; +} diff --git a/tests/test-priv-set.c b/tests/test-priv-set.c index f1d5f01..bcbc84a 100644 --- a/tests/test-priv-set.c +++ b/tests/test-priv-set.c @@ -1,5 +1,5 @@ /* Test the priv-set module. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-quotearg-simple.c b/tests/test-quotearg-simple.c index 4d9c87c..08aadc1 100644 --- a/tests/test-quotearg-simple.c +++ b/tests/test-quotearg-simple.c @@ -1,5 +1,5 @@ /* Test of quotearg family of functions. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Eric Blake , 2008. */ @@ -27,8 +26,10 @@ #include #include +#include "localcharset.h" #include "progname.h" #include "macros.h" +#include "zerosize-ptr.h" #include "test-quotearg.h" @@ -85,12 +86,12 @@ static struct result_groups results_g[] = { "a\\\\b", LQ_ENC RQ_ENC, LQ RQ } }, /* locale_quoting_style */ - { { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'", - "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" }, - { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'", - "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" }, - { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'", - "`a\\:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" } }, + { { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'", + "'a:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" }, + { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'", + "'a:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" }, + { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'", + "'a\\:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } }, /* clocale_quoting_style */ { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"", @@ -245,12 +246,20 @@ main (int argc _GL_UNUSED, char *argv[]) for (i = literal_quoting_style; i <= clocale_quoting_style; i++) { set_quoting_style (NULL, (enum quoting_style) i); - compare_strings (use_quotearg_buffer, &results_g[i].group1, ascii_only); - compare_strings (use_quotearg, &results_g[i].group2, ascii_only); - if (i == c_quoting_style) - compare_strings (use_quote_double_quotes, &results_g[i].group2, - ascii_only); - compare_strings (use_quotearg_colon, &results_g[i].group3, ascii_only); + if (!(i == locale_quoting_style || i == clocale_quoting_style) + || (strcmp (locale_charset (), "ASCII") == 0 + || strcmp (locale_charset (), "ANSI_X3.4-1968") == 0)) + { + compare_strings (use_quotearg_buffer, &results_g[i].group1, + ascii_only); + compare_strings (use_quotearg, &results_g[i].group2, + ascii_only); + if (i == c_quoting_style) + compare_strings (use_quote_double_quotes, &results_g[i].group2, + ascii_only); + compare_strings (use_quotearg_colon, &results_g[i].group3, + ascii_only); + } } set_quoting_style (NULL, literal_quoting_style); @@ -289,6 +298,40 @@ main (int argc _GL_UNUSED, char *argv[]) ascii_only); } + { + /* Trigger the bug whereby quotearg_buffer would read beyond the NUL + that defines the end of the string being quoted. Use an input + string whose NUL is the last byte before an unreadable page. */ + char *z = zerosize_ptr (); + + if (z) + { + size_t q_len = 1024; + char *q = malloc (q_len + 1); + char buf[10]; + memset (q, 'Q', q_len); + q[q_len] = 0; + + /* Z points to the boundary between a readable/writable page + and one that is neither readable nor writable. Position + our string so its NUL is at the end of the writable one. */ + char const *str = "____"; + size_t s_len = strlen (str); + z -= s_len + 1; + memcpy (z, str, s_len + 1); + + set_custom_quoting (NULL, q, q); + /* Whether this actually triggers a SEGV depends on the + implementation of memcmp: whether it compares only byte-at- + a-time, and from left to right (no SEGV) or some other way. */ + size_t n = quotearg_buffer (buf, sizeof buf, z, SIZE_MAX, NULL); + ASSERT (n == s_len + 2 * q_len); + ASSERT (memcmp (buf, q, sizeof buf) == 0); + free (q); + } + } + quotearg_free (); + return 0; } diff --git a/tests/test-quotearg.h b/tests/test-quotearg.h index f2e9558..5fa7233 100644 --- a/tests/test-quotearg.h +++ b/tests/test-quotearg.h @@ -1,5 +1,5 @@ /* Test of quotearg family of functions. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Eric Blake , 2008. */ diff --git a/tests/test-raise.c b/tests/test-raise.c new file mode 100644 index 0000000..bfe4352 --- /dev/null +++ b/tests/test-raise.c @@ -0,0 +1,50 @@ +/* Test raising a signal. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (raise, int, (int)); + +#include + +#include "macros.h" + +/* It is safe to use _Noreturn here: exit() never returns, and GCC knows that + exit() is a non-returning function, even on platforms where its declaration + in does not have the 'noreturn' attribute. */ +static _Noreturn void +handler (int sig) +{ + exit (0); +} + +int +main (void) +{ + /* Test behaviour for invalid argument. */ + ASSERT (raise (-1) != 0); + + /* Test behaviour for SIGINT. */ + ASSERT (signal (SIGINT, handler) != SIG_ERR); + + raise (SIGINT); + + /* We should not get here, because the handler takes away the control. */ + exit (1); +} diff --git a/tests/test-read.c b/tests/test-read.c new file mode 100644 index 0000000..541e4b9 --- /dev/null +++ b/tests/test-read.c @@ -0,0 +1,73 @@ +/* Test the read() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (read, ssize_t, (int, void *, size_t)); + +#include +#include +#include + +#include "macros.h" + +int +main (void) +{ + const char *filename = "test-read.tmp"; + int fd; + + /* Create a file with a simple contents. */ + fd = open (filename, O_CREAT | O_WRONLY, 0600); + ASSERT (fd >= 0); + ASSERT (write (fd, "Hello World", 11) == 11); + ASSERT (close (fd) == 0); + + /* Read from the middle of the file. */ + fd = open (filename, O_RDONLY); + ASSERT (fd >= 0); + ASSERT (lseek (fd, 6, SEEK_SET) == 6); + { + char buf[10]; + ssize_t ret = read (fd, buf, 10); + ASSERT (ret == 5); + ASSERT (memcmp (buf, "World", 5) == 0); + } + ASSERT (close (fd) == 0); + + /* Test behaviour for invalid file descriptors. */ + { + char byte; + errno = 0; + ASSERT (read (-1, &byte, 1) == -1); + ASSERT (errno == EBADF); + } + { + char byte; + close (99); + errno = 0; + ASSERT (read (99, &byte, 1) == -1); + ASSERT (errno == EBADF); + } + + /* Clean up. */ + unlink (filename); + + return 0; +} diff --git a/tests/test-readlink.c b/tests/test-readlink.c index 3da5fbf..e6adbe5 100644 --- a/tests/test-readlink.c +++ b/tests/test-readlink.c @@ -1,5 +1,5 @@ /* Tests of readlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-readlink.h b/tests/test-readlink.h index 7247fc4..33039de 100644 --- a/tests/test-readlink.h +++ b/tests/test-readlink.h @@ -1,5 +1,5 @@ /* Tests of readlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-readlinkat.c b/tests/test-readlinkat.c index 1d588ac..c1d3753 100644 --- a/tests/test-readlinkat.c +++ b/tests/test-readlinkat.c @@ -1,5 +1,5 @@ /* Tests of readlinkat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -59,6 +59,19 @@ main (void) /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*")); + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (readlinkat (-1, "foo", buf, sizeof buf) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (readlinkat (99, "foo", buf, sizeof buf) == -1); + ASSERT (errno == EBADF); + } + /* Perform same checks as counterpart functions. */ result = test_readlink (do_readlink, false); dfd = openat (AT_FDCWD, ".", O_RDONLY); diff --git a/tests/test-realloc-gnu.c b/tests/test-realloc-gnu.c index 0d8e5c1..1969ce2 100644 --- a/tests/test-realloc-gnu.c +++ b/tests/test-realloc-gnu.c @@ -1,5 +1,5 @@ /* Test of realloc function. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2014 Free Software Foundation, Inc. This 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/tests/test-regex.c b/tests/test-regex.c new file mode 100644 index 0000000..cac028b --- /dev/null +++ b/tests/test-regex.c @@ -0,0 +1,203 @@ +/* Test regular expressions + Copyright 1996-2001, 2003-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "regex.h" + +#include +#include +#include +#if HAVE_DECL_ALARM +# include +# include +#endif + +#include "localcharset.h" + +int +main (void) +{ + int result = 0; + static struct re_pattern_buffer regex; + unsigned char folded_chars[UCHAR_MAX + 1]; + int i; + const char *s; + struct re_registers regs; + +#if HAVE_DECL_ALARM + /* Some builds of glibc go into an infinite loop on this test. */ + int alarm_value = 2; + signal (SIGALRM, SIG_DFL); + alarm (alarm_value); +#endif + if (setlocale (LC_ALL, "en_US.UTF-8")) + { + { + /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + This test needs valgrind to catch the bug on Debian + GNU/Linux 3.1 x86, but it might catch the bug better + on other platforms and it shouldn't hurt to try the + test here. */ + static char const pat[] = "insert into"; + static char const data[] = + "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE + | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + result |= 1; + else if (re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, ®s) + != -1) + result |= 1; + } + + /* Check whether it's really a UTF-8 locale. + On mingw, the setlocale call succeeds but returns + "English_United States.1252", with locale_charset() returning + "CP1252". */ + if (strcmp (locale_charset (), "UTF-8") == 0) + { + /* This test is from glibc bug 15078. + The test case is from Andreas Schwab in + . + */ + static char const pat[] = "[^x]x"; + static char const data[] = + /* */ + "\xe1\x80\x80" + "\xe1\x80\xbb" + "\xe1\x80\xbd" + "\xe1\x80\x94" + "\xe1\x80\xba" + "\xe1\x80\xaf" + "\xe1\x80\x95" + "\xe1\x80\xba" + "x"; + re_set_syntax (0); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + result |= 1; + else + { + i = re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, 0); + if (i != 0 && i != 21) + result |= 1; + } + } + + if (! setlocale (LC_ALL, "C")) + return 1; + } + + /* This test is from glibc bug 3957, reported by Andrew Mackey. */ + re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("a[^x]b", 6, ®ex); + if (s) + result |= 2; + /* This should fail, but succeeds for glibc-2.5. */ + else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) + result |= 2; + + /* This regular expression is from Spencer ere test number 75 + in grep-2.3. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + for (i = 0; i <= UCHAR_MAX; i++) + folded_chars[i] = i; + regex.translate = folded_chars; + s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); + /* This should fail with _Invalid character class name_ error. */ + if (!s) + result |= 4; + + /* Ensure that [b-a] is diagnosed as invalid, when + using RE_NO_EMPTY_RANGES. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("a[b-a]", 6, ®ex); + if (s == 0) + result |= 8; + + /* This should succeed, but does not for glibc-2.1.3. */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("{1", 2, ®ex); + if (s) + result |= 8; + + /* The following example is derived from a problem report + against gawk from Jorge Stolfi . */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[an\371]*n", 7, ®ex); + if (s) + result |= 8; + /* This should match, but does not for glibc-2.2.1. */ + else if (re_match (®ex, "an", 2, 0, ®s) != 2) + result |= 8; + + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + result |= 8; + /* glibc-2.2.93 does not work with a negative RANGE argument. */ + else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) + result |= 8; + + /* The version of regex.c in older versions of gnulib + ignored RE_ICASE. Detect that problem too. */ + re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + result |= 16; + else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) + result |= 16; + + /* Catch a bug reported by Vin Shelton in + http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html + */ + re_set_syntax (RE_SYNTAX_POSIX_BASIC + & ~RE_CONTEXT_INVALID_DUP + & ~RE_NO_EMPTY_RANGES); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); + if (s) + result |= 32; + + /* REG_STARTEND was added to glibc on 2004-01-15. + Reject older versions. */ + if (! REG_STARTEND) + result |= 64; + +#if 0 + /* It would be nice to reject hosts whose regoff_t values are too + narrow (including glibc on hosts with 64-bit ptrdiff_t and + 32-bit int), but we should wait until glibc implements this + feature. Otherwise, support for equivalence classes and + multibyte collation symbols would always be broken except + when compiling --without-included-regex. */ + if (sizeof (regoff_t) < sizeof (ptrdiff_t) + || sizeof (regoff_t) < sizeof (ssize_t)) + result |= 64; +#endif + + return result; +} diff --git a/tests/test-rmdir.c b/tests/test-rmdir.c index 6957efe..4903a57 100644 --- a/tests/test-rmdir.c +++ b/tests/test-rmdir.c @@ -1,5 +1,5 @@ /* Tests of rmdir. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-rmdir.h b/tests/test-rmdir.h index 757d030..daaa415 100644 --- a/tests/test-rmdir.h +++ b/tests/test-rmdir.h @@ -1,5 +1,5 @@ /* Tests of rmdir. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -66,7 +66,8 @@ test_rmdir_func (int (*func) (char const *name), bool print) ASSERT (unlink (BASE "dir/file") == 0); errno = 0; ASSERT (func (BASE "dir/.//") == -1); - ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST); + ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST + || errno == ENOTEMPTY); ASSERT (func (BASE "dir") == 0); /* Test symlink behavior. Specifying trailing slash should remove diff --git a/tests/test-select-fd.c b/tests/test-select-fd.c new file mode 100644 index 0000000..ae9e83c --- /dev/null +++ b/tests/test-select-fd.c @@ -0,0 +1,72 @@ +/* Test of select() substitute, reading or writing from a given file descriptor. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2008. */ + +#include + +#include +#include +#include + +int +main (int argc, char *argv[]) +{ + if (argc == 4) + { + char mode = argv[1][0]; + + if (mode == 'r' || mode == 'w') + { + int fd = atoi (argv[2]); + + if (fd >= 0) + { + const char *result_file_name = argv[3]; + FILE *result_file = fopen (result_file_name, "wb"); + + if (result_file != NULL) + { + fd_set fds; + struct timeval timeout; + int ret; + + FD_ZERO (&fds); + FD_SET (fd, &fds); + timeout.tv_sec = 0; + timeout.tv_usec = 10000; + ret = (mode == 'r' + ? select (fd + 1, &fds, NULL, NULL, &timeout) + : select (fd + 1, NULL, &fds, NULL, &timeout)); + if (ret < 0) + { + perror ("select failed"); + exit (1); + } + if ((ret == 0) != ! FD_ISSET (fd, &fds)) + { + fprintf (stderr, "incorrect return value\n"); + exit (1); + } + fprintf (result_file, "%d\n", ret); + exit (0); + } + } + } + } + fprintf (stderr, "Usage: test-select-fd mode fd result-file-name\n"); + exit (1); +} diff --git a/tests/test-select-in.sh b/tests/test-select-in.sh new file mode 100755 index 0000000..44f5dbb --- /dev/null +++ b/tests/test-select-in.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# Test select() on file descriptors opened for reading. + +# This test is known to fail on Solaris 2.6 and older, due to its handling +# of /dev/null. + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles t-select-in.tmp" + +# Regular files. + +rm -f t-select-in.tmp +./test-select-fd${EXEEXT} r 0 t-select-in.tmp < ./test-select-fd${EXEEXT} +test `cat t-select-in.tmp` = "1" || exit 1 + +# Pipes. + +rm -f t-select-in.tmp +{ sleep 1; echo abc; } | \ + { ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; cat > /dev/null; } +test `cat t-select-in.tmp` = "0" || exit 1 + +rm -f t-select-in.tmp +echo abc | { sleep 1; ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; } +test `cat t-select-in.tmp` = "1" || exit 1 + +# Special files. +# This part of the test is known to fail on Solaris 2.6 and older. + +rm -f t-select-in.tmp +./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null +test `cat t-select-in.tmp` = "1" || exit 1 + +rm -fr $tmpfiles + +exit 0 diff --git a/tests/test-select-out.sh b/tests/test-select-out.sh new file mode 100755 index 0000000..c5fd861 --- /dev/null +++ b/tests/test-select-out.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# Test select() on file descriptors opened for writing. + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles t-select-out.out t-select-out.tmp" + +# Regular files. + +rm -f t-select-out.tmp +./test-select-fd${EXEEXT} w 1 t-select-out.tmp > t-select-out.out +test `cat t-select-out.tmp` = "1" || exit 1 + +# Pipes. + +if false; then # This test fails on some platforms. + rm -f t-select-out.tmp + ( { echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null + test `cat t-select-out.tmp` = "0" || exit 1 +fi + +rm -f t-select-out.tmp +( { sleep 1; echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | cat) > /dev/null +test `cat t-select-out.tmp` = "1" || exit 1 + +# Special files. + +rm -f t-select-out.tmp +./test-select-fd${EXEEXT} w 1 t-select-out.tmp > /dev/null +test `cat t-select-out.tmp` = "1" || exit 1 + +rm -fr $tmpfiles + +exit 0 diff --git a/tests/test-select-stdin.c b/tests/test-select-stdin.c new file mode 100644 index 0000000..8b242a2 --- /dev/null +++ b/tests/test-select-stdin.c @@ -0,0 +1,83 @@ +/* Test of select() substitute, reading from stdin. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2008. */ + +#include + +#include +#include +#include +#include +#include + +#include "macros.h" + +int +main (void) +{ + printf ("Applying select() from standard input. Press Ctrl-C to abort.\n"); + for (;;) + { + struct timeval before; + struct timeval after; + unsigned long spent_usec; + fd_set readfds; + struct timeval timeout; + int ret; + + gettimeofday (&before, NULL); + + FD_ZERO (&readfds); + FD_SET (0, &readfds); + timeout.tv_sec = 0; + timeout.tv_usec = 500000; + ret = select (1, &readfds, NULL, NULL, &timeout); + + gettimeofday (&after, NULL); + spent_usec = (after.tv_sec - before.tv_sec) * 1000000 + + after.tv_usec - before.tv_usec; + + if (ret < 0) + { + perror ("select failed"); + exit (1); + } + if ((ret == 0) != ! FD_ISSET (0, &readfds)) + { + fprintf (stderr, "incorrect return value\n"); + exit (1); + } + if (ret == 0) + { + if (spent_usec < 250000) + { + fprintf (stderr, "returned too early\n"); + exit (1); + } + /* Timeout */ + printf ("."); + ASSERT (fflush (stdout) == 0); + } + else + { + char c; + + printf ("Input available! Trying to read 1 byte...\n"); + ASSERT (read (0, &c, 1) == 1); + } + } +} diff --git a/tests/test-select.c b/tests/test-select.c new file mode 100644 index 0000000..ef7389a --- /dev/null +++ b/tests/test-select.c @@ -0,0 +1,34 @@ +/* Test of select() substitute. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini, 2008. */ + +#include + +#include + +#include "signature.h" + +SIGNATURE_CHECK (select, int, (int, fd_set *, fd_set *, fd_set *, + struct timeval *)); + +#include "test-select.h" + +int +main (void) +{ + return test_function (select); +} diff --git a/tests/test-select.h b/tests/test-select.h new file mode 100644 index 0000000..adf1dd4 --- /dev/null +++ b/tests/test-select.h @@ -0,0 +1,462 @@ +/* Test of select() substitute. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini, 2008. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "macros.h" + +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# define WINDOWS_NATIVE +#endif + +#ifdef HAVE_SYS_WAIT_H +# include +#endif + +#ifndef SO_REUSEPORT +# define SO_REUSEPORT SO_REUSEADDR +#endif + +#define TEST_PORT 12345 + + +typedef int (*select_fn) (int, fd_set *, fd_set *, fd_set *, struct timeval *); + + +/* Minimal testing infrastructure. */ + +static int failures; + +static void +failed (const char *reason) +{ + if (++failures > 1) + printf (" "); + printf ("failed (%s)\n", reason); +} + +static int +test (void (*fn) (select_fn), select_fn my_select, const char *msg) +{ + failures = 0; + printf ("%s... ", msg); + fflush (stdout); + fn (my_select); + + if (!failures) + printf ("passed\n"); + + return failures; +} + + +/* Funny socket code. */ + +static int +open_server_socket (void) +{ + int s, x; + struct sockaddr_in ia; + + 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); + ia.sin_port = htons (TEST_PORT); + if (bind (s, (struct sockaddr *) &ia, sizeof (ia)) < 0) + { + perror ("bind"); + exit (77); + } + + if (listen (s, 1) < 0) + { + perror ("listen"); + exit (77); + } + + return s; +} + +static int +connect_to_socket (bool blocking) +{ + int s; + struct sockaddr_in ia; + + s = socket (AF_INET, SOCK_STREAM, 0); + + memset (&ia, 0, sizeof (ia)); + ia.sin_family = AF_INET; + inet_pton (AF_INET, "127.0.0.1", &ia.sin_addr); + ia.sin_port = htons (TEST_PORT); + + if (!blocking) + { +#ifdef WINDOWS_NATIVE + unsigned long iMode = 1; + ioctl (s, FIONBIO, (char *) &iMode); + +#elif defined F_GETFL + int oldflags = fcntl (s, F_GETFL, NULL); + + if (!(oldflags & O_NONBLOCK)) + fcntl (s, F_SETFL, oldflags | O_NONBLOCK); +#endif + } + + if (connect (s, (struct sockaddr *) &ia, sizeof (ia)) < 0 + && (blocking || errno != EINPROGRESS)) + { + perror ("connect"); + exit (77); + } + + return s; +} + + +/* A slightly more convenient interface to select(2). + Waits until a specific event occurs on a file descriptor FD. + EV is a bit mask of events to look for: + SEL_IN - input can be polled without blocking, + SEL_OUT - output can be provided without blocking, + SEL_EXC - an exception occurred, + A maximum wait time is specified by TIMEOUT. + *TIMEOUT = { 0, 0 } means to return immediately, + TIMEOUT = NULL means to wait indefinitely. */ + +enum { SEL_IN = 1, SEL_OUT = 2, SEL_EXC = 4 }; + +static int +do_select (int fd, int ev, struct timeval *timeout, select_fn my_select) +{ + fd_set rfds, wfds, xfds; + int r, rev; + + FD_ZERO (&rfds); + FD_ZERO (&wfds); + FD_ZERO (&xfds); + if (ev & SEL_IN) + FD_SET (fd, &rfds); + if (ev & SEL_OUT) + FD_SET (fd, &wfds); + if (ev & SEL_EXC) + FD_SET (fd, &xfds); + r = my_select (fd + 1, &rfds, &wfds, &xfds, timeout); + if (r < 0) + return r; + + rev = 0; + if (FD_ISSET (fd, &rfds)) + rev |= SEL_IN; + if (FD_ISSET (fd, &wfds)) + rev |= SEL_OUT; + if (FD_ISSET (fd, &xfds)) + rev |= SEL_EXC; + if (rev && r == 0) + failed ("select returned 0"); + if (rev & ~ev) + failed ("select returned unrequested events"); + + return rev; +} + +static int +do_select_nowait (int fd, int ev, select_fn my_select) +{ + struct timeval tv0; + tv0.tv_sec = 0; + tv0.tv_usec = 0; + return do_select (fd, ev, &tv0, my_select); +} + +static int +do_select_wait (int fd, int ev, select_fn my_select) +{ + return do_select (fd, ev, NULL, my_select); +} + + +/* Test select(2) for TTYs. */ + +#ifdef INTERACTIVE +static void +test_tty (select_fn my_select) +{ + if (do_select_nowait (0, SEL_IN, my_select) != 0) + failed ("can read"); + if (do_select_nowait (0, SEL_OUT, my_select) == 0) + failed ("cannot write"); + + if (do_select_wait (0, SEL_IN, my_select) == 0) + failed ("return with infinite timeout"); + + getchar (); + if (do_select_nowait (0, SEL_IN, my_select) != 0) + failed ("can read after getc"); +} +#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 +do_select_bad_fd (int fd, int ev, struct timeval *timeout, select_fn my_select) +{ + fd_set rfds, wfds, xfds; + + FD_ZERO (&rfds); + FD_ZERO (&wfds); + FD_ZERO (&xfds); + if (ev & SEL_IN) + FD_SET (fd, &rfds); + if (ev & SEL_OUT) + 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. + So, don't check the bit for fd here. */ +} + +static int +do_select_bad_fd_nowait (int fd, int ev, select_fn my_select) +{ + struct timeval tv0; + tv0.tv_sec = 0; + tv0.tv_usec = 0; + return do_select_bad_fd (fd, ev, &tv0, my_select); +} + +static void +test_bad_fd (select_fn my_select) +{ + /* This tests fails on OSF/1 and native Windows, even with fd = 16. */ +#if !(defined __osf__ || defined WINDOWS_NATIVE) + int fd; + + /* 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__ + fd = 16; +# 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"); + if (do_select_bad_fd_nowait (fd, SEL_OUT, my_select) == 0 || errno != EBADF) + failed ("invalid fd among wfds"); + if (do_select_bad_fd_nowait (fd, SEL_EXC, my_select) == 0 || errno != EBADF) + failed ("invalid fd among xfds"); +#endif +} + + +/* Test select(2) for unconnected nonblocking sockets. */ + +static void +test_connect_first (select_fn my_select) +{ + int s = open_server_socket (); + struct sockaddr_in ia; + socklen_t addrlen; + + int c1, c2; + + if (do_select_nowait (s, SEL_IN | SEL_EXC, my_select) != 0) + failed ("can read, socket not connected"); + + c1 = connect_to_socket (false); + + if (do_select_wait (s, SEL_IN | SEL_EXC, my_select) != SEL_IN) + failed ("expecting readability on passive socket"); + if (do_select_nowait (s, SEL_IN | SEL_EXC, my_select) != SEL_IN) + failed ("expecting readability on passive socket"); + + addrlen = sizeof (ia); + c2 = accept (s, (struct sockaddr *) &ia, &addrlen); + ASSERT (close (s) == 0); + ASSERT (close (c1) == 0); + ASSERT (close (c2) == 0); +} + + +/* Test select(2) for unconnected blocking sockets. */ + +static void +test_accept_first (select_fn my_select) +{ +#ifndef WINDOWS_NATIVE + int s = open_server_socket (); + struct sockaddr_in ia; + socklen_t addrlen; + char buf[3]; + int c, pid; + + pid = fork (); + if (pid < 0) + return; + + if (pid == 0) + { + addrlen = sizeof (ia); + c = accept (s, (struct sockaddr *) &ia, &addrlen); + ASSERT (close (s) == 0); + ASSERT (write (c, "foo", 3) == 3); + ASSERT (read (c, buf, 3) == 3); + shutdown (c, SHUT_RD); + ASSERT (close (c) == 0); + exit (0); + } + else + { + ASSERT (close (s) == 0); + c = connect_to_socket (true); + if (do_select_nowait (c, SEL_OUT, my_select) != SEL_OUT) + failed ("cannot write after blocking connect"); + ASSERT (write (c, "foo", 3) == 3); + wait (&pid); + if (do_select_wait (c, SEL_IN, my_select) != SEL_IN) + failed ("cannot read data left in the socket by closed process"); + ASSERT (read (c, buf, 3) == 3); + ASSERT (write (c, "foo", 3) == 3); + (void) close (c); /* may fail with errno = ECONNRESET */ + } +#endif +} + + +/* Common code for pipes and connected sockets. */ + +static void +test_pair (int rd, int wd, select_fn my_select) +{ + char buf[3]; + if (do_select_wait (wd, SEL_IN | SEL_OUT | SEL_EXC, my_select) != SEL_OUT) + failed ("expecting writability before writing"); + if (do_select_nowait (wd, SEL_IN | SEL_OUT | SEL_EXC, my_select) != SEL_OUT) + failed ("expecting writability before writing"); + + ASSERT (write (wd, "foo", 3) == 3); + if (do_select_wait (rd, SEL_IN, my_select) != SEL_IN) + failed ("expecting readability after writing"); + if (do_select_nowait (rd, SEL_IN, my_select) != SEL_IN) + failed ("expecting readability after writing"); + + ASSERT (read (rd, buf, 3) == 3); +} + + +/* Test select(2) on connected sockets. */ + +static void +test_socket_pair (select_fn my_select) +{ + struct sockaddr_in ia; + + socklen_t addrlen = sizeof (ia); + int s = open_server_socket (); + int c1 = connect_to_socket (false); + int c2 = accept (s, (struct sockaddr *) &ia, &addrlen); + + ASSERT (close (s) == 0); + + test_pair (c1, c2, my_select); + ASSERT (close (c1) == 0); + ASSERT (write (c2, "foo", 3) == 3); + (void) close (c2); /* may fail with errno = ECONNRESET */ +} + + +/* Test select(2) on pipes. */ + +static void +test_pipe (select_fn my_select) +{ + int fd[2]; + + ASSERT (pipe (fd) == 0); + test_pair (fd[0], fd[1], my_select); + ASSERT (close (fd[0]) == 0); + ASSERT (close (fd[1]) == 0); +} + + +/* Do them all. */ + +static int +test_function (select_fn my_select) +{ + int result = 0; + +#ifdef INTERACTIVE + printf ("Please press Enter\n"); + 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"); + result += test (test_accept_first, my_select, "General socket test with fork"); + result += test (test_pipe, my_select, "Pipe test"); + + return result; +} diff --git a/tests/test-setenv.c b/tests/test-setenv.c index 50eb71b..548e4fb 100644 --- a/tests/test-setenv.c +++ b/tests/test-setenv.c @@ -1,5 +1,5 @@ /* Tests of setenv. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-setlocale1.c b/tests/test-setlocale1.c index ea7945c..0434d7b 100644 --- a/tests/test-setlocale1.c +++ b/tests/test-setlocale1.c @@ -1,5 +1,5 @@ /* Test of setting the current locale. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. This 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/tests/test-setlocale2.c b/tests/test-setlocale2.c index 7bfc42a..2f52fe0 100644 --- a/tests/test-setlocale2.c +++ b/tests/test-setlocale2.c @@ -1,5 +1,5 @@ /* Test of setting the current locale. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. This 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/tests/test-setlocale2.sh b/tests/test-setlocale2.sh index 723e74e..904e147 100755 --- a/tests/test-setlocale2.sh +++ b/tests/test-setlocale2.sh @@ -2,14 +2,16 @@ # Test locale names with likely unsupported encoding in Unix syntax. for name in ar_SA.ISO-8859-1 fr_FR.CP1251 zh_TW.GB18030 zh_CN.BIG5; do - LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1 + env LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1 done # Test locale names with likely unsupported encoding in native Windows syntax. for name in "Arabic_Saudi Arabia.1252" "Arabic_Saudi Arabia.65001" \ French_France.65001 Japanese_Japan.65001 Turkish_Turkey.65001 \ Chinese_Taiwan.65001 Chinese_China.54936 Chinese_China.65001; do - LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1 + # Here we use 'env' to set the LC_ALL environment variable, because on + # Solaris 11 2011-11, the /bin/sh refuses to do it for Turkish_Turkey.65001. + env LC_ALL="$name" ./test-setlocale2${EXEEXT} 1 || exit 1 done exit 0 diff --git a/tests/test-setsockopt.c b/tests/test-setsockopt.c new file mode 100644 index 0000000..ebf50a5 --- /dev/null +++ b/tests/test-setsockopt.c @@ -0,0 +1,55 @@ +/* Test setsockopt() function. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (setsockopt, int, (int, int, int, const void *, socklen_t)); + +#include +#include + +#include "sockets.h" +#include "macros.h" + +int +main (void) +{ + (void) gl_sockets_startup (SOCKETS_1_1); + + /* Test behaviour for invalid file descriptors. */ + { + int value = 1; + + errno = 0; + ASSERT (setsockopt (-1, SOL_SOCKET, SO_REUSEADDR, &value, sizeof (value)) + == -1); + ASSERT (errno == EBADF); + } + { + int value = 1; + + close (99); + errno = 0; + ASSERT (setsockopt (99, SOL_SOCKET, SO_REUSEADDR, &value, sizeof (value)) + == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff --git a/tests/test-sigaction.c b/tests/test-sigaction.c new file mode 100644 index 0000000..0fa1c26 --- /dev/null +++ b/tests/test-sigaction.c @@ -0,0 +1,122 @@ +/* Test of sigaction() function. + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake , 2008. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (sigaction, int, (int, struct sigaction const *, + struct sigaction *)); + +#include + +#include "macros.h" + +#ifndef SA_NOCLDSTOP +# define SA_NOCLDSTOP 0 +#endif +#ifndef SA_ONSTACK +# define SA_ONSTACK 0 +#endif +#ifndef SA_RESETHAND +# define SA_RESETHAND 0 +#endif +#ifndef SA_RESTART +# define SA_RESTART 0 +#endif +#ifndef SA_SIGINFO +# define SA_SIGINFO 0 +#endif +#ifndef SA_NOCLDWAIT +# define SA_NOCLDWAIT 0 +#endif + +/* Define a mask of flags required by POSIX. Some implementations + provide other flags as extensions, such as SA_RESTORER, that we + must ignore in this test. */ +#define MASK_SA_FLAGS (SA_NOCLDSTOP | SA_ONSTACK | SA_RESETHAND | SA_RESTART \ + | SA_SIGINFO | SA_NOCLDWAIT | SA_NODEFER) + +/* This test is unsafe in the presence of an asynchronous SIGABRT, + because we install a signal-handler that is intentionally not + async-safe. Hopefully, this does not lead to too many reports of + false failures, since people don't generally use 'kill -s SIGABRT' + to end a runaway program. */ + +static void +handler (int sig) +{ + static int entry_count; + struct sigaction sa; + ASSERT (sig == SIGABRT); + ASSERT (sigaction (SIGABRT, NULL, &sa) == 0); + ASSERT ((sa.sa_flags & SA_SIGINFO) == 0); + switch (entry_count++) + { + case 0: + ASSERT ((sa.sa_flags & SA_RESETHAND) == 0); + ASSERT (sa.sa_handler == handler); + break; + case 1: + /* This assertion fails on glibc-2.3.6 systems with LinuxThreads, + when this program is linked with -lpthread, due to the sigaction() + override in libpthread.so. */ +#if !(defined __GLIBC__ || defined __UCLIBC__) + ASSERT (sa.sa_handler == SIG_DFL); +#endif + break; + default: + ASSERT (0); + } +} + +int +main (void) +{ + struct sigaction sa; + struct sigaction old_sa; + sa.sa_handler = handler; + + sa.sa_flags = 0; + ASSERT (sigemptyset (&sa.sa_mask) == 0); + ASSERT (sigaction (SIGABRT, &sa, NULL) == 0); + ASSERT (raise (SIGABRT) == 0); + + sa.sa_flags = SA_RESETHAND | SA_NODEFER; + ASSERT (sigaction (SIGABRT, &sa, &old_sa) == 0); + ASSERT ((old_sa.sa_flags & MASK_SA_FLAGS) == 0); + ASSERT (old_sa.sa_handler == handler); + ASSERT (raise (SIGABRT) == 0); + + sa.sa_handler = SIG_DFL; + ASSERT (sigaction (SIGABRT, &sa, &old_sa) == 0); + ASSERT ((old_sa.sa_flags & SA_SIGINFO) == 0); +#if !(defined __GLIBC__ || defined __UCLIBC__) /* see above */ + ASSERT (old_sa.sa_handler == SIG_DFL); +#endif + + sa.sa_handler = SIG_IGN; + ASSERT (sigaction (SIGABRT, &sa, NULL) == 0); + ASSERT (raise (SIGABRT) == 0); + ASSERT (sigaction (SIGABRT, NULL, &old_sa) == 0); + ASSERT (old_sa.sa_handler == SIG_IGN); + ASSERT (raise (SIGABRT) == 0); + + return 0; +} diff --git a/tests/test-signal-h.c b/tests/test-signal-h.c new file mode 100644 index 0000000..3bc9482 --- /dev/null +++ b/tests/test-signal-h.c @@ -0,0 +1,129 @@ +/* Test of substitute. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake , 2009. */ + +#include + +#include + +/* Check for required types. */ +struct +{ + size_t a; + uid_t b; + volatile sig_atomic_t c; + sigset_t d; + pid_t e; +#if 0 + /* Not guaranteed by gnulib. */ + pthread_t f; + struct timespec g; +#endif +} s; + +/* Check that NSIG is defined. */ +int nsig = NSIG; + +int +main (void) +{ + switch (0) + { + /* The following are guaranteed by C. */ + case 0: + case SIGABRT: + case SIGFPE: + case SIGILL: + case SIGINT: + case SIGSEGV: + case SIGTERM: + /* The following is guaranteed by gnulib. */ +#if GNULIB_SIGPIPE || defined SIGPIPE + case SIGPIPE: +#endif + /* Ensure no conflict with other standardized names. */ +#ifdef SIGALRM + case SIGALRM: +#endif + /* On Haiku, SIGBUS is mistakenly equal to SIGSEGV. */ +#if defined SIGBUS && SIGBUS != SIGSEGV + case SIGBUS: +#endif +#ifdef SIGCHLD + case SIGCHLD: +#endif +#ifdef SIGCONT + case SIGCONT: +#endif +#ifdef SIGHUP + case SIGHUP: +#endif +#ifdef SIGKILL + case SIGKILL: +#endif +#ifdef SIGQUIT + case SIGQUIT: +#endif +#ifdef SIGSTOP + case SIGSTOP: +#endif +#ifdef SIGTSTP + case SIGTSTP: +#endif +#ifdef SIGTTIN + case SIGTTIN: +#endif +#ifdef SIGTTOU + case SIGTTOU: +#endif +#ifdef SIGUSR1 + case SIGUSR1: +#endif +#ifdef SIGUSR2 + case SIGUSR2: +#endif +#ifdef SIGSYS + case SIGSYS: +#endif +#ifdef SIGTRAP + case SIGTRAP: +#endif +#ifdef SIGURG + case SIGURG: +#endif +#ifdef SIGVTALRM + case SIGVTALRM: +#endif +#ifdef SIGXCPU + case SIGXCPU: +#endif +#ifdef SIGXFSZ + case SIGXFSZ: +#endif + /* SIGRTMIN and SIGRTMAX need not be compile-time constants. */ +#if 0 +# ifdef SIGRTMIN + case SIGRTMIN: +# endif +# ifdef SIGRTMAX + case SIGRTMAX: +# endif +#endif + ; + } + return s.a + s.b + s.c + s.e; +} diff --git a/tests/test-sigprocmask.c b/tests/test-sigprocmask.c new file mode 100644 index 0000000..c6c771e --- /dev/null +++ b/tests/test-sigprocmask.c @@ -0,0 +1,102 @@ +/* Test of sigprocmask. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2011. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (sigprocmask, int, (int, const sigset_t *, sigset_t *)); + +#include +#include +#include +#include + +#include "macros.h" + +#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) + +static volatile int sigint_occurred; + +static void +sigint_handler (int sig) +{ + sigint_occurred++; +} + +int +main (int argc, char *argv[]) +{ + sigset_t set; + pid_t pid = getpid (); + char command[80]; + + if (sizeof (int) < sizeof pid && 0x7fffffff < pid) + { + fputs ("Skipping test: pid too large\n", stderr); + return 77; + } + + signal (SIGINT, sigint_handler); + + sigemptyset (&set); + sigaddset (&set, SIGINT); + + /* Check error handling. */ + ASSERT (sigprocmask (1729, &set, NULL) == -1); + ASSERT (errno == EINVAL); + + /* Block SIGINT. */ + ASSERT (sigprocmask (SIG_BLOCK, &set, NULL) == 0); + + /* Request a SIGINT signal from outside. */ + sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, (int) pid); + ASSERT (system (command) == 0); + + /* Wait. */ + sleep (2); + + /* The signal should not have arrived yet, because it is blocked. */ + ASSERT (sigint_occurred == 0); + + /* Unblock SIGINT. */ + ASSERT (sigprocmask (SIG_UNBLOCK, &set, NULL) == 0); + + /* The signal should have arrived now, because POSIX says + "If there are any pending unblocked signals after the call to + sigprocmask(), at least one of those signals shall be delivered + before the call to sigprocmask() returns." */ + ASSERT (sigint_occurred == 1); + + return 0; +} + +#else + +/* On native Windows, getpid() values and the arguments that are passed to + the (Cygwin?) 'kill' program are not necessarily related. */ + +int +main () +{ + fputs ("Skipping test: native Windows platform\n", stderr); + return 77; +} + +#endif diff --git a/tests/test-sleep.c b/tests/test-sleep.c index 3550e2b..9b93fef 100644 --- a/tests/test-sleep.c +++ b/tests/test-sleep.c @@ -1,5 +1,5 @@ /* Test of sleep() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-snprintf.c b/tests/test-snprintf.c index 95a352d..38d9935 100644 --- a/tests/test-snprintf.c +++ b/tests/test-snprintf.c @@ -1,5 +1,5 @@ /* Test of snprintf() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -52,7 +52,7 @@ main (int argc, char *argv[]) #if !CHECK_SNPRINTF_POSIX if (size > 0) #endif - ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); + ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0); } else { @@ -60,5 +60,13 @@ main (int argc, char *argv[]) } } + /* Test the support of the POSIX/XSI format strings with positions. */ + { + char result[100]; + retval = snprintf (result, sizeof (result), "%2$d %1$d", 33, 55); + ASSERT (strcmp (result, "55 33") == 0); + ASSERT (retval == strlen (result)); + } + return 0; } diff --git a/tests/test-sockets.c b/tests/test-sockets.c new file mode 100644 index 0000000..35f1bf2 --- /dev/null +++ b/tests/test-sockets.c @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2008-2014 Free Software Foundation, Inc. + * Written by Simon Josefsson. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + +#include + +#include + +#include "sockets.h" + +int +main (void) +{ + int err; + + err = gl_sockets_startup (SOCKETS_1_1); + if (err != 0) + { + printf ("wsastartup failed %d\n", err); + return 1; + } + + err = gl_sockets_cleanup (); + if (err != 0) + { + printf ("wsacleanup failed %d\n", err); + return 1; + } + + (void) gl_fd_to_handle (0); + + return 0; +} diff --git a/tests/test-stat-time.c b/tests/test-stat-time.c index a3706e2..c39aa00 100644 --- a/tests/test-stat-time.c +++ b/tests/test-stat-time.c @@ -1,5 +1,5 @@ /* Test of . - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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,9 @@ #include "macros.h" +#define BASE "test-stat-time.t" +#include "nap.h" + enum { NFILES = 4 }; static int @@ -79,48 +82,6 @@ do_stat (const char *filename, struct stat *p) ASSERT (stat (filename, p) == 0); } -/* Sleep long enough to notice a timestamp difference on the file - system in the current directory. */ -static void -nap (void) -{ - static long delay; - if (!delay) - { - /* Initialize only once, by sleeping for 20 milliseconds (needed - since xfs has a quantization of about 10 milliseconds, even - though it has a granularity of 1 nanosecond, and since NTFS - has a default quantization of 15.25 milliseconds, even though - it has a granularity of 100 nanoseconds). If the seconds - differ, repeat the test one more time (in case we crossed a - quantization boundary on a file system with 1 second - resolution). If we can't observe a difference in only the - nanoseconds, then fall back to 1 second if the time is odd, - and 2 seconds (needed for FAT) if time is even. */ - struct stat st1; - struct stat st2; - ASSERT (stat ("t-stt-stamp1", &st1) == 0); - ASSERT (force_unlink ("t-stt-stamp1") == 0); - delay = 20000; - usleep (delay); - create_file ("t-stt-stamp1"); - ASSERT (stat ("t-stt-stamp1", &st2) == 0); - if (st1.st_mtime != st2.st_mtime) - { - /* Seconds differ, give it one more shot. */ - st1 = st2; - ASSERT (force_unlink ("t-stt-stamp1") == 0); - usleep (delay); - create_file ("t-stt-stamp1"); - ASSERT (stat ("t-stt-stamp1", &st2) == 0); - } - if (! (st1.st_mtime == st2.st_mtime - && get_stat_mtime_ns (&st1) < get_stat_mtime_ns (&st2))) - delay = (st1.st_mtime & 1) ? 1000000 : 2000000; - } - usleep (delay); -} - static void prepare_test (struct stat *statinfo, struct timespec *modtimes) { diff --git a/tests/test-stat.c b/tests/test-stat.c index 4cda089..9ed462a 100644 --- a/tests/test-stat.c +++ b/tests/test-stat.c @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,7 +33,6 @@ SIGNATURE_CHECK (stat, int, (char const *, struct stat *)); #include #include -#include "pathmax.h" #include "same-inode.h" #include "macros.h" diff --git a/tests/test-stat.h b/tests/test-stat.h index 22552dc..6cfc958 100644 --- a/tests/test-stat.h +++ b/tests/test-stat.h @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,9 +27,9 @@ test_stat_func (int (*func) (char const *, struct stat *), bool print) { struct stat st1; struct stat st2; - char cwd[PATH_MAX]; + char *cwd = getcwd (NULL, 0); - ASSERT (getcwd (cwd, PATH_MAX) == cwd); + ASSERT (cwd); ASSERT (func (".", &st1) == 0); ASSERT (func ("./", &st2) == 0); ASSERT (SAME_INODE (st1, st2)); diff --git a/tests/test-statat.c b/tests/test-statat.c new file mode 100644 index 0000000..e7b04be --- /dev/null +++ b/tests/test-statat.c @@ -0,0 +1,27 @@ +/* Tests of statat and lstatat. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include "openat.h" + +#include "signature.h" +SIGNATURE_CHECK (statat, int, (int, char const *, struct stat *)); +SIGNATURE_CHECK (lstatat, int, (int, char const *, struct stat *)); + +#define BASE "test-statat.t" +#define TEST_STATAT +#include "test-fstatat.c" diff --git a/tests/test-stdalign.c b/tests/test-stdalign.c new file mode 100644 index 0000000..81efd54 --- /dev/null +++ b/tests/test-stdalign.c @@ -0,0 +1,116 @@ +/* Test of . + Copyright 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paul Eggert, inspired by Bruno Haible's test-alignof.c. */ + +#include + +#include + +#include +#include + +#include "verify.h" + +#include "macros.h" + +typedef long double longdouble; +typedef struct { char a[1]; } struct1; +typedef struct { char a[2]; } struct2; +typedef struct { char a[3]; } struct3; +typedef struct { char a[4]; } struct4; + +verify (__alignof_is_defined == 1); +#ifndef alignof +# error "alignof is not a macro" +#endif + +#if __alignas_is_defined +verify (__alignas_is_defined == 1); +# ifndef alignas +# error "alignas is not a macro" +# endif +/* mingw can go up only to 8. 8 is all that GNU Emacs needs, so let's + limit the test to 8 for now. */ +# define TEST_ALIGNMENT 8 +#else +# define _Alignas(alignment) +# define alignas(alignment) +# define TEST_ALIGNMENT 1 +#endif + +#define CHECK_STATIC(type) \ + typedef struct { char slot1; type slot2; } type##_helper; \ + verify (alignof (type) == offsetof (type##_helper, slot2)); \ + verify (_Alignof (type) == alignof (type)); \ + const int type##_alignment = alignof (type); \ + type alignas (TEST_ALIGNMENT) static_##type##_alignas; \ + type _Alignas (TEST_ALIGNMENT) static_##type##_Alignas + +#define CHECK_ALIGNED(var) ASSERT ((uintptr_t) &(var) % TEST_ALIGNMENT == 0) + +CHECK_STATIC (char); +CHECK_STATIC (short); +CHECK_STATIC (int); +CHECK_STATIC (long); +#ifdef INT64_MAX +CHECK_STATIC (int64_t); +#endif +CHECK_STATIC (float); +CHECK_STATIC (double); +/* CHECK_STATIC (longdouble); */ +CHECK_STATIC (struct1); +CHECK_STATIC (struct2); +CHECK_STATIC (struct3); +CHECK_STATIC (struct4); + +int +main () +{ +#if defined __SUNPRO_C + /* Avoid a test failure due to Sun Studio Developer Bug Report #2125432. */ + fputs ("Skipping test: known Sun C compiler bug\n", stderr); + return 77; +#else + CHECK_ALIGNED (static_char_alignas); + CHECK_ALIGNED (static_char_Alignas); + CHECK_ALIGNED (static_short_alignas); + CHECK_ALIGNED (static_short_Alignas); + CHECK_ALIGNED (static_int_alignas); + CHECK_ALIGNED (static_int_Alignas); + CHECK_ALIGNED (static_long_alignas); + CHECK_ALIGNED (static_long_Alignas); +# ifdef INT64_MAX + CHECK_ALIGNED (static_int64_t_alignas); + CHECK_ALIGNED (static_int64_t_Alignas); +# endif + CHECK_ALIGNED (static_float_alignas); + CHECK_ALIGNED (static_float_Alignas); + CHECK_ALIGNED (static_double_alignas); + CHECK_ALIGNED (static_double_Alignas); + /* CHECK_ALIGNED (static_longdouble_alignas); */ + /* CHECK_ALIGNED (static_longdouble_Alignas); */ + CHECK_ALIGNED (static_struct1_alignas); + CHECK_ALIGNED (static_struct1_Alignas); + CHECK_ALIGNED (static_struct2_alignas); + CHECK_ALIGNED (static_struct2_Alignas); + CHECK_ALIGNED (static_struct3_alignas); + CHECK_ALIGNED (static_struct3_Alignas); + CHECK_ALIGNED (static_struct4_alignas); + CHECK_ALIGNED (static_struct4_Alignas); + return 0; +#endif +} diff --git a/tests/test-stdbool.c b/tests/test-stdbool.c index e115ba2..efa8324 100644 --- a/tests/test-stdbool.c +++ b/tests/test-stdbool.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2002-2007, 2009-2014 Free Software Foundation, Inc. This 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/tests/test-stddef.c b/tests/test-stddef.c index c929af8..d5d887e 100644 --- a/tests/test-stddef.c +++ b/tests/test-stddef.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-stdint.c b/tests/test-stdint.c index f606cc3..008b517 100644 --- a/tests/test-stdint.c +++ b/tests/test-stdint.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2014 Free Software Foundation, Inc. This 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,8 +21,6 @@ /* Whether to enable pedantic checks. */ #define DO_PEDANTIC 0 -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* likewise */ #include #include "verify.h" diff --git a/tests/test-stdio.c b/tests/test-stdio.c index 7e7a206..d3f0e6b 100644 --- a/tests/test-stdio.c +++ b/tests/test-stdio.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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/tests/test-stdlib.c b/tests/test-stdlib.c index 210aab4..a2743e4 100644 --- a/tests/test-stdlib.c +++ b/tests/test-stdlib.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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/tests/test-strcasestr.c b/tests/test-strcasestr.c index fb1314b..4ea73e4 100644 --- a/tests/test-strcasestr.c +++ b/tests/test-strcasestr.c @@ -1,5 +1,5 @@ /* Test of case-insensitive searching in a string. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,8 +37,9 @@ main () caused by SIGALRM. All known platforms that lack alarm also lack strcasestr, and the replacement strcasestr is known to not take too long. */ + int alarm_value = 50; signal (SIGALRM, SIG_DFL); - alarm (50); + alarm (alarm_value); #endif { diff --git a/tests/test-strerror.c b/tests/test-strerror.c index 66dbe82..8e2ed7c 100644 --- a/tests/test-strerror.c +++ b/tests/test-strerror.c @@ -1,5 +1,5 @@ /* Test of strerror() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Eric Blake , 2007. */ @@ -33,25 +32,44 @@ main (void) { char *str; + errno = 0; str = strerror (EACCES); ASSERT (str); ASSERT (*str); + ASSERT (errno == 0); + errno = 0; str = strerror (ETIMEDOUT); ASSERT (str); ASSERT (*str); + ASSERT (errno == 0); + errno = 0; str = strerror (EOVERFLOW); ASSERT (str); ASSERT (*str); + ASSERT (errno == 0); + /* POSIX requires strerror (0) to succeed. Reject use of "Unknown + error", but allow "Success", "No error", or even Solaris' "Error + 0" which are distinct patterns from true out-of-range strings. + http://austingroupbugs.net/view.php?id=382 */ + errno = 0; str = strerror (0); ASSERT (str); ASSERT (*str); - + ASSERT (errno == 0); + ASSERT (strstr (str, "nknown") == NULL); + ASSERT (strstr (str, "ndefined") == NULL); + + /* POSIX requires strerror to produce a non-NULL result for all + inputs; as an extension, we also guarantee a non-empty result. + Reporting EINVAL is optional. */ + errno = 0; str = strerror (-3); ASSERT (str); ASSERT (*str); + ASSERT (errno == 0 || errno == EINVAL); return 0; } diff --git a/tests/test-strerror_r.c b/tests/test-strerror_r.c new file mode 100644 index 0000000..9e1f0be --- /dev/null +++ b/tests/test-strerror_r.c @@ -0,0 +1,181 @@ +/* Test of strerror_r() function. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (strerror_r, int, (int, char *, size_t)); + +#include + +#include "macros.h" + +int +main (void) +{ + char buf[100]; + int ret; + + /* Test results with valid errnum and enough room. */ + + errno = 0; + buf[0] = '\0'; + ASSERT (strerror_r (EACCES, buf, sizeof buf) == 0); + ASSERT (buf[0] != '\0'); + ASSERT (errno == 0); + ASSERT (strlen (buf) < sizeof buf); + + errno = 0; + buf[0] = '\0'; + ASSERT (strerror_r (ETIMEDOUT, buf, sizeof buf) == 0); + ASSERT (buf[0] != '\0'); + ASSERT (errno == 0); + ASSERT (strlen (buf) < sizeof buf); + + errno = 0; + buf[0] = '\0'; + ASSERT (strerror_r (EOVERFLOW, buf, sizeof buf) == 0); + ASSERT (buf[0] != '\0'); + ASSERT (errno == 0); + ASSERT (strlen (buf) < sizeof buf); + + /* POSIX requires strerror (0) to succeed. Reject use of "Unknown + error", but allow "Success", "No error", or even Solaris' "Error + 0" which are distinct patterns from true out-of-range strings. + http://austingroupbugs.net/view.php?id=382 */ + errno = 0; + buf[0] = '\0'; + ret = strerror_r (0, buf, sizeof buf); + ASSERT (ret == 0); + ASSERT (buf[0]); + ASSERT (errno == 0); + ASSERT (strstr (buf, "nknown") == NULL); + ASSERT (strstr (buf, "ndefined") == NULL); + + /* Test results with out-of-range errnum and enough room. POSIX + allows an empty string on success, and allows an unchanged buf on + error, but these are not useful, so we guarantee contents. */ + errno = 0; + buf[0] = '^'; + ret = strerror_r (-3, buf, sizeof buf); + ASSERT (ret == 0 || ret == EINVAL); + ASSERT (buf[0] != '^'); + ASSERT (*buf); + ASSERT (errno == 0); + ASSERT (strlen (buf) < sizeof buf); + + /* Test results with a too small buffer. POSIX requires an error; + only ERANGE for 0 and valid errors, and a choice of ERANGE or + EINVAL for out-of-range values. On error, POSIX permits buf to + be empty, unchanged, or unterminated, but these are not useful, + so we guarantee NUL-terminated truncated contents for all but + size 0. http://austingroupbugs.net/view.php?id=398. Also ensure + that no out-of-bounds writes occur. */ + { + int errs[] = { EACCES, 0, -3, }; + int j; + + buf[sizeof buf - 1] = '\0'; + for (j = 0; j < SIZEOF (errs); j++) + { + int err = errs[j]; + char buf2[sizeof buf] = ""; + size_t len; + size_t i; + + strerror_r (err, buf2, sizeof buf2); + len = strlen (buf2); + ASSERT (len < sizeof buf); + + for (i = 0; i <= len; i++) + { + memset (buf, '^', sizeof buf - 1); + errno = 0; + ret = strerror_r (err, buf, i); + ASSERT (errno == 0); + if (err < 0) + ASSERT (ret == ERANGE || ret == EINVAL); + else + ASSERT (ret == ERANGE); + if (i) + { + ASSERT (strncmp (buf, buf2, i - 1) == 0); + ASSERT (buf[i - 1] == '\0'); + } + ASSERT (strspn (buf + i, "^") == sizeof buf - 1 - i); + } + + strcpy (buf, "BADFACE"); + errno = 0; + ret = strerror_r (err, buf, len + 1); + ASSERT (ret != ERANGE); + ASSERT (errno == 0); + ASSERT (strcmp (buf, buf2) == 0); + } + } + +#if GNULIB_STRERROR + /* Test that strerror_r does not clobber strerror buffer. On some + platforms, this test can only succeed if gnulib also replaces + strerror. */ + { + const char *msg1; + const char *msg2; + const char *msg3; + const char *msg4; + char *str1; + char *str2; + char *str3; + char *str4; + + msg1 = strerror (ENOENT); + ASSERT (msg1); + str1 = strdup (msg1); + ASSERT (str1); + + msg2 = strerror (ERANGE); + ASSERT (msg2); + str2 = strdup (msg2); + ASSERT (str2); + + msg3 = strerror (-4); + ASSERT (msg3); + str3 = strdup (msg3); + ASSERT (str3); + + msg4 = strerror (1729576); + ASSERT (msg4); + str4 = strdup (msg4); + ASSERT (str4); + + strerror_r (EACCES, buf, sizeof buf); + strerror_r (-5, buf, sizeof buf); + ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1)); + ASSERT (msg2 == msg4 || STREQ (msg2, str2)); + ASSERT (msg3 == msg4 || STREQ (msg3, str3)); + ASSERT (STREQ (msg4, str4)); + + free (str1); + free (str2); + free (str3); + free (str4); + } +#endif + + return 0; +} diff --git a/tests/test-strftime.c b/tests/test-strftime.c index 2578550..9a558d8 100644 --- a/tests/test-strftime.c +++ b/tests/test-strftime.c @@ -1,5 +1,5 @@ /* Test that posixtime works as required. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. This 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 @@ struct posixtm_test static struct posixtm_test const T[] = { { 1300000000, 0, "%F", "2011-03-13" }, + { 0, 10, "%T.%N", "00:00:00.000000010" }, { 0, 0, NULL, NULL } }; diff --git a/tests/test-string.c b/tests/test-string.c index 54c49a9..d890c8b 100644 --- a/tests/test-string.c +++ b/tests/test-string.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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/tests/test-strings.c b/tests/test-strings.c index ee2ad62..cff7d3c 100644 --- a/tests/test-strings.c +++ b/tests/test-strings.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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/tests/test-strnlen.c b/tests/test-strnlen.c index 18d6fcd..8a2089e 100644 --- a/tests/test-strnlen.c +++ b/tests/test-strnlen.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 Free Software Foundation, Inc. + * Copyright (C) 2010-2014 Free Software Foundation, Inc. * Written by Eric Blake * * This program is free software: you can redistribute it and/or modify diff --git a/tests/test-strstr.c b/tests/test-strstr.c index d6d6639..d580cad 100644 --- a/tests/test-strstr.c +++ b/tests/test-strstr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. + * Copyright (C) 2004, 2007-2014 Free Software Foundation, Inc. * Written by Bruno Haible and Eric Blake * * This program is free software: you can redistribute it and/or modify @@ -37,8 +37,9 @@ main (int argc, char *argv[]) caused by SIGALRM. All known platforms that lack alarm also have a quadratic strstr, and the replacement strstr is known to not take too long. */ + int alarm_value = 50; signal (SIGALRM, SIG_DFL); - alarm (50); + alarm (alarm_value); #endif { diff --git a/tests/test-strtol.c b/tests/test-strtol.c new file mode 100644 index 0000000..49b7007 --- /dev/null +++ b/tests/test-strtol.c @@ -0,0 +1,181 @@ +/* + * Copyright (C) 2011-2014 Free Software Foundation, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +#ifndef strtol +SIGNATURE_CHECK (strtol, long, (const char *, char **, int)); +#endif + +#include + +#include "macros.h" + +int +main (void) +{ + /* Subject sequence empty or invalid. */ + { + const char input[] = ""; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " "; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " +"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " -"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + + /* Simple integer values. */ + { + const char input[] = "0"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 1); + ASSERT (errno == 0); + } + { + const char input[] = "+0"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = "-0"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = "23"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = " 23"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + { + const char input[] = "+23"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + { + const char input[] = "-23"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == -23); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + + /* Large integer values. */ + { + const char input[] = "2147483647"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 2147483647); + ASSERT (ptr == input + 10); + ASSERT (errno == 0); + } + { + const char input[] = "-2147483648"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == -2147483647 - 1); + ASSERT (ptr == input + 11); + ASSERT (errno == 0); + } + if (sizeof (long) > sizeof (int)) + { + const char input[] = "4294967295"; + char *ptr; + long result; + errno = 0; + result = strtol (input, &ptr, 10); + ASSERT (result == 65535L * 65537L); + ASSERT (ptr == input + 10); + ASSERT (errno == 0); + } + + return 0; +} diff --git a/tests/test-strtoul.c b/tests/test-strtoul.c new file mode 100644 index 0000000..80a7343 --- /dev/null +++ b/tests/test-strtoul.c @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2011-2014 Free Software Foundation, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +#ifndef strtoul +SIGNATURE_CHECK (strtoul, unsigned long, (const char *, char **, int)); +#endif + +#include + +#include "macros.h" + +int +main (void) +{ + /* Subject sequence empty or invalid. */ + { + const char input[] = ""; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " "; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " +"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " -"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + + /* Simple integer values. */ + { + const char input[] = "0"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 1); + ASSERT (errno == 0); + } + { + const char input[] = "+0"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = "-0"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = "23"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = " 23"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + { + const char input[] = "+23"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + { + const char input[] = "-23"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == - 23UL); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + + /* Large integer values. */ + { + const char input[] = "2147483647"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 2147483647); + ASSERT (ptr == input + 10); + ASSERT (errno == 0); + } + { + const char input[] = "-2147483648"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == - 2147483648UL); + ASSERT (ptr == input + 11); + ASSERT (errno == 0); + } + { + const char input[] = "4294967295"; + char *ptr; + unsigned long result; + errno = 0; + result = strtoul (input, &ptr, 10); + ASSERT (result == 4294967295U); + ASSERT (ptr == input + 10); + ASSERT (errno == 0); + } + + return 0; +} diff --git a/tests/test-strtoull.c b/tests/test-strtoull.c new file mode 100644 index 0000000..53729b1 --- /dev/null +++ b/tests/test-strtoull.c @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2011-2014 Free Software Foundation, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +#ifndef strtoull +SIGNATURE_CHECK (strtoull, unsigned long long, (const char *, char **, int)); +#endif + +#include + +#include "macros.h" + +int +main (void) +{ + /* Subject sequence empty or invalid. */ + { + const char input[] = ""; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " "; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " +"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " -"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + + /* Simple integer values. */ + { + const char input[] = "0"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 1); + ASSERT (errno == 0); + } + { + const char input[] = "+0"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = "-0"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = "23"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = " 23"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + { + const char input[] = "+23"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + { + const char input[] = "-23"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == - 23ULL); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + + /* Large integer values. */ + { + const char input[] = "2147483647"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 2147483647); + ASSERT (ptr == input + 10); + ASSERT (errno == 0); + } + { + const char input[] = "-2147483648"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == - 2147483648ULL); + ASSERT (ptr == input + 11); + ASSERT (errno == 0); + } + { + const char input[] = "4294967295"; + char *ptr; + unsigned long long result; + errno = 0; + result = strtoull (input, &ptr, 10); + ASSERT (result == 4294967295U); + ASSERT (ptr == input + 10); + ASSERT (errno == 0); + } + + return 0; +} diff --git a/tests/test-strtoumax.c b/tests/test-strtoumax.c new file mode 100644 index 0000000..77f490f --- /dev/null +++ b/tests/test-strtoumax.c @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2011-2014 Free Software Foundation, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + +#include + +#include + +#include "signature.h" +#ifndef strtoumax +SIGNATURE_CHECK (strtoumax, uintmax_t, (const char *, char **, int)); +#endif + +#include + +#include "macros.h" + +int +main (void) +{ + /* Subject sequence empty or invalid. */ + { + const char input[] = ""; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " "; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " +"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + { + const char input[] = " -"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input); + ASSERT (errno == 0 || errno == EINVAL); + } + + /* Simple integer values. */ + { + const char input[] = "0"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 1); + ASSERT (errno == 0); + } + { + const char input[] = "+0"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = "-0"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 0); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = "23"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 2); + ASSERT (errno == 0); + } + { + const char input[] = " 23"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + { + const char input[] = "+23"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 23); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + { + const char input[] = "-23"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == - (uintmax_t) 23); + ASSERT (ptr == input + 3); + ASSERT (errno == 0); + } + + /* Large integer values. */ + { + const char input[] = "2147483647"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 2147483647); + ASSERT (ptr == input + 10); + ASSERT (errno == 0); + } + { + const char input[] = "-2147483648"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == - (uintmax_t) 2147483648U); + ASSERT (ptr == input + 11); + ASSERT (errno == 0); + } + { + const char input[] = "4294967295"; + char *ptr; + uintmax_t result; + errno = 0; + result = strtoumax (input, &ptr, 10); + ASSERT (result == 4294967295U); + ASSERT (ptr == input + 10); + ASSERT (errno == 0); + } + + return 0; +} diff --git a/tests/test-symlink.c b/tests/test-symlink.c index 367e045..78d46c2 100644 --- a/tests/test-symlink.c +++ b/tests/test-symlink.c @@ -1,5 +1,5 @@ /* Tests of symlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-symlink.h b/tests/test-symlink.h index 4d93929..eb11cf6 100644 --- a/tests/test-symlink.h +++ b/tests/test-symlink.h @@ -1,5 +1,5 @@ /* Tests of symlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-symlinkat.c b/tests/test-symlinkat.c index 1795c0e..75181ce 100644 --- a/tests/test-symlinkat.c +++ b/tests/test-symlinkat.c @@ -1,5 +1,5 @@ /* Tests of symlinkat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -58,6 +58,23 @@ main (void) /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*")); + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (symlinkat ("foo", -1, "bar") == -1); + ASSERT (errno == EBADF + || errno == ENOSYS /* seen on mingw */ + ); + } + { + close (99); + errno = 0; + ASSERT (symlinkat ("foo", 99, "bar") == -1); + ASSERT (errno == EBADF + || errno == ENOSYS /* seen on mingw */ + ); + } + /* Perform same checks as counterpart functions. */ result = test_symlink (do_symlink, false); dfd = openat (AT_FDCWD, ".", O_RDONLY); diff --git a/tests/test-sys_ioctl.c b/tests/test-sys_ioctl.c new file mode 100644 index 0000000..bd2a5af --- /dev/null +++ b/tests/test-sys_ioctl.c @@ -0,0 +1,27 @@ +/* Test of substitute. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake , 2009. */ + +#include + +#include + +int +main (void) +{ + return 0; +} diff --git a/tests/test-sys_select.c b/tests/test-sys_select.c new file mode 100644 index 0000000..2e4f7c1 --- /dev/null +++ b/tests/test-sys_select.c @@ -0,0 +1,59 @@ +/* Test of substitute. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +#include "signature.h" + +/* The following may be macros without underlying functions, so only + check signature if they are not macros. */ +#ifndef FD_CLR +SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *)); +#endif +#ifndef FD_ISSET +SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *)); +#endif +#ifndef FD_SET +SIGNATURE_CHECK (FD_SET, int, (int, fd_set *)); +#endif +#ifndef FD_ZERO +SIGNATURE_CHECK (FD_ZERO, void, (fd_set *)); +#endif + +/* Check that the 'struct timeval' type is defined. */ +struct timeval a; + +/* Check that a.tv_sec is wide enough to hold a time_t, ignoring + signedness issues. */ +typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1]; + +/* Check that sigset_t is defined. */ +sigset_t t2; + +int +main (void) +{ + /* Check that FD_ZERO can be used. This should not yield a warning + such as "warning: implicit declaration of function 'memset'". */ + fd_set fds; + FD_ZERO (&fds); + + return 0; +} diff --git a/tests/test-sys_socket.c b/tests/test-sys_socket.c new file mode 100644 index 0000000..8316f9a --- /dev/null +++ b/tests/test-sys_socket.c @@ -0,0 +1,68 @@ +/* Test of substitute. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +#include + +#if HAVE_SHUTDOWN +/* Check some integer constant expressions. */ +int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; +#endif + +/* Check that the 'socklen_t' type is defined. */ +socklen_t t1; + +/* Check that the 'size_t' and 'ssize_t' types are defined. */ +size_t t2; +ssize_t t3; + +/* Check that 'struct iovec' is defined. */ +struct iovec io; + +/* Check that a minimal set of 'struct msghdr' is defined. */ +struct msghdr msg; + +int +main (void) +{ + struct sockaddr_storage x; + sa_family_t i; + + /* Check some errno values. */ + switch (ENOTSOCK) + { + case ENOTSOCK: + case EADDRINUSE: + case ENETRESET: + case ECONNABORTED: + case ECONNRESET: + case ENOTCONN: + case ESHUTDOWN: + break; + } + + x.ss_family = 42; + i = 42; + msg.msg_iov = &io; + + return (x.ss_family - i + msg.msg_namelen + msg.msg_iov->iov_len + + msg.msg_iovlen); +} diff --git a/tests/test-sys_stat.c b/tests/test-sys_stat.c index cd07d86..c6a67f7 100644 --- a/tests/test-sys_stat.c +++ b/tests/test-sys_stat.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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,11 +26,14 @@ int a[] = { S_IFMT, - S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG, -#ifdef S_IFLNK /* missing on mingw and djgpp */ +#ifdef S_IFBLK /* missing on MSVC */ + S_IFBLK, +#endif + S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG, +#ifdef S_IFLNK /* missing on native Windows and DJGPP */ S_IFLNK, #endif -#ifdef S_IFSOCK /* missing on mingw and djgpp */ +#ifdef S_IFSOCK /* missing on native Windows and DJGPP */ S_IFSOCK, #endif S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR, @@ -46,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), @@ -61,7 +65,9 @@ verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR)); verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP)); verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH)); +#ifdef S_IFBLK verify (S_ISBLK (S_IFBLK)); +#endif verify (!S_ISBLK (S_IFCHR)); verify (!S_ISBLK (S_IFDIR)); verify (!S_ISBLK (S_IFIFO)); @@ -73,7 +79,9 @@ verify (!S_ISBLK (S_IFLNK)); verify (!S_ISBLK (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISCHR (S_IFBLK)); +#endif verify (S_ISCHR (S_IFCHR)); verify (!S_ISCHR (S_IFDIR)); verify (!S_ISCHR (S_IFIFO)); @@ -85,7 +93,9 @@ verify (!S_ISCHR (S_IFLNK)); verify (!S_ISCHR (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISDIR (S_IFBLK)); +#endif verify (!S_ISDIR (S_IFCHR)); verify (S_ISDIR (S_IFDIR)); verify (!S_ISDIR (S_IFIFO)); @@ -97,7 +107,9 @@ verify (!S_ISDIR (S_IFLNK)); verify (!S_ISDIR (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISFIFO (S_IFBLK)); +#endif verify (!S_ISFIFO (S_IFCHR)); verify (!S_ISFIFO (S_IFDIR)); verify (S_ISFIFO (S_IFIFO)); @@ -109,7 +121,9 @@ verify (!S_ISFIFO (S_IFLNK)); verify (!S_ISFIFO (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISREG (S_IFBLK)); +#endif verify (!S_ISREG (S_IFCHR)); verify (!S_ISREG (S_IFDIR)); verify (!S_ISREG (S_IFIFO)); @@ -121,7 +135,9 @@ verify (!S_ISREG (S_IFLNK)); verify (!S_ISREG (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISLNK (S_IFBLK)); +#endif verify (!S_ISLNK (S_IFCHR)); verify (!S_ISLNK (S_IFDIR)); verify (!S_ISLNK (S_IFIFO)); @@ -133,7 +149,9 @@ verify (S_ISLNK (S_IFLNK)); verify (!S_ISLNK (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISSOCK (S_IFBLK)); +#endif verify (!S_ISSOCK (S_IFCHR)); verify (!S_ISSOCK (S_IFDIR)); verify (!S_ISSOCK (S_IFIFO)); @@ -145,7 +163,9 @@ verify (!S_ISSOCK (S_IFLNK)); verify (S_ISSOCK (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISDOOR (S_IFBLK)); +#endif verify (!S_ISDOOR (S_IFCHR)); verify (!S_ISDOOR (S_IFDIR)); verify (!S_ISDOOR (S_IFIFO)); @@ -157,7 +177,9 @@ verify (!S_ISDOOR (S_IFLNK)); verify (!S_ISDOOR (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISMPB (S_IFBLK)); +#endif verify (!S_ISMPB (S_IFCHR)); verify (!S_ISMPB (S_IFDIR)); verify (!S_ISMPB (S_IFIFO)); @@ -169,7 +191,23 @@ verify (!S_ISMPB (S_IFLNK)); 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)); verify (!S_ISNAM (S_IFDIR)); verify (!S_ISNAM (S_IFIFO)); @@ -181,7 +219,9 @@ verify (!S_ISNAM (S_IFLNK)); verify (!S_ISNAM (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISNWK (S_IFBLK)); +#endif verify (!S_ISNWK (S_IFCHR)); verify (!S_ISNWK (S_IFDIR)); verify (!S_ISNWK (S_IFIFO)); @@ -193,7 +233,9 @@ verify (!S_ISNWK (S_IFLNK)); verify (!S_ISNWK (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISPORT (S_IFBLK)); +#endif verify (!S_ISPORT (S_IFCHR)); verify (!S_ISPORT (S_IFDIR)); verify (!S_ISPORT (S_IFIFO)); @@ -205,7 +247,9 @@ verify (!S_ISPORT (S_IFLNK)); verify (!S_ISPORT (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISCTG (S_IFBLK)); +#endif verify (!S_ISCTG (S_IFCHR)); verify (!S_ISCTG (S_IFDIR)); verify (!S_ISCTG (S_IFIFO)); @@ -217,7 +261,9 @@ verify (!S_ISCTG (S_IFLNK)); verify (!S_ISCTG (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISOFD (S_IFBLK)); +#endif verify (!S_ISOFD (S_IFCHR)); verify (!S_ISOFD (S_IFDIR)); verify (!S_ISOFD (S_IFIFO)); @@ -229,7 +275,9 @@ verify (!S_ISOFD (S_IFLNK)); verify (!S_ISOFD (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISOFL (S_IFBLK)); +#endif verify (!S_ISOFL (S_IFCHR)); verify (!S_ISOFL (S_IFDIR)); verify (!S_ISOFL (S_IFIFO)); @@ -241,7 +289,9 @@ verify (!S_ISOFL (S_IFLNK)); verify (!S_ISOFL (S_IFSOCK)); #endif +#ifdef S_IFBLK verify (!S_ISWHT (S_IFBLK)); +#endif verify (!S_ISWHT (S_IFCHR)); verify (!S_ISWHT (S_IFDIR)); verify (!S_ISWHT (S_IFIFO)); @@ -278,8 +328,10 @@ invalid UTIME macros /* Check the existence of some types. */ nlink_t t1; +off_t t2; +mode_t t3; -struct timespec t2; +struct timespec st; int main (void) diff --git a/tests/test-sys_time.c b/tests/test-sys_time.c index da64b85..ea12c63 100644 --- a/tests/test-sys_time.c +++ b/tests/test-sys_time.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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,13 @@ #include +/* Check that the 'struct timeval' type is defined. */ struct timeval a; +/* Check that a.tv_sec is wide enough to hold a time_t, ignoring + signedness issues. */ +typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1]; + int main (void) { diff --git a/tests/test-sys_types.c b/tests/test-sys_types.c new file mode 100644 index 0000000..ddcb6d2 --- /dev/null +++ b/tests/test-sys_types.c @@ -0,0 +1,34 @@ +/* Test of substitute. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2011. */ + +#include + +#include + +/* Check that the types are all defined. */ +pid_t t1; +size_t t2; +ssize_t t3; +off_t t4; +mode_t t5; + +int +main (void) +{ + return 0; +} diff --git a/tests/test-sys_uio.c b/tests/test-sys_uio.c new file mode 100644 index 0000000..4f53cae --- /dev/null +++ b/tests/test-sys_uio.c @@ -0,0 +1,32 @@ +/* Test of substitute. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Eric Blake , 2011. */ + +#include + +#include + +/* Check that necessary types are defined. */ +size_t a; +ssize_t b; +struct iovec c; + +int +main (void) +{ + return a + b + !!c.iov_base + c.iov_len; +} diff --git a/tests/test-sys_utsname.c b/tests/test-sys_utsname.c new file mode 100644 index 0000000..10221bc --- /dev/null +++ b/tests/test-sys_utsname.c @@ -0,0 +1,37 @@ +/* Test of substitute. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2009. */ + +#include + +#include + +#include + +int +main () +{ + struct utsname buf; + + strcpy (buf.sysname, "Linux"); + strcpy (buf.nodename, "hobbybox"); + strcpy (buf.release, "3.141.592"); + strcpy (buf.version, "GENERIC"); + strcpy (buf.machine, "i586"); + + return 0; +} diff --git a/tests/test-sys_wait.c b/tests/test-sys_wait.c index dce89c6..daf6f28 100644 --- a/tests/test-sys_wait.c +++ b/tests/test-sys_wait.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,17 +31,17 @@ main (void) if (test_sys_wait_macros ()) return 1; - switch (0) - { #if 0 + switch (WCONTINUED) + { /* Gnulib doesn't guarantee these, yet. */ case WCONTINUED: case WEXITED: case WNOWAIT: case WSTOPPED: -#endif break; } +#endif return a ? 1 : 0; } diff --git a/tests/test-sys_wait.h b/tests/test-sys_wait.h index 3c9b322..ed20219 100644 --- a/tests/test-sys_wait.h +++ b/tests/test-sys_wait.h @@ -1,5 +1,5 @@ /* Test of macros shared between and . - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2014 Free Software Foundation, Inc. This 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/tests/test-thread_create.c b/tests/test-thread_create.c new file mode 100644 index 0000000..12ba79d --- /dev/null +++ b/tests/test-thread_create.c @@ -0,0 +1,78 @@ +/* Test of gl_thread_create () macro. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2011. */ + +#include + +#include "glthread/thread.h" + +#include +#include + +#include "macros.h" + +static gl_thread_t main_thread_before; +static gl_thread_t main_thread_after; +static gl_thread_t worker_thread; + +static int dummy; +static volatile int work_done; + +static void * +worker_thread_func (void *arg) +{ + work_done = 1; + return &dummy; +} + +int +main () +{ + main_thread_before = gl_thread_self (); + + if (glthread_create (&worker_thread, worker_thread_func, NULL) == 0) + { + void *ret; + + /* Check that gl_thread_self () has the same value before than after the + first call to gl_thread_create (). */ + main_thread_after = gl_thread_self (); + ASSERT (memcmp (&main_thread_before, &main_thread_after, + sizeof (gl_thread_t)) + == 0); + + gl_thread_join (worker_thread, &ret); + + /* Check the return value of the thread. */ + ASSERT (ret == &dummy); + + /* Check that worker_thread_func () has finished executing. */ + ASSERT (work_done); + + return 0; + } + else + { +#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WINDOWS_THREADS + fputs ("glthread_create failed\n", stderr); + return 1; +#else + fputs ("Skipping test: multithreading not enabled\n", stderr); + return 77; +#endif + } +} diff --git a/tests/test-thread_self.c b/tests/test-thread_self.c new file mode 100644 index 0000000..3629a82 --- /dev/null +++ b/tests/test-thread_self.c @@ -0,0 +1,34 @@ +/* Test of gl_thread_self () macro. + Copyright (C) 2011-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2011. */ + +#include + +#include "glthread/thread.h" + +gl_thread_t main_thread; + +int +main () +{ + /* Check that gl_thread_self () can be used with just $(LIBTHREAD), not + $(LIBMULTITHREAD), i.e. in libraries that are multithread-safe but don't + create threads themselves. */ + main_thread = gl_thread_self (); + + return 0; +} diff --git a/tests/test-time.c b/tests/test-time.c index 0c78f36..cb39c3b 100644 --- a/tests/test-time.c +++ b/tests/test-time.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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,7 +22,13 @@ #include "verify.h" -struct timespec a; +/* Check that the types are all defined. */ +struct timespec t1; +#if 0 +/* POSIX:2008 does not require pid_t in unconditionally, and indeed + it's missing on Mac OS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw. */ +pid_t t2; +#endif /* Check that NULL can be passed through varargs as a pointer type, per POSIX 2008. */ diff --git a/tests/test-trunc1.c b/tests/test-trunc1.c new file mode 100644 index 0000000..6737bbc --- /dev/null +++ b/tests/test-trunc1.c @@ -0,0 +1,65 @@ +/* Test of rounding towards zero. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (trunc, double, (double)); + +#include "isnand-nolibm.h" +#include "minus-zero.h" +#include "infinity.h" +#include "nan.h" +#include "macros.h" + +int +main () +{ + /* Zero. */ + ASSERT (trunc (0.0) == 0.0); + ASSERT (trunc (minus_zerod) == 0.0); + /* Positive numbers. */ + ASSERT (trunc (0.3) == 0.0); + ASSERT (trunc (0.7) == 0.0); + ASSERT (trunc (1.0) == 1.0); + ASSERT (trunc (1.5) == 1.0); + ASSERT (trunc (1.999) == 1.0); + ASSERT (trunc (2.0) == 2.0); + ASSERT (trunc (65535.999) == 65535.0); + ASSERT (trunc (65536.0) == 65536.0); + ASSERT (trunc (2.341e31) == 2.341e31); + /* Negative numbers. */ + ASSERT (trunc (-0.3) == 0.0); + ASSERT (trunc (-0.7) == 0.0); + ASSERT (trunc (-1.0) == -1.0); + ASSERT (trunc (-1.5) == -1.0); + ASSERT (trunc (-1.999) == -1.0); + ASSERT (trunc (-2.0) == -2.0); + ASSERT (trunc (-65535.999) == -65535.0); + ASSERT (trunc (-65536.0) == -65536.0); + ASSERT (trunc (-2.341e31) == -2.341e31); + /* Infinite numbers. */ + ASSERT (trunc (Infinityd ()) == Infinityd ()); + ASSERT (trunc (- Infinityd ()) == - Infinityd ()); + /* NaNs. */ + ASSERT (isnand (trunc (NaNd ()))); + + return 0; +} diff --git a/tests/test-trunc2.c b/tests/test-trunc2.c new file mode 100644 index 0000000..4df30f4 --- /dev/null +++ b/tests/test-trunc2.c @@ -0,0 +1,178 @@ +/* Test of rounding towards zero. + Copyright (C) 2007-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +/* When this test fails on some platform, build it together with the gnulib + module 'fprintf-posix' for optimal debugging output. */ + +#include + +#include + +#include +#include +#include +#include + +#include "isnand-nolibm.h" +#include "minus-zero.h" +#include "macros.h" + +/* MSVC with option -fp:strict refuses to compile constant initializers that + contain floating-point operations. Pacify this compiler. */ +#ifdef _MSC_VER +# pragma fenv_access (off) +#endif + + +/* The reference implementation, taken from lib/trunc.c. */ + +#define DOUBLE double +#define MANT_DIG DBL_MANT_DIG +#define L_(literal) literal + +/* -0.0. See minus-zero.h. */ +#define MINUS_ZERO minus_zerod + +/* 2^(MANT_DIG-1). */ +static const DOUBLE TWO_MANT_DIG = + /* Assume MANT_DIG <= 5 * 31. + Use the identity + n = floor(n/5) + floor((n+1)/5) + ... + floor((n+4)/5). */ + (DOUBLE) (1U << ((MANT_DIG - 1) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 1) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 2) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 3) / 5)) + * (DOUBLE) (1U << ((MANT_DIG - 1 + 4) / 5)); + +DOUBLE +trunc_reference (DOUBLE x) +{ + /* The use of 'volatile' guarantees that excess precision bits are dropped + at each addition step and before the following comparison at the caller's + site. It is necessary on x86 systems where double-floats are not IEEE + compliant by default, to avoid that the results become platform and compiler + option dependent. 'volatile' is a portable alternative to gcc's + -ffloat-store option. */ + volatile DOUBLE y = x; + volatile DOUBLE z = y; + + if (z > L_(0.0)) + { + /* For 0 < x < 1, return +0.0 even if the current rounding mode is + FE_DOWNWARD. */ + if (z < L_(1.0)) + z = L_(0.0); + /* Avoid rounding errors for values near 2^k, where k >= MANT_DIG-1. */ + else if (z < TWO_MANT_DIG) + { + /* Round to the next integer (nearest or up or down, doesn't matter). */ + z += TWO_MANT_DIG; + z -= TWO_MANT_DIG; + /* Enforce rounding down. */ + if (z > y) + z -= L_(1.0); + } + } + else if (z < L_(0.0)) + { + /* For -1 < x < 0, return -0.0 regardless of the current rounding + mode. */ + if (z > L_(-1.0)) + z = MINUS_ZERO; + /* Avoid rounding errors for values near -2^k, where k >= MANT_DIG-1. */ + else if (z > - TWO_MANT_DIG) + { + /* Round to the next integer (nearest or up or down, doesn't matter). */ + z -= TWO_MANT_DIG; + z += TWO_MANT_DIG; + /* Enforce rounding up. */ + if (z < y) + z += L_(1.0); + } + } + return z; +} + + +/* Test for equality. */ +static int +equal (DOUBLE x, DOUBLE y) +{ + return (isnand (x) ? isnand (y) : x == y); +} + +/* Test whether the result for a given argument is correct. */ +static bool +correct_result_p (DOUBLE x, DOUBLE result) +{ + return + (x >= 0 + ? (x < 1 ? result == L_(0.0) : + x - 1 < x ? result <= x && result >= x - 1 && x - result < 1 : + equal (result, x)) + : (x > -1 ? result == L_(0.0) : + x + 1 > x ? result >= x && result <= x + 1 && result - x < 1 : + equal (result, x))); +} + +/* Test the function for a given argument. */ +static int +check (double x) +{ + /* If the reference implementation is incorrect, bail out immediately. */ + double reference = trunc_reference (x); + ASSERT (correct_result_p (x, reference)); + /* If the actual implementation is wrong, return an error code. */ + { + double result = trunc (x); + if (correct_result_p (x, result)) + return 0; + else + { +#if GNULIB_TEST_FPRINTF_POSIX + fprintf (stderr, "trunc %g(%a) = %g(%a) or %g(%a)?\n", + x, x, reference, reference, result, result); +#endif + return 1; + } + } +} + +#define NUM_HIGHBITS 13 +#define NUM_LOWBITS 4 + +int +main () +{ + unsigned int highbits; + unsigned int lowbits; + int error = 0; + for (highbits = 0; highbits < (1 << NUM_HIGHBITS); highbits++) + for (lowbits = 0; lowbits < (1 << NUM_LOWBITS); lowbits++) + { + /* Combine highbits and lowbits into a floating-point number, + sign-extending the lowbits to 32-NUM_HIGHBITS bits. */ + union { double f; uint64_t i; } janus; + janus.i = ((uint64_t) highbits << (64 - NUM_HIGHBITS)) + | ((uint64_t) ((int64_t) ((uint64_t) lowbits << (64 - NUM_LOWBITS)) + >> (64 - NUM_LOWBITS - NUM_HIGHBITS)) + >> NUM_HIGHBITS); + error |= check (janus.f); + } + return (error ? 1 : 0); +} diff --git a/tests/test-uname.c b/tests/test-uname.c new file mode 100644 index 0000000..c474754 --- /dev/null +++ b/tests/test-uname.c @@ -0,0 +1,64 @@ +/* Test of system information. + Copyright (C) 2009-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2009. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (uname, int, (struct utsname *)); + +#include +#include + +#include "macros.h" + + +/* This program can be called with no arguments, then it performs a unit + test. Or it can be called with 1 argument, then it prints the uname + contents to standard output. */ + +int +main (int argc, char *argv[]) +{ + struct utsname buf; + + memset (&buf, '?', sizeof (buf)); + + ASSERT (uname (&buf) >= 0); + + /* Verify that every field's value is NUL terminated. */ + ASSERT (strlen (buf.sysname) < sizeof (buf.sysname)); + ASSERT (strlen (buf.nodename) < sizeof (buf.nodename)); + ASSERT (strlen (buf.release) < sizeof (buf.release)); + ASSERT (strlen (buf.version) < sizeof (buf.version)); + ASSERT (strlen (buf.machine) < sizeof (buf.machine)); + + if (argc > 1) + { + /* Show the result. */ + + printf ("uname -n = nodename = %s\n", buf.nodename); + printf ("uname -s = sysname = %s\n", buf.sysname); + printf ("uname -r = release = %s\n", buf.release); + printf ("uname -v = version = %s\n", buf.version); + printf ("uname -m = machine or cpu = %s\n", buf.machine); + } + + return 0; +} diff --git a/tests/test-unistd.c b/tests/test-unistd.c index be1ae06..6d3fa00 100644 --- a/tests/test-unistd.c +++ b/tests/test-unistd.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2014 Free Software Foundation, Inc. This 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/tests/test-unlink.c b/tests/test-unlink.c index ce340f2..05c93ca 100644 --- a/tests/test-unlink.c +++ b/tests/test-unlink.c @@ -1,5 +1,5 @@ /* Tests of unlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-unlink.h b/tests/test-unlink.h index 13f6c9b..3b5adff 100644 --- a/tests/test-unlink.h +++ b/tests/test-unlink.h @@ -1,5 +1,5 @@ /* Tests of unlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-unlinkat.c b/tests/test-unlinkat.c index f9ed249..1cfa034 100644 --- a/tests/test-unlinkat.c +++ b/tests/test-unlinkat.c @@ -1,5 +1,5 @@ /* Tests of unlinkat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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,7 @@ SIGNATURE_CHECK (unlinkat, int, (int, char const *, int)); #include #include +#include "progname.h" #include "unlinkdir.h" #include "ignore-value.h" #include "macros.h" @@ -56,15 +57,30 @@ unlinker (char const *name) } int -main (void) +main (int argc _GL_UNUSED, char *argv[]) { /* FIXME: Add tests of fd other than ".". */ int result1; int result2; + set_program_name (argv[0]); + /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*")); + /* Test behaviour for invalid file descriptors. */ + { + errno = 0; + ASSERT (unlinkat (-1, "foo", 0) == -1); + ASSERT (errno == EBADF); + } + { + close (99); + errno = 0; + ASSERT (unlinkat (99, "foo", 0) == -1); + ASSERT (errno == EBADF); + } + result1 = test_rmdir_func (rmdirat, false); result2 = test_unlink_func (unlinker, false); ASSERT (result1 == result2); diff --git a/tests/test-unsetenv.c b/tests/test-unsetenv.c index 9c9443b..50600a9 100644 --- a/tests/test-unsetenv.c +++ b/tests/test-unsetenv.c @@ -1,5 +1,5 @@ /* Tests of unsetenv. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-update-copyright.sh b/tests/test-update-copyright.sh index 83275ad..759a937 100755 --- a/tests/test-update-copyright.sh +++ b/tests/test-update-copyright.sh @@ -1,6 +1,6 @@ #!/bin/sh # Test suite for update-copyright. -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -102,9 +102,8 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc. # Foundation, Inc. EOF -rm -f $TMP.*.bak UPDATE_COPYRIGHT_YEAR=2009 \ - update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr + update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr + update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr + update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr +compare /dev/null $TMP-stdout || exit 1 +compare /dev/null $TMP-stderr || exit 1 +compare - $TMP < $TMP.extra-text-space < $TMP.two-digit-final-is-substr-of-first < $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 @@ -532,6 +539,9 @@ compare - $TMP.extra-text-space <. */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (usleep, int, (useconds_t)); - -#include - -#include "macros.h" - -int -main (void) -{ - time_t start = time (NULL); - ASSERT (usleep (1000000) == 0); - ASSERT (start < time (NULL)); - - ASSERT (usleep (0) == 0); - - return 0; -} diff --git a/tests/test-vasnprintf.c b/tests/test-vasnprintf.c index 6b2a0ff..2cbad5d 100644 --- a/tests/test-vasnprintf.c +++ b/tests/test-vasnprintf.c @@ -1,5 +1,5 @@ /* Test of vasnprintf() and asnprintf() functions. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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 @@ test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...)) ASSERT (length == 5); if (size < 6) ASSERT (result != buf); - ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); + ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0); if (result != buf) free (result); } diff --git a/tests/test-vc-list-files-cvs.sh b/tests/test-vc-list-files-cvs.sh index 531b269..51d3560 100755 --- a/tests/test-vc-list-files-cvs.sh +++ b/tests/test-vc-list-files-cvs.sh @@ -1,6 +1,6 @@ #!/bin/sh # Unit tests for vc-list-files -# Copyright (C) 2008-2011 Free Software Foundation, Inc. +# Copyright (C) 2008-2014 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -36,7 +36,6 @@ for i in with-cvsu without; do ok=0 mkdir $tmpdir && cd $tmpdir && # without cvs, skip the test - # The double use of 'exit' is needed for the reference to $? inside the trap. { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \ || skip_ "cvs not found in PATH"; } && mkdir w && cd w && diff --git a/tests/test-vc-list-files-git.sh b/tests/test-vc-list-files-git.sh index 523b2a9..b31f99a 100755 --- a/tests/test-vc-list-files-git.sh +++ b/tests/test-vc-list-files-git.sh @@ -1,6 +1,6 @@ #!/bin/sh # Unit tests for vc-list-files -# Copyright (C) 2008-2011 Free Software Foundation, Inc. +# Copyright (C) 2008-2014 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/tests/test-verify.c b/tests/test-verify.c index 512c021..2a41eb1 100644 --- a/tests/test-verify.c +++ b/tests/test-verify.c @@ -1,6 +1,6 @@ /* Test the "verify" module. - Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2014 Free Software Foundation, Inc. This 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,9 +55,9 @@ function (int n) verify (1 == 1); verify (1 == 1); /* should be ok */ if (n) - return ((void) verify_true (1 == 1), verify_true (1 == 1) + 7); /* should be ok */ + return ((void) verify_expr (1 == 1, 1), verify_expr (1 == 1, 8)); /* should be ok */ #if EXP_FAIL == 5 - return (verify_true (1 == 2), 5); /* should give ERROR */ + return verify_expr (1 == 2, 5); /* should give ERROR */ #endif return 0; } diff --git a/tests/test-version-etc.c b/tests/test-version-etc.c index 00a5d7c..d94f63f 100644 --- a/tests/test-version-etc.c +++ b/tests/test-version-etc.c @@ -1,5 +1,5 @@ /* Test suite for version-etc. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 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/tests/test-version-etc.sh b/tests/test-version-etc.sh index c1ed827..c41f7ac 100755 --- a/tests/test-version-etc.sh +++ b/tests/test-version-etc.sh @@ -1,6 +1,6 @@ #! /bin/sh # Test suite for version-etc. -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 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/tests/test-wchar.c b/tests/test-wchar.c index 2d3bad7..d9807ec 100644 --- a/tests/test-wchar.c +++ b/tests/test-wchar.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-wcrtomb-w32.c b/tests/test-wcrtomb-w32.c index 0b09498..793bbce 100644 --- a/tests/test-wcrtomb-w32.c +++ b/tests/test-wcrtomb-w32.c @@ -1,5 +1,5 @@ /* Test of conversion of wide character to multibyte character. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-wcrtomb.c b/tests/test-wcrtomb.c index a50817f..5b14050 100644 --- a/tests/test-wcrtomb.c +++ b/tests/test-wcrtomb.c @@ -1,5 +1,5 @@ /* Test of conversion of wide character to multibyte character. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2014 Free Software Foundation, Inc. This 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/tests/test-wctype-h.c b/tests/test-wctype-h.c index aed3b77..904a185 100644 --- a/tests/test-wctype-h.c +++ b/tests/test-wctype-h.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-wcwidth.c b/tests/test-wcwidth.c index 8856c0a..d571a79 100644 --- a/tests/test-wcwidth.c +++ b/tests/test-wcwidth.c @@ -1,5 +1,5 @@ /* Test of wcwidth() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-xalloc-die.c b/tests/test-xalloc-die.c index d33e671..baf7924 100644 --- a/tests/test-xalloc-die.c +++ b/tests/test-xalloc-die.c @@ -1,5 +1,5 @@ /* Test of xalloc_die() function. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tests/test-xalloc-die.sh b/tests/test-xalloc-die.sh index 399d249..cf2ad40 100755 --- a/tests/test-xalloc-die.sh +++ b/tests/test-xalloc-die.sh @@ -1,6 +1,6 @@ #!/bin/sh # Test suite for xalloc_die. -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 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/tests/test-xstrtol.c b/tests/test-xstrtol.c index 9346892..c3670cc 100644 --- a/tests/test-xstrtol.c +++ b/tests/test-xstrtol.c @@ -1,5 +1,5 @@ /* Test of xstrtol module. - Copyright (C) 1995-1996, 1998-2001, 2003-2011 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 1998-2001, 2003-2014 Free Software Foundation, Inc. This 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/tests/test-xstrtol.sh b/tests/test-xstrtol.sh index 1a2f7ca..f718d8f 100755 --- a/tests/test-xstrtol.sh +++ b/tests/test-xstrtol.sh @@ -45,19 +45,19 @@ cat > expected <1 () -1->-1 () 1k->1024 () -invalid suffix in X argument \`${too_big}h' -X argument \`$too_big' too large -invalid X argument \`x' -invalid suffix in X argument \`9x' +invalid suffix in X argument '${too_big}h' +X argument '$too_big' too large +invalid X argument 'x' +invalid suffix in X argument '9x' 010->8 () MiB->1048576 () 1->1 () -invalid X argument \`-1' +invalid X argument '-1' 1k->1024 () -invalid suffix in X argument \`${too_big}h' -X argument \`$too_big' too large -invalid X argument \`x' -invalid suffix in X argument \`9x' +invalid suffix in X argument '${too_big}h' +X argument '$too_big' too large +invalid X argument 'x' +invalid suffix in X argument '9x' 010->8 () MiB->1048576 () EOF diff --git a/tests/test-xstrtoumax.sh b/tests/test-xstrtoumax.sh index 68abb93..bdbdbf5 100755 --- a/tests/test-xstrtoumax.sh +++ b/tests/test-xstrtoumax.sh @@ -31,12 +31,12 @@ mv k out # compare expected output cat > exp <1 () -invalid X argument \`-1' +invalid X argument '-1' 1k->1024 () -invalid suffix in X argument \`${too_big}h' -X argument \`$too_big' too large -invalid X argument \`x' -invalid suffix in X argument \`9x' +invalid suffix in X argument '${too_big}h' +X argument '$too_big' too large +invalid X argument 'x' +invalid suffix in X argument '9x' 010->8 () MiB->1048576 () EOF diff --git a/tests/test-yesno.c b/tests/test-yesno.c index 975cf57..22c45f2 100644 --- a/tests/test-yesno.c +++ b/tests/test-yesno.c @@ -1,5 +1,5 @@ /* Test of yesno module. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/test-yesno.sh b/tests/test-yesno.sh index b1a5b65..9d19541 100755 --- a/tests/test-yesno.sh +++ b/tests/test-yesno.sh @@ -1,10 +1,6 @@ #!/bin/sh - -tmpfiles= -trap 'rm -fr $tmpfiles' 1 2 3 15 - -p=t-yesno- -tmpfiles="${p}in.tmp ${p}xout.tmp ${p}out1.tmp ${p}out.tmp ${p}err.tmp" +: ${srcdir=.} +. "$srcdir/init.sh"; path_prepend_ . # For now, only test with C locale LC_ALL=C @@ -18,8 +14,8 @@ else cr='\r' fi -# Test with seekable stdin; the followon process must see remaining data. -tr @ '\177' < ${p}in.tmp +# Test with seekable stdin; the follow-on process must see remaining data. +tr @ '\177' < in.tmp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn - entire line consumed y@n - backspace does not change result y @@ -27,7 +23,7 @@ does not match either yesexpr or noexpr n EOF -cat < ${p}xout.tmp +cat < xout.tmp N Y Y @@ -35,40 +31,36 @@ N n EOF -(./test-yesno${EXEEXT}; ./test-yesno${EXEEXT} 3; cat) \ - < ${p}in.tmp > ${p}out1.tmp || exit 1 -LC_ALL=C tr -d "$cr" < ${p}out1.tmp > ${p}out.tmp || exit 1 -cmp ${p}xout.tmp ${p}out.tmp || exit 1 +fail=0 +(test-yesno; test-yesno 3; cat) < in.tmp > out1.tmp || fail=1 +LC_ALL=C tr -d "$cr" < out1.tmp > out.tmp || fail=1 +cmp xout.tmp out.tmp || fail=1 -(./test-yesno${EXEEXT} 3; ./test-yesno${EXEEXT}; cat) \ - < ${p}in.tmp > ${p}out1.tmp || exit 1 -LC_ALL=C tr -d "$cr" < ${p}out1.tmp > ${p}out.tmp || exit 1 -cmp ${p}xout.tmp ${p}out.tmp || exit 1 +(test-yesno 3; test-yesno; cat) < in.tmp > out1.tmp || fail=1 +LC_ALL=C tr -d "$cr" < out1.tmp > out.tmp || fail=1 +cmp xout.tmp out.tmp || fail=1 # Test for behavior on pipe -cat < ${p}xout.tmp +cat < xout.tmp Y N EOF -echo yes | ./test-yesno${EXEEXT} 2 > ${p}out1.tmp || exit 1 -LC_ALL=C tr -d "$cr" < ${p}out1.tmp > ${p}out.tmp || exit 1 -cmp ${p}xout.tmp ${p}out.tmp || exit 1 +echo yes | test-yesno 2 > out1.tmp || fail=1 +LC_ALL=C tr -d "$cr" < out1.tmp > out.tmp || fail=1 +cmp xout.tmp out.tmp || fail=1 # Test for behavior on EOF -cat < ${p}xout.tmp +cat < xout.tmp N EOF -./test-yesno${EXEEXT} ${p}out1.tmp || exit 1 -LC_ALL=C tr -d "$cr" < ${p}out1.tmp > ${p}out.tmp || exit 1 -cmp ${p}xout.tmp ${p}out.tmp || exit 1 +test-yesno out1.tmp || fail=1 +LC_ALL=C tr -d "$cr" < out1.tmp > out.tmp || fail=1 +cmp xout.tmp out.tmp || fail=1 # Test for behavior when stdin is closed -./test-yesno${EXEEXT} 0 <&- > ${p}out1.tmp 2> ${p}err.tmp && exit 1 -LC_ALL=C tr -d "$cr" < ${p}out1.tmp > ${p}out.tmp || exit 1 -cmp ${p}xout.tmp ${p}out.tmp || exit 1 -test -s ${p}err.tmp || exit 1 - -# Cleanup -rm -fr $tmpfiles +test-yesno 0 <&- > out1.tmp 2> err.tmp && fail=1 +LC_ALL=C tr -d "$cr" < out1.tmp > out.tmp || fail=1 +cmp xout.tmp out.tmp || fail=1 +test -s err.tmp || fail=1 -exit 0 +Exit $fail diff --git a/tests/uniwidth/test-uc_width.c b/tests/uniwidth/test-uc_width.c index d89383d..21e0db6 100644 --- a/tests/uniwidth/test-uc_width.c +++ b/tests/uniwidth/test-uc_width.c @@ -1,5 +1,5 @@ /* Test of uc_width() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/uniwidth/test-uc_width2.c b/tests/uniwidth/test-uc_width2.c index 1dfe23c..9e9cea2 100644 --- a/tests/uniwidth/test-uc_width2.c +++ b/tests/uniwidth/test-uc_width2.c @@ -1,5 +1,5 @@ /* Test of uc_width() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2014 Free Software Foundation, Inc. This 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/tests/unlinkdir.c b/tests/unlinkdir.c index b3f6285..157b3c4 100644 --- a/tests/unlinkdir.c +++ b/tests/unlinkdir.c @@ -1,6 +1,6 @@ /* unlinkdir.c - determine whether we can unlink directories - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2014 Free Software Foundation, Inc. This 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,6 +21,7 @@ #include "unlinkdir.h" #include "priv-set.h" +#include "root-uid.h" #include #if ! UNLINK_CANNOT_UNLINK_DIR @@ -43,7 +44,7 @@ cannot_unlink_dir (void) cannot = (priv_set_ismember (PRIV_SYS_LINKDIR) == 0); # else /* In traditional Unix, only root can unlink directories. */ - cannot = (geteuid () != 0); + cannot = (geteuid () != ROOT_UID); # endif initialized = true; } diff --git a/tests/unlinkdir.h b/tests/unlinkdir.h index 0df9140..5563131 100644 --- a/tests/unlinkdir.h +++ b/tests/unlinkdir.h @@ -1,6 +1,6 @@ /* unlinkdir.h - determine (and maybe change) whether we can unlink directories - Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2014 Free Software Foundation, Inc. This 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/tests/usleep.c b/tests/usleep.c deleted file mode 100644 index 4ebefe0..0000000 --- a/tests/usleep.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Pausing execution of the current thread. - Copyright (C) 2009-2011 Free Software Foundation, Inc. - Written by Eric Blake , 2009. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* This file is _intentionally_ light-weight. Rather than using - select or nanosleep, both of which drag in external libraries on - some platforms, this merely rounds up to the nearest second if - usleep() does not exist. If sub-second resolution is important, - then use a more powerful interface to begin with. */ - -#include - -/* Specification. */ -#include - -#include - -#ifndef HAVE_USLEEP -# define HAVE_USLEEP 0 -#endif - -/* Sleep for MICRO microseconds, which can be greater than 1 second. - Return -1 and set errno to EINVAL on range error (about 4295 - seconds), or 0 on success. Interaction with SIGALARM is - unspecified. */ - -int -usleep (useconds_t micro) -{ - unsigned int seconds = micro / 1000000; - if (sizeof seconds < sizeof micro && micro / 1000000 != seconds) - { - errno = EINVAL; - return -1; - } - if (!HAVE_USLEEP && micro % 1000000) - seconds++; - while ((seconds = sleep (seconds)) != 0); - -#undef usleep -#if !HAVE_USLEEP -# define usleep(x) 0 -#endif - return usleep (micro % 1000000); -} diff --git a/tests/w32sock.h b/tests/w32sock.h new file mode 100644 index 0000000..b921b1b --- /dev/null +++ b/tests/w32sock.h @@ -0,0 +1,136 @@ +/* w32sock.h --- internal auxiliary functions for Windows socket functions + + Copyright (C) 2008-2014 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Paolo Bonzini */ + +#include + +/* Get O_RDWR and O_BINARY. */ +#include + +/* Get _open_osfhandle(). */ +#include + +/* Get _get_osfhandle(). */ +#include "msvc-nothrow.h" + +#define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd))) +#define SOCKET_TO_FD(fh) (_open_osfhandle ((intptr_t) (fh), O_RDWR | O_BINARY)) + +static inline void +set_winsock_errno (void) +{ + int err = WSAGetLastError (); + + /* Map some WSAE* errors to the runtime library's error codes. */ + switch (err) + { + case WSA_INVALID_HANDLE: + errno = EBADF; + break; + case WSA_NOT_ENOUGH_MEMORY: + errno = ENOMEM; + break; + case WSA_INVALID_PARAMETER: + errno = EINVAL; + break; + case WSAENAMETOOLONG: + errno = ENAMETOOLONG; + break; + case WSAENOTEMPTY: + errno = ENOTEMPTY; + break; + case WSAEWOULDBLOCK: + errno = EWOULDBLOCK; + break; + case WSAEINPROGRESS: + errno = EINPROGRESS; + break; + case WSAEALREADY: + errno = EALREADY; + break; + case WSAENOTSOCK: + errno = ENOTSOCK; + break; + case WSAEDESTADDRREQ: + errno = EDESTADDRREQ; + break; + case WSAEMSGSIZE: + errno = EMSGSIZE; + break; + case WSAEPROTOTYPE: + errno = EPROTOTYPE; + break; + case WSAENOPROTOOPT: + errno = ENOPROTOOPT; + break; + case WSAEPROTONOSUPPORT: + errno = EPROTONOSUPPORT; + break; + case WSAEOPNOTSUPP: + errno = EOPNOTSUPP; + break; + case WSAEAFNOSUPPORT: + errno = EAFNOSUPPORT; + break; + case WSAEADDRINUSE: + errno = EADDRINUSE; + break; + case WSAEADDRNOTAVAIL: + errno = EADDRNOTAVAIL; + break; + case WSAENETDOWN: + errno = ENETDOWN; + break; + case WSAENETUNREACH: + errno = ENETUNREACH; + break; + case WSAENETRESET: + errno = ENETRESET; + break; + case WSAECONNABORTED: + errno = ECONNABORTED; + break; + case WSAECONNRESET: + errno = ECONNRESET; + break; + case WSAENOBUFS: + errno = ENOBUFS; + break; + case WSAEISCONN: + errno = EISCONN; + break; + case WSAENOTCONN: + errno = ENOTCONN; + break; + case WSAETIMEDOUT: + errno = ETIMEDOUT; + break; + case WSAECONNREFUSED: + errno = ECONNREFUSED; + break; + case WSAELOOP: + errno = ELOOP; + break; + case WSAEHOSTUNREACH: + errno = EHOSTUNREACH; + break; + default: + errno = (err > 10000 && err < 10025) ? err - 10000 : err; + break; + } +} diff --git a/tests/wctob.c b/tests/wctob.c index cc26afc..d87d180 100644 --- a/tests/wctob.c +++ b/tests/wctob.c @@ -1,5 +1,5 @@ /* Convert wide character to unibyte character. - Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2008, 2010-2014 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/tests/wctomb-impl.h b/tests/wctomb-impl.h index 4e95de6..0fa170e 100644 --- a/tests/wctomb-impl.h +++ b/tests/wctomb-impl.h @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/tests/wctomb.c b/tests/wctomb.c index 889a3c6..b3595a4 100644 --- a/tests/wctomb.c +++ b/tests/wctomb.c @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2014 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/tests/zerosize-ptr.h b/tests/zerosize-ptr.h index beeb3da..db30f4b 100644 --- a/tests/zerosize-ptr.h +++ b/tests/zerosize-ptr.h @@ -1,5 +1,5 @@ /* Return a pointer to a zero-size object in memory. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2014 Free Software Foundation, Inc. This 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/tool-versions.txt b/tool-versions.txt index 3b185b2..ff9acd7 100644 --- a/tool-versions.txt +++ b/tool-versions.txt @@ -1,5 +1,5 @@ -automake (GNU automake) 1.11.1 -Copyright (C) 2009 Free Software Foundation, Inc. +automake (GNU automake) 1.11.6 +Copyright (C) 2011 Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. @@ -7,8 +7,8 @@ There is NO WARRANTY, to the extent permitted by law. Written by Tom Tromey and Alexandre Duret-Lutz . -autoconf (GNU Autoconf) 2.67 -Copyright (C) 2010 Free Software Foundation, Inc. +autoconf (GNU Autoconf) 2.69 +Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+/Autoconf: GNU GPL version 3 or later , This is free software: you are free to change and redistribute it. @@ -16,14 +16,14 @@ There is NO WARRANTY, to the extent permitted by law. Written by David J. MacKenzie and Akim Demaille. -gcc (Debian 4.4.5-8) 4.4.5 -Copyright (C) 2010 Free Software Foundation, Inc. +gcc (Debian 4.7.2-5) 4.7.2 +Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -m4 (GNU M4) 1.4.14 -Copyright (C) 2010 Free Software Foundation, Inc. +m4 (GNU M4) 1.4.16 +Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. @@ -37,9 +37,9 @@ This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Ulrich Drepper. -Expect version is 5.44.1.15 +Expect version is 5.45 Tcl version is 8.5 -Framework version is 1.4.99 +Framework version is 1.5 makeinfo (GNU texinfo) 4.13 diff --git a/xargs/Makefile.am b/xargs/Makefile.am index 87da63c..e002334 100644 --- a/xargs/Makefile.am +++ b/xargs/Makefile.am @@ -3,14 +3,21 @@ AM_CFLAGS = $(WARN_CFLAGS) localedir = $(datadir)/locale bin_PROGRAMS = xargs man_MANS = xargs.1 -INCLUDES = -I.. -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\" -LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) +AM_CPPFLAGS = -I.. -I../gl/lib -I$(top_srcdir)/gl/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\" +LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) EXTRA_DIST = $(man_MANS) SUBDIRS = . testsuite -$(PROGRAMS): ../lib/libfind.a ../gnulib/lib/libgnulib.a +$(PROGRAMS): ../lib/libfind.a ../gl/lib/libgnulib.a dist-hook: findutils-check-manpages findutils-check-manpages: $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) + +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean diff --git a/xargs/Makefile.in b/xargs/Makefile.in index 896361c..73a307f 100644 --- a/xargs/Makefile.in +++ b/xargs/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -40,233 +57,198 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -279,7 +261,7 @@ xargs_SOURCES = xargs.c xargs_OBJECTS = xargs.$(OBJEXT) xargs_LDADD = $(LDADD) am__DEPENDENCIES_1 = -xargs_DEPENDENCIES = ../lib/libfind.a ../gnulib/lib/libgnulib.a \ +xargs_DEPENDENCIES = ../lib/libfind.a ../gl/lib/libgnulib.a \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp @@ -298,6 +280,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -319,6 +306,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) @@ -362,6 +355,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -372,6 +367,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -394,59 +390,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -454,6 +497,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -465,12 +510,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -482,10 +542,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -525,49 +601,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -594,6 +710,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -603,7 +721,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -615,8 +734,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -659,26 +780,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -695,17 +838,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -727,19 +880,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -755,6 +924,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -769,8 +944,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -792,30 +976,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -823,6 +1039,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -830,18 +1047,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -881,18 +1111,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = -I.. -I../gnulib/lib -I$(top_srcdir)/gnulib/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\" INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -902,6 +1134,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -912,12 +1146,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -938,6 +1175,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -948,7 +1188,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -956,8 +1198,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -973,7 +1221,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -981,8 +1231,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -1004,10 +1260,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -1019,19 +1282,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -1039,26 +1315,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -1076,6 +1382,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1088,11 +1397,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1100,6 +1419,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1107,10 +1427,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1120,10 +1443,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1147,6 +1475,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1154,14 +1483,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1171,6 +1503,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1183,7 +1517,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1224,9 +1560,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1238,7 +1579,8 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = std-options AM_CFLAGS = $(WARN_CFLAGS) man_MANS = xargs.1 -LDADD = ../lib/libfind.a ../gnulib/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) +AM_CPPFLAGS = -I.. -I../gl/lib -I$(top_srcdir)/gl/lib -I$(top_srcdir)/lib -I../intl -DLOCALEDIR=\"$(localedir)\" +LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) EXTRA_DIST = $(man_MANS) SUBDIRS = . testsuite all: all-recursive @@ -1277,8 +1619,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ @@ -1328,7 +1673,7 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad -xargs$(EXEEXT): $(xargs_OBJECTS) $(xargs_DEPENDENCIES) +xargs$(EXEEXT): $(xargs_OBJECTS) $(xargs_DEPENDENCIES) $(EXTRA_xargs_DEPENDENCIES) @rm -f xargs$(EXEEXT) $(LINK) $(xargs_OBJECTS) $(xargs_LDADD) $(LIBS) @@ -1355,11 +1700,18 @@ distclean-compile: @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1388,9 +1740,7 @@ uninstall-man1: sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -1572,13 +1922,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -1619,10 +1966,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -1636,7 +1988,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) @@ -1710,13 +2062,13 @@ uninstall-man: uninstall-man1 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ - clean-generic ctags ctags-recursive dist-hook distclean \ - distclean-compile distclean-generic distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-man1 install-pdf install-pdf-am install-ps \ + clean-generic clean-local ctags ctags-recursive dist-hook \ + distclean distclean-compile distclean-generic distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-binPROGRAMS install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installcheck-binPROGRAMS installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ @@ -1725,13 +2077,20 @@ uninstall-man: uninstall-man1 uninstall-binPROGRAMS uninstall-man uninstall-man1 -$(PROGRAMS): ../lib/libfind.a ../gnulib/lib/libgnulib.a +$(PROGRAMS): ../lib/libfind.a ../gl/lib/libgnulib.a dist-hook: findutils-check-manpages findutils-check-manpages: $(top_srcdir)/build-aux/man-lint.sh $(srcdir) $(man_MANS) +# Clean coverage files generated by running binaries built with +# gcc -fprofile-arcs -ftest-coverage +coverage-clean: + $(RM) *.gcno *.gcda *.gcov *.lcov + +clean-local: coverage-clean + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/xargs/testsuite/Makefile.am b/xargs/testsuite/Makefile.am index 8637d93..e5b6825 100644 --- a/xargs/testsuite/Makefile.am +++ b/xargs/testsuite/Makefile.am @@ -20,19 +20,19 @@ xargs.gnu/L2_2-0.exp \ xargs.gnu/L3-0.exp \ xargs.gnu/n1-0.exp \ xargs.gnu/n2-0.exp \ -xargs.gnu/n2-s26-0.exp \ -xargs.gnu/n2-s26-x-0.exp \ +xargs.gnu/n2-s21-0.exp \ +xargs.gnu/n2-s21-x-0.exp \ xargs.gnu/n3-0.exp \ -xargs.gnu/n3-s36-0.exp \ +xargs.gnu/n3-s31-0.exp \ xargs.gnu/noeof-0.exp \ xargs.gnu/nothing.exp \ xargs.gnu/P3-n1-IARG.exp \ xargs.gnu/r.exp \ xargs.gnu/s118-0.exp \ -xargs.gnu/s19-0.exp \ -xargs.gnu/s19_2-0.exp \ -xargs.gnu/s20-0.exp \ -xargs.gnu/s30-0.exp \ +xargs.gnu/s14_2-0.exp \ +xargs.gnu/s14-0.exp \ +xargs.gnu/s15-0.exp \ +xargs.gnu/s25-0.exp \ xargs.gnu/space-0.exp \ xargs.gnu/space-r.exp \ xargs.gnu/space-t-0.exp \ @@ -56,10 +56,10 @@ xargs.posix/L2-n2.exp \ xargs.posix/L3.exp \ xargs.posix/n1.exp \ xargs.posix/n2.exp \ -xargs.posix/n2-s26.exp \ -xargs.posix/n2-s26-x.exp \ +xargs.posix/n2-s21.exp \ +xargs.posix/n2-s21-x.exp \ xargs.posix/n3.exp \ -xargs.posix/n3-s36.exp \ +xargs.posix/n3-s31.exp \ xargs.posix/noeof.exp \ xargs.posix/quotes.exp \ xargs.posix/rc-123.exp \ @@ -68,12 +68,12 @@ xargs.posix/rc-125.exp \ xargs.posix/rc-126.exp \ xargs.posix/rc-127.exp \ xargs.posix/s118.exp \ -xargs.posix/s19_2.exp \ -xargs.posix/s19.exp \ -xargs.posix/s20.exp \ -xargs.posix/s30.exp \ +xargs.posix/s14.exp \ +xargs.posix/s14_2.exp \ +xargs.posix/s15.exp \ +xargs.posix/s25.exp \ +xargs.posix/s42.exp \ xargs.posix/s470.exp \ -xargs.posix/s47.exp \ xargs.posix/s48.exp \ xargs.posix/s6.exp \ xargs.posix/savannah-11865.exp \ @@ -98,7 +98,7 @@ xargs.sysv/l1_2.exp \ xargs.sysv/l1.exp \ xargs.sysv/l1n4.exp \ xargs.sysv/lc_l2.exp \ -xargs.sysv/s30-t.exp \ +xargs.sysv/s25-t.exp \ xargs.sysv/sv-bug-18713.exp \ xargs.sysv/space-t.exp \ xargs.sysv/trace.exp @@ -118,18 +118,18 @@ xargs.gnu/L2_2-0.xo \ xargs.gnu/L3-0.xo \ xargs.gnu/n1-0.xo \ xargs.gnu/n2-0.xo \ -xargs.gnu/n2-s26-0.xo \ -xargs.gnu/n2-s26-x-0.xo \ +xargs.gnu/n2-s21-0.xo \ +xargs.gnu/n2-s21-x-0.xo \ xargs.gnu/n3-0.xo \ -xargs.gnu/n3-s36-0.xo \ +xargs.gnu/n3-s31-0.xo \ xargs.gnu/noeof-0.xo \ xargs.gnu/nothing.xo \ xargs.gnu/P3-n1-IARG.xo \ xargs.gnu/r.xo \ xargs.gnu/s118-0.xo \ -xargs.gnu/s19-0.xo \ -xargs.gnu/s20-0.xo \ -xargs.gnu/s30-0.xo \ +xargs.gnu/s14-0.xo \ +xargs.gnu/s15-0.xo \ +xargs.gnu/s25-0.xo \ xargs.gnu/space-0.xo \ xargs.gnu/space-t-0.xo \ xargs.posix/EEOFb.xo \ @@ -148,20 +148,20 @@ xargs.posix/L2-n2.xo \ xargs.posix/uc_L2.xo \ xargs.posix/L3.xo \ xargs.posix/n1.xo \ -xargs.posix/n2-s26.xo \ -xargs.posix/n2-s26-x.xo \ +xargs.posix/n2-s21.xo \ +xargs.posix/n2-s21-x.xo \ xargs.posix/n2.xo \ -xargs.posix/n3-s36.xo \ +xargs.posix/n3-s31.xo \ xargs.posix/n3.xo \ xargs.posix/noeof.xo \ xargs.posix/quotes.xo \ xargs.posix/rc-123.xo \ xargs.posix/s118.xo \ -xargs.posix/s19.xo \ -xargs.posix/s20.xo \ -xargs.posix/s30.xo \ +xargs.posix/s14.xo \ +xargs.posix/s15.xo \ +xargs.posix/s25.xo \ +xargs.posix/s42.xo \ xargs.posix/s470.xo \ -xargs.posix/s47.xo \ xargs.posix/s48.xo \ xargs.posix/savannah-11865.xo \ xargs.posix/space.xo \ @@ -183,7 +183,7 @@ xargs.sysv/l1_2.xo \ xargs.sysv/l1n4.xo \ xargs.sysv/l1.xo \ xargs.sysv/lc_l2.xo \ -xargs.sysv/s30-t.xo \ +xargs.sysv/s25-t.xo \ xargs.sysv/sv-bug-18713.xo \ xargs.sysv/space-t.xo \ xargs.sysv/trace.xo @@ -194,7 +194,7 @@ EXTRA_DIST_XE = \ xargs.gnu/space-t-0.xe \ xargs.sysv/empty_def-t.xe \ xargs.sysv/empty-t.xe \ -xargs.sysv/s30-t.xe \ +xargs.sysv/s25-t.xe \ xargs.sysv/space-t.xe \ xargs.sysv/trace.xe diff --git a/xargs/testsuite/Makefile.in b/xargs/testsuite/Makefile.in index f99a579..16e853b 100644 --- a/xargs/testsuite/Makefile.in +++ b/xargs/testsuite/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in 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. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,233 +55,198 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/findlib.m4 \ $(top_srcdir)/m4/mkinstalldirs.m4 $(top_srcdir)/m4/noreturn.m4 \ $(top_srcdir)/m4/nullsort.m4 $(top_srcdir)/m4/withfts.m4 \ - $(top_srcdir)/gnulib/m4/00gnulib.m4 \ - $(top_srcdir)/gnulib/m4/alloca.m4 \ - $(top_srcdir)/gnulib/m4/argmatch.m4 \ - $(top_srcdir)/gnulib/m4/assert.m4 \ - $(top_srcdir)/gnulib/m4/bison.m4 \ - $(top_srcdir)/gnulib/m4/btowc.m4 \ - $(top_srcdir)/gnulib/m4/canonicalize.m4 \ - $(top_srcdir)/gnulib/m4/chdir-long.m4 \ - $(top_srcdir)/gnulib/m4/chown.m4 \ - $(top_srcdir)/gnulib/m4/clock_time.m4 \ - $(top_srcdir)/gnulib/m4/cloexec.m4 \ - $(top_srcdir)/gnulib/m4/close-stream.m4 \ - $(top_srcdir)/gnulib/m4/close.m4 \ - $(top_srcdir)/gnulib/m4/closein.m4 \ - $(top_srcdir)/gnulib/m4/closeout.m4 \ - $(top_srcdir)/gnulib/m4/codeset.m4 \ - $(top_srcdir)/gnulib/m4/configmake.m4 \ - $(top_srcdir)/gnulib/m4/ctype.m4 \ - $(top_srcdir)/gnulib/m4/cycle-check.m4 \ - $(top_srcdir)/gnulib/m4/d-ino.m4 \ - $(top_srcdir)/gnulib/m4/d-type.m4 \ - $(top_srcdir)/gnulib/m4/dirent-safer.m4 \ - $(top_srcdir)/gnulib/m4/dirent_h.m4 \ - $(top_srcdir)/gnulib/m4/dirfd.m4 \ - $(top_srcdir)/gnulib/m4/dirname.m4 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/error.m4 \ - $(top_srcdir)/gnulib/m4/euidaccess.m4 \ - $(top_srcdir)/gnulib/m4/extensions.m4 \ - $(top_srcdir)/gnulib/m4/faccessat.m4 \ - $(top_srcdir)/gnulib/m4/fchdir.m4 \ - $(top_srcdir)/gnulib/m4/fclose.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ - $(top_srcdir)/gnulib/m4/fcntl-safer.m4 \ - $(top_srcdir)/gnulib/m4/fcntl.m4 \ - $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ - $(top_srcdir)/gnulib/m4/fdopendir.m4 \ - $(top_srcdir)/gnulib/m4/fflush.m4 \ - $(top_srcdir)/gnulib/m4/fileblocks.m4 \ - $(top_srcdir)/gnulib/m4/filemode.m4 \ - $(top_srcdir)/gnulib/m4/flexmember.m4 \ - $(top_srcdir)/gnulib/m4/float_h.m4 \ - $(top_srcdir)/gnulib/m4/fnmatch.m4 \ - $(top_srcdir)/gnulib/m4/fopen.m4 \ - $(top_srcdir)/gnulib/m4/fpending.m4 \ - $(top_srcdir)/gnulib/m4/fpurge.m4 \ - $(top_srcdir)/gnulib/m4/freading.m4 \ - $(top_srcdir)/gnulib/m4/fseeko.m4 \ - $(top_srcdir)/gnulib/m4/fstypename.m4 \ - $(top_srcdir)/gnulib/m4/ftell.m4 \ - $(top_srcdir)/gnulib/m4/ftello.m4 \ - $(top_srcdir)/gnulib/m4/fts.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/gnulib/m4/getcwd-path-max.m4 \ - $(top_srcdir)/gnulib/m4/getcwd.m4 \ - $(top_srcdir)/gnulib/m4/getdelim.m4 \ - $(top_srcdir)/gnulib/m4/getdtablesize.m4 \ - $(top_srcdir)/gnulib/m4/getgroups.m4 \ - $(top_srcdir)/gnulib/m4/getline.m4 \ - $(top_srcdir)/gnulib/m4/getopt.m4 \ - $(top_srcdir)/gnulib/m4/getpagesize.m4 \ - $(top_srcdir)/gnulib/m4/gettext.m4 \ - $(top_srcdir)/gnulib/m4/gettime.m4 \ - $(top_srcdir)/gnulib/m4/gettimeofday.m4 \ - $(top_srcdir)/gnulib/m4/getugroups.m4 \ - $(top_srcdir)/gnulib/m4/glibc21.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-common.m4 \ - $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \ - $(top_srcdir)/gnulib/m4/group-member.m4 \ - $(top_srcdir)/gnulib/m4/hash.m4 \ - $(top_srcdir)/gnulib/m4/human.m4 \ - $(top_srcdir)/gnulib/m4/i-ring.m4 \ - $(top_srcdir)/gnulib/m4/iconv.m4 \ - $(top_srcdir)/gnulib/m4/idcache.m4 \ - $(top_srcdir)/gnulib/m4/include_next.m4 \ - $(top_srcdir)/gnulib/m4/inline.m4 \ - $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ - $(top_srcdir)/gnulib/m4/intmax_t.m4 \ - $(top_srcdir)/gnulib/m4/inttostr.m4 \ - $(top_srcdir)/gnulib/m4/inttypes-pri.m4 \ - $(top_srcdir)/gnulib/m4/inttypes.m4 \ - $(top_srcdir)/gnulib/m4/inttypes_h.m4 \ - $(top_srcdir)/gnulib/m4/isblank.m4 \ - $(top_srcdir)/gnulib/m4/iswblank.m4 \ - $(top_srcdir)/gnulib/m4/langinfo_h.m4 \ - $(top_srcdir)/gnulib/m4/lchown.m4 \ - $(top_srcdir)/gnulib/m4/lcmessage.m4 \ - $(top_srcdir)/gnulib/m4/lib-ld.m4 \ - $(top_srcdir)/gnulib/m4/lib-link.m4 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libunistring-base.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/ls-mntd-fs.m4 \ - $(top_srcdir)/gnulib/m4/lseek.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/math_h.m4 \ - $(top_srcdir)/gnulib/m4/mathfunc.m4 \ - $(top_srcdir)/gnulib/m4/mbchar.m4 \ - $(top_srcdir)/gnulib/m4/mbiter.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbslen.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/memrchr.m4 \ - $(top_srcdir)/gnulib/m4/mgetgroups.m4 \ - $(top_srcdir)/gnulib/m4/mkdir.m4 \ - $(top_srcdir)/gnulib/m4/mktime.m4 \ - $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ - $(top_srcdir)/gnulib/m4/mode_t.m4 \ - $(top_srcdir)/gnulib/m4/modechange.m4 \ - $(top_srcdir)/gnulib/m4/mountlist.m4 \ - $(top_srcdir)/gnulib/m4/multiarch.m4 \ - $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ - $(top_srcdir)/gnulib/m4/nls.m4 \ - $(top_srcdir)/gnulib/m4/onceonly.m4 \ - $(top_srcdir)/gnulib/m4/open.m4 \ - $(top_srcdir)/gnulib/m4/openat.m4 \ - $(top_srcdir)/gnulib/m4/parse-datetime.m4 \ - $(top_srcdir)/gnulib/m4/pathmax.m4 \ - $(top_srcdir)/gnulib/m4/perror.m4 \ - $(top_srcdir)/gnulib/m4/po.m4 \ - $(top_srcdir)/gnulib/m4/printf.m4 \ - $(top_srcdir)/gnulib/m4/priv-set.m4 \ - $(top_srcdir)/gnulib/m4/progtest.m4 \ - $(top_srcdir)/gnulib/m4/putenv.m4 \ - $(top_srcdir)/gnulib/m4/quote.m4 \ - $(top_srcdir)/gnulib/m4/quotearg.m4 \ - $(top_srcdir)/gnulib/m4/readlink.m4 \ - $(top_srcdir)/gnulib/m4/readlinkat.m4 \ - $(top_srcdir)/gnulib/m4/realloc.m4 \ - $(top_srcdir)/gnulib/m4/regex.m4 \ - $(top_srcdir)/gnulib/m4/rmdir.m4 \ - $(top_srcdir)/gnulib/m4/rpmatch.m4 \ - $(top_srcdir)/gnulib/m4/same.m4 \ - $(top_srcdir)/gnulib/m4/save-cwd.m4 \ - $(top_srcdir)/gnulib/m4/savedir.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/sleep.m4 \ - $(top_srcdir)/gnulib/m4/snprintf.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/st_dm_mode.m4 \ - $(top_srcdir)/gnulib/m4/stat-time.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdarg.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio-safer.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.m4 \ - $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ - $(top_srcdir)/gnulib/m4/stpcpy.m4 \ - $(top_srcdir)/gnulib/m4/strcase.m4 \ - $(top_srcdir)/gnulib/m4/strcasestr.m4 \ - $(top_srcdir)/gnulib/m4/strdup.m4 \ - $(top_srcdir)/gnulib/m4/strerror.m4 \ - $(top_srcdir)/gnulib/m4/strftime.m4 \ - $(top_srcdir)/gnulib/m4/string_h.m4 \ - $(top_srcdir)/gnulib/m4/strings_h.m4 \ - $(top_srcdir)/gnulib/m4/strndup.m4 \ - $(top_srcdir)/gnulib/m4/strnlen.m4 \ - $(top_srcdir)/gnulib/m4/strstr.m4 \ - $(top_srcdir)/gnulib/m4/strtoimax.m4 \ - $(top_srcdir)/gnulib/m4/strtol.m4 \ - $(top_srcdir)/gnulib/m4/strtoll.m4 \ - $(top_srcdir)/gnulib/m4/strtoul.m4 \ - $(top_srcdir)/gnulib/m4/strtoull.m4 \ - $(top_srcdir)/gnulib/m4/strtoumax.m4 \ - $(top_srcdir)/gnulib/m4/symlink.m4 \ - $(top_srcdir)/gnulib/m4/symlinkat.m4 \ - $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ - $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ - $(top_srcdir)/gnulib/m4/thread.m4 \ - $(top_srcdir)/gnulib/m4/threadlib.m4 \ - $(top_srcdir)/gnulib/m4/time_h.m4 \ - $(top_srcdir)/gnulib/m4/time_r.m4 \ - $(top_srcdir)/gnulib/m4/timespec.m4 \ - $(top_srcdir)/gnulib/m4/tm_gmtoff.m4 \ - $(top_srcdir)/gnulib/m4/ungetc.m4 \ - $(top_srcdir)/gnulib/m4/unistd-safer.m4 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/unlink.m4 \ - $(top_srcdir)/gnulib/m4/unlinkdir.m4 \ - $(top_srcdir)/gnulib/m4/usleep.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/version-etc.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/warnings.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wcwidth.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xalloc.m4 \ - $(top_srcdir)/gnulib/m4/xgetcwd.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/xstrndup.m4 \ - $(top_srcdir)/gnulib/m4/xstrtod.m4 \ - $(top_srcdir)/gnulib/m4/xstrtol.m4 \ - $(top_srcdir)/gnulib/m4/yesno.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/gl/m4/00gnulib.m4 \ + $(top_srcdir)/gl/m4/absolute-header.m4 \ + $(top_srcdir)/gl/m4/alloca.m4 \ + $(top_srcdir)/gl/m4/arpa_inet_h.m4 \ + $(top_srcdir)/gl/m4/assert.m4 $(top_srcdir)/gl/m4/bison.m4 \ + $(top_srcdir)/gl/m4/btowc.m4 $(top_srcdir)/gl/m4/byteswap.m4 \ + $(top_srcdir)/gl/m4/canonicalize.m4 \ + $(top_srcdir)/gl/m4/chdir-long.m4 \ + $(top_srcdir)/gl/m4/check-math-lib.m4 \ + $(top_srcdir)/gl/m4/clock_time.m4 \ + $(top_srcdir)/gl/m4/close-stream.m4 \ + $(top_srcdir)/gl/m4/close.m4 $(top_srcdir)/gl/m4/closedir.m4 \ + $(top_srcdir)/gl/m4/closein.m4 $(top_srcdir)/gl/m4/closeout.m4 \ + $(top_srcdir)/gl/m4/codeset.m4 \ + $(top_srcdir)/gl/m4/configmake.m4 $(top_srcdir)/gl/m4/ctype.m4 \ + $(top_srcdir)/gl/m4/cycle-check.m4 \ + $(top_srcdir)/gl/m4/d-ino.m4 $(top_srcdir)/gl/m4/d-type.m4 \ + $(top_srcdir)/gl/m4/dirent-safer.m4 \ + $(top_srcdir)/gl/m4/dirent_h.m4 $(top_srcdir)/gl/m4/dirfd.m4 \ + $(top_srcdir)/gl/m4/dirname.m4 \ + $(top_srcdir)/gl/m4/double-slash-root.m4 \ + $(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \ + $(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \ + $(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \ + $(top_srcdir)/gl/m4/euidaccess.m4 \ + $(top_srcdir)/gl/m4/exponentd.m4 \ + $(top_srcdir)/gl/m4/exponentf.m4 \ + $(top_srcdir)/gl/m4/exponentl.m4 \ + $(top_srcdir)/gl/m4/extensions.m4 \ + $(top_srcdir)/gl/m4/extern-inline.m4 \ + $(top_srcdir)/gl/m4/faccessat.m4 $(top_srcdir)/gl/m4/fchdir.m4 \ + $(top_srcdir)/gl/m4/fcntl-o.m4 \ + $(top_srcdir)/gl/m4/fcntl-safer.m4 \ + $(top_srcdir)/gl/m4/fcntl.m4 $(top_srcdir)/gl/m4/fcntl_h.m4 \ + $(top_srcdir)/gl/m4/fdopen.m4 $(top_srcdir)/gl/m4/fdopendir.m4 \ + $(top_srcdir)/gl/m4/fflush.m4 \ + $(top_srcdir)/gl/m4/fileblocks.m4 \ + $(top_srcdir)/gl/m4/filemode.m4 \ + $(top_srcdir)/gl/m4/filenamecat.m4 \ + $(top_srcdir)/gl/m4/flexmember.m4 \ + $(top_srcdir)/gl/m4/float_h.m4 $(top_srcdir)/gl/m4/fnmatch.m4 \ + $(top_srcdir)/gl/m4/fopen.m4 $(top_srcdir)/gl/m4/fpending.m4 \ + $(top_srcdir)/gl/m4/fpieee.m4 $(top_srcdir)/gl/m4/fpurge.m4 \ + $(top_srcdir)/gl/m4/freadahead.m4 \ + $(top_srcdir)/gl/m4/freading.m4 $(top_srcdir)/gl/m4/fseek.m4 \ + $(top_srcdir)/gl/m4/fseeko.m4 $(top_srcdir)/gl/m4/fstat.m4 \ + $(top_srcdir)/gl/m4/fstatat.m4 \ + $(top_srcdir)/gl/m4/fstypename.m4 $(top_srcdir)/gl/m4/ftell.m4 \ + $(top_srcdir)/gl/m4/ftello.m4 $(top_srcdir)/gl/m4/ftruncate.m4 \ + $(top_srcdir)/gl/m4/fts.m4 \ + $(top_srcdir)/gl/m4/getcwd-abort-bug.m4 \ + $(top_srcdir)/gl/m4/getcwd-path-max.m4 \ + $(top_srcdir)/gl/m4/getcwd.m4 $(top_srcdir)/gl/m4/getdelim.m4 \ + $(top_srcdir)/gl/m4/getdtablesize.m4 \ + $(top_srcdir)/gl/m4/getgroups.m4 \ + $(top_srcdir)/gl/m4/gethostname.m4 \ + $(top_srcdir)/gl/m4/getline.m4 $(top_srcdir)/gl/m4/getopt.m4 \ + $(top_srcdir)/gl/m4/getpagesize.m4 \ + $(top_srcdir)/gl/m4/gettext.m4 $(top_srcdir)/gl/m4/gettime.m4 \ + $(top_srcdir)/gl/m4/gettimeofday.m4 \ + $(top_srcdir)/gl/m4/glibc21.m4 \ + $(top_srcdir)/gl/m4/gnulib-common.m4 \ + $(top_srcdir)/gl/m4/gnulib-comp.m4 \ + $(top_srcdir)/gl/m4/group-member.m4 \ + $(top_srcdir)/gl/m4/human.m4 $(top_srcdir)/gl/m4/i-ring.m4 \ + $(top_srcdir)/gl/m4/iconv.m4 $(top_srcdir)/gl/m4/idcache.m4 \ + $(top_srcdir)/gl/m4/include_next.m4 \ + $(top_srcdir)/gl/m4/inet_pton.m4 $(top_srcdir)/gl/m4/inline.m4 \ + $(top_srcdir)/gl/m4/intlmacosx.m4 \ + $(top_srcdir)/gl/m4/intmax_t.m4 \ + $(top_srcdir)/gl/m4/inttostr.m4 \ + $(top_srcdir)/gl/m4/inttypes-pri.m4 \ + $(top_srcdir)/gl/m4/inttypes.m4 \ + $(top_srcdir)/gl/m4/inttypes_h.m4 $(top_srcdir)/gl/m4/ioctl.m4 \ + $(top_srcdir)/gl/m4/isblank.m4 $(top_srcdir)/gl/m4/isfinite.m4 \ + $(top_srcdir)/gl/m4/isinf.m4 $(top_srcdir)/gl/m4/isnand.m4 \ + $(top_srcdir)/gl/m4/isnanf.m4 $(top_srcdir)/gl/m4/isnanl.m4 \ + $(top_srcdir)/gl/m4/iswblank.m4 \ + $(top_srcdir)/gl/m4/langinfo_h.m4 \ + $(top_srcdir)/gl/m4/largefile.m4 \ + $(top_srcdir)/gl/m4/lcmessage.m4 $(top_srcdir)/gl/m4/lib-ld.m4 \ + $(top_srcdir)/gl/m4/lib-link.m4 \ + $(top_srcdir)/gl/m4/lib-prefix.m4 \ + $(top_srcdir)/gl/m4/libunistring-base.m4 \ + $(top_srcdir)/gl/m4/localcharset.m4 \ + $(top_srcdir)/gl/m4/locale-fr.m4 \ + $(top_srcdir)/gl/m4/locale-ja.m4 \ + $(top_srcdir)/gl/m4/locale-tr.m4 \ + $(top_srcdir)/gl/m4/locale-zh.m4 \ + $(top_srcdir)/gl/m4/locale_h.m4 \ + $(top_srcdir)/gl/m4/localeconv.m4 \ + $(top_srcdir)/gl/m4/localename.m4 $(top_srcdir)/gl/m4/lock.m4 \ + $(top_srcdir)/gl/m4/longlong.m4 \ + $(top_srcdir)/gl/m4/ls-mntd-fs.m4 $(top_srcdir)/gl/m4/lseek.m4 \ + $(top_srcdir)/gl/m4/lstat.m4 $(top_srcdir)/gl/m4/malloc.m4 \ + $(top_srcdir)/gl/m4/malloca.m4 \ + $(top_srcdir)/gl/m4/manywarnings.m4 \ + $(top_srcdir)/gl/m4/math_h.m4 $(top_srcdir)/gl/m4/mathfunc.m4 \ + $(top_srcdir)/gl/m4/mbchar.m4 $(top_srcdir)/gl/m4/mbiter.m4 \ + $(top_srcdir)/gl/m4/mbrtowc.m4 $(top_srcdir)/gl/m4/mbsinit.m4 \ + $(top_srcdir)/gl/m4/mbslen.m4 $(top_srcdir)/gl/m4/mbsrtowcs.m4 \ + $(top_srcdir)/gl/m4/mbstate_t.m4 $(top_srcdir)/gl/m4/mbtowc.m4 \ + $(top_srcdir)/gl/m4/memchr.m4 $(top_srcdir)/gl/m4/mempcpy.m4 \ + $(top_srcdir)/gl/m4/memrchr.m4 $(top_srcdir)/gl/m4/mktime.m4 \ + $(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \ + $(top_srcdir)/gl/m4/modechange.m4 $(top_srcdir)/gl/m4/modf.m4 \ + $(top_srcdir)/gl/m4/mountlist.m4 \ + $(top_srcdir)/gl/m4/msvc-inval.m4 \ + $(top_srcdir)/gl/m4/msvc-nothrow.m4 \ + $(top_srcdir)/gl/m4/multiarch.m4 \ + $(top_srcdir)/gl/m4/nanosleep.m4 \ + $(top_srcdir)/gl/m4/netinet_in_h.m4 \ + $(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \ + $(top_srcdir)/gl/m4/nocrash.m4 $(top_srcdir)/gl/m4/off_t.m4 \ + $(top_srcdir)/gl/m4/onceonly.m4 $(top_srcdir)/gl/m4/open.m4 \ + $(top_srcdir)/gl/m4/openat.m4 $(top_srcdir)/gl/m4/opendir.m4 \ + $(top_srcdir)/gl/m4/parse-datetime.m4 \ + $(top_srcdir)/gl/m4/pathmax.m4 $(top_srcdir)/gl/m4/perror.m4 \ + $(top_srcdir)/gl/m4/pipe.m4 $(top_srcdir)/gl/m4/po.m4 \ + $(top_srcdir)/gl/m4/printf.m4 $(top_srcdir)/gl/m4/priv-set.m4 \ + $(top_srcdir)/gl/m4/progtest.m4 $(top_srcdir)/gl/m4/putenv.m4 \ + $(top_srcdir)/gl/m4/quote.m4 $(top_srcdir)/gl/m4/quotearg.m4 \ + $(top_srcdir)/gl/m4/raise.m4 $(top_srcdir)/gl/m4/read.m4 \ + $(top_srcdir)/gl/m4/readdir.m4 $(top_srcdir)/gl/m4/readlink.m4 \ + $(top_srcdir)/gl/m4/readlinkat.m4 \ + $(top_srcdir)/gl/m4/realloc.m4 $(top_srcdir)/gl/m4/regex.m4 \ + $(top_srcdir)/gl/m4/rewinddir.m4 $(top_srcdir)/gl/m4/rmdir.m4 \ + $(top_srcdir)/gl/m4/rpmatch.m4 \ + $(top_srcdir)/gl/m4/safe-read.m4 $(top_srcdir)/gl/m4/same.m4 \ + $(top_srcdir)/gl/m4/save-cwd.m4 $(top_srcdir)/gl/m4/savedir.m4 \ + $(top_srcdir)/gl/m4/select.m4 \ + $(top_srcdir)/gl/m4/selinux-context-h.m4 \ + $(top_srcdir)/gl/m4/selinux-selinux-h.m4 \ + $(top_srcdir)/gl/m4/setenv.m4 $(top_srcdir)/gl/m4/setlocale.m4 \ + $(top_srcdir)/gl/m4/sigaction.m4 \ + $(top_srcdir)/gl/m4/signal_h.m4 \ + $(top_srcdir)/gl/m4/signalblocking.m4 \ + $(top_srcdir)/gl/m4/size_max.m4 $(top_srcdir)/gl/m4/sleep.m4 \ + $(top_srcdir)/gl/m4/snprintf.m4 \ + $(top_srcdir)/gl/m4/socketlib.m4 \ + $(top_srcdir)/gl/m4/sockets.m4 $(top_srcdir)/gl/m4/socklen.m4 \ + $(top_srcdir)/gl/m4/sockpfaf.m4 $(top_srcdir)/gl/m4/ssize_t.m4 \ + $(top_srcdir)/gl/m4/st_dm_mode.m4 \ + $(top_srcdir)/gl/m4/stat-size.m4 \ + $(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \ + $(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \ + $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \ + $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \ + $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \ + $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \ + $(top_srcdir)/gl/m4/strcasestr.m4 \ + $(top_srcdir)/gl/m4/strdup.m4 $(top_srcdir)/gl/m4/strerror.m4 \ + $(top_srcdir)/gl/m4/strerror_r.m4 \ + $(top_srcdir)/gl/m4/strftime.m4 \ + $(top_srcdir)/gl/m4/string_h.m4 \ + $(top_srcdir)/gl/m4/strings_h.m4 \ + $(top_srcdir)/gl/m4/strndup.m4 $(top_srcdir)/gl/m4/strnlen.m4 \ + $(top_srcdir)/gl/m4/strstr.m4 $(top_srcdir)/gl/m4/strtol.m4 \ + $(top_srcdir)/gl/m4/strtoul.m4 $(top_srcdir)/gl/m4/strtoull.m4 \ + $(top_srcdir)/gl/m4/strtoumax.m4 \ + $(top_srcdir)/gl/m4/symlink.m4 \ + $(top_srcdir)/gl/m4/symlinkat.m4 \ + $(top_srcdir)/gl/m4/sys_ioctl_h.m4 \ + $(top_srcdir)/gl/m4/sys_select_h.m4 \ + $(top_srcdir)/gl/m4/sys_socket_h.m4 \ + $(top_srcdir)/gl/m4/sys_stat_h.m4 \ + $(top_srcdir)/gl/m4/sys_time_h.m4 \ + $(top_srcdir)/gl/m4/sys_types_h.m4 \ + $(top_srcdir)/gl/m4/sys_uio_h.m4 \ + $(top_srcdir)/gl/m4/sys_utsname_h.m4 \ + $(top_srcdir)/gl/m4/sys_wait_h.m4 \ + $(top_srcdir)/gl/m4/thread.m4 $(top_srcdir)/gl/m4/threadlib.m4 \ + $(top_srcdir)/gl/m4/time_h.m4 $(top_srcdir)/gl/m4/time_r.m4 \ + $(top_srcdir)/gl/m4/timespec.m4 \ + $(top_srcdir)/gl/m4/tm_gmtoff.m4 $(top_srcdir)/gl/m4/trunc.m4 \ + $(top_srcdir)/gl/m4/uname.m4 $(top_srcdir)/gl/m4/ungetc.m4 \ + $(top_srcdir)/gl/m4/unistd-safer.m4 \ + $(top_srcdir)/gl/m4/unistd_h.m4 $(top_srcdir)/gl/m4/unlink.m4 \ + $(top_srcdir)/gl/m4/unlinkat.m4 \ + $(top_srcdir)/gl/m4/unlinkdir.m4 \ + $(top_srcdir)/gl/m4/vasnprintf.m4 \ + $(top_srcdir)/gl/m4/version-etc.m4 \ + $(top_srcdir)/gl/m4/warn-on-use.m4 \ + $(top_srcdir)/gl/m4/warnings.m4 $(top_srcdir)/gl/m4/wchar_h.m4 \ + $(top_srcdir)/gl/m4/wchar_t.m4 $(top_srcdir)/gl/m4/wcrtomb.m4 \ + $(top_srcdir)/gl/m4/wctob.m4 $(top_srcdir)/gl/m4/wctomb.m4 \ + $(top_srcdir)/gl/m4/wctype_h.m4 $(top_srcdir)/gl/m4/wcwidth.m4 \ + $(top_srcdir)/gl/m4/wint_t.m4 $(top_srcdir)/gl/m4/xalloc.m4 \ + $(top_srcdir)/gl/m4/xgetcwd.m4 $(top_srcdir)/gl/m4/xsize.m4 \ + $(top_srcdir)/gl/m4/xstrndup.m4 $(top_srcdir)/gl/m4/xstrtod.m4 \ + $(top_srcdir)/gl/m4/xstrtol.m4 $(top_srcdir)/gl/m4/yesno.m4 \ + $(top_srcdir)/gl/m4/yield.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs @@ -273,6 +255,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir EXPECT = expect RUNTEST = runtest @@ -283,6 +270,8 @@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -293,6 +282,7 @@ BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ +BYTESWAP_H = @BYTESWAP_H@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -315,59 +305,106 @@ EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ ERRNO_H = @ERRNO_H@ EXEEXT = @EXEEXT@ +FAKETIME = @FAKETIME@ FINDLIBOBJS = @FINDLIBOBJS@ FINDLIBS = @FINDLIBS@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ +GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ GETOPT_H = @GETOPT_H@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ +GNULIB_ACCEPT = @GNULIB_ACCEPT@ +GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@ +GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ +GNULIB_ASINF = @GNULIB_ASINF@ GNULIB_ASINL = @GNULIB_ASINL@ +GNULIB_ATAN2F = @GNULIB_ATAN2F@ +GNULIB_ATANF = @GNULIB_ATANF@ GNULIB_ATANL = @GNULIB_ATANL@ GNULIB_ATOLL = @GNULIB_ATOLL@ +GNULIB_BIND = @GNULIB_BIND@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CBRT = @GNULIB_CBRT@ +GNULIB_CBRTF = @GNULIB_CBRTF@ +GNULIB_CBRTL = @GNULIB_CBRTL@ GNULIB_CEIL = @GNULIB_CEIL@ GNULIB_CEILF = @GNULIB_CEILF@ GNULIB_CEILL = @GNULIB_CEILL@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ +GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ +GNULIB_CONNECT = @GNULIB_CONNECT@ +GNULIB_COPYSIGN = @GNULIB_COPYSIGN@ +GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@ +GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ +GNULIB_COSF = @GNULIB_COSF@ +GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ GNULIB_ENVIRON = @GNULIB_ENVIRON@ GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ +GNULIB_EXP2 = @GNULIB_EXP2@ +GNULIB_EXP2F = @GNULIB_EXP2F@ +GNULIB_EXP2L = @GNULIB_EXP2L@ +GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ +GNULIB_EXPM1 = @GNULIB_EXPM1@ +GNULIB_EXPM1F = @GNULIB_EXPM1F@ +GNULIB_EXPM1L = @GNULIB_EXPM1L@ +GNULIB_FABSF = @GNULIB_FABSF@ +GNULIB_FABSL = @GNULIB_FABSL@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ GNULIB_FCLOSE = @GNULIB_FCLOSE@ GNULIB_FCNTL = @GNULIB_FCNTL@ +GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ +GNULIB_FDOPEN = @GNULIB_FDOPEN@ GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFS = @GNULIB_FFS@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ GNULIB_FLOOR = @GNULIB_FLOOR@ GNULIB_FLOORF = @GNULIB_FLOORF@ GNULIB_FLOORL = @GNULIB_FLOORL@ +GNULIB_FMA = @GNULIB_FMA@ +GNULIB_FMAF = @GNULIB_FMAF@ +GNULIB_FMAL = @GNULIB_FMAL@ +GNULIB_FMOD = @GNULIB_FMOD@ +GNULIB_FMODF = @GNULIB_FMODF@ +GNULIB_FMODL = @GNULIB_FMODL@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ GNULIB_FPURGE = @GNULIB_FPURGE@ GNULIB_FPUTC = @GNULIB_FPUTC@ GNULIB_FPUTS = @GNULIB_FPUTS@ +GNULIB_FREAD = @GNULIB_FREAD@ GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPF = @GNULIB_FREXPF@ GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSCANF = @GNULIB_FSCANF@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FSTAT = @GNULIB_FSTAT@ GNULIB_FSTATAT = @GNULIB_FSTATAT@ GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ @@ -375,6 +412,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ GNULIB_FWRITE = @GNULIB_FWRITE@ +GNULIB_GETC = @GNULIB_GETC@ +GNULIB_GETCHAR = @GNULIB_GETCHAR@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETDELIM = @GNULIB_GETDELIM@ GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ @@ -386,12 +425,27 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ +GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@ +GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@ +GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ +GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_HYPOT = @GNULIB_HYPOT@ +GNULIB_HYPOTF = @GNULIB_HYPOTF@ +GNULIB_HYPOTL = @GNULIB_HYPOTL@ +GNULIB_ILOGB = @GNULIB_ILOGB@ +GNULIB_ILOGBF = @GNULIB_ILOGBF@ +GNULIB_ILOGBL = @GNULIB_ILOGBL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_INET_NTOP = @GNULIB_INET_NTOP@ +GNULIB_INET_PTON = @GNULIB_INET_PTON@ +GNULIB_IOCTL = @GNULIB_IOCTL@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISFINITE = @GNULIB_ISFINITE@ GNULIB_ISINF = @GNULIB_ISINF@ @@ -403,10 +457,26 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LISTEN = @GNULIB_LISTEN@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ +GNULIB_LOG = @GNULIB_LOG@ +GNULIB_LOG10 = @GNULIB_LOG10@ +GNULIB_LOG10F = @GNULIB_LOG10F@ +GNULIB_LOG10L = @GNULIB_LOG10L@ +GNULIB_LOG1P = @GNULIB_LOG1P@ +GNULIB_LOG1PF = @GNULIB_LOG1PF@ +GNULIB_LOG1PL = @GNULIB_LOG1PL@ +GNULIB_LOG2 = @GNULIB_LOG2@ +GNULIB_LOG2F = @GNULIB_LOG2F@ +GNULIB_LOG2L = @GNULIB_LOG2L@ GNULIB_LOGB = @GNULIB_LOGB@ +GNULIB_LOGBF = @GNULIB_LOGBF@ +GNULIB_LOGBL = @GNULIB_LOGBL@ +GNULIB_LOGF = @GNULIB_LOGF@ GNULIB_LOGL = @GNULIB_LOGL@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ @@ -446,49 +516,89 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ +GNULIB_MODF = @GNULIB_MODF@ +GNULIB_MODFF = @GNULIB_MODFF@ +GNULIB_MODFL = @GNULIB_MODFL@ GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ +GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@ GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ +GNULIB_OPENDIR = @GNULIB_OPENDIR@ +GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ GNULIB_PIPE2 = @GNULIB_PIPE2@ GNULIB_POPEN = @GNULIB_POPEN@ +GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@ +GNULIB_POWF = @GNULIB_POWF@ GNULIB_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ +GNULIB_PSELECT = @GNULIB_PSELECT@ +GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@ GNULIB_PTSNAME = @GNULIB_PTSNAME@ +GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@ GNULIB_PUTC = @GNULIB_PUTC@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_RAISE = @GNULIB_RAISE@ +GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ +GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ +GNULIB_RECV = @GNULIB_RECV@ +GNULIB_RECVFROM = @GNULIB_RECVFROM@ +GNULIB_REMAINDER = @GNULIB_REMAINDER@ +GNULIB_REMAINDERF = @GNULIB_REMAINDERF@ +GNULIB_REMAINDERL = @GNULIB_REMAINDERL@ GNULIB_REMOVE = @GNULIB_REMOVE@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ +GNULIB_REWINDDIR = @GNULIB_REWINDDIR@ +GNULIB_RINT = @GNULIB_RINT@ +GNULIB_RINTF = @GNULIB_RINTF@ +GNULIB_RINTL = @GNULIB_RINTL@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_ROUND = @GNULIB_ROUND@ GNULIB_ROUNDF = @GNULIB_ROUNDF@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ +GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ +GNULIB_SELECT = @GNULIB_SELECT@ +GNULIB_SEND = @GNULIB_SEND@ +GNULIB_SENDTO = @GNULIB_SENDTO@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ +GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@ +GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@ +GNULIB_SIGACTION = @GNULIB_SIGACTION@ +GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SINF = @GNULIB_SINF@ +GNULIB_SINHF = @GNULIB_SINHF@ GNULIB_SINL = @GNULIB_SINL@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SOCKET = @GNULIB_SOCKET@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_SQRTF = @GNULIB_SQRTF@ GNULIB_SQRTL = @GNULIB_SQRTL@ GNULIB_STAT = @GNULIB_STAT@ +GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@ GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ @@ -515,6 +625,8 @@ GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ GNULIB_SYMLINK = @GNULIB_SYMLINK@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ +GNULIB_TANF = @GNULIB_TANF@ +GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ @@ -524,7 +636,8 @@ GNULIB_TRUNC = @GNULIB_TRUNC@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNAME = @GNULIB_UNAME@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -536,8 +649,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VFSCANF = @GNULIB_VFSCANF@ GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ GNULIB_WAITPID = @GNULIB_WAITPID@ @@ -580,26 +695,48 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ GREP = @GREP@ +HAVE_ACCEPT4 = @HAVE_ACCEPT4@ +HAVE_ACOSF = @HAVE_ACOSF@ HAVE_ACOSL = @HAVE_ACOSL@ HAVE_ALPHASORT = @HAVE_ALPHASORT@ +HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ +HAVE_ASINF = @HAVE_ASINF@ HAVE_ASINL = @HAVE_ASINL@ +HAVE_ATAN2F = @HAVE_ATAN2F@ +HAVE_ATANF = @HAVE_ATANF@ HAVE_ATANL = @HAVE_ATANL@ HAVE_ATOLL = @HAVE_ATOLL@ HAVE_ATTRIBUTE_NORETURN = @HAVE_ATTRIBUTE_NORETURN@ HAVE_BTOWC = @HAVE_BTOWC@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ +HAVE_CBRT = @HAVE_CBRT@ +HAVE_CBRTF = @HAVE_CBRTF@ +HAVE_CBRTL = @HAVE_CBRTL@ HAVE_CHOWN = @HAVE_CHOWN@ +HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ +HAVE_COPYSIGN = @HAVE_COPYSIGN@ +HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ +HAVE_COSF = @HAVE_COSF@ +HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@ +HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@ HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@ HAVE_DECL_COSL = @HAVE_DECL_COSL@ HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ +HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@ +HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@ +HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@ HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@ HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ @@ -616,17 +753,27 @@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ +HAVE_DECL_INET_NTOP = @HAVE_DECL_INET_NTOP@ +HAVE_DECL_INET_PTON = @HAVE_DECL_INET_PTON@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ +HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ +HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@ +HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@ +HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@ HAVE_DECL_LOGB = @HAVE_DECL_LOGB@ HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@ +HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@ +HAVE_DECL_RINTF = @HAVE_DECL_RINTF@ HAVE_DECL_ROUND = @HAVE_DECL_ROUND@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -648,19 +795,35 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ +HAVE_DIRENT_H = @HAVE_DIRENT_H@ HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ +HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ +HAVE_EXPM1 = @HAVE_EXPM1@ +HAVE_EXPM1F = @HAVE_EXPM1F@ +HAVE_FABSF = @HAVE_FABSF@ +HAVE_FABSL = @HAVE_FABSL@ HAVE_FACCESSAT = @HAVE_FACCESSAT@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFS = @HAVE_FFS@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ +HAVE_FMA = @HAVE_FMA@ +HAVE_FMAF = @HAVE_FMAF@ +HAVE_FMAL = @HAVE_FMAL@ +HAVE_FMODF = @HAVE_FMODF@ +HAVE_FMODL = @HAVE_FMODL@ +HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -676,6 +839,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ +HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ +HAVE_HYPOTF = @HAVE_HYPOTF@ +HAVE_HYPOTL = @HAVE_HYPOTL@ +HAVE_ILOGB = @HAVE_ILOGB@ +HAVE_ILOGBF = @HAVE_ILOGBF@ +HAVE_ILOGBL = @HAVE_ILOGBL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISNAND = @HAVE_ISNAND@ @@ -690,8 +859,17 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ HAVE_LCHMOD = @HAVE_LCHMOD@ HAVE_LCHOWN = @HAVE_LCHOWN@ +HAVE_LDEXPF = @HAVE_LDEXPF@ HAVE_LINK = @HAVE_LINK@ HAVE_LINKAT = @HAVE_LINKAT@ +HAVE_LOG10F = @HAVE_LOG10F@ +HAVE_LOG10L = @HAVE_LOG10L@ +HAVE_LOG1P = @HAVE_LOG1P@ +HAVE_LOG1PF = @HAVE_LOG1PF@ +HAVE_LOG1PL = @HAVE_LOG1PL@ +HAVE_LOGBF = @HAVE_LOGBF@ +HAVE_LOGBL = @HAVE_LOGBL@ +HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ @@ -713,30 +891,62 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MODFF = @HAVE_MODFF@ +HAVE_MODFL = @HAVE_MODFL@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ +HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ +HAVE_OPENDIR = @HAVE_OPENDIR@ HAVE_OS_H = @HAVE_OS_H@ +HAVE_PCLOSE = @HAVE_PCLOSE@ HAVE_PIPE = @HAVE_PIPE@ HAVE_PIPE2 = @HAVE_PIPE2@ +HAVE_POPEN = @HAVE_POPEN@ +HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ +HAVE_POWF = @HAVE_POWF@ HAVE_PREAD = @HAVE_PREAD@ +HAVE_PSELECT = @HAVE_PSELECT@ +HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RAISE = @HAVE_RAISE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ +HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ HAVE_REALPATH = @HAVE_REALPATH@ +HAVE_REMAINDER = @HAVE_REMAINDER@ +HAVE_REMAINDERF = @HAVE_REMAINDERF@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ +HAVE_REWINDDIR = @HAVE_REWINDDIR@ +HAVE_RINT = @HAVE_RINT@ +HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ +HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ +HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ +HAVE_SIGACTION = @HAVE_SIGACTION@ +HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@ +HAVE_SIGINFO_T = @HAVE_SIGINFO_T@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SINF = @HAVE_SINF@ +HAVE_SINHF = @HAVE_SINHF@ HAVE_SINL = @HAVE_SINL@ HAVE_SLEEP = @HAVE_SLEEP@ +HAVE_SQRTF = @HAVE_SQRTF@ HAVE_SQRTL = @HAVE_SQRTL@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STPCPY = @HAVE_STPCPY@ @@ -744,6 +954,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRINGS_H = @HAVE_STRINGS_H@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRPTIME = @HAVE_STRPTIME@ HAVE_STRSEP = @HAVE_STRSEP@ @@ -751,18 +962,31 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@ +HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@ +HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ +HAVE_STRUCT_UTSNAME = @HAVE_STRUCT_UTSNAME@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ +HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@ +HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ +HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ +HAVE_SYS_UTSNAME_H = @HAVE_SYS_UTSNAME_H@ +HAVE_TANF = @HAVE_TANF@ +HAVE_TANHF = @HAVE_TANHF@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ +HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ +HAVE_UNAME = @HAVE_UNAME@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -802,18 +1026,20 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@ HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ +HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE_WMEMCHR = @HAVE_WMEMCHR@ HAVE_WMEMCMP = @HAVE_WMEMCMP@ HAVE_WMEMCPY = @HAVE_WMEMCPY@ HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ HAVE_WMEMSET = @HAVE_WMEMSET@ +HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@ HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ -INCLUDES = @INCLUDES@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ +INET_PTON_LIB = @INET_PTON_LIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -823,6 +1049,8 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +ISFINITE_LIBM = @ISFINITE_LIBM@ +ISINF_LIBM = @ISINF_LIBM@ LDFLAGS = @LDFLAGS@ LIBGNULIB_LIBDEPS = @LIBGNULIB_LIBDEPS@ LIBGNULIB_LTLIBDEPS = @LIBGNULIB_LTLIBDEPS@ @@ -833,12 +1061,15 @@ LIBOBJS = @LIBOBJS@ LIBPTH = @LIBPTH@ LIBPTH_PREFIX = @LIBPTH_PREFIX@ LIBS = @LIBS@ +LIBSOCKET = @LIBSOCKET@ LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ LIBTHREAD = @LIBTHREAD@ LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@ LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_EACCESS = @LIB_EACCESS@ +LIB_NANOSLEEP = @LIB_NANOSLEEP@ +LIB_SELECT = @LIB_SELECT@ LIB_SELINUX = @LIB_SELINUX@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ LOCALE_FR = @LOCALE_FR@ @@ -859,6 +1090,9 @@ MODF_LIBM = @MODF_LIBM@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NETINET_IN_H = @NETINET_IN_H@ +NEXT_ARPA_INET_H = @NEXT_ARPA_INET_H@ +NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H = @NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H@ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ @@ -869,7 +1103,9 @@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ +NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ +NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@ NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ @@ -877,8 +1113,14 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H@ +NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H@ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@ NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ @@ -894,7 +1136,9 @@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ NEXT_LOCALE_H = @NEXT_LOCALE_H@ NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ NEXT_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ NEXT_STDARG_H = @NEXT_STDARG_H@ NEXT_STDDEF_H = @NEXT_STDDEF_H@ NEXT_STDINT_H = @NEXT_STDINT_H@ @@ -902,8 +1146,14 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRINGS_H = @NEXT_STRINGS_H@ NEXT_STRING_H = @NEXT_STRING_H@ +NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@ +NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@ +NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ +NEXT_SYS_UIO_H = @NEXT_SYS_UIO_H@ +NEXT_SYS_UTSNAME_H = @NEXT_SYS_UTSNAME_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -925,10 +1175,17 @@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ +REPLACE_CBRTF = @REPLACE_CBRTF@ +REPLACE_CBRTL = @REPLACE_CBRTL@ REPLACE_CEIL = @REPLACE_CEIL@ REPLACE_CEILF = @REPLACE_CEILF@ REPLACE_CEILL = @REPLACE_CEILL@ @@ -940,19 +1197,32 @@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ +REPLACE_EXP2 = @REPLACE_EXP2@ +REPLACE_EXP2L = @REPLACE_EXP2L@ +REPLACE_EXPM1 = @REPLACE_EXPM1@ +REPLACE_EXPM1F = @REPLACE_EXPM1F@ +REPLACE_FABSL = @REPLACE_FABSL@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FLOOR = @REPLACE_FLOOR@ REPLACE_FLOORF = @REPLACE_FLOORF@ REPLACE_FLOORL = @REPLACE_FLOORL@ +REPLACE_FMA = @REPLACE_FMA@ +REPLACE_FMAF = @REPLACE_FMAF@ +REPLACE_FMAL = @REPLACE_FMAL@ +REPLACE_FMOD = @REPLACE_FMOD@ +REPLACE_FMODF = @REPLACE_FMODF@ +REPLACE_FMODL = @REPLACE_FMODL@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPF = @REPLACE_FREXPF@ REPLACE_FREXPL = @REPLACE_FREXPL@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ @@ -960,26 +1230,56 @@ REPLACE_FSTAT = @REPLACE_FSTAT@ REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ +REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ +REPLACE_HYPOT = @REPLACE_HYPOT@ +REPLACE_HYPOTF = @REPLACE_HYPOTF@ +REPLACE_HYPOTL = @REPLACE_HYPOTL@ +REPLACE_ILOGB = @REPLACE_ILOGB@ +REPLACE_ILOGBF = @REPLACE_ILOGBF@ +REPLACE_INET_NTOP = @REPLACE_INET_NTOP@ +REPLACE_INET_PTON = @REPLACE_INET_PTON@ +REPLACE_IOCTL = @REPLACE_IOCTL@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ REPLACE_ISNAN = @REPLACE_ISNAN@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ +REPLACE_LOG = @REPLACE_LOG@ +REPLACE_LOG10 = @REPLACE_LOG10@ +REPLACE_LOG10F = @REPLACE_LOG10F@ +REPLACE_LOG10L = @REPLACE_LOG10L@ +REPLACE_LOG1P = @REPLACE_LOG1P@ +REPLACE_LOG1PF = @REPLACE_LOG1PF@ +REPLACE_LOG1PL = @REPLACE_LOG1PL@ +REPLACE_LOG2 = @REPLACE_LOG2@ +REPLACE_LOG2F = @REPLACE_LOG2F@ +REPLACE_LOG2L = @REPLACE_LOG2L@ +REPLACE_LOGB = @REPLACE_LOGB@ +REPLACE_LOGBF = @REPLACE_LOGBF@ +REPLACE_LOGBL = @REPLACE_LOGBL@ +REPLACE_LOGF = @REPLACE_LOGF@ +REPLACE_LOGL = @REPLACE_LOGL@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ REPLACE_MALLOC = @REPLACE_MALLOC@ @@ -997,6 +1297,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@ REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ REPLACE_MKTIME = @REPLACE_MKTIME@ +REPLACE_MODF = @REPLACE_MODF@ +REPLACE_MODFF = @REPLACE_MODFF@ +REPLACE_MODFL = @REPLACE_MODFL@ REPLACE_NAN = @REPLACE_NAN@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ @@ -1009,11 +1312,21 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PSELECT = @REPLACE_PSELECT@ +REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@ +REPLACE_PTSNAME = @REPLACE_PTSNAME@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RAISE = @REPLACE_RAISE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ +REPLACE_REMAINDER = @REPLACE_REMAINDER@ +REPLACE_REMAINDERF = @REPLACE_REMAINDERF@ +REPLACE_REMAINDERL = @REPLACE_REMAINDERL@ REPLACE_REMOVE = @REPLACE_REMOVE@ REPLACE_RENAME = @REPLACE_RENAME@ REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ @@ -1021,6 +1334,7 @@ REPLACE_RMDIR = @REPLACE_RMDIR@ REPLACE_ROUND = @REPLACE_ROUND@ REPLACE_ROUNDF = @REPLACE_ROUNDF@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ +REPLACE_SELECT = @REPLACE_SELECT@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ @@ -1028,10 +1342,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ +REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ REPLACE_STPNCPY = @REPLACE_STPNCPY@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ +REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ @@ -1041,10 +1358,15 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ +REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ +REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ @@ -1068,6 +1390,7 @@ REPLACE_WCTOB = @REPLACE_WCTOB@ REPLACE_WCTOMB = @REPLACE_WCTOMB@ REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ REPLACE_WRITE = @REPLACE_WRITE@ +SED = @SED@ SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1075,14 +1398,17 @@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ SORT = @SORT@ SORT_SUPPORTS_Z = @SORT_SUPPORTS_Z@ +STDALIGN_H = @STDALIGN_H@ STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ +SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@ +SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -U = @U@ +TRUNC_LIBM = @TRUNC_LIBM@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ @@ -1092,6 +1418,8 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ +WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ @@ -1104,7 +1432,9 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_RANLIB = @ac_ct_RANLIB@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -1145,9 +1475,14 @@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1177,19 +1512,19 @@ xargs.gnu/L2_2-0.exp \ xargs.gnu/L3-0.exp \ xargs.gnu/n1-0.exp \ xargs.gnu/n2-0.exp \ -xargs.gnu/n2-s26-0.exp \ -xargs.gnu/n2-s26-x-0.exp \ +xargs.gnu/n2-s21-0.exp \ +xargs.gnu/n2-s21-x-0.exp \ xargs.gnu/n3-0.exp \ -xargs.gnu/n3-s36-0.exp \ +xargs.gnu/n3-s31-0.exp \ xargs.gnu/noeof-0.exp \ xargs.gnu/nothing.exp \ xargs.gnu/P3-n1-IARG.exp \ xargs.gnu/r.exp \ xargs.gnu/s118-0.exp \ -xargs.gnu/s19-0.exp \ -xargs.gnu/s19_2-0.exp \ -xargs.gnu/s20-0.exp \ -xargs.gnu/s30-0.exp \ +xargs.gnu/s14_2-0.exp \ +xargs.gnu/s14-0.exp \ +xargs.gnu/s15-0.exp \ +xargs.gnu/s25-0.exp \ xargs.gnu/space-0.exp \ xargs.gnu/space-r.exp \ xargs.gnu/space-t-0.exp \ @@ -1213,10 +1548,10 @@ xargs.posix/L2-n2.exp \ xargs.posix/L3.exp \ xargs.posix/n1.exp \ xargs.posix/n2.exp \ -xargs.posix/n2-s26.exp \ -xargs.posix/n2-s26-x.exp \ +xargs.posix/n2-s21.exp \ +xargs.posix/n2-s21-x.exp \ xargs.posix/n3.exp \ -xargs.posix/n3-s36.exp \ +xargs.posix/n3-s31.exp \ xargs.posix/noeof.exp \ xargs.posix/quotes.exp \ xargs.posix/rc-123.exp \ @@ -1225,12 +1560,12 @@ xargs.posix/rc-125.exp \ xargs.posix/rc-126.exp \ xargs.posix/rc-127.exp \ xargs.posix/s118.exp \ -xargs.posix/s19_2.exp \ -xargs.posix/s19.exp \ -xargs.posix/s20.exp \ -xargs.posix/s30.exp \ +xargs.posix/s14.exp \ +xargs.posix/s14_2.exp \ +xargs.posix/s15.exp \ +xargs.posix/s25.exp \ +xargs.posix/s42.exp \ xargs.posix/s470.exp \ -xargs.posix/s47.exp \ xargs.posix/s48.exp \ xargs.posix/s6.exp \ xargs.posix/savannah-11865.exp \ @@ -1255,7 +1590,7 @@ xargs.sysv/l1_2.exp \ xargs.sysv/l1.exp \ xargs.sysv/l1n4.exp \ xargs.sysv/lc_l2.exp \ -xargs.sysv/s30-t.exp \ +xargs.sysv/s25-t.exp \ xargs.sysv/sv-bug-18713.exp \ xargs.sysv/space-t.exp \ xargs.sysv/trace.exp @@ -1273,18 +1608,18 @@ xargs.gnu/L2_2-0.xo \ xargs.gnu/L3-0.xo \ xargs.gnu/n1-0.xo \ xargs.gnu/n2-0.xo \ -xargs.gnu/n2-s26-0.xo \ -xargs.gnu/n2-s26-x-0.xo \ +xargs.gnu/n2-s21-0.xo \ +xargs.gnu/n2-s21-x-0.xo \ xargs.gnu/n3-0.xo \ -xargs.gnu/n3-s36-0.xo \ +xargs.gnu/n3-s31-0.xo \ xargs.gnu/noeof-0.xo \ xargs.gnu/nothing.xo \ xargs.gnu/P3-n1-IARG.xo \ xargs.gnu/r.xo \ xargs.gnu/s118-0.xo \ -xargs.gnu/s19-0.xo \ -xargs.gnu/s20-0.xo \ -xargs.gnu/s30-0.xo \ +xargs.gnu/s14-0.xo \ +xargs.gnu/s15-0.xo \ +xargs.gnu/s25-0.xo \ xargs.gnu/space-0.xo \ xargs.gnu/space-t-0.xo \ xargs.posix/EEOFb.xo \ @@ -1303,20 +1638,20 @@ xargs.posix/L2-n2.xo \ xargs.posix/uc_L2.xo \ xargs.posix/L3.xo \ xargs.posix/n1.xo \ -xargs.posix/n2-s26.xo \ -xargs.posix/n2-s26-x.xo \ +xargs.posix/n2-s21.xo \ +xargs.posix/n2-s21-x.xo \ xargs.posix/n2.xo \ -xargs.posix/n3-s36.xo \ +xargs.posix/n3-s31.xo \ xargs.posix/n3.xo \ xargs.posix/noeof.xo \ xargs.posix/quotes.xo \ xargs.posix/rc-123.xo \ xargs.posix/s118.xo \ -xargs.posix/s19.xo \ -xargs.posix/s20.xo \ -xargs.posix/s30.xo \ +xargs.posix/s14.xo \ +xargs.posix/s15.xo \ +xargs.posix/s25.xo \ +xargs.posix/s42.xo \ xargs.posix/s470.xo \ -xargs.posix/s47.xo \ xargs.posix/s48.xo \ xargs.posix/savannah-11865.xo \ xargs.posix/space.xo \ @@ -1338,7 +1673,7 @@ xargs.sysv/l1_2.xo \ xargs.sysv/l1n4.xo \ xargs.sysv/l1.xo \ xargs.sysv/lc_l2.xo \ -xargs.sysv/s30-t.xo \ +xargs.sysv/s25-t.xo \ xargs.sysv/sv-bug-18713.xo \ xargs.sysv/space-t.xo \ xargs.sysv/trace.xo @@ -1347,7 +1682,7 @@ EXTRA_DIST_XE = \ xargs.gnu/space-t-0.xe \ xargs.sysv/empty_def-t.xe \ xargs.sysv/empty-t.xe \ -xargs.sysv/s30-t.xe \ +xargs.sysv/s25-t.xe \ xargs.sysv/space-t.xe \ xargs.sysv/trace.xe @@ -1437,7 +1772,7 @@ CTAGS: check-DEJAGNU: site.exp - srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + srcdir='$(srcdir)'; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ runtest=$(RUNTEST); \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ @@ -1448,20 +1783,27 @@ check-DEJAGNU: site.exp else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi; \ exit $$exit_status -site.exp: Makefile +site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG) @echo 'Making a new site.exp file...' @echo '## these variables are automatically generated by make ##' >site.tmp @echo '# Do not edit here. If you wish to override these values' >>site.tmp @echo '# edit the last section' >>site.tmp - @echo 'set srcdir $(srcdir)' >>site.tmp + @echo 'set srcdir "$(srcdir)"' >>site.tmp @echo "set objdir `pwd`" >>site.tmp @echo 'set build_alias "$(build_alias)"' >>site.tmp @echo 'set build_triplet $(build_triplet)' >>site.tmp @echo 'set host_alias "$(host_alias)"' >>site.tmp @echo 'set host_triplet $(host_triplet)' >>site.tmp - @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp - @test ! -f site.exp || \ - sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \ + echo "## Begin content included from file $$f. Do not modify. ##" \ + && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \ + && echo "## End content included from file $$f. ##" \ + || exit 1; \ + done >> site.tmp + @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp + @if test -f site.exp; then \ + sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \ + fi @-rm -f site.bak @test ! -f site.exp || mv site.exp site.bak @mv site.tmp site.exp @@ -1517,10 +1859,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/xargs/testsuite/config/unix.exp b/xargs/testsuite/config/unix.exp index f05c29b..1d9cea6 100644 --- a/xargs/testsuite/config/unix.exp +++ b/xargs/testsuite/config/unix.exp @@ -1,17 +1,18 @@ # -*- TCL -*- # Test-specific TCL procedures required by DejaGNU. -# Copyright (C) 1994, 2005, 2007, 2010 Free Software Foundation, Inc. -# +# Copyright (C) 1994, 2005, 2007, 2010, 2011 Free Software Foundation, +# Inc. +# # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program. If not, see . diff --git a/xargs/testsuite/xargs.gnu/E_-0.exp b/xargs/testsuite/xargs.gnu/E_-0.exp index 3c8d7da..816c90c 100644 --- a/xargs/testsuite/xargs.gnu/E_-0.exp +++ b/xargs/testsuite/xargs.gnu/E_-0.exp @@ -1 +1 @@ -xargs_start p {-E_ -0} eof_-0.xi +xargs_start p {-E_ -0} eof_-0.xi skip diff --git a/xargs/testsuite/xargs.gnu/n2-s21-0.exp b/xargs/testsuite/xargs.gnu/n2-s21-0.exp new file mode 100644 index 0000000..1793245 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n2-s21-0.exp @@ -0,0 +1 @@ +xargs_start p {-n2 -s21 -0} stairs-0.xi diff --git a/xargs/testsuite/xargs.posix/n2-s26.xo b/xargs/testsuite/xargs.gnu/n2-s21-0.xo similarity index 100% rename from xargs/testsuite/xargs.posix/n2-s26.xo rename to xargs/testsuite/xargs.gnu/n2-s21-0.xo diff --git a/xargs/testsuite/xargs.gnu/n2-s21-x-0.exp b/xargs/testsuite/xargs.gnu/n2-s21-x-0.exp new file mode 100644 index 0000000..293ba88 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n2-s21-x-0.exp @@ -0,0 +1 @@ +xargs_start f {-n2 -s21 -x -0} stairs-0.xi skip diff --git a/xargs/testsuite/xargs.posix/n2-s26-x.xo b/xargs/testsuite/xargs.gnu/n2-s21-x-0.xo similarity index 100% rename from xargs/testsuite/xargs.posix/n2-s26-x.xo rename to xargs/testsuite/xargs.gnu/n2-s21-x-0.xo diff --git a/xargs/testsuite/xargs.gnu/n2-s26-0.exp b/xargs/testsuite/xargs.gnu/n2-s26-0.exp deleted file mode 100644 index 4494905..0000000 --- a/xargs/testsuite/xargs.gnu/n2-s26-0.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start p {-n2 -s26 -0} stairs-0.xi diff --git a/xargs/testsuite/xargs.gnu/n2-s26-x-0.exp b/xargs/testsuite/xargs.gnu/n2-s26-x-0.exp deleted file mode 100644 index f765bcd..0000000 --- a/xargs/testsuite/xargs.gnu/n2-s26-x-0.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start f {-n2 -s26 -x -0} stairs-0.xi skip diff --git a/xargs/testsuite/xargs.gnu/n3-s31-0.exp b/xargs/testsuite/xargs.gnu/n3-s31-0.exp new file mode 100644 index 0000000..efee3e3 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/n3-s31-0.exp @@ -0,0 +1 @@ +xargs_start p {-n3 -s31 -0} stairs2-0.xi diff --git a/xargs/testsuite/xargs.posix/n3-s36.xo b/xargs/testsuite/xargs.gnu/n3-s31-0.xo similarity index 100% rename from xargs/testsuite/xargs.posix/n3-s36.xo rename to xargs/testsuite/xargs.gnu/n3-s31-0.xo diff --git a/xargs/testsuite/xargs.gnu/n3-s36-0.exp b/xargs/testsuite/xargs.gnu/n3-s36-0.exp deleted file mode 100644 index 1d83e26..0000000 --- a/xargs/testsuite/xargs.gnu/n3-s36-0.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start p {-n3 -s36 -0} stairs2-0.xi diff --git a/xargs/testsuite/xargs.gnu/s14-0.exp b/xargs/testsuite/xargs.gnu/s14-0.exp new file mode 100644 index 0000000..9c4d841 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s14-0.exp @@ -0,0 +1 @@ +xargs_start f {-0 -s14} stairs-0.xi skip diff --git a/xargs/testsuite/xargs.posix/s19.xo b/xargs/testsuite/xargs.gnu/s14-0.xo similarity index 100% rename from xargs/testsuite/xargs.posix/s19.xo rename to xargs/testsuite/xargs.gnu/s14-0.xo diff --git a/xargs/testsuite/xargs.gnu/s14_2-0.exp b/xargs/testsuite/xargs.gnu/s14_2-0.exp new file mode 100644 index 0000000..63a7603 --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s14_2-0.exp @@ -0,0 +1 @@ +xargs_start f {-0 -s14} stairs2-0.xi skip diff --git a/xargs/testsuite/xargs.gnu/s15-0.exp b/xargs/testsuite/xargs.gnu/s15-0.exp new file mode 100644 index 0000000..f67a18e --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s15-0.exp @@ -0,0 +1 @@ +xargs_start p {-0 -s15} stairs-0.xi diff --git a/xargs/testsuite/xargs.posix/s20.xo b/xargs/testsuite/xargs.gnu/s15-0.xo similarity index 100% rename from xargs/testsuite/xargs.posix/s20.xo rename to xargs/testsuite/xargs.gnu/s15-0.xo diff --git a/xargs/testsuite/xargs.gnu/s19-0.exp b/xargs/testsuite/xargs.gnu/s19-0.exp deleted file mode 100644 index 7f4f153..0000000 --- a/xargs/testsuite/xargs.gnu/s19-0.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start f {-0 -s19} stairs-0.xi skip diff --git a/xargs/testsuite/xargs.gnu/s19_2-0.exp b/xargs/testsuite/xargs.gnu/s19_2-0.exp deleted file mode 100644 index 78c460a..0000000 --- a/xargs/testsuite/xargs.gnu/s19_2-0.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start f {-0 -s19} stairs2-0.xi skip diff --git a/xargs/testsuite/xargs.gnu/s20-0.exp b/xargs/testsuite/xargs.gnu/s20-0.exp deleted file mode 100644 index 899fd10..0000000 --- a/xargs/testsuite/xargs.gnu/s20-0.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start p {-0 -s20} stairs-0.xi diff --git a/xargs/testsuite/xargs.gnu/s25-0.exp b/xargs/testsuite/xargs.gnu/s25-0.exp new file mode 100644 index 0000000..61a026c --- /dev/null +++ b/xargs/testsuite/xargs.gnu/s25-0.exp @@ -0,0 +1 @@ +xargs_start p {-0 -s25} stairs-0.xi diff --git a/xargs/testsuite/xargs.sysv/s30-t.xo b/xargs/testsuite/xargs.gnu/s25-0.xo similarity index 100% rename from xargs/testsuite/xargs.sysv/s30-t.xo rename to xargs/testsuite/xargs.gnu/s25-0.xo diff --git a/xargs/testsuite/xargs.gnu/s30-0.exp b/xargs/testsuite/xargs.gnu/s30-0.exp deleted file mode 100644 index 5111b78..0000000 --- a/xargs/testsuite/xargs.gnu/s30-0.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start p {-0 -s30} stairs-0.xi diff --git a/xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp b/xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp index 786ceb1..106f769 100644 --- a/xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp +++ b/xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp @@ -6,7 +6,7 @@ # limit is ARG_MAX - sizeof (void*)). The difference between 32- and # 64-bit systems is because sizeof (void*) differs (4 vs. 8). # -# Tue Nov 22 19:36:49 2005: Use 'true' rather than 'echo', otherwise the -# differences in the value of ARG_MAX on various platforms will cause the +# Tue Nov 22 19:36:49 2005: Use 'true' rather than 'echo', otherwise the +# differences in the value of ARG_MAX on various platforms will cause the # test to fail. xargs_start p { true } 32767-ys.xi diff --git a/xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp b/xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp index 8a7be59..90a8622 100644 --- a/xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp +++ b/xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp @@ -6,7 +6,7 @@ # limit is ARG_MAX - sizeof (void*)). The difference between 32- and # 64-bit systems is because sizeof (void*) differs (4 vs. 8). # -# Tue Nov 22 19:36:49 2005: Use 'true' rather than 'echo', otherwise the -# differences in the value of ARG_MAX on various platforms will cause the +# Tue Nov 22 19:36:49 2005: Use 'true' rather than 'echo', otherwise the +# differences in the value of ARG_MAX on various platforms will cause the # test to fail. xargs_start p { true } 16383-ys.xi diff --git a/xargs/testsuite/xargs.posix/n2-s21-x.exp b/xargs/testsuite/xargs.posix/n2-s21-x.exp new file mode 100644 index 0000000..5f799a9 --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2-s21-x.exp @@ -0,0 +1 @@ +xargs_start f {-n2 -s21 -x} stairs.xi skip diff --git a/xargs/testsuite/xargs.gnu/n2-s26-x-0.xo b/xargs/testsuite/xargs.posix/n2-s21-x.xo similarity index 100% rename from xargs/testsuite/xargs.gnu/n2-s26-x-0.xo rename to xargs/testsuite/xargs.posix/n2-s21-x.xo diff --git a/xargs/testsuite/xargs.posix/n2-s21.exp b/xargs/testsuite/xargs.posix/n2-s21.exp new file mode 100644 index 0000000..61cb60b --- /dev/null +++ b/xargs/testsuite/xargs.posix/n2-s21.exp @@ -0,0 +1 @@ +xargs_start p {-n2 -s21} stairs.xi diff --git a/xargs/testsuite/xargs.gnu/n2-s26-0.xo b/xargs/testsuite/xargs.posix/n2-s21.xo similarity index 100% rename from xargs/testsuite/xargs.gnu/n2-s26-0.xo rename to xargs/testsuite/xargs.posix/n2-s21.xo diff --git a/xargs/testsuite/xargs.posix/n2-s26-x.exp b/xargs/testsuite/xargs.posix/n2-s26-x.exp deleted file mode 100644 index fd59c05..0000000 --- a/xargs/testsuite/xargs.posix/n2-s26-x.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start f {-n2 -s26 -x} stairs.xi skip diff --git a/xargs/testsuite/xargs.posix/n2-s26.exp b/xargs/testsuite/xargs.posix/n2-s26.exp deleted file mode 100644 index ba76660..0000000 --- a/xargs/testsuite/xargs.posix/n2-s26.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start p {-n2 -s26} stairs.xi diff --git a/xargs/testsuite/xargs.posix/n3-s31.exp b/xargs/testsuite/xargs.posix/n3-s31.exp new file mode 100644 index 0000000..a49943e --- /dev/null +++ b/xargs/testsuite/xargs.posix/n3-s31.exp @@ -0,0 +1 @@ +xargs_start p {-n3 -s31} stairs2.xi diff --git a/xargs/testsuite/xargs.gnu/n3-s36-0.xo b/xargs/testsuite/xargs.posix/n3-s31.xo similarity index 100% rename from xargs/testsuite/xargs.gnu/n3-s36-0.xo rename to xargs/testsuite/xargs.posix/n3-s31.xo diff --git a/xargs/testsuite/xargs.posix/n3-s36.exp b/xargs/testsuite/xargs.posix/n3-s36.exp deleted file mode 100644 index 00c80e9..0000000 --- a/xargs/testsuite/xargs.posix/n3-s36.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start p {-n3 -s36} stairs2.xi diff --git a/xargs/testsuite/xargs.posix/rc-125.exp b/xargs/testsuite/xargs.posix/rc-125.exp index 6624880..4284ac5 100644 --- a/xargs/testsuite/xargs.posix/rc-125.exp +++ b/xargs/testsuite/xargs.posix/rc-125.exp @@ -3,9 +3,9 @@ # on MacOS X, the child just exits with a nonzero status. # This works better but is harder to use in a DejaGnu test: # yes | xargs -I{} echo | true -# Part of the problem here of course is that the exit status of the +# Part of the problem here of course is that the exit status of the # pipeline is the exit status of its last compinent. # # This problem is recorded as Savannah bug# 19969. -# +# xargs_start 125 {-n1 -IARG sh -c ARG} stt.xi skip diff --git a/xargs/testsuite/xargs.posix/s14.exp b/xargs/testsuite/xargs.posix/s14.exp new file mode 100644 index 0000000..22b8188 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s14.exp @@ -0,0 +1 @@ +xargs_start f {-s14} stairs.xi skip diff --git a/xargs/testsuite/xargs.gnu/s19-0.xo b/xargs/testsuite/xargs.posix/s14.xo similarity index 100% rename from xargs/testsuite/xargs.gnu/s19-0.xo rename to xargs/testsuite/xargs.posix/s14.xo diff --git a/xargs/testsuite/xargs.posix/s14_2.exp b/xargs/testsuite/xargs.posix/s14_2.exp new file mode 100644 index 0000000..2a0470b --- /dev/null +++ b/xargs/testsuite/xargs.posix/s14_2.exp @@ -0,0 +1 @@ +xargs_start f {-s14} stairs2.xi skip diff --git a/xargs/testsuite/xargs.posix/s15.exp b/xargs/testsuite/xargs.posix/s15.exp new file mode 100644 index 0000000..6576fa8 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s15.exp @@ -0,0 +1 @@ +xargs_start p {-s15} stairs.xi diff --git a/xargs/testsuite/xargs.gnu/s20-0.xo b/xargs/testsuite/xargs.posix/s15.xo similarity index 100% rename from xargs/testsuite/xargs.gnu/s20-0.xo rename to xargs/testsuite/xargs.posix/s15.xo diff --git a/xargs/testsuite/xargs.posix/s19.exp b/xargs/testsuite/xargs.posix/s19.exp deleted file mode 100644 index 86f9337..0000000 --- a/xargs/testsuite/xargs.posix/s19.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start f {-s19} stairs.xi skip diff --git a/xargs/testsuite/xargs.posix/s19_2.exp b/xargs/testsuite/xargs.posix/s19_2.exp deleted file mode 100644 index be27aef..0000000 --- a/xargs/testsuite/xargs.posix/s19_2.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start f {-s19} stairs2.xi skip diff --git a/xargs/testsuite/xargs.posix/s20.exp b/xargs/testsuite/xargs.posix/s20.exp deleted file mode 100644 index f87d441..0000000 --- a/xargs/testsuite/xargs.posix/s20.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start p {-s20} stairs.xi diff --git a/xargs/testsuite/xargs.posix/s25.exp b/xargs/testsuite/xargs.posix/s25.exp new file mode 100644 index 0000000..ac3ba41 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s25.exp @@ -0,0 +1 @@ +xargs_start p {-s25} stairs.xi diff --git a/xargs/testsuite/xargs.posix/s30.xo b/xargs/testsuite/xargs.posix/s25.xo similarity index 100% rename from xargs/testsuite/xargs.posix/s30.xo rename to xargs/testsuite/xargs.posix/s25.xo diff --git a/xargs/testsuite/xargs.posix/s30.exp b/xargs/testsuite/xargs.posix/s30.exp deleted file mode 100644 index 9faa71b..0000000 --- a/xargs/testsuite/xargs.posix/s30.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start p {-s30} stairs.xi diff --git a/xargs/testsuite/xargs.posix/s42.exp b/xargs/testsuite/xargs.posix/s42.exp new file mode 100644 index 0000000..5f50ae0 --- /dev/null +++ b/xargs/testsuite/xargs.posix/s42.exp @@ -0,0 +1 @@ +xargs_start f {-s42} files.xi skip diff --git a/xargs/testsuite/xargs.posix/s47.xo b/xargs/testsuite/xargs.posix/s42.xo similarity index 100% rename from xargs/testsuite/xargs.posix/s47.xo rename to xargs/testsuite/xargs.posix/s42.xo diff --git a/xargs/testsuite/xargs.posix/s47.exp b/xargs/testsuite/xargs.posix/s47.exp deleted file mode 100644 index 8f79b2a..0000000 --- a/xargs/testsuite/xargs.posix/s47.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start f {-s47} files.xi skip diff --git a/xargs/testsuite/xargs.posix/sv-bug-18714.exp b/xargs/testsuite/xargs.posix/sv-bug-18714.exp index b40e105..68739ed 100644 --- a/xargs/testsuite/xargs.posix/sv-bug-18714.exp +++ b/xargs/testsuite/xargs.posix/sv-bug-18714.exp @@ -1,10 +1,10 @@ # Form feed is not a separator. # -# POSIX specifies that is the serarator +# POSIX specifies that is the serarator # in the POSIX locale, and is defined -# as or . +# as or . # -# On the other hand, includes Form Feed and +# On the other hand, includes Form Feed and # Vertical Tab. By default, those should not be # separators. xargs_start p {printf "\[%s\]\n"} formfeeds.xi diff --git a/xargs/testsuite/xargs.posix/sv-bug-18714b.exp b/xargs/testsuite/xargs.posix/sv-bug-18714b.exp index f110daf..9e9c4d5 100644 --- a/xargs/testsuite/xargs.posix/sv-bug-18714b.exp +++ b/xargs/testsuite/xargs.posix/sv-bug-18714b.exp @@ -1,10 +1,10 @@ # Vertical tab is not a separator. # -# POSIX specifies that is the serarator +# POSIX specifies that is the serarator # in the POSIX locale, and is defined -# as or . +# as or . # -# On the other hand, includes Form Feed and +# On the other hand, includes Form Feed and # Vertical Tab. By default, those should not be # separators. xargs_start p {printf "\[%s\]\n"} verticaltabs.xi diff --git a/xargs/testsuite/xargs.sysv/empty_def-t.xe b/xargs/testsuite/xargs.sysv/empty_def-t.xe index da4ae85..1aa4903 100644 --- a/xargs/testsuite/xargs.sysv/empty_def-t.xe +++ b/xargs/testsuite/xargs.sysv/empty_def-t.xe @@ -1 +1 @@ -/bin/echo +echo diff --git a/xargs/testsuite/xargs.sysv/s25-t.exp b/xargs/testsuite/xargs.sysv/s25-t.exp new file mode 100644 index 0000000..9199880 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/s25-t.exp @@ -0,0 +1 @@ +xargs_start p {-s25 -t} stairs.xi diff --git a/xargs/testsuite/xargs.sysv/s25-t.xe b/xargs/testsuite/xargs.sysv/s25-t.xe new file mode 100644 index 0000000..5659900 --- /dev/null +++ b/xargs/testsuite/xargs.sysv/s25-t.xe @@ -0,0 +1,6 @@ +echo 1 22 333 4444 55555 +echo 666666 7777777 +echo 88888888 999999999 +echo 1 22 333 4444 55555 +echo 666666 7777777 +echo 88888888 999999999 diff --git a/xargs/testsuite/xargs.gnu/s30-0.xo b/xargs/testsuite/xargs.sysv/s25-t.xo similarity index 100% rename from xargs/testsuite/xargs.gnu/s30-0.xo rename to xargs/testsuite/xargs.sysv/s25-t.xo diff --git a/xargs/testsuite/xargs.sysv/s30-t.exp b/xargs/testsuite/xargs.sysv/s30-t.exp deleted file mode 100644 index 4145c8d..0000000 --- a/xargs/testsuite/xargs.sysv/s30-t.exp +++ /dev/null @@ -1 +0,0 @@ -xargs_start p {-s30 -t} stairs.xi diff --git a/xargs/testsuite/xargs.sysv/s30-t.xe b/xargs/testsuite/xargs.sysv/s30-t.xe deleted file mode 100644 index f91bf78..0000000 --- a/xargs/testsuite/xargs.sysv/s30-t.xe +++ /dev/null @@ -1,6 +0,0 @@ -/bin/echo 1 22 333 4444 55555 -/bin/echo 666666 7777777 -/bin/echo 88888888 999999999 -/bin/echo 1 22 333 4444 55555 -/bin/echo 666666 7777777 -/bin/echo 88888888 999999999 diff --git a/xargs/xargs.1 b/xargs/xargs.1 index f490b79..be8a319 100644 --- a/xargs/xargs.1 +++ b/xargs/xargs.1 @@ -23,6 +23,7 @@ xargs \- build and execute command lines from standard input [\fB\-\-max\-chars\fR=\fImax-chars\fR] [\fB\-P \fImax-procs\fR] [\fB\-\-max\-procs\fR=\fImax-procs\fR] +[\fB\-\-process\-slot\-var\fR=\fIname\fR] [\fB\-\-interactive\fR] [\fB\-\-verbose\fR] [\fB\-\-exit\fR] @@ -89,24 +90,8 @@ will stop immediately without reading any further input. An error message is issued on stderr when this happens. .SH OPTIONS .TP -.PD 0 -.BI "\-\-arg\-file=" file -.TP -.PD 0 -.BI "\-a " file -Read items from -.I file -instead of standard input. If you use this option, stdin remains -unchanged when commands are run. Otherwise, stdin is redirected -from -.IR /dev/null . - -.TP -.PD 0 -.B \-\-null -.TP .PD -.B \-0 +.B \-0, \-\-null Input items are terminated by a null character instead of by whitespace, and the quotes and backslash are not special (every character is taken literally). Disables the end of file string, which @@ -115,19 +100,19 @@ contain white space, quote marks, or backslashes. The GNU find \-print0 option produces input suitable for this mode. .TP -.PD 0 -.BI "\-\-delimiter=" delim +.PD +.BI "\-a " file ", \-\-arg\-file=" file +Read items from +.I file +instead of standard input. If you use this option, stdin remains +unchanged when commands are run. Otherwise, stdin is redirected +from +.IR /dev/null . + .TP .PD -.BI \-d " delim" -Input items are terminated by the specified character. Quotes and -backslash are not special; every character in the input is taken -literally. Disables the end-of-file string, which is treated like any -other argument. This can be used when the input consists of simply -newline-separated items, although it is almost always better to design -your program to use -.B \-\-null -where this is possible. The specified +.BI "\-\-delimiter=" delim ", \-d" " delim" +Input items are terminated by the specified character. The specified delimiter may be a single character, a C-style character escape such as .BR \en , @@ -135,6 +120,15 @@ or an octal or hexadecimal escape code. Octal and hexadecimal escape codes are understood as for the .B printf command. Multibyte characters are not supported. +When processing the input, quotes and backslash are not special; every +character in the input is taken literally. The +.B \-d +option disables any end-of-file string, which is treated like any +other argument. You can use this option when the input consists of +simply newline-separated items, although it is almost always better to +design your program to use +.B \-\-null +where this is possible. .TP .BI \-E " eof-str" @@ -146,11 +140,8 @@ nor .B \-e is used, no end of file string is used. .TP -.PD 0 -.BR "\-\-eof" [\fI=eof-str\fR] -.TP .PD -.BR \-e [ \fIeof-str\fR] +.BR \-e "[\fIeof-str\fR], " "\-\-eof" [\fI=eof-str\fR] This option is a synonym for the .B \-E option. Use @@ -163,11 +154,6 @@ nor .B \-e is used, no end of file string is used. .TP -.B "\-\-help" -Print a summary of the options to -.B xargs -and exit. -.TP .BI \-I " replace-str" Replace occurrences of \fIreplace-str\fR in the initial-arguments with names read from standard input. Also, unquoted blanks do not @@ -178,11 +164,8 @@ and .B \-L 1. .TP -.PD 0 -.BR "\-\-replace" [\fI=replace-str\fR] -.TP .PD -.BR \-i "[\fIreplace-str\fR]" +.BR \-i "[\fIreplace-str\fR], " "\-\-replace" [\fI=replace-str\fR] This option is a synonym for .BI \-I replace-str if @@ -201,11 +184,8 @@ Trailing blanks cause an input line to be logically continued on the next input line. Implies .BR \-x . .TP -.PD 0 -.BR \-\-max-lines "[=\fImax-lines\fR]" -.TP .PD -.BR \-l "[\fImax-lines\fR]" +.BR \-l "[\fImax-lines\fR], " \-\-max-lines "[=\fImax-lines\fR]" Synonym for the .B \-L option. Unlike @@ -220,11 +200,8 @@ option is deprecated since the POSIX standard specifies .B \-L instead. .TP -.PD 0 -.BR "\-\-max\-args" =\fImax-args\fR -.TP .PD -.BI \-n " max-args" +.BI \-n " max-args\fB, \fI" "\-\-max\-args" \fR=\fImax-args Use at most \fImax-args\fR arguments per command line. Fewer than .I max-args arguments will be used if the size (see the @@ -234,30 +211,68 @@ option) is exceeded, unless the option is given, in which case .B xargs will exit. .TP -.PD 0 -.B \-\-interactive +.PD +.BI \-P " max-procs\fR, \fI" \-\-max\-procs "\fR=\fImax-procs" +Run up to +.I max-procs +processes at a time; the default is 1. If +.I max-procs +is 0, +.B xargs +will run as many processes as +possible at a time. Use the +.B \-n +option or the +.B \-L +option with +.BR \-P ; +otherwise chances are that only one exec will be done. +While +.B xargs +is running, you can +send its process +a SIGUSR1 signal to increase the number of commands to run simultaneously, +or a SIGUSR2 to decrease the number. You cannot decrease it below 1. +.B xargs +never terminates its commands; when asked to decrease, it merely +waits for more than one existing command to terminate before starting +another. + +.B Please note +that it is up to the called processes to properly manage parallel +access to shared resources. For example, if more than one of them +tries to print to stdout, the ouptut will be produced in an +indeterminate order (and very likely mixed up) unless the processes +collaborate in some way to prevent this. Using some kind of locking +scheme is one way to prevent such problems. In general, using a +locking scheme will help ensure correct output but reduce performance. +If you don't want to tolerate the performance difference, simply +arrange for each process to produce a separate output file (or +otherwise use separate resources). .TP .PD -.B \-p +.B \-p, \-\-interactive Prompt the user about whether to run each command line and read a line from the terminal. Only run the command line if the response starts with `y' or `Y'. Implies .BR -t . .TP -.PD 0 -.B \-\-no\-run\-if\-empty +.PD +.BR \-\-process\-slot\-var "=\fIname\fR" +Set the environment variable +.I name +to a unique value in each running child process. Values are reused +once child processes exit. This can be used in a rudimentary load +distribution scheme, for example. .TP .PD -.B \-r +.B \-r, \-\-no\-run\-if\-empty If the standard input does not contain any nonblanks, do not run the command. Normally, the command is run once even if there is no input. This option is a GNU extension. .TP -.PD 0 -.BR \-\-max\-chars "=\fImax-chars\fR" -.TP .PD -.BI \-s " max-chars" +.BI -s " max-chars\fR, \fI" \-\-max\-chars "=\fImax-chars\fR" Use at most \fImax-chars\fR characters per command line, including the command and initial-arguments and the terminating nulls at the ends of the argument strings. The largest allowed value is system-dependent, @@ -268,19 +283,6 @@ default value is the maximum. 1KiB is 1024 bytes. .B xargs automatically adapts to tighter constraints. .TP -.PD 0 -.B \-\-verbose -.TP -.PD -.B \-t -Print the command line on the standard error output before executing -it. -.TP -.B "\-\-version" -Print the version number of -.B xargs -and exit. -.TP .B "\-\-show\\-limits" Display the limits on the command-line length which are imposed by the operating system, @@ -295,44 +297,25 @@ if you don't want .B xargs to do anything. .TP -.PD 0 -.B \-\-exit +.B \-t, \-\-verbose +Print the command line on the standard error output before executing +it. .TP .PD -.B \-x +.B \-x, \-\-exit Exit if the size (see the .B \-s option) is exceeded. .TP -.PD 0 -.BR \-\-max\-procs "=\fImax-procs\fR" -.TP -.PD -.BI \-P " max-procs" -Run up to -.I max-procs -processes at a time; the default is 1. If -.I max-procs -is 0, -.B xargs -will run as many processes as -possible at a time. Use the -.B \-n -option or the -.B \-L -option with -.BR \-P ; -otherwise chances are that only one exec will be done. -While +.B "\-\-help" +Print a summary of the options to .B xargs -is running, you can -send its process -a SIGUSR1 signal to increase the number of commands to run simultaneously, -or a SIGUSR2 to decrease the number. You cannot decrease it below 1. +and exit. +.TP +.B "\-\-version" +Print the version number of .B xargs -never terminates its commands; when asked to decrease, it merely -waits for more than one existing command to terminate before starting -another. +and exit. .SH "EXAMPLES" .nf .B find /tmp \-name core \-type f \-print | xargs /bin/rm \-f @@ -434,9 +417,19 @@ current system. .SH "SEE ALSO" \fBfind\fP(1), \fBlocate\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1), -\fBfork\fP(2), \fBexecvp\fP(3), +\fBfork\fP(2), \fBexecvp\fP(3), \fBkill\fP(1), \fBsignal\fP(7), -\fBFinding Files\fP (on-line in Info, or printed) + +The full documentation for +.B xargs +is maintained as a Texinfo manual. If the +.B info +and +.B xargs +programs are properly installed at your site, the command +.B info xargs +should give you access to the complete manual. + .SH "BUGS" The .B \-L diff --git a/xargs/xargs.c b/xargs/xargs.c index 3cc1832..89e78a3 100644 --- a/xargs/xargs.c +++ b/xargs/xargs.c @@ -1,6 +1,6 @@ /* xargs -- build and execute command lines from standard input - Copyright (C) 1990, 91, 92, 93, 94, 2000, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2003, 2004, 2005, + 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,51 +23,41 @@ Dmitry V. Levin */ +/* config.h must be included first. */ #include +/* system headers. */ +#include #include -#include #include +#include +#include +#include #include +#include +#include #include -#include - -#include -#include -#include -#include +#include +#include #include -#include - -#ifndef LONG_MAX -#define LONG_MAX (~(1 << (sizeof (long) * 8 - 1))) -#endif - -#define ISBLANK(c) (isascii (c) && isblank (c)) -#define ISSPACE(c) (ISBLANK (c) || (c) == '\n' || (c) == '\r' \ - || (c) == '\f' || (c) == '\v') - -/* The presence of unistd.h is assumed by gnulib these days, so we - * might as well assume it too. - */ -#include -#include +#include #include -#include -#include +#include #include -#include - -#if !defined(SIGCHLD) && defined(SIGCLD) -#define SIGCHLD SIGCLD -#endif - -#include "verify.h" +/* gnulib headers. */ +#include "closein.h" +#include "error.h" +#include "gettext.h" #include "progname.h" #include "quotearg.h" -#include "findutils-version.h" +#include "safe-read.h" +#include "verify.h" +#include "xalloc.h" +/* find headers. */ +#include "buildcmd.h" +#include "findutils-version.h" #if ENABLE_NLS # include @@ -84,25 +74,17 @@ # define N_(String) String #endif -#include "buildcmd.h" -#include "arg-max.h" /* must include after unistd.h. */ +#ifndef LONG_MAX +#define LONG_MAX (~(1 << (sizeof (long) * 8 - 1))) +#endif +#define ISBLANK(c) (isascii (c) && isblank (c)) +#define ISSPACE(c) (ISBLANK (c) || (c) == '\n' || (c) == '\r' \ + || (c) == '\f' || (c) == '\v') /* Return nonzero if S is the EOF string. */ #define EOF_STR(s) (eof_str && *eof_str == *s && !strcmp (eof_str, s)) -#if __STDC__ -#define VOID void -#else -#define VOID char -#endif - -#include -#include "closein.h" -#include "gnulib-version.h" - -void error (int status, int errnum, char *message,...); - extern char *version_string; static FILE *input_stream; @@ -113,7 +95,7 @@ static char *linebuf; static int keep_stdin = 0; /* Line number in stdin since the last command was executed. */ -static int lineno = 0; +static size_t lineno = 0; static struct buildcmd_state bc_state; static struct buildcmd_control bc_ctl; @@ -177,6 +159,18 @@ static bool query_before_executing = false; static char input_delimiter = '\0'; +/* Name of the environment variable which indicates which 'slot' + * the child process is in. This can be used to do some kind of basic + * load distribution. We guarantee not to allow two processes to run + * at the same time with the same value of this variable. + */ +static char* slot_var_name = NULL; + +enum LongOptionIdentifier + { + PROCESS_SLOT_VAR = CHAR_MAX+1 + }; + static struct option const longopts[] = { {"null", no_argument, NULL, '0'}, @@ -193,6 +187,7 @@ static struct option const longopts[] = {"show-limits", no_argument, NULL, 'S'}, {"exit", no_argument, NULL, 'x'}, {"max-procs", required_argument, NULL, 'P'}, + {"process-slot-var", required_argument, NULL, PROCESS_SLOT_VAR}, {"version", no_argument, NULL, 'v'}, {"help", no_argument, NULL, 'h'}, {NULL, no_argument, NULL, 0} @@ -219,7 +214,7 @@ static bool print_args (bool ask); /* static void do_exec (void); */ static int xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char **argv); static void exec_if_possible (void); -static void add_proc (pid_t pid); +static unsigned int add_proc (pid_t pid); static void wait_for_proc (bool all, unsigned int minreap); static void wait_for_proc_all (void); static void increment_proc_max (int); @@ -228,7 +223,6 @@ static long parse_num (char *str, int option, long min, long max, int fatal); static void usage (FILE * stream); - static char get_char_oct_or_hex_escape (const char *s) { @@ -259,7 +253,7 @@ get_char_oct_or_hex_escape (const char *s) s); } errno = 0; - endp = (char*)p; + endp = NULL; val = strtoul (p, &endp, base); /* This if condition is carefully constructed to do @@ -367,11 +361,12 @@ smaller_of (size_t a, size_t b) int main (int argc, char **argv) { - int optc; + int optc, option_index; int show_limits = 0; /* --show-limits */ int always_run_command = 1; - char *input_file = "-"; /* "-" is stdin */ - char *default_cmd = "/bin/echo"; + const char *input_file = "-"; /* "-" is stdin */ + char default_cmd[] = "echo"; + char *default_arglist[1]; int (*read_args) (void) = read_line; void (*act_on_init_result)(void) = noop; enum BC_INIT_STATUS bcstatus; @@ -391,8 +386,11 @@ main (int argc, char **argv) #endif bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - atexit (close_stdin); - atexit (wait_for_proc_all); + + if (atexit (close_stdin) || atexit (wait_for_proc_all)) + { + error (EXIT_FAILURE, errno, _("The atexit library function failed")); + } /* xargs is required by POSIX to allow 2048 bytes of headroom * for extra environment variables (that perhaps the utliity might @@ -480,7 +478,7 @@ main (int argc, char **argv) } while ((optc = getopt_long (argc, argv, "+0a:E:e::i::I:l::L:n:prs:txP:d:", - longopts, (int *) 0)) != -1) + longopts, &option_index)) != -1) { switch (optc) { @@ -560,7 +558,7 @@ main (int argc, char **argv) error (0, 0, _("warning: value %ld for -s option is too large, " "using %ld instead"), - arg_size, bc_ctl.posix_arg_size_max); + (long) arg_size, (long) bc_ctl.posix_arg_size_max); arg_size = bc_ctl.posix_arg_size_max; } bc_ctl.arg_max = arg_size; @@ -601,12 +599,39 @@ main (int argc, char **argv) display_findutils_version ("xargs"); return 0; + case PROCESS_SLOT_VAR: + if (strchr (optarg, '=')) + { + error (EXIT_FAILURE, 0, + _("option --%s may not be set to a value which includes `='"), + longopts[option_index].name); + } + slot_var_name = optarg; + if (0 != unsetenv (slot_var_name)) + { + /* This is a fatal error, otherwise some child process + may not be able to guarantee that no two children + have the same value for this variable; see + set_slot_var. + */ + error (EXIT_FAILURE, errno, + _("failed to unset environment variable %s"), + slot_var_name); + } + break; + default: usage (stderr); return 1; } } + if (eof_str && (read_args == read_string)) + { + error (0, 0, + _("warning: the -E option has no effect if -0 or -d is used.\n")); + } + /* If we had deferred failing due to problems in bc_init_controlinfo (), * do it now. * @@ -660,7 +685,8 @@ main (int argc, char **argv) { optind = 0; argc = 1; - argv = &default_cmd; + default_arglist[0] = default_cmd; + argv = default_arglist; } if (show_limits) @@ -735,15 +761,15 @@ main (int argc, char **argv) } else { - int i; - size_t len; + int i, args; size_t *arglen = xmalloc (sizeof (size_t) * argc); for (i = optind; i < argc; i++) arglen[i] = strlen (argv[i]); bc_ctl.rplen = strlen (bc_ctl.replace_pat); - while ((len = (*read_args) ()) != -1) + while ((args = (*read_args) ()) != -1) { + size_t len = (size_t) args; /* Don't do insert on the command name. */ bc_clear_args (&bc_ctl, &bc_state); bc_state.cmd_argv_chars = 0; /* begin at start of buffer */ @@ -952,11 +978,19 @@ read_line (void) } } -/* Read a null-terminated string from the input and add it to the list of - arguments to pass to the command. - Return -1 if eof (either physical or logical) is reached, - otherwise the length of the string read (including the null). */ +/* Read a string (terminated by the delimiter, which may be NUL) from + the input and add it to the list of arguments to pass to the + command. + + The return value is the length of the added argument, including its + terminating NUL. The added argument is always terminated by NUL, + even if that is not the delimiter. + + If we reach physical EOF before seeing the delimiter, we treat any + characters read as the final argument. + If no argument was read (that is, we reached physical EOF before + reading any characters) then -1 is returned. */ static int read_string (void) { @@ -1014,10 +1048,14 @@ read_string (void) static bool print_args (bool ask) { - int i; + size_t i; for (i = 0; i < bc_state.cmd_argc - 1; i++) - fprintf (stderr, "%s ", bc_state.cmd_argv[i]); + { + if (fprintf (stderr, "%s ", bc_state.cmd_argv[i]) < 0) + error (EXIT_FAILURE, errno, _("Failed to write to stderr")); + } + if (ask) { static FILE *tty_stream; @@ -1031,10 +1069,14 @@ print_args (bool ask) _("failed to open /dev/tty for reading")); } fputs ("?...", stderr); - fflush (stderr); + if (fflush (stderr) != 0) + error (EXIT_FAILURE, errno, _("Failed to write to stderr")); + c = savec = getc (tty_stream); while (c != EOF && c != '\n') c = getc (tty_stream); + if (EOF == c) + error (EXIT_FAILURE, errno, _("Failed to read from stdin")); if (savec == 'y' || savec == 'Y') return true; } @@ -1044,6 +1086,55 @@ print_args (bool ask) return false; } +/* Set SOME_ENVIRONMENT_VARIABLE=n in the environment. */ +static void +set_slot_var (unsigned int n) +{ + static const char *fmt = "%u"; + int size; + char *buf; + + + /* Determine the length of the buffer we need. + + If the result would be zero-length or have length (not value) > + INT_MAX, the assumptions we made about how snprintf behaves (or + what UINT_MAX is) are wrong. Hence we have a design error (not + an environmental error). + */ + size = snprintf (NULL, 0u, fmt, n); + assert (size > 0); + + + /* Failures here are undesirable but not fatal, since we can still + guarantee that this child does not have a duplicate value of the + indicated environment variable set (since the parent unset it on + startup). + */ + if (NULL == (buf = malloc (size+1))) + { + error (0, errno, _("unable to allocate memory")); + } + else + { + snprintf (buf, size+1, fmt, n); + + /* If the user doesn't want us to set the variable, there is + nothing to do. However, we defer the bail-out until this + point in order to get better test coverage. + */ + if (slot_var_name) + { + if (setenv (slot_var_name, buf, 1) < 0) + { + error (0, errno, + _("failed to set environment variable %s"), slot_var_name); + } + } + free (buf); + } +} + /* Close stdin and attach /dev/null to it. * This resolves Savannah bug #3992. @@ -1051,6 +1142,14 @@ print_args (bool ask) static void prep_child_for_exec (void) { + /* The parent will call add_proc to allocate a slot. We do the same in the + child to make sure we get the same value. + + We use 0 here in order to avoid generating a data structure that appears + to indicate that we (the child) have a child. */ + unsigned int slot = add_proc (0); + set_slot_var (slot); + if (!keep_stdin) { const char inputfile[] = "/dev/null"; @@ -1064,7 +1163,8 @@ prep_child_for_exec (void) * stdin is almost as good as executing it * with its stdin attached to /dev/null. */ - error (0, errno, "%s", quotearg_n_style (0, locale_quoting_style, inputfile)); + error (0, errno, "%s", + quotearg_n_style (0, locale_quoting_style, inputfile)); } } } @@ -1084,19 +1184,22 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char * pid_t child; int fd[2]; int buf; - int r; + size_t r; (void) ctl; + (void) argc; + (void) usercontext; + + if (proc_max) + { + while (procs_executing >= proc_max) + { + wait_for_proc (false, 1u); + } + } if (!query_before_executing || print_args (true)) { - if (proc_max) - { - while (procs_executing >= proc_max) - { - wait_for_proc (false, 1u); - } - } if (!query_before_executing && print_command) print_args (false); @@ -1175,13 +1278,15 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char * } /* switch (child) */ /*fprintf (stderr, "forked child (bc_state.cmd_argc=%d) -> ", bc_state.cmd_argc);*/ - switch (r = read (fd[0], &buf, sizeof (int))) + /* We use safe_read here in order to avoid an error if + SIGUSR[12] is handled during the read system call. */ + switch (r = safe_read (fd[0], &buf, sizeof (int))) { - case -1: + case SAFE_READ_ERROR: { close (fd[0]); error (0, errno, - _("errno-buffer read failed in xargs_do_exec " + _("errno-buffer safe_read failed in xargs_do_exec " "(this is probably a bug, please report it)")); break; } @@ -1234,7 +1339,7 @@ xargs_do_exec (struct buildcmd_control *ctl, void *usercontext, int argc, char * default: { error (EXIT_FAILURE, errno, - _("read returned unexpected value %d; " + _("read returned unexpected value %zu; " "this is probably a bug, please report it"), r); } } /* switch on bytes read */ @@ -1257,7 +1362,7 @@ exec_if_possible (void) /* Add the process with id PID to the list of processes that have been executed. */ -static void +static unsigned int add_proc (pid_t pid) { unsigned int i, j; @@ -1282,6 +1387,7 @@ add_proc (pid_t pid) pids[i] = pid; procs_executing++; procs_executed = true; + return i; } @@ -1332,8 +1438,8 @@ wait_for_proc (bool all, unsigned int minreap) { /* Receipt of SIGUSR1 gave us an extra slot and we * don't need to wait for all processes to finish. - * We can stop reaping now, but in any case check for - * further dead children without waiting for another + * We can stop reaping now, but in any case check for + * further dead children without waiting for another * to exit. */ wflags = WNOHANG; @@ -1359,7 +1465,7 @@ wait_for_proc (bool all, unsigned int minreap) * number of child processes still executing, so the * loop should have terminated. */ - error (0, 0, _("WARNING: Lost track of %d child processes"), + error (0, 0, _("WARNING: Lost track of %lu child processes"), procs_executing); } else @@ -1430,12 +1536,13 @@ wait_for_proc_all (void) /* Increment or decrement the number of processes we can start simultaneously, when we receive a signal from the outside world. - + We must take special care around proc_max == 0 (unlimited children), proc_max == 1 (don't decrement to zero). */ static void increment_proc_max (int ignore) { + (void) ignore; /* If user increments from 0 to 1, we'll take it and serialize. */ proc_max++; /* If we're waiting for a process to die before doing something, @@ -1446,6 +1553,7 @@ increment_proc_max (int ignore) static void decrement_proc_max (int ignore) { + (void) ignore; if (proc_max > 1) proc_max--; } @@ -1505,16 +1613,50 @@ parse_num (char *str, int option, long int min, long int max, int fatal) static void usage (FILE *stream) { - fprintf (stream, _("\ -Usage: %s [-0prtx] [--interactive] [--null] [-d|--delimiter=delim]\n\ - [-E eof-str] [-e[eof-str]] [--eof[=eof-str]]\n\ - [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]]\n\ - [-I replace-str] [-i[replace-str]] [--replace[=replace-str]]\n\ - [-n max-args] [--max-args=max-args]\n\ - [-s max-chars] [--max-chars=max-chars]\n\ - [-P max-procs] [--max-procs=max-procs] [--show-limits]\n\ - [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file]\n\ - [--version] [--help] [command [initial-arguments]]\n"), - program_name); - fputs (_("\nReport bugs to .\n"), stream); + fprintf (stream, + _("Usage: %s [OPTION]... COMMAND [INITIAL-ARGS]...\n"), + program_name); + +#define HTL(t) fputs (t, stream); + + HTL (_("Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.\n" + "\n")); + HTL (_("Mandatory and optional arguments to long options are also\n" + "mandatory or optional for the corresponding short option.\n")); + HTL (_(" -0, --null items are separated by a null, not whitespace;\n" + " disables quote and backslash processing and\n" + " logical EOF processing\n")); + HTL (_(" -a, --arg-file=FILE read arguments from FILE, not standard input\n")); + HTL (_(" -d, --delimiter=CHARACTER items in input stream are separated by CHARACTER,\n" + " not by whitespace; disables quote and backslash\n" + " processing and logical EOF processing\n")); + HTL (_(" -E END set logical EOF string; if END occurs as a line\n" + " of input, the rest of the input is ignored\n" + " (ignored if -0 or -d was specified)\n")); + HTL (_(" -e, --eof[=END] equivalent to -E END if END is specified;\n" + " otherwise, there is no end-of-file string\n")); + HTL (_(" -I R same as --replace=R\n")); + HTL (_(" -i, --replace[=R] replace R in INITIAL-ARGS with names read\n" + " from standard input; if R is unspecified,\n" + " assume {}\n")); + HTL (_(" -L, --max-lines=MAX-LINES use at most MAX-LINES non-blank input lines per\n" + " command line\n")); + HTL (_(" -l[MAX-LINES] similar to -L but defaults to at most one non-\n" + " blank input line if MAX-LINES is not specified\n")); + HTL (_(" -n, --max-args=MAX-ARGS use at most MAX-ARGS arguments per command line\n")); + HTL (_(" -P, --max-procs=MAX-PROCS run at most MAX-PROCS processes at a time\n")); + HTL (_(" -p, --interactive prompt before running commands\n")); + HTL (_(" --process-slot-var=VAR set environment variable VAR in child processes\n")); + HTL (_(" -r, --no-run-if-empty if there are no arguments, then do not run COMMAND;\n" + " if this option is not given, COMMAND will be\n" + " run at least once\n")); + HTL (_(" -s, --max-chars=MAX-CHARS limit length of command line to MAX-CHARS\n")); + HTL (_(" --show-limits show limits on command-line length\n")); + HTL (_(" -t, --verbose print commands before executing them\n")); + HTL (_(" -x, --exit exit if the size (see -s) is exceeded\n")); + + HTL (_(" --help display this help and exit\n")); + HTL (_(" --version output version information and exit\n")); + HTL (_("\n" + "Report bugs to .\n")); } -- 2.7.4